mrs-toolbox-cli 0.0.87 → 0.0.90

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.
Files changed (124) hide show
  1. package/88b0986a7186d029-atomicfu-js-ir.js +47 -65
  2. package/88b0986a7186d029-atomicfu-js-ir.js.map +1 -1
  3. package/Kotlin-DateTime-library-kotlinx-datetime.js +632 -0
  4. package/Kotlin-DateTime-library-kotlinx-datetime.js.map +1 -0
  5. package/clikt-clikt.js +6454 -0
  6. package/clikt-clikt.js.map +1 -0
  7. package/colormath-root-colormath.js +1367 -0
  8. package/colormath-root-colormath.js.map +1 -0
  9. package/com.mrs.platform.configuration.dto.js +5180 -6529
  10. package/com.mrs.platform.configuration.dto.js.map +1 -1
  11. package/{kotlin-kotlin-stdlib-js-ir.js → kotlin-kotlin-stdlib.js} +12925 -13905
  12. package/kotlin-kotlin-stdlib.js.map +1 -0
  13. package/kotlin-logging-js-ir.js +68 -106
  14. package/kotlin-logging-js-ir.js.map +1 -1
  15. package/kotlin-node.js +1 -2
  16. package/kotlin-node.js.map +1 -1
  17. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +8 -0
  18. package/{Kotlin-DateTime-library-kotlinx-datetime-js-ir.js → kotlinx-html.js} +1 -1
  19. package/kotlinx-html.js.map +1 -0
  20. package/kotlinx-serialization-kotlinx-serialization-core.js +6053 -0
  21. package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -0
  22. package/kotlinx-serialization-kotlinx-serialization-json.js +4903 -0
  23. package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -0
  24. package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js +2572 -3423
  25. package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js.map +1 -1
  26. package/ktor-ktor-client-content-negotiation.js +280 -290
  27. package/ktor-ktor-client-content-negotiation.js.map +1 -1
  28. package/ktor-ktor-client-core.js +3006 -3347
  29. package/ktor-ktor-client-core.js.map +1 -1
  30. package/ktor-ktor-events.js +20 -25
  31. package/ktor-ktor-events.js.map +1 -1
  32. package/ktor-ktor-http.js +1184 -1662
  33. package/ktor-ktor-http.js.map +1 -1
  34. package/ktor-ktor-io.js +2091 -2972
  35. package/ktor-ktor-io.js.map +1 -1
  36. package/ktor-ktor-serialization-kotlinx-json.js +12 -13
  37. package/ktor-ktor-serialization-kotlinx-json.js.map +1 -1
  38. package/ktor-ktor-serialization-kotlinx.js +359 -388
  39. package/ktor-ktor-serialization-kotlinx.js.map +1 -1
  40. package/ktor-ktor-serialization.js +146 -143
  41. package/ktor-ktor-serialization.js.map +1 -1
  42. package/ktor-ktor-utils.js +702 -900
  43. package/ktor-ktor-utils.js.map +1 -1
  44. package/ktor-ktor-websockets.js +92 -106
  45. package/ktor-ktor-websockets.js.map +1 -1
  46. package/markdown.js +6653 -0
  47. package/markdown.js.map +1 -0
  48. package/mordant-mordant.js +11785 -0
  49. package/mordant-mordant.js.map +1 -0
  50. package/mrs-toolbox-cli.d.ts +159 -62
  51. package/mrs-toolbox-cli.js +169 -169
  52. package/mrs-toolbox-cli.js.map +1 -1
  53. package/package.json +3 -2
  54. package/toolbox.js +5394 -6365
  55. package/toolbox.js.map +1 -1
  56. package/88b0986a7186d029-atomicfu-js-ir.js.hash +0 -1
  57. package/88b0986a7186d029-atomicfu-js-ir.js.map.hash +0 -1
  58. package/Kotlin-DateTime-library-kotlinx-datetime-js-ir.js.hash +0 -1
  59. package/Kotlin-DateTime-library-kotlinx-datetime-js-ir.js.map.hash +0 -1
  60. package/clikt-clikt-js-ir.js +0 -7044
  61. package/clikt-clikt-js-ir.js.hash +0 -1
  62. package/clikt-clikt-js-ir.js.map +0 -1
  63. package/clikt-clikt-js-ir.js.map.hash +0 -1
  64. package/com.mrs.platform.configuration.dto.js.hash +0 -1
  65. package/com.mrs.platform.configuration.dto.js.map.hash +0 -1
  66. package/kotlin-js.js.hash +0 -1
  67. package/kotlin-js.js.map.hash +0 -1
  68. package/kotlin-kotlin-stdlib-js-ir.js.hash +0 -1
  69. package/kotlin-kotlin-stdlib-js-ir.js.map +0 -1
  70. package/kotlin-kotlin-stdlib-js-ir.js.map.hash +0 -1
  71. package/kotlin-kotlinx-atomicfu-runtime-js-ir.js.hash +0 -1
  72. package/kotlin-kotlinx-atomicfu-runtime-js-ir.js.map.hash +0 -1
  73. package/kotlin-logging-js-ir.js.hash +0 -1
  74. package/kotlin-logging-js-ir.js.map.hash +0 -1
  75. package/kotlin-node.js.hash +0 -1
  76. package/kotlin-node.js.map.hash +0 -1
  77. package/kotlin-web.js.hash +0 -1
  78. package/kotlin-web.js.map.hash +0 -1
  79. package/kotlinx-serialization-kotlinx-serialization-core-js-ir.js +0 -6431
  80. package/kotlinx-serialization-kotlinx-serialization-core-js-ir.js.hash +0 -1
  81. package/kotlinx-serialization-kotlinx-serialization-core-js-ir.js.map +0 -1
  82. package/kotlinx-serialization-kotlinx-serialization-core-js-ir.js.map.hash +0 -1
  83. package/kotlinx-serialization-kotlinx-serialization-json-js-ir.js +0 -5101
  84. package/kotlinx-serialization-kotlinx-serialization-json-js-ir.js.hash +0 -1
  85. package/kotlinx-serialization-kotlinx-serialization-json-js-ir.js.map +0 -1
  86. package/kotlinx-serialization-kotlinx-serialization-json-js-ir.js.map.hash +0 -1
  87. package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js.hash +0 -1
  88. package/kotlinx.coroutines-kotlinx-coroutines-core-js-ir.js.map.hash +0 -1
  89. package/ktor-ktor-client-content-negotiation.js.hash +0 -1
  90. package/ktor-ktor-client-content-negotiation.js.map.hash +0 -1
  91. package/ktor-ktor-client-core.js.hash +0 -1
  92. package/ktor-ktor-client-core.js.map.hash +0 -1
  93. package/ktor-ktor-events.js.hash +0 -1
  94. package/ktor-ktor-events.js.map.hash +0 -1
  95. package/ktor-ktor-http.js.hash +0 -1
  96. package/ktor-ktor-http.js.map.hash +0 -1
  97. package/ktor-ktor-io.js.hash +0 -1
  98. package/ktor-ktor-io.js.map.hash +0 -1
  99. package/ktor-ktor-serialization-kotlinx-json.js.hash +0 -1
  100. package/ktor-ktor-serialization-kotlinx-json.js.map.hash +0 -1
  101. package/ktor-ktor-serialization-kotlinx.js.hash +0 -1
  102. package/ktor-ktor-serialization-kotlinx.js.map.hash +0 -1
  103. package/ktor-ktor-serialization.js.hash +0 -1
  104. package/ktor-ktor-serialization.js.map.hash +0 -1
  105. package/ktor-ktor-utils.js.hash +0 -1
  106. package/ktor-ktor-utils.js.map.hash +0 -1
  107. package/ktor-ktor-websocket-serialization.js.hash +0 -1
  108. package/ktor-ktor-websocket-serialization.js.map.hash +0 -1
  109. package/ktor-ktor-websockets.js.hash +0 -1
  110. package/ktor-ktor-websockets.js.map.hash +0 -1
  111. package/mrs-toolbox-cli.d.ts.hash +0 -1
  112. package/mrs-toolbox-cli.js.hash +0 -1
  113. package/mrs-toolbox-cli.js.map.hash +0 -1
  114. package/static/access.query.txt.hash +0 -1
  115. package/static/demo.test.ts.txt.hash +0 -1
  116. package/static/git.ignore.hash +0 -1
  117. package/static/graph.query.txt.hash +0 -1
  118. package/static/hook.ts.txt.hash +0 -1
  119. package/static/mrscconfig.json.hash +0 -1
  120. package/static/readme.md.hash +0 -1
  121. package/static/tsconfig.json.txt.hash +0 -1
  122. package/toolbox.js.hash +0 -1
  123. package/toolbox.js.map.hash +0 -1
  124. /package/{Kotlin-DateTime-library-kotlinx-datetime-js-ir.js.map → kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map} +0 -0
