@vertexvis/viewer 1.0.2-canary.20 → 1.0.2-canary.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/cjs/{controller-CMJs6F-h.js → controller-C74GX70e.js} +60 -4
  2. package/dist/cjs/controller-C74GX70e.js.map +1 -0
  3. package/dist/cjs/index.cjs.js +1 -1
  4. package/dist/cjs/vertex-scene-tree.cjs.entry.js +1 -1
  5. package/dist/cjs/vertex-viewer-pin-group.cjs.entry.js +1 -1
  6. package/dist/collection/components/scene-tree/lib/jwt.js +1 -1
  7. package/dist/collection/components/scene-tree/lib/jwt.js.map +1 -1
  8. package/dist/components/index.js +1 -1
  9. package/dist/components/{p-B7C1GfGS.js → p-BmoTo_-J.js} +2 -2
  10. package/dist/components/p-CnYEgl0H.js +5 -0
  11. package/dist/components/p-CnYEgl0H.js.map +1 -0
  12. package/dist/components/vertex-scene-tree.js +1 -1
  13. package/dist/components/vertex-viewer-pin-group.js +1 -1
  14. package/dist/components/vertex-viewer-pin-tool.js +1 -1
  15. package/dist/esm/{controller-vXSti_qr.js → controller-CE2DwTNf.js} +60 -4
  16. package/dist/esm/controller-CE2DwTNf.js.map +1 -0
  17. package/dist/esm/index.js +1 -1
  18. package/dist/esm/index.mjs +1 -1
  19. package/dist/esm/vertex-scene-tree.entry.js +1 -1
  20. package/dist/esm/vertex-viewer-pin-group.entry.js +1 -1
  21. package/dist/types/components/scene-tree/lib/jwt.d.ts +1 -1
  22. package/dist/viewer/index.esm.js +1 -1
  23. package/dist/viewer/{p-4b5a62da.entry.js → p-06c99572.entry.js} +2 -2
  24. package/dist/viewer/{p-61188ccc.entry.js → p-72479c7e.entry.js} +2 -2
  25. package/dist/viewer/p-CnYEgl0H.js +5 -0
  26. package/dist/viewer/p-CnYEgl0H.js.map +1 -0
  27. package/dist/viewer/viewer.esm.js +1 -1
  28. package/package.json +8 -8
  29. package/dist/cjs/controller-CMJs6F-h.js.map +0 -1
  30. package/dist/components/p-BNfR95Px.js +0 -5
  31. package/dist/components/p-BNfR95Px.js.map +0 -1
  32. package/dist/esm/controller-vXSti_qr.js.map +0 -1
  33. package/dist/viewer/p-BNfR95Px.js +0 -5
  34. package/dist/viewer/p-BNfR95Px.js.map +0 -1
  35. /package/dist/components/{p-B7C1GfGS.js.map → p-BmoTo_-J.js.map} +0 -0
  36. /package/dist/viewer/{p-4b5a62da.entry.js.map → p-06c99572.entry.js.map} +0 -0
  37. /package/dist/viewer/{p-61188ccc.entry.js.map → p-72479c7e.entry.js.map} +0 -0
package/dist/esm/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
3
3
  */
4
4
  export { C as Camera, c as ColorMaterial, a as CrossSectioner, I as ItemOperationBuilder, l as LoadableResource, M as ModelViewController, P as PmiAnnotationOperationsBuilder, b as PmiAnnotationsQueryExecutor, k as PmiController, R as Raycaster, d as RootQuery, S as Scene, e as SceneElementQueryExecutor, f as SceneElementsOperationExecutor, g as SceneItemOperationsBuilder, h as SceneItemQueryExecutor, i as SceneItemsOperationExecutor, s as SceneViewStateIdentifier, j as SynchronizedClock } from './queries-QH1oo_4S.js';
5
- export { S as SceneTreeController } from './controller-vXSti_qr.js';
5
+ export { S as SceneTreeController } from './controller-CE2DwTNf.js';
6
6
  export { f as fromNodeProto, i as isLoadedRow } from './row-CiSHWNC4.js';
7
7
  export { S as SCENE_ITEM_NAME_METADATA_KEY } from './types-BZwvQkyb.js';
8
8
  export { C as CursorManager, b as boxQueryCursor, l as labelPinCursor, m as measurementCursor, a as measurementWithArrowCursor, p as pinCursor } from './cursors-BZIUECuW.js';
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
3
3
  */
4
4
  export { C as Camera, c as ColorMaterial, a as CrossSectioner, I as ItemOperationBuilder, l as LoadableResource, M as ModelViewController, P as PmiAnnotationOperationsBuilder, b as PmiAnnotationsQueryExecutor, k as PmiController, R as Raycaster, d as RootQuery, S as Scene, e as SceneElementQueryExecutor, f as SceneElementsOperationExecutor, g as SceneItemOperationsBuilder, h as SceneItemQueryExecutor, i as SceneItemsOperationExecutor, s as SceneViewStateIdentifier, j as SynchronizedClock } from './queries-QH1oo_4S.js';
5
- export { S as SceneTreeController } from './controller-vXSti_qr.js';
5
+ export { S as SceneTreeController } from './controller-CE2DwTNf.js';
6
6
  export { f as fromNodeProto, i as isLoadedRow } from './row-CiSHWNC4.js';
7
7
  export { S as SCENE_ITEM_NAME_METADATA_KEY } from './types-BZwvQkyb.js';
8
8
  export { C as CursorManager, b as boxQueryCursor, l as labelPinCursor, m as measurementCursor, a as measurementWithArrowCursor, p as pinCursor } from './cursors-BZIUECuW.js';
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
3
3
  */
4
4
  import { h, F as Fragment, r as registerInstance, c as createEvent, f as forceUpdate, H as Host, a as getElement } from './index-CCVkga9Q.js';
5
- import { s as scene_tree_api_pb_serviceExports, w as webSocketSubscriptionTransportFactory, S as SceneTreeController, a as SceneTreeErrorCode, b as SceneTreeErrorDetails } from './controller-vXSti_qr.js';
5
+ import { s as scene_tree_api_pb_serviceExports, w as webSocketSubscriptionTransportFactory, S as SceneTreeController, a as SceneTreeErrorCode, b as SceneTreeErrorDetails } from './controller-CE2DwTNf.js';
6
6
  import { p as parseAndValidateConfig } from './config-DmMWdXwM.js';
7
7
  import { i as isSceneTreeTableCellElement } from './utils-DC86ZXai.js';
8
8
  import { g as getSceneTreeContainsElement } from './dom-DX6pEG54.js';
@@ -3,7 +3,7 @@
3
3
  */
4
4
  import { h, F as Fragment, r as registerInstance } from './index-CCVkga9Q.js';
5
5
  import { p as point, m as matrix4, v as vector3 } from './bundle-Q_Zx-nhC.js';
6
- import './controller-vXSti_qr.js';
6
+ import './controller-CE2DwTNf.js';
7
7
  import './cursors-BZIUECuW.js';
8
8
  import './geometry_pb-DoP02GfD.js';
9
9
  import './wrappers_pb-aFAwKqIf.js';
@@ -1,4 +1,4 @@
1
- import { JwtPayload } from 'jwt-decode';
1
+ import { type JwtPayload } from 'jwt-decode';
2
2
  export interface SceneTreeJwtToken extends JwtPayload {
3
3
  view: string;
4
4
  }
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
3
3
  */
4
- export{C as Camera,c as ColorMaterial,a as CrossSectioner,I as ItemOperationBuilder,l as LoadableResource,M as ModelViewController,P as PmiAnnotationOperationsBuilder,b as PmiAnnotationsQueryExecutor,k as PmiController,R as Raycaster,d as RootQuery,S as Scene,e as SceneElementQueryExecutor,f as SceneElementsOperationExecutor,g as SceneItemOperationsBuilder,h as SceneItemQueryExecutor,i as SceneItemsOperationExecutor,s as SceneViewStateIdentifier,j as SynchronizedClock}from"./p-D2RT3bhF.js";export{S as SceneTreeController}from"./p-BNfR95Px.js";export{f as fromNodeProto,i as isLoadedRow}from"./p-CiSHWNC4.js";export{S as SCENE_ITEM_NAME_METADATA_KEY}from"./p-BZwvQkyb.js";export{C as CursorManager,b as boxQueryCursor,l as labelPinCursor,m as measurementCursor,a as measurementWithArrowCursor,p as pinCursor}from"./p-Fn5MVjY7.js";export{M as MeasurementController,a as MeasurementEntity}from"./p-DIoDQtCY.js";export{M as MeasurementModel}from"./p-BydhCz78.js";export{M as MeasurementOverlayManager}from"./p-D056d_sC.js";export{m as makeMinimumDistanceResult}from"./p-CEvrpx3k.js";import{v as r,q as o,m as n}from"./p-Q_Zx-nhC.js";export{T as TransformController}from"./p-B6evXeur.js";export{f as flattenPointArray,a as toDegreesTransform,e as toLocalTransform,b as toMatrix,t as toRadiansTransform,c as toTransform,d as toWorldTransform}from"./p-DQCZcLRK.js";export{A as AngleUnits,h as AreaUnits,c as CrossSectioning,D as DistanceUnits,f as FrameCamera,F as FrameCameraBase,O as Orientation,a as ReceivedFrame,b as ReceivedFrameImage,d as ReceivedFrameScene,e as ReceivedOrthographicCamera,g as ReceivedPerspectiveCamera,S as StandardView}from"./p-CklOj07G.js";export{E as EntityType}from"./p-BAhfr1Nx.js";export{A as ArrowMarkup,C as CircleMarkup,F as FreeformMarkup}from"./p-DgZfSIH7.js";export{V as Viewport}from"./p-DYUbh6Nm.js";export{V as VolumeIntersectionQueryController,a as VolumeIntersectionQueryModel}from"./p-DTI-5PTR.js";import"./p-JEG5R8Jl.js";import"./p-CG9AChtV.js";import"./p--8q6LyIm.js";import"./p-ux1ckSDN.js";import"./p-DMF55xeL.js";import"./p-BNuMPeJ8.js";import"./p-CjG1fMh1.js";import"./p-CFO_kjVc.js";import"./p-DNj37429.js";const u=.9999;function x(e){const a=r.create(0,e.z,-e.y);const o=r.create(-e.z,0,e.x);const s=r.magnitudeSquared(a)>r.magnitudeSquared(o)?a:o;return r.normalize(r.cross(e,s))}function y(e,a){const s=r.dot(e,a);if(s>u){const r=x(e);const a=o.fromAxisAngle(r,Math.PI);return n.transpose(n.makeRotation(a))}else if(s<=-u){return n.makeIdentity()}else{const s=r.angleTo(a,e);const t=r.normalize(r.cross(e,a));return n.transpose(n.makeRotation(o.fromAxisAngle(t,s+Math.PI)))}}function v(e,a,o,s){const t=y(e,o);const m=n.makeTranslation(s);return n.multiply(n.makeTranslation(r.negate(a)),n.multiply(t,m))}var _=Object.freeze({__proto__:null,ALMOST_ONE:u,calculateOrthogonalCoordinate:x,computeRotationMatrix:y,computeTransformationDelta:v});export{_ as TransformationDelta};
4
+ export{C as Camera,c as ColorMaterial,a as CrossSectioner,I as ItemOperationBuilder,l as LoadableResource,M as ModelViewController,P as PmiAnnotationOperationsBuilder,b as PmiAnnotationsQueryExecutor,k as PmiController,R as Raycaster,d as RootQuery,S as Scene,e as SceneElementQueryExecutor,f as SceneElementsOperationExecutor,g as SceneItemOperationsBuilder,h as SceneItemQueryExecutor,i as SceneItemsOperationExecutor,s as SceneViewStateIdentifier,j as SynchronizedClock}from"./p-D2RT3bhF.js";export{S as SceneTreeController}from"./p-CnYEgl0H.js";export{f as fromNodeProto,i as isLoadedRow}from"./p-CiSHWNC4.js";export{S as SCENE_ITEM_NAME_METADATA_KEY}from"./p-BZwvQkyb.js";export{C as CursorManager,b as boxQueryCursor,l as labelPinCursor,m as measurementCursor,a as measurementWithArrowCursor,p as pinCursor}from"./p-Fn5MVjY7.js";export{M as MeasurementController,a as MeasurementEntity}from"./p-DIoDQtCY.js";export{M as MeasurementModel}from"./p-BydhCz78.js";export{M as MeasurementOverlayManager}from"./p-D056d_sC.js";export{m as makeMinimumDistanceResult}from"./p-CEvrpx3k.js";import{v as r,q as o,m as n}from"./p-Q_Zx-nhC.js";export{T as TransformController}from"./p-B6evXeur.js";export{f as flattenPointArray,a as toDegreesTransform,e as toLocalTransform,b as toMatrix,t as toRadiansTransform,c as toTransform,d as toWorldTransform}from"./p-DQCZcLRK.js";export{A as AngleUnits,h as AreaUnits,c as CrossSectioning,D as DistanceUnits,f as FrameCamera,F as FrameCameraBase,O as Orientation,a as ReceivedFrame,b as ReceivedFrameImage,d as ReceivedFrameScene,e as ReceivedOrthographicCamera,g as ReceivedPerspectiveCamera,S as StandardView}from"./p-CklOj07G.js";export{E as EntityType}from"./p-BAhfr1Nx.js";export{A as ArrowMarkup,C as CircleMarkup,F as FreeformMarkup}from"./p-DgZfSIH7.js";export{V as Viewport}from"./p-DYUbh6Nm.js";export{V as VolumeIntersectionQueryController,a as VolumeIntersectionQueryModel}from"./p-DTI-5PTR.js";import"./p-JEG5R8Jl.js";import"./p-CG9AChtV.js";import"./p--8q6LyIm.js";import"./p-ux1ckSDN.js";import"./p-DMF55xeL.js";import"./p-BNuMPeJ8.js";import"./p-CjG1fMh1.js";import"./p-CFO_kjVc.js";import"./p-DNj37429.js";const u=.9999;function x(e){const a=r.create(0,e.z,-e.y);const o=r.create(-e.z,0,e.x);const s=r.magnitudeSquared(a)>r.magnitudeSquared(o)?a:o;return r.normalize(r.cross(e,s))}function y(e,a){const s=r.dot(e,a);if(s>u){const r=x(e);const a=o.fromAxisAngle(r,Math.PI);return n.transpose(n.makeRotation(a))}else if(s<=-u){return n.makeIdentity()}else{const s=r.angleTo(a,e);const t=r.normalize(r.cross(e,a));return n.transpose(n.makeRotation(o.fromAxisAngle(t,s+Math.PI)))}}function v(e,a,o,s){const t=y(e,o);const m=n.makeTranslation(s);return n.multiply(n.makeTranslation(r.negate(a)),n.multiply(t,m))}var _=Object.freeze({__proto__:null,ALMOST_ONE:u,calculateOrthogonalCoordinate:x,computeRotationMatrix:y,computeTransformationDelta:v});export{_ as TransformationDelta};
5
5
  //# sourceMappingURL=index.esm.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
3
3
  */
