@rubin-epo/epo-widget-lib 0.2.1 → 0.4.0

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 (114) hide show
  1. package/README.MD +21 -15
  2. package/dist/CameraFilter.cjs +1 -0
  3. package/dist/CameraFilter.d.ts +3 -0
  4. package/dist/CameraFilter.js +99 -0
  5. package/dist/ColorTool.cjs +1 -0
  6. package/dist/ColorTool.d.ts +3 -0
  7. package/dist/ColorTool.js +116 -0
  8. package/dist/FilterTool.cjs +1 -0
  9. package/dist/FilterTool.d.ts +3 -0
  10. package/dist/FilterTool.js +253 -0
  11. package/dist/SourceSelector.cjs +1 -0
  12. package/dist/SourceSelector.d.ts +3 -0
  13. package/dist/SourceSelector.js +97 -0
  14. package/dist/atomic/Blinker/Blinker.cjs +1 -0
  15. package/dist/atomic/Blinker/Blinker.d.ts +2 -2
  16. package/dist/atomic/Blinker/Blinker.js +68 -0
  17. package/dist/atomic/Blinker/Controls/Controls.cjs +1 -0
  18. package/dist/atomic/Blinker/Controls/Controls.js +58 -0
  19. package/dist/atomic/Blinker/Controls/styles.cjs +13 -0
  20. package/dist/atomic/Blinker/Controls/styles.d.ts +2 -1
  21. package/dist/atomic/Blinker/Controls/styles.js +17 -0
  22. package/dist/atomic/Blinker/Image/Image.cjs +1 -0
  23. package/dist/atomic/Blinker/Image/Image.d.ts +2 -2
  24. package/dist/atomic/Blinker/Image/Image.js +23 -0
  25. package/dist/atomic/Blinker/Image/styles.cjs +22 -0
  26. package/dist/atomic/Blinker/Image/styles.d.ts +4 -3
  27. package/dist/atomic/Blinker/Image/styles.js +26 -0
  28. package/dist/atomic/Blinker/Images/Images.cjs +1 -0
  29. package/dist/atomic/Blinker/Images/Images.js +37 -0
  30. package/dist/atomic/Blinker/Images/styles.cjs +15 -0
  31. package/dist/atomic/Blinker/Images/styles.d.ts +5 -4
  32. package/dist/atomic/Blinker/Images/styles.js +20 -0
  33. package/dist/atomic/Blinker/_mocks/index.d.ts +2 -0
  34. package/dist/atomic/Blinker/styles.cjs +26 -0
  35. package/dist/atomic/Blinker/styles.d.ts +7 -9
  36. package/dist/atomic/Blinker/styles.js +34 -0
  37. package/dist/atomic/ElapsedTime/ElapsedTime.cjs +1 -0
  38. package/dist/atomic/ElapsedTime/ElapsedTime.js +34 -0
  39. package/dist/atomic/ElapsedTime/styles.cjs +40 -0
  40. package/dist/atomic/ElapsedTime/styles.d.ts +7 -6
  41. package/dist/atomic/ElapsedTime/styles.js +49 -0
  42. package/dist/atomic/PlaybackControl/PlaybackControl.cjs +1 -0
  43. package/dist/atomic/PlaybackControl/PlaybackControl.d.ts +1 -1
  44. package/dist/atomic/PlaybackControl/PlaybackControl.js +17 -0
  45. package/dist/atomic/PlaybackControl/styles.cjs +39 -0
  46. package/dist/atomic/PlaybackControl/styles.d.ts +3 -2
  47. package/dist/atomic/PlaybackControl/styles.js +44 -0
  48. package/dist/hooks/useInterval.cjs +1 -0
  49. package/dist/hooks/useInterval.js +18 -0
  50. package/dist/lib/utils.cjs +1 -0
  51. package/dist/lib/utils.js +18 -0
  52. package/dist/lib/utils.test.d.ts +1 -0
  53. package/dist/localeStrings/en/epo-widget-lib.json +77 -0
  54. package/dist/localeStrings/es/epo-widget-lib.json +33 -0
  55. package/dist/styles/svg.cjs +8 -0
  56. package/dist/styles/svg.d.ts +2 -1
  57. package/dist/styles/svg.js +12 -0
  58. package/dist/widgets/CameraFilter/CondensedFilterRanges/CondensedFilterRanges.cjs +1 -0
  59. package/dist/widgets/CameraFilter/CondensedFilterRanges/CondensedFilterRanges.js +61 -0
  60. package/dist/widgets/CameraFilter/SpectrumDisplay/ColorLabels/ColorLabels.cjs +1 -0
  61. package/dist/widgets/CameraFilter/SpectrumDisplay/ColorLabels/ColorLabels.js +95 -0
  62. package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.cjs +1 -0
  63. package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumDisplay.js +98 -0
  64. package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumLabels/SpectrumLabels.cjs +1 -0
  65. package/dist/widgets/CameraFilter/SpectrumDisplay/SpectrumLabels/SpectrumLabels.js +58 -0
  66. package/dist/widgets/CameraFilter/data.cjs +1 -0
  67. package/dist/widgets/CameraFilter/data.js +85 -0
  68. package/dist/widgets/CameraFilter/styles.cjs +64 -0
  69. package/dist/widgets/CameraFilter/styles.d.ts +19 -18
  70. package/dist/widgets/CameraFilter/styles.js +82 -0
  71. package/dist/widgets/ColorTool/ColorTool.d.ts +1 -2
  72. package/dist/widgets/ColorTool/FilterControls/FilterControls.cjs +1 -0
  73. package/dist/widgets/ColorTool/FilterControls/FilterControls.d.ts +1 -1
  74. package/dist/widgets/ColorTool/FilterControls/FilterControls.js +63 -0
  75. package/dist/widgets/ColorTool/FilterImage/FilterImage.cjs +1 -0
  76. package/dist/widgets/ColorTool/FilterImage/FilterImage.js +41 -0
  77. package/dist/widgets/ColorTool/ImageComposite/ImageComposite.cjs +1 -0
  78. package/dist/widgets/ColorTool/ImageComposite/ImageComposite.js +33 -0
  79. package/dist/widgets/ColorTool/styles.cjs +129 -0
  80. package/dist/widgets/ColorTool/styles.d.ts +21 -21
  81. package/dist/widgets/ColorTool/styles.js +149 -0
  82. package/dist/widgets/ColorTool/utilities.cjs +1 -0
  83. package/dist/widgets/ColorTool/utilities.js +38 -0
  84. package/dist/widgets/FilterTool/FilterTool.d.ts +3 -1
  85. package/dist/widgets/FilterTool/styles.cjs +36 -0
  86. package/dist/widgets/FilterTool/styles.d.ts +10 -15
  87. package/dist/widgets/FilterTool/styles.js +49 -0
  88. package/dist/widgets/SourceSelector/Message/Message.cjs +1 -0
  89. package/dist/widgets/SourceSelector/Message/Message.js +21 -0
  90. package/dist/widgets/SourceSelector/Message/styles.cjs +23 -0
  91. package/dist/widgets/SourceSelector/Message/styles.d.ts +5 -0
  92. package/dist/widgets/SourceSelector/Message/styles.js +28 -0
  93. package/dist/widgets/SourceSelector/Point/Point.cjs +1 -0
  94. package/dist/widgets/SourceSelector/Point/Point.js +45 -0
  95. package/dist/widgets/SourceSelector/Point/styles.cjs +11 -0
  96. package/dist/widgets/SourceSelector/Point/styles.d.ts +4 -3
  97. package/dist/widgets/SourceSelector/Point/styles.js +15 -0
  98. package/dist/widgets/SourceSelector/Points/Points.cjs +1 -0
  99. package/dist/widgets/SourceSelector/Points/Points.js +35 -0
  100. package/dist/widgets/SourceSelector/SourceSelector.d.ts +2 -2
  101. package/dist/widgets/SourceSelector/mocks/index.d.ts +7 -0
  102. package/dist/widgets/SourceSelector/styles.cjs +20 -0
  103. package/dist/widgets/SourceSelector/styles.d.ts +9 -7
  104. package/dist/widgets/SourceSelector/styles.js +30 -0
  105. package/dist/widgets/SourceSelector/utilities.cjs +1 -0
  106. package/dist/widgets/SourceSelector/utilities.js +7 -0
  107. package/dist/widgets/SourceSelector/utilities.test.d.ts +1 -0
  108. package/package.json +10 -10
  109. package/dist/assets/locales/index.d.ts +0 -115
  110. package/dist/epo-widget-lib.es.js +0 -3427
  111. package/dist/epo-widget-lib.umd.js +0 -459
  112. package/dist/index.d.ts +0 -6
  113. package/dist/types/astro.d.ts +0 -35
  114. package/dist/vite-env.d.ts +0 -1
