text: // All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  // See https://js.arcgis.com/4.11/esri/copyright.txt for details.
  //>>built
  define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../core/tsSupport/generatorHelper ../../../core/tsSupport/awaiterHelper ../../../core/asyncUtils ../../../core/Error ../../../core/promiseUtils ../../../core/watchUtils ../../../core/accessorSupport/decorators ../../../layers/graphics/dehydratedFeatures ../../../layers/graphics/QueryEngine ../../../renderers/support/renderingInfoUtils ./LayerView3D ./graphics/Graphics3DFeatureLikeLayerView ./support/projectExtentUtils".split(" "),
  function(x,y,m,d,g,h,n,e,f,p,c,q,r,t,u,v,w){return function(k){function a(b){b=k.call(this)||this;b.controller=null;b.asyncGraphicsUpdates=!1;b.suspendResumeExtentMode="computed";b.slicePlaneEnabled=!1;b.supportsDraping=!0;b.overlayUpdating=!1;b.fullExtentInLocalViewSpatialReference=null;b.suspendResumeExtent=null;b._queryEngine=null;b._controllerCreated=!1;b.clippingExtent=null;b.supportsHeightUnitConversion=!0;b.pendingController=null;return b}m(a,k);a.prototype.initialize=function(){var b=this;
  this.layer.isTable?this.addResolvingPromise(f.reject(new e("featurelayerview:table-not-supported","table feature layer can't be displayed",{layer:this.layer}))):(this._set("graphics3d",new v({owner:this,layer:this.layer,frustumVisibilityEnabled:!0,scaleVisibilityEnabled:!0,filterVisibilityEnabled:!0,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!0,asyncGraphicsUpdates:this.asyncGraphicsUpdates,suspendResumeExtentMode:this.suspendResumeExtentMode,updateClippingExtent:function(a){return b.updateClippingExtent(a)}})),
  this.handles.add([this.watch("asyncGraphicsUpdates",function(a){b.graphics3d.graphicsCore.asyncUpdates=a}),this.watch("suspendResumeExtentMode",function(a){b.graphics3d.suspendResumeExtentMode=a})]),this.drawingOrder=this.view.getDrawingOrder(this.layer.uid),this.addResolvingPromise(this.graphics3d.setup().then(function(){return b.validateGeometryType()}).then(function(){return w.toViewIfLocal(b)}).then(function(a){return b.fullExtentInLocalViewSpatialReference=a}).then(function(){return b.initializeController()})),
  this.notifyChange("updating"))};a.prototype.destroy=function(){this.destroyPendingController();this.controller&&(this.controller.destroy(),this.controller=null);this.graphics3d&&(this.graphics3d.destroy(),this._set("graphics3d",null));this.loadedGraphics=null;this._queryEngine&&this._queryEngine.destroy();this._queryEngine=null};a.prototype.destroyPendingController=function(){this.pendingController&&(this.pendingController.destroy(),this.pendingController=null)};Object.defineProperty(a.prototype,
  "drawingOrder",{set:function(b){this.graphics3d.graphicsCore.setDrawingOrder(b);this._set("drawingOrder",b)},enumerable:!0,configurable:!0});a.prototype.getRenderingInfo=function(b,a){(b=t.getRenderingInfo(b,{renderer:a}))&&b.color&&(a=b.color,a[0]/=255,a[1]/=255,a[2]/=255);return b};a.prototype.getGraphicFromGraphicUid=function(b){var a=this,c=null;this.loadedGraphics&&this.loadedGraphics.forEach(function(l){l.uid===b&&(c=q.hydrateGraphic(l,a.layer))});return c};Object.defineProperty(a.prototype,
  "graphics3DGraphics",{get:function(){return this.graphics3d?this.graphics3d.graphicsCore.graphics3DGraphics:null},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"graphics3DGraphicsByObjectID",{get:function(){return this.graphics3d?this.graphics3d.graphicsCore.graphics3DGraphicsByObjectID:null},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"symbolUpdateType",{get:function(){return this.graphics3d?this.graphics3d.graphicsCore.symbolUpdateType:null},enumerable:!0,
  configurable:!0});a.prototype.whenGraphicBounds=function(b,a){return this.graphics3d?this.graphics3d.graphicsCore.whenGraphicBounds(b,a):null};a.prototype.whenSymbolLayerSize=function(b,a){return this.graphics3d?n.safeCast(this.graphics3d.graphicsCore.whenSymbolLayerSize(b,a)):null};a.prototype.queryFeatures=function(b){return this._queryEngine?this._queryEngine.queryFeatures(b):this._rejectQuery()};a.prototype.queryObjectIds=function(b){return this._queryEngine?this._queryEngine.queryObjectIds(b):
  this._rejectQuery()};a.prototype.queryFeatureCount=function(b){return this._queryEngine?this._queryEngine.queryFeatureCount(b):this._rejectQuery()};a.prototype.queryExtent=function(b){return this._queryEngine?this._queryEngine.queryExtent(b):this._rejectQuery()};a.prototype.highlight=function(b,a){void 0===a&&(a={});return this.graphics3d.highlight(b,a,this.layer.objectIdField)};a.prototype.getStats=function(){var b=this.graphics3d.graphicsCore.getStats();b.features=this.loadedGraphics.length;b.updating=
  this.updating;b.elevationUpdating=this.graphics3d.elevationAlignment.updating;b.visibilityFrustum=!this.graphics3d.frustumVisibility.suspended;b.visibilityScale=!this.graphics3d.scaleVisibility.suspended;return b};a.prototype.canResume=function(){return!this.inherited(arguments)||this.graphics3d&&this.graphics3d.suspended?!1:!0};a.prototype.isUpdating=function(){return!this.graphics3d||this.graphics3d.destroyed?!1:!this._controllerCreated||this.controller&&this.controller.updating||this.overlayUpdating||
  !this.view.basemapTerrain||!this.view.basemapTerrain.ready||this.graphics3d.updating};a.prototype.initializeController=function(){return h(this,void 0,void 0,function(){var b;return g(this,function(a){switch(a.label){case 0:return[4,this.createController()];case 1:return this.pendingController=b=a.sent(),[4,b.when()];case 2:return a.sent(),this.setControllerWhenInitialized(b),[2]}})})};a.prototype.setControllerWhenInitialized=function(a){return h(this,void 0,void 0,function(){return g(this,function(b){switch(b.label){case 0:return b.trys.push([0,
  2,,3]),[4,this.when()];case 1:return b.sent(),[3,3];case 2:return b.sent(),[3,3];case 3:return this._controllerCreated=!0,this.notifyChange("updating"),this.isResolved()?[4,p.whenTrueOnce(this.view,"basemapTerrain.ready")]:(this.destroyPendingController(),[2]);case 4:return b.sent(),this.pendingController=null,this.controller=a,this.loadedGraphics=a.graphics,this._queryEngine=new r({layer:this.layer,features:this.loadedGraphics,objectIdField:this.layer.objectIdField,dataSpatialReference:this.view.spatialReference}),
  this.notifyChange("updating"),[2]}})})};a.prototype.updateClippingExtent=function(a){this.clippingExtent=a;if(!this.controller)return!1;switch(this.controller.type){case "stream":return!1;case "feature-tile-3d":return this.controller.extent=a,!0}};a.prototype.validateGeometryType=function(){var a=this.layer;switch(a.geometryType){case "multipatch":case "multipoint":return f.reject(new e("featurelayerview3d:unsupported-geometry-type","Unsupported geometry type ${geometryType}",{geometryType:a.geometryType}))}};
  a.prototype._rejectQuery=function(){return f.reject(new e("featurelayerview3d:query","Not ready to execute query"))};d([c.property()],a.prototype,"loadedGraphics",void 0);d([c.property({dependsOn:["graphics3d.suspended"]})],a.prototype,"suspended",void 0);d([c.property({dependsOn:["graphics3d.updating","controller.updating","overlayUpdating"]})],a.prototype,"updating",void 0);d([c.property()],a.prototype,"controller",void 0);d([c.property()],a.prototype,"graphics3d",void 0);d([c.property({readOnly:!0})],
  a.prototype,"asyncGraphicsUpdates",void 0);d([c.property({readOnly:!0})],a.prototype,"suspendResumeExtentMode",void 0);d([c.property({type:Boolean})],a.prototype,"slicePlaneEnabled",void 0);d([c.property({aliasOf:"graphics3d.graphicsCore.hasDraped"})],a.prototype,"hasDraped",void 0);d([c.property({readOnly:!0,type:Boolean})],a.prototype,"supportsDraping",void 0);d([c.property({type:Boolean})],a.prototype,"overlayUpdating",void 0);d([c.property()],a.prototype,"drawingOrder",null);return a=d([c.subclass("esri.views.3d.layers.FeatureLikeLayerView3D")],
  a)}(c.declared(u))});