@cruglobal/godtools-shared 0.9.0-SNAPSHOT.1259 → 0.9.0-SNAPSHOT.1263
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.
- package/88b0986a7186d029-atomicfu-js-ir.js +12 -12
- package/Napier-napier-js-ir.js +37 -37
- package/antlr-kotlin-antlr-kotlin-runtime-js-ir.js +3124 -3124
- package/colormath-root-colormath-js-ir.js +790 -790
- package/fluid-locale-js-ir.js +160 -160
- package/kotlin-kotlin-stdlib-js-ir.js +1112 -1082
- package/kotlin-kotlin-stdlib-js-ir.js.map +1 -1
- package/kotlin-mpp-godtools-tool-parser-npm.d.ts +139 -8
- package/kotlin-mpp-godtools-tool-parser-parser-expressions.js +433 -433
- package/kotlin-mpp-godtools-tool-parser-parser.js +2628 -2490
- package/kotlin-mpp-godtools-tool-parser-parser.js.map +1 -1
- package/kotlin-mpp-godtools-tool-parser-state.js +237 -237
- package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js +2800 -2156
- package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js.map +1 -1
- package/package.json +1 -1
|
@@ -14,95 +14,95 @@
|
|
|
14
14
|
//region block: imports
|
|
15
15
|
var imul = Math.imul;
|
|
16
16
|
var log2 = Math.log2;
|
|
17
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
18
|
-
var objectMeta = kotlin_kotlin.$_$.
|
|
19
|
-
var VOID = kotlin_kotlin.$_$.
|
|
20
|
-
var setMetadataFor = kotlin_kotlin.$_$.
|
|
21
|
-
var interfaceMeta = kotlin_kotlin.$_$.
|
|
22
|
-
var classMeta = kotlin_kotlin.$_$.
|
|
17
|
+
var protoOf = kotlin_kotlin.$_$.p6;
|
|
18
|
+
var objectMeta = kotlin_kotlin.$_$.o6;
|
|
19
|
+
var VOID = kotlin_kotlin.$_$.s9;
|
|
20
|
+
var setMetadataFor = kotlin_kotlin.$_$.q6;
|
|
21
|
+
var interfaceMeta = kotlin_kotlin.$_$.c6;
|
|
22
|
+
var classMeta = kotlin_kotlin.$_$.t5;
|
|
23
23
|
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.v;
|
|
24
24
|
var Unit_getInstance = kotlin_kotlin.$_$.k2;
|
|
25
25
|
var Companion_getInstance = kotlin_kotlin.$_$.i2;
|
|
26
26
|
var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.t1;
|
|
27
|
-
var createFailure = kotlin_kotlin.$_$.
|
|
27
|
+
var createFailure = kotlin_kotlin.$_$.i9;
|
|
28
28
|
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.w1;
|
|
29
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
30
|
-
var isObject = kotlin_kotlin.$_$.
|
|
29
|
+
var THROW_CCE = kotlin_kotlin.$_$.c9;
|
|
30
|
+
var isObject = kotlin_kotlin.$_$.h6;
|
|
31
31
|
var _Result___get_isFailure__impl__jpiriv = kotlin_kotlin.$_$.v1;
|
|
32
|
-
var startsWith = kotlin_kotlin.$_$.
|
|
32
|
+
var startsWith = kotlin_kotlin.$_$.z7;
|
|
33
33
|
var Regex_init_$Create$ = kotlin_kotlin.$_$.o;
|
|
34
|
-
var endsWith = kotlin_kotlin.$_$.
|
|
35
|
-
var coerceAtLeast = kotlin_kotlin.$_$.
|
|
36
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.
|
|
34
|
+
var endsWith = kotlin_kotlin.$_$.n7;
|
|
35
|
+
var coerceAtLeast = kotlin_kotlin.$_$.z6;
|
|
36
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.w2;
|
|
37
37
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.c;
|
|
38
|
-
var get_lastIndex = kotlin_kotlin.$_$.
|
|
39
|
-
var charSequenceLength = kotlin_kotlin.$_$.
|
|
40
|
-
var coerceIn = kotlin_kotlin.$_$.
|
|
41
|
-
var roundToInt = kotlin_kotlin.$_$.
|
|
42
|
-
var coerceIn_0 = kotlin_kotlin.$_$.
|
|
43
|
-
var toDouble = kotlin_kotlin.$_$.
|
|
44
|
-
var dropLast = kotlin_kotlin.$_$.
|
|
45
|
-
var Enum = kotlin_kotlin.$_$.
|
|
46
|
-
var equals = kotlin_kotlin.$_$.
|
|
38
|
+
var get_lastIndex = kotlin_kotlin.$_$.t3;
|
|
39
|
+
var charSequenceLength = kotlin_kotlin.$_$.s5;
|
|
40
|
+
var coerceIn = kotlin_kotlin.$_$.b7;
|
|
41
|
+
var roundToInt = kotlin_kotlin.$_$.v6;
|
|
42
|
+
var coerceIn_0 = kotlin_kotlin.$_$.c7;
|
|
43
|
+
var toDouble = kotlin_kotlin.$_$.f8;
|
|
44
|
+
var dropLast = kotlin_kotlin.$_$.m7;
|
|
45
|
+
var Enum = kotlin_kotlin.$_$.r8;
|
|
46
|
+
var equals = kotlin_kotlin.$_$.w5;
|
|
47
47
|
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.q;
|
|
48
|
-
var dropLast_0 = kotlin_kotlin.$_$.
|
|
49
|
-
var joinTo = kotlin_kotlin.$_$.
|
|
48
|
+
var dropLast_0 = kotlin_kotlin.$_$.e3;
|
|
49
|
+
var joinTo = kotlin_kotlin.$_$.s3;
|
|
50
50
|
var UByte__toString_impl_v72jg = kotlin_kotlin.$_$.y1;
|
|
51
51
|
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.o1;
|
|
52
|
-
var indexOf = kotlin_kotlin.$_$.
|
|
53
|
-
var take = kotlin_kotlin.$_$.
|
|
54
|
-
var charArrayOf = kotlin_kotlin.$_$.
|
|
55
|
-
var trimEnd = kotlin_kotlin.$_$.
|
|
56
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.
|
|
57
|
-
var isNaN_0 = kotlin_kotlin.$_$.
|
|
58
|
-
var joinTo_0 = kotlin_kotlin.$_$.
|
|
59
|
-
var numberToDouble = kotlin_kotlin.$_$.
|
|
60
|
-
var getStringHashCode = kotlin_kotlin.$_$.
|
|
61
|
-
var charSequenceGet = kotlin_kotlin.$_$.
|
|
52
|
+
var indexOf = kotlin_kotlin.$_$.r7;
|
|
53
|
+
var take = kotlin_kotlin.$_$.b8;
|
|
54
|
+
var charArrayOf = kotlin_kotlin.$_$.q5;
|
|
55
|
+
var trimEnd = kotlin_kotlin.$_$.m8;
|
|
56
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.m9;
|
|
57
|
+
var isNaN_0 = kotlin_kotlin.$_$.k9;
|
|
58
|
+
var joinTo_0 = kotlin_kotlin.$_$.r3;
|
|
59
|
+
var numberToDouble = kotlin_kotlin.$_$.l6;
|
|
60
|
+
var getStringHashCode = kotlin_kotlin.$_$.a6;
|
|
61
|
+
var charSequenceGet = kotlin_kotlin.$_$.r5;
|
|
62
62
|
var toString = kotlin_kotlin.$_$.s1;
|
|
63
|
-
var copyToArray = kotlin_kotlin.$_$.
|
|
64
|
-
var Char = kotlin_kotlin.$_$.
|
|
65
|
-
var plus = kotlin_kotlin.$_$.
|
|
66
|
-
var asList = kotlin_kotlin.$_$.
|
|
67
|
-
var to = kotlin_kotlin.$_$.
|
|
68
|
-
var mapOf = kotlin_kotlin.$_$.
|
|
69
|
-
var withSign = kotlin_kotlin.$_$.
|
|
70
|
-
var get_PI = kotlin_kotlin.$_$.
|
|
71
|
-
var coerceAtLeast_0 = kotlin_kotlin.$_$.
|
|
72
|
-
var getNumberHashCode = kotlin_kotlin.$_$.
|
|
73
|
-
var numberToInt = kotlin_kotlin.$_$.
|
|
63
|
+
var copyToArray = kotlin_kotlin.$_$.d3;
|
|
64
|
+
var Char = kotlin_kotlin.$_$.o8;
|
|
65
|
+
var plus = kotlin_kotlin.$_$.e4;
|
|
66
|
+
var asList = kotlin_kotlin.$_$.u2;
|
|
67
|
+
var to = kotlin_kotlin.$_$.q9;
|
|
68
|
+
var mapOf = kotlin_kotlin.$_$.b4;
|
|
69
|
+
var withSign = kotlin_kotlin.$_$.w6;
|
|
70
|
+
var get_PI = kotlin_kotlin.$_$.u6;
|
|
71
|
+
var coerceAtLeast_0 = kotlin_kotlin.$_$.x6;
|
|
72
|
+
var getNumberHashCode = kotlin_kotlin.$_$.y5;
|
|
73
|
+
var numberToInt = kotlin_kotlin.$_$.m6;
|
|
74
74
|
var FloatCompanionObject_getInstance = kotlin_kotlin.$_$.e2;
|
|
75
|
-
var hashCode = kotlin_kotlin.$_$.
|
|
76
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
77
|
-
var toString_0 = kotlin_kotlin.$_$.
|
|
78
|
-
var get_lastIndex_0 = kotlin_kotlin.$_$.
|
|
75
|
+
var hashCode = kotlin_kotlin.$_$.b6;
|
|
76
|
+
var isInterface = kotlin_kotlin.$_$.f6;
|
|
77
|
+
var toString_0 = kotlin_kotlin.$_$.t6;
|
|
78
|
+
var get_lastIndex_0 = kotlin_kotlin.$_$.v3;
|
|
79
79
|
var DoubleCompanionObject_getInstance = kotlin_kotlin.$_$.d2;
|
|
80
|
-
var toInt = kotlin_kotlin.$_$.
|
|
81
|
-
var numberRangeToNumber = kotlin_kotlin.$_$.
|
|
82
|
-
var slice = kotlin_kotlin.$_$.
|
|
80
|
+
var toInt = kotlin_kotlin.$_$.i8;
|
|
81
|
+
var numberRangeToNumber = kotlin_kotlin.$_$.i6;
|
|
82
|
+
var slice = kotlin_kotlin.$_$.v7;
|
|
83
83
|
var _UInt___init__impl__l7qpdl = kotlin_kotlin.$_$.z1;
|
|
84
84
|
var _UInt___get_data__impl__f0vqqw = kotlin_kotlin.$_$.a2;
|
|
85
|
-
var toByte = kotlin_kotlin.$_$.
|
|
85
|
+
var toByte = kotlin_kotlin.$_$.r6;
|
|
86
86
|
var _UByte___init__impl__g9hnc4 = kotlin_kotlin.$_$.x1;
|
|
87
|
-
var objectCreate = kotlin_kotlin.$_$.
|
|
88
|
-
var isNumber = kotlin_kotlin.$_$.
|
|
87
|
+
var objectCreate = kotlin_kotlin.$_$.n6;
|
|
88
|
+
var isNumber = kotlin_kotlin.$_$.g6;
|
|
89
89
|
//endregion
|
|
90
90
|
//region block: pre-declaration
|
|
91
91
|
setMetadataFor(Companion, 'Companion', objectMeta);
|
|
92
92
|
function toHSL() {
|
|
93
|
-
return this.
|
|
93
|
+
return this.g2l().h2l();
|
|
94
94
|
}
|
|
95
95
|
function toXYZ() {
|
|
96
|
-
return this.
|
|
96
|
+
return this.g2l().n2l();
|
|
97
97
|
}
|
|
98
98
|
function toLAB() {
|
|
99
|
-
return this.
|
|
99
|
+
return this.n2l().o2l();
|
|
100
100
|
}
|
|
101
101
|
function toLCHab() {
|
|
102
|
-
return this.
|
|
102
|
+
return this.o2l().u2l();
|
|
103
103
|
}
|
|
104
104
|
function toHWB() {
|
|
105
|
-
return this.
|
|
105
|
+
return this.g2l().a2m();
|
|
106
106
|
}
|
|
107
107
|
setMetadataFor(Color, 'Color', interfaceMeta);
|
|
108
108
|
setMetadataFor(WhitePointColorSpace, 'WhitePointColorSpace', interfaceMeta);
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
setMetadataFor(ICtCp, 'ICtCp', classMeta, VOID, [Color]);
|
|
121
121
|
setMetadataFor(PqNonlinearity, 'PqNonlinearity', objectMeta);
|
|
122
122
|
function invoke(l, a, b, alpha) {
|
|
123
|
-
return this.
|
|
123
|
+
return this.z2m(numberToDouble(l), numberToDouble(a), numberToDouble(b), numberToDouble(alpha));
|
|
124
124
|
}
|
|
125
125
|
setMetadataFor(LABColorSpace, 'LABColorSpace', interfaceMeta, VOID, [WhitePointColorSpace]);
|
|
126
126
|
setMetadataFor(Companion_2, 'Companion', objectMeta, VOID, [LABColorSpace]);
|
|
@@ -134,14 +134,14 @@
|
|
|
134
134
|
setMetadataFor(GammaTransferFunctions, 'GammaTransferFunctions', classMeta);
|
|
135
135
|
setMetadataFor(LinearTransferFunctions, 'LinearTransferFunctions', objectMeta);
|
|
136
136
|
function invoke_0(r, g, b, alpha) {
|
|
137
|
-
return this.
|
|
137
|
+
return this.z2m(numberToDouble(r), numberToDouble(g), numberToDouble(b), numberToDouble(alpha));
|
|
138
138
|
}
|
|
139
139
|
function from255(r, g, b, alpha) {
|
|
140
|
-
return this.
|
|
140
|
+
return this.z2m(r / 255.0, g / 255.0, b / 255.0, alpha / 255.0);
|
|
141
141
|
}
|
|
142
142
|
function from255$default(r, g, b, alpha, $super) {
|
|
143
143
|
alpha = alpha === VOID ? 255 : alpha;
|
|
144
|
-
return $super === VOID ? this.
|
|
144
|
+
return $super === VOID ? this.v2o(r, g, b, alpha) : from255(r, g, b, alpha);
|
|
145
145
|
}
|
|
146
146
|
function invoke_1(hex) {
|
|
147
147
|
var tmp = parseHex(validateHex(hex), 0);
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
} else {
|
|
162
162
|
tmp_2 = 255;
|
|
163
163
|
}
|
|
164
|
-
return this.
|
|
164
|
+
return this.v2o(tmp, tmp_0, tmp_1, tmp_2);
|
|
165
165
|
}
|
|
166
166
|
setMetadataFor(RGBColorSpace, 'RGBColorSpace', interfaceMeta, VOID, [WhitePointColorSpace]);
|
|
167
167
|
setMetadataFor(Companion_4, 'Companion', objectMeta, VOID, [RGBColorSpace]);
|
|
@@ -177,11 +177,11 @@
|
|
|
177
177
|
setMetadataFor(RGBColorSpaceImpl, 'RGBColorSpaceImpl', classMeta, VOID, [RGBColorSpace]);
|
|
178
178
|
setMetadataFor(BT2020TransferFunctions, 'BT2020TransferFunctions', objectMeta);
|
|
179
179
|
function invoke_2(x, y, z, alpha) {
|
|
180
|
-
return this.
|
|
180
|
+
return this.z2m(numberToDouble(x), numberToDouble(y), numberToDouble(z), numberToDouble(alpha));
|
|
181
181
|
}
|
|
182
182
|
function invoke$default(x, y, z, alpha, $super) {
|
|
183
183
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
184
|
-
return $super === VOID ? this.
|
|
184
|
+
return $super === VOID ? this.x2p(x, y, z, alpha) : invoke_2(x, y, z, alpha);
|
|
185
185
|
}
|
|
186
186
|
setMetadataFor(XYZColorSpace, 'XYZColorSpace', interfaceMeta, VOID, [WhitePointColorSpace]);
|
|
187
187
|
setMetadataFor(Companion_5, 'Companion', objectMeta, VOID, [XYZColorSpace]);
|
|
@@ -202,13 +202,13 @@
|
|
|
202
202
|
function Color() {
|
|
203
203
|
}
|
|
204
204
|
function convertTo(_this__u8e3s4, space) {
|
|
205
|
-
return space.
|
|
205
|
+
return space.b2m(_this__u8e3s4);
|
|
206
206
|
}
|
|
207
207
|
function WhitePointColorSpace() {
|
|
208
208
|
}
|
|
209
209
|
function ColorComponentInfo(name, isPolar) {
|
|
210
|
-
this.
|
|
211
|
-
this.
|
|
210
|
+
this.e2m_1 = name;
|
|
211
|
+
this.f2m_1 = isPolar;
|
|
212
212
|
}
|
|
213
213
|
function parse(_this__u8e3s4, color) {
|
|
214
214
|
var tmp0_elvis_lhs = parseOrNull(_this__u8e3s4, color);
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
return tmp;
|
|
222
222
|
}
|
|
223
223
|
function parseOrNull(_this__u8e3s4, color_0) {
|
|
224
|
-
var keywordColor = CssColors_getInstance().
|
|
224
|
+
var keywordColor = CssColors_getInstance().g2m_1.f2(color_0);
|
|
225
225
|
var tmp;
|
|
226
226
|
if (!(keywordColor == null)) {
|
|
227
227
|
tmp = keywordColor;
|
|
@@ -237,7 +237,7 @@
|
|
|
237
237
|
var tmp0_success = Companion_getInstance();
|
|
238
238
|
var tmp$ret$0;
|
|
239
239
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
240
|
-
tmp$ret$0 = Companion_getInstance_5().
|
|
240
|
+
tmp$ret$0 = Companion_getInstance_5().y2m(color_0);
|
|
241
241
|
var tmp1_success = tmp$ret$0;
|
|
242
242
|
tmp$ret$1 = _Result___init__impl__xyqfz8(tmp1_success);
|
|
243
243
|
tmp_0 = tmp$ret$1;
|
|
@@ -267,7 +267,7 @@
|
|
|
267
267
|
tmp$ret$4 = tmp_2;
|
|
268
268
|
tmp = tmp$ret$4;
|
|
269
269
|
} else {
|
|
270
|
-
var tmp0_safe_receiver = PATTERNS_getInstance().
|
|
270
|
+
var tmp0_safe_receiver = PATTERNS_getInstance().n2m_1.bc(color_0);
|
|
271
271
|
var tmp_4;
|
|
272
272
|
if (tmp0_safe_receiver == null) {
|
|
273
273
|
tmp_4 = null;
|
|
@@ -284,7 +284,7 @@
|
|
|
284
284
|
var tmp2_elvis_lhs = tmp_4;
|
|
285
285
|
var tmp_5;
|
|
286
286
|
if (tmp2_elvis_lhs == null) {
|
|
287
|
-
var tmp1_safe_receiver = PATTERNS_getInstance().
|
|
287
|
+
var tmp1_safe_receiver = PATTERNS_getInstance().o2m_1.bc(color_0);
|
|
288
288
|
var tmp_6;
|
|
289
289
|
if (tmp1_safe_receiver == null) {
|
|
290
290
|
tmp_6 = null;
|
|
@@ -305,7 +305,7 @@
|
|
|
305
305
|
var tmp4_elvis_lhs = tmp_5;
|
|
306
306
|
var tmp_7;
|
|
307
307
|
if (tmp4_elvis_lhs == null) {
|
|
308
|
-
var tmp3_safe_receiver = PATTERNS_getInstance().
|
|
308
|
+
var tmp3_safe_receiver = PATTERNS_getInstance().p2m_1.bc(color_0);
|
|
309
309
|
var tmp_8;
|
|
310
310
|
if (tmp3_safe_receiver == null) {
|
|
311
311
|
tmp_8 = null;
|
|
@@ -326,7 +326,7 @@
|
|
|
326
326
|
var tmp6_elvis_lhs = tmp_7;
|
|
327
327
|
var tmp_9;
|
|
328
328
|
if (tmp6_elvis_lhs == null) {
|
|
329
|
-
var tmp5_safe_receiver = PATTERNS_getInstance().
|
|
329
|
+
var tmp5_safe_receiver = PATTERNS_getInstance().q2m_1.bc(color_0);
|
|
330
330
|
var tmp_10;
|
|
331
331
|
if (tmp5_safe_receiver == null) {
|
|
332
332
|
tmp_10 = null;
|
|
@@ -347,7 +347,7 @@
|
|
|
347
347
|
var tmp8_elvis_lhs = tmp_9;
|
|
348
348
|
var tmp_11;
|
|
349
349
|
if (tmp8_elvis_lhs == null) {
|
|
350
|
-
var tmp7_safe_receiver = PATTERNS_getInstance().
|
|
350
|
+
var tmp7_safe_receiver = PATTERNS_getInstance().r2m_1.bc(color_0);
|
|
351
351
|
var tmp_12;
|
|
352
352
|
if (tmp7_safe_receiver == null) {
|
|
353
353
|
tmp_12 = null;
|
|
@@ -368,7 +368,7 @@
|
|
|
368
368
|
var tmp10_elvis_lhs = tmp_11;
|
|
369
369
|
var tmp_13;
|
|
370
370
|
if (tmp10_elvis_lhs == null) {
|
|
371
|
-
var tmp9_safe_receiver = PATTERNS_getInstance().
|
|
371
|
+
var tmp9_safe_receiver = PATTERNS_getInstance().s2m_1.bc(color_0);
|
|
372
372
|
var tmp_14;
|
|
373
373
|
if (tmp9_safe_receiver == null) {
|
|
374
374
|
tmp_14 = null;
|
|
@@ -389,7 +389,7 @@
|
|
|
389
389
|
var tmp12_elvis_lhs = tmp_13;
|
|
390
390
|
var tmp_15;
|
|
391
391
|
if (tmp12_elvis_lhs == null) {
|
|
392
|
-
var tmp11_safe_receiver = PATTERNS_getInstance().
|
|
392
|
+
var tmp11_safe_receiver = PATTERNS_getInstance().t2m_1.bc(color_0);
|
|
393
393
|
var tmp_16;
|
|
394
394
|
if (tmp11_safe_receiver == null) {
|
|
395
395
|
tmp_16 = null;
|
|
@@ -410,7 +410,7 @@
|
|
|
410
410
|
var tmp14_elvis_lhs = tmp_15;
|
|
411
411
|
var tmp_17;
|
|
412
412
|
if (tmp14_elvis_lhs == null) {
|
|
413
|
-
var tmp13_safe_receiver = PATTERNS_getInstance().
|
|
413
|
+
var tmp13_safe_receiver = PATTERNS_getInstance().u2m_1.bc(color_0);
|
|
414
414
|
var tmp_18;
|
|
415
415
|
if (tmp13_safe_receiver == null) {
|
|
416
416
|
tmp_18 = null;
|
|
@@ -431,7 +431,7 @@
|
|
|
431
431
|
var tmp16_elvis_lhs = tmp_17;
|
|
432
432
|
var tmp_19;
|
|
433
433
|
if (tmp16_elvis_lhs == null) {
|
|
434
|
-
var tmp15_safe_receiver = PATTERNS_getInstance().
|
|
434
|
+
var tmp15_safe_receiver = PATTERNS_getInstance().v2m_1.bc(color_0);
|
|
435
435
|
var tmp_20;
|
|
436
436
|
if (tmp15_safe_receiver == null) {
|
|
437
437
|
tmp_20 = null;
|
|
@@ -452,7 +452,7 @@
|
|
|
452
452
|
var tmp18_elvis_lhs = tmp_19;
|
|
453
453
|
var tmp_21;
|
|
454
454
|
if (tmp18_elvis_lhs == null) {
|
|
455
|
-
var tmp17_safe_receiver = PATTERNS_getInstance().
|
|
455
|
+
var tmp17_safe_receiver = PATTERNS_getInstance().w2m_1.bc(color_0);
|
|
456
456
|
var tmp_22;
|
|
457
457
|
if (tmp17_safe_receiver == null) {
|
|
458
458
|
tmp_22 = null;
|
|
@@ -476,22 +476,22 @@
|
|
|
476
476
|
}
|
|
477
477
|
function PATTERNS() {
|
|
478
478
|
PATTERNS_instance = this;
|
|
479
|
-
this.
|
|
480
|
-
this.
|
|
481
|
-
this.
|
|
482
|
-
this.
|
|
483
|
-
this.
|
|
484
|
-
this.
|
|
485
|
-
this.
|
|
486
|
-
this.
|
|
487
|
-
this.
|
|
488
|
-
this.
|
|
489
|
-
this.
|
|
490
|
-
this.
|
|
491
|
-
this.
|
|
492
|
-
this.
|
|
493
|
-
this.
|
|
494
|
-
this.
|
|
479
|
+
this.h2m_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?';
|
|
480
|
+
this.i2m_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%';
|
|
481
|
+
this.j2m_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?';
|
|
482
|
+
this.k2m_1 = '\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*';
|
|
483
|
+
this.l2m_1 = '(?:\\s*,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*';
|
|
484
|
+
this.m2m_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?';
|
|
485
|
+
this.n2m_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*\\)');
|
|
486
|
+
this.o2m_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*\\)');
|
|
487
|
+
this.p2m_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*\\)');
|
|
488
|
+
this.q2m_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*\\)');
|
|
489
|
+
this.r2m_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*\\)');
|
|
490
|
+
this.s2m_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*\\)');
|
|
491
|
+
this.t2m_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*\\)');
|
|
492
|
+
this.u2m_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*\\)');
|
|
493
|
+
this.v2m_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*\\)');
|
|
494
|
+
this.w2m_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*\\)');
|
|
495
495
|
}
|
|
496
496
|
var PATTERNS_instance;
|
|
497
497
|
function PATTERNS_getInstance() {
|
|
@@ -500,67 +500,67 @@
|
|
|
500
500
|
return PATTERNS_instance;
|
|
501
501
|
}
|
|
502
502
|
function rgb(match) {
|
|
503
|
-
var r = percentOrNumber(match.
|
|
504
|
-
var g = percentOrNumber(match.
|
|
505
|
-
var b = percentOrNumber(match.
|
|
506
|
-
var a = alpha(match.
|
|
503
|
+
var r = percentOrNumber(match.wc().j(1));
|
|
504
|
+
var g = percentOrNumber(match.wc().j(2));
|
|
505
|
+
var b = percentOrNumber(match.wc().j(3));
|
|
506
|
+
var a = alpha(match.wc().j(4));
|
|
507
507
|
var tmp;
|
|
508
|
-
if (endsWith(match.
|
|
509
|
-
tmp = Companion_getInstance_5().
|
|
508
|
+
if (endsWith(match.wc().j(1), '%')) {
|
|
509
|
+
tmp = Companion_getInstance_5().z2m(clampF(r), clampF(g), clampF(b), a);
|
|
510
510
|
} else {
|
|
511
|
-
tmp = Companion_getInstance_5().
|
|
511
|
+
tmp = Companion_getInstance_5().z2m(clampInt(r) / 255.0, clampInt(g) / 255.0, clampInt(b) / 255.0, a);
|
|
512
512
|
}
|
|
513
513
|
return tmp;
|
|
514
514
|
}
|
|
515
515
|
function hsl(match) {
|
|
516
|
-
var h = hue(match.
|
|
517
|
-
var s = percent(match.
|
|
518
|
-
var l = percent(match.
|
|
519
|
-
var a = alpha(match.
|
|
516
|
+
var h = hue(match.wc().j(1));
|
|
517
|
+
var s = percent(match.wc().j(2));
|
|
518
|
+
var l = percent(match.wc().j(3));
|
|
519
|
+
var a = alpha(match.wc().j(4));
|
|
520
520
|
return new HSL(h, clampF(s), clampF(l), clampF(a));
|
|
521
521
|
}
|
|
522
522
|
function lab(match) {
|
|
523
|
-
var l = percent(match.
|
|
524
|
-
var a = number(match.
|
|
525
|
-
var b = number(match.
|
|
526
|
-
var alpha_0 = alpha(match.
|
|
527
|
-
return Companion_getInstance_3().
|
|
523
|
+
var l = percent(match.wc().j(1));
|
|
524
|
+
var a = number(match.wc().j(2));
|
|
525
|
+
var b = number(match.wc().j(3));
|
|
526
|
+
var alpha_0 = alpha(match.wc().j(4));
|
|
527
|
+
return Companion_getInstance_3().z2m(coerceAtLeast(l, 0.0) * 100.0, a, b, alpha_0);
|
|
528
528
|
}
|
|
529
529
|
function lch(match) {
|
|
530
|
-
var l = percent(match.
|
|
531
|
-
var c = number(match.
|
|
532
|
-
var h = hue(match.
|
|
533
|
-
var a = alpha(match.
|
|
534
|
-
return Companion_getInstance_4().
|
|
530
|
+
var l = percent(match.wc().j(1));
|
|
531
|
+
var c = number(match.wc().j(2));
|
|
532
|
+
var h = hue(match.wc().j(3));
|
|
533
|
+
var a = alpha(match.wc().j(4));
|
|
534
|
+
return Companion_getInstance_4().z2m(coerceAtLeast(l, 0.0) * 100.0, coerceAtLeast(c, 0.0), h, a);
|
|
535
535
|
}
|
|
536
536
|
function hwb(match) {
|
|
537
|
-
var h = hue(match.
|
|
538
|
-
var w = percent(match.
|
|
539
|
-
var b = percent(match.
|
|
540
|
-
var a = alpha(match.
|
|
537
|
+
var h = hue(match.wc().j(1));
|
|
538
|
+
var w = percent(match.wc().j(2));
|
|
539
|
+
var b = percent(match.wc().j(3));
|
|
540
|
+
var a = alpha(match.wc().j(4));
|
|
541
541
|
return new HWB(h, clampF(w), clampF(b), a);
|
|
542
542
|
}
|
|
543
543
|
function color(match) {
|
|
544
|
-
var tmp0_subject = match.
|
|
544
|
+
var tmp0_subject = match.wc().j(1);
|
|
545
545
|
var tmp;
|
|
546
546
|
switch (tmp0_subject) {
|
|
547
547
|
case 'srgb':
|
|
548
548
|
tmp = SRGB_getInstance();
|
|
549
549
|
break;
|
|
550
550
|
case 'display-p3':
|
|
551
|
-
tmp = RGBColorSpaces_getInstance().
|
|
551
|
+
tmp = RGBColorSpaces_getInstance().m2n_1;
|
|
552
552
|
break;
|
|
553
553
|
case 'a98-rgb':
|
|
554
|
-
tmp = RGBColorSpaces_getInstance().
|
|
554
|
+
tmp = RGBColorSpaces_getInstance().i2n_1;
|
|
555
555
|
break;
|
|
556
556
|
case 'prophoto-rgb':
|
|
557
|
-
tmp = RGBColorSpaces_getInstance().
|
|
557
|
+
tmp = RGBColorSpaces_getInstance().n2n_1;
|
|
558
558
|
break;
|
|
559
559
|
case 'rec2020':
|
|
560
|
-
tmp = RGBColorSpaces_getInstance().
|
|
560
|
+
tmp = RGBColorSpaces_getInstance().j2n_1;
|
|
561
561
|
break;
|
|
562
562
|
case 'xyz':
|
|
563
|
-
tmp = XYZColorSpaces_getInstance().
|
|
563
|
+
tmp = XYZColorSpaces_getInstance().p2n_1;
|
|
564
564
|
break;
|
|
565
565
|
default:
|
|
566
566
|
return null;
|
|
@@ -570,9 +570,9 @@
|
|
|
570
570
|
// Inline function 'kotlin.collections.map' call
|
|
571
571
|
var tmp$ret$0;
|
|
572
572
|
// Inline function 'kotlin.text.split' call
|
|
573
|
-
var tmp0_split = match.
|
|
573
|
+
var tmp0_split = match.wc().j(2);
|
|
574
574
|
var tmp1_split = Regex_init_$Create$('\\s+');
|
|
575
|
-
tmp$ret$0 = tmp1_split.
|
|
575
|
+
tmp$ret$0 = tmp1_split.fc(tmp0_split, 0);
|
|
576
576
|
var tmp3_map = tmp$ret$0;
|
|
577
577
|
var tmp$ret$2;
|
|
578
578
|
// Inline function 'kotlin.collections.mapTo' call
|
|
@@ -628,9 +628,9 @@
|
|
|
628
628
|
tmp_4 = tmp$ret$8;
|
|
629
629
|
}
|
|
630
630
|
tmp$ret$9 = tmp_4;
|
|
631
|
-
var tmp4_floatArrayOf = new Float32Array([tmp_1, tmp_3, tmp$ret$9, alpha(match.
|
|
631
|
+
var tmp4_floatArrayOf = new Float32Array([tmp_1, tmp_3, tmp$ret$9, alpha(match.wc().j(3))]);
|
|
632
632
|
tmp$ret$10 = tmp4_floatArrayOf;
|
|
633
|
-
return space.
|
|
633
|
+
return space.d2m(tmp$ret$10);
|
|
634
634
|
}
|
|
635
635
|
function percentOrNumber(str) {
|
|
636
636
|
return endsWith(str, '%') ? percent(str) : number(str);
|
|
@@ -811,23 +811,23 @@
|
|
|
811
811
|
var tmp0_subject = _this__u8e3s4;
|
|
812
812
|
var tmp;
|
|
813
813
|
if (tmp0_subject instanceof RGB) {
|
|
814
|
-
var tmp1_subject = _this__u8e3s4.
|
|
815
|
-
tmp = equals(tmp1_subject, SRGB_getInstance()) ? renderSRGB(_this__u8e3s4, legacyFormat, legacyName, unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().
|
|
814
|
+
var tmp1_subject = _this__u8e3s4.m2l_1;
|
|
815
|
+
tmp = equals(tmp1_subject, SRGB_getInstance()) ? renderSRGB(_this__u8e3s4, legacyFormat, legacyName, unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().m2n_1) ? renderColorFunction(_this__u8e3s4, 'display-p3', unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().i2n_1) ? renderColorFunction(_this__u8e3s4, 'a98-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().n2n_1) ? renderColorFunction(_this__u8e3s4, 'prophoto-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp1_subject, RGBColorSpaces_getInstance().j2n_1) ? renderColorFunction(_this__u8e3s4, 'rec2020', unitsPercent, alphaPercent, renderAlpha) : null;
|
|
816
816
|
} else {
|
|
817
817
|
if (tmp0_subject instanceof HSL) {
|
|
818
818
|
tmp = renderHsl(_this__u8e3s4, legacyFormat, legacyName, hueUnit, alphaPercent, renderAlpha);
|
|
819
819
|
} else {
|
|
820
820
|
if (tmp0_subject instanceof LAB) {
|
|
821
|
-
tmp = renderLab(convertTo(_this__u8e3s4, LABColorSpaces_getInstance().
|
|
821
|
+
tmp = renderLab(convertTo(_this__u8e3s4, LABColorSpaces_getInstance().u2n_1), alphaPercent, renderAlpha);
|
|
822
822
|
} else {
|
|
823
823
|
if (tmp0_subject instanceof LCHab) {
|
|
824
|
-
tmp = renderLCH(convertTo(_this__u8e3s4, LCHabColorSpaces_getInstance().
|
|
824
|
+
tmp = renderLCH(convertTo(_this__u8e3s4, LCHabColorSpaces_getInstance().s2n_1), hueUnit, alphaPercent, renderAlpha);
|
|
825
825
|
} else {
|
|
826
826
|
if (tmp0_subject instanceof HWB) {
|
|
827
827
|
tmp = renderHWB(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha);
|
|
828
828
|
} else {
|
|
829
829
|
if (tmp0_subject instanceof XYZ) {
|
|
830
|
-
tmp = renderColorFunction(_this__u8e3s4.
|
|
830
|
+
tmp = renderColorFunction(_this__u8e3s4.q2n(XYZColorSpaces_getInstance().p2n_1), 'xyz', unitsPercent, alphaPercent, renderAlpha);
|
|
831
831
|
} else {
|
|
832
832
|
tmp = null;
|
|
833
833
|
}
|
|
@@ -847,11 +847,11 @@
|
|
|
847
847
|
var tmp0_apply = StringBuilder_init_$Create$();
|
|
848
848
|
// Inline function 'kotlin.contracts.contract' call
|
|
849
849
|
// Inline function 'com.github.ajalt.colormath.renderColorFunction.<anonymous>' call
|
|
850
|
-
tmp0_apply.
|
|
851
|
-
var tmp = dropLast_0(_this__u8e3s4.
|
|
850
|
+
tmp0_apply.kb('color(').kb(name).kb(' ');
|
|
851
|
+
var tmp = dropLast_0(_this__u8e3s4.x7(), 1);
|
|
852
852
|
joinTo(tmp, tmp0_apply, ' ', VOID, VOID, VOID, VOID, renderColorFunction$lambda(unitsPercent));
|
|
853
|
-
tmp0_apply.
|
|
854
|
-
tmp0_apply.
|
|
853
|
+
tmp0_apply.kb(renderAlpha(_this__u8e3s4, false, renderAlpha_0, alphaPercent));
|
|
854
|
+
tmp0_apply.kb(')');
|
|
855
855
|
tmp$ret$0 = tmp0_apply;
|
|
856
856
|
tmp$ret$1 = tmp$ret$0.toString();
|
|
857
857
|
return tmp$ret$1;
|
|
@@ -861,9 +861,9 @@
|
|
|
861
861
|
// Inline function 'kotlin.text.lowercase' call
|
|
862
862
|
var tmp$ret$0;
|
|
863
863
|
// Inline function 'kotlin.text.replace' call
|
|
864
|
-
var tmp0_replace = _this__u8e3s4.
|
|
864
|
+
var tmp0_replace = _this__u8e3s4.f2l().kd();
|
|
865
865
|
var tmp1_replace = Regex_init_$Create$('\\W');
|
|
866
|
-
tmp$ret$0 = tmp1_replace.
|
|
866
|
+
tmp$ret$0 = tmp1_replace.cc(tmp0_replace, '-');
|
|
867
867
|
var tmp2_lowercase = tmp$ret$0;
|
|
868
868
|
var tmp$ret$1;
|
|
869
869
|
// Inline function 'kotlin.js.asDynamic' call
|
|
@@ -872,19 +872,19 @@
|
|
|
872
872
|
return '--' + tmp$ret$2;
|
|
873
873
|
}
|
|
874
874
|
function renderSRGB(_this__u8e3s4, commas, namedRgba, rgbPercent, alphaPercent, renderAlpha) {
|
|
875
|
-
return renderFunction(_this__u8e3s4, namedRgba ? 'rgba' : 'rgb', [rgbPercent ? render(_this__u8e3s4.
|
|
875
|
+
return renderFunction(_this__u8e3s4, namedRgba ? 'rgba' : 'rgb', [rgbPercent ? render(_this__u8e3s4.i2l_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_r__impl__dulq0e(_this__u8e3s4.v2n())), rgbPercent ? render(_this__u8e3s4.j2l_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_g__impl__o93c71(_this__u8e3s4.v2n())), rgbPercent ? render(_this__u8e3s4.k2l_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_b__impl__m772ua(_this__u8e3s4.v2n()))], alphaPercent, renderAlpha, commas);
|
|
876
876
|
}
|
|
877
877
|
function renderHsl(_this__u8e3s4, commas, namedHsla, hueUnit, alphaPercent, renderAlpha) {
|
|
878
|
-
return renderFunction(_this__u8e3s4, namedHsla ? 'hsla' : 'hsl', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.
|
|
878
|
+
return renderFunction(_this__u8e3s4, namedHsla ? 'hsla' : 'hsl', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.x2n_1, true), render(_this__u8e3s4.y2n_1, true)], alphaPercent, renderAlpha, commas);
|
|
879
879
|
}
|
|
880
880
|
function renderLab(_this__u8e3s4, alphaPercent, renderAlpha) {
|
|
881
|
-
return renderFunction(_this__u8e3s4, 'lab', [render(_this__u8e3s4.
|
|
881
|
+
return renderFunction(_this__u8e3s4, 'lab', [render(_this__u8e3s4.v2l_1 / 100, true), render(_this__u8e3s4.w2l_1), render(_this__u8e3s4.x2l_1)], alphaPercent, renderAlpha);
|
|
882
882
|
}
|
|
883
883
|
function renderLCH(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
884
|
-
return renderFunction(_this__u8e3s4, 'lch', [render(_this__u8e3s4.
|
|
884
|
+
return renderFunction(_this__u8e3s4, 'lch', [render(_this__u8e3s4.a2o_1 / 100, true), render(_this__u8e3s4.b2o_1), renderHue(_this__u8e3s4, hueUnit)], alphaPercent, renderAlpha);
|
|
885
885
|
}
|
|
886
886
|
function renderHWB(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
887
|
-
return renderFunction(_this__u8e3s4, 'hwb', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.
|
|
887
|
+
return renderFunction(_this__u8e3s4, 'hwb', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.g2o_1, true), render(_this__u8e3s4.h2o_1, true)], alphaPercent, renderAlpha);
|
|
888
888
|
}
|
|
889
889
|
function render(_this__u8e3s4, percent) {
|
|
890
890
|
percent = percent === VOID ? false : percent;
|
|
@@ -927,8 +927,8 @@
|
|
|
927
927
|
}
|
|
928
928
|
function renderAlpha(_this__u8e3s4, commas, renderAlpha, alphaPercent) {
|
|
929
929
|
var tmp;
|
|
930
|
-
if (renderAlpha.equals(RenderCondition_ALWAYS_getInstance()) ? true : (renderAlpha.equals(RenderCondition_AUTO_getInstance()) ? !isNaN_0(_this__u8e3s4.
|
|
931
|
-
tmp = (commas ? ', ' : ' / ') + render(nanToOne(_this__u8e3s4.
|
|
930
|
+
if (renderAlpha.equals(RenderCondition_ALWAYS_getInstance()) ? true : (renderAlpha.equals(RenderCondition_AUTO_getInstance()) ? !isNaN_0(_this__u8e3s4.e2l()) : false) ? !(_this__u8e3s4.e2l() === 1.0) : false) {
|
|
931
|
+
tmp = (commas ? ', ' : ' / ') + render(nanToOne(_this__u8e3s4.e2l()), alphaPercent);
|
|
932
932
|
} else {
|
|
933
933
|
tmp = '';
|
|
934
934
|
}
|
|
@@ -945,24 +945,24 @@
|
|
|
945
945
|
// Inline function 'kotlin.contracts.contract' call
|
|
946
946
|
// Inline function 'com.github.ajalt.colormath.renderFunction.<anonymous>' call
|
|
947
947
|
var sep = commas ? ', ' : ' ';
|
|
948
|
-
tmp0_apply.
|
|
948
|
+
tmp0_apply.kb(name).kb('(');
|
|
949
949
|
joinTo_0(components, tmp0_apply, sep);
|
|
950
|
-
tmp0_apply.
|
|
951
|
-
tmp0_apply.
|
|
950
|
+
tmp0_apply.kb(renderAlpha(_this__u8e3s4, commas, renderAlpha_0, alphaPercent));
|
|
951
|
+
tmp0_apply.kb(')');
|
|
952
952
|
tmp$ret$0 = tmp0_apply;
|
|
953
953
|
tmp$ret$1 = tmp$ret$0.toString();
|
|
954
954
|
return tmp$ret$1;
|
|
955
955
|
}
|
|
956
956
|
function renderHue(_this__u8e3s4, hueUnit) {
|
|
957
957
|
var tmp0_subject = hueUnit;
|
|
958
|
-
var tmp0 = tmp0_subject.
|
|
958
|
+
var tmp0 = tmp0_subject.i4_1;
|
|
959
959
|
var tmp;
|
|
960
960
|
switch (tmp0) {
|
|
961
961
|
case 0:
|
|
962
|
-
tmp = render(_this__u8e3s4.
|
|
962
|
+
tmp = render(_this__u8e3s4.j2o());
|
|
963
963
|
break;
|
|
964
964
|
case 1:
|
|
965
|
-
tmp = render(_this__u8e3s4.
|
|
965
|
+
tmp = render(_this__u8e3s4.j2o()) + 'deg';
|
|
966
966
|
break;
|
|
967
967
|
case 2:
|
|
968
968
|
tmp = render(hueAsRad(_this__u8e3s4)) + 'rad';
|
|
@@ -997,27 +997,27 @@
|
|
|
997
997
|
return AngleUnit_AUTO_instance;
|
|
998
998
|
}
|
|
999
999
|
function hueOr(_this__u8e3s4, whenNaN) {
|
|
1000
|
-
return isNaN_0(_this__u8e3s4.
|
|
1000
|
+
return isNaN_0(_this__u8e3s4.j2o()) ? numberToDouble(whenNaN) : _this__u8e3s4.j2o();
|
|
1001
1001
|
}
|
|
1002
1002
|
function hueAsRad(_this__u8e3s4) {
|
|
1003
|
-
return degToRad(_this__u8e3s4.
|
|
1003
|
+
return degToRad(_this__u8e3s4.j2o());
|
|
1004
1004
|
}
|
|
1005
1005
|
function hueAsGrad(_this__u8e3s4) {
|
|
1006
|
-
return degToGrad(_this__u8e3s4.
|
|
1006
|
+
return degToGrad(_this__u8e3s4.j2o());
|
|
1007
1007
|
}
|
|
1008
1008
|
function hueAsTurns(_this__u8e3s4) {
|
|
1009
|
-
return degToTurns(_this__u8e3s4.
|
|
1009
|
+
return degToTurns(_this__u8e3s4.j2o());
|
|
1010
1010
|
}
|
|
1011
1011
|
function WhitePoint(name, chromaticity) {
|
|
1012
|
-
this.
|
|
1013
|
-
this.
|
|
1012
|
+
this.k2o_1 = name;
|
|
1013
|
+
this.l2o_1 = chromaticity;
|
|
1014
1014
|
}
|
|
1015
1015
|
protoOf(WhitePoint).toString = function () {
|
|
1016
|
-
return this.
|
|
1016
|
+
return this.k2o_1;
|
|
1017
1017
|
};
|
|
1018
1018
|
protoOf(WhitePoint).hashCode = function () {
|
|
1019
|
-
var result = getStringHashCode(this.
|
|
1020
|
-
result = imul(result, 31) + this.
|
|
1019
|
+
var result = getStringHashCode(this.k2o_1);
|
|
1020
|
+
result = imul(result, 31) + this.l2o_1.hashCode() | 0;
|
|
1021
1021
|
return result;
|
|
1022
1022
|
};
|
|
1023
1023
|
protoOf(WhitePoint).equals = function (other) {
|
|
@@ -1026,22 +1026,22 @@
|
|
|
1026
1026
|
if (!(other instanceof WhitePoint))
|
|
1027
1027
|
return false;
|
|
1028
1028
|
var tmp0_other_with_cast = other instanceof WhitePoint ? other : THROW_CCE();
|
|
1029
|
-
if (!(this.
|
|
1029
|
+
if (!(this.k2o_1 === tmp0_other_with_cast.k2o_1))
|
|
1030
1030
|
return false;
|
|
1031
|
-
if (!this.
|
|
1031
|
+
if (!this.l2o_1.equals(tmp0_other_with_cast.l2o_1))
|
|
1032
1032
|
return false;
|
|
1033
1033
|
return true;
|
|
1034
1034
|
};
|
|
1035
1035
|
function Illuminant() {
|
|
1036
1036
|
Illuminant_instance = this;
|
|
1037
|
-
this.
|
|
1038
|
-
this.
|
|
1039
|
-
this.
|
|
1040
|
-
this.
|
|
1041
|
-
this.
|
|
1042
|
-
this.
|
|
1043
|
-
this.
|
|
1044
|
-
this.
|
|
1037
|
+
this.m2o_1 = new WhitePoint('A', xyY_init_$Create$(0.44758, 0.40745));
|
|
1038
|
+
this.n2o_1 = new WhitePoint('B', xyY_init_$Create$(0.34842, 0.35161));
|
|
1039
|
+
this.o2o_1 = new WhitePoint('C', xyY_init_$Create$(0.31006, 0.31616));
|
|
1040
|
+
this.p2o_1 = new WhitePoint('D50', xyY_init_$Create$(0.3457, 0.3585));
|
|
1041
|
+
this.q2o_1 = new WhitePoint('D55', xyY_init_$Create$(0.33243, 0.34744));
|
|
1042
|
+
this.r2o_1 = new WhitePoint('D65', xyY_init_$Create$(0.3127, 0.329));
|
|
1043
|
+
this.s2o_1 = new WhitePoint('D75', xyY_init_$Create$(0.29903, 0.31488));
|
|
1044
|
+
this.t2o_1 = new WhitePoint('E', xyY_init_$Create$(0.3333333333333333, 0.3333333333333333));
|
|
1045
1045
|
}
|
|
1046
1046
|
var Illuminant_instance;
|
|
1047
1047
|
function Illuminant_getInstance() {
|
|
@@ -1147,7 +1147,7 @@
|
|
|
1147
1147
|
}
|
|
1148
1148
|
function CssColors() {
|
|
1149
1149
|
CssColors_instance = this;
|
|
1150
|
-
this.
|
|
1150
|
+
this.g2m_1 = mapOf([to('black', Companion_getInstance_5().u2o(0, 0, 0)), to('silver', Companion_getInstance_5().u2o(192, 192, 192)), to('gray', Companion_getInstance_5().u2o(128, 128, 128)), to('white', Companion_getInstance_5().u2o(255, 255, 255)), to('maroon', Companion_getInstance_5().u2o(128, 0, 0)), to('red', Companion_getInstance_5().u2o(255, 0, 0)), to('purple', Companion_getInstance_5().u2o(128, 0, 128)), to('fuchsia', Companion_getInstance_5().u2o(255, 0, 255)), to('green', Companion_getInstance_5().u2o(0, 128, 0)), to('lime', Companion_getInstance_5().u2o(0, 255, 0)), to('olive', Companion_getInstance_5().u2o(128, 128, 0)), to('yellow', Companion_getInstance_5().u2o(255, 255, 0)), to('navy', Companion_getInstance_5().u2o(0, 0, 128)), to('blue', Companion_getInstance_5().u2o(0, 0, 255)), to('teal', Companion_getInstance_5().u2o(0, 128, 128)), to('aqua', Companion_getInstance_5().u2o(0, 255, 255)), to('orange', Companion_getInstance_5().u2o(255, 165, 0)), to('aliceblue', Companion_getInstance_5().u2o(240, 248, 255)), to('antiquewhite', Companion_getInstance_5().u2o(250, 235, 215)), to('aquamarine', Companion_getInstance_5().u2o(127, 255, 212)), to('azure', Companion_getInstance_5().u2o(240, 255, 255)), to('beige', Companion_getInstance_5().u2o(245, 245, 220)), to('bisque', Companion_getInstance_5().u2o(255, 228, 196)), to('blanchedalmond', Companion_getInstance_5().u2o(255, 235, 205)), to('blueviolet', Companion_getInstance_5().u2o(138, 43, 226)), to('brown', Companion_getInstance_5().u2o(165, 42, 42)), to('burlywood', Companion_getInstance_5().u2o(222, 184, 135)), to('cadetblue', Companion_getInstance_5().u2o(95, 158, 160)), to('chartreuse', Companion_getInstance_5().u2o(127, 255, 0)), to('chocolate', Companion_getInstance_5().u2o(210, 105, 30)), to('coral', Companion_getInstance_5().u2o(255, 127, 80)), to('cornflowerblue', Companion_getInstance_5().u2o(100, 149, 237)), to('cornsilk', Companion_getInstance_5().u2o(255, 248, 220)), to('crimson', Companion_getInstance_5().u2o(220, 20, 60)), to('cyan', Companion_getInstance_5().u2o(0, 255, 255)), to('darkblue', Companion_getInstance_5().u2o(0, 0, 139)), to('darkcyan', Companion_getInstance_5().u2o(0, 139, 139)), to('darkgoldenrod', Companion_getInstance_5().u2o(184, 134, 11)), to('darkgray', Companion_getInstance_5().u2o(169, 169, 169)), to('darkgreen', Companion_getInstance_5().u2o(0, 100, 0)), to('darkgrey', Companion_getInstance_5().u2o(169, 169, 169)), to('darkkhaki', Companion_getInstance_5().u2o(189, 183, 107)), to('darkmagenta', Companion_getInstance_5().u2o(139, 0, 139)), to('darkolivegreen', Companion_getInstance_5().u2o(85, 107, 47)), to('darkorange', Companion_getInstance_5().u2o(255, 140, 0)), to('darkorchid', Companion_getInstance_5().u2o(153, 50, 204)), to('darkred', Companion_getInstance_5().u2o(139, 0, 0)), to('darksalmon', Companion_getInstance_5().u2o(233, 150, 122)), to('darkseagreen', Companion_getInstance_5().u2o(143, 188, 143)), to('darkslateblue', Companion_getInstance_5().u2o(72, 61, 139)), to('darkslategray', Companion_getInstance_5().u2o(47, 79, 79)), to('darkslategrey', Companion_getInstance_5().u2o(47, 79, 79)), to('darkturquoise', Companion_getInstance_5().u2o(0, 206, 209)), to('darkviolet', Companion_getInstance_5().u2o(148, 0, 211)), to('deeppink', Companion_getInstance_5().u2o(255, 20, 147)), to('deepskyblue', Companion_getInstance_5().u2o(0, 191, 255)), to('dimgray', Companion_getInstance_5().u2o(105, 105, 105)), to('dimgrey', Companion_getInstance_5().u2o(105, 105, 105)), to('dodgerblue', Companion_getInstance_5().u2o(30, 144, 255)), to('firebrick', Companion_getInstance_5().u2o(178, 34, 34)), to('floralwhite', Companion_getInstance_5().u2o(255, 250, 240)), to('forestgreen', Companion_getInstance_5().u2o(34, 139, 34)), to('gainsboro', Companion_getInstance_5().u2o(220, 220, 220)), to('ghostwhite', Companion_getInstance_5().u2o(248, 248, 255)), to('gold', Companion_getInstance_5().u2o(255, 215, 0)), to('goldenrod', Companion_getInstance_5().u2o(218, 165, 32)), to('greenyellow', Companion_getInstance_5().u2o(173, 255, 47)), to('grey', Companion_getInstance_5().u2o(128, 128, 128)), to('honeydew', Companion_getInstance_5().u2o(240, 255, 240)), to('hotpink', Companion_getInstance_5().u2o(255, 105, 180)), to('indianred', Companion_getInstance_5().u2o(205, 92, 92)), to('indigo', Companion_getInstance_5().u2o(75, 0, 130)), to('ivory', Companion_getInstance_5().u2o(255, 255, 240)), to('khaki', Companion_getInstance_5().u2o(240, 230, 140)), to('lavender', Companion_getInstance_5().u2o(230, 230, 250)), to('lavenderblush', Companion_getInstance_5().u2o(255, 240, 245)), to('lawngreen', Companion_getInstance_5().u2o(124, 252, 0)), to('lemonchiffon', Companion_getInstance_5().u2o(255, 250, 205)), to('lightblue', Companion_getInstance_5().u2o(173, 216, 230)), to('lightcoral', Companion_getInstance_5().u2o(240, 128, 128)), to('lightcyan', Companion_getInstance_5().u2o(224, 255, 255)), to('lightgoldenrodyellow', Companion_getInstance_5().u2o(250, 250, 210)), to('lightgray', Companion_getInstance_5().u2o(211, 211, 211)), to('lightgreen', Companion_getInstance_5().u2o(144, 238, 144)), to('lightgrey', Companion_getInstance_5().u2o(211, 211, 211)), to('lightpink', Companion_getInstance_5().u2o(255, 182, 193)), to('lightsalmon', Companion_getInstance_5().u2o(255, 160, 122)), to('lightseagreen', Companion_getInstance_5().u2o(32, 178, 170)), to('lightskyblue', Companion_getInstance_5().u2o(135, 206, 250)), to('lightslategray', Companion_getInstance_5().u2o(119, 136, 153)), to('lightslategrey', Companion_getInstance_5().u2o(119, 136, 153)), to('lightsteelblue', Companion_getInstance_5().u2o(176, 196, 222)), to('lightyellow', Companion_getInstance_5().u2o(255, 255, 224)), to('limegreen', Companion_getInstance_5().u2o(50, 205, 50)), to('linen', Companion_getInstance_5().u2o(250, 240, 230)), to('magenta', Companion_getInstance_5().u2o(255, 0, 255)), to('mediumaquamarine', Companion_getInstance_5().u2o(102, 205, 170)), to('mediumblue', Companion_getInstance_5().u2o(0, 0, 205)), to('mediumorchid', Companion_getInstance_5().u2o(186, 85, 211)), to('mediumpurple', Companion_getInstance_5().u2o(147, 112, 219)), to('mediumseagreen', Companion_getInstance_5().u2o(60, 179, 113)), to('mediumslateblue', Companion_getInstance_5().u2o(123, 104, 238)), to('mediumspringgreen', Companion_getInstance_5().u2o(0, 250, 154)), to('mediumturquoise', Companion_getInstance_5().u2o(72, 209, 204)), to('mediumvioletred', Companion_getInstance_5().u2o(199, 21, 133)), to('midnightblue', Companion_getInstance_5().u2o(25, 25, 112)), to('mintcream', Companion_getInstance_5().u2o(245, 255, 250)), to('mistyrose', Companion_getInstance_5().u2o(255, 228, 225)), to('moccasin', Companion_getInstance_5().u2o(255, 228, 181)), to('navajowhite', Companion_getInstance_5().u2o(255, 222, 173)), to('oldlace', Companion_getInstance_5().u2o(253, 245, 230)), to('olivedrab', Companion_getInstance_5().u2o(107, 142, 35)), to('orangered', Companion_getInstance_5().u2o(255, 69, 0)), to('orchid', Companion_getInstance_5().u2o(218, 112, 214)), to('palegoldenrod', Companion_getInstance_5().u2o(238, 232, 170)), to('palegreen', Companion_getInstance_5().u2o(152, 251, 152)), to('paleturquoise', Companion_getInstance_5().u2o(175, 238, 238)), to('palevioletred', Companion_getInstance_5().u2o(219, 112, 147)), to('papayawhip', Companion_getInstance_5().u2o(255, 239, 213)), to('peachpuff', Companion_getInstance_5().u2o(255, 218, 185)), to('peru', Companion_getInstance_5().u2o(205, 133, 63)), to('pink', Companion_getInstance_5().u2o(255, 192, 203)), to('plum', Companion_getInstance_5().u2o(221, 160, 221)), to('powderblue', Companion_getInstance_5().u2o(176, 224, 230)), to('rosybrown', Companion_getInstance_5().u2o(188, 143, 143)), to('royalblue', Companion_getInstance_5().u2o(65, 105, 225)), to('saddlebrown', Companion_getInstance_5().u2o(139, 69, 19)), to('salmon', Companion_getInstance_5().u2o(250, 128, 114)), to('sandybrown', Companion_getInstance_5().u2o(244, 164, 96)), to('seagreen', Companion_getInstance_5().u2o(46, 139, 87)), to('seashell', Companion_getInstance_5().u2o(255, 245, 238)), to('sienna', Companion_getInstance_5().u2o(160, 82, 45)), to('skyblue', Companion_getInstance_5().u2o(135, 206, 235)), to('slateblue', Companion_getInstance_5().u2o(106, 90, 205)), to('slategray', Companion_getInstance_5().u2o(112, 128, 144)), to('slategrey', Companion_getInstance_5().u2o(112, 128, 144)), to('snow', Companion_getInstance_5().u2o(255, 250, 250)), to('springgreen', Companion_getInstance_5().u2o(0, 255, 127)), to('steelblue', Companion_getInstance_5().u2o(70, 130, 180)), to('tan', Companion_getInstance_5().u2o(210, 180, 140)), to('thistle', Companion_getInstance_5().u2o(216, 191, 216)), to('tomato', Companion_getInstance_5().u2o(255, 99, 71)), to('turquoise', Companion_getInstance_5().u2o(64, 224, 208)), to('violet', Companion_getInstance_5().u2o(238, 130, 238)), to('wheat', Companion_getInstance_5().u2o(245, 222, 179)), to('whitesmoke', Companion_getInstance_5().u2o(245, 245, 245)), to('yellowgreen', Companion_getInstance_5().u2o(154, 205, 50)), to('rebeccapurple', Companion_getInstance_5().u2o(102, 51, 153)), to('transparent', Companion_getInstance_5().v2o(0, 0, 0, 0))]);
|
|
1151
1151
|
}
|
|
1152
1152
|
var CssColors_instance;
|
|
1153
1153
|
function CssColors_getInstance() {
|
|
@@ -1315,16 +1315,16 @@
|
|
|
1315
1315
|
}
|
|
1316
1316
|
function Companion_0() {
|
|
1317
1317
|
Companion_instance_0 = this;
|
|
1318
|
-
this.
|
|
1318
|
+
this.w2o_1 = polarComponentInfo('HSL');
|
|
1319
1319
|
}
|
|
1320
|
-
protoOf(Companion_0).
|
|
1320
|
+
protoOf(Companion_0).kd = function () {
|
|
1321
1321
|
return 'HSL';
|
|
1322
1322
|
};
|
|
1323
|
-
protoOf(Companion_0).
|
|
1324
|
-
return this.
|
|
1323
|
+
protoOf(Companion_0).x2o = function () {
|
|
1324
|
+
return this.w2o_1;
|
|
1325
1325
|
};
|
|
1326
|
-
protoOf(Companion_0).
|
|
1327
|
-
return color.
|
|
1326
|
+
protoOf(Companion_0).b2m = function (color) {
|
|
1327
|
+
return color.h2l();
|
|
1328
1328
|
};
|
|
1329
1329
|
var Companion_instance_0;
|
|
1330
1330
|
function Companion_getInstance_1() {
|
|
@@ -1349,56 +1349,56 @@
|
|
|
1349
1349
|
function HSL(h, s, l, alpha) {
|
|
1350
1350
|
Companion_getInstance_1();
|
|
1351
1351
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
1352
|
-
this.
|
|
1353
|
-
this.
|
|
1354
|
-
this.
|
|
1355
|
-
this.
|
|
1352
|
+
this.w2n_1 = h;
|
|
1353
|
+
this.x2n_1 = s;
|
|
1354
|
+
this.y2n_1 = l;
|
|
1355
|
+
this.z2n_1 = alpha;
|
|
1356
1356
|
}
|
|
1357
|
-
protoOf(HSL).
|
|
1358
|
-
return this.
|
|
1357
|
+
protoOf(HSL).j2o = function () {
|
|
1358
|
+
return this.w2n_1;
|
|
1359
1359
|
};
|
|
1360
|
-
protoOf(HSL).
|
|
1361
|
-
return this.
|
|
1360
|
+
protoOf(HSL).e2l = function () {
|
|
1361
|
+
return this.z2n_1;
|
|
1362
1362
|
};
|
|
1363
|
-
protoOf(HSL).
|
|
1363
|
+
protoOf(HSL).f2l = function () {
|
|
1364
1364
|
return Companion_getInstance_1();
|
|
1365
1365
|
};
|
|
1366
|
-
protoOf(HSL).
|
|
1367
|
-
if (this.
|
|
1368
|
-
return Companion_getInstance_5().
|
|
1366
|
+
protoOf(HSL).g2l = function () {
|
|
1367
|
+
if (this.x2n_1 < 1.0E-7)
|
|
1368
|
+
return Companion_getInstance_5().z2m(this.y2n_1, this.y2n_1, this.y2n_1, this.z2n_1);
|
|
1369
1369
|
var h = normalizeDeg_0(hueOr(this, 0)) / 30.0;
|
|
1370
|
-
var s = this.
|
|
1371
|
-
var l = this.
|
|
1372
|
-
return SRGB_getInstance().
|
|
1370
|
+
var s = this.x2n_1;
|
|
1371
|
+
var l = this.y2n_1;
|
|
1372
|
+
return SRGB_getInstance().z2m(toSRGB$f(h, s, l, 0), toSRGB$f(h, s, l, 8), toSRGB$f(h, s, l, 4), this.z2n_1);
|
|
1373
1373
|
};
|
|
1374
|
-
protoOf(HSL).
|
|
1374
|
+
protoOf(HSL).h2l = function () {
|
|
1375
1375
|
return this;
|
|
1376
1376
|
};
|
|
1377
|
-
protoOf(HSL).
|
|
1377
|
+
protoOf(HSL).x7 = function () {
|
|
1378
1378
|
var tmp$ret$0;
|
|
1379
1379
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1380
|
-
var tmp0_floatArrayOf = new Float32Array([this.
|
|
1380
|
+
var tmp0_floatArrayOf = new Float32Array([this.w2n_1, this.x2n_1, this.y2n_1, this.z2n_1]);
|
|
1381
1381
|
tmp$ret$0 = tmp0_floatArrayOf;
|
|
1382
1382
|
return tmp$ret$0;
|
|
1383
1383
|
};
|
|
1384
|
-
protoOf(HSL).
|
|
1384
|
+
protoOf(HSL).e2p = function (h, s, l, alpha) {
|
|
1385
1385
|
return new HSL(h, s, l, alpha);
|
|
1386
1386
|
};
|
|
1387
|
-
protoOf(HSL).
|
|
1388
|
-
h = h === VOID ? this.
|
|
1389
|
-
s = s === VOID ? this.
|
|
1390
|
-
l = l === VOID ? this.
|
|
1391
|
-
alpha = alpha === VOID ? this.
|
|
1392
|
-
return $super === VOID ? this.
|
|
1387
|
+
protoOf(HSL).f2p = function (h, s, l, alpha, $super) {
|
|
1388
|
+
h = h === VOID ? this.w2n_1 : h;
|
|
1389
|
+
s = s === VOID ? this.x2n_1 : s;
|
|
1390
|
+
l = l === VOID ? this.y2n_1 : l;
|
|
1391
|
+
alpha = alpha === VOID ? this.z2n_1 : alpha;
|
|
1392
|
+
return $super === VOID ? this.e2p(h, s, l, alpha) : $super.e2p.call(this, h, s, l, alpha);
|
|
1393
1393
|
};
|
|
1394
1394
|
protoOf(HSL).toString = function () {
|
|
1395
|
-
return 'HSL(h=' + this.
|
|
1395
|
+
return 'HSL(h=' + this.w2n_1 + ', s=' + this.x2n_1 + ', l=' + this.y2n_1 + ', alpha=' + this.z2n_1 + ')';
|
|
1396
1396
|
};
|
|
1397
1397
|
protoOf(HSL).hashCode = function () {
|
|
1398
|
-
var result = getNumberHashCode(this.
|
|
1399
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1400
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1401
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1398
|
+
var result = getNumberHashCode(this.w2n_1);
|
|
1399
|
+
result = imul(result, 31) + getNumberHashCode(this.x2n_1) | 0;
|
|
1400
|
+
result = imul(result, 31) + getNumberHashCode(this.y2n_1) | 0;
|
|
1401
|
+
result = imul(result, 31) + getNumberHashCode(this.z2n_1) | 0;
|
|
1402
1402
|
return result;
|
|
1403
1403
|
};
|
|
1404
1404
|
protoOf(HSL).equals = function (other) {
|
|
@@ -1407,28 +1407,28 @@
|
|
|
1407
1407
|
if (!(other instanceof HSL))
|
|
1408
1408
|
return false;
|
|
1409
1409
|
var tmp0_other_with_cast = other instanceof HSL ? other : THROW_CCE();
|
|
1410
|
-
if (!equals(this.
|
|
1410
|
+
if (!equals(this.w2n_1, tmp0_other_with_cast.w2n_1))
|
|
1411
1411
|
return false;
|
|
1412
|
-
if (!equals(this.
|
|
1412
|
+
if (!equals(this.x2n_1, tmp0_other_with_cast.x2n_1))
|
|
1413
1413
|
return false;
|
|
1414
|
-
if (!equals(this.
|
|
1414
|
+
if (!equals(this.y2n_1, tmp0_other_with_cast.y2n_1))
|
|
1415
1415
|
return false;
|
|
1416
|
-
if (!equals(this.
|
|
1416
|
+
if (!equals(this.z2n_1, tmp0_other_with_cast.z2n_1))
|
|
1417
1417
|
return false;
|
|
1418
1418
|
return true;
|
|
1419
1419
|
};
|
|
1420
1420
|
function Companion_1() {
|
|
1421
1421
|
Companion_instance_1 = this;
|
|
1422
|
-
this.
|
|
1422
|
+
this.g2p_1 = polarComponentInfo('HWB');
|
|
1423
1423
|
}
|
|
1424
|
-
protoOf(Companion_1).
|
|
1424
|
+
protoOf(Companion_1).kd = function () {
|
|
1425
1425
|
return 'HWB';
|
|
1426
1426
|
};
|
|
1427
|
-
protoOf(Companion_1).
|
|
1428
|
-
return this.
|
|
1427
|
+
protoOf(Companion_1).x2o = function () {
|
|
1428
|
+
return this.g2p_1;
|
|
1429
1429
|
};
|
|
1430
|
-
protoOf(Companion_1).
|
|
1431
|
-
return color.
|
|
1430
|
+
protoOf(Companion_1).b2m = function (color) {
|
|
1431
|
+
return color.a2m();
|
|
1432
1432
|
};
|
|
1433
1433
|
var Companion_instance_1;
|
|
1434
1434
|
function Companion_getInstance_2() {
|
|
@@ -1439,28 +1439,28 @@
|
|
|
1439
1439
|
function HWB(h, w, b, alpha) {
|
|
1440
1440
|
Companion_getInstance_2();
|
|
1441
1441
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
1442
|
-
this.
|
|
1443
|
-
this.
|
|
1444
|
-
this.
|
|
1445
|
-
this.
|
|
1442
|
+
this.f2o_1 = h;
|
|
1443
|
+
this.g2o_1 = w;
|
|
1444
|
+
this.h2o_1 = b;
|
|
1445
|
+
this.i2o_1 = alpha;
|
|
1446
1446
|
}
|
|
1447
|
-
protoOf(HWB).
|
|
1448
|
-
return this.
|
|
1447
|
+
protoOf(HWB).j2o = function () {
|
|
1448
|
+
return this.f2o_1;
|
|
1449
1449
|
};
|
|
1450
|
-
protoOf(HWB).
|
|
1451
|
-
return this.
|
|
1450
|
+
protoOf(HWB).e2l = function () {
|
|
1451
|
+
return this.i2o_1;
|
|
1452
1452
|
};
|
|
1453
|
-
protoOf(HWB).
|
|
1453
|
+
protoOf(HWB).f2l = function () {
|
|
1454
1454
|
return Companion_getInstance_2();
|
|
1455
1455
|
};
|
|
1456
|
-
protoOf(HWB).
|
|
1457
|
-
var h = this.
|
|
1458
|
-
var w = this.
|
|
1459
|
-
var b = this.
|
|
1460
|
-
var a = this.
|
|
1456
|
+
protoOf(HWB).g2l = function () {
|
|
1457
|
+
var h = this.f2o_1 / 60.0;
|
|
1458
|
+
var w = this.g2o_1;
|
|
1459
|
+
var b = this.h2o_1;
|
|
1460
|
+
var a = this.i2o_1;
|
|
1461
1461
|
if (w + b >= 1) {
|
|
1462
1462
|
var gray = w / (w + b);
|
|
1463
|
-
return Companion_getInstance_5().
|
|
1463
|
+
return Companion_getInstance_5().z2m(gray, gray, gray, a);
|
|
1464
1464
|
}
|
|
1465
1465
|
var v = 1 - b;
|
|
1466
1466
|
var i = numberToInt(h);
|
|
@@ -1469,37 +1469,37 @@
|
|
|
1469
1469
|
var tmp0_subject = i;
|
|
1470
1470
|
switch (tmp0_subject) {
|
|
1471
1471
|
case 1:
|
|
1472
|
-
return Companion_getInstance_5().
|
|
1472
|
+
return Companion_getInstance_5().z2m(n, v, w, a);
|
|
1473
1473
|
case 2:
|
|
1474
|
-
return Companion_getInstance_5().
|
|
1474
|
+
return Companion_getInstance_5().z2m(w, v, n, a);
|
|
1475
1475
|
case 3:
|
|
1476
|
-
return Companion_getInstance_5().
|
|
1476
|
+
return Companion_getInstance_5().z2m(w, n, v, a);
|
|
1477
1477
|
case 4:
|
|
1478
|
-
return Companion_getInstance_5().
|
|
1478
|
+
return Companion_getInstance_5().z2m(n, w, v, a);
|
|
1479
1479
|
case 5:
|
|
1480
|
-
return Companion_getInstance_5().
|
|
1480
|
+
return Companion_getInstance_5().z2m(v, w, n, a);
|
|
1481
1481
|
default:
|
|
1482
|
-
return Companion_getInstance_5().
|
|
1482
|
+
return Companion_getInstance_5().z2m(v, n, w, a);
|
|
1483
1483
|
}
|
|
1484
1484
|
};
|
|
1485
|
-
protoOf(HWB).
|
|
1485
|
+
protoOf(HWB).a2m = function () {
|
|
1486
1486
|
return this;
|
|
1487
1487
|
};
|
|
1488
|
-
protoOf(HWB).
|
|
1488
|
+
protoOf(HWB).x7 = function () {
|
|
1489
1489
|
var tmp$ret$0;
|
|
1490
1490
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1491
|
-
var tmp0_floatArrayOf = new Float32Array([this.
|
|
1491
|
+
var tmp0_floatArrayOf = new Float32Array([this.f2o_1, this.g2o_1, this.h2o_1, this.i2o_1]);
|
|
1492
1492
|
tmp$ret$0 = tmp0_floatArrayOf;
|
|
1493
1493
|
return tmp$ret$0;
|
|
1494
1494
|
};
|
|
1495
1495
|
protoOf(HWB).toString = function () {
|
|
1496
|
-
return 'HWB(h=' + this.
|
|
1496
|
+
return 'HWB(h=' + this.f2o_1 + ', w=' + this.g2o_1 + ', b=' + this.h2o_1 + ', alpha=' + this.i2o_1 + ')';
|
|
1497
1497
|
};
|
|
1498
1498
|
protoOf(HWB).hashCode = function () {
|
|
1499
|
-
var result = getNumberHashCode(this.
|
|
1500
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1501
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1502
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1499
|
+
var result = getNumberHashCode(this.f2o_1);
|
|
1500
|
+
result = imul(result, 31) + getNumberHashCode(this.g2o_1) | 0;
|
|
1501
|
+
result = imul(result, 31) + getNumberHashCode(this.h2o_1) | 0;
|
|
1502
|
+
result = imul(result, 31) + getNumberHashCode(this.i2o_1) | 0;
|
|
1503
1503
|
return result;
|
|
1504
1504
|
};
|
|
1505
1505
|
protoOf(HWB).equals = function (other) {
|
|
@@ -1508,13 +1508,13 @@
|
|
|
1508
1508
|
if (!(other instanceof HWB))
|
|
1509
1509
|
return false;
|
|
1510
1510
|
var tmp0_other_with_cast = other instanceof HWB ? other : THROW_CCE();
|
|
1511
|
-
if (!equals(this.
|
|
1511
|
+
if (!equals(this.f2o_1, tmp0_other_with_cast.f2o_1))
|
|
1512
1512
|
return false;
|
|
1513
|
-
if (!equals(this.
|
|
1513
|
+
if (!equals(this.g2o_1, tmp0_other_with_cast.g2o_1))
|
|
1514
1514
|
return false;
|
|
1515
|
-
if (!equals(this.
|
|
1515
|
+
if (!equals(this.h2o_1, tmp0_other_with_cast.h2o_1))
|
|
1516
1516
|
return false;
|
|
1517
|
-
if (!equals(this.
|
|
1517
|
+
if (!equals(this.i2o_1, tmp0_other_with_cast.i2o_1))
|
|
1518
1518
|
return false;
|
|
1519
1519
|
return true;
|
|
1520
1520
|
};
|
|
@@ -1556,14 +1556,14 @@
|
|
|
1556
1556
|
var ICTCP_LMS_TO_XYZ;
|
|
1557
1557
|
function ICtCp() {
|
|
1558
1558
|
}
|
|
1559
|
-
protoOf(ICtCp).
|
|
1560
|
-
var fo = RGBColorSpaces_getInstance().
|
|
1559
|
+
protoOf(ICtCp).l2p = function () {
|
|
1560
|
+
var fo = RGBColorSpaces_getInstance().j2n_1.m2p();
|
|
1561
1561
|
var tmp$ret$3;
|
|
1562
1562
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1563
1563
|
var tmp0_dot = get_ICTCP_ICTCP_to_LMS();
|
|
1564
|
-
var tmp1_dot = this.
|
|
1565
|
-
var tmp2_dot = this.
|
|
1566
|
-
var tmp3_dot = this.
|
|
1564
|
+
var tmp1_dot = this.h2p_1;
|
|
1565
|
+
var tmp2_dot = this.i2p_1;
|
|
1566
|
+
var tmp3_dot = this.j2p_1;
|
|
1567
1567
|
var tmp$ret$2;
|
|
1568
1568
|
// Inline function 'com.github.ajalt.colormath.model.ICtCp.toBT2020.<anonymous>' call
|
|
1569
1569
|
var tmp4__anonymous__pkmkx7 = Matrix__get_impl_xogbpk(tmp0_dot, 0, 0) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 0) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 0) * tmp3_dot;
|
|
@@ -1572,15 +1572,15 @@
|
|
|
1572
1572
|
var tmp$ret$1;
|
|
1573
1573
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1574
1574
|
var tmp0_dot_0 = get_ICTCP_LMS_to_RGB();
|
|
1575
|
-
var tmp1_dot_0 = PqNonlinearity_getInstance().
|
|
1576
|
-
var tmp2_dot_0 = PqNonlinearity_getInstance().
|
|
1577
|
-
var tmp3_dot_0 = PqNonlinearity_getInstance().
|
|
1575
|
+
var tmp1_dot_0 = PqNonlinearity_getInstance().v2p(tmp4__anonymous__pkmkx7);
|
|
1576
|
+
var tmp2_dot_0 = PqNonlinearity_getInstance().v2p(tmp5__anonymous__kpxxpo);
|
|
1577
|
+
var tmp3_dot_0 = PqNonlinearity_getInstance().v2p(tmp6__anonymous__fv9ai5);
|
|
1578
1578
|
var tmp$ret$0;
|
|
1579
1579
|
// Inline function 'com.github.ajalt.colormath.model.ICtCp.toBT2020.<anonymous>.<anonymous>' call
|
|
1580
1580
|
var tmp4__anonymous__pkmkx7_0 = Matrix__get_impl_xogbpk(tmp0_dot_0, 0, 0) * tmp1_dot_0 + Matrix__get_impl_xogbpk(tmp0_dot_0, 1, 0) * tmp2_dot_0 + Matrix__get_impl_xogbpk(tmp0_dot_0, 2, 0) * tmp3_dot_0;
|
|
1581
1581
|
var tmp5__anonymous__kpxxpo_0 = Matrix__get_impl_xogbpk(tmp0_dot_0, 0, 1) * tmp1_dot_0 + Matrix__get_impl_xogbpk(tmp0_dot_0, 1, 1) * tmp2_dot_0 + Matrix__get_impl_xogbpk(tmp0_dot_0, 2, 1) * tmp3_dot_0;
|
|
1582
1582
|
var tmp6__anonymous__fv9ai5_0 = Matrix__get_impl_xogbpk(tmp0_dot_0, 0, 2) * tmp1_dot_0 + Matrix__get_impl_xogbpk(tmp0_dot_0, 1, 2) * tmp2_dot_0 + Matrix__get_impl_xogbpk(tmp0_dot_0, 2, 2) * tmp3_dot_0;
|
|
1583
|
-
tmp$ret$0 = RGBColorSpaces_getInstance().
|
|
1583
|
+
tmp$ret$0 = RGBColorSpaces_getInstance().j2n_1.z2m(fo.w2p(tmp4__anonymous__pkmkx7_0), fo.w2p(tmp5__anonymous__kpxxpo_0), fo.w2p(tmp6__anonymous__fv9ai5_0), this.k2p_1);
|
|
1584
1584
|
tmp$ret$1 = tmp$ret$0;
|
|
1585
1585
|
tmp$ret$2 = tmp$ret$1;
|
|
1586
1586
|
tmp$ret$3 = tmp$ret$2;
|
|
@@ -1588,22 +1588,22 @@
|
|
|
1588
1588
|
};
|
|
1589
1589
|
function PqNonlinearity() {
|
|
1590
1590
|
PqNonlinearity_instance = this;
|
|
1591
|
-
this.
|
|
1592
|
-
this.
|
|
1593
|
-
this.
|
|
1594
|
-
this.
|
|
1595
|
-
this.
|
|
1596
|
-
this.
|
|
1597
|
-
this.
|
|
1598
|
-
this.
|
|
1599
|
-
}
|
|
1600
|
-
protoOf(PqNonlinearity).
|
|
1591
|
+
this.n2p_1 = 0.1593017578125;
|
|
1592
|
+
this.o2p_1 = 78.84375;
|
|
1593
|
+
this.p2p_1 = 0.8359375;
|
|
1594
|
+
this.q2p_1 = 18.8515625;
|
|
1595
|
+
this.r2p_1 = 18.6875;
|
|
1596
|
+
this.s2p_1 = 10000.0;
|
|
1597
|
+
this.t2p_1 = 6.277394636015326;
|
|
1598
|
+
this.u2p_1 = 0.012683313515655966;
|
|
1599
|
+
}
|
|
1600
|
+
protoOf(PqNonlinearity).v2p = function (x) {
|
|
1601
1601
|
var vp = spow(x, 0.012683313515655966);
|
|
1602
1602
|
var n = coerceAtLeast_0(vp - 0.8359375, 0.0);
|
|
1603
1603
|
var l = spow_0(n / (18.8515625 - 18.6875 * vp), 6.277394636015326);
|
|
1604
1604
|
return 10000.0 * l;
|
|
1605
1605
|
};
|
|
1606
|
-
protoOf(PqNonlinearity).
|
|
1606
|
+
protoOf(PqNonlinearity).w2p = function (x) {
|
|
1607
1607
|
var yp = spow_0(x / 10000.0, 0.1593017578125);
|
|
1608
1608
|
return spow_0((0.8359375 + 18.8515625 * yp) / (1.0 + 18.6875 * yp), 78.84375);
|
|
1609
1609
|
};
|
|
@@ -1630,28 +1630,28 @@
|
|
|
1630
1630
|
}
|
|
1631
1631
|
function Companion_2() {
|
|
1632
1632
|
Companion_instance_2 = this;
|
|
1633
|
-
this.
|
|
1633
|
+
this.a2n_1 = LABColorSpaces_getInstance().t2n_1;
|
|
1634
1634
|
}
|
|
1635
|
-
protoOf(Companion_2).
|
|
1636
|
-
return this.
|
|
1635
|
+
protoOf(Companion_2).x2o = function () {
|
|
1636
|
+
return this.a2n_1.x2o();
|
|
1637
1637
|
};
|
|
1638
|
-
protoOf(Companion_2).
|
|
1639
|
-
return this.
|
|
1638
|
+
protoOf(Companion_2).kd = function () {
|
|
1639
|
+
return this.a2n_1.kd();
|
|
1640
1640
|
};
|
|
1641
|
-
protoOf(Companion_2).
|
|
1642
|
-
return this.
|
|
1641
|
+
protoOf(Companion_2).c2m = function () {
|
|
1642
|
+
return this.a2n_1.c2m();
|
|
1643
1643
|
};
|
|
1644
|
-
protoOf(Companion_2).
|
|
1645
|
-
return this.
|
|
1644
|
+
protoOf(Companion_2).b2m = function (color) {
|
|
1645
|
+
return this.a2n_1.b2m(color);
|
|
1646
1646
|
};
|
|
1647
|
-
protoOf(Companion_2).
|
|
1648
|
-
return this.
|
|
1647
|
+
protoOf(Companion_2).d2m = function (components) {
|
|
1648
|
+
return this.a2n_1.d2m(components);
|
|
1649
1649
|
};
|
|
1650
|
-
protoOf(Companion_2).
|
|
1651
|
-
return this.
|
|
1650
|
+
protoOf(Companion_2).z2m = function (l, a, b, alpha) {
|
|
1651
|
+
return this.a2n_1.z2m(l, a, b, alpha);
|
|
1652
1652
|
};
|
|
1653
|
-
protoOf(Companion_2).
|
|
1654
|
-
return this.
|
|
1653
|
+
protoOf(Companion_2).x2p = function (l, a, b, alpha) {
|
|
1654
|
+
return this.a2n_1.x2p(l, a, b, alpha);
|
|
1655
1655
|
};
|
|
1656
1656
|
var Companion_instance_2;
|
|
1657
1657
|
function Companion_getInstance_3() {
|
|
@@ -1661,37 +1661,37 @@
|
|
|
1661
1661
|
}
|
|
1662
1662
|
function LAB(l, a, b, alpha, space) {
|
|
1663
1663
|
Companion_getInstance_3();
|
|
1664
|
-
this.
|
|
1665
|
-
this.
|
|
1666
|
-
this.
|
|
1667
|
-
this.
|
|
1668
|
-
this.
|
|
1669
|
-
}
|
|
1670
|
-
protoOf(LAB).
|
|
1671
|
-
return this.
|
|
1672
|
-
};
|
|
1673
|
-
protoOf(LAB).
|
|
1674
|
-
return this.
|
|
1675
|
-
};
|
|
1676
|
-
protoOf(LAB).
|
|
1677
|
-
var tmp0_subject = this.
|
|
1678
|
-
return tmp0_subject === 0.0 ? Companion_getInstance_5().
|
|
1679
|
-
};
|
|
1680
|
-
protoOf(LAB).
|
|
1681
|
-
var xyzSpace = XYZColorSpace_0(this.
|
|
1682
|
-
if (this.
|
|
1683
|
-
return xyzSpace.
|
|
1684
|
-
var fy = (this.
|
|
1685
|
-
var fz = fy - this.
|
|
1686
|
-
var fx = this.
|
|
1664
|
+
this.v2l_1 = l;
|
|
1665
|
+
this.w2l_1 = a;
|
|
1666
|
+
this.x2l_1 = b;
|
|
1667
|
+
this.y2l_1 = alpha;
|
|
1668
|
+
this.z2l_1 = space;
|
|
1669
|
+
}
|
|
1670
|
+
protoOf(LAB).e2l = function () {
|
|
1671
|
+
return this.y2l_1;
|
|
1672
|
+
};
|
|
1673
|
+
protoOf(LAB).f2l = function () {
|
|
1674
|
+
return this.z2l_1;
|
|
1675
|
+
};
|
|
1676
|
+
protoOf(LAB).g2l = function () {
|
|
1677
|
+
var tmp0_subject = this.v2l_1;
|
|
1678
|
+
return tmp0_subject === 0.0 ? Companion_getInstance_5().z2m(0.0, 0.0, 0.0, this.y2l_1) : this.n2l().g2l();
|
|
1679
|
+
};
|
|
1680
|
+
protoOf(LAB).n2l = function () {
|
|
1681
|
+
var xyzSpace = XYZColorSpace_0(this.z2l_1.c2m());
|
|
1682
|
+
if (this.v2l_1 === 0.0)
|
|
1683
|
+
return xyzSpace.y2p(0.0, 0.0, 0.0);
|
|
1684
|
+
var fy = (this.v2l_1 + 16) / 116.0;
|
|
1685
|
+
var fz = fy - this.x2l_1 / 200.0;
|
|
1686
|
+
var fx = this.w2l_1 / 500.0 + fy;
|
|
1687
1687
|
var tmp;
|
|
1688
|
-
if (this.
|
|
1688
|
+
if (this.v2l_1 > get_CIE_E_times_K()) {
|
|
1689
1689
|
var tmp$ret$0;
|
|
1690
1690
|
// Inline function 'kotlin.math.pow' call
|
|
1691
1691
|
tmp$ret$0 = Math.pow(fy, 3.0);
|
|
1692
1692
|
tmp = tmp$ret$0;
|
|
1693
1693
|
} else {
|
|
1694
|
-
tmp = this.
|
|
1694
|
+
tmp = this.v2l_1 / get_CIE_K();
|
|
1695
1695
|
}
|
|
1696
1696
|
var yr = tmp;
|
|
1697
1697
|
var tmp$ret$3;
|
|
@@ -1718,14 +1718,14 @@
|
|
|
1718
1718
|
tmp$ret$5 = tmp1_let > get_CIE_E() ? tmp1_let : (116 * fx - 16) / get_CIE_K();
|
|
1719
1719
|
tmp$ret$6 = tmp$ret$5;
|
|
1720
1720
|
var xr = tmp$ret$6;
|
|
1721
|
-
var wp = this.
|
|
1722
|
-
return xyzSpace.
|
|
1721
|
+
var wp = this.z2l_1.c2m().l2o_1;
|
|
1722
|
+
return xyzSpace.x2p(xr * wp.c2q(), yr * wp.b2q_1, zr * wp.d2q(), this.y2l_1);
|
|
1723
1723
|
};
|
|
1724
|
-
protoOf(LAB).
|
|
1724
|
+
protoOf(LAB).u2l = function () {
|
|
1725
1725
|
var tmp$ret$3;
|
|
1726
1726
|
// Inline function 'com.github.ajalt.colormath.internal.toPolarModel' call
|
|
1727
|
-
var tmp1_toPolarModel = this.
|
|
1728
|
-
var tmp2_toPolarModel = this.
|
|
1727
|
+
var tmp1_toPolarModel = this.w2l_1;
|
|
1728
|
+
var tmp2_toPolarModel = this.x2l_1;
|
|
1729
1729
|
var tmp$ret$0;
|
|
1730
1730
|
// Inline function 'kotlin.math.sqrt' call
|
|
1731
1731
|
var tmp0_sqrt = tmp1_toPolarModel * tmp1_toPolarModel + tmp2_toPolarModel * tmp2_toPolarModel;
|
|
@@ -1745,29 +1745,29 @@
|
|
|
1745
1745
|
var tmp$ret$2;
|
|
1746
1746
|
// Inline function 'com.github.ajalt.colormath.model.LAB.toLCHab.<anonymous>' call
|
|
1747
1747
|
var tmp3__anonymous__ufb84q = normalizeDeg_0(h);
|
|
1748
|
-
tmp$ret$2 = LCHabColorSpace(this.
|
|
1748
|
+
tmp$ret$2 = LCHabColorSpace(this.z2l_1.c2m()).z2m(this.v2l_1, c, tmp3__anonymous__ufb84q, this.y2l_1);
|
|
1749
1749
|
tmp$ret$3 = tmp$ret$2;
|
|
1750
1750
|
return tmp$ret$3;
|
|
1751
1751
|
};
|
|
1752
|
-
protoOf(LAB).
|
|
1752
|
+
protoOf(LAB).o2l = function () {
|
|
1753
1753
|
return this;
|
|
1754
1754
|
};
|
|
1755
|
-
protoOf(LAB).
|
|
1755
|
+
protoOf(LAB).x7 = function () {
|
|
1756
1756
|
var tmp$ret$0;
|
|
1757
1757
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1758
|
-
var tmp0_floatArrayOf = new Float32Array([this.
|
|
1758
|
+
var tmp0_floatArrayOf = new Float32Array([this.v2l_1, this.w2l_1, this.x2l_1, this.y2l_1]);
|
|
1759
1759
|
tmp$ret$0 = tmp0_floatArrayOf;
|
|
1760
1760
|
return tmp$ret$0;
|
|
1761
1761
|
};
|
|
1762
1762
|
protoOf(LAB).toString = function () {
|
|
1763
|
-
return 'LAB(l=' + this.
|
|
1763
|
+
return 'LAB(l=' + this.v2l_1 + ', a=' + this.w2l_1 + ', b=' + this.x2l_1 + ', alpha=' + this.y2l_1 + ', space=' + this.z2l_1 + ')';
|
|
1764
1764
|
};
|
|
1765
1765
|
protoOf(LAB).hashCode = function () {
|
|
1766
|
-
var result = getNumberHashCode(this.
|
|
1767
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1768
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1769
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1770
|
-
result = imul(result, 31) + hashCode(this.
|
|
1766
|
+
var result = getNumberHashCode(this.v2l_1);
|
|
1767
|
+
result = imul(result, 31) + getNumberHashCode(this.w2l_1) | 0;
|
|
1768
|
+
result = imul(result, 31) + getNumberHashCode(this.x2l_1) | 0;
|
|
1769
|
+
result = imul(result, 31) + getNumberHashCode(this.y2l_1) | 0;
|
|
1770
|
+
result = imul(result, 31) + hashCode(this.z2l_1) | 0;
|
|
1771
1771
|
return result;
|
|
1772
1772
|
};
|
|
1773
1773
|
protoOf(LAB).equals = function (other) {
|
|
@@ -1776,15 +1776,15 @@
|
|
|
1776
1776
|
if (!(other instanceof LAB))
|
|
1777
1777
|
return false;
|
|
1778
1778
|
var tmp0_other_with_cast = other instanceof LAB ? other : THROW_CCE();
|
|
1779
|
-
if (!equals(this.
|
|
1779
|
+
if (!equals(this.v2l_1, tmp0_other_with_cast.v2l_1))
|
|
1780
1780
|
return false;
|
|
1781
|
-
if (!equals(this.
|
|
1781
|
+
if (!equals(this.w2l_1, tmp0_other_with_cast.w2l_1))
|
|
1782
1782
|
return false;
|
|
1783
|
-
if (!equals(this.
|
|
1783
|
+
if (!equals(this.x2l_1, tmp0_other_with_cast.x2l_1))
|
|
1784
1784
|
return false;
|
|
1785
|
-
if (!equals(this.
|
|
1785
|
+
if (!equals(this.y2l_1, tmp0_other_with_cast.y2l_1))
|
|
1786
1786
|
return false;
|
|
1787
|
-
if (!equals(this.
|
|
1787
|
+
if (!equals(this.z2l_1, tmp0_other_with_cast.z2l_1))
|
|
1788
1788
|
return false;
|
|
1789
1789
|
return true;
|
|
1790
1790
|
};
|
|
@@ -1792,12 +1792,12 @@
|
|
|
1792
1792
|
}
|
|
1793
1793
|
function LABColorSpace_0(whitePoint) {
|
|
1794
1794
|
var tmp0_subject = whitePoint;
|
|
1795
|
-
return tmp0_subject.equals(Illuminant_getInstance().
|
|
1795
|
+
return tmp0_subject.equals(Illuminant_getInstance().r2o_1) ? LABColorSpaces_getInstance().t2n_1 : tmp0_subject.equals(Illuminant_getInstance().p2o_1) ? LABColorSpaces_getInstance().u2n_1 : new LABColorSpaceImpl(whitePoint);
|
|
1796
1796
|
}
|
|
1797
1797
|
function LABColorSpaces() {
|
|
1798
1798
|
LABColorSpaces_instance = this;
|
|
1799
|
-
this.
|
|
1800
|
-
this.
|
|
1799
|
+
this.t2n_1 = new LABColorSpaceImpl(Illuminant_getInstance().r2o_1);
|
|
1800
|
+
this.u2n_1 = new LABColorSpaceImpl(Illuminant_getInstance().p2o_1);
|
|
1801
1801
|
}
|
|
1802
1802
|
var LABColorSpaces_instance;
|
|
1803
1803
|
function LABColorSpaces_getInstance() {
|
|
@@ -1806,46 +1806,46 @@
|
|
|
1806
1806
|
return LABColorSpaces_instance;
|
|
1807
1807
|
}
|
|
1808
1808
|
function LABColorSpaceImpl(whitePoint) {
|
|
1809
|
-
this.
|
|
1810
|
-
this.
|
|
1809
|
+
this.e2q_1 = whitePoint;
|
|
1810
|
+
this.f2q_1 = rectangularComponentInfo('LAB');
|
|
1811
1811
|
}
|
|
1812
|
-
protoOf(LABColorSpaceImpl).
|
|
1813
|
-
return this.
|
|
1812
|
+
protoOf(LABColorSpaceImpl).c2m = function () {
|
|
1813
|
+
return this.e2q_1;
|
|
1814
1814
|
};
|
|
1815
|
-
protoOf(LABColorSpaceImpl).
|
|
1815
|
+
protoOf(LABColorSpaceImpl).kd = function () {
|
|
1816
1816
|
return 'LAB';
|
|
1817
1817
|
};
|
|
1818
|
-
protoOf(LABColorSpaceImpl).
|
|
1819
|
-
return this.
|
|
1818
|
+
protoOf(LABColorSpaceImpl).x2o = function () {
|
|
1819
|
+
return this.f2q_1;
|
|
1820
1820
|
};
|
|
1821
|
-
protoOf(LABColorSpaceImpl).
|
|
1821
|
+
protoOf(LABColorSpaceImpl).b2m = function (color) {
|
|
1822
1822
|
var tmp$ret$2;
|
|
1823
1823
|
// Inline function 'com.github.ajalt.colormath.internal.adaptToThis' call
|
|
1824
1824
|
var tmp;
|
|
1825
|
-
var tmp_0 = color.
|
|
1825
|
+
var tmp_0 = color.f2l();
|
|
1826
1826
|
var tmp0_safe_receiver = isInterface(tmp_0, WhitePointColorSpace) ? tmp_0 : null;
|
|
1827
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1828
|
-
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().
|
|
1827
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.c2m();
|
|
1828
|
+
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().r2o_1 : tmp1_elvis_lhs).equals(this.c2m())) {
|
|
1829
1829
|
var tmp$ret$0;
|
|
1830
1830
|
// Inline function 'com.github.ajalt.colormath.model.LABColorSpaceImpl.convert.<anonymous>' call
|
|
1831
|
-
tmp$ret$0 = color.
|
|
1831
|
+
tmp$ret$0 = color.o2l();
|
|
1832
1832
|
tmp = tmp$ret$0;
|
|
1833
1833
|
} else {
|
|
1834
1834
|
var tmp$ret$1;
|
|
1835
1835
|
// Inline function 'com.github.ajalt.colormath.model.LABColorSpaceImpl.convert.<anonymous>' call
|
|
1836
|
-
var tmp0__anonymous__q1qw7t = color.
|
|
1837
|
-
tmp$ret$1 = tmp0__anonymous__q1qw7t.
|
|
1836
|
+
var tmp0__anonymous__q1qw7t = color.n2l().q2n(XYZColorSpace_0(this.c2m()));
|
|
1837
|
+
tmp$ret$1 = tmp0__anonymous__q1qw7t.o2l();
|
|
1838
1838
|
tmp = tmp$ret$1;
|
|
1839
1839
|
}
|
|
1840
1840
|
tmp$ret$2 = tmp;
|
|
1841
1841
|
return tmp$ret$2;
|
|
1842
1842
|
};
|
|
1843
|
-
protoOf(LABColorSpaceImpl).
|
|
1843
|
+
protoOf(LABColorSpaceImpl).d2m = function (components) {
|
|
1844
1844
|
var tmp$ret$5;
|
|
1845
1845
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
1846
1846
|
var tmp$ret$4;
|
|
1847
1847
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
1848
|
-
var size = this.
|
|
1848
|
+
var size = this.x2o().i();
|
|
1849
1849
|
// Inline function 'kotlin.require' call
|
|
1850
1850
|
var containsLower = size - 1 | 0;
|
|
1851
1851
|
var containsArg = components.length;
|
|
@@ -1875,19 +1875,19 @@
|
|
|
1875
1875
|
tmp_2 = tmp$ret$1;
|
|
1876
1876
|
}
|
|
1877
1877
|
tmp$ret$2 = tmp_2;
|
|
1878
|
-
tmp$ret$3 = this.
|
|
1878
|
+
tmp$ret$3 = this.z2m(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
1879
1879
|
tmp$ret$4 = tmp$ret$3;
|
|
1880
1880
|
tmp$ret$5 = tmp$ret$4;
|
|
1881
1881
|
return tmp$ret$5;
|
|
1882
1882
|
};
|
|
1883
1883
|
protoOf(LABColorSpaceImpl).toString = function () {
|
|
1884
|
-
return 'LABColorSpace(' + this.
|
|
1884
|
+
return 'LABColorSpace(' + this.e2q_1 + ')';
|
|
1885
1885
|
};
|
|
1886
|
-
protoOf(LABColorSpaceImpl).
|
|
1886
|
+
protoOf(LABColorSpaceImpl).z2m = function (l, a, b, alpha) {
|
|
1887
1887
|
return new LAB(l, a, b, alpha, this);
|
|
1888
1888
|
};
|
|
1889
1889
|
protoOf(LABColorSpaceImpl).hashCode = function () {
|
|
1890
|
-
return this.
|
|
1890
|
+
return this.e2q_1.hashCode();
|
|
1891
1891
|
};
|
|
1892
1892
|
protoOf(LABColorSpaceImpl).equals = function (other) {
|
|
1893
1893
|
if (this === other)
|
|
@@ -1895,31 +1895,31 @@
|
|
|
1895
1895
|
if (!(other instanceof LABColorSpaceImpl))
|
|
1896
1896
|
return false;
|
|
1897
1897
|
var tmp0_other_with_cast = other instanceof LABColorSpaceImpl ? other : THROW_CCE();
|
|
1898
|
-
if (!this.
|
|
1898
|
+
if (!this.e2q_1.equals(tmp0_other_with_cast.e2q_1))
|
|
1899
1899
|
return false;
|
|
1900
1900
|
return true;
|
|
1901
1901
|
};
|
|
1902
1902
|
function Companion_3() {
|
|
1903
1903
|
Companion_instance_3 = this;
|
|
1904
|
-
this.
|
|
1904
|
+
this.b2n_1 = LCHabColorSpaces_getInstance().r2n_1;
|
|
1905
1905
|
}
|
|
1906
|
-
protoOf(Companion_3).
|
|
1907
|
-
return this.
|
|
1906
|
+
protoOf(Companion_3).x2o = function () {
|
|
1907
|
+
return this.b2n_1.x2o();
|
|
1908
1908
|
};
|
|
1909
|
-
protoOf(Companion_3).
|
|
1910
|
-
return this.
|
|
1909
|
+
protoOf(Companion_3).kd = function () {
|
|
1910
|
+
return this.b2n_1.kd();
|
|
1911
1911
|
};
|
|
1912
|
-
protoOf(Companion_3).
|
|
1913
|
-
return this.
|
|
1912
|
+
protoOf(Companion_3).c2m = function () {
|
|
1913
|
+
return this.b2n_1.c2m();
|
|
1914
1914
|
};
|
|
1915
|
-
protoOf(Companion_3).
|
|
1916
|
-
return this.
|
|
1915
|
+
protoOf(Companion_3).b2m = function (color) {
|
|
1916
|
+
return this.b2n_1.b2m(color);
|
|
1917
1917
|
};
|
|
1918
|
-
protoOf(Companion_3).
|
|
1919
|
-
return this.
|
|
1918
|
+
protoOf(Companion_3).d2m = function (components) {
|
|
1919
|
+
return this.b2n_1.d2m(components);
|
|
1920
1920
|
};
|
|
1921
|
-
protoOf(Companion_3).
|
|
1922
|
-
return this.
|
|
1921
|
+
protoOf(Companion_3).z2m = function (l, c, h, alpha) {
|
|
1922
|
+
return this.b2n_1.z2m(l, c, h, alpha);
|
|
1923
1923
|
};
|
|
1924
1924
|
var Companion_instance_3;
|
|
1925
1925
|
function Companion_getInstance_4() {
|
|
@@ -1929,32 +1929,32 @@
|
|
|
1929
1929
|
}
|
|
1930
1930
|
function LCHab(l, c, h, alpha, space) {
|
|
1931
1931
|
Companion_getInstance_4();
|
|
1932
|
-
this.
|
|
1933
|
-
this.
|
|
1934
|
-
this.
|
|
1935
|
-
this.
|
|
1936
|
-
this.
|
|
1932
|
+
this.a2o_1 = l;
|
|
1933
|
+
this.b2o_1 = c;
|
|
1934
|
+
this.c2o_1 = h;
|
|
1935
|
+
this.d2o_1 = alpha;
|
|
1936
|
+
this.e2o_1 = space;
|
|
1937
1937
|
}
|
|
1938
|
-
protoOf(LCHab).
|
|
1939
|
-
return this.
|
|
1938
|
+
protoOf(LCHab).j2o = function () {
|
|
1939
|
+
return this.c2o_1;
|
|
1940
1940
|
};
|
|
1941
|
-
protoOf(LCHab).
|
|
1942
|
-
return this.
|
|
1941
|
+
protoOf(LCHab).e2l = function () {
|
|
1942
|
+
return this.d2o_1;
|
|
1943
1943
|
};
|
|
1944
|
-
protoOf(LCHab).
|
|
1945
|
-
return this.
|
|
1944
|
+
protoOf(LCHab).f2l = function () {
|
|
1945
|
+
return this.e2o_1;
|
|
1946
1946
|
};
|
|
1947
|
-
protoOf(LCHab).
|
|
1948
|
-
return this.
|
|
1947
|
+
protoOf(LCHab).g2l = function () {
|
|
1948
|
+
return this.o2l().g2l();
|
|
1949
1949
|
};
|
|
1950
|
-
protoOf(LCHab).
|
|
1951
|
-
return this.
|
|
1950
|
+
protoOf(LCHab).n2l = function () {
|
|
1951
|
+
return this.o2l().n2l();
|
|
1952
1952
|
};
|
|
1953
|
-
protoOf(LCHab).
|
|
1953
|
+
protoOf(LCHab).o2l = function () {
|
|
1954
1954
|
var tmp$ret$3;
|
|
1955
1955
|
// Inline function 'com.github.ajalt.colormath.internal.fromPolarModel' call
|
|
1956
|
-
var tmp0_fromPolarModel = this.
|
|
1957
|
-
var tmp1_fromPolarModel = this.
|
|
1956
|
+
var tmp0_fromPolarModel = this.b2o_1;
|
|
1957
|
+
var tmp1_fromPolarModel = this.c2o_1;
|
|
1958
1958
|
var hDegrees = isNaN_0(tmp1_fromPolarModel) ? 0.0 : degToRad(tmp1_fromPolarModel);
|
|
1959
1959
|
var tmp$ret$0;
|
|
1960
1960
|
// Inline function 'kotlin.math.cos' call
|
|
@@ -1966,29 +1966,29 @@
|
|
|
1966
1966
|
var b = tmp0_fromPolarModel * tmp$ret$1;
|
|
1967
1967
|
var tmp$ret$2;
|
|
1968
1968
|
// Inline function 'com.github.ajalt.colormath.model.LCHab.toLAB.<anonymous>' call
|
|
1969
|
-
tmp$ret$2 = LABColorSpace_0(this.
|
|
1969
|
+
tmp$ret$2 = LABColorSpace_0(this.e2o_1.c2m()).z2m(this.a2o_1, a, b, this.d2o_1);
|
|
1970
1970
|
tmp$ret$3 = tmp$ret$2;
|
|
1971
1971
|
return tmp$ret$3;
|
|
1972
1972
|
};
|
|
1973
|
-
protoOf(LCHab).
|
|
1973
|
+
protoOf(LCHab).u2l = function () {
|
|
1974
1974
|
return this;
|
|
1975
1975
|
};
|
|
1976
|
-
protoOf(LCHab).
|
|
1976
|
+
protoOf(LCHab).x7 = function () {
|
|
1977
1977
|
var tmp$ret$0;
|
|
1978
1978
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1979
|
-
var tmp0_floatArrayOf = new Float32Array([this.
|
|
1979
|
+
var tmp0_floatArrayOf = new Float32Array([this.a2o_1, this.b2o_1, this.c2o_1, this.d2o_1]);
|
|
1980
1980
|
tmp$ret$0 = tmp0_floatArrayOf;
|
|
1981
1981
|
return tmp$ret$0;
|
|
1982
1982
|
};
|
|
1983
1983
|
protoOf(LCHab).toString = function () {
|
|
1984
|
-
return 'LCHab(l=' + this.
|
|
1984
|
+
return 'LCHab(l=' + this.a2o_1 + ', c=' + this.b2o_1 + ', h=' + this.c2o_1 + ', alpha=' + this.d2o_1 + ', space=' + this.e2o_1 + ')';
|
|
1985
1985
|
};
|
|
1986
1986
|
protoOf(LCHab).hashCode = function () {
|
|
1987
|
-
var result = getNumberHashCode(this.
|
|
1988
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1989
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1990
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1991
|
-
result = imul(result, 31) + hashCode(this.
|
|
1987
|
+
var result = getNumberHashCode(this.a2o_1);
|
|
1988
|
+
result = imul(result, 31) + getNumberHashCode(this.b2o_1) | 0;
|
|
1989
|
+
result = imul(result, 31) + getNumberHashCode(this.c2o_1) | 0;
|
|
1990
|
+
result = imul(result, 31) + getNumberHashCode(this.d2o_1) | 0;
|
|
1991
|
+
result = imul(result, 31) + hashCode(this.e2o_1) | 0;
|
|
1992
1992
|
return result;
|
|
1993
1993
|
};
|
|
1994
1994
|
protoOf(LCHab).equals = function (other) {
|
|
@@ -1997,26 +1997,26 @@
|
|
|
1997
1997
|
if (!(other instanceof LCHab))
|
|
1998
1998
|
return false;
|
|
1999
1999
|
var tmp0_other_with_cast = other instanceof LCHab ? other : THROW_CCE();
|
|
2000
|
-
if (!equals(this.
|
|
2000
|
+
if (!equals(this.a2o_1, tmp0_other_with_cast.a2o_1))
|
|
2001
2001
|
return false;
|
|
2002
|
-
if (!equals(this.
|
|
2002
|
+
if (!equals(this.b2o_1, tmp0_other_with_cast.b2o_1))
|
|
2003
2003
|
return false;
|
|
2004
|
-
if (!equals(this.
|
|
2004
|
+
if (!equals(this.c2o_1, tmp0_other_with_cast.c2o_1))
|
|
2005
2005
|
return false;
|
|
2006
|
-
if (!equals(this.
|
|
2006
|
+
if (!equals(this.d2o_1, tmp0_other_with_cast.d2o_1))
|
|
2007
2007
|
return false;
|
|
2008
|
-
if (!equals(this.
|
|
2008
|
+
if (!equals(this.e2o_1, tmp0_other_with_cast.e2o_1))
|
|
2009
2009
|
return false;
|
|
2010
2010
|
return true;
|
|
2011
2011
|
};
|
|
2012
2012
|
function LCHabColorSpace(whitePoint) {
|
|
2013
2013
|
var tmp0_subject = whitePoint;
|
|
2014
|
-
return tmp0_subject.equals(Illuminant_getInstance().
|
|
2014
|
+
return tmp0_subject.equals(Illuminant_getInstance().r2o_1) ? LCHabColorSpaces_getInstance().r2n_1 : tmp0_subject.equals(Illuminant_getInstance().p2o_1) ? LCHabColorSpaces_getInstance().s2n_1 : new LCHabColorSpaceImpl(whitePoint);
|
|
2015
2015
|
}
|
|
2016
2016
|
function LCHabColorSpaces() {
|
|
2017
2017
|
LCHabColorSpaces_instance = this;
|
|
2018
|
-
this.
|
|
2019
|
-
this.
|
|
2018
|
+
this.r2n_1 = new LCHabColorSpaceImpl(Illuminant_getInstance().r2o_1);
|
|
2019
|
+
this.s2n_1 = new LCHabColorSpaceImpl(Illuminant_getInstance().p2o_1);
|
|
2020
2020
|
}
|
|
2021
2021
|
var LCHabColorSpaces_instance;
|
|
2022
2022
|
function LCHabColorSpaces_getInstance() {
|
|
@@ -2025,46 +2025,46 @@
|
|
|
2025
2025
|
return LCHabColorSpaces_instance;
|
|
2026
2026
|
}
|
|
2027
2027
|
function LCHabColorSpaceImpl(whitePoint) {
|
|
2028
|
-
this.
|
|
2029
|
-
this.
|
|
2028
|
+
this.g2q_1 = whitePoint;
|
|
2029
|
+
this.h2q_1 = polarComponentInfo('LCH');
|
|
2030
2030
|
}
|
|
2031
|
-
protoOf(LCHabColorSpaceImpl).
|
|
2032
|
-
return this.
|
|
2031
|
+
protoOf(LCHabColorSpaceImpl).c2m = function () {
|
|
2032
|
+
return this.g2q_1;
|
|
2033
2033
|
};
|
|
2034
|
-
protoOf(LCHabColorSpaceImpl).
|
|
2034
|
+
protoOf(LCHabColorSpaceImpl).kd = function () {
|
|
2035
2035
|
return 'LCHab';
|
|
2036
2036
|
};
|
|
2037
|
-
protoOf(LCHabColorSpaceImpl).
|
|
2038
|
-
return this.
|
|
2037
|
+
protoOf(LCHabColorSpaceImpl).x2o = function () {
|
|
2038
|
+
return this.h2q_1;
|
|
2039
2039
|
};
|
|
2040
|
-
protoOf(LCHabColorSpaceImpl).
|
|
2040
|
+
protoOf(LCHabColorSpaceImpl).b2m = function (color) {
|
|
2041
2041
|
var tmp$ret$2;
|
|
2042
2042
|
// Inline function 'com.github.ajalt.colormath.internal.adaptToThis' call
|
|
2043
2043
|
var tmp;
|
|
2044
|
-
var tmp_0 = color.
|
|
2044
|
+
var tmp_0 = color.f2l();
|
|
2045
2045
|
var tmp0_safe_receiver = isInterface(tmp_0, WhitePointColorSpace) ? tmp_0 : null;
|
|
2046
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
2047
|
-
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().
|
|
2046
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.c2m();
|
|
2047
|
+
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().r2o_1 : tmp1_elvis_lhs).equals(this.c2m())) {
|
|
2048
2048
|
var tmp$ret$0;
|
|
2049
2049
|
// Inline function 'com.github.ajalt.colormath.model.LCHabColorSpaceImpl.convert.<anonymous>' call
|
|
2050
|
-
tmp$ret$0 = color.
|
|
2050
|
+
tmp$ret$0 = color.u2l();
|
|
2051
2051
|
tmp = tmp$ret$0;
|
|
2052
2052
|
} else {
|
|
2053
2053
|
var tmp$ret$1;
|
|
2054
2054
|
// Inline function 'com.github.ajalt.colormath.model.LCHabColorSpaceImpl.convert.<anonymous>' call
|
|
2055
|
-
var tmp0__anonymous__q1qw7t = color.
|
|
2056
|
-
tmp$ret$1 = tmp0__anonymous__q1qw7t.
|
|
2055
|
+
var tmp0__anonymous__q1qw7t = color.n2l().q2n(XYZColorSpace_0(this.c2m()));
|
|
2056
|
+
tmp$ret$1 = tmp0__anonymous__q1qw7t.u2l();
|
|
2057
2057
|
tmp = tmp$ret$1;
|
|
2058
2058
|
}
|
|
2059
2059
|
tmp$ret$2 = tmp;
|
|
2060
2060
|
return tmp$ret$2;
|
|
2061
2061
|
};
|
|
2062
|
-
protoOf(LCHabColorSpaceImpl).
|
|
2062
|
+
protoOf(LCHabColorSpaceImpl).d2m = function (components) {
|
|
2063
2063
|
var tmp$ret$5;
|
|
2064
2064
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2065
2065
|
var tmp$ret$4;
|
|
2066
2066
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2067
|
-
var size = this.
|
|
2067
|
+
var size = this.x2o().i();
|
|
2068
2068
|
// Inline function 'kotlin.require' call
|
|
2069
2069
|
var containsLower = size - 1 | 0;
|
|
2070
2070
|
var containsArg = components.length;
|
|
@@ -2094,19 +2094,19 @@
|
|
|
2094
2094
|
tmp_2 = tmp$ret$1;
|
|
2095
2095
|
}
|
|
2096
2096
|
tmp$ret$2 = tmp_2;
|
|
2097
|
-
tmp$ret$3 = this.
|
|
2097
|
+
tmp$ret$3 = this.z2m(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
2098
2098
|
tmp$ret$4 = tmp$ret$3;
|
|
2099
2099
|
tmp$ret$5 = tmp$ret$4;
|
|
2100
2100
|
return tmp$ret$5;
|
|
2101
2101
|
};
|
|
2102
2102
|
protoOf(LCHabColorSpaceImpl).toString = function () {
|
|
2103
|
-
return 'LCHabColorSpace(' + this.
|
|
2103
|
+
return 'LCHabColorSpace(' + this.g2q_1 + ')';
|
|
2104
2104
|
};
|
|
2105
|
-
protoOf(LCHabColorSpaceImpl).
|
|
2105
|
+
protoOf(LCHabColorSpaceImpl).z2m = function (l, c, h, alpha) {
|
|
2106
2106
|
return new LCHab(l, c, h, alpha, this);
|
|
2107
2107
|
};
|
|
2108
2108
|
protoOf(LCHabColorSpaceImpl).hashCode = function () {
|
|
2109
|
-
return this.
|
|
2109
|
+
return this.g2q_1.hashCode();
|
|
2110
2110
|
};
|
|
2111
2111
|
protoOf(LCHabColorSpaceImpl).equals = function (other) {
|
|
2112
2112
|
if (this === other)
|
|
@@ -2114,24 +2114,24 @@
|
|
|
2114
2114
|
if (!(other instanceof LCHabColorSpaceImpl))
|
|
2115
2115
|
return false;
|
|
2116
2116
|
var tmp0_other_with_cast = other instanceof LCHabColorSpaceImpl ? other : THROW_CCE();
|
|
2117
|
-
if (!this.
|
|
2117
|
+
if (!this.g2q_1.equals(tmp0_other_with_cast.g2q_1))
|
|
2118
2118
|
return false;
|
|
2119
2119
|
return true;
|
|
2120
2120
|
};
|
|
2121
2121
|
function GammaTransferFunctions(gamma) {
|
|
2122
|
-
this.
|
|
2122
|
+
this.i2q_1 = gamma;
|
|
2123
2123
|
}
|
|
2124
|
-
protoOf(GammaTransferFunctions).
|
|
2125
|
-
return spow(x, this.
|
|
2124
|
+
protoOf(GammaTransferFunctions).v2p = function (x) {
|
|
2125
|
+
return spow(x, this.i2q_1);
|
|
2126
2126
|
};
|
|
2127
|
-
protoOf(GammaTransferFunctions).
|
|
2128
|
-
return spow(x, 1.0 / this.
|
|
2127
|
+
protoOf(GammaTransferFunctions).w2p = function (x) {
|
|
2128
|
+
return spow(x, 1.0 / this.i2q_1);
|
|
2129
2129
|
};
|
|
2130
2130
|
protoOf(GammaTransferFunctions).toString = function () {
|
|
2131
|
-
return 'GammaTransferFunctions(gamma=' + this.
|
|
2131
|
+
return 'GammaTransferFunctions(gamma=' + this.i2q_1 + ')';
|
|
2132
2132
|
};
|
|
2133
2133
|
protoOf(GammaTransferFunctions).hashCode = function () {
|
|
2134
|
-
return getNumberHashCode(this.
|
|
2134
|
+
return getNumberHashCode(this.i2q_1);
|
|
2135
2135
|
};
|
|
2136
2136
|
protoOf(GammaTransferFunctions).equals = function (other) {
|
|
2137
2137
|
if (this === other)
|
|
@@ -2139,17 +2139,17 @@
|
|
|
2139
2139
|
if (!(other instanceof GammaTransferFunctions))
|
|
2140
2140
|
return false;
|
|
2141
2141
|
var tmp0_other_with_cast = other instanceof GammaTransferFunctions ? other : THROW_CCE();
|
|
2142
|
-
if (!equals(this.
|
|
2142
|
+
if (!equals(this.i2q_1, tmp0_other_with_cast.i2q_1))
|
|
2143
2143
|
return false;
|
|
2144
2144
|
return true;
|
|
2145
2145
|
};
|
|
2146
2146
|
function LinearTransferFunctions() {
|
|
2147
2147
|
LinearTransferFunctions_instance = this;
|
|
2148
2148
|
}
|
|
2149
|
-
protoOf(LinearTransferFunctions).
|
|
2149
|
+
protoOf(LinearTransferFunctions).v2p = function (x) {
|
|
2150
2150
|
return x;
|
|
2151
2151
|
};
|
|
2152
|
-
protoOf(LinearTransferFunctions).
|
|
2152
|
+
protoOf(LinearTransferFunctions).w2p = function (x) {
|
|
2153
2153
|
return x;
|
|
2154
2154
|
};
|
|
2155
2155
|
var LinearTransferFunctions_instance;
|
|
@@ -2162,43 +2162,43 @@
|
|
|
2162
2162
|
}
|
|
2163
2163
|
function Companion_4() {
|
|
2164
2164
|
Companion_instance_4 = this;
|
|
2165
|
-
this.
|
|
2165
|
+
this.x2m_1 = RGBColorSpaces_getInstance().c2n_1;
|
|
2166
2166
|
}
|
|
2167
|
-
protoOf(Companion_4).
|
|
2168
|
-
return this.
|
|
2167
|
+
protoOf(Companion_4).x2o = function () {
|
|
2168
|
+
return this.x2m_1.x2o();
|
|
2169
2169
|
};
|
|
2170
|
-
protoOf(Companion_4).
|
|
2171
|
-
return this.
|
|
2170
|
+
protoOf(Companion_4).k2q = function () {
|
|
2171
|
+
return this.x2m_1.k2q();
|
|
2172
2172
|
};
|
|
2173
|
-
protoOf(Companion_4).
|
|
2174
|
-
return this.
|
|
2173
|
+
protoOf(Companion_4).j2q = function () {
|
|
2174
|
+
return this.x2m_1.j2q();
|
|
2175
2175
|
};
|
|
2176
|
-
protoOf(Companion_4).
|
|
2177
|
-
return this.
|
|
2176
|
+
protoOf(Companion_4).kd = function () {
|
|
2177
|
+
return this.x2m_1.kd();
|
|
2178
2178
|
};
|
|
2179
|
-
protoOf(Companion_4).
|
|
2180
|
-
return this.
|
|
2179
|
+
protoOf(Companion_4).m2p = function () {
|
|
2180
|
+
return this.x2m_1.m2p();
|
|
2181
2181
|
};
|
|
2182
|
-
protoOf(Companion_4).
|
|
2183
|
-
return this.
|
|
2182
|
+
protoOf(Companion_4).c2m = function () {
|
|
2183
|
+
return this.x2m_1.c2m();
|
|
2184
2184
|
};
|
|
2185
|
-
protoOf(Companion_4).
|
|
2186
|
-
return this.
|
|
2185
|
+
protoOf(Companion_4).b2m = function (color) {
|
|
2186
|
+
return this.x2m_1.b2m(color);
|
|
2187
2187
|
};
|
|
2188
|
-
protoOf(Companion_4).
|
|
2189
|
-
return this.
|
|
2188
|
+
protoOf(Companion_4).d2m = function (components) {
|
|
2189
|
+
return this.x2m_1.d2m(components);
|
|
2190
2190
|
};
|
|
2191
|
-
protoOf(Companion_4).
|
|
2192
|
-
return this.
|
|
2191
|
+
protoOf(Companion_4).v2o = function (r, g, b, alpha) {
|
|
2192
|
+
return this.x2m_1.v2o(r, g, b, alpha);
|
|
2193
2193
|
};
|
|
2194
|
-
protoOf(Companion_4).
|
|
2195
|
-
return this.
|
|
2194
|
+
protoOf(Companion_4).z2m = function (r, g, b, alpha) {
|
|
2195
|
+
return this.x2m_1.z2m(r, g, b, alpha);
|
|
2196
2196
|
};
|
|
2197
|
-
protoOf(Companion_4).
|
|
2198
|
-
return this.
|
|
2197
|
+
protoOf(Companion_4).x2p = function (r, g, b, alpha) {
|
|
2198
|
+
return this.x2m_1.x2p(r, g, b, alpha);
|
|
2199
2199
|
};
|
|
2200
|
-
protoOf(Companion_4).
|
|
2201
|
-
return this.
|
|
2200
|
+
protoOf(Companion_4).y2m = function (hex) {
|
|
2201
|
+
return this.x2m_1.y2m(hex);
|
|
2202
2202
|
};
|
|
2203
2203
|
var Companion_instance_4;
|
|
2204
2204
|
function Companion_getInstance_5() {
|
|
@@ -2208,42 +2208,42 @@
|
|
|
2208
2208
|
}
|
|
2209
2209
|
function RGB(r, g, b, alpha, space) {
|
|
2210
2210
|
Companion_getInstance_5();
|
|
2211
|
-
this.
|
|
2212
|
-
this.
|
|
2213
|
-
this.
|
|
2214
|
-
this.
|
|
2215
|
-
this.
|
|
2211
|
+
this.i2l_1 = r;
|
|
2212
|
+
this.j2l_1 = g;
|
|
2213
|
+
this.k2l_1 = b;
|
|
2214
|
+
this.l2l_1 = alpha;
|
|
2215
|
+
this.m2l_1 = space;
|
|
2216
2216
|
}
|
|
2217
|
-
protoOf(RGB).
|
|
2218
|
-
return this.
|
|
2217
|
+
protoOf(RGB).e2l = function () {
|
|
2218
|
+
return this.l2l_1;
|
|
2219
2219
|
};
|
|
2220
|
-
protoOf(RGB).
|
|
2221
|
-
return this.
|
|
2220
|
+
protoOf(RGB).f2l = function () {
|
|
2221
|
+
return this.m2l_1;
|
|
2222
2222
|
};
|
|
2223
|
-
protoOf(RGB).
|
|
2223
|
+
protoOf(RGB).v2n = function () {
|
|
2224
2224
|
var tmp$ret$1;
|
|
2225
2225
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
2226
2226
|
var tmp$ret$0;
|
|
2227
2227
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toRGBInt.<anonymous>' call
|
|
2228
|
-
var tmp0__anonymous__q1qw7t = this.
|
|
2229
|
-
tmp$ret$0 = _RGBInt___init__impl__lqova7_1(tmp0__anonymous__q1qw7t.
|
|
2228
|
+
var tmp0__anonymous__q1qw7t = this.l2q(SRGB_getInstance());
|
|
2229
|
+
tmp$ret$0 = _RGBInt___init__impl__lqova7_1(tmp0__anonymous__q1qw7t.i2l_1, tmp0__anonymous__q1qw7t.j2l_1, tmp0__anonymous__q1qw7t.k2l_1, nanToOne(tmp0__anonymous__q1qw7t.l2l_1));
|
|
2230
2230
|
tmp$ret$1 = tmp$ret$0;
|
|
2231
2231
|
return tmp$ret$1;
|
|
2232
2232
|
};
|
|
2233
|
-
protoOf(RGB).
|
|
2234
|
-
var f = SRGB_getInstance().
|
|
2235
|
-
return equals(this.
|
|
2233
|
+
protoOf(RGB).l2q = function (space) {
|
|
2234
|
+
var f = SRGB_getInstance().b2p_1;
|
|
2235
|
+
return equals(this.m2l_1, space) ? this : (equals(this.m2l_1, SRGB_getInstance()) ? equals(space, RGBColorSpaces_getInstance().d2n_1) : false) ? space.z2m(f.v2p(this.i2l_1), f.v2p(this.j2l_1), f.v2p(this.k2l_1), this.l2l_1) : (equals(this.m2l_1, RGBColorSpaces_getInstance().d2n_1) ? equals(space, SRGB_getInstance()) : false) ? space.z2m(f.w2p(this.i2l_1), f.w2p(this.j2l_1), f.w2p(this.k2l_1), this.l2l_1) : this.n2l().m2q(space);
|
|
2236
2236
|
};
|
|
2237
|
-
protoOf(RGB).
|
|
2237
|
+
protoOf(RGB).h2l = function () {
|
|
2238
2238
|
var tmp$ret$3;
|
|
2239
2239
|
$l$block: {
|
|
2240
2240
|
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
2241
2241
|
var tmp$ret$4;
|
|
2242
2242
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
2243
|
-
var tmp0__anonymous__q1qw7t = this.
|
|
2244
|
-
var r = tmp0__anonymous__q1qw7t.
|
|
2245
|
-
var g = tmp0__anonymous__q1qw7t.
|
|
2246
|
-
var b = tmp0__anonymous__q1qw7t.
|
|
2243
|
+
var tmp0__anonymous__q1qw7t = this.l2q(SRGB_getInstance());
|
|
2244
|
+
var r = tmp0__anonymous__q1qw7t.i2l_1;
|
|
2245
|
+
var g = tmp0__anonymous__q1qw7t.j2l_1;
|
|
2246
|
+
var b = tmp0__anonymous__q1qw7t.k2l_1;
|
|
2247
2247
|
var tmp$ret$0;
|
|
2248
2248
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
2249
2249
|
tmp$ret$0 = Math.min(r, g, b);
|
|
@@ -2272,40 +2272,40 @@
|
|
|
2272
2272
|
var tmp1__anonymous__uwfjfc = normalizeDeg(h);
|
|
2273
2273
|
var l = (min + max) / 2.0;
|
|
2274
2274
|
var s = max === min ? 0.0 : l <= 0.5 ? chroma / (max + min) : chroma / (2 - max - min);
|
|
2275
|
-
tmp$ret$2 = new HSL(tmp1__anonymous__uwfjfc, s, l, this.
|
|
2275
|
+
tmp$ret$2 = new HSL(tmp1__anonymous__uwfjfc, s, l, this.l2l_1);
|
|
2276
2276
|
tmp$ret$3 = tmp$ret$2;
|
|
2277
2277
|
break $l$block;
|
|
2278
2278
|
tmp$ret$3 = tmp$ret$4;
|
|
2279
2279
|
}
|
|
2280
2280
|
return tmp$ret$3;
|
|
2281
2281
|
};
|
|
2282
|
-
protoOf(RGB).
|
|
2283
|
-
var f = this.
|
|
2282
|
+
protoOf(RGB).n2l = function () {
|
|
2283
|
+
var f = this.m2l_1.m2p();
|
|
2284
2284
|
var tmp$ret$1;
|
|
2285
2285
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
2286
|
-
var tmp0_dot = _Matrix___init__impl__q3kp4w(this.
|
|
2287
|
-
var tmp1_dot = f.
|
|
2288
|
-
var tmp2_dot = f.
|
|
2289
|
-
var tmp3_dot = f.
|
|
2286
|
+
var tmp0_dot = _Matrix___init__impl__q3kp4w(this.m2l_1.j2q());
|
|
2287
|
+
var tmp1_dot = f.v2p(this.i2l_1);
|
|
2288
|
+
var tmp2_dot = f.v2p(this.j2l_1);
|
|
2289
|
+
var tmp3_dot = f.v2p(this.k2l_1);
|
|
2290
2290
|
var tmp$ret$0;
|
|
2291
2291
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toXYZ.<anonymous>' call
|
|
2292
2292
|
var tmp4__anonymous__pkmkx7 = Matrix__get_impl_xogbpk(tmp0_dot, 0, 0) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 0) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 0) * tmp3_dot;
|
|
2293
2293
|
var tmp5__anonymous__kpxxpo = Matrix__get_impl_xogbpk(tmp0_dot, 0, 1) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 1) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 1) * tmp3_dot;
|
|
2294
2294
|
var tmp6__anonymous__fv9ai5 = Matrix__get_impl_xogbpk(tmp0_dot, 0, 2) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 2) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 2) * tmp3_dot;
|
|
2295
|
-
tmp$ret$0 = XYZColorSpace_0(this.
|
|
2295
|
+
tmp$ret$0 = XYZColorSpace_0(this.m2l_1.c2m()).z2m(tmp4__anonymous__pkmkx7, tmp5__anonymous__kpxxpo, tmp6__anonymous__fv9ai5, this.l2l_1);
|
|
2296
2296
|
tmp$ret$1 = tmp$ret$0;
|
|
2297
2297
|
return tmp$ret$1;
|
|
2298
2298
|
};
|
|
2299
|
-
protoOf(RGB).
|
|
2299
|
+
protoOf(RGB).a2m = function () {
|
|
2300
2300
|
var tmp$ret$3;
|
|
2301
2301
|
$l$block: {
|
|
2302
2302
|
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
2303
2303
|
var tmp$ret$4;
|
|
2304
2304
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
2305
|
-
var tmp0__anonymous__q1qw7t = this.
|
|
2306
|
-
var r = tmp0__anonymous__q1qw7t.
|
|
2307
|
-
var g = tmp0__anonymous__q1qw7t.
|
|
2308
|
-
var b = tmp0__anonymous__q1qw7t.
|
|
2305
|
+
var tmp0__anonymous__q1qw7t = this.l2q(SRGB_getInstance());
|
|
2306
|
+
var r = tmp0__anonymous__q1qw7t.i2l_1;
|
|
2307
|
+
var g = tmp0__anonymous__q1qw7t.j2l_1;
|
|
2308
|
+
var b = tmp0__anonymous__q1qw7t.k2l_1;
|
|
2309
2309
|
var tmp$ret$0;
|
|
2310
2310
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
2311
2311
|
tmp$ret$0 = Math.min(r, g, b);
|
|
@@ -2332,32 +2332,32 @@
|
|
|
2332
2332
|
var tmp$ret$2;
|
|
2333
2333
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toHWB.<anonymous>' call
|
|
2334
2334
|
var tmp1__anonymous__uwfjfc = normalizeDeg(h);
|
|
2335
|
-
tmp$ret$2 = new HWB(tmp1__anonymous__uwfjfc, min, 1.0 - max, this.
|
|
2335
|
+
tmp$ret$2 = new HWB(tmp1__anonymous__uwfjfc, min, 1.0 - max, this.l2l_1);
|
|
2336
2336
|
tmp$ret$3 = tmp$ret$2;
|
|
2337
2337
|
break $l$block;
|
|
2338
2338
|
tmp$ret$3 = tmp$ret$4;
|
|
2339
2339
|
}
|
|
2340
2340
|
return tmp$ret$3;
|
|
2341
2341
|
};
|
|
2342
|
-
protoOf(RGB).
|
|
2343
|
-
return this.
|
|
2342
|
+
protoOf(RGB).g2l = function () {
|
|
2343
|
+
return this.l2q(RGBColorSpaces_getInstance().c2n_1);
|
|
2344
2344
|
};
|
|
2345
|
-
protoOf(RGB).
|
|
2345
|
+
protoOf(RGB).x7 = function () {
|
|
2346
2346
|
var tmp$ret$0;
|
|
2347
2347
|
// Inline function 'kotlin.floatArrayOf' call
|
|
2348
|
-
var tmp0_floatArrayOf = new Float32Array([this.
|
|
2348
|
+
var tmp0_floatArrayOf = new Float32Array([this.i2l_1, this.j2l_1, this.k2l_1, this.l2l_1]);
|
|
2349
2349
|
tmp$ret$0 = tmp0_floatArrayOf;
|
|
2350
2350
|
return tmp$ret$0;
|
|
2351
2351
|
};
|
|
2352
2352
|
protoOf(RGB).toString = function () {
|
|
2353
|
-
return 'RGB(r=' + this.
|
|
2353
|
+
return 'RGB(r=' + this.i2l_1 + ', g=' + this.j2l_1 + ', b=' + this.k2l_1 + ', alpha=' + this.l2l_1 + ', space=' + this.m2l_1 + ')';
|
|
2354
2354
|
};
|
|
2355
2355
|
protoOf(RGB).hashCode = function () {
|
|
2356
|
-
var result = getNumberHashCode(this.
|
|
2357
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2358
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2359
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2360
|
-
result = imul(result, 31) + hashCode(this.
|
|
2356
|
+
var result = getNumberHashCode(this.i2l_1);
|
|
2357
|
+
result = imul(result, 31) + getNumberHashCode(this.j2l_1) | 0;
|
|
2358
|
+
result = imul(result, 31) + getNumberHashCode(this.k2l_1) | 0;
|
|
2359
|
+
result = imul(result, 31) + getNumberHashCode(this.l2l_1) | 0;
|
|
2360
|
+
result = imul(result, 31) + hashCode(this.m2l_1) | 0;
|
|
2361
2361
|
return result;
|
|
2362
2362
|
};
|
|
2363
2363
|
protoOf(RGB).equals = function (other) {
|
|
@@ -2366,15 +2366,15 @@
|
|
|
2366
2366
|
if (!(other instanceof RGB))
|
|
2367
2367
|
return false;
|
|
2368
2368
|
var tmp0_other_with_cast = other instanceof RGB ? other : THROW_CCE();
|
|
2369
|
-
if (!equals(this.
|
|
2369
|
+
if (!equals(this.i2l_1, tmp0_other_with_cast.i2l_1))
|
|
2370
2370
|
return false;
|
|
2371
|
-
if (!equals(this.
|
|
2371
|
+
if (!equals(this.j2l_1, tmp0_other_with_cast.j2l_1))
|
|
2372
2372
|
return false;
|
|
2373
|
-
if (!equals(this.
|
|
2373
|
+
if (!equals(this.k2l_1, tmp0_other_with_cast.k2l_1))
|
|
2374
2374
|
return false;
|
|
2375
|
-
if (!equals(this.
|
|
2375
|
+
if (!equals(this.l2l_1, tmp0_other_with_cast.l2l_1))
|
|
2376
2376
|
return false;
|
|
2377
|
-
if (!equals(this.
|
|
2377
|
+
if (!equals(this.m2l_1, tmp0_other_with_cast.m2l_1))
|
|
2378
2378
|
return false;
|
|
2379
2379
|
return true;
|
|
2380
2380
|
};
|
|
@@ -2487,18 +2487,18 @@
|
|
|
2487
2487
|
var ACES_AP1_B;
|
|
2488
2488
|
function RGBColorSpaces() {
|
|
2489
2489
|
RGBColorSpaces_instance = this;
|
|
2490
|
-
this.
|
|
2491
|
-
this.
|
|
2492
|
-
this.
|
|
2493
|
-
this.
|
|
2494
|
-
this.
|
|
2495
|
-
this.
|
|
2496
|
-
this.
|
|
2497
|
-
this.
|
|
2498
|
-
this.
|
|
2499
|
-
this.
|
|
2500
|
-
this.
|
|
2501
|
-
this.
|
|
2490
|
+
this.c2n_1 = SRGB_getInstance();
|
|
2491
|
+
this.d2n_1 = RGBColorSpace_0('Linear sRGB', Illuminant_getInstance().r2o_1, LinearTransferFunctions_getInstance(), get_SRGB_R(), get_SRGB_G(), get_SRGB_B());
|
|
2492
|
+
this.e2n_1 = RGBColorSpace_0('ACES2065-1', get_ACES_WHITE_POINT(), LinearTransferFunctions_getInstance(), get_ACES_AP0_R(), get_ACES_AP0_G(), get_ACES_AP0_B());
|
|
2493
|
+
this.f2n_1 = RGBColorSpace_0('ACEScc', get_ACES_WHITE_POINT(), ACESccTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
2494
|
+
this.g2n_1 = RGBColorSpace_0('ACEScct', get_ACES_WHITE_POINT(), ACEScctTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
2495
|
+
this.h2n_1 = RGBColorSpace_0('ACEScg', get_ACES_WHITE_POINT(), LinearTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
2496
|
+
this.i2n_1 = RGBColorSpace_0('Adobe RGB', Illuminant_getInstance().r2o_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));
|
|
2497
|
+
this.j2n_1 = BT2020Space_getInstance();
|
|
2498
|
+
this.k2n_1 = RGBColorSpace_0('BT.709', Illuminant_getInstance().r2o_1, BT709TransferFunctions_getInstance(), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.3, 0.6), xyY_init_$Create$(0.15, 0.06));
|
|
2499
|
+
this.l2n_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));
|
|
2500
|
+
this.m2n_1 = RGBColorSpace_0('Display P3', Illuminant_getInstance().r2o_1, SRGBTransferFunctions_getInstance(), xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
|
|
2501
|
+
this.n2n_1 = RGBColorSpace_0('ROMM RGB', Illuminant_getInstance().p2o_1, ROMMTransferFunctions_getInstance(), xyY_init_$Create$(0.7347, 0.2653), xyY_init_$Create$(0.1596, 0.8404), xyY_init_$Create$(0.0366, 1.0E-4));
|
|
2502
2502
|
}
|
|
2503
2503
|
var RGBColorSpaces_instance;
|
|
2504
2504
|
function RGBColorSpaces_getInstance() {
|
|
@@ -2508,40 +2508,40 @@
|
|
|
2508
2508
|
}
|
|
2509
2509
|
function SRGB() {
|
|
2510
2510
|
SRGB_instance = this;
|
|
2511
|
-
this.
|
|
2512
|
-
this.
|
|
2513
|
-
this.
|
|
2514
|
-
this.
|
|
2515
|
-
this.
|
|
2516
|
-
this.
|
|
2511
|
+
this.y2o_1 = 'sRGB';
|
|
2512
|
+
this.z2o_1 = rectangularComponentInfo('RGB');
|
|
2513
|
+
this.a2p_1 = Illuminant_getInstance().r2o_1;
|
|
2514
|
+
this.b2p_1 = SRGBTransferFunctions_getInstance();
|
|
2515
|
+
this.c2p_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.a2p_1, get_SRGB_R(), get_SRGB_G(), get_SRGB_B()));
|
|
2516
|
+
this.d2p_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.c2p_1)));
|
|
2517
2517
|
}
|
|
2518
|
-
protoOf(SRGB).
|
|
2519
|
-
return this.
|
|
2518
|
+
protoOf(SRGB).kd = function () {
|
|
2519
|
+
return this.y2o_1;
|
|
2520
2520
|
};
|
|
2521
|
-
protoOf(SRGB).
|
|
2522
|
-
return this.
|
|
2521
|
+
protoOf(SRGB).x2o = function () {
|
|
2522
|
+
return this.z2o_1;
|
|
2523
2523
|
};
|
|
2524
|
-
protoOf(SRGB).
|
|
2525
|
-
return this.
|
|
2524
|
+
protoOf(SRGB).c2m = function () {
|
|
2525
|
+
return this.a2p_1;
|
|
2526
2526
|
};
|
|
2527
|
-
protoOf(SRGB).
|
|
2528
|
-
return this.
|
|
2527
|
+
protoOf(SRGB).m2p = function () {
|
|
2528
|
+
return this.b2p_1;
|
|
2529
2529
|
};
|
|
2530
|
-
protoOf(SRGB).
|
|
2531
|
-
return this.
|
|
2530
|
+
protoOf(SRGB).j2q = function () {
|
|
2531
|
+
return this.c2p_1;
|
|
2532
2532
|
};
|
|
2533
|
-
protoOf(SRGB).
|
|
2534
|
-
return this.
|
|
2533
|
+
protoOf(SRGB).k2q = function () {
|
|
2534
|
+
return this.d2p_1;
|
|
2535
2535
|
};
|
|
2536
|
-
protoOf(SRGB).
|
|
2537
|
-
return color.
|
|
2536
|
+
protoOf(SRGB).b2m = function (color) {
|
|
2537
|
+
return color.g2l();
|
|
2538
2538
|
};
|
|
2539
|
-
protoOf(SRGB).
|
|
2539
|
+
protoOf(SRGB).d2m = function (components) {
|
|
2540
2540
|
var tmp$ret$5;
|
|
2541
2541
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2542
2542
|
var tmp$ret$4;
|
|
2543
2543
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2544
|
-
var size = this.
|
|
2544
|
+
var size = this.x2o().i();
|
|
2545
2545
|
// Inline function 'kotlin.require' call
|
|
2546
2546
|
var containsLower = size - 1 | 0;
|
|
2547
2547
|
var containsArg = components.length;
|
|
@@ -2571,15 +2571,15 @@
|
|
|
2571
2571
|
tmp_2 = tmp$ret$1;
|
|
2572
2572
|
}
|
|
2573
2573
|
tmp$ret$2 = tmp_2;
|
|
2574
|
-
tmp$ret$3 = this.
|
|
2574
|
+
tmp$ret$3 = this.z2m(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
2575
2575
|
tmp$ret$4 = tmp$ret$3;
|
|
2576
2576
|
tmp$ret$5 = tmp$ret$4;
|
|
2577
2577
|
return tmp$ret$5;
|
|
2578
2578
|
};
|
|
2579
2579
|
protoOf(SRGB).toString = function () {
|
|
2580
|
-
return this.
|
|
2580
|
+
return this.y2o_1;
|
|
2581
2581
|
};
|
|
2582
|
-
protoOf(SRGB).
|
|
2582
|
+
protoOf(SRGB).z2m = function (r, g, b, alpha) {
|
|
2583
2583
|
return new RGB(r, g, b, alpha, this);
|
|
2584
2584
|
};
|
|
2585
2585
|
var SRGB_instance;
|
|
@@ -2594,20 +2594,20 @@
|
|
|
2594
2594
|
}
|
|
2595
2595
|
function ACESccTransferFunctions() {
|
|
2596
2596
|
ACESccTransferFunctions_instance = this;
|
|
2597
|
-
this.
|
|
2598
|
-
this.
|
|
2599
|
-
this.
|
|
2597
|
+
this.n2q_1 = 3.0517578125E-5;
|
|
2598
|
+
this.o2q_1 = 1.52587890625E-5;
|
|
2599
|
+
this.p2q_1 = -0.3013698630136986;
|
|
2600
2600
|
var tmp = this;
|
|
2601
2601
|
var tmp$ret$0;
|
|
2602
2602
|
// Inline function 'kotlin.math.log2' call
|
|
2603
2603
|
tmp$ret$0 = log2(65504.0);
|
|
2604
|
-
tmp.
|
|
2604
|
+
tmp.q2q_1 = (tmp$ret$0 + 9.72) / 17.52;
|
|
2605
2605
|
}
|
|
2606
|
-
protoOf(ACESccTransferFunctions).
|
|
2606
|
+
protoOf(ACESccTransferFunctions).v2p = function (x) {
|
|
2607
2607
|
var tmp;
|
|
2608
2608
|
if (x <= -0.3013698630136986) {
|
|
2609
2609
|
tmp = (spow_0(2.0, x * 17.52 - 9.72) - 1.52587890625E-5) * 2.0;
|
|
2610
|
-
} else if (x < this.
|
|
2610
|
+
} else if (x < this.q2q_1) {
|
|
2611
2611
|
var tmp$ret$0;
|
|
2612
2612
|
// Inline function 'kotlin.math.pow' call
|
|
2613
2613
|
var tmp0_pow = x * 17.52 - 9.72;
|
|
@@ -2618,7 +2618,7 @@
|
|
|
2618
2618
|
}
|
|
2619
2619
|
return tmp;
|
|
2620
2620
|
};
|
|
2621
|
-
protoOf(ACESccTransferFunctions).
|
|
2621
|
+
protoOf(ACESccTransferFunctions).w2p = function (x) {
|
|
2622
2622
|
var tmp;
|
|
2623
2623
|
if (x < 3.0517578125E-5) {
|
|
2624
2624
|
var tmp$ret$0;
|
|
@@ -2642,19 +2642,19 @@
|
|
|
2642
2642
|
}
|
|
2643
2643
|
function ACEScctTransferFunctions() {
|
|
2644
2644
|
ACEScctTransferFunctions_instance = this;
|
|
2645
|
-
this.
|
|
2646
|
-
this.
|
|
2645
|
+
this.r2q_1 = 10.5402377416545;
|
|
2646
|
+
this.s2q_1 = 0.0729055341958355;
|
|
2647
2647
|
var tmp = this;
|
|
2648
2648
|
var tmp$ret$0;
|
|
2649
2649
|
// Inline function 'kotlin.math.log2' call
|
|
2650
2650
|
tmp$ret$0 = log2(65504.0);
|
|
2651
|
-
tmp.
|
|
2651
|
+
tmp.t2q_1 = (tmp$ret$0 + 9.72) / 17.52;
|
|
2652
2652
|
}
|
|
2653
|
-
protoOf(ACEScctTransferFunctions).
|
|
2653
|
+
protoOf(ACEScctTransferFunctions).v2p = function (x) {
|
|
2654
2654
|
var tmp;
|
|
2655
2655
|
if (x <= 0.155251141552511) {
|
|
2656
2656
|
tmp = (x - 0.0729055341958355) / 10.5402377416545;
|
|
2657
|
-
} else if (x < this.
|
|
2657
|
+
} else if (x < this.t2q_1) {
|
|
2658
2658
|
var tmp$ret$0;
|
|
2659
2659
|
// Inline function 'kotlin.math.pow' call
|
|
2660
2660
|
var tmp0_pow = x * 17.52 - 9.72;
|
|
@@ -2665,7 +2665,7 @@
|
|
|
2665
2665
|
}
|
|
2666
2666
|
return tmp;
|
|
2667
2667
|
};
|
|
2668
|
-
protoOf(ACEScctTransferFunctions).
|
|
2668
|
+
protoOf(ACEScctTransferFunctions).w2p = function (x) {
|
|
2669
2669
|
var tmp;
|
|
2670
2670
|
if (x < 0.0078125) {
|
|
2671
2671
|
tmp = 10.5402377416545 * x + 0.0729055341958355;
|
|
@@ -2685,48 +2685,48 @@
|
|
|
2685
2685
|
}
|
|
2686
2686
|
function BT2020Space() {
|
|
2687
2687
|
BT2020Space_instance = this;
|
|
2688
|
-
this.
|
|
2689
|
-
this.
|
|
2690
|
-
this.
|
|
2691
|
-
this.
|
|
2692
|
-
this.
|
|
2693
|
-
this.
|
|
2688
|
+
this.u2q_1 = 'BT.2020';
|
|
2689
|
+
this.v2q_1 = rectangularComponentInfo('RGB');
|
|
2690
|
+
this.w2q_1 = Illuminant_getInstance().r2o_1;
|
|
2691
|
+
this.x2q_1 = BT2020TransferFunctions_getInstance();
|
|
2692
|
+
this.y2q_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.w2q_1, xyY_init_$Create$(0.708, 0.292), xyY_init_$Create$(0.17, 0.797), xyY_init_$Create$(0.131, 0.046)));
|
|
2693
|
+
this.z2q_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.y2q_1)));
|
|
2694
2694
|
}
|
|
2695
|
-
protoOf(BT2020Space).
|
|
2696
|
-
return this.
|
|
2695
|
+
protoOf(BT2020Space).kd = function () {
|
|
2696
|
+
return this.u2q_1;
|
|
2697
2697
|
};
|
|
2698
|
-
protoOf(BT2020Space).
|
|
2699
|
-
return this.
|
|
2698
|
+
protoOf(BT2020Space).x2o = function () {
|
|
2699
|
+
return this.v2q_1;
|
|
2700
2700
|
};
|
|
2701
|
-
protoOf(BT2020Space).
|
|
2702
|
-
return this.
|
|
2701
|
+
protoOf(BT2020Space).c2m = function () {
|
|
2702
|
+
return this.w2q_1;
|
|
2703
2703
|
};
|
|
2704
|
-
protoOf(BT2020Space).
|
|
2705
|
-
return this.
|
|
2704
|
+
protoOf(BT2020Space).m2p = function () {
|
|
2705
|
+
return this.x2q_1;
|
|
2706
2706
|
};
|
|
2707
|
-
protoOf(BT2020Space).
|
|
2707
|
+
protoOf(BT2020Space).z2m = function (r, g, b, alpha) {
|
|
2708
2708
|
return new RGB(r, g, b, alpha, this);
|
|
2709
2709
|
};
|
|
2710
|
-
protoOf(BT2020Space).
|
|
2710
|
+
protoOf(BT2020Space).b2m = function (color) {
|
|
2711
2711
|
var tmp0_subject = color;
|
|
2712
2712
|
var tmp;
|
|
2713
2713
|
if (tmp0_subject instanceof RGB) {
|
|
2714
|
-
tmp = color.
|
|
2714
|
+
tmp = color.l2q(this);
|
|
2715
2715
|
} else {
|
|
2716
2716
|
if (tmp0_subject instanceof ICtCp) {
|
|
2717
|
-
tmp = color.
|
|
2717
|
+
tmp = color.l2p();
|
|
2718
2718
|
} else {
|
|
2719
|
-
tmp = color.
|
|
2719
|
+
tmp = color.n2l().m2q(this);
|
|
2720
2720
|
}
|
|
2721
2721
|
}
|
|
2722
2722
|
return tmp;
|
|
2723
2723
|
};
|
|
2724
|
-
protoOf(BT2020Space).
|
|
2724
|
+
protoOf(BT2020Space).d2m = function (components) {
|
|
2725
2725
|
var tmp$ret$5;
|
|
2726
2726
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2727
2727
|
var tmp$ret$4;
|
|
2728
2728
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2729
|
-
var size = this.
|
|
2729
|
+
var size = this.x2o().i();
|
|
2730
2730
|
// Inline function 'kotlin.require' call
|
|
2731
2731
|
var containsLower = size - 1 | 0;
|
|
2732
2732
|
var containsArg = components.length;
|
|
@@ -2756,19 +2756,19 @@
|
|
|
2756
2756
|
tmp_2 = tmp$ret$1;
|
|
2757
2757
|
}
|
|
2758
2758
|
tmp$ret$2 = tmp_2;
|
|
2759
|
-
tmp$ret$3 = this.
|
|
2759
|
+
tmp$ret$3 = this.z2m(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
2760
2760
|
tmp$ret$4 = tmp$ret$3;
|
|
2761
2761
|
tmp$ret$5 = tmp$ret$4;
|
|
2762
2762
|
return tmp$ret$5;
|
|
2763
2763
|
};
|
|
2764
|
-
protoOf(BT2020Space).
|
|
2765
|
-
return this.
|
|
2764
|
+
protoOf(BT2020Space).j2q = function () {
|
|
2765
|
+
return this.y2q_1;
|
|
2766
2766
|
};
|
|
2767
|
-
protoOf(BT2020Space).
|
|
2768
|
-
return this.
|
|
2767
|
+
protoOf(BT2020Space).k2q = function () {
|
|
2768
|
+
return this.z2q_1;
|
|
2769
2769
|
};
|
|
2770
2770
|
protoOf(BT2020Space).toString = function () {
|
|
2771
|
-
return this.
|
|
2771
|
+
return this.u2q_1;
|
|
2772
2772
|
};
|
|
2773
2773
|
var BT2020Space_instance;
|
|
2774
2774
|
function BT2020Space_getInstance() {
|
|
@@ -2778,12 +2778,12 @@
|
|
|
2778
2778
|
}
|
|
2779
2779
|
function BT709TransferFunctions() {
|
|
2780
2780
|
BT709TransferFunctions_instance = this;
|
|
2781
|
-
this.
|
|
2781
|
+
this.a2r_1 = 1.099 * spow_0(0.018, 0.45) - 0.099;
|
|
2782
2782
|
}
|
|
2783
|
-
protoOf(BT709TransferFunctions).
|
|
2784
|
-
return numberToDouble(x < this.
|
|
2783
|
+
protoOf(BT709TransferFunctions).v2p = function (x) {
|
|
2784
|
+
return numberToDouble(x < this.a2r_1 ? x / 4.5 : spow_0((x + 0.099) / 1.099, 2.2222222222222223));
|
|
2785
2785
|
};
|
|
2786
|
-
protoOf(BT709TransferFunctions).
|
|
2786
|
+
protoOf(BT709TransferFunctions).w2p = function (x) {
|
|
2787
2787
|
return x < 0.018 ? 4.5 * x : 1.099 * spow(x, 0.45) - 0.099;
|
|
2788
2788
|
};
|
|
2789
2789
|
var BT709TransferFunctions_instance;
|
|
@@ -2795,10 +2795,10 @@
|
|
|
2795
2795
|
function SRGBTransferFunctions() {
|
|
2796
2796
|
SRGBTransferFunctions_instance = this;
|
|
2797
2797
|
}
|
|
2798
|
-
protoOf(SRGBTransferFunctions).
|
|
2798
|
+
protoOf(SRGBTransferFunctions).w2p = function (x) {
|
|
2799
2799
|
return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x, 0.4166666666666667) - 0.055;
|
|
2800
2800
|
};
|
|
2801
|
-
protoOf(SRGBTransferFunctions).
|
|
2801
|
+
protoOf(SRGBTransferFunctions).v2p = function (x) {
|
|
2802
2802
|
return x <= 0.04045 ? x / 12.92 : spow_0((x + 0.055) / 1.055, 2.4);
|
|
2803
2803
|
};
|
|
2804
2804
|
var SRGBTransferFunctions_instance;
|
|
@@ -2809,12 +2809,12 @@
|
|
|
2809
2809
|
}
|
|
2810
2810
|
function ROMMTransferFunctions() {
|
|
2811
2811
|
ROMMTransferFunctions_instance = this;
|
|
2812
|
-
this.
|
|
2812
|
+
this.b2r_1 = 0.001953;
|
|
2813
2813
|
}
|
|
2814
|
-
protoOf(ROMMTransferFunctions).
|
|
2814
|
+
protoOf(ROMMTransferFunctions).v2p = function (x) {
|
|
2815
2815
|
return x < 0.031248 ? x / 16.0 : spow(x, 1.8);
|
|
2816
2816
|
};
|
|
2817
|
-
protoOf(ROMMTransferFunctions).
|
|
2817
|
+
protoOf(ROMMTransferFunctions).w2p = function (x) {
|
|
2818
2818
|
return x < 0.001953 ? x * 16.0 : spow(x, 0.5555555555555556);
|
|
2819
2819
|
};
|
|
2820
2820
|
var ROMMTransferFunctions_instance;
|
|
@@ -2825,14 +2825,14 @@
|
|
|
2825
2825
|
}
|
|
2826
2826
|
function rgbToXyzMatrix(whitePoint, r, g, b) {
|
|
2827
2827
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
2828
|
-
var primaries = _Matrix___init__impl__q3kp4w_0(r.
|
|
2829
|
-
var wp = whitePoint.
|
|
2828
|
+
var primaries = _Matrix___init__impl__q3kp4w_0(r.z2p_1, g.z2p_1, b.z2p_1, r.a2q_1, g.a2q_1, b.a2q_1, r.c2r(), g.c2r(), b.c2r());
|
|
2829
|
+
var wp = whitePoint.l2o_1;
|
|
2830
2830
|
var tmp$ret$1;
|
|
2831
2831
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
2832
2832
|
var tmp0_dot = inverse(primaries);
|
|
2833
|
-
var tmp1_dot = wp.
|
|
2834
|
-
var tmp2_dot = wp.
|
|
2835
|
-
var tmp3_dot = wp.
|
|
2833
|
+
var tmp1_dot = wp.c2q();
|
|
2834
|
+
var tmp2_dot = wp.b2q_1;
|
|
2835
|
+
var tmp3_dot = wp.d2q();
|
|
2836
2836
|
var tmp$ret$0;
|
|
2837
2837
|
// Inline function 'com.github.ajalt.colormath.model.rgbToXyzMatrix.<anonymous>' call
|
|
2838
2838
|
var tmp4__anonymous__pkmkx7 = Matrix__get_impl_xogbpk(tmp0_dot, 0, 0) * tmp1_dot + Matrix__get_impl_xogbpk(tmp0_dot, 1, 0) * tmp2_dot + Matrix__get_impl_xogbpk(tmp0_dot, 2, 0) * tmp3_dot;
|
|
@@ -2843,43 +2843,43 @@
|
|
|
2843
2843
|
return tmp$ret$1;
|
|
2844
2844
|
}
|
|
2845
2845
|
function RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b) {
|
|
2846
|
-
this.
|
|
2847
|
-
this.
|
|
2848
|
-
this.
|
|
2849
|
-
this.
|
|
2850
|
-
this.
|
|
2851
|
-
this.
|
|
2852
|
-
this.
|
|
2853
|
-
this.
|
|
2854
|
-
this.
|
|
2846
|
+
this.d2r_1 = name;
|
|
2847
|
+
this.e2r_1 = whitePoint;
|
|
2848
|
+
this.f2r_1 = transferFunctions;
|
|
2849
|
+
this.g2r_1 = r;
|
|
2850
|
+
this.h2r_1 = g;
|
|
2851
|
+
this.i2r_1 = b;
|
|
2852
|
+
this.j2r_1 = rectangularComponentInfo('RGB');
|
|
2853
|
+
this.k2r_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.e2r_1, this.g2r_1, this.h2r_1, this.i2r_1));
|
|
2854
|
+
this.l2r_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.k2r_1)));
|
|
2855
2855
|
}
|
|
2856
|
-
protoOf(RGBColorSpaceImpl).
|
|
2857
|
-
return this.
|
|
2856
|
+
protoOf(RGBColorSpaceImpl).kd = function () {
|
|
2857
|
+
return this.d2r_1;
|
|
2858
2858
|
};
|
|
2859
|
-
protoOf(RGBColorSpaceImpl).
|
|
2860
|
-
return this.
|
|
2859
|
+
protoOf(RGBColorSpaceImpl).c2m = function () {
|
|
2860
|
+
return this.e2r_1;
|
|
2861
2861
|
};
|
|
2862
|
-
protoOf(RGBColorSpaceImpl).
|
|
2863
|
-
return this.
|
|
2862
|
+
protoOf(RGBColorSpaceImpl).m2p = function () {
|
|
2863
|
+
return this.f2r_1;
|
|
2864
2864
|
};
|
|
2865
|
-
protoOf(RGBColorSpaceImpl).
|
|
2866
|
-
return this.
|
|
2865
|
+
protoOf(RGBColorSpaceImpl).x2o = function () {
|
|
2866
|
+
return this.j2r_1;
|
|
2867
2867
|
};
|
|
2868
|
-
protoOf(RGBColorSpaceImpl).
|
|
2868
|
+
protoOf(RGBColorSpaceImpl).b2m = function (color) {
|
|
2869
2869
|
var tmp;
|
|
2870
2870
|
if (color instanceof RGB) {
|
|
2871
|
-
tmp = color.
|
|
2871
|
+
tmp = color.l2q(this);
|
|
2872
2872
|
} else {
|
|
2873
|
-
tmp = color.
|
|
2873
|
+
tmp = color.n2l().m2q(this);
|
|
2874
2874
|
}
|
|
2875
2875
|
return tmp;
|
|
2876
2876
|
};
|
|
2877
|
-
protoOf(RGBColorSpaceImpl).
|
|
2877
|
+
protoOf(RGBColorSpaceImpl).d2m = function (components) {
|
|
2878
2878
|
var tmp$ret$5;
|
|
2879
2879
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2880
2880
|
var tmp$ret$4;
|
|
2881
2881
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2882
|
-
var size = this.
|
|
2882
|
+
var size = this.x2o().i();
|
|
2883
2883
|
// Inline function 'kotlin.require' call
|
|
2884
2884
|
var containsLower = size - 1 | 0;
|
|
2885
2885
|
var containsArg = components.length;
|
|
@@ -2909,30 +2909,30 @@
|
|
|
2909
2909
|
tmp_2 = tmp$ret$1;
|
|
2910
2910
|
}
|
|
2911
2911
|
tmp$ret$2 = tmp_2;
|
|
2912
|
-
tmp$ret$3 = this.
|
|
2912
|
+
tmp$ret$3 = this.z2m(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
2913
2913
|
tmp$ret$4 = tmp$ret$3;
|
|
2914
2914
|
tmp$ret$5 = tmp$ret$4;
|
|
2915
2915
|
return tmp$ret$5;
|
|
2916
2916
|
};
|
|
2917
|
-
protoOf(RGBColorSpaceImpl).
|
|
2918
|
-
return this.
|
|
2917
|
+
protoOf(RGBColorSpaceImpl).j2q = function () {
|
|
2918
|
+
return this.k2r_1;
|
|
2919
2919
|
};
|
|
2920
|
-
protoOf(RGBColorSpaceImpl).
|
|
2921
|
-
return this.
|
|
2920
|
+
protoOf(RGBColorSpaceImpl).k2q = function () {
|
|
2921
|
+
return this.l2r_1;
|
|
2922
2922
|
};
|
|
2923
2923
|
protoOf(RGBColorSpaceImpl).toString = function () {
|
|
2924
|
-
return this.
|
|
2924
|
+
return this.d2r_1;
|
|
2925
2925
|
};
|
|
2926
|
-
protoOf(RGBColorSpaceImpl).
|
|
2926
|
+
protoOf(RGBColorSpaceImpl).z2m = function (r, g, b, alpha) {
|
|
2927
2927
|
return new RGB(r, g, b, alpha, this);
|
|
2928
2928
|
};
|
|
2929
2929
|
protoOf(RGBColorSpaceImpl).hashCode = function () {
|
|
2930
|
-
var result = getStringHashCode(this.
|
|
2931
|
-
result = imul(result, 31) + this.
|
|
2932
|
-
result = imul(result, 31) + hashCode(this.
|
|
2933
|
-
result = imul(result, 31) + this.
|
|
2934
|
-
result = imul(result, 31) + this.
|
|
2935
|
-
result = imul(result, 31) + this.
|
|
2930
|
+
var result = getStringHashCode(this.d2r_1);
|
|
2931
|
+
result = imul(result, 31) + this.e2r_1.hashCode() | 0;
|
|
2932
|
+
result = imul(result, 31) + hashCode(this.f2r_1) | 0;
|
|
2933
|
+
result = imul(result, 31) + this.g2r_1.hashCode() | 0;
|
|
2934
|
+
result = imul(result, 31) + this.h2r_1.hashCode() | 0;
|
|
2935
|
+
result = imul(result, 31) + this.i2r_1.hashCode() | 0;
|
|
2936
2936
|
return result;
|
|
2937
2937
|
};
|
|
2938
2938
|
protoOf(RGBColorSpaceImpl).equals = function (other) {
|
|
@@ -2941,35 +2941,35 @@
|
|
|
2941
2941
|
if (!(other instanceof RGBColorSpaceImpl))
|
|
2942
2942
|
return false;
|
|
2943
2943
|
var tmp0_other_with_cast = other instanceof RGBColorSpaceImpl ? other : THROW_CCE();
|
|
2944
|
-
if (!(this.
|
|
2944
|
+
if (!(this.d2r_1 === tmp0_other_with_cast.d2r_1))
|
|
2945
2945
|
return false;
|
|
2946
|
-
if (!this.
|
|
2946
|
+
if (!this.e2r_1.equals(tmp0_other_with_cast.e2r_1))
|
|
2947
2947
|
return false;
|
|
2948
|
-
if (!equals(this.
|
|
2948
|
+
if (!equals(this.f2r_1, tmp0_other_with_cast.f2r_1))
|
|
2949
2949
|
return false;
|
|
2950
|
-
if (!this.
|
|
2950
|
+
if (!this.g2r_1.equals(tmp0_other_with_cast.g2r_1))
|
|
2951
2951
|
return false;
|
|
2952
|
-
if (!this.
|
|
2952
|
+
if (!this.h2r_1.equals(tmp0_other_with_cast.h2r_1))
|
|
2953
2953
|
return false;
|
|
2954
|
-
if (!this.
|
|
2954
|
+
if (!this.i2r_1.equals(tmp0_other_with_cast.i2r_1))
|
|
2955
2955
|
return false;
|
|
2956
2956
|
return true;
|
|
2957
2957
|
};
|
|
2958
2958
|
function BT2020TransferFunctions() {
|
|
2959
2959
|
BT2020TransferFunctions_instance = this;
|
|
2960
|
-
this.
|
|
2961
|
-
this.
|
|
2960
|
+
this.m2r_1 = 1.0993;
|
|
2961
|
+
this.n2r_1 = 0.0181;
|
|
2962
2962
|
var tmp = this;
|
|
2963
2963
|
var tmp$ret$0;
|
|
2964
2964
|
// Inline function 'kotlin.math.pow' call
|
|
2965
2965
|
var tmp0_pow = 0.0181;
|
|
2966
2966
|
tmp$ret$0 = Math.pow(tmp0_pow, 0.45);
|
|
2967
|
-
tmp.
|
|
2967
|
+
tmp.o2r_1 = 1.0993 * tmp$ret$0 - 0.09929999999999994;
|
|
2968
2968
|
}
|
|
2969
|
-
protoOf(BT2020TransferFunctions).
|
|
2970
|
-
return numberToDouble(x < this.
|
|
2969
|
+
protoOf(BT2020TransferFunctions).v2p = function (x) {
|
|
2970
|
+
return numberToDouble(x < this.o2r_1 ? x / 4.5 : spow_0((x + 0.09929999999999994) / 1.0993, 2.2222222222222223));
|
|
2971
2971
|
};
|
|
2972
|
-
protoOf(BT2020TransferFunctions).
|
|
2972
|
+
protoOf(BT2020TransferFunctions).w2p = function (x) {
|
|
2973
2973
|
return x < 0.0181 ? 4.5 * x : 1.0993 * spow(x, 0.45) - 0.09929999999999994;
|
|
2974
2974
|
};
|
|
2975
2975
|
var BT2020TransferFunctions_instance;
|
|
@@ -3134,28 +3134,28 @@
|
|
|
3134
3134
|
}
|
|
3135
3135
|
function Companion_5() {
|
|
3136
3136
|
Companion_instance_5 = this;
|
|
3137
|
-
this.
|
|
3137
|
+
this.p2r_1 = XYZColorSpaces_getInstance().o2n_1;
|
|
3138
3138
|
}
|
|
3139
|
-
protoOf(Companion_5).
|
|
3140
|
-
return this.
|
|
3139
|
+
protoOf(Companion_5).x2o = function () {
|
|
3140
|
+
return this.p2r_1.x2o();
|
|
3141
3141
|
};
|
|
3142
|
-
protoOf(Companion_5).
|
|
3143
|
-
return this.
|
|
3142
|
+
protoOf(Companion_5).kd = function () {
|
|
3143
|
+
return this.p2r_1.kd();
|
|
3144
3144
|
};
|
|
3145
|
-
protoOf(Companion_5).
|
|
3146
|
-
return this.
|
|
3145
|
+
protoOf(Companion_5).c2m = function () {
|
|
3146
|
+
return this.p2r_1.c2m();
|
|
3147
3147
|
};
|
|
3148
|
-
protoOf(Companion_5).
|
|
3149
|
-
return this.
|
|
3148
|
+
protoOf(Companion_5).b2m = function (color) {
|
|
3149
|
+
return this.p2r_1.b2m(color);
|
|
3150
3150
|
};
|
|
3151
|
-
protoOf(Companion_5).
|
|
3152
|
-
return this.
|
|
3151
|
+
protoOf(Companion_5).d2m = function (components) {
|
|
3152
|
+
return this.p2r_1.d2m(components);
|
|
3153
3153
|
};
|
|
3154
|
-
protoOf(Companion_5).
|
|
3155
|
-
return this.
|
|
3154
|
+
protoOf(Companion_5).z2m = function (x, y, z, alpha) {
|
|
3155
|
+
return this.p2r_1.z2m(x, y, z, alpha);
|
|
3156
3156
|
};
|
|
3157
|
-
protoOf(Companion_5).
|
|
3158
|
-
return this.
|
|
3157
|
+
protoOf(Companion_5).x2p = function (x, y, z, alpha) {
|
|
3158
|
+
return this.p2r_1.x2p(x, y, z, alpha);
|
|
3159
3159
|
};
|
|
3160
3160
|
var Companion_instance_5;
|
|
3161
3161
|
function Companion_getInstance_6() {
|
|
@@ -3164,20 +3164,20 @@
|
|
|
3164
3164
|
return Companion_instance_5;
|
|
3165
3165
|
}
|
|
3166
3166
|
function adaptToM($this, space, m, mi) {
|
|
3167
|
-
if (space.
|
|
3167
|
+
if (space.c2m().equals($this.t2l_1.c2m()))
|
|
3168
3168
|
return $this;
|
|
3169
|
-
var transform = chromaticAdaptationMatrix(space, $this.
|
|
3169
|
+
var transform = chromaticAdaptationMatrix(space, $this.t2l_1.c2m().l2o_1, m, mi);
|
|
3170
3170
|
var tmp$ret$1;
|
|
3171
3171
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
3172
|
-
var tmp0_dot = $this.
|
|
3173
|
-
var tmp1_dot = $this.
|
|
3174
|
-
var tmp2_dot = $this.
|
|
3172
|
+
var tmp0_dot = $this.p2l_1;
|
|
3173
|
+
var tmp1_dot = $this.q2l_1;
|
|
3174
|
+
var tmp2_dot = $this.r2l_1;
|
|
3175
3175
|
var tmp$ret$0;
|
|
3176
3176
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.adaptToM.<anonymous>' call
|
|
3177
3177
|
var tmp3__anonymous__ufb84q = Matrix__get_impl_xogbpk(transform, 0, 0) * tmp0_dot + Matrix__get_impl_xogbpk(transform, 1, 0) * tmp1_dot + Matrix__get_impl_xogbpk(transform, 2, 0) * tmp2_dot;
|
|
3178
3178
|
var tmp4__anonymous__pkmkx7 = Matrix__get_impl_xogbpk(transform, 0, 1) * tmp0_dot + Matrix__get_impl_xogbpk(transform, 1, 1) * tmp1_dot + Matrix__get_impl_xogbpk(transform, 2, 1) * tmp2_dot;
|
|
3179
3179
|
var tmp5__anonymous__kpxxpo = Matrix__get_impl_xogbpk(transform, 0, 2) * tmp0_dot + Matrix__get_impl_xogbpk(transform, 1, 2) * tmp1_dot + Matrix__get_impl_xogbpk(transform, 2, 2) * tmp2_dot;
|
|
3180
|
-
tmp$ret$0 = space.
|
|
3180
|
+
tmp$ret$0 = space.z2m(tmp3__anonymous__ufb84q, tmp4__anonymous__pkmkx7, tmp5__anonymous__kpxxpo, $this.s2l_1);
|
|
3181
3181
|
tmp$ret$1 = tmp$ret$0;
|
|
3182
3182
|
return tmp$ret$1;
|
|
3183
3183
|
}
|
|
@@ -3186,79 +3186,79 @@
|
|
|
3186
3186
|
}
|
|
3187
3187
|
function XYZ(x, y, z, alpha, space) {
|
|
3188
3188
|
Companion_getInstance_6();
|
|
3189
|
-
this.
|
|
3190
|
-
this.
|
|
3191
|
-
this.
|
|
3192
|
-
this.
|
|
3193
|
-
this.
|
|
3189
|
+
this.p2l_1 = x;
|
|
3190
|
+
this.q2l_1 = y;
|
|
3191
|
+
this.r2l_1 = z;
|
|
3192
|
+
this.s2l_1 = alpha;
|
|
3193
|
+
this.t2l_1 = space;
|
|
3194
3194
|
}
|
|
3195
|
-
protoOf(XYZ).
|
|
3196
|
-
return this.
|
|
3195
|
+
protoOf(XYZ).e2l = function () {
|
|
3196
|
+
return this.s2l_1;
|
|
3197
3197
|
};
|
|
3198
|
-
protoOf(XYZ).
|
|
3199
|
-
return this.
|
|
3198
|
+
protoOf(XYZ).f2l = function () {
|
|
3199
|
+
return this.t2l_1;
|
|
3200
3200
|
};
|
|
3201
|
-
protoOf(XYZ).
|
|
3201
|
+
protoOf(XYZ).q2n = function (space) {
|
|
3202
3202
|
return adaptToM(this, space, get_CAT02_XYZ_TO_LMS(), get_CAT02_LMS_TO_XYZ());
|
|
3203
3203
|
};
|
|
3204
|
-
protoOf(XYZ).
|
|
3205
|
-
var tmp0_container = this.
|
|
3206
|
-
var x = tmp0_container.
|
|
3207
|
-
var y = tmp0_container.
|
|
3208
|
-
var z = tmp0_container.
|
|
3209
|
-
var f = space.
|
|
3204
|
+
protoOf(XYZ).m2q = function (space) {
|
|
3205
|
+
var tmp0_container = this.q2n(XYZColorSpace_0(space.c2m()));
|
|
3206
|
+
var x = tmp0_container.x2();
|
|
3207
|
+
var y = tmp0_container.y2();
|
|
3208
|
+
var z = tmp0_container.q2r();
|
|
3209
|
+
var f = space.m2p();
|
|
3210
3210
|
var tmp$ret$1;
|
|
3211
3211
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
3212
|
-
var tmp0_dot = _Matrix___init__impl__q3kp4w(space.
|
|
3212
|
+
var tmp0_dot = _Matrix___init__impl__q3kp4w(space.k2q());
|
|
3213
3213
|
var tmp$ret$0;
|
|
3214
3214
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.toRGB.<anonymous>' call
|
|
3215
3215
|
var tmp1__anonymous__uwfjfc = Matrix__get_impl_xogbpk(tmp0_dot, 0, 0) * x + Matrix__get_impl_xogbpk(tmp0_dot, 1, 0) * y + Matrix__get_impl_xogbpk(tmp0_dot, 2, 0) * z;
|
|
3216
3216
|
var tmp2__anonymous__z9zvc9 = Matrix__get_impl_xogbpk(tmp0_dot, 0, 1) * x + Matrix__get_impl_xogbpk(tmp0_dot, 1, 1) * y + Matrix__get_impl_xogbpk(tmp0_dot, 2, 1) * z;
|
|
3217
3217
|
var tmp3__anonymous__ufb84q = Matrix__get_impl_xogbpk(tmp0_dot, 0, 2) * x + Matrix__get_impl_xogbpk(tmp0_dot, 1, 2) * y + Matrix__get_impl_xogbpk(tmp0_dot, 2, 2) * z;
|
|
3218
|
-
tmp$ret$0 = space.
|
|
3218
|
+
tmp$ret$0 = space.z2m(f.w2p(tmp1__anonymous__uwfjfc), f.w2p(tmp2__anonymous__z9zvc9), f.w2p(tmp3__anonymous__ufb84q), this.s2l_1);
|
|
3219
3219
|
tmp$ret$1 = tmp$ret$0;
|
|
3220
3220
|
return tmp$ret$1;
|
|
3221
3221
|
};
|
|
3222
|
-
protoOf(XYZ).
|
|
3223
|
-
return this.
|
|
3222
|
+
protoOf(XYZ).g2l = function () {
|
|
3223
|
+
return this.m2q(RGBColorSpaces_getInstance().c2n_1);
|
|
3224
3224
|
};
|
|
3225
|
-
protoOf(XYZ).
|
|
3226
|
-
var fx = toLAB$f(this.
|
|
3227
|
-
var fy = toLAB$f(this.
|
|
3228
|
-
var fz = toLAB$f(this.
|
|
3225
|
+
protoOf(XYZ).o2l = function () {
|
|
3226
|
+
var fx = toLAB$f(this.p2l_1 / this.t2l_1.c2m().l2o_1.c2q());
|
|
3227
|
+
var fy = toLAB$f(this.q2l_1 / this.t2l_1.c2m().l2o_1.b2q_1);
|
|
3228
|
+
var fz = toLAB$f(this.r2l_1 / this.t2l_1.c2m().l2o_1.d2q());
|
|
3229
3229
|
var l = 116 * fy - 16;
|
|
3230
3230
|
var a = 500 * (fx - fy);
|
|
3231
3231
|
var b = 200 * (fy - fz);
|
|
3232
|
-
return LABColorSpace_0(this.
|
|
3232
|
+
return LABColorSpace_0(this.t2l_1.c2m()).x2p(l, a, b, this.s2l_1);
|
|
3233
3233
|
};
|
|
3234
|
-
protoOf(XYZ).
|
|
3234
|
+
protoOf(XYZ).n2l = function () {
|
|
3235
3235
|
return this;
|
|
3236
3236
|
};
|
|
3237
|
-
protoOf(XYZ).
|
|
3237
|
+
protoOf(XYZ).x7 = function () {
|
|
3238
3238
|
var tmp$ret$0;
|
|
3239
3239
|
// Inline function 'kotlin.floatArrayOf' call
|
|
3240
|
-
var tmp0_floatArrayOf = new Float32Array([this.
|
|
3240
|
+
var tmp0_floatArrayOf = new Float32Array([this.p2l_1, this.q2l_1, this.r2l_1, this.s2l_1]);
|
|
3241
3241
|
tmp$ret$0 = tmp0_floatArrayOf;
|
|
3242
3242
|
return tmp$ret$0;
|
|
3243
3243
|
};
|
|
3244
|
-
protoOf(XYZ).
|
|
3245
|
-
return this.
|
|
3244
|
+
protoOf(XYZ).x2 = function () {
|
|
3245
|
+
return this.p2l_1;
|
|
3246
3246
|
};
|
|
3247
|
-
protoOf(XYZ).
|
|
3248
|
-
return this.
|
|
3247
|
+
protoOf(XYZ).y2 = function () {
|
|
3248
|
+
return this.q2l_1;
|
|
3249
3249
|
};
|
|
3250
|
-
protoOf(XYZ).
|
|
3251
|
-
return this.
|
|
3250
|
+
protoOf(XYZ).q2r = function () {
|
|
3251
|
+
return this.r2l_1;
|
|
3252
3252
|
};
|
|
3253
3253
|
protoOf(XYZ).toString = function () {
|
|
3254
|
-
return 'XYZ(x=' + this.
|
|
3254
|
+
return 'XYZ(x=' + this.p2l_1 + ', y=' + this.q2l_1 + ', z=' + this.r2l_1 + ', alpha=' + this.s2l_1 + ', space=' + this.t2l_1 + ')';
|
|
3255
3255
|
};
|
|
3256
3256
|
protoOf(XYZ).hashCode = function () {
|
|
3257
|
-
var result = getNumberHashCode(this.
|
|
3258
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3259
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3260
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3261
|
-
result = imul(result, 31) + hashCode(this.
|
|
3257
|
+
var result = getNumberHashCode(this.p2l_1);
|
|
3258
|
+
result = imul(result, 31) + getNumberHashCode(this.q2l_1) | 0;
|
|
3259
|
+
result = imul(result, 31) + getNumberHashCode(this.r2l_1) | 0;
|
|
3260
|
+
result = imul(result, 31) + getNumberHashCode(this.s2l_1) | 0;
|
|
3261
|
+
result = imul(result, 31) + hashCode(this.t2l_1) | 0;
|
|
3262
3262
|
return result;
|
|
3263
3263
|
};
|
|
3264
3264
|
protoOf(XYZ).equals = function (other) {
|
|
@@ -3267,15 +3267,15 @@
|
|
|
3267
3267
|
if (!(other instanceof XYZ))
|
|
3268
3268
|
return false;
|
|
3269
3269
|
var tmp0_other_with_cast = other instanceof XYZ ? other : THROW_CCE();
|
|
3270
|
-
if (!equals(this.
|
|
3270
|
+
if (!equals(this.p2l_1, tmp0_other_with_cast.p2l_1))
|
|
3271
3271
|
return false;
|
|
3272
|
-
if (!equals(this.
|
|
3272
|
+
if (!equals(this.q2l_1, tmp0_other_with_cast.q2l_1))
|
|
3273
3273
|
return false;
|
|
3274
|
-
if (!equals(this.
|
|
3274
|
+
if (!equals(this.r2l_1, tmp0_other_with_cast.r2l_1))
|
|
3275
3275
|
return false;
|
|
3276
|
-
if (!equals(this.
|
|
3276
|
+
if (!equals(this.s2l_1, tmp0_other_with_cast.s2l_1))
|
|
3277
3277
|
return false;
|
|
3278
|
-
if (!equals(this.
|
|
3278
|
+
if (!equals(this.t2l_1, tmp0_other_with_cast.t2l_1))
|
|
3279
3279
|
return false;
|
|
3280
3280
|
return true;
|
|
3281
3281
|
};
|
|
@@ -3283,12 +3283,12 @@
|
|
|
3283
3283
|
}
|
|
3284
3284
|
function XYZColorSpace_0(whitePoint) {
|
|
3285
3285
|
var tmp0_subject = whitePoint;
|
|
3286
|
-
return tmp0_subject.equals(Illuminant_getInstance().
|
|
3286
|
+
return tmp0_subject.equals(Illuminant_getInstance().r2o_1) ? XYZColorSpaces_getInstance().o2n_1 : tmp0_subject.equals(Illuminant_getInstance().p2o_1) ? XYZColorSpaces_getInstance().p2n_1 : new XYZColorSpaceImpl(whitePoint);
|
|
3287
3287
|
}
|
|
3288
3288
|
function XYZColorSpaces() {
|
|
3289
3289
|
XYZColorSpaces_instance = this;
|
|
3290
|
-
this.
|
|
3291
|
-
this.
|
|
3290
|
+
this.o2n_1 = new XYZColorSpaceImpl(Illuminant_getInstance().r2o_1);
|
|
3291
|
+
this.p2n_1 = new XYZColorSpaceImpl(Illuminant_getInstance().p2o_1);
|
|
3292
3292
|
}
|
|
3293
3293
|
var XYZColorSpaces_instance;
|
|
3294
3294
|
function XYZColorSpaces_getInstance() {
|
|
@@ -3299,33 +3299,33 @@
|
|
|
3299
3299
|
function chromaticAdaptationMatrix(_this__u8e3s4, srcWp, xyzToLms, lmsToXyz) {
|
|
3300
3300
|
xyzToLms = xyzToLms === VOID ? get_CAT02_XYZ_TO_LMS() : xyzToLms;
|
|
3301
3301
|
lmsToXyz = lmsToXyz === VOID ? get_CAT02_LMS_TO_XYZ() : lmsToXyz;
|
|
3302
|
-
var dstWp = _this__u8e3s4.
|
|
3303
|
-
var src = dot_0(xyzToLms, srcWp.
|
|
3304
|
-
var dst = dot_0(xyzToLms, dstWp.
|
|
3302
|
+
var dstWp = _this__u8e3s4.c2m().l2o_1;
|
|
3303
|
+
var src = dot_0(xyzToLms, srcWp.c2q(), srcWp.b2q_1, srcWp.d2q());
|
|
3304
|
+
var dst = dot_0(xyzToLms, dstWp.c2q(), dstWp.b2q_1, dstWp.d2q());
|
|
3305
3305
|
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);
|
|
3306
3306
|
}
|
|
3307
3307
|
function XYZColorSpaceImpl(whitePoint) {
|
|
3308
|
-
this.
|
|
3309
|
-
this.
|
|
3308
|
+
this.r2r_1 = whitePoint;
|
|
3309
|
+
this.s2r_1 = rectangularComponentInfo('XYZ');
|
|
3310
3310
|
}
|
|
3311
|
-
protoOf(XYZColorSpaceImpl).
|
|
3312
|
-
return this.
|
|
3311
|
+
protoOf(XYZColorSpaceImpl).c2m = function () {
|
|
3312
|
+
return this.r2r_1;
|
|
3313
3313
|
};
|
|
3314
|
-
protoOf(XYZColorSpaceImpl).
|
|
3314
|
+
protoOf(XYZColorSpaceImpl).kd = function () {
|
|
3315
3315
|
return 'XYZ';
|
|
3316
3316
|
};
|
|
3317
|
-
protoOf(XYZColorSpaceImpl).
|
|
3318
|
-
return this.
|
|
3317
|
+
protoOf(XYZColorSpaceImpl).x2o = function () {
|
|
3318
|
+
return this.s2r_1;
|
|
3319
3319
|
};
|
|
3320
|
-
protoOf(XYZColorSpaceImpl).
|
|
3321
|
-
return color.
|
|
3320
|
+
protoOf(XYZColorSpaceImpl).b2m = function (color) {
|
|
3321
|
+
return color.n2l().q2n(this);
|
|
3322
3322
|
};
|
|
3323
|
-
protoOf(XYZColorSpaceImpl).
|
|
3323
|
+
protoOf(XYZColorSpaceImpl).d2m = function (components) {
|
|
3324
3324
|
var tmp$ret$5;
|
|
3325
3325
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
3326
3326
|
var tmp$ret$4;
|
|
3327
3327
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
3328
|
-
var size = this.
|
|
3328
|
+
var size = this.x2o().i();
|
|
3329
3329
|
// Inline function 'kotlin.require' call
|
|
3330
3330
|
var containsLower = size - 1 | 0;
|
|
3331
3331
|
var containsArg = components.length;
|
|
@@ -3355,19 +3355,19 @@
|
|
|
3355
3355
|
tmp_2 = tmp$ret$1;
|
|
3356
3356
|
}
|
|
3357
3357
|
tmp$ret$2 = tmp_2;
|
|
3358
|
-
tmp$ret$3 = this.
|
|
3358
|
+
tmp$ret$3 = this.z2m(tmp, tmp_0, tmp_1, tmp$ret$2);
|
|
3359
3359
|
tmp$ret$4 = tmp$ret$3;
|
|
3360
3360
|
tmp$ret$5 = tmp$ret$4;
|
|
3361
3361
|
return tmp$ret$5;
|
|
3362
3362
|
};
|
|
3363
3363
|
protoOf(XYZColorSpaceImpl).toString = function () {
|
|
3364
|
-
return 'XYZColorSpace(' + this.
|
|
3364
|
+
return 'XYZColorSpace(' + this.r2r_1 + ')';
|
|
3365
3365
|
};
|
|
3366
|
-
protoOf(XYZColorSpaceImpl).
|
|
3366
|
+
protoOf(XYZColorSpaceImpl).z2m = function (x, y, z, alpha) {
|
|
3367
3367
|
return new XYZ(x, y, z, alpha, this);
|
|
3368
3368
|
};
|
|
3369
3369
|
protoOf(XYZColorSpaceImpl).hashCode = function () {
|
|
3370
|
-
return this.
|
|
3370
|
+
return this.r2r_1.hashCode();
|
|
3371
3371
|
};
|
|
3372
3372
|
protoOf(XYZColorSpaceImpl).equals = function (other) {
|
|
3373
3373
|
if (this === other)
|
|
@@ -3375,7 +3375,7 @@
|
|
|
3375
3375
|
if (!(other instanceof XYZColorSpaceImpl))
|
|
3376
3376
|
return false;
|
|
3377
3377
|
var tmp0_other_with_cast = other instanceof XYZColorSpaceImpl ? other : THROW_CCE();
|
|
3378
|
-
if (!this.
|
|
3378
|
+
if (!this.r2r_1.equals(tmp0_other_with_cast.r2r_1))
|
|
3379
3379
|
return false;
|
|
3380
3380
|
return true;
|
|
3381
3381
|
};
|
|
@@ -3389,26 +3389,26 @@
|
|
|
3389
3389
|
}
|
|
3390
3390
|
function xyY(x, y, Y) {
|
|
3391
3391
|
Y = Y === VOID ? 1.0 : Y;
|
|
3392
|
-
this.
|
|
3393
|
-
this.
|
|
3394
|
-
this.
|
|
3392
|
+
this.z2p_1 = x;
|
|
3393
|
+
this.a2q_1 = y;
|
|
3394
|
+
this.b2q_1 = Y;
|
|
3395
3395
|
}
|
|
3396
|
-
protoOf(xyY).
|
|
3397
|
-
return 1 - this.
|
|
3396
|
+
protoOf(xyY).c2r = function () {
|
|
3397
|
+
return 1 - this.z2p_1 - this.a2q_1;
|
|
3398
3398
|
};
|
|
3399
|
-
protoOf(xyY).
|
|
3400
|
-
return this.
|
|
3399
|
+
protoOf(xyY).c2q = function () {
|
|
3400
|
+
return this.z2p_1 * this.b2q_1 / this.a2q_1;
|
|
3401
3401
|
};
|
|
3402
|
-
protoOf(xyY).
|
|
3403
|
-
return (1 - this.
|
|
3402
|
+
protoOf(xyY).d2q = function () {
|
|
3403
|
+
return (1 - this.z2p_1 - this.a2q_1) * this.b2q_1 / this.a2q_1;
|
|
3404
3404
|
};
|
|
3405
3405
|
protoOf(xyY).toString = function () {
|
|
3406
|
-
return 'xyY(x=' + this.
|
|
3406
|
+
return 'xyY(x=' + this.z2p_1 + ', y=' + this.a2q_1 + ', Y=' + this.b2q_1 + ')';
|
|
3407
3407
|
};
|
|
3408
3408
|
protoOf(xyY).hashCode = function () {
|
|
3409
|
-
var result = getNumberHashCode(this.
|
|
3410
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3411
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3409
|
+
var result = getNumberHashCode(this.z2p_1);
|
|
3410
|
+
result = imul(result, 31) + getNumberHashCode(this.a2q_1) | 0;
|
|
3411
|
+
result = imul(result, 31) + getNumberHashCode(this.b2q_1) | 0;
|
|
3412
3412
|
return result;
|
|
3413
3413
|
};
|
|
3414
3414
|
protoOf(xyY).equals = function (other) {
|
|
@@ -3417,11 +3417,11 @@
|
|
|
3417
3417
|
if (!(other instanceof xyY))
|
|
3418
3418
|
return false;
|
|
3419
3419
|
var tmp0_other_with_cast = other instanceof xyY ? other : THROW_CCE();
|
|
3420
|
-
if (!equals(this.
|
|
3420
|
+
if (!equals(this.z2p_1, tmp0_other_with_cast.z2p_1))
|
|
3421
3421
|
return false;
|
|
3422
|
-
if (!equals(this.
|
|
3422
|
+
if (!equals(this.a2q_1, tmp0_other_with_cast.a2q_1))
|
|
3423
3423
|
return false;
|
|
3424
|
-
if (!equals(this.
|
|
3424
|
+
if (!equals(this.b2q_1, tmp0_other_with_cast.b2q_1))
|
|
3425
3425
|
return false;
|
|
3426
3426
|
return true;
|
|
3427
3427
|
};
|
|
@@ -3430,40 +3430,40 @@
|
|
|
3430
3430
|
return numberToDouble(isNumber(tmp) ? tmp : THROW_CCE());
|
|
3431
3431
|
}
|
|
3432
3432
|
//region block: post-declaration
|
|
3433
|
-
protoOf(HSL).
|
|
3434
|
-
protoOf(HSL).
|
|
3435
|
-
protoOf(HSL).
|
|
3436
|
-
protoOf(HSL).
|
|
3437
|
-
protoOf(HWB).
|
|
3438
|
-
protoOf(HWB).
|
|
3439
|
-
protoOf(HWB).
|
|
3440
|
-
protoOf(HWB).
|
|
3441
|
-
protoOf(LAB).
|
|
3442
|
-
protoOf(LAB).
|
|
3443
|
-
protoOf(LABColorSpaceImpl).
|
|
3444
|
-
protoOf(LCHab).
|
|
3445
|
-
protoOf(LCHab).
|
|
3446
|
-
protoOf(Companion_4).
|
|
3447
|
-
protoOf(RGB).
|
|
3448
|
-
protoOf(RGB).
|
|
3449
|
-
protoOf(SRGB).
|
|
3450
|
-
protoOf(SRGB).
|
|
3451
|
-
protoOf(SRGB).
|
|
3452
|
-
protoOf(SRGB).
|
|
3453
|
-
protoOf(BT2020Space).
|
|
3454
|
-
protoOf(BT2020Space).
|
|
3455
|
-
protoOf(BT2020Space).
|
|
3456
|
-
protoOf(BT2020Space).
|
|
3457
|
-
protoOf(RGBColorSpaceImpl).
|
|
3458
|
-
protoOf(RGBColorSpaceImpl).
|
|
3459
|
-
protoOf(RGBColorSpaceImpl).
|
|
3460
|
-
protoOf(RGBColorSpaceImpl).
|
|
3461
|
-
protoOf(Companion_5).
|
|
3462
|
-
protoOf(XYZ).
|
|
3463
|
-
protoOf(XYZ).
|
|
3464
|
-
protoOf(XYZ).
|
|
3465
|
-
protoOf(XYZColorSpaceImpl).
|
|
3466
|
-
protoOf(XYZColorSpaceImpl).
|
|
3433
|
+
protoOf(HSL).n2l = toXYZ;
|
|
3434
|
+
protoOf(HSL).o2l = toLAB;
|
|
3435
|
+
protoOf(HSL).u2l = toLCHab;
|
|
3436
|
+
protoOf(HSL).a2m = toHWB;
|
|
3437
|
+
protoOf(HWB).h2l = toHSL;
|
|
3438
|
+
protoOf(HWB).n2l = toXYZ;
|
|
3439
|
+
protoOf(HWB).o2l = toLAB;
|
|
3440
|
+
protoOf(HWB).u2l = toLCHab;
|
|
3441
|
+
protoOf(LAB).h2l = toHSL;
|
|
3442
|
+
protoOf(LAB).a2m = toHWB;
|
|
3443
|
+
protoOf(LABColorSpaceImpl).x2p = invoke;
|
|
3444
|
+
protoOf(LCHab).h2l = toHSL;
|
|
3445
|
+
protoOf(LCHab).a2m = toHWB;
|
|
3446
|
+
protoOf(Companion_4).u2o = from255$default;
|
|
3447
|
+
protoOf(RGB).o2l = toLAB;
|
|
3448
|
+
protoOf(RGB).u2l = toLCHab;
|
|
3449
|
+
protoOf(SRGB).x2p = invoke_0;
|
|
3450
|
+
protoOf(SRGB).y2m = invoke_1;
|
|
3451
|
+
protoOf(SRGB).v2o = from255;
|
|
3452
|
+
protoOf(SRGB).u2o = from255$default;
|
|
3453
|
+
protoOf(BT2020Space).x2p = invoke_0;
|
|
3454
|
+
protoOf(BT2020Space).y2m = invoke_1;
|
|
3455
|
+
protoOf(BT2020Space).v2o = from255;
|
|
3456
|
+
protoOf(BT2020Space).u2o = from255$default;
|
|
3457
|
+
protoOf(RGBColorSpaceImpl).x2p = invoke_0;
|
|
3458
|
+
protoOf(RGBColorSpaceImpl).y2m = invoke_1;
|
|
3459
|
+
protoOf(RGBColorSpaceImpl).v2o = from255;
|
|
3460
|
+
protoOf(RGBColorSpaceImpl).u2o = from255$default;
|
|
3461
|
+
protoOf(Companion_5).y2p = invoke$default;
|
|
3462
|
+
protoOf(XYZ).h2l = toHSL;
|
|
3463
|
+
protoOf(XYZ).u2l = toLCHab;
|
|
3464
|
+
protoOf(XYZ).a2m = toHWB;
|
|
3465
|
+
protoOf(XYZColorSpaceImpl).x2p = invoke_2;
|
|
3466
|
+
protoOf(XYZColorSpaceImpl).y2p = invoke$default;
|
|
3467
3467
|
//endregion
|
|
3468
3468
|
//region block: init
|
|
3469
3469
|
CIE_E = 0.008856451679035631;
|