@kepler.gl/constants 3.3.0-alpha.2 → 3.3.0-alpha.21

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 (76) hide show
  1. package/dist/annotation.d.ts +23 -1
  2. package/dist/cjs/annotation.js +89 -0
  3. package/dist/cjs/annotation.js.map +1 -0
  4. package/dist/cjs/color-palettes.js +461 -0
  5. package/dist/cjs/color-palettes.js.map +1 -0
  6. package/dist/cjs/colors-by-theme.js +519 -0
  7. package/dist/cjs/colors-by-theme.js.map +1 -0
  8. package/dist/cjs/dataset.js +209 -0
  9. package/dist/cjs/dataset.js.map +1 -0
  10. package/dist/cjs/default-settings.js +1813 -0
  11. package/dist/cjs/default-settings.js.map +1 -0
  12. package/dist/cjs/gpu-parameters.js +125 -0
  13. package/dist/cjs/gpu-parameters.js.map +1 -0
  14. package/dist/cjs/index.js +149 -0
  15. package/dist/cjs/index.js.map +1 -0
  16. package/dist/cjs/keyevent.js +26 -0
  17. package/dist/cjs/keyevent.js.map +1 -0
  18. package/dist/cjs/layers.js +671 -0
  19. package/dist/cjs/layers.js.map +1 -0
  20. package/dist/cjs/plot.js +16 -0
  21. package/dist/cjs/plot.js.map +1 -0
  22. package/dist/cjs/time.js +194 -0
  23. package/dist/cjs/time.js.map +1 -0
  24. package/dist/cjs/tooltip.js +221 -0
  25. package/dist/cjs/tooltip.js.map +1 -0
  26. package/dist/cjs/user-feedbacks.js +15 -0
  27. package/dist/cjs/user-feedbacks.js.map +1 -0
  28. package/dist/cjs/user-guides.js +19 -0
  29. package/dist/cjs/user-guides.js.map +1 -0
  30. package/dist/dataset.d.ts +161 -5
  31. package/dist/default-settings.d.ts +139 -14
  32. package/dist/esm/annotation.js +79 -0
  33. package/dist/esm/annotation.js.map +1 -0
  34. package/dist/esm/color-palettes.js +453 -0
  35. package/dist/esm/color-palettes.js.map +1 -0
  36. package/dist/esm/colors-by-theme.js +513 -0
  37. package/dist/esm/colors-by-theme.js.map +1 -0
  38. package/dist/esm/dataset.js +204 -0
  39. package/dist/esm/dataset.js.map +1 -0
  40. package/dist/esm/default-settings.js +1807 -0
  41. package/dist/esm/default-settings.js.map +1 -0
  42. package/dist/esm/gpu-parameters.js +119 -0
  43. package/dist/esm/gpu-parameters.js.map +1 -0
  44. package/dist/esm/index.js +18 -0
  45. package/dist/esm/index.js.map +1 -0
  46. package/dist/esm/keyevent.js +19 -0
  47. package/dist/esm/keyevent.js.map +1 -0
  48. package/dist/esm/layers.js +664 -0
  49. package/dist/esm/layers.js.map +1 -0
  50. package/dist/esm/plot.js +9 -0
  51. package/dist/esm/plot.js.map +1 -0
  52. package/dist/esm/time.js +190 -0
  53. package/dist/esm/time.js.map +1 -0
  54. package/dist/esm/tooltip.js +215 -0
  55. package/dist/esm/tooltip.js.map +1 -0
  56. package/dist/esm/user-feedbacks.js +9 -0
  57. package/dist/esm/user-feedbacks.js.map +1 -0
  58. package/dist/esm/user-guides.js +13 -0
  59. package/dist/esm/user-guides.js.map +1 -0
  60. package/dist/layers.d.ts +9 -0
  61. package/package.json +21 -14
  62. package/dist/annotation.js +0 -45
  63. package/dist/color-palettes.js +0 -462
  64. package/dist/colors-by-theme.js +0 -519
  65. package/dist/dataset.js +0 -82
  66. package/dist/default-settings.js +0 -1651
  67. package/dist/gpu-parameters.js +0 -125
  68. package/dist/index.js +0 -149
  69. package/dist/keyevent.js +0 -26
  70. package/dist/layers.js +0 -605
  71. package/dist/plot.js +0 -16
  72. package/dist/time.js +0 -194
  73. package/dist/tooltip.js +0 -221
  74. package/dist/user-feedbacks.js +0 -15
  75. package/dist/user-guides.js +0 -19
  76. package/umd/keplergl.min.js +0 -58
