1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[803],{803:function(t,e,r){r.r(e),r.d(e,{default:function(){return _}});var s=r(73322),i=r(21670),o=r(4580),n=r(21955),a=r(86652),u=r(95263);r(58583),r(42082);var l=r(20352),p=r(18301),d=r(93271),c=r(29126),y=r(81133),h=r(71176),m=r(47259),f=r(67530);let g=class extends y.Z{constructor(t){super(t),this.type="csv",this.refresh=(0,o.Ds)(async t=>{await this.load();let{extent:e,timeExtent:r}=await this._connection.invoke("refresh",t);return e&&(this.sourceJSON.extent=e),r&&(this.sourceJSON.timeInfo.timeExtent=[r.start,r.end]),{dataChanged:!0,updates:{extent:this.sourceJSON.extent,timeInfo:this.sourceJSON.timeInfo}}})}load(t){let e=null!=t?t.signal:null;return this.addResolvingPromise(this._startWorker(e)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}async openPorts(){return await this.load(),this._connection.openPorts()}async queryFeatures(t,e={}){await this.load(e);let r=await this._connection.invoke("queryFeatures",t?t.toJSON():null,e);return f.Z.fromJSON(r)}async queryFeaturesJSON(t,e={}){return await this.load(e),this._connection.invoke("queryFeatures",t?t.toJSON():null,e)}async queryFeatureCount(t,e={}){return await this.load(e),this._connection.invoke("queryFeatureCount",t?t.toJSON():null,e)}async queryObjectIds(t,e={}){return await this.load(e),this._connection.invoke("queryObjectIds",t?t.toJSON():null,e)}async queryExtent(t,e={}){await this.load(e);let r=await this._connection.invoke("queryExtent",t?t.toJSON():null,e);return{count:r.count,extent:m.Z.fromJSON(r.extent)}}async querySnapping(t,e={}){return await this.load(e),this._connection.invoke("querySnapping",t,e)}async queryAttributeBins(t,e={}){return await this.load(),this._connection.invoke("queryAttributeBins",t?t.toJSON():null,e)}async _startWorker(t){this._connection=await (0,h.bA)("CSVSourceWorker",{strategy:(0,u.Z)("feature-layers-workers")?"dedicated":"local",signal:t,registryTarget:this});let{url:e,delimiter:r,fields:s,latitudeField:i,longitudeField:o,spatialReference:n,timeInfo:a}=this.loadOptions,l=await this._connection.invoke("load",{url:e,customParameters:this.customParameters,parsingOptions:{delimiter:r,fields:s?.map(t=>t.toJSON()),latitudeField:i,longitudeField:o,spatialReference:n?.toJSON(),timeInfo:a?.toJSON()}},{signal:t});this.locationInfo=l.locationInfo,this.sourceJSON=l.layerDefinition,this.delimiter=l.delimiter}};(0,s._)([(0,a.Cb)()],g.prototype,"type",void 0),(0,s._)([(0,a.Cb)()],g.prototype,"loadOptions",void 0),(0,s._)([(0,a.Cb)()],g.prototype,"customParameters",void 0),(0,s._)([(0,a.Cb)()],g.prototype,"locationInfo",void 0),(0,s._)([(0,a.Cb)()],g.prototype,"sourceJSON",void 0),(0,s._)([(0,a.Cb)()],g.prototype,"delimiter",void 0),g=(0,s._)([(0,p.j)("esri.layers.graphics.sources.CSVSource")],g);var v=r(23902),S=r(5829),b=r(33749);function C(t,e){throw new i.Z(e,`CSVLayer (title: ${t.title}, id: ${t.id}) cannot be saved to a portal item`)}let w=class extends c.default{constructor(...t){super(...t),this.geometryType="point",this.capabilities=(0,v.MS)(!1,!1),this.delimiter=null,this.editingEnabled=!1,this.fields=null,this.latitudeField=null,this.locationType="coordinates",this.longitudeField=null,this.operationalLayerType="CSV",this.outFields=["*"],this.path=null,this.spatialReference=d.Z.WGS84,this.source=null,this.type="csv"}normalizeCtorArgs(t,e){return"string"==typeof t?{url:t,...e}:t}load(t){let e=null!=t?t.signal:null,r=this.loadFromPortal({supportedTypes:["CSV"],supportsData:!1},t).catch(o.r9).then(async()=>this.initLayerProperties(await this.createGraphicsSource(e)));return this.addResolvingPromise(r),Promise.resolve(this)}get isTable(){return this.loaded&&null==this.geometryType}readWebMapLabelsVisible(t,e){return null!=e.showLabels?e.showLabels:!!e.layerDefinition?.drawingInfo?.labelingInfo}set url(t){if(!t)return void this._set("url",t);let e=(0,n.mN)(t);this._set("url",e.path),e.query&&(this.customParameters={...this.customParameters,...e.query})}async createGraphicsSource(t){let e=new g({loadOptions:{delimiter:this.delimiter,fields:this.fields,latitudeField:this.latitudeField??void 0,longitudeField:this.longitudeField??void 0,spatialReference:this.spatialReference??void 0,timeInfo:this.timeInfo??void 0,url:this.url},customParameters:this.customParameters??void 0});return this._set("source",e),await e.load({signal:t}),this.read({locationInfo:e.locationInfo,columnDelimiter:e.delimiter},{origin:"service",url:this.parsedUrl}),e}queryFeatures(t,e){return this.load().then(()=>this.source.queryFeatures(S.Z.from(t)||this.createQuery())).then(t=>{if(t?.features)for(let e of t.features)e.layer=e.sourceLayer=this;return t})}async queryObjectIds(t,e){return await this.load(),this.source.queryObjectIds(S.Z.from(t)||this.createQuery())}queryFeatureCount(t,e){return this.load().then(()=>this.source.queryFeatureCount(S.Z.from(t)||this.createQuery()))}queryExtent(t,e){return this.load().then(()=>this.source.queryExtent(S.Z.from(t)||this.createQuery()))}read(t,e){super.read(t,e),e&&"service"===e.origin&&this.revert(["latitudeField","longitudeField"],"service")}write(t,e){return super.write(t,{...e,writeLayerSchema:!0}
1)}clone(){throw new i.Z("csv-layer:clone",`CSVLayer (title: ${this.title}, id: ${this.id}) cannot be cloned`)}async save(t){return C(this,"csv-layer:save")}async saveAs(t,e){return C(this,"csv-layer:save-as")}async hasDataChanged(){try{let{dataChanged:t,updates:e}=await this.source.refresh(this.customParameters);return null!=e&&this.read(e,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),t}catch{}return!1}_verifyFields(){}_verifySource(){}_hasMemorySource(){return!1}};(0,s._)([(0,a.Cb)({readOnly:!0,json:{read:!1,write:!1}})],w.prototype,"capabilities",void 0),(0,s._)([(0,a.Cb)({type:[","," ",";","|"," "],json:{read:{source:"columnDelimiter"},write:{target:"columnDelimiter",ignoreOrigin:!0}}})],w.prototype,"delimiter",void 0),(0,s._)([(0,a.Cb)({readOnly:!0,type:Boolean,json:{origins:{"web-scene":{read:!1,write:!1}}}})],w.prototype,"editingEnabled",void 0),(0,s._)([(0,a.Cb)({json:{read:{source:"layerDefinition.fields"},write:{target:"layerDefinition.fields"}}})],w.prototype,"fields",void 0),(0,s._)([(0,a.Cb)({type:Boolean,readOnly:!0})],w.prototype,"isTable",null),(0,s._)([(0,l.r)("web-map","labelsVisible",["layerDefinition.drawingInfo.labelingInfo","showLabels"])],w.prototype,"readWebMapLabelsVisible",null),(0,s._)([(0,a.Cb)({type:String,json:{read:{source:"locationInfo.latitudeFieldName"},write:{target:"locationInfo.latitudeFieldName",ignoreOrigin:!0}}})],w.prototype,"latitudeField",void 0),(0,s._)([(0,a.Cb)({type:["show","hide"]})],w.prototype,"listMode",void 0),(0,s._)([(0,a.Cb)({type:["coordinates"],json:{read:{source:"locationInfo.locationType"},write:{target:"locationInfo.locationType",ignoreOrigin:!0,isRequired:!0}}})],w.prototype,"locationType",void 0),(0,s._)([(0,a.Cb)({type:String,json:{read:{source:"locationInfo.longitudeFieldName"},write:{target:"locationInfo.longitudeFieldName",ignoreOrigin:!0}}})],w.prototype,"longitudeField",void 0),(0,s._)([(0,a.Cb)({type:["CSV"]})],w.prototype,"operationalLayerType",void 0),(0,s._)([(0,a.Cb)()],w.prototype,"outFields",void 0),(0,s._)([(0,a.Cb)({type:String,json:{origins:{"web-scene":{read:!1,write:!1}},read:!1,write:!1}})],w.prototype,"path",void 0),(0,s._)([(0,a.Cb)({json:{read:!1},cast:null,type:g,readOnly:!0})],w.prototype,"source",void 0),(0,s._)([(0,a.Cb)({json:{read:!1},value:"csv",readOnly:!0})],w.prototype,"type",void 0),(0,s._)([(0,a.Cb)({json:{read:b.r,write:{isRequired:!0,ignoreOrigin:!0,writer:b.w}}})],w.prototype,"url",null);let _=w=(0,s._)([(0,p.j)("esri.layers.CSVLayer")],w)},60107:function(t,e,r){r.d(e,{e:function(){return i},g:function(){return s}});let s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},i={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}},23902:function(t,e,r){r.d(e,{Dm:function(){return p},Hq:function(){return c},MS:function(){return y},bU:function(){return a}});var s=r(95263),i=r(5057),o=r(60107),n=r(29340);
1function a(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?n.I4:"esriGeometryPolyline"===t?n.ET:n.lF}}}let u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/,l=1;function p(t,e){if((0,s.Z)("esri-csp-restrictions"))return()=>({[e]:null,...t});try{let r=`this${d(e)} = null;`;for(let e in t)r+=`this${d(e)} = ${JSON.stringify(t[e])};`;let s=Function(` 2 return class AttributesClass$${l++} { 3 constructor() { 4 ${r}; 5 } 6 } 7 `)();return()=>new s}catch(r){return()=>({[e]:null,...t})}}function d(t){return u.test(t)?`.${t}`:`["${t}"]`}function c(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.d9)(t)}}]}function y(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:o.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:o.e,editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.