@kepler.gl/utils 3.3.0-alpha.2 → 3.3.0-alpha.20
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/dist/application-config.d.ts +179 -0
- package/dist/arrow-data-container.d.ts +55 -2
- package/dist/camera-tour.d.ts +11 -0
- package/dist/camera-utils.d.ts +5 -0
- package/dist/cjs/aggregation.js +84 -0
- package/dist/cjs/application-config-types.js +6 -0
- package/dist/cjs/application-config.js +177 -0
- package/dist/cjs/arrow-data-container.js +1152 -0
- package/dist/cjs/browser-utils.js +17 -0
- package/dist/cjs/camera-tour.js +99 -0
- package/dist/cjs/camera-utils.js +64 -0
- package/dist/cjs/color-utils.js +462 -0
- package/dist/cjs/column-statistics.js +115 -0
- package/dist/cjs/data-container-interface.js +6 -0
- package/dist/cjs/data-container-utils.js +76 -0
- package/dist/cjs/data-row.js +110 -0
- package/dist/cjs/data-scale-utils.js +634 -0
- package/dist/cjs/data-utils.js +538 -0
- package/dist/cjs/dataset-utils.js +356 -0
- package/dist/cjs/dom-to-image.js +433 -0
- package/dist/cjs/dom-utils.js +349 -0
- package/dist/cjs/editor-feature-utils.js +177 -0
- package/dist/cjs/effect-utils.js +340 -0
- package/dist/cjs/export-map-html.js +112 -0
- package/dist/cjs/export-utils.js +318 -0
- package/dist/cjs/extract-dataset-utils.js +218 -0
- package/dist/cjs/filter-utils.js +1749 -0
- package/dist/cjs/format.js +38 -0
- package/dist/cjs/gl-utils.js +118 -0
- package/dist/{index.js → cjs/index.js} +384 -10
- package/dist/cjs/indexed-data-container.js +214 -0
- package/dist/cjs/jenks.js +156 -0
- package/dist/cjs/locale-utils.js +39 -0
- package/dist/cjs/map-info-utils.js +41 -0
- package/dist/cjs/map-style-utils/mapbox-gl-style-editor.js +198 -0
- package/dist/cjs/map-style-utils/mapbox-utils.js +155 -0
- package/dist/cjs/map-utils.js +76 -0
- package/dist/cjs/mapbox-utils.js +19 -0
- package/dist/cjs/notifications-utils.js +69 -0
- package/dist/cjs/observe-dimensions.js +136 -0
- package/dist/cjs/plot.js +1502 -0
- package/dist/cjs/position-utils.js +29 -0
- package/dist/cjs/projection-utils.js +141 -0
- package/dist/cjs/quick-insertion-sort.js +132 -0
- package/dist/cjs/row-data-container.js +291 -0
- package/dist/cjs/slider-scale-utils.js +138 -0
- package/dist/cjs/split-map-utils.js +117 -0
- package/dist/cjs/strings.js +16 -0
- package/dist/cjs/theme-utils.js +46 -0
- package/dist/cjs/time.js +321 -0
- package/dist/cjs/types.js +6 -0
- package/dist/cjs/utils.js +224 -0
- package/dist/column-statistics.d.ts +54 -0
- package/dist/data-container-interface.d.ts +16 -1
- package/dist/data-container-utils.d.ts +2 -1
- package/dist/data-scale-utils.d.ts +5 -0
- package/dist/data-utils.d.ts +3 -3
- package/dist/dataset-utils.d.ts +11 -28
- package/dist/editor-feature-utils.d.ts +30 -0
- package/dist/esm/aggregation.js +75 -0
- package/dist/esm/application-config-types.js +3 -0
- package/dist/esm/application-config.js +166 -0
- package/dist/esm/arrow-data-container.js +1136 -0
- package/dist/esm/browser-utils.js +11 -0
- package/dist/esm/camera-tour.js +92 -0
- package/dist/esm/camera-utils.js +56 -0
- package/dist/esm/color-utils.js +435 -0
- package/dist/esm/column-statistics.js +105 -0
- package/dist/esm/data-container-interface.js +3 -0
- package/dist/esm/data-container-utils.js +68 -0
- package/dist/esm/data-row.js +106 -0
- package/dist/esm/data-scale-utils.js +602 -0
- package/dist/esm/data-utils.js +504 -0
- package/dist/esm/dataset-utils.js +347 -0
- package/dist/esm/dom-to-image.js +426 -0
- package/dist/esm/dom-utils.js +323 -0
- package/dist/esm/editor-feature-utils.js +164 -0
- package/dist/esm/effect-utils.js +333 -0
- package/dist/esm/export-map-html.js +107 -0
- package/dist/esm/export-utils.js +297 -0
- package/dist/esm/extract-dataset-utils.js +206 -0
- package/dist/esm/filter-utils.js +1688 -0
- package/dist/esm/format.js +31 -0
- package/dist/esm/gl-utils.js +113 -0
- package/dist/esm/index.js +55 -0
- package/dist/esm/indexed-data-container.js +210 -0
- package/dist/esm/jenks.js +149 -0
- package/dist/esm/locale-utils.js +36 -0
- package/dist/esm/map-info-utils.js +35 -0
- package/dist/esm/map-style-utils/mapbox-gl-style-editor.js +188 -0
- package/dist/esm/map-style-utils/mapbox-utils.js +144 -0
- package/dist/esm/map-utils.js +72 -0
- package/dist/esm/mapbox-utils.js +13 -0
- package/dist/esm/notifications-utils.js +63 -0
- package/dist/esm/observe-dimensions.js +128 -0
- package/dist/esm/plot.js +1460 -0
- package/dist/esm/position-utils.js +22 -0
- package/dist/esm/projection-utils.js +131 -0
- package/dist/{quick-insertion-sort.js → esm/quick-insertion-sort.js} +4 -11
- package/dist/esm/row-data-container.js +286 -0
- package/dist/esm/slider-scale-utils.js +129 -0
- package/dist/esm/split-map-utils.js +109 -0
- package/dist/esm/strings.js +10 -0
- package/dist/esm/theme-utils.js +38 -0
- package/dist/esm/time.js +308 -0
- package/dist/esm/types.js +3 -0
- package/dist/esm/utils.js +203 -0
- package/dist/export-map-html.d.ts +5 -0
- package/dist/export-utils.d.ts +31 -3
- package/dist/extract-dataset-utils.d.ts +79 -0
- package/dist/filter-utils.d.ts +56 -7
- package/dist/index.d.ts +20 -9
- package/dist/jenks.d.ts +5 -0
- package/dist/map-info-utils.d.ts +11 -1
- package/dist/map-style-utils/mapbox-gl-style-editor.d.ts +11 -10
- package/dist/map-style-utils/mapbox-utils.d.ts +29 -1
- package/dist/plot.d.ts +187 -21
- package/dist/projection-utils.d.ts +6 -4
- package/dist/row-data-container.d.ts +19 -0
- package/dist/split-map-utils.d.ts +7 -0
- package/dist/theme-utils.d.ts +8 -0
- package/dist/time.d.ts +3 -3
- package/dist/types.d.ts +2 -0
- package/package.json +29 -22
- package/dist/aggregation.js +0 -84
- package/dist/application-config-types.js +0 -6
- package/dist/application-config.js +0 -113
- package/dist/arrow-data-container.js +0 -398
- package/dist/browser-utils.js +0 -17
- package/dist/color-utils.js +0 -462
- package/dist/data-container-interface.js +0 -6
- package/dist/data-container-utils.js +0 -75
- package/dist/data-row.js +0 -110
- package/dist/data-scale-utils.js +0 -620
- package/dist/data-utils.js +0 -532
- package/dist/dataset-utils.js +0 -330
- package/dist/dom-to-image.js +0 -433
- package/dist/dom-utils.js +0 -349
- package/dist/effect-utils.js +0 -318
- package/dist/export-map-html.js +0 -38
- package/dist/export-utils.js +0 -203
- package/dist/filter-utils.js +0 -1274
- package/dist/format.js +0 -38
- package/dist/gl-utils.js +0 -118
- package/dist/indexed-data-container.js +0 -214
- package/dist/locale-utils.js +0 -39
- package/dist/map-info-utils.js +0 -14
- package/dist/map-style-utils/mapbox-gl-style-editor.js +0 -194
- package/dist/map-style-utils/mapbox-utils.js +0 -107
- package/dist/map-utils.js +0 -72
- package/dist/mapbox-utils.js +0 -19
- package/dist/noop.d.ts +0 -1
- package/dist/noop.js +0 -13
- package/dist/notifications-utils.js +0 -69
- package/dist/observe-dimensions.js +0 -136
- package/dist/plot.js +0 -637
- package/dist/position-utils.js +0 -26
- package/dist/projection-utils.js +0 -91
- package/dist/row-data-container.js +0 -206
- package/dist/searcher-utils.d.ts +0 -1
- package/dist/searcher-utils.js +0 -25
- package/dist/slider-scale-utils.js +0 -138
- package/dist/split-map-utils.js +0 -99
- package/dist/strings.js +0 -16
- package/dist/time.js +0 -325
- package/dist/types.js +0 -6
- package/dist/utils.js +0 -224
package/dist/plot.d.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import { Bin, TimeBins, Millisecond, TimeRangeFilter, RangeFilter, PlotType, Filter, LineChart, Field, ValueOf } from '@kepler.gl/types';
|
|
1
|
+
import { Bin, TimeBins, Millisecond, TimeRangeFilter, RangeFilter, PlotType, PlotGroupBy, Filter, LineChart, Field, ValueOf, ColorRange } from '@kepler.gl/types';
|
|
2
2
|
import { AggregationTypes } from '@kepler.gl/constants';
|
|
3
3
|
import { DataContainerInterface } from '.';
|
|
4
4
|
import { KeplerTableModel } from './types';
|
|
5
5
|
type Datasets = any;
|
|
6
|
+
/**
|
|
7
|
+
* Merge per-layer polygon-filtered indices into a dataset-level index.
|
|
8
|
+
* When any layers are polygon-filtered, take the union of their indices (a row is kept if it
|
|
9
|
+
* is visible on at least one targeted layer), then intersect with the base index.
|
|
10
|
+
* Used for filtered export and filter plots/histograms.
|
|
11
|
+
*/
|
|
12
|
+
export declare function mergePolygonLayerIndexes(baseIndex: number[], filteredIndexByLayer?: Record<string, number[]>): number[];
|
|
6
13
|
/**
|
|
7
14
|
*
|
|
8
15
|
* @param thresholds
|
|
@@ -16,15 +23,15 @@ export declare function histogramFromThreshold(thresholds: number[], values: num
|
|
|
16
23
|
* @param numBins
|
|
17
24
|
* @param valueAccessor
|
|
18
25
|
*/
|
|
19
|
-
export declare function histogramFromValues(values: (Millisecond | null | number)[], numBins: number, valueAccessor?: (d: number) => number):
|
|
20
|
-
count: number;
|
|
21
|
-
indexes: import("d3-array").Bin<number, number>;
|
|
22
|
-
x0: number | undefined;
|
|
23
|
-
x1: number | undefined;
|
|
24
|
-
}[];
|
|
26
|
+
export declare function histogramFromValues(values: (Millisecond | null | number)[], numBins: number, valueAccessor?: (d: number) => number): Bin[];
|
|
25
27
|
export declare function histogramFromOrdinal(domain: [string], values: (Millisecond | null | number)[], valueAccessor?: (d: unknown) => string): Bin[];
|
|
26
28
|
/**
|
|
27
|
-
*
|
|
29
|
+
* Bin rows by time interval overlap: a feature [start, end] is counted in every
|
|
30
|
+
* bin whose range intersects that span. Null/undefined end is treated as still
|
|
31
|
+
* active through the last threshold (open-ended).
|
|
32
|
+
*/
|
|
33
|
+
export declare function histogramFromTimeIntervals(thresholds: number[], indexes: number[], startAccessor: (idx: number) => number | null | undefined, endAccessor: (idx: number) => number | null | undefined): Bin[];
|
|
34
|
+
/**
|
|
28
35
|
* @param domain
|
|
29
36
|
* @param values
|
|
30
37
|
* @param numBins
|
|
@@ -36,24 +43,47 @@ export declare function histogramFromDomain(domain: [number, number], values: (M
|
|
|
36
43
|
* @param datasets
|
|
37
44
|
* @param interval
|
|
38
45
|
*/
|
|
39
|
-
export declare function getTimeBins(filter: TimeRangeFilter, datasets: Datasets, interval: PlotType['interval']): TimeBins;
|
|
46
|
+
export declare function getTimeBins(filter: TimeRangeFilter, datasets: Datasets, interval: PlotType['interval'], plotBaseIndexByDataId?: Record<string, number[]>): TimeBins;
|
|
40
47
|
export declare function binByTime(indexes: any, dataset: any, interval: any, filter: any): Bin[] | null;
|
|
41
48
|
export declare function getBinThresholds(interval: string, domain: number[]): number[];
|
|
49
|
+
/**
|
|
50
|
+
* Build histogram thresholds in the numeric field's own units.
|
|
51
|
+
* Unlike time intervals, numeric intervals are anchored to the filter domain
|
|
52
|
+
* and never pass through calendar conversion.
|
|
53
|
+
*/
|
|
54
|
+
export declare function getNumericBinThresholds(domain: number[], interval?: number, numBins?: number): number[];
|
|
55
|
+
/** Return the next representable IEEE-754 number above value. */
|
|
56
|
+
export declare function nextUp(value: number): number;
|
|
57
|
+
/** Return the next representable IEEE-754 number below value. */
|
|
58
|
+
export declare function nextDown(value: number): number;
|
|
59
|
+
/**
|
|
60
|
+
* Smallest useful range width across a numeric domain. It is large enough to
|
|
61
|
+
* move either endpoint by one representable value and never exceeds the span.
|
|
62
|
+
*/
|
|
63
|
+
export declare function getNumericRangeMinimum(domain: number[]): number;
|
|
64
|
+
/** Infer the regular numeric bin width, ignoring tiny padded edge bins. */
|
|
65
|
+
export declare function getNumericPlotInterval(filter: RangeFilter): number;
|
|
66
|
+
/** Return the plotted bin boundaries for either a time or numeric range filter. */
|
|
67
|
+
export declare function getFilterBinThresholds(filter: TimeRangeFilter | RangeFilter): number[];
|
|
42
68
|
/**
|
|
43
69
|
* Run GPU filter on current filter result to generate indexes for ploting chart
|
|
44
70
|
* Skip ruuning for the same field
|
|
45
71
|
* @param dataset
|
|
46
|
-
* @param filter
|
|
72
|
+
* @param filter Histogram filter whose dataId-paired column should be skipped
|
|
73
|
+
* @param skipFieldNames Extra GPU field names to skip (charts cross-filter). Histogram callers omit this.
|
|
74
|
+
* @param baseIndex CPU base that excludes the plotted filter and already includes polygon filters.
|
|
47
75
|
*/
|
|
48
|
-
export declare function runGpuFilterForPlot<K extends KeplerTableModel<K, L>, L>(dataset: K, filter?: Filter): number[];
|
|
76
|
+
export declare function runGpuFilterForPlot<K extends KeplerTableModel<K, L>, L>(dataset: K, filter?: Filter, skipFieldNames?: string[], baseIndex?: number[]): number[];
|
|
49
77
|
export declare function getFilterDataFunc(filterRange: any, getFilterValue: any, dataContainer: DataContainerInterface, skips: any): (index: any) => any;
|
|
50
78
|
export declare function validBin(b: any): boolean;
|
|
51
79
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
80
|
+
* Turn a histogram brush or slider position into one bin.
|
|
81
|
+
* Interval playback steps by bin, and the filter comparison is inclusive.
|
|
82
|
+
* Time bins preserve their millisecond offset. Numeric bins use the immediate
|
|
83
|
+
* representable predecessor of the next mark so their membership matches D3's
|
|
84
|
+
* half-open bins; only the final numeric bin includes its upper boundary.
|
|
56
85
|
*/
|
|
86
|
+
export declare function intervalBinFromMarks(marks: number[], value: number, endOffset?: number): [number, number];
|
|
57
87
|
export declare function snapToMarks(value: number, marks: number[]): number;
|
|
58
88
|
export declare function normalizeValue(val: any, minValue: any, step: any, marks: any): number;
|
|
59
89
|
export declare function isPercentField(field: any): any;
|
|
@@ -61,6 +91,23 @@ export declare function updateAggregationByField(field: Field, aggregation: Valu
|
|
|
61
91
|
export declare const getValueAggrFunc: (field: Field | string | null, aggregation: string, dataset: KeplerTableModel<any, any>) => ((bin: Bin) => number);
|
|
62
92
|
export declare const getAggregationOptiosnBasedOnField: (field: any) => import("@kepler.gl/constants").TimeAggregation[];
|
|
63
93
|
export declare function getPctChange(y: unknown, y0: unknown): number | null;
|
|
94
|
+
export declare const PLOT_GROUP_OTHERS_NAME = "Others";
|
|
95
|
+
export declare const PLOT_NUM_GROUPS_ALL: "ALL";
|
|
96
|
+
export declare const DEFAULT_PLOT_NUM_GROUPS = 10;
|
|
97
|
+
/** Qualitative palettes stop at 20. All uses this cap instead of one series per value. */
|
|
98
|
+
export declare const MAX_PLOT_NUM_GROUPS = 20;
|
|
99
|
+
export declare const PLOT_NUM_GROUPS_OPTIONS: number[];
|
|
100
|
+
export declare function plotGroupColorSteps(numGroups: number | typeof PLOT_NUM_GROUPS_ALL | undefined): number;
|
|
101
|
+
export declare function defaultPlotGroupColorRange(numGroups?: number | typeof PLOT_NUM_GROUPS_ALL): ColorRange;
|
|
102
|
+
/**
|
|
103
|
+
* Merge a partial timeline group-by onto the previous one.
|
|
104
|
+
* `null` clears grouping. Missing fields keep the previous value, then defaults.
|
|
105
|
+
*/
|
|
106
|
+
export declare function mergePlotGroupBy(prev: PlotGroupBy | null | undefined, next: Partial<PlotGroupBy> | null | undefined): PlotGroupBy | null;
|
|
107
|
+
export declare function lineChartSeriesLegend(lineChart?: LineChart | null): {
|
|
108
|
+
name: string;
|
|
109
|
+
color: string;
|
|
110
|
+
}[];
|
|
64
111
|
/**
|
|
65
112
|
*
|
|
66
113
|
* @param datasets
|
|
@@ -74,18 +121,93 @@ export declare function splitSeries(series: any): {
|
|
|
74
121
|
type MinVisStateForAnimationWindow = {
|
|
75
122
|
datasets: Datasets;
|
|
76
123
|
};
|
|
77
|
-
export declare function adjustValueToAnimationWindow<S extends MinVisStateForAnimationWindow>(state: S, filter: TimeRangeFilter): {
|
|
124
|
+
export declare function adjustValueToAnimationWindow<S extends MinVisStateForAnimationWindow>(state: S, filter: TimeRangeFilter | RangeFilter, plotBaseIndexByDataId?: Record<string, number[]>): {
|
|
125
|
+
value: any[];
|
|
126
|
+
plotType: {
|
|
127
|
+
[key: string]: any;
|
|
128
|
+
} & {
|
|
129
|
+
[key: string]: any;
|
|
130
|
+
};
|
|
131
|
+
timeBins: any;
|
|
132
|
+
dataId: string[];
|
|
133
|
+
id: string;
|
|
134
|
+
enabled: boolean;
|
|
135
|
+
inverted?: boolean;
|
|
136
|
+
fixedDomain: true;
|
|
137
|
+
view: import("@kepler.gl/types").FilterViewType;
|
|
138
|
+
isAnimating: boolean;
|
|
139
|
+
animationWindow?: string;
|
|
140
|
+
speed: number;
|
|
141
|
+
showTimeDisplay?: boolean;
|
|
142
|
+
name: string[];
|
|
143
|
+
type: "range";
|
|
144
|
+
fieldIdx: number[];
|
|
145
|
+
domain: any[] & number[];
|
|
146
|
+
mappedValue?: number[];
|
|
147
|
+
yAxis: Field | null;
|
|
148
|
+
lineChart?: LineChart | undefined;
|
|
149
|
+
gpu: boolean;
|
|
150
|
+
gpuChannel?: number[];
|
|
151
|
+
gpuEndChannel?: number[];
|
|
152
|
+
fieldType: "real" | "integer";
|
|
153
|
+
endName?: (string | null | undefined)[];
|
|
154
|
+
endFieldIdx?: (number | null | undefined)[];
|
|
155
|
+
endMappedValue?: ((number | null)[] | null | undefined)[];
|
|
156
|
+
layerId?: string[];
|
|
157
|
+
step: number;
|
|
158
|
+
bins?: import("@kepler.gl/types").Bins;
|
|
159
|
+
typeOptions: ["range"];
|
|
160
|
+
} | {
|
|
161
|
+
value: any[];
|
|
162
|
+
bins: any;
|
|
163
|
+
dataId: string[];
|
|
164
|
+
id: string;
|
|
165
|
+
enabled: boolean;
|
|
166
|
+
inverted?: boolean;
|
|
167
|
+
fixedDomain: true;
|
|
168
|
+
view: import("@kepler.gl/types").FilterViewType;
|
|
169
|
+
isAnimating: boolean;
|
|
170
|
+
animationWindow?: string;
|
|
171
|
+
speed: number;
|
|
172
|
+
showTimeDisplay?: boolean;
|
|
173
|
+
name: string[];
|
|
174
|
+
type: "range";
|
|
175
|
+
fieldIdx: number[];
|
|
176
|
+
domain: any[] & number[];
|
|
177
|
+
mappedValue?: number[];
|
|
178
|
+
yAxis: Field | null;
|
|
78
179
|
plotType: {
|
|
79
|
-
|
|
180
|
+
[key: string]: any;
|
|
181
|
+
} & {
|
|
182
|
+
[key: string]: any;
|
|
80
183
|
};
|
|
81
|
-
|
|
184
|
+
lineChart?: LineChart | undefined;
|
|
185
|
+
gpu: boolean;
|
|
186
|
+
gpuChannel?: number[];
|
|
187
|
+
gpuEndChannel?: number[];
|
|
188
|
+
fieldType: "real" | "integer";
|
|
189
|
+
endName?: (string | null | undefined)[];
|
|
190
|
+
endFieldIdx?: (number | null | undefined)[];
|
|
191
|
+
endMappedValue?: ((number | null)[] | null | undefined)[];
|
|
192
|
+
layerId?: string[];
|
|
193
|
+
step: number;
|
|
194
|
+
typeOptions: ["range"];
|
|
195
|
+
} | {
|
|
82
196
|
value: any[];
|
|
197
|
+
plotType: {
|
|
198
|
+
[key: string]: any;
|
|
199
|
+
} & {
|
|
200
|
+
[key: string]: any;
|
|
201
|
+
};
|
|
202
|
+
timeBins: any;
|
|
83
203
|
dataId: string[];
|
|
84
204
|
id: string;
|
|
85
205
|
enabled: boolean;
|
|
206
|
+
inverted?: boolean;
|
|
86
207
|
fixedDomain: boolean;
|
|
87
208
|
view: import("@kepler.gl/types").FilterViewType;
|
|
88
209
|
isAnimating: boolean;
|
|
210
|
+
animationWindow: string;
|
|
89
211
|
speed: number;
|
|
90
212
|
showTimeDisplay?: boolean;
|
|
91
213
|
name: string[];
|
|
@@ -97,7 +219,11 @@ export declare function adjustValueToAnimationWindow<S extends MinVisStateForAni
|
|
|
97
219
|
lineChart?: LineChart | undefined;
|
|
98
220
|
gpu: boolean;
|
|
99
221
|
gpuChannel?: number[];
|
|
222
|
+
gpuEndChannel?: number[];
|
|
100
223
|
fieldType: "timestamp";
|
|
224
|
+
endName?: (string | null | undefined)[];
|
|
225
|
+
endFieldIdx?: (number | null | undefined)[];
|
|
226
|
+
endMappedValue?: ((number | null)[] | null | undefined)[];
|
|
101
227
|
layerId?: string[];
|
|
102
228
|
step: number;
|
|
103
229
|
defaultTimeFormat?: string | null;
|
|
@@ -105,7 +231,47 @@ export declare function adjustValueToAnimationWindow<S extends MinVisStateForAni
|
|
|
105
231
|
timezone?: string | null;
|
|
106
232
|
syncedWithLayerTimeline: boolean;
|
|
107
233
|
syncTimelineMode: import("@kepler.gl/types").SyncTimelineMode;
|
|
234
|
+
invertTrendColor: boolean;
|
|
235
|
+
} | {
|
|
236
|
+
value: any[];
|
|
237
|
+
bins: any;
|
|
238
|
+
dataId: string[];
|
|
239
|
+
id: string;
|
|
240
|
+
enabled: boolean;
|
|
241
|
+
inverted?: boolean;
|
|
242
|
+
fixedDomain: boolean;
|
|
243
|
+
view: import("@kepler.gl/types").FilterViewType;
|
|
244
|
+
isAnimating: boolean;
|
|
108
245
|
animationWindow: string;
|
|
246
|
+
speed: number;
|
|
247
|
+
showTimeDisplay?: boolean;
|
|
248
|
+
name: string[];
|
|
249
|
+
type: "timeRange";
|
|
250
|
+
fieldIdx: number[];
|
|
251
|
+
domain: any[] & [number, number];
|
|
252
|
+
mappedValue: number[] & (number | null)[];
|
|
253
|
+
yAxis: Field | null;
|
|
254
|
+
plotType: {
|
|
255
|
+
[key: string]: any;
|
|
256
|
+
} & {
|
|
257
|
+
[key: string]: any;
|
|
258
|
+
};
|
|
259
|
+
lineChart?: LineChart | undefined;
|
|
260
|
+
gpu: boolean;
|
|
261
|
+
gpuChannel?: number[];
|
|
262
|
+
gpuEndChannel?: number[];
|
|
263
|
+
fieldType: "timestamp";
|
|
264
|
+
endName?: (string | null | undefined)[];
|
|
265
|
+
endFieldIdx?: (number | null | undefined)[];
|
|
266
|
+
endMappedValue?: ((number | null)[] | null | undefined)[];
|
|
267
|
+
layerId?: string[];
|
|
268
|
+
step: number;
|
|
269
|
+
timeBins?: TimeBins;
|
|
270
|
+
defaultTimeFormat?: string | null;
|
|
271
|
+
timeFormat?: string | null;
|
|
272
|
+
timezone?: string | null;
|
|
273
|
+
syncedWithLayerTimeline: boolean;
|
|
274
|
+
syncTimelineMode: import("@kepler.gl/types").SyncTimelineMode;
|
|
109
275
|
invertTrendColor: boolean;
|
|
110
276
|
};
|
|
111
277
|
/**
|
|
@@ -115,9 +281,9 @@ export declare function adjustValueToAnimationWindow<S extends MinVisStateForAni
|
|
|
115
281
|
* @param datasets
|
|
116
282
|
* @param dataId
|
|
117
283
|
*/
|
|
118
|
-
export declare function updateTimeFilterPlotType(filter: TimeRangeFilter, plotType: TimeRangeFilter['plotType'], datasets: Datasets, _dataId?: string): TimeRangeFilter;
|
|
119
|
-
export declare function getRangeFilterBins(filter: any, datasets: any, numBins: any): any;
|
|
120
|
-
export declare function updateRangeFilterPlotType(filter: RangeFilter, plotType: RangeFilter['plotType'], datasets: Datasets, _dataId?: string): RangeFilter;
|
|
284
|
+
export declare function updateTimeFilterPlotType(filter: TimeRangeFilter, plotType: TimeRangeFilter['plotType'], datasets: Datasets, _dataId?: string, plotBaseIndexByDataId?: Record<string, number[]>): TimeRangeFilter;
|
|
285
|
+
export declare function getRangeFilterBins(filter: any, datasets: any, numBins: any, plotBaseIndexByDataId?: Record<string, number[]>): any;
|
|
286
|
+
export declare function updateRangeFilterPlotType(filter: RangeFilter, plotType: RangeFilter['plotType'], datasets: Datasets, _dataId?: string, plotBaseIndexByDataId?: Record<string, number[]>): RangeFilter;
|
|
121
287
|
export declare function getChartTitle(yAxis: Field, plotType: PlotType): string;
|
|
122
288
|
export declare function getDefaultPlotType(filter: any, datasets: any): {
|
|
123
289
|
interval: string;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import WebMercatorViewport from '
|
|
1
|
+
import { WebMercatorViewport } from '@math.gl/web-mercator';
|
|
2
|
+
import type { ViewportPadding } from '@kepler.gl/types';
|
|
2
3
|
export declare const MAPBOX_TILE_SIZE = 512;
|
|
3
4
|
/**
|
|
4
5
|
* bounds should be [minLng, minLat, maxLng, maxLat]
|
|
5
6
|
* @param {*} bounds
|
|
6
7
|
*/
|
|
7
8
|
export declare function validateBounds(bounds: any): any[] | null;
|
|
8
|
-
export declare function getCenterAndZoomFromBounds(bounds: any, { width, height }: {
|
|
9
|
-
width:
|
|
10
|
-
height:
|
|
9
|
+
export declare function getCenterAndZoomFromBounds(bounds: any, { width, height, padding }: {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
padding?: ViewportPadding;
|
|
11
13
|
}): {
|
|
12
14
|
zoom: number;
|
|
13
15
|
center: number[];
|
|
@@ -12,6 +12,25 @@ export declare class RowDataContainer implements DataContainerInterface {
|
|
|
12
12
|
_rows: any[][];
|
|
13
13
|
_numColumns: number;
|
|
14
14
|
constructor(data: RowDataContainerInput);
|
|
15
|
+
/**
|
|
16
|
+
* Replace all rows. Callers pass the full snapshot (same contract as ArrowDataContainer).
|
|
17
|
+
*/
|
|
18
|
+
update(updateData: any[]): void;
|
|
19
|
+
/**
|
|
20
|
+
* Append rows without copying the existing table. Rejects the whole batch when
|
|
21
|
+
* any row is not an array of the current column count (empty tables take the
|
|
22
|
+
* width from the first row).
|
|
23
|
+
*/
|
|
24
|
+
append(rows: any[][]): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Overwrite one row. Rejects an out-of-range index or a row of the wrong width.
|
|
27
|
+
*/
|
|
28
|
+
replace(index: number, row: any[]): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Drop unique valid indexes in one rebuild. Any out-of-range or non-integer
|
|
31
|
+
* index rejects the whole call so callers can no-op instead of shifting twice.
|
|
32
|
+
*/
|
|
33
|
+
remove(indexes: number[]): boolean;
|
|
15
34
|
numRows(): number;
|
|
16
35
|
numColumns(): number;
|
|
17
36
|
valueAt(rowIndex: number, columnIndex: number): any;
|
|
@@ -19,6 +19,13 @@ export declare function removeLayerFromSplitMaps(splitMaps: any, layer: any): an
|
|
|
19
19
|
* @returns {Array<Object>} layer visibility for each panel
|
|
20
20
|
*/
|
|
21
21
|
export declare function getInitialMapLayersForSplitMap(layers: any): any;
|
|
22
|
+
/**
|
|
23
|
+
* Combine the layers of the split map panels at the same index
|
|
24
|
+
* @param {Array<Object>} baseSplitMaps
|
|
25
|
+
* @param {Array<Object>} splitMaps layers override the ones of baseSplitMaps
|
|
26
|
+
* @returns {Array<Object>} new splitMaps, without holes
|
|
27
|
+
*/
|
|
28
|
+
export declare function combineSplitMapsByIndex(baseSplitMaps: any, splitMaps: any): any[];
|
|
22
29
|
/**
|
|
23
30
|
* This method will get default splitMap settings based on existing layers
|
|
24
31
|
* @param {Array<Object>} layers
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** Configured UI theme names, in cycle order. Empty when unset. */
|
|
2
|
+
export declare function getConfiguredThemes(): string[];
|
|
3
|
+
/** True when the map control should cycle themes (two or more names). */
|
|
4
|
+
export declare function shouldShowThemeSwitcher(): boolean;
|
|
5
|
+
/** First configured theme, or dark when none are set. */
|
|
6
|
+
export declare function getDefaultUiTheme(): string;
|
|
7
|
+
/** Next theme in the configured cycle. */
|
|
8
|
+
export declare function getNextUiTheme(current?: string): string;
|
package/dist/time.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { AnimationConfig, Timeline, TimeRangeFilter, Filter } from '@kepler.gl/types';
|
|
1
|
+
import { AnimationConfig, Timeline, TimeRangeFilter, RangeFilter, Filter } from '@kepler.gl/types';
|
|
2
2
|
import { KeplerTableModel } from './types';
|
|
3
3
|
export declare const TIMELINE_MODES: {
|
|
4
4
|
inner: string;
|
|
5
5
|
outer: string;
|
|
6
6
|
};
|
|
7
|
-
export declare const
|
|
7
|
+
export declare const LayerTimeInterval: {
|
|
8
8
|
YEAR: string;
|
|
9
9
|
MONTH: string;
|
|
10
10
|
DAY: string;
|
|
@@ -51,4 +51,4 @@ export declare function filterIntervalOptions(options: any, domain: any): any;
|
|
|
51
51
|
* @param filter TimeRangeFilter filter
|
|
52
52
|
* @returns Timeline
|
|
53
53
|
*/
|
|
54
|
-
export declare const getTimelineFromFilter: (filter: TimeRangeFilter) => Timeline;
|
|
54
|
+
export declare const getTimelineFromFilter: (filter: TimeRangeFilter | RangeFilter) => Timeline;
|
package/dist/types.d.ts
CHANGED
|
@@ -15,4 +15,6 @@ export interface KeplerTableModel<K, L, F extends Field = any> {
|
|
|
15
15
|
filterValueAccessor: (dc: DataContainerInterface) => (getIndex?: (any: any) => number, getData?: (dc_: DataContainerInterface, d: any, fieldIndex: number) => any) => (d: any) => (number | number[])[];
|
|
16
16
|
};
|
|
17
17
|
filteredIndex: number[];
|
|
18
|
+
filteredIndexByLayer?: Record<string, number[]>;
|
|
19
|
+
disableDataOperation?: boolean;
|
|
18
20
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kepler.gl/utils",
|
|
3
3
|
"author": "Shan He <shan@uber.com>",
|
|
4
|
-
"version": "3.3.0-alpha.
|
|
4
|
+
"version": "3.3.0-alpha.20",
|
|
5
5
|
"description": "kepler.gl constants used by kepler.gl components, actions and reducers",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"main": "dist/index.js",
|
|
7
|
+
"main": "dist/cjs/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
9
9
|
"keywords": [
|
|
10
10
|
"babel",
|
|
@@ -19,41 +19,40 @@
|
|
|
19
19
|
"url": "https://github.com/keplergl/kepler.gl.git"
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
|
-
"build": "rm -fr dist && babel src --out-dir dist --source-maps inline --extensions '.ts,.tsx,.js,.jsx' --ignore '**/*.d.ts'",
|
|
23
|
-
"build:umd": "NODE_OPTIONS=--openssl-legacy-provider webpack --config ./webpack/umd.js --progress --env.prod",
|
|
22
|
+
"build": "rm -fr dist && babel src --out-dir dist/cjs --source-maps inline --extensions '.ts,.tsx,.js,.jsx' --ignore '**/*.d.ts,**/*.spec.ts,**/*.spec.tsx,**/*.spec.js,**/*.spec.jsx,**/*.test.ts,**/*.test.tsx,**/*.test.js,**/*.test.jsx' && BABEL_ENV=esm babel src --out-dir dist/esm --source-maps inline --extensions '.ts,.tsx,.js,.jsx' --ignore '**/*.d.ts,**/*.spec.ts,**/*.spec.tsx,**/*.spec.js,**/*.spec.jsx,**/*.test.ts,**/*.test.tsx,**/*.test.js,**/*.test.jsx'",
|
|
24
23
|
"build:types": "tsc --project ./tsconfig.production.json",
|
|
25
24
|
"prepublishOnly": "babel-node ../../scripts/license-header/bin --license ../../FILE-HEADER && yarn build && yarn build:types",
|
|
26
|
-
"stab": "mkdir -p dist && touch dist/index.js"
|
|
25
|
+
"stab": "mkdir -p dist/cjs dist/esm && touch dist/cjs/index.js dist/esm/index.js"
|
|
27
26
|
},
|
|
28
27
|
"files": [
|
|
29
|
-
"dist"
|
|
30
|
-
"umd"
|
|
28
|
+
"dist"
|
|
31
29
|
],
|
|
32
30
|
"dependencies": {
|
|
33
31
|
"@deck.gl/core": "^9.3.1",
|
|
34
|
-
"@kepler.gl/common-utils": "3.3.0-alpha.
|
|
35
|
-
"@kepler.gl/constants": "3.3.0-alpha.
|
|
36
|
-
"@kepler.gl/types": "3.3.0-alpha.
|
|
32
|
+
"@kepler.gl/common-utils": "3.3.0-alpha.20",
|
|
33
|
+
"@kepler.gl/constants": "3.3.0-alpha.20",
|
|
34
|
+
"@kepler.gl/types": "3.3.0-alpha.20",
|
|
37
35
|
"@loaders.gl/gis": "^4.4.1",
|
|
38
36
|
"@luma.gl/constants": "^9.3.2",
|
|
39
37
|
"@luma.gl/core": "^9.3.2",
|
|
40
38
|
"@mapbox/geo-viewport": "^0.4.1",
|
|
41
|
-
"@
|
|
42
|
-
"@turf/
|
|
39
|
+
"@math.gl/web-mercator": "^4.1.0",
|
|
40
|
+
"@turf/boolean-intersects": "^7.2.0",
|
|
41
|
+
"@turf/boolean-point-in-polygon": "^7.2.0",
|
|
42
|
+
"@turf/helpers": "^7.2.0",
|
|
43
43
|
"@types/d3-array": "^2.8.0",
|
|
44
44
|
"@types/keymirror": "^0.1.1",
|
|
45
|
-
"@types/lodash": "4.17.5",
|
|
46
45
|
"apache-arrow": ">=15.0.0",
|
|
47
46
|
"d3-array": "^2.8.0",
|
|
48
|
-
"d3-color": "^
|
|
47
|
+
"d3-color": "^3.1.0",
|
|
49
48
|
"d3-format": "^2.0.0",
|
|
50
|
-
"d3-interpolate": "^
|
|
49
|
+
"d3-interpolate": "^3.0.1",
|
|
51
50
|
"decimal.js": "^10.2.0",
|
|
51
|
+
"es-toolkit": "^1.39.10",
|
|
52
52
|
"global": "^4.3.0",
|
|
53
|
-
"h3-js": "^
|
|
53
|
+
"h3-js": "^4.4.0",
|
|
54
54
|
"keymirror": "^0.1.1",
|
|
55
|
-
"
|
|
56
|
-
"mapbox-gl": "^1.13.1",
|
|
55
|
+
"mapbox-gl": "1.13.1",
|
|
57
56
|
"maplibre-gl": "^4.0.0",
|
|
58
57
|
"maplibregl-mapbox-request-transformer": "^0.0.2",
|
|
59
58
|
"moment": "^2.10.6",
|
|
@@ -62,8 +61,7 @@
|
|
|
62
61
|
"react-map-gl": "^8.1.1",
|
|
63
62
|
"resize-observer-polyfill": "^1.5.1",
|
|
64
63
|
"suncalc": "^1.9.0",
|
|
65
|
-
"type-analyzer": "0.4.0"
|
|
66
|
-
"viewport-mercator-project": "^6.0.0"
|
|
64
|
+
"type-analyzer": "0.4.0"
|
|
67
65
|
},
|
|
68
66
|
"nyc": {
|
|
69
67
|
"sourceMap": false,
|
|
@@ -79,8 +77,17 @@
|
|
|
79
77
|
"node": ">=20"
|
|
80
78
|
},
|
|
81
79
|
"volta": {
|
|
82
|
-
"node": "
|
|
80
|
+
"node": "24.21.0",
|
|
83
81
|
"yarn": "4.4.0"
|
|
84
82
|
},
|
|
85
|
-
"packageManager": "yarn@4.4.0"
|
|
83
|
+
"packageManager": "yarn@4.4.0",
|
|
84
|
+
"module": "dist/esm/index.js",
|
|
85
|
+
"exports": {
|
|
86
|
+
".": {
|
|
87
|
+
"types": "./dist/index.d.ts",
|
|
88
|
+
"import": "./dist/esm/index.js",
|
|
89
|
+
"require": "./dist/cjs/index.js",
|
|
90
|
+
"default": "./dist/cjs/index.js"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
86
93
|
}
|
package/dist/aggregation.js
DELETED
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.AGGREGATION_NAME = void 0;
|
|
8
|
-
exports.aggregate = aggregate;
|
|
9
|
-
exports.percentMean = exports.getMode = exports.getFrequency = exports.countUnique = void 0;
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
var _d3Array = require("d3-array");
|
|
12
|
-
var _constants = require("@kepler.gl/constants");
|
|
13
|
-
// SPDX-License-Identifier: MIT
|
|
14
|
-
// Copyright contributors to the kepler.gl project
|
|
15
|
-
|
|
16
|
-
var identity = function identity(d) {
|
|
17
|
-
return d;
|
|
18
|
-
};
|
|
19
|
-
var getFrequency = exports.getFrequency = function getFrequency(data) {
|
|
20
|
-
var accessor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : identity;
|
|
21
|
-
var occur = {};
|
|
22
|
-
for (var i = 0; i < data.length; i++) {
|
|
23
|
-
var val = accessor(data[i]);
|
|
24
|
-
occur[val] = (occur[val] || 0) + 1;
|
|
25
|
-
}
|
|
26
|
-
return occur;
|
|
27
|
-
};
|
|
28
|
-
var getMode = exports.getMode = function getMode(data, accessor) {
|
|
29
|
-
var occur = getFrequency(data, accessor);
|
|
30
|
-
return Object.keys(occur).reduce(function (prev, key) {
|
|
31
|
-
return occur[prev] >= occur[key] ? prev : key;
|
|
32
|
-
}, Object.keys(occur)[0]);
|
|
33
|
-
};
|
|
34
|
-
var countUnique = exports.countUnique = function countUnique(data) {
|
|
35
|
-
var accessor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : identity;
|
|
36
|
-
return Object.keys(data.reduce(function (uniques, d) {
|
|
37
|
-
var val = accessor(d);
|
|
38
|
-
uniques[val] = uniques[val] || 0;
|
|
39
|
-
uniques[val] += 1;
|
|
40
|
-
return uniques;
|
|
41
|
-
}, {})).length;
|
|
42
|
-
};
|
|
43
|
-
var percentMean = exports.percentMean = function percentMean(data, accessor) {
|
|
44
|
-
var getNumerator = accessor.getNumerator,
|
|
45
|
-
getDenominator = accessor.getDenominator;
|
|
46
|
-
var denominator = aggregate(data, _constants.AGGREGATION_TYPES.sum, getDenominator);
|
|
47
|
-
if (denominator <= 0) {
|
|
48
|
-
return 0;
|
|
49
|
-
}
|
|
50
|
-
var result = aggregate(data, _constants.AGGREGATION_TYPES.sum, getNumerator) / denominator;
|
|
51
|
-
return result;
|
|
52
|
-
};
|
|
53
|
-
function aggregate(data, technique) {
|
|
54
|
-
var accessor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : identity;
|
|
55
|
-
switch (technique) {
|
|
56
|
-
case _constants.AGGREGATION_TYPES.average:
|
|
57
|
-
return (0, _d3Array.mean)(data, accessor);
|
|
58
|
-
case 'mean_of_percent':
|
|
59
|
-
return percentMean(data, accessor);
|
|
60
|
-
case _constants.AGGREGATION_TYPES.countUnique:
|
|
61
|
-
return countUnique(data, accessor);
|
|
62
|
-
case _constants.AGGREGATION_TYPES.mode:
|
|
63
|
-
return getMode(data, accessor);
|
|
64
|
-
case _constants.AGGREGATION_TYPES.maximum:
|
|
65
|
-
return (0, _d3Array.max)(data, accessor);
|
|
66
|
-
case _constants.AGGREGATION_TYPES.minimum:
|
|
67
|
-
return (0, _d3Array.min)(data, accessor);
|
|
68
|
-
case _constants.AGGREGATION_TYPES.median:
|
|
69
|
-
return (0, _d3Array.median)(data, accessor);
|
|
70
|
-
case _constants.AGGREGATION_TYPES.stdev:
|
|
71
|
-
return (0, _d3Array.deviation)(data, accessor);
|
|
72
|
-
case _constants.AGGREGATION_TYPES.sum:
|
|
73
|
-
return (0, _d3Array.sum)(data, accessor);
|
|
74
|
-
case _constants.AGGREGATION_TYPES.variance:
|
|
75
|
-
return (0, _d3Array.variance)(data, accessor);
|
|
76
|
-
default:
|
|
77
|
-
return data.length;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
var AGGREGATION_NAME = exports.AGGREGATION_NAME = (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, _constants.AGGREGATION_TYPES.average, 'Average'), _constants.AGGREGATION_TYPES.countUnique, 'Number of Unique'), _constants.AGGREGATION_TYPES.mode, 'Most Often'), _constants.AGGREGATION_TYPES.maximum, 'Max'), _constants.AGGREGATION_TYPES.minimum, 'Min'), _constants.AGGREGATION_TYPES.median, 'Median'), _constants.AGGREGATION_TYPES.stdev, 'Std Deviation'), _constants.AGGREGATION_TYPES.sum, 'Total'), _constants.AGGREGATION_TYPES.variance, 'Variance');
|
|
81
|
-
|
|
82
|
-
// ratio: both denominator & numerator precent
|
|
83
|
-
// average, min, max, median,
|
|
84
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfZDNBcnJheSIsInJlcXVpcmUiLCJfY29uc3RhbnRzIiwiaWRlbnRpdHkiLCJkIiwiZ2V0RnJlcXVlbmN5IiwiZXhwb3J0cyIsImRhdGEiLCJhY2Nlc3NvciIsImFyZ3VtZW50cyIsImxlbmd0aCIsInVuZGVmaW5lZCIsIm9jY3VyIiwiaSIsInZhbCIsImdldE1vZGUiLCJPYmplY3QiLCJrZXlzIiwicmVkdWNlIiwicHJldiIsImtleSIsImNvdW50VW5pcXVlIiwidW5pcXVlcyIsInBlcmNlbnRNZWFuIiwiZ2V0TnVtZXJhdG9yIiwiZ2V0RGVub21pbmF0b3IiLCJkZW5vbWluYXRvciIsImFnZ3JlZ2F0ZSIsIkFHR1JFR0FUSU9OX1RZUEVTIiwic3VtIiwicmVzdWx0IiwidGVjaG5pcXVlIiwiYXZlcmFnZSIsIm1lYW4iLCJtb2RlIiwibWF4aW11bSIsIm1heCIsIm1pbmltdW0iLCJta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L0JELDRCQUFpQixDQUFDYyxRQUFRLEVBQUcsVUFBVSxDQUN6Qzs7QUFFRDtBQUNBIiwiaWdub3JlTGlzdCI6W119
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6W10sInNvdXJjZXMiOlsiLi4vc3JjL2FwcGxpY2F0aW9uLWNvbmZpZy10eXBlcy50cyJdLCJzb3VyY2VzQ29udGVudCI6WyIvLyBTUERYLUxpY2Vuc2UtSWRlbnRpZmllcjogTUlUXG4vLyBDb3B5cmlnaHQgY29udHJpYnV0b3JzIHRvIHRoZSBrZXBsZXIuZ2wgcHJvamVjdFxuXG5pbXBvcnQgKiBhcyBhcnJvdyBmcm9tICdhcGFjaGUtYXJyb3cnO1xuXG5leHBvcnQgaW50ZXJmYWNlIERhdGFiYXNlQ29ubmVjdGlvbiB7XG4gIHF1ZXJ5KHN0YXRlbWVudDogc3RyaW5nKTogUHJvbWlzZTxhcnJvdy5UYWJsZT47XG4gIGluc2VydEFycm93VGFibGUoYXJyb3dUYWJsZTogYXJyb3cuVGFibGUsIHtuYW1lfToge25hbWU6IHN0cmluZ30pOiBQcm9taXNlPHZvaWQ+O1xuICBjbG9zZSgpO1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIERhdGFiYXNlQWRhcHRlciB7XG4gIGNvbm5lY3QoKTogUHJvbWlzZTxEYXRhYmFzZUNvbm5lY3Rpb24+O1xuICByZWdpc3RlckZpbGVUZXh0KG5hbWU6IHN0cmluZywgdGV4dDogc3RyaW5nKTogUHJvbWlzZTx2b2lkPjtcbiAgcmVnaXN0ZXJGaWxlSGFuZGxlKG5hbWU6IHN0cmluZywgaGFuZGxlOiBhbnksIHByb3RvY29sOiBudW1iZXIsIGRpcmVjdElPOiBib29sZWFuKTogUHJvbWlzZTx2b2lkPjtcbn1cbiJdLCJtYXBwaW5ncyI6IiIsImlnbm9yZUxpc3QiOltdfQ==
|