@stadiamaps/ferrostar 0.23.0 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ferrostar.d.ts CHANGED
@@ -1,35 +1,20 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
- * JavaScript wrapper for `location_simulation_from_coordinates`.
5
- * @param {any} coordinates
6
- * @param {number | undefined} resample_distance
7
- * @param {LocationBias} bias
8
- * @returns {any}
9
- */
4
+ * JavaScript wrapper for `location_simulation_from_coordinates`.
5
+ */
10
6
  export function locationSimulationFromCoordinates(coordinates: any, resample_distance: number | undefined, bias: LocationBias): any;
11
7
  /**
12
- * JavaScript wrapper for `location_simulation_from_route`.
13
- * @param {any} route
14
- * @param {number | undefined} resample_distance
15
- * @param {LocationBias} bias
16
- * @returns {any}
17
- */
8
+ * JavaScript wrapper for `location_simulation_from_route`.
9
+ */
18
10
  export function locationSimulationFromRoute(route: any, resample_distance: number | undefined, bias: LocationBias): any;
19
11
  /**
20
- * JavaScript wrapper for `location_simulation_from_polyline`.
21
- * @param {string} polyline
22
- * @param {number} precision
23
- * @param {number | undefined} resample_distance
24
- * @param {LocationBias} bias
25
- * @returns {any}
26
- */
12
+ * JavaScript wrapper for `location_simulation_from_polyline`.
13
+ */
27
14
  export function locationSimulationFromPolyline(polyline: string, precision: number, resample_distance: number | undefined, bias: LocationBias): any;
28
15
  /**
29
- * JavaScript wrapper for `advance_location_simulation`.
30
- * @param {any} state
31
- * @returns {any}
32
- */
16
+ * JavaScript wrapper for `advance_location_simulation`.
17
+ */
33
18
  export function advanceLocationSimulation(state: any): any;
34
19
  export interface VisualInstruction {
35
20
  primaryContent: VisualInstructionContent;
@@ -44,6 +29,7 @@ export interface VisualInstructionContent {
44
29
  maneuverModifier: ManeuverModifier | undefined;
45
30
  roundaboutExitDegrees: number | undefined;
46
31
  laneInfo: LaneInfo[] | undefined;
32
+ exitNumbers: string[];
47
33
  }
48
34
 
49
35
  export interface LaneInfo {
@@ -100,6 +86,7 @@ export interface RouteStep {
100
86
  distance: number;
101
87
  duration: number;
102
88
  roadName: string | undefined;
89
+ exits: string[];
103
90
  instruction: string;
104
91
  visualInstructions: VisualInstruction[];
105
92
  spokenInstructions: SpokenInstruction[];
@@ -150,6 +137,10 @@ export interface GeographicCoordinate {
150
137
  lng: number;
151
138
  }
152
139
 
140
+ export type RouteDeviation = "NoDeviation" | { OffRoute: { deviationFromRouteLine: number } };
141
+
142
+ export type RouteDeviationTracking = "None" | { StaticThreshold: { minimumHorizontalAccuracy: number; maxAcceptableDeviation: number } };
143
+
153
144
  export type SimulationError = { PolylineError: { error: string } } | "NotEnoughPoints";
154
145
 
155
146
  export type LocationBias = { Left: number } | { Right: number } | { Random: number } | "None";
@@ -166,7 +157,9 @@ export interface NavigationControllerConfig {
166
157
  snappedLocationCourseFiltering: CourseFiltering;
167
158
  }
168
159
 
169
- export type StepAdvanceMode = "Manual" | { DistanceToEndOfStep: { distance: number; minimumHorizontalAccuracy: number } } | { RelativeLineStringDistance: { minimumHorizontalAccuracy: number; automaticAdvanceDistance: number | undefined } };
160
+ export type SpecialAdvanceConditions = { AdvanceAtDistanceFromEnd: number } | { MinimumDistanceFromCurrentStepLine: number };
161
+
162
+ export type StepAdvanceMode = "Manual" | { DistanceToEndOfStep: { distance: number; minimumHorizontalAccuracy: number } } | { RelativeLineStringDistance: { minimumHorizontalAccuracy: number; specialAdvanceConditions: SpecialAdvanceConditions | undefined } };
170
163
 
171
164
  export type CourseFiltering = "SnapToRoute" | "Raw";
172
165
 
@@ -178,59 +171,26 @@ export interface TripProgress {
178
171
  durationRemaining: number;
179
172
  }
180
173
 
181
- export type RouteDeviation = "NoDeviation" | { OffRoute: { deviationFromRouteLine: number } };
182
-
183
- export type RouteDeviationTracking = "None" | { StaticThreshold: { minimumHorizontalAccuracy: number; maxAcceptableDeviation: number } };
184
-
185
174
  /**
186
- * JavaScript wrapper for `NavigationController`.
187
- */
175
+ * JavaScript wrapper for `NavigationController`.
176
+ */
188
177
  export class NavigationController {
189
178
  free(): void;
190
- /**
191
- * @param {any} route
192
- * @param {any} config
193
- */
194
179
  constructor(route: any, config: any);
195
- /**
196
- * @param {any} location
197
- * @returns {any}
198
- */
199
180
  getInitialState(location: any): any;
200
- /**
201
- * @param {any} state
202
- * @returns {any}
203
- */
204
181
  advance_to_next_step(state: any): any;
205
- /**
206
- * @param {any} location
207
- * @param {any} state
208
- * @returns {any}
209
- */
210
182
  updateUserLocation(location: any, state: any): any;
211
183
  }
212
184
  /**
213
- * JavaScript wrapper for `RouteAdapter`.
214
- */
185
+ * JavaScript wrapper for `RouteAdapter`.
186
+ */
215
187
  export class RouteAdapter {
216
188
  free(): void;
217
- /**
218
- * Creates a new RouteAdapter with a Valhalla HTTP request generator and an OSRM response parser.
219
- * At the moment, this is the only supported combination.
220
- * @param {string} endpoint_url
221
- * @param {string} profile
222
- * @param {string | undefined} [costing_options_json]
223
- */
189
+ /**
190
+ * Creates a new RouteAdapter with a Valhalla HTTP request generator and an OSRM response parser.
191
+ * At the moment, this is the only supported combination.
192
+ */
224
193
  constructor(endpoint_url: string, profile: string, costing_options_json?: string);
225
- /**
226
- * @param {any} user_location
227
- * @param {any} waypoints
228
- * @returns {any}
229
- */
230
194
  generateRequest(user_location: any, waypoints: any): any;
231
- /**
232
- * @param {Uint8Array} response
233
- * @returns {any}
234
- */
235
195
  parseResponse(response: Uint8Array): any;
236
196
  }
package/ferrostar.js CHANGED
@@ -1,5 +1,5 @@
1
-
2
1
  import * as wasm from "./ferrostar_bg.wasm";
2
+ export * from "./ferrostar_bg.js";
3
3
  import { __wbg_set_wasm } from "./ferrostar_bg.js";
4
4
  __wbg_set_wasm(wasm);
5
- export * from "./ferrostar_bg.js";
5
+ wasm.__wbindgen_start();
package/ferrostar_bg.js CHANGED
@@ -4,48 +4,6 @@ export function __wbg_set_wasm(val) {
4
4
  }
5
5
 
6
6
 
7
- const heap = new Array(128).fill(undefined);
8
-
9
- heap.push(undefined, null, true, false);
10
-
11
- function getObject(idx) { return heap[idx]; }
12
-
13
- let heap_next = heap.length;
14
-
15
- function dropObject(idx) {
16
- if (idx < 132) return;
17
- heap[idx] = heap_next;
18
- heap_next = idx;
19
- }
20
-
21
- function takeObject(idx) {
22
- const ret = getObject(idx);
23
- dropObject(idx);
24
- return ret;
25
- }
26
-
27
- function isLikeNone(x) {
28
- return x === undefined || x === null;
29
- }
30
-
31
- let cachedDataViewMemory0 = null;
32
-
33
- function getDataViewMemory0() {
34
- if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
35
- cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
36
- }
37
- return cachedDataViewMemory0;
38
- }
39
-
40
- function addHeapObject(obj) {
41
- if (heap_next === heap.length) heap.push(heap.length + 1);
42
- const idx = heap_next;
43
- heap_next = heap[idx];
44
-
45
- heap[idx] = obj;
46
- return idx;
47
- }
48
-
49
7
  let WASM_VECTOR_LEN = 0;
50
8
 
51
9
  let cachedUint8ArrayMemory0 = null;
@@ -113,6 +71,30 @@ function passStringToWasm0(arg, malloc, realloc) {
113
71
  return ptr;
114
72
  }
115
73
 
74
+ let cachedDataViewMemory0 = null;
75
+
76
+ function getDataViewMemory0() {
77
+ if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {
78
+ cachedDataViewMemory0 = new DataView(wasm.memory.buffer);
79
+ }
80
+ return cachedDataViewMemory0;
81
+ }
82
+
83
+ function addToExternrefTable0(obj) {
84
+ const idx = wasm.__externref_table_alloc();
85
+ wasm.__wbindgen_export_4.set(idx, obj);
86
+ return idx;
87
+ }
88
+
89
+ function handleError(f, args) {
90
+ try {
91
+ return f.apply(this, args);
92
+ } catch (e) {
93
+ const idx = addToExternrefTable0(e);
94
+ wasm.__wbindgen_exn_store(idx);
95
+ }
96
+ }
97
+
116
98
  const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
117
99
 
118
100
  let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
@@ -124,6 +106,10 @@ function getStringFromWasm0(ptr, len) {
124
106
  return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));
125
107
  }
