@arcgis/core 6.0.0-next.13 → 6.0.0-next.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arcade/containerUtils.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/arcade/functions/feature.js +1 -1
- package/arcade/functions/featuresetstring.js +1 -1
- package/arcade/functions/geomasync.js +1 -1
- package/arcade/functions/portal.js +1 -1
- package/arcade/functions/string.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{5566f14afb63065e438f.js → 0050916e462e3c9e0627.js} +1 -1
- package/assets/esri/core/workers/chunks/02c5d027bdaee67869cf.js +1 -0
- package/assets/esri/core/workers/chunks/0da6abe3ceabfe78f7a0.js +1 -0
- package/assets/esri/core/workers/chunks/0f617980c7dd9ad0444f.js +1 -0
- package/assets/esri/core/workers/chunks/{10445313d0d57b34511b.js → 2145a512d269d64036b0.js} +1 -1
- package/assets/esri/core/workers/chunks/21ddb26526bcb2b122c3.js +1 -0
- package/assets/esri/core/workers/chunks/22e8c0aad2fe75943865.js +1 -0
- package/assets/esri/core/workers/chunks/25f19fc929f25ddd628c.js +1 -0
- package/assets/esri/core/workers/chunks/28b74bc77f7c13080074.js +1 -0
- package/assets/esri/core/workers/chunks/{2ef5237e4c876d6a4ee0.js → 2bd4ee083ca4ad221f8b.js} +1 -1
- package/assets/esri/core/workers/chunks/{f4f9d08b2df856e3b694.js → 2eae542fe7f0f6576ac1.js} +1 -1
- package/assets/esri/core/workers/chunks/{2aeb5cc32284dd3e4d22.js → 33e4ff228a8c81b99022.js} +1 -1
- package/assets/esri/core/workers/chunks/{42323093827adffe56d3.js → 3418877328f4f0830300.js} +1 -1
- package/assets/esri/core/workers/chunks/{8dc1c3042267618fd710.js → 34cbaf844730ac2d92c2.js} +2 -2
- package/assets/esri/core/workers/chunks/{96c50a0dda0f1503ef92.js → 3c301a689c7853c9fa67.js} +2 -2
- package/assets/esri/core/workers/chunks/{02253bdffbd580af22d8.js → 3ff6d1ed3c0f1285f3e7.js} +1 -1
- package/assets/esri/core/workers/chunks/{67e4b5651fd7ff7d8cf0.js → 4ac1d3e49e242e373a92.js} +1 -1
- package/assets/esri/core/workers/chunks/4df6cb1bee5d0720a43e.js +1 -0
- package/assets/esri/core/workers/chunks/{a4cab24af69260438ff4.js → 4e6f40cbdb8c508e6df1.js} +1 -1
- package/assets/esri/core/workers/chunks/{dc486a3595b6d57018bb.js → 5bfea0c55aca826de536.js} +1 -1
- package/assets/esri/core/workers/chunks/601e1d020b8115497944.js +1 -0
- package/assets/esri/core/workers/chunks/{2686fe5b62dd0be699c0.js → 634523cc7757da9020e4.js} +1 -1
- package/assets/esri/core/workers/chunks/{a518ae5683367eeda74c.js → 70d3055f15d8b0cf4074.js} +1 -1
- package/assets/esri/core/workers/chunks/{1b946714ca4a1a7359d4.js → 76ab353d80d786777161.js} +2 -2
- package/assets/esri/core/workers/chunks/7f8e327acad48c9e75ea.js +1 -0
- package/assets/esri/core/workers/chunks/8052da8be251c3ff2176.js +1 -0
- package/assets/esri/core/workers/chunks/{f6e62d2d279a328cbed7.js → 90bdf86f553e2742d67c.js} +1 -1
- package/assets/esri/core/workers/chunks/91ebb2ccab1889eb7e81.js +1 -0
- package/assets/esri/core/workers/chunks/{3d9d7d3a40b51eb7ee3d.js → 953ba13299e7aa92c1a0.js} +1 -1
- package/assets/esri/core/workers/chunks/{f46d9a19f79d4a4bd354.js → 9e1a3b6a08c96dcefdde.js} +1 -1
- package/assets/esri/core/workers/chunks/9f0a973a0dd28953ce25.js +1 -0
- package/assets/esri/core/workers/chunks/a2ad3e620c98e2b2eb06.js +1 -0
- package/assets/esri/core/workers/chunks/a34b3d2e11a777e1ff3f.js +1 -0
- package/assets/esri/core/workers/chunks/{140f2eeb11e39ab15734.js → aa36c3a9bbaa086e3757.js} +1 -1
- package/assets/esri/core/workers/chunks/aadfe34a99c9ec7a0e11.js +1 -0
- package/assets/esri/core/workers/chunks/b49df4ebd4be1181b0f9.js +2 -0
- package/assets/esri/core/workers/chunks/{68d8ae42ab71d01a70a5.js → b557824bc1fa163d72a3.js} +2 -2
- package/assets/esri/core/workers/chunks/bc915fb182d463d804e6.js +1 -0
- package/assets/esri/core/workers/chunks/{992f102992c2bed7b34e.js → d5d0fe8e198ff5a902ee.js} +1 -1
- package/assets/esri/core/workers/chunks/e2190361247f35b02b32.js +1 -0
- package/assets/esri/core/workers/chunks/e2f42aec02bff33b25dd.js +1 -0
- package/assets/esri/core/workers/chunks/ebc1a2ef3aed8aa29424.js +1 -0
- package/assets/esri/core/workers/chunks/ed6e9d7f71bfd2691717.js +1 -0
- package/assets/esri/core/workers/chunks/ee6679ef9efa1504e7eb.js +1 -0
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/chunks/BlendWeights.glsl.js +10 -10
- package/chunks/Blur.glsl.js +2 -2
- package/chunks/EdgeDetect.glsl.js +24 -19
- package/chunks/HUDMaterial.glsl.js +11 -1
- package/chunks/HighlightApply.glsl.js +4 -5
- package/chunks/HighlightBlur.glsl.js +5 -5
- package/chunks/HighlightDownsample.glsl.js +2 -2
- package/chunks/HighlightSharpApply.glsl.js +61 -0
- package/chunks/lyr3DMain.js +1 -1
- package/chunks/lyr3DWorker.js +2 -2
- package/chunks/portal.js +1 -1
- package/config.js +1 -1
- package/geometry/support/curves/ellipticArc7Utils.js +1 -1
- package/geometry/support/curves/mathUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/geospatialPDF/ViewportMeasureFrame.js +1 -1
- package/layers/geospatialPDF/geospatialPDFParserUtils.js +1 -1
- package/layers/geospatialPDF/projectionToWKTUtils.js +2 -2
- package/layers/graphics/sources/GeoJSONSource.js +1 -1
- package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
- package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
- package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
- package/layers/graphics/sources/support/sourceUtils.js +1 -1
- package/layers/raster/datasets/TIFFRaster.js +1 -1
- package/layers/raster/datasets/pixelReader.js +1 -1
- package/layers/raster/functions/clipUtils.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/package.json +2 -2
- package/portal/schemas/definitions.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/views/2d/engine/webgl/GlyphWorker.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightObserverPlugin.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementPointPlugin.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/HighlightCellGridScreenSpacePass.glsl.js +20 -6
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightApply.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightCellGridScreenSpacePassParameters.js +2 -0
- package/views/3d/webgl-engine/effects/highlight/HighlightDownsample.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightPassParameters.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightSharpApply.glsl.js +2 -0
- package/views/3d/webgl-engine/effects/highlight/HighlightSharpApplyTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/smaa/BlendWeights.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/Blur.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/EdgeDetect.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAABlendWeightsTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAABlurTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAAEdgeDetectTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAAPassParameters.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAATechniqueConfiguration.js +2 -0
- package/views/3d/webgl-engine/lib/Compositor.js +1 -1
- package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/draw/DrawTool.js +1 -1
- package/views/draw/plugins/MultipointPlugin.js +1 -1
- package/views/draw/support/PluginContext.js +1 -1
- package/views/draw/support/managers/TooltipManager.js +1 -1
- package/views/draw/support/types.d.ts +5 -2
- package/views/support/HighlightDefaults.js +1 -1
- package/webdoc/applicationProperties/SearchLayerField.d.ts +7 -1
- package/webdoc/applicationProperties/SearchLayerField.js +1 -1
- package/webdoc/applicationProperties/SearchTableField.d.ts +7 -1
- package/webdoc/applicationProperties/SearchTableField.js +1 -1
- package/webdoc/applicationProperties/searchMode.js +2 -0
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/OrientedImageryViewer/services/DepthImageService.js +1 -1
- package/widgets/Search/LayerSearchSource.d.ts +23 -1
- package/widgets/Search/LayerSearchSource.js +1 -1
- package/widgets/Search/support/layerSearchUtils.js +1 -1
- package/widgets/Search/types.d.ts +7 -0
- package/widgets/support/forms/formUtils.js +1 -1
- package/widgets/support/forms/types.d.ts +1 -1
- package/assets/esri/core/workers/chunks/0dc66b03ff55d0ea5a09.js +0 -1
- package/assets/esri/core/workers/chunks/175c268e64ccd01f8c25.js +0 -1
- package/assets/esri/core/workers/chunks/2a1ec30f9ad305763f81.js +0 -2
- package/assets/esri/core/workers/chunks/3df5500a85345577480a.js +0 -1
- package/assets/esri/core/workers/chunks/3f7d583b676b23b3fadb.js +0 -1
- package/assets/esri/core/workers/chunks/4503b20ca6a80fb63d72.js +0 -1
- package/assets/esri/core/workers/chunks/4a640548032355e57acd.js +0 -1
- package/assets/esri/core/workers/chunks/53be85d04cd2da4f391d.js +0 -1
- package/assets/esri/core/workers/chunks/566e129f3d3805d7370a.js +0 -1
- package/assets/esri/core/workers/chunks/567a65f4203f6e81f4b4.js +0 -1
- package/assets/esri/core/workers/chunks/5982c6a8459c1237b298.js +0 -1
- package/assets/esri/core/workers/chunks/5eae5c29149f2429fe96.js +0 -1
- package/assets/esri/core/workers/chunks/6dc86e7496157c5e4d2c.js +0 -1
- package/assets/esri/core/workers/chunks/74b5c00f93cfc0d59029.js +0 -1
- package/assets/esri/core/workers/chunks/7c2c8f786a30267a5f05.js +0 -1
- package/assets/esri/core/workers/chunks/88e54449261ef94e390d.js +0 -1
- package/assets/esri/core/workers/chunks/9e142551163acf752618.js +0 -1
- package/assets/esri/core/workers/chunks/af75747b06d79446a855.js +0 -1
- package/assets/esri/core/workers/chunks/dba280c370df13196711.js +0 -1
- package/assets/esri/core/workers/chunks/e3c1c9e6c62ba5cbcdb8.js +0 -1
- package/assets/esri/core/workers/chunks/f1f90adae13b04898008.js +0 -1
- package/assets/esri/core/workers/chunks/f47c7065da3b5001245f.js +0 -1
- /package/assets/esri/core/workers/chunks/{1b946714ca4a1a7359d4.js.LICENSE.txt → 34cbaf844730ac2d92c2.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{96c50a0dda0f1503ef92.js.LICENSE.txt → 3c301a689c7853c9fa67.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{8dc1c3042267618fd710.js.LICENSE.txt → 76ab353d80d786777161.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{2a1ec30f9ad305763f81.js.LICENSE.txt → b49df4ebd4be1181b0f9.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{68d8ae42ab71d01a70a5.js.LICENSE.txt → b557824bc1fa163d72a3.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1559],{96685(e,t,r){r.r(t),r.d(t,{constructAssociationMetaDataFeatureSetFromUrl:()=>B,constructFeatureSet:()=>P,constructFeatureSetFromPortalItem:()=>z,constructFeatureSetFromRelationship:()=>G,constructFeatureSetFromUrl:()=>E,convertToFeatureSet:()=>$,createFeatureSetCollectionFromMap:()=>V,createFeatureSetCollectionFromService:()=>K,initialiseMetaDataCache:()=>Z});var a=r(56507);class i{constructor(){this.declaredRootClass="esri.arcade.featureSetCollection"}castToText(e=!1){return"object, FeatureSetCollection"}}var l=r(78878),s=r(35704),n=r(70333),u=r(48938),o=r(61454),d=r(67862),y=r(87449),h=r(11221),c=r(33325),p=r(80609),f=r(50145),m=r(4576),_=r(80200),g=r(39516),w=r(89696),F=r(18589),b=r(17126),S=r(54546),I=r(97552),v=r(7562);function T(e,t){e.clause??=function(e){if(0===e.length)throw new y.dr("NeverReach");let t=[];for(let r=0;r<e.length;r++){let a=e[r],i=[`"${a.name.replaceAll('"','""')}" ${a.asc?">":"<"} @last_${r}`];for(let t=0;t<r;t++){let r=e[t];i.push(`"${r.name.replaceAll('"','""')}" = @last_${t}`)}t.push(i.join(" AND "))}let r=t.join(" OR ");return w.A.create(r)}(e.keyFields);for(let r=0;r<e.keyFields.length;r++){let a=e.keyFields[r].name;e.clause.parameters[`last_${r}`]=t.attributes[a]}}class C extends h.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this._requestStandardised=!1,this._useDefinitionExpression=!0,this._recentlyUsedQueries=null,this._featureSetQueryInterceptor=null,this._featureSetInfo=null,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry),e.lrucache&&(this._recentlyUsedQueries=e.lrucache),e.interceptor&&(this._featureSetQueryInterceptor=e.interceptor)}_maxQueryRate(){return 1e3}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){let t=this.urlQueryPath+","+(0,c.JB)(e.toJSON());return(0,_.d)(t,_.T.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{let e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}if(this._layer.source&&this._layer.source.sourceJSON){let e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=1,null!=e&&e>=10.61&&(this._databaseType=0)):null!=e&&(e>=10.5&&(this._databaseType=1,this._requestStandardised=!0),e>=10.61&&(this._databaseType=0))}this.objectIdField=this._layer.objectIdField;for(let e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this.subtypeField=this._layer.subtypeField??"",this.subtypes=this._layer.subtypes,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}async _runDatabaseProbe(e){await this._ensureLoaded();let t=new I.A;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch{return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}async _queryAll(){return(await this.query({abortSignal:u._})).features}async query(e){return await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter?h.An:this._canUsePagination()?this._queryUsingPaging(e):this._queryUsingIdSetTraversal(e)}async _queryUsingPaging(e){let t=this._layer.capabilities.query,r=!0,a=null,i=!1;null!=e.orderBy&&(t.supportsOrderBy?(a=e.orderBy.toOrderByFields(),i=!0):r=!1);let l=await this.databaseType(),s=null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,l),n=!0!==this._removeGeometry,u=this._overrideFields??this._fieldsIncludingObjectId(["*"]),o=u.includes("*")?this._layer.fields.length:u.length,d=(this.isTable()||!n?t.standardMaxRecordCountNoGeometry:void 0)??t.standardMaxRecordCount??t.maxRecordCount??this._maxQueryRate(),y=Math.max(Math.ceil(d*(o<=50?1:o<=100?.5:o<=200?.25:.125)),t.maxRecordCount??this._maxQueryRate()),c=this._maxQueryRate(),f=this._layer.capabilities?.query.maxRecordCount;null!=f&&f<c&&(c=f);let m=this._createQuery();if(m.where=(0,g.mA)(m.where,s),null!=e.spatialFilter){let t=(0,h.rj)(e.spatialFilter.relation);m.spatialRelationship=t.spatialRelationship,m.relationParameter=t.relationParameter,m.geometry=e.spatialFilter.geometry}return m.orderByFields=a,m.outFields=u,m.returnGeometry=n,m.outSpatialReference=this.spatialReference,m.resultType="standard",{ordered:i,filterApplied:!0,spatialFilterApplied:!0,features:this._queryPaginated(m,y,c,r?e.limit:null,e.abortSignal)}}async*_queryPaginated(e,t,r,a,i){e.start=0;let l,s=a??1/0;do{(0,y.dZ)(i),e.num=Math.max(r,Math.min(s,t)),l=await this.executeQuery(e,"execute"),e.start+=e.num,s-=l.features.length,yield*(0,m.Ho)(l.features,this._maxQueryRate())}while(s>0&&!0===l.exceededTransferLimit)}async _queryUsingIdSetTraversal(e){let t=!0,r=null,a=!1;null!=e.orderBy&&(this._layer.capabilities?.query?.supportsOrderBy?(r=e.orderBy.toOrderByFields(),a=!0):t=!1);let i=await this.databaseType(),l=null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,i),s=this._createQuery();if(s.where=(0,g.mA)(s.where,l),null!=e.spatialFilter){let t=(0,h.rj)(e.spatialFilter.relation);s.spatialRelationship=t.spatialRelationship,s.relationParameter=t.relationParameter,s.geometry=e.spatialFilter.geometry}s.orderByFields=r,s.outSpatialReference=this.spatialReference,s.num=t?e.limit:null;let n=await this.executeQuery(s,"executeForIds");if((0,y.dZ)(e.abortSignal),null==n||n.length<=0)return h.An;let u=this._maxQueryRate(),o=this._layer.capabilities?.query.maxRecordCount;null!=o&&o<u&&(u=o);let d=this._createQuery();return s.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),s.returnGeometry=!0!==this._removeGeometry,s.outSpatialReference=this.spatialReference,{ordered:a,filterApplied:!0,spatialFilterApplied:!0,features:this._traverseIdSet(d,n,u,e.abortSignal)}}async*_traverseIdSet(e,t,r,a){for(let i=0;i<t.length;i+=r)e.objectIds=t.slice(i,i+r),(0,y.dZ)(a),yield(await this.executeQuery(e,"execute")).features}async queryStat(e){await this._ensureLoaded();let t=this._layer.capabilities?.query,r=!!t?.supportsSqlExpression,a=!!t?.supportsStatistics,i=!!t?.supportsDistinct,l=(0,f.Dp)(e.stat);if("count"===l)return i?this._queryCount(e):{calculated:!1};let s=e.field;if(null==s)return{calculated:!1};if(!1===a||!1===(0,p.DA)(s)&&!1===r||!1===s.isStandardized)return null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(e.stat,s,e.limit??1e3,e.abortSignal);if("distinct"===l)return!1===i?null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(l,s,e.limit??1e3,e.abortSignal):{calculated:!1};let n=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:null};let u=this._createQuery();if(u.where=(0,g.mA)(u.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,n)),null!=e.spatialFilter){let t=(0,h.rj)(e.spatialFilter.relation);u.spatialRelationship=t.spatialRelationship,u.relationParameter=t.relationParameter,u.geometry=e.spatialFilter.geometry}let o=new v.A;o.statisticType=l,o.onStatisticField=(0,p.YY)(s,n),o.outStatisticFieldName="ARCADE_STAT_RESULT",u.returnGeometry=!1;let d="ARCADE_STAT_RESULT";u.outStatistics=[o];let c=await this.executeQuery(u,"execute");if(!c.hasOwnProperty("features")||0===c.features.length)throw new y.dr("InvalidStatResponse");let m=!1,_=c.fields??[];for(let e of _)if("ARCADE_STAT_RESULT"===e.name.toUpperCase()){d=e.name,"esriFieldTypeDate"===e.type&&(m=!0);break}let w=c.features[0].attributes[d];return{calculated:!0,result:m&&null!=w?new Date(w):w}}async _queryCount(e){let t=await this.databaseType();if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:0};let r=this._createQuery();if(r.where=(0,g.mA)(r.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,t)),null!=e.spatialFilter){let t=(0,h.rj)(e.spatialFilter.relation);r.spatialRelationship=t.spatialRelationship,r.relationParameter=t.relationParameter,r.geometry=e.spatialFilter.geometry}return r.returnGeometry=!1,{calculated:!0,result:await this.executeQuery(r,"executeForCount")}}async canQueryAggregate(e){await this._ensureLoaded();let t=!1,r=this._layer.capabilities?.query,a=!0===r?.supportsSqlExpression;if(null!=r&&!0===r.supportsStatistics&&!0===r.supportsOrderBy&&(t=!0),t)for(let r of e.statistics)(!1===r.workingexpr?.isStandardized||!1===(0,p.DA)(r.workingexpr)&&!1===a)&&(t=!1);return t}async queryAggregate(e){if(await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter)return h.An;let t=await this.databaseType(),r=e.groupBy,a=e.orderBy,i=null;if(!this._layer.capabilities.query.supportsPaginationOnAggregatedQueries){let e=this.getFieldsIndex();i={keyFields:r.map((t,r)=>({name:e.normalizeFieldName(t)??t,asc:null==a||1===a._directions[r]}))}}let l=null,s=!1;null!=a&&!0===this._layer.capabilities?.query?.supportsOrderBy&&(null==i||(0,m.MJ)(r,0,r.length,a._fields,0,Math.min(a._fields.length,r.length),(e,t)=>e.toLowerCase()===t.toLowerCase()))&&(l=a.toOrderByFields(),s=!0),l??=r.slice();let n=e.statistics.map(e=>new v.A({onStatisticField:null===e.workingexpr?"":(0,p.YY)(e.workingexpr,t),outStatisticFieldName:e.field,statisticType:e.toStatisticsName()})),u=this._maxQueryRate(),o=this._layer.capabilities?.query.maxRecordCount;null!=o&&o<u&&(u=o);let d=null==e.where?null==e.spatialFilter?"1=1":"":(0,p.YY)(e.where,t),y=this._createQuery();if(y.where=(0,g.mA)(y.where,d),null!=e.spatialFilter){let t=(0,h.rj)(e.spatialFilter.relation);y.spatialRelationship=t.spatialRelationship,y.relationParameter=t.relationParameter,y.geometry=e.spatialFilter.geometry}return y.orderByFields=l,y.outFields=["*"],y.outStatistics=n,y.groupByFieldsForStatistics=r,y.returnGeometry=!1,null==i?{filterApplied:!0,spatialFilterApplied:!0,ordered:s,features:this._queryPaginated(y,u,u,null,e.abortSignal)}:{filterApplied:!0,spatialFilterApplied:!0,ordered:s,features:this._queryKeysetPaginated(y,i,e.abortSignal)}}async*_queryKeysetPaginated(e,t,r){let a=e.where;for(;;){if(null!=t.clause){if(!this._layer.capabilities.query.supportsOrderBy)throw new y.dr("NotImplemented");e.where=(0,g.mA)(a,(0,p.YY)(t.clause,await this.databaseType()))}let i=await this.executeQuery(e,"execute");if((0,y.dZ)(r),!i.hasOwnProperty("features"))throw new y.dr("InvalidStatResponse");if(yield i.features,0===i.features.length||!0!==i.exceededTransferLimit)break;T(t,i.features.at(-1))}}_createQuery(){let e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),this._requestStandardised&&(e.sqlFormat="standard"),this._useDefinitionExpression?"subtype-group"===this._layer.type&&(e.where=this._layer.definitionExpression):e.where=null,e}executeQuery(e,t){let r="execute"===t?async e=>{let t=await this._layer.source.queryFeaturesJSON(e);return(0,h.Rn)(t.features,t.spatialReference??this.spatialReference.toJSON()),t}:"executeForCount"===t?this._layer.queryFeatureCount.bind(this._layer):this._layer.queryObjectIds.bind(this._layer),a=null;if(this._recentlyUsedQueries){let t=this.convertQueryToLruCacheKey(e);a=this._recentlyUsedQueries.getFromCache(t),null===a&&(a=r(e),this._recentlyUsedQueries.addToCache(t,a),a=a.catch(e=>{throw this._recentlyUsedQueries?.removeFromCache(t),e}))}return this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===a&&(a=r(e)),a}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];let t=e.slice();if(t.includes("*"))return t;let r=!1;for(let e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return r||t.push(this.objectIdField),t}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}static create(e,t,r,a,i){let l=new F.default({url:e,outFields:null===t?["*"]:t});return new C({layer:l,spatialReference:r,lrucache:a,interceptor:i})}relationshipMetadata(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON?.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return(0,c.Qi)(this._layer.parsedUrl.path)}async queryAttachments(e,t,r,a,i){let l=this._layer;if(!function(e){let t=e.capabilities;return t?.data.supportsAttachment&&t?.operations.supportsQueryAttachments}(l))return[];let s=new S.A({objectIds:[e],returnMetadata:i});(t&&t>0||r&&r>0)&&(s.size=[t&&t>0?t:0,r&&r>0?r:t+1]),a&&a.length>0&&(s.attachmentTypes=a),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:l,query:s,method:"attachments"});let n=await l.queryAttachments(s);return n?.[e]?n[e].map(t=>{let r=`${this._layer.parsedUrl.path}/${e}/attachments/${t.id}`,a=null;return i&&t.exifInfo&&(a=(0,d.Tg)(t.exifInfo)),new o.A(t.id,t.name,t.contentType,t.size,r,a,t.keywords??null)}):[]}async queryRelatedFeatures(e){let t=(0,b.dw)(e);t.f="json",this._requestStandardised&&(t.sqlFormat="standard"),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});let r=await(0,a.A)(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t});if(r.data){let e={},t=r.data;if(t?.relatedRecordGroups){let r=t.spatialReference,a=!0===t.exceededTransferLimit;for(let i of t.relatedRecordGroups)(0,h.Rn)(i.relatedRecords,r),e[i.objectId]={features:i.relatedRecords,exceededTransferLimit:a}}return e}throw new y.dr("InvalidRequest")}async getFeatureByObjectId(e,t){let r=this._createQuery();r.outFields=t,r.returnGeometry=!1,r.outSpatialReference=this.spatialReference,r.where=(0,g.mA)(r.where,this.objectIdField+"="+e.toString()),this._featureSetQueryInterceptor&&this._featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:r,method:"execute"});let a=await this._layer.source.queryFeaturesJSON(r);return 1===a.features.length?((0,h.Rn)(a.features,a.spatialReference??this.spatialReference.toJSON()),a.features[0]):null}async getIdentityUser(){await this.load();let e=n.id?.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){await this.load();let e=n.id?.findServerInfo(this._layer.url);if(e)return e.owningSystemUrl??"";let t=this._layer.url,r=t.toLowerCase().indexOf("/rest/services");if(t=r>-1?t.slice(0,r):t,t){t+="/rest/info";try{let e=await(0,a.A)(t,{query:{f:"json"}}),r="";return e.data?.owningSystemUrl&&(r=e.data.owningSystemUrl),r}catch{return""}}return""}getDataSourceFeatureSet(){let e=new C({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this._recentlyUsedQueries??void 0,interceptor:this._featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeZone(){return this._layer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone??!1}get editFieldsInfo(){return this._layer.editFieldsInfo??null}get timeInfo(){return this._layer.timeInfo??null}async getFeatureSetInfo(){if(this._featureSetInfo)return this._featureSetInfo;let e=null,t="serviceItemId"in this._layer?this._layer.serviceItemId:null,r=this._layer.parsedUrl?.path??null;if(r){let i=await(0,a.A)(r,{responseType:"json",query:{f:"json"}});e=i?.data?.name??null,t=i?.data?.serviceItemId??null}let i=this._layer.title&&null!==(this._layer.parent??null);return this._featureSetInfo={layerId:this._layer.layerId,layerName:""===e?null:e,itemId:""===t?null:t,serviceLayerUrl:""===r?null:r,webMapLayerId:i?this._layer.id??null:null,webMapLayerTitle:i?this._layer.title??null:null,className:null,objectClassId:null},this._featureSetInfo}}var A=r(30235);const R=new FinalizationRegistry(e=>{e.abort()});class L extends h.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerParquet",this._outFields=null,this._returnGeometry=!0,this._ignoreDefinitionExpression=!1,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),null!=e.outFields&&(this._outFields=e.outFields),null!=e.includeGeometry&&(this._returnGeometry=e.includeGeometry)}_maxQueryRate(){return 1e3}async loadImpl(){return this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,this.objectIdField=this._layer.objectIdField,null!==this._outFields)if(1===this._outFields.length&&"*"===this._outFields[0])this._outFields=null;else{let e=new Set(this._outFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._outFields=this.fields.map(({name:e})=>e)}this._databaseType=0}getDataSourceFeatureSet(){let e=new L({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._outFields??void 0,includeGeometry:this._returnGeometry});return e._ignoreDefinitionExpression=!0,e}_createQuery(){let e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,this._ignoreDefinitionExpression&&(e.where=null),e}isTable(){return this._layer.isTable}async _queryAll(){return(await this.query({abortSignal:u._})).features}async query(e){if(await this._ensureLoaded(),this.isTable()&&null!=e.spatialFilter)return h.An;let t={type:"arcade",returnGeometry:this._returnGeometry,returnZ:this.hasZ,returnM:this.hasM,outSpatialReference:(this.spatialReference??this._layer.spatialReference).toJSON(),outFields:Array.from(new Set(this._outFields??this._layer.fields.map(e=>e.name))),where:(0,g.mA)(this._ignoreDefinitionExpression?null:this._layer.definitionExpression,e.where?(0,p.YY)(e.where,0):null),extent:null};if(null!=e.spatialFilter)switch(e.spatialFilter.relation){case"esriSpatialRelIntersects":case"esriSpatialRelContains":case"esriSpatialRelOverlaps":case"esriSpatialRelWithin":case"esriSpatialRelTouches":case"esriSpatialRelCrosses":{let r=e.spatialFilter.geometry.extent;null!=r&&(t.extent=r.toJSON());break}}return{filterApplied:!0,spatialFilterApplied:!1,ordered:!1,features:await this._queryParquetStream(t,e.abortSignal)}}async _queryParquetStream(e,t){let r=new AbortController,a=await this._layer.source._queryStream(e,{signal:r.signal}),i=this._iterateParquetStream(a,r,t);return R.register(i,r,r),i}async*_iterateParquetStream(e,t,r){try{for(;;){let a=await this._layer.source._getStreamNextFeatures(e,{signal:t.signal});if(r.aborted&&(t.abort(),(0,y.dZ)(r)),null==a)break;(0,h.Rn)(a.features,a.spatialReference??this.spatialReference.toJSON()),yield a.features}}finally{R.unregister(t)}}async isEmpty(){return this._totalCount>=0?0===this._totalCount:(this._totalCount=await this._layer.queryFeatureCount(this._createQuery()),this._totalCount<=0)}async queryStat(e){await this._ensureLoaded();let t=(0,f.Dp)(e.stat);if("count"===t)return this._queryCount(e);let r=e.field;if(null==r)throw new y.dr("NeverReach");if(!0!==this._layer.capabilities?.query.supportsStatistics)return null!=e.spatialFilter||null!=e.where?{calculated:!1}:this._manualStat(e.stat,r,e.limit??1e3,e.abortSignal);if("distinct"===t)return{calculated:!1};if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:null};let a=this._createQuery();if(a.returnGeometry=!1,a.where=(0,g.mA)(a.where,e.where?(0,p.YY)(e.where,0):null),null!=e.spatialFilter){let t=(0,h.rj)(e.spatialFilter.relation);a.spatialRelationship=t.spatialRelationship,a.relationParameter=t.relationParameter,a.geometry=e.spatialFilter.geometry}let i=new v.A;i.statisticType=t,i.onStatisticField=(0,p.YY)(r,0);let l="ARCADE_STAT_RESULT";i.outStatisticFieldName=l,a.outStatistics=[i];let s=await this._layer.source.queryFeaturesJSON(a);if(s.features.length<=0)throw new y.dr("InvalidStatResponse");let n=s.features[0].attributes[l];return{calculated:!0,result:"esriFieldTypeDate"===s.fields?.find(e=>e.name===l)?.type&&null!=n?new Date(n):n}}async _queryCount(e){if(this.isTable()&&null!=e.spatialFilter)return{calculated:!0,result:0};let t=this._createQuery();if(t.where=(0,g.mA)(t.where,e.where?(0,p.YY)(e.where,0):null),null!=e.spatialFilter){let r=(0,h.rj)(e.spatialFilter.relation);t.spatialRelationship=r.spatialRelationship,t.relationParameter=r.relationParameter,t.geometry=e.spatialFilter.geometry}return t.returnGeometry=!1,{calculated:!0,result:await this._layer.queryFeatureCount(t)}}async canQueryAggregate(e){return await this._ensureLoaded(),!0===this._layer.capabilities?.query?.supportsStatistics&&null==e.spatialFilter}async queryAggregate(e){await this._ensureLoaded();let t=this._createQuery();return t.where=(0,g.mA)(t.where,e.where?(0,p.YY)(e.where,0):null),t.orderByFields=e.orderBy?.toOrderByFields(),t.outFields=["*"],t.outStatistics=e.statistics.map(e=>new v.A({onStatisticField:null===e.workingexpr?"":(0,p.YY)(e.workingexpr,0),outStatisticFieldName:e.field,statisticType:e.toStatisticsName()})),t.groupByFieldsForStatistics=e.groupBy,t.returnGeometry=!1,{filterApplied:!0,spatialFilterApplied:!0,ordered:null!=e.orderBy,features:async function*(){let r=await this._layer.source.queryFeaturesJSON(t);(0,y.dZ)(e.abortSignal);for(let e of(0,m.Ho)(r.features,this._maxQueryRate()))(0,h.Rn)(e,r.spatialReference??this.spatialReference.toJSON()),yield e}.apply(this)}}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}async queryAttachments(){return[]}serviceUrl(){return""}relationshipMetadata(){return[]}get gdbVersion(){return""}getFeatureByObjectId(){throw new y.dr("NeverReach")}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return null}get dateFieldsTimeZone(){return this._layer.dateFieldsTimeZone}get datesInUnknownTimezone(){return!1}get editFieldsInfo(){return null}get timeInfo(){return null}async getFeatureSetInfo(){let e=this._layer.title&&this._layer.parent;return{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}var q=r(26591);class M extends h.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerRelated",this._removeGeometry=!1,this._overrideFields=null,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),this._findObjectId=e.objectId,this.relationship=e.relationship,this._relatedLayer=e.relatedLayer,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return 1e3}async loadImpl(){return await Promise.all([this._layer.load(),this._relatedLayer.load()]),this._initialiseFeatureSet(),this}nativeCapabilities(){return this._relatedLayer.nativeCapabilities()}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._relatedLayer.geometryType,this.fields=this._relatedLayer.fields.slice(),this.hasZ=this._relatedLayer.hasZ,this.hasM=this._relatedLayer.hasM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{let e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}let e=this._layer.nativeCapabilities();e&&(this._databaseType=e.databaseType),this.objectIdField=this._relatedLayer.objectIdField,this.globalIdField=this._relatedLayer.globalIdField,this.hasM=this._relatedLayer.supportsM,this.hasZ=this._relatedLayer.supportsZ,this.typeIdField=this._relatedLayer.typeIdField,this.types=this._relatedLayer.types,this.subtypeField=this._relatedLayer.subtypeField,this.subtypes=this._relatedLayer.subtypes}async databaseType(){return this._databaseType=await this._relatedLayer.databaseType(),this._databaseType}isTable(){return this._relatedLayer.isTable()}async _queryAll(){return(await this.query({abortSignal:u._})).features}async query(e){if(await this._ensureLoaded(),await this.databaseType(),this.isTable()&&null!=e.spatialFilter)return h.An;let t=this._layer.nativeCapabilities();if(!1===t.canQueryRelated)return h.An;if(t.capabilities?.queryRelated.supportsPagination)return this._queryUsingPaging(t.source,e);let r=null,a=!1;null!=e.orderBy&&t.capabilities?.queryRelated.supportsOrderBy&&(r=e.orderBy.toOrderByFields(),a=!0);let i=new q.default;return i.objectIds=[this._findObjectId],i.outFields=null===this._overrideFields?this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]):this._overrideFields,i.relationshipId=this.relationship.id,i.where="1=1",i.returnGeometry=!0!==this._removeGeometry,i.outSpatialReference=this.spatialReference,i.orderByFields=r,{filterApplied:null==e.where,spatialFilterApplied:null==e.spatialFilter,ordered:a,features:async function*(){let r=await t.source.queryRelatedFeatures(i);(0,y.dZ)(e.abortSignal),yield r[this._findObjectId]?r[this._findObjectId].features:[]}.apply(this)}}async _queryUsingPaging(e,t){let r=null==t.where&&null==t.spatialFilter,a=null,i=!1,l=this._layer.nativeCapabilities();null!=t.orderBy&&(l.capabilities?.queryRelated.supportsOrderBy?(a=t.orderBy.toOrderByFields(),i=!0):r=!1),await this.databaseType();let s=this._maxQueryRate(),n=l.capabilities?.query.maxRecordCount;null!=n&&n<s&&(s=n);let u=new q.default;return u.relationshipId=this.relationship.id,u.objectIds=[this._findObjectId],u.outFields=null===this._overrideFields?this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map(e=>e.name):["*"]):this._overrideFields,u.where="1=1",u.orderByFields=a,u.returnGeometry=!0!==this._removeGeometry,u.outSpatialReference=this.spatialReference,{filterApplied:null==t.where,spatialFilterApplied:null==t.spatialFilter,ordered:i,features:this._queryPaginated(e,u,s,r?t.limit:null,t.abortSignal)}}async*_queryPaginated(e,t,r,a,i){let l;t.num=null==a?r:Math.min(a,r),t.start=0;do{(0,y.dZ)(i),l=(await e.queryRelatedFeatures(t))[this._findObjectId]??{exceededTransferLimit:!1,features:[]},yield l.features,t.start+=l.features.length,t.num=null==a?r:Math.min(a-t.start,r)}while(!0===l.exceededTransferLimit)}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new y.dr("NeverReach")}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];let t=e.slice();if(t.includes("*"))return t;let r=!1;for(let e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){r=!0;break}return r||t.push(this.objectIdField),t}get gdbVersion(){return this._relatedLayer.gdbVersion}relationshipMetadata(){return this._relatedLayer.relationshipMetadata()}serviceUrl(){return this._relatedLayer.serviceUrl()}queryAttachments(e,t,r,a,i){return this._relatedLayer.queryAttachments(e,t,r,a,i)}getFeatureByObjectId(e,t){return this._relatedLayer.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._relatedLayer.getOwningSystemUrl()}getIdentityUser(){return this._relatedLayer.getIdentityUser()}getDataSourceFeatureSet(){return this._relatedLayer}get preferredTimeZone(){return this._relatedLayer.preferredTimeZone??null}get dateFieldsTimeZone(){return this._relatedLayer.dateFieldsTimeZone??null}get datesInUnknownTimezone(){return this._relatedLayer.datesInUnknownTimezone}get editFieldsInfo(){return this._relatedLayer.editFieldsInfo??null}get timeInfo(){return this._relatedLayer.timeInfo??null}getFeatureSetInfo(){return this._relatedLayer.getFeatureSetInfo()}}var O=r(23732),k=r(92474),j=r(4146),D=r(99680),N=r(15584),x=r(80812);function Z(){null===O.A.applicationCache&&(O.A.applicationCache=new O.A)}async function U(e,t,r){if(O.A.applicationCache){let r=O.A.applicationCache.getLayerInfo(e);if(r){let a=await r;return new F.default({url:e,outFields:t,sourceJSON:a})}let a=new F.default({url:e,outFields:t}),i=(async()=>(await a.load(),a.sourceJSON))();if(O.A.applicationCache){O.A.applicationCache.setLayerInfo(e,i);try{return await i,a}catch(t){throw O.A.applicationCache.clearLayerInfo(e),t}}return await i,a}if(null!=r){let a=r.getCachedLayerMetadata(e);if(a){let r=await a;return new F.default({url:e,outFields:t,sourceJSON:r})}let i=new F.default({url:e,outFields:t}),l=(async()=>(await i.load(),i.sourceJSON))();r.setCachedLayerMetadata(e,l);try{return await l,i}catch(t){throw r.removeCachedLayerMetadata(e,l),t}}return new F.default({url:e,outFields:t})}async function E(e,t,r,a,i,l=null){return P(await U(e,["*"],i),t,r,a,i,l)}function P(e,t=null,r=null,a=!0,i=null,l=null){switch(e.type){case"catalog-footprint":return P(e.parent,t,r,a,i,l);case"subtype-sublayer":{let n=P(e.parent,t,r,a,i,l);return new s.A({parentfeatureset:n,whereclause:w.A.create(e.parent.subtypeField+"="+e.subtypeCode.toString(),{fieldsIndex:e.parent.fieldsIndex,timeZone:n.dateFieldsTimeZoneDefaultUTC})})}case"csv":case"geojson":case"knowledge-graph-sublayer":case"wfs":return new A.A({layer:e,spatialReference:t,outFields:r,includeGeometry:a,lrucache:i,interceptor:l});case"parquet":return new L({layer:e,spatialReference:t,outFields:r,includeGeometry:a});case"catalog":case"feature":case"oriented-imagery":case"subtype-group":{let s={layer:e,spatialReference:t,outFields:r,includeGeometry:a,lrucache:i,interceptor:l};return!e.url&&e.source?new A.A(s):new C(s)}default:throw Error(`Unsupported layer type: ${e.type}`)}}async function Q(e,t){if(null!==O.A.applicationCache){let t=O.A.applicationCache.getLayerInfo(e);if(null!==t)return t}if(null!=t){let r=t.getCachedServiceMetadata(e);if(null!=r)return r}let r=(async()=>{let t=await(0,a.A)(e,{responseType:"json",query:{f:"json"},authMode:"no-prompt"});if(t.data){let e=t.data;return e.layers||=[],e.tables||=[],e}return{layers:[],tables:[]}})();if(null!==O.A.applicationCache){O.A.applicationCache.setLayerInfo(e,r);try{return await r}catch(t){throw O.A.applicationCache.clearLayerInfo(e),t}}if(null!=t){t.setCachedServiceMetadata(e,r);try{return await r}catch(a){throw t.removeCachedServiceMetadata(e,r),a}}return r}async function B(e,t,r){let i={metadata:null,networkId:-1,unVersion:3,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map,queryelem:null,layerNameLkp:{},lkp:null},l=await Q(e,null);if(i.metadata=l,void 0!==l.controllerDatasetLayers?.utilityNetworkLayerId&&null!==l.controllerDatasetLayers.utilityNetworkLayerId){if(l.layers)for(let e of l.layers)i.layerNameLkp[e.id]=e.name;if(l.tables)for(let e of l.tables)i.layerNameLkp[e.id]=e.name;let n=l.controllerDatasetLayers.utilityNetworkLayerId;i.networkId=n;let u=await async function(e,t){let r="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==O.A.applicationCache){let e=O.A.applicationCache.getLayerInfo(r);if(null!==e)return e}let i=(async()=>{let r=await(0,a.A)(e+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([t.toString()]),f:"json"}});if(r.data){let e=r.data;if(e.layerDataElements?.[0])return e.layerDataElements[0]}throw new y.dr("DataElementsNotFound")})();if(null!==O.A.applicationCache){O.A.applicationCache.setLayerInfo(r,i);try{return await i}catch(e){throw O.A.applicationCache.clearLayerInfo(r),e}}return i}(e,n);if(u){i.queryelem=u,i.queryelem?.dataElement&&void 0!==i.queryelem.dataElement.schemaGeneration&&(i.unVersion=i.queryelem.dataElement.schemaGeneration),i.lkp={},i.queryelem.dataElement.domainNetworks||(i.queryelem.dataElement.domainNetworks=[]);for(let e of i.queryelem.dataElement.domainNetworks){for(let t of e.edgeSources??[]){let e={layerId:t.layerId,sourceId:t.sourceId,className:i.layerNameLkp[t.layerId]??null};i.layerIdLookup.set(e.layerId,e),i.sourceIdLookup.set(e.sourceId,e),e.className&&(i.lkp[e.className]=e)}for(let t of e.junctionSources??[]){let e={layerId:t.layerId,sourceId:t.sourceId,className:i.layerNameLkp[t.layerId]??null};i.layerIdLookup.set(e.layerId,e),i.sourceIdLookup.set(e.sourceId,e),e.className&&(i.lkp[e.className]=e)}}if(i.queryelem.dataElement.terminalConfigurations)for(let e of i.queryelem.dataElement.terminalConfigurations)for(let t of e.terminals)i.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});let l=await async function(e){if(null!==O.A.applicationCache){let t=O.A.applicationCache.getLayerInfo(e);if(null!==t)return t}let t=(async()=>{let t=await(0,a.A)(e,{responseType:"json",query:{f:"json"}});return t.data?t.data:null})();if(null!==O.A.applicationCache){O.A.applicationCache.setLayerInfo(e,t);try{return await t}catch(t){throw O.A.applicationCache.clearLayerInfo(e),t}}return t}(e+"/"+n);if(void 0!==l.systemLayers?.associationsTableId&&null!==l.systemLayers.associationsTableId){let a=null;if(r&&i.unVersion<8){let r=[];i.unVersion>=4&&(r.push("STATUS"),r.push("PERCENTALONG")),a=await E(e+"/"+l.systemLayers.associationsTableId,t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...r],!1,null,null),await a.load(),i.unVersion>=4&&(a=new s.A({parentfeatureset:a,whereclause:w.A.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62, 63)",{fieldsIndex:a.getFieldsIndex(),timeZone:a.dateFieldsTimeZoneDefaultUTC})}),await a.load())}return{lkp:i.lkp,associations:a,unVersion:i.unVersion,terminals:i.terminals,layerIdLookup:i.layerIdLookup,sourceIdLookup:i.sourceIdLookup}}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[],layerIdLookup:new Map,sourceIdLookup:new Map}}async function G(e,t,r,a=null,i=null,l=!0,s=null,n=null){let u=e.serviceUrl();if(!u)return null;u=u.endsWith("/")?u+t.relatedTableId.toString():u+"/"+t.relatedTableId.toString();let o=await E(u,a,i,l,s,n);return new M({layer:e,relatedLayer:o,relationship:t,objectId:r,spatialReference:a,outFields:i,includeGeometry:l,lrucache:s,interceptor:n})}class J extends i{constructor(e,t=null,r=null,a=null){super(),this._map=e,this._overrideSpatialReference=t,this._lrucache=r,this._interceptor=a,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,r=null){let a=P(e,this._overrideSpatialReference,null===r?["*"]:r,t,this._lrucache,this._interceptor);return this._instantLayers.push({featureset:a,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),a}async listAll(){(0,k.Zm)(this._map)&&!this._map.loaded&&await this._map.load();let e=this._map.allLayers.toArray().filter(e=>(0,c.eB)(e)).map(e=>({id:e.id,name:e.title})),t=this._map.allTables.toArray().filter(e=>(0,c.eB)(e)).map(e=>({id:e.id,name:e.title}));return e.concat(t)}async featureSetByName(e,t=!0,r=null){if((0,k.Zm)(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,r);null===r&&(r=["*"]),r=(r=r.slice()).sort();let a=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){let i=this._instantLayers[r];if(i.opitem.title===e&&i.includeGeometry===t&&i.outFields===a)return this._instantLayers[r].featureset}let i=this._map.allLayers.find(t=>(0,c.eB)(t)&&t.title===e);if(null!=i)return this._makeAndAddFeatureSet(i,t,r);if(this._map.allTables){let a=this._map.allTables.find(t=>(0,c.eB)(t)&&t.title===e);if(null!=a)return this._makeAndAddFeatureSet(a,t,r)}return null}async featureSetById(e,t=!0,r=["*"]){if((0,k.Zm)(this._map)&&!this._map.loaded)return await this._map.load(),this.featureSetById(e,t,r);null===r&&(r=["*"]),r=(r=r.slice()).sort();let a=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){let i=this._instantLayers[r];if(i.opitem.id===e&&i.includeGeometry===t&&i.outFields===a)return this._instantLayers[r].featureset}let i=this._map.allLayers.find(t=>(0,c.eB)(t)&&t.id===e);if(i)return this._makeAndAddFeatureSet(i,t,r);if(this._map.allTables){let a=this._map.allTables.find(t=>(0,c.eB)(t)&&t.id===e);if(null!=a)return this._makeAndAddFeatureSet(a,t,r)}return null}}class Y extends i{constructor(e,t=null,r=null,a=null){super(),this._url=e,this._overrideSpatialReference=t,this._lrucache=r,this._interceptor=a,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,r=null){let a=P(e,this._overrideSpatialReference,null===r?["*"]:r,t,this._lrucache);return this._instantLayers.push({featureset:a,opitem:e,includeGeometry:t,outFields:JSON.stringify(r)}),a}async _loadMetaData(){let e=await Q(this._url,this._lrucache);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new Y(this._url,this._overrideSpatialReference,this._lrucache,this._interceptor)}async listAll(){let e=await this._loadMetaData();return e.layers.concat(e.tables)}async featureSetByName(e,t=!0,r=null){null===r&&(r=["*"]),r=(r=r.slice()).sort();let a=JSON.stringify(r);for(let r=0;r<this._instantLayers.length;r++){let i=this._instantLayers[r];if(i.opitem.title===e&&i.includeGeometry===t&&i.outFields===a)return this._instantLayers[r].featureset}let i=await this._loadMetaData(),l=null;for(let t of i.layers??[])t.name===e&&(l=t);if(!l)for(let t of i.tables??[])t.name===e&&(l=t);if(l){let e=await U(this._url+"/"+l.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,r)}return null}async featureSetById(e,t=!0,r=["*"]){null===r&&(r=["*"]),r=(r=r.slice()).sort();let a=JSON.stringify(r);e=null==e?"":e.toString();for(let r=0;r<this._instantLayers.length;r++){let i=this._instantLayers[r];if(i.opitem.id===e&&i.includeGeometry===t&&i.outFields===a)return this._instantLayers[r].featureset}let i=await this._loadMetaData(),l=null;for(let t of i.layers??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(l=t);if(!l)for(let t of i.tables??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(l=t);if(l){let e=await U(this._url+"/"+l.id,["*"],this._lrucache);return this._makeAndAddFeatureSet(e,t,r)}return null}}function V(e,t,r=null,a=null){return new J(e,t,r,a)}function K(e,t,r=null,a=null){return new Y(e,t,r,a)}function $(e,t,r,a,i){if(null===e)return null;if((0,l.k)(e)){switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}if(e instanceof j.A&&(0,c.eB)(e)){switch(t){case"datasource":return P(e,i,"outFields"in e?e.outFields:null,!0,r,a).getDataSourceFeatureSet();case"parent":case"root":return P(e,i,"outFields"in e?e.outFields:null,!0,r,a)}return null}if((0,l.a4)(e)){switch(t){case"datasource":return P(e.parent,i,e.parent.outFields,!0,r,a).getDataSourceFeatureSet();case"parent":case"root":return P(e,i,e.parent.outFields,!0,r,a)}return null}return null}async function z(e,t,r,a,i,l,s,n=null){if(O.A.applicationCache){let u=O.A.applicationCache.getLayerInfo(e+":"+l.url);if(u)return H(await u,t,r,a,i,s,n)}if(null!=s){let u=s.getCachedPortalItem(l.url,e);if(null!=u)return await H(await u,t,r,a,i,s,n)}let u=new x.default({id:e,portal:l}).load();O.A.applicationCache?O.A.applicationCache.setLayerInfo(e+":"+l.url,u):s?.setCachedPortalItem(l.url,e,u);try{return await H(await u,t,r,a,i,s,n)}catch(t){throw O.A.applicationCache&&O.A.applicationCache.clearLayerInfo(e+":"+l.url),s?.removeCachedPortalItem(l.url,e,u),t}}const W=new Set(["Apache Parquet","Parquet layer","Parquet Layer","Parquet feature layer","Parquet Feature Layer"]);async function H(e,t,r,a,i,l,s){let n;if("Feature Service"===e.type||"Map Service"===e.type)n=await U((0,c.Qi)(e.url??"")+"/"+t,["*"],l);else{if(t)throw Error(`layerId=${t} provided for ${e.type} item`);if(null!=l){let t=l.getCachedPortalItemLayer(e.portal.url,e.id);if(null!=t)n=await t;else{let t=W.has(e.type)?Promise.resolve(new D.default({data:new N.A({portalItem:e})})):j.A.fromPortalItem(e);l.setCachedPortalItemLayer(e.portal.url,e.id,t);try{n=await t}catch(r){throw l.removeCachedPortalItemLayer(e.portal.url,e.id,t),r}}}else n=W.has(e.type)?new D.default({data:new N.A({portalItem:e})}):await j.A.fromPortalItem(e)}return P(n,r,a,i,l,s)}},35704(e,t,r){r.d(t,{A:()=>u});var a=r(48938),i=r(87449),l=r(11221),s=(r(33325),r(80609)),n=r(89696);class u extends l.t1{constructor(e){super(),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof n.A?(this._whereClause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereClause=null)}_initialiseFeatureSet(){this.fields=this._parent.fields.slice(),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes}async _queryAll(){return(await this.query({abortSignal:a._})).features}async query(e){let t=e.where,r=!0;null===this._whereClauseFunction?null==t?t=this._whereClause:null!==this._whereClause&&(t=(0,s.kg)(this._whereClause,t)):r=!1,await this._ensureLoaded();let a=await this._parent.query({...e,where:t,limit:r?e.limit:null});return(0,i.dZ)(e.abortSignal),a.filterApplied&&null==this._whereClauseFunction?a:{...a,features:this._applyFilter(a.features,e.abortSignal)}}async*_applyFilter(e,t){for await(let r of e)if((0,i.dZ)(t),null!=this._whereClause){let e=r.filter(e=>this._whereClause.testFeature(e));e.length>0&&(yield e)}else if(null!=this._whereClauseFunction){let e=[];for(let t of r)await this._whereClauseFunction(t)&&e.push(t);e.length>0&&(yield e)}else yield r}async queryStat(e){if(null!==this._whereClauseFunction)return null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??1e3,e.abortSignal):{calculated:!1};let t=this._whereClause;null!=e.where&&null!==this._whereClause&&(t=(0,s.kg)(this._whereClause,e.where));let r=await this._parent.queryStat({...e,where:t});return r.calculated?r:null==e.where&&null==e.spatialFilter?this._manualStat(e.stat,e.field,e.limit??1e3,e.abortSignal):{calculated:!1}}async canQueryAggregate(e){if(null!==this._whereClauseFunction)return!1;let t=e.where;return null==t?t=this._whereClause:null!==this._whereClause&&(t=(0,s.kg)(this._whereClause,t)),this._parent.canQueryAggregate({...e,where:t})}async queryAggregate(e){let t=e.where;return null==t?t=this._whereClause:null!==this._whereClause&&(t=(0,s.kg)(this._whereClause,t)),this._parent.queryAggregate({...e,where:t})}getFieldsIndex(){return this._parent.getFieldsIndex()}}},30235(e,t,r){r.d(t,{A:()=>c});var a=r(48938),i=r(87449),l=r(11221),s=(r(33325),r(80609)),n=r(4576),u=r(39516),o=r(91075),d=r(18589),y=r(33143),h=r(20437);class c extends l.Jn{constructor(e){super(),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerMemory",this._removeGeometry=!1,this._overrideFields=null,this._forceIsTable=!1,this._maxProcessing=1e3,this._layer=e.layer,e.spatialReference&&(this.spatialReference=e.spatialReference),!0===e.isTable&&(this._forceIsTable=!0),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return 1e3}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}get gdbVersion(){return""}_initialiseFeatureSet(){if(this.spatialReference??=this._layer.spatialReference,this.geometryType=this._layer.geometryType??"",this.fields=this._layer.fields.slice(),null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{let e=new Set(this._overrideFields.map(e=>e.toLowerCase()));this.fields=this.fields.filter(({type:t,name:r})=>"oid"===t||this._layer.objectIdField===r||e.has(r.toLowerCase())),this._overrideFields=this.fields.map(({name:e})=>e)}this.objectIdField=this._layer.objectIdField;for(let e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this._databaseType=0,this.hasZ=!0===this._layer.capabilities?.data?.supportsZ,this.hasM=!0===this._layer.capabilities?.data?.supportsM,this.subtypeField=("subtypeField"in this._layer?this._layer.subtypeField:null)??"",this.subtypes="subtypes"in this._layer?this._layer.subtypes:null,this.typeIdField=("typeIdField"in this._layer?this._layer.typeIdField:null)??"",this.types="types"in this._layer?this._layer.types:null}isTable(){return this._forceIsTable||"isTable"in this._layer&&this._layer.isTable||"table"===this._layer.type||!this._layer.geometryType}async _queryAll(){return(await this.query({abortSignal:a._})).features}_queryLayerFeaturesJSON(e){return"queryFeaturesJSON"in this._layer?this._layer.queryFeaturesJSON(e):this._layer.source.queryFeaturesJSON(e)}async query(e){await this._ensureLoaded();let t=null,r=!1;if(null!=e.orderBy&&(t=e.orderBy.toOrderByFields(),r=!0),this.isTable()&&null!=e.spatialFilter)return l.An;let a=this._createQuery();return a.where=(0,u.mA)(a.where,null==e.where?null==e.spatialFilter?"1=1":"":(0,s.YY)(e.where,0)),null!=e.spatialFilter&&(a.spatialRelationship=this._makeRelationshipEnum(e.spatialFilter.relation),a.relationParameter=this._makeRelationshipParam(e.spatialFilter.relation),a.geometry=e.spatialFilter.geometry),a.outSpatialReference=this.spatialReference,a.orderByFields=t,a.num=e.limit,{filterApplied:!0,spatialFilterApplied:!0,ordered:r,features:async function*(){let t=await this._queryLayerFeaturesJSON(a);(0,i.dZ)(e.abortSignal);for(let e of(0,n.Ho)(t.features,this._maxQueryRate()))(0,l.Rn)(e,t.spatialReference??this.spatialReference.toJSON()),yield e}.apply(this)}}async queryStat(e){return{calculated:!1}}async canQueryAggregate(e){return!1}async queryAggregate(e){throw new i.dr("NeverReach")}_createQuery(){let e=this._layer.createQuery();return e.returnZ=this.hasZ,e.returnM=this.hasM,e.outFields=this._overrideFields??["*"],e.returnGeometry=!this._removeGeometry,e}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}relationshipMetadata(){return[]}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}static create(e,t){let r=e.layerDefinition.objectIdField,a=e.layerDefinition.typeIdField??"",i=[];if(e.layerDefinition.types)for(let t of e.layerDefinition.types)i.push(y.A.fromJSON(t));let l=e.layerDefinition.geometryType;void 0===l&&(l=e.featureSet.geometryType||"");let s=e.featureSet.features;if(!r){let t=!1;for(let a of e.layerDefinition.fields)if("oid"===a.type||"esriFieldTypeOID"===a.type){r=a.name,t=!0;break}if(!1===t){let t="FID",a=!0,i=0;for(;a;){let r=!0;for(let a of e.layerDefinition.fields)if(a.name===t){r=!1;break}!0===r?a=!1:(i++,t="FID"+i.toString())}e.layerDefinition.fields.push({type:"esriFieldTypeOID",name:t,alias:t});let l=[];for(let r=0;r<s.length;r++)l.push({geometry:e.featureSet.features[r].geometry,attributes:{...e.featureSet.features[r].attributes,[t]:r}});s=l,r=t}}let n=[];for(let t of e.layerDefinition.fields)t instanceof h.A?n.push(t):n.push(h.A.fromJSON(t));let u=l;switch(u||="",u){case"esriGeometryPoint":u="point";break;case"esriGeometryPolyline":u="polyline";break;case"esriGeometryPolygon":u="polygon";break;case"esriGeometryEnvelope":u="extent";break;case"esriGeometryMultipoint":u="multipoint";break;case"":case"esriGeometryNull":u="esriGeometryNull"}if("esriGeometryNull"!==u){let e=t.toJSON();for(let t of s)t.geometry&&!(t.geometry instanceof o.A)&&(t.geometry.type=u,void 0===t.geometry.spatialReference&&(t.geometry.spatialReference=e))}else for(let e of s)e.geometry&&=null;let p={outFields:["*"],source:s,fields:n,hasZ:!0===e.layerDefinition.hasZ||!0===e.featureSet.hasZ,hasM:!0===e.layerDefinition.hasM||!0===e.featureSet.hasM,types:i,typeIdField:a,objectIdField:r,spatialReference:t},f="esriGeometryNull"===u||null===u;f||(p.geometryType=u);let m=new d.default(p);return e.layerDefinition.subtypeField&&e.layerDefinition.subtypes&&m.read({subtypes:e.layerDefinition.subtypes,subtypeField:e.layerDefinition.subtypeField}),new c({layer:m,spatialReference:t,isTable:f})}async queryAttachments(){return[]}async getFeatureByObjectId(e){let t=this._createQuery();t.where=this.objectIdField+"="+e.toString();let r=await this._queryLayerFeaturesJSON(t);return 1===r.features.length?((0,l.Rn)(r.features,r.spatialReference??this.spatialReference.toJSON()),r.features[0]):null}serviceUrl(){return""}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeZone(){return"preferredTimeZone"in this._layer?this._layer.preferredTimeZone:null}get dateFieldsTimeZone(){return"dateFieldsTimeZone"in this._layer?this._layer.dateFieldsTimeZone:null}get datesInUnknownTimezone(){return"datesInUnknownTimezone"in this._layer&&this._layer.datesInUnknownTimezone}get editFieldsInfo(){return"editFieldsInfo"in this._layer?this._layer.editFieldsInfo:null}get timeInfo(){return"timeInfo"in this._layer?this._layer.timeInfo:null}async getFeatureSetInfo(){let e=this._layer.title&&this._layer.parent;return{layerId:null,layerName:null,itemId:null,serviceLayerUrl:null,webMapLayerId:e?this._layer.id??null:null,webMapLayerTitle:e?this._layer.title??null:null,className:null,objectClassId:null}}}},88930(e,t,r){r.d(t,{S1:()=>n,VW:()=>u,lL:()=>o,rb:()=>d,t:()=>y});var a=r(97770),i=(r(98623),r(34747));const l=/^(?<hh>([01][0-9])|(2[0-3])):(?<mm>[0-5][0-9])(:(?<ss>[0-5][0-9]))?(\.(?<ms>\d+))?$/,s={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8,unknown:NaN};function n(e,t,r,l="system"){if("unknown"===r)return e;let s=new i.oh((0,a.wj)(l)),n=i.c9.fromJSDate(e,{zone:s}),u="decades"===r||"centuries"===r?"year":function(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}(r);return"decades"===r&&(t*=10),"centuries"===r&&(t*=100),n.plus({[u]:t}).toJSDate()}function u(e,t,r="milliseconds"){let a=e.getTime(),i=y(t,r,"milliseconds");return new Date(a+i)}function o(e,t,r="system"){let{unit:l}=t,s=Math.max(1,Math.trunc(t.value)),n=new i.oh((0,a.wj)(r)),u=i.c9.fromJSDate(e,{zone:n}),o=e=>e-e%s;switch(l){case"milliseconds":return u.startOf("second").plus({millisecond:o(u.millisecond)}).toJSDate();case"seconds":return u.startOf("minute").plus({second:o(u.second)}).toJSDate();case"minutes":return u.startOf("hour").plus({minute:o(u.minute)}).toJSDate();case"hours":return u.startOf("day").plus({hour:o(u.hour)}).toJSDate();case"days":return u.startOf("month").plus({day:o(u.day-1)}).toJSDate();case"weeks":{let e=u.startOf("year").startOf("week"),t=Math.floor(u.diff(e,"weeks").weeks);return e.plus({week:o(t)}).toJSDate()}case"months":return u.startOf("year").plus({month:o(u.month-1)}).toJSDate();case"years":case"decades":case"centuries":{let e=u.startOf("year"),t=("decades"===l?10:"centuries"===l?100:1)*s,r=e.year-e.year%t;return e.set({year:r}).toJSDate()}case"unknown":return e}}function d(e){let t=l.exec(e);if(!t)return null;let{hh:r,mm:a,ss:i,ms:n}=t.groups;return Number(r)*s.hours+Number(a)*s.minutes+Number(i||0)*s.seconds+Number(n||0)}function y(e,t,r){return 0===e?0:e*s[t]/s[r]}},4146(e,t,r){r.d(t,{A:()=>g});var a=r(32198),i=r(56507),l=r(49186),s=r(65529),n=r(4902),u=r(92474),o=r(53966),d=r(17676),y=r(84952),h=r(91429),c=r(5443),p=r(16930),f=r(92602),m=r(79677);let _=0,g=class extends((0,s.Zt)((0,n.s)(u.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new c.A(-180,-90,180,90,p.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+_++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=p.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){let t="string"==typeof e?{url:e}:e;return(await Promise.all([r.e(812),r.e(7982)]).then(()=>r(27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){let t="portalItem"in e?e:{portalItem:e},{fromItem:a}=await Promise.all([r.e(9917),r.e(812),r.e(5613)]).then(()=>r(45613));try{return await a(t)}catch(e){let r=t?.portalItem,a=r?.id||"unset",i=r?.portal?.url||f.A.portalUrl;throw o.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+a+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,d.zf)(e)||o.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){let{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){let{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,y.An)(this.url)}createLayerView(e,t){return Promise.reject(new l.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){let e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,i.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new l.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,a.Cg)([(0,h.MZ)({type:String})],g.prototype,"attributionDataUrl",void 0),(0,a.Cg)([(0,h.MZ)({readOnly:!0})],g.prototype,"effectiveVisible",null),(0,a.Cg)([(0,h.MZ)({type:c.A})],g.prototype,"fullExtent",void 0),(0,a.Cg)([(0,h.MZ)({readOnly:!0})],g.prototype,"hasAttributionData",null),(0,a.Cg)([(0,h.MZ)({type:String,clonable:!1})],g.prototype,"id",void 0),(0,a.Cg)([(0,h.MZ)({type:Boolean,nonNullable:!0})],g.prototype,"legendEnabled",void 0),(0,a.Cg)([(0,h.MZ)({type:["show","hide","hide-children"]})],g.prototype,"listMode",void 0),(0,a.Cg)([(0,h.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],g.prototype,"opacity",void 0),(0,a.Cg)([(0,h.MZ)({clonable:!1})],g.prototype,"parent",void 0),(0,a.Cg)([(0,h.MZ)({readOnly:!0})],g.prototype,"parsedUrl",null),(0,a.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],g.prototype,"persistenceEnabled",void 0),(0,a.Cg)([(0,h.MZ)({type:Boolean})],g.prototype,"popupEnabled",void 0),(0,a.Cg)([(0,h.MZ)({type:Boolean})],g.prototype,"attributionVisible",void 0),(0,a.Cg)([(0,h.MZ)({type:p.A})],g.prototype,"spatialReference",void 0),(0,a.Cg)([(0,h.MZ)({type:String})],g.prototype,"title",void 0),(0,a.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],g.prototype,"type",void 0),(0,a.Cg)([(0,h.MZ)()],g.prototype,"url",void 0),(0,a.Cg)([(0,h.MZ)({type:m.A})],g.prototype,"visibilityTimeExtent",void 0),(0,a.Cg)([(0,h.MZ)({type:Boolean,nonNullable:!0})],g.prototype,"visible",void 0),g=(0,a.Cg)([(0,h.$K)("esri.layers.Layer")],g)},52136(e,t,r){var a=r(32198),i=r(91429);r.d(t,["p",0,e=>{let t=e,r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null==e?(this._clearOverride("apiKey"),this.clear("apiKey","user")):this._override("apiKey",e)}};return(0,a.Cg)([(0,i.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,a.Cg)([(0,i.$K)("esri.layers.mixins.APIKeyMixin")],r),r}])},28032(e,t,r){r.d(t,{A:()=>u});var a=r(32198),i=r(69540),l=r(25482),s=r(91429),n=r(56400);let u=class extends((0,i.OU)(l.o)){constructor(e){super(e),this.creatorField=null,this.creationDateField=null,this.editorField=null,this.editDateField=null,this.realm=null,this.timeZone=null}};(0,a.Cg)([(0,s.MZ)()],u.prototype,"creatorField",void 0),(0,a.Cg)([(0,s.MZ)()],u.prototype,"creationDateField",void 0),(0,a.Cg)([(0,s.MZ)()],u.prototype,"editorField",void 0),(0,a.Cg)([(0,s.MZ)()],u.prototype,"editDateField",void 0),(0,a.Cg)([(0,s.MZ)()],u.prototype,"realm",void 0),(0,a.Cg)([(0,s.MZ)((0,n.P6)("dateFieldsTimeReference",!0))],u.prototype,"timeZone",void 0),u=(0,a.Cg)([(0,s.$K)("esri.layers.support.EditFieldsInfo")],u)},33143(e,t,r){r.d(t,{A:()=>y});var a=r(32198),i=r(69540),l=r(25482),s=r(91429),n=r(8631),u=r(29005),o=r(36005),d=r(43937);let y=class extends((0,i.OU)(l.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){let t={};for(let r of Object.keys(e))t[r]=(0,n.r)(e[r]);return t}writeDomains(e,t){let r={};for(let t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,a.Cg)([(0,s.MZ)({json:{write:!0}})],y.prototype,"id",void 0),(0,a.Cg)([(0,s.MZ)({json:{write:!0}})],y.prototype,"name",void 0),(0,a.Cg)([(0,s.MZ)({json:{write:!0}})],y.prototype,"domains",void 0),(0,a.Cg)([(0,o.w)("domains")],y.prototype,"readDomains",null),(0,a.Cg)([(0,d.K)("domains")],y.prototype,"writeDomains",null),(0,a.Cg)([(0,s.MZ)({type:[u.A],json:{write:!0}})],y.prototype,"templates",void 0),y=(0,a.Cg)([(0,s.$K)("esri.layers.support.FeatureType")],y)},37352(e,t,r){r.d(t,{A:()=>u});var a,i=r(32198),l=r(7762),s=r(25482),n=r(91429);let u=a=class extends s.o{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new l.A}clone(){return new a({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,i.Cg)([(0,n.MZ)({type:String,json:{write:{isRequired:!0}}})],u.prototype,"floorField",void 0),(0,i.Cg)([(0,n.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,i.Cg)([(0,n.MZ)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=a=(0,i.Cg)([(0,n.$K)("esri.layers.support.LayerFloorInfo")],u)},45067(e,t,r){r.d(t,{A:()=>d});var a=r(32198),i=r(69540),l=r(66552),s=r(25482),n=r(91429);const u=new l.J({esriRelCardinalityOneToOne:"one-to-one",esriRelCardinalityOneToMany:"one-to-many",esriRelCardinalityManyToMany:"many-to-many"}),o=new l.J({esriRelRoleOrigin:"origin",esriRelRoleDestination:"destination"});let d=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.cardinality=null,this.catalogId=null,this.composite=null,this.id=null,this.keyField=null,this.keyFieldInRelationshipTable=null,this.name=null,this.relatedTableId=null,this.relationshipTableId=null,this.role=null}};(0,a.Cg)([(0,n.MZ)({json:{read:u.read,write:u.write}})],d.prototype,"cardinality",void 0),(0,a.Cg)([(0,n.MZ)({json:{name:"catalogID"}})],d.prototype,"catalogId",void 0),(0,a.Cg)([(0,n.MZ)({json:{read:!0,write:!0}})],d.prototype,"composite",void 0),(0,a.Cg)([(0,n.MZ)({json:{read:!0,write:!0}})],d.prototype,"id",void 0),(0,a.Cg)([(0,n.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyField",void 0),(0,a.Cg)([(0,n.MZ)({json:{read:!0,write:!0}})],d.prototype,"keyFieldInRelationshipTable",void 0),(0,a.Cg)([(0,n.MZ)({json:{read:!0,write:!0}})],d.prototype,"name",void 0),(0,a.Cg)([(0,n.MZ)({json:{read:!0,write:!0}})],d.prototype,"relatedTableId",void 0),(0,a.Cg)([(0,n.MZ)({json:{read:!0,write:!0}})],d.prototype,"relationshipTableId",void 0),(0,a.Cg)([(0,n.MZ)({json:{read:o.read,write:o.write}})],d.prototype,"role",void 0),d=(0,a.Cg)([(0,n.$K)("esri.layers.support.Relationship")],d)},77548(e,t,r){r.d(t,{Gh:()=>M,tk:()=>C,BR:()=>T,p2:()=>I,qd:()=>A,wI:()=>v,G$:()=>L,$x:()=>R,Ov:()=>w,cM:()=>h,UC:()=>c,Qz:()=>p,OP:()=>q,TU:()=>g,F2:()=>f,XX:()=>_,Qi:()=>F,jy:()=>b});var a=r(70333),i=r(56507),l=r(7762),s=(r(84952),r(36563)),n=r(36708),u=r(4146);const o=new WeakMap;function d(e){return!e.destroyed&&(o.has(e)||e.addHandles([(0,n.wB)(()=>{let{parent:t}=e;return!!(t&&t instanceof u.A)&&("catalog-dynamic-group"===t.type||d(t))},t=>o.set(e,t),n.pc),(0,s.hA)(()=>o.delete(e))]),o.get(e))}function y(e,t){return"object"==typeof e&&!!e&&"type"in e&&e.type===t}function h(e){return y(e,"knowledge-graph")&&"layers"in e}function c(e){return y(e,"knowledge-graph-sublayer")}function p(e){return y(e,"link-chart")&&"layers"in e}function f(e){return y(e,"subtype-group")&&"sublayers"in e}function m(e){let t=e.parent;return function(e){return"group"===e?.type}(t)&&t.tables.includes(e)}r(16215);const _={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function g(e){let t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function w(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function F(e){return"object"==typeof e&&!!e&&"featureReduction"in e}function b(e){return function(e){return y(e,"catalog-footprint")}(e)||function(e){return y(e,"feature")}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)||function(e){return y(e,"oriented-imagery")}(e)||function(e){return"subtype-sublayer"===e?.type}(e)}function S(e){let t=e?.type;return"binning"===t||"cluster"===t}function I(e,t){if(!b(e))return;let r=t?.graphic,a="featureReduction"in e?e.featureReduction:null;if(r){if(r.isAggregate){let e=r.origin;return e&&"featureReductionProvider"in e&&a?S(a)?a:null:void 0}return e}return t?.checkFeatureReduction&&a?S(a)?a:null:e}async function v(e,t){let r=a.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;let l=e.toLowerCase().indexOf("/rest/services");if(-1===l)return null;let s=`${e.slice(0,l)}/rest/info`,n=null==t?null:t.signal,{data:u}=await(0,i.A)(s,{query:{f:"json"},responseType:"json",signal:n});return u?.owningSystemUrl||null}function T(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"annotation-feature":case"catalog":case"catalog-footprint":case"csv":case"dimension-feature":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"parquet":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function C(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function A(e){let t=new l.A;for(let r of e.allLayers.concat(e.allTables))d(r)||m(r)||"annotation-feature"===r.type||"dimension-feature"===r.type||("charts"in r&&t.push(r),"subtype-group"===r.type&&t.push(...r.sublayers));return t}function R(e,t){return null}function L(e){return null}function q(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function M(e,t){if(!t||!q(e))return;let r=(e.url,null);r&&(e.url=r)}},73133(e,t,r){const a=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:"unknown"});r.d(t,["j",0,a])},10536(e,t,r){function a(e){let t={};for(let r in e){if("declaredClass"===r)continue;let i=e[r];if(null!=i&&"function"!=typeof i)if(Array.isArray(i)){t[r]=[];for(let e=0;e<i.length;e++)t[r][e]=a(i[e])}else"object"==typeof i?i.toJSON&&(t[r]=JSON.stringify(i)):t[r]=i}return t}r.d(t,{z:()=>a})},17126(e,t,r){r.d(t,{dw:()=>s,qD:()=>n,qW:()=>u});var a=r(56507),i=r(21325),l=r(10536);function s(e,t){let r=e.toJSON();return r.objectIds&&=r.objectIds.join(","),r.orderByFields&&=r.orderByFields.join(","),r.outFields&&!t?.returnCountOnly?r.outFields=r.outFields.includes("*")?"*":r.outFields.join(","):delete r.outFields,r.outSR&&=(0,i.YX)(r.outSR),r.dynamicDataSource&&(r.layer=JSON.stringify({source:r.dynamicDataSource}),delete r.dynamicDataSource),r}async function n(e,t,r){let a=await o(e,t,r),i=a.data,l=i.geometryType,s=i.spatialReference,n={};for(let e of i.relatedRecordGroups){let t={fields:void 0,geometryType:l,spatialReference:s,hasZ:!!i.hasZ,hasM:!!i.hasM,features:e.relatedRecords};if(null!=e.objectId)n[e.objectId]=t;else for(let r of Object.keys(e))"relatedRecords"!==r&&(n[e[r]]=t)}return{...a,data:n}}async function u(e,t,r){let a=await o(e,t,r,{returnCountOnly:!0}),i=a.data,l={};for(let e of i.relatedRecordGroups)null!=e.objectId&&(l[e.objectId]=e.count);return{...a,data:l}}async function o(e,t,r={},i){let n=(0,l.z)({...e.query,f:"json",...i,...s(t,i)});return(0,a.A)(e.path+"/queryRelatedRecords",{...r,query:{...r.query,...n}})}},16215(e,t,r){r.d(t,{S:()=>i});const a=Symbol("BasemapInstance");function i(e){return"object"==typeof e&&!!e&&a in e}r.d(t,["Y",0,a])},79677(e,t,r){r.d(t,{A:()=>y});var a,i=r(32198),l=r(25482),s=r(88930),n=r(91429),u=(r(98623),r(10184)),o=r(36005),d=r(43937);let y=class extends l.o{static{a=this}static get allTime(){return h}static get empty(){return c}static fromArray(e){return new a({start:null==e[0]?e[0]:new Date(e[0]),end:null==e[1]?e[1]:new Date(e[1])})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null==t.end?null:new Date(t.end)}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(a.allTime)}get isEmpty(){return this.equals(a.empty)}readStart(e,t){return null==t.start?null:new Date(t.start)}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new a({end:this.end,start:this.start})}equals(e){if(!e)return!1;let t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,a=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===a&&r===i}expandTo(e,t="system"){if(this.isEmpty||this.isAllTime||"unknown"===e)return this.clone();let r=this.start;r&&=(0,s.lL)(r,new u.A({value:1,unit:e}),t);let i=this.end;if(i){let r=(0,s.lL)(i,new u.A({value:1,unit:e}),t);i=i.getTime()===r.getTime()?r:(0,s.S1)(r,1,e,t)}return new a({start:r,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return a.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();let t,r,i=this.start?.getTime()??-1/0,l=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;return s>=i&&s<=l?t=s:i>=s&&i<=n&&(t=i),l>=s&&l<=n?r=l:n>=i&&n<=l&&(r=n),null==t||null==r||isNaN(t)||isNaN(r)?a.empty:new a({start:t===-1/0?null:new Date(t),end:r===1/0?null:new Date(r)})}offset(e,t,r="system"){if(this.isEmpty||this.isAllTime||"unknown"===t)return this.clone();let i=new a,{start:l,end:n}=this;return null!=l&&(i.start=(0,s.S1)(l,e,t,r)),null!=n&&(i.end=(0,s.S1)(n,e,t,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();let t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new a({start:t,end:r})}};(0,i.Cg)([(0,n.MZ)({type:Date,json:{write:{allowNull:!0}}})],y.prototype,"end",void 0),(0,i.Cg)([(0,o.w)("end")],y.prototype,"readEnd",null),(0,i.Cg)([(0,d.K)("end")],y.prototype,"writeEnd",null),(0,i.Cg)([(0,n.MZ)({readOnly:!0,json:{read:!1}})],y.prototype,"isAllTime",null),(0,i.Cg)([(0,n.MZ)({readOnly:!0,json:{read:!1}})],y.prototype,"isEmpty",null),(0,i.Cg)([(0,n.MZ)({type:Date,json:{write:{allowNull:!0}}})],y.prototype,"start",void 0),(0,i.Cg)([(0,o.w)("start")],y.prototype,"readStart",null),(0,i.Cg)([(0,d.K)("start")],y.prototype,"writeStart",null),y=a=(0,i.Cg)([(0,n.$K)("esri.time.TimeExtent")],y);const h=new y,c=new y({start:void 0,end:void 0})},10184(e,t,r){r.d(t,{A:()=>d});var a=r(32198),i=r(69540),l=r(25482),s=r(88930),n=r(91429),u=r(73133),o=r(93223);let d=class extends((0,i.OU)(l.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,s.t)(this.value,this.unit,"milliseconds")}};(0,a.Cg)([(0,o.e)(u.j,{nonNullable:!0})],d.prototype,"unit",void 0),(0,a.Cg)([(0,n.MZ)({type:Number,json:{write:!0},nonNullable:!0})],d.prototype,"value",void 0),d=(0,a.Cg)([(0,n.$K)("esri.time.TimeInterval")],d)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4019,4059,6440],{51470(e,t,n){n.d(t,{a:()=>k});var a=n(74059),s=n(64209);const o=(0,a.aK)((e,t)=>{t.onConnected(()=>{m(e)}),t.onDisconnected(()=>{!function(e){if(!e)return;if(p.delete(e),document.removeEventListener(i,u.get(e)),document.removeEventListener(c,b.get(e)),u.delete(e),b.delete(e),!e.labelEl)return;const t=d.get(e.labelEl);1===t.length&&(e.labelEl.removeEventListener(l,h.get(e.labelEl)),h.delete(e.labelEl)),d.set(e.labelEl,t.filter(t=>t!==e).sort(g)),e.labelEl=void 0}(e)})}),l="calciteInternalLabelClick",i="calciteInternalLabelConnected",c="calciteInternalLabelDisconnected",r="calcite-label",d=new WeakMap,h=new WeakMap,u=new WeakMap,b=new WeakMap,p=new Set;function m(e){if(!e)return;const t=(e=>{const{id:t}=e,n=t&&(0,s.q)(e,{selector:`${r}[for="${t}"]`});if(n)return n;const a=(0,s.c)(e,r);return!a||function(e,t){let n;const a="custom-element-ancestor-check",s=a=>{a.stopImmediatePropagation();const s=a.composedPath();n=s.slice(s.indexOf(t),s.indexOf(e))};return e.addEventListener(a,s,{once:!0}),t.dispatchEvent(new CustomEvent(a,{composed:!0,bubbles:!0})),e.removeEventListener(a,s),n.filter(n=>n!==t&&n!==e).filter(e=>e.tagName?.includes("-")).length>0}(a,e)?null:a})(e.el);if(t&&h.has(t)&&t===e.labelEl||!t&&p.has(e))return;const n=y.bind(e);if(t){e.labelEl=t;const a=d.get(t)||[];a.push(e),d.set(t,a.sort(g)),h.has(e.labelEl)||(h.set(e.labelEl,v),e.labelEl.addEventListener(l,v)),p.delete(e),document.removeEventListener(i,u.get(e)),b.set(e,n),document.addEventListener(c,n)}else p.has(e)||(n(),document.removeEventListener(c,b.get(e)))}function g(e,t){return(0,s.i)(e.el,t.el)?-1:1}function v(e){const t=e.detail.sourceEvent.target,n=d.get(this),a=n.find(e=>e.el===t);if(a&&n.includes(a))return;const s=n[0];s.disabled||s.onLabelClick(e)}function f(){p.has(this)&&m(this)}function y(){p.add(this);const e=u.get(this)||f.bind(this);u.set(this,e),document.addEventListener(i,e)}async function k(e){if(await e.componentOnReady(),d.has(e))return;const t=e.for&&e.ownerDocument?.getElementById(e.for);t&&requestAnimationFrame(()=>{for(const e of p)if(e.el===t){m(e);break}})}n.d(t,["b",0,c,"l",0,i,"u",0,o])},34019(e,t,n){n.r(t),n.d(t,{Label:()=>r});var a=n(89301),s=n(58933),o=n(32012),l=n(64336),i=n(51470);const c=s.AH`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}:host([alignment=start]){text-align:start}:host([alignment=end]){text-align:end}:host([alignment=center]){text-align:center}:host([scale=s]) .container{gap:.25rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);margin-block-end:var(--calcite-label-margin-bottom, .5rem)}:host([scale=m]) .container{gap:.5rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);margin-block-end:var(--calcite-label-margin-bottom, .75rem)}:host([scale=l]) .container{gap:.5rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);margin-block-end:var(--calcite-label-margin-bottom, 1rem)}:host .container{margin-inline:0px;margin-block-start:0px;inline-size:100%;line-height:1.375;color:var(--calcite-color-text-1);color:var(--calcite-label-text-color, var(--calcite-color-text-1))}:host([layout=block]) .container,:host([layout=default]) .container{display:flex;flex-direction:column}:host([layout=inline]) .container,:host([layout=inline-space-between]) .container{display:flex;flex-direction:row;align-items:center;gap:.5rem}:host([layout=inline][scale=l]) .container{gap:.75rem}:host([layout=inline-space-between]) .container{justify-content:space-between}:host([disabled])>.container{opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted(*[disabled]),:host([disabled]) ::slotted(*[disabled] *){--tw-bg-opacity: 1}:host([disabled]) ::slotted(calcite-input-message:not([active])){--tw-bg-opacity: 0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`;class r extends o.WF{constructor(){super(),this.alignment="start",this.layout="block",this.scale="m",this.calciteInternalLabelClick=(0,l.b)({bubbles:!1,cancelable:!1}),this.listen("click",this.labelClickHandler)}static{this.properties={alignment:[3,{},{reflect:!0}],for:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}]}}static{this.styles=c}connectedCallback(){super.connectedCallback(),document.dispatchEvent(new CustomEvent(i.l))}willUpdate(e){e.has("for")&&(0,i.a)(this.el)}disconnectedCallback(){super.disconnectedCallback(),document.dispatchEvent(new CustomEvent(i.b))}labelClickHandler(e){"Range"===window.getSelection()?.type||e.defaultPrevented||this.calciteInternalLabelClick.emit({sourceEvent:e})}render(){return s.qy`<div class=${(0,o.CP)("container")}><slot></slot></div>`}}(0,a.c)("calcite-label",r)},74059(e,t,n){n.d(t,{Dk:()=>f,aK:()=>y,yr:()=>$,jH:()=>C,oW:()=>w});var a=n(64336),s=n(59231);var o=n(58933),l=n(14246),i=n(44613);const c=e=>{const t=(0,l.a)(e,"lang",globalThis.navigator?.language||u);return{lang:t,t9nLocale:v(t)}},r=async(e,t,n=e.localName.split("-").slice(1).join("-"))=>{const{lang:a,t9nLocale:s}=c(e),o=`${t}/${n}/t9n`;return{lang:a,t9nLocale:s,t9nStrings:null===n?{}:await p(s,o,"messages.")}},d="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),h=new Set(d),u="en",b={pt:"pt-BR",nb:"no",nn:"no",zh:"zh-CN"},p=async(e,t,n="")=>{const a=`${t}/${n}`,s=`${a}${e}.json`;return m[s]??=g(e,a),await m[s]},m={},g=async(e,t)=>{const n=`${t}${e}.json`;try{const e=await fetch(n);if(e.ok)return await e.json()}catch(e){return(0,i.Rm)("error","intl",`An unknown error occurred while fetching localization strings at ${n}`,{detail:{error:e}}),{}}return e===u?{}:await g(u,t)},v=e=>{const[t,n]=e.split("-"),a=t.toLowerCase();let s=a;return n&&(s=`${a}-${n.toUpperCase()}`),s=b[s]??s,h.has(s)?s:n?v(a):u},f=e=>x(void 0,e),y=e=>t=>x(t,e);class k extends a.C{constructor(e,t){super(e);const n=this.exports;try{(0,s.s)(this.component);const e=t(this.component,this),a=this.exports!==n;if((0,s.i)(e)){a||this.setProvisionalExports(e);const t=e.then(e=>{this.exports=e,super.catchUpLifecycle()}).catch(e=>{this.P.reject(e)});this.onLoad(async()=>await t)}else a&&void 0===e||(this.exports=e),queueMicrotask(()=>super.catchUpLifecycle())}catch(e){this.P.reject(e)}}catchUpLifecycle(){}}const x=(E=k,(...e)=>{const t=(0,s.b)(),n=new E(...e),o=n.exports;(0,s.a)(t.at(-1));const l=n.component.manager;l.W(n,o),n.watchExports(l.W.bind(l,n)),(0,s.f)(n);const i=[n.component,...t].reverse();return(0,a.a)(i,e=>void 0===e?void 0:((e,{host:t,key:n,isReactive:a},o)=>{const l=t,i=l[n]!==e.exports,c=l[n]!==o,r=o!==e.exports;if(i&&!c&&r&&(l[n]=e.exports),t===e.component){if(a){const t=e.component.manager;c&&t.W(e,l[n]),e.onUpdate(a=>{if(a.has(n)){const a=l[n];a!==e.exports&&t.W(e,a)}})}e.O=a?void 0:n}const d=e.component.constructor.elementProperties.get(n)?.readOnly;e.watchExports(()=>{l[n]!==e.exports&&(d?(0,s.c)(()=>{l[n]=e.exports}):l[n]=e.exports)})})(n,e,o),o)});var E;const w=(e,t)=>new L(e,t);class L extends a.C{#e;#t;#n;constructor(e,t){super(),o.S$||(this.#t=e,this.#n=t,this.#e=new MutationObserver(n=>{n.forEach(n=>{e.includes(n.attributeName)&&t.call(this.component,this.component.el.getAttribute(n.attributeName),n.oldValue,n.attributeName)})}))}hostConnected(){this.#t.forEach(e=>{this.component.el.hasAttribute(e)&&this.#n.call(this.component,this.component.el.getAttribute(e),null,e)}),this.#e.observe(this.component.el,{attributes:!0,attributeOldValue:!0,attributeFilter:this.#t})}hostDisconnected(){this.#e.disconnect()}}const C=()=>f((e,t)=>{t.exports="ltr",t.onLifecycle(()=>{const n=()=>{const n=(0,l.a)(e.el,"dir","ltr");t.exports="rtl"===n?"rtl":"ltr"};return n(),(0,l.o)(e.el,["dir"],n)})}),$=e=>(t={})=>f((n,a)=>{const s=c(n.el),o={_lang:s.lang,_t9nLocale:s.t9nLocale,_loading:!0},d=n;a.onLifecycle(()=>((e,t,n,a)=>{let s;const o=()=>r(e,t(),a).then(e=>{s?.lang===e.lang&&s.t9nLocale===e.t9nLocale&&s.t9nStrings===e.t9nStrings||n(e),s=e}).catch(e=>{(0,i.Rm)("error","intl","Error updating component locale state",{detail:{error:e}})});return queueMicrotask(o),(0,l.o)(e,["lang"],o)})(n.el,()=>e("./assets"),({t9nLocale:e,t9nStrings:t,lang:s})=>{const o={...t,_lang:s,_t9nLocale:e,_loading:!1};a.exports=o;const l=t.componentLabel;"string"==typeof l&&"label"in n&&null==n.label&&(n.label??=l),h(d.messageOverrides)},t.name));const h=e=>{const t=a.exports,n=t._original??t,s=z(n,e);e&&(s._original=n),a.exports=s};return"messageOverrides"in d&&a.onUpdate(e=>{e.has("messageOverrides")&&h(d.messageOverrides)}),t.blocking?(a.setProvisionalExports(o,!1),a.ready):o}),z=(e,t)=>{if(!t)return e;const n={...e};return Object.entries(t).forEach(([t,a])=>{void 0!==e[t]&&(n[t]="object"==typeof a?z(e[t],a):a??e[t])}),n}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[574],{66131(e,t,n){n.d(t,{lY:()=>d,mT:()=>m});var r=n(59534),i=n(799),s=n(3330),o=n(84741),a=n(34747);const l={TimeZoneNotRecognized:"Timezone identifier has not been recognized."};class u extends Error{constructor(e,t){super((0,i.HC)(l[e],t)),this.declaredRootClass="esri.arcade.arcadedate.dateerror",Error.captureStackTrace&&Error.captureStackTrace(this,u)}}function h(e,t,n){return e<t?e-t:e>n?e-n:0}function c(e,t,n){return e<t?t:e>n?n:e}class d{constructor(e){this._date=e,this.declaredRootClass="esri.arcade.arcadedate"}static fromParts(e=0,t=1,n=1,r=0,i=0,s=0,o=0,l){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i)||isNaN(s)||isNaN(o))return null;let u=a.c9.local(e,t).daysInMonth,f=a.c9.fromObject({day:c(n,1,u),year:e,month:c(t,1,12),hour:c(r,0,23),minute:c(i,0,59),second:c(s,0,59),millisecond:c(o,0,999)},{zone:m(l)});return f=f.plus({months:h(t,1,12),days:h(n,1,u),hours:h(r,0,23),minutes:h(i,0,59),seconds:h(s,0,59),milliseconds:h(o,0,999)}),new d(f)}static get systemTimeZoneCanonicalName(){return Intl.DateTimeFormat().resolvedOptions().timeZone??"system"}static arcadeDateAndZoneToArcadeDate(e,t){let n=m(t);return e.isUnknownTimeZone||n===s.GB.instance?d.fromParts(e.year,e.monthJS+1,e.day,e.hour,e.minute,e.second,e.millisecond,n):new d(e._date.setZone(n))}static dateJSToArcadeDate(e){return new d(a.c9.fromJSDate(e,{zone:"system"}))}static dateJSAndZoneToArcadeDate(e,t="system"){let n=m(t);return new d(a.c9.fromJSDate(e,{zone:n}))}static unknownEpochToArcadeDate(e){return new d(a.c9.fromMillis(e,{zone:s.GB.instance}))}static unknownDateJSToArcadeDate(e){return new d(a.c9.fromMillis(e.getTime(),{zone:s.GB.instance}))}static epochToArcadeDate(e,t="system"){let n=m(t);return new d(a.c9.fromMillis(e,{zone:n}))}static dateTimeToArcadeDate(e){return new d(e)}clone(){return new d(this._date)}changeTimeZone(e){let t=m(e);return d.dateTimeToArcadeDate(this._date.setZone(t))}static dateTimeAndZoneToArcadeDate(e,t){let n=m(t);return e.zone===s.GB.instance||n===s.GB.instance?d.fromParts(e.year,e.month,e.day,e.hour,e.minute,e.second,e.millisecond,n):new d(e.setZone(n))}static nowToArcadeDate(e){let t=m(e);return new d(a.c9.fromJSDate(new Date,{zone:t}))}static nowUTCToArcadeDate(){return new d(a.c9.utc())}get isSystem(){return"system"===this.timeZone||this.timeZone===d.systemTimeZoneCanonicalName}equals(e){return this.isSystem&&e.isSystem?this.toNumber()===e.toNumber():this.isUnknownTimeZone===e.isUnknownTimeZone&&this._date.equals(e._date)}get isUnknownTimeZone(){return this._date.zone===s.GB.instance}get isValid(){return this._date.isValid}get hour(){return this._date.hour}get second(){return this._date.second}get day(){return this._date.day}get dayOfWeekISO(){return this._date.weekday}get dayOfWeekJS(){let e=this._date.weekday;return e>6&&(e=0),e}get millisecond(){return this._date.millisecond}get monthISO(){return this._date.month}get weekISO(){return this._date.weekNumber}get yearISO(){return this._date.weekYear}get monthJS(){return this._date.month-1}get year(){return this._date.year}get minute(){return this._date.minute}get zone(){return this._date.zone}get timeZoneOffset(){return this.isUnknownTimeZone?0:this._date.offset}get timeZone(){if(this.isUnknownTimeZone)return"unknown";if("system"===this._date.zone.type)return"system";let e=this.zone;return"fixed"===e.type?0===e.fixed?"UTC":e.formatOffset(0,"short"):e.name}stringify(){return JSON.stringify(this.toJSDate())}plus(e){return new d(this._date.plus(e))}diff(e,t){return this._date.diff(e._date,t)[t]}toISODate(){return this._date.toISODate()}toISOString(e){return e?this._date.toISO({suppressMilliseconds:!0,includeOffset:!this.isUnknownTimeZone}):this._date.toISO({includeOffset:!this.isUnknownTimeZone})}toISOTime(e,t){return this._date.toISOTime({suppressMilliseconds:e,includeOffset:t&&!this.isUnknownTimeZone})}toFormat(e,t){return this.isUnknownTimeZone&&(e=e.replaceAll("Z","")),this._date.toFormat(e,t)}toJSDate(){return this._date.toJSDate()}toSQLValue(){return this._date.toFormat("yyyy-LL-dd HH:mm:ss")}toSQLWithKeyword(){return`timestamp '${this.toSQLValue()}'`}toDateTime(){return this._date}toNumber(){return this._date.toMillis()}getTime(){return this._date.toMillis()}toUTC(){return new d(this._date.toUTC())}toLocal(){return new d(this._date.toLocal())}toString(){return this.toISOString(!0)}static fromReaderAsTimeStampOffset(e){if(!e)return null;let t=a.c9.fromISO(e,{setZone:!0});return new d(t)}}function m(e,t=!0){if(e instanceof a.bo)return e;switch((0,r.B)(e)){case"system":return"system";case"utc":return"UTC";case"unknown":return s.GB.instance}if(/^[+-]?[0-9]{1,2}(:[0-9]{2})?$/.test(e)){let t=a.mQ.parseSpecifier("UTC"+(e.startsWith("+")||e.startsWith("-")?"":"+")+e);if(t)return t}let n=(0,o.p)(e);if(!n.isValid){if(t)throw new u("TimeZoneNotRecognized");return null}return n}},59534(e,t,n){n.d(t,{B:()=>i,b:()=>s});var r=n(85935);function i(e){return e.toLowerCase().replaceAll(/[\s-]+/g,"")}class s{constructor(e,t){let n=new Map;for(let t of e){let e=i(t);if(n.has(e))throw Error(`${t} already added as ${n.get(e)}`);n.set(e,t)}if(null!=t)for(let[e,r]of t){let t=i(e);if(n.has(t))throw Error(`${e} already associated with ${n.get(t)}`);n.set(t,r)}this._enumMap=n}lookup(e){return this._enumMap.get(i(e))}get(e){let t=this.lookup(e);if(null==t)throw new r.D$("InvalidParameter",null);return t}}},85935(e,t,n){n.d(t,{D$:()=>a,O$:()=>h,i2:()=>c,mT:()=>u,ps:()=>m});var r=n(799);const i={TypeNotAllowedInFeature:"Feature attributes only support dates, numbers, strings, guids.",LogicError:"Logic error - {reason}",CannotCompareDateAndTime:"Cannot compare date or dateonly with timeonly types",NeverReach:"Encountered unreachable logic",AsyncNotEnabled:"Async Arcade must be enabled for this script",ModuleAccessorMustBeString:"Module accessor must be a string",ModuleExportNotFound:"Module has no export with provided identifier",ModulesNotSupported:"Current profile does not support modules",ArrayAccessMustBeNumber:"Array accessor must be a number",FunctionNotFound:"Function not found",FieldNotFound:"Key not found - {key}",CircularModules:"Circular module dependencies are not allowed",Cancelled:"Execution cancelled",UnsupportedHashType:"Type not supported in hash function",IllegalResult:"Value is not a supported return type",PortalRequired:"Portal is required",InvalidParameter:"Invalid parameter",WrongNumberOfParameters:"Call with wrong number of parameters",Unrecognized:"Unrecognized code structure",UnrecognizedType:"Unrecognized type",WrongSpatialReference:"Cannot work with geometry in this spatial reference. It is different to the execution spatial reference",BooleanConditionRequired:"Conditions must use booleans",NoFunctionInDictionary:"Dictionaries cannot contain functions.",NoFunctionInArray:"Arrays cannot contain functions.",NoFunctionInTemplateLiteral:"Template Literals do not expect functions by value.",KeyAccessorMustBeString:"Accessor must be a string",KeyMustBeString:"Object keys must be a string",Immutable:"Object is immutable",UnexpectedToken:"Unexpected token",MemberOfNull:"Cannot access property of null object",MaximumCallDepth:"Exceeded maximum function depth",OutOfBounds:"Out of bounds",InvalidIdentifier:"Identifier not recognized",CallNonFunction:"Expression is not a function",InvalidMemberAccessKey:"Cannot access value using a key of this type",AssignModuleFunction:"Cannot assign function to module variable",UnsupportUnaryOperator:"Unsupported unary operator",UnsupportedOperator:"Unsupported operator",LogicalExpressionOnlyBoolean:"Logical expressions must be boolean",LogicExpressionOrAnd:"Logical expression can only be combined with || or &&",CannotChangeTimeZoneTime:"Cannot change the timezone of a Time",CannotChangeTimeZoneDateOnly:"Cannot change the timezone of a DateOnly",FeatureSetDoesNotHaveSubtypes:"FeatureSet does not have subtypes"};function s(e){return"object"==typeof e&&"line"in e&&"column"in e&&"number"==typeof e.line&&"number"==typeof e.column}class o extends Error{constructor(e,t){super(l(t)+("object"==typeof e&&e&&"message"in e?e.message:""),{cause:e}),this.loc=t?.loc??null}}class a extends Error{constructor(e,t,n){super("Execution error - "+l(t)+(0,r.HC)(i[e],n)),this.declaredRootClass="esri.arcade.arcadeexecutionerror",this.loc=t?.loc??null}}function l(e){return null==e?.loc?"":`Line ${e.loc.start.line}:${e.loc.start.column}: `}class u extends Error{constructor(e,t,n){super("Compilation error - "+l(t)+(0,r.HC)(i[e],n)),this.declaredRootClass="esri.arcade.arcadecompilationerror",this.loc=t?.loc??null}}class h extends Error{constructor(){super("Uncompilable code structures"),this.declaredRootClass="esri.arcade.arcadeuncompilableerror"}}function c(e,t){return!function(e){if(e instanceof Error&&"loc"in e){let t=e.loc;return null==t||"object"==typeof t&&"start"in t&&null!=t.start&&s(t.start)&&(!("end"in t)||null==t.end||s(t.end))}return!1}(e)||null==e.loc&&null!=t?.loc?new o(e,t):e}const d={UnrecognizedUri:"Unrecognized uri - {uri}",UnsupportedUriProtocol:"Unrecognized uri protocol"};class m extends Error{constructor(e,t){super((0,r.HC)(d[e],t)),this.declaredRootClass="esri.arcade.arcademoduleerror"}}},69540(e,t,n){var r=n(32198),i=n(69622),s=(n(44208),n(4718)),o=(n(53966),n(97768)),a=n(88620),l=n(64108);const u=Symbol("ClonableMixin"),h=e=>{var t;let n=e,i=class extends n{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){let t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");let n=t.metadata,r=t.store,i={},l=new Map;for(let t in n){let o=n[t],a=r?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)continue;let h=this[t],c=null;if("function"==typeof u)c=u(h,e);else if("reference"===u)c=h;else if(c=(0,s.TU)(h,e),null!=h&&null==c)continue;0===a?l.set(t,c):i[t]=c}let u=new(0,Object.getPrototypeOf(this).constructor)(i);if(l.size){let e=(0,a.oY)(u)?.store;if(e)for(let[t,n]of l)e.set(t,n,0)}return u}};return i=(0,r.Cg)([(0,l.$)("esri.core.Clonable")],i),i},c=h(i.A);n.d(t,["OU",0,h,"Pw",0,c])},66344(e,t,n){n.d(t,{q:()=>a});const r=!!(0,n(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class i{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){return this._db.get(e.id+t)?.size??0}put(e,t,n,i,o){t=e.id+t;let a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==n&&this._notifyRemove(t,a.entry,a.size,0)),i>this._maxSize)return void this._notifyRemove(t,n,i,0);if(void 0===n)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return r||console.warn(`Refusing to cache entry with size ${i} for key ${t}`),void this._notifyRemove(t,n,0,0);let l=1+Math.max(o,-4)- -3;this._db.set(t,new s(n,i,l)),this._size+=i,e.size+=i,this._checkSize()}updateSize(e,t){t=e.id+t;let n=this._db.get(t);if(!n)return;this._size-=n.size,e.size-=n.size;let r=n.entry.usedMemory;for(;r>this._maxSize;){let e=this._notifyRemove(t,n.entry,r,1);if(!(null!=e&&e>0))return void this._db.delete(t);r=e}n.size=r,this._size+=r,e.size+=r,this._checkSize()}pop(e,t){t=e.id+t;let n=this._db.get(t);if(n)return this._size-=n.size,e.size-=n.size,this._db.delete(t),++this._hit,n.entry;++this._miss}get(e,t){t=e.id+t;let n=this._db.get(t);if(void 0!==n)return this._db.delete(t),n.lives=n.lifetime,this._db.set(t,n),++this._hit,n.entry;++this._miss}peek(e,t){let n=this._db.get(e.id+t);return n?++this._hit:++this._miss,n?.entry}get performanceInfo(){let e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},n=[];this._db.forEach((e,r)=>{let i=e.lifetime;n[i]=(n[i]||0)+e.size,this._clients.forEach(n=>{let{id:i,name:s}=n;if(r.startsWith(i)){let n=t[s]||0;t[s]=n+e.size}})});let r={};this._clients.forEach(e=>{let n=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){let i=t[n]||0;t[n]=i,r[n]=Math.round(100*e.hitRate)+"%"}else r[n]="0%"});let i=Object.keys(t);i.sort((e,n)=>t[n]-t[e]),i.forEach(n=>e[n]=Math.round(t[n]/2**20)+"MB / "+r[n]);for(let t=n.length-1;t>=0;--t){let r=n[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){let t=e.id;this._db.forEach((e,n)=>{n.startsWith(t)&&(this._size-=e.size,this._db.delete(n),this._notifyRemove(n,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(let[t,n]of this._db)t.startsWith(e.id)&&(yield n.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,n,r){let i=this._clients.get(e.split(o)[0])?.removeFunc,s=i?.(t,r,n);return"number"==typeof s?s:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){let n=t??this;if(n.size<=e)return;let r=t?.id,i=!0;for(;i;){i=!1;for(let[s,a]of this._db)if(0===a.lifetime&&(!r||s.startsWith(r))){let r=t??this._clients.get(s.split(o)[0]);if(this._purgeItem(s,a,r),n.size<=.9*e)return;i||=this._db.has(s)}}for(let[i,s]of this._db)if(!r||i.startsWith(r)){let r=t??this._clients.get(i.split(o)[0]);if(this._purgeItem(i,s,r),n.size<=.9*e)return}}_purgeItem(e,t,n){if(this._db.delete(e),t.lives<=1){this._size-=t.size,n&&(n.size-=t.size);let r=this._notifyRemove(e,t.entry,t.size,1);null!=r&&r>0&&(this._size+=r,n&&(n.size+=r),t.lives=t.lifetime,t.size=r,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new i(0);class s{constructor(e,t,n){this.entry=e,this.size=t,this.lifetime=n,this.lives=n}}const o=":";class a{constructor(e,t){this.removeFunc=t,this.id="",this.name="",this.size=0,this._storage=new i(e,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,n=1){this._storage.put(this,e,t,n,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},60999(e,t,n){n.d(t,{DZ:()=>f,Ke:()=>m,QA:()=>p,Tj:()=>h,UT:()=>y,aD:()=>_,jJ:()=>u});var r=n(32198),i=n(69622),s=n(97768),o=n(17676),a=n(10107),l=n(64108);function u(e,t,n){return(0,o.Lx)(e.map((e,r)=>t.apply(n,[e,r])))}async function h(e,t,n){return(await(0,o.Lx)(e.map((e,r)=>t.apply(n,[e,r])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function m(e){if(null==e)return{ok:!1,error:Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function f(e){try{return c(await e)}catch(e){return(0,o.QP)(e),d(e)}}function p(e){if(!0===e.ok)return e.value;throw e.error}function y(e,t){return new g(e,t)}let g=class extends i.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,s.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;let{signal:n}=this._abortController;this.promise=e(n),this.promise.then(e=>{this._result=c(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,s.xt)(this._abortHandle),this._abortController=null}};(0,r.Cg)([(0,a.MZ)()],g.prototype,"value",null),(0,r.Cg)([(0,a.MZ)()],g.prototype,"error",null),(0,r.Cg)([(0,a.MZ)()],g.prototype,"finished",null),(0,r.Cg)([(0,a.MZ)()],g.prototype,"promise",void 0),(0,r.Cg)([(0,a.MZ)()],g.prototype,"_result",void 0),g=(0,r.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],g);class _{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});let t=await e;return{[Symbol.dispose]:t}}async run(e){let t={stack:[],error:void 0,hasError:!1};try{return(0,r.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,r.hk)(t)}}}},67482(e,t,n){function r(e){return null!==i(e)}function i(e){return function(e){let t=s.exec(e);if(!t?.groups)return null;let n=t.groups,r=+n.year,i=n.month-1,o=+n.day,a=+(n.hours??"0"),l=+(n.minutes??"0"),u=+(n.seconds??"0");if(a>23||l>59||u>59)return null;let h,c=n.ms??"0",d=c?+c.padEnd(3,"0").slice(0,3):0;if(n.isUTC||!n.offsetSign)h=Date.UTC(r,i,o,a,l,u,d);else{let e=+n.offsetHours,t=+n.offsetMinutes;h=6e4*("+"===n.offsetSign?-1:1)*(60*e+t)+Date.UTC(r,i,o,a,l,u,d)}return Number.isNaN(h)?null:h}(e)??function(e){let t=new Date(e),n=t.getTime();return Number.isNaN(n)?null:e.toLowerCase()===t.toUTCString().toLowerCase()?n:null}(e)??function(e){if(!o.test(e))return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset()}(e)}n.d(t,{C:()=>r,_:()=>i});const s=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,o=/^((\d{1,2}[/-]\d{1,2}[/-]\d{4})|(\d{4}[/-]\d{1,2}[/-]\d{1,2}))( \d{1,2}:\d{1,2}:\d{1,2}( ((AM)|(PM)))?)?$/i},9093(e,t,n){function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function i(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}n.d(t,{o8:()=>i,vt:()=>r});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:i,create:r,fromValues:function(e,t,n,r,i,s,o,a,l,u,h,c,d,m,f,p){return[e,t,n,r,i,s,o,a,l,u,h,c,d,m,f,p]}},Symbol.toStringTag,{value:"Module"})),n.d(t,["zK",0,s])},35522(e,t,n){n.d(t,{$A:()=>C,Bw:()=>s,C:()=>o,Cc:()=>v,DI:()=>S,Io:()=>_,Ln:()=>g,Om:()=>M,Qr:()=>c,Re:()=>u,S8:()=>x,T9:()=>p,WQ:()=>l,Z0:()=>F,_S:()=>m,aI:()=>z,ei:()=>A,fw:()=>R,gL:()=>D,hG:()=>w,hZ:()=>a,hs:()=>y,jk:()=>f,lw:()=>h,m3:()=>b,oW:()=>O,t2:()=>N,tn:()=>d,ze:()=>T});var r=n(51850),i=n(34304);function s(e){let t=e[0],n=e[1],r=e[2];return Math.sqrt(t*t+n*n+r*r)}function o(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function a(e,t,n,r){return e[0]=t,e[1]=n,e[2]=r,e}function l(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function u(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function h(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}function c(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}function d(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function m(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function f(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e}function p(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e}function y(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function g(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e}function _(e,t){let n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(n*n+r*r+i*i)}function w(e,t){let n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return n*n+r*r+i*i}function b(e){let t=e[0],n=e[1],r=e[2];return t*t+n*n+r*r}function T(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function S(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function x(e,t=e){let n=t[0],r=t[1],i=t[2],s=n*n+r*r+i*i;return s>0&&(s=1/Math.sqrt(s),e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s),e}function M(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function C(e,t,n){let r=t[0],i=t[1],s=t[2],o=n[0],a=n[1],l=n[2];return e[0]=i*l-s*a,e[1]=s*o-r*l,e[2]=r*a-i*o,e}function v(e,t,n,r){let i=t[0],s=t[1],o=t[2];return e[0]=i+r*(n[0]-i),e[1]=s+r*(n[1]-s),e[2]=o+r*(n[2]-o),e}function F(e,t,n){let r=t[0],i=t[1],s=t[2];return e[0]=n[0]*r+n[4]*i+n[8]*s+n[12],e[1]=n[1]*r+n[5]*i+n[9]*s+n[13],e[2]=n[2]*r+n[6]*i+n[10]*s+n[14],e}function A(e,t,n){let r=t[0],i=t[1],s=t[2];return e[0]=r*n[0]+i*n[3]+s*n[6],e[1]=r*n[1]+i*n[4]+s*n[7],e[2]=r*n[2]+i*n[5]+s*n[8],e}function D(e,t,n){return R(e,t,n[0],n[1],n[2],n[3])}function R(e,t,n,r,i,s){let o=t[0],a=t[1],l=t[2],u=r*l-i*a,h=i*o-n*l,c=n*a-r*o,d=r*c-i*h,m=i*u-n*c,f=n*h-r*u,p=2*s;return e[0]=o+u*p+2*d,e[1]=a+h*p+2*m,e[2]=l+c*p+2*f,e}const I=(0,r.vt)(),P=(0,r.vt)();function N(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function z(e,t){if(e===t)return!0;let n=e[0],r=e[1],s=e[2],o=t[0],a=t[1],l=t[2],u=(0,i.FD)();return Math.abs(n-o)<=u*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=u*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(s-l)<=u*Math.max(1,Math.abs(s),Math.abs(l))}function O(e,t,n){let r=n[0]-t[0],i=n[1]-t[1],s=n[2]-t[2],o=r*r+i*i+s*s;return o>0?(o=1/Math.sqrt(o),e[0]=r*o,e[1]=i*o,e[2]=s*o,e):(e[0]=0,e[1]=0,e[2]=0,e)}const k=u,E=h,B=c,L=_,Z=w,U=s,j=b;Object.freeze(Object.defineProperty({__proto__:null,abs:d,add:l,angle:function(e,t){x(I,e),x(P,t);let n=M(I,P);return n>1?0:n<-1?Math.PI:Math.acos(n)},bezier:function(e,t,n,r,i,s){let o=1-s,a=o*o,l=s*s,u=a*o,h=3*s*a,c=3*l*o,d=l*s;return e[0]=t[0]*u+n[0]*h+r[0]*c+i[0]*d,e[1]=t[1]*u+n[1]*h+r[1]*c+i[1]*d,e[2]=t[2]*u+n[2]*h+r[2]*c+i[2]*d,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},clamp:function(e,t=0,n=1){return e[0]=Math.min(Math.max(e[0],t),n),e[1]=Math.min(Math.max(e[1],t),n),e[2]=Math.min(Math.max(e[2],t),n),e},copy:o,cross:C,crossAndNormalize:function(e,t,n){let r=t[0],i=t[1],s=t[2],o=n[0],a=n[1],l=n[2],u=i*l-s*a,h=s*o-r*l,c=r*a-i*o,d=Math.sqrt(u*u+h*h+c*c);return e[0]=u/d,e[1]=h/d,e[2]=c/d,e},direction:O,dist:L,distance:_,div:B,divide:c,dot:M,equals:z,exactEquals:N,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,n,r,i,s){let o=s*s,a=o*(2*s-3)+1,l=o*(s-2)+s,u=o*(s-1),h=o*(3-2*s);return e[0]=t[0]*a+n[0]*l+r[0]*u+i[0]*h,e[1]=t[1]*a+n[1]*l+r[1]*u+i[1]*h,e[2]=t[2]*a+n[2]*l+r[2]*u+i[2]*h,e},inverse:S,len:U,length:s,lerp:v,max:p,min:f,mul:E,multiply:h,negate:T,normalize:x,random:function(e,t=1){let n=i.Ov,r=2*n()*Math.PI,s=2*n()-1,o=Math.sqrt(1-s*s)*t;return e[0]=Math.cos(r)*o,e[1]=Math.sin(r)*o,e[2]=s*t,e},rotateX:function(e,t,n,r){let i=[],s=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],s[0]=i[0],s[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),s[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),e[0]=s[0]+n[0],e[1]=s[1]+n[1],e[2]=s[2]+n[2],e},rotateY:function(e,t,n,r){let i=[],s=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],s[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),s[1]=i[1],s[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),e[0]=s[0]+n[0],e[1]=s[1]+n[1],e[2]=s[2]+n[2],e},rotateZ:function(e,t,n,r){let i=[],s=[];return i[0]=t[0]-n[0],i[1]=t[1]-n[1],i[2]=t[2]-n[2],s[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),s[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),s[2]=i[2],e[0]=s[0]+n[0],e[1]=s[1]+n[1],e[2]=s[2]+n[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:y,scaleAndAdd:g,scaleTo:function(e,t){return y(e,e,t/U(e))},set:a,sign:m,sqrDist:Z,sqrLen:j,squaredDistance:w,squaredLength:b,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:k,subtract:u,transformMat3:A,transformMat4:F,transformMat4Z:function(e,t){return t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]},transformQuat:D,transformQuatValues:R},Symbol.toStringTag,{value:"Module"})),n.d(t,["Il",0,U,"jb",0,k,"lo",0,Z,"uE",0,j])},75503(e,t,n){n.d(t,{wq:()=>a});var r=n(4576),i=n(21818),s=(n(44208),n(15142)),o=n(11006);class a{constructor(e=9,t){this._compareMinX=d,this._compareMinY=m,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),T.prune(),S.prune(),x.prune(),M.prune()}all(e){l(this._data,e)}search(e,t){let n=this._data,r=this._toBBox;if(w(e,n))for(T.clear();n;){for(let i=0,s=n.children.length;i<s;i++){let s=n.children[i],o=n.leaf?r(s):s;w(e,o)&&(n.leaf?t(s):_(e,o)?l(s,t):T.push(s))}n=T.pop()}}collides(e){let t=this._data,n=this._toBBox;if(!w(e,t))return!1;for(T.clear();t;){for(let r=0,i=t.children.length;r<i;r++){let i=t.children[r],s=t.leaf?n(i):i;if(w(e,s)){if(t.leaf||_(e,s))return!0;T.push(i)}}t=T.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){let e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new F([]),this}remove(e){if(!e)return this;let t,n=this._data,s=null,o=0,a=!1,l=this._toBBox(e);for(x.clear(),M.clear();n||x.length>0;){if(n||(n=x.pop(),s=x.data[x.length-1],o=M.pop()??0,a=!0),n.leaf&&(t=(0,r.qh)(n.children,(0,i.z)(e),n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),x.push(n),this._condense(x),this;a||n.leaf||!_(n,l)?s?(o++,n=s.children[o],a=!1):n=null:(x.push(n),M.push(o),o=0,s=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,r){let i=n-t+1,s=this._maxEntries;if(i<=s){let r=new F(e.slice(t,n+1));return u(r,this._toBBox),r}r||(r=Math.ceil(Math.log(i)/Math.log(s)),s=Math.ceil(i/s**(r-1)));let o=new A([]);o.height=r;let a=Math.ceil(i/s),l=a*Math.ceil(Math.sqrt(s));b(e,t,n,l,this._compareMinX);for(let i=t;i<=n;i+=l){let t=Math.min(i+l-1,n);b(e,i,t,a,this._compareMinY);for(let n=i;n<=t;n+=a){let i=Math.min(n+a-1,t);o.children.push(this._build(e,n,i,r-1))}}return u(o,this._toBBox),o}_insert(e,t,n){let r=this._toBBox,i=n?e:r(e);x.clear();let s=function(e,t,n,r){for(;r.push(t),!0!==t.leaf&&r.length-1!==n;){let n,r=1/0,i=1/0;for(let s=0,o=t.children.length;s<o;s++){let o=t.children[s],a=f(o),l=y(e,o)-a;l<i?(i=l,r=a<r?a:r,n=o):l===i&&a<r&&(r=a,n=o)}t=n||t.children[0]}return t}(i,this._data,t,x);for(s.children.push(e),c(s,i);t>=0&&x.data[t].children.length>this._maxEntries;)this._split(x,t),t--;!function(e,t,n){for(let r=n;r>=0;r--)c(t.data[r],e)}(i,x,t)}_split(e,t){let n=e.data[t],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);let s=this._chooseSplitIndex(n,i,r);if(!s)return;let o=n.children.splice(s,n.children.length-s),a=n.leaf?new F(o):new A(o);a.height=n.height,u(n,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new A([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let r,i,s;r=i=1/0;for(let o=t;o<=n-t;o++){let t=h(e,0,o,this._toBBox),a=h(e,o,n,this._toBBox),l=g(t,a),u=f(t)+f(a);l<r?(r=l,s=o,i=u<i?u:i):l===r&&u<i&&(i=u,s=o)}return s}_chooseSplitAxis(e,t,n){let r=e.leaf?this._compareMinX:d,i=e.leaf?this._compareMinY:m;this._allDistMargin(e,t,n,r)<this._allDistMargin(e,t,n,i)&&e.children.sort(r)}_allDistMargin(e,t,n,r){e.children.sort(r);let i=this._toBBox,s=h(e,0,t,i),o=h(e,n-t,n,i),a=p(s)+p(o);for(let r=t;r<n-t;r++){let t=e.children[r];c(s,e.leaf?i(t):t),a+=p(s)}for(let r=n-t-1;r>=t;r--){let t=e.children[r];c(o,e.leaf?i(t):t),a+=p(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){let n=e.data[t];if(0===n.children.length)if(t>0){let i=e.data[t-1],s=i.children;s.splice((0,r.qh)(s,n,s.length,i.indexHint),1)}else this.clear();else u(n,this._toBBox)}}_initFormat(e){let t=["return a"," - b",";"];this._compareMinX=Function("a","b",t.join(e[0])),this._compareMinY=Function("a","b",t.join(e[1])),this._toBBox=Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let n=e;for(S.clear();n;){if(!0===n.leaf)for(let e of n.children)t((0,i.z)(e));else S.pushArray(n.children);n=S.pop()??null}}function u(e,t){h(e,0,e.children.length,t,e)}function h(e,t,n,r,i){i||=new F([]),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let s,o=t;o<n;o++)s=e.children[o],c(i,e.leaf?r(s):s);return i}function c(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function m(e,t){return e.minY-t.minY}function f(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function p(e){return e.maxX-e.minX+(e.maxY-e.minY)}function y(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){let n=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),i=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,i-n)*Math.max(0,s-r)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function w(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function b(e,t,n,r,i){let s=[t,n];for(;s.length;){let t=s.pop(),n=s.pop();if(t-n<=r)continue;let a=n+Math.ceil((t-n)/r/2)*r;(0,o.q)(e,a,n,t,i),s.push(n,a,a,t)}}const T=new s.A,S=new s.A,x=new s.A,M=new s.A({deallocator:void 0});class C{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class v extends C{constructor(){super(...arguments),this.height=1,this.indexHint=new r.vW}}class F extends v{constructor(e){super(),this.children=e,this.leaf=!0}}class A extends v{constructor(e){super(),this.children=e,this.leaf=!1}}},69397(e,t,n){n.d(t,{Qf:()=>a,Qh:()=>s,lM:()=>i});var r=n(34275);function i(e){if(!e)return 0;let t=u;for(let n in e)e.hasOwnProperty(n)&&(t+=o(e[n],!1));return t}function s(e){if(!e)return 0;if("number"==typeof e[0])return a(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let n=h;for(let r=0;r<t;r++)n+=o(e[r]);return n}(e);let t=u;for(let n in e)e.hasOwnProperty(n)&&(t+=o(e[n]));return t}function o(e,t=!0){switch(typeof e){case"object":return t?s(e):u;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function a(...e){return e.reduce((e,t)=>e+(t?(0,r.iu)(t)?t.byteLength+c:Array.isArray(t)?l(t,16):0:0),0)}function l(e,t){return h+e.length*t}const u=32,h=16,c=145},36708(e,t,n){n.d(t,{C_:()=>d,on:()=>c,wB:()=>l,z7:()=>u});var r=n(37955),i=n(36563),s=n(97768),o=n(17676),a=n(14012);function l(e,t,n={}){return h(e,t,n,m)}function u(e,t,n={}){return h(e,t,n,f)}function h(e,t,n={},r){let i=null,o=n.once?(e,n)=>{r(e)&&((0,s.xt)(i),t(e,n))}:(e,n)=>{r(e)&&t(e,n)};if(i=(0,a.Cn)(e,o,n.sync,n.equals),n.initial){let t=e();o(t,t)}return i}function c(e,t,n,o={}){let a=null,u=null,h=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,s.xt)(h),n(e)}let m=l(e,(e,n)=>{c(),(0,r.wb)(e)&&(a=e,u=(0,r.on)(e,t,d),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return h=(0,i.hA)(()=>{m.remove(),c()}),h}function d(e,t){return function(e,t,n){if((0,o.G4)(n))return Promise.reject((0,o.NK)());let r=e();if(t?.(r))return Promise.resolve(r);let a=null;function l(){a=(0,s.xt)(a)}return new Promise((r,s)=>{a=(0,i.vE)([(0,o.u7)(n,()=>{l(),s((0,o.NK)())}),h(e,e=>{l(),r(e)},{sync:!1,once:!0},t??m)])})}(e,f,t)}function m(e){return!0}function f(e){return!!e}n(80559),n.d(t,["OH",0,{sync:!0},"Vh",0,{initial:!0},"pc",0,{sync:!0,initial:!0}])},44794(e,t,n){n.d(t,{v:()=>a});var r=n(4718),i=n(62788),s=n(95488);class o{constructor(e,t){this._observable=new s.I,this._value=e,this._equalityFunction=t}get value(){return(0,i.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function a(e,t=r.gh){return new o(e,t)}},44729(e,t,n){n.d(t,{n:()=>l});var r=n(66131),i=n(73444),s=n(34747);function o(e){e=e.replaceAll(/LTS|LT|L{1,4}|l{1,4}/g,"[$&]");let t="";for(let n of e.match(/(\[[^[]*\])|(\\)?([Hh]mm(ss)?|Mo|M{1,4}|Do|DDDo|D{1,4}|d{2,4}|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g)||[])switch(n){case"D":t+="d";break;case"DD":t+="dd";break;case"DDD":t+="o";break;case"d":t+="c";break;case"ddd":t+="ccc";break;case"dddd":t+="cccc";break;case"M":t+="L";break;case"MM":t+="LL";break;case"MMM":t+="LLL";break;case"MMMM":t+="LLLL";break;case"YY":t+="yy";break;case"Y":case"YYYY":t+="yyyy";break;case"Q":t+="q";break;case"X":case"x":t+=n;break;default:n.length>=2&&n.startsWith("[")&&n.endsWith("]")?t+=`'${n.slice(1,-1)}'`:t+=`'${n}'`}return t}const a="esri.core.sql.dateonly";class l{constructor(e,t,n){this._year=e,this._month=t,this._day=n,this.declaredRootClass=a}static isDateOnly(e){return"object"==typeof e&&!!e&&"declaredRootClass"in e&&e.declaredRootClass===a}get month(){return this._month}get monthJS(){return this._month-1}get year(){return this._year}get day(){return this._day}get isValid(){return this.toDateTime("unknown").isValid}equals(e){return l.isDateOnly(e)&&e.day===this.day&&e.month===this.month&&e.year===this.year}compare(e){return this.year===e.year?this.month===e.month?this.day-e.day:this.month-e.month:this.year-e.year}clone(){return new l(this._year,this._month,this._day)}toDateTime(e){return s.c9.fromObject({day:this.day,month:this.month,year:this.year},{zone:(0,r.mT)(e)})}toDateTimeLuxon(e){return s.c9.fromObject({day:this.day,month:this.month,year:this.year},{zone:(0,r.mT)(e)})}toString(){return`${this.year.toString().padStart(4,"0")}-${this.month.toString().padStart(2,"0")}-${this.day.toString().padStart(2,"0")}`}toFormat(e=null,t=!0){if(null===e||""===e)return this.toString();if(t&&(e=o(e)),!e)return"";let n=this.toDateTime("unknown");return r.lY.dateTimeToArcadeDate(n).toFormat(e,{locale:(0,i.JK)(),numberingSystem:"latn"})}toArcadeDate(){let e=this.toDateTime("unknown");return r.lY.dateTimeToArcadeDate(e)}toNumber(){return this.toDateTime("unknown").toMillis()}toJSDate(){return this.toDateTime("unknown").toJSDate()}toStorageFormat(){return this.toFormat("yyyy-LL-dd",!1)}toSQLValue(){return this.toFormat("yyyy-LL-dd",!1)}toSQLWithKeyword(){return"date '"+this.toFormat("yyyy-LL-dd",!1)+"'"}plus(e,t){return l.fromDateTime(this.toUTCDateTime().plus({[e]:t}))}toUTCDateTime(){return s.c9.utc(this.year,this.month,this.day,0,0,0,0)}difference(e,t){switch(t.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(e.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return"M"===t?this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(e.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(e.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(e.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(e.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(e.toUTCDateTime(),"years").years}}static fromMilliseconds(e){let t=s.c9.fromMillis(e,{zone:s.mQ.utcInstance});return t.isValid?l.fromParts(t.year,t.month,t.day):null}static fromSeconds(e){let t=s.c9.fromSeconds(e,{zone:s.mQ.utcInstance});return t.isValid?l.fromParts(t.year,t.month,t.day):null}static fromReader(e){if(!e)return null;let t=e.indexOf("-");if(t<0)return null;let n=e.indexOf("-",t+1);return n<0?null:new l(parseInt(e.slice(0,t),10),parseInt(e.slice(t+1,n),10),parseInt(e.slice(n+1),10))}static fromParts(e,t,n){let r=new l(e,t,n);return!1===r.isValid?null:r}static fromDateJS(e){return l.fromParts(e.getFullYear(),e.getMonth()+1,e.getDay())}static fromDateTime(e){return l.fromParts(e.year,e.month,e.day)}static fromSqlTimeStampOffset(e){return this.fromDateTime(e.toDateTime())}static fromString(e,t=null){if(""===e||null===e)return null;let n=[];if(t)(t=o(t))&&n.push(t);else if(null===t||""===t){let t=s.c9.fromISO(e,{setZone:!0});return t.isValid?l.fromParts(t.year,t.month,t.day):null}for(let r of n){let n=s.c9.fromFormat(e,t??r);if(n.isValid)return new l(n.year,n.month,n.day)}return null}static fromNow(e="system"){let t=s.c9.fromJSDate(new Date).setZone((0,r.mT)(e));return new l(t.year,t.month,t.day)}}},15032(e,t,n){n.d(t,{k:()=>l});var r=n(73444),i=n(54218),s=n(34747);function o(e){if(!e)return"";let t=/(a|A|hh?|HH?|mm?|ss?|SSS|S|.)/g,n="";for(let r of e.match(t)||[])switch(r){case"SSS":case"m":case"mm":case"h":case"hh":case"H":case"HH":case"s":case"ss":n+=r;break;case"A":case"a":n+="a";break;default:n+=`'${r}'`}return n}const a="esri.core.sql.timeonly";class l{constructor(e,t,n,r){this._hour=e,this._minute=t,this._second=n,this._millisecond=r,this.declaredRootClass=a}static isTimeOnly(e){return"object"==typeof e&&!!e&&"declaredRootClass"in e&&e.declaredRootClass===a}get hour(){return this._hour}get minute(){return this._minute}get second(){return this._second}get millisecond(){return this._millisecond}equals(e){return l.isTimeOnly(e)&&e.hour===this.hour&&e.minute===this.minute&&e.second===this.second&&e.millisecond===this.millisecond}clone(){return new l(this.hour,this.minute,this.second,this.millisecond)}isValid(){return(0,i.Fq)(this.hour)&&(0,i.Fq)(this.minute)&&(0,i.Fq)(this.second)&&(0,i.Fq)(this.millisecond)&&this.hour>=0&&this.hour<24&&this.minute>=0&&this.minute<60&&this.second>=0&&this.second<60&&this.millisecond>=0&&this.millisecond<1e3}toString(){return`${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}`+(this.millisecond>0?"."+this.millisecond.toString().padStart(3,"0"):"")}toSQLValue(){return this.toString()}toSQLWithKeyword(){return`time '${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}${this.millisecond>0?"."+this.millisecond.toString().padStart(3,"0"):""}'`}toStorageString(){return`${this.hour.toString().padStart(2,"0")}:${this.minute.toString().padStart(2,"0")}:${this.second.toString().padStart(2,"0")}`}toFormat(e=null){return null===e||""===e?this.toString():(e=o(e))?s.c9.local(1970,1,1,this._hour,this._minute,this._second,this._millisecond).toFormat(e,{locale:(0,r.JK)(),numberingSystem:"latn"}):""}toNumber(){return this.millisecond+1e3*this.second+1e3*this.minute*60+60*this.hour*60*1e3}static fromParts(e,t,n,r){let i=new l(e,t,n,r);return i.isValid()?i:null}static fromReader(e){if(!e)return null;let t=e.indexOf(":");if(t<0)return null;let n=e.indexOf(":",t+1);return n<0?null:new l(parseInt(e.slice(0,t),10),parseInt(e.slice(t+1,n),10),parseInt(e.slice(n+1),10),0)}static fromMilliseconds(e){if(e>864e5||e<0)return null;let t=Math.floor(e/1e3%60),n=Math.floor(e/6e4%60),r=Math.floor(e/36e5%24),i=Math.floor(e%1e3);return new l(r,n,t,i)}static fromDateJS(e){return new l(e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())}static fromDateTime(e){return new l(e.hour,e.minute,e.second,e.millisecond)}static fromSqlTimeStampOffset(e){return this.fromDateTime(e.toDateTime())}static fromString(e,t=null){if(""===e||null===e)return null;let n=[];t?(t=o(t))&&n.push(t):(null===t||""===t)&&(n.push("HH:mm:ss"),n.push("HH:mm:ss.SSS"),n.push("hh:mm:ss a"),n.push("hh:mm:ss.SSS a"),n.push("HH:mm"),n.push("hh:mm a"),n.push("H:mm"),n.push("h:mm a"),n.push("H:mm:ss"),n.push("h:mm:ss a"),n.push("H:mm:ss.SSS"),n.push("h:mm:ss.SSS a"));for(let t of n){let n=s.c9.fromFormat(e,t);if(n.isValid)return new l(n.hour,n.minute,n.second,n.millisecond)}return null}plus(e,t){switch(e){case"days":case"years":case"months":return this.clone();case"hours":case"minutes":case"seconds":case"milliseconds":return l.fromDateTime(this.toUTCDateTime().plus({[e]:t}))}return null}toUTCDateTime(){return s.c9.utc(1970,1,1,this.hour,this.minute,this.second,this.millisecond)}difference(e,t){switch(t.toLowerCase()){case"days":case"day":case"d":return this.toUTCDateTime().diff(e.toUTCDateTime(),"days").days;case"months":case"month":return this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months;case"minutes":case"minute":case"m":return"M"===t?this.toUTCDateTime().diff(e.toUTCDateTime(),"months").months:this.toUTCDateTime().diff(e.toUTCDateTime(),"minutes").minutes;case"seconds":case"second":case"s":return this.toUTCDateTime().diff(e.toUTCDateTime(),"seconds").seconds;case"milliseconds":case"millisecond":case"ms":default:return this.toUTCDateTime().diff(e.toUTCDateTime(),"milliseconds").milliseconds;case"hours":case"hour":case"h":return this.toUTCDateTime().diff(e.toUTCDateTime(),"hours").hours;case"years":case"year":case"y":return this.toUTCDateTime().diff(e.toUTCDateTime(),"years").years}}}},88930(e,t,n){n.d(t,{S1:()=>a,VW:()=>l,lL:()=>u,rb:()=>h,t:()=>c});var r=n(97770),i=(n(98623),n(34747));const s=/^(?<hh>([01][0-9])|(2[0-3])):(?<mm>[0-5][0-9])(:(?<ss>[0-5][0-9]))?(\.(?<ms>\d+))?$/,o={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8,unknown:NaN};function a(e,t,n,s="system"){if("unknown"===n)return e;let o=new i.oh((0,r.wj)(s)),a=i.c9.fromJSDate(e,{zone:o}),l="decades"===n||"centuries"===n?"year":function(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}(n);return"decades"===n&&(t*=10),"centuries"===n&&(t*=100),a.plus({[l]:t}).toJSDate()}function l(e,t,n="milliseconds"){let r=e.getTime(),i=c(t,n,"milliseconds");return new Date(r+i)}function u(e,t,n="system"){let{unit:s}=t,o=Math.max(1,Math.trunc(t.value)),a=new i.oh((0,r.wj)(n)),l=i.c9.fromJSDate(e,{zone:a}),u=e=>e-e%o;switch(s){case"milliseconds":return l.startOf("second").plus({millisecond:u(l.millisecond)}).toJSDate();case"seconds":return l.startOf("minute").plus({second:u(l.second)}).toJSDate();case"minutes":return l.startOf("hour").plus({minute:u(l.minute)}).toJSDate();case"hours":return l.startOf("day").plus({hour:u(l.hour)}).toJSDate();case"days":return l.startOf("month").plus({day:u(l.day-1)}).toJSDate();case"weeks":{let e=l.startOf("year").startOf("week"),t=Math.floor(l.diff(e,"weeks").weeks);return e.plus({week:u(t)}).toJSDate()}case"months":return l.startOf("year").plus({month:u(l.month-1)}).toJSDate();case"years":case"decades":case"centuries":{let e=l.startOf("year"),t=("decades"===s?10:"centuries"===s?100:1)*o,n=e.year-e.year%t;return e.set({year:n}).toJSDate()}case"unknown":return e}}function h(e){let t=s.exec(e);if(!t)return null;let{hh:n,mm:r,ss:i,ms:a}=t.groups;return Number(n)*o.hours+Number(r)*o.minutes+Number(i||0)*o.seconds+Number(a||0)}function c(e,t,n){return 0===e?0:e*o[t]/o[n]}},48526(e,t,n){n.d(t,{A:()=>y});var r,i=n(32198),s=n(4576),o=n(4718),a=n(91429),l=n(5443),u=n(91075),h=n(86738),c=n(16930),d=n(90634),m=n(47610),f=n(56993),p=n(43937);let y=r=class extends u.A{constructor(e){super(function(e){if(!e)return;let{points:t,hasM:n,hasZ:r,spatialReference:i}=e;switch(t??=[],t?.at(0)?.length){case 4:r??=!0,n??=!0;break;case 3:r??=!0!==n,n??=!r;break;default:r??=!1,n??=!1}return i??=c.A.WGS84,{...e,hasM:n,hasZ:r,points:t,spatialReference:i}}(e)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){let e=(0,d.ge)(this);return e?new l.A({...e,spatialReference:this.spatialReference}):null}writePoints(e,t){t.points=(0,o.o8)(this.points)}clone(){let{points:e,spatialReference:t,hasM:n,hasZ:i}=this;return new r({points:(0,o.o8)(e),spatialReference:t.clone(),hasM:n,hasZ:i})}equals(e){if(this===e)return!0;if(null==e)return!1;let t=this.spatialReference,n=e.spatialReference;return!(null!=t!=(null!=n)||null!=t&&null!=n&&!t.equals(n))&&(0,s.aI)(this.points,e.points,m.v6)}addPoint(e){return(0,f.h)(this,e),Array.isArray(e)?this.points.push(e):this.points.push(e.toArray()),this.notifyChange("points"),this}getPoint(e){if(!this._validateInputs(e))return null;let t=this.points[e],n={x:t[0],y:t[1],spatialReference:this.spatialReference},r=2;return this.hasZ&&(n.z=t[2],r=3),this.hasM&&(n.m=t[r]),new h.A(n)}removePoint(e){if(!this._validateInputs(e))return null;let t=new h.A(this.points.splice(e,1)[0],this.spatialReference);return this.notifyChange("points"),t}setPoint(e,t){return this._validateInputs(e)&&((0,f.h)(this,t),Array.isArray(t)||(t=t.toArray()),this.points[e]=t,this.notifyChange("points")),this}toJSON(e){return this.write({},e)}_validateInputs(e){return null!=e&&e>=0&&e<this.points.length}};(0,i.Cg)([(0,a.MZ)({readOnly:!0})],y.prototype,"cache",null),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],y.prototype,"extent",null),(0,i.Cg)([(0,a.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],y.prototype,"points",void 0),(0,i.Cg)([(0,p.K)("points")],y.prototype,"writePoints",null),y=r=(0,i.Cg)([(0,a.$K)("esri.geometry.Multipoint")],y),y.prototype.toJSON.isDefaultToJSON=!0},82799(e,t,n){n.d(t,{A:()=>f});var r,i=n(32198),s=n(4718),o=n(91429),a=n(5443),l=n(91075),u=n(86738),h=n(16930),c=n(90634),d=n(56993),m=n(43937);let f=r=class extends l.A{constructor(e){super(function(e){if(!e)return;let{paths:t,hasM:n,hasZ:r,spatialReference:i}=e;switch(t??=[],function(e){return"number"==typeof e[0]?.[0]}(t)&&(t=[t]),t[0]?.[0]?.length){case 4:r??=!0,n??=!0;break;case 3:r??=!0!==n,n??=!r;break;default:r??=!1,n??=!1}return i??=h.A.WGS84,{...e,hasM:n,hasZ:r,paths:t,spatialReference:i}}(e)),this.curvePaths=void 0,this.paths=[],this.type="polyline"}get cache(){return this.commitProperty("curvePaths"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("paths"),this.commitProperty("spatialReference"),{}}writeCurvePaths(e,t){t.curvePaths=(0,s.o8)(e)}get extent(){let e=(0,c.Z3)(this),{spatialReference:t}=this;return e?new a.A({...e,spatialReference:t}):null}writePaths(e,t){t.paths=(0,s.o8)(this.paths)}addPath(e){if(!e)return;let t=this.paths,n=t.length;if(function(e){return!Array.isArray(e[0])}(e)){let r=[];for(let t=0,n=e.length;t<n;t++)r[t]=e[t].toArray();t[n]=r}else t[n]=e.slice();return this.notifyChange("paths"),this}clone(){let e=new r;return e.spatialReference=this.spatialReference,e.paths=(0,s.o8)(this.paths),e.curvePaths=(0,s.o8)(this.curvePaths),e.hasZ=this.hasZ,e.hasM=this.hasM,e}getPoint(e,t){if(!this._validateInputs(e,t))return null;let n=this.paths[e][t],r=this.hasZ,i=this.hasM;return r&&!i?new u.A(n[0],n[1],n[2],void 0,this.spatialReference):i&&!r?new u.A(n[0],n[1],void 0,n[2],this.spatialReference):r&&i?new u.A(n[0],n[1],n[2],n[3],this.spatialReference):new u.A(n[0],n[1],this.spatialReference)}insertPoint(e,t,n){return this._validateInputs(e,t,!0)&&((0,d.h)(this,n),Array.isArray(n)||(n=n.toArray()),this.paths[e].splice(t,0,n),this.notifyChange("paths")),this}removePath(e){if(!this._validateInputs(e,null))return null;let t=this.paths.splice(e,1)[0],n=this.spatialReference,r=t.map(e=>new u.A(e,n));return this.notifyChange("paths"),r}removePoint(e,t){if(!this._validateInputs(e,t))return null;let n=new u.A(this.paths[e].splice(t,1)[0],this.spatialReference);return this.notifyChange("paths"),n}setPoint(e,t,n){return this._validateInputs(e,t)&&((0,d.h)(this,n),Array.isArray(n)||(n=n.toArray()),this.paths[e][t]=n,this.notifyChange("paths")),this}_validateInputs(e,t,n=!1){if(null==e||e<0||e>=this.paths.length)return!1;if(null!=t){let r=this.paths[e];if(n&&(t<0||t>r.length)||!n&&(t<0||t>=r.length))return!1}return!0}toJSON(e){return this.write({},e)}};(0,i.Cg)([(0,o.MZ)({readOnly:!0})],f.prototype,"cache",null),(0,i.Cg)([(0,o.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],f.prototype,"curvePaths",void 0),(0,i.Cg)([(0,m.K)("curvePaths")],f.prototype,"writeCurvePaths",null),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],f.prototype,"extent",null),(0,i.Cg)([(0,o.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],f.prototype,"paths",void 0),(0,i.Cg)([(0,m.K)("paths")],f.prototype,"writePaths",null),f=r=(0,i.Cg)([(0,o.$K)("esri.geometry.Polyline")],f),f.prototype.toJSON.isDefaultToJSON=!0},4197(e,t,n){n.d(t,{Vj:()=>h,cj:()=>u,jh:()=>s,l5:()=>a,yH:()=>l});var r=n(34275),i=n(9093);function s(e){return e<=1024?Array(e).fill(0):new Float64Array(e)}function o(e){return((0,r.iu)(e)?e.byteLength/8:e.length)<=1024?Array.from(e):new Float64Array(e)}function a(e,t,n){return Array.isArray(e)?e.slice(t,t+n):e.subarray(t,t+n)}function l(e,t){if(0===t.length)return o(e);if(0===e.length)return o(t);let n=s(e.length+t.length);for(let t=0;t<e.length;++t)n[t]=e[t];for(let r=0;r<t.length;++r)n[e.length+r]=t[r];return n}function u(e){return[...e]}function h(e){let t=(0,i.vt)();for(let n=0;n<16;++n)t[n]=e[n];return t}},70328(e,t,n){n.d(t,{BI:()=>F,C:()=>o,DC:()=>d,Ej:()=>w,Ie:()=>C,Jt:()=>v,Lu:()=>T,Ne:()=>S,RF:()=>c,TF:()=>g,VL:()=>f,aI:()=>D,fA:()=>a,gE:()=>u,gX:()=>_,hZ:()=>M,iT:()=>m,is:()=>A,pg:()=>b,uJ:()=>y,vI:()=>x,vY:()=>l,vt:()=>s,w1:()=>h,yr:()=>p}),n(35522);var r=n(5443),i=(n(19419),n(4197));function s(e=I){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t){for(let n=0;n<6;n++)e[n]=t[n];return e}function a(e,t,n,r,i,o,a=s()){return a[0]=e,a[1]=t,a[2]=n,a[3]=r,a[4]=i,a[5]=o,a}function l(e,t=s()){return function(e,t,n,r=s()){return M(r,R),function(e,t,n=0,r=t.length/3){let i=e[0],s=e[1],o=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<r;e++)i=Math.min(i,t[n+3*e]),s=Math.min(s,t[n+3*e+1]),o=Math.min(o,t[n+3*e+2]),a=Math.max(a,t[n+3*e]),l=Math.max(l,t[n+3*e+1]),u=Math.max(u,t[n+3*e+2]);e[0]=i,e[1]=s,e[2]=o,e[3]=a,e[4]=l,e[5]=u}(r,e,t,n),r}(e,0,e.length/3,t)}function u(e,t=(0,i.jh)(24)){let[n,r,s,o,a,l]=e;return t[0]=n,t[1]=r,t[2]=s,t[3]=n,t[4]=r,t[5]=l,t[6]=n,t[7]=a,t[8]=s,t[9]=n,t[10]=a,t[11]=l,t[12]=o,t[13]=r,t[14]=s,t[15]=o,t[16]=r,t[17]=l,t[18]=o,t[19]=a,t[20]=s,t[21]=o,t[22]=a,t[23]=l,t}function h(e,t){return isFinite(e[2])||isFinite(e[5])?new r.A({xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}):new r.A({xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t,n=e){n[0]=Math.min(e[0],t[0]),n[1]=Math.min(e[1],t[1]),n[2]=Math.min(e[2],t[2]),n[3]=Math.max(e[3],t[3]),n[4]=Math.max(e[4],t[4]),n[5]=Math.max(e[5],t[5])}function d(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function m(e,[t,n,r]){!function(e,t,n,r){e[0]=Math.min(e[0],t),e[1]=Math.min(e[1],n),e[2]=Math.min(e[2],r),e[3]=Math.max(e[3],t),e[4]=Math.max(e[4],n),e[5]=Math.max(e[5],r)}(e,t,n,r)}function f(e){return e[0]>=e[3]?0:e[3]-e[0]}function p(e){return e[1]>=e[4]?0:e[4]-e[1]}function y(e){return e[2]>=e[5]?0:e[5]-e[2]}function g(e){let t=f(e),n=y(e),r=p(e);return t*t+n*n+r*r}function _(e,t=[0,0,0]){return t[0]=e[0]+f(e)/2,t[1]=e[1]+p(e)/2,t[2]=e[2]+y(e)/2,t}function w(e,t=[0,0,0]){return t[0]=f(e),t[1]=p(e),t[2]=y(e),t}function b(e,t){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function T(e,t){return t[0]=e[3],t[1]=e[4],t[2]=e[5],t}function S(e,t,n=e){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n!==e&&(n[3]=e[3],n[4]=e[4],n[5]=e[5]),n}function x(e,t,n=e){return n[3]=t[0],n[4]=t[1],n[5]=t[2],n!==e&&(n[0]=e[0],n[1]=e[1],n[2]=e[2]),e}function M(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function C(e){return e?M(e,R):s(R)}function v(e,t){return e[0]=t[0],e[1]=t[1],e[2]=-1/0,e[3]=t[2],e[4]=t[3],e[5]=1/0,e}function F(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=-1/0,e[3]=r,e[4]=i,e[5]=1/0,e}function A(e){return 6===e.length}function D(e,t,n){if(null==e||null==t)return e===t;if(!A(e)||!A(t))return!1;if(n){for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1}else for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}const R=[1/0,1/0,1/0,-1/0,-1/0,-1/0],I=[0,0,0,0,0,0];s(),n.d(t,["qv",0,R,"v_",0,I])},60408(e,t,n){function r(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function i(e){return void 0!==e.points}function s(e){return void 0!==e.x&&void 0!==e.y}function o(e){return void 0!==e.paths||void 0!==e.curvePaths}function a(e){return void 0!==e.rings||void 0!==e.curveRings}function l(e){return"object"==typeof e&&"vertexAttributes"in e}function u(e){return e?s(e)?"esriGeometryPoint":o(e)?"esriGeometryPolyline":a(e)?"esriGeometryPolygon":r(e)?"esriGeometryEnvelope":i(e)?"esriGeometryMultipoint":null:null}function h(e){return null!=e&&("hasZ"in e&&e.hasZ||"z"in e&&null!=e.z)}function c(e){return null!=e&&("hasM"in e&&e.hasM||"m"in e&&null!=e.m)}n.d(t,{$B:()=>u,Bi:()=>a,Pv:()=>h,Rg:()=>o,U9:()=>i,W0:()=>c,ZC:()=>r,fT:()=>s,uW:()=>l})},65864(e,t,n){n.d(t,{rS:()=>h,xD:()=>d});var r=n(5443),i=n(91075),s=n(48526),o=n(86738),a=n(39829),l=n(82799),u=n(60408);function h(e){return null==e?null:e instanceof i.A?e:(0,u.fT)(e)?o.A.fromJSON(e):(0,u.Rg)(e)?l.A.fromJSON(e):(0,u.Bi)(e)?a.A.fromJSON(e):(0,u.U9)(e)?s.A.fromJSON(e):(0,u.ZC)(e)?r.A.fromJSON(e):null}const c={esriGeometryPoint:o.A,esriGeometryPolyline:l.A,esriGeometryPolygon:a.A,esriGeometryEnvelope:r.A,esriGeometryMultipoint:s.A,esriGeometryMultiPatch:a.A};function d(e){return e&&c[e]||null}},50498(e,t,n){var r=n(66552),i=n(5443),s=n(91075),o=n(48526),a=n(86738),l=n(39829),u=n(82799);const h=(0,r.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),c=(0,r.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),d={base:s.A,key:"type",typeMap:{extent:i.A,multipoint:o.A,point:a.A,polyline:u.A,polygon:l.A}},m=new r.J({esriGeometryBezier3Curve:"cubic-bezier",esriGeometryCircularArc:"circular-arc",esriGeometryEllipticArc:"elliptic-arc"},{ignoreUnknown:!0});n.d(t,["Ye",0,c,"gy",0,h,"iI",0,m,"yR",0,d])},97770(e,t,n){n.d(t,{Ey:()=>R,F8:()=>D,J2:()=>C,Yq:()=>F,_m:()=>v,iS:()=>A,wj:()=>I});var r=n(66552),i=n(73444),s=n(98623),o=n(34747);const a={dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0},l={timeStyle:void 0,hour12:void 0,hourCycle:void 0,hour:void 0,minute:void 0,second:void 0},u={timeZone:"UTC"},h={year:"numeric",month:"numeric",day:"numeric"},c={year:"numeric",month:"long",day:"numeric"},d={year:"numeric",month:"short",day:"numeric"},m={year:"numeric",month:"long",weekday:"long",day:"numeric"},f={hour:"numeric",minute:"numeric"},p={...f,second:"numeric"},y={hourCycle:"h23"},g={...f,...y},_={...p,...y},w={"short-date":h,"short-date-short-time":{...h,...f},"short-date-short-time-24":{...h,...g},"short-date-long-time":{...h,...p},"short-date-long-time-24":{...h,..._},"short-date-le":h,"short-date-le-short-time":{...h,...f},"short-date-le-short-time-24":{...h,...g},"short-date-le-long-time":{...h,...p},"short-date-le-long-time-24":{...h,..._},"long-month-day-year":c,"long-month-day-year-short-time":{...c,...f},"long-month-day-year-short-time-24":{...c,...g},"long-month-day-year-long-time":{...c,...p},"long-month-day-year-long-time-24":{...c,..._},"day-short-month-year":d,"day-short-month-year-short-time":{...d,...f},"day-short-month-year-short-time-24":{...d,...g},"day-short-month-year-long-time":{...d,...p},"day-short-month-year-long-time-24":{...d,..._},"long-date":m,"long-date-short-time":{...m,...f},"long-date-short-time-24":{...m,...g},"long-date-long-time":{...m,...p},"long-date-long-time-24":{...m,..._},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":f,"long-time":p},b=(0,r.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),T={ar:"ar-u-nu-latn-ca-gregory",nn:"no-NN"};function S(){let e=(0,i.lR)();return(e&&T[e])??(0,i.QC)()}"mart"!==new Intl.DateTimeFormat("bs",{month:"long"}).formatToParts(new Date(2025,2)).find(({type:e})=>"month"===e)?.value.toLowerCase()&&(T.bs="sr-Latn-CS");let x=new WeakMap;const M=w["short-date-short-time"];function C(e){return w[e]}function v(e){let{dateStyle:t,timeStyle:n,hour12:r,year:i,month:s}=e,o={};return t?o.dateStyle=t:i&&(o.year=i,o.month=s||void 0),n&&!o.year&&(o.timeStyle=n,o.hour12="auto"===r?void 0:"always"===r),o}function F(e,t=M){return function(e){let t=x.get(e);if(!t){let n=S(),r=I(e.timeZone??"system"),i={...e,timeZone:r};t=new Intl.DateTimeFormat(n,i),x.set(e,t)}return t}(t).format(e)}function A(e,t=M){return F(new Date(e),{...t,...u,...l})}function D(e,t=M){return F(new Date(`1970-01-01T${e}Z`),{...t,...u,...a})}function R(e,t=M){let n=o.c9.fromISO(e,{setZone:!0});if(!n.isValid)return e;if(t.timeZone)return F(n.toJSDate(),t);let r=0===n.offset?"UTC":t.timeZone,i={...t,timeZone:r};return n.toLocaleString(i,{locale:S()})}function I(e){switch(e){case"system":return s.N;case s.L:return"UTC";default:return e}}(0,i.Ml)(()=>{x=new WeakMap}),n.d(t,["_v",0,b])},73444(e,t,n){n.d(t,{JK:()=>l,Ml:()=>y,QC:()=>c,lR:()=>h,oQ:()=>f});var r=n(36563);let i;n(44208);const s=globalThis.esriConfig?.locale,o=globalThis.document?.documentElement;function a(){let e=o?.getAttribute("lang"),t=globalThis.navigator?.language;return s??e??t??"en"}function l(){return void 0===i&&(i=a()),i}const u=/^(?<language>[a-z]{2,3})(?:-(?<extlang>[a-z]{3}))?(?:-[A-Z][a-z]{3})?(?:-(?<region>[A-Z]{2}|\d{3}))?(?:-.*)?$/;function h(e=l()){return d(e)?.language}function c(e=l()){let t=d(e);return t?.language&&t?.extlang?e.replace(`${t.language}-`,""):e}function d(e=l()){return u.exec(e)?.groups}const m=[];function f(e){return m.push(e),(0,r.hA)(()=>{m.splice(m.indexOf(e),1)})}new Map;const p=[];function y(e){return p.push(e),(0,r.hA)(()=>p.splice(p.indexOf(e),1))}function g(){let e=a();i!==e&&([...p].forEach(t=>t(e)),i=e,[...m].forEach(t=>t(e)))}globalThis.addEventListener?.("languagechange",g),o&&new MutationObserver(()=>{g()}).observe(o,{attributeFilter:["lang"]})},6518(e,t,n){n.d(t,{F:()=>a});var r=n(44208),i=n(75503),s=n(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new i.wq(9,(0,r.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){let e=Array(this._idByBounds.size),t=0;this._idByBounds.forEach((n,r)=>{e[t++]=r}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;let e=(0,s.Ie)();for(let t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){let t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,n){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,n)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){let t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221(e,t,n){n.d(t,{A:()=>m});var r=n(4576),i=n(49186),s=n(65529),o=n(53966),a=n(70328),l=n(19419),u=n(90708),h=n(6518),c=n(37730);const d=(0,a.vt)();class m{constructor(e){this.geometryInfo=e,this._boundsStore=new h.F,this._featuresById=new Map,this._usedMemory=0,this.events=new s.bk,this.featureAdapter=c.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;let[t,n,r,i]=this.fullBounds;return{xmin:t,ymin:n,xmax:r,ymax:i,spatialReference:e}}add(e){this._add(e),this._emitChanged()}addMany(e){for(let t of e)this._add(t);this._emitChanged()}upsertMany(e){let t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(r.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){let t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(let t of e){let e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(let n of e){let e=this._boundsStore.get(n.objectId);e&&t((0,a.Jt)(d,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;let t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new i.A("featurestore:invalid-feature","feature id is missing",{feature:e}));let n,r=this._featuresById.get(t);r?(e.displayId=r.displayId,n=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(r)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),e.geometry?.coords?.length?(n=(0,u.jQ)(n??(0,l.vt)(),e.geometry),null!=n&&this._boundsStore.set(t,n),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0):(this._boundsStore.set(t,null),this._featuresById.set(t,e))}_upsert(e){let t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new i.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;let n=this._featuresById.get(t);if(!n)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0;let{geometry:r,attributes:s}=e;for(let e in s)n.attributes[e]=s[e];return r&&(n.geometry=r,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),r)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(n)??0,n}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);let t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}},37730(e,t,n){var r=n(43334);const i={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,n)=>new r.Om(t,e.attributes,null,e.objectId,e.displayId,e.distance,e.vertexCount),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)};n.d(t,["T",0,i])},33771(e,t,n){n.r(t),n.d(t,{default:()=>b});var r=n(60999),i=n(49186),s=n(53966),o=n(34727),a=n(17676),l=n(67076),u=n(21325),h=n(90708),c=n(83221),d=n(31464),m=n(75752),f=n(85113),p=n(82832),y=n(34322),g=n(95466),_=n(54218);n(98623);const w="esri.layers.WFSLayer";class b{constructor(){this._customParameters=null,this._queryEngine=null,this._supportsPagination=!0}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){let{getFeatureUrl:n,getFeatureOutputFormat:r,fields:s,geometryType:o,featureType:l,maxRecordCount:u,maxTotalRecordCount:h,maxPageCount:f,objectIdField:p,customParameters:_}=e,{spatialReference:w,getFeatureSpatialReference:b}=(0,y.UH)(n,l,e.spatialReference);try{await(0,d.Nk)(b,w)}catch{throw new i.A("unsupported-projection","Projection not supported",{inSpatialReference:b,outSpatialReference:w})}(0,a.Te)(t),this._customParameters=_,this._featureType=l,this._fieldsIndex=g.A.fromLayerJSON({fields:s,dateFieldsTimeReference:s.some(e=>"esriFieldTypeDate"===e.type)?{timeZoneIANA:"UTC"}:null}),this._geometryType=o,this._getFeatureUrl=n,this._getFeatureOutputFormat=r,this._getFeatureSpatialReference=b,this._maxRecordCount=u,this._maxTotalRecordCount=h,this._maxPageCount=f,this._objectIdField=p,this._spatialReference=w;let S=await this._snapshotFeatures(t);if(S.errors.length>0&&(this._supportsPagination=!1,S=await this._snapshotFeatures(t),S.errors.length>0))throw S.errors[0];let x={type:"object-id",fieldName:p};return this._queryEngine=new m.do({fieldsIndex:this._fieldsIndex,geometryType:o,hasM:!1,hasZ:!1,featureIdInfo:x,spatialReference:w,timeInfo:null,featureStore:new c.A({geometryType:o,hasM:!1,hasZ:!1})}),this._queryEngine.featureStore.addMany(S.features),{warnings:T(S),extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async applyEdits(){throw new i.A("wfs-source:editing-not-supported","applyEdits() is not supported on WFSLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),(await this._queryEngine.executeQueryForIds(e,t.signal)).filter(_.Et)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),await this._queryEngine.executeQueryForSnapping(e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){return this._customParameters=e.customParameters,this._maxRecordCount=e.maxRecordCount,this._maxTotalRecordCount=e.maxTotalRecordCount,this._maxPageCount=e.maxPageCount,this._snapshotTask?.abort(),this._snapshotTask=(0,r.UT)(e=>this._snapshotFeatures({signal:e})),this._snapshotTask.promise.then(e=>{this._queryEngine.featureStore.clear(),this._queryEngine.featureStore.addMany(e.features);for(let t of T(e))s.A.getLogger(w).warn(new l.A("wfs-layer:refresh-warning",t.message,t.details));e.errors?.length&&s.A.getLogger(w).warn(new l.A("wfs-layer:refresh-error","Refresh completed with errors",{errors:e.errors}))},()=>{this._queryEngine.featureStore.clear()}),await this._waitSnapshotComplete(),{extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _snapshotFeatures(e){let t=e?.signal,n=this._maxTotalRecordCount,r=this._maxPageCount,i=this._supportsPagination&&r>1?await(0,y.E)(this._getFeatureUrl,this._featureType.typeName,{customParameters:this._customParameters,signal:t}):void 0,s=[],l=[];if(null==i)try{s=await this._singleQuery(t)}catch(e){(0,a.zf)(e)||l.push(e)}else{let e=function*(e,t,n){for(let r=0;r<t;r++)yield e._pageQuery(r,n)}(this,(0,o.qE)(Math.ceil(Math.min(i,n)/this._maxRecordCount),1,r),t);await Promise.allSettled(Array.from({length:10}).map(()=>async function(e,t,n){let r=e.next();for(;!r.done;){try{let e=await r.value;t.push(...e)}catch(e){(0,a.zf)(e)||n.push(e)}r=e.next()}}(e,s,l)))}return(0,a.Te)(t),{features:s,totalRecordCount:i,maxTotalRecordCount:n,maxPageCount:r,errors:l}}async _singleQuery(e){let t=Number.isFinite(this._maxRecordCount)&&this._maxRecordCount>0?this._maxRecordCount:void 0,n=await(0,y.x$)(this._getFeatureUrl,this._featureType.typeName,this._getFeatureSpatialReference,this._getFeatureOutputFormat,{customParameters:this._customParameters,count:t,signal:e});return this._processGeoJSON(n,{signal:e})}async _pageQuery(e,t){let n=e*this._maxRecordCount,r=await(0,y.x$)(this._getFeatureUrl,this._featureType.typeName,this._getFeatureSpatialReference,this._getFeatureOutputFormat,{customParameters:this._customParameters,startIndex:n,count:this._maxRecordCount,signal:t});return this._processGeoJSON(r,{startIndex:n,signal:t})}_processGeoJSON(e,t){(0,f.sO)(e,this._getFeatureSpatialReference.wkid);let{startIndex:n,signal:r}=t;(0,a.Te)(r);let i=(0,f.bd)(e,{geometryType:this._geometryType,hasZ:!1,objectIdField:this._objectIdField});if(!(0,u.aI)(this._spatialReference,this._getFeatureSpatialReference))for(let e of i)null!=e.geometry&&(e.geometry=(0,h.Ux)((0,d.Cv)((0,h.zv)(e.geometry,this._geometryType,!1,!1),this._getFeatureSpatialReference,this._spatialReference)));let s=n??1;for(let e of i){let t={};(0,p.MB)(this._fieldsIndex,t,e.attributes,!0),e.attributes=t,t[this._objectIdField]??(e.objectId=t[this._objectIdField]=s++)}return i}}function T(e){let t=[];return null!=e.totalRecordCount&&(e.features.length<e.totalRecordCount&&t.push({name:"wfs-layer:maxRecordCount-too-low",message:`Could only fetch ${e.features.length} of ${e.totalRecordCount} in ${e.maxPageCount} queries. Try increasing the value of WFSLayer.maxRecordCount.`,details:{recordCount:e.features.length,totalRecordCount:e.totalRecordCount}}),e.totalRecordCount>e.maxTotalRecordCount&&t.push({name:"wfs-layer:large-dataset",message:`The number of ${e.totalRecordCount} features exceeds the maximum allowed of ${e.maxTotalRecordCount}.`,details:{recordCount:e.features.length,totalRecordCount:e.totalRecordCount,maxTotalRecordCount:e.maxTotalRecordCount}})),t}},85113(e,t,n){n.d(t,{BM:()=>C,bd:()=>v,sO:()=>M,xD:()=>c});var r=n(67482),i=n(49186),s=n(21325),o=n(90708),a=n(43334),l=n(92722),u=n(30524);const h={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function c(e){return h[e]}function*d(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(let t of e.features)t&&(yield t)}}function*m(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(let t of e.coordinates)yield*t;break;case"MultiPolygon":for(let t of e.coordinates)for(let e of t)yield*e}}function f(e){for(let t of e)if(t.length>2)return!0;return!1}function p(e){let t=0;for(let n=0;n<e.length;n++){let r=e[n],i=e[(n+1)%e.length];t+=r[0]*i[1]-i[0]*r[1]}return t<=0}function y(e){let t=e[0],n=e[e.length-1];(t[0]!==n[0]||t[1]!==n[1]||t[2]!==n[2])&&e.push(t)}function g(e,t){let{coordinates:n,type:r}=e,i=t.hasZ??!1;switch(r){case"Point":return new l.A([],[...n],i,!1);case"LineString":return(0,o.Ap)({paths:[n],hasZ:!0},i,!1);case"MultiLineString":return(0,o.Ap)({paths:n,hasZ:!0},i,!1);case"MultiPoint":return(0,o.PR)({points:n,hasZ:!0},i,!1);case"Polygon":case"MultiPolygon":{let e=new l.A([],[],i,!1);for(let t of"Polygon"===r?[n]:n){_(e,t[0],i);for(let n=1;n<t.length;n++)w(e,t[n],i)}return e}}}function _(e,t,n){y(t),function(e){return!p(e)}(t)?T(e,t,n):b(e,t,n)}function w(e,t,n){y(t),function(e){return p(e)}(t)?T(e,t,n):b(e,t,n)}function b(e,t,n){for(let r of t)S(e,r,n);e.lengths.push(t.length)}function T(e,t,n){for(let r=t.length-1;r>=0;r--)S(e,t[r],n);e.lengths.push(t.length)}function S(e,[t,n,r],i){e.coords.push(t,n),i&&e.coords.push(r||0)}function x(e){switch(typeof e){case"string":return(0,r.C)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function M(e,t=4326){if(!e)throw new i.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new i.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});let{crs:n}=e;if(!n)return;let r="string"==typeof n?n:"name"===n.type?n.properties.name:"EPSG"===n.type?n.properties.code:null,o=(0,s.oT)({wkid:t})?RegExp(".*(CRS84H?|4326)$","i"):RegExp(`.*(${t})$`,"i");if(!r||!o.test(r))throw new i.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:n})}function C(e,t={}){let n,r=[],i=new Set,s=new Set,o=!1,a=null,l=!1,{geometryType:h=null}=t;for(let t of d(e)){let{geometry:e,properties:d,id:p}=t;if((!e||(h||=c(e.type),c(e.type)===h))&&(o||=f(m(e)),l||(l=null!=p,l&&(n=typeof p,d&&(a=Object.keys(d).filter(e=>d[e]===p)))),d&&a&&l&&null!=p&&(a.length>1?a=a.filter(e=>d[e]===p):1===a.length&&(a=d[a[0]]===p?a:[])),d))for(let e in d){if(i.has(e))continue;let t=x(d[e]);if("unknown"===t){s.add(e);continue}s.delete(e),i.add(e);let n=(0,u.rS)(e);n&&r.push({name:n,alias:e,type:t})}}let p=(0,u.rS)(1===a?.length&&a[0]||null)??void 0;if(p)for(let e of r)if(e.name===p&&(0,u.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:r,geometryType:h,hasZ:o,objectIdFieldName:p,objectIdFieldType:n,unknownFields:Array.from(s)}}function v(e,t){return Array.from(function*(e,t={}){let{geometryType:n,objectIdField:r}=t;for(let i of e){let{geometry:e,properties:s,id:o}=i;if(e&&c(e.type)!==n)continue;let l,u=s||{};r&&(l=u[r],null!=o&&!l&&(u[r]=l=o)),yield new a.Om(e&&g(e,t),u,null,l)}}(d(e),t))}},82832(e,t,n){n.d(t,{$1:()=>_,CR:()=>g,MB:()=>f,Yx:()=>h,bP:()=>d});var r=n(67482),i=n(18370),s=n(60408),o=n(21325),a=n(30524);class l{constructor(e){this.description=e,this.code=null}}class u{constructor(e){this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error=new l(e)}}function h(e){return new u(e)}class c{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function d(e){return new c(e)}const m=new Set;function f(e,t,n,r=!1){m.clear();for(let i in n){let s=e.get(i);if(!s)continue;let o=p(s,n[i]);if(m.add(s.name),s&&(r||s.editable)){let e=(0,a.CJ)(s,o);if(e)return h((0,a.uo)(e,s,o));t[s.name]=o}}for(let t of e.requiredFields??[])if(!m.has(t.name))return h(`missing required field "${t.name}"`);return null}function p(e,t){let n=t;return(0,a.WA)(e)&&"string"==typeof t?n=(0,a.XT)(t):(0,a.yM)(e)&&null!=t&&"string"!=typeof t?n=String(t):(0,a.vE)(e)&&"string"==typeof t&&(n=(0,r._)(t)),(0,a.WX)(n)}const y=(0,i.z)(()=>Promise.all([n.e(9187),n.e(8885),n.e(9117),n.e(3299),n.e(3456)]).then(()=>n(3637)));function g(e,t){if(!(0,s.Bi)(e)&&!(0,s.Rg)(e)||!(0,o.fn)(t))return e;let n=y.module;if(null==n)throw TypeError("simplify operator not loaded");return n.simplifyExecute({...e,spatialReference:t})??e}async function _(e,t){(0,o.fn)(e)&&("esriGeometryPolygon"===t||"esriGeometryPolyline"===t)&&await y.getImportPromise()}n.d(t,["PC",0,{supportsAutoIntervalBin:!0,supportsFixedIntervalBin:!0,supportsFixedBoundariesBin:!0,supportsDateBin:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsNormalization:!0,supportedStatisticTypes:["COUNT","SUM","AVG","VAR","STDDEV","MIN","MAX","PERCENTILE_CONT","PERCENTILE_DISC","CentroidAggregate","EnvelopeAggregate","ConvexHullAggregate"],supportedNormalizationTypes:["field","log","naturalLog","percentOfTotal","squareRoot"]}])},34322(e,t,n){n.d(t,{E:()=>O,Fu:()=>S,O8:()=>A,UH:()=>L,YW:()=>D,mG:()=>F,x$:()=>N});var r=n(56507),i=n(49186),s=n(5479),o=n(84952),a=n(5443),l=n(99917),u=n(16930),h=n(21325),c=n(50498),d=n(85113),m=n(13043),f=n(60694),p=n(20437),y=n(30524);const g="xlink:href",_="2.0.0",w="__esri_wfs_id__",b="wfs-layer:feature-type-not-found",T="wfs-layer:unknown-geometry-type";async function S(e,t){let n=function(e){let t=k(e);(function(e){let t=e.firstElementChild?.getAttribute("version");if(t&&t!==_)throw new i.A("wfs-layer:unsupported-wfs-version",`Unsupported WFS version ${t}. Supported version: ${_}`)})(t),B(t);let n=t.firstElementChild,r=(0,s.PP)(function(e){return(0,m.i)(e,{FeatureTypeList:{FeatureType:e=>{let t={typeName:"undefined:undefined",name:"",title:"",description:"",extent:null,namespacePrefix:"",namespaceUri:"",defaultSpatialReference:4326,supportedSpatialReferences:[]},n=new Set;return(0,m.p)(e,{Name:e=>{let{name:n,prefix:r}=E(e.textContent);t.typeName=`${r}:${n}`,t.name=n,t.namespacePrefix=r,t.namespaceUri=e.lookupNamespaceURI(r)},Abstract:e=>{t.description=e.textContent},Title:e=>{t.title=e.textContent},WGS84BoundingBox:e=>{t.extent=a.A.fromJSON(function(e){let t,n,r,i;for(let s of e.children)switch(s.localName){case"LowerCorner":[t,n]=s.textContent.split(" ").map(e=>Number.parseFloat(e));break;case"UpperCorner":[r,i]=s.textContent.split(" ").map(e=>Number.parseFloat(e))}return{xmin:t,ymin:n,xmax:r,ymax:i,spatialReference:h.KK}}(e))},DefaultCRS:e=>{let r=v(e);r&&(t.defaultSpatialReference=r,n.add(r))},OtherCRS:e=>{let t=v(e);t&&n.add(t)}}),t.title||=t.name,n.add(4326),t.supportedSpatialReferences.push(...n),t}}})}(n));return{operations:C(n),get featureTypes(){return Array.from(r())},readFeatureTypes:r}}((await(0,r.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetCapabilities",VERSION:_,...t?.customParameters},signal:t?.signal})).data);return function(e,t){(0,o.m3)(e)&&((0,o.FX)(e,t.operations.DescribeFeatureType.url,!0)&&(t.operations.DescribeFeatureType.url=(0,o.lM)(t.operations.DescribeFeatureType.url)),(0,o.FX)(e,t.operations.GetFeature.url,!0)&&(t.operations.GetFeature.url=(0,o.lM)(t.operations.GetFeature.url)))}(e,n),n}const x=["json","application/json; subtype=geojson; charset=utf-8","application/json; subtype=geojson","application/json","geojson","application/geo+json"];function M(e){for(let t of x){let n=e.findIndex(e=>e.toLowerCase()===t);if(n>=0)return e[n]}return null}function C(e){let t=!0,n={GetCapabilities:{url:""},DescribeFeatureType:{url:""},GetFeature:{url:"",outputFormat:null,supportsPagination:!1}},r=[],s=[];if((0,m.p)(e,{OperationsMetadata:{Parameter:e=>{if("outputformat"===e.getAttribute("name")?.toLowerCase())return{AllowedValues:{Value:({textContent:e})=>{e&&r.push(e)}}}},Operation:e=>{switch(e.getAttribute("name")){case"GetCapabilities":return{DCP:{HTTP:{Get:e=>{n.GetCapabilities.url=e.getAttribute(g)}}}};case"DescribeFeatureType":return{DCP:{HTTP:{Get:e=>{n.DescribeFeatureType.url=e.getAttribute(g)}}}};case"GetFeature":return{DCP:{HTTP:{Get:e=>{n.GetFeature.url=e.getAttribute(g)}}},Parameter:e=>{if("outputformat"===e.getAttribute("name")?.toLowerCase())return{AllowedValues:{Value:({textContent:e})=>{e&&s.push(e)}}}}}}},Constraint:e=>{switch(e.getAttribute("name")){case"KVPEncoding":return{DefaultValue:e=>{t="true"===e.textContent.toLowerCase()}};case"ImplementsResultPaging":return{DefaultValue:e=>{n.GetFeature.supportsPagination="true"===e.textContent.toLowerCase()}}}}}}),n.GetFeature.outputFormat=M(s)??M(r),!t)throw new i.A("wfs-layer:kvp-encoding-not-supported","WFS service doesn't support key/value pair (KVP) encoding");if(null==n.GetFeature.outputFormat)throw new i.A("wfs-layer:geojson-not-supported","WFS service doesn't support GeoJSON output format");return n}function v(e){let t=parseInt(e.textContent?.match(/(?<wkid>\d+$)/i)?.groups?.wkid??"",10);if(!Number.isNaN(t))return t}function F(e,t,n){return(0,s.I6)(e,e=>n?e.name===t&&e.namespaceUri===n:e.typeName===t||e.name===t)}async function A(e,t,n,r={}){let{featureType:s,extent:o}=await async function(e,t,n,r={}){let s=e.readFeatureTypes(),o=t?F(s,t,n):s.next().value,{spatialReference:a=new u.A({wkid:o?.defaultSpatialReference})}=r;if(null==o)throw t?new i.A(b,`The type '${t}' could not be found in the service`):new i.A("wfs-layer:empty-service","The service is empty");let c=o.extent;if(c&&!(0,h.aI)(c.spatialReference,a))try{await(0,l.initializeProjection)(c.spatialReference,a,void 0,r),c=(0,l.project)(c,a)}catch{throw new i.A("wfs-layer:unsupported-spatial-reference","Projection not supported")}return{extent:c,spatialReference:a,featureType:o}}(e,t,n,r),{spatialReference:a}=L(e.operations.GetFeature.url,s,r.spatialReference),{fields:c,geometryType:d,swapXY:m,objectIdField:f,geometryField:p}=await async function(e,t,n,r={}){let{typeName:s}=t,[o,a]=await Promise.allSettled([I(e.operations.DescribeFeatureType.url,s,r),R(e,s,n,r)]),l=e=>{let t=`An error occurred while getting info about the feature type '${s}'`;return new i.A("wfs-layer:getWFSLayerTypeInfo-error",t,{error:e})};if("rejected"===o.status)throw l(o.reason);if("rejected"===a.status)throw l(a.reason);let{fields:u,errors:h}=o.value??{},c=o.value?.geometryType||a.value?.geometryType,d=a.value?.swapXY??!1;if(null==c)throw new i.A(T,`The geometry type could not be determined for type '${s}`,{typeName:s,geometryType:c,fields:u,errors:h});return{...D(u??[]),geometryType:c,swapXY:d}}(e,s,a,r);return{url:e.operations.GetCapabilities.url,name:s.name,namespaceUri:s.namespaceUri,fields:c,geometryField:p,geometryType:d,objectIdField:f,spatialReference:r.spatialReference??new u.A({wkid:s.defaultSpatialReference}),extent:o,swapXY:m,wfsCapabilities:e,customParameters:r.customParameters}}function D(e){let t=e.find(e=>"geometry"===e.type),n=e.find(e=>"oid"===e.type);return e=e.filter(e=>"geometry"!==e.type),n||(n=new p.A({name:w,type:"oid",alias:w}),e.unshift(n)),{geometryField:t?.name??null,objectIdField:n.name,fields:e}}async function R(e,t,n,i={}){let s,o=!1,[a,l]=await Promise.all([N(e.operations.GetFeature.url,t,n,e.operations.GetFeature.outputFormat,{...i,count:1}),(0,r.A)(e.operations.GetFeature.url,{responseType:"text",query:z(t,n,void 0,{...i,count:1}),signal:i?.signal})]),u="FeatureCollection"===a.type&&a.features[0]?.geometry;if(u){let e;switch(s=c.gy.fromJSON((0,d.xD)(u.type)),u.type){case"Point":e=u.coordinates;break;case"LineString":case"MultiPoint":e=u.coordinates[0];break;case"MultiLineString":case"Polygon":e=u.coordinates[0][0];break;case"MultiPolygon":e=u.coordinates[0][0][0]}let t=/<[^>]*pos[^>]*> *(-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)/.exec(l.data);if(t){let n=e[0].toFixed(3),r=e[1].toFixed(3),i=parseFloat(t[1]).toFixed(3);n===parseFloat(t[2]).toFixed(3)&&r===i&&(o=!0)}}return{geometryType:s,swapXY:o}}async function I(e,t,n){return function(e,t){let{name:n}=E(e),r=k(t);B(r);let o=(0,s.I6)((0,m.i)(r.firstElementChild,{element:e=>e}),e=>e.getAttribute("name")===n);if(null!=o){let e=o.getAttribute("type"),t=e?(0,s.I6)((0,m.i)(r.firstElementChild,{complexType:e=>e}),t=>t.getAttribute("name")===E(e).name):(0,s.I6)((0,m.i)(o,{complexType:e=>e}),()=>!0);if(t)return function(e){let t,n=[],r=[],s=(0,m.i)(e,{complexContent:{extension:{sequence:{element:e=>e}}}});for(let o of s){let s,a,l=o.getAttribute("name");if(!l)continue;if(o.hasAttribute("type")?s=E(o.getAttribute("type")).name:(0,m.p)(o,{simpleType:{restriction:e=>(s=E(e.getAttribute("base")).name,{maxLength:e=>{a=+e.getAttribute("value")}})}}),!s)continue;let u="true"===o.getAttribute("nillable"),h=!1;switch(s.toLowerCase()){case"integer":case"nonpositiveinteger":case"negativeinteger":case"long":case"int":case"short":case"byte":case"nonnegativeinteger":case"unsignedlong":case"unsignedint":case"unsignedshort":case"unsignedbyte":case"positiveinteger":r.push(new p.A({name:l,alias:l,type:"integer",nullable:u,length:(0,y._b)("integer")}));break;case"float":case"double":case"decimal":r.push(new p.A({name:l,alias:l,type:"double",nullable:u,length:(0,y._b)("double")}));break;case"boolean":case"string":case"gyearmonth":case"gyear":case"gmonthday":case"gday":case"gmonth":case"anyuri":case"qname":case"notation":case"normalizedstring":case"token":case"language":case"idrefs":case"entities":case"nmtoken":case"nmtokens":case"name":case"ncname":case"id":case"idref":case"entity":case"duration":case"time":r.push(new p.A({name:l,alias:l,type:"string",nullable:u,length:a??(0,y._b)("string")}));break;case"datetime":case"date":r.push(new p.A({name:l,alias:l,type:"date",nullable:u,length:a??(0,y._b)("date")}));break;case"pointpropertytype":t="point",h=!0;break;case"multipointpropertytype":t="multipoint",h=!0;break;case"curvepropertytype":case"multicurvepropertytype":case"multilinestringpropertytype":t="polyline",h=!0;break;case"surfacepropertytype":case"multisurfacepropertytype":case"multipolygonpropertytype":t="polygon",h=!0;break;case"geometrypropertytype":case"multigeometrypropertytype":h=!0,n.push(new i.A(T,`geometry type '${s}' is not supported`,{type:(new XMLSerializer).serializeToString(e)}));break;default:n.push(new i.A("wfs-layer:unknown-field-type",`Unknown field type '${s}'`,{type:(new XMLSerializer).serializeToString(e)}))}h&&r.push(new p.A({name:l,alias:l,type:"geometry",nullable:u}))}for(let e of r)if("integer"===e.type&&!e.nullable&&P.has(e.name.toLowerCase())){e.type="oid";break}return{geometryType:t,fields:r,errors:n}}(t)}throw new i.A(b,`Type '${e}' not found in document`,{document:(new XMLSerializer).serializeToString(r)})}(t,(await(0,r.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"DescribeFeatureType",VERSION:_,TYPENAME:t,TYPENAMES:t,...n?.customParameters},signal:n?.signal})).data)}const P=new Set(["objectid","fid"]);async function N(e,t,n,s,o){let{data:a}=await(0,r.A)(e,{responseType:"text",query:z(t,n,s,o),signal:o?.signal});a=a.replaceAll(/": +(-?\d+),(\d+)(,)?/g,'": $1.$2$3');try{return JSON.parse(a)}catch(e){throw new i.A("wfs-layer:malformed-json","Error while parsing the response",{response:a,error:e})}}function z(e,t,n,r){let i="number"==typeof t?t:t.wkid;return{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:_,TYPENAMES:e,OUTPUTFORMAT:n,SRSNAME:"EPSG:"+i,STARTINDEX:r?.startIndex,COUNT:r?.count,...r?.customParameters}}async function O(e,t,n){let i=await(0,r.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:_,TYPENAMES:t,RESULTTYPE:"hits",...n?.customParameters},signal:n?.signal}),s=/numberMatched=["'](?<numberMatched>\d+)["']/gi.exec(i.data);if(s?.groups)return+s.groups.numberMatched}function k(e){return(new DOMParser).parseFromString(e.trim(),"text/xml")}function E(e){let[t,n]=e.split(":");return{prefix:n?t:"",name:n??t}}function B(e){let t="",n="";if((0,m.p)(e.firstElementChild,{Exception:e=>(t=e.getAttribute("exceptionCode"),{ExceptionText:e=>{n=e.textContent}})}),t)throw new i.A(`wfs-layer:${t}`,n)}function L(e,t,n){let r={wkid:t.defaultSpatialReference},i=null==n?.wkid?r:{wkid:n.wkid};return{spatialReference:i,getFeatureSpatialReference:(0,f.Fi)(e)||i.wkid&&t.supportedSpatialReferences.includes(i.wkid)?{wkid:i.wkid}:{wkid:t.defaultSpatialReference}}}n.d(t,["i5",0,w])},13043(e,t,n){function r(e,t){if(e&&t)for(let n of e.children)if(n.localName in t){let e=t[n.localName];if("function"==typeof e){let t=e(n);t&&r(n,t)}else r(n,e)}}function*i(e,t){for(let n of e.children)if(n.localName in t){let e=t[n.localName];"function"==typeof e?yield e(n):yield*i(n,e)}}n.d(t,{i:()=>i,p:()=>r})},39357(e,t,n){n.d(t,{A:()=>a});var r,i=n(32198),s=n(25482),o=n(91429);let a=r=class extends s.o{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"name",void 0),(0,i.Cg)([(0,o.MZ)({type:[String,Number],json:{write:{isRequired:!0}}})],a.prototype,"code",void 0),a=r=(0,i.Cg)([(0,o.$K)("esri.layers.support.CodedValue")],a)},53177(e,t,n){n.d(t,{A:()=>h});var r,i=n(32198),s=n(4718),o=n(91429),a=n(39357),l=n(76357),u=n(93223);let h=class extends l.A{static{r=this}constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){let n=String(e);this.codedValues.some(e=>(String(e.code)===n&&(t=e.name),!!t))}return t}clone(){return new r({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,i.Cg)([(0,o.MZ)({type:[a.A],json:{write:{isRequired:!0}}})],h.prototype,"codedValues",void 0),(0,i.Cg)([(0,u.e)({codedValue:"coded-value"})],h.prototype,"type",void 0),h=r=(0,i.Cg)([(0,o.$K)("esri.layers.support.CodedValueDomain")],h)},76357(e,t,n){n.d(t,{A:()=>u});var r=n(32198),i=n(66552),s=n(25482),o=n(91429),a=n(93223);const l=new i.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let u=class extends s.o{constructor(e){super(e),this.name=null,this.type=null}};(0,r.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,r.Cg)([(0,a.e)(l),(0,o.MZ)({json:{write:{isRequired:!0}}})],u.prototype,"type",void 0),u=(0,r.Cg)([(0,o.$K)("esri.layers.support.Domain")],u)},20437(e,t,n){n.d(t,{A:()=>f});var r,i=n(32198),s=n(66552),o=n(25482),a=n(91429),l=n(78888),u=n(8631),h=n(98453),c=n(36005),d=n(93223);const m=new s.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",currency:"currency",dateAndTime:"date-and-time",description:"description",emailAddress:"email-address",locationOrPlaceName:"location-or-place-name",marginOfError:"margin-of-error",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",phoneNumber:"phone-number",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier",url:"url"});let f=class extends o.o{static{r=this}constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch{}return n?.value??null}readValueType(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch{}return n?m.fromJSON(n.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,i.Cg)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,i.Cg)([(0,a.MZ)()],f.prototype,"description",void 0),(0,i.Cg)([(0,c.w)("description")],f.prototype,"readDescription",null),(0,i.Cg)([(0,a.MZ)({types:u.g,json:{read:{reader:u.r},write:!0}})],f.prototype,"domain",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,i.Cg)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],f.prototype,"length",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,i.Cg)([(0,d.e)(h.m)],f.prototype,"type",void 0),(0,i.Cg)([(0,a.MZ)()],f.prototype,"valueType",void 0),(0,i.Cg)([(0,c.w)("valueType",["description"])],f.prototype,"readValueType",null),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=r=(0,i.Cg)([(0,a.$K)("esri.layers.support.Field")],f)},95466(e,t,n){n.d(t,{A:()=>u});var r=n(49186),i=n(53966),s=n(12195),o=n(30524),a=n(98623),l=n(56400);class u{static fromJSON(e){return new u(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new u(e.fields??[],c(e))}static fromLayerJSON(e){return new u(e.fields??[],c(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;let n=[];for(let e of this.fields){let t=e?.name,r=(0,o.GZ)(t);if(t&&r){let i=(0,o.NF)(t);this._fieldsMap.set(t,e),this._fieldsMap.set(i,e),this._normalizedFieldsMap.set(r,e),n.push(`${i}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,o.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,o.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),!(0,o.te)(e)&&!(0,o.Xz)(e)&&(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}n.sort(),this.uid=n.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(let e of this.fields)!(0,o.te)(e)&&!(0,o.Xz)(e)&&!e.nullable&&void 0===(0,o.lD)(e)&&this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){return(0,o.Vb)({fieldName:e,fieldsMap:this._fieldsMap,normalizedFieldsMap:this._normalizedFieldsMap})}getTimeZone(e){let t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(i.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new r.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),"UTC"):h.has(t.type)?a.L:null:null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,o.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,s.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}const h=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function c(e){let t=new Map;if(!e.fields)return t;let n=!0===e.datesInUnknownTimezone,{timeInfo:r,editFieldsInfo:i}=e,s=(r?"startField"in r?r.startField:r.startTimeField:"")??"",u=(r?"endField"in r?r.endField:r.endTimeField:"")??"",c=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,l.ZS)(e.dateFieldsTimeReference):null,d=i?function(e){return"timeZone"in e}(i)?i.timeZone??c:i.dateFieldsTimeReference?(0,l.ZS)(i.dateFieldsTimeReference):c??"UTC":null,m=r?function(e){return"timeZone"in e}(r)?r.timeZone??c:r.timeReference?(0,l.ZS)(r.timeReference):c:null,f=new Map([[(0,o.NF)(i?.creationDateField??""),d],[(0,o.NF)(i?.editDateField??""),d],[(0,o.NF)(s),m],[(0,o.NF)(u),m]]);for(let{name:r,type:i}of e.fields)if(h.has(i))t.set(r,a.L);else if("date"!==i&&"esriFieldTypeDate"!==i)t.set(r,null);else if(n)t.set(r,a.L);else{let e=f.get((0,o.NF)(r??""))??c;t.set(r,e)}return t}},41628(e,t,n){n.d(t,{A:()=>l});var r,i=n(32198),s=n(91429),o=n(76357),a=n(93223);let l=class extends o.A{static{r=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new r({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,i.Cg)([(0,s.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,n){t[n]=[this.minValue||0,e]},isRequired:!0}}})],l.prototype,"maxValue",void 0),(0,i.Cg)([(0,s.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]},isRequired:!0}}})],l.prototype,"minValue",void 0),(0,i.Cg)([(0,a.e)({range:"range"})],l.prototype,"type",void 0),l=r=(0,i.Cg)([(0,s.$K)("esri.layers.support.RangeDomain")],l)},8631(e,t,n){n.d(t,{r:()=>d,g:()=>c});var r,i=n(53177),s=n(76357),o=n(32198),a=n(91429),l=n(93223);let u=class extends s.A{static{r=this}constructor(e){super(e),this.type="inherited"}clone(){return new r}};(0,o.Cg)([(0,l.e)({inherited:"inherited"})],u.prototype,"type",void 0),u=r=(0,o.Cg)([(0,a.$K)("esri.layers.support.InheritedDomain")],u);var h=n(41628);const c={key:"type",base:s.A,typeMap:{range:h.A,"coded-value":i.A,inherited:u}};function d(e){if(!e?.type)return null;switch(e.type){case"range":return h.A.fromJSON(e);case"codedValue":return i.A.fromJSON(e);case"inherited":return u.fromJSON(e)}return null}},98453(e,t,n){const r=new(n(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"});n.d(t,["m",0,r])}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5613],{22429(e,a,t){t.d(a,{v:()=>n});var r=t(7861);class n{constructor(){this._serviceMetadatas=new Map,this._itemDatas=new Map}async fetchServiceMetadata(e,a){let t=this._serviceMetadatas.get(e);if(t)return t;let n=await(0,r.L)(e,a);return this._serviceMetadatas.set(e,n),n}async fetchItemData(e){let{id:a}=e;if(!a)return null;let{_itemDatas:t}=this;if(t.has(a))return t.get(a);let r=await e.fetchData();return t.set(a,r),r}async fetchCustomParameters(e,a){let t=await this.fetchItemData(e);return t&&"object"==typeof t&&(a?a(t):t.customParameters)||null}}},92009(e,a,t){t.d(a,{L:()=>o});var r=t(70333),n=t(56507),l=t(49186),s=t(17676),i=t(60694),u=t(20655),c=t(80812);async function o(e,a){let t=(0,i.qg)(e);if(!t)throw new l.A("invalid-url","Invalid scene service url");let o={...a,sceneServerUrl:t.url.path,layerId:t.sublayer??void 0};if(o.sceneLayerItem??=await async function(e){let a=(await y(e)).serviceItemId;if(!a)return null;let t=new c.default({id:a,apiKey:e.apiKey}),l=await async function(e){let a=r.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;let t=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{let a=(await(0,n.A)(t,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,s.QP)(e)}return null}(e);null!=l&&(t.portal=new u.A({url:l}));try{return await t.load({signal:e.signal})}catch(e){return(0,s.QP)(e),null}}(o),null==o.sceneLayerItem)return f(o.sceneServerUrl.replace("/SceneServer","/FeatureServer"),o);let m=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{let t=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find(e=>"Feature Service"===e.type)||null;if(!t)return null;let r=new c.default({portal:t.portal,id:t.id});return await r.load(),r}catch(e){return(0,s.QP)(e),null}}(o);if(!m?.url)throw new l.A("related-service-not-found","Could not find feature service through portal item relationship");o.featureServiceItem=m;let d=await f(m.url,o);return d.portalItem=m,d}async function y(e){if(e.rootDocument)return e.rootDocument;let a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{e.rootDocument=(await(0,n.A)(e.sceneServerUrl,a)).data}catch{e.rootDocument={}}return e.rootDocument}async function f(e,a){let t=(0,i.qg)(e);if(!t)throw new l.A("invalid-feature-service-url","Invalid feature service url");let r=t.url.path,s=a.layerId;if(null==s)return{serverUrl:r};let u=y(a),c=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,o=(c?.layers?.[0]||c?.tables?.[0])?.customParameters,f=e=>{let t={query:{f:"json",...o},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(r,t)},m=f("anonymous").catch(()=>f("no-prompt")),[d,L]=await Promise.all([m,u]),p=L?.layers,w=d.data&&d.data.layers;if(!Array.isArray(w))throw Error("expected layers array");if(Array.isArray(p)){for(let e=0;e<Math.min(p.length,w.length);e++)if(p[e].id===s)return{serverUrl:r,layerId:w[e].id}}else if(null!=s&&s<w.length)return{serverUrl:r,layerId:w[s].id};throw Error("could not find matching associated sublayer")}},23154(e,a,t){t.d(a,{A6:()=>i,Aq:()=>L,Jo:()=>d,QM:()=>s});var r=t(77548),n=t(7861);const l=new Set(["Annotation Layer","Catalog Layer","Dimension Layer","Feature Layer","Oriented Imagery Layer"]);async function s(e,a){let{serviceJSON:t,layersJSON:r,...n}=await i(e,a);o(t);let l={serviceJSON:t,...n};return r&&(o(r),l.layersJSON=r),l}async function i(e,a){let{loadContext:t,...l}=a||{},s=t?await t.fetchServiceMetadata(e,l):await(0,n.L)(e,l),i=(0,r.G$)();m(s);let u={serviceJSON:s,preferredHost:i};if((s.currentVersion??0)<10.5)return u;let c=`${(0,r.$x)()??e}/layers`,o=t?await t.fetchServiceMetadata(c,l):await(0,n.L)(c,l);return m(o),u.layersJSON={layers:o.layers,tables:o.tables},u}function u(e){return l.has(e.type)}function c(e){return"Table"===e.type}function o(e){e.layers=e.layers?.filter(u),e.tables=e.tables?.filter(c)}function y(e){e.type||="Feature Layer"}function f(e){e.type||="Table"}function m(e){e.layers?.forEach(y),e.tables?.forEach(f)}function d(e){if(!e)return"FeatureLayer";switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer";case"Dimension Layer":return"DimensionFeatureLayer";case"Annotation Layer":return"AnnotationFeatureLayer"}return null}function L(e,a){if(!e)return a?"Table":"ArcGISFeatureLayer";switch(e){case"Annotation Layer":return"ArcGISAnnotationLayer";case"Catalog Layer":return"CatalogLayer";case"Dimension Layer":return"ArcGISDimensionLayer";case"Feature Layer":return"ArcGISFeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Parcel Layer":return"ParcelLayer";case"Table":return"Table";case"Topology Layer":return"TopologyLayer";case"Trace Network Layer":return"TraceNetworkLayer";case"Utility Network Layer":return"UtilityNetworkLayer";default:return null}}},2976(e,a,t){const r={AnnotationFeatureLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(2889),t.e(4674),t.e(7283),t.e(7537)]).then(()=>t(20737))).default,BingMapsLayer:async()=>(await Promise.all([t.e(8278),t.e(7865),t.e(6554),t.e(6684)]).then(()=>t(17029))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(6361),t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(8247),t.e(4674),t.e(7283),t.e(8589),t.e(7005),t.e(9480),t.e(6377),t.e(9389)]).then(()=>t(82411))).default,CSVLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(4718)]).then(()=>t(68695))).default,CatalogLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(8247),t.e(4674),t.e(893),t.e(7283),t.e(7013),t.e(2522),t.e(3312)]).then(()=>t(83508))).default,DimensionFeatureLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(2889),t.e(4674),t.e(7283),t.e(8361)]).then(()=>t(25077))).default,DimensionLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(3813)]).then(()=>t(71493))).default,ElevationLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(9953),t.e(8732),t.e(3483)]).then(()=>t(38732))).default,FeatureLayer:async()=>(await Promise.all([t.e(6361),t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(8247),t.e(4674),t.e(7283),t.e(8589),t.e(5853)]).then(()=>t(18589))).default,GaussianSplatLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(9177),t.e(6475)]).then(()=>t(36475))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(3864)]).then(()=>t(15481))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(9657)]).then(()=>t(63201))).default,GroupLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6569)]).then(()=>t(85989))).default,ImageryLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(893),t.e(7074),t.e(9800),t.e(7772),t.e(8768)]).then(()=>t(87772))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7074),t.e(2754),t.e(9800),t.e(9235),t.e(3500),t.e(1003),t.e(2806),t.e(7870)]).then(()=>t(90124))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(9953),t.e(9177),t.e(6451),t.e(9229)]).then(()=>t(61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(9953),t.e(7552),t.e(1843),t.e(7005),t.e(9480),t.e(9177),t.e(8197),t.e(6451),t.e(3527)]).then(()=>t(49013))).default,KMLLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(3910),t.e(5128),t.e(5566),t.e(1722),t.e(1214),t.e(6854),t.e(8441)]).then(()=>t(162))).default,KnowledgeGraphLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(8247),t.e(9696),t.e(8245),t.e(7173),t.e(3902),t.e(4934),t.e(8692)]).then(()=>t(28692))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(1588),t.e(9695)]).then(()=>t(49695))).default,LinkChartLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(8247),t.e(9696),t.e(8245),t.e(7173),t.e(3902),t.e(4934),t.e(3309)]).then(()=>t(93309))).default,MapImageLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(4674),t.e(893),t.e(6884),t.e(2241)]).then(()=>t(7656))).default,MapNotesLayer:async()=>(await Promise.all([t.e(6361),t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(8247),t.e(4674),t.e(7283),t.e(8589),t.e(7173),t.e(4403)]).then(()=>t(96299))).default,MediaLayer:async()=>(await Promise.all([t.e(6361),t.e(9917),t.e(8278),t.e(7865),t.e(9894),t.e(2491)]).then(()=>t(90182))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(6377),t.e(1780)]).then(()=>t(65977))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(7269),t.e(349)]).then(()=>t(40349))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(6361),t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(8247),t.e(4674),t.e(7283),t.e(8589),t.e(4051),t.e(931)]).then(()=>t(16852))).default,ParquetLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(3819),t.e(5952),t.e(2156)]).then(()=>t(99680))).default,PointCloudLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(2869),t.e(7984),t.e(7885)]).then(()=>t(77885))).default,RouteLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(2869),t.e(3910),t.e(5128),t.e(5566),t.e(1722),t.e(1214),t.e(6854),t.e(9385)]).then(()=>t(39622))).default,SceneLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(2869),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(7005),t.e(9480),t.e(6377),t.e(4844)]).then(()=>t(2e4))).default,SketchLayer:async()=>(await Promise.all([t.e(6361),t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(8247),t.e(4674),t.e(7283),t.e(8589),t.e(7173),t.e(4152)]).then(()=>t(15056))).default,StreamLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(8686)]).then(()=>t(79457))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(6361),t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(2889),t.e(8247),t.e(4674),t.e(7283),t.e(4780)]).then(()=>t(97483))).default,TileLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(4674),t.e(893),t.e(6884),t.e(6811)]).then(()=>t(71756))).default,UnknownLayer:async()=>(await Promise.all([t.e(9917),t.e(146)]).then(()=>t(146))).default,UnsupportedLayer:async()=>(await Promise.all([t.e(9917),t.e(5165)]).then(()=>t(45165))).default,VectorTileLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(9953),t.e(5228),t.e(7499),t.e(9260)]).then(()=>t(50638))).default,VideoLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(3910),t.e(5128),t.e(4674),t.e(9894),t.e(6875)]).then(()=>t(86875))).default,ViewshedLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(1588),t.e(6650)]).then(()=>t(96650))).default,VoxelLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(2869),t.e(167)]).then(()=>t(90167))).default,WCSLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7074),t.e(2754),t.e(9800),t.e(9235),t.e(3500),t.e(2806),t.e(2061)]).then(()=>t(20521))).default,WFSLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(9953),t.e(3910),t.e(5128),t.e(5566),t.e(7552),t.e(1722),t.e(1214),t.e(6854),t.e(2889),t.e(6263),t.e(5688)]).then(()=>t(21901))).default,WMSLayer:async()=>(await Promise.all([t.e(6361),t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(2869),t.e(3910),t.e(5128),t.e(1904)]).then(()=>t(51904))).default,WMTSLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(7269),t.e(309)]).then(()=>t(20309))).default,WebTileLayer:async()=>(await Promise.all([t.e(9917),t.e(8278),t.e(7865),t.e(6554),t.e(7269)]).then(()=>t(47314))).default};t.d(a,["U",0,r])},66964(e,a,t){t.d(a,{Ju:()=>w,K8:()=>g,XH:()=>h,Y5:()=>p,_r:()=>i,bO:()=>c,l:()=>P,nu:()=>v,pJ:()=>o,rc:()=>y});var r=t(60694),n=t(92009),l=t(23154),s=t(77548);function i(e,a){let{id:t,name:r}=e,n={id:t,name:r};return u(n,e,a),n}function u(e,a,t){let r=(0,l.Aq)(a.type,t);r&&(e.layerType=r)}async function c(e,a,t){let r,n;if(function(e){return!!e&&Array.isArray(e.layers)&&Array.isArray(e.tables)}(e)&&f(e))n=e;else{let l=await t.fetchServiceMetadata(a,{customParameters:o(e)?.customParameters});r=(0,s.G$)(),n=m(e,l),d(n,l)}return L(n),{data:n,preferredHost:r}}function o(e){if(!e)return null;let{layers:a,tables:t}=e;return a?.[0]??t?.[0]??null}function y(e,a){return null==a?null:[...e.layers??[],...e.tables??[]].find(e=>e.id===a)}function f(e){return[...e.layers??[],...e.tables??[]].every(e=>!!e.layerType)}function m(e,a){return{...e,layers:e?.layers??a.layers?.map(e=>i(e))??[],tables:e?.tables??a.tables?.map(e=>i(e,!0))??[]}}function d(e,a){let t=e.layers??[],r=e.tables??[],n=[...a.layers??[],...a.tables??[]];for(let e of[...t,...r]){let{id:a,layerType:t}=e;if(t)continue;let l=n.find(({id:e})=>e===a);l&&u(e,l,r.includes(e))}}function L(e){e.layers=e.layers?.filter(I),e.tables=e.tables?.filter(I)}async function p(e,a,t){if(e?.layers?.length||e?.tables?.length){if(!f(e)){let n=(0,r.qg)(a)?.url.path;if(!n)return;d(e,await t.fetchServiceMetadata(n,{customParameters:o(e)?.customParameters}))}L(e)}}function w(e,a){return[...e.layers??[],...e.tables??[]].filter(({layerType:e})=>e?a.includes(e):a.includes("ArcGISFeatureLayer"))}function h(e){return(e?.layers?.length??0)+(e?.tables?.length??0)}const S=new Set(["ArcGISAnnotationLayer","ArcGISDimensionLayer","ArcGISFeatureLayer","CatalogLayer","OrientedImageryLayer","SubtypeGroupLayer","SubtypeGroupTable","Table"]);function I(e){return!!e.layerType&&S.has(e.layerType)}function P(e){switch(e){case"annotation-feature":return["ArcGISAnnotationLayer"];case"catalog":return["CatalogLayer"];case"dimension-feature":return["ArcGISDimensionLayer"];case"feature":return["ArcGISFeatureLayer","Table"];case"oriented-imagery":return["OrientedImageryLayer"];case"subtype-group":return["SubtypeGroupLayer","SubtypeGroupTable"]}return null}function g(e){switch(e){case"ArcGISAnnotationLayer":return"AnnotationFeatureLayer";case"ArcGISDimensionLayer":return"DimensionFeatureLayer";case"ArcGISFeatureLayer":case"Table":return"FeatureLayer";case"CatalogLayer":return"CatalogLayer";case"OrientedImageryLayer":return"OrientedImageryLayer";case"SubtypeGroupLayer":case"SubtypeGroupTable":return"SubtypeGroupLayer"}return null}async function v(e,a,t){if(!e?.url)return a??{};if(a??={},!a.layers){let r=await t.fetchServiceMetadata(e.url);a.layers=r.layers?.map(e=>i(e))}let{serverUrl:r,portalItem:l}=await(0,n.L)(e.url,{sceneLayerItem:e,customParameters:o(a)?.customParameters}).catch(()=>({serverUrl:null,portalItem:null}));if(null==r)return a.tables=[],a;if(!a.tables&&l){let e=await l.fetchData().catch(()=>null);if(e?.tables)a.tables=e.tables.map(({id:e,name:a})=>({id:e,name:a}));else{let n=await t.fetchServiceMetadata(r,{customParameters:o(e)?.customParameters}).catch(()=>null);a.tables=n?.tables?.map(e=>i(e,!0))}}if(a.tables)for(let e of a.tables)e.url=`${r}/${e.id}`;return a}},10407(e,a,t){t.d(a,{It:()=>m,LG:()=>s,OM:()=>c,Sm:()=>o,Y:()=>i,bK:()=>u,sQ:()=>y});var r=t(99917),n=t(16930),l=t(28735);function s(e,a){if(!i(e,a)){let t=e.typeKeywords;t?t.push(a):e.typeKeywords=[a]}}function i(e,a){return!!e.typeKeywords?.includes(a)}function u(e){return i(e,f.HOSTED_SERVICE)}function c(e,a){let t=e.typeKeywords;if(t){let e=t.indexOf(a);e>-1&&t.splice(e,1)}}function o(e,a,t){t?s(e,a):c(e,a)}async function y(e){let a,t=e.clone().normalize();if(t.length>1)for(let e of t)a?e.width>a.width&&(a=e):a=e;else a=t[0];return async function(e){let a=e.spatialReference;if(a.isWGS84)return e.clone();if(a.isWebMercator)return(0,l.ci)(e);let t=n.A.WGS84;return await(0,r.initializeProjection)(a,t),(0,r.project)(e,t)}(a)}const f={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function m(e){let{portal:a,isOrgItem:t,itemControl:r}=e,n=a.user?.privileges,l=!n||n.includes("features:user:edit"),s=!!t&&!!n?.includes("features:user:fullEdit"),i="update"===r||"admin"===r;return i?s=l=!0:s&&(l=!0),{features:{edit:l,fullEdit:s},content:{updateItem:i}}}t.d(a,["mm",0,f])},45613(e,a,t){t.d(a,{fromItem:()=>m,n:()=>d});var r=t(49186),n=t(44208),l=t(92009),s=t(23154),i=t(22429),u=t(2976),c=t(77548),o=t(80812),y=t(66964),f=t(10407);async function m(e){let{portalItem:a}=e;a&&!(a instanceof o.default)&&(a=new o.default(a));let t=await async function(e){return await e.load(),async function(e){let a=e.className,t=u.U[a];return{constructor:await t(),properties:e.properties}}(await d(e,new i.v))}(a);return new(0,t.constructor)({portalItem:a,...t.properties})}async function d(e,a){switch(e.type){case"3DTiles Service":return e.typeKeywords.includes("3DObject")?{className:"UnsupportedLayer"}:e.typeKeywords.includes("GaussianSplat")?{className:"GaussianSplatLayer"}:{className:"IntegratedMesh3DTilesLayer"};case"CSV":return{className:"CSVLayer"};case"Feature Collection":return async function(e){await e.load();let a=(0,f.Y)(e,"Map Notes"),t=(0,f.Y)(e,"Markup");if(a||t)return{className:(0,n.A)("sketch-layer-enabled")?"SketchLayer":"MapNotesLayer"};if((0,f.Y)(e,"Route Layer"))return{className:"RouteLayer"};let r=await e.fetchData();return 1===(0,y.XH)(r)?{className:"FeatureLayer"}:{className:"GroupLayer"}}(e);case"Feature Service":return async function(e,a){let t=await L(e,a);if("object"==typeof t){let{sourceJSON:e,className:a}=t,r={sourceJSON:e};return null!=t.id&&(r.layerId=t.id),{className:a||"FeatureLayer",properties:r}}return{className:"GroupLayer"}}(e,a);case"Feed":case"Stream Service":return{className:"StreamLayer"};case"GeoJson":return{className:"GeoJSONLayer"};case"Group Layer":return{className:"GroupLayer"};case"Image Service":return async function(e,a){await e.load();let t=e.typeKeywords?.map(e=>e.toLowerCase())??[];if(t.includes("elevation 3d layer"))return{className:"ElevationLayer"};if(t.includes("tiled imagery"))return{className:"ImageryTileLayer"};let r=(await a.fetchItemData(e))?.layerType;if("ArcGISTiledImageServiceLayer"===r)return{className:"ImageryTileLayer"};if("ArcGISImageServiceLayer"===r)return{className:"ImageryLayer"};let n=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)}),l=n.cacheType?.toLowerCase(),s=n.capabilities?.toLowerCase().includes("tilesonly"),i=n.tileInfo?.format?.toLowerCase()??"",u=null==l&&["jpg","jpeg","png","png8","png24","png32","mixed"].includes(i);return"map"===l||u||s?{className:"ImageryTileLayer"}:{className:"ImageryLayer"}}(e,a);case"KML":return{className:"KMLLayer"};case"Knowledge Graph Layer":return{className:"KnowledgeGraphLayer"};case"Map Service":return async function(e,a){return await async function(e,a){let{tileInfo:t}=await a.fetchServiceMetadata(e.url,{customParameters:await a.fetchCustomParameters(e)});return t}(e,a)?{className:"TileLayer"}:{className:"MapImageLayer"}}(e,a);case"Media Layer":return{className:"MediaLayer"};case"Parquet Feature Layer":return{className:"ParquetLayer"};case"Scene Service":return async function(e,a){let t=await L(e,a,async()=>{try{if(!e.url)return[];let{serverUrl:t}=await(0,l.L)(e.url,{sceneLayerItem:e});return(await a.fetchServiceMetadata(t))?.tables??[]}catch{return[]}});if("object"==typeof t){let r,n={};if(null==t.id?r=e.url:(n.layerId=t.id,r=`${e.url}/layers/${t.id}`),e.typeKeywords?.length)for(let a of Object.keys(c.XX))if(e.typeKeywords.includes(a))return{className:c.XX[a]};let l=await a.fetchServiceMetadata(r,{customParameters:await a.fetchCustomParameters(e,e=>(0,y.pJ)(e)?.customParameters)});return{className:c.XX[l?.layerType]||"SceneLayer",properties:n}}return!1===t&&"Voxel"===(await a.fetchServiceMetadata(e.url))?.layerType?{className:"VoxelLayer"}:{className:"GroupLayer"}}(e,a);case"Video Service":return async function(e,a){return"object"==typeof await L(e,a)?{className:"VideoLayer"}:{className:"GroupLayer"}}(e,a);case"Vector Tile Service":return{className:"VectorTileLayer"};case"WCS":return{className:"WCSLayer"};case"WFS":return{className:"WFSLayer"};case"WMS":return{className:"WMSLayer"};case"WMTS":return{className:"WMTSLayer"};default:throw new r.A("portal:unknown-item-type","Unknown item type '${type}'",{type:e.type})}}async function L(e,a,t){let{url:n,type:l}=e,i="Feature Service"===l;if(!n)return{};if(/\/\d+$/.test(n)){if(i){let t=await a.fetchServiceMetadata(n,{customParameters:await a.fetchCustomParameters(e,e=>(0,y.pJ)(e)?.customParameters)});(0,c.Gh)(e,(0,c.G$)());let{id:l,type:i}=t,u=(0,s.Jo)(i);if(!u)throw new r.A("from-portal-item:unsupported",`'${n}' has unsupported type: '${i}'`);return{id:l,className:u,sourceJSON:t}}return{}}if("Video Service"===l)return!(((await a.fetchServiceMetadata(n)).layers?.length??0)>1)&&{};await e.load();let u=await a.fetchItemData(e);if(i){let{data:t,preferredHost:l}=await(0,y.bO)(u,n,a);if(0===(0,y.XH)(t))throw new r.A("from-portal-item:no-data",`The feature service '${n}' does not have any supported layers or tables`);(0,c.Gh)(e,l);let s=p(t);if("object"==typeof s){let e=(0,y.rc)(t,s.id);return{id:s.id,className:(0,y.K8)(e?.layerType)}}return s}if("Scene Service"===l&&(u=await(0,y.nu)(e,u,a)),(0,y.XH)(u)>0)return p(u);let o=await a.fetchServiceMetadata(n);return t&&(o.tables=await t()),p(o)}function p(e){return 1===(0,y.XH)(e)&&{id:(0,y.pJ)(e)?.id}}},7861(e,a,t){t.d(a,{L:()=>n});var r=t(56507);async function n(e,a){return(await(0,r.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}})).data}}}]);
|