@cruglobal/godtools-shared 1.0.1 → 1.0.2-SNAPSHOT.1501

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.
@@ -14,76 +14,78 @@
14
14
  //region block: imports
15
15
  var imul = Math.imul;
16
16
  var log2 = Math.log2;
17
- var protoOf = kotlin_kotlin.$_$.m6;
18
- var objectMeta = kotlin_kotlin.$_$.l6;
19
- var setMetadataFor = kotlin_kotlin.$_$.n6;
20
- var interfaceMeta = kotlin_kotlin.$_$.b6;
21
- var classMeta = kotlin_kotlin.$_$.r5;
22
- var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.y;
23
- var Companion_instance = kotlin_kotlin.$_$.k2;
24
- var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.w1;
25
- var createFailure = kotlin_kotlin.$_$.g9;
26
- var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.z1;
27
- var THROW_CCE = kotlin_kotlin.$_$.a9;
28
- var _Result___get_isFailure__impl__jpiriv = kotlin_kotlin.$_$.y1;
29
- var startsWith = kotlin_kotlin.$_$.y7;
30
- var Regex_init_$Create$ = kotlin_kotlin.$_$.r;
31
- var endsWith = kotlin_kotlin.$_$.k7;
17
+ var protoOf = kotlin_kotlin.$_$.o6;
18
+ var objectMeta = kotlin_kotlin.$_$.n6;
19
+ var setMetadataFor = kotlin_kotlin.$_$.p6;
20
+ var interfaceMeta = kotlin_kotlin.$_$.d6;
21
+ var toString = kotlin_kotlin.$_$.s6;
22
+ var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.z;
23
+ var classMeta = kotlin_kotlin.$_$.t5;
24
+ var emptyMap = kotlin_kotlin.$_$.k3;
25
+ var VOID = kotlin_kotlin.$_$.d;
26
+ var Companion_instance = kotlin_kotlin.$_$.l2;
27
+ var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.x1;
28
+ var createFailure = kotlin_kotlin.$_$.i9;
29
+ var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.a2;
30
+ var THROW_CCE = kotlin_kotlin.$_$.c9;
31
+ var _Result___get_isFailure__impl__jpiriv = kotlin_kotlin.$_$.z1;
32
+ var startsWith = kotlin_kotlin.$_$.b8;
33
+ var Regex_init_$Create$ = kotlin_kotlin.$_$.s;
34
+ var endsWith = kotlin_kotlin.$_$.m7;
35
+ var collectionSizeOrDefault = kotlin_kotlin.$_$.z2;
36
+ var ArrayList_init_$Create$ = kotlin_kotlin.$_$.g;
37
+ var checkIndexOverflow = kotlin_kotlin.$_$.y2;
38
+ var Unit_instance = kotlin_kotlin.$_$.n2;
39
+ var get_lastIndex = kotlin_kotlin.$_$.x3;
40
+ var get_lastIndex_0 = kotlin_kotlin.$_$.z3;
41
+ var dropLast = kotlin_kotlin.$_$.l7;
42
+ var toDouble = kotlin_kotlin.$_$.g8;
43
+ var charSequenceLength = kotlin_kotlin.$_$.s5;
44
+ var coerceIn = kotlin_kotlin.$_$.a7;
45
+ var FloatCompanionObject_instance = kotlin_kotlin.$_$.i2;
46
+ var Enum = kotlin_kotlin.$_$.s8;
47
+ var equals = kotlin_kotlin.$_$.w5;
48
+ var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.u;
49
+ var dropLast_0 = kotlin_kotlin.$_$.i3;
50
+ var joinTo = kotlin_kotlin.$_$.w3;
51
+ var UByte__toString_impl_v72jg = kotlin_kotlin.$_$.c2;
52
+ var numberToInt = kotlin_kotlin.$_$.l6;
53
+ var roundToInt = kotlin_kotlin.$_$.u6;
54
+ var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.s1;
55
+ var padStart = kotlin_kotlin.$_$.v7;
56
+ var charArrayOf = kotlin_kotlin.$_$.q5;
57
+ var trimEnd = kotlin_kotlin.$_$.n8;
58
+ var isNaN_0 = kotlin_kotlin.$_$.k9;
59
+ var joinTo_0 = kotlin_kotlin.$_$.v3;
60
+ var noWhenBranchMatchedException = kotlin_kotlin.$_$.m9;
61
+ var numberToDouble = kotlin_kotlin.$_$.k6;
62
+ var getStringHashCode = kotlin_kotlin.$_$.b6;
63
+ var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.h;
64
+ var charSequenceGet = kotlin_kotlin.$_$.r5;
65
+ var toString_0 = kotlin_kotlin.$_$.w1;
66
+ var arrayConcat = kotlin_kotlin.$_$.a;
67
+ var listOf = kotlin_kotlin.$_$.d4;
68
+ var to = kotlin_kotlin.$_$.r9;
69
+ var mapOf = kotlin_kotlin.$_$.f4;
70
+ var withSign = kotlin_kotlin.$_$.v6;
71
+ var get_PI = kotlin_kotlin.$_$.t6;
32
72
  var coerceAtLeast = kotlin_kotlin.$_$.w6;
33
- var collectionSizeOrDefault = kotlin_kotlin.$_$.y2;
34
- var ArrayList_init_$Create$ = kotlin_kotlin.$_$.f;
35
- var Unit_instance = kotlin_kotlin.$_$.m2;
36
- var get_lastIndex = kotlin_kotlin.$_$.v3;
37
- var charSequenceLength = kotlin_kotlin.$_$.q5;
38
- var VOID = kotlin_kotlin.$_$.c;
39
- var coerceIn = kotlin_kotlin.$_$.y6;
40
- var roundToInt = kotlin_kotlin.$_$.s6;
41
- var coerceIn_0 = kotlin_kotlin.$_$.z6;
42
- var toDouble = kotlin_kotlin.$_$.e8;
43
- var dropLast = kotlin_kotlin.$_$.j7;
44
- var Enum = kotlin_kotlin.$_$.q8;
45
- var equals = kotlin_kotlin.$_$.u5;
46
- var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.t;
47
- var dropLast_0 = kotlin_kotlin.$_$.g3;
48
- var joinTo = kotlin_kotlin.$_$.u3;
49
- var UByte__toString_impl_v72jg = kotlin_kotlin.$_$.b2;
50
- var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.r1;
51
- var indexOf = kotlin_kotlin.$_$.o7;
52
- var take = kotlin_kotlin.$_$.a8;
53
- var charArrayOf = kotlin_kotlin.$_$.o5;
54
- var trimEnd = kotlin_kotlin.$_$.l8;
55
- var noWhenBranchMatchedException = kotlin_kotlin.$_$.k9;
56
- var isNaN_0 = kotlin_kotlin.$_$.i9;
57
- var joinTo_0 = kotlin_kotlin.$_$.t3;
58
- var numberToDouble = kotlin_kotlin.$_$.i6;
59
- var getStringHashCode = kotlin_kotlin.$_$.z5;
60
- var charSequenceGet = kotlin_kotlin.$_$.p5;
61
- var toString = kotlin_kotlin.$_$.v1;
62
- var copyToArray = kotlin_kotlin.$_$.f3;
63
- var plus = kotlin_kotlin.$_$.g4;
64
- var asList = kotlin_kotlin.$_$.v2;
65
- var to = kotlin_kotlin.$_$.p9;
66
- var mapOf = kotlin_kotlin.$_$.d4;
67
- var withSign = kotlin_kotlin.$_$.t6;
68
- var get_PI = kotlin_kotlin.$_$.r6;
69
- var coerceAtLeast_0 = kotlin_kotlin.$_$.u6;
70
- var getNumberHashCode = kotlin_kotlin.$_$.x5;
71
- var numberToInt = kotlin_kotlin.$_$.j6;
72
- var FloatCompanionObject_instance = kotlin_kotlin.$_$.h2;
73
- var hashCode = kotlin_kotlin.$_$.a6;
74
- var isInterface = kotlin_kotlin.$_$.e6;
75
- var toString_0 = kotlin_kotlin.$_$.q6;
76
- var get_lastIndex_0 = kotlin_kotlin.$_$.x3;
77
- var DoubleCompanionObject_instance = kotlin_kotlin.$_$.g2;
78
- var Char = kotlin_kotlin.$_$.n8;
79
- var toInt = kotlin_kotlin.$_$.i8;
80
- var numberRangeToNumber = kotlin_kotlin.$_$.f6;
81
- var slice = kotlin_kotlin.$_$.u7;
82
- var _UInt___init__impl__l7qpdl = kotlin_kotlin.$_$.c2;
83
- var _UInt___get_data__impl__f0vqqw = kotlin_kotlin.$_$.d2;
84
- var toByte = kotlin_kotlin.$_$.o6;
85
- var _UByte___init__impl__g9hnc4 = kotlin_kotlin.$_$.a2;
86
- var objectCreate = kotlin_kotlin.$_$.k6;
73
+ var getNumberHashCode = kotlin_kotlin.$_$.z5;
74
+ var hashCode = kotlin_kotlin.$_$.c6;
75
+ var isInterface = kotlin_kotlin.$_$.g6;
76
+ var objectCreate = kotlin_kotlin.$_$.m6;
77
+ var DoubleCompanionObject_instance = kotlin_kotlin.$_$.h2;
78
+ var Char = kotlin_kotlin.$_$.p8;
79
+ var toInt = kotlin_kotlin.$_$.k8;
80
+ var numberRangeToNumber = kotlin_kotlin.$_$.h6;
81
+ var slice = kotlin_kotlin.$_$.x7;
82
+ var contentEquals = kotlin_kotlin.$_$.c3;
83
+ var coerceAtLeast_0 = kotlin_kotlin.$_$.y6;
84
+ var _UInt___init__impl__l7qpdl = kotlin_kotlin.$_$.d2;
85
+ var _UInt___get_data__impl__f0vqqw = kotlin_kotlin.$_$.e2;
86
+ var coerceIn_0 = kotlin_kotlin.$_$.b7;
87
+ var toByte = kotlin_kotlin.$_$.q6;
88
+ var _UByte___init__impl__g9hnc4 = kotlin_kotlin.$_$.b2;
87
89
  //endregion
88
90
  //region block: pre-declaration
89
91
  setMetadataFor(Companion, 'Companion', objectMeta);
@@ -102,9 +104,15 @@
102
104
  function toHWB() {
103
105
  return this.j1k().d1l();
104
106
  }
107
+ function toOklab() {
108
+ return this.q1k().e1l();
109
+ }
110
+ function toOklch() {
111
+ return this.e1l().f1l();
112
+ }
105
113
  setMetadataFor(Color, 'Color', interfaceMeta);
106
- setMetadataFor(WhitePointColorSpace, 'WhitePointColorSpace', interfaceMeta);
107
114
  setMetadataFor(ColorComponentInfo, 'ColorComponentInfo', classMeta);
115
+ setMetadataFor(WhitePointColorSpace, 'WhitePointColorSpace', interfaceMeta);
108
116
  setMetadataFor(PATTERNS, 'PATTERNS', objectMeta);
109
117
  setMetadataFor(RenderCondition, 'RenderCondition', classMeta, Enum);
110
118
  setMetadataFor(AngleUnit, 'AngleUnit', classMeta, Enum);
@@ -118,28 +126,33 @@
118
126
  setMetadataFor(ICtCp, 'ICtCp', classMeta, VOID, [Color]);
119
127
  setMetadataFor(PqNonlinearity, 'PqNonlinearity', objectMeta);
120
128
  function invoke(l, a, b, alpha) {
121
- return this.d1m(numberToDouble(l), numberToDouble(a), numberToDouble(b), numberToDouble(alpha));
129
+ return this.l1m(numberToDouble(l), numberToDouble(a), numberToDouble(b), numberToDouble(alpha));
122
130
  }
123
131
  setMetadataFor(LABColorSpace, 'LABColorSpace', interfaceMeta, VOID, [WhitePointColorSpace]);
124
132
  setMetadataFor(Companion_2, 'Companion', objectMeta, VOID, [LABColorSpace]);
125
133
  setMetadataFor(LAB, 'LAB', classMeta, VOID, [Color]);
126
134
  setMetadataFor(LABColorSpaces, 'LABColorSpaces', objectMeta);
127
135
  setMetadataFor(LABColorSpaceImpl, 'LABColorSpaceImpl', classMeta, VOID, [LABColorSpace]);
128
- setMetadataFor(Companion_3, 'Companion', objectMeta, VOID, [WhitePointColorSpace]);
136
+ setMetadataFor(LCHabColorSpace, 'LCHabColorSpace', interfaceMeta, VOID, [WhitePointColorSpace]);
137
+ setMetadataFor(Companion_3, 'Companion', objectMeta, VOID, [LCHabColorSpace]);
129
138
  setMetadataFor(LCHab, 'LCHab', classMeta, VOID, [Color]);
130
139
  setMetadataFor(LCHabColorSpaces, 'LCHabColorSpaces', objectMeta);
131
- setMetadataFor(LCHabColorSpaceImpl, 'LCHabColorSpaceImpl', classMeta, VOID, [WhitePointColorSpace]);
140
+ setMetadataFor(LCHabColorSpaceImpl, 'LCHabColorSpaceImpl', classMeta, VOID, [LCHabColorSpace]);
141
+ setMetadataFor(Companion_4, 'Companion', objectMeta);
142
+ setMetadataFor(Oklab, 'Oklab', classMeta, VOID, [Color]);
143
+ setMetadataFor(Companion_5, 'Companion', objectMeta);
144
+ setMetadataFor(Oklch, 'Oklch', classMeta, VOID, [Color]);
132
145
  setMetadataFor(GammaTransferFunctions, 'GammaTransferFunctions', classMeta);
133
146
  setMetadataFor(LinearTransferFunctions, 'LinearTransferFunctions', objectMeta);
134
147
  function invoke_0(r, g, b, alpha) {
135
- return this.d1m(numberToDouble(r), numberToDouble(g), numberToDouble(b), numberToDouble(alpha));
148
+ return this.l1m(numberToDouble(r), numberToDouble(g), numberToDouble(b), numberToDouble(alpha));
136
149
  }
137
150
  function from255(r, g, b, alpha) {
138
- return this.d1m(r / 255.0, g / 255.0, b / 255.0, alpha / 255.0);
151
+ return this.l1m(r / 255.0, g / 255.0, b / 255.0, alpha / 255.0);
139
152
  }
140
153
  function from255$default(r, g, b, alpha, $super) {
141
154
  alpha = alpha === VOID ? 255 : alpha;
142
- return $super === VOID ? this.z1n(r, g, b, alpha) : from255(r, g, b, alpha);
155
+ return $super === VOID ? this.p1o(r, g, b, alpha) : from255(r, g, b, alpha);
143
156
  }
144
157
  function invoke_1(hex) {
145
158
  var tmp = parseHex(validateHex(hex), 0);
@@ -155,30 +168,29 @@
155
168
  } else {
156
169
  tmp_2 = 255;
157
170
  }
158
- return this.z1n(tmp, tmp_0, tmp_1, tmp_2);
171
+ return this.p1o(tmp, tmp_0, tmp_1, tmp_2);
159
172
  }
160
173
  setMetadataFor(RGBColorSpace, 'RGBColorSpace', interfaceMeta, VOID, [WhitePointColorSpace]);
161
- setMetadataFor(Companion_4, 'Companion', objectMeta, VOID, [RGBColorSpace]);
174
+ setMetadataFor(Companion_6, 'Companion', objectMeta, VOID, [RGBColorSpace]);
162
175
  setMetadataFor(RGB, 'RGB', classMeta, VOID, [Color]);
163
176
  setMetadataFor(RGBColorSpaces, 'RGBColorSpaces', objectMeta);
164
177
  setMetadataFor(SRGB, 'SRGB', objectMeta, VOID, [RGBColorSpace]);
178
+ setMetadataFor(RGBColorSpaceImpl, 'RGBColorSpaceImpl', classMeta, VOID, [RGBColorSpace]);
179
+ setMetadataFor(SRGBTransferFunctions, 'SRGBTransferFunctions', objectMeta);
165
180
  setMetadataFor(ACESccTransferFunctions, 'ACESccTransferFunctions', objectMeta);
166
181
  setMetadataFor(ACEScctTransferFunctions, 'ACEScctTransferFunctions', objectMeta);
167
- setMetadataFor(BT2020Space, 'BT2020Space', objectMeta, VOID, [RGBColorSpace]);
182
+ setMetadataFor(BT2020TransferFunctions, 'BT2020TransferFunctions', objectMeta);
168
183
  setMetadataFor(BT709TransferFunctions, 'BT709TransferFunctions', objectMeta);
169
- setMetadataFor(SRGBTransferFunctions, 'SRGBTransferFunctions', objectMeta);
170
184
  setMetadataFor(ROMMTransferFunctions, 'ROMMTransferFunctions', objectMeta);
171
- setMetadataFor(RGBColorSpaceImpl, 'RGBColorSpaceImpl', classMeta, VOID, [RGBColorSpace]);
172
- setMetadataFor(BT2020TransferFunctions, 'BT2020TransferFunctions', objectMeta);
173
185
  function invoke_2(x, y, z, alpha) {
174
- return this.d1m(numberToDouble(x), numberToDouble(y), numberToDouble(z), numberToDouble(alpha));
186
+ return this.l1m(numberToDouble(x), numberToDouble(y), numberToDouble(z), numberToDouble(alpha));
175
187
  }
176
188
  function invoke$default(x, y, z, alpha, $super) {
177
189
  alpha = alpha === VOID ? 1.0 : alpha;
178
- return $super === VOID ? this.a1p(x, y, z, alpha) : invoke_2(x, y, z, alpha);
190
+ return $super === VOID ? this.j1p(x, y, z, alpha) : invoke_2(x, y, z, alpha);
179
191
  }
180
192
  setMetadataFor(XYZColorSpace, 'XYZColorSpace', interfaceMeta, VOID, [WhitePointColorSpace]);
181
- setMetadataFor(Companion_5, 'Companion', objectMeta, VOID, [XYZColorSpace]);
193
+ setMetadataFor(Companion_7, 'Companion', objectMeta, VOID, [XYZColorSpace]);
182
194
  setMetadataFor(XYZ, 'XYZ', classMeta, VOID, [Color]);
183
195
  setMetadataFor(XYZColorSpaces, 'XYZColorSpaces', objectMeta);
184
196
  setMetadataFor(XYZColorSpaceImpl, 'XYZColorSpaceImpl', classMeta, VOID, [XYZColorSpace]);
@@ -193,16 +205,26 @@
193
205
  function Color() {
194
206
  }
195
207
  function convertTo(_this__u8e3s4, space) {
196
- return space.e1l(_this__u8e3s4);
208
+ return space.k1l(_this__u8e3s4);
197
209
  }