126
108
 
109
+ function isLikeNone(x) {
110
+ return x === undefined || x === null;
111
+ }
112
+
127
113
  function debugString(val) {
128
114
  // primitive types
129
115
  const type = typeof val;
@@ -165,7 +151,7 @@ function debugString(val) {
165
151
  // Test for built-in
166
152
  const builtInMatches = /\[object ([^\]]+)\]/.exec(toString.call(val));
167
153
  let className;
168
- if (builtInMatches.length > 1) {
154
+ if (builtInMatches && builtInMatches.length > 1) {
169
155
  className = builtInMatches[1];
170
156
  } else {
171
157
  // Failed to match the standard '[object ClassName]'
@@ -188,109 +174,83 @@ function debugString(val) {
188
174
  // TODO we could test for more things here, like `Set`s and `Map`s.
189
175
  return className;
190
176
  }
177
+
178
+ function takeFromExternrefTable0(idx) {
179
+ const value = wasm.__wbindgen_export_4.get(idx);
180
+ wasm.__externref_table_dealloc(idx);
181
+ return value;
182
+ }
183
+
184
+ function passArray8ToWasm0(arg, malloc) {
185
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
186
+ getUint8ArrayMemory0().set(arg, ptr / 1);
187
+ WASM_VECTOR_LEN = arg.length;
188
+ return ptr;
189
+ }
191
190
  /**
192
- * JavaScript wrapper for `location_simulation_from_coordinates`.
193
- * @param {any} coordinates
194
- * @param {number | undefined} resample_distance
195
- * @param {LocationBias} bias
196
- * @returns {any}
197
- */
191
+ * JavaScript wrapper for `location_simulation_from_coordinates`.
192
+ * @param {any} coordinates
193
+ * @param {number | undefined} resample_distance
194
+ * @param {LocationBias} bias
195
+ * @returns {any}
196
+ */
198
197
  export function locationSimulationFromCoordinates(coordinates, resample_distance, bias) {
199
- try {
200
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
201
- wasm.locationSimulationFromCoordinates(retptr, addHeapObject(coordinates), !isLikeNone(resample_distance), isLikeNone(resample_distance) ? 0 : resample_distance, addHeapObject(bias));
202
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
203
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
204
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
205
- if (r2) {
206
- throw takeObject(r1);
207
- }
208
- return takeObject(r0);
209
- } finally {
210
- wasm.__wbindgen_add_to_stack_pointer(16);
198
+ const ret = wasm.locationSimulationFromCoordinates(coordinates, !isLikeNone(resample_distance), isLikeNone(resample_distance) ? 0 : resample_distance, bias);
199
+ if (ret[2]) {
200
+ throw takeFromExternrefTable0(ret[1]);
211
201
  }
202
+ return takeFromExternrefTable0(ret[0]);
212
203
  }
213
204
 
214
205
  /**
215
- * JavaScript wrapper for `location_simulation_from_route`.
216
- * @param {any} route
217
- * @param {number | undefined} resample_distance
218
- * @param {LocationBias} bias
219
- * @returns {any}
220
- */
206
+ * JavaScript wrapper for `location_simulation_from_route`.
207
+ * @param {any} route
208
+ * @param {number | undefined} resample_distance
209
+ * @param {LocationBias} bias
210
+ * @returns {any}
211
+ */
221
212
  export function locationSimulationFromRoute(route, resample_distance, bias) {
222
- try {
223
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
224
- wasm.locationSimulationFromRoute(retptr, addHeapObject(route), !isLikeNone(resample_distance), isLikeNone(resample_distance) ? 0 : resample_distance, addHeapObject(bias));
225
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
226
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
227
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
228
- if (r2) {
229
- throw takeObject(r1);
230
- }
231
- return takeObject(r0);
232
- } finally {
233
- wasm.__wbindgen_add_to_stack_pointer(16);
213
+ const ret = wasm.locationSimulationFromRoute(route, !isLikeNone(resample_distance), isLikeNone(resample_distance) ? 0 : resample_distance, bias);
214
+ if (ret[2]) {
215
+ throw takeFromExternrefTable0(ret[1]);
234
216
  }
217
+ return takeFromExternrefTable0(ret[0]);
235
218
  }
236
219
 
237
220
  /**
238
- * JavaScript wrapper for `location_simulation_from_polyline`.
239
- * @param {string} polyline
240
- * @param {number} precision
241
- * @param {number | undefined} resample_distance
242
- * @param {LocationBias} bias
243
- * @returns {any}
244
- */
221
+ * JavaScript wrapper for `location_simulation_from_polyline`.
222
+ * @param {string} polyline
223
+ * @param {number} precision
224
+ * @param {number | undefined} resample_distance
225
+ * @param {LocationBias} bias
226
+ * @returns {any}
227
+ */
245
228
  export function locationSimulationFromPolyline(polyline, precision, resample_distance, bias) {
246
- try {
247
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
248
- const ptr0 = passStringToWasm0(polyline, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
249
- const len0 = WASM_VECTOR_LEN;
250
- wasm.locationSimulationFromPolyline(retptr, ptr0, len0, precision, !isLikeNone(resample_distance), isLikeNone(resample_distance) ? 0 : resample_distance, addHeapObject(bias));
251
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
252
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
253
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
254
- if (r2) {
255
- throw takeObject(r1);
256
- }
257
- return takeObject(r0);
258
- } finally {
259
- wasm.__wbindgen_add_to_stack_pointer(16);
229
+ const ptr0 = passStringToWasm0(polyline, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
230
+ const len0 = WASM_VECTOR_LEN;
231
+ const ret = wasm.locationSimulationFromPolyline(ptr0, len0, precision, !isLikeNone(resample_distance), isLikeNone(resample_distance) ? 0 : resample_distance, bias);
232
+ if (ret[2]) {
233
+ throw takeFromExternrefTable0(ret[1]);
260
234
  }
235
+ return takeFromExternrefTable0(ret[0]);
261
236
  }
262
237
 
263
238
  /**
264
- * JavaScript wrapper for `advance_location_simulation`.
265
- * @param {any} state
266
- * @returns {any}
267
- */
239
+ * JavaScript wrapper for `advance_location_simulation`.
240
+ * @param {any} state
241
+ * @returns {any}
242
+ */
268
243
  export function advanceLocationSimulation(state) {
269
- const ret = wasm.advanceLocationSimulation(addHeapObject(state));
270
- return takeObject(ret);
271
- }
272
-
273
- function passArray8ToWasm0(arg, malloc) {
274
- const ptr = malloc(arg.length * 1, 1) >>> 0;
275
- getUint8ArrayMemory0().set(arg, ptr / 1);
276
- WASM_VECTOR_LEN = arg.length;
277
- return ptr;
278
- }
279
-
280
- function handleError(f, args) {
281
- try {
282
- return f.apply(this, args);
283
- } catch (e) {
284
- wasm.__wbindgen_exn_store(addHeapObject(e));
285
- }
244
+ const ret = wasm.advanceLocationSimulation(state);
245
+ return ret;
286
246
  }
287
247
 
288
248
  const NavigationControllerFinalization = (typeof FinalizationRegistry === 'undefined')
289
249
  ? { register: () => {}, unregister: () => {} }
290
250
  : new FinalizationRegistry(ptr => wasm.__wbg_navigationcontroller_free(ptr >>> 0, 1));
291
251
  /**
292
- * JavaScript wrapper for `NavigationController`.
293
- */
252
+ * JavaScript wrapper for `NavigationController`.
253
+ */
294
254
  export class NavigationController {
295
255
 
296
256
  __destroy_into_raw() {
@@ -305,83 +265,51 @@ export class NavigationController {
305
265
  wasm.__wbg_navigationcontroller_free(ptr, 0);
306
266
  }
307
267
  /**
308
- * @param {any} route
309
- * @param {any} config
310
- */
268
+ * @param {any} route
269
+ * @param {any} config
270
+ */
311
271
  constructor(route, config) {
312
- try {
313
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
314
- wasm.navigationcontroller_new(retptr, addHeapObject(route), addHeapObject(config));
315
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
316
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
317
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
318
- if (r2) {
319
- throw takeObject(r1);
320
- }
321
- this.__wbg_ptr = r0 >>> 0;
322
- NavigationControllerFinalization.register(this, this.__wbg_ptr, this);
323
- return this;
324
- } finally {
325
- wasm.__wbindgen_add_to_stack_pointer(16);
272
+ const ret = wasm.navigationcontroller_new(route, config);
273
+ if (ret[2]) {
274
+ throw takeFromExternrefTable0(ret[1]);
326
275
  }
276
+ this.__wbg_ptr = ret[0] >>> 0;
277
+ NavigationControllerFinalization.register(this, this.__wbg_ptr, this);
278
+ return this;
327
279
  }
328
280
  /**
329
- * @param {any} location
330
- * @returns {any}
331
- */
281
+ * @param {any} location
282
+ * @returns {any}
283
+ */
332
284
  getInitialState(location) {
333
- try {
334
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
335
- wasm.navigationcontroller_getInitialState(retptr, this.__wbg_ptr, addHeapObject(location));
336
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
337
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
338
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
339
- if (r2) {
340
- throw takeObject(r1);
341
- }
342
- return takeObject(r0);
343
- } finally {
344
- wasm.__wbindgen_add_to_stack_pointer(16);
285
+ const ret = wasm.navigationcontroller_getInitialState(this.__wbg_ptr, location);
286
+ if (ret[2]) {
287
+ throw takeFromExternrefTable0(ret[1]);
345
288
  }
289
+ return takeFromExternrefTable0(ret[0]);
346
290
  }
347
291
  /**
348
- * @param {any} state
349
- * @returns {any}
350
- */
292
+ * @param {any} state
293
+ * @returns {any}
294
+ */
351
295
  advance_to_next_step(state) {
352
- try {
353
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
354
- wasm.navigationcontroller_advance_to_next_step(retptr, this.__wbg_ptr, addHeapObject(state));
355
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
356
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
357
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
358
- if (r2) {
359
- throw takeObject(r1);
360
- }
361
- return takeObject(r0);
362
- } finally {
363
- wasm.__wbindgen_add_to_stack_pointer(16);
296
+ const ret = wasm.navigationcontroller_advance_to_next_step(this.__wbg_ptr, state);
297
+ if (ret[2]) {
298
+ throw takeFromExternrefTable0(ret[1]);
364
299
  }
300
+ return takeFromExternrefTable0(ret[0]);
365
301
  }
366
302
  /**
367
- * @param {any} location
368
- * @param {any} state
369
- * @returns {any}
370
- */
303
+ * @param {any} location
304
+ * @param {any} state
305
+ * @returns {any}
306
+ */
371
307
  updateUserLocation(location, state) {
372
- try {
373
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
374
- wasm.navigationcontroller_updateUserLocation(retptr, this.__wbg_ptr, addHeapObject(location), addHeapObject(state));
375
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
376
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
377
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
378
- if (r2) {
379
- throw takeObject(r1);
380
- }
381
- return takeObject(r0);
382
- } finally {
383
- wasm.__wbindgen_add_to_stack_pointer(16);
308
+ const ret = wasm.navigationcontroller_updateUserLocation(this.__wbg_ptr, location, state);
309
+ if (ret[2]) {
310
+ throw takeFromExternrefTable0(ret[1]);
384
311
  }
312
+ return takeFromExternrefTable0(ret[0]);
385
313
  }
386
314
  }
387
315
 
@@ -389,8 +317,8 @@ const RouteAdapterFinalization = (typeof FinalizationRegistry === 'undefined')
389
317
  ? { register: () => {}, unregister: () => {} }
390
318
  : new FinalizationRegistry(ptr => wasm.__wbg_routeadapter_free(ptr >>> 0, 1));
391
319
  /**
392
- * JavaScript wrapper for `RouteAdapter`.
393
- */
320
+ * JavaScript wrapper for `RouteAdapter`.
321
+ */
394
322
  export class RouteAdapter {
395
323
 
396
324
  __destroy_into_raw() {
@@ -405,439 +333,417 @@ export class RouteAdapter {
405
333
  wasm.__wbg_routeadapter_free(ptr, 0);
406
334
  }
407
335
  /**
408
- * Creates a new RouteAdapter with a Valhalla HTTP request generator and an OSRM response parser.
409
- * At the moment, this is the only supported combination.
410
- * @param {string} endpoint_url
411
- * @param {string} profile
412
- * @param {string | undefined} [costing_options_json]
413
- */
336
+ * Creates a new RouteAdapter with a Valhalla HTTP request generator and an OSRM response parser.
337
+ * At the moment, this is the only supported combination.
338
+ * @param {string} endpoint_url
339
+ * @param {string} profile
340
+ * @param {string | undefined} [costing_options_json]
341
+ */
414
342
  constructor(endpoint_url, profile, costing_options_json) {
415
- try {
416
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
417
- const ptr0 = passStringToWasm0(endpoint_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
418
- const len0 = WASM_VECTOR_LEN;
419
- const ptr1 = passStringToWasm0(profile, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
420
- const len1 = WASM_VECTOR_LEN;
421
- var ptr2 = isLikeNone(costing_options_json) ? 0 : passStringToWasm0(costing_options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
422
- var len2 = WASM_VECTOR_LEN;
423
- wasm.routeadapter_new(retptr, ptr0, len0, ptr1, len1, ptr2, len2);
424
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
425
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
426
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
427
- if (r2) {
428
- throw takeObject(r1);
429
- }
430
- this.__wbg_ptr = r0 >>> 0;
431
- RouteAdapterFinalization.register(this, this.__wbg_ptr, this);
432
- return this;
433
- } finally {
434
- wasm.__wbindgen_add_to_stack_pointer(16);
343
+ const ptr0 = passStringToWasm0(endpoint_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
344
+ const len0 = WASM_VECTOR_LEN;
345
+ const ptr1 = passStringToWasm0(profile, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
346
+ const len1 = WASM_VECTOR_LEN;
347
+ var ptr2 = isLikeNone(costing_options_json) ? 0 : passStringToWasm0(costing_options_json, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
348
+ var len2 = WASM_VECTOR_LEN;
349
+ const ret = wasm.routeadapter_new(ptr0, len0, ptr1, len1, ptr2, len2);
350
+ if (ret[2]) {
351
+ throw takeFromExternrefTable0(ret[1]);
435
352
  }
353
+ this.__wbg_ptr = ret[0] >>> 0;
354
+ RouteAdapterFinalization.register(this, this.__wbg_ptr, this);
355
+ return this;
436
356
  }
437
357
  /**
438
- * @param {any} user_location
439
- * @param {any} waypoints
440
- * @returns {any}
441
- */
358
+ * @param {any} user_location
359
+ * @param {any} waypoints
360
+ * @returns {any}
361
+ */
442
362
  generateRequest(user_location, waypoints) {
443
- try {
444
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
445
- wasm.routeadapter_generateRequest(retptr, this.__wbg_ptr, addHeapObject(user_location), addHeapObject(waypoints));
446
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
447
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
448
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
449
- if (r2) {
450
- throw takeObject(r1);
451
- }
452
- return takeObject(r0);
453
- } finally {
454
- wasm.__wbindgen_add_to_stack_pointer(16);
363
+ const ret = wasm.routeadapter_generateRequest(this.__wbg_ptr, user_location, waypoints);
364
+ if (ret[2]) {
365
+ throw takeFromExternrefTable0(ret[1]);
455
366
  }
367
+ return takeFromExternrefTable0(ret[0]);
456
368
  }
457
369
  /**
458
- * @param {Uint8Array} response
459
- * @returns {any}
460
- */
370
+ * @param {Uint8Array} response
371
+ * @returns {any}
372
+ */
461
373
  parseResponse(response) {
462
- try {
463
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
464
- const ptr0 = passArray8ToWasm0(response, wasm.__wbindgen_malloc);
465
- const len0 = WASM_VECTOR_LEN;
466
- wasm.routeadapter_parseResponse(retptr, this.__wbg_ptr, ptr0, len0);
467
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
468
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
469
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
470
- if (r2) {
471
- throw takeObject(r1);
472
- }
473
- return takeObject(r0);
474
- } finally {
475
- wasm.__wbindgen_add_to_stack_pointer(16);
374
+ const ptr0 = passArray8ToWasm0(response, wasm.__wbindgen_malloc);
375
+ const len0 = WASM_VECTOR_LEN;
376
+ const ret = wasm.routeadapter_parseResponse(this.__wbg_ptr, ptr0, len0);
377
+ if (ret[2]) {
378
+ throw takeFromExternrefTable0(ret[1]);
476
379
  }
380
+ return takeFromExternrefTable0(ret[0]);
477
381
  }
478
382
  }
479
383
 
480
- export function __wbindgen_object_drop_ref(arg0) {
481
- takeObject(arg0);
384
+ export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
385
+ const ret = String(arg1);
386
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
387
+ const len1 = WASM_VECTOR_LEN;
388
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
389
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
482
390
  };
483
391
 
484
- export function __wbindgen_is_undefined(arg0) {
485
- const ret = getObject(arg0) === undefined;
486
- return ret;
392
+ export function __wbg_String_eecc4a11987127d6(arg0, arg1) {
393
+ const ret = String(arg1);
394
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
395
+ const len1 = WASM_VECTOR_LEN;
396
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
397
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
487
398
  };
488
399
 
489
- export function __wbindgen_in(arg0, arg1) {
490
- const ret = getObject(arg0) in getObject(arg1);
400
+ export function __wbg_buffer_61b7ce01341d7f88(arg0) {
401
+ const ret = arg0.buffer;
491
402
  return ret;
492
403
  };
493
404
 
494
- export function __wbindgen_number_get(arg0, arg1) {
495
- const obj = getObject(arg1);
496
- const ret = typeof(obj) === 'number' ? obj : undefined;
497
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
498
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
499
- };
405
+ export function __wbg_call_500db948e69c7330() { return handleError(function (arg0, arg1, arg2) {
406
+ const ret = arg0.call(arg1, arg2);
407
+ return ret;
408
+ }, arguments) };
500
409
 
501
- export function __wbindgen_is_bigint(arg0) {
502
- const ret = typeof(getObject(arg0)) === 'bigint';
410
+ export function __wbg_call_b0d8e36992d9900d() { return handleError(function (arg0, arg1) {
411
+ const ret = arg0.call(arg1);
503
412
  return ret;
504
- };
413
+ }, arguments) };
505
414
 
506
- export function __wbindgen_bigint_from_u64(arg0) {
507
- const ret = BigInt.asUintN(64, arg0);
508
- return addHeapObject(ret);
415
+ export function __wbg_crypto_ed58b8e10a292839(arg0) {
416
+ const ret = arg0.crypto;
417
+ return ret;
509
418
  };
510
419
 
511
- export function __wbindgen_jsval_eq(arg0, arg1) {
512
- const ret = getObject(arg0) === getObject(arg1);
420
+ export function __wbg_done_f22c1561fa919baa(arg0) {
421
+ const ret = arg0.done;
513
422
  return ret;
514
423
  };
515
424
 
516
- export function __wbindgen_boolean_get(arg0) {
517
- const v = getObject(arg0);
518
- const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
425
+ export function __wbg_entries_4f2bb9b0d701c0f6(arg0) {
426
+ const ret = Object.entries(arg0);
519
427
  return ret;
520
428
  };
521
429
 
522
- export function __wbindgen_is_string(arg0) {
523
- const ret = typeof(getObject(arg0)) === 'string';
430
+ export function __wbg_getRandomValues_bcb4912f16000dc4() { return handleError(function (arg0, arg1) {
431
+ arg0.getRandomValues(arg1);
432
+ }, arguments) };
433
+
434
+ export function __wbg_get_9aa3dff3f0266054(arg0, arg1) {
435
+ const ret = arg0[arg1 >>> 0];
524
436
  return ret;
525
437
  };
526
438
 
527
- export function __wbindgen_string_get(arg0, arg1) {
528
- const obj = getObject(arg1);
529
- const ret = typeof(obj) === 'string' ? obj : undefined;
530
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
531
- var len1 = WASM_VECTOR_LEN;
532
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
533
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
534
- };
439
+ export function __wbg_get_bbccf8970793c087() { return handleError(function (arg0, arg1) {
440
+ const ret = Reflect.get(arg0, arg1);
441
+ return ret;
442
+ }, arguments) };
535
443
 
536
- export function __wbindgen_is_object(arg0) {
537
- const val = getObject(arg0);
538
- const ret = typeof(val) === 'object' && val !== null;
444
+ export function __wbg_getwithrefkey_1dc361bd10053bfe(arg0, arg1) {
445
+ const ret = arg0[arg1];
539
446
  return ret;
540
447
  };
541
448
 
542
- export function __wbindgen_string_new(arg0, arg1) {
543
- const ret = getStringFromWasm0(arg0, arg1);
544
- return addHeapObject(ret);
449
+ export function __wbg_instanceof_ArrayBuffer_670ddde44cdb2602(arg0) {
450
+ let result;
451
+ try {
452
+ result = arg0 instanceof ArrayBuffer;
453
+ } catch (_) {
454
+ result = false;
455
+ }
456
+ const ret = result;
457
+ return ret;
545
458
  };
546
459
 
547
- export function __wbindgen_object_clone_ref(arg0) {
548
- const ret = getObject(arg0);
549
- return addHeapObject(ret);
460
+ export function __wbg_instanceof_Uint8Array_28af5bc19d6acad8(arg0) {
461
+ let result;
462
+ try {
463
+ result = arg0 instanceof Uint8Array;
464
+ } catch (_) {
465
+ result = false;
466
+ }
467
+ const ret = result;
468
+ return ret;
550
469
  };
551
470
 
552
- export function __wbindgen_error_new(arg0, arg1) {
553
- const ret = new Error(getStringFromWasm0(arg0, arg1));
554
- return addHeapObject(ret);
471
+ export function __wbg_isArray_1ba11a930108ec51(arg0) {
472
+ const ret = Array.isArray(arg0);
473
+ return ret;
555
474
  };
556
475
 
557
- export function __wbindgen_as_number(arg0) {
558
- const ret = +getObject(arg0);
476
+ export function __wbg_isSafeInteger_12f5549b2fca23f4(arg0) {
477
+ const ret = Number.isSafeInteger(arg0);
559
478
  return ret;
560
479
  };
561
480
 
562
- export function __wbindgen_jsval_loose_eq(arg0, arg1) {
563
- const ret = getObject(arg0) == getObject(arg1);
481
+ export function __wbg_iterator_23604bb983791576() {
482
+ const ret = Symbol.iterator;
564
483
  return ret;
565
484
  };
566
485
 
567
- export function __wbg_String_b9412f8799faab3e(arg0, arg1) {
568
- const ret = String(getObject(arg1));
569
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
570
- const len1 = WASM_VECTOR_LEN;
571
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
572
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
486
+ export function __wbg_length_65d1cd11729ced11(arg0) {
487
+ const ret = arg0.length;
488
+ return ret;
573
489
  };
574
490
 
575
- export function __wbindgen_number_new(arg0) {
576
- const ret = arg0;
577
- return addHeapObject(ret);
491
+ export function __wbg_length_d65cf0786bfc5739(arg0) {
492
+ const ret = arg0.length;
493
+ return ret;
578
494
  };
579
495
 
580
- export function __wbindgen_bigint_from_i64(arg0) {
581
- const ret = arg0;
582
- return addHeapObject(ret);
496
+ export function __wbg_msCrypto_0a36e2ec3a343d26(arg0) {
497
+ const ret = arg0.msCrypto;
498
+ return ret;
583
499
  };
584
500
 
585
- export function __wbg_getwithrefkey_edc2c8960f0f1191(arg0, arg1) {
586
- const ret = getObject(arg0)[getObject(arg1)];
587
- return addHeapObject(ret);
501
+ export function __wbg_new_254fa9eac11932ae() {
502
+ const ret = new Array();
503
+ return ret;
588
504
  };
589
505
 
590
- export function __wbg_set_f975102236d3c502(arg0, arg1, arg2) {
591
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
506
+ export function __wbg_new_3ff5b33b1ce712df(arg0) {
507
+ const ret = new Uint8Array(arg0);
508
+ return ret;
592
509
  };
593
510
 
594
- export function __wbg_crypto_1d1f22824a6a080c(arg0) {
595
- const ret = getObject(arg0).crypto;
596
- return addHeapObject(ret);
511
+ export function __wbg_new_688846f374351c92() {
512
+ const ret = new Object();
513
+ return ret;
597
514
  };
598
515
 
599
- export function __wbg_process_4a72847cc503995b(arg0) {
600
- const ret = getObject(arg0).process;
601
- return addHeapObject(ret);
516
+ export function __wbg_new_bc96c6a1c0786643() {
517
+ const ret = new Map();
518
+ return ret;
602
519
  };
603
520
 
604
- export function __wbg_versions_f686565e586dd935(arg0) {
605
- const ret = getObject(arg0).versions;
606
- return addHeapObject(ret);
521
+ export function __wbg_newnoargs_fd9e4bf8be2bc16d(arg0, arg1) {
522
+ const ret = new Function(getStringFromWasm0(arg0, arg1));
523
+ return ret;
607
524
  };
608
525
 
609
- export function __wbg_node_104a2ff8d6ea03a2(arg0) {
610
- const ret = getObject(arg0).node;
611
- return addHeapObject(ret);
526
+ export function __wbg_newwithbyteoffsetandlength_ba35896968751d91(arg0, arg1, arg2) {
527
+ const ret = new Uint8Array(arg0, arg1 >>> 0, arg2 >>> 0);
528
+ return ret;
612
529
  };
613
530
 
614
- export function __wbg_require_cca90b1a94a0255b() { return handleError(function () {
615
- const ret = module.require;
616
- return addHeapObject(ret);
617
- }, arguments) };
618
-
619
- export function __wbg_msCrypto_eb05e62b530a1508(arg0) {
620
- const ret = getObject(arg0).msCrypto;
621
- return addHeapObject(ret);
531
+ export function __wbg_newwithlength_34ce8f1051e74449(arg0) {
532
+ const ret = new Uint8Array(arg0 >>> 0);
533
+ return ret;
622
534
  };
623
535
 
624
- export function __wbg_getRandomValues_3aa56aa6edec874c() { return handleError(function (arg0, arg1) {
625
- getObject(arg0).getRandomValues(getObject(arg1));
626
- }, arguments) };
627
-
628
- export function __wbg_randomFillSync_5c9c955aa56b6049() { return handleError(function (arg0, arg1) {
629
- getObject(arg0).randomFillSync(takeObject(arg1));
536
+ export function __wbg_next_01dd9234a5bf6d05() { return handleError(function (arg0) {
537
+ const ret = arg0.next();
538
+ return ret;
630
539
  }, arguments) };
631
540
 
632
- export function __wbg_String_88810dfeb4021902(arg0, arg1) {
633
- const ret = String(getObject(arg1));
634
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
635
- const len1 = WASM_VECTOR_LEN;
636
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
637
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
541
+ export function __wbg_next_137428deb98342b0(arg0) {
542
+ const ret = arg0.next;
543
+ return ret;
638
544
  };
639
545
 
640
- export function __wbg_get_3baa728f9d58d3f6(arg0, arg1) {
641
- const ret = getObject(arg0)[arg1 >>> 0];
642
- return addHeapObject(ret);
546
+ export function __wbg_node_02999533c4ea02e3(arg0) {
547
+ const ret = arg0.node;
548
+ return ret;
643
549
  };
644
550
 
645
- export function __wbg_length_ae22078168b726f5(arg0) {
646
- const ret = getObject(arg0).length;
551
+ export function __wbg_now_64d0bb151e5d3889() {
552
+ const ret = Date.now();
647
553
  return ret;
648
554
  };
649
555
 
650
- export function __wbg_new_a220cf903aa02ca2() {
651
- const ret = new Array();
652
- return addHeapObject(ret);
556
+ export function __wbg_process_5c1d670bc53614b8(arg0) {
557
+ const ret = arg0.process;
558
+ return ret;
653
559
  };
654
560
 
655
- export function __wbindgen_is_function(arg0) {
656
- const ret = typeof(getObject(arg0)) === 'function';
561
+ export function __wbg_randomFillSync_ab2cfe79ebbf2740() { return handleError(function (arg0, arg1) {
562
+ arg0.randomFillSync(arg1);
563
+ }, arguments) };
564
+
565
+ export function __wbg_require_79b1e9274cde3c87() { return handleError(function () {
566
+ const ret = module.require;
657
567
  return ret;
658
- };
568
+ }, arguments) };
659
569
 
660
- export function __wbg_newnoargs_76313bd6ff35d0f2(arg0, arg1) {
661
- const ret = new Function(getStringFromWasm0(arg0, arg1));
662
- return addHeapObject(ret);
570
+ export function __wbg_set_1d80752d0d5f0b21(arg0, arg1, arg2) {
571
+ arg0[arg1 >>> 0] = arg2;
663
572
  };
664
573
 
665
- export function __wbg_new_8608a2b51a5f6737() {
666
- const ret = new Map();
667
- return addHeapObject(ret);
574
+ export function __wbg_set_23d69db4e5c66a6e(arg0, arg1, arg2) {
575
+ arg0.set(arg1, arg2 >>> 0);
668
576
  };
669
577
 
670
- export function __wbg_next_de3e9db4440638b2(arg0) {
671
- const ret = getObject(arg0).next;
672
- return addHeapObject(ret);
578
+ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
579
+ arg0[arg1] = arg2;
673
580
  };
674
581
 
675
- export function __wbg_next_f9cb570345655b9a() { return handleError(function (arg0) {
676
- const ret = getObject(arg0).next();
677
- return addHeapObject(ret);
678
- }, arguments) };
679
-
680
- export function __wbg_done_bfda7aa8f252b39f(arg0) {
681
- const ret = getObject(arg0).done;
582
+ export function __wbg_set_76818dc3c59a63d5(arg0, arg1, arg2) {
583
+ const ret = arg0.set(arg1, arg2);
682
584
  return ret;
683
585
  };
684
586
 
685
- export function __wbg_value_6d39332ab4788d86(arg0) {
686
- const ret = getObject(arg0).value;
687
- return addHeapObject(ret);
587
+ export function __wbg_static_accessor_GLOBAL_0be7472e492ad3e3() {
588
+ const ret = typeof global === 'undefined' ? null : global;
589
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
688
590
  };
689
591
 
690
- export function __wbg_iterator_888179a48810a9fe() {
691
- const ret = Symbol.iterator;
692
- return addHeapObject(ret);
592
+ export function __wbg_static_accessor_GLOBAL_THIS_1a6eb482d12c9bfb() {
593
+ const ret = typeof globalThis === 'undefined' ? null : globalThis;
594
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
693
595
  };
694
596
 
695
- export function __wbg_get_224d16597dbbfd96() { return handleError(function (arg0, arg1) {
696
- const ret = Reflect.get(getObject(arg0), getObject(arg1));
697
- return addHeapObject(ret);
698
- }, arguments) };
699
-
700
- export function __wbg_call_1084a111329e68ce() { return handleError(function (arg0, arg1) {
701
- const ret = getObject(arg0).call(getObject(arg1));
702
- return addHeapObject(ret);
703
- }, arguments) };
704
-
705
- export function __wbg_new_525245e2b9901204() {
706
- const ret = new Object();
707
- return addHeapObject(ret);
597
+ export function __wbg_static_accessor_SELF_1dc398a895c82351() {
598
+ const ret = typeof self === 'undefined' ? null : self;
599
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
708
600
  };
709
601
 
710
- export function __wbg_self_3093d5d1f7bcb682() { return handleError(function () {
711
- const ret = self.self;
712
- return addHeapObject(ret);
713
- }, arguments) };
602
+ export function __wbg_static_accessor_WINDOW_ae1c80c7eea8d64a() {
603
+ const ret = typeof window === 'undefined' ? null : window;
604
+ return isLikeNone(ret) ? 0 : addToExternrefTable0(ret);
605
+ };
714
606
 
715
- export function __wbg_window_3bcfc4d31bc012f8() { return handleError(function () {
716
- const ret = window.window;
717
- return addHeapObject(ret);
718
- }, arguments) };
607
+ export function __wbg_subarray_46adeb9b86949d12(arg0, arg1, arg2) {
608
+ const ret = arg0.subarray(arg1 >>> 0, arg2 >>> 0);
609
+ return ret;
610
+ };
719
611
 
720
- export function __wbg_globalThis_86b222e13bdf32ed() { return handleError(function () {
721
- const ret = globalThis.globalThis;
722
- return addHeapObject(ret);
723
- }, arguments) };
612
+ export function __wbg_value_4c32fd138a88eee2(arg0) {
613
+ const ret = arg0.value;
614
+ return ret;
615
+ };
724
616
 
725
- export function __wbg_global_e5a3fe56f8be9485() { return handleError(function () {
726
- const ret = global.global;
727
- return addHeapObject(ret);
728
- }, arguments) };
617
+ export function __wbg_versions_c71aa1626a93e0a1(arg0) {
618
+ const ret = arg0.versions;
619
+ return ret;
620
+ };
729
621
 
730
- export function __wbg_set_673dda6c73d19609(arg0, arg1, arg2) {
731
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
622
+ export function __wbindgen_as_number(arg0) {
623
+ const ret = +arg0;
624
+ return ret;
732
625
  };
733
626
 
734
- export function __wbg_isArray_8364a5371e9737d8(arg0) {
735
- const ret = Array.isArray(getObject(arg0));
627
+ export function __wbindgen_bigint_from_i64(arg0) {
628
+ const ret = arg0;
736
629
  return ret;
737
630
  };
738
631
 
739
- export function __wbg_instanceof_ArrayBuffer_61dfc3198373c902(arg0) {
740
- let result;
741
- try {
742
- result = getObject(arg0) instanceof ArrayBuffer;
743
- } catch (_) {
744
- result = false;
745
- }
746
- const ret = result;
632
+ export function __wbindgen_bigint_from_u64(arg0) {
633
+ const ret = BigInt.asUintN(64, arg0);
747
634
  return ret;
748
635
  };
749
636
 
750
- export function __wbg_call_89af060b4e1523f2() { return handleError(function (arg0, arg1, arg2) {
751
- const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));
752
- return addHeapObject(ret);
753
- }, arguments) };
637
+ export function __wbindgen_bigint_get_as_i64(arg0, arg1) {
638
+ const v = arg1;
639
+ const ret = typeof(v) === 'bigint' ? v : undefined;
640
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
641
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
642
+ };
754
643
 
755
- export function __wbg_set_49185437f0ab06f8(arg0, arg1, arg2) {
756
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
757
- return addHeapObject(ret);
644
+ export function __wbindgen_boolean_get(arg0) {
645
+ const v = arg0;
646
+ const ret = typeof(v) === 'boolean' ? (v ? 1 : 0) : 2;
647
+ return ret;
758
648
  };
759
649
 
760
- export function __wbg_isSafeInteger_7f1ed56200d90674(arg0) {
761
- const ret = Number.isSafeInteger(getObject(arg0));
650
+ export function __wbindgen_debug_string(arg0, arg1) {
651
+ const ret = debugString(arg1);
652
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
653
+ const len1 = WASM_VECTOR_LEN;
654
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
655
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
656
+ };
657
+
658
+ export function __wbindgen_error_new(arg0, arg1) {
659
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
762
660
  return ret;
763
661
  };
764
662
 
765
- export function __wbg_now_b7a162010a9e75b4() {
766
- const ret = Date.now();
663
+ export function __wbindgen_in(arg0, arg1) {
664
+ const ret = arg0 in arg1;
767
665
  return ret;
768
666
  };
769
667
 
770
- export function __wbg_entries_7a0e06255456ebcd(arg0) {
771
- const ret = Object.entries(getObject(arg0));
772
- return addHeapObject(ret);
668
+ export function __wbindgen_init_externref_table() {
669
+ const table = wasm.__wbindgen_export_4;
670
+ const offset = table.grow(4);
671
+ table.set(0, undefined);
672
+ table.set(offset + 0, undefined);
673
+ table.set(offset + 1, null);
674
+ table.set(offset + 2, true);
675
+ table.set(offset + 3, false);
676
+ ;
773
677
  };
774
678
 
775
- export function __wbg_buffer_b7b08af79b0b0974(arg0) {
776
- const ret = getObject(arg0).buffer;
777
- return addHeapObject(ret);
679
+ export function __wbindgen_is_bigint(arg0) {
680
+ const ret = typeof(arg0) === 'bigint';
681
+ return ret;
778
682
  };
779
683
 
780
- export function __wbg_newwithbyteoffsetandlength_8a2cb9ca96b27ec9(arg0, arg1, arg2) {
781
- const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
782
- return addHeapObject(ret);
684
+ export function __wbindgen_is_function(arg0) {
685
+ const ret = typeof(arg0) === 'function';
686
+ return ret;
783
687
  };
784
688
 
785
- export function __wbg_new_ea1883e1e5e86686(arg0) {
786
- const ret = new Uint8Array(getObject(arg0));
787
- return addHeapObject(ret);
689
+ export function __wbindgen_is_object(arg0) {
690
+ const val = arg0;
691
+ const ret = typeof(val) === 'object' && val !== null;
692
+ return ret;
788
693
  };
789
694
 
790
- export function __wbg_set_d1e79e2388520f18(arg0, arg1, arg2) {
791
- getObject(arg0).set(getObject(arg1), arg2 >>> 0);
695
+ export function __wbindgen_is_string(arg0) {
696
+ const ret = typeof(arg0) === 'string';
697
+ return ret;
792
698
  };
793
699
 
794
- export function __wbg_length_8339fcf5d8ecd12e(arg0) {
795
- const ret = getObject(arg0).length;
700
+ export function __wbindgen_is_undefined(arg0) {
701
+ const ret = arg0 === undefined;
796
702
  return ret;
797
703
  };
798
704
 
799
- export function __wbg_instanceof_Uint8Array_247a91427532499e(arg0) {
800
- let result;
801
- try {
802
- result = getObject(arg0) instanceof Uint8Array;
803
- } catch (_) {
804
- result = false;
805
- }
806
- const ret = result;
705
+ export function __wbindgen_jsval_eq(arg0, arg1) {
706
+ const ret = arg0 === arg1;
807
707
  return ret;
808
708
  };
809
709
 
810
- export function __wbg_newwithlength_ec548f448387c968(arg0) {
811
- const ret = new Uint8Array(arg0 >>> 0);
812
- return addHeapObject(ret);
710
+ export function __wbindgen_jsval_loose_eq(arg0, arg1) {
711
+ const ret = arg0 == arg1;
712
+ return ret;
813
713
  };
814
714
 
815
- export function __wbg_subarray_7c2e3576afe181d1(arg0, arg1, arg2) {
816
- const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
817
- return addHeapObject(ret);
715
+ export function __wbindgen_memory() {
716
+ const ret = wasm.memory;
717
+ return ret;
818
718
  };
819
719
 
820
- export function __wbindgen_bigint_get_as_i64(arg0, arg1) {
821
- const v = getObject(arg1);
822
- const ret = typeof(v) === 'bigint' ? v : undefined;
823
- getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
720
+ export function __wbindgen_number_get(arg0, arg1) {
721
+ const obj = arg1;
722
+ const ret = typeof(obj) === 'number' ? obj : undefined;
723
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
824
724
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
825
725
  };
826
726
 
827
- export function __wbindgen_debug_string(arg0, arg1) {
828
- const ret = debugString(getObject(arg1));
829
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
830
- const len1 = WASM_VECTOR_LEN;
727
+ export function __wbindgen_number_new(arg0) {
728
+ const ret = arg0;
729
+ return ret;
730
+ };
731
+
732
+ export function __wbindgen_string_get(arg0, arg1) {
733
+ const obj = arg1;
734
+ const ret = typeof(obj) === 'string' ? obj : undefined;
735
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
736
+ var len1 = WASM_VECTOR_LEN;
831
737
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
832
738
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
833
739
  };
834
740
 
835
- export function __wbindgen_throw(arg0, arg1) {
836
- throw new Error(getStringFromWasm0(arg0, arg1));
741
+ export function __wbindgen_string_new(arg0, arg1) {
742
+ const ret = getStringFromWasm0(arg0, arg1);
743
+ return ret;
837
744
  };
838
745
 
839
- export function __wbindgen_memory() {
840
- const ret = wasm.memory;
841
- return addHeapObject(ret);
746
+ export function __wbindgen_throw(arg0, arg1) {
747
+ throw new Error(getStringFromWasm0(arg0, arg1));
842
748
  };
843
749
 
package/ferrostar_bg.wasm CHANGED
Binary file
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "Luke Seelenbinder <luke@stadiamaps.com>"
8
8
  ],
9
9
  "description": "The core of modern turn-by-turn navigation.",
10
- "version": "0.23.0",
10
+ "version": "0.25.0",
11
11
  "license": "BSD-3-Clause",
12
12
  "repository": {
13
13
  "type": "git",