@arcgis/core 5.1.0-next.80 → 5.1.0-next.81
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{d5fd99ee40bba9b48a54.js → 1e2c0c6d724f7639d4c1.js} +27 -27
- package/assets/esri/core/workers/chunks/2bd69a7734d170e190ed.js +1 -0
- package/assets/esri/core/workers/chunks/{c1d4110aa494a1dba3c4.js → 455d08294e0f5c5509ff.js} +1 -1
- package/assets/esri/core/workers/chunks/{5da2051f548c2942e01a.js → 4af39fa53bc0b79101ed.js} +1 -1
- package/assets/esri/core/workers/chunks/{87d2021e91d025a2a142.js → 5c7ba4b8a9ec2e2e02b5.js} +1 -1
- package/assets/esri/core/workers/chunks/{1f82a0f134ea912fc686.js → 66fe1634c6e8f72fc653.js} +1 -1
- package/assets/esri/core/workers/chunks/{96b13b6042cdf5833d39.js → 67abbe81c16de26f61d8.js} +1 -1
- package/assets/esri/core/workers/chunks/{8f6f5dad52747d252aac.js → 7cee7ffaf941a4fe23b0.js} +1 -1
- package/assets/esri/core/workers/chunks/{fb9e3e7cd532ac4353f1.js → 84821dff3bcc51161802.js} +2 -2
- package/assets/esri/core/workers/chunks/{6a0352d20596ca3f4b64.js → 88eb1e4320c4ada01711.js} +1 -1
- package/assets/esri/core/workers/chunks/97719271a3e4c9f2b2c9.js +1 -0
- package/assets/esri/core/workers/chunks/9cac70164d8528c283af.js +1 -0
- package/assets/esri/core/workers/chunks/ac5999c88c27b49cd760.js +1 -0
- package/assets/esri/core/workers/chunks/b811d62284be95f4beb6.js +1 -0
- package/assets/esri/core/workers/chunks/{3b9100c59a8050f4834e.js → bbc27d9285162696d089.js} +1 -1
- package/assets/esri/core/workers/chunks/bd8cb64b6e08839398f3.js +1 -0
- package/assets/esri/core/workers/chunks/{d7324a00ed576e7a37b1.js → c758e16b57c96ce88294.js} +1 -1
- package/assets/esri/core/workers/chunks/c8ef80a7c46d7d2c5172.js +1 -0
- package/assets/esri/core/workers/chunks/cbf1a03f54bd8d2a2b47.js +1 -0
- package/assets/esri/core/workers/chunks/d9c3f14eee4db7a7137b.js +1 -0
- package/assets/esri/core/workers/chunks/{3f242f8d092f601c3abf.js → f77d23ee60c876b01e4b.js} +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_en.json +1 -1
- package/config.js +1 -1
- package/form/elements/inputs.js +1 -1
- package/geometry/SpatialReference.js +1 -1
- package/geometry/support/coordsUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/FeatureLayer.d.ts +2 -2
- package/layers/FeatureLayer.js +1 -1
- package/layers/graphics/data/QueryEngine.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/sources/MemorySource.js +1 -1
- package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
- package/layers/graphics/sources/support/CSVSourceWorker.js +1 -1
- package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/vectorTiles/RenderBucket.js +1 -1
- package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTile.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueCircle.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueLine.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/input/MapViewInputManager.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/input/SceneInputManager.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/tessellationUtils.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialInitParameters.js +2 -0
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/ChapmanAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/LocalAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/MarsAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsRenderer.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/NoiseTextureAtlas.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/haze/Haze.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlightBuffer.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
- package/views/3d/webgl-engine/effects/precipitation/Precipitation.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillComputationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/CutFillVisualizationRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/StencilUtils.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastMaskTechnique.js +2 -0
- package/views/VideoView.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileGenerationUtils.js +1 -1
- package/views/draw/support/createUtils.js +1 -1
- package/views/input/BrowserEventSource.js +1 -1
- package/views/input/InputManager.js +1 -1
- package/views/input/handlers/LatestPen.js +2 -0
- package/views/input/handlers/LatestPointer.js +1 -1
- package/views/input/types.d.ts +1 -1
- package/views/interactive/Tooltip.js +1 -1
- package/views/interactive/editGeometry/EditGeometry.js +1 -1
- package/views/support/unnormalizationUtils.js +2 -0
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/renderState.js +1 -1
- package/widgets/ElevationProfile/support/profileUtils.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/assets/esri/core/workers/chunks/2da62687ff678b690839.js +0 -1
- package/assets/esri/core/workers/chunks/4eed175277eb0df3c821.js +0 -1
- package/assets/esri/core/workers/chunks/4f9d027055f3a616173c.js +0 -1
- package/assets/esri/core/workers/chunks/63381d81adce0a0d2089.js +0 -1
- package/assets/esri/core/workers/chunks/6dbddf5ab1867ac2ac80.js +0 -1
- package/assets/esri/core/workers/chunks/99c189e1de2b1f14799b.js +0 -1
- package/assets/esri/core/workers/chunks/9aa6b32cb65fbaa93218.js +0 -1
- package/assets/esri/core/workers/chunks/9d434360dfce1e49b7b9.js +0 -1
- package/assets/esri/core/workers/chunks/fb5a2205f05afc396119.js +0 -1
- package/views/interactive/editGeometry/unnormalizationHelper.js +0 -2
package/widgets/FeatureTable.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import{isSome as i}from"../core/arrayUtils.js";import{deprecateWidget as s}from"../core/deprecate.js";import n from"../core/Logger.js";import{watch as l,sync as o,syncAndInitial as a,initial as r,on as c}from"../core/reactiveUtils.js";import{renderingSanitizer as d}from"../core/sanitizerUtils.js";import{formatFileSize as h}from"../core/unitFormatUtils.js";import{property as m,subclass as p}from"../core/accessorSupport/decorators.js";import{geometryTypes as u}from"../geometry/support/typeUtils.js";import{isLayerFromCatalog as g}from"../layers/catalog/catalogUtils.js";import{isKnowledgeGraphLayer as w,isMapImageLayer as b,isSubtypeGroupLayer as v}from"../layers/support/layerUtils.js";import y from"../tables/AttributeTableTemplate.js";import f from"../time/TimeExtent.js";import _ from"./Widget.js";import{isSupportedImage as M,getCalciteIconForAttachment as V}from"./Attachments/support/attachmentUtils.js";import{loadPromptComponents as C,Prompt as A}from"./Editor/components/Prompt.js";import E from"./FeatureTable/ColumnMenuVisibleElements.js";import S from"./FeatureTable/FeatureTableViewModel.js";import T from"./FeatureTable/VisibleElements.js";import{isGroupColumn as I,isFieldColumn as D}from"./FeatureTable/support/columnUtils.js";import P from"./FeatureTable/support/TableTemplate.js";import{loadFieldColumnComponents as R,isIFeatureTableSupportedLayer as k,isIFeatureTableSupportedLayerWithAttachments as x,getRelationshipIdsToShow as L}from"./FeatureTable/support/tableUtils.js";import{loadCalciteComponents as O}from"./support/componentsUtils.js";import{globalCss as F}from"./support/globalCss.js";import{getIconForLayer as j}from"./support/iconUtils.js";import{messageBundle as z,vmEvent as $,tsx as U,tsxFragment as N}from"./support/widget.js";import{storeNode as H,discardNode as B}from"./support/widgetUtils.js";var Z;const G="esri-feature-table",W=`${G}__dialog`,Q=`${G}__attachments-view`,K={base:G,content:`${G}__content`,menuPopover:`${G}__menu-popover`,layerDropdownMenu:`${G}__layer-switcher-menu`,tableContainer:`${G}__table-container`,tableContainerWithAttachments:`${G}__table-container--attachments`,tableNavigation:`${G}__table-navigation`,attachmentsView:Q,attachmentsViewContent:`${Q}__content`,attachmentsViewDetails:`${Q}__details`,attachmentsViewDropArea:`${Q}__drop-area`,attachmentsViewDropAreaLabel:`${Q}__drop-area__label`,attachmentsViewDropAreaMessage:`${Q}__drop-area__message`,attachmentsViewIcon:`${Q}__icon`,attachmentsViewInformation:`${Q}__information`,attachmentsViewInformationData:`${Q}__information__data`,attachmentsViewInformationLabel:`${Q}__information__label`,attachmentsViewList:`${Q}__list`,attachmentsViewListFileSize:`${Q}__list__filesize`,attachmentsViewListThumbnail:`${Q}__list__thumbnail`,expanded:`${G}__expanded`,collapsed:`${G}__collapsed`,dialog:`${W}`,dialogContent:`${W}__content`,dialogHeader:`${W}__header`,footerMessage:`${G}__footer__message`,footerIconDanger:`${G}__footer__icon--danger`,footerIconSuccess:`${G}__footer__icon--success`},q={checkCircle:"check-circle",chevronRight:"chevron-right",clearSelection:"clear-selection",downloadTo:"download-to",exclamationMarkTriangle:"exclamation-mark-triangle",expand:"expand",exportToCSV:"file-csv",folderOpen:"folder-open",delete:"trash",layers:"layers",moveUp:"move-up",plus:"plus",refresh:"refresh",reset:"reset",save:"save",showAll:"selection-x",showColumn:"show-column",showSelected:"selection-filter",table:"table",upload:"upload",zoomToSelection:"zoom-to-object"};let J=Z=class extends _{constructor(e,t){super(e,t),this._attachmentsDialogPreviewLoading=!1,this._attachmentsInput=null,this._columnVisibilityActions=new Map,this.attachmentsList=null,this.closed=!1,this.collapsed=!1,this.description=null,this.disabled=!1,this.messagesEditor=null,this.navigationScale="m",this.title=null,this.viewModel=new S,this.visibleElements=new T,this.announceDeprecation=()=>{s(n.getLogger(this),"Feature Table","arcgis-feature-table",{version:"5.0"})},this._showDeleteSelectionPrompt=this._showDeleteSelectionPrompt.bind(this),this._showDiscardEditsPrompt=this._showDiscardEditsPrompt.bind(this),this._resetNestedViews=this._resetNestedViews.bind(this)}initialize(){this.addHandles([l(()=>[this.isQueryingOrSyncing,this.editingEnabled],()=>this.scheduleRender()),l(()=>[this._effectiveVisibleElements,this._effectiveVisibleElements.columnDescriptions,this._effectiveVisibleElements.columnMenus,this._effectiveVisibleElements.columnMenuItems,this.columns.length],()=>{this.columns.forEach(e=>e.visibleElements=this._effectiveVisibleElements),this.refreshCellContent()},o),l(()=>[this.topLayerDisabled,this.columns],()=>this.columns.forEach(e=>e.topLayerDisabled=this.topLayerDisabled),a),l(()=>this._effectiveVisibleElements.selectionColumn,e=>{this.grid&&(this.grid.selectionColumnEnabled=e)},r),c(()=>this.viewModel,"show-related-table",e=>this._onShowRelatedTable(e)),l(()=>this.editingEnabled,()=>{const{attachmentsViewOptions:e}=this;this.clearPrompt(),e&&(e.form?.reset(),e.candidates=null)})])}loadDependencies(){return Promise.all([O({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),alert:()=>import("@esri/calcite-components/dist/components/calcite-alert"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),dialog:()=>import("@esri/calcite-components/dist/components/calcite-dialog"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),pagination:()=>import("@esri/calcite-components/dist/components/calcite-pagination"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),progress:()=>import("@esri/calcite-components/dist/components/calcite-progress"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")}),C(),R()])}destroy(){this.drainRelatedTables(),this.clearPrompt()}get _attachmentsViewIsVisible(){return!(null==this.attachmentsViewOptions.objectId&&!this.relatedTables.some(e=>null!=e.attachmentsViewOptions.objectId))}get _columnVisibilityActionDisabled(){const e=this.effectiveTable;return e.menuConfig?.disabled??0===e.columns.length}get _dialogIsOpen(){return!!this.attachmentsViewOptions.dialogInfo}get _effectiveDescription(){const{description:e}=this;return null!=e?d.sanitize("function"==typeof e?e():e):void 0}get _effectiveLayers(){const{layer:e,layers:t}=this,i=t?.length?t.filter(k):[],s=i.length?i:[...this._viewLayers];return e&&!s.includes(e)&&s.push(e),s}get _effectiveTitle(){const{layer:e,messages:i,state:s,highlightIds:n,title:l,size:o}=this;if(l)return d.sanitize("function"==typeof l?l():l);if(!i)return"";if(!e)return i.noLayer;switch(s){case"disabled":return i.errorLayer;case"ready":case"loading":return i.loading;case"error":return i.errorData}return t(i.header,{title:d.sanitize(e.title),count:o,selected:n.length})}get _effectiveVisibleElements(){return this.visibleElementsOverride??this.visibleElements}get _filteredTables(){const e=this.relatedTables.toArray(),t=1===e.length;return this.allRelatedTablesVisible?e:t?[e[0]]:this._attachmentsViewIsVisible?e.slice(-1):e.slice(-2)}get _hasAttachmentsViewError(){return null!=this.attachmentsViewOptions.error}get _hasCustomMenuItems(){return!!this.menuConfig?.items?.length}get _hasDefaultMenuItems(){return!!(this._showClearSelectionAction||this._showDeleteSelectionAction||this._showExportSelectionToCSVAction||this._showRefreshDataAction||this._showZoomToSelectionAction||this._showSelectedRecordsShowSelectedAction||this._showSelectedRecordsShowAllAction||this._showColumnVisibilityAction)}get _shouldShowGrid(){return this.allRelatedTablesVisible||1===this.relatedTables.length&&!this._attachmentsViewIsVisible}get _shouldShowMenu(){const{header:e,menu:t}=this._effectiveVisibleElements;return!(!e||!t||!this._hasDefaultMenuItems&&!this._hasCustomMenuItems)}get _showClearSelectionAction(){return!(!this.highlightIds.length||!this._effectiveVisibleElements.menuItems?.clearSelection||this.relatedTables.length||this._attachmentsViewIsVisible)}get _showColumnVisibilityAction(){const{columnVisibilityMenu:e,header:t,menu:i,menuItems:s}=this._effectiveVisibleElements;return!(!(t&&i&&e&&!1!==s?.toggleColumns)||this.showRelatedTableCallback||this.allRelatedTablesVisible||this._attachmentsViewIsVisible)}get _showDeleteSelectionAction(){return!(!(this.editingEnabled&&this.highlightIds.length&&this._effectiveVisibleElements.menuItems?.deleteSelection&&this.layer?.capabilities?.operations?.supportsDelete)||this.relatedTables.length||this._attachmentsViewIsVisible)}get _showExportSelectionToCSVAction(){return!(!(this._effectiveVisibleElements.menuItems.exportSelectionToCSV&&this.layer&&this.highlightIds.length)||this.relatedTables.length)}get _showLayerDropdown(){return!(!this._effectiveLayers.length||!this._effectiveVisibleElements.layerDropdown)}get _shouldShowNavigationBar(){const e=!!this.relatedTable||this._attachmentsViewIsVisible;return!this.tableParent&&e}get _showRefreshDataAction(){return!!this._effectiveVisibleElements.menuItems?.refreshData}get _showSelectedRecordsShowSelectedAction(){const e=this.objectIds.length,t=this.highlightIds.length;return!(!t||!this._effectiveVisibleElements.menuItems?.selectedRecordsShowSelectedToggle||e&&t===e||this.relatedTables.length||this._attachmentsViewIsVisible)}get _showSelectedRecordsShowAllAction(){return!(!this._effectiveVisibleElements.menuItems?.selectedRecordsShowAllToggle||!this.objectIds.length||this.relatedTables.length)}get _showZoomToSelectionAction(){return!(!this.view||!this.highlightIds.length||this.effectiveTable.layer?.isTable||!this._effectiveVisibleElements.menuItems?.zoomToSelection)}get _viewLayers(){const e=this.view?.map;if(!e)return[];const t=new Set,i=e=>{!k(e)||v(e)||t.has(e)||"sublayer"===e.type&&!e.capabilities?.operations?.supportsQuery||(e.load(),t.add(e))},s=e=>{g(e)||"catalog-footprint"===e.type||(w(e)?(e.load(),e.layers?.forEach(i),e.tables?.forEach(i)):b(e)?(e.loadAll(),e.allSublayers?.forEach(i),e.subtables?.forEach(i)):v(e)?(e.loadAll(),e.sublayers?.forEach(i)):i(e))};return e.allLayers.forEach(s),e.allTables.forEach(s),[...t.values()]}get grid(){return this.viewModel.grid}get actionColumn(){return this.viewModel.actionColumn}get actionColumnConfig(){return this.viewModel.actionColumnConfig}set actionColumnConfig(e){this.viewModel.actionColumnConfig=e}get activeFilters(){return this.viewModel.activeFilters}get activeSortOrders(){return this.viewModel.activeSortOrders}get allColumns(){return this.viewModel.allColumns}get allColumnsVisible(){return this.viewModel.allColumnsVisible}get allRelatedTablesVisible(){return this.viewModel.allRelatedTablesVisible}get allVisibleColumns(){return this.viewModel.allVisibleColumns}get attachmentsColumns(){return this.viewModel.attachmentsColumns}get attachmentsEnabled(){return this.viewModel.attachmentsEnabled}set attachmentsEnabled(e){this.viewModel.attachmentsEnabled=e}get attachmentsViewOptions(){return this.viewModel.attachmentsViewOptions}set attachmentsViewOptions(e){this.viewModel.attachmentsViewOptions=e}get attributeTableTemplate(){return this.viewModel.attributeTableTemplate}set attributeTableTemplate(e){this.viewModel.attributeTableTemplate=e}get autoRefreshEnabled(){return this.viewModel.autoRefreshEnabled}set autoRefreshEnabled(e){this.viewModel.autoRefreshEnabled=e}get autoSaveEnabled(){return this.viewModel.autoSaveEnabled}set autoSaveEnabled(e){this.viewModel.autoSaveEnabled=e}get canAddRelatedFeature(){return this.viewModel.canAddRelatedFeature}get clearPrompt(){return this.viewModel.clearPrompt}set clearPrompt(e){this.viewModel.clearPrompt=e}get columnPerformanceModeEnabled(){return this.viewModel.columnPerformanceModeEnabled}set columnPerformanceModeEnabled(e){this.viewModel.columnPerformanceModeEnabled=e}get columnReorderingEnabled(){return this.viewModel.columnReorderingEnabled}set columnReorderingEnabled(e){this.viewModel.columnReorderingEnabled=e}get columns(){return this.viewModel.columns}get definitionExpression(){return this.viewModel.definitionExpression}set definitionExpression(e){this.viewModel.definitionExpression=e}get container(){return super.container}set container(e){super.container=e}get editingEnabled(){return this.viewModel.editingEnabled}set editingEnabled(e){this.viewModel.editingEnabled=e}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get effectiveSize(){return this.viewModel.effectiveSize}get effectiveTable(){return this.relatedTable||this}get fieldColumns(){return this.viewModel.fieldColumns}get filterGeometry(){return this.viewModel.filterGeometry}set filterGeometry(e){this.viewModel.filterGeometry=e}get filterBySelectionEnabled(){return this.viewModel.filterBySelectionEnabled}set filterBySelectionEnabled(e){this.viewModel.filterBySelectionEnabled=e}get filterByViewExtent(){return this.viewModel.filterByViewExtent}set filterByViewExtent(e){this.viewModel.filterByViewExtent=e}get groupColumns(){return this.viewModel.groupColumns}get hasContingentValues(){return this.viewModel.hasContingentValues}get hasInvalidPendingEdits(){return this.viewModel.hasInvalidPendingEdits}get hasPendingEdits(){return this.viewModel.hasPendingEdits}get hiddenFields(){return this.viewModel.hiddenFields}set hiddenFields(e){this.viewModel.hiddenFields=e}get highlightEnabled(){return this.viewModel.highlightEnabled}set highlightEnabled(e){this.viewModel.highlightEnabled=e}get highlightIds(){return this.viewModel.highlightIds}set highlightIds(e){this.viewModel.highlightIds=e}get icon(){return q.table}set icon(e){this._overrideIfSome("icon",e)}get initialSize(){return this.viewModel.initialSize}set initialSize(e){this.viewModel.initialSize=e}get isQueryingOrSyncing(){return this.viewModel.isQueryingOrSyncing}get isSyncing(){return this.viewModel.isSyncing}get isSyncingAttachments(){return this.viewModel.isSyncingAttachments}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get layers(){return this.viewModel.layers}set layers(e){this.viewModel.layers=e}get layerView(){return this.viewModel.layerView}get maxSize(){return this.viewModel.maxSize}set maxSize(e){this.viewModel.maxSize=e}get messages(){return this.viewModel.messages}set messages(e){this.viewModel.messages=e}get messagesCommon(){return this.viewModel.messagesCommon}set messagesCommon(e){this.viewModel.messagesCommon=e}get messagesUnits(){return this.viewModel.messagesUnits}set messagesUnits(e){this.viewModel.messagesUnits=e}get messagesURIUtils(){return this.viewModel.messagesURIUtils}set messagesURIUtils(e){this.viewModel.messagesURIUtils=e}get menuConfig(){return this.viewModel.menuConfig}set menuConfig(e){this.viewModel.menuConfig=e}get multipleSelectionEnabled(){return this.viewModel.multipleSelectionEnabled}set multipleSelectionEnabled(e){this.viewModel.multipleSelectionEnabled=e}get multipleSelectionEnabledOverride(){return this.viewModel.multipleSelectionEnabledOverride}set multipleSelectionEnabledOverride(e){this.viewModel.multipleSelectionEnabledOverride=e}get multiSortEnabled(){return this.viewModel.multiSortEnabled}set multiSortEnabled(e){this.viewModel.multiSortEnabled=e}get multipleSortPriority(){return this.viewModel.multipleSortPriority}set multipleSortPriority(e){this.viewModel.multipleSortPriority=e}get noDataMessage(){return this.viewModel.noDataMessage}set noDataMessage(e){this.viewModel.noDataMessage=e}get objectIds(){return this.viewModel.objectIds}set objectIds(e){this.viewModel.objectIds=e}get outFields(){return this.viewModel.outFields}set outFields(e){this.viewModel.outFields=e}get pageCount(){return this.viewModel.pageCount}get pageIndex(){return this.viewModel.pageIndex}set pageIndex(e){this.viewModel.pageIndex=e}get pageSize(){return this.viewModel.pageSize}set pageSize(e){this.viewModel.pageSize=e}get paginationEnabled(){return this.viewModel.paginationEnabled}set paginationEnabled(e){this.viewModel.paginationEnabled=e}get pendingEditsCount(){return this.viewModel.pendingEditsCount}get prompt(){return this.viewModel.prompt}set prompt(e){this.viewModel.prompt=e}get relatedRecordsEnabled(){return this.viewModel.relatedRecordsEnabled}set relatedRecordsEnabled(e){this.viewModel.relatedRecordsEnabled=e}get relatedTable(){return this.viewModel.relatedTable}get relatedTableHasContingentValues(){return this.viewModel.relatedTableHasContingentValues}get relatedTableHasInvalidPendingEdits(){return this.viewModel.relatedTableHasInvalidPendingEdits}get relatedTableHasPendingEdits(){return this.viewModel.relatedTableHasPendingEdits}get relatedTables(){return this.viewModel.relatedTables}get relationship(){return this.viewModel.relationship}get relationshipColumnConfigs(){return this.viewModel.relationshipColumnConfigs}set relationshipColumnConfigs(e){this.viewModel.relationshipColumnConfigs=e}get relationshipColumns(){return this.viewModel.relationshipColumns}get relationshipConfig(){return this.viewModel.relationshipConfig}set relationshipConfig(e){this.viewModel.relationshipConfig=e}get relationshipInfos(){return this.viewModel.relationshipInfos}get returnGeometryEnabled(){return this.viewModel.returnGeometryEnabled}set returnGeometryEnabled(e){this.viewModel.returnGeometryEnabled=e}get returnMEnabled(){return this.viewModel.returnMEnabled}set returnMEnabled(e){this.viewModel.returnMEnabled=e}get returnZEnabled(){return this.viewModel.returnZEnabled}set returnZEnabled(e){this.viewModel.returnZEnabled=e}get rowHighlightIds(){return this.viewModel.rowHighlightIds}set rowHighlightIds(e){this.viewModel.rowHighlightIds=e}get selectionManager(){return this.viewModel.selectionManager}set selectionManager(e){this.viewModel.selectionManager=e}get selectionSource(){return this.viewModel.selectionSource}set selectionSource(e){this.viewModel.selectionSource=e}get showAllRelatedTables(){return this.viewModel.showAllRelatedTables}set showAllRelatedTables(e){this.viewModel.showAllRelatedTables=e}get showPrompt(){return this.viewModel.showPrompt}set showPrompt(e){this.viewModel.showPrompt=e}get showRelatedTableCallback(){return this.viewModel.showRelatedTableCallback}set showRelatedTableCallback(e){this.viewModel.showRelatedTableCallback=e}get size(){return this.viewModel.size}get state(){return this.viewModel.state}get supportsAddAttachments(){return this.viewModel.supportsAddAttachments}get supportsAttachments(){return this.viewModel.supportsAttachments}get supportsDeleteAttachments(){return this.viewModel.supportsDeleteAttachments}get supportsResizeAttachments(){return this.viewModel.supportsResizeAttachments}get supportsUpdateAttachments(){return this.viewModel.supportsUpdateAttachments}get syncTemplateOnChangesEnabled(){return this.viewModel.syncTemplateOnChangesEnabled}set syncTemplateOnChangesEnabled(e){this.viewModel.syncTemplateOnChangesEnabled=e}get syncViewSelection(){return this.viewModel.syncViewSelection}set syncViewSelection(e){this.viewModel.syncViewSelection=e}get syncWithViewSelectionManager(){return this.syncViewSelection}set syncWithViewSelectionManager(e){this.syncViewSelection=e}get tableController(){return this.viewModel.tableController}set tableController(e){this.viewModel.tableController=e}get tableParent(){return this.viewModel.tableParent}set tableParent(e){this.viewModel.tableParent=e}get tableTemplate(){return this.viewModel.tableTemplate}set tableTemplate(e){this.viewModel.tableTemplate=e}get tableTemplateOverride(){return this.viewModel.tableTemplateOverride}set tableTemplateOverride(e){this.viewModel.tableTemplateOverride=e}get timeExtent(){return this.viewModel.timeExtent}set timeExtent(e){this.viewModel.timeExtent=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get visibleColumns(){return this.viewModel.visibleColumns}get visibleElementsOverride(){const{attachmentsViewOptions:e,relatedTable:t,tableController:i,visibleElements:s}=this,{columnDescriptions:n,columnMenus:l,tooltips:o}=s,a=null!=e.objectId;if(t)return new T({columnDescriptions:n,columnMenus:l,tooltips:o,close:s.close,header:s.header,layerDropdown:s.layerDropdown,layerDropdownIcons:s.layerDropdownIcons,menu:s.menu,menuItems:s.menuItems,progress:s.progress,selectionColumn:!1,columnMenuItems:new E({sortAscending:!1,sortDescending:!1})});if(i){const e=i.relatedTable===this,t=i.allRelatedTablesVisible,r=e&&s.selectionColumn&&!t&&!a,c=e&&!t&&!a;return new T({columnDescriptions:n,columnMenus:l,tooltips:o,selectionColumn:r,close:!1,header:!1,layerDropdown:!1,menu:!1,pendingEditsFooter:!1,progress:!1,columnMenuItems:new E({sortAscending:c,sortDescending:c})})}return a?new T({columnDescriptions:n,columnMenus:l,tooltips:o,close:s.close,header:s.header,layerDropdown:s.layerDropdown,layerDropdownIcons:s.layerDropdownIcons,menu:s.menu,menuItems:s.menuItems,progress:s.progress,selectionColumn:!1,columnMenuItems:new E({sortAscending:!1,sortDescending:!1})}):null}addPendingEdits(e){this.viewModel.addPendingEdits(e)}async deleteAttachments(e,t,i){null!=e&&t?.length&&(i?this._showDeleteAttachmentPrompt(e,t):await this.viewModel.deleteAttachments(e,t))}async deleteSelection(e){this.highlightIds.length&&(e?this._showDeleteSelectionPrompt():await this.viewModel.deleteSelection())}async discardPendingEdits(e,t){return t?this._showDiscardEditsPrompt(e):this.viewModel.discardPendingEdits(e)}async downloadAttachmentById(e,t){return this.viewModel.downloadAttachmentById(e,t)}drainRelatedTables(){this.viewModel.drainRelatedTables()}async exportSelectionToCSV(e){return this.viewModel.exportSelectionToCSV(e)}findColumn(e){return this.viewModel.findColumn(e)}getFeatureStoreItemByObjectId(e){return this.viewModel.getFeatureStoreItemByObjectId(e)}goToPage(e){this.viewModel.goToPage(e)}hideAllColumns(){this.viewModel.hideAllColumns()}hideColumn(e){this.grid?.hideColumn(e)}nextPage(){this.viewModel.nextPage()}previousPage(){this.viewModel.previousPage()}async refresh(){await this.viewModel.refresh()}refreshCellContent(){this.viewModel.refreshCellContent()}async saveAttachmentsViewForm(){await this.viewModel.saveAttachmentsViewForm()}async savePendingEdits(){await this.viewModel.savePendingEdits()}showAllColumns(){this.viewModel.showAllColumns()}showColumn(e){this.grid?.showColumn(e)}sortColumn(e,t){this.viewModel.sortColumn(e,t)}scrollLeft(){this.viewModel.scrollLeft()}scrollToBottom(){this.viewModel.scrollToBottom()}scrollToIndex(e){this.viewModel.scrollToIndex(e)}scrollToRow(e){this.viewModel.scrollToRow(e)}scrollToTop(){this.viewModel.scrollToTop()}toggleColumnVisibility(e){this.viewModel.toggleColumnVisibility(e)}async zoomToSelection(){return this.effectiveTable.viewModel.zoomToSelection()}render(){const{_effectiveVisibleElements:e,isQueryingOrSyncing:t,menuConfig:i,state:s}=this;return U("div",{bind:this,class:this.classes(K.base,F.widget)},U("calcite-panel",{bind:this,class:K.content,closable:e.close,closed:this.closed,collapsed:this.collapsed,collapsible:e.collapse,description:this._effectiveDescription,disabled:this.disabled||"disabled"===s&&!this._effectiveLayers?.length,heading:e.header?this._effectiveTitle:void 0,key:"table-content",loading:"loading"===s,menuOpen:!!i?.open,overlayPositioning:"fixed",onCalcitePanelClose:()=>{this.closed=!0,this.emit("close")},onCalcitePanelToggle:e=>{this.collapsed=e.target.collapsed,this.emit("toggle")}},e.progress?U("calcite-progress",{type:t?"indeterminate":"determinate"}):null,this._showLayerDropdown?this._renderLayerDropdown():null,this._renderColumnVisibilityAction(),this._renderHeaderMenuActions(),this._renderNavigationBar(),this._renderTables(),this._renderError(),this._renderFooterContent()),this._renderColumnVisibilityPopover(),this._renderPrompt(),this._renderDialog())}_renderTables(){const{grid:e,relatedTables:t}=this,i=this.classes(K.tableContainer);if(t.length){const s=this.classes(K.base,this.allRelatedTablesVisible?K.expanded:K.collapsed,this._attachmentsViewIsVisible?K.tableContainerWithAttachments:void 0);return U("div",{class:i},U("calcite-panel",{overlayPositioning:"fixed"},U("div",null,[this._shouldShowGrid?U("div",{class:s},e?.render(),this._renderPagination()):void 0,...this._filteredTables.map(e=>{const i=t.indexOf(e);return U("div",{class:s,key:`related-${i}`},e.render())}),,])))}return null!=this.attachmentsViewOptions.objectId?U("div",{class:i},U("calcite-panel",{overlayPositioning:"fixed"},U("div",null,[U("div",{class:this.classes(K.base,K.collapsed)},e?.render(),this._renderPagination()),this._renderAttachmentsView()]))):[U("div",{class:i},e?.render()),this._renderPagination()]}_renderPagination(){if(this.paginationEnabled)return U("calcite-pagination",{pageSize:1,startItem:this.pageIndex+1,totalItems:this.pageCount,onCalcitePaginationChange:e=>{this._attachmentsDialogPreviewLoading=!1,this.goToPage(e.currentTarget.startItem-1)}})}_renderError(){const{messages:e}=this;return U("calcite-alert",{autoClose:!0,autoCloseDuration:"fast",icon:q.exclamationMarkTriangle,kind:"danger",label:e.errorOccured,open:this._hasAttachmentsViewError,slot:"alerts",topLayerDisabled:this.topLayerDisabled,onCalciteAlertClose:()=>{this.attachmentsViewOptions.error=null}},U("span",{slot:"message"},e.errorOccured))}_renderFooterContent(){if(!this.hasPendingEdits||!this._effectiveVisibleElements.pendingEditsFooter)return;const{hasInvalidPendingEdits:e,isQueryingOrSyncing:t,messages:i,messagesCommon:s}=this,n=e||t,l=this.hasContingentValues,o=[U("calcite-button",{appearance:"outline",disabled:t,iconStart:q.reset,key:"footer-reset-button",onclick:()=>{this.discardPendingEdits()},slot:"footer-end",width:"auto"},s.reset),U("calcite-button",{disabled:n,iconStart:q.save,key:"footer-save-button",loading:this.isSyncing,onclick:()=>{this.savePendingEdits()},slot:"footer-end",width:"auto"},s.save)];if(l){const t=e?i.contingentValues.hasInvalidValues:i.contingentValues.hasValidValues,s=e?q.exclamationMarkTriangle:q.checkCircle,n=e?K.footerIconDanger:K.footerIconSuccess;o.push(U("div",{class:K.footerMessage,key:"footer-message",slot:"footer-start"},U("calcite-icon",{class:n,icon:s,scale:"s",slot:"footer-start"}),t))}return o}_renderPrompt(){return this.prompt?U(A,{...this.prompt,headingLevel:2}):void 0}_showDeleteSelectionPrompt(){const{messages:e,messagesCommon:i}=this,s=t(e.deleteSelectionCount,{count:this.highlightIds.length});this.showPrompt({title:s,message:e.deleteRecordsRemoved,context:"danger",actions:{primary:{label:i.delete,action:async()=>{try{await this.viewModel.deleteSelection()}finally{this.clearPrompt()}}},secondary:{label:e.keepRecords,action:()=>this.clearPrompt()}}})}_showDeleteAttachmentPrompt(e,i){const{messages:s,messagesCommon:n}=this,l=t(s.deleteAttachmentCount,{count:i.length});this.showPrompt({title:l,message:s.deleteAttachmentConfirmation,context:"danger",actions:{primary:{label:n.delete,action:async()=>{try{await this.deleteAttachments(e,i,!1)}finally{this.clearPrompt()}}},secondary:{label:n.cancel,action:()=>this.clearPrompt()}}})}async _showDiscardEditsPrompt(e){const t=Promise.withResolvers(),{messagesEditor:i}=this;return this.showPrompt({title:i.cancelEditTitle,message:i.cancelEditWarningMessage,context:"danger",actions:{primary:{label:i.discardEdits,action:async()=>{try{await this.discardPendingEdits(e)}finally{t.resolve(!0)}}},secondary:{label:i.continueEditing,action:()=>t.resolve(!1)}}}),t.promise.finally(()=>this.clearPrompt())}_onTableViewChange(e){this.hasPendingEdits?this._showDiscardEditsPrompt().then(t=>t&&e()):e()}_resetNestedViews(){this.relatedTable&&this.drainRelatedTables(),this.effectiveTable.attachmentsViewOptions.objectId=null}_renderDialog(){const{attachmentsViewOptions:e,messages:t}=this,{objectId:i}=e;return U("calcite-dialog",{class:K.dialog,description:this.viewModel.getFeatureTitleSync(i),heading:t.attachments,modal:!0,open:this._dialogIsOpen,placement:"cover",width:"l",onCalciteDialogClose:()=>this._onDialogClose()},this._renderDialogContent())}_renderDialogContent(){const e=this.attachmentsViewOptions.dialogInfo;if(e)return this._renderAttachmentsDialogContent(e)}_renderAttachmentsDialogContent(e){const{attachmentsViewOptions:t,messages:i}=this,{attachmentInfos:s}=t,n=s.indexOf(e);return U(N,null,U("div",{class:K.dialogHeader,key:"header",slot:"content-top"},U("span",null,e.name),U("calcite-button",{appearance:"outline",onclick:()=>{t.attachmentId=e.id,t.dialogId=null}},i.viewDetails)),U("calcite-progress",{type:this._attachmentsDialogPreviewLoading?"indeterminate":"determinate"}),U("div",{class:K.dialogContent,key:"content"},this._renderAttachmentsViewDetailsImage(e)),U("calcite-pagination",{pageSize:1,slot:"footer",startItem:n+1,totalItems:s.length,onCalcitePaginationChange:e=>{const i=e.currentTarget.startItem-1,n=s[i]?.id;t.dialogId=n}}))}_onDialogClose(){const e=this.attachmentsViewOptions;null!=e.dialogId&&(e.dialogId=null),this._attachmentsDialogPreviewLoading=!1}_renderHeaderMenuAction(e){const{disabled:t,hidden:i,icon:s,text:n,clickFunction:l}=e;if(!i)return U("calcite-action",{disabled:t??this.menuConfig?.disabled,icon:s??void 0,key:n,onclick:()=>l(),slot:"header-menu-actions",text:n,textEnabled:!0,title:n})}_renderHeaderMenuActions(){return this._shouldShowMenu?[this._renderDefaultHeaderMenuActions(),this._renderCustomHeaderMenuActions()]:[]}_renderDefaultHeaderMenuActions(){if(!this._hasDefaultMenuItems)return[];const{messages:e}=this;return[this._showRefreshDataAction&&{icon:q.refresh,text:e.refreshData,clickFunction:()=>this.refresh()},this._showDeleteSelectionAction&&{icon:q.delete,text:e.deleteSelection,clickFunction:()=>this.deleteSelection(!0)},this._showClearSelectionAction&&{icon:q.clearSelection,text:e.clearSelection,clickFunction:()=>this.highlightIds?.removeAll()},this._showZoomToSelectionAction&&{icon:q.zoomToSelection,text:e.zoomToSelection,clickFunction:()=>this.zoomToSelection()},this._showSelectedRecordsShowSelectedAction&&{icon:q.showSelected,text:e.showSelected,clickFunction:()=>{const{objectIds:e}=this;e.removeAll(),e.addMany(this.highlightIds.toArray())}},this._showSelectedRecordsShowAllAction&&{icon:q.showAll,text:e.showAllRecords,clickFunction:()=>this.objectIds.removeAll()},this._showExportSelectionToCSVAction&&{icon:q.exportToCSV,text:e.exportSelectionCSV,clickFunction:()=>this.exportSelectionToCSV()}].filter(i).map(e=>e&&this._renderHeaderMenuAction(e))}_renderCustomHeaderMenuActions(){return this.menuConfig?.items?.map(({disabled:e,hidden:t,icon:i,label:s,clickFunction:n})=>this._renderHeaderMenuAction({hidden:"function"==typeof t?t():t,icon:i,text:s,disabled:e,clickFunction:e=>n(e)}))??[]}_renderColumnVisibilityAction(){if(!this._showColumnVisibilityAction)return[];const{_columnVisibilityActions:e,id:t}=this,i=this.messages.menuText.columnVisibility;return U("calcite-action",{afterCreate:i=>e.set(t,i),afterRemoved:()=>e.delete(t),bind:this,disabled:this._columnVisibilityActionDisabled,icon:q.showColumn,id:`${t}__toggle-columns-action`,slot:"header-actions-end",text:i},this._effectiveVisibleElements.tooltips?U("calcite-tooltip",{closeOnClick:!0,overlayPositioning:"fixed",placement:"bottom-end",referenceElement:e.get(t),topLayerDisabled:this.topLayerDisabled},i):null)}_renderColumnVisibilityPopover(){if(!this._showColumnVisibilityAction||this._columnVisibilityActionDisabled)return;const e=this.visibleElements.columnVisibilityMenuItems.header,t=this.messages.menuText.columnVisibility;return U("calcite-popover",{autoClose:!0,class:K.menuPopover,closable:e,heading:e?t:void 0,label:t,overlayPositioning:"fixed",referenceElement:this._columnVisibilityActions.get(this.id),topLayerDisabled:this.topLayerDisabled},this._renderColumnVisibilityList())}_renderColumnVisibilityList(){const{effectiveTable:e,messages:{menuText:t}}=this;if(0!==e.columns.length)return U("calcite-list",{displayMode:"nested",filterEnabled:this.visibleElements.columnVisibilityMenuItems.filter,filterPlaceholder:t.searchFields,label:t.fieldVisibility,selectionMode:"multiple"},this._renderColumnToggleAll(),e.columns.toArray().map(t=>{const i=I(t)?t.columns?.map(t=>this._renderColumnListItem({column:t,table:e,ignoreSelect:!0})):void 0;return this._renderColumnListItem({column:t,table:e,items:i})}))}_renderColumnToggleAll(){if(!this.visibleElements.columnVisibilityMenuItems.toggleAll)return;const{effectiveTable:e,messages:{menuText:t}}=this;return U("calcite-button",{appearance:"transparent",onclick:()=>this._toggleAllColumns(),width:"full"},e.allColumnsVisible?t.deselectAll:t.selectAll)}_renderColumnListItem(e){const{column:t,table:i,items:s,ignoreSelect:n}=e,{effectiveLabel:l,fieldName:o,hidden:a}=t;return U("calcite-list-item",{expanded:!(!s?.length||a)||void 0,key:`toggle-columns__item-${o}`,label:l,metadata:{description:t.effectiveDescription,type:D(t)?t.field.type:void 0},selected:!a,value:o,onCalciteListItemSelect:e=>{n&&e.stopPropagation(),i.toggleColumnVisibility(e.currentTarget.value)}},s)}_renderLayerDropdown(){const e=this.messages.selectALayer;return U("div",{class:K.layerDropdownMenu,key:`${this.id}-layerDropdown`,slot:"header-actions-start"},U("calcite-dropdown",{bind:this,maxItems:5,overlayPositioning:"fixed",placement:"bottom-start",topLayerDisabled:this.topLayerDisabled},U("calcite-action",{icon:q.layers,slot:"trigger",text:e,title:e}),U("calcite-dropdown-group",{selectionMode:"single"},this._effectiveLayers.map((e,t)=>this._renderLayerDropdownItem(e,t))??null)))}_renderLayerDropdownItem(e,t){const i=this.visibleElements.layerDropdownIcons;return U("calcite-dropdown-item",{iconStart:i?j(e):void 0,key:`dropdown-item-${t}`,label:e.title??"",selected:e===this.layer,value:e.id,onCalciteDropdownItemSelect:()=>this._onTableViewChange(()=>this.layer=e)},e.title)}_onRelatedNavigationItemClick(e){this.viewModel.drainRelatedTablesAboveIndex(e)}_collapseRelatedTable(e){this.viewModel.collapseRelatedTable(this.effectiveTable,e)}_onShowRelatedTable(e){this.showRelatedTableCallback||this.hasPendingEdits||(this._collapseRelatedTable(e),this._createRelatedTable(e))}async _createRelatedTable(e){const{autoRefreshEnabled:t,autoSaveEnabled:i,editingEnabled:s,effectiveTable:n,multipleSelectionEnabled:l,paginationEnabled:o,pageSize:a,view:r,viewModel:c}=this,{layer:d,objectId:h,relatedLayer:m,relationshipId:p}=e;await d.load();const u=this.attachmentsEnabled&&x(d),g=new Z({layer:d,autoRefreshEnabled:t,autoSaveEnabled:i,attachmentsEnabled:u,editingEnabled:s,multipleSelectionEnabled:l,paginationEnabled:o,pageSize:a,relatedRecordsEnabled:!0,relationshipConfig:{objectId:h,relatedLayer:m,relationshipId:p},relationshipColumnConfigs:L(d,p),tableController:this,tableParent:n,view:r,showRelatedTableCallback:e=>c.emit("show-related-table",e)});this.relatedTables.add(g),this.scheduleRender()}_renderAttachmentsView(){switch(this.attachmentsViewOptions.effectiveMode){case"list":return this._renderAttachmentsViewList();case"details":return this._renderAttachmentsViewDetails();case"file":return this._renderAttachmentsViewFile()}}_renderAttachmentsViewFile(){const e=this.attachmentsViewOptions,{objectId:t}=e;if(null!=t)return[U("div",{class:K.attachmentsView,key:"attachments-view"},this._renderAttachmentsViewInformation(),U("div",{class:K.attachmentsViewContent,key:"attachments-view-content"},U("div",{bind:this,class:K.attachmentsViewDropArea,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop},U("calcite-icon",{class:K.attachmentsViewIcon,icon:q.upload,scale:"l"}),this._renderAttachmentsViewFileLabelNode(),this._renderAttachmentsViewFileMessageNode(),U("form",{afterCreate:t=>e.form=t,afterRemoved:()=>e.form=null,bind:this,key:"attachments-form"},U("fieldset",null,this._renderAttachmentsViewFileNameNode(),U("input",{afterCreate:H,afterRemoved:B,afterUpdate:H,bind:this,"data-node-ref":"_attachmentsInput",files:e.candidates,hidden:!0,name:"attachment",onchange:e=>this._onAttachmentsViewCandidateChange(e),type:"file"}),this._renderAttachmentsViewFileSelectNode(),this._renderAttachmentsViewFileSaveNode(),this._renderAttachmentsViewFileCancelNode())))))]}_renderAttachmentsViewFileLabelNode(){if("replace"===this.attachmentsViewOptions.fileMode)return U("span",{class:K.attachmentsViewDropAreaLabel,key:"replace-file-node"},this.messages.replaceFile)}_renderAttachmentsViewFileMessageNode(){const e=this.attachmentsViewOptions;if(e.hasCandidates)return;const{messages:t}=this,i=this.supportsAddAttachments?null==e.objectId?t.noFeature:t.dragAndDropToUpload:t.editingRestricted;return U("span",{class:K.attachmentsViewDropAreaMessage,key:"message-node"},i)}_renderAttachmentsViewFileNameNode(){const e=this.attachmentsViewOptions.candidates,t=Array.from(e??[]).at(-1);if(t)return U("span",{class:K.attachmentsViewDropAreaMessage,key:"filename-node"},t.name)}_renderAttachmentsViewFileSelectNode(){if(this.supportsAddAttachments)return U("calcite-button",{appearance:"outline-fill",disabled:this.isSyncingAttachments,iconStart:q.folderOpen,key:"select-node",onclick:()=>{this._resetAttachmentsInput(),this._attachmentsInput?.click()}},this.messages.selectFile)}_renderAttachmentsViewFileSaveNode(){const{isSyncingAttachments:e,messages:t}=this,{attachmentInfo:i,hasCandidates:s}=this.attachmentsViewOptions;if(this.supportsAddAttachments&&s)return U("calcite-button",{appearance:"solid",disabled:e,iconStart:q.save,key:"save-node",loading:e,onclick:()=>{this.saveAttachmentsViewForm()}},i?t.updateAttachment:t.addAttachment)}_renderAttachmentsViewFileCancelNode(){const{hasAttachments:e,hasCandidates:t}=this.attachmentsViewOptions;if(e||t)return U("calcite-button",{appearance:"transparent",bind:this,disabled:this.isSyncingAttachments,key:"cancel-node",onclick:()=>{this._resetAttachmentsInput(),this.attachmentsViewOptions.cancel()}},this.messagesCommon.cancel)}_renderAttachmentsViewDetails(){const{attachmentInfo:e}=this.attachmentsViewOptions;if(e)return[U("div",{class:K.attachmentsView,key:"attachments-view"},this._renderAttachmentsViewInformation(),U("div",{class:K.attachmentsViewContent,key:"attachments-view-content"},U("div",{class:K.attachmentsViewDetails},this._renderAttachmentsViewDetailsPreview(e))))]}_renderAttachmentsViewDetailsPreview(e){const t=[this._renderAttachmentsViewDetailsImage(e)];if(M(e.contentType)){const i=this.messages.maximize;t.push(U("calcite-action",{icon:q.expand,label:i,onclick:t=>{t.preventDefault(),this.attachmentsViewOptions.dialogId=e.id},text:i,textEnabled:!0,title:i}))}return t}_renderAttachmentsViewDetailsImage(e){const{contentType:t,name:i,size:s,url:n}=e,{messages:l}=this;return M(t)?U("img",{afterCreate:()=>this._attachmentsDialogPreviewLoading=!0,alt:i,key:`thumbnail-image-${i}`,onerror:()=>this._attachmentsDialogPreviewLoading=!1,onload:()=>this._attachmentsDialogPreviewLoading=!1,src:`${n}${n?.includes("?")?"&":"?"}s=${s}`,title:i}):[U("calcite-icon",{icon:V(t),key:`thumbnail-icon-${i}`,scale:"l",textLabel:i,title:i}),l.noPreviewAvailable]}_renderAttachmentsViewInformation(){const{attachmentsViewOptions:e,messages:t,messagesUnits:i}=this,{attachmentInfo:s,objectId:n}=e;if(s&&null!=n)return U("div",{class:K.attachmentsViewInformation,key:"information"},this._renderAttachmentViewInformationButtons(s,n),U("span",{class:K.attachmentsViewInformationLabel,key:"file-label"},t.fileName),U("span",{class:K.attachmentsViewInformationData,key:"file-value"},s.name),U("span",{class:K.attachmentsViewInformationLabel,key:"type-label"},t.attachmentType),U("span",{class:K.attachmentsViewInformationData,key:"type-value"},this._getLabelForAttachmentType(s)),this._renderAttachmentKeywordDetails(s),U("span",{class:K.attachmentsViewInformationLabel,key:"size-label"},t.size),U("span",{class:K.attachmentsViewInformationData,key:"size-span"},h(i,s.size??0)))}_renderAttachmentViewInformationButtons(e,t){const{attachmentsViewOptions:i,messages:s,messagesCommon:n}=this,l="details"!==i.effectiveMode,o=e.id,a=[U("calcite-button",{appearance:"outline",disabled:l,key:"download-button",onclick:e=>{e.preventDefault(),this.downloadAttachmentById(t,o)},width:"full"},s.download)];return this.supportsUpdateAttachments&&a.push(U("calcite-button",{appearance:"outline",disabled:l,key:"replace-button",onclick:()=>{i.mode="file",i.attachmentId=o},width:"full"},s.replace)),this.supportsDeleteAttachments&&a.push(U("calcite-button",{appearance:"outline",disabled:l,key:"delete-button",onclick:()=>{this.deleteAttachments(t,[o],!0)},width:"full"},n.delete)),a}_renderAttachmentKeywordDetails({keywords:e}){if(e&&""!==e)return[U("span",{class:K.attachmentsViewInformationLabel,key:"keyword-label"},this.messages.keyword),U("span",{class:K.attachmentsViewInformationData,key:"keyword-value"},e)]}_renderAttachmentsViewList(){const{attachmentsViewOptions:e,isSyncingAttachments:t,messages:i,messagesUnits:s}=this,{attachmentInfos:n,objectId:l}=e;return U("calcite-list",{afterCreate:H,afterRemoved:B,afterUpdate:H,bind:this,class:K.attachmentsViewList,"data-node-ref":"attachmentsList",key:`attachments-list-${l}`,label:i?.attachments,loading:t,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop,selectionMode:this.supportsDeleteAttachments?"multiple":"none",onCalciteListChange:()=>this.scheduleRender()},...n?.map(t=>{const{id:n,name:o,size:a}=t,r=h(s,a??0);return U("calcite-list-item",{afterRemoved:()=>this.scheduleRender(),key:`attachment-${n}`,label:o,value:n},this._renderAttachmentsViewListPreview(t),U("span",{class:K.attachmentsViewListFileSize,slot:"actions-end",title:r},r),U("calcite-action",{icon:q.downloadTo,key:"download",label:o,onclick:e=>{e.preventDefault(),this.downloadAttachmentById(l??-1,n)},slot:"actions-end",text:i.downloadAttachment,title:i.downloadAttachment}),U("calcite-action",{icon:q.chevronRight,iconFlipRtl:!0,key:"details",label:o,onclick:()=>{e.mode="details",e.attachmentId=n},slot:"actions-end",text:i.viewAttachment,title:i.viewAttachment}))}))}_renderAttachmentsViewListPreview(e){return U("div",{class:K.attachmentsViewListThumbnail,slot:"content-start"},U("span",null,this._renderAttachmentsViewListImage(e)))}_renderAttachmentsViewListImage(e,t=64){const{contentType:i,name:s,size:n,url:l}=e,o=`${l}${l?.includes("?")?"&":"?"}w=${t}&s=${n}`;return this.supportsResizeAttachments&&M(i)?U("img",{alt:s,key:`thumbnail-image-${s}`,src:o,title:s}):U("calcite-icon",{icon:V(i),key:`thumbnail-icon-${s}`,scale:"l",textLabel:s,title:s})}_onAttachmentsViewCandidateChange({target:e}){this.attachmentsViewOptions.candidates=e?.files}_onAttachmentsViewDrop(e){e.preventDefault(),(this.supportsAddAttachments||this.supportsUpdateAttachments)&&(this.attachmentsViewOptions.mode="file",this.attachmentsViewOptions.candidates=e.dataTransfer?.files)}_resetAttachmentsInput(){this._attachmentsInput&&(this._attachmentsInput.value="")}_getLabelForAttachmentType({contentType:e}){const t=this.messages;return e.startsWith("image/")?t.attachmentTypes.image:e.startsWith("audio/")?t.attachmentTypes.audio:e.startsWith("video/")?t.attachmentTypes.video:e.startsWith("text/")||e.startsWith("application/")||e.startsWith("model/")?t.attachmentTypes.document:t.attachmentTypes.unknown}_renderNavigationBar(){const{effectiveTable:e,messages:i,messagesCommon:s,navigationScale:n,relatedTable:l,relatedTables:o}=this;if(!this._shouldShowNavigationBar)return;const{attachmentsList:a,attachmentsViewOptions:r,layer:c,supportsAddAttachments:d,supportsDeleteAttachments:h}=e;if(!c)return;const{attachmentInfos:m,objectId:p}=r,u=null!=p,g=m.length,w=a?.selectedItems?.length??0,b=`${c.objectIdField}: ${p}`,v=t(i.selectedCount,{count:w}),y=t(i.attachmentsCount,{count:g}),f=u?U("calcite-action",{bind:this,icon:q.chevronRight,iconFlipRtl:!0,key:"navigation-feature",onclick:()=>e.scrollToRow(p),scale:n,text:b,textEnabled:!0,title:b}):void 0,_=u?U("calcite-action",{icon:q.chevronRight,iconFlipRtl:!0,key:"navigation-attachments-label",label:y,onclick:()=>{g>0&&(r.mode="list")},scale:n,text:y,textEnabled:!0,title:y}):void 0,M=u?U("calcite-chip",{closable:!0,closed:0===w,key:"navigation-chip",kind:"inverse",label:v,scale:"s",selected:!0,title:v,value:"selected",onCalciteChipClose:()=>a?.selectedItems?.forEach(e=>e.selected=!1)},v):void 0,V=l?U("calcite-label",{layout:"inline",scale:n},i.showAllTables,U("calcite-switch",{checked:this.allRelatedTablesVisible,scale:n,onCalciteSwitchChange:e=>this.showAllRelatedTables=!!e.currentTarget.checked})):void 0,C=u&&"list"===r.effectiveMode&&null!=p&&w&&h?U("calcite-action",{icon:q.delete,iconFlipRtl:!0,key:"attachments-trash-all",onclick:()=>{e.deleteAttachments(p,a?.selectedItems?.map(e=>e.value)??[],!0)},scale:n,text:s.delete,textEnabled:!0,title:t(i.deleteAttachmentCount,{count:w})}):void 0,A=u&&"list"===r.effectiveMode&&d?U("calcite-action",{bind:this,icon:q.plus,iconFlipRtl:!0,key:"attachments-add",onclick:()=>{r.objectId=p,r.attachmentId=null,r.mode="file"},scale:n,text:i.addAttachment,textEnabled:!0,title:i.addAttachment}):void 0;return U("div",{class:K.tableNavigation,key:"table-nav"},U("calcite-action",{icon:q.moveUp,iconFlipRtl:!0,key:"go-back",onclick:()=>this._onTableViewChange(this._resetNestedViews),scale:n,text:this.layer?.title??"",textEnabled:!1,title:l?i.exitRelatedRecords:i.exitAttachments}),o.toArray().map((e,t)=>this._renderRelatedTableNavigationAction(e,t)),f,_,U("div",null,M,V,C,A))}_renderRelatedTableNavigationAction(e,t){const i=this._getLabelForRelatedTableNavigationAction(e);return U("calcite-action",{icon:q.chevronRight,iconFlipRtl:!0,key:t,onclick:()=>{(t!==this.relatedTables.length-1||this._attachmentsViewIsVisible)&&this._onTableViewChange(()=>this._onRelatedNavigationItemClick(t))},scale:this.navigationScale,text:i,textEnabled:!0,title:e.layer?.title||""})}_getLabelForRelatedTableNavigationAction(e){const t=e.layer?.title;if(!t)return"";const{relatedTables:i}=this;if(i.length<=1)return t;return i.indexOf(e)!==i.length-1&&t.length>20?`${t.slice(0,20)}...`:t}_toggleAllColumns(){const e=this.effectiveTable;e.allColumnsVisible?e.hideAllColumns():e.showAllColumns()}};e([m()],J.prototype,"_attachmentsDialogPreviewLoading",void 0),e([m()],J.prototype,"_attachmentsInput",void 0),e([m()],J.prototype,"_attachmentsViewIsVisible",null),e([m()],J.prototype,"_columnVisibilityActions",void 0),e([m()],J.prototype,"_columnVisibilityActionDisabled",null),e([m()],J.prototype,"_dialogIsOpen",null),e([m()],J.prototype,"_effectiveDescription",null),e([m()],J.prototype,"_effectiveLayers",null),e([m()],J.prototype,"_effectiveTitle",null),e([m()],J.prototype,"_effectiveVisibleElements",null),e([m()],J.prototype,"_filteredTables",null),e([m()],J.prototype,"_hasAttachmentsViewError",null),e([m()],J.prototype,"_hasCustomMenuItems",null),e([m()],J.prototype,"_hasDefaultMenuItems",null),e([m()],J.prototype,"_shouldShowGrid",null),e([m()],J.prototype,"_shouldShowMenu",null),e([m()],J.prototype,"_showClearSelectionAction",null),e([m()],J.prototype,"_showColumnVisibilityAction",null),e([m()],J.prototype,"_showDeleteSelectionAction",null),e([m()],J.prototype,"_showExportSelectionToCSVAction",null),e([m()],J.prototype,"_showLayerDropdown",null),e([m()],J.prototype,"_shouldShowNavigationBar",null),e([m()],J.prototype,"_showRefreshDataAction",null),e([m()],J.prototype,"_showSelectedRecordsShowSelectedAction",null),e([m()],J.prototype,"_showSelectedRecordsShowAllAction",null),e([m()],J.prototype,"_showZoomToSelectionAction",null),e([m()],J.prototype,"_viewLayers",null),e([m()],J.prototype,"attachmentsList",void 0),e([m({readOnly:!0})],J.prototype,"grid",null),e([m()],J.prototype,"actionColumn",null),e([m()],J.prototype,"actionColumnConfig",null),e([m({readOnly:!0})],J.prototype,"activeFilters",null),e([m({readOnly:!0})],J.prototype,"activeSortOrders",null),e([m()],J.prototype,"allColumns",null),e([m()],J.prototype,"allColumnsVisible",null),e([m({readOnly:!0})],J.prototype,"allRelatedTablesVisible",null),e([m()],J.prototype,"allVisibleColumns",null),e([m()],J.prototype,"attachmentsColumns",null),e([m()],J.prototype,"attachmentsEnabled",null),e([m()],J.prototype,"attachmentsViewOptions",null),e([m({type:y})],J.prototype,"attributeTableTemplate",null),e([m()],J.prototype,"autoRefreshEnabled",null),e([m()],J.prototype,"autoSaveEnabled",null),e([m()],J.prototype,"canAddRelatedFeature",null),e([m()],J.prototype,"clearPrompt",null),e([m()],J.prototype,"closed",void 0),e([m()],J.prototype,"collapsed",void 0),e([m()],J.prototype,"columnPerformanceModeEnabled",null),e([m()],J.prototype,"columnReorderingEnabled",null),e([m({readOnly:!0})],J.prototype,"columns",null),e([m()],J.prototype,"definitionExpression",null),e([m()],J.prototype,"description",void 0),e([m()],J.prototype,"disabled",void 0),e([m()],J.prototype,"editingEnabled",null),e([m()],J.prototype,"effectiveSelectionManager",null),e([m()],J.prototype,"effectiveSize",null),e([m()],J.prototype,"effectiveTable",null),e([m()],J.prototype,"fieldColumns",null),e([m({types:u})],J.prototype,"filterGeometry",null),e([m()],J.prototype,"filterBySelectionEnabled",null),e([m()],J.prototype,"filterByViewExtent",null),e([m()],J.prototype,"groupColumns",null),e([m()],J.prototype,"hasContingentValues",null),e([m()],J.prototype,"hasInvalidPendingEdits",null),e([m()],J.prototype,"hasPendingEdits",null),e([m()],J.prototype,"hiddenFields",null),e([m()],J.prototype,"highlightEnabled",null),e([m()],J.prototype,"highlightIds",null),e([m()],J.prototype,"icon",null),e([m()],J.prototype,"initialSize",null),e([m()],J.prototype,"isQueryingOrSyncing",null),e([m()],J.prototype,"isSyncing",null),e([m()],J.prototype,"isSyncingAttachments",null),e([m()],J.prototype,"label",null),e([m()],J.prototype,"layer",null),e([m()],J.prototype,"layers",null),e([m()],J.prototype,"layerView",null),e([m()],J.prototype,"maxSize",null),e([m(),z("esri/widgets/FeatureTable/t9n/FeatureTable")],J.prototype,"messages",null),e([m(),z("esri/t9n/common")],J.prototype,"messagesCommon",null),e([m(),z("esri/widgets/Editor/t9n/Editor")],J.prototype,"messagesEditor",void 0),e([m(),z("esri/core/t9n/Units")],J.prototype,"messagesUnits",null),e([m(),z("esri/widgets/support/t9n/uriUtils")],J.prototype,"messagesURIUtils",null),e([m()],J.prototype,"menuConfig",null),e([m()],J.prototype,"multipleSelectionEnabled",null),e([m()],J.prototype,"multipleSelectionEnabledOverride",null),e([m()],J.prototype,"multiSortEnabled",null),e([m()],J.prototype,"multipleSortPriority",null),e([m()],J.prototype,"navigationScale",void 0),e([m()],J.prototype,"noDataMessage",null),e([m()],J.prototype,"objectIds",null),e([m()],J.prototype,"outFields",null),e([m()],J.prototype,"pageCount",null),e([m()],J.prototype,"pageIndex",null),e([m()],J.prototype,"pageSize",null),e([m()],J.prototype,"paginationEnabled",null),e([m()],J.prototype,"pendingEditsCount",null),e([m()],J.prototype,"prompt",null),e([m()],J.prototype,"relatedRecordsEnabled",null),e([m()],J.prototype,"relatedTable",null),e([m()],J.prototype,"relatedTableHasContingentValues",null),e([m()],J.prototype,"relatedTableHasInvalidPendingEdits",null),e([m()],J.prototype,"relatedTableHasPendingEdits",null),e([m()],J.prototype,"relatedTables",null),e([m()],J.prototype,"relationship",null),e([m()],J.prototype,"relationshipColumnConfigs",null),e([m()],J.prototype,"relationshipColumns",null),e([m()],J.prototype,"relationshipConfig",null),e([m()],J.prototype,"relationshipInfos",null),e([m()],J.prototype,"returnGeometryEnabled",null),e([m()],J.prototype,"returnMEnabled",null),e([m()],J.prototype,"returnZEnabled",null),e([m()],J.prototype,"rowHighlightIds",null),e([m()],J.prototype,"selectionManager",null),e([m()],J.prototype,"selectionSource",null),e([m()],J.prototype,"showAllRelatedTables",null),e([m()],J.prototype,"showPrompt",null),e([m()],J.prototype,"showRelatedTableCallback",null),e([m()],J.prototype,"size",null),e([m({readOnly:!0})],J.prototype,"state",null),e([m()],J.prototype,"supportsAddAttachments",null),e([m()],J.prototype,"supportsAttachments",null),e([m()],J.prototype,"supportsDeleteAttachments",null),e([m()],J.prototype,"supportsResizeAttachments",null),e([m()],J.prototype,"supportsUpdateAttachments",null),e([m()],J.prototype,"syncTemplateOnChangesEnabled",null),e([m()],J.prototype,"syncViewSelection",null),e([m()],J.prototype,"syncWithViewSelectionManager",null),e([m({constructOnly:!0})],J.prototype,"tableController",null),e([m({constructOnly:!0})],J.prototype,"tableParent",null),e([m({type:P})],J.prototype,"tableTemplate",null),e([m()],J.prototype,"tableTemplateOverride",null),e([m()],J.prototype,"title",void 0),e([m({type:f})],J.prototype,"timeExtent",null),e([m()],J.prototype,"timeZone",null),e([m()],J.prototype,"view",null),e([m({type:S}),$(["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder","show-related-table"])],J.prototype,"viewModel",void 0),e([m()],J.prototype,"visibleColumns",null),e([m({type:T,nonNullable:!0})],J.prototype,"visibleElements",void 0),e([m({type:T})],J.prototype,"visibleElementsOverride",null),J=Z=e([p("esri.widgets.FeatureTable")],J);const X=J;export{X as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import{substitute as t}from"../intl.js";import{isSome as i}from"../core/arrayUtils.js";import{deprecateWidget as s}from"../core/deprecate.js";import n from"../core/Logger.js";import{watch as l,sync as o,syncAndInitial as a,initial as r,on as c}from"../core/reactiveUtils.js";import{renderingSanitizer as d}from"../core/sanitizerUtils.js";import{formatFileSize as h}from"../core/unitFormatUtils.js";import{property as m,subclass as p}from"../core/accessorSupport/decorators.js";import{geometryTypes as u}from"../geometry/support/typeUtils.js";import{isLayerFromCatalog as g}from"../layers/catalog/catalogUtils.js";import{isKnowledgeGraphLayer as w,isMapImageLayer as b,isSubtypeGroupLayer as v}from"../layers/support/layerUtils.js";import y from"../tables/AttributeTableTemplate.js";import f from"../time/TimeExtent.js";import _ from"./Widget.js";import{isSupportedImage as M,getCalciteIconForAttachment as V}from"./Attachments/support/attachmentUtils.js";import{loadPromptComponents as C,Prompt as A}from"./Editor/components/Prompt.js";import E from"./FeatureTable/ColumnMenuVisibleElements.js";import T from"./FeatureTable/FeatureTableViewModel.js";import S from"./FeatureTable/VisibleElements.js";import{isGroupColumn as I,isFieldColumn as D}from"./FeatureTable/support/columnUtils.js";import R from"./FeatureTable/support/TableTemplate.js";import{loadFieldColumnComponents as P,isIFeatureTableSupportedLayer as k,isIFeatureTableSupportedLayerWithAttachments as x,getRelationshipIdsToShow as L}from"./FeatureTable/support/tableUtils.js";import{loadCalciteComponents as O}from"./support/componentsUtils.js";import{globalCss as F}from"./support/globalCss.js";import{getIconForLayer as j}from"./support/iconUtils.js";import{messageBundle as z,vmEvent as $,tsx as U,tsxFragment as N}from"./support/widget.js";import{storeNode as H,discardNode as B}from"./support/widgetUtils.js";var Z;const G="esri-feature-table",W=`${G}__dialog`,Q=`${G}__attachments-view`,K={base:G,content:`${G}__content`,menuPopover:`${G}__menu-popover`,layerDropdownMenu:`${G}__layer-switcher-menu`,tableContainer:`${G}__table-container`,tableContainerWithAttachments:`${G}__table-container--attachments`,tableNavigation:`${G}__table-navigation`,attachmentsView:Q,attachmentsViewContent:`${Q}__content`,attachmentsViewDetails:`${Q}__details`,attachmentsViewDropArea:`${Q}__drop-area`,attachmentsViewDropAreaLabel:`${Q}__drop-area__label`,attachmentsViewDropAreaMessage:`${Q}__drop-area__message`,attachmentsViewIcon:`${Q}__icon`,attachmentsViewInformation:`${Q}__information`,attachmentsViewInformationData:`${Q}__information__data`,attachmentsViewInformationLabel:`${Q}__information__label`,attachmentsViewList:`${Q}__list`,attachmentsViewListFileSize:`${Q}__list__filesize`,attachmentsViewListThumbnail:`${Q}__list__thumbnail`,expanded:`${G}__expanded`,collapsed:`${G}__collapsed`,dialog:`${W}`,dialogContent:`${W}__content`,dialogHeader:`${W}__header`,footerMessage:`${G}__footer__message`,footerIconDanger:`${G}__footer__icon--danger`,footerIconSuccess:`${G}__footer__icon--success`},q={checkCircle:"check-circle",chevronRight:"chevron-right",clearSelection:"clear-selection",downloadTo:"download-to",exclamationMarkTriangle:"exclamation-mark-triangle",expand:"expand",exportToCSV:"file-csv",folderOpen:"folder-open",delete:"trash",layers:"layers",moveUp:"move-up",plus:"plus",refresh:"refresh",reset:"reset",save:"save",showAll:"selection-x",showColumn:"show-column",showSelected:"selection-filter",table:"table",upload:"upload",zoomToSelection:"zoom-to-object"};let J=Z=class extends _{constructor(e,t){super(e,t),this._attachmentsDialogPreviewLoading=!1,this._attachmentsInput=null,this._columnVisibilityActions=new Map,this._columnVisibilityList=null,this.attachmentsList=null,this.closed=!1,this.collapsed=!1,this.description=null,this.disabled=!1,this.messagesEditor=null,this.navigationScale="m",this.title=null,this.viewModel=new T,this.visibleElements=new S,this.announceDeprecation=()=>{s(n.getLogger(this),"Feature Table","arcgis-feature-table",{version:"5.0"})},this._showDeleteSelectionPrompt=this._showDeleteSelectionPrompt.bind(this),this._showDiscardEditsPrompt=this._showDiscardEditsPrompt.bind(this),this._resetNestedViews=this._resetNestedViews.bind(this)}initialize(){this.addHandles([l(()=>[this.isQueryingOrSyncing,this.editingEnabled],()=>this.scheduleRender()),l(()=>[this._effectiveVisibleElements,this._effectiveVisibleElements.columnDescriptions,this._effectiveVisibleElements.columnMenus,this._effectiveVisibleElements.columnMenuItems,this.columns.length],()=>{this.columns.forEach(e=>e.visibleElements=this._effectiveVisibleElements),this.refreshCellContent()},o),l(()=>[this.topLayerDisabled,this.columns],()=>this.columns.forEach(e=>e.topLayerDisabled=this.topLayerDisabled),a),l(()=>this._effectiveVisibleElements.selectionColumn,e=>{this.grid&&(this.grid.selectionColumnEnabled=e)},r),c(()=>this.viewModel,"show-related-table",e=>this._onShowRelatedTable(e)),l(()=>this.editingEnabled,()=>{const{attachmentsViewOptions:e}=this;this.clearPrompt(),e&&(e.form?.reset(),e.candidates=null)})])}loadDependencies(){return Promise.all([O({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),alert:()=>import("@esri/calcite-components/dist/components/calcite-alert"),button:()=>import("@esri/calcite-components/dist/components/calcite-button"),chip:()=>import("@esri/calcite-components/dist/components/calcite-chip"),dialog:()=>import("@esri/calcite-components/dist/components/calcite-dialog"),dropdown:()=>import("@esri/calcite-components/dist/components/calcite-dropdown"),"dropdown-group":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-group"),"dropdown-item":()=>import("@esri/calcite-components/dist/components/calcite-dropdown-item"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon"),label:()=>import("@esri/calcite-components/dist/components/calcite-label"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice"),pagination:()=>import("@esri/calcite-components/dist/components/calcite-pagination"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),popover:()=>import("@esri/calcite-components/dist/components/calcite-popover"),progress:()=>import("@esri/calcite-components/dist/components/calcite-progress"),switch:()=>import("@esri/calcite-components/dist/components/calcite-switch"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip")}),C(),P()])}destroy(){this.drainRelatedTables(),this.clearPrompt()}get _attachmentsViewIsVisible(){return!(null==this.attachmentsViewOptions.objectId&&!this.relatedTables.some(e=>null!=e.attachmentsViewOptions.objectId))}get _columnVisibilityActionDisabled(){const e=this.effectiveTable;return e.menuConfig?.disabled??0===e.columns.length}get _dialogIsOpen(){return!!this.attachmentsViewOptions.dialogInfo}get _effectiveDescription(){const{description:e}=this;return null!=e?d.sanitize("function"==typeof e?e():e):void 0}get _effectiveLayers(){const{layer:e,layers:t}=this,i=t?.length?t.filter(k):[],s=i.length?i:[...this._viewLayers];return e&&!s.includes(e)&&s.push(e),s}get _effectiveTitle(){const{layer:e,messages:i,state:s,highlightIds:n,title:l,size:o}=this;if(l)return d.sanitize("function"==typeof l?l():l);if(!i)return"";if(!e)return i.noLayer;switch(s){case"disabled":return i.errorLayer;case"ready":case"loading":return i.loading;case"error":return i.errorData}return t(i.header,{title:d.sanitize(e.title),count:o,selected:n.length})}get _effectiveVisibleElements(){return this.visibleElementsOverride??this.visibleElements}get _filteredTables(){const e=this.relatedTables.toArray(),t=1===e.length;return this.allRelatedTablesVisible?e:t?[e[0]]:this._attachmentsViewIsVisible?e.slice(-1):e.slice(-2)}get _hasAttachmentsViewError(){return null!=this.attachmentsViewOptions.error}get _hasCustomMenuItems(){return!!this.menuConfig?.items?.length}get _hasDefaultMenuItems(){return!!(this._showClearSelectionAction||this._showDeleteSelectionAction||this._showExportSelectionToCSVAction||this._showRefreshDataAction||this._showZoomToSelectionAction||this._showSelectedRecordsShowSelectedAction||this._showSelectedRecordsShowAllAction||this._showColumnVisibilityAction)}get _shouldShowGrid(){return this.allRelatedTablesVisible||1===this.relatedTables.length&&!this._attachmentsViewIsVisible}get _shouldShowMenu(){const{header:e,menu:t}=this._effectiveVisibleElements;return!(!e||!t||!this._hasDefaultMenuItems&&!this._hasCustomMenuItems)}get _showClearSelectionAction(){return!(!this.highlightIds.length||!this._effectiveVisibleElements.menuItems?.clearSelection||this.relatedTables.length||this._attachmentsViewIsVisible)}get _showColumnVisibilityAction(){const{columnVisibilityMenu:e,header:t,menu:i,menuItems:s}=this._effectiveVisibleElements;return!(!(t&&i&&e&&!1!==s?.toggleColumns)||this.showRelatedTableCallback||this.allRelatedTablesVisible||this._attachmentsViewIsVisible)}get _showDeleteSelectionAction(){return!(!(this.editingEnabled&&this.highlightIds.length&&this._effectiveVisibleElements.menuItems?.deleteSelection&&this.layer?.capabilities?.operations?.supportsDelete)||this.relatedTables.length||this._attachmentsViewIsVisible)}get _showExportSelectionToCSVAction(){return!(!(this._effectiveVisibleElements.menuItems.exportSelectionToCSV&&this.layer&&this.highlightIds.length)||this.relatedTables.length)}get _showLayerDropdown(){return!(!this._effectiveLayers.length||!this._effectiveVisibleElements.layerDropdown)}get _shouldShowNavigationBar(){const e=!!this.relatedTable||this._attachmentsViewIsVisible;return!this.tableParent&&e}get _showRefreshDataAction(){return!!this._effectiveVisibleElements.menuItems?.refreshData}get _showSelectedRecordsShowSelectedAction(){const e=this.objectIds.length,t=this.highlightIds.length;return!(!t||!this._effectiveVisibleElements.menuItems?.selectedRecordsShowSelectedToggle||e&&t===e||this.relatedTables.length||this._attachmentsViewIsVisible)}get _showSelectedRecordsShowAllAction(){return!(!this._effectiveVisibleElements.menuItems?.selectedRecordsShowAllToggle||!this.objectIds.length||this.relatedTables.length)}get _showZoomToSelectionAction(){return!(!this.view||!this.highlightIds.length||this.effectiveTable.layer?.isTable||!this._effectiveVisibleElements.menuItems?.zoomToSelection)}get _viewLayers(){const e=this.view?.map;if(!e)return[];const t=new Set,i=e=>{!k(e)||v(e)||t.has(e)||"sublayer"===e.type&&!e.capabilities?.operations?.supportsQuery||(e.load(),t.add(e))},s=e=>{g(e)||"catalog-footprint"===e.type||(w(e)?(e.load(),e.layers?.forEach(i),e.tables?.forEach(i)):b(e)?(e.loadAll(),e.allSublayers?.forEach(i),e.subtables?.forEach(i)):v(e)?(e.loadAll(),e.sublayers?.forEach(i)):i(e))};return e.allLayers.forEach(s),e.allTables.forEach(s),[...t.values()]}get grid(){return this.viewModel.grid}get actionColumn(){return this.viewModel.actionColumn}get actionColumnConfig(){return this.viewModel.actionColumnConfig}set actionColumnConfig(e){this.viewModel.actionColumnConfig=e}get activeFilters(){return this.viewModel.activeFilters}get activeSortOrders(){return this.viewModel.activeSortOrders}get allColumns(){return this.viewModel.allColumns}get allColumnsVisible(){return this.viewModel.allColumnsVisible}get allRelatedTablesVisible(){return this.viewModel.allRelatedTablesVisible}get allVisibleColumns(){return this.viewModel.allVisibleColumns}get attachmentsColumns(){return this.viewModel.attachmentsColumns}get attachmentsEnabled(){return this.viewModel.attachmentsEnabled}set attachmentsEnabled(e){this.viewModel.attachmentsEnabled=e}get attachmentsViewOptions(){return this.viewModel.attachmentsViewOptions}set attachmentsViewOptions(e){this.viewModel.attachmentsViewOptions=e}get attributeTableTemplate(){return this.viewModel.attributeTableTemplate}set attributeTableTemplate(e){this.viewModel.attributeTableTemplate=e}get autoRefreshEnabled(){return this.viewModel.autoRefreshEnabled}set autoRefreshEnabled(e){this.viewModel.autoRefreshEnabled=e}get autoSaveEnabled(){return this.viewModel.autoSaveEnabled}set autoSaveEnabled(e){this.viewModel.autoSaveEnabled=e}get canAddRelatedFeature(){return this.viewModel.canAddRelatedFeature}get clearPrompt(){return this.viewModel.clearPrompt}set clearPrompt(e){this.viewModel.clearPrompt=e}get columnPerformanceModeEnabled(){return this.viewModel.columnPerformanceModeEnabled}set columnPerformanceModeEnabled(e){this.viewModel.columnPerformanceModeEnabled=e}get columnReorderingEnabled(){return this.viewModel.columnReorderingEnabled}set columnReorderingEnabled(e){this.viewModel.columnReorderingEnabled=e}get columns(){return this.viewModel.columns}get definitionExpression(){return this.viewModel.definitionExpression}set definitionExpression(e){this.viewModel.definitionExpression=e}get container(){return super.container}set container(e){super.container=e}get editingEnabled(){return this.viewModel.editingEnabled}set editingEnabled(e){this.viewModel.editingEnabled=e}get effectiveSelectionManager(){return this.viewModel.effectiveSelectionManager}get effectiveSize(){return this.viewModel.effectiveSize}get effectiveTable(){return this.relatedTable||this}get fieldColumns(){return this.viewModel.fieldColumns}get filterGeometry(){return this.viewModel.filterGeometry}set filterGeometry(e){this.viewModel.filterGeometry=e}get filterBySelectionEnabled(){return this.viewModel.filterBySelectionEnabled}set filterBySelectionEnabled(e){this.viewModel.filterBySelectionEnabled=e}get filterByViewExtent(){return this.viewModel.filterByViewExtent}set filterByViewExtent(e){this.viewModel.filterByViewExtent=e}get groupColumns(){return this.viewModel.groupColumns}get hasContingentValues(){return this.viewModel.hasContingentValues}get hasInvalidPendingEdits(){return this.viewModel.hasInvalidPendingEdits}get hasPendingEdits(){return this.viewModel.hasPendingEdits}get hiddenFields(){return this.viewModel.hiddenFields}set hiddenFields(e){this.viewModel.hiddenFields=e}get highlightEnabled(){return this.viewModel.highlightEnabled}set highlightEnabled(e){this.viewModel.highlightEnabled=e}get highlightIds(){return this.viewModel.highlightIds}set highlightIds(e){this.viewModel.highlightIds=e}get icon(){return q.table}set icon(e){this._overrideIfSome("icon",e)}get initialSize(){return this.viewModel.initialSize}set initialSize(e){this.viewModel.initialSize=e}get isQueryingOrSyncing(){return this.viewModel.isQueryingOrSyncing}get isSyncing(){return this.viewModel.isSyncing}get isSyncingAttachments(){return this.viewModel.isSyncingAttachments}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get layers(){return this.viewModel.layers}set layers(e){this.viewModel.layers=e}get layerView(){return this.viewModel.layerView}get maxSize(){return this.viewModel.maxSize}set maxSize(e){this.viewModel.maxSize=e}get messages(){return this.viewModel.messages}set messages(e){this.viewModel.messages=e}get messagesCommon(){return this.viewModel.messagesCommon}set messagesCommon(e){this.viewModel.messagesCommon=e}get messagesUnits(){return this.viewModel.messagesUnits}set messagesUnits(e){this.viewModel.messagesUnits=e}get messagesURIUtils(){return this.viewModel.messagesURIUtils}set messagesURIUtils(e){this.viewModel.messagesURIUtils=e}get menuConfig(){return this.viewModel.menuConfig}set menuConfig(e){this.viewModel.menuConfig=e}get multipleSelectionEnabled(){return this.viewModel.multipleSelectionEnabled}set multipleSelectionEnabled(e){this.viewModel.multipleSelectionEnabled=e}get multipleSelectionEnabledOverride(){return this.viewModel.multipleSelectionEnabledOverride}set multipleSelectionEnabledOverride(e){this.viewModel.multipleSelectionEnabledOverride=e}get multiSortEnabled(){return this.viewModel.multiSortEnabled}set multiSortEnabled(e){this.viewModel.multiSortEnabled=e}get multipleSortPriority(){return this.viewModel.multipleSortPriority}set multipleSortPriority(e){this.viewModel.multipleSortPriority=e}get noDataMessage(){return this.viewModel.noDataMessage}set noDataMessage(e){this.viewModel.noDataMessage=e}get objectIds(){return this.viewModel.objectIds}set objectIds(e){this.viewModel.objectIds=e}get outFields(){return this.viewModel.outFields}set outFields(e){this.viewModel.outFields=e}get pageCount(){return this.viewModel.pageCount}get pageIndex(){return this.viewModel.pageIndex}set pageIndex(e){this.viewModel.pageIndex=e}get pageSize(){return this.viewModel.pageSize}set pageSize(e){this.viewModel.pageSize=e}get paginationEnabled(){return this.viewModel.paginationEnabled}set paginationEnabled(e){this.viewModel.paginationEnabled=e}get pendingEditsCount(){return this.viewModel.pendingEditsCount}get prompt(){return this.viewModel.prompt}set prompt(e){this.viewModel.prompt=e}get relatedRecordsEnabled(){return this.viewModel.relatedRecordsEnabled}set relatedRecordsEnabled(e){this.viewModel.relatedRecordsEnabled=e}get relatedTable(){return this.viewModel.relatedTable}get relatedTableHasContingentValues(){return this.viewModel.relatedTableHasContingentValues}get relatedTableHasInvalidPendingEdits(){return this.viewModel.relatedTableHasInvalidPendingEdits}get relatedTableHasPendingEdits(){return this.viewModel.relatedTableHasPendingEdits}get relatedTables(){return this.viewModel.relatedTables}get relationship(){return this.viewModel.relationship}get relationshipColumnConfigs(){return this.viewModel.relationshipColumnConfigs}set relationshipColumnConfigs(e){this.viewModel.relationshipColumnConfigs=e}get relationshipColumns(){return this.viewModel.relationshipColumns}get relationshipConfig(){return this.viewModel.relationshipConfig}set relationshipConfig(e){this.viewModel.relationshipConfig=e}get relationshipInfos(){return this.viewModel.relationshipInfos}get returnGeometryEnabled(){return this.viewModel.returnGeometryEnabled}set returnGeometryEnabled(e){this.viewModel.returnGeometryEnabled=e}get returnMEnabled(){return this.viewModel.returnMEnabled}set returnMEnabled(e){this.viewModel.returnMEnabled=e}get returnZEnabled(){return this.viewModel.returnZEnabled}set returnZEnabled(e){this.viewModel.returnZEnabled=e}get rowHighlightIds(){return this.viewModel.rowHighlightIds}set rowHighlightIds(e){this.viewModel.rowHighlightIds=e}get selectionManager(){return this.viewModel.selectionManager}set selectionManager(e){this.viewModel.selectionManager=e}get selectionSource(){return this.viewModel.selectionSource}set selectionSource(e){this.viewModel.selectionSource=e}get showAllRelatedTables(){return this.viewModel.showAllRelatedTables}set showAllRelatedTables(e){this.viewModel.showAllRelatedTables=e}get showPrompt(){return this.viewModel.showPrompt}set showPrompt(e){this.viewModel.showPrompt=e}get showRelatedTableCallback(){return this.viewModel.showRelatedTableCallback}set showRelatedTableCallback(e){this.viewModel.showRelatedTableCallback=e}get size(){return this.viewModel.size}get state(){return this.viewModel.state}get supportsAddAttachments(){return this.viewModel.supportsAddAttachments}get supportsAttachments(){return this.viewModel.supportsAttachments}get supportsDeleteAttachments(){return this.viewModel.supportsDeleteAttachments}get supportsResizeAttachments(){return this.viewModel.supportsResizeAttachments}get supportsUpdateAttachments(){return this.viewModel.supportsUpdateAttachments}get syncTemplateOnChangesEnabled(){return this.viewModel.syncTemplateOnChangesEnabled}set syncTemplateOnChangesEnabled(e){this.viewModel.syncTemplateOnChangesEnabled=e}get syncViewSelection(){return this.viewModel.syncViewSelection}set syncViewSelection(e){this.viewModel.syncViewSelection=e}get syncWithViewSelectionManager(){return this.syncViewSelection}set syncWithViewSelectionManager(e){this.syncViewSelection=e}get tableController(){return this.viewModel.tableController}set tableController(e){this.viewModel.tableController=e}get tableParent(){return this.viewModel.tableParent}set tableParent(e){this.viewModel.tableParent=e}get tableTemplate(){return this.viewModel.tableTemplate}set tableTemplate(e){this.viewModel.tableTemplate=e}get tableTemplateOverride(){return this.viewModel.tableTemplateOverride}set tableTemplateOverride(e){this.viewModel.tableTemplateOverride=e}get timeExtent(){return this.viewModel.timeExtent}set timeExtent(e){this.viewModel.timeExtent=e}get timeZone(){return this.viewModel.timeZone}set timeZone(e){this.viewModel.timeZone=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get visibleColumns(){return this.viewModel.visibleColumns}get visibleElementsOverride(){const{attachmentsViewOptions:e,relatedTable:t,tableController:i,visibleElements:s}=this,{columnDescriptions:n,columnMenus:l,tooltips:o}=s,a=null!=e.objectId;if(t)return new S({columnDescriptions:n,columnMenus:l,tooltips:o,close:s.close,header:s.header,layerDropdown:s.layerDropdown,layerDropdownIcons:s.layerDropdownIcons,menu:s.menu,menuItems:s.menuItems,progress:s.progress,selectionColumn:!1,columnMenuItems:new E({sortAscending:!1,sortDescending:!1})});if(i){const e=i.relatedTable===this,t=i.allRelatedTablesVisible,r=e&&s.selectionColumn&&!t&&!a,c=e&&!t&&!a;return new S({columnDescriptions:n,columnMenus:l,tooltips:o,selectionColumn:r,close:!1,header:!1,layerDropdown:!1,menu:!1,pendingEditsFooter:!1,progress:!1,columnMenuItems:new E({sortAscending:c,sortDescending:c})})}return a?new S({columnDescriptions:n,columnMenus:l,tooltips:o,close:s.close,header:s.header,layerDropdown:s.layerDropdown,layerDropdownIcons:s.layerDropdownIcons,menu:s.menu,menuItems:s.menuItems,progress:s.progress,selectionColumn:!1,columnMenuItems:new E({sortAscending:!1,sortDescending:!1})}):null}addPendingEdits(e){this.viewModel.addPendingEdits(e)}async deleteAttachments(e,t,i){null!=e&&t?.length&&(i?this._showDeleteAttachmentPrompt(e,t):await this.viewModel.deleteAttachments(e,t))}async deleteSelection(e){this.highlightIds.length&&(e?this._showDeleteSelectionPrompt():await this.viewModel.deleteSelection())}async discardPendingEdits(e,t){return t?this._showDiscardEditsPrompt(e):this.viewModel.discardPendingEdits(e)}async downloadAttachmentById(e,t){return this.viewModel.downloadAttachmentById(e,t)}drainRelatedTables(){this.viewModel.drainRelatedTables()}async exportSelectionToCSV(e){return this.viewModel.exportSelectionToCSV(e)}findColumn(e){return this.viewModel.findColumn(e)}getFeatureStoreItemByObjectId(e){return this.viewModel.getFeatureStoreItemByObjectId(e)}goToPage(e){this.viewModel.goToPage(e)}hideAllColumns(){this.viewModel.hideAllColumns()}hideColumn(e){this.grid?.hideColumn(e)}nextPage(){this.viewModel.nextPage()}previousPage(){this.viewModel.previousPage()}async refresh(){await this.viewModel.refresh()}refreshCellContent(){this.viewModel.refreshCellContent()}async saveAttachmentsViewForm(){await this.viewModel.saveAttachmentsViewForm()}async savePendingEdits(){await this.viewModel.savePendingEdits()}showAllColumns(){this.viewModel.showAllColumns()}showColumn(e){this.grid?.showColumn(e)}sortColumn(e,t){this.viewModel.sortColumn(e,t)}scrollLeft(){this.viewModel.scrollLeft()}scrollToBottom(){this.viewModel.scrollToBottom()}scrollToIndex(e){this.viewModel.scrollToIndex(e)}scrollToRow(e){this.viewModel.scrollToRow(e)}scrollToTop(){this.viewModel.scrollToTop()}toggleColumnVisibility(e){this.viewModel.toggleColumnVisibility(e)}async zoomToSelection(){return this.effectiveTable.viewModel.zoomToSelection()}render(){const{_effectiveVisibleElements:e,isQueryingOrSyncing:t,menuConfig:i,state:s}=this;return U("div",{bind:this,class:this.classes(K.base,F.widget)},U("calcite-panel",{bind:this,class:K.content,closable:e.close,closed:this.closed,collapsed:this.collapsed,collapsible:e.collapse,description:this._effectiveDescription,disabled:this.disabled||"disabled"===s&&!this._effectiveLayers?.length,heading:e.header?this._effectiveTitle:void 0,key:"table-content",loading:"loading"===s,menuOpen:!!i?.open,overlayPositioning:"fixed",onCalcitePanelClose:()=>{this.closed=!0,this.emit("close")},onCalcitePanelToggle:e=>{this.collapsed=e.target.collapsed,this.emit("toggle")}},e.progress?U("calcite-progress",{type:t?"indeterminate":"determinate"}):null,this._showLayerDropdown?this._renderLayerDropdown():null,this._renderColumnVisibilityAction(),this._renderHeaderMenuActions(),this._renderNavigationBar(),this._renderTables(),this._renderError(),this._renderFooterContent()),this._renderColumnVisibilityPopover(),this._renderPrompt(),this._renderDialog())}_renderTables(){const{grid:e,relatedTables:t}=this,i=this.classes(K.tableContainer);if(t.length){const s=this.classes(K.base,this.allRelatedTablesVisible?K.expanded:K.collapsed,this._attachmentsViewIsVisible?K.tableContainerWithAttachments:void 0);return U("div",{class:i},U("calcite-panel",{overlayPositioning:"fixed"},U("div",null,[this._shouldShowGrid?U("div",{class:s},e?.render(),this._renderPagination()):void 0,...this._filteredTables.map(e=>{const i=t.indexOf(e);return U("div",{class:s,key:`related-${i}`},e.render())}),,])))}return null!=this.attachmentsViewOptions.objectId?U("div",{class:i},U("calcite-panel",{overlayPositioning:"fixed"},U("div",null,[U("div",{class:this.classes(K.base,K.collapsed)},e?.render(),this._renderPagination()),this._renderAttachmentsView()]))):[U("div",{class:i},e?.render()),this._renderPagination()]}_renderPagination(){if(this.paginationEnabled)return U("calcite-pagination",{pageSize:1,startItem:this.pageIndex+1,totalItems:this.pageCount,onCalcitePaginationChange:e=>{this._attachmentsDialogPreviewLoading=!1,this.goToPage(e.currentTarget.startItem-1)}})}_renderError(){const{messages:e}=this;return U("calcite-alert",{autoClose:!0,autoCloseDuration:"fast",icon:q.exclamationMarkTriangle,kind:"danger",label:e.errorOccured,open:this._hasAttachmentsViewError,slot:"alerts",topLayerDisabled:this.topLayerDisabled,onCalciteAlertClose:()=>{this.attachmentsViewOptions.error=null}},U("span",{slot:"message"},e.errorOccured))}_renderFooterContent(){if(!this.hasPendingEdits||!this._effectiveVisibleElements.pendingEditsFooter)return;const{hasInvalidPendingEdits:e,isQueryingOrSyncing:t,messages:i,messagesCommon:s}=this,n=e||t,l=this.hasContingentValues,o=[U("calcite-button",{appearance:"outline",disabled:t,iconStart:q.reset,key:"footer-reset-button",onclick:()=>{this.discardPendingEdits()},slot:"footer-end",width:"auto"},s.reset),U("calcite-button",{disabled:n,iconStart:q.save,key:"footer-save-button",loading:this.isSyncing,onclick:()=>{this.savePendingEdits()},slot:"footer-end",width:"auto"},s.save)];if(l){const t=e?i.contingentValues.hasInvalidValues:i.contingentValues.hasValidValues,s=e?q.exclamationMarkTriangle:q.checkCircle,n=e?K.footerIconDanger:K.footerIconSuccess;o.push(U("div",{class:K.footerMessage,key:"footer-message",slot:"footer-start"},U("calcite-icon",{class:n,icon:s,scale:"s",slot:"footer-start"}),t))}return o}_renderPrompt(){return this.prompt?U(A,{...this.prompt,headingLevel:2}):void 0}_showDeleteSelectionPrompt(){const{messages:e,messagesCommon:i}=this,s=t(e.deleteSelectionCount,{count:this.highlightIds.length});this.showPrompt({title:s,message:e.deleteRecordsRemoved,context:"danger",actions:{primary:{label:i.delete,action:async()=>{try{await this.viewModel.deleteSelection()}finally{this.clearPrompt()}}},secondary:{label:e.keepRecords,action:()=>this.clearPrompt()}}})}_showDeleteAttachmentPrompt(e,i){const{messages:s,messagesCommon:n}=this,l=t(s.deleteAttachmentCount,{count:i.length});this.showPrompt({title:l,message:s.deleteAttachmentConfirmation,context:"danger",actions:{primary:{label:n.delete,action:async()=>{try{await this.deleteAttachments(e,i,!1)}finally{this.clearPrompt()}}},secondary:{label:n.cancel,action:()=>this.clearPrompt()}}})}async _showDiscardEditsPrompt(e){const t=Promise.withResolvers(),{messagesEditor:i}=this;return this.showPrompt({title:i.cancelEditTitle,message:i.cancelEditWarningMessage,context:"danger",actions:{primary:{label:i.discardEdits,action:async()=>{try{await this.discardPendingEdits(e)}finally{t.resolve(!0)}}},secondary:{label:i.continueEditing,action:()=>t.resolve(!1)}}}),t.promise.finally(()=>this.clearPrompt())}_onTableViewChange(e){this.hasPendingEdits?this._showDiscardEditsPrompt().then(t=>t&&e()):e()}_resetNestedViews(){this.relatedTable&&this.drainRelatedTables(),this.effectiveTable.attachmentsViewOptions.objectId=null}_renderDialog(){const{attachmentsViewOptions:e,messages:t}=this,{objectId:i}=e;return U("calcite-dialog",{class:K.dialog,description:this.viewModel.getFeatureTitleSync(i),heading:t.attachments,modal:!0,open:this._dialogIsOpen,placement:"cover",width:"l",onCalciteDialogClose:()=>this._onDialogClose()},this._renderDialogContent())}_renderDialogContent(){const e=this.attachmentsViewOptions.dialogInfo;if(e)return this._renderAttachmentsDialogContent(e)}_renderAttachmentsDialogContent(e){const{attachmentsViewOptions:t,messages:i}=this,{attachmentInfos:s}=t,n=s.indexOf(e);return U(N,null,U("div",{class:K.dialogHeader,key:"header",slot:"content-top"},U("span",null,e.name),U("calcite-button",{appearance:"outline",onclick:()=>{t.attachmentId=e.id,t.dialogId=null}},i.viewDetails)),U("calcite-progress",{type:this._attachmentsDialogPreviewLoading?"indeterminate":"determinate"}),U("div",{class:K.dialogContent,key:"content"},this._renderAttachmentsViewDetailsImage(e)),U("calcite-pagination",{pageSize:1,slot:"footer",startItem:n+1,totalItems:s.length,onCalcitePaginationChange:e=>{const i=e.currentTarget.startItem-1,n=s[i]?.id;t.dialogId=n}}))}_onDialogClose(){const e=this.attachmentsViewOptions;null!=e.dialogId&&(e.dialogId=null),this._attachmentsDialogPreviewLoading=!1}_renderHeaderMenuAction(e){const{disabled:t,hidden:i,icon:s,text:n,clickFunction:l}=e;if(!i)return U("calcite-action",{disabled:t??this.menuConfig?.disabled,icon:s??void 0,key:n,onclick:()=>l(),slot:"header-menu-actions",text:n,textEnabled:!0,title:n})}_renderHeaderMenuActions(){return this._shouldShowMenu?[this._renderDefaultHeaderMenuActions(),this._renderCustomHeaderMenuActions()]:[]}_renderDefaultHeaderMenuActions(){if(!this._hasDefaultMenuItems)return[];const{messages:e}=this;return[this._showRefreshDataAction&&{icon:q.refresh,text:e.refreshData,clickFunction:()=>this.refresh()},this._showDeleteSelectionAction&&{icon:q.delete,text:e.deleteSelection,clickFunction:()=>this.deleteSelection(!0)},this._showClearSelectionAction&&{icon:q.clearSelection,text:e.clearSelection,clickFunction:()=>this.highlightIds?.removeAll()},this._showZoomToSelectionAction&&{icon:q.zoomToSelection,text:e.zoomToSelection,clickFunction:()=>this.zoomToSelection()},this._showSelectedRecordsShowSelectedAction&&{icon:q.showSelected,text:e.showSelected,clickFunction:()=>{const{objectIds:e}=this;e.removeAll(),e.addMany(this.highlightIds.toArray())}},this._showSelectedRecordsShowAllAction&&{icon:q.showAll,text:e.showAllRecords,clickFunction:()=>this.objectIds.removeAll()},this._showExportSelectionToCSVAction&&{icon:q.exportToCSV,text:e.exportSelectionCSV,clickFunction:()=>this.exportSelectionToCSV()}].filter(i).map(e=>e&&this._renderHeaderMenuAction(e))}_renderCustomHeaderMenuActions(){return this.menuConfig?.items?.map(({disabled:e,hidden:t,icon:i,label:s,clickFunction:n})=>this._renderHeaderMenuAction({hidden:"function"==typeof t?t():t,icon:i,text:s,disabled:e,clickFunction:e=>n(e)}))??[]}_renderColumnVisibilityAction(){if(!this._showColumnVisibilityAction)return[];const{_columnVisibilityActions:e,id:t}=this,i=this.messages.menuText.columnVisibility;return U("calcite-action",{afterCreate:i=>e.set(t,i),afterRemoved:()=>e.delete(t),bind:this,disabled:this._columnVisibilityActionDisabled,icon:q.showColumn,id:`${t}__toggle-columns-action`,slot:"header-actions-end",text:i},this._effectiveVisibleElements.tooltips?U("calcite-tooltip",{closeOnClick:!0,overlayPositioning:"fixed",placement:"bottom-end",referenceElement:e.get(t),topLayerDisabled:this.topLayerDisabled},i):null)}_renderColumnVisibilityPopover(){if(!this._showColumnVisibilityAction||this._columnVisibilityActionDisabled)return;const e=this.visibleElements.columnVisibilityMenuItems.header,t=this.messages.menuText.columnVisibility;return U("calcite-popover",{autoClose:!0,class:K.menuPopover,closable:e,heading:e?t:void 0,label:t,overlayPositioning:"fixed",referenceElement:this._columnVisibilityActions.get(this.id),topLayerDisabled:this.topLayerDisabled},this._renderColumnVisibilityList())}_renderColumnVisibilityList(){const{effectiveTable:e,messages:{menuText:t}}=this;if(0!==e.columns.length)return U("calcite-list",{afterCreate:H,afterRemoved:B,afterUpdate:H,bind:this,"data-node-ref":"_columnVisibilityList",displayMode:"nested",filterEnabled:this.visibleElements.columnVisibilityMenuItems.filter,filterPlaceholder:t.searchFields,label:t.fieldVisibility,selectionMode:"multiple",onCalciteListFilter:()=>this.scheduleRender()},this._renderColumnToggleAll(),e.columns.toArray().map(t=>{const i=I(t)?t.columns?.map(t=>this._renderColumnListItem({column:t,table:e,ignoreSelect:!0})):void 0;return this._renderColumnListItem({column:t,table:e,items:i})}),U("calcite-notice",{appearance:"transparent",kind:"neutral",open:!0,slot:"filter-no-results"},U("div",{slot:"message"},t.noMatchesFound)))}_renderColumnToggleAll(){if(!this.visibleElements.columnVisibilityMenuItems.toggleAll)return;const{_columnVisibilityList:e}=this;return e&&""!==e.filterText&&0===e.filteredItems.length?void 0:U("calcite-button",{appearance:"transparent",onclick:()=>this._toggleAllColumns(),width:"full"},this._getColumnToggleAllText())}_getColumnToggleAllText(){const{_columnVisibilityList:e,effectiveTable:t,messages:{menuText:i}}=this;return e?""===e.filterText?t.allColumnsVisible?i.deselectAll:i.selectAll:this._allColumnsAreVisible(e.filteredItems.map(e=>e.value))?i.deselectAll:i.selectAll:""}_renderColumnListItem(e){const{column:t,table:i,items:s,ignoreSelect:n}=e,{effectiveLabel:l,fieldName:o,hidden:a}=t;return U("calcite-list-item",{expanded:!(!s?.length||a)||void 0,key:`toggle-columns__item-${o}`,label:l,metadata:{description:t.effectiveDescription,type:D(t)?t.field.type:void 0},selected:!a,value:o,onCalciteListItemSelect:e=>{n&&e.stopPropagation(),i.toggleColumnVisibility(e.currentTarget.value)}},s)}_renderLayerDropdown(){const e=this.messages.selectALayer;return U("div",{class:K.layerDropdownMenu,key:`${this.id}-layerDropdown`,slot:"header-actions-start"},U("calcite-dropdown",{bind:this,maxItems:5,overlayPositioning:"fixed",placement:"bottom-start",topLayerDisabled:this.topLayerDisabled},U("calcite-action",{icon:q.layers,slot:"trigger",text:e,title:e}),U("calcite-dropdown-group",{selectionMode:"single"},this._effectiveLayers.map((e,t)=>this._renderLayerDropdownItem(e,t))??null)))}_renderLayerDropdownItem(e,t){const i=this.visibleElements.layerDropdownIcons;return U("calcite-dropdown-item",{iconStart:i?j(e):void 0,key:`dropdown-item-${t}`,label:e.title??"",selected:e===this.layer,value:e.id,onCalciteDropdownItemSelect:()=>this._onTableViewChange(()=>this.layer=e)},e.title)}_onRelatedNavigationItemClick(e){this.viewModel.drainRelatedTablesAboveIndex(e)}_collapseRelatedTable(e){this.viewModel.collapseRelatedTable(this.effectiveTable,e)}_onShowRelatedTable(e){this.showRelatedTableCallback||this.hasPendingEdits||(this._collapseRelatedTable(e),this._createRelatedTable(e))}async _createRelatedTable(e){const{autoRefreshEnabled:t,autoSaveEnabled:i,editingEnabled:s,effectiveTable:n,multipleSelectionEnabled:l,paginationEnabled:o,pageSize:a,view:r,viewModel:c}=this,{layer:d,objectId:h,relatedLayer:m,relationshipId:p}=e;await d.load();const u=this.attachmentsEnabled&&x(d),g=new Z({layer:d,autoRefreshEnabled:t,autoSaveEnabled:i,attachmentsEnabled:u,editingEnabled:s,multipleSelectionEnabled:l,paginationEnabled:o,pageSize:a,relatedRecordsEnabled:!0,relationshipConfig:{objectId:h,relatedLayer:m,relationshipId:p},relationshipColumnConfigs:L(d,p),tableController:this,tableParent:n,view:r,showRelatedTableCallback:e=>c.emit("show-related-table",e)});this.relatedTables.add(g),this.scheduleRender()}_renderAttachmentsView(){switch(this.attachmentsViewOptions.effectiveMode){case"list":return this._renderAttachmentsViewList();case"details":return this._renderAttachmentsViewDetails();case"file":return this._renderAttachmentsViewFile()}}_renderAttachmentsViewFile(){const e=this.attachmentsViewOptions,{objectId:t}=e;if(null!=t)return[U("div",{class:K.attachmentsView,key:"attachments-view"},this._renderAttachmentsViewInformation(),U("div",{class:K.attachmentsViewContent,key:"attachments-view-content"},U("div",{bind:this,class:K.attachmentsViewDropArea,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop},U("calcite-icon",{class:K.attachmentsViewIcon,icon:q.upload,scale:"l"}),this._renderAttachmentsViewFileLabelNode(),this._renderAttachmentsViewFileMessageNode(),U("form",{afterCreate:t=>e.form=t,afterRemoved:()=>e.form=null,bind:this,key:"attachments-form"},U("fieldset",null,this._renderAttachmentsViewFileNameNode(),U("input",{afterCreate:H,afterRemoved:B,afterUpdate:H,bind:this,"data-node-ref":"_attachmentsInput",files:e.candidates,hidden:!0,name:"attachment",onchange:e=>this._onAttachmentsViewCandidateChange(e),type:"file"}),this._renderAttachmentsViewFileSelectNode(),this._renderAttachmentsViewFileSaveNode(),this._renderAttachmentsViewFileCancelNode())))))]}_renderAttachmentsViewFileLabelNode(){if("replace"===this.attachmentsViewOptions.fileMode)return U("span",{class:K.attachmentsViewDropAreaLabel,key:"replace-file-node"},this.messages.replaceFile)}_renderAttachmentsViewFileMessageNode(){const e=this.attachmentsViewOptions;if(e.hasCandidates)return;const{messages:t}=this,i=this.supportsAddAttachments?null==e.objectId?t.noFeature:t.dragAndDropToUpload:t.editingRestricted;return U("span",{class:K.attachmentsViewDropAreaMessage,key:"message-node"},i)}_renderAttachmentsViewFileNameNode(){const e=this.attachmentsViewOptions.candidates,t=Array.from(e??[]).at(-1);if(t)return U("span",{class:K.attachmentsViewDropAreaMessage,key:"filename-node"},t.name)}_renderAttachmentsViewFileSelectNode(){if(this.supportsAddAttachments)return U("calcite-button",{appearance:"outline-fill",disabled:this.isSyncingAttachments,iconStart:q.folderOpen,key:"select-node",onclick:()=>{this._resetAttachmentsInput(),this._attachmentsInput?.click()}},this.messages.selectFile)}_renderAttachmentsViewFileSaveNode(){const{isSyncingAttachments:e,messages:t}=this,{attachmentInfo:i,hasCandidates:s}=this.attachmentsViewOptions;if(this.supportsAddAttachments&&s)return U("calcite-button",{appearance:"solid",disabled:e,iconStart:q.save,key:"save-node",loading:e,onclick:()=>{this.saveAttachmentsViewForm()}},i?t.updateAttachment:t.addAttachment)}_renderAttachmentsViewFileCancelNode(){const{hasAttachments:e,hasCandidates:t}=this.attachmentsViewOptions;if(e||t)return U("calcite-button",{appearance:"transparent",bind:this,disabled:this.isSyncingAttachments,key:"cancel-node",onclick:()=>{this._resetAttachmentsInput(),this.attachmentsViewOptions.cancel()}},this.messagesCommon.cancel)}_renderAttachmentsViewDetails(){const{attachmentInfo:e}=this.attachmentsViewOptions;if(e)return[U("div",{class:K.attachmentsView,key:"attachments-view"},this._renderAttachmentsViewInformation(),U("div",{class:K.attachmentsViewContent,key:"attachments-view-content"},U("div",{class:K.attachmentsViewDetails},this._renderAttachmentsViewDetailsPreview(e))))]}_renderAttachmentsViewDetailsPreview(e){const t=[this._renderAttachmentsViewDetailsImage(e)];if(M(e.contentType)){const i=this.messages.maximize;t.push(U("calcite-action",{icon:q.expand,label:i,onclick:t=>{t.preventDefault(),this.attachmentsViewOptions.dialogId=e.id},text:i,textEnabled:!0,title:i}))}return t}_renderAttachmentsViewDetailsImage(e){const{contentType:t,name:i,size:s,url:n}=e,{messages:l}=this;return M(t)?U("img",{afterCreate:()=>this._attachmentsDialogPreviewLoading=!0,alt:i,key:`thumbnail-image-${i}`,onerror:()=>this._attachmentsDialogPreviewLoading=!1,onload:()=>this._attachmentsDialogPreviewLoading=!1,src:`${n}${n?.includes("?")?"&":"?"}s=${s}`,title:i}):[U("calcite-icon",{icon:V(t),key:`thumbnail-icon-${i}`,scale:"l",textLabel:i,title:i}),l.noPreviewAvailable]}_renderAttachmentsViewInformation(){const{attachmentsViewOptions:e,messages:t,messagesUnits:i}=this,{attachmentInfo:s,objectId:n}=e;if(s&&null!=n)return U("div",{class:K.attachmentsViewInformation,key:"information"},this._renderAttachmentViewInformationButtons(s,n),U("span",{class:K.attachmentsViewInformationLabel,key:"file-label"},t.fileName),U("span",{class:K.attachmentsViewInformationData,key:"file-value"},s.name),U("span",{class:K.attachmentsViewInformationLabel,key:"type-label"},t.attachmentType),U("span",{class:K.attachmentsViewInformationData,key:"type-value"},this._getLabelForAttachmentType(s)),this._renderAttachmentKeywordDetails(s),U("span",{class:K.attachmentsViewInformationLabel,key:"size-label"},t.size),U("span",{class:K.attachmentsViewInformationData,key:"size-span"},h(i,s.size??0)))}_renderAttachmentViewInformationButtons(e,t){const{attachmentsViewOptions:i,messages:s,messagesCommon:n}=this,l="details"!==i.effectiveMode,o=e.id,a=[U("calcite-button",{appearance:"outline",disabled:l,key:"download-button",onclick:e=>{e.preventDefault(),this.downloadAttachmentById(t,o)},width:"full"},s.download)];return this.supportsUpdateAttachments&&a.push(U("calcite-button",{appearance:"outline",disabled:l,key:"replace-button",onclick:()=>{i.mode="file",i.attachmentId=o},width:"full"},s.replace)),this.supportsDeleteAttachments&&a.push(U("calcite-button",{appearance:"outline",disabled:l,key:"delete-button",onclick:()=>{this.deleteAttachments(t,[o],!0)},width:"full"},n.delete)),a}_renderAttachmentKeywordDetails({keywords:e}){if(e&&""!==e)return[U("span",{class:K.attachmentsViewInformationLabel,key:"keyword-label"},this.messages.keyword),U("span",{class:K.attachmentsViewInformationData,key:"keyword-value"},e)]}_renderAttachmentsViewList(){const{attachmentsViewOptions:e,isSyncingAttachments:t,messages:i,messagesUnits:s}=this,{attachmentInfos:n,objectId:l}=e;return U("calcite-list",{afterCreate:H,afterRemoved:B,afterUpdate:H,bind:this,class:K.attachmentsViewList,"data-node-ref":"attachmentsList",key:`attachments-list-${l}`,label:i?.attachments,loading:t,ondragover:e=>e.preventDefault(),ondrop:this._onAttachmentsViewDrop,selectionMode:this.supportsDeleteAttachments?"multiple":"none",onCalciteListChange:()=>this.scheduleRender()},...n?.map(t=>{const{id:n,name:o,size:a}=t,r=h(s,a??0);return U("calcite-list-item",{afterRemoved:()=>this.scheduleRender(),key:`attachment-${n}`,label:o,value:n},this._renderAttachmentsViewListPreview(t),U("span",{class:K.attachmentsViewListFileSize,slot:"actions-end",title:r},r),U("calcite-action",{icon:q.downloadTo,key:"download",label:o,onclick:e=>{e.preventDefault(),this.downloadAttachmentById(l??-1,n)},slot:"actions-end",text:i.downloadAttachment,title:i.downloadAttachment}),U("calcite-action",{icon:q.chevronRight,iconFlipRtl:!0,key:"details",label:o,onclick:()=>{e.mode="details",e.attachmentId=n},slot:"actions-end",text:i.viewAttachment,title:i.viewAttachment}))}))}_renderAttachmentsViewListPreview(e){return U("div",{class:K.attachmentsViewListThumbnail,slot:"content-start"},U("span",null,this._renderAttachmentsViewListImage(e)))}_renderAttachmentsViewListImage(e,t=64){const{contentType:i,name:s,size:n,url:l}=e,o=`${l}${l?.includes("?")?"&":"?"}w=${t}&s=${n}`;return this.supportsResizeAttachments&&M(i)?U("img",{alt:s,key:`thumbnail-image-${s}`,src:o,title:s}):U("calcite-icon",{icon:V(i),key:`thumbnail-icon-${s}`,scale:"l",textLabel:s,title:s})}_onAttachmentsViewCandidateChange({target:e}){this.attachmentsViewOptions.candidates=e?.files}_onAttachmentsViewDrop(e){e.preventDefault(),(this.supportsAddAttachments||this.supportsUpdateAttachments)&&(this.attachmentsViewOptions.mode="file",this.attachmentsViewOptions.candidates=e.dataTransfer?.files)}_resetAttachmentsInput(){this._attachmentsInput&&(this._attachmentsInput.value="")}_getLabelForAttachmentType({contentType:e}){const t=this.messages;return e.startsWith("image/")?t.attachmentTypes.image:e.startsWith("audio/")?t.attachmentTypes.audio:e.startsWith("video/")?t.attachmentTypes.video:e.startsWith("text/")||e.startsWith("application/")||e.startsWith("model/")?t.attachmentTypes.document:t.attachmentTypes.unknown}_renderNavigationBar(){const{effectiveTable:e,messages:i,messagesCommon:s,navigationScale:n,relatedTable:l,relatedTables:o}=this;if(!this._shouldShowNavigationBar)return;const{attachmentsList:a,attachmentsViewOptions:r,layer:c,supportsAddAttachments:d,supportsDeleteAttachments:h}=e;if(!c)return;const{attachmentInfos:m,objectId:p}=r,u=null!=p,g=m.length,w=a?.selectedItems?.length??0,b=`${c.objectIdField}: ${p}`,v=t(i.selectedCount,{count:w}),y=t(i.attachmentsCount,{count:g}),f=u?U("calcite-action",{bind:this,icon:q.chevronRight,iconFlipRtl:!0,key:"navigation-feature",onclick:()=>e.scrollToRow(p),scale:n,text:b,textEnabled:!0,title:b}):void 0,_=u?U("calcite-action",{icon:q.chevronRight,iconFlipRtl:!0,key:"navigation-attachments-label",label:y,onclick:()=>{g>0&&(r.mode="list")},scale:n,text:y,textEnabled:!0,title:y}):void 0,M=u?U("calcite-chip",{closable:!0,closed:0===w,key:"navigation-chip",kind:"inverse",label:v,scale:"s",selected:!0,title:v,value:"selected",onCalciteChipClose:()=>a?.selectedItems?.forEach(e=>e.selected=!1)},v):void 0,V=l?U("calcite-label",{layout:"inline",scale:n},i.showAllTables,U("calcite-switch",{checked:this.allRelatedTablesVisible,scale:n,onCalciteSwitchChange:e=>this.showAllRelatedTables=!!e.currentTarget.checked})):void 0,C=u&&"list"===r.effectiveMode&&null!=p&&w&&h?U("calcite-action",{icon:q.delete,iconFlipRtl:!0,key:"attachments-trash-all",onclick:()=>{e.deleteAttachments(p,a?.selectedItems?.map(e=>e.value)??[],!0)},scale:n,text:s.delete,textEnabled:!0,title:t(i.deleteAttachmentCount,{count:w})}):void 0,A=u&&"list"===r.effectiveMode&&d?U("calcite-action",{bind:this,icon:q.plus,iconFlipRtl:!0,key:"attachments-add",onclick:()=>{r.objectId=p,r.attachmentId=null,r.mode="file"},scale:n,text:i.addAttachment,textEnabled:!0,title:i.addAttachment}):void 0;return U("div",{class:K.tableNavigation,key:"table-nav"},U("calcite-action",{icon:q.moveUp,iconFlipRtl:!0,key:"go-back",onclick:()=>this._onTableViewChange(this._resetNestedViews),scale:n,text:this.layer?.title??"",textEnabled:!1,title:l?i.exitRelatedRecords:i.exitAttachments}),o.toArray().map((e,t)=>this._renderRelatedTableNavigationAction(e,t)),f,_,U("div",null,M,V,C,A))}_renderRelatedTableNavigationAction(e,t){const i=this._getLabelForRelatedTableNavigationAction(e);return U("calcite-action",{icon:q.chevronRight,iconFlipRtl:!0,key:t,onclick:()=>{(t!==this.relatedTables.length-1||this._attachmentsViewIsVisible)&&this._onTableViewChange(()=>this._onRelatedNavigationItemClick(t))},scale:this.navigationScale,text:i,textEnabled:!0,title:e.layer?.title||""})}_getLabelForRelatedTableNavigationAction(e){const t=e.layer?.title;if(!t)return"";const{relatedTables:i}=this;if(i.length<=1)return t;return i.indexOf(e)!==i.length-1&&t.length>20?`${t.slice(0,20)}...`:t}_allColumnsAreVisible(e){return e.every(e=>!1===this.findColumn(e)?.hidden)}_toggleAllColumns(){const{_columnVisibilityList:e,effectiveTable:t}=this,i=e?.filteredItems.map(e=>e.value);""!==e?.filterText&&i?.length?this._allColumnsAreVisible(i)?i.forEach(e=>this.hideColumn(e)):i.forEach(e=>this.showColumn(e)):t.allColumnsVisible?t.hideAllColumns():t.showAllColumns()}};e([m()],J.prototype,"_attachmentsDialogPreviewLoading",void 0),e([m()],J.prototype,"_attachmentsInput",void 0),e([m()],J.prototype,"_attachmentsViewIsVisible",null),e([m()],J.prototype,"_columnVisibilityActions",void 0),e([m()],J.prototype,"_columnVisibilityActionDisabled",null),e([m()],J.prototype,"_columnVisibilityList",void 0),e([m()],J.prototype,"_dialogIsOpen",null),e([m()],J.prototype,"_effectiveDescription",null),e([m()],J.prototype,"_effectiveLayers",null),e([m()],J.prototype,"_effectiveTitle",null),e([m()],J.prototype,"_effectiveVisibleElements",null),e([m()],J.prototype,"_filteredTables",null),e([m()],J.prototype,"_hasAttachmentsViewError",null),e([m()],J.prototype,"_hasCustomMenuItems",null),e([m()],J.prototype,"_hasDefaultMenuItems",null),e([m()],J.prototype,"_shouldShowGrid",null),e([m()],J.prototype,"_shouldShowMenu",null),e([m()],J.prototype,"_showClearSelectionAction",null),e([m()],J.prototype,"_showColumnVisibilityAction",null),e([m()],J.prototype,"_showDeleteSelectionAction",null),e([m()],J.prototype,"_showExportSelectionToCSVAction",null),e([m()],J.prototype,"_showLayerDropdown",null),e([m()],J.prototype,"_shouldShowNavigationBar",null),e([m()],J.prototype,"_showRefreshDataAction",null),e([m()],J.prototype,"_showSelectedRecordsShowSelectedAction",null),e([m()],J.prototype,"_showSelectedRecordsShowAllAction",null),e([m()],J.prototype,"_showZoomToSelectionAction",null),e([m()],J.prototype,"_viewLayers",null),e([m()],J.prototype,"attachmentsList",void 0),e([m({readOnly:!0})],J.prototype,"grid",null),e([m()],J.prototype,"actionColumn",null),e([m()],J.prototype,"actionColumnConfig",null),e([m({readOnly:!0})],J.prototype,"activeFilters",null),e([m({readOnly:!0})],J.prototype,"activeSortOrders",null),e([m()],J.prototype,"allColumns",null),e([m()],J.prototype,"allColumnsVisible",null),e([m({readOnly:!0})],J.prototype,"allRelatedTablesVisible",null),e([m()],J.prototype,"allVisibleColumns",null),e([m()],J.prototype,"attachmentsColumns",null),e([m()],J.prototype,"attachmentsEnabled",null),e([m()],J.prototype,"attachmentsViewOptions",null),e([m({type:y})],J.prototype,"attributeTableTemplate",null),e([m()],J.prototype,"autoRefreshEnabled",null),e([m()],J.prototype,"autoSaveEnabled",null),e([m()],J.prototype,"canAddRelatedFeature",null),e([m()],J.prototype,"clearPrompt",null),e([m()],J.prototype,"closed",void 0),e([m()],J.prototype,"collapsed",void 0),e([m()],J.prototype,"columnPerformanceModeEnabled",null),e([m()],J.prototype,"columnReorderingEnabled",null),e([m({readOnly:!0})],J.prototype,"columns",null),e([m()],J.prototype,"definitionExpression",null),e([m()],J.prototype,"description",void 0),e([m()],J.prototype,"disabled",void 0),e([m()],J.prototype,"editingEnabled",null),e([m()],J.prototype,"effectiveSelectionManager",null),e([m()],J.prototype,"effectiveSize",null),e([m()],J.prototype,"effectiveTable",null),e([m()],J.prototype,"fieldColumns",null),e([m({types:u})],J.prototype,"filterGeometry",null),e([m()],J.prototype,"filterBySelectionEnabled",null),e([m()],J.prototype,"filterByViewExtent",null),e([m()],J.prototype,"groupColumns",null),e([m()],J.prototype,"hasContingentValues",null),e([m()],J.prototype,"hasInvalidPendingEdits",null),e([m()],J.prototype,"hasPendingEdits",null),e([m()],J.prototype,"hiddenFields",null),e([m()],J.prototype,"highlightEnabled",null),e([m()],J.prototype,"highlightIds",null),e([m()],J.prototype,"icon",null),e([m()],J.prototype,"initialSize",null),e([m()],J.prototype,"isQueryingOrSyncing",null),e([m()],J.prototype,"isSyncing",null),e([m()],J.prototype,"isSyncingAttachments",null),e([m()],J.prototype,"label",null),e([m()],J.prototype,"layer",null),e([m()],J.prototype,"layers",null),e([m()],J.prototype,"layerView",null),e([m()],J.prototype,"maxSize",null),e([m(),z("esri/widgets/FeatureTable/t9n/FeatureTable")],J.prototype,"messages",null),e([m(),z("esri/t9n/common")],J.prototype,"messagesCommon",null),e([m(),z("esri/widgets/Editor/t9n/Editor")],J.prototype,"messagesEditor",void 0),e([m(),z("esri/core/t9n/Units")],J.prototype,"messagesUnits",null),e([m(),z("esri/widgets/support/t9n/uriUtils")],J.prototype,"messagesURIUtils",null),e([m()],J.prototype,"menuConfig",null),e([m()],J.prototype,"multipleSelectionEnabled",null),e([m()],J.prototype,"multipleSelectionEnabledOverride",null),e([m()],J.prototype,"multiSortEnabled",null),e([m()],J.prototype,"multipleSortPriority",null),e([m()],J.prototype,"navigationScale",void 0),e([m()],J.prototype,"noDataMessage",null),e([m()],J.prototype,"objectIds",null),e([m()],J.prototype,"outFields",null),e([m()],J.prototype,"pageCount",null),e([m()],J.prototype,"pageIndex",null),e([m()],J.prototype,"pageSize",null),e([m()],J.prototype,"paginationEnabled",null),e([m()],J.prototype,"pendingEditsCount",null),e([m()],J.prototype,"prompt",null),e([m()],J.prototype,"relatedRecordsEnabled",null),e([m()],J.prototype,"relatedTable",null),e([m()],J.prototype,"relatedTableHasContingentValues",null),e([m()],J.prototype,"relatedTableHasInvalidPendingEdits",null),e([m()],J.prototype,"relatedTableHasPendingEdits",null),e([m()],J.prototype,"relatedTables",null),e([m()],J.prototype,"relationship",null),e([m()],J.prototype,"relationshipColumnConfigs",null),e([m()],J.prototype,"relationshipColumns",null),e([m()],J.prototype,"relationshipConfig",null),e([m()],J.prototype,"relationshipInfos",null),e([m()],J.prototype,"returnGeometryEnabled",null),e([m()],J.prototype,"returnMEnabled",null),e([m()],J.prototype,"returnZEnabled",null),e([m()],J.prototype,"rowHighlightIds",null),e([m()],J.prototype,"selectionManager",null),e([m()],J.prototype,"selectionSource",null),e([m()],J.prototype,"showAllRelatedTables",null),e([m()],J.prototype,"showPrompt",null),e([m()],J.prototype,"showRelatedTableCallback",null),e([m()],J.prototype,"size",null),e([m({readOnly:!0})],J.prototype,"state",null),e([m()],J.prototype,"supportsAddAttachments",null),e([m()],J.prototype,"supportsAttachments",null),e([m()],J.prototype,"supportsDeleteAttachments",null),e([m()],J.prototype,"supportsResizeAttachments",null),e([m()],J.prototype,"supportsUpdateAttachments",null),e([m()],J.prototype,"syncTemplateOnChangesEnabled",null),e([m()],J.prototype,"syncViewSelection",null),e([m()],J.prototype,"syncWithViewSelectionManager",null),e([m({constructOnly:!0})],J.prototype,"tableController",null),e([m({constructOnly:!0})],J.prototype,"tableParent",null),e([m({type:R})],J.prototype,"tableTemplate",null),e([m()],J.prototype,"tableTemplateOverride",null),e([m()],J.prototype,"title",void 0),e([m({type:f})],J.prototype,"timeExtent",null),e([m()],J.prototype,"timeZone",null),e([m()],J.prototype,"view",null),e([m({type:T}),$(["cell-click","cell-dblclick","cell-pointerover","cell-pointerout","cell-keydown","column-reorder","show-related-table"])],J.prototype,"viewModel",void 0),e([m()],J.prototype,"visibleColumns",null),e([m({type:S,nonNullable:!0})],J.prototype,"visibleElements",void 0),e([m({type:S})],J.prototype,"visibleElementsOverride",null),J=Z=e([p("esri.widgets.FeatureTable")],J);const X=J;export{X as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8589],{83027(e,t,i){i.d(t,{h:()=>r});const r=i(29953).ho},18589(e,t,i){i.r(t),i.d(t,{default:()=>Ve});var r=i(5482),s=i(37838),o=i(11254),n=i(69540),a=i(7762),l=i(49186),u=i(4718),p=i(53966),d=i(97768),y=i(25728),c=i(93637),h=i(17676),g=i(39516),f=i(91429),m=i(89317),b=i(78247),w=i(16930),v=i(55156),C=i(60950),T=i(89808),F=i(99959);const M=Symbol("isFeatureGraphicOrigin");var S;class _ extends F.A{get[(S=M,C.ym)](){return this.layer}get[v.e](){return this.layer}get[T.Q](){return this.layer}constructor(e){super(),this[S]=!0,this.type="feature",this.layer=e}get id(){return this.layer.id}}var I=i(4146),O=i(52106),E=i(44208),Z=i(92474),A=i(61893),D=i(83027),j=i(56507),q=i(5443),P=i(39829),L=i(50498),x=i(96520),R=i(58501),G=i(22671),k=i(7695);let J=0,N=class extends((0,Z.WV)((0,A.g)(a.A))){constructor(e){super(e),this._idToClientGeometry=null,this.type="memory"}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}get _workerGeometryType(){const e=this.layer?.geometryType;return e?this._geometryTypeRequiresClientGraphicMapping(e)?"polygon":e:null}applyEdits(e){return this.load().then(()=>this._applyEdits(e))}openPorts(){return this.load().then(()=>this._connection.openPorts())}async queryFeatures(e,t={}){await this.load(t);const i=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);(0,R.q)(e,this.layer.spatialReference,i);const r=G.A.fromJSON(i);if(!this._requiresClientGraphicMapping()||!this._idToClientGeometry)return r;const s=this.layer.objectIdField;for(const e of r.features){const t=e.attributes[s],i=this._idToClientGeometry.get(t);void 0!==i&&(e.geometry=i)}return r.geometryType=this.layer.geometryType,r}async queryFeaturesJSON(e,t={}){if(this._requiresClientGraphicMapping())throw new l.A("query-features-json:unsupported","Cannot query in JSON format for client only geometry types (mesh and extent)");await this.load(t);const i=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);return(0,R.q)(e,this.layer.spatialReference,i),i}queryFeatureCount(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t))}queryObjectIds(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t))}queryExtent(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t)).then(e=>({count:e.count,extent:q.A.fromJSON(e.extent)}))}querySnapping(e,t={}){return this.load(t).then(()=>this._connection.invoke("querySnapping",e,t))}async queryAttributeBins(e,t={}){return await this.load(),this._connection.invoke("queryAttributeBins",e?.toJSON(),t)}async _applyEdits(e){if(!this._connection)throw new l.A("feature-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField;let i=null;const r=[],s=[];await Promise.all([this._prepareClientMapping(e.addFeatures,null),this._prepareClientMapping(e.updateFeatures,null)]);const o=e=>"objectId"in e&&null!=e.objectId?e.objectId:"attributes"in e&&null!=e.attributes[t]?e.attributes[t]:null;if(e.addFeatures&&(i=this._prepareAddFeatures(e.addFeatures)),e.deleteFeatures)for(const t of e.deleteFeatures){const e=o(t);null!=e&&r.push(e)}const n=e.updateFeatures&&this._idToClientGeometry?new Map:null;if(e.updateFeatures)for(const t of e.updateFeatures)if(s.push(this._serializeFeature(t)),n&&null!=t.geometry){const e=o(t);null!=e&&n.set(e,t)}(0,x.u)(i?i.features:null,s,this.layer.spatialReference);const{fullExtent:a,featureEditResults:u}=await this._connection.invoke("applyEdits",{adds:i?i.features:[],updates:s,deletes:r});return this.fullExtent=a,i&&i.finish(u.uidToObjectId),this._updateIdToClientGeometries(n,u),this._createEditsResult(u)}async _prepareClientMapping(e,t){if("mesh"!==this._layerOrSourceGeometryType||null==e)return;const i=[];for(const{geometry:r}of e)null==r||"mesh"!==r.type||r.hasExtent||r.loaded||i.push(r.load({signal:t}));i.length&&await Promise.all(i)}_updateIdToClientGeometries(e,t){if(this._idToClientGeometry){if(e)for(const i of t.updateResults){if(!i.success)continue;const t=e.get(i.objectId);null!=t&&this._addIdToClientGeometry(t)}for(const e of t.deleteResults)e.success&&this._idToClientGeometry.delete(e.objectId)}}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:""};return{objectId:e.objectId,globalId:e.globalId,error:t?new l.A("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_prepareAddFeatures(e){const t=new Map,i=new Array(e.length);let r=null;for(let s=0;s<e.length;s++){const o=e[s],n=this._serializeFeature(o);r||null==o.geometry||(r=o.geometry.type),i[s]=n,t.set(`${n.uid}`,o)}const s=this;return{features:i,inferredGeometryType:r,finish(e){const i=s.sourceJSON.objectIdField;for(const r in e){const o=e[r],n=t.get(r);n&&(n.attributes||(n.attributes={}),-1===o?delete n.attributes[i]:n.attributes[i]=o,s._addIdToClientGeometry(n))}}}}_addIdToClientGeometry(e){if(!this._idToClientGeometry)return;const t=this.sourceJSON.objectIdField,i=e.attributes?.[t];null!=i&&this._idToClientGeometry.set(i,e.geometry??null)}get _layerOrSourceGeometryType(){return this.layer?.geometryType??this.sourceJSON?.geometryType}_requiresClientGraphicMapping(){return this._geometryTypeRequiresClientGraphicMapping(this._layerOrSourceGeometryType)}_geometryRequiresClientGraphicMapping(e){return this._geometryTypeRequiresClientGraphicMapping(e.type)}_geometryTypeRequiresClientGraphicMapping(e){return"mesh"===e||"multipatch"===e||"extent"===e}_serializeFeature(e){const{attributes:t}=e,i=this._geometryForSerialization(e),r=(J++).toString();return i?{uid:r,geometry:i.toJSON(),attributes:t}:{uid:r,attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return null==t?null:this._geometryRequiresClientGraphicMapping(t)?t.extent?P.A.fromExtent(t.extent):null:t}async _startWorker(e){this._connection=await(0,D.h)("MemorySourceWorker",{strategy:(0,E.A)("feature-layers-workers")?"dedicated":"local",signal:e,registryTarget:this});const{fields:t,spatialReference:i,objectIdField:r,hasM:s,hasZ:o,timeInfo:n,dateFieldsTimeZone:a}=this.layer,l="defaults"===this.layer.originOf("spatialReference");await this._prepareClientMapping(this.items,e);const u=this._prepareAddFeatures(this.items);this.addHandles(this.on("before-changes",e=>{p.A.getLogger(this).error("Source modifications will not propagate after layer has been loaded. Please use .applyEdits() instead"),e.preventDefault()}));const d={features:u.features,fields:t?.map(e=>e.toJSON()),geometryType:L.Ye.toJSON(this._workerGeometryType),hasM:"mesh"!==this._layerOrSourceGeometryType&&s,hasZ:"mesh"===this._layerOrSourceGeometryType||o,objectIdField:r,spatialReference:l?null:i&&i.toJSON(),timeInfo:n?.toJSON()??null,dateFieldsTimeZone:a},y=await this._connection.invoke("load",d,{signal:e});for(const e of y.warnings)p.A.getLogger(this.layer).warn("#load()",`${e.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:e});y.featureErrors.length&&p.A.getLogger(this.layer).error("#load()",`Failed to load ${y.featureErrors.length} features due to errors. (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}').`,y.featureErrors.map(e=>"\n\n- "+e.error.description).join(""));const c=y.layerDefinition;this._geometryTypeRequiresClientGraphicMapping(u.inferredGeometryType)&&(c.geometryType=L.Ye.toJSON(u.inferredGeometryType)),this.sourceJSON=c,this._requiresClientGraphicMapping()&&(this._idToClientGeometry=new Map),u.finish(y.assignedObjectIds)}};(0,r.Cg)([(0,k.u)({Type:O.A,ensureType:(0,j.dp)(O.A)})],N.prototype,"itemType",void 0),(0,r.Cg)([(0,f.MZ)()],N.prototype,"type",void 0),(0,r.Cg)([(0,f.MZ)({constructOnly:!0})],N.prototype,"layer",void 0),(0,r.Cg)([(0,f.MZ)({readOnly:!0})],N.prototype,"_workerGeometryType",null),(0,r.Cg)([(0,f.MZ)()],N.prototype,"sourceJSON",void 0),N=(0,r.Cg)([(0,f.$K)("esri.layers.graphics.sources.MemorySource")],N);var V=i(52136),K=i(18768),$=i(63074),Q=i(69208),B=i(6455),U=i(47685),W=i(87718),z=i(10086),H=i(56658),Y=i(34287),X=i(32756),ee=i(8303),te=i(69622);let ie=class extends te.A{constructor(e){super(e),this.updating=!1,this.status="unknown"}};(0,r.Cg)([(0,f.MZ)()],ie.prototype,"updating",void 0),(0,r.Cg)([(0,f.MZ)()],ie.prototype,"status",void 0),ie=(0,r.Cg)([(0,f.$K)("esri.layers.support.PublishingInfo")],ie);const re=Symbol(),se=e=>{var t;const i=e;let s=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=re}get publishingInfo(){if(this.destroyed)return null;const e=this._get("publishingInfo");if(e)return e;const t=new ie;return this._checkPublishingStatus(t),t}_checkPublishingStatus(e){let t=0;const i=async s=>{let o;e.updating=!0;try{o=await this.fetchPublishingStatus()}catch(e){o="unavailable"}"published"!==o&&"unavailable"!==o||("publishing"===e.status&&this.refresh(),r.remove()),e.status=o,e.updating=!1,r.removed||(t=setTimeout(i,s,s+125))},r={removed:!1,remove(){this.removed=!0,clearTimeout(t)}};this.when().catch(()=>r.remove()),i(250),this.addHandles(r)}};return(0,r.Cg)([(0,f.MZ)({readOnly:!0,clonable:!1})],s.prototype,"publishingInfo",null),s=(0,r.Cg)([(0,f.$K)("esri.layers.mixins.PublishableLayer")],s),s};var oe=i(54310),ne=i(25036),ae=i(82935),le=i(63396),ue=i(60694),pe=i(10873),de=i(15426),ye=i(29005),ce=i(33143),he=i(30279),ge=i(16194),fe=i(17036),me=i(30524),be=i(46499),we=i(39383),ve=i(6666),Ce=i(25482);let Te=class extends((0,n.OU)(Ce.o)){constructor(e){super(e),this.enabled=!1,this.drawOrder=[]}};(0,r.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1}}}})],Te.prototype,"enabled",void 0),(0,r.Cg)([(0,f.MZ)({type:[String],json:{write:!0,origins:{"web-scene":{write:!1}}}})],Te.prototype,"drawOrder",void 0),Te=(0,r.Cg)([(0,f.$K)("esri.layers.support.SymbolLayerDrawing")],Te);const Fe=Te;var Me=i(96184),Se=i(17311),_e=i(91908),Ie=i(65494),Oe=i(8947),Ee=i(41214),Ze=i(65615),Ae=i(61956),De=i(54218),je=i(30291),qe=i(33910),Pe=i(78553),Le=i(59923),xe=i(36005),Re=i(43937);const Ge="FeatureLayer";function ke(e){return e&&e instanceof a.A}const Je=(0,fe.p)();function Ne(e,t,i){const r=!!i?.writeLayerSchema;return{enabled:r,ignoreOrigin:r}}let Ve=class extends((0,z.j)((0,H.J)((0,W.F)(se((0,U.w6)((0,B.FJ)((0,$.dM)((0,X.fY)((0,ae.e)((0,le.d)((0,ne.j)((0,oe.J)((0,K.b)((0,Y.q)((0,ee.A)((0,y.M)((0,Q.d)((0,V.p)((0,n.OU)(I.A)))))))))))))))))))){constructor(...e){super(...e),this.attributeTableTemplate=null,this.charts=null,this.copyright=null,this.displayField=null,this.dynamicDataSource=null,this.fields=null,this.fieldsIndex=null,this.formTemplate=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new _(this),this.hasM=void 0,this.hasZ=void 0,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.symbolLayerDrawing=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="ArcGISFeatureLayer",this.outFields=null,this.path=null,this.popupEnabled=!0,this.popupTemplate=null,this.resourceInfo=null,this.screenSizePerspectiveEnabled=!0,this.spatialReference=w.A.WGS84,this.subtypeCode=null,this.subtypeField=null,this.subtypes=null,this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.templates=null,this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.type="feature",this.typeIdField=null,this.types=null,this.visible=!0,this._debouncedSaveOperations=(0,h.sg)(async(e,t,r)=>{const{save:s,saveAs:o}=await i.e(3359).then(i.bind(i,33359));switch(e){case 0:return s(this,t);case 1:return o(this,r,t)}})}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;if(this.portalItem?.loaded&&this.source)return this.addResolvingPromise(this.createGraphicsSource(t).then(e=>this.initLayerProperties(e))),Promise.resolve(this);const i=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]},e).catch(h.QP).then(async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstValidLayerId(t);null!=e&&(this.layerId=e)}if(!this.url&&!this._hasMemorySource())throw new l.A("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this.initLayerProperties(await this.createGraphicsSource(t))}).then(()=>(0,de.VA)(this,"load",e));return this.addResolvingPromise(i),Promise.resolve(this)}get _titleCreator(){const e=this._get("_titleCreator");return(0,d.pR)(e),new Se.A({fieldsIndex:this.fieldsIndex,objectIdField:this.objectIdField,fields:this.fields,displayField:this.displayField,effectivePopupTemplate:this.popupTemplate??this.defaultPopupTemplate})}readCapabilities(e,t){return t=t.layerDefinition||t,(0,ve.S$)(t,this.url)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return!(this.loaded&&!this.capabilities?.operations.supportsEditing)&&(this._isOverridden("editingEnabled")?this._get("editingEnabled"):this._hasMemorySource()||this.userHasEditingPrivileges)}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}readEditingEnabled(e,t){return this._readEditingEnabled(t,!1)}readEditingEnabledFromWebMap(e,t,i){return this._readEditingEnabled(t,!0,i)}writeEditingEnabled(e,t){this._writeEditingEnabled(e,t,!1)}writeEditingEnabledToWebMap(e,t,i,r){this._writeEditingEnabled(e,t,!0,r)}get effectiveEditingEnabled(){return(0,de.C$)(this)}get featureTitleFields(){return[...this._titleCreator.requiredFields]}set fieldConfigurations(e){if(this._hasMemorySource())return;if(this._override("fieldConfigurations",e),!this.loaded)return;const t=(0,ge.sS)(this,e);t&&this._set("popupTemplate",t)}get fieldConfigurations(){if(!this._hasMemorySource())return this._isOverridden("fieldConfigurations")?this._get("fieldConfigurations"):(0,ge.QX)(this)||null}readIsTable(e,t){return"Table"===(t=t?.layerDefinition??t).type||!t.geometryType}writeIsTable(e,t,i,r){r?.writeLayerSchema&&(0,c.sM)(i,e?"Table":"Feature Layer",t)}readGlobalIdField(e,t){return(0,de.jD)(t.layerDefinition||t)}readObjectIdField(e,t){return(0,de.Zm)(t.layerDefinition||t)}writePopupTemplate(e,t,i,r){e&&(t[i]=e.toJSON({...r,writeFieldFormat:!r?.writeLayerSchema}))}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,me.yp)(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,i){t=t.layerDefinition||t;const r=t.drawingInfo?.renderer;if(r){const e=(0,Ie.L)(r,t,i)??void 0;return e||p.A.getLogger(this).error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:i}),e}return(0,de.PD)(t,i)}get source(){return this._get("source")}set source(e){e||(e=null);const t=this._get("source");t!==e&&((Array.isArray(e)||e instanceof a.A)&&(e=new N({layer:this,items:e})),ke(t)&&this._resetMemorySource(t),ke(e)&&this._initMemorySource(e),this._set("source",e))}readSource(e,t){const i=G.A.fromJSON(t.featureSet);return new N({layer:this,items:i?.features??[]})}readTemplates(e,t){const i=t.editFieldsInfo,r=i?.creatorField,s=i?.editorField;return e=e?.map(e=>ye.A.fromJSON(e)),this._fixTemplates(e,r),this._fixTemplates(e,s),e}readTitle(e,t){const i=t.layerDefinition?.name??t.name,r=t.title||t.layerDefinition?.title;if(i){if("item-title"===this.sublayerTitleMode)return this.url?(0,ue.yG)(this.url,i):i;let e=i;if(!e&&this.url){const t=(0,ue.qg)(this.url);null!=t&&(e=t.title)}if(!e)return;const t=this.portalItem?.title;return"item-title-and-service-name"===this.sublayerTitleMode&&t&&t!==e&&(e=t+" - "+e),(0,ue.cr)(e)}if("item-title"===this.sublayerTitleMode&&r)return r}readTitleFromWebMap(e,t){return t.title||t.layerDefinition?.name}readTypeIdField(e,t){let i=(t=t.layerDefinition||t).typeIdField;if(i&&t.fields){i=i.toLowerCase();const e=t.fields.find(e=>e.name.toLowerCase()===i);e&&(i=e.name)}return i}readTypes(e,t){e=(t=t.layerDefinition||t).types;const i=t.editFieldsInfo,r=i?.creatorField,s=i?.editorField;return e?.map(e=>(e=ce.A.fromJSON(e),this._fixTemplates(e.templates,r),this._fixTemplates(e.templates,s),e))}readVisible(e,t){return null!=t.layerDefinition?.defaultVisibility?!!t.layerDefinition.defaultVisibility:null!=t.visibility?!!t.visibility:void 0}async addAttachment(e,t){const i=await(0,de.Xl)(this,e,t,Ge);return this.lastEditsEventDate=new Date,i}async updateAttachment(e,t,i){const r=await(0,de.bt)(this,e,t,i,Ge);return this.lastEditsEventDate=new Date,r}async applyEdits(e,t){return(0,de.ct)(this,e,t)}async uploadAssets(e,t){return(0,de.rn)(this,e,t)}createFieldConfigurations(){return(0,ge.xY)(this)}createPopupTemplate(e){return(0,je.tn)(this,e)}async createGraphicsSource(e){if(this._hasMemorySource()&&this.source)return this.source.load({signal:e});const{default:t}=await(0,h.qr)(Promise.all([i.e(893),i.e(3636)]).then(i.bind(i,65515)),e);return new t({layer:this,supportedSourceTypes:this.supportedSourceTypes}).load({signal:e})}createQuery(){const e=(0,de.VZ)(this);e.dynamicDataSource=this.dynamicDataSource;const t=null!=this.subtypeCode?`${this.subtypeField} = ${this.subtypeCode}`:null,i=(0,g.mA)(this.definitionExpression,t);return e.where=i||"1=1",e}async deleteAttachments(e,t){const i=await(0,de.mm)(this,e,t,Ge);return this.lastEditsEventDate=new Date,i}async fetchRecomputedExtents(e){return(0,de.WP)(this,e,Ge)}async getFeatureTitle(e,t){return this._titleCreator.getTitle(this,e,t)}async getFeatureTitles(e,t){return this._titleCreator.getTitles(this,e,t)}getFeatureType(e){return(0,de.xd)(this.types,this.typeIdField,e)}getFieldAlias(e){const t=this.getField(e);if(t)return this.getFieldConfiguration(t.name)?.alias||t.alias}getFieldConfiguration(e){return e=e.toLowerCase(),this.fieldConfigurations?.find(t=>t.name.toLowerCase()===e)}getFieldDomain(e,t){return(0,de.Vq)(this,e,t,this.getField(e)?.domain??null)}async queryAttachments(e,t){return(0,de.lV)(this,e,t,Ge)}async queryFeatures(e,t){const i=await this.load(),r=await i.source.queryFeatures(Ae.A.from(e)??i.createQuery(),t),s=this.graphicOrigin;if(r?.features)for(const e of r.features)e.layer=e.sourceLayer=i,e.origin=s;return r}async queryObjectIds(e,t){return await(0,de.sg)(this,e,t,Ge)}async queryFeatureCount(e,t){return(0,de.Ye)(this,e,t,Ge)}async queryExtent(e,t){return(0,de.B5)(this,e,t,Ge)}async queryRelatedFeatures(e,t){return(0,de.hM)(this,e,t,Ge)}async queryRelatedFeaturesCount(e,t){return(0,de.S2)(this,e,t,Ge)}async queryPivot(e,t){const{source:r,capabilities:s}=await this.load();if(!r.queryPivot||!s?.operations?.supportsQueryPivot)throw new l.A(Ge,"Layer source does not support queryPivot capability");const o=await i.e(9958).then(i.bind(i,29958)),n=await r.queryPivot(o.default.from(e),t),a=this.graphicOrigin;if(n?.features)for(const e of n.features)e.layer=e.sourceLayer=this,e.origin=a;return n}async queryTopFeatures(e,t){const{source:r,capabilities:s}=await this.load();if(!r.queryTopFeatures||!s?.query?.supportsTopFeaturesQuery)throw new l.A(Ge,"Layer source does not support queryTopFeatures capability");const o=await i.e(7561).then(i.bind(i,57561)),n=await r.queryTopFeatures(o.default.from(e),t),a=this.graphicOrigin;if(n?.features)for(const e of n.features)e.layer=e.sourceLayer=this,e.origin=a;return n}async queryAttributeBins(e,t){const{source:r,capabilities:s}=await this.load();if(!r.queryAttributeBins)throw new l.A(Ge,"Layer source does not support queryAttributeBins capability");(0,de.ZJ)(e,s,Ge);const o=await i.e(4575).then(i.bind(i,14575)),n=await r.queryAttributeBins(o.default.from(e),t),a=this.graphicOrigin;if(n.features)for(const e of n.features)e.layer=e.sourceLayer=this,e.origin=a;return n}async queryTopObjectIds(e,t){const{source:r,capabilities:s}=await this.load();if(!r.queryTopObjectIds||!s?.query.supportsTopFeaturesQuery)throw new l.A(Ge,"Layer source does not support queryTopObjectIds capability");const o=await i.e(7561).then(i.bind(i,57561));return(await r.queryTopObjectIds(o.default.from(e),t)).filter(De.Et)}async queryTopFeaturesExtent(e,t){const{source:r,capabilities:s}=await this.load();if(!r.queryTopExtents||!s?.query?.supportsTopFeaturesQuery)throw new l.A(Ge,"Layer source does not support queryTopExtents capability");const o=await i.e(7561).then(i.bind(i,57561));return r.queryTopExtents(o.default.from(e),t)}async queryTopFeatureCount(e,t){const{source:r,capabilities:s}=await this.load();if(!r.queryTopCount||!s?.query?.supportsTopFeaturesQuery)throw new l.A(Ge,"Layer source does not support queryFeatureCount capability");const o=await i.e(7561).then(i.bind(i,57561));return r.queryTopCount(o.default.from(e),t)}read(e,t){const i=e.featureCollection;if((i||"Feature Collection"===e.type)&&(this.resourceInfo=e),i){const{layers:e,showLegend:r}=i;1===e?.length&&(super.read(e[0],t),null!=r&&super.read({showLegend:r},t))}super.read(e,t),"service"===t?.origin&&(["objectIdField","fields","timeInfo","dateFieldsTimeZone"].forEach(e=>this.revertToOrigin(e,"service")),this.spatialReference||this.revertToOrigin("spatialReference","service"))}write(e,t){t={...t,origin:t?.origin??void 0,writeLayerSchema:t?.writeLayerSchema??this._hasMemorySource()};const{origin:i,layerContainerType:r}=t;if(this.dynamicDataSource)return(0,Le.U4)(t,this,"a dynamic data source cannot be written to web scenes, web maps and feature service items"),null;if(this.isTable){if(("web-map"===i||"web-scene"===i)&&"tables"!==r)return(0,Le.U4)(t,this,"a table source can only be written to tables"),null;if(this._hasMemorySource())return(0,Le.U4)(t,this,"an in-memory table source cannot be written to web scenes and web maps"),null}else if(this.loaded&&("web-map"===i||"web-scene"===i)&&"tables"===r)return(0,Le.U4)(t,this,"a non-table source cannot be written to tables in web maps or web scenes"),null;return super.write(e,t)}clone(){if(this._hasMemorySource())throw new l.A(Ge,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(e){return!!this.loaded&&("memory"===this.source?.type||(0,_e.D)(this,e))}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}_readEditingEnabled(e,t,i){let r=e.layerDefinition?.capabilities;return r?this._hasEditingCapability(r):(r=e.capabilities,t&&"web-map"===i?.origin&&!this._hasMemorySource()&&r?this._hasEditingCapability(r):void 0)}_hasEditingCapability(e){return e.toLowerCase().split(",").map(e=>e.trim()).includes("editing")}_writeEditingEnabled(e,t,i,r){if(!e){const e=this.capabilities?.operations?.supportsSync?"Query,Sync":"Query";(0,c.sM)("layerDefinition.capabilities",e,t),i&&!r?.writeLayerSchema&&(t.capabilities=e)}}_fetchFirstValidLayerId(e){return(0,o.A)(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then(e=>{const t=e.data;if(t)return this.applyPreferredHost(t),this.findFirstValidLayerId(t)})}async initLayerProperties(e){return this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),this._verifyFields(),(0,me.yp)(this.renderer,this.fieldsIndex),(0,me.sv)(this.timeInfo,this.fieldsIndex),this._hasMemorySource()&&"mesh"===this.geometryType&&(this.capabilities.query.supportsReturnMesh=!0),(0,Oe.L)(this,{origin:"service"})}async hasDataChanged(){return(0,de.jp)(this)}async fetchPublishingStatus(){const e=this.source;return e?.fetchPublishingStatus?e.fetchPublishingStatus():"unavailable"}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some(e=>"geometry"===e.type)||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_fixTemplates(e,t){e&&e.forEach(e=>{const i=e.prototype?.attributes;i&&t&&delete i[t]})}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new l.A("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new l.A("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source")}_initMemorySource(e){e.forEach(e=>{e.layer=this,e.sourceLayer=this}),this.addHandles([e.on("after-add",e=>{e.item.layer=this,e.item.sourceLayer=this}),e.on("after-remove",e=>{e.item.layer=null,e.item.sourceLayer=null})],"fl-source")}_resetMemorySource(e){e.forEach(e=>{e.layer=null,e.sourceLayer=null}),this.removeHandles("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}findFirstValidLayerId(e){const t=[...e.layers||[],...e.tables||[]];return t.find(({type:e})=>!e||this.supportedSourceTypes.has(e))?.id}};(0,r.Cg)([(0,f.MZ)({clonable:!1,readOnly:!0})],Ve.prototype,"_titleCreator",null),(0,r.Cg)([(0,f.MZ)(pe.zQ)],Ve.prototype,"attributeTableTemplate",void 0),(0,r.Cg)([(0,xe.w)("service","capabilities")],Ve.prototype,"readCapabilities",null),(0,r.Cg)([(0,f.MZ)({json:{origins:{"web-scene":{write:!1}},write:!0}})],Ve.prototype,"charts",void 0),(0,r.Cg)([(0,f.MZ)({readOnly:!0})],Ve.prototype,"createQueryVersion",null),(0,r.Cg)([(0,f.MZ)({json:{read:{source:"layerDefinition.copyrightText"}}})],Ve.prototype,"copyright",void 0),(0,r.Cg)([(0,f.MZ)({json:{read:{source:"layerDefinition.displayField"}}})],Ve.prototype,"displayField",void 0),(0,r.Cg)([(0,f.MZ)({types:qe.Es,readOnly:!0})],Ve.prototype,"defaultSymbol",void 0),(0,r.Cg)([(0,f.MZ)({type:Ze.A})],Ve.prototype,"dynamicDataSource",void 0),(0,r.Cg)([(0,f.MZ)({type:Boolean})],Ve.prototype,"editingEnabled",null),(0,r.Cg)([(0,xe.w)(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],Ve.prototype,"readEditingEnabled",null),(0,r.Cg)([(0,xe.w)("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],Ve.prototype,"readEditingEnabledFromWebMap",null),(0,r.Cg)([(0,Re.K)(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],Ve.prototype,"writeEditingEnabled",null),(0,r.Cg)([(0,Re.K)("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],Ve.prototype,"writeEditingEnabledToWebMap",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0})],Ve.prototype,"effectiveEditingEnabled",null),(0,r.Cg)([(0,f.MZ)({clonable:!1,readOnly:!0})],Ve.prototype,"featureTitleFields",null),(0,r.Cg)([(0,f.MZ)({type:[he.A],json:{name:"layerDefinition.fieldConfigurations",write:{overridePolicy(e,t,i){return{enabled:!i?.writeLayerSchema,ignoreOrigin:1===this.originIdOf(t)}}}}})],Ve.prototype,"fieldConfigurations",null),(0,r.Cg)([(0,f.MZ)({...Je.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{name:"fields"},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:Ne}}}}})],Ve.prototype,"fields",void 0),(0,r.Cg)([(0,f.MZ)(Je.fieldsIndex)],Ve.prototype,"fieldsIndex",void 0),(0,r.Cg)([(0,f.MZ)({type:b.A,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],Ve.prototype,"formTemplate",void 0),(0,r.Cg)([(0,f.MZ)({json:{read:{source:"layerDefinition.extent"}}})],Ve.prototype,"fullExtent",void 0),(0,r.Cg)([(0,f.MZ)({json:{origins:{"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:Ne,writer(e,t,i){const r=e?de.iX.toJSON(e):null;r&&(0,c.sM)(i,r,t)}}}},read:{source:"layerDefinition.geometryType",reader:de.iX.read}}})],Ve.prototype,"geometryType",void 0),(0,r.Cg)([(0,f.MZ)({readOnly:!0,clonable:!1})],Ve.prototype,"graphicOrigin",void 0),(0,r.Cg)([(0,f.MZ)({json:{read:{source:"layerDefinition.hasM"}}})],Ve.prototype,"hasM",void 0),(0,r.Cg)([(0,f.MZ)({json:{read:{source:"layerDefinition.hasZ"}}})],Ve.prototype,"hasZ",void 0),(0,r.Cg)([(0,f.MZ)(pe.id)],Ve.prototype,"id",void 0),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],Ve.prototype,"infoFor3D",void 0),(0,r.Cg)([(0,f.MZ)({json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],Ve.prototype,"isTable",void 0),(0,r.Cg)([(0,xe.w)("service","isTable",["type","geometryType"]),(0,xe.w)("isTable",["layerDefinition.type","layerDefinition.geometryType"])],Ve.prototype,"readIsTable",null),(0,r.Cg)([(0,Re.K)("web-map","isTable")],Ve.prototype,"writeIsTable",null),(0,r.Cg)([(0,f.MZ)(pe.kF)],Ve.prototype,"labelsVisible",void 0),(0,r.Cg)([(0,f.MZ)({type:[be.A],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:we.w,write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:we.w,write:{layerContainerTypes:m.K}}})],Ve.prototype,"labelingInfo",void 0),(0,r.Cg)([(0,f.MZ)({type:Fe,json:{name:"layerDefinition.drawingInfo.symbolLayerDrawing",write:!0,origins:{"web-scene":{write:!1}}}})],Ve.prototype,"symbolLayerDrawing",void 0),(0,r.Cg)([(0,f.MZ)((()=>{const e=(0,u.o8)(pe.Ih);return e.json.origins["portal-item"]={write:{target:"layerDefinition.drawingInfo.transparency",writer(e,t,i){(0,c.sM)(i,(0,Pe.p)(e),t)}}},e})())],Ve.prototype,"opacity",void 0),(0,r.Cg)([(0,f.MZ)(pe.fV)],Ve.prototype,"legendEnabled",void 0),(0,r.Cg)([(0,f.MZ)({type:["show","hide"],json:(()=>{const e=(0,u.o8)(pe.C1.json);return e.origins["portal-item"]={read:!1,write:!1},e})()})],Ve.prototype,"listMode",void 0),(0,r.Cg)([(0,xe.w)("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],Ve.prototype,"readGlobalIdField",null),(0,r.Cg)([(0,f.MZ)({json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:Ne}}}}})],Ve.prototype,"objectIdField",void 0),(0,r.Cg)([(0,xe.w)("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],Ve.prototype,"readObjectIdField",null),(0,r.Cg)([(0,f.MZ)({type:["ArcGISFeatureLayer"],json:{write:{target:"layerType",ignoreOrigin:!0,layerContainerTypes:m.K}}})],Ve.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,f.MZ)(Je.outFields)],Ve.prototype,"outFields",void 0),(0,r.Cg)([(0,f.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Ve.prototype,"path",void 0),(0,r.Cg)([(0,f.MZ)(pe.M6)],Ve.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,f.MZ)({type:s.A,json:{name:"popupInfo",write:!0}})],Ve.prototype,"popupTemplate",void 0),(0,r.Cg)([(0,Re.K)("popupTemplate")],Ve.prototype,"writePopupTemplate",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0})],Ve.prototype,"defaultPopupTemplate",null),(0,r.Cg)([(0,f.MZ)({types:Ee.Hg,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:Ee.XJ,name:"layerDefinition.drawingInfo.renderer",write:{layerContainerTypes:m.K,overridePolicy:(e,t,i)=>({ignoreOrigin:i?.writeLayerSchema,layerContainerTypes:m.K})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(e,t,i)=>({ignoreOrigin:i?.writeLayerSchema,layerContainerTypes:m.K})}}})],Ve.prototype,"renderer",null),(0,r.Cg)([(0,xe.w)("service","renderer",["drawingInfo.renderer","defaultSymbol"]),(0,xe.w)("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],Ve.prototype,"readRenderer",null),(0,r.Cg)([(0,f.MZ)()],Ve.prototype,"resourceInfo",void 0),(0,r.Cg)([(0,f.MZ)((()=>{const e=(0,u.o8)(pe.PY);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],Ve.prototype,"screenSizePerspectiveEnabled",void 0),(0,r.Cg)([(0,f.MZ)({clonable:!1})],Ve.prototype,"source",null),(0,r.Cg)([(0,xe.w)("portal-item","source",["featureSet"]),(0,xe.w)("web-map","source",["featureSet"])],Ve.prototype,"readSource",null),(0,r.Cg)([(0,f.MZ)({json:{read:{source:"layerDefinition.extent.spatialReference"}}})],Ve.prototype,"spatialReference",void 0),(0,r.Cg)([(0,f.MZ)({type:Number})],Ve.prototype,"subtypeCode",void 0),(0,r.Cg)([(0,f.MZ)({readOnly:!1})],Ve.prototype,"subtypeField",void 0),(0,r.Cg)([(0,f.MZ)({readOnly:!1})],Ve.prototype,"subtypes",void 0),(0,r.Cg)([(0,f.MZ)({type:[ye.A]})],Ve.prototype,"templates",void 0),(0,r.Cg)([(0,xe.w)("templates",["editFieldsInfo","creatorField","editorField","templates"])],Ve.prototype,"readTemplates",null),(0,r.Cg)([(0,f.MZ)({type:Me.A})],Ve.prototype,"timeInfo",void 0),(0,r.Cg)([(0,f.MZ)()],Ve.prototype,"title",void 0),(0,r.Cg)([(0,xe.w)("service","title",["name"]),(0,xe.w)("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],Ve.prototype,"readTitle",null),(0,r.Cg)([(0,xe.w)("web-map","title",["layerDefinition.name","title"])],Ve.prototype,"readTitleFromWebMap",null),(0,r.Cg)([(0,f.MZ)({type:String})],Ve.prototype,"sublayerTitleMode",void 0),(0,r.Cg)([(0,f.MZ)({json:{read:!1}})],Ve.prototype,"type",void 0),(0,r.Cg)([(0,f.MZ)({type:String})],Ve.prototype,"typeIdField",void 0),(0,r.Cg)([(0,xe.w)("service","typeIdField"),(0,xe.w)("typeIdField",["layerDefinition.typeIdField"])],Ve.prototype,"readTypeIdField",null),(0,r.Cg)([(0,f.MZ)({type:[ce.A]})],Ve.prototype,"types",void 0),(0,r.Cg)([(0,xe.w)("service","types",["types"]),(0,xe.w)("types",["layerDefinition.types"])],Ve.prototype,"readTypes",null),(0,r.Cg)([(0,f.MZ)({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility",layerContainerTypes:m.K}}}}})],Ve.prototype,"visible",void 0),(0,r.Cg)([(0,xe.w)("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],Ve.prototype,"readVisible",null),Ve=(0,r.Cg)([(0,f.$K)("esri.layers.FeatureLayer")],Ve)},63396(e,t,i){i.d(t,{d:()=>T});var r=i(5482),s=i(91429),o=i(60950),n=i(99959);class a extends n.A{constructor(e){super(),this.type="track",this.trackInfoProvider=e}get id(){return this.trackInfoProvider.id}get[o.ym](){return this.trackInfoProvider.trackInfo}}var l=i(37838),u=i(69540),p=i(25482),d=i(93637),y=i(50820),c=i(10873),h=i(46499),g=i(41214);let f=class extends((0,u.OU)(p.o)){constructor(e){super(e),this.labelingInfo=null,this.labelsVisible=!0,this.renderer=null,this.visible=!0}};(0,r.Cg)([(0,s.MZ)({type:[h.A],json:{write:!0}})],f.prototype,"labelingInfo",void 0),(0,r.Cg)([(0,s.MZ)(c.kF)],f.prototype,"labelsVisible",void 0),(0,r.Cg)([(0,s.MZ)({types:g.Hg,json:{write:!0}})],f.prototype,"renderer",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"visible",void 0),f=(0,r.Cg)([(0,s.$K)("esri.layers.support.TrackPartInfo")],f);var m=i(96576),b=i(59868),w=i(10184),v=i(43937);let C=class extends((0,u.OU)(p.o)){constructor(e){super(e),this.enabled=!0,this.fields=[],this.latestObservations=new f({renderer:new m.A({symbol:b.UK.clone()})}),this.maxDisplayDuration=null,this.maxDisplayObservationsPerTrack=0,this.popupEnabled=!0,this.popupTemplate=null,this.previousObservations=new f({renderer:new m.A({symbol:b.UK.clone()})}),this.trackLines=new f({renderer:new m.A({symbol:b.A7.clone()})}),this.timeField="startTimeField"}writeFields(e,t,i){const r=e.filter(e=>"avg_angle"!==e.statisticType).map(e=>e.toJSON());(0,d.sM)(i,r,t)}};(0,r.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],C.prototype,"enabled",void 0),(0,r.Cg)([(0,s.MZ)({type:[y.A],json:{write:!0}})],C.prototype,"fields",void 0),(0,r.Cg)([(0,v.K)("fields")],C.prototype,"writeFields",null),(0,r.Cg)([(0,s.MZ)({type:f,json:{write:!0}})],C.prototype,"latestObservations",void 0),(0,r.Cg)([(0,s.MZ)({type:w.A,json:{write:!0}})],C.prototype,"maxDisplayDuration",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{write:!0}})],C.prototype,"maxDisplayObservationsPerTrack",void 0),(0,r.Cg)([(0,s.MZ)(c.M6)],C.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,s.MZ)({type:l.A,json:{name:"popupInfo",write:!0}})],C.prototype,"popupTemplate",void 0),(0,r.Cg)([(0,s.MZ)({type:f,json:{write:!0}})],C.prototype,"previousObservations",void 0),(0,r.Cg)([(0,s.MZ)({type:f,json:{write:!0}})],C.prototype,"trackLines",void 0),(0,r.Cg)([(0,s.MZ)({type:["timeReceived","startTimeField","endTimeField"],json:{read:!0,write:!0}})],C.prototype,"timeField",void 0),C=(0,r.Cg)([(0,s.$K)("esri.layers.support.TrackInfo")],C);const T=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.trackGraphicOrigin=new a(this),this.trackInfo=null}};return(0,r.Cg)([(0,s.MZ)({readOnly:!0,clonable:!1})],i.prototype,"trackGraphicOrigin",void 0),(0,r.Cg)([(0,s.MZ)({type:C})],i.prototype,"trackInfo",void 0),i=(0,r.Cg)([(0,s.$K)("esri.layers.mixins.TrackableLayer")],i),i}},8947(e,t,i){i.d(t,{L:()=>n});var r=i(60999),s=i(17676),o=i(67076);async function n(e,t,i){const n=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(n&&"unique-value"===n.type&&n.styleOrigin){const a=await(0,r.Ke)(n.populateFromStyle());if((0,s.Te)(i),!1===a.ok){const i=a.error;t?.messages&&t.messages.push(new o.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${i.message}`,{error:i,context:t})),e.clear("renderer",t?.origin)}}}},96520(e,t,i){i.d(t,{u:()=>l});var r=i(86211),s=i(21325),o=i(52006);function n(e,t,i){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=i)}function a(e,t,i){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e){const e=(0,o.yP)(t);e.length>2&&(e[2]*=i)}}function l(e,t,i){if(!e&&!t||!i)return;const s=(0,r.G9)(i);u(e,i,s),u(t,i,s)}function u(e,t,i){if(e)for(const r of e)p(r.geometry,t,i)}function p(e,t,i){if(!e?.spatialReference||(0,s.aI)(e.spatialReference,t))return;const o=(0,r.G9)(e.spatialReference)/i;if(1!==o)if("x"in e)null!=e.z&&(e.z*=o);else if("curveRings"in e)a(e,e.curveRings,o);else if("curvePaths"in e)a(e,e.curvePaths,o);else if("rings"in e)n(e,e.rings,o);else if("paths"in e)n(e,e.paths,o);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=o)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8257],{66344(t,e,s){s.d(e,{q:()=>a});const i=!!(0,s(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class r{get size(){return this._size}constructor(t=10485760,e=.3){this._maxSize=t,this._maxClientSizeRatio=e,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(t){this._clients.set(t.id.slice(0,-1),t)}deregister(t){this.clear(t),this._sizeLimits.delete(t),this._clients.delete(t.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(t){this._maxSize=Math.max(t,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(t,e){const s=this._db.get(t.id+e);return s?.size??0}put(t,e,s,r,o){e=t.id+e;const a=this._db.get(e);if(a&&(this._size-=a.size,t.size-=a.size,this._db.delete(e),a.entry!==s&&this._notifyRemove(e,a.entry,a.size,0)),r>this._maxSize)return void this._notifyRemove(e,s,r,0);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!r||r<0)return i||console.warn(`Refusing to cache entry with size ${r} for key ${e}`),void this._notifyRemove(e,s,0,0);const h=1+Math.max(o,-4)- -3;this._db.set(e,new n(s,r,h)),this._size+=r,t.size+=r,this._checkSize()}updateSize(t,e){e=t.id+e;const s=this._db.get(e);if(!s)return;this._size-=s.size,t.size-=s.size;let i=s.entry.usedMemory;for(;i>this._maxSize;){const t=this._notifyRemove(e,s.entry,i,1);if(!(null!=t&&t>0))return void this._db.delete(e);i=t}s.size=i,this._size+=i,t.size+=i,this._checkSize()}pop(t,e){e=t.id+e;const s=this._db.get(e);if(s)return this._size-=s.size,t.size-=s.size,this._db.delete(e),++this._hit,s.entry;++this._miss}get(t,e){e=t.id+e;const s=this._db.get(e);if(void 0!==s)return this._db.delete(e),s.lives=s.lifetime,this._db.set(e,s),++this._hit,s.entry;++this._miss}peek(t,e){const s=this._db.get(t.id+e);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const t={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},e={},s=new Array;this._db.forEach((t,i)=>{const r=t.lifetime;s[r]=(s[r]||0)+t.size,this._clients.forEach(s=>{const{id:r,name:n}=s;if(i.startsWith(r)){const s=e[n]||0;e[n]=s+t.size}})});const i={};this._clients.forEach(t=>{const s=t.name;if("hitRate"in t&&"number"==typeof t.hitRate&&!isNaN(t.hitRate)&&t.hitRate>0){const r=e[s]||0;e[s]=r,i[s]=Math.round(100*t.hitRate)+"%"}else i[s]="0%"});const r=Object.keys(e);r.sort((t,s)=>e[s]-e[t]),r.forEach(s=>t[s]=Math.round(e[s]/2**20)+"MB / "+i[s]);for(let e=s.length-1;e>=0;--e){const i=s[e];i&&(t["Priority "+(e+-3-1)]=Math.round(i/this._size*100)+"%")}return t}resetStats(){this._hit=this._miss=0,this._clients.forEach(t=>t.resetHitRate())}clear(t){const e=t.id;this._db.forEach((t,s)=>{s.startsWith(e)&&(this._size-=t.size,this._db.delete(s),this._notifyRemove(s,t.entry,t.size,0))}),t.size=0}clearAll(){this._db.forEach((t,e)=>this._notifyRemove(e,t.entry,t.size,0)),this._clients.forEach(t=>t.size=0),this._size=0,this._db.clear()}*values(t){for(const[e,s]of this._db)e.startsWith(t.id)&&(yield s.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(t,e,s,i){const r=this._clients.get(t.split(o)[0])?.removeFunc,n=r?.(e,i,s);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((t,e)=>this._checkSizeLimits(t,e)),this._clients.forEach(t=>this._checkSizeLimits(this._maxClientSize,t)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(t,e){null==e||e<=0?this._sizeLimits.delete(t):this._sizeLimits.set(t,e)}_checkSizeLimits(t,e){const s=e??this;if(s.size<=t)return;const i=e?.id;let r=!0;for(;r;){r=!1;for(const[n,a]of this._db)if(0===a.lifetime&&(!i||n.startsWith(i))){const i=e??this._clients.get(n.split(o)[0]);if(this._purgeItem(n,a,i),s.size<=.9*t)return;r||=this._db.has(n)}}for(const[r,n]of this._db)if(!i||r.startsWith(i)){const i=e??this._clients.get(r.split(o)[0]);if(this._purgeItem(r,n,i),s.size<=.9*t)return}}_purgeItem(t,e,s){if(this._db.delete(t),e.lives<=1){this._size-=e.size,s&&(s.size-=e.size);const i=this._notifyRemove(t,e.entry,e.size,1);null!=i&&i>0&&(this._size+=i,s&&(s.size+=i),e.lives=e.lifetime,e.size=i,this._db.set(t,e))}else--e.lives,this._db.set(t,e)}}new r(0);class n{constructor(t,e,s){this.entry=t,this.size=e,this.lifetime=s,this.lives=s}}const o=":";class a{constructor(t,e){this.removeFunc=e,this.id="",this.name="",this.size=0,this._storage=new r(t,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(t,e,s=1){this._storage.put(this,t,e,s,1)}pop(t){return this._storage.pop(this,t)}get(t){return this._storage.get(this,t)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(t){this._storage.maxSize=t}resetHitRate(){}}},9775(t,e,s){s.d(e,{A:()=>n});var i=s(62788),r=s(95488);class n{constructor(t=t=>t.values().next().value){this._peeker=t,this._observable=new r.I,this._items=new Set}get length(){return(0,i.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let t;for(t of this._items);return t}peek(){if(0!==this.length)return this._peeker(this._items)}push(t){this.contains(t)||(this._items.add(t),this._observable.notify())}contains(t){return(0,i.gc)(this._observable),this._items.has(t)}pop(){if(0===this.length)return;const t=this.peek();return this._items.delete(t),this._observable.notify(),t}popLast(){if(0===this.length)return;const t=this.last();return this._items.delete(t),this._observable.notify(),t}remove(t){this.contains(t)&&(this._items.delete(t),this._observable.notify())}filter(t){const e=this.length;return this._items.forEach(e=>{t(e)||this._items.delete(e)}),e!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,i.gc)(this._observable),yield*this._items}}},36745(t,e,s){s.d(e,{z:()=>a});var i=s(4718),r=s(51118),n=s(60408),o=s(92722);class a{static fromOptimized(t,e,s=1){return(new h).initialize(t,e,s)}static fromJSON(t){const[e,s]=u(t),i=(0,n.Pv)(t),r=(0,n.W0)(t);return(new c).initialize(e,s,i,r,1)}static fromOptimizedCIM(t,e,s=1){return(new p).initialize(t,e,s)}static fromJSONCIM(t,e=1){const[s,i]=u(t),r=(0,n.Pv)(t),o=(0,n.W0)(t);return(new d).initialize(s,i,r,o,e)}static fromFeatureSetReader(t){const e=t.readGeometryForDisplay(),s=t.geometryType;return e&&s?this.fromOptimized(e,s):null}static fromFeatureSetReaderCIM(t){const e=t.readGeometryForDisplay(),s=t.geometryType;return e&&s?this.fromOptimizedCIM(e,s):null}static createEmptyOptimized(t,e=!1,s=!1,i=1){return(new p).initialize(new o.A([],[],e,s),t,i)}static createEmptyJSON(t,e=!1,s=!1){return(new c).initialize([],t,e,s,1)}static createEmptyOptimizedCIM(t,e=!1,s=!1,i=1){return(new p).initialize(new o.A([],[],e,s),t,i)}static createEmptyJSONCIM(t,e=!1,s=!1,i=1){return(new d).initialize([],t,e,s,i)}asJSON(){const t=(0,r.x)(this),{hasZ:e,hasM:s}=this;return"esriGeometryEnvelope"===this.geometryType?{xmin:t[0][0][0],ymin:t[0][0][1],xmax:t[0][2][0],ymax:t[0][2][1]}:"esriGeometryMultipoint"===this.geometryType?{points:t.flat(),hasZ:e,hasM:s}:"esriGeometryPoint"===this.geometryType?{x:t[0][0][0],y:t[0][0][1],z:e?t[0][0][2]:void 0,m:s?t[0][0][e?3:2]:void 0}:"esriGeometryPolygon"===this.geometryType?{rings:t,hasZ:e,hasM:s}:{paths:t,hasZ:e,hasM:s}}getCurrentRingArea(){if(this.pathSize<3)return 0;let t,e,s=0;if(this.seekPathStart(),!this.nextPoint())return 0;t=this.x,e=this.y;const i=t,r=e;for(;this.nextPoint();)s+=(t-this.x)*(e+this.y),t=this.x,e=this.y;return s+=(t-i)*(e+r),-.5*s}invertY(){this.yFactor*=-1}}class h extends a{constructor(){super(...arguments),this._end=-1}get hasZ(){return this._geometry?.hasZ}get hasM(){return this._geometry?.hasM}initialize(t,e,s){return this.geometryType=e,this._stride=t.stride,this._geometry=t,this._pathIndex=-1,this._pathOffset=0,this._pointOffset=-this._stride,this._end=-1,this.yFactor=s,this}reset(){this.initialize(this._geometry,this.geometryType,this.yFactor)}seekPath(t){if(t>=0&&t<this.totalSize){if(this._pathIndex<t)for(;this._pathIndex<t&&this.nextPath(););else if(this._pathIndex>t)for(;this._pathIndex>t&&this.prevPath(););return!0}return!1}seekPathStart(){this._pointOffset=this._pathOffset-this._stride}seekPathEnd(){this._pointOffset=this._end}seekInPath(t){const e=this._pathOffset+t*this._stride;return e>=0&&e<this._end&&(this._pointOffset=e,!0)}nextPoint(){return(this._pointOffset+=this._stride)<this._end}prevPoint(){return(this._pointOffset-=this._stride)>=this._pathOffset}nextPath(){return!(this.pathIndex>=this.totalSize-1||(this._pathIndex>=0&&(this._pathOffset+=this._stride*this.pathSize),this._pathIndex++,this._pointOffset=this._pathOffset-this._stride,this._end=this._pointOffset+this._stride+this._stride*this.pathSize,0))}prevPath(){return!(this.pathIndex<=0||(this._pathIndex--,this._end=this._pathOffset,this._pathOffset-=this._stride*this.pathSize,this._pointOffset=this._pathOffset-this._stride,0))}getCurrentPath(){const t=this._end,e=this._geometry.coords,s=this._pathOffset;return(new h).initialize(new o.A([this.pathSize],e.slice(s,t),this.hasZ,this.hasM),this.geometryType,this.yFactor)}pathLength(){const t=this._end,e=this._stride,s=this._geometry.coords;let i=0;for(let r=this._pathOffset+e;r<t;r+=e){const t=s[r-e],n=s[r-e+1],o=s[r]-t,a=s[r+1]-n;i+=Math.sqrt(o*o+a*a)}return i}startPath(){this._geometry.lengths.push(0)}pushPath(t){this.startPath(),this.pushPoints(t)}pushPoint(t){for(let e=0;e<this._stride;++e)this._geometry.coords.push(t[e]);this._geometry.lengths[this.totalSize-1]++}pushXY(t,e){this._geometry.coords.push(t,e),this._geometry.lengths[this.totalSize-1]++}pushPoints(t){for(const e of t)for(let t=0;t<this._stride;++t)this._geometry.coords.push(e[t]);this._geometry.lengths[this.totalSize-1]+=t.length}pushCursor(t){const e=t.asOptimized();this._geometry.coords.push(...e.coords),this._geometry.lengths.push(...e.lengths)}asOptimized(){const t=this._geometry.clone();if(1!==this.yFactor)for(let e=1;e<t.coords.length;e+=this._stride)t.coords[e]*=this.yFactor;return"esriGeometryPoint"===this.geometryType&&(t.lengths.length=0),t}isClosed(){const t=this._geometry.coords,e=this._pathOffset,s=this._end-this._stride;for(let i=0;i<this._stride;i++)if(t[e+i]!==t[s+i])return!1;return!0}clone(){return(new h).initialize(this._geometry.clone(),this.geometryType,this.yFactor)}get totalPoints(){return this._geometry.isPoint?1:this._geometry.lengths.reduce((t,e)=>t+e)}get pathSize(){const{lengths:t}=this._geometry;return this._geometry.isPoint?1:this._pathIndex<0||this._pathIndex>t.length-1?0:t[this._pathIndex]}get totalSize(){return this._geometry.isPoint?1:this._geometry.lengths.length}get x(){return this._geometry.coords[this._pointOffset]}set x(t){this._geometry.coords[this._pointOffset]=t}get y(){return this.yFactor*this._geometry.coords[this._pointOffset+1]}set y(t){this._geometry.coords[this._pointOffset+1]=this.yFactor*t}get z(){return this._geometry.coords[this._pointOffset+2]}set z(t){this._geometry.coords[this._pointOffset+2]=t}get m(){const t=this.hasZ?3:2;return this._geometry.coords[this._pointOffset+t]}set m(t){this._geometry.coords[this._pointOffset+3]=t}get pathIndex(){return this._pathIndex}get _coordIndex(){return this._pointOffset/this._stride}}function l(t){const e=[t.x,t.y];return t.z&&e.push(t.z),t.m&&e.push(t.m),e}function u(t){return(0,n.Bi)(t)?[t.rings,"esriGeometryPolygon"]:(0,n.Rg)(t)?[t.paths,"esriGeometryPolyline"]:(0,n.U9)(t)?[[t.points],"esriGeometryMultipoint"]:(0,n.ZC)(t)?[[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]],"esriGeometryEnvelope"]:(0,n.fT)(t)?[[[l(t)]],"esriGeometryPoint"]:[[],"esriGeometryPolyline"]}class c extends a{initialize(t,e,s,i,r){return this._paths=t,this.geometryType=e,this.hasZ=s,this.hasM=i,this._pathIndex=this._pointIndex=-1,this.yFactor=r,this._mIndex=this.hasZ?3:2,this}reset(){this._pathIndex=this._pointIndex=-1}seekPath(t){return this._pathIndex=t,this._pointIndex=-1,t>=0&&t<this.totalSize&&(this._currentPath=this._paths[t],!0)}seekPathStart(){this._pointIndex=-1}seekPathEnd(){this._pointIndex=this._currentPath.length}seekInPath(t){return t>=0&&t<this._currentPath.length&&(this._pointIndex=t,this._currentPoint=this._currentPath[this._pointIndex],!0)}nextPoint(){return this._currentPoint=this._currentPath[++this._pointIndex],this._pointIndex<this._currentPath.length}prevPoint(){return this._currentPoint=this._currentPath[--this._pointIndex],this._pointIndex>=0}nextPath(){return this._pointIndex=-1,this._currentPath=this._paths[++this._pathIndex],this._pathIndex<this.totalSize}prevPath(){return this.pathIndex>0&&(this._pointIndex=-1,this._pathIndex--,this._currentPath=this._paths[this._pathIndex],!0)}pathLength(){const t=this._currentPath.length,e=this._currentPath;let s=0;for(let i=1;i<t;i++){const t=e[i-1],r=e[i],n=t[0],o=t[1],a=r[0]-n,h=r[1]-o;s+=Math.sqrt(a*a+h*h)}return s}startPath(){this._paths.push([])}getCurrentPath(){return(new c).initialize([this._currentPath],this.geometryType,this.hasZ,this.hasM,this.yFactor)}pushPath(t){this._paths.push(t)}pushPoint(t){this._paths[this.totalSize-1].push(t)}pushXY(t,e){this._paths[this.totalSize-1].push([t,e])}pushPoints(t){this._paths[this.totalSize-1].push(...t)}pushCursor(t){const e=(0,r.x)(t);for(const t of e)this.pushPath(t)}asOptimized(){const{hasZ:t,hasM:e}=this,s=new o.A([],[],t,e),{coords:i,lengths:r}=s;if("esriGeometryPoint"===this.geometryType)i.push(...this._paths[0][0]),r.length=0;else for(const s of this._paths){for(const r of s)i.push(r[0]),i.push(r[1]*this.yFactor),t&&i.push(r[2]),e&&i.push(r[this._mIndex]);r.push(s.length)}return s}isClosed(){const t=this._currentPath[0],e=this._currentPath[this._currentPath.length-1];for(let s=0;s<t.length;s++)if(t[s]!==e[s])return!1;return!0}clone(){return(new c).initialize((0,i.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}get totalPoints(){return this._paths.map(t=>t.length).reduce((t,e)=>t+e)}get pathSize(){return this._pathIndex<0||this._pathIndex>this.totalSize-1?-1:this._paths[this._pathIndex].length}get totalSize(){return this._paths.length}get x(){return this._currentPoint[0]}set x(t){this._currentPoint[0]=t}get y(){return this.yFactor*this._currentPoint[1]}set y(t){this._currentPoint[1]=this.yFactor*t}get z(){return this._currentPoint[2]}set z(t){this._currentPoint[2]=t}get m(){return this._currentPoint[this._mIndex]}set m(t){this._currentPoint[this._mIndex]=t}get pathIndex(){return this._pathIndex}}class p extends h{initialize(t,e,s){return super.initialize(t,e,s),this._controlPoints||(this._controlPoints=this._controlPoints=new Array(this.totalSize).fill(void 0).map(t=>new Set)),this}startPath(){super.startPath(),this._controlPoints.push(new Set)}clone(){const t=(new p).initialize(this._geometry.clone(),this.geometryType,this.yFactor);return t._controlPoints=this._controlPoints,t}setControlPoint(){this._controlPoints[this.pathIndex].add(this._coordIndex)}getControlPoint(){return this._controlPoints[this.pathIndex].has(this._coordIndex)}setControlPointAt(t){this._controlPoints[this.pathIndex].add(t)}getControlPointAt(t){return this._controlPoints[this.pathIndex].has(t)}}class d extends c{initialize(t,e,s,i,r){return super.initialize(t,e,s,i,r)}clone(){return(new d).initialize((0,i.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}setControlPoint(){this._paths[this.pathIndex][this._pointIndex][4]=1}getControlPoint(){return 1===this._paths[this.pathIndex][this._pointIndex][4]}setControlPointAt(t){this._paths[this.pathIndex][t][4]=1}getControlPointAt(t){return 1===this._paths[this.pathIndex][t][4]}}},32011(t,e,s){s.d(e,{d:()=>h});var i=s(19419),r=s(537),n=s(12359),o=s(95108),a=s(12176);function h(t){if(0===t.totalSize)return null;const e=(0,r.z8)(t);if(!e)return null;const s=4*(Math.abs(e[0])+Math.abs(e[2])+Math.abs(e[1])+Math.abs(e[3])+1)*222045e-19;let o=0,a=0;t.reset();for(let e=0;t.nextPath();e++){const s=t.getCurrentRingArea();s>a&&(a=s,o=e)}if(t.seekPath(o),0===t.pathSize)return null;t.seekPathStart();const h=(0,r.B$)(t);if(Math.abs(a)<=2*s*s)return[(h[0]+h[2])/2,(h[1]+h[3])/2];t.seekPathStart();const p=(0,n.w2)(t,(0,i.vt)());if(null===p)return null;if(t.totalPoints<4)return p;const d=[[NaN,NaN],[NaN,NaN],[NaN,NaN],[NaN,NaN]],f=[NaN,NaN,NaN,NaN],g=[NaN,NaN,NaN,NaN];let w=!1,x=u(p,t,!0);0===x.distance&&(w=!0,d[0][0]=p[0],d[0][1]=p[1],x=u(p,t,!1)),f[0]=x.distance,g[0]=0;const S=[NaN,NaN];let z=!1,P=.25,I=-1,b=NaN;do{if(b=NaN,d[1]=c(t,y(h[0],h[2],P),0,e),isNaN(d[1][0])||isNaN(d[1][1])||(x=u(d[1],t,!1),b=x.distance),!isNaN(b)&&b>s&&l(d[1],t))z=!0,f[1]=b,g[1]=m(d[1],p);else if(!isNaN(b)&&b>I&&(I=b,S[0]=d[1][0],S[1]=d[1][1]),P-=.01,P<.1){if(!(I>=0))break;z=!0,f[1]=I,d[1][0]=S[0],d[1][1]=S[1],g[1]=m(d[1],p)}}while(!z);z=!1,P=.5,I=-1;let F=.01,v=1;do{if(b=NaN,d[2]=c(t,y(h[0],h[2],P),0,e),isNaN(d[2][0])||isNaN(d[2][1])||(x=u(d[2],t,!1),b=x.distance),!isNaN(b)&&b>s&&l(d[2],t))z=!0,f[2]=b,g[2]=m(d[2],p);else if(!isNaN(b)&&b>I)I=b,S[0]=d[2][0],S[1]=d[2][1];else if(b>I&&(I=b,S[0]=d[2][0],S[1]=d[2][1]),P=.5+F*v,F+=.01,v*=-1,P<.3||P>.7){if(!(I>=0))break;z=!0,f[2]=I,d[2][0]=S[0],d[2][1]=S[1],g[2]=m(d[2],p)}}while(!z);z=!1,P=.75,I=-1;do{if(b=NaN,d[3]=c(t,y(h[0],h[2],P),0,e),isNaN(d[3][0])||isNaN(d[3][1])||(x=u(d[3],t,!1),b=x.distance),!isNaN(b)&&b>s&&l(d[3],t))z=!0,f[3]=b,g[3]=m(d[3],p);else if(b>I&&(I=b,S[0]=d[3][0],S[1]=d[3][1]),P+=.01,P>.9){if(!(I>=0))break;z=!0,f[3]=I,d[3][0]=S[0],d[3][1]=S[1],g[3]=m(d[3],p)}}while(!z);const C=[0,1,2,3],R=w?0:1;let O;for(let t=R;t<4;t++)for(let t=R;t<3;t++){const e=g[t],s=g[t+1];_(e,s)>0&&(O=C[t],C[t]=C[t+1],C[t+1]=O,g[t]=s,g[t+1]=e)}let N=R,M=0,A=0;for(let t=R;t<4;t++){switch(t){case 0:A=2*f[C[t]];break;case 1:A=1.66666666*f[C[t]];break;case 2:A=1.33333333*f[C[t]];break;case 3:A=f[C[t]]}A>M&&(M=A,N=C[t])}return d[N]}function l(t,e){let s,i,r,n,o=0;for(e.reset();e.nextPath()&&e.nextPoint();)for(s=e.x,i=e.y;e.nextPoint();s=r,i=n)r=e.x,n=e.y,i>t[1]!=n>t[1]&&((r-s)*(t[1]-i)-(n-i)*(t[0]-s)>0?o++:o--);return 0!==o}function u(t,e,s){if(s&&l(t,e))return{coord:t,distance:0};let i=1/0,r=0,n=0,a=[0,0],h=[0,0];const u=[0,0];for(e.reset();e.nextPath()&&e.nextPoint();)if(!(e.pathSize<2))for(a[0]=e.x,a[1]=e.y;e.nextPoint();a=h){h=[e.x,e.y],(0,o.gR)(u,t,a,h);const s=m(t,u);s<i&&(i=s,r=u[0],n=u[1])}return{coord:[r,n],distance:Math.sqrt(i)}}function c(t,e,s,r){const n=[e,0];let o=1/0,h=1/0,l=!1,u=!1;const c=[[e,r[1]-1],[e,r[3]+1]],f=[0,0],y=[0,0],m=[0,0],_=[[0,0],[0,0]],g=(0,i.vt)();for(t.reset();t.nextPath()&&t.nextPoint();)if(!(t.pathSize<2))for(_[0][0]=t.x,_[0][1]=t.y;t.nextPoint();_[0][0]=_[1][0],_[0][1]=_[1][1]){if(_[1][0]=t.x,_[1][1]=t.y,null===p(g,_))continue;if(y[0]=c[0][0],y[1]=c[0][1],m[0]=c[1][0],m[1]=c[1][1],0===d(g,y,m))continue;if(!(0,a.Ql)(c[0],c[1],_[0],_[1],f))continue;const e=f[1];o>h?e<o&&(o=e,l=!0):e<h&&(h=e,u=!0)}return l&&u?n[1]=(o+h)/2:n[0]=n[1]=NaN,n}function p(t,e){if(e.length<2)return null;t||(t=(0,i.vt)());const[s,r]=e[0],[n,o]=e[1];return t[0]=Math.min(s,n),t[1]=Math.min(r,o),t[2]=Math.max(s,n),t[3]=Math.max(r,o),t}function d(t,e,s){let i=f(e,t),r=f(s,t);const n=t[0],o=t[1],a=t[2],h=t[3];if(i&r)return 0;if(!(i|r))return 4;const l=(i?1:0)|(r?2:0);do{const l=s[0]-e[0],u=s[1]-e[1];if(l>u)3&i?(1&i?(e[1]+=u*(n-e[0])/l,e[0]=n):(e[1]+=u*(a-e[0])/l,e[0]=a),i=f(e,t)):3&r?(1&r?(s[1]+=u*(n-s[0])/l,s[0]=n):(s[1]+=u*(a-s[0])/l,s[0]=a),r=f(s,t)):i?(4&i?(e[0]+=l*(o-e[1])/u,e[1]=o):(e[0]+=l*(h-e[1])/u,e[1]=h),i=f(e,t)):(4&r?(s[0]+=l*(o-s[1])/u,s[1]=o):(s[0]+=l*(h-s[1])/u,s[1]=h),r=f(s,t));else if(12&i?(4&i?(e[0]+=l*(o-e[1])/u,e[1]=o):(e[0]+=l*(h-e[1])/u,e[1]=h),i=f(e,t)):12&r?(4&r?(s[0]+=l*(o-s[1])/u,s[1]=o):(s[0]+=l*(h-s[1])/u,s[1]=h),r=f(s,t)):i?(1&i?(e[1]+=u*(n-e[0])/l,e[0]=n):(e[1]+=u*(a-e[0])/l,e[0]=a),i=f(e,t)):(1&r?(s[1]+=u*(n-s[0])/l,s[0]=n):(s[1]+=u*(a-s[0])/l,s[0]=a),r=f(s,t)),i&r)return 0}while(i|r);return l}function f(t,e){return(t[0]<e[0]?1:0)|(t[0]>e[2]?1:0)<<1|(t[1]<e[1]?1:0)<<2|(t[1]>e[3]?1:0)<<3}function y(t,e,s){return t+(e-t)*s}function m(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function _(t,e){if(t<e)return-1;if(t>e)return 1;if(t===e)return 0;const s=isNaN(t),i=isNaN(e);return s<i?-1:s>i?1:0}},48459(t,e,s){s.r(e),s.d(e,{default:()=>E});var i=s(5482),r=s(7762),n=s(21818),o=s(49186),a=s(44208),h=s(53966),l=s(17676),u=s(563),c=s(39516),p=s(16930),d=s(70328),f=s(75752),y=s(8384),m=s(58727),_=s(64714),g=s(17754),w=s(20437),x=s(95466),S=s(10427),z=s(16238);function P(t){switch(t.type){case"wkb":return z.A.fromJSON(t);case"location":return S.A.fromJSON(t)}}var I=s(42760),b=s(39412),F=s(63892),v=s(30661),C=s(28923),R=s(44320),O=s(35258),N=s(16630);const M=new v.Z,A="__OBJECTID",T=new TextDecoder;class E{constructor(){this._fileInfos=new Map,this._queue=new u.QueueProcessor({concurrency:4,process:(t,e)=>this._executeQuery(t,e)}),this._indexMap={}}async load(t){const e=t.spatialReference?p.A.fromJSON(t.spatialReference):void 0;if(e&&!e.isWGS84&&!e.isWebMercator)throw new o.A("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");const s=await(0,I.nc)({urls:new r.A(t.urls),fields:t.fields?.map(t=>w.A.fromJSON(t)),geometryEncoding:t.geometryEncoding?P(t.geometryEncoding):null,geometryType:t.geometryType?(0,I.hG)(t.geometryType):null,displayOptimization:t.displayOptimization,spatialReference:e},{customParameters:t.customParameters});if(!s.fields)throw new o.A("parquet:unsupported","Fields must be defined");let n;if(s.spatialReference&&s.geometryType){if(!s.spatialReference)throw new o.A("parquet:unsupported","SpatialReference must be defined");if(!s.spatialReference.isGeographic&&!s.spatialReference.isWebMercator)throw new o.A("parquet:unsupported-projection","Only WGS84 and Web Mercator are supported");s.spatialReference.isGeographic&&!s.spatialReference.isWGS84&&(h.A.getLogger("parquet:unsupported-projection").warn("Found a geographic projection that is not WGS84. Handling as WGS84.",{spatialReference:s.spatialReference}),s.spatialReference=p.A.WGS84),n={geometry:s.geometryEncoding?{geometryType:(0,I.sA)(s.geometryType),spatialReference:s.spatialReference.toJSON(),encoding:s.geometryEncoding.toJSON()}:null,displayOptimization:s.displayOptimization}}this.setCustomParameters(t.customParameters),this._geometryInfo=n;const a=t.urls;for(const t of a)this._addFile(t);this._capabilities=Q(await this.getFileStatistics());const l=this._fileInfos.values().next().value;if(!l)return{layerDefinition:{},capabilities:Q(null)};const u=await l,{fields:c}=s;if(null==c)throw new o.A("parquet-layer:missing-metadata","Unable to create parquet source: cannot infer fields",c);c.push(new w.A({name:A,type:"oid",alias:A}));for(const t of c){const e=u.file.columnForFieldName(t.name);null!=e&&(this._indexMap[t.name]=e)}const f=new x.A(c.map(t=>t.toJSON()));this._fieldsIndex=f;const y=(0,I.sA)(s.geometryType??"point");if(this._metadata=O.i.createFeature({fieldsIndex:f.toJSON(),geometryType:y,hasZ:!1,hasM:!1,featureIdInfo:{type:"object-id",fieldName:"rowId"},subtypes:null,subtypeField:null,types:null,typeIdField:null,globalIdField:null,spatialReference:s.spatialReference,outSpatialReference:null,timeInfo:null,timeReferenceUnknownClient:null,dateFieldsTimeZone:null}),this._queryEngineParams={fieldsIndex:this._metadata.fieldsIndex,geometryType:y,featureIdInfo:{type:"object-id",fieldName:"rowId"},hasM:!1,hasZ:!1,spatialReference:s.spatialReference?.toJSON()??{wkid:4326},aggregateAdapter:null,timeInfo:null,definitionExpression:null},s.spatialReference){const t=await this.getFileInfos();this._fullExtent=function(t,e){const s=(0,d.hZ)((0,d.vt)(),d.qv);for(const e of t){const t=(0,F.hD)(e.file);if(!t)return null;const i=t.columns[t.primary_column];if(!i.bbox)return null;const r=G(i.bbox);(0,d.RF)(s,r)}return{xmin:s[0],ymin:s[1],xmax:s[3],ymax:s[4],spatialReference:e}}(t,s.spatialReference.toJSON())}if(null==this._fullExtent&&"location"===s.geometryEncoding?.type){const{xField:t,yField:e}=s.geometryEncoding,r=(0,d.hZ)((0,d.vt)(),d.qv);for(const s of await this.getFileInfos())for(const n of s.file.rowGroups()){const s={stack:[],error:void 0,hasError:!1};try{const o=(0,i.mS)(s,n.columnDescriptorForAttribute(t),!1),a=(0,i.mS)(s,n.columnDescriptorForAttribute(e),!1),h=[o.minValue(),a.minValue(),o.maxValue(),a.maxValue()];(0,d.DC)(r,h),n.free()}catch(t){s.error=t,s.hasError=!0}finally{(0,i.hk)(s)}}this._fullExtent={xmin:r[0],ymin:r[1],xmax:r[3],ymax:r[4],spatialReference:s.spatialReference?.toJSON()}}return{capabilities:this._capabilities,layerDefinition:{fields:s.fields?.map(t=>t.toJSON()),drawingInfo:(0,_.F0)(y),extent:this._fullExtent??void 0,geometryType:y,geometryEncoding:s.geometryEncoding?.toJSON(),displayOptimization:s.displayOptimization}}}destroy(){for(const t of this._fileInfos.values())t.then(t=>t.file.free);this._fileInfos.clear(),this._queue.destroy()}setCustomParameters(t){this._customParameters=t}getIndexMap(){return this._indexMap}async getFileId(t){const e=this._fileInfos.get(t);if(!e)throw new Error(`InternalError: File ${t} does not exist`);return(await e).id}async getFileInfo(t){const e=this._fileInfos.get(t);if(!e)throw new Error(`InternalError: File ${t} does not exist`);return e}async getFileInfos(){return Promise.all(Array.from(this._fileInfos.values()))}async getFileStatistics(){if(!this._fileInfos.size)return null;const t=(await this.getFileInfos()).reduce((t,e)=>t+e.file.byteLength(),0);return{featureCount:await this._getFeatureCount(),byteLength:t}}async updateFiles(t){const e=new Set(t);for(const[t,s]of this._fileInfos.entries())e.has(t)?e.delete(t):(s.then(t=>t.file.free()),this._fileInfos.delete(t));await Promise.all(Array.from(e.values()).map(t=>this._addFile(t)))}async queryFeatures(t,e){return this._validateQuery(t),function(t){return!!(t.objectIds?.length||t.outStatistics||t.orderByFields?.length||t.returnDistinctValues)}(t)||(t.resultRecordCount=t.resultRecordCount?Math.min(t.resultRecordCount,8e3):8e3,t.resultOffset=t.resultOffset??0),(t.outStatistics||t.returnDistinctValues)&&(t.returnGeometry=void 0),(await this._enqueueQuery(t,e)).createQueryResponse()}async queryFeatureCount(t,e){const s=await(0,m.T2)(t,null,this._queryEngineParams.spatialReference);return this._validateQuery(s),q(s)?(s.outFields=void 0,s.returnGeometry=void 0,(await this._enqueueQuery(s,e)).createQueryResponseForCount()):this._getFeatureCount()}async queryObjectIds(t,e){const s=await(0,m.T2)(t,null,this._queryEngineParams.spatialReference);return this._validateQuery(s),q(s)?(s.resultRecordCount=s.resultRecordCount?Math.min(s.resultRecordCount,8e3):8e3,s.resultOffset=s.resultOffset??0,s.returnGeometry=void 0,s.outFields=void 0,(await this._enqueueQuery(s,e)).items.map(t=>t.getObjectId())):Array.from({length:await this._getFeatureCount()},(t,e)=>e)}async queryExtent(t,e){const s=await(0,m.T2)(t,null,this._queryEngineParams.spatialReference);if(this._validateQuery(s),this._fullExtent&&!q(s))return{count:await this._getFeatureCount(),extent:this._fullExtent};const i=(0,n.z)(this._metadata.spatialReference);s.returnGeometry=!0,s.outFields=void 0;const r=(0,d.hZ)((0,d.vt)(),d.qv),o=(0,d.vt)(),a=await this._enqueueQuery(s,e);let h=0;for(const t of a.items)t.getBounds(o)&&((0,d.RF)(r,o),h+=1);return{count:h,extent:(0,f.Wc)(r,i,s.outSR?(0,n.z)(s.outSR):i,i,!1)}}async queryStream(t,e,s){if(!s.signal)throw new Error("InternalError: AbortSignal must be passed");const i=await this.getFileInfo(t),r=(await(0,b.N)()).Query.new();"tile"===e.type&&(r.setExtent(e.extent),r.setQuantizationTransform(e.transform),r.setScale(e.scale)),r.setOutFields(e.outFields.filter(t=>null!=this._indexMap[t])),r.setOutSpatialReference(e.outSpatialReference.wkid),r.setReturnGeometry(!0),e.where&&await this._setWhereClause(r,i.file,e.where);const n=await i.file.executeQuery(r,s.signal),o=i.streamIdCounter++,a=(0,l.NY)(s.signal,t=>{const e=i.streams.get(o);null!=e&&(e.handle.remove(),i.streams.delete(o))});return i.streams.set(o,{stream:n,handle:a}),o}async getStreamNext(t,e,s){if(!s.signal)throw new Error("InternalError: AbortSignal must be passed");const i=await this.getFileInfo(t),r=i.streams.get(e);if(!r)return null;const n=await r.stream.next(s.signal);return null==n&&(r.handle.remove(),i.streams.delete(e)),n?.serialize().buffer}async createPatch(t,e,s,i,r){if(!r.signal)throw new Error("InternalError: AbortSignal must be passed");const n=await this.getFileInfo(t);return(await n.file.createChunkPatch(e,s,i,r.signal)).serialize().buffer}async _getFile(t){for(const e of await this.getFileInfos())if(e.id===t)return e.file;throw new Error(`InternalError: File ${t} does not exist`)}_addFile(t){const e=this._fileInfos.size;this._fileInfos.set(t,this._createFileInfo(t,e))}async _createFileInfo(t,e){return{id:e,file:await(0,F.DV)(t,{geometryInfo:this._geometryInfo,getCustomParameters:()=>this._customParameters}),streamIdCounter:0,streams:new Map}}async _getFeatureCount(){return(await this.getFileInfos()).reduce((t,e)=>t+e.file.numRows(),0)}_validateQuery(t){if(!this._capabilities.query.supportsStatistics&&t.outStatistics)throw new o.A("parquet:unsupported","Statistics queries are not supported",{query:t});if(!this._capabilities.query.supportsOrderBy&&t.orderByFields?.length)throw new o.A("parquet:unsupported","Queries using orderBy are not supported",{query:t});if(!this._capabilities.query.supportsDistinct&&t.returnDistinctValues)throw new o.A("parquet:unsupported","Queries using returnDistinctValues are not supported",{query:t})}async _setWhereClause(t,e,s){const i=this._indexMap,r=this._fieldsIndex,n={getAttribute(t,s){const n=e.readAttribute(t.rowGroup,t.row,i[s]);if(null==n)return null;const o=r.get(s);return"esriFieldTypeString"===o.type||"esriFieldTypeDateOnly"===o.type||"esriFieldTypeTimeOnly"===o.type||"esriFieldTypeTimestampOffset"===o.type?T.decode(n):n}},a=await(0,c.GP)(s,this._fieldsIndex);if(!a.isStandardized)throw new o.A("sql-parse-error","expression is not standardized");t.setWhere(s),t.setWhereEvaluator((t,e)=>a.testFeatureCompiled({rowGroup:t,row:e},n,null)),t.setWhereFields(a.fieldNames)}async*_fetchChunks(t,e){const s=await(0,b.N)();for(const i of await this.getFileInfos()){const r=s.Query.new();r.setOutFields(t.fields),r.setReturnGeometry(t.returnGeometry),t.where&&await this._setWhereClause(r,i.file,t.where);const n=await i.file.executeQuery(r),o=[],a=n.next(e);for(let t=0;t<4;t++)o.push(n.next(e));let h=await a;for(;null!=h;){(0,l.Te)(e);const t=new N.s(this._metadata,this._indexMap,h,i.id),s=k([new C.j(t,null,0,!1)],this._queryEngineParams),r=o.shift();o.push(n.next(e)),yield s,h=await r}}}_enqueueQuery(t,e){return this._queue.push(t,e)}async _executeQuery(t,e){const s=await this._getReadParams(t);if(t.where=void 0,t.objectIds?.length){const s=new Map;for(const e of t.objectIds){const t=(0,g.wY)(e),i=(0,g.gE)(e);let r=s.get(t);r||(r=[],s.set(t,r)),r.push(i)}const i=[];for(const[r,n]of s.entries()){const s=await this._executeFileIdQuery(t,r,n,e);for(const t of s)i.push(t)}return new y.G(i,t,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,objectIdField:"rowId",hasM:!1,hasZ:!1,featureAdapter:M})}let i=t.resultRecordCount??await this._getFeatureCount(),r=t.resultOffset??0;t.resultRecordCount=void 0,t.resultOffset=void 0;const n=[];for await(const o of this._fetchChunks(s,e)){const s=await o.executeQueryForOpaqueFeatures(t,e);if(s.length>r){const e=s.slice(r,Math.min(r+i,s.length));for(const t of e)n.push(t);if(r=0,i-=e.length,0===i)return new y.G(n,t,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,objectIdField:"rowId",hasM:!1,hasZ:!1,featureAdapter:M})}else r-=s.length}return new y.G(n,t,{fieldsIndex:this._fieldsIndex,geometryType:this._metadata.geometryType,spatialReference:this._queryEngineParams.spatialReference,objectIdField:"rowId",hasM:!1,hasZ:!1,featureAdapter:M})}async _executeFileIdQuery(t,e,s,i){const r=await this._getReadParams(t),n=(await(0,b.N)()).Query.new();n.setOutFields(r.fields),n.setReturnGeometry(r.returnGeometry),n.setIds(new Uint32Array(s));const o=await this._getFile(e),a=await o.executeQuery(n,i);let h=await a.next(i),l=0;const u=[];for(;null!=h;){const t=new N.s(this._metadata,this._indexMap,h,e),s=new C.j(t,null,l++,!1);u.push(s),h=await a.next(i)}return k(u,this._queryEngineParams).executeQueryForOpaqueFeatures(t,i)}async _getReadParams(t){const e=new Set;if(t.outStatistics)for(const s of t.outStatistics)null!=s.onStatisticField&&e.add(s.onStatisticField);if(t.outFields)for(const s of t.outFields)e.add(s);return{fields:(e.has("*")?this._fieldsIndex.fields.map(t=>t.name):Array.from(e)).filter(t=>null!=this._indexMap[t]),returnGeometry:!!t.returnGeometry||!!t.geometry,where:t.where}}}function q(t){for(const e in t){const s=e;switch(s){case"resultOffset":case"resultRecordCount":case"aggregateIds":case"distance":case"gdbVersion":case"geometry":case"having":case"timeExtent":case"objectIds":case"historicMoment":case"where":return null!=t[s]}}return!1}function k(t,e){const s=new R.I;for(const e of t)s.insert(e);return new f.do({...e,featureStore:s})}function G(t){switch(t.length){case 4:return(0,d.Jt)((0,d.vt)(),t);case 6:return t;default:throw new o.A("parquet:protocol-violation","Invalid Geoparquet file. BoundingBox size must be 4 or 6.",{bbox:t})}}function Q(t){const e=t?.featureCount;let s=!1;return null!=e&&e<(0,a.A)("parquetlayer-full-query-feature-count")&&(s=!0),{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:8e3,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:void 0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,supportsCacheHint:!1,supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:s,supportsExtent:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:s,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:s,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,supportsTrueCurve:!1,tileMaxRecordCount:void 0},queryAttributeBins:{supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},10427(t,e,s){s.d(e,{A:()=>a});var i=s(5482),r=s(69540),n=s(25482),o=s(91429);let a=class extends((0,r.OU)(n.o)){constructor(t){super(t),this.type="location",this.xField=null,this.yField=null}};(0,i.Cg)([(0,o.MZ)({type:["location"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],a.prototype,"type",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"xField",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"yField",void 0),a=(0,i.Cg)([(0,o.$K)("esri.layers.support.ParquetGeometryEncodingLocation")],a)},16238(t,e,s){s.d(e,{A:()=>a});var i=s(5482),r=s(69540),n=s(25482),o=s(91429);let a=class extends((0,r.OU)(n.o)){constructor(t){super(t),this.type="wkb",this.field=null}};(0,i.Cg)([(0,o.MZ)({type:["wkb"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],a.prototype,"type",void 0),(0,i.Cg)([(0,o.MZ)({type:["counter-clockwise"],json:{write:!0}})],a.prototype,"orientation",void 0),(0,i.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"field",void 0),a=(0,i.Cg)([(0,o.$K)("esri.layers.support.ParquetGeometryEncodingWkb")],a)},54625(t,e,s){s.d(e,{i_:()=>r});var i=s(30524);function r(t,e,s){e=(0,i.rS)(e)?.toLowerCase(),s=(0,i.rS)(s)?.toLowerCase();const r=t.map(t=>t.toLowerCase()),a=e?t[r.indexOf(e)]:null,h=s?t[r.indexOf(s)]:null;return{longitudeFieldName:a||t[r.indexOf(o.find(t=>r.includes(t)))],latitudeFieldName:h||t[r.indexOf(n.find(t=>r.includes(t)))]}}const n=["lat","lat83","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],o=["lon","lng","lng83","long","long83","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"]},42760(t,e,s){s.d(e,{hG:()=>y,nc:()=>m,sA:()=>f,ye:()=>p}),s(7762);var i=s(49186),r=s(66552),n=s(16930),o=s(20437),a=s(30524),h=s(54625),l=s(10427),u=s(16238),c=s(63892);const p=new r.J({esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint"}),d=new Set(["uncompressed","snappy","gzip"]);function f(t){return p.toJSON(t)}function y(t){return p.fromJSON(t)}async function m(t,e={}){if(t.urls.length<1)throw new i.A("parquet:bad-input","At least one url must be specified",t);if(t.geometryType&&t.spatialReference&&t.geometryEncoding&&t.fields)return t;const s=await(0,c.DV)(t.urls.getItemAt(0),{getCustomParameters:()=>e.customParameters});for(const t of s.compressionCodecs())if(!d.has(t))throw new i.A("parquet:unsupported",`Compression codec ${t} is unsupported. Must be of type ${Array.from(d).join(",")}`);const r=(0,c.hD)(s),p={...t,file:s};if(null==p.fields&&(p.fields=s.fields(!1).map(t=>o.A.fromJSON({name:t.name,alias:t.name,type:t.type}))),null!=p.geometryEncoding){const t=p.geometryEncoding;switch(t.type){case"wkb":{const e=p.fields.find(e=>e.name===t.field);if(!e)throw new i.A("parquet:unsupported",`Geometry encoding references field ${t.field} which does not exist`);if("blob"!==e.type)throw new i.A("parquet:unsupported",`Invalid field type for geometry encoding. Found ${e.type} but expected 'blob'`);break}case"location":for(const e of[t.xField,t.yField])if(null!=e){const t=p.fields.find(t=>t.name===e);if(!t)throw new i.A("parquet:unsupported",`Geometry encoding references field ${e} which does not exist`);if(!(0,a.WA)(t))throw new i.A("parquet:unsupported",`Invalid field type for location geometry encoding. Found ${t.type} but expected a numeric`)}}}null==p.geometryEncoding&&(p.geometryEncoding=function(t,e){if(null!=t){const e=t.primary_column,s=t.columns[e];return new u.A({field:e,orientation:"counterclockwise"===s.orientation?"counter-clockwise":null})}const s=e.filter(t=>(0,a.WA)(t)).map(t=>t.name),i=(0,h.i_)(s);return i.latitudeFieldName&&i.longitudeFieldName?new l.A({xField:i.longitudeFieldName,yField:i.latitudeFieldName}):null}(r,p.fields));const f=(0,c.Xj)(s);if(f&&(p.displayOptimization=f),p.geometryEncoding)switch(p.geometryEncoding.type){case"location":null==p.spatialReference&&(p.spatialReference=n.A.WGS84),null==p.geometryType&&(p.geometryType="point");break;case"wkb":{if(!r)return p;const t=r.primary_column,e=r.columns[t];if(p.geometryType||(p.geometryType=function(t){const{geometry_types:e}=t,s=new Set;for(const t of e){const e=_(t);e&&s.add(e)}if(s.size>1)throw new i.A("parquet:unsupported","Parquet mixed geometry types are not supported",{geometryTypes:s});return 1===s.size?s.values().next().value:void 0}(e)),p.spatialReference||(p.spatialReference=function(t){const e=t.crs?.id?.code;return e&&"number"==typeof e?new n.A({wkid:e}):void 0}(e)),p.fields)for(const t of Object.keys(r.columns))p.fields=p.fields.filter(e=>e.name!==t)}}if(p.displayOptimization){const t=p.displayOptimization.index;if(!p.spatialReference&&t.wkid&&(p.spatialReference=new n.A({wkid:t.wkid})),!p.geometryType)switch(t.type){case"z":p.geometryType="point";break;case"xz":p.geometryType=t.geometryType}}return p}function _(t){switch(t){case"Point":return"point";case"Polygon":case"MultiPolygon":return"polygon";case"LineString":return"polyline";case"MultiPoint":return"multipoint";default:return null}}},63892(t,e,s){s.d(e,{DV:()=>y,Xj:()=>_,hD:()=>m});var i=s(11254),r=s(49186),n=s(44208),o=s(563),a=s(84952),h=s(39412);const l="parquet.v1",u=new o.QueueProcessor({concurrency:12,process:async t=>{const{data:e}=await(0,i.A)(t.url,t.options);return e}}),c=t=>async function(e,s,i,r){const o=t?.(),a={url:e,options:{responseType:"array-buffer",query:o??{},cacheMode:"no-store",useQueue:!0,headers:{range:`bytes=${s}-${i}`}}};if(!(0,n.A)("parquetlayer-cache-enabled"))return u.push(a);const h=new URL(e);h.searchParams.append("range",`${s}-${i}`);try{const t=await caches.open(`${l}:${e}`),s=await t.match(h);if(s)return await s.arrayBuffer();const i=await u.push(a);return await t.put(h,new Response(i,{headers:{"Content-Type":"application/octet-stream","Content-Length":i.byteLength.toString()}})),i}catch(t){return u.push(a)}},p=t=>async function(e){if((0,a.w8)(e)){const{data:t}=await(0,i.A)(e,{responseType:"blob"});return t.size}const{data:s}=await(0,i.A)(e,{responseType:"native",method:"head",query:t?.()}),r=s.headers.get("Content-Length");if(null==r)throw new Error("Unable to parse content length");const o=parseInt(r,10);if(!(0,n.A)("parquetlayer-cache-enabled"))return o;try{const t=`${l}:${e}`,i=new URL(e);i.searchParams.append("metadata","true");let r=await caches.open(t);const n=s.headers.get("etag")??s.headers.get("Last-Modified");if(null==n)return await caches.delete(t),o;const a=await r.match(i),h=await(a?.json());h?.tag!==n&&(await caches.delete(t),r=await caches.open(t));const u=JSON.stringify({tag:n});await r.put(i,new Response(u,{headers:{"Content-Type":"application/json","Content-Length":u.length.toString()}}))}catch(t){}return o};function d(t,e){switch(e){case"esriGeometryPoint":return t.GeometryType.Point;case"esriGeometryPolygon":case"polygon":return t.GeometryType.Polygon;case"esriGeometryPolyline":case"polyline":return t.GeometryType.Polyline;case"esriGeometryMultipoint":case"multipoint":return t.GeometryType.Multipoint;default:throw new r.A("parquet",`Found unexpected GeometryType: ${e}`)}}function f(t,e){const s=t.GeometryInfo.new();e.geometry&&s.setGeometry(function(t,e){const s=e.encoding,i=d(t,e.geometryType),r=e.spatialReference.wkid;if(null==r)throw new Error("InternalError: Wkid must be defined.");switch(s.type){case"wkb":return t.GeometryField.fromWkb(s.field,r,i);case"location":{const{yField:e,xField:n}=s;return t.GeometryField.fromLocation(e,n,r,i)}}}(t,e.geometry));const i=e.displayOptimization;if(i){const{index:e,parentColumn:r}=i,n=t=>null!=r?[r,t].join("."):t;if("z"===e.type){const i=t.DisplayOptimizationZBuilder.new();i.setCodeField(n(e.code)),i.setXColumn(n(e.xColumn)),i.setYColumn(n(e.yColumn)),i.setCooordinatePrecision(e.coordinatePrecision),i.setFullExtent(e.fullExtent),i.setSpatialReference(e.wkid,e.wkt),i.setHasZ(!!e.zColumn),i.setHasM(!!e.mColumn),s.setOptmizationZ(i)}if("xz"===e.type){const i=d(t,e.geometryType),r=t.DisplayOptimizationXZBuilder.new();r.setCodeField(n(e.code)),r.setEncoding(e.encoding),r.setFullExtent(e.fullExtent),r.setGeometryType(i),r.setSpatialReference(e.wkid,e.wkt),r.setMaxLevel(e.maxLevel),r.setHasZ(e.hasZ??!1),r.setHasM(e.hasM??!1);for(const s of e.levels??[]){const[e,i]=s.transform.translate,[o,a]=s.transform.scale,h=new Float64Array([e,i]),l=new Float64Array([o,a]),u=n(s.column);r.addLevel(t.MultiscaleGeometryField.new(s.level,s.scale,u,h,l))}s.setOptmizationXZ(r)}}return s}async function y(t,e={}){const s=await(0,h.N)(),i=c(e.getCustomParameters),n=p(e.getCustomParameters),o=e.geometryInfo?f(s,e.geometryInfo):null;try{return await s.ParquetFile.fromUrl(t,i,n,o)}catch(t){throw new r.A("parquet","Failed to parse file",{error:t})}}function m(t){const e=t.keyValueMetadata("geo");return null!=e?JSON.parse(e):null}function _(t){if(t.keyValueMetadata("esri"))throw new r.A("parquet:unsupported","File was created using an unsupported experimental display index. Please regenerate the file.");const e=t.keyValueMetadata("geodisplay");if(null!=e)return JSON.parse(e);const s=t.keyValueMetadata("org.apache.spark.sql.parquet.row.metadata");if(null!=s){const t=JSON.parse(s);for(const e of t.fields)if(null!=e.metadata&&"type"in e.metadata&&("xz"===e.metadata.type||"z"===e.metadata.type)){const t={parentColumn:e.name,index:e.metadata};if("xz"===t.index.type&&(t.index.geometryType=t.index.geometryType.toLowerCase(),"esri-pbf"===t.index.encoding&&(t.index.encoding="esriPBF"),"esriPBF"!==t.index.encoding))throw new r.A("parquet:unsupported",`Encoding for display index must be of type esriPBF, but found ${t.index.encoding}`);return t}}return null}},93470(t,e,s){s.d(e,{Cb:()=>n,HW:()=>u,JR:()=>r,JZ:()=>h,WR:()=>a,b6:()=>c,fT:()=>i,nC:()=>l,yM:()=>o});const i=[252,146,31,255],r=[153,153,153,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},h={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},76213(t,e,s){s.d(e,{C2:()=>a,CQ:()=>i,DY:()=>r,GR:()=>_,Gh:()=>l,MZ:()=>d,Rm:()=>o,TB:()=>m,U5:()=>h,_M:()=>u,cp:()=>g,eG:()=>n,fq:()=>f,hM:()=>p,ie:()=>c,yv:()=>y});const i=512,r=29,n=24,o=3,a=4,h=6,l=1.05,u=3,c=3,p=4,d=1,f=10,y=1024,m=256,_=32,g=512}}]);
|