4
- import{h as i,F as t,r as e}from"./p-CCVkga9Q.js";import{p as n,m as o,v as s}from"./p-Q_Zx-nhC.js";import"./p-BNfR95Px.js";import"./p-Fn5MVjY7.js";import"./p-DNj37429.js";import"./p-BNuMPeJ8.js";import"./p-ux1ckSDN.js";import"./p-CFO_kjVc.js";import"./p-CklOj07G.js";import"./p-DMF55xeL.js";import"./p-BAhfr1Nx.js";import{V as r}from"./p-DYUbh6Nm.js";import{g as a,i as l,b as d,P as p,a as h,c}from"./p-7xxxLGmF.js";import{c as v}from"./p-Dw4-tG-V.js";import"./p--8q6LyIm.js";import"./p-JEG5R8Jl.js";import"./p-CG9AChtV.js";import"./p-CiSHWNC4.js";const u=({pin:e,selected:n,occluded:o,detached:s})=>{const{primaryColor:r}=a(e);return i(t,null,d(e)&&i("div",{id:"pin-anchor",class:v("pin-anchor",{selected:n,"pin-occluded":o,"pin-detached":s}),style:{background:r}}),l(e)&&i("vertex-viewer-icon",{name:"pin-fill",size:"lg",class:v("pin",{"pin-selected":n,"pin-occluded":o,"pin-detached":s}),style:{color:r}}))};function b(i,t,e){const o={x:i.x+e.width/2,y:i.y};const s={x:i.x+e.width/2,y:i.y+e.height};const r={x:i.x+e.width,y:i.y+e.height/2};const a={x:i.x,y:i.y+e.height/2};const l=[o,s,a,r];const d=l.map((i=>n.distance(i,t)));const p=d.indexOf(Math.min(...d));return l[p]}const f=()=>`:host{--viewer-annotations-pin-primary-color:var(--blue-700);--viewer-annotations-pin-accent-color:var(--blue-200);--viewer-annotations-pin-dot-color:var(--viewer-annotations-pin-primary-color);--viewer-annotations-pin-color:var(--viewer-annotations-pin-primary-color);--viewer-annotations-pin-font-size:0.75rem;--viewer-annotations-pin-selected-stroke:var(--white);--viewer-annotations-pin-selected-border:2px solid var(--white);--viewer-annotations-pin-label-border:2px solid var(--black);--viewer-annotations-pin-selected-stroke:var(--white);font-size:var(--viewer-annotations-pin-font-size);position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden;pointer-events:none}.pin-anchor{position:absolute;border-radius:50%;transform:translate(-50%, -50%);display:block;width:9px;height:9px;box-sizing:border-box;border:var(--viewer-annotations-pin-label-border);background:var(--viewer-annotations-pin-dot-color);pointer-events:auto;cursor:pointer}.selected{width:13px;height:13px;border:var(--viewer-annotations-pin-selected-border)}.pin{color:var(--viewer-annotations-pin-color);cursor:pointer;transition:opacity 0.3s ease-in;transform:translate(0px, -12px)}.pin-selected{stroke-width:1;stroke:var(--viewer-annotations-pin-selected-stroke)}.pin-occluded{opacity:.3;transition:opacity 0.3s ease-in}.pin-detached{visibility:hidden}`;const m=class{constructor(i){e(this,i);this.matrix=o.makeIdentity();this.projectionViewMatrix=o.makeIdentity();this.pinModel=new p;this.selected=false;this.occluded=false;this.detached=false;this.invalidateStateCounter=0;this.invalidateState=()=>{this.invalidateStateCounter=this.invalidateStateCounter+1}}componentWillLoad(){if(this.pinController==null){this.pinController=new h(this.pinModel)}}componentDidLoad(){var i;this.setLabelObserver();if(this.selected){(i=this.labelEl)===null||i===void 0?void 0:i.setFocus()}}async handleOcclusionStateChanged(i){this.occluded=i.detail}async handleDetachedStateChanged(i){this.detached=i.detail}disconnectedCallback(){var i,t;(i=this.labelEl)===null||i===void 0?void 0:i.removeEventListener("labelChanged",this.invalidateState);(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect()}render(){var e;if(this.pin==null){throw new Error("Unable to draw pin")}const{pinPoint:n,labelPoint:o}=this.computePinPoints(this.pin);return i(t,{key:"84a22b24189e46d618c7266874d6584feb4e0b93"},i("vertex-viewer-dom-element",{key:"d4b9cf5194049099b2a7a2c1ef07fc3757e91cdc","data-testid":`drawn-pin-${this.pin.id}`,position:this.pin.worldPosition,onPointerDown:async()=>{var i;await((i=this.labelEl)===null||i===void 0?void 0:i.submit());this.selectPin();this.handleAnchorPointerDown()},detachedOff:false},i(u,{key:"7312b90e959e7d61de89c80ff032c29c5d32d888",pin:this.pin,selected:this.selected,occluded:this.occluded,detached:this.detached})),d(this.pin)&&!this.occluded&&!this.detached&&i(t,{key:"975ae561cc3eb0bf6d259d99c10c48ab0bb2661a"},i("vertex-viewer-pin-label-line",{key:"cbb32a2788a89f53c5ea2e2e6abe83b0b49c0fd4",id:`pin-label-line-${(e=this.pin)===null||e===void 0?void 0:e.id}`,pinPoint:n,pin:this.pin,labelPoint:o,onPointerDown:()=>this.selectPin()}),i("vertex-viewer-pin-label",{key:"296958cff46f102cef5621c2512b71f0d4d97ff9",pin:this.pin,ref:i=>this.labelEl=i,elementBounds:this.elementBounds,pinController:this.pinController,onPointerDown:()=>this.selectPin()})))}setLabelObserver(){if(this.labelEl!=null){this.labelEl.addEventListener("labelChanged",this.invalidateState);this.resizeObserver=new ResizeObserver((()=>this.invalidateState()));this.resizeObserver.observe(this.labelEl)}}computePinPoints(i){if(this.elementBounds!=null&&this.pin!=null){return d(this.pin)&&this.pin.label.point!=null?this.computeTextPinPoints(this.pin,this.elementBounds):this.computeDefaultPinPoints(this.pin,this.elementBounds)}return{pinPoint:i.worldPosition}}computeDefaultPinPoints(i,t){return{pinPoint:this.getFromWorldPosition(i.worldPosition,this.projectionViewMatrix,t)}}computeTextPinPoints(i,t){var e,n,o,s;const{pinPoint:r}=this.computeDefaultPinPoints(i,t);const a=c(i.label.point,t);const l=((n=(e=this.labelEl)===null||e===void 0?void 0:e.firstElementChild)===null||n===void 0?void 0:n.clientWidth)||0;const d=((s=(o=this.labelEl)===null||o===void 0?void 0:o.firstElementChild)===null||s===void 0?void 0:s.clientHeight)||0;return{pinPoint:r,labelPoint:b(a,r,{width:l,height:d})}}handleAnchorPointerDown(){var i,t;if(this.elementBounds!=null&&((i=this.pinController)===null||i===void 0?void 0:i.getToolMode())==="edit"&&this.pin!=null){(t=this.pinController)===null||t===void 0?void 0:t.setDraggable({id:this.pin.id})}}selectPin(){var i,t;(i=this.pinController)===null||i===void 0?void 0:i.setSelectedPinId((t=this.pin)===null||t===void 0?void 0:t.id)}getFromWorldPosition(i,t,e){const n=s.multiplyByTransformMatrixColumnMajor(i,t);return r.fromDimensions(e).transformVectorToViewport(n)}};m.style=f();export{m as vertex_viewer_pin_group};
5
- //# sourceMappingURL=p-4b5a62da.entry.js.map
4
+ import{h as i,F as t,r as e}from"./p-CCVkga9Q.js";import{p as n,m as o,v as s}from"./p-Q_Zx-nhC.js";import"./p-CnYEgl0H.js";import"./p-Fn5MVjY7.js";import"./p-DNj37429.js";import"./p-BNuMPeJ8.js";import"./p-ux1ckSDN.js";import"./p-CFO_kjVc.js";import"./p-CklOj07G.js";import"./p-DMF55xeL.js";import"./p-BAhfr1Nx.js";import{V as r}from"./p-DYUbh6Nm.js";import{g as a,i as l,b as d,P as p,a as h,c}from"./p-7xxxLGmF.js";import{c as v}from"./p-Dw4-tG-V.js";import"./p--8q6LyIm.js";import"./p-JEG5R8Jl.js";import"./p-CG9AChtV.js";import"./p-CiSHWNC4.js";const u=({pin:e,selected:n,occluded:o,detached:s})=>{const{primaryColor:r}=a(e);return i(t,null,d(e)&&i("div",{id:"pin-anchor",class:v("pin-anchor",{selected:n,"pin-occluded":o,"pin-detached":s}),style:{background:r}}),l(e)&&i("vertex-viewer-icon",{name:"pin-fill",size:"lg",class:v("pin",{"pin-selected":n,"pin-occluded":o,"pin-detached":s}),style:{color:r}}))};function b(i,t,e){const o={x:i.x+e.width/2,y:i.y};const s={x:i.x+e.width/2,y:i.y+e.height};const r={x:i.x+e.width,y:i.y+e.height/2};const a={x:i.x,y:i.y+e.height/2};const l=[o,s,a,r];const d=l.map((i=>n.distance(i,t)));const p=d.indexOf(Math.min(...d));return l[p]}const f=()=>`:host{--viewer-annotations-pin-primary-color:var(--blue-700);--viewer-annotations-pin-accent-color:var(--blue-200);--viewer-annotations-pin-dot-color:var(--viewer-annotations-pin-primary-color);--viewer-annotations-pin-color:var(--viewer-annotations-pin-primary-color);--viewer-annotations-pin-font-size:0.75rem;--viewer-annotations-pin-selected-stroke:var(--white);--viewer-annotations-pin-selected-border:2px solid var(--white);--viewer-annotations-pin-label-border:2px solid var(--black);--viewer-annotations-pin-selected-stroke:var(--white);font-size:var(--viewer-annotations-pin-font-size);position:absolute;top:0;bottom:0;left:0;right:0;overflow:hidden;pointer-events:none}.pin-anchor{position:absolute;border-radius:50%;transform:translate(-50%, -50%);display:block;width:9px;height:9px;box-sizing:border-box;border:var(--viewer-annotations-pin-label-border);background:var(--viewer-annotations-pin-dot-color);pointer-events:auto;cursor:pointer}.selected{width:13px;height:13px;border:var(--viewer-annotations-pin-selected-border)}.pin{color:var(--viewer-annotations-pin-color);cursor:pointer;transition:opacity 0.3s ease-in;transform:translate(0px, -12px)}.pin-selected{stroke-width:1;stroke:var(--viewer-annotations-pin-selected-stroke)}.pin-occluded{opacity:.3;transition:opacity 0.3s ease-in}.pin-detached{visibility:hidden}`;const m=class{constructor(i){e(this,i);this.matrix=o.makeIdentity();this.projectionViewMatrix=o.makeIdentity();this.pinModel=new p;this.selected=false;this.occluded=false;this.detached=false;this.invalidateStateCounter=0;this.invalidateState=()=>{this.invalidateStateCounter=this.invalidateStateCounter+1}}componentWillLoad(){if(this.pinController==null){this.pinController=new h(this.pinModel)}}componentDidLoad(){var i;this.setLabelObserver();if(this.selected){(i=this.labelEl)===null||i===void 0?void 0:i.setFocus()}}async handleOcclusionStateChanged(i){this.occluded=i.detail}async handleDetachedStateChanged(i){this.detached=i.detail}disconnectedCallback(){var i,t;(i=this.labelEl)===null||i===void 0?void 0:i.removeEventListener("labelChanged",this.invalidateState);(t=this.resizeObserver)===null||t===void 0?void 0:t.disconnect()}render(){var e;if(this.pin==null){throw new Error("Unable to draw pin")}const{pinPoint:n,labelPoint:o}=this.computePinPoints(this.pin);return i(t,{key:"84a22b24189e46d618c7266874d6584feb4e0b93"},i("vertex-viewer-dom-element",{key:"d4b9cf5194049099b2a7a2c1ef07fc3757e91cdc","data-testid":`drawn-pin-${this.pin.id}`,position:this.pin.worldPosition,onPointerDown:async()=>{var i;await((i=this.labelEl)===null||i===void 0?void 0:i.submit());this.selectPin();this.handleAnchorPointerDown()},detachedOff:false},i(u,{key:"7312b90e959e7d61de89c80ff032c29c5d32d888",pin:this.pin,selected:this.selected,occluded:this.occluded,detached:this.detached})),d(this.pin)&&!this.occluded&&!this.detached&&i(t,{key:"975ae561cc3eb0bf6d259d99c10c48ab0bb2661a"},i("vertex-viewer-pin-label-line",{key:"cbb32a2788a89f53c5ea2e2e6abe83b0b49c0fd4",id:`pin-label-line-${(e=this.pin)===null||e===void 0?void 0:e.id}`,pinPoint:n,pin:this.pin,labelPoint:o,onPointerDown:()=>this.selectPin()}),i("vertex-viewer-pin-label",{key:"296958cff46f102cef5621c2512b71f0d4d97ff9",pin:this.pin,ref:i=>this.labelEl=i,elementBounds:this.elementBounds,pinController:this.pinController,onPointerDown:()=>this.selectPin()})))}setLabelObserver(){if(this.labelEl!=null){this.labelEl.addEventListener("labelChanged",this.invalidateState);this.resizeObserver=new ResizeObserver((()=>this.invalidateState()));this.resizeObserver.observe(this.labelEl)}}computePinPoints(i){if(this.elementBounds!=null&&this.pin!=null){return d(this.pin)&&this.pin.label.point!=null?this.computeTextPinPoints(this.pin,this.elementBounds):this.computeDefaultPinPoints(this.pin,this.elementBounds)}return{pinPoint:i.worldPosition}}computeDefaultPinPoints(i,t){return{pinPoint:this.getFromWorldPosition(i.worldPosition,this.projectionViewMatrix,t)}}computeTextPinPoints(i,t){var e,n,o,s;const{pinPoint:r}=this.computeDefaultPinPoints(i,t);const a=c(i.label.point,t);const l=((n=(e=this.labelEl)===null||e===void 0?void 0:e.firstElementChild)===null||n===void 0?void 0:n.clientWidth)||0;const d=((s=(o=this.labelEl)===null||o===void 0?void 0:o.firstElementChild)===null||s===void 0?void 0:s.clientHeight)||0;return{pinPoint:r,labelPoint:b(a,r,{width:l,height:d})}}handleAnchorPointerDown(){var i,t;if(this.elementBounds!=null&&((i=this.pinController)===null||i===void 0?void 0:i.getToolMode())==="edit"&&this.pin!=null){(t=this.pinController)===null||t===void 0?void 0:t.setDraggable({id:this.pin.id})}}selectPin(){var i,t;(i=this.pinController)===null||i===void 0?void 0:i.setSelectedPinId((t=this.pin)===null||t===void 0?void 0:t.id)}getFromWorldPosition(i,t,e){const n=s.multiplyByTransformMatrixColumnMajor(i,t);return r.fromDimensions(e).transformVectorToViewport(n)}};m.style=f();export{m as vertex_viewer_pin_group};
5
+ //# sourceMappingURL=p-06c99572.entry.js.map
@@ -1,5 +1,5 @@
1
1
  /*!
2
2
  * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
3
3
  */
4
- import{h as e,F as t,r as i,c as s,f as n,H as o,a}from"./p-CCVkga9Q.js";import{s as r,w as l,S as d,a as c,b as h}from"./p-BNfR95Px.js";import{p as u}from"./p-CQsxBrfA.js";import{i as f}from"./p-DC86ZXai.js";import{g as v}from"./p-DX6pEG54.js";import{i as p}from"./p-CiSHWNC4.js";import{S as w}from"./p-BZwvQkyb.js";import"./p-ux1ckSDN.js";import"./p-CG9AChtV.js";import"./p--8q6LyIm.js";import"./p-JEG5R8Jl.js";import"./p-CPk-nchx.js";import"./p-CklOj07G.js";import"./p-Q_Zx-nhC.js";import"./p-CFO_kjVc.js";import"./p-BAhfr1Nx.js";const b=({details:i},s)=>e("div",{class:"error"},e("div",{class:"error-section error-message"},e("span",null,i.message),i.link&&e(t,null,e("span",null," See our "),e("a",{href:i.link,target:"_blank"},"documentation")," ",e("span",null," for more information."))),e("div",{class:"error-section"},s));const m=500;async function y(e,t,{suppliedCorrelationId:i}={}){const s=await e.scene();return s.elements((e=>e.items.where((e=>e.withItemId(t))).show())).execute({suppliedCorrelationId:i})}async function g(e,t,{suppliedCorrelationId:i}={}){const s=await e.scene();return s.elements((e=>e.items.where((e=>e.withItemId(t))).hide())).execute({suppliedCorrelationId:i})}async function x(e,t,{append:i=false,suppliedCorrelationId:s}){const n=await e.scene();return n.elements((e=>[...i?[]:[e.items.where((e=>e.all())).deselect()],e.items.where((e=>e.withItemId(t))).select()])).execute({suppliedCorrelationId:s})}async function C(e,t,i,{append:s=true,suppliedCorrelationId:n}){const o=await e.scene();return o.elements((e=>[...s?[]:[e.items.where((e=>e.all())).deselect()],e.items.where((e=>e.withSceneTreeRange({start:t,end:i}))).select()])).execute({suppliedCorrelationId:n})}async function I(e,t,i,s,n,{append:o=false,suppliedCorrelationId:a}){const r=await e.scene();return r.elements((e=>[...o?[]:[e.items.where((e=>e.all())).deselect()],e.items.where((e=>e.withMetadata(t,i,s,n))).select()])).execute({suppliedCorrelationId:a})}async function k(e,t,{suppliedCorrelationId:i}={}){const s=await e.scene();return s.elements((e=>e.items.where((e=>e.withItemId(t))).deselect())).execute({suppliedCorrelationId:i})}async function E(e,t,{suppliedCorrelationId:i,animationDurationMs:s}={}){const n=await e.scene();await n.elements((e=>[e.items.where((e=>e.all())).hide(),e.items.where((e=>e.withItemId(t))).show()])).execute({suppliedCorrelationId:i});const o=await n.camera().flyTo((e=>e.withItemId(t))).render({animation:{milliseconds:s!==null&&s!==void 0?s:m}});await o.onAnimationCompleted.once()}const R=()=>`button{border:none;background:transparent;cursor:pointer;margin:0;padding:0}.button{padding:0.5rem;border-radius:0.25rem}.button-secondary{color:var(--neutral-800);background-color:var(--neutral-300)}.button-secondary:hover{color:var(--neutral-900)}.button-secondary:hover:enabled{box-shadow:0 2px 2px rgb(0 0 0 / 20%)}.button-secondary:disabled{opacity:0.8}.button-secondary:hover:disabled{cursor:not-allowed}:host{--scene-tree-toolbar-separator:1px solid var(--neutral-300);--scene-tree-default-font-family:unset;--scene-tree-default-font-size:unset;--scene-tree-default-font-color:unset;--scene-tree-secondary-font-color:unset;--scene-tree-selected-row-background-color:unset;--scene-tree-hovered-row-background-color:unset;--scene-tree-row-background-color:unset;--scene-tree-row-background-color-depth-n:unset;--scene-tree-overlay-z-index:3000;width:300px;height:100%;user-select:none;-webkit-user-select:none;cursor:default;display:flex;flex-direction:column;position:relative}.rows-scroll{position:relative;height:var(--scene-tree-row-height, 0);flex-grow:1}.rows{position:relative}.row{position:absolute;display:flex;align-items:center;width:100%;height:var(--scene-tree-row-height);padding:var(--scene-tree-row-padding);box-sizing:border-box}.row:hover{background-color:var(--scene-tree-row-hover-color)}.row.is-selected{background-color:var(--scene-tree-row-selected-color)}.expand-toggle{cursor:pointer;width:16px}.row-text{margin-left:0.25rem;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.visibility-btn{display:flex;align-items:center;visibility:hidden;padding:4px}.visibility-btn.is-hidden{visibility:visible}.row:hover .visibility-btn{visibility:visible}.error,.empty-results{position:absolute;top:0;left:0;display:flex;flex-direction:column;align-items:center;font-size:0.875rem;width:100%;height:100%;padding:1rem;box-sizing:border-box;justify-content:center;background-color:white;z-index:var(--scene-tree-overlay-z-index)}.error-section{margin-top:1rem}.error-message{text-align:center}.search-toolbar,slot[name='header']::slotted(*){border-bottom:var(--scene-tree-toolbar-separator)}slot[name='footer']::slotted(:not(:last-child)){border-top:var(--scene-tree-toolbar-separator)}.header{display:flex;flex-direction:column}.footer{display:flex;flex-direction:column}.loading{position:absolute;top:150px;left:50%;transform:translate(-50%, -50%);text-align:center}`;const j=25;const M=class{constructor(e){i(this,e);this.connectionError=s(this,"connectionError");this.firstRowRendered=s(this,"firstRowRendered");this.overScanCount=25;this.configEnv="platprod";this.searchOptions={};this.metadataSearchExactMatch=false;this.metadataSearchKeys=[];this.metadataKeys=[];this.operationAnimationDuration=500;this.rows=[];this.totalRows=0;this.showLoader=false;this.showEmptyResults=false;this.stateMap={componentLoaded:false};this.hasPartialFilterResults=false;this.refreshingResults=false;this.attemptingRetry=false;this.firstCellRendered=false}async invalidateRows(){n(this.getLayoutElement())}async scrollToIndex(e,t={}){const{animate:i,position:s="middle"}=t;const n=Math.max(0,Math.min(e,this.totalRows));const o=this.getScrollToPosition(n,s);await this.getLayoutElement().scrollToPosition(o,{behavior:i?"smooth":undefined})}async scrollToItem(e,t={}){var i;const s=this.totalRows;const n=await((i=this.controller)===null||i===void 0?void 0:i.expandParentNodes(e));if(n!=null&&s!==this.totalRows){return new Promise((e=>{const i=this.getLayoutElement();const s=async()=>{i.removeEventListener("layoutRendered",s);await this.scrollToIndex(n,t);e()};i.addEventListener("layoutRendered",s)}))}else if(n!=null){await this.scrollToIndex(n,t)}}async expandAll(){var e;await((e=this.controller)===null||e===void 0?void 0:e.expandAll())}async collapseAll(){var e;await((e=this.controller)===null||e===void 0?void 0:e.collapseAll())}async expandItem(e){await this.performRowOperation(e,(async({id:e,node:t})=>{var i;if(!t.expanded){await((i=this.controller)===null||i===void 0?void 0:i.expandNode(e))}}))}async collapseItem(e){await this.performRowOperation(e,(async({id:e,node:t})=>{var i;if(t.expanded){await((i=this.controller)===null||i===void 0?void 0:i.collapseNode(e))}}))}async toggleExpandItem(e){await this.performRowOperation(e,(async({node:e})=>{if(e.expanded){await this.collapseItem(e)}else{await this.expandItem(e)}}))}async toggleItemVisibility(e){await this.performRowOperation(e,(async({viewer:e,id:t,node:i})=>{if(i.visible||i.partiallyVisible){await g(e,t)}else{await y(e,t)}}))}async hideItem(e){await this.performRowOperation(e,(async({viewer:e,id:t,node:i})=>{if(i.visible){await g(e,t)}}))}async showItem(e){await this.performRowOperation(e,(async({viewer:e,id:t,node:i})=>{if(!i.visible){await y(e,t)}}))}async selectItem(e,{recurseParent:t,...i}={}){await this.performRowOperation(e,(async({viewer:s,id:n})=>{var o,a,r,l;const d=await((o=this.controller)===null||o===void 0?void 0:o.fetchNodeAncestors(n))||[];const c=(a=this.stateMap.selectionPath)===null||a===void 0?void 0:a.includes(n);const h=this.getNodeFromRowOrIndex(e);const u=d.length>0?d[0].selected:true;const f=h.selected&&!u;if(t&&(c||f)){const e=d.find((({selected:e})=>!e));if(e!=null){await this.selectItem(e,i);this.lastSelectedItemId=n}else{await x(s,n,i);this.lastSelectedItemId=n}}else if(i.range&&this.lastSelectedItemId!=null){const e=await((r=this.controller)===null||r===void 0?void 0:r.expandParentNodes(n));const t=await((l=this.controller)===null||l===void 0?void 0:l.expandParentNodes(this.lastSelectedItemId));if(t&&e){const n=Math.min(t,e);const o=Math.max(t,e);await C(s,n,o,i)}}else{await x(s,n,i);this.lastSelectedItemId=n}this.stateMap.selectionPath=[...d.map((({id:e})=>(e===null||e===void 0?void 0:e.hex)||"")),n]}))}async deselectItem(e){await this.performRowOperation(e,(async({viewer:e,id:t,node:i})=>{if(i.selected){this.lastSelectedItemId=undefined;await k(e,t)}}))}async isolateItem(e){await this.performRowOperation(e,(async({viewer:e,id:t})=>{await E(e,t,{animationDurationMs:this.operationAnimationDuration})}))}async getRowAtIndex(e){return this.rows[e]}async getRowForItemId(e){var t;const i=await((t=this.controller)===null||t===void 0?void 0:t.expandParentNodes(e));if(i!=null){return this.rows[i]}else{return undefined}}async getRowForEvent(e){const{clientY:t,target:i}=e;if(i!=null&&this.errorDetails==null&&v(this.el,i)&&f(i)){return this.getRowAtClientY(t)}else{return undefined}}getRowAtClientY(e){const t=this.getLayoutElement();const i=t.layoutOffset;const s=Math.floor((e-i+t.scrollOffset)/t.rowHeight);return this.getRowAtIndex(s)}async filterItems(e,t={}){var i;const s={...t,metadataSearchKeys:t.columns};const n=this.getMetadataSearchKeys(s);return(i=this.controller)===null||i===void 0?void 0:i.filter(e,{...t,columns:n})}async selectFilteredItems(e,t){var i,s,n,o,a,r;if(this.viewer!=null){const l=(s=(i=this.searchOptions)===null||i===void 0?void 0:i.metadataSearchKeys)!==null&&s!==void 0?s:this.metadataSearchKeys;const d=l.length>0?l:this.metadataKeys;const c=d.length>0?d:["VERTEX_SCENE_ITEM_NAME"];const h=(o=(n=this.searchOptions)===null||n===void 0?void 0:n.exactMatch)!==null&&o!==void 0?o:this.metadataSearchExactMatch;const u=(r=(a=this.searchOptions)===null||a===void 0?void 0:a.removeHiddenItems)!==null&&r!==void 0?r:false;await I(this.viewer,e,c,h,u,{append:false,...t})}}async fetchMetadataKeys(){var e,t;return(t=(e=this.controller)===null||e===void 0?void 0:e.fetchMetadataKeys())!==null&&t!==void 0?t:[]}disconnectedCallback(){var e,t,i;(e=this.stateMap.viewerDisposable)===null||e===void 0?void 0:e.dispose();(t=this.stateMap.viewerSceneReadyDisposable)===null||t===void 0?void 0:t.dispose();(i=this.controller)===null||i===void 0?void 0:i.cancel()}connectedCallback(){this.connectToViewer()}componentWillLoad(){var e;if(this.controller==null){const{sceneTreeHost:t}=this.getConfig().network;const i=new r.SceneTreeAPIClient(t,this.getConfig().flags.grpcUseStreamingWebSocketTransport?{transport:l}:undefined);this.controller=new d(i,100);(e=this.controller)===null||e===void 0?void 0:e.setMetadataKeys(this.metadataKeys)}this.stateMap.onStateChangeDisposable=this.controller.onStateChange.on((e=>this.handleControllerStateChange(e)));this.connectToViewer();this.updateMissingViewerError()}async componentDidLoad(){var e;this.ensureLayoutDefined();this.updateLayoutElement();const t=this.getLayoutElement();const i=new ResizeObserver((()=>{this.invalidateRows()}));i.observe(t);this.stateMap.resizeObserver=i;this.stateMap.componentLoaded=true;(e=this.controller)===null||e===void 0?void 0:e.setMetadataKeys(this.metadataKeys)}componentWillRender(){this.updateLayoutElement()}render(){return e(o,{key:"5ffa85bb61bc8292e6c9ec4239cea7c87c24b189"},e("div",{key:"e305f4cee0f16338acad4d60edb5469fc0b20b7c",class:"header"},e("slot",{key:"785f655c31f4c8866a4e9b89fd6be9bd8b7a92af",name:"header"},e("vertex-scene-tree-toolbar",{key:"1e6a2755f67a2e315df254d5703c998af503d90f",class:"search-toolbar"},e("vertex-scene-tree-search",{key:"390e24becad6a63e149eab8e73493787b8d44bf7",controller:this.controller})))),e("slot",{key:"6d740f086d94bb7deeb2ba71031826c76756cc2e",name:"partial-filter-results-banner"},this.hasPartialFilterResults&&e("vertex-scene-tree-notification-banner",{key:"6789e4bdfb24c1a69b32d6c9909665af82082e09",message:this.refreshingResults?"Refreshing results...":"Data loading, refresh for more.",actionLabel:"Refresh",onAction:()=>{var e;return(e=this.controller)===null||e===void 0?void 0:e.refreshFilter()}})),this.errorDetails!=null&&this.renderError(this.errorDetails),this.errorDetails==null&&e("div",{key:"55774ba1f9d307b71197b0eab0c03f4aabf95041",class:"rows-scroll"},this.showLoader&&e("slot",{key:"eaacd5e2516236f909ce018ce384fad0b4b0d611",name:"loading"},e("vertex-viewer-spinner",{key:"de02dfe0223593839a240c7dfbdeaee3bf57b74b",class:"loading",size:"md"})),e("slot",{key:"5141e29171debf43a663e3318fb8ae3cb14e32ff"}),this.showEmptyResults&&e("slot",{key:"375cf7088655dc757587e69836377eec1f9ac0f9",name:"empty-results"},e("div",{key:"952d5b5a6445384ec3d2b3ae2f422c31c8cd26c9",class:"empty-results"},"No Results Found."))),e("div",{key:"aa2170a0a13edba86aa5e220bd8f38627aaa726b",class:"footer"},e("slot",{key:"93416a47de11cb2a70b2ff586034134ef483167d",name:"footer"})))}renderError(t){if(t.code!==c.SCENE_TREE_DISABLED){return e(b,{details:t},e("button",{class:"button button-secondary",onClick:()=>this.retryConnectToViewer(),disabled:this.attemptingRetry},"Retry"))}else{return e(b,{details:t})}}handleViewerChanged(e,t){if(!this.stateMap.componentLoaded){return}this.connectToViewer()}handleControllerChanged(e){var t;if(!this.stateMap.componentLoaded){return}(t=this.stateMap.onStateChangeDisposable)===null||t===void 0?void 0:t.dispose();this.stateMap.onStateChangeDisposable=e.onStateChange.on((e=>this.handleControllerStateChange(e)));e.setMetadataKeys(this.metadataKeys)}handleMetadataKeysChanged(){var e;(e=this.controller)===null||e===void 0?void 0:e.setMetadataKeys(this.metadataKeys)}retryConnectToViewer(){this.attemptingRetry=true;this.errorDetails=undefined;this.connectToViewer()}connectToViewer(){var e,t,i;(e=this.stateMap.viewerDisposable)===null||e===void 0?void 0:e.dispose();(t=this.stateMap.viewerSceneReadyDisposable)===null||t===void 0?void 0:t.dispose();if(this.viewer==null&&this.viewerSelector!=null){this.viewer=document.querySelector(this.viewerSelector)}if(this.viewer!=null){this.clearMissingViewerError();const e=async()=>{const e=this.getLayoutElement();await e.attemptComputeCellHeight()};this.viewer.addEventListener("sceneReady",e);this.stateMap.viewerDisposable=(i=this.controller)===null||i===void 0?void 0:i.connectToViewer(this.viewer);this.stateMap.viewerSceneReadyDisposable={dispose:()=>{var t;return(t=this.viewer)===null||t===void 0?void 0:t.removeEventListener("sceneReady",e)}}}else{this.attemptingRetry=false;if(this.stateMap.componentLoaded){this.updateMissingViewerError()}}}updateMissingViewerError(){if(this.viewer==null){this.errorDetails=new h("MISSING_VIEWER",c.MISSING_VIEWER)}}clearMissingViewerError(){var e;if(((e=this.errorDetails)===null||e===void 0?void 0:e.code)===c.MISSING_VIEWER){this.errorDetails=undefined}}scheduleClearUnusedData(){if(this.stateMap.idleCallbackId!=null){window.cancelIdleCallback(this.stateMap.idleCallbackId)}this.stateMap.idleCallbackId=window.requestIdleCallback((e=>{var t,i,s;const n=(t=e.timeRemaining)===null||t===void 0?void 0:t.call(e);if(n==null||n>=j){const e=this.getLayoutElement();const t=e.viewportStartIndex;const n=e.viewportEndIndex;const[o,a]=((i=this.controller)===null||i===void 0?void 0:i.getPageIndexesForRange(t,n))||[];if(o!=null&&a!=null){(s=this.controller)===null||s===void 0?void 0:s.invalidatePagesOutsideRange(o,a,50)}}else{this.scheduleClearUnusedData()}}))}handleControllerStateChange(e){this.showLoader=!!e.shouldShowLoading;this.showEmptyResults=!!e.shouldShowEmptyResults;this.rows=e.rows;this.totalRows=e.totalRows;this.hasPartialFilterResults=!!e.isPartialFilterResponse;this.refreshingResults=!!e.isSearching;if(e.connection.type==="failure"){this.errorDetails=e.connection.details;this.connectionError.emit(e.connection.details)}else if(e.connection.type==="disconnected"){this.errorDetails=new h("DISCONNECTED",c.DISCONNECTED)}else{this.errorDetails=undefined}if(e.connection.type==="connected"||e.connection.type==="failure"){this.attemptingRetry=false}}getNodeFromRowOrIndex(e){const t=typeof e==="number"?this.rows[e]:e;if(t==null){throw new Error(`Cannot perform scene tree operation. Row not found.`)}return p(t)?t.node:t}async performRowOperation(e,t){const i=this.getNodeFromRowOrIndex(e);if(i.id==null){throw new Error(`Cannot perform scene tree operation. ID is undefined.`)}if(this.viewer==null){throw new Error(`Cannot perform scene tree operation. Cannot get reference to viewer.`)}await t({viewer:this.viewer,id:i.id.hex,node:i})}async handleSearch(e){var t,i,s,n;const o=this.getMetadataSearchKeys(this.searchOptions);const a=(i=(t=this.searchOptions)===null||t===void 0?void 0:t.exactMatch)!==null&&i!==void 0?i:this.metadataSearchExactMatch;const r=(n=(s=this.searchOptions)===null||s===void 0?void 0:s.removeHiddenItems)!==null&&n!==void 0?n:false;try{await this.filterItems(e.detail,{columns:o,exactMatch:a,removeHiddenItems:r})}catch(e){console.error("Failed to filter tree with exception: ",e)}}async handleCellLoaded(){if(!this.firstCellRendered&&this.rows.length>0){this.firstCellRendered=true;this.firstRowRendered.emit()}}getScrollToPosition(e,t){var i;const s=this.getLayoutElement();const n=Math.max(0,Math.min(e,this.totalRows-1));const o=(i=s.layoutHeight)!==null&&i!==void 0?i:0;const a=s.rowHeight;if(t==="start"){return n*a}else if(t==="middle"){const e=n*a+a/2;return e-o/2}else{const e=n*a+a;return e-o}}getConfig(){return u(this.configEnv,this.config)}ensureLayoutDefined(){let e=this.el.querySelector("vertex-scene-tree-table-layout");if(e==null){e=document.createElement("vertex-scene-tree-table-layout");e.innerHTML=`\n <vertex-scene-tree-table-column>\n <template>\n <vertex-scene-tree-table-cell prop:value="{{row.node.name}}" expand-toggle isolate-button visibility-toggle></vertex-scene-tree-table-cell>\n </template>\n </vertex-scene-tree-table-column>\n `;this.el.appendChild(e)}this.stateMap.layoutEl=e}updateLayoutElement(){const e=this.stateMap.layoutEl;if(e!=null){e.rows=this.rows;e.tree=this.el;e.totalRows=this.totalRows;e.controller=this.controller;e.rowData=this.rowData}else if(!this.stateMap.componentLoaded&&this.totalRows>0){console.debug("Scene tree has rows, but the component has not yet rendered")}}getLayoutElement(){if(this.stateMap.layoutEl!=null){return this.stateMap.layoutEl}else{throw new Error("Layout element is undefined")}}getMetadataSearchKeys(e){var t,i;const s=(t=e===null||e===void 0?void 0:e.metadataSearchKeys)!==null&&t!==void 0?t:this.metadataSearchKeys;const n=(i=e===null||e===void 0?void 0:e.exactMatch)!==null&&i!==void 0?i:this.metadataSearchExactMatch;if(n){const e=s.length>0?s:[w];return e}else if(s.length>0){return s}return undefined}get el(){return a(this)}static get watchers(){return{viewer:[{handleViewerChanged:0}],controller:[{handleControllerChanged:0}],metadataKeys:[{handleMetadataKeysChanged:0}]}}};M.style=R();export{M as vertex_scene_tree};
5
- //# sourceMappingURL=p-61188ccc.entry.js.map
4
+ import{h as e,F as t,r as i,c as s,f as n,H as o,a}from"./p-CCVkga9Q.js";import{s as r,w as l,S as d,a as c,b as h}from"./p-CnYEgl0H.js";import{p as u}from"./p-CQsxBrfA.js";import{i as f}from"./p-DC86ZXai.js";import{g as v}from"./p-DX6pEG54.js";import{i as p}from"./p-CiSHWNC4.js";import{S as w}from"./p-BZwvQkyb.js";import"./p-ux1ckSDN.js";import"./p-CG9AChtV.js";import"./p--8q6LyIm.js";import"./p-JEG5R8Jl.js";import"./p-CPk-nchx.js";import"./p-CklOj07G.js";import"./p-Q_Zx-nhC.js";import"./p-CFO_kjVc.js";import"./p-BAhfr1Nx.js";const b=({details:i},s)=>e("div",{class:"error"},e("div",{class:"error-section error-message"},e("span",null,i.message),i.link&&e(t,null,e("span",null," See our "),e("a",{href:i.link,target:"_blank"},"documentation")," ",e("span",null," for more information."))),e("div",{class:"error-section"},s));const m=500;async function y(e,t,{suppliedCorrelationId:i}={}){const s=await e.scene();return s.elements((e=>e.items.where((e=>e.withItemId(t))).show())).execute({suppliedCorrelationId:i})}async function g(e,t,{suppliedCorrelationId:i}={}){const s=await e.scene();return s.elements((e=>e.items.where((e=>e.withItemId(t))).hide())).execute({suppliedCorrelationId:i})}async function x(e,t,{append:i=false,suppliedCorrelationId:s}){const n=await e.scene();return n.elements((e=>[...i?[]:[e.items.where((e=>e.all())).deselect()],e.items.where((e=>e.withItemId(t))).select()])).execute({suppliedCorrelationId:s})}async function C(e,t,i,{append:s=true,suppliedCorrelationId:n}){const o=await e.scene();return o.elements((e=>[...s?[]:[e.items.where((e=>e.all())).deselect()],e.items.where((e=>e.withSceneTreeRange({start:t,end:i}))).select()])).execute({suppliedCorrelationId:n})}async function I(e,t,i,s,n,{append:o=false,suppliedCorrelationId:a}){const r=await e.scene();return r.elements((e=>[...o?[]:[e.items.where((e=>e.all())).deselect()],e.items.where((e=>e.withMetadata(t,i,s,n))).select()])).execute({suppliedCorrelationId:a})}async function k(e,t,{suppliedCorrelationId:i}={}){const s=await e.scene();return s.elements((e=>e.items.where((e=>e.withItemId(t))).deselect())).execute({suppliedCorrelationId:i})}async function E(e,t,{suppliedCorrelationId:i,animationDurationMs:s}={}){const n=await e.scene();await n.elements((e=>[e.items.where((e=>e.all())).hide(),e.items.where((e=>e.withItemId(t))).show()])).execute({suppliedCorrelationId:i});const o=await n.camera().flyTo((e=>e.withItemId(t))).render({animation:{milliseconds:s!==null&&s!==void 0?s:m}});await o.onAnimationCompleted.once()}const R=()=>`button{border:none;background:transparent;cursor:pointer;margin:0;padding:0}.button{padding:0.5rem;border-radius:0.25rem}.button-secondary{color:var(--neutral-800);background-color:var(--neutral-300)}.button-secondary:hover{color:var(--neutral-900)}.button-secondary:hover:enabled{box-shadow:0 2px 2px rgb(0 0 0 / 20%)}.button-secondary:disabled{opacity:0.8}.button-secondary:hover:disabled{cursor:not-allowed}:host{--scene-tree-toolbar-separator:1px solid var(--neutral-300);--scene-tree-default-font-family:unset;--scene-tree-default-font-size:unset;--scene-tree-default-font-color:unset;--scene-tree-secondary-font-color:unset;--scene-tree-selected-row-background-color:unset;--scene-tree-hovered-row-background-color:unset;--scene-tree-row-background-color:unset;--scene-tree-row-background-color-depth-n:unset;--scene-tree-overlay-z-index:3000;width:300px;height:100%;user-select:none;-webkit-user-select:none;cursor:default;display:flex;flex-direction:column;position:relative}.rows-scroll{position:relative;height:var(--scene-tree-row-height, 0);flex-grow:1}.rows{position:relative}.row{position:absolute;display:flex;align-items:center;width:100%;height:var(--scene-tree-row-height);padding:var(--scene-tree-row-padding);box-sizing:border-box}.row:hover{background-color:var(--scene-tree-row-hover-color)}.row.is-selected{background-color:var(--scene-tree-row-selected-color)}.expand-toggle{cursor:pointer;width:16px}.row-text{margin-left:0.25rem;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}.visibility-btn{display:flex;align-items:center;visibility:hidden;padding:4px}.visibility-btn.is-hidden{visibility:visible}.row:hover .visibility-btn{visibility:visible}.error,.empty-results{position:absolute;top:0;left:0;display:flex;flex-direction:column;align-items:center;font-size:0.875rem;width:100%;height:100%;padding:1rem;box-sizing:border-box;justify-content:center;background-color:white;z-index:var(--scene-tree-overlay-z-index)}.error-section{margin-top:1rem}.error-message{text-align:center}.search-toolbar,slot[name='header']::slotted(*){border-bottom:var(--scene-tree-toolbar-separator)}slot[name='footer']::slotted(:not(:last-child)){border-top:var(--scene-tree-toolbar-separator)}.header{display:flex;flex-direction:column}.footer{display:flex;flex-direction:column}.loading{position:absolute;top:150px;left:50%;transform:translate(-50%, -50%);text-align:center}`;const j=25;const M=class{constructor(e){i(this,e);this.connectionError=s(this,"connectionError");this.firstRowRendered=s(this,"firstRowRendered");this.overScanCount=25;this.configEnv="platprod";this.searchOptions={};this.metadataSearchExactMatch=false;this.metadataSearchKeys=[];this.metadataKeys=[];this.operationAnimationDuration=500;this.rows=[];this.totalRows=0;this.showLoader=false;this.showEmptyResults=false;this.stateMap={componentLoaded:false};this.hasPartialFilterResults=false;this.refreshingResults=false;this.attemptingRetry=false;this.firstCellRendered=false}async invalidateRows(){n(this.getLayoutElement())}async scrollToIndex(e,t={}){const{animate:i,position:s="middle"}=t;const n=Math.max(0,Math.min(e,this.totalRows));const o=this.getScrollToPosition(n,s);await this.getLayoutElement().scrollToPosition(o,{behavior:i?"smooth":undefined})}async scrollToItem(e,t={}){var i;const s=this.totalRows;const n=await((i=this.controller)===null||i===void 0?void 0:i.expandParentNodes(e));if(n!=null&&s!==this.totalRows){return new Promise((e=>{const i=this.getLayoutElement();const s=async()=>{i.removeEventListener("layoutRendered",s);await this.scrollToIndex(n,t);e()};i.addEventListener("layoutRendered",s)}))}else if(n!=null){await this.scrollToIndex(n,t)}}async expandAll(){var e;await((e=this.controller)===null||e===void 0?void 0:e.expandAll())}async collapseAll(){var e;await((e=this.controller)===null||e===void 0?void 0:e.collapseAll())}async expandItem(e){await this.performRowOperation(e,(async({id:e,node:t})=>{var i;if(!t.expanded){await((i=this.controller)===null||i===void 0?void 0:i.expandNode(e))}}))}async collapseItem(e){await this.performRowOperation(e,(async({id:e,node:t})=>{var i;if(t.expanded){await((i=this.controller)===null||i===void 0?void 0:i.collapseNode(e))}}))}async toggleExpandItem(e){await this.performRowOperation(e,(async({node:e})=>{if(e.expanded){await this.collapseItem(e)}else{await this.expandItem(e)}}))}async toggleItemVisibility(e){await this.performRowOperation(e,(async({viewer:e,id:t,node:i})=>{if(i.visible||i.partiallyVisible){await g(e,t)}else{await y(e,t)}}))}async hideItem(e){await this.performRowOperation(e,(async({viewer:e,id:t,node:i})=>{if(i.visible){await g(e,t)}}))}async showItem(e){await this.performRowOperation(e,(async({viewer:e,id:t,node:i})=>{if(!i.visible){await y(e,t)}}))}async selectItem(e,{recurseParent:t,...i}={}){await this.performRowOperation(e,(async({viewer:s,id:n})=>{var o,a,r,l;const d=await((o=this.controller)===null||o===void 0?void 0:o.fetchNodeAncestors(n))||[];const c=(a=this.stateMap.selectionPath)===null||a===void 0?void 0:a.includes(n);const h=this.getNodeFromRowOrIndex(e);const u=d.length>0?d[0].selected:true;const f=h.selected&&!u;if(t&&(c||f)){const e=d.find((({selected:e})=>!e));if(e!=null){await this.selectItem(e,i);this.lastSelectedItemId=n}else{await x(s,n,i);this.lastSelectedItemId=n}}else if(i.range&&this.lastSelectedItemId!=null){const e=await((r=this.controller)===null||r===void 0?void 0:r.expandParentNodes(n));const t=await((l=this.controller)===null||l===void 0?void 0:l.expandParentNodes(this.lastSelectedItemId));if(t&&e){const n=Math.min(t,e);const o=Math.max(t,e);await C(s,n,o,i)}}else{await x(s,n,i);this.lastSelectedItemId=n}this.stateMap.selectionPath=[...d.map((({id:e})=>(e===null||e===void 0?void 0:e.hex)||"")),n]}))}async deselectItem(e){await this.performRowOperation(e,(async({viewer:e,id:t,node:i})=>{if(i.selected){this.lastSelectedItemId=undefined;await k(e,t)}}))}async isolateItem(e){await this.performRowOperation(e,(async({viewer:e,id:t})=>{await E(e,t,{animationDurationMs:this.operationAnimationDuration})}))}async getRowAtIndex(e){return this.rows[e]}async getRowForItemId(e){var t;const i=await((t=this.controller)===null||t===void 0?void 0:t.expandParentNodes(e));if(i!=null){return this.rows[i]}else{return undefined}}async getRowForEvent(e){const{clientY:t,target:i}=e;if(i!=null&&this.errorDetails==null&&v(this.el,i)&&f(i)){return this.getRowAtClientY(t)}else{return undefined}}getRowAtClientY(e){const t=this.getLayoutElement();const i=t.layoutOffset;const s=Math.floor((e-i+t.scrollOffset)/t.rowHeight);return this.getRowAtIndex(s)}async filterItems(e,t={}){var i;const s={...t,metadataSearchKeys:t.columns};const n=this.getMetadataSearchKeys(s);return(i=this.controller)===null||i===void 0?void 0:i.filter(e,{...t,columns:n})}async selectFilteredItems(e,t){var i,s,n,o,a,r;if(this.viewer!=null){const l=(s=(i=this.searchOptions)===null||i===void 0?void 0:i.metadataSearchKeys)!==null&&s!==void 0?s:this.metadataSearchKeys;const d=l.length>0?l:this.metadataKeys;const c=d.length>0?d:["VERTEX_SCENE_ITEM_NAME"];const h=(o=(n=this.searchOptions)===null||n===void 0?void 0:n.exactMatch)!==null&&o!==void 0?o:this.metadataSearchExactMatch;const u=(r=(a=this.searchOptions)===null||a===void 0?void 0:a.removeHiddenItems)!==null&&r!==void 0?r:false;await I(this.viewer,e,c,h,u,{append:false,...t})}}async fetchMetadataKeys(){var e,t;return(t=(e=this.controller)===null||e===void 0?void 0:e.fetchMetadataKeys())!==null&&t!==void 0?t:[]}disconnectedCallback(){var e,t,i;(e=this.stateMap.viewerDisposable)===null||e===void 0?void 0:e.dispose();(t=this.stateMap.viewerSceneReadyDisposable)===null||t===void 0?void 0:t.dispose();(i=this.controller)===null||i===void 0?void 0:i.cancel()}connectedCallback(){this.connectToViewer()}componentWillLoad(){var e;if(this.controller==null){const{sceneTreeHost:t}=this.getConfig().network;const i=new r.SceneTreeAPIClient(t,this.getConfig().flags.grpcUseStreamingWebSocketTransport?{transport:l}:undefined);this.controller=new d(i,100);(e=this.controller)===null||e===void 0?void 0:e.setMetadataKeys(this.metadataKeys)}this.stateMap.onStateChangeDisposable=this.controller.onStateChange.on((e=>this.handleControllerStateChange(e)));this.connectToViewer();this.updateMissingViewerError()}async componentDidLoad(){var e;this.ensureLayoutDefined();this.updateLayoutElement();const t=this.getLayoutElement();const i=new ResizeObserver((()=>{this.invalidateRows()}));i.observe(t);this.stateMap.resizeObserver=i;this.stateMap.componentLoaded=true;(e=this.controller)===null||e===void 0?void 0:e.setMetadataKeys(this.metadataKeys)}componentWillRender(){this.updateLayoutElement()}render(){return e(o,{key:"5ffa85bb61bc8292e6c9ec4239cea7c87c24b189"},e("div",{key:"e305f4cee0f16338acad4d60edb5469fc0b20b7c",class:"header"},e("slot",{key:"785f655c31f4c8866a4e9b89fd6be9bd8b7a92af",name:"header"},e("vertex-scene-tree-toolbar",{key:"1e6a2755f67a2e315df254d5703c998af503d90f",class:"search-toolbar"},e("vertex-scene-tree-search",{key:"390e24becad6a63e149eab8e73493787b8d44bf7",controller:this.controller})))),e("slot",{key:"6d740f086d94bb7deeb2ba71031826c76756cc2e",name:"partial-filter-results-banner"},this.hasPartialFilterResults&&e("vertex-scene-tree-notification-banner",{key:"6789e4bdfb24c1a69b32d6c9909665af82082e09",message:this.refreshingResults?"Refreshing results...":"Data loading, refresh for more.",actionLabel:"Refresh",onAction:()=>{var e;return(e=this.controller)===null||e===void 0?void 0:e.refreshFilter()}})),this.errorDetails!=null&&this.renderError(this.errorDetails),this.errorDetails==null&&e("div",{key:"55774ba1f9d307b71197b0eab0c03f4aabf95041",class:"rows-scroll"},this.showLoader&&e("slot",{key:"eaacd5e2516236f909ce018ce384fad0b4b0d611",name:"loading"},e("vertex-viewer-spinner",{key:"de02dfe0223593839a240c7dfbdeaee3bf57b74b",class:"loading",size:"md"})),e("slot",{key:"5141e29171debf43a663e3318fb8ae3cb14e32ff"}),this.showEmptyResults&&e("slot",{key:"375cf7088655dc757587e69836377eec1f9ac0f9",name:"empty-results"},e("div",{key:"952d5b5a6445384ec3d2b3ae2f422c31c8cd26c9",class:"empty-results"},"No Results Found."))),e("div",{key:"aa2170a0a13edba86aa5e220bd8f38627aaa726b",class:"footer"},e("slot",{key:"93416a47de11cb2a70b2ff586034134ef483167d",name:"footer"})))}renderError(t){if(t.code!==c.SCENE_TREE_DISABLED){return e(b,{details:t},e("button",{class:"button button-secondary",onClick:()=>this.retryConnectToViewer(),disabled:this.attemptingRetry},"Retry"))}else{return e(b,{details:t})}}handleViewerChanged(e,t){if(!this.stateMap.componentLoaded){return}this.connectToViewer()}handleControllerChanged(e){var t;if(!this.stateMap.componentLoaded){return}(t=this.stateMap.onStateChangeDisposable)===null||t===void 0?void 0:t.dispose();this.stateMap.onStateChangeDisposable=e.onStateChange.on((e=>this.handleControllerStateChange(e)));e.setMetadataKeys(this.metadataKeys)}handleMetadataKeysChanged(){var e;(e=this.controller)===null||e===void 0?void 0:e.setMetadataKeys(this.metadataKeys)}retryConnectToViewer(){this.attemptingRetry=true;this.errorDetails=undefined;this.connectToViewer()}connectToViewer(){var e,t,i;(e=this.stateMap.viewerDisposable)===null||e===void 0?void 0:e.dispose();(t=this.stateMap.viewerSceneReadyDisposable)===null||t===void 0?void 0:t.dispose();if(this.viewer==null&&this.viewerSelector!=null){this.viewer=document.querySelector(this.viewerSelector)}if(this.viewer!=null){this.clearMissingViewerError();const e=async()=>{const e=this.getLayoutElement();await e.attemptComputeCellHeight()};this.viewer.addEventListener("sceneReady",e);this.stateMap.viewerDisposable=(i=this.controller)===null||i===void 0?void 0:i.connectToViewer(this.viewer);this.stateMap.viewerSceneReadyDisposable={dispose:()=>{var t;return(t=this.viewer)===null||t===void 0?void 0:t.removeEventListener("sceneReady",e)}}}else{this.attemptingRetry=false;if(this.stateMap.componentLoaded){this.updateMissingViewerError()}}}updateMissingViewerError(){if(this.viewer==null){this.errorDetails=new h("MISSING_VIEWER",c.MISSING_VIEWER)}}clearMissingViewerError(){var e;if(((e=this.errorDetails)===null||e===void 0?void 0:e.code)===c.MISSING_VIEWER){this.errorDetails=undefined}}scheduleClearUnusedData(){if(this.stateMap.idleCallbackId!=null){window.cancelIdleCallback(this.stateMap.idleCallbackId)}this.stateMap.idleCallbackId=window.requestIdleCallback((e=>{var t,i,s;const n=(t=e.timeRemaining)===null||t===void 0?void 0:t.call(e);if(n==null||n>=j){const e=this.getLayoutElement();const t=e.viewportStartIndex;const n=e.viewportEndIndex;const[o,a]=((i=this.controller)===null||i===void 0?void 0:i.getPageIndexesForRange(t,n))||[];if(o!=null&&a!=null){(s=this.controller)===null||s===void 0?void 0:s.invalidatePagesOutsideRange(o,a,50)}}else{this.scheduleClearUnusedData()}}))}handleControllerStateChange(e){this.showLoader=!!e.shouldShowLoading;this.showEmptyResults=!!e.shouldShowEmptyResults;this.rows=e.rows;this.totalRows=e.totalRows;this.hasPartialFilterResults=!!e.isPartialFilterResponse;this.refreshingResults=!!e.isSearching;if(e.connection.type==="failure"){this.errorDetails=e.connection.details;this.connectionError.emit(e.connection.details)}else if(e.connection.type==="disconnected"){this.errorDetails=new h("DISCONNECTED",c.DISCONNECTED)}else{this.errorDetails=undefined}if(e.connection.type==="connected"||e.connection.type==="failure"){this.attemptingRetry=false}}getNodeFromRowOrIndex(e){const t=typeof e==="number"?this.rows[e]:e;if(t==null){throw new Error(`Cannot perform scene tree operation. Row not found.`)}return p(t)?t.node:t}async performRowOperation(e,t){const i=this.getNodeFromRowOrIndex(e);if(i.id==null){throw new Error(`Cannot perform scene tree operation. ID is undefined.`)}if(this.viewer==null){throw new Error(`Cannot perform scene tree operation. Cannot get reference to viewer.`)}await t({viewer:this.viewer,id:i.id.hex,node:i})}async handleSearch(e){var t,i,s,n;const o=this.getMetadataSearchKeys(this.searchOptions);const a=(i=(t=this.searchOptions)===null||t===void 0?void 0:t.exactMatch)!==null&&i!==void 0?i:this.metadataSearchExactMatch;const r=(n=(s=this.searchOptions)===null||s===void 0?void 0:s.removeHiddenItems)!==null&&n!==void 0?n:false;try{await this.filterItems(e.detail,{columns:o,exactMatch:a,removeHiddenItems:r})}catch(e){console.error("Failed to filter tree with exception: ",e)}}async handleCellLoaded(){if(!this.firstCellRendered&&this.rows.length>0){this.firstCellRendered=true;this.firstRowRendered.emit()}}getScrollToPosition(e,t){var i;const s=this.getLayoutElement();const n=Math.max(0,Math.min(e,this.totalRows-1));const o=(i=s.layoutHeight)!==null&&i!==void 0?i:0;const a=s.rowHeight;if(t==="start"){return n*a}else if(t==="middle"){const e=n*a+a/2;return e-o/2}else{const e=n*a+a;return e-o}}getConfig(){return u(this.configEnv,this.config)}ensureLayoutDefined(){let e=this.el.querySelector("vertex-scene-tree-table-layout");if(e==null){e=document.createElement("vertex-scene-tree-table-layout");e.innerHTML=`\n <vertex-scene-tree-table-column>\n <template>\n <vertex-scene-tree-table-cell prop:value="{{row.node.name}}" expand-toggle isolate-button visibility-toggle></vertex-scene-tree-table-cell>\n </template>\n </vertex-scene-tree-table-column>\n `;this.el.appendChild(e)}this.stateMap.layoutEl=e}updateLayoutElement(){const e=this.stateMap.layoutEl;if(e!=null){e.rows=this.rows;e.tree=this.el;e.totalRows=this.totalRows;e.controller=this.controller;e.rowData=this.rowData}else if(!this.stateMap.componentLoaded&&this.totalRows>0){console.debug("Scene tree has rows, but the component has not yet rendered")}}getLayoutElement(){if(this.stateMap.layoutEl!=null){return this.stateMap.layoutEl}else{throw new Error("Layout element is undefined")}}getMetadataSearchKeys(e){var t,i;const s=(t=e===null||e===void 0?void 0:e.metadataSearchKeys)!==null&&t!==void 0?t:this.metadataSearchKeys;const n=(i=e===null||e===void 0?void 0:e.exactMatch)!==null&&i!==void 0?i:this.metadataSearchExactMatch;if(n){const e=s.length>0?s:[w];return e}else if(s.length>0){return s}return undefined}get el(){return a(this)}static get watchers(){return{viewer:[{handleViewerChanged:0}],controller:[{handleControllerChanged:0}],metadataKeys:[{handleMetadataKeysChanged:0}]}}};M.style=R();export{M as vertex_scene_tree};
5
+ //# sourceMappingURL=p-72479c7e.entry.js.map
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
3
+ */
4
+ import{a as t,b as e,r,g as o}from"./p-ux1ckSDN.js";import{r as n,f as i,C as s,u,p as a}from"./p--8q6LyIm.js";import{E as c,a as p}from"./p-JEG5R8Jl.js";import{i as f,f as h}from"./p-CiSHWNC4.js";var l={};var v;function d(){if(v)return l;v=1;(function(r){var o=t();var i=o;var s=Function("return this")();var u=n();i.object.extend(proto,u);var a=e();i.object.extend(proto,a);i.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.ColumnKey",null,s);i.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.FilterChange",null,s);i.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.IndexingStatus",null,s);i.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.KeepAlive",null,s);i.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.ListChange",null,s);i.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.Node",null,s);i.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.Range",null,s);i.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange",null,s);i.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType",null,s);i.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.SealedValueCase",null,s);proto.vertexvis.protobuf.scenetree.v1alpha1.Node=function(t){o.Message.initialize(this,t,0,-1,proto.vertexvis.protobuf.scenetree.v1alpha1.Node.repeatedFields_,null)};i.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.Node,o.Message);if(i.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.Node.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.Node"}proto.vertexvis.protobuf.scenetree.v1alpha1.ListChange=function(t){o.Message.initialize(this,t,0,-1,null,null)};i.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.ListChange,o.Message);if(i.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.ListChange.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.ListChange"}proto.vertexvis.protobuf.scenetree.v1alpha1.Range=function(t){o.Message.initialize(this,t,0,-1,null,null)};i.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.Range,o.Message);if(i.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.Range.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.Range"}proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange=function(t){o.Message.initialize(this,t,0,-1,proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.repeatedFields_,null)};i.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange,o.Message);if(i.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange"}proto.vertexvis.protobuf.scenetree.v1alpha1.KeepAlive=function(t){o.Message.initialize(this,t,0,-1,null,null)};i.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.KeepAlive,o.Message);if(i.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.KeepAlive.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.KeepAlive"}proto.vertexvis.protobuf.scenetree.v1alpha1.FilterChange=function(t){o.Message.initialize(this,t,0,-1,null,null)};i.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.FilterChange,o.Message);if(i.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.FilterChange.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.FilterChange"}proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType=function(t){o.Message.initialize(this,t,0,-1,null,proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.oneofGroups_)};i.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType,o.Message);if(i.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType"}proto.vertexvis.protobuf.scenetree.v1alpha1.ColumnKey=function(t){o.Message.initialize(this,t,0,-1,null,null)};i.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.ColumnKey,o.Message);if(i.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.ColumnKey.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.ColumnKey"}proto.vertexvis.protobuf.scenetree.v1alpha1.Node.repeatedFields_=[10];if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.Node.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.toObject=function(t,e){var r,n={id:(r=e.getId())&&u.Uuid.toObject(t,r),depth:o.Message.getFieldWithDefault(e,2,0),name:o.Message.getFieldWithDefault(e,3,""),visible:o.Message.getBooleanFieldWithDefault(e,4,false),selected:o.Message.getBooleanFieldWithDefault(e,5,false),expanded:o.Message.getBooleanFieldWithDefault(e,6,false),isLeaf:o.Message.getBooleanFieldWithDefault(e,7,false),suppliedId:(r=e.getSuppliedId())&&a.StringValue.toObject(t,r),partiallyVisible:o.Message.getBooleanFieldWithDefault(e,9,false),columnsList:(r=o.Message.getRepeatedField(e,10))==null?undefined:r,filterHit:o.Message.getBooleanFieldWithDefault(e,11,false),phantom:o.Message.getBooleanFieldWithDefault(e,12,false),endItem:o.Message.getBooleanFieldWithDefault(e,13,false),hasGeometry:o.Message.getBooleanFieldWithDefault(e,14,false)};if(t){n.$jspbMessageInstance=e}return n}}proto.vertexvis.protobuf.scenetree.v1alpha1.Node.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.Node;return proto.vertexvis.protobuf.scenetree.v1alpha1.Node.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){case 1:var o=new u.Uuid;e.readMessage(o,u.Uuid.deserializeBinaryFromReader);t.setId(o);break;case 2:var o=e.readUint32();t.setDepth(o);break;case 3:var o=e.readString();t.setName(o);break;case 4:var o=e.readBool();t.setVisible(o);break;case 5:var o=e.readBool();t.setSelected(o);break;case 6:var o=e.readBool();t.setExpanded(o);break;case 7:var o=e.readBool();t.setIsLeaf(o);break;case 8:var o=new a.StringValue;e.readMessage(o,a.StringValue.deserializeBinaryFromReader);t.setSuppliedId(o);break;case 9:var o=e.readBool();t.setPartiallyVisible(o);break;case 10:var o=e.readString();t.addColumns(o);break;case 11:var o=e.readBool();t.setFilterHit(o);break;case 12:var o=e.readBool();t.setPhantom(o);break;case 13:var o=e.readBool();t.setEndItem(o);break;case 14:var o=e.readBool();t.setHasGeometry(o);break;default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.Node.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.serializeBinaryToWriter=function(t,e){var r=undefined;r=t.getId();if(r!=null){e.writeMessage(1,r,u.Uuid.serializeBinaryToWriter)}r=t.getDepth();if(r!==0){e.writeUint32(2,r)}r=t.getName();if(r.length>0){e.writeString(3,r)}r=t.getVisible();if(r){e.writeBool(4,r)}r=t.getSelected();if(r){e.writeBool(5,r)}r=t.getExpanded();if(r){e.writeBool(6,r)}r=t.getIsLeaf();if(r){e.writeBool(7,r)}r=t.getSuppliedId();if(r!=null){e.writeMessage(8,r,a.StringValue.serializeBinaryToWriter)}r=t.getPartiallyVisible();if(r){e.writeBool(9,r)}r=t.getColumnsList();if(r.length>0){e.writeRepeatedString(10,r)}r=t.getFilterHit();if(r){e.writeBool(11,r)}r=t.getPhantom();if(r){e.writeBool(12,r)}r=t.getEndItem();if(r){e.writeBool(13,r)}r=t.getHasGeometry();if(r){e.writeBool(14,r)}};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.getId=function(){return o.Message.getWrapperField(this,u.Uuid,1)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.setId=function(t){return o.Message.setWrapperField(this,1,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.clearId=function(){return this.setId(undefined)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.hasId=function(){return o.Message.getField(this,1)!=null};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.getDepth=function(){return o.Message.getFieldWithDefault(this,2,0)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.setDepth=function(t){return o.Message.setProto3IntField(this,2,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.getName=function(){return o.Message.getFieldWithDefault(this,3,"")};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.setName=function(t){return o.Message.setProto3StringField(this,3,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.getVisible=function(){return o.Message.getBooleanFieldWithDefault(this,4,false)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.setVisible=function(t){return o.Message.setProto3BooleanField(this,4,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.getSelected=function(){return o.Message.getBooleanFieldWithDefault(this,5,false)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.setSelected=function(t){return o.Message.setProto3BooleanField(this,5,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.getExpanded=function(){return o.Message.getBooleanFieldWithDefault(this,6,false)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.setExpanded=function(t){return o.Message.setProto3BooleanField(this,6,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.getIsLeaf=function(){return o.Message.getBooleanFieldWithDefault(this,7,false)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.setIsLeaf=function(t){return o.Message.setProto3BooleanField(this,7,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.getSuppliedId=function(){return o.Message.getWrapperField(this,a.StringValue,8)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.setSuppliedId=function(t){return o.Message.setWrapperField(this,8,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.clearSuppliedId=function(){return this.setSuppliedId(undefined)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.hasSuppliedId=function(){return o.Message.getField(this,8)!=null};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.getPartiallyVisible=function(){return o.Message.getBooleanFieldWithDefault(this,9,false)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.setPartiallyVisible=function(t){return o.Message.setProto3BooleanField(this,9,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.getColumnsList=function(){return o.Message.getRepeatedField(this,10)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.setColumnsList=function(t){return o.Message.setField(this,10,t||[])};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.addColumns=function(t,e){return o.Message.addToRepeatedField(this,10,t,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.clearColumnsList=function(){return this.setColumnsList([])};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.getFilterHit=function(){return o.Message.getBooleanFieldWithDefault(this,11,false)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.setFilterHit=function(t){return o.Message.setProto3BooleanField(this,11,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.getPhantom=function(){return o.Message.getBooleanFieldWithDefault(this,12,false)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.setPhantom=function(t){return o.Message.setProto3BooleanField(this,12,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.getEndItem=function(){return o.Message.getBooleanFieldWithDefault(this,13,false)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.setEndItem=function(t){return o.Message.setProto3BooleanField(this,13,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.getHasGeometry=function(){return o.Message.getBooleanFieldWithDefault(this,14,false)};proto.vertexvis.protobuf.scenetree.v1alpha1.Node.prototype.setHasGeometry=function(t){return o.Message.setProto3BooleanField(this,14,t)};if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.ListChange.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.ListChange.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.ListChange.toObject=function(t,e){var r={start:o.Message.getFieldWithDefault(e,1,0)};if(t){r.$jspbMessageInstance=e}return r}}proto.vertexvis.protobuf.scenetree.v1alpha1.ListChange.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.ListChange;return proto.vertexvis.protobuf.scenetree.v1alpha1.ListChange.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.ListChange.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){case 1:var o=e.readInt32();t.setStart(o);break;default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.ListChange.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.ListChange.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.ListChange.serializeBinaryToWriter=function(t,e){var r=undefined;r=t.getStart();if(r!==0){e.writeInt32(1,r)}};proto.vertexvis.protobuf.scenetree.v1alpha1.ListChange.prototype.getStart=function(){return o.Message.getFieldWithDefault(this,1,0)};proto.vertexvis.protobuf.scenetree.v1alpha1.ListChange.prototype.setStart=function(t){return o.Message.setProto3IntField(this,1,t)};if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.Range.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.Range.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.Range.toObject=function(t,e){var r={start:o.Message.getFieldWithDefault(e,1,0),end:o.Message.getFieldWithDefault(e,2,0)};if(t){r.$jspbMessageInstance=e}return r}}proto.vertexvis.protobuf.scenetree.v1alpha1.Range.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.Range;return proto.vertexvis.protobuf.scenetree.v1alpha1.Range.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.Range.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){case 1:var o=e.readInt32();t.setStart(o);break;case 2:var o=e.readInt32();t.setEnd(o);break;default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.Range.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.Range.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.Range.serializeBinaryToWriter=function(t,e){var r=undefined;r=t.getStart();if(r!==0){e.writeInt32(1,r)}r=t.getEnd();if(r!==0){e.writeInt32(2,r)}};proto.vertexvis.protobuf.scenetree.v1alpha1.Range.prototype.getStart=function(){return o.Message.getFieldWithDefault(this,1,0)};proto.vertexvis.protobuf.scenetree.v1alpha1.Range.prototype.setStart=function(t){return o.Message.setProto3IntField(this,1,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.Range.prototype.getEnd=function(){return o.Message.getFieldWithDefault(this,2,0)};proto.vertexvis.protobuf.scenetree.v1alpha1.Range.prototype.setEnd=function(t){return o.Message.setProto3IntField(this,2,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.repeatedFields_=[1,2,3,4,5];if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.toObject=function(t,e){var r={hiddenList:o.Message.toObjectList(e.getHiddenList(),proto.vertexvis.protobuf.scenetree.v1alpha1.Range.toObject,t),shownList:o.Message.toObjectList(e.getShownList(),proto.vertexvis.protobuf.scenetree.v1alpha1.Range.toObject,t),selectedList:o.Message.toObjectList(e.getSelectedList(),proto.vertexvis.protobuf.scenetree.v1alpha1.Range.toObject,t),deselectedList:o.Message.toObjectList(e.getDeselectedList(),proto.vertexvis.protobuf.scenetree.v1alpha1.Range.toObject,t),partiallyVisibleList:o.Message.toObjectList(e.getPartiallyVisibleList(),proto.vertexvis.protobuf.scenetree.v1alpha1.Range.toObject,t)};if(t){r.$jspbMessageInstance=e}return r}}proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange;return proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){case 1:var o=new proto.vertexvis.protobuf.scenetree.v1alpha1.Range;e.readMessage(o,proto.vertexvis.protobuf.scenetree.v1alpha1.Range.deserializeBinaryFromReader);t.addHidden(o);break;case 2:var o=new proto.vertexvis.protobuf.scenetree.v1alpha1.Range;e.readMessage(o,proto.vertexvis.protobuf.scenetree.v1alpha1.Range.deserializeBinaryFromReader);t.addShown(o);break;case 3:var o=new proto.vertexvis.protobuf.scenetree.v1alpha1.Range;e.readMessage(o,proto.vertexvis.protobuf.scenetree.v1alpha1.Range.deserializeBinaryFromReader);t.addSelected(o);break;case 4:var o=new proto.vertexvis.protobuf.scenetree.v1alpha1.Range;e.readMessage(o,proto.vertexvis.protobuf.scenetree.v1alpha1.Range.deserializeBinaryFromReader);t.addDeselected(o);break;case 5:var o=new proto.vertexvis.protobuf.scenetree.v1alpha1.Range;e.readMessage(o,proto.vertexvis.protobuf.scenetree.v1alpha1.Range.deserializeBinaryFromReader);t.addPartiallyVisible(o);break;default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.serializeBinaryToWriter=function(t,e){var r=undefined;r=t.getHiddenList();if(r.length>0){e.writeRepeatedMessage(1,r,proto.vertexvis.protobuf.scenetree.v1alpha1.Range.serializeBinaryToWriter)}r=t.getShownList();if(r.length>0){e.writeRepeatedMessage(2,r,proto.vertexvis.protobuf.scenetree.v1alpha1.Range.serializeBinaryToWriter)}r=t.getSelectedList();if(r.length>0){e.writeRepeatedMessage(3,r,proto.vertexvis.protobuf.scenetree.v1alpha1.Range.serializeBinaryToWriter)}r=t.getDeselectedList();if(r.length>0){e.writeRepeatedMessage(4,r,proto.vertexvis.protobuf.scenetree.v1alpha1.Range.serializeBinaryToWriter)}r=t.getPartiallyVisibleList();if(r.length>0){e.writeRepeatedMessage(5,r,proto.vertexvis.protobuf.scenetree.v1alpha1.Range.serializeBinaryToWriter)}};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.prototype.getHiddenList=function(){return o.Message.getRepeatedWrapperField(this,proto.vertexvis.protobuf.scenetree.v1alpha1.Range,1)};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.prototype.setHiddenList=function(t){return o.Message.setRepeatedWrapperField(this,1,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.prototype.addHidden=function(t,e){return o.Message.addToRepeatedWrapperField(this,1,t,proto.vertexvis.protobuf.scenetree.v1alpha1.Range,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.prototype.clearHiddenList=function(){return this.setHiddenList([])};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.prototype.getShownList=function(){return o.Message.getRepeatedWrapperField(this,proto.vertexvis.protobuf.scenetree.v1alpha1.Range,2)};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.prototype.setShownList=function(t){return o.Message.setRepeatedWrapperField(this,2,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.prototype.addShown=function(t,e){return o.Message.addToRepeatedWrapperField(this,2,t,proto.vertexvis.protobuf.scenetree.v1alpha1.Range,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.prototype.clearShownList=function(){return this.setShownList([])};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.prototype.getSelectedList=function(){return o.Message.getRepeatedWrapperField(this,proto.vertexvis.protobuf.scenetree.v1alpha1.Range,3)};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.prototype.setSelectedList=function(t){return o.Message.setRepeatedWrapperField(this,3,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.prototype.addSelected=function(t,e){return o.Message.addToRepeatedWrapperField(this,3,t,proto.vertexvis.protobuf.scenetree.v1alpha1.Range,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.prototype.clearSelectedList=function(){return this.setSelectedList([])};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.prototype.getDeselectedList=function(){return o.Message.getRepeatedWrapperField(this,proto.vertexvis.protobuf.scenetree.v1alpha1.Range,4)};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.prototype.setDeselectedList=function(t){return o.Message.setRepeatedWrapperField(this,4,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.prototype.addDeselected=function(t,e){return o.Message.addToRepeatedWrapperField(this,4,t,proto.vertexvis.protobuf.scenetree.v1alpha1.Range,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.prototype.clearDeselectedList=function(){return this.setDeselectedList([])};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.prototype.getPartiallyVisibleList=function(){return o.Message.getRepeatedWrapperField(this,proto.vertexvis.protobuf.scenetree.v1alpha1.Range,5)};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.prototype.setPartiallyVisibleList=function(t){return o.Message.setRepeatedWrapperField(this,5,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.prototype.addPartiallyVisible=function(t,e){return o.Message.addToRepeatedWrapperField(this,5,t,proto.vertexvis.protobuf.scenetree.v1alpha1.Range,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.prototype.clearPartiallyVisibleList=function(){return this.setPartiallyVisibleList([])};if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.KeepAlive.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.KeepAlive.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.KeepAlive.toObject=function(t,e){var r={};if(t){r.$jspbMessageInstance=e}return r}}proto.vertexvis.protobuf.scenetree.v1alpha1.KeepAlive.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.KeepAlive;return proto.vertexvis.protobuf.scenetree.v1alpha1.KeepAlive.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.KeepAlive.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.KeepAlive.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.KeepAlive.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.KeepAlive.serializeBinaryToWriter=function(t,e){};if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.FilterChange.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.FilterChange.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterChange.toObject=function(t,e){var r={numberOfResults:o.Message.getFieldWithDefault(e,1,0)};if(t){r.$jspbMessageInstance=e}return r}}proto.vertexvis.protobuf.scenetree.v1alpha1.FilterChange.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.FilterChange;return proto.vertexvis.protobuf.scenetree.v1alpha1.FilterChange.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterChange.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){case 1:var o=e.readInt32();t.setNumberOfResults(o);break;default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterChange.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.FilterChange.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterChange.serializeBinaryToWriter=function(t,e){var r=undefined;r=t.getNumberOfResults();if(r!==0){e.writeInt32(1,r)}};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterChange.prototype.getNumberOfResults=function(){return o.Message.getFieldWithDefault(this,1,0)};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterChange.prototype.setNumberOfResults=function(t){return o.Message.setProto3IntField(this,1,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.oneofGroups_=[[1,2,3,4]];proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.SealedValueCase={SEALED_VALUE_NOT_SET:0,LIST_CHANGE:1,RANGES:2,KEEP_ALIVE:3,FILTER_CHANGE:4};proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.prototype.getSealedValueCase=function(){return o.Message.computeOneofCase(this,proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.oneofGroups_[0])};if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.toObject=function(t,e){var r,o={listChange:(r=e.getListChange())&&proto.vertexvis.protobuf.scenetree.v1alpha1.ListChange.toObject(t,r),ranges:(r=e.getRanges())&&proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.toObject(t,r),keepAlive:(r=e.getKeepAlive())&&proto.vertexvis.protobuf.scenetree.v1alpha1.KeepAlive.toObject(t,r),filterChange:(r=e.getFilterChange())&&proto.vertexvis.protobuf.scenetree.v1alpha1.FilterChange.toObject(t,r)};if(t){o.$jspbMessageInstance=e}return o}}proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType;return proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){case 1:var o=new proto.vertexvis.protobuf.scenetree.v1alpha1.ListChange;e.readMessage(o,proto.vertexvis.protobuf.scenetree.v1alpha1.ListChange.deserializeBinaryFromReader);t.setListChange(o);break;case 2:var o=new proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange;e.readMessage(o,proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.deserializeBinaryFromReader);t.setRanges(o);break;case 3:var o=new proto.vertexvis.protobuf.scenetree.v1alpha1.KeepAlive;e.readMessage(o,proto.vertexvis.protobuf.scenetree.v1alpha1.KeepAlive.deserializeBinaryFromReader);t.setKeepAlive(o);break;case 4:var o=new proto.vertexvis.protobuf.scenetree.v1alpha1.FilterChange;e.readMessage(o,proto.vertexvis.protobuf.scenetree.v1alpha1.FilterChange.deserializeBinaryFromReader);t.setFilterChange(o);break;default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.serializeBinaryToWriter=function(t,e){var r=undefined;r=t.getListChange();if(r!=null){e.writeMessage(1,r,proto.vertexvis.protobuf.scenetree.v1alpha1.ListChange.serializeBinaryToWriter)}r=t.getRanges();if(r!=null){e.writeMessage(2,r,proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange.serializeBinaryToWriter)}r=t.getKeepAlive();if(r!=null){e.writeMessage(3,r,proto.vertexvis.protobuf.scenetree.v1alpha1.KeepAlive.serializeBinaryToWriter)}r=t.getFilterChange();if(r!=null){e.writeMessage(4,r,proto.vertexvis.protobuf.scenetree.v1alpha1.FilterChange.serializeBinaryToWriter)}};proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.prototype.getListChange=function(){return o.Message.getWrapperField(this,proto.vertexvis.protobuf.scenetree.v1alpha1.ListChange,1)};proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.prototype.setListChange=function(t){return o.Message.setOneofWrapperField(this,1,proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.oneofGroups_[0],t)};proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.prototype.clearListChange=function(){return this.setListChange(undefined)};proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.prototype.hasListChange=function(){return o.Message.getField(this,1)!=null};proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.prototype.getRanges=function(){return o.Message.getWrapperField(this,proto.vertexvis.protobuf.scenetree.v1alpha1.StateChange,2)};proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.prototype.setRanges=function(t){return o.Message.setOneofWrapperField(this,2,proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.oneofGroups_[0],t)};proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.prototype.clearRanges=function(){return this.setRanges(undefined)};proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.prototype.hasRanges=function(){return o.Message.getField(this,2)!=null};proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.prototype.getKeepAlive=function(){return o.Message.getWrapperField(this,proto.vertexvis.protobuf.scenetree.v1alpha1.KeepAlive,3)};proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.prototype.setKeepAlive=function(t){return o.Message.setOneofWrapperField(this,3,proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.oneofGroups_[0],t)};proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.prototype.clearKeepAlive=function(){return this.setKeepAlive(undefined)};proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.prototype.hasKeepAlive=function(){return o.Message.getField(this,3)!=null};proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.prototype.getFilterChange=function(){return o.Message.getWrapperField(this,proto.vertexvis.protobuf.scenetree.v1alpha1.FilterChange,4)};proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.prototype.setFilterChange=function(t){return o.Message.setOneofWrapperField(this,4,proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.oneofGroups_[0],t)};proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.prototype.clearFilterChange=function(){return this.setFilterChange(undefined)};proto.vertexvis.protobuf.scenetree.v1alpha1.TreeChangeType.prototype.hasFilterChange=function(){return o.Message.getField(this,4)!=null};if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.ColumnKey.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.ColumnKey.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.ColumnKey.toObject=function(t,e){var r={value:o.Message.getFieldWithDefault(e,1,"")};if(t){r.$jspbMessageInstance=e}return r}}proto.vertexvis.protobuf.scenetree.v1alpha1.ColumnKey.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.ColumnKey;return proto.vertexvis.protobuf.scenetree.v1alpha1.ColumnKey.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.ColumnKey.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){case 1:var o=e.readString();t.setValue(o);break;default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.ColumnKey.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.ColumnKey.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.ColumnKey.serializeBinaryToWriter=function(t,e){var r=undefined;r=t.getValue();if(r.length>0){e.writeString(1,r)}};proto.vertexvis.protobuf.scenetree.v1alpha1.ColumnKey.prototype.getValue=function(){return o.Message.getFieldWithDefault(this,1,"")};proto.vertexvis.protobuf.scenetree.v1alpha1.ColumnKey.prototype.setValue=function(t){return o.Message.setProto3StringField(this,1,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.IndexingStatus={INDEXING_STATUS_INVALID:0,INDEXING_STATUS_INDEXING:1,INDEXING_STATUS_READY:2};i.object.extend(r,proto.vertexvis.protobuf.scenetree.v1alpha1)})(l);return l}var w=d();var b={};var k;function m(){if(k)return b;k=1;(function(r){var o=t();var s=o;var u=Function("return this")();var a=i();s.object.extend(proto,a);var c=n();s.object.extend(proto,c);var p=e();s.object.extend(proto,p);var f=d();s.object.extend(proto,f);s.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllRequest",null,u);s.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllResponse",null,u);s.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeRequest",null,u);s.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeResponse",null,u);s.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllRequest",null,u);s.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllResponse",null,u);s.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeRequest",null,u);s.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeResponse",null,u);s.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest",null,u);s.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.FilterResponse",null,u);s.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsRequest",null,u);s.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsResponse",null,u);s.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsRequest",null,u);s.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsResponse",null,u);s.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest",null,u);s.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse",null,u);s.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.Handshake",null,u);s.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemRequest",null,u);s.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemResponse",null,u);s.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeRequest",null,u);s.exportSymbol("proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeResponse",null,u);proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest=function(t){o.Message.initialize(this,t,0,-1,proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.repeatedFields_,null)};s.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest,o.Message);if(s.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest"}proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse=function(t){o.Message.initialize(this,t,0,-1,proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse.repeatedFields_,null)};s.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse,o.Message);if(s.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse"}proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeRequest=function(t){o.Message.initialize(this,t,0,-1,null,null)};s.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeRequest,o.Message);if(s.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeRequest.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeRequest"}proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeResponse=function(t){o.Message.initialize(this,t,0,-1,null,null)};s.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeResponse,o.Message);if(s.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeResponse.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeResponse"}proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeRequest=function(t){o.Message.initialize(this,t,0,-1,null,null)};s.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeRequest,o.Message);if(s.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeRequest.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeRequest"}proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeResponse=function(t){o.Message.initialize(this,t,0,-1,null,null)};s.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeResponse,o.Message);if(s.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeResponse.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeResponse"}proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeRequest=function(t){o.Message.initialize(this,t,0,-1,null,null)};s.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeRequest,o.Message);if(s.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeRequest.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeRequest"}proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeResponse=function(t){o.Message.initialize(this,t,0,-1,null,null)};s.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeResponse,o.Message);if(s.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeResponse.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeResponse"}proto.vertexvis.protobuf.scenetree.v1alpha1.Handshake=function(t){o.Message.initialize(this,t,0,-1,null,null)};s.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.Handshake,o.Message);if(s.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.Handshake.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.Handshake"}proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest=function(t){o.Message.initialize(this,t,0,-1,proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest.repeatedFields_,null)};s.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest,o.Message);if(s.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest"}proto.vertexvis.protobuf.scenetree.v1alpha1.FilterResponse=function(t){o.Message.initialize(this,t,0,-1,null,null)};s.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.FilterResponse,o.Message);if(s.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.FilterResponse.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.FilterResponse"}proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemRequest=function(t){o.Message.initialize(this,t,0,-1,null,null)};s.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemRequest,o.Message);if(s.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemRequest.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemRequest"}proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemResponse=function(t){o.Message.initialize(this,t,0,-1,null,null)};s.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemResponse,o.Message);if(s.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemResponse.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemResponse"}proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllRequest=function(t){o.Message.initialize(this,t,0,-1,null,null)};s.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllRequest,o.Message);if(s.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllRequest.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllRequest"}proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllResponse=function(t){o.Message.initialize(this,t,0,-1,null,null)};s.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllResponse,o.Message);if(s.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllResponse.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllResponse"}proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllRequest=function(t){o.Message.initialize(this,t,0,-1,null,null)};s.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllRequest,o.Message);if(s.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllRequest.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllRequest"}proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllResponse=function(t){o.Message.initialize(this,t,0,-1,null,null)};s.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllResponse,o.Message);if(s.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllResponse.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllResponse"}proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsRequest=function(t){o.Message.initialize(this,t,0,-1,null,null)};s.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsRequest,o.Message);if(s.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsRequest.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsRequest"}proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsResponse=function(t){o.Message.initialize(this,t,0,-1,proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsResponse.repeatedFields_,null)};s.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsResponse,o.Message);if(s.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsResponse.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsResponse"}proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsRequest=function(t){o.Message.initialize(this,t,0,-1,null,null)};s.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsRequest,o.Message);if(s.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsRequest.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsRequest"}proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsResponse=function(t){o.Message.initialize(this,t,0,-1,proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsResponse.repeatedFields_,null)};s.inherits(proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsResponse,o.Message);if(s.DEBUG&&!COMPILED){proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsResponse.displayName="proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsResponse"}proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.repeatedFields_=[3];if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.toObject=function(t,e){var r,n={viewId:(r=e.getViewId())&&c.Uuid.toObject(t,r),pager:(r=e.getPager())&&a.OffsetPager.toObject(t,r),additionalColumnKeysList:(r=o.Message.getRepeatedField(e,3))==null?undefined:r,requireViewReady:o.Message.getBooleanFieldWithDefault(e,4,false)};if(t){n.$jspbMessageInstance=e}return n}}proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest;return proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){case 1:var o=new c.Uuid;e.readMessage(o,c.Uuid.deserializeBinaryFromReader);t.setViewId(o);break;case 2:var o=new a.OffsetPager;e.readMessage(o,a.OffsetPager.deserializeBinaryFromReader);t.setPager(o);break;case 3:var o=e.readString();t.addAdditionalColumnKeys(o);break;case 4:var o=e.readBool();t.setRequireViewReady(o);break;default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.serializeBinaryToWriter=function(t,e){var r=undefined;r=t.getViewId();if(r!=null){e.writeMessage(1,r,c.Uuid.serializeBinaryToWriter)}r=t.getPager();if(r!=null){e.writeMessage(2,r,a.OffsetPager.serializeBinaryToWriter)}r=t.getAdditionalColumnKeysList();if(r.length>0){e.writeRepeatedString(3,r)}r=t.getRequireViewReady();if(r){e.writeBool(4,r)}};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.prototype.getViewId=function(){return o.Message.getWrapperField(this,c.Uuid,1)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.prototype.setViewId=function(t){return o.Message.setWrapperField(this,1,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.prototype.clearViewId=function(){return this.setViewId(undefined)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.prototype.hasViewId=function(){return o.Message.getField(this,1)!=null};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.prototype.getPager=function(){return o.Message.getWrapperField(this,a.OffsetPager,2)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.prototype.setPager=function(t){return o.Message.setWrapperField(this,2,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.prototype.clearPager=function(){return this.setPager(undefined)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.prototype.hasPager=function(){return o.Message.getField(this,2)!=null};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.prototype.getAdditionalColumnKeysList=function(){return o.Message.getRepeatedField(this,3)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.prototype.setAdditionalColumnKeysList=function(t){return o.Message.setField(this,3,t||[])};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.prototype.addAdditionalColumnKeys=function(t,e){return o.Message.addToRepeatedField(this,3,t,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.prototype.clearAdditionalColumnKeysList=function(){return this.setAdditionalColumnKeysList([])};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.prototype.getRequireViewReady=function(){return o.Message.getBooleanFieldWithDefault(this,4,false)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeRequest.prototype.setRequireViewReady=function(t){return o.Message.setProto3BooleanField(this,4,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse.repeatedFields_=[1];if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse.toObject=function(t,e){var r,n={itemsList:o.Message.toObjectList(e.getItemsList(),f.Node.toObject,t),totalVisible:o.Message.getFieldWithDefault(e,2,0),cursor:(r=e.getCursor())&&a.OffsetCursor.toObject(t,r)};if(t){n.$jspbMessageInstance=e}return n}}proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse;return proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){case 1:var o=new f.Node;e.readMessage(o,f.Node.deserializeBinaryFromReader);t.addItems(o);break;case 2:var o=e.readUint32();t.setTotalVisible(o);break;case 3:var o=new a.OffsetCursor;e.readMessage(o,a.OffsetCursor.deserializeBinaryFromReader);t.setCursor(o);break;default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse.serializeBinaryToWriter=function(t,e){var r=undefined;r=t.getItemsList();if(r.length>0){e.writeRepeatedMessage(1,r,f.Node.serializeBinaryToWriter)}r=t.getTotalVisible();if(r!==0){e.writeUint32(2,r)}r=t.getCursor();if(r!=null){e.writeMessage(3,r,a.OffsetCursor.serializeBinaryToWriter)}};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse.prototype.getItemsList=function(){return o.Message.getRepeatedWrapperField(this,f.Node,1)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse.prototype.setItemsList=function(t){return o.Message.setRepeatedWrapperField(this,1,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse.prototype.addItems=function(t,e){return o.Message.addToRepeatedWrapperField(this,1,t,proto.vertexvis.protobuf.scenetree.v1alpha1.Node,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse.prototype.clearItemsList=function(){return this.setItemsList([])};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse.prototype.getTotalVisible=function(){return o.Message.getFieldWithDefault(this,2,0)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse.prototype.setTotalVisible=function(t){return o.Message.setProto3IntField(this,2,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse.prototype.getCursor=function(){return o.Message.getWrapperField(this,a.OffsetCursor,3)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse.prototype.setCursor=function(t){return o.Message.setWrapperField(this,3,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse.prototype.clearCursor=function(){return this.setCursor(undefined)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetTreeResponse.prototype.hasCursor=function(){return o.Message.getField(this,3)!=null};if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeRequest.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeRequest.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeRequest.toObject=function(t,e){var r,o={viewId:(r=e.getViewId())&&c.Uuid.toObject(t,r),nodeId:(r=e.getNodeId())&&c.Uuid.toObject(t,r)};if(t){o.$jspbMessageInstance=e}return o}}proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeRequest.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeRequest;return proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeRequest.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeRequest.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){case 1:var o=new c.Uuid;e.readMessage(o,c.Uuid.deserializeBinaryFromReader);t.setViewId(o);break;case 2:var o=new c.Uuid;e.readMessage(o,c.Uuid.deserializeBinaryFromReader);t.setNodeId(o);break;default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeRequest.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeRequest.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeRequest.serializeBinaryToWriter=function(t,e){var r=undefined;r=t.getViewId();if(r!=null){e.writeMessage(1,r,c.Uuid.serializeBinaryToWriter)}r=t.getNodeId();if(r!=null){e.writeMessage(2,r,c.Uuid.serializeBinaryToWriter)}};proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeRequest.prototype.getViewId=function(){return o.Message.getWrapperField(this,c.Uuid,1)};proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeRequest.prototype.setViewId=function(t){return o.Message.setWrapperField(this,1,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeRequest.prototype.clearViewId=function(){return this.setViewId(undefined)};proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeRequest.prototype.hasViewId=function(){return o.Message.getField(this,1)!=null};proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeRequest.prototype.getNodeId=function(){return o.Message.getWrapperField(this,c.Uuid,2)};proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeRequest.prototype.setNodeId=function(t){return o.Message.setWrapperField(this,2,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeRequest.prototype.clearNodeId=function(){return this.setNodeId(undefined)};proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeRequest.prototype.hasNodeId=function(){return o.Message.getField(this,2)!=null};if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeResponse.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeResponse.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeResponse.toObject=function(t,e){var r={};if(t){r.$jspbMessageInstance=e}return r}}proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeResponse.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeResponse;return proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeResponse.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeResponse.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeResponse.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeResponse.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandNodeResponse.serializeBinaryToWriter=function(t,e){};if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeRequest.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeRequest.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeRequest.toObject=function(t,e){var r,o={viewId:(r=e.getViewId())&&c.Uuid.toObject(t,r),nodeId:(r=e.getNodeId())&&c.Uuid.toObject(t,r)};if(t){o.$jspbMessageInstance=e}return o}}proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeRequest.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeRequest;return proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeRequest.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeRequest.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){case 1:var o=new c.Uuid;e.readMessage(o,c.Uuid.deserializeBinaryFromReader);t.setViewId(o);break;case 2:var o=new c.Uuid;e.readMessage(o,c.Uuid.deserializeBinaryFromReader);t.setNodeId(o);break;default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeRequest.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeRequest.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeRequest.serializeBinaryToWriter=function(t,e){var r=undefined;r=t.getViewId();if(r!=null){e.writeMessage(1,r,c.Uuid.serializeBinaryToWriter)}r=t.getNodeId();if(r!=null){e.writeMessage(2,r,c.Uuid.serializeBinaryToWriter)}};proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeRequest.prototype.getViewId=function(){return o.Message.getWrapperField(this,c.Uuid,1)};proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeRequest.prototype.setViewId=function(t){return o.Message.setWrapperField(this,1,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeRequest.prototype.clearViewId=function(){return this.setViewId(undefined)};proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeRequest.prototype.hasViewId=function(){return o.Message.getField(this,1)!=null};proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeRequest.prototype.getNodeId=function(){return o.Message.getWrapperField(this,c.Uuid,2)};proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeRequest.prototype.setNodeId=function(t){return o.Message.setWrapperField(this,2,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeRequest.prototype.clearNodeId=function(){return this.setNodeId(undefined)};proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeRequest.prototype.hasNodeId=function(){return o.Message.getField(this,2)!=null};if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeResponse.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeResponse.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeResponse.toObject=function(t,e){var r={};if(t){r.$jspbMessageInstance=e}return r}}proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeResponse.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeResponse;return proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeResponse.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeResponse.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeResponse.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeResponse.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseNodeResponse.serializeBinaryToWriter=function(t,e){};if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeRequest.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeRequest.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeRequest.toObject=function(t,e){var r,o={viewId:(r=e.getViewId())&&c.Uuid.toObject(t,r)};if(t){o.$jspbMessageInstance=e}return o}}proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeRequest.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeRequest;return proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeRequest.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeRequest.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){case 1:var o=new c.Uuid;e.readMessage(o,c.Uuid.deserializeBinaryFromReader);t.setViewId(o);break;default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeRequest.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeRequest.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeRequest.serializeBinaryToWriter=function(t,e){var r=undefined;r=t.getViewId();if(r!=null){e.writeMessage(1,r,c.Uuid.serializeBinaryToWriter)}};proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeRequest.prototype.getViewId=function(){return o.Message.getWrapperField(this,c.Uuid,1)};proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeRequest.prototype.setViewId=function(t){return o.Message.setWrapperField(this,1,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeRequest.prototype.clearViewId=function(){return this.setViewId(undefined)};proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeRequest.prototype.hasViewId=function(){return o.Message.getField(this,1)!=null};if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeResponse.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeResponse.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeResponse.toObject=function(t,e){var r,o={change:(r=e.getChange())&&f.TreeChangeType.toObject(t,r),handshake:(r=e.getHandshake())&&proto.vertexvis.protobuf.scenetree.v1alpha1.Handshake.toObject(t,r)};if(t){o.$jspbMessageInstance=e}return o}}proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeResponse.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeResponse;return proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeResponse.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeResponse.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){case 1:var o=new f.TreeChangeType;e.readMessage(o,f.TreeChangeType.deserializeBinaryFromReader);t.setChange(o);break;case 2:var o=new proto.vertexvis.protobuf.scenetree.v1alpha1.Handshake;e.readMessage(o,proto.vertexvis.protobuf.scenetree.v1alpha1.Handshake.deserializeBinaryFromReader);t.setHandshake(o);break;default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeResponse.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeResponse.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeResponse.serializeBinaryToWriter=function(t,e){var r=undefined;r=t.getChange();if(r!=null){e.writeMessage(1,r,f.TreeChangeType.serializeBinaryToWriter)}r=t.getHandshake();if(r!=null){e.writeMessage(2,r,proto.vertexvis.protobuf.scenetree.v1alpha1.Handshake.serializeBinaryToWriter)}};proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeResponse.prototype.getChange=function(){return o.Message.getWrapperField(this,f.TreeChangeType,1)};proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeResponse.prototype.setChange=function(t){return o.Message.setWrapperField(this,1,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeResponse.prototype.clearChange=function(){return this.setChange(undefined)};proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeResponse.prototype.hasChange=function(){return o.Message.getField(this,1)!=null};proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeResponse.prototype.getHandshake=function(){return o.Message.getWrapperField(this,proto.vertexvis.protobuf.scenetree.v1alpha1.Handshake,2)};proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeResponse.prototype.setHandshake=function(t){return o.Message.setWrapperField(this,2,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeResponse.prototype.clearHandshake=function(){return this.setHandshake(undefined)};proto.vertexvis.protobuf.scenetree.v1alpha1.SubscribeResponse.prototype.hasHandshake=function(){return o.Message.getField(this,2)!=null};if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.Handshake.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.Handshake.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.Handshake.toObject=function(t,e){var r={};if(t){r.$jspbMessageInstance=e}return r}}proto.vertexvis.protobuf.scenetree.v1alpha1.Handshake.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.Handshake;return proto.vertexvis.protobuf.scenetree.v1alpha1.Handshake.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.Handshake.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.Handshake.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.Handshake.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.Handshake.serializeBinaryToWriter=function(t,e){};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest.repeatedFields_=[3];if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest.toObject=function(t,e){var r,n={filter:o.Message.getFieldWithDefault(e,1,""),fullTree:o.Message.getBooleanFieldWithDefault(e,2,false),columnsKeysList:(r=o.Message.getRepeatedField(e,3))==null?undefined:r,exactMatch:o.Message.getBooleanFieldWithDefault(e,4,false),removeHiddenItems:o.Message.getBooleanFieldWithDefault(e,5,false)};if(t){n.$jspbMessageInstance=e}return n}}proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest;return proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){case 1:var o=e.readString();t.setFilter(o);break;case 2:var o=e.readBool();t.setFullTree(o);break;case 3:var o=e.readString();t.addColumnsKeys(o);break;case 4:var o=e.readBool();t.setExactMatch(o);break;case 5:var o=e.readBool();t.setRemoveHiddenItems(o);break;default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest.serializeBinaryToWriter=function(t,e){var r=undefined;r=t.getFilter();if(r.length>0){e.writeString(1,r)}r=t.getFullTree();if(r){e.writeBool(2,r)}r=t.getColumnsKeysList();if(r.length>0){e.writeRepeatedString(3,r)}r=t.getExactMatch();if(r){e.writeBool(4,r)}r=t.getRemoveHiddenItems();if(r){e.writeBool(5,r)}};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest.prototype.getFilter=function(){return o.Message.getFieldWithDefault(this,1,"")};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest.prototype.setFilter=function(t){return o.Message.setProto3StringField(this,1,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest.prototype.getFullTree=function(){return o.Message.getBooleanFieldWithDefault(this,2,false)};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest.prototype.setFullTree=function(t){return o.Message.setProto3BooleanField(this,2,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest.prototype.getColumnsKeysList=function(){return o.Message.getRepeatedField(this,3)};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest.prototype.setColumnsKeysList=function(t){return o.Message.setField(this,3,t||[])};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest.prototype.addColumnsKeys=function(t,e){return o.Message.addToRepeatedField(this,3,t,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest.prototype.clearColumnsKeysList=function(){return this.setColumnsKeysList([])};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest.prototype.getExactMatch=function(){return o.Message.getBooleanFieldWithDefault(this,4,false)};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest.prototype.setExactMatch=function(t){return o.Message.setProto3BooleanField(this,4,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest.prototype.getRemoveHiddenItems=function(){return o.Message.getBooleanFieldWithDefault(this,5,false)};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterRequest.prototype.setRemoveHiddenItems=function(t){return o.Message.setProto3BooleanField(this,5,t)};if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.FilterResponse.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.FilterResponse.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterResponse.toObject=function(t,e){var r={numberOfResults:o.Message.getFieldWithDefault(e,1,0),indexingStatus:o.Message.getFieldWithDefault(e,2,0)};if(t){r.$jspbMessageInstance=e}return r}}proto.vertexvis.protobuf.scenetree.v1alpha1.FilterResponse.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.FilterResponse;return proto.vertexvis.protobuf.scenetree.v1alpha1.FilterResponse.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterResponse.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){case 1:var o=e.readUint32();t.setNumberOfResults(o);break;case 2:var o=e.readEnum();t.setIndexingStatus(o);break;default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterResponse.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.FilterResponse.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterResponse.serializeBinaryToWriter=function(t,e){var r=undefined;r=t.getNumberOfResults();if(r!==0){e.writeUint32(1,r)}r=t.getIndexingStatus();if(r!==0){e.writeEnum(2,r)}};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterResponse.prototype.getNumberOfResults=function(){return o.Message.getFieldWithDefault(this,1,0)};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterResponse.prototype.setNumberOfResults=function(t){return o.Message.setProto3IntField(this,1,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterResponse.prototype.getIndexingStatus=function(){return o.Message.getFieldWithDefault(this,2,0)};proto.vertexvis.protobuf.scenetree.v1alpha1.FilterResponse.prototype.setIndexingStatus=function(t){return o.Message.setProto3EnumField(this,2,t)};if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemRequest.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemRequest.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemRequest.toObject=function(t,e){var r,o={nodeId:(r=e.getNodeId())&&c.Uuid.toObject(t,r)};if(t){o.$jspbMessageInstance=e}return o}}proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemRequest.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemRequest;return proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemRequest.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemRequest.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){case 2:var o=new c.Uuid;e.readMessage(o,c.Uuid.deserializeBinaryFromReader);t.setNodeId(o);break;default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemRequest.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemRequest.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemRequest.serializeBinaryToWriter=function(t,e){var r=undefined;r=t.getNodeId();if(r!=null){e.writeMessage(2,r,c.Uuid.serializeBinaryToWriter)}};proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemRequest.prototype.getNodeId=function(){return o.Message.getWrapperField(this,c.Uuid,2)};proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemRequest.prototype.setNodeId=function(t){return o.Message.setWrapperField(this,2,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemRequest.prototype.clearNodeId=function(){return this.setNodeId(undefined)};proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemRequest.prototype.hasNodeId=function(){return o.Message.getField(this,2)!=null};if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemResponse.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemResponse.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemResponse.toObject=function(t,e){var r,n={locatedIndex:(r=e.getLocatedIndex())&&p.UInt64Value.toObject(t,r),requiresReload:o.Message.getBooleanFieldWithDefault(e,2,false)};if(t){n.$jspbMessageInstance=e}return n}}proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemResponse.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemResponse;return proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemResponse.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemResponse.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){case 1:var o=new p.UInt64Value;e.readMessage(o,p.UInt64Value.deserializeBinaryFromReader);t.setLocatedIndex(o);break;case 2:var o=e.readBool();t.setRequiresReload(o);break;default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemResponse.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemResponse.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemResponse.serializeBinaryToWriter=function(t,e){var r=undefined;r=t.getLocatedIndex();if(r!=null){e.writeMessage(1,r,p.UInt64Value.serializeBinaryToWriter)}r=t.getRequiresReload();if(r){e.writeBool(2,r)}};proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemResponse.prototype.getLocatedIndex=function(){return o.Message.getWrapperField(this,p.UInt64Value,1)};proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemResponse.prototype.setLocatedIndex=function(t){return o.Message.setWrapperField(this,1,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemResponse.prototype.clearLocatedIndex=function(){return this.setLocatedIndex(undefined)};proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemResponse.prototype.hasLocatedIndex=function(){return o.Message.getField(this,1)!=null};proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemResponse.prototype.getRequiresReload=function(){return o.Message.getBooleanFieldWithDefault(this,2,false)};proto.vertexvis.protobuf.scenetree.v1alpha1.LocateItemResponse.prototype.setRequiresReload=function(t){return o.Message.setProto3BooleanField(this,2,t)};if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllRequest.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllRequest.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllRequest.toObject=function(t,e){var r={};if(t){r.$jspbMessageInstance=e}return r}}proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllRequest.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllRequest;return proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllRequest.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllRequest.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllRequest.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllRequest.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllRequest.serializeBinaryToWriter=function(t,e){};if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllResponse.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllResponse.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllResponse.toObject=function(t,e){var r={};if(t){r.$jspbMessageInstance=e}return r}}proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllResponse.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllResponse;return proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllResponse.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllResponse.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllResponse.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllResponse.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.ExpandAllResponse.serializeBinaryToWriter=function(t,e){};if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllRequest.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllRequest.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllRequest.toObject=function(t,e){var r={};if(t){r.$jspbMessageInstance=e}return r}}proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllRequest.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllRequest;return proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllRequest.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllRequest.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllRequest.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllRequest.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllRequest.serializeBinaryToWriter=function(t,e){};if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllResponse.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllResponse.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllResponse.toObject=function(t,e){var r={};if(t){r.$jspbMessageInstance=e}return r}}proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllResponse.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllResponse;return proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllResponse.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllResponse.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllResponse.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllResponse.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.CollapseAllResponse.serializeBinaryToWriter=function(t,e){};if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsRequest.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsRequest.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsRequest.toObject=function(t,e){var r,o={nodeId:(r=e.getNodeId())&&c.Uuid.toObject(t,r)};if(t){o.$jspbMessageInstance=e}return o}}proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsRequest.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsRequest;return proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsRequest.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsRequest.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){case 1:var o=new c.Uuid;e.readMessage(o,c.Uuid.deserializeBinaryFromReader);t.setNodeId(o);break;default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsRequest.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsRequest.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsRequest.serializeBinaryToWriter=function(t,e){var r=undefined;r=t.getNodeId();if(r!=null){e.writeMessage(1,r,c.Uuid.serializeBinaryToWriter)}};proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsRequest.prototype.getNodeId=function(){return o.Message.getWrapperField(this,c.Uuid,1)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsRequest.prototype.setNodeId=function(t){return o.Message.setWrapperField(this,1,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsRequest.prototype.clearNodeId=function(){return this.setNodeId(undefined)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsRequest.prototype.hasNodeId=function(){return o.Message.getField(this,1)!=null};proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsResponse.repeatedFields_=[1];if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsResponse.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsResponse.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsResponse.toObject=function(t,e){var r={itemsList:o.Message.toObjectList(e.getItemsList(),f.Node.toObject,t)};if(t){r.$jspbMessageInstance=e}return r}}proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsResponse.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsResponse;return proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsResponse.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsResponse.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){case 1:var o=new f.Node;e.readMessage(o,f.Node.deserializeBinaryFromReader);t.addItems(o);break;default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsResponse.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsResponse.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsResponse.serializeBinaryToWriter=function(t,e){var r=undefined;r=t.getItemsList();if(r.length>0){e.writeRepeatedMessage(1,r,f.Node.serializeBinaryToWriter)}};proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsResponse.prototype.getItemsList=function(){return o.Message.getRepeatedWrapperField(this,f.Node,1)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsResponse.prototype.setItemsList=function(t){return o.Message.setRepeatedWrapperField(this,1,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsResponse.prototype.addItems=function(t,e){return o.Message.addToRepeatedWrapperField(this,1,t,proto.vertexvis.protobuf.scenetree.v1alpha1.Node,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetNodeAncestorsResponse.prototype.clearItemsList=function(){return this.setItemsList([])};if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsRequest.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsRequest.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsRequest.toObject=function(t,e){var r={};if(t){r.$jspbMessageInstance=e}return r}}proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsRequest.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsRequest;return proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsRequest.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsRequest.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsRequest.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsRequest.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsRequest.serializeBinaryToWriter=function(t,e){};proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsResponse.repeatedFields_=[1];if(o.Message.GENERATE_TO_OBJECT){proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsResponse.prototype.toObject=function(t){return proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsResponse.toObject(t,this)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsResponse.toObject=function(t,e){var r={keysList:o.Message.toObjectList(e.getKeysList(),f.ColumnKey.toObject,t),indexingStatus:o.Message.getFieldWithDefault(e,2,0)};if(t){r.$jspbMessageInstance=e}return r}}proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsResponse.deserializeBinary=function(t){var e=new o.BinaryReader(t);var r=new proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsResponse;return proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsResponse.deserializeBinaryFromReader(r,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsResponse.deserializeBinaryFromReader=function(t,e){while(e.nextField()){if(e.isEndGroup()){break}var r=e.getFieldNumber();switch(r){case 1:var o=new f.ColumnKey;e.readMessage(o,f.ColumnKey.deserializeBinaryFromReader);t.addKeys(o);break;case 2:var o=e.readEnum();t.setIndexingStatus(o);break;default:e.skipField();break}}return t};proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsResponse.prototype.serializeBinary=function(){var t=new o.BinaryWriter;proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsResponse.serializeBinaryToWriter(this,t);return t.getResultBuffer()};proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsResponse.serializeBinaryToWriter=function(t,e){var r=undefined;r=t.getKeysList();if(r.length>0){e.writeRepeatedMessage(1,r,f.ColumnKey.serializeBinaryToWriter)}r=t.getIndexingStatus();if(r!==0){e.writeEnum(2,r)}};proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsResponse.prototype.getKeysList=function(){return o.Message.getRepeatedWrapperField(this,f.ColumnKey,1)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsResponse.prototype.setKeysList=function(t){return o.Message.setRepeatedWrapperField(this,1,t)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsResponse.prototype.addKeys=function(t,e){return o.Message.addToRepeatedWrapperField(this,1,t,proto.vertexvis.protobuf.scenetree.v1alpha1.ColumnKey,e)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsResponse.prototype.clearKeysList=function(){return this.setKeysList([])};proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsResponse.prototype.getIndexingStatus=function(){return o.Message.getFieldWithDefault(this,2,0)};proto.vertexvis.protobuf.scenetree.v1alpha1.GetAvailableColumnsResponse.prototype.setIndexingStatus=function(t){return o.Message.setProto3EnumField(this,2,t)};s.object.extend(r,proto.vertexvis.protobuf.scenetree.v1alpha1)})(b);return b}var g=m();var E;(function(t){t[t["UNKNOWN"]=0]="UNKNOWN";t[t["SCENE_TREE_DISABLED"]=1]="SCENE_TREE_DISABLED";t[t["MISSING_VIEWER"]=2]="MISSING_VIEWER";t[t["DISCONNECTED"]=3]="DISCONNECTED";t[t["SUBSCRIPTION_FAILURE"]=4]="SUBSCRIPTION_FAILURE";t[t["UNAUTHORIZED"]=5]="UNAUTHORIZED";t[t["ABORTED"]=6]="ABORTED"})(E||(E={}));class R{constructor(t,e,r){this.name=t;this.code=e;this.link=r;this.message=y(e)}}function y(t){switch(t){case E.UNKNOWN:return"An unknown error occurred.";case E.SCENE_TREE_DISABLED:return"The tree for this scene is not enabled. Enable the tree for this scene to interact with the tree.";case E.MISSING_VIEWER:return"Could not find reference to the viewer.";case E.DISCONNECTED:return"Disconnected from server.";case E.SUBSCRIPTION_FAILURE:return"The tree was not able to receive subscription events.";case E.UNAUTHORIZED:return"The tree was unauthorized to connect to the server. The associated Viewer may not be connected.";case E.ABORTED:return"Unable to load the tree for this scene."}}class x extends s{constructor(t,e){super(t,e);Object.setPrototypeOf(this,x.prototype)}}class I extends x{constructor(t,e){super(t,e);Object.setPrototypeOf(this,I.prototype)}}class S extends x{constructor(t,e){super(t,e);Object.setPrototypeOf(this,S.prototype)}}class C extends x{constructor(t,e){super(t,e);Object.setPrototypeOf(this,C.prototype)}}var T={};var L;function N(){if(L)return T;L=1;var t=m();var e=r().grpc;var o=function(){function t(){}t.serviceName="vertexvis.protobuf.scenetree.v1alpha1.SceneTreeAPI";return t}();o.GetTree={methodName:"GetTree",service:o,requestStream:false,responseStream:false,requestType:t.GetTreeRequest,responseType:t.GetTreeResponse};o.ExpandNode={methodName:"ExpandNode",service:o,requestStream:false,responseStream:false,requestType:t.ExpandNodeRequest,responseType:t.ExpandNodeResponse};o.CollapseNode={methodName:"CollapseNode",service:o,requestStream:false,responseStream:false,requestType:t.CollapseNodeRequest,responseType:t.CollapseNodeResponse};o.Subscribe={methodName:"Subscribe",service:o,requestStream:false,responseStream:true,requestType:t.SubscribeRequest,responseType:t.SubscribeResponse};o.Filter={methodName:"Filter",service:o,requestStream:false,responseStream:false,requestType:t.FilterRequest,responseType:t.FilterResponse};o.LocateItem={methodName:"LocateItem",service:o,requestStream:false,responseStream:false,requestType:t.LocateItemRequest,responseType:t.LocateItemResponse};o.ExpandAll={methodName:"ExpandAll",service:o,requestStream:false,responseStream:false,requestType:t.ExpandAllRequest,responseType:t.ExpandAllResponse};o.CollapseAll={methodName:"CollapseAll",service:o,requestStream:false,responseStream:false,requestType:t.CollapseAllRequest,responseType:t.CollapseAllResponse};o.GetNodeAncestors={methodName:"GetNodeAncestors",service:o,requestStream:false,responseStream:false,requestType:t.GetNodeAncestorsRequest,responseType:t.GetNodeAncestorsResponse};o.GetAvailableColumns={methodName:"GetAvailableColumns",service:o,requestStream:false,responseStream:false,requestType:t.GetAvailableColumnsRequest,responseType:t.GetAvailableColumnsResponse};T.SceneTreeAPI=o;function n(t,e){this.serviceHost=t;this.options=e||{}}n.prototype.getTree=function t(r,n,i){if(arguments.length===2){i=arguments[1]}var s=e.unary(o.GetTree,{request:r,host:this.serviceHost,metadata:n,transport:this.options.transport,debug:this.options.debug,onEnd:function(t){if(i){if(t.status!==e.Code.OK){var r=new Error(t.statusMessage);r.code=t.status;r.metadata=t.trailers;i(r,null)}else{i(null,t.message)}}}});return{cancel:function(){i=null;s.close()}}};n.prototype.expandNode=function t(r,n,i){if(arguments.length===2){i=arguments[1]}var s=e.unary(o.ExpandNode,{request:r,host:this.serviceHost,metadata:n,transport:this.options.transport,debug:this.options.debug,onEnd:function(t){if(i){if(t.status!==e.Code.OK){var r=new Error(t.statusMessage);r.code=t.status;r.metadata=t.trailers;i(r,null)}else{i(null,t.message)}}}});return{cancel:function(){i=null;s.close()}}};n.prototype.collapseNode=function t(r,n,i){if(arguments.length===2){i=arguments[1]}var s=e.unary(o.CollapseNode,{request:r,host:this.serviceHost,metadata:n,transport:this.options.transport,debug:this.options.debug,onEnd:function(t){if(i){if(t.status!==e.Code.OK){var r=new Error(t.statusMessage);r.code=t.status;r.metadata=t.trailers;i(r,null)}else{i(null,t.message)}}}});return{cancel:function(){i=null;s.close()}}};n.prototype.subscribe=function t(r,n){var i={data:[],end:[],status:[]};var s=e.invoke(o.Subscribe,{request:r,host:this.serviceHost,metadata:n,transport:this.options.transport,debug:this.options.debug,onMessage:function(t){i.data.forEach((function(e){e(t)}))},onEnd:function(t,e,r){i.status.forEach((function(o){o({code:t,details:e,metadata:r})}));i.end.forEach((function(o){o({code:t,details:e,metadata:r})}));i=null}});return{on:function(t,e){i[t].push(e);return this},cancel:function(){i=null;s.close()}}};n.prototype.filter=function t(r,n,i){if(arguments.length===2){i=arguments[1]}var s=e.unary(o.Filter,{request:r,host:this.serviceHost,metadata:n,transport:this.options.transport,debug:this.options.debug,onEnd:function(t){if(i){if(t.status!==e.Code.OK){var r=new Error(t.statusMessage);r.code=t.status;r.metadata=t.trailers;i(r,null)}else{i(null,t.message)}}}});return{cancel:function(){i=null;s.close()}}};n.prototype.locateItem=function t(r,n,i){if(arguments.length===2){i=arguments[1]}var s=e.unary(o.LocateItem,{request:r,host:this.serviceHost,metadata:n,transport:this.options.transport,debug:this.options.debug,onEnd:function(t){if(i){if(t.status!==e.Code.OK){var r=new Error(t.statusMessage);r.code=t.status;r.metadata=t.trailers;i(r,null)}else{i(null,t.message)}}}});return{cancel:function(){i=null;s.close()}}};n.prototype.expandAll=function t(r,n,i){if(arguments.length===2){i=arguments[1]}var s=e.unary(o.ExpandAll,{request:r,host:this.serviceHost,metadata:n,transport:this.options.transport,debug:this.options.debug,onEnd:function(t){if(i){if(t.status!==e.Code.OK){var r=new Error(t.statusMessage);r.code=t.status;r.metadata=t.trailers;i(r,null)}else{i(null,t.message)}}}});return{cancel:function(){i=null;s.close()}}};n.prototype.collapseAll=function t(r,n,i){if(arguments.length===2){i=arguments[1]}var s=e.unary(o.CollapseAll,{request:r,host:this.serviceHost,metadata:n,transport:this.options.transport,debug:this.options.debug,onEnd:function(t){if(i){if(t.status!==e.Code.OK){var r=new Error(t.statusMessage);r.code=t.status;r.metadata=t.trailers;i(r,null)}else{i(null,t.message)}}}});return{cancel:function(){i=null;s.close()}}};n.prototype.getNodeAncestors=function t(r,n,i){if(arguments.length===2){i=arguments[1]}var s=e.unary(o.GetNodeAncestors,{request:r,host:this.serviceHost,metadata:n,transport:this.options.transport,debug:this.options.debug,onEnd:function(t){if(i){if(t.status!==e.Code.OK){var r=new Error(t.statusMessage);r.code=t.status;r.metadata=t.trailers;i(r,null)}else{i(null,t.message)}}}});return{cancel:function(){i=null;s.close()}}};n.prototype.getAvailableColumns=function t(r,n,i){if(arguments.length===2){i=arguments[1]}var s=e.unary(o.GetAvailableColumns,{request:r,host:this.serviceHost,metadata:n,transport:this.options.transport,debug:this.options.debug,onEnd:function(t){if(i){if(t.status!==e.Code.OK){var r=new Error(t.statusMessage);r.code=t.status;r.metadata=t.trailers;i(r,null)}else{i(null,t.message)}}}});return{cancel:function(){i=null;s.close()}}};T.SceneTreeAPIClient=n;return T}var P=N();function q(t){return typeof t.code==="number"&&t.hasOwnProperty("metadata")}function A(t){if(t.methodDefinition.methodName===P.SceneTreeAPI.Subscribe.methodName){return o.grpc.WebsocketTransport()(t)}else{return o.grpc.CrossBrowserHttpTransport({withCredentials:false})(t)}}class O extends Error{}O.prototype.name="InvalidTokenError";function M(t){return decodeURIComponent(atob(t).replace(/(.)/g,((t,e)=>{let r=e.charCodeAt(0).toString(16).toUpperCase();if(r.length<2){r="0"+r}return"%"+r})))}function D(t){let e=t.replace(/-/g,"+").replace(/_/g,"/");switch(e.length%4){case 0:break;case 2:e+="==";break;case 3:e+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return M(e)}catch(t){return atob(e)}}function G(t,e){if(typeof t!=="string"){throw new O("Invalid token specified: must be a string")}e||(e={});const r=e.header===true?0:1;const o=t.split(".")[r];if(typeof o!=="string"){throw new O(`Invalid token specified: missing part #${r+1}`)}let n;try{n=D(o)}catch(t){throw new O(`Invalid token specified: invalid base64 for part #${r+1} (${t.message})`)}try{return JSON.parse(n)}catch(t){throw new O(`Invalid token specified: invalid json for part #${r+1} (${t.message})`)}}function F(t){return G(t)}class V{get fetchedPageCount(){return this.pages.size}get isConnected(){return this.state.connection.type==="connected"}constructor(t,e,r={spinnerDelay:2e3,subscriptionHandshakeGracePeriodInMs:5e3}){this.client=t;this.rowLimit=e;this.connectOptions=r;this.nextPageId=0;this.pages=new Map;this.activeRowRange=[0,0];this.metadataKeys=[];this.debugLogs=false;this.onStateChange=new c;this.state={totalRows:0,isSearching:false,rows:[],connection:{type:"disconnected"}}}stateChanged(t){return this.onStateChange.on(t)}setDebugLogs(t){this.debugLogs=t}async handleSubscriptionHandshakeTimeout(t,e){var r;const o=this.getState().connection;if(this.isConnectedState(o)&&((r=o.subscriptionStatusState)===null||r===void 0?void 0:r.attempt)!=null&&o.subscriptionStatusState.attempt<V.MAX_SUBSCRIPTION_RETRY_COUNT){const r=o.subscriptionStatusState.attempt+1;console.warn(`Failed to subscribe within the allotted timeout. Retry attempt={${r}}`);o.subscriptionStatusState.stream.cancel();this.clearHandshakeTimer();const n=await this.subscribe();this.invalidateAfterOffset(0);this.fetchUnloadedPagesInActiveRows();this.updateState({...this.state,connection:{...o,type:"connected",subscription:{dispose:()=>n.cancel()},subscriptionStatusState:{attempt:r,stream:n}}});this.subscriptionHandshakeTimer=window.setTimeout((()=>{this.handleSubscriptionHandshakeTimeout(t,e)}),this.connectOptions.subscriptionHandshakeGracePeriodInMs)}else{this.updateState({...this.state,connection:{type:"failure",jwtProvider:t,sceneViewId:e,details:new R("SUBSCRIPTION_FAILURE",E.SUBSCRIPTION_FAILURE)}})}}async connect(t){const{connection:e}=this.state;const r=t();if(r==null){throw new I("Cannot connect scene tree. JWT is undefined")}const{view:o}=F(r);if(e.sceneViewId!==o){this.disconnect(true)}else{this.disconnect(false)}const n={type:"connecting",jwtProvider:t,sceneViewId:o};this.updateState({...this.state,connection:n});try{this.log("Scene tree controller connecting.");this.restartLoadingTimer();const e=await this.subscribe();await this.fetchPage(0);if(this.state.connection.type!=="cancelled"){this.updateState({...this.state,connection:{jwtProvider:t,sceneViewId:o,type:"connected",subscription:{dispose:()=>e.cancel()},subscriptionStatusState:{attempt:0,stream:e}}});this.restartHandshakeTimer(t,o)}}catch(e){this.ifErrorIsFatal(e,(()=>{this.updateState({...this.state,connection:{type:"failure",jwtProvider:t,sceneViewId:o,details:this.getConnectionError(e)}});this.clearHandshakeTimer();throw e}))}this.startIdleReconnectTimer()}clearReconnectTimer(){if(this.reconnectTimer!=null){window.clearTimeout(this.reconnectTimer)}}restartHandshakeTimer(t,e){this.clearHandshakeTimer();if(!this.state.handshakeReceived){this.subscriptionHandshakeTimer=window.setTimeout((()=>{this.handleSubscriptionHandshakeTimeout(t,e);this.subscriptionHandshakeTimer=undefined}),this.connectOptions.subscriptionHandshakeGracePeriodInMs)}}clearHandshakeTimer(){if(this.subscriptionHandshakeTimer!=null){window.clearTimeout(this.subscriptionHandshakeTimer);this.subscriptionHandshakeTimer=undefined}}startIdleReconnectTimer(){this.startReconnectTimer(this.connectOptions.idleReconnectInSeconds||V.IDLE_RECONNECT_IN_SECONDS)}startConnectionLostReconnectTimer(){this.startReconnectTimer(this.connectOptions.lostConnectionReconnectInSeconds||V.LOST_CONNECTION_RECONNECT_IN_SECONDS)}startReconnectTimer(t){this.clearReconnectTimer();this.reconnectTimer=window.setTimeout((()=>{if(this.state.connection.type==="connected"){this.connect(this.state.connection.jwtProvider)}}),t*1e3)}connectToViewer(t){const e=async()=>{if(t.token!=null){this.log("Scene tree controller found viewer JWT. Attempting connection.");try{await this.connect((()=>t.token))}catch(t){this.ifErrorIsFatal(t,(()=>{console.error("Scene tree controller errored connecting.",t)}))}}else{this.log("Scene tree controller was unable to find JWT.")}};const r=()=>{this.log("Scene tree controller received scene ready");e()};e();t.addEventListener("sceneReady",r);return{dispose:()=>{t.removeEventListener("sceneReady",r);this.disconnect()}}}disconnect(t=false){this.log(`Scene tree controller disconnecting [reset=${t}]`);this.clearHandshakeTimer();this.clearReconnectTimer();this.clearLoadingTimer();if(t){this.pages.clear();this.activeRowRange=[]}const{connection:e}=this.state;if(e.type==="connected"){e.subscription.dispose()}this.updateState({connection:{type:"disconnected",jwtProvider:e.jwtProvider,sceneViewId:e.sceneViewId},isSearching:false,totalRows:t?0:this.state.totalRows,rows:t?[]:this.state.rows,filterTerm:t?undefined:this.state.filterTerm,totalFilteredRows:t?undefined:this.state.totalFilteredRows,shouldShowEmptyResults:t?undefined:this.state.shouldShowEmptyResults,handshakeReceived:t?undefined:this.state.handshakeReceived,firstFetchComplete:t?undefined:this.state.firstFetchComplete})}cancel(){this.log(`Scene tree controller cancelled`);this.clearHandshakeTimer();this.clearReconnectTimer();this.clearLoadingTimer();this.pages.clear();this.activeRowRange=[];const{connection:t}=this.state;if(t.type==="connected"){t.subscription.dispose()}this.updateState({connection:{type:"cancelled",jwtProvider:t.jwtProvider,sceneViewId:t.sceneViewId},isSearching:false,totalRows:0,rows:[]})}async collapseNode(t){return this.ifConnectionHasJwt((async e=>{const r=new u.Uuid;r.setHex(t);const o=new g.CollapseNodeRequest;o.setNodeId(r);await this.requestUnary(e,((t,e)=>this.client.collapseNode(o,t,e)))}))}async expandNode(t){return this.ifConnectionHasJwt((async e=>{const r=new u.Uuid;r.setHex(t);const o=new g.ExpandNodeRequest;o.setNodeId(r);await this.requestUnary(e,((t,e)=>this.client.expandNode(o,t,e)))}))}async collapseAll(){return this.ifConnectionHasJwt((async t=>{await this.requestUnary(t,((t,e)=>this.client.collapseAll(new g.CollapseAllRequest,t,e)))}))}async expandAll(){return this.ifConnectionHasJwt((async t=>{await this.requestUnary(t,((t,e)=>this.client.expandAll(new g.ExpandAllRequest,t,e)))}))}async expandParentNodes(t){return this.ifConnectionHasJwt((async e=>{const r=new u.Uuid;r.setHex(t);const o=new g.LocateItemRequest;o.setNodeId(r);const n=await this.requestUnary(e,((t,e)=>this.client.locateItem(o,t,e)));const{requiresReload:i,locatedIndex:s}=n.toObject();if(i){this.invalidateAfterOffset(0);await this.fetchUnloadedPagesInActiveRows()}if(s==null){throw new C("Cannot locate node. Location index is undefined.")}return s.value}))}async fetchNodeAncestors(t){return this.ifConnectionHasJwt((async e=>{const r=new u.Uuid;r.setHex(t);const o=new g.GetNodeAncestorsRequest;o.setNodeId(r);const n=await this.requestUnary(e,((t,e)=>this.client.getNodeAncestors(o,t,e)));return n.toObject().itemsList}))}async fetchPage(t){if(t<0||t>this.maxPages-1){return}if(!this.pages.has(t)){const e=t*this.rowLimit;this.log("Scene tree fetching page",t,e);const r=this.fetchTree(e,this.rowLimit,(()=>this.ifConnectionHasJwt((t=>t))));const o=this.nextPageId++;const n={id:o,res:r,index:t,metadataKeys:this.metadataKeys};this.pages.set(t,n);n.done=this.handlePageResult(n)}const e=this.pages.get(t);const[r]=await Promise.allSettled([e===null||e===void 0?void 0:e.res,e===null||e===void 0?void 0:e.done]);if((r===null||r===void 0?void 0:r.status)==="rejected"){throw r.reason}}fetchPageAtOffset(t){const e=Math.floor(t/this.rowLimit);return this.fetchPage(e)}async fetchRange(t,e){const r=Math.floor(t/this.rowLimit);const o=Math.floor(e/this.rowLimit);const[n,i]=this.constrainPageRange(r,o);const s=i-n+1;await Promise.all(Array.from({length:s}).map(((t,e)=>this.fetchPage(e))))}async fetchMetadataKeys(){return this.ifConnectionHasJwt((async t=>{const e=await this.requestUnary(t,((t,e)=>{const r=new g.GetAvailableColumnsRequest;this.client.getAvailableColumns(r,t,e)}));const r=e.getIndexingStatus();this.updateState({...this.state,isPartialKeysResponse:r===w.IndexingStatus.INDEXING_STATUS_INDEXING});return e.getKeysList().map((t=>t.getValue()))}))}async refreshFilter(){var t;return this.filter((t=this.state.filterTerm)!==null&&t!==void 0?t:"",this.state.filterOptions)}async filter(t,e={}){return this.ifConnectionHasJwt((async r=>{var o;this.updateState({...this.state,isSearching:true,filterTerm:t!==""?t:undefined,filterOptions:e});(o=this.pendingFilterGrpcRes)===null||o===void 0?void 0:o.cancel();this.pendingFilterGrpcRes=undefined;if(this.state.filterTerm===t||t===""){try{const o=await this.requestUnary(r,((r,o)=>{var n;const i=new g.FilterRequest;i.setFilter(t);i.setFullTree((n=e.includeCollapsed)!==null&&n!==void 0?n:true);i.setExactMatch(!!e.exactMatch);i.setRemoveHiddenItems(!!e.removeHiddenItems);if(e.columns)i.setColumnsKeysList(e.columns);this.pendingFilterGrpcRes=this.client.filter(i,r,o)}));const{numberOfResults:n,indexingStatus:i}=o.toObject();this.updateState({...this.state,totalFilteredRows:n,isSearching:false,isPartialFilterResponse:i===w.IndexingStatus.INDEXING_STATUS_INDEXING})}catch(t){console.error("Failed to filter search ",t);this.updateState({...this.state,isSearching:false})}}}))}isPageLoaded(t){return this.pages.has(t)}getNonLoadedPageIndexes(t,e){const[r,o]=this.constrainPageRange(t,e);const n=o-r+1;return Array.from({length:n}).map(((t,e)=>r+e)).filter((t=>!this.isPageLoaded(t)))}getActiveRowRange(){return this.activeRowRange}getPage(t){return this.pages.get(t)}invalidatePagesOutsideRange(t,e,r=0){const[o,n]=this.constrainPageRange(t,e);const i=Math.max(n-o,r);if(this.fetchedPageCount>i){const t=Array.from(this.pages.keys()).map((t=>{const e=t<o?o-t:t-n;return{index:t,distance:e}}));const e=t.sort(((t,e)=>e.distance-t.distance));e.slice(0,t.length-r).forEach((({index:t})=>this.invalidatePage(t)));this.log(`Scene tree dropped ${t.length-this.fetchedPageCount} pages`,this.pages)}}setMetadataKeys(t){this.metadataKeys=t;if(this.state.connection.type==="connected"){const[t,e]=this.activeRowRange;this.invalidateAfterOffset(0);return this.updateActiveRowRange(t,e)}else{return Promise.resolve()}}async updateActiveRowRange(t,e){this.activeRowRange=this.constrainRowOffsets(t,e);this.tryClearLoadingState();await this.fetchUnloadedPagesInActiveRows()}subscribe(){return this.ifConnectionHasJwt((t=>{const e=this.requestServerStream(t,(t=>{const e=this.client.subscribe(new g.SubscribeRequest,t);return e}));e.on("data",(t=>{if(t.hasHandshake()){this.clearHandshakeTimer();this.updateState({...this.state,handshakeReceived:true});if(this.state.firstFetchComplete){this.log("Scene tree first fetch completed before handshake received, invalidating current pages");this.invalidateAfterOffset(0);this.fetchUnloadedPagesInActiveRows()}}this.startIdleReconnectTimer();const{change:e}=t.toObject();if((e===null||e===void 0?void 0:e.filterChange)!=null){this.updateState({...this.state,totalFilteredRows:e.filterChange.numberOfResults})}if((e===null||e===void 0?void 0:e.listChange)!=null){this.log("Received list change",e.listChange.start);this.invalidateAfterOffset(e.listChange.start);this.fetchUnloadedPagesInActiveRows()}const{hiddenList:r=[],shownList:o=[],partiallyVisibleList:n=[],deselectedList:i=[],selectedList:s=[]}=(e===null||e===void 0?void 0:e.ranges)||{};if(n.length>0){this.log("Received partial visibility list change",n);n.forEach((({start:t,end:e})=>this.patchNodesInRange(t,e,(()=>({partiallyVisible:true})))))}if(r.length>0){this.log("Received hidden list change",r);r.forEach((({start:t,end:e})=>this.patchNodesInRange(t,e,(()=>({visible:false,partiallyVisible:false})))))}if(o.length>0){this.log("Received shown list change",o);o.forEach((({start:t,end:e})=>this.patchNodesInRange(t,e,(()=>({visible:true,partiallyVisible:false})))))}if(i.length>0){this.log("Received deselected list change",i);i.forEach((({start:t,end:e})=>this.patchNodesInRange(t,e,(()=>({selected:false})))))}if(s.length>0){this.log("Received selected list change",s);s.forEach((({start:t,end:e})=>this.patchNodesInRange(t,e,(()=>({selected:true})))))}}));e.on("status",(t=>{if(t.code!==0){console.error(`Failed to subscribe to scene tree with code=${t.code}, details=${t.details}`);this.invalidateAfterOffset(0)}}));e.on("end",(()=>{this.invalidateAfterOffset(0);if(this.state.connection.type==="connected"){this.startConnectionLostReconnectTimer()}}));return e}))}async fetchUnloadedPagesInActiveRows(){var t,e;const[r,o]=this.getPageIndexesForRange((t=this.activeRowRange[0])!==null&&t!==void 0?t:0,(e=this.activeRowRange[1])!==null&&e!==void 0?e:0);const n=this.getNonLoadedPageIndexes(r-1,o+1);await Promise.all(n.map((t=>this.fetchPage(t))))}patchNodesInRange(t,e,r){const o=this.state.rows.slice(t,e+1).map((t=>f(t)?{...t,node:{...t.node,...r(t.node)}}:t));const n=this.state.rows.slice(0,t);const i=this.state.rows.slice(e+1);const s=[...n,...o,...i];this.updateState({...this.state,rows:s})}async handlePageResult(t){var e;try{const r=await t.res;const o=this.getPage(t.index);if((o===null||o===void 0?void 0:o.id)===t.id){const n=r.getCursor();const i=r.getItemsList();const s=(e=n===null||n===void 0?void 0:n.getTotal())!==null&&e!==void 0?e:0;const u=t.index*this.rowLimit;const a=h(u,i,o.metadataKeys);const c=this.state.rows.slice(0,u);const p=this.state.rows.slice(c.length+a.length,s);const f=new Array(Math.max(0,s-c.length-a.length-p.length));const l=[...c,...a,...p,...f];if(this.isViewLoading(l)&&this.loadingTimer==null){this.restartLoadingTimer();this.updateState({...this.state,totalRows:s,rows:l,shouldShowEmptyResults:this.state.filterTerm!=null&&(l.length===0||this.state.totalFilteredRows===0)})}else{this.updateState({...this.state,totalRows:s,rows:l,shouldShowLoading:l.length===0&&this.state.shouldShowLoading,shouldShowEmptyResults:this.state.filterTerm!=null&&(l.length===0||this.state.totalFilteredRows===0),firstFetchComplete:true})}}}catch(e){const r=e instanceof Error?e.toString():"Unknown";console.error(`Request error fetching page at index ${t.index} (${r})`);const o=this.getPage(t.index);if((o===null||o===void 0?void 0:o.id)===t.id){this.invalidatePage(t.index)}}}invalidatePage(t){if(this.isPageLoaded(t)){this.pages.delete(t)}}invalidateAfterOffset(t){const e=Math.floor(t/this.rowLimit);for(const t of this.pages.keys()){if(t>=e){this.invalidatePage(t)}}}getState(){return this.state}isViewLoading(t){return this.state.filterTerm==null&&t[this.activeRowRange[0]]==null&&t[this.activeRowRange[1]]==null}restartLoadingTimer(){if(this.loadingTimer!=null){this.clearLoadingTimer()}this.loadingTimer=window.setTimeout((()=>{this.loadingTimer=undefined;this.updateState({...this.getState(),shouldShowLoading:true})}),this.connectOptions.spinnerDelay)}clearLoadingTimer(){if(this.loadingTimer!=null){clearTimeout(this.loadingTimer);this.loadingTimer=undefined}}tryClearLoadingState(){const t=this.tryClearLoadingTimer(this.state);if(t){this.updateState({...this.state,shouldShowLoading:false})}}tryClearLoadingTimer(t){const e=this.state.shouldShowLoading||this.loadingTimer!=null;const r=e&&!this.isViewLoading(t.rows);if(r){this.clearLoadingTimer();return true}return false}updateState(t){const e=this.tryClearLoadingTimer(t);this.state={...t,shouldShowLoading:e?false:t.shouldShowLoading};this.onStateChange.emit(this.state)}getPageForOffset(t){const e=Math.floor(t/this.rowLimit);return this.constrainPageIndex(e)}getPageIndexesForRange(t,e){const r=this.getPageForOffset(t);const o=this.getPageForOffset(e);return[r,o]}async fetchTree(t,e,r,n=1){const i=V.MAX_GET_TREE_ATTEMPTS;try{const o=await r();return await this.requestUnary(o,((r,o)=>{const n=new a.OffsetPager;n.setOffset(t);n.setLimit(e);const i=new g.GetTreeRequest;i.setPager(n);i.setAdditionalColumnKeysList(this.metadataKeys);i.setRequireViewReady(true);this.client.getTree(i,r,o)}))}catch(s){if(!q(s)||s.code!==o.grpc.Code.Unavailable){throw s}if(n>=i){throw new Error(`Failed to retrieve scene tree after ${i} attempts.`)}const u=V.GET_TREE_RETRY_DELAYS_IN_MS[n-1];const a=n+1;console.warn(`GetTree failed because the view is not ready. Retrying in ${u}ms (attempt ${a}/${i}).`);await p.delay(u);return this.fetchTree(t,e,r,a)}}requestUnary(t,e){return new Promise(((r,o)=>{const n=this.createJwtMetadata(t);e(n,((t,e)=>{if(t!=null){o(t)}else if(e!=null){r(e)}else{o(new x("Invalid response. Both error and result are null"))}}))}))}requestServerStream(t,e){const r=this.createJwtMetadata(t);return e(r)}createJwtMetadata(t){return new o.grpc.Metadata({"jwt-context":JSON.stringify({jwt:t})})}async ifConnectionHasJwt(t){const{connection:e}=this.state;if(e.type==="connecting"||e.type==="connected"){const r=await e.jwtProvider();if(r!=null){return t(r)}else{throw new I("SceneTreeController cannot perform request. Viewer JWT is undefined.")}}else if(e.type==="cancelled"){throw new S(`Request attempted, but controller was cancelled`)}else{throw new x("SceneTreeController is not in connected state")}}ifErrorIsFatal(t,e){if(!(t instanceof S)){e()}}getConnectionError(t){if(q(t)){if(t.code===o.grpc.Code.FailedPrecondition){return new R("SCENE_TREE_DISABLED",E.SCENE_TREE_DISABLED)}else if(t.code===o.grpc.Code.Unauthenticated){return new R("UNAUTHORIZED",E.UNAUTHORIZED)}else if(t.code===o.grpc.Code.Aborted){return new R("ABORTED",E.ABORTED)}else{return new R("UNKNOWN",E.UNKNOWN)}}else if(t instanceof I){return new R("UNAUTHORIZED",E.UNAUTHORIZED)}else{return new R("UNKNOWN",E.UNKNOWN)}}constrainPageRange(t,e){return[Math.max(0,t),Math.min(this.maxPages-1,e)]}constrainPageIndex(t){return Math.max(0,Math.min(t,this.maxPages-1))}constrainRowOffsets(t,e){const r=!Number.isNaN(t)?Math.max(0,t):0;const o=!Number.isNaN(e)?Math.min(this.state.totalRows-1,e):this.state.totalRows-1;return[r,o]}get maxPages(){return Math.max(1,Math.ceil(this.state.totalRows/this.rowLimit))}log(t,...e){if(this.debugLogs){console.debug(t,e)}}isConnectedState(t){return t.type==="connected"}}V.IDLE_RECONNECT_IN_SECONDS=4*60;V.LOST_CONNECTION_RECONNECT_IN_SECONDS=2;V.MAX_SUBSCRIPTION_RETRY_COUNT=2;V.MAX_GET_TREE_ATTEMPTS=6;V.GET_TREE_RETRY_DELAYS_IN_MS=[1e3,2e3,4e3,8e3,15e3];export{V as S,E as a,R as b,P as s,A as w};
5
+ //# sourceMappingURL=p-CnYEgl0H.js.map