@@ -0,0 +1,1813 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.KEPLER_GL_WEBSITE = exports.KEPLER_GL_VERSION = exports.KEPLER_GL_NAME = exports.INIT_FILTER_ITEMS_IN_DROPDOWN = exports.ICON_FIELDS = exports.HIGHLIGH_COLOR_3D = exports.GLOBE_SUPPORTED_LAYERS = exports.GLOBE_MIN_ZOOM = exports.GLOBE_MAX_ZOOM = exports.GLOBE_MAX_LATITUDE = exports.GEOJSON_FIELDS = exports.GEOCODER_LAYER_ID = exports.GEOCODER_ICON_SIZE = exports.GEOCODER_ICON_COLOR = exports.GEOCODER_GEO_OFFSET = exports.GEOCODER_DATASET_NAME = exports.GEOARROW_METADATA_KEY = exports.GEOARROW_EXTENSIONS = exports.FourByThreeRatioOption = exports.FPS = exports.FILTER_VIEW_TYPES = exports.FILTER_TYPES = exports.FIELD_TYPE_DISPLAY = exports.FIELD_OPTS = exports.FIELD_COLORS = exports.EXPORT_VIDEO_ID = exports.EXPORT_MAP_ID = exports.EXPORT_MAP_FORMAT_OPTIONS = exports.EXPORT_MAP_FORMATS = exports.EXPORT_IMG_RESOLUTION_OPTIONS = exports.EXPORT_IMG_RATIO_OPTIONS = exports.EXPORT_IMG_RATIOS = exports.EXPORT_IMAGE_ID = exports.EXPORT_HTML_MAP_MODE_OPTIONS = exports.EXPORT_HTML_MAP_MODES = exports.EXPORT_DATA_TYPE_OPTIONS = exports.EXPORT_DATA_TYPE = exports.EXPORT_DATA_ID = exports.EMPTY_MAPBOX_STYLE = exports.EFFECT_DESCRIPTIONS = exports.EDITOR_MODES = exports.EDITOR_LAYER_PICKING_RADIUS = exports.EDITOR_LAYER_ID = exports.EDITOR_DRAW_MODES = exports.DISTANCE_FOG_TYPE = exports.DIMENSIONS = exports.DELETE_DATA_ID = exports.DEFAULT_UUID_COUNT = exports.DEFAULT_TOOLTIP_FIELDS = exports.DEFAULT_TIME_FORMAT = exports.DEFAULT_TIMEZONE = exports.DEFAULT_SHADOW_INTENSITY = exports.DEFAULT_SHADOW_COLOR = exports.DEFAULT_SCENEGRAPH_MODEL_ID = exports.DEFAULT_SCENEGRAPH_MODEL = exports.DEFAULT_POST_PROCESSING_EFFECT_TYPE = exports.DEFAULT_PICKING_RADIUS = exports.DEFAULT_NO_BASEMAP_STYLE = exports.DEFAULT_NOTIFICATION_TYPES = exports.DEFAULT_NOTIFICATION_TOPICS = exports.DEFAULT_NOTIFICATION_MESSAGE = exports.DEFAULT_MAP_STYLES = exports.DEFAULT_MAPLIBRE_STYLES = exports.DEFAULT_MAPBOX_STYLES = exports.DEFAULT_MAPBOX_SATELITE_STYLES = exports.DEFAULT_MAPBOX_API_URL = exports.DEFAULT_LIGHT_INTENSITY = exports.DEFAULT_LIGHT_COLOR = exports.DEFAULT_LIGHT_AND_SHADOW_PROPS = exports.DEFAULT_LAYER_GROUPS = exports.DEFAULT_LAYER_COLOR_PALETTE_STEPS = exports.DEFAULT_LAYER_COLOR_PALETTE = exports.DEFAULT_LAYER_COLOR = exports.DEFAULT_GLOBE_CONFIG = exports.DEFAULT_FILTER_VIEW_TYPE = exports.DEFAULT_FEATURE_FLAGS = exports.DEFAULT_BLDG_COLOR = exports.DEFAULT_BASE_MAP_STYLE = exports.DEFAULT_BACKGROUND_COLOR = exports.DEFAULT_AGGREGATION = exports.DATA_TABLE_ID = exports.DATASET_FORMATS = exports.CustomRatioOption = exports.CUSTOM_SCENEGRAPH_MODEL_ID = exports.CHANNEL_SCALE_SUPPORTED_FIELDS = exports.CHANNEL_SCALES = exports.BASE_SPEED = exports.BASE_MAP_COLOR_MODES = exports.BASE_MAP_BACKGROUND_LAYER_IDS = exports.BASEMAP_ICON_PREFIX = exports.BACKGROUND_LAYER_GROUP_SLUG = exports.BACKGROUND_LAYER_GROUP = exports.ANIMATION_WINDOW = exports.ALTITUDE_FIELDS = exports.ALL_FIELD_TYPES = exports.AGGREGATION_TYPE_OPTIONS = exports.AGGREGATION_TYPES = exports.ADD_MAP_STYLE_ID = exports.ADD_DATA_ID = exports.ACTION_PREFIX = void 0;
8
+ exports.dataTestIds = exports.TwoXResolutionOption = exports.TRIP_POINT_FIELDS = exports.TRIP_LAYER_SCENEGRAPH_MODELS = exports.TRIP_ARC_FIELDS = exports.TRANSITION_DURATION = exports.THROTTLE_NOTIFICATION_TIME = exports.THREE_D_BUILDING_LAYER_GROUP_SLUG = exports.THEME = exports.TEXT_OUTLINE_MULTIPLIER = exports.TABLE_OPTION_LIST = exports.TABLE_OPTION = exports.SixteenByNineRatioOption = exports.ScreenRatioOption = exports.SYNC_TIMELINE_MODES = exports.SURFACE_FOG_TYPE = exports.SPEED_CONTROL_STEP = exports.SPEED_CONTROL_RANGE = exports.SORT_ORDER = exports.SIDEBAR_PANELS = exports.SHARE_MAP_ID = exports.SCENEGRAPH_LAYER_MODELS = exports.SCALE_TYPE_NAMES = exports.SCALE_TYPES = exports.SCALE_FUNC = exports.SAVE_MAP_ID = exports.Resolution2560x1440Option = exports.Resolution1920x1440Option = exports.Resolution1920x1080Option = exports.Resolution1600x900Option = exports.Resolution1600x1200Option = exports.Resolution1280x960Option = exports.Resolution1280x720Option = exports.Resolution1024x768Option = exports.RESOLUTIONS = exports.PROJECTED_PIXEL_SIZE_MULTIPLIER = exports.POSTPROCESSING_EFFECTS = exports.PLOT_TYPES = exports.PANEL_VIEW_TOGGLES = exports.PANELS = exports.OneXResolutionOption = exports.OVERWRITE_MAP_ID = exports.OVERLAY_BLENDINGS = exports.NO_VALUE_COLOR = exports.NO_MAP_ID = exports.NO_BASEMAP_ICON = exports.MapViewMode = exports.MapSplitMode = exports.MISSING_VALUE_COLOR = exports.MAX_GPU_FILTERS = exports.MAX_DEFAULT_TOOLTIPS = exports.MAP_THUMBNAIL_DIMENSION = exports.MAP_LIB_OPTIONS = exports.MAP_INFO_CHARACTER = exports.MAP_CONTROLS = exports.MAPBOX_MAX_PITCH = exports.LOADING_METHODS = exports.LOADERS_CDN_VERSION = exports.LOADERS_CDN_URL = exports.LIGHT_AND_SHADOW_EFFECT_TIME_MODES = exports.LIGHT_AND_SHADOW_EFFECT = exports.LEGACY_DEFAULT_SCENEGRAPH_URL = exports.LAYER_BLENDINGS = exports.KEPLER_UNFOLDED_BUCKET = void 0;
9
+ exports.getHTMLMapModeTileUrl = getHTMLMapModeTileUrl;
10
+ exports.ordinalFieldScaleFunctions = exports.ordinalFieldAggrScaleFunctions = exports.notSupportedScaleOpts = exports.notSupportAggrOpts = exports.linearFieldScaleFunctions = exports.linearFieldAggrScaleFunctions = exports.getLoaderOptions = void 0;
11
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
12
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
13
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
14
+ var _keymirror = _interopRequireDefault(require("keymirror"));
15
+ var _d3Scale = require("d3-scale");
16
+ var _tooltip = require("./tooltip");
17
+ var _SCALE_FUNC, _FIELD_TYPE_DISPLAY, _FIELD_OPTS; // SPDX-License-Identifier: MIT
18
+ // Copyright contributors to the kepler.gl project
19
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
20
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
21
+ var ACTION_PREFIX = exports.ACTION_PREFIX = '@@kepler.gl/';
22
+ var KEPLER_UNFOLDED_BUCKET = exports.KEPLER_UNFOLDED_BUCKET = 'https://studio-public-data.foursquare.com/statics/keplergl';
23
+ var BASEMAP_ICON_PREFIX = exports.BASEMAP_ICON_PREFIX = "geodude";
24
+ var DEFAULT_MAPBOX_API_URL = exports.DEFAULT_MAPBOX_API_URL = 'https://api.mapbox.com';
25
+ var TRANSITION_DURATION = exports.TRANSITION_DURATION = 0;
26
+
27
+ // Modal Ids
28
+ /**
29
+ * Modal id: data table
30
+ * @constant
31
+ * @type {string}
32
+ * @public
33
+ */
34
+ var DATA_TABLE_ID = exports.DATA_TABLE_ID = 'dataTable';
35
+ /**
36
+ * Modal id: delete dataset confirm dialog
37
+ * @constant
38
+ * @type {string}
39
+ * @public
40
+ */
41
+ var DELETE_DATA_ID = exports.DELETE_DATA_ID = 'deleteData';
42
+ /**
43
+ * Modal id: add data modal
44
+ * @constant
45
+ * @type {string}
46
+ * @public
47
+ */
48
+ var ADD_DATA_ID = exports.ADD_DATA_ID = 'addData';
49
+ /**
50
+ * Modal id: export image modal
51
+ * @constant
52
+ * @type {string}
53
+ * @public
54
+ */
55
+ var EXPORT_IMAGE_ID = exports.EXPORT_IMAGE_ID = 'exportImage';
56
+ /**
57
+ * Modal id: export data modal
58
+ * @constant
59
+ * @type {string}
60
+ * @public
61
+ */
62
+ var EXPORT_DATA_ID = exports.EXPORT_DATA_ID = 'exportData';
63
+ /**
64
+ * Modal id: add custom map style modal
65
+ * @constant
66
+ * @type {string}
67
+ * @public
68
+ */
69
+ var ADD_MAP_STYLE_ID = exports.ADD_MAP_STYLE_ID = 'addMapStyle';
70
+ /**
71
+ * Modal id: export map modal
72
+ * @constant
73
+ * @type {string}
74
+ * @public
75
+ */
76
+ var EXPORT_MAP_ID = exports.EXPORT_MAP_ID = 'exportMap';
77
+ /**
78
+ * Modal id: export video modal
79
+ * @constant
80
+ * @type {string}
81
+ * @public
82
+ */
83
+ var EXPORT_VIDEO_ID = exports.EXPORT_VIDEO_ID = 'exportVideo';
84
+ /**
85
+ * Modal id: save map modal
86
+ * @constant
87
+ * @type {string}
88
+ * @public
89
+ */
90
+ var SAVE_MAP_ID = exports.SAVE_MAP_ID = 'saveMap';
91
+ /**
92
+ * Modal id: confirm to overwrite saved map
93
+ * @constant
94
+ * @type {string}
95
+ * @public
96
+ */
97
+ var OVERWRITE_MAP_ID = exports.OVERWRITE_MAP_ID = 'overwriteMap';
98
+ /**
99
+ * Modal id: share map url modal
100
+ * @constant
101
+ * @type {string}
102
+ * @public
103
+ */
104
+ var SHARE_MAP_ID = exports.SHARE_MAP_ID = 'shareMap';
105
+ var KEPLER_GL_NAME = exports.KEPLER_GL_NAME = 'kepler.gl';
106
+
107
+ // __PACKAGE_VERSION__ is automatically injected by Babel/Esbuild during the build process
108
+ // Since we are injecting this during the build process with babel
109
+ // while developing VERSION is not defined, we capture the exception and return
110
+ // an empty string which will allow us to retrieve the latest umd version
111
+ var KEPLER_GL_VERSION = exports.KEPLER_GL_VERSION = "3.3.0-alpha.21";
112
+ var KEPLER_GL_WEBSITE = exports.KEPLER_GL_WEBSITE = 'http://kepler.gl/';
113
+ var DIMENSIONS = exports.DIMENSIONS = {
114
+ sidePanel: {
115
+ width: 300,
116
+ margin: {
117
+ top: 12,
118
+ left: 12,
119
+ bottom: 12,
120
+ right: 20
121
+ },
122
+ headerHeight: 96
123
+ },
124
+ mapControl: {
125
+ width: 184,
126
+ padding: 12,
127
+ mapLegend: {
128
+ pinned: {
129
+ bottom: 22,
130
+ right: 12
131
+ }
132
+ }
133
+ }
134
+ };
135
+
136
+ /**
137
+ * Theme name that can be passed to `KeplerGl` `prop.theme`.
138
+ * Available themes are `THEME.light`, `THEME.dark`, and `THEME.space`.
139
+ * Default theme is `THEME.dark`
140
+ * @constant
141
+ * @type {object}
142
+ * @public
143
+ * @example
144
+ * ```js
145
+ * const Map = () => <KeplerGl theme={THEME.light} id="map"/>
146
+ * ```
147
+ */
148
+ var THEME = exports.THEME = (0, _keymirror["default"])({
149
+ light: null,
150
+ dark: null,
151
+ space: null,
152
+ base: null
153
+ });
154
+ var SIDEBAR_PANELS = exports.SIDEBAR_PANELS = [{
155
+ id: 'layer',
156
+ label: 'sidebar.panels.layer',
157
+ onClick: null
158
+ }, {
159
+ id: 'filter',
160
+ label: 'sidebar.panels.filter',
161
+ onClick: null
162
+ }, {
163
+ id: 'interaction',
164
+ label: 'sidebar.panels.interaction',
165
+ onClick: null
166
+ }, {
167
+ id: 'map',
168
+ label: 'sidebar.panels.basemap',
169
+ onClick: null
170
+ }];
171
+ var PANEL_VIEW_TOGGLES = exports.PANEL_VIEW_TOGGLES = (0, _keymirror["default"])({
172
+ list: null,
173
+ byDataset: null
174
+ });
175
+
176
+ // backward compatibility
177
+ var PANELS = exports.PANELS = SIDEBAR_PANELS;
178
+
179
+ // MAP STYLES
180
+
181
+ var DEFAULT_BLDG_COLOR = exports.DEFAULT_BLDG_COLOR = '#D1CEC7';
182
+ var DEFAULT_BACKGROUND_COLOR = exports.DEFAULT_BACKGROUND_COLOR = '#000000';
183
+
184
+ // assists in identifying basemap background layers when auto-determining the backgroundColor
185
+ var BASE_MAP_BACKGROUND_LAYER_IDS = exports.BASE_MAP_BACKGROUND_LAYER_IDS = ['background', 'bg', 'land', 'water'];
186
+ var BACKGROUND_LAYER_GROUP_SLUG = exports.BACKGROUND_LAYER_GROUP_SLUG = 'Background';
187
+ var THREE_D_BUILDING_LAYER_GROUP_SLUG = exports.THREE_D_BUILDING_LAYER_GROUP_SLUG = '3d building';
188
+ var BACKGROUND_LAYER_GROUP = exports.BACKGROUND_LAYER_GROUP = {
189
+ slug: BACKGROUND_LAYER_GROUP_SLUG,
190
+ filter: function filter() {
191
+ return false;
192
+ },
193
+ defaultVisibility: false,
194
+ isVisibilityToggleAvailable: false,
195
+ isMoveToTopAvailable: false,
196
+ isColorPickerAvailable: true
197
+ };
198
+ var DEFAULT_LAYER_GROUPS = exports.DEFAULT_LAYER_GROUPS = [{
199
+ slug: 'label',
200
+ filter: function filter(_ref) {
201
+ var id = _ref.id,
202
+ type = _ref.type;
203
+ return id.match(/(?=(label|place-|poi-))/) || (type === null || type === void 0 ? void 0 : type.match(/(?=(symbol))/));
204
+ },
205
+ defaultVisibility: true,
206
+ isVisibilityToggleAvailable: true,
207
+ isMoveToTopAvailable: true,
208
+ isColorPickerAvailable: false
209
+ }, {
210
+ slug: 'road',
211
+ filter: function filter(_ref2) {
212
+ var id = _ref2.id;
213
+ return id.match(/(?=(road|railway|tunnel|street|bridge))(?!.*label)/);
214
+ },
215
+ defaultVisibility: true,
216
+ isVisibilityToggleAvailable: true,
217
+ isMoveToTopAvailable: true,
218
+ isColorPickerAvailable: false
219
+ }, {
220
+ slug: 'border',
221
+ filter: function filter(_ref3) {
222
+ var id = _ref3.id;
223
+ return id.match(/border|boundaries|boundary/);
224
+ },
225
+ defaultVisibility: false,
226
+ isVisibilityToggleAvailable: true,
227
+ isMoveToTopAvailable: true,
228
+ isColorPickerAvailable: false
229
+ }, {
230
+ slug: 'building',
231
+ filter: function filter(_ref4) {
232
+ var id = _ref4.id;
233
+ return id.match(/building/);
234
+ },
235
+ defaultVisibility: true,
236
+ isVisibilityToggleAvailable: true,
237
+ isMoveToTopAvailable: true,
238
+ isColorPickerAvailable: false
239
+ }, {
240
+ slug: 'water',
241
+ filter: function filter(_ref5) {
242
+ var id = _ref5.id;
243
+ return id.match(/(?=(water|stream|ferry))/);
244
+ },
245
+ defaultVisibility: true,
246
+ isVisibilityToggleAvailable: true,
247
+ isMoveToTopAvailable: true,
248
+ isColorPickerAvailable: false
249
+ }, {
250
+ slug: 'land',
251
+ filter: function filter(_ref6) {
252
+ var id = _ref6.id;
253
+ return id.match(/(?=(parks|landcover|industrial|sand|hillshade))/);
254
+ },
255
+ defaultVisibility: true,
256
+ isVisibilityToggleAvailable: true,
257
+ isMoveToTopAvailable: true,
258
+ isColorPickerAvailable: false
259
+ }, {
260
+ slug: THREE_D_BUILDING_LAYER_GROUP_SLUG,
261
+ filter: function filter() {
262
+ return false;
263
+ },
264
+ defaultVisibility: false,
265
+ isVisibilityToggleAvailable: true,
266
+ isMoveToTopAvailable: true,
267
+ isColorPickerAvailable: true
268
+ }];
269
+ var BASE_MAP_COLOR_MODES = exports.BASE_MAP_COLOR_MODES = (0, _keymirror["default"])({
270
+ NONE: null,
271
+ DARK: null,
272
+ LIGHT: null
273
+ });
274
+ var NO_MAP_ID = exports.NO_MAP_ID = 'no_map';
275
+
276
+ // Fallback style to use when styles are being fetched, or when
277
+ // a style fails to fetch
278
+ var EMPTY_MAPBOX_STYLE = exports.EMPTY_MAPBOX_STYLE = {
279
+ version: 8,
280
+ sources: {},
281
+ layers: []
282
+ };
283
+ var MAP_LIB_OPTIONS = exports.MAP_LIB_OPTIONS = {
284
+ MAPBOX: 'mapbox',
285
+ MAPLIBRE: 'maplibre'
286
+ };
287
+
288
+ /** Mapbox GL JS does not support pitch above 60 degrees */
289
+ var MAPBOX_MAX_PITCH = exports.MAPBOX_MAX_PITCH = 60;
290
+ var NO_BASEMAP_ICON = exports.NO_BASEMAP_ICON = "".concat(BASEMAP_ICON_PREFIX, "/NO_BASEMAP.png");
291
+ var DEFAULT_BASE_MAP_STYLE = exports.DEFAULT_BASE_MAP_STYLE = 'dark-matter';
292
+ var DEFAULT_NO_BASEMAP_STYLE = exports.DEFAULT_NO_BASEMAP_STYLE = {
293
+ id: NO_MAP_ID,
294
+ label: 'No Basemap',
295
+ url: '',
296
+ icon: NO_BASEMAP_ICON,
297
+ layerGroups: [BACKGROUND_LAYER_GROUP],
298
+ colorMode: BASE_MAP_COLOR_MODES.NONE,
299
+ style: EMPTY_MAPBOX_STYLE
300
+ };
301
+ var DEFAULT_MAPBOX_STYLES = exports.DEFAULT_MAPBOX_STYLES = [{
302
+ id: 'dark',
303
+ label: 'Dark',
304
+ url: 'mapbox://styles/uberdata/cjoqbbf6l9k302sl96tyvka09',
305
+ icon: "".concat(BASEMAP_ICON_PREFIX, "/UBER_DARK_V2.png"),
306
+ layerGroups: DEFAULT_LAYER_GROUPS,
307
+ colorMode: BASE_MAP_COLOR_MODES.DARK,
308
+ complimentaryStyleId: 'light'
309
+ }, {
310
+ id: 'light',
311
+ label: 'Light',
312
+ url: 'mapbox://styles/uberdata/cjoqb9j339k1f2sl9t5ic5bn4',
313
+ icon: "".concat(BASEMAP_ICON_PREFIX, "/UBER_LIGHT_V2.png"),
314
+ layerGroups: DEFAULT_LAYER_GROUPS,
315
+ colorMode: BASE_MAP_COLOR_MODES.LIGHT,
316
+ complimentaryStyleId: 'dark'
317
+ }, {
318
+ id: 'muted',
319
+ label: 'Muted Light',
320
+ url: 'mapbox://styles/uberdata/cjfyl03kp1tul2smf5v2tbdd4',
321
+ icon: "".concat(BASEMAP_ICON_PREFIX, "/UBER_MUTED_LIGHT.png"),
322
+ layerGroups: DEFAULT_LAYER_GROUPS,
323
+ colorMode: BASE_MAP_COLOR_MODES.LIGHT,
324
+ complimentaryStyleId: 'muted_night'
325
+ }, {
326
+ id: 'muted_night',
327
+ label: 'Muted Night',
328
+ url: 'mapbox://styles/uberdata/cjfxhlikmaj1b2soyzevnywgs',
329
+ icon: "".concat(BASEMAP_ICON_PREFIX, "/UBER_MUTED_NIGHT.png"),
330
+ layerGroups: DEFAULT_LAYER_GROUPS,
331
+ colorMode: BASE_MAP_COLOR_MODES.DARK,
332
+ complimentaryStyleId: 'muted'
333
+ }];
334
+ var DEFAULT_MAPBOX_SATELITE_STYLES = exports.DEFAULT_MAPBOX_SATELITE_STYLES = [{
335
+ id: 'satellite',
336
+ label: 'Satellite with streets',
337
+ url: "mapbox://styles/mapbox/satellite-streets-v11",
338
+ icon: "".concat(BASEMAP_ICON_PREFIX, "/UBER_SATELLITE.png"),
339
+ layerGroups: DEFAULT_LAYER_GROUPS,
340
+ colorMode: BASE_MAP_COLOR_MODES.NONE
341
+ }];
342
+ var DEFAULT_MAPLIBRE_STYLES = exports.DEFAULT_MAPLIBRE_STYLES = [{
343
+ id: 'dark-matter',
344
+ label: 'DarkMatter',
345
+ url: 'https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json',
346
+ icon: "".concat(BASEMAP_ICON_PREFIX, "/DARKMATTER.png"),
347
+ layerGroups: DEFAULT_LAYER_GROUPS,
348
+ colorMode: BASE_MAP_COLOR_MODES.DARK,
349
+ complimentaryStyleId: 'positron'
350
+ }, {
351
+ id: 'positron',
352
+ label: 'Positron',
353
+ url: 'https://basemaps.cartocdn.com/gl/positron-gl-style/style.json',
354
+ icon: "".concat(BASEMAP_ICON_PREFIX, "/POSITRON.png"),
355
+ layerGroups: DEFAULT_LAYER_GROUPS,
356
+ colorMode: BASE_MAP_COLOR_MODES.LIGHT,
357
+ complimentaryStyleId: 'dark-matter'
358
+ }, {
359
+ id: 'voyager',
360
+ label: 'Voyager',
361
+ url: 'https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json',
362
+ icon: "".concat(BASEMAP_ICON_PREFIX, "/VOYAGER.png"),
363
+ layerGroups: DEFAULT_LAYER_GROUPS,
364
+ colorMode: BASE_MAP_COLOR_MODES.LIGHT,
365
+ complimentaryStyleId: 'dark-matter'
366
+ }];
367
+ var DEFAULT_MAP_STYLES = exports.DEFAULT_MAP_STYLES = [DEFAULT_NO_BASEMAP_STYLE].concat(DEFAULT_MAPLIBRE_STYLES, DEFAULT_MAPBOX_SATELITE_STYLES, DEFAULT_MAPBOX_STYLES);
368
+ var GEOJSON_FIELDS = exports.GEOJSON_FIELDS = {
369
+ geojson: ['_geojson', 'all_points', 'geojson']
370
+ };
371
+ var ICON_FIELDS = exports.ICON_FIELDS = {
372
+ icon: ['icon']
373
+ };
374
+ var TRIP_POINT_FIELDS = exports.TRIP_POINT_FIELDS = [['lat', 'lng'], ['lat', 'lon'], ['lat', 'long'], ['latitude', 'longitude']];
375
+ var ALTITUDE_FIELDS = exports.ALTITUDE_FIELDS = ['alt', 'altitude'];
376
+ var TRIP_ARC_FIELDS = exports.TRIP_ARC_FIELDS = {
377
+ lat0: 'begintrip',
378
+ lng0: 'begintrip',
379
+ lat1: 'dropoff',
380
+ lng1: 'dropoff'
381
+ };
382
+ var FILTER_TYPES = exports.FILTER_TYPES = (0, _keymirror["default"])({
383
+ range: null,
384
+ select: null,
385
+ input: null,
386
+ timeRange: null,
387
+ multiSelect: null,
388
+ polygon: null
389
+ });
390
+ var FILTER_VIEW_TYPES = exports.FILTER_VIEW_TYPES = (0, _keymirror["default"])({
391
+ side: null,
392
+ enlarged: null,
393
+ minified: null
394
+ });
395
+ var DEFAULT_FILTER_VIEW_TYPE = exports.DEFAULT_FILTER_VIEW_TYPE = FILTER_VIEW_TYPES.side;
396
+ var SCALE_TYPES = exports.SCALE_TYPES = (0, _keymirror["default"])({
397
+ ordinal: null,
398
+ quantile: null,
399
+ quantize: null,
400
+ jenks: null,
401
+ linear: null,
402
+ sqrt: null,
403
+ log: null,
404
+ threshold: null,
405
+ custom: null,
406
+ customOrdinal: null,
407
+ // ordinal domain to linear range
408
+ point: null
409
+ });
410
+ var SCALE_TYPE_NAMES = exports.SCALE_TYPE_NAMES = {
411
+ ordinal: 'Ordinal',
412
+ quantile: 'Quantile',
413
+ quantize: 'Quantize',
414
+ jenks: 'Jenks Natural Breaks',
415
+ linear: 'Linear',
416
+ sqrt: 'Sqrt',
417
+ log: 'Log',
418
+ threshold: 'Threshold',
419
+ custom: 'Custom Breaks',
420
+ customOrdinal: 'Custom Ordinal',
421
+ point: 'Point'
422
+ };
423
+ var SCALE_FUNC = exports.SCALE_FUNC = (_SCALE_FUNC = {}, (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"])((0, _defineProperty2["default"])(_SCALE_FUNC, SCALE_TYPES.linear, _d3Scale.scaleLinear), SCALE_TYPES.quantize, _d3Scale.scaleQuantize), SCALE_TYPES.quantile, _d3Scale.scaleQuantile), SCALE_TYPES.jenks, _d3Scale.scaleThreshold), SCALE_TYPES.ordinal, _d3Scale.scaleOrdinal), SCALE_TYPES.sqrt, _d3Scale.scaleSqrt), SCALE_TYPES.log, _d3Scale.scaleLog), SCALE_TYPES.point, _d3Scale.scalePoint), SCALE_TYPES.threshold, _d3Scale.scaleThreshold), SCALE_TYPES.custom, _d3Scale.scaleThreshold), (0, _defineProperty2["default"])(_SCALE_FUNC, SCALE_TYPES.customOrdinal, _d3Scale.scaleOrdinal));
424
+ var ALL_FIELD_TYPES = exports.ALL_FIELD_TYPES = (0, _keymirror["default"])({
425
+ "boolean": null,
426
+ date: null,
427
+ geojson: null,
428
+ integer: null,
429
+ real: null,
430
+ string: null,
431
+ timestamp: null,
432
+ point: null,
433
+ array: null,
434
+ object: null,
435
+ geoarrow: null,
436
+ h3: null
437
+ });
438
+
439
+ // Data Table
440
+ var SORT_ORDER = exports.SORT_ORDER = (0, _keymirror["default"])({
441
+ ASCENDING: null,
442
+ DESCENDING: null,
443
+ UNSORT: null
444
+ });
445
+ var TABLE_OPTION = exports.TABLE_OPTION = (0, _keymirror["default"])({
446
+ SORT_ASC: null,
447
+ SORT_DES: null,
448
+ UNSORT: null,
449
+ PIN: null,
450
+ UNPIN: null,
451
+ COPY: null,
452
+ FORMAT_COLUMN: null,
453
+ HIDE: null,
454
+ RENAME: null,
455
+ CHANGE_TYPE: null,
456
+ DELETE: null,
457
+ CREATE_FILTER: null
458
+ });
459
+ var TABLE_OPTION_LIST = exports.TABLE_OPTION_LIST = [{
460
+ value: TABLE_OPTION.SORT_ASC,
461
+ display: 'Sort Ascending',
462
+ icon: 'ArrowUp',
463
+ condition: function condition(props) {
464
+ return props.sortTableColumn && props.sortMode !== SORT_ORDER.ASCENDING;
465
+ }
466
+ }, {
467
+ value: TABLE_OPTION.SORT_DES,
468
+ display: 'Sort Descending',
469
+ icon: 'ArrowDown',
470
+ condition: function condition(props) {
471
+ return props.sortTableColumn && props.sortMode !== SORT_ORDER.DESCENDING;
472
+ }
473
+ }, {
474
+ value: TABLE_OPTION.UNSORT,
475
+ display: 'Unsort Column',
476
+ icon: 'Cancel',
477
+ condition: function condition(props) {
478
+ return props.isSorted;
479
+ }
480
+ }, {
481
+ value: TABLE_OPTION.PIN,
482
+ display: 'Pin Column',
483
+ icon: 'Pin',
484
+ condition: function condition(props) {
485
+ return !props.isPinned;
486
+ }
487
+ }, {
488
+ value: TABLE_OPTION.UNPIN,
489
+ display: 'Unpin Column',
490
+ icon: 'Cancel',
491
+ condition: function condition(props) {
492
+ return props.isPinned;
493
+ }
494
+ }, {
495
+ value: TABLE_OPTION.COPY,
496
+ display: 'Copy Column',
497
+ icon: 'Clipboard'
498
+ }, {
499
+ value: TABLE_OPTION.HIDE,
500
+ display: 'Hide Column',
501
+ icon: 'EyeUnseen',
502
+ condition: function condition(props) {
503
+ return props.hideTableColumn;
504
+ }
505
+ }, {
506
+ value: TABLE_OPTION.FORMAT_COLUMN,
507
+ display: 'Format Column',
508
+ icon: 'Hash',
509
+ condition: function condition(props) {
510
+ return props.setDisplayFormat;
511
+ }
512
+ }, {
513
+ value: TABLE_OPTION.RENAME,
514
+ display: 'Rename',
515
+ icon: 'Edit',
516
+ condition: function condition(props) {
517
+ return props.renameTableColumn;
518
+ }
519
+ }, {
520
+ value: TABLE_OPTION.CHANGE_TYPE,
521
+ display: 'Change Data Type',
522
+ icon: 'Edit',
523
+ condition: function condition(props) {
524
+ return props.changeTableColumnType;
525
+ }
526
+ }, {
527
+ value: TABLE_OPTION.CREATE_FILTER,
528
+ display: 'Create Filter',
529
+ icon: 'FilterFunnel',
530
+ condition: function condition(props) {
531
+ return props.createFilterFromColumn;
532
+ }
533
+ }, {
534
+ value: TABLE_OPTION.DELETE,
535
+ display: 'Delete Column',
536
+ icon: 'Trash',
537
+ condition: function condition(props) {
538
+ return props.deleteTableColumn && Object.keys(props.colMeta || {}).length > 1;
539
+ }
540
+ }];
541
+ var YELLOW = '248, 194, 28';
542
+ var PINK = '242, 152, 163';
543
+ var PURPLE = '160, 106, 206';
544
+ var BLUE = '140, 210, 205';
545
+ var BLUE2 = '106, 160, 206';
546
+ var BLUE3 = '0, 172, 237';
547
+ var GREEN = '106, 160, 56';
548
+ var GREEN2 = '74, 165, 150';
549
+ var RED = '237, 88, 106';
550
+ var ORANGE = '231, 110, 58';
551
+ var FIELD_TYPE_DISPLAY = exports.FIELD_TYPE_DISPLAY = (_FIELD_TYPE_DISPLAY = {}, (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"])((0, _defineProperty2["default"])(_FIELD_TYPE_DISPLAY, ALL_FIELD_TYPES["boolean"], {
552
+ label: 'bool',
553
+ color: PINK
554
+ }), ALL_FIELD_TYPES.date, {
555
+ label: 'date',
556
+ color: PURPLE
557
+ }), ALL_FIELD_TYPES.geojson, {
558
+ label: 'geo',
559
+ color: BLUE2
560
+ }), ALL_FIELD_TYPES.geoarrow, {
561
+ label: 'geo',
562
+ color: BLUE2
563
+ }), ALL_FIELD_TYPES.integer, {
564
+ label: 'int',
565
+ color: YELLOW
566
+ }), ALL_FIELD_TYPES.real, {
567
+ label: 'float',
568
+ color: YELLOW
569
+ }), ALL_FIELD_TYPES.string, {
570
+ label: 'string',
571
+ color: BLUE
572
+ }), ALL_FIELD_TYPES.timestamp, {
573
+ label: 'time',
574
+ color: GREEN
575
+ }), ALL_FIELD_TYPES.point, {
576
+ label: 'point',
577
+ color: BLUE3
578
+ }), ALL_FIELD_TYPES.array, {
579
+ label: 'array',
580
+ color: ORANGE
581
+ }), (0, _defineProperty2["default"])((0, _defineProperty2["default"])(_FIELD_TYPE_DISPLAY, ALL_FIELD_TYPES.object, {
582
+ label: 'object',
583
+ color: GREEN2
584
+ }), ALL_FIELD_TYPES.h3, {
585
+ label: 'h3',
586
+ color: BLUE
587
+ }));
588
+ var FIELD_COLORS = exports.FIELD_COLORS = {
589
+ "default": RED
590
+ };
591
+ var HIGHLIGH_COLOR_3D = exports.HIGHLIGH_COLOR_3D = [255, 255, 255, 60];
592
+ var CHANNEL_SCALES = exports.CHANNEL_SCALES = (0, _keymirror["default"])({
593
+ color: null,
594
+ radius: null,
595
+ size: null,
596
+ colorAggr: null,
597
+ sizeAggr: null,
598
+ angle: null
599
+ });
600
+ var AGGREGATION_TYPES = exports.AGGREGATION_TYPES = {
601
+ // default
602
+ count: 'count',
603
+ // linear
604
+ average: 'average',
605
+ maximum: 'maximum',
606
+ minimum: 'minimum',
607
+ median: 'median',
608
+ stdev: 'stdev',
609
+ sum: 'sum',
610
+ variance: 'variance',
611
+ // ordinal
612
+ mode: 'mode',
613
+ countUnique: 'countUnique'
614
+ };
615
+ var AGGREGATION_TYPE_OPTIONS = exports.AGGREGATION_TYPE_OPTIONS = Object.entries(AGGREGATION_TYPES).map(function (_ref7) {
616
+ var _ref8 = (0, _slicedToArray2["default"])(_ref7, 2),
617
+ key = _ref8[0],
618
+ value = _ref8[1];
619
+ return {
620
+ id: key,
621
+ label: key === 'stdev' ? 'Std Deviation' : key === 'countUnique' ? 'Count Unique' : typeof value === 'string' ? value.charAt(0).toUpperCase() + value.slice(1) : value
622
+ };
623
+ });
624
+ var linearFieldScaleFunctions = exports.linearFieldScaleFunctions = (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, CHANNEL_SCALES.color, [SCALE_TYPES.quantize, SCALE_TYPES.quantile, SCALE_TYPES.jenks, SCALE_TYPES.custom]), CHANNEL_SCALES.radius, [SCALE_TYPES.sqrt]), CHANNEL_SCALES.size, [SCALE_TYPES.linear, SCALE_TYPES.sqrt, SCALE_TYPES.log]), CHANNEL_SCALES.angle, [SCALE_TYPES.linear]);
625
+ var DEFAULT_AGGREGATION_COLOR_SCALES = [SCALE_TYPES.quantize, SCALE_TYPES.quantile, SCALE_TYPES.jenks, SCALE_TYPES.custom];
626
+ var linearFieldAggrScaleFunctions = exports.linearFieldAggrScaleFunctions = (0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, CHANNEL_SCALES.colorAggr, [AGGREGATION_TYPES.average, AGGREGATION_TYPES.maximum, AGGREGATION_TYPES.minimum, AGGREGATION_TYPES.median, AGGREGATION_TYPES.stdev, AGGREGATION_TYPES.sum, AGGREGATION_TYPES.variance, AGGREGATION_TYPES.count].reduce(function (prev, cur) {
627
+ prev[cur] = DEFAULT_AGGREGATION_COLOR_SCALES;
628
+ return prev;
629
+ }, {})), CHANNEL_SCALES.sizeAggr, (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, AGGREGATION_TYPES.average, [SCALE_TYPES.linear, SCALE_TYPES.sqrt, SCALE_TYPES.log]), AGGREGATION_TYPES.maximum, [SCALE_TYPES.linear, SCALE_TYPES.sqrt, SCALE_TYPES.log]), AGGREGATION_TYPES.minimum, [SCALE_TYPES.linear, SCALE_TYPES.sqrt, SCALE_TYPES.log]), AGGREGATION_TYPES.median, [SCALE_TYPES.linear, SCALE_TYPES.sqrt, SCALE_TYPES.log]), AGGREGATION_TYPES.stdev, [SCALE_TYPES.linear, SCALE_TYPES.sqrt, SCALE_TYPES.log]), AGGREGATION_TYPES.sum, [SCALE_TYPES.linear, SCALE_TYPES.sqrt, SCALE_TYPES.log]), AGGREGATION_TYPES.variance, [SCALE_TYPES.linear, SCALE_TYPES.sqrt, SCALE_TYPES.log]));
630
+ var ordinalFieldScaleFunctions = exports.ordinalFieldScaleFunctions = (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, CHANNEL_SCALES.color, [SCALE_TYPES.ordinal, SCALE_TYPES.customOrdinal]), CHANNEL_SCALES.radius, [SCALE_TYPES.point]), CHANNEL_SCALES.size, [SCALE_TYPES.point]);
631
+ var ordinalFieldAggrScaleFunctions = exports.ordinalFieldAggrScaleFunctions = (0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, CHANNEL_SCALES.colorAggr, (0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, AGGREGATION_TYPES.mode, [SCALE_TYPES.ordinal]), AGGREGATION_TYPES.countUnique, [SCALE_TYPES.quantize, SCALE_TYPES.quantile])), CHANNEL_SCALES.sizeAggr, {});
632
+ var notSupportedScaleOpts = exports.notSupportedScaleOpts = (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, CHANNEL_SCALES.color, []), CHANNEL_SCALES.radius, []), CHANNEL_SCALES.size, []);
633
+ var notSupportAggrOpts = exports.notSupportAggrOpts = (0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, CHANNEL_SCALES.colorAggr, {}), CHANNEL_SCALES.sizeAggr, {});
634
+
635
+ /**
636
+ * Default aggregation are based on ocunt
637
+ */
638
+ var DEFAULT_AGGREGATION = exports.DEFAULT_AGGREGATION = (0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, CHANNEL_SCALES.colorAggr, (0, _defineProperty2["default"])({}, AGGREGATION_TYPES.count, DEFAULT_AGGREGATION_COLOR_SCALES)), CHANNEL_SCALES.sizeAggr, (0, _defineProperty2["default"])({}, AGGREGATION_TYPES.count, [SCALE_TYPES.linear, SCALE_TYPES.sqrt, SCALE_TYPES.log]));
639
+
640
+ /**
641
+ * Define what type of scale operation is allowed on each type of fields
642
+ */
643
+ var FIELD_OPTS = exports.FIELD_OPTS = (_FIELD_OPTS = {}, (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"])((0, _defineProperty2["default"])(_FIELD_OPTS, ALL_FIELD_TYPES.string, {
644
+ type: 'categorical',
645
+ scale: _objectSpread(_objectSpread({}, ordinalFieldScaleFunctions), ordinalFieldAggrScaleFunctions),
646
+ format: {
647
+ legend: function legend(d) {
648
+ return d;
649
+ },
650
+ tooltip: []
651
+ }
652
+ }), ALL_FIELD_TYPES.real, {
653
+ type: 'numerical',
654
+ scale: _objectSpread(_objectSpread({}, linearFieldScaleFunctions), linearFieldAggrScaleFunctions),
655
+ format: {
656
+ legend: function legend(d) {
657
+ return d;
658
+ },
659
+ tooltip: [_tooltip.TOOLTIP_FORMAT_TYPES.NONE, _tooltip.TOOLTIP_FORMAT_TYPES.DECIMAL, _tooltip.TOOLTIP_FORMAT_TYPES.PERCENTAGE]
660
+ }
661
+ }), ALL_FIELD_TYPES.timestamp, {
662
+ type: 'time',
663
+ scale: _objectSpread(_objectSpread({}, linearFieldScaleFunctions), notSupportAggrOpts),
664
+ format: {
665
+ legend: function legend(d) {
666
+ return d;
667
+ },
668
+ tooltip: [_tooltip.TOOLTIP_FORMAT_TYPES.NONE, _tooltip.TOOLTIP_FORMAT_TYPES.DATE, _tooltip.TOOLTIP_FORMAT_TYPES.DATE_TIME]
669
+ }
670
+ }), ALL_FIELD_TYPES.integer, {
671
+ type: 'numerical',
672
+ scale: _objectSpread(_objectSpread({}, _objectSpread(_objectSpread({}, linearFieldScaleFunctions), {}, (0, _defineProperty2["default"])({}, CHANNEL_SCALES.color, [].concat((0, _toConsumableArray2["default"])(linearFieldScaleFunctions[CHANNEL_SCALES.color]), [SCALE_TYPES.customOrdinal])))), linearFieldAggrScaleFunctions),
673
+ format: {
674
+ legend: function legend(d) {
675
+ return d;
676
+ },
677
+ tooltip: [_tooltip.TOOLTIP_FORMAT_TYPES.NONE, _tooltip.TOOLTIP_FORMAT_TYPES.DECIMAL, _tooltip.TOOLTIP_FORMAT_TYPES.PERCENTAGE]
678
+ }
679
+ }), ALL_FIELD_TYPES["boolean"], {
680
+ type: 'boolean',
681
+ scale: _objectSpread(_objectSpread({}, ordinalFieldScaleFunctions), ordinalFieldAggrScaleFunctions),
682
+ format: {
683
+ legend: function legend(d) {
684
+ return d;
685
+ },
686
+ tooltip: [_tooltip.TOOLTIP_FORMAT_TYPES.NONE, _tooltip.TOOLTIP_FORMAT_TYPES.BOOLEAN]
687
+ }
688
+ }), ALL_FIELD_TYPES.date, {
689
+ type: 'time',
690
+ scale: _objectSpread(_objectSpread({}, ordinalFieldScaleFunctions), ordinalFieldAggrScaleFunctions),
691
+ format: {
692
+ legend: function legend(d) {
693
+ return d;
694
+ },
695
+ tooltip: [_tooltip.TOOLTIP_FORMAT_TYPES.NONE, _tooltip.TOOLTIP_FORMAT_TYPES.DATE]
696
+ }
697
+ }), ALL_FIELD_TYPES.geojson, {
698
+ type: 'geometry',
699
+ scale: _objectSpread(_objectSpread({}, notSupportedScaleOpts), notSupportAggrOpts),
700
+ format: {
701
+ legend: function legend() {
702
+ return '...';
703
+ },
704
+ tooltip: []
705
+ }
706
+ }), ALL_FIELD_TYPES.geoarrow, {
707
+ type: 'geometry',
708
+ scale: _objectSpread(_objectSpread({}, notSupportedScaleOpts), notSupportAggrOpts),
709
+ format: {
710
+ legend: function legend() {
711
+ return '...';
712
+ },
713
+ tooltip: []
714
+ }
715
+ }), ALL_FIELD_TYPES.object, {
716
+ type: 'numerical',
717
+ scale: {},
718
+ format: {
719
+ legend: function legend() {
720
+ return '...';
721
+ },
722
+ tooltip: []
723
+ }
724
+ }), ALL_FIELD_TYPES.array, {
725
+ type: 'numerical',
726
+ scale: {},
727
+ format: {
728
+ legend: function legend() {
729
+ return '...';
730
+ },
731
+ tooltip: []
732
+ }
733
+ }), (0, _defineProperty2["default"])(_FIELD_OPTS, ALL_FIELD_TYPES.h3, {
734
+ type: 'h3',
735
+ scale: _objectSpread(_objectSpread({}, notSupportedScaleOpts), notSupportAggrOpts),
736
+ format: {
737
+ legend: function legend() {
738
+ return '...';
739
+ },
740
+ tooltip: []
741
+ }
742
+ }));
743
+ var CHANNEL_SCALE_SUPPORTED_FIELDS = exports.CHANNEL_SCALE_SUPPORTED_FIELDS = Object.keys(CHANNEL_SCALES).reduce(function (accu, key) {
744
+ return _objectSpread(_objectSpread({}, accu), {}, (0, _defineProperty2["default"])({}, key, Object.keys(FIELD_OPTS).filter(function (ft) {
745
+ return FIELD_OPTS[ft].scale[key] && Object.keys(FIELD_OPTS[ft].scale[key]).length;
746
+ })));
747
+ }, {});
748
+ var DEFAULT_LAYER_COLOR = exports.DEFAULT_LAYER_COLOR = {
749
+ tripArc: '#9226C6',
750
+ begintrip_lat: '#1E96BE',
751
+ dropoff_lat: '#FF991F',
752
+ request_lat: '#52A353'
753
+ };
754
+ var DEFAULT_LAYER_COLOR_PALETTE = exports.DEFAULT_LAYER_COLOR_PALETTE = 'Global Warming';
755
+ var DEFAULT_LAYER_COLOR_PALETTE_STEPS = exports.DEFAULT_LAYER_COLOR_PALETTE_STEPS = 6;
756
+
757
+ // let user pass in default tooltip fields
758
+ var DEFAULT_TOOLTIP_FIELDS = exports.DEFAULT_TOOLTIP_FIELDS = [];
759
+ var NO_VALUE_COLOR = exports.NO_VALUE_COLOR = [0, 0, 0, 0];
760
+ /** Visible gray used when a color field has no value and missing features should stay on the map. */
761
+ var MISSING_VALUE_COLOR = exports.MISSING_VALUE_COLOR = [128, 128, 128, 255];
762
+ var DEFAULT_PICKING_RADIUS = exports.DEFAULT_PICKING_RADIUS = 3;
763
+ var OVERLAY_BLENDINGS = exports.OVERLAY_BLENDINGS = {
764
+ normal: {
765
+ label: 'overlayBlending.normal',
766
+ value: 'normal'
767
+ },
768
+ screen: {
769
+ label: 'overlayBlending.screen',
770
+ value: 'screen'
771
+ },
772
+ darken: {
773
+ label: 'overlayBlending.darken',
774
+ value: 'darken'
775
+ }
776
+ };
777
+ var LAYER_BLENDINGS = exports.LAYER_BLENDINGS = {
778
+ additive: {
779
+ label: 'layerBlending.additive',
780
+ blendFunc: ['SRC_ALPHA', 'DST_ALPHA'],
781
+ blendEquation: 'FUNC_ADD'
782
+ },
783
+ normal: {
784
+ // reference to
785
+ // https://limnu.com/webgl-blending-youre-probably-wrong/
786
+ label: 'layerBlending.normal',
787
+ blendFunc: ['SRC_ALPHA', 'ONE_MINUS_SRC_ALPHA', 'ONE', 'ONE_MINUS_SRC_ALPHA'],
788
+ blendEquation: ['FUNC_ADD', 'FUNC_ADD']
789
+ },
790
+ subtractive: {
791
+ label: 'layerBlending.subtractive',
792
+ blendFunc: ['ONE', 'ONE_MINUS_DST_COLOR', 'SRC_ALPHA', 'DST_ALPHA'],
793
+ blendEquation: ['FUNC_SUBTRACT', 'FUNC_ADD']
794
+ }
795
+ };
796
+ var MAX_DEFAULT_TOOLTIPS = exports.MAX_DEFAULT_TOOLTIPS = 5;
797
+ var RESOLUTIONS = exports.RESOLUTIONS = (0, _keymirror["default"])({
798
+ ONE_X: null,
799
+ TWO_X: null
800
+ });
801
+ var EXPORT_IMG_RATIOS = exports.EXPORT_IMG_RATIOS = (0, _keymirror["default"])({
802
+ SCREEN: null,
803
+ FOUR_BY_THREE: null,
804
+ SIXTEEN_BY_NINE: null,
805
+ CUSTOM: null
806
+ });
807
+ var ScreenRatioOption = exports.ScreenRatioOption = {
808
+ id: EXPORT_IMG_RATIOS.SCREEN,
809
+ label: 'modal.exportImage.ratioOriginalScreen',
810
+ getSize: function getSize(screenW, screenH) {
811
+ return {
812
+ width: screenW,
813
+ height: screenH
814
+ };
815
+ }
816
+ };
817
+ var CustomRatioOption = exports.CustomRatioOption = {
818
+ id: EXPORT_IMG_RATIOS.CUSTOM,
819
+ hidden: true,
820
+ label: 'modal.exportImage.ratioCustom',
821
+ getSize: function getSize(mapW, mapH) {
822
+ return {
823
+ width: mapW,
824
+ height: mapH
825
+ };
826
+ }
827
+ };
828
+ var FourByThreeRatioOption = exports.FourByThreeRatioOption = {
829
+ id: EXPORT_IMG_RATIOS.FOUR_BY_THREE,
830
+ label: 'modal.exportImage.ratio4_3',
831
+ getSize: function getSize(screenW) {
832
+ return {
833
+ width: screenW,
834
+ height: Math.round(screenW * 0.75)
835
+ };
836
+ }
837
+ };
838
+ var SixteenByNineRatioOption = exports.SixteenByNineRatioOption = {
839
+ id: EXPORT_IMG_RATIOS.SIXTEEN_BY_NINE,
840
+ label: 'modal.exportImage.ratio16_9',
841
+ getSize: function getSize(screenW) {
842
+ return {
843
+ width: screenW,
844
+ height: Math.round(screenW * 0.5625)
845
+ };
846
+ }
847
+ };
848
+ var EXPORT_IMG_RATIO_OPTIONS = exports.EXPORT_IMG_RATIO_OPTIONS = [ScreenRatioOption, FourByThreeRatioOption, SixteenByNineRatioOption, CustomRatioOption];
849
+ var OneXResolutionOption = exports.OneXResolutionOption = {
850
+ id: RESOLUTIONS.ONE_X,
851
+ label: '1x',
852
+ available: true,
853
+ scale: 1,
854
+ getSize: function getSize(screenW, screenH) {
855
+ return {
856
+ width: screenW,
857
+ height: screenH
858
+ };
859
+ }
860
+ };
861
+ var TwoXResolutionOption = exports.TwoXResolutionOption = {
862
+ id: RESOLUTIONS.TWO_X,
863
+ label: '2x',
864
+ available: true,
865
+ scale: 2,
866
+ getSize: function getSize(screenW, screenH) {
867
+ return {
868
+ width: screenW * 2,
869
+ height: screenH * 2
870
+ };
871
+ }
872
+ };
873
+
874
+ // Fixed dimension options
875
+ var Resolution1920x1080Option = exports.Resolution1920x1080Option = {
876
+ id: '1920x1080',
877
+ label: '1920 × 1080 (16:9)',
878
+ available: true,
879
+ getSize: function getSize() {
880
+ return {
881
+ width: 1920,
882
+ height: 1080
883
+ };
884
+ }
885
+ };
886
+ var Resolution1280x720Option = exports.Resolution1280x720Option = {
887
+ id: '1280x720',
888
+ label: '1280 × 720 (16:9)',
889
+ available: true,
890
+ getSize: function getSize() {
891
+ return {
892
+ width: 1280,
893
+ height: 720
894
+ };
895
+ }
896
+ };
897
+ var Resolution2560x1440Option = exports.Resolution2560x1440Option = {
898
+ id: '2560x1440',
899
+ label: '2560 × 1440 (16:9)',
900
+ available: true,
901
+ getSize: function getSize() {
902
+ return {
903
+ width: 2560,
904
+ height: 1440
905
+ };
906
+ }
907
+ };
908
+ var Resolution1600x900Option = exports.Resolution1600x900Option = {
909
+ id: '1600x900',
910
+ label: '1600 × 900 (16:9)',
911
+ available: true,
912
+ getSize: function getSize() {
913
+ return {
914
+ width: 1600,
915
+ height: 900
916
+ };
917
+ }
918
+ };
919
+ var Resolution1024x768Option = exports.Resolution1024x768Option = {
920
+ id: '1024x768',
921
+ label: '1024 × 768 (4:3)',
922
+ available: true,
923
+ getSize: function getSize() {
924
+ return {
925
+ width: 1024,
926
+ height: 768
927
+ };
928
+ }
929
+ };
930
+ var Resolution1280x960Option = exports.Resolution1280x960Option = {
931
+ id: '1280x960',
932
+ label: '1280 × 960 (4:3)',
933
+ available: true,
934
+ getSize: function getSize() {
935
+ return {
936
+ width: 1280,
937
+ height: 960
938
+ };
939
+ }
940
+ };
941
+ var Resolution1600x1200Option = exports.Resolution1600x1200Option = {
942
+ id: '1600x1200',
943
+ label: '1600 × 1200 (4:3)',
944
+ available: true,
945
+ getSize: function getSize() {
946
+ return {
947
+ width: 1600,
948
+ height: 1200
949
+ };
950
+ }
951
+ };
952
+ var Resolution1920x1440Option = exports.Resolution1920x1440Option = {
953
+ id: '1920x1440',
954
+ label: '1920 × 1440 (4:3)',
955
+ available: true,
956
+ getSize: function getSize() {
957
+ return {
958
+ width: 1920,
959
+ height: 1440
960
+ };
961
+ }
962
+ };
963
+ var EXPORT_IMG_RESOLUTION_OPTIONS = exports.EXPORT_IMG_RESOLUTION_OPTIONS = [OneXResolutionOption, TwoXResolutionOption, Resolution1280x720Option, Resolution1920x1080Option, Resolution2560x1440Option, Resolution1600x900Option, Resolution1024x768Option, Resolution1280x960Option, Resolution1600x1200Option, Resolution1920x1440Option];
964
+ var EXPORT_DATA_TYPE = exports.EXPORT_DATA_TYPE = (0, _keymirror["default"])({
965
+ CSV: null,
966
+ GEOJSON: null,
967
+ GEOPARQUET: null,
968
+ SHAPEFILE: null,
969
+ GEOPACKAGE: null,
970
+ KML: null,
971
+ KMZ: null
972
+ });
973
+ var EXPORT_DATA_TYPE_OPTIONS = exports.EXPORT_DATA_TYPE_OPTIONS = [{
974
+ id: EXPORT_DATA_TYPE.CSV,
975
+ label: 'csv',
976
+ available: true
977
+ }, {
978
+ id: EXPORT_DATA_TYPE.GEOJSON,
979
+ label: 'geojson',
980
+ available: true
981
+ }, {
982
+ id: EXPORT_DATA_TYPE.GEOPARQUET,
983
+ label: 'parquet',
984
+ available: true
985
+ }, {
986
+ id: EXPORT_DATA_TYPE.SHAPEFILE,
987
+ label: 'shp',
988
+ available: true
989
+ }, {
990
+ id: EXPORT_DATA_TYPE.GEOPACKAGE,
991
+ label: 'gpkg',
992
+ available: true
993
+ }, {
994
+ id: EXPORT_DATA_TYPE.KML,
995
+ label: 'kml',
996
+ available: true
997
+ }, {
998
+ id: EXPORT_DATA_TYPE.KMZ,
999
+ label: 'kmz',
1000
+ available: true
1001
+ }];
1002
+
1003
+ // Export map types
1004
+ var EXPORT_MAP_FORMATS = exports.EXPORT_MAP_FORMATS = (0, _keymirror["default"])({
1005
+ HTML: null,
1006
+ JSON: null
1007
+ });
1008
+ var EXPORT_HTML_MAP_MODES = exports.EXPORT_HTML_MAP_MODES = (0, _keymirror["default"])({
1009
+ READ: null,
1010
+ EDIT: null
1011
+ });
1012
+
1013
+ // Export map options
1014
+ var EXPORT_MAP_FORMAT_OPTIONS = exports.EXPORT_MAP_FORMAT_OPTIONS = Object.entries(EXPORT_MAP_FORMATS).map(function (entry) {
1015
+ return {
1016
+ id: entry[0],
1017
+ label: entry[1].toLowerCase(),
1018
+ available: true
1019
+ };
1020
+ });
1021
+ function getHTMLMapModeTileUrl(mode) {
1022
+ return "https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/map-".concat(mode.toLowerCase(), "-mode.png");
1023
+ }
1024
+ var EXPORT_HTML_MAP_MODE_OPTIONS = exports.EXPORT_HTML_MAP_MODE_OPTIONS = Object.entries(EXPORT_HTML_MAP_MODES).map(function (entry) {
1025
+ return {
1026
+ id: entry[0],
1027
+ label: "modal.exportMap.html.".concat(entry[1].toLowerCase()),
1028
+ available: true,
1029
+ url: getHTMLMapModeTileUrl(entry[1])
1030
+ };
1031
+ });
1032
+ var DEFAULT_UUID_COUNT = exports.DEFAULT_UUID_COUNT = 6;
1033
+ var DEFAULT_NOTIFICATION_MESSAGE = exports.DEFAULT_NOTIFICATION_MESSAGE = 'MESSAGE_NOT_PROVIDED';
1034
+ var DEFAULT_NOTIFICATION_TYPES = exports.DEFAULT_NOTIFICATION_TYPES = (0, _keymirror["default"])({
1035
+ info: null,
1036
+ error: null,
1037
+ warning: null,
1038
+ success: null
1039
+ });
1040
+ var DEFAULT_NOTIFICATION_TOPICS = exports.DEFAULT_NOTIFICATION_TOPICS = (0, _keymirror["default"])({
1041
+ global: null,
1042
+ file: null
1043
+ });
1044
+
1045
+ // Minimum time between identical notifications about deck.gl errors
1046
+ var THROTTLE_NOTIFICATION_TIME = exports.THROTTLE_NOTIFICATION_TIME = 330;
1047
+
1048
+ // Animation
1049
+ var BASE_SPEED = exports.BASE_SPEED = 600;
1050
+ var FPS = exports.FPS = 60;
1051
+
1052
+ /**
1053
+ * 4 Animation Window Types
1054
+ * 1. free
1055
+ * |-> |->
1056
+ * Current time is a fixed range, animation controller calls next animation frames continuously to animation a moving window
1057
+ * The increment id based on domain / BASE_SPEED * SPEED
1058
+ *
1059
+ * 2. incremental
1060
+ * | |->
1061
+ * Same as free, current time is a growing range, only the max value of range increment during animation.
1062
+ * The increment is also based on domain / BASE_SPEED * SPEED
1063
+ *
1064
+ * 3. point
1065
+ * o -> o
1066
+ * Current time is a point, animation controller calls next animation frame continuously to animation a moving point
1067
+ * The increment is based on domain / BASE_SPEED * SPEED
1068
+ *
1069
+ * 4. interval
1070
+ * o ~> o
1071
+ * Current time is a point. An array of sorted time steps need to be provided.
1072
+ * animation controller calls next animation at a interval when the point jumps to the next step
1073
+ */
1074
+ var ANIMATION_WINDOW = exports.ANIMATION_WINDOW = (0, _keymirror["default"])({
1075
+ free: null,
1076
+ incremental: null,
1077
+ point: null,
1078
+ interval: null
1079
+ });
1080
+ var DEFAULT_TIME_FORMAT = exports.DEFAULT_TIME_FORMAT = 'MM/DD/YY HH:mm:ssa';
1081
+ var SPEED_CONTROL_RANGE = exports.SPEED_CONTROL_RANGE = [0, 10];
1082
+ var SPEED_CONTROL_STEP = exports.SPEED_CONTROL_STEP = 0.001;
1083
+
1084
+ // Geocoder
1085
+ var GEOCODER_DATASET_NAME = exports.GEOCODER_DATASET_NAME = 'geocoder_dataset';
1086
+ var GEOCODER_LAYER_ID = exports.GEOCODER_LAYER_ID = 'geocoder_layer';
1087
+ var GEOCODER_GEO_OFFSET = exports.GEOCODER_GEO_OFFSET = 0.05;
1088
+ var GEOCODER_ICON_COLOR = exports.GEOCODER_ICON_COLOR = [255, 0, 0];
1089
+ // Base icon size before anchor normalization. The geocoder pin icon is bottom-anchored
1090
+ // and scaled to fit the ScatterplotLayer unit circle (~0.5x), so the rendered size is
1091
+ // compensated here (80 * 2 = 160).
1092
+ var GEOCODER_ICON_SIZE = exports.GEOCODER_ICON_SIZE = 160;
1093
+
1094
+ // Editor
1095
+ var EDITOR_LAYER_ID = exports.EDITOR_LAYER_ID = 'kepler_editor_layer';
1096
+ var EDITOR_LAYER_PICKING_RADIUS = exports.EDITOR_LAYER_PICKING_RADIUS = 6;
1097
+ var EDITOR_MODES = exports.EDITOR_MODES = {
1098
+ DRAW_POLYGON: 'DRAW_POLYGON',
1099
+ DRAW_RECTANGLE: 'DRAW_RECTANGLE',
1100
+ DRAW_CIRCLE: 'DRAW_CIRCLE',
1101
+ DRAW_LINESTRING: 'DRAW_LINESTRING',
1102
+ DRAW_POINT: 'DRAW_POINT',
1103
+ EDIT: 'EDIT_VERTEX'
1104
+ };
1105
+ var EDITOR_DRAW_MODES = exports.EDITOR_DRAW_MODES = [EDITOR_MODES.DRAW_POLYGON, EDITOR_MODES.DRAW_RECTANGLE, EDITOR_MODES.DRAW_CIRCLE, EDITOR_MODES.DRAW_LINESTRING, EDITOR_MODES.DRAW_POINT];
1106
+ var PLOT_TYPES = exports.PLOT_TYPES = (0, _keymirror["default"])({
1107
+ histogram: null,
1108
+ lineChart: null
1109
+ });
1110
+
1111
+ // Filter
1112
+ var INIT_FILTER_ITEMS_IN_DROPDOWN = exports.INIT_FILTER_ITEMS_IN_DROPDOWN = 100;
1113
+
1114
+ // GPU Filtering
1115
+ /**
1116
+ * Max number of filter value buffers that deck.gl provides
1117
+ */
1118
+ var MAX_GPU_FILTERS = exports.MAX_GPU_FILTERS = 4;
1119
+ var MAP_THUMBNAIL_DIMENSION = exports.MAP_THUMBNAIL_DIMENSION = {
1120
+ width: 300,
1121
+ height: 200
1122
+ };
1123
+ var MAP_INFO_CHARACTER = exports.MAP_INFO_CHARACTER = {
1124
+ title: 100,
1125
+ description: 1024
1126
+ };
1127
+
1128
+ // Load data
1129
+ var LOADING_METHODS = exports.LOADING_METHODS = (0, _keymirror["default"])({
1130
+ upload: null,
1131
+ storage: null,
1132
+ tileset: null
1133
+ });
1134
+ var DEFAULT_FEATURE_FLAGS = exports.DEFAULT_FEATURE_FLAGS = {};
1135
+ var DATASET_FORMATS = exports.DATASET_FORMATS = (0, _keymirror["default"])({
1136
+ row: null,
1137
+ geojson: null,
1138
+ csv: null,
1139
+ keplergl: null,
1140
+ arrow: null,
1141
+ duckdb: null
1142
+ });
1143
+ var MAP_CONTROLS = exports.MAP_CONTROLS = (0, _keymirror["default"])({
1144
+ visibleLayers: null,
1145
+ mapLegend: null,
1146
+ toggle3d: null,
1147
+ splitMap: null,
1148
+ mapDraw: null,
1149
+ mapLocale: null,
1150
+ mapTheme: null,
1151
+ effect: null,
1152
+ annotation: null,
1153
+ chart: null,
1154
+ viewportJson: null,
1155
+ mapInfo: null
1156
+ });
1157
+ var MapViewMode = exports.MapViewMode = /*#__PURE__*/function (MapViewMode) {
1158
+ MapViewMode["MODE_2D"] = "MODE_2D";
1159
+ MapViewMode["MODE_3D"] = "MODE_3D";
1160
+ MapViewMode["MODE_GLOBE"] = "MODE_GLOBE";
1161
+ return MapViewMode;
1162
+ }({});
1163
+ /**
1164
+ * Minimum zoom level allowed in globe mode. Negative values let the user zoom
1165
+ * out further than the web-mercator default of 0, so the whole globe can be
1166
+ * pulled back to appear smaller on screen.
1167
+ */
1168
+ var GLOBE_MIN_ZOOM = exports.GLOBE_MIN_ZOOM = 2;
1169
+
1170
+ /**
1171
+ * Maximum zoom in globe mode.
1172
+ *
1173
+ * The previous "empty rectangles" at high zoom were caused by the vector basemap
1174
+ * layer declaring `maxZoom: 23` while the raw tile endpoints only have data to
1175
+ * z16 (mapbox-streets-v8) / z14 (CARTO) — deck then requested non-existent tiles
1176
+ * that 404. That is fixed in `getGlobeBaseLayers` by setting `maxZoom` to each
1177
+ * source's true data max so deck overzooms instead.
1178
+ *
1179
+ * The remaining practical ceiling is float32 precision: deck's globe places
1180
+ * geometry in common space on a sphere of radius 256 with no fp64/relative-to-
1181
+ * center trick, so beyond ~visual-zoom 16 (roughly this mapState zoom minus
1182
+ * `zoomAdjust(lat)` ≈ 1.65 at the equator) geometry starts to jitter/drift.
1183
+ */
1184
+ var GLOBE_MAX_ZOOM = exports.GLOBE_MAX_ZOOM = 16;
1185
+
1186
+ /**
1187
+ * Maximum absolute center latitude allowed in globe mode. Constrains the camera
1188
+ * target to a band around the equator so the view can't be centered on the
1189
+ * poles (deck.gl's default clamps to ~85°, which lets the camera stare straight
1190
+ * down at a pole). Applies symmetrically to the northern and southern hemisphere.
1191
+ */
1192
+ var GLOBE_MAX_LATITUDE = exports.GLOBE_MAX_LATITUDE = 75;
1193
+ var DEFAULT_GLOBE_CONFIG = exports.DEFAULT_GLOBE_CONFIG = {
1194
+ atmosphere: true,
1195
+ hugeHalo: true,
1196
+ hugeHaloRadius: 3.5,
1197
+ hugeHaloOpacity: 0.2,
1198
+ azimuth: false,
1199
+ azimuthAngle: 45,
1200
+ terminator: true,
1201
+ terminatorOpacity: 0.35,
1202
+ basemap: true,
1203
+ labels: false,
1204
+ labelsColor: [114.75, 114.75, 114.75],
1205
+ adminLines: true,
1206
+ adminLinesColor: [40, 63, 93],
1207
+ water: true,
1208
+ waterColor: [17, 35, 48],
1209
+ surface: true,
1210
+ surfaceColor: [9, 16, 29],
1211
+ // Color of the empty space rendered around the globe (deck.gl clear color).
1212
+ // Matches the previous hardcoded clear color [0.015, 0.035, 0.065] in 0-1 space.
1213
+ backgroundColor: [4, 9, 17],
1214
+ // Starfield behind the globe is on by default in globe view.
1215
+ stars: true
1216
+ };
1217
+ var GLOBE_SUPPORTED_LAYERS = exports.GLOBE_SUPPORTED_LAYERS = {
1218
+ point: true,
1219
+ arc: true,
1220
+ grid: true,
1221
+ hexagon: true,
1222
+ geojson: true,
1223
+ cluster: true,
1224
+ donut: false,
1225
+ icon: true,
1226
+ hexagonId: true,
1227
+ '3D': true,
1228
+ vectorTile: true,
1229
+ line: true,
1230
+ trip: true,
1231
+ rasterTile: true,
1232
+ heatmap: true,
1233
+ contour: false,
1234
+ voronoi: false,
1235
+ s2: false,
1236
+ tile3d: false,
1237
+ // Flow arrows are flat quads in common space (equatorial plane) and collapse when
1238
+ // viewed edge-on on the globe, so the flow layer is not supported in Globe mode.
1239
+ flow: false,
1240
+ // Flow Field uses mercator ClipExtension bounds; stock clipping is wrong on globe.
1241
+ flowField: false
1242
+ };
1243
+ var MapSplitMode = exports.MapSplitMode = /*#__PURE__*/function (MapSplitMode) {
1244
+ MapSplitMode["SINGLE_MAP"] = "SINGLE_MAP";
1245
+ MapSplitMode["DUAL_MAP"] = "DUAL_MAP";
1246
+ MapSplitMode["SWIPE_COMPARE"] = "SWIPE_COMPARE";
1247
+ return MapSplitMode;
1248
+ }({});
1249
+ /**
1250
+ * A multiplier for screen-space width/scale for Arc, Line, Icon and Text layers.
1251
+ * Required in order to maintain the same appearance after upgrading to deck.gl v8.5.
1252
+ * https://github.com/visgl/deck.gl/blob/master/docs/upgrade-guide.md
1253
+ */
1254
+ var PROJECTED_PIXEL_SIZE_MULTIPLIER = exports.PROJECTED_PIXEL_SIZE_MULTIPLIER = 2 / 3;
1255
+
1256
+ /**
1257
+ * Maximum value for text outline width
1258
+ */
1259
+ var TEXT_OUTLINE_MULTIPLIER = exports.TEXT_OUTLINE_MULTIPLIER = 5;
1260
+ var dataTestIds = exports.dataTestIds = {
1261
+ infoIcon: 'info-icon',
1262
+ warningIcon: 'warning-icon',
1263
+ errorIcon: 'error-icon',
1264
+ successIcon: 'success-icon',
1265
+ checkmarkIcon: 'checkmark-icon',
1266
+ copyNotificationIcon: 'copy-notification-icon',
1267
+ sortableLayerItem: 'sortable-layer-item',
1268
+ staticLayerItem: 'static-layer-item',
1269
+ layerTitleEditor: 'layer__title__editor',
1270
+ layerPanel: 'layer-panel',
1271
+ sortableEffectItem: 'sortable-effect-item',
1272
+ staticEffectItem: 'static-effect-item',
1273
+ providerLoading: 'provider-loading',
1274
+ providerMapInfoPanel: 'provider-map-info-panel',
1275
+ providerSelect: 'provider-select',
1276
+ cloudHeader: 'cloud-header',
1277
+ providerShareMap: 'provider-share-map'
1278
+ };
1279
+
1280
+ // Effects
1281
+ var DEFAULT_TIMEZONE = exports.DEFAULT_TIMEZONE = 'UTC';
1282
+ var DEFAULT_POST_PROCESSING_EFFECT_TYPE = exports.DEFAULT_POST_PROCESSING_EFFECT_TYPE = 'ink';
1283
+ var DEFAULT_LIGHT_COLOR = exports.DEFAULT_LIGHT_COLOR = [255, 255, 255];
1284
+ var DEFAULT_LIGHT_INTENSITY = exports.DEFAULT_LIGHT_INTENSITY = 1;
1285
+ var DEFAULT_SHADOW_INTENSITY = exports.DEFAULT_SHADOW_INTENSITY = 0.5;
1286
+ var DEFAULT_SHADOW_COLOR = exports.DEFAULT_SHADOW_COLOR = [0, 0, 0];
1287
+ var LIGHT_AND_SHADOW_EFFECT_TIME_MODES = exports.LIGHT_AND_SHADOW_EFFECT_TIME_MODES = {
1288
+ pick: 'pick',
1289
+ current: 'current',
1290
+ animation: 'animation'
1291
+ };
1292
+ var DEFAULT_LIGHT_AND_SHADOW_PROPS = exports.DEFAULT_LIGHT_AND_SHADOW_PROPS = {
1293
+ timestamp: Date.now(),
1294
+ timeMode: LIGHT_AND_SHADOW_EFFECT_TIME_MODES.pick,
1295
+ shadowIntensity: DEFAULT_SHADOW_INTENSITY,
1296
+ shadowColor: [].concat(DEFAULT_SHADOW_COLOR),
1297
+ sunLightColor: [].concat(DEFAULT_LIGHT_COLOR),
1298
+ sunLightIntensity: DEFAULT_LIGHT_INTENSITY,
1299
+ ambientLightColor: [].concat(DEFAULT_LIGHT_COLOR),
1300
+ ambientLightIntensity: DEFAULT_LIGHT_INTENSITY
1301
+ };
1302
+ var LIGHT_AND_SHADOW_EFFECT = exports.LIGHT_AND_SHADOW_EFFECT = {
1303
+ type: 'lightAndShadow',
1304
+ name: 'Light & Shadow',
1305
+ description: 'effectDescription.lightAndShadow',
1306
+ parameters: [{
1307
+ name: 'timestamp',
1308
+ min: 0,
1309
+ max: Number.MAX_SAFE_INTEGER
1310
+ }, {
1311
+ name: 'shadowIntensity',
1312
+ min: 0,
1313
+ max: 1,
1314
+ defaultValue: DEFAULT_SHADOW_INTENSITY
1315
+ }, {
1316
+ name: 'sunLightIntensity',
1317
+ min: 0,
1318
+ max: 5,
1319
+ defaultValue: DEFAULT_LIGHT_INTENSITY
1320
+ }, {
1321
+ name: 'ambientLightIntensity',
1322
+ min: 0,
1323
+ max: 5,
1324
+ defaultValue: DEFAULT_LIGHT_INTENSITY
1325
+ }, {
1326
+ name: 'shadowColor',
1327
+ type: 'color',
1328
+ min: 0,
1329
+ max: 255,
1330
+ defaultValue: DEFAULT_SHADOW_COLOR
1331
+ }, {
1332
+ name: 'sunLightColor',
1333
+ type: 'color',
1334
+ min: 0,
1335
+ max: 255,
1336
+ defaultValue: DEFAULT_LIGHT_COLOR
1337
+ }, {
1338
+ name: 'ambientLightColor',
1339
+ type: 'color',
1340
+ min: 0,
1341
+ max: 255,
1342
+ defaultValue: DEFAULT_LIGHT_COLOR
1343
+ }]
1344
+ };
1345
+ var DISTANCE_FOG_TYPE = exports.DISTANCE_FOG_TYPE = 'distanceFog';
1346
+ var SURFACE_FOG_TYPE = exports.SURFACE_FOG_TYPE = 'surfaceFog';
1347
+ var POSTPROCESSING_EFFECTS = exports.POSTPROCESSING_EFFECTS = {
1348
+ ink: {
1349
+ type: 'ink',
1350
+ name: 'Ink',
1351
+ description: 'effectDescription.ink',
1352
+ parameters: [{
1353
+ name: 'strength',
1354
+ min: 0,
1355
+ max: 1
1356
+ }]
1357
+ },
1358
+ brightnessContrast: {
1359
+ type: 'brightnessContrast',
1360
+ name: 'Brightness & Contrast',
1361
+ description: 'effectDescription.brightnessContrast',
1362
+ parameters: [{
1363
+ name: 'brightness',
1364
+ min: -1,
1365
+ max: 1
1366
+ }, {
1367
+ name: 'contrast',
1368
+ min: -1,
1369
+ max: 1
1370
+ }]
1371
+ },
1372
+ hueSaturation: {
1373
+ type: 'hueSaturation',
1374
+ name: 'Hue & Saturation',
1375
+ description: 'effectDescription.hueSaturation',
1376
+ parameters: [{
1377
+ name: 'hue',
1378
+ min: -1,
1379
+ max: 1
1380
+ }, {
1381
+ name: 'saturation',
1382
+ defaultValue: 0.25,
1383
+ min: -1,
1384
+ max: 1
1385
+ }]
1386
+ },
1387
+ vibrance: {
1388
+ type: 'vibrance',
1389
+ name: 'Vibrance',
1390
+ description: 'effectDescription.vibrance',
1391
+ parameters: [{
1392
+ name: 'amount',
1393
+ defaultValue: 0.5,
1394
+ min: -1,
1395
+ max: 1
1396
+ }]
1397
+ },
1398
+ sepia: {
1399
+ type: 'sepia',
1400
+ name: 'Sepia',
1401
+ description: 'effectDescription.sepia',
1402
+ parameters: [{
1403
+ name: 'amount',
1404
+ min: 0,
1405
+ max: 1
1406
+ }]
1407
+ },
1408
+ dotScreen: {
1409
+ type: 'dotScreen',
1410
+ name: 'Dot Screen',
1411
+ description: 'effectDescription.dotScreen',
1412
+ parameters: [{
1413
+ name: 'angle',
1414
+ min: 0,
1415
+ max: Math.PI / 2
1416
+ }, {
1417
+ name: 'size',
1418
+ min: 1,
1419
+ max: 20
1420
+ }, {
1421
+ name: 'center',
1422
+ type: 'array',
1423
+ label: ['Center X', 'Center Y'],
1424
+ defaultValue: [0.5, 0.5],
1425
+ min: 0,
1426
+ max: 1
1427
+ }]
1428
+ },
1429
+ colorHalftone: {
1430
+ type: 'colorHalftone',
1431
+ name: 'Color Halftone',
1432
+ description: 'effectDescription.colorHalftone',
1433
+ parameters: [{
1434
+ name: 'angle',
1435
+ min: 0,
1436
+ max: Math.PI / 2
1437
+ }, {
1438
+ name: 'size',
1439
+ min: 1,
1440
+ max: 20
1441
+ }, {
1442
+ name: 'center',
1443
+ type: 'array',
1444
+ label: ['Center X', 'Center Y'],
1445
+ defaultValue: [0.5, 0.5],
1446
+ min: 0,
1447
+ max: 1
1448
+ }]
1449
+ },
1450
+ noise: {
1451
+ type: 'noise',
1452
+ name: 'Noise',
1453
+ description: 'effectDescription.noise',
1454
+ parameters: [{
1455
+ name: 'amount',
1456
+ min: 0,
1457
+ max: 1
1458
+ }]
1459
+ },
1460
+ triangleBlur: {
1461
+ type: 'triangleBlur',
1462
+ name: 'Blur (Triangle)',
1463
+ description: 'effectDescription.triangleBlur',
1464
+ parameters: [{
1465
+ name: 'radius',
1466
+ min: 0,
1467
+ max: 100
1468
+ }]
1469
+ },
1470
+ zoomBlur: {
1471
+ type: 'zoomBlur',
1472
+ name: 'Blur (Zoom)',
1473
+ description: 'effectDescription.zoomBlur',
1474
+ parameters: [{
1475
+ name: 'strength',
1476
+ defaultValue: 0.05,
1477
+ min: 0,
1478
+ max: 1
1479
+ }, {
1480
+ name: 'center',
1481
+ type: 'array',
1482
+ label: ['Center X', 'Center Y'],
1483
+ defaultValue: [0.5, 0.5],
1484
+ min: 0,
1485
+ max: 1
1486
+ }]
1487
+ },
1488
+ tiltShift: {
1489
+ type: 'tiltShift',
1490
+ name: 'Blur (Tilt Shift)',
1491
+ description: 'effectDescription.tiltShift',
1492
+ parameters: [{
1493
+ name: 'blurRadius',
1494
+ label: 'Blur',
1495
+ min: 0,
1496
+ max: 50
1497
+ }, {
1498
+ name: 'gradientRadius',
1499
+ label: 'Gradient',
1500
+ min: 0,
1501
+ max: 400
1502
+ }, {
1503
+ name: 'start',
1504
+ type: 'array',
1505
+ label: ['Start', false],
1506
+ defaultValue: [0.0, 0.0],
1507
+ min: 0,
1508
+ max: 1
1509
+ }, {
1510
+ name: 'end',
1511
+ type: 'array',
1512
+ label: ['End', false],
1513
+ defaultValue: [1, 1],
1514
+ min: 0,
1515
+ max: 1
1516
+ }]
1517
+ },
1518
+ edgeWork: {
1519
+ type: 'edgeWork',
1520
+ name: 'Edge work',
1521
+ description: 'effectDescription.edgeWork',
1522
+ parameters: [{
1523
+ name: 'radius',
1524
+ min: 1,
1525
+ max: 50
1526
+ }]
1527
+ },
1528
+ vignette: {
1529
+ type: 'vignette',
1530
+ name: 'Vignette',
1531
+ description: 'effectDescription.vignette',
1532
+ parameters: [{
1533
+ name: 'amount',
1534
+ min: 0,
1535
+ max: 1
1536
+ }, {
1537
+ name: 'radius',
1538
+ min: 0,
1539
+ max: 1
1540
+ }]
1541
+ },
1542
+ magnify: {
1543
+ type: 'magnify',
1544
+ name: 'Magnify',
1545
+ description: 'effectDescription.magnify',
1546
+ parameters: [{
1547
+ name: 'screenXY',
1548
+ type: 'array',
1549
+ label: ['Position X', 'Position Y'],
1550
+ defaultValue: [0.5, 0.5],
1551
+ min: 0,
1552
+ max: 1
1553
+ }, {
1554
+ name: 'radiusPixels',
1555
+ label: 'Size',
1556
+ min: 10,
1557
+ max: 500
1558
+ }, {
1559
+ name: 'zoom',
1560
+ min: 0.5,
1561
+ max: 50
1562
+ }, {
1563
+ name: 'borderWidthPixels',
1564
+ label: 'Border Width',
1565
+ defaultValue: 3,
1566
+ min: 0,
1567
+ max: 50
1568
+ }]
1569
+ },
1570
+ hexagonalPixelate: {
1571
+ type: 'hexagonalPixelate',
1572
+ name: 'Hexagonal Pixelate',
1573
+ description: 'effectDescription.hexagonalPixelate',
1574
+ parameters: [{
1575
+ name: 'scale',
1576
+ defaultValue: 20,
1577
+ min: 1,
1578
+ max: 50
1579
+ }]
1580
+ },
1581
+ distanceFog: {
1582
+ type: DISTANCE_FOG_TYPE,
1583
+ name: 'Distance Fog',
1584
+ description: 'effectDescription.distanceFog',
1585
+ parameters: [{
1586
+ name: 'density',
1587
+ defaultValue: 0.5,
1588
+ min: 0,
1589
+ max: 1
1590
+ }, {
1591
+ name: 'fogStart',
1592
+ label: 'Start',
1593
+ defaultValue: 0.3,
1594
+ min: 0,
1595
+ max: 1
1596
+ }, {
1597
+ name: 'fogRange',
1598
+ label: 'Range',
1599
+ defaultValue: 0.5,
1600
+ min: 0.01,
1601
+ max: 1
1602
+ }, {
1603
+ name: 'fogColor',
1604
+ type: 'color',
1605
+ min: 0,
1606
+ max: 255,
1607
+ defaultValue: [217, 222, 230]
1608
+ }]
1609
+ },
1610
+ surfaceFog: {
1611
+ type: SURFACE_FOG_TYPE,
1612
+ name: 'Surface Fog',
1613
+ description: 'effectDescription.surfaceFog',
1614
+ parameters: [{
1615
+ name: 'density',
1616
+ defaultValue: 0.6,
1617
+ min: 0,
1618
+ max: 1
1619
+ }, {
1620
+ name: 'height',
1621
+ label: 'Elevation (m)',
1622
+ defaultValue: 50,
1623
+ min: -200,
1624
+ max: 6000
1625
+ }, {
1626
+ name: 'animateHeight',
1627
+ type: 'checkbox',
1628
+ label: 'Animate Elevation',
1629
+ tooltip: 'Animates elevation from start to end value during video export preview and recording.',
1630
+ defaultValue: false,
1631
+ min: 0,
1632
+ max: 1
1633
+ }, {
1634
+ name: 'heightEnd',
1635
+ label: 'End Elevation (m)',
1636
+ defaultValue: 100,
1637
+ min: -200,
1638
+ max: 6000
1639
+ }, {
1640
+ name: 'linearEasing',
1641
+ type: 'checkbox',
1642
+ label: 'Linear Easing',
1643
+ tooltip: 'Uses constant speed instead of smooth ease-in / ease-out during elevation animation.',
1644
+ defaultValue: false,
1645
+ min: 0,
1646
+ max: 1
1647
+ }, {
1648
+ name: 'thickness',
1649
+ label: 'Transition (m)',
1650
+ defaultValue: 50,
1651
+ min: 0,
1652
+ max: 1000
1653
+ }, {
1654
+ name: 'fogColor',
1655
+ type: 'color',
1656
+ label: 'Fog Color',
1657
+ min: 0,
1658
+ max: 255,
1659
+ defaultValue: [230, 235, 242]
1660
+ }, {
1661
+ name: 'pattern',
1662
+ type: 'checkbox',
1663
+ label: 'Pattern',
1664
+ tooltip: 'Adds a noise pattern to the fog for a more natural, volumetric look.',
1665
+ defaultValue: false,
1666
+ min: 0,
1667
+ max: 1
1668
+ }]
1669
+ }
1670
+ };
1671
+ var EFFECT_DESCRIPTIONS = exports.EFFECT_DESCRIPTIONS = [LIGHT_AND_SHADOW_EFFECT].concat((0, _toConsumableArray2["default"])(Object.keys(POSTPROCESSING_EFFECTS).map(function (keyName) {
1672
+ return POSTPROCESSING_EFFECTS[keyName];
1673
+ })));
1674
+ var SYNC_TIMELINE_MODES = exports.SYNC_TIMELINE_MODES = {
1675
+ start: 0,
1676
+ end: 1
1677
+ };
1678
+ var GEOARROW_METADATA_KEY = exports.GEOARROW_METADATA_KEY = 'ARROW:extension:name';
1679
+
1680
+ /**
1681
+ * Enum holding GeoArrow extension type names
1682
+ */
1683
+ var GEOARROW_EXTENSIONS = exports.GEOARROW_EXTENSIONS = /*#__PURE__*/function (GEOARROW_EXTENSIONS) {
1684
+ GEOARROW_EXTENSIONS["POINT"] = "geoarrow.point";
1685
+ GEOARROW_EXTENSIONS["LINESTRING"] = "geoarrow.linestring";
1686
+ GEOARROW_EXTENSIONS["POLYGON"] = "geoarrow.polygon";
1687
+ GEOARROW_EXTENSIONS["MULTIPOINT"] = "geoarrow.multipoint";
1688
+ GEOARROW_EXTENSIONS["MULTILINESTRING"] = "geoarrow.multilinestring";
1689
+ GEOARROW_EXTENSIONS["MULTIPOLYGON"] = "geoarrow.multipolygon";
1690
+ GEOARROW_EXTENSIONS["WKB"] = "geoarrow.wkb";
1691
+ return GEOARROW_EXTENSIONS;
1692
+ }({});
1693
+ var LOADERS_CDN_VERSION = exports.LOADERS_CDN_VERSION = '4.3.2';
1694
+ var LOADERS_CDN_URL = exports.LOADERS_CDN_URL = 'https://unpkg.com/@loaders.gl';
1695
+ var getLoaderOptions = exports.getLoaderOptions = function getLoaderOptions() {
1696
+ return {
1697
+ mvt: {
1698
+ workerUrl: "".concat(LOADERS_CDN_URL, "/mvt@").concat(LOADERS_CDN_VERSION, "/dist/mvt-worker.js")
1699
+ },
1700
+ 'quantized-mesh': {
1701
+ workerUrl: "".concat(LOADERS_CDN_URL, "/terrain@").concat(LOADERS_CDN_VERSION, "/dist/quantized-mesh-worker.js")
1702
+ },
1703
+ npy: {
1704
+ workerUrl: "".concat(LOADERS_CDN_URL, "/textures@").concat(LOADERS_CDN_VERSION, "/dist/npy-worker.js")
1705
+ }
1706
+ };
1707
+ };
1708
+ var CUSTOM_SCENEGRAPH_MODEL_ID = exports.CUSTOM_SCENEGRAPH_MODEL_ID = 'custom';
1709
+ var DEFAULT_SCENEGRAPH_MODEL_ID = exports.DEFAULT_SCENEGRAPH_MODEL_ID = 'default-model';
1710
+ var LEGACY_DEFAULT_SCENEGRAPH_URL = exports.LEGACY_DEFAULT_SCENEGRAPH_URL = 'https://raw.githubusercontent.com/KhronosGroup/glTF-Sample-Models/master/2.0/Duck/glTF-Binary/Duck.glb';
1711
+ var MODELS_BASE_URL = 'https://studio-public-data.foursquare.com/statics/keplergl/3d-models.2022-06-13';
1712
+ /** Gallery shared by the trip layer and the point 3D layer. */
1713
+ var SCENEGRAPH_GALLERY_MODELS = [{
1714
+ id: 'airplane',
1715
+ label: 'Airplane',
1716
+ icon: null,
1717
+ url: "".concat(MODELS_BASE_URL, "/Plane.glb"),
1718
+ angles: [0, 0, 0],
1719
+ scale: 1.0
1720
+ }, {
1721
+ id: 'boeing777',
1722
+ label: 'Airliner',
1723
+ icon: null,
1724
+ url: "".concat(MODELS_BASE_URL, "/Airliner.glb"),
1725
+ angles: [0, 0, 0],
1726
+ scale: 1.0
1727
+ }, {
1728
+ id: 'uber-evtol',
1729
+ label: 'VTOL',
1730
+ icon: null,
1731
+ url: "".concat(MODELS_BASE_URL, "/evtol.glb"),
1732
+ angles: [0, 0, 0],
1733
+ scale: 1.0
1734
+ }, {
1735
+ id: 'hang-glider',
1736
+ label: 'Glider',
1737
+ icon: null,
1738
+ url: "".concat(MODELS_BASE_URL, "/Hangglider.glb"),
1739
+ angles: [0, 0, 0],
1740
+ scale: 1.0
1741
+ }, {
1742
+ id: 'helicopter',
1743
+ label: 'Helicopter',
1744
+ icon: null,
1745
+ url: "".concat(MODELS_BASE_URL, "/Helicopter.glb"),
1746
+ angles: [0, 0, 0],
1747
+ scale: 1.0
1748
+ }, {
1749
+ id: 'bicycle',
1750
+ label: 'Bicycle',
1751
+ icon: null,
1752
+ url: "".concat(MODELS_BASE_URL, "/Bicycle.glb"),
1753
+ angles: [0, 0, 0],
1754
+ scale: 1.0
1755
+ }, {
1756
+ id: 'scooter',
1757
+ label: 'Scooter',
1758
+ icon: null,
1759
+ url: "".concat(MODELS_BASE_URL, "/Scooter.glb"),
1760
+ angles: [0, 0, 0],
1761
+ scale: 1.0
1762
+ }, {
1763
+ id: 'car',
1764
+ label: 'Car',
1765
+ icon: null,
1766
+ url: "".concat(MODELS_BASE_URL, "/Car.glb"),
1767
+ angles: [0, 0, 0],
1768
+ scale: 1.0
1769
+ }, {
1770
+ id: 'truck',
1771
+ label: 'Truck',
1772
+ icon: null,
1773
+ url: "".concat(MODELS_BASE_URL, "/Truck.glb"),
1774
+ angles: [0, 0, 0],
1775
+ scale: 1.0
1776
+ }, {
1777
+ id: 'semitruck',
1778
+ label: 'Semitruck',
1779
+ icon: null,
1780
+ url: "".concat(MODELS_BASE_URL, "/Semitruck.glb"),
1781
+ angles: [0, 0, 0],
1782
+ scale: 1.0
1783
+ }, {
1784
+ id: 'cargoship',
1785
+ label: 'Cargoship',
1786
+ icon: null,
1787
+ url: "".concat(MODELS_BASE_URL, "/Cargoship.glb"),
1788
+ angles: [0, 0, 0],
1789
+ scale: 1.0
1790
+ }];
1791
+ var CUSTOM_SCENEGRAPH_MODEL = {
1792
+ id: CUSTOM_SCENEGRAPH_MODEL_ID,
1793
+ label: 'Custom',
1794
+ icon: null,
1795
+ url: null,
1796
+ angles: [0, 0, 0],
1797
+ scale: 1.0
1798
+ };
1799
+
1800
+ /** Duck used by the point 3D layer. Yaw lives on the model so angle Z can default to 0. */
1801
+ var DEFAULT_SCENEGRAPH_MODEL = exports.DEFAULT_SCENEGRAPH_MODEL = {
1802
+ id: DEFAULT_SCENEGRAPH_MODEL_ID,
1803
+ label: 'Ducky',
1804
+ icon: null,
1805
+ url: "".concat(MODELS_BASE_URL, "/Duck-Kepler-3D-Layer.glb"),
1806
+ angles: [0, 0, 90],
1807
+ scale: 150
1808
+ };
1809
+ var TRIP_LAYER_SCENEGRAPH_MODELS = exports.TRIP_LAYER_SCENEGRAPH_MODELS = [].concat(SCENEGRAPH_GALLERY_MODELS, [CUSTOM_SCENEGRAPH_MODEL]);
1810
+
1811
+ /** Same gallery as trips, plus Ducky and a custom URL. */
1812
+ var SCENEGRAPH_LAYER_MODELS = exports.SCENEGRAPH_LAYER_MODELS = [].concat(SCENEGRAPH_GALLERY_MODELS, [DEFAULT_SCENEGRAPH_MODEL, CUSTOM_SCENEGRAPH_MODEL]);
1813
+ //# sourceMappingURL=default-settings.js.map