198
- function WhitePointColorSpace() {
210
+ function ColorComponentInfo(name, isPolar, min, max) {
211
+ this.l1l_1 = name;
212
+ this.m1l_1 = isPolar;
213
+ this.n1l_1 = min;
214
+ this.o1l_1 = max;
215
+ // Inline function 'kotlin.require' call
216
+ // Inline function 'kotlin.contracts.contract' call
217
+ if (!(this.n1l_1 <= this.o1l_1)) {
218
+ // Inline function 'com.github.ajalt.colormath.ColorComponentInfo.<anonymous>' call
219
+ var message = 'min must be less than or equal to max';
220
+ throw IllegalArgumentException_init_$Create$(toString(message));
221
+ }
199
222
  }
200
- function ColorComponentInfo(name, isPolar) {
201
- this.i1l_1 = name;
202
- this.j1l_1 = isPolar;
223
+ function WhitePointColorSpace() {
203
224
  }
204
- function parse(_this__u8e3s4, color) {
205
- var tmp0_elvis_lhs = parseOrNull(_this__u8e3s4, color);
225
+ function parse(_this__u8e3s4, color, customColorSpaces) {
226
+ customColorSpaces = customColorSpaces === VOID ? emptyMap() : customColorSpaces;
227
+ var tmp0_elvis_lhs = parseOrNull(_this__u8e3s4, color, customColorSpaces);
206
228
  var tmp;
207
229
  if (tmp0_elvis_lhs == null) {
208
230
  throw IllegalArgumentException_init_$Create$('Invalid color: ' + color);
@@ -211,8 +233,9 @@
211
233
  }
212
234
  return tmp;
213
235
  }
214
- function parseOrNull(_this__u8e3s4, color_0) {
215
- var keywordColor = CssColors_getInstance().k1l_1.q2(color_0);
236
+ function parseOrNull(_this__u8e3s4, color_0, customColorSpaces) {
237
+ customColorSpaces = customColorSpaces === VOID ? emptyMap() : customColorSpaces;
238
+ var keywordColor = CssColors_getInstance().s1l_1.q2(color_0);
216
239
  var tmp;
217
240
  if (!(keywordColor == null)) {
218
241
  tmp = keywordColor;
@@ -223,7 +246,7 @@
223
246
  try {
224
247
  // Inline function 'kotlin.Companion.success' call
225
248
  // Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
226
- var value = Companion_getInstance_4().c1m(color_0);
249
+ var value = Companion_getInstance_6().k1m(color_0);
227
250
  tmp_0 = _Result___init__impl__xyqfz8(value);
228
251
  } catch ($p) {
229
252
  var tmp_1;
@@ -246,7 +269,7 @@
246
269
  }
247
270
  tmp = tmp_2;
248
271
  } else {
249
- var tmp0_safe_receiver = PATTERNS_getInstance().r1l_1.l8(color_0);
272
+ var tmp0_safe_receiver = PATTERNS_getInstance().z1l_1.l8(color_0);
250
273
  var tmp_4;
251
274
  if (tmp0_safe_receiver == null) {
252
275
  tmp_4 = null;
@@ -259,7 +282,7 @@
259
282
  var tmp2_elvis_lhs = tmp_4;
260
283
  var tmp_5;
261
284
  if (tmp2_elvis_lhs == null) {
262
- var tmp1_safe_receiver = PATTERNS_getInstance().s1l_1.l8(color_0);
285
+ var tmp1_safe_receiver = PATTERNS_getInstance().a1m_1.l8(color_0);
263
286
  var tmp_6;
264
287
  if (tmp1_safe_receiver == null) {
265
288
  tmp_6 = null;
@@ -276,7 +299,7 @@
276
299
  var tmp4_elvis_lhs = tmp_5;
277
300
  var tmp_7;
278
301
  if (tmp4_elvis_lhs == null) {
279
- var tmp3_safe_receiver = PATTERNS_getInstance().t1l_1.l8(color_0);
302
+ var tmp3_safe_receiver = PATTERNS_getInstance().b1m_1.l8(color_0);
280
303
  var tmp_8;
281
304
  if (tmp3_safe_receiver == null) {
282
305
  tmp_8 = null;
@@ -284,7 +307,7 @@
284
307
  // Inline function 'kotlin.let' call
285
308
  // Inline function 'kotlin.contracts.contract' call
286
309
  // Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
287
- tmp_8 = rgb(tmp3_safe_receiver);
310
+ tmp_8 = hsl(tmp3_safe_receiver);
288
311
  }
289
312
  tmp_7 = tmp_8;
290
313
  } else {
@@ -293,7 +316,7 @@
293
316
  var tmp6_elvis_lhs = tmp_7;
294
317
  var tmp_9;
295
318
  if (tmp6_elvis_lhs == null) {
296
- var tmp5_safe_receiver = PATTERNS_getInstance().u1l_1.l8(color_0);
319
+ var tmp5_safe_receiver = PATTERNS_getInstance().c1m_1.l8(color_0);
297
320
  var tmp_10;
298
321
  if (tmp5_safe_receiver == null) {
299
322
  tmp_10 = null;
@@ -301,7 +324,7 @@
301
324
  // Inline function 'kotlin.let' call
302
325
  // Inline function 'kotlin.contracts.contract' call
303
326
  // Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
304
- tmp_10 = rgb(tmp5_safe_receiver);
327
+ tmp_10 = hsl(tmp5_safe_receiver);
305
328
  }
306
329
  tmp_9 = tmp_10;
307
330
  } else {
@@ -310,7 +333,7 @@
310
333
  var tmp8_elvis_lhs = tmp_9;
311
334
  var tmp_11;
312
335
  if (tmp8_elvis_lhs == null) {
313
- var tmp7_safe_receiver = PATTERNS_getInstance().v1l_1.l8(color_0);
336
+ var tmp7_safe_receiver = PATTERNS_getInstance().d1m_1.l8(color_0);
314
337
  var tmp_12;
315
338
  if (tmp7_safe_receiver == null) {
316
339
  tmp_12 = null;
@@ -318,7 +341,7 @@
318
341
  // Inline function 'kotlin.let' call
319
342
  // Inline function 'kotlin.contracts.contract' call
320
343
  // Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
321
- tmp_12 = hsl(tmp7_safe_receiver);
344
+ tmp_12 = lab(tmp7_safe_receiver);
322
345
  }
323
346
  tmp_11 = tmp_12;
324
347
  } else {
@@ -327,7 +350,7 @@
327
350
  var tmp10_elvis_lhs = tmp_11;
328
351
  var tmp_13;
329
352
  if (tmp10_elvis_lhs == null) {
330
- var tmp9_safe_receiver = PATTERNS_getInstance().w1l_1.l8(color_0);
353
+ var tmp9_safe_receiver = PATTERNS_getInstance().e1m_1.l8(color_0);
331
354
  var tmp_14;
332
355
  if (tmp9_safe_receiver == null) {
333
356
  tmp_14 = null;
@@ -335,7 +358,7 @@
335
358
  // Inline function 'kotlin.let' call
336
359
  // Inline function 'kotlin.contracts.contract' call
337
360
  // Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
338
- tmp_14 = hsl(tmp9_safe_receiver);
361
+ tmp_14 = lch(tmp9_safe_receiver);
339
362
  }
340
363
  tmp_13 = tmp_14;
341
364
  } else {
@@ -344,7 +367,7 @@
344
367
  var tmp12_elvis_lhs = tmp_13;
345
368
  var tmp_15;
346
369
  if (tmp12_elvis_lhs == null) {
347
- var tmp11_safe_receiver = PATTERNS_getInstance().x1l_1.l8(color_0);
370
+ var tmp11_safe_receiver = PATTERNS_getInstance().f1m_1.l8(color_0);
348
371
  var tmp_16;
349
372
  if (tmp11_safe_receiver == null) {
350
373
  tmp_16 = null;
@@ -352,7 +375,7 @@
352
375
  // Inline function 'kotlin.let' call
353
376
  // Inline function 'kotlin.contracts.contract' call
354
377
  // Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
355
- tmp_16 = lab(tmp11_safe_receiver);
378
+ tmp_16 = hwb(tmp11_safe_receiver);
356
379
  }
357
380
  tmp_15 = tmp_16;
358
381
  } else {
@@ -361,7 +384,7 @@
361
384
  var tmp14_elvis_lhs = tmp_15;
362
385
  var tmp_17;
363
386
  if (tmp14_elvis_lhs == null) {
364
- var tmp13_safe_receiver = PATTERNS_getInstance().y1l_1.l8(color_0);
387
+ var tmp13_safe_receiver = PATTERNS_getInstance().g1m_1.l8(color_0);
365
388
  var tmp_18;
366
389
  if (tmp13_safe_receiver == null) {
367
390
  tmp_18 = null;
@@ -369,7 +392,7 @@
369
392
  // Inline function 'kotlin.let' call
370
393
  // Inline function 'kotlin.contracts.contract' call
371
394
  // Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
372
- tmp_18 = lch(tmp13_safe_receiver);
395
+ tmp_18 = oklab(tmp13_safe_receiver);
373
396
  }
374
397
  tmp_17 = tmp_18;
375
398
  } else {
@@ -378,7 +401,7 @@
378
401
  var tmp16_elvis_lhs = tmp_17;
379
402
  var tmp_19;
380
403
  if (tmp16_elvis_lhs == null) {
381
- var tmp15_safe_receiver = PATTERNS_getInstance().z1l_1.l8(color_0);
404
+ var tmp15_safe_receiver = PATTERNS_getInstance().h1m_1.l8(color_0);
382
405
  var tmp_20;
383
406
  if (tmp15_safe_receiver == null) {
384
407
  tmp_20 = null;
@@ -386,7 +409,7 @@
386
409
  // Inline function 'kotlin.let' call
387
410
  // Inline function 'kotlin.contracts.contract' call
388
411
  // Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
389
- tmp_20 = hwb(tmp15_safe_receiver);
412
+ tmp_20 = oklch(tmp15_safe_receiver);
390
413
  }
391
414
  tmp_19 = tmp_20;
392
415
  } else {
@@ -395,7 +418,7 @@
395
418
  var tmp18_elvis_lhs = tmp_19;
396
419
  var tmp_21;
397
420
  if (tmp18_elvis_lhs == null) {
398
- var tmp17_safe_receiver = PATTERNS_getInstance().a1m_1.l8(color_0);
421
+ var tmp17_safe_receiver = PATTERNS_getInstance().i1m_1.l8(color_0);
399
422
  var tmp_22;
400
423
  if (tmp17_safe_receiver == null) {
401
424
  tmp_22 = null;
@@ -403,7 +426,7 @@
403
426
  // Inline function 'kotlin.let' call
404
427
  // Inline function 'kotlin.contracts.contract' call
405
428
  // Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
406
- tmp_22 = color(tmp17_safe_receiver);
429
+ tmp_22 = color(tmp17_safe_receiver, customColorSpaces);
407
430
  }
408
431
  tmp_21 = tmp_22;
409
432
  } else {
@@ -415,22 +438,22 @@
415
438
  }
416
439
  function PATTERNS() {
417
440
  PATTERNS_instance = this;
418
- this.l1l_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?';
419
- this.m1l_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%';
420
- this.n1l_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?';
421
- this.o1l_1 = '\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*';
422
- this.p1l_1 = '(?:\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*';
423
- this.q1l_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?';
424
- this.r1l_1 = Regex_init_$Create$('rgba?\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
425
- this.s1l_1 = Regex_init_$Create$('rgba?\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)(?:\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
426
- this.t1l_1 = Regex_init_$Create$('rgba?\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
427
- this.u1l_1 = Regex_init_$Create$('rgba?\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)(?:\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
428
- this.v1l_1 = Regex_init_$Create$('hsla?\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
429
- this.w1l_1 = Regex_init_$Create$('hsla?\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?)\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)(?:\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
430
- this.x1l_1 = Regex_init_$Create$('lab\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
431
- this.y1l_1 = Regex_init_$Create$('lch\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
432
- this.z1l_1 = Regex_init_$Create$('hwb\\(([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
433
- this.a1m_1 = Regex_init_$Create$('color\\(([\\w\\-]+)\\s+([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?(?:\\s+[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?)*)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
441
+ this.t1l_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?';
442
+ this.u1l_1 = '(?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?)';
443
+ this.v1l_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?';
444
+ this.w1l_1 = '\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*';
445
+ this.x1l_1 = '\\s*(?:,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*';
446
+ this.y1l_1 = '(?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?)';
447
+ this.z1l_1 = Regex_init_$Create$('rgba?\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
448
+ this.a1m_1 = Regex_init_$Create$('rgba?\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*,\\s*((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*,\\s*((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
449
+ this.b1m_1 = Regex_init_$Create$('hsla?\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
450
+ this.c1m_1 = Regex_init_$Create$('hsla?\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?))\\s*,\\s*((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*,\\s*((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
451
+ this.d1m_1 = Regex_init_$Create$('lab\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
452
+ this.e1m_1 = Regex_init_$Create$('lch\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
453
+ this.f1m_1 = Regex_init_$Create$('hwb\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
454
+ this.g1m_1 = Regex_init_$Create$('oklab\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
455
+ this.h1m_1 = Regex_init_$Create$('oklch\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
456
+ this.i1m_1 = Regex_init_$Create$('color\\(([\\w\\-]+)\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?)(?:\\s+(?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))*)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
434
457
  }
435
458
  var PATTERNS_instance;
436
459
  function PATTERNS_getInstance() {
@@ -439,118 +462,167 @@
439
462
  return PATTERNS_instance;
440
463
  }
441
464
  function rgb(match) {
442
- var r = percentOrNumber(match.p9().b1(1));
443
- var g = percentOrNumber(match.p9().b1(2));
444
- var b = percentOrNumber(match.p9().b1(3));
465
+ var r = percentOrNumber(match.p9().b1(1), Companion_getInstance_6().q1l().b1(0).o1l_1);
466
+ var g = percentOrNumber(match.p9().b1(2), Companion_getInstance_6().q1l().b1(1).o1l_1);
467
+ var b = percentOrNumber(match.p9().b1(3), Companion_getInstance_6().q1l().b1(2).o1l_1);
445
468
  var a = alpha(match.p9().b1(4));
446
469
  var tmp;
447
470
  if (endsWith(match.p9().b1(1), '%')) {
448
- tmp = Companion_getInstance_4().d1m(clampF(r), clampF(g), clampF(b), a);
471
+ tmp = Companion_getInstance_6().l1m(r, g, b, a);
449
472
  } else {
450
- tmp = Companion_getInstance_4().d1m(clampInt(r) / 255.0, clampInt(g) / 255.0, clampInt(b) / 255.0, a);
473
+ tmp = Companion_getInstance_6().l1m(r / 255.0, g / 255.0, b / 255.0, a);
451
474
  }
452
475
  return tmp;
453
476
  }
454
477
  function hsl(match) {
455
478
  var h = hue(match.p9().b1(1));
456
- var s = percent(match.p9().b1(2));
457
- var l = percent(match.p9().b1(3));
479
+ var s = percentOrNumber(match.p9().b1(2), Companion_getInstance_0().m1m_1.b1(1).o1l_1);
480
+ var l = percentOrNumber(match.p9().b1(3), Companion_getInstance_0().m1m_1.b1(2).o1l_1);
458
481
  var a = alpha(match.p9().b1(4));
459
- return new HSL(h, clampF(s), clampF(l), clampF(a));
482
+ return new HSL(h, s, l, a);
460
483
  }
461
484
  function lab(match) {
462
- var l = percent(match.p9().b1(1));
463
- var a = number(match.p9().b1(2));
464
- var b = number(match.p9().b1(3));
485
+ var l = percentOrNumber(match.p9().b1(1), Companion_getInstance_2().q1l().b1(0).o1l_1);
486
+ var a = percentOrNumber(match.p9().b1(2), Companion_getInstance_2().q1l().b1(1).o1l_1);
487
+ var b = percentOrNumber(match.p9().b1(3), Companion_getInstance_2().q1l().b1(2).o1l_1);
465
488
  var alpha_0 = alpha(match.p9().b1(4));
466
- return Companion_getInstance_2().d1m(coerceAtLeast(l, 0.0) * 100.0, a, b, alpha_0);
489
+ return LABColorSpaces_getInstance().p1m_1.l1m(l, a, b, alpha_0);
467
490
  }
468
491
  function lch(match) {
469
- var l = percent(match.p9().b1(1));
470
- var c = number(match.p9().b1(2));
492
+ var l = percentOrNumber(match.p9().b1(1), Companion_getInstance_3().q1l().b1(0).o1l_1);
493
+ var c = percentOrNumber(match.p9().b1(2), Companion_getInstance_3().q1l().b1(1).o1l_1);
471
494
  var h = hue(match.p9().b1(3));
472
495
  var a = alpha(match.p9().b1(4));
473
- return Companion_getInstance_3().d1m(coerceAtLeast(l, 0.0) * 100.0, coerceAtLeast(c, 0.0), h, a);
496
+ return LCHabColorSpaces_getInstance().s1m_1.l1m(l, c, h, a);
474
497
  }
475
498
  function hwb(match) {
476
499
  var h = hue(match.p9().b1(1));
477
- var w = percent(match.p9().b1(2));
478
- var b = percent(match.p9().b1(3));
500
+ var w = percentOrNumber(match.p9().b1(2), Companion_getInstance_1().t1m_1.b1(1).o1l_1);
501
+ var b = percentOrNumber(match.p9().b1(3), Companion_getInstance_1().t1m_1.b1(2).o1l_1);
502
+ var a = alpha(match.p9().b1(4));
503
+ return new HWB(h, w, b, a);
504
+ }
505
+ function oklab(match) {
506
+ var l = percentOrNumber(match.p9().b1(1), Companion_getInstance_4().u1m_1.b1(0).o1l_1);
507
+ var a = percentOrNumber(match.p9().b1(2), Companion_getInstance_4().u1m_1.b1(1).o1l_1);
508
+ var b = percentOrNumber(match.p9().b1(3), Companion_getInstance_4().u1m_1.b1(2).o1l_1);
509
+ var alpha_0 = alpha(match.p9().b1(4));
510
+ return new Oklab(l, a, b, alpha_0);
511
+ }
512
+ function oklch(match) {
513
+ var l = percentOrNumber(match.p9().b1(1), Companion_getInstance_5().v1m_1.b1(0).o1l_1);
514
+ var c = percentOrNumber(match.p9().b1(2), Companion_getInstance_5().v1m_1.b1(1).o1l_1);
515
+ var h = hue(match.p9().b1(3));
479
516
  var a = alpha(match.p9().b1(4));
480
- return new HWB(h, clampF(w), clampF(b), a);
517
+ return new Oklch(l, c, h, a);
481
518
  }
482
- function color(match) {
519
+ function color(match, customColorSpaces) {
520
+ var name = match.p9().b1(1);
483
521
  var tmp;
484
- switch (match.p9().b1(1)) {
522
+ switch (name) {
485
523
  case 'srgb':
486
524
  tmp = SRGB_getInstance();
487
525
  break;
526
+ case 'srgb-linear':
527
+ tmp = RGBColorSpaces_getInstance().x1m_1;
528
+ break;
488
529
  case 'display-p3':
489
- tmp = RGBColorSpaces_getInstance().q1m_1;
530
+ tmp = RGBColorSpaces_getInstance().g1n_1;
490
531
  break;
491
532
  case 'a98-rgb':
492
- tmp = RGBColorSpaces_getInstance().m1m_1;
533
+ tmp = RGBColorSpaces_getInstance().c1n_1;
493
534
  break;
494
535
  case 'prophoto-rgb':
495
- tmp = RGBColorSpaces_getInstance().r1m_1;
536
+ tmp = RGBColorSpaces_getInstance().h1n_1;
496
537
  break;
497
538
  case 'rec2020':
498
- tmp = RGBColorSpaces_getInstance().n1m_1;
539
+ tmp = RGBColorSpaces_getInstance().d1n_1;
499
540
  break;
500
541
  case 'xyz':
501
- tmp = XYZColorSpaces_getInstance().t1m_1;
542
+ case 'xyz-d50':
543
+ tmp = XYZColorSpaces_getInstance().j1n_1;
544
+ break;
545
+ case 'xyz-d65':
546
+ tmp = XYZColorSpaces_getInstance().i1n_1;
502
547
  break;
503
548
  default:
504
- return null;
549
+ var tmp$ret$1;
550
+ $l$block: {
551
+ // Inline function 'kotlin.collections.firstOrNull' call
552
+ var tmp0_iterator = customColorSpaces.i2().s();
553
+ while (tmp0_iterator.t()) {
554
+ var element = tmp0_iterator.u();
555
+ // Inline function 'com.github.ajalt.colormath.color.<anonymous>' call
556
+ if (element.j2() === name) {
557
+ tmp$ret$1 = element;
558
+ break $l$block;
559
+ }
560
+ }
561
+ tmp$ret$1 = null;
562
+ }
563
+
564
+ var tmp0_safe_receiver = tmp$ret$1;
565
+ tmp = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.k2();
566
+ break;
567
+ }
568
+ var tmp1_elvis_lhs = tmp;
569
+ var tmp_0;
570
+ if (tmp1_elvis_lhs == null) {
571
+ return null;
572
+ } else {
573
+ tmp_0 = tmp1_elvis_lhs;
505
574
  }
506
- var space = tmp;
507
- // Inline function 'kotlin.collections.map' call
575
+ var space = tmp_0;
576
+ // Inline function 'kotlin.collections.mapIndexed' call
508
577
  // Inline function 'kotlin.text.split' call
509
578
  var this_0 = match.p9().b1(2);
510
579
  var this_1 = Regex_init_$Create$('\\s+').u8(this_0, 0);
511
- // Inline function 'kotlin.collections.mapTo' call
580
+ // Inline function 'kotlin.collections.mapIndexedTo' call
512
581
  var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
513
- var tmp0_iterator = this_1.s();
514
- while (tmp0_iterator.t()) {
515
- var item = tmp0_iterator.u();
582
+ var index = 0;
583
+ var tmp0_iterator_0 = this_1.s();
584
+ while (tmp0_iterator_0.t()) {
585
+ var item = tmp0_iterator_0.u();
516
586
  // Inline function 'com.github.ajalt.colormath.color.<anonymous>' call
517
- var tmp$ret$1 = clampF(percentOrNumber(item));
518
- destination.p(tmp$ret$1);
587
+ var tmp1 = index;
588
+ index = tmp1 + 1 | 0;
589
+ var i = checkIndexOverflow(tmp1);
590
+ var tmp$ret$3 = percentOrNumber(item, space.q1l().b1(i).o1l_1);
591
+ destination.p(tmp$ret$3);
519
592
  }
520
593
  var values = destination;
521
- // Inline function 'kotlin.floatArrayOf' call
522
- // Inline function 'kotlin.collections.getOrElse' call
523
- var tmp_0;
524
- if (0 >= 0 ? 0 <= get_lastIndex(values) : false) {
525
- tmp_0 = values.b1(0);
526
- } else {
527
- // Inline function 'com.github.ajalt.colormath.color.<anonymous>' call
528
- tmp_0 = 0.0;
529
- }
530
- var tmp_1 = tmp_0;
531
- // Inline function 'kotlin.collections.getOrElse' call
532
- var tmp_2;
533
- if (1 >= 0 ? 1 <= get_lastIndex(values) : false) {
534
- tmp_2 = values.b1(1);
535
- } else {
536
- // Inline function 'com.github.ajalt.colormath.color.<anonymous>' call
537
- tmp_2 = 0.0;
594
+ var tmp_1 = 0;
595
+ var tmp_2 = space.q1l().l();
596
+ var tmp_3 = new Float32Array(tmp_2);
597
+ while (tmp_1 < tmp_2) {
598
+ var tmp_4 = tmp_1;
599
+ // Inline function 'kotlin.collections.getOrElse' call
600
+ var tmp_5;
601
+ if (tmp_4 >= 0 ? tmp_4 <= get_lastIndex(values) : false) {
602
+ tmp_5 = values.b1(tmp_4);
603
+ } else {
604
+ // Inline function 'com.github.ajalt.colormath.color.<anonymous>' call
605
+ tmp_5 = 0.0;
606
+ }
607
+ tmp_3[tmp_4] = tmp_5;
608
+ tmp_1 = tmp_1 + 1 | 0;
538
609
  }
539
- var tmp_3 = tmp_2;
540
- // Inline function 'kotlin.collections.getOrElse' call
541
- var tmp_4;
542
- if (2 >= 0 ? 2 <= get_lastIndex(values) : false) {
543
- tmp_4 = values.b1(2);
610
+ var components = tmp_3;
611
+ components[get_lastIndex_0(components)] = alpha(match.p9().b1(3));
612
+ return space.r1l(components);
613
+ }
614
+ function percentOrNumber(str, max) {
615
+ var tmp;
616
+ if (endsWith(str, '%')) {
617
+ // Inline function 'kotlin.text.toFloat' call
618
+ var this_0 = dropLast(str, 1);
619
+ // Inline function 'kotlin.js.unsafeCast' call
620
+ // Inline function 'kotlin.js.asDynamic' call
621
+ tmp = toDouble(this_0) * max / 100.0;
544
622
  } else {
545
- // Inline function 'com.github.ajalt.colormath.color.<anonymous>' call
546
- tmp_4 = 0.0;
623
+ tmp = number(str);
547
624
  }
548
- var tmp$ret$9 = tmp_4;
549
- var tmp$ret$10 = new Float32Array([tmp_1, tmp_3, tmp$ret$9, alpha(match.p9().b1(3))]);
550
- return space.h1l(tmp$ret$10);
551
- }
552
- function percentOrNumber(str) {
553
- return endsWith(str, '%') ? percent(str) : number(str);
625
+ return tmp;
554
626
  }
555
627
  function alpha(str) {
556
628
  var tmp;
@@ -558,21 +630,9 @@
558
630
  if (charSequenceLength(str) === 0) {
559
631
  tmp = 1.0;
560
632
  } else {
561
- tmp = percentOrNumber(str);
633
+ tmp = percentOrNumber(str, 1.0);
562
634
  }
563
- return clampF(tmp);
564
- }
565
- function clampF(_this__u8e3s4, min, max) {
566
- min = min === VOID ? 0.0 : min;
567
- max = max === VOID ? 1.0 : max;
568
- return coerceIn(_this__u8e3s4, min, max);
569
- }
570
- function clampInt(_this__u8e3s4, min, max) {
571
- min = min === VOID ? 0 : min;
572
- max = max === VOID ? 255 : max;
573
- // Inline function 'kotlin.math.roundToInt' call
574
- var tmp$ret$0 = roundToInt(_this__u8e3s4);
575
- return coerceIn_0(tmp$ret$0, min, max);
635
+ return coerceIn(tmp, 0.0, 1.0);
576
636
  }
577
637
  function hue(str) {
578
638
  var tmp;
@@ -603,27 +663,22 @@
603
663
  // Inline function 'kotlin.js.asDynamic' call
604
664
  var tmp$ret$11 = toDouble(this_3);
605
665
  tmp = turnToDeg(tmp$ret$11);
666
+ } else {
667
+ tmp = number(str);
668
+ }
669
+ return normalizeDeg_0(tmp);
670
+ }
671
+ function number(str) {
672
+ var tmp;
673
+ if (str === 'none') {
674
+ tmp = NaN;
606
675
  } else {
607
676
  // Inline function 'kotlin.text.toFloat' call
608
677
  // Inline function 'kotlin.js.unsafeCast' call
609
678
  // Inline function 'kotlin.js.asDynamic' call
610
679
  tmp = toDouble(str);
611
680
  }
612
- var deg = tmp;
613
- return normalizeDeg_0(deg);
614
- }
615
- function percent(str) {
616
- // Inline function 'kotlin.text.toFloat' call
617
- var this_0 = dropLast(str, 1);
618
- // Inline function 'kotlin.js.unsafeCast' call
619
- // Inline function 'kotlin.js.asDynamic' call
620
- return toDouble(this_0) / 100.0;
621
- }
622
- function number(str) {
623
- // Inline function 'kotlin.text.toFloat' call
624
- // Inline function 'kotlin.js.unsafeCast' call
625
- // Inline function 'kotlin.js.asDynamic' call
626
- return toDouble(str);
681
+ return tmp;
627
682
  }
628
683
  var RenderCondition_ALWAYS_instance;
629
684
  var RenderCondition_NEVER_instance;
@@ -640,15 +695,16 @@
640
695
  function RenderCondition(name, ordinal) {
641
696
  Enum.call(this, name, ordinal);
642
697
  }
643
- function formatCssString(_this__u8e3s4, hueUnit, renderAlpha, unitsPercent, alphaPercent, legacyName, legacyFormat) {
698
+ function formatCssString(_this__u8e3s4, hueUnit, renderAlpha, unitsPercent, alphaPercent, legacyName, legacyFormat, customColorSpaces) {
644
699
  hueUnit = hueUnit === VOID ? AngleUnit_AUTO_getInstance() : hueUnit;
645
700
  renderAlpha = renderAlpha === VOID ? RenderCondition_AUTO_getInstance() : renderAlpha;
646
701
  unitsPercent = unitsPercent === VOID ? false : unitsPercent;
647
702
  alphaPercent = alphaPercent === VOID ? false : alphaPercent;
648
703
  legacyName = legacyName === VOID ? false : legacyName;
649
704
  legacyFormat = legacyFormat === VOID ? false : legacyFormat;
650
- var tmp0_elvis_lhs = formatCssStringOrNull(_this__u8e3s4, hueUnit, renderAlpha, unitsPercent, alphaPercent, legacyName, legacyFormat);
651
- return tmp0_elvis_lhs == null ? renderColorFunction(_this__u8e3s4, get_dashName(_this__u8e3s4), unitsPercent, alphaPercent, renderAlpha) : tmp0_elvis_lhs;
705
+ customColorSpaces = customColorSpaces === VOID ? emptyMap() : customColorSpaces;
706
+ var tmp0_elvis_lhs = formatCssStringOrNull(_this__u8e3s4, hueUnit, renderAlpha, unitsPercent, alphaPercent, legacyName, legacyFormat, customColorSpaces);
707
+ return tmp0_elvis_lhs == null ? renderFn(_this__u8e3s4, get_dashName(_this__u8e3s4), unitsPercent, alphaPercent, renderAlpha) : tmp0_elvis_lhs;
652
708
  }
653
709
  var AngleUnit_AUTO_instance;
654
710
  var AngleUnit_DEGREES_instance;
@@ -669,52 +725,93 @@
669
725
  function AngleUnit(name, ordinal) {
670
726
  Enum.call(this, name, ordinal);
671
727
  }
672
- function formatCssStringOrNull(_this__u8e3s4, hueUnit, renderAlpha, unitsPercent, alphaPercent, legacyName, legacyFormat) {
728
+ function formatCssStringOrNull(_this__u8e3s4, hueUnit, renderAlpha, unitsPercent, alphaPercent, legacyName, legacyFormat, customColorSpaces) {
673
729
  hueUnit = hueUnit === VOID ? AngleUnit_AUTO_getInstance() : hueUnit;
674
730
  renderAlpha = renderAlpha === VOID ? RenderCondition_AUTO_getInstance() : renderAlpha;
675
731
  unitsPercent = unitsPercent === VOID ? false : unitsPercent;
676
732
  alphaPercent = alphaPercent === VOID ? false : alphaPercent;
677
733
  legacyName = legacyName === VOID ? false : legacyName;
678
734
  legacyFormat = legacyFormat === VOID ? false : legacyFormat;
735
+ customColorSpaces = customColorSpaces === VOID ? emptyMap() : customColorSpaces;
736
+ var tmp$ret$1;
737
+ $l$block: {
738
+ // Inline function 'kotlin.collections.firstOrNull' call
739
+ var tmp0_iterator = customColorSpaces.i2().s();
740
+ while (tmp0_iterator.t()) {
741
+ var element = tmp0_iterator.u();
742
+ // Inline function 'com.github.ajalt.colormath.formatCssStringOrNull.<anonymous>' call
743
+ if (equals(element.k2(), _this__u8e3s4.i1k())) {
744
+ tmp$ret$1 = element;
745
+ break $l$block;
746
+ }
747
+ }
748
+ tmp$ret$1 = null;
749
+ }
750
+ var tmp0_safe_receiver = tmp$ret$1;
751
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.j2();
679
752
  var tmp;
680
- if (_this__u8e3s4 instanceof RGB) {
681
- var tmp1_subject = _this__u8e3s4.p1k_1;
682
- tmp = equals(tmp1_subject, SRGB_getInstance()) ? renderSRGB(_this__u8e3s4, legacyFormat, legacyName, unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().q1m_1) ? renderColorFunction(_this__u8e3s4, 'display-p3', unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().m1m_1) ? renderColorFunction(_this__u8e3s4, 'a98-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().r1m_1) ? renderColorFunction(_this__u8e3s4, 'prophoto-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().n1m_1) ? renderColorFunction(_this__u8e3s4, 'rec2020', unitsPercent, alphaPercent, renderAlpha) : null;
753
+ if (tmp1_safe_receiver == null) {
754
+ tmp = null;
683
755
  } else {
684
- if (_this__u8e3s4 instanceof HSL) {
685
- tmp = renderHsl(_this__u8e3s4, legacyFormat, legacyName, hueUnit, alphaPercent, renderAlpha);
756
+ // Inline function 'kotlin.let' call
757
+ // Inline function 'kotlin.contracts.contract' call
758
+ // Inline function 'com.github.ajalt.colormath.formatCssStringOrNull.<anonymous>' call
759
+ tmp = renderFn(_this__u8e3s4, tmp1_safe_receiver, unitsPercent, alphaPercent, renderAlpha);
760
+ }
761
+ var tmp5_elvis_lhs = tmp;
762
+ var tmp_0;
763
+ if (tmp5_elvis_lhs == null) {
764
+ var tmp_1;
765
+ if (_this__u8e3s4 instanceof RGB) {
766
+ var tmp3_subject = _this__u8e3s4.p1k_1;
767
+ tmp_1 = equals(tmp3_subject, SRGB_getInstance()) ? renderSRGB(_this__u8e3s4, legacyFormat, legacyName, unitsPercent, alphaPercent, renderAlpha) : equals(tmp3_subject, RGBColorSpaces_getInstance().g1n_1) ? renderFn(_this__u8e3s4, 'display-p3', unitsPercent, alphaPercent, renderAlpha) : equals(tmp3_subject, RGBColorSpaces_getInstance().c1n_1) ? renderFn(_this__u8e3s4, 'a98-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp3_subject, RGBColorSpaces_getInstance().h1n_1) ? renderFn(_this__u8e3s4, 'prophoto-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp3_subject, RGBColorSpaces_getInstance().d1n_1) ? renderFn(_this__u8e3s4, 'rec2020', unitsPercent, alphaPercent, renderAlpha) : equals(tmp3_subject, RGBColorSpaces_getInstance().x1m_1) ? renderFn(_this__u8e3s4, 'srgb-linear', unitsPercent, alphaPercent, renderAlpha) : null;
686
768
  } else {
687
- if (_this__u8e3s4 instanceof LAB) {
688
- tmp = renderLab(convertTo(_this__u8e3s4, LABColorSpaces_getInstance().y1m_1), alphaPercent, renderAlpha);
769
+ if (_this__u8e3s4 instanceof HSL) {
770
+ tmp_1 = renderHsl(_this__u8e3s4, legacyFormat, legacyName, hueUnit, alphaPercent, renderAlpha);
689
771
  } else {
690
- if (_this__u8e3s4 instanceof LCHab) {
691
- tmp = renderLCH(convertTo(_this__u8e3s4, LCHabColorSpaces_getInstance().w1m_1), hueUnit, alphaPercent, renderAlpha);
772
+ if (_this__u8e3s4 instanceof LAB) {
773
+ tmp_1 = renderLab(convertTo(_this__u8e3s4, LABColorSpaces_getInstance().p1m_1), alphaPercent, renderAlpha);
692
774
  } else {
693
- if (_this__u8e3s4 instanceof HWB) {
694
- tmp = renderHWB(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha);
775
+ if (_this__u8e3s4 instanceof LCHab) {
776
+ tmp_1 = renderLCH(convertTo(_this__u8e3s4, LCHabColorSpaces_getInstance().s1m_1), hueUnit, alphaPercent, renderAlpha);
695
777
  } else {
696
- if (_this__u8e3s4 instanceof XYZ) {
697
- tmp = renderColorFunction(_this__u8e3s4.u1m(XYZColorSpaces_getInstance().t1m_1), 'xyz', unitsPercent, alphaPercent, renderAlpha);
778
+ if (_this__u8e3s4 instanceof HWB) {
779
+ tmp_1 = renderHWB(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha);
698
780
  } else {
699
- tmp = null;
781
+ if (_this__u8e3s4 instanceof Oklab) {
782
+ tmp_1 = renderOklab(_this__u8e3s4, alphaPercent, renderAlpha);
783
+ } else {
784
+ if (_this__u8e3s4 instanceof Oklch) {
785
+ tmp_1 = renderOklch(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha);
786
+ } else {
787
+ if (_this__u8e3s4 instanceof XYZ) {
788
+ tmp_1 = _this__u8e3s4.w1k_1.p1l().equals(Illuminant_getInstance().q1n_1) ? renderFn(_this__u8e3s4, 'xyz-d65', unitsPercent, alphaPercent, renderAlpha) : renderFn(_this__u8e3s4.k1n(XYZColorSpaces_getInstance().j1n_1), 'xyz', unitsPercent, alphaPercent, renderAlpha);
789
+ } else {
790
+ tmp_1 = null;
791
+ }
792
+ }
793
+ }
700
794
  }
701
795
  }
702
796
  }
703
797
  }
704
798
  }
799
+ tmp_0 = tmp_1;
800
+ } else {
801
+ tmp_0 = tmp5_elvis_lhs;
705
802
  }
706
- return tmp;
803
+ return tmp_0;
707
804
  }
708
- function renderColorFunction(_this__u8e3s4, name, unitsPercent, alphaPercent, renderAlpha_0) {
805
+ function renderFn(_this__u8e3s4, name, unitsPercent, alphaPercent, renderAlpha_0) {
709
806
  // Inline function 'kotlin.text.buildString' call
710
807
  // Inline function 'kotlin.contracts.contract' call
711
808
  // Inline function 'kotlin.apply' call
712
809
  var this_0 = StringBuilder_init_$Create$();
713
810
  // Inline function 'kotlin.contracts.contract' call
714
- // Inline function 'com.github.ajalt.colormath.renderColorFunction.<anonymous>' call
811
+ // Inline function 'com.github.ajalt.colormath.renderFn.<anonymous>' call
715
812
  this_0.m5('color(').m5(name).m5(' ');
716
813
  var tmp = dropLast_0(_this__u8e3s4.z2(), 1);
717
- joinTo(tmp, this_0, ' ', VOID, VOID, VOID, VOID, renderColorFunction$lambda(unitsPercent));
814
+ joinTo(tmp, this_0, ' ', VOID, VOID, VOID, VOID, renderFn$lambda(unitsPercent));
718
815
  this_0.m5(renderAlpha(_this__u8e3s4, false, renderAlpha_0, alphaPercent));
719
816
  this_0.m5(')');
720
817
  return this_0.toString();
@@ -727,52 +824,46 @@
727
824
  return '--' + Regex_init_$Create$('\\W').m8(this_0, '-').toLowerCase();
728
825
  }
729
826
  function renderSRGB(_this__u8e3s4, commas, namedRgba, rgbPercent, alphaPercent, renderAlpha) {
730
- return renderFunction(_this__u8e3s4, namedRgba ? 'rgba' : 'rgb', [rgbPercent ? render(_this__u8e3s4.l1k_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_r__impl__dulq0e(_this__u8e3s4.z1m())), rgbPercent ? render(_this__u8e3s4.m1k_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_g__impl__o93c71(_this__u8e3s4.z1m())), rgbPercent ? render(_this__u8e3s4.n1k_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_b__impl__m772ua(_this__u8e3s4.z1m()))], alphaPercent, renderAlpha, commas);
827
+ return renderColorFn(_this__u8e3s4, namedRgba ? 'rgba' : 'rgb', [rgbPercent ? render(_this__u8e3s4.l1k_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_r__impl__dulq0e(_this__u8e3s4.t1n())), rgbPercent ? render(_this__u8e3s4.m1k_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_g__impl__o93c71(_this__u8e3s4.t1n())), rgbPercent ? render(_this__u8e3s4.n1k_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_b__impl__m772ua(_this__u8e3s4.t1n()))], alphaPercent, renderAlpha, commas);
731
828
  }
732
829
  function renderHsl(_this__u8e3s4, commas, namedHsla, hueUnit, alphaPercent, renderAlpha) {
733
- return renderFunction(_this__u8e3s4, namedHsla ? 'hsla' : 'hsl', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.b1n_1, true), render(_this__u8e3s4.c1n_1, true)], alphaPercent, renderAlpha, commas);
830
+ return renderColorFn(_this__u8e3s4, namedHsla ? 'hsla' : 'hsl', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.v1n_1, true), render(_this__u8e3s4.w1n_1, true)], alphaPercent, renderAlpha, commas);
734
831
  }
735
832
  function renderLab(_this__u8e3s4, alphaPercent, renderAlpha) {
736
- return renderFunction(_this__u8e3s4, 'lab', [render(_this__u8e3s4.y1k_1 / 100, true), render(_this__u8e3s4.z1k_1), render(_this__u8e3s4.a1l_1)], alphaPercent, renderAlpha);
833
+ return renderColorFn(_this__u8e3s4, 'lab', [render(_this__u8e3s4.y1k_1 / 100, true), render(_this__u8e3s4.z1k_1), render(_this__u8e3s4.a1l_1)], alphaPercent, renderAlpha);
737
834
  }
738
835
  function renderLCH(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
739
- return renderFunction(_this__u8e3s4, 'lch', [render(_this__u8e3s4.e1n_1 / 100, true), render(_this__u8e3s4.f1n_1), renderHue(_this__u8e3s4, hueUnit)], alphaPercent, renderAlpha);
836
+ return renderColorFn(_this__u8e3s4, 'lch', [render(_this__u8e3s4.y1n_1 / 100, true), render(_this__u8e3s4.z1n_1), renderHue(_this__u8e3s4, hueUnit)], alphaPercent, renderAlpha);
740
837
  }
741
838
  function renderHWB(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
742
- return renderFunction(_this__u8e3s4, 'hwb', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.k1n_1, true), render(_this__u8e3s4.l1n_1, true)], alphaPercent, renderAlpha);
839
+ return renderColorFn(_this__u8e3s4, 'hwb', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.e1o_1, true), render(_this__u8e3s4.f1o_1, true)], alphaPercent, renderAlpha);
840
+ }
841
+ function renderOklab(_this__u8e3s4, alphaPercent, renderAlpha) {
842
+ return renderColorFn(_this__u8e3s4, 'oklab', [render(_this__u8e3s4.g1l_1, true), render(_this__u8e3s4.h1l_1), render(_this__u8e3s4.i1l_1)], alphaPercent, renderAlpha);
743
843
  }
744
- function render(_this__u8e3s4, percent) {
844
+ function renderOklch(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
845
+ return renderColorFn(_this__u8e3s4, 'oklch', [render(_this__u8e3s4.h1o_1, true), render(_this__u8e3s4.i1o_1), renderHue(_this__u8e3s4, hueUnit)], alphaPercent, renderAlpha);
846
+ }
847
+ function render(_this__u8e3s4, percent, precision) {
745
848
  percent = percent === VOID ? false : percent;
849
+ precision = precision === VOID ? 4 : precision;
746
850
  var tmp;
747
- switch (percent) {
748
- case true:
749
- // Inline function 'kotlin.math.roundToInt' call
750
-
751
- var this_0 = _this__u8e3s4 * 100;
752
- tmp = '' + roundToInt(this_0) + '%';
753
- break;
754
- case false:
755
- var tmp_0;
756
- switch (_this__u8e3s4) {
757
- case 0.0:
758
- tmp_0 = '0';
759
- break;
760
- case 1.0:
761
- tmp_0 = '1';
762
- break;
763
- default:
764
- var str = _this__u8e3s4.toString();
765
- var s = startsWith(str, '.') ? '0' + str : str;
766
- var i = indexOf(s, _Char___init__impl__6a9atx(46));
767
- tmp_0 = i < 0 ? s : trimEnd(trimEnd(take(s, i + 5 | 0), charArrayOf([_Char___init__impl__6a9atx(48)])), charArrayOf([_Char___init__impl__6a9atx(46)]));
768
- break;
769
- }
770
-
771
- tmp = tmp_0;
772
- break;
773
- default:
774
- noWhenBranchMatchedException();
775
- break;
851
+ if (isNaN_0(_this__u8e3s4)) {
852
+ tmp = 'none';
853
+ } else if (percent) {
854
+ // Inline function 'kotlin.math.roundToInt' call
855
+ var this_0 = _this__u8e3s4 * 100;
856
+ tmp = '' + roundToInt(this_0) + '%';
857
+ } else {
858
+ // Inline function 'kotlin.math.absoluteValue' call
859
+ var abs = Math.abs(_this__u8e3s4);
860
+ var i = numberToInt(abs);
861
+ var sgn = _this__u8e3s4 < 0.0 ? '-' : '';
862
+ var tmp_0 = abs - i;
863
+ // Inline function 'kotlin.math.pow' call
864
+ var tmp$ret$2 = Math.pow(10.0, precision);
865
+ var d = roundToInt(tmp_0 * tmp$ret$2);
866
+ tmp = d === 0 ? numberToInt(_this__u8e3s4).toString() : sgn + i + '.' + trimEnd(padStart(d.toString(), precision, _Char___init__impl__6a9atx(48)), charArrayOf([_Char___init__impl__6a9atx(48)]));
776
867
  }
777
868
  return tmp;
778
869
  }
@@ -785,14 +876,14 @@
785
876
  }
786
877
  return tmp;
787
878
  }
788
- function renderFunction(_this__u8e3s4, name, components, alphaPercent, renderAlpha_0, commas) {
879
+ function renderColorFn(_this__u8e3s4, name, components, alphaPercent, renderAlpha_0, commas) {
789
880
  commas = commas === VOID ? false : commas;
790
881
  // Inline function 'kotlin.text.buildString' call
791
882
  // Inline function 'kotlin.contracts.contract' call
792
883
  // Inline function 'kotlin.apply' call
793
884
  var this_0 = StringBuilder_init_$Create$();
794
885
  // Inline function 'kotlin.contracts.contract' call
795
- // Inline function 'com.github.ajalt.colormath.renderFunction.<anonymous>' call
886
+ // Inline function 'com.github.ajalt.colormath.renderColorFn.<anonymous>' call
796
887
  var sep = commas ? ', ' : ' ';
797
888
  this_0.m5(name).m5('(');
798
889
  joinTo_0(components, this_0, sep);
@@ -802,29 +893,35 @@
802
893
  }
803
894
  function renderHue(_this__u8e3s4, hueUnit) {
804
895
  var tmp;
805
- switch (hueUnit.a9_1) {
806
- case 0:
807
- tmp = render(_this__u8e3s4.n1n());
808
- break;
809
- case 1:
810
- tmp = render(_this__u8e3s4.n1n()) + 'deg';
811
- break;
812
- case 2:
813
- tmp = render(hueAsRad(_this__u8e3s4)) + 'rad';
814
- break;
815
- case 3:
816
- tmp = render(hueAsGrad(_this__u8e3s4)) + 'grad';
817
- break;
818
- case 4:
819
- tmp = render(hueAsTurns(_this__u8e3s4)) + 'turn';
820
- break;
821
- default:
822
- noWhenBranchMatchedException();
823
- break;
896
+ if (isNaN_0(_this__u8e3s4.l1o())) {
897
+ tmp = 'none';
898
+ } else {
899
+ var tmp_0;
900
+ switch (hueUnit.a9_1) {
901
+ case 0:
902
+ tmp_0 = render(_this__u8e3s4.l1o());
903
+ break;
904
+ case 1:
905
+ tmp_0 = render(_this__u8e3s4.l1o()) + 'deg';
906
+ break;
907
+ case 2:
908
+ tmp_0 = render(hueAsRad(_this__u8e3s4)) + 'rad';
909
+ break;
910
+ case 3:
911
+ tmp_0 = render(hueAsGrad(_this__u8e3s4)) + 'grad';
912
+ break;
913
+ case 4:
914
+ tmp_0 = render(hueAsTurns(_this__u8e3s4)) + 'turn';
915
+ break;
916
+ default:
917
+ noWhenBranchMatchedException();
918
+ break;
919
+ }
920
+ tmp = tmp_0;
824
921
  }
825
922
  return tmp;
826
923
  }
827
- function renderColorFunction$lambda($unitsPercent) {
924
+ function renderFn$lambda($unitsPercent) {
828
925
  return function (it) {
829
926
  return render(it, $unitsPercent);
830
927
  };
@@ -842,27 +939,27 @@
842
939
  return AngleUnit_AUTO_instance;
843
940
  }
844
941
  function hueOr(_this__u8e3s4, whenNaN) {
845
- return isNaN_0(_this__u8e3s4.n1n()) ? numberToDouble(whenNaN) : _this__u8e3s4.n1n();
942
+ return isNaN_0(_this__u8e3s4.l1o()) ? numberToDouble(whenNaN) : _this__u8e3s4.l1o();
846
943
  }
847
944
  function hueAsRad(_this__u8e3s4) {
848
- return degToRad(_this__u8e3s4.n1n());
945
+ return degToRad(_this__u8e3s4.l1o());
849
946
  }
850
947
  function hueAsGrad(_this__u8e3s4) {
851
- return degToGrad(_this__u8e3s4.n1n());
948
+ return degToGrad(_this__u8e3s4.l1o());
852
949
  }
853
950
  function hueAsTurns(_this__u8e3s4) {
854
- return degToTurns(_this__u8e3s4.n1n());
951
+ return degToTurns(_this__u8e3s4.l1o());
855
952
  }
856
953
  function WhitePoint(name, chromaticity) {
857
- this.o1n_1 = name;
858
- this.p1n_1 = chromaticity;
954
+ this.m1o_1 = name;
955
+ this.n1o_1 = chromaticity;
859
956
  }
860
957
  protoOf(WhitePoint).toString = function () {
861
- return this.o1n_1;
958
+ return this.m1o_1;
862
959
  };
863
960
  protoOf(WhitePoint).hashCode = function () {
864
- var result = getStringHashCode(this.o1n_1);
865
- result = imul(result, 31) + this.p1n_1.hashCode() | 0;
961
+ var result = getStringHashCode(this.m1o_1);
962
+ result = imul(result, 31) + this.n1o_1.hashCode() | 0;
866
963
  return result;
867
964
  };
868
965
  protoOf(WhitePoint).equals = function (other) {
@@ -871,22 +968,22 @@
871
968
  if (!(other instanceof WhitePoint))
872
969
  return false;
873
970
  var tmp0_other_with_cast = other instanceof WhitePoint ? other : THROW_CCE();
874
- if (!(this.o1n_1 === tmp0_other_with_cast.o1n_1))
971
+ if (!(this.m1o_1 === tmp0_other_with_cast.m1o_1))
875
972
  return false;
876
- if (!this.p1n_1.equals(tmp0_other_with_cast.p1n_1))
973
+ if (!this.n1o_1.equals(tmp0_other_with_cast.n1o_1))
877
974
  return false;
878
975
  return true;
879
976
  };
880
977
  function Illuminant() {
881
978
  Illuminant_instance = this;
882
- this.q1n_1 = new WhitePoint('A', xyY_init_$Create$(0.44758, 0.40745));
883
- this.r1n_1 = new WhitePoint('B', xyY_init_$Create$(0.34842, 0.35161));
884
- this.s1n_1 = new WhitePoint('C', xyY_init_$Create$(0.31006, 0.31616));
885
- this.t1n_1 = new WhitePoint('D50', xyY_init_$Create$(0.3457, 0.3585));
886
- this.u1n_1 = new WhitePoint('D55', xyY_init_$Create$(0.33243, 0.34744));
887
- this.v1n_1 = new WhitePoint('D65', xyY_init_$Create$(0.3127, 0.329));
888
- this.w1n_1 = new WhitePoint('D75', xyY_init_$Create$(0.29903, 0.31488));
889
- this.x1n_1 = new WhitePoint('E', xyY_init_$Create$(0.3333333333333333, 0.3333333333333333));
979
+ this.l1n_1 = new WhitePoint('A', xyY_init_$Create$(0.44758, 0.40745));
980
+ this.m1n_1 = new WhitePoint('B', xyY_init_$Create$(0.34842, 0.35161));
981
+ this.n1n_1 = new WhitePoint('C', xyY_init_$Create$(0.31006, 0.31616));
982
+ this.o1n_1 = new WhitePoint('D50', xyY_init_$Create$(0.3457, 0.3585));
983
+ this.p1n_1 = new WhitePoint('D55', xyY_init_$Create$(0.33243, 0.34744));
984
+ this.q1n_1 = new WhitePoint('D65', xyY_init_$Create$(0.3127, 0.329));
985
+ this.r1n_1 = new WhitePoint('D75', xyY_init_$Create$(0.29903, 0.31488));
986
+ this.s1n_1 = new WhitePoint('E', xyY_init_$Create$(0.3333333333333333, 0.3333333333333333));
890
987
  }
891
988
  var Illuminant_instance;
892
989
  function Illuminant_getInstance() {
@@ -894,49 +991,67 @@
894
991
  new Illuminant();
895
992
  return Illuminant_instance;
896
993
  }
897
- function rectangularComponentInfo(name) {
898
- // Inline function 'kotlin.collections.toTypedArray' call
899
- // Inline function 'kotlin.text.map' call
994
+ function get_alphaInfo() {
995
+ _init_properties_ColorSpaceUtils_kt__cnwylg();
996
+ return alphaInfo;
997
+ }
998
+ var alphaInfo;
999
+ function zeroOneComponentInfo(name) {
1000
+ _init_properties_ColorSpaceUtils_kt__cnwylg();
1001
+ // Inline function 'kotlin.collections.buildList' call
1002
+ // Inline function 'kotlin.contracts.contract' call
1003
+ // Inline function 'kotlin.collections.buildListInternal' call
1004
+ // Inline function 'kotlin.apply' call
1005
+ var this_0 = ArrayList_init_$Create$_0();
1006
+ // Inline function 'kotlin.contracts.contract' call
1007
+ // Inline function 'com.github.ajalt.colormath.internal.zeroOneComponentInfo.<anonymous>' call
900
1008
  // Inline function 'kotlin.text.mapTo' call
901
- var destination = ArrayList_init_$Create$(charSequenceLength(name));
902
1009
  var inductionVariable = 0;
903
1010
  while (inductionVariable < charSequenceLength(name)) {
904
1011
  var item = charSequenceGet(name, inductionVariable);
905
1012
  inductionVariable = inductionVariable + 1 | 0;
906
- // Inline function 'com.github.ajalt.colormath.internal.rectangularComponentInfo.<anonymous>' call
907
- var tmp$ret$0 = toString(item);
908
- destination.p(tmp$ret$0);
1013
+ // Inline function 'com.github.ajalt.colormath.internal.zeroOneComponentInfo.<anonymous>.<anonymous>' call
1014
+ var tmp$ret$0 = new ColorComponentInfo(toString_0(item), false, 0.0, 1.0);
1015
+ this_0.p(tmp$ret$0);
909
1016
  }
910
- var tmp$ret$3 = copyToArray(destination);
911
- return rectangularComponentInfo_0(tmp$ret$3.slice());
1017
+ this_0.p(get_alphaInfo());
1018
+ return this_0.y2();
1019
+ }
1020
+ function threeComponentInfo(n1, l1, r1, n2, l2, r2, n3, l3, r3) {
1021
+ _init_properties_ColorSpaceUtils_kt__cnwylg();
1022
+ return componentInfoList([new ColorComponentInfo(n1, false, l1, r1), new ColorComponentInfo(n2, false, l2, r2), new ColorComponentInfo(n3, false, l3, r3)]);
912
1023
  }
913
- function polarComponentInfo(name) {
914
- // Inline function 'kotlin.text.map' call
1024
+ function polarComponentInfo(name, l, r) {
1025
+ _init_properties_ColorSpaceUtils_kt__cnwylg();
1026
+ // Inline function 'kotlin.collections.buildList' call
1027
+ // Inline function 'kotlin.contracts.contract' call
1028
+ // Inline function 'kotlin.collections.buildListInternal' call
1029
+ // Inline function 'kotlin.apply' call
1030
+ var this_0 = ArrayList_init_$Create$_0();
1031
+ // Inline function 'kotlin.contracts.contract' call
1032
+ // Inline function 'com.github.ajalt.colormath.internal.polarComponentInfo.<anonymous>' call
915
1033
  // Inline function 'kotlin.text.mapTo' call
916
- var destination = ArrayList_init_$Create$(charSequenceLength(name));
917
1034
  var inductionVariable = 0;
918
1035
  while (inductionVariable < charSequenceLength(name)) {
919
1036
  var item = charSequenceGet(name, inductionVariable);
920
1037
  inductionVariable = inductionVariable + 1 | 0;
921
- // Inline function 'com.github.ajalt.colormath.internal.polarComponentInfo.<anonymous>' call
922
- var tmp$ret$0 = new ColorComponentInfo(toString(item), item === _Char___init__impl__6a9atx(72));
923
- destination.p(tmp$ret$0);
924
- }
925
- return plus(destination, new ColorComponentInfo('alpha', false));
926
- }
927
- function rectangularComponentInfo_0(names) {
928
- // Inline function 'kotlin.collections.map' call
929
- var this_0 = plus(asList(names), 'alpha');
930
- // Inline function 'kotlin.collections.mapTo' call
931
- var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
932
- var tmp0_iterator = this_0.s();
933
- while (tmp0_iterator.t()) {
934
- var item = tmp0_iterator.u();
935
- // Inline function 'com.github.ajalt.colormath.internal.rectangularComponentInfo.<anonymous>' call
936
- var tmp$ret$0 = new ColorComponentInfo(item, false);
937
- destination.p(tmp$ret$0);
938
- }
939
- return destination;
1038
+ // Inline function 'com.github.ajalt.colormath.internal.polarComponentInfo.<anonymous>.<anonymous>' call
1039
+ var tmp$ret$0 = new ColorComponentInfo(toString_0(item), item === _Char___init__impl__6a9atx(72), item === _Char___init__impl__6a9atx(72) ? 0.0 : l, item === _Char___init__impl__6a9atx(72) ? 360.0 : r);
1040
+ this_0.p(tmp$ret$0);
1041
+ }
1042
+ this_0.p(get_alphaInfo());
1043
+ return this_0.y2();
1044
+ }
1045
+ function componentInfoList(c) {
1046
+ _init_properties_ColorSpaceUtils_kt__cnwylg();
1047
+ return listOf(arrayConcat([c, [get_alphaInfo()]]));
1048
+ }
1049
+ var properties_initialized_ColorSpaceUtils_kt_kskdoe;
1050
+ function _init_properties_ColorSpaceUtils_kt__cnwylg() {
1051
+ if (!properties_initialized_ColorSpaceUtils_kt_kskdoe) {
1052
+ properties_initialized_ColorSpaceUtils_kt_kskdoe = true;
1053
+ alphaInfo = new ColorComponentInfo('alpha', false, 0.0, 1.0);
1054
+ }
940
1055
  }
941
1056
  function get_CAT02_XYZ_TO_LMS() {
942
1057
  _init_properties_Constants_kt__atb1ur();
@@ -970,7 +1085,7 @@
970
1085
  }
971
1086
  function CssColors() {
972
1087
  CssColors_instance = this;
973
- this.k1l_1 = mapOf([to('black', Companion_getInstance_4().y1n(0, 0, 0)), to('silver', Companion_getInstance_4().y1n(192, 192, 192)), to('gray', Companion_getInstance_4().y1n(128, 128, 128)), to('white', Companion_getInstance_4().y1n(255, 255, 255)), to('maroon', Companion_getInstance_4().y1n(128, 0, 0)), to('red', Companion_getInstance_4().y1n(255, 0, 0)), to('purple', Companion_getInstance_4().y1n(128, 0, 128)), to('fuchsia', Companion_getInstance_4().y1n(255, 0, 255)), to('green', Companion_getInstance_4().y1n(0, 128, 0)), to('lime', Companion_getInstance_4().y1n(0, 255, 0)), to('olive', Companion_getInstance_4().y1n(128, 128, 0)), to('yellow', Companion_getInstance_4().y1n(255, 255, 0)), to('navy', Companion_getInstance_4().y1n(0, 0, 128)), to('blue', Companion_getInstance_4().y1n(0, 0, 255)), to('teal', Companion_getInstance_4().y1n(0, 128, 128)), to('aqua', Companion_getInstance_4().y1n(0, 255, 255)), to('orange', Companion_getInstance_4().y1n(255, 165, 0)), to('aliceblue', Companion_getInstance_4().y1n(240, 248, 255)), to('antiquewhite', Companion_getInstance_4().y1n(250, 235, 215)), to('aquamarine', Companion_getInstance_4().y1n(127, 255, 212)), to('azure', Companion_getInstance_4().y1n(240, 255, 255)), to('beige', Companion_getInstance_4().y1n(245, 245, 220)), to('bisque', Companion_getInstance_4().y1n(255, 228, 196)), to('blanchedalmond', Companion_getInstance_4().y1n(255, 235, 205)), to('blueviolet', Companion_getInstance_4().y1n(138, 43, 226)), to('brown', Companion_getInstance_4().y1n(165, 42, 42)), to('burlywood', Companion_getInstance_4().y1n(222, 184, 135)), to('cadetblue', Companion_getInstance_4().y1n(95, 158, 160)), to('chartreuse', Companion_getInstance_4().y1n(127, 255, 0)), to('chocolate', Companion_getInstance_4().y1n(210, 105, 30)), to('coral', Companion_getInstance_4().y1n(255, 127, 80)), to('cornflowerblue', Companion_getInstance_4().y1n(100, 149, 237)), to('cornsilk', Companion_getInstance_4().y1n(255, 248, 220)), to('crimson', Companion_getInstance_4().y1n(220, 20, 60)), to('cyan', Companion_getInstance_4().y1n(0, 255, 255)), to('darkblue', Companion_getInstance_4().y1n(0, 0, 139)), to('darkcyan', Companion_getInstance_4().y1n(0, 139, 139)), to('darkgoldenrod', Companion_getInstance_4().y1n(184, 134, 11)), to('darkgray', Companion_getInstance_4().y1n(169, 169, 169)), to('darkgreen', Companion_getInstance_4().y1n(0, 100, 0)), to('darkgrey', Companion_getInstance_4().y1n(169, 169, 169)), to('darkkhaki', Companion_getInstance_4().y1n(189, 183, 107)), to('darkmagenta', Companion_getInstance_4().y1n(139, 0, 139)), to('darkolivegreen', Companion_getInstance_4().y1n(85, 107, 47)), to('darkorange', Companion_getInstance_4().y1n(255, 140, 0)), to('darkorchid', Companion_getInstance_4().y1n(153, 50, 204)), to('darkred', Companion_getInstance_4().y1n(139, 0, 0)), to('darksalmon', Companion_getInstance_4().y1n(233, 150, 122)), to('darkseagreen', Companion_getInstance_4().y1n(143, 188, 143)), to('darkslateblue', Companion_getInstance_4().y1n(72, 61, 139)), to('darkslategray', Companion_getInstance_4().y1n(47, 79, 79)), to('darkslategrey', Companion_getInstance_4().y1n(47, 79, 79)), to('darkturquoise', Companion_getInstance_4().y1n(0, 206, 209)), to('darkviolet', Companion_getInstance_4().y1n(148, 0, 211)), to('deeppink', Companion_getInstance_4().y1n(255, 20, 147)), to('deepskyblue', Companion_getInstance_4().y1n(0, 191, 255)), to('dimgray', Companion_getInstance_4().y1n(105, 105, 105)), to('dimgrey', Companion_getInstance_4().y1n(105, 105, 105)), to('dodgerblue', Companion_getInstance_4().y1n(30, 144, 255)), to('firebrick', Companion_getInstance_4().y1n(178, 34, 34)), to('floralwhite', Companion_getInstance_4().y1n(255, 250, 240)), to('forestgreen', Companion_getInstance_4().y1n(34, 139, 34)), to('gainsboro', Companion_getInstance_4().y1n(220, 220, 220)), to('ghostwhite', Companion_getInstance_4().y1n(248, 248, 255)), to('gold', Companion_getInstance_4().y1n(255, 215, 0)), to('goldenrod', Companion_getInstance_4().y1n(218, 165, 32)), to('greenyellow', Companion_getInstance_4().y1n(173, 255, 47)), to('grey', Companion_getInstance_4().y1n(128, 128, 128)), to('honeydew', Companion_getInstance_4().y1n(240, 255, 240)), to('hotpink', Companion_getInstance_4().y1n(255, 105, 180)), to('indianred', Companion_getInstance_4().y1n(205, 92, 92)), to('indigo', Companion_getInstance_4().y1n(75, 0, 130)), to('ivory', Companion_getInstance_4().y1n(255, 255, 240)), to('khaki', Companion_getInstance_4().y1n(240, 230, 140)), to('lavender', Companion_getInstance_4().y1n(230, 230, 250)), to('lavenderblush', Companion_getInstance_4().y1n(255, 240, 245)), to('lawngreen', Companion_getInstance_4().y1n(124, 252, 0)), to('lemonchiffon', Companion_getInstance_4().y1n(255, 250, 205)), to('lightblue', Companion_getInstance_4().y1n(173, 216, 230)), to('lightcoral', Companion_getInstance_4().y1n(240, 128, 128)), to('lightcyan', Companion_getInstance_4().y1n(224, 255, 255)), to('lightgoldenrodyellow', Companion_getInstance_4().y1n(250, 250, 210)), to('lightgray', Companion_getInstance_4().y1n(211, 211, 211)), to('lightgreen', Companion_getInstance_4().y1n(144, 238, 144)), to('lightgrey', Companion_getInstance_4().y1n(211, 211, 211)), to('lightpink', Companion_getInstance_4().y1n(255, 182, 193)), to('lightsalmon', Companion_getInstance_4().y1n(255, 160, 122)), to('lightseagreen', Companion_getInstance_4().y1n(32, 178, 170)), to('lightskyblue', Companion_getInstance_4().y1n(135, 206, 250)), to('lightslategray', Companion_getInstance_4().y1n(119, 136, 153)), to('lightslategrey', Companion_getInstance_4().y1n(119, 136, 153)), to('lightsteelblue', Companion_getInstance_4().y1n(176, 196, 222)), to('lightyellow', Companion_getInstance_4().y1n(255, 255, 224)), to('limegreen', Companion_getInstance_4().y1n(50, 205, 50)), to('linen', Companion_getInstance_4().y1n(250, 240, 230)), to('magenta', Companion_getInstance_4().y1n(255, 0, 255)), to('mediumaquamarine', Companion_getInstance_4().y1n(102, 205, 170)), to('mediumblue', Companion_getInstance_4().y1n(0, 0, 205)), to('mediumorchid', Companion_getInstance_4().y1n(186, 85, 211)), to('mediumpurple', Companion_getInstance_4().y1n(147, 112, 219)), to('mediumseagreen', Companion_getInstance_4().y1n(60, 179, 113)), to('mediumslateblue', Companion_getInstance_4().y1n(123, 104, 238)), to('mediumspringgreen', Companion_getInstance_4().y1n(0, 250, 154)), to('mediumturquoise', Companion_getInstance_4().y1n(72, 209, 204)), to('mediumvioletred', Companion_getInstance_4().y1n(199, 21, 133)), to('midnightblue', Companion_getInstance_4().y1n(25, 25, 112)), to('mintcream', Companion_getInstance_4().y1n(245, 255, 250)), to('mistyrose', Companion_getInstance_4().y1n(255, 228, 225)), to('moccasin', Companion_getInstance_4().y1n(255, 228, 181)), to('navajowhite', Companion_getInstance_4().y1n(255, 222, 173)), to('oldlace', Companion_getInstance_4().y1n(253, 245, 230)), to('olivedrab', Companion_getInstance_4().y1n(107, 142, 35)), to('orangered', Companion_getInstance_4().y1n(255, 69, 0)), to('orchid', Companion_getInstance_4().y1n(218, 112, 214)), to('palegoldenrod', Companion_getInstance_4().y1n(238, 232, 170)), to('palegreen', Companion_getInstance_4().y1n(152, 251, 152)), to('paleturquoise', Companion_getInstance_4().y1n(175, 238, 238)), to('palevioletred', Companion_getInstance_4().y1n(219, 112, 147)), to('papayawhip', Companion_getInstance_4().y1n(255, 239, 213)), to('peachpuff', Companion_getInstance_4().y1n(255, 218, 185)), to('peru', Companion_getInstance_4().y1n(205, 133, 63)), to('pink', Companion_getInstance_4().y1n(255, 192, 203)), to('plum', Companion_getInstance_4().y1n(221, 160, 221)), to('powderblue', Companion_getInstance_4().y1n(176, 224, 230)), to('rosybrown', Companion_getInstance_4().y1n(188, 143, 143)), to('royalblue', Companion_getInstance_4().y1n(65, 105, 225)), to('saddlebrown', Companion_getInstance_4().y1n(139, 69, 19)), to('salmon', Companion_getInstance_4().y1n(250, 128, 114)), to('sandybrown', Companion_getInstance_4().y1n(244, 164, 96)), to('seagreen', Companion_getInstance_4().y1n(46, 139, 87)), to('seashell', Companion_getInstance_4().y1n(255, 245, 238)), to('sienna', Companion_getInstance_4().y1n(160, 82, 45)), to('skyblue', Companion_getInstance_4().y1n(135, 206, 235)), to('slateblue', Companion_getInstance_4().y1n(106, 90, 205)), to('slategray', Companion_getInstance_4().y1n(112, 128, 144)), to('slategrey', Companion_getInstance_4().y1n(112, 128, 144)), to('snow', Companion_getInstance_4().y1n(255, 250, 250)), to('springgreen', Companion_getInstance_4().y1n(0, 255, 127)), to('steelblue', Companion_getInstance_4().y1n(70, 130, 180)), to('tan', Companion_getInstance_4().y1n(210, 180, 140)), to('thistle', Companion_getInstance_4().y1n(216, 191, 216)), to('tomato', Companion_getInstance_4().y1n(255, 99, 71)), to('turquoise', Companion_getInstance_4().y1n(64, 224, 208)), to('violet', Companion_getInstance_4().y1n(238, 130, 238)), to('wheat', Companion_getInstance_4().y1n(245, 222, 179)), to('whitesmoke', Companion_getInstance_4().y1n(245, 245, 245)), to('yellowgreen', Companion_getInstance_4().y1n(154, 205, 50)), to('rebeccapurple', Companion_getInstance_4().y1n(102, 51, 153)), to('transparent', Companion_getInstance_4().z1n(0, 0, 0, 0))]);
1088
+ this.s1l_1 = mapOf([to('black', Companion_getInstance_6().o1o(0, 0, 0)), to('silver', Companion_getInstance_6().o1o(192, 192, 192)), to('gray', Companion_getInstance_6().o1o(128, 128, 128)), to('white', Companion_getInstance_6().o1o(255, 255, 255)), to('maroon', Companion_getInstance_6().o1o(128, 0, 0)), to('red', Companion_getInstance_6().o1o(255, 0, 0)), to('purple', Companion_getInstance_6().o1o(128, 0, 128)), to('fuchsia', Companion_getInstance_6().o1o(255, 0, 255)), to('green', Companion_getInstance_6().o1o(0, 128, 0)), to('lime', Companion_getInstance_6().o1o(0, 255, 0)), to('olive', Companion_getInstance_6().o1o(128, 128, 0)), to('yellow', Companion_getInstance_6().o1o(255, 255, 0)), to('navy', Companion_getInstance_6().o1o(0, 0, 128)), to('blue', Companion_getInstance_6().o1o(0, 0, 255)), to('teal', Companion_getInstance_6().o1o(0, 128, 128)), to('aqua', Companion_getInstance_6().o1o(0, 255, 255)), to('orange', Companion_getInstance_6().o1o(255, 165, 0)), to('aliceblue', Companion_getInstance_6().o1o(240, 248, 255)), to('antiquewhite', Companion_getInstance_6().o1o(250, 235, 215)), to('aquamarine', Companion_getInstance_6().o1o(127, 255, 212)), to('azure', Companion_getInstance_6().o1o(240, 255, 255)), to('beige', Companion_getInstance_6().o1o(245, 245, 220)), to('bisque', Companion_getInstance_6().o1o(255, 228, 196)), to('blanchedalmond', Companion_getInstance_6().o1o(255, 235, 205)), to('blueviolet', Companion_getInstance_6().o1o(138, 43, 226)), to('brown', Companion_getInstance_6().o1o(165, 42, 42)), to('burlywood', Companion_getInstance_6().o1o(222, 184, 135)), to('cadetblue', Companion_getInstance_6().o1o(95, 158, 160)), to('chartreuse', Companion_getInstance_6().o1o(127, 255, 0)), to('chocolate', Companion_getInstance_6().o1o(210, 105, 30)), to('coral', Companion_getInstance_6().o1o(255, 127, 80)), to('cornflowerblue', Companion_getInstance_6().o1o(100, 149, 237)), to('cornsilk', Companion_getInstance_6().o1o(255, 248, 220)), to('crimson', Companion_getInstance_6().o1o(220, 20, 60)), to('cyan', Companion_getInstance_6().o1o(0, 255, 255)), to('darkblue', Companion_getInstance_6().o1o(0, 0, 139)), to('darkcyan', Companion_getInstance_6().o1o(0, 139, 139)), to('darkgoldenrod', Companion_getInstance_6().o1o(184, 134, 11)), to('darkgray', Companion_getInstance_6().o1o(169, 169, 169)), to('darkgreen', Companion_getInstance_6().o1o(0, 100, 0)), to('darkgrey', Companion_getInstance_6().o1o(169, 169, 169)), to('darkkhaki', Companion_getInstance_6().o1o(189, 183, 107)), to('darkmagenta', Companion_getInstance_6().o1o(139, 0, 139)), to('darkolivegreen', Companion_getInstance_6().o1o(85, 107, 47)), to('darkorange', Companion_getInstance_6().o1o(255, 140, 0)), to('darkorchid', Companion_getInstance_6().o1o(153, 50, 204)), to('darkred', Companion_getInstance_6().o1o(139, 0, 0)), to('darksalmon', Companion_getInstance_6().o1o(233, 150, 122)), to('darkseagreen', Companion_getInstance_6().o1o(143, 188, 143)), to('darkslateblue', Companion_getInstance_6().o1o(72, 61, 139)), to('darkslategray', Companion_getInstance_6().o1o(47, 79, 79)), to('darkslategrey', Companion_getInstance_6().o1o(47, 79, 79)), to('darkturquoise', Companion_getInstance_6().o1o(0, 206, 209)), to('darkviolet', Companion_getInstance_6().o1o(148, 0, 211)), to('deeppink', Companion_getInstance_6().o1o(255, 20, 147)), to('deepskyblue', Companion_getInstance_6().o1o(0, 191, 255)), to('dimgray', Companion_getInstance_6().o1o(105, 105, 105)), to('dimgrey', Companion_getInstance_6().o1o(105, 105, 105)), to('dodgerblue', Companion_getInstance_6().o1o(30, 144, 255)), to('firebrick', Companion_getInstance_6().o1o(178, 34, 34)), to('floralwhite', Companion_getInstance_6().o1o(255, 250, 240)), to('forestgreen', Companion_getInstance_6().o1o(34, 139, 34)), to('gainsboro', Companion_getInstance_6().o1o(220, 220, 220)), to('ghostwhite', Companion_getInstance_6().o1o(248, 248, 255)), to('gold', Companion_getInstance_6().o1o(255, 215, 0)), to('goldenrod', Companion_getInstance_6().o1o(218, 165, 32)), to('greenyellow', Companion_getInstance_6().o1o(173, 255, 47)), to('grey', Companion_getInstance_6().o1o(128, 128, 128)), to('honeydew', Companion_getInstance_6().o1o(240, 255, 240)), to('hotpink', Companion_getInstance_6().o1o(255, 105, 180)), to('indianred', Companion_getInstance_6().o1o(205, 92, 92)), to('indigo', Companion_getInstance_6().o1o(75, 0, 130)), to('ivory', Companion_getInstance_6().o1o(255, 255, 240)), to('khaki', Companion_getInstance_6().o1o(240, 230, 140)), to('lavender', Companion_getInstance_6().o1o(230, 230, 250)), to('lavenderblush', Companion_getInstance_6().o1o(255, 240, 245)), to('lawngreen', Companion_getInstance_6().o1o(124, 252, 0)), to('lemonchiffon', Companion_getInstance_6().o1o(255, 250, 205)), to('lightblue', Companion_getInstance_6().o1o(173, 216, 230)), to('lightcoral', Companion_getInstance_6().o1o(240, 128, 128)), to('lightcyan', Companion_getInstance_6().o1o(224, 255, 255)), to('lightgoldenrodyellow', Companion_getInstance_6().o1o(250, 250, 210)), to('lightgray', Companion_getInstance_6().o1o(211, 211, 211)), to('lightgreen', Companion_getInstance_6().o1o(144, 238, 144)), to('lightgrey', Companion_getInstance_6().o1o(211, 211, 211)), to('lightpink', Companion_getInstance_6().o1o(255, 182, 193)), to('lightsalmon', Companion_getInstance_6().o1o(255, 160, 122)), to('lightseagreen', Companion_getInstance_6().o1o(32, 178, 170)), to('lightskyblue', Companion_getInstance_6().o1o(135, 206, 250)), to('lightslategray', Companion_getInstance_6().o1o(119, 136, 153)), to('lightslategrey', Companion_getInstance_6().o1o(119, 136, 153)), to('lightsteelblue', Companion_getInstance_6().o1o(176, 196, 222)), to('lightyellow', Companion_getInstance_6().o1o(255, 255, 224)), to('limegreen', Companion_getInstance_6().o1o(50, 205, 50)), to('linen', Companion_getInstance_6().o1o(250, 240, 230)), to('magenta', Companion_getInstance_6().o1o(255, 0, 255)), to('mediumaquamarine', Companion_getInstance_6().o1o(102, 205, 170)), to('mediumblue', Companion_getInstance_6().o1o(0, 0, 205)), to('mediumorchid', Companion_getInstance_6().o1o(186, 85, 211)), to('mediumpurple', Companion_getInstance_6().o1o(147, 112, 219)), to('mediumseagreen', Companion_getInstance_6().o1o(60, 179, 113)), to('mediumslateblue', Companion_getInstance_6().o1o(123, 104, 238)), to('mediumspringgreen', Companion_getInstance_6().o1o(0, 250, 154)), to('mediumturquoise', Companion_getInstance_6().o1o(72, 209, 204)), to('mediumvioletred', Companion_getInstance_6().o1o(199, 21, 133)), to('midnightblue', Companion_getInstance_6().o1o(25, 25, 112)), to('mintcream', Companion_getInstance_6().o1o(245, 255, 250)), to('mistyrose', Companion_getInstance_6().o1o(255, 228, 225)), to('moccasin', Companion_getInstance_6().o1o(255, 228, 181)), to('navajowhite', Companion_getInstance_6().o1o(255, 222, 173)), to('oldlace', Companion_getInstance_6().o1o(253, 245, 230)), to('olivedrab', Companion_getInstance_6().o1o(107, 142, 35)), to('orangered', Companion_getInstance_6().o1o(255, 69, 0)), to('orchid', Companion_getInstance_6().o1o(218, 112, 214)), to('palegoldenrod', Companion_getInstance_6().o1o(238, 232, 170)), to('palegreen', Companion_getInstance_6().o1o(152, 251, 152)), to('paleturquoise', Companion_getInstance_6().o1o(175, 238, 238)), to('palevioletred', Companion_getInstance_6().o1o(219, 112, 147)), to('papayawhip', Companion_getInstance_6().o1o(255, 239, 213)), to('peachpuff', Companion_getInstance_6().o1o(255, 218, 185)), to('peru', Companion_getInstance_6().o1o(205, 133, 63)), to('pink', Companion_getInstance_6().o1o(255, 192, 203)), to('plum', Companion_getInstance_6().o1o(221, 160, 221)), to('powderblue', Companion_getInstance_6().o1o(176, 224, 230)), to('rosybrown', Companion_getInstance_6().o1o(188, 143, 143)), to('royalblue', Companion_getInstance_6().o1o(65, 105, 225)), to('saddlebrown', Companion_getInstance_6().o1o(139, 69, 19)), to('salmon', Companion_getInstance_6().o1o(250, 128, 114)), to('sandybrown', Companion_getInstance_6().o1o(244, 164, 96)), to('seagreen', Companion_getInstance_6().o1o(46, 139, 87)), to('seashell', Companion_getInstance_6().o1o(255, 245, 238)), to('sienna', Companion_getInstance_6().o1o(160, 82, 45)), to('skyblue', Companion_getInstance_6().o1o(135, 206, 235)), to('slateblue', Companion_getInstance_6().o1o(106, 90, 205)), to('slategray', Companion_getInstance_6().o1o(112, 128, 144)), to('slategrey', Companion_getInstance_6().o1o(112, 128, 144)), to('snow', Companion_getInstance_6().o1o(255, 250, 250)), to('springgreen', Companion_getInstance_6().o1o(0, 255, 127)), to('steelblue', Companion_getInstance_6().o1o(70, 130, 180)), to('tan', Companion_getInstance_6().o1o(210, 180, 140)), to('thistle', Companion_getInstance_6().o1o(216, 191, 216)), to('tomato', Companion_getInstance_6().o1o(255, 99, 71)), to('turquoise', Companion_getInstance_6().o1o(64, 224, 208)), to('violet', Companion_getInstance_6().o1o(238, 130, 238)), to('wheat', Companion_getInstance_6().o1o(245, 222, 179)), to('whitesmoke', Companion_getInstance_6().o1o(245, 245, 245)), to('yellowgreen', Companion_getInstance_6().o1o(154, 205, 50)), to('rebeccapurple', Companion_getInstance_6().o1o(102, 51, 153)), to('transparent', Companion_getInstance_6().p1o(0, 0, 0, 0))]);
974
1089
  }
975
1090
  var CssColors_instance;
976
1091
  function CssColors_getInstance() {
@@ -1123,17 +1238,45 @@
1123
1238
  }
1124
1239
  function Companion_0() {
1125
1240
  Companion_instance_1 = this;
1126
- this.a1o_1 = polarComponentInfo('HSL');
1241
+ this.m1m_1 = polarComponentInfo('HSL', 0.0, 1.0);
1127
1242
  }
1128
1243
  protoOf(Companion_0).pa = function () {
1129
1244
  return 'HSL';
1130
1245
  };
1131
- protoOf(Companion_0).g1l = function () {
1132
- return this.a1o_1;
1246
+ protoOf(Companion_0).q1l = function () {
1247
+ return this.m1m_1;
1133
1248
  };
1134
- protoOf(Companion_0).e1l = function (color) {
1249
+ protoOf(Companion_0).k1l = function (color) {
1135
1250
  return color.k1k();
1136
1251
  };
1252
+ protoOf(Companion_0).r1l = function (components) {
1253
+ // Inline function 'com.github.ajalt.colormath.internal.doCreate' call
1254
+ // Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
1255
+ var size = this.q1l().l();
1256
+ // Inline function 'kotlin.require' call
1257
+ var containsLower = size - 1 | 0;
1258
+ var containsArg = components.length;
1259
+ // Inline function 'kotlin.contracts.contract' call
1260
+ if (!(containsLower <= containsArg ? containsArg <= size : false)) {
1261
+ // Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
1262
+ var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
1263
+ throw IllegalArgumentException_init_$Create$(toString(message));
1264
+ }
1265
+ // Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
1266
+ var tmp = components[0];
1267
+ var tmp_0 = components[1];
1268
+ var tmp_1 = components[2];
1269
+ // Inline function 'kotlin.collections.getOrElse' call
1270
+ var tmp_2;
1271
+ if (3 >= 0 ? 3 <= get_lastIndex_0(components) : false) {
1272
+ tmp_2 = components[3];
1273
+ } else {
1274
+ // Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
1275
+ tmp_2 = 1.0;
1276
+ }
1277
+ var tmp$ret$2 = tmp_2;
1278
+ return new HSL(tmp, tmp_0, tmp_1, tmp$ret$2);
1279
+ };
1137
1280
  var Companion_instance_1;
1138
1281
  function Companion_getInstance_0() {
1139
1282
  if (Companion_instance_1 == null)
@@ -1149,58 +1292,58 @@
1149
1292
  var a_0 = k - 3;
1150
1293
  var b_0 = 9 - k;
1151
1294
  var tmp$ret$1 = Math.min(a_0, b_0, 1.0);
1152
- return l - a * coerceAtLeast_0(tmp$ret$1, -1.0);
1295
+ return l - a * coerceAtLeast(tmp$ret$1, -1.0);
1153
1296
  }
1154
1297
  function HSL(h, s, l, alpha) {
1155
1298
  Companion_getInstance_0();
1156
1299
  alpha = alpha === VOID ? 1.0 : alpha;
1157
- this.a1n_1 = h;
1158
- this.b1n_1 = s;
1159
- this.c1n_1 = l;
1160
- this.d1n_1 = alpha;
1300
+ this.u1n_1 = h;
1301
+ this.v1n_1 = s;
1302
+ this.w1n_1 = l;
1303
+ this.x1n_1 = alpha;
1161
1304
  }
1162
- protoOf(HSL).n1n = function () {
1163
- return this.a1n_1;
1305
+ protoOf(HSL).l1o = function () {
1306
+ return this.u1n_1;
1164
1307
  };
1165
1308
  protoOf(HSL).h1k = function () {
1166
- return this.d1n_1;
1309
+ return this.x1n_1;
1167
1310
  };
1168
1311
  protoOf(HSL).i1k = function () {
1169
1312
  return Companion_getInstance_0();
1170
1313
  };
1171
1314
  protoOf(HSL).j1k = function () {
1172
- if (this.b1n_1 < 1.0E-7)
1173
- return Companion_getInstance_4().d1m(this.c1n_1, this.c1n_1, this.c1n_1, this.d1n_1);
1315
+ if (this.v1n_1 < 1.0E-7)
1316
+ return Companion_getInstance_6().l1m(this.w1n_1, this.w1n_1, this.w1n_1, this.x1n_1);
1174
1317
  var h = normalizeDeg_0(hueOr(this, 0)) / 30.0;
1175
- var s = this.b1n_1;
1176
- var l = this.c1n_1;
1177
- return SRGB_getInstance().d1m(toSRGB$f(h, s, l, 0), toSRGB$f(h, s, l, 8), toSRGB$f(h, s, l, 4), this.d1n_1);
1318
+ var s = this.v1n_1;
1319
+ var l = this.w1n_1;
1320
+ return SRGB_getInstance().l1m(toSRGB$f(h, s, l, 0), toSRGB$f(h, s, l, 8), toSRGB$f(h, s, l, 4), this.x1n_1);
1178
1321
  };
1179
1322
  protoOf(HSL).k1k = function () {
1180
1323
  return this;
1181
1324
  };
1182
1325
  protoOf(HSL).z2 = function () {
1183
1326
  // Inline function 'kotlin.floatArrayOf' call
1184
- return new Float32Array([this.a1n_1, this.b1n_1, this.c1n_1, this.d1n_1]);
1327
+ return new Float32Array([this.u1n_1, this.v1n_1, this.w1n_1, this.x1n_1]);
1185
1328
  };
1186
- protoOf(HSL).h1o = function (h, s, l, alpha) {
1329
+ protoOf(HSL).r1o = function (h, s, l, alpha) {
1187
1330
  return new HSL(h, s, l, alpha);
1188
1331
  };
1189
- protoOf(HSL).i1o = function (h, s, l, alpha, $super) {
1190
- h = h === VOID ? this.a1n_1 : h;
1191
- s = s === VOID ? this.b1n_1 : s;
1192
- l = l === VOID ? this.c1n_1 : l;
1193
- alpha = alpha === VOID ? this.d1n_1 : alpha;
1194
- return $super === VOID ? this.h1o(h, s, l, alpha) : $super.h1o.call(this, h, s, l, alpha);
1332
+ protoOf(HSL).s1o = function (h, s, l, alpha, $super) {
1333
+ h = h === VOID ? this.u1n_1 : h;
1334
+ s = s === VOID ? this.v1n_1 : s;
1335
+ l = l === VOID ? this.w1n_1 : l;
1336
+ alpha = alpha === VOID ? this.x1n_1 : alpha;
1337
+ return $super === VOID ? this.r1o(h, s, l, alpha) : $super.r1o.call(this, h, s, l, alpha);
1195
1338
  };
1196
1339
  protoOf(HSL).toString = function () {
1197
- return 'HSL(h=' + this.a1n_1 + ', s=' + this.b1n_1 + ', l=' + this.c1n_1 + ', alpha=' + this.d1n_1 + ')';
1340
+ return 'HSL(h=' + this.u1n_1 + ', s=' + this.v1n_1 + ', l=' + this.w1n_1 + ', alpha=' + this.x1n_1 + ')';
1198
1341
  };
1199
1342
  protoOf(HSL).hashCode = function () {
1200
- var result = getNumberHashCode(this.a1n_1);
1201
- result = imul(result, 31) + getNumberHashCode(this.b1n_1) | 0;
1202
- result = imul(result, 31) + getNumberHashCode(this.c1n_1) | 0;
1203
- result = imul(result, 31) + getNumberHashCode(this.d1n_1) | 0;
1343
+ var result = getNumberHashCode(this.u1n_1);
1344
+ result = imul(result, 31) + getNumberHashCode(this.v1n_1) | 0;
1345
+ result = imul(result, 31) + getNumberHashCode(this.w1n_1) | 0;
1346
+ result = imul(result, 31) + getNumberHashCode(this.x1n_1) | 0;
1204
1347
  return result;
1205
1348
  };
1206
1349
  protoOf(HSL).equals = function (other) {
@@ -1209,29 +1352,57 @@
1209
1352
  if (!(other instanceof HSL))
1210
1353
  return false;
1211
1354
  var tmp0_other_with_cast = other instanceof HSL ? other : THROW_CCE();
1212
- if (!equals(this.a1n_1, tmp0_other_with_cast.a1n_1))
1355
+ if (!equals(this.u1n_1, tmp0_other_with_cast.u1n_1))
1213
1356
  return false;
1214
- if (!equals(this.b1n_1, tmp0_other_with_cast.b1n_1))
1357
+ if (!equals(this.v1n_1, tmp0_other_with_cast.v1n_1))
1215
1358
  return false;
1216
- if (!equals(this.c1n_1, tmp0_other_with_cast.c1n_1))
1359
+ if (!equals(this.w1n_1, tmp0_other_with_cast.w1n_1))
1217
1360
  return false;
1218
- if (!equals(this.d1n_1, tmp0_other_with_cast.d1n_1))
1361
+ if (!equals(this.x1n_1, tmp0_other_with_cast.x1n_1))
1219
1362
  return false;
1220
1363
  return true;
1221
1364
  };
1222
1365
  function Companion_1() {
1223
1366
  Companion_instance_2 = this;
1224
- this.j1o_1 = polarComponentInfo('HWB');
1367
+ this.t1m_1 = polarComponentInfo('HWB', 0.0, 1.0);
1225
1368
  }
1226
1369
  protoOf(Companion_1).pa = function () {
1227
1370
  return 'HWB';
1228
1371
  };
1229
- protoOf(Companion_1).g1l = function () {
1230
- return this.j1o_1;
1372
+ protoOf(Companion_1).q1l = function () {
1373
+ return this.t1m_1;
1231
1374
  };
1232
- protoOf(Companion_1).e1l = function (color) {
1375
+ protoOf(Companion_1).k1l = function (color) {
1233
1376
  return color.d1l();
1234
1377
  };
1378
+ protoOf(Companion_1).r1l = function (components) {
1379
+ // Inline function 'com.github.ajalt.colormath.internal.doCreate' call
1380
+ // Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
1381
+ var size = this.q1l().l();
1382
+ // Inline function 'kotlin.require' call
1383
+ var containsLower = size - 1 | 0;
1384
+ var containsArg = components.length;
1385
+ // Inline function 'kotlin.contracts.contract' call
1386
+ if (!(containsLower <= containsArg ? containsArg <= size : false)) {
1387
+ // Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
1388
+ var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
1389
+ throw IllegalArgumentException_init_$Create$(toString(message));
1390
+ }
1391
+ // Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
1392
+ var tmp = components[0];
1393
+ var tmp_0 = components[1];
1394
+ var tmp_1 = components[2];
1395
+ // Inline function 'kotlin.collections.getOrElse' call
1396
+ var tmp_2;
1397
+ if (3 >= 0 ? 3 <= get_lastIndex_0(components) : false) {
1398
+ tmp_2 = components[3];
1399
+ } else {
1400
+ // Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
1401
+ tmp_2 = 1.0;
1402
+ }
1403
+ var tmp$ret$2 = tmp_2;
1404
+ return new HWB(tmp, tmp_0, tmp_1, tmp$ret$2);
1405
+ };
1235
1406
  var Companion_instance_2;
1236
1407
  function Companion_getInstance_1() {
1237
1408
  if (Companion_instance_2 == null)
@@ -1241,28 +1412,28 @@
1241
1412
  function HWB(h, w, b, alpha) {
1242
1413
  Companion_getInstance_1();
1243
1414
  alpha = alpha === VOID ? 1.0 : alpha;
1244
- this.j1n_1 = h;
1245
- this.k1n_1 = w;
1246
- this.l1n_1 = b;
1247
- this.m1n_1 = alpha;
1415
+ this.d1o_1 = h;
1416
+ this.e1o_1 = w;
1417
+ this.f1o_1 = b;
1418
+ this.g1o_1 = alpha;
1248
1419
  }
1249
- protoOf(HWB).n1n = function () {
1250
- return this.j1n_1;
1420
+ protoOf(HWB).l1o = function () {
1421
+ return this.d1o_1;
1251
1422
  };
1252
1423
  protoOf(HWB).h1k = function () {
1253
- return this.m1n_1;
1424
+ return this.g1o_1;
1254
1425
  };
1255
1426
  protoOf(HWB).i1k = function () {
1256
1427
  return Companion_getInstance_1();
1257
1428
  };
1258
1429
  protoOf(HWB).j1k = function () {
1259
- var h = this.j1n_1 / 60.0;
1260
- var w = this.k1n_1;
1261
- var b = this.l1n_1;
1262
- var a = this.m1n_1;
1430
+ var h = this.d1o_1 / 60.0;
1431
+ var w = this.e1o_1;
1432
+ var b = this.f1o_1;
1433
+ var a = this.g1o_1;
1263
1434
  if (w + b >= 1.0) {
1264
1435
  var gray = w / (w + b);
1265
- return Companion_getInstance_4().d1m(gray, gray, gray, a);
1436
+ return Companion_getInstance_6().l1m(gray, gray, gray, a);
1266
1437
  }
1267
1438
  var v = 1 - b;
1268
1439
  var i = numberToInt(h);
@@ -1270,17 +1441,17 @@
1270
1441
  var n = w + f * (v - w);
1271
1442
  switch (i) {
1272
1443
  case 1:
1273
- return Companion_getInstance_4().d1m(n, v, w, a);
1444
+ return Companion_getInstance_6().l1m(n, v, w, a);
1274
1445
  case 2:
1275
- return Companion_getInstance_4().d1m(w, v, n, a);
1446
+ return Companion_getInstance_6().l1m(w, v, n, a);
1276
1447
  case 3:
1277
- return Companion_getInstance_4().d1m(w, n, v, a);
1448
+ return Companion_getInstance_6().l1m(w, n, v, a);
1278
1449
  case 4:
1279
- return Companion_getInstance_4().d1m(n, w, v, a);
1450
+ return Companion_getInstance_6().l1m(n, w, v, a);
1280
1451
  case 5:
1281
- return Companion_getInstance_4().d1m(v, w, n, a);
1452
+ return Companion_getInstance_6().l1m(v, w, n, a);
1282
1453
  default:
1283
- return Companion_getInstance_4().d1m(v, n, w, a);
1454
+ return Companion_getInstance_6().l1m(v, n, w, a);
1284
1455
  }
1285
1456
  };
1286
1457
  protoOf(HWB).d1l = function () {
@@ -1288,16 +1459,16 @@
1288
1459
  };
1289
1460
  protoOf(HWB).z2 = function () {
1290
1461
  // Inline function 'kotlin.floatArrayOf' call
1291
- return new Float32Array([this.j1n_1, this.k1n_1, this.l1n_1, this.m1n_1]);
1462
+ return new Float32Array([this.d1o_1, this.e1o_1, this.f1o_1, this.g1o_1]);
1292
1463
  };
1293
1464
  protoOf(HWB).toString = function () {
1294
- return 'HWB(h=' + this.j1n_1 + ', w=' + this.k1n_1 + ', b=' + this.l1n_1 + ', alpha=' + this.m1n_1 + ')';
1465
+ return 'HWB(h=' + this.d1o_1 + ', w=' + this.e1o_1 + ', b=' + this.f1o_1 + ', alpha=' + this.g1o_1 + ')';
1295
1466
  };
1296
1467
  protoOf(HWB).hashCode = function () {
1297
- var result = getNumberHashCode(this.j1n_1);
1298
- result = imul(result, 31) + getNumberHashCode(this.k1n_1) | 0;
1299
- result = imul(result, 31) + getNumberHashCode(this.l1n_1) | 0;
1300
- result = imul(result, 31) + getNumberHashCode(this.m1n_1) | 0;
1468
+ var result = getNumberHashCode(this.d1o_1);
1469
+ result = imul(result, 31) + getNumberHashCode(this.e1o_1) | 0;
1470
+ result = imul(result, 31) + getNumberHashCode(this.f1o_1) | 0;
1471
+ result = imul(result, 31) + getNumberHashCode(this.g1o_1) | 0;
1301
1472
  return result;
1302
1473
  };
1303
1474
  protoOf(HWB).equals = function (other) {
@@ -1306,13 +1477,13 @@
1306
1477
  if (!(other instanceof HWB))
1307
1478
  return false;
1308
1479
  var tmp0_other_with_cast = other instanceof HWB ? other : THROW_CCE();
1309
- if (!equals(this.j1n_1, tmp0_other_with_cast.j1n_1))
1480
+ if (!equals(this.d1o_1, tmp0_other_with_cast.d1o_1))
1310
1481
  return false;
1311
- if (!equals(this.k1n_1, tmp0_other_with_cast.k1n_1))
1482
+ if (!equals(this.e1o_1, tmp0_other_with_cast.e1o_1))
1312
1483
  return false;
1313
- if (!equals(this.l1n_1, tmp0_other_with_cast.l1n_1))
1484
+ if (!equals(this.f1o_1, tmp0_other_with_cast.f1o_1))
1314
1485
  return false;
1315
- if (!equals(this.m1n_1, tmp0_other_with_cast.m1n_1))
1486
+ if (!equals(this.g1o_1, tmp0_other_with_cast.g1o_1))
1316
1487
  return false;
1317
1488
  return true;
1318
1489
  };
@@ -1354,45 +1525,45 @@
1354
1525
  var ICTCP_LMS_TO_XYZ;
1355
1526
  function ICtCp() {
1356
1527
  }
1357
- protoOf(ICtCp).o1o = function () {
1358
- var fo = RGBColorSpaces_getInstance().n1m_1.p1o();
1528
+ protoOf(ICtCp).x1o = function () {
1529
+ var fo = RGBColorSpaces_getInstance().d1n_1.y1o();
1359
1530
  // Inline function 'com.github.ajalt.colormath.internal.dot' call
1360
1531
  var this_0 = get_ICTCP_ICTCP_to_LMS();
1361
- var v0 = this.k1o_1;
1362
- var v1 = this.l1o_1;
1363
- var v2 = this.m1o_1;
1532
+ var v0 = this.t1o_1;
1533
+ var v1 = this.u1o_1;
1534
+ var v2 = this.v1o_1;
1364
1535
  // Inline function 'com.github.ajalt.colormath.model.ICtCp.toBT2020.<anonymous>' call
1365
1536
  var l = Matrix__get_impl_xogbpk(this_0, 0, 0) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 0) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 0) * v2;
1366
1537
  var m = Matrix__get_impl_xogbpk(this_0, 0, 1) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 1) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 1) * v2;
1367
1538
  var s = Matrix__get_impl_xogbpk(this_0, 0, 2) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 2) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 2) * v2;
1368
1539
  // Inline function 'com.github.ajalt.colormath.internal.dot' call
1369
1540
  var this_1 = get_ICTCP_LMS_to_RGB();
1370
- var v0_0 = PqNonlinearity_instance.y1o(l);
1371
- var v1_0 = PqNonlinearity_instance.y1o(m);
1372
- var v2_0 = PqNonlinearity_instance.y1o(s);
1541
+ var v0_0 = PqNonlinearity_instance.h1p(l);
1542
+ var v1_0 = PqNonlinearity_instance.h1p(m);
1543
+ var v2_0 = PqNonlinearity_instance.h1p(s);
1373
1544
  // Inline function 'com.github.ajalt.colormath.model.ICtCp.toBT2020.<anonymous>.<anonymous>' call
1374
1545
  var r = Matrix__get_impl_xogbpk(this_1, 0, 0) * v0_0 + Matrix__get_impl_xogbpk(this_1, 1, 0) * v1_0 + Matrix__get_impl_xogbpk(this_1, 2, 0) * v2_0;
1375
1546
  var g = Matrix__get_impl_xogbpk(this_1, 0, 1) * v0_0 + Matrix__get_impl_xogbpk(this_1, 1, 1) * v1_0 + Matrix__get_impl_xogbpk(this_1, 2, 1) * v2_0;
1376
1547
  var b = Matrix__get_impl_xogbpk(this_1, 0, 2) * v0_0 + Matrix__get_impl_xogbpk(this_1, 1, 2) * v1_0 + Matrix__get_impl_xogbpk(this_1, 2, 2) * v2_0;
1377
- return RGBColorSpaces_getInstance().n1m_1.d1m(fo.z1o(r), fo.z1o(g), fo.z1o(b), this.n1o_1);
1548
+ return RGBColorSpaces_getInstance().d1n_1.l1m(fo.i1p(r), fo.i1p(g), fo.i1p(b), this.w1o_1);
1378
1549
  };
1379
1550
  function PqNonlinearity() {
1380
- this.q1o_1 = 0.1593017578125;
1381
- this.r1o_1 = 78.84375;
1382
- this.s1o_1 = 0.8359375;
1383
- this.t1o_1 = 18.8515625;
1384
- this.u1o_1 = 18.6875;
1385
- this.v1o_1 = 10000.0;
1386
- this.w1o_1 = 6.277394636015326;
1387
- this.x1o_1 = 0.012683313515655966;
1388
- }
1389
- protoOf(PqNonlinearity).y1o = function (x) {
1551
+ this.z1o_1 = 0.1593017578125;
1552
+ this.a1p_1 = 78.84375;
1553
+ this.b1p_1 = 0.8359375;
1554
+ this.c1p_1 = 18.8515625;
1555
+ this.d1p_1 = 18.6875;
1556
+ this.e1p_1 = 10000.0;
1557
+ this.f1p_1 = 6.277394636015326;
1558
+ this.g1p_1 = 0.012683313515655966;
1559
+ }
1560
+ protoOf(PqNonlinearity).h1p = function (x) {
1390
1561
  var vp = spow(x, 0.012683313515655966);
1391
- var n = coerceAtLeast_0(vp - 0.8359375, 0.0);
1562
+ var n = coerceAtLeast(vp - 0.8359375, 0.0);
1392
1563
  var l = spow_0(n / (18.8515625 - 18.6875 * vp), 6.277394636015326);
1393
1564
  return 10000.0 * l;
1394
1565
  };
1395
- protoOf(PqNonlinearity).z1o = function (x) {
1566
+ protoOf(PqNonlinearity).i1p = function (x) {
1396
1567
  var yp = spow_0(x / 10000.0, 0.1593017578125);
1397
1568
  return spow_0((0.8359375 + 18.8515625 * yp) / (1.0 + 18.6875 * yp), 78.84375);
1398
1569
  };
@@ -1416,28 +1587,34 @@
1416
1587
  }
1417
1588
  function Companion_2() {
1418
1589
  Companion_instance_3 = this;
1419
- this.e1m_1 = LABColorSpaces_getInstance().x1m_1;
1590
+ this.n1m_1 = LABColorSpaces_getInstance().o1m_1;
1420
1591
  }
1421
- protoOf(Companion_2).g1l = function () {
1422
- return this.e1m_1.g1l();
1592
+ protoOf(Companion_2).q1l = function () {
1593
+ return this.n1m_1.q1l();
1423
1594
  };
1424
1595
  protoOf(Companion_2).pa = function () {
1425
- return this.e1m_1.pa();
1596
+ return this.n1m_1.pa();
1597
+ };
1598
+ protoOf(Companion_2).p1l = function () {
1599
+ return this.n1m_1.p1l();
1426
1600
  };
1427
- protoOf(Companion_2).f1l = function () {
1428
- return this.e1m_1.f1l();
1601
+ protoOf(Companion_2).k1l = function (color) {
1602
+ return this.n1m_1.k1l(color);
1429
1603
  };
1430
- protoOf(Companion_2).e1l = function (color) {
1431
- return this.e1m_1.e1l(color);
1604
+ protoOf(Companion_2).r1l = function (components) {
1605
+ return this.n1m_1.r1l(components);
1432
1606
  };
1433
- protoOf(Companion_2).h1l = function (components) {
1434
- return this.e1m_1.h1l(components);
1607
+ protoOf(Companion_2).l1m = function (l, a, b, alpha) {
1608
+ return this.n1m_1.l1m(l, a, b, alpha);
1435
1609
  };
1436
- protoOf(Companion_2).d1m = function (l, a, b, alpha) {
1437
- return this.e1m_1.d1m(l, a, b, alpha);
1610
+ protoOf(Companion_2).j1p = function (l, a, b, alpha) {
1611
+ return this.n1m_1.j1p(l, a, b, alpha);
1438
1612
  };
1439
- protoOf(Companion_2).a1p = function (l, a, b, alpha) {
1440
- return this.e1m_1.a1p(l, a, b, alpha);
1613
+ protoOf(Companion_2).equals = function (other) {
1614
+ return equals(LABColorSpaces_getInstance().o1m_1, other);
1615
+ };
1616
+ protoOf(Companion_2).hashCode = function () {
1617
+ return hashCode(LABColorSpaces_getInstance().o1m_1);
1441
1618
  };
1442
1619
  var Companion_instance_3;
1443
1620
  function Companion_getInstance_2() {
@@ -1460,12 +1637,12 @@
1460
1637
  return this.c1l_1;
1461
1638
  };
1462
1639
  protoOf(LAB).j1k = function () {
1463
- return this.y1k_1 === 0.0 ? Companion_getInstance_4().d1m(0.0, 0.0, 0.0, this.b1l_1) : this.q1k().j1k();
1640
+ return this.y1k_1 === 0.0 ? Companion_getInstance_6().l1m(0.0, 0.0, 0.0, this.b1l_1) : this.q1k().j1k();
1464
1641
  };
1465
1642
  protoOf(LAB).q1k = function () {
1466
- var xyzSpace = XYZColorSpace_0(this.c1l_1.f1l());
1643
+ var xyzSpace = XYZColorSpace_0(this.c1l_1.p1l());
1467
1644
  if (this.y1k_1 === 0.0)
1468
- return xyzSpace.b1p(0.0, 0.0, 0.0);
1645
+ return xyzSpace.k1p(0.0, 0.0, 0.0);
1469
1646
  var fy = (this.y1k_1 + 16) / 116.0;
1470
1647
  var fz = fy - this.a1l_1 / 200.0;
1471
1648
  var fx = this.z1k_1 / 500.0 + fy;
@@ -1489,8 +1666,8 @@
1489
1666
  // Inline function 'com.github.ajalt.colormath.model.LAB.toXYZ.<anonymous>' call
1490
1667
  var it_0 = Math.pow(fx, 3);
1491
1668
  var xr = it_0 > get_CIE_E() ? it_0 : (116 * fx - 16) / get_CIE_K();
1492
- var wp = this.c1l_1.f1l().p1n_1;
1493
- return xyzSpace.a1p(xr * wp.f1p(), yr * wp.e1p_1, zr * wp.g1p(), this.b1l_1);
1669
+ var wp = this.c1l_1.p1l().n1o_1;
1670
+ return xyzSpace.j1p(xr * wp.o1p(), yr * wp.n1p_1, zr * wp.p1p(), this.b1l_1);
1494
1671
  };
1495
1672
  protoOf(LAB).x1k = function () {
1496
1673
  // Inline function 'com.github.ajalt.colormath.internal.toPolarModel' call
@@ -1510,7 +1687,7 @@
1510
1687
  var h = tmp;
1511
1688
  // Inline function 'com.github.ajalt.colormath.model.LAB.toLCHab.<anonymous>' call
1512
1689
  var h_0 = normalizeDeg_0(h);
1513
- return LCHabColorSpace(this.c1l_1.f1l()).d1m(this.y1k_1, c, h_0, this.b1l_1);
1690
+ return LCHabColorSpace_0(this.c1l_1.p1l()).l1m(this.y1k_1, c, h_0, this.b1l_1);
1514
1691
  };
1515
1692
  protoOf(LAB).r1k = function () {
1516
1693
  return this;
@@ -1551,12 +1728,12 @@
1551
1728
  function LABColorSpace() {
1552
1729
  }
1553
1730
  function LABColorSpace_0(whitePoint) {
1554
- return whitePoint.equals(Illuminant_getInstance().v1n_1) ? LABColorSpaces_getInstance().x1m_1 : whitePoint.equals(Illuminant_getInstance().t1n_1) ? LABColorSpaces_getInstance().y1m_1 : new LABColorSpaceImpl(whitePoint);
1731
+ return whitePoint.equals(Illuminant_getInstance().q1n_1) ? LABColorSpaces_getInstance().o1m_1 : whitePoint.equals(Illuminant_getInstance().o1n_1) ? LABColorSpaces_getInstance().p1m_1 : new LABColorSpaceImpl(whitePoint);
1555
1732
  }
1556
1733
  function LABColorSpaces() {
1557
1734
  LABColorSpaces_instance = this;
1558
- this.x1m_1 = new LABColorSpaceImpl(Illuminant_getInstance().v1n_1);
1559
- this.y1m_1 = new LABColorSpaceImpl(Illuminant_getInstance().t1n_1);
1735
+ this.o1m_1 = new LABColorSpaceImpl(Illuminant_getInstance().q1n_1);
1736
+ this.p1m_1 = new LABColorSpaceImpl(Illuminant_getInstance().o1n_1);
1560
1737
  }
1561
1738
  var LABColorSpaces_instance;
1562
1739
  function LABColorSpaces_getInstance() {
@@ -1565,37 +1742,37 @@
1565
1742
  return LABColorSpaces_instance;
1566
1743
  }
1567
1744
  function LABColorSpaceImpl(whitePoint) {
1568
- this.h1p_1 = whitePoint;
1569
- this.i1p_1 = rectangularComponentInfo('LAB');
1745
+ this.q1p_1 = whitePoint;
1746
+ this.r1p_1 = threeComponentInfo('L', 0.0, 100.0, 'A', -128.0, 128.0, 'B', -128.0, 128.0);
1570
1747
  }
1571
- protoOf(LABColorSpaceImpl).f1l = function () {
1572
- return this.h1p_1;
1748
+ protoOf(LABColorSpaceImpl).p1l = function () {
1749
+ return this.q1p_1;
1573
1750
  };
1574
1751
  protoOf(LABColorSpaceImpl).pa = function () {
1575
1752
  return 'LAB';
1576
1753
  };
1577
- protoOf(LABColorSpaceImpl).g1l = function () {
1578
- return this.i1p_1;
1754
+ protoOf(LABColorSpaceImpl).q1l = function () {
1755
+ return this.r1p_1;
1579
1756
  };
1580
- protoOf(LABColorSpaceImpl).e1l = function (color) {
1757
+ protoOf(LABColorSpaceImpl).k1l = function (color) {
1581
1758
  // Inline function 'com.github.ajalt.colormath.internal.adaptToThis' call
1582
1759
  var tmp;
1583
1760
  var tmp_0 = color.i1k();
1584
1761
  var tmp0_safe_receiver = isInterface(tmp_0, WhitePointColorSpace) ? tmp_0 : null;
1585
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f1l();
1586
- if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().v1n_1 : tmp1_elvis_lhs).equals(this.f1l())) {
1762
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p1l();
1763
+ if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().q1n_1 : tmp1_elvis_lhs).equals(this.p1l())) {
1587
1764
  // Inline function 'com.github.ajalt.colormath.model.LABColorSpaceImpl.convert.<anonymous>' call
1588
1765
  tmp = color.r1k();
1589
1766
  } else {
1590
1767
  // Inline function 'com.github.ajalt.colormath.model.LABColorSpaceImpl.convert.<anonymous>' call
1591
- tmp = color.q1k().u1m(XYZColorSpace_0(this.f1l())).r1k();
1768
+ tmp = color.q1k().k1n(XYZColorSpace_0(this.p1l())).r1k();
1592
1769
  }
1593
1770
  return tmp;
1594
1771
  };
1595
- protoOf(LABColorSpaceImpl).h1l = function (components) {
1772
+ protoOf(LABColorSpaceImpl).r1l = function (components) {
1596
1773
  // Inline function 'com.github.ajalt.colormath.internal.doCreate' call
1597
1774
  // Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
1598
- var size = this.g1l().l();
1775
+ var size = this.q1l().l();
1599
1776
  // Inline function 'kotlin.require' call
1600
1777
  var containsLower = size - 1 | 0;
1601
1778
  var containsArg = components.length;
@@ -1603,7 +1780,7 @@
1603
1780
  if (!(containsLower <= containsArg ? containsArg <= size : false)) {
1604
1781
  // Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
1605
1782
  var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
1606
- throw IllegalArgumentException_init_$Create$(toString_0(message));
1783
+ throw IllegalArgumentException_init_$Create$(toString(message));
1607
1784
  }
1608
1785
  // Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
1609
1786
  var tmp = components[0];
@@ -1618,48 +1795,53 @@
1618
1795
  tmp_2 = 1.0;
1619
1796
  }
1620
1797
  var tmp$ret$2 = tmp_2;
1621
- return this.d1m(tmp, tmp_0, tmp_1, tmp$ret$2);
1798
+ return this.l1m(tmp, tmp_0, tmp_1, tmp$ret$2);
1622
1799
  };
1623
1800
  protoOf(LABColorSpaceImpl).toString = function () {
1624
- return 'LABColorSpace(' + this.h1p_1 + ')';
1801
+ return 'LABColorSpace(' + this.q1p_1 + ')';
1625
1802
  };
1626
- protoOf(LABColorSpaceImpl).d1m = function (l, a, b, alpha) {
1803
+ protoOf(LABColorSpaceImpl).l1m = function (l, a, b, alpha) {
1627
1804
  return new LAB(l, a, b, alpha, this);
1628
1805
  };
1629
1806
  protoOf(LABColorSpaceImpl).hashCode = function () {
1630
- return this.h1p_1.hashCode();
1807
+ return this.q1p_1.hashCode();
1631
1808
  };
1632
1809
  protoOf(LABColorSpaceImpl).equals = function (other) {
1633
- if (this === other)
1634
- return true;
1635
- if (!(other instanceof LABColorSpaceImpl))
1636
- return false;
1637
- var tmp0_other_with_cast = other instanceof LABColorSpaceImpl ? other : THROW_CCE();
1638
- if (!this.h1p_1.equals(tmp0_other_with_cast.h1p_1))
1639
- return false;
1640
- return true;
1810
+ var tmp;
1811
+ if (!(other == null) ? isInterface(other, LABColorSpace) : false) {
1812
+ tmp = this.q1p_1.equals(other.p1l());
1813
+ } else {
1814
+ tmp = false;
1815
+ }
1816
+ return tmp;
1641
1817
  };
1642
1818
  function Companion_3() {
1643
1819
  Companion_instance_4 = this;
1644
- this.f1m_1 = LCHabColorSpaces_getInstance().v1m_1;
1820
+ this.q1m_1 = LCHabColorSpaces_getInstance().r1m_1;
1645
1821
  }
1646
- protoOf(Companion_3).g1l = function () {
1647
- return this.f1m_1.g1l();
1822
+ protoOf(Companion_3).q1l = function () {
1823
+ return this.q1m_1.q1l();
1648
1824
  };
1649
1825
  protoOf(Companion_3).pa = function () {
1650
- return this.f1m_1.pa();
1826
+ return this.q1m_1.pa();
1651
1827
  };
1652
- protoOf(Companion_3).f1l = function () {
1653
- return this.f1m_1.f1l();
1828
+ protoOf(Companion_3).p1l = function () {
1829
+ return this.q1m_1.p1l();
1654
1830
  };
1655
- protoOf(Companion_3).e1l = function (color) {
1656
- return this.f1m_1.e1l(color);
1831
+ protoOf(Companion_3).k1l = function (color) {
1832
+ return this.q1m_1.k1l(color);
1657
1833
  };
1658
- protoOf(Companion_3).h1l = function (components) {
1659
- return this.f1m_1.h1l(components);
1834
+ protoOf(Companion_3).r1l = function (components) {
1835
+ return this.q1m_1.r1l(components);
1660
1836
  };
1661
- protoOf(Companion_3).d1m = function (l, c, h, alpha) {
1662
- return this.f1m_1.d1m(l, c, h, alpha);
1837
+ protoOf(Companion_3).l1m = function (l, c, h, alpha) {
1838
+ return this.q1m_1.l1m(l, c, h, alpha);
1839
+ };
1840
+ protoOf(Companion_3).equals = function (other) {
1841
+ return equals(LCHabColorSpaces_getInstance().r1m_1, other);
1842
+ };
1843
+ protoOf(Companion_3).hashCode = function () {
1844
+ return hashCode(LCHabColorSpaces_getInstance().r1m_1);
1663
1845
  };
1664
1846
  var Companion_instance_4;
1665
1847
  function Companion_getInstance_3() {
@@ -1669,20 +1851,20 @@
1669
1851
  }
1670
1852
  function LCHab(l, c, h, alpha, space) {
1671
1853
  Companion_getInstance_3();
1672
- this.e1n_1 = l;
1673
- this.f1n_1 = c;
1674
- this.g1n_1 = h;
1675
- this.h1n_1 = alpha;
1676
- this.i1n_1 = space;
1854
+ this.y1n_1 = l;
1855
+ this.z1n_1 = c;
1856
+ this.a1o_1 = h;
1857
+ this.b1o_1 = alpha;
1858
+ this.c1o_1 = space;
1677
1859
  }
1678
- protoOf(LCHab).n1n = function () {
1679
- return this.g1n_1;
1860
+ protoOf(LCHab).l1o = function () {
1861
+ return this.a1o_1;
1680
1862
  };
1681
1863
  protoOf(LCHab).h1k = function () {
1682
- return this.h1n_1;
1864
+ return this.b1o_1;
1683
1865
  };
1684
1866
  protoOf(LCHab).i1k = function () {
1685
- return this.i1n_1;
1867
+ return this.c1o_1;
1686
1868
  };
1687
1869
  protoOf(LCHab).j1k = function () {
1688
1870
  return this.r1k().j1k();
@@ -1692,32 +1874,32 @@
1692
1874
  };
1693
1875
  protoOf(LCHab).r1k = function () {
1694
1876
  // Inline function 'com.github.ajalt.colormath.internal.fromPolarModel' call
1695
- var c = this.f1n_1;
1696
- var h = this.g1n_1;
1877
+ var c = this.z1n_1;
1878
+ var h = this.a1o_1;
1697
1879
  var hDegrees = isNaN_0(h) ? 0.0 : degToRad(h);
1698
1880
  // Inline function 'kotlin.math.cos' call
1699
1881
  var a = c * Math.cos(hDegrees);
1700
1882
  // Inline function 'kotlin.math.sin' call
1701
1883
  var b = c * Math.sin(hDegrees);
1702
1884
  // Inline function 'com.github.ajalt.colormath.model.LCHab.toLAB.<anonymous>' call
1703
- return LABColorSpace_0(this.i1n_1.f1l()).d1m(this.e1n_1, a, b, this.h1n_1);
1885
+ return LABColorSpace_0(this.c1o_1.p1l()).l1m(this.y1n_1, a, b, this.b1o_1);
1704
1886
  };
1705
1887
  protoOf(LCHab).x1k = function () {
1706
1888
  return this;
1707
1889
  };
1708
1890
  protoOf(LCHab).z2 = function () {
1709
1891
  // Inline function 'kotlin.floatArrayOf' call
1710
- return new Float32Array([this.e1n_1, this.f1n_1, this.g1n_1, this.h1n_1]);
1892
+ return new Float32Array([this.y1n_1, this.z1n_1, this.a1o_1, this.b1o_1]);
1711
1893
  };
1712
1894
  protoOf(LCHab).toString = function () {
1713
- return 'LCHab(l=' + this.e1n_1 + ', c=' + this.f1n_1 + ', h=' + this.g1n_1 + ', alpha=' + this.h1n_1 + ', space=' + this.i1n_1 + ')';
1895
+ return 'LCHab(l=' + this.y1n_1 + ', c=' + this.z1n_1 + ', h=' + this.a1o_1 + ', alpha=' + this.b1o_1 + ', space=' + this.c1o_1 + ')';
1714
1896
  };
1715
1897
  protoOf(LCHab).hashCode = function () {
1716
- var result = getNumberHashCode(this.e1n_1);
1717
- result = imul(result, 31) + getNumberHashCode(this.f1n_1) | 0;
1718
- result = imul(result, 31) + getNumberHashCode(this.g1n_1) | 0;
1719
- result = imul(result, 31) + getNumberHashCode(this.h1n_1) | 0;
1720
- result = imul(result, 31) + hashCode(this.i1n_1) | 0;
1898
+ var result = getNumberHashCode(this.y1n_1);
1899
+ result = imul(result, 31) + getNumberHashCode(this.z1n_1) | 0;
1900
+ result = imul(result, 31) + getNumberHashCode(this.a1o_1) | 0;
1901
+ result = imul(result, 31) + getNumberHashCode(this.b1o_1) | 0;
1902
+ result = imul(result, 31) + hashCode(this.c1o_1) | 0;
1721
1903
  return result;
1722
1904
  };
1723
1905
  protoOf(LCHab).equals = function (other) {
@@ -1726,25 +1908,27 @@
1726
1908
  if (!(other instanceof LCHab))
1727
1909
  return false;
1728
1910
  var tmp0_other_with_cast = other instanceof LCHab ? other : THROW_CCE();
1729
- if (!equals(this.e1n_1, tmp0_other_with_cast.e1n_1))
1911
+ if (!equals(this.y1n_1, tmp0_other_with_cast.y1n_1))
1730
1912
  return false;
1731
- if (!equals(this.f1n_1, tmp0_other_with_cast.f1n_1))
1913
+ if (!equals(this.z1n_1, tmp0_other_with_cast.z1n_1))
1732
1914
  return false;
1733
- if (!equals(this.g1n_1, tmp0_other_with_cast.g1n_1))
1915
+ if (!equals(this.a1o_1, tmp0_other_with_cast.a1o_1))
1734
1916
  return false;
1735
- if (!equals(this.h1n_1, tmp0_other_with_cast.h1n_1))
1917
+ if (!equals(this.b1o_1, tmp0_other_with_cast.b1o_1))
1736
1918
  return false;
1737
- if (!equals(this.i1n_1, tmp0_other_with_cast.i1n_1))
1919
+ if (!equals(this.c1o_1, tmp0_other_with_cast.c1o_1))
1738
1920
  return false;
1739
1921
  return true;
1740
1922
  };
1741
- function LCHabColorSpace(whitePoint) {
1742
- return whitePoint.equals(Illuminant_getInstance().v1n_1) ? LCHabColorSpaces_getInstance().v1m_1 : whitePoint.equals(Illuminant_getInstance().t1n_1) ? LCHabColorSpaces_getInstance().w1m_1 : new LCHabColorSpaceImpl(whitePoint);
1923
+ function LCHabColorSpace() {
1924
+ }
1925
+ function LCHabColorSpace_0(whitePoint) {
1926
+ return whitePoint.equals(Illuminant_getInstance().q1n_1) ? LCHabColorSpaces_getInstance().r1m_1 : whitePoint.equals(Illuminant_getInstance().o1n_1) ? LCHabColorSpaces_getInstance().s1m_1 : new LCHabColorSpaceImpl(whitePoint);
1743
1927
  }
1744
1928
  function LCHabColorSpaces() {
1745
1929
  LCHabColorSpaces_instance = this;
1746
- this.v1m_1 = new LCHabColorSpaceImpl(Illuminant_getInstance().v1n_1);
1747
- this.w1m_1 = new LCHabColorSpaceImpl(Illuminant_getInstance().t1n_1);
1930
+ this.r1m_1 = new LCHabColorSpaceImpl(Illuminant_getInstance().q1n_1);
1931
+ this.s1m_1 = new LCHabColorSpaceImpl(Illuminant_getInstance().o1n_1);
1748
1932
  }
1749
1933
  var LCHabColorSpaces_instance;
1750
1934
  function LCHabColorSpaces_getInstance() {
@@ -1753,37 +1937,37 @@
1753
1937
  return LCHabColorSpaces_instance;
1754
1938
  }
1755
1939
  function LCHabColorSpaceImpl(whitePoint) {
1756
- this.j1p_1 = whitePoint;
1757
- this.k1p_1 = polarComponentInfo('LCH');
1940
+ this.s1p_1 = whitePoint;
1941
+ this.t1p_1 = componentInfoList([new ColorComponentInfo('L', false, 0.0, 100.0), new ColorComponentInfo('C', false, 0.0, 150.0), new ColorComponentInfo('H', true, 0.0, 360.0)]);
1758
1942
  }
1759
- protoOf(LCHabColorSpaceImpl).f1l = function () {
1760
- return this.j1p_1;
1943
+ protoOf(LCHabColorSpaceImpl).p1l = function () {
1944
+ return this.s1p_1;
1761
1945
  };
1762
1946
  protoOf(LCHabColorSpaceImpl).pa = function () {
1763
1947
  return 'LCHab';
1764
1948
  };
1765
- protoOf(LCHabColorSpaceImpl).g1l = function () {
1766
- return this.k1p_1;
1949
+ protoOf(LCHabColorSpaceImpl).q1l = function () {
1950
+ return this.t1p_1;
1767
1951
  };
1768
- protoOf(LCHabColorSpaceImpl).e1l = function (color) {
1952
+ protoOf(LCHabColorSpaceImpl).k1l = function (color) {
1769
1953
  // Inline function 'com.github.ajalt.colormath.internal.adaptToThis' call
1770
1954
  var tmp;
1771
1955
  var tmp_0 = color.i1k();
1772
1956
  var tmp0_safe_receiver = isInterface(tmp_0, WhitePointColorSpace) ? tmp_0 : null;
1773
- var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.f1l();
1774
- if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().v1n_1 : tmp1_elvis_lhs).equals(this.f1l())) {
1957
+ var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.p1l();
1958
+ if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().q1n_1 : tmp1_elvis_lhs).equals(this.p1l())) {
1775
1959
  // Inline function 'com.github.ajalt.colormath.model.LCHabColorSpaceImpl.convert.<anonymous>' call
1776
1960
  tmp = color.x1k();
1777
1961
  } else {
1778
1962
  // Inline function 'com.github.ajalt.colormath.model.LCHabColorSpaceImpl.convert.<anonymous>' call
1779
- tmp = color.q1k().u1m(XYZColorSpace_0(this.f1l())).x1k();
1963
+ tmp = color.q1k().k1n(XYZColorSpace_0(this.p1l())).x1k();
1780
1964
  }
1781
1965
  return tmp;
1782
1966
  };
1783
- protoOf(LCHabColorSpaceImpl).h1l = function (components) {
1967
+ protoOf(LCHabColorSpaceImpl).r1l = function (components) {
1784
1968
  // Inline function 'com.github.ajalt.colormath.internal.doCreate' call
1785
1969
  // Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
1786
- var size = this.g1l().l();
1970
+ var size = this.q1l().l();
1787
1971
  // Inline function 'kotlin.require' call
1788
1972
  var containsLower = size - 1 | 0;
1789
1973
  var containsArg = components.length;
@@ -1791,7 +1975,7 @@
1791
1975
  if (!(containsLower <= containsArg ? containsArg <= size : false)) {
1792
1976
  // Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
1793
1977
  var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
1794
- throw IllegalArgumentException_init_$Create$(toString_0(message));
1978
+ throw IllegalArgumentException_init_$Create$(toString(message));
1795
1979
  }
1796
1980
  // Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
1797
1981
  var tmp = components[0];
@@ -1806,105 +1990,66 @@
1806
1990
  tmp_2 = 1.0;
1807
1991
  }
1808
1992
  var tmp$ret$2 = tmp_2;
1809
- return this.d1m(tmp, tmp_0, tmp_1, tmp$ret$2);
1993
+ return this.l1m(tmp, tmp_0, tmp_1, tmp$ret$2);
1810
1994
  };
1811
1995
  protoOf(LCHabColorSpaceImpl).toString = function () {
1812
- return 'LCHabColorSpace(' + this.j1p_1 + ')';
1996
+ return 'LCHabColorSpace(' + this.s1p_1 + ')';
1813
1997
  };
1814
- protoOf(LCHabColorSpaceImpl).d1m = function (l, c, h, alpha) {
1998
+ protoOf(LCHabColorSpaceImpl).l1m = function (l, c, h, alpha) {
1815
1999
  return new LCHab(l, c, h, alpha, this);
1816
2000
  };
1817
2001
  protoOf(LCHabColorSpaceImpl).hashCode = function () {
1818
- return this.j1p_1.hashCode();
2002
+ return this.s1p_1.hashCode();
1819
2003
  };
1820
2004
  protoOf(LCHabColorSpaceImpl).equals = function (other) {
1821
- if (this === other)
1822
- return true;
1823
- if (!(other instanceof LCHabColorSpaceImpl))
1824
- return false;
1825
- var tmp0_other_with_cast = other instanceof LCHabColorSpaceImpl ? other : THROW_CCE();
1826
- if (!this.j1p_1.equals(tmp0_other_with_cast.j1p_1))
1827
- return false;
1828
- return true;
1829
- };
1830
- function GammaTransferFunctions(gamma) {
1831
- this.l1p_1 = gamma;
1832
- }
1833
- protoOf(GammaTransferFunctions).y1o = function (x) {
1834
- return spow(x, this.l1p_1);
1835
- };
1836
- protoOf(GammaTransferFunctions).z1o = function (x) {
1837
- return spow(x, 1.0 / this.l1p_1);
1838
- };
1839
- protoOf(GammaTransferFunctions).toString = function () {
1840
- return 'GammaTransferFunctions(gamma=' + this.l1p_1 + ')';
1841
- };
1842
- protoOf(GammaTransferFunctions).hashCode = function () {
1843
- return getNumberHashCode(this.l1p_1);
1844
- };
1845
- protoOf(GammaTransferFunctions).equals = function (other) {
1846
- if (this === other)
1847
- return true;
1848
- if (!(other instanceof GammaTransferFunctions))
1849
- return false;
1850
- var tmp0_other_with_cast = other instanceof GammaTransferFunctions ? other : THROW_CCE();
1851
- if (!equals(this.l1p_1, tmp0_other_with_cast.l1p_1))
1852
- return false;
1853
- return true;
1854
- };
1855
- function LinearTransferFunctions() {
1856
- }
1857
- protoOf(LinearTransferFunctions).y1o = function (x) {
1858
- return x;
1859
- };
1860
- protoOf(LinearTransferFunctions).z1o = function (x) {
1861
- return x;
2005
+ var tmp;
2006
+ if (!(other == null) ? isInterface(other, LCHabColorSpace) : false) {
2007
+ tmp = this.s1p_1.equals(other.p1l());
2008
+ } else {
2009
+ tmp = false;
2010
+ }
2011
+ return tmp;
1862
2012
  };
1863
- var LinearTransferFunctions_instance;
1864
- function LinearTransferFunctions_getInstance() {
1865
- return LinearTransferFunctions_instance;
1866
- }
1867
- function RGBColorSpace() {
1868
- }
1869
2013
  function Companion_4() {
1870
2014
  Companion_instance_5 = this;
1871
- this.b1m_1 = RGBColorSpaces_getInstance().g1m_1;
2015
+ this.u1m_1 = threeComponentInfo('l', 0.0, 1.0, 'a', -0.4, 0.4, 'b', -0.4, 0.4);
1872
2016
  }
1873
- protoOf(Companion_4).g1l = function () {
1874
- return this.b1m_1.g1l();
1875
- };
1876
- protoOf(Companion_4).n1p = function () {
1877
- return this.b1m_1.n1p();
1878
- };
1879
- protoOf(Companion_4).m1p = function () {
1880
- return this.b1m_1.m1p();
1881
- };
1882
2017
  protoOf(Companion_4).pa = function () {
1883
- return this.b1m_1.pa();
2018
+ return 'Oklab';
1884
2019
  };
1885
- protoOf(Companion_4).p1o = function () {
1886
- return this.b1m_1.p1o();
2020
+ protoOf(Companion_4).q1l = function () {
2021
+ return this.u1m_1;
1887
2022
  };
1888
- protoOf(Companion_4).f1l = function () {
1889
- return this.b1m_1.f1l();
2023
+ protoOf(Companion_4).k1l = function (color) {
2024
+ return color.e1l();
1890
2025
  };
1891
- protoOf(Companion_4).e1l = function (color) {
1892
- return this.b1m_1.e1l(color);
1893
- };
1894
- protoOf(Companion_4).h1l = function (components) {
1895
- return this.b1m_1.h1l(components);
1896
- };
1897
- protoOf(Companion_4).z1n = function (r, g, b, alpha) {
1898
- return this.b1m_1.z1n(r, g, b, alpha);
1899
- };
1900
- protoOf(Companion_4).d1m = function (r, g, b, alpha) {
1901
- return this.b1m_1.d1m(r, g, b, alpha);
1902
- };
1903
- protoOf(Companion_4).a1p = function (r, g, b, alpha) {
1904
- return this.b1m_1.a1p(r, g, b, alpha);
1905
- };
1906
- protoOf(Companion_4).c1m = function (hex) {
1907
- return this.b1m_1.c1m(hex);
2026
+ protoOf(Companion_4).r1l = function (components) {
2027
+ // Inline function 'com.github.ajalt.colormath.internal.doCreate' call
2028
+ // Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
2029
+ var size = this.q1l().l();
2030
+ // Inline function 'kotlin.require' call
2031
+ var containsLower = size - 1 | 0;
2032
+ var containsArg = components.length;
2033
+ // Inline function 'kotlin.contracts.contract' call
2034
+ if (!(containsLower <= containsArg ? containsArg <= size : false)) {
2035
+ // Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
2036
+ var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
2037
+ throw IllegalArgumentException_init_$Create$(toString(message));
2038
+ }
2039
+ // Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
2040
+ var tmp = components[0];
2041
+ var tmp_0 = components[1];
2042
+ var tmp_1 = components[2];
2043
+ // Inline function 'kotlin.collections.getOrElse' call
2044
+ var tmp_2;
2045
+ if (3 >= 0 ? 3 <= get_lastIndex_0(components) : false) {
2046
+ tmp_2 = components[3];
2047
+ } else {
2048
+ // Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
2049
+ tmp_2 = 1.0;
2050
+ }
2051
+ var tmp$ret$2 = tmp_2;
2052
+ return new Oklab(tmp, tmp_0, tmp_1, tmp$ret$2);
1908
2053
  };
1909
2054
  var Companion_instance_5;
1910
2055
  function Companion_getInstance_4() {
@@ -1912,10 +2057,315 @@
1912
2057
  new Companion_4();
1913
2058
  return Companion_instance_5;
1914
2059
  }
1915
- function RGB(r, g, b, alpha, space) {
1916
- Companion_getInstance_4();
1917
- this.l1k_1 = r;
1918
- this.m1k_1 = g;
2060
+ function Oklab_init_$Init$(l, a, b, alpha, $this) {
2061
+ alpha = alpha === VOID ? 1.0 : alpha;
2062
+ Oklab.call($this, numberToDouble(l), numberToDouble(a), numberToDouble(b), numberToDouble(alpha));
2063
+ return $this;
2064
+ }
2065
+ function Oklab_init_$Create$(l, a, b, alpha) {
2066
+ return Oklab_init_$Init$(l, a, b, alpha, objectCreate(protoOf(Oklab)));
2067
+ }
2068
+ function Oklab(l, a, b, alpha) {
2069
+ Companion_getInstance_4();
2070
+ alpha = alpha === VOID ? 1.0 : alpha;
2071
+ this.g1l_1 = l;
2072
+ this.h1l_1 = a;
2073
+ this.i1l_1 = b;
2074
+ this.j1l_1 = alpha;
2075
+ }
2076
+ protoOf(Oklab).h1k = function () {
2077
+ return this.j1l_1;
2078
+ };
2079
+ protoOf(Oklab).i1k = function () {
2080
+ return Companion_getInstance_4();
2081
+ };
2082
+ protoOf(Oklab).j1k = function () {
2083
+ // Inline function 'com.github.ajalt.colormath.model.Oklab.calculateConeResponse' call
2084
+ var ll = this.g1l_1 + 0.3963377774 * this.h1l_1 + 0.2158037573 * this.i1l_1;
2085
+ var mm = this.g1l_1 - 0.1055613458 * this.h1l_1 - 0.0638541728 * this.i1l_1;
2086
+ var ss = this.g1l_1 - 0.0894841775 * this.h1l_1 - 1.291485548 * this.i1l_1;
2087
+ var l = ll * ll * ll;
2088
+ var m = mm * mm * mm;
2089
+ var s = ss * ss * ss;
2090
+ var r = 4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s;
2091
+ var g = -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s;
2092
+ var b = -0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s;
2093
+ var f = Companion_getInstance_6().y1o();
2094
+ return Companion_getInstance_6().l1m(f.i1p(r), f.i1p(g), f.i1p(b), this.j1l_1);
2095
+ };
2096
+ protoOf(Oklab).q1k = function () {
2097
+ // Inline function 'com.github.ajalt.colormath.model.Oklab.calculateConeResponse' call
2098
+ var ll = this.g1l_1 + 0.3963377774 * this.h1l_1 + 0.2158037573 * this.i1l_1;
2099
+ var mm = this.g1l_1 - 0.1055613458 * this.h1l_1 - 0.0638541728 * this.i1l_1;
2100
+ var ss = this.g1l_1 - 0.0894841775 * this.h1l_1 - 1.291485548 * this.i1l_1;
2101
+ var l = ll * ll * ll;
2102
+ var m = mm * mm * mm;
2103
+ var s = ss * ss * ss;
2104
+ return Companion_getInstance_7().j1p(1.2270138511 * l - 0.5577999807 * m + 0.281256149 * s, -0.0405801784 * l + 1.1122568696 * m - 0.0716766787 * s, -0.0763812845 * l - 0.4214819784 * m + 1.5861632204 * s, this.j1l_1);
2105
+ };
2106
+ protoOf(Oklab).f1l = function () {
2107
+ // Inline function 'com.github.ajalt.colormath.internal.toPolarModel' call
2108
+ var a = this.h1l_1;
2109
+ var b = this.i1l_1;
2110
+ // Inline function 'kotlin.math.sqrt' call
2111
+ var x = a * a + b * b;
2112
+ var c = Math.sqrt(x);
2113
+ var tmp;
2114
+ if (c > -1.0E-7 ? c < 1.0E-7 : false) {
2115
+ tmp = NaN;
2116
+ } else {
2117
+ // Inline function 'kotlin.math.atan2' call
2118
+ var tmp$ret$1 = Math.atan2(b, a);
2119
+ tmp = radToDeg(tmp$ret$1);
2120
+ }
2121
+ var h = tmp;
2122
+ // Inline function 'com.github.ajalt.colormath.model.Oklab.toOklch.<anonymous>' call
2123
+ var h_0 = normalizeDeg_0(h);
2124
+ return new Oklch(this.g1l_1, c, h_0, this.j1l_1);
2125
+ };
2126
+ protoOf(Oklab).e1l = function () {
2127
+ return this;
2128
+ };
2129
+ protoOf(Oklab).z2 = function () {
2130
+ // Inline function 'kotlin.floatArrayOf' call
2131
+ return new Float32Array([this.g1l_1, this.h1l_1, this.i1l_1, this.j1l_1]);
2132
+ };
2133
+ protoOf(Oklab).toString = function () {
2134
+ return 'Oklab(l=' + this.g1l_1 + ', a=' + this.h1l_1 + ', b=' + this.i1l_1 + ', alpha=' + this.j1l_1 + ')';
2135
+ };
2136
+ protoOf(Oklab).hashCode = function () {
2137
+ var result = getNumberHashCode(this.g1l_1);
2138
+ result = imul(result, 31) + getNumberHashCode(this.h1l_1) | 0;
2139
+ result = imul(result, 31) + getNumberHashCode(this.i1l_1) | 0;
2140
+ result = imul(result, 31) + getNumberHashCode(this.j1l_1) | 0;
2141
+ return result;
2142
+ };
2143
+ protoOf(Oklab).equals = function (other) {
2144
+ if (this === other)
2145
+ return true;
2146
+ if (!(other instanceof Oklab))
2147
+ return false;
2148
+ var tmp0_other_with_cast = other instanceof Oklab ? other : THROW_CCE();
2149
+ if (!equals(this.g1l_1, tmp0_other_with_cast.g1l_1))
2150
+ return false;
2151
+ if (!equals(this.h1l_1, tmp0_other_with_cast.h1l_1))
2152
+ return false;
2153
+ if (!equals(this.i1l_1, tmp0_other_with_cast.i1l_1))
2154
+ return false;
2155
+ if (!equals(this.j1l_1, tmp0_other_with_cast.j1l_1))
2156
+ return false;
2157
+ return true;
2158
+ };
2159
+ function Companion_5() {
2160
+ Companion_instance_6 = this;
2161
+ this.v1m_1 = componentInfoList([new ColorComponentInfo('l', false, 0.0, 1.0), new ColorComponentInfo('c', false, 0.0, 0.4), new ColorComponentInfo('h', true, 0.0, 360.0)]);
2162
+ }
2163
+ protoOf(Companion_5).pa = function () {
2164
+ return 'Oklch';
2165
+ };
2166
+ protoOf(Companion_5).q1l = function () {
2167
+ return this.v1m_1;
2168
+ };
2169
+ protoOf(Companion_5).k1l = function (color) {
2170
+ return color.f1l();
2171
+ };
2172
+ protoOf(Companion_5).r1l = function (components) {
2173
+ // Inline function 'com.github.ajalt.colormath.internal.doCreate' call
2174
+ // Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
2175
+ var size = this.q1l().l();
2176
+ // Inline function 'kotlin.require' call
2177
+ var containsLower = size - 1 | 0;
2178
+ var containsArg = components.length;
2179
+ // Inline function 'kotlin.contracts.contract' call
2180
+ if (!(containsLower <= containsArg ? containsArg <= size : false)) {
2181
+ // Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
2182
+ var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
2183
+ throw IllegalArgumentException_init_$Create$(toString(message));
2184
+ }
2185
+ // Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
2186
+ var tmp = components[0];
2187
+ var tmp_0 = components[1];
2188
+ var tmp_1 = components[2];
2189
+ // Inline function 'kotlin.collections.getOrElse' call
2190
+ var tmp_2;
2191
+ if (3 >= 0 ? 3 <= get_lastIndex_0(components) : false) {
2192
+ tmp_2 = components[3];
2193
+ } else {
2194
+ // Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
2195
+ tmp_2 = 1.0;
2196
+ }
2197
+ var tmp$ret$2 = tmp_2;
2198
+ return new Oklch(tmp, tmp_0, tmp_1, tmp$ret$2);
2199
+ };
2200
+ var Companion_instance_6;
2201
+ function Companion_getInstance_5() {
2202
+ if (Companion_instance_6 == null)
2203
+ new Companion_5();
2204
+ return Companion_instance_6;
2205
+ }
2206
+ function Oklch(l, c, h, alpha) {
2207
+ Companion_getInstance_5();
2208
+ alpha = alpha === VOID ? 1.0 : alpha;
2209
+ this.h1o_1 = l;
2210
+ this.i1o_1 = c;
2211
+ this.j1o_1 = h;
2212
+ this.k1o_1 = alpha;
2213
+ }
2214
+ protoOf(Oklch).l1o = function () {
2215
+ return this.j1o_1;
2216
+ };
2217
+ protoOf(Oklch).h1k = function () {
2218
+ return this.k1o_1;
2219
+ };
2220
+ protoOf(Oklch).i1k = function () {
2221
+ return Companion_getInstance_5();
2222
+ };
2223
+ protoOf(Oklch).j1k = function () {
2224
+ return this.e1l().j1k();
2225
+ };
2226
+ protoOf(Oklch).q1k = function () {
2227
+ return this.e1l().q1k();
2228
+ };
2229
+ protoOf(Oklch).e1l = function () {
2230
+ // Inline function 'com.github.ajalt.colormath.internal.fromPolarModel' call
2231
+ var c = this.i1o_1;
2232
+ var h = this.j1o_1;
2233
+ var hDegrees = isNaN_0(h) ? 0.0 : degToRad(h);
2234
+ // Inline function 'kotlin.math.cos' call
2235
+ var a = c * Math.cos(hDegrees);
2236
+ // Inline function 'kotlin.math.sin' call
2237
+ var b = c * Math.sin(hDegrees);
2238
+ // Inline function 'com.github.ajalt.colormath.model.Oklch.toOklab.<anonymous>' call
2239
+ return new Oklab(this.h1o_1, a, b, this.k1o_1);
2240
+ };
2241
+ protoOf(Oklch).f1l = function () {
2242
+ return this;
2243
+ };
2244
+ protoOf(Oklch).z2 = function () {
2245
+ // Inline function 'kotlin.floatArrayOf' call
2246
+ return new Float32Array([this.h1o_1, this.i1o_1, this.j1o_1, this.k1o_1]);
2247
+ };
2248
+ protoOf(Oklch).toString = function () {
2249
+ return 'Oklch(l=' + this.h1o_1 + ', c=' + this.i1o_1 + ', h=' + this.j1o_1 + ', alpha=' + this.k1o_1 + ')';
2250
+ };
2251
+ protoOf(Oklch).hashCode = function () {
2252
+ var result = getNumberHashCode(this.h1o_1);
2253
+ result = imul(result, 31) + getNumberHashCode(this.i1o_1) | 0;
2254
+ result = imul(result, 31) + getNumberHashCode(this.j1o_1) | 0;
2255
+ result = imul(result, 31) + getNumberHashCode(this.k1o_1) | 0;
2256
+ return result;
2257
+ };
2258
+ protoOf(Oklch).equals = function (other) {
2259
+ if (this === other)
2260
+ return true;
2261
+ if (!(other instanceof Oklch))
2262
+ return false;
2263
+ var tmp0_other_with_cast = other instanceof Oklch ? other : THROW_CCE();
2264
+ if (!equals(this.h1o_1, tmp0_other_with_cast.h1o_1))
2265
+ return false;
2266
+ if (!equals(this.i1o_1, tmp0_other_with_cast.i1o_1))
2267
+ return false;
2268
+ if (!equals(this.j1o_1, tmp0_other_with_cast.j1o_1))
2269
+ return false;
2270
+ if (!equals(this.k1o_1, tmp0_other_with_cast.k1o_1))
2271
+ return false;
2272
+ return true;
2273
+ };
2274
+ function GammaTransferFunctions(gamma) {
2275
+ this.v1p_1 = gamma;
2276
+ }
2277
+ protoOf(GammaTransferFunctions).h1p = function (x) {
2278
+ return spow(x, this.v1p_1);
2279
+ };
2280
+ protoOf(GammaTransferFunctions).i1p = function (x) {
2281
+ return spow(x, 1.0 / this.v1p_1);
2282
+ };
2283
+ protoOf(GammaTransferFunctions).toString = function () {
2284
+ return 'GammaTransferFunctions(gamma=' + this.v1p_1 + ')';
2285
+ };
2286
+ protoOf(GammaTransferFunctions).hashCode = function () {
2287
+ return getNumberHashCode(this.v1p_1);
2288
+ };
2289
+ protoOf(GammaTransferFunctions).equals = function (other) {
2290
+ if (this === other)
2291
+ return true;
2292
+ if (!(other instanceof GammaTransferFunctions))
2293
+ return false;
2294
+ var tmp0_other_with_cast = other instanceof GammaTransferFunctions ? other : THROW_CCE();
2295
+ if (!equals(this.v1p_1, tmp0_other_with_cast.v1p_1))
2296
+ return false;
2297
+ return true;
2298
+ };
2299
+ function LinearTransferFunctions() {
2300
+ }
2301
+ protoOf(LinearTransferFunctions).h1p = function (x) {
2302
+ return x;
2303
+ };
2304
+ protoOf(LinearTransferFunctions).i1p = function (x) {
2305
+ return x;
2306
+ };
2307
+ var LinearTransferFunctions_instance;
2308
+ function LinearTransferFunctions_getInstance() {
2309
+ return LinearTransferFunctions_instance;
2310
+ }
2311
+ function RGBColorSpace() {
2312
+ }
2313
+ function Companion_6() {
2314
+ Companion_instance_7 = this;
2315
+ this.j1m_1 = RGBColorSpaces_getInstance().w1m_1;
2316
+ }
2317
+ protoOf(Companion_6).q1l = function () {
2318
+ return this.j1m_1.q1l();
2319
+ };
2320
+ protoOf(Companion_6).x1p = function () {
2321
+ return this.j1m_1.x1p();
2322
+ };
2323
+ protoOf(Companion_6).w1p = function () {
2324
+ return this.j1m_1.w1p();
2325
+ };
2326
+ protoOf(Companion_6).pa = function () {
2327
+ return this.j1m_1.pa();
2328
+ };
2329
+ protoOf(Companion_6).y1o = function () {
2330
+ return this.j1m_1.y1o();
2331
+ };
2332
+ protoOf(Companion_6).p1l = function () {
2333
+ return this.j1m_1.p1l();
2334
+ };
2335
+ protoOf(Companion_6).k1l = function (color) {
2336
+ return this.j1m_1.k1l(color);
2337
+ };
2338
+ protoOf(Companion_6).r1l = function (components) {
2339
+ return this.j1m_1.r1l(components);
2340
+ };
2341
+ protoOf(Companion_6).p1o = function (r, g, b, alpha) {
2342
+ return this.j1m_1.p1o(r, g, b, alpha);
2343
+ };
2344
+ protoOf(Companion_6).l1m = function (r, g, b, alpha) {
2345
+ return this.j1m_1.l1m(r, g, b, alpha);
2346
+ };
2347
+ protoOf(Companion_6).j1p = function (r, g, b, alpha) {
2348
+ return this.j1m_1.j1p(r, g, b, alpha);
2349
+ };
2350
+ protoOf(Companion_6).k1m = function (hex) {
2351
+ return this.j1m_1.k1m(hex);
2352
+ };
2353
+ protoOf(Companion_6).equals = function (other) {
2354
+ return equals(RGBColorSpaces_getInstance().w1m_1, other);
2355
+ };
2356
+ protoOf(Companion_6).hashCode = function () {
2357
+ return hashCode(RGBColorSpaces_getInstance().w1m_1);
2358
+ };
2359
+ var Companion_instance_7;
2360
+ function Companion_getInstance_6() {
2361
+ if (Companion_instance_7 == null)
2362
+ new Companion_6();
2363
+ return Companion_instance_7;
2364
+ }
2365
+ function RGB(r, g, b, alpha, space) {
2366
+ Companion_getInstance_6();
2367
+ this.l1k_1 = r;
2368
+ this.m1k_1 = g;
1919
2369
  this.n1k_1 = b;
1920
2370
  this.o1k_1 = alpha;
1921
2371
  this.p1k_1 = space;
@@ -1926,22 +2376,22 @@
1926
2376
  protoOf(RGB).i1k = function () {
1927
2377
  return this.p1k_1;
1928
2378
  };
1929
- protoOf(RGB).z1m = function () {
2379
+ protoOf(RGB).t1n = function () {
1930
2380
  // Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
1931
2381
  // Inline function 'com.github.ajalt.colormath.model.RGB.toRGBInt.<anonymous>' call
1932
- var $this$toSRGB = this.o1p(SRGB_getInstance());
2382
+ var $this$toSRGB = this.y1p(SRGB_getInstance());
1933
2383
  return _RGBInt___init__impl__lqova7_1($this$toSRGB.l1k_1, $this$toSRGB.m1k_1, $this$toSRGB.n1k_1, nanToOne($this$toSRGB.o1k_1));
1934
2384
  };
1935
- protoOf(RGB).o1p = function (space) {
1936
- var f = SRGB_getInstance().e1o_1;
1937
- return equals(this.p1k_1, space) ? this : (equals(this.p1k_1, SRGB_getInstance()) ? equals(space, RGBColorSpaces_getInstance().h1m_1) : false) ? space.d1m(f.y1o(this.l1k_1), f.y1o(this.m1k_1), f.y1o(this.n1k_1), this.o1k_1) : (equals(this.p1k_1, RGBColorSpaces_getInstance().h1m_1) ? equals(space, SRGB_getInstance()) : false) ? space.d1m(f.z1o(this.l1k_1), f.z1o(this.m1k_1), f.z1o(this.n1k_1), this.o1k_1) : this.q1k().p1p(space);
2385
+ protoOf(RGB).y1p = function (space) {
2386
+ var f = SRGB_getInstance().y1o();
2387
+ return equals(this.p1k_1, space) ? this : (equals(this.p1k_1, SRGB_getInstance()) ? equals(space, RGBColorSpaces_getInstance().x1m_1) : false) ? space.l1m(f.h1p(this.l1k_1), f.h1p(this.m1k_1), f.h1p(this.n1k_1), this.o1k_1) : (equals(this.p1k_1, RGBColorSpaces_getInstance().x1m_1) ? equals(space, SRGB_getInstance()) : false) ? space.l1m(f.i1p(this.l1k_1), f.i1p(this.m1k_1), f.i1p(this.n1k_1), this.o1k_1) : this.q1k().z1p(space);
1938
2388
  };
1939
2389
  protoOf(RGB).k1k = function () {
1940
2390
  var tmp$ret$3;
1941
2391
  $l$block: {
1942
2392
  // Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
1943
2393
  // Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
1944
- var $this$toSRGB = this.o1p(SRGB_getInstance());
2394
+ var $this$toSRGB = this.y1p(SRGB_getInstance());
1945
2395
  var r = $this$toSRGB.l1k_1;
1946
2396
  var g = $this$toSRGB.m1k_1;
1947
2397
  var b = $this$toSRGB.n1k_1;
@@ -1973,24 +2423,24 @@
1973
2423
  return tmp$ret$3;
1974
2424
  };
1975
2425
  protoOf(RGB).q1k = function () {
1976
- var f = this.p1k_1.p1o();
2426
+ var f = this.p1k_1.y1o();
1977
2427
  // Inline function 'com.github.ajalt.colormath.internal.dot' call
1978
- var this_0 = _Matrix___init__impl__q3kp4w(this.p1k_1.m1p());
1979
- var v0 = f.y1o(this.l1k_1);
1980
- var v1 = f.y1o(this.m1k_1);
1981
- var v2 = f.y1o(this.n1k_1);
2428
+ var this_0 = _Matrix___init__impl__q3kp4w(this.p1k_1.w1p());
2429
+ var v0 = f.h1p(this.l1k_1);
2430
+ var v1 = f.h1p(this.m1k_1);
2431
+ var v2 = f.h1p(this.n1k_1);
1982
2432
  // Inline function 'com.github.ajalt.colormath.model.RGB.toXYZ.<anonymous>' call
1983
2433
  var x = Matrix__get_impl_xogbpk(this_0, 0, 0) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 0) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 0) * v2;
1984
2434
  var y = Matrix__get_impl_xogbpk(this_0, 0, 1) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 1) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 1) * v2;
1985
2435
  var z = Matrix__get_impl_xogbpk(this_0, 0, 2) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 2) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 2) * v2;
1986
- return XYZColorSpace_0(this.p1k_1.f1l()).d1m(x, y, z, this.o1k_1);
2436
+ return XYZColorSpace_0(this.p1k_1.p1l()).l1m(x, y, z, this.o1k_1);
1987
2437
  };
1988
2438
  protoOf(RGB).d1l = function () {
1989
2439
  var tmp$ret$3;
1990
2440
  $l$block: {
1991
2441
  // Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
1992
2442
  // Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
1993
- var $this$toSRGB = this.o1p(SRGB_getInstance());
2443
+ var $this$toSRGB = this.y1p(SRGB_getInstance());
1994
2444
  var r = $this$toSRGB.l1k_1;
1995
2445
  var g = $this$toSRGB.m1k_1;
1996
2446
  var b = $this$toSRGB.n1k_1;
@@ -2019,8 +2469,25 @@
2019
2469
  }
2020
2470
  return tmp$ret$3;
2021
2471
  };
2472
+ protoOf(RGB).e1l = function () {
2473
+ if (!equals(this.p1k_1, RGBColorSpaces_getInstance().w1m_1))
2474
+ return this.q1k().e1l();
2475
+ var r = this.p1k_1.y1o().h1p(this.l1k_1);
2476
+ var g = this.p1k_1.y1o().h1p(this.m1k_1);
2477
+ var b = this.p1k_1.y1o().h1p(this.n1k_1);
2478
+ var l = 0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b;
2479
+ var m = 0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b;
2480
+ var s = 0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b;
2481
+ // Inline function 'kotlin.math.cbrt' call
2482
+ var ll = Math.cbrt(l);
2483
+ // Inline function 'kotlin.math.cbrt' call
2484
+ var mm = Math.cbrt(m);
2485
+ // Inline function 'kotlin.math.cbrt' call
2486
+ var ss = Math.cbrt(s);
2487
+ return Oklab_init_$Create$(0.21045426 * ll + 0.7936178 * mm - 0.004072047 * ss, 1.9779985 * ll - 2.4285922 * mm + 0.4505937 * ss, 0.025904037 * ll + 0.78277177 * mm - 0.80867577 * ss, this.o1k_1);
2488
+ };
2022
2489
  protoOf(RGB).j1k = function () {
2023
- return this.o1p(RGBColorSpaces_getInstance().g1m_1);
2490
+ return this.y1p(RGBColorSpaces_getInstance().w1m_1);
2024
2491
  };
2025
2492
  protoOf(RGB).z2 = function () {
2026
2493
  // Inline function 'kotlin.floatArrayOf' call
@@ -2066,7 +2533,7 @@
2066
2533
  // Inline function 'kotlin.contracts.contract' call
2067
2534
  // Inline function 'com.github.ajalt.colormath.model.parseHex.<anonymous>' call
2068
2535
  var it = charSequenceGet(_this__u8e3s4, i_0);
2069
- var tmp$ret$1 = toString(it) + toString(it);
2536
+ var tmp$ret$1 = toString_0(it) + toString_0(it);
2070
2537
  tmp = toInt(tmp$ret$1, 16);
2071
2538
  }
2072
2539
  return tmp;
@@ -2094,7 +2561,7 @@
2094
2561
  if (!tmp$ret$0) {
2095
2562
  // Inline function 'com.github.ajalt.colormath.model.validateHex.<anonymous>.<anonymous>' call
2096
2563
  var message = 'Hex string must be in the format "#ffffff" or "ffffff"';
2097
- throw IllegalArgumentException_init_$Create$(toString_0(message));
2564
+ throw IllegalArgumentException_init_$Create$(toString(message));
2098
2565
  }
2099
2566
  return _this__u8e3s4;
2100
2567
  }
@@ -2151,20 +2618,48 @@
2151
2618
  return ACES_AP1_B;
2152
2619
  }
2153
2620
  var ACES_AP1_B;
2621
+ function RGBColorSpaces$SRGB$lambda($this$$receiver, it) {
2622
+ return it.j1k();
2623
+ }
2624
+ function RGBColorSpaces$BT2020$lambda($this$$receiver, color) {
2625
+ var tmp;
2626
+ if (color instanceof RGB) {
2627
+ tmp = color.y1p($this$$receiver);
2628
+ } else {
2629
+ if (color instanceof ICtCp) {
2630
+ tmp = color.x1o();
2631
+ } else {
2632
+ tmp = color.q1k().z1p($this$$receiver);
2633
+ }
2634
+ }
2635
+ return tmp;
2636
+ }
2154
2637
  function RGBColorSpaces() {
2155
2638
  RGBColorSpaces_instance = this;
2156
- this.g1m_1 = SRGB_getInstance();
2157
- this.h1m_1 = RGBColorSpace_0('Linear sRGB', Illuminant_getInstance().v1n_1, LinearTransferFunctions_instance, get_SRGB_R(), get_SRGB_G(), get_SRGB_B());
2158
- this.i1m_1 = RGBColorSpace_0('ACES2065-1', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP0_R(), get_ACES_AP0_G(), get_ACES_AP0_B());
2159
- this.j1m_1 = RGBColorSpace_0('ACEScc', get_ACES_WHITE_POINT(), ACESccTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
2160
- this.k1m_1 = RGBColorSpace_0('ACEScct', get_ACES_WHITE_POINT(), ACEScctTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
2161
- this.l1m_1 = RGBColorSpace_0('ACEScg', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
2162
- this.m1m_1 = RGBColorSpace_0('Adobe RGB', Illuminant_getInstance().v1n_1, new GammaTransferFunctions(2.19921875), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.21, 0.71), xyY_init_$Create$(0.15, 0.06));
2163
- this.n1m_1 = BT2020Space_getInstance();
2164
- this.o1m_1 = RGBColorSpace_0('BT.709', Illuminant_getInstance().v1n_1, BT709TransferFunctions_getInstance(), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.3, 0.6), xyY_init_$Create$(0.15, 0.06));
2165
- this.p1m_1 = RGBColorSpace_0('DCI P3', new WhitePoint('DCI P3', xyY_init_$Create$(0.314, 0.351)), new GammaTransferFunctions(2.6), xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
2166
- this.q1m_1 = RGBColorSpace_0('Display P3', Illuminant_getInstance().v1n_1, SRGBTransferFunctions_instance, xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
2167
- this.r1m_1 = RGBColorSpace_0('ROMM RGB', Illuminant_getInstance().t1n_1, ROMMTransferFunctions_instance, xyY_init_$Create$(0.7347, 0.2653), xyY_init_$Create$(0.1596, 0.8404), xyY_init_$Create$(0.0366, 1.0E-4));
2639
+ var tmp = this;
2640
+ var tmp_0 = Illuminant_getInstance().q1n_1;
2641
+ var tmp_1 = SRGBTransferFunctions_instance;
2642
+ var tmp_2 = get_SRGB_R();
2643
+ var tmp_3 = get_SRGB_G();
2644
+ var tmp_4 = get_SRGB_B();
2645
+ tmp.w1m_1 = new RGBColorSpaceImpl('sRGB', tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, RGBColorSpaces$SRGB$lambda);
2646
+ this.x1m_1 = RGBColorSpace_0('Linear sRGB', Illuminant_getInstance().q1n_1, LinearTransferFunctions_instance, get_SRGB_R(), get_SRGB_G(), get_SRGB_B());
2647
+ this.y1m_1 = RGBColorSpace_0('ACES2065-1', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP0_R(), get_ACES_AP0_G(), get_ACES_AP0_B());
2648
+ this.z1m_1 = RGBColorSpace_0('ACEScc', get_ACES_WHITE_POINT(), ACESccTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
2649
+ this.a1n_1 = RGBColorSpace_0('ACEScct', get_ACES_WHITE_POINT(), ACEScctTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
2650
+ this.b1n_1 = RGBColorSpace_0('ACEScg', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
2651
+ this.c1n_1 = RGBColorSpace_0('Adobe RGB', Illuminant_getInstance().q1n_1, new GammaTransferFunctions(2.19921875), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.21, 0.71), xyY_init_$Create$(0.15, 0.06));
2652
+ var tmp_5 = this;
2653
+ var tmp_6 = Illuminant_getInstance().q1n_1;
2654
+ var tmp_7 = BT2020TransferFunctions_getInstance();
2655
+ var tmp_8 = xyY_init_$Create$(0.708, 0.292);
2656
+ var tmp_9 = xyY_init_$Create$(0.17, 0.797);
2657
+ var tmp_10 = xyY_init_$Create$(0.131, 0.046);
2658
+ tmp_5.d1n_1 = new RGBColorSpaceImpl('BT.2020', tmp_6, tmp_7, tmp_8, tmp_9, tmp_10, RGBColorSpaces$BT2020$lambda);
2659
+ this.e1n_1 = RGBColorSpace_0('BT.709', Illuminant_getInstance().q1n_1, BT709TransferFunctions_getInstance(), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.3, 0.6), xyY_init_$Create$(0.15, 0.06));
2660
+ this.f1n_1 = RGBColorSpace_0('DCI P3', new WhitePoint('DCI P3', xyY_init_$Create$(0.314, 0.351)), new GammaTransferFunctions(2.6), xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
2661
+ this.g1n_1 = RGBColorSpace_0('Display P3', Illuminant_getInstance().q1n_1, SRGBTransferFunctions_instance, xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
2662
+ this.h1n_1 = RGBColorSpace_0('ROMM RGB', Illuminant_getInstance().o1n_1, ROMMTransferFunctions_instance, xyY_init_$Create$(0.7347, 0.2653), xyY_init_$Create$(0.1596, 0.8404), xyY_init_$Create$(0.0366, 1.0E-4));
2168
2663
  }
2169
2664
  var RGBColorSpaces_instance;
2170
2665
  function RGBColorSpaces_getInstance() {
@@ -2174,38 +2669,90 @@
2174
2669
  }
2175
2670
  function SRGB() {
2176
2671
  SRGB_instance = this;
2177
- this.b1o_1 = 'sRGB';
2178
- this.c1o_1 = rectangularComponentInfo('RGB');
2179
- this.d1o_1 = Illuminant_getInstance().v1n_1;
2180
- this.e1o_1 = SRGBTransferFunctions_instance;
2181
- this.f1o_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.d1o_1, get_SRGB_R(), get_SRGB_G(), get_SRGB_B()));
2182
- this.g1o_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.f1o_1)));
2672
+ this.q1o_1 = RGBColorSpaces_getInstance().w1m_1;
2183
2673
  }
2674
+ protoOf(SRGB).q1l = function () {
2675
+ return this.q1o_1.q1l();
2676
+ };
2677
+ protoOf(SRGB).x1p = function () {
2678
+ return this.q1o_1.x1p();
2679
+ };
2680
+ protoOf(SRGB).w1p = function () {
2681
+ return this.q1o_1.w1p();
2682
+ };
2184
2683
  protoOf(SRGB).pa = function () {
2185
- return this.b1o_1;
2684
+ return this.q1o_1.pa();
2186
2685
  };
2187
- protoOf(SRGB).g1l = function () {
2188
- return this.c1o_1;
2686
+ protoOf(SRGB).y1o = function () {
2687
+ return this.q1o_1.y1o();
2189
2688
  };
2190
- protoOf(SRGB).f1l = function () {
2191
- return this.d1o_1;
2689
+ protoOf(SRGB).p1l = function () {
2690
+ return this.q1o_1.p1l();
2192
2691
  };
2193
- protoOf(SRGB).p1o = function () {
2194
- return this.e1o_1;
2692
+ protoOf(SRGB).k1l = function (color) {
2693
+ return this.q1o_1.k1l(color);
2195
2694
  };
2196
- protoOf(SRGB).m1p = function () {
2197
- return this.f1o_1;
2695
+ protoOf(SRGB).r1l = function (components) {
2696
+ return this.q1o_1.r1l(components);
2198
2697
  };
2199
- protoOf(SRGB).n1p = function () {
2200
- return this.g1o_1;
2698
+ protoOf(SRGB).p1o = function (r, g, b, alpha) {
2699
+ return this.q1o_1.p1o(r, g, b, alpha);
2201
2700
  };
2202
- protoOf(SRGB).e1l = function (color) {
2203
- return color.j1k();
2701
+ protoOf(SRGB).l1m = function (r, g, b, alpha) {
2702
+ return this.q1o_1.l1m(r, g, b, alpha);
2204
2703
  };
2205
- protoOf(SRGB).h1l = function (components) {
2704
+ protoOf(SRGB).j1p = function (r, g, b, alpha) {
2705
+ return this.q1o_1.j1p(r, g, b, alpha);
2706
+ };
2707
+ protoOf(SRGB).k1m = function (hex) {
2708
+ return this.q1o_1.k1m(hex);
2709
+ };
2710
+ protoOf(SRGB).equals = function (other) {
2711
+ return equals(RGBColorSpaces_getInstance().w1m_1, other);
2712
+ };
2713
+ protoOf(SRGB).hashCode = function () {
2714
+ return hashCode(RGBColorSpaces_getInstance().w1m_1);
2715
+ };
2716
+ protoOf(SRGB).toString = function () {
2717
+ return 'sRGB';
2718
+ };
2719
+ var SRGB_instance;
2720
+ function SRGB_getInstance() {
2721
+ if (SRGB_instance == null)
2722
+ new SRGB();
2723
+ return SRGB_instance;
2724
+ }
2725
+ function RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b, convertImpl) {
2726
+ this.a1q_1 = name;
2727
+ this.b1q_1 = whitePoint;
2728
+ this.c1q_1 = transferFunctions;
2729
+ this.d1q_1 = r;
2730
+ this.e1q_1 = g;
2731
+ this.f1q_1 = b;
2732
+ this.g1q_1 = convertImpl;
2733
+ this.h1q_1 = zeroOneComponentInfo('RGB');
2734
+ this.i1q_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.b1q_1, this.d1q_1, this.e1q_1, this.f1q_1));
2735
+ this.j1q_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.i1q_1)));
2736
+ }
2737
+ protoOf(RGBColorSpaceImpl).pa = function () {
2738
+ return this.a1q_1;
2739
+ };
2740
+ protoOf(RGBColorSpaceImpl).p1l = function () {
2741
+ return this.b1q_1;
2742
+ };
2743
+ protoOf(RGBColorSpaceImpl).y1o = function () {
2744
+ return this.c1q_1;
2745
+ };
2746
+ protoOf(RGBColorSpaceImpl).q1l = function () {
2747
+ return this.h1q_1;
2748
+ };
2749
+ protoOf(RGBColorSpaceImpl).k1l = function (color) {
2750
+ return this.g1q_1(this, color);
2751
+ };
2752
+ protoOf(RGBColorSpaceImpl).r1l = function (components) {
2206
2753
  // Inline function 'com.github.ajalt.colormath.internal.doCreate' call
2207
2754
  // Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
2208
- var size = this.g1l().l();
2755
+ var size = this.q1l().l();
2209
2756
  // Inline function 'kotlin.require' call
2210
2757
  var containsLower = size - 1 | 0;
2211
2758
  var containsArg = components.length;
@@ -2213,7 +2760,7 @@
2213
2760
  if (!(containsLower <= containsArg ? containsArg <= size : false)) {
2214
2761
  // Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
2215
2762
  var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
2216
- throw IllegalArgumentException_init_$Create$(toString_0(message));
2763
+ throw IllegalArgumentException_init_$Create$(toString(message));
2217
2764
  }
2218
2765
  // Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
2219
2766
  var tmp = components[0];
@@ -2228,38 +2775,85 @@
2228
2775
  tmp_2 = 1.0;
2229
2776
  }
2230
2777
  var tmp$ret$2 = tmp_2;
2231
- return this.d1m(tmp, tmp_0, tmp_1, tmp$ret$2);
2778
+ return this.l1m(tmp, tmp_0, tmp_1, tmp$ret$2);
2232
2779
  };
2233
- protoOf(SRGB).toString = function () {
2234
- return this.b1o_1;
2780
+ protoOf(RGBColorSpaceImpl).w1p = function () {
2781
+ return this.i1q_1;
2235
2782
  };
2236
- protoOf(SRGB).d1m = function (r, g, b, alpha) {
2783
+ protoOf(RGBColorSpaceImpl).x1p = function () {
2784
+ return this.j1q_1;
2785
+ };
2786
+ protoOf(RGBColorSpaceImpl).toString = function () {
2787
+ return this.a1q_1;
2788
+ };
2789
+ protoOf(RGBColorSpaceImpl).l1m = function (r, g, b, alpha) {
2237
2790
  return new RGB(r, g, b, alpha, this);
2238
2791
  };
2239
- var SRGB_instance;
2240
- function SRGB_getInstance() {
2241
- if (SRGB_instance == null)
2242
- new SRGB();
2243
- return SRGB_instance;
2792
+ protoOf(RGBColorSpaceImpl).equals = function (other) {
2793
+ if (this === other)
2794
+ return true;
2795
+ if (!(!(other == null) ? isInterface(other, RGBColorSpace) : false))
2796
+ return false;
2797
+ if (!(this.a1q_1 === other.pa()))
2798
+ return false;
2799
+ if (!this.b1q_1.equals(other.p1l()))
2800
+ return false;
2801
+ if (!equals(this.c1q_1, other.y1o()))
2802
+ return false;
2803
+ if (other instanceof RGBColorSpaceImpl) {
2804
+ if (!this.d1q_1.equals(other.d1q_1))
2805
+ return false;
2806
+ if (!this.e1q_1.equals(other.e1q_1))
2807
+ return false;
2808
+ if (!this.f1q_1.equals(other.f1q_1))
2809
+ return false;
2810
+ } else {
2811
+ if (!contentEquals(this.i1q_1, other.w1p()))
2812
+ return false;
2813
+ if (!contentEquals(this.j1q_1, other.x1p()))
2814
+ return false;
2815
+ }
2816
+ return true;
2817
+ };
2818
+ protoOf(RGBColorSpaceImpl).hashCode = function () {
2819
+ var result = getStringHashCode(this.a1q_1);
2820
+ result = imul(31, result) + this.b1q_1.hashCode() | 0;
2821
+ result = imul(31, result) + hashCode(this.c1q_1) | 0;
2822
+ result = imul(31, result) + this.d1q_1.hashCode() | 0;
2823
+ result = imul(31, result) + this.e1q_1.hashCode() | 0;
2824
+ result = imul(31, result) + this.f1q_1.hashCode() | 0;
2825
+ return result;
2826
+ };
2827
+ function SRGBTransferFunctions() {
2828
+ }
2829
+ protoOf(SRGBTransferFunctions).i1p = function (x) {
2830
+ return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x, 0.4166666666666667) - 0.055;
2831
+ };
2832
+ protoOf(SRGBTransferFunctions).h1p = function (x) {
2833
+ return x <= 0.04045 ? x / 12.92 : spow_0((x + 0.055) / 1.055, 2.4);
2834
+ };
2835
+ var SRGBTransferFunctions_instance;
2836
+ function SRGBTransferFunctions_getInstance() {
2837
+ return SRGBTransferFunctions_instance;
2244
2838
  }
2245
2839
  function RGBColorSpace_0(name, whitePoint, transferFunctions, r, g, b) {
2246
2840
  _init_properties_RGBColorSpaces_kt__nc9fsz();
2247
- return new RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b);
2841
+ return new RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b, RGBColorSpace$lambda);
2248
2842
  }
2249
2843
  function ACESccTransferFunctions() {
2250
2844
  ACESccTransferFunctions_instance = this;
2251
- this.q1p_1 = 3.0517578125E-5;
2252
- this.r1p_1 = 1.52587890625E-5;
2253
- this.s1p_1 = -0.3013698630136986;
2845
+ this.k1q_1 = 3.0517578125E-5;
2846
+ this.l1q_1 = 1.52587890625E-5;
2847
+ this.m1q_1 = -0.3013698630136986;
2254
2848
  var tmp = this;
2255
2849
  // Inline function 'kotlin.math.log2' call
2256
- tmp.t1p_1 = (log2(65504.0) + 9.72) / 17.52;
2850
+ tmp.n1q_1 = (log2(65504.0) + 9.72) / 17.52;
2257
2851
  }
2258
- protoOf(ACESccTransferFunctions).y1o = function (x) {
2852
+ protoOf(ACESccTransferFunctions).h1p = function (x) {
2259
2853
  var tmp;
2260
2854
  if (x <= -0.3013698630136986) {
2261
2855
  tmp = (spow_0(2.0, x * 17.52 - 9.72) - 1.52587890625E-5) * 2.0;
2262
- } else if (x < this.t1p_1) {
2856
+ } else if (x < this.n1q_1) {
2263
2857
  // Inline function 'kotlin.math.pow' call
2264
2858
  var x_0 = x * 17.52 - 9.72;
2265
2859
  tmp = Math.pow(2.0, x_0);
@@ -2268,11 +2862,11 @@
2268
2862
  }
2269
2863
  return tmp;
2270
2864
  };
2271
- protoOf(ACESccTransferFunctions).z1o = function (x) {
2865
+ protoOf(ACESccTransferFunctions).i1p = function (x) {
2272
2866
  var tmp;
2273
2867
  if (x < 3.0517578125E-5) {
2274
2868
  // Inline function 'kotlin.math.log2' call
2275
- var x_0 = 1.52587890625E-5 + coerceAtLeast(x, 0.0) / 2.0;
2869
+ var x_0 = 1.52587890625E-5 + coerceAtLeast_0(x, 0.0) / 2.0;
2276
2870
  tmp = (log2(x_0) + 9.72) / 17.52;
2277
2871
  } else {
2278
2872
  // Inline function 'kotlin.math.log2' call
@@ -2288,17 +2882,17 @@
2288
2882
  }
2289
2883
  function ACEScctTransferFunctions() {
2290
2884
  ACEScctTransferFunctions_instance = this;
2291
- this.u1p_1 = 10.5402377416545;
2292
- this.v1p_1 = 0.0729055341958355;
2885
+ this.o1q_1 = 10.5402377416545;
2886
+ this.p1q_1 = 0.0729055341958355;
2293
2887
  var tmp = this;
2294
2888
  // Inline function 'kotlin.math.log2' call
2295
- tmp.w1p_1 = (log2(65504.0) + 9.72) / 17.52;
2889
+ tmp.q1q_1 = (log2(65504.0) + 9.72) / 17.52;
2296
2890
  }
2297
- protoOf(ACEScctTransferFunctions).y1o = function (x) {
2891
+ protoOf(ACEScctTransferFunctions).h1p = function (x) {
2298
2892
  var tmp;
2299
2893
  if (x <= 0.155251141552511) {
2300
2894
  tmp = (x - 0.0729055341958355) / 10.5402377416545;
2301
- } else if (x < this.w1p_1) {
2895
+ } else if (x < this.q1q_1) {
2302
2896
  // Inline function 'kotlin.math.pow' call
2303
2897
  var x_0 = x * 17.52 - 9.72;
2304
2898
  tmp = Math.pow(2.0, x_0);
@@ -2307,7 +2901,7 @@
2307
2901
  }
2308
2902
  return tmp;
2309
2903
  };
2310
- protoOf(ACEScctTransferFunctions).z1o = function (x) {
2904
+ protoOf(ACEScctTransferFunctions).i1p = function (x) {
2311
2905
  var tmp;
2312
2906
  if (x < 0.0078125) {
2313
2907
  tmp = 10.5402377416545 * x + 0.0729055341958355;
@@ -2323,94 +2917,34 @@
2323
2917
  new ACEScctTransferFunctions();
2324
2918
  return ACEScctTransferFunctions_instance;
2325
2919
  }
2326
- function BT2020Space() {
2327
- BT2020Space_instance = this;
2328
- this.x1p_1 = 'BT.2020';
2329
- this.y1p_1 = rectangularComponentInfo('RGB');
2330
- this.z1p_1 = Illuminant_getInstance().v1n_1;
2331
- this.a1q_1 = BT2020TransferFunctions_getInstance();
2332
- this.b1q_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.z1p_1, xyY_init_$Create$(0.708, 0.292), xyY_init_$Create$(0.17, 0.797), xyY_init_$Create$(0.131, 0.046)));
2333
- this.c1q_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.b1q_1)));
2920
+ function BT2020TransferFunctions() {
2921
+ BT2020TransferFunctions_instance = this;
2922
+ this.r1q_1 = 1.0993;
2923
+ this.s1q_1 = 0.0181;
2924
+ var tmp = this;
2925
+ // Inline function 'kotlin.math.pow' call
2926
+ tmp.t1q_1 = 1.0993 * Math.pow(0.0181, 0.45) - 0.09929999999999994;
2334
2927
  }
2335
- protoOf(BT2020Space).pa = function () {
2336
- return this.x1p_1;
2337
- };
2338
- protoOf(BT2020Space).g1l = function () {
2339
- return this.y1p_1;
2340
- };
2341
- protoOf(BT2020Space).f1l = function () {
2342
- return this.z1p_1;
2343
- };
2344
- protoOf(BT2020Space).p1o = function () {
2345
- return this.a1q_1;
2346
- };
2347
- protoOf(BT2020Space).d1m = function (r, g, b, alpha) {
2348
- return new RGB(r, g, b, alpha, this);
2349
- };
2350
- protoOf(BT2020Space).e1l = function (color) {
2351
- var tmp;
2352
- if (color instanceof RGB) {
2353
- tmp = color.o1p(this);
2354
- } else {
2355
- if (color instanceof ICtCp) {
2356
- tmp = color.o1o();
2357
- } else {
2358
- tmp = color.q1k().p1p(this);
2359
- }
2360
- }
2361
- return tmp;
2928
+ protoOf(BT2020TransferFunctions).h1p = function (x) {
2929
+ return numberToDouble(x < this.t1q_1 ? x / 4.5 : spow_0((x + 0.09929999999999994) / 1.0993, 2.2222222222222223));
2362
2930
  };
2363
- protoOf(BT2020Space).h1l = function (components) {
2364
- // Inline function 'com.github.ajalt.colormath.internal.doCreate' call
2365
- // Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
2366
- var size = this.g1l().l();
2367
- // Inline function 'kotlin.require' call
2368
- var containsLower = size - 1 | 0;
2369
- var containsArg = components.length;
2370
- // Inline function 'kotlin.contracts.contract' call
2371
- if (!(containsLower <= containsArg ? containsArg <= size : false)) {
2372
- // Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
2373
- var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
2374
- throw IllegalArgumentException_init_$Create$(toString_0(message));
2375
- }
2376
- // Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
2377
- var tmp = components[0];
2378
- var tmp_0 = components[1];
2379
- var tmp_1 = components[2];
2380
- // Inline function 'kotlin.collections.getOrElse' call
2381
- var tmp_2;
2382
- if (3 >= 0 ? 3 <= get_lastIndex_0(components) : false) {
2383
- tmp_2 = components[3];
2384
- } else {
2385
- // Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
2386
- tmp_2 = 1.0;
2387
- }
2388
- var tmp$ret$2 = tmp_2;
2389
- return this.d1m(tmp, tmp_0, tmp_1, tmp$ret$2);
2390
- };
2391
- protoOf(BT2020Space).m1p = function () {
2392
- return this.b1q_1;
2393
- };
2394
- protoOf(BT2020Space).n1p = function () {
2395
- return this.c1q_1;
2396
- };
2397
- protoOf(BT2020Space).toString = function () {
2398
- return this.x1p_1;
2931
+ protoOf(BT2020TransferFunctions).i1p = function (x) {
2932
+ return x < 0.0181 ? 4.5 * x : 1.0993 * spow(x, 0.45) - 0.09929999999999994;
2399
2933
  };
2400
- var BT2020Space_instance;
2401
- function BT2020Space_getInstance() {
2402
- if (BT2020Space_instance == null)
2403
- new BT2020Space();
2404
- return BT2020Space_instance;
2934
+ var BT2020TransferFunctions_instance;
2935
+ function BT2020TransferFunctions_getInstance() {
2936
+ if (BT2020TransferFunctions_instance == null)
2937
+ new BT2020TransferFunctions();
2938
+ return BT2020TransferFunctions_instance;
2405
2939
  }
2406
2940
  function BT709TransferFunctions() {
2407
2941
  BT709TransferFunctions_instance = this;
2408
- this.d1q_1 = 1.099 * spow_0(0.018, 0.45) - 0.099;
2942
+ this.u1q_1 = 1.099 * spow_0(0.018, 0.45) - 0.099;
2409
2943
  }
2410
- protoOf(BT709TransferFunctions).y1o = function (x) {
2411
- return numberToDouble(x < this.d1q_1 ? x / 4.5 : spow_0((x + 0.099) / 1.099, 2.2222222222222223));
2944
+ protoOf(BT709TransferFunctions).h1p = function (x) {
2945
+ return numberToDouble(x < this.u1q_1 ? x / 4.5 : spow_0((x + 0.099) / 1.099, 2.2222222222222223));
2412
2946
  };
2413
- protoOf(BT709TransferFunctions).z1o = function (x) {
2947
+ protoOf(BT709TransferFunctions).i1p = function (x) {
2414
2948
  return x < 0.018 ? 4.5 * x : 1.099 * spow(x, 0.45) - 0.099;
2415
2949
  };
2416
2950
  var BT709TransferFunctions_instance;
@@ -2419,25 +2953,13 @@
2419
2953
  new BT709TransferFunctions();
2420
2954
  return BT709TransferFunctions_instance;
2421
2955
  }
2422
- function SRGBTransferFunctions() {
2423
- }
2424
- protoOf(SRGBTransferFunctions).z1o = function (x) {
2425
- return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x, 0.4166666666666667) - 0.055;
2426
- };
2427
- protoOf(SRGBTransferFunctions).y1o = function (x) {
2428
- return x <= 0.04045 ? x / 12.92 : spow_0((x + 0.055) / 1.055, 2.4);
2429
- };
2430
- var SRGBTransferFunctions_instance;
2431
- function SRGBTransferFunctions_getInstance() {
2432
- return SRGBTransferFunctions_instance;
2433
- }
2434
2956
  function ROMMTransferFunctions() {
2435
- this.e1q_1 = 0.001953;
2957
+ this.v1q_1 = 0.001953;
2436
2958
  }
2437
- protoOf(ROMMTransferFunctions).y1o = function (x) {
2959
+ protoOf(ROMMTransferFunctions).h1p = function (x) {
2438
2960
  return x < 0.031248 ? x / 16.0 : spow(x, 1.8);
2439
2961
  };
2440
- protoOf(ROMMTransferFunctions).z1o = function (x) {
2962
+ protoOf(ROMMTransferFunctions).i1p = function (x) {
2441
2963
  return x < 0.001953 ? x * 16.0 : spow(x, 0.5555555555555556);
2442
2964
  };
2443
2965
  var ROMMTransferFunctions_instance;
@@ -2446,139 +2968,28 @@
2446
2968
  }
2447
2969
  function rgbToXyzMatrix(whitePoint, r, g, b) {
2448
2970
  _init_properties_RGBColorSpaces_kt__nc9fsz();
2449
- var primaries = _Matrix___init__impl__q3kp4w_0(r.c1p_1, g.c1p_1, b.c1p_1, r.d1p_1, g.d1p_1, b.d1p_1, r.f1q(), g.f1q(), b.f1q());
2450
- var wp = whitePoint.p1n_1;
2971
+ var primaries = _Matrix___init__impl__q3kp4w_0(r.l1p_1, g.l1p_1, b.l1p_1, r.m1p_1, g.m1p_1, b.m1p_1, r.w1q(), g.w1q(), b.w1q());
2972
+ var wp = whitePoint.n1o_1;
2451
2973
  // Inline function 'com.github.ajalt.colormath.internal.dot' call
2452
2974
  var this_0 = inverse(primaries);
2453
- var v0 = wp.f1p();
2454
- var v1 = wp.e1p_1;
2455
- var v2 = wp.g1p();
2975
+ var v0 = wp.o1p();
2976
+ var v1 = wp.n1p_1;
2977
+ var v2 = wp.p1p();
2456
2978
  // Inline function 'com.github.ajalt.colormath.model.rgbToXyzMatrix.<anonymous>' call
2457
2979
  var x = Matrix__get_impl_xogbpk(this_0, 0, 0) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 0) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 0) * v2;
2458
2980
  var y = Matrix__get_impl_xogbpk(this_0, 0, 1) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 1) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 1) * v2;
2459
2981
  var z = Matrix__get_impl_xogbpk(this_0, 0, 2) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 2) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 2) * v2;
2460
2982
  return dotDiagonal(primaries, x, y, z);
2461
2983
  }
2462
- function RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b) {
2463
- this.g1q_1 = name;
2464
- this.h1q_1 = whitePoint;
2465
- this.i1q_1 = transferFunctions;
2466
- this.j1q_1 = r;
2467
- this.k1q_1 = g;
2468
- this.l1q_1 = b;
2469
- this.m1q_1 = rectangularComponentInfo('RGB');
2470
- this.n1q_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.h1q_1, this.j1q_1, this.k1q_1, this.l1q_1));
2471
- this.o1q_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.n1q_1)));
2472
- }
2473
- protoOf(RGBColorSpaceImpl).pa = function () {
2474
- return this.g1q_1;
2475
- };
2476
- protoOf(RGBColorSpaceImpl).f1l = function () {
2477
- return this.h1q_1;
2478
- };
2479
- protoOf(RGBColorSpaceImpl).p1o = function () {
2480
- return this.i1q_1;
2481
- };
2482
- protoOf(RGBColorSpaceImpl).g1l = function () {
2483
- return this.m1q_1;
2484
- };
2485
- protoOf(RGBColorSpaceImpl).e1l = function (color) {
2984
+ function RGBColorSpace$lambda($this$$receiver, color) {
2985
+ _init_properties_RGBColorSpaces_kt__nc9fsz();
2486
2986
  var tmp;
2487
2987
  if (color instanceof RGB) {
2488
- tmp = color.o1p(this);
2988
+ tmp = color.y1p($this$$receiver);
2489
2989
  } else {
2490
- tmp = color.q1k().p1p(this);
2990
+ tmp = color.q1k().z1p($this$$receiver);
2491
2991
  }
2492
2992
  return tmp;
2493
- };
2494
- protoOf(RGBColorSpaceImpl).h1l = function (components) {
2495
- // Inline function 'com.github.ajalt.colormath.internal.doCreate' call
2496
- // Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
2497
- var size = this.g1l().l();
2498
- // Inline function 'kotlin.require' call
2499
- var containsLower = size - 1 | 0;
2500
- var containsArg = components.length;
2501
- // Inline function 'kotlin.contracts.contract' call
2502
- if (!(containsLower <= containsArg ? containsArg <= size : false)) {
2503
- // Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
2504
- var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
2505
- throw IllegalArgumentException_init_$Create$(toString_0(message));
2506
- }
2507
- // Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
2508
- var tmp = components[0];
2509
- var tmp_0 = components[1];
2510
- var tmp_1 = components[2];
2511
- // Inline function 'kotlin.collections.getOrElse' call
2512
- var tmp_2;
2513
- if (3 >= 0 ? 3 <= get_lastIndex_0(components) : false) {
2514
- tmp_2 = components[3];
2515
- } else {
2516
- // Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
2517
- tmp_2 = 1.0;
2518
- }
2519
- var tmp$ret$2 = tmp_2;
2520
- return this.d1m(tmp, tmp_0, tmp_1, tmp$ret$2);
2521
- };
2522
- protoOf(RGBColorSpaceImpl).m1p = function () {
2523
- return this.n1q_1;
2524
- };
2525
- protoOf(RGBColorSpaceImpl).n1p = function () {
2526
- return this.o1q_1;
2527
- };
2528
- protoOf(RGBColorSpaceImpl).toString = function () {
2529
- return this.g1q_1;
2530
- };
2531
- protoOf(RGBColorSpaceImpl).d1m = function (r, g, b, alpha) {
2532
- return new RGB(r, g, b, alpha, this);
2533
- };
2534
- protoOf(RGBColorSpaceImpl).hashCode = function () {
2535
- var result = getStringHashCode(this.g1q_1);
2536
- result = imul(result, 31) + this.h1q_1.hashCode() | 0;
2537
- result = imul(result, 31) + hashCode(this.i1q_1) | 0;
2538
- result = imul(result, 31) + this.j1q_1.hashCode() | 0;
2539
- result = imul(result, 31) + this.k1q_1.hashCode() | 0;
2540
- result = imul(result, 31) + this.l1q_1.hashCode() | 0;
2541
- return result;
2542
- };
2543
- protoOf(RGBColorSpaceImpl).equals = function (other) {
2544
- if (this === other)
2545
- return true;
2546
- if (!(other instanceof RGBColorSpaceImpl))
2547
- return false;
2548
- var tmp0_other_with_cast = other instanceof RGBColorSpaceImpl ? other : THROW_CCE();
2549
- if (!(this.g1q_1 === tmp0_other_with_cast.g1q_1))
2550
- return false;
2551
- if (!this.h1q_1.equals(tmp0_other_with_cast.h1q_1))
2552
- return false;
2553
- if (!equals(this.i1q_1, tmp0_other_with_cast.i1q_1))
2554
- return false;
2555
- if (!this.j1q_1.equals(tmp0_other_with_cast.j1q_1))
2556
- return false;
2557
- if (!this.k1q_1.equals(tmp0_other_with_cast.k1q_1))
2558
- return false;
2559
- if (!this.l1q_1.equals(tmp0_other_with_cast.l1q_1))
2560
- return false;
2561
- return true;
2562
- };
2563
- function BT2020TransferFunctions() {
2564
- BT2020TransferFunctions_instance = this;
2565
- this.p1q_1 = 1.0993;
2566
- this.q1q_1 = 0.0181;
2567
- var tmp = this;
2568
- // Inline function 'kotlin.math.pow' call
2569
- tmp.r1q_1 = 1.0993 * Math.pow(0.0181, 0.45) - 0.09929999999999994;
2570
- }
2571
- protoOf(BT2020TransferFunctions).y1o = function (x) {
2572
- return numberToDouble(x < this.r1q_1 ? x / 4.5 : spow_0((x + 0.09929999999999994) / 1.0993, 2.2222222222222223));
2573
- };
2574
- protoOf(BT2020TransferFunctions).z1o = function (x) {
2575
- return x < 0.0181 ? 4.5 * x : 1.0993 * spow(x, 0.45) - 0.09929999999999994;
2576
- };
2577
- var BT2020TransferFunctions_instance;
2578
- function BT2020TransferFunctions_getInstance() {
2579
- if (BT2020TransferFunctions_instance == null)
2580
- new BT2020TransferFunctions();
2581
- return BT2020TransferFunctions_instance;
2582
2993
  }
2583
2994
  var properties_initialized_RGBColorSpaces_kt_fsnpad;
2584
2995
  function _init_properties_RGBColorSpaces_kt__nc9fsz() {
@@ -2690,41 +3101,47 @@
2690
3101
  var this_2 = _UInt___get_data__impl__f0vqqw(this_1);
2691
3102
  return _UByte___init__impl__g9hnc4(toByte(this_2));
2692
3103
  }
2693
- function Companion_5() {
2694
- Companion_instance_6 = this;
2695
- this.s1q_1 = XYZColorSpaces_getInstance().s1m_1;
3104
+ function Companion_7() {
3105
+ Companion_instance_8 = this;
3106
+ this.u1p_1 = XYZColorSpaces_getInstance().i1n_1;
2696
3107
  }
2697
- protoOf(Companion_5).g1l = function () {
2698
- return this.s1q_1.g1l();
3108
+ protoOf(Companion_7).q1l = function () {
3109
+ return this.u1p_1.q1l();
2699
3110
  };
2700
- protoOf(Companion_5).pa = function () {
2701
- return this.s1q_1.pa();
3111
+ protoOf(Companion_7).pa = function () {
3112
+ return this.u1p_1.pa();
2702
3113
  };
2703
- protoOf(Companion_5).f1l = function () {
2704
- return this.s1q_1.f1l();
3114
+ protoOf(Companion_7).p1l = function () {
3115
+ return this.u1p_1.p1l();
2705
3116
  };
2706
- protoOf(Companion_5).e1l = function (color) {
2707
- return this.s1q_1.e1l(color);
3117
+ protoOf(Companion_7).k1l = function (color) {
3118
+ return this.u1p_1.k1l(color);
2708
3119
  };
2709
- protoOf(Companion_5).h1l = function (components) {
2710
- return this.s1q_1.h1l(components);
3120
+ protoOf(Companion_7).r1l = function (components) {
3121
+ return this.u1p_1.r1l(components);
2711
3122
  };
2712
- protoOf(Companion_5).d1m = function (x, y, z, alpha) {
2713
- return this.s1q_1.d1m(x, y, z, alpha);
3123
+ protoOf(Companion_7).l1m = function (x, y, z, alpha) {
3124
+ return this.u1p_1.l1m(x, y, z, alpha);
2714
3125
  };
2715
- protoOf(Companion_5).a1p = function (x, y, z, alpha) {
2716
- return this.s1q_1.a1p(x, y, z, alpha);
3126
+ protoOf(Companion_7).j1p = function (x, y, z, alpha) {
3127
+ return this.u1p_1.j1p(x, y, z, alpha);
2717
3128
  };
2718
- var Companion_instance_6;
2719
- function Companion_getInstance_5() {
2720
- if (Companion_instance_6 == null)
2721
- new Companion_5();
2722
- return Companion_instance_6;
3129
+ protoOf(Companion_7).hashCode = function () {
3130
+ return hashCode(XYZColorSpaces_getInstance().i1n_1);
3131
+ };
3132
+ protoOf(Companion_7).equals = function (other) {
3133
+ return equals(XYZColorSpaces_getInstance().i1n_1, other);
3134
+ };
3135
+ var Companion_instance_8;
3136
+ function Companion_getInstance_7() {
3137
+ if (Companion_instance_8 == null)
3138
+ new Companion_7();
3139
+ return Companion_instance_8;
2723
3140
  }
2724
3141
  function adaptToM($this, space, m, mi) {
2725
- if (space.f1l().equals($this.w1k_1.f1l()))
3142
+ if (space.p1l().equals($this.w1k_1.p1l()))
2726
3143
  return $this;
2727
- var transform = chromaticAdaptationMatrix(space, $this.w1k_1.f1l().p1n_1, m, mi);
3144
+ var transform = chromaticAdaptationMatrix(space, $this.w1k_1.p1l().n1o_1, m, mi);
2728
3145
  // Inline function 'com.github.ajalt.colormath.internal.dot' call
2729
3146
  var v0 = $this.s1k_1;
2730
3147
  var v1 = $this.t1k_1;
@@ -2733,7 +3150,7 @@
2733
3150
  var xx = Matrix__get_impl_xogbpk(transform, 0, 0) * v0 + Matrix__get_impl_xogbpk(transform, 1, 0) * v1 + Matrix__get_impl_xogbpk(transform, 2, 0) * v2;
2734
3151
  var yy = Matrix__get_impl_xogbpk(transform, 0, 1) * v0 + Matrix__get_impl_xogbpk(transform, 1, 1) * v1 + Matrix__get_impl_xogbpk(transform, 2, 1) * v2;
2735
3152
  var zz = Matrix__get_impl_xogbpk(transform, 0, 2) * v0 + Matrix__get_impl_xogbpk(transform, 1, 2) * v1 + Matrix__get_impl_xogbpk(transform, 2, 2) * v2;
2736
- return space.d1m(xx, yy, zz, $this.v1k_1);
3153
+ return space.l1m(xx, yy, zz, $this.v1k_1);
2737
3154
  }
2738
3155
  function toLAB$f(t) {
2739
3156
  var tmp;
@@ -2746,7 +3163,7 @@
2746
3163
  return tmp;
2747
3164
  }
2748
3165
  function XYZ(x, y, z, alpha, space) {
2749
- Companion_getInstance_5();
3166
+ Companion_getInstance_7();
2750
3167
  this.s1k_1 = x;
2751
3168
  this.t1k_1 = y;
2752
3169
  this.u1k_1 = z;
@@ -2759,34 +3176,62 @@
2759
3176
  protoOf(XYZ).i1k = function () {
2760
3177
  return this.w1k_1;
2761
3178
  };
2762
- protoOf(XYZ).u1m = function (space) {
3179
+ protoOf(XYZ).k1n = function (space) {
2763
3180
  return adaptToM(this, space, get_CAT02_XYZ_TO_LMS(), get_CAT02_LMS_TO_XYZ());
2764
3181
  };
2765
- protoOf(XYZ).p1p = function (space) {
2766
- var tmp0_container = this.u1m(XYZColorSpace_0(space.f1l()));
3182
+ protoOf(XYZ).z1p = function (space) {
3183
+ var tmp0_container = this.k1n(XYZColorSpace_0(space.p1l()));
2767
3184
  var x = tmp0_container.pe();
2768
3185
  var y = tmp0_container.qe();
2769
- var z = tmp0_container.t1q();
2770
- var f = space.p1o();
3186
+ var z = tmp0_container.x1q();
3187
+ var f = space.y1o();
2771
3188
  // Inline function 'com.github.ajalt.colormath.internal.dot' call
2772
- var this_0 = _Matrix___init__impl__q3kp4w(space.n1p());
3189
+ var this_0 = _Matrix___init__impl__q3kp4w(space.x1p());
2773
3190
  // Inline function 'com.github.ajalt.colormath.model.XYZ.toRGB.<anonymous>' call
2774
3191
  var r = Matrix__get_impl_xogbpk(this_0, 0, 0) * x + Matrix__get_impl_xogbpk(this_0, 1, 0) * y + Matrix__get_impl_xogbpk(this_0, 2, 0) * z;
2775
3192
  var g = Matrix__get_impl_xogbpk(this_0, 0, 1) * x + Matrix__get_impl_xogbpk(this_0, 1, 1) * y + Matrix__get_impl_xogbpk(this_0, 2, 1) * z;
2776
3193
  var b = Matrix__get_impl_xogbpk(this_0, 0, 2) * x + Matrix__get_impl_xogbpk(this_0, 1, 2) * y + Matrix__get_impl_xogbpk(this_0, 2, 2) * z;
2777
- return space.d1m(f.z1o(r), f.z1o(g), f.z1o(b), this.v1k_1);
3194
+ return space.l1m(f.i1p(r), f.i1p(g), f.i1p(b), this.v1k_1);
2778
3195
  };
2779
3196
  protoOf(XYZ).j1k = function () {
2780
- return this.p1p(RGBColorSpaces_getInstance().g1m_1);
3197
+ return this.z1p(RGBColorSpaces_getInstance().w1m_1);
2781
3198
  };
2782
3199
  protoOf(XYZ).r1k = function () {
2783
- var fx = toLAB$f(this.s1k_1 / this.w1k_1.f1l().p1n_1.f1p());
2784
- var fy = toLAB$f(this.t1k_1 / this.w1k_1.f1l().p1n_1.e1p_1);
2785
- var fz = toLAB$f(this.u1k_1 / this.w1k_1.f1l().p1n_1.g1p());
3200
+ var fx = toLAB$f(this.s1k_1 / this.w1k_1.p1l().n1o_1.o1p());
3201
+ var fy = toLAB$f(this.t1k_1 / this.w1k_1.p1l().n1o_1.n1p_1);
3202
+ var fz = toLAB$f(this.u1k_1 / this.w1k_1.p1l().n1o_1.p1p());
2786
3203
  var l = 116 * fy - 16;
2787
3204
  var a = 500 * (fx - fy);
2788
3205
  var b = 200 * (fy - fz);
2789
- return LABColorSpace_0(this.w1k_1.f1l()).a1p(l, a, b, this.v1k_1);
3206
+ return LABColorSpace_0(this.w1k_1.p1l()).j1p(l, a, b, this.v1k_1);
3207
+ };
3208
+ protoOf(XYZ).e1l = function () {
3209
+ // Inline function 'com.github.ajalt.colormath.model.XYZ.toD65' call
3210
+ var tmp;
3211
+ if (equals(this.w1k_1, XYZColorSpaces_getInstance().i1n_1)) {
3212
+ var l = 0.8189330101 * this.s1k_1 + 0.3618667424 * this.t1k_1 - 0.1288597137 * this.u1k_1;
3213
+ var m = 0.0329845436 * this.s1k_1 + 0.9293118715 * this.t1k_1 + 0.0361456387 * this.u1k_1;
3214
+ var s = 0.0482003018 * this.s1k_1 + 0.2643662691 * this.t1k_1 + 0.633851707 * this.u1k_1;
3215
+ // Inline function 'kotlin.math.cbrt' call
3216
+ var ll = Math.cbrt(l);
3217
+ // Inline function 'kotlin.math.cbrt' call
3218
+ var mm = Math.cbrt(m);
3219
+ // Inline function 'kotlin.math.cbrt' call
3220
+ var ss = Math.cbrt(s);
3221
+ return Oklab_init_$Create$(0.2104542553 * ll + 0.793617785 * mm - 0.0040720468 * ss, 1.9779984951 * ll - 2.428592205 * mm + 0.4505937099 * ss, 0.0259040371 * ll + 0.7827717662 * mm - 0.808675766 * ss, this.v1k_1);
3222
+ } else {
3223
+ var $this$toD65 = this.k1n(XYZColorSpaces_getInstance().i1n_1);
3224
+ var l_0 = 0.8189330101 * $this$toD65.s1k_1 + 0.3618667424 * $this$toD65.t1k_1 - 0.1288597137 * $this$toD65.u1k_1;
3225
+ var m_0 = 0.0329845436 * $this$toD65.s1k_1 + 0.9293118715 * $this$toD65.t1k_1 + 0.0361456387 * $this$toD65.u1k_1;
3226
+ var s_0 = 0.0482003018 * $this$toD65.s1k_1 + 0.2643662691 * $this$toD65.t1k_1 + 0.633851707 * $this$toD65.u1k_1;
3227
+ // Inline function 'kotlin.math.cbrt' call
3228
+ var ll_0 = Math.cbrt(l_0);
3229
+ // Inline function 'kotlin.math.cbrt' call
3230
+ var mm_0 = Math.cbrt(m_0);
3231
+ // Inline function 'kotlin.math.cbrt' call
3232
+ var ss_0 = Math.cbrt(s_0);
3233
+ return Oklab_init_$Create$(0.2104542553 * ll_0 + 0.793617785 * mm_0 - 0.0040720468 * ss_0, 1.9779984951 * ll_0 - 2.428592205 * mm_0 + 0.4505937099 * ss_0, 0.0259040371 * ll_0 + 0.7827717662 * mm_0 - 0.808675766 * ss_0, $this$toD65.v1k_1);
3234
+ }
2790
3235
  };
2791
3236
  protoOf(XYZ).q1k = function () {
2792
3237
  return this;
@@ -2801,7 +3246,7 @@
2801
3246
  protoOf(XYZ).qe = function () {
2802
3247
  return this.t1k_1;
2803
3248
  };
2804
- protoOf(XYZ).t1q = function () {
3249
+ protoOf(XYZ).x1q = function () {
2805
3250
  return this.u1k_1;
2806
3251
  };
2807
3252
  protoOf(XYZ).toString = function () {
@@ -2836,12 +3281,12 @@
2836
3281
  function XYZColorSpace() {
2837
3282
  }
2838
3283
  function XYZColorSpace_0(whitePoint) {
2839
- return whitePoint.equals(Illuminant_getInstance().v1n_1) ? XYZColorSpaces_getInstance().s1m_1 : whitePoint.equals(Illuminant_getInstance().t1n_1) ? XYZColorSpaces_getInstance().t1m_1 : new XYZColorSpaceImpl(whitePoint);
3284
+ return whitePoint.equals(Illuminant_getInstance().q1n_1) ? XYZColorSpaces_getInstance().i1n_1 : whitePoint.equals(Illuminant_getInstance().o1n_1) ? XYZColorSpaces_getInstance().j1n_1 : new XYZColorSpaceImpl(whitePoint);
2840
3285
  }
2841
3286
  function XYZColorSpaces() {
2842
3287
  XYZColorSpaces_instance = this;
2843
- this.s1m_1 = new XYZColorSpaceImpl(Illuminant_getInstance().v1n_1);
2844
- this.t1m_1 = new XYZColorSpaceImpl(Illuminant_getInstance().t1n_1);
3288
+ this.i1n_1 = new XYZColorSpaceImpl(Illuminant_getInstance().q1n_1);
3289
+ this.j1n_1 = new XYZColorSpaceImpl(Illuminant_getInstance().o1n_1);
2845
3290
  }
2846
3291
  var XYZColorSpaces_instance;
2847
3292
  function XYZColorSpaces_getInstance() {
@@ -2852,31 +3297,31 @@
2852
3297
  function chromaticAdaptationMatrix(_this__u8e3s4, srcWp, xyzToLms, lmsToXyz) {
2853
3298
  xyzToLms = xyzToLms === VOID ? get_CAT02_XYZ_TO_LMS() : xyzToLms;
2854
3299
  lmsToXyz = lmsToXyz === VOID ? get_CAT02_LMS_TO_XYZ() : lmsToXyz;
2855
- var dstWp = _this__u8e3s4.f1l().p1n_1;
2856
- var src = dot_0(xyzToLms, srcWp.f1p(), srcWp.e1p_1, srcWp.g1p());
2857
- var dst = dot_0(xyzToLms, dstWp.f1p(), dstWp.e1p_1, dstWp.g1p());
3300
+ var dstWp = _this__u8e3s4.p1l().n1o_1;
3301
+ var src = dot_0(xyzToLms, srcWp.o1p(), srcWp.n1p_1, srcWp.p1p());
3302
+ var dst = dot_0(xyzToLms, dstWp.o1p(), dstWp.n1p_1, dstWp.p1p());
2858
3303
  return dot(dotDiagonal(lmsToXyz, _Vector___get_l__impl__envr1l(dst) / _Vector___get_l__impl__envr1l(src), _Vector___get_m__impl__e5qq0m(dst) / _Vector___get_m__impl__e5qq0m(src), _Vector___get_s__impl__pzuljk(dst) / _Vector___get_s__impl__pzuljk(src)), xyzToLms);
2859
3304
  }
2860
3305
  function XYZColorSpaceImpl(whitePoint) {
2861
- this.u1q_1 = whitePoint;
2862
- this.v1q_1 = rectangularComponentInfo('XYZ');
3306
+ this.y1q_1 = whitePoint;
3307
+ this.z1q_1 = zeroOneComponentInfo('XYZ');
2863
3308
  }
2864
- protoOf(XYZColorSpaceImpl).f1l = function () {
2865
- return this.u1q_1;
3309
+ protoOf(XYZColorSpaceImpl).p1l = function () {
3310
+ return this.y1q_1;
2866
3311
  };
2867
3312
  protoOf(XYZColorSpaceImpl).pa = function () {
2868
3313
  return 'XYZ';
2869
3314
  };
2870
- protoOf(XYZColorSpaceImpl).g1l = function () {
2871
- return this.v1q_1;
3315
+ protoOf(XYZColorSpaceImpl).q1l = function () {
3316
+ return this.z1q_1;
2872
3317
  };
2873
- protoOf(XYZColorSpaceImpl).e1l = function (color) {
2874
- return color.q1k().u1m(this);
3318
+ protoOf(XYZColorSpaceImpl).k1l = function (color) {
3319
+ return color.q1k().k1n(this);
2875
3320
  };
2876
- protoOf(XYZColorSpaceImpl).h1l = function (components) {
3321
+ protoOf(XYZColorSpaceImpl).r1l = function (components) {
2877
3322
  // Inline function 'com.github.ajalt.colormath.internal.doCreate' call
2878
3323
  // Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
2879
- var size = this.g1l().l();
3324
+ var size = this.q1l().l();
2880
3325
  // Inline function 'kotlin.require' call
2881
3326
  var containsLower = size - 1 | 0;
2882
3327
  var containsArg = components.length;
@@ -2884,7 +3329,7 @@
2884
3329
  if (!(containsLower <= containsArg ? containsArg <= size : false)) {
2885
3330
  // Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
2886
3331
  var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
2887
- throw IllegalArgumentException_init_$Create$(toString_0(message));
3332
+ throw IllegalArgumentException_init_$Create$(toString(message));
2888
3333
  }
2889
3334
  // Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
2890
3335
  var tmp = components[0];
@@ -2899,26 +3344,25 @@
2899
3344
  tmp_2 = 1.0;
2900
3345
  }
2901
3346
  var tmp$ret$2 = tmp_2;
2902
- return this.d1m(tmp, tmp_0, tmp_1, tmp$ret$2);
3347
+ return this.l1m(tmp, tmp_0, tmp_1, tmp$ret$2);
2903
3348
  };
2904
3349
  protoOf(XYZColorSpaceImpl).toString = function () {
2905
- return 'XYZColorSpace(' + this.u1q_1 + ')';
3350
+ return 'XYZColorSpace(' + this.y1q_1 + ')';
2906
3351
  };
2907
- protoOf(XYZColorSpaceImpl).d1m = function (x, y, z, alpha) {
3352
+ protoOf(XYZColorSpaceImpl).l1m = function (x, y, z, alpha) {
2908
3353
  return new XYZ(x, y, z, alpha, this);
2909
3354
  };
2910
3355
  protoOf(XYZColorSpaceImpl).hashCode = function () {
2911
- return this.u1q_1.hashCode();
3356
+ return this.y1q_1.hashCode();
2912
3357
  };
2913
3358
  protoOf(XYZColorSpaceImpl).equals = function (other) {
2914
- if (this === other)
2915
- return true;
2916
- if (!(other instanceof XYZColorSpaceImpl))
2917
- return false;
2918
- var tmp0_other_with_cast = other instanceof XYZColorSpaceImpl ? other : THROW_CCE();
2919
- if (!this.u1q_1.equals(tmp0_other_with_cast.u1q_1))
2920
- return false;
2921
- return true;
3359
+ var tmp;
3360
+ if (!(other == null) ? isInterface(other, XYZColorSpace) : false) {
3361
+ tmp = this.y1q_1.equals(other.p1l());
3362
+ } else {
3363
+ tmp = false;
3364
+ }
3365
+ return tmp;
2922
3366
  };
2923
3367
  function xyY_init_$Init$(x, y, Y, $this) {
2924
3368
  Y = Y === VOID ? 1.0 : Y;
@@ -2930,26 +3374,26 @@
2930
3374
  }
2931
3375
  function xyY(x, y, Y) {
2932
3376
  Y = Y === VOID ? 1.0 : Y;
2933
- this.c1p_1 = x;
2934
- this.d1p_1 = y;
2935
- this.e1p_1 = Y;
3377
+ this.l1p_1 = x;
3378
+ this.m1p_1 = y;
3379
+ this.n1p_1 = Y;
2936
3380
  }
2937
- protoOf(xyY).f1q = function () {
2938
- return 1 - this.c1p_1 - this.d1p_1;
3381
+ protoOf(xyY).w1q = function () {
3382
+ return 1 - this.l1p_1 - this.m1p_1;
2939
3383
  };
2940
- protoOf(xyY).f1p = function () {
2941
- return this.c1p_1 * this.e1p_1 / this.d1p_1;
3384
+ protoOf(xyY).o1p = function () {
3385
+ return this.l1p_1 * this.n1p_1 / this.m1p_1;
2942
3386
  };
2943
- protoOf(xyY).g1p = function () {
2944
- return (1 - this.c1p_1 - this.d1p_1) * this.e1p_1 / this.d1p_1;
3387
+ protoOf(xyY).p1p = function () {
3388
+ return (1 - this.l1p_1 - this.m1p_1) * this.n1p_1 / this.m1p_1;
2945
3389
  };
2946
3390
  protoOf(xyY).toString = function () {
2947
- return 'xyY(x=' + this.c1p_1 + ', y=' + this.d1p_1 + ', Y=' + this.e1p_1 + ')';
3391
+ return 'xyY(x=' + this.l1p_1 + ', y=' + this.m1p_1 + ', Y=' + this.n1p_1 + ')';
2948
3392
  };
2949
3393
  protoOf(xyY).hashCode = function () {
2950
- var result = getNumberHashCode(this.c1p_1);
2951
- result = imul(result, 31) + getNumberHashCode(this.d1p_1) | 0;
2952
- result = imul(result, 31) + getNumberHashCode(this.e1p_1) | 0;
3394
+ var result = getNumberHashCode(this.l1p_1);
3395
+ result = imul(result, 31) + getNumberHashCode(this.m1p_1) | 0;
3396
+ result = imul(result, 31) + getNumberHashCode(this.n1p_1) | 0;
2953
3397
  return result;
2954
3398
  };
2955
3399
  protoOf(xyY).equals = function (other) {
@@ -2958,11 +3402,11 @@
2958
3402
  if (!(other instanceof xyY))
2959
3403
  return false;
2960
3404
  var tmp0_other_with_cast = other instanceof xyY ? other : THROW_CCE();
2961
- if (!equals(this.c1p_1, tmp0_other_with_cast.c1p_1))
3405
+ if (!equals(this.l1p_1, tmp0_other_with_cast.l1p_1))
2962
3406
  return false;
2963
- if (!equals(this.d1p_1, tmp0_other_with_cast.d1p_1))
3407
+ if (!equals(this.m1p_1, tmp0_other_with_cast.m1p_1))
2964
3408
  return false;
2965
- if (!equals(this.e1p_1, tmp0_other_with_cast.e1p_1))
3409
+ if (!equals(this.n1p_1, tmp0_other_with_cast.n1p_1))
2966
3410
  return false;
2967
3411
  return true;
2968
3412
  };
@@ -2971,36 +3415,47 @@
2971
3415
  protoOf(HSL).r1k = toLAB;
2972
3416
  protoOf(HSL).x1k = toLCHab;
2973
3417
  protoOf(HSL).d1l = toHWB;
3418
+ protoOf(HSL).e1l = toOklab;
3419
+ protoOf(HSL).f1l = toOklch;
2974
3420
  protoOf(HWB).k1k = toHSL;
2975
3421
  protoOf(HWB).q1k = toXYZ;
2976
3422
  protoOf(HWB).r1k = toLAB;
2977
3423
  protoOf(HWB).x1k = toLCHab;
3424
+ protoOf(HWB).e1l = toOklab;
3425
+ protoOf(HWB).f1l = toOklch;
2978
3426
  protoOf(LAB).k1k = toHSL;
2979
3427
  protoOf(LAB).d1l = toHWB;
2980
- protoOf(LABColorSpaceImpl).a1p = invoke;
3428
+ protoOf(LAB).e1l = toOklab;
3429
+ protoOf(LAB).f1l = toOklch;
3430
+ protoOf(LABColorSpaceImpl).j1p = invoke;
2981
3431
  protoOf(LCHab).k1k = toHSL;
2982
3432
  protoOf(LCHab).d1l = toHWB;
2983
- protoOf(Companion_4).y1n = from255$default;
3433
+ protoOf(LCHab).e1l = toOklab;
3434
+ protoOf(LCHab).f1l = toOklch;
3435
+ protoOf(Oklab).k1k = toHSL;
3436
+ protoOf(Oklab).r1k = toLAB;
3437
+ protoOf(Oklab).x1k = toLCHab;
3438
+ protoOf(Oklab).d1l = toHWB;
3439
+ protoOf(Oklch).k1k = toHSL;
3440
+ protoOf(Oklch).r1k = toLAB;
3441
+ protoOf(Oklch).x1k = toLCHab;
3442
+ protoOf(Oklch).d1l = toHWB;
3443
+ protoOf(Companion_6).o1o = from255$default;
2984
3444
  protoOf(RGB).r1k = toLAB;
2985
3445
  protoOf(RGB).x1k = toLCHab;
2986
- protoOf(SRGB).a1p = invoke_0;
2987
- protoOf(SRGB).c1m = invoke_1;
2988
- protoOf(SRGB).z1n = from255;
2989
- protoOf(SRGB).y1n = from255$default;
2990
- protoOf(BT2020Space).a1p = invoke_0;
2991
- protoOf(BT2020Space).c1m = invoke_1;
2992
- protoOf(BT2020Space).z1n = from255;
2993
- protoOf(BT2020Space).y1n = from255$default;
2994
- protoOf(RGBColorSpaceImpl).a1p = invoke_0;
2995
- protoOf(RGBColorSpaceImpl).c1m = invoke_1;
2996
- protoOf(RGBColorSpaceImpl).z1n = from255;
2997
- protoOf(RGBColorSpaceImpl).y1n = from255$default;
2998
- protoOf(Companion_5).b1p = invoke$default;
3446
+ protoOf(RGB).f1l = toOklch;
3447
+ protoOf(SRGB).o1o = from255$default;
3448
+ protoOf(RGBColorSpaceImpl).j1p = invoke_0;
3449
+ protoOf(RGBColorSpaceImpl).k1m = invoke_1;
3450
+ protoOf(RGBColorSpaceImpl).p1o = from255;
3451
+ protoOf(RGBColorSpaceImpl).o1o = from255$default;
3452
+ protoOf(Companion_7).k1p = invoke$default;
2999
3453
  protoOf(XYZ).k1k = toHSL;
3000
3454
  protoOf(XYZ).x1k = toLCHab;
3001
3455
  protoOf(XYZ).d1l = toHWB;
3002
- protoOf(XYZColorSpaceImpl).a1p = invoke_2;
3003
- protoOf(XYZColorSpaceImpl).b1p = invoke$default;
3456
+ protoOf(XYZ).f1l = toOklch;
3457
+ protoOf(XYZColorSpaceImpl).j1p = invoke_2;
3458
+ protoOf(XYZColorSpaceImpl).k1p = invoke$default;
3004
3459
  //endregion
3005
3460
  //region block: init
3006
3461
  Companion_instance_0 = new Companion();
@@ -3017,7 +3472,7 @@
3017
3472
  _.$_$.a = formatCssString;
3018
3473
  _.$_$.b = parse;
3019
3474
  _.$_$.c = RenderCondition_ALWAYS_getInstance;
3020
- _.$_$.d = Companion_getInstance_4;
3475
+ _.$_$.d = Companion_getInstance_6;
3021
3476
  _.$_$.e = Companion_instance_0;
3022
3477
  //endregion
3023
3478
  return _;