mrs-toolbox-cli 0.0.129 → 0.0.131
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/88b0986a7186d029-atomicfu-js-ir.js +19 -19
- package/clikt-clikt-mordant.js +245 -0
- package/clikt-clikt-mordant.js.map +1 -0
- package/clikt-clikt.js +3345 -3129
- package/clikt-clikt.js.map +1 -1
- package/colormath-root-colormath.js +806 -611
- package/colormath-root-colormath.js.map +1 -1
- package/com.mrs.platform.configuration.dto.js +6125 -5640
- package/com.mrs.platform.configuration.dto.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +3750 -2808
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-logging-js-ir.js +47 -47
- package/kotlin-node.js +1 -1
- package/kotlinx-serialization-kotlinx-serialization-core.js +2084 -2056
- package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.js +1640 -1629
- package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -1
- package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js +2124 -2101
- package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js.map +1 -1
- package/ktor-ktor-client-content-negotiation.js +223 -223
- package/ktor-ktor-client-content-negotiation.js.map +1 -1
- package/ktor-ktor-client-core.js +2531 -2532
- package/ktor-ktor-client-core.js.map +1 -1
- package/ktor-ktor-events.js +13 -13
- package/ktor-ktor-http.js +702 -703
- package/ktor-ktor-http.js.map +1 -1
- package/ktor-ktor-io.js +1583 -1583
- package/ktor-ktor-io.js.map +1 -1
- package/ktor-ktor-serialization-kotlinx-json.js +8 -8
- package/ktor-ktor-serialization-kotlinx.js +265 -265
- package/ktor-ktor-serialization.js +126 -126
- package/ktor-ktor-utils.js +519 -519
- package/ktor-ktor-utils.js.map +1 -1
- package/ktor-ktor-websockets.js +60 -60
- package/ktor-ktor-websockets.js.map +1 -1
- package/mordant-mordant-omnibus.js +8 -0
- package/mordant-mordant-omnibus.js.map +1 -0
- package/mordant-mordant.js +4442 -9011
- package/mordant-mordant.js.map +1 -1
- package/mrs-toolbox-cli.d.ts +43 -1
- package/mrs-toolbox-cli.js +1020 -145
- package/mrs-toolbox-cli.js.map +1 -1
- package/package.json +1 -1
- package/static/init/hooks.webpack.config.js +35 -0
- package/static/init/webpackRoot.config.js +35 -0
- package/toolbox.js +6193 -5547
- package/toolbox.js.map +1 -1
- package/markdown.js +0 -6644
- package/markdown.js.map +0 -1
|
@@ -3,77 +3,80 @@
|
|
|
3
3
|
//region block: imports
|
|
4
4
|
var imul = Math.imul;
|
|
5
5
|
var log2 = Math.log2;
|
|
6
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var
|
|
11
|
-
var
|
|
6
|
+
var protoOf = kotlin_kotlin.$_$.ac;
|
|
7
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.eb;
|
|
8
|
+
var toString = kotlin_kotlin.$_$.fc;
|
|
9
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.p1;
|
|
10
|
+
var initMetadataForClass = kotlin_kotlin.$_$.ab;
|
|
11
|
+
var getStringHashCode = kotlin_kotlin.$_$.ya;
|
|
12
|
+
var THROW_CCE = kotlin_kotlin.$_$.og;
|
|
13
|
+
var initMetadataForObject = kotlin_kotlin.$_$.gb;
|
|
12
14
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.m;
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.
|
|
18
|
-
var plus = kotlin_kotlin.$_$.n8;
|
|
19
|
-
var asList = kotlin_kotlin.$_$.z5;
|
|
20
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.e6;
|
|
15
|
+
var charSequenceLength = kotlin_kotlin.$_$.oa;
|
|
16
|
+
var charSequenceGet = kotlin_kotlin.$_$.na;
|
|
17
|
+
var toString_0 = kotlin_kotlin.$_$.u2;
|
|
18
|
+
var Unit_instance = kotlin_kotlin.$_$.f5;
|
|
19
|
+
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.n2;
|
|
21
20
|
var arrayConcat = kotlin_kotlin.$_$.a;
|
|
22
|
-
var listOf = kotlin_kotlin.$_$.
|
|
23
|
-
var withSign = kotlin_kotlin.$_$.
|
|
24
|
-
var trimMargin = kotlin_kotlin.$_$.
|
|
25
|
-
var hashCode = kotlin_kotlin.$_$.
|
|
26
|
-
var equals = kotlin_kotlin.$_$.
|
|
21
|
+
var listOf = kotlin_kotlin.$_$.w7;
|
|
22
|
+
var withSign = kotlin_kotlin.$_$.hc;
|
|
23
|
+
var trimMargin = kotlin_kotlin.$_$.uf;
|
|
24
|
+
var hashCode = kotlin_kotlin.$_$.za;
|
|
25
|
+
var equals = kotlin_kotlin.$_$.sa;
|
|
27
26
|
var VOID = kotlin_kotlin.$_$.g;
|
|
28
|
-
var
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
var
|
|
32
|
-
var
|
|
33
|
-
var
|
|
34
|
-
var
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var
|
|
43
|
-
var coerceAtLeast_0 = kotlin_kotlin.$_$.wc;
|
|
44
|
-
var objectCreate = kotlin_kotlin.$_$.jc;
|
|
27
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.bb;
|
|
28
|
+
var coerceAtLeast = kotlin_kotlin.$_$.jc;
|
|
29
|
+
var getNumberHashCode = kotlin_kotlin.$_$.wa;
|
|
30
|
+
var numberToDouble = kotlin_kotlin.$_$.xb;
|
|
31
|
+
var roundToInt = kotlin_kotlin.$_$.gc;
|
|
32
|
+
var coerceIn = kotlin_kotlin.$_$.oc;
|
|
33
|
+
var Char = kotlin_kotlin.$_$.zf;
|
|
34
|
+
var toInt = kotlin_kotlin.$_$.kf;
|
|
35
|
+
var numberRangeToNumber = kotlin_kotlin.$_$.vb;
|
|
36
|
+
var slice = kotlin_kotlin.$_$.ue;
|
|
37
|
+
var startsWith = kotlin_kotlin.$_$.xe;
|
|
38
|
+
var isInterface = kotlin_kotlin.$_$.pb;
|
|
39
|
+
var contentEquals = kotlin_kotlin.$_$.f6;
|
|
40
|
+
var coerceAtLeast_0 = kotlin_kotlin.$_$.lc;
|
|
41
|
+
var objectCreate = kotlin_kotlin.$_$.zb;
|
|
45
42
|
//endregion
|
|
46
43
|
//region block: pre-declaration
|
|
44
|
+
function toXYZ() {
|
|
45
|
+
return this.h75().i75();
|
|
46
|
+
}
|
|
47
|
+
initMetadataForInterface(Color, 'Color');
|
|
47
48
|
initMetadataForClass(ColorComponentInfo, 'ColorComponentInfo');
|
|
48
49
|
initMetadataForClass(WhitePoint, 'WhitePoint');
|
|
49
50
|
initMetadataForObject(Illuminant, 'Illuminant');
|
|
50
51
|
initMetadataForClass(Matrix, 'Matrix');
|
|
51
52
|
initMetadataForClass(Vector, 'Vector');
|
|
52
53
|
initMetadataForCompanion(Companion);
|
|
53
|
-
initMetadataForClass(Ansi16, 'Ansi16');
|
|
54
|
+
initMetadataForClass(Ansi16, 'Ansi16', VOID, VOID, [Color]);
|
|
54
55
|
initMetadataForCompanion(Companion_0);
|
|
55
|
-
initMetadataForClass(Ansi256, 'Ansi256');
|
|
56
|
+
initMetadataForClass(Ansi256, 'Ansi256', VOID, VOID, [Color]);
|
|
56
57
|
initMetadataForCompanion(Companion_1);
|
|
57
|
-
initMetadataForClass(HSV, 'HSV');
|
|
58
|
+
initMetadataForClass(HSV, 'HSV', VOID, VOID, [Color]);
|
|
59
|
+
initMetadataForClass(ICtCp, 'ICtCp', VOID, VOID, [Color]);
|
|
60
|
+
initMetadataForObject(PqNonlinearity, 'PqNonlinearity');
|
|
58
61
|
initMetadataForClass(GammaTransferFunctions, 'GammaTransferFunctions');
|
|
59
62
|
initMetadataForObject(LinearTransferFunctions, 'LinearTransferFunctions');
|
|
60
63
|
function invoke$default(r, g, b, alpha, $super) {
|
|
61
64
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
62
|
-
return $super === VOID ? this.
|
|
65
|
+
return $super === VOID ? this.t76(r, g, b, alpha) : $super.t76.call(this, r, g, b, alpha);
|
|
63
66
|
}
|
|
64
67
|
function invoke(r, g, b, alpha) {
|
|
65
|
-
return this.
|
|
68
|
+
return this.t76(numberToDouble(r), numberToDouble(g), numberToDouble(b), numberToDouble(alpha));
|
|
66
69
|
}
|
|
67
70
|
function invoke$default_0(r, g, b, alpha, $super) {
|
|
68
71
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
69
|
-
return $super === VOID ? this.
|
|
72
|
+
return $super === VOID ? this.y77(r, g, b, alpha) : invoke(r, g, b, alpha);
|
|
70
73
|
}
|
|
71
74
|
function from255(r, g, b, alpha) {
|
|
72
|
-
return this.
|
|
75
|
+
return this.t76(r / 255.0, g / 255.0, b / 255.0, alpha / 255.0);
|
|
73
76
|
}
|
|
74
77
|
function from255$default(r, g, b, alpha, $super) {
|
|
75
78
|
alpha = alpha === VOID ? 255 : alpha;
|
|
76
|
-
return $super === VOID ? this.
|
|
79
|
+
return $super === VOID ? this.z77(r, g, b, alpha) : from255(r, g, b, alpha);
|
|
77
80
|
}
|
|
78
81
|
function invoke_0(hex) {
|
|
79
82
|
var tmp = parseHex(validateHex(hex), 0);
|
|
@@ -89,41 +92,52 @@
|
|
|
89
92
|
} else {
|
|
90
93
|
tmp_2 = 255;
|
|
91
94
|
}
|
|
92
|
-
return this.
|
|
95
|
+
return this.z77(tmp, tmp_0, tmp_1, tmp_2);
|
|
93
96
|
}
|
|
94
97
|
initMetadataForInterface(RGBColorSpace, 'RGBColorSpace');
|
|
95
98
|
initMetadataForCompanion(Companion_2, VOID, [RGBColorSpace]);
|
|
96
|
-
initMetadataForClass(RGB, 'RGB');
|
|
99
|
+
initMetadataForClass(RGB, 'RGB', VOID, VOID, [Color]);
|
|
97
100
|
initMetadataForObject(RGBColorSpaces, 'RGBColorSpaces');
|
|
98
101
|
initMetadataForObject(SRGB, 'SRGB', VOID, VOID, [RGBColorSpace]);
|
|
102
|
+
initMetadataForClass(RGBColorSpaceImpl, 'RGBColorSpaceImpl', VOID, VOID, [RGBColorSpace]);
|
|
103
|
+
initMetadataForObject(SRGBTransferFunctions, 'SRGBTransferFunctions');
|
|
99
104
|
initMetadataForObject(ACESccTransferFunctions, 'ACESccTransferFunctions');
|
|
100
105
|
initMetadataForObject(ACEScctTransferFunctions, 'ACEScctTransferFunctions');
|
|
101
|
-
initMetadataForObject(
|
|
106
|
+
initMetadataForObject(BT2020TransferFunctions, 'BT2020TransferFunctions');
|
|
102
107
|
initMetadataForObject(BT709TransferFunctions, 'BT709TransferFunctions');
|
|
103
|
-
initMetadataForObject(SRGBTransferFunctions, 'SRGBTransferFunctions');
|
|
104
108
|
initMetadataForObject(ROMMTransferFunctions, 'ROMMTransferFunctions');
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
initMetadataForClass(XYZ, 'XYZ');
|
|
109
|
+
initMetadataForInterface(XYZColorSpace, 'XYZColorSpace');
|
|
110
|
+
initMetadataForCompanion(Companion_3, VOID, [XYZColorSpace]);
|
|
111
|
+
initMetadataForClass(XYZ, 'XYZ', VOID, VOID, [Color]);
|
|
109
112
|
initMetadataForObject(XYZColorSpaces, 'XYZColorSpaces');
|
|
110
|
-
initMetadataForClass(XYZColorSpaceImpl, 'XYZColorSpaceImpl');
|
|
113
|
+
initMetadataForClass(XYZColorSpaceImpl, 'XYZColorSpaceImpl', VOID, VOID, [XYZColorSpace]);
|
|
111
114
|
initMetadataForClass(xyY, 'xyY');
|
|
112
115
|
//endregion
|
|
113
|
-
function
|
|
114
|
-
|
|
115
|
-
|
|
116
|
+
function Color() {
|
|
117
|
+
}
|
|
118
|
+
function ColorComponentInfo(name, isPolar, min, max) {
|
|
119
|
+
this.o75_1 = name;
|
|
120
|
+
this.p75_1 = isPolar;
|
|
121
|
+
this.q75_1 = min;
|
|
122
|
+
this.r75_1 = max;
|
|
123
|
+
// Inline function 'kotlin.require' call
|
|
124
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
125
|
+
if (!(this.q75_1 <= this.r75_1)) {
|
|
126
|
+
// Inline function 'com.github.ajalt.colormath.ColorComponentInfo.<anonymous>' call
|
|
127
|
+
var message = 'min must be less than or equal to max';
|
|
128
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
129
|
+
}
|
|
116
130
|
}
|
|
117
131
|
function WhitePoint(name, chromaticity) {
|
|
118
|
-
this.
|
|
119
|
-
this.
|
|
132
|
+
this.s75_1 = name;
|
|
133
|
+
this.t75_1 = chromaticity;
|
|
120
134
|
}
|
|
121
135
|
protoOf(WhitePoint).toString = function () {
|
|
122
|
-
return this.
|
|
136
|
+
return this.s75_1;
|
|
123
137
|
};
|
|
124
138
|
protoOf(WhitePoint).hashCode = function () {
|
|
125
|
-
var result = getStringHashCode(this.
|
|
126
|
-
result = imul(result, 31) + this.
|
|
139
|
+
var result = getStringHashCode(this.s75_1);
|
|
140
|
+
result = imul(result, 31) + this.t75_1.hashCode() | 0;
|
|
127
141
|
return result;
|
|
128
142
|
};
|
|
129
143
|
protoOf(WhitePoint).equals = function (other) {
|
|
@@ -132,22 +146,22 @@
|
|
|
132
146
|
if (!(other instanceof WhitePoint))
|
|
133
147
|
return false;
|
|
134
148
|
var tmp0_other_with_cast = other instanceof WhitePoint ? other : THROW_CCE();
|
|
135
|
-
if (!(this.
|
|
149
|
+
if (!(this.s75_1 === tmp0_other_with_cast.s75_1))
|
|
136
150
|
return false;
|
|
137
|
-
if (!this.
|
|
151
|
+
if (!this.t75_1.equals(tmp0_other_with_cast.t75_1))
|
|
138
152
|
return false;
|
|
139
153
|
return true;
|
|
140
154
|
};
|
|
141
155
|
function Illuminant() {
|
|
142
156
|
Illuminant_instance = this;
|
|
143
|
-
this.
|
|
144
|
-
this.
|
|
145
|
-
this.
|
|
146
|
-
this.
|
|
147
|
-
this.
|
|
148
|
-
this.
|
|
149
|
-
this.
|
|
150
|
-
this.
|
|
157
|
+
this.u75_1 = new WhitePoint('A', xyY_init_$Create$(0.44758, 0.40745));
|
|
158
|
+
this.v75_1 = new WhitePoint('B', xyY_init_$Create$(0.34842, 0.35161));
|
|
159
|
+
this.w75_1 = new WhitePoint('C', xyY_init_$Create$(0.31006, 0.31616));
|
|
160
|
+
this.x75_1 = new WhitePoint('D50', xyY_init_$Create$(0.3457, 0.3585));
|
|
161
|
+
this.y75_1 = new WhitePoint('D55', xyY_init_$Create$(0.33243, 0.34744));
|
|
162
|
+
this.z75_1 = new WhitePoint('D65', xyY_init_$Create$(0.3127, 0.329));
|
|
163
|
+
this.a76_1 = new WhitePoint('D75', xyY_init_$Create$(0.29903, 0.31488));
|
|
164
|
+
this.b76_1 = new WhitePoint('E', xyY_init_$Create$(1.0 / 3.0, 1.0 / 3.0));
|
|
151
165
|
}
|
|
152
166
|
var Illuminant_instance;
|
|
153
167
|
function Illuminant_getInstance() {
|
|
@@ -155,52 +169,63 @@
|
|
|
155
169
|
new Illuminant();
|
|
156
170
|
return Illuminant_instance;
|
|
157
171
|
}
|
|
158
|
-
function
|
|
159
|
-
|
|
160
|
-
|
|
172
|
+
function get_alphaInfo() {
|
|
173
|
+
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
174
|
+
return alphaInfo;
|
|
175
|
+
}
|
|
176
|
+
var alphaInfo;
|
|
177
|
+
function zeroOneComponentInfo(name) {
|
|
178
|
+
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
179
|
+
// Inline function 'kotlin.collections.buildList' call
|
|
180
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
181
|
+
// Inline function 'kotlin.collections.buildListInternal' call
|
|
182
|
+
// Inline function 'kotlin.apply' call
|
|
183
|
+
var this_0 = ArrayList_init_$Create$();
|
|
184
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
185
|
+
// Inline function 'com.github.ajalt.colormath.internal.zeroOneComponentInfo.<anonymous>' call
|
|
161
186
|
// Inline function 'kotlin.text.mapTo' call
|
|
162
|
-
var destination = ArrayList_init_$Create$(charSequenceLength(name));
|
|
163
187
|
var inductionVariable = 0;
|
|
164
188
|
while (inductionVariable < charSequenceLength(name)) {
|
|
165
189
|
var item = charSequenceGet(name, inductionVariable);
|
|
166
190
|
inductionVariable = inductionVariable + 1 | 0;
|
|
167
|
-
// Inline function 'com.github.ajalt.colormath.internal.
|
|
168
|
-
var tmp$ret$0 =
|
|
169
|
-
|
|
191
|
+
// Inline function 'com.github.ajalt.colormath.internal.zeroOneComponentInfo.<anonymous>.<anonymous>' call
|
|
192
|
+
var tmp$ret$0 = new ColorComponentInfo(toString_0(item), false, 0.0, 1.0);
|
|
193
|
+
this_0.e(tmp$ret$0);
|
|
170
194
|
}
|
|
171
|
-
|
|
172
|
-
return
|
|
195
|
+
this_0.e(get_alphaInfo());
|
|
196
|
+
return this_0.v5();
|
|
173
197
|
}
|
|
174
|
-
function polarComponentInfo(name) {
|
|
175
|
-
|
|
198
|
+
function polarComponentInfo(name, l, r) {
|
|
199
|
+
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
200
|
+
// Inline function 'kotlin.collections.buildList' call
|
|
201
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
202
|
+
// Inline function 'kotlin.collections.buildListInternal' call
|
|
203
|
+
// Inline function 'kotlin.apply' call
|
|
204
|
+
var this_0 = ArrayList_init_$Create$();
|
|
205
|
+
// Inline function 'kotlin.contracts.contract' call
|
|
206
|
+
// Inline function 'com.github.ajalt.colormath.internal.polarComponentInfo.<anonymous>' call
|
|
176
207
|
// Inline function 'kotlin.text.mapTo' call
|
|
177
|
-
var destination = ArrayList_init_$Create$(charSequenceLength(name));
|
|
178
208
|
var inductionVariable = 0;
|
|
179
209
|
while (inductionVariable < charSequenceLength(name)) {
|
|
180
210
|
var item = charSequenceGet(name, inductionVariable);
|
|
181
211
|
inductionVariable = inductionVariable + 1 | 0;
|
|
182
|
-
// Inline function 'com.github.ajalt.colormath.internal.polarComponentInfo.<anonymous>' call
|
|
183
|
-
var tmp$ret$0 = new ColorComponentInfo(
|
|
184
|
-
|
|
185
|
-
}
|
|
186
|
-
return plus(destination, new ColorComponentInfo('alpha', false));
|
|
187
|
-
}
|
|
188
|
-
function rectangularComponentInfo_0(names) {
|
|
189
|
-
// Inline function 'kotlin.collections.map' call
|
|
190
|
-
var this_0 = plus(asList(names), 'alpha');
|
|
191
|
-
// Inline function 'kotlin.collections.mapTo' call
|
|
192
|
-
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
193
|
-
var tmp0_iterator = this_0.k();
|
|
194
|
-
while (tmp0_iterator.l()) {
|
|
195
|
-
var item = tmp0_iterator.m();
|
|
196
|
-
// Inline function 'com.github.ajalt.colormath.internal.rectangularComponentInfo.<anonymous>' call
|
|
197
|
-
var tmp$ret$0 = new ColorComponentInfo(item, false);
|
|
198
|
-
destination.e(tmp$ret$0);
|
|
212
|
+
// Inline function 'com.github.ajalt.colormath.internal.polarComponentInfo.<anonymous>.<anonymous>' call
|
|
213
|
+
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);
|
|
214
|
+
this_0.e(tmp$ret$0);
|
|
199
215
|
}
|
|
200
|
-
|
|
216
|
+
this_0.e(get_alphaInfo());
|
|
217
|
+
return this_0.v5();
|
|
201
218
|
}
|
|
202
219
|
function componentInfoList(c) {
|
|
203
|
-
|
|
220
|
+
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
221
|
+
return listOf(arrayConcat([c, [get_alphaInfo()]]));
|
|
222
|
+
}
|
|
223
|
+
var properties_initialized_ColorSpaceUtils_kt_kskdoe;
|
|
224
|
+
function _init_properties_ColorSpaceUtils_kt__cnwylg() {
|
|
225
|
+
if (!properties_initialized_ColorSpaceUtils_kt_kskdoe) {
|
|
226
|
+
properties_initialized_ColorSpaceUtils_kt_kskdoe = true;
|
|
227
|
+
alphaInfo = new ColorComponentInfo('alpha', false, 0.0, 1.0);
|
|
228
|
+
}
|
|
204
229
|
}
|
|
205
230
|
function get_CAT02_XYZ_TO_LMS() {
|
|
206
231
|
_init_properties_Constants_kt__atb1ur();
|
|
@@ -216,7 +241,7 @@
|
|
|
216
241
|
function _init_properties_Constants_kt__atb1ur() {
|
|
217
242
|
if (!properties_initialized_Constants_kt_w4w61t) {
|
|
218
243
|
properties_initialized_Constants_kt_w4w61t = true;
|
|
219
|
-
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);
|
|
244
|
+
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);
|
|
220
245
|
CAT02_LMS_TO_XYZ = inverse(get_CAT02_XYZ_TO_LMS());
|
|
221
246
|
}
|
|
222
247
|
}
|
|
@@ -271,22 +296,22 @@
|
|
|
271
296
|
function Matrix__equals_impl_g5p8p9($this, other) {
|
|
272
297
|
if (!(other instanceof Matrix))
|
|
273
298
|
return false;
|
|
274
|
-
var tmp0_other_with_cast = other instanceof Matrix ? other.
|
|
299
|
+
var tmp0_other_with_cast = other instanceof Matrix ? other.c76_1 : THROW_CCE();
|
|
275
300
|
if (!equals($this, tmp0_other_with_cast))
|
|
276
301
|
return false;
|
|
277
302
|
return true;
|
|
278
303
|
}
|
|
279
304
|
function Matrix(rowMajor) {
|
|
280
|
-
this.
|
|
305
|
+
this.c76_1 = rowMajor;
|
|
281
306
|
}
|
|
282
307
|
protoOf(Matrix).toString = function () {
|
|
283
|
-
return Matrix__toString_impl_l0abk0(this.
|
|
308
|
+
return Matrix__toString_impl_l0abk0(this.c76_1);
|
|
284
309
|
};
|
|
285
310
|
protoOf(Matrix).hashCode = function () {
|
|
286
|
-
return Matrix__hashCode_impl_s9ntm9(this.
|
|
311
|
+
return Matrix__hashCode_impl_s9ntm9(this.c76_1);
|
|
287
312
|
};
|
|
288
313
|
protoOf(Matrix).equals = function (other) {
|
|
289
|
-
return Matrix__equals_impl_g5p8p9(this.
|
|
314
|
+
return Matrix__equals_impl_g5p8p9(this.c76_1, other);
|
|
290
315
|
};
|
|
291
316
|
function inverse(_this__u8e3s4, inPlace) {
|
|
292
317
|
inPlace = inPlace === VOID ? false : inPlace;
|
|
@@ -315,6 +340,20 @@
|
|
|
315
340
|
Matrix__set_impl_s2l54c_0(out, 2, 2, (a * e - d * b) / det);
|
|
316
341
|
return out;
|
|
317
342
|
}
|
|
343
|
+
function scalarDiv(_this__u8e3s4, x, inPlace) {
|
|
344
|
+
inPlace = inPlace === VOID ? false : inPlace;
|
|
345
|
+
var out = _Matrix___get_rowMajor__impl__vmgxkq(inPlace ? _this__u8e3s4 : Matrix__copy_impl_kmkvzd(_this__u8e3s4));
|
|
346
|
+
var inductionVariable = 0;
|
|
347
|
+
var last = out.length - 1 | 0;
|
|
348
|
+
if (inductionVariable <= last)
|
|
349
|
+
do {
|
|
350
|
+
var i = inductionVariable;
|
|
351
|
+
inductionVariable = inductionVariable + 1 | 0;
|
|
352
|
+
out[i] = out[i] / x;
|
|
353
|
+
}
|
|
354
|
+
while (inductionVariable <= last);
|
|
355
|
+
return _Matrix___init__impl__q3kp4w(out);
|
|
356
|
+
}
|
|
318
357
|
function dot(_this__u8e3s4, other) {
|
|
319
358
|
return _Matrix___init__impl__q3kp4w_0(dot$f(_this__u8e3s4, other, 0, 0), dot$f(_this__u8e3s4, other, 1, 0), dot$f(_this__u8e3s4, other, 2, 0), dot$f(_this__u8e3s4, other, 0, 1), dot$f(_this__u8e3s4, other, 1, 1), dot$f(_this__u8e3s4, other, 2, 1), dot$f(_this__u8e3s4, other, 0, 2), dot$f(_this__u8e3s4, other, 1, 2), dot$f(_this__u8e3s4, other, 2, 2));
|
|
320
359
|
}
|
|
@@ -342,7 +381,7 @@
|
|
|
342
381
|
return _Vector___get_values__impl__3gdbp5($this)[2];
|
|
343
382
|
}
|
|
344
383
|
function Vector__toString_impl_hn2ybi($this) {
|
|
345
|
-
return 'Vector(values=' +
|
|
384
|
+
return 'Vector(values=' + toString($this) + ')';
|
|
346
385
|
}
|
|
347
386
|
function Vector__hashCode_impl_442yhd($this) {
|
|
348
387
|
return hashCode($this);
|
|
@@ -350,22 +389,22 @@
|
|
|
350
389
|
function Vector__equals_impl_hy6igl($this, other) {
|
|
351
390
|
if (!(other instanceof Vector))
|
|
352
391
|
return false;
|
|
353
|
-
var tmp0_other_with_cast = other instanceof Vector ? other.
|
|
392
|
+
var tmp0_other_with_cast = other instanceof Vector ? other.d76_1 : THROW_CCE();
|
|
354
393
|
if (!equals($this, tmp0_other_with_cast))
|
|
355
394
|
return false;
|
|
356
395
|
return true;
|
|
357
396
|
}
|
|
358
397
|
function Vector(values) {
|
|
359
|
-
this.
|
|
398
|
+
this.d76_1 = values;
|
|
360
399
|
}
|
|
361
400
|
protoOf(Vector).toString = function () {
|
|
362
|
-
return Vector__toString_impl_hn2ybi(this.
|
|
401
|
+
return Vector__toString_impl_hn2ybi(this.d76_1);
|
|
363
402
|
};
|
|
364
403
|
protoOf(Vector).hashCode = function () {
|
|
365
|
-
return Vector__hashCode_impl_442yhd(this.
|
|
404
|
+
return Vector__hashCode_impl_442yhd(this.d76_1);
|
|
366
405
|
};
|
|
367
406
|
protoOf(Vector).equals = function (other) {
|
|
368
|
-
return Vector__equals_impl_hy6igl(this.
|
|
407
|
+
return Vector__equals_impl_hy6igl(this.d76_1, other);
|
|
369
408
|
};
|
|
370
409
|
function dot_0(_this__u8e3s4, v0, v1, v2) {
|
|
371
410
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
@@ -376,8 +415,11 @@
|
|
|
376
415
|
}
|
|
377
416
|
function Companion() {
|
|
378
417
|
Companion_instance = this;
|
|
379
|
-
this.
|
|
418
|
+
this.e76_1 = componentInfoList([new ColorComponentInfo('code', false, 30.0, 107.0)]);
|
|
380
419
|
}
|
|
420
|
+
protoOf(Companion).f76 = function () {
|
|
421
|
+
return this.e76_1;
|
|
422
|
+
};
|
|
381
423
|
var Companion_instance;
|
|
382
424
|
function Companion_getInstance() {
|
|
383
425
|
if (Companion_instance == null)
|
|
@@ -386,35 +428,38 @@
|
|
|
386
428
|
}
|
|
387
429
|
function Ansi16(code) {
|
|
388
430
|
Companion_getInstance();
|
|
389
|
-
this.
|
|
431
|
+
this.g76_1 = code;
|
|
390
432
|
}
|
|
391
|
-
protoOf(Ansi16).
|
|
392
|
-
|
|
433
|
+
protoOf(Ansi16).g75 = function () {
|
|
434
|
+
return Companion_getInstance();
|
|
435
|
+
};
|
|
436
|
+
protoOf(Ansi16).h75 = function () {
|
|
437
|
+
switch (this.g76_1) {
|
|
393
438
|
case 30:
|
|
394
439
|
case 40:
|
|
395
|
-
return Companion_getInstance_2().
|
|
440
|
+
return Companion_getInstance_2().h76(0.0, 0.0, 0.0);
|
|
396
441
|
case 90:
|
|
397
442
|
case 100:
|
|
398
|
-
return Companion_getInstance_2().
|
|
443
|
+
return Companion_getInstance_2().i76(128, 128, 128);
|
|
399
444
|
case 37:
|
|
400
445
|
case 47:
|
|
401
|
-
return Companion_getInstance_2().
|
|
446
|
+
return Companion_getInstance_2().i76(192, 192, 192);
|
|
402
447
|
case 97:
|
|
403
448
|
case 107:
|
|
404
|
-
return Companion_getInstance_2().
|
|
449
|
+
return Companion_getInstance_2().h76(1.0, 1.0, 1.0);
|
|
405
450
|
}
|
|
406
|
-
var color = this.
|
|
407
|
-
var mul = this.
|
|
451
|
+
var color = this.g76_1 % 10 | 0;
|
|
452
|
+
var mul = this.g76_1 > 50 ? 1.0 : 0.5;
|
|
408
453
|
var r = (color % 2 | 0) * mul;
|
|
409
454
|
var g = ((color / 2 | 0) % 2 | 0) * mul;
|
|
410
455
|
var b = ((color / 4 | 0) % 2 | 0) * mul;
|
|
411
|
-
return Companion_getInstance_2().
|
|
456
|
+
return Companion_getInstance_2().h76(r, g, b);
|
|
412
457
|
};
|
|
413
458
|
protoOf(Ansi16).toString = function () {
|
|
414
|
-
return 'Ansi16(code=' + this.
|
|
459
|
+
return 'Ansi16(code=' + this.g76_1 + ')';
|
|
415
460
|
};
|
|
416
461
|
protoOf(Ansi16).hashCode = function () {
|
|
417
|
-
return this.
|
|
462
|
+
return this.g76_1;
|
|
418
463
|
};
|
|
419
464
|
protoOf(Ansi16).equals = function (other) {
|
|
420
465
|
if (this === other)
|
|
@@ -422,14 +467,17 @@
|
|
|
422
467
|
if (!(other instanceof Ansi16))
|
|
423
468
|
return false;
|
|
424
469
|
var tmp0_other_with_cast = other instanceof Ansi16 ? other : THROW_CCE();
|
|
425
|
-
if (!(this.
|
|
470
|
+
if (!(this.g76_1 === tmp0_other_with_cast.g76_1))
|
|
426
471
|
return false;
|
|
427
472
|
return true;
|
|
428
473
|
};
|
|
429
474
|
function Companion_0() {
|
|
430
475
|
Companion_instance_0 = this;
|
|
431
|
-
this.
|
|
476
|
+
this.j76_1 = componentInfoList([new ColorComponentInfo('code', false, 0.0, 255.0)]);
|
|
432
477
|
}
|
|
478
|
+
protoOf(Companion_0).f76 = function () {
|
|
479
|
+
return this.j76_1;
|
|
480
|
+
};
|
|
433
481
|
var Companion_instance_0;
|
|
434
482
|
function Companion_getInstance_0() {
|
|
435
483
|
if (Companion_instance_0 == null)
|
|
@@ -438,16 +486,19 @@
|
|
|
438
486
|
}
|
|
439
487
|
function Ansi256(code) {
|
|
440
488
|
Companion_getInstance_0();
|
|
441
|
-
this.
|
|
442
|
-
}
|
|
443
|
-
protoOf(Ansi256).
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
return
|
|
489
|
+
this.k76_1 = code;
|
|
490
|
+
}
|
|
491
|
+
protoOf(Ansi256).g75 = function () {
|
|
492
|
+
return Companion_getInstance_0();
|
|
493
|
+
};
|
|
494
|
+
protoOf(Ansi256).h75 = function () {
|
|
495
|
+
if (this.k76_1 < 16)
|
|
496
|
+
return this.l76().h75();
|
|
497
|
+
if (this.k76_1 >= 232) {
|
|
498
|
+
var c = imul(this.k76_1 - 232 | 0, 10) + 8 | 0;
|
|
499
|
+
return Companion_getInstance_2().i76(c, c, c);
|
|
449
500
|
}
|
|
450
|
-
var c_0 = this.
|
|
501
|
+
var c_0 = this.k76_1 - 16 | 0;
|
|
451
502
|
var rem = c_0 % 36 | 0;
|
|
452
503
|
// Inline function 'kotlin.math.floor' call
|
|
453
504
|
var x = c_0 / 36.0;
|
|
@@ -456,16 +507,16 @@
|
|
|
456
507
|
var x_0 = rem / 6.0;
|
|
457
508
|
var g = Math.floor(x_0) / 5.0;
|
|
458
509
|
var b = (rem % 6 | 0) / 5.0;
|
|
459
|
-
return Companion_getInstance_2().
|
|
510
|
+
return Companion_getInstance_2().m76(r, g, b);
|
|
460
511
|
};
|
|
461
|
-
protoOf(Ansi256).
|
|
462
|
-
return this.
|
|
512
|
+
protoOf(Ansi256).l76 = function () {
|
|
513
|
+
return this.k76_1 < 8 ? new Ansi16(this.k76_1 + 30 | 0) : this.k76_1 < 16 ? new Ansi16((this.k76_1 - 8 | 0) + 90 | 0) : this.h75().l76();
|
|
463
514
|
};
|
|
464
515
|
protoOf(Ansi256).toString = function () {
|
|
465
|
-
return 'Ansi256(code=' + this.
|
|
516
|
+
return 'Ansi256(code=' + this.k76_1 + ')';
|
|
466
517
|
};
|
|
467
518
|
protoOf(Ansi256).hashCode = function () {
|
|
468
|
-
return this.
|
|
519
|
+
return this.k76_1;
|
|
469
520
|
};
|
|
470
521
|
protoOf(Ansi256).equals = function (other) {
|
|
471
522
|
if (this === other)
|
|
@@ -473,14 +524,17 @@
|
|
|
473
524
|
if (!(other instanceof Ansi256))
|
|
474
525
|
return false;
|
|
475
526
|
var tmp0_other_with_cast = other instanceof Ansi256 ? other : THROW_CCE();
|
|
476
|
-
if (!(this.
|
|
527
|
+
if (!(this.k76_1 === tmp0_other_with_cast.k76_1))
|
|
477
528
|
return false;
|
|
478
529
|
return true;
|
|
479
530
|
};
|
|
480
531
|
function Companion_1() {
|
|
481
532
|
Companion_instance_1 = this;
|
|
482
|
-
this.
|
|
533
|
+
this.n76_1 = polarComponentInfo('HSV', 0.0, 1.0);
|
|
483
534
|
}
|
|
535
|
+
protoOf(Companion_1).f76 = function () {
|
|
536
|
+
return this.n76_1;
|
|
537
|
+
};
|
|
484
538
|
var Companion_instance_1;
|
|
485
539
|
function Companion_getInstance_1() {
|
|
486
540
|
if (Companion_instance_1 == null)
|
|
@@ -498,27 +552,30 @@
|
|
|
498
552
|
function HSV(h, s, v, alpha) {
|
|
499
553
|
Companion_getInstance_1();
|
|
500
554
|
alpha = alpha === VOID ? 1.0 : alpha;
|
|
501
|
-
this.
|
|
502
|
-
this.
|
|
503
|
-
this.
|
|
504
|
-
this.
|
|
505
|
-
}
|
|
506
|
-
protoOf(HSV).
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
555
|
+
this.o76_1 = h;
|
|
556
|
+
this.p76_1 = s;
|
|
557
|
+
this.q76_1 = v;
|
|
558
|
+
this.r76_1 = alpha;
|
|
559
|
+
}
|
|
560
|
+
protoOf(HSV).g75 = function () {
|
|
561
|
+
return Companion_getInstance_1();
|
|
562
|
+
};
|
|
563
|
+
protoOf(HSV).h75 = function () {
|
|
564
|
+
if (this.p76_1 < 1.0E-7)
|
|
565
|
+
return Companion_getInstance_2().t76(this.q76_1, this.q76_1, this.q76_1, this.r76_1);
|
|
566
|
+
var v = this.q76_1;
|
|
567
|
+
var h = normalizeDeg_0(this.o76_1) / 60.0;
|
|
568
|
+
var s = this.p76_1;
|
|
569
|
+
return SRGB_getInstance().t76(toSRGB$f(h, v, s, 5), toSRGB$f(h, v, s, 3), toSRGB$f(h, v, s, 1), this.r76_1);
|
|
513
570
|
};
|
|
514
571
|
protoOf(HSV).toString = function () {
|
|
515
|
-
return 'HSV(h=' + this.
|
|
572
|
+
return 'HSV(h=' + this.o76_1 + ', s=' + this.p76_1 + ', v=' + this.q76_1 + ', alpha=' + this.r76_1 + ')';
|
|
516
573
|
};
|
|
517
574
|
protoOf(HSV).hashCode = function () {
|
|
518
|
-
var result = getNumberHashCode(this.
|
|
519
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
520
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
521
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
575
|
+
var result = getNumberHashCode(this.o76_1);
|
|
576
|
+
result = imul(result, 31) + getNumberHashCode(this.p76_1) | 0;
|
|
577
|
+
result = imul(result, 31) + getNumberHashCode(this.q76_1) | 0;
|
|
578
|
+
result = imul(result, 31) + getNumberHashCode(this.r76_1) | 0;
|
|
522
579
|
return result;
|
|
523
580
|
};
|
|
524
581
|
protoOf(HSV).equals = function (other) {
|
|
@@ -527,30 +584,128 @@
|
|
|
527
584
|
if (!(other instanceof HSV))
|
|
528
585
|
return false;
|
|
529
586
|
var tmp0_other_with_cast = other instanceof HSV ? other : THROW_CCE();
|
|
530
|
-
if (!equals(this.
|
|
587
|
+
if (!equals(this.o76_1, tmp0_other_with_cast.o76_1))
|
|
531
588
|
return false;
|
|
532
|
-
if (!equals(this.
|
|
589
|
+
if (!equals(this.p76_1, tmp0_other_with_cast.p76_1))
|
|
533
590
|
return false;
|
|
534
|
-
if (!equals(this.
|
|
591
|
+
if (!equals(this.q76_1, tmp0_other_with_cast.q76_1))
|
|
535
592
|
return false;
|
|
536
|
-
if (!equals(this.
|
|
593
|
+
if (!equals(this.r76_1, tmp0_other_with_cast.r76_1))
|
|
537
594
|
return false;
|
|
538
595
|
return true;
|
|
539
596
|
};
|
|
597
|
+
function get_ICTCP_RGB_TO_LMS() {
|
|
598
|
+
_init_properties_ICtCp_kt__7vx7or();
|
|
599
|
+
return ICTCP_RGB_TO_LMS;
|
|
600
|
+
}
|
|
601
|
+
var ICTCP_RGB_TO_LMS;
|
|
602
|
+
function get_ICTCP_LMS_TO_ICTCP() {
|
|
603
|
+
_init_properties_ICtCp_kt__7vx7or();
|
|
604
|
+
return ICTCP_LMS_TO_ICTCP;
|
|
605
|
+
}
|
|
606
|
+
var ICTCP_LMS_TO_ICTCP;
|
|
607
|
+
function get_ICTCP_LMS_to_RGB() {
|
|
608
|
+
_init_properties_ICtCp_kt__7vx7or();
|
|
609
|
+
return ICTCP_LMS_to_RGB;
|
|
610
|
+
}
|
|
611
|
+
var ICTCP_LMS_to_RGB;
|
|
612
|
+
function get_ICTCP_ICTCP_to_LMS() {
|
|
613
|
+
_init_properties_ICtCp_kt__7vx7or();
|
|
614
|
+
return ICTCP_ICTCP_to_LMS;
|
|
615
|
+
}
|
|
616
|
+
var ICTCP_ICTCP_to_LMS;
|
|
617
|
+
function get_ICTCP_CROSSTALK() {
|
|
618
|
+
_init_properties_ICtCp_kt__7vx7or();
|
|
619
|
+
return ICTCP_CROSSTALK;
|
|
620
|
+
}
|
|
621
|
+
var ICTCP_CROSSTALK;
|
|
622
|
+
function get_HPE_XYZ_TO_LMS() {
|
|
623
|
+
_init_properties_ICtCp_kt__7vx7or();
|
|
624
|
+
return HPE_XYZ_TO_LMS;
|
|
625
|
+
}
|
|
626
|
+
var HPE_XYZ_TO_LMS;
|
|
627
|
+
function get_ICTCP_XYZ_TO_LMS() {
|
|
628
|
+
_init_properties_ICtCp_kt__7vx7or();
|
|
629
|
+
return ICTCP_XYZ_TO_LMS;
|
|
630
|
+
}
|
|
631
|
+
var ICTCP_XYZ_TO_LMS;
|
|
632
|
+
var ICTCP_LMS_TO_XYZ;
|
|
633
|
+
function ICtCp() {
|
|
634
|
+
}
|
|
635
|
+
protoOf(ICtCp).z76 = function () {
|
|
636
|
+
var fo = RGBColorSpaces_getInstance().h77_1.m77();
|
|
637
|
+
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
638
|
+
var this_0 = get_ICTCP_ICTCP_to_LMS();
|
|
639
|
+
var v0 = this.v76_1;
|
|
640
|
+
var v1 = this.w76_1;
|
|
641
|
+
var v2 = this.x76_1;
|
|
642
|
+
// Inline function 'com.github.ajalt.colormath.model.ICtCp.toBT2020.<anonymous>' call
|
|
643
|
+
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;
|
|
644
|
+
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;
|
|
645
|
+
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;
|
|
646
|
+
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
647
|
+
var this_1 = get_ICTCP_LMS_to_RGB();
|
|
648
|
+
var v0_0 = PqNonlinearity_instance.v77(l);
|
|
649
|
+
var v1_0 = PqNonlinearity_instance.v77(m);
|
|
650
|
+
var v2_0 = PqNonlinearity_instance.v77(s);
|
|
651
|
+
// Inline function 'com.github.ajalt.colormath.model.ICtCp.toBT2020.<anonymous>.<anonymous>' call
|
|
652
|
+
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;
|
|
653
|
+
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;
|
|
654
|
+
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;
|
|
655
|
+
return RGBColorSpaces_getInstance().h77_1.t76(fo.w77(r), fo.w77(g), fo.w77(b), this.y76_1);
|
|
656
|
+
};
|
|
657
|
+
function PqNonlinearity() {
|
|
658
|
+
this.n77_1 = 0.1593017578125;
|
|
659
|
+
this.o77_1 = 78.84375;
|
|
660
|
+
this.p77_1 = 0.8359375;
|
|
661
|
+
this.q77_1 = 18.8515625;
|
|
662
|
+
this.r77_1 = 18.6875;
|
|
663
|
+
this.s77_1 = 10000.0;
|
|
664
|
+
this.t77_1 = 6.277394636015326;
|
|
665
|
+
this.u77_1 = 0.012683313515655966;
|
|
666
|
+
}
|
|
667
|
+
protoOf(PqNonlinearity).v77 = function (x) {
|
|
668
|
+
var vp = spow(x, 0.012683313515655966);
|
|
669
|
+
var n = coerceAtLeast(vp - 0.8359375, 0.0);
|
|
670
|
+
var l = spow_0(n / (18.8515625 - 18.6875 * vp), 6.277394636015326);
|
|
671
|
+
return 10000.0 * l;
|
|
672
|
+
};
|
|
673
|
+
protoOf(PqNonlinearity).w77 = function (x) {
|
|
674
|
+
var yp = spow_0(x / 10000.0, 0.1593017578125);
|
|
675
|
+
return spow_0((0.8359375 + 18.8515625 * yp) / (1.0 + 18.6875 * yp), 78.84375);
|
|
676
|
+
};
|
|
677
|
+
var PqNonlinearity_instance;
|
|
678
|
+
function PqNonlinearity_getInstance() {
|
|
679
|
+
return PqNonlinearity_instance;
|
|
680
|
+
}
|
|
681
|
+
var properties_initialized_ICtCp_kt_w6y8uv;
|
|
682
|
+
function _init_properties_ICtCp_kt__7vx7or() {
|
|
683
|
+
if (!properties_initialized_ICtCp_kt_w6y8uv) {
|
|
684
|
+
properties_initialized_ICtCp_kt_w6y8uv = true;
|
|
685
|
+
ICTCP_RGB_TO_LMS = scalarDiv(_Matrix___init__impl__q3kp4w_0(1688.0, 2146.0, 262.0, 683.0, 2951.0, 462.0, 99.0, 309.0, 3688.0), 4096.0, true);
|
|
686
|
+
ICTCP_LMS_TO_ICTCP = scalarDiv(_Matrix___init__impl__q3kp4w_0(2048.0, 2048.0, 0.0, 6610.0, -13613.0, 7003.0, 17933.0, -17390.0, -543.0), 4096.0, true);
|
|
687
|
+
ICTCP_LMS_to_RGB = inverse(get_ICTCP_RGB_TO_LMS());
|
|
688
|
+
ICTCP_ICTCP_to_LMS = inverse(get_ICTCP_LMS_TO_ICTCP());
|
|
689
|
+
ICTCP_CROSSTALK = _Matrix___init__impl__q3kp4w_0(0.92, 0.04, 0.04, 0.04, 0.92, 0.04, 0.04, 0.04, 0.92);
|
|
690
|
+
HPE_XYZ_TO_LMS = _Matrix___init__impl__q3kp4w_0(0.4002, 0.7076, -0.0808, -0.2263, 1.1653, 0.0457, 0.0, 0.0, 0.9182);
|
|
691
|
+
ICTCP_XYZ_TO_LMS = dot(get_ICTCP_CROSSTALK(), get_HPE_XYZ_TO_LMS());
|
|
692
|
+
ICTCP_LMS_TO_XYZ = inverse(get_ICTCP_XYZ_TO_LMS());
|
|
693
|
+
}
|
|
694
|
+
}
|
|
540
695
|
function GammaTransferFunctions(gamma) {
|
|
541
|
-
this.
|
|
696
|
+
this.x77_1 = gamma;
|
|
542
697
|
}
|
|
543
|
-
protoOf(GammaTransferFunctions).
|
|
544
|
-
return spow(x, this.
|
|
698
|
+
protoOf(GammaTransferFunctions).v77 = function (x) {
|
|
699
|
+
return spow(x, this.x77_1);
|
|
545
700
|
};
|
|
546
|
-
protoOf(GammaTransferFunctions).
|
|
547
|
-
return spow(x, 1.0 / this.
|
|
701
|
+
protoOf(GammaTransferFunctions).w77 = function (x) {
|
|
702
|
+
return spow(x, 1.0 / this.x77_1);
|
|
548
703
|
};
|
|
549
704
|
protoOf(GammaTransferFunctions).toString = function () {
|
|
550
|
-
return 'GammaTransferFunctions(gamma=' + this.
|
|
705
|
+
return 'GammaTransferFunctions(gamma=' + this.x77_1 + ')';
|
|
551
706
|
};
|
|
552
707
|
protoOf(GammaTransferFunctions).hashCode = function () {
|
|
553
|
-
return getNumberHashCode(this.
|
|
708
|
+
return getNumberHashCode(this.x77_1);
|
|
554
709
|
};
|
|
555
710
|
protoOf(GammaTransferFunctions).equals = function (other) {
|
|
556
711
|
if (this === other)
|
|
@@ -558,16 +713,16 @@
|
|
|
558
713
|
if (!(other instanceof GammaTransferFunctions))
|
|
559
714
|
return false;
|
|
560
715
|
var tmp0_other_with_cast = other instanceof GammaTransferFunctions ? other : THROW_CCE();
|
|
561
|
-
if (!equals(this.
|
|
716
|
+
if (!equals(this.x77_1, tmp0_other_with_cast.x77_1))
|
|
562
717
|
return false;
|
|
563
718
|
return true;
|
|
564
719
|
};
|
|
565
720
|
function LinearTransferFunctions() {
|
|
566
721
|
}
|
|
567
|
-
protoOf(LinearTransferFunctions).
|
|
722
|
+
protoOf(LinearTransferFunctions).v77 = function (x) {
|
|
568
723
|
return x;
|
|
569
724
|
};
|
|
570
|
-
protoOf(LinearTransferFunctions).
|
|
725
|
+
protoOf(LinearTransferFunctions).w77 = function (x) {
|
|
571
726
|
return x;
|
|
572
727
|
};
|
|
573
728
|
var LinearTransferFunctions_instance;
|
|
@@ -578,31 +733,43 @@
|
|
|
578
733
|
}
|
|
579
734
|
function Companion_2() {
|
|
580
735
|
Companion_instance_2 = this;
|
|
581
|
-
this.
|
|
736
|
+
this.s76_1 = RGBColorSpaces_getInstance().a77_1;
|
|
582
737
|
}
|
|
583
|
-
protoOf(Companion_2).
|
|
584
|
-
return this.
|
|
738
|
+
protoOf(Companion_2).t76 = function (r, g, b, alpha) {
|
|
739
|
+
return this.s76_1.t76(r, g, b, alpha);
|
|
740
|
+
};
|
|
741
|
+
protoOf(Companion_2).y77 = function (r, g, b, alpha) {
|
|
742
|
+
return this.s76_1.y77(r, g, b, alpha);
|
|
743
|
+
};
|
|
744
|
+
protoOf(Companion_2).a78 = function (hex) {
|
|
745
|
+
return this.s76_1.a78(hex);
|
|
746
|
+
};
|
|
747
|
+
protoOf(Companion_2).z77 = function (r, g, b, alpha) {
|
|
748
|
+
return this.s76_1.z77(r, g, b, alpha);
|
|
585
749
|
};
|
|
586
|
-
protoOf(Companion_2).
|
|
587
|
-
return this.
|
|
750
|
+
protoOf(Companion_2).m77 = function () {
|
|
751
|
+
return this.s76_1.m77();
|
|
588
752
|
};
|
|
589
|
-
protoOf(Companion_2).
|
|
590
|
-
return this.
|
|
753
|
+
protoOf(Companion_2).b78 = function () {
|
|
754
|
+
return this.s76_1.b78();
|
|
591
755
|
};
|
|
592
|
-
protoOf(Companion_2).
|
|
593
|
-
return this.
|
|
756
|
+
protoOf(Companion_2).c78 = function () {
|
|
757
|
+
return this.s76_1.c78();
|
|
594
758
|
};
|
|
595
|
-
protoOf(Companion_2).
|
|
596
|
-
return this.
|
|
759
|
+
protoOf(Companion_2).d78 = function () {
|
|
760
|
+
return this.s76_1.d78();
|
|
597
761
|
};
|
|
598
|
-
protoOf(Companion_2).
|
|
599
|
-
return this.
|
|
762
|
+
protoOf(Companion_2).t2 = function () {
|
|
763
|
+
return this.s76_1.t2();
|
|
600
764
|
};
|
|
601
|
-
protoOf(Companion_2).
|
|
602
|
-
return this.
|
|
765
|
+
protoOf(Companion_2).f76 = function () {
|
|
766
|
+
return this.s76_1.f76();
|
|
603
767
|
};
|
|
604
|
-
protoOf(Companion_2).
|
|
605
|
-
return
|
|
768
|
+
protoOf(Companion_2).equals = function (other) {
|
|
769
|
+
return equals(RGBColorSpaces_getInstance().a77_1, other);
|
|
770
|
+
};
|
|
771
|
+
protoOf(Companion_2).hashCode = function () {
|
|
772
|
+
return hashCode(RGBColorSpaces_getInstance().a77_1);
|
|
606
773
|
};
|
|
607
774
|
var Companion_instance_2;
|
|
608
775
|
function Companion_getInstance_2() {
|
|
@@ -610,154 +777,187 @@
|
|
|
610
777
|
new Companion_2();
|
|
611
778
|
return Companion_instance_2;
|
|
612
779
|
}
|
|
780
|
+
function clamp$copy(receiver, p0, p1, p2, p3) {
|
|
781
|
+
return receiver.e78(p0, p1, p2, p3);
|
|
782
|
+
}
|
|
613
783
|
function RGB(r, g, b, alpha, space) {
|
|
614
784
|
Companion_getInstance_2();
|
|
615
|
-
this.
|
|
616
|
-
this.
|
|
617
|
-
this.
|
|
618
|
-
this.
|
|
619
|
-
this.
|
|
785
|
+
this.j75_1 = r;
|
|
786
|
+
this.k75_1 = g;
|
|
787
|
+
this.l75_1 = b;
|
|
788
|
+
this.m75_1 = alpha;
|
|
789
|
+
this.n75_1 = space;
|
|
620
790
|
}
|
|
621
|
-
protoOf(RGB).
|
|
791
|
+
protoOf(RGB).g75 = function () {
|
|
792
|
+
return this.n75_1;
|
|
793
|
+
};
|
|
794
|
+
protoOf(RGB).f78 = function () {
|
|
622
795
|
// Inline function 'kotlin.math.roundToInt' call
|
|
623
|
-
var this_0 = this.
|
|
796
|
+
var this_0 = this.j75_1 * 255;
|
|
624
797
|
return roundToInt(this_0);
|
|
625
798
|
};
|
|
626
|
-
protoOf(RGB).
|
|
799
|
+
protoOf(RGB).g78 = function () {
|
|
627
800
|
// Inline function 'kotlin.math.roundToInt' call
|
|
628
|
-
var this_0 = this.
|
|
801
|
+
var this_0 = this.k75_1 * 255;
|
|
629
802
|
return roundToInt(this_0);
|
|
630
803
|
};
|
|
631
|
-
protoOf(RGB).
|
|
804
|
+
protoOf(RGB).h78 = function () {
|
|
632
805
|
// Inline function 'kotlin.math.roundToInt' call
|
|
633
|
-
var this_0 = this.
|
|
806
|
+
var this_0 = this.l75_1 * 255;
|
|
634
807
|
return roundToInt(this_0);
|
|
635
808
|
};
|
|
636
|
-
protoOf(RGB).
|
|
637
|
-
var f = SRGB_getInstance().
|
|
638
|
-
return equals(this.
|
|
809
|
+
protoOf(RGB).i78 = function (space) {
|
|
810
|
+
var f = SRGB_getInstance().m77();
|
|
811
|
+
return equals(this.n75_1, space) ? this : equals(this.n75_1, SRGB_getInstance()) && equals(space, RGBColorSpaces_getInstance().b77_1) ? space.t76(f.v77(this.j75_1), f.v77(this.k75_1), f.v77(this.l75_1), this.m75_1) : equals(this.n75_1, RGBColorSpaces_getInstance().b77_1) && equals(space, SRGB_getInstance()) ? space.t76(f.w77(this.j75_1), f.w77(this.k75_1), f.w77(this.l75_1), this.m75_1) : this.i75().o78(space);
|
|
639
812
|
};
|
|
640
|
-
protoOf(RGB).
|
|
641
|
-
return this.v77(coerceIn(this.v75_1, 0.0, 1.0), coerceIn(this.w75_1, 0.0, 1.0), coerceIn(this.x75_1, 0.0, 1.0), coerceIn(this.y75_1, 0.0, 1.0));
|
|
642
|
-
};
|
|
643
|
-
protoOf(RGB).w77 = function () {
|
|
813
|
+
protoOf(RGB).p78 = function () {
|
|
644
814
|
var tmp$ret$3;
|
|
645
815
|
$l$block: {
|
|
646
816
|
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
647
817
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
648
|
-
var $this$toSRGB = this.
|
|
649
|
-
var r = $this$toSRGB.
|
|
650
|
-
var g = $this$toSRGB.
|
|
651
|
-
var b = $this$toSRGB.
|
|
818
|
+
var $this$toSRGB = this.i78(SRGB_getInstance());
|
|
819
|
+
var r = $this$toSRGB.j75_1;
|
|
820
|
+
var g = $this$toSRGB.k75_1;
|
|
821
|
+
var b = $this$toSRGB.l75_1;
|
|
652
822
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
653
823
|
var min = Math.min(r, g, b);
|
|
654
824
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
655
825
|
var max = Math.max(r, g, b);
|
|
656
826
|
var chroma = max - min;
|
|
657
|
-
var
|
|
658
|
-
if (chroma < 1.0E-7) {
|
|
659
|
-
tmp = NaN;
|
|
660
|
-
} else if (r === max) {
|
|
661
|
-
tmp = (g - b) / chroma;
|
|
662
|
-
} else if (g === max) {
|
|
663
|
-
tmp = 2 + (b - r) / chroma;
|
|
664
|
-
} else if (b === max) {
|
|
665
|
-
tmp = 4 + (r - g) / chroma;
|
|
666
|
-
} else {
|
|
667
|
-
tmp = 0.0;
|
|
668
|
-
}
|
|
669
|
-
var h = tmp * 60;
|
|
827
|
+
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;
|
|
670
828
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toHSV.<anonymous>' call
|
|
671
829
|
var h_0 = normalizeDeg(h);
|
|
672
830
|
var s = max === 0.0 ? 0.0 : chroma / max;
|
|
673
|
-
tmp$ret$3 = new HSV(h_0, s, max, this.
|
|
831
|
+
tmp$ret$3 = new HSV(h_0, s, max, this.m75_1);
|
|
674
832
|
break $l$block;
|
|
675
833
|
}
|
|
676
834
|
return tmp$ret$3;
|
|
677
835
|
};
|
|
678
|
-
protoOf(RGB).
|
|
679
|
-
var f = this.
|
|
836
|
+
protoOf(RGB).i75 = function () {
|
|
837
|
+
var f = this.n75_1.m77();
|
|
680
838
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
681
|
-
var this_0 = _Matrix___init__impl__q3kp4w(this.
|
|
682
|
-
var v0 = f.
|
|
683
|
-
var v1 = f.
|
|
684
|
-
var v2 = f.
|
|
839
|
+
var this_0 = _Matrix___init__impl__q3kp4w(this.n75_1.b78());
|
|
840
|
+
var v0 = f.v77(this.j75_1);
|
|
841
|
+
var v1 = f.v77(this.k75_1);
|
|
842
|
+
var v2 = f.v77(this.l75_1);
|
|
685
843
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toXYZ.<anonymous>' call
|
|
686
844
|
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;
|
|
687
845
|
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;
|
|
688
846
|
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;
|
|
689
|
-
return
|
|
847
|
+
return XYZColorSpace_0(this.n75_1.d78()).t76(x, y, z, this.m75_1);
|
|
690
848
|
};
|
|
691
|
-
protoOf(RGB).
|
|
849
|
+
protoOf(RGB).l76 = function () {
|
|
692
850
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
693
|
-
var $this$toSRGB = this.
|
|
851
|
+
var $this$toSRGB = this.i78(SRGB_getInstance());
|
|
694
852
|
// Inline function 'kotlin.math.roundToInt' call
|
|
695
|
-
var this_0 = $this$toSRGB.
|
|
853
|
+
var this_0 = $this$toSRGB.p78().q76_1 * 100;
|
|
696
854
|
var value = roundToInt(this_0);
|
|
697
855
|
if (value === 30)
|
|
698
856
|
return new Ansi16(30);
|
|
699
857
|
var v = value / 50 | 0;
|
|
700
858
|
// Inline function 'kotlin.math.roundToInt' call
|
|
701
|
-
var this_1 = $this$toSRGB.
|
|
859
|
+
var this_1 = $this$toSRGB.l75_1;
|
|
702
860
|
var tmp$ret$1 = roundToInt(this_1);
|
|
703
861
|
var tmp = imul(tmp$ret$1, 4);
|
|
704
862
|
// Inline function 'kotlin.math.roundToInt' call
|
|
705
|
-
var this_2 = $this$toSRGB.
|
|
863
|
+
var this_2 = $this$toSRGB.k75_1;
|
|
706
864
|
var tmp$ret$2 = roundToInt(this_2);
|
|
707
865
|
var tmp_0 = tmp | imul(tmp$ret$2, 2);
|
|
708
866
|
// Inline function 'kotlin.math.roundToInt' call
|
|
709
|
-
var this_3 = $this$toSRGB.
|
|
867
|
+
var this_3 = $this$toSRGB.j75_1;
|
|
710
868
|
var ansi = 30 + (tmp_0 | roundToInt(this_3)) | 0;
|
|
711
869
|
return new Ansi16(v === 2 ? ansi + 60 | 0 : ansi);
|
|
712
870
|
};
|
|
713
|
-
protoOf(RGB).
|
|
871
|
+
protoOf(RGB).q78 = function () {
|
|
714
872
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
715
|
-
var $this$toSRGB = this.
|
|
716
|
-
var ri = $this$toSRGB.
|
|
717
|
-
var gi = $this$toSRGB.
|
|
718
|
-
var bi = $this$toSRGB.
|
|
873
|
+
var $this$toSRGB = this.i78(SRGB_getInstance());
|
|
874
|
+
var ri = $this$toSRGB.f78();
|
|
875
|
+
var gi = $this$toSRGB.g78();
|
|
876
|
+
var bi = $this$toSRGB.h78();
|
|
719
877
|
var tmp;
|
|
720
878
|
if (ri === gi && gi === bi) {
|
|
721
879
|
tmp = ri < 8 ? 16 : ri > 248 ? 231 : roundToInt((ri - 8 | 0) / 247.0 * 24.0) + 232 | 0;
|
|
722
880
|
} else {
|
|
723
881
|
// Inline function 'kotlin.math.roundToInt' call
|
|
724
|
-
var this_0 = $this$toSRGB.
|
|
882
|
+
var this_0 = $this$toSRGB.j75_1 * 5;
|
|
725
883
|
var tmp$ret$0 = roundToInt(this_0);
|
|
726
884
|
var tmp_0 = 16 + imul(36, tmp$ret$0) | 0;
|
|
727
885
|
// Inline function 'kotlin.math.roundToInt' call
|
|
728
|
-
var this_1 = $this$toSRGB.
|
|
886
|
+
var this_1 = $this$toSRGB.k75_1 * 5;
|
|
729
887
|
var tmp$ret$1 = roundToInt(this_1);
|
|
730
888
|
var tmp_1 = tmp_0 + imul(6, tmp$ret$1) | 0;
|
|
731
889
|
// Inline function 'kotlin.math.roundToInt' call
|
|
732
|
-
var this_2 = $this$toSRGB.
|
|
890
|
+
var this_2 = $this$toSRGB.l75_1 * 5;
|
|
733
891
|
tmp = tmp_1 + roundToInt(this_2) | 0;
|
|
734
892
|
}
|
|
735
893
|
var code = tmp;
|
|
736
894
|
return new Ansi256(code);
|
|
737
895
|
};
|
|
738
|
-
protoOf(RGB).
|
|
739
|
-
return this.
|
|
896
|
+
protoOf(RGB).h75 = function () {
|
|
897
|
+
return this.i78(RGBColorSpaces_getInstance().a77_1);
|
|
898
|
+
};
|
|
899
|
+
protoOf(RGB).r78 = function () {
|
|
900
|
+
// Inline function 'com.github.ajalt.colormath.internal.clamp3' call
|
|
901
|
+
var v1 = this.j75_1;
|
|
902
|
+
var v2 = this.k75_1;
|
|
903
|
+
var v3 = this.l75_1;
|
|
904
|
+
var alpha = this.m75_1;
|
|
905
|
+
var _destruct__k2r9zo = this.g75().f76();
|
|
906
|
+
// Inline function 'kotlin.collections.component1' call
|
|
907
|
+
var c1 = _destruct__k2r9zo.p(0);
|
|
908
|
+
// Inline function 'kotlin.collections.component2' call
|
|
909
|
+
var c2 = _destruct__k2r9zo.p(1);
|
|
910
|
+
// Inline function 'kotlin.collections.component3' call
|
|
911
|
+
var c3 = _destruct__k2r9zo.p(2);
|
|
912
|
+
var tmp;
|
|
913
|
+
var tmp_0;
|
|
914
|
+
var tmp_1;
|
|
915
|
+
var tmp_2;
|
|
916
|
+
var containsLower = c1.q75_1;
|
|
917
|
+
if (v1 <= c1.r75_1 ? containsLower <= v1 : false) {
|
|
918
|
+
var containsLower_0 = c2.q75_1;
|
|
919
|
+
tmp_2 = v2 <= c2.r75_1 ? containsLower_0 <= v2 : false;
|
|
920
|
+
} else {
|
|
921
|
+
tmp_2 = false;
|
|
922
|
+
}
|
|
923
|
+
if (tmp_2) {
|
|
924
|
+
var containsLower_1 = c3.q75_1;
|
|
925
|
+
tmp_1 = v3 <= c3.r75_1 ? containsLower_1 <= v3 : false;
|
|
926
|
+
} else {
|
|
927
|
+
tmp_1 = false;
|
|
928
|
+
}
|
|
929
|
+
if (tmp_1) {
|
|
930
|
+
tmp_0 = 0.0 <= alpha ? alpha <= 1.0 : false;
|
|
931
|
+
} else {
|
|
932
|
+
tmp_0 = false;
|
|
933
|
+
}
|
|
934
|
+
if (tmp_0) {
|
|
935
|
+
tmp = this;
|
|
936
|
+
} else {
|
|
937
|
+
tmp = clamp$copy(this, coerceIn(v1, c1.q75_1, c1.r75_1), coerceIn(v2, c2.q75_1, c2.r75_1), coerceIn(v3, c3.q75_1, c3.r75_1), coerceIn(alpha, 0.0, 1.0));
|
|
938
|
+
}
|
|
939
|
+
return tmp;
|
|
740
940
|
};
|
|
741
|
-
protoOf(RGB).
|
|
941
|
+
protoOf(RGB).s78 = function (r, g, b, alpha, space) {
|
|
742
942
|
return new RGB(r, g, b, alpha, space);
|
|
743
943
|
};
|
|
744
|
-
protoOf(RGB).
|
|
745
|
-
r = r === VOID ? this.
|
|
746
|
-
g = g === VOID ? this.
|
|
747
|
-
b = b === VOID ? this.
|
|
748
|
-
alpha = alpha === VOID ? this.
|
|
749
|
-
space = space === VOID ? this.
|
|
750
|
-
return $super === VOID ? this.
|
|
944
|
+
protoOf(RGB).e78 = function (r, g, b, alpha, space, $super) {
|
|
945
|
+
r = r === VOID ? this.j75_1 : r;
|
|
946
|
+
g = g === VOID ? this.k75_1 : g;
|
|
947
|
+
b = b === VOID ? this.l75_1 : b;
|
|
948
|
+
alpha = alpha === VOID ? this.m75_1 : alpha;
|
|
949
|
+
space = space === VOID ? this.n75_1 : space;
|
|
950
|
+
return $super === VOID ? this.s78(r, g, b, alpha, space) : $super.s78.call(this, r, g, b, alpha, space);
|
|
751
951
|
};
|
|
752
952
|
protoOf(RGB).toString = function () {
|
|
753
|
-
return 'RGB(r=' + this.
|
|
953
|
+
return 'RGB(r=' + this.j75_1 + ', g=' + this.k75_1 + ', b=' + this.l75_1 + ', alpha=' + this.m75_1 + ', space=' + toString(this.n75_1) + ')';
|
|
754
954
|
};
|
|
755
955
|
protoOf(RGB).hashCode = function () {
|
|
756
|
-
var result = getNumberHashCode(this.
|
|
757
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
758
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
759
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
760
|
-
result = imul(result, 31) + hashCode(this.
|
|
956
|
+
var result = getNumberHashCode(this.j75_1);
|
|
957
|
+
result = imul(result, 31) + getNumberHashCode(this.k75_1) | 0;
|
|
958
|
+
result = imul(result, 31) + getNumberHashCode(this.l75_1) | 0;
|
|
959
|
+
result = imul(result, 31) + getNumberHashCode(this.m75_1) | 0;
|
|
960
|
+
result = imul(result, 31) + hashCode(this.n75_1) | 0;
|
|
761
961
|
return result;
|
|
762
962
|
};
|
|
763
963
|
protoOf(RGB).equals = function (other) {
|
|
@@ -766,15 +966,15 @@
|
|
|
766
966
|
if (!(other instanceof RGB))
|
|
767
967
|
return false;
|
|
768
968
|
var tmp0_other_with_cast = other instanceof RGB ? other : THROW_CCE();
|
|
769
|
-
if (!equals(this.
|
|
969
|
+
if (!equals(this.j75_1, tmp0_other_with_cast.j75_1))
|
|
770
970
|
return false;
|
|
771
|
-
if (!equals(this.
|
|
971
|
+
if (!equals(this.k75_1, tmp0_other_with_cast.k75_1))
|
|
772
972
|
return false;
|
|
773
|
-
if (!equals(this.
|
|
973
|
+
if (!equals(this.l75_1, tmp0_other_with_cast.l75_1))
|
|
774
974
|
return false;
|
|
775
|
-
if (!equals(this.
|
|
975
|
+
if (!equals(this.m75_1, tmp0_other_with_cast.m75_1))
|
|
776
976
|
return false;
|
|
777
|
-
if (!equals(this.
|
|
977
|
+
if (!equals(this.n75_1, tmp0_other_with_cast.n75_1))
|
|
778
978
|
return false;
|
|
779
979
|
return true;
|
|
780
980
|
};
|
|
@@ -789,7 +989,7 @@
|
|
|
789
989
|
// Inline function 'kotlin.contracts.contract' call
|
|
790
990
|
// Inline function 'com.github.ajalt.colormath.model.parseHex.<anonymous>' call
|
|
791
991
|
var it = charSequenceGet(_this__u8e3s4, i_0);
|
|
792
|
-
var tmp$ret$1 =
|
|
992
|
+
var tmp$ret$1 = toString_0(it) + toString_0(it);
|
|
793
993
|
tmp = toInt(tmp$ret$1, 16);
|
|
794
994
|
}
|
|
795
995
|
return tmp;
|
|
@@ -817,7 +1017,7 @@
|
|
|
817
1017
|
if (!tmp$ret$0) {
|
|
818
1018
|
// Inline function 'com.github.ajalt.colormath.model.validateHex.<anonymous>.<anonymous>' call
|
|
819
1019
|
var message = 'Hex string must be in the format "#ffffff" or "ffffff"';
|
|
820
|
-
throw IllegalArgumentException_init_$Create$(
|
|
1020
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
821
1021
|
}
|
|
822
1022
|
return _this__u8e3s4;
|
|
823
1023
|
}
|
|
@@ -874,20 +1074,48 @@
|
|
|
874
1074
|
return ACES_AP1_B;
|
|
875
1075
|
}
|
|
876
1076
|
var ACES_AP1_B;
|
|
1077
|
+
function RGBColorSpaces$SRGB$lambda($this$RGBColorSpaceImpl, it) {
|
|
1078
|
+
return it.h75();
|
|
1079
|
+
}
|
|
1080
|
+
function RGBColorSpaces$BT2020$lambda($this$RGBColorSpaceImpl, color) {
|
|
1081
|
+
var tmp;
|
|
1082
|
+
if (color instanceof RGB) {
|
|
1083
|
+
tmp = color.i78($this$RGBColorSpaceImpl);
|
|
1084
|
+
} else {
|
|
1085
|
+
if (color instanceof ICtCp) {
|
|
1086
|
+
tmp = color.z76();
|
|
1087
|
+
} else {
|
|
1088
|
+
tmp = color.i75().o78($this$RGBColorSpaceImpl);
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
return tmp;
|
|
1092
|
+
}
|
|
877
1093
|
function RGBColorSpaces() {
|
|
878
1094
|
RGBColorSpaces_instance = this;
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
this.
|
|
887
|
-
this.
|
|
888
|
-
this.
|
|
889
|
-
this.
|
|
890
|
-
this.
|
|
1095
|
+
var tmp = this;
|
|
1096
|
+
var tmp_0 = Illuminant_getInstance().z75_1;
|
|
1097
|
+
var tmp_1 = SRGBTransferFunctions_instance;
|
|
1098
|
+
var tmp_2 = get_SRGB_R();
|
|
1099
|
+
var tmp_3 = get_SRGB_G();
|
|
1100
|
+
var tmp_4 = get_SRGB_B();
|
|
1101
|
+
tmp.a77_1 = new RGBColorSpaceImpl('sRGB', tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, RGBColorSpaces$SRGB$lambda);
|
|
1102
|
+
this.b77_1 = RGBColorSpace_0('Linear sRGB', Illuminant_getInstance().z75_1, LinearTransferFunctions_instance, get_SRGB_R(), get_SRGB_G(), get_SRGB_B());
|
|
1103
|
+
this.c77_1 = RGBColorSpace_0('ACES2065-1', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP0_R(), get_ACES_AP0_G(), get_ACES_AP0_B());
|
|
1104
|
+
this.d77_1 = RGBColorSpace_0('ACEScc', get_ACES_WHITE_POINT(), ACESccTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1105
|
+
this.e77_1 = RGBColorSpace_0('ACEScct', get_ACES_WHITE_POINT(), ACEScctTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1106
|
+
this.f77_1 = RGBColorSpace_0('ACEScg', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1107
|
+
this.g77_1 = RGBColorSpace_0('Adobe RGB', Illuminant_getInstance().z75_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));
|
|
1108
|
+
var tmp_5 = this;
|
|
1109
|
+
var tmp_6 = Illuminant_getInstance().z75_1;
|
|
1110
|
+
var tmp_7 = BT2020TransferFunctions_getInstance();
|
|
1111
|
+
var tmp_8 = xyY_init_$Create$(0.708, 0.292);
|
|
1112
|
+
var tmp_9 = xyY_init_$Create$(0.17, 0.797);
|
|
1113
|
+
var tmp_10 = xyY_init_$Create$(0.131, 0.046);
|
|
1114
|
+
tmp_5.h77_1 = new RGBColorSpaceImpl('BT.2020', tmp_6, tmp_7, tmp_8, tmp_9, tmp_10, RGBColorSpaces$BT2020$lambda);
|
|
1115
|
+
this.i77_1 = RGBColorSpace_0('BT.709', Illuminant_getInstance().z75_1, BT709TransferFunctions_getInstance(), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.3, 0.6), xyY_init_$Create$(0.15, 0.06));
|
|
1116
|
+
this.j77_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));
|
|
1117
|
+
this.k77_1 = RGBColorSpace_0('Display P3', Illuminant_getInstance().z75_1, SRGBTransferFunctions_instance, xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
|
|
1118
|
+
this.l77_1 = RGBColorSpace_0('ROMM RGB', Illuminant_getInstance().x75_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));
|
|
891
1119
|
}
|
|
892
1120
|
var RGBColorSpaces_instance;
|
|
893
1121
|
function RGBColorSpaces_getInstance() {
|
|
@@ -897,30 +1125,46 @@
|
|
|
897
1125
|
}
|
|
898
1126
|
function SRGB() {
|
|
899
1127
|
SRGB_instance = this;
|
|
900
|
-
this.
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
this.
|
|
904
|
-
this.l76_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.j76_1, get_SRGB_R(), get_SRGB_G(), get_SRGB_B()));
|
|
905
|
-
this.m76_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.l76_1)));
|
|
906
|
-
}
|
|
907
|
-
protoOf(SRGB).w76 = function () {
|
|
908
|
-
return this.j76_1;
|
|
1128
|
+
this.u76_1 = RGBColorSpaces_getInstance().a77_1;
|
|
1129
|
+
}
|
|
1130
|
+
protoOf(SRGB).t76 = function (r, g, b, alpha) {
|
|
1131
|
+
return this.u76_1.t76(r, g, b, alpha);
|
|
909
1132
|
};
|
|
910
|
-
protoOf(SRGB).
|
|
911
|
-
return this.
|
|
1133
|
+
protoOf(SRGB).y77 = function (r, g, b, alpha) {
|
|
1134
|
+
return this.u76_1.y77(r, g, b, alpha);
|
|
912
1135
|
};
|
|
913
|
-
protoOf(SRGB).
|
|
914
|
-
return this.
|
|
1136
|
+
protoOf(SRGB).a78 = function (hex) {
|
|
1137
|
+
return this.u76_1.a78(hex);
|
|
915
1138
|
};
|
|
916
|
-
protoOf(SRGB).
|
|
917
|
-
return this.
|
|
1139
|
+
protoOf(SRGB).z77 = function (r, g, b, alpha) {
|
|
1140
|
+
return this.u76_1.z77(r, g, b, alpha);
|
|
918
1141
|
};
|
|
919
|
-
protoOf(SRGB).
|
|
920
|
-
return this.
|
|
1142
|
+
protoOf(SRGB).m77 = function () {
|
|
1143
|
+
return this.u76_1.m77();
|
|
921
1144
|
};
|
|
922
|
-
protoOf(SRGB).
|
|
923
|
-
return
|
|
1145
|
+
protoOf(SRGB).b78 = function () {
|
|
1146
|
+
return this.u76_1.b78();
|
|
1147
|
+
};
|
|
1148
|
+
protoOf(SRGB).c78 = function () {
|
|
1149
|
+
return this.u76_1.c78();
|
|
1150
|
+
};
|
|
1151
|
+
protoOf(SRGB).d78 = function () {
|
|
1152
|
+
return this.u76_1.d78();
|
|
1153
|
+
};
|
|
1154
|
+
protoOf(SRGB).t2 = function () {
|
|
1155
|
+
return this.u76_1.t2();
|
|
1156
|
+
};
|
|
1157
|
+
protoOf(SRGB).f76 = function () {
|
|
1158
|
+
return this.u76_1.f76();
|
|
1159
|
+
};
|
|
1160
|
+
protoOf(SRGB).equals = function (other) {
|
|
1161
|
+
return equals(RGBColorSpaces_getInstance().a77_1, other);
|
|
1162
|
+
};
|
|
1163
|
+
protoOf(SRGB).hashCode = function () {
|
|
1164
|
+
return hashCode(RGBColorSpaces_getInstance().a77_1);
|
|
1165
|
+
};
|
|
1166
|
+
protoOf(SRGB).toString = function () {
|
|
1167
|
+
return 'sRGB';
|
|
924
1168
|
};
|
|
925
1169
|
var SRGB_instance;
|
|
926
1170
|
function SRGB_getInstance() {
|
|
@@ -928,45 +1172,119 @@
|
|
|
928
1172
|
new SRGB();
|
|
929
1173
|
return SRGB_instance;
|
|
930
1174
|
}
|
|
1175
|
+
function RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b, convertImpl) {
|
|
1176
|
+
this.t78_1 = name;
|
|
1177
|
+
this.u78_1 = whitePoint;
|
|
1178
|
+
this.v78_1 = transferFunctions;
|
|
1179
|
+
this.w78_1 = r;
|
|
1180
|
+
this.x78_1 = g;
|
|
1181
|
+
this.y78_1 = b;
|
|
1182
|
+
this.z78_1 = convertImpl;
|
|
1183
|
+
this.a79_1 = zeroOneComponentInfo('RGB');
|
|
1184
|
+
this.b79_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.u78_1, this.w78_1, this.x78_1, this.y78_1));
|
|
1185
|
+
this.c79_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.b79_1)));
|
|
1186
|
+
}
|
|
1187
|
+
protoOf(RGBColorSpaceImpl).t2 = function () {
|
|
1188
|
+
return this.t78_1;
|
|
1189
|
+
};
|
|
1190
|
+
protoOf(RGBColorSpaceImpl).d78 = function () {
|
|
1191
|
+
return this.u78_1;
|
|
1192
|
+
};
|
|
1193
|
+
protoOf(RGBColorSpaceImpl).m77 = function () {
|
|
1194
|
+
return this.v78_1;
|
|
1195
|
+
};
|
|
1196
|
+
protoOf(RGBColorSpaceImpl).f76 = function () {
|
|
1197
|
+
return this.a79_1;
|
|
1198
|
+
};
|
|
1199
|
+
protoOf(RGBColorSpaceImpl).b78 = function () {
|
|
1200
|
+
return this.b79_1;
|
|
1201
|
+
};
|
|
1202
|
+
protoOf(RGBColorSpaceImpl).c78 = function () {
|
|
1203
|
+
return this.c79_1;
|
|
1204
|
+
};
|
|
1205
|
+
protoOf(RGBColorSpaceImpl).toString = function () {
|
|
1206
|
+
return this.t78_1;
|
|
1207
|
+
};
|
|
1208
|
+
protoOf(RGBColorSpaceImpl).t76 = function (r, g, b, alpha) {
|
|
1209
|
+
return new RGB(r, g, b, alpha, this);
|
|
1210
|
+
};
|
|
1211
|
+
protoOf(RGBColorSpaceImpl).equals = function (other) {
|
|
1212
|
+
if (this === other)
|
|
1213
|
+
return true;
|
|
1214
|
+
if (!(!(other == null) ? isInterface(other, RGBColorSpace) : false))
|
|
1215
|
+
return false;
|
|
1216
|
+
if (!(this.t78_1 === other.t2()))
|
|
1217
|
+
return false;
|
|
1218
|
+
if (!this.u78_1.equals(other.d78()))
|
|
1219
|
+
return false;
|
|
1220
|
+
if (!equals(this.v78_1, other.m77()))
|
|
1221
|
+
return false;
|
|
1222
|
+
if (other instanceof RGBColorSpaceImpl) {
|
|
1223
|
+
if (!this.w78_1.equals(other.w78_1))
|
|
1224
|
+
return false;
|
|
1225
|
+
if (!this.x78_1.equals(other.x78_1))
|
|
1226
|
+
return false;
|
|
1227
|
+
if (!this.y78_1.equals(other.y78_1))
|
|
1228
|
+
return false;
|
|
1229
|
+
} else {
|
|
1230
|
+
if (!contentEquals(this.b79_1, other.b78()))
|
|
1231
|
+
return false;
|
|
1232
|
+
if (!contentEquals(this.c79_1, other.c78()))
|
|
1233
|
+
return false;
|
|
1234
|
+
}
|
|
1235
|
+
return true;
|
|
1236
|
+
};
|
|
1237
|
+
protoOf(RGBColorSpaceImpl).hashCode = function () {
|
|
1238
|
+
var result = getStringHashCode(this.t78_1);
|
|
1239
|
+
result = imul(31, result) + this.u78_1.hashCode() | 0;
|
|
1240
|
+
result = imul(31, result) + hashCode(this.v78_1) | 0;
|
|
1241
|
+
result = imul(31, result) + this.w78_1.hashCode() | 0;
|
|
1242
|
+
result = imul(31, result) + this.x78_1.hashCode() | 0;
|
|
1243
|
+
result = imul(31, result) + this.y78_1.hashCode() | 0;
|
|
1244
|
+
return result;
|
|
1245
|
+
};
|
|
1246
|
+
function SRGBTransferFunctions() {
|
|
1247
|
+
}
|
|
1248
|
+
protoOf(SRGBTransferFunctions).w77 = function (x) {
|
|
1249
|
+
return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x, 1 / 2.4) - 0.055;
|
|
1250
|
+
};
|
|
1251
|
+
protoOf(SRGBTransferFunctions).v77 = function (x) {
|
|
1252
|
+
return x <= 0.04045 ? x / 12.92 : spow_0((x + 0.055) / 1.055, 2.4);
|
|
1253
|
+
};
|
|
1254
|
+
var SRGBTransferFunctions_instance;
|
|
1255
|
+
function SRGBTransferFunctions_getInstance() {
|
|
1256
|
+
return SRGBTransferFunctions_instance;
|
|
1257
|
+
}
|
|
931
1258
|
function RGBColorSpace_0(name, whitePoint, transferFunctions, r, g, b) {
|
|
932
1259
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
933
|
-
return new RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b);
|
|
1260
|
+
return new RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b, RGBColorSpace$lambda);
|
|
934
1261
|
}
|
|
935
1262
|
function ACESccTransferFunctions() {
|
|
936
1263
|
ACESccTransferFunctions_instance = this;
|
|
937
|
-
this.
|
|
938
|
-
this.
|
|
939
|
-
this.
|
|
1264
|
+
this.d79_1 = 3.0517578125E-5;
|
|
1265
|
+
this.e79_1 = 1.52587890625E-5;
|
|
1266
|
+
this.f79_1 = -0.3013698630136986;
|
|
940
1267
|
var tmp = this;
|
|
941
1268
|
// Inline function 'kotlin.math.log2' call
|
|
942
|
-
tmp.
|
|
1269
|
+
tmp.g79_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
943
1270
|
}
|
|
944
|
-
protoOf(ACESccTransferFunctions).
|
|
1271
|
+
protoOf(ACESccTransferFunctions).v77 = function (x) {
|
|
945
1272
|
var tmp;
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
if (
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
tmp = (
|
|
1273
|
+
if (x <= -0.3013698630136986) {
|
|
1274
|
+
tmp = (spow_0(2.0, x * 17.52 - 9.72) - 1.52587890625E-5) * 2.0;
|
|
1275
|
+
} else if (x < this.g79_1) {
|
|
1276
|
+
// Inline function 'kotlin.math.pow' call
|
|
1277
|
+
var x_0 = x * 17.52 - 9.72;
|
|
1278
|
+
tmp = Math.pow(2.0, x_0);
|
|
952
1279
|
} else {
|
|
953
|
-
|
|
954
|
-
// Inline function 'kotlin.math.pow' call
|
|
955
|
-
var x_0 = x * 17.52 - 9.72;
|
|
956
|
-
tmp = Math.pow(2.0, x_0);
|
|
957
|
-
} else {
|
|
958
|
-
tmp = 65504.0;
|
|
959
|
-
}
|
|
1280
|
+
tmp = 65504.0;
|
|
960
1281
|
}
|
|
961
1282
|
return tmp;
|
|
962
1283
|
};
|
|
963
|
-
protoOf(ACESccTransferFunctions).
|
|
1284
|
+
protoOf(ACESccTransferFunctions).w77 = function (x) {
|
|
964
1285
|
var tmp;
|
|
965
|
-
|
|
966
|
-
ACESccTransferFunctions_getInstance();
|
|
967
|
-
if (tmp_0 < 3.0517578125E-5) {
|
|
1286
|
+
if (x < 3.0517578125E-5) {
|
|
968
1287
|
// Inline function 'kotlin.math.log2' call
|
|
969
|
-
ACESccTransferFunctions_getInstance();
|
|
970
1288
|
var x_0 = 1.52587890625E-5 + coerceAtLeast_0(x, 0.0) / 2.0;
|
|
971
1289
|
tmp = (log2(x_0) + 9.72) / 17.52;
|
|
972
1290
|
} else {
|
|
@@ -983,20 +1301,17 @@
|
|
|
983
1301
|
}
|
|
984
1302
|
function ACEScctTransferFunctions() {
|
|
985
1303
|
ACEScctTransferFunctions_instance = this;
|
|
986
|
-
this.
|
|
987
|
-
this.
|
|
1304
|
+
this.h79_1 = 10.5402377416545;
|
|
1305
|
+
this.i79_1 = 0.0729055341958355;
|
|
988
1306
|
var tmp = this;
|
|
989
1307
|
// Inline function 'kotlin.math.log2' call
|
|
990
|
-
tmp.
|
|
1308
|
+
tmp.j79_1 = (log2(65504.0) + 9.72) / 17.52;
|
|
991
1309
|
}
|
|
992
|
-
protoOf(ACEScctTransferFunctions).
|
|
1310
|
+
protoOf(ACEScctTransferFunctions).v77 = function (x) {
|
|
993
1311
|
var tmp;
|
|
994
1312
|
if (x <= 0.155251141552511) {
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
ACEScctTransferFunctions_getInstance();
|
|
998
|
-
tmp = tmp_0 / 10.5402377416545;
|
|
999
|
-
} else if (x < this.f78_1) {
|
|
1313
|
+
tmp = (x - 0.0729055341958355) / 10.5402377416545;
|
|
1314
|
+
} else if (x < this.j79_1) {
|
|
1000
1315
|
// Inline function 'kotlin.math.pow' call
|
|
1001
1316
|
var x_0 = x * 17.52 - 9.72;
|
|
1002
1317
|
tmp = Math.pow(2.0, x_0);
|
|
@@ -1005,13 +1320,10 @@
|
|
|
1005
1320
|
}
|
|
1006
1321
|
return tmp;
|
|
1007
1322
|
};
|
|
1008
|
-
protoOf(ACEScctTransferFunctions).
|
|
1323
|
+
protoOf(ACEScctTransferFunctions).w77 = function (x) {
|
|
1009
1324
|
var tmp;
|
|
1010
1325
|
if (x < 0.0078125) {
|
|
1011
|
-
|
|
1012
|
-
var tmp_0 = 10.5402377416545 * x;
|
|
1013
|
-
ACEScctTransferFunctions_getInstance();
|
|
1014
|
-
tmp = tmp_0 + 0.0729055341958355;
|
|
1326
|
+
tmp = 10.5402377416545 * x + 0.0729055341958355;
|
|
1015
1327
|
} else {
|
|
1016
1328
|
// Inline function 'kotlin.math.log2' call
|
|
1017
1329
|
tmp = (log2(x) + 9.72) / 17.52;
|
|
@@ -1024,47 +1336,34 @@
|
|
|
1024
1336
|
new ACEScctTransferFunctions();
|
|
1025
1337
|
return ACEScctTransferFunctions_instance;
|
|
1026
1338
|
}
|
|
1027
|
-
function
|
|
1028
|
-
|
|
1029
|
-
this.
|
|
1030
|
-
this.
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
this.l78_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.k78_1)));
|
|
1339
|
+
function BT2020TransferFunctions() {
|
|
1340
|
+
BT2020TransferFunctions_instance = this;
|
|
1341
|
+
this.k79_1 = 1.0993;
|
|
1342
|
+
this.l79_1 = 0.0181;
|
|
1343
|
+
var tmp = this;
|
|
1344
|
+
// Inline function 'kotlin.math.pow' call
|
|
1345
|
+
tmp.m79_1 = 1.0993 * Math.pow(0.0181, 0.45) - (1.0993 - 1);
|
|
1035
1346
|
}
|
|
1036
|
-
protoOf(
|
|
1037
|
-
return this.
|
|
1038
|
-
};
|
|
1039
|
-
protoOf(BT2020Space).t76 = function () {
|
|
1040
|
-
return this.j78_1;
|
|
1041
|
-
};
|
|
1042
|
-
protoOf(BT2020Space).g76 = function (r, g, b, alpha) {
|
|
1043
|
-
return new RGB(r, g, b, alpha, this);
|
|
1044
|
-
};
|
|
1045
|
-
protoOf(BT2020Space).u76 = function () {
|
|
1046
|
-
return this.k78_1;
|
|
1347
|
+
protoOf(BT2020TransferFunctions).v77 = function (x) {
|
|
1348
|
+
return numberToDouble(x < this.m79_1 ? x / 4.5 : spow_0((x + (1.0993 - 1)) / 1.0993, 1 / 0.45));
|
|
1047
1349
|
};
|
|
1048
|
-
protoOf(
|
|
1049
|
-
return
|
|
1350
|
+
protoOf(BT2020TransferFunctions).w77 = function (x) {
|
|
1351
|
+
return x < 0.0181 ? 4.5 * x : 1.0993 * spow(x, 0.45) - (1.0993 - 1);
|
|
1050
1352
|
};
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
if (BT2020Space_instance == null)
|
|
1057
|
-
new BT2020Space();
|
|
1058
|
-
return BT2020Space_instance;
|
|
1353
|
+
var BT2020TransferFunctions_instance;
|
|
1354
|
+
function BT2020TransferFunctions_getInstance() {
|
|
1355
|
+
if (BT2020TransferFunctions_instance == null)
|
|
1356
|
+
new BT2020TransferFunctions();
|
|
1357
|
+
return BT2020TransferFunctions_instance;
|
|
1059
1358
|
}
|
|
1060
1359
|
function BT709TransferFunctions() {
|
|
1061
1360
|
BT709TransferFunctions_instance = this;
|
|
1062
|
-
this.
|
|
1361
|
+
this.n79_1 = 1.099 * spow_0(0.018, 0.45) - 0.099;
|
|
1063
1362
|
}
|
|
1064
|
-
protoOf(BT709TransferFunctions).
|
|
1065
|
-
return numberToDouble(x < this.
|
|
1363
|
+
protoOf(BT709TransferFunctions).v77 = function (x) {
|
|
1364
|
+
return numberToDouble(x < this.n79_1 ? x / 4.5 : spow_0((x + 0.099) / 1.099, 1 / 0.45));
|
|
1066
1365
|
};
|
|
1067
|
-
protoOf(BT709TransferFunctions).
|
|
1366
|
+
protoOf(BT709TransferFunctions).w77 = function (x) {
|
|
1068
1367
|
return x < 0.018 ? 4.5 * x : 1.099 * spow(x, 0.45) - 0.099;
|
|
1069
1368
|
};
|
|
1070
1369
|
var BT709TransferFunctions_instance;
|
|
@@ -1073,40 +1372,14 @@
|
|
|
1073
1372
|
new BT709TransferFunctions();
|
|
1074
1373
|
return BT709TransferFunctions_instance;
|
|
1075
1374
|
}
|
|
1076
|
-
function SRGBTransferFunctions() {
|
|
1077
|
-
}
|
|
1078
|
-
protoOf(SRGBTransferFunctions).p76 = function (x) {
|
|
1079
|
-
return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x, 1 / 2.4) - 0.055;
|
|
1080
|
-
};
|
|
1081
|
-
protoOf(SRGBTransferFunctions).o76 = function (x) {
|
|
1082
|
-
return x <= 0.04045 ? x / 12.92 : spow_0((x + 0.055) / 1.055, 2.4);
|
|
1083
|
-
};
|
|
1084
|
-
var SRGBTransferFunctions_instance;
|
|
1085
|
-
function SRGBTransferFunctions_getInstance() {
|
|
1086
|
-
return SRGBTransferFunctions_instance;
|
|
1087
|
-
}
|
|
1088
1375
|
function ROMMTransferFunctions() {
|
|
1089
|
-
this.
|
|
1376
|
+
this.o79_1 = 0.001953;
|
|
1090
1377
|
}
|
|
1091
|
-
protoOf(ROMMTransferFunctions).
|
|
1092
|
-
|
|
1093
|
-
var tmp_0 = x;
|
|
1094
|
-
if (tmp_0 < 16 * 0.001953) {
|
|
1095
|
-
tmp = x / 16.0;
|
|
1096
|
-
} else {
|
|
1097
|
-
tmp = spow(x, 1.8);
|
|
1098
|
-
}
|
|
1099
|
-
return tmp;
|
|
1378
|
+
protoOf(ROMMTransferFunctions).v77 = function (x) {
|
|
1379
|
+
return x < 16 * 0.001953 ? x / 16.0 : spow(x, 1.8);
|
|
1100
1380
|
};
|
|
1101
|
-
protoOf(ROMMTransferFunctions).
|
|
1102
|
-
|
|
1103
|
-
var tmp_0 = x;
|
|
1104
|
-
if (tmp_0 < 0.001953) {
|
|
1105
|
-
tmp = x * 16.0;
|
|
1106
|
-
} else {
|
|
1107
|
-
tmp = spow(x, 1.0 / 1.8);
|
|
1108
|
-
}
|
|
1109
|
-
return tmp;
|
|
1381
|
+
protoOf(ROMMTransferFunctions).w77 = function (x) {
|
|
1382
|
+
return x < 0.001953 ? x * 16.0 : spow(x, 1.0 / 1.8);
|
|
1110
1383
|
};
|
|
1111
1384
|
var ROMMTransferFunctions_instance;
|
|
1112
1385
|
function ROMMTransferFunctions_getInstance() {
|
|
@@ -1114,120 +1387,28 @@
|
|
|
1114
1387
|
}
|
|
1115
1388
|
function rgbToXyzMatrix(whitePoint, r, g, b) {
|
|
1116
1389
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1117
|
-
var primaries = _Matrix___init__impl__q3kp4w_0(r.
|
|
1118
|
-
var wp = whitePoint.
|
|
1390
|
+
var primaries = _Matrix___init__impl__q3kp4w_0(r.p79_1, g.p79_1, b.p79_1, r.q79_1, g.q79_1, b.q79_1, r.s79(), g.s79(), b.s79());
|
|
1391
|
+
var wp = whitePoint.t75_1;
|
|
1119
1392
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1120
1393
|
var this_0 = inverse(primaries);
|
|
1121
|
-
var v0 = wp.
|
|
1122
|
-
var v1 = wp.
|
|
1123
|
-
var v2 = wp.
|
|
1394
|
+
var v0 = wp.t79();
|
|
1395
|
+
var v1 = wp.r79_1;
|
|
1396
|
+
var v2 = wp.u79();
|
|
1124
1397
|
// Inline function 'com.github.ajalt.colormath.model.rgbToXyzMatrix.<anonymous>' call
|
|
1125
1398
|
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;
|
|
1126
1399
|
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;
|
|
1127
1400
|
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;
|
|
1128
1401
|
return dotDiagonal(primaries, x, y, z);
|
|
1129
1402
|
}
|
|
1130
|
-
function RGBColorSpaceImpl
|
|
1131
|
-
|
|
1132
|
-
this.v78_1 = whitePoint;
|
|
1133
|
-
this.w78_1 = transferFunctions;
|
|
1134
|
-
this.x78_1 = r;
|
|
1135
|
-
this.y78_1 = g;
|
|
1136
|
-
this.z78_1 = b;
|
|
1137
|
-
this.a79_1 = rectangularComponentInfo('RGB');
|
|
1138
|
-
this.b79_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.v78_1, this.x78_1, this.y78_1, this.z78_1));
|
|
1139
|
-
this.c79_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.b79_1)));
|
|
1140
|
-
}
|
|
1141
|
-
protoOf(RGBColorSpaceImpl).w76 = function () {
|
|
1142
|
-
return this.v78_1;
|
|
1143
|
-
};
|
|
1144
|
-
protoOf(RGBColorSpaceImpl).t76 = function () {
|
|
1145
|
-
return this.w78_1;
|
|
1146
|
-
};
|
|
1147
|
-
protoOf(RGBColorSpaceImpl).u76 = function () {
|
|
1148
|
-
return this.b79_1;
|
|
1149
|
-
};
|
|
1150
|
-
protoOf(RGBColorSpaceImpl).v76 = function () {
|
|
1151
|
-
return this.c79_1;
|
|
1152
|
-
};
|
|
1153
|
-
protoOf(RGBColorSpaceImpl).toString = function () {
|
|
1154
|
-
return this.u78_1;
|
|
1155
|
-
};
|
|
1156
|
-
protoOf(RGBColorSpaceImpl).g76 = function (r, g, b, alpha) {
|
|
1157
|
-
return new RGB(r, g, b, alpha, this);
|
|
1158
|
-
};
|
|
1159
|
-
protoOf(RGBColorSpaceImpl).hashCode = function () {
|
|
1160
|
-
var result = getStringHashCode(this.u78_1);
|
|
1161
|
-
result = imul(result, 31) + this.v78_1.hashCode() | 0;
|
|
1162
|
-
result = imul(result, 31) + hashCode(this.w78_1) | 0;
|
|
1163
|
-
result = imul(result, 31) + this.x78_1.hashCode() | 0;
|
|
1164
|
-
result = imul(result, 31) + this.y78_1.hashCode() | 0;
|
|
1165
|
-
result = imul(result, 31) + this.z78_1.hashCode() | 0;
|
|
1166
|
-
return result;
|
|
1167
|
-
};
|
|
1168
|
-
protoOf(RGBColorSpaceImpl).equals = function (other) {
|
|
1169
|
-
if (this === other)
|
|
1170
|
-
return true;
|
|
1171
|
-
if (!(other instanceof RGBColorSpaceImpl))
|
|
1172
|
-
return false;
|
|
1173
|
-
var tmp0_other_with_cast = other instanceof RGBColorSpaceImpl ? other : THROW_CCE();
|
|
1174
|
-
if (!(this.u78_1 === tmp0_other_with_cast.u78_1))
|
|
1175
|
-
return false;
|
|
1176
|
-
if (!this.v78_1.equals(tmp0_other_with_cast.v78_1))
|
|
1177
|
-
return false;
|
|
1178
|
-
if (!equals(this.w78_1, tmp0_other_with_cast.w78_1))
|
|
1179
|
-
return false;
|
|
1180
|
-
if (!this.x78_1.equals(tmp0_other_with_cast.x78_1))
|
|
1181
|
-
return false;
|
|
1182
|
-
if (!this.y78_1.equals(tmp0_other_with_cast.y78_1))
|
|
1183
|
-
return false;
|
|
1184
|
-
if (!this.z78_1.equals(tmp0_other_with_cast.z78_1))
|
|
1185
|
-
return false;
|
|
1186
|
-
return true;
|
|
1187
|
-
};
|
|
1188
|
-
function BT2020TransferFunctions() {
|
|
1189
|
-
BT2020TransferFunctions_instance = this;
|
|
1190
|
-
this.d79_1 = 1.0993;
|
|
1191
|
-
this.e79_1 = 0.0181;
|
|
1192
|
-
var tmp = this;
|
|
1193
|
-
BT2020TransferFunctions_getInstance();
|
|
1194
|
-
// Inline function 'kotlin.math.pow' call
|
|
1195
|
-
BT2020TransferFunctions_getInstance();
|
|
1196
|
-
var tmp_0 = 1.0993 * Math.pow(0.0181, 0.45);
|
|
1197
|
-
BT2020TransferFunctions_getInstance();
|
|
1198
|
-
tmp.f79_1 = tmp_0 - (1.0993 - 1);
|
|
1199
|
-
}
|
|
1200
|
-
protoOf(BT2020TransferFunctions).o76 = function (x) {
|
|
1201
|
-
var tmp;
|
|
1202
|
-
if (x < this.f79_1) {
|
|
1203
|
-
tmp = x / 4.5;
|
|
1204
|
-
} else {
|
|
1205
|
-
BT2020TransferFunctions_getInstance();
|
|
1206
|
-
var tmp_0 = x + (1.0993 - 1);
|
|
1207
|
-
BT2020TransferFunctions_getInstance();
|
|
1208
|
-
tmp = spow_0(tmp_0 / 1.0993, 1 / 0.45);
|
|
1209
|
-
}
|
|
1210
|
-
return numberToDouble(tmp);
|
|
1211
|
-
};
|
|
1212
|
-
protoOf(BT2020TransferFunctions).p76 = function (x) {
|
|
1403
|
+
function RGBColorSpace$lambda($this$RGBColorSpaceImpl, color) {
|
|
1404
|
+
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1213
1405
|
var tmp;
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
if (tmp_0 < 0.0181) {
|
|
1217
|
-
tmp = 4.5 * x;
|
|
1406
|
+
if (color instanceof RGB) {
|
|
1407
|
+
tmp = color.i78($this$RGBColorSpaceImpl);
|
|
1218
1408
|
} else {
|
|
1219
|
-
|
|
1220
|
-
var tmp_1 = 1.0993 * spow(x, 0.45);
|
|
1221
|
-
BT2020TransferFunctions_getInstance();
|
|
1222
|
-
tmp = tmp_1 - (1.0993 - 1);
|
|
1409
|
+
tmp = color.i75().o78($this$RGBColorSpaceImpl);
|
|
1223
1410
|
}
|
|
1224
1411
|
return tmp;
|
|
1225
|
-
};
|
|
1226
|
-
var BT2020TransferFunctions_instance;
|
|
1227
|
-
function BT2020TransferFunctions_getInstance() {
|
|
1228
|
-
if (BT2020TransferFunctions_instance == null)
|
|
1229
|
-
new BT2020TransferFunctions();
|
|
1230
|
-
return BT2020TransferFunctions_instance;
|
|
1231
1412
|
}
|
|
1232
1413
|
var properties_initialized_RGBColorSpaces_kt_fsnpad;
|
|
1233
1414
|
function _init_properties_RGBColorSpaces_kt__nc9fsz() {
|
|
@@ -1247,13 +1428,22 @@
|
|
|
1247
1428
|
}
|
|
1248
1429
|
function Companion_3() {
|
|
1249
1430
|
Companion_instance_3 = this;
|
|
1250
|
-
this.
|
|
1431
|
+
this.v79_1 = XYZColorSpaces_getInstance().w79_1;
|
|
1251
1432
|
}
|
|
1252
|
-
protoOf(Companion_3).
|
|
1253
|
-
return this.
|
|
1433
|
+
protoOf(Companion_3).t76 = function (x, y, z, alpha) {
|
|
1434
|
+
return this.v79_1.t76(x, y, z, alpha);
|
|
1435
|
+
};
|
|
1436
|
+
protoOf(Companion_3).d78 = function () {
|
|
1437
|
+
return this.v79_1.d78();
|
|
1438
|
+
};
|
|
1439
|
+
protoOf(Companion_3).f76 = function () {
|
|
1440
|
+
return this.v79_1.f76();
|
|
1254
1441
|
};
|
|
1255
|
-
protoOf(Companion_3).
|
|
1256
|
-
return
|
|
1442
|
+
protoOf(Companion_3).hashCode = function () {
|
|
1443
|
+
return hashCode(XYZColorSpaces_getInstance().w79_1);
|
|
1444
|
+
};
|
|
1445
|
+
protoOf(Companion_3).equals = function (other) {
|
|
1446
|
+
return equals(XYZColorSpaces_getInstance().w79_1, other);
|
|
1257
1447
|
};
|
|
1258
1448
|
var Companion_instance_3;
|
|
1259
1449
|
function Companion_getInstance_3() {
|
|
@@ -1262,65 +1452,71 @@
|
|
|
1262
1452
|
return Companion_instance_3;
|
|
1263
1453
|
}
|
|
1264
1454
|
function adaptToM($this, space, m, mi) {
|
|
1265
|
-
if (space.
|
|
1455
|
+
if (space.d78().equals($this.n78_1.d78()))
|
|
1266
1456
|
return $this;
|
|
1267
|
-
var transform = chromaticAdaptationMatrix(space, $this.
|
|
1457
|
+
var transform = chromaticAdaptationMatrix(space, $this.n78_1.d78().t75_1, m, mi);
|
|
1268
1458
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1269
|
-
var v0 = $this.
|
|
1270
|
-
var v1 = $this.
|
|
1271
|
-
var v2 = $this.
|
|
1459
|
+
var v0 = $this.j78_1;
|
|
1460
|
+
var v1 = $this.k78_1;
|
|
1461
|
+
var v2 = $this.l78_1;
|
|
1272
1462
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.adaptToM.<anonymous>' call
|
|
1273
1463
|
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;
|
|
1274
1464
|
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;
|
|
1275
1465
|
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;
|
|
1276
|
-
return space.
|
|
1466
|
+
return space.t76(xx, yy, zz, $this.m78_1);
|
|
1277
1467
|
}
|
|
1278
1468
|
function XYZ(x, y, z, alpha, space) {
|
|
1279
1469
|
Companion_getInstance_3();
|
|
1280
|
-
this.
|
|
1281
|
-
this.
|
|
1282
|
-
this.
|
|
1283
|
-
this.
|
|
1284
|
-
this.
|
|
1470
|
+
this.j78_1 = x;
|
|
1471
|
+
this.k78_1 = y;
|
|
1472
|
+
this.l78_1 = z;
|
|
1473
|
+
this.m78_1 = alpha;
|
|
1474
|
+
this.n78_1 = space;
|
|
1285
1475
|
}
|
|
1286
|
-
protoOf(XYZ).
|
|
1476
|
+
protoOf(XYZ).g75 = function () {
|
|
1477
|
+
return this.n78_1;
|
|
1478
|
+
};
|
|
1479
|
+
protoOf(XYZ).y79 = function (space) {
|
|
1287
1480
|
return adaptToM(this, space, get_CAT02_XYZ_TO_LMS(), get_CAT02_LMS_TO_XYZ());
|
|
1288
1481
|
};
|
|
1289
|
-
protoOf(XYZ).
|
|
1290
|
-
var
|
|
1291
|
-
var x =
|
|
1292
|
-
var y =
|
|
1293
|
-
var z =
|
|
1294
|
-
var f = space.
|
|
1482
|
+
protoOf(XYZ).o78 = function (space) {
|
|
1483
|
+
var _destruct__k2r9zo = this.y79(XYZColorSpace_0(space.d78()));
|
|
1484
|
+
var x = _destruct__k2r9zo.qg();
|
|
1485
|
+
var y = _destruct__k2r9zo.rg();
|
|
1486
|
+
var z = _destruct__k2r9zo.dm();
|
|
1487
|
+
var f = space.m77();
|
|
1295
1488
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1296
|
-
var this_0 = _Matrix___init__impl__q3kp4w(space.
|
|
1489
|
+
var this_0 = _Matrix___init__impl__q3kp4w(space.c78());
|
|
1297
1490
|
// Inline function 'com.github.ajalt.colormath.model.XYZ.toRGB.<anonymous>' call
|
|
1298
1491
|
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;
|
|
1299
1492
|
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;
|
|
1300
1493
|
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;
|
|
1301
|
-
return space.
|
|
1494
|
+
return space.t76(f.w77(r), f.w77(g), f.w77(b), this.m78_1);
|
|
1495
|
+
};
|
|
1496
|
+
protoOf(XYZ).h75 = function () {
|
|
1497
|
+
return this.o78(RGBColorSpaces_getInstance().a77_1);
|
|
1302
1498
|
};
|
|
1303
|
-
protoOf(XYZ).
|
|
1304
|
-
return this
|
|
1499
|
+
protoOf(XYZ).i75 = function () {
|
|
1500
|
+
return this;
|
|
1305
1501
|
};
|
|
1306
|
-
protoOf(XYZ).
|
|
1307
|
-
return this.
|
|
1502
|
+
protoOf(XYZ).qg = function () {
|
|
1503
|
+
return this.j78_1;
|
|
1308
1504
|
};
|
|
1309
|
-
protoOf(XYZ).
|
|
1310
|
-
return this.
|
|
1505
|
+
protoOf(XYZ).rg = function () {
|
|
1506
|
+
return this.k78_1;
|
|
1311
1507
|
};
|
|
1312
|
-
protoOf(XYZ).
|
|
1313
|
-
return this.
|
|
1508
|
+
protoOf(XYZ).dm = function () {
|
|
1509
|
+
return this.l78_1;
|
|
1314
1510
|
};
|
|
1315
1511
|
protoOf(XYZ).toString = function () {
|
|
1316
|
-
return 'XYZ(x=' + this.
|
|
1512
|
+
return 'XYZ(x=' + this.j78_1 + ', y=' + this.k78_1 + ', z=' + this.l78_1 + ', alpha=' + this.m78_1 + ', space=' + toString(this.n78_1) + ')';
|
|
1317
1513
|
};
|
|
1318
1514
|
protoOf(XYZ).hashCode = function () {
|
|
1319
|
-
var result = getNumberHashCode(this.
|
|
1320
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1321
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1322
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1323
|
-
result = imul(result, 31) + hashCode(this.
|
|
1515
|
+
var result = getNumberHashCode(this.j78_1);
|
|
1516
|
+
result = imul(result, 31) + getNumberHashCode(this.k78_1) | 0;
|
|
1517
|
+
result = imul(result, 31) + getNumberHashCode(this.l78_1) | 0;
|
|
1518
|
+
result = imul(result, 31) + getNumberHashCode(this.m78_1) | 0;
|
|
1519
|
+
result = imul(result, 31) + hashCode(this.n78_1) | 0;
|
|
1324
1520
|
return result;
|
|
1325
1521
|
};
|
|
1326
1522
|
protoOf(XYZ).equals = function (other) {
|
|
@@ -1329,25 +1525,27 @@
|
|
|
1329
1525
|
if (!(other instanceof XYZ))
|
|
1330
1526
|
return false;
|
|
1331
1527
|
var tmp0_other_with_cast = other instanceof XYZ ? other : THROW_CCE();
|
|
1332
|
-
if (!equals(this.
|
|
1528
|
+
if (!equals(this.j78_1, tmp0_other_with_cast.j78_1))
|
|
1333
1529
|
return false;
|
|
1334
|
-
if (!equals(this.
|
|
1530
|
+
if (!equals(this.k78_1, tmp0_other_with_cast.k78_1))
|
|
1335
1531
|
return false;
|
|
1336
|
-
if (!equals(this.
|
|
1532
|
+
if (!equals(this.l78_1, tmp0_other_with_cast.l78_1))
|
|
1337
1533
|
return false;
|
|
1338
|
-
if (!equals(this.
|
|
1534
|
+
if (!equals(this.m78_1, tmp0_other_with_cast.m78_1))
|
|
1339
1535
|
return false;
|
|
1340
|
-
if (!equals(this.
|
|
1536
|
+
if (!equals(this.n78_1, tmp0_other_with_cast.n78_1))
|
|
1341
1537
|
return false;
|
|
1342
1538
|
return true;
|
|
1343
1539
|
};
|
|
1344
|
-
function XYZColorSpace(
|
|
1345
|
-
|
|
1540
|
+
function XYZColorSpace() {
|
|
1541
|
+
}
|
|
1542
|
+
function XYZColorSpace_0(whitePoint) {
|
|
1543
|
+
return whitePoint.equals(Illuminant_getInstance().z75_1) ? XYZColorSpaces_getInstance().w79_1 : whitePoint.equals(Illuminant_getInstance().x75_1) ? XYZColorSpaces_getInstance().x79_1 : new XYZColorSpaceImpl(whitePoint);
|
|
1346
1544
|
}
|
|
1347
1545
|
function XYZColorSpaces() {
|
|
1348
1546
|
XYZColorSpaces_instance = this;
|
|
1349
|
-
this.
|
|
1350
|
-
this.
|
|
1547
|
+
this.w79_1 = new XYZColorSpaceImpl(Illuminant_getInstance().z75_1);
|
|
1548
|
+
this.x79_1 = new XYZColorSpaceImpl(Illuminant_getInstance().x75_1);
|
|
1351
1549
|
}
|
|
1352
1550
|
var XYZColorSpaces_instance;
|
|
1353
1551
|
function XYZColorSpaces_getInstance() {
|
|
@@ -1358,36 +1556,38 @@
|
|
|
1358
1556
|
function chromaticAdaptationMatrix(_this__u8e3s4, srcWp, xyzToLms, lmsToXyz) {
|
|
1359
1557
|
xyzToLms = xyzToLms === VOID ? get_CAT02_XYZ_TO_LMS() : xyzToLms;
|
|
1360
1558
|
lmsToXyz = lmsToXyz === VOID ? get_CAT02_LMS_TO_XYZ() : lmsToXyz;
|
|
1361
|
-
var dstWp = _this__u8e3s4.
|
|
1362
|
-
var src = dot_0(xyzToLms, srcWp.
|
|
1363
|
-
var dst = dot_0(xyzToLms, dstWp.
|
|
1559
|
+
var dstWp = _this__u8e3s4.d78().t75_1;
|
|
1560
|
+
var src = dot_0(xyzToLms, srcWp.t79(), srcWp.r79_1, srcWp.u79());
|
|
1561
|
+
var dst = dot_0(xyzToLms, dstWp.t79(), dstWp.r79_1, dstWp.u79());
|
|
1364
1562
|
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);
|
|
1365
1563
|
}
|
|
1366
1564
|
function XYZColorSpaceImpl(whitePoint) {
|
|
1367
|
-
this.
|
|
1368
|
-
this.
|
|
1565
|
+
this.z79_1 = whitePoint;
|
|
1566
|
+
this.a7a_1 = zeroOneComponentInfo('XYZ');
|
|
1369
1567
|
}
|
|
1370
|
-
protoOf(XYZColorSpaceImpl).
|
|
1371
|
-
return this.
|
|
1568
|
+
protoOf(XYZColorSpaceImpl).d78 = function () {
|
|
1569
|
+
return this.z79_1;
|
|
1570
|
+
};
|
|
1571
|
+
protoOf(XYZColorSpaceImpl).f76 = function () {
|
|
1572
|
+
return this.a7a_1;
|
|
1372
1573
|
};
|
|
1373
1574
|
protoOf(XYZColorSpaceImpl).toString = function () {
|
|
1374
|
-
return 'XYZColorSpace(' + this.
|
|
1575
|
+
return 'XYZColorSpace(' + this.z79_1.toString() + ')';
|
|
1375
1576
|
};
|
|
1376
|
-
protoOf(XYZColorSpaceImpl).
|
|
1577
|
+
protoOf(XYZColorSpaceImpl).t76 = function (x, y, z, alpha) {
|
|
1377
1578
|
return new XYZ(x, y, z, alpha, this);
|
|
1378
1579
|
};
|
|
1379
1580
|
protoOf(XYZColorSpaceImpl).hashCode = function () {
|
|
1380
|
-
return this.
|
|
1581
|
+
return this.z79_1.hashCode();
|
|
1381
1582
|
};
|
|
1382
1583
|
protoOf(XYZColorSpaceImpl).equals = function (other) {
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
return true;
|
|
1584
|
+
var tmp;
|
|
1585
|
+
if (!(other == null) ? isInterface(other, XYZColorSpace) : false) {
|
|
1586
|
+
tmp = this.z79_1.equals(other.d78());
|
|
1587
|
+
} else {
|
|
1588
|
+
tmp = false;
|
|
1589
|
+
}
|
|
1590
|
+
return tmp;
|
|
1391
1591
|
};
|
|
1392
1592
|
function xyY_init_$Init$(x, y, Y, $this) {
|
|
1393
1593
|
Y = Y === VOID ? 1.0 : Y;
|
|
@@ -1399,26 +1599,26 @@
|
|
|
1399
1599
|
}
|
|
1400
1600
|
function xyY(x, y, Y) {
|
|
1401
1601
|
Y = Y === VOID ? 1.0 : Y;
|
|
1402
|
-
this.
|
|
1403
|
-
this.
|
|
1404
|
-
this.
|
|
1602
|
+
this.p79_1 = x;
|
|
1603
|
+
this.q79_1 = y;
|
|
1604
|
+
this.r79_1 = Y;
|
|
1405
1605
|
}
|
|
1406
|
-
protoOf(xyY).
|
|
1407
|
-
return 1 - this.
|
|
1606
|
+
protoOf(xyY).s79 = function () {
|
|
1607
|
+
return 1 - this.p79_1 - this.q79_1;
|
|
1408
1608
|
};
|
|
1409
|
-
protoOf(xyY).
|
|
1410
|
-
return this.
|
|
1609
|
+
protoOf(xyY).t79 = function () {
|
|
1610
|
+
return this.p79_1 * this.r79_1 / this.q79_1;
|
|
1411
1611
|
};
|
|
1412
|
-
protoOf(xyY).
|
|
1413
|
-
return (1 - this.
|
|
1612
|
+
protoOf(xyY).u79 = function () {
|
|
1613
|
+
return (1 - this.p79_1 - this.q79_1) * this.r79_1 / this.q79_1;
|
|
1414
1614
|
};
|
|
1415
1615
|
protoOf(xyY).toString = function () {
|
|
1416
|
-
return 'xyY(x=' + this.
|
|
1616
|
+
return 'xyY(x=' + this.p79_1 + ', y=' + this.q79_1 + ', Y=' + this.r79_1 + ')';
|
|
1417
1617
|
};
|
|
1418
1618
|
protoOf(xyY).hashCode = function () {
|
|
1419
|
-
var result = getNumberHashCode(this.
|
|
1420
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1421
|
-
result = imul(result, 31) + getNumberHashCode(this.
|
|
1619
|
+
var result = getNumberHashCode(this.p79_1);
|
|
1620
|
+
result = imul(result, 31) + getNumberHashCode(this.q79_1) | 0;
|
|
1621
|
+
result = imul(result, 31) + getNumberHashCode(this.r79_1) | 0;
|
|
1422
1622
|
return result;
|
|
1423
1623
|
};
|
|
1424
1624
|
protoOf(xyY).equals = function (other) {
|
|
@@ -1427,38 +1627,33 @@
|
|
|
1427
1627
|
if (!(other instanceof xyY))
|
|
1428
1628
|
return false;
|
|
1429
1629
|
var tmp0_other_with_cast = other instanceof xyY ? other : THROW_CCE();
|
|
1430
|
-
if (!equals(this.
|
|
1630
|
+
if (!equals(this.p79_1, tmp0_other_with_cast.p79_1))
|
|
1431
1631
|
return false;
|
|
1432
|
-
if (!equals(this.
|
|
1632
|
+
if (!equals(this.q79_1, tmp0_other_with_cast.q79_1))
|
|
1433
1633
|
return false;
|
|
1434
|
-
if (!equals(this.
|
|
1634
|
+
if (!equals(this.r79_1, tmp0_other_with_cast.r79_1))
|
|
1435
1635
|
return false;
|
|
1436
1636
|
return true;
|
|
1437
1637
|
};
|
|
1438
1638
|
//region block: post-declaration
|
|
1439
|
-
protoOf(
|
|
1440
|
-
protoOf(
|
|
1441
|
-
protoOf(
|
|
1442
|
-
protoOf(
|
|
1443
|
-
protoOf(
|
|
1444
|
-
protoOf(
|
|
1445
|
-
protoOf(SRGB).
|
|
1446
|
-
protoOf(SRGB).
|
|
1447
|
-
protoOf(SRGB).
|
|
1448
|
-
protoOf(
|
|
1449
|
-
protoOf(
|
|
1450
|
-
protoOf(
|
|
1451
|
-
protoOf(
|
|
1452
|
-
protoOf(
|
|
1453
|
-
protoOf(
|
|
1454
|
-
protoOf(RGBColorSpaceImpl).p75 = invoke$default;
|
|
1455
|
-
protoOf(RGBColorSpaceImpl).q76 = invoke;
|
|
1456
|
-
protoOf(RGBColorSpaceImpl).u75 = invoke$default_0;
|
|
1457
|
-
protoOf(RGBColorSpaceImpl).s76 = invoke_0;
|
|
1458
|
-
protoOf(RGBColorSpaceImpl).r76 = from255;
|
|
1459
|
-
protoOf(RGBColorSpaceImpl).q75 = from255$default;
|
|
1639
|
+
protoOf(Ansi16).i75 = toXYZ;
|
|
1640
|
+
protoOf(Ansi256).i75 = toXYZ;
|
|
1641
|
+
protoOf(HSV).i75 = toXYZ;
|
|
1642
|
+
protoOf(Companion_2).h76 = invoke$default;
|
|
1643
|
+
protoOf(Companion_2).m76 = invoke$default_0;
|
|
1644
|
+
protoOf(Companion_2).i76 = from255$default;
|
|
1645
|
+
protoOf(SRGB).h76 = invoke$default;
|
|
1646
|
+
protoOf(SRGB).m76 = invoke$default_0;
|
|
1647
|
+
protoOf(SRGB).i76 = from255$default;
|
|
1648
|
+
protoOf(RGBColorSpaceImpl).h76 = invoke$default;
|
|
1649
|
+
protoOf(RGBColorSpaceImpl).y77 = invoke;
|
|
1650
|
+
protoOf(RGBColorSpaceImpl).m76 = invoke$default_0;
|
|
1651
|
+
protoOf(RGBColorSpaceImpl).a78 = invoke_0;
|
|
1652
|
+
protoOf(RGBColorSpaceImpl).z77 = from255;
|
|
1653
|
+
protoOf(RGBColorSpaceImpl).i76 = from255$default;
|
|
1460
1654
|
//endregion
|
|
1461
1655
|
//region block: init
|
|
1656
|
+
PqNonlinearity_instance = new PqNonlinearity();
|
|
1462
1657
|
LinearTransferFunctions_instance = new LinearTransferFunctions();
|
|
1463
1658
|
SRGBTransferFunctions_instance = new SRGBTransferFunctions();
|
|
1464
1659
|
ROMMTransferFunctions_instance = new ROMMTransferFunctions();
|