@cruglobal/godtools-shared 1.3.0-SNAPSHOT.1813 → 1.3.0-SNAPSHOT.1815
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/Kermit-kermit-core.js +49 -49
- package/Kermit-kermit-core.js.map +1 -1
- package/Kermit-kermit.js +10 -10
- package/antlr-kotlin-antlr-kotlin-runtime.js +3284 -3135
- package/antlr-kotlin-antlr-kotlin-runtime.js.map +1 -1
- package/colormath-root-colormath.js +678 -651
- package/colormath-root-colormath.js.map +1 -1
- package/fluid-locale.js +160 -159
- package/fluid-locale.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +2438 -2133
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-mpp-godtools-tool-parser-module-common.js +3 -3
- package/kotlin-mpp-godtools-tool-parser-module-common.js.map +1 -1
- package/kotlin-mpp-godtools-tool-parser-module-parser-base.js +64 -64
- package/kotlin-mpp-godtools-tool-parser-module-parser-base.js.map +1 -1
- package/kotlin-mpp-godtools-tool-parser-module-parser-expressions.js +636 -639
- package/kotlin-mpp-godtools-tool-parser-module-parser-expressions.js.map +1 -1
- package/kotlin-mpp-godtools-tool-parser-module-parser.js +2763 -2729
- package/kotlin-mpp-godtools-tool-parser-module-parser.js.map +1 -1
- package/kotlin-mpp-godtools-tool-parser-module-renderer-state.js +22 -22
- package/kotlin-mpp-godtools-tool-parser-module-renderer-state.js.map +1 -1
- package/kotlin-mpp-godtools-tool-parser-publishing-npm.d.ts +424 -79
- package/kotlinx-atomicfu.js +24 -24
- package/kotlinx-coroutines-core.js +2979 -2973
- package/kotlinx-coroutines-core.js.map +1 -1
- package/package.json +1 -1
|
@@ -14,72 +14,72 @@
|
|
|
14
14
|
//region block: imports
|
|
15
15
|
var imul = Math.imul;
|
|
16
16
|
var log2 = Math.log2;
|
|
17
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
18
|
-
var initMetadataForInterface = kotlin_kotlin.$_$.
|
|
19
|
-
var toString = kotlin_kotlin.$_$.
|
|
17
|
+
var protoOf = kotlin_kotlin.$_$.x6;
|
|
18
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.l6;
|
|
19
|
+
var toString = kotlin_kotlin.$_$.a7;
|
|
20
20
|
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.a1;
|
|
21
21
|
var Unit_instance = kotlin_kotlin.$_$.k2;
|
|
22
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
23
|
-
var Enum = kotlin_kotlin.$_$.
|
|
22
|
+
var initMetadataForClass = kotlin_kotlin.$_$.i6;
|
|
23
|
+
var Enum = kotlin_kotlin.$_$.w8;
|
|
24
24
|
var VOID = kotlin_kotlin.$_$.d;
|
|
25
|
-
var emptyMap = kotlin_kotlin.$_$.
|
|
26
|
-
var equals = kotlin_kotlin.$_$.
|
|
25
|
+
var emptyMap = kotlin_kotlin.$_$.p3;
|
|
26
|
+
var equals = kotlin_kotlin.$_$.b6;
|
|
27
27
|
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.v;
|
|
28
|
-
var dropLast = kotlin_kotlin.$_$.
|
|
29
|
-
var joinTo = kotlin_kotlin.$_$.
|
|
28
|
+
var dropLast = kotlin_kotlin.$_$.n3;
|
|
29
|
+
var joinTo = kotlin_kotlin.$_$.c4;
|
|
30
30
|
var Regex_init_$Create$ = kotlin_kotlin.$_$.s;
|
|
31
31
|
var UByte__toString_impl_v72jg = kotlin_kotlin.$_$.d2;
|
|
32
|
-
var numberToInt = kotlin_kotlin.$_$.
|
|
33
|
-
var roundToInt = kotlin_kotlin.$_$.
|
|
32
|
+
var numberToInt = kotlin_kotlin.$_$.v6;
|
|
33
|
+
var roundToInt = kotlin_kotlin.$_$.b7;
|
|
34
34
|
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.t1;
|
|
35
|
-
var padStart = kotlin_kotlin.$_$.
|
|
36
|
-
var charArrayOf = kotlin_kotlin.$_$.
|
|
37
|
-
var trimEnd = kotlin_kotlin.$_$.
|
|
38
|
-
var isNaN_0 = kotlin_kotlin.$_$.
|
|
39
|
-
var joinTo_0 = kotlin_kotlin.$_$.
|
|
40
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.
|
|
41
|
-
var numberToDouble = kotlin_kotlin.$_$.
|
|
42
|
-
var getStringHashCode = kotlin_kotlin.$_$.
|
|
43
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
44
|
-
var initMetadataForObject = kotlin_kotlin.$_$.
|
|
35
|
+
var padStart = kotlin_kotlin.$_$.a8;
|
|
36
|
+
var charArrayOf = kotlin_kotlin.$_$.v5;
|
|
37
|
+
var trimEnd = kotlin_kotlin.$_$.r8;
|
|
38
|
+
var isNaN_0 = kotlin_kotlin.$_$.o9;
|
|
39
|
+
var joinTo_0 = kotlin_kotlin.$_$.b4;
|
|
40
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.q9;
|
|
41
|
+
var numberToDouble = kotlin_kotlin.$_$.u6;
|
|
42
|
+
var getStringHashCode = kotlin_kotlin.$_$.g6;
|
|
43
|
+
var THROW_CCE = kotlin_kotlin.$_$.g9;
|
|
44
|
+
var initMetadataForObject = kotlin_kotlin.$_$.n6;
|
|
45
45
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.h;
|
|
46
|
-
var charSequenceLength = kotlin_kotlin.$_$.
|
|
47
|
-
var charSequenceGet = kotlin_kotlin.$_$.
|
|
46
|
+
var charSequenceLength = kotlin_kotlin.$_$.y5;
|
|
47
|
+
var charSequenceGet = kotlin_kotlin.$_$.x5;
|
|
48
48
|
var toString_0 = kotlin_kotlin.$_$.x1;
|
|
49
49
|
var arrayConcat = kotlin_kotlin.$_$.a;
|
|
50
|
-
var listOf = kotlin_kotlin.$_$.
|
|
51
|
-
var withSign = kotlin_kotlin.$_$.
|
|
52
|
-
var trimMargin = kotlin_kotlin.$_$.
|
|
53
|
-
var hashCode = kotlin_kotlin.$_$.
|
|
54
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.
|
|
55
|
-
var coerceAtLeast = kotlin_kotlin.$_$.
|
|
56
|
-
var getNumberHashCode = kotlin_kotlin.$_$.
|
|
57
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
58
|
-
var contentEquals = kotlin_kotlin.$_$.
|
|
59
|
-
var coerceAtLeast_0 = kotlin_kotlin.$_$.
|
|
50
|
+
var listOf = kotlin_kotlin.$_$.h4;
|
|
51
|
+
var withSign = kotlin_kotlin.$_$.c7;
|
|
52
|
+
var trimMargin = kotlin_kotlin.$_$.s8;
|
|
53
|
+
var hashCode = kotlin_kotlin.$_$.h6;
|
|
54
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.j6;
|
|
55
|
+
var coerceAtLeast = kotlin_kotlin.$_$.d7;
|
|
56
|
+
var getNumberHashCode = kotlin_kotlin.$_$.e6;
|
|
57
|
+
var isInterface = kotlin_kotlin.$_$.q6;
|
|
58
|
+
var contentEquals = kotlin_kotlin.$_$.h3;
|
|
59
|
+
var coerceAtLeast_0 = kotlin_kotlin.$_$.f7;
|
|
60
60
|
var _UInt___init__impl__l7qpdl = kotlin_kotlin.$_$.e2;
|
|
61
61
|
var _UInt___get_data__impl__f0vqqw = kotlin_kotlin.$_$.f2;
|
|
62
|
-
var coerceIn = kotlin_kotlin.$_$.
|
|
62
|
+
var coerceIn = kotlin_kotlin.$_$.h7;
|
|
63
63
|
var _UByte___get_data__impl__jof9qr = kotlin_kotlin.$_$.c2;
|
|
64
|
-
var uintToDouble = kotlin_kotlin.$_$.
|
|
65
|
-
var toByte = kotlin_kotlin.$_$.
|
|
64
|
+
var uintToDouble = kotlin_kotlin.$_$.x9;
|
|
65
|
+
var toByte = kotlin_kotlin.$_$.y6;
|
|
66
66
|
var _UByte___init__impl__g9hnc4 = kotlin_kotlin.$_$.b2;
|
|
67
|
-
var UInt = kotlin_kotlin.$_$.
|
|
67
|
+
var UInt = kotlin_kotlin.$_$.i9;
|
|
68
68
|
var UInt__hashCode_impl_z2mhuw = kotlin_kotlin.$_$.g2;
|
|
69
|
-
var objectCreate = kotlin_kotlin.$_$.
|
|
69
|
+
var objectCreate = kotlin_kotlin.$_$.w6;
|
|
70
70
|
//endregion
|
|
71
71
|
//region block: pre-declaration
|
|
72
72
|
function toHSL() {
|
|
73
|
-
return this.
|
|
73
|
+
return this.c2y().d2y();
|
|
74
74
|
}
|
|
75
75
|
function toXYZ() {
|
|
76
|
-
return this.
|
|
76
|
+
return this.c2y().j2y();
|
|
77
77
|
}
|
|
78
78
|
function toLAB() {
|
|
79
|
-
return this.
|
|
79
|
+
return this.j2y().k2y();
|
|
80
80
|
}
|
|
81
81
|
function toLCHab() {
|
|
82
|
-
return this.
|
|
82
|
+
return this.k2y().q2y();
|
|
83
83
|
}
|
|
84
84
|
initMetadataForInterface(Color, 'Color');
|
|
85
85
|
initMetadataForClass(ColorComponentInfo, 'ColorComponentInfo');
|
|
@@ -89,13 +89,14 @@
|
|
|
89
89
|
initMetadataForClass(WhitePoint, 'WhitePoint');
|
|
90
90
|
initMetadataForObject(Illuminant, 'Illuminant');
|
|
91
91
|
initMetadataForClass(Matrix, 'Matrix');
|
|
92
|
+
initMetadataForClass(Vector, 'Vector');
|
|
92
93
|
initMetadataForCompanion(Companion);
|
|
93
94
|
initMetadataForClass(HSL, 'HSL', VOID, VOID, [Color]);
|
|
94
95
|
initMetadataForClass(HWB, 'HWB', VOID, VOID, [Color]);
|
|
95
96
|
initMetadataForClass(ICtCp, 'ICtCp', VOID, VOID, [Color]);
|
|
96
97
|
initMetadataForObject(PqNonlinearity, 'PqNonlinearity');
|
|
97
98
|
function invoke(l, a, b, alpha) {
|
|
98
|
-
return this.
|
|
99
|
+
return this.b31(numberToDouble(l), numberToDouble(a), numberToDouble(b), numberToDouble(alpha));
|
|
99
100
|
}
|
|
100
101
|
initMetadataForInterface(LABColorSpace, 'LABColorSpace', VOID, VOID, [WhitePointColorSpace]);
|
|
101
102
|
initMetadataForCompanion(Companion_0, VOID, [LABColorSpace]);
|
|
@@ -112,7 +113,7 @@
|
|
|
112
113
|
initMetadataForClass(GammaTransferFunctions, 'GammaTransferFunctions');
|
|
113
114
|
initMetadataForObject(LinearTransferFunctions, 'LinearTransferFunctions');
|
|
114
115
|
function invoke_0(r, g, b, alpha) {
|
|
115
|
-
return this.
|
|
116
|
+
return this.b31(numberToDouble(r), numberToDouble(g), numberToDouble(b), numberToDouble(alpha));
|
|
116
117
|
}
|
|
117
118
|
initMetadataForInterface(RGBColorSpace, 'RGBColorSpace', VOID, VOID, [WhitePointColorSpace]);
|
|
118
119
|
initMetadataForCompanion(Companion_2, VOID, [RGBColorSpace]);
|
|
@@ -129,11 +130,11 @@
|
|
|
129
130
|
initMetadataForCompanion(Companion_3);
|
|
130
131
|
initMetadataForClass(RGBInt, 'RGBInt', VOID, VOID, [Color]);
|
|
131
132
|
function invoke_1(x, y, z, alpha) {
|
|
132
|
-
return this.
|
|
133
|
+
return this.b31(numberToDouble(x), numberToDouble(y), numberToDouble(z), numberToDouble(alpha));
|
|
133
134
|
}
|
|
134
135
|
function invoke$default(x, y, z, alpha, $super) {
|
|
135
136
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
136
|
-
return $super === VOID ? this.
|
|
137
|
+
return $super === VOID ? this.w31(x, y, z, alpha) : invoke_1(x, y, z, alpha);
|
|
137
138
|
}
|
|
138
139
|
initMetadataForInterface(XYZColorSpace, 'XYZColorSpace', VOID, VOID, [WhitePointColorSpace]);
|
|
139
140
|
initMetadataForCompanion(Companion_4, VOID, [XYZColorSpace]);
|
|
@@ -145,15 +146,15 @@
|
|
|
145
146
|
function Color() {
|
|
146
147
|
}
|
|
147
148
|
function convertTo(_this__u8e3s4, space) {
|
|
148
|
-
return space.
|
|
149
|
+
return space.w2y(_this__u8e3s4);
|
|
149
150
|
}
|
|
150
151
|
function ColorComponentInfo(name, isPolar, min, max) {
|
|
151
|
-
this.
|
|
152
|
-
this.
|
|
153
|
-
this.
|
|
154
|
-
this.
|
|
152
|
+
this.x2y_1 = name;
|
|
153
|
+
this.y2y_1 = isPolar;
|
|
154
|
+
this.z2y_1 = min;
|
|
155
|
+
this.a2z_1 = max;
|
|
155
156
|
// Inline function 'kotlin.require' call
|
|
156
|
-
if (!(this.
|
|
157
|
+
if (!(this.z2y_1 <= this.a2z_1)) {
|
|
157
158
|
var message = 'min must be less than or equal to max';
|
|
158
159
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
159
160
|
}
|
|
@@ -220,7 +221,7 @@
|
|
|
220
221
|
var _iterator__ex2g4s = tmp0.j();
|
|
221
222
|
while (_iterator__ex2g4s.k()) {
|
|
222
223
|
var element = _iterator__ex2g4s.l();
|
|
223
|
-
if (equals(element.n1(), _this__u8e3s4.
|
|
224
|
+
if (equals(element.n1(), _this__u8e3s4.b2y())) {
|
|
224
225
|
tmp$ret$1 = element;
|
|
225
226
|
break $l$block;
|
|
226
227
|
}
|
|
@@ -241,17 +242,17 @@
|
|
|
241
242
|
if (tmp2_elvis_lhs == null) {
|
|
242
243
|
var tmp_1;
|
|
243
244
|
if (_this__u8e3s4 instanceof RGB) {
|
|
244
|
-
var tmp4_subject = _this__u8e3s4.
|
|
245
|
-
tmp_1 = equals(tmp4_subject, SRGB_getInstance()) ? renderSRGB(_this__u8e3s4, legacyFormat, legacyName, unitsPercent, alphaPercent, renderAlpha) : equals(tmp4_subject, RGBColorSpaces_getInstance().
|
|
245
|
+
var tmp4_subject = _this__u8e3s4.i2y_1;
|
|
246
|
+
tmp_1 = equals(tmp4_subject, SRGB_getInstance()) ? renderSRGB(_this__u8e3s4, legacyFormat, legacyName, unitsPercent, alphaPercent, renderAlpha) : equals(tmp4_subject, RGBColorSpaces_getInstance().b30_1) ? renderFn(_this__u8e3s4, 'display-p3', unitsPercent, alphaPercent, renderAlpha) : equals(tmp4_subject, RGBColorSpaces_getInstance().x2z_1) ? renderFn(_this__u8e3s4, 'a98-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp4_subject, RGBColorSpaces_getInstance().c30_1) ? renderFn(_this__u8e3s4, 'prophoto-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp4_subject, RGBColorSpaces_getInstance().y2z_1) ? renderFn(_this__u8e3s4, 'rec2020', unitsPercent, alphaPercent, renderAlpha) : equals(tmp4_subject, RGBColorSpaces_getInstance().s2z_1) ? renderFn(_this__u8e3s4, 'srgb-linear', unitsPercent, alphaPercent, renderAlpha) : null;
|
|
246
247
|
} else {
|
|
247
248
|
if (_this__u8e3s4 instanceof HSL) {
|
|
248
249
|
tmp_1 = renderHsl(_this__u8e3s4, legacyFormat, legacyName, hueUnit, alphaPercent, renderAlpha);
|
|
249
250
|
} else {
|
|
250
251
|
if (_this__u8e3s4 instanceof LAB) {
|
|
251
|
-
tmp_1 = renderLab(convertTo(_this__u8e3s4, LABColorSpaces_getInstance().
|
|
252
|
+
tmp_1 = renderLab(convertTo(_this__u8e3s4, LABColorSpaces_getInstance().q2z_1), alphaPercent, renderAlpha);
|
|
252
253
|
} else {
|
|
253
254
|
if (_this__u8e3s4 instanceof LCHab) {
|
|
254
|
-
tmp_1 = renderLCH(convertTo(_this__u8e3s4, LCHabColorSpaces_getInstance().
|
|
255
|
+
tmp_1 = renderLCH(convertTo(_this__u8e3s4, LCHabColorSpaces_getInstance().o2z_1), hueUnit, alphaPercent, renderAlpha);
|
|
255
256
|
} else {
|
|
256
257
|
if (_this__u8e3s4 instanceof HWB) {
|
|
257
258
|
tmp_1 = renderHWB(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha);
|
|
@@ -263,7 +264,7 @@
|
|
|
263
264
|
tmp_1 = renderOklch(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha);
|
|
264
265
|
} else {
|
|
265
266
|
if (_this__u8e3s4 instanceof XYZ) {
|
|
266
|
-
tmp_1 = _this__u8e3s4.
|
|
267
|
+
tmp_1 = _this__u8e3s4.p2y_1.b2z().equals(Illuminant_getInstance().k2z_1) ? renderFn(_this__u8e3s4, 'xyz-d65', unitsPercent, alphaPercent, renderAlpha) : renderFn(_this__u8e3s4.e2z(XYZColorSpaces_getInstance().d2z_1), 'xyz', unitsPercent, alphaPercent, renderAlpha);
|
|
267
268
|
} else {
|
|
268
269
|
tmp_1 = null;
|
|
269
270
|
}
|
|
@@ -284,40 +285,40 @@
|
|
|
284
285
|
// Inline function 'kotlin.text.buildString' call
|
|
285
286
|
// Inline function 'kotlin.apply' call
|
|
286
287
|
var this_0 = StringBuilder_init_$Create$();
|
|
287
|
-
this_0.
|
|
288
|
-
var tmp = dropLast(_this__u8e3s4.
|
|
288
|
+
this_0.a8('color(').a8(name).a8(' ');
|
|
289
|
+
var tmp = dropLast(_this__u8e3s4.h5(), 1);
|
|
289
290
|
joinTo(tmp, this_0, ' ', VOID, VOID, VOID, VOID, renderFn$lambda(unitsPercent));
|
|
290
|
-
this_0.
|
|
291
|
-
this_0.
|
|
291
|
+
this_0.a8(renderAlpha(_this__u8e3s4, false, renderAlpha_0, alphaPercent));
|
|
292
|
+
this_0.a8(')');
|
|
292
293
|
return this_0.toString();
|
|
293
294
|
}
|
|
294
295
|
function get_dashName(_this__u8e3s4) {
|
|
295
|
-
var tmp0 = _this__u8e3s4.
|
|
296
|
+
var tmp0 = _this__u8e3s4.b2y().a2();
|
|
296
297
|
// Inline function 'kotlin.text.replace' call
|
|
297
298
|
// Inline function 'kotlin.text.lowercase' call
|
|
298
299
|
// Inline function 'kotlin.js.asDynamic' call
|
|
299
|
-
return '--' + Regex_init_$Create$('\\W').
|
|
300
|
+
return '--' + Regex_init_$Create$('\\W').ac(tmp0, '-').toLowerCase();
|
|
300
301
|
}
|
|
301
302
|
function renderSRGB(_this__u8e3s4, commas, namedRgba, rgbPercent, alphaPercent, renderAlpha) {
|
|
302
|
-
return renderColorFn(_this__u8e3s4, namedRgba ? 'rgba' : 'rgb', [rgbPercent ? render(_this__u8e3s4.
|
|
303
|
+
return renderColorFn(_this__u8e3s4, namedRgba ? 'rgba' : 'rgb', [rgbPercent ? render(_this__u8e3s4.e2y_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_r__impl__dulq0e(_this__u8e3s4.d30())), rgbPercent ? render(_this__u8e3s4.f2y_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_g__impl__o93c71(_this__u8e3s4.d30())), rgbPercent ? render(_this__u8e3s4.g2y_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_b__impl__m772ua(_this__u8e3s4.d30()))], alphaPercent, renderAlpha, commas);
|
|
303
304
|
}
|
|
304
305
|
function renderHsl(_this__u8e3s4, commas, namedHsla, hueUnit, alphaPercent, renderAlpha) {
|
|
305
|
-
return renderColorFn(_this__u8e3s4, namedHsla ? 'hsla' : 'hsl', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.
|
|
306
|
+
return renderColorFn(_this__u8e3s4, namedHsla ? 'hsla' : 'hsl', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.f30_1, true), render(_this__u8e3s4.g30_1, true)], alphaPercent, renderAlpha, commas);
|
|
306
307
|
}
|
|
307
308
|
function renderLab(_this__u8e3s4, alphaPercent, renderAlpha) {
|
|
308
|
-
return renderColorFn(_this__u8e3s4, 'lab', [render(_this__u8e3s4.
|
|
309
|
+
return renderColorFn(_this__u8e3s4, 'lab', [render(_this__u8e3s4.r2y_1 / 100, true), render(_this__u8e3s4.s2y_1), render(_this__u8e3s4.t2y_1)], alphaPercent, renderAlpha);
|
|
309
310
|
}
|
|
310
311
|
function renderLCH(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
311
|
-
return renderColorFn(_this__u8e3s4, 'lch', [render(_this__u8e3s4.
|
|
312
|
+
return renderColorFn(_this__u8e3s4, 'lch', [render(_this__u8e3s4.i30_1 / 100, true), render(_this__u8e3s4.j30_1), renderHue(_this__u8e3s4, hueUnit)], alphaPercent, renderAlpha);
|
|
312
313
|
}
|
|
313
314
|
function renderHWB(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
314
|
-
return renderColorFn(_this__u8e3s4, 'hwb', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.
|
|
315
|
+
return renderColorFn(_this__u8e3s4, 'hwb', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.n30_1, true), render(_this__u8e3s4.o30_1, true)], alphaPercent, renderAlpha);
|
|
315
316
|
}
|
|
316
317
|
function renderOklab(_this__u8e3s4, alphaPercent, renderAlpha) {
|
|
317
|
-
return renderColorFn(_this__u8e3s4, 'oklab', [render(_this__u8e3s4.
|
|
318
|
+
return renderColorFn(_this__u8e3s4, 'oklab', [render(_this__u8e3s4.p30_1, true), render(_this__u8e3s4.q30_1), render(_this__u8e3s4.r30_1)], alphaPercent, renderAlpha);
|
|
318
319
|
}
|
|
319
320
|
function renderOklch(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
320
|
-
return renderColorFn(_this__u8e3s4, 'oklch', [render(_this__u8e3s4.
|
|
321
|
+
return renderColorFn(_this__u8e3s4, 'oklch', [render(_this__u8e3s4.s30_1, true), render(_this__u8e3s4.t30_1), renderHue(_this__u8e3s4, hueUnit)], alphaPercent, renderAlpha);
|
|
321
322
|
}
|
|
322
323
|
function render(_this__u8e3s4, percent, precision) {
|
|
323
324
|
percent = percent === VOID ? false : percent;
|
|
@@ -344,8 +345,8 @@
|
|
|
344
345
|
}
|
|
345
346
|
function renderAlpha(_this__u8e3s4, commas, renderAlpha, alphaPercent) {
|
|
346
347
|
var tmp;
|
|
347
|
-
if (renderAlpha.equals(RenderCondition_ALWAYS_getInstance()) || (renderAlpha.equals(RenderCondition_AUTO_getInstance()) && !isNaN_0(_this__u8e3s4.
|
|
348
|
-
tmp = (commas ? ', ' : ' / ') + render(nanToOne(_this__u8e3s4.
|
|
348
|
+
if (renderAlpha.equals(RenderCondition_ALWAYS_getInstance()) || (renderAlpha.equals(RenderCondition_AUTO_getInstance()) && !isNaN_0(_this__u8e3s4.a2y()) && !(_this__u8e3s4.a2y() === 1.0))) {
|
|
349
|
+
tmp = (commas ? ', ' : ' / ') + render(nanToOne(_this__u8e3s4.a2y()), alphaPercent);
|
|
349
350
|
} else {
|
|
350
351
|
tmp = '';
|
|
351
352
|
}
|
|
@@ -357,24 +358,24 @@
|
|
|
357
358
|
// Inline function 'kotlin.apply' call
|
|
358
359
|
var this_0 = StringBuilder_init_$Create$();
|
|
359
360
|
var sep = commas ? ', ' : ' ';
|
|
360
|
-
this_0.
|
|
361
|
+
this_0.a8(name).a8('(');
|
|
361
362
|
joinTo_0(components, this_0, sep);
|
|
362
|
-
this_0.
|
|
363
|
-
this_0.
|
|
363
|
+
this_0.a8(renderAlpha(_this__u8e3s4, commas, renderAlpha_0, alphaPercent));
|
|
364
|
+
this_0.a8(')');
|
|
364
365
|
return this_0.toString();
|
|
365
366
|
}
|
|
366
367
|
function renderHue(_this__u8e3s4, hueUnit) {
|
|
367
368
|
var tmp;
|
|
368
|
-
if (isNaN_0(_this__u8e3s4.
|
|
369
|
+
if (isNaN_0(_this__u8e3s4.u30())) {
|
|
369
370
|
tmp = 'none';
|
|
370
371
|
} else {
|
|
371
372
|
var tmp_0;
|
|
372
|
-
switch (hueUnit.
|
|
373
|
+
switch (hueUnit.z1_1) {
|
|
373
374
|
case 0:
|
|
374
|
-
tmp_0 = render(_this__u8e3s4.
|
|
375
|
+
tmp_0 = render(_this__u8e3s4.u30());
|
|
375
376
|
break;
|
|
376
377
|
case 1:
|
|
377
|
-
tmp_0 = render(_this__u8e3s4.
|
|
378
|
+
tmp_0 = render(_this__u8e3s4.u30()) + 'deg';
|
|
378
379
|
break;
|
|
379
380
|
case 2:
|
|
380
381
|
tmp_0 = render(hueAsRad(_this__u8e3s4)) + 'rad';
|
|
@@ -411,27 +412,27 @@
|
|
|
411
412
|
return AngleUnit_AUTO_instance;
|
|
412
413
|
}
|
|
413
414
|
function hueOr(_this__u8e3s4, whenNaN) {
|
|
414
|
-
return isNaN_0(_this__u8e3s4.
|
|
415
|
+
return isNaN_0(_this__u8e3s4.u30()) ? numberToDouble(whenNaN) : _this__u8e3s4.u30();
|
|
415
416
|
}
|
|
416
417
|
function hueAsRad(_this__u8e3s4) {
|
|
417
|
-
return degToRad(_this__u8e3s4.
|
|
418
|
+
return degToRad(_this__u8e3s4.u30());
|
|
418
419
|
}
|
|
419
420
|
function hueAsGrad(_this__u8e3s4) {
|
|
420
|
-
return degToGrad(_this__u8e3s4.
|
|
421
|
+
return degToGrad(_this__u8e3s4.u30());
|
|
421
422
|
}
|
|
422
423
|
function hueAsTurns(_this__u8e3s4) {
|
|
423
|
-
return degToTurns(_this__u8e3s4.
|
|
424
|
+
return degToTurns(_this__u8e3s4.u30());
|
|
424
425
|
}
|
|
425
426
|
function WhitePoint(name, chromaticity) {
|
|
426
|
-
this.
|
|
427
|
-
this.
|
|
427
|
+
this.v30_1 = name;
|
|
428
|
+
this.w30_1 = chromaticity;
|
|
428
429
|
}
|
|
429
430
|
protoOf(WhitePoint).toString = function () {
|
|
430
|
-
return this.
|
|
431
|
+
return this.v30_1;
|
|
431
432
|
};
|
|
432
433
|
protoOf(WhitePoint).hashCode = function () {
|
|
433
|
-
var result = getStringHashCode(this.
|
|
434
|
-
result = imul(result, 31) + this.
|
|
434
|
+
var result = getStringHashCode(this.v30_1);
|
|
435
|
+
result = imul(result, 31) + this.w30_1.hashCode() | 0;
|
|
435
436
|
return result;
|
|
436
437
|
};
|
|
437
438
|
protoOf(WhitePoint).equals = function (other) {
|
|
@@ -440,22 +441,22 @@
|
|
|
440
441
|
if (!(other instanceof WhitePoint))
|
|
441
442
|
return false;
|
|
442
443
|
var tmp0_other_with_cast = other instanceof WhitePoint ? other : THROW_CCE();
|
|
443
|
-
if (!(this.
|
|
444
|
+
if (!(this.v30_1 === tmp0_other_with_cast.v30_1))
|
|
444
445
|
return false;
|
|
445
|
-
if (!this.
|
|
446
|
+
if (!this.w30_1.equals(tmp0_other_with_cast.w30_1))
|
|
446
447
|
return false;
|
|
447
448
|
return true;
|
|
448
449
|
};
|
|
449
450
|
function Illuminant() {
|
|
450
451
|
Illuminant_instance = this;
|
|
451
|
-
this.
|
|
452
|
-
this.
|
|
453
|
-
this.
|
|
454
|
-
this.
|
|
455
|
-
this.
|
|
456
|
-
this.
|
|
457
|
-
this.
|
|
458
|
-
this.
|
|
452
|
+
this.f2z_1 = new WhitePoint('A', xyY_init_$Create$(0.44758, 0.40745));
|
|
453
|
+
this.g2z_1 = new WhitePoint('B', xyY_init_$Create$(0.34842, 0.35161));
|
|
454
|
+
this.h2z_1 = new WhitePoint('C', xyY_init_$Create$(0.31006, 0.31616));
|
|
455
|
+
this.i2z_1 = new WhitePoint('D50', xyY_init_$Create$(0.3457, 0.3585));
|
|
456
|
+
this.j2z_1 = new WhitePoint('D55', xyY_init_$Create$(0.33243, 0.34744));
|
|
457
|
+
this.k2z_1 = new WhitePoint('D65', xyY_init_$Create$(0.3127, 0.329));
|
|
458
|
+
this.l2z_1 = new WhitePoint('D75', xyY_init_$Create$(0.29903, 0.31488));
|
|
459
|
+
this.m2z_1 = new WhitePoint('E', xyY_init_$Create$(1.0 / 3.0, 1.0 / 3.0));
|
|
459
460
|
}
|
|
460
461
|
var Illuminant_instance;
|
|
461
462
|
function Illuminant_getInstance() {
|
|
@@ -483,7 +484,7 @@
|
|
|
483
484
|
this_0.e(tmp$ret$0);
|
|
484
485
|
}
|
|
485
486
|
this_0.e(get_alphaInfo());
|
|
486
|
-
return this_0.
|
|
487
|
+
return this_0.z2();
|
|
487
488
|
}
|
|
488
489
|
function threeComponentInfo(n1, l1, r1, n2, l2, r2, n3, l3, r3) {
|
|
489
490
|
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
@@ -504,7 +505,7 @@
|
|
|
504
505
|
this_0.e(tmp$ret$0);
|
|
505
506
|
}
|
|
506
507
|
this_0.e(get_alphaInfo());
|
|
507
|
-
return this_0.
|
|
508
|
+
return this_0.z2();
|
|
508
509
|
}
|
|
509
510
|
function componentInfoList(c) {
|
|
510
511
|
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
@@ -607,22 +608,22 @@
|
|
|
607
608
|
function Matrix__equals_impl_g5p8p9($this, other) {
|
|
608
609
|
if (!(other instanceof Matrix))
|
|
609
610
|
return false;
|
|
610
|
-
var tmp0_other_with_cast = other instanceof Matrix ? other.
|
|
611
|
+
var tmp0_other_with_cast = other instanceof Matrix ? other.x30_1 : THROW_CCE();
|
|
611
612
|
if (!equals($this, tmp0_other_with_cast))
|
|
612
613
|
return false;
|
|
613
614
|
return true;
|
|
614
615
|
}
|
|
615
616
|
function Matrix(rowMajor) {
|
|
616
|
-
this.
|
|
617
|
+
this.x30_1 = rowMajor;
|
|
617
618
|
}
|
|
618
619
|
protoOf(Matrix).toString = function () {
|
|
619
|
-
return Matrix__toString_impl_l0abk0(this.
|
|
620
|
+
return Matrix__toString_impl_l0abk0(this.x30_1);
|
|
620
621
|
};
|
|
621
622
|
protoOf(Matrix).hashCode = function () {
|
|
622
|
-
return Matrix__hashCode_impl_s9ntm9(this.
|
|
623
|
+
return Matrix__hashCode_impl_s9ntm9(this.x30_1);
|
|
623
624
|
};
|
|
624
625
|
protoOf(Matrix).equals = function (other) {
|
|
625
|
-
return Matrix__equals_impl_g5p8p9(this.
|
|
626
|
+
return Matrix__equals_impl_g5p8p9(this.x30_1, other);
|
|
626
627
|
};
|
|
627
628
|
function inverse(_this__u8e3s4, inPlace) {
|
|
628
629
|
inPlace = inPlace === VOID ? false : inPlace;
|
|
@@ -691,25 +692,51 @@
|
|
|
691
692
|
function _Vector___get_s__impl__pzuljk($this) {
|
|
692
693
|
return _Vector___get_values__impl__3gdbp5($this)[2];
|
|
693
694
|
}
|
|
695
|
+
function Vector__toString_impl_hn2ybi($this) {
|
|
696
|
+
return 'Vector(values=' + toString($this) + ')';
|
|
697
|
+
}
|
|
698
|
+
function Vector__hashCode_impl_442yhd($this) {
|
|
699
|
+
return hashCode($this);
|
|
700
|
+
}
|
|
701
|
+
function Vector__equals_impl_hy6igl($this, other) {
|
|
702
|
+
if (!(other instanceof Vector))
|
|
703
|
+
return false;
|
|
704
|
+
var tmp0_other_with_cast = other instanceof Vector ? other.y30_1 : THROW_CCE();
|
|
705
|
+
if (!equals($this, tmp0_other_with_cast))
|
|
706
|
+
return false;
|
|
707
|
+
return true;
|
|
708
|
+
}
|
|
709
|
+
function Vector(values) {
|
|
710
|
+
this.y30_1 = values;
|
|
711
|
+
}
|
|
712
|
+
protoOf(Vector).toString = function () {
|
|
713
|
+
return Vector__toString_impl_hn2ybi(this.y30_1);
|
|
714
|
+
};
|
|
715
|
+
protoOf(Vector).hashCode = function () {
|
|
716
|
+
return Vector__hashCode_impl_442yhd(this.y30_1);
|
|
717
|
+
};
|
|
718
|
+
protoOf(Vector).equals = function (other) {
|
|
719
|
+
return Vector__equals_impl_hy6igl(this.y30_1, other);
|
|
720
|
+
};
|
|
694
721
|
function dot_0(_this__u8e3s4, v0, v1, v2) {
|
|
695
722
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
696
|
-
var
|
|
697
|
-
var
|
|
723
|
+
var tmp0 = Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 0) * v0 + Matrix__get_impl_xogbpk(_this__u8e3s4, 1, 0) * v1 + Matrix__get_impl_xogbpk(_this__u8e3s4, 2, 0) * v2;
|
|
724
|
+
var tmp2 = Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 1) * v0 + Matrix__get_impl_xogbpk(_this__u8e3s4, 1, 1) * v1 + Matrix__get_impl_xogbpk(_this__u8e3s4, 2, 1) * v2;
|
|
698
725
|
var p2 = Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 2) * v0 + Matrix__get_impl_xogbpk(_this__u8e3s4, 1, 2) * v1 + Matrix__get_impl_xogbpk(_this__u8e3s4, 2, 2) * v2;
|
|
699
|
-
return _Vector___init__impl__y7x4qq_0(
|
|
726
|
+
return _Vector___init__impl__y7x4qq_0(tmp0, tmp2, p2);
|
|
700
727
|
}
|
|
701
728
|
function dot$f($this_dot, $other, x, y) {
|
|
702
729
|
return Matrix__get_impl_xogbpk($this_dot, 0, y) * Matrix__get_impl_xogbpk($other, x, 0) + Matrix__get_impl_xogbpk($this_dot, 1, y) * Matrix__get_impl_xogbpk($other, x, 1) + Matrix__get_impl_xogbpk($this_dot, 2, y) * Matrix__get_impl_xogbpk($other, x, 2);
|
|
703
730
|
}
|
|
704
731
|
function Companion() {
|
|
705
732
|
Companion_instance = this;
|
|
706
|
-
this.
|
|
733
|
+
this.z30_1 = polarComponentInfo('HSL', 0.0, 1.0);
|
|
707
734
|
}
|
|
708
|
-
protoOf(Companion).
|
|
735
|
+
protoOf(Companion).a2 = function () {
|
|
709
736
|
return 'HSL';
|
|
710
737
|
};
|
|
711
|
-
protoOf(Companion).
|
|
712
|
-
return color.
|
|
738
|
+
protoOf(Companion).w2y = function (color) {
|
|
739
|
+
return color.d2y();
|
|
713
740
|
};
|
|
714
741
|
var Companion_instance;
|
|
715
742
|
function Companion_getInstance() {
|
|
@@ -722,62 +749,62 @@
|
|
|
722
749
|
// Inline function 'kotlin.math.min' call
|
|
723
750
|
var b = 1 - l;
|
|
724
751
|
var a = s * Math.min(l, b);
|
|
725
|
-
var
|
|
752
|
+
var tmp0 = k - 3;
|
|
726
753
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
727
754
|
var b_0 = 9 - k;
|
|
728
|
-
var tmp$ret$1 = Math.min(
|
|
755
|
+
var tmp$ret$1 = Math.min(tmp0, b_0, 1.0);
|
|
729
756
|
return l - a * coerceAtLeast(tmp$ret$1, -1.0);
|
|
730
757
|
}
|
|
731
758
|
function HSL(h, s, l, alpha) {
|
|
732
759
|
Companion_getInstance();
|
|
733
760
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
734
|
-
this.
|
|
735
|
-
this.
|
|
736
|
-
this.
|
|
737
|
-
this.
|
|
761
|
+
this.e30_1 = h;
|
|
762
|
+
this.f30_1 = s;
|
|
763
|
+
this.g30_1 = l;
|
|
764
|
+
this.h30_1 = alpha;
|
|
738
765
|
}
|
|
739
|
-
protoOf(HSL).
|
|
740
|
-
return this.
|
|
766
|
+
protoOf(HSL).u30 = function () {
|
|
767
|
+
return this.e30_1;
|
|
741
768
|
};
|
|
742
|
-
protoOf(HSL).
|
|
743
|
-
return this.
|
|
769
|
+
protoOf(HSL).a2y = function () {
|
|
770
|
+
return this.h30_1;
|
|
744
771
|
};
|
|
745
|
-
protoOf(HSL).
|
|
772
|
+
protoOf(HSL).b2y = function () {
|
|
746
773
|
return Companion_getInstance();
|
|
747
774
|
};
|
|
748
|
-
protoOf(HSL).
|
|
749
|
-
if (this.
|
|
750
|
-
return Companion_getInstance_2().
|
|
775
|
+
protoOf(HSL).c2y = function () {
|
|
776
|
+
if (this.f30_1 < 1.0E-7)
|
|
777
|
+
return Companion_getInstance_2().b31(this.g30_1, this.g30_1, this.g30_1, this.h30_1);
|
|
751
778
|
var h = normalizeDeg_0(hueOr(this, 0)) / 30.0;
|
|
752
|
-
var s = this.
|
|
753
|
-
var l = this.
|
|
754
|
-
return SRGB_getInstance().
|
|
779
|
+
var s = this.f30_1;
|
|
780
|
+
var l = this.g30_1;
|
|
781
|
+
return SRGB_getInstance().b31(toSRGB$f(h, s, l, 0), toSRGB$f(h, s, l, 8), toSRGB$f(h, s, l, 4), this.h30_1);
|
|
755
782
|
};
|
|
756
|
-
protoOf(HSL).
|
|
783
|
+
protoOf(HSL).d2y = function () {
|
|
757
784
|
return this;
|
|
758
785
|
};
|
|
759
|
-
protoOf(HSL).
|
|
786
|
+
protoOf(HSL).h5 = function () {
|
|
760
787
|
// Inline function 'kotlin.floatArrayOf' call
|
|
761
|
-
return new Float32Array([this.
|
|
788
|
+
return new Float32Array([this.e30_1, this.f30_1, this.g30_1, this.h30_1]);
|
|
762
789
|
};
|
|
763
|
-
protoOf(HSL).
|
|
790
|
+
protoOf(HSL).d31 = function (h, s, l, alpha) {
|
|
764
791
|
return new HSL(h, s, l, alpha);
|
|
765
792
|
};
|
|
766
|
-
protoOf(HSL).
|
|
767
|
-
h = h === VOID ? this.
|
|
768
|
-
s = s === VOID ? this.
|
|
769
|
-
l = l === VOID ? this.
|
|
770
|
-
alpha = alpha === VOID ? this.
|
|
771
|
-
return $super === VOID ? this.
|
|
793
|
+
protoOf(HSL).e31 = function (h, s, l, alpha, $super) {
|
|
794
|
+
h = h === VOID ? this.e30_1 : h;
|
|
795
|
+
s = s === VOID ? this.f30_1 : s;
|
|
796
|
+
l = l === VOID ? this.g30_1 : l;
|
|
797
|
+
alpha = alpha === VOID ? this.h30_1 : alpha;
|
|
798
|
+
return $super === VOID ? this.d31(h, s, l, alpha) : $super.d31.call(this, h, s, l, alpha);
|
|
772
799
|
};
|
|
773
800
|
protoOf(HSL).toString = function () {
|
|
774
|
-
return 'HSL(h=' + this.
|
|
801
|
+
return 'HSL(h=' + this.e30_1 + ', s=' + this.f30_1 + ', l=' + this.g30_1 + ', alpha=' + this.h30_1 + ')';
|
|
775
802
|
};
|
|
776
803
|
protoOf(HSL).hashCode = function () {
|
|
777
|
-
var result = getNumberHashCode(this.
|
|
778
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
779
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
780
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
804
|
+
var result = getNumberHashCode(this.e30_1);
|
|
805
|
+
result = imul(result, 31) + getNumberHashCode(this.f30_1) | 0;
|
|
806
|
+
result = imul(result, 31) + getNumberHashCode(this.g30_1) | 0;
|
|
807
|
+
result = imul(result, 31) + getNumberHashCode(this.h30_1) | 0;
|
|
781
808
|
return result;
|
|
782
809
|
};
|
|
783
810
|
protoOf(HSL).equals = function (other) {
|
|
@@ -786,13 +813,13 @@
|
|
|
786
813
|
if (!(other instanceof HSL))
|
|
787
814
|
return false;
|
|
788
815
|
var tmp0_other_with_cast = other instanceof HSL ? other : THROW_CCE();
|
|
789
|
-
if (!equals(this.
|
|
816
|
+
if (!equals(this.e30_1, tmp0_other_with_cast.e30_1))
|
|
790
817
|
return false;
|
|
791
|
-
if (!equals(this.
|
|
818
|
+
if (!equals(this.f30_1, tmp0_other_with_cast.f30_1))
|
|
792
819
|
return false;
|
|
793
|
-
if (!equals(this.
|
|
820
|
+
if (!equals(this.g30_1, tmp0_other_with_cast.g30_1))
|
|
794
821
|
return false;
|
|
795
|
-
if (!equals(this.
|
|
822
|
+
if (!equals(this.h30_1, tmp0_other_with_cast.h30_1))
|
|
796
823
|
return false;
|
|
797
824
|
return true;
|
|
798
825
|
};
|
|
@@ -836,43 +863,43 @@
|
|
|
836
863
|
var ICTCP_LMS_TO_XYZ;
|
|
837
864
|
function ICtCp() {
|
|
838
865
|
}
|
|
839
|
-
protoOf(ICtCp).
|
|
840
|
-
var fo = RGBColorSpaces_getInstance().
|
|
866
|
+
protoOf(ICtCp).j31 = function () {
|
|
867
|
+
var fo = RGBColorSpaces_getInstance().y2z_1.k31();
|
|
841
868
|
var tmp0 = get_ICTCP_ICTCP_to_LMS();
|
|
842
|
-
var
|
|
843
|
-
var
|
|
869
|
+
var tmp2 = this.f31_1;
|
|
870
|
+
var tmp4 = this.g31_1;
|
|
844
871
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
845
|
-
var v2 = this.
|
|
846
|
-
var
|
|
847
|
-
var
|
|
848
|
-
var s = Matrix__get_impl_xogbpk(tmp0, 0, 2) *
|
|
849
|
-
var
|
|
850
|
-
var
|
|
851
|
-
var
|
|
872
|
+
var v2 = this.h31_1;
|
|
873
|
+
var tmp0_0 = Matrix__get_impl_xogbpk(tmp0, 0, 0) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 1, 0) * tmp4 + Matrix__get_impl_xogbpk(tmp0, 2, 0) * v2;
|
|
874
|
+
var tmp2_0 = Matrix__get_impl_xogbpk(tmp0, 0, 1) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 1, 1) * tmp4 + Matrix__get_impl_xogbpk(tmp0, 2, 1) * v2;
|
|
875
|
+
var s = Matrix__get_impl_xogbpk(tmp0, 0, 2) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 1, 2) * tmp4 + Matrix__get_impl_xogbpk(tmp0, 2, 2) * v2;
|
|
876
|
+
var tmp0_1 = get_ICTCP_LMS_to_RGB();
|
|
877
|
+
var tmp2_1 = PqNonlinearity_instance.t31(tmp0_0);
|
|
878
|
+
var tmp4_0 = PqNonlinearity_instance.t31(tmp2_0);
|
|
852
879
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
853
|
-
var v2_0 = PqNonlinearity_instance.
|
|
854
|
-
var
|
|
855
|
-
var
|
|
856
|
-
var b = Matrix__get_impl_xogbpk(
|
|
857
|
-
return RGBColorSpaces_getInstance().
|
|
880
|
+
var v2_0 = PqNonlinearity_instance.t31(s);
|
|
881
|
+
var tmp0_2 = Matrix__get_impl_xogbpk(tmp0_1, 0, 0) * tmp2_1 + Matrix__get_impl_xogbpk(tmp0_1, 1, 0) * tmp4_0 + Matrix__get_impl_xogbpk(tmp0_1, 2, 0) * v2_0;
|
|
882
|
+
var tmp2_2 = Matrix__get_impl_xogbpk(tmp0_1, 0, 1) * tmp2_1 + Matrix__get_impl_xogbpk(tmp0_1, 1, 1) * tmp4_0 + Matrix__get_impl_xogbpk(tmp0_1, 2, 1) * v2_0;
|
|
883
|
+
var b = Matrix__get_impl_xogbpk(tmp0_1, 0, 2) * tmp2_1 + Matrix__get_impl_xogbpk(tmp0_1, 1, 2) * tmp4_0 + Matrix__get_impl_xogbpk(tmp0_1, 2, 2) * v2_0;
|
|
884
|
+
return RGBColorSpaces_getInstance().y2z_1.b31(fo.u31(tmp0_2), fo.u31(tmp2_2), fo.u31(b), this.i31_1);
|
|
858
885
|
};
|
|
859
886
|
function PqNonlinearity() {
|
|
860
|
-
this.
|
|
861
|
-
this.
|
|
862
|
-
this.
|
|
863
|
-
this.
|
|
864
|
-
this.
|
|
865
|
-
this.
|
|
866
|
-
this.
|
|
867
|
-
this.
|
|
868
|
-
}
|
|
869
|
-
protoOf(PqNonlinearity).
|
|
887
|
+
this.l31_1 = 0.1593017578125;
|
|
888
|
+
this.m31_1 = 78.84375;
|
|
889
|
+
this.n31_1 = 0.8359375;
|
|
890
|
+
this.o31_1 = 18.8515625;
|
|
891
|
+
this.p31_1 = 18.6875;
|
|
892
|
+
this.q31_1 = 10000.0;
|
|
893
|
+
this.r31_1 = 6.277394636015326;
|
|
894
|
+
this.s31_1 = 0.012683313515655966;
|
|
895
|
+
}
|
|
896
|
+
protoOf(PqNonlinearity).t31 = function (x) {
|
|
870
897
|
var vp = spow(x, 0.012683313515655966);
|
|
871
898
|
var n = coerceAtLeast(vp - 0.8359375, 0.0);
|
|
872
899
|
var l = spow_0(n / (18.8515625 - 18.6875 * vp), 6.277394636015326);
|
|
873
900
|
return 10000.0 * l;
|
|
874
901
|
};
|
|
875
|
-
protoOf(PqNonlinearity).
|
|
902
|
+
protoOf(PqNonlinearity).u31 = function (x) {
|
|
876
903
|
var yp = spow_0(x / 10000.0, 0.1593017578125);
|
|
877
904
|
return spow_0((0.8359375 + 18.8515625 * yp) / (1.0 + 18.6875 * yp), 78.84375);
|
|
878
905
|
};
|
|
@@ -896,28 +923,28 @@
|
|
|
896
923
|
}
|
|
897
924
|
function Companion_0() {
|
|
898
925
|
Companion_instance_0 = this;
|
|
899
|
-
this.
|
|
926
|
+
this.v31_1 = LABColorSpaces_getInstance().p2z_1;
|
|
900
927
|
}
|
|
901
928
|
protoOf(Companion_0).equals = function (other) {
|
|
902
|
-
return equals(LABColorSpaces_getInstance().
|
|
929
|
+
return equals(LABColorSpaces_getInstance().p2z_1, other);
|
|
903
930
|
};
|
|
904
931
|
protoOf(Companion_0).hashCode = function () {
|
|
905
|
-
return hashCode(LABColorSpaces_getInstance().
|
|
932
|
+
return hashCode(LABColorSpaces_getInstance().p2z_1);
|
|
906
933
|
};
|
|
907
|
-
protoOf(Companion_0).
|
|
908
|
-
return this.
|
|
934
|
+
protoOf(Companion_0).b31 = function (l, a, b, alpha) {
|
|
935
|
+
return this.v31_1.b31(l, a, b, alpha);
|
|
909
936
|
};
|
|
910
|
-
protoOf(Companion_0).
|
|
911
|
-
return this.
|
|
937
|
+
protoOf(Companion_0).w31 = function (l, a, b, alpha) {
|
|
938
|
+
return this.v31_1.w31(l, a, b, alpha);
|
|
912
939
|
};
|
|
913
|
-
protoOf(Companion_0).
|
|
914
|
-
return this.
|
|
940
|
+
protoOf(Companion_0).b2z = function () {
|
|
941
|
+
return this.v31_1.b2z();
|
|
915
942
|
};
|
|
916
|
-
protoOf(Companion_0).
|
|
917
|
-
return this.
|
|
943
|
+
protoOf(Companion_0).a2 = function () {
|
|
944
|
+
return this.v31_1.a2();
|
|
918
945
|
};
|
|
919
|
-
protoOf(Companion_0).
|
|
920
|
-
return this.
|
|
946
|
+
protoOf(Companion_0).w2y = function (color) {
|
|
947
|
+
return this.v31_1.w2y(color);
|
|
921
948
|
};
|
|
922
949
|
var Companion_instance_0;
|
|
923
950
|
function Companion_getInstance_0() {
|
|
@@ -927,34 +954,34 @@
|
|
|
927
954
|
}
|
|
928
955
|
function LAB(l, a, b, alpha, space) {
|
|
929
956
|
Companion_getInstance_0();
|
|
930
|
-
this.
|
|
931
|
-
this.
|
|
932
|
-
this.
|
|
933
|
-
this.
|
|
934
|
-
this.
|
|
935
|
-
}
|
|
936
|
-
protoOf(LAB).
|
|
937
|
-
return this.
|
|
938
|
-
};
|
|
939
|
-
protoOf(LAB).
|
|
940
|
-
return this.
|
|
941
|
-
};
|
|
942
|
-
protoOf(LAB).
|
|
943
|
-
return this.
|
|
944
|
-
};
|
|
945
|
-
protoOf(LAB).
|
|
946
|
-
var xyzSpace = XYZColorSpace_0(this.
|
|
947
|
-
if (this.
|
|
948
|
-
return xyzSpace.
|
|
949
|
-
var fy = (this.
|
|
950
|
-
var fz = fy - this.
|
|
951
|
-
var fx = this.
|
|
957
|
+
this.r2y_1 = l;
|
|
958
|
+
this.s2y_1 = a;
|
|
959
|
+
this.t2y_1 = b;
|
|
960
|
+
this.u2y_1 = alpha;
|
|
961
|
+
this.v2y_1 = space;
|
|
962
|
+
}
|
|
963
|
+
protoOf(LAB).a2y = function () {
|
|
964
|
+
return this.u2y_1;
|
|
965
|
+
};
|
|
966
|
+
protoOf(LAB).b2y = function () {
|
|
967
|
+
return this.v2y_1;
|
|
968
|
+
};
|
|
969
|
+
protoOf(LAB).c2y = function () {
|
|
970
|
+
return this.r2y_1 === 0.0 ? Companion_getInstance_2().b31(0.0, 0.0, 0.0, this.u2y_1) : this.j2y().c2y();
|
|
971
|
+
};
|
|
972
|
+
protoOf(LAB).j2y = function () {
|
|
973
|
+
var xyzSpace = XYZColorSpace_0(this.v2y_1.b2z());
|
|
974
|
+
if (this.r2y_1 === 0.0)
|
|
975
|
+
return xyzSpace.x31(0.0, 0.0, 0.0);
|
|
976
|
+
var fy = (this.r2y_1 + 16) / 116.0;
|
|
977
|
+
var fz = fy - this.t2y_1 / 200.0;
|
|
978
|
+
var fx = this.s2y_1 / 500.0 + fy;
|
|
952
979
|
var tmp;
|
|
953
|
-
if (this.
|
|
980
|
+
if (this.r2y_1 > 8.0) {
|
|
954
981
|
// Inline function 'kotlin.math.pow' call
|
|
955
982
|
tmp = Math.pow(fy, 3);
|
|
956
983
|
} else {
|
|
957
|
-
tmp = this.
|
|
984
|
+
tmp = this.r2y_1 / 903.2962962962963;
|
|
958
985
|
}
|
|
959
986
|
var yr = tmp;
|
|
960
987
|
// Inline function 'kotlin.math.pow' call
|
|
@@ -965,13 +992,13 @@
|
|
|
965
992
|
// Inline function 'kotlin.let' call
|
|
966
993
|
var it_0 = Math.pow(fx, 3);
|
|
967
994
|
var xr = it_0 > 0.008856451679035631 ? it_0 : (116 * fx - 16) / 903.2962962962963;
|
|
968
|
-
var wp = this.
|
|
969
|
-
return xyzSpace.
|
|
995
|
+
var wp = this.v2y_1.b2z().w30_1;
|
|
996
|
+
return xyzSpace.w31(xr * wp.b32(), yr * wp.a32_1, zr * wp.c32(), this.u2y_1);
|
|
970
997
|
};
|
|
971
|
-
protoOf(LAB).
|
|
972
|
-
var tmp0 = this.
|
|
998
|
+
protoOf(LAB).q2y = function () {
|
|
999
|
+
var tmp0 = this.s2y_1;
|
|
973
1000
|
// Inline function 'com.github.ajalt.colormath.internal.toPolarModel' call
|
|
974
|
-
var b = this.
|
|
1001
|
+
var b = this.t2y_1;
|
|
975
1002
|
// Inline function 'kotlin.math.sqrt' call
|
|
976
1003
|
var x = tmp0 * tmp0 + b * b;
|
|
977
1004
|
var c = Math.sqrt(x);
|
|
@@ -985,24 +1012,24 @@
|
|
|
985
1012
|
}
|
|
986
1013
|
var h = tmp;
|
|
987
1014
|
var h_0 = normalizeDeg_0(h);
|
|
988
|
-
return LCHabColorSpace_0(this.
|
|
1015
|
+
return LCHabColorSpace_0(this.v2y_1.b2z()).b31(this.r2y_1, c, h_0, this.u2y_1);
|
|
989
1016
|
};
|
|
990
|
-
protoOf(LAB).
|
|
1017
|
+
protoOf(LAB).k2y = function () {
|
|
991
1018
|
return this;
|
|
992
1019
|
};
|
|
993
|
-
protoOf(LAB).
|
|
1020
|
+
protoOf(LAB).h5 = function () {
|
|
994
1021
|
// Inline function 'kotlin.floatArrayOf' call
|
|
995
|
-
return new Float32Array([this.
|
|
1022
|
+
return new Float32Array([this.r2y_1, this.s2y_1, this.t2y_1, this.u2y_1]);
|
|
996
1023
|
};
|
|
997
1024
|
protoOf(LAB).toString = function () {
|
|
998
|
-
return 'LAB(l=' + this.
|
|
1025
|
+
return 'LAB(l=' + this.r2y_1 + ', a=' + this.s2y_1 + ', b=' + this.t2y_1 + ', alpha=' + this.u2y_1 + ', space=' + toString(this.v2y_1) + ')';
|
|
999
1026
|
};
|
|
1000
1027
|
protoOf(LAB).hashCode = function () {
|
|
1001
|
-
var result = getNumberHashCode(this.
|
|
1002
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1003
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1004
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1005
|
-
result = imul(result, 31) + hashCode(this.
|
|
1028
|
+
var result = getNumberHashCode(this.r2y_1);
|
|
1029
|
+
result = imul(result, 31) + getNumberHashCode(this.s2y_1) | 0;
|
|
1030
|
+
result = imul(result, 31) + getNumberHashCode(this.t2y_1) | 0;
|
|
1031
|
+
result = imul(result, 31) + getNumberHashCode(this.u2y_1) | 0;
|
|
1032
|
+
result = imul(result, 31) + hashCode(this.v2y_1) | 0;
|
|
1006
1033
|
return result;
|
|
1007
1034
|
};
|
|
1008
1035
|
protoOf(LAB).equals = function (other) {
|
|
@@ -1011,27 +1038,27 @@
|
|
|
1011
1038
|
if (!(other instanceof LAB))
|
|
1012
1039
|
return false;
|
|
1013
1040
|
var tmp0_other_with_cast = other instanceof LAB ? other : THROW_CCE();
|
|
1014
|
-
if (!equals(this.
|
|
1041
|
+
if (!equals(this.r2y_1, tmp0_other_with_cast.r2y_1))
|
|
1015
1042
|
return false;
|
|
1016
|
-
if (!equals(this.
|
|
1043
|
+
if (!equals(this.s2y_1, tmp0_other_with_cast.s2y_1))
|
|
1017
1044
|
return false;
|
|
1018
|
-
if (!equals(this.
|
|
1045
|
+
if (!equals(this.t2y_1, tmp0_other_with_cast.t2y_1))
|
|
1019
1046
|
return false;
|
|
1020
|
-
if (!equals(this.
|
|
1047
|
+
if (!equals(this.u2y_1, tmp0_other_with_cast.u2y_1))
|
|
1021
1048
|
return false;
|
|
1022
|
-
if (!equals(this.
|
|
1049
|
+
if (!equals(this.v2y_1, tmp0_other_with_cast.v2y_1))
|
|
1023
1050
|
return false;
|
|
1024
1051
|
return true;
|
|
1025
1052
|
};
|
|
1026
1053
|
function LABColorSpace() {
|
|
1027
1054
|
}
|
|
1028
1055
|
function LABColorSpace_0(whitePoint) {
|
|
1029
|
-
return whitePoint.equals(Illuminant_getInstance().
|
|
1056
|
+
return whitePoint.equals(Illuminant_getInstance().k2z_1) ? LABColorSpaces_getInstance().p2z_1 : whitePoint.equals(Illuminant_getInstance().i2z_1) ? LABColorSpaces_getInstance().q2z_1 : new LABColorSpaceImpl(whitePoint);
|
|
1030
1057
|
}
|
|
1031
1058
|
function LABColorSpaces() {
|
|
1032
1059
|
LABColorSpaces_instance = this;
|
|
1033
|
-
this.
|
|
1034
|
-
this.
|
|
1060
|
+
this.p2z_1 = new LABColorSpaceImpl(Illuminant_getInstance().k2z_1);
|
|
1061
|
+
this.q2z_1 = new LABColorSpaceImpl(Illuminant_getInstance().i2z_1);
|
|
1035
1062
|
}
|
|
1036
1063
|
var LABColorSpaces_instance;
|
|
1037
1064
|
function LABColorSpaces_getInstance() {
|
|
@@ -1040,41 +1067,41 @@
|
|
|
1040
1067
|
return LABColorSpaces_instance;
|
|
1041
1068
|
}
|
|
1042
1069
|
function LABColorSpaceImpl(whitePoint) {
|
|
1043
|
-
this.
|
|
1044
|
-
this.
|
|
1070
|
+
this.d32_1 = whitePoint;
|
|
1071
|
+
this.e32_1 = threeComponentInfo('L', 0.0, 100.0, 'A', -128.0, 128.0, 'B', -128.0, 128.0);
|
|
1045
1072
|
}
|
|
1046
|
-
protoOf(LABColorSpaceImpl).
|
|
1047
|
-
return this.
|
|
1073
|
+
protoOf(LABColorSpaceImpl).b2z = function () {
|
|
1074
|
+
return this.d32_1;
|
|
1048
1075
|
};
|
|
1049
|
-
protoOf(LABColorSpaceImpl).
|
|
1076
|
+
protoOf(LABColorSpaceImpl).a2 = function () {
|
|
1050
1077
|
return 'LAB';
|
|
1051
1078
|
};
|
|
1052
|
-
protoOf(LABColorSpaceImpl).
|
|
1079
|
+
protoOf(LABColorSpaceImpl).w2y = function (color) {
|
|
1053
1080
|
// Inline function 'com.github.ajalt.colormath.internal.adaptToThis' call
|
|
1054
1081
|
var tmp;
|
|
1055
|
-
var tmp_0 = color.
|
|
1082
|
+
var tmp_0 = color.b2y();
|
|
1056
1083
|
var tmp0_safe_receiver = isInterface(tmp_0, WhitePointColorSpace) ? tmp_0 : null;
|
|
1057
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1058
|
-
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().
|
|
1059
|
-
tmp = color.
|
|
1084
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b2z();
|
|
1085
|
+
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().k2z_1 : tmp1_elvis_lhs).equals(this.b2z())) {
|
|
1086
|
+
tmp = color.k2y();
|
|
1060
1087
|
} else {
|
|
1061
|
-
tmp = color.
|
|
1088
|
+
tmp = color.j2y().e2z(XYZColorSpace_0(this.b2z())).k2y();
|
|
1062
1089
|
}
|
|
1063
1090
|
return tmp;
|
|
1064
1091
|
};
|
|
1065
1092
|
protoOf(LABColorSpaceImpl).toString = function () {
|
|
1066
|
-
return 'LABColorSpace(' + this.
|
|
1093
|
+
return 'LABColorSpace(' + this.d32_1.toString() + ')';
|
|
1067
1094
|
};
|
|
1068
|
-
protoOf(LABColorSpaceImpl).
|
|
1095
|
+
protoOf(LABColorSpaceImpl).b31 = function (l, a, b, alpha) {
|
|
1069
1096
|
return new LAB(l, a, b, alpha, this);
|
|
1070
1097
|
};
|
|
1071
1098
|
protoOf(LABColorSpaceImpl).hashCode = function () {
|
|
1072
|
-
return this.
|
|
1099
|
+
return this.d32_1.hashCode();
|
|
1073
1100
|
};
|
|
1074
1101
|
protoOf(LABColorSpaceImpl).equals = function (other) {
|
|
1075
1102
|
var tmp;
|
|
1076
1103
|
if (!(other == null) ? isInterface(other, LABColorSpace) : false) {
|
|
1077
|
-
tmp = this.
|
|
1104
|
+
tmp = this.d32_1.equals(other.b2z());
|
|
1078
1105
|
} else {
|
|
1079
1106
|
tmp = false;
|
|
1080
1107
|
}
|
|
@@ -1082,25 +1109,25 @@
|
|
|
1082
1109
|
};
|
|
1083
1110
|
function Companion_1() {
|
|
1084
1111
|
Companion_instance_1 = this;
|
|
1085
|
-
this.
|
|
1112
|
+
this.f32_1 = LCHabColorSpaces_getInstance().n2z_1;
|
|
1086
1113
|
}
|
|
1087
1114
|
protoOf(Companion_1).equals = function (other) {
|
|
1088
|
-
return equals(LCHabColorSpaces_getInstance().
|
|
1115
|
+
return equals(LCHabColorSpaces_getInstance().n2z_1, other);
|
|
1089
1116
|
};
|
|
1090
1117
|
protoOf(Companion_1).hashCode = function () {
|
|
1091
|
-
return hashCode(LCHabColorSpaces_getInstance().
|
|
1118
|
+
return hashCode(LCHabColorSpaces_getInstance().n2z_1);
|
|
1092
1119
|
};
|
|
1093
|
-
protoOf(Companion_1).
|
|
1094
|
-
return this.
|
|
1120
|
+
protoOf(Companion_1).b31 = function (l, c, h, alpha) {
|
|
1121
|
+
return this.f32_1.b31(l, c, h, alpha);
|
|
1095
1122
|
};
|
|
1096
|
-
protoOf(Companion_1).
|
|
1097
|
-
return this.
|
|
1123
|
+
protoOf(Companion_1).b2z = function () {
|
|
1124
|
+
return this.f32_1.b2z();
|
|
1098
1125
|
};
|
|
1099
|
-
protoOf(Companion_1).
|
|
1100
|
-
return this.
|
|
1126
|
+
protoOf(Companion_1).a2 = function () {
|
|
1127
|
+
return this.f32_1.a2();
|
|
1101
1128
|
};
|
|
1102
|
-
protoOf(Companion_1).
|
|
1103
|
-
return this.
|
|
1129
|
+
protoOf(Companion_1).w2y = function (color) {
|
|
1130
|
+
return this.f32_1.w2y(color);
|
|
1104
1131
|
};
|
|
1105
1132
|
var Companion_instance_1;
|
|
1106
1133
|
function Companion_getInstance_1() {
|
|
@@ -1110,54 +1137,54 @@
|
|
|
1110
1137
|
}
|
|
1111
1138
|
function LCHab(l, c, h, alpha, space) {
|
|
1112
1139
|
Companion_getInstance_1();
|
|
1113
|
-
this.
|
|
1114
|
-
this.
|
|
1115
|
-
this.
|
|
1116
|
-
this.
|
|
1117
|
-
this.
|
|
1140
|
+
this.i30_1 = l;
|
|
1141
|
+
this.j30_1 = c;
|
|
1142
|
+
this.k30_1 = h;
|
|
1143
|
+
this.l30_1 = alpha;
|
|
1144
|
+
this.m30_1 = space;
|
|
1118
1145
|
}
|
|
1119
|
-
protoOf(LCHab).
|
|
1120
|
-
return this.
|
|
1146
|
+
protoOf(LCHab).u30 = function () {
|
|
1147
|
+
return this.k30_1;
|
|
1121
1148
|
};
|
|
1122
|
-
protoOf(LCHab).
|
|
1123
|
-
return this.
|
|
1149
|
+
protoOf(LCHab).a2y = function () {
|
|
1150
|
+
return this.l30_1;
|
|
1124
1151
|
};
|
|
1125
|
-
protoOf(LCHab).
|
|
1126
|
-
return this.
|
|
1152
|
+
protoOf(LCHab).b2y = function () {
|
|
1153
|
+
return this.m30_1;
|
|
1127
1154
|
};
|
|
1128
|
-
protoOf(LCHab).
|
|
1129
|
-
return this.
|
|
1155
|
+
protoOf(LCHab).c2y = function () {
|
|
1156
|
+
return this.k2y().c2y();
|
|
1130
1157
|
};
|
|
1131
|
-
protoOf(LCHab).
|
|
1132
|
-
return this.
|
|
1158
|
+
protoOf(LCHab).j2y = function () {
|
|
1159
|
+
return this.k2y().j2y();
|
|
1133
1160
|
};
|
|
1134
|
-
protoOf(LCHab).
|
|
1135
|
-
var tmp0 = this.
|
|
1161
|
+
protoOf(LCHab).k2y = function () {
|
|
1162
|
+
var tmp0 = this.j30_1;
|
|
1136
1163
|
// Inline function 'com.github.ajalt.colormath.internal.fromPolarModel' call
|
|
1137
|
-
var h = this.
|
|
1164
|
+
var h = this.k30_1;
|
|
1138
1165
|
var hDegrees = isNaN_0(h) ? 0.0 : degToRad(h);
|
|
1139
1166
|
// Inline function 'kotlin.math.cos' call
|
|
1140
1167
|
var a = tmp0 * Math.cos(hDegrees);
|
|
1141
1168
|
// Inline function 'kotlin.math.sin' call
|
|
1142
1169
|
var b = tmp0 * Math.sin(hDegrees);
|
|
1143
|
-
return LABColorSpace_0(this.
|
|
1170
|
+
return LABColorSpace_0(this.m30_1.b2z()).b31(this.i30_1, a, b, this.l30_1);
|
|
1144
1171
|
};
|
|
1145
|
-
protoOf(LCHab).
|
|
1172
|
+
protoOf(LCHab).q2y = function () {
|
|
1146
1173
|
return this;
|
|
1147
1174
|
};
|
|
1148
|
-
protoOf(LCHab).
|
|
1175
|
+
protoOf(LCHab).h5 = function () {
|
|
1149
1176
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1150
|
-
return new Float32Array([this.
|
|
1177
|
+
return new Float32Array([this.i30_1, this.j30_1, this.k30_1, this.l30_1]);
|
|
1151
1178
|
};
|
|
1152
1179
|
protoOf(LCHab).toString = function () {
|
|
1153
|
-
return 'LCHab(l=' + this.
|
|
1180
|
+
return 'LCHab(l=' + this.i30_1 + ', c=' + this.j30_1 + ', h=' + this.k30_1 + ', alpha=' + this.l30_1 + ', space=' + toString(this.m30_1) + ')';
|
|
1154
1181
|
};
|
|
1155
1182
|
protoOf(LCHab).hashCode = function () {
|
|
1156
|
-
var result = getNumberHashCode(this.
|
|
1157
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1158
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1159
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1160
|
-
result = imul(result, 31) + hashCode(this.
|
|
1183
|
+
var result = getNumberHashCode(this.i30_1);
|
|
1184
|
+
result = imul(result, 31) + getNumberHashCode(this.j30_1) | 0;
|
|
1185
|
+
result = imul(result, 31) + getNumberHashCode(this.k30_1) | 0;
|
|
1186
|
+
result = imul(result, 31) + getNumberHashCode(this.l30_1) | 0;
|
|
1187
|
+
result = imul(result, 31) + hashCode(this.m30_1) | 0;
|
|
1161
1188
|
return result;
|
|
1162
1189
|
};
|
|
1163
1190
|
protoOf(LCHab).equals = function (other) {
|
|
@@ -1166,27 +1193,27 @@
|
|
|
1166
1193
|
if (!(other instanceof LCHab))
|
|
1167
1194
|
return false;
|
|
1168
1195
|
var tmp0_other_with_cast = other instanceof LCHab ? other : THROW_CCE();
|
|
1169
|
-
if (!equals(this.
|
|
1196
|
+
if (!equals(this.i30_1, tmp0_other_with_cast.i30_1))
|
|
1170
1197
|
return false;
|
|
1171
|
-
if (!equals(this.
|
|
1198
|
+
if (!equals(this.j30_1, tmp0_other_with_cast.j30_1))
|
|
1172
1199
|
return false;
|
|
1173
|
-
if (!equals(this.
|
|
1200
|
+
if (!equals(this.k30_1, tmp0_other_with_cast.k30_1))
|
|
1174
1201
|
return false;
|
|
1175
|
-
if (!equals(this.
|
|
1202
|
+
if (!equals(this.l30_1, tmp0_other_with_cast.l30_1))
|
|
1176
1203
|
return false;
|
|
1177
|
-
if (!equals(this.
|
|
1204
|
+
if (!equals(this.m30_1, tmp0_other_with_cast.m30_1))
|
|
1178
1205
|
return false;
|
|
1179
1206
|
return true;
|
|
1180
1207
|
};
|
|
1181
1208
|
function LCHabColorSpace() {
|
|
1182
1209
|
}
|
|
1183
1210
|
function LCHabColorSpace_0(whitePoint) {
|
|
1184
|
-
return whitePoint.equals(Illuminant_getInstance().
|
|
1211
|
+
return whitePoint.equals(Illuminant_getInstance().k2z_1) ? LCHabColorSpaces_getInstance().n2z_1 : whitePoint.equals(Illuminant_getInstance().i2z_1) ? LCHabColorSpaces_getInstance().o2z_1 : new LCHabColorSpaceImpl(whitePoint);
|
|
1185
1212
|
}
|
|
1186
1213
|
function LCHabColorSpaces() {
|
|
1187
1214
|
LCHabColorSpaces_instance = this;
|
|
1188
|
-
this.
|
|
1189
|
-
this.
|
|
1215
|
+
this.n2z_1 = new LCHabColorSpaceImpl(Illuminant_getInstance().k2z_1);
|
|
1216
|
+
this.o2z_1 = new LCHabColorSpaceImpl(Illuminant_getInstance().i2z_1);
|
|
1190
1217
|
}
|
|
1191
1218
|
var LCHabColorSpaces_instance;
|
|
1192
1219
|
function LCHabColorSpaces_getInstance() {
|
|
@@ -1195,41 +1222,41 @@
|
|
|
1195
1222
|
return LCHabColorSpaces_instance;
|
|
1196
1223
|
}
|
|
1197
1224
|
function LCHabColorSpaceImpl(whitePoint) {
|
|
1198
|
-
this.
|
|
1199
|
-
this.
|
|
1225
|
+
this.g32_1 = whitePoint;
|
|
1226
|
+
this.h32_1 = componentInfoList([new ColorComponentInfo('L', false, 0.0, 100.0), new ColorComponentInfo('C', false, 0.0, 150.0), new ColorComponentInfo('H', true, 0.0, 360.0)]);
|
|
1200
1227
|
}
|
|
1201
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1202
|
-
return this.
|
|
1228
|
+
protoOf(LCHabColorSpaceImpl).b2z = function () {
|
|
1229
|
+
return this.g32_1;
|
|
1203
1230
|
};
|
|
1204
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1231
|
+
protoOf(LCHabColorSpaceImpl).a2 = function () {
|
|
1205
1232
|
return 'LCHab';
|
|
1206
1233
|
};
|
|
1207
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1234
|
+
protoOf(LCHabColorSpaceImpl).w2y = function (color) {
|
|
1208
1235
|
// Inline function 'com.github.ajalt.colormath.internal.adaptToThis' call
|
|
1209
1236
|
var tmp;
|
|
1210
|
-
var tmp_0 = color.
|
|
1237
|
+
var tmp_0 = color.b2y();
|
|
1211
1238
|
var tmp0_safe_receiver = isInterface(tmp_0, WhitePointColorSpace) ? tmp_0 : null;
|
|
1212
|
-
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.
|
|
1213
|
-
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().
|
|
1214
|
-
tmp = color.
|
|
1239
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.b2z();
|
|
1240
|
+
if ((tmp1_elvis_lhs == null ? Illuminant_getInstance().k2z_1 : tmp1_elvis_lhs).equals(this.b2z())) {
|
|
1241
|
+
tmp = color.q2y();
|
|
1215
1242
|
} else {
|
|
1216
|
-
tmp = color.
|
|
1243
|
+
tmp = color.j2y().e2z(XYZColorSpace_0(this.b2z())).q2y();
|
|
1217
1244
|
}
|
|
1218
1245
|
return tmp;
|
|
1219
1246
|
};
|
|
1220
1247
|
protoOf(LCHabColorSpaceImpl).toString = function () {
|
|
1221
|
-
return 'LCHabColorSpace(' + this.
|
|
1248
|
+
return 'LCHabColorSpace(' + this.g32_1.toString() + ')';
|
|
1222
1249
|
};
|
|
1223
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1250
|
+
protoOf(LCHabColorSpaceImpl).b31 = function (l, c, h, alpha) {
|
|
1224
1251
|
return new LCHab(l, c, h, alpha, this);
|
|
1225
1252
|
};
|
|
1226
1253
|
protoOf(LCHabColorSpaceImpl).hashCode = function () {
|
|
1227
|
-
return this.
|
|
1254
|
+
return this.g32_1.hashCode();
|
|
1228
1255
|
};
|
|
1229
1256
|
protoOf(LCHabColorSpaceImpl).equals = function (other) {
|
|
1230
1257
|
var tmp;
|
|
1231
1258
|
if (!(other == null) ? isInterface(other, LCHabColorSpace) : false) {
|
|
1232
|
-
tmp = this.
|
|
1259
|
+
tmp = this.g32_1.equals(other.b2z());
|
|
1233
1260
|
} else {
|
|
1234
1261
|
tmp = false;
|
|
1235
1262
|
}
|
|
@@ -1240,19 +1267,19 @@
|
|
|
1240
1267
|
function Oklch() {
|
|
1241
1268
|
}
|
|
1242
1269
|
function GammaTransferFunctions(gamma) {
|
|
1243
|
-
this.
|
|
1270
|
+
this.i32_1 = gamma;
|
|
1244
1271
|
}
|
|
1245
|
-
protoOf(GammaTransferFunctions).
|
|
1246
|
-
return spow(x, this.
|
|
1272
|
+
protoOf(GammaTransferFunctions).t31 = function (x) {
|
|
1273
|
+
return spow(x, this.i32_1);
|
|
1247
1274
|
};
|
|
1248
|
-
protoOf(GammaTransferFunctions).
|
|
1249
|
-
return spow(x, 1.0 / this.
|
|
1275
|
+
protoOf(GammaTransferFunctions).u31 = function (x) {
|
|
1276
|
+
return spow(x, 1.0 / this.i32_1);
|
|
1250
1277
|
};
|
|
1251
1278
|
protoOf(GammaTransferFunctions).toString = function () {
|
|
1252
|
-
return 'GammaTransferFunctions(gamma=' + this.
|
|
1279
|
+
return 'GammaTransferFunctions(gamma=' + this.i32_1 + ')';
|
|
1253
1280
|
};
|
|
1254
1281
|
protoOf(GammaTransferFunctions).hashCode = function () {
|
|
1255
|
-
return getNumberHashCode(this.
|
|
1282
|
+
return getNumberHashCode(this.i32_1);
|
|
1256
1283
|
};
|
|
1257
1284
|
protoOf(GammaTransferFunctions).equals = function (other) {
|
|
1258
1285
|
if (this === other)
|
|
@@ -1260,16 +1287,16 @@
|
|
|
1260
1287
|
if (!(other instanceof GammaTransferFunctions))
|
|
1261
1288
|
return false;
|
|
1262
1289
|
var tmp0_other_with_cast = other instanceof GammaTransferFunctions ? other : THROW_CCE();
|
|
1263
|
-
if (!equals(this.
|
|
1290
|
+
if (!equals(this.i32_1, tmp0_other_with_cast.i32_1))
|
|
1264
1291
|
return false;
|
|
1265
1292
|
return true;
|
|
1266
1293
|
};
|
|
1267
1294
|
function LinearTransferFunctions() {
|
|
1268
1295
|
}
|
|
1269
|
-
protoOf(LinearTransferFunctions).
|
|
1296
|
+
protoOf(LinearTransferFunctions).t31 = function (x) {
|
|
1270
1297
|
return x;
|
|
1271
1298
|
};
|
|
1272
|
-
protoOf(LinearTransferFunctions).
|
|
1299
|
+
protoOf(LinearTransferFunctions).u31 = function (x) {
|
|
1273
1300
|
return x;
|
|
1274
1301
|
};
|
|
1275
1302
|
var LinearTransferFunctions_instance;
|
|
@@ -1280,37 +1307,37 @@
|
|
|
1280
1307
|
}
|
|
1281
1308
|
function Companion_2() {
|
|
1282
1309
|
Companion_instance_2 = this;
|
|
1283
|
-
this.
|
|
1310
|
+
this.a31_1 = RGBColorSpaces_getInstance().r2z_1;
|
|
1284
1311
|
}
|
|
1285
1312
|
protoOf(Companion_2).equals = function (other) {
|
|
1286
|
-
return equals(RGBColorSpaces_getInstance().
|
|
1313
|
+
return equals(RGBColorSpaces_getInstance().r2z_1, other);
|
|
1287
1314
|
};
|
|
1288
1315
|
protoOf(Companion_2).hashCode = function () {
|
|
1289
|
-
return hashCode(RGBColorSpaces_getInstance().
|
|
1316
|
+
return hashCode(RGBColorSpaces_getInstance().r2z_1);
|
|
1290
1317
|
};
|
|
1291
|
-
protoOf(Companion_2).
|
|
1292
|
-
return this.
|
|
1318
|
+
protoOf(Companion_2).b31 = function (r, g, b, alpha) {
|
|
1319
|
+
return this.a31_1.b31(r, g, b, alpha);
|
|
1293
1320
|
};
|
|
1294
|
-
protoOf(Companion_2).
|
|
1295
|
-
return this.
|
|
1321
|
+
protoOf(Companion_2).w31 = function (r, g, b, alpha) {
|
|
1322
|
+
return this.a31_1.w31(r, g, b, alpha);
|
|
1296
1323
|
};
|
|
1297
|
-
protoOf(Companion_2).
|
|
1298
|
-
return this.
|
|
1324
|
+
protoOf(Companion_2).k31 = function () {
|
|
1325
|
+
return this.a31_1.k31();
|
|
1299
1326
|
};
|
|
1300
|
-
protoOf(Companion_2).
|
|
1301
|
-
return this.
|
|
1327
|
+
protoOf(Companion_2).j32 = function () {
|
|
1328
|
+
return this.a31_1.j32();
|
|
1302
1329
|
};
|
|
1303
|
-
protoOf(Companion_2).
|
|
1304
|
-
return this.
|
|
1330
|
+
protoOf(Companion_2).k32 = function () {
|
|
1331
|
+
return this.a31_1.k32();
|
|
1305
1332
|
};
|
|
1306
|
-
protoOf(Companion_2).
|
|
1307
|
-
return this.
|
|
1333
|
+
protoOf(Companion_2).b2z = function () {
|
|
1334
|
+
return this.a31_1.b2z();
|
|
1308
1335
|
};
|
|
1309
|
-
protoOf(Companion_2).
|
|
1310
|
-
return this.
|
|
1336
|
+
protoOf(Companion_2).a2 = function () {
|
|
1337
|
+
return this.a31_1.a2();
|
|
1311
1338
|
};
|
|
1312
|
-
protoOf(Companion_2).
|
|
1313
|
-
return this.
|
|
1339
|
+
protoOf(Companion_2).w2y = function (color) {
|
|
1340
|
+
return this.a31_1.w2y(color);
|
|
1314
1341
|
};
|
|
1315
1342
|
var Companion_instance_2;
|
|
1316
1343
|
function Companion_getInstance_2() {
|
|
@@ -1320,36 +1347,36 @@
|
|
|
1320
1347
|
}
|
|
1321
1348
|
function RGB(r, g, b, alpha, space) {
|
|
1322
1349
|
Companion_getInstance_2();
|
|
1323
|
-
this.
|
|
1324
|
-
this.
|
|
1325
|
-
this.
|
|
1326
|
-
this.
|
|
1327
|
-
this.
|
|
1350
|
+
this.e2y_1 = r;
|
|
1351
|
+
this.f2y_1 = g;
|
|
1352
|
+
this.g2y_1 = b;
|
|
1353
|
+
this.h2y_1 = alpha;
|
|
1354
|
+
this.i2y_1 = space;
|
|
1328
1355
|
}
|
|
1329
|
-
protoOf(RGB).
|
|
1330
|
-
return this.
|
|
1356
|
+
protoOf(RGB).a2y = function () {
|
|
1357
|
+
return this.h2y_1;
|
|
1331
1358
|
};
|
|
1332
|
-
protoOf(RGB).
|
|
1333
|
-
return this.
|
|
1359
|
+
protoOf(RGB).b2y = function () {
|
|
1360
|
+
return this.i2y_1;
|
|
1334
1361
|
};
|
|
1335
|
-
protoOf(RGB).
|
|
1362
|
+
protoOf(RGB).d30 = function () {
|
|
1336
1363
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
1337
|
-
var $this$toSRGB = this.
|
|
1338
|
-
return _RGBInt___init__impl__lqova7_1($this$toSRGB.
|
|
1364
|
+
var $this$toSRGB = this.l32(SRGB_getInstance());
|
|
1365
|
+
return _RGBInt___init__impl__lqova7_1($this$toSRGB.e2y_1, $this$toSRGB.f2y_1, $this$toSRGB.g2y_1, nanToOne($this$toSRGB.h2y_1));
|
|
1339
1366
|
};
|
|
1340
|
-
protoOf(RGB).
|
|
1341
|
-
var f = SRGB_getInstance().
|
|
1342
|
-
return equals(this.
|
|
1367
|
+
protoOf(RGB).l32 = function (space) {
|
|
1368
|
+
var f = SRGB_getInstance().k31();
|
|
1369
|
+
return equals(this.i2y_1, space) ? this : equals(this.i2y_1, SRGB_getInstance()) && equals(space, RGBColorSpaces_getInstance().s2z_1) ? space.b31(f.t31(this.e2y_1), f.t31(this.f2y_1), f.t31(this.g2y_1), this.h2y_1) : equals(this.i2y_1, RGBColorSpaces_getInstance().s2z_1) && equals(space, SRGB_getInstance()) ? space.b31(f.u31(this.e2y_1), f.u31(this.f2y_1), f.u31(this.g2y_1), this.h2y_1) : this.j2y().n32(space);
|
|
1343
1370
|
};
|
|
1344
|
-
protoOf(RGB).
|
|
1371
|
+
protoOf(RGB).d2y = function () {
|
|
1345
1372
|
var tmp$ret$3;
|
|
1346
1373
|
$l$block: {
|
|
1347
1374
|
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
1348
1375
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
1349
|
-
var $this$toSRGB = this.
|
|
1350
|
-
var r = $this$toSRGB.
|
|
1351
|
-
var g = $this$toSRGB.
|
|
1352
|
-
var b = $this$toSRGB.
|
|
1376
|
+
var $this$toSRGB = this.l32(SRGB_getInstance());
|
|
1377
|
+
var r = $this$toSRGB.e2y_1;
|
|
1378
|
+
var g = $this$toSRGB.f2y_1;
|
|
1379
|
+
var b = $this$toSRGB.g2y_1;
|
|
1353
1380
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
1354
1381
|
var min = Math.min(r, g, b);
|
|
1355
1382
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
@@ -1359,39 +1386,39 @@
|
|
|
1359
1386
|
var h_0 = normalizeDeg(h);
|
|
1360
1387
|
var l = (min + max) / 2.0;
|
|
1361
1388
|
var s = max === min ? 0.0 : l <= 0.5 ? chroma / (max + min) : chroma / (2 - max - min);
|
|
1362
|
-
tmp$ret$3 = new HSL(h_0, s, l, this.
|
|
1389
|
+
tmp$ret$3 = new HSL(h_0, s, l, this.h2y_1);
|
|
1363
1390
|
break $l$block;
|
|
1364
1391
|
}
|
|
1365
1392
|
return tmp$ret$3;
|
|
1366
1393
|
};
|
|
1367
|
-
protoOf(RGB).
|
|
1368
|
-
var f = this.
|
|
1369
|
-
var tmp0 = _Matrix___init__impl__q3kp4w(this.
|
|
1370
|
-
var
|
|
1371
|
-
var
|
|
1394
|
+
protoOf(RGB).j2y = function () {
|
|
1395
|
+
var f = this.i2y_1.k31();
|
|
1396
|
+
var tmp0 = _Matrix___init__impl__q3kp4w(this.i2y_1.j32());
|
|
1397
|
+
var tmp2 = f.t31(this.e2y_1);
|
|
1398
|
+
var tmp4 = f.t31(this.f2y_1);
|
|
1372
1399
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1373
|
-
var v2 = f.
|
|
1374
|
-
var
|
|
1375
|
-
var
|
|
1376
|
-
var z = Matrix__get_impl_xogbpk(tmp0, 0, 2) *
|
|
1377
|
-
return XYZColorSpace_0(this.
|
|
1400
|
+
var v2 = f.t31(this.g2y_1);
|
|
1401
|
+
var tmp0_0 = Matrix__get_impl_xogbpk(tmp0, 0, 0) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 1, 0) * tmp4 + Matrix__get_impl_xogbpk(tmp0, 2, 0) * v2;
|
|
1402
|
+
var tmp2_0 = Matrix__get_impl_xogbpk(tmp0, 0, 1) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 1, 1) * tmp4 + Matrix__get_impl_xogbpk(tmp0, 2, 1) * v2;
|
|
1403
|
+
var z = Matrix__get_impl_xogbpk(tmp0, 0, 2) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 1, 2) * tmp4 + Matrix__get_impl_xogbpk(tmp0, 2, 2) * v2;
|
|
1404
|
+
return XYZColorSpace_0(this.i2y_1.b2z()).b31(tmp0_0, tmp2_0, z, this.h2y_1);
|
|
1378
1405
|
};
|
|
1379
|
-
protoOf(RGB).
|
|
1380
|
-
return this.
|
|
1406
|
+
protoOf(RGB).c2y = function () {
|
|
1407
|
+
return this.l32(RGBColorSpaces_getInstance().r2z_1);
|
|
1381
1408
|
};
|
|
1382
|
-
protoOf(RGB).
|
|
1409
|
+
protoOf(RGB).h5 = function () {
|
|
1383
1410
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1384
|
-
return new Float32Array([this.
|
|
1411
|
+
return new Float32Array([this.e2y_1, this.f2y_1, this.g2y_1, this.h2y_1]);
|
|
1385
1412
|
};
|
|
1386
1413
|
protoOf(RGB).toString = function () {
|
|
1387
|
-
return 'RGB(r=' + this.
|
|
1414
|
+
return 'RGB(r=' + this.e2y_1 + ', g=' + this.f2y_1 + ', b=' + this.g2y_1 + ', alpha=' + this.h2y_1 + ', space=' + toString(this.i2y_1) + ')';
|
|
1388
1415
|
};
|
|
1389
1416
|
protoOf(RGB).hashCode = function () {
|
|
1390
|
-
var result = getNumberHashCode(this.
|
|
1391
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1392
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1393
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1394
|
-
result = imul(result, 31) + hashCode(this.
|
|
1417
|
+
var result = getNumberHashCode(this.e2y_1);
|
|
1418
|
+
result = imul(result, 31) + getNumberHashCode(this.f2y_1) | 0;
|
|
1419
|
+
result = imul(result, 31) + getNumberHashCode(this.g2y_1) | 0;
|
|
1420
|
+
result = imul(result, 31) + getNumberHashCode(this.h2y_1) | 0;
|
|
1421
|
+
result = imul(result, 31) + hashCode(this.i2y_1) | 0;
|
|
1395
1422
|
return result;
|
|
1396
1423
|
};
|
|
1397
1424
|
protoOf(RGB).equals = function (other) {
|
|
@@ -1400,15 +1427,15 @@
|
|
|
1400
1427
|
if (!(other instanceof RGB))
|
|
1401
1428
|
return false;
|
|
1402
1429
|
var tmp0_other_with_cast = other instanceof RGB ? other : THROW_CCE();
|
|
1403
|
-
if (!equals(this.
|
|
1430
|
+
if (!equals(this.e2y_1, tmp0_other_with_cast.e2y_1))
|
|
1404
1431
|
return false;
|
|
1405
|
-
if (!equals(this.
|
|
1432
|
+
if (!equals(this.f2y_1, tmp0_other_with_cast.f2y_1))
|
|
1406
1433
|
return false;
|
|
1407
|
-
if (!equals(this.
|
|
1434
|
+
if (!equals(this.g2y_1, tmp0_other_with_cast.g2y_1))
|
|
1408
1435
|
return false;
|
|
1409
|
-
if (!equals(this.
|
|
1436
|
+
if (!equals(this.h2y_1, tmp0_other_with_cast.h2y_1))
|
|
1410
1437
|
return false;
|
|
1411
|
-
if (!equals(this.
|
|
1438
|
+
if (!equals(this.i2y_1, tmp0_other_with_cast.i2y_1))
|
|
1412
1439
|
return false;
|
|
1413
1440
|
return true;
|
|
1414
1441
|
};
|
|
@@ -1463,17 +1490,17 @@
|
|
|
1463
1490
|
}
|
|
1464
1491
|
var ACES_AP1_B;
|
|
1465
1492
|
function RGBColorSpaces$SRGB$lambda($this$RGBColorSpaceImpl, it) {
|
|
1466
|
-
return it.
|
|
1493
|
+
return it.c2y();
|
|
1467
1494
|
}
|
|
1468
1495
|
function RGBColorSpaces$BT2020$lambda($this$RGBColorSpaceImpl, color) {
|
|
1469
1496
|
var tmp;
|
|
1470
1497
|
if (color instanceof RGB) {
|
|
1471
|
-
tmp = color.
|
|
1498
|
+
tmp = color.l32($this$RGBColorSpaceImpl);
|
|
1472
1499
|
} else {
|
|
1473
1500
|
if (color instanceof ICtCp) {
|
|
1474
|
-
tmp = color.
|
|
1501
|
+
tmp = color.j31();
|
|
1475
1502
|
} else {
|
|
1476
|
-
tmp = color.
|
|
1503
|
+
tmp = color.j2y().n32($this$RGBColorSpaceImpl);
|
|
1477
1504
|
}
|
|
1478
1505
|
}
|
|
1479
1506
|
return tmp;
|
|
@@ -1481,29 +1508,29 @@
|
|
|
1481
1508
|
function RGBColorSpaces() {
|
|
1482
1509
|
RGBColorSpaces_instance = this;
|
|
1483
1510
|
var tmp = this;
|
|
1484
|
-
var tmp_0 = Illuminant_getInstance().
|
|
1511
|
+
var tmp_0 = Illuminant_getInstance().k2z_1;
|
|
1485
1512
|
var tmp_1 = SRGBTransferFunctions_instance;
|
|
1486
1513
|
var tmp_2 = get_SRGB_R();
|
|
1487
1514
|
var tmp_3 = get_SRGB_G();
|
|
1488
1515
|
var tmp_4 = get_SRGB_B();
|
|
1489
|
-
tmp.
|
|
1490
|
-
this.
|
|
1491
|
-
this.
|
|
1492
|
-
this.
|
|
1493
|
-
this.
|
|
1494
|
-
this.
|
|
1495
|
-
this.
|
|
1516
|
+
tmp.r2z_1 = new RGBColorSpaceImpl('sRGB', tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, RGBColorSpaces$SRGB$lambda);
|
|
1517
|
+
this.s2z_1 = RGBColorSpace_0('Linear sRGB', Illuminant_getInstance().k2z_1, LinearTransferFunctions_instance, get_SRGB_R(), get_SRGB_G(), get_SRGB_B());
|
|
1518
|
+
this.t2z_1 = RGBColorSpace_0('ACES2065-1', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP0_R(), get_ACES_AP0_G(), get_ACES_AP0_B());
|
|
1519
|
+
this.u2z_1 = RGBColorSpace_0('ACEScc', get_ACES_WHITE_POINT(), ACESccTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1520
|
+
this.v2z_1 = RGBColorSpace_0('ACEScct', get_ACES_WHITE_POINT(), ACEScctTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1521
|
+
this.w2z_1 = RGBColorSpace_0('ACEScg', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1522
|
+
this.x2z_1 = RGBColorSpace_0('Adobe RGB', Illuminant_getInstance().k2z_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));
|
|
1496
1523
|
var tmp_5 = this;
|
|
1497
|
-
var tmp_6 = Illuminant_getInstance().
|
|
1524
|
+
var tmp_6 = Illuminant_getInstance().k2z_1;
|
|
1498
1525
|
var tmp_7 = BT2020TransferFunctions_getInstance();
|
|
1499
1526
|
var tmp_8 = xyY_init_$Create$(0.708, 0.292);
|
|
1500
1527
|
var tmp_9 = xyY_init_$Create$(0.17, 0.797);
|
|
1501
1528
|
var tmp_10 = xyY_init_$Create$(0.131, 0.046);
|
|
1502
|
-
tmp_5.
|
|
1503
|
-
this.
|
|
1504
|
-
this.
|
|
1505
|
-
this.
|
|
1506
|
-
this.
|
|
1529
|
+
tmp_5.y2z_1 = new RGBColorSpaceImpl('BT.2020', tmp_6, tmp_7, tmp_8, tmp_9, tmp_10, RGBColorSpaces$BT2020$lambda);
|
|
1530
|
+
this.z2z_1 = RGBColorSpace_0('BT.709', Illuminant_getInstance().k2z_1, BT709TransferFunctions_getInstance(), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.3, 0.6), xyY_init_$Create$(0.15, 0.06));
|
|
1531
|
+
this.a30_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));
|
|
1532
|
+
this.b30_1 = RGBColorSpace_0('Display P3', Illuminant_getInstance().k2z_1, SRGBTransferFunctions_instance, xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
|
|
1533
|
+
this.c30_1 = RGBColorSpace_0('ROMM RGB', Illuminant_getInstance().i2z_1, ROMMTransferFunctions_instance, xyY_init_$Create$(0.7347, 0.2653), xyY_init_$Create$(0.1596, 0.8404), xyY_init_$Create$(0.0366, 1.0E-4));
|
|
1507
1534
|
}
|
|
1508
1535
|
var RGBColorSpaces_instance;
|
|
1509
1536
|
function RGBColorSpaces_getInstance() {
|
|
@@ -1513,40 +1540,40 @@
|
|
|
1513
1540
|
}
|
|
1514
1541
|
function SRGB() {
|
|
1515
1542
|
SRGB_instance = this;
|
|
1516
|
-
this.
|
|
1543
|
+
this.c31_1 = RGBColorSpaces_getInstance().r2z_1;
|
|
1517
1544
|
}
|
|
1518
1545
|
protoOf(SRGB).equals = function (other) {
|
|
1519
|
-
return equals(RGBColorSpaces_getInstance().
|
|
1546
|
+
return equals(RGBColorSpaces_getInstance().r2z_1, other);
|
|
1520
1547
|
};
|
|
1521
1548
|
protoOf(SRGB).hashCode = function () {
|
|
1522
|
-
return hashCode(RGBColorSpaces_getInstance().
|
|
1549
|
+
return hashCode(RGBColorSpaces_getInstance().r2z_1);
|
|
1523
1550
|
};
|
|
1524
1551
|
protoOf(SRGB).toString = function () {
|
|
1525
1552
|
return 'sRGB';
|
|
1526
1553
|
};
|
|
1527
|
-
protoOf(SRGB).
|
|
1528
|
-
return this.
|
|
1554
|
+
protoOf(SRGB).b31 = function (r, g, b, alpha) {
|
|
1555
|
+
return this.c31_1.b31(r, g, b, alpha);
|
|
1529
1556
|
};
|
|
1530
|
-
protoOf(SRGB).
|
|
1531
|
-
return this.
|
|
1557
|
+
protoOf(SRGB).w31 = function (r, g, b, alpha) {
|
|
1558
|
+
return this.c31_1.w31(r, g, b, alpha);
|
|
1532
1559
|
};
|
|
1533
|
-
protoOf(SRGB).
|
|
1534
|
-
return this.
|
|
1560
|
+
protoOf(SRGB).k31 = function () {
|
|
1561
|
+
return this.c31_1.k31();
|
|
1535
1562
|
};
|
|
1536
|
-
protoOf(SRGB).
|
|
1537
|
-
return this.
|
|
1563
|
+
protoOf(SRGB).j32 = function () {
|
|
1564
|
+
return this.c31_1.j32();
|
|
1538
1565
|
};
|
|
1539
|
-
protoOf(SRGB).
|
|
1540
|
-
return this.
|
|
1566
|
+
protoOf(SRGB).k32 = function () {
|
|
1567
|
+
return this.c31_1.k32();
|
|
1541
1568
|
};
|
|
1542
|
-
protoOf(SRGB).
|
|
1543
|
-
return this.
|
|
1569
|
+
protoOf(SRGB).b2z = function () {
|
|
1570
|
+
return this.c31_1.b2z();
|
|
1544
1571
|
};
|
|
1545
|
-
protoOf(SRGB).
|
|
1546
|
-
return this.
|
|
1572
|
+
protoOf(SRGB).a2 = function () {
|
|
1573
|
+
return this.c31_1.a2();
|
|
1547
1574
|
};
|
|
1548
|
-
protoOf(SRGB).
|
|
1549
|
-
return this.
|
|
1575
|
+
protoOf(SRGB).w2y = function (color) {
|
|
1576
|
+
return this.c31_1.w2y(color);
|
|
1550
1577
|
};
|
|
1551
1578
|
var SRGB_instance;
|
|
1552
1579
|
function SRGB_getInstance() {
|
|
@@ -1555,39 +1582,39 @@
|
|
|
1555
1582
|
return SRGB_instance;
|
|
1556
1583
|
}
|
|
1557
1584
|
function RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b, convertImpl) {
|
|
1558
|
-
this.
|
|
1559
|
-
this.
|
|
1560
|
-
this.
|
|
1561
|
-
this.
|
|
1562
|
-
this.
|
|
1563
|
-
this.
|
|
1564
|
-
this.
|
|
1565
|
-
this.
|
|
1566
|
-
this.
|
|
1567
|
-
this.
|
|
1568
|
-
}
|
|
1569
|
-
protoOf(RGBColorSpaceImpl).
|
|
1570
|
-
return this.
|
|
1571
|
-
};
|
|
1572
|
-
protoOf(RGBColorSpaceImpl).
|
|
1573
|
-
return this.
|
|
1574
|
-
};
|
|
1575
|
-
protoOf(RGBColorSpaceImpl).
|
|
1576
|
-
return this.
|
|
1577
|
-
};
|
|
1578
|
-
protoOf(RGBColorSpaceImpl).
|
|
1579
|
-
return this.
|
|
1580
|
-
};
|
|
1581
|
-
protoOf(RGBColorSpaceImpl).
|
|
1582
|
-
return this.
|
|
1585
|
+
this.o32_1 = name;
|
|
1586
|
+
this.p32_1 = whitePoint;
|
|
1587
|
+
this.q32_1 = transferFunctions;
|
|
1588
|
+
this.r32_1 = r;
|
|
1589
|
+
this.s32_1 = g;
|
|
1590
|
+
this.t32_1 = b;
|
|
1591
|
+
this.u32_1 = convertImpl;
|
|
1592
|
+
this.v32_1 = zeroOneComponentInfo('RGB');
|
|
1593
|
+
this.w32_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.p32_1, this.r32_1, this.s32_1, this.t32_1));
|
|
1594
|
+
this.x32_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.w32_1)));
|
|
1595
|
+
}
|
|
1596
|
+
protoOf(RGBColorSpaceImpl).a2 = function () {
|
|
1597
|
+
return this.o32_1;
|
|
1598
|
+
};
|
|
1599
|
+
protoOf(RGBColorSpaceImpl).b2z = function () {
|
|
1600
|
+
return this.p32_1;
|
|
1601
|
+
};
|
|
1602
|
+
protoOf(RGBColorSpaceImpl).k31 = function () {
|
|
1603
|
+
return this.q32_1;
|
|
1604
|
+
};
|
|
1605
|
+
protoOf(RGBColorSpaceImpl).w2y = function (color) {
|
|
1606
|
+
return this.u32_1(this, color);
|
|
1607
|
+
};
|
|
1608
|
+
protoOf(RGBColorSpaceImpl).j32 = function () {
|
|
1609
|
+
return this.w32_1;
|
|
1583
1610
|
};
|
|
1584
|
-
protoOf(RGBColorSpaceImpl).
|
|
1585
|
-
return this.
|
|
1611
|
+
protoOf(RGBColorSpaceImpl).k32 = function () {
|
|
1612
|
+
return this.x32_1;
|
|
1586
1613
|
};
|
|
1587
1614
|
protoOf(RGBColorSpaceImpl).toString = function () {
|
|
1588
|
-
return this.
|
|
1615
|
+
return this.o32_1;
|
|
1589
1616
|
};
|
|
1590
|
-
protoOf(RGBColorSpaceImpl).
|
|
1617
|
+
protoOf(RGBColorSpaceImpl).b31 = function (r, g, b, alpha) {
|
|
1591
1618
|
return new RGB(r, g, b, alpha, this);
|
|
1592
1619
|
};
|
|
1593
1620
|
protoOf(RGBColorSpaceImpl).equals = function (other) {
|
|
@@ -1595,42 +1622,42 @@
|
|
|
1595
1622
|
return true;
|
|
1596
1623
|
if (!(!(other == null) ? isInterface(other, RGBColorSpace) : false))
|
|
1597
1624
|
return false;
|
|
1598
|
-
if (!(this.
|
|
1625
|
+
if (!(this.o32_1 === other.a2()))
|
|
1599
1626
|
return false;
|
|
1600
|
-
if (!this.
|
|
1627
|
+
if (!this.p32_1.equals(other.b2z()))
|
|
1601
1628
|
return false;
|
|
1602
|
-
if (!equals(this.
|
|
1629
|
+
if (!equals(this.q32_1, other.k31()))
|
|
1603
1630
|
return false;
|
|
1604
1631
|
if (other instanceof RGBColorSpaceImpl) {
|
|
1605
|
-
if (!this.
|
|
1632
|
+
if (!this.r32_1.equals(other.r32_1))
|
|
1606
1633
|
return false;
|
|
1607
|
-
if (!this.
|
|
1634
|
+
if (!this.s32_1.equals(other.s32_1))
|
|
1608
1635
|
return false;
|
|
1609
|
-
if (!this.
|
|
1636
|
+
if (!this.t32_1.equals(other.t32_1))
|
|
1610
1637
|
return false;
|
|
1611
1638
|
} else {
|
|
1612
|
-
if (!contentEquals(this.
|
|
1639
|
+
if (!contentEquals(this.w32_1, other.j32()))
|
|
1613
1640
|
return false;
|
|
1614
|
-
if (!contentEquals(this.
|
|
1641
|
+
if (!contentEquals(this.x32_1, other.k32()))
|
|
1615
1642
|
return false;
|
|
1616
1643
|
}
|
|
1617
1644
|
return true;
|
|
1618
1645
|
};
|
|
1619
1646
|
protoOf(RGBColorSpaceImpl).hashCode = function () {
|
|
1620
|
-
var result = getStringHashCode(this.
|
|
1621
|
-
result = imul(31, result) + this.
|
|
1622
|
-
result = imul(31, result) + hashCode(this.
|
|
1623
|
-
result = imul(31, result) + this.
|
|
1624
|
-
result = imul(31, result) + this.
|
|
1625
|
-
result = imul(31, result) + this.
|
|
1647
|
+
var result = getStringHashCode(this.o32_1);
|
|
1648
|
+
result = imul(31, result) + this.p32_1.hashCode() | 0;
|
|
1649
|
+
result = imul(31, result) + hashCode(this.q32_1) | 0;
|
|
1650
|
+
result = imul(31, result) + this.r32_1.hashCode() | 0;
|
|
1651
|
+
result = imul(31, result) + this.s32_1.hashCode() | 0;
|
|
1652
|
+
result = imul(31, result) + this.t32_1.hashCode() | 0;
|
|
1626
1653
|
return result;
|
|
1627
1654
|
};
|
|
1628
1655
|
function SRGBTransferFunctions() {
|
|
1629
1656
|
}
|
|
1630
|
-
protoOf(SRGBTransferFunctions).
|
|
1657
|
+
protoOf(SRGBTransferFunctions).u31 = function (x) {
|
|
1631
1658
|
return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x, 1 / 2.4) - 0.055;
|
|
1632
1659
|
};
|
|
1633
|
-
protoOf(SRGBTransferFunctions).
|
|
1660
|
+
protoOf(SRGBTransferFunctions).t31 = function (x) {
|
|
1634
1661
|
return x <= 0.04045 ? x / 12.92 : spow_0((x + 0.055) / 1.055, 2.4);
|
|
1635
1662
|
};
|
|
1636
1663
|
var SRGBTransferFunctions_instance;
|
|
@@ -1643,18 +1670,18 @@
|
|
|
1643
1670
|
}
|
|
1644
1671
|
function ACESccTransferFunctions() {
|
|
1645
1672
|
ACESccTransferFunctions_instance = this;
|
|
1646
|
-
this.
|
|
1647
|
-
this.
|
|
1648
|
-
this.
|
|
1673
|
+
this.y32_1 = 3.0517578125E-5;
|
|
1674
|
+
this.z32_1 = 1.52587890625E-5;
|
|
1675
|
+
this.a33_1 = -0.3013698630136986;
|
|
1649
1676
|
var tmp = this;
|
|
1650
1677
|
// Inline function 'kotlin.math.log2' call
|
|
1651
|
-
tmp.
|
|
1678
|
+
tmp.b33_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
1652
1679
|
}
|
|
1653
|
-
protoOf(ACESccTransferFunctions).
|
|
1680
|
+
protoOf(ACESccTransferFunctions).t31 = function (x) {
|
|
1654
1681
|
var tmp;
|
|
1655
1682
|
if (x <= -0.3013698630136986) {
|
|
1656
1683
|
tmp = (spow_0(2.0, x * 17.52 - 9.72) - 1.52587890625E-5) * 2.0;
|
|
1657
|
-
} else if (x < this.
|
|
1684
|
+
} else if (x < this.b33_1) {
|
|
1658
1685
|
// Inline function 'kotlin.math.pow' call
|
|
1659
1686
|
var x_0 = x * 17.52 - 9.72;
|
|
1660
1687
|
tmp = Math.pow(2.0, x_0);
|
|
@@ -1663,7 +1690,7 @@
|
|
|
1663
1690
|
}
|
|
1664
1691
|
return tmp;
|
|
1665
1692
|
};
|
|
1666
|
-
protoOf(ACESccTransferFunctions).
|
|
1693
|
+
protoOf(ACESccTransferFunctions).u31 = function (x) {
|
|
1667
1694
|
var tmp;
|
|
1668
1695
|
if (x < 3.0517578125E-5) {
|
|
1669
1696
|
// Inline function 'kotlin.math.log2' call
|
|
@@ -1683,17 +1710,17 @@
|
|
|
1683
1710
|
}
|
|
1684
1711
|
function ACEScctTransferFunctions() {
|
|
1685
1712
|
ACEScctTransferFunctions_instance = this;
|
|
1686
|
-
this.
|
|
1687
|
-
this.
|
|
1713
|
+
this.c33_1 = 10.5402377416545;
|
|
1714
|
+
this.d33_1 = 0.0729055341958355;
|
|
1688
1715
|
var tmp = this;
|
|
1689
1716
|
// Inline function 'kotlin.math.log2' call
|
|
1690
|
-
tmp.
|
|
1717
|
+
tmp.e33_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
1691
1718
|
}
|
|
1692
|
-
protoOf(ACEScctTransferFunctions).
|
|
1719
|
+
protoOf(ACEScctTransferFunctions).t31 = function (x) {
|
|
1693
1720
|
var tmp;
|
|
1694
1721
|
if (x <= 0.155251141552511) {
|
|
1695
1722
|
tmp = (x - 0.0729055341958355) / 10.5402377416545;
|
|
1696
|
-
} else if (x < this.
|
|
1723
|
+
} else if (x < this.e33_1) {
|
|
1697
1724
|
// Inline function 'kotlin.math.pow' call
|
|
1698
1725
|
var x_0 = x * 17.52 - 9.72;
|
|
1699
1726
|
tmp = Math.pow(2.0, x_0);
|
|
@@ -1702,7 +1729,7 @@
|
|
|
1702
1729
|
}
|
|
1703
1730
|
return tmp;
|
|
1704
1731
|
};
|
|
1705
|
-
protoOf(ACEScctTransferFunctions).
|
|
1732
|
+
protoOf(ACEScctTransferFunctions).u31 = function (x) {
|
|
1706
1733
|
var tmp;
|
|
1707
1734
|
if (x < 0.0078125) {
|
|
1708
1735
|
tmp = 10.5402377416545 * x + 0.0729055341958355;
|
|
@@ -1720,16 +1747,16 @@
|
|
|
1720
1747
|
}
|
|
1721
1748
|
function BT2020TransferFunctions() {
|
|
1722
1749
|
BT2020TransferFunctions_instance = this;
|
|
1723
|
-
this.
|
|
1724
|
-
this.
|
|
1750
|
+
this.f33_1 = 1.0993;
|
|
1751
|
+
this.g33_1 = 0.0181;
|
|
1725
1752
|
var tmp = this;
|
|
1726
1753
|
// Inline function 'kotlin.math.pow' call
|
|
1727
|
-
tmp.
|
|
1754
|
+
tmp.h33_1 = 1.0993 * Math.pow(0.0181, 0.45) - (1.0993 - 1);
|
|
1728
1755
|
}
|
|
1729
|
-
protoOf(BT2020TransferFunctions).
|
|
1730
|
-
return numberToDouble(x < this.
|
|
1756
|
+
protoOf(BT2020TransferFunctions).t31 = function (x) {
|
|
1757
|
+
return numberToDouble(x < this.h33_1 ? x / 4.5 : spow_0((x + (1.0993 - 1)) / 1.0993, 1 / 0.45));
|
|
1731
1758
|
};
|
|
1732
|
-
protoOf(BT2020TransferFunctions).
|
|
1759
|
+
protoOf(BT2020TransferFunctions).u31 = function (x) {
|
|
1733
1760
|
return x < 0.0181 ? 4.5 * x : 1.0993 * spow(x, 0.45) - (1.0993 - 1);
|
|
1734
1761
|
};
|
|
1735
1762
|
var BT2020TransferFunctions_instance;
|
|
@@ -1740,12 +1767,12 @@
|
|
|
1740
1767
|
}
|
|
1741
1768
|
function BT709TransferFunctions() {
|
|
1742
1769
|
BT709TransferFunctions_instance = this;
|
|
1743
|
-
this.
|
|
1770
|
+
this.i33_1 = 1.099 * spow_0(0.018, 0.45) - 0.099;
|
|
1744
1771
|
}
|
|
1745
|
-
protoOf(BT709TransferFunctions).
|
|
1746
|
-
return numberToDouble(x < this.
|
|
1772
|
+
protoOf(BT709TransferFunctions).t31 = function (x) {
|
|
1773
|
+
return numberToDouble(x < this.i33_1 ? x / 4.5 : spow_0((x + 0.099) / 1.099, 1 / 0.45));
|
|
1747
1774
|
};
|
|
1748
|
-
protoOf(BT709TransferFunctions).
|
|
1775
|
+
protoOf(BT709TransferFunctions).u31 = function (x) {
|
|
1749
1776
|
return x < 0.018 ? 4.5 * x : 1.099 * spow(x, 0.45) - 0.099;
|
|
1750
1777
|
};
|
|
1751
1778
|
var BT709TransferFunctions_instance;
|
|
@@ -1755,12 +1782,12 @@
|
|
|
1755
1782
|
return BT709TransferFunctions_instance;
|
|
1756
1783
|
}
|
|
1757
1784
|
function ROMMTransferFunctions() {
|
|
1758
|
-
this.
|
|
1785
|
+
this.j33_1 = 0.001953;
|
|
1759
1786
|
}
|
|
1760
|
-
protoOf(ROMMTransferFunctions).
|
|
1787
|
+
protoOf(ROMMTransferFunctions).t31 = function (x) {
|
|
1761
1788
|
return x < 16 * 0.001953 ? x / 16.0 : spow(x, 1.8);
|
|
1762
1789
|
};
|
|
1763
|
-
protoOf(ROMMTransferFunctions).
|
|
1790
|
+
protoOf(ROMMTransferFunctions).u31 = function (x) {
|
|
1764
1791
|
return x < 0.001953 ? x * 16.0 : spow(x, 1.0 / 1.8);
|
|
1765
1792
|
};
|
|
1766
1793
|
var ROMMTransferFunctions_instance;
|
|
@@ -1769,25 +1796,25 @@
|
|
|
1769
1796
|
}
|
|
1770
1797
|
function rgbToXyzMatrix(whitePoint, r, g, b) {
|
|
1771
1798
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1772
|
-
var primaries = _Matrix___init__impl__q3kp4w_0(r.
|
|
1773
|
-
var wp = whitePoint.
|
|
1799
|
+
var primaries = _Matrix___init__impl__q3kp4w_0(r.y31_1, g.y31_1, b.y31_1, r.z31_1, g.z31_1, b.z31_1, r.k33(), g.k33(), b.k33());
|
|
1800
|
+
var wp = whitePoint.w30_1;
|
|
1774
1801
|
var tmp0 = inverse(primaries);
|
|
1775
|
-
var
|
|
1776
|
-
var
|
|
1802
|
+
var tmp2 = wp.b32();
|
|
1803
|
+
var tmp4 = wp.a32_1;
|
|
1777
1804
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1778
|
-
var v2 = wp.
|
|
1779
|
-
var
|
|
1780
|
-
var
|
|
1781
|
-
var z = Matrix__get_impl_xogbpk(tmp0, 0, 2) *
|
|
1782
|
-
return dotDiagonal(primaries,
|
|
1805
|
+
var v2 = wp.c32();
|
|
1806
|
+
var tmp0_0 = Matrix__get_impl_xogbpk(tmp0, 0, 0) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 1, 0) * tmp4 + Matrix__get_impl_xogbpk(tmp0, 2, 0) * v2;
|
|
1807
|
+
var tmp2_0 = Matrix__get_impl_xogbpk(tmp0, 0, 1) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 1, 1) * tmp4 + Matrix__get_impl_xogbpk(tmp0, 2, 1) * v2;
|
|
1808
|
+
var z = Matrix__get_impl_xogbpk(tmp0, 0, 2) * tmp2 + Matrix__get_impl_xogbpk(tmp0, 1, 2) * tmp4 + Matrix__get_impl_xogbpk(tmp0, 2, 2) * v2;
|
|
1809
|
+
return dotDiagonal(primaries, tmp0_0, tmp2_0, z);
|
|
1783
1810
|
}
|
|
1784
1811
|
function RGBColorSpace$lambda($this$RGBColorSpaceImpl, color) {
|
|
1785
1812
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1786
1813
|
var tmp;
|
|
1787
1814
|
if (color instanceof RGB) {
|
|
1788
|
-
tmp = color.
|
|
1815
|
+
tmp = color.l32($this$RGBColorSpaceImpl);
|
|
1789
1816
|
} else {
|
|
1790
|
-
tmp = color.
|
|
1817
|
+
tmp = color.j2y().n32($this$RGBColorSpaceImpl);
|
|
1791
1818
|
}
|
|
1792
1819
|
return tmp;
|
|
1793
1820
|
}
|
|
@@ -1815,16 +1842,16 @@
|
|
|
1815
1842
|
}
|
|
1816
1843
|
function Companion_3() {
|
|
1817
1844
|
Companion_instance_3 = this;
|
|
1818
|
-
this.
|
|
1845
|
+
this.l33_1 = threeComponentInfo('R', 0.0, 255.0, 'G', 0.0, 255.0, 'B', 0.0, 255.0);
|
|
1819
1846
|
}
|
|
1820
|
-
protoOf(Companion_3).
|
|
1847
|
+
protoOf(Companion_3).a2 = function () {
|
|
1821
1848
|
return 'RGBInt';
|
|
1822
1849
|
};
|
|
1823
|
-
protoOf(Companion_3).
|
|
1824
|
-
return color.
|
|
1850
|
+
protoOf(Companion_3).m33 = function (color) {
|
|
1851
|
+
return color.c2y().d30();
|
|
1825
1852
|
};
|
|
1826
|
-
protoOf(Companion_3).
|
|
1827
|
-
return new RGBInt(this.
|
|
1853
|
+
protoOf(Companion_3).w2y = function (color) {
|
|
1854
|
+
return new RGBInt(this.m33(color));
|
|
1828
1855
|
};
|
|
1829
1856
|
var Companion_instance_3;
|
|
1830
1857
|
function Companion_getInstance_3() {
|
|
@@ -1837,23 +1864,23 @@
|
|
|
1837
1864
|
// Inline function 'kotlin.toUInt' call
|
|
1838
1865
|
// Inline function 'kotlin.UInt.shl' call
|
|
1839
1866
|
var this_0 = _UInt___init__impl__l7qpdl(alpha);
|
|
1840
|
-
var
|
|
1867
|
+
var tmp0 = _UInt___init__impl__l7qpdl(_UInt___get_data__impl__f0vqqw(this_0) << 24);
|
|
1841
1868
|
// Inline function 'kotlin.toUInt' call
|
|
1842
1869
|
// Inline function 'kotlin.UInt.shl' call
|
|
1843
1870
|
var this_1 = _UInt___init__impl__l7qpdl(r);
|
|
1844
1871
|
// Inline function 'kotlin.UInt.or' call
|
|
1845
1872
|
var other = _UInt___init__impl__l7qpdl(_UInt___get_data__impl__f0vqqw(this_1) << 16);
|
|
1846
|
-
var
|
|
1873
|
+
var tmp0_0 = _UInt___init__impl__l7qpdl(_UInt___get_data__impl__f0vqqw(tmp0) | _UInt___get_data__impl__f0vqqw(other));
|
|
1847
1874
|
// Inline function 'kotlin.toUInt' call
|
|
1848
1875
|
// Inline function 'kotlin.UInt.shl' call
|
|
1849
1876
|
var this_2 = _UInt___init__impl__l7qpdl(g);
|
|
1850
1877
|
// Inline function 'kotlin.UInt.or' call
|
|
1851
1878
|
var other_0 = _UInt___init__impl__l7qpdl(_UInt___get_data__impl__f0vqqw(this_2) << 8);
|
|
1852
|
-
var
|
|
1879
|
+
var tmp0_1 = _UInt___init__impl__l7qpdl(_UInt___get_data__impl__f0vqqw(tmp0_0) | _UInt___get_data__impl__f0vqqw(other_0));
|
|
1853
1880
|
// Inline function 'kotlin.toUInt' call
|
|
1854
1881
|
// Inline function 'kotlin.UInt.or' call
|
|
1855
1882
|
var other_1 = _UInt___init__impl__l7qpdl(b);
|
|
1856
|
-
var tmp$ret$9 = _UInt___init__impl__l7qpdl(_UInt___get_data__impl__f0vqqw(
|
|
1883
|
+
var tmp$ret$9 = _UInt___init__impl__l7qpdl(_UInt___get_data__impl__f0vqqw(tmp0_1) | _UInt___get_data__impl__f0vqqw(other_1));
|
|
1857
1884
|
return _RGBInt___init__impl__lqova7(tmp$ret$9);
|
|
1858
1885
|
}
|
|
1859
1886
|
function _RGBInt___init__impl__lqova7_1(r, g, b, alpha) {
|
|
@@ -1956,7 +1983,7 @@
|
|
|
1956
1983
|
return (_UByte___get_data__impl__jof9qr(this_0) & 255) / 255.0;
|
|
1957
1984
|
}
|
|
1958
1985
|
function RGBInt__toSRGB_impl_m0acyy($this) {
|
|
1959
|
-
return Companion_getInstance_2().
|
|
1986
|
+
return Companion_getInstance_2().b31(_RGBInt___get_redFloat__impl__lnt6cx($this), _RGBInt___get_greenFloat__impl__opq1mn($this), _RGBInt___get_blueFloat__impl__jt6mw2($this), _RGBInt___get_alpha__impl__yl2tay($this));
|
|
1960
1987
|
}
|
|
1961
1988
|
function RGBInt__toArray_impl_73rlu9($this) {
|
|
1962
1989
|
// Inline function 'kotlin.UByte.toFloat' call
|
|
@@ -1995,59 +2022,59 @@
|
|
|
1995
2022
|
function RGBInt__equals_impl_qmmpmc($this, other) {
|
|
1996
2023
|
if (!(other instanceof RGBInt))
|
|
1997
2024
|
return false;
|
|
1998
|
-
if (!($this === (other instanceof RGBInt ? other.
|
|
2025
|
+
if (!($this === (other instanceof RGBInt ? other.m32_1 : THROW_CCE())))
|
|
1999
2026
|
return false;
|
|
2000
2027
|
return true;
|
|
2001
2028
|
}
|
|
2002
2029
|
function RGBInt(argb) {
|
|
2003
2030
|
Companion_getInstance_3();
|
|
2004
|
-
this.
|
|
2031
|
+
this.m32_1 = argb;
|
|
2005
2032
|
}
|
|
2006
|
-
protoOf(RGBInt).
|
|
2007
|
-
return _RGBInt___get_alpha__impl__yl2tay(this.
|
|
2033
|
+
protoOf(RGBInt).a2y = function () {
|
|
2034
|
+
return _RGBInt___get_alpha__impl__yl2tay(this.m32_1);
|
|
2008
2035
|
};
|
|
2009
|
-
protoOf(RGBInt).
|
|
2010
|
-
return _RGBInt___get_space__impl__emgnsy(this.
|
|
2036
|
+
protoOf(RGBInt).b2y = function () {
|
|
2037
|
+
return _RGBInt___get_space__impl__emgnsy(this.m32_1);
|
|
2011
2038
|
};
|
|
2012
|
-
protoOf(RGBInt).
|
|
2013
|
-
return RGBInt__toSRGB_impl_m0acyy(this.
|
|
2039
|
+
protoOf(RGBInt).c2y = function () {
|
|
2040
|
+
return RGBInt__toSRGB_impl_m0acyy(this.m32_1);
|
|
2014
2041
|
};
|
|
2015
|
-
protoOf(RGBInt).
|
|
2016
|
-
return RGBInt__toArray_impl_73rlu9(this.
|
|
2042
|
+
protoOf(RGBInt).h5 = function () {
|
|
2043
|
+
return RGBInt__toArray_impl_73rlu9(this.m32_1);
|
|
2017
2044
|
};
|
|
2018
2045
|
protoOf(RGBInt).toString = function () {
|
|
2019
|
-
return RGBInt__toString_impl_cf5r29(this.
|
|
2046
|
+
return RGBInt__toString_impl_cf5r29(this.m32_1);
|
|
2020
2047
|
};
|
|
2021
2048
|
protoOf(RGBInt).hashCode = function () {
|
|
2022
|
-
return RGBInt__hashCode_impl_y6bnv4(this.
|
|
2049
|
+
return RGBInt__hashCode_impl_y6bnv4(this.m32_1);
|
|
2023
2050
|
};
|
|
2024
2051
|
protoOf(RGBInt).equals = function (other) {
|
|
2025
|
-
return RGBInt__equals_impl_qmmpmc(this.
|
|
2052
|
+
return RGBInt__equals_impl_qmmpmc(this.m32_1, other);
|
|
2026
2053
|
};
|
|
2027
2054
|
function Companion_4() {
|
|
2028
2055
|
Companion_instance_4 = this;
|
|
2029
|
-
this.
|
|
2056
|
+
this.n33_1 = XYZColorSpaces_getInstance().c2z_1;
|
|
2030
2057
|
}
|
|
2031
2058
|
protoOf(Companion_4).hashCode = function () {
|
|
2032
|
-
return hashCode(XYZColorSpaces_getInstance().
|
|
2059
|
+
return hashCode(XYZColorSpaces_getInstance().c2z_1);
|
|
2033
2060
|
};
|
|
2034
2061
|
protoOf(Companion_4).equals = function (other) {
|
|
2035
|
-
return equals(XYZColorSpaces_getInstance().
|
|
2062
|
+
return equals(XYZColorSpaces_getInstance().c2z_1, other);
|
|
2036
2063
|
};
|
|
2037
|
-
protoOf(Companion_4).
|
|
2038
|
-
return this.
|
|
2064
|
+
protoOf(Companion_4).b31 = function (x, y, z, alpha) {
|
|
2065
|
+
return this.n33_1.b31(x, y, z, alpha);
|
|
2039
2066
|
};
|
|
2040
|
-
protoOf(Companion_4).
|
|
2041
|
-
return this.
|
|
2067
|
+
protoOf(Companion_4).w31 = function (x, y, z, alpha) {
|
|
2068
|
+
return this.n33_1.w31(x, y, z, alpha);
|
|
2042
2069
|
};
|
|
2043
|
-
protoOf(Companion_4).
|
|
2044
|
-
return this.
|
|
2070
|
+
protoOf(Companion_4).b2z = function () {
|
|
2071
|
+
return this.n33_1.b2z();
|
|
2045
2072
|
};
|
|
2046
|
-
protoOf(Companion_4).
|
|
2047
|
-
return this.
|
|
2073
|
+
protoOf(Companion_4).a2 = function () {
|
|
2074
|
+
return this.n33_1.a2();
|
|
2048
2075
|
};
|
|
2049
|
-
protoOf(Companion_4).
|
|
2050
|
-
return this.
|
|
2076
|
+
protoOf(Companion_4).w2y = function (color) {
|
|
2077
|
+
return this.n33_1.w2y(color);
|
|
2051
2078
|
};
|
|
2052
2079
|
var Companion_instance_4;
|
|
2053
2080
|
function Companion_getInstance_4() {
|
|
@@ -2056,17 +2083,17 @@
|
|
|
2056
2083
|
return Companion_instance_4;
|
|
2057
2084
|
}
|
|
2058
2085
|
function adaptToM($this, space, m, mi) {
|
|
2059
|
-
if (space.
|
|
2086
|
+
if (space.b2z().equals($this.p2y_1.b2z()))
|
|
2060
2087
|
return $this;
|
|
2061
|
-
var transform = chromaticAdaptationMatrix(space, $this.
|
|
2062
|
-
var
|
|
2063
|
-
var
|
|
2088
|
+
var transform = chromaticAdaptationMatrix(space, $this.p2y_1.b2z().w30_1, m, mi);
|
|
2089
|
+
var tmp2 = $this.l2y_1;
|
|
2090
|
+
var tmp4 = $this.m2y_1;
|
|
2064
2091
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
2065
|
-
var v2 = $this.
|
|
2066
|
-
var
|
|
2067
|
-
var
|
|
2068
|
-
var zz = Matrix__get_impl_xogbpk(transform, 0, 2) *
|
|
2069
|
-
return space.
|
|
2092
|
+
var v2 = $this.n2y_1;
|
|
2093
|
+
var tmp0 = Matrix__get_impl_xogbpk(transform, 0, 0) * tmp2 + Matrix__get_impl_xogbpk(transform, 1, 0) * tmp4 + Matrix__get_impl_xogbpk(transform, 2, 0) * v2;
|
|
2094
|
+
var tmp2_0 = Matrix__get_impl_xogbpk(transform, 0, 1) * tmp2 + Matrix__get_impl_xogbpk(transform, 1, 1) * tmp4 + Matrix__get_impl_xogbpk(transform, 2, 1) * v2;
|
|
2095
|
+
var zz = Matrix__get_impl_xogbpk(transform, 0, 2) * tmp2 + Matrix__get_impl_xogbpk(transform, 1, 2) * tmp4 + Matrix__get_impl_xogbpk(transform, 2, 2) * v2;
|
|
2096
|
+
return space.b31(tmp0, tmp2_0, zz, $this.o2y_1);
|
|
2070
2097
|
}
|
|
2071
2098
|
function toLAB$f(t) {
|
|
2072
2099
|
var tmp;
|
|
@@ -2080,71 +2107,71 @@
|
|
|
2080
2107
|
}
|
|
2081
2108
|
function XYZ(x, y, z, alpha, space) {
|
|
2082
2109
|
Companion_getInstance_4();
|
|
2083
|
-
this.
|
|
2084
|
-
this.
|
|
2085
|
-
this.
|
|
2086
|
-
this.
|
|
2087
|
-
this.
|
|
2110
|
+
this.l2y_1 = x;
|
|
2111
|
+
this.m2y_1 = y;
|
|
2112
|
+
this.n2y_1 = z;
|
|
2113
|
+
this.o2y_1 = alpha;
|
|
2114
|
+
this.p2y_1 = space;
|
|
2088
2115
|
}
|
|
2089
|
-
protoOf(XYZ).
|
|
2090
|
-
return this.
|
|
2116
|
+
protoOf(XYZ).a2y = function () {
|
|
2117
|
+
return this.o2y_1;
|
|
2091
2118
|
};
|
|
2092
|
-
protoOf(XYZ).
|
|
2093
|
-
return this.
|
|
2119
|
+
protoOf(XYZ).b2y = function () {
|
|
2120
|
+
return this.p2y_1;
|
|
2094
2121
|
};
|
|
2095
|
-
protoOf(XYZ).
|
|
2122
|
+
protoOf(XYZ).e2z = function (space) {
|
|
2096
2123
|
return adaptToM(this, space, get_CAT02_XYZ_TO_LMS(), get_CAT02_LMS_TO_XYZ());
|
|
2097
2124
|
};
|
|
2098
|
-
protoOf(XYZ).
|
|
2099
|
-
var _destruct__k2r9zo = this.
|
|
2100
|
-
var x = _destruct__k2r9zo.
|
|
2101
|
-
var y = _destruct__k2r9zo.
|
|
2102
|
-
var z = _destruct__k2r9zo.
|
|
2103
|
-
var f = space.
|
|
2125
|
+
protoOf(XYZ).n32 = function (space) {
|
|
2126
|
+
var _destruct__k2r9zo = this.e2z(XYZColorSpace_0(space.b2z()));
|
|
2127
|
+
var x = _destruct__k2r9zo.re();
|
|
2128
|
+
var y = _destruct__k2r9zo.se();
|
|
2129
|
+
var z = _destruct__k2r9zo.o33();
|
|
2130
|
+
var f = space.k31();
|
|
2104
2131
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
2105
|
-
var this_0 = _Matrix___init__impl__q3kp4w(space.
|
|
2106
|
-
var
|
|
2107
|
-
var
|
|
2132
|
+
var this_0 = _Matrix___init__impl__q3kp4w(space.k32());
|
|
2133
|
+
var tmp0 = Matrix__get_impl_xogbpk(this_0, 0, 0) * x + Matrix__get_impl_xogbpk(this_0, 1, 0) * y + Matrix__get_impl_xogbpk(this_0, 2, 0) * z;
|
|
2134
|
+
var tmp2 = Matrix__get_impl_xogbpk(this_0, 0, 1) * x + Matrix__get_impl_xogbpk(this_0, 1, 1) * y + Matrix__get_impl_xogbpk(this_0, 2, 1) * z;
|
|
2108
2135
|
var b = Matrix__get_impl_xogbpk(this_0, 0, 2) * x + Matrix__get_impl_xogbpk(this_0, 1, 2) * y + Matrix__get_impl_xogbpk(this_0, 2, 2) * z;
|
|
2109
|
-
return space.
|
|
2136
|
+
return space.b31(f.u31(tmp0), f.u31(tmp2), f.u31(b), this.o2y_1);
|
|
2110
2137
|
};
|
|
2111
|
-
protoOf(XYZ).
|
|
2112
|
-
return this.
|
|
2138
|
+
protoOf(XYZ).c2y = function () {
|
|
2139
|
+
return this.n32(RGBColorSpaces_getInstance().r2z_1);
|
|
2113
2140
|
};
|
|
2114
|
-
protoOf(XYZ).
|
|
2115
|
-
var fx = toLAB$f(this.
|
|
2116
|
-
var fy = toLAB$f(this.
|
|
2117
|
-
var fz = toLAB$f(this.
|
|
2141
|
+
protoOf(XYZ).k2y = function () {
|
|
2142
|
+
var fx = toLAB$f(this.l2y_1 / this.p2y_1.b2z().w30_1.b32());
|
|
2143
|
+
var fy = toLAB$f(this.m2y_1 / this.p2y_1.b2z().w30_1.a32_1);
|
|
2144
|
+
var fz = toLAB$f(this.n2y_1 / this.p2y_1.b2z().w30_1.c32());
|
|
2118
2145
|
var l = 116 * fy - 16;
|
|
2119
2146
|
var a = 500 * (fx - fy);
|
|
2120
2147
|
var b = 200 * (fy - fz);
|
|
2121
|
-
return LABColorSpace_0(this.
|
|
2148
|
+
return LABColorSpace_0(this.p2y_1.b2z()).w31(l, a, b, this.o2y_1);
|
|
2122
2149
|
};
|
|
2123
|
-
protoOf(XYZ).
|
|
2150
|
+
protoOf(XYZ).j2y = function () {
|
|
2124
2151
|
return this;
|
|
2125
2152
|
};
|
|
2126
|
-
protoOf(XYZ).
|
|
2153
|
+
protoOf(XYZ).h5 = function () {
|
|
2127
2154
|
// Inline function 'kotlin.floatArrayOf' call
|
|
2128
|
-
return new Float32Array([this.
|
|
2155
|
+
return new Float32Array([this.l2y_1, this.m2y_1, this.n2y_1, this.o2y_1]);
|
|
2129
2156
|
};
|
|
2130
|
-
protoOf(XYZ).
|
|
2131
|
-
return this.
|
|
2157
|
+
protoOf(XYZ).re = function () {
|
|
2158
|
+
return this.l2y_1;
|
|
2132
2159
|
};
|
|
2133
|
-
protoOf(XYZ).
|
|
2134
|
-
return this.
|
|
2160
|
+
protoOf(XYZ).se = function () {
|
|
2161
|
+
return this.m2y_1;
|
|
2135
2162
|
};
|
|
2136
|
-
protoOf(XYZ).
|
|
2137
|
-
return this.
|
|
2163
|
+
protoOf(XYZ).o33 = function () {
|
|
2164
|
+
return this.n2y_1;
|
|
2138
2165
|
};
|
|
2139
2166
|
protoOf(XYZ).toString = function () {
|
|
2140
|
-
return 'XYZ(x=' + this.
|
|
2167
|
+
return 'XYZ(x=' + this.l2y_1 + ', y=' + this.m2y_1 + ', z=' + this.n2y_1 + ', alpha=' + this.o2y_1 + ', space=' + toString(this.p2y_1) + ')';
|
|
2141
2168
|
};
|
|
2142
2169
|
protoOf(XYZ).hashCode = function () {
|
|
2143
|
-
var result = getNumberHashCode(this.
|
|
2144
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2145
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2146
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2147
|
-
result = imul(result, 31) + hashCode(this.
|
|
2170
|
+
var result = getNumberHashCode(this.l2y_1);
|
|
2171
|
+
result = imul(result, 31) + getNumberHashCode(this.m2y_1) | 0;
|
|
2172
|
+
result = imul(result, 31) + getNumberHashCode(this.n2y_1) | 0;
|
|
2173
|
+
result = imul(result, 31) + getNumberHashCode(this.o2y_1) | 0;
|
|
2174
|
+
result = imul(result, 31) + hashCode(this.p2y_1) | 0;
|
|
2148
2175
|
return result;
|
|
2149
2176
|
};
|
|
2150
2177
|
protoOf(XYZ).equals = function (other) {
|
|
@@ -2153,27 +2180,27 @@
|
|
|
2153
2180
|
if (!(other instanceof XYZ))
|
|
2154
2181
|
return false;
|
|
2155
2182
|
var tmp0_other_with_cast = other instanceof XYZ ? other : THROW_CCE();
|
|
2156
|
-
if (!equals(this.
|
|
2183
|
+
if (!equals(this.l2y_1, tmp0_other_with_cast.l2y_1))
|
|
2157
2184
|
return false;
|
|
2158
|
-
if (!equals(this.
|
|
2185
|
+
if (!equals(this.m2y_1, tmp0_other_with_cast.m2y_1))
|
|
2159
2186
|
return false;
|
|
2160
|
-
if (!equals(this.
|
|
2187
|
+
if (!equals(this.n2y_1, tmp0_other_with_cast.n2y_1))
|
|
2161
2188
|
return false;
|
|
2162
|
-
if (!equals(this.
|
|
2189
|
+
if (!equals(this.o2y_1, tmp0_other_with_cast.o2y_1))
|
|
2163
2190
|
return false;
|
|
2164
|
-
if (!equals(this.
|
|
2191
|
+
if (!equals(this.p2y_1, tmp0_other_with_cast.p2y_1))
|
|
2165
2192
|
return false;
|
|
2166
2193
|
return true;
|
|
2167
2194
|
};
|
|
2168
2195
|
function XYZColorSpace() {
|
|
2169
2196
|
}
|
|
2170
2197
|
function XYZColorSpace_0(whitePoint) {
|
|
2171
|
-
return whitePoint.equals(Illuminant_getInstance().
|
|
2198
|
+
return whitePoint.equals(Illuminant_getInstance().k2z_1) ? XYZColorSpaces_getInstance().c2z_1 : whitePoint.equals(Illuminant_getInstance().i2z_1) ? XYZColorSpaces_getInstance().d2z_1 : new XYZColorSpaceImpl(whitePoint);
|
|
2172
2199
|
}
|
|
2173
2200
|
function XYZColorSpaces() {
|
|
2174
2201
|
XYZColorSpaces_instance = this;
|
|
2175
|
-
this.
|
|
2176
|
-
this.
|
|
2202
|
+
this.c2z_1 = new XYZColorSpaceImpl(Illuminant_getInstance().k2z_1);
|
|
2203
|
+
this.d2z_1 = new XYZColorSpaceImpl(Illuminant_getInstance().i2z_1);
|
|
2177
2204
|
}
|
|
2178
2205
|
var XYZColorSpaces_instance;
|
|
2179
2206
|
function XYZColorSpaces_getInstance() {
|
|
@@ -2184,37 +2211,37 @@
|
|
|
2184
2211
|
function chromaticAdaptationMatrix(_this__u8e3s4, srcWp, xyzToLms, lmsToXyz) {
|
|
2185
2212
|
xyzToLms = xyzToLms === VOID ? get_CAT02_XYZ_TO_LMS() : xyzToLms;
|
|
2186
2213
|
lmsToXyz = lmsToXyz === VOID ? get_CAT02_LMS_TO_XYZ() : lmsToXyz;
|
|
2187
|
-
var dstWp = _this__u8e3s4.
|
|
2188
|
-
var src = dot_0(xyzToLms, srcWp.
|
|
2189
|
-
var dst = dot_0(xyzToLms, dstWp.
|
|
2214
|
+
var dstWp = _this__u8e3s4.b2z().w30_1;
|
|
2215
|
+
var src = dot_0(xyzToLms, srcWp.b32(), srcWp.a32_1, srcWp.c32());
|
|
2216
|
+
var dst = dot_0(xyzToLms, dstWp.b32(), dstWp.a32_1, dstWp.c32());
|
|
2190
2217
|
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);
|
|
2191
2218
|
}
|
|
2192
2219
|
function XYZColorSpaceImpl(whitePoint) {
|
|
2193
|
-
this.
|
|
2194
|
-
this.
|
|
2220
|
+
this.p33_1 = whitePoint;
|
|
2221
|
+
this.q33_1 = zeroOneComponentInfo('XYZ');
|
|
2195
2222
|
}
|
|
2196
|
-
protoOf(XYZColorSpaceImpl).
|
|
2197
|
-
return this.
|
|
2223
|
+
protoOf(XYZColorSpaceImpl).b2z = function () {
|
|
2224
|
+
return this.p33_1;
|
|
2198
2225
|
};
|
|
2199
|
-
protoOf(XYZColorSpaceImpl).
|
|
2226
|
+
protoOf(XYZColorSpaceImpl).a2 = function () {
|
|
2200
2227
|
return 'XYZ';
|
|
2201
2228
|
};
|
|
2202
|
-
protoOf(XYZColorSpaceImpl).
|
|
2203
|
-
return color.
|
|
2229
|
+
protoOf(XYZColorSpaceImpl).w2y = function (color) {
|
|
2230
|
+
return color.j2y().e2z(this);
|
|
2204
2231
|
};
|
|
2205
2232
|
protoOf(XYZColorSpaceImpl).toString = function () {
|
|
2206
|
-
return 'XYZColorSpace(' + this.
|
|
2233
|
+
return 'XYZColorSpace(' + this.p33_1.toString() + ')';
|
|
2207
2234
|
};
|
|
2208
|
-
protoOf(XYZColorSpaceImpl).
|
|
2235
|
+
protoOf(XYZColorSpaceImpl).b31 = function (x, y, z, alpha) {
|
|
2209
2236
|
return new XYZ(x, y, z, alpha, this);
|
|
2210
2237
|
};
|
|
2211
2238
|
protoOf(XYZColorSpaceImpl).hashCode = function () {
|
|
2212
|
-
return this.
|
|
2239
|
+
return this.p33_1.hashCode();
|
|
2213
2240
|
};
|
|
2214
2241
|
protoOf(XYZColorSpaceImpl).equals = function (other) {
|
|
2215
2242
|
var tmp;
|
|
2216
2243
|
if (!(other == null) ? isInterface(other, XYZColorSpace) : false) {
|
|
2217
|
-
tmp = this.
|
|
2244
|
+
tmp = this.p33_1.equals(other.b2z());
|
|
2218
2245
|
} else {
|
|
2219
2246
|
tmp = false;
|
|
2220
2247
|
}
|
|
@@ -2230,26 +2257,26 @@
|
|
|
2230
2257
|
}
|
|
2231
2258
|
function xyY(x, y, Y) {
|
|
2232
2259
|
Y = Y === VOID ? 1.0 : Y;
|
|
2233
|
-
this.
|
|
2234
|
-
this.
|
|
2235
|
-
this.
|
|
2260
|
+
this.y31_1 = x;
|
|
2261
|
+
this.z31_1 = y;
|
|
2262
|
+
this.a32_1 = Y;
|
|
2236
2263
|
}
|
|
2237
|
-
protoOf(xyY).
|
|
2238
|
-
return 1 - this.
|
|
2264
|
+
protoOf(xyY).k33 = function () {
|
|
2265
|
+
return 1 - this.y31_1 - this.z31_1;
|
|
2239
2266
|
};
|
|
2240
|
-
protoOf(xyY).
|
|
2241
|
-
return this.
|
|
2267
|
+
protoOf(xyY).b32 = function () {
|
|
2268
|
+
return this.y31_1 * this.a32_1 / this.z31_1;
|
|
2242
2269
|
};
|
|
2243
|
-
protoOf(xyY).
|
|
2244
|
-
return (1 - this.
|
|
2270
|
+
protoOf(xyY).c32 = function () {
|
|
2271
|
+
return (1 - this.y31_1 - this.z31_1) * this.a32_1 / this.z31_1;
|
|
2245
2272
|
};
|
|
2246
2273
|
protoOf(xyY).toString = function () {
|
|
2247
|
-
return 'xyY(x=' + this.
|
|
2274
|
+
return 'xyY(x=' + this.y31_1 + ', y=' + this.z31_1 + ', Y=' + this.a32_1 + ')';
|
|
2248
2275
|
};
|
|
2249
2276
|
protoOf(xyY).hashCode = function () {
|
|
2250
|
-
var result = getNumberHashCode(this.
|
|
2251
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2252
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2277
|
+
var result = getNumberHashCode(this.y31_1);
|
|
2278
|
+
result = imul(result, 31) + getNumberHashCode(this.z31_1) | 0;
|
|
2279
|
+
result = imul(result, 31) + getNumberHashCode(this.a32_1) | 0;
|
|
2253
2280
|
return result;
|
|
2254
2281
|
};
|
|
2255
2282
|
protoOf(xyY).equals = function (other) {
|
|
@@ -2258,33 +2285,33 @@
|
|
|
2258
2285
|
if (!(other instanceof xyY))
|
|
2259
2286
|
return false;
|
|
2260
2287
|
var tmp0_other_with_cast = other instanceof xyY ? other : THROW_CCE();
|
|
2261
|
-
if (!equals(this.
|
|
2288
|
+
if (!equals(this.y31_1, tmp0_other_with_cast.y31_1))
|
|
2262
2289
|
return false;
|
|
2263
|
-
if (!equals(this.
|
|
2290
|
+
if (!equals(this.z31_1, tmp0_other_with_cast.z31_1))
|
|
2264
2291
|
return false;
|
|
2265
|
-
if (!equals(this.
|
|
2292
|
+
if (!equals(this.a32_1, tmp0_other_with_cast.a32_1))
|
|
2266
2293
|
return false;
|
|
2267
2294
|
return true;
|
|
2268
2295
|
};
|
|
2269
2296
|
//region block: post-declaration
|
|
2270
|
-
protoOf(HSL).
|
|
2271
|
-
protoOf(HSL).
|
|
2272
|
-
protoOf(HSL).
|
|
2273
|
-
protoOf(LAB).
|
|
2274
|
-
protoOf(LABColorSpaceImpl).
|
|
2275
|
-
protoOf(LCHab).
|
|
2276
|
-
protoOf(RGB).
|
|
2277
|
-
protoOf(RGB).
|
|
2278
|
-
protoOf(RGBColorSpaceImpl).
|
|
2279
|
-
protoOf(RGBInt).
|
|
2280
|
-
protoOf(RGBInt).
|
|
2281
|
-
protoOf(RGBInt).
|
|
2282
|
-
protoOf(RGBInt).
|
|
2283
|
-
protoOf(Companion_4).
|
|
2284
|
-
protoOf(XYZ).
|
|
2285
|
-
protoOf(XYZ).
|
|
2286
|
-
protoOf(XYZColorSpaceImpl).
|
|
2287
|
-
protoOf(XYZColorSpaceImpl).
|
|
2297
|
+
protoOf(HSL).j2y = toXYZ;
|
|
2298
|
+
protoOf(HSL).k2y = toLAB;
|
|
2299
|
+
protoOf(HSL).q2y = toLCHab;
|
|
2300
|
+
protoOf(LAB).d2y = toHSL;
|
|
2301
|
+
protoOf(LABColorSpaceImpl).w31 = invoke;
|
|
2302
|
+
protoOf(LCHab).d2y = toHSL;
|
|
2303
|
+
protoOf(RGB).k2y = toLAB;
|
|
2304
|
+
protoOf(RGB).q2y = toLCHab;
|
|
2305
|
+
protoOf(RGBColorSpaceImpl).w31 = invoke_0;
|
|
2306
|
+
protoOf(RGBInt).d2y = toHSL;
|
|
2307
|
+
protoOf(RGBInt).j2y = toXYZ;
|
|
2308
|
+
protoOf(RGBInt).k2y = toLAB;
|
|
2309
|
+
protoOf(RGBInt).q2y = toLCHab;
|
|
2310
|
+
protoOf(Companion_4).x31 = invoke$default;
|
|
2311
|
+
protoOf(XYZ).d2y = toHSL;
|
|
2312
|
+
protoOf(XYZ).q2y = toLCHab;
|
|
2313
|
+
protoOf(XYZColorSpaceImpl).w31 = invoke_1;
|
|
2314
|
+
protoOf(XYZColorSpaceImpl).x31 = invoke$default;
|
|
2288
2315
|
//endregion
|
|
2289
2316
|
//region block: init
|
|
2290
2317
|
PqNonlinearity_instance = new PqNonlinearity();
|