@mappedin/mappedin-js 6.0.1-beta.17 → 6.0.1-beta.19

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.
@@ -1 +1 @@
1
- import{M as B,N as y,q as w,r as x,s as b}from"./chunk-5T2PAGNC.js";import{a as g,j as A}from"./chunk-OANQFXHV.js";A();function R(o,l=!1){let r=o[0].index!==null,f=new Set(Object.keys(o[0].attributes)),i=new Set(Object.keys(o[0].morphAttributes)),c={},e={},h=o[0].morphTargetsRelative,u=new y,d=0;for(let t=0;t<o.length;++t){let s=o[t],a=0;if(r!==(s.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(let n in s.attributes){if(!f.has(n))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+'. All geometries must have compatible attributes; make sure "'+n+'" attribute exists among all geometries, or in none of them.'),null;c[n]===void 0&&(c[n]=[]),c[n].push(s.attributes[n]),a++}if(a!==f.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". Make sure all geometries have the same number of attributes."),null;if(h!==s.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(let n in s.morphAttributes){if(!i.has(n))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". .morphAttributes must be consistent throughout all geometries."),null;e[n]===void 0&&(e[n]=[]),e[n].push(s.morphAttributes[n])}if(l){let n;if(r)n=s.index.count;else if(s.attributes.position!==void 0)n=s.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". The geometry must have either an index or a position attribute"),null;u.addGroup(d,n,t),d+=n}}if(r){let t=0,s=[];for(let a=0;a<o.length;++a){let n=o[a].index;for(let m=0;m<n.count;++m)s.push(n.getX(m)+t);t+=o[a].attributes.position.count}u.setIndex(s)}for(let t in c){let s=T(c[t]);if(!s)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+t+" attribute."),null;u.setAttribute(t,s)}for(let t in e){let s=e[t][0].length;if(s===0)break;u.morphAttributes=u.morphAttributes||{},u.morphAttributes[t]=[];for(let a=0;a<s;++a){let n=[];for(let p=0;p<e[t].length;++p)n.push(e[t][p][a]);let m=T(n);if(!m)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+t+" morphAttribute."),null;u.morphAttributes[t].push(m)}}return u}g(R,"mergeGeometries");function T(o){let l,r,f,i=-1,c=0;for(let d=0;d<o.length;++d){let t=o[d];if(l===void 0&&(l=t.array.constructor),l!==t.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(r===void 0&&(r=t.itemSize),r!==t.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(f===void 0&&(f=t.normalized),f!==t.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(i===-1&&(i=t.gpuType),i!==t.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;c+=t.count*r}let e=new l(c),h=new B(e,r,f),u=0;for(let d=0;d<o.length;++d){let t=o[d];if(t.isInterleavedBufferAttribute){let s=u/r;for(let a=0,n=t.count;a<n;a++)for(let m=0;m<r;m++){let p=t.getComponent(a,m);h.setComponent(a+s,m,p)}}else e.set(t.array,u);u+=t.count*r}return i!==void 0&&(h.gpuType=i),h}g(T,"mergeAttributes");function X(o,l){if(l===w)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),o;if(l===b||l===x){let r=o.getIndex();if(r===null){let e=[],h=o.getAttribute("position");if(h!==void 0){for(let u=0;u<h.count;u++)e.push(u);o.setIndex(e),r=o.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),o}let f=r.count-2,i=[];if(l===b)for(let e=1;e<=f;e++)i.push(r.getX(0)),i.push(r.getX(e)),i.push(r.getX(e+1));else for(let e=0;e<f;e++)e%2===0?(i.push(r.getX(e)),i.push(r.getX(e+1)),i.push(r.getX(e+2))):(i.push(r.getX(e+2)),i.push(r.getX(e+1)),i.push(r.getX(e)));i.length/3!==f&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");let c=o.clone();return c.setIndex(i),c.clearGroups(),c}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",l),o}g(X,"toTrianglesDrawMode");export{R as a,X as b};
1
+ import{M as B,N as y,q as w,r as x,s as b}from"./chunk-VT2X5G75.js";import{a as g,j as A}from"./chunk-OQLRRFPP.js";A();function R(o,l=!1){let r=o[0].index!==null,f=new Set(Object.keys(o[0].attributes)),i=new Set(Object.keys(o[0].morphAttributes)),c={},e={},h=o[0].morphTargetsRelative,u=new y,d=0;for(let t=0;t<o.length;++t){let s=o[t],a=0;if(r!==(s.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(let n in s.attributes){if(!f.has(n))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+'. All geometries must have compatible attributes; make sure "'+n+'" attribute exists among all geometries, or in none of them.'),null;c[n]===void 0&&(c[n]=[]),c[n].push(s.attributes[n]),a++}if(a!==f.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". Make sure all geometries have the same number of attributes."),null;if(h!==s.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(let n in s.morphAttributes){if(!i.has(n))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". .morphAttributes must be consistent throughout all geometries."),null;e[n]===void 0&&(e[n]=[]),e[n].push(s.morphAttributes[n])}if(l){let n;if(r)n=s.index.count;else if(s.attributes.position!==void 0)n=s.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+t+". The geometry must have either an index or a position attribute"),null;u.addGroup(d,n,t),d+=n}}if(r){let t=0,s=[];for(let a=0;a<o.length;++a){let n=o[a].index;for(let m=0;m<n.count;++m)s.push(n.getX(m)+t);t+=o[a].attributes.position.count}u.setIndex(s)}for(let t in c){let s=T(c[t]);if(!s)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+t+" attribute."),null;u.setAttribute(t,s)}for(let t in e){let s=e[t][0].length;if(s===0)break;u.morphAttributes=u.morphAttributes||{},u.morphAttributes[t]=[];for(let a=0;a<s;++a){let n=[];for(let p=0;p<e[t].length;++p)n.push(e[t][p][a]);let m=T(n);if(!m)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+t+" morphAttribute."),null;u.morphAttributes[t].push(m)}}return u}g(R,"mergeGeometries");function T(o){let l,r,f,i=-1,c=0;for(let d=0;d<o.length;++d){let t=o[d];if(l===void 0&&(l=t.array.constructor),l!==t.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(r===void 0&&(r=t.itemSize),r!==t.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(f===void 0&&(f=t.normalized),f!==t.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(i===-1&&(i=t.gpuType),i!==t.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;c+=t.count*r}let e=new l(c),h=new B(e,r,f),u=0;for(let d=0;d<o.length;++d){let t=o[d];if(t.isInterleavedBufferAttribute){let s=u/r;for(let a=0,n=t.count;a<n;a++)for(let m=0;m<r;m++){let p=t.getComponent(a,m);h.setComponent(a+s,m,p)}}else e.set(t.array,u);u+=t.count*r}return i!==void 0&&(h.gpuType=i),h}g(T,"mergeAttributes");function X(o,l){if(l===w)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),o;if(l===b||l===x){let r=o.getIndex();if(r===null){let e=[],h=o.getAttribute("position");if(h!==void 0){for(let u=0;u<h.count;u++)e.push(u);o.setIndex(e),r=o.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),o}let f=r.count-2,i=[];if(l===b)for(let e=1;e<=f;e++)i.push(r.getX(0)),i.push(r.getX(e)),i.push(r.getX(e+1));else for(let e=0;e<f;e++)e%2===0?(i.push(r.getX(e)),i.push(r.getX(e+1)),i.push(r.getX(e+2))):(i.push(r.getX(e+2)),i.push(r.getX(e+1)),i.push(r.getX(e)));i.length/3!==f&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");let c=o.clone();return c.setIndex(i),c.clearGroups(),c}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",l),o}g(X,"toTrianglesDrawMode");export{R as a,X as b};
@@ -13,6 +13,7 @@
13
13
  // ../mappedin-js/three
14
14
  // ../mappedin-js/zod
15
15
  // ../mappedin-js/@packages/internal/shave-text/shave-text
16
+ // ../mappedin-js/@tweenjs/tween.js
16
17
  // ../mappedin-js/@turf/turf
17
18
  // ../mappedin-js/@packages/internal/quad-tree
18
19
  // ../mappedin-js/@packages/internal/outdoor-context-v4
@@ -20,7 +21,6 @@
20
21
  // ../mappedin-js/three/addons/loaders/GLTFLoader.js
21
22
  // ../mappedin-js/@mapbox/point-geometry
22
23
  // ../mappedin-js/@maplibre/maplibre-gl-style-spec
23
- // ../mappedin-js/@tweenjs/tween.js
24
24
  // ../mappedin-js/gl-matrix
25
25
  // ../mappedin-js/@mapbox/vector-tile
26
26
  // ../mappedin-js/potpack
@@ -2445,7 +2445,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/blue-dot/blue-
2445
2445
  */
2446
2446
  elevation?: number;
2447
2447
  /**
2448
- * @default POSITION_ANIMATION_DURATION
2448
+ * @default 1000
2449
2449
  */
2450
2450
  duration?: number;
2451
2451
  /**
@@ -2582,8 +2582,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-view-objects' {
2582
2582
 
2583
2583
  declare module '@mappedin/mappedin-js/mappedin-js/src/navigation' {
2584
2584
  import { type TDirectionInstruction } from '@mappedin/mappedin-js/mappedin-js/src';
2585
- import type { Directions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
2585
+ import type { Directions, GeoJsonApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
2586
2586
  import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
2587
+ import type { FloorStack } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
2587
2588
  import { Path, Marker } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
2588
2589
  import type { RendererCore } from '@mappedin/core-sdk';
2589
2590
  /**
@@ -2736,7 +2737,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/navigation' {
2736
2737
  /**
2737
2738
  * @internal
2738
2739
  */
2739
- constructor(core: RendererCore, currentMapGetter: CurrentMapGetter);
2740
+ constructor(core: RendererCore, geoJSONApi: GeoJsonApi, currentMapGetter: CurrentMapGetter);
2740
2741
  /**
2741
2742
  * @internal
2742
2743
  */
@@ -2763,6 +2764,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/navigation' {
2763
2764
  * The currently active path.
2764
2765
  */
2765
2766
  get activePath(): Path | undefined;
2767
+ /**
2768
+ * The current list of floor stacks along the navigation paths.
2769
+ */
2770
+ get floorStacks(): FloorStack[];
2766
2771
  /**
2767
2772
  * Sets the active path by index.
2768
2773
  */
@@ -5813,6 +5818,7 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
5813
5818
  import type { ImageState } from '@mappedin/mappedin-js/geojson/src/components/image';
5814
5819
  import type { ShapeState } from '@mappedin/mappedin-js/geojson/src/components/custom';
5815
5820
  import type { Geometry3D } from '@mappedin/mappedin-js/geojson/src/entities';
5821
+ import type { Group as TweenGroup } from '@tweenjs/tween.js';
5816
5822
  /**
5817
5823
  * The state of an entity, which can be a geometry, geometry group, group container, path, model, label, or marker.
5818
5824
  */
@@ -6098,6 +6104,8 @@ declare module '@mappedin/mappedin-js/geojson/src/types' {
6098
6104
  pixelRatio: number;
6099
6105
  canvasWidth: number;
6100
6106
  canvasHeight: number;
6107
+ /** Global group for all tweens */
6108
+ tweenGroup: TweenGroup;
6101
6109
  };
6102
6110
  }
6103
6111
 
@@ -6608,6 +6616,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
6608
6616
  import { MeshModificationSystem } from '@mappedin/mappedin-js/geojson/src/systems/mesh-modification/system';
6609
6617
  import { PreRenderSystem } from '@mappedin/mappedin-js/geojson/src/systems/pre-render/system';
6610
6618
  import { PolygonLabelSystem } from '@mappedin/mappedin-js/geojson/src/systems/polygon-label/system';
6619
+ import { Group as TweenGroup } from '@tweenjs/tween.js';
6611
6620
  export type * from '@mappedin/mappedin-js/geojson/src/types';
6612
6621
  export const raycaster: Raycaster;
6613
6622
  /**
@@ -6866,6 +6875,7 @@ declare module '@mappedin/mappedin-js/geojson/src/renderer' {
6866
6875
  * @internal for testing
6867
6876
  */
6868
6877
  getInternalState(): RendererState;
6878
+ getTweenGroup(): TweenGroup;
6869
6879
  /**
6870
6880
  * Subscribe a function to an event.
6871
6881
  *
@@ -6937,10 +6947,10 @@ declare module '@mappedin/mappedin-js/geojson/src/camera' {
6937
6947
  elevation?: number;
6938
6948
  };
6939
6949
  export const ANIMATION_TWEENS: {
6940
- linear: any;
6941
- 'ease-in': any;
6942
- 'ease-out': any;
6943
- 'ease-in-out': any;
6950
+ linear: (amount: number) => number;
6951
+ 'ease-in': (amount: number) => number;
6952
+ 'ease-out': (amount: number) => number;
6953
+ 'ease-in-out': (amount: number) => number;
6944
6954
  };
6945
6955
  export class Camera {
6946
6956
  #private;
@@ -6967,7 +6977,7 @@ declare module '@mappedin/mappedin-js/geojson/src/camera' {
6967
6977
  /**
6968
6978
  * Whether the camera is animating.
6969
6979
  */
6970
- get isAnimating(): any;
6980
+ get isAnimating(): boolean;
6971
6981
  /**
6972
6982
  * Cancel the last animation.
6973
6983
  */
@@ -8180,8 +8190,9 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/paths' {
8180
8190
 
8181
8191
  declare module '@mappedin/mappedin-js/mappedin-js/src/navigation/index' {
8182
8192
  import { type TDirectionInstruction } from '@mappedin/mappedin-js/mappedin-js/src';
8183
- import type { Directions } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
8193
+ import type { Directions, GeoJsonApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson';
8184
8194
  import type { GeojsonApiMapObject } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/map-object';
8195
+ import type { FloorStack } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
8185
8196
  import { Path, Marker } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
8186
8197
  import type { RendererCore } from '@mappedin/core-sdk';
8187
8198
  /**
@@ -8334,7 +8345,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/navigation/index' {
8334
8345
  /**
8335
8346
  * @internal
8336
8347
  */
8337
- constructor(core: RendererCore, currentMapGetter: CurrentMapGetter);
8348
+ constructor(core: RendererCore, geoJSONApi: GeoJsonApi, currentMapGetter: CurrentMapGetter);
8338
8349
  /**
8339
8350
  * @internal
8340
8351
  */
@@ -8361,6 +8372,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/navigation/index' {
8361
8372
  * The currently active path.
8362
8373
  */
8363
8374
  get activePath(): Path | undefined;
8375
+ /**
8376
+ * The current list of floor stacks along the navigation paths.
8377
+ */
8378
+ get floorStacks(): FloorStack[];
8364
8379
  /**
8365
8380
  * Sets the active path by index.
8366
8381
  */
@@ -10320,7 +10335,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils' {
10320
10335
  import type { TDoorsState, TMarkerState, TWallsState } from '@mappedin/mappedin-js/mappedin-js/src/types';
10321
10336
  import type { Image, Shape } from '@mappedin/mappedin-js/mappedin-js/src/map-view-objects';
10322
10337
  import type { GeoJsonApi } from '@mappedin/mappedin-js/mappedin-js/src/api-geojson/api';
10323
- import type TWEEN from '@tweenjs/tween.js';
10338
+ import type { Tween } from '@tweenjs/tween.js';
10324
10339
  export function convertCoordinateToPosition(coord: Coordinate): Position;
10325
10340
  export function convertPositionToCoordinate(coord: Position): Coordinate;
10326
10341
  export const cutEntrancesFromLineStrings: (lineStrings: ObstructionCollection["features"], entranceCollection: EntranceCollection["features"]) => {
@@ -10348,7 +10363,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/api-geojson/utils' {
10348
10363
  export function groupGeometryByStyle(features: Feature<LineString | Polygon | Point, SpaceProperties | ObstructionProperties>[], styleMap: AggregatedStyleMap): Map<WithId<PolygonStyle> | WithId<LineStringStyle> | WithId<PointStyle>, Feature<Point | LineString | Polygon, WithPolygonImage<SpaceProperties> | WithPolygonImage<ObstructionProperties>>[]>;
10349
10364
  export function translateToCoreStyle(style: PolygonStyle | LineStringStyle, userOptions?: TShow3DMapOptions): PaintStyle | LineStyle;
10350
10365
  export const getTargetID: <T extends Space | Shape | MapObject | Label | Marker | Model | Image | string>(target: T, api: GeoJsonApi) => string | undefined;
10351
- export function tweenToPromise(tween: TWEEN.Tween): Promise<void>;
10366
+ export function tweenToPromise(tween: Tween): Promise<void>;
10352
10367
  }
10353
10368
 
10354
10369
  declare module '@mappedin/mappedin-js/geojson/src/components/style' {
@@ -10808,7 +10823,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/camera/system' {
10808
10823
  * Returns true if the camera is currently animating.
10809
10824
  * @return {Boolean} True if the camera is animating, false otherwise.
10810
10825
  */
10811
- get isAnimating(): any;
10826
+ get isAnimating(): boolean;
10812
10827
  /**
10813
10828
  * Returns true if the camera is currently moving (it's animating, the user is manipulating it).
10814
10829
  *
@@ -11012,7 +11027,6 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/camera/types' {
11012
11027
  import type { Vector2, Vector3 } from 'three';
11013
11028
  import type { TouchAnchor, InputSet } from '@mappedin/mappedin-js/geojson/src/systems/camera/helpers';
11014
11029
  import type { InsetPadding, RendererCore } from '@mappedin/mappedin-js/geojson/src';
11015
- import type { Easing } from '@tweenjs/tween.js';
11016
11030
  type AnimateCameraTarget = {
11017
11031
  position?: {
11018
11032
  x?: number;
@@ -11119,7 +11133,7 @@ declare module '@mappedin/mappedin-js/geojson/src/systems/camera/types' {
11119
11133
  /**
11120
11134
  * The animation curve to use for zooming in. Uses the animateCamera one by default.
11121
11135
  */
11122
- curve?: typeof Easing;
11136
+ curve?: (n: number) => number;
11123
11137
  /**
11124
11138
  * Camera tilt between 0 (top-down) to 1 (from the side)
11125
11139
  */
package/lib/esm/index.js CHANGED
@@ -1 +1 @@
1
- import{B as w,C as x,D as y,E as z,F as A,G as B,H as C,I as D,a,b,e as c,f as d,g as e,h as f,i as g,j as h,k as i,l as j,m as k,n as l,o as m,p as n,q as o,r as p,s as q,t as r,u as s,x as t,y as u,z as v}from"./chunk-G65VB656.js";import"./chunk-KUVUAM5C.js";import"./chunk-S5HIMMDM.js";import"./chunk-5T2PAGNC.js";import"./chunk-OANQFXHV.js";export{m as Annotation,i as Connection,c as Coordinate,u as DOORS,f as Door,a as E_SDK_LOG_LEVEL,p as EnterpriseCategory,o as EnterpriseLocation,q as EnterpriseVenue,h as Floor,n as FloorStack,d as Hyperlink,k as ImageData,j as MapObject,e as Node,l as PointOfInterest,g as Space,t as WALLS,B as createMapLibreOverlay,v as enableTestMode,z as getMapData,A as getMapDataEnterprise,y as hydrateMapData,w as hydrateMapDataFromMVF,r as parseMVF,b as setLoggerLevel,x as setUseEnterpriseAPI,D as show3dMap,C as show3dMapGeojson,s as unzipMVF};
1
+ import{B as w,C as x,D as y,E as z,F as A,G as B,H as C,I as D,a,b,e as c,f as d,g as e,h as f,i as g,j as h,k as i,l as j,m as k,n as l,o as m,p as n,q as o,r as p,s as q,t as r,u as s,x as t,y as u,z as v}from"./chunk-KMFATDBF.js";import"./chunk-QQ53JNBN.js";import"./chunk-Z7MNFX3S.js";import"./chunk-VT2X5G75.js";import"./chunk-OQLRRFPP.js";export{m as Annotation,i as Connection,c as Coordinate,u as DOORS,f as Door,a as E_SDK_LOG_LEVEL,p as EnterpriseCategory,o as EnterpriseLocation,q as EnterpriseVenue,h as Floor,n as FloorStack,d as Hyperlink,k as ImageData,j as MapObject,e as Node,l as PointOfInterest,g as Space,t as WALLS,B as createMapLibreOverlay,v as enableTestMode,z as getMapData,A as getMapDataEnterprise,y as hydrateMapData,w as hydrateMapDataFromMVF,r as parseMVF,b as setLoggerLevel,x as setUseEnterpriseAPI,D as show3dMap,C as show3dMapGeojson,s as unzipMVF};
@@ -1 +1 @@
1
- import{A as ue,d as I,e as ce,i as H,q as M,r as P}from"./chunk-G65VB656.js";import"./chunk-KUVUAM5C.js";import"./chunk-S5HIMMDM.js";import{J as he}from"./chunk-5T2PAGNC.js";import{a as d,e as L,j as C}from"./chunk-OANQFXHV.js";C();C();C();C();var S=class S{constructor(e,i,t,o,l="div"){this.parent=e,this.object=i,this.property=t,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(l),this.domElement.classList.add("controller"),this.domElement.classList.add(o),this.$name=document.createElement("div"),this.$name.classList.add("name"),S.nextNameID=S.nextNameID||0,this.$name.id="lil-gui-name-".concat(++S.nextNameID),this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",r=>r.stopPropagation()),this.domElement.addEventListener("keyup",r=>r.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(t)}name(e){return this._name=e,this.$name.textContent=e,this}onChange(e){return this._onChange=e,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(e=!0){return this.disable(!e)}disable(e=!0){return e===this._disabled?this:(this._disabled=e,this.domElement.classList.toggle("disabled",e),this.$disable.toggleAttribute("disabled",e),this)}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(e){let i=this.parent.add(this.object,this.property,e);return i.name(this._name),this.destroy(),i}min(e){return this}max(e){return this}step(e){return this}decimals(e){return this}listen(e=!0){return this._listening=e,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);let e=this.save();e!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=e}getValue(){return this.object[this.property]}setValue(e){return this.getValue()!==e&&(this.object[this.property]=e,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(e){return this.setValue(e),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}};d(S,"Controller");var k=S,K=class K extends k{constructor(e,i,t){super(e,i,t,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}};d(K,"BooleanController");var V=K;function Y(n){let e,i;return(e=n.match(/(#|0x)?([a-f0-9]{6})/i))?i=e[2]:(e=n.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?i=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=n.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),i?"#"+i:!1}d(Y,"normalizeColorString");var ke={isPrimitive:!0,match:n=>typeof n=="string",fromHexString:Y,toHexString:Y},T={isPrimitive:!0,match:n=>typeof n=="number",fromHexString:n=>parseInt(n.substring(1),16),toHexString:n=>"#"+n.toString(16).padStart(6,0)},$e={isPrimitive:!1,match:n=>Array.isArray(n),fromHexString(n,e,i=1){let t=T.fromHexString(n);e[0]=(t>>16&255)/255*i,e[1]=(t>>8&255)/255*i,e[2]=(t&255)/255*i},toHexString([n,e,i],t=1){t=255/t;let o=n*t<<16^e*t<<8^i*t<<0;return T.toHexString(o)}},Le={isPrimitive:!1,match:n=>Object(n)===n,fromHexString(n,e,i=1){let t=T.fromHexString(n);e.r=(t>>16&255)/255*i,e.g=(t>>8&255)/255*i,e.b=(t&255)/255*i},toHexString({r:n,g:e,b:i},t=1){t=255/t;let o=n*t<<16^e*t<<8^i*t<<0;return T.toHexString(o)}},Me=[ke,T,$e,Le];function Se(n){return Me.find(e=>e.match(n))}d(Se,"getColorFormat");var Z=class Z extends k{constructor(e,i,t,o){super(e,i,t,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=Se(this.initialValue),this._rgbScale=o,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{let l=Y(this.$text.value);l&&this._setValueFromHexString(l)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(e){if(this._format.isPrimitive){let i=this._format.fromHexString(e);this.setValue(i)}else this._format.fromHexString(e,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(e){return this._setValueFromHexString(e),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}};d(Z,"ColorController");var N=Z,Q=class Q extends k{constructor(e,i,t){super(e,i,t,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",o=>{o.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}};d(Q,"FunctionController");var D=Q,q=class q extends k{constructor(e,i,t,o,l,r){super(e,i,t,"number"),this._initInput(),this.min(o),this.max(l);let s=r!==void 0;this.step(s?r:this._getImplicitStep(),s),this.updateDisplay()}decimals(e){return this._decimals=e,this.updateDisplay(),this}min(e){return this._min=e,this._onUpdateMinMax(),this}max(e){return this._max=e,this._onUpdateMinMax(),this}step(e,i=!0){return this._step=e,this._stepExplicit=i,this}updateDisplay(){let e=this.getValue();if(this._hasSlider){let i=(e-this._min)/(this._max-this._min);i=Math.max(0,Math.min(i,1)),this.$fill.style.width=i*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?e:e.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;let i=d(()=>{let v=parseFloat(this.$input.value);isNaN(v)||(this._stepExplicit&&(v=this._snap(v)),this.setValue(this._clamp(v)))},"onInput"),t=d(v=>{let A=parseFloat(this.$input.value);isNaN(A)||(this._snapClampSetValue(A+v),this.$input.value=this.getValue())},"increment"),o=d(v=>{v.key==="Enter"&&this.$input.blur(),v.code==="ArrowUp"&&(v.preventDefault(),t(this._step*this._arrowKeyMultiplier(v))),v.code==="ArrowDown"&&(v.preventDefault(),t(this._step*this._arrowKeyMultiplier(v)*-1))},"onKeyDown"),l=d(v=>{this._inputFocused&&(v.preventDefault(),t(this._step*this._normalizeMouseWheel(v)))},"onWheel"),r=!1,s,c,p,h,a,g=5,f=d(v=>{s=v.clientX,c=p=v.clientY,r=!0,h=this.getValue(),a=0,window.addEventListener("mousemove",u),window.addEventListener("mouseup",b)},"onMouseDown"),u=d(v=>{if(r){let A=v.clientX-s,$=v.clientY-c;Math.abs($)>g?(v.preventDefault(),this.$input.blur(),r=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(A)>g&&b()}if(!r){let A=v.clientY-p;a-=A*this._step*this._arrowKeyMultiplier(v),h+a>this._max?a=this._max-h:h+a<this._min&&(a=this._min-h),this._snapClampSetValue(h+a)}p=v.clientY},"onMouseMove"),b=d(()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",b)},"onMouseUp"),y=d(()=>{this._inputFocused=!0},"onFocus"),m=d(()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()},"onBlur");this.$input.addEventListener("input",i),this.$input.addEventListener("keydown",o),this.$input.addEventListener("wheel",l,{passive:!1}),this.$input.addEventListener("mousedown",f),this.$input.addEventListener("focus",y),this.$input.addEventListener("blur",m)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");let e=d((m,v,A,$,z)=>(m-v)/(A-v)*(z-$)+$,"map"),i=d(m=>{let v=this.$slider.getBoundingClientRect(),A=e(m,v.left,v.right,this._min,this._max);this._snapClampSetValue(A)},"setValueFromX"),t=d(m=>{this._setDraggingStyle(!0),i(m.clientX),window.addEventListener("mousemove",o),window.addEventListener("mouseup",l)},"mouseDown"),o=d(m=>{i(m.clientX)},"mouseMove"),l=d(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",o),window.removeEventListener("mouseup",l)},"mouseUp"),r=!1,s,c,p=d(m=>{m.preventDefault(),this._setDraggingStyle(!0),i(m.touches[0].clientX),r=!1},"beginTouchDrag"),h=d(m=>{m.touches.length>1||(this._hasScrollBar?(s=m.touches[0].clientX,c=m.touches[0].clientY,r=!0):p(m),window.addEventListener("touchmove",a,{passive:!1}),window.addEventListener("touchend",g))},"onTouchStart"),a=d(m=>{if(r){let v=m.touches[0].clientX-s,A=m.touches[0].clientY-c;Math.abs(v)>Math.abs(A)?p(m):(window.removeEventListener("touchmove",a),window.removeEventListener("touchend",g))}else m.preventDefault(),i(m.touches[0].clientX)},"onTouchMove"),g=d(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",a),window.removeEventListener("touchend",g)},"onTouchEnd"),f=this._callOnFinishChange.bind(this),u=400,b,y=d(m=>{if(Math.abs(m.deltaX)<Math.abs(m.deltaY)&&this._hasScrollBar)return;m.preventDefault();let A=this._normalizeMouseWheel(m)*this._step;this._snapClampSetValue(this.getValue()+A),this.$input.value=this.getValue(),clearTimeout(b),b=setTimeout(f,u)},"onWheel");this.$slider.addEventListener("mousedown",t),this.$slider.addEventListener("touchstart",h,{passive:!1}),this.$slider.addEventListener("wheel",y,{passive:!1})}_setDraggingStyle(e,i="horizontal"){this.$slider&&this.$slider.classList.toggle("active",e),document.body.classList.toggle("lil-gui-dragging",e),document.body.classList.toggle("lil-gui-".concat(i),e)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(e){let{deltaX:i,deltaY:t}=e;return Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(i=0,t=-e.wheelDelta/120,t*=this._stepExplicit?1:10),i+-t}_arrowKeyMultiplier(e){let i=this._stepExplicit?1:10;return e.shiftKey?i*=10:e.altKey&&(i/=10),i}_snap(e){let i=Math.round(e/this._step)*this._step;return parseFloat(i.toPrecision(15))}_clamp(e){return e<this._min&&(e=this._min),e>this._max&&(e=this._max),e}_snapClampSetValue(e){this.setValue(this._clamp(this._snap(e)))}get _hasScrollBar(){let e=this.parent.root.$children;return e.scrollHeight>e.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}};d(q,"NumberController");var R=q,ee=class ee extends k{constructor(e,i,t,o){super(e,i,t,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(o)}options(e){return this._values=Array.isArray(e)?e:Object.values(e),this._names=Array.isArray(e)?e:Object.keys(e),this.$select.replaceChildren(),this._names.forEach(i=>{let t=document.createElement("option");t.textContent=i,this.$select.appendChild(t)}),this.updateDisplay(),this}updateDisplay(){let e=this.getValue(),i=this._values.indexOf(e);return this.$select.selectedIndex=i,this.$display.textContent=i===-1?e:this._names[i],this}};d(ee,"OptionController");var J=ee,te=class te extends k{constructor(e,i,t){super(e,i,t,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",o=>{o.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}};d(te,"StringController");var W=te,Fe='.lil-gui {\n font-family: var(--font-family);\n font-size: var(--font-size);\n line-height: 1;\n font-weight: normal;\n font-style: normal;\n text-align: left;\n color: var(--text-color);\n user-select: none;\n -webkit-user-select: none;\n touch-action: manipulation;\n --background-color: #1f1f1f;\n --text-color: #ebebeb;\n --title-background-color: #111111;\n --title-text-color: #ebebeb;\n --widget-color: #424242;\n --hover-color: #4f4f4f;\n --focus-color: #595959;\n --number-color: #2cc9ff;\n --string-color: #a2db3c;\n --font-size: 11px;\n --input-font-size: 11px;\n --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;\n --font-family-mono: Menlo, Monaco, Consolas, "Droid Sans Mono", monospace;\n --padding: 4px;\n --spacing: 4px;\n --widget-height: 20px;\n --title-height: calc(var(--widget-height) + var(--spacing) * 1.25);\n --name-width: 45%;\n --slider-knob-width: 2px;\n --slider-input-width: 27%;\n --color-input-width: 27%;\n --slider-input-min-width: 45px;\n --color-input-min-width: 45px;\n --folder-indent: 7px;\n --widget-padding: 0 0 0 3px;\n --widget-border-radius: 2px;\n --checkbox-size: calc(0.75 * var(--widget-height));\n --scrollbar-width: 5px;\n}\n.lil-gui, .lil-gui * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n.lil-gui.root {\n width: var(--width, 245px);\n display: flex;\n flex-direction: column;\n background: var(--background-color);\n}\n.lil-gui.root > .title {\n background: var(--title-background-color);\n color: var(--title-text-color);\n}\n.lil-gui.root > .children {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.lil-gui.root > .children::-webkit-scrollbar {\n width: var(--scrollbar-width);\n height: var(--scrollbar-width);\n background: var(--background-color);\n}\n.lil-gui.root > .children::-webkit-scrollbar-thumb {\n border-radius: var(--scrollbar-width);\n background: var(--focus-color);\n}\n@media (pointer: coarse) {\n .lil-gui.allow-touch-styles, .lil-gui.allow-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n }\n}\n.lil-gui.force-touch-styles, .lil-gui.force-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n}\n.lil-gui.autoPlace {\n max-height: 100%;\n position: fixed;\n top: 0;\n right: 15px;\n z-index: 1001;\n}\n\n.lil-gui .controller {\n display: flex;\n align-items: center;\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n}\n.lil-gui .controller.disabled {\n opacity: 0.5;\n}\n.lil-gui .controller.disabled, .lil-gui .controller.disabled * {\n pointer-events: none !important;\n}\n.lil-gui .controller > .name {\n min-width: var(--name-width);\n flex-shrink: 0;\n white-space: pre;\n padding-right: var(--spacing);\n line-height: var(--widget-height);\n}\n.lil-gui .controller .widget {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n min-height: var(--widget-height);\n}\n.lil-gui .controller.string input {\n color: var(--string-color);\n}\n.lil-gui .controller.boolean {\n cursor: pointer;\n}\n.lil-gui .controller.color .display {\n width: 100%;\n height: var(--widget-height);\n border-radius: var(--widget-border-radius);\n position: relative;\n}\n@media (hover: hover) {\n .lil-gui .controller.color .display:hover:before {\n content: " ";\n display: block;\n position: absolute;\n border-radius: var(--widget-border-radius);\n border: 1px solid #fff9;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n}\n.lil-gui .controller.color input[type=color] {\n opacity: 0;\n width: 100%;\n height: 100%;\n cursor: pointer;\n}\n.lil-gui .controller.color input[type=text] {\n margin-left: var(--spacing);\n font-family: var(--font-family-mono);\n min-width: var(--color-input-min-width);\n width: var(--color-input-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.option select {\n opacity: 0;\n position: absolute;\n width: 100%;\n max-width: 100%;\n}\n.lil-gui .controller.option .display {\n position: relative;\n pointer-events: none;\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n line-height: var(--widget-height);\n max-width: 100%;\n overflow: hidden;\n word-break: break-all;\n padding-left: 0.55em;\n padding-right: 1.75em;\n background: var(--widget-color);\n}\n@media (hover: hover) {\n .lil-gui .controller.option .display.focus {\n background: var(--focus-color);\n }\n}\n.lil-gui .controller.option .display.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.option .display:after {\n font-family: "lil-gui";\n content: "\u2195";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n padding-right: 0.375em;\n}\n.lil-gui .controller.option .widget,\n.lil-gui .controller.option select {\n cursor: pointer;\n}\n@media (hover: hover) {\n .lil-gui .controller.option .widget:hover .display {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number input {\n color: var(--number-color);\n}\n.lil-gui .controller.number.hasSlider input {\n margin-left: var(--spacing);\n width: var(--slider-input-width);\n min-width: var(--slider-input-min-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.number .slider {\n width: 100%;\n height: var(--widget-height);\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n padding-right: var(--slider-knob-width);\n overflow: hidden;\n cursor: ew-resize;\n touch-action: pan-y;\n}\n@media (hover: hover) {\n .lil-gui .controller.number .slider:hover {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number .slider.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.number .slider.active .fill {\n opacity: 0.95;\n}\n.lil-gui .controller.number .fill {\n height: 100%;\n border-right: var(--slider-knob-width) solid var(--number-color);\n box-sizing: content-box;\n}\n\n.lil-gui-dragging .lil-gui {\n --hover-color: var(--widget-color);\n}\n.lil-gui-dragging * {\n cursor: ew-resize !important;\n}\n\n.lil-gui-dragging.lil-gui-vertical * {\n cursor: ns-resize !important;\n}\n\n.lil-gui .title {\n height: var(--title-height);\n line-height: calc(var(--title-height) - 4px);\n font-weight: 600;\n padding: 0 var(--padding);\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n outline: none;\n text-decoration-skip: objects;\n}\n.lil-gui .title:before {\n font-family: "lil-gui";\n content: "\u25BE";\n padding-right: 2px;\n display: inline-block;\n}\n.lil-gui .title:active {\n background: var(--title-background-color);\n opacity: 0.75;\n}\n@media (hover: hover) {\n body:not(.lil-gui-dragging) .lil-gui .title:hover {\n background: var(--title-background-color);\n opacity: 0.85;\n }\n .lil-gui .title:focus {\n text-decoration: underline var(--focus-color);\n }\n}\n.lil-gui.root > .title:focus {\n text-decoration: none !important;\n}\n.lil-gui.closed > .title:before {\n content: "\u25B8";\n}\n.lil-gui.closed > .children {\n transform: translateY(-7px);\n opacity: 0;\n}\n.lil-gui.closed:not(.transition) > .children {\n display: none;\n}\n.lil-gui.transition > .children {\n transition-duration: 300ms;\n transition-property: height, opacity, transform;\n transition-timing-function: cubic-bezier(0.2, 0.6, 0.35, 1);\n overflow: hidden;\n pointer-events: none;\n}\n.lil-gui .children:empty:before {\n content: "Empty";\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n display: block;\n height: var(--widget-height);\n font-style: italic;\n line-height: var(--widget-height);\n opacity: 0.5;\n}\n.lil-gui.root > .children > .lil-gui > .title {\n border: 0 solid var(--widget-color);\n border-width: 1px 0;\n transition: border-color 300ms;\n}\n.lil-gui.root > .children > .lil-gui.closed > .title {\n border-bottom-color: transparent;\n}\n.lil-gui + .controller {\n border-top: 1px solid var(--widget-color);\n margin-top: 0;\n padding-top: var(--spacing);\n}\n.lil-gui .lil-gui .lil-gui > .title {\n border: none;\n}\n.lil-gui .lil-gui .lil-gui > .children {\n border: none;\n margin-left: var(--folder-indent);\n border-left: 2px solid var(--widget-color);\n}\n.lil-gui .lil-gui .controller {\n border: none;\n}\n\n.lil-gui label, .lil-gui input, .lil-gui button {\n -webkit-tap-highlight-color: transparent;\n}\n.lil-gui input {\n border: 0;\n outline: none;\n font-family: var(--font-family);\n font-size: var(--input-font-size);\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n background: var(--widget-color);\n color: var(--text-color);\n width: 100%;\n}\n@media (hover: hover) {\n .lil-gui input:hover {\n background: var(--hover-color);\n }\n .lil-gui input:active {\n background: var(--focus-color);\n }\n}\n.lil-gui input:disabled {\n opacity: 1;\n}\n.lil-gui input[type=text],\n.lil-gui input[type=number] {\n padding: var(--widget-padding);\n -moz-appearance: textfield;\n}\n.lil-gui input[type=text]:focus,\n.lil-gui input[type=number]:focus {\n background: var(--focus-color);\n}\n.lil-gui input[type=checkbox] {\n appearance: none;\n width: var(--checkbox-size);\n height: var(--checkbox-size);\n border-radius: var(--widget-border-radius);\n text-align: center;\n cursor: pointer;\n}\n.lil-gui input[type=checkbox]:checked:before {\n font-family: "lil-gui";\n content: "\u2713";\n font-size: var(--checkbox-size);\n line-height: var(--checkbox-size);\n}\n@media (hover: hover) {\n .lil-gui input[type=checkbox]:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button {\n outline: none;\n cursor: pointer;\n font-family: var(--font-family);\n font-size: var(--font-size);\n color: var(--text-color);\n width: 100%;\n height: var(--widget-height);\n text-transform: none;\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n border: none;\n}\n@media (hover: hover) {\n .lil-gui button:hover {\n background: var(--hover-color);\n }\n .lil-gui button:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button:active {\n background: var(--focus-color);\n}\n\n@font-face {\n font-family: "lil-gui";\n src: url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff");\n}';function Ie(n){let e=document.createElement("style");e.innerHTML=n;let i=document.querySelector("head link[rel=stylesheet], head style");i?document.head.insertBefore(e,i):document.head.appendChild(e)}d(Ie,"_injectStyles");var pe=!1,G=class G{constructor({parent:e,autoPlace:i=e===void 0,container:t,width:o,title:l="Controls",closeFolders:r=!1,injectStyles:s=!0,touchStyles:c=!0}={}){if(this.parent=e,this.root=e?e.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",p=>{(p.code==="Enter"||p.code==="Space")&&(p.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(l),this.parent){this.parent.children.push(this),this.parent.folders.push(this),this.parent.$children.appendChild(this.domElement);return}this.domElement.classList.add("root"),c&&this.domElement.classList.add("allow-touch-styles"),!pe&&s&&(Ie(Fe),pe=!0),t?t.appendChild(this.domElement):i&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),o&&this.domElement.style.setProperty("--width",o+"px"),this._closeFolders=r}add(e,i,t,o,l){if(Object(t)===t)return new J(this,e,i,t);let r=e[i];switch(typeof r){case"number":return new R(this,e,i,t,o,l);case"boolean":return new V(this,e,i);case"string":return new W(this,e,i);case"function":return new D(this,e,i)}console.error("gui.add failed\n property:",i,"\n object:",e,"\n value:",r)}addColor(e,i,t=1){return new N(this,e,i,t)}addFolder(e){let i=new G({parent:this,title:e});return this.root._closeFolders&&i.close(),i}load(e,i=!0){return e.controllers&&this.controllers.forEach(t=>{t instanceof D||t._name in e.controllers&&t.load(e.controllers[t._name])}),i&&e.folders&&this.folders.forEach(t=>{t._title in e.folders&&t.load(e.folders[t._title])}),this}save(e=!0){let i={controllers:{},folders:{}};return this.controllers.forEach(t=>{if(!(t instanceof D)){if(t._name in i.controllers)throw new Error('Cannot save GUI with duplicate property "'.concat(t._name,'"'));i.controllers[t._name]=t.save()}}),e&&this.folders.forEach(t=>{if(t._title in i.folders)throw new Error('Cannot save GUI with duplicate folder "'.concat(t._title,'"'));i.folders[t._title]=t.save()}),i}open(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(e){this._closed!==e&&(this._closed=e,this._callOnOpenClose(this))}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{let i=this.$children.clientHeight;this.$children.style.height=i+"px",this.domElement.classList.add("transition");let t=d(l=>{l.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",t))},"onTransitionEnd");this.$children.addEventListener("transitionend",t);let o=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame(()=>{this.$children.style.height=o+"px"})}),this}title(e){return this._title=e,this.$title.textContent=e,this}reset(e=!0){return(e?this.controllersRecursive():this.controllers).forEach(t=>t.reset()),this}onChange(e){return this._onChange=e,this}_callOnChange(e){this.parent&&this.parent._callOnChange(e),this._onChange!==void 0&&this._onChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(e){this.parent&&this.parent._callOnFinishChange(e),this._onFinishChange!==void 0&&this._onFinishChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onOpenClose(e){return this._onOpenClose=e,this}_callOnOpenClose(e){this.parent&&this.parent._callOnOpenClose(e),this._onOpenClose!==void 0&&this._onOpenClose.call(this,e)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach(e=>e.destroy())}controllersRecursive(){let e=Array.from(this.controllers);return this.folders.forEach(i=>{e=e.concat(i.controllersRecursive())}),e}foldersRecursive(){let e=Array.from(this.folders);return this.folders.forEach(i=>{e=e.concat(i.foldersRecursive())}),e}};d(G,"GUI");var X=G,B=X;C();C();var E=(()=>{let n=new he;return d(function(i){return n.set(i),"#".concat(n.getHexString())},"normalize")})();function ge(n){let e;for(e of n)e()}d(ge,"runAll");function ie(n,e){let i=window.location.href,t=new URL(i),o=new URLSearchParams(t.search);for(let l in n)if(n.hasOwnProperty(l)){let r="".concat(e,".").concat(l);o.set(r,n[l])}t.search=o.toString(),history.pushState({path:t.toString()},"",t.toString())}d(ie,"updateCurrentUrlParamsWithNamespace");function ne(n,e){let i=new URLSearchParams(window.location.search),t={};for(let[o,l]of i)if(o.startsWith("".concat(n,"."))){let r=o.slice(n.length+1);l==="true"||l==="false"?t[r]=l==="true":typeof(e==null?void 0:e[r])=="number"?t[r]=Number(l):t[r]=l}return{namespace:n,params:t}}d(ne,"getUrlParamsWithNamespace");var De=["interactive"];function U(n,e,i){var o,l;let t=i.addFolder("".concat(e.type,"-").concat(e.id));for(let r in e){if(r==="visible"&&t.add(e,r).onChange(s=>{n.updateState(e.id,{[r]:s})}),r==="color"||r==="hoverColor"){e[r]=E(e[r]),t.addColor(e,r).onChange(s=>{n.updateState(e.id,{[r]:s})});continue}if(r==="height"){t.add(e,r,0,20,1).onChange(s=>{n.updateState(e.id,{[r]:s})});continue}if(r==="texture"&&e.texture){(o=t.addFolder("Texture - side").add(e,"texture"))==null||o.onChange(c=>{n.updateState(e.id,{texture:{url:c}})});continue}if(r==="topTexture"&&e.topTexture){(l=t.addFolder("Texture - top").add(e,"topTexture"))==null||l.onChange(c=>{n.updateState(e.id,{topTexture:{url:c}})});continue}if(r==="opacity"){t.add(e,r,0,1,.1).onChange(s=>{n.updateState(e.id,{[r]:s})});continue}De.includes(r)&&t.add(e,r).onChange(s=>{n.updateState(e.id,{[r]:s})})}return e.isInView&&(t.add(e,"isInView").listen().disable(),t.add(e,"isInViewCheck")),{cleanup(){t.destroy()}}}d(U,"renderByProp");C();C();function Te(){let n=[];function e(o,l){var c;let r=Object.values(o.getMapData())[0],s=l;if(s&&H.is(s)){let p=(c=r.getByType("enterprise-location"))==null?void 0:c.find(h=>h.spaces.some(a=>a.id===s.id));p&&(s=p)}return s}d(e,"getHighlightTarget");async function i(o,l){return l instanceof P?o.Camera.focusOn(l.locations.flatMap(r=>r.spaces),O):l instanceof M?o.Camera.focusOn(l.spaces,O):o.Camera.focusOn(l,O)}d(i,"focusOn");function t(o,l,{focus:r=!1}={}){if(!window.enableHighlightCard)return()=>{};let s=e(o,l),c=document.createElement("div");if(c.style.cssText="\n position: absolute;\n top: 20px;\n left: 20px;\n background-color: rgba(30, 30, 30, 0.95);\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);\n border-radius: 12px;\n padding: 24px;\n max-width: 320px;\n z-index: 1000;\n font-family: 'Arial', sans-serif;\n transition: all 0.3s ease;\n color: #e0e0e0;\n ","name"in s){let h=document.createElement("h3");h.textContent=s.name,h.style.cssText="\n margin: 0 0 16px;\n font-size: 22px;\n font-weight: 600;\n color: #ffffff;\n letter-spacing: -0.5px;\n ",c.appendChild(h)}if(s instanceof M){if(s.description){let h=document.createElement("p");h.textContent=s.description,h.style.cssText="\n margin: 0 0 16px;\n font-size: 14px;\n color: #b0b0b0;\n line-height: 1.5;\n ",c.appendChild(h)}if(s.tags&&s.tags.length>0){let h=document.createElement("div");h.style.cssText="\n display: flex;\n flex-wrap: nowrap;\n gap: 8px;\n margin-bottom: 16px;\n overflow-x: hidden;\n max-height: 30px; /* Adjust this value based on your font size and padding */\n ",s.tags.forEach(a=>{let g=document.createElement("span");g.textContent=a,g.style.cssText="\n background-color: #3a3a3a;\n color: #e0e0e0;\n padding: 6px 12px;\n border-radius: 16px;\n font-size: 12px;\n font-weight: 500;\n text-transform: uppercase;\n white-space: nowrap;\n ",h.appendChild(g)}),c.appendChild(h)}}let p;if(!(l instanceof P)){let h=new B({autoPlace:!1});h.domElement.style.cssText="\n position: relative;\n overflow-y: auto;\n margin-top: 16px;\n border-top: 1px solid #444;\n padding-top: 16px;\n ";let a=o.getState(l);a&&(U(o,{id:l.id,...a},h),c.appendChild(h.domElement)),p=h}return document.body.appendChild(c),r&&i(o,s),()=>{c.style.opacity="0",c.style.transform="translateY(-10px)",setTimeout(()=>c.remove(),300),p==null||p.destroy()}}return d(t,"highlightCard"),{highlightCard:t,highlight:(o,l,{focus:r=!0}={})=>{n.length>0&&n.forEach(c=>o.Markers.remove(c));let s=e(o,l);if(s instanceof M)r&&o.Camera.focusOn(s.spaces,O),n.push(...s.spaces.map(c=>o.Markers.add(c,'<div style="padding: 15px; background-color: #ffffff; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); max-width: 250px; position: relative;">\n <h3 style="margin: 0 0 10px; color: #333; font-size: 16px; font-weight: 600;">'.concat(s.name,"</h3>\n ").concat(s.description?'<p style="margin: 0 0 10px; color: #666; font-size: 14px; font-weight: 400;">'.concat(s.description,"</p>"):"","\n ").concat(s.tags?s.tags.map(p=>'<span style="display: inline-block; padding: 3px 8px; background-color: #e0f2f1; color: #00796b; border-radius: 12px; font-size: 12px;">'.concat(p,"</span>")).join(" "):"",'\n <div style="position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 10px solid #ffffff;"></div>\n </div>'),{rank:"always-visible",anchor:"top"})));else if(s instanceof P){r&&o.Camera.focusOn(s.locations.flatMap(h=>h.spaces),O);let c=new Map,p=new Set;s.locations.forEach(h=>{c.has(h.name)||(h.spaces.forEach(a=>{n.push(o.Markers.add(a,'<div style="padding: 12px; background-color: rgba(0, 153, 51, 0.95); border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.3); transform: translateY(-4px); transition: all 0.3s ease;">\n <span style="font-weight: 600; color: #FFFFFF; font-size: 16px; text-shadow: 1px 1px 2px rgba(0,0,0,0.2);">'.concat(h.name,"</span>\n </div>"),{rank:"always-visible"}))}),c.set(h.name,!0))}),s.locations.forEach(h=>{h.coordinates.forEach(a=>{let g="".concat(a.latitude,",").concat(a.longitude);if(!p.has(g)&&!c.has(h.name)){let f=o.Markers.add(a,'<div style="padding: 10px; background-color: rgba(51, 102, 204, 0.9); border-radius: 6px; box-shadow: 0 3px 6px rgba(0,0,0,0.2);">\n <span style="font-weight: 500; color: #FFFFFF; font-size: 16px;">'.concat(h.name,'</span>\n <br>\n <span style="color: #FFFFFF; font-size: 12px; font-weight: 400;">Node</span>\n </div>'),{rank:"always-visible"});p.add(g),n.push(f)}})})}}}}d(Te,"createHighlightControl");var O={duration:300,easing:"ease-in-out"},F=Te();C();var w={search:"",results:void 0,options:{places:{fields:{name:!0,description:!0,link:!0,category:!0},limit:5},locations:{fields:{name:!0,tag:!0,description:!0},limit:5},categories:{fields:{name:!0},limit:5}}};function Oe(n){n.add(w.options.places.fields,"name").name("Places: Name"),n.add(w.options.places.fields,"description").name("Places: Description"),n.add(w.options.places.fields,"link").name("Places: Link"),n.add(w.options.places.fields,"category").name("Places: Category"),n.add(w.options.places,"limit"),n.add(w.options.locations.fields,"name").name("Locations: Name"),n.add(w.options.locations.fields,"tag").name("Locations: Tag"),n.add(w.options.locations.fields,"description").name("Locations: Description"),n.add(w.options.places,"limit"),n.add(w.options.categories.fields,"name").name("Categories: Name")}d(Oe,"createAdvancedSettings");function me(n,e,i){var h;let t=new I,o=i.addFolder("Search");o.open();let l=o.add(w,"search").onChange(async a=>{let g=await e.Search.query(a,w.options);g&&(w.results=g,s(g,t))}),r=document.createElement("div");r.style.marginLeft="10px",(h=l.domElement.parentElement)==null||h.appendChild(r);let{renderSearch:s,close:c}=ze(n,e,r,l.$input),p=o.addFolder("Advanced");return p.close(),Oe(p),document.addEventListener("keydown",a=>{(a.metaKey||a.ctrlKey)&&a.key==="k"?(a.preventDefault(),o._closed&&o.open(),l.$input.focus()):a.key==="Escape"&&(c(),t.publish("highlight",void 0))}),{pubsub:t}}d(me,"createSearchControl");function ze(n,e,i,t){let o,l;t.addEventListener("input",async s=>{s instanceof InputEvent&&(s.inputType==="insertText"||s.inputType==="insertCompositionText")&&(clearTimeout(o),o=setTimeout(async()=>{var p;let c=await e.Search.suggest(t.value);c&&c.length>0&&r((p=c[0])==null?void 0:p.suggestion)},100))});function r(s){if(!s){t.placeholder="";return}let c=t.value;t.value=s,t.setSelectionRange(c.length,s.length)}return d(r,"renderSuggestion"),{renderSearch(s,c){var p,h;if(s.places.length===0&&((p=s.enterpriseCategories)==null?void 0:p.length)===0&&((h=s.enterpriseLocations)==null?void 0:h.length)===0){i.textContent="No results found.";return}l=He(i,s,n,c)},close(){l.destroy()}}}d(ze,"mount");function He(n,e,i,t){n.innerHTML="";let o=document.createElement("div");Object.assign(o.style,j.dropdownContainer);let l=document.createElement("ul");l.className="options-list",Object.assign(l.style,j.optionsList),l.style.display="block";let r=[],s=d((g,f)=>{if(f&&f.length>0){let u=document.createElement("li");u.textContent=g,Object.assign(u.style,j.sectionHeader),l.appendChild(u),f.forEach((b,y)=>{let m=document.createElement("li");m.textContent="".concat("name"in b.item?b.item.name:""," (").concat(b.type,")"),Object.assign(m.style,j.option),m.tabIndex=0,m.addEventListener("focus",()=>{p(r.indexOf(m))}),m.addEventListener("mouseover",()=>{m.style.backgroundColor="#f0f0f0"}),m.addEventListener("mouseout",()=>{m.style.backgroundColor=""}),m.addEventListener("click",()=>{}),m.setAttribute("data-type",g),m.setAttribute("data-index",y.toString()),l.appendChild(m),r.push(m)})}},"addSection");s("enterpriseLocations",e.enterpriseLocations),s("enterpriseCategories",e.enterpriseCategories),s("Places",e.places),o.appendChild(l),n.appendChild(o);let c=[],p=d(g=>{c.forEach(m=>m()),c=[],r.forEach((m,v)=>{v===g?m.style.backgroundColor="#e0e0e0":m.style.backgroundColor=""});let f=r[g],u=f.getAttribute("data-type"),b=parseInt(f.getAttribute("data-index")||"0",10);if(!u)return;let{item:y}=e[u][b];F.highlight(i,y),t.publish("highlight",y)},"highlightOption"),h=d(g=>{!o.contains(g.target)&&g.target!==n&&a()},"handleClickOutside");document.addEventListener("click",h);let a=d(()=>{n.innerHTML="",document.removeEventListener("click",h)},"destroy");return{destroy(){n.innerHTML="",t.publish("highlight",void 0)}}}d(He,"createCustomDropdown");var j={dropdownContainer:{position:"absolute",color:"#202020"},optionsList:{display:"block",zIndex:"1002",position:"relative",maxHeight:"200px",overflowY:"auto",border:"1px solid #ccc",backgroundColor:"#fff",listStyleType:"none",margin:"0",padding:"0"},sectionHeader:{fontWeight:"bold",padding:"5px",backgroundColor:"#f0f0f0"},option:{padding:"5px",cursor:"pointer"}};function fe(n,e,i){i.domElement.id="interactionPanel";let t=[],{pubsub:o}=me(n,e,i);o.on("highlight",h=>{if(h){t.forEach(g=>g()),t=[];let a=h instanceof M?h.spaces[0]:h;if(a&&!H.is(a))return;t.push(F.highlightCard(n,a,{focus:!0}))}else t.forEach(a=>a()),t=[]});let l=i.addFolder("Click \u{1F447}").close(),{sub:r}=Pe(n,l);r.on("click",h=>{t.forEach(a=>a()),t=[],h.spaces[0]&&(t=[F.highlightCard(n,h.spaces[0])])});let s=i.addFolder("Hover \u{1F681}").close(),{sub:c}=Ge(n,s),p;c.on("hover",h=>{h.spaces[0]?(p==null||p(),t.length===0&&(p=F.highlightCard(n,h.spaces[0]))):(p==null||p(),p=void 0)})}d(fe,"createInteractionControls");function Pe(n,e){let i=new I,t={position:"",hoverColor:E(n.getHoverColor())},o=e.add(t,"position").disable(),l=[];function r(){l.forEach(c=>c()),l.length=0}d(r,"reset");let s=0;return n.on("click",c=>{var u;let{labels:p,markers:h,coordinate:a}=c;r(),i.publish("click",c),clearInterval(s),o.load(JSON.stringify([a.longitude,a.latitude]));let g=p[0]||h[0];if(g){let b=re(n,g,e);if(!b)return;l.push(b.destroy),b.labelItemFolder.openAnimated()}let f=(u=c.spaces[0])!=null?u:c.objects[0];if(f){let b={id:f.id,...n.getState(f.id),type:f.type,isInView:!1,isInViewCheck:oe(n,f.id)},{cleanup:y}=U(n,b,e);s=setInterval(()=>{b.isInView=n.isInView(g||f)},500),l.push(y)}}),{sub:i}}d(Pe,"createClickControls");function Ge(n,e){let i=new I;n.setHoverColor("#1f3a7a");let t={position:"",hoverColor:E(n.getHoverColor()),intersected:"",type:"",id:""},o=e.add(t,"position").disable();e.add(t,"id").disable().listen(),e.add(t,"type").disable().listen(),e.addColor(t,"hoverColor").onChange(s=>{n.setHoverColor(s)});let l=[];function r(){l.forEach(s=>s()),l.length=0}return d(r,"reset"),n.on("hover",s=>{var b,y,m;let{coordinate:c,spaces:p,objects:h,markers:a,labels:g}=s;r(),i.publish("hover",s),o.load(JSON.stringify([c.longitude,c.latitude]));let f=(m=(y=(b=p[0])!=null?b:h[0])!=null?y:a[0])!=null?m:g[0];if(!f)return;let u=n.getState(f);u&&(t.type=u.type,t.id=f.id)}),{sub:i}}d(Ge,"createHoverControls");function oe(n,e){return d(function(){console.log("isInView",n.isInView(e))},"isInView")}d(oe,"createIsInViewHandler");function be(n,e,i){let t={labels:{},all(){i.Labels.all().forEach(f=>{this.labels[f.id]=f}),c()},removeAllLabels(){i.Labels.removeAll().forEach(f=>{delete this.labels[f.id]}),c()}},{addLabel:o,destroy:l}=Be(n,i);n.add(t,"all"),n.add(t,"removeAllLabels");let r=n.addFolder("Label List");n.close();let s=new Map,{rerender:c}=p();function p(){function g(b){var y;delete t.labels[b.id],(y=s.get(b.id))==null||y.destroy()}d(g,"remove");function f(b){let y=re(i,b,r,{onRemove:v=>{g(v)}});if(!y)return;let{labelItemFolder:m}=y;s.set(b.id,m)}d(f,"add");function u(){r.destroy(),r=n.addFolder("Label");for(let b in t.labels){let y=t.labels[b];f(y)}}return d(u,"rerender"),{rerender:u,add:f,remove:g}}d(p,"createLabelControls"),n.domElement.classList.add("list-items");let h;i.on("click",({labels:g,coordinate:f})=>{if(!n._closed)if(g[0]){h==null||h.close();let u=s.get(g[0].id);if(n.open(),!u)return;u==null||u.open(),u==null||u.domElement.scrollIntoView({block:"start"}),u==null||u.domElement.focus(),h=u}else o(f)});function a(g){for(let f of g)t.labels[f.id]=f;c()}return d(a,"populatelabels"),{populatelabels:a,destroy(){l()}}}d(be,"createLabelControls");function re(n,e,i,{onRemove:t}={}){var p,h,a,g;let o=i.addFolder("".concat((p=e.text)==null?void 0:p.substring(0,12)));o.onChange(f=>{n.updateState(e,{appearance:c.appearance,interactive:c.interactive})}),o.close();let l=n.getState(e);if((l==null?void 0:l.type)!=="label")throw new Error("error getting state for label: ".concat(e.id));let{appearance:r,interactive:s}=l;if(!r||r.margin==null||s==null)throw new Error("incomplte label state");let c={text:e.text,interactive:s,appearance:{...r,margin:r.margin||0,marker:{foregroundColor:(a=(h=r.marker)==null?void 0:h.foregroundColor)!=null&&a.active?E((g=r.marker.foregroundColor)==null?void 0:g.active):"black"},text:{foregroundColor:E(r.text.foregroundColor)}},remove(){n.Labels.remove(e),t==null||t(e),o.destroy()},isInView:oe(n,e.id)};return o.add(c.appearance,"margin",0,20).name("margin"),o.add(c,"text"),o.add(c,"interactive"),o.addColor(c.appearance.marker,"foregroundColor").name("marker foreground"),o.addColor(c.appearance.text,"foregroundColor").name("text forground"),o.add(c,"isInView"),o.add(c,"remove"),{labelItemFolder:o,destroy(){o.destroy()}}}d(re,"addLabelControlToFolder");function Be(n,e){let i=n.addFolder("Add"),t={onClick:!1,margin:0,text:"New Label!",interactive:!0,marginForegroundColor:E("skyblue"),marginBackgroundColor:E("coral"),textForegroundColor:E("slategray"),textBackgroundColor:E("white")};return i.add(t,"onClick"),i.add(t,"margin"),i.add(t,"interactive"),i.add(t,"text"),i.addColor(t,"marginForegroundColor"),i.addColor(t,"marginBackgroundColor"),i.addColor(t,"textForegroundColor"),i.addColor(t,"textBackgroundColor"),{destroy(){i.destroy()},addLabel(o){return i._closed||!t.onClick?void 0:e.Labels.add(o,t.text,{appearance:{margin:t.margin,marker:{foregroundColor:{active:t.marginForegroundColor,inactive:t.marginForegroundColor},backgroundColor:{active:t.marginBackgroundColor,inactive:t.marginBackgroundColor}},text:{foregroundColor:t.textForegroundColor,backgroundColor:t.marginBackgroundColor}},interactive:t.interactive})}}}d(Be,"createAddControl");var ve={};C();var ye="camera-ui";function xe(n,e,i){var z,le;let t=n.addFolder("Camera \u{1F4F7}").onOpenClose(x=>{ie({opened:!x._closed},ye)}),{params:o}=ne(ye);o.opened||t.close();let l=e.Camera.center.toJSON(),r=document.createElement("div");Object.assign(r.style,{display:"none",position:"absolute",left:"0px",top:"0px",bottom:"0px",right:"0px",backgroundColor:"aqua",pointerEvents:"none",opacity:.5}),document.body.appendChild(r);let[s,c,p,h]=(z=i==null?void 0:i.padding)!=null?z:[],a={center_lat:l.latitude,center_lon:l.longitude,zoomLevel:e.Camera.zoomLevel,pitch:e.Camera.pitch,bearing:e.Camera.bearing,minZoomLevel:e.Camera.minZoomLevel,maxZoomLevel:e.Camera.maxZoomLevel,inset_type:"pixel",inset_top:s!=null?s:0,inset_left:h!=null?h:0,inset_right:c!=null?c:0,inset_bottom:p!=null?p:0,animateOnLoad:!0,persist:()=>{ie(t.save().controllers,"camera"),navigator.clipboard.writeText(window.location.href)},visualizeInset:!!(s||c||p||h),"Focus on click":(le=i==null?void 0:i.focusOnClick)!=null?le:!0,"Focus on current floor":()=>{e.Camera.focusOn([e.currentFloor],{screenOffsets:{top:20,left:20,right:20,bottom:20}})}};function g(){a.inset_type==="portion"?Object.assign(r.style,{left:a.inset_left*u+"px",top:a.inset_top*f+"px",bottom:a.inset_bottom*f+"px",right:a.inset_right*u+"px"}):Object.assign(r.style,{left:a.inset_left+"px",top:a.inset_top+"px",bottom:a.inset_bottom+"px",right:a.inset_right+"px"})}d(g,"updateInsetVisualizer"),t.add(a,"center_lat").listen().disable(),t.add(a,"center_lon").listen().disable(),t.add(a,"zoomLevel",16,22,.5).listen().disable(),t.add(a,"pitch").listen().disable(),t.add(a,"bearing").listen().disable(),t.add(a,"minZoomLevel",5,22,.5).onChange(x=>{e.Camera.setMinZoomLevel(x)}),t.add(a,"maxZoomLevel",10,22,.5).onChange(x=>{e.Camera.setMaxZoomLevel(x)}),t.add(a,"animateOnLoad"),t.add(a,"visualizeInset").onChange($),$(a.visualizeInset);let{innerHeight:f,innerWidth:u}=window;t.add(a,"inset_type",["pixel","portion"]).onChange(A),t.add(a,"inset_top",0,f).onChange(A),t.add(a,"inset_bottom",0,f).onChange(A),t.add(a,"inset_left",0,u).onChange(A),t.add(a,"inset_right",0,u).onChange(A);let b=je(e);t.add(a,"Focus on click").onChange(x=>{x?e.on("click",b):e.off("click",b)}),a["Focus on click"]&&e.on("click",b),t.add(a,"persist"),t.add(a,"Focus on current floor");let y=d(x=>{t._closed||(a.center_lat=x.center.latitude,a.center_lon=x.center.longitude,a.zoomLevel=x.zoomLevel,a.bearing=x.bearing,a.pitch=x.pitch)},"onCameraChanged");e.on("camera-change",y);let{params:m}=ne("camera",a);if(Object.keys(m).length>0){let x=m;e.Camera.setScreenOffsets({top:x.inset_top,left:x.inset_left,right:x.inset_right,bottom:x.inset_bottom,type:x.inset_type});let de={pitch:x.pitch,center:new ce(x.center_lat,x.center_lon),bearing:x.bearing,zoomLevel:x.zoomLevel};x.animateOnLoad?e.Camera.animateTo(de):e.Camera.set(de),t.load({controllers:x,folders:{}}),g()}let v=[()=>{e.off("camera-change",y)}];function A(){e.Camera.setScreenOffsets({top:a.inset_top,left:a.inset_left,right:a.inset_right,bottom:a.inset_bottom,type:a.inset_type}),g()}d(A,"updateInset"),(a.inset_top||a.inset_right||a.inset_bottom||a.inset_left)&&A();function $(x){x?r.style.display="block":r.style.display="none"}return d($,"visualizeInsetUpdated"),()=>({destroy(){t.destroy(),ge(v)}})}d(xe,"createCameraControls");function je(n){return d(function(i){var r;let{spaces:t,objects:o}=i,l=(r=t[0])!=null?r:o[0];l&&n.Camera.focusOn(l,{bearing:300,pitch:65})},"handler")}d(je,"createHandler");C();function Ce(n,e,i){let t={markers:{},removeAllMarkers(){i.Markers.removeAll().forEach(f=>{delete this.markers[f.id]}),c()}},{addMarker:o,destroy:l}=Ye(n,i);n.add(t,"removeAllMarkers");let r=n.addFolder("Marker List");n.close();let s=new Map,{rerender:c}=p();function p(){function g(b){var y;delete t.markers[b.id],(y=s.get(b.id))==null||y.destroy()}d(g,"remove");function f(b){let y=Ve(i,b,r,{onRemove:v=>{g(v)}});if(!y)return;let{markerItemFolder:m}=y;s.set(b.id,m)}d(f,"add");function u(){r.destroy(),r=n.addFolder("marker");for(let b in t.markers){let y=t.markers[b];f(y)}}return d(u,"rerender"),{rerender:u,add:f,remove:g}}d(p,"createMarkerControls"),n.domElement.classList.add("list-items");let h;i.on("click",({markers:g,coordinate:f})=>{if(!n._closed)if(g[0]){h==null||h.close();let u=s.get(g[0].id);if(n.open(),!u)return;u==null||u.open(),u==null||u.domElement.scrollIntoView({block:"start"}),u==null||u.domElement.focus(),h=u}else o(f)});function a(g){for(let f of g)t.markers[f.id]=f;c()}return d(a,"populateMarkers"),{populateMarkers:a,destroy(){l()}}}d(Ce,"createMarkerControls");function Ve(n,e,i,{onRemove:t}={}){let o=i.addFolder("".concat(e.id.toString().substring(0,8)));o.onChange(c=>{n.updateState(e,{interactive:s.interactive})}),o.close();let l=n.getState(e);if((l==null?void 0:l.type)!=="marker")throw new Error("error getting state for marker: ".concat(e.id));let{interactive:r}=l;if(r==null)throw new Error("incomplte label state");let s={interactive:r,remove(){n.Markers.remove(e),t==null||t(e),o.destroy()}};return o.add(s,"interactive"),o.add(s,"remove"),{markerItemFolder:o,destroy(){o.destroy()}}}d(Ve,"addMarkerControlToFolder");function Ye(n,e){let i=n.addFolder("Add"),t={onClick:!1,interactive:!0};return i.add(t,"onClick"),i.add(t,"interactive"),{destroy(){i.destroy()},addMarker(o){return i._closed||!t.onClick?void 0:e.Markers.add(o,"<div>New Marker</div>",{interactive:t.interactive})}}}d(Ye,"createAddControl");C();function Ae(n,e){let i=n.addFolder("Walls").close(),t={visible:!0,topColor:"#b1fa87",color:"#e8e8e8",texture:{url:""},topTexture:{url:""}};i.add(t,"visible").onChange(r=>{e.updateState("walls",{visible:r})}),i.addColor(t,"topColor").onChange(r=>{e.updateState("walls",{topColor:r})}),i.addColor(t,"color").onChange(r=>{e.updateState("walls",{color:r})}),i.addFolder("Texture - side").add(t.texture,"url").onFinishChange(r=>{e.updateState("walls",{texture:{url:r}})}),i.addFolder("Texture - top").add(t.topTexture,"url").onFinishChange(r=>{e.updateState("walls",{topTexture:{url:r}})}),e.updateState("walls",{topColor:t.topColor}),e.updateState("walls",{color:t.color})}d(Ae,"createGeometryControl");C();function we(n,e,i){var l,r;n.close();let t={language:(r=(l=i.currentLanguage)==null?void 0:l.code)!=null?r:"en"},o=i.getByType("enterprise-venue");n.add(t,"language",o==null?void 0:o.languages.map(s=>s.code)).onChange(s=>{i.changeLanguage(s)})}d(we,"createMiscControl");function Ee(n,e,i){Ne();let t=new B({title:"SDK Controls"});t.domElement.classList.add("mappedin-js-inspector"),fe(e,n,t),xe(t,e,i==null?void 0:i.camera);let o=t.addFolder("Levels").close(),l=t.addFolder("Scene Controls");l.close();let r=t.addFolder("Labels"),s=t.addFolder("Markers");Ae(t,e);let c=t.addFolder("misc");we(c,e,n);let p={level:e.currentFloor.id},{populatelabels:h}=be(r,n,e),{populateMarkers:a}=Ce(s,n,e),g=n.getByType("floor").reduce((u,b)=>(u[b.name]=b.id,u),{}),f=o.add(p,"level",g).onChange(u=>{e.setFloor(u),p.level=e.currentFloor.id,f.updateDisplay()});return e.on("floor-change-start",u=>{o.controllers[0].setValue(u.floor.id)}),n.getByType("space").forEach(u=>{e.updateState(u,{interactive:!0})}),n.getByType("object").forEach(u=>{e.updateState(u,{interactive:!0})}),n.getByType("object").forEach(u=>{e.updateState(u,{interactive:!0})}),e.setHoverColor("#a2b7e6"),e.Camera.setMaxZoomLevel(20),{populatelabels:h,sceneFolder:l,populateMarkers:a}}d(Ee,"createUi");var _e="mappedin-sdk-debug-css";function Ne(){if(document.getElementById(_e))return;let n=document.createElement("style");n.id=_e,n.textContent=ve,document.head.appendChild(n)}d(Ne,"injectCss");var ae=class ae{constructor(e,i){L(this,"_enabled",!1);L(this,"mv");L(this,"api");L(this,"mapData");L(this,"scenegraphVisualizerMounted",!1);L(this,"storeStateToLocalStorageEnabled",!1);this.mv=e,this.api=i,this.mapData=this.api.getMapData()}setMapData(e){this.mapData=e}async enable(e={}){var t;if(this._enabled)return;if(this._enabled=!0,!this.mapData)throw new Error("Please set mapData before enable debug.");let{sceneFolder:i}=Ee(this.mapData,this.mv,e);i.onOpenClose(o=>{o===i&&!o._closed&&!this.scenegraphVisualizerMounted&&(this.scenegraphVisualizerMounted=!0,ue(this.api.core,i))}),(t=this.api.getMapDataInternal())==null||t.spaces.forEach(o=>{this.mv.updateState(o.id,{interactive:!0})})}get enabled(){return this._enabled}};d(ae,"Inspector");var se=ae;export{se as Inspector};
1
+ import{A as ue,d as I,e as ce,i as H,q as M,r as P}from"./chunk-KMFATDBF.js";import"./chunk-QQ53JNBN.js";import"./chunk-Z7MNFX3S.js";import{J as he}from"./chunk-VT2X5G75.js";import{a as d,e as L,j as C}from"./chunk-OQLRRFPP.js";C();C();C();C();var S=class S{constructor(e,i,t,o,l="div"){this.parent=e,this.object=i,this.property=t,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(l),this.domElement.classList.add("controller"),this.domElement.classList.add(o),this.$name=document.createElement("div"),this.$name.classList.add("name"),S.nextNameID=S.nextNameID||0,this.$name.id="lil-gui-name-".concat(++S.nextNameID),this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",r=>r.stopPropagation()),this.domElement.addEventListener("keyup",r=>r.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(t)}name(e){return this._name=e,this.$name.textContent=e,this}onChange(e){return this._onChange=e,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(e=!0){return this.disable(!e)}disable(e=!0){return e===this._disabled?this:(this._disabled=e,this.domElement.classList.toggle("disabled",e),this.$disable.toggleAttribute("disabled",e),this)}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(e){let i=this.parent.add(this.object,this.property,e);return i.name(this._name),this.destroy(),i}min(e){return this}max(e){return this}step(e){return this}decimals(e){return this}listen(e=!0){return this._listening=e,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);let e=this.save();e!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=e}getValue(){return this.object[this.property]}setValue(e){return this.getValue()!==e&&(this.object[this.property]=e,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(e){return this.setValue(e),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}};d(S,"Controller");var k=S,K=class K extends k{constructor(e,i,t){super(e,i,t,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}};d(K,"BooleanController");var V=K;function Y(n){let e,i;return(e=n.match(/(#|0x)?([a-f0-9]{6})/i))?i=e[2]:(e=n.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?i=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=n.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),i?"#"+i:!1}d(Y,"normalizeColorString");var ke={isPrimitive:!0,match:n=>typeof n=="string",fromHexString:Y,toHexString:Y},T={isPrimitive:!0,match:n=>typeof n=="number",fromHexString:n=>parseInt(n.substring(1),16),toHexString:n=>"#"+n.toString(16).padStart(6,0)},$e={isPrimitive:!1,match:n=>Array.isArray(n),fromHexString(n,e,i=1){let t=T.fromHexString(n);e[0]=(t>>16&255)/255*i,e[1]=(t>>8&255)/255*i,e[2]=(t&255)/255*i},toHexString([n,e,i],t=1){t=255/t;let o=n*t<<16^e*t<<8^i*t<<0;return T.toHexString(o)}},Le={isPrimitive:!1,match:n=>Object(n)===n,fromHexString(n,e,i=1){let t=T.fromHexString(n);e.r=(t>>16&255)/255*i,e.g=(t>>8&255)/255*i,e.b=(t&255)/255*i},toHexString({r:n,g:e,b:i},t=1){t=255/t;let o=n*t<<16^e*t<<8^i*t<<0;return T.toHexString(o)}},Me=[ke,T,$e,Le];function Se(n){return Me.find(e=>e.match(n))}d(Se,"getColorFormat");var Z=class Z extends k{constructor(e,i,t,o){super(e,i,t,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=Se(this.initialValue),this._rgbScale=o,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{let l=Y(this.$text.value);l&&this._setValueFromHexString(l)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(e){if(this._format.isPrimitive){let i=this._format.fromHexString(e);this.setValue(i)}else this._format.fromHexString(e,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(e){return this._setValueFromHexString(e),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}};d(Z,"ColorController");var N=Z,Q=class Q extends k{constructor(e,i,t){super(e,i,t,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",o=>{o.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}};d(Q,"FunctionController");var D=Q,q=class q extends k{constructor(e,i,t,o,l,r){super(e,i,t,"number"),this._initInput(),this.min(o),this.max(l);let s=r!==void 0;this.step(s?r:this._getImplicitStep(),s),this.updateDisplay()}decimals(e){return this._decimals=e,this.updateDisplay(),this}min(e){return this._min=e,this._onUpdateMinMax(),this}max(e){return this._max=e,this._onUpdateMinMax(),this}step(e,i=!0){return this._step=e,this._stepExplicit=i,this}updateDisplay(){let e=this.getValue();if(this._hasSlider){let i=(e-this._min)/(this._max-this._min);i=Math.max(0,Math.min(i,1)),this.$fill.style.width=i*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?e:e.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;let i=d(()=>{let v=parseFloat(this.$input.value);isNaN(v)||(this._stepExplicit&&(v=this._snap(v)),this.setValue(this._clamp(v)))},"onInput"),t=d(v=>{let A=parseFloat(this.$input.value);isNaN(A)||(this._snapClampSetValue(A+v),this.$input.value=this.getValue())},"increment"),o=d(v=>{v.key==="Enter"&&this.$input.blur(),v.code==="ArrowUp"&&(v.preventDefault(),t(this._step*this._arrowKeyMultiplier(v))),v.code==="ArrowDown"&&(v.preventDefault(),t(this._step*this._arrowKeyMultiplier(v)*-1))},"onKeyDown"),l=d(v=>{this._inputFocused&&(v.preventDefault(),t(this._step*this._normalizeMouseWheel(v)))},"onWheel"),r=!1,s,c,p,h,a,g=5,f=d(v=>{s=v.clientX,c=p=v.clientY,r=!0,h=this.getValue(),a=0,window.addEventListener("mousemove",u),window.addEventListener("mouseup",b)},"onMouseDown"),u=d(v=>{if(r){let A=v.clientX-s,$=v.clientY-c;Math.abs($)>g?(v.preventDefault(),this.$input.blur(),r=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(A)>g&&b()}if(!r){let A=v.clientY-p;a-=A*this._step*this._arrowKeyMultiplier(v),h+a>this._max?a=this._max-h:h+a<this._min&&(a=this._min-h),this._snapClampSetValue(h+a)}p=v.clientY},"onMouseMove"),b=d(()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",b)},"onMouseUp"),y=d(()=>{this._inputFocused=!0},"onFocus"),m=d(()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()},"onBlur");this.$input.addEventListener("input",i),this.$input.addEventListener("keydown",o),this.$input.addEventListener("wheel",l,{passive:!1}),this.$input.addEventListener("mousedown",f),this.$input.addEventListener("focus",y),this.$input.addEventListener("blur",m)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");let e=d((m,v,A,$,z)=>(m-v)/(A-v)*(z-$)+$,"map"),i=d(m=>{let v=this.$slider.getBoundingClientRect(),A=e(m,v.left,v.right,this._min,this._max);this._snapClampSetValue(A)},"setValueFromX"),t=d(m=>{this._setDraggingStyle(!0),i(m.clientX),window.addEventListener("mousemove",o),window.addEventListener("mouseup",l)},"mouseDown"),o=d(m=>{i(m.clientX)},"mouseMove"),l=d(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",o),window.removeEventListener("mouseup",l)},"mouseUp"),r=!1,s,c,p=d(m=>{m.preventDefault(),this._setDraggingStyle(!0),i(m.touches[0].clientX),r=!1},"beginTouchDrag"),h=d(m=>{m.touches.length>1||(this._hasScrollBar?(s=m.touches[0].clientX,c=m.touches[0].clientY,r=!0):p(m),window.addEventListener("touchmove",a,{passive:!1}),window.addEventListener("touchend",g))},"onTouchStart"),a=d(m=>{if(r){let v=m.touches[0].clientX-s,A=m.touches[0].clientY-c;Math.abs(v)>Math.abs(A)?p(m):(window.removeEventListener("touchmove",a),window.removeEventListener("touchend",g))}else m.preventDefault(),i(m.touches[0].clientX)},"onTouchMove"),g=d(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",a),window.removeEventListener("touchend",g)},"onTouchEnd"),f=this._callOnFinishChange.bind(this),u=400,b,y=d(m=>{if(Math.abs(m.deltaX)<Math.abs(m.deltaY)&&this._hasScrollBar)return;m.preventDefault();let A=this._normalizeMouseWheel(m)*this._step;this._snapClampSetValue(this.getValue()+A),this.$input.value=this.getValue(),clearTimeout(b),b=setTimeout(f,u)},"onWheel");this.$slider.addEventListener("mousedown",t),this.$slider.addEventListener("touchstart",h,{passive:!1}),this.$slider.addEventListener("wheel",y,{passive:!1})}_setDraggingStyle(e,i="horizontal"){this.$slider&&this.$slider.classList.toggle("active",e),document.body.classList.toggle("lil-gui-dragging",e),document.body.classList.toggle("lil-gui-".concat(i),e)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(e){let{deltaX:i,deltaY:t}=e;return Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(i=0,t=-e.wheelDelta/120,t*=this._stepExplicit?1:10),i+-t}_arrowKeyMultiplier(e){let i=this._stepExplicit?1:10;return e.shiftKey?i*=10:e.altKey&&(i/=10),i}_snap(e){let i=Math.round(e/this._step)*this._step;return parseFloat(i.toPrecision(15))}_clamp(e){return e<this._min&&(e=this._min),e>this._max&&(e=this._max),e}_snapClampSetValue(e){this.setValue(this._clamp(this._snap(e)))}get _hasScrollBar(){let e=this.parent.root.$children;return e.scrollHeight>e.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}};d(q,"NumberController");var R=q,ee=class ee extends k{constructor(e,i,t,o){super(e,i,t,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(o)}options(e){return this._values=Array.isArray(e)?e:Object.values(e),this._names=Array.isArray(e)?e:Object.keys(e),this.$select.replaceChildren(),this._names.forEach(i=>{let t=document.createElement("option");t.textContent=i,this.$select.appendChild(t)}),this.updateDisplay(),this}updateDisplay(){let e=this.getValue(),i=this._values.indexOf(e);return this.$select.selectedIndex=i,this.$display.textContent=i===-1?e:this._names[i],this}};d(ee,"OptionController");var J=ee,te=class te extends k{constructor(e,i,t){super(e,i,t,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",o=>{o.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}};d(te,"StringController");var W=te,Fe='.lil-gui {\n font-family: var(--font-family);\n font-size: var(--font-size);\n line-height: 1;\n font-weight: normal;\n font-style: normal;\n text-align: left;\n color: var(--text-color);\n user-select: none;\n -webkit-user-select: none;\n touch-action: manipulation;\n --background-color: #1f1f1f;\n --text-color: #ebebeb;\n --title-background-color: #111111;\n --title-text-color: #ebebeb;\n --widget-color: #424242;\n --hover-color: #4f4f4f;\n --focus-color: #595959;\n --number-color: #2cc9ff;\n --string-color: #a2db3c;\n --font-size: 11px;\n --input-font-size: 11px;\n --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;\n --font-family-mono: Menlo, Monaco, Consolas, "Droid Sans Mono", monospace;\n --padding: 4px;\n --spacing: 4px;\n --widget-height: 20px;\n --title-height: calc(var(--widget-height) + var(--spacing) * 1.25);\n --name-width: 45%;\n --slider-knob-width: 2px;\n --slider-input-width: 27%;\n --color-input-width: 27%;\n --slider-input-min-width: 45px;\n --color-input-min-width: 45px;\n --folder-indent: 7px;\n --widget-padding: 0 0 0 3px;\n --widget-border-radius: 2px;\n --checkbox-size: calc(0.75 * var(--widget-height));\n --scrollbar-width: 5px;\n}\n.lil-gui, .lil-gui * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n.lil-gui.root {\n width: var(--width, 245px);\n display: flex;\n flex-direction: column;\n background: var(--background-color);\n}\n.lil-gui.root > .title {\n background: var(--title-background-color);\n color: var(--title-text-color);\n}\n.lil-gui.root > .children {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.lil-gui.root > .children::-webkit-scrollbar {\n width: var(--scrollbar-width);\n height: var(--scrollbar-width);\n background: var(--background-color);\n}\n.lil-gui.root > .children::-webkit-scrollbar-thumb {\n border-radius: var(--scrollbar-width);\n background: var(--focus-color);\n}\n@media (pointer: coarse) {\n .lil-gui.allow-touch-styles, .lil-gui.allow-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n }\n}\n.lil-gui.force-touch-styles, .lil-gui.force-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n}\n.lil-gui.autoPlace {\n max-height: 100%;\n position: fixed;\n top: 0;\n right: 15px;\n z-index: 1001;\n}\n\n.lil-gui .controller {\n display: flex;\n align-items: center;\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n}\n.lil-gui .controller.disabled {\n opacity: 0.5;\n}\n.lil-gui .controller.disabled, .lil-gui .controller.disabled * {\n pointer-events: none !important;\n}\n.lil-gui .controller > .name {\n min-width: var(--name-width);\n flex-shrink: 0;\n white-space: pre;\n padding-right: var(--spacing);\n line-height: var(--widget-height);\n}\n.lil-gui .controller .widget {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n min-height: var(--widget-height);\n}\n.lil-gui .controller.string input {\n color: var(--string-color);\n}\n.lil-gui .controller.boolean {\n cursor: pointer;\n}\n.lil-gui .controller.color .display {\n width: 100%;\n height: var(--widget-height);\n border-radius: var(--widget-border-radius);\n position: relative;\n}\n@media (hover: hover) {\n .lil-gui .controller.color .display:hover:before {\n content: " ";\n display: block;\n position: absolute;\n border-radius: var(--widget-border-radius);\n border: 1px solid #fff9;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n}\n.lil-gui .controller.color input[type=color] {\n opacity: 0;\n width: 100%;\n height: 100%;\n cursor: pointer;\n}\n.lil-gui .controller.color input[type=text] {\n margin-left: var(--spacing);\n font-family: var(--font-family-mono);\n min-width: var(--color-input-min-width);\n width: var(--color-input-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.option select {\n opacity: 0;\n position: absolute;\n width: 100%;\n max-width: 100%;\n}\n.lil-gui .controller.option .display {\n position: relative;\n pointer-events: none;\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n line-height: var(--widget-height);\n max-width: 100%;\n overflow: hidden;\n word-break: break-all;\n padding-left: 0.55em;\n padding-right: 1.75em;\n background: var(--widget-color);\n}\n@media (hover: hover) {\n .lil-gui .controller.option .display.focus {\n background: var(--focus-color);\n }\n}\n.lil-gui .controller.option .display.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.option .display:after {\n font-family: "lil-gui";\n content: "\u2195";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n padding-right: 0.375em;\n}\n.lil-gui .controller.option .widget,\n.lil-gui .controller.option select {\n cursor: pointer;\n}\n@media (hover: hover) {\n .lil-gui .controller.option .widget:hover .display {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number input {\n color: var(--number-color);\n}\n.lil-gui .controller.number.hasSlider input {\n margin-left: var(--spacing);\n width: var(--slider-input-width);\n min-width: var(--slider-input-min-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.number .slider {\n width: 100%;\n height: var(--widget-height);\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n padding-right: var(--slider-knob-width);\n overflow: hidden;\n cursor: ew-resize;\n touch-action: pan-y;\n}\n@media (hover: hover) {\n .lil-gui .controller.number .slider:hover {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number .slider.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.number .slider.active .fill {\n opacity: 0.95;\n}\n.lil-gui .controller.number .fill {\n height: 100%;\n border-right: var(--slider-knob-width) solid var(--number-color);\n box-sizing: content-box;\n}\n\n.lil-gui-dragging .lil-gui {\n --hover-color: var(--widget-color);\n}\n.lil-gui-dragging * {\n cursor: ew-resize !important;\n}\n\n.lil-gui-dragging.lil-gui-vertical * {\n cursor: ns-resize !important;\n}\n\n.lil-gui .title {\n height: var(--title-height);\n line-height: calc(var(--title-height) - 4px);\n font-weight: 600;\n padding: 0 var(--padding);\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n outline: none;\n text-decoration-skip: objects;\n}\n.lil-gui .title:before {\n font-family: "lil-gui";\n content: "\u25BE";\n padding-right: 2px;\n display: inline-block;\n}\n.lil-gui .title:active {\n background: var(--title-background-color);\n opacity: 0.75;\n}\n@media (hover: hover) {\n body:not(.lil-gui-dragging) .lil-gui .title:hover {\n background: var(--title-background-color);\n opacity: 0.85;\n }\n .lil-gui .title:focus {\n text-decoration: underline var(--focus-color);\n }\n}\n.lil-gui.root > .title:focus {\n text-decoration: none !important;\n}\n.lil-gui.closed > .title:before {\n content: "\u25B8";\n}\n.lil-gui.closed > .children {\n transform: translateY(-7px);\n opacity: 0;\n}\n.lil-gui.closed:not(.transition) > .children {\n display: none;\n}\n.lil-gui.transition > .children {\n transition-duration: 300ms;\n transition-property: height, opacity, transform;\n transition-timing-function: cubic-bezier(0.2, 0.6, 0.35, 1);\n overflow: hidden;\n pointer-events: none;\n}\n.lil-gui .children:empty:before {\n content: "Empty";\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n display: block;\n height: var(--widget-height);\n font-style: italic;\n line-height: var(--widget-height);\n opacity: 0.5;\n}\n.lil-gui.root > .children > .lil-gui > .title {\n border: 0 solid var(--widget-color);\n border-width: 1px 0;\n transition: border-color 300ms;\n}\n.lil-gui.root > .children > .lil-gui.closed > .title {\n border-bottom-color: transparent;\n}\n.lil-gui + .controller {\n border-top: 1px solid var(--widget-color);\n margin-top: 0;\n padding-top: var(--spacing);\n}\n.lil-gui .lil-gui .lil-gui > .title {\n border: none;\n}\n.lil-gui .lil-gui .lil-gui > .children {\n border: none;\n margin-left: var(--folder-indent);\n border-left: 2px solid var(--widget-color);\n}\n.lil-gui .lil-gui .controller {\n border: none;\n}\n\n.lil-gui label, .lil-gui input, .lil-gui button {\n -webkit-tap-highlight-color: transparent;\n}\n.lil-gui input {\n border: 0;\n outline: none;\n font-family: var(--font-family);\n font-size: var(--input-font-size);\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n background: var(--widget-color);\n color: var(--text-color);\n width: 100%;\n}\n@media (hover: hover) {\n .lil-gui input:hover {\n background: var(--hover-color);\n }\n .lil-gui input:active {\n background: var(--focus-color);\n }\n}\n.lil-gui input:disabled {\n opacity: 1;\n}\n.lil-gui input[type=text],\n.lil-gui input[type=number] {\n padding: var(--widget-padding);\n -moz-appearance: textfield;\n}\n.lil-gui input[type=text]:focus,\n.lil-gui input[type=number]:focus {\n background: var(--focus-color);\n}\n.lil-gui input[type=checkbox] {\n appearance: none;\n width: var(--checkbox-size);\n height: var(--checkbox-size);\n border-radius: var(--widget-border-radius);\n text-align: center;\n cursor: pointer;\n}\n.lil-gui input[type=checkbox]:checked:before {\n font-family: "lil-gui";\n content: "\u2713";\n font-size: var(--checkbox-size);\n line-height: var(--checkbox-size);\n}\n@media (hover: hover) {\n .lil-gui input[type=checkbox]:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button {\n outline: none;\n cursor: pointer;\n font-family: var(--font-family);\n font-size: var(--font-size);\n color: var(--text-color);\n width: 100%;\n height: var(--widget-height);\n text-transform: none;\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n border: none;\n}\n@media (hover: hover) {\n .lil-gui button:hover {\n background: var(--hover-color);\n }\n .lil-gui button:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button:active {\n background: var(--focus-color);\n}\n\n@font-face {\n font-family: "lil-gui";\n src: url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff");\n}';function Ie(n){let e=document.createElement("style");e.innerHTML=n;let i=document.querySelector("head link[rel=stylesheet], head style");i?document.head.insertBefore(e,i):document.head.appendChild(e)}d(Ie,"_injectStyles");var pe=!1,G=class G{constructor({parent:e,autoPlace:i=e===void 0,container:t,width:o,title:l="Controls",closeFolders:r=!1,injectStyles:s=!0,touchStyles:c=!0}={}){if(this.parent=e,this.root=e?e.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",p=>{(p.code==="Enter"||p.code==="Space")&&(p.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(l),this.parent){this.parent.children.push(this),this.parent.folders.push(this),this.parent.$children.appendChild(this.domElement);return}this.domElement.classList.add("root"),c&&this.domElement.classList.add("allow-touch-styles"),!pe&&s&&(Ie(Fe),pe=!0),t?t.appendChild(this.domElement):i&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),o&&this.domElement.style.setProperty("--width",o+"px"),this._closeFolders=r}add(e,i,t,o,l){if(Object(t)===t)return new J(this,e,i,t);let r=e[i];switch(typeof r){case"number":return new R(this,e,i,t,o,l);case"boolean":return new V(this,e,i);case"string":return new W(this,e,i);case"function":return new D(this,e,i)}console.error("gui.add failed\n property:",i,"\n object:",e,"\n value:",r)}addColor(e,i,t=1){return new N(this,e,i,t)}addFolder(e){let i=new G({parent:this,title:e});return this.root._closeFolders&&i.close(),i}load(e,i=!0){return e.controllers&&this.controllers.forEach(t=>{t instanceof D||t._name in e.controllers&&t.load(e.controllers[t._name])}),i&&e.folders&&this.folders.forEach(t=>{t._title in e.folders&&t.load(e.folders[t._title])}),this}save(e=!0){let i={controllers:{},folders:{}};return this.controllers.forEach(t=>{if(!(t instanceof D)){if(t._name in i.controllers)throw new Error('Cannot save GUI with duplicate property "'.concat(t._name,'"'));i.controllers[t._name]=t.save()}}),e&&this.folders.forEach(t=>{if(t._title in i.folders)throw new Error('Cannot save GUI with duplicate folder "'.concat(t._title,'"'));i.folders[t._title]=t.save()}),i}open(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(e){this._closed!==e&&(this._closed=e,this._callOnOpenClose(this))}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{let i=this.$children.clientHeight;this.$children.style.height=i+"px",this.domElement.classList.add("transition");let t=d(l=>{l.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",t))},"onTransitionEnd");this.$children.addEventListener("transitionend",t);let o=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame(()=>{this.$children.style.height=o+"px"})}),this}title(e){return this._title=e,this.$title.textContent=e,this}reset(e=!0){return(e?this.controllersRecursive():this.controllers).forEach(t=>t.reset()),this}onChange(e){return this._onChange=e,this}_callOnChange(e){this.parent&&this.parent._callOnChange(e),this._onChange!==void 0&&this._onChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(e){this.parent&&this.parent._callOnFinishChange(e),this._onFinishChange!==void 0&&this._onFinishChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onOpenClose(e){return this._onOpenClose=e,this}_callOnOpenClose(e){this.parent&&this.parent._callOnOpenClose(e),this._onOpenClose!==void 0&&this._onOpenClose.call(this,e)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach(e=>e.destroy())}controllersRecursive(){let e=Array.from(this.controllers);return this.folders.forEach(i=>{e=e.concat(i.controllersRecursive())}),e}foldersRecursive(){let e=Array.from(this.folders);return this.folders.forEach(i=>{e=e.concat(i.foldersRecursive())}),e}};d(G,"GUI");var X=G,B=X;C();C();var E=(()=>{let n=new he;return d(function(i){return n.set(i),"#".concat(n.getHexString())},"normalize")})();function ge(n){let e;for(e of n)e()}d(ge,"runAll");function ie(n,e){let i=window.location.href,t=new URL(i),o=new URLSearchParams(t.search);for(let l in n)if(n.hasOwnProperty(l)){let r="".concat(e,".").concat(l);o.set(r,n[l])}t.search=o.toString(),history.pushState({path:t.toString()},"",t.toString())}d(ie,"updateCurrentUrlParamsWithNamespace");function ne(n,e){let i=new URLSearchParams(window.location.search),t={};for(let[o,l]of i)if(o.startsWith("".concat(n,"."))){let r=o.slice(n.length+1);l==="true"||l==="false"?t[r]=l==="true":typeof(e==null?void 0:e[r])=="number"?t[r]=Number(l):t[r]=l}return{namespace:n,params:t}}d(ne,"getUrlParamsWithNamespace");var De=["interactive"];function U(n,e,i){var o,l;let t=i.addFolder("".concat(e.type,"-").concat(e.id));for(let r in e){if(r==="visible"&&t.add(e,r).onChange(s=>{n.updateState(e.id,{[r]:s})}),r==="color"||r==="hoverColor"){e[r]=E(e[r]),t.addColor(e,r).onChange(s=>{n.updateState(e.id,{[r]:s})});continue}if(r==="height"){t.add(e,r,0,20,1).onChange(s=>{n.updateState(e.id,{[r]:s})});continue}if(r==="texture"&&e.texture){(o=t.addFolder("Texture - side").add(e,"texture"))==null||o.onChange(c=>{n.updateState(e.id,{texture:{url:c}})});continue}if(r==="topTexture"&&e.topTexture){(l=t.addFolder("Texture - top").add(e,"topTexture"))==null||l.onChange(c=>{n.updateState(e.id,{topTexture:{url:c}})});continue}if(r==="opacity"){t.add(e,r,0,1,.1).onChange(s=>{n.updateState(e.id,{[r]:s})});continue}De.includes(r)&&t.add(e,r).onChange(s=>{n.updateState(e.id,{[r]:s})})}return e.isInView&&(t.add(e,"isInView").listen().disable(),t.add(e,"isInViewCheck")),{cleanup(){t.destroy()}}}d(U,"renderByProp");C();C();function Te(){let n=[];function e(o,l){var c;let r=Object.values(o.getMapData())[0],s=l;if(s&&H.is(s)){let p=(c=r.getByType("enterprise-location"))==null?void 0:c.find(h=>h.spaces.some(a=>a.id===s.id));p&&(s=p)}return s}d(e,"getHighlightTarget");async function i(o,l){return l instanceof P?o.Camera.focusOn(l.locations.flatMap(r=>r.spaces),O):l instanceof M?o.Camera.focusOn(l.spaces,O):o.Camera.focusOn(l,O)}d(i,"focusOn");function t(o,l,{focus:r=!1}={}){if(!window.enableHighlightCard)return()=>{};let s=e(o,l),c=document.createElement("div");if(c.style.cssText="\n position: absolute;\n top: 20px;\n left: 20px;\n background-color: rgba(30, 30, 30, 0.95);\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);\n border-radius: 12px;\n padding: 24px;\n max-width: 320px;\n z-index: 1000;\n font-family: 'Arial', sans-serif;\n transition: all 0.3s ease;\n color: #e0e0e0;\n ","name"in s){let h=document.createElement("h3");h.textContent=s.name,h.style.cssText="\n margin: 0 0 16px;\n font-size: 22px;\n font-weight: 600;\n color: #ffffff;\n letter-spacing: -0.5px;\n ",c.appendChild(h)}if(s instanceof M){if(s.description){let h=document.createElement("p");h.textContent=s.description,h.style.cssText="\n margin: 0 0 16px;\n font-size: 14px;\n color: #b0b0b0;\n line-height: 1.5;\n ",c.appendChild(h)}if(s.tags&&s.tags.length>0){let h=document.createElement("div");h.style.cssText="\n display: flex;\n flex-wrap: nowrap;\n gap: 8px;\n margin-bottom: 16px;\n overflow-x: hidden;\n max-height: 30px; /* Adjust this value based on your font size and padding */\n ",s.tags.forEach(a=>{let g=document.createElement("span");g.textContent=a,g.style.cssText="\n background-color: #3a3a3a;\n color: #e0e0e0;\n padding: 6px 12px;\n border-radius: 16px;\n font-size: 12px;\n font-weight: 500;\n text-transform: uppercase;\n white-space: nowrap;\n ",h.appendChild(g)}),c.appendChild(h)}}let p;if(!(l instanceof P)){let h=new B({autoPlace:!1});h.domElement.style.cssText="\n position: relative;\n overflow-y: auto;\n margin-top: 16px;\n border-top: 1px solid #444;\n padding-top: 16px;\n ";let a=o.getState(l);a&&(U(o,{id:l.id,...a},h),c.appendChild(h.domElement)),p=h}return document.body.appendChild(c),r&&i(o,s),()=>{c.style.opacity="0",c.style.transform="translateY(-10px)",setTimeout(()=>c.remove(),300),p==null||p.destroy()}}return d(t,"highlightCard"),{highlightCard:t,highlight:(o,l,{focus:r=!0}={})=>{n.length>0&&n.forEach(c=>o.Markers.remove(c));let s=e(o,l);if(s instanceof M)r&&o.Camera.focusOn(s.spaces,O),n.push(...s.spaces.map(c=>o.Markers.add(c,'<div style="padding: 15px; background-color: #ffffff; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); max-width: 250px; position: relative;">\n <h3 style="margin: 0 0 10px; color: #333; font-size: 16px; font-weight: 600;">'.concat(s.name,"</h3>\n ").concat(s.description?'<p style="margin: 0 0 10px; color: #666; font-size: 14px; font-weight: 400;">'.concat(s.description,"</p>"):"","\n ").concat(s.tags?s.tags.map(p=>'<span style="display: inline-block; padding: 3px 8px; background-color: #e0f2f1; color: #00796b; border-radius: 12px; font-size: 12px;">'.concat(p,"</span>")).join(" "):"",'\n <div style="position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 10px solid #ffffff;"></div>\n </div>'),{rank:"always-visible",anchor:"top"})));else if(s instanceof P){r&&o.Camera.focusOn(s.locations.flatMap(h=>h.spaces),O);let c=new Map,p=new Set;s.locations.forEach(h=>{c.has(h.name)||(h.spaces.forEach(a=>{n.push(o.Markers.add(a,'<div style="padding: 12px; background-color: rgba(0, 153, 51, 0.95); border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.3); transform: translateY(-4px); transition: all 0.3s ease;">\n <span style="font-weight: 600; color: #FFFFFF; font-size: 16px; text-shadow: 1px 1px 2px rgba(0,0,0,0.2);">'.concat(h.name,"</span>\n </div>"),{rank:"always-visible"}))}),c.set(h.name,!0))}),s.locations.forEach(h=>{h.coordinates.forEach(a=>{let g="".concat(a.latitude,",").concat(a.longitude);if(!p.has(g)&&!c.has(h.name)){let f=o.Markers.add(a,'<div style="padding: 10px; background-color: rgba(51, 102, 204, 0.9); border-radius: 6px; box-shadow: 0 3px 6px rgba(0,0,0,0.2);">\n <span style="font-weight: 500; color: #FFFFFF; font-size: 16px;">'.concat(h.name,'</span>\n <br>\n <span style="color: #FFFFFF; font-size: 12px; font-weight: 400;">Node</span>\n </div>'),{rank:"always-visible"});p.add(g),n.push(f)}})})}}}}d(Te,"createHighlightControl");var O={duration:300,easing:"ease-in-out"},F=Te();C();var w={search:"",results:void 0,options:{places:{fields:{name:!0,description:!0,link:!0,category:!0},limit:5},locations:{fields:{name:!0,tag:!0,description:!0},limit:5},categories:{fields:{name:!0},limit:5}}};function Oe(n){n.add(w.options.places.fields,"name").name("Places: Name"),n.add(w.options.places.fields,"description").name("Places: Description"),n.add(w.options.places.fields,"link").name("Places: Link"),n.add(w.options.places.fields,"category").name("Places: Category"),n.add(w.options.places,"limit"),n.add(w.options.locations.fields,"name").name("Locations: Name"),n.add(w.options.locations.fields,"tag").name("Locations: Tag"),n.add(w.options.locations.fields,"description").name("Locations: Description"),n.add(w.options.places,"limit"),n.add(w.options.categories.fields,"name").name("Categories: Name")}d(Oe,"createAdvancedSettings");function me(n,e,i){var h;let t=new I,o=i.addFolder("Search");o.open();let l=o.add(w,"search").onChange(async a=>{let g=await e.Search.query(a,w.options);g&&(w.results=g,s(g,t))}),r=document.createElement("div");r.style.marginLeft="10px",(h=l.domElement.parentElement)==null||h.appendChild(r);let{renderSearch:s,close:c}=ze(n,e,r,l.$input),p=o.addFolder("Advanced");return p.close(),Oe(p),document.addEventListener("keydown",a=>{(a.metaKey||a.ctrlKey)&&a.key==="k"?(a.preventDefault(),o._closed&&o.open(),l.$input.focus()):a.key==="Escape"&&(c(),t.publish("highlight",void 0))}),{pubsub:t}}d(me,"createSearchControl");function ze(n,e,i,t){let o,l;t.addEventListener("input",async s=>{s instanceof InputEvent&&(s.inputType==="insertText"||s.inputType==="insertCompositionText")&&(clearTimeout(o),o=setTimeout(async()=>{var p;let c=await e.Search.suggest(t.value);c&&c.length>0&&r((p=c[0])==null?void 0:p.suggestion)},100))});function r(s){if(!s){t.placeholder="";return}let c=t.value;t.value=s,t.setSelectionRange(c.length,s.length)}return d(r,"renderSuggestion"),{renderSearch(s,c){var p,h;if(s.places.length===0&&((p=s.enterpriseCategories)==null?void 0:p.length)===0&&((h=s.enterpriseLocations)==null?void 0:h.length)===0){i.textContent="No results found.";return}l=He(i,s,n,c)},close(){l.destroy()}}}d(ze,"mount");function He(n,e,i,t){n.innerHTML="";let o=document.createElement("div");Object.assign(o.style,j.dropdownContainer);let l=document.createElement("ul");l.className="options-list",Object.assign(l.style,j.optionsList),l.style.display="block";let r=[],s=d((g,f)=>{if(f&&f.length>0){let u=document.createElement("li");u.textContent=g,Object.assign(u.style,j.sectionHeader),l.appendChild(u),f.forEach((b,y)=>{let m=document.createElement("li");m.textContent="".concat("name"in b.item?b.item.name:""," (").concat(b.type,")"),Object.assign(m.style,j.option),m.tabIndex=0,m.addEventListener("focus",()=>{p(r.indexOf(m))}),m.addEventListener("mouseover",()=>{m.style.backgroundColor="#f0f0f0"}),m.addEventListener("mouseout",()=>{m.style.backgroundColor=""}),m.addEventListener("click",()=>{}),m.setAttribute("data-type",g),m.setAttribute("data-index",y.toString()),l.appendChild(m),r.push(m)})}},"addSection");s("enterpriseLocations",e.enterpriseLocations),s("enterpriseCategories",e.enterpriseCategories),s("Places",e.places),o.appendChild(l),n.appendChild(o);let c=[],p=d(g=>{c.forEach(m=>m()),c=[],r.forEach((m,v)=>{v===g?m.style.backgroundColor="#e0e0e0":m.style.backgroundColor=""});let f=r[g],u=f.getAttribute("data-type"),b=parseInt(f.getAttribute("data-index")||"0",10);if(!u)return;let{item:y}=e[u][b];F.highlight(i,y),t.publish("highlight",y)},"highlightOption"),h=d(g=>{!o.contains(g.target)&&g.target!==n&&a()},"handleClickOutside");document.addEventListener("click",h);let a=d(()=>{n.innerHTML="",document.removeEventListener("click",h)},"destroy");return{destroy(){n.innerHTML="",t.publish("highlight",void 0)}}}d(He,"createCustomDropdown");var j={dropdownContainer:{position:"absolute",color:"#202020"},optionsList:{display:"block",zIndex:"1002",position:"relative",maxHeight:"200px",overflowY:"auto",border:"1px solid #ccc",backgroundColor:"#fff",listStyleType:"none",margin:"0",padding:"0"},sectionHeader:{fontWeight:"bold",padding:"5px",backgroundColor:"#f0f0f0"},option:{padding:"5px",cursor:"pointer"}};function fe(n,e,i){i.domElement.id="interactionPanel";let t=[],{pubsub:o}=me(n,e,i);o.on("highlight",h=>{if(h){t.forEach(g=>g()),t=[];let a=h instanceof M?h.spaces[0]:h;if(a&&!H.is(a))return;t.push(F.highlightCard(n,a,{focus:!0}))}else t.forEach(a=>a()),t=[]});let l=i.addFolder("Click \u{1F447}").close(),{sub:r}=Pe(n,l);r.on("click",h=>{t.forEach(a=>a()),t=[],h.spaces[0]&&(t=[F.highlightCard(n,h.spaces[0])])});let s=i.addFolder("Hover \u{1F681}").close(),{sub:c}=Ge(n,s),p;c.on("hover",h=>{h.spaces[0]?(p==null||p(),t.length===0&&(p=F.highlightCard(n,h.spaces[0]))):(p==null||p(),p=void 0)})}d(fe,"createInteractionControls");function Pe(n,e){let i=new I,t={position:"",hoverColor:E(n.getHoverColor())},o=e.add(t,"position").disable(),l=[];function r(){l.forEach(c=>c()),l.length=0}d(r,"reset");let s=0;return n.on("click",c=>{var u;let{labels:p,markers:h,coordinate:a}=c;r(),i.publish("click",c),clearInterval(s),o.load(JSON.stringify([a.longitude,a.latitude]));let g=p[0]||h[0];if(g){let b=re(n,g,e);if(!b)return;l.push(b.destroy),b.labelItemFolder.openAnimated()}let f=(u=c.spaces[0])!=null?u:c.objects[0];if(f){let b={id:f.id,...n.getState(f.id),type:f.type,isInView:!1,isInViewCheck:oe(n,f.id)},{cleanup:y}=U(n,b,e);s=setInterval(()=>{b.isInView=n.isInView(g||f)},500),l.push(y)}}),{sub:i}}d(Pe,"createClickControls");function Ge(n,e){let i=new I;n.setHoverColor("#1f3a7a");let t={position:"",hoverColor:E(n.getHoverColor()),intersected:"",type:"",id:""},o=e.add(t,"position").disable();e.add(t,"id").disable().listen(),e.add(t,"type").disable().listen(),e.addColor(t,"hoverColor").onChange(s=>{n.setHoverColor(s)});let l=[];function r(){l.forEach(s=>s()),l.length=0}return d(r,"reset"),n.on("hover",s=>{var b,y,m;let{coordinate:c,spaces:p,objects:h,markers:a,labels:g}=s;r(),i.publish("hover",s),o.load(JSON.stringify([c.longitude,c.latitude]));let f=(m=(y=(b=p[0])!=null?b:h[0])!=null?y:a[0])!=null?m:g[0];if(!f)return;let u=n.getState(f);u&&(t.type=u.type,t.id=f.id)}),{sub:i}}d(Ge,"createHoverControls");function oe(n,e){return d(function(){console.log("isInView",n.isInView(e))},"isInView")}d(oe,"createIsInViewHandler");function be(n,e,i){let t={labels:{},all(){i.Labels.all().forEach(f=>{this.labels[f.id]=f}),c()},removeAllLabels(){i.Labels.removeAll().forEach(f=>{delete this.labels[f.id]}),c()}},{addLabel:o,destroy:l}=Be(n,i);n.add(t,"all"),n.add(t,"removeAllLabels");let r=n.addFolder("Label List");n.close();let s=new Map,{rerender:c}=p();function p(){function g(b){var y;delete t.labels[b.id],(y=s.get(b.id))==null||y.destroy()}d(g,"remove");function f(b){let y=re(i,b,r,{onRemove:v=>{g(v)}});if(!y)return;let{labelItemFolder:m}=y;s.set(b.id,m)}d(f,"add");function u(){r.destroy(),r=n.addFolder("Label");for(let b in t.labels){let y=t.labels[b];f(y)}}return d(u,"rerender"),{rerender:u,add:f,remove:g}}d(p,"createLabelControls"),n.domElement.classList.add("list-items");let h;i.on("click",({labels:g,coordinate:f})=>{if(!n._closed)if(g[0]){h==null||h.close();let u=s.get(g[0].id);if(n.open(),!u)return;u==null||u.open(),u==null||u.domElement.scrollIntoView({block:"start"}),u==null||u.domElement.focus(),h=u}else o(f)});function a(g){for(let f of g)t.labels[f.id]=f;c()}return d(a,"populatelabels"),{populatelabels:a,destroy(){l()}}}d(be,"createLabelControls");function re(n,e,i,{onRemove:t}={}){var p,h,a,g;let o=i.addFolder("".concat((p=e.text)==null?void 0:p.substring(0,12)));o.onChange(f=>{n.updateState(e,{appearance:c.appearance,interactive:c.interactive})}),o.close();let l=n.getState(e);if((l==null?void 0:l.type)!=="label")throw new Error("error getting state for label: ".concat(e.id));let{appearance:r,interactive:s}=l;if(!r||r.margin==null||s==null)throw new Error("incomplte label state");let c={text:e.text,interactive:s,appearance:{...r,margin:r.margin||0,marker:{foregroundColor:(a=(h=r.marker)==null?void 0:h.foregroundColor)!=null&&a.active?E((g=r.marker.foregroundColor)==null?void 0:g.active):"black"},text:{foregroundColor:E(r.text.foregroundColor)}},remove(){n.Labels.remove(e),t==null||t(e),o.destroy()},isInView:oe(n,e.id)};return o.add(c.appearance,"margin",0,20).name("margin"),o.add(c,"text"),o.add(c,"interactive"),o.addColor(c.appearance.marker,"foregroundColor").name("marker foreground"),o.addColor(c.appearance.text,"foregroundColor").name("text forground"),o.add(c,"isInView"),o.add(c,"remove"),{labelItemFolder:o,destroy(){o.destroy()}}}d(re,"addLabelControlToFolder");function Be(n,e){let i=n.addFolder("Add"),t={onClick:!1,margin:0,text:"New Label!",interactive:!0,marginForegroundColor:E("skyblue"),marginBackgroundColor:E("coral"),textForegroundColor:E("slategray"),textBackgroundColor:E("white")};return i.add(t,"onClick"),i.add(t,"margin"),i.add(t,"interactive"),i.add(t,"text"),i.addColor(t,"marginForegroundColor"),i.addColor(t,"marginBackgroundColor"),i.addColor(t,"textForegroundColor"),i.addColor(t,"textBackgroundColor"),{destroy(){i.destroy()},addLabel(o){return i._closed||!t.onClick?void 0:e.Labels.add(o,t.text,{appearance:{margin:t.margin,marker:{foregroundColor:{active:t.marginForegroundColor,inactive:t.marginForegroundColor},backgroundColor:{active:t.marginBackgroundColor,inactive:t.marginBackgroundColor}},text:{foregroundColor:t.textForegroundColor,backgroundColor:t.marginBackgroundColor}},interactive:t.interactive})}}}d(Be,"createAddControl");var ve={};C();var ye="camera-ui";function xe(n,e,i){var z,le;let t=n.addFolder("Camera \u{1F4F7}").onOpenClose(x=>{ie({opened:!x._closed},ye)}),{params:o}=ne(ye);o.opened||t.close();let l=e.Camera.center.toJSON(),r=document.createElement("div");Object.assign(r.style,{display:"none",position:"absolute",left:"0px",top:"0px",bottom:"0px",right:"0px",backgroundColor:"aqua",pointerEvents:"none",opacity:.5}),document.body.appendChild(r);let[s,c,p,h]=(z=i==null?void 0:i.padding)!=null?z:[],a={center_lat:l.latitude,center_lon:l.longitude,zoomLevel:e.Camera.zoomLevel,pitch:e.Camera.pitch,bearing:e.Camera.bearing,minZoomLevel:e.Camera.minZoomLevel,maxZoomLevel:e.Camera.maxZoomLevel,inset_type:"pixel",inset_top:s!=null?s:0,inset_left:h!=null?h:0,inset_right:c!=null?c:0,inset_bottom:p!=null?p:0,animateOnLoad:!0,persist:()=>{ie(t.save().controllers,"camera"),navigator.clipboard.writeText(window.location.href)},visualizeInset:!!(s||c||p||h),"Focus on click":(le=i==null?void 0:i.focusOnClick)!=null?le:!0,"Focus on current floor":()=>{e.Camera.focusOn([e.currentFloor],{screenOffsets:{top:20,left:20,right:20,bottom:20}})}};function g(){a.inset_type==="portion"?Object.assign(r.style,{left:a.inset_left*u+"px",top:a.inset_top*f+"px",bottom:a.inset_bottom*f+"px",right:a.inset_right*u+"px"}):Object.assign(r.style,{left:a.inset_left+"px",top:a.inset_top+"px",bottom:a.inset_bottom+"px",right:a.inset_right+"px"})}d(g,"updateInsetVisualizer"),t.add(a,"center_lat").listen().disable(),t.add(a,"center_lon").listen().disable(),t.add(a,"zoomLevel",16,22,.5).listen().disable(),t.add(a,"pitch").listen().disable(),t.add(a,"bearing").listen().disable(),t.add(a,"minZoomLevel",5,22,.5).onChange(x=>{e.Camera.setMinZoomLevel(x)}),t.add(a,"maxZoomLevel",10,22,.5).onChange(x=>{e.Camera.setMaxZoomLevel(x)}),t.add(a,"animateOnLoad"),t.add(a,"visualizeInset").onChange($),$(a.visualizeInset);let{innerHeight:f,innerWidth:u}=window;t.add(a,"inset_type",["pixel","portion"]).onChange(A),t.add(a,"inset_top",0,f).onChange(A),t.add(a,"inset_bottom",0,f).onChange(A),t.add(a,"inset_left",0,u).onChange(A),t.add(a,"inset_right",0,u).onChange(A);let b=je(e);t.add(a,"Focus on click").onChange(x=>{x?e.on("click",b):e.off("click",b)}),a["Focus on click"]&&e.on("click",b),t.add(a,"persist"),t.add(a,"Focus on current floor");let y=d(x=>{t._closed||(a.center_lat=x.center.latitude,a.center_lon=x.center.longitude,a.zoomLevel=x.zoomLevel,a.bearing=x.bearing,a.pitch=x.pitch)},"onCameraChanged");e.on("camera-change",y);let{params:m}=ne("camera",a);if(Object.keys(m).length>0){let x=m;e.Camera.setScreenOffsets({top:x.inset_top,left:x.inset_left,right:x.inset_right,bottom:x.inset_bottom,type:x.inset_type});let de={pitch:x.pitch,center:new ce(x.center_lat,x.center_lon),bearing:x.bearing,zoomLevel:x.zoomLevel};x.animateOnLoad?e.Camera.animateTo(de):e.Camera.set(de),t.load({controllers:x,folders:{}}),g()}let v=[()=>{e.off("camera-change",y)}];function A(){e.Camera.setScreenOffsets({top:a.inset_top,left:a.inset_left,right:a.inset_right,bottom:a.inset_bottom,type:a.inset_type}),g()}d(A,"updateInset"),(a.inset_top||a.inset_right||a.inset_bottom||a.inset_left)&&A();function $(x){x?r.style.display="block":r.style.display="none"}return d($,"visualizeInsetUpdated"),()=>({destroy(){t.destroy(),ge(v)}})}d(xe,"createCameraControls");function je(n){return d(function(i){var r;let{spaces:t,objects:o}=i,l=(r=t[0])!=null?r:o[0];l&&n.Camera.focusOn(l,{bearing:300,pitch:65})},"handler")}d(je,"createHandler");C();function Ce(n,e,i){let t={markers:{},removeAllMarkers(){i.Markers.removeAll().forEach(f=>{delete this.markers[f.id]}),c()}},{addMarker:o,destroy:l}=Ye(n,i);n.add(t,"removeAllMarkers");let r=n.addFolder("Marker List");n.close();let s=new Map,{rerender:c}=p();function p(){function g(b){var y;delete t.markers[b.id],(y=s.get(b.id))==null||y.destroy()}d(g,"remove");function f(b){let y=Ve(i,b,r,{onRemove:v=>{g(v)}});if(!y)return;let{markerItemFolder:m}=y;s.set(b.id,m)}d(f,"add");function u(){r.destroy(),r=n.addFolder("marker");for(let b in t.markers){let y=t.markers[b];f(y)}}return d(u,"rerender"),{rerender:u,add:f,remove:g}}d(p,"createMarkerControls"),n.domElement.classList.add("list-items");let h;i.on("click",({markers:g,coordinate:f})=>{if(!n._closed)if(g[0]){h==null||h.close();let u=s.get(g[0].id);if(n.open(),!u)return;u==null||u.open(),u==null||u.domElement.scrollIntoView({block:"start"}),u==null||u.domElement.focus(),h=u}else o(f)});function a(g){for(let f of g)t.markers[f.id]=f;c()}return d(a,"populateMarkers"),{populateMarkers:a,destroy(){l()}}}d(Ce,"createMarkerControls");function Ve(n,e,i,{onRemove:t}={}){let o=i.addFolder("".concat(e.id.toString().substring(0,8)));o.onChange(c=>{n.updateState(e,{interactive:s.interactive})}),o.close();let l=n.getState(e);if((l==null?void 0:l.type)!=="marker")throw new Error("error getting state for marker: ".concat(e.id));let{interactive:r}=l;if(r==null)throw new Error("incomplte label state");let s={interactive:r,remove(){n.Markers.remove(e),t==null||t(e),o.destroy()}};return o.add(s,"interactive"),o.add(s,"remove"),{markerItemFolder:o,destroy(){o.destroy()}}}d(Ve,"addMarkerControlToFolder");function Ye(n,e){let i=n.addFolder("Add"),t={onClick:!1,interactive:!0};return i.add(t,"onClick"),i.add(t,"interactive"),{destroy(){i.destroy()},addMarker(o){return i._closed||!t.onClick?void 0:e.Markers.add(o,"<div>New Marker</div>",{interactive:t.interactive})}}}d(Ye,"createAddControl");C();function Ae(n,e){let i=n.addFolder("Walls").close(),t={visible:!0,topColor:"#b1fa87",color:"#e8e8e8",texture:{url:""},topTexture:{url:""}};i.add(t,"visible").onChange(r=>{e.updateState("walls",{visible:r})}),i.addColor(t,"topColor").onChange(r=>{e.updateState("walls",{topColor:r})}),i.addColor(t,"color").onChange(r=>{e.updateState("walls",{color:r})}),i.addFolder("Texture - side").add(t.texture,"url").onFinishChange(r=>{e.updateState("walls",{texture:{url:r}})}),i.addFolder("Texture - top").add(t.topTexture,"url").onFinishChange(r=>{e.updateState("walls",{topTexture:{url:r}})}),e.updateState("walls",{topColor:t.topColor}),e.updateState("walls",{color:t.color})}d(Ae,"createGeometryControl");C();function we(n,e,i){var l,r;n.close();let t={language:(r=(l=i.currentLanguage)==null?void 0:l.code)!=null?r:"en"},o=i.getByType("enterprise-venue");n.add(t,"language",o==null?void 0:o.languages.map(s=>s.code)).onChange(s=>{i.changeLanguage(s)})}d(we,"createMiscControl");function Ee(n,e,i){Ne();let t=new B({title:"SDK Controls"});t.domElement.classList.add("mappedin-js-inspector"),fe(e,n,t),xe(t,e,i==null?void 0:i.camera);let o=t.addFolder("Levels").close(),l=t.addFolder("Scene Controls");l.close();let r=t.addFolder("Labels"),s=t.addFolder("Markers");Ae(t,e);let c=t.addFolder("misc");we(c,e,n);let p={level:e.currentFloor.id},{populatelabels:h}=be(r,n,e),{populateMarkers:a}=Ce(s,n,e),g=n.getByType("floor").reduce((u,b)=>(u[b.name]=b.id,u),{}),f=o.add(p,"level",g).onChange(u=>{e.setFloor(u),p.level=e.currentFloor.id,f.updateDisplay()});return e.on("floor-change-start",u=>{o.controllers[0].setValue(u.floor.id)}),n.getByType("space").forEach(u=>{e.updateState(u,{interactive:!0})}),n.getByType("object").forEach(u=>{e.updateState(u,{interactive:!0})}),n.getByType("object").forEach(u=>{e.updateState(u,{interactive:!0})}),e.setHoverColor("#a2b7e6"),e.Camera.setMaxZoomLevel(20),{populatelabels:h,sceneFolder:l,populateMarkers:a}}d(Ee,"createUi");var _e="mappedin-sdk-debug-css";function Ne(){if(document.getElementById(_e))return;let n=document.createElement("style");n.id=_e,n.textContent=ve,document.head.appendChild(n)}d(Ne,"injectCss");var ae=class ae{constructor(e,i){L(this,"_enabled",!1);L(this,"mv");L(this,"api");L(this,"mapData");L(this,"scenegraphVisualizerMounted",!1);L(this,"storeStateToLocalStorageEnabled",!1);this.mv=e,this.api=i,this.mapData=this.api.getMapData()}setMapData(e){this.mapData=e}async enable(e={}){var t;if(this._enabled)return;if(this._enabled=!0,!this.mapData)throw new Error("Please set mapData before enable debug.");let{sceneFolder:i}=Ee(this.mapData,this.mv,e);i.onOpenClose(o=>{o===i&&!o._closed&&!this.scenegraphVisualizerMounted&&(this.scenegraphVisualizerMounted=!0,ue(this.api.core,i))}),(t=this.api.getMapDataInternal())==null||t.spaces.forEach(o=>{this.mv.updateState(o.id,{interactive:!0})})}get enabled(){return this._enabled}};d(ae,"Inspector");var se=ae;export{se as Inspector};