text: (function(){var e={"esri/views/layers/support/ClipArea":176,"esri/tasks/support/FeatureSet":187,"esri/views/layers/support/ClipRect":209,"esri/views/2d/layers/LayerView2D":219,"esri/views/layers/support/Geometry":220,"esri/views/layers/support/Path":221,"esri/layers/support/kmlUtils":839,"esri/views/2d/layers/KMLLayerView2D":2107},t=this||window,r=t.webpackJsonp=t.webpackJsonp||[];r.registerAbsMids?r.registerAbsMids(e):(r.absMidsWaiting=r.absMidsWaiting||[]).push(e)})(),(window.webpackJsonp=window.webpackJsonp||[]).push([[82,32,188],{176:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r(117),r(155),r(151)],void 0===(n=function(e,t,r,i,n){return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),r.__decorate([n.subclass("esri.views.layers.support.ClipArea")],t)}(i.JSONSupport)}.apply(null,i))||(e.exports=n)},187:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r(117),r(159),r(174),r(166),r(155),r(152),r(151),r(170),r(163),r(194)],void 0===(n=function(e,t,r,i,n,o,s,a,p,l,u,y){var c=new o.default({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),d=function(e){function t(t){var r=e.call(this,t)||this;return r.displayFieldName=null,r.exceededTransferLimit=!1,r.features=[],r.fields=null,r.geometryType=null,r.hasM=!1,r.hasZ=!1,r.queryGeometry=null,r.spatialReference=null,r}return r.__extends(t,e),t.prototype.readFeatures=function(e,t){for(var r=l.fromJSON(t.spatialReference),i=[],o=0;o<e.length;o++){var s=e[o],p=n.fromJSON(s),u=s.geometry&&s.geometry.spatialReference;a.isSome(p.geometry)&&!u&&(p.geometry.spatialReference=r),i.push(p)}return i},t.prototype.writeGeometryType=function(e,t,r,i){if(e)c.write(e,t,r,i);else{var n=this.features;if(n)for(var o=0,s=n;o<s.length;o++){var p=s[o];if(p&&a.isSome(p.geometry))return void c.write(p.geometry.type,t,r,i)}}},t.prototype.writeSpatialReference=function(e,t){if(e)t.spatialReference=e.toJSON();else{var r=this.features;if(r)for(var i=0,n=r;i<n.length;i++){var o=n[i];o&&a.isSome(o.geometry)&&o.geometry.spatialReference&&(t.spatialReference=o.geometry.spatialReference.toJSON())}}},t.prototype.toJSON=function(e){var t=this.write(null);if(t.features&&Array.isArray(e)&&e.length>0)for(var r=0;r<t.features.length;r++){var i=t.features[r];if(i.geometry){var n=e&&e[r];i.geometry=n&&n.toJSON()||i.geometry}}return t},t.prototype.quantize=function(e){for(var t=e.scale,r=t[0],i=t[1],n=e.translate,o=n[0],s=n[1],p=this.features,l=this._getQuantizationFunction(this.geometryType,(function(e){return Math.round((e-o)/r)}),(function(e){return Math.round((s-e)/i)})),u=0,y=p.length;u<y;u++)l(a.unwrap(p[u].geometry))||(p.splice(u,1),u--,y--);return this.transform=e,this},t.prototype.unquantize=function(){var e=this.geometryType,t=this.features,r=this.transform;if(!r)return this;for(var i=r.translate,n=i[0],o=i[1],s=r.scale,p=s[0],l=s[1],u=this._getHydrationFunction(e,(function(e){return e*p+n}),(function(e){return o-e*l})),y=0,c=t;y<c.length;y++){var d=c[y].geometry;a.isSome(d)&&u(d)}return this},t.prototype._quantizePoints=function(e,t,r){for(var i,n,o=[],s=0,a=e.length;s<a;s++){var p=e[s];if(s>0){var l=t(p[0]),u=r(p[1]);l===i&&u===n||(o.push([l-i,u-n]),i=l,n=u)}else i=t(p[0]),n=r(p[1]),o.push([i,n])}return o.length>0?o:null},t.prototype._getQuantizationFunction=function(e,t,r){var i=this;return"point"===e?function(e){return e.x=t(e.x),e.y=r(e.y),e}:"polyline"===e||"polygon"===e?function(e){for(var n=u.isPolygon(e)?e.rings:e.paths,o=[],s=0,a=n.length;s<a;s++){var p=n[s],l=i._quantizePoints(p,t,r);l&&o.push(l)}return o.length>0?(u.isPolygon(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?function(e){var n;return(n=i._quantizePoints(e.points,t,r)).length>0?(e.points=n,e):null}:"extent"===e?function(e){return e}:null},t.prototype._getHydrationFunction=function(e,t,r){return"point"===e?function(e){e.x=t(e.x),e.y=r(e.y)}:"polyline"===e||"polygon"===e?function(e){for(var i,n,o=u.isPolygon(e)?e.rings:e.paths,s=0,a=o.length;s<a;s++)for(var p=o[s],l=0,y=p.length;l<y;l++){var c=p[l];l>0?(i+=c[0],n+=c[1]):(i=c[0],n=c[1]),c[0]=t(i),c[1]=r(n)}}:"extent"===e?function(e){e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax)}:"multipoint"===e?function(e){for(var i,n,o=e.points,s=0,a=o.length;s<a;s++){var p=o[s];s>0?(i+=p[0],n+=p[1]):(i=p[0],n=p[1]),p[0]=t(i),p[1]=r(n)}}:void 0},r.__decorate([p.property({type:String,json:{write:!0}})],t.prototype,"displayFieldName",void 0),r.__decorate([p.property({type:Boolean,json:{write:{overridePolicy:function(e){return{enabled:e}}}}})],t.prototype,"exceededTransferLimit",void 0),r.__decorate([p.property({type:[n],json:{write:!0}})],t.prototype,"features",void 0),r.__decorate([p.reader("features")],t.prototype,"readFeatures",null),r.__decorate([p.property({type:[y],json:{write:!0}})],t.prototype,"fields",void 0),r.__decorate([p.property({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:c.read}}})],t.prototype,"geometryType",void 0),r.__decorate([p.writer("geometryType")],t.prototype,"writeGeometryType",null),r.__decorate([p.property({type:Boolean,json:{write:{overridePolicy:function(e){return{enabled:e}}}}})],t.prototype,"hasM",void 0),r.__decorate([p.property({type:Boolean,json:{write:{overridePolicy:function(e){return{enabled:e}}}}})],t.prototype,"hasZ",void 0),r.__decorate([p.property({types:i.geometryTypes,json:{read:u.fromJSON,write:!0}})],t.prototype,"queryGeometry",void 0),r.__decorate([p.property({type:l,json:{write:!0}})],t.prototype,"spatialReference",void 0),r.__decorate([p.writer("spatialReference")],t.prototype,"writeSpatialReference",null),r.__decorate([p.property({json:{write:!0}})],t.prototype,"transform",void 0),r.__decorate([p.subclass("esri.tasks.support.FeatureSet")],t)}(s.JSONSupport);return d.prototype.toJSON.isDefaultToJSON=!0,d||(d={}),d}.apply(null,i))||(e.exports=n)},209:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r(117),r(151),r(176)],void 0===(n=function(e,t,r,i,n){return function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="rect",t.left=null,t.right=null,t.top=null,t.bottom=null,t}var n;return r.__extends(t,e),n=t,t.prototype.clone=function(){return new n({left:this.left,right:this.right,top:this.top,bottom:this.bottom})},Object.defineProperty(t.prototype,"version",{get:function(){return(this._get("version")||0)+1},enumerable:!0,configurable:!0}),r.__decorate([i.property({type:[Number,String],json:{write:!0}})],t.prototype,"left",void 0),r.__decorate([i.property({type:[Number,String],json:{write:!0}})],t.prototype,"right",void 0),r.__decorate([i.property({type:[Number,String],json:{write:!0}})],t.prototype,"top",void 0),r.__decorate([i.property({type:[Number,String],json:{write:!0}})],t.prototype,"bottom",void 0),r.__decorate([i.property({readOnly:!0,dependsOn:["left","right","top","bottom"]})],t.prototype,"version",null),n=r.__decorate([i.subclass("esri.views.layers.support.ClipRect")],t)}(n)}.apply(null,i))||(e.exports=n)},2107:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r(117),r(165),r(169),r(167),r(153),r(231),r(157),r(151),r(184),r(197),r(839),r(1148),r(186),r(219),r(610),r(218)],void 0===(n=function(e,t,r,i,n,o,s,a,p,l,u,y,c,d,h,f,v,g){return function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._handles=new o,t._bitmapIndex=new Map,t._mapImageContainer=new h.BitmapContainer,t._featuresMap=new Map,t.allVisiblePoints=new d.GraphicsCollection,t.allVisiblePolylines=new d.GraphicsCollection,t.allVisiblePolygons=new d.GraphicsCollection,t.allVisibleMapImages=new n,t}return r.__extends(t,e),t.prototype.hitTest=function(e,t){var r=this;if(this.suspended||!this._pointsView&&!this._polylinesView&&!this._polygonsView)return s.resolve(null);var i=[this._pointsView.hitTest(e,t),this._polylinesView.hitTest(e,t),this._polygonsView.hitTest(e,t)];return s.all(i).then((function(e){return e.filter((function(e){return e&&(e.layer=r.layer,e.sourceLayer=r.layer),!!e}))[0]||null}))},t.prototype.update=function(e){this._polygonsView&&this._polygonsView.processUpdate(e),this._polylinesView&&this._polylinesView.processUpdate(e),this._pointsView&&this._pointsView.processUpdate(e)},t.prototype.attach=function(){var e=this;this._handles.add([this.allVisibleMapImages.on("change",(function(t){t.added.forEach((function(t){return e._addMapImage(t)})),t.removed.forEach((function(t){return e._removeMapImage(t)}))}))]),this.container.addChild(this._mapImageContainer),this._polygonsView=new v.default({view:this.view,graphics:this.allVisiblePolygons,requestUpdateCallback:function(){return e.requestUpdate()}}),this.container.addChild(this._polygonsView.container),this._polylinesView=new v.default({view:this.view,graphics:this.allVisiblePolylines,requestUpdateCallback:function(){return e.requestUpdate()}}),this.container.addChild(this._polylinesView.container),this._pointsView=new v.default({view:this.view,graphics:this.allVisiblePoints,requestUpdateCallback:function(){return e.requestUpdate()}}),this.container.addChild(this._pointsView.container),this.watch("layer.visibleSublayers",(function(){return e._refreshCollections()})),this._fetchingPromise=this._fetchService().then((function(){e._fetchingPromise=null,e.notifyChange("updating")}))},t.prototype.detach=function(){this._handles.removeAll(),this._mapImageContainer.removeAllChildren(),this.container.removeAllChildren(),this._bitmapIndex.clear(),this._polygonsView&&(this._polygonsView.destroy(),this._polygonsView=null),this._polylinesView&&(this._polylinesView.destroy(),this._polylinesView=null),this._pointsView&&(this._pointsView.destroy(),this._pointsView=null)},t.prototype.moveStart=function(){},t.prototype.viewChange=function(){this._polygonsView.viewChange(),this._polylinesView.viewChange(),this._pointsView.viewChange()},t.prototype.moveEnd=function(){},t.prototype.isUpdating=function(){return null!=this._fetchingPromise||this._pointsView.updating||this._polygonsView.updating||this._polylinesView.updating},t.prototype._addMapImage=function(e){var t=this;this.view.spatialReference.isWGS84&&i(e.href,{responseType:"image"}).then((function(r){var i=r.data,n=u.fromJSON(e.extent);y.canProject(n,t.view.spatialReference)&&(n=y.project(n,t.view.spatialReference));var o=new h.Bitmap(i);o.x=n.xmin,o.y=n.ymax,o.resolution=n.width/i.naturalWidth,o.rotation=e.rotation,t._mapImageContainer.addChild(o),t._bitmapIndex.set(e,o)}))},t.prototype._fetchService=function(){var e=this;return this._handles.remove("refresh-collections"),this._getParsedKML().then((function(t){return e._fetchSublayerService(e.layer,t)}))},t.prototype._fetchSublayerService=function(e,t){var r=this,i=e.sublayers;if(!i||0===i.length)return s.resolve();var n=[];return i.forEach((function(e){var i=p.whenTrueOnce(e,"visible").then((function(){return e.load()})).then((function(){return r._getGraphicsForSublayer(e,t)})).then((function(t){return s.create((function(i){e.networkLink?i():(r._featuresMap.set(e,t),r._handles.add(a.schedule((function(){r._refreshCollections(),i()})),"refresh-collections"))}))})).then((function(){return r._fetchSublayerService(e,e.sourceJSON||t)}));e.visible&&n.push(i)})),s.all(n).then((function(){}))},t.prototype._getParsedKML=function(){return c.fetchService(this.layer.url,this.view.spatialReference,this.layer.refreshInterval).then((function(e){return c.parseKML(e.data)}))},t.prototype._getGraphicsForSublayer=function(e,t){return r.__awaiter(this,void 0,void 0,(function(){var i,n,o,s,a;return r.__generator(this,(function(r){switch(r.label){case 0:return i=null,t.sublayers.some((function(t){return i=t,t.id===e.id}))?(n={},(o=i.points)?[4,c.getGraphics(i.points)]:[3,2]):[2,null];case 1:o=r.sent(),r.label=2;case 2:return n.points=o,(s=i.polylines)?[4,c.getGraphics(i.polylines)]:[3,4];case 3:s=r.sent(),r.label=4;case 4:return n.polylines=s,(a=i.polygons)?[4,c.getGraphics(i.polygons)]:[3,6];case 5:a=r.sent(),r.label=6;case 6:return[2,(n.polygons=a,n.mapImages=i.mapImages,n)]}}))}))},t.prototype._refreshCollections=function(){var e=this,t=this.get("layer.visibleSublayers");this.allVisiblePoints.removeAll(),this.allVisiblePolylines.removeAll(),this.allVisiblePolygons.removeAll(),this.allVisibleMapImages.removeAll(),t&&t.length&&t.forEach((function(t){var r=e._featuresMap.get(t);r&&(e.allVisiblePoints.addMany(r.points),e.allVisiblePolylines.addMany(r.polylines),e.allVisiblePolygons.addMany(r.polygons),e.allVisibleMapImages.addMany(r.mapImages))}))},t.prototype._removeMapImage=function(e){var t=this._bitmapIndex.get(e);t&&(this._mapImageContainer.removeChild(t),this._bitmapIndex.delete(e))},r.__decorate([l.property()],t.prototype,"_pointsView",void 0),r.__decorate([l.property()],t.prototype,"_polylinesView",void 0),r.__decorate([l.property()],t.prototype,"_polygonsView",void 0),r.__decorate([l.property()],t.prototype,"_fetchingPromise",void 0),r.__decorate([l.property({dependsOn:["_fetchingPromise","_pointsView.updating","_polygonsView.updating","_polylinesView.updating"]})],t.prototype,"updating",void 0),r.__decorate([l.subclass("esri.views.2d.layers.KMLLayerView2D")],t)}(f.LayerView2DMixin(g))}.apply(null,i))||(e.exports=n)},219:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r(117),r(169),r(254),r(157),r(151),r(186),r(176),r(209),r(220),r(221)],void 0===(n=function(e,t,r,i,n,o,s,a,p,l,u,y){Object.defineProperty(t,"__esModule",{value:!0});var c=i.ofType({key:"type",base:p,typeMap:{rect:l,path:y,geometry:u}});t.LayerView2DMixin=function(e){return function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.clips=new c,t.moving=!1,t.attached=!1,t.lastUpdateId=-1,t.updateRequested=!1,t}return r.__extends(t,e),t.prototype.initialize=function(){var e,t=this;this.container||(this.container=new a.Container),this.handles.add([o.init(this,"suspended",(function(e){t.container&&(t.container.visible=!e),t.view&&!e&&t.updateRequested&&t.view.requestUpdate()}),!0),o.init(this,["layer.opacity","container"],(function(){var e,r;t.container&&(t.container.opacity=null!==(r=null===(e=t.layer)||void 0===e?void 0:e.opacity)&&void 0!==r?r:1)}),!0),o.init(this,["layer.blendMode"],(function(e){t.container&&(t.container.blendMode=e)}),!0),this.clips.on("change",(function(){t.container.clips=t.clips,t.notifyChange("clips")}))]),this.container.clips=this.clips,(null===(e=this.view)||void 0===e?void 0:e.whenLayerView)?this.view.whenLayerView(this.layer).then((function(e){e!==t||t.attached||t.destroyed||(t.attach(),t.requestUpdate(),t.attached=!0)}),(function(){})):this.when().then((function(){t.attached||t.destroyed||(t.attach(),t.requestUpdate(),t.attached=!0)}),(function(){}))},t.prototype.destroy=function(){this.attached&&(this.detach(),this.attached=!1),this.handles.remove("initialize"),this.updateRequested=!1,this.layer=null,this.view=null},Object.defineProperty(t.prototype,"updating",{get:function(){return!this.attached||!this.suspended&&(this.updateRequested||this.isUpdating())},enumerable:!0,configurable:!0}),t.prototype.isVisibleAtScale=function(e){var t=!0,r=this.layer,i=r.minScale,n=r.maxScale;if(null!=i&&null!=n){var o=!i,s=!n;!o&&e<=i&&(o=!0),!s&&e>=n&&(s=!0),t=o&&s}return t},t.prototype.requestUpdate=function(){this.updateRequested||(this.updateRequested=!0,this.suspended||this.view.requestUpdate())},t.prototype.processUpdate=function(e){!this.isFulfilled()||this.isResolved()?(this._set("updateParameters",e),this.updateRequested&&!this.suspended&&(this.updateRequested=!1,this.update(e))):this.updateRequested=!1},t.prototype.isUpdating=function(){return!1},t.prototype.isRendering=function(){return!1},t.prototype.canResume=function(){return!!e.prototype.canResume.call(this)&&this.isVisibleAtScale(this.view.scale)},r.__decorate([s.property({type:c,set:function(e){var t=n.referenceSetter(e,this._get("clips"),c);this._set("clips",t)}})],t.prototype,"clips",void 0),r.__decorate([s.property()],t.prototype,"moving",void 0),r.__decorate([s.property()],t.prototype,"attached",void 0),r.__decorate([s.property()],t.prototype,"container",void 0),r.__decorate([s.property({dependsOn:["view.scale","layer.minScale","layer.maxScale"]})],t.prototype,"suspended",void 0),r.__decorate([s.property({readOnly:!0})],t.prototype,"updateParameters",void 0),r.__decorate([s.property()],t.prototype,"updateRequested",void 0),r.__decorate([s.property({dependsOn:["attached","updateRequested","suspended"]})],t.prototype,"updating",null),r.__decorate([s.property()],t.prototype,"view",void 0),r.__decorate([s.subclass("esri.views.2d.layers.LayerView2D")],t)}(e)}}.apply(null,i))||(e.exports=n)},220:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r(117),r(159),r(151),r(215),r(163),r(176)],void 0===(n=function(e,t,r,i,n,o,s,a){var p={base:o,key:"type",typeMap:{extent:i.Extent,polygon:i.Polygon}};return function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="geometry",t.geometry=null,t}var i;return r.__extends(t,e),i=t,Object.defineProperty(t.prototype,"version",{get:function(){return(this._get("version")||0)+1},enumerable:!0,configurable:!0}),t.prototype.clone=function(){return new i({geometry:this.geometry.clone()})},r.__decorate([n.property({types:p,json:{read:s.fromJSON,write:!0}})],t.prototype,"geometry",void 0),r.__decorate([n.property({readOnly:!0,dependsOn:["geometry"]})],t.prototype,"version",null),i=r.__decorate([n.subclass("esri.views.layers.support.Geometry")],t)}(a)}.apply(null,i))||(e.exports=n)},221:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r(117),r(151),r(176)],void 0===(n=function(e,t,r,i,n){return function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="path",t.path=[],t}return r.__extends(t,e),Object.defineProperty(t.prototype,"version",{get:function(){return(this._get("version")||0)+1},enumerable:!0,configurable:!0}),r.__decorate([i.property({type:[[[Number]]],json:{write:!0}})],t.prototype,"path",void 0),r.__decorate([i.property({readOnly:!0,dependsOn:["path"]})],t.prototype,"version",null),r.__decorate([i.subclass("esri.views.layers.support.Path")],t)}(n)}.apply(null,i))||(e.exports=n)},839:function(e,t,r){var i,n;i=[r.dj.c(e.i),t,r(117),r(100),r(297),r(165),r(118),r(170),r(193),r(353),r(316),r(187)],void 0===(n=function(e,t,r,i,n,o,s,a,p,l,u,y){Object.defineProperty(t,"__esModule",{value:!0});var c={esriGeometryPoint:"points",esriGeometryPolyline:"polylines",esriGeometryPolygon:"polygons"};function d(e,t,r){r.forEach((function(r){e.set(r.attributes[t],r)}))}function h(e){for(var t=p.create(),r=p.create(p.NEGATIVE_INFINITY),i=0,n=e;i<n.length;i++){var o=n[i];if(o.polygons&&o.polygons.featureSet&&o.polygons.featureSet.features)for(var s=0,u=o.polygons.featureSet.features;s<u.length;s++){var y=u[s];l.getBoundsXYZ(t,y.geometry),p.expand(r,t,r)}if(o.polylines&&o.polylines.featureSet&&o.polylines.featureSet.features)for(var c=0,d=o.polylines.featureSet.features;c<d.length;c++)y=d[c],l.getBoundsXYZ(t,y.geometry),p.expand(r,t,r);if(o.points&&o.points.featureSet&&o.points.featureSet.features)for(var h=0,f=o.points.featureSet.features;h<f.length;h++)y=f[h],l.getBoundsXYZ(t,y.geometry),p.expand(r,t,r);if(o.mapImages)for(var v=0,g=o.mapImages;v<g.length;v++)y=g[v],l.getBoundsXYZ(t,y.extent),p.expand(r,t,r)}return p.equals(r,p.NEGATIVE_INFINITY)?null:{xmin:r[0],ymin:r[1],zmin:r[2],xmax:r[3],ymax:r[4],zmax:r[5],spatialReference:a.WGS84}}t.parseKML=function(e){var t=e.folders||[],r=t.slice(),i=new Map,n=new Map,o=new Map,a=new Map,p=new Map,l={esriGeometryPoint:n,esriGeometryPolyline:o,esriGeometryPolygon:a};(e.featureCollection&&e.featureCollection.layers||[]).forEach((function(e){var t=s.clone(e);t.featureSet.features=[];var r=e.featureSet.geometryType;i.set(r,t);var p=e.layerDefinition.objectIdField;"esriGeometryPoint"===r?d(n,p,e.featureSet.features):"esriGeometryPolyline"===r?d(o,p,e.featureSet.features):"esriGeometryPolygon"===r&&d(a,p,e.featureSet.features)})),e.groundOverlays&&e.groundOverlays.forEach((function(e){p.set(e.id,e)})),t.forEach((function(t){t.networkLinkIds.forEach((function(i){var n=function(e,t,r){var i=function(e,t){var r;return t.some((function(t){return t.id===e&&(r=t,!0)})),r}(e,r);return i&&(i.parentFolderId=t,i.networkLink=i),i}(i,t.id,e.networkLinks);n&&r.push(n)}))})),r.forEach((function(e){e.featureInfos&&(e.points=s.clone(i.get("esriGeometryPoint")),e.polylines=s.clone(i.get("esriGeometryPolyline")),e.polygons=s.clone(i.get("esriGeometryPolygon")),e.mapImages=[],e.featureInfos.map((function(t){switch(t.type){case"esriGeometryPoint":case"esriGeometryPolyline":case"esriGeometryPolygon":var r=l[t.type].get(t.id);r&&e[c[t.type]].featureSet.features.push(r);break;case"GroundOverlay":var i=p.get(t.id);i&&e.mapImages.push(i)}})),e.fullExtent=h([e]))}));var u=h(r);return{folders:t,sublayers:r,extent:u}},t.fetchService=function(e,t,r,n){var s=i.kmlServiceUrl;return o(s,{query:{url:e,model:"simple",folders:"",refresh:0!==r||void 0,outSR:JSON.stringify(t)},responseType:"json",signal:n})},t.sublayersFromJSON=function(e,t,r,i){void 0===r&&(r=null),void 0===i&&(i=[]);var n=[],o={},s=t.sublayers,a=t.folders.map((function(e){return e.id}));return s.forEach((function(t){var s=new e;if(r?s.read(t,r):s.read(t),i.length&&a.indexOf(s.id)>-1&&(s.visible=-1!==i.indexOf(s.id)),o[t.id]=s,null!=t.parentFolderId&&-1!==t.parentFolderId){var p=o[t.parentFolderId];p.sublayers||(p.sublayers=[]),p.sublayers.unshift(s)}else n.unshift(s)})),n},t.getGraphics=function(e){return r.__awaiter(this,void 0,void 0,(function(){var t,i,o,s,a,p,l,c,d,h;return r.__generator(this,(function(r){switch(r.label){case 0:t=y.fromJSON(e.featureSet),i=t.features,o=e.layerDefinition,s=u.fromJSON(o.drawingInfo.renderer),a=n.fromJSON(e.popupInfo),p=[],l=0,c=i,r.label=1;case 1:return l<c.length?(d=c[l],[4,s.getSymbolAsync(d)]):[3,4];case 2:h=r.sent(),d.symbol=h,d.popupTemplate=a,d.visible=!!d.attributes.visibility,p.push(d),r.label=3;case 3:return l++,[3,1];case 4:return[2,p]}}))}))},t.computeExtent=h}.apply(null,i))||(e.exports=n)}}]);
  //# sourceMappingURL=82.js.map