@tradecanvas/chart 1.50.0 → 1.52.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.
- package/README.md +1 -1
- package/dist/Chart.d.ts +194 -11
- package/dist/Chart.d.ts.map +1 -1
- package/dist/DataManager.d.ts +24 -0
- package/dist/DataManager.d.ts.map +1 -1
- package/dist/{LayoutSession-Dcvn5KMK.js → LayoutSession-4SLt8-0u.js} +676 -386
- package/dist/LayoutSession-4SLt8-0u.js.map +1 -0
- package/dist/LayoutSession-BOtFzvMm.cjs +2 -0
- package/dist/LayoutSession-BOtFzvMm.cjs.map +1 -0
- package/dist/SeriesStore.d.ts +31 -0
- package/dist/SeriesStore.d.ts.map +1 -1
- package/dist/charts/ChartTypeStrategy.d.ts +32 -5
- package/dist/charts/ChartTypeStrategy.d.ts.map +1 -1
- package/dist/finance/performanceData.d.ts +17 -2
- package/dist/finance/performanceData.d.ts.map +1 -1
- package/dist/frameworks/feedBars.d.ts +22 -6
- package/dist/frameworks/feedBars.d.ts.map +1 -1
- package/dist/i18n-BjW5GVrO.cjs +2 -0
- package/dist/i18n-BjW5GVrO.cjs.map +1 -0
- package/dist/{i18n-DjzoHpMJ.js → i18n-C7b-2BJ5.js} +33 -1
- package/dist/i18n-C7b-2BJ5.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +122 -98
- package/dist/index.js.map +1 -1
- package/dist/io/resampleOHLCV.d.ts +10 -4
- package/dist/io/resampleOHLCV.d.ts.map +1 -1
- package/dist/layout/labelWidths.d.ts +16 -0
- package/dist/layout/labelWidths.d.ts.map +1 -0
- package/dist/widget/ChartWidget.d.ts +278 -15
- package/dist/widget/ChartWidget.d.ts.map +1 -1
- package/dist/widget/ChartWidgetGrid.d.ts.map +1 -1
- package/dist/widget/WatchlistStore.d.ts.map +1 -1
- package/dist/widget/WidgetContextMenu.d.ts +25 -3
- package/dist/widget/WidgetContextMenu.d.ts.map +1 -1
- package/dist/widget/WidgetDataWindow.d.ts +7 -0
- package/dist/widget/WidgetDataWindow.d.ts.map +1 -1
- package/dist/widget/WidgetHotkeySheet.d.ts.map +1 -1
- package/dist/widget/WidgetIndicatorLegend.d.ts +23 -3
- package/dist/widget/WidgetIndicatorLegend.d.ts.map +1 -1
- package/dist/widget/WidgetIndicatorSettings.d.ts.map +1 -1
- package/dist/widget/WidgetLayoutsUI.d.ts.map +1 -1
- package/dist/widget/WidgetObjectTree.d.ts +7 -1
- package/dist/widget/WidgetObjectTree.d.ts.map +1 -1
- package/dist/widget/WidgetSettings.d.ts +11 -3
- package/dist/widget/WidgetSettings.d.ts.map +1 -1
- package/dist/widget/WidgetStatusBar.d.ts +110 -3
- package/dist/widget/WidgetStatusBar.d.ts.map +1 -1
- package/dist/widget/WidgetSymbolSearch.d.ts +73 -20
- package/dist/widget/WidgetSymbolSearch.d.ts.map +1 -1
- package/dist/widget/WidgetToolbar.d.ts +65 -6
- package/dist/widget/WidgetToolbar.d.ts.map +1 -1
- package/dist/widget/WidgetTradeMenu.d.ts.map +1 -1
- package/dist/widget/chartSettingsStore.d.ts +76 -0
- package/dist/widget/chartSettingsStore.d.ts.map +1 -0
- package/dist/widget/chartTemplates.d.ts.map +1 -1
- package/dist/widget/compareLegend.d.ts +20 -0
- package/dist/widget/compareLegend.d.ts.map +1 -0
- package/dist/widget/hostButtons.d.ts +5 -2
- package/dist/widget/hostButtons.d.ts.map +1 -1
- package/dist/widget/index.cjs +542 -127
- package/dist/widget/index.cjs.map +1 -1
- package/dist/widget/index.d.ts +1 -1
- package/dist/widget/index.d.ts.map +1 -1
- package/dist/widget/index.js +2909 -1750
- package/dist/widget/index.js.map +1 -1
- package/dist/widget/indicatorInputWords.d.ts +19 -0
- package/dist/widget/indicatorInputWords.d.ts.map +1 -0
- package/dist/widget/locales/ar.d.ts.map +1 -1
- package/dist/widget/locales/cs.d.ts.map +1 -1
- package/dist/widget/locales/da.d.ts.map +1 -1
- package/dist/widget/locales/de.d.ts.map +1 -1
- package/dist/widget/locales/el.d.ts.map +1 -1
- package/dist/widget/locales/en.d.ts +16 -0
- package/dist/widget/locales/en.d.ts.map +1 -1
- package/dist/widget/locales/es.d.ts.map +1 -1
- package/dist/widget/locales/et.d.ts.map +1 -1
- package/dist/widget/locales/fa.d.ts.map +1 -1
- package/dist/widget/locales/fr.d.ts.map +1 -1
- package/dist/widget/locales/he.d.ts.map +1 -1
- package/dist/widget/locales/hu.d.ts.map +1 -1
- package/dist/widget/locales/id.d.ts.map +1 -1
- package/dist/widget/locales/index.cjs +1 -1
- package/dist/widget/locales/index.cjs.map +1 -1
- package/dist/widget/locales/index.js +449 -1
- package/dist/widget/locales/index.js.map +1 -1
- package/dist/widget/locales/it.d.ts.map +1 -1
- package/dist/widget/locales/ja.d.ts.map +1 -1
- package/dist/widget/locales/ko.d.ts.map +1 -1
- package/dist/widget/locales/ms.d.ts.map +1 -1
- package/dist/widget/locales/nb.d.ts.map +1 -1
- package/dist/widget/locales/nl.d.ts.map +1 -1
- package/dist/widget/locales/pl.d.ts.map +1 -1
- package/dist/widget/locales/pt.d.ts.map +1 -1
- package/dist/widget/locales/ro.d.ts.map +1 -1
- package/dist/widget/locales/ru.d.ts.map +1 -1
- package/dist/widget/locales/sk.d.ts.map +1 -1
- package/dist/widget/locales/sv.d.ts.map +1 -1
- package/dist/widget/locales/th.d.ts.map +1 -1
- package/dist/widget/locales/tr.d.ts.map +1 -1
- package/dist/widget/locales/vi.d.ts.map +1 -1
- package/dist/widget/locales/zh.d.ts.map +1 -1
- package/dist/widget/locales/zhHant.d.ts.map +1 -1
- package/dist/widget/selectMenu.d.ts.map +1 -1
- package/dist/widget/settingsRows.d.ts +12 -3
- package/dist/widget/settingsRows.d.ts.map +1 -1
- package/dist/widget/symbolBadge.d.ts +26 -0
- package/dist/widget/symbolBadge.d.ts.map +1 -0
- package/dist/widget/symbolCatalog.d.ts +62 -0
- package/dist/widget/symbolCatalog.d.ts.map +1 -0
- package/dist/widget/symbolCell.d.ts +8 -0
- package/dist/widget/symbolCell.d.ts.map +1 -0
- package/dist/widget/symbolInfoView.d.ts +3 -0
- package/dist/widget/symbolInfoView.d.ts.map +1 -1
- package/dist/widget/symbolMatch.d.ts +38 -0
- package/dist/widget/symbolMatch.d.ts.map +1 -0
- package/dist/widget/symbolSearchFilters.d.ts +52 -0
- package/dist/widget/symbolSearchFilters.d.ts.map +1 -0
- package/dist/widget/types.d.ts +88 -11
- package/dist/widget/types.d.ts.map +1 -1
- package/dist/widget/widgetCompare.d.ts +18 -0
- package/dist/widget/widgetCompare.d.ts.map +1 -1
- package/dist/widget/widgetLayout.d.ts +13 -1
- package/dist/widget/widgetLayout.d.ts.map +1 -1
- package/dist/widget/widgetSettingsLook.d.ts +3 -1
- package/dist/widget/widgetSettingsLook.d.ts.map +1 -1
- package/dist/widget/widgetShareState.d.ts +8 -0
- package/dist/widget/widgetShareState.d.ts.map +1 -1
- package/dist/widget/widgetTimezones.d.ts +4 -1
- package/dist/widget/widgetTimezones.d.ts.map +1 -1
- package/dist/widget/widgetUI.d.ts +2 -1
- package/dist/widget/widgetUI.d.ts.map +1 -1
- package/package.json +3 -3
- package/dist/LayoutSession-BBw0ke8V.cjs +0 -2
- package/dist/LayoutSession-BBw0ke8V.cjs.map +0 -1
- package/dist/LayoutSession-Dcvn5KMK.js.map +0 -1
- package/dist/i18n-DVeWlg64.cjs +0 -2
- package/dist/i18n-DVeWlg64.cjs.map +0 -1
- package/dist/i18n-DjzoHpMJ.js.map +0 -1
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
export interface IndicatorLegendRow {
|
|
2
2
|
instanceId: string;
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* A symbol compared in percent rather than an indicator: its row has no
|
|
5
|
+
* settings or more buttons, and its name opens nothing.
|
|
6
|
+
*/
|
|
7
|
+
kind?: 'compare';
|
|
8
|
+
/** "EMA 50", "MACD 12 26 9", "ETHUSDT". */
|
|
4
9
|
label: string;
|
|
10
|
+
/** The colour of the line the row stands for, marked before its name (a compare's, whose figures are in the text colour). */
|
|
11
|
+
swatch?: string;
|
|
5
12
|
visible: boolean;
|
|
6
13
|
/** On, but not drawn on the chart's interval (its settings keep it to others). */
|
|
7
14
|
offInterval?: boolean;
|
|
15
|
+
/** A compare on, but not drawn on the chart's type (Renko, Kagi and the like draw no compare lines). */
|
|
16
|
+
offChartType?: boolean;
|
|
8
17
|
/** The values at the bar in view; `color` null = the neutral text colour. */
|
|
9
18
|
values: readonly {
|
|
10
19
|
text: string;
|
|
@@ -36,9 +45,10 @@ export interface IndicatorLegendPane {
|
|
|
36
45
|
}
|
|
37
46
|
export type PaneAction = 'up' | 'down' | 'collapse' | 'expand' | 'maximize' | 'restore';
|
|
38
47
|
export interface IndicatorLegendCallbacks {
|
|
39
|
-
|
|
48
|
+
/** `kind` is the row's: 'compare' for a compare line, which is no indicator. */
|
|
49
|
+
onToggleVisible: (instanceId: string, visible: boolean, kind?: IndicatorLegendRow['kind']) => void;
|
|
40
50
|
onSettings: (instanceId: string) => void;
|
|
41
|
-
onRemove: (instanceId: string) => void;
|
|
51
|
+
onRemove: (instanceId: string, kind?: IndicatorLegendRow['kind']) => void;
|
|
42
52
|
/** The row's "more" button: a menu under `anchor` (move to another pane…). */
|
|
43
53
|
onMore?: (instanceId: string, anchor: HTMLElement) => void;
|
|
44
54
|
/** A pane's button: move it, fold it, maximise it. */
|
|
@@ -60,12 +70,16 @@ export interface IndicatorLegendLabels {
|
|
|
60
70
|
paneRestore?: string;
|
|
61
71
|
/** A row's note while its indicator isn't drawn on this interval. */
|
|
62
72
|
offInterval?: string;
|
|
73
|
+
/** A row's note while its compare isn't drawn on this chart type. */
|
|
74
|
+
offChartType?: string;
|
|
63
75
|
}
|
|
64
76
|
/**
|
|
65
77
|
* The indicators on the chart itself, instead of chips in the toolbar: price
|
|
66
78
|
* pane indicators stack under the OHLCV legend, pane indicators sit at the
|
|
67
79
|
* top of their pane. Each row reads "EMA 50 123.45" and, on hover or focus,
|
|
68
80
|
* offers show/hide, settings and remove. A long stack can be collapsed.
|
|
81
|
+
* Symbols compared in percent head the stack: their price and change, with
|
|
82
|
+
* show/hide and remove.
|
|
69
83
|
*
|
|
70
84
|
* `update()` is cheap to call every frame: rows are kept by instance id and
|
|
71
85
|
* only changed text and positions are written.
|
|
@@ -81,6 +95,8 @@ export declare class WidgetIndicatorLegend {
|
|
|
81
95
|
private collapsed;
|
|
82
96
|
private toggleKey;
|
|
83
97
|
private stackKey;
|
|
98
|
+
/** Tells of each row's values box resized: a narrow chart, a longer name beside them. */
|
|
99
|
+
private readonly valuesObserver;
|
|
84
100
|
constructor(host: HTMLElement, callbacks: IndicatorLegendCallbacks, labels: IndicatorLegendLabels);
|
|
85
101
|
update(rows: readonly IndicatorLegendRow[], overlay: {
|
|
86
102
|
left: number;
|
|
@@ -92,6 +108,10 @@ export declare class WidgetIndicatorLegend {
|
|
|
92
108
|
private createPane;
|
|
93
109
|
private createRow;
|
|
94
110
|
private fill;
|
|
111
|
+
/** Why the row is not drawn, heard with each of its buttons: the tooltip alone reaches only a mouse. */
|
|
112
|
+
private describe;
|
|
113
|
+
/** Why a row that is on is not drawn ('' without a note to say so), or null when it is drawn. */
|
|
114
|
+
private offNote;
|
|
95
115
|
/** Pane rows are placed in their pane; stacked rows flow in the stack. */
|
|
96
116
|
private place;
|
|
97
117
|
private setCollapsed;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetIndicatorLegend.d.ts","sourceRoot":"","sources":["../../src/widget/WidgetIndicatorLegend.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAC;IACnB,
|
|
1
|
+
{"version":3,"file":"WidgetIndicatorLegend.d.ts","sourceRoot":"","sources":["../../src/widget/WidgetIndicatorLegend.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,kBAAkB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AAQ,CAAC,KAAK,CAA8B;IACpD,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,SAAS,CAAM;IACvB,OAAO,CAAC,QAAQ,CAAM;IACtB,yFAAyF;IACzF,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAwB;gBAGpC,IAAI,EAAE,WAAW,EACjB,SAAS,EAAE,wBAAwB,EACnC,MAAM,EAAE,qBAAqB;IAqBhD,MAAM,CAAC,IAAI,EAAE,SAAS,kBAAkB,EAAE,EAAE,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,KAAK,GAAE,SAAS,mBAAmB,EAAO,GAAG,IAAI;IAsCrI,OAAO,IAAI,IAAI;IASf,gFAAgF;IAChF,OAAO,CAAC,WAAW;IAiCnB,OAAO,CAAC,UAAU;IA4BlB,OAAO,CAAC,SAAS;IA8DjB,OAAO,CAAC,IAAI;IAiCZ,wGAAwG;IACxG,OAAO,CAAC,QAAQ;IAShB,iGAAiG;IACjG,OAAO,CAAC,OAAO;IAMf,0EAA0E;IAC1E,OAAO,CAAC,KAAK;IAUb,OAAO,CAAC,YAAY;IAKpB,OAAO,CAAC,YAAY;IAIpB,wEAAwE;IACxE,OAAO,CAAC,YAAY;CAcrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetIndicatorSettings.d.ts","sourceRoot":"","sources":["../../src/widget/WidgetIndicatorSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,aAAa,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAK5I,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"WidgetIndicatorSettings.d.ts","sourceRoot":"","sources":["../../src/widget/WidgetIndicatorSettings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kB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,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAUxC,YAAY,IAAI,IAAI;IAmBpB,YAAY,CAAC,MAAM,GAAE,kBAAkB,GAAG,IAA6B,GAAG,IAAI;IAmB9E,+CAA+C;IAC/C,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B,kEAAkE;IAC5D,QAAQ,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAqClD,OAAO,IAAI,IAAI;CAMhB"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { Translator } from './i18n.js';
|
|
2
2
|
export interface ObjectTreeIndicator {
|
|
3
3
|
instanceId: string;
|
|
4
|
+
/** As its chip and the legend name it: 'BB 20 2'. */
|
|
4
5
|
name: string;
|
|
6
|
+
/** Its full name, for the row's tooltip ('Bollinger Bands'); `name` without one. */
|
|
7
|
+
title?: string;
|
|
5
8
|
visible: boolean;
|
|
6
9
|
}
|
|
7
10
|
export interface ObjectTreeDrawing {
|
|
@@ -20,7 +23,10 @@ export interface ObjectTreeDrawing {
|
|
|
20
23
|
export interface ObjectTreeCompare {
|
|
21
24
|
id: string;
|
|
22
25
|
label: string;
|
|
23
|
-
|
|
26
|
+
/** The line's colour, for a compare that has one of its own (the percent way). */
|
|
27
|
+
color?: string;
|
|
28
|
+
/** How it is compared, in words. */
|
|
29
|
+
way?: string;
|
|
24
30
|
}
|
|
25
31
|
export interface ObjectTreeCallbacks {
|
|
26
32
|
/** Its close button: the dock it sits in shuts. Without it, the panel hides itself. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetObjectTree.d.ts","sourceRoot":"","sources":["../../src/widget/WidgetObjectTree.ts"],"names":[],"mappings":"AACA,OAAO,EAAkC,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAG5E,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC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CAAC,QAAQ,CAAC,CAAC;IAPjF,OAAO,CAAC,EAAE,CAAiB;IAC3B,OAAO,CAAC,YAAY,CAAiB;IACrC,OAAO,CAAC,UAAU,CAAiB;IACnC,OAAO,CAAC,SAAS,CAA+B;IAChD,OAAO,CAAC,SAAS,CAAsB;IACvC,OAAO,CAAC,IAAI,CAAS;gBAET,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,mBAAmB,EAAmB,CAAC,GAAE,UAA0B;IAqC7G,uCAAuC;IACvC,IAAI,OAAO,IAAI,WAAW,CAEzB;IAED,MAAM,IAAI,OAAO;IAIjB,MAAM,IAAI,IAAI;IAId,SAAS,IAAI,IAAI;IAKjB,KAAK,IAAI,IAAI;IAKb,OAAO,IAAI,IAAI;IAIf,kEAAkE;IAClE,UAAU,CACR,UAAU,EAAE,mBAAmB,EAAE,EACjC,QAAQ,EAAE,iBAAiB,EAAE,EAC7B,QAAQ,GAAE,iBAAiB,EAAO,GACjC,IAAI;IAMP,OAAO,CAAC,WAAW;IA0BnB,OAAO,CAAC,gBAAgB;IAkCxB,OAAO,CAAC,cAAc;IA0BtB,OAAO,CAAC,QAAQ;IAsChB,8FAA8F;IAC9F,OAAO,CAAC,WAAW;IA6BnB,OAAO,CAAC,UAAU;IAiClB,OAAO,CAAC,cAAc;IAkCtB,OAAO,CAAC,GAAG;IAWX,OAAO,CAAC,QAAQ;IAOhB,OAAO,CAAC,UAAU;CAUnB;AA8CD,oGAAoG;AACpG,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,EAAE,UAAU,GAAG,MAAM,CAIrE"}
|
|
@@ -29,12 +29,15 @@ export declare class WidgetSettings {
|
|
|
29
29
|
private returnFocus;
|
|
30
30
|
private readonly uid;
|
|
31
31
|
/**
|
|
32
|
-
* `barCountdown` / `logScale`
|
|
33
|
-
* chart has switched off
|
|
32
|
+
* `barCountdown` / `logScale` / `legend` / `volume` false leave out the
|
|
33
|
+
* controls for features the chart has switched off: there they would do
|
|
34
|
+
* nothing.
|
|
34
35
|
*/
|
|
35
36
|
constructor(callbacks: SettingsCallbacks, t: Translator, available?: {
|
|
36
37
|
barCountdown?: boolean;
|
|
37
38
|
logScale?: boolean;
|
|
39
|
+
legend?: boolean;
|
|
40
|
+
volume?: boolean;
|
|
38
41
|
/** The exchange's time zone to offer (null while unknown), or undefined when there is none to offer. */
|
|
39
42
|
exchangeZone?: () => string | null | undefined;
|
|
40
43
|
/** false: the chart doesn't trade, so the orders' colours aren't offered. */
|
|
@@ -47,6 +50,11 @@ export declare class WidgetSettings {
|
|
|
47
50
|
isOpen(): boolean;
|
|
48
51
|
/** The settings as they are now (after an undo, a template), on the tab that's open; `chartType` when it changed. */
|
|
49
52
|
refresh(settings: ChartSettingsState, chartType?: ChartType | null): void;
|
|
53
|
+
/** The place of the control in focus among the panel's, or null when focus is not in the panel. */
|
|
54
|
+
private focusedControl;
|
|
55
|
+
/** Focus the panel's control at `index`, or its last when it has fewer; the tab when it has none. */
|
|
56
|
+
private focusControl;
|
|
57
|
+
private panelControls;
|
|
50
58
|
/** Close, keeping what was changed (as OK does). */
|
|
51
59
|
close(): void;
|
|
52
60
|
destroy(): void;
|
|
@@ -69,7 +77,7 @@ export declare class WidgetSettings {
|
|
|
69
77
|
private renderTabContent;
|
|
70
78
|
/** The chart type's own settings and colours, the main series, the last price, the volume, the high and low. */
|
|
71
79
|
private renderSymbolTab;
|
|
72
|
-
/** The legend over the chart: shown or not, its colours. */
|
|
80
|
+
/** The legend over the chart: shown or not, its colours; the panes' titles. */
|
|
73
81
|
private renderStatusLineTab;
|
|
74
82
|
/** The price scale's mode and behaviour, its labels, the time zone, how numbers are written, the axes' colours. */
|
|
75
83
|
private renderScalesTab;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetSettings.d.ts","sourceRoot":"","sources":["../../src/widget/WidgetSettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,SAAS,EAAyC,MAAM,sBA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A4BrB,OAAO,CAAC,gBAAgB;IAkBxB,gHAAgH;IAChH,OAAO,CAAC,eAAe;IAevB,+EAA+E;IAC/E,OAAO,CAAC,mBAAmB;IAS3B,mHAAmH;IACnH,OAAO,CAAC,eAAe;IAyBvB,0FAA0F;IAC1F,OAAO,CAAC,mBAAmB;IAY3B,kHAAkH;IAClH,OAAO,CAAC,eAAe;IA8BvB,OAAO,CAAC,UAAU;IAOlB,0EAA0E;IAC1E,OAAO,CAAC,iBAAiB;IAIzB,0GAA0G;IAC1G,OAAO,CAAC,OAAO;IAoDf,OAAO,CAAC,UAAU;IAQlB,iGAAiG;IACjG,OAAO,CAAC,sBAAsB;IA+C9B,OAAO,CAAC,KAAK;CAId"}
|
|
@@ -7,8 +7,16 @@ export interface StatusBarRange {
|
|
|
7
7
|
presetLabels?: Partial<Record<RangePreset, string>>;
|
|
8
8
|
groupLabel: string;
|
|
9
9
|
goToLabel: string;
|
|
10
|
+
/** The name of the button that holds what the bar has folded away ("More"). */
|
|
11
|
+
moreLabel: string;
|
|
10
12
|
onPreset: (preset: RangePreset) => void;
|
|
11
13
|
onGoTo: () => void;
|
|
14
|
+
/**
|
|
15
|
+
* The keys that go to a date now ("Alt+G"), shown beside it in the "more"
|
|
16
|
+
* menu and its tooltip; undefined while they do nothing (switched off, or
|
|
17
|
+
* taken by a key of the host's). Alt+G when not given.
|
|
18
|
+
*/
|
|
19
|
+
goToKeys?: () => string | undefined;
|
|
12
20
|
}
|
|
13
21
|
/** The clock: the time in the display zone, and the zones to pick from. */
|
|
14
22
|
export interface StatusBarClock {
|
|
@@ -51,7 +59,8 @@ export interface StatusBarScale {
|
|
|
51
59
|
* Bottom bar: range presets and "go to date" on the left (when `range` is
|
|
52
60
|
* given); the market's status, the connection, the clock and the price
|
|
53
61
|
* scale's switches on the right; hosts' own items after the presets and
|
|
54
|
-
* before the market's status.
|
|
62
|
+
* before the market's status. What the bar has no room for folds under
|
|
63
|
+
* "more" (see `fit`).
|
|
55
64
|
*/
|
|
56
65
|
export declare class WidgetStatusBar {
|
|
57
66
|
private readonly host;
|
|
@@ -67,10 +76,100 @@ export declare class WidgetStatusBar {
|
|
|
67
76
|
private scaleBtns;
|
|
68
77
|
/** The scale as last shown: nothing to rewrite when it is the same. */
|
|
69
78
|
private scaleShown;
|
|
79
|
+
/** The market's status as last shown: the widget asks every 30 seconds. */
|
|
80
|
+
private marketShown;
|
|
81
|
+
/** The market's status, the connection, the clock and the scale: it keeps its width. */
|
|
82
|
+
private readonly rightEl;
|
|
83
|
+
private rangeEl;
|
|
84
|
+
private presetBtns;
|
|
85
|
+
private moreBtn;
|
|
86
|
+
private goToBtn;
|
|
87
|
+
private rangeMenu;
|
|
88
|
+
private resizeObserver;
|
|
89
|
+
private fitFrame;
|
|
90
|
+
/** Gone: a late font or a frame asked for before then fits nothing. */
|
|
91
|
+
private destroyed;
|
|
92
|
+
/** `extras.label` names the bar, which holds the keyboard itself when nothing in it shows. */
|
|
70
93
|
constructor(host: HTMLElement, range?: StatusBarRange, extras?: {
|
|
71
94
|
clock?: StatusBarClock;
|
|
72
95
|
scale?: StatusBarScale;
|
|
96
|
+
label?: string;
|
|
73
97
|
});
|
|
98
|
+
/**
|
|
99
|
+
* Fit again whenever the room for the range bar changes: the bar's own
|
|
100
|
+
* width, or what the groups beside it hold (the market's word, a host's
|
|
101
|
+
* item, the scale switches a narrow widget hides). They keep their width,
|
|
102
|
+
* so the range bar alone takes up the difference.
|
|
103
|
+
*/
|
|
104
|
+
private watchWidths;
|
|
105
|
+
/** Fit once before the next frame, however many changes came first; never once the bar is gone. */
|
|
106
|
+
private scheduleFit;
|
|
107
|
+
/**
|
|
108
|
+
* Fit the bar to its width. The clock and the rest of the right group keep
|
|
109
|
+
* their width; when the range bar then has too little room, its presets
|
|
110
|
+
* fold under "more" one at a time, from the longest range, and go to date
|
|
111
|
+
* after them (not while the presets, and "more" with them, are switched
|
|
112
|
+
* off). Only when everything has folded and it still doesn't fit does the
|
|
113
|
+
* market's status shorten to its word ("Closed"), and what fits in the
|
|
114
|
+
* room that gives comes back.
|
|
115
|
+
*
|
|
116
|
+
* A refit that changes what is folded closes the "more" menu, whose
|
|
117
|
+
* entries would be stale, and the keyboard stays on the bar when the
|
|
118
|
+
* button it was on hides (see `keepFocus`).
|
|
119
|
+
*/
|
|
120
|
+
fit(): void;
|
|
121
|
+
/** The folding and the market's word, as `fit` says; the menu and the keyboard are `fit`'s. */
|
|
122
|
+
private refit;
|
|
123
|
+
/** Whether the bar shows all it holds: the range bar all its buttons, and the right group all of itself. */
|
|
124
|
+
private fits;
|
|
125
|
+
/** Whether the range bar shows all it holds: it clips, so what's past its edge is its overflow. */
|
|
126
|
+
private rangeFits;
|
|
127
|
+
/**
|
|
128
|
+
* Whether the right group ends inside the bar's content edge. It keeps its
|
|
129
|
+
* width, so when the range bar has nothing left to give (its presets and
|
|
130
|
+
* go to date switched off, as `rangeBar: false` does, or no range bar at
|
|
131
|
+
* all) and the bar is still too narrow, it runs past the bar's end: the
|
|
132
|
+
* right edge, the left one right to left.
|
|
133
|
+
*
|
|
134
|
+
* Measured in layout pixels, as `rangeFits` is: the bar is position:
|
|
135
|
+
* relative, so it is the group's offset parent. Boxes on screen are scaled
|
|
136
|
+
* by a container's transform or zoom while the padding is not, so they
|
|
137
|
+
* would put the group past an edge it is inside, and a dialog's scale-in
|
|
138
|
+
* would leave the bar folded with room to spare. A stylesheet of yours
|
|
139
|
+
* that takes the bar's position away measures the group from somewhere
|
|
140
|
+
* else, so it counts as fitting then, rather than shorten the market's word
|
|
141
|
+
* for room the bar has.
|
|
142
|
+
*/
|
|
143
|
+
private rightFits;
|
|
144
|
+
private foldedCount;
|
|
145
|
+
/** The range bar's button the keyboard is on: "more" while it is in the menu "more" opened. */
|
|
146
|
+
private rangeFocus;
|
|
147
|
+
/**
|
|
148
|
+
* Keep the keyboard on the range bar after a refit, when it was on
|
|
149
|
+
* `focused` (or in the menu "more" opened, which the refit closed): see
|
|
150
|
+
* `focusAfterRefit`. Another control of the bar, or the bar itself, takes
|
|
151
|
+
* it when nothing there shows, so it never drops to the page.
|
|
152
|
+
*/
|
|
153
|
+
private keepFocus;
|
|
154
|
+
/**
|
|
155
|
+
* Where the keyboard goes from `focused` after a refit: it stays on a
|
|
156
|
+
* button that still shows; a preset or go to date that folded hands it to
|
|
157
|
+
* "more"; "more" gone (nothing folded any more, or the presets switched
|
|
158
|
+
* off) hands it to go to date, else to the last preset that shows, else to
|
|
159
|
+
* the first control the rest of the bar shows (a button of yours, the
|
|
160
|
+
* clock, a scale switch), else to the bar.
|
|
161
|
+
*/
|
|
162
|
+
private focusAfterRefit;
|
|
163
|
+
/** The first button the bar shows outside the range bar, in its order; null when none does. */
|
|
164
|
+
private firstOtherControl;
|
|
165
|
+
/** The bar holds the keyboard: focusable only until it leaves, so a click on the bar later doesn't take it. */
|
|
166
|
+
private focusBar;
|
|
167
|
+
/** Whether a button of the range bar shows: not folded, not switched off, and "more" only while something is folded. */
|
|
168
|
+
private shows;
|
|
169
|
+
/** What folds, in the order it folds: the presets from the longest range, then go to date. */
|
|
170
|
+
private foldSteps;
|
|
171
|
+
/** Whether `el` is a part of a switch that is off. */
|
|
172
|
+
private isOff;
|
|
74
173
|
update(state: {
|
|
75
174
|
connectionState: string;
|
|
76
175
|
message: string;
|
|
@@ -84,18 +183,26 @@ export declare class WidgetStatusBar {
|
|
|
84
183
|
mode: PriceScaleMode;
|
|
85
184
|
auto: boolean;
|
|
86
185
|
}): void;
|
|
87
|
-
/**
|
|
88
|
-
|
|
186
|
+
/**
|
|
187
|
+
* The market's status (open or closed); hidden for a market around the
|
|
188
|
+
* clock. `short` ("Closed") shows instead of `text` ("Market closed") on a
|
|
189
|
+
* bar out of room, which leaves `text` to screen readers and the tooltip.
|
|
190
|
+
*/
|
|
191
|
+
setMarket(state: 'open' | 'closed' | 'always', text: string, short?: string): void;
|
|
89
192
|
/** A host's own item: text, or a button when it has `onClick`. */
|
|
90
193
|
addHostItem(spec: StatusBarItemSpec): HTMLElement;
|
|
91
194
|
/** The holder of hosts' own items on the left or the right. */
|
|
92
195
|
hostSlot(side: 'left' | 'right'): HTMLDivElement;
|
|
93
196
|
destroy(): void;
|
|
94
197
|
private buildClock;
|
|
198
|
+
/** What the range bar has folded, as a menu over "more": the presets, then go to date; those switched off left out. */
|
|
199
|
+
private toggleRangeMenu;
|
|
95
200
|
/** The zones over the clock, the one in use ticked. */
|
|
96
201
|
private toggleZones;
|
|
97
202
|
private buildScale;
|
|
98
203
|
private hostGroup;
|
|
99
204
|
private buildRange;
|
|
205
|
+
/** A button of the range bar that shows an icon, named `label`. */
|
|
206
|
+
private rangeIconBtn;
|
|
100
207
|
}
|
|
101
208
|
//# sourceMappingURL=WidgetStatusBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetStatusBar.d.ts","sourceRoot":"","sources":["../../src/widget/WidgetStatusBar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;IAChC,8DAA8D;IAC9D,YAAY,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;IACpD,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IACxC,MAAM,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"WidgetStatusBar.d.ts","sourceRoot":"","sources":["../../src/widget/WidgetStatusBar.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D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+DAA+D;IAC/D,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,cAAc;IAIhD,OAAO,IAAI,IAAI;IASf,OAAO,CAAC,UAAU;IAgBlB,uHAAuH;IACvH,OAAO,CAAC,eAAe;IA6BvB,uDAAuD;IACvD,OAAO,CAAC,WAAW;IAoBnB,OAAO,CAAC,UAAU;IA2BlB,OAAO,CAAC,SAAS;IAMjB,OAAO,CAAC,UAAU;IA4ClB,mEAAmE;IACnE,OAAO,CAAC,YAAY;CAUrB"}
|
|
@@ -8,12 +8,23 @@ export interface SymbolSearchCallbacks {
|
|
|
8
8
|
export type SymbolSearchFn = (query: string, signal: AbortSignal) => Promise<SymbolInfo[]>;
|
|
9
9
|
/** How long typing must pause before a search function is asked. */
|
|
10
10
|
export declare const SYMBOL_SEARCH_DEBOUNCE_MS = 150;
|
|
11
|
+
/**
|
|
12
|
+
* The most rows the list draws, the best first; a line under them says how
|
|
13
|
+
* many more typing would narrow. Every row is laid out in the columns all
|
|
14
|
+
* the others share, so a list of thousands would be laid out again on each
|
|
15
|
+
* keystroke.
|
|
16
|
+
*/
|
|
17
|
+
export declare const MAX_LISTED_ROWS = 200;
|
|
18
|
+
/** A symbol on offer: its ticker, or what is known of it (a name, kind, exchange, logo). */
|
|
19
|
+
export type SymbolEntry = string | SymbolInfo;
|
|
11
20
|
/** What the symbol search opens with. */
|
|
12
21
|
export interface SymbolSearchStart {
|
|
13
|
-
/** Listed until something is typed; filtered
|
|
14
|
-
symbols: readonly
|
|
22
|
+
/** Listed until something is typed; filtered, by ticker and name, when there is no `search`. */
|
|
23
|
+
symbols: readonly SymbolEntry[];
|
|
15
24
|
/** The chart's symbol, marked in the list. */
|
|
16
25
|
current: string;
|
|
26
|
+
/** What the chart knows of `current`: its name and logo, where the symbols given and the feed have none. */
|
|
27
|
+
currentInfo?: SymbolInfo | null;
|
|
17
28
|
/** A feed's search, asked once typing pauses. */
|
|
18
29
|
search?: SymbolSearchFn;
|
|
19
30
|
/** Typed already: the letter that opened it. */
|
|
@@ -33,7 +44,7 @@ export interface CompareEntry {
|
|
|
33
44
|
}
|
|
34
45
|
/** What the compare dialog opens with. */
|
|
35
46
|
export interface CompareStart {
|
|
36
|
-
symbols: readonly
|
|
47
|
+
symbols: readonly SymbolEntry[];
|
|
37
48
|
current: string;
|
|
38
49
|
search?: SymbolSearchFn;
|
|
39
50
|
/** The ways to add a symbol, and the one chosen to start with. */
|
|
@@ -49,12 +60,20 @@ export interface CompareStart {
|
|
|
49
60
|
/**
|
|
50
61
|
* The symbol search, and the same dialog for adding a symbol to compare.
|
|
51
62
|
*
|
|
52
|
-
* -
|
|
53
|
-
*
|
|
63
|
+
* - The symbols it is given are listed until something is typed, named
|
|
64
|
+
* where they came with a SymbolInfo (or the chart knows its own).
|
|
65
|
+
* - Without a search function it filters them by ticker and name with a
|
|
66
|
+
* cheap match, good enough for lists in the low thousands. The list draws
|
|
67
|
+
* the best `MAX_LISTED_ROWS` and says how many more typing would narrow.
|
|
54
68
|
* - With one (a feed's `searchSymbols`) it asks once typing pauses, cancels a
|
|
55
|
-
* query a newer one replaced, and lists names, kinds and exchanges;
|
|
56
|
-
*
|
|
57
|
-
* -
|
|
69
|
+
* query a newer one replaced, and lists names, kinds and exchanges; what it
|
|
70
|
+
* hears is kept for the list it opens with next time.
|
|
71
|
+
* - Whose words a row shows is one rule, wherever it is listed: the feed's,
|
|
72
|
+
* then the ones given for what it left out (a logo, say), then the name
|
|
73
|
+
* and logo the chart knows of its own symbol. Words that aren't text (a
|
|
74
|
+
* JSON feed's numeric code, a null) say nothing.
|
|
75
|
+
* - The rows can be narrowed to a kind (stocks, crypto) and, when they come
|
|
76
|
+
* from two or more, to an exchange.
|
|
58
77
|
* - Comparing, a pick adds the symbol the way chosen above the list and the
|
|
59
78
|
* dialog stays; what is compared already is listed first, each removable.
|
|
60
79
|
*
|
|
@@ -71,12 +90,16 @@ export declare class WidgetSymbolSearch {
|
|
|
71
90
|
private results;
|
|
72
91
|
/** Says "Searching…", "Search failed", "No symbols match" to a screen reader. */
|
|
73
92
|
private live;
|
|
74
|
-
|
|
93
|
+
/** The heads of the columns, at the top of what scrolls. */
|
|
94
|
+
private columns;
|
|
95
|
+
private filters;
|
|
75
96
|
private mode;
|
|
97
|
+
/** The tickers given to it, cleaned. */
|
|
98
|
+
private given;
|
|
76
99
|
private rows;
|
|
100
|
+
/** Whether the rows are the symbols given (filtered or not), not a feed's results. */
|
|
101
|
+
private rowsGiven;
|
|
77
102
|
private shown;
|
|
78
|
-
/** The kind of symbol the list keeps to; null for all. */
|
|
79
|
-
private kind;
|
|
80
103
|
private compared;
|
|
81
104
|
private way;
|
|
82
105
|
private selectedIndex;
|
|
@@ -86,8 +109,12 @@ export declare class WidgetSymbolSearch {
|
|
|
86
109
|
private status;
|
|
87
110
|
/** Enter came before the results for what was typed: take the top one when they land. */
|
|
88
111
|
private pickOnResults;
|
|
89
|
-
/**
|
|
90
|
-
private readonly
|
|
112
|
+
/** What the feed's searches told of each symbol, kept from one opening to the next: its words win. */
|
|
113
|
+
private readonly heard;
|
|
114
|
+
/** What came with the symbols it opened with, over what the chart knows of its own. */
|
|
115
|
+
private givenInfo;
|
|
116
|
+
/** Each name without its marks, made once while open: a name is matched on every keystroke. */
|
|
117
|
+
private foldedNames;
|
|
91
118
|
private returnFocus;
|
|
92
119
|
private readonly uid;
|
|
93
120
|
/** Where the dialog mounts (the widget's overlay layer: themed, and inside it when fullscreen). */
|
|
@@ -102,26 +129,49 @@ export declare class WidgetSymbolSearch {
|
|
|
102
129
|
isComparing(): boolean;
|
|
103
130
|
destroy(): void;
|
|
104
131
|
private begin;
|
|
132
|
+
/**
|
|
133
|
+
* The tickers given, and what came with them. What the chart knows of its
|
|
134
|
+
* own symbol gives only a name and a logo, where none came with it: its
|
|
135
|
+
* kind and exchange may be in other words (a kind in English where the
|
|
136
|
+
* list's are translated, a broker for the exchange), and would add a tab or
|
|
137
|
+
* an exchange that no row is in once the feed has named the symbol.
|
|
138
|
+
*/
|
|
139
|
+
private learnGiven;
|
|
140
|
+
/** What a row of `symbol` shows: the feed's words, the ones given for the rest. */
|
|
141
|
+
private infoOf;
|
|
105
142
|
private build;
|
|
143
|
+
/** The heads of the columns: none over the badges, then symbol, description, type, exchange. */
|
|
144
|
+
private buildColumns;
|
|
106
145
|
private buildHeader;
|
|
107
146
|
private buildSearch;
|
|
108
147
|
/** Comparing: how the next symbol is added. */
|
|
109
148
|
private buildWay;
|
|
110
|
-
/** The symbols it was given, named where a search told of
|
|
149
|
+
/** The symbols it was given, named where they came with a name or a search told of one. */
|
|
111
150
|
private listGiven;
|
|
112
|
-
private given;
|
|
113
151
|
private filter;
|
|
152
|
+
/** A name without its marks, as matching takes it; made once for each name while open. */
|
|
153
|
+
private foldedName;
|
|
114
154
|
private scheduleSearch;
|
|
115
155
|
/** Run the search the pause would have started, now. */
|
|
116
156
|
private searchNow;
|
|
117
157
|
private runSearch;
|
|
118
158
|
private cancelSearch;
|
|
119
|
-
/**
|
|
159
|
+
/**
|
|
160
|
+
* New rows: the kinds and exchanges on offer, the list, the keys on the
|
|
161
|
+
* chart's symbol (`atCurrent`) or the top. The filters hear only of rows
|
|
162
|
+
* that can be listed: comparing, a kind only the chart's own symbol is of
|
|
163
|
+
* would be a tab that lists nothing.
|
|
164
|
+
*/
|
|
120
165
|
private afterResults;
|
|
121
|
-
/**
|
|
166
|
+
/** How many of the rows on show are listed. */
|
|
167
|
+
private listedCount;
|
|
168
|
+
/** The rows that can be listed: comparing, all but the chart's own symbol. */
|
|
169
|
+
private listableRows;
|
|
170
|
+
/**
|
|
171
|
+
* The rows on show: of the kind and exchange picked. A symbol given that
|
|
172
|
+
* says nothing of its kind or exchange stays: it may be of either.
|
|
173
|
+
*/
|
|
122
174
|
private visibleRows;
|
|
123
|
-
/** Chips for the kinds the results come in, when there are two or more. */
|
|
124
|
-
private renderKinds;
|
|
125
175
|
/**
|
|
126
176
|
* What is compared (comparing, before anything is typed) as a group under
|
|
127
177
|
* its heading, then the symbols, a listbox of options only, under theirs;
|
|
@@ -129,9 +179,12 @@ export declare class WidgetSymbolSearch {
|
|
|
129
179
|
*/
|
|
130
180
|
private renderList;
|
|
131
181
|
private emptyNote;
|
|
182
|
+
/** Under a list cut short, how many more rows there are to narrow by typing; null when none. */
|
|
183
|
+
private moreNote;
|
|
132
184
|
private heading;
|
|
133
185
|
private row;
|
|
134
|
-
|
|
186
|
+
private descriptionCell;
|
|
187
|
+
/** A symbol compared already: its colour where the badges are, its way across the rest, and a button to take it off. */
|
|
135
188
|
private addedRow;
|
|
136
189
|
private tag;
|
|
137
190
|
private markSelection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetSymbolSearch.d.ts","sourceRoot":"","sources":["../../src/widget/WidgetSymbolSearch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"WidgetSymbolSearch.d.ts","sourceRoot":"","sources":["../../src/widget/WidgetSymbolSearch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAuB,KAAK,UAAU,EAAE,MAAM,WAAW,CAAC;AAUjE,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,oFAAoF;AACpF,MAAM,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;AAE3F,oEAAoE;AACpE,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAK7C;;;;;GAKG;AACH,eAAO,MAAM,eAAe,MAAM,CAAC;AAEnC,4FAA4F;AAC5F,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,UAAU,CAAC;AAE9C,yCAAy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