@flock/wirespec 0.10.10 → 0.10.11
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/arrow-arrow-annotations.js +3 -3
- package/arrow-arrow-atomic.js +17 -17
- package/arrow-arrow-continuations.js +5 -5
- package/arrow-arrow-core.js +82 -81
- package/arrow-arrow-core.js.map +1 -1
- package/clikt-clikt.js +351 -262
- package/clikt-clikt.js.map +1 -1
- package/colormath-root-colormath.js +156 -180
- package/colormath-root-colormath.js.map +1 -1
- package/kotlin-kotlin-stdlib.js +1490 -1461
- package/kotlin-kotlin-stdlib.js.map +1 -1
- package/kotlin-kotlin-test.js +3 -3
- package/kotlin-openapi-bindings.js +4696 -4696
- package/kotlin-rgxgen.js +163 -118
- package/kotlin-rgxgen.js.map +1 -1
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +3 -3
- package/kotlinx-serialization-kotlinx-serialization-core.js +1729 -1729
- package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -1
- package/kotlinx-serialization-kotlinx-serialization-json.js +1465 -1461
- package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -1
- package/markdown.js +191 -181
- package/markdown.js.map +1 -1
- package/mordant-mordant.js +311 -251
- package/mordant-mordant.js.map +1 -1
- package/package.json +2 -2
- package/resources-library.js +3 -3
- package/wirespec-src-compiler-core.js +1599 -1467
- package/wirespec-src-compiler-core.js.map +1 -1
- package/wirespec-src-compiler-lib.js +406 -406
- package/wirespec-src-compiler-lib.js.map +1 -1
- package/wirespec-src-converter-openapi.js +809 -805
- package/wirespec-src-converter-openapi.js.map +1 -1
- package/wirespec-src-plugin-arguments.js +98 -98
- package/wirespec-src-plugin-cli.js +136 -130
- package/wirespec-src-plugin-cli.js.map +1 -1
- package/wirespec-src-plugin-npm.js +44 -45
- package/wirespec-src-plugin-npm.js.map +1 -1
- package/wirespec-src-tools-generator.js +54 -50
- package/wirespec-src-tools-generator.js.map +1 -1
|
@@ -1,67 +1,66 @@
|
|
|
1
|
-
(function (
|
|
1
|
+
(function (factory) {
|
|
2
2
|
if (typeof define === 'function' && define.amd)
|
|
3
3
|
define(['exports', './kotlin-kotlin-stdlib.js'], factory);
|
|
4
4
|
else if (typeof exports === 'object')
|
|
5
5
|
factory(module.exports, require('./kotlin-kotlin-stdlib.js'));
|
|
6
6
|
else {
|
|
7
|
-
if (typeof
|
|
7
|
+
if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
|
|
8
8
|
throw new Error("Error loading module 'colormath-root-colormath'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'colormath-root-colormath'.");
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
globalThis['colormath-root-colormath'] = factory(typeof globalThis['colormath-root-colormath'] === 'undefined' ? {} : globalThis['colormath-root-colormath'], globalThis['kotlin-kotlin-stdlib']);
|
|
11
11
|
}
|
|
12
|
-
}(
|
|
12
|
+
}(function (_, kotlin_kotlin) {
|
|
13
13
|
'use strict';
|
|
14
14
|
//region block: imports
|
|
15
15
|
var imul = Math.imul;
|
|
16
16
|
var log2 = Math.log2;
|
|
17
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
18
|
-
var initMetadataForInterface = kotlin_kotlin.$_$.
|
|
19
|
-
var toString = kotlin_kotlin.$_$.
|
|
17
|
+
var protoOf = kotlin_kotlin.$_$.xa;
|
|
18
|
+
var initMetadataForInterface = kotlin_kotlin.$_$.aa;
|
|
19
|
+
var toString = kotlin_kotlin.$_$.bb;
|
|
20
20
|
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.h1;
|
|
21
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
22
|
-
var getStringHashCode = kotlin_kotlin.$_$.
|
|
23
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
24
|
-
var initMetadataForObject = kotlin_kotlin.$_$.
|
|
21
|
+
var initMetadataForClass = kotlin_kotlin.$_$.x9;
|
|
22
|
+
var getStringHashCode = kotlin_kotlin.$_$.v9;
|
|
23
|
+
var THROW_CCE = kotlin_kotlin.$_$.if;
|
|
24
|
+
var initMetadataForObject = kotlin_kotlin.$_$.ca;
|
|
25
25
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.l;
|
|
26
|
-
var charSequenceLength = kotlin_kotlin.$_$.
|
|
27
|
-
var charSequenceGet = kotlin_kotlin.$_$.
|
|
26
|
+
var charSequenceLength = kotlin_kotlin.$_$.m9;
|
|
27
|
+
var charSequenceGet = kotlin_kotlin.$_$.l9;
|
|
28
28
|
var toString_0 = kotlin_kotlin.$_$.z1;
|
|
29
29
|
var Unit_instance = kotlin_kotlin.$_$.g4;
|
|
30
30
|
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.v1;
|
|
31
31
|
var arrayConcat = kotlin_kotlin.$_$.a;
|
|
32
32
|
var listOf = kotlin_kotlin.$_$.h7;
|
|
33
|
-
var withSign = kotlin_kotlin.$_$.
|
|
34
|
-
var trimMargin = kotlin_kotlin.$_$.
|
|
35
|
-
var hashCode = kotlin_kotlin.$_$.
|
|
36
|
-
var equals = kotlin_kotlin.$_$.
|
|
33
|
+
var withSign = kotlin_kotlin.$_$.db;
|
|
34
|
+
var trimMargin = kotlin_kotlin.$_$.me;
|
|
35
|
+
var hashCode = kotlin_kotlin.$_$.w9;
|
|
36
|
+
var equals = kotlin_kotlin.$_$.q9;
|
|
37
37
|
var VOID = kotlin_kotlin.$_$.g;
|
|
38
|
-
var initMetadataForCompanion = kotlin_kotlin.$_$.
|
|
39
|
-
var coerceAtLeast = kotlin_kotlin.$_$.
|
|
40
|
-
var getNumberHashCode = kotlin_kotlin.$_$.
|
|
41
|
-
var numberToDouble = kotlin_kotlin.$_$.
|
|
42
|
-
var roundToInt = kotlin_kotlin.$_$.
|
|
38
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.y9;
|
|
39
|
+
var coerceAtLeast = kotlin_kotlin.$_$.hb;
|
|
40
|
+
var getNumberHashCode = kotlin_kotlin.$_$.t9;
|
|
41
|
+
var numberToDouble = kotlin_kotlin.$_$.ta;
|
|
42
|
+
var roundToInt = kotlin_kotlin.$_$.cb;
|
|
43
43
|
var DoubleCompanionObject_instance = kotlin_kotlin.$_$.q3;
|
|
44
|
-
var coerceIn = kotlin_kotlin.$_$.
|
|
45
|
-
var Char = kotlin_kotlin.$_$.
|
|
46
|
-
var toInt = kotlin_kotlin.$_$.
|
|
47
|
-
var numberRangeToNumber = kotlin_kotlin.$_$.
|
|
48
|
-
var slice = kotlin_kotlin.$_$.
|
|
49
|
-
var startsWith = kotlin_kotlin.$_$.
|
|
50
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
44
|
+
var coerceIn = kotlin_kotlin.$_$.lb;
|
|
45
|
+
var Char = kotlin_kotlin.$_$.se;
|
|
46
|
+
var toInt = kotlin_kotlin.$_$.de;
|
|
47
|
+
var numberRangeToNumber = kotlin_kotlin.$_$.ra;
|
|
48
|
+
var slice = kotlin_kotlin.$_$.md;
|
|
49
|
+
var startsWith = kotlin_kotlin.$_$.pd;
|
|
50
|
+
var isInterface = kotlin_kotlin.$_$.la;
|
|
51
51
|
var contentEquals = kotlin_kotlin.$_$.l5;
|
|
52
|
-
var coerceAtLeast_0 = kotlin_kotlin.$_$.
|
|
53
|
-
var objectCreate = kotlin_kotlin.$_$.
|
|
52
|
+
var coerceAtLeast_0 = kotlin_kotlin.$_$.jb;
|
|
53
|
+
var objectCreate = kotlin_kotlin.$_$.wa;
|
|
54
54
|
//endregion
|
|
55
55
|
//region block: pre-declaration
|
|
56
56
|
function toXYZ() {
|
|
57
|
-
return this.
|
|
57
|
+
return this.a2e().b2e();
|
|
58
58
|
}
|
|
59
59
|
initMetadataForInterface(Color, 'Color');
|
|
60
60
|
initMetadataForClass(ColorComponentInfo, 'ColorComponentInfo');
|
|
61
61
|
initMetadataForClass(WhitePoint, 'WhitePoint');
|
|
62
62
|
initMetadataForObject(Illuminant, 'Illuminant');
|
|
63
63
|
initMetadataForClass(Matrix, 'Matrix');
|
|
64
|
-
initMetadataForClass(Vector, 'Vector');
|
|
65
64
|
initMetadataForCompanion(Companion);
|
|
66
65
|
initMetadataForClass(Ansi16, 'Ansi16', VOID, VOID, [Color]);
|
|
67
66
|
initMetadataForCompanion(Companion_0);
|
|
@@ -128,28 +127,28 @@
|
|
|
128
127
|
function Color() {
|
|
129
128
|
}
|
|
130
129
|
function ColorComponentInfo(name, isPolar, min, max) {
|
|
131
|
-
this.
|
|
132
|
-
this.
|
|
133
|
-
this.
|
|
134
|
-
this.
|
|
130
|
+
this.h2e_1 = name;
|
|
131
|
+
this.i2e_1 = isPolar;
|
|
132
|
+
this.j2e_1 = min;
|
|
133
|
+
this.k2e_1 = max;
|
|
135
134
|
// Inline function 'kotlin.require' call
|
|
136
135
|
// Inline function 'kotlin.contracts.contract' call
|
|
137
|
-
if (!(this.
|
|
136
|
+
if (!(this.j2e_1 <= this.k2e_1)) {
|
|
138
137
|
// Inline function 'com.github.ajalt.colormath.ColorComponentInfo.<anonymous>' call
|
|
139
138
|
var message = 'min must be less than or equal to max';
|
|
140
139
|
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
141
140
|
}
|
|
142
141
|
}
|
|
143
142
|
function WhitePoint(name, chromaticity) {
|
|
144
|
-
this.
|
|
145
|
-
this.
|
|
143
|
+
this.l2e_1 = name;
|
|
144
|
+
this.m2e_1 = chromaticity;
|
|
146
145
|
}
|
|
147
146
|
protoOf(WhitePoint).toString = function () {
|
|
148
|
-
return this.
|
|
147
|
+
return this.l2e_1;
|
|
149
148
|
};
|
|
150
149
|
protoOf(WhitePoint).hashCode = function () {
|
|
151
|
-
var result = getStringHashCode(this.
|
|
152
|
-
result = imul(result, 31) + this.
|
|
150
|
+
var result = getStringHashCode(this.l2e_1);
|
|
151
|
+
result = imul(result, 31) + this.m2e_1.hashCode() | 0;
|
|
153
152
|
return result;
|
|
154
153
|
};
|
|
155
154
|
protoOf(WhitePoint).equals = function (other) {
|
|
@@ -158,22 +157,22 @@
|
|
|
158
157
|
if (!(other instanceof WhitePoint))
|
|
159
158
|
return false;
|
|
160
159
|
var tmp0_other_with_cast = other instanceof WhitePoint ? other : THROW_CCE();
|
|
161
|
-
if (!(this.
|
|
160
|
+
if (!(this.l2e_1 === tmp0_other_with_cast.l2e_1))
|
|
162
161
|
return false;
|
|
163
|
-
if (!this.
|
|
162
|
+
if (!this.m2e_1.equals(tmp0_other_with_cast.m2e_1))
|
|
164
163
|
return false;
|
|
165
164
|
return true;
|
|
166
165
|
};
|
|
167
166
|
function Illuminant() {
|
|
168
167
|
Illuminant_instance = this;
|
|
169
|
-
this.
|
|
170
|
-
this.
|
|
171
|
-
this.
|
|
172
|
-
this.
|
|
173
|
-
this.
|
|
174
|
-
this.
|
|
175
|
-
this.
|
|
176
|
-
this.
|
|
168
|
+
this.n2e_1 = new WhitePoint('A', xyY_init_$Create$(0.44758, 0.40745));
|
|
169
|
+
this.o2e_1 = new WhitePoint('B', xyY_init_$Create$(0.34842, 0.35161));
|
|
170
|
+
this.p2e_1 = new WhitePoint('C', xyY_init_$Create$(0.31006, 0.31616));
|
|
171
|
+
this.q2e_1 = new WhitePoint('D50', xyY_init_$Create$(0.3457, 0.3585));
|
|
172
|
+
this.r2e_1 = new WhitePoint('D55', xyY_init_$Create$(0.33243, 0.34744));
|
|
173
|
+
this.s2e_1 = new WhitePoint('D65', xyY_init_$Create$(0.3127, 0.329));
|
|
174
|
+
this.t2e_1 = new WhitePoint('D75', xyY_init_$Create$(0.29903, 0.31488));
|
|
175
|
+
this.u2e_1 = new WhitePoint('E', xyY_init_$Create$(1.0 / 3.0, 1.0 / 3.0));
|
|
177
176
|
}
|
|
178
177
|
var Illuminant_instance;
|
|
179
178
|
function Illuminant_getInstance() {
|
|
@@ -205,7 +204,7 @@
|
|
|
205
204
|
this_0.e(tmp$ret$0);
|
|
206
205
|
}
|
|
207
206
|
this_0.e(get_alphaInfo());
|
|
208
|
-
return this_0.
|
|
207
|
+
return this_0.p5();
|
|
209
208
|
}
|
|
210
209
|
function polarComponentInfo(name, l, r) {
|
|
211
210
|
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
@@ -226,7 +225,7 @@
|
|
|
226
225
|
this_0.e(tmp$ret$0);
|
|
227
226
|
}
|
|
228
227
|
this_0.e(get_alphaInfo());
|
|
229
|
-
return this_0.
|
|
228
|
+
return this_0.p5();
|
|
230
229
|
}
|
|
231
230
|
function componentInfoList(c) {
|
|
232
231
|
_init_properties_ColorSpaceUtils_kt__cnwylg();
|
|
@@ -308,22 +307,22 @@
|
|
|
308
307
|
function Matrix__equals_impl_g5p8p9($this, other) {
|
|
309
308
|
if (!(other instanceof Matrix))
|
|
310
309
|
return false;
|
|
311
|
-
var tmp0_other_with_cast = other instanceof Matrix ? other.
|
|
310
|
+
var tmp0_other_with_cast = other instanceof Matrix ? other.v2e_1 : THROW_CCE();
|
|
312
311
|
if (!equals($this, tmp0_other_with_cast))
|
|
313
312
|
return false;
|
|
314
313
|
return true;
|
|
315
314
|
}
|
|
316
315
|
function Matrix(rowMajor) {
|
|
317
|
-
this.
|
|
316
|
+
this.v2e_1 = rowMajor;
|
|
318
317
|
}
|
|
319
318
|
protoOf(Matrix).toString = function () {
|
|
320
|
-
return Matrix__toString_impl_l0abk0(this.
|
|
319
|
+
return Matrix__toString_impl_l0abk0(this.v2e_1);
|
|
321
320
|
};
|
|
322
321
|
protoOf(Matrix).hashCode = function () {
|
|
323
|
-
return Matrix__hashCode_impl_s9ntm9(this.
|
|
322
|
+
return Matrix__hashCode_impl_s9ntm9(this.v2e_1);
|
|
324
323
|
};
|
|
325
324
|
protoOf(Matrix).equals = function (other) {
|
|
326
|
-
return Matrix__equals_impl_g5p8p9(this.
|
|
325
|
+
return Matrix__equals_impl_g5p8p9(this.v2e_1, other);
|
|
327
326
|
};
|
|
328
327
|
function inverse(_this__u8e3s4, inPlace) {
|
|
329
328
|
inPlace = inPlace === VOID ? false : inPlace;
|
|
@@ -392,35 +391,12 @@
|
|
|
392
391
|
function _Vector___get_s__impl__pzuljk($this) {
|
|
393
392
|
return _Vector___get_values__impl__3gdbp5($this)[2];
|
|
394
393
|
}
|
|
395
|
-
function Vector__toString_impl_hn2ybi($this) {
|
|
396
|
-
return 'Vector(values=' + toString($this) + ')';
|
|
397
|
-
}
|
|
398
|
-
function Vector__hashCode_impl_442yhd($this) {
|
|
399
|
-
return hashCode($this);
|
|
400
|
-
}
|
|
401
|
-
function Vector__equals_impl_hy6igl($this, other) {
|
|
402
|
-
if (!(other instanceof Vector))
|
|
403
|
-
return false;
|
|
404
|
-
var tmp0_other_with_cast = other instanceof Vector ? other.v2e_1 : THROW_CCE();
|
|
405
|
-
if (!equals($this, tmp0_other_with_cast))
|
|
406
|
-
return false;
|
|
407
|
-
return true;
|
|
408
|
-
}
|
|
409
|
-
function Vector(values) {
|
|
410
|
-
this.v2e_1 = values;
|
|
411
|
-
}
|
|
412
|
-
protoOf(Vector).toString = function () {
|
|
413
|
-
return Vector__toString_impl_hn2ybi(this.v2e_1);
|
|
414
|
-
};
|
|
415
|
-
protoOf(Vector).hashCode = function () {
|
|
416
|
-
return Vector__hashCode_impl_442yhd(this.v2e_1);
|
|
417
|
-
};
|
|
418
|
-
protoOf(Vector).equals = function (other) {
|
|
419
|
-
return Vector__equals_impl_hy6igl(this.v2e_1, other);
|
|
420
|
-
};
|
|
421
394
|
function dot_0(_this__u8e3s4, v0, v1, v2) {
|
|
422
395
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
423
|
-
|
|
396
|
+
var p0 = Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 0) * v0 + Matrix__get_impl_xogbpk(_this__u8e3s4, 1, 0) * v1 + Matrix__get_impl_xogbpk(_this__u8e3s4, 2, 0) * v2;
|
|
397
|
+
var p1 = Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 1) * v0 + Matrix__get_impl_xogbpk(_this__u8e3s4, 1, 1) * v1 + Matrix__get_impl_xogbpk(_this__u8e3s4, 2, 1) * v2;
|
|
398
|
+
var p2 = Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 2) * v0 + Matrix__get_impl_xogbpk(_this__u8e3s4, 1, 2) * v1 + Matrix__get_impl_xogbpk(_this__u8e3s4, 2, 2) * v2;
|
|
399
|
+
return _Vector___init__impl__y7x4qq_0(p0, p1, p2);
|
|
424
400
|
}
|
|
425
401
|
function dot$f($this_dot, $other, x, y) {
|
|
426
402
|
return Matrix__get_impl_xogbpk($this_dot, 0, y) * Matrix__get_impl_xogbpk($other, x, 0) + Matrix__get_impl_xogbpk($this_dot, 1, y) * Matrix__get_impl_xogbpk($other, x, 1) + Matrix__get_impl_xogbpk($this_dot, 2, y) * Matrix__get_impl_xogbpk($other, x, 2);
|
|
@@ -442,10 +418,10 @@
|
|
|
442
418
|
Companion_getInstance();
|
|
443
419
|
this.y2e_1 = code;
|
|
444
420
|
}
|
|
445
|
-
protoOf(Ansi16).
|
|
421
|
+
protoOf(Ansi16).z2d = function () {
|
|
446
422
|
return Companion_getInstance();
|
|
447
423
|
};
|
|
448
|
-
protoOf(Ansi16).
|
|
424
|
+
protoOf(Ansi16).a2e = function () {
|
|
449
425
|
switch (this.y2e_1) {
|
|
450
426
|
case 30:
|
|
451
427
|
case 40:
|
|
@@ -500,12 +476,12 @@
|
|
|
500
476
|
Companion_getInstance_0();
|
|
501
477
|
this.c2f_1 = code;
|
|
502
478
|
}
|
|
503
|
-
protoOf(Ansi256).
|
|
479
|
+
protoOf(Ansi256).z2d = function () {
|
|
504
480
|
return Companion_getInstance_0();
|
|
505
481
|
};
|
|
506
|
-
protoOf(Ansi256).
|
|
482
|
+
protoOf(Ansi256).a2e = function () {
|
|
507
483
|
if (this.c2f_1 < 16)
|
|
508
|
-
return this.d2f().
|
|
484
|
+
return this.d2f().a2e();
|
|
509
485
|
if (this.c2f_1 >= 232) {
|
|
510
486
|
var c = imul(this.c2f_1 - 232 | 0, 10) + 8 | 0;
|
|
511
487
|
return Companion_getInstance_2().a2f(c, c, c);
|
|
@@ -522,7 +498,7 @@
|
|
|
522
498
|
return Companion_getInstance_2().e2f(r, g, b);
|
|
523
499
|
};
|
|
524
500
|
protoOf(Ansi256).d2f = function () {
|
|
525
|
-
return this.c2f_1 < 8 ? new Ansi16(this.c2f_1 + 30 | 0) : this.c2f_1 < 16 ? new Ansi16((this.c2f_1 - 8 | 0) + 90 | 0) : this.
|
|
501
|
+
return this.c2f_1 < 8 ? new Ansi16(this.c2f_1 + 30 | 0) : this.c2f_1 < 16 ? new Ansi16((this.c2f_1 - 8 | 0) + 90 | 0) : this.a2e().d2f();
|
|
526
502
|
};
|
|
527
503
|
protoOf(Ansi256).toString = function () {
|
|
528
504
|
return 'Ansi256(code=' + this.c2f_1 + ')';
|
|
@@ -569,10 +545,10 @@
|
|
|
569
545
|
this.i2f_1 = v;
|
|
570
546
|
this.j2f_1 = alpha;
|
|
571
547
|
}
|
|
572
|
-
protoOf(HSV).
|
|
548
|
+
protoOf(HSV).z2d = function () {
|
|
573
549
|
return Companion_getInstance_1();
|
|
574
550
|
};
|
|
575
|
-
protoOf(HSV).
|
|
551
|
+
protoOf(HSV).a2e = function () {
|
|
576
552
|
if (this.h2f_1 < 1.0E-7)
|
|
577
553
|
return Companion_getInstance_2().l2f(this.i2f_1, this.i2f_1, this.i2f_1, this.j2f_1);
|
|
578
554
|
var v = this.i2f_1;
|
|
@@ -778,8 +754,8 @@
|
|
|
778
754
|
protoOf(Companion_2).q2g = function (r, g, b, alpha) {
|
|
779
755
|
return this.k2f_1.q2g(r, g, b, alpha);
|
|
780
756
|
};
|
|
781
|
-
protoOf(Companion_2).
|
|
782
|
-
return this.k2f_1.
|
|
757
|
+
protoOf(Companion_2).b27 = function (hex) {
|
|
758
|
+
return this.k2f_1.b27(hex);
|
|
783
759
|
};
|
|
784
760
|
protoOf(Companion_2).equals = function (other) {
|
|
785
761
|
return equals(RGBColorSpaces_getInstance().s2f_1, other);
|
|
@@ -798,33 +774,33 @@
|
|
|
798
774
|
}
|
|
799
775
|
function RGB(r, g, b, alpha, space) {
|
|
800
776
|
Companion_getInstance_2();
|
|
801
|
-
this.
|
|
802
|
-
this.
|
|
803
|
-
this.
|
|
804
|
-
this.
|
|
805
|
-
this.
|
|
777
|
+
this.c2e_1 = r;
|
|
778
|
+
this.d2e_1 = g;
|
|
779
|
+
this.e2e_1 = b;
|
|
780
|
+
this.f2e_1 = alpha;
|
|
781
|
+
this.g2e_1 = space;
|
|
806
782
|
}
|
|
807
|
-
protoOf(RGB).
|
|
808
|
-
return this.
|
|
783
|
+
protoOf(RGB).z2d = function () {
|
|
784
|
+
return this.g2e_1;
|
|
809
785
|
};
|
|
810
786
|
protoOf(RGB).w2g = function () {
|
|
811
787
|
// Inline function 'kotlin.math.roundToInt' call
|
|
812
|
-
var this_0 = this.
|
|
788
|
+
var this_0 = this.c2e_1 * 255;
|
|
813
789
|
return roundToInt(this_0);
|
|
814
790
|
};
|
|
815
791
|
protoOf(RGB).x2g = function () {
|
|
816
792
|
// Inline function 'kotlin.math.roundToInt' call
|
|
817
|
-
var this_0 = this.
|
|
793
|
+
var this_0 = this.d2e_1 * 255;
|
|
818
794
|
return roundToInt(this_0);
|
|
819
795
|
};
|
|
820
796
|
protoOf(RGB).y2g = function () {
|
|
821
797
|
// Inline function 'kotlin.math.roundToInt' call
|
|
822
|
-
var this_0 = this.
|
|
798
|
+
var this_0 = this.e2e_1 * 255;
|
|
823
799
|
return roundToInt(this_0);
|
|
824
800
|
};
|
|
825
801
|
protoOf(RGB).z2g = function (space) {
|
|
826
802
|
var f = SRGB_getInstance().e2g();
|
|
827
|
-
return equals(this.
|
|
803
|
+
return equals(this.g2e_1, space) ? this : equals(this.g2e_1, SRGB_getInstance()) && equals(space, RGBColorSpaces_getInstance().t2f_1) ? space.l2f(f.n2g(this.c2e_1), f.n2g(this.d2e_1), f.n2g(this.e2e_1), this.f2e_1) : equals(this.g2e_1, RGBColorSpaces_getInstance().t2f_1) && equals(space, SRGB_getInstance()) ? space.l2f(f.o2g(this.c2e_1), f.o2g(this.d2e_1), f.o2g(this.e2e_1), this.f2e_1) : this.b2e().f2h(space);
|
|
828
804
|
};
|
|
829
805
|
protoOf(RGB).g2h = function () {
|
|
830
806
|
var tmp$ret$3;
|
|
@@ -832,9 +808,9 @@
|
|
|
832
808
|
// Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
|
|
833
809
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
834
810
|
var $this$toSRGB = this.z2g(SRGB_getInstance());
|
|
835
|
-
var r = $this$toSRGB.
|
|
836
|
-
var g = $this$toSRGB.
|
|
837
|
-
var b = $this$toSRGB.
|
|
811
|
+
var r = $this$toSRGB.c2e_1;
|
|
812
|
+
var g = $this$toSRGB.d2e_1;
|
|
813
|
+
var b = $this$toSRGB.e2e_1;
|
|
838
814
|
// Inline function 'kotlin.comparisons.minOf' call
|
|
839
815
|
var min = Math.min(r, g, b);
|
|
840
816
|
// Inline function 'kotlin.comparisons.maxOf' call
|
|
@@ -856,23 +832,23 @@
|
|
|
856
832
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toHSV.<anonymous>' call
|
|
857
833
|
var h_0 = normalizeDeg(h);
|
|
858
834
|
var s = max === 0.0 ? 0.0 : chroma / max;
|
|
859
|
-
tmp$ret$3 = new HSV(h_0, s, max, this.
|
|
835
|
+
tmp$ret$3 = new HSV(h_0, s, max, this.f2e_1);
|
|
860
836
|
break $l$block;
|
|
861
837
|
}
|
|
862
838
|
return tmp$ret$3;
|
|
863
839
|
};
|
|
864
|
-
protoOf(RGB).
|
|
865
|
-
var f = this.
|
|
840
|
+
protoOf(RGB).b2e = function () {
|
|
841
|
+
var f = this.g2e_1.e2g();
|
|
866
842
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
867
|
-
var this_0 = _Matrix___init__impl__q3kp4w(this.
|
|
868
|
-
var v0 = f.n2g(this.
|
|
869
|
-
var v1 = f.n2g(this.
|
|
870
|
-
var v2 = f.n2g(this.
|
|
843
|
+
var this_0 = _Matrix___init__impl__q3kp4w(this.g2e_1.s2g());
|
|
844
|
+
var v0 = f.n2g(this.c2e_1);
|
|
845
|
+
var v1 = f.n2g(this.d2e_1);
|
|
846
|
+
var v2 = f.n2g(this.e2e_1);
|
|
871
847
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toXYZ.<anonymous>' call
|
|
872
848
|
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;
|
|
873
849
|
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;
|
|
874
850
|
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;
|
|
875
|
-
return XYZColorSpace_0(this.
|
|
851
|
+
return XYZColorSpace_0(this.g2e_1.u2g()).l2f(x, y, z, this.f2e_1);
|
|
876
852
|
};
|
|
877
853
|
protoOf(RGB).d2f = function () {
|
|
878
854
|
// Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
|
|
@@ -884,15 +860,15 @@
|
|
|
884
860
|
return new Ansi16(30);
|
|
885
861
|
var v = value / 50 | 0;
|
|
886
862
|
// Inline function 'kotlin.math.roundToInt' call
|
|
887
|
-
var this_1 = $this$toSRGB.
|
|
863
|
+
var this_1 = $this$toSRGB.e2e_1;
|
|
888
864
|
var tmp$ret$1 = roundToInt(this_1);
|
|
889
865
|
var tmp = imul(tmp$ret$1, 4);
|
|
890
866
|
// Inline function 'kotlin.math.roundToInt' call
|
|
891
|
-
var this_2 = $this$toSRGB.
|
|
867
|
+
var this_2 = $this$toSRGB.d2e_1;
|
|
892
868
|
var tmp$ret$2 = roundToInt(this_2);
|
|
893
869
|
var tmp_0 = tmp | imul(tmp$ret$2, 2);
|
|
894
870
|
// Inline function 'kotlin.math.roundToInt' call
|
|
895
|
-
var this_3 = $this$toSRGB.
|
|
871
|
+
var this_3 = $this$toSRGB.c2e_1;
|
|
896
872
|
var ansi = 30 + (tmp_0 | roundToInt(this_3)) | 0;
|
|
897
873
|
return new Ansi16(v === 2 ? ansi + 60 | 0 : ansi);
|
|
898
874
|
};
|
|
@@ -907,30 +883,30 @@
|
|
|
907
883
|
tmp = ri < 8 ? 16 : ri > 248 ? 231 : roundToInt((ri - 8 | 0) / 247.0 * 24.0) + 232 | 0;
|
|
908
884
|
} else {
|
|
909
885
|
// Inline function 'kotlin.math.roundToInt' call
|
|
910
|
-
var this_0 = $this$toSRGB.
|
|
886
|
+
var this_0 = $this$toSRGB.c2e_1 * 5;
|
|
911
887
|
var tmp$ret$0 = roundToInt(this_0);
|
|
912
888
|
var tmp_0 = 16 + imul(36, tmp$ret$0) | 0;
|
|
913
889
|
// Inline function 'kotlin.math.roundToInt' call
|
|
914
|
-
var this_1 = $this$toSRGB.
|
|
890
|
+
var this_1 = $this$toSRGB.d2e_1 * 5;
|
|
915
891
|
var tmp$ret$1 = roundToInt(this_1);
|
|
916
892
|
var tmp_1 = tmp_0 + imul(6, tmp$ret$1) | 0;
|
|
917
893
|
// Inline function 'kotlin.math.roundToInt' call
|
|
918
|
-
var this_2 = $this$toSRGB.
|
|
894
|
+
var this_2 = $this$toSRGB.e2e_1 * 5;
|
|
919
895
|
tmp = tmp_1 + roundToInt(this_2) | 0;
|
|
920
896
|
}
|
|
921
897
|
var code = tmp;
|
|
922
898
|
return new Ansi256(code);
|
|
923
899
|
};
|
|
924
|
-
protoOf(RGB).
|
|
900
|
+
protoOf(RGB).a2e = function () {
|
|
925
901
|
return this.z2g(RGBColorSpaces_getInstance().s2f_1);
|
|
926
902
|
};
|
|
927
903
|
protoOf(RGB).i2h = function () {
|
|
928
904
|
// Inline function 'com.github.ajalt.colormath.internal.clamp3' call
|
|
929
|
-
var v1 = this.
|
|
930
|
-
var v2 = this.
|
|
931
|
-
var v3 = this.
|
|
932
|
-
var alpha = this.
|
|
933
|
-
var tmp0_container = this.
|
|
905
|
+
var v1 = this.c2e_1;
|
|
906
|
+
var v2 = this.d2e_1;
|
|
907
|
+
var v3 = this.e2e_1;
|
|
908
|
+
var alpha = this.f2e_1;
|
|
909
|
+
var tmp0_container = this.z2d().x2e();
|
|
934
910
|
// Inline function 'kotlin.collections.component1' call
|
|
935
911
|
var c1 = tmp0_container.k(0);
|
|
936
912
|
// Inline function 'kotlin.collections.component2' call
|
|
@@ -941,16 +917,16 @@
|
|
|
941
917
|
var tmp_0;
|
|
942
918
|
var tmp_1;
|
|
943
919
|
var tmp_2;
|
|
944
|
-
var containsLower = c1.
|
|
945
|
-
if (v1 <= c1.
|
|
946
|
-
var containsLower_0 = c2.
|
|
947
|
-
tmp_2 = v2 <= c2.
|
|
920
|
+
var containsLower = c1.j2e_1;
|
|
921
|
+
if (v1 <= c1.k2e_1 ? containsLower <= v1 : false) {
|
|
922
|
+
var containsLower_0 = c2.j2e_1;
|
|
923
|
+
tmp_2 = v2 <= c2.k2e_1 ? containsLower_0 <= v2 : false;
|
|
948
924
|
} else {
|
|
949
925
|
tmp_2 = false;
|
|
950
926
|
}
|
|
951
927
|
if (tmp_2) {
|
|
952
|
-
var containsLower_1 = c3.
|
|
953
|
-
tmp_1 = v3 <= c3.
|
|
928
|
+
var containsLower_1 = c3.j2e_1;
|
|
929
|
+
tmp_1 = v3 <= c3.k2e_1 ? containsLower_1 <= v3 : false;
|
|
954
930
|
} else {
|
|
955
931
|
tmp_1 = false;
|
|
956
932
|
}
|
|
@@ -962,7 +938,7 @@
|
|
|
962
938
|
if (tmp_0) {
|
|
963
939
|
tmp = this;
|
|
964
940
|
} else {
|
|
965
|
-
tmp = clamp$copy(this, coerceIn(v1, c1.
|
|
941
|
+
tmp = clamp$copy(this, coerceIn(v1, c1.j2e_1, c1.k2e_1), coerceIn(v2, c2.j2e_1, c2.k2e_1), coerceIn(v3, c3.j2e_1, c3.k2e_1), coerceIn(alpha, 0.0, 1.0));
|
|
966
942
|
}
|
|
967
943
|
return tmp;
|
|
968
944
|
};
|
|
@@ -970,22 +946,22 @@
|
|
|
970
946
|
return new RGB(r, g, b, alpha, space);
|
|
971
947
|
};
|
|
972
948
|
protoOf(RGB).v2g = function (r, g, b, alpha, space, $super) {
|
|
973
|
-
r = r === VOID ? this.
|
|
974
|
-
g = g === VOID ? this.
|
|
975
|
-
b = b === VOID ? this.
|
|
976
|
-
alpha = alpha === VOID ? this.
|
|
977
|
-
space = space === VOID ? this.
|
|
949
|
+
r = r === VOID ? this.c2e_1 : r;
|
|
950
|
+
g = g === VOID ? this.d2e_1 : g;
|
|
951
|
+
b = b === VOID ? this.e2e_1 : b;
|
|
952
|
+
alpha = alpha === VOID ? this.f2e_1 : alpha;
|
|
953
|
+
space = space === VOID ? this.g2e_1 : space;
|
|
978
954
|
return $super === VOID ? this.j2h(r, g, b, alpha, space) : $super.j2h.call(this, r, g, b, alpha, space);
|
|
979
955
|
};
|
|
980
956
|
protoOf(RGB).toString = function () {
|
|
981
|
-
return 'RGB(r=' + this.
|
|
957
|
+
return 'RGB(r=' + this.c2e_1 + ', g=' + this.d2e_1 + ', b=' + this.e2e_1 + ', alpha=' + this.f2e_1 + ', space=' + toString(this.g2e_1) + ')';
|
|
982
958
|
};
|
|
983
959
|
protoOf(RGB).hashCode = function () {
|
|
984
|
-
var result = getNumberHashCode(this.
|
|
985
|
-
result = imul(result, 31) + getNumberHashCode(this.c2e_1) | 0;
|
|
960
|
+
var result = getNumberHashCode(this.c2e_1);
|
|
986
961
|
result = imul(result, 31) + getNumberHashCode(this.d2e_1) | 0;
|
|
987
962
|
result = imul(result, 31) + getNumberHashCode(this.e2e_1) | 0;
|
|
988
|
-
result = imul(result, 31) +
|
|
963
|
+
result = imul(result, 31) + getNumberHashCode(this.f2e_1) | 0;
|
|
964
|
+
result = imul(result, 31) + hashCode(this.g2e_1) | 0;
|
|
989
965
|
return result;
|
|
990
966
|
};
|
|
991
967
|
protoOf(RGB).equals = function (other) {
|
|
@@ -994,8 +970,6 @@
|
|
|
994
970
|
if (!(other instanceof RGB))
|
|
995
971
|
return false;
|
|
996
972
|
var tmp0_other_with_cast = other instanceof RGB ? other : THROW_CCE();
|
|
997
|
-
if (!equals(this.b2e_1, tmp0_other_with_cast.b2e_1))
|
|
998
|
-
return false;
|
|
999
973
|
if (!equals(this.c2e_1, tmp0_other_with_cast.c2e_1))
|
|
1000
974
|
return false;
|
|
1001
975
|
if (!equals(this.d2e_1, tmp0_other_with_cast.d2e_1))
|
|
@@ -1004,6 +978,8 @@
|
|
|
1004
978
|
return false;
|
|
1005
979
|
if (!equals(this.f2e_1, tmp0_other_with_cast.f2e_1))
|
|
1006
980
|
return false;
|
|
981
|
+
if (!equals(this.g2e_1, tmp0_other_with_cast.g2e_1))
|
|
982
|
+
return false;
|
|
1007
983
|
return true;
|
|
1008
984
|
};
|
|
1009
985
|
function parseHex(_this__u8e3s4, startIndex) {
|
|
@@ -1103,7 +1079,7 @@
|
|
|
1103
1079
|
}
|
|
1104
1080
|
var ACES_AP1_B;
|
|
1105
1081
|
function RGBColorSpaces$SRGB$lambda($this$$receiver, it) {
|
|
1106
|
-
return it.
|
|
1082
|
+
return it.a2e();
|
|
1107
1083
|
}
|
|
1108
1084
|
function RGBColorSpaces$BT2020$lambda($this$$receiver, color) {
|
|
1109
1085
|
var tmp;
|
|
@@ -1113,7 +1089,7 @@
|
|
|
1113
1089
|
if (color instanceof ICtCp) {
|
|
1114
1090
|
tmp = color.r2f();
|
|
1115
1091
|
} else {
|
|
1116
|
-
tmp = color.
|
|
1092
|
+
tmp = color.b2e().f2h($this$$receiver);
|
|
1117
1093
|
}
|
|
1118
1094
|
}
|
|
1119
1095
|
return tmp;
|
|
@@ -1121,29 +1097,29 @@
|
|
|
1121
1097
|
function RGBColorSpaces() {
|
|
1122
1098
|
RGBColorSpaces_instance = this;
|
|
1123
1099
|
var tmp = this;
|
|
1124
|
-
var tmp_0 = Illuminant_getInstance().
|
|
1100
|
+
var tmp_0 = Illuminant_getInstance().s2e_1;
|
|
1125
1101
|
var tmp_1 = SRGBTransferFunctions_instance;
|
|
1126
1102
|
var tmp_2 = get_SRGB_R();
|
|
1127
1103
|
var tmp_3 = get_SRGB_G();
|
|
1128
1104
|
var tmp_4 = get_SRGB_B();
|
|
1129
1105
|
tmp.s2f_1 = new RGBColorSpaceImpl('sRGB', tmp_0, tmp_1, tmp_2, tmp_3, tmp_4, RGBColorSpaces$SRGB$lambda);
|
|
1130
|
-
this.t2f_1 = RGBColorSpace_0('Linear sRGB', Illuminant_getInstance().
|
|
1106
|
+
this.t2f_1 = RGBColorSpace_0('Linear sRGB', Illuminant_getInstance().s2e_1, LinearTransferFunctions_instance, get_SRGB_R(), get_SRGB_G(), get_SRGB_B());
|
|
1131
1107
|
this.u2f_1 = RGBColorSpace_0('ACES2065-1', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP0_R(), get_ACES_AP0_G(), get_ACES_AP0_B());
|
|
1132
1108
|
this.v2f_1 = RGBColorSpace_0('ACEScc', get_ACES_WHITE_POINT(), ACESccTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1133
1109
|
this.w2f_1 = RGBColorSpace_0('ACEScct', get_ACES_WHITE_POINT(), ACEScctTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1134
1110
|
this.x2f_1 = RGBColorSpace_0('ACEScg', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
|
|
1135
|
-
this.y2f_1 = RGBColorSpace_0('Adobe RGB', Illuminant_getInstance().
|
|
1111
|
+
this.y2f_1 = RGBColorSpace_0('Adobe RGB', Illuminant_getInstance().s2e_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));
|
|
1136
1112
|
var tmp_5 = this;
|
|
1137
|
-
var tmp_6 = Illuminant_getInstance().
|
|
1113
|
+
var tmp_6 = Illuminant_getInstance().s2e_1;
|
|
1138
1114
|
var tmp_7 = BT2020TransferFunctions_getInstance();
|
|
1139
1115
|
var tmp_8 = xyY_init_$Create$(0.708, 0.292);
|
|
1140
1116
|
var tmp_9 = xyY_init_$Create$(0.17, 0.797);
|
|
1141
1117
|
var tmp_10 = xyY_init_$Create$(0.131, 0.046);
|
|
1142
1118
|
tmp_5.z2f_1 = new RGBColorSpaceImpl('BT.2020', tmp_6, tmp_7, tmp_8, tmp_9, tmp_10, RGBColorSpaces$BT2020$lambda);
|
|
1143
|
-
this.a2g_1 = RGBColorSpace_0('BT.709', Illuminant_getInstance().
|
|
1119
|
+
this.a2g_1 = RGBColorSpace_0('BT.709', Illuminant_getInstance().s2e_1, BT709TransferFunctions_getInstance(), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.3, 0.6), xyY_init_$Create$(0.15, 0.06));
|
|
1144
1120
|
this.b2g_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));
|
|
1145
|
-
this.c2g_1 = RGBColorSpace_0('Display P3', Illuminant_getInstance().
|
|
1146
|
-
this.d2g_1 = RGBColorSpace_0('ROMM RGB', Illuminant_getInstance().
|
|
1121
|
+
this.c2g_1 = RGBColorSpace_0('Display P3', Illuminant_getInstance().s2e_1, SRGBTransferFunctions_instance, xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
|
|
1122
|
+
this.d2g_1 = RGBColorSpace_0('ROMM RGB', Illuminant_getInstance().q2e_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));
|
|
1147
1123
|
}
|
|
1148
1124
|
var RGBColorSpaces_instance;
|
|
1149
1125
|
function RGBColorSpaces_getInstance() {
|
|
@@ -1182,8 +1158,8 @@
|
|
|
1182
1158
|
protoOf(SRGB).q2g = function (r, g, b, alpha) {
|
|
1183
1159
|
return this.m2f_1.q2g(r, g, b, alpha);
|
|
1184
1160
|
};
|
|
1185
|
-
protoOf(SRGB).
|
|
1186
|
-
return this.m2f_1.
|
|
1161
|
+
protoOf(SRGB).b27 = function (hex) {
|
|
1162
|
+
return this.m2f_1.b27(hex);
|
|
1187
1163
|
};
|
|
1188
1164
|
protoOf(SRGB).equals = function (other) {
|
|
1189
1165
|
return equals(RGBColorSpaces_getInstance().s2f_1, other);
|
|
@@ -1469,7 +1445,7 @@
|
|
|
1469
1445
|
function rgbToXyzMatrix(whitePoint, r, g, b) {
|
|
1470
1446
|
_init_properties_RGBColorSpaces_kt__nc9fsz();
|
|
1471
1447
|
var primaries = _Matrix___init__impl__q3kp4w_0(r.g2i_1, g.g2i_1, b.g2i_1, r.h2i_1, g.h2i_1, b.h2i_1, r.j2i(), g.j2i(), b.j2i());
|
|
1472
|
-
var wp = whitePoint.
|
|
1448
|
+
var wp = whitePoint.m2e_1;
|
|
1473
1449
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1474
1450
|
var this_0 = inverse(primaries);
|
|
1475
1451
|
var v0 = wp.k2i();
|
|
@@ -1487,7 +1463,7 @@
|
|
|
1487
1463
|
if (color instanceof RGB) {
|
|
1488
1464
|
tmp = color.z2g($this$$receiver);
|
|
1489
1465
|
} else {
|
|
1490
|
-
tmp = color.
|
|
1466
|
+
tmp = color.b2e().f2h($this$$receiver);
|
|
1491
1467
|
}
|
|
1492
1468
|
return tmp;
|
|
1493
1469
|
}
|
|
@@ -1535,7 +1511,7 @@
|
|
|
1535
1511
|
function adaptToM($this, space, m, mi) {
|
|
1536
1512
|
if (space.u2g().equals($this.e2h_1.u2g()))
|
|
1537
1513
|
return $this;
|
|
1538
|
-
var transform = chromaticAdaptationMatrix(space, $this.e2h_1.u2g().
|
|
1514
|
+
var transform = chromaticAdaptationMatrix(space, $this.e2h_1.u2g().m2e_1, m, mi);
|
|
1539
1515
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1540
1516
|
var v0 = $this.a2h_1;
|
|
1541
1517
|
var v1 = $this.b2h_1;
|
|
@@ -1554,7 +1530,7 @@
|
|
|
1554
1530
|
this.d2h_1 = alpha;
|
|
1555
1531
|
this.e2h_1 = space;
|
|
1556
1532
|
}
|
|
1557
|
-
protoOf(XYZ).
|
|
1533
|
+
protoOf(XYZ).z2d = function () {
|
|
1558
1534
|
return this.e2h_1;
|
|
1559
1535
|
};
|
|
1560
1536
|
protoOf(XYZ).p2i = function (space) {
|
|
@@ -1562,9 +1538,9 @@
|
|
|
1562
1538
|
};
|
|
1563
1539
|
protoOf(XYZ).f2h = function (space) {
|
|
1564
1540
|
var tmp0_container = this.p2i(XYZColorSpace_0(space.u2g()));
|
|
1565
|
-
var x = tmp0_container.
|
|
1566
|
-
var y = tmp0_container.
|
|
1567
|
-
var z = tmp0_container.
|
|
1541
|
+
var x = tmp0_container.qd();
|
|
1542
|
+
var y = tmp0_container.rd();
|
|
1543
|
+
var z = tmp0_container.qh();
|
|
1568
1544
|
var f = space.e2g();
|
|
1569
1545
|
// Inline function 'com.github.ajalt.colormath.internal.dot' call
|
|
1570
1546
|
var this_0 = _Matrix___init__impl__q3kp4w(space.t2g());
|
|
@@ -1574,19 +1550,19 @@
|
|
|
1574
1550
|
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;
|
|
1575
1551
|
return space.l2f(f.o2g(r), f.o2g(g), f.o2g(b), this.d2h_1);
|
|
1576
1552
|
};
|
|
1577
|
-
protoOf(XYZ).
|
|
1553
|
+
protoOf(XYZ).a2e = function () {
|
|
1578
1554
|
return this.f2h(RGBColorSpaces_getInstance().s2f_1);
|
|
1579
1555
|
};
|
|
1580
|
-
protoOf(XYZ).
|
|
1556
|
+
protoOf(XYZ).b2e = function () {
|
|
1581
1557
|
return this;
|
|
1582
1558
|
};
|
|
1583
|
-
protoOf(XYZ).
|
|
1559
|
+
protoOf(XYZ).qd = function () {
|
|
1584
1560
|
return this.a2h_1;
|
|
1585
1561
|
};
|
|
1586
|
-
protoOf(XYZ).
|
|
1562
|
+
protoOf(XYZ).rd = function () {
|
|
1587
1563
|
return this.b2h_1;
|
|
1588
1564
|
};
|
|
1589
|
-
protoOf(XYZ).
|
|
1565
|
+
protoOf(XYZ).qh = function () {
|
|
1590
1566
|
return this.c2h_1;
|
|
1591
1567
|
};
|
|
1592
1568
|
protoOf(XYZ).toString = function () {
|
|
@@ -1621,12 +1597,12 @@
|
|
|
1621
1597
|
function XYZColorSpace() {
|
|
1622
1598
|
}
|
|
1623
1599
|
function XYZColorSpace_0(whitePoint) {
|
|
1624
|
-
return whitePoint.equals(Illuminant_getInstance().
|
|
1600
|
+
return whitePoint.equals(Illuminant_getInstance().s2e_1) ? XYZColorSpaces_getInstance().n2i_1 : whitePoint.equals(Illuminant_getInstance().q2e_1) ? XYZColorSpaces_getInstance().o2i_1 : new XYZColorSpaceImpl(whitePoint);
|
|
1625
1601
|
}
|
|
1626
1602
|
function XYZColorSpaces() {
|
|
1627
1603
|
XYZColorSpaces_instance = this;
|
|
1628
|
-
this.n2i_1 = new XYZColorSpaceImpl(Illuminant_getInstance().
|
|
1629
|
-
this.o2i_1 = new XYZColorSpaceImpl(Illuminant_getInstance().
|
|
1604
|
+
this.n2i_1 = new XYZColorSpaceImpl(Illuminant_getInstance().s2e_1);
|
|
1605
|
+
this.o2i_1 = new XYZColorSpaceImpl(Illuminant_getInstance().q2e_1);
|
|
1630
1606
|
}
|
|
1631
1607
|
var XYZColorSpaces_instance;
|
|
1632
1608
|
function XYZColorSpaces_getInstance() {
|
|
@@ -1637,7 +1613,7 @@
|
|
|
1637
1613
|
function chromaticAdaptationMatrix(_this__u8e3s4, srcWp, xyzToLms, lmsToXyz) {
|
|
1638
1614
|
xyzToLms = xyzToLms === VOID ? get_CAT02_XYZ_TO_LMS() : xyzToLms;
|
|
1639
1615
|
lmsToXyz = lmsToXyz === VOID ? get_CAT02_LMS_TO_XYZ() : lmsToXyz;
|
|
1640
|
-
var dstWp = _this__u8e3s4.u2g().
|
|
1616
|
+
var dstWp = _this__u8e3s4.u2g().m2e_1;
|
|
1641
1617
|
var src = dot_0(xyzToLms, srcWp.k2i(), srcWp.i2i_1, srcWp.l2i());
|
|
1642
1618
|
var dst = dot_0(xyzToLms, dstWp.k2i(), dstWp.i2i_1, dstWp.l2i());
|
|
1643
1619
|
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);
|
|
@@ -1717,9 +1693,9 @@
|
|
|
1717
1693
|
return true;
|
|
1718
1694
|
};
|
|
1719
1695
|
//region block: post-declaration
|
|
1720
|
-
protoOf(Ansi16).
|
|
1721
|
-
protoOf(Ansi256).
|
|
1722
|
-
protoOf(HSV).
|
|
1696
|
+
protoOf(Ansi16).b2e = toXYZ;
|
|
1697
|
+
protoOf(Ansi256).b2e = toXYZ;
|
|
1698
|
+
protoOf(HSV).b2e = toXYZ;
|
|
1723
1699
|
protoOf(Companion_2).a2f = from255$default;
|
|
1724
1700
|
protoOf(Companion_2).z2e = invoke$default;
|
|
1725
1701
|
protoOf(Companion_2).e2f = invoke$default_0;
|
|
@@ -1729,7 +1705,7 @@
|
|
|
1729
1705
|
protoOf(RGBColorSpaceImpl).z2e = invoke$default;
|
|
1730
1706
|
protoOf(RGBColorSpaceImpl).q2g = invoke;
|
|
1731
1707
|
protoOf(RGBColorSpaceImpl).e2f = invoke$default_0;
|
|
1732
|
-
protoOf(RGBColorSpaceImpl).
|
|
1708
|
+
protoOf(RGBColorSpaceImpl).b27 = invoke_0;
|
|
1733
1709
|
protoOf(RGBColorSpaceImpl).r2g = from255;
|
|
1734
1710
|
protoOf(RGBColorSpaceImpl).a2f = from255$default;
|
|
1735
1711
|
//endregion
|