(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-680cbc92"],{"040f":function(e,t,i){"use strict";i.d(t,"a",(function(){return c}));var s=i("a4ee"),r=i("a5d8"),n=i("59b2"),a=(i("b50f"),i("c120"),i("cea0"),i("d386"));const c=e=>{let t=class extends(Object(r["b"])(e)){constructor(){super(...arguments),this.graphics=null,this.renderer=null}};return Object(s["a"])([Object(n["b"])()],t.prototype,"graphics",void 0),Object(s["a"])([Object(n["b"])()],t.prototype,"renderer",void 0),Object(s["a"])([Object(n["b"])()],t.prototype,"updating",void 0),Object(s["a"])([Object(n["b"])()],t.prototype,"view",void 0),t=Object(s["a"])([Object(a["a"])("esri.views.layers.GraphicsView")],t),t}},"0e25":function(e,t,i){"use strict";i.d(t,"a",(function(){return o}));var s,r=i("c649"),n=i("b7c2");!function(e){e[e.Object=0]="Object",e[e.RenderGeometry=1]="RenderGeometry",e[e.External=2]="External",e[e.COUNT=3]="COUNT"}(s||(s={}));class a{constructor(){this.items=[]}addObject(e,t){this.items.push({type:s.Object,objectStateId:t,object:e})}addRenderGeometry(e,t,i){this.items.push({type:s.RenderGeometry,objectStateId:t,renderGeometry:e,owner:i})}addExternal(e,t){this.items.push({type:s.External,objectStateId:t,remove:e})}remove(e){for(let t=this.items.length-1;t>=0;--t){const i=this.items[t];i.objectStateId===e&&(this._removeObjectStateItem(i),this.items.splice(t,1))}}removeObject(e){for(let t=this.items.length-1;t>=0;--t){const i=this.items[t];i.type===s.Object&&i.object===e&&(this._removeObjectStateItem(i),this.items.splice(t,1))}}removeRenderGeometry(e){for(let t=this.items.length-1;t>=0;--t){const i=this.items[t];i.type===s.RenderGeometry&&i.renderGeometry===e&&(this._removeObjectStateItem(i),this.items.splice(t,1))}}removeAll(){this.items.forEach(e=>{this._removeObjectStateItem(e)}),this.items=[]}_removeObjectStateItem(e){switch(e.type){case s.Object:e.objectStateId.channel===n["f"].Highlight?e.object.removeHighlight(e.objectStateId):e.objectStateId.channel===n["f"].MaskOccludee&&e.object.removeOcclude(e.objectStateId);break;case s.RenderGeometry:e.owner.removeRenderGeometryObjectState(e.renderGeometry,e.objectStateId);break;case s.External:e.remove(e.objectStateId)}}}class c{constructor(e,t){this.stateType=e,this.objectIdField=t,this.objectStateSet=new a,this.ids=new Set,this.paused=!1}hasGraphic(e){if(this.objectIdField){const t=e.graphic.attributes[this.objectIdField];return this.ids.has(t)}return this.ids.has(e.graphic.uid)}}class o{constructor(e){this._graphicsCore=e,this._stateSets=new Array}destroy(){this._stateSets&&this._stateSets.forEach(e=>e.objectStateSet.removeAll()),this._stateSets=null}acquireSet(e,t){const i=new c(e,t);this._stateSets.push(i);const s=Object(r["b"])(()=>this.releaseSet(i));return{set:i,handle:s}}releaseSet(e){e.objectStateSet.removeAll();const t=this._stateSets?this._stateSets.indexOf(e):-1;-1!==t&&this._stateSets.splice(t,1)}_addObjectStateSet(e,t){e.addObjectStateSet(t.stateType,t.objectStateSet)}_removeObjectStateSet(e,t){e.removeObjectState(t.objectStateSet)}setUid(e,t){e.ids.add(t);const i=this._graphicsCore.graphics3DGraphics.get(t);i&&this._addObjectStateSet(i,e)}setUids(e,t){t.forEach(t=>this.setUid(e,t))}setObjectIds(e,t){t.forEach(t=>e.ids.add(t)),this._initializeSet(e)}addGraphic(e){this._stateSets.forEach(t=>{!t.paused&&t.hasGraphic(e)&&this._addObjectStateSet(e,t)})}removeGraphic(e){this._stateSets.forEach(t=>{t.hasGraphic(e)&&this._removeObjectStateSet(e,t)})}allGraphicsDeleted(){this._stateSets&&this._stateSets.forEach(e=>e.objectStateSet.removeAll())}_initializeSet(e){const t=this._graphicsCore.graphics3DGraphics;e.objectIdField?t.forEach(t=>{t&&e.hasGraphic(t)&&this._addObjectStateSet(t,e)}):e.ids.forEach(i=>{const s=t.get(i);s&&this._addObjectStateSet(s,e)})}get test(){return{states:this._stateSets}}}},"2cbd":function(e,t,i){"use strict";i.d(t,"a",(function(){return C}));var s=i("a4ee"),r=i("8d60"),n=i("2c4f"),a=i("9096"),c=i("c649"),o=i("b2b2"),h=i("f4cc"),l=i("477c"),d=i("59b2"),p=(i("b50f"),i("c120"),i("cea0"),i("d386")),u=i("0f1c"),b=i("a6a3"),g=i("d3cf"),y=i("d1ac"),O=i("69dd"),j=i("ed70"),f=i("4c84"),m=i("8202"),v=i("ebae"),S=i("0e25"),_=i("3422"),w=i("ba58"),I=i("b7c2");let C=class extends a["a"]{constructor(e){super(e),this.type="graphics-3d",this.graphicsCore=null,this.elevationAlignment=new m["a"],this._suspendResumeExtent=null}normalizeCtorArgs(e){const t={...e,scaleVisibility:null,frustumVisibility:null};return delete t.scaleVisibilityEnabled,delete t.frustumVisibilityEnabled,e.scaleVisibilityEnabled&&(t.scaleVisibility=new _["a"]),e.frustumVisibilityEnabled&&(t.frustumVisibility=new v["a"]),t}initialize(){const e=new f["a"]({owner:this,layer:this.owner.layer,preferredUpdatePolicy:I["m"].SYNC,graphicSymbolSupported:!0});this._set("graphicsCore",e);const{layer:t,scaleVisibility:i}=this;if(Object(o["k"])(i)&&"effectiveScaleRange"in t){const e=t;this.updatingHandles.add(()=>e.effectiveScaleRange,()=>i.layerMinMaxScaleChangeHandler())}if("fullOpacity"in this.owner){const e=this.owner;this.updatingHandles.add(()=>e.fullOpacity,()=>this.graphicsCore.opacityChange())}if("elevationInfo"in t){const e=t;this.updatingHandles.add(()=>e.elevationInfo,(e,t)=>{Object(u["a"])(e,t)&&this.updatingHandles.addPromise(this.graphicsCore.elevationInfoChange())})}}async setup(){const e=(e,t,i)=>this.graphicsCore.spatialIndex.queryGraphicUIDsInExtent(e,t,i);if(this.elevationAlignment.setup(this,e,this.graphicsCore,this.view.elevationProvider),Object(o["k"])(this.scaleVisibility)&&"effectiveScaleRange"in this.layer){const t=this.owner.view.basemapTerrain;this.scaleVisibility.setup(this,this.layer,e,this.graphicsCore,t)}Object(o["k"])(this.frustumVisibility)&&this.frustumVisibility.setup(this),this._set("objectStates",new S["a"](this.graphicsCore));try{await this.graphicsCore.setup({elevationAlignment:this.elevationAlignment,scaleVisibility:this.scaleVisibility,objectStates:this.objectStates})}catch(t){if(Object(h["m"])(t))return;throw t}this.destroyed||(this.handles.add(this.view.watch("clippingArea",()=>this._updateClippingExtent(),!0)),this._updateClippingExtent(),this._setupSuspendResumeExtent(),this.graphicsCore.startCreateGraphics())}destroy(){this.handles.removeAll(),this.updatingHandles.removeAll(),this._set("elevationAlignment",Object(o["d"])(this.elevationAlignment)),this._set("scaleVisibility",Object(o["d"])(this.scaleVisibility)),this._set("frustumVisibility",Object(o["d"])(this.frustumVisibility)),this._set("objectStates",Object(o["d"])(this.objectStates)),this._set("graphicsCore",Object(o["d"])(this.graphicsCore))}get layer(){return this.owner.layer}get view(){return this.owner.view}get scaleVisibilitySuspended(){return!(!Object(o["k"])(this.scaleVisibility)||!this.scaleVisibility.suspended)}get frustumVisibilitySuspended(){return!(!Object(o["k"])(this.frustumVisibility)||!this.frustumVisibility.suspended)}get suspended(){var e;return null!=(e=this.owner.suspended)&&e}get updating(){var e;return!!(null!=(e=this.graphicsCore)&&e.updating||Object(o["k"])(this.scaleVisibility)&&this.scaleVisibility.updating||Object(o["k"])(this.frustumVisibility)&&this.frustumVisibility.updating||this.updatingHandles.updating)}get graphics3DGraphics(){var e;return null==(e=this.graphicsCore)?void 0:e.graphics3DGraphics}get graphics3DGraphicsByObjectID(){var e;return null==(e=this.graphicsCore)?void 0:e.graphics3DGraphicsByObjectID}get loadedGraphics(){return this.owner.loadedGraphics}get fullOpacity(){var e;return null!=(e=this.owner.fullOpacity)?e:1}get slicePlaneEnabled(){return this.owner.slicePlaneEnabled}get drapeSourceType(){return this.owner.drapeSourceType}get updatePolicy(){return this.owner.updatePolicy}notifyGraphicGeometryChanged(e){this.graphicsCore.notifyGraphicGeometryChanged(e)}notifyGraphicVisibilityChanged(e){this.graphicsCore.notifyGraphicVisibilityChanged(e)}getRenderingInfo(e,t,i){const s=Object(y["c"])(e,{renderer:t,arcade:i});if(Object(o["k"])(s)&&s.color){const e=s.color;e[0]=e[0]/255,e[1]=e[1]/255,e[2]=e[2]/255}return s}getRenderingInfoAsync(e,t,i,s){return Object(y["d"])(e,{renderer:t,arcade:i,...s})}getGraphicFromGraphicUid(e){if(this.owner.loadedGraphics){const t=this.owner.loadedGraphics.find(t=>t.uid===e);if(t){const e=this.layer instanceof b["a"]?this.layer:null;return Object(g["c"])(t,e)}}}whenGraphicBounds(e,t){return this.graphicsCore?this.graphicsCore.whenGraphicBounds(e,t):Promise.reject()}computeAttachmentOrigin(e,t){return this.graphicsCore?this.graphicsCore.computeAttachmentOrigin(e,t):null}getSymbolLayerSize(e,t){return this.graphicsCore?this.graphicsCore.getSymbolLayerSize(e,t):null}maskOccludee(e){const{set:t,handle:i}=this.objectStates.acquireSet(I["f"].MaskOccludee,null);return this.objectStates.setUid(t,e.uid),i}highlight(e){if(e instanceof O["a"])return E;if("number"==typeof e)return this.highlight([e]);if(e instanceof r["a"])return this.highlight([e]);if(e instanceof n["a"]&&(e=e.toArray()),Array.isArray(e)&&e.length>0){if(e[0]instanceof r["a"]){const t=e.map(e=>e.uid),{set:i,handle:s}=this.objectStates.acquireSet(I["f"].Highlight,null);return this.objectStates.setUids(i,t),s}if("number"==typeof e[0]){const t=e,{set:i,handle:s}=this.objectStates.acquireSet(I["f"].Highlight,null);return this.objectStates.setObjectIds(i,t),s}}return E}_setupSuspendResumeExtent(){const{scaleVisibility:e,frustumVisibility:t}=this;if(Object(o["j"])(e)&&Object(o["j"])(t))return;const i=({computedExtent:i,extentPadding:s})=>{this._suspendResumeExtent=Object(w["e"])(i,this._suspendResumeExtent,j["a"],s),Object(o["k"])(e)&&e.setExtent(this._suspendResumeExtent),Object(o["k"])(t)&&t.setExtent(this._suspendResumeExtent)};this.handles.add(Object(l["e"])(()=>{var e,t;return{computedExtent:null==(e=this.graphicsCore)?void 0:e.computedExtent,extentPadding:null==(t=this.graphicsCore)?void 0:t.extentPadding}},e=>i(e),l["d"]))}_updateClippingExtent(){const e=this.view.clippingArea;this.graphicsCore.setClippingExtent(e,this.view.spatialReference)&&this.graphicsCore.recreateAllGraphics()}};Object(s["a"])([Object(d["b"])()],C.prototype,"type",void 0),Object(s["a"])([Object(d["b"])({constructOnly:!0})],C.prototype,"owner",void 0),Object(s["a"])([Object(d["b"])()],C.prototype,"layer",null),Object(s["a"])([Object(d["b"])()],C.prototype,"view",null),Object(s["a"])([Object(d["b"])({constructOnly:!0})],C.prototype,"graphicsCore",void 0),Object(s["a"])([Object(d["b"])({constructOnly:!0})],C.prototype,"scaleVisibility",void 0),Object(s["a"])([Object(d["b"])({constructOnly:!0})],C.prototype,"frustumVisibility",void 0),Object(s["a"])([Object(d["b"])({readOnly:!0})],C.prototype,"elevationAlignment",void 0),Object(s["a"])([Object(d["b"])({readOnly:!0})],C.prototype,"objectStates",void 0),Object(s["a"])([Object(d["b"])({readOnly:!0})],C.prototype,"scaleVisibilitySuspended",null),Object(s["a"])([Object(d["b"])({readOnly:!0})],C.prototype,"frustumVisibilitySuspended",null),Object(s["a"])([Object(d["b"])()],C.prototype,"suspended",null),Object(s["a"])([Object(d["b"])({readOnly:!0})],C.prototype,"updating",null),Object(s["a"])([Object(d["b"])()],C.prototype,"loadedGraphics",null),Object(s["a"])([Object(d["b"])()],C.prototype,"fullOpacity",null),Object(s["a"])([Object(d["b"])()],C.prototype,"slicePlaneEnabled",null),Object(s["a"])([Object(d["b"])()],C.prototype,"drapeSourceType",null),Object(s["a"])([Object(d["b"])()],C.prototype,"updatePolicy",null),C=Object(s["a"])([Object(p["a"])("esri.views.3d.layers.graphics.GraphicsProcessor")],C);const E=Object(c["b"])()},"3c0a":function(e,t,i){"use strict";i.r(t),i.d(t,"default",(function(){return b}));var s=i("a4ee"),r=i("fc29"),n=i("a5d8"),a=i("b2b2"),c=i("59b2"),o=(i("b50f"),i("c120"),i("cea0"),i("d386")),h=i("648c"),l=i("2cbd"),d=i("040f");let p=class extends(Object(d["a"])(r["a"])){constructor(e){super(e),this.processor=null,this.slicePlaneEnabled=!1,this.layer=new u,this.drapeSourceType=h["b"].Features}initialize(){this._set("processor",new l["a"]({owner:this})),this.processor.setup()}destroy(){this._set("processor",Object(a["d"])(this.processor))}get graphics(){return this.view.graphics}get loadedGraphics(){return this.graphics}get updating(){var e;return!(null==(e=this.processor)||!e.updating)}get symbolUpdateType(){return this.processor.graphicsCore.symbolUpdateType}getGraphicFromGraphicUid(e){return this.processor.getGraphicFromGraphicUid(e)}whenGraphicBounds(e,t){return this.processor.whenGraphicBounds(e,t)}graphicChanged(e){this.processor.graphicsCore.graphicUpdateHandler(e)}get updatePolicy(){return this.processor.graphicsCore.effectiveUpdatePolicy}async queryGraphics(){return this.loadedGraphics}async fetchPopupFeatures(e,t){return Object(a["k"])(t)?t.clientGraphics:null}highlight(e){return this.processor.highlight(e)}maskOccludee(e){return this.processor.maskOccludee(e)}};Object(s["a"])([Object(c["b"])({readOnly:!0})],p.prototype,"graphics",null),Object(s["a"])([Object(c["b"])()],p.prototype,"loadedGraphics",null),Object(s["a"])([Object(c["b"])({readOnly:!0})],p.prototype,"updating",null),Object(s["a"])([Object(c["b"])({constructOnly:!0})],p.prototype,"view",void 0),Object(s["a"])([Object(c["b"])()],p.prototype,"processor",void 0),Object(s["a"])([Object(c["b"])({type:Boolean})],p.prototype,"slicePlaneEnabled",void 0),Object(s["a"])([Object(c["b"])()],p.prototype,"layer",void 0),p=Object(s["a"])([Object(o["a"])("esri.views.3d.layers.GraphicsView3D")],p);class u extends n["a"]{constructor(){super(),this.type="graphics-view-3d-dummy",this.id=this.uid}}const b=p},8202:function(e,t,i){"use strict";i.d(t,"a",(function(){return O}));var s=i("a4ee"),r=i("fc29"),n=i("ce6d"),a=i("af40"),c=i("b2b2"),o=i("59b2"),h=(i("b50f"),i("c120"),i("cea0"),i("d386")),l=i("8a44"),d=i("9180"),p=i("9305");const u=.05;class b{constructor(){this._extents=new l["a"]({allocator:e=>e||Object(d["l"])()}),this._tmpExtent=Object(d["l"])(),this._dirty=!1}get empty(){return 0===this._extents.length}get size(){return this._extents.length}clear(){this._extents.clear()}add(e){this._contains(e)||(this._removeContained(e),Object(d["k"])(this._extents.pushNew(),e),this._dirty=!0)}pop(){return this._dirty&&this._mergeTight(),this._extents.pop()}merge(e){return this._mergeTight(e),e.hasProgressed}_mergeTight(e=p["e"]){const t=this._extents,i=new Set;let s=0;for(;s!==t.length;){t.sort((e,t)=>e[0]-t[0]),s=t.length,i.clear();for(let s=0;s=r[2])break;i.add(s)}i.forEach(s=>{if(r===s)return;if(s[2]<=r[0])return void i.delete(s);const n=Object(d["d"])(r),a=Object(d["d"])(s),c=this._tmpExtent;Object(d["p"])(r,s,c);const o=n+a;(Object(d["d"])(c)-o)/oObject(d["g"])(t,e))}_removeContained(e){this._extents.filterInPlace(t=>!Object(d["g"])(e,t))}get test(){const e=this;return{containsPoint:t=>e._extents.some(e=>Object(d["h"])(e,t))}}}var g=i("b7c2");let y=class extends r["a"]{constructor(){super(...arguments),this.dirtyExtents=new b,this.globalDirty=!1,this.averageExtentUpdateSize=0,this.dirtyGraphicsSet=new Set,this.handles=new a["a"],this.updateElevation=!1,this.graphicsCoreOwner=null,this.graphicsCore=null,this.events=new n["a"]}setup(e,t,i,s){this.graphicsCoreOwner=e,this.queryGraphicUIDsInExtent=t,this.graphicsCore=i,this.elevationProvider=s;const r=this.graphicsCoreOwner.view.resourceController.scheduler;this.handles.add([s.on("elevation-change",e=>this._elevationChanged(e)),this.graphicsCoreOwner.watch("suspended",()=>this._suspendedChange()),r.registerTask(p["c"].ELEVATION_ALIGNMENT,this)])}destroy(){this.dirtyGraphicsSet.clear(),this.handles.destroy(),this.handles=null,this.graphicsCoreOwner=null,this.graphicsCore=null,this.queryGraphicUIDsInExtent=null}clear(){this.dirtyGraphicsSet.clear(),this.notifyChange("updating")}_suspendedChange(){!0===this.graphicsCoreOwner.suspended?this.updateElevation=!1:!1===this.graphicsCoreOwner.suspended&&this.updateElevation&&(this.globalDirty=!0,this.notifyChange("updating"))}elevationInfoChange(){this.globalDirty=!0,this.notifyChange("updating")}get updating(){return this.running}get running(){return this.dirtyGraphicsSet.size>0||this.dirtyExtents&&!this.dirtyExtents.empty||this.globalDirty}get updatingRemaining(){return this.dirtyGraphicsSet.size+this.dirtyExtents.size*this.averageExtentUpdateSize}runTask(e){for(this.globalDirty&&(this._markAllGraphicsElevationDirty(),this.globalDirty=!1,e.madeProgress()),e.run(()=>this.dirtyExtents.merge(e));this.running&&!e.done;)this._updateDirtyGraphics(e),this._updateDirtyExtents(e);this.graphicsCoreOwner.view.deconflictor.setDirty(),this.notifyChange("updating")}_updateDirtyGraphics(e){const t=this.graphicsCoreOwner.view.renderCoordsHelper,i=this.graphicsCore.effectiveUpdatePolicy===g["m"].ASYNC;for(const s of this.dirtyGraphicsSet.keys()){const r=this.graphicsCore.getGraphics3DGraphicById(s);if(this.dirtyGraphicsSet.delete(s),Object(c["k"])(r)&&(r.alignWithElevation(this.elevationProvider,t,i),e.madeProgress()),e.done)return}}_updateDirtyExtents(e){for(;!this.dirtyExtents.empty&&!e.done;){const t=this.dirtyExtents.pop(),i=this.elevationProvider.spatialReference;this.events.emit("invalidate-elevation",{extent:t,spatialReference:i});const s=this.dirtyGraphicsSet.size;this.queryGraphicUIDsInExtent(t,i,e=>{const t=this.graphicsCore.getGraphics3DGraphicById(e);Object(c["k"])(t)&&t.needsElevationUpdates()&&this.dirtyGraphicsSet.add(e)}),this.averageExtentUpdateSize=.1*(this.dirtyGraphicsSet.size-s)+.9*this.averageExtentUpdateSize,e.madeProgress()}}_markAllGraphicsElevationDirty(){this.dirtyExtents.clear(),this.dirtyGraphicsSet.clear(),this.graphicsCore.graphics3DGraphics.forEach((e,t)=>this.dirtyGraphicsSet.add(t))}_elevationChanged(e){if("scene"===e.context&&(!this.graphicsCore.layer.elevationInfo||"relative-to-scene"!==this.graphicsCore.layer.elevationInfo.mode))return;const{extent:t,spatialReference:i}=e;if(this.graphicsCoreOwner.suspended){if(!this.updateElevation){const e=this.graphicsCore.computedExtent;e&&t[2]>e.xmin&&t[0]e.ymin&&t[1]{let s=h*e[2]-h*t[2];return 0===s&&i&&(s=e[4]-t[4]),s}),d.length){let e=6*d[0][2];l[0]=d[0][0]/e,l[1]=d[0][1]/e,i&&(e=6*d[0][4],l[2]=0!==e?d[0][3]/e:0),(l[0]p[1]||l[1]p[3]||i&&(l[2]p[5]))&&(l.length=0)}if(!l.length){const e=t.lengths[0]?c(b,0,u[0],i,n):null;if(!e)return null;l[0]=e[0],l[1]=e[1],i&&e.length>2&&(l[2]=e[2])}return e}function a(e,t,i,s,n,a,c=1){const o=r(n,a);let h=i,l=i+o,d=0,p=0,u=0,b=0,g=0;for(let r=0,O=s-1;re[1]&&(e[1]=i),se[3]&&(e[3]=s),n&&(re[5]&&(e[5]=r))}if(b*c>0&&(b*=-1),g*c>0&&(g*=-1),!b)return null;const y=[d,p,.5*b];return n&&(y[3]=u,y[4]=.5*g),y}function c(e,t,i,s,n){const a=r(s,n);let c=t,p=t+a,u=0,b=0,g=0,y=0;for(let r=0,O=i-1;r0?s?[b/u,g/u,y/u]:[b/u,g/u]:i>0?s?[e[t],e[t+1],e[t+2]]:[e[t],e[t+1]]:null}function o(e,t,i,s){const r=i-e,n=s-t;return Math.sqrt(r*r+n*n)}function h(e,t,i,s,r,n){const a=s-e,c=r-t,o=n-i;return Math.sqrt(a*a+c*c+o*o)}function l(e,t,i,s){return[e+.5*(i-e),t+.5*(s-t)]}function d(e,t,i,s,r,n){return[e+.5*(s-e),t+.5*(r-t),i+.5*(n-i)]}},ebae:function(e,t,i){"use strict";i.d(t,"a",(function(){return b}));var s=i("a4ee"),r=i("fc29"),n=i("af40"),a=i("3795"),c=i("59b2"),o=(i("b50f"),i("c120"),i("cea0"),i("d386")),h=i("f694"),l=i("6b38"),d=i("9305");const p=1.2;let u=class extends r["a"]{constructor(){super(...arguments),this.suspended=!1,this.extent=null,this.extentIntersectionDirty=!0,this._isVisibleBelowSurface=!1,this.handles=new n["a"],this.graphicsCoreOwner=null,this.updating=!0}setup(e){this.graphicsCoreOwner=e,this.extentIntersection=new l["a"]({renderCoordsHelper:e.view.renderCoordsHelper});const t=e.view,i=t.basemapTerrain,s=t.resourceController.scheduler;this.handles.add([t.on("resize",()=>this._viewChange()),t.state.watch("camera",()=>this._viewChange(),!0),s.registerTask(d["c"].FRUSTUM_VISIBILITY,this),i.on("elevation-bounds-change",()=>this._elevationBoundsChange())]),"local"===t.viewingMode?this.isVisibleBelowSurface=!0:this.handles.add([Object(a["a"])(i,["opacity","wireframe"],()=>this._updateIsVisibleBelowSurface()),Object(a["a"])(t,"map.ground.navigationConstraint.type",()=>this._updateIsVisibleBelowSurface())])}destroy(){this.graphicsCoreOwner=null,this.extent=null,this.extentIntersection=null,this.handles&&(this.handles.destroy(),this.handles=null)}_setDirty(){this.updating||this._set("updating",!0)}setExtent(e){this.extent=e,this.extentIntersectionDirty=!0,this._setDirty()}_viewChange(){this._setDirty()}_elevationBoundsChange(){this._setDirty(),this.extentIntersectionDirty=!0}set isVisibleBelowSurface(e){this._isVisibleBelowSurface=e,this._setDirty(),this.extentIntersectionDirty=!0}_updateIsVisibleBelowSurface(){const e=this.graphicsCoreOwner.view,t=e.basemapTerrain,i="local"===e.viewingMode,s=e.map.ground&&e.map.ground.navigationConstraint&&"none"===e.map.ground.navigationConstraint.type;this.isVisibleBelowSurface=i||!t.opaque||s}_updateExtentIntersection(){if(!this.extentIntersectionDirty)return;this.extentIntersectionDirty=!1;const e=this.graphicsCoreOwner.view;let t;if(this._isVisibleBelowSurface)t=-.3*Object(h["e"])(e.spatialReference).radius;else{const{min:i,max:s}=e.basemapTerrain.elevationBounds;t=i-Math.max(1,(s-i)*(p-1))}this.extentIntersection.update(this.extent,e.spatialReference,t)}get running(){return this.updating}runTask(){if(this._set("updating",!1),!this.extent)return void this._set("suspended",!1);this._updateExtentIntersection();const e=this.graphicsCoreOwner.view.frustum,t=Object(h["e"])(this.graphicsCoreOwner.view.spatialReference).radius;this._set("suspended",!this.extentIntersection.isVisibleInFrustum(e,t))}};Object(s["a"])([Object(c["b"])({readOnly:!0})],u.prototype,"suspended",void 0),Object(s["a"])([Object(c["b"])({readOnly:!0})],u.prototype,"updating",void 0),u=Object(s["a"])([Object(o["a"])("esri.views.3d.layers.graphics.Graphics3DFrustumVisibility")],u);const b=u}}]); //# sourceMappingURL=chunk-680cbc92.51297e38.js.map