@@ -0,0 +1,1367 @@
1
+ (function (_, kotlin_kotlin) {
2
+ 'use strict';
3
+ //region block: imports
4
+ var imul = Math.imul;
5
+ var log2 = Math.log2;
6
+ var protoOf = kotlin_kotlin.$_$.dc;
7
+ var classMeta = kotlin_kotlin.$_$.va;
8
+ var setMetadataFor = kotlin_kotlin.$_$.ec;
9
+ var getStringHashCode = kotlin_kotlin.$_$.eb;
10
+ var THROW_CCE = kotlin_kotlin.$_$.ng;
11
+ var objectMeta = kotlin_kotlin.$_$.cc;
12
+ var charSequenceLength = kotlin_kotlin.$_$.ta;
13
+ var ArrayList_init_$Create$ = kotlin_kotlin.$_$.l;
14
+ var charSequenceGet = kotlin_kotlin.$_$.sa;
15
+ var toString = kotlin_kotlin.$_$.x2;
16
+ var Unit_instance = kotlin_kotlin.$_$.g5;
17
+ var copyToArray = kotlin_kotlin.$_$.p6;
18
+ var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.p2;
19
+ var plus = kotlin_kotlin.$_$.j8;
20
+ var asList = kotlin_kotlin.$_$.w5;
21
+ var collectionSizeOrDefault = kotlin_kotlin.$_$.b6;
22
+ var arrayConcat = kotlin_kotlin.$_$.a;
23
+ var listOf = kotlin_kotlin.$_$.y7;
24
+ var withSign = kotlin_kotlin.$_$.kc;
25
+ var VOID = kotlin_kotlin.$_$.g;
26
+ var coerceAtLeast = kotlin_kotlin.$_$.nc;
27
+ var getNumberHashCode = kotlin_kotlin.$_$.cb;
28
+ var equals = kotlin_kotlin.$_$.ya;
29
+ var numberToDouble = kotlin_kotlin.$_$.yb;
30
+ var interfaceMeta = kotlin_kotlin.$_$.gb;
31
+ var roundToInt = kotlin_kotlin.$_$.jc;
32
+ var coerceIn = kotlin_kotlin.$_$.sc;
33
+ var DoubleCompanionObject_instance = kotlin_kotlin.$_$.r4;
34
+ var hashCode = kotlin_kotlin.$_$.fb;
35
+ var Char = kotlin_kotlin.$_$.wf;
36
+ var toInt = kotlin_kotlin.$_$.jf;
37
+ var numberRangeToNumber = kotlin_kotlin.$_$.wb;
38
+ var slice = kotlin_kotlin.$_$.se;
39
+ var toString_0 = kotlin_kotlin.$_$.ic;
40
+ var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.s1;
41
+ var startsWith = kotlin_kotlin.$_$.ve;
42
+ var coerceAtLeast_0 = kotlin_kotlin.$_$.pc;
43
+ var objectCreate = kotlin_kotlin.$_$.bc;
44
+ //endregion
45
+ //region block: pre-declaration
46
+ setMetadataFor(ColorComponentInfo, 'ColorComponentInfo', classMeta);
47
+ setMetadataFor(WhitePoint, 'WhitePoint', classMeta);
48
+ setMetadataFor(Illuminant, 'Illuminant', objectMeta);
49
+ setMetadataFor(Companion, 'Companion', objectMeta);
50
+ setMetadataFor(Ansi16, 'Ansi16', classMeta);
51
+ setMetadataFor(Companion_0, 'Companion', objectMeta);
52
+ setMetadataFor(Ansi256, 'Ansi256', classMeta);
53
+ setMetadataFor(Companion_1, 'Companion', objectMeta);
54
+ setMetadataFor(HSV, 'HSV', classMeta);
55
+ setMetadataFor(GammaTransferFunctions, 'GammaTransferFunctions', classMeta);
56
+ setMetadataFor(LinearTransferFunctions, 'LinearTransferFunctions', objectMeta);
57
+ function invoke$default(r, g, b, alpha, $super) {
58
+ alpha = alpha === VOID ? 1.0 : alpha;
59
+ return $super === VOID ? this.j6n(r, g, b, alpha) : $super.j6n.call(this, r, g, b, alpha);
60
+ }
61
+ function invoke(r, g, b, alpha) {
62
+ return this.j6n(numberToDouble(r), numberToDouble(g), numberToDouble(b), numberToDouble(alpha));
63
+ }
64
+ function invoke$default_0(r, g, b, alpha, $super) {
65
+ alpha = alpha === VOID ? 1.0 : alpha;
66
+ return $super === VOID ? this.t6n(r, g, b, alpha) : invoke(r, g, b, alpha);
67
+ }
68
+ function from255(r, g, b, alpha) {
69
+ return this.j6n(r / 255.0, g / 255.0, b / 255.0, alpha / 255.0);
70
+ }
71
+ function from255$default(r, g, b, alpha, $super) {
72
+ alpha = alpha === VOID ? 255 : alpha;
73
+ return $super === VOID ? this.u6n(r, g, b, alpha) : from255(r, g, b, alpha);
74
+ }
75
+ function invoke_0(hex) {
76
+ var tmp = parseHex(validateHex(hex), 0);
77
+ var tmp_0 = parseHex(hex, 1);
78
+ var tmp_1 = parseHex(hex, 2);
79
+ var tmp_2;
80
+ // Inline function 'kotlin.let' call
81
+ // Inline function 'kotlin.contracts.contract' call
82
+ // Inline function 'com.github.ajalt.colormath.model.RGBColorSpace.invoke.<anonymous>' call
83
+ var it = get_hexLength(hex);
84
+ if (it === 4 ? true : it === 8) {
85
+ tmp_2 = parseHex(hex, 3);
86
+ } else {
87
+ tmp_2 = 255;
88
+ }
89
+ return this.u6n(tmp, tmp_0, tmp_1, tmp_2);
90
+ }
91
+ setMetadataFor(RGBColorSpace, 'RGBColorSpace', interfaceMeta);
92
+ setMetadataFor(Companion_2, 'Companion', objectMeta, VOID, [RGBColorSpace]);
93
+ setMetadataFor(RGB, 'RGB', classMeta);
94
+ setMetadataFor(RGBColorSpaces, 'RGBColorSpaces', objectMeta);
95
+ setMetadataFor(SRGB, 'SRGB', objectMeta, VOID, [RGBColorSpace]);
96
+ setMetadataFor(ACESccTransferFunctions, 'ACESccTransferFunctions', objectMeta);
97
+ setMetadataFor(ACEScctTransferFunctions, 'ACEScctTransferFunctions', objectMeta);
98
+ setMetadataFor(BT2020Space, 'BT2020Space', objectMeta, VOID, [RGBColorSpace]);
99
+ setMetadataFor(BT709TransferFunctions, 'BT709TransferFunctions', objectMeta);
100
+ setMetadataFor(SRGBTransferFunctions, 'SRGBTransferFunctions', objectMeta);
101
+ setMetadataFor(ROMMTransferFunctions, 'ROMMTransferFunctions', objectMeta);
102
+ setMetadataFor(RGBColorSpaceImpl, 'RGBColorSpaceImpl', classMeta, VOID, [RGBColorSpace]);
103
+ setMetadataFor(BT2020TransferFunctions, 'BT2020TransferFunctions', objectMeta);
104
+ setMetadataFor(Companion_3, 'Companion', objectMeta);
105
+ setMetadataFor(XYZ, 'XYZ', classMeta);
106
+ setMetadataFor(XYZColorSpaces, 'XYZColorSpaces', objectMeta);
107
+ setMetadataFor(XYZColorSpaceImpl, 'XYZColorSpaceImpl', classMeta);
108
+ setMetadataFor(xyY, 'xyY', classMeta);
109
+ //endregion
110
+ function ColorComponentInfo(name, isPolar) {
111
+ this.d6m_1 = name;
112
+ this.e6m_1 = isPolar;
113
+ }
114
+ function WhitePoint(name, chromaticity) {
115
+ this.f6m_1 = name;
116
+ this.g6m_1 = chromaticity;
117
+ }
118
+ protoOf(WhitePoint).toString = function () {
119
+ return this.f6m_1;
120
+ };
121
+ protoOf(WhitePoint).hashCode = function () {
122
+ var result = getStringHashCode(this.f6m_1);
123
+ result = imul(result, 31) + this.g6m_1.hashCode() | 0;
124
+ return result;
125
+ };
126
+ protoOf(WhitePoint).equals = function (other) {
127
+ if (this === other)
128
+ return true;
129
+ if (!(other instanceof WhitePoint))
130
+ return false;
131
+ var tmp0_other_with_cast = other instanceof WhitePoint ? other : THROW_CCE();
132
+ if (!(this.f6m_1 === tmp0_other_with_cast.f6m_1))
133
+ return false;
134
+ if (!this.g6m_1.equals(tmp0_other_with_cast.g6m_1))
135
+ return false;
136
+ return true;
137
+ };
138
+ function Illuminant() {
139
+ Illuminant_instance = this;
140
+ this.h6m_1 = new WhitePoint('A', xyY_init_$Create$(0.44758, 0.40745));
141
+ this.i6m_1 = new WhitePoint('B', xyY_init_$Create$(0.34842, 0.35161));
142
+ this.j6m_1 = new WhitePoint('C', xyY_init_$Create$(0.31006, 0.31616));
143
+ this.k6m_1 = new WhitePoint('D50', xyY_init_$Create$(0.3457, 0.3585));
144
+ this.l6m_1 = new WhitePoint('D55', xyY_init_$Create$(0.33243, 0.34744));
145
+ this.m6m_1 = new WhitePoint('D65', xyY_init_$Create$(0.3127, 0.329));
146
+ this.n6m_1 = new WhitePoint('D75', xyY_init_$Create$(0.29903, 0.31488));
147
+ this.o6m_1 = new WhitePoint('E', xyY_init_$Create$(0.3333333333333333, 0.3333333333333333));
148
+ }
149
+ var Illuminant_instance;
150
+ function Illuminant_getInstance() {
151
+ if (Illuminant_instance == null)
152
+ new Illuminant();
153
+ return Illuminant_instance;
154
+ }
155
+ function rectangularComponentInfo(name) {
156
+ // Inline function 'kotlin.collections.toTypedArray' call
157
+ // Inline function 'kotlin.text.map' call
158
+ // Inline function 'kotlin.text.mapTo' call
159
+ var destination = ArrayList_init_$Create$(charSequenceLength(name));
160
+ var inductionVariable = 0;
161
+ while (inductionVariable < charSequenceLength(name)) {
162
+ var item = charSequenceGet(name, inductionVariable);
163
+ inductionVariable = inductionVariable + 1 | 0;
164
+ // Inline function 'com.github.ajalt.colormath.internal.rectangularComponentInfo.<anonymous>' call
165
+ var tmp$ret$0 = toString(item);
166
+ destination.s(tmp$ret$0);
167
+ }
168
+ var tmp$ret$3 = copyToArray(destination);
169
+ return rectangularComponentInfo_0(tmp$ret$3.slice());
170
+ }
171
+ function polarComponentInfo(name) {
172
+ // Inline function 'kotlin.text.map' call
173
+ // Inline function 'kotlin.text.mapTo' call
174
+ var destination = ArrayList_init_$Create$(charSequenceLength(name));
175
+ var inductionVariable = 0;
176
+ while (inductionVariable < charSequenceLength(name)) {
177
+ var item = charSequenceGet(name, inductionVariable);
178
+ inductionVariable = inductionVariable + 1 | 0;
179
+ // Inline function 'com.github.ajalt.colormath.internal.polarComponentInfo.<anonymous>' call
180
+ var tmp$ret$0 = new ColorComponentInfo(toString(item), item === _Char___init__impl__6a9atx(72));
181
+ destination.s(tmp$ret$0);
182
+ }
183
+ return plus(destination, new ColorComponentInfo('alpha', false));
184
+ }
185
+ function rectangularComponentInfo_0(names) {
186
+ // Inline function 'kotlin.collections.map' call
187
+ var this_0 = plus(asList(names), 'alpha');
188
+ // Inline function 'kotlin.collections.mapTo' call
189
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
190
+ var tmp0_iterator = this_0.v();
191
+ while (tmp0_iterator.w()) {
192
+ var item = tmp0_iterator.y();
193
+ // Inline function 'com.github.ajalt.colormath.internal.rectangularComponentInfo.<anonymous>' call
194
+ var tmp$ret$0 = new ColorComponentInfo(item, false);
195
+ destination.s(tmp$ret$0);
196
+ }
197
+ return destination;
198
+ }
199
+ function componentInfoList(c) {
200
+ return listOf(arrayConcat([c, [new ColorComponentInfo('alpha', false)]]));
201
+ }
202
+ function get_CAT02_XYZ_TO_LMS() {
203
+ _init_properties_Constants_kt__atb1ur();
204
+ return CAT02_XYZ_TO_LMS;
205
+ }
206
+ var CAT02_XYZ_TO_LMS;
207
+ function get_CAT02_LMS_TO_XYZ() {
208
+ _init_properties_Constants_kt__atb1ur();
209
+ return CAT02_LMS_TO_XYZ;
210
+ }
211
+ var CAT02_LMS_TO_XYZ;
212
+ var properties_initialized_Constants_kt_w4w61t;
213
+ function _init_properties_Constants_kt__atb1ur() {
214
+ if (!properties_initialized_Constants_kt_w4w61t) {
215
+ properties_initialized_Constants_kt_w4w61t = true;
216
+ 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);
217
+ CAT02_LMS_TO_XYZ = inverse(get_CAT02_XYZ_TO_LMS());
218
+ }
219
+ }
220
+ function spow(_this__u8e3s4, p) {
221
+ return spow_0(_this__u8e3s4, p);
222
+ }
223
+ function normalizeDeg(_this__u8e3s4) {
224
+ return (_this__u8e3s4 % 360.0 + 360.0) % 360.0;
225
+ }
226
+ function spow_0(_this__u8e3s4, p) {
227
+ // Inline function 'kotlin.math.pow' call
228
+ // Inline function 'kotlin.math.absoluteValue' call
229
+ var this_0 = Math.abs(_this__u8e3s4);
230
+ var tmp$ret$1 = Math.pow(this_0, p);
231
+ return withSign(tmp$ret$1, _this__u8e3s4);
232
+ }
233
+ function normalizeDeg_0(_this__u8e3s4) {
234
+ return (_this__u8e3s4 % 360.0 + 360.0) % 360.0;
235
+ }
236
+ function _Matrix___init__impl__q3kp4w(rowMajor) {
237
+ return rowMajor;
238
+ }
239
+ function _Matrix___get_rowMajor__impl__vmgxkq($this) {
240
+ return $this;
241
+ }
242
+ function _Matrix___init__impl__q3kp4w_0(v00, v10, v20, v01, v11, v21, v02, v12, v22) {
243
+ // Inline function 'kotlin.floatArrayOf' call
244
+ var tmp$ret$0 = new Float32Array([v00, v10, v20, v01, v11, v21, v02, v12, v22]);
245
+ return _Matrix___init__impl__q3kp4w(tmp$ret$0);
246
+ }
247
+ function Matrix__copy_impl_kmkvzd($this) {
248
+ // Inline function 'kotlin.collections.copyOf' call
249
+ // Inline function 'kotlin.js.asDynamic' call
250
+ var tmp$ret$1 = _Matrix___get_rowMajor__impl__vmgxkq($this).slice();
251
+ return _Matrix___init__impl__q3kp4w(tmp$ret$1);
252
+ }
253
+ function Matrix__get_impl_xogbpk($this, x, y) {
254
+ return _Matrix___get_rowMajor__impl__vmgxkq($this)[imul(y, 3) + x | 0];
255
+ }
256
+ function Matrix__set_impl_s2l54c($this, x, y, value) {
257
+ _Matrix___get_rowMajor__impl__vmgxkq($this)[imul(y, 3) + x | 0] = value;
258
+ }
259
+ function Matrix__set_impl_s2l54c_0($this, x, y, value) {
260
+ return Matrix__set_impl_s2l54c($this, x, y, value);
261
+ }
262
+ function inverse(_this__u8e3s4, inPlace) {
263
+ inPlace = inPlace === VOID ? false : inPlace;
264
+ var a = Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 0);
265
+ var b = Matrix__get_impl_xogbpk(_this__u8e3s4, 1, 0);
266
+ var c = Matrix__get_impl_xogbpk(_this__u8e3s4, 2, 0);
267
+ var d = Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 1);
268
+ var e = Matrix__get_impl_xogbpk(_this__u8e3s4, 1, 1);
269
+ var f = Matrix__get_impl_xogbpk(_this__u8e3s4, 2, 1);
270
+ var g = Matrix__get_impl_xogbpk(_this__u8e3s4, 0, 2);
271
+ var h = Matrix__get_impl_xogbpk(_this__u8e3s4, 1, 2);
272
+ var i = Matrix__get_impl_xogbpk(_this__u8e3s4, 2, 2);
273
+ var A = e * i - h * f;
274
+ var B = h * c - b * i;
275
+ var C = b * f - e * c;
276
+ var det = a * A + d * B + g * C;
277
+ var out = inPlace ? _this__u8e3s4 : Matrix__copy_impl_kmkvzd(_this__u8e3s4);
278
+ Matrix__set_impl_s2l54c_0(out, 0, 0, A / det);
279
+ Matrix__set_impl_s2l54c_0(out, 0, 1, (g * f - d * i) / det);
280
+ Matrix__set_impl_s2l54c_0(out, 0, 2, (d * h - g * e) / det);
281
+ Matrix__set_impl_s2l54c_0(out, 1, 0, B / det);
282
+ Matrix__set_impl_s2l54c_0(out, 1, 1, (a * i - g * c) / det);
283
+ Matrix__set_impl_s2l54c_0(out, 1, 2, (g * b - a * h) / det);
284
+ Matrix__set_impl_s2l54c_0(out, 2, 0, C / det);
285
+ Matrix__set_impl_s2l54c_0(out, 2, 1, (d * c - a * f) / det);
286
+ Matrix__set_impl_s2l54c_0(out, 2, 2, (a * e - d * b) / det);
287
+ return out;
288
+ }
289
+ function dot(_this__u8e3s4, other) {
290
+ 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));
291
+ }
292
+ function dotDiagonal(_this__u8e3s4, v0, v1, v2) {
293
+ return _Matrix___init__impl__q3kp4w_0(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, 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, 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);
294
+ }
295
+ function _Vector___init__impl__y7x4qq(values) {
296
+ return values;
297
+ }
298
+ function _Vector___get_values__impl__3gdbp5($this) {
299
+ return $this;
300
+ }
301
+ function _Vector___init__impl__y7x4qq_0(v0, v1, v2) {
302
+ // Inline function 'kotlin.floatArrayOf' call
303
+ var tmp$ret$0 = new Float32Array([v0, v1, v2]);
304
+ return _Vector___init__impl__y7x4qq(tmp$ret$0);
305
+ }
306
+ function _Vector___get_l__impl__envr1l($this) {
307
+ return _Vector___get_values__impl__3gdbp5($this)[0];
308
+ }
309
+ function _Vector___get_m__impl__e5qq0m($this) {
310
+ return _Vector___get_values__impl__3gdbp5($this)[1];
311
+ }
312
+ function _Vector___get_s__impl__pzuljk($this) {
313
+ return _Vector___get_values__impl__3gdbp5($this)[2];
314
+ }
315
+ function dot_0(_this__u8e3s4, v0, v1, v2) {
316
+ // Inline function 'com.github.ajalt.colormath.internal.dot' call
317
+ return _Vector___init__impl__y7x4qq_0(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, 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, 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);
318
+ }
319
+ function dot$f($this_dot, $other, x, y) {
320
+ 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);
321
+ }
322
+ function Companion() {
323
+ Companion_instance = this;
324
+ this.p6m_1 = componentInfoList([new ColorComponentInfo('code', false)]);
325
+ }
326
+ var Companion_instance;
327
+ function Companion_getInstance() {
328
+ if (Companion_instance == null)
329
+ new Companion();
330
+ return Companion_instance;
331
+ }
332
+ function Ansi16(code) {
333
+ Companion_getInstance();
334
+ this.q6m_1 = code;
335
+ }
336
+ protoOf(Ansi16).r6m = function () {
337
+ switch (this.q6m_1) {
338
+ case 30:
339
+ case 40:
340
+ return Companion_getInstance_2().s6m(0.0, 0.0, 0.0);
341
+ case 90:
342
+ case 100:
343
+ return Companion_getInstance_2().t6m(128, 128, 128);
344
+ case 37:
345
+ case 47:
346
+ return Companion_getInstance_2().t6m(192, 192, 192);
347
+ case 97:
348
+ case 107:
349
+ return Companion_getInstance_2().s6m(1.0, 1.0, 1.0);
350
+ }
351
+ var color = this.q6m_1 % 10 | 0;
352
+ var mul = this.q6m_1 > 50 ? 1.0 : 0.5;
353
+ var r = (color % 2 | 0) * mul;
354
+ var g = ((color / 2 | 0) % 2 | 0) * mul;
355
+ var b = ((color / 4 | 0) % 2 | 0) * mul;
356
+ return Companion_getInstance_2().s6m(r, g, b);
357
+ };
358
+ protoOf(Ansi16).toString = function () {
359
+ return 'Ansi16(code=' + this.q6m_1 + ')';
360
+ };
361
+ protoOf(Ansi16).hashCode = function () {
362
+ return this.q6m_1;
363
+ };
364
+ protoOf(Ansi16).equals = function (other) {
365
+ if (this === other)
366
+ return true;
367
+ if (!(other instanceof Ansi16))
368
+ return false;
369
+ var tmp0_other_with_cast = other instanceof Ansi16 ? other : THROW_CCE();
370
+ if (!(this.q6m_1 === tmp0_other_with_cast.q6m_1))
371
+ return false;
372
+ return true;
373
+ };
374
+ function Companion_0() {
375
+ Companion_instance_0 = this;
376
+ this.u6m_1 = componentInfoList([new ColorComponentInfo('code', false)]);
377
+ }
378
+ var Companion_instance_0;
379
+ function Companion_getInstance_0() {
380
+ if (Companion_instance_0 == null)
381
+ new Companion_0();
382
+ return Companion_instance_0;
383
+ }
384
+ function Ansi256(code) {
385
+ Companion_getInstance_0();
386
+ this.v6m_1 = code;
387
+ }
388
+ protoOf(Ansi256).r6m = function () {
389
+ if (this.v6m_1 < 16)
390
+ return this.w6m().r6m();
391
+ if (this.v6m_1 >= 232) {
392
+ var c = imul(this.v6m_1 - 232 | 0, 10) + 8 | 0;
393
+ return Companion_getInstance_2().t6m(c, c, c);
394
+ }
395
+ var c_0 = this.v6m_1 - 16 | 0;
396
+ var rem = c_0 % 36 | 0;
397
+ // Inline function 'kotlin.math.floor' call
398
+ var x = c_0 / 36.0;
399
+ var r = Math.floor(x) / 5.0;
400
+ // Inline function 'kotlin.math.floor' call
401
+ var x_0 = rem / 6.0;
402
+ var g = Math.floor(x_0) / 5.0;
403
+ var b = (rem % 6 | 0) / 5.0;
404
+ return Companion_getInstance_2().x6m(r, g, b);
405
+ };
406
+ protoOf(Ansi256).w6m = function () {
407
+ return this.v6m_1 < 8 ? new Ansi16(this.v6m_1 + 30 | 0) : this.v6m_1 < 16 ? new Ansi16((this.v6m_1 - 8 | 0) + 90 | 0) : this.r6m().w6m();
408
+ };
409
+ protoOf(Ansi256).toString = function () {
410
+ return 'Ansi256(code=' + this.v6m_1 + ')';
411
+ };
412
+ protoOf(Ansi256).hashCode = function () {
413
+ return this.v6m_1;
414
+ };
415
+ protoOf(Ansi256).equals = function (other) {
416
+ if (this === other)
417
+ return true;
418
+ if (!(other instanceof Ansi256))
419
+ return false;
420
+ var tmp0_other_with_cast = other instanceof Ansi256 ? other : THROW_CCE();
421
+ if (!(this.v6m_1 === tmp0_other_with_cast.v6m_1))
422
+ return false;
423
+ return true;
424
+ };
425
+ function Companion_1() {
426
+ Companion_instance_1 = this;
427
+ this.d6n_1 = polarComponentInfo('HSV');
428
+ }
429
+ var Companion_instance_1;
430
+ function Companion_getInstance_1() {
431
+ if (Companion_instance_1 == null)
432
+ new Companion_1();
433
+ return Companion_instance_1;
434
+ }
435
+ function toSRGB$f(h, v, s, n) {
436
+ var k = (n + h) % 6;
437
+ var tmp = v * s;
438
+ // Inline function 'kotlin.comparisons.minOf' call
439
+ var b = 4 - k;
440
+ var tmp$ret$0 = Math.min(k, b, 1.0);
441
+ return v - tmp * coerceAtLeast(tmp$ret$0, 0.0);
442
+ }
443
+ function HSV(h, s, v, alpha) {
444
+ Companion_getInstance_1();
445
+ alpha = alpha === VOID ? 1.0 : alpha;
446
+ this.e6n_1 = h;
447
+ this.f6n_1 = s;
448
+ this.g6n_1 = v;
449
+ this.h6n_1 = alpha;
450
+ }
451
+ protoOf(HSV).r6m = function () {
452
+ if (this.f6n_1 < 1.0E-7)
453
+ return Companion_getInstance_2().j6n(this.g6n_1, this.g6n_1, this.g6n_1, this.h6n_1);
454
+ var v = this.g6n_1;
455
+ var h = normalizeDeg_0(this.e6n_1) / 60.0;
456
+ var s = this.f6n_1;
457
+ return SRGB_getInstance().j6n(toSRGB$f(h, v, s, 5), toSRGB$f(h, v, s, 3), toSRGB$f(h, v, s, 1), this.h6n_1);
458
+ };
459
+ protoOf(HSV).toString = function () {
460
+ return 'HSV(h=' + this.e6n_1 + ', s=' + this.f6n_1 + ', v=' + this.g6n_1 + ', alpha=' + this.h6n_1 + ')';
461
+ };
462
+ protoOf(HSV).hashCode = function () {
463
+ var result = getNumberHashCode(this.e6n_1);
464
+ result = imul(result, 31) + getNumberHashCode(this.f6n_1) | 0;
465
+ result = imul(result, 31) + getNumberHashCode(this.g6n_1) | 0;
466
+ result = imul(result, 31) + getNumberHashCode(this.h6n_1) | 0;
467
+ return result;
468
+ };
469
+ protoOf(HSV).equals = function (other) {
470
+ if (this === other)
471
+ return true;
472
+ if (!(other instanceof HSV))
473
+ return false;
474
+ var tmp0_other_with_cast = other instanceof HSV ? other : THROW_CCE();
475
+ if (!equals(this.e6n_1, tmp0_other_with_cast.e6n_1))
476
+ return false;
477
+ if (!equals(this.f6n_1, tmp0_other_with_cast.f6n_1))
478
+ return false;
479
+ if (!equals(this.g6n_1, tmp0_other_with_cast.g6n_1))
480
+ return false;
481
+ if (!equals(this.h6n_1, tmp0_other_with_cast.h6n_1))
482
+ return false;
483
+ return true;
484
+ };
485
+ function GammaTransferFunctions(gamma) {
486
+ this.q6n_1 = gamma;
487
+ }
488
+ protoOf(GammaTransferFunctions).r6n = function (x) {
489
+ return spow(x, this.q6n_1);
490
+ };
491
+ protoOf(GammaTransferFunctions).s6n = function (x) {
492
+ return spow(x, 1.0 / this.q6n_1);
493
+ };
494
+ protoOf(GammaTransferFunctions).toString = function () {
495
+ return 'GammaTransferFunctions(gamma=' + this.q6n_1 + ')';
496
+ };
497
+ protoOf(GammaTransferFunctions).hashCode = function () {
498
+ return getNumberHashCode(this.q6n_1);
499
+ };
500
+ protoOf(GammaTransferFunctions).equals = function (other) {
501
+ if (this === other)
502
+ return true;
503
+ if (!(other instanceof GammaTransferFunctions))
504
+ return false;
505
+ var tmp0_other_with_cast = other instanceof GammaTransferFunctions ? other : THROW_CCE();
506
+ if (!equals(this.q6n_1, tmp0_other_with_cast.q6n_1))
507
+ return false;
508
+ return true;
509
+ };
510
+ function LinearTransferFunctions() {
511
+ }
512
+ protoOf(LinearTransferFunctions).r6n = function (x) {
513
+ return x;
514
+ };
515
+ protoOf(LinearTransferFunctions).s6n = function (x) {
516
+ return x;
517
+ };
518
+ var LinearTransferFunctions_instance;
519
+ function LinearTransferFunctions_getInstance() {
520
+ return LinearTransferFunctions_instance;
521
+ }
522
+ function RGBColorSpace() {
523
+ }
524
+ function Companion_2() {
525
+ Companion_instance_2 = this;
526
+ this.i6n_1 = RGBColorSpaces_getInstance().a6o_1;
527
+ }
528
+ protoOf(Companion_2).y6n = function () {
529
+ return this.i6n_1.y6n();
530
+ };
531
+ protoOf(Companion_2).x6n = function () {
532
+ return this.i6n_1.x6n();
533
+ };
534
+ protoOf(Companion_2).w6n = function () {
535
+ return this.i6n_1.w6n();
536
+ };
537
+ protoOf(Companion_2).z6n = function () {
538
+ return this.i6n_1.z6n();
539
+ };
540
+ protoOf(Companion_2).u6n = function (r, g, b, alpha) {
541
+ return this.i6n_1.u6n(r, g, b, alpha);
542
+ };
543
+ protoOf(Companion_2).j6n = function (r, g, b, alpha) {
544
+ return this.i6n_1.j6n(r, g, b, alpha);
545
+ };
546
+ protoOf(Companion_2).t6n = function (r, g, b, alpha) {
547
+ return this.i6n_1.t6n(r, g, b, alpha);
548
+ };
549
+ protoOf(Companion_2).v6n = function (hex) {
550
+ return this.i6n_1.v6n(hex);
551
+ };
552
+ var Companion_instance_2;
553
+ function Companion_getInstance_2() {
554
+ if (Companion_instance_2 == null)
555
+ new Companion_2();
556
+ return Companion_instance_2;
557
+ }
558
+ function RGB(r, g, b, alpha, space) {
559
+ Companion_getInstance_2();
560
+ this.y6m_1 = r;
561
+ this.z6m_1 = g;
562
+ this.a6n_1 = b;
563
+ this.b6n_1 = alpha;
564
+ this.c6n_1 = space;
565
+ }
566
+ protoOf(RGB).m6o = function () {
567
+ // Inline function 'kotlin.math.roundToInt' call
568
+ var this_0 = this.y6m_1 * 255;
569
+ return roundToInt(this_0);
570
+ };
571
+ protoOf(RGB).n6o = function () {
572
+ // Inline function 'kotlin.math.roundToInt' call
573
+ var this_0 = this.z6m_1 * 255;
574
+ return roundToInt(this_0);
575
+ };
576
+ protoOf(RGB).o6o = function () {
577
+ // Inline function 'kotlin.math.roundToInt' call
578
+ var this_0 = this.a6n_1 * 255;
579
+ return roundToInt(this_0);
580
+ };
581
+ protoOf(RGB).p6o = function (space) {
582
+ var f = SRGB_getInstance().n6n_1;
583
+ return equals(this.c6n_1, space) ? this : (equals(this.c6n_1, SRGB_getInstance()) ? equals(space, RGBColorSpaces_getInstance().b6o_1) : false) ? space.j6n(f.r6n(this.y6m_1), f.r6n(this.z6m_1), f.r6n(this.a6n_1), this.b6n_1) : (equals(this.c6n_1, RGBColorSpaces_getInstance().b6o_1) ? equals(space, SRGB_getInstance()) : false) ? space.j6n(f.s6n(this.y6m_1), f.s6n(this.z6m_1), f.s6n(this.a6n_1), this.b6n_1) : this.q6o().w6o(space);
584
+ };
585
+ protoOf(RGB).x6o = function () {
586
+ return this.y6o(coerceIn(this.y6m_1, 0.0, 1.0), coerceIn(this.z6m_1, 0.0, 1.0), coerceIn(this.a6n_1, 0.0, 1.0), coerceIn(this.b6n_1, 0.0, 1.0));
587
+ };
588
+ protoOf(RGB).z6o = function () {
589
+ var tmp$ret$3;
590
+ $l$block: {
591
+ // Inline function 'com.github.ajalt.colormath.model.RGB.srgbHueMinMaxChroma' call
592
+ // Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
593
+ var $this$toSRGB = this.p6o(SRGB_getInstance());
594
+ var r = $this$toSRGB.y6m_1;
595
+ var g = $this$toSRGB.z6m_1;
596
+ var b = $this$toSRGB.a6n_1;
597
+ // Inline function 'kotlin.comparisons.minOf' call
598
+ var min = Math.min(r, g, b);
599
+ // Inline function 'kotlin.comparisons.maxOf' call
600
+ var max = Math.max(r, g, b);
601
+ var chroma = max - min;
602
+ var tmp;
603
+ if (chroma < 1.0E-7) {
604
+ tmp = NaN;
605
+ } else if (r === max) {
606
+ tmp = (g - b) / chroma;
607
+ } else if (g === max) {
608
+ tmp = 2 + (b - r) / chroma;
609
+ } else if (b === max) {
610
+ tmp = 4 + (r - g) / chroma;
611
+ } else {
612
+ tmp = 0.0;
613
+ }
614
+ var h = tmp * 60;
615
+ // Inline function 'com.github.ajalt.colormath.model.RGB.toHSV.<anonymous>' call
616
+ var h_0 = normalizeDeg(h);
617
+ var s = max === 0.0 ? 0.0 : chroma / max;
618
+ tmp$ret$3 = new HSV(h_0, s, max, this.b6n_1);
619
+ break $l$block;
620
+ }
621
+ return tmp$ret$3;
622
+ };
623
+ protoOf(RGB).q6o = function () {
624
+ var f = this.c6n_1.w6n();
625
+ // Inline function 'com.github.ajalt.colormath.internal.dot' call
626
+ var this_0 = _Matrix___init__impl__q3kp4w(this.c6n_1.x6n());
627
+ var v0 = f.r6n(this.y6m_1);
628
+ var v1 = f.r6n(this.z6m_1);
629
+ var v2 = f.r6n(this.a6n_1);
630
+ // Inline function 'com.github.ajalt.colormath.model.RGB.toXYZ.<anonymous>' call
631
+ 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;
632
+ 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;
633
+ 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;
634
+ return XYZColorSpace(this.c6n_1.z6n()).j6n(x, y, z, this.b6n_1);
635
+ };
636
+ protoOf(RGB).w6m = function () {
637
+ // Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
638
+ var $this$toSRGB = this.p6o(SRGB_getInstance());
639
+ // Inline function 'kotlin.math.roundToInt' call
640
+ var this_0 = $this$toSRGB.z6o().g6n_1 * 100;
641
+ var value = roundToInt(this_0);
642
+ if (value === 30)
643
+ return new Ansi16(30);
644
+ var v = value / 50 | 0;
645
+ // Inline function 'kotlin.math.roundToInt' call
646
+ var this_1 = $this$toSRGB.a6n_1;
647
+ var tmp$ret$1 = roundToInt(this_1);
648
+ var tmp = imul(tmp$ret$1, 4);
649
+ // Inline function 'kotlin.math.roundToInt' call
650
+ var this_2 = $this$toSRGB.z6m_1;
651
+ var tmp$ret$2 = roundToInt(this_2);
652
+ var tmp_0 = tmp | imul(tmp$ret$2, 2);
653
+ // Inline function 'kotlin.math.roundToInt' call
654
+ var this_3 = $this$toSRGB.y6m_1;
655
+ var ansi = 30 + (tmp_0 | roundToInt(this_3)) | 0;
656
+ return new Ansi16(v === 2 ? ansi + 60 | 0 : ansi);
657
+ };
658
+ protoOf(RGB).a6p = function () {
659
+ // Inline function 'com.github.ajalt.colormath.model.RGB.toSRGB' call
660
+ var $this$toSRGB = this.p6o(SRGB_getInstance());
661
+ var ri = $this$toSRGB.m6o();
662
+ var gi = $this$toSRGB.n6o();
663
+ var bi = $this$toSRGB.o6o();
664
+ var tmp;
665
+ if (ri === gi ? gi === bi : false) {
666
+ tmp = ri < 8 ? 16 : ri > 248 ? 231 : roundToInt((ri - 8 | 0) / 247.0 * 24.0) + 232 | 0;
667
+ } else {
668
+ // Inline function 'kotlin.math.roundToInt' call
669
+ var this_0 = $this$toSRGB.y6m_1 * 5;
670
+ var tmp$ret$0 = roundToInt(this_0);
671
+ var tmp_0 = 16 + imul(36, tmp$ret$0) | 0;
672
+ // Inline function 'kotlin.math.roundToInt' call
673
+ var this_1 = $this$toSRGB.z6m_1 * 5;
674
+ var tmp$ret$1 = roundToInt(this_1);
675
+ var tmp_1 = tmp_0 + imul(6, tmp$ret$1) | 0;
676
+ // Inline function 'kotlin.math.roundToInt' call
677
+ var this_2 = $this$toSRGB.a6n_1 * 5;
678
+ tmp = tmp_1 + roundToInt(this_2) | 0;
679
+ }
680
+ var code = tmp;
681
+ return new Ansi256(code);
682
+ };
683
+ protoOf(RGB).r6m = function () {
684
+ return this.p6o(RGBColorSpaces_getInstance().a6o_1);
685
+ };
686
+ protoOf(RGB).b6p = function (r, g, b, alpha, space) {
687
+ return new RGB(r, g, b, alpha, space);
688
+ };
689
+ protoOf(RGB).y6o = function (r, g, b, alpha, space, $super) {
690
+ r = r === VOID ? this.y6m_1 : r;
691
+ g = g === VOID ? this.z6m_1 : g;
692
+ b = b === VOID ? this.a6n_1 : b;
693
+ alpha = alpha === VOID ? this.b6n_1 : alpha;
694
+ space = space === VOID ? this.c6n_1 : space;
695
+ return $super === VOID ? this.b6p(r, g, b, alpha, space) : $super.b6p.call(this, r, g, b, alpha, space);
696
+ };
697
+ protoOf(RGB).toString = function () {
698
+ return 'RGB(r=' + this.y6m_1 + ', g=' + this.z6m_1 + ', b=' + this.a6n_1 + ', alpha=' + this.b6n_1 + ', space=' + this.c6n_1 + ')';
699
+ };
700
+ protoOf(RGB).hashCode = function () {
701
+ var result = getNumberHashCode(this.y6m_1);
702
+ result = imul(result, 31) + getNumberHashCode(this.z6m_1) | 0;
703
+ result = imul(result, 31) + getNumberHashCode(this.a6n_1) | 0;
704
+ result = imul(result, 31) + getNumberHashCode(this.b6n_1) | 0;
705
+ result = imul(result, 31) + hashCode(this.c6n_1) | 0;
706
+ return result;
707
+ };
708
+ protoOf(RGB).equals = function (other) {
709
+ if (this === other)
710
+ return true;
711
+ if (!(other instanceof RGB))
712
+ return false;
713
+ var tmp0_other_with_cast = other instanceof RGB ? other : THROW_CCE();
714
+ if (!equals(this.y6m_1, tmp0_other_with_cast.y6m_1))
715
+ return false;
716
+ if (!equals(this.z6m_1, tmp0_other_with_cast.z6m_1))
717
+ return false;
718
+ if (!equals(this.a6n_1, tmp0_other_with_cast.a6n_1))
719
+ return false;
720
+ if (!equals(this.b6n_1, tmp0_other_with_cast.b6n_1))
721
+ return false;
722
+ if (!equals(this.c6n_1, tmp0_other_with_cast.c6n_1))
723
+ return false;
724
+ return true;
725
+ };
726
+ function parseHex(_this__u8e3s4, startIndex) {
727
+ var tmp;
728
+ if (get_hexLength(_this__u8e3s4) > 4) {
729
+ var i = charSequenceGet(_this__u8e3s4, 0) === _Char___init__impl__6a9atx(35) ? imul(startIndex, 2) + 1 | 0 : imul(startIndex, 2);
730
+ tmp = toInt(slice(_this__u8e3s4, numberRangeToNumber(i, i + 1 | 0)), 16);
731
+ } else {
732
+ var i_0 = charSequenceGet(_this__u8e3s4, 0) === _Char___init__impl__6a9atx(35) ? startIndex + 1 | 0 : startIndex;
733
+ // Inline function 'kotlin.let' call
734
+ // Inline function 'kotlin.contracts.contract' call
735
+ // Inline function 'com.github.ajalt.colormath.model.parseHex.<anonymous>' call
736
+ var it = charSequenceGet(_this__u8e3s4, i_0);
737
+ var tmp$ret$1 = toString(it) + toString(it);
738
+ tmp = toInt(tmp$ret$1, 16);
739
+ }
740
+ return tmp;
741
+ }
742
+ function validateHex(_this__u8e3s4) {
743
+ // Inline function 'kotlin.apply' call
744
+ // Inline function 'kotlin.contracts.contract' call
745
+ // Inline function 'com.github.ajalt.colormath.model.validateHex.<anonymous>' call
746
+ // Inline function 'kotlin.require' call
747
+ // Inline function 'kotlin.let' call
748
+ // Inline function 'kotlin.contracts.contract' call
749
+ // Inline function 'com.github.ajalt.colormath.model.validateHex.<anonymous>.<anonymous>' call
750
+ var it = get_hexLength(_this__u8e3s4);
751
+ switch (it) {
752
+ case 3:
753
+ case 4:
754
+ case 6:
755
+ var tmp$ret$0 = true;
756
+ break;
757
+ default:
758
+ tmp$ret$0 = it === 8;
759
+ break;
760
+ }
761
+ // Inline function 'kotlin.contracts.contract' call
762
+ if (!tmp$ret$0) {
763
+ // Inline function 'com.github.ajalt.colormath.model.validateHex.<anonymous>.<anonymous>' call
764
+ var message = 'Hex string must be in the format "#ffffff" or "ffffff"';
765
+ throw IllegalArgumentException_init_$Create$(toString_0(message));
766
+ }
767
+ return _this__u8e3s4;
768
+ }
769
+ function get_hexLength(_this__u8e3s4) {
770
+ return startsWith(_this__u8e3s4, '#') ? _this__u8e3s4.length - 1 | 0 : _this__u8e3s4.length;
771
+ }
772
+ function get_SRGB_R() {
773
+ _init_properties_RGBColorSpaces_kt__nc9fsz();
774
+ return SRGB_R;
775
+ }
776
+ var SRGB_R;
777
+ function get_SRGB_G() {
778
+ _init_properties_RGBColorSpaces_kt__nc9fsz();
779
+ return SRGB_G;
780
+ }
781
+ var SRGB_G;
782
+ function get_SRGB_B() {
783
+ _init_properties_RGBColorSpaces_kt__nc9fsz();
784
+ return SRGB_B;
785
+ }
786
+ var SRGB_B;
787
+ function get_ACES_WHITE_POINT() {
788
+ _init_properties_RGBColorSpaces_kt__nc9fsz();
789
+ return ACES_WHITE_POINT;
790
+ }
791
+ var ACES_WHITE_POINT;
792
+ function get_ACES_AP0_R() {
793
+ _init_properties_RGBColorSpaces_kt__nc9fsz();
794
+ return ACES_AP0_R;
795
+ }
796
+ var ACES_AP0_R;
797
+ function get_ACES_AP0_G() {
798
+ _init_properties_RGBColorSpaces_kt__nc9fsz();
799
+ return ACES_AP0_G;
800
+ }
801
+ var ACES_AP0_G;
802
+ function get_ACES_AP0_B() {
803
+ _init_properties_RGBColorSpaces_kt__nc9fsz();
804
+ return ACES_AP0_B;
805
+ }
806
+ var ACES_AP0_B;
807
+ function get_ACES_AP1_R() {
808
+ _init_properties_RGBColorSpaces_kt__nc9fsz();
809
+ return ACES_AP1_R;
810
+ }
811
+ var ACES_AP1_R;
812
+ function get_ACES_AP1_G() {
813
+ _init_properties_RGBColorSpaces_kt__nc9fsz();
814
+ return ACES_AP1_G;
815
+ }
816
+ var ACES_AP1_G;
817
+ function get_ACES_AP1_B() {
818
+ _init_properties_RGBColorSpaces_kt__nc9fsz();
819
+ return ACES_AP1_B;
820
+ }
821
+ var ACES_AP1_B;
822
+ function RGBColorSpaces() {
823
+ RGBColorSpaces_instance = this;
824
+ this.a6o_1 = SRGB_getInstance();
825
+ this.b6o_1 = RGBColorSpace_0('Linear sRGB', Illuminant_getInstance().m6m_1, LinearTransferFunctions_instance, get_SRGB_R(), get_SRGB_G(), get_SRGB_B());
826
+ this.c6o_1 = RGBColorSpace_0('ACES2065-1', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP0_R(), get_ACES_AP0_G(), get_ACES_AP0_B());
827
+ this.d6o_1 = RGBColorSpace_0('ACEScc', get_ACES_WHITE_POINT(), ACESccTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
828
+ this.e6o_1 = RGBColorSpace_0('ACEScct', get_ACES_WHITE_POINT(), ACEScctTransferFunctions_getInstance(), get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
829
+ this.f6o_1 = RGBColorSpace_0('ACEScg', get_ACES_WHITE_POINT(), LinearTransferFunctions_instance, get_ACES_AP1_R(), get_ACES_AP1_G(), get_ACES_AP1_B());
830
+ this.g6o_1 = RGBColorSpace_0('Adobe RGB', Illuminant_getInstance().m6m_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));
831
+ this.h6o_1 = BT2020Space_getInstance();
832
+ this.i6o_1 = RGBColorSpace_0('BT.709', Illuminant_getInstance().m6m_1, BT709TransferFunctions_getInstance(), xyY_init_$Create$(0.64, 0.33), xyY_init_$Create$(0.3, 0.6), xyY_init_$Create$(0.15, 0.06));
833
+ this.j6o_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));
834
+ this.k6o_1 = RGBColorSpace_0('Display P3', Illuminant_getInstance().m6m_1, SRGBTransferFunctions_instance, xyY_init_$Create$(0.68, 0.32), xyY_init_$Create$(0.265, 0.69), xyY_init_$Create$(0.15, 0.06));
835
+ this.l6o_1 = RGBColorSpace_0('ROMM RGB', Illuminant_getInstance().k6m_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));
836
+ }
837
+ var RGBColorSpaces_instance;
838
+ function RGBColorSpaces_getInstance() {
839
+ if (RGBColorSpaces_instance == null)
840
+ new RGBColorSpaces();
841
+ return RGBColorSpaces_instance;
842
+ }
843
+ function SRGB() {
844
+ SRGB_instance = this;
845
+ this.k6n_1 = 'sRGB';
846
+ this.l6n_1 = rectangularComponentInfo('RGB');
847
+ this.m6n_1 = Illuminant_getInstance().m6m_1;
848
+ this.n6n_1 = SRGBTransferFunctions_instance;
849
+ this.o6n_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.m6n_1, get_SRGB_R(), get_SRGB_G(), get_SRGB_B()));
850
+ this.p6n_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.o6n_1)));
851
+ }
852
+ protoOf(SRGB).z6n = function () {
853
+ return this.m6n_1;
854
+ };
855
+ protoOf(SRGB).w6n = function () {
856
+ return this.n6n_1;
857
+ };
858
+ protoOf(SRGB).x6n = function () {
859
+ return this.o6n_1;
860
+ };
861
+ protoOf(SRGB).y6n = function () {
862
+ return this.p6n_1;
863
+ };
864
+ protoOf(SRGB).toString = function () {
865
+ return this.k6n_1;
866
+ };
867
+ protoOf(SRGB).j6n = function (r, g, b, alpha) {
868
+ return new RGB(r, g, b, alpha, this);
869
+ };
870
+ var SRGB_instance;
871
+ function SRGB_getInstance() {
872
+ if (SRGB_instance == null)
873
+ new SRGB();
874
+ return SRGB_instance;
875
+ }
876
+ function RGBColorSpace_0(name, whitePoint, transferFunctions, r, g, b) {
877
+ _init_properties_RGBColorSpaces_kt__nc9fsz();
878
+ return new RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b);
879
+ }
880
+ function ACESccTransferFunctions() {
881
+ ACESccTransferFunctions_instance = this;
882
+ this.c6p_1 = 3.0517578125E-5;
883
+ this.d6p_1 = 1.52587890625E-5;
884
+ this.e6p_1 = -0.3013698630136986;
885
+ var tmp = this;
886
+ // Inline function 'kotlin.math.log2' call
887
+ tmp.f6p_1 = (log2(65504.0) + 9.72) / 17.52;
888
+ }
889
+ protoOf(ACESccTransferFunctions).r6n = function (x) {
890
+ var tmp;
891
+ if (x <= -0.3013698630136986) {
892
+ tmp = (spow_0(2.0, x * 17.52 - 9.72) - 1.52587890625E-5) * 2.0;
893
+ } else if (x < this.f6p_1) {
894
+ // Inline function 'kotlin.math.pow' call
895
+ var x_0 = x * 17.52 - 9.72;
896
+ tmp = Math.pow(2.0, x_0);
897
+ } else {
898
+ tmp = 65504.0;
899
+ }
900
+ return tmp;
901
+ };
902
+ protoOf(ACESccTransferFunctions).s6n = function (x) {
903
+ var tmp;
904
+ if (x < 3.0517578125E-5) {
905
+ // Inline function 'kotlin.math.log2' call
906
+ var x_0 = 1.52587890625E-5 + coerceAtLeast_0(x, 0.0) / 2.0;
907
+ tmp = (log2(x_0) + 9.72) / 17.52;
908
+ } else {
909
+ // Inline function 'kotlin.math.log2' call
910
+ tmp = (log2(x) + 9.72) / 17.52;
911
+ }
912
+ return tmp;
913
+ };
914
+ var ACESccTransferFunctions_instance;
915
+ function ACESccTransferFunctions_getInstance() {
916
+ if (ACESccTransferFunctions_instance == null)
917
+ new ACESccTransferFunctions();
918
+ return ACESccTransferFunctions_instance;
919
+ }
920
+ function ACEScctTransferFunctions() {
921
+ ACEScctTransferFunctions_instance = this;
922
+ this.g6p_1 = 10.5402377416545;
923
+ this.h6p_1 = 0.0729055341958355;
924
+ var tmp = this;
925
+ // Inline function 'kotlin.math.log2' call
926
+ tmp.i6p_1 = (log2(65504.0) + 9.72) / 17.52;
927
+ }
928
+ protoOf(ACEScctTransferFunctions).r6n = function (x) {
929
+ var tmp;
930
+ if (x <= 0.155251141552511) {
931
+ tmp = (x - 0.0729055341958355) / 10.5402377416545;
932
+ } else if (x < this.i6p_1) {
933
+ // Inline function 'kotlin.math.pow' call
934
+ var x_0 = x * 17.52 - 9.72;
935
+ tmp = Math.pow(2.0, x_0);
936
+ } else {
937
+ tmp = 65504.0;
938
+ }
939
+ return tmp;
940
+ };
941
+ protoOf(ACEScctTransferFunctions).s6n = function (x) {
942
+ var tmp;
943
+ if (x < 0.0078125) {
944
+ tmp = 10.5402377416545 * x + 0.0729055341958355;
945
+ } else {
946
+ // Inline function 'kotlin.math.log2' call
947
+ tmp = (log2(x) + 9.72) / 17.52;
948
+ }
949
+ return tmp;
950
+ };
951
+ var ACEScctTransferFunctions_instance;
952
+ function ACEScctTransferFunctions_getInstance() {
953
+ if (ACEScctTransferFunctions_instance == null)
954
+ new ACEScctTransferFunctions();
955
+ return ACEScctTransferFunctions_instance;
956
+ }
957
+ function BT2020Space() {
958
+ BT2020Space_instance = this;
959
+ this.j6p_1 = 'BT.2020';
960
+ this.k6p_1 = rectangularComponentInfo('RGB');
961
+ this.l6p_1 = Illuminant_getInstance().m6m_1;
962
+ this.m6p_1 = BT2020TransferFunctions_getInstance();
963
+ this.n6p_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.l6p_1, xyY_init_$Create$(0.708, 0.292), xyY_init_$Create$(0.17, 0.797), xyY_init_$Create$(0.131, 0.046)));
964
+ this.o6p_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.n6p_1)));
965
+ }
966
+ protoOf(BT2020Space).z6n = function () {
967
+ return this.l6p_1;
968
+ };
969
+ protoOf(BT2020Space).w6n = function () {
970
+ return this.m6p_1;
971
+ };
972
+ protoOf(BT2020Space).j6n = function (r, g, b, alpha) {
973
+ return new RGB(r, g, b, alpha, this);
974
+ };
975
+ protoOf(BT2020Space).x6n = function () {
976
+ return this.n6p_1;
977
+ };
978
+ protoOf(BT2020Space).y6n = function () {
979
+ return this.o6p_1;
980
+ };
981
+ protoOf(BT2020Space).toString = function () {
982
+ return this.j6p_1;
983
+ };
984
+ var BT2020Space_instance;
985
+ function BT2020Space_getInstance() {
986
+ if (BT2020Space_instance == null)
987
+ new BT2020Space();
988
+ return BT2020Space_instance;
989
+ }
990
+ function BT709TransferFunctions() {
991
+ BT709TransferFunctions_instance = this;
992
+ this.p6p_1 = 1.099 * spow_0(0.018, 0.45) - 0.099;
993
+ }
994
+ protoOf(BT709TransferFunctions).r6n = function (x) {
995
+ return numberToDouble(x < this.p6p_1 ? x / 4.5 : spow_0((x + 0.099) / 1.099, 2.2222222222222223));
996
+ };
997
+ protoOf(BT709TransferFunctions).s6n = function (x) {
998
+ return x < 0.018 ? 4.5 * x : 1.099 * spow(x, 0.45) - 0.099;
999
+ };
1000
+ var BT709TransferFunctions_instance;
1001
+ function BT709TransferFunctions_getInstance() {
1002
+ if (BT709TransferFunctions_instance == null)
1003
+ new BT709TransferFunctions();
1004
+ return BT709TransferFunctions_instance;
1005
+ }
1006
+ function SRGBTransferFunctions() {
1007
+ }
1008
+ protoOf(SRGBTransferFunctions).s6n = function (x) {
1009
+ return x <= 0.0031308 ? x * 12.92 : 1.055 * spow(x, 0.4166666666666667) - 0.055;
1010
+ };
1011
+ protoOf(SRGBTransferFunctions).r6n = function (x) {
1012
+ return x <= 0.04045 ? x / 12.92 : spow_0((x + 0.055) / 1.055, 2.4);
1013
+ };
1014
+ var SRGBTransferFunctions_instance;
1015
+ function SRGBTransferFunctions_getInstance() {
1016
+ return SRGBTransferFunctions_instance;
1017
+ }
1018
+ function ROMMTransferFunctions() {
1019
+ this.q6p_1 = 0.001953;
1020
+ }
1021
+ protoOf(ROMMTransferFunctions).r6n = function (x) {
1022
+ return x < 0.031248 ? x / 16.0 : spow(x, 1.8);
1023
+ };
1024
+ protoOf(ROMMTransferFunctions).s6n = function (x) {
1025
+ return x < 0.001953 ? x * 16.0 : spow(x, 0.5555555555555556);
1026
+ };
1027
+ var ROMMTransferFunctions_instance;
1028
+ function ROMMTransferFunctions_getInstance() {
1029
+ return ROMMTransferFunctions_instance;
1030
+ }
1031
+ function rgbToXyzMatrix(whitePoint, r, g, b) {
1032
+ _init_properties_RGBColorSpaces_kt__nc9fsz();
1033
+ var primaries = _Matrix___init__impl__q3kp4w_0(r.r6p_1, g.r6p_1, b.r6p_1, r.s6p_1, g.s6p_1, b.s6p_1, r.u6p(), g.u6p(), b.u6p());
1034
+ var wp = whitePoint.g6m_1;
1035
+ // Inline function 'com.github.ajalt.colormath.internal.dot' call
1036
+ var this_0 = inverse(primaries);
1037
+ var v0 = wp.v6p();
1038
+ var v1 = wp.t6p_1;
1039
+ var v2 = wp.w6p();
1040
+ // Inline function 'com.github.ajalt.colormath.model.rgbToXyzMatrix.<anonymous>' call
1041
+ 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;
1042
+ 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;
1043
+ 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;
1044
+ return dotDiagonal(primaries, x, y, z);
1045
+ }
1046
+ function RGBColorSpaceImpl(name, whitePoint, transferFunctions, r, g, b) {
1047
+ this.x6p_1 = name;
1048
+ this.y6p_1 = whitePoint;
1049
+ this.z6p_1 = transferFunctions;
1050
+ this.a6q_1 = r;
1051
+ this.b6q_1 = g;
1052
+ this.c6q_1 = b;
1053
+ this.d6q_1 = rectangularComponentInfo('RGB');
1054
+ this.e6q_1 = _Matrix___get_rowMajor__impl__vmgxkq(rgbToXyzMatrix(this.y6p_1, this.a6q_1, this.b6q_1, this.c6q_1));
1055
+ this.f6q_1 = _Matrix___get_rowMajor__impl__vmgxkq(inverse(_Matrix___init__impl__q3kp4w(this.e6q_1)));
1056
+ }
1057
+ protoOf(RGBColorSpaceImpl).z6n = function () {
1058
+ return this.y6p_1;
1059
+ };
1060
+ protoOf(RGBColorSpaceImpl).w6n = function () {
1061
+ return this.z6p_1;
1062
+ };
1063
+ protoOf(RGBColorSpaceImpl).x6n = function () {
1064
+ return this.e6q_1;
1065
+ };
1066
+ protoOf(RGBColorSpaceImpl).y6n = function () {
1067
+ return this.f6q_1;
1068
+ };
1069
+ protoOf(RGBColorSpaceImpl).toString = function () {
1070
+ return this.x6p_1;
1071
+ };
1072
+ protoOf(RGBColorSpaceImpl).j6n = function (r, g, b, alpha) {
1073
+ return new RGB(r, g, b, alpha, this);
1074
+ };
1075
+ protoOf(RGBColorSpaceImpl).hashCode = function () {
1076
+ var result = getStringHashCode(this.x6p_1);
1077
+ result = imul(result, 31) + this.y6p_1.hashCode() | 0;
1078
+ result = imul(result, 31) + hashCode(this.z6p_1) | 0;
1079
+ result = imul(result, 31) + this.a6q_1.hashCode() | 0;
1080
+ result = imul(result, 31) + this.b6q_1.hashCode() | 0;
1081
+ result = imul(result, 31) + this.c6q_1.hashCode() | 0;
1082
+ return result;
1083
+ };
1084
+ protoOf(RGBColorSpaceImpl).equals = function (other) {
1085
+ if (this === other)
1086
+ return true;
1087
+ if (!(other instanceof RGBColorSpaceImpl))
1088
+ return false;
1089
+ var tmp0_other_with_cast = other instanceof RGBColorSpaceImpl ? other : THROW_CCE();
1090
+ if (!(this.x6p_1 === tmp0_other_with_cast.x6p_1))
1091
+ return false;
1092
+ if (!this.y6p_1.equals(tmp0_other_with_cast.y6p_1))
1093
+ return false;
1094
+ if (!equals(this.z6p_1, tmp0_other_with_cast.z6p_1))
1095
+ return false;
1096
+ if (!this.a6q_1.equals(tmp0_other_with_cast.a6q_1))
1097
+ return false;
1098
+ if (!this.b6q_1.equals(tmp0_other_with_cast.b6q_1))
1099
+ return false;
1100
+ if (!this.c6q_1.equals(tmp0_other_with_cast.c6q_1))
1101
+ return false;
1102
+ return true;
1103
+ };
1104
+ function BT2020TransferFunctions() {
1105
+ BT2020TransferFunctions_instance = this;
1106
+ this.g6q_1 = 1.0993;
1107
+ this.h6q_1 = 0.0181;
1108
+ var tmp = this;
1109
+ // Inline function 'kotlin.math.pow' call
1110
+ tmp.i6q_1 = 1.0993 * Math.pow(0.0181, 0.45) - 0.09929999999999994;
1111
+ }
1112
+ protoOf(BT2020TransferFunctions).r6n = function (x) {
1113
+ return numberToDouble(x < this.i6q_1 ? x / 4.5 : spow_0((x + 0.09929999999999994) / 1.0993, 2.2222222222222223));
1114
+ };
1115
+ protoOf(BT2020TransferFunctions).s6n = function (x) {
1116
+ return x < 0.0181 ? 4.5 * x : 1.0993 * spow(x, 0.45) - 0.09929999999999994;
1117
+ };
1118
+ var BT2020TransferFunctions_instance;
1119
+ function BT2020TransferFunctions_getInstance() {
1120
+ if (BT2020TransferFunctions_instance == null)
1121
+ new BT2020TransferFunctions();
1122
+ return BT2020TransferFunctions_instance;
1123
+ }
1124
+ var properties_initialized_RGBColorSpaces_kt_fsnpad;
1125
+ function _init_properties_RGBColorSpaces_kt__nc9fsz() {
1126
+ if (!properties_initialized_RGBColorSpaces_kt_fsnpad) {
1127
+ properties_initialized_RGBColorSpaces_kt_fsnpad = true;
1128
+ SRGB_R = xyY_init_$Create$(0.64, 0.33);
1129
+ SRGB_G = xyY_init_$Create$(0.3, 0.6);
1130
+ SRGB_B = xyY_init_$Create$(0.15, 0.06);
1131
+ ACES_WHITE_POINT = new WhitePoint('ACES', xyY_init_$Create$(0.32168, 0.33767));
1132
+ ACES_AP0_R = xyY_init_$Create$(0.7347, 0.2653);
1133
+ ACES_AP0_G = xyY_init_$Create$(0.0, 1.0);
1134
+ ACES_AP0_B = xyY_init_$Create$(1.0E-4, -0.077);
1135
+ ACES_AP1_R = xyY_init_$Create$(0.713, 0.293);
1136
+ ACES_AP1_G = xyY_init_$Create$(0.165, 0.83);
1137
+ ACES_AP1_B = xyY_init_$Create$(0.128, 0.044);
1138
+ }
1139
+ }
1140
+ function Companion_3() {
1141
+ Companion_instance_3 = this;
1142
+ this.j6q_1 = XYZColorSpaces_getInstance().k6q_1;
1143
+ }
1144
+ protoOf(Companion_3).z6n = function () {
1145
+ return this.j6q_1.z6n();
1146
+ };
1147
+ protoOf(Companion_3).j6n = function (x, y, z, alpha) {
1148
+ return this.j6q_1.j6n(x, y, z, alpha);
1149
+ };
1150
+ var Companion_instance_3;
1151
+ function Companion_getInstance_3() {
1152
+ if (Companion_instance_3 == null)
1153
+ new Companion_3();
1154
+ return Companion_instance_3;
1155
+ }
1156
+ function adaptToM($this, space, m, mi) {
1157
+ if (space.z6n().equals($this.v6o_1.z6n()))
1158
+ return $this;
1159
+ var transform = chromaticAdaptationMatrix(space, $this.v6o_1.z6n().g6m_1, m, mi);
1160
+ // Inline function 'com.github.ajalt.colormath.internal.dot' call
1161
+ var v0 = $this.r6o_1;
1162
+ var v1 = $this.s6o_1;
1163
+ var v2 = $this.t6o_1;
1164
+ // Inline function 'com.github.ajalt.colormath.model.XYZ.adaptToM.<anonymous>' call
1165
+ 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;
1166
+ 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;
1167
+ 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;
1168
+ return space.j6n(xx, yy, zz, $this.u6o_1);
1169
+ }
1170
+ function XYZ(x, y, z, alpha, space) {
1171
+ Companion_getInstance_3();
1172
+ this.r6o_1 = x;
1173
+ this.s6o_1 = y;
1174
+ this.t6o_1 = z;
1175
+ this.u6o_1 = alpha;
1176
+ this.v6o_1 = space;
1177
+ }
1178
+ protoOf(XYZ).m6q = function (space) {
1179
+ return adaptToM(this, space, get_CAT02_XYZ_TO_LMS(), get_CAT02_LMS_TO_XYZ());
1180
+ };
1181
+ protoOf(XYZ).w6o = function (space) {
1182
+ var tmp0_container = this.m6q(XYZColorSpace(space.z6n()));
1183
+ var x = tmp0_container.gf();
1184
+ var y = tmp0_container.hf();
1185
+ var z = tmp0_container.xj();
1186
+ var f = space.w6n();
1187
+ // Inline function 'com.github.ajalt.colormath.internal.dot' call
1188
+ var this_0 = _Matrix___init__impl__q3kp4w(space.y6n());
1189
+ // Inline function 'com.github.ajalt.colormath.model.XYZ.toRGB.<anonymous>' call
1190
+ 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;
1191
+ 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;
1192
+ 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;
1193
+ return space.j6n(f.s6n(r), f.s6n(g), f.s6n(b), this.u6o_1);
1194
+ };
1195
+ protoOf(XYZ).r6m = function () {
1196
+ return this.w6o(RGBColorSpaces_getInstance().a6o_1);
1197
+ };
1198
+ protoOf(XYZ).gf = function () {
1199
+ return this.r6o_1;
1200
+ };
1201
+ protoOf(XYZ).hf = function () {
1202
+ return this.s6o_1;
1203
+ };
1204
+ protoOf(XYZ).xj = function () {
1205
+ return this.t6o_1;
1206
+ };
1207
+ protoOf(XYZ).toString = function () {
1208
+ return 'XYZ(x=' + this.r6o_1 + ', y=' + this.s6o_1 + ', z=' + this.t6o_1 + ', alpha=' + this.u6o_1 + ', space=' + this.v6o_1 + ')';
1209
+ };
1210
+ protoOf(XYZ).hashCode = function () {
1211
+ var result = getNumberHashCode(this.r6o_1);
1212
+ result = imul(result, 31) + getNumberHashCode(this.s6o_1) | 0;
1213
+ result = imul(result, 31) + getNumberHashCode(this.t6o_1) | 0;
1214
+ result = imul(result, 31) + getNumberHashCode(this.u6o_1) | 0;
1215
+ result = imul(result, 31) + hashCode(this.v6o_1) | 0;
1216
+ return result;
1217
+ };
1218
+ protoOf(XYZ).equals = function (other) {
1219
+ if (this === other)
1220
+ return true;
1221
+ if (!(other instanceof XYZ))
1222
+ return false;
1223
+ var tmp0_other_with_cast = other instanceof XYZ ? other : THROW_CCE();
1224
+ if (!equals(this.r6o_1, tmp0_other_with_cast.r6o_1))
1225
+ return false;
1226
+ if (!equals(this.s6o_1, tmp0_other_with_cast.s6o_1))
1227
+ return false;
1228
+ if (!equals(this.t6o_1, tmp0_other_with_cast.t6o_1))
1229
+ return false;
1230
+ if (!equals(this.u6o_1, tmp0_other_with_cast.u6o_1))
1231
+ return false;
1232
+ if (!equals(this.v6o_1, tmp0_other_with_cast.v6o_1))
1233
+ return false;
1234
+ return true;
1235
+ };
1236
+ function XYZColorSpace(whitePoint) {
1237
+ return whitePoint.equals(Illuminant_getInstance().m6m_1) ? XYZColorSpaces_getInstance().k6q_1 : whitePoint.equals(Illuminant_getInstance().k6m_1) ? XYZColorSpaces_getInstance().l6q_1 : new XYZColorSpaceImpl(whitePoint);
1238
+ }
1239
+ function XYZColorSpaces() {
1240
+ XYZColorSpaces_instance = this;
1241
+ this.k6q_1 = new XYZColorSpaceImpl(Illuminant_getInstance().m6m_1);
1242
+ this.l6q_1 = new XYZColorSpaceImpl(Illuminant_getInstance().k6m_1);
1243
+ }
1244
+ var XYZColorSpaces_instance;
1245
+ function XYZColorSpaces_getInstance() {
1246
+ if (XYZColorSpaces_instance == null)
1247
+ new XYZColorSpaces();
1248
+ return XYZColorSpaces_instance;
1249
+ }
1250
+ function chromaticAdaptationMatrix(_this__u8e3s4, srcWp, xyzToLms, lmsToXyz) {
1251
+ xyzToLms = xyzToLms === VOID ? get_CAT02_XYZ_TO_LMS() : xyzToLms;
1252
+ lmsToXyz = lmsToXyz === VOID ? get_CAT02_LMS_TO_XYZ() : lmsToXyz;
1253
+ var dstWp = _this__u8e3s4.z6n().g6m_1;
1254
+ var src = dot_0(xyzToLms, srcWp.v6p(), srcWp.t6p_1, srcWp.w6p());
1255
+ var dst = dot_0(xyzToLms, dstWp.v6p(), dstWp.t6p_1, dstWp.w6p());
1256
+ 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);
1257
+ }
1258
+ function XYZColorSpaceImpl(whitePoint) {
1259
+ this.n6q_1 = whitePoint;
1260
+ this.o6q_1 = rectangularComponentInfo('XYZ');
1261
+ }
1262
+ protoOf(XYZColorSpaceImpl).z6n = function () {
1263
+ return this.n6q_1;
1264
+ };
1265
+ protoOf(XYZColorSpaceImpl).toString = function () {
1266
+ return 'XYZColorSpace(' + this.n6q_1 + ')';
1267
+ };
1268
+ protoOf(XYZColorSpaceImpl).j6n = function (x, y, z, alpha) {
1269
+ return new XYZ(x, y, z, alpha, this);
1270
+ };
1271
+ protoOf(XYZColorSpaceImpl).hashCode = function () {
1272
+ return this.n6q_1.hashCode();
1273
+ };
1274
+ protoOf(XYZColorSpaceImpl).equals = function (other) {
1275
+ if (this === other)
1276
+ return true;
1277
+ if (!(other instanceof XYZColorSpaceImpl))
1278
+ return false;
1279
+ var tmp0_other_with_cast = other instanceof XYZColorSpaceImpl ? other : THROW_CCE();
1280
+ if (!this.n6q_1.equals(tmp0_other_with_cast.n6q_1))
1281
+ return false;
1282
+ return true;
1283
+ };
1284
+ function xyY_init_$Init$(x, y, Y, $this) {
1285
+ Y = Y === VOID ? 1.0 : Y;
1286
+ xyY.call($this, numberToDouble(x), numberToDouble(y), numberToDouble(Y));
1287
+ return $this;
1288
+ }
1289
+ function xyY_init_$Create$(x, y, Y) {
1290
+ return xyY_init_$Init$(x, y, Y, objectCreate(protoOf(xyY)));
1291
+ }
1292
+ function xyY(x, y, Y) {
1293
+ Y = Y === VOID ? 1.0 : Y;
1294
+ this.r6p_1 = x;
1295
+ this.s6p_1 = y;
1296
+ this.t6p_1 = Y;
1297
+ }
1298
+ protoOf(xyY).u6p = function () {
1299
+ return 1 - this.r6p_1 - this.s6p_1;
1300
+ };
1301
+ protoOf(xyY).v6p = function () {
1302
+ return this.r6p_1 * this.t6p_1 / this.s6p_1;
1303
+ };
1304
+ protoOf(xyY).w6p = function () {
1305
+ return (1 - this.r6p_1 - this.s6p_1) * this.t6p_1 / this.s6p_1;
1306
+ };
1307
+ protoOf(xyY).toString = function () {
1308
+ return 'xyY(x=' + this.r6p_1 + ', y=' + this.s6p_1 + ', Y=' + this.t6p_1 + ')';
1309
+ };
1310
+ protoOf(xyY).hashCode = function () {
1311
+ var result = getNumberHashCode(this.r6p_1);
1312
+ result = imul(result, 31) + getNumberHashCode(this.s6p_1) | 0;
1313
+ result = imul(result, 31) + getNumberHashCode(this.t6p_1) | 0;
1314
+ return result;
1315
+ };
1316
+ protoOf(xyY).equals = function (other) {
1317
+ if (this === other)
1318
+ return true;
1319
+ if (!(other instanceof xyY))
1320
+ return false;
1321
+ var tmp0_other_with_cast = other instanceof xyY ? other : THROW_CCE();
1322
+ if (!equals(this.r6p_1, tmp0_other_with_cast.r6p_1))
1323
+ return false;
1324
+ if (!equals(this.s6p_1, tmp0_other_with_cast.s6p_1))
1325
+ return false;
1326
+ if (!equals(this.t6p_1, tmp0_other_with_cast.t6p_1))
1327
+ return false;
1328
+ return true;
1329
+ };
1330
+ //region block: post-declaration
1331
+ protoOf(Companion_2).t6m = from255$default;
1332
+ protoOf(Companion_2).s6m = invoke$default;
1333
+ protoOf(Companion_2).x6m = invoke$default_0;
1334
+ protoOf(SRGB).s6m = invoke$default;
1335
+ protoOf(SRGB).t6n = invoke;
1336
+ protoOf(SRGB).x6m = invoke$default_0;
1337
+ protoOf(SRGB).v6n = invoke_0;
1338
+ protoOf(SRGB).u6n = from255;
1339
+ protoOf(SRGB).t6m = from255$default;
1340
+ protoOf(BT2020Space).s6m = invoke$default;
1341
+ protoOf(BT2020Space).t6n = invoke;
1342
+ protoOf(BT2020Space).x6m = invoke$default_0;
1343
+ protoOf(BT2020Space).v6n = invoke_0;
1344
+ protoOf(BT2020Space).u6n = from255;
1345
+ protoOf(BT2020Space).t6m = from255$default;
1346
+ protoOf(RGBColorSpaceImpl).s6m = invoke$default;
1347
+ protoOf(RGBColorSpaceImpl).t6n = invoke;
1348
+ protoOf(RGBColorSpaceImpl).x6m = invoke$default_0;
1349
+ protoOf(RGBColorSpaceImpl).v6n = invoke_0;
1350
+ protoOf(RGBColorSpaceImpl).u6n = from255;
1351
+ protoOf(RGBColorSpaceImpl).t6m = from255$default;
1352
+ //endregion
1353
+ //region block: init
1354
+ LinearTransferFunctions_instance = new LinearTransferFunctions();
1355
+ SRGBTransferFunctions_instance = new SRGBTransferFunctions();
1356
+ ROMMTransferFunctions_instance = new ROMMTransferFunctions();
1357
+ //endregion
1358
+ //region block: exports
1359
+ _.$_$ = _.$_$ || {};
1360
+ _.$_$.a = Ansi16;
1361
+ _.$_$.b = Ansi256;
1362
+ _.$_$.c = Companion_getInstance_2;
1363
+ //endregion
1364
+ return _;
1365
+ }(module.exports, require('./kotlin-kotlin-stdlib.js')));
1366
+
1367
+ //# sourceMappingURL=colormath-root-colormath.js.map