text: // All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  // See https://js.arcgis.com/4.10/esri/copyright.txt for details.
  //>>built
  define("require exports ../../../core/tsSupport/declareExtendsHelper ../../../core/tsSupport/decorateHelper ../../../Graphic ../../../PopupTemplate ../../../core/Collection ../../../core/Handles ../../../core/promiseUtils ../../../core/watchUtils ../../../core/accessorSupport/decorators ../../../renderers/SimpleRenderer ../../../renderers/support/jsonUtils ../../../tasks/support/FeatureSet ../engine/Container ./LayerView2D ./support/GraphicsView2D ../../layers/RefreshableLayerView".split(" "),function(B,
  C,n,p,q,r,t,u,l,g,m,h,v,w,x,y,z,A){return function(k){function d(){var a=null!==k&&k.apply(this,arguments)||this;a._handles=new u;a._graphicsViewMap={};a._popupTemplates=new Map;a.container=new x.Container;a.graphicsViews=[];return a}n(d,k);d.prototype.hitTest=function(a,b){var c=this;if(this.suspended||!this.graphicsViews.length)return l.resolve();var d=this.graphicsViews.reverse().map(function(c){return c.hitTest(a,b)});return l.all(d).then(function(a){return a.filter(function(a,b){a&&(a.popupTemplate=
  c._popupTemplates.get(c.graphicsViews[b]),a.layer=c.layer,a.sourceLayer=c.layer);return!!a})[0]||null})};d.prototype.update=function(a){if(this.graphicsViews)for(var b=0,c=this.graphicsViews;b<c.length;b++)c[b].update(a)};d.prototype.attach=function(){var a=this;this.layer.featureCollections.forEach(function(b){var c=w.fromJSON(b.featureSet),d=new (t.ofType(q))(c.features),e;if(a._graphicsViewMap[c.geometryType])e=a._graphicsViewMap[c.geometryType],e.graphics.addMany(d);else{e=b.layerDefinition.drawingInfo;
  b=b.popupInfo?r.fromJSON(b.popupInfo):null;var f=v.fromJSON(e.renderer);e=new z.default({view:a.view,graphics:d,renderer:f});a._graphicsViewMap[c.geometryType]=e;a._popupTemplates.set(e,b);"polygon"!==c.geometryType||a.layer.polygonSymbol?"polyline"!==c.geometryType||a.layer.lineSymbol?"point"!==c.geometryType||a.layer.pointSymbol||(a.layer.pointSymbol=f.symbol):a.layer.lineSymbol=f.symbol:a.layer.polygonSymbol=f.symbol;a.graphicsViews.push(e);a.container.addChild(e.container)}});this._handles.add(g.init(this.layer,
  "polygonSymbol",function(b){a._graphicsViewMap.polygon.renderer=new h({symbol:b})}));this._handles.add(g.init(this.layer,"lineSymbol",function(b){a._graphicsViewMap.polyline.renderer=new h({symbol:b})}));this._handles.add(g.init(this.layer,"pointSymbol",function(b){a._graphicsViewMap.point.renderer=new h({symbol:b})}))};d.prototype.detach=function(){this._handles.removeAll();this.container.removeAllChildren();this.graphicsViews.forEach(function(a){a.destroy();a.graphics=null;a.view=null;a.renderer=
  null});this.graphicsViews.length=0};d.prototype.moveStart=function(){this.requestUpdate()};d.prototype.viewChange=function(){this.requestUpdate()};d.prototype.moveEnd=function(){this.requestUpdate()};return d=p([m.subclass("esri.views.2d.layers.GeoRSSLayerView2D")],d)}(m.declared(y,A))});