@cruglobal/godtools-shared 1.1.0-SNAPSHOT.1567 → 1.1.0-SNAPSHOT.1570
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 +65 -66
- package/Kermit-kermit-core.js.map +1 -1
- package/Kermit-kermit.js +17 -18
- package/Kermit-kermit.js.map +1 -1
- package/KustomExport-lib-coroutines.js +3 -3
- package/KustomExport-lib.js +3 -3
- package/android-gto-support-gto-support-androidx-annotation.js +3 -3
- package/android-gto-support-gto-support-fluidsonic-locale.js +3 -3
- package/antlr-kotlin-antlr-kotlin-runtime.js +4229 -4369
- package/antlr-kotlin-antlr-kotlin-runtime.js.map +1 -1
- package/colormath-root-colormath.js +1360 -1191
- package/colormath-root-colormath.js.map +1 -1
- package/fluid-locale.js +239 -228
- package/fluid-locale.js.map +1 -1
- package/kotlin-js.js +44 -45
- package/kotlin-js.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +8906 -6847
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-kotlinx-atomicfu-runtime.js +3 -3
- package/kotlin-mpp-godtools-tool-parser-module-common.js +7 -7
- package/kotlin-mpp-godtools-tool-parser-module-common.js.map +1 -1
- package/kotlin-mpp-godtools-tool-parser-module-parser-expressions.js +532 -585
- package/kotlin-mpp-godtools-tool-parser-module-parser-expressions.js.map +1 -1
- package/kotlin-mpp-godtools-tool-parser-module-parser.js +3507 -4009
- package/kotlin-mpp-godtools-tool-parser-module-parser.js.map +1 -1
- package/kotlin-mpp-godtools-tool-parser-module-state.js +297 -271
- package/kotlin-mpp-godtools-tool-parser-module-state.js.map +1 -1
- package/kotlin-mpp-godtools-tool-parser-publishing-npm.d.ts +143 -94
- package/kotlin-mpp-godtools-tool-parser-publishing-npm.js +11 -7
- package/kotlin-mpp-godtools-tool-parser-publishing-npm.js.map +1 -1
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +3 -3
- package/kotlinx-atomicfu.js +80 -81
- package/kotlinx-atomicfu.js.map +1 -1
- package/kotlinx-coroutines-core.js +4023 -4049
- package/kotlinx-coroutines-core.js.map +1 -1
- package/package.json +1 -1
- package/seskar-core.js +3 -3
- package/seskar-react.js +3 -3
|
@@ -1,158 +1,160 @@
|
|
|
1
|
-
(function (
|
|
1
|
+
(function (factory) {
|
|
2
2
|
if (typeof define === 'function' && define.amd)
|
|
3
3
|
define(['exports', './kotlin-kotlin-stdlib.js'], factory);
|
|
4
4
|
else if (typeof exports === 'object')
|
|
5
5
|
factory(module.exports, require('./kotlin-kotlin-stdlib.js'));
|
|
6
6
|
else {
|
|
7
|
-
if (typeof
|
|
7
|
+
if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
|
|
8
8
|
throw new Error("Error loading module 'colormath-root-colormath'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'colormath-root-colormath'.");
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
globalThis['colormath-root-colormath'] = factory(typeof globalThis['colormath-root-colormath'] === 'undefined' ? {} : globalThis['colormath-root-colormath'], globalThis['kotlin-kotlin-stdlib']);
|
|
11
11
|
}
|
|
12
|
-
}(
|
|
12
|
+
}(function (_, kotlin_kotlin) {
|
|
13
13
|
'use strict';
|
|
14
14
|
//region block: imports
|
|
15
15
|
var imul = Math.imul;
|
|
16
16
|
var log2 = Math.log2;
|
|
17
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
18
|
-
var
|
|
19
|
-
var
|
|
20
|
-
var
|
|
21
|
-
var toString = kotlin_kotlin.$_$.x6;
|
|
17
|
+
var protoOf = kotlin_kotlin.$_$.z6;
|
|
18
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.l6;
|
|
19
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.n6;
|
|
20
|
+
var toString = kotlin_kotlin.$_$.c7;
|
|
22
21
|
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.a1;
|
|
23
|
-
var
|
|
24
|
-
var emptyMap = kotlin_kotlin.$_$.
|
|
22
|
+
var initMetadataForClass = kotlin_kotlin.$_$.k6;
|
|
23
|
+
var emptyMap = kotlin_kotlin.$_$.q3;
|
|
25
24
|
var VOID = kotlin_kotlin.$_$.d;
|
|
26
|
-
var Companion_instance = kotlin_kotlin.$_$.
|
|
25
|
+
var Companion_instance = kotlin_kotlin.$_$.k2;
|
|
27
26
|
var _Result___init__impl__xyqfz8 = kotlin_kotlin.$_$.y1;
|
|
28
|
-
var createFailure = kotlin_kotlin.$_$.
|
|
27
|
+
var createFailure = kotlin_kotlin.$_$.t9;
|
|
29
28
|
var _Result___get_value__impl__bjfvqg = kotlin_kotlin.$_$.b2;
|
|
30
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
29
|
+
var THROW_CCE = kotlin_kotlin.$_$.n9;
|
|
31
30
|
var _Result___get_isFailure__impl__jpiriv = kotlin_kotlin.$_$.a2;
|
|
32
|
-
var startsWith = kotlin_kotlin.$_$.
|
|
31
|
+
var startsWith = kotlin_kotlin.$_$.l8;
|
|
33
32
|
var Regex_init_$Create$ = kotlin_kotlin.$_$.s;
|
|
34
|
-
var
|
|
35
|
-
var
|
|
33
|
+
var initMetadataForObject = kotlin_kotlin.$_$.p6;
|
|
34
|
+
var endsWith = kotlin_kotlin.$_$.x7;
|
|
35
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.e3;
|
|
36
36
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.g;
|
|
37
|
-
var checkIndexOverflow = kotlin_kotlin.$_$.
|
|
38
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
39
|
-
var get_lastIndex = kotlin_kotlin.$_$.
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var
|
|
44
|
-
var
|
|
45
|
-
var
|
|
46
|
-
var Enum = kotlin_kotlin.$_$.y8;
|
|
47
|
-
var equals = kotlin_kotlin.$_$.b6;
|
|
37
|
+
var checkIndexOverflow = kotlin_kotlin.$_$.d3;
|
|
38
|
+
var Unit_instance = kotlin_kotlin.$_$.l2;
|
|
39
|
+
var get_lastIndex = kotlin_kotlin.$_$.f4;
|
|
40
|
+
var dropLast = kotlin_kotlin.$_$.w7;
|
|
41
|
+
var toDouble = kotlin_kotlin.$_$.q8;
|
|
42
|
+
var charSequenceLength = kotlin_kotlin.$_$.a6;
|
|
43
|
+
var coerceIn = kotlin_kotlin.$_$.j7;
|
|
44
|
+
var Enum = kotlin_kotlin.$_$.d9;
|
|
45
|
+
var equals = kotlin_kotlin.$_$.d6;
|
|
48
46
|
var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.v;
|
|
49
|
-
var dropLast_0 = kotlin_kotlin.$_$.
|
|
50
|
-
var joinTo = kotlin_kotlin.$_$.
|
|
51
|
-
var UByte__toString_impl_v72jg = kotlin_kotlin.$_$.
|
|
52
|
-
var numberToInt = kotlin_kotlin.$_$.
|
|
53
|
-
var roundToInt = kotlin_kotlin.$_$.
|
|
47
|
+
var dropLast_0 = kotlin_kotlin.$_$.o3;
|
|
48
|
+
var joinTo = kotlin_kotlin.$_$.d4;
|
|
49
|
+
var UByte__toString_impl_v72jg = kotlin_kotlin.$_$.e2;
|
|
50
|
+
var numberToInt = kotlin_kotlin.$_$.x6;
|
|
51
|
+
var roundToInt = kotlin_kotlin.$_$.d7;
|
|
54
52
|
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.t1;
|
|
55
|
-
var padStart = kotlin_kotlin.$_$.
|
|
56
|
-
var charArrayOf = kotlin_kotlin.$_$.
|
|
57
|
-
var trimEnd = kotlin_kotlin.$_$.
|
|
58
|
-
var isNaN_0 = kotlin_kotlin.$_$.
|
|
59
|
-
var joinTo_0 = kotlin_kotlin.$_$.
|
|
60
|
-
var noWhenBranchMatchedException = kotlin_kotlin.$_$.
|
|
61
|
-
var numberToDouble = kotlin_kotlin.$_$.
|
|
62
|
-
var getStringHashCode = kotlin_kotlin.$_$.
|
|
53
|
+
var padStart = kotlin_kotlin.$_$.f8;
|
|
54
|
+
var charArrayOf = kotlin_kotlin.$_$.y5;
|
|
55
|
+
var trimEnd = kotlin_kotlin.$_$.x8;
|
|
56
|
+
var isNaN_0 = kotlin_kotlin.$_$.v9;
|
|
57
|
+
var joinTo_0 = kotlin_kotlin.$_$.c4;
|
|
58
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.x9;
|
|
59
|
+
var numberToDouble = kotlin_kotlin.$_$.w6;
|
|
60
|
+
var getStringHashCode = kotlin_kotlin.$_$.i6;
|
|
63
61
|
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.h;
|
|
64
|
-
var charSequenceGet = kotlin_kotlin.$_$.
|
|
62
|
+
var charSequenceGet = kotlin_kotlin.$_$.z5;
|
|
65
63
|
var toString_0 = kotlin_kotlin.$_$.x1;
|
|
66
64
|
var arrayConcat = kotlin_kotlin.$_$.a;
|
|
67
|
-
var listOf = kotlin_kotlin.$_$.
|
|
68
|
-
var to = kotlin_kotlin.$_$.
|
|
69
|
-
var mapOf = kotlin_kotlin.$_$.
|
|
70
|
-
var withSign = kotlin_kotlin.$_$.
|
|
71
|
-
var
|
|
72
|
-
var
|
|
73
|
-
var
|
|
74
|
-
var
|
|
75
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
76
|
-
var objectCreate = kotlin_kotlin.$_$.
|
|
77
|
-
var
|
|
78
|
-
var
|
|
79
|
-
var
|
|
80
|
-
var
|
|
81
|
-
var
|
|
82
|
-
var
|
|
83
|
-
var
|
|
84
|
-
var
|
|
85
|
-
var
|
|
86
|
-
var
|
|
87
|
-
var
|
|
65
|
+
var listOf = kotlin_kotlin.$_$.j4;
|
|
66
|
+
var to = kotlin_kotlin.$_$.ca;
|
|
67
|
+
var mapOf = kotlin_kotlin.$_$.l4;
|
|
68
|
+
var withSign = kotlin_kotlin.$_$.e7;
|
|
69
|
+
var trimMargin = kotlin_kotlin.$_$.y8;
|
|
70
|
+
var hashCode = kotlin_kotlin.$_$.j6;
|
|
71
|
+
var coerceAtLeast = kotlin_kotlin.$_$.f7;
|
|
72
|
+
var getNumberHashCode = kotlin_kotlin.$_$.g6;
|
|
73
|
+
var isInterface = kotlin_kotlin.$_$.s6;
|
|
74
|
+
var objectCreate = kotlin_kotlin.$_$.y6;
|
|
75
|
+
var Char = kotlin_kotlin.$_$.a9;
|
|
76
|
+
var toInt = kotlin_kotlin.$_$.u8;
|
|
77
|
+
var numberRangeToNumber = kotlin_kotlin.$_$.t6;
|
|
78
|
+
var slice = kotlin_kotlin.$_$.h8;
|
|
79
|
+
var contentEquals = kotlin_kotlin.$_$.i3;
|
|
80
|
+
var coerceAtLeast_0 = kotlin_kotlin.$_$.h7;
|
|
81
|
+
var _UInt___init__impl__l7qpdl = kotlin_kotlin.$_$.f2;
|
|
82
|
+
var _UInt___get_data__impl__f0vqqw = kotlin_kotlin.$_$.g2;
|
|
83
|
+
var coerceIn_0 = kotlin_kotlin.$_$.k7;
|
|
84
|
+
var _UByte___get_data__impl__jof9qr = kotlin_kotlin.$_$.d2;
|
|
85
|
+
var uintToDouble = kotlin_kotlin.$_$.ea;
|
|
86
|
+
var toByte = kotlin_kotlin.$_$.a7;
|
|
88
87
|
var _UByte___init__impl__g9hnc4 = kotlin_kotlin.$_$.c2;
|
|
88
|
+
var UInt = kotlin_kotlin.$_$.p9;
|
|
89
|
+
var UInt__hashCode_impl_z2mhuw = kotlin_kotlin.$_$.h2;
|
|
89
90
|
//endregion
|
|
90
91
|
//region block: pre-declaration
|
|
91
|
-
|
|
92
|
+
initMetadataForCompanion(Companion);
|
|
92
93
|
function toHSL() {
|
|
93
|
-
return this.
|
|
94
|
+
return this.c1m().d1m();
|
|
94
95
|
}
|
|
95
96
|
function toXYZ() {
|
|
96
|
-
return this.
|
|
97
|
+
return this.c1m().j1m();
|
|
97
98
|
}
|
|
98
99
|
function toLAB() {
|
|
99
|
-
return this.
|
|
100
|
+
return this.j1m().k1m();
|
|
100
101
|
}
|
|
101
102
|
function toLCHab() {
|
|
102
|
-
return this.
|
|
103
|
+
return this.k1m().q1m();
|
|
103
104
|
}
|
|
104
105
|
function toHWB() {
|
|
105
|
-
return this.
|
|
106
|
+
return this.c1m().w1m();
|
|
106
107
|
}
|
|
107
108
|
function toOklab() {
|
|
108
|
-
return this.
|
|
109
|
+
return this.j1m().x1m();
|
|
109
110
|
}
|
|
110
111
|
function toOklch() {
|
|
111
|
-
return this.
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
112
|
+
return this.x1m().y1m();
|
|
113
|
+
}
|
|
114
|
+
initMetadataForInterface(Color, 'Color');
|
|
115
|
+
initMetadataForClass(ColorComponentInfo, 'ColorComponentInfo');
|
|
116
|
+
initMetadataForInterface(WhitePointColorSpace, 'WhitePointColorSpace');
|
|
117
|
+
initMetadataForObject(PATTERNS, 'PATTERNS');
|
|
118
|
+
initMetadataForClass(RenderCondition, 'RenderCondition', VOID, Enum);
|
|
119
|
+
initMetadataForClass(AngleUnit, 'AngleUnit', VOID, Enum);
|
|
120
|
+
initMetadataForClass(WhitePoint, 'WhitePoint');
|
|
121
|
+
initMetadataForObject(Illuminant, 'Illuminant');
|
|
122
|
+
initMetadataForObject(CssColors, 'CssColors');
|
|
123
|
+
initMetadataForClass(Matrix, 'Matrix');
|
|
124
|
+
initMetadataForCompanion(Companion_0);
|
|
125
|
+
initMetadataForClass(HSL, 'HSL', VOID, VOID, [Color]);
|
|
126
|
+
initMetadataForCompanion(Companion_1);
|
|
127
|
+
initMetadataForClass(HWB, 'HWB', VOID, VOID, [Color]);
|
|
128
|
+
initMetadataForClass(ICtCp, 'ICtCp', VOID, VOID, [Color]);
|
|
129
|
+
initMetadataForObject(PqNonlinearity, 'PqNonlinearity');
|
|
128
130
|
function invoke(l, a, b, alpha) {
|
|
129
|
-
return this.
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
131
|
+
return this.e1o(numberToDouble(l), numberToDouble(a), numberToDouble(b), numberToDouble(alpha));
|
|
132
|
+
}
|
|
133
|
+
initMetadataForInterface(LABColorSpace, 'LABColorSpace', VOID, VOID, [WhitePointColorSpace]);
|
|
134
|
+
initMetadataForCompanion(Companion_2, VOID, [LABColorSpace]);
|
|
135
|
+
initMetadataForClass(LAB, 'LAB', VOID, VOID, [Color]);
|
|
136
|
+
initMetadataForObject(LABColorSpaces, 'LABColorSpaces');
|
|
137
|
+
initMetadataForClass(LABColorSpaceImpl, 'LABColorSpaceImpl', VOID, VOID, [LABColorSpace]);
|
|
138
|
+
initMetadataForInterface(LCHabColorSpace, 'LCHabColorSpace', VOID, VOID, [WhitePointColorSpace]);
|
|
139
|
+
initMetadataForCompanion(Companion_3, VOID, [LCHabColorSpace]);
|
|
140
|
+
initMetadataForClass(LCHab, 'LCHab', VOID, VOID, [Color]);
|
|
141
|
+
initMetadataForObject(LCHabColorSpaces, 'LCHabColorSpaces');
|
|
142
|
+
initMetadataForClass(LCHabColorSpaceImpl, 'LCHabColorSpaceImpl', VOID, VOID, [LCHabColorSpace]);
|
|
143
|
+
initMetadataForCompanion(Companion_4);
|
|
144
|
+
initMetadataForClass(Oklab, 'Oklab', VOID, VOID, [Color]);
|
|
145
|
+
initMetadataForCompanion(Companion_5);
|
|
146
|
+
initMetadataForClass(Oklch, 'Oklch', VOID, VOID, [Color]);
|
|
147
|
+
initMetadataForClass(GammaTransferFunctions, 'GammaTransferFunctions');
|
|
148
|
+
initMetadataForObject(LinearTransferFunctions, 'LinearTransferFunctions');
|
|
147
149
|
function invoke_0(r, g, b, alpha) {
|
|
148
|
-
return this.
|
|
150
|
+
return this.e1o(numberToDouble(r), numberToDouble(g), numberToDouble(b), numberToDouble(alpha));
|
|
149
151
|
}
|
|
150
152
|
function from255(r, g, b, alpha) {
|
|
151
|
-
return this.
|
|
153
|
+
return this.e1o(r / 255.0, g / 255.0, b / 255.0, alpha / 255.0);
|
|
152
154
|
}
|
|
153
155
|
function from255$default(r, g, b, alpha, $super) {
|
|
154
156
|
alpha = alpha === VOID ? 255 : alpha;
|
|
155
|
-
return $super === VOID ? this.
|
|
157
|
+
return $super === VOID ? this.i1q(r, g, b, alpha) : from255(r, g, b, alpha);
|
|
156
158
|
}
|
|
157
159
|
function invoke_1(hex) {
|
|
158
160
|
var tmp = parseHex(validateHex(hex), 0);
|
|
@@ -163,38 +165,40 @@
|
|
|
163
165
|
// Inline function 'kotlin.contracts.contract' call
|
|
164
166
|
// Inline function 'com.github.ajalt.colormath.model.RGBColorSpace.invoke.<anonymous>' call
|
|
165
167
|
var it = get_hexLength(hex);
|
|
166
|
-
if (it === 4
|
|
168
|
+
if (it === 4 || it === 8) {
|
|
167
169
|
tmp_2 = parseHex(hex, 3);
|
|
168
170
|
} else {
|
|
169
171
|
tmp_2 = 255;
|
|
170
172
|
}
|
|
171
|
-
return this.
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
173
|
+
return this.i1q(tmp, tmp_0, tmp_1, tmp_2);
|
|
174
|
+
}
|
|
175
|
+
initMetadataForInterface(RGBColorSpace, 'RGBColorSpace', VOID, VOID, [WhitePointColorSpace]);
|
|
176
|
+
initMetadataForCompanion(Companion_6, VOID, [RGBColorSpace]);
|
|
177
|
+
initMetadataForClass(RGB, 'RGB', VOID, VOID, [Color]);
|
|
178
|
+
initMetadataForObject(RGBColorSpaces, 'RGBColorSpaces');
|
|
179
|
+
initMetadataForObject(SRGB, 'SRGB', VOID, VOID, [RGBColorSpace]);
|
|
180
|
+
initMetadataForClass(RGBColorSpaceImpl, 'RGBColorSpaceImpl', VOID, VOID, [RGBColorSpace]);
|
|
181
|
+
initMetadataForObject(SRGBTransferFunctions, 'SRGBTransferFunctions');
|
|
182
|
+
initMetadataForObject(ACESccTransferFunctions, 'ACESccTransferFunctions');
|
|
183
|
+
initMetadataForObject(ACEScctTransferFunctions, 'ACEScctTransferFunctions');
|
|
184
|
+
initMetadataForObject(BT2020TransferFunctions, 'BT2020TransferFunctions');
|
|
185
|
+
initMetadataForObject(BT709TransferFunctions, 'BT709TransferFunctions');
|
|
186
|
+
initMetadataForObject(ROMMTransferFunctions, 'ROMMTransferFunctions');
|
|
187
|
+
initMetadataForCompanion(Companion_7);
|
|
188
|
+
initMetadataForClass(RGBInt, 'RGBInt', VOID, VOID, [Color]);
|
|
185
189
|
function invoke_2(x, y, z, alpha) {
|
|
186
|
-
return this.
|
|
190
|
+
return this.e1o(numberToDouble(x), numberToDouble(y), numberToDouble(z), numberToDouble(alpha));
|
|
187
191
|
}
|
|
188
192
|
function invoke$default(x, y, z, alpha, $super) {
|
|
189
193
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
190
|
-
return $super === VOID ? this.
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
194
|
+
return $super === VOID ? this.d1r(x, y, z, alpha) : invoke_2(x, y, z, alpha);
|
|
195
|
+
}
|
|
196
|
+
initMetadataForInterface(XYZColorSpace, 'XYZColorSpace', VOID, VOID, [WhitePointColorSpace]);
|
|
197
|
+
initMetadataForCompanion(Companion_8, VOID, [XYZColorSpace]);
|
|
198
|
+
initMetadataForClass(XYZ, 'XYZ', VOID, VOID, [Color]);
|
|
199
|
+
initMetadataForObject(XYZColorSpaces, 'XYZColorSpaces');
|
|
200
|
+
initMetadataForClass(XYZColorSpaceImpl, 'XYZColorSpaceImpl', VOID, VOID, [XYZColorSpace]);
|
|
201
|
+
initMetadataForClass(xyY, 'xyY');
|
|
198
202
|
//endregion
|
|
199
203
|
function Companion() {
|
|
200
204
|
}
|
|
@@ -205,16 +209,16 @@
|
|
|
205
209
|
function Color() {
|
|
206
210
|
}
|
|
207
211
|
function convertTo(_this__u8e3s4, space) {
|
|
208
|
-
return space.
|
|
212
|
+
return space.d1n(_this__u8e3s4);
|
|
209
213
|
}
|
|
210
214
|
function ColorComponentInfo(name, isPolar, min, max) {
|
|
211
|
-
this.
|
|
212
|
-
this.
|
|
213
|
-
this.
|
|
214
|
-
this.
|
|
215
|
+
this.e1n_1 = name;
|
|
216
|
+
this.f1n_1 = isPolar;
|
|
217
|
+
this.g1n_1 = min;
|
|
218
|
+
this.h1n_1 = max;
|
|
215
219
|
// Inline function 'kotlin.require' call
|
|
216
220
|
// Inline function 'kotlin.contracts.contract' call
|
|
217
|
-
if (!(this.
|
|
221
|
+
if (!(this.g1n_1 <= this.h1n_1)) {
|
|
218
222
|
// Inline function 'com.github.ajalt.colormath.ColorComponentInfo.<anonymous>' call
|
|
219
223
|
var message = 'min must be less than or equal to max';
|
|
220
224
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
@@ -235,7 +239,7 @@
|
|
|
235
239
|
}
|
|
236
240
|
function parseOrNull(_this__u8e3s4, color_0, customColorSpaces) {
|
|
237
241
|
customColorSpaces = customColorSpaces === VOID ? emptyMap() : customColorSpaces;
|
|
238
|
-
var keywordColor = CssColors_getInstance().
|
|
242
|
+
var keywordColor = CssColors_getInstance().l1n_1.k2(color_0);
|
|
239
243
|
var tmp;
|
|
240
244
|
if (!(keywordColor == null)) {
|
|
241
245
|
tmp = keywordColor;
|
|
@@ -246,7 +250,7 @@
|
|
|
246
250
|
try {
|
|
247
251
|
// Inline function 'kotlin.Companion.success' call
|
|
248
252
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
249
|
-
var value = Companion_getInstance_6().
|
|
253
|
+
var value = Companion_getInstance_6().d1o(color_0);
|
|
250
254
|
tmp_0 = _Result___init__impl__xyqfz8(value);
|
|
251
255
|
} catch ($p) {
|
|
252
256
|
var tmp_1;
|
|
@@ -269,7 +273,7 @@
|
|
|
269
273
|
}
|
|
270
274
|
tmp = tmp_2;
|
|
271
275
|
} else {
|
|
272
|
-
var tmp0_safe_receiver = PATTERNS_getInstance().
|
|
276
|
+
var tmp0_safe_receiver = PATTERNS_getInstance().s1n_1.pc(color_0);
|
|
273
277
|
var tmp_4;
|
|
274
278
|
if (tmp0_safe_receiver == null) {
|
|
275
279
|
tmp_4 = null;
|
|
@@ -279,10 +283,10 @@
|
|
|
279
283
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
280
284
|
tmp_4 = rgb(tmp0_safe_receiver);
|
|
281
285
|
}
|
|
282
|
-
var
|
|
286
|
+
var tmp0_elvis_lhs = tmp_4;
|
|
283
287
|
var tmp_5;
|
|
284
|
-
if (
|
|
285
|
-
var tmp1_safe_receiver = PATTERNS_getInstance().
|
|
288
|
+
if (tmp0_elvis_lhs == null) {
|
|
289
|
+
var tmp1_safe_receiver = PATTERNS_getInstance().t1n_1.pc(color_0);
|
|
286
290
|
var tmp_6;
|
|
287
291
|
if (tmp1_safe_receiver == null) {
|
|
288
292
|
tmp_6 = null;
|
|
@@ -294,143 +298,143 @@
|
|
|
294
298
|
}
|
|
295
299
|
tmp_5 = tmp_6;
|
|
296
300
|
} else {
|
|
297
|
-
tmp_5 =
|
|
301
|
+
tmp_5 = tmp0_elvis_lhs;
|
|
298
302
|
}
|
|
299
|
-
var
|
|
303
|
+
var tmp1_elvis_lhs = tmp_5;
|
|
300
304
|
var tmp_7;
|
|
301
|
-
if (
|
|
302
|
-
var
|
|
305
|
+
if (tmp1_elvis_lhs == null) {
|
|
306
|
+
var tmp2_safe_receiver = PATTERNS_getInstance().u1n_1.pc(color_0);
|
|
303
307
|
var tmp_8;
|
|
304
|
-
if (
|
|
308
|
+
if (tmp2_safe_receiver == null) {
|
|
305
309
|
tmp_8 = null;
|
|
306
310
|
} else {
|
|
307
311
|
// Inline function 'kotlin.let' call
|
|
308
312
|
// Inline function 'kotlin.contracts.contract' call
|
|
309
313
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
310
|
-
tmp_8 = hsl(
|
|
314
|
+
tmp_8 = hsl(tmp2_safe_receiver);
|
|
311
315
|
}
|
|
312
316
|
tmp_7 = tmp_8;
|
|
313
317
|
} else {
|
|
314
|
-
tmp_7 =
|
|
318
|
+
tmp_7 = tmp1_elvis_lhs;
|
|
315
319
|
}
|
|
316
|
-
var
|
|
320
|
+
var tmp2_elvis_lhs = tmp_7;
|
|
317
321
|
var tmp_9;
|
|
318
|
-
if (
|
|
319
|
-
var
|
|
322
|
+
if (tmp2_elvis_lhs == null) {
|
|
323
|
+
var tmp3_safe_receiver = PATTERNS_getInstance().v1n_1.pc(color_0);
|
|
320
324
|
var tmp_10;
|
|
321
|
-
if (
|
|
325
|
+
if (tmp3_safe_receiver == null) {
|
|
322
326
|
tmp_10 = null;
|
|
323
327
|
} else {
|
|
324
328
|
// Inline function 'kotlin.let' call
|
|
325
329
|
// Inline function 'kotlin.contracts.contract' call
|
|
326
330
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
327
|
-
tmp_10 = hsl(
|
|
331
|
+
tmp_10 = hsl(tmp3_safe_receiver);
|
|
328
332
|
}
|
|
329
333
|
tmp_9 = tmp_10;
|
|
330
334
|
} else {
|
|
331
|
-
tmp_9 =
|
|
335
|
+
tmp_9 = tmp2_elvis_lhs;
|
|
332
336
|
}
|
|
333
|
-
var
|
|
337
|
+
var tmp3_elvis_lhs = tmp_9;
|
|
334
338
|
var tmp_11;
|
|
335
|
-
if (
|
|
336
|
-
var
|
|
339
|
+
if (tmp3_elvis_lhs == null) {
|
|
340
|
+
var tmp4_safe_receiver = PATTERNS_getInstance().w1n_1.pc(color_0);
|
|
337
341
|
var tmp_12;
|
|
338
|
-
if (
|
|
342
|
+
if (tmp4_safe_receiver == null) {
|
|
339
343
|
tmp_12 = null;
|
|
340
344
|
} else {
|
|
341
345
|
// Inline function 'kotlin.let' call
|
|
342
346
|
// Inline function 'kotlin.contracts.contract' call
|
|
343
347
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
344
|
-
tmp_12 = lab(
|
|
348
|
+
tmp_12 = lab(tmp4_safe_receiver);
|
|
345
349
|
}
|
|
346
350
|
tmp_11 = tmp_12;
|
|
347
351
|
} else {
|
|
348
|
-
tmp_11 =
|
|
352
|
+
tmp_11 = tmp3_elvis_lhs;
|
|
349
353
|
}
|
|
350
|
-
var
|
|
354
|
+
var tmp4_elvis_lhs = tmp_11;
|
|
351
355
|
var tmp_13;
|
|
352
|
-
if (
|
|
353
|
-
var
|
|
356
|
+
if (tmp4_elvis_lhs == null) {
|
|
357
|
+
var tmp5_safe_receiver = PATTERNS_getInstance().x1n_1.pc(color_0);
|
|
354
358
|
var tmp_14;
|
|
355
|
-
if (
|
|
359
|
+
if (tmp5_safe_receiver == null) {
|
|
356
360
|
tmp_14 = null;
|
|
357
361
|
} else {
|
|
358
362
|
// Inline function 'kotlin.let' call
|
|
359
363
|
// Inline function 'kotlin.contracts.contract' call
|
|
360
364
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
361
|
-
tmp_14 = lch(
|
|
365
|
+
tmp_14 = lch(tmp5_safe_receiver);
|
|
362
366
|
}
|
|
363
367
|
tmp_13 = tmp_14;
|
|
364
368
|
} else {
|
|
365
|
-
tmp_13 =
|
|
369
|
+
tmp_13 = tmp4_elvis_lhs;
|
|
366
370
|
}
|
|
367
|
-
var
|
|
371
|
+
var tmp5_elvis_lhs = tmp_13;
|
|
368
372
|
var tmp_15;
|
|
369
|
-
if (
|
|
370
|
-
var
|
|
373
|
+
if (tmp5_elvis_lhs == null) {
|
|
374
|
+
var tmp6_safe_receiver = PATTERNS_getInstance().y1n_1.pc(color_0);
|
|
371
375
|
var tmp_16;
|
|
372
|
-
if (
|
|
376
|
+
if (tmp6_safe_receiver == null) {
|
|
373
377
|
tmp_16 = null;
|
|
374
378
|
} else {
|
|
375
379
|
// Inline function 'kotlin.let' call
|
|
376
380
|
// Inline function 'kotlin.contracts.contract' call
|
|
377
381
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
378
|
-
tmp_16 = hwb(
|
|
382
|
+
tmp_16 = hwb(tmp6_safe_receiver);
|
|
379
383
|
}
|
|
380
384
|
tmp_15 = tmp_16;
|
|
381
385
|
} else {
|
|
382
|
-
tmp_15 =
|
|
386
|
+
tmp_15 = tmp5_elvis_lhs;
|
|
383
387
|
}
|
|
384
|
-
var
|
|
388
|
+
var tmp6_elvis_lhs = tmp_15;
|
|
385
389
|
var tmp_17;
|
|
386
|
-
if (
|
|
387
|
-
var
|
|
390
|
+
if (tmp6_elvis_lhs == null) {
|
|
391
|
+
var tmp7_safe_receiver = PATTERNS_getInstance().z1n_1.pc(color_0);
|
|
388
392
|
var tmp_18;
|
|
389
|
-
if (
|
|
393
|
+
if (tmp7_safe_receiver == null) {
|
|
390
394
|
tmp_18 = null;
|
|
391
395
|
} else {
|
|
392
396
|
// Inline function 'kotlin.let' call
|
|
393
397
|
// Inline function 'kotlin.contracts.contract' call
|
|
394
398
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
395
|
-
tmp_18 = oklab(
|
|
399
|
+
tmp_18 = oklab(tmp7_safe_receiver);
|
|
396
400
|
}
|
|
397
401
|
tmp_17 = tmp_18;
|
|
398
402
|
} else {
|
|
399
|
-
tmp_17 =
|
|
403
|
+
tmp_17 = tmp6_elvis_lhs;
|
|
400
404
|
}
|
|
401
|
-
var
|
|
405
|
+
var tmp7_elvis_lhs = tmp_17;
|
|
402
406
|
var tmp_19;
|
|
403
|
-
if (
|
|
404
|
-
var
|
|
407
|
+
if (tmp7_elvis_lhs == null) {
|
|
408
|
+
var tmp8_safe_receiver = PATTERNS_getInstance().a1o_1.pc(color_0);
|
|
405
409
|
var tmp_20;
|
|
406
|
-
if (
|
|
410
|
+
if (tmp8_safe_receiver == null) {
|
|
407
411
|
tmp_20 = null;
|
|
408
412
|
} else {
|
|
409
413
|
// Inline function 'kotlin.let' call
|
|
410
414
|
// Inline function 'kotlin.contracts.contract' call
|
|
411
415
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
412
|
-
tmp_20 = oklch(
|
|
416
|
+
tmp_20 = oklch(tmp8_safe_receiver);
|
|
413
417
|
}
|
|
414
418
|
tmp_19 = tmp_20;
|
|
415
419
|
} else {
|
|
416
|
-
tmp_19 =
|
|
420
|
+
tmp_19 = tmp7_elvis_lhs;
|
|
417
421
|
}
|
|
418
|
-
var
|
|
422
|
+
var tmp8_elvis_lhs = tmp_19;
|
|
419
423
|
var tmp_21;
|
|
420
|
-
if (
|
|
421
|
-
var
|
|
424
|
+
if (tmp8_elvis_lhs == null) {
|
|
425
|
+
var tmp9_safe_receiver = PATTERNS_getInstance().b1o_1.pc(color_0);
|
|
422
426
|
var tmp_22;
|
|
423
|
-
if (
|
|
427
|
+
if (tmp9_safe_receiver == null) {
|
|
424
428
|
tmp_22 = null;
|
|
425
429
|
} else {
|
|
426
430
|
// Inline function 'kotlin.let' call
|
|
427
431
|
// Inline function 'kotlin.contracts.contract' call
|
|
428
432
|
// Inline function 'com.github.ajalt.colormath.parseOrNull.<anonymous>' call
|
|
429
|
-
tmp_22 = color(
|
|
433
|
+
tmp_22 = color(tmp9_safe_receiver, customColorSpaces);
|
|
430
434
|
}
|
|
431
435
|
tmp_21 = tmp_22;
|
|
432
436
|
} else {
|
|
433
|
-
tmp_21 =
|
|
437
|
+
tmp_21 = tmp8_elvis_lhs;
|
|
434
438
|
}
|
|
435
439
|
tmp = tmp_21;
|
|
436
440
|
}
|
|
@@ -438,22 +442,22 @@
|
|
|
438
442
|
}
|
|
439
443
|
function PATTERNS() {
|
|
440
444
|
PATTERNS_instance = this;
|
|
441
|
-
this.
|
|
442
|
-
this.
|
|
443
|
-
this.
|
|
444
|
-
this.
|
|
445
|
-
this.
|
|
446
|
-
this.
|
|
447
|
-
this.
|
|
448
|
-
this.
|
|
449
|
-
this.
|
|
450
|
-
this.
|
|
451
|
-
this.
|
|
452
|
-
this.
|
|
453
|
-
this.
|
|
454
|
-
this.
|
|
455
|
-
this.
|
|
456
|
-
this.
|
|
445
|
+
this.m1n_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?';
|
|
446
|
+
this.n1n_1 = '(?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?)';
|
|
447
|
+
this.o1n_1 = '[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?';
|
|
448
|
+
this.p1n_1 = '\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*';
|
|
449
|
+
this.q1n_1 = '\\s*(?:,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*';
|
|
450
|
+
this.r1n_1 = '(?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?)';
|
|
451
|
+
this.s1n_1 = Regex_init_$Create$('rgba?\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
452
|
+
this.t1n_1 = Regex_init_$Create$('rgba?\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*,\\s*((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*,\\s*((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
453
|
+
this.u1n_1 = Regex_init_$Create$('hsla?\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
454
|
+
this.v1n_1 = Regex_init_$Create$('hsla?\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?))\\s*,\\s*((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*,\\s*((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:,\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
455
|
+
this.w1n_1 = Regex_init_$Create$('lab\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
456
|
+
this.x1n_1 = Regex_init_$Create$('lch\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
457
|
+
this.y1n_1 = Regex_init_$Create$('hwb\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
458
|
+
this.z1n_1 = Regex_init_$Create$('oklab\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
459
|
+
this.a1o_1 = Regex_init_$Create$('oklch\\(((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?(?:deg|grad|rad|turn)?))\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
460
|
+
this.b1o_1 = Regex_init_$Create$('color\\(([\\w\\-]+)\\s+((?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?)(?:\\s+(?:none|[+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))*)\\s*(?:/\\s*([+-]?(?:\\d+|\\d*\\.\\d+)(?:[eE][+-]?\\d+)?%?))?\\s*\\)');
|
|
457
461
|
}
|
|
458
462
|
var PATTERNS_instance;
|
|
459
463
|
function PATTERNS_getInstance() {
|
|
@@ -462,98 +466,98 @@
|
|
|
462
466
|
return PATTERNS_instance;
|
|
463
467
|
}
|
|
464
468
|
function rgb(match) {
|
|
465
|
-
var r = percentOrNumber(match.
|
|
466
|
-
var g = percentOrNumber(match.
|
|
467
|
-
var b = percentOrNumber(match.
|
|
468
|
-
var a = alpha(match.
|
|
469
|
+
var r = percentOrNumber(match.nd().o(1), Companion_getInstance_6().j1n().o(0).h1n_1);
|
|
470
|
+
var g = percentOrNumber(match.nd().o(2), Companion_getInstance_6().j1n().o(1).h1n_1);
|
|
471
|
+
var b = percentOrNumber(match.nd().o(3), Companion_getInstance_6().j1n().o(2).h1n_1);
|
|
472
|
+
var a = alpha(match.nd().o(4));
|
|
469
473
|
var tmp;
|
|
470
|
-
if (endsWith(match.
|
|
471
|
-
tmp = Companion_getInstance_6().
|
|
474
|
+
if (endsWith(match.nd().o(1), '%')) {
|
|
475
|
+
tmp = Companion_getInstance_6().e1o(r, g, b, a);
|
|
472
476
|
} else {
|
|
473
|
-
tmp = Companion_getInstance_6().
|
|
477
|
+
tmp = Companion_getInstance_6().e1o(r / 255.0, g / 255.0, b / 255.0, a);
|
|
474
478
|
}
|
|
475
479
|
return tmp;
|
|
476
480
|
}
|
|
477
481
|
function hsl(match) {
|
|
478
|
-
var h = hue(match.
|
|
479
|
-
var s = percentOrNumber(match.
|
|
480
|
-
var l = percentOrNumber(match.
|
|
481
|
-
var a = alpha(match.
|
|
482
|
+
var h = hue(match.nd().o(1));
|
|
483
|
+
var s = percentOrNumber(match.nd().o(2), Companion_getInstance_0().f1o_1.o(1).h1n_1);
|
|
484
|
+
var l = percentOrNumber(match.nd().o(3), Companion_getInstance_0().f1o_1.o(2).h1n_1);
|
|
485
|
+
var a = alpha(match.nd().o(4));
|
|
482
486
|
return new HSL(h, s, l, a);
|
|
483
487
|
}
|
|
484
488
|
function lab(match) {
|
|
485
|
-
var l = percentOrNumber(match.
|
|
486
|
-
var a = percentOrNumber(match.
|
|
487
|
-
var b = percentOrNumber(match.
|
|
488
|
-
var alpha_0 = alpha(match.
|
|
489
|
-
return LABColorSpaces_getInstance().
|
|
489
|
+
var l = percentOrNumber(match.nd().o(1), Companion_getInstance_2().j1n().o(0).h1n_1);
|
|
490
|
+
var a = percentOrNumber(match.nd().o(2), Companion_getInstance_2().j1n().o(1).h1n_1);
|
|
491
|
+
var b = percentOrNumber(match.nd().o(3), Companion_getInstance_2().j1n().o(2).h1n_1);
|
|
492
|
+
var alpha_0 = alpha(match.nd().o(4));
|
|
493
|
+
return LABColorSpaces_getInstance().i1o_1.e1o(l, a, b, alpha_0);
|
|
490
494
|
}
|
|
491
495
|
function lch(match) {
|
|
492
|
-
var l = percentOrNumber(match.
|
|
493
|
-
var c = percentOrNumber(match.
|
|
494
|
-
var h = hue(match.
|
|
495
|
-
var a = alpha(match.
|
|
496
|
-
return LCHabColorSpaces_getInstance().
|
|
496
|
+
var l = percentOrNumber(match.nd().o(1), Companion_getInstance_3().j1n().o(0).h1n_1);
|
|
497
|
+
var c = percentOrNumber(match.nd().o(2), Companion_getInstance_3().j1n().o(1).h1n_1);
|
|
498
|
+
var h = hue(match.nd().o(3));
|
|
499
|
+
var a = alpha(match.nd().o(4));
|
|
500
|
+
return LCHabColorSpaces_getInstance().l1o_1.e1o(l, c, h, a);
|
|
497
501
|
}
|
|
498
502
|
function hwb(match) {
|
|
499
|
-
var h = hue(match.
|
|
500
|
-
var w = percentOrNumber(match.
|
|
501
|
-
var b = percentOrNumber(match.
|
|
502
|
-
var a = alpha(match.
|
|
503
|
+
var h = hue(match.nd().o(1));
|
|
504
|
+
var w = percentOrNumber(match.nd().o(2), Companion_getInstance_1().m1o_1.o(1).h1n_1);
|
|
505
|
+
var b = percentOrNumber(match.nd().o(3), Companion_getInstance_1().m1o_1.o(2).h1n_1);
|
|
506
|
+
var a = alpha(match.nd().o(4));
|
|
503
507
|
return new HWB(h, w, b, a);
|
|
504
508
|
}
|
|
505
509
|
function oklab(match) {
|
|
506
|
-
var l = percentOrNumber(match.
|
|
507
|
-
var a = percentOrNumber(match.
|
|
508
|
-
var b = percentOrNumber(match.
|
|
509
|
-
var alpha_0 = alpha(match.
|
|
510
|
+
var l = percentOrNumber(match.nd().o(1), Companion_getInstance_4().n1o_1.o(0).h1n_1);
|
|
511
|
+
var a = percentOrNumber(match.nd().o(2), Companion_getInstance_4().n1o_1.o(1).h1n_1);
|
|
512
|
+
var b = percentOrNumber(match.nd().o(3), Companion_getInstance_4().n1o_1.o(2).h1n_1);
|
|
513
|
+
var alpha_0 = alpha(match.nd().o(4));
|
|
510
514
|
return new Oklab(l, a, b, alpha_0);
|
|
511
515
|
}
|
|
512
516
|
function oklch(match) {
|
|
513
|
-
var l = percentOrNumber(match.
|
|
514
|
-
var c = percentOrNumber(match.
|
|
515
|
-
var h = hue(match.
|
|
516
|
-
var a = alpha(match.
|
|
517
|
+
var l = percentOrNumber(match.nd().o(1), Companion_getInstance_5().o1o_1.o(0).h1n_1);
|
|
518
|
+
var c = percentOrNumber(match.nd().o(2), Companion_getInstance_5().o1o_1.o(1).h1n_1);
|
|
519
|
+
var h = hue(match.nd().o(3));
|
|
520
|
+
var a = alpha(match.nd().o(4));
|
|
517
521
|
return new Oklch(l, c, h, a);
|
|
518
522
|
}
|
|
519
523
|
function color(match, customColorSpaces) {
|
|
520
|
-
var name = match.
|
|
524
|
+
var name = match.nd().o(1);
|
|
521
525
|
var tmp;
|
|
522
526
|
switch (name) {
|
|
523
527
|
case 'srgb':
|
|
524
528
|
tmp = SRGB_getInstance();
|
|
525
529
|
break;
|
|
526
530
|
case 'srgb-linear':
|
|
527
|
-
tmp = RGBColorSpaces_getInstance().
|
|
531
|
+
tmp = RGBColorSpaces_getInstance().q1o_1;
|
|
528
532
|
break;
|
|
529
533
|
case 'display-p3':
|
|
530
|
-
tmp = RGBColorSpaces_getInstance().
|
|
534
|
+
tmp = RGBColorSpaces_getInstance().z1o_1;
|
|
531
535
|
break;
|
|
532
536
|
case 'a98-rgb':
|
|
533
|
-
tmp = RGBColorSpaces_getInstance().
|
|
537
|
+
tmp = RGBColorSpaces_getInstance().v1o_1;
|
|
534
538
|
break;
|
|
535
539
|
case 'prophoto-rgb':
|
|
536
|
-
tmp = RGBColorSpaces_getInstance().
|
|
540
|
+
tmp = RGBColorSpaces_getInstance().a1p_1;
|
|
537
541
|
break;
|
|
538
542
|
case 'rec2020':
|
|
539
|
-
tmp = RGBColorSpaces_getInstance().
|
|
543
|
+
tmp = RGBColorSpaces_getInstance().w1o_1;
|
|
540
544
|
break;
|
|
541
545
|
case 'xyz':
|
|
542
546
|
case 'xyz-d50':
|
|
543
|
-
tmp = XYZColorSpaces_getInstance().
|
|
547
|
+
tmp = XYZColorSpaces_getInstance().c1p_1;
|
|
544
548
|
break;
|
|
545
549
|
case 'xyz-d65':
|
|
546
|
-
tmp = XYZColorSpaces_getInstance().
|
|
550
|
+
tmp = XYZColorSpaces_getInstance().b1p_1;
|
|
547
551
|
break;
|
|
548
552
|
default:
|
|
549
553
|
var tmp$ret$1;
|
|
550
554
|
$l$block: {
|
|
551
555
|
// Inline function 'kotlin.collections.firstOrNull' call
|
|
552
|
-
var tmp0_iterator = customColorSpaces.
|
|
553
|
-
while (tmp0_iterator.
|
|
554
|
-
var element = tmp0_iterator.
|
|
556
|
+
var tmp0_iterator = customColorSpaces.n2().j();
|
|
557
|
+
while (tmp0_iterator.k()) {
|
|
558
|
+
var element = tmp0_iterator.l();
|
|
555
559
|
// Inline function 'com.github.ajalt.colormath.color.<anonymous>' call
|
|
556
|
-
if (element.
|
|
560
|
+
if (element.g2() === name) {
|
|
557
561
|
tmp$ret$1 = element;
|
|
558
562
|
break $l$block;
|
|
559
563
|
}
|
|
@@ -561,45 +565,46 @@
|
|
|
561
565
|
tmp$ret$1 = null;
|
|
562
566
|
}
|
|
563
567
|
|
|
564
|
-
var
|
|
565
|
-
tmp =
|
|
568
|
+
var tmp10_safe_receiver = tmp$ret$1;
|
|
569
|
+
tmp = tmp10_safe_receiver == null ? null : tmp10_safe_receiver.h2();
|
|
566
570
|
break;
|
|
567
571
|
}
|
|
568
|
-
var
|
|
572
|
+
var tmp0_elvis_lhs = tmp;
|
|
569
573
|
var tmp_0;
|
|
570
|
-
if (
|
|
574
|
+
if (tmp0_elvis_lhs == null) {
|
|
571
575
|
return null;
|
|
572
576
|
} else {
|
|
573
|
-
tmp_0 =
|
|
577
|
+
tmp_0 = tmp0_elvis_lhs;
|
|
574
578
|
}
|
|
575
579
|
var space = tmp_0;
|
|
576
580
|
// Inline function 'kotlin.collections.mapIndexed' call
|
|
577
581
|
// Inline function 'kotlin.text.split' call
|
|
578
|
-
var this_0 = match.
|
|
579
|
-
var this_1 = Regex_init_$Create$('\\s+').
|
|
582
|
+
var this_0 = match.nd().o(2);
|
|
583
|
+
var this_1 = Regex_init_$Create$('\\s+').vc(this_0, 0);
|
|
580
584
|
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
581
585
|
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_1, 10));
|
|
582
586
|
var index = 0;
|
|
583
|
-
var tmp0_iterator_0 = this_1.
|
|
584
|
-
while (tmp0_iterator_0.
|
|
585
|
-
var item = tmp0_iterator_0.
|
|
587
|
+
var tmp0_iterator_0 = this_1.j();
|
|
588
|
+
while (tmp0_iterator_0.k()) {
|
|
589
|
+
var item = tmp0_iterator_0.l();
|
|
586
590
|
// Inline function 'com.github.ajalt.colormath.color.<anonymous>' call
|
|
587
591
|
var tmp1 = index;
|
|
588
592
|
index = tmp1 + 1 | 0;
|
|
589
593
|
var i = checkIndexOverflow(tmp1);
|
|
590
|
-
var tmp$ret$3 = percentOrNumber(item, space.
|
|
591
|
-
destination.
|
|
594
|
+
var tmp$ret$3 = percentOrNumber(item, space.j1n().o(i).h1n_1);
|
|
595
|
+
destination.e(tmp$ret$3);
|
|
592
596
|
}
|
|
593
597
|
var values = destination;
|
|
594
598
|
var tmp_1 = 0;
|
|
595
|
-
var tmp_2 = space.
|
|
599
|
+
var tmp_2 = space.j1n().m();
|
|
596
600
|
var tmp_3 = new Float32Array(tmp_2);
|
|
597
601
|
while (tmp_1 < tmp_2) {
|
|
598
602
|
var tmp_4 = tmp_1;
|
|
599
603
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
604
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
600
605
|
var tmp_5;
|
|
601
|
-
if (
|
|
602
|
-
tmp_5 = values.
|
|
606
|
+
if (0 <= tmp_4 ? tmp_4 < values.m() : false) {
|
|
607
|
+
tmp_5 = values.o(tmp_4);
|
|
603
608
|
} else {
|
|
604
609
|
// Inline function 'com.github.ajalt.colormath.color.<anonymous>' call
|
|
605
610
|
tmp_5 = 0.0;
|
|
@@ -608,8 +613,8 @@
|
|
|
608
613
|
tmp_1 = tmp_1 + 1 | 0;
|
|
609
614
|
}
|
|
610
615
|
var components = tmp_3;
|
|
611
|
-
components[
|
|
612
|
-
return space.
|
|
616
|
+
components[get_lastIndex(components)] = alpha(match.nd().o(3));
|
|
617
|
+
return space.k1n(components);
|
|
613
618
|
}
|
|
614
619
|
function percentOrNumber(str, max) {
|
|
615
620
|
var tmp;
|
|
@@ -736,44 +741,44 @@
|
|
|
736
741
|
var tmp$ret$1;
|
|
737
742
|
$l$block: {
|
|
738
743
|
// Inline function 'kotlin.collections.firstOrNull' call
|
|
739
|
-
var tmp0_iterator = customColorSpaces.
|
|
740
|
-
while (tmp0_iterator.
|
|
741
|
-
var element = tmp0_iterator.
|
|
744
|
+
var tmp0_iterator = customColorSpaces.n2().j();
|
|
745
|
+
while (tmp0_iterator.k()) {
|
|
746
|
+
var element = tmp0_iterator.l();
|
|
742
747
|
// Inline function 'com.github.ajalt.colormath.formatCssStringOrNull.<anonymous>' call
|
|
743
|
-
if (equals(element.
|
|
748
|
+
if (equals(element.h2(), _this__u8e3s4.b1m())) {
|
|
744
749
|
tmp$ret$1 = element;
|
|
745
750
|
break $l$block;
|
|
746
751
|
}
|
|
747
752
|
}
|
|
748
753
|
tmp$ret$1 = null;
|
|
749
754
|
}
|
|
750
|
-
var
|
|
751
|
-
var
|
|
755
|
+
var tmp11_safe_receiver = tmp$ret$1;
|
|
756
|
+
var tmp12_safe_receiver = tmp11_safe_receiver == null ? null : tmp11_safe_receiver.g2();
|
|
752
757
|
var tmp;
|
|
753
|
-
if (
|
|
758
|
+
if (tmp12_safe_receiver == null) {
|
|
754
759
|
tmp = null;
|
|
755
760
|
} else {
|
|
756
761
|
// Inline function 'kotlin.let' call
|
|
757
762
|
// Inline function 'kotlin.contracts.contract' call
|
|
758
763
|
// Inline function 'com.github.ajalt.colormath.formatCssStringOrNull.<anonymous>' call
|
|
759
|
-
tmp = renderFn(_this__u8e3s4,
|
|
764
|
+
tmp = renderFn(_this__u8e3s4, tmp12_safe_receiver, unitsPercent, alphaPercent, renderAlpha);
|
|
760
765
|
}
|
|
761
|
-
var
|
|
766
|
+
var tmp0_elvis_lhs = tmp;
|
|
762
767
|
var tmp_0;
|
|
763
|
-
if (
|
|
768
|
+
if (tmp0_elvis_lhs == null) {
|
|
764
769
|
var tmp_1;
|
|
765
770
|
if (_this__u8e3s4 instanceof RGB) {
|
|
766
|
-
var
|
|
767
|
-
tmp_1 = equals(
|
|
771
|
+
var tmp14_subject = _this__u8e3s4.i1m_1;
|
|
772
|
+
tmp_1 = equals(tmp14_subject, SRGB_getInstance()) ? renderSRGB(_this__u8e3s4, legacyFormat, legacyName, unitsPercent, alphaPercent, renderAlpha) : equals(tmp14_subject, RGBColorSpaces_getInstance().z1o_1) ? renderFn(_this__u8e3s4, 'display-p3', unitsPercent, alphaPercent, renderAlpha) : equals(tmp14_subject, RGBColorSpaces_getInstance().v1o_1) ? renderFn(_this__u8e3s4, 'a98-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp14_subject, RGBColorSpaces_getInstance().a1p_1) ? renderFn(_this__u8e3s4, 'prophoto-rgb', unitsPercent, alphaPercent, renderAlpha) : equals(tmp14_subject, RGBColorSpaces_getInstance().w1o_1) ? renderFn(_this__u8e3s4, 'rec2020', unitsPercent, alphaPercent, renderAlpha) : equals(tmp14_subject, RGBColorSpaces_getInstance().q1o_1) ? renderFn(_this__u8e3s4, 'srgb-linear', unitsPercent, alphaPercent, renderAlpha) : null;
|
|
768
773
|
} else {
|
|
769
774
|
if (_this__u8e3s4 instanceof HSL) {
|
|
770
775
|
tmp_1 = renderHsl(_this__u8e3s4, legacyFormat, legacyName, hueUnit, alphaPercent, renderAlpha);
|
|
771
776
|
} else {
|
|
772
777
|
if (_this__u8e3s4 instanceof LAB) {
|
|
773
|
-
tmp_1 = renderLab(convertTo(_this__u8e3s4, LABColorSpaces_getInstance().
|
|
778
|
+
tmp_1 = renderLab(convertTo(_this__u8e3s4, LABColorSpaces_getInstance().i1o_1), alphaPercent, renderAlpha);
|
|
774
779
|
} else {
|
|
775
780
|
if (_this__u8e3s4 instanceof LCHab) {
|
|
776
|
-
tmp_1 = renderLCH(convertTo(_this__u8e3s4, LCHabColorSpaces_getInstance().
|
|
781
|
+
tmp_1 = renderLCH(convertTo(_this__u8e3s4, LCHabColorSpaces_getInstance().l1o_1), hueUnit, alphaPercent, renderAlpha);
|
|
777
782
|
} else {
|
|
778
783
|
if (_this__u8e3s4 instanceof HWB) {
|
|
779
784
|
tmp_1 = renderHWB(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha);
|
|
@@ -785,7 +790,7 @@
|
|
|
785
790
|
tmp_1 = renderOklch(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha);
|
|
786
791
|
} else {
|
|
787
792
|
if (_this__u8e3s4 instanceof XYZ) {
|
|
788
|
-
tmp_1 = _this__u8e3s4.
|
|
793
|
+
tmp_1 = _this__u8e3s4.p1m_1.i1n().equals(Illuminant_getInstance().j1p_1) ? renderFn(_this__u8e3s4, 'xyz-d65', unitsPercent, alphaPercent, renderAlpha) : renderFn(_this__u8e3s4.d1p(XYZColorSpaces_getInstance().c1p_1), 'xyz', unitsPercent, alphaPercent, renderAlpha);
|
|
789
794
|
} else {
|
|
790
795
|
tmp_1 = null;
|
|
791
796
|
}
|
|
@@ -798,7 +803,7 @@
|
|
|
798
803
|
}
|
|
799
804
|
tmp_0 = tmp_1;
|
|
800
805
|
} else {
|
|
801
|
-
tmp_0 =
|
|
806
|
+
tmp_0 = tmp0_elvis_lhs;
|
|
802
807
|
}
|
|
803
808
|
return tmp_0;
|
|
804
809
|
}
|
|
@@ -809,40 +814,40 @@
|
|
|
809
814
|
var this_0 = StringBuilder_init_$Create$();
|
|
810
815
|
// Inline function 'kotlin.contracts.contract' call
|
|
811
816
|
// Inline function 'com.github.ajalt.colormath.renderFn.<anonymous>' call
|
|
812
|
-
this_0.
|
|
813
|
-
var tmp = dropLast_0(_this__u8e3s4.
|
|
817
|
+
this_0.k8('color(').k8(name).k8(' ');
|
|
818
|
+
var tmp = dropLast_0(_this__u8e3s4.u5(), 1);
|
|
814
819
|
joinTo(tmp, this_0, ' ', VOID, VOID, VOID, VOID, renderFn$lambda(unitsPercent));
|
|
815
|
-
this_0.
|
|
816
|
-
this_0.
|
|
820
|
+
this_0.k8(renderAlpha(_this__u8e3s4, false, renderAlpha_0, alphaPercent));
|
|
821
|
+
this_0.k8(')');
|
|
817
822
|
return this_0.toString();
|
|
818
823
|
}
|
|
819
824
|
function get_dashName(_this__u8e3s4) {
|
|
820
825
|
// Inline function 'kotlin.text.lowercase' call
|
|
821
826
|
// Inline function 'kotlin.text.replace' call
|
|
822
|
-
var this_0 = _this__u8e3s4.
|
|
827
|
+
var this_0 = _this__u8e3s4.b1m().q2();
|
|
823
828
|
// Inline function 'kotlin.js.asDynamic' call
|
|
824
|
-
return '--' + Regex_init_$Create$('\\W').
|
|
829
|
+
return '--' + Regex_init_$Create$('\\W').qc(this_0, '-').toLowerCase();
|
|
825
830
|
}
|
|
826
831
|
function renderSRGB(_this__u8e3s4, commas, namedRgba, rgbPercent, alphaPercent, renderAlpha) {
|
|
827
|
-
return renderColorFn(_this__u8e3s4, namedRgba ? 'rgba' : 'rgb', [rgbPercent ? render(_this__u8e3s4.
|
|
832
|
+
return renderColorFn(_this__u8e3s4, namedRgba ? 'rgba' : 'rgb', [rgbPercent ? render(_this__u8e3s4.e1m_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_r__impl__dulq0e(_this__u8e3s4.m1p())), rgbPercent ? render(_this__u8e3s4.f1m_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_g__impl__o93c71(_this__u8e3s4.m1p())), rgbPercent ? render(_this__u8e3s4.g1m_1, true) : UByte__toString_impl_v72jg(_RGBInt___get_b__impl__m772ua(_this__u8e3s4.m1p()))], alphaPercent, renderAlpha, commas);
|
|
828
833
|
}
|
|
829
834
|
function renderHsl(_this__u8e3s4, commas, namedHsla, hueUnit, alphaPercent, renderAlpha) {
|
|
830
|
-
return renderColorFn(_this__u8e3s4, namedHsla ? 'hsla' : 'hsl', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.
|
|
835
|
+
return renderColorFn(_this__u8e3s4, namedHsla ? 'hsla' : 'hsl', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.o1p_1, true), render(_this__u8e3s4.p1p_1, true)], alphaPercent, renderAlpha, commas);
|
|
831
836
|
}
|
|
832
837
|
function renderLab(_this__u8e3s4, alphaPercent, renderAlpha) {
|
|
833
|
-
return renderColorFn(_this__u8e3s4, 'lab', [render(_this__u8e3s4.
|
|
838
|
+
return renderColorFn(_this__u8e3s4, 'lab', [render(_this__u8e3s4.r1m_1 / 100, true), render(_this__u8e3s4.s1m_1), render(_this__u8e3s4.t1m_1)], alphaPercent, renderAlpha);
|
|
834
839
|
}
|
|
835
840
|
function renderLCH(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
836
|
-
return renderColorFn(_this__u8e3s4, 'lch', [render(_this__u8e3s4.
|
|
841
|
+
return renderColorFn(_this__u8e3s4, 'lch', [render(_this__u8e3s4.r1p_1 / 100, true), render(_this__u8e3s4.s1p_1), renderHue(_this__u8e3s4, hueUnit)], alphaPercent, renderAlpha);
|
|
837
842
|
}
|
|
838
843
|
function renderHWB(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
839
|
-
return renderColorFn(_this__u8e3s4, 'hwb', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.
|
|
844
|
+
return renderColorFn(_this__u8e3s4, 'hwb', [renderHue(_this__u8e3s4, hueUnit), render(_this__u8e3s4.x1p_1, true), render(_this__u8e3s4.y1p_1, true)], alphaPercent, renderAlpha);
|
|
840
845
|
}
|
|
841
846
|
function renderOklab(_this__u8e3s4, alphaPercent, renderAlpha) {
|
|
842
|
-
return renderColorFn(_this__u8e3s4, 'oklab', [render(_this__u8e3s4.
|
|
847
|
+
return renderColorFn(_this__u8e3s4, 'oklab', [render(_this__u8e3s4.z1m_1, true), render(_this__u8e3s4.a1n_1), render(_this__u8e3s4.b1n_1)], alphaPercent, renderAlpha);
|
|
843
848
|
}
|
|
844
849
|
function renderOklch(_this__u8e3s4, hueUnit, alphaPercent, renderAlpha) {
|
|
845
|
-
return renderColorFn(_this__u8e3s4, 'oklch', [render(_this__u8e3s4.
|
|
850
|
+
return renderColorFn(_this__u8e3s4, 'oklch', [render(_this__u8e3s4.a1q_1, true), render(_this__u8e3s4.b1q_1), renderHue(_this__u8e3s4, hueUnit)], alphaPercent, renderAlpha);
|
|
846
851
|
}
|
|
847
852
|
function render(_this__u8e3s4, percent, precision) {
|
|
848
853
|
percent = percent === VOID ? false : percent;
|
|
@@ -858,7 +863,7 @@
|
|
|
858
863
|
// Inline function 'kotlin.math.absoluteValue' call
|
|
859
864
|
var abs = Math.abs(_this__u8e3s4);
|
|
860
865
|
var i = numberToInt(abs);
|
|
861
|
-
var sgn = _this__u8e3s4 < 0
|
|
866
|
+
var sgn = _this__u8e3s4 < 0 ? '-' : '';
|
|
862
867
|
var tmp_0 = abs - i;
|
|
863
868
|
// Inline function 'kotlin.math.pow' call
|
|
864
869
|
var tmp$ret$2 = Math.pow(10.0, precision);
|
|
@@ -869,8 +874,8 @@
|
|
|
869
874
|
}
|
|
870
875
|
function renderAlpha(_this__u8e3s4, commas, renderAlpha, alphaPercent) {
|
|
871
876
|
var tmp;
|
|
872
|
-
if (renderAlpha.equals(RenderCondition_ALWAYS_getInstance())
|
|
873
|
-
tmp = (commas ? ', ' : ' / ') + render(nanToOne(_this__u8e3s4.
|
|
877
|
+
if (renderAlpha.equals(RenderCondition_ALWAYS_getInstance()) || (renderAlpha.equals(RenderCondition_AUTO_getInstance()) && !isNaN_0(_this__u8e3s4.a1m()) && !(_this__u8e3s4.a1m() === 1.0))) {
|
|
878
|
+
tmp = (commas ? ', ' : ' / ') + render(nanToOne(_this__u8e3s4.a1m()), alphaPercent);
|
|
874
879
|
} else {
|
|
875
880
|
tmp = '';
|
|
876
881
|
}
|
|
@@ -885,24 +890,24 @@
|
|
|
885
890
|
// Inline function 'kotlin.contracts.contract' call
|
|
886
891
|
// Inline function 'com.github.ajalt.colormath.renderColorFn.<anonymous>' call
|
|
887
892
|
var sep = commas ? ', ' : ' ';
|
|
888
|
-
this_0.
|
|
893
|
+
this_0.k8(name).k8('(');
|
|
889
894
|
joinTo_0(components, this_0, sep);
|
|
890
|
-
this_0.
|
|
891
|
-
this_0.
|
|
895
|
+
this_0.k8(renderAlpha(_this__u8e3s4, commas, renderAlpha_0, alphaPercent));
|
|
896
|
+
this_0.k8(')');
|
|
892
897
|
return this_0.toString();
|
|
893
898
|
}
|
|
894
899
|
function renderHue(_this__u8e3s4, hueUnit) {
|
|
895
900
|
var tmp;
|
|
896
|
-
if (isNaN_0(_this__u8e3s4.
|
|
901
|
+
if (isNaN_0(_this__u8e3s4.e1q())) {
|
|
897
902
|
tmp = 'none';
|
|
898
903
|
} else {
|
|
899
904
|
var tmp_0;
|
|
900
|
-
switch (hueUnit.
|
|
905
|
+
switch (hueUnit.p2_1) {
|
|
901
906
|
case 0:
|
|
902
|
-
tmp_0 = render(_this__u8e3s4.
|
|
907
|
+
tmp_0 = render(_this__u8e3s4.e1q());
|
|
903
908
|
break;
|
|
904
909
|
case 1:
|
|
905
|
-
tmp_0 = render(_this__u8e3s4.
|
|
910
|
+
tmp_0 = render(_this__u8e3s4.e1q()) + 'deg';
|
|
906
911
|
break;
|
|
907
912
|
case 2:
|
|
908
913
|
tmp_0 = render(hueAsRad(_this__u8e3s4)) + 'rad';
|
|
@@ -939,27 +944,27 @@
|
|
|
939
944
|
return AngleUnit_AUTO_instance;
|
|
940
945
|
}
|
|
941
946
|
function hueOr(_this__u8e3s4, whenNaN) {
|
|
942
|
-
return isNaN_0(_this__u8e3s4.
|
|
947
|
+
return isNaN_0(_this__u8e3s4.e1q()) ? numberToDouble(whenNaN) : _this__u8e3s4.e1q();
|
|
943
948
|
}
|
|
944
949
|
function hueAsRad(_this__u8e3s4) {
|
|
945
|
-
return degToRad(_this__u8e3s4.
|
|
950
|
+
return degToRad(_this__u8e3s4.e1q());
|
|
946
951
|
}
|
|
947
952
|
function hueAsGrad(_this__u8e3s4) {
|
|
948
|
-
return degToGrad(_this__u8e3s4.
|
|
953
|
+
return degToGrad(_this__u8e3s4.e1q());
|
|
949
954
|
}
|
|
950
955
|
function hueAsTurns(_this__u8e3s4) {
|
|
951
|
-
return degToTurns(_this__u8e3s4.
|
|
956
|
+
return degToTurns(_this__u8e3s4.e1q());
|
|
952
957
|
}
|
|
953
958
|
function WhitePoint(name, chromaticity) {
|
|
954
|
-
this.
|
|
955
|
-
this.
|
|
959
|
+
this.f1q_1 = name;
|
|
960
|
+
this.g1q_1 = chromaticity;
|
|
956
961
|
}
|
|
957
962
|
protoOf(WhitePoint).toString = function () {
|
|
958
|
-
return this.
|
|
963
|
+
return this.f1q_1;
|
|
959
964
|
};
|
|
960
965
|
protoOf(WhitePoint).hashCode = function () {
|
|
961
|
-
var result = getStringHashCode(this.
|
|
962
|
-
result = imul(result, 31) + this.
|
|
966
|
+
var result = getStringHashCode(this.f1q_1);
|
|
967
|
+
result = imul(result, 31) + this.g1q_1.hashCode() | 0;
|
|
963
968
|
return result;
|
|
964
969
|
};
|
|
965
970
|
protoOf(WhitePoint).equals = function (other) {
|
|
@@ -968,22 +973,22 @@
|
|
|
968
973
|
if (!(other instanceof WhitePoint))
|
|
969
974
|
return false;
|
|
970
975
|
var tmp0_other_with_cast = other instanceof WhitePoint ? other : THROW_CCE();
|
|
971
|
-
if (!(this.
|
|
976
|
+
if (!(this.f1q_1 === tmp0_other_with_cast.f1q_1))
|
|
972
977
|
return false;
|
|
973
|
-
if (!this.
|
|
978
|
+
if (!this.g1q_1.equals(tmp0_other_with_cast.g1q_1))
|
|
974
979
|
return false;
|
|
975
980
|
return true;
|
|
976
981
|
};
|
|
977
982
|
function Illuminant() {
|
|
978
983
|
Illuminant_instance = this;
|
|
979
|
-
this.
|
|
980
|
-
this.
|
|
981
|
-
this.
|
|
982
|
-
this.
|
|
983
|
-
this.
|
|
984
|
-
this.
|
|
985
|
-
this.
|
|
986
|
-
this.
|
|
984
|
+
this.e1p_1 = new WhitePoint('A', xyY_init_$Create$(0.44758, 0.40745));
|
|
985
|
+
this.f1p_1 = new WhitePoint('B', xyY_init_$Create$(0.34842, 0.35161));
|
|
986
|
+
this.g1p_1 = new WhitePoint('C', xyY_init_$Create$(0.31006, 0.31616));
|
|
987
|
+
this.h1p_1 = new WhitePoint('D50', xyY_init_$Create$(0.3457, 0.3585));
|
|
988
|
+
this.i1p_1 = new WhitePoint('D55', xyY_init_$Create$(0.33243, 0.34744));
|
|
989
|
+
this.j1p_1 = new WhitePoint('D65', xyY_init_$Create$(0.3127, 0.329));
|
|
990
|
+
this.k1p_1 = new WhitePoint('D75', xyY_init_$Create$(0.29903, 0.31488));
|
|
991
|
+
this.l1p_1 = new WhitePoint('E', xyY_init_$Create$(1.0 / 3.0, 1.0 / 3.0));
|
|
987
992
|
}
|
|
988
993
|
var Illuminant_instance;
|
|
989
994
|
function Illuminant_getInstance() {
|
|
@@ -1012,10 +1017,10 @@
|
|
|
1012
1017
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1013
1018
|
// Inline function 'com.github.ajalt.colormath.internal.zeroOneComponentInfo.<anonymous>.<anonymous>' call
|
|
1014
1019
|
var tmp$ret$0 = new ColorComponentInfo(toString_0(item), false, 0.0, 1.0);
|
|
1015
|
-
this_0.
|
|
1020
|
+
this_0.e(tmp$ret$0);
|
|
1016
1021
|
}
|
|
1017
|
-
this_0.
|
|
1018
|
-
return this_0.
|
|
1022
|
+
this_0.e(get_alphaInfo());
|
|
1023
|
+
return this_0.p3();
|
|
1019
1024
|
}
|
|
1020
1025
|
function threeComponentInfo(n1, l1, r1, n2, l2, r2, n3, l3, r3) {
|
|
1021
1026
|
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
@@ -1037,10 +1042,10 @@
|
|
|
1037
1042
|
inductionVariable = inductionVariable + 1 | 0;
|
|
1038
1043
|
// Inline function 'com.github.ajalt.colormath.internal.polarComponentInfo.<anonymous>.<anonymous>' call
|
|
1039
1044
|
var tmp$ret$0 = new ColorComponentInfo(toString_0(item), item === _Char___init__impl__6a9atx(72), item === _Char___init__impl__6a9atx(72) ? 0.0 : l, item === _Char___init__impl__6a9atx(72) ? 360.0 : r);
|
|
1040
|
-
this_0.
|
|
1045
|
+
this_0.e(tmp$ret$0);
|
|
1041
1046
|
}
|
|
1042
|
-
this_0.
|
|
1043
|
-
return this_0.
|
|
1047
|
+
this_0.e(get_alphaInfo());
|
|
1048
|
+
return this_0.p3();
|
|
1044
1049
|
}
|
|
1045
1050
|
function componentInfoList(c) {
|
|
1046
1051
|
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
@@ -1063,29 +1068,17 @@
|
|
|
1063
1068
|
return CAT02_LMS_TO_XYZ;
|
|
1064
1069
|
}
|
|
1065
1070
|
var CAT02_LMS_TO_XYZ;
|
|
1066
|
-
function get_CIE_E() {
|
|
1067
|
-
return CIE_E;
|
|
1068
|
-
}
|
|
1069
|
-
var CIE_E;
|
|
1070
|
-
function get_CIE_K() {
|
|
1071
|
-
return CIE_K;
|
|
1072
|
-
}
|
|
1073
|
-
var CIE_K;
|
|
1074
|
-
function get_CIE_E_times_K() {
|
|
1075
|
-
return CIE_E_times_K;
|
|
1076
|
-
}
|
|
1077
|
-
var CIE_E_times_K;
|
|
1078
1071
|
var properties_initialized_Constants_kt_w4w61t;
|
|
1079
1072
|
function _init_properties_Constants_kt__atb1ur() {
|
|
1080
1073
|
if (!properties_initialized_Constants_kt_w4w61t) {
|
|
1081
1074
|
properties_initialized_Constants_kt_w4w61t = true;
|
|
1082
|
-
CAT02_XYZ_TO_LMS = _Matrix___init__impl__q3kp4w_0(0.7328, 0.4296, -0.1624, -0.7036, 1.6975, 0.0061, 0.003, 0.0136, 0.9834);
|
|
1075
|
+
CAT02_XYZ_TO_LMS = _Matrix___init__impl__q3kp4w_0(+0.7328, +0.4296, -0.1624, -0.7036, +1.6975, +0.0061, +0.003, +0.0136, +0.9834);
|
|
1083
1076
|
CAT02_LMS_TO_XYZ = inverse(get_CAT02_XYZ_TO_LMS());
|
|
1084
1077
|
}
|
|
1085
1078
|
}
|
|
1086
1079
|
function CssColors() {
|
|
1087
1080
|
CssColors_instance = this;
|
|
1088
|
-
this.
|
|
1081
|
+
this.l1n_1 = mapOf([to('black', Companion_getInstance_6().h1q(0, 0, 0)), to('silver', Companion_getInstance_6().h1q(192, 192, 192)), to('gray', Companion_getInstance_6().h1q(128, 128, 128)), to('white', Companion_getInstance_6().h1q(255, 255, 255)), to('maroon', Companion_getInstance_6().h1q(128, 0, 0)), to('red', Companion_getInstance_6().h1q(255, 0, 0)), to('purple', Companion_getInstance_6().h1q(128, 0, 128)), to('fuchsia', Companion_getInstance_6().h1q(255, 0, 255)), to('green', Companion_getInstance_6().h1q(0, 128, 0)), to('lime', Companion_getInstance_6().h1q(0, 255, 0)), to('olive', Companion_getInstance_6().h1q(128, 128, 0)), to('yellow', Companion_getInstance_6().h1q(255, 255, 0)), to('navy', Companion_getInstance_6().h1q(0, 0, 128)), to('blue', Companion_getInstance_6().h1q(0, 0, 255)), to('teal', Companion_getInstance_6().h1q(0, 128, 128)), to('aqua', Companion_getInstance_6().h1q(0, 255, 255)), to('orange', Companion_getInstance_6().h1q(255, 165, 0)), to('aliceblue', Companion_getInstance_6().h1q(240, 248, 255)), to('antiquewhite', Companion_getInstance_6().h1q(250, 235, 215)), to('aquamarine', Companion_getInstance_6().h1q(127, 255, 212)), to('azure', Companion_getInstance_6().h1q(240, 255, 255)), to('beige', Companion_getInstance_6().h1q(245, 245, 220)), to('bisque', Companion_getInstance_6().h1q(255, 228, 196)), to('blanchedalmond', Companion_getInstance_6().h1q(255, 235, 205)), to('blueviolet', Companion_getInstance_6().h1q(138, 43, 226)), to('brown', Companion_getInstance_6().h1q(165, 42, 42)), to('burlywood', Companion_getInstance_6().h1q(222, 184, 135)), to('cadetblue', Companion_getInstance_6().h1q(95, 158, 160)), to('chartreuse', Companion_getInstance_6().h1q(127, 255, 0)), to('chocolate', Companion_getInstance_6().h1q(210, 105, 30)), to('coral', Companion_getInstance_6().h1q(255, 127, 80)), to('cornflowerblue', Companion_getInstance_6().h1q(100, 149, 237)), to('cornsilk', Companion_getInstance_6().h1q(255, 248, 220)), to('crimson', Companion_getInstance_6().h1q(220, 20, 60)), to('cyan', Companion_getInstance_6().h1q(0, 255, 255)), to('darkblue', Companion_getInstance_6().h1q(0, 0, 139)), to('darkcyan', Companion_getInstance_6().h1q(0, 139, 139)), to('darkgoldenrod', Companion_getInstance_6().h1q(184, 134, 11)), to('darkgray', Companion_getInstance_6().h1q(169, 169, 169)), to('darkgreen', Companion_getInstance_6().h1q(0, 100, 0)), to('darkgrey', Companion_getInstance_6().h1q(169, 169, 169)), to('darkkhaki', Companion_getInstance_6().h1q(189, 183, 107)), to('darkmagenta', Companion_getInstance_6().h1q(139, 0, 139)), to('darkolivegreen', Companion_getInstance_6().h1q(85, 107, 47)), to('darkorange', Companion_getInstance_6().h1q(255, 140, 0)), to('darkorchid', Companion_getInstance_6().h1q(153, 50, 204)), to('darkred', Companion_getInstance_6().h1q(139, 0, 0)), to('darksalmon', Companion_getInstance_6().h1q(233, 150, 122)), to('darkseagreen', Companion_getInstance_6().h1q(143, 188, 143)), to('darkslateblue', Companion_getInstance_6().h1q(72, 61, 139)), to('darkslategray', Companion_getInstance_6().h1q(47, 79, 79)), to('darkslategrey', Companion_getInstance_6().h1q(47, 79, 79)), to('darkturquoise', Companion_getInstance_6().h1q(0, 206, 209)), to('darkviolet', Companion_getInstance_6().h1q(148, 0, 211)), to('deeppink', Companion_getInstance_6().h1q(255, 20, 147)), to('deepskyblue', Companion_getInstance_6().h1q(0, 191, 255)), to('dimgray', Companion_getInstance_6().h1q(105, 105, 105)), to('dimgrey', Companion_getInstance_6().h1q(105, 105, 105)), to('dodgerblue', Companion_getInstance_6().h1q(30, 144, 255)), to('firebrick', Companion_getInstance_6().h1q(178, 34, 34)), to('floralwhite', Companion_getInstance_6().h1q(255, 250, 240)), to('forestgreen', Companion_getInstance_6().h1q(34, 139, 34)), to('gainsboro', Companion_getInstance_6().h1q(220, 220, 220)), to('ghostwhite', Companion_getInstance_6().h1q(248, 248, 255)), to('gold', Companion_getInstance_6().h1q(255, 215, 0)), to('goldenrod', Companion_getInstance_6().h1q(218, 165, 32)), to('greenyellow', Companion_getInstance_6().h1q(173, 255, 47)), to('grey', Companion_getInstance_6().h1q(128, 128, 128)), to('honeydew', Companion_getInstance_6().h1q(240, 255, 240)), to('hotpink', Companion_getInstance_6().h1q(255, 105, 180)), to('indianred', Companion_getInstance_6().h1q(205, 92, 92)), to('indigo', Companion_getInstance_6().h1q(75, 0, 130)), to('ivory', Companion_getInstance_6().h1q(255, 255, 240)), to('khaki', Companion_getInstance_6().h1q(240, 230, 140)), to('lavender', Companion_getInstance_6().h1q(230, 230, 250)), to('lavenderblush', Companion_getInstance_6().h1q(255, 240, 245)), to('lawngreen', Companion_getInstance_6().h1q(124, 252, 0)), to('lemonchiffon', Companion_getInstance_6().h1q(255, 250, 205)), to('lightblue', Companion_getInstance_6().h1q(173, 216, 230)), to('lightcoral', Companion_getInstance_6().h1q(240, 128, 128)), to('lightcyan', Companion_getInstance_6().h1q(224, 255, 255)), to('lightgoldenrodyellow', Companion_getInstance_6().h1q(250, 250, 210)), to('lightgray', Companion_getInstance_6().h1q(211, 211, 211)), to('lightgreen', Companion_getInstance_6().h1q(144, 238, 144)), to('lightgrey', Companion_getInstance_6().h1q(211, 211, 211)), to('lightpink', Companion_getInstance_6().h1q(255, 182, 193)), to('lightsalmon', Companion_getInstance_6().h1q(255, 160, 122)), to('lightseagreen', Companion_getInstance_6().h1q(32, 178, 170)), to('lightskyblue', Companion_getInstance_6().h1q(135, 206, 250)), to('lightslategray', Companion_getInstance_6().h1q(119, 136, 153)), to('lightslategrey', Companion_getInstance_6().h1q(119, 136, 153)), to('lightsteelblue', Companion_getInstance_6().h1q(176, 196, 222)), to('lightyellow', Companion_getInstance_6().h1q(255, 255, 224)), to('limegreen', Companion_getInstance_6().h1q(50, 205, 50)), to('linen', Companion_getInstance_6().h1q(250, 240, 230)), to('magenta', Companion_getInstance_6().h1q(255, 0, 255)), to('mediumaquamarine', Companion_getInstance_6().h1q(102, 205, 170)), to('mediumblue', Companion_getInstance_6().h1q(0, 0, 205)), to('mediumorchid', Companion_getInstance_6().h1q(186, 85, 211)), to('mediumpurple', Companion_getInstance_6().h1q(147, 112, 219)), to('mediumseagreen', Companion_getInstance_6().h1q(60, 179, 113)), to('mediumslateblue', Companion_getInstance_6().h1q(123, 104, 238)), to('mediumspringgreen', Companion_getInstance_6().h1q(0, 250, 154)), to('mediumturquoise', Companion_getInstance_6().h1q(72, 209, 204)), to('mediumvioletred', Companion_getInstance_6().h1q(199, 21, 133)), to('midnightblue', Companion_getInstance_6().h1q(25, 25, 112)), to('mintcream', Companion_getInstance_6().h1q(245, 255, 250)), to('mistyrose', Companion_getInstance_6().h1q(255, 228, 225)), to('moccasin', Companion_getInstance_6().h1q(255, 228, 181)), to('navajowhite', Companion_getInstance_6().h1q(255, 222, 173)), to('oldlace', Companion_getInstance_6().h1q(253, 245, 230)), to('olivedrab', Companion_getInstance_6().h1q(107, 142, 35)), to('orangered', Companion_getInstance_6().h1q(255, 69, 0)), to('orchid', Companion_getInstance_6().h1q(218, 112, 214)), to('palegoldenrod', Companion_getInstance_6().h1q(238, 232, 170)), to('palegreen', Companion_getInstance_6().h1q(152, 251, 152)), to('paleturquoise', Companion_getInstance_6().h1q(175, 238, 238)), to('palevioletred', Companion_getInstance_6().h1q(219, 112, 147)), to('papayawhip', Companion_getInstance_6().h1q(255, 239, 213)), to('peachpuff', Companion_getInstance_6().h1q(255, 218, 185)), to('peru', Companion_getInstance_6().h1q(205, 133, 63)), to('pink', Companion_getInstance_6().h1q(255, 192, 203)), to('plum', Companion_getInstance_6().h1q(221, 160, 221)), to('powderblue', Companion_getInstance_6().h1q(176, 224, 230)), to('rosybrown', Companion_getInstance_6().h1q(188, 143, 143)), to('royalblue', Companion_getInstance_6().h1q(65, 105, 225)), to('saddlebrown', Companion_getInstance_6().h1q(139, 69, 19)), to('salmon', Companion_getInstance_6().h1q(250, 128, 114)), to('sandybrown', Companion_getInstance_6().h1q(244, 164, 96)), to('seagreen', Companion_getInstance_6().h1q(46, 139, 87)), to('seashell', Companion_getInstance_6().h1q(255, 245, 238)), to('sienna', Companion_getInstance_6().h1q(160, 82, 45)), to('skyblue', Companion_getInstance_6().h1q(135, 206, 235)), to('slateblue', Companion_getInstance_6().h1q(106, 90, 205)), to('slategray', Companion_getInstance_6().h1q(112, 128, 144)), to('slategrey', Companion_getInstance_6().h1q(112, 128, 144)), to('snow', Companion_getInstance_6().h1q(255, 250, 250)), to('springgreen', Companion_getInstance_6().h1q(0, 255, 127)), to('steelblue', Companion_getInstance_6().h1q(70, 130, 180)), to('tan', Companion_getInstance_6().h1q(210, 180, 140)), to('thistle', Companion_getInstance_6().h1q(216, 191, 216)), to('tomato', Companion_getInstance_6().h1q(255, 99, 71)), to('turquoise', Companion_getInstance_6().h1q(64, 224, 208)), to('violet', Companion_getInstance_6().h1q(238, 130, 238)), to('wheat', Companion_getInstance_6().h1q(245, 222, 179)), to('whitesmoke', Companion_getInstance_6().h1q(245, 245, 245)), to('yellowgreen', Companion_getInstance_6().h1q(154, 205, 50)), to('rebeccapurple', Companion_getInstance_6().h1q(102, 51, 153)), to('transparent', Companion_getInstance_6().i1q(0, 0, 0, 0))]);
|
|
1089
1082
|
}
|
|
1090
1083
|
var CssColors_instance;
|
|
1091
1084
|
function CssColors_getInstance() {
|
|
@@ -1119,10 +1112,10 @@
|
|
|
1119
1112
|
return degToRad_0(_this__u8e3s4);
|
|
1120
1113
|
}
|
|
1121
1114
|
function radToDeg_0(_this__u8e3s4) {
|
|
1122
|
-
return _this__u8e3s4 * 180.0 /
|
|
1115
|
+
return _this__u8e3s4 * 180.0 / 3.141592653589793;
|
|
1123
1116
|
}
|
|
1124
1117
|
function degToRad_0(_this__u8e3s4) {
|
|
1125
|
-
return _this__u8e3s4 *
|
|
1118
|
+
return _this__u8e3s4 * 3.141592653589793 / 180.0;
|
|
1126
1119
|
}
|
|
1127
1120
|
function gradToDeg(_this__u8e3s4) {
|
|
1128
1121
|
return _this__u8e3s4 * 0.9;
|
|
@@ -1162,6 +1155,32 @@
|
|
|
1162
1155
|
function Matrix__set_impl_s2l54c_0($this, x, y, value) {
|
|
1163
1156
|
return Matrix__set_impl_s2l54c($this, x, y, value);
|
|
1164
1157
|
}
|
|
1158
|
+
function Matrix__toString_impl_l0abk0($this) {
|
|
1159
|
+
return trimMargin('Mat3(\n | ' + Matrix__get_impl_xogbpk($this, 0, 0) + ', ' + Matrix__get_impl_xogbpk($this, 1, 0) + ', ' + Matrix__get_impl_xogbpk($this, 2, 0) + ', \n | ' + Matrix__get_impl_xogbpk($this, 0, 1) + ', ' + Matrix__get_impl_xogbpk($this, 1, 1) + ', ' + Matrix__get_impl_xogbpk($this, 2, 1) + ', \n | ' + Matrix__get_impl_xogbpk($this, 0, 2) + ', ' + Matrix__get_impl_xogbpk($this, 1, 2) + ', ' + Matrix__get_impl_xogbpk($this, 2, 2) + ', \n |)\n ');
|
|
1160
|
+
}
|
|
1161
|
+
function Matrix__hashCode_impl_s9ntm9($this) {
|
|
1162
|
+
return hashCode($this);
|
|
1163
|
+
}
|
|
1164
|
+
function Matrix__equals_impl_g5p8p9($this, other) {
|
|
1165
|
+
if (!(other instanceof Matrix))
|
|
1166
|
+
return false;
|
|
1167
|
+
var tmp0_other_with_cast = other instanceof Matrix ? other.j1q_1 : THROW_CCE();
|
|
1168
|
+
if (!equals($this, tmp0_other_with_cast))
|
|
1169
|
+
return false;
|
|
1170
|
+
return true;
|
|
1171
|
+
}
|
|
1172
|
+
function Matrix(rowMajor) {
|
|
1173
|
+
this.j1q_1 = rowMajor;
|
|
1174
|
+
}
|
|
1175
|
+
protoOf(Matrix).toString = function () {
|
|
1176
|
+
return Matrix__toString_impl_l0abk0(this.j1q_1);
|
|
1177
|
+
};
|
|
1178
|
+
protoOf(Matrix).hashCode = function () {
|
|
1179
|
+
return Matrix__hashCode_impl_s9ntm9(this.j1q_1);
|
|
1180
|
+
};
|
|
1181
|
+
protoOf(Matrix).equals = function (other) {
|
|
1182
|
+
return Matrix__equals_impl_g5p8p9(this.j1q_1, other);
|
|
1183
|
+
};
|
|
1165
1184
|
function inverse(_this__u8e3s4, inPlace) {
|
|
1166
1185
|
inPlace = inPlace === VOID ? false : inPlace;
|
|
1167
1186
|
var a = Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 0);
|
|
@@ -1231,28 +1250,31 @@
|
|
|
1231
1250
|
}
|
|
1232
1251
|
function dot_0(_this__u8e3s4, v0, v1, v2) {
|
|
1233
1252
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1234
|
-
|
|
1253
|
+
var p0 = 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;
|
|
1254
|
+
var p1 = 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;
|
|
1255
|
+
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;
|
|
1256
|
+
return _Vector___init__impl__y7x4qq_0(p0, p1, p2);
|
|
1235
1257
|
}
|
|
1236
1258
|
function dot$f($this_dot, $other, x, y) {
|
|
1237
1259
|
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);
|
|
1238
1260
|
}
|
|
1239
1261
|
function Companion_0() {
|
|
1240
1262
|
Companion_instance_1 = this;
|
|
1241
|
-
this.
|
|
1263
|
+
this.f1o_1 = polarComponentInfo('HSL', 0.0, 1.0);
|
|
1242
1264
|
}
|
|
1243
|
-
protoOf(Companion_0).
|
|
1265
|
+
protoOf(Companion_0).q2 = function () {
|
|
1244
1266
|
return 'HSL';
|
|
1245
1267
|
};
|
|
1246
|
-
protoOf(Companion_0).
|
|
1247
|
-
return this.
|
|
1268
|
+
protoOf(Companion_0).j1n = function () {
|
|
1269
|
+
return this.f1o_1;
|
|
1248
1270
|
};
|
|
1249
|
-
protoOf(Companion_0).
|
|
1250
|
-
return color.
|
|
1271
|
+
protoOf(Companion_0).d1n = function (color) {
|
|
1272
|
+
return color.d1m();
|
|
1251
1273
|
};
|
|
1252
|
-
protoOf(Companion_0).
|
|
1274
|
+
protoOf(Companion_0).k1n = function (components) {
|
|
1253
1275
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
1254
1276
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
1255
|
-
var size = this.
|
|
1277
|
+
var size = this.j1n().m();
|
|
1256
1278
|
// Inline function 'kotlin.require' call
|
|
1257
1279
|
var containsLower = size - 1 | 0;
|
|
1258
1280
|
var containsArg = components.length;
|
|
@@ -1263,19 +1285,20 @@
|
|
|
1263
1285
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1264
1286
|
}
|
|
1265
1287
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
1266
|
-
var
|
|
1267
|
-
var
|
|
1268
|
-
var
|
|
1288
|
+
var p0 = components[0];
|
|
1289
|
+
var p1 = components[1];
|
|
1290
|
+
var p2 = components[2];
|
|
1269
1291
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1292
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1293
|
+
var tmp;
|
|
1294
|
+
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
1295
|
+
tmp = components[3];
|
|
1273
1296
|
} else {
|
|
1274
1297
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
1275
|
-
|
|
1298
|
+
tmp = 1.0;
|
|
1276
1299
|
}
|
|
1277
|
-
var
|
|
1278
|
-
return new HSL(
|
|
1300
|
+
var p3 = tmp;
|
|
1301
|
+
return new HSL(p0, p1, p2, p3);
|
|
1279
1302
|
};
|
|
1280
1303
|
var Companion_instance_1;
|
|
1281
1304
|
function Companion_getInstance_0() {
|
|
@@ -1297,53 +1320,53 @@
|
|
|
1297
1320
|
function HSL(h, s, l, alpha) {
|
|
1298
1321
|
Companion_getInstance_0();
|
|
1299
1322
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
1300
|
-
this.
|
|
1301
|
-
this.
|
|
1302
|
-
this.
|
|
1303
|
-
this.
|
|
1323
|
+
this.n1p_1 = h;
|
|
1324
|
+
this.o1p_1 = s;
|
|
1325
|
+
this.p1p_1 = l;
|
|
1326
|
+
this.q1p_1 = alpha;
|
|
1304
1327
|
}
|
|
1305
|
-
protoOf(HSL).
|
|
1306
|
-
return this.
|
|
1328
|
+
protoOf(HSL).e1q = function () {
|
|
1329
|
+
return this.n1p_1;
|
|
1307
1330
|
};
|
|
1308
|
-
protoOf(HSL).
|
|
1309
|
-
return this.
|
|
1331
|
+
protoOf(HSL).a1m = function () {
|
|
1332
|
+
return this.q1p_1;
|
|
1310
1333
|
};
|
|
1311
|
-
protoOf(HSL).
|
|
1334
|
+
protoOf(HSL).b1m = function () {
|
|
1312
1335
|
return Companion_getInstance_0();
|
|
1313
1336
|
};
|
|
1314
|
-
protoOf(HSL).
|
|
1315
|
-
if (this.
|
|
1316
|
-
return Companion_getInstance_6().
|
|
1337
|
+
protoOf(HSL).c1m = function () {
|
|
1338
|
+
if (this.o1p_1 < 1.0E-7)
|
|
1339
|
+
return Companion_getInstance_6().e1o(this.p1p_1, this.p1p_1, this.p1p_1, this.q1p_1);
|
|
1317
1340
|
var h = normalizeDeg_0(hueOr(this, 0)) / 30.0;
|
|
1318
|
-
var s = this.
|
|
1319
|
-
var l = this.
|
|
1320
|
-
return SRGB_getInstance().
|
|
1341
|
+
var s = this.o1p_1;
|
|
1342
|
+
var l = this.p1p_1;
|
|
1343
|
+
return SRGB_getInstance().e1o(toSRGB$f(h, s, l, 0), toSRGB$f(h, s, l, 8), toSRGB$f(h, s, l, 4), this.q1p_1);
|
|
1321
1344
|
};
|
|
1322
|
-
protoOf(HSL).
|
|
1345
|
+
protoOf(HSL).d1m = function () {
|
|
1323
1346
|
return this;
|
|
1324
1347
|
};
|
|
1325
|
-
protoOf(HSL).
|
|
1348
|
+
protoOf(HSL).u5 = function () {
|
|
1326
1349
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1327
|
-
return new Float32Array([this.
|
|
1350
|
+
return new Float32Array([this.n1p_1, this.o1p_1, this.p1p_1, this.q1p_1]);
|
|
1328
1351
|
};
|
|
1329
|
-
protoOf(HSL).
|
|
1352
|
+
protoOf(HSL).l1q = function (h, s, l, alpha) {
|
|
1330
1353
|
return new HSL(h, s, l, alpha);
|
|
1331
1354
|
};
|
|
1332
|
-
protoOf(HSL).
|
|
1333
|
-
h = h === VOID ? this.
|
|
1334
|
-
s = s === VOID ? this.
|
|
1335
|
-
l = l === VOID ? this.
|
|
1336
|
-
alpha = alpha === VOID ? this.
|
|
1337
|
-
return $super === VOID ? this.
|
|
1355
|
+
protoOf(HSL).m1q = function (h, s, l, alpha, $super) {
|
|
1356
|
+
h = h === VOID ? this.n1p_1 : h;
|
|
1357
|
+
s = s === VOID ? this.o1p_1 : s;
|
|
1358
|
+
l = l === VOID ? this.p1p_1 : l;
|
|
1359
|
+
alpha = alpha === VOID ? this.q1p_1 : alpha;
|
|
1360
|
+
return $super === VOID ? this.l1q(h, s, l, alpha) : $super.l1q.call(this, h, s, l, alpha);
|
|
1338
1361
|
};
|
|
1339
1362
|
protoOf(HSL).toString = function () {
|
|
1340
|
-
return 'HSL(h=' + this.
|
|
1363
|
+
return 'HSL(h=' + this.n1p_1 + ', s=' + this.o1p_1 + ', l=' + this.p1p_1 + ', alpha=' + this.q1p_1 + ')';
|
|
1341
1364
|
};
|
|
1342
1365
|
protoOf(HSL).hashCode = function () {
|
|
1343
|
-
var result = getNumberHashCode(this.
|
|
1344
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1345
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1346
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1366
|
+
var result = getNumberHashCode(this.n1p_1);
|
|
1367
|
+
result = imul(result, 31) + getNumberHashCode(this.o1p_1) | 0;
|
|
1368
|
+
result = imul(result, 31) + getNumberHashCode(this.p1p_1) | 0;
|
|
1369
|
+
result = imul(result, 31) + getNumberHashCode(this.q1p_1) | 0;
|
|
1347
1370
|
return result;
|
|
1348
1371
|
};
|
|
1349
1372
|
protoOf(HSL).equals = function (other) {
|
|
@@ -1352,33 +1375,33 @@
|
|
|
1352
1375
|
if (!(other instanceof HSL))
|
|
1353
1376
|
return false;
|
|
1354
1377
|
var tmp0_other_with_cast = other instanceof HSL ? other : THROW_CCE();
|
|
1355
|
-
if (!equals(this.
|
|
1378
|
+
if (!equals(this.n1p_1, tmp0_other_with_cast.n1p_1))
|
|
1356
1379
|
return false;
|
|
1357
|
-
if (!equals(this.
|
|
1380
|
+
if (!equals(this.o1p_1, tmp0_other_with_cast.o1p_1))
|
|
1358
1381
|
return false;
|
|
1359
|
-
if (!equals(this.
|
|
1382
|
+
if (!equals(this.p1p_1, tmp0_other_with_cast.p1p_1))
|
|
1360
1383
|
return false;
|
|
1361
|
-
if (!equals(this.
|
|
1384
|
+
if (!equals(this.q1p_1, tmp0_other_with_cast.q1p_1))
|
|
1362
1385
|
return false;
|
|
1363
1386
|
return true;
|
|
1364
1387
|
};
|
|
1365
1388
|
function Companion_1() {
|
|
1366
1389
|
Companion_instance_2 = this;
|
|
1367
|
-
this.
|
|
1390
|
+
this.m1o_1 = polarComponentInfo('HWB', 0.0, 1.0);
|
|
1368
1391
|
}
|
|
1369
|
-
protoOf(Companion_1).
|
|
1392
|
+
protoOf(Companion_1).q2 = function () {
|
|
1370
1393
|
return 'HWB';
|
|
1371
1394
|
};
|
|
1372
|
-
protoOf(Companion_1).
|
|
1373
|
-
return this.
|
|
1395
|
+
protoOf(Companion_1).j1n = function () {
|
|
1396
|
+
return this.m1o_1;
|
|
1374
1397
|
};
|
|
1375
|
-
protoOf(Companion_1).
|
|
1376
|
-
return color.
|
|
1398
|
+
protoOf(Companion_1).d1n = function (color) {
|
|
1399
|
+
return color.w1m();
|
|
1377
1400
|
};
|
|
1378
|
-
protoOf(Companion_1).
|
|
1401
|
+
protoOf(Companion_1).k1n = function (components) {
|
|
1379
1402
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
1380
1403
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
1381
|
-
var size = this.
|
|
1404
|
+
var size = this.j1n().m();
|
|
1382
1405
|
// Inline function 'kotlin.require' call
|
|
1383
1406
|
var containsLower = size - 1 | 0;
|
|
1384
1407
|
var containsArg = components.length;
|
|
@@ -1389,19 +1412,20 @@
|
|
|
1389
1412
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1390
1413
|
}
|
|
1391
1414
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
1392
|
-
var
|
|
1393
|
-
var
|
|
1394
|
-
var
|
|
1415
|
+
var p0 = components[0];
|
|
1416
|
+
var p1 = components[1];
|
|
1417
|
+
var p2 = components[2];
|
|
1395
1418
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1419
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1420
|
+
var tmp;
|
|
1421
|
+
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
1422
|
+
tmp = components[3];
|
|
1399
1423
|
} else {
|
|
1400
1424
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
1401
|
-
|
|
1425
|
+
tmp = 1.0;
|
|
1402
1426
|
}
|
|
1403
|
-
var
|
|
1404
|
-
return new HWB(
|
|
1427
|
+
var p3 = tmp;
|
|
1428
|
+
return new HWB(p0, p1, p2, p3);
|
|
1405
1429
|
};
|
|
1406
1430
|
var Companion_instance_2;
|
|
1407
1431
|
function Companion_getInstance_1() {
|
|
@@ -1412,28 +1436,28 @@
|
|
|
1412
1436
|
function HWB(h, w, b, alpha) {
|
|
1413
1437
|
Companion_getInstance_1();
|
|
1414
1438
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
1415
|
-
this.
|
|
1416
|
-
this.
|
|
1417
|
-
this.
|
|
1418
|
-
this.
|
|
1439
|
+
this.w1p_1 = h;
|
|
1440
|
+
this.x1p_1 = w;
|
|
1441
|
+
this.y1p_1 = b;
|
|
1442
|
+
this.z1p_1 = alpha;
|
|
1419
1443
|
}
|
|
1420
|
-
protoOf(HWB).
|
|
1421
|
-
return this.
|
|
1444
|
+
protoOf(HWB).e1q = function () {
|
|
1445
|
+
return this.w1p_1;
|
|
1422
1446
|
};
|
|
1423
|
-
protoOf(HWB).
|
|
1424
|
-
return this.
|
|
1447
|
+
protoOf(HWB).a1m = function () {
|
|
1448
|
+
return this.z1p_1;
|
|
1425
1449
|
};
|
|
1426
|
-
protoOf(HWB).
|
|
1450
|
+
protoOf(HWB).b1m = function () {
|
|
1427
1451
|
return Companion_getInstance_1();
|
|
1428
1452
|
};
|
|
1429
|
-
protoOf(HWB).
|
|
1430
|
-
var h = this.
|
|
1431
|
-
var w = this.
|
|
1432
|
-
var b = this.
|
|
1433
|
-
var a = this.
|
|
1434
|
-
if (w + b >= 1
|
|
1453
|
+
protoOf(HWB).c1m = function () {
|
|
1454
|
+
var h = this.w1p_1 / 60.0;
|
|
1455
|
+
var w = this.x1p_1;
|
|
1456
|
+
var b = this.y1p_1;
|
|
1457
|
+
var a = this.z1p_1;
|
|
1458
|
+
if (w + b >= 1) {
|
|
1435
1459
|
var gray = w / (w + b);
|
|
1436
|
-
return Companion_getInstance_6().
|
|
1460
|
+
return Companion_getInstance_6().e1o(gray, gray, gray, a);
|
|
1437
1461
|
}
|
|
1438
1462
|
var v = 1 - b;
|
|
1439
1463
|
var i = numberToInt(h);
|
|
@@ -1441,34 +1465,34 @@
|
|
|
1441
1465
|
var n = w + f * (v - w);
|
|
1442
1466
|
switch (i) {
|
|
1443
1467
|
case 1:
|
|
1444
|
-
return Companion_getInstance_6().
|
|
1468
|
+
return Companion_getInstance_6().e1o(n, v, w, a);
|
|
1445
1469
|
case 2:
|
|
1446
|
-
return Companion_getInstance_6().
|
|
1470
|
+
return Companion_getInstance_6().e1o(w, v, n, a);
|
|
1447
1471
|
case 3:
|
|
1448
|
-
return Companion_getInstance_6().
|
|
1472
|
+
return Companion_getInstance_6().e1o(w, n, v, a);
|
|
1449
1473
|
case 4:
|
|
1450
|
-
return Companion_getInstance_6().
|
|
1474
|
+
return Companion_getInstance_6().e1o(n, w, v, a);
|
|
1451
1475
|
case 5:
|
|
1452
|
-
return Companion_getInstance_6().
|
|
1476
|
+
return Companion_getInstance_6().e1o(v, w, n, a);
|
|
1453
1477
|
default:
|
|
1454
|
-
return Companion_getInstance_6().
|
|
1478
|
+
return Companion_getInstance_6().e1o(v, n, w, a);
|
|
1455
1479
|
}
|
|
1456
1480
|
};
|
|
1457
|
-
protoOf(HWB).
|
|
1481
|
+
protoOf(HWB).w1m = function () {
|
|
1458
1482
|
return this;
|
|
1459
1483
|
};
|
|
1460
|
-
protoOf(HWB).
|
|
1484
|
+
protoOf(HWB).u5 = function () {
|
|
1461
1485
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1462
|
-
return new Float32Array([this.
|
|
1486
|
+
return new Float32Array([this.w1p_1, this.x1p_1, this.y1p_1, this.z1p_1]);
|
|
1463
1487
|
};
|
|
1464
1488
|
protoOf(HWB).toString = function () {
|
|
1465
|
-
return 'HWB(h=' + this.
|
|
1489
|
+
return 'HWB(h=' + this.w1p_1 + ', w=' + this.x1p_1 + ', b=' + this.y1p_1 + ', alpha=' + this.z1p_1 + ')';
|
|
1466
1490
|
};
|
|
1467
1491
|
protoOf(HWB).hashCode = function () {
|
|
1468
|
-
var result = getNumberHashCode(this.
|
|
1469
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1470
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1471
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1492
|
+
var result = getNumberHashCode(this.w1p_1);
|
|
1493
|
+
result = imul(result, 31) + getNumberHashCode(this.x1p_1) | 0;
|
|
1494
|
+
result = imul(result, 31) + getNumberHashCode(this.y1p_1) | 0;
|
|
1495
|
+
result = imul(result, 31) + getNumberHashCode(this.z1p_1) | 0;
|
|
1472
1496
|
return result;
|
|
1473
1497
|
};
|
|
1474
1498
|
protoOf(HWB).equals = function (other) {
|
|
@@ -1477,13 +1501,13 @@
|
|
|
1477
1501
|
if (!(other instanceof HWB))
|
|
1478
1502
|
return false;
|
|
1479
1503
|
var tmp0_other_with_cast = other instanceof HWB ? other : THROW_CCE();
|
|
1480
|
-
if (!equals(this.
|
|
1504
|
+
if (!equals(this.w1p_1, tmp0_other_with_cast.w1p_1))
|
|
1481
1505
|
return false;
|
|
1482
|
-
if (!equals(this.
|
|
1506
|
+
if (!equals(this.x1p_1, tmp0_other_with_cast.x1p_1))
|
|
1483
1507
|
return false;
|
|
1484
|
-
if (!equals(this.
|
|
1508
|
+
if (!equals(this.y1p_1, tmp0_other_with_cast.y1p_1))
|
|
1485
1509
|
return false;
|
|
1486
|
-
if (!equals(this.
|
|
1510
|
+
if (!equals(this.z1p_1, tmp0_other_with_cast.z1p_1))
|
|
1487
1511
|
return false;
|
|
1488
1512
|
return true;
|
|
1489
1513
|
};
|
|
@@ -1525,45 +1549,45 @@
|
|
|
1525
1549
|
var ICTCP_LMS_TO_XYZ;
|
|
1526
1550
|
function ICtCp() {
|
|
1527
1551
|
}
|
|
1528
|
-
protoOf(ICtCp).
|
|
1529
|
-
var fo = RGBColorSpaces_getInstance().
|
|
1552
|
+
protoOf(ICtCp).r1q = function () {
|
|
1553
|
+
var fo = RGBColorSpaces_getInstance().w1o_1.s1q();
|
|
1530
1554
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1531
1555
|
var this_0 = get_ICTCP_ICTCP_to_LMS();
|
|
1532
|
-
var v0 = this.
|
|
1533
|
-
var v1 = this.
|
|
1534
|
-
var v2 = this.
|
|
1556
|
+
var v0 = this.n1q_1;
|
|
1557
|
+
var v1 = this.o1q_1;
|
|
1558
|
+
var v2 = this.p1q_1;
|
|
1535
1559
|
// Inline function 'com.github.ajalt.colormath.model.ICtCp.toBT2020.<anonymous>' call
|
|
1536
1560
|
var l = Matrix__get_impl_xogbpk(this_0, 0, 0) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 0) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 0) * v2;
|
|
1537
1561
|
var m = Matrix__get_impl_xogbpk(this_0, 0, 1) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 1) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 1) * v2;
|
|
1538
1562
|
var s = Matrix__get_impl_xogbpk(this_0, 0, 2) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 2) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 2) * v2;
|
|
1539
1563
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1540
1564
|
var this_1 = get_ICTCP_LMS_to_RGB();
|
|
1541
|
-
var v0_0 = PqNonlinearity_instance.
|
|
1542
|
-
var v1_0 = PqNonlinearity_instance.
|
|
1543
|
-
var v2_0 = PqNonlinearity_instance.
|
|
1565
|
+
var v0_0 = PqNonlinearity_instance.b1r(l);
|
|
1566
|
+
var v1_0 = PqNonlinearity_instance.b1r(m);
|
|
1567
|
+
var v2_0 = PqNonlinearity_instance.b1r(s);
|
|
1544
1568
|
// Inline function 'com.github.ajalt.colormath.model.ICtCp.toBT2020.<anonymous>.<anonymous>' call
|
|
1545
1569
|
var r = Matrix__get_impl_xogbpk(this_1, 0, 0) * v0_0 + Matrix__get_impl_xogbpk(this_1, 1, 0) * v1_0 + Matrix__get_impl_xogbpk(this_1, 2, 0) * v2_0;
|
|
1546
1570
|
var g = Matrix__get_impl_xogbpk(this_1, 0, 1) * v0_0 + Matrix__get_impl_xogbpk(this_1, 1, 1) * v1_0 + Matrix__get_impl_xogbpk(this_1, 2, 1) * v2_0;
|
|
1547
1571
|
var b = Matrix__get_impl_xogbpk(this_1, 0, 2) * v0_0 + Matrix__get_impl_xogbpk(this_1, 1, 2) * v1_0 + Matrix__get_impl_xogbpk(this_1, 2, 2) * v2_0;
|
|
1548
|
-
return RGBColorSpaces_getInstance().
|
|
1572
|
+
return RGBColorSpaces_getInstance().w1o_1.e1o(fo.c1r(r), fo.c1r(g), fo.c1r(b), this.q1q_1);
|
|
1549
1573
|
};
|
|
1550
1574
|
function PqNonlinearity() {
|
|
1551
|
-
this.
|
|
1552
|
-
this.
|
|
1553
|
-
this.
|
|
1554
|
-
this.
|
|
1555
|
-
this.
|
|
1556
|
-
this.
|
|
1557
|
-
this.
|
|
1558
|
-
this.
|
|
1559
|
-
}
|
|
1560
|
-
protoOf(PqNonlinearity).
|
|
1575
|
+
this.t1q_1 = 0.1593017578125;
|
|
1576
|
+
this.u1q_1 = 78.84375;
|
|
1577
|
+
this.v1q_1 = 0.8359375;
|
|
1578
|
+
this.w1q_1 = 18.8515625;
|
|
1579
|
+
this.x1q_1 = 18.6875;
|
|
1580
|
+
this.y1q_1 = 10000.0;
|
|
1581
|
+
this.z1q_1 = 6.277394636015326;
|
|
1582
|
+
this.a1r_1 = 0.012683313515655966;
|
|
1583
|
+
}
|
|
1584
|
+
protoOf(PqNonlinearity).b1r = function (x) {
|
|
1561
1585
|
var vp = spow(x, 0.012683313515655966);
|
|
1562
1586
|
var n = coerceAtLeast(vp - 0.8359375, 0.0);
|
|
1563
1587
|
var l = spow_0(n / (18.8515625 - 18.6875 * vp), 6.277394636015326);
|
|
1564
1588
|
return 10000.0 * l;
|
|
1565
1589
|
};
|
|
1566
|
-
protoOf(PqNonlinearity).
|
|
1590
|
+
protoOf(PqNonlinearity).c1r = function (x) {
|
|
1567
1591
|
var yp = spow_0(x / 10000.0, 0.1593017578125);
|
|
1568
1592
|
return spow_0((0.8359375 + 18.8515625 * yp) / (1.0 + 18.6875 * yp), 78.84375);
|
|
1569
1593
|
};
|
|
@@ -1587,34 +1611,34 @@
|
|
|
1587
1611
|
}
|
|
1588
1612
|
function Companion_2() {
|
|
1589
1613
|
Companion_instance_3 = this;
|
|
1590
|
-
this.
|
|
1614
|
+
this.g1o_1 = LABColorSpaces_getInstance().h1o_1;
|
|
1591
1615
|
}
|
|
1592
|
-
protoOf(Companion_2).
|
|
1593
|
-
return this.
|
|
1616
|
+
protoOf(Companion_2).e1o = function (l, a, b, alpha) {
|
|
1617
|
+
return this.g1o_1.e1o(l, a, b, alpha);
|
|
1594
1618
|
};
|
|
1595
|
-
protoOf(Companion_2).
|
|
1596
|
-
return this.
|
|
1619
|
+
protoOf(Companion_2).d1r = function (l, a, b, alpha) {
|
|
1620
|
+
return this.g1o_1.d1r(l, a, b, alpha);
|
|
1597
1621
|
};
|
|
1598
|
-
protoOf(Companion_2).
|
|
1599
|
-
return this.
|
|
1622
|
+
protoOf(Companion_2).d1n = function (color) {
|
|
1623
|
+
return this.g1o_1.d1n(color);
|
|
1600
1624
|
};
|
|
1601
|
-
protoOf(Companion_2).
|
|
1602
|
-
return this.
|
|
1625
|
+
protoOf(Companion_2).k1n = function (components) {
|
|
1626
|
+
return this.g1o_1.k1n(components);
|
|
1603
1627
|
};
|
|
1604
|
-
protoOf(Companion_2).
|
|
1605
|
-
return this.
|
|
1628
|
+
protoOf(Companion_2).i1n = function () {
|
|
1629
|
+
return this.g1o_1.i1n();
|
|
1606
1630
|
};
|
|
1607
|
-
protoOf(Companion_2).
|
|
1608
|
-
return this.
|
|
1631
|
+
protoOf(Companion_2).q2 = function () {
|
|
1632
|
+
return this.g1o_1.q2();
|
|
1609
1633
|
};
|
|
1610
|
-
protoOf(Companion_2).
|
|
1611
|
-
return this.
|
|
1634
|
+
protoOf(Companion_2).j1n = function () {
|
|
1635
|
+
return this.g1o_1.j1n();
|
|
1612
1636
|
};
|
|
1613
1637
|
protoOf(Companion_2).equals = function (other) {
|
|
1614
|
-
return equals(LABColorSpaces_getInstance().
|
|
1638
|
+
return equals(LABColorSpaces_getInstance().h1o_1, other);
|
|
1615
1639
|
};
|
|
1616
1640
|
protoOf(Companion_2).hashCode = function () {
|
|
1617
|
-
return hashCode(LABColorSpaces_getInstance().
|
|
1641
|
+
return hashCode(LABColorSpaces_getInstance().h1o_1);
|
|
1618
1642
|
};
|
|
1619
1643
|
var Companion_instance_3;
|
|
1620
1644
|
function Companion_getInstance_2() {
|
|
@@ -1624,34 +1648,34 @@
|
|
|
1624
1648
|
}
|
|
1625
1649
|
function LAB(l, a, b, alpha, space) {
|
|
1626
1650
|
Companion_getInstance_2();
|
|
1627
|
-
this.
|
|
1628
|
-
this.
|
|
1629
|
-
this.
|
|
1630
|
-
this.
|
|
1631
|
-
this.
|
|
1632
|
-
}
|
|
1633
|
-
protoOf(LAB).
|
|
1634
|
-
return this.
|
|
1635
|
-
};
|
|
1636
|
-
protoOf(LAB).
|
|
1637
|
-
return this.
|
|
1638
|
-
};
|
|
1639
|
-
protoOf(LAB).
|
|
1640
|
-
return this.
|
|
1641
|
-
};
|
|
1642
|
-
protoOf(LAB).
|
|
1643
|
-
var xyzSpace = XYZColorSpace_0(this.
|
|
1644
|
-
if (this.
|
|
1645
|
-
return xyzSpace.
|
|
1646
|
-
var fy = (this.
|
|
1647
|
-
var fz = fy - this.
|
|
1648
|
-
var fx = this.
|
|
1651
|
+
this.r1m_1 = l;
|
|
1652
|
+
this.s1m_1 = a;
|
|
1653
|
+
this.t1m_1 = b;
|
|
1654
|
+
this.u1m_1 = alpha;
|
|
1655
|
+
this.v1m_1 = space;
|
|
1656
|
+
}
|
|
1657
|
+
protoOf(LAB).a1m = function () {
|
|
1658
|
+
return this.u1m_1;
|
|
1659
|
+
};
|
|
1660
|
+
protoOf(LAB).b1m = function () {
|
|
1661
|
+
return this.v1m_1;
|
|
1662
|
+
};
|
|
1663
|
+
protoOf(LAB).c1m = function () {
|
|
1664
|
+
return this.r1m_1 === 0.0 ? Companion_getInstance_6().e1o(0.0, 0.0, 0.0, this.u1m_1) : this.j1m().c1m();
|
|
1665
|
+
};
|
|
1666
|
+
protoOf(LAB).j1m = function () {
|
|
1667
|
+
var xyzSpace = XYZColorSpace_0(this.v1m_1.i1n());
|
|
1668
|
+
if (this.r1m_1 === 0.0)
|
|
1669
|
+
return xyzSpace.e1r(0.0, 0.0, 0.0);
|
|
1670
|
+
var fy = (this.r1m_1 + 16) / 116.0;
|
|
1671
|
+
var fz = fy - this.t1m_1 / 200.0;
|
|
1672
|
+
var fx = this.s1m_1 / 500.0 + fy;
|
|
1649
1673
|
var tmp;
|
|
1650
|
-
if (this.
|
|
1674
|
+
if (this.r1m_1 > 8.0) {
|
|
1651
1675
|
// Inline function 'kotlin.math.pow' call
|
|
1652
1676
|
tmp = Math.pow(fy, 3);
|
|
1653
1677
|
} else {
|
|
1654
|
-
tmp = this.
|
|
1678
|
+
tmp = this.r1m_1 / 903.2962962962963;
|
|
1655
1679
|
}
|
|
1656
1680
|
var yr = tmp;
|
|
1657
1681
|
// Inline function 'kotlin.let' call
|
|
@@ -1659,25 +1683,25 @@
|
|
|
1659
1683
|
// Inline function 'kotlin.contracts.contract' call
|
|
1660
1684
|
// Inline function 'com.github.ajalt.colormath.model.LAB.toXYZ.<anonymous>' call
|
|
1661
1685
|
var it = Math.pow(fz, 3);
|
|
1662
|
-
var zr = it >
|
|
1686
|
+
var zr = it > 0.008856451679035631 ? it : (116 * fz - 16) / 903.2962962962963;
|
|
1663
1687
|
// Inline function 'kotlin.let' call
|
|
1664
1688
|
// Inline function 'kotlin.math.pow' call
|
|
1665
1689
|
// Inline function 'kotlin.contracts.contract' call
|
|
1666
1690
|
// Inline function 'com.github.ajalt.colormath.model.LAB.toXYZ.<anonymous>' call
|
|
1667
1691
|
var it_0 = Math.pow(fx, 3);
|
|
1668
|
-
var xr = it_0 >
|
|
1669
|
-
var wp = this.
|
|
1670
|
-
return xyzSpace.
|
|
1692
|
+
var xr = it_0 > 0.008856451679035631 ? it_0 : (116 * fx - 16) / 903.2962962962963;
|
|
1693
|
+
var wp = this.v1m_1.i1n().g1q_1;
|
|
1694
|
+
return xyzSpace.d1r(xr * wp.i1r(), yr * wp.h1r_1, zr * wp.j1r(), this.u1m_1);
|
|
1671
1695
|
};
|
|
1672
|
-
protoOf(LAB).
|
|
1696
|
+
protoOf(LAB).q1m = function () {
|
|
1673
1697
|
// Inline function 'com.github.ajalt.colormath.internal.toPolarModel' call
|
|
1674
|
-
var a = this.
|
|
1675
|
-
var b = this.
|
|
1698
|
+
var a = this.s1m_1;
|
|
1699
|
+
var b = this.t1m_1;
|
|
1676
1700
|
// Inline function 'kotlin.math.sqrt' call
|
|
1677
1701
|
var x = a * a + b * b;
|
|
1678
1702
|
var c = Math.sqrt(x);
|
|
1679
1703
|
var tmp;
|
|
1680
|
-
if (c > -1.0E-7
|
|
1704
|
+
if (c > -1.0E-7 && c < 1.0E-7) {
|
|
1681
1705
|
tmp = NaN;
|
|
1682
1706
|
} else {
|
|
1683
1707
|
// Inline function 'kotlin.math.atan2' call
|
|
@@ -1687,24 +1711,24 @@
|
|
|
1687
1711
|
var h = tmp;
|
|
1688
1712
|
// Inline function 'com.github.ajalt.colormath.model.LAB.toLCHab.<anonymous>' call
|
|
1689
1713
|
var h_0 = normalizeDeg_0(h);
|
|
1690
|
-
return LCHabColorSpace_0(this.
|
|
1714
|
+
return LCHabColorSpace_0(this.v1m_1.i1n()).e1o(this.r1m_1, c, h_0, this.u1m_1);
|
|
1691
1715
|
};
|
|
1692
|
-
protoOf(LAB).
|
|
1716
|
+
protoOf(LAB).k1m = function () {
|
|
1693
1717
|
return this;
|
|
1694
1718
|
};
|
|
1695
|
-
protoOf(LAB).
|
|
1719
|
+
protoOf(LAB).u5 = function () {
|
|
1696
1720
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1697
|
-
return new Float32Array([this.
|
|
1721
|
+
return new Float32Array([this.r1m_1, this.s1m_1, this.t1m_1, this.u1m_1]);
|
|
1698
1722
|
};
|
|
1699
1723
|
protoOf(LAB).toString = function () {
|
|
1700
|
-
return 'LAB(l=' + this.
|
|
1724
|
+
return 'LAB(l=' + this.r1m_1 + ', a=' + this.s1m_1 + ', b=' + this.t1m_1 + ', alpha=' + this.u1m_1 + ', space=' + toString(this.v1m_1) + ')';
|
|
1701
1725
|
};
|
|
1702
1726
|
protoOf(LAB).hashCode = function () {
|
|
1703
|
-
var result = getNumberHashCode(this.
|
|
1704
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1705
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1706
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1707
|
-
result = imul(result, 31) + hashCode(this.
|
|
1727
|
+
var result = getNumberHashCode(this.r1m_1);
|
|
1728
|
+
result = imul(result, 31) + getNumberHashCode(this.s1m_1) | 0;
|
|
1729
|
+
result = imul(result, 31) + getNumberHashCode(this.t1m_1) | 0;
|
|
1730
|
+
result = imul(result, 31) + getNumberHashCode(this.u1m_1) | 0;
|
|
1731
|
+
result = imul(result, 31) + hashCode(this.v1m_1) | 0;
|
|
1708
1732
|
return result;
|
|
1709
1733
|
};
|
|
1710
1734
|
protoOf(LAB).equals = function (other) {
|
|
@@ -1713,27 +1737,27 @@
|
|
|
1713
1737
|
if (!(other instanceof LAB))
|
|
1714
1738
|
return false;
|
|
1715
1739
|
var tmp0_other_with_cast = other instanceof LAB ? other : THROW_CCE();
|
|
1716
|
-
if (!equals(this.
|
|
1740
|
+
if (!equals(this.r1m_1, tmp0_other_with_cast.r1m_1))
|
|
1717
1741
|
return false;
|
|
1718
|
-
if (!equals(this.
|
|
1742
|
+
if (!equals(this.s1m_1, tmp0_other_with_cast.s1m_1))
|
|
1719
1743
|
return false;
|
|
1720
|
-
if (!equals(this.
|
|
1744
|
+
if (!equals(this.t1m_1, tmp0_other_with_cast.t1m_1))
|
|
1721
1745
|
return false;
|
|
1722
|
-
if (!equals(this.
|
|
1746
|
+
if (!equals(this.u1m_1, tmp0_other_with_cast.u1m_1))
|
|
1723
1747
|
return false;
|
|
1724
|
-
if (!equals(this.
|
|
1748
|
+
if (!equals(this.v1m_1, tmp0_other_with_cast.v1m_1))
|
|
1725
1749
|
return false;
|
|
1726
1750
|
return true;
|
|
1727
1751
|
};
|
|
1728
1752
|
function LABColorSpace() {
|
|
1729
1753
|
}
|
|
1730
1754
|
function LABColorSpace_0(whitePoint) {
|
|
1731
|
-
return whitePoint.equals(Illuminant_getInstance().
|
|
1755
|
+
return whitePoint.equals(Illuminant_getInstance().j1p_1) ? LABColorSpaces_getInstance().h1o_1 : whitePoint.equals(Illuminant_getInstance().h1p_1) ? LABColorSpaces_getInstance().i1o_1 : new LABColorSpaceImpl(whitePoint);
|
|
1732
1756
|
}
|
|
1733
1757
|
function LABColorSpaces() {
|
|
1734
1758
|
LABColorSpaces_instance = this;
|
|
1735
|
-
this.
|
|
1736
|
-
this.
|
|
1759
|
+
this.h1o_1 = new LABColorSpaceImpl(Illuminant_getInstance().j1p_1);
|
|
1760
|
+
this.i1o_1 = new LABColorSpaceImpl(Illuminant_getInstance().h1p_1);
|
|
1737
1761
|
}
|
|
1738
1762
|
var LABColorSpaces_instance;
|
|
1739
1763
|
function LABColorSpaces_getInstance() {
|
|
@@ -1742,37 +1766,37 @@
|
|
|
1742
1766
|
return LABColorSpaces_instance;
|
|
1743
1767
|
}
|
|
1744
1768
|
function LABColorSpaceImpl(whitePoint) {
|
|
1745
|
-
this.
|
|
1746
|
-
this.
|
|
1769
|
+
this.k1r_1 = whitePoint;
|
|
1770
|
+
this.l1r_1 = threeComponentInfo('L', 0.0, 100.0, 'A', -128.0, 128.0, 'B', -128.0, 128.0);
|
|
1747
1771
|
}
|
|
1748
|
-
protoOf(LABColorSpaceImpl).
|
|
1749
|
-
return this.
|
|
1772
|
+
protoOf(LABColorSpaceImpl).i1n = function () {
|
|
1773
|
+
return this.k1r_1;
|
|
1750
1774
|
};
|
|
1751
|
-
protoOf(LABColorSpaceImpl).
|
|
1775
|
+
protoOf(LABColorSpaceImpl).q2 = function () {
|
|
1752
1776
|
return 'LAB';
|
|
1753
1777
|
};
|
|
1754
|
-
protoOf(LABColorSpaceImpl).
|
|
1755
|
-
return this.
|
|
1778
|
+
protoOf(LABColorSpaceImpl).j1n = function () {
|
|
1779
|
+
return this.l1r_1;
|
|
1756
1780
|
};
|
|
1757
|
-
protoOf(LABColorSpaceImpl).
|
|
1781
|
+
protoOf(LABColorSpaceImpl).d1n = function (color) {
|
|
1758
1782
|
// Inline function 'com.github.ajalt.colormath.internal.adaptToThis' call
|
|
1759
1783
|
var tmp;
|
|
1760
|
-
var tmp_0 = color.
|
|
1761
|
-
var
|
|
1762
|
-
var
|
|
1763
|
-
if ((
|
|
1784
|
+
var tmp_0 = color.b1m();
|
|
1785
|
+
var tmp17_safe_receiver = isInterface(tmp_0, WhitePointColorSpace) ? tmp_0 : null;
|
|
1786
|
+
var tmp0_elvis_lhs = tmp17_safe_receiver == null ? null : tmp17_safe_receiver.i1n();
|
|
1787
|
+
if ((tmp0_elvis_lhs == null ? Illuminant_getInstance().j1p_1 : tmp0_elvis_lhs).equals(this.i1n())) {
|
|
1764
1788
|
// Inline function 'com.github.ajalt.colormath.model.LABColorSpaceImpl.convert.<anonymous>' call
|
|
1765
|
-
tmp = color.
|
|
1789
|
+
tmp = color.k1m();
|
|
1766
1790
|
} else {
|
|
1767
1791
|
// Inline function 'com.github.ajalt.colormath.model.LABColorSpaceImpl.convert.<anonymous>' call
|
|
1768
|
-
tmp = color.
|
|
1792
|
+
tmp = color.j1m().d1p(XYZColorSpace_0(this.i1n())).k1m();
|
|
1769
1793
|
}
|
|
1770
1794
|
return tmp;
|
|
1771
1795
|
};
|
|
1772
|
-
protoOf(LABColorSpaceImpl).
|
|
1796
|
+
protoOf(LABColorSpaceImpl).k1n = function (components) {
|
|
1773
1797
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
1774
1798
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
1775
|
-
var size = this.
|
|
1799
|
+
var size = this.j1n().m();
|
|
1776
1800
|
// Inline function 'kotlin.require' call
|
|
1777
1801
|
var containsLower = size - 1 | 0;
|
|
1778
1802
|
var containsArg = components.length;
|
|
@@ -1783,33 +1807,34 @@
|
|
|
1783
1807
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1784
1808
|
}
|
|
1785
1809
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
1786
|
-
var
|
|
1787
|
-
var
|
|
1788
|
-
var
|
|
1810
|
+
var p0 = components[0];
|
|
1811
|
+
var p1 = components[1];
|
|
1812
|
+
var p2 = components[2];
|
|
1789
1813
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1814
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
1815
|
+
var tmp;
|
|
1816
|
+
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
1817
|
+
tmp = components[3];
|
|
1793
1818
|
} else {
|
|
1794
1819
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
1795
|
-
|
|
1820
|
+
tmp = 1.0;
|
|
1796
1821
|
}
|
|
1797
|
-
var
|
|
1798
|
-
return this.
|
|
1822
|
+
var p3 = tmp;
|
|
1823
|
+
return this.e1o(p0, p1, p2, p3);
|
|
1799
1824
|
};
|
|
1800
1825
|
protoOf(LABColorSpaceImpl).toString = function () {
|
|
1801
|
-
return 'LABColorSpace(' + this.
|
|
1826
|
+
return 'LABColorSpace(' + this.k1r_1.toString() + ')';
|
|
1802
1827
|
};
|
|
1803
|
-
protoOf(LABColorSpaceImpl).
|
|
1828
|
+
protoOf(LABColorSpaceImpl).e1o = function (l, a, b, alpha) {
|
|
1804
1829
|
return new LAB(l, a, b, alpha, this);
|
|
1805
1830
|
};
|
|
1806
1831
|
protoOf(LABColorSpaceImpl).hashCode = function () {
|
|
1807
|
-
return this.
|
|
1832
|
+
return this.k1r_1.hashCode();
|
|
1808
1833
|
};
|
|
1809
1834
|
protoOf(LABColorSpaceImpl).equals = function (other) {
|
|
1810
1835
|
var tmp;
|
|
1811
1836
|
if (!(other == null) ? isInterface(other, LABColorSpace) : false) {
|
|
1812
|
-
tmp = this.
|
|
1837
|
+
tmp = this.k1r_1.equals(other.i1n());
|
|
1813
1838
|
} else {
|
|
1814
1839
|
tmp = false;
|
|
1815
1840
|
}
|
|
@@ -1817,31 +1842,31 @@
|
|
|
1817
1842
|
};
|
|
1818
1843
|
function Companion_3() {
|
|
1819
1844
|
Companion_instance_4 = this;
|
|
1820
|
-
this.
|
|
1845
|
+
this.j1o_1 = LCHabColorSpaces_getInstance().k1o_1;
|
|
1821
1846
|
}
|
|
1822
|
-
protoOf(Companion_3).
|
|
1823
|
-
return this.
|
|
1847
|
+
protoOf(Companion_3).e1o = function (l, c, h, alpha) {
|
|
1848
|
+
return this.j1o_1.e1o(l, c, h, alpha);
|
|
1824
1849
|
};
|
|
1825
|
-
protoOf(Companion_3).
|
|
1826
|
-
return this.
|
|
1850
|
+
protoOf(Companion_3).d1n = function (color) {
|
|
1851
|
+
return this.j1o_1.d1n(color);
|
|
1827
1852
|
};
|
|
1828
|
-
protoOf(Companion_3).
|
|
1829
|
-
return this.
|
|
1853
|
+
protoOf(Companion_3).k1n = function (components) {
|
|
1854
|
+
return this.j1o_1.k1n(components);
|
|
1830
1855
|
};
|
|
1831
|
-
protoOf(Companion_3).
|
|
1832
|
-
return this.
|
|
1856
|
+
protoOf(Companion_3).i1n = function () {
|
|
1857
|
+
return this.j1o_1.i1n();
|
|
1833
1858
|
};
|
|
1834
|
-
protoOf(Companion_3).
|
|
1835
|
-
return this.
|
|
1859
|
+
protoOf(Companion_3).q2 = function () {
|
|
1860
|
+
return this.j1o_1.q2();
|
|
1836
1861
|
};
|
|
1837
|
-
protoOf(Companion_3).
|
|
1838
|
-
return this.
|
|
1862
|
+
protoOf(Companion_3).j1n = function () {
|
|
1863
|
+
return this.j1o_1.j1n();
|
|
1839
1864
|
};
|
|
1840
1865
|
protoOf(Companion_3).equals = function (other) {
|
|
1841
|
-
return equals(LCHabColorSpaces_getInstance().
|
|
1866
|
+
return equals(LCHabColorSpaces_getInstance().k1o_1, other);
|
|
1842
1867
|
};
|
|
1843
1868
|
protoOf(Companion_3).hashCode = function () {
|
|
1844
|
-
return hashCode(LCHabColorSpaces_getInstance().
|
|
1869
|
+
return hashCode(LCHabColorSpaces_getInstance().k1o_1);
|
|
1845
1870
|
};
|
|
1846
1871
|
var Companion_instance_4;
|
|
1847
1872
|
function Companion_getInstance_3() {
|
|
@@ -1851,55 +1876,55 @@
|
|
|
1851
1876
|
}
|
|
1852
1877
|
function LCHab(l, c, h, alpha, space) {
|
|
1853
1878
|
Companion_getInstance_3();
|
|
1854
|
-
this.
|
|
1855
|
-
this.
|
|
1856
|
-
this.
|
|
1857
|
-
this.
|
|
1858
|
-
this.
|
|
1879
|
+
this.r1p_1 = l;
|
|
1880
|
+
this.s1p_1 = c;
|
|
1881
|
+
this.t1p_1 = h;
|
|
1882
|
+
this.u1p_1 = alpha;
|
|
1883
|
+
this.v1p_1 = space;
|
|
1859
1884
|
}
|
|
1860
|
-
protoOf(LCHab).
|
|
1861
|
-
return this.
|
|
1885
|
+
protoOf(LCHab).e1q = function () {
|
|
1886
|
+
return this.t1p_1;
|
|
1862
1887
|
};
|
|
1863
|
-
protoOf(LCHab).
|
|
1864
|
-
return this.
|
|
1888
|
+
protoOf(LCHab).a1m = function () {
|
|
1889
|
+
return this.u1p_1;
|
|
1865
1890
|
};
|
|
1866
|
-
protoOf(LCHab).
|
|
1867
|
-
return this.
|
|
1891
|
+
protoOf(LCHab).b1m = function () {
|
|
1892
|
+
return this.v1p_1;
|
|
1868
1893
|
};
|
|
1869
|
-
protoOf(LCHab).
|
|
1870
|
-
return this.
|
|
1894
|
+
protoOf(LCHab).c1m = function () {
|
|
1895
|
+
return this.k1m().c1m();
|
|
1871
1896
|
};
|
|
1872
|
-
protoOf(LCHab).
|
|
1873
|
-
return this.
|
|
1897
|
+
protoOf(LCHab).j1m = function () {
|
|
1898
|
+
return this.k1m().j1m();
|
|
1874
1899
|
};
|
|
1875
|
-
protoOf(LCHab).
|
|
1900
|
+
protoOf(LCHab).k1m = function () {
|
|
1876
1901
|
// Inline function 'com.github.ajalt.colormath.internal.fromPolarModel' call
|
|
1877
|
-
var c = this.
|
|
1878
|
-
var h = this.
|
|
1902
|
+
var c = this.s1p_1;
|
|
1903
|
+
var h = this.t1p_1;
|
|
1879
1904
|
var hDegrees = isNaN_0(h) ? 0.0 : degToRad(h);
|
|
1880
1905
|
// Inline function 'kotlin.math.cos' call
|
|
1881
1906
|
var a = c * Math.cos(hDegrees);
|
|
1882
1907
|
// Inline function 'kotlin.math.sin' call
|
|
1883
1908
|
var b = c * Math.sin(hDegrees);
|
|
1884
1909
|
// Inline function 'com.github.ajalt.colormath.model.LCHab.toLAB.<anonymous>' call
|
|
1885
|
-
return LABColorSpace_0(this.
|
|
1910
|
+
return LABColorSpace_0(this.v1p_1.i1n()).e1o(this.r1p_1, a, b, this.u1p_1);
|
|
1886
1911
|
};
|
|
1887
|
-
protoOf(LCHab).
|
|
1912
|
+
protoOf(LCHab).q1m = function () {
|
|
1888
1913
|
return this;
|
|
1889
1914
|
};
|
|
1890
|
-
protoOf(LCHab).
|
|
1915
|
+
protoOf(LCHab).u5 = function () {
|
|
1891
1916
|
// Inline function 'kotlin.floatArrayOf' call
|
|
1892
|
-
return new Float32Array([this.
|
|
1917
|
+
return new Float32Array([this.r1p_1, this.s1p_1, this.t1p_1, this.u1p_1]);
|
|
1893
1918
|
};
|
|
1894
1919
|
protoOf(LCHab).toString = function () {
|
|
1895
|
-
return 'LCHab(l=' + this.
|
|
1920
|
+
return 'LCHab(l=' + this.r1p_1 + ', c=' + this.s1p_1 + ', h=' + this.t1p_1 + ', alpha=' + this.u1p_1 + ', space=' + toString(this.v1p_1) + ')';
|
|
1896
1921
|
};
|
|
1897
1922
|
protoOf(LCHab).hashCode = function () {
|
|
1898
|
-
var result = getNumberHashCode(this.
|
|
1899
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1900
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1901
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1902
|
-
result = imul(result, 31) + hashCode(this.
|
|
1923
|
+
var result = getNumberHashCode(this.r1p_1);
|
|
1924
|
+
result = imul(result, 31) + getNumberHashCode(this.s1p_1) | 0;
|
|
1925
|
+
result = imul(result, 31) + getNumberHashCode(this.t1p_1) | 0;
|
|
1926
|
+
result = imul(result, 31) + getNumberHashCode(this.u1p_1) | 0;
|
|
1927
|
+
result = imul(result, 31) + hashCode(this.v1p_1) | 0;
|
|
1903
1928
|
return result;
|
|
1904
1929
|
};
|
|
1905
1930
|
protoOf(LCHab).equals = function (other) {
|
|
@@ -1908,27 +1933,27 @@
|
|
|
1908
1933
|
if (!(other instanceof LCHab))
|
|
1909
1934
|
return false;
|
|
1910
1935
|
var tmp0_other_with_cast = other instanceof LCHab ? other : THROW_CCE();
|
|
1911
|
-
if (!equals(this.
|
|
1936
|
+
if (!equals(this.r1p_1, tmp0_other_with_cast.r1p_1))
|
|
1912
1937
|
return false;
|
|
1913
|
-
if (!equals(this.
|
|
1938
|
+
if (!equals(this.s1p_1, tmp0_other_with_cast.s1p_1))
|
|
1914
1939
|
return false;
|
|
1915
|
-
if (!equals(this.
|
|
1940
|
+
if (!equals(this.t1p_1, tmp0_other_with_cast.t1p_1))
|
|
1916
1941
|
return false;
|
|
1917
|
-
if (!equals(this.
|
|
1942
|
+
if (!equals(this.u1p_1, tmp0_other_with_cast.u1p_1))
|
|
1918
1943
|
return false;
|
|
1919
|
-
if (!equals(this.
|
|
1944
|
+
if (!equals(this.v1p_1, tmp0_other_with_cast.v1p_1))
|
|
1920
1945
|
return false;
|
|
1921
1946
|
return true;
|
|
1922
1947
|
};
|
|
1923
1948
|
function LCHabColorSpace() {
|
|
1924
1949
|
}
|
|
1925
1950
|
function LCHabColorSpace_0(whitePoint) {
|
|
1926
|
-
return whitePoint.equals(Illuminant_getInstance().
|
|
1951
|
+
return whitePoint.equals(Illuminant_getInstance().j1p_1) ? LCHabColorSpaces_getInstance().k1o_1 : whitePoint.equals(Illuminant_getInstance().h1p_1) ? LCHabColorSpaces_getInstance().l1o_1 : new LCHabColorSpaceImpl(whitePoint);
|
|
1927
1952
|
}
|
|
1928
1953
|
function LCHabColorSpaces() {
|
|
1929
1954
|
LCHabColorSpaces_instance = this;
|
|
1930
|
-
this.
|
|
1931
|
-
this.
|
|
1955
|
+
this.k1o_1 = new LCHabColorSpaceImpl(Illuminant_getInstance().j1p_1);
|
|
1956
|
+
this.l1o_1 = new LCHabColorSpaceImpl(Illuminant_getInstance().h1p_1);
|
|
1932
1957
|
}
|
|
1933
1958
|
var LCHabColorSpaces_instance;
|
|
1934
1959
|
function LCHabColorSpaces_getInstance() {
|
|
@@ -1937,37 +1962,37 @@
|
|
|
1937
1962
|
return LCHabColorSpaces_instance;
|
|
1938
1963
|
}
|
|
1939
1964
|
function LCHabColorSpaceImpl(whitePoint) {
|
|
1940
|
-
this.
|
|
1941
|
-
this.
|
|
1965
|
+
this.m1r_1 = whitePoint;
|
|
1966
|
+
this.n1r_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)]);
|
|
1942
1967
|
}
|
|
1943
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1944
|
-
return this.
|
|
1968
|
+
protoOf(LCHabColorSpaceImpl).i1n = function () {
|
|
1969
|
+
return this.m1r_1;
|
|
1945
1970
|
};
|
|
1946
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1971
|
+
protoOf(LCHabColorSpaceImpl).q2 = function () {
|
|
1947
1972
|
return 'LCHab';
|
|
1948
1973
|
};
|
|
1949
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1950
|
-
return this.
|
|
1974
|
+
protoOf(LCHabColorSpaceImpl).j1n = function () {
|
|
1975
|
+
return this.n1r_1;
|
|
1951
1976
|
};
|
|
1952
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1977
|
+
protoOf(LCHabColorSpaceImpl).d1n = function (color) {
|
|
1953
1978
|
// Inline function 'com.github.ajalt.colormath.internal.adaptToThis' call
|
|
1954
1979
|
var tmp;
|
|
1955
|
-
var tmp_0 = color.
|
|
1956
|
-
var
|
|
1957
|
-
var
|
|
1958
|
-
if ((
|
|
1980
|
+
var tmp_0 = color.b1m();
|
|
1981
|
+
var tmp17_safe_receiver = isInterface(tmp_0, WhitePointColorSpace) ? tmp_0 : null;
|
|
1982
|
+
var tmp0_elvis_lhs = tmp17_safe_receiver == null ? null : tmp17_safe_receiver.i1n();
|
|
1983
|
+
if ((tmp0_elvis_lhs == null ? Illuminant_getInstance().j1p_1 : tmp0_elvis_lhs).equals(this.i1n())) {
|
|
1959
1984
|
// Inline function 'com.github.ajalt.colormath.model.LCHabColorSpaceImpl.convert.<anonymous>' call
|
|
1960
|
-
tmp = color.
|
|
1985
|
+
tmp = color.q1m();
|
|
1961
1986
|
} else {
|
|
1962
1987
|
// Inline function 'com.github.ajalt.colormath.model.LCHabColorSpaceImpl.convert.<anonymous>' call
|
|
1963
|
-
tmp = color.
|
|
1988
|
+
tmp = color.j1m().d1p(XYZColorSpace_0(this.i1n())).q1m();
|
|
1964
1989
|
}
|
|
1965
1990
|
return tmp;
|
|
1966
1991
|
};
|
|
1967
|
-
protoOf(LCHabColorSpaceImpl).
|
|
1992
|
+
protoOf(LCHabColorSpaceImpl).k1n = function (components) {
|
|
1968
1993
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
1969
1994
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
1970
|
-
var size = this.
|
|
1995
|
+
var size = this.j1n().m();
|
|
1971
1996
|
// Inline function 'kotlin.require' call
|
|
1972
1997
|
var containsLower = size - 1 | 0;
|
|
1973
1998
|
var containsArg = components.length;
|
|
@@ -1978,33 +2003,34 @@
|
|
|
1978
2003
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
1979
2004
|
}
|
|
1980
2005
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
1981
|
-
var
|
|
1982
|
-
var
|
|
1983
|
-
var
|
|
2006
|
+
var p0 = components[0];
|
|
2007
|
+
var p1 = components[1];
|
|
2008
|
+
var p2 = components[2];
|
|
1984
2009
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
2010
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2011
|
+
var tmp;
|
|
2012
|
+
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
2013
|
+
tmp = components[3];
|
|
1988
2014
|
} else {
|
|
1989
2015
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
1990
|
-
|
|
2016
|
+
tmp = 1.0;
|
|
1991
2017
|
}
|
|
1992
|
-
var
|
|
1993
|
-
return this.
|
|
2018
|
+
var p3 = tmp;
|
|
2019
|
+
return this.e1o(p0, p1, p2, p3);
|
|
1994
2020
|
};
|
|
1995
2021
|
protoOf(LCHabColorSpaceImpl).toString = function () {
|
|
1996
|
-
return 'LCHabColorSpace(' + this.
|
|
2022
|
+
return 'LCHabColorSpace(' + this.m1r_1.toString() + ')';
|
|
1997
2023
|
};
|
|
1998
|
-
protoOf(LCHabColorSpaceImpl).
|
|
2024
|
+
protoOf(LCHabColorSpaceImpl).e1o = function (l, c, h, alpha) {
|
|
1999
2025
|
return new LCHab(l, c, h, alpha, this);
|
|
2000
2026
|
};
|
|
2001
2027
|
protoOf(LCHabColorSpaceImpl).hashCode = function () {
|
|
2002
|
-
return this.
|
|
2028
|
+
return this.m1r_1.hashCode();
|
|
2003
2029
|
};
|
|
2004
2030
|
protoOf(LCHabColorSpaceImpl).equals = function (other) {
|
|
2005
2031
|
var tmp;
|
|
2006
2032
|
if (!(other == null) ? isInterface(other, LCHabColorSpace) : false) {
|
|
2007
|
-
tmp = this.
|
|
2033
|
+
tmp = this.m1r_1.equals(other.i1n());
|
|
2008
2034
|
} else {
|
|
2009
2035
|
tmp = false;
|
|
2010
2036
|
}
|
|
@@ -2012,21 +2038,21 @@
|
|
|
2012
2038
|
};
|
|
2013
2039
|
function Companion_4() {
|
|
2014
2040
|
Companion_instance_5 = this;
|
|
2015
|
-
this.
|
|
2041
|
+
this.n1o_1 = threeComponentInfo('l', 0.0, 1.0, 'a', -0.4, 0.4, 'b', -0.4, 0.4);
|
|
2016
2042
|
}
|
|
2017
|
-
protoOf(Companion_4).
|
|
2043
|
+
protoOf(Companion_4).q2 = function () {
|
|
2018
2044
|
return 'Oklab';
|
|
2019
2045
|
};
|
|
2020
|
-
protoOf(Companion_4).
|
|
2021
|
-
return this.
|
|
2046
|
+
protoOf(Companion_4).j1n = function () {
|
|
2047
|
+
return this.n1o_1;
|
|
2022
2048
|
};
|
|
2023
|
-
protoOf(Companion_4).
|
|
2024
|
-
return color.
|
|
2049
|
+
protoOf(Companion_4).d1n = function (color) {
|
|
2050
|
+
return color.x1m();
|
|
2025
2051
|
};
|
|
2026
|
-
protoOf(Companion_4).
|
|
2052
|
+
protoOf(Companion_4).k1n = function (components) {
|
|
2027
2053
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2028
2054
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2029
|
-
var size = this.
|
|
2055
|
+
var size = this.j1n().m();
|
|
2030
2056
|
// Inline function 'kotlin.require' call
|
|
2031
2057
|
var containsLower = size - 1 | 0;
|
|
2032
2058
|
var containsArg = components.length;
|
|
@@ -2037,19 +2063,20 @@
|
|
|
2037
2063
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2038
2064
|
}
|
|
2039
2065
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
2040
|
-
var
|
|
2041
|
-
var
|
|
2042
|
-
var
|
|
2066
|
+
var p0 = components[0];
|
|
2067
|
+
var p1 = components[1];
|
|
2068
|
+
var p2 = components[2];
|
|
2043
2069
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2070
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2071
|
+
var tmp;
|
|
2072
|
+
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
2073
|
+
tmp = components[3];
|
|
2047
2074
|
} else {
|
|
2048
2075
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
2049
|
-
|
|
2076
|
+
tmp = 1.0;
|
|
2050
2077
|
}
|
|
2051
|
-
var
|
|
2052
|
-
return new Oklab(
|
|
2078
|
+
var p3 = tmp;
|
|
2079
|
+
return new Oklab(p0, p1, p2, p3);
|
|
2053
2080
|
};
|
|
2054
2081
|
var Companion_instance_5;
|
|
2055
2082
|
function Companion_getInstance_4() {
|
|
@@ -2068,50 +2095,50 @@
|
|
|
2068
2095
|
function Oklab(l, a, b, alpha) {
|
|
2069
2096
|
Companion_getInstance_4();
|
|
2070
2097
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
2071
|
-
this.
|
|
2072
|
-
this.
|
|
2073
|
-
this.
|
|
2074
|
-
this.
|
|
2098
|
+
this.z1m_1 = l;
|
|
2099
|
+
this.a1n_1 = a;
|
|
2100
|
+
this.b1n_1 = b;
|
|
2101
|
+
this.c1n_1 = alpha;
|
|
2075
2102
|
}
|
|
2076
|
-
protoOf(Oklab).
|
|
2077
|
-
return this.
|
|
2103
|
+
protoOf(Oklab).a1m = function () {
|
|
2104
|
+
return this.c1n_1;
|
|
2078
2105
|
};
|
|
2079
|
-
protoOf(Oklab).
|
|
2106
|
+
protoOf(Oklab).b1m = function () {
|
|
2080
2107
|
return Companion_getInstance_4();
|
|
2081
2108
|
};
|
|
2082
|
-
protoOf(Oklab).
|
|
2109
|
+
protoOf(Oklab).c1m = function () {
|
|
2083
2110
|
// Inline function 'com.github.ajalt.colormath.model.Oklab.calculateConeResponse' call
|
|
2084
|
-
var ll = this.
|
|
2085
|
-
var mm = this.
|
|
2086
|
-
var ss = this.
|
|
2111
|
+
var ll = this.z1m_1 + 0.3963377774 * this.a1n_1 + 0.2158037573 * this.b1n_1;
|
|
2112
|
+
var mm = this.z1m_1 - 0.1055613458 * this.a1n_1 - 0.0638541728 * this.b1n_1;
|
|
2113
|
+
var ss = this.z1m_1 - 0.0894841775 * this.a1n_1 - 1.291485548 * this.b1n_1;
|
|
2087
2114
|
var l = ll * ll * ll;
|
|
2088
2115
|
var m = mm * mm * mm;
|
|
2089
2116
|
var s = ss * ss * ss;
|
|
2090
|
-
var r = 4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s;
|
|
2117
|
+
var r = +4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s;
|
|
2091
2118
|
var g = -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s;
|
|
2092
2119
|
var b = -0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s;
|
|
2093
|
-
var f = Companion_getInstance_6().
|
|
2094
|
-
return Companion_getInstance_6().
|
|
2120
|
+
var f = Companion_getInstance_6().s1q();
|
|
2121
|
+
return Companion_getInstance_6().e1o(f.c1r(r), f.c1r(g), f.c1r(b), this.c1n_1);
|
|
2095
2122
|
};
|
|
2096
|
-
protoOf(Oklab).
|
|
2123
|
+
protoOf(Oklab).j1m = function () {
|
|
2097
2124
|
// Inline function 'com.github.ajalt.colormath.model.Oklab.calculateConeResponse' call
|
|
2098
|
-
var ll = this.
|
|
2099
|
-
var mm = this.
|
|
2100
|
-
var ss = this.
|
|
2125
|
+
var ll = this.z1m_1 + 0.3963377774 * this.a1n_1 + 0.2158037573 * this.b1n_1;
|
|
2126
|
+
var mm = this.z1m_1 - 0.1055613458 * this.a1n_1 - 0.0638541728 * this.b1n_1;
|
|
2127
|
+
var ss = this.z1m_1 - 0.0894841775 * this.a1n_1 - 1.291485548 * this.b1n_1;
|
|
2101
2128
|
var l = ll * ll * ll;
|
|
2102
2129
|
var m = mm * mm * mm;
|
|
2103
2130
|
var s = ss * ss * ss;
|
|
2104
|
-
return
|
|
2131
|
+
return Companion_getInstance_8().d1r(+1.2270138511 * l - 0.5577999807 * m + 0.281256149 * s, -0.0405801784 * l + 1.1122568696 * m - 0.0716766787 * s, -0.0763812845 * l - 0.4214819784 * m + 1.5861632204 * s, this.c1n_1);
|
|
2105
2132
|
};
|
|
2106
|
-
protoOf(Oklab).
|
|
2133
|
+
protoOf(Oklab).y1m = function () {
|
|
2107
2134
|
// Inline function 'com.github.ajalt.colormath.internal.toPolarModel' call
|
|
2108
|
-
var a = this.
|
|
2109
|
-
var b = this.
|
|
2135
|
+
var a = this.a1n_1;
|
|
2136
|
+
var b = this.b1n_1;
|
|
2110
2137
|
// Inline function 'kotlin.math.sqrt' call
|
|
2111
2138
|
var x = a * a + b * b;
|
|
2112
2139
|
var c = Math.sqrt(x);
|
|
2113
2140
|
var tmp;
|
|
2114
|
-
if (c > -1.0E-7
|
|
2141
|
+
if (c > -1.0E-7 && c < 1.0E-7) {
|
|
2115
2142
|
tmp = NaN;
|
|
2116
2143
|
} else {
|
|
2117
2144
|
// Inline function 'kotlin.math.atan2' call
|
|
@@ -2121,23 +2148,23 @@
|
|
|
2121
2148
|
var h = tmp;
|
|
2122
2149
|
// Inline function 'com.github.ajalt.colormath.model.Oklab.toOklch.<anonymous>' call
|
|
2123
2150
|
var h_0 = normalizeDeg_0(h);
|
|
2124
|
-
return new Oklch(this.
|
|
2151
|
+
return new Oklch(this.z1m_1, c, h_0, this.c1n_1);
|
|
2125
2152
|
};
|
|
2126
|
-
protoOf(Oklab).
|
|
2153
|
+
protoOf(Oklab).x1m = function () {
|
|
2127
2154
|
return this;
|
|
2128
2155
|
};
|
|
2129
|
-
protoOf(Oklab).
|
|
2156
|
+
protoOf(Oklab).u5 = function () {
|
|
2130
2157
|
// Inline function 'kotlin.floatArrayOf' call
|
|
2131
|
-
return new Float32Array([this.
|
|
2158
|
+
return new Float32Array([this.z1m_1, this.a1n_1, this.b1n_1, this.c1n_1]);
|
|
2132
2159
|
};
|
|
2133
2160
|
protoOf(Oklab).toString = function () {
|
|
2134
|
-
return 'Oklab(l=' + this.
|
|
2161
|
+
return 'Oklab(l=' + this.z1m_1 + ', a=' + this.a1n_1 + ', b=' + this.b1n_1 + ', alpha=' + this.c1n_1 + ')';
|
|
2135
2162
|
};
|
|
2136
2163
|
protoOf(Oklab).hashCode = function () {
|
|
2137
|
-
var result = getNumberHashCode(this.
|
|
2138
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2139
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2140
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2164
|
+
var result = getNumberHashCode(this.z1m_1);
|
|
2165
|
+
result = imul(result, 31) + getNumberHashCode(this.a1n_1) | 0;
|
|
2166
|
+
result = imul(result, 31) + getNumberHashCode(this.b1n_1) | 0;
|
|
2167
|
+
result = imul(result, 31) + getNumberHashCode(this.c1n_1) | 0;
|
|
2141
2168
|
return result;
|
|
2142
2169
|
};
|
|
2143
2170
|
protoOf(Oklab).equals = function (other) {
|
|
@@ -2146,33 +2173,33 @@
|
|
|
2146
2173
|
if (!(other instanceof Oklab))
|
|
2147
2174
|
return false;
|
|
2148
2175
|
var tmp0_other_with_cast = other instanceof Oklab ? other : THROW_CCE();
|
|
2149
|
-
if (!equals(this.
|
|
2176
|
+
if (!equals(this.z1m_1, tmp0_other_with_cast.z1m_1))
|
|
2150
2177
|
return false;
|
|
2151
|
-
if (!equals(this.
|
|
2178
|
+
if (!equals(this.a1n_1, tmp0_other_with_cast.a1n_1))
|
|
2152
2179
|
return false;
|
|
2153
|
-
if (!equals(this.
|
|
2180
|
+
if (!equals(this.b1n_1, tmp0_other_with_cast.b1n_1))
|
|
2154
2181
|
return false;
|
|
2155
|
-
if (!equals(this.
|
|
2182
|
+
if (!equals(this.c1n_1, tmp0_other_with_cast.c1n_1))
|
|
2156
2183
|
return false;
|
|
2157
2184
|
return true;
|
|
2158
2185
|
};
|
|
2159
2186
|
function Companion_5() {
|
|
2160
2187
|
Companion_instance_6 = this;
|
|
2161
|
-
this.
|
|
2188
|
+
this.o1o_1 = componentInfoList([new ColorComponentInfo('l', false, 0.0, 1.0), new ColorComponentInfo('c', false, 0.0, 0.4), new ColorComponentInfo('h', true, 0.0, 360.0)]);
|
|
2162
2189
|
}
|
|
2163
|
-
protoOf(Companion_5).
|
|
2190
|
+
protoOf(Companion_5).q2 = function () {
|
|
2164
2191
|
return 'Oklch';
|
|
2165
2192
|
};
|
|
2166
|
-
protoOf(Companion_5).
|
|
2167
|
-
return this.
|
|
2193
|
+
protoOf(Companion_5).j1n = function () {
|
|
2194
|
+
return this.o1o_1;
|
|
2168
2195
|
};
|
|
2169
|
-
protoOf(Companion_5).
|
|
2170
|
-
return color.
|
|
2196
|
+
protoOf(Companion_5).d1n = function (color) {
|
|
2197
|
+
return color.y1m();
|
|
2171
2198
|
};
|
|
2172
|
-
protoOf(Companion_5).
|
|
2199
|
+
protoOf(Companion_5).k1n = function (components) {
|
|
2173
2200
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2174
2201
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2175
|
-
var size = this.
|
|
2202
|
+
var size = this.j1n().m();
|
|
2176
2203
|
// Inline function 'kotlin.require' call
|
|
2177
2204
|
var containsLower = size - 1 | 0;
|
|
2178
2205
|
var containsArg = components.length;
|
|
@@ -2183,19 +2210,20 @@
|
|
|
2183
2210
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2184
2211
|
}
|
|
2185
2212
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
2186
|
-
var
|
|
2187
|
-
var
|
|
2188
|
-
var
|
|
2213
|
+
var p0 = components[0];
|
|
2214
|
+
var p1 = components[1];
|
|
2215
|
+
var p2 = components[2];
|
|
2189
2216
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2217
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2218
|
+
var tmp;
|
|
2219
|
+
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
2220
|
+
tmp = components[3];
|
|
2193
2221
|
} else {
|
|
2194
2222
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
2195
|
-
|
|
2223
|
+
tmp = 1.0;
|
|
2196
2224
|
}
|
|
2197
|
-
var
|
|
2198
|
-
return new Oklch(
|
|
2225
|
+
var p3 = tmp;
|
|
2226
|
+
return new Oklch(p0, p1, p2, p3);
|
|
2199
2227
|
};
|
|
2200
2228
|
var Companion_instance_6;
|
|
2201
2229
|
function Companion_getInstance_5() {
|
|
@@ -2206,53 +2234,53 @@
|
|
|
2206
2234
|
function Oklch(l, c, h, alpha) {
|
|
2207
2235
|
Companion_getInstance_5();
|
|
2208
2236
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
2209
|
-
this.
|
|
2210
|
-
this.
|
|
2211
|
-
this.
|
|
2212
|
-
this.
|
|
2237
|
+
this.a1q_1 = l;
|
|
2238
|
+
this.b1q_1 = c;
|
|
2239
|
+
this.c1q_1 = h;
|
|
2240
|
+
this.d1q_1 = alpha;
|
|
2213
2241
|
}
|
|
2214
|
-
protoOf(Oklch).
|
|
2215
|
-
return this.
|
|
2242
|
+
protoOf(Oklch).e1q = function () {
|
|
2243
|
+
return this.c1q_1;
|
|
2216
2244
|
};
|
|
2217
|
-
protoOf(Oklch).
|
|
2218
|
-
return this.
|
|
2245
|
+
protoOf(Oklch).a1m = function () {
|
|
2246
|
+
return this.d1q_1;
|
|
2219
2247
|
};
|
|
2220
|
-
protoOf(Oklch).
|
|
2248
|
+
protoOf(Oklch).b1m = function () {
|
|
2221
2249
|
return Companion_getInstance_5();
|
|
2222
2250
|
};
|
|
2223
|
-
protoOf(Oklch).
|
|
2224
|
-
return this.
|
|
2251
|
+
protoOf(Oklch).c1m = function () {
|
|
2252
|
+
return this.x1m().c1m();
|
|
2225
2253
|
};
|
|
2226
|
-
protoOf(Oklch).
|
|
2227
|
-
return this.
|
|
2254
|
+
protoOf(Oklch).j1m = function () {
|
|
2255
|
+
return this.x1m().j1m();
|
|
2228
2256
|
};
|
|
2229
|
-
protoOf(Oklch).
|
|
2257
|
+
protoOf(Oklch).x1m = function () {
|
|
2230
2258
|
// Inline function 'com.github.ajalt.colormath.internal.fromPolarModel' call
|
|
2231
|
-
var c = this.
|
|
2232
|
-
var h = this.
|
|
2259
|
+
var c = this.b1q_1;
|
|
2260
|
+
var h = this.c1q_1;
|
|
2233
2261
|
var hDegrees = isNaN_0(h) ? 0.0 : degToRad(h);
|
|
2234
2262
|
// Inline function 'kotlin.math.cos' call
|
|
2235
2263
|
var a = c * Math.cos(hDegrees);
|
|
2236
2264
|
// Inline function 'kotlin.math.sin' call
|
|
2237
2265
|
var b = c * Math.sin(hDegrees);
|
|
2238
2266
|
// Inline function 'com.github.ajalt.colormath.model.Oklch.toOklab.<anonymous>' call
|
|
2239
|
-
return new Oklab(this.
|
|
2267
|
+
return new Oklab(this.a1q_1, a, b, this.d1q_1);
|
|
2240
2268
|
};
|
|
2241
|
-
protoOf(Oklch).
|
|
2269
|
+
protoOf(Oklch).y1m = function () {
|
|
2242
2270
|
return this;
|
|
2243
2271
|
};
|
|
2244
|
-
protoOf(Oklch).
|
|
2272
|
+
protoOf(Oklch).u5 = function () {
|
|
2245
2273
|
// Inline function 'kotlin.floatArrayOf' call
|
|
2246
|
-
return new Float32Array([this.
|
|
2274
|
+
return new Float32Array([this.a1q_1, this.b1q_1, this.c1q_1, this.d1q_1]);
|
|
2247
2275
|
};
|
|
2248
2276
|
protoOf(Oklch).toString = function () {
|
|
2249
|
-
return 'Oklch(l=' + this.
|
|
2277
|
+
return 'Oklch(l=' + this.a1q_1 + ', c=' + this.b1q_1 + ', h=' + this.c1q_1 + ', alpha=' + this.d1q_1 + ')';
|
|
2250
2278
|
};
|
|
2251
2279
|
protoOf(Oklch).hashCode = function () {
|
|
2252
|
-
var result = getNumberHashCode(this.
|
|
2253
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2254
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2255
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2280
|
+
var result = getNumberHashCode(this.a1q_1);
|
|
2281
|
+
result = imul(result, 31) + getNumberHashCode(this.b1q_1) | 0;
|
|
2282
|
+
result = imul(result, 31) + getNumberHashCode(this.c1q_1) | 0;
|
|
2283
|
+
result = imul(result, 31) + getNumberHashCode(this.d1q_1) | 0;
|
|
2256
2284
|
return result;
|
|
2257
2285
|
};
|
|
2258
2286
|
protoOf(Oklch).equals = function (other) {
|
|
@@ -2261,30 +2289,30 @@
|
|
|
2261
2289
|
if (!(other instanceof Oklch))
|
|
2262
2290
|
return false;
|
|
2263
2291
|
var tmp0_other_with_cast = other instanceof Oklch ? other : THROW_CCE();
|
|
2264
|
-
if (!equals(this.
|
|
2292
|
+
if (!equals(this.a1q_1, tmp0_other_with_cast.a1q_1))
|
|
2265
2293
|
return false;
|
|
2266
|
-
if (!equals(this.
|
|
2294
|
+
if (!equals(this.b1q_1, tmp0_other_with_cast.b1q_1))
|
|
2267
2295
|
return false;
|
|
2268
|
-
if (!equals(this.
|
|
2296
|
+
if (!equals(this.c1q_1, tmp0_other_with_cast.c1q_1))
|
|
2269
2297
|
return false;
|
|
2270
|
-
if (!equals(this.
|
|
2298
|
+
if (!equals(this.d1q_1, tmp0_other_with_cast.d1q_1))
|
|
2271
2299
|
return false;
|
|
2272
2300
|
return true;
|
|
2273
2301
|
};
|
|
2274
2302
|
function GammaTransferFunctions(gamma) {
|
|
2275
|
-
this.
|
|
2303
|
+
this.p1r_1 = gamma;
|
|
2276
2304
|
}
|
|
2277
|
-
protoOf(GammaTransferFunctions).
|
|
2278
|
-
return spow(x, this.
|
|
2305
|
+
protoOf(GammaTransferFunctions).b1r = function (x) {
|
|
2306
|
+
return spow(x, this.p1r_1);
|
|
2279
2307
|
};
|
|
2280
|
-
protoOf(GammaTransferFunctions).
|
|
2281
|
-
return spow(x, 1.0 / this.
|
|
2308
|
+
protoOf(GammaTransferFunctions).c1r = function (x) {
|
|
2309
|
+
return spow(x, 1.0 / this.p1r_1);
|
|
2282
2310
|
};
|
|
2283
2311
|
protoOf(GammaTransferFunctions).toString = function () {
|
|
2284
|
-
return 'GammaTransferFunctions(gamma=' + this.
|
|
2312
|
+
return 'GammaTransferFunctions(gamma=' + this.p1r_1 + ')';
|
|
2285
2313
|
};
|
|
2286
2314
|
protoOf(GammaTransferFunctions).hashCode = function () {
|
|
2287
|
-
return getNumberHashCode(this.
|
|
2315
|
+
return getNumberHashCode(this.p1r_1);
|
|
2288
2316
|
};
|
|
2289
2317
|
protoOf(GammaTransferFunctions).equals = function (other) {
|
|
2290
2318
|
if (this === other)
|
|
@@ -2292,16 +2320,16 @@
|
|
|
2292
2320
|
if (!(other instanceof GammaTransferFunctions))
|
|
2293
2321
|
return false;
|
|
2294
2322
|
var tmp0_other_with_cast = other instanceof GammaTransferFunctions ? other : THROW_CCE();
|
|
2295
|
-
if (!equals(this.
|
|
2323
|
+
if (!equals(this.p1r_1, tmp0_other_with_cast.p1r_1))
|
|
2296
2324
|
return false;
|
|
2297
2325
|
return true;
|
|
2298
2326
|
};
|
|
2299
2327
|
function LinearTransferFunctions() {
|
|
2300
2328
|
}
|
|
2301
|
-
protoOf(LinearTransferFunctions).
|
|
2329
|
+
protoOf(LinearTransferFunctions).b1r = function (x) {
|
|
2302
2330
|
return x;
|
|
2303
2331
|
};
|
|
2304
|
-
protoOf(LinearTransferFunctions).
|
|
2332
|
+
protoOf(LinearTransferFunctions).c1r = function (x) {
|
|
2305
2333
|
return x;
|
|
2306
2334
|
};
|
|
2307
2335
|
var LinearTransferFunctions_instance;
|
|
@@ -2312,49 +2340,49 @@
|
|
|
2312
2340
|
}
|
|
2313
2341
|
function Companion_6() {
|
|
2314
2342
|
Companion_instance_7 = this;
|
|
2315
|
-
this.
|
|
2343
|
+
this.c1o_1 = RGBColorSpaces_getInstance().p1o_1;
|
|
2316
2344
|
}
|
|
2317
|
-
protoOf(Companion_6).
|
|
2318
|
-
return this.
|
|
2345
|
+
protoOf(Companion_6).e1o = function (r, g, b, alpha) {
|
|
2346
|
+
return this.c1o_1.e1o(r, g, b, alpha);
|
|
2319
2347
|
};
|
|
2320
|
-
protoOf(Companion_6).
|
|
2321
|
-
return this.
|
|
2348
|
+
protoOf(Companion_6).d1r = function (r, g, b, alpha) {
|
|
2349
|
+
return this.c1o_1.d1r(r, g, b, alpha);
|
|
2322
2350
|
};
|
|
2323
|
-
protoOf(Companion_6).
|
|
2324
|
-
return this.
|
|
2351
|
+
protoOf(Companion_6).d1o = function (hex) {
|
|
2352
|
+
return this.c1o_1.d1o(hex);
|
|
2325
2353
|
};
|
|
2326
|
-
protoOf(Companion_6).
|
|
2327
|
-
return this.
|
|
2354
|
+
protoOf(Companion_6).i1q = function (r, g, b, alpha) {
|
|
2355
|
+
return this.c1o_1.i1q(r, g, b, alpha);
|
|
2328
2356
|
};
|
|
2329
|
-
protoOf(Companion_6).
|
|
2330
|
-
return this.
|
|
2357
|
+
protoOf(Companion_6).d1n = function (color) {
|
|
2358
|
+
return this.c1o_1.d1n(color);
|
|
2331
2359
|
};
|
|
2332
|
-
protoOf(Companion_6).
|
|
2333
|
-
return this.
|
|
2360
|
+
protoOf(Companion_6).k1n = function (components) {
|
|
2361
|
+
return this.c1o_1.k1n(components);
|
|
2334
2362
|
};
|
|
2335
|
-
protoOf(Companion_6).
|
|
2336
|
-
return this.
|
|
2363
|
+
protoOf(Companion_6).s1q = function () {
|
|
2364
|
+
return this.c1o_1.s1q();
|
|
2337
2365
|
};
|
|
2338
|
-
protoOf(Companion_6).
|
|
2339
|
-
return this.
|
|
2366
|
+
protoOf(Companion_6).q1r = function () {
|
|
2367
|
+
return this.c1o_1.q1r();
|
|
2340
2368
|
};
|
|
2341
|
-
protoOf(Companion_6).
|
|
2342
|
-
return this.
|
|
2369
|
+
protoOf(Companion_6).r1r = function () {
|
|
2370
|
+
return this.c1o_1.r1r();
|
|
2343
2371
|
};
|
|
2344
|
-
protoOf(Companion_6).
|
|
2345
|
-
return this.
|
|
2372
|
+
protoOf(Companion_6).i1n = function () {
|
|
2373
|
+
return this.c1o_1.i1n();
|
|
2346
2374
|
};
|
|
2347
|
-
protoOf(Companion_6).
|
|
2348
|
-
return this.
|
|
2375
|
+
protoOf(Companion_6).q2 = function () {
|
|
2376
|
+
return this.c1o_1.q2();
|
|
2349
2377
|
};
|
|
2350
|
-
protoOf(Companion_6).
|
|
2351
|
-
return this.
|
|
2378
|
+
protoOf(Companion_6).j1n = function () {
|
|
2379
|
+
return this.c1o_1.j1n();
|
|
2352
2380
|
};
|
|
2353
2381
|
protoOf(Companion_6).equals = function (other) {
|
|
2354
|
-
return equals(RGBColorSpaces_getInstance().
|
|
2382
|
+
return equals(RGBColorSpaces_getInstance().p1o_1, other);
|
|
2355
2383
|
};
|
|
2356
2384
|
protoOf(Companion_6).hashCode = function () {
|
|
2357
|
-
return hashCode(RGBColorSpaces_getInstance().
|
|
2385
|
+
return hashCode(RGBColorSpaces_getInstance().p1o_1);
|
|
2358
2386
|
};
|
|
2359
2387
|
var Companion_instance_7;
|
|
2360
2388
|
function Companion_getInstance_6() {
|
|
@@ -2364,117 +2392,93 @@
|
|
|
2364
2392
|
}
|
|
2365
2393
|
function RGB(r, g, b, alpha, space) {
|
|
2366
2394
|
Companion_getInstance_6();
|
|
2367
|
-
this.
|
|
2368
|
-
this.
|
|
2369
|
-
this.
|
|
2370
|
-
this.
|
|
2371
|
-
this.
|
|
2395
|
+
this.e1m_1 = r;
|
|
2396
|
+
this.f1m_1 = g;
|
|
2397
|
+
this.g1m_1 = b;
|
|
2398
|
+
this.h1m_1 = alpha;
|
|
2399
|
+
this.i1m_1 = space;
|
|
2372
2400
|
}
|
|
2373
|
-
protoOf(RGB).
|
|
2374
|
-
return this.
|
|
2401
|
+
protoOf(RGB).a1m = function () {
|
|
2402
|
+
return this.h1m_1;
|
|
2375
2403
|
};
|
|
2376
|
-
protoOf(RGB).
|
|
2377
|
-
return this.
|
|
2404
|
+
protoOf(RGB).b1m = function () {
|
|
2405
|
+
return this.i1m_1;
|
|
2378
2406
|
};
|
|
2379
|
-
protoOf(RGB).
|
|
2407
|
+
protoOf(RGB).m1p = function () {
|
|
2380
2408
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
2381
2409
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toRGBInt.<anonymous>' call
|
|
2382
|
-
var $this$toSRGB = this.
|
|
2383
|
-
return _RGBInt___init__impl__lqova7_1($this$toSRGB.
|
|
2410
|
+
var $this$toSRGB = this.s1r(SRGB_getInstance());
|
|
2411
|
+
return _RGBInt___init__impl__lqova7_1($this$toSRGB.e1m_1, $this$toSRGB.f1m_1, $this$toSRGB.g1m_1, nanToOne($this$toSRGB.h1m_1));
|
|
2384
2412
|
};
|
|
2385
|
-
protoOf(RGB).
|
|
2386
|
-
var f = SRGB_getInstance().
|
|
2387
|
-
return equals(this.
|
|
2413
|
+
protoOf(RGB).s1r = function (space) {
|
|
2414
|
+
var f = SRGB_getInstance().s1q();
|
|
2415
|
+
return equals(this.i1m_1, space) ? this : equals(this.i1m_1, SRGB_getInstance()) && equals(space, RGBColorSpaces_getInstance().q1o_1) ? space.e1o(f.b1r(this.e1m_1), f.b1r(this.f1m_1), f.b1r(this.g1m_1), this.h1m_1) : equals(this.i1m_1, RGBColorSpaces_getInstance().q1o_1) && equals(space, SRGB_getInstance()) ? space.e1o(f.c1r(this.e1m_1), f.c1r(this.f1m_1), f.c1r(this.g1m_1), this.h1m_1) : this.j1m().u1r(space);
|
|
2388
2416
|
};
|
|
2389
|
-
protoOf(RGB).
|
|
2417
|
+
protoOf(RGB).d1m = function () {
|
|
2390
2418
|
var tmp$ret$3;
|
|
2391
2419
|
$l$block: {
|
|
2392
2420
|
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
2393
2421
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
2394
|
-
var $this$toSRGB = this.
|
|
2395
|
-
var r = $this$toSRGB.
|
|
2396
|
-
var g = $this$toSRGB.
|
|
2397
|
-
var b = $this$toSRGB.
|
|
2422
|
+
var $this$toSRGB = this.s1r(SRGB_getInstance());
|
|
2423
|
+
var r = $this$toSRGB.e1m_1;
|
|
2424
|
+
var g = $this$toSRGB.f1m_1;
|
|
2425
|
+
var b = $this$toSRGB.g1m_1;
|
|
2398
2426
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
2399
2427
|
var min = Math.min(r, g, b);
|
|
2400
2428
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
2401
2429
|
var max = Math.max(r, g, b);
|
|
2402
2430
|
var chroma = max - min;
|
|
2403
|
-
var
|
|
2404
|
-
if (chroma < 1.0E-7) {
|
|
2405
|
-
tmp = NaN;
|
|
2406
|
-
} else if (r === max) {
|
|
2407
|
-
tmp = (g - b) / chroma;
|
|
2408
|
-
} else if (g === max) {
|
|
2409
|
-
tmp = 2 + (b - r) / chroma;
|
|
2410
|
-
} else if (b === max) {
|
|
2411
|
-
tmp = 4 + (r - g) / chroma;
|
|
2412
|
-
} else {
|
|
2413
|
-
tmp = 0.0;
|
|
2414
|
-
}
|
|
2415
|
-
var h = tmp * 60;
|
|
2431
|
+
var h = (chroma < 1.0E-7 ? NaN : r === max ? (g - b) / chroma : g === max ? 2 + (b - r) / chroma : b === max ? 4 + (r - g) / chroma : 0.0) * 60;
|
|
2416
2432
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toHSL.<anonymous>' call
|
|
2417
2433
|
var h_0 = normalizeDeg(h);
|
|
2418
2434
|
var l = (min + max) / 2.0;
|
|
2419
2435
|
var s = max === min ? 0.0 : l <= 0.5 ? chroma / (max + min) : chroma / (2 - max - min);
|
|
2420
|
-
tmp$ret$3 = new HSL(h_0, s, l, this.
|
|
2436
|
+
tmp$ret$3 = new HSL(h_0, s, l, this.h1m_1);
|
|
2421
2437
|
break $l$block;
|
|
2422
2438
|
}
|
|
2423
2439
|
return tmp$ret$3;
|
|
2424
2440
|
};
|
|
2425
|
-
protoOf(RGB).
|
|
2426
|
-
var f = this.
|
|
2441
|
+
protoOf(RGB).j1m = function () {
|
|
2442
|
+
var f = this.i1m_1.s1q();
|
|
2427
2443
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
2428
|
-
var this_0 = _Matrix___init__impl__q3kp4w(this.
|
|
2429
|
-
var v0 = f.
|
|
2430
|
-
var v1 = f.
|
|
2431
|
-
var v2 = f.
|
|
2444
|
+
var this_0 = _Matrix___init__impl__q3kp4w(this.i1m_1.q1r());
|
|
2445
|
+
var v0 = f.b1r(this.e1m_1);
|
|
2446
|
+
var v1 = f.b1r(this.f1m_1);
|
|
2447
|
+
var v2 = f.b1r(this.g1m_1);
|
|
2432
2448
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toXYZ.<anonymous>' call
|
|
2433
2449
|
var x = Matrix__get_impl_xogbpk(this_0, 0, 0) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 0) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 0) * v2;
|
|
2434
2450
|
var y = Matrix__get_impl_xogbpk(this_0, 0, 1) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 1) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 1) * v2;
|
|
2435
2451
|
var z = Matrix__get_impl_xogbpk(this_0, 0, 2) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 2) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 2) * v2;
|
|
2436
|
-
return XYZColorSpace_0(this.
|
|
2452
|
+
return XYZColorSpace_0(this.i1m_1.i1n()).e1o(x, y, z, this.h1m_1);
|
|
2437
2453
|
};
|
|
2438
|
-
protoOf(RGB).
|
|
2454
|
+
protoOf(RGB).w1m = function () {
|
|
2439
2455
|
var tmp$ret$3;
|
|
2440
2456
|
$l$block: {
|
|
2441
2457
|
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
2442
2458
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
2443
|
-
var $this$toSRGB = this.
|
|
2444
|
-
var r = $this$toSRGB.
|
|
2445
|
-
var g = $this$toSRGB.
|
|
2446
|
-
var b = $this$toSRGB.
|
|
2459
|
+
var $this$toSRGB = this.s1r(SRGB_getInstance());
|
|
2460
|
+
var r = $this$toSRGB.e1m_1;
|
|
2461
|
+
var g = $this$toSRGB.f1m_1;
|
|
2462
|
+
var b = $this$toSRGB.g1m_1;
|
|
2447
2463
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
2448
2464
|
var min = Math.min(r, g, b);
|
|
2449
2465
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
2450
2466
|
var max = Math.max(r, g, b);
|
|
2451
2467
|
var chroma = max - min;
|
|
2452
|
-
var
|
|
2453
|
-
if (chroma < 1.0E-7) {
|
|
2454
|
-
tmp = NaN;
|
|
2455
|
-
} else if (r === max) {
|
|
2456
|
-
tmp = (g - b) / chroma;
|
|
2457
|
-
} else if (g === max) {
|
|
2458
|
-
tmp = 2 + (b - r) / chroma;
|
|
2459
|
-
} else if (b === max) {
|
|
2460
|
-
tmp = 4 + (r - g) / chroma;
|
|
2461
|
-
} else {
|
|
2462
|
-
tmp = 0.0;
|
|
2463
|
-
}
|
|
2464
|
-
var h = tmp * 60;
|
|
2468
|
+
var h = (chroma < 1.0E-7 ? NaN : r === max ? (g - b) / chroma : g === max ? 2 + (b - r) / chroma : b === max ? 4 + (r - g) / chroma : 0.0) * 60;
|
|
2465
2469
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toHWB.<anonymous>' call
|
|
2466
2470
|
var hue = normalizeDeg(h);
|
|
2467
|
-
tmp$ret$3 = new HWB(hue, min, 1.0 - max, this.
|
|
2471
|
+
tmp$ret$3 = new HWB(hue, min, 1.0 - max, this.h1m_1);
|
|
2468
2472
|
break $l$block;
|
|
2469
2473
|
}
|
|
2470
2474
|
return tmp$ret$3;
|
|
2471
2475
|
};
|
|
2472
|
-
protoOf(RGB).
|
|
2473
|
-
if (!equals(this.
|
|
2474
|
-
return this.
|
|
2475
|
-
var r = this.
|
|
2476
|
-
var g = this.
|
|
2477
|
-
var b = this.
|
|
2476
|
+
protoOf(RGB).x1m = function () {
|
|
2477
|
+
if (!equals(this.i1m_1, RGBColorSpaces_getInstance().p1o_1))
|
|
2478
|
+
return this.j1m().x1m();
|
|
2479
|
+
var r = this.i1m_1.s1q().b1r(this.e1m_1);
|
|
2480
|
+
var g = this.i1m_1.s1q().b1r(this.f1m_1);
|
|
2481
|
+
var b = this.i1m_1.s1q().b1r(this.g1m_1);
|
|
2478
2482
|
var l = 0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b;
|
|
2479
2483
|
var m = 0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b;
|
|
2480
2484
|
var s = 0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b;
|
|
@@ -2484,24 +2488,24 @@
|
|
|
2484
2488
|
var mm = Math.cbrt(m);
|
|
2485
2489
|
// Inline function 'kotlin.math.cbrt' call
|
|
2486
2490
|
var ss = Math.cbrt(s);
|
|
2487
|
-
return Oklab_init_$Create$(0.21045426 * ll + 0.7936178 * mm - 0.004072047 * ss, 1.9779985 * ll - 2.4285922 * mm + 0.4505937 * ss, 0.025904037 * ll + 0.78277177 * mm - 0.80867577 * ss, this.
|
|
2491
|
+
return Oklab_init_$Create$(0.21045426 * ll + 0.7936178 * mm - 0.004072047 * ss, 1.9779985 * ll - 2.4285922 * mm + 0.4505937 * ss, 0.025904037 * ll + 0.78277177 * mm - 0.80867577 * ss, this.h1m_1);
|
|
2488
2492
|
};
|
|
2489
|
-
protoOf(RGB).
|
|
2490
|
-
return this.
|
|
2493
|
+
protoOf(RGB).c1m = function () {
|
|
2494
|
+
return this.s1r(RGBColorSpaces_getInstance().p1o_1);
|
|
2491
2495
|
};
|
|
2492
|
-
protoOf(RGB).
|
|
2496
|
+
protoOf(RGB).u5 = function () {
|
|
2493
2497
|
// Inline function 'kotlin.floatArrayOf' call
|
|
2494
|
-
return new Float32Array([this.
|
|
2498
|
+
return new Float32Array([this.e1m_1, this.f1m_1, this.g1m_1, this.h1m_1]);
|
|
2495
2499
|
};
|
|
2496
2500
|
protoOf(RGB).toString = function () {
|
|
2497
|
-
return 'RGB(r=' + this.
|
|
2501
|
+
return 'RGB(r=' + this.e1m_1 + ', g=' + this.f1m_1 + ', b=' + this.g1m_1 + ', alpha=' + this.h1m_1 + ', space=' + toString(this.i1m_1) + ')';
|
|
2498
2502
|
};
|
|
2499
2503
|
protoOf(RGB).hashCode = function () {
|
|
2500
|
-
var result = getNumberHashCode(this.
|
|
2501
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2502
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2503
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
2504
|
-
result = imul(result, 31) + hashCode(this.
|
|
2504
|
+
var result = getNumberHashCode(this.e1m_1);
|
|
2505
|
+
result = imul(result, 31) + getNumberHashCode(this.f1m_1) | 0;
|
|
2506
|
+
result = imul(result, 31) + getNumberHashCode(this.g1m_1) | 0;
|
|
2507
|
+
result = imul(result, 31) + getNumberHashCode(this.h1m_1) | 0;
|
|
2508
|
+
result = imul(result, 31) + hashCode(this.i1m_1) | 0;
|
|
2505
2509
|
return result;
|
|
2506
2510
|
};
|
|
2507
2511
|
protoOf(RGB).equals = function (other) {
|
|
@@ -2510,15 +2514,15 @@
|
|
|
2510
2514
|
if (!(other instanceof RGB))
|
|
2511
2515
|
return false;
|
|
2512
2516
|
var tmp0_other_with_cast = other instanceof RGB ? other : THROW_CCE();
|
|
2513
|
-
if (!equals(this.
|
|
2517
|
+
if (!equals(this.e1m_1, tmp0_other_with_cast.e1m_1))
|
|
2514
2518
|
return false;
|
|
2515
|
-
if (!equals(this.
|
|
2519
|
+
if (!equals(this.f1m_1, tmp0_other_with_cast.f1m_1))
|
|
2516
2520
|
return false;
|
|
2517
|
-
if (!equals(this.
|
|
2521
|
+
if (!equals(this.g1m_1, tmp0_other_with_cast.g1m_1))
|
|
2518
2522
|
return false;
|
|
2519
|
-
if (!equals(this.
|
|
2523
|
+
if (!equals(this.h1m_1, tmp0_other_with_cast.h1m_1))
|
|
2520
2524
|
return false;
|
|
2521
|
-
if (!equals(this.
|
|
2525
|
+
if (!equals(this.i1m_1, tmp0_other_with_cast.i1m_1))
|
|
2522
2526
|
return false;
|
|
2523
2527
|
return true;
|
|
2524
2528
|
};
|
|
@@ -2618,18 +2622,18 @@
|
|
|
2618
2622
|
return ACES_AP1_B;
|
|
2619
2623
|
}
|
|
2620
2624
|
var ACES_AP1_B;
|
|
2621
|
-
function RGBColorSpaces$SRGB$lambda($this
|
|
2622
|
-
return it.
|
|
2625
|
+
function RGBColorSpaces$SRGB$lambda($this$RGBColorSpaceImpl, it) {
|
|
2626
|
+
return it.c1m();
|
|
2623
2627
|
}
|
|
2624
|
-
function RGBColorSpaces$BT2020$lambda($this
|
|
2628
|
+
function RGBColorSpaces$BT2020$lambda($this$RGBColorSpaceImpl, color) {
|
|
2625
2629
|
var tmp;
|
|
2626
2630
|
if (color instanceof RGB) {
|
|
2627
|
-
tmp = color.
|
|
2631
|
+
tmp = color.s1r($this$RGBColorSpaceImpl);
|
|
2628
2632
|
} else {
|
|
2629
2633
|
if (color instanceof ICtCp) {
|
|
2630
|
-
tmp = color.
|
|
2634
|
+
tmp = color.r1q();
|
|
2631
2635
|
} else {
|
|
2632
|
-
tmp = color.
|
|
2636
|
+
tmp = color.j1m().u1r($this$RGBColorSpaceImpl);
|
|
2633
2637
|
}
|
|
2634
2638
|
}
|
|
2635
2639
|
return tmp;
|
|
@@ -2637,29 +2641,29 @@
|
|
|
2637
2641
|
function RGBColorSpaces() {
|
|
2638
2642
|
RGBColorSpaces_instance = this;
|
|
2639
2643
|
var tmp = this;
|
|
2640
|
-
var tmp_0 = Illuminant_getInstance().
|
|
2644
|
+
var tmp_0 = Illuminant_getInstance().j1p_1;
|
|
2641
2645
|
var tmp_1 = SRGBTransferFunctions_instance;
|
|
2642
2646
|
var tmp_2 = get_SRGB_R();
|
|
2643
2647
|
var tmp_3 = get_SRGB_G();
|
|
2644
2648
|
var tmp_4 = get_SRGB_B();
|
|
2645
|
-
tmp.
|
|
2646
|
-
this.
|
|
2647
|
-
this.
|
|
2648
|
-
this.
|
|
2649
|
-
this.
|
|
2650
|
-
this.
|
|
2651
|
-
this.
|
|
2649
|
+
tmp.p1o_1 = new RGBColorSpaceImpl('sRGB', tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, RGBColorSpaces$SRGB$lambda);
|
|
2650
|
+
this.q1o_1 = RGBColorSpace_0('Linear sRGB', Illuminant_getInstance().j1p_1, LinearTransferFunctions_instance, get_SRGB_R(), get_SRGB_G(), get_SRGB_B());
|
|
2651
|
+
this.r1o_1 = RGBColorSpace_0('ACES2065-1', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP0_R(), get_ACES_AP0_G(), get_ACES_AP0_B());
|
|
2652
|
+
this.s1o_1 = RGBColorSpace_0('ACEScc', get_ACES_WHITE_POINT(), ACESccTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
2653
|
+
this.t1o_1 = RGBColorSpace_0('ACEScct', get_ACES_WHITE_POINT(), ACEScctTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
2654
|
+
this.u1o_1 = RGBColorSpace_0('ACEScg', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
2655
|
+
this.v1o_1 = RGBColorSpace_0('Adobe RGB', Illuminant_getInstance().j1p_1, new GammaTransferFunctions(2.19921875), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.21, 0.71), xyY_init_$Create$(0.15, 0.06));
|
|
2652
2656
|
var tmp_5 = this;
|
|
2653
|
-
var tmp_6 = Illuminant_getInstance().
|
|
2657
|
+
var tmp_6 = Illuminant_getInstance().j1p_1;
|
|
2654
2658
|
var tmp_7 = BT2020TransferFunctions_getInstance();
|
|
2655
2659
|
var tmp_8 = xyY_init_$Create$(0.708, 0.292);
|
|
2656
2660
|
var tmp_9 = xyY_init_$Create$(0.17, 0.797);
|
|
2657
2661
|
var tmp_10 = xyY_init_$Create$(0.131, 0.046);
|
|
2658
|
-
tmp_5.
|
|
2659
|
-
this.
|
|
2660
|
-
this.
|
|
2661
|
-
this.
|
|
2662
|
-
this.
|
|
2662
|
+
tmp_5.w1o_1 = new RGBColorSpaceImpl('BT.2020', tmp_6, tmp_7, tmp_8, tmp_9, tmp_10, RGBColorSpaces$BT2020$lambda);
|
|
2663
|
+
this.x1o_1 = RGBColorSpace_0('BT.709', Illuminant_getInstance().j1p_1, BT709TransferFunctions_getInstance(), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.3, 0.6), xyY_init_$Create$(0.15, 0.06));
|
|
2664
|
+
this.y1o_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));
|
|
2665
|
+
this.z1o_1 = RGBColorSpace_0('Display P3', Illuminant_getInstance().j1p_1, SRGBTransferFunctions_instance, xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
|
|
2666
|
+
this.a1p_1 = RGBColorSpace_0('ROMM RGB', Illuminant_getInstance().h1p_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));
|
|
2663
2667
|
}
|
|
2664
2668
|
var RGBColorSpaces_instance;
|
|
2665
2669
|
function RGBColorSpaces_getInstance() {
|
|
@@ -2669,49 +2673,49 @@
|
|
|
2669
2673
|
}
|
|
2670
2674
|
function SRGB() {
|
|
2671
2675
|
SRGB_instance = this;
|
|
2672
|
-
this.
|
|
2676
|
+
this.k1q_1 = RGBColorSpaces_getInstance().p1o_1;
|
|
2673
2677
|
}
|
|
2674
|
-
protoOf(SRGB).
|
|
2675
|
-
return this.
|
|
2678
|
+
protoOf(SRGB).e1o = function (r, g, b, alpha) {
|
|
2679
|
+
return this.k1q_1.e1o(r, g, b, alpha);
|
|
2676
2680
|
};
|
|
2677
|
-
protoOf(SRGB).
|
|
2678
|
-
return this.
|
|
2681
|
+
protoOf(SRGB).d1r = function (r, g, b, alpha) {
|
|
2682
|
+
return this.k1q_1.d1r(r, g, b, alpha);
|
|
2679
2683
|
};
|
|
2680
|
-
protoOf(SRGB).
|
|
2681
|
-
return this.
|
|
2684
|
+
protoOf(SRGB).d1o = function (hex) {
|
|
2685
|
+
return this.k1q_1.d1o(hex);
|
|
2682
2686
|
};
|
|
2683
|
-
protoOf(SRGB).
|
|
2684
|
-
return this.
|
|
2687
|
+
protoOf(SRGB).i1q = function (r, g, b, alpha) {
|
|
2688
|
+
return this.k1q_1.i1q(r, g, b, alpha);
|
|
2685
2689
|
};
|
|
2686
|
-
protoOf(SRGB).
|
|
2687
|
-
return this.
|
|
2690
|
+
protoOf(SRGB).d1n = function (color) {
|
|
2691
|
+
return this.k1q_1.d1n(color);
|
|
2688
2692
|
};
|
|
2689
|
-
protoOf(SRGB).
|
|
2690
|
-
return this.
|
|
2693
|
+
protoOf(SRGB).k1n = function (components) {
|
|
2694
|
+
return this.k1q_1.k1n(components);
|
|
2691
2695
|
};
|
|
2692
|
-
protoOf(SRGB).
|
|
2693
|
-
return this.
|
|
2696
|
+
protoOf(SRGB).s1q = function () {
|
|
2697
|
+
return this.k1q_1.s1q();
|
|
2694
2698
|
};
|
|
2695
|
-
protoOf(SRGB).
|
|
2696
|
-
return this.
|
|
2699
|
+
protoOf(SRGB).q1r = function () {
|
|
2700
|
+
return this.k1q_1.q1r();
|
|
2697
2701
|
};
|
|
2698
|
-
protoOf(SRGB).
|
|
2699
|
-
return this.
|
|
2702
|
+
protoOf(SRGB).r1r = function () {
|
|
2703
|
+
return this.k1q_1.r1r();
|
|
2700
2704
|
};
|
|
2701
|
-
protoOf(SRGB).
|
|
2702
|
-
return this.
|
|
2705
|
+
protoOf(SRGB).i1n = function () {
|
|
2706
|
+
return this.k1q_1.i1n();
|
|
2703
2707
|
};
|
|
2704
|
-
protoOf(SRGB).
|
|
2705
|
-
return this.
|
|
2708
|
+
protoOf(SRGB).q2 = function () {
|
|
2709
|
+
return this.k1q_1.q2();
|
|
2706
2710
|
};
|
|
2707
|
-
protoOf(SRGB).
|
|
2708
|
-
return this.
|
|
2711
|
+
protoOf(SRGB).j1n = function () {
|
|
2712
|
+
return this.k1q_1.j1n();
|
|
2709
2713
|
};
|
|
2710
2714
|
protoOf(SRGB).equals = function (other) {
|
|
2711
|
-
return equals(RGBColorSpaces_getInstance().
|
|
2715
|
+
return equals(RGBColorSpaces_getInstance().p1o_1, other);
|
|
2712
2716
|
};
|
|
2713
2717
|
protoOf(SRGB).hashCode = function () {
|
|
2714
|
-
return hashCode(RGBColorSpaces_getInstance().
|
|
2718
|
+
return hashCode(RGBColorSpaces_getInstance().p1o_1);
|
|
2715
2719
|
};
|
|
2716
2720
|
protoOf(SRGB).toString = function () {
|
|
2717
2721
|
return 'sRGB';
|
|
@@ -2723,36 +2727,36 @@
|
|
|
2723
2727
|
return SRGB_instance;
|
|
2724
2728
|
}
|
|
2725
2729
|
function RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b, convertImpl) {
|
|
2726
|
-
this.
|
|
2727
|
-
this.
|
|
2728
|
-
this.
|
|
2729
|
-
this.
|
|
2730
|
-
this.
|
|
2731
|
-
this.
|
|
2732
|
-
this.
|
|
2733
|
-
this.
|
|
2734
|
-
this.
|
|
2735
|
-
this.
|
|
2730
|
+
this.v1r_1 = name;
|
|
2731
|
+
this.w1r_1 = whitePoint;
|
|
2732
|
+
this.x1r_1 = transferFunctions;
|
|
2733
|
+
this.y1r_1 = r;
|
|
2734
|
+
this.z1r_1 = g;
|
|
2735
|
+
this.a1s_1 = b;
|
|
2736
|
+
this.b1s_1 = convertImpl;
|
|
2737
|
+
this.c1s_1 = zeroOneComponentInfo('RGB');
|
|
2738
|
+
this.d1s_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.w1r_1, this.y1r_1, this.z1r_1, this.a1s_1));
|
|
2739
|
+
this.e1s_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.d1s_1)));
|
|
2736
2740
|
}
|
|
2737
|
-
protoOf(RGBColorSpaceImpl).
|
|
2738
|
-
return this.
|
|
2741
|
+
protoOf(RGBColorSpaceImpl).q2 = function () {
|
|
2742
|
+
return this.v1r_1;
|
|
2739
2743
|
};
|
|
2740
|
-
protoOf(RGBColorSpaceImpl).
|
|
2741
|
-
return this.
|
|
2744
|
+
protoOf(RGBColorSpaceImpl).i1n = function () {
|
|
2745
|
+
return this.w1r_1;
|
|
2742
2746
|
};
|
|
2743
|
-
protoOf(RGBColorSpaceImpl).
|
|
2744
|
-
return this.
|
|
2747
|
+
protoOf(RGBColorSpaceImpl).s1q = function () {
|
|
2748
|
+
return this.x1r_1;
|
|
2745
2749
|
};
|
|
2746
|
-
protoOf(RGBColorSpaceImpl).
|
|
2747
|
-
return this.
|
|
2750
|
+
protoOf(RGBColorSpaceImpl).j1n = function () {
|
|
2751
|
+
return this.c1s_1;
|
|
2748
2752
|
};
|
|
2749
|
-
protoOf(RGBColorSpaceImpl).
|
|
2750
|
-
return this.
|
|
2753
|
+
protoOf(RGBColorSpaceImpl).d1n = function (color) {
|
|
2754
|
+
return this.b1s_1(this, color);
|
|
2751
2755
|
};
|
|
2752
|
-
protoOf(RGBColorSpaceImpl).
|
|
2756
|
+
protoOf(RGBColorSpaceImpl).k1n = function (components) {
|
|
2753
2757
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
2754
2758
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
2755
|
-
var size = this.
|
|
2759
|
+
var size = this.j1n().m();
|
|
2756
2760
|
// Inline function 'kotlin.require' call
|
|
2757
2761
|
var containsLower = size - 1 | 0;
|
|
2758
2762
|
var containsArg = components.length;
|
|
@@ -2763,30 +2767,31 @@
|
|
|
2763
2767
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
2764
2768
|
}
|
|
2765
2769
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
2766
|
-
var
|
|
2767
|
-
var
|
|
2768
|
-
var
|
|
2770
|
+
var p0 = components[0];
|
|
2771
|
+
var p1 = components[1];
|
|
2772
|
+
var p2 = components[2];
|
|
2769
2773
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2774
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
2775
|
+
var tmp;
|
|
2776
|
+
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
2777
|
+
tmp = components[3];
|
|
2773
2778
|
} else {
|
|
2774
2779
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
2775
|
-
|
|
2780
|
+
tmp = 1.0;
|
|
2776
2781
|
}
|
|
2777
|
-
var
|
|
2778
|
-
return this.
|
|
2782
|
+
var p3 = tmp;
|
|
2783
|
+
return this.e1o(p0, p1, p2, p3);
|
|
2779
2784
|
};
|
|
2780
|
-
protoOf(RGBColorSpaceImpl).
|
|
2781
|
-
return this.
|
|
2785
|
+
protoOf(RGBColorSpaceImpl).q1r = function () {
|
|
2786
|
+
return this.d1s_1;
|
|
2782
2787
|
};
|
|
2783
|
-
protoOf(RGBColorSpaceImpl).
|
|
2784
|
-
return this.
|
|
2788
|
+
protoOf(RGBColorSpaceImpl).r1r = function () {
|
|
2789
|
+
return this.e1s_1;
|
|
2785
2790
|
};
|
|
2786
2791
|
protoOf(RGBColorSpaceImpl).toString = function () {
|
|
2787
|
-
return this.
|
|
2792
|
+
return this.v1r_1;
|
|
2788
2793
|
};
|
|
2789
|
-
protoOf(RGBColorSpaceImpl).
|
|
2794
|
+
protoOf(RGBColorSpaceImpl).e1o = function (r, g, b, alpha) {
|
|
2790
2795
|
return new RGB(r, g, b, alpha, this);
|
|
2791
2796
|
};
|
|
2792
2797
|
protoOf(RGBColorSpaceImpl).equals = function (other) {
|
|
@@ -2794,42 +2799,42 @@
|
|
|
2794
2799
|
return true;
|
|
2795
2800
|
if (!(!(other == null) ? isInterface(other, RGBColorSpace) : false))
|
|
2796
2801
|
return false;
|
|
2797
|
-
if (!(this.
|
|
2802
|
+
if (!(this.v1r_1 === other.q2()))
|
|
2798
2803
|
return false;
|
|
2799
|
-
if (!this.
|
|
2804
|
+
if (!this.w1r_1.equals(other.i1n()))
|
|
2800
2805
|
return false;
|
|
2801
|
-
if (!equals(this.
|
|
2806
|
+
if (!equals(this.x1r_1, other.s1q()))
|
|
2802
2807
|
return false;
|
|
2803
2808
|
if (other instanceof RGBColorSpaceImpl) {
|
|
2804
|
-
if (!this.
|
|
2809
|
+
if (!this.y1r_1.equals(other.y1r_1))
|
|
2805
2810
|
return false;
|
|
2806
|
-
if (!this.
|
|
2811
|
+
if (!this.z1r_1.equals(other.z1r_1))
|
|
2807
2812
|
return false;
|
|
2808
|
-
if (!this.
|
|
2813
|
+
if (!this.a1s_1.equals(other.a1s_1))
|
|
2809
2814
|
return false;
|
|
2810
2815
|
} else {
|
|
2811
|
-
if (!contentEquals(this.
|
|
2816
|
+
if (!contentEquals(this.d1s_1, other.q1r()))
|
|
2812
2817
|
return false;
|
|
2813
|
-
if (!contentEquals(this.
|
|
2818
|
+
if (!contentEquals(this.e1s_1, other.r1r()))
|
|
2814
2819
|
return false;
|
|
2815
2820
|
}
|
|
2816
2821
|
return true;
|
|
2817
2822
|
};
|
|
2818
2823
|
protoOf(RGBColorSpaceImpl).hashCode = function () {
|
|
2819
|
-
var result = getStringHashCode(this.
|
|
2820
|
-
result = imul(31, result) + this.
|
|
2821
|
-
result = imul(31, result) + hashCode(this.
|
|
2822
|
-
result = imul(31, result) + this.
|
|
2823
|
-
result = imul(31, result) + this.
|
|
2824
|
-
result = imul(31, result) + this.
|
|
2824
|
+
var result = getStringHashCode(this.v1r_1);
|
|
2825
|
+
result = imul(31, result) + this.w1r_1.hashCode() | 0;
|
|
2826
|
+
result = imul(31, result) + hashCode(this.x1r_1) | 0;
|
|
2827
|
+
result = imul(31, result) + this.y1r_1.hashCode() | 0;
|
|
2828
|
+
result = imul(31, result) + this.z1r_1.hashCode() | 0;
|
|
2829
|
+
result = imul(31, result) + this.a1s_1.hashCode() | 0;
|
|
2825
2830
|
return result;
|
|
2826
2831
|
};
|
|
2827
2832
|
function SRGBTransferFunctions() {
|
|
2828
2833
|
}
|
|
2829
|
-
protoOf(SRGBTransferFunctions).
|
|
2830
|
-
return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x,
|
|
2834
|
+
protoOf(SRGBTransferFunctions).c1r = function (x) {
|
|
2835
|
+
return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x, 1 / 2.4) - 0.055;
|
|
2831
2836
|
};
|
|
2832
|
-
protoOf(SRGBTransferFunctions).
|
|
2837
|
+
protoOf(SRGBTransferFunctions).b1r = function (x) {
|
|
2833
2838
|
return x <= 0.04045 ? x / 12.92 : spow_0((x + 0.055) / 1.055, 2.4);
|
|
2834
2839
|
};
|
|
2835
2840
|
var SRGBTransferFunctions_instance;
|
|
@@ -2842,18 +2847,18 @@
|
|
|
2842
2847
|
}
|
|
2843
2848
|
function ACESccTransferFunctions() {
|
|
2844
2849
|
ACESccTransferFunctions_instance = this;
|
|
2845
|
-
this.
|
|
2846
|
-
this.
|
|
2847
|
-
this.
|
|
2850
|
+
this.f1s_1 = 3.0517578125E-5;
|
|
2851
|
+
this.g1s_1 = 1.52587890625E-5;
|
|
2852
|
+
this.h1s_1 = -0.3013698630136986;
|
|
2848
2853
|
var tmp = this;
|
|
2849
2854
|
// Inline function 'kotlin.math.log2' call
|
|
2850
|
-
tmp.
|
|
2855
|
+
tmp.i1s_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
2851
2856
|
}
|
|
2852
|
-
protoOf(ACESccTransferFunctions).
|
|
2857
|
+
protoOf(ACESccTransferFunctions).b1r = function (x) {
|
|
2853
2858
|
var tmp;
|
|
2854
2859
|
if (x <= -0.3013698630136986) {
|
|
2855
2860
|
tmp = (spow_0(2.0, x * 17.52 - 9.72) - 1.52587890625E-5) * 2.0;
|
|
2856
|
-
} else if (x < this.
|
|
2861
|
+
} else if (x < this.i1s_1) {
|
|
2857
2862
|
// Inline function 'kotlin.math.pow' call
|
|
2858
2863
|
var x_0 = x * 17.52 - 9.72;
|
|
2859
2864
|
tmp = Math.pow(2.0, x_0);
|
|
@@ -2862,7 +2867,7 @@
|
|
|
2862
2867
|
}
|
|
2863
2868
|
return tmp;
|
|
2864
2869
|
};
|
|
2865
|
-
protoOf(ACESccTransferFunctions).
|
|
2870
|
+
protoOf(ACESccTransferFunctions).c1r = function (x) {
|
|
2866
2871
|
var tmp;
|
|
2867
2872
|
if (x < 3.0517578125E-5) {
|
|
2868
2873
|
// Inline function 'kotlin.math.log2' call
|
|
@@ -2882,17 +2887,17 @@
|
|
|
2882
2887
|
}
|
|
2883
2888
|
function ACEScctTransferFunctions() {
|
|
2884
2889
|
ACEScctTransferFunctions_instance = this;
|
|
2885
|
-
this.
|
|
2886
|
-
this.
|
|
2890
|
+
this.j1s_1 = 10.5402377416545;
|
|
2891
|
+
this.k1s_1 = 0.0729055341958355;
|
|
2887
2892
|
var tmp = this;
|
|
2888
2893
|
// Inline function 'kotlin.math.log2' call
|
|
2889
|
-
tmp.
|
|
2894
|
+
tmp.l1s_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
2890
2895
|
}
|
|
2891
|
-
protoOf(ACEScctTransferFunctions).
|
|
2896
|
+
protoOf(ACEScctTransferFunctions).b1r = function (x) {
|
|
2892
2897
|
var tmp;
|
|
2893
2898
|
if (x <= 0.155251141552511) {
|
|
2894
2899
|
tmp = (x - 0.0729055341958355) / 10.5402377416545;
|
|
2895
|
-
} else if (x < this.
|
|
2900
|
+
} else if (x < this.l1s_1) {
|
|
2896
2901
|
// Inline function 'kotlin.math.pow' call
|
|
2897
2902
|
var x_0 = x * 17.52 - 9.72;
|
|
2898
2903
|
tmp = Math.pow(2.0, x_0);
|
|
@@ -2901,7 +2906,7 @@
|
|
|
2901
2906
|
}
|
|
2902
2907
|
return tmp;
|
|
2903
2908
|
};
|
|
2904
|
-
protoOf(ACEScctTransferFunctions).
|
|
2909
|
+
protoOf(ACEScctTransferFunctions).c1r = function (x) {
|
|
2905
2910
|
var tmp;
|
|
2906
2911
|
if (x < 0.0078125) {
|
|
2907
2912
|
tmp = 10.5402377416545 * x + 0.0729055341958355;
|
|
@@ -2919,17 +2924,17 @@
|
|
|
2919
2924
|
}
|
|
2920
2925
|
function BT2020TransferFunctions() {
|
|
2921
2926
|
BT2020TransferFunctions_instance = this;
|
|
2922
|
-
this.
|
|
2923
|
-
this.
|
|
2927
|
+
this.m1s_1 = 1.0993;
|
|
2928
|
+
this.n1s_1 = 0.0181;
|
|
2924
2929
|
var tmp = this;
|
|
2925
2930
|
// Inline function 'kotlin.math.pow' call
|
|
2926
|
-
tmp.
|
|
2931
|
+
tmp.o1s_1 = 1.0993 * Math.pow(0.0181, 0.45) - (1.0993 - 1);
|
|
2927
2932
|
}
|
|
2928
|
-
protoOf(BT2020TransferFunctions).
|
|
2929
|
-
return numberToDouble(x < this.
|
|
2933
|
+
protoOf(BT2020TransferFunctions).b1r = function (x) {
|
|
2934
|
+
return numberToDouble(x < this.o1s_1 ? x / 4.5 : spow_0((x + (1.0993 - 1)) / 1.0993, 1 / 0.45));
|
|
2930
2935
|
};
|
|
2931
|
-
protoOf(BT2020TransferFunctions).
|
|
2932
|
-
return x < 0.0181 ? 4.5 * x : 1.0993 * spow(x, 0.45) -
|
|
2936
|
+
protoOf(BT2020TransferFunctions).c1r = function (x) {
|
|
2937
|
+
return x < 0.0181 ? 4.5 * x : 1.0993 * spow(x, 0.45) - (1.0993 - 1);
|
|
2933
2938
|
};
|
|
2934
2939
|
var BT2020TransferFunctions_instance;
|
|
2935
2940
|
function BT2020TransferFunctions_getInstance() {
|
|
@@ -2939,12 +2944,12 @@
|
|
|
2939
2944
|
}
|
|
2940
2945
|
function BT709TransferFunctions() {
|
|
2941
2946
|
BT709TransferFunctions_instance = this;
|
|
2942
|
-
this.
|
|
2947
|
+
this.p1s_1 = 1.099 * spow_0(0.018, 0.45) - 0.099;
|
|
2943
2948
|
}
|
|
2944
|
-
protoOf(BT709TransferFunctions).
|
|
2945
|
-
return numberToDouble(x < this.
|
|
2949
|
+
protoOf(BT709TransferFunctions).b1r = function (x) {
|
|
2950
|
+
return numberToDouble(x < this.p1s_1 ? x / 4.5 : spow_0((x + 0.099) / 1.099, 1 / 0.45));
|
|
2946
2951
|
};
|
|
2947
|
-
protoOf(BT709TransferFunctions).
|
|
2952
|
+
protoOf(BT709TransferFunctions).c1r = function (x) {
|
|
2948
2953
|
return x < 0.018 ? 4.5 * x : 1.099 * spow(x, 0.45) - 0.099;
|
|
2949
2954
|
};
|
|
2950
2955
|
var BT709TransferFunctions_instance;
|
|
@@ -2954,13 +2959,13 @@
|
|
|
2954
2959
|
return BT709TransferFunctions_instance;
|
|
2955
2960
|
}
|
|
2956
2961
|
function ROMMTransferFunctions() {
|
|
2957
|
-
this.
|
|
2962
|
+
this.q1s_1 = 0.001953;
|
|
2958
2963
|
}
|
|
2959
|
-
protoOf(ROMMTransferFunctions).
|
|
2960
|
-
return x < 0.
|
|
2964
|
+
protoOf(ROMMTransferFunctions).b1r = function (x) {
|
|
2965
|
+
return x < 16 * 0.001953 ? x / 16.0 : spow(x, 1.8);
|
|
2961
2966
|
};
|
|
2962
|
-
protoOf(ROMMTransferFunctions).
|
|
2963
|
-
return x < 0.001953 ? x * 16.0 : spow(x, 0.
|
|
2967
|
+
protoOf(ROMMTransferFunctions).c1r = function (x) {
|
|
2968
|
+
return x < 0.001953 ? x * 16.0 : spow(x, 1.0 / 1.8);
|
|
2964
2969
|
};
|
|
2965
2970
|
var ROMMTransferFunctions_instance;
|
|
2966
2971
|
function ROMMTransferFunctions_getInstance() {
|
|
@@ -2968,26 +2973,26 @@
|
|
|
2968
2973
|
}
|
|
2969
2974
|
function rgbToXyzMatrix(whitePoint, r, g, b) {
|
|
2970
2975
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
2971
|
-
var primaries = _Matrix___init__impl__q3kp4w_0(r.
|
|
2972
|
-
var wp = whitePoint.
|
|
2976
|
+
var primaries = _Matrix___init__impl__q3kp4w_0(r.f1r_1, g.f1r_1, b.f1r_1, r.g1r_1, g.g1r_1, b.g1r_1, r.r1s(), g.r1s(), b.r1s());
|
|
2977
|
+
var wp = whitePoint.g1q_1;
|
|
2973
2978
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
2974
2979
|
var this_0 = inverse(primaries);
|
|
2975
|
-
var v0 = wp.
|
|
2976
|
-
var v1 = wp.
|
|
2977
|
-
var v2 = wp.
|
|
2980
|
+
var v0 = wp.i1r();
|
|
2981
|
+
var v1 = wp.h1r_1;
|
|
2982
|
+
var v2 = wp.j1r();
|
|
2978
2983
|
// Inline function 'com.github.ajalt.colormath.model.rgbToXyzMatrix.<anonymous>' call
|
|
2979
2984
|
var x = Matrix__get_impl_xogbpk(this_0, 0, 0) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 0) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 0) * v2;
|
|
2980
2985
|
var y = Matrix__get_impl_xogbpk(this_0, 0, 1) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 1) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 1) * v2;
|
|
2981
2986
|
var z = Matrix__get_impl_xogbpk(this_0, 0, 2) * v0 + Matrix__get_impl_xogbpk(this_0, 1, 2) * v1 + Matrix__get_impl_xogbpk(this_0, 2, 2) * v2;
|
|
2982
2987
|
return dotDiagonal(primaries, x, y, z);
|
|
2983
2988
|
}
|
|
2984
|
-
function RGBColorSpace$lambda($this
|
|
2989
|
+
function RGBColorSpace$lambda($this$RGBColorSpaceImpl, color) {
|
|
2985
2990
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
2986
2991
|
var tmp;
|
|
2987
2992
|
if (color instanceof RGB) {
|
|
2988
|
-
tmp = color.
|
|
2993
|
+
tmp = color.s1r($this$RGBColorSpaceImpl);
|
|
2989
2994
|
} else {
|
|
2990
|
-
tmp = color.
|
|
2995
|
+
tmp = color.j1m().u1r($this$RGBColorSpaceImpl);
|
|
2991
2996
|
}
|
|
2992
2997
|
return tmp;
|
|
2993
2998
|
}
|
|
@@ -3013,6 +3018,61 @@
|
|
|
3013
3018
|
function _RGBInt___get_argb__impl__xiee7i($this) {
|
|
3014
3019
|
return $this;
|
|
3015
3020
|
}
|
|
3021
|
+
function Companion_7() {
|
|
3022
|
+
Companion_instance_8 = this;
|
|
3023
|
+
this.s1s_1 = threeComponentInfo('R', 0.0, 255.0, 'G', 0.0, 255.0, 'B', 0.0, 255.0);
|
|
3024
|
+
}
|
|
3025
|
+
protoOf(Companion_7).q2 = function () {
|
|
3026
|
+
return 'RGBInt';
|
|
3027
|
+
};
|
|
3028
|
+
protoOf(Companion_7).j1n = function () {
|
|
3029
|
+
return this.s1s_1;
|
|
3030
|
+
};
|
|
3031
|
+
protoOf(Companion_7).t1s = function (color) {
|
|
3032
|
+
return color.c1m().m1p();
|
|
3033
|
+
};
|
|
3034
|
+
protoOf(Companion_7).d1n = function (color) {
|
|
3035
|
+
return new RGBInt(this.t1s(color));
|
|
3036
|
+
};
|
|
3037
|
+
protoOf(Companion_7).u1s = function (components) {
|
|
3038
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
3039
|
+
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
3040
|
+
var size = this.j1n().m();
|
|
3041
|
+
// Inline function 'kotlin.require' call
|
|
3042
|
+
var containsLower = size - 1 | 0;
|
|
3043
|
+
var containsArg = components.length;
|
|
3044
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
3045
|
+
if (!(containsLower <= containsArg ? containsArg <= size : false)) {
|
|
3046
|
+
// Inline function 'com.github.ajalt.colormath.internal.withValidComps.<anonymous>' call
|
|
3047
|
+
var message = 'Invalid component array length: ' + components.length + ', expected ' + (size - 1 | 0) + ' or ' + size;
|
|
3048
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
3049
|
+
}
|
|
3050
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
3051
|
+
// Inline function 'com.github.ajalt.colormath.model.Companion.create.<anonymous>' call
|
|
3052
|
+
var r = components[0];
|
|
3053
|
+
var g = components[1];
|
|
3054
|
+
var b = components[2];
|
|
3055
|
+
// Inline function 'kotlin.collections.getOrElse' call
|
|
3056
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
3057
|
+
var tmp;
|
|
3058
|
+
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
3059
|
+
tmp = components[3];
|
|
3060
|
+
} else {
|
|
3061
|
+
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
3062
|
+
tmp = 1.0;
|
|
3063
|
+
}
|
|
3064
|
+
var a = tmp;
|
|
3065
|
+
return _RGBInt___init__impl__lqova7_0(numberToInt(r), numberToInt(g), numberToInt(b), numberToInt(a));
|
|
3066
|
+
};
|
|
3067
|
+
protoOf(Companion_7).k1n = function (components) {
|
|
3068
|
+
return new RGBInt(this.u1s(components));
|
|
3069
|
+
};
|
|
3070
|
+
var Companion_instance_8;
|
|
3071
|
+
function Companion_getInstance_7() {
|
|
3072
|
+
if (Companion_instance_8 == null)
|
|
3073
|
+
new Companion_7();
|
|
3074
|
+
return Companion_instance_8;
|
|
3075
|
+
}
|
|
3016
3076
|
function _RGBInt___init__impl__lqova7_0(r, g, b, alpha) {
|
|
3017
3077
|
alpha = alpha === VOID ? 255 : alpha;
|
|
3018
3078
|
// Inline function 'kotlin.UInt.or' call
|
|
@@ -3074,6 +3134,17 @@
|
|
|
3074
3134
|
var tmp$ret$3 = roundToInt(this_3);
|
|
3075
3135
|
return _RGBInt___init__impl__lqova7_0(tmp_0, tmp_2, tmp_4, coerceIn_0(tmp$ret$3, 0, 255));
|
|
3076
3136
|
}
|
|
3137
|
+
function _RGBInt___get_alpha__impl__yl2tay($this) {
|
|
3138
|
+
// Inline function 'kotlin.UByte.toFloat' call
|
|
3139
|
+
// Inline function 'kotlin.uintToFloat' call
|
|
3140
|
+
// Inline function 'kotlin.UByte.toInt' call
|
|
3141
|
+
var this_0 = _RGBInt___get_a__impl__6mfe7x($this);
|
|
3142
|
+
var value = _UByte___get_data__impl__jof9qr(this_0) & 255;
|
|
3143
|
+
return uintToDouble(value) / 255.0;
|
|
3144
|
+
}
|
|
3145
|
+
function _RGBInt___get_space__impl__emgnsy($this) {
|
|
3146
|
+
return Companion_getInstance_7();
|
|
3147
|
+
}
|
|
3077
3148
|
function _RGBInt___get_r__impl__dulq0e($this) {
|
|
3078
3149
|
// Inline function 'kotlin.UInt.toUByte' call
|
|
3079
3150
|
// Inline function 'kotlin.UInt.shr' call
|
|
@@ -3101,163 +3172,256 @@
|
|
|
3101
3172
|
var this_2 = _UInt___get_data__impl__f0vqqw(this_1);
|
|
3102
3173
|
return _UByte___init__impl__g9hnc4(toByte(this_2));
|
|
3103
3174
|
}
|
|
3104
|
-
function
|
|
3105
|
-
|
|
3106
|
-
|
|
3175
|
+
function _RGBInt___get_a__impl__6mfe7x($this) {
|
|
3176
|
+
// Inline function 'kotlin.UInt.toUByte' call
|
|
3177
|
+
// Inline function 'kotlin.UInt.shr' call
|
|
3178
|
+
var this_0 = _RGBInt___get_argb__impl__xiee7i($this);
|
|
3179
|
+
var this_1 = _UInt___init__impl__l7qpdl(_UInt___get_data__impl__f0vqqw(this_0) >>> 24 | 0);
|
|
3180
|
+
// Inline function 'kotlin.toUByte' call
|
|
3181
|
+
var this_2 = _UInt___get_data__impl__f0vqqw(this_1);
|
|
3182
|
+
return _UByte___init__impl__g9hnc4(toByte(this_2));
|
|
3183
|
+
}
|
|
3184
|
+
function _RGBInt___get_redFloat__impl__lnt6cx($this) {
|
|
3185
|
+
// Inline function 'kotlin.UByte.toInt' call
|
|
3186
|
+
var this_0 = _RGBInt___get_r__impl__dulq0e($this);
|
|
3187
|
+
return (_UByte___get_data__impl__jof9qr(this_0) & 255) / 255.0;
|
|
3107
3188
|
}
|
|
3108
|
-
|
|
3109
|
-
|
|
3189
|
+
function _RGBInt___get_greenFloat__impl__opq1mn($this) {
|
|
3190
|
+
// Inline function 'kotlin.UByte.toInt' call
|
|
3191
|
+
var this_0 = _RGBInt___get_g__impl__o93c71($this);
|
|
3192
|
+
return (_UByte___get_data__impl__jof9qr(this_0) & 255) / 255.0;
|
|
3193
|
+
}
|
|
3194
|
+
function _RGBInt___get_blueFloat__impl__jt6mw2($this) {
|
|
3195
|
+
// Inline function 'kotlin.UByte.toInt' call
|
|
3196
|
+
var this_0 = _RGBInt___get_b__impl__m772ua($this);
|
|
3197
|
+
return (_UByte___get_data__impl__jof9qr(this_0) & 255) / 255.0;
|
|
3198
|
+
}
|
|
3199
|
+
function RGBInt__toSRGB_impl_m0acyy($this) {
|
|
3200
|
+
return Companion_getInstance_6().e1o(_RGBInt___get_redFloat__impl__lnt6cx($this), _RGBInt___get_greenFloat__impl__opq1mn($this), _RGBInt___get_blueFloat__impl__jt6mw2($this), _RGBInt___get_alpha__impl__yl2tay($this));
|
|
3201
|
+
}
|
|
3202
|
+
function RGBInt__toArray_impl_73rlu9($this) {
|
|
3203
|
+
// Inline function 'kotlin.floatArrayOf' call
|
|
3204
|
+
// Inline function 'kotlin.UByte.toFloat' call
|
|
3205
|
+
// Inline function 'kotlin.uintToFloat' call
|
|
3206
|
+
// Inline function 'kotlin.UByte.toInt' call
|
|
3207
|
+
var this_0 = _RGBInt___get_r__impl__dulq0e($this);
|
|
3208
|
+
var value = _UByte___get_data__impl__jof9qr(this_0) & 255;
|
|
3209
|
+
var tmp = uintToDouble(value);
|
|
3210
|
+
// Inline function 'kotlin.UByte.toFloat' call
|
|
3211
|
+
// Inline function 'kotlin.uintToFloat' call
|
|
3212
|
+
// Inline function 'kotlin.UByte.toInt' call
|
|
3213
|
+
var this_1 = _RGBInt___get_g__impl__o93c71($this);
|
|
3214
|
+
var value_0 = _UByte___get_data__impl__jof9qr(this_1) & 255;
|
|
3215
|
+
var tmp_0 = uintToDouble(value_0);
|
|
3216
|
+
// Inline function 'kotlin.UByte.toFloat' call
|
|
3217
|
+
// Inline function 'kotlin.uintToFloat' call
|
|
3218
|
+
// Inline function 'kotlin.UByte.toInt' call
|
|
3219
|
+
var this_2 = _RGBInt___get_b__impl__m772ua($this);
|
|
3220
|
+
var value_1 = _UByte___get_data__impl__jof9qr(this_2) & 255;
|
|
3221
|
+
var tmp_1 = uintToDouble(value_1);
|
|
3222
|
+
// Inline function 'kotlin.UByte.toFloat' call
|
|
3223
|
+
// Inline function 'kotlin.uintToFloat' call
|
|
3224
|
+
// Inline function 'kotlin.UByte.toInt' call
|
|
3225
|
+
var this_3 = _RGBInt___get_a__impl__6mfe7x($this);
|
|
3226
|
+
var value_2 = _UByte___get_data__impl__jof9qr(this_3) & 255;
|
|
3227
|
+
var tmp$ret$11 = uintToDouble(value_2);
|
|
3228
|
+
return new Float32Array([tmp, tmp_0, tmp_1, tmp$ret$11]);
|
|
3229
|
+
}
|
|
3230
|
+
function RGBInt__toString_impl_cf5r29($this) {
|
|
3231
|
+
return 'RGBInt(argb=' + new UInt($this) + ')';
|
|
3232
|
+
}
|
|
3233
|
+
function RGBInt__hashCode_impl_y6bnv4($this) {
|
|
3234
|
+
return UInt__hashCode_impl_z2mhuw($this);
|
|
3235
|
+
}
|
|
3236
|
+
function RGBInt__equals_impl_qmmpmc($this, other) {
|
|
3237
|
+
if (!(other instanceof RGBInt))
|
|
3238
|
+
return false;
|
|
3239
|
+
if (!($this === (other instanceof RGBInt ? other.t1r_1 : THROW_CCE())))
|
|
3240
|
+
return false;
|
|
3241
|
+
return true;
|
|
3242
|
+
}
|
|
3243
|
+
function RGBInt(argb) {
|
|
3244
|
+
Companion_getInstance_7();
|
|
3245
|
+
this.t1r_1 = argb;
|
|
3246
|
+
}
|
|
3247
|
+
protoOf(RGBInt).a1m = function () {
|
|
3248
|
+
return _RGBInt___get_alpha__impl__yl2tay(this.t1r_1);
|
|
3110
3249
|
};
|
|
3111
|
-
protoOf(
|
|
3112
|
-
return this.
|
|
3250
|
+
protoOf(RGBInt).b1m = function () {
|
|
3251
|
+
return _RGBInt___get_space__impl__emgnsy(this.t1r_1);
|
|
3113
3252
|
};
|
|
3114
|
-
protoOf(
|
|
3115
|
-
return this.
|
|
3253
|
+
protoOf(RGBInt).c1m = function () {
|
|
3254
|
+
return RGBInt__toSRGB_impl_m0acyy(this.t1r_1);
|
|
3116
3255
|
};
|
|
3117
|
-
protoOf(
|
|
3118
|
-
return this.
|
|
3256
|
+
protoOf(RGBInt).u5 = function () {
|
|
3257
|
+
return RGBInt__toArray_impl_73rlu9(this.t1r_1);
|
|
3119
3258
|
};
|
|
3120
|
-
protoOf(
|
|
3121
|
-
return this.
|
|
3259
|
+
protoOf(RGBInt).toString = function () {
|
|
3260
|
+
return RGBInt__toString_impl_cf5r29(this.t1r_1);
|
|
3122
3261
|
};
|
|
3123
|
-
protoOf(
|
|
3124
|
-
return this.
|
|
3262
|
+
protoOf(RGBInt).hashCode = function () {
|
|
3263
|
+
return RGBInt__hashCode_impl_y6bnv4(this.t1r_1);
|
|
3125
3264
|
};
|
|
3126
|
-
protoOf(
|
|
3127
|
-
return this.
|
|
3265
|
+
protoOf(RGBInt).equals = function (other) {
|
|
3266
|
+
return RGBInt__equals_impl_qmmpmc(this.t1r_1, other);
|
|
3128
3267
|
};
|
|
3129
|
-
|
|
3130
|
-
|
|
3268
|
+
function Companion_8() {
|
|
3269
|
+
Companion_instance_9 = this;
|
|
3270
|
+
this.o1r_1 = XYZColorSpaces_getInstance().b1p_1;
|
|
3271
|
+
}
|
|
3272
|
+
protoOf(Companion_8).e1o = function (x, y, z, alpha) {
|
|
3273
|
+
return this.o1r_1.e1o(x, y, z, alpha);
|
|
3131
3274
|
};
|
|
3132
|
-
protoOf(
|
|
3133
|
-
return
|
|
3275
|
+
protoOf(Companion_8).d1r = function (x, y, z, alpha) {
|
|
3276
|
+
return this.o1r_1.d1r(x, y, z, alpha);
|
|
3134
3277
|
};
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
return
|
|
3278
|
+
protoOf(Companion_8).d1n = function (color) {
|
|
3279
|
+
return this.o1r_1.d1n(color);
|
|
3280
|
+
};
|
|
3281
|
+
protoOf(Companion_8).k1n = function (components) {
|
|
3282
|
+
return this.o1r_1.k1n(components);
|
|
3283
|
+
};
|
|
3284
|
+
protoOf(Companion_8).i1n = function () {
|
|
3285
|
+
return this.o1r_1.i1n();
|
|
3286
|
+
};
|
|
3287
|
+
protoOf(Companion_8).q2 = function () {
|
|
3288
|
+
return this.o1r_1.q2();
|
|
3289
|
+
};
|
|
3290
|
+
protoOf(Companion_8).j1n = function () {
|
|
3291
|
+
return this.o1r_1.j1n();
|
|
3292
|
+
};
|
|
3293
|
+
protoOf(Companion_8).hashCode = function () {
|
|
3294
|
+
return hashCode(XYZColorSpaces_getInstance().b1p_1);
|
|
3295
|
+
};
|
|
3296
|
+
protoOf(Companion_8).equals = function (other) {
|
|
3297
|
+
return equals(XYZColorSpaces_getInstance().b1p_1, other);
|
|
3298
|
+
};
|
|
3299
|
+
var Companion_instance_9;
|
|
3300
|
+
function Companion_getInstance_8() {
|
|
3301
|
+
if (Companion_instance_9 == null)
|
|
3302
|
+
new Companion_8();
|
|
3303
|
+
return Companion_instance_9;
|
|
3140
3304
|
}
|
|
3141
3305
|
function adaptToM($this, space, m, mi) {
|
|
3142
|
-
if (space.
|
|
3306
|
+
if (space.i1n().equals($this.p1m_1.i1n()))
|
|
3143
3307
|
return $this;
|
|
3144
|
-
var transform = chromaticAdaptationMatrix(space, $this.
|
|
3308
|
+
var transform = chromaticAdaptationMatrix(space, $this.p1m_1.i1n().g1q_1, m, mi);
|
|
3145
3309
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
3146
|
-
var v0 = $this.
|
|
3147
|
-
var v1 = $this.
|
|
3148
|
-
var v2 = $this.
|
|
3310
|
+
var v0 = $this.l1m_1;
|
|
3311
|
+
var v1 = $this.m1m_1;
|
|
3312
|
+
var v2 = $this.n1m_1;
|
|
3149
3313
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.adaptToM.<anonymous>' call
|
|
3150
3314
|
var xx = Matrix__get_impl_xogbpk(transform, 0, 0) * v0 + Matrix__get_impl_xogbpk(transform, 1, 0) * v1 + Matrix__get_impl_xogbpk(transform, 2, 0) * v2;
|
|
3151
3315
|
var yy = Matrix__get_impl_xogbpk(transform, 0, 1) * v0 + Matrix__get_impl_xogbpk(transform, 1, 1) * v1 + Matrix__get_impl_xogbpk(transform, 2, 1) * v2;
|
|
3152
3316
|
var zz = Matrix__get_impl_xogbpk(transform, 0, 2) * v0 + Matrix__get_impl_xogbpk(transform, 1, 2) * v1 + Matrix__get_impl_xogbpk(transform, 2, 2) * v2;
|
|
3153
|
-
return space.
|
|
3317
|
+
return space.e1o(xx, yy, zz, $this.o1m_1);
|
|
3154
3318
|
}
|
|
3155
3319
|
function toLAB$f(t) {
|
|
3156
3320
|
var tmp;
|
|
3157
|
-
if (t >
|
|
3321
|
+
if (t > 0.008856451679035631) {
|
|
3158
3322
|
// Inline function 'kotlin.math.cbrt' call
|
|
3159
3323
|
tmp = Math.cbrt(t);
|
|
3160
3324
|
} else {
|
|
3161
|
-
tmp = (t *
|
|
3325
|
+
tmp = (t * 903.2962962962963 + 16) / 116;
|
|
3162
3326
|
}
|
|
3163
3327
|
return tmp;
|
|
3164
3328
|
}
|
|
3165
3329
|
function XYZ(x, y, z, alpha, space) {
|
|
3166
|
-
|
|
3167
|
-
this.
|
|
3168
|
-
this.
|
|
3169
|
-
this.
|
|
3170
|
-
this.
|
|
3171
|
-
this.
|
|
3330
|
+
Companion_getInstance_8();
|
|
3331
|
+
this.l1m_1 = x;
|
|
3332
|
+
this.m1m_1 = y;
|
|
3333
|
+
this.n1m_1 = z;
|
|
3334
|
+
this.o1m_1 = alpha;
|
|
3335
|
+
this.p1m_1 = space;
|
|
3172
3336
|
}
|
|
3173
|
-
protoOf(XYZ).
|
|
3174
|
-
return this.
|
|
3337
|
+
protoOf(XYZ).a1m = function () {
|
|
3338
|
+
return this.o1m_1;
|
|
3175
3339
|
};
|
|
3176
|
-
protoOf(XYZ).
|
|
3177
|
-
return this.
|
|
3340
|
+
protoOf(XYZ).b1m = function () {
|
|
3341
|
+
return this.p1m_1;
|
|
3178
3342
|
};
|
|
3179
|
-
protoOf(XYZ).
|
|
3343
|
+
protoOf(XYZ).d1p = function (space) {
|
|
3180
3344
|
return adaptToM(this, space, get_CAT02_XYZ_TO_LMS(), get_CAT02_LMS_TO_XYZ());
|
|
3181
3345
|
};
|
|
3182
|
-
protoOf(XYZ).
|
|
3183
|
-
var
|
|
3184
|
-
var x =
|
|
3185
|
-
var y =
|
|
3186
|
-
var z =
|
|
3187
|
-
var f = space.
|
|
3346
|
+
protoOf(XYZ).u1r = function (space) {
|
|
3347
|
+
var _destruct__k2r9zo = this.d1p(XYZColorSpace_0(space.i1n()));
|
|
3348
|
+
var x = _destruct__k2r9zo.lf();
|
|
3349
|
+
var y = _destruct__k2r9zo.mf();
|
|
3350
|
+
var z = _destruct__k2r9zo.v1s();
|
|
3351
|
+
var f = space.s1q();
|
|
3188
3352
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
3189
|
-
var this_0 = _Matrix___init__impl__q3kp4w(space.
|
|
3353
|
+
var this_0 = _Matrix___init__impl__q3kp4w(space.r1r());
|
|
3190
3354
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.toRGB.<anonymous>' call
|
|
3191
3355
|
var r = Matrix__get_impl_xogbpk(this_0, 0, 0) * x + Matrix__get_impl_xogbpk(this_0, 1, 0) * y + Matrix__get_impl_xogbpk(this_0, 2, 0) * z;
|
|
3192
3356
|
var g = Matrix__get_impl_xogbpk(this_0, 0, 1) * x + Matrix__get_impl_xogbpk(this_0, 1, 1) * y + Matrix__get_impl_xogbpk(this_0, 2, 1) * z;
|
|
3193
3357
|
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;
|
|
3194
|
-
return space.
|
|
3358
|
+
return space.e1o(f.c1r(r), f.c1r(g), f.c1r(b), this.o1m_1);
|
|
3195
3359
|
};
|
|
3196
|
-
protoOf(XYZ).
|
|
3197
|
-
return this.
|
|
3360
|
+
protoOf(XYZ).c1m = function () {
|
|
3361
|
+
return this.u1r(RGBColorSpaces_getInstance().p1o_1);
|
|
3198
3362
|
};
|
|
3199
|
-
protoOf(XYZ).
|
|
3200
|
-
var fx = toLAB$f(this.
|
|
3201
|
-
var fy = toLAB$f(this.
|
|
3202
|
-
var fz = toLAB$f(this.
|
|
3363
|
+
protoOf(XYZ).k1m = function () {
|
|
3364
|
+
var fx = toLAB$f(this.l1m_1 / this.p1m_1.i1n().g1q_1.i1r());
|
|
3365
|
+
var fy = toLAB$f(this.m1m_1 / this.p1m_1.i1n().g1q_1.h1r_1);
|
|
3366
|
+
var fz = toLAB$f(this.n1m_1 / this.p1m_1.i1n().g1q_1.j1r());
|
|
3203
3367
|
var l = 116 * fy - 16;
|
|
3204
3368
|
var a = 500 * (fx - fy);
|
|
3205
3369
|
var b = 200 * (fy - fz);
|
|
3206
|
-
return LABColorSpace_0(this.
|
|
3370
|
+
return LABColorSpace_0(this.p1m_1.i1n()).d1r(l, a, b, this.o1m_1);
|
|
3207
3371
|
};
|
|
3208
|
-
protoOf(XYZ).
|
|
3372
|
+
protoOf(XYZ).x1m = function () {
|
|
3209
3373
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.toD65' call
|
|
3210
3374
|
var tmp;
|
|
3211
|
-
if (equals(this.
|
|
3212
|
-
var l = 0.8189330101 * this.
|
|
3213
|
-
var m = 0.0329845436 * this.
|
|
3214
|
-
var s = 0.0482003018 * this.
|
|
3375
|
+
if (equals(this.p1m_1, XYZColorSpaces_getInstance().b1p_1)) {
|
|
3376
|
+
var l = +0.8189330101 * this.l1m_1 + 0.3618667424 * this.m1m_1 - 0.1288597137 * this.n1m_1;
|
|
3377
|
+
var m = +0.0329845436 * this.l1m_1 + 0.9293118715 * this.m1m_1 + 0.0361456387 * this.n1m_1;
|
|
3378
|
+
var s = +0.0482003018 * this.l1m_1 + 0.2643662691 * this.m1m_1 + 0.633851707 * this.n1m_1;
|
|
3215
3379
|
// Inline function 'kotlin.math.cbrt' call
|
|
3216
3380
|
var ll = Math.cbrt(l);
|
|
3217
3381
|
// Inline function 'kotlin.math.cbrt' call
|
|
3218
3382
|
var mm = Math.cbrt(m);
|
|
3219
3383
|
// Inline function 'kotlin.math.cbrt' call
|
|
3220
3384
|
var ss = Math.cbrt(s);
|
|
3221
|
-
return Oklab_init_$Create$(0.2104542553 * ll + 0.793617785 * mm - 0.0040720468 * ss, 1.9779984951 * ll - 2.428592205 * mm + 0.4505937099 * ss, 0.0259040371 * ll + 0.7827717662 * mm - 0.808675766 * ss, this.
|
|
3385
|
+
return Oklab_init_$Create$(+0.2104542553 * ll + 0.793617785 * mm - 0.0040720468 * ss, +1.9779984951 * ll - 2.428592205 * mm + 0.4505937099 * ss, +0.0259040371 * ll + 0.7827717662 * mm - 0.808675766 * ss, this.o1m_1);
|
|
3222
3386
|
} else {
|
|
3223
|
-
var $this$toD65 = this.
|
|
3224
|
-
var l_0 = 0.8189330101 * $this$toD65.
|
|
3225
|
-
var m_0 = 0.0329845436 * $this$toD65.
|
|
3226
|
-
var s_0 = 0.0482003018 * $this$toD65.
|
|
3387
|
+
var $this$toD65 = this.d1p(XYZColorSpaces_getInstance().b1p_1);
|
|
3388
|
+
var l_0 = +0.8189330101 * $this$toD65.l1m_1 + 0.3618667424 * $this$toD65.m1m_1 - 0.1288597137 * $this$toD65.n1m_1;
|
|
3389
|
+
var m_0 = +0.0329845436 * $this$toD65.l1m_1 + 0.9293118715 * $this$toD65.m1m_1 + 0.0361456387 * $this$toD65.n1m_1;
|
|
3390
|
+
var s_0 = +0.0482003018 * $this$toD65.l1m_1 + 0.2643662691 * $this$toD65.m1m_1 + 0.633851707 * $this$toD65.n1m_1;
|
|
3227
3391
|
// Inline function 'kotlin.math.cbrt' call
|
|
3228
3392
|
var ll_0 = Math.cbrt(l_0);
|
|
3229
3393
|
// Inline function 'kotlin.math.cbrt' call
|
|
3230
3394
|
var mm_0 = Math.cbrt(m_0);
|
|
3231
3395
|
// Inline function 'kotlin.math.cbrt' call
|
|
3232
3396
|
var ss_0 = Math.cbrt(s_0);
|
|
3233
|
-
return Oklab_init_$Create$(0.2104542553 * ll_0 + 0.793617785 * mm_0 - 0.0040720468 * ss_0, 1.9779984951 * ll_0 - 2.428592205 * mm_0 + 0.4505937099 * ss_0, 0.0259040371 * ll_0 + 0.7827717662 * mm_0 - 0.808675766 * ss_0, $this$toD65.
|
|
3397
|
+
return Oklab_init_$Create$(+0.2104542553 * ll_0 + 0.793617785 * mm_0 - 0.0040720468 * ss_0, +1.9779984951 * ll_0 - 2.428592205 * mm_0 + 0.4505937099 * ss_0, +0.0259040371 * ll_0 + 0.7827717662 * mm_0 - 0.808675766 * ss_0, $this$toD65.o1m_1);
|
|
3234
3398
|
}
|
|
3235
3399
|
};
|
|
3236
|
-
protoOf(XYZ).
|
|
3400
|
+
protoOf(XYZ).j1m = function () {
|
|
3237
3401
|
return this;
|
|
3238
3402
|
};
|
|
3239
|
-
protoOf(XYZ).
|
|
3403
|
+
protoOf(XYZ).u5 = function () {
|
|
3240
3404
|
// Inline function 'kotlin.floatArrayOf' call
|
|
3241
|
-
return new Float32Array([this.
|
|
3405
|
+
return new Float32Array([this.l1m_1, this.m1m_1, this.n1m_1, this.o1m_1]);
|
|
3242
3406
|
};
|
|
3243
|
-
protoOf(XYZ).
|
|
3244
|
-
return this.
|
|
3407
|
+
protoOf(XYZ).lf = function () {
|
|
3408
|
+
return this.l1m_1;
|
|
3245
3409
|
};
|
|
3246
|
-
protoOf(XYZ).
|
|
3247
|
-
return this.
|
|
3410
|
+
protoOf(XYZ).mf = function () {
|
|
3411
|
+
return this.m1m_1;
|
|
3248
3412
|
};
|
|
3249
|
-
protoOf(XYZ).
|
|
3250
|
-
return this.
|
|
3413
|
+
protoOf(XYZ).v1s = function () {
|
|
3414
|
+
return this.n1m_1;
|
|
3251
3415
|
};
|
|
3252
3416
|
protoOf(XYZ).toString = function () {
|
|
3253
|
-
return 'XYZ(x=' + this.
|
|
3417
|
+
return 'XYZ(x=' + this.l1m_1 + ', y=' + this.m1m_1 + ', z=' + this.n1m_1 + ', alpha=' + this.o1m_1 + ', space=' + toString(this.p1m_1) + ')';
|
|
3254
3418
|
};
|
|
3255
3419
|
protoOf(XYZ).hashCode = function () {
|
|
3256
|
-
var result = getNumberHashCode(this.
|
|
3257
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3258
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3259
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3260
|
-
result = imul(result, 31) + hashCode(this.
|
|
3420
|
+
var result = getNumberHashCode(this.l1m_1);
|
|
3421
|
+
result = imul(result, 31) + getNumberHashCode(this.m1m_1) | 0;
|
|
3422
|
+
result = imul(result, 31) + getNumberHashCode(this.n1m_1) | 0;
|
|
3423
|
+
result = imul(result, 31) + getNumberHashCode(this.o1m_1) | 0;
|
|
3424
|
+
result = imul(result, 31) + hashCode(this.p1m_1) | 0;
|
|
3261
3425
|
return result;
|
|
3262
3426
|
};
|
|
3263
3427
|
protoOf(XYZ).equals = function (other) {
|
|
@@ -3266,27 +3430,27 @@
|
|
|
3266
3430
|
if (!(other instanceof XYZ))
|
|
3267
3431
|
return false;
|
|
3268
3432
|
var tmp0_other_with_cast = other instanceof XYZ ? other : THROW_CCE();
|
|
3269
|
-
if (!equals(this.
|
|
3433
|
+
if (!equals(this.l1m_1, tmp0_other_with_cast.l1m_1))
|
|
3270
3434
|
return false;
|
|
3271
|
-
if (!equals(this.
|
|
3435
|
+
if (!equals(this.m1m_1, tmp0_other_with_cast.m1m_1))
|
|
3272
3436
|
return false;
|
|
3273
|
-
if (!equals(this.
|
|
3437
|
+
if (!equals(this.n1m_1, tmp0_other_with_cast.n1m_1))
|
|
3274
3438
|
return false;
|
|
3275
|
-
if (!equals(this.
|
|
3439
|
+
if (!equals(this.o1m_1, tmp0_other_with_cast.o1m_1))
|
|
3276
3440
|
return false;
|
|
3277
|
-
if (!equals(this.
|
|
3441
|
+
if (!equals(this.p1m_1, tmp0_other_with_cast.p1m_1))
|
|
3278
3442
|
return false;
|
|
3279
3443
|
return true;
|
|
3280
3444
|
};
|
|
3281
3445
|
function XYZColorSpace() {
|
|
3282
3446
|
}
|
|
3283
3447
|
function XYZColorSpace_0(whitePoint) {
|
|
3284
|
-
return whitePoint.equals(Illuminant_getInstance().
|
|
3448
|
+
return whitePoint.equals(Illuminant_getInstance().j1p_1) ? XYZColorSpaces_getInstance().b1p_1 : whitePoint.equals(Illuminant_getInstance().h1p_1) ? XYZColorSpaces_getInstance().c1p_1 : new XYZColorSpaceImpl(whitePoint);
|
|
3285
3449
|
}
|
|
3286
3450
|
function XYZColorSpaces() {
|
|
3287
3451
|
XYZColorSpaces_instance = this;
|
|
3288
|
-
this.
|
|
3289
|
-
this.
|
|
3452
|
+
this.b1p_1 = new XYZColorSpaceImpl(Illuminant_getInstance().j1p_1);
|
|
3453
|
+
this.c1p_1 = new XYZColorSpaceImpl(Illuminant_getInstance().h1p_1);
|
|
3290
3454
|
}
|
|
3291
3455
|
var XYZColorSpaces_instance;
|
|
3292
3456
|
function XYZColorSpaces_getInstance() {
|
|
@@ -3297,31 +3461,31 @@
|
|
|
3297
3461
|
function chromaticAdaptationMatrix(_this__u8e3s4, srcWp, xyzToLms, lmsToXyz) {
|
|
3298
3462
|
xyzToLms = xyzToLms === VOID ? get_CAT02_XYZ_TO_LMS() : xyzToLms;
|
|
3299
3463
|
lmsToXyz = lmsToXyz === VOID ? get_CAT02_LMS_TO_XYZ() : lmsToXyz;
|
|
3300
|
-
var dstWp = _this__u8e3s4.
|
|
3301
|
-
var src = dot_0(xyzToLms, srcWp.
|
|
3302
|
-
var dst = dot_0(xyzToLms, dstWp.
|
|
3464
|
+
var dstWp = _this__u8e3s4.i1n().g1q_1;
|
|
3465
|
+
var src = dot_0(xyzToLms, srcWp.i1r(), srcWp.h1r_1, srcWp.j1r());
|
|
3466
|
+
var dst = dot_0(xyzToLms, dstWp.i1r(), dstWp.h1r_1, dstWp.j1r());
|
|
3303
3467
|
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);
|
|
3304
3468
|
}
|
|
3305
3469
|
function XYZColorSpaceImpl(whitePoint) {
|
|
3306
|
-
this.
|
|
3307
|
-
this.
|
|
3470
|
+
this.w1s_1 = whitePoint;
|
|
3471
|
+
this.x1s_1 = zeroOneComponentInfo('XYZ');
|
|
3308
3472
|
}
|
|
3309
|
-
protoOf(XYZColorSpaceImpl).
|
|
3310
|
-
return this.
|
|
3473
|
+
protoOf(XYZColorSpaceImpl).i1n = function () {
|
|
3474
|
+
return this.w1s_1;
|
|
3311
3475
|
};
|
|
3312
|
-
protoOf(XYZColorSpaceImpl).
|
|
3476
|
+
protoOf(XYZColorSpaceImpl).q2 = function () {
|
|
3313
3477
|
return 'XYZ';
|
|
3314
3478
|
};
|
|
3315
|
-
protoOf(XYZColorSpaceImpl).
|
|
3316
|
-
return this.
|
|
3479
|
+
protoOf(XYZColorSpaceImpl).j1n = function () {
|
|
3480
|
+
return this.x1s_1;
|
|
3317
3481
|
};
|
|
3318
|
-
protoOf(XYZColorSpaceImpl).
|
|
3319
|
-
return color.
|
|
3482
|
+
protoOf(XYZColorSpaceImpl).d1n = function (color) {
|
|
3483
|
+
return color.j1m().d1p(this);
|
|
3320
3484
|
};
|
|
3321
|
-
protoOf(XYZColorSpaceImpl).
|
|
3485
|
+
protoOf(XYZColorSpaceImpl).k1n = function (components) {
|
|
3322
3486
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate' call
|
|
3323
3487
|
// Inline function 'com.github.ajalt.colormath.internal.withValidComps' call
|
|
3324
|
-
var size = this.
|
|
3488
|
+
var size = this.j1n().m();
|
|
3325
3489
|
// Inline function 'kotlin.require' call
|
|
3326
3490
|
var containsLower = size - 1 | 0;
|
|
3327
3491
|
var containsArg = components.length;
|
|
@@ -3332,33 +3496,34 @@
|
|
|
3332
3496
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
3333
3497
|
}
|
|
3334
3498
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>' call
|
|
3335
|
-
var
|
|
3336
|
-
var
|
|
3337
|
-
var
|
|
3499
|
+
var p0 = components[0];
|
|
3500
|
+
var p1 = components[1];
|
|
3501
|
+
var p2 = components[2];
|
|
3338
3502
|
// Inline function 'kotlin.collections.getOrElse' call
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3503
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
3504
|
+
var tmp;
|
|
3505
|
+
if (0 <= 3 ? 3 <= (components.length - 1 | 0) : false) {
|
|
3506
|
+
tmp = components[3];
|
|
3342
3507
|
} else {
|
|
3343
3508
|
// Inline function 'com.github.ajalt.colormath.internal.doCreate.<anonymous>.<anonymous>' call
|
|
3344
|
-
|
|
3509
|
+
tmp = 1.0;
|
|
3345
3510
|
}
|
|
3346
|
-
var
|
|
3347
|
-
return this.
|
|
3511
|
+
var p3 = tmp;
|
|
3512
|
+
return this.e1o(p0, p1, p2, p3);
|
|
3348
3513
|
};
|
|
3349
3514
|
protoOf(XYZColorSpaceImpl).toString = function () {
|
|
3350
|
-
return 'XYZColorSpace(' + this.
|
|
3515
|
+
return 'XYZColorSpace(' + this.w1s_1.toString() + ')';
|
|
3351
3516
|
};
|
|
3352
|
-
protoOf(XYZColorSpaceImpl).
|
|
3517
|
+
protoOf(XYZColorSpaceImpl).e1o = function (x, y, z, alpha) {
|
|
3353
3518
|
return new XYZ(x, y, z, alpha, this);
|
|
3354
3519
|
};
|
|
3355
3520
|
protoOf(XYZColorSpaceImpl).hashCode = function () {
|
|
3356
|
-
return this.
|
|
3521
|
+
return this.w1s_1.hashCode();
|
|
3357
3522
|
};
|
|
3358
3523
|
protoOf(XYZColorSpaceImpl).equals = function (other) {
|
|
3359
3524
|
var tmp;
|
|
3360
3525
|
if (!(other == null) ? isInterface(other, XYZColorSpace) : false) {
|
|
3361
|
-
tmp = this.
|
|
3526
|
+
tmp = this.w1s_1.equals(other.i1n());
|
|
3362
3527
|
} else {
|
|
3363
3528
|
tmp = false;
|
|
3364
3529
|
}
|
|
@@ -3374,26 +3539,26 @@
|
|
|
3374
3539
|
}
|
|
3375
3540
|
function xyY(x, y, Y) {
|
|
3376
3541
|
Y = Y === VOID ? 1.0 : Y;
|
|
3377
|
-
this.
|
|
3378
|
-
this.
|
|
3379
|
-
this.
|
|
3542
|
+
this.f1r_1 = x;
|
|
3543
|
+
this.g1r_1 = y;
|
|
3544
|
+
this.h1r_1 = Y;
|
|
3380
3545
|
}
|
|
3381
|
-
protoOf(xyY).
|
|
3382
|
-
return 1 - this.
|
|
3546
|
+
protoOf(xyY).r1s = function () {
|
|
3547
|
+
return 1 - this.f1r_1 - this.g1r_1;
|
|
3383
3548
|
};
|
|
3384
|
-
protoOf(xyY).
|
|
3385
|
-
return this.
|
|
3549
|
+
protoOf(xyY).i1r = function () {
|
|
3550
|
+
return this.f1r_1 * this.h1r_1 / this.g1r_1;
|
|
3386
3551
|
};
|
|
3387
|
-
protoOf(xyY).
|
|
3388
|
-
return (1 - this.
|
|
3552
|
+
protoOf(xyY).j1r = function () {
|
|
3553
|
+
return (1 - this.f1r_1 - this.g1r_1) * this.h1r_1 / this.g1r_1;
|
|
3389
3554
|
};
|
|
3390
3555
|
protoOf(xyY).toString = function () {
|
|
3391
|
-
return 'xyY(x=' + this.
|
|
3556
|
+
return 'xyY(x=' + this.f1r_1 + ', y=' + this.g1r_1 + ', Y=' + this.h1r_1 + ')';
|
|
3392
3557
|
};
|
|
3393
3558
|
protoOf(xyY).hashCode = function () {
|
|
3394
|
-
var result = getNumberHashCode(this.
|
|
3395
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3396
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
3559
|
+
var result = getNumberHashCode(this.f1r_1);
|
|
3560
|
+
result = imul(result, 31) + getNumberHashCode(this.g1r_1) | 0;
|
|
3561
|
+
result = imul(result, 31) + getNumberHashCode(this.h1r_1) | 0;
|
|
3397
3562
|
return result;
|
|
3398
3563
|
};
|
|
3399
3564
|
protoOf(xyY).equals = function (other) {
|
|
@@ -3402,66 +3567,70 @@
|
|
|
3402
3567
|
if (!(other instanceof xyY))
|
|
3403
3568
|
return false;
|
|
3404
3569
|
var tmp0_other_with_cast = other instanceof xyY ? other : THROW_CCE();
|
|
3405
|
-
if (!equals(this.
|
|
3570
|
+
if (!equals(this.f1r_1, tmp0_other_with_cast.f1r_1))
|
|
3406
3571
|
return false;
|
|
3407
|
-
if (!equals(this.
|
|
3572
|
+
if (!equals(this.g1r_1, tmp0_other_with_cast.g1r_1))
|
|
3408
3573
|
return false;
|
|
3409
|
-
if (!equals(this.
|
|
3574
|
+
if (!equals(this.h1r_1, tmp0_other_with_cast.h1r_1))
|
|
3410
3575
|
return false;
|
|
3411
3576
|
return true;
|
|
3412
3577
|
};
|
|
3413
3578
|
//region block: post-declaration
|
|
3414
|
-
protoOf(HSL).
|
|
3415
|
-
protoOf(HSL).
|
|
3416
|
-
protoOf(HSL).
|
|
3417
|
-
protoOf(HSL).
|
|
3418
|
-
protoOf(HSL).
|
|
3419
|
-
protoOf(HSL).
|
|
3420
|
-
protoOf(HWB).
|
|
3421
|
-
protoOf(HWB).
|
|
3422
|
-
protoOf(HWB).
|
|
3423
|
-
protoOf(HWB).
|
|
3424
|
-
protoOf(HWB).
|
|
3425
|
-
protoOf(HWB).
|
|
3426
|
-
protoOf(LAB).
|
|
3427
|
-
protoOf(LAB).
|
|
3428
|
-
protoOf(LAB).
|
|
3429
|
-
protoOf(LAB).
|
|
3430
|
-
protoOf(LABColorSpaceImpl).
|
|
3431
|
-
protoOf(LCHab).
|
|
3432
|
-
protoOf(LCHab).
|
|
3433
|
-
protoOf(LCHab).
|
|
3434
|
-
protoOf(LCHab).
|
|
3435
|
-
protoOf(Oklab).
|
|
3436
|
-
protoOf(Oklab).
|
|
3437
|
-
protoOf(Oklab).
|
|
3438
|
-
protoOf(Oklab).
|
|
3439
|
-
protoOf(Oklch).
|
|
3440
|
-
protoOf(Oklch).
|
|
3441
|
-
protoOf(Oklch).
|
|
3442
|
-
protoOf(Oklch).
|
|
3443
|
-
protoOf(Companion_6).
|
|
3444
|
-
protoOf(RGB).
|
|
3445
|
-
protoOf(RGB).
|
|
3446
|
-
protoOf(RGB).
|
|
3447
|
-
protoOf(SRGB).
|
|
3448
|
-
protoOf(RGBColorSpaceImpl).
|
|
3449
|
-
protoOf(RGBColorSpaceImpl).
|
|
3450
|
-
protoOf(RGBColorSpaceImpl).
|
|
3451
|
-
protoOf(RGBColorSpaceImpl).
|
|
3452
|
-
protoOf(
|
|
3453
|
-
protoOf(
|
|
3454
|
-
protoOf(
|
|
3455
|
-
protoOf(
|
|
3456
|
-
protoOf(
|
|
3457
|
-
protoOf(
|
|
3458
|
-
protoOf(
|
|
3579
|
+
protoOf(HSL).j1m = toXYZ;
|
|
3580
|
+
protoOf(HSL).k1m = toLAB;
|
|
3581
|
+
protoOf(HSL).q1m = toLCHab;
|
|
3582
|
+
protoOf(HSL).w1m = toHWB;
|
|
3583
|
+
protoOf(HSL).x1m = toOklab;
|
|
3584
|
+
protoOf(HSL).y1m = toOklch;
|
|
3585
|
+
protoOf(HWB).d1m = toHSL;
|
|
3586
|
+
protoOf(HWB).j1m = toXYZ;
|
|
3587
|
+
protoOf(HWB).k1m = toLAB;
|
|
3588
|
+
protoOf(HWB).q1m = toLCHab;
|
|
3589
|
+
protoOf(HWB).x1m = toOklab;
|
|
3590
|
+
protoOf(HWB).y1m = toOklch;
|
|
3591
|
+
protoOf(LAB).d1m = toHSL;
|
|
3592
|
+
protoOf(LAB).w1m = toHWB;
|
|
3593
|
+
protoOf(LAB).x1m = toOklab;
|
|
3594
|
+
protoOf(LAB).y1m = toOklch;
|
|
3595
|
+
protoOf(LABColorSpaceImpl).d1r = invoke;
|
|
3596
|
+
protoOf(LCHab).d1m = toHSL;
|
|
3597
|
+
protoOf(LCHab).w1m = toHWB;
|
|
3598
|
+
protoOf(LCHab).x1m = toOklab;
|
|
3599
|
+
protoOf(LCHab).y1m = toOklch;
|
|
3600
|
+
protoOf(Oklab).d1m = toHSL;
|
|
3601
|
+
protoOf(Oklab).k1m = toLAB;
|
|
3602
|
+
protoOf(Oklab).q1m = toLCHab;
|
|
3603
|
+
protoOf(Oklab).w1m = toHWB;
|
|
3604
|
+
protoOf(Oklch).d1m = toHSL;
|
|
3605
|
+
protoOf(Oklch).k1m = toLAB;
|
|
3606
|
+
protoOf(Oklch).q1m = toLCHab;
|
|
3607
|
+
protoOf(Oklch).w1m = toHWB;
|
|
3608
|
+
protoOf(Companion_6).h1q = from255$default;
|
|
3609
|
+
protoOf(RGB).k1m = toLAB;
|
|
3610
|
+
protoOf(RGB).q1m = toLCHab;
|
|
3611
|
+
protoOf(RGB).y1m = toOklch;
|
|
3612
|
+
protoOf(SRGB).h1q = from255$default;
|
|
3613
|
+
protoOf(RGBColorSpaceImpl).d1r = invoke_0;
|
|
3614
|
+
protoOf(RGBColorSpaceImpl).d1o = invoke_1;
|
|
3615
|
+
protoOf(RGBColorSpaceImpl).i1q = from255;
|
|
3616
|
+
protoOf(RGBColorSpaceImpl).h1q = from255$default;
|
|
3617
|
+
protoOf(RGBInt).d1m = toHSL;
|
|
3618
|
+
protoOf(RGBInt).j1m = toXYZ;
|
|
3619
|
+
protoOf(RGBInt).k1m = toLAB;
|
|
3620
|
+
protoOf(RGBInt).q1m = toLCHab;
|
|
3621
|
+
protoOf(RGBInt).w1m = toHWB;
|
|
3622
|
+
protoOf(RGBInt).x1m = toOklab;
|
|
3623
|
+
protoOf(RGBInt).y1m = toOklch;
|
|
3624
|
+
protoOf(Companion_8).e1r = invoke$default;
|
|
3625
|
+
protoOf(XYZ).d1m = toHSL;
|
|
3626
|
+
protoOf(XYZ).q1m = toLCHab;
|
|
3627
|
+
protoOf(XYZ).w1m = toHWB;
|
|
3628
|
+
protoOf(XYZ).y1m = toOklch;
|
|
3629
|
+
protoOf(XYZColorSpaceImpl).d1r = invoke_2;
|
|
3630
|
+
protoOf(XYZColorSpaceImpl).e1r = invoke$default;
|
|
3459
3631
|
//endregion
|
|
3460
3632
|
//region block: init
|
|
3461
3633
|
Companion_instance_0 = new Companion();
|
|
3462
|
-
CIE_E = 0.008856451679035631;
|
|
3463
|
-
CIE_K = 903.2962962962963;
|
|
3464
|
-
CIE_E_times_K = 8.0;
|
|
3465
3634
|
PqNonlinearity_instance = new PqNonlinearity();
|
|
3466
3635
|
LinearTransferFunctions_instance = new LinearTransferFunctions();
|
|
3467
3636
|
SRGBTransferFunctions_instance = new SRGBTransferFunctions();
|