@@ -1,3427 +0,0 @@
1
- import { localeStrings as Or, SelectListbox as ft, tokens as Ir, HorizontalSlider as Jn, Button as Pr, Select as Xn, ColorSwatch as Zn, IconComposer as Rr, CircularLoader as Qn, Toast as ea } from "@rubin-epo/epo-react-lib";
2
- import { GlobalStyles as Qg } from "@rubin-epo/epo-react-lib";
3
- import Lr, { useRef as dt, useState as W, useEffect as V } from "react";
4
- import { useTranslation as ne, Trans as me } from "react-i18next";
5
- import ut from "use-resize-observer";
6
- import b, { css as j } from "styled-components";
7
- const ta = {
8
- blinker: {
9
- controls: {
10
- rewind: "Rewind",
11
- forward: "Forward",
12
- play: "Play",
13
- pause: "Pause"
14
- }
15
- },
16
- elapsed_time: {
17
- title: "Elapsed Time",
18
- step: {
19
- day_one: "Day",
20
- day_other: "Days",
21
- hour_one: "Hour",
22
- hour_other: "Hours",
23
- minute_one: "Minute",
24
- minute_other: "Minutes",
25
- second_one: "Second",
26
- second_other: "Seconds",
27
- year_one: "Year",
28
- year_other: "Years"
29
- }
30
- },
31
- filterTool: {
32
- title: "Filter Tool",
33
- filter: "Filter",
34
- whiteLight: "White Light",
35
- prism: "Prism",
36
- selectLabel: "Select a filter:",
37
- colors: {
38
- violet: "Violet",
39
- blue: "Blue",
40
- green: "Green",
41
- yellow: "Yellow",
42
- orange: "Orange",
43
- red: "Red",
44
- none: "None"
45
- }
46
- },
47
- colorTool: {
48
- labels: {
49
- object_type: "Object type:",
50
- object: "Object:",
51
- object_selected: "Selected object:",
52
- filter: "Filter",
53
- color: "Color",
54
- color_intensity: "Color Intensity"
55
- },
56
- actions: {
57
- select_an_object: "Select an object",
58
- select_filter: "Select a filter",
59
- reset: "Reset"
60
- }
61
- },
62
- source_selector: {
63
- messages: {
64
- success: "You found it!",
65
- failure: "Try again."
66
- }
67
- },
68
- camera_filter: {
69
- title: "Rubin Observatory LSST Camera Filter Ranges",
70
- labels: {
71
- select: "Select one of the Rubin filters",
72
- option: "{{band}} filter",
73
- option_none: "None",
74
- captured_range: "Electromagnetic spectrums captured with {{filter}} filter applied",
75
- captured_range_no_filter: "Electromagnetic spectrums without filter applied",
76
- ultraviolet: "Ultraviolet",
77
- visible: "Visible Light",
78
- infrared: "Infrared"
79
- }
80
- }
81
- }, nt = {
82
- translation: ta
83
- }, ra = {
84
- elapsed_time: {
85
- title: "Tiempo transcurrido",
86
- step: {
87
- day_one: "Día",
88
- day_other: "Días",
89
- hour_one: "Hora",
90
- hour_other: "Horas",
91
- minute_one: "Minuto",
92
- minute_other: "Minutos",
93
- second_one: "Segundo",
94
- second_other: "Segundos",
95
- year_one: "Año",
96
- year_other: "Años"
97
- }
98
- },
99
- filterTool: {
100
- title: "Herramienta de filtro",
101
- filter: "El filtro",
102
- whiteLight: "Luz blanca",
103
- prism: "Prisma",
104
- selectLabel: "Seleccione un filtro:",
105
- colors: {
106
- violet: "Violeta",
107
- blue: "Azul",
108
- green: "Verde",
109
- yellow: "Amarillo",
110
- orange: "Naranja",
111
- red: "Rojo",
112
- none: "Ninguno"
113
- }
114
- }
115
- }, at = {
116
- translation: ra
117
- };
118
- nt.translation = { ...nt.translation, ...Or.en.translation };
119
- at.translation = { ...at.translation, ...Or.es.translation };
120
- const Jg = { en: nt, es: at };
121
- var Ie = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, _e = {}, na = {
122
- get exports() {
123
- return _e;
124
- },
125
- set exports(e) {
126
- _e = e;
127
- }
128
- }, ve = {};
129
- /**
130
- * @license React
131
- * react-jsx-runtime.production.min.js
132
- *
133
- * Copyright (c) Facebook, Inc. and its affiliates.
134
- *
135
- * This source code is licensed under the MIT license found in the
136
- * LICENSE file in the root directory of this source tree.
137
- */
138
- var Ht;
139
- function aa() {
140
- if (Ht)
141
- return ve;
142
- Ht = 1;
143
- var e = Lr, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
144
- function l(f, u, d) {
145
- var v, h = {}, p = null, $ = null;
146
- d !== void 0 && (p = "" + d), u.key !== void 0 && (p = "" + u.key), u.ref !== void 0 && ($ = u.ref);
147
- for (v in u)
148
- a.call(u, v) && !s.hasOwnProperty(v) && (h[v] = u[v]);
149
- if (f && f.defaultProps)
150
- for (v in u = f.defaultProps, u)
151
- h[v] === void 0 && (h[v] = u[v]);
152
- return { $$typeof: t, type: f, key: p, ref: $, props: h, _owner: o.current };
153
- }
154
- return ve.Fragment = r, ve.jsx = l, ve.jsxs = l, ve;
155
- }
156
- var be = {};
157
- /**
158
- * @license React
159
- * react-jsx-runtime.development.js
160
- *
161
- * Copyright (c) Facebook, Inc. and its affiliates.
162
- *
163
- * This source code is licensed under the MIT license found in the
164
- * LICENSE file in the root directory of this source tree.
165
- */
166
- var zt;
167
- function oa() {
168
- return zt || (zt = 1, process.env.NODE_ENV !== "production" && function() {
169
- var e = Lr, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), f = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), $ = Symbol.for("react.offscreen"), m = Symbol.iterator, x = "@@iterator";
170
- function S(n) {
171
- if (n === null || typeof n != "object")
172
- return null;
173
- var c = m && n[m] || n[x];
174
- return typeof c == "function" ? c : null;
175
- }
176
- var y = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
177
- function C(n) {
178
- {
179
- for (var c = arguments.length, g = new Array(c > 1 ? c - 1 : 0), _ = 1; _ < c; _++)
180
- g[_ - 1] = arguments[_];
181
- F("error", n, g);
182
- }
183
- }
184
- function F(n, c, g) {
185
- {
186
- var _ = y.ReactDebugCurrentFrame, E = _.getStackAddendum();
187
- E !== "" && (c += "%s", g = g.concat([E]));
188
- var O = g.map(function(A) {
189
- return String(A);
190
- });
191
- O.unshift("Warning: " + c), Function.prototype.apply.call(console[n], console, O);
192
- }
193
- }
194
- var L = !1, M = !1, X = !1, B = !1, H = !1, N;
195
- N = Symbol.for("react.module.reference");
196
- function z(n) {
197
- return !!(typeof n == "string" || typeof n == "function" || n === a || n === s || H || n === o || n === d || n === v || B || n === $ || L || M || X || typeof n == "object" && n !== null && (n.$$typeof === p || n.$$typeof === h || n.$$typeof === l || n.$$typeof === f || n.$$typeof === u || // This needs to include all possible module reference object
198
- // types supported by any Flight configuration anywhere since
199
- // we don't know which Flight build this will end up being used
200
- // with.
201
- n.$$typeof === N || n.getModuleId !== void 0));
202
- }
203
- function Y(n, c, g) {
204
- var _ = n.displayName;
205
- if (_)
206
- return _;
207
- var E = c.displayName || c.name || "";
208
- return E !== "" ? g + "(" + E + ")" : g;
209
- }
210
- function U(n) {
211
- return n.displayName || "Context";
212
- }
213
- function k(n) {
214
- if (n == null)
215
- return null;
216
- if (typeof n.tag == "number" && C("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof n == "function")
217
- return n.displayName || n.name || null;
218
- if (typeof n == "string")
219
- return n;
220
- switch (n) {
221
- case a:
222
- return "Fragment";
223
- case r:
224
- return "Portal";
225
- case s:
226
- return "Profiler";
227
- case o:
228
- return "StrictMode";
229
- case d:
230
- return "Suspense";
231
- case v:
232
- return "SuspenseList";
233
- }
234
- if (typeof n == "object")
235
- switch (n.$$typeof) {
236
- case f:
237
- var c = n;
238
- return U(c) + ".Consumer";
239
- case l:
240
- var g = n;
241
- return U(g._context) + ".Provider";
242
- case u:
243
- return Y(n, n.render, "ForwardRef");
244
- case h:
245
- var _ = n.displayName || null;
246
- return _ !== null ? _ : k(n.type) || "Memo";
247
- case p: {
248
- var E = n, O = E._payload, A = E._init;
249
- try {
250
- return k(A(O));
251
- } catch {
252
- return null;
253
- }
254
- }
255
- }
256
- return null;
257
- }
258
- var Z = Object.assign, te = 0, xe, Ct, wt, xt, Tt, At, St;
259
- function Et() {
260
- }
261
- Et.__reactDisabledLog = !0;
262
- function Tn() {
263
- {
264
- if (te === 0) {
265
- xe = console.log, Ct = console.info, wt = console.warn, xt = console.error, Tt = console.group, At = console.groupCollapsed, St = console.groupEnd;
266
- var n = {
267
- configurable: !0,
268
- enumerable: !0,
269
- value: Et,
270
- writable: !0
271
- };
272
- Object.defineProperties(console, {
273
- info: n,
274
- log: n,
275
- warn: n,
276
- error: n,
277
- group: n,
278
- groupCollapsed: n,
279
- groupEnd: n
280
- });
281
- }
282
- te++;
283
- }
284
- }
285
- function An() {
286
- {
287
- if (te--, te === 0) {
288
- var n = {
289
- configurable: !0,
290
- enumerable: !0,
291
- writable: !0
292
- };
293
- Object.defineProperties(console, {
294
- log: Z({}, n, {
295
- value: xe
296
- }),
297
- info: Z({}, n, {
298
- value: Ct
299
- }),
300
- warn: Z({}, n, {
301
- value: wt
302
- }),
303
- error: Z({}, n, {
304
- value: xt
305
- }),
306
- group: Z({}, n, {
307
- value: Tt
308
- }),
309
- groupCollapsed: Z({}, n, {
310
- value: At
311
- }),
312
- groupEnd: Z({}, n, {
313
- value: St
314
- })
315
- });
316
- }
317
- te < 0 && C("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
318
- }
319
- }
320
- var Ue = y.ReactCurrentDispatcher, Ke;
321
- function Te(n, c, g) {
322
- {
323
- if (Ke === void 0)
324
- try {
325
- throw Error();
326
- } catch (E) {
327
- var _ = E.stack.trim().match(/\n( *(at )?)/);
328
- Ke = _ && _[1] || "";
329
- }
330
- return `
331
- ` + Ke + n;
332
- }
333
- }
334
- var Ye = !1, Ae;
335
- {
336
- var Sn = typeof WeakMap == "function" ? WeakMap : Map;
337
- Ae = new Sn();
338
- }
339
- function Ot(n, c) {
340
- if (!n || Ye)
341
- return "";
342
- {
343
- var g = Ae.get(n);
344
- if (g !== void 0)
345
- return g;
346
- }
347
- var _;
348
- Ye = !0;
349
- var E = Error.prepareStackTrace;
350
- Error.prepareStackTrace = void 0;
351
- var O;
352
- O = Ue.current, Ue.current = null, Tn();
353
- try {
354
- if (c) {
355
- var A = function() {
356
- throw Error();
357
- };
358
- if (Object.defineProperty(A.prototype, "props", {
359
- set: function() {
360
- throw Error();
361
- }
362
- }), typeof Reflect == "object" && Reflect.construct) {
363
- try {
364
- Reflect.construct(A, []);
365
- } catch (q) {
366
- _ = q;
367
- }
368
- Reflect.construct(n, [], A);
369
- } else {
370
- try {
371
- A.call();
372
- } catch (q) {
373
- _ = q;
374
- }
375
- n.call(A.prototype);
376
- }
377
- } else {
378
- try {
379
- throw Error();
380
- } catch (q) {
381
- _ = q;
382
- }
383
- n();
384
- }
385
- } catch (q) {
386
- if (q && _ && typeof q.stack == "string") {
387
- for (var T = q.stack.split(`
388
- `), D = _.stack.split(`
389
- `), P = T.length - 1, R = D.length - 1; P >= 1 && R >= 0 && T[P] !== D[R]; )
390
- R--;
391
- for (; P >= 1 && R >= 0; P--, R--)
392
- if (T[P] !== D[R]) {
393
- if (P !== 1 || R !== 1)
394
- do
395
- if (P--, R--, R < 0 || T[P] !== D[R]) {
396
- var G = `
397
- ` + T[P].replace(" at new ", " at ");
398
- return n.displayName && G.includes("<anonymous>") && (G = G.replace("<anonymous>", n.displayName)), typeof n == "function" && Ae.set(n, G), G;
399
- }
400
- while (P >= 1 && R >= 0);
401
- break;
402
- }
403
- }
404
- } finally {
405
- Ye = !1, Ue.current = O, An(), Error.prepareStackTrace = E;
406
- }
407
- var oe = n ? n.displayName || n.name : "", Wt = oe ? Te(oe) : "";
408
- return typeof n == "function" && Ae.set(n, Wt), Wt;
409
- }
410
- function En(n, c, g) {
411
- return Ot(n, !1);
412
- }
413
- function On(n) {
414
- var c = n.prototype;
415
- return !!(c && c.isReactComponent);
416
- }
417
- function Se(n, c, g) {
418
- if (n == null)
419
- return "";
420
- if (typeof n == "function")
421
- return Ot(n, On(n));
422
- if (typeof n == "string")
423
- return Te(n);
424
- switch (n) {
425
- case d:
426
- return Te("Suspense");
427
- case v:
428
- return Te("SuspenseList");
429
- }
430
- if (typeof n == "object")
431
- switch (n.$$typeof) {
432
- case u:
433
- return En(n.render);
434
- case h:
435
- return Se(n.type, c, g);
436
- case p: {
437
- var _ = n, E = _._payload, O = _._init;
438
- try {
439
- return Se(O(E), c, g);
440
- } catch {
441
- }
442
- }
443
- }
444
- return "";
445
- }
446
- var Ee = Object.prototype.hasOwnProperty, It = {}, Pt = y.ReactDebugCurrentFrame;
447
- function Oe(n) {
448
- if (n) {
449
- var c = n._owner, g = Se(n.type, n._source, c ? c.type : null);
450
- Pt.setExtraStackFrame(g);
451
- } else
452
- Pt.setExtraStackFrame(null);
453
- }
454
- function In(n, c, g, _, E) {
455
- {
456
- var O = Function.call.bind(Ee);
457
- for (var A in n)
458
- if (O(n, A)) {
459
- var T = void 0;
460
- try {
461
- if (typeof n[A] != "function") {
462
- var D = Error((_ || "React class") + ": " + g + " type `" + A + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[A] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
463
- throw D.name = "Invariant Violation", D;
464
- }
465
- T = n[A](c, A, _, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
466
- } catch (P) {
467
- T = P;
468
- }
469
- T && !(T instanceof Error) && (Oe(E), C("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", _ || "React class", g, A, typeof T), Oe(null)), T instanceof Error && !(T.message in It) && (It[T.message] = !0, Oe(E), C("Failed %s type: %s", g, T.message), Oe(null));
470
- }
471
- }
472
- }
473
- var Pn = Array.isArray;
474
- function qe(n) {
475
- return Pn(n);
476
- }
477
- function Rn(n) {
478
- {
479
- var c = typeof Symbol == "function" && Symbol.toStringTag, g = c && n[Symbol.toStringTag] || n.constructor.name || "Object";
480
- return g;
481
- }
482
- }
483
- function Ln(n) {
484
- try {
485
- return Rt(n), !1;
486
- } catch {
487
- return !0;
488
- }
489
- }
490
- function Rt(n) {
491
- return "" + n;
492
- }
493
- function Lt(n) {
494
- if (Ln(n))
495
- return C("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Rn(n)), Rt(n);
496
- }
497
- var he = y.ReactCurrentOwner, jn = {
498
- key: !0,
499
- ref: !0,
500
- __self: !0,
501
- __source: !0
502
- }, jt, Mt, Ve;
503
- Ve = {};
504
- function Mn(n) {
505
- if (Ee.call(n, "ref")) {
506
- var c = Object.getOwnPropertyDescriptor(n, "ref").get;
507
- if (c && c.isReactWarning)
508
- return !1;
509
- }
510
- return n.ref !== void 0;
511
- }
512
- function kn(n) {
513
- if (Ee.call(n, "key")) {
514
- var c = Object.getOwnPropertyDescriptor(n, "key").get;
515
- if (c && c.isReactWarning)
516
- return !1;
517
- }
518
- return n.key !== void 0;
519
- }
520
- function Dn(n, c) {
521
- if (typeof n.ref == "string" && he.current && c && he.current.stateNode !== c) {
522
- var g = k(he.current.type);
523
- Ve[g] || (C('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', k(he.current.type), n.ref), Ve[g] = !0);
524
- }
525
- }
526
- function Fn(n, c) {
527
- {
528
- var g = function() {
529
- jt || (jt = !0, C("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
530
- };
531
- g.isReactWarning = !0, Object.defineProperty(n, "key", {
532
- get: g,
533
- configurable: !0
534
- });
535
- }
536
- }
537
- function Nn(n, c) {
538
- {
539
- var g = function() {
540
- Mt || (Mt = !0, C("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", c));
541
- };
542
- g.isReactWarning = !0, Object.defineProperty(n, "ref", {
543
- get: g,
544
- configurable: !0
545
- });
546
- }
547
- }
548
- var Bn = function(n, c, g, _, E, O, A) {
549
- var T = {
550
- // This tag allows us to uniquely identify this as a React Element
551
- $$typeof: t,
552
- // Built-in properties that belong on the element
553
- type: n,
554
- key: c,
555
- ref: g,
556
- props: A,
557
- // Record the component responsible for creating this element.
558
- _owner: O
559
- };
560
- return T._store = {}, Object.defineProperty(T._store, "validated", {
561
- configurable: !1,
562
- enumerable: !1,
563
- writable: !0,
564
- value: !1
565
- }), Object.defineProperty(T, "_self", {
566
- configurable: !1,
567
- enumerable: !1,
568
- writable: !1,
569
- value: _
570
- }), Object.defineProperty(T, "_source", {
571
- configurable: !1,
572
- enumerable: !1,
573
- writable: !1,
574
- value: E
575
- }), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
576
- };
577
- function Gn(n, c, g, _, E) {
578
- {
579
- var O, A = {}, T = null, D = null;
580
- g !== void 0 && (Lt(g), T = "" + g), kn(c) && (Lt(c.key), T = "" + c.key), Mn(c) && (D = c.ref, Dn(c, E));
581
- for (O in c)
582
- Ee.call(c, O) && !jn.hasOwnProperty(O) && (A[O] = c[O]);
583
- if (n && n.defaultProps) {
584
- var P = n.defaultProps;
585
- for (O in P)
586
- A[O] === void 0 && (A[O] = P[O]);
587
- }
588
- if (T || D) {
589
- var R = typeof n == "function" ? n.displayName || n.name || "Unknown" : n;
590
- T && Fn(A, R), D && Nn(A, R);
591
- }
592
- return Bn(n, T, D, E, _, he.current, A);
593
- }
594
- }
595
- var Je = y.ReactCurrentOwner, kt = y.ReactDebugCurrentFrame;
596
- function ae(n) {
597
- if (n) {
598
- var c = n._owner, g = Se(n.type, n._source, c ? c.type : null);
599
- kt.setExtraStackFrame(g);
600
- } else
601
- kt.setExtraStackFrame(null);
602
- }
603
- var Xe;
604
- Xe = !1;
605
- function Ze(n) {
606
- return typeof n == "object" && n !== null && n.$$typeof === t;
607
- }
608
- function Dt() {
609
- {
610
- if (Je.current) {
611
- var n = k(Je.current.type);
612
- if (n)
613
- return `
614
-
615
- Check the render method of \`` + n + "`.";
616
- }
617
- return "";
618
- }
619
- }
620
- function Wn(n) {
621
- {
622
- if (n !== void 0) {
623
- var c = n.fileName.replace(/^.*[\\\/]/, ""), g = n.lineNumber;
624
- return `
625
-
626
- Check your code at ` + c + ":" + g + ".";
627
- }
628
- return "";
629
- }
630
- }
631
- var Ft = {};
632
- function Hn(n) {
633
- {
634
- var c = Dt();
635
- if (!c) {
636
- var g = typeof n == "string" ? n : n.displayName || n.name;
637
- g && (c = `
638
-
639
- Check the top-level render call using <` + g + ">.");
640
- }
641
- return c;
642
- }
643
- }
644
- function Nt(n, c) {
645
- {
646
- if (!n._store || n._store.validated || n.key != null)
647
- return;
648
- n._store.validated = !0;
649
- var g = Hn(c);
650
- if (Ft[g])
651
- return;
652
- Ft[g] = !0;
653
- var _ = "";
654
- n && n._owner && n._owner !== Je.current && (_ = " It was passed a child from " + k(n._owner.type) + "."), ae(n), C('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, _), ae(null);
655
- }
656
- }
657
- function Bt(n, c) {
658
- {
659
- if (typeof n != "object")
660
- return;
661
- if (qe(n))
662
- for (var g = 0; g < n.length; g++) {
663
- var _ = n[g];
664
- Ze(_) && Nt(_, c);
665
- }
666
- else if (Ze(n))
667
- n._store && (n._store.validated = !0);
668
- else if (n) {
669
- var E = S(n);
670
- if (typeof E == "function" && E !== n.entries)
671
- for (var O = E.call(n), A; !(A = O.next()).done; )
672
- Ze(A.value) && Nt(A.value, c);
673
- }
674
- }
675
- }
676
- function zn(n) {
677
- {
678
- var c = n.type;
679
- if (c == null || typeof c == "string")
680
- return;
681
- var g;
682
- if (typeof c == "function")
683
- g = c.propTypes;
684
- else if (typeof c == "object" && (c.$$typeof === u || // Note: Memo only checks outer props here.
685
- // Inner props are checked in the reconciler.
686
- c.$$typeof === h))
687
- g = c.propTypes;
688
- else
689
- return;
690
- if (g) {
691
- var _ = k(c);
692
- In(g, n.props, "prop", _, n);
693
- } else if (c.PropTypes !== void 0 && !Xe) {
694
- Xe = !0;
695
- var E = k(c);
696
- C("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", E || "Unknown");
697
- }
698
- typeof c.getDefaultProps == "function" && !c.getDefaultProps.isReactClassApproved && C("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
699
- }
700
- }
701
- function Un(n) {
702
- {
703
- for (var c = Object.keys(n.props), g = 0; g < c.length; g++) {
704
- var _ = c[g];
705
- if (_ !== "children" && _ !== "key") {
706
- ae(n), C("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", _), ae(null);
707
- break;
708
- }
709
- }
710
- n.ref !== null && (ae(n), C("Invalid attribute `ref` supplied to `React.Fragment`."), ae(null));
711
- }
712
- }
713
- function Gt(n, c, g, _, E, O) {
714
- {
715
- var A = z(n);
716
- if (!A) {
717
- var T = "";
718
- (n === void 0 || typeof n == "object" && n !== null && Object.keys(n).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
719
- var D = Wn(E);
720
- D ? T += D : T += Dt();
721
- var P;
722
- n === null ? P = "null" : qe(n) ? P = "array" : n !== void 0 && n.$$typeof === t ? (P = "<" + (k(n.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : P = typeof n, C("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", P, T);
723
- }
724
- var R = Gn(n, c, g, E, O);
725
- if (R == null)
726
- return R;
727
- if (A) {
728
- var G = c.children;
729
- if (G !== void 0)
730
- if (_)
731
- if (qe(G)) {
732
- for (var oe = 0; oe < G.length; oe++)
733
- Bt(G[oe], n);
734
- Object.freeze && Object.freeze(G);
735
- } else
736
- C("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
737
- else
738
- Bt(G, n);
739
- }
740
- return n === a ? Un(R) : zn(R), R;
741
- }
742
- }
743
- function Kn(n, c, g) {
744
- return Gt(n, c, g, !0);
745
- }
746
- function Yn(n, c, g) {
747
- return Gt(n, c, g, !1);
748
- }
749
- var qn = Yn, Vn = Kn;
750
- be.Fragment = a, be.jsx = qn, be.jsxs = Vn;
751
- }()), be;
752
- }
753
- (function(e) {
754
- process.env.NODE_ENV === "production" ? e.exports = aa() : e.exports = oa();
755
- })(na);
756
- const ee = _e.Fragment, i = _e.jsx, w = _e.jsxs, Q = [
757
- { band: "u", range: [338, 395] },
758
- { range: [396, 404] },
759
- { band: "g", range: [405, 552] },
760
- { band: "r", range: [553, 690] },
761
- { band: "i", range: [690, 817] },
762
- { band: "z", range: [818, 920] },
763
- { band: "y", range: [920, 1010] }
764
- ], ia = [
765
- { offset: 0, stopColor: "#e0e0e0" },
766
- { offset: 0.262, stopColor: "#dedde0" },
767
- { offset: 0.41, stopColor: "#dbd5e1" },
768
- { offset: 0.53, stopColor: "#d4c7e3" },
769
- { offset: 0.635, stopColor: "#cbb3e6" },
770
- { offset: 0.73, stopColor: "#bf9aeb" },
771
- { offset: 0.818, stopColor: "#b17af0" },
772
- { offset: 0.9, stopColor: "#a055f5" },
773
- { offset: 0.976, stopColor: "#8c2afc" },
774
- { offset: 1, stopColor: "#861cff" }
775
- ], sa = [
776
- { offset: 0, stopColor: "#861cff" },
777
- { offset: 0.253, stopColor: "blue" },
778
- { offset: 0.266, stopColor: "#001ee0" },
779
- { offset: 0.302, stopColor: "#006d91" },
780
- { offset: 0.334, stopColor: "#00ab53" },
781
- { offset: 0.361, stopColor: "#00d826" },
782
- { offset: 0.382, stopColor: "#00f40a" },
783
- { offset: 0.394, stopColor: "lime" },
784
- { offset: 0.409, stopColor: "#05fe00" },
785
- { offset: 0.427, stopColor: "#14fc01" },
786
- { offset: 0.447, stopColor: "#2df803" },
787
- { offset: 0.468, stopColor: "#50f406" },
788
- { offset: 0.49, stopColor: "#7cee0a" },
789
- { offset: 0.513, stopColor: "#b3e70e" },
790
- { offset: 0.536, stopColor: "#f2de14" },
791
- { offset: 0.54, stopColor: "#ffdd15" },
792
- { offset: 0.559, stopColor: "#fccb17" },
793
- { offset: 0.598, stopColor: "#f49f1e" },
794
- { offset: 0.615, stopColor: "#f18922" },
795
- { offset: 0.634, stopColor: "#f08220" },
796
- { offset: 0.66, stopColor: "#f0711c" },
797
- { offset: 0.69, stopColor: "#ef5415" },
798
- { offset: 0.723, stopColor: "#ed2d0b" },
799
- { offset: 0.755, stopColor: "#ec0000" }
800
- ], la = [
801
- { offset: 0, stopColor: "#ec0000" },
802
- { offset: 0.387, stopColor: "#ea0e0e" },
803
- { offset: 0.526, stopColor: "#e53737" },
804
- { offset: 0.625, stopColor: "#e15d5d" },
805
- { offset: 0.705, stopColor: "#dd7d7d" },
806
- { offset: 0.774, stopColor: "#da9898" },
807
- { offset: 0.835, stopColor: "#d8aeae" },
808
- { offset: 0.89, stopColor: "#d6bfbf" },
809
- { offset: 0.941, stopColor: "#d4cbcb" },
810
- { offset: 0.986, stopColor: "#d4d2d2" },
811
- { offset: 1, stopColor: "#d4d4d4" }
812
- ], ca = [
813
- { name: "violet", color: "#861CFF", range: [380, 450] },
814
- { name: "blue", color: "#0000FF", range: [450, 495] },
815
- { name: "green", color: "#00FF00", range: [495, 570] },
816
- { name: "yellow", color: "#FFDD15", range: [570, 590] },
817
- { name: "orange", color: "#F18922", range: [590, 620] },
818
- { name: "red", color: "#EC0000", range: [620, 750] }
819
- ], Pe = [
820
- { name: "ultraviolet", upper: 400, stops: ia },
821
- { name: "visible", upper: 750, lower: 400, stops: sa, colors: ca },
822
- { name: "infrared", lower: 750, stops: la }
823
- ], Ut = 255, Kt = 322, Re = 1084, fa = {
824
- condensed: {
825
- min: Kt,
826
- max: Re,
827
- range: Re - Kt
828
- },
829
- default: {
830
- min: Ut,
831
- max: Re,
832
- range: Re - Ut
833
- }
834
- }, da = b.div`
835
- display: grid;
836
- grid-template-columns: 1fr;
837
- grid-auto-rows: min-content;
838
- text-align: center;
839
- position: relative;
840
- `, ua = b.table`
841
- border-collapse: collapse;
842
- text-align: center;
843
- ${({ range: e, offset: t }) => j`
844
- margin-left: ${t.toFixed(2)}%;
845
- width: ${e.toFixed(2)}%;
846
- `}
847
- `, pa = b.tbody`
848
- display: table-header-group;
849
- `, ga = b.thead`
850
- display: table-row-group;
851
- `, ha = b.td`
852
- line-height: 1.2;
853
- font-size: 80%;
854
- `, va = b.span`
855
- font-size: 80%;
856
- `, ba = b.th`
857
- font-size: 120%;
858
- font-weight: var(--FONT_WEIGHT_NORMAL, 400);
859
-
860
- ${({ band: e, isCondensed: t }) => j`
861
- border: ${e ? "solid #b2b2b2" : "none"};
862
- border-width: ${t ? "1px" : "3px"};
863
- `};
864
- `, ya = b.div`
865
- min-width: 20ch;
866
- width: 50%;
867
- max-width: 30ch;
868
- margin-block-start: 1em;
869
- justify-self: center;
870
- text-align: left;
871
- `, ma = b.label`
872
- font-size: 0.75em;
873
- `, _a = b.text`
874
- font-size: 0.75em;
875
- `, $a = b.tspan`
876
- font-size: 0.75em;
877
- `, Ca = b.tspan`
878
- font-size: 0.5em;
879
- `, wa = b.tspan`
880
- font-size: 0.4em;
881
- `, xa = b.ul`
882
- display: flex;
883
- justify-content: space-between;
884
- line-height: 1.2;
885
- font-size: 80%;
886
- margin: 0;
887
- padding: 0;
888
- list-style-type: none;
889
- `, Ta = b.li`
890
- list-style-type: none;
891
- margin: 0;
892
- padding: 0;
893
-
894
- &:before {
895
- content: "\200B";
896
- }
897
- `, jr = ({
898
- filters: e,
899
- min: t,
900
- spectrumRange: r
901
- }) => {
902
- const a = dt(null), o = a.current ? Array.from(a.current.children) : null;
903
- return /* @__PURE__ */ w(ee, { children: [
904
- /* @__PURE__ */ i(xa, { ref: a, "data-testid": "condensed-filters", children: e.map(({ range: s, band: l }) => /* @__PURE__ */ w(Ta, { "aria-labelledby": `${l}-name`, children: [
905
- s.join("–"),
906
- /* @__PURE__ */ i("br", {}),
907
- "nm"
908
- ] }, l)) }),
909
- o && /* @__PURE__ */ i(
910
- "svg",
911
- {
912
- xmlns: "http://www.w3.org/2000/svg",
913
- preserveAspectRatio: "xMinYMin meet",
914
- viewBox: `${t} 0 ${r} 50`,
915
- role: "presentation",
916
- "aria-hidden": "true",
917
- children: /* @__PURE__ */ i("g", { role: "presentation", children: e.map(({ range: s, band: l }, f) => {
918
- const u = o[f], { offsetLeft: d, offsetWidth: v, offsetParent: h } = u, { offsetWidth: p } = h, $ = r / p, m = (s[0] + s[1]) / 2, x = (d + v / 2) * $;
919
- return /* @__PURE__ */ w("g", { children: [
920
- /* @__PURE__ */ i(
921
- "line",
922
- {
923
- strokeWidth: 1,
924
- stroke: "#b2b2b2",
925
- x1: m,
926
- x2: m,
927
- y1: "100%",
928
- y2: "75%",
929
- role: "presentation"
930
- }
931
- ),
932
- /* @__PURE__ */ i(
933
- "line",
934
- {
935
- strokeWidth: 1,
936
- stroke: "#b2b2b2",
937
- x1: m,
938
- x2: x + t,
939
- y1: "75%",
940
- y2: "0%",
941
- role: "presentation"
942
- }
943
- )
944
- ] }, l);
945
- }) })
946
- }
947
- )
948
- ] });
949
- };
950
- jr.displayName = "Widgets.CameraFilter.CondensedFilterRanges";
951
- const Aa = (e, t) => {
952
- switch (!0) {
953
- case e > t:
954
- return 0;
955
- case e < 0:
956
- return t;
957
- default:
958
- return e;
959
- }
960
- }, Sa = (e, t, r) => e >= t && e <= r, Mr = (e = [], t = []) => {
961
- const r = e[0] < t[0] ? e : t, a = r === e ? t : e;
962
- return r[1] < a[0] ? null : [a[0], r[1] < a[1] ? r[1] : a[1]];
963
- }, kr = ({
964
- colors: e,
965
- activeRange: t,
966
- isBandSelected: r,
967
- isCondensed: a
968
- }) => {
969
- const o = a ? 350 : e[0].range[0], l = (a ? 1e3 : 820) - o, f = Math.floor(l / (e.length - 1));
970
- return /* @__PURE__ */ i("g", { role: "list", "data-testid": "color-labels", children: e.map(({ name: u, range: d, color: v }, h) => {
971
- const p = o + f * h, $ = r && Mr(d, t) === null, m = (d[0] + d[1]) / 2;
972
- return /* @__PURE__ */ w("g", { children: [
973
- /* @__PURE__ */ i(
974
- "line",
975
- {
976
- strokeWidth: 1,
977
- stroke: "#b2b2b2",
978
- x1: m,
979
- x2: m,
980
- y1: "50%",
981
- y2: a ? "52.5%" : "55%",
982
- role: "presentation"
983
- }
984
- ),
985
- /* @__PURE__ */ i(
986
- "line",
987
- {
988
- strokeWidth: 1,
989
- stroke: "#b2b2b2",
990
- x1: m,
991
- x2: p,
992
- y1: a ? "52.5%" : "55%",
993
- y2: a ? "72.5%" : "70%",
994
- role: "presentation"
995
- }
996
- ),
997
- /* @__PURE__ */ i(
998
- "circle",
999
- {
1000
- cx: p,
1001
- cy: a ? "72.5%" : "70%",
1002
- r: a ? 15 : 10,
1003
- fill: v,
1004
- role: "presentation"
1005
- }
1006
- ),
1007
- /* @__PURE__ */ w(
1008
- "text",
1009
- {
1010
- x: p,
1011
- dominantBaseline: "middle",
1012
- textAnchor: "middle",
1013
- y: "75%",
1014
- role: "listitem",
1015
- "aria-hidden": $,
1016
- children: [
1017
- /* @__PURE__ */ i(
1018
- $a,
1019
- {
1020
- x: p,
1021
- dy: "1.25em",
1022
- textAnchor: "middle",
1023
- children: u
1024
- }
1025
- ),
1026
- /* @__PURE__ */ i(
1027
- Ca,
1028
- {
1029
- x: p,
1030
- dy: "1.25em",
1031
- textAnchor: "middle",
1032
- children: d.join("–")
1033
- }
1034
- ),
1035
- /* @__PURE__ */ i(
1036
- wa,
1037
- {
1038
- x: p,
1039
- dy: "1.25em",
1040
- textAnchor: "middle",
1041
- children: "nm"
1042
- }
1043
- )
1044
- ]
1045
- }
1046
- )
1047
- ] }, u);
1048
- }) });
1049
- };
1050
- kr.displayName = "Widgets.CameraFilter.ColorLabels";
1051
- const Dr = ({
1052
- spectrums: e,
1053
- activeBand: t,
1054
- min: r,
1055
- max: a,
1056
- activeMin: o = 0,
1057
- activeMax: s = 0,
1058
- isCondensed: l
1059
- }) => {
1060
- const { t: f } = ne(), u = f("camera_filter.labels.captured_range", {
1061
- context: t ? "" : "no_filter",
1062
- filter: t
1063
- });
1064
- return /* @__PURE__ */ i(
1065
- "g",
1066
- {
1067
- role: "list",
1068
- "aria-label": u,
1069
- "aria-live": "polite",
1070
- "data-testid": "spectrum-labels",
1071
- children: e.map(({ name: d, upper: v, lower: h, colors: p }) => {
1072
- const $ = v || a, m = h || r, x = t && Mr([m, $], [o, s]) === null;
1073
- return /* @__PURE__ */ w("g", { role: "listitem", "aria-hidden": x, children: [
1074
- /* @__PURE__ */ i(
1075
- _a,
1076
- {
1077
- x: ($ - m) / 2 + m,
1078
- y: "25%",
1079
- dominantBaseline: "middle",
1080
- textAnchor: "middle",
1081
- children: f(`camera_filter.labels.${d}`)
1082
- },
1083
- d
1084
- ),
1085
- p && /* @__PURE__ */ i(
1086
- kr,
1087
- {
1088
- colors: p,
1089
- isBandSelected: !!t,
1090
- activeRange: [o, s],
1091
- isCondensed: l
1092
- }
1093
- )
1094
- ] }, d);
1095
- })
1096
- }
1097
- );
1098
- };
1099
- Dr.displayName = "Widgets.CameraFilter.SpectrumLabels";
1100
- const Fr = ({
1101
- min: e,
1102
- max: t,
1103
- range: r,
1104
- isCondensed: a,
1105
- activeFilter: o
1106
- }) => /* @__PURE__ */ w(
1107
- "svg",
1108
- {
1109
- xmlns: "http://www.w3.org/2000/svg",
1110
- preserveAspectRatio: "xMinYMin meet",
1111
- viewBox: `${e} 0 ${r} 200`,
1112
- "data-testid": "spectrum-display",
1113
- children: [
1114
- /* @__PURE__ */ w("defs", { children: [
1115
- Pe.map(({ name: s, stops: l }) => /* @__PURE__ */ i("linearGradient", { id: `${s}-gradient`, children: l.map(({ offset: f, stopColor: u, id: d }) => /* @__PURE__ */ i(
1116
- "stop",
1117
- {
1118
- offset: f,
1119
- stopColor: u,
1120
- id: d
1121
- },
1122
- `${f}-${u}`
1123
- )) }, s)),
1124
- /* @__PURE__ */ w("mask", { id: "spectrumMask", children: [
1125
- /* @__PURE__ */ i("rect", { width: "100%", height: "50%", fill: "white", x: e }),
1126
- o && /* @__PURE__ */ w(ee, { children: [
1127
- /* @__PURE__ */ i(
1128
- "rect",
1129
- {
1130
- x: e,
1131
- width: o.range[0] - e,
1132
- height: "100%",
1133
- fill: "black"
1134
- }
1135
- ),
1136
- /* @__PURE__ */ i(
1137
- "rect",
1138
- {
1139
- x: o.range[1],
1140
- width: t - o.range[1],
1141
- height: "100%",
1142
- fill: "black"
1143
- }
1144
- )
1145
- ] })
1146
- ] })
1147
- ] }),
1148
- /* @__PURE__ */ i("g", { mask: "url(#spectrumMask)", role: "presentation", children: Pe.map(({ name: s, upper: l, lower: f }) => /* @__PURE__ */ i(
1149
- "rect",
1150
- {
1151
- width: (l || t) - (f || e),
1152
- height: "50%",
1153
- fill: `url(#${s}-gradient)`,
1154
- x: f || e,
1155
- role: "presentation"
1156
- },
1157
- s
1158
- )) }),
1159
- /* @__PURE__ */ i("g", { children: Pe.map(
1160
- ({ name: s, upper: l }) => l && /* @__PURE__ */ i(
1161
- "line",
1162
- {
1163
- strokeWidth: 2,
1164
- strokeDasharray: "8 8",
1165
- stroke: o && !Sa(l, o.range[0], o.range[1]) ? "#000" : "#fff",
1166
- x1: l,
1167
- x2: l,
1168
- y1: 0,
1169
- y2: "50%"
1170
- },
1171
- s
1172
- )
1173
- ) }),
1174
- /* @__PURE__ */ i(
1175
- Dr,
1176
- {
1177
- spectrums: Pe,
1178
- activeBand: o == null ? void 0 : o.band,
1179
- min: e,
1180
- max: t,
1181
- activeMin: o == null ? void 0 : o.range[0],
1182
- activeMax: o == null ? void 0 : o.range[1],
1183
- isCondensed: a
1184
- }
1185
- )
1186
- ]
1187
- }
1188
- );
1189
- Fr.displayName = "Widgets.CameraFilter.SpectrumDisplay";
1190
- const Ea = () => {
1191
- const { t: e } = ne(), { ref: t, width: r = 1 } = ut(), [a, o] = W(null), { BREAK_TABLET: s } = Ir, l = r < parseInt(s), {
1192
- [l ? "condensed" : "default"]: { min: f, max: u, range: d }
1193
- } = fa, v = Q[0].range[0], p = Q[Q.length - 1].range[1] - v, $ = Q.filter(({ band: y }) => y), x = [{
1194
- value: "none",
1195
- label: e("camera_filter.labels.option", { context: "none" })
1196
- }].concat(
1197
- $.map(({ band: y }) => ({
1198
- value: y,
1199
- label: e("camera_filter.labels.option", { band: y })
1200
- }))
1201
- ), S = Q.find(({ band: y }) => y === a);
1202
- return /* @__PURE__ */ w(da, { ref: t, children: [
1203
- /* @__PURE__ */ i("h1", { children: e("camera_filter.title") }),
1204
- l && /* @__PURE__ */ i(
1205
- jr,
1206
- {
1207
- filters: $,
1208
- min: f,
1209
- spectrumRange: d
1210
- }
1211
- ),
1212
- /* @__PURE__ */ w(
1213
- ua,
1214
- {
1215
- "aria-hidden": l,
1216
- range: p / d * 100,
1217
- offset: (v - f) / d * 100,
1218
- "data-testid": "expanded-filters",
1219
- children: [
1220
- /* @__PURE__ */ i("colgroup", { children: Q.map(({ range: y }) => /* @__PURE__ */ i(
1221
- "col",
1222
- {
1223
- style: {
1224
- width: `${(y[1] - y[0]) / p * 100}%`
1225
- }
1226
- },
1227
- y.join("")
1228
- )) }),
1229
- /* @__PURE__ */ i(ga, { children: /* @__PURE__ */ i("tr", { children: Q.map(({ band: y }) => /* @__PURE__ */ i(
1230
- ba,
1231
- {
1232
- id: `${y}-name`,
1233
- band: y,
1234
- scope: "col",
1235
- "aria-hidden": !y,
1236
- isCondensed: l,
1237
- children: y
1238
- },
1239
- y
1240
- )) }) }),
1241
- !l && /* @__PURE__ */ i(pa, { children: /* @__PURE__ */ i("tr", { children: Q.map(({ band: y, range: C }) => /* @__PURE__ */ i(ha, { "aria-hidden": !y, children: y && /* @__PURE__ */ w(ee, { children: [
1242
- C.join("–"),
1243
- /* @__PURE__ */ i("br", {}),
1244
- /* @__PURE__ */ i(va, { children: "nm" })
1245
- ] }) }, C.join())) }) })
1246
- ]
1247
- }
1248
- ),
1249
- /* @__PURE__ */ i(
1250
- Fr,
1251
- {
1252
- min: f,
1253
- max: u,
1254
- range: d,
1255
- isCondensed: l,
1256
- activeFilter: S
1257
- }
1258
- ),
1259
- /* @__PURE__ */ w(ya, { children: [
1260
- /* @__PURE__ */ i(ma, { id: "filterSelectLabel", children: e("camera_filter.labels.select") }),
1261
- /* @__PURE__ */ i(
1262
- ft,
1263
- {
1264
- options: x,
1265
- value: a,
1266
- onChangeCallback: (y) => o(y),
1267
- width: "100%",
1268
- maxWidth: "100%",
1269
- labelledById: "filterSelectLabel"
1270
- }
1271
- )
1272
- ] })
1273
- ] });
1274
- };
1275
- Ea.displayName = "Widgets.CameraFilter";
1276
- function Oa(e, t) {
1277
- for (var r = -1, a = t.length, o = e.length; ++r < a; )
1278
- e[o + r] = t[r];
1279
- return e;
1280
- }
1281
- var Nr = Oa, Ia = typeof Ie == "object" && Ie && Ie.Object === Object && Ie, Br = Ia, Pa = Br, Ra = typeof self == "object" && self && self.Object === Object && self, La = Pa || Ra || Function("return this")(), J = La, ja = J, Ma = ja.Symbol, $e = Ma, Yt = $e, Gr = Object.prototype, ka = Gr.hasOwnProperty, Da = Gr.toString, ye = Yt ? Yt.toStringTag : void 0;
1282
- function Fa(e) {
1283
- var t = ka.call(e, ye), r = e[ye];
1284
- try {
1285
- e[ye] = void 0;
1286
- var a = !0;
1287
- } catch {
1288
- }
1289
- var o = Da.call(e);
1290
- return a && (t ? e[ye] = r : delete e[ye]), o;
1291
- }
1292
- var Na = Fa, Ba = Object.prototype, Ga = Ba.toString;
1293
- function Wa(e) {
1294
- return Ga.call(e);
1295
- }
1296
- var Ha = Wa, qt = $e, za = Na, Ua = Ha, Ka = "[object Null]", Ya = "[object Undefined]", Vt = qt ? qt.toStringTag : void 0;
1297
- function qa(e) {
1298
- return e == null ? e === void 0 ? Ya : Ka : Vt && Vt in Object(e) ? za(e) : Ua(e);
1299
- }
1300
- var Ce = qa;
1301
- function Va(e) {
1302
- return e != null && typeof e == "object";
1303
- }
1304
- var we = Va, Ja = Ce, Xa = we, Za = "[object Arguments]";
1305
- function Qa(e) {
1306
- return Xa(e) && Ja(e) == Za;
1307
- }
1308
- var eo = Qa, Jt = eo, to = we, Wr = Object.prototype, ro = Wr.hasOwnProperty, no = Wr.propertyIsEnumerable, ao = Jt(function() {
1309
- return arguments;
1310
- }()) ? Jt : function(e) {
1311
- return to(e) && ro.call(e, "callee") && !no.call(e, "callee");
1312
- }, De = ao, oo = Array.isArray, K = oo, Xt = $e, io = De, so = K, Zt = Xt ? Xt.isConcatSpreadable : void 0;
1313
- function lo(e) {
1314
- return so(e) || io(e) || !!(Zt && e && e[Zt]);
1315
- }
1316
- var co = lo, fo = Nr, uo = co;
1317
- function Hr(e, t, r, a, o) {
1318
- var s = -1, l = e.length;
1319
- for (r || (r = uo), o || (o = []); ++s < l; ) {
1320
- var f = e[s];
1321
- t > 0 && r(f) ? t > 1 ? Hr(f, t - 1, r, a, o) : fo(o, f) : a || (o[o.length] = f);
1322
- }
1323
- return o;
1324
- }
1325
- var po = Hr, go = po, ho = 1 / 0;
1326
- function vo(e) {
1327
- var t = e == null ? 0 : e.length;
1328
- return t ? go(e, ho) : [];
1329
- }
1330
- var bo = vo;
1331
- function yo() {
1332
- this.__data__ = [], this.size = 0;
1333
- }
1334
- var mo = yo;
1335
- function _o(e, t) {
1336
- return e === t || e !== e && t !== t;
1337
- }
1338
- var zr = _o, $o = zr;
1339
- function Co(e, t) {
1340
- for (var r = e.length; r--; )
1341
- if ($o(e[r][0], t))
1342
- return r;
1343
- return -1;
1344
- }
1345
- var Fe = Co, wo = Fe, xo = Array.prototype, To = xo.splice;
1346
- function Ao(e) {
1347
- var t = this.__data__, r = wo(t, e);
1348
- if (r < 0)
1349
- return !1;
1350
- var a = t.length - 1;
1351
- return r == a ? t.pop() : To.call(t, r, 1), --this.size, !0;
1352
- }
1353
- var So = Ao, Eo = Fe;
1354
- function Oo(e) {
1355
- var t = this.__data__, r = Eo(t, e);
1356
- return r < 0 ? void 0 : t[r][1];
1357
- }
1358
- var Io = Oo, Po = Fe;
1359
- function Ro(e) {
1360
- return Po(this.__data__, e) > -1;
1361
- }
1362
- var Lo = Ro, jo = Fe;
1363
- function Mo(e, t) {
1364
- var r = this.__data__, a = jo(r, e);
1365
- return a < 0 ? (++this.size, r.push([e, t])) : r[a][1] = t, this;
1366
- }
1367
- var ko = Mo, Do = mo, Fo = So, No = Io, Bo = Lo, Go = ko;
1368
- function ce(e) {
1369
- var t = -1, r = e == null ? 0 : e.length;
1370
- for (this.clear(); ++t < r; ) {
1371
- var a = e[t];
1372
- this.set(a[0], a[1]);
1373
- }
1374
- }
1375
- ce.prototype.clear = Do;
1376
- ce.prototype.delete = Fo;
1377
- ce.prototype.get = No;
1378
- ce.prototype.has = Bo;
1379
- ce.prototype.set = Go;
1380
- var Ne = ce, Wo = Ne;
1381
- function Ho() {
1382
- this.__data__ = new Wo(), this.size = 0;
1383
- }
1384
- var zo = Ho;
1385
- function Uo(e) {
1386
- var t = this.__data__, r = t.delete(e);
1387
- return this.size = t.size, r;
1388
- }
1389
- var Ko = Uo;
1390
- function Yo(e) {
1391
- return this.__data__.get(e);
1392
- }
1393
- var qo = Yo;
1394
- function Vo(e) {
1395
- return this.__data__.has(e);
1396
- }
1397
- var Jo = Vo;
1398
- function Xo(e) {
1399
- var t = typeof e;
1400
- return e != null && (t == "object" || t == "function");
1401
- }
1402
- var Be = Xo, Zo = Ce, Qo = Be, ei = "[object AsyncFunction]", ti = "[object Function]", ri = "[object GeneratorFunction]", ni = "[object Proxy]";
1403
- function ai(e) {
1404
- if (!Qo(e))
1405
- return !1;
1406
- var t = Zo(e);
1407
- return t == ti || t == ri || t == ei || t == ni;
1408
- }
1409
- var Ur = ai, oi = J, ii = oi["__core-js_shared__"], si = ii, Qe = si, Qt = function() {
1410
- var e = /[^.]+$/.exec(Qe && Qe.keys && Qe.keys.IE_PROTO || "");
1411
- return e ? "Symbol(src)_1." + e : "";
1412
- }();
1413
- function li(e) {
1414
- return !!Qt && Qt in e;
1415
- }
1416
- var ci = li, fi = Function.prototype, di = fi.toString;
1417
- function ui(e) {
1418
- if (e != null) {
1419
- try {
1420
- return di.call(e);
1421
- } catch {
1422
- }
1423
- try {
1424
- return e + "";
1425
- } catch {
1426
- }
1427
- }
1428
- return "";
1429
- }
1430
- var Kr = ui, pi = Ur, gi = ci, hi = Be, vi = Kr, bi = /[\\^$.*+?()[\]{}|]/g, yi = /^\[object .+?Constructor\]$/, mi = Function.prototype, _i = Object.prototype, $i = mi.toString, Ci = _i.hasOwnProperty, wi = RegExp(
1431
- "^" + $i.call(Ci).replace(bi, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
1432
- );
1433
- function xi(e) {
1434
- if (!hi(e) || gi(e))
1435
- return !1;
1436
- var t = pi(e) ? wi : yi;
1437
- return t.test(vi(e));
1438
- }
1439
- var Ti = xi;
1440
- function Ai(e, t) {
1441
- return e == null ? void 0 : e[t];
1442
- }
1443
- var Si = Ai, Ei = Ti, Oi = Si;
1444
- function Ii(e, t) {
1445
- var r = Oi(e, t);
1446
- return Ei(r) ? r : void 0;
1447
- }
1448
- var fe = Ii, Pi = fe, Ri = J, Li = Pi(Ri, "Map"), pt = Li, ji = fe, Mi = ji(Object, "create"), Ge = Mi, er = Ge;
1449
- function ki() {
1450
- this.__data__ = er ? er(null) : {}, this.size = 0;
1451
- }
1452
- var Di = ki;
1453
- function Fi(e) {
1454
- var t = this.has(e) && delete this.__data__[e];
1455
- return this.size -= t ? 1 : 0, t;
1456
- }
1457
- var Ni = Fi, Bi = Ge, Gi = "__lodash_hash_undefined__", Wi = Object.prototype, Hi = Wi.hasOwnProperty;
1458
- function zi(e) {
1459
- var t = this.__data__;
1460
- if (Bi) {
1461
- var r = t[e];
1462
- return r === Gi ? void 0 : r;
1463
- }
1464
- return Hi.call(t, e) ? t[e] : void 0;
1465
- }
1466
- var Ui = zi, Ki = Ge, Yi = Object.prototype, qi = Yi.hasOwnProperty;
1467
- function Vi(e) {
1468
- var t = this.__data__;
1469
- return Ki ? t[e] !== void 0 : qi.call(t, e);
1470
- }
1471
- var Ji = Vi, Xi = Ge, Zi = "__lodash_hash_undefined__";
1472
- function Qi(e, t) {
1473
- var r = this.__data__;
1474
- return this.size += this.has(e) ? 0 : 1, r[e] = Xi && t === void 0 ? Zi : t, this;
1475
- }
1476
- var es = Qi, ts = Di, rs = Ni, ns = Ui, as = Ji, os = es;
1477
- function de(e) {
1478
- var t = -1, r = e == null ? 0 : e.length;
1479
- for (this.clear(); ++t < r; ) {
1480
- var a = e[t];
1481
- this.set(a[0], a[1]);
1482
- }
1483
- }
1484
- de.prototype.clear = ts;
1485
- de.prototype.delete = rs;
1486
- de.prototype.get = ns;
1487
- de.prototype.has = as;
1488
- de.prototype.set = os;
1489
- var is = de, tr = is, ss = Ne, ls = pt;
1490
- function cs() {
1491
- this.size = 0, this.__data__ = {
1492
- hash: new tr(),
1493
- map: new (ls || ss)(),
1494
- string: new tr()
1495
- };
1496
- }
1497
- var fs = cs;
1498
- function ds(e) {
1499
- var t = typeof e;
1500
- return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
1501
- }
1502
- var us = ds, ps = us;
1503
- function gs(e, t) {
1504
- var r = e.__data__;
1505
- return ps(t) ? r[typeof t == "string" ? "string" : "hash"] : r.map;
1506
- }
1507
- var We = gs, hs = We;
1508
- function vs(e) {
1509
- var t = hs(this, e).delete(e);
1510
- return this.size -= t ? 1 : 0, t;
1511
- }
1512
- var bs = vs, ys = We;
1513
- function ms(e) {
1514
- return ys(this, e).get(e);
1515
- }
1516
- var _s = ms, $s = We;
1517
- function Cs(e) {
1518
- return $s(this, e).has(e);
1519
- }
1520
- var ws = Cs, xs = We;
1521
- function Ts(e, t) {
1522
- var r = xs(this, e), a = r.size;
1523
- return r.set(e, t), this.size += r.size == a ? 0 : 1, this;
1524
- }
1525
- var As = Ts, Ss = fs, Es = bs, Os = _s, Is = ws, Ps = As;
1526
- function ue(e) {
1527
- var t = -1, r = e == null ? 0 : e.length;
1528
- for (this.clear(); ++t < r; ) {
1529
- var a = e[t];
1530
- this.set(a[0], a[1]);
1531
- }
1532
- }
1533
- ue.prototype.clear = Ss;
1534
- ue.prototype.delete = Es;
1535
- ue.prototype.get = Os;
1536
- ue.prototype.has = Is;
1537
- ue.prototype.set = Ps;
1538
- var gt = ue, Rs = Ne, Ls = pt, js = gt, Ms = 200;
1539
- function ks(e, t) {
1540
- var r = this.__data__;
1541
- if (r instanceof Rs) {
1542
- var a = r.__data__;
1543
- if (!Ls || a.length < Ms - 1)
1544
- return a.push([e, t]), this.size = ++r.size, this;
1545
- r = this.__data__ = new js(a);
1546
- }
1547
- return r.set(e, t), this.size = r.size, this;
1548
- }
1549
- var Ds = ks, Fs = Ne, Ns = zo, Bs = Ko, Gs = qo, Ws = Jo, Hs = Ds;
1550
- function pe(e) {
1551
- var t = this.__data__ = new Fs(e);
1552
- this.size = t.size;
1553
- }
1554
- pe.prototype.clear = Ns;
1555
- pe.prototype.delete = Bs;
1556
- pe.prototype.get = Gs;
1557
- pe.prototype.has = Ws;
1558
- pe.prototype.set = Hs;
1559
- var Yr = pe, zs = "__lodash_hash_undefined__";
1560
- function Us(e) {
1561
- return this.__data__.set(e, zs), this;
1562
- }
1563
- var Ks = Us;
1564
- function Ys(e) {
1565
- return this.__data__.has(e);
1566
- }
1567
- var qs = Ys, Vs = gt, Js = Ks, Xs = qs;
1568
- function Me(e) {
1569
- var t = -1, r = e == null ? 0 : e.length;
1570
- for (this.__data__ = new Vs(); ++t < r; )
1571
- this.add(e[t]);
1572
- }
1573
- Me.prototype.add = Me.prototype.push = Js;
1574
- Me.prototype.has = Xs;
1575
- var Zs = Me;
1576
- function Qs(e, t) {
1577
- for (var r = -1, a = e == null ? 0 : e.length; ++r < a; )
1578
- if (t(e[r], r, e))
1579
- return !0;
1580
- return !1;
1581
- }
1582
- var el = Qs;
1583
- function tl(e, t) {
1584
- return e.has(t);
1585
- }
1586
- var rl = tl, nl = Zs, al = el, ol = rl, il = 1, sl = 2;
1587
- function ll(e, t, r, a, o, s) {
1588
- var l = r & il, f = e.length, u = t.length;
1589
- if (f != u && !(l && u > f))
1590
- return !1;
1591
- var d = s.get(e), v = s.get(t);
1592
- if (d && v)
1593
- return d == t && v == e;
1594
- var h = -1, p = !0, $ = r & sl ? new nl() : void 0;
1595
- for (s.set(e, t), s.set(t, e); ++h < f; ) {
1596
- var m = e[h], x = t[h];
1597
- if (a)
1598
- var S = l ? a(x, m, h, t, e, s) : a(m, x, h, e, t, s);
1599
- if (S !== void 0) {
1600
- if (S)
1601
- continue;
1602
- p = !1;
1603
- break;
1604
- }
1605
- if ($) {
1606
- if (!al(t, function(y, C) {
1607
- if (!ol($, C) && (m === y || o(m, y, r, a, s)))
1608
- return $.push(C);
1609
- })) {
1610
- p = !1;
1611
- break;
1612
- }
1613
- } else if (!(m === x || o(m, x, r, a, s))) {
1614
- p = !1;
1615
- break;
1616
- }
1617
- }
1618
- return s.delete(e), s.delete(t), p;
1619
- }
1620
- var qr = ll, cl = J, fl = cl.Uint8Array, dl = fl;
1621
- function ul(e) {
1622
- var t = -1, r = Array(e.size);
1623
- return e.forEach(function(a, o) {
1624
- r[++t] = [o, a];
1625
- }), r;
1626
- }
1627
- var pl = ul;
1628
- function gl(e) {
1629
- var t = -1, r = Array(e.size);
1630
- return e.forEach(function(a) {
1631
- r[++t] = a;
1632
- }), r;
1633
- }
1634
- var hl = gl, rr = $e, nr = dl, vl = zr, bl = qr, yl = pl, ml = hl, _l = 1, $l = 2, Cl = "[object Boolean]", wl = "[object Date]", xl = "[object Error]", Tl = "[object Map]", Al = "[object Number]", Sl = "[object RegExp]", El = "[object Set]", Ol = "[object String]", Il = "[object Symbol]", Pl = "[object ArrayBuffer]", Rl = "[object DataView]", ar = rr ? rr.prototype : void 0, et = ar ? ar.valueOf : void 0;
1635
- function Ll(e, t, r, a, o, s, l) {
1636
- switch (r) {
1637
- case Rl:
1638
- if (e.byteLength != t.byteLength || e.byteOffset != t.byteOffset)
1639
- return !1;
1640
- e = e.buffer, t = t.buffer;
1641
- case Pl:
1642
- return !(e.byteLength != t.byteLength || !s(new nr(e), new nr(t)));
1643
- case Cl:
1644
- case wl:
1645
- case Al:
1646
- return vl(+e, +t);
1647
- case xl:
1648
- return e.name == t.name && e.message == t.message;
1649
- case Sl:
1650
- case Ol:
1651
- return e == t + "";
1652
- case Tl:
1653
- var f = yl;
1654
- case El:
1655
- var u = a & _l;
1656
- if (f || (f = ml), e.size != t.size && !u)
1657
- return !1;
1658
- var d = l.get(e);
1659
- if (d)
1660
- return d == t;
1661
- a |= $l, l.set(e, t);
1662
- var v = bl(f(e), f(t), a, o, s, l);
1663
- return l.delete(e), v;
1664
- case Il:
1665
- if (et)
1666
- return et.call(e) == et.call(t);
1667
- }
1668
- return !1;
1669
- }
1670
- var jl = Ll, Ml = Nr, kl = K;
1671
- function Dl(e, t, r) {
1672
- var a = t(e);
1673
- return kl(e) ? a : Ml(a, r(e));
1674
- }
1675
- var Fl = Dl;
1676
- function Nl(e, t) {
1677
- for (var r = -1, a = e == null ? 0 : e.length, o = 0, s = []; ++r < a; ) {
1678
- var l = e[r];
1679
- t(l, r, e) && (s[o++] = l);
1680
- }
1681
- return s;
1682
- }
1683
- var Bl = Nl;
1684
- function Gl() {
1685
- return [];
1686
- }
1687
- var Wl = Gl, Hl = Bl, zl = Wl, Ul = Object.prototype, Kl = Ul.propertyIsEnumerable, or = Object.getOwnPropertySymbols, Yl = or ? function(e) {
1688
- return e == null ? [] : (e = Object(e), Hl(or(e), function(t) {
1689
- return Kl.call(e, t);
1690
- }));
1691
- } : zl, ql = Yl;
1692
- function Vl(e, t) {
1693
- for (var r = -1, a = Array(e); ++r < e; )
1694
- a[r] = t(r);
1695
- return a;
1696
- }
1697
- var Jl = Vl, le = {}, Xl = {
1698
- get exports() {
1699
- return le;
1700
- },
1701
- set exports(e) {
1702
- le = e;
1703
- }
1704
- };
1705
- function Zl() {
1706
- return !1;
1707
- }
1708
- var Ql = Zl;
1709
- (function(e, t) {
1710
- var r = J, a = Ql, o = t && !t.nodeType && t, s = o && !0 && e && !e.nodeType && e, l = s && s.exports === o, f = l ? r.Buffer : void 0, u = f ? f.isBuffer : void 0, d = u || a;
1711
- e.exports = d;
1712
- })(Xl, le);
1713
- var ec = 9007199254740991, tc = /^(?:0|[1-9]\d*)$/;
1714
- function rc(e, t) {
1715
- var r = typeof e;
1716
- return t = t ?? ec, !!t && (r == "number" || r != "symbol" && tc.test(e)) && e > -1 && e % 1 == 0 && e < t;
1717
- }
1718
- var Vr = rc, nc = 9007199254740991;
1719
- function ac(e) {
1720
- return typeof e == "number" && e > -1 && e % 1 == 0 && e <= nc;
1721
- }
1722
- var ht = ac, oc = Ce, ic = ht, sc = we, lc = "[object Arguments]", cc = "[object Array]", fc = "[object Boolean]", dc = "[object Date]", uc = "[object Error]", pc = "[object Function]", gc = "[object Map]", hc = "[object Number]", vc = "[object Object]", bc = "[object RegExp]", yc = "[object Set]", mc = "[object String]", _c = "[object WeakMap]", $c = "[object ArrayBuffer]", Cc = "[object DataView]", wc = "[object Float32Array]", xc = "[object Float64Array]", Tc = "[object Int8Array]", Ac = "[object Int16Array]", Sc = "[object Int32Array]", Ec = "[object Uint8Array]", Oc = "[object Uint8ClampedArray]", Ic = "[object Uint16Array]", Pc = "[object Uint32Array]", I = {};
1723
- I[wc] = I[xc] = I[Tc] = I[Ac] = I[Sc] = I[Ec] = I[Oc] = I[Ic] = I[Pc] = !0;
1724
- I[lc] = I[cc] = I[$c] = I[fc] = I[Cc] = I[dc] = I[uc] = I[pc] = I[gc] = I[hc] = I[vc] = I[bc] = I[yc] = I[mc] = I[_c] = !1;
1725
- function Rc(e) {
1726
- return sc(e) && ic(e.length) && !!I[oc(e)];
1727
- }
1728
- var Lc = Rc;
1729
- function jc(e) {
1730
- return function(t) {
1731
- return e(t);
1732
- };
1733
- }
1734
- var Mc = jc, ke = {}, kc = {
1735
- get exports() {
1736
- return ke;
1737
- },
1738
- set exports(e) {
1739
- ke = e;
1740
- }
1741
- };
1742
- (function(e, t) {
1743
- var r = Br, a = t && !t.nodeType && t, o = a && !0 && e && !e.nodeType && e, s = o && o.exports === a, l = s && r.process, f = function() {
1744
- try {
1745
- var u = o && o.require && o.require("util").types;
1746
- return u || l && l.binding && l.binding("util");
1747
- } catch {
1748
- }
1749
- }();
1750
- e.exports = f;
1751
- })(kc, ke);
1752
- var Dc = Lc, Fc = Mc, ir = ke, sr = ir && ir.isTypedArray, Nc = sr ? Fc(sr) : Dc, vt = Nc, Bc = Jl, Gc = De, Wc = K, Hc = le, zc = Vr, Uc = vt, Kc = Object.prototype, Yc = Kc.hasOwnProperty;
1753
- function qc(e, t) {
1754
- var r = Wc(e), a = !r && Gc(e), o = !r && !a && Hc(e), s = !r && !a && !o && Uc(e), l = r || a || o || s, f = l ? Bc(e.length, String) : [], u = f.length;
1755
- for (var d in e)
1756
- (t || Yc.call(e, d)) && !(l && // Safari 9 has enumerable `arguments.length` in strict mode.
1757
- (d == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
1758
- o && (d == "offset" || d == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
1759
- s && (d == "buffer" || d == "byteLength" || d == "byteOffset") || // Skip index properties.
1760
- zc(d, u))) && f.push(d);
1761
- return f;
1762
- }
1763
- var Vc = qc, Jc = Object.prototype;
1764
- function Xc(e) {
1765
- var t = e && e.constructor, r = typeof t == "function" && t.prototype || Jc;
1766
- return e === r;
1767
- }
1768
- var Jr = Xc;
1769
- function Zc(e, t) {
1770
- return function(r) {
1771
- return e(t(r));
1772
- };
1773
- }
1774
- var Qc = Zc, ef = Qc, tf = ef(Object.keys, Object), rf = tf, nf = Jr, af = rf, of = Object.prototype, sf = of.hasOwnProperty;
1775
- function lf(e) {
1776
- if (!nf(e))
1777
- return af(e);
1778
- var t = [];
1779
- for (var r in Object(e))
1780
- sf.call(e, r) && r != "constructor" && t.push(r);
1781
- return t;
1782
- }
1783
- var Xr = lf, cf = Ur, ff = ht;
1784
- function df(e) {
1785
- return e != null && ff(e.length) && !cf(e);
1786
- }
1787
- var bt = df, uf = Vc, pf = Xr, gf = bt;
1788
- function hf(e) {
1789
- return gf(e) ? uf(e) : pf(e);
1790
- }
1791
- var yt = hf, vf = Fl, bf = ql, yf = yt;
1792
- function mf(e) {
1793
- return vf(e, yf, bf);
1794
- }
1795
- var _f = mf, lr = _f, $f = 1, Cf = Object.prototype, wf = Cf.hasOwnProperty;
1796
- function xf(e, t, r, a, o, s) {
1797
- var l = r & $f, f = lr(e), u = f.length, d = lr(t), v = d.length;
1798
- if (u != v && !l)
1799
- return !1;
1800
- for (var h = u; h--; ) {
1801
- var p = f[h];
1802
- if (!(l ? p in t : wf.call(t, p)))
1803
- return !1;
1804
- }
1805
- var $ = s.get(e), m = s.get(t);
1806
- if ($ && m)
1807
- return $ == t && m == e;
1808
- var x = !0;
1809
- s.set(e, t), s.set(t, e);
1810
- for (var S = l; ++h < u; ) {
1811
- p = f[h];
1812
- var y = e[p], C = t[p];
1813
- if (a)
1814
- var F = l ? a(C, y, p, t, e, s) : a(y, C, p, e, t, s);
1815
- if (!(F === void 0 ? y === C || o(y, C, r, a, s) : F)) {
1816
- x = !1;
1817
- break;
1818
- }
1819
- S || (S = p == "constructor");
1820
- }
1821
- if (x && !S) {
1822
- var L = e.constructor, M = t.constructor;
1823
- L != M && "constructor" in e && "constructor" in t && !(typeof L == "function" && L instanceof L && typeof M == "function" && M instanceof M) && (x = !1);
1824
- }
1825
- return s.delete(e), s.delete(t), x;
1826
- }
1827
- var Tf = xf, Af = fe, Sf = J, Ef = Af(Sf, "DataView"), Of = Ef, If = fe, Pf = J, Rf = If(Pf, "Promise"), Lf = Rf, jf = fe, Mf = J, kf = jf(Mf, "Set"), Df = kf, Ff = fe, Nf = J, Bf = Ff(Nf, "WeakMap"), Gf = Bf, ot = Of, it = pt, st = Lf, lt = Df, ct = Gf, Zr = Ce, ge = Kr, cr = "[object Map]", Wf = "[object Object]", fr = "[object Promise]", dr = "[object Set]", ur = "[object WeakMap]", pr = "[object DataView]", Hf = ge(ot), zf = ge(it), Uf = ge(st), Kf = ge(lt), Yf = ge(ct), re = Zr;
1828
- (ot && re(new ot(new ArrayBuffer(1))) != pr || it && re(new it()) != cr || st && re(st.resolve()) != fr || lt && re(new lt()) != dr || ct && re(new ct()) != ur) && (re = function(e) {
1829
- var t = Zr(e), r = t == Wf ? e.constructor : void 0, a = r ? ge(r) : "";
1830
- if (a)
1831
- switch (a) {
1832
- case Hf:
1833
- return pr;
1834
- case zf:
1835
- return cr;
1836
- case Uf:
1837
- return fr;
1838
- case Kf:
1839
- return dr;
1840
- case Yf:
1841
- return ur;
1842
- }
1843
- return t;
1844
- });
1845
- var Qr = re, tt = Yr, qf = qr, Vf = jl, Jf = Tf, gr = Qr, hr = K, vr = le, Xf = vt, Zf = 1, br = "[object Arguments]", yr = "[object Array]", Le = "[object Object]", Qf = Object.prototype, mr = Qf.hasOwnProperty;
1846
- function ed(e, t, r, a, o, s) {
1847
- var l = hr(e), f = hr(t), u = l ? yr : gr(e), d = f ? yr : gr(t);
1848
- u = u == br ? Le : u, d = d == br ? Le : d;
1849
- var v = u == Le, h = d == Le, p = u == d;
1850
- if (p && vr(e)) {
1851
- if (!vr(t))
1852
- return !1;
1853
- l = !0, v = !1;
1854
- }
1855
- if (p && !v)
1856
- return s || (s = new tt()), l || Xf(e) ? qf(e, t, r, a, o, s) : Vf(e, t, u, r, a, o, s);
1857
- if (!(r & Zf)) {
1858
- var $ = v && mr.call(e, "__wrapped__"), m = h && mr.call(t, "__wrapped__");
1859
- if ($ || m) {
1860
- var x = $ ? e.value() : e, S = m ? t.value() : t;
1861
- return s || (s = new tt()), o(x, S, r, a, s);
1862
- }
1863
- }
1864
- return p ? (s || (s = new tt()), Jf(e, t, r, a, o, s)) : !1;
1865
- }
1866
- var td = ed, rd = td, _r = we;
1867
- function en(e, t, r, a, o) {
1868
- return e === t ? !0 : e == null || t == null || !_r(e) && !_r(t) ? e !== e && t !== t : rd(e, t, r, a, en, o);
1869
- }
1870
- var tn = en, nd = Yr, ad = tn, od = 1, id = 2;
1871
- function sd(e, t, r, a) {
1872
- var o = r.length, s = o, l = !a;
1873
- if (e == null)
1874
- return !s;
1875
- for (e = Object(e); o--; ) {
1876
- var f = r[o];
1877
- if (l && f[2] ? f[1] !== e[f[0]] : !(f[0] in e))
1878
- return !1;
1879
- }
1880
- for (; ++o < s; ) {
1881
- f = r[o];
1882
- var u = f[0], d = e[u], v = f[1];
1883
- if (l && f[2]) {
1884
- if (d === void 0 && !(u in e))
1885
- return !1;
1886
- } else {
1887
- var h = new nd();
1888
- if (a)
1889
- var p = a(d, v, u, e, t, h);
1890
- if (!(p === void 0 ? ad(v, d, od | id, a, h) : p))
1891
- return !1;
1892
- }
1893
- }
1894
- return !0;
1895
- }
1896
- var ld = sd, cd = Be;
1897
- function fd(e) {
1898
- return e === e && !cd(e);
1899
- }
1900
- var rn = fd, dd = rn, ud = yt;
1901
- function pd(e) {
1902
- for (var t = ud(e), r = t.length; r--; ) {
1903
- var a = t[r], o = e[a];
1904
- t[r] = [a, o, dd(o)];
1905
- }
1906
- return t;
1907
- }
1908
- var gd = pd;
1909
- function hd(e, t) {
1910
- return function(r) {
1911
- return r == null ? !1 : r[e] === t && (t !== void 0 || e in Object(r));
1912
- };
1913
- }
1914
- var nn = hd, vd = ld, bd = gd, yd = nn;
1915
- function md(e) {
1916
- var t = bd(e);
1917
- return t.length == 1 && t[0][2] ? yd(t[0][0], t[0][1]) : function(r) {
1918
- return r === e || vd(r, e, t);
1919
- };
1920
- }
1921
- var _d = md, $d = Ce, Cd = we, wd = "[object Symbol]";
1922
- function xd(e) {
1923
- return typeof e == "symbol" || Cd(e) && $d(e) == wd;
1924
- }
1925
- var He = xd, Td = K, Ad = He, Sd = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Ed = /^\w*$/;
1926
- function Od(e, t) {
1927
- if (Td(e))
1928
- return !1;
1929
- var r = typeof e;
1930
- return r == "number" || r == "symbol" || r == "boolean" || e == null || Ad(e) ? !0 : Ed.test(e) || !Sd.test(e) || t != null && e in Object(t);
1931
- }
1932
- var mt = Od, an = gt, Id = "Expected a function";
1933
- function _t(e, t) {
1934
- if (typeof e != "function" || t != null && typeof t != "function")
1935
- throw new TypeError(Id);
1936
- var r = function() {
1937
- var a = arguments, o = t ? t.apply(this, a) : a[0], s = r.cache;
1938
- if (s.has(o))
1939
- return s.get(o);
1940
- var l = e.apply(this, a);
1941
- return r.cache = s.set(o, l) || s, l;
1942
- };
1943
- return r.cache = new (_t.Cache || an)(), r;
1944
- }
1945
- _t.Cache = an;
1946
- var Pd = _t, Rd = Pd, Ld = 500;
1947
- function jd(e) {
1948
- var t = Rd(e, function(a) {
1949
- return r.size === Ld && r.clear(), a;
1950
- }), r = t.cache;
1951
- return t;
1952
- }
1953
- var Md = jd, kd = Md, Dd = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, Fd = /\\(\\)?/g, Nd = kd(function(e) {
1954
- var t = [];
1955
- return e.charCodeAt(0) === 46 && t.push(""), e.replace(Dd, function(r, a, o, s) {
1956
- t.push(o ? s.replace(Fd, "$1") : a || r);
1957
- }), t;
1958
- }), Bd = Nd;
1959
- function Gd(e, t) {
1960
- for (var r = -1, a = e == null ? 0 : e.length, o = Array(a); ++r < a; )
1961
- o[r] = t(e[r], r, e);
1962
- return o;
1963
- }
1964
- var Wd = Gd, $r = $e, Hd = Wd, zd = K, Ud = He, Kd = 1 / 0, Cr = $r ? $r.prototype : void 0, wr = Cr ? Cr.toString : void 0;
1965
- function on(e) {
1966
- if (typeof e == "string")
1967
- return e;
1968
- if (zd(e))
1969
- return Hd(e, on) + "";
1970
- if (Ud(e))
1971
- return wr ? wr.call(e) : "";
1972
- var t = e + "";
1973
- return t == "0" && 1 / e == -Kd ? "-0" : t;
1974
- }
1975
- var Yd = on, qd = Yd;
1976
- function Vd(e) {
1977
- return e == null ? "" : qd(e);
1978
- }
1979
- var Jd = Vd, Xd = K, Zd = mt, Qd = Bd, eu = Jd;
1980
- function tu(e, t) {
1981
- return Xd(e) ? e : Zd(e, t) ? [e] : Qd(eu(e));
1982
- }
1983
- var sn = tu, ru = He, nu = 1 / 0;
1984
- function au(e) {
1985
- if (typeof e == "string" || ru(e))
1986
- return e;
1987
- var t = e + "";
1988
- return t == "0" && 1 / e == -nu ? "-0" : t;
1989
- }
1990
- var ze = au, ou = sn, iu = ze;
1991
- function su(e, t) {
1992
- t = ou(t, e);
1993
- for (var r = 0, a = t.length; e != null && r < a; )
1994
- e = e[iu(t[r++])];
1995
- return r && r == a ? e : void 0;
1996
- }
1997
- var ln = su, lu = ln;
1998
- function cu(e, t, r) {
1999
- var a = e == null ? void 0 : lu(e, t);
2000
- return a === void 0 ? r : a;
2001
- }
2002
- var fu = cu;
2003
- function du(e, t) {
2004
- return e != null && t in Object(e);
2005
- }
2006
- var uu = du, pu = sn, gu = De, hu = K, vu = Vr, bu = ht, yu = ze;
2007
- function mu(e, t, r) {
2008
- t = pu(t, e);
2009
- for (var a = -1, o = t.length, s = !1; ++a < o; ) {
2010
- var l = yu(t[a]);
2011
- if (!(s = e != null && r(e, l)))
2012
- break;
2013
- e = e[l];
2014
- }
2015
- return s || ++a != o ? s : (o = e == null ? 0 : e.length, !!o && bu(o) && vu(l, o) && (hu(e) || gu(e)));
2016
- }
2017
- var _u = mu, $u = uu, Cu = _u;
2018
- function wu(e, t) {
2019
- return e != null && Cu(e, t, $u);
2020
- }
2021
- var xu = wu, Tu = tn, Au = fu, Su = xu, Eu = mt, Ou = rn, Iu = nn, Pu = ze, Ru = 1, Lu = 2;
2022
- function ju(e, t) {
2023
- return Eu(e) && Ou(t) ? Iu(Pu(e), t) : function(r) {
2024
- var a = Au(r, e);
2025
- return a === void 0 && a === t ? Su(r, e) : Tu(t, a, Ru | Lu);
2026
- };
2027
- }
2028
- var Mu = ju;
2029
- function ku(e) {
2030
- return e;
2031
- }
2032
- var Du = ku;
2033
- function Fu(e) {
2034
- return function(t) {
2035
- return t == null ? void 0 : t[e];
2036
- };
2037
- }
2038
- var Nu = Fu, Bu = ln;
2039
- function Gu(e) {
2040
- return function(t) {
2041
- return Bu(t, e);
2042
- };
2043
- }
2044
- var Wu = Gu, Hu = Nu, zu = Wu, Uu = mt, Ku = ze;
2045
- function Yu(e) {
2046
- return Uu(e) ? Hu(Ku(e)) : zu(e);
2047
- }
2048
- var qu = Yu, Vu = _d, Ju = Mu, Xu = Du, Zu = K, Qu = qu;
2049
- function ep(e) {
2050
- return typeof e == "function" ? e : e == null ? Xu : typeof e == "object" ? Zu(e) ? Ju(e[0], e[1]) : Vu(e) : Qu(e);
2051
- }
2052
- var cn = ep, tp = cn, rp = bt, np = yt;
2053
- function ap(e) {
2054
- return function(t, r, a) {
2055
- var o = Object(t);
2056
- if (!rp(t)) {
2057
- var s = tp(r);
2058
- t = np(t), r = function(f) {
2059
- return s(o[f], f, o);
2060
- };
2061
- }
2062
- var l = e(t, r, a);
2063
- return l > -1 ? o[s ? t[l] : l] : void 0;
2064
- };
2065
- }
2066
- var op = ap;
2067
- function ip(e, t, r, a) {
2068
- for (var o = e.length, s = r + (a ? 1 : -1); a ? s-- : ++s < o; )
2069
- if (t(e[s], s, e))
2070
- return s;
2071
- return -1;
2072
- }
2073
- var sp = ip, lp = /\s/;
2074
- function cp(e) {
2075
- for (var t = e.length; t-- && lp.test(e.charAt(t)); )
2076
- ;
2077
- return t;
2078
- }
2079
- var fp = cp, dp = fp, up = /^\s+/;
2080
- function pp(e) {
2081
- return e && e.slice(0, dp(e) + 1).replace(up, "");
2082
- }
2083
- var gp = pp, hp = gp, xr = Be, vp = He, Tr = 0 / 0, bp = /^[-+]0x[0-9a-f]+$/i, yp = /^0b[01]+$/i, mp = /^0o[0-7]+$/i, _p = parseInt;
2084
- function $p(e) {
2085
- if (typeof e == "number")
2086
- return e;
2087
- if (vp(e))
2088
- return Tr;
2089
- if (xr(e)) {
2090
- var t = typeof e.valueOf == "function" ? e.valueOf() : e;
2091
- e = xr(t) ? t + "" : t;
2092
- }
2093
- if (typeof e != "string")
2094
- return e === 0 ? e : +e;
2095
- e = hp(e);
2096
- var r = yp.test(e);
2097
- return r || mp.test(e) ? _p(e.slice(2), r ? 2 : 8) : bp.test(e) ? Tr : +e;
2098
- }
2099
- var Cp = $p, wp = Cp, Ar = 1 / 0, xp = 17976931348623157e292;
2100
- function Tp(e) {
2101
- if (!e)
2102
- return e === 0 ? e : 0;
2103
- if (e = wp(e), e === Ar || e === -Ar) {
2104
- var t = e < 0 ? -1 : 1;
2105
- return t * xp;
2106
- }
2107
- return e === e ? e : 0;
2108
- }
2109
- var Ap = Tp, Sp = Ap;
2110
- function Ep(e) {
2111
- var t = Sp(e), r = t % 1;
2112
- return t === t ? r ? t - r : t : 0;
2113
- }
2114
- var Op = Ep, Ip = sp, Pp = cn, Rp = Op, Lp = Math.max;
2115
- function jp(e, t, r) {
2116
- var a = e == null ? 0 : e.length;
2117
- if (!a)
2118
- return -1;
2119
- var o = r == null ? 0 : Rp(r);
2120
- return o < 0 && (o = Lp(a + o, 0)), Ip(e, Pp(t), o);
2121
- }
2122
- var Mp = jp, kp = op, Dp = Mp, Fp = kp(Dp), Np = Fp, Bp = Xr, Gp = Qr, Wp = De, Hp = K, zp = bt, Up = le, Kp = Jr, Yp = vt, qp = "[object Map]", Vp = "[object Set]", Jp = Object.prototype, Xp = Jp.hasOwnProperty;
2123
- function Zp(e) {
2124
- if (e == null)
2125
- return !0;
2126
- if (zp(e) && (Hp(e) || typeof e == "string" || typeof e.splice == "function" || Up(e) || Yp(e) || Wp(e)))
2127
- return !e.length;
2128
- var t = Gp(e);
2129
- if (t == qp || t == Vp)
2130
- return !e.size;
2131
- if (Kp(e))
2132
- return !Bp(e).length;
2133
- for (var r in e)
2134
- if (Xp.call(e, r))
2135
- return !1;
2136
- return !0;
2137
- }
2138
- var fn = Zp;
2139
- const $t = (e, t, r) => (t - e) * (r / 100) + e, dn = (e) => e.some((t) => t.active), Qp = (e) => fn(e) ? !1 : dn(e.filters), un = (e) => e.filters.map((t) => {
2140
- const { value: r, defaultValue: a, defaultColor: o, min: s, max: l, color: f } = t, u = r || a || 1, d = o || f;
2141
- return {
2142
- ...t,
2143
- brightness: $t(s, l, u),
2144
- color: d
2145
- };
2146
- }), eg = (e) => fn(e) ? e : {
2147
- ...e,
2148
- filters: un(e)
2149
- }, tg = (e, t) => bo(
2150
- e.map((a) => a.objects.filter((o) => o.name === t).map(un))
2151
- ), rg = (e, t) => {
2152
- const r = Np(e, { objects: [{ name: t }] }), { type: a = null } = r || {};
2153
- return a;
2154
- }, ng = (e) => e.map((t) => {
2155
- const { defaultValue: r, min: a, max: o } = t, s = r || 1;
2156
- return {
2157
- ...t,
2158
- active: !1,
2159
- color: "",
2160
- brightness: $t(s, a, o),
2161
- value: s
2162
- };
2163
- }), pn = ({
2164
- width: e = 600,
2165
- height: t = 600,
2166
- className: r,
2167
- image: a,
2168
- color: o = "transparent",
2169
- brightness: s = 1
2170
- }) => {
2171
- const l = dt(null), f = new Image(), u = (v, h, p, $) => {
2172
- v.fillStyle = h, v.fillRect(0, 0, p, $);
2173
- }, d = (v, h) => {
2174
- var $;
2175
- const p = ($ = l.current) == null ? void 0 : $.getContext("2d");
2176
- if (p) {
2177
- const m = CSS.supports && CSS.supports("background-color", h) ? h : "transparent", { width: x, height: S } = p.canvas;
2178
- p.clearRect(0, 0, x, S), p.globalCompositeOperation = "multiply", f.onload = () => {
2179
- p == null || p.drawImage(f, 0, 0, x, S), u(p, m, x, S);
2180
- }, f.src = v;
2181
- }
2182
- };
2183
- return V(() => {
2184
- d(a, o);
2185
- }, [o, a]), /* @__PURE__ */ i(
2186
- "canvas",
2187
- {
2188
- ref: l,
2189
- style: { filter: `brightness(${s}) contrast(1.3)` },
2190
- role: "img",
2191
- className: r,
2192
- width: e,
2193
- height: t
2194
- }
2195
- );
2196
- };
2197
- pn.displayName = "Widgets.ColorTool.FilterImage";
2198
- const ag = b.section`
2199
- display: grid;
2200
- gap: var(--PADDING_SMALL, 20px);
2201
-
2202
- ${({ isCondensed: e, hideControls: t }) => e ? j`
2203
- grid-template-areas:
2204
- "title"
2205
- "subtitle"
2206
- "image"
2207
- "caption"
2208
- "controls"
2209
- "reset";
2210
- ` : j`
2211
- grid-template-areas:
2212
- "title title"
2213
- "subtitle subtitle"
2214
- ${t ? "'image image'" : "'controls image'"}
2215
- "reset reset"
2216
- "caption caption";
2217
- `}
2218
- `;
2219
- b.h2`
2220
- grid-area: title;
2221
- margin: 0;
2222
- `;
2223
- const og = b.dl`
2224
- grid-area: subtitle;
2225
- margin: 0;
2226
- font-size: 18px;
2227
- font-weight: var(--FONT_WEIGHT_NORMAL, 400);
2228
-
2229
- > dt,
2230
- dd {
2231
- margin: 0;
2232
- white-space: nowrap;
2233
- }
2234
-
2235
- > dt {
2236
- display: inline-block;
2237
- }
2238
-
2239
- > dd {
2240
- display: inline;
2241
- margin-left: 1ch;
2242
-
2243
- &::after {
2244
- content: "\\A";
2245
- white-space: pre;
2246
- }
2247
- }
2248
- `, ig = b.div`
2249
- display: grid;
2250
- grid-template-columns: max-content minmax(100px, 1fr) minmax(100px, 2fr);
2251
- grid-auto-rows: max-content;
2252
- grid-area: controls;
2253
- gap: 10px;
2254
- align-items: center;
2255
- `, sg = b(Jn)`
2256
- padding: 0;
2257
- width: 100%;
2258
- `, lg = b.div`
2259
- position: relative;
2260
- aspect-ratio: 1 / 1;
2261
- grid-area: image;
2262
- background-color: rgba(0, 0, 0, 0.1);
2263
- `, cg = b.img`
2264
- position: absolute;
2265
- top: 0;
2266
- right: 0;
2267
- bottom: 0;
2268
- left: 0;
2269
- display: ${({ filtersActive: e }) => e ? "block" : "none"};
2270
- width: 100%;
2271
- height: 100%;
2272
- `, fg = b(pn)`
2273
- user-select: none;
2274
- position: absolute;
2275
- top: 0;
2276
- right: 0;
2277
- bottom: 0;
2278
- left: 0;
2279
- width: 100%;
2280
- height: 100%;
2281
- mix-blend-mode: screen;
2282
-
2283
- ${({ active: e }) => e ? j`
2284
- visibility: visible;
2285
- opacity: 1;
2286
- ` : j`
2287
- visibility: hidden;
2288
- opacity: 0;
2289
- `}
2290
- `, dg = b.div`
2291
- grid-column: span 3;
2292
- `, rt = b.div`
2293
- font-weight: var(--FONT_WEIGHT_BOLD, 600);
2294
- `, ug = b.footer`
2295
- grid-area: caption;
2296
- `, pg = b(Pr)`
2297
- grid-area: reset;
2298
- text-align: left;
2299
-
2300
- span {
2301
- text-align: left;
2302
- }
2303
- `, gg = b(Pr)`
2304
- border-radius: 50%;
2305
- font-weight: var(--FONT_WEIGHT_MEDIUM, 500);
2306
- font-size: 22px;
2307
- text-transform: lowercase;
2308
- display: flex;
2309
- width: 38px;
2310
- height: 38px;
2311
- padding: 0;
2312
-
2313
- ${({ active: e }) => e ? j`
2314
- background-color: var(--turquoise85, #12726c);
2315
- &:not(:disabled):not([aria-disabled="true"]):hover {
2316
- outline: 1px solid var(--white, #fff);
2317
- outline-offset: -3px;
2318
- }
2319
- ` : j`
2320
- background-color: #f7f7f7;
2321
- border-color: #6c6e6e;
2322
- color: #6c6e6e !important;
2323
- &:not(:disabled):not([aria-disabled="true"]):hover {
2324
- outline: 2px solid #6c6e6e;
2325
- outline-offset: -2px;
2326
- }
2327
- `}
2328
- `, gn = ({
2329
- filter: e,
2330
- colorOptions: t,
2331
- isDisabled: r,
2332
- onChangeFilterCallback: a,
2333
- buttonLabelledById: o,
2334
- selectLabelledById: s,
2335
- sliderLabelledById: l
2336
- }) => {
2337
- const { t: f } = ne(), { label: u, color: d = "", value: v, active: h, min: p, max: $ } = e, m = () => a && a({ ...e, active: !h }), x = (C) => C && a && a({ ...e, color: C }), S = (C) => a && a({
2338
- ...e,
2339
- brightness: $t(p, $, C),
2340
- value: C
2341
- }), y = f("colorTool.actions.select_filter");
2342
- return /* @__PURE__ */ w(ee, { children: [
2343
- /* @__PURE__ */ i(
2344
- gg,
2345
- {
2346
- disabled: r,
2347
- onClick: m,
2348
- active: h,
2349
- "aria-labelledby": o,
2350
- children: u
2351
- }
2352
- ),
2353
- /* @__PURE__ */ i(
2354
- ft,
2355
- {
2356
- isDisabled: r,
2357
- placeholder: y,
2358
- value: d,
2359
- options: t,
2360
- onChangeCallback: x,
2361
- width: "100%",
2362
- maxWidth: "100%",
2363
- labelledById: s
2364
- }
2365
- ),
2366
- /* @__PURE__ */ i(
2367
- sg,
2368
- {
2369
- min: 1,
2370
- max: 100,
2371
- onChangeCallback: S,
2372
- isDisabled: !h,
2373
- labelledbyId: l,
2374
- value: v,
2375
- label: u,
2376
- color: d
2377
- }
2378
- )
2379
- ] });
2380
- };
2381
- gn.displayName = "Widgets.ColorTool.FilterControls";
2382
- const hn = ({
2383
- filters: e
2384
- }) => /* @__PURE__ */ w(lg, { children: [
2385
- /* @__PURE__ */ i(
2386
- cg,
2387
- {
2388
- alt: "",
2389
- src: "data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=",
2390
- filtersActive: dn(e)
2391
- }
2392
- ),
2393
- e && e.map((t) => {
2394
- const { label: r, image: a, color: o, brightness: s, active: l } = t;
2395
- return /* @__PURE__ */ i(
2396
- fg,
2397
- {
2398
- image: a,
2399
- color: o,
2400
- brightness: s,
2401
- active: l
2402
- },
2403
- `filter-${r}`
2404
- );
2405
- })
2406
- ] });
2407
- hn.displayName = "Widgets.ColorTool.ImageComposite";
2408
- const hg = ({
2409
- data: e,
2410
- objectOptions: t = [],
2411
- selectedData: r,
2412
- colorOptions: a = [],
2413
- selectionCallback: o,
2414
- isDisabled: s = !1,
2415
- isDisplayOnly: l = !1,
2416
- hideImage: f = !1,
2417
- hideSubtitle: u = !1
2418
- }) => {
2419
- const { ref: d, width: v = 1 } = ut(), [h, p] = W(
2420
- eg(r)
2421
- );
2422
- V(() => {
2423
- o && o(h);
2424
- }, [h]);
2425
- const $ = (B) => {
2426
- const { label: H } = B, { filters: N } = h, z = N.map(
2427
- (Y) => Y.label === H ? B : Y
2428
- );
2429
- return p({
2430
- ...h,
2431
- filters: z
2432
- });
2433
- }, m = (B) => {
2434
- const { value: H } = B.target;
2435
- return p({
2436
- name: H,
2437
- filters: tg(e, H)
2438
- });
2439
- }, x = () => p({
2440
- ...h,
2441
- filters: ng(h.filters)
2442
- }), S = e.length > 1, { t: y } = ne(), C = y("colorTool.actions.select_an_object"), { filters: F, name: L, caption: M } = h, X = rg(e, L);
2443
- return /* @__PURE__ */ w(
2444
- ag,
2445
- {
2446
- ref: d,
2447
- isCondensed: v < 1e3,
2448
- hideControls: l,
2449
- children: [
2450
- L && (l || S) && /* @__PURE__ */ w(og, { children: [
2451
- S && /* @__PURE__ */ w(ee, { children: [
2452
- /* @__PURE__ */ i("dt", { children: y("colorTool.labels.object_type") }),
2453
- /* @__PURE__ */ i("dd", { children: X })
2454
- ] }),
2455
- !u && /* @__PURE__ */ w(ee, { children: [
2456
- /* @__PURE__ */ i("dt", { children: y("colorTool.labels.object", {
2457
- context: S ? "selected" : !1
2458
- }) }),
2459
- /* @__PURE__ */ i("dd", { children: L })
2460
- ] })
2461
- ] }),
2462
- !l && /* @__PURE__ */ w(ig, { children: [
2463
- S && /* @__PURE__ */ i(dg, { children: /* @__PURE__ */ i(
2464
- Xn,
2465
- {
2466
- id: "astroObjectSelector",
2467
- placeholder: C,
2468
- options: t,
2469
- onChange: m,
2470
- value: L,
2471
- disabled: s
2472
- }
2473
- ) }),
2474
- F && /* @__PURE__ */ w(ee, { children: [
2475
- /* @__PURE__ */ i(rt, { id: "filterLabel", children: y("colorTool.labels.filter") }),
2476
- /* @__PURE__ */ i(rt, { id: "colorLabel", children: y("colorTool.labels.color") }),
2477
- /* @__PURE__ */ i(rt, { id: "intensityLabel", children: y("colorTool.labels.color_intensity") })
2478
- ] }),
2479
- F && F.map((B) => {
2480
- const { label: H, isDisabled: N } = B;
2481
- return /* @__PURE__ */ i(
2482
- gn,
2483
- {
2484
- filter: B,
2485
- isDisabled: s || N,
2486
- colorOptions: a,
2487
- onChangeFilterCallback: $,
2488
- buttonLabelledById: "filterLabel",
2489
- selectLabelledById: "colorLabel",
2490
- sliderLabelledById: "intensityLabel"
2491
- },
2492
- `filter-${H}`
2493
- );
2494
- })
2495
- ] }),
2496
- !f && /* @__PURE__ */ i(hn, { filters: F }),
2497
- L && !l && /* @__PURE__ */ i(
2498
- pg,
2499
- {
2500
- disabled: s || !Qp(h),
2501
- onClick: x,
2502
- icon: "Reset",
2503
- children: y("colorTool.actions.reset")
2504
- }
2505
- ),
2506
- M && /* @__PURE__ */ i(ug, { children: M })
2507
- ]
2508
- }
2509
- );
2510
- };
2511
- hg.displayName = "Widgets.ColorTool";
2512
- const vg = b.div`
2513
- background-color: var(--black, #000);
2514
- `, bg = b.div`
2515
- box-sizing: border-box;
2516
- display: flex;
2517
- align-items: center;
2518
- justify-content: center;
2519
- margin: 0;
2520
- padding: 0 var(--PADDING_SMALL, 20px) var(--PADDING_SMALL, 20px);
2521
- background-color: var(--black, #000);
2522
- width: 100%;
2523
- `;
2524
- b.label`
2525
- color: var(--white, #fff);
2526
- `;
2527
- const yg = b.svg`
2528
- font-size: 42px;
2529
- `, Sr = b.line`
2530
- fill: none;
2531
- stroke: #ffffff;
2532
- stroke-miterlimit: 10;
2533
- stroke-width: 7;
2534
- `, ie = b.path.attrs(
2535
- ({ isHidden: e }) => ({
2536
- style: { opacity: e ? 0 : 1 }
2537
- })
2538
- )`
2539
- fill: ${({ rayColor: e }) => e};
2540
- `, se = b.polygon.attrs(({ isHidden: e }) => ({
2541
- style: { opacity: e ? 0 : 1 }
2542
- }))`
2543
- fill: ${({ arrowColor: e }) => e};
2544
- `, mg = b.polygon`
2545
- fill: none;
2546
- stroke: #ffffff;
2547
- stroke-miterlimit: 10;
2548
- stroke-width: 12;
2549
- `, _g = b.line`
2550
- fill: none;
2551
- stroke-linecap: round;
2552
- stroke-miterlimit: 10;
2553
- stroke-width: 27.27;
2554
- `, $g = ({
2555
- selectedColor: e = "none",
2556
- selectionCallback: t,
2557
- isReadOnly: r = !1
2558
- }) => {
2559
- const { t: a } = ne(), o = {
2560
- violet: "#861cff",
2561
- blue: "#0019ff",
2562
- green: "#6bd853",
2563
- yellow: "#ffdd15",
2564
- orange: "#f18922",
2565
- red: "#ec1c24",
2566
- none: "transparent"
2567
- }, s = Object.keys(o).map((u) => ({
2568
- value: u,
2569
- label: a(`filterTool.colors.${u}`),
2570
- icon: /* @__PURE__ */ i(Zn, { color: u, size: "small" })
2571
- })), l = (u) => e !== u && e !== "none", f = a("filterTool.selectLabel");
2572
- return /* @__PURE__ */ w(vg, { children: [
2573
- /* @__PURE__ */ w(
2574
- yg,
2575
- {
2576
- version: "1.1",
2577
- viewBox: "0 0 1551.6 736.7",
2578
- "aria-describedby": "filterTitle",
2579
- children: [
2580
- /* @__PURE__ */ w("defs", { children: [
2581
- /* @__PURE__ */ w("linearGradient", { id: "no-arrow-red", children: [
2582
- /* @__PURE__ */ i("stop", { offset: "0%", stopColor: o.red }),
2583
- /* @__PURE__ */ i("stop", { offset: "81%", stopColor: o.red }),
2584
- /* @__PURE__ */ i("stop", { offset: "81%", stopColor: "transparent" }),
2585
- /* @__PURE__ */ i("stop", { offset: "100%", stopColor: "transparent" })
2586
- ] }),
2587
- /* @__PURE__ */ w("linearGradient", { id: "no-arrow-orange", children: [
2588
- /* @__PURE__ */ i("stop", { offset: "0%", stopColor: o.orange }),
2589
- /* @__PURE__ */ i("stop", { offset: "80%", stopColor: o.orange }),
2590
- /* @__PURE__ */ i("stop", { offset: "80%", stopColor: "transparent" }),
2591
- /* @__PURE__ */ i("stop", { offset: "100%", stopColor: "transparent" })
2592
- ] }),
2593
- /* @__PURE__ */ w("linearGradient", { id: "no-arrow-yellow", children: [
2594
- /* @__PURE__ */ i("stop", { offset: "0%", stopColor: o.yellow }),
2595
- /* @__PURE__ */ i("stop", { offset: "79%", stopColor: o.yellow }),
2596
- /* @__PURE__ */ i("stop", { offset: "79%", stopColor: "transparent" }),
2597
- /* @__PURE__ */ i("stop", { offset: "100%", stopColor: "transparent" })
2598
- ] }),
2599
- /* @__PURE__ */ w("linearGradient", { id: "no-arrow-green", children: [
2600
- /* @__PURE__ */ i("stop", { offset: "0%", stopColor: o.green }),
2601
- /* @__PURE__ */ i("stop", { offset: "78%", stopColor: o.green }),
2602
- /* @__PURE__ */ i("stop", { offset: "78%", stopColor: "transparent" }),
2603
- /* @__PURE__ */ i("stop", { offset: "100%", stopColor: "transparent" })
2604
- ] }),
2605
- /* @__PURE__ */ w("linearGradient", { id: "no-arrow-blue", children: [
2606
- /* @__PURE__ */ i("stop", { offset: "0%", stopColor: o.blue }),
2607
- /* @__PURE__ */ i("stop", { offset: "77%", stopColor: o.blue }),
2608
- /* @__PURE__ */ i("stop", { offset: "77%", stopColor: "transparent" }),
2609
- /* @__PURE__ */ i("stop", { offset: "100%", stopColor: "transparent" })
2610
- ] }),
2611
- /* @__PURE__ */ w("linearGradient", { id: "no-arrow-violet", children: [
2612
- /* @__PURE__ */ i("stop", { offset: "0%", stopColor: o.violet }),
2613
- /* @__PURE__ */ i("stop", { offset: "77%", stopColor: o.violet }),
2614
- /* @__PURE__ */ i("stop", { offset: "77%", stopColor: "transparent" }),
2615
- /* @__PURE__ */ i("stop", { offset: "100%", stopColor: "transparent" })
2616
- ] })
2617
- ] }),
2618
- /* @__PURE__ */ w(
2619
- "radialGradient",
2620
- {
2621
- id: "gradient_1_",
2622
- cx: "718.4264",
2623
- cy: "-294.6529",
2624
- r: "417.8",
2625
- fx: "638.9412",
2626
- fy: "-303.5418",
2627
- gradientTransform: "matrix(1 0 0 1 0 534)",
2628
- gradientUnits: "userSpaceOnUse",
2629
- children: [
2630
- /* @__PURE__ */ i("stop", { offset: "0.12", style: { stopColor: "#FFFFFF" } }),
2631
- /* @__PURE__ */ i("stop", { offset: "1", style: { stopColor: "#000000" } })
2632
- ]
2633
- }
2634
- ),
2635
- /* @__PURE__ */ i(
2636
- "polygon",
2637
- {
2638
- id: "gradient",
2639
- points: "653.2,127 867.4,498 438.9,498",
2640
- fill: "url(#gradient_1_)",
2641
- style: { opacity: 0.3 }
2642
- }
2643
- ),
2644
- /* @__PURE__ */ i("text", { transform: "matrix(1 0 0 1 1206.5464 164.1372)", fill: "#ffffff", children: /* @__PURE__ */ i(me, { i18nKey: "filterTool.filter" }) }),
2645
- /* @__PURE__ */ i(
2646
- Sr,
2647
- {
2648
- id: "white_ray",
2649
- x1: "108.2",
2650
- y1: "463.3",
2651
- x2: "546.1",
2652
- y2: "312.5"
2653
- }
2654
- ),
2655
- /* @__PURE__ */ i(
2656
- Sr,
2657
- {
2658
- id: "white_light_arrow_line",
2659
- x1: "376.8",
2660
- y1: "327.9",
2661
- x2: "430",
2662
- y2: "309.6"
2663
- }
2664
- ),
2665
- /* @__PURE__ */ i(
2666
- "polygon",
2667
- {
2668
- id: "white_light_arrow",
2669
- points: "420.7,325.4 428.1,310.3 413,302.9 422.5,299.7 437.6,307 430.2,322.1",
2670
- fill: "#ffffff"
2671
- }
2672
- ),
2673
- /* @__PURE__ */ i(
2674
- "text",
2675
- {
2676
- transform: "matrix(0.9446 -0.3282 0.3282 0.9446 152.0965 417.697)",
2677
- fill: "#ffffff",
2678
- children: /* @__PURE__ */ i(me, { i18nKey: "filterTool.whiteLight" })
2679
- }
2680
- ),
2681
- /* @__PURE__ */ i("text", { transform: "matrix(1 0 0 1 598.2964 606.0872)", fill: "#ffffff", children: /* @__PURE__ */ i(me, { i18nKey: "filterTool.prism" }) }),
2682
- /* @__PURE__ */ w("g", { id: "rays_out", children: [
2683
- /* @__PURE__ */ i(
2684
- ie,
2685
- {
2686
- id: "violet_ray",
2687
- rayColor: o.violet,
2688
- isHidden: l("violet"),
2689
- d: "M546.1,312.5l212.8,1.9h0.4l0.5,0.2L1396,522.8c6.9,2.3,10.7,9.7,8.5,16.7s-9.7,10.7-16.7,8.5l0,0l-0.4-0.1L757.8,320.4l0.9,0.2L546.1,312.5z"
2690
- }
2691
- ),
2692
- /* @__PURE__ */ i(
2693
- se,
2694
- {
2695
- id: "violet_arrow",
2696
- arrowColor: o.violet,
2697
- isHidden: l("violet"),
2698
- points: "1426.5,547.9 1353.2,550.6 1377.9,530.1 1372.3,498.5"
2699
- }
2700
- ),
2701
- /* @__PURE__ */ i(
2702
- ie,
2703
- {
2704
- id: "blue_ray",
2705
- rayColor: o.blue,
2706
- isHidden: l("blue"),
2707
- d: "M546.1,312.4l206.5-4.4h0.4l0.4,0.1l641.1,164c7,1.8,11.2,8.9,9.4,15.9c-1.8,7-8.9,11.2-15.9,9.4l-0.4-0.1L751.8,313.8l0.8,0.1L546.1,312.4z"
2708
- }
2709
- ),
2710
- /* @__PURE__ */ i(
2711
- se,
2712
- {
2713
- id: "blue_arrow",
2714
- arrowColor: o.blue,
2715
- isHidden: l("blue"),
2716
- points: "1431.5,496.4 1358.6,504.1 1381.8,482 1374.1,450.9"
2717
- }
2718
- ),
2719
- /* @__PURE__ */ i(
2720
- ie,
2721
- {
2722
- id: "green_ray",
2723
- rayColor: o.green,
2724
- isHidden: l("green"),
2725
- d: "M547.8,312l200.6-10.6h0.3l0.4,0.1l644.8,120.3c7,1.4,11.5,8.2,10.1,15.2c-1.4,6.9-8,11.4-14.9,10.2l-0.4-0.1L747.8,307.4l0.7,0.1L547.8,312z"
2726
- }
2727
- ),
2728
- /* @__PURE__ */ i(
2729
- se,
2730
- {
2731
- id: "green_arrow",
2732
- arrowColor: o.green,
2733
- isHidden: l("green"),
2734
- points: "1437.9,443.4 1366.1,458.4 1387,434.1 1376.2,403.9"
2735
- }
2736
- ),
2737
- /* @__PURE__ */ i(
2738
- ie,
2739
- {
2740
- id: "yellow_ray",
2741
- rayColor: o.yellow,
2742
- isHidden: l("yellow"),
2743
- d: "M546.1,312.5l205.8-17.3h0.3h0.4l640.4,75.3c7.1,0.8,12.2,7.2,11.3,14.3c-0.8,7.1-7.2,12.2-14.3,11.3l-0.4-0.1l-637.9-94.5h0.6L546.1,312.5z"
2744
- }
2745
- ),
2746
- /* @__PURE__ */ i(
2747
- se,
2748
- {
2749
- id: "yellow_arrow",
2750
- arrowColor: o.yellow,
2751
- isHidden: l("yellow"),
2752
- points: "1438.9,389.7 1368,408.2 1387.6,382.8 1375.4,353.3"
2753
- }
2754
- ),
2755
- /* @__PURE__ */ i(
2756
- ie,
2757
- {
2758
- id: "orange_ray",
2759
- rayColor: o.orange,
2760
- isHidden: l("orange"),
2761
- d: "M546.1,311l189.3-21.8h0.2h0.3l656.5,33.3c7,0.4,12.4,6.3,12,13.3s-6.3,12.4-13.3,12h-0.4l-655.2-52.9h0.5L546.1,311z"
2762
- }
2763
- ),
2764
- /* @__PURE__ */ i(
2765
- se,
2766
- {
2767
- id: "orange_arrow",
2768
- arrowColor: o.orange,
2769
- isHidden: l("orange"),
2770
- points: "1443.7,340.3 1373.9,362.8 1392.1,336.4 1378.2,307.5"
2771
- }
2772
- ),
2773
- /* @__PURE__ */ i(
2774
- ie,
2775
- {
2776
- id: "red_ray",
2777
- rayColor: o.red,
2778
- isHidden: l("red"),
2779
- d: "M546.1,311L730,283.9h0.1h0.2l661.4-9.9c6.9-0.1,12.6,5.4,12.7,12.3s-5.4,12.6-12.3,12.7h-0.4l-661.4-9.8h0.4L546.1,311z"
2780
- }
2781
- ),
2782
- /* @__PURE__ */ i(
2783
- se,
2784
- {
2785
- id: "red_arrow",
2786
- arrowColor: o.red,
2787
- isHidden: l("red"),
2788
- points: "1441.9,290 1372.4,313.2 1390.3,286.6 1376.1,257.9"
2789
- }
2790
- )
2791
- ] }),
2792
- /* @__PURE__ */ i(
2793
- _g,
2794
- {
2795
- id: "filter",
2796
- x1: "1255.6",
2797
- y1: "235.7",
2798
- x2: "1193.1",
2799
- y2: "550.3",
2800
- stroke: o[e],
2801
- fill: "#ffffff"
2802
- }
2803
- ),
2804
- /* @__PURE__ */ i(
2805
- mg,
2806
- {
2807
- id: "outline",
2808
- points: "653.2,127 760.3,312.5 867.4,498 653.2,498 438.9,498 546.1,312.5 "
2809
- }
2810
- )
2811
- ]
2812
- }
2813
- ),
2814
- /* @__PURE__ */ i(bg, { children: /* @__PURE__ */ i(
2815
- ft,
2816
- {
2817
- options: s,
2818
- isDisabled: r,
2819
- value: e,
2820
- onChangeCallback: (u) => t && t(u || "none"),
2821
- labelledById: "color-select",
2822
- placeholder: f,
2823
- maxWidth: "100%",
2824
- width: "200px"
2825
- }
2826
- ) })
2827
- ] });
2828
- };
2829
- $g.displayName = "Widgets.FilterTool";
2830
- const Cg = b.div`
2831
- position: relative;
2832
- min-width: var(--BREAK_MOBILE_MIN, 280px);
2833
-
2834
- @media print {
2835
- width: var(--BREAK_MOBILE_MIN, 280px);
2836
- }
2837
- `;
2838
- function wg(e, t) {
2839
- const r = dt();
2840
- V(() => {
2841
- r.current = e;
2842
- }, [e]), V(() => {
2843
- function a() {
2844
- r.current && r.current();
2845
- }
2846
- if (t !== null) {
2847
- let o = setInterval(a, t);
2848
- return () => clearInterval(o);
2849
- }
2850
- }, [t]);
2851
- }
2852
- const vn = b.div`
2853
- display: flex;
2854
- justify-content: center;
2855
- align-items: center;
2856
- width: 44px;
2857
- height: 44px;
2858
- border-radius: 22px;
2859
- background-color: var(--button-background-color);
2860
- color: var(--neutral95, #1f2121);
2861
- `, xg = b.button`
2862
- --button-color: var(--white, #fff);
2863
- --button-background-color: var(--neutral15, #e6e6e6);
2864
-
2865
- background: transparent;
2866
- border: none;
2867
- color: var(--button-color);
2868
- cursor: pointer;
2869
- display: flex;
2870
- flex-direction: column;
2871
- align-items: center;
2872
- gap: 0.75em;
2873
- text-align: center;
2874
- padding: 0;
2875
- margin: 0;
2876
-
2877
- &:not(:disabled):not([aria-disabled="true"]):hover,
2878
- &:not(:disabled):not([aria-disabled="true"]):focus-visible,
2879
- &:not(:disabled):not([aria-disabled="true"]).focus-visible {
2880
- text-decoration: underline;
2881
-
2882
- ${vn} {
2883
- outline: 1px solid var(--white, #fff);
2884
- outline-offset: 1px;
2885
- }
2886
- }
2887
- &:not(:disabled):not([aria-disabled="true"]):focus {
2888
- outline: none;
2889
- }
2890
- `, je = ({
2891
- icon: e,
2892
- label: t,
2893
- handleClick: r,
2894
- ...a
2895
- }) => /* @__PURE__ */ w(xg, { ...a, onClick: r, children: [
2896
- /* @__PURE__ */ i(vn, { children: /* @__PURE__ */ i(Rr, { icon: e, size: 15 }) }),
2897
- /* @__PURE__ */ i("span", { children: t })
2898
- ] });
2899
- je.displayName = "Atomic.PlaybackControl";
2900
- const Tg = b.div`
2901
- display: grid;
2902
- grid-template-columns: repeat(3, 1fr);
2903
- grid-template-rows: 1fr;
2904
- gap: 0.5em;
2905
- color: var(--white, #fff);
2906
- align-items: center;
2907
- justify-items: center;
2908
- width: fit-content;
2909
- font-size: 0.75em;
2910
- text-align: center;
2911
- z-index: 1;
2912
- `, bn = ({
2913
- playing: e,
2914
- handleStartStop: t,
2915
- handleNext: r,
2916
- handlePrevious: a,
2917
- className: o,
2918
- isDisabled: s
2919
- }) => {
2920
- const { t: l } = ne();
2921
- return /* @__PURE__ */ w(
2922
- Tg,
2923
- {
2924
- "data-testid": "blinker-controls",
2925
- className: o,
2926
- children: [
2927
- /* @__PURE__ */ i(
2928
- je,
2929
- {
2930
- "data-testid": "blinker-rewind",
2931
- icon: "Rewind",
2932
- label: l("blinker.controls.rewind"),
2933
- handleClick: a,
2934
- disabled: s
2935
- }
2936
- ),
2937
- /* @__PURE__ */ i(
2938
- je,
2939
- {
2940
- "data-testid": "blinker-start-stop",
2941
- icon: e ? "Pause" : "Play",
2942
- label: l(e ? "blinker.controls.pause" : "blinker.controls.play"),
2943
- handleClick: t,
2944
- disabled: s
2945
- }
2946
- ),
2947
- /* @__PURE__ */ i(
2948
- je,
2949
- {
2950
- "data-testid": "blinker-forward",
2951
- icon: "Forward",
2952
- label: l("blinker.controls.forward"),
2953
- handleClick: r,
2954
- disabled: s
2955
- }
2956
- )
2957
- ]
2958
- }
2959
- );
2960
- };
2961
- bn.displayName = "Atomic.Blinker.Controls";
2962
- const Ag = b.div`
2963
- background-color: var(--neutral95, #1f2121);
2964
- display: flex;
2965
- justify-content: center;
2966
- align-items: center;
2967
- position: relative;
2968
- `, Sg = b.div`
2969
- transition: opacity ease var(--DURATION_SLOW, 0.4s);
2970
-
2971
- ${({ isLoading: e }) => e ? j`
2972
- opacity: 0;
2973
- ` : j`
2974
- opacity: 1;
2975
- `}
2976
- `, Eg = b.img`
2977
- position: absolute;
2978
- top: 0;
2979
- right: 0;
2980
- bottom: 0;
2981
- left: 0;
2982
- width: 100%;
2983
- height: 100%;
2984
- user-select: none;
2985
- -webkit-user-drag: none;
2986
- -khtml-user-drag: none;
2987
- -moz-user-drag: none;
2988
- -o-user-drag: none;
2989
- -ms-user-drag: none;
2990
- user-drag: none;
2991
-
2992
- ${({ active: e }) => e ? j`
2993
- visibility: visible;
2994
- ` : j`
2995
- visibility: hidden;
2996
- `}
2997
- `, yn = ({
2998
- image: e,
2999
- active: t,
3000
- loadCallback: r
3001
- }) => {
3002
- const { url: a, altText: o } = e;
3003
- return /* @__PURE__ */ i(
3004
- Eg,
3005
- {
3006
- alt: o,
3007
- src: a,
3008
- onLoad: r,
3009
- active: t
3010
- }
3011
- );
3012
- };
3013
- yn.displayName = "Atomic.Blinker.Image";
3014
- const mn = ({
3015
- images: e = [],
3016
- activeIndex: t,
3017
- className: r,
3018
- loadedCallback: a
3019
- }) => {
3020
- const [o, s] = W(0), [l, f] = W(!0), u = () => {
3021
- s((d) => d + 1);
3022
- };
3023
- return V(() => {
3024
- f(o !== e.length), l || a && a();
3025
- }, [o, l]), /* @__PURE__ */ w(Ag, { "data-testid": "blinker-images", className: r, children: [
3026
- !o && /* @__PURE__ */ i(Qn, { isVisible: l }),
3027
- /* @__PURE__ */ i(Sg, { isLoading: l, children: e.map((d, v) => {
3028
- const { url: h } = d;
3029
- return /* @__PURE__ */ i(
3030
- yn,
3031
- {
3032
- image: d,
3033
- active: t === v,
3034
- loadCallback: u
3035
- },
3036
- h
3037
- );
3038
- }) })
3039
- ] });
3040
- };
3041
- mn.displayName = "Atomic.Blinker.Images";
3042
- const Og = b.div`
3043
- display: grid;
3044
- grid-template-columns: 1fr;
3045
- grid-template-rows: 1fr min-content;
3046
- justify-items: center;
3047
- position: relative;
3048
- height: 100%;
3049
- `, Ig = b(bn)`
3050
- grid-row: 2;
3051
-
3052
- ${({ isCondensed: e }) => e ? j`
3053
- margin-block-start: var(--PADDING_SMALL, 20px);
3054
- ` : j`
3055
- margin-block-end: var(--PADDING_SMALL, 20px);
3056
- `}
3057
- `, Pg = b(mn)`
3058
- aspect-ratio: 1;
3059
- width: 100%;
3060
-
3061
- ${({ isCondensed: e }) => e ? j`
3062
- grid-row: 1;
3063
- ` : j`
3064
- position: absolute;
3065
- grid-row: span 2;
3066
- `};
3067
- `, _n = ({
3068
- images: e = [],
3069
- activeIndex: t = 0,
3070
- autoplay: r = !0,
3071
- loop: a = !0,
3072
- interval: o = 200,
3073
- blinkCallback: s,
3074
- loadedCallback: l,
3075
- className: f
3076
- }) => {
3077
- const { ref: u, width: d = 1 } = ut(), [v, h] = W(r), [p, $] = W(t), [m, x] = W(!1), { BREAK_MOBILE: S } = Ir, y = e.length > 1, C = d < parseInt(S);
3078
- V(() => {
3079
- s && s(p);
3080
- }, [p]), V(() => {
3081
- m && l && l();
3082
- }, [m]);
3083
- const F = (N = 0) => {
3084
- const z = e.length - 1;
3085
- return Aa(p + N, z);
3086
- }, L = () => {
3087
- if (y) {
3088
- const N = F(1);
3089
- a === !1 && N === e.length - 1 && M(), $(N);
3090
- }
3091
- }, M = () => {
3092
- h(!1);
3093
- }, X = () => {
3094
- h((N) => !N);
3095
- }, B = () => {
3096
- M(), L();
3097
- }, H = () => {
3098
- M(), $(F(-1));
3099
- };
3100
- return wg(L, y && m && v ? o : null), /* @__PURE__ */ w(
3101
- Og,
3102
- {
3103
- className: f,
3104
- ref: u,
3105
- isCondensed: C,
3106
- children: [
3107
- /* @__PURE__ */ i(
3108
- Pg,
3109
- {
3110
- loadedCallback: () => x(!0),
3111
- images: e,
3112
- activeIndex: p,
3113
- isCondensed: C
3114
- }
3115
- ),
3116
- y && /* @__PURE__ */ i(
3117
- Ig,
3118
- {
3119
- isDisabled: !m,
3120
- playing: v,
3121
- handleStartStop: X,
3122
- handleNext: B,
3123
- handlePrevious: H,
3124
- isCondensed: C
3125
- }
3126
- )
3127
- ]
3128
- }
3129
- );
3130
- };
3131
- _n.displayName = "Atomic.Blinker";
3132
- const Rg = b.div`
3133
- background-color: var(--neutral20, #dce0e3);
3134
- border-radius: 5px;
3135
- color: var(--neutral95, "#1F2121");
3136
- display: grid;
3137
- grid-template-areas: "header" "time";
3138
- font-size: 0.75em;
3139
- font-weight: var(--FONT_WEIGHT_NORMAL, 400);
3140
- min-width: 70px;
3141
- max-width: fit-content;
3142
- `, Lg = b.h2`
3143
- border-bottom: 1px solid var(--neutral95, "#1F2121");
3144
- font-weight: inherit;
3145
- font-size: 1em;
3146
- line-height: 1;
3147
- grid-area: header;
3148
- text-align: center;
3149
- margin: 0;
3150
- padding: 0.5em 0.75em;
3151
- `, jg = b.time`
3152
- grid-area: time;
3153
- display: grid;
3154
- grid-auto-flow: column;
3155
- grid-template-rows: 1fr;
3156
- grid-auto-columns: 1fr;
3157
- `, Mg = b.div`
3158
- display: flex;
3159
- flex-direction: column;
3160
- align-items: center;
3161
- padding: 0.25em 0.5em;
3162
- line-height: 1.6;
3163
-
3164
- &:not(:first-of-type) {
3165
- border-left: 1px solid var(--neutral95, "#1F2121");
3166
- }
3167
- `, kg = b.span`
3168
- font-size: 1.167em;
3169
- `, Dg = b.span`
3170
- font-size: 0.6em;
3171
- `, $n = ({
3172
- year: e,
3173
- day: t,
3174
- hour: r,
3175
- minute: a,
3176
- second: o,
3177
- className: s
3178
- }) => {
3179
- const l = { year: e, day: t, hour: r, minute: a, second: o }, f = Object.keys(l).filter((d) => l[d] !== void 0).map((d) => ({
3180
- interval: d,
3181
- time: l[d]
3182
- })), u = f.reduce((d, v) => {
3183
- const { interval: h, time: p = 0 } = v;
3184
- return `${d}${p}${h.charAt(0).toUpperCase()}`;
3185
- }, "PT");
3186
- return /* @__PURE__ */ w(Rg, { className: s, children: [
3187
- /* @__PURE__ */ i(Lg, { id: "elapsedTimeHeader", children: /* @__PURE__ */ i(me, { children: "elapsed_time.title" }) }),
3188
- /* @__PURE__ */ i(jg, { dateTime: u, "aria-labelledby": "elapsedTimeHeader", children: f.map((d) => {
3189
- const { interval: v, time: h = 0 } = d, p = `elapsed_time.step.${v}`;
3190
- return /* @__PURE__ */ w(Mg, { children: [
3191
- /* @__PURE__ */ i(kg, { children: h }),
3192
- /* @__PURE__ */ i(Dg, { children: /* @__PURE__ */ i(me, { i18nKey: p, count: h }) })
3193
- ] }, v);
3194
- }) })
3195
- ] });
3196
- };
3197
- $n.displayName = "Atomic.ElapsedTime";
3198
- const Fg = b(Cg)`
3199
- ${({ width: e, height: t }) => j`
3200
- aspect-ratio: ${e} / ${t};
3201
- max-width: ${e}px;
3202
- max-height: ${t}px;
3203
- `}
3204
- `, Ng = b.svg`
3205
- position: absolute;
3206
- top: 0;
3207
- left: 0;
3208
- cursor: ${({ isDisplayOnly: e }) => e ? "default" : "pointer"};
3209
- `, Bg = b(_n)`
3210
- position: absolute;
3211
- width: 100%;
3212
- height: 100%;
3213
- `, Gg = b($n)`
3214
- position: absolute;
3215
- right: var(--PADDING_SMALL, 20px);
3216
- bottom: var(--PADDING_SMALL, 20px);
3217
- `, Wg = b.circle`
3218
- cursor: pointer;
3219
- transition: fill ease var(--DURATION, 0.2s), r ease-out 400ms;
3220
- ${({ isSelected: e }) => e && j`
3221
- stroke-width: 3;
3222
- `}
3223
-
3224
- &:focus {
3225
- outline: none;
3226
- }
3227
- `, Cn = ({
3228
- type: e,
3229
- id: t,
3230
- isActive: r,
3231
- isSelected: a,
3232
- x: o,
3233
- y: s,
3234
- radius: l,
3235
- className: f,
3236
- color: u
3237
- }) => {
3238
- const d = {
3239
- supernova: 20,
3240
- galaxy: 60,
3241
- galaxyFilter: 25
3242
- }, v = (m, x) => {
3243
- if (x)
3244
- return Math.abs(x);
3245
- const { [m]: S = 8 } = d;
3246
- return S;
3247
- }, h = (m, x, S) => m ? "#fed828" : x ? S : "transparent", p = v(e, l), $ = Math.max(10, p * 1.2);
3248
- return /* @__PURE__ */ i(
3249
- Wg,
3250
- {
3251
- "data-id": t,
3252
- "data-type": e,
3253
- cx: o,
3254
- cy: s,
3255
- r: r ? $ : p,
3256
- fill: "transparent",
3257
- stroke: h(r, a, u),
3258
- tabIndex: 0,
3259
- role: "listitem",
3260
- isSelected: a,
3261
- className: f
3262
- }
3263
- );
3264
- };
3265
- Cn.displayName = "Widgets.SourceSelector.Point";
3266
- const wn = ({
3267
- sources: e = [],
3268
- selectedSource: t = [],
3269
- activeType: r,
3270
- className: a,
3271
- xScale: o,
3272
- yScale: s,
3273
- color: l
3274
- }) => /* @__PURE__ */ i("g", { className: a, role: "list", children: e.map((f) => {
3275
- const { type: u, id: d, color: v, radius: h = NaN, x: p, y: $ } = f, m = 0.6 * h, x = t.some(
3276
- (y) => y.id === d && y.type === u
3277
- );
3278
- return /* @__PURE__ */ i(
3279
- Cn,
3280
- {
3281
- id: d,
3282
- type: u,
3283
- isActive: r ? r === u : !1,
3284
- isSelected: x,
3285
- className: a,
3286
- radius: o(p - m) - o(p + m),
3287
- x: o(p),
3288
- y: s($),
3289
- color: l || v
3290
- },
3291
- `point-${u}-${d}`
3292
- );
3293
- }) });
3294
- wn.displayName = "Widgets.SourceSelector.Points";
3295
- const Hg = b(ea)`
3296
- position: absolute;
3297
- top: 0;
3298
- left: 0;
3299
- z-index: 1;
3300
- display: flex;
3301
- align-items: center;
3302
- justify-content: center;
3303
- gap: 1ch;
3304
- width: 100%;
3305
- height: ${({ isOpen: e }) => e ? 24 : 0}px;
3306
- overflow: hidden;
3307
- background-color: var(--black, #000);
3308
- color: #30e0e3;
3309
- font-size: 1rem;
3310
- font-weight: var(--FONT_WEIGHT_BOLD, 600);
3311
- text-align: center;
3312
- transition: height ease var(--DURATION_SLOW, 0.4s);
3313
-
3314
- @media (prefers-reduced-motion) {
3315
- transition: unset;
3316
- }
3317
- `, xn = ({
3318
- children: e,
3319
- isVisible: t = !1,
3320
- onMessageChangeCallback: r,
3321
- forIds: a
3322
- }) => (V(() => {
3323
- if (t) {
3324
- const o = setTimeout(() => {
3325
- r && r();
3326
- }, 1800);
3327
- return () => clearTimeout(o);
3328
- }
3329
- }, [e, t]), /* @__PURE__ */ i(Hg, { forIds: a, isOpen: t, children: e }));
3330
- xn.displayName = "Widgets.SourceSelector.Message";
3331
- const Er = (e, t) => {
3332
- const [r, a] = e, [o, s] = t;
3333
- return (l) => l / (a - r) * (s - o) + o;
3334
- }, zg = ({
3335
- width: e = 600,
3336
- height: t = 600,
3337
- selectedSource: r = [],
3338
- sources: a,
3339
- alerts: o,
3340
- images: s,
3341
- selectionCallback: l,
3342
- blinkConfig: f,
3343
- color: u,
3344
- isDisplayOnly: d = !1
3345
- }) => {
3346
- const [v, h] = W(r), [p, $] = W(!1), [m, x] = W(), [S, y] = W(!1), [C, F] = W(null), { t: L } = ne(), M = "sourceSelectorWidget";
3347
- V(() => {
3348
- l && l(v);
3349
- }, [v]);
3350
- const X = (z, Y, U) => z.filter((k) => k.id === Y && k.type === U), B = (z) => {
3351
- if (p && !d) {
3352
- const { target: Y } = z, { id: U, type: k } = Y.dataset;
3353
- if (U && k) {
3354
- if (!(X(v, U, k).length > 0)) {
3355
- const te = X(a, U, k);
3356
- h((xe) => xe.concat(te)), x(
3357
- /* @__PURE__ */ w(ee, { children: [
3358
- /* @__PURE__ */ i(Rr, { icon: "checkmark" }),
3359
- L("source_selector.messages.success")
3360
- ] })
3361
- ), y(!0);
3362
- }
3363
- } else
3364
- x(L("source_selector.messages.failure")), y(!0);
3365
- }
3366
- };
3367
- return /* @__PURE__ */ w(Fg, { width: e, height: t, children: [
3368
- !d && /* @__PURE__ */ i(
3369
- xn,
3370
- {
3371
- onMessageChangeCallback: () => {
3372
- y(!1);
3373
- },
3374
- isVisible: S,
3375
- forIds: [M],
3376
- children: m
3377
- }
3378
- ),
3379
- /* @__PURE__ */ i(
3380
- Bg,
3381
- {
3382
- images: s,
3383
- blinkCallback: (z) => {
3384
- if (o && o.length > 1) {
3385
- const U = o[z].date - o[0].date;
3386
- F({
3387
- day: Math.round(U),
3388
- hour: Math.round(24 / U % 24) || 0
3389
- });
3390
- }
3391
- },
3392
- loadedCallback: () => $(!0),
3393
- ...f
3394
- }
3395
- ),
3396
- C && /* @__PURE__ */ i(Gg, { ...C }),
3397
- /* @__PURE__ */ i(
3398
- Ng,
3399
- {
3400
- preserveAspectRatio: "xMidYMid meet",
3401
- viewBox: `0 0 ${e} ${t}`,
3402
- onClick: B,
3403
- id: M,
3404
- isDisplayOnly: d,
3405
- children: /* @__PURE__ */ i(
3406
- wn,
3407
- {
3408
- xScale: Er([0, e], [0, e]),
3409
- yScale: Er([0, t], [t, 0]),
3410
- color: u,
3411
- sources: a,
3412
- selectedSource: v
3413
- }
3414
- )
3415
- }
3416
- )
3417
- ] });
3418
- };
3419
- zg.displayName = "Widgets.SourceSelector";
3420
- export {
3421
- Ea as CameraFilter,
3422
- hg as ColorTool,
3423
- $g as FilterTool,
3424
- Qg as GlobalStyles,
3425
- zg as SourceSelector,
3426
- Jg as localeStrings
3427
- };