@arcgis/core 4.27.0-rc.2 → 4.27.0-rc.4
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/{a8565d1c676f3bfbcebb.js → 002fe1ec63ea33e6972d.js} +1 -1
- package/assets/esri/core/workers/chunks/09e677ca7532a281d262.js +1 -0
- package/assets/esri/core/workers/chunks/0f7ddb063ee0664f2fca.js +1 -0
- package/assets/esri/core/workers/chunks/17ab08f60764244b2cf8.js +1 -0
- package/assets/esri/core/workers/chunks/1aa8dd317ecd3c41e0ea.js +1 -0
- package/assets/esri/core/workers/chunks/28c67c98039503b62e6e.js +1 -0
- package/assets/esri/core/workers/chunks/{2446e336b1f7256d4fde.js → 2c587ed66e2586cccb8d.js} +1 -1
- package/assets/esri/core/workers/chunks/3767b9e7660873b018c2.js +1 -0
- package/assets/esri/core/workers/chunks/{00c7b9fb375c9a934158.js → 38c6452dc9cf18e8bca8.js} +1 -1
- package/assets/esri/core/workers/chunks/39ae4b9b766f674bc6f2.js +1 -0
- package/assets/esri/core/workers/chunks/45629ff775e77234b227.js +1 -0
- package/assets/esri/core/workers/chunks/{16db0bc87d87a7313dc4.js → 4806df402845c717c842.js} +1 -1
- package/assets/esri/core/workers/chunks/4884432d80e9af947449.js +1 -0
- package/assets/esri/core/workers/chunks/4a4f14a3d8da270059c4.js +1 -0
- package/assets/esri/core/workers/chunks/588cd91d08cec5207be1.js +1 -0
- package/assets/esri/core/workers/chunks/{83e3d104886b48f00397.js → 633c00c02a81397fc8df.js} +1 -1
- package/assets/esri/core/workers/chunks/{efb96aefe979a0f5c632.js → 640e8ac3498be30c6614.js} +1 -1
- package/assets/esri/core/workers/chunks/642c5a93c0a454bdd115.js +1 -0
- package/assets/esri/core/workers/chunks/{14145959a3dab1437818.js → 6627f1bc9ee6b620e3aa.js} +1 -1
- package/assets/esri/core/workers/chunks/{33901eb1574e46abd9af.js → 6c213768715c52625855.js} +1 -1
- package/assets/esri/core/workers/chunks/{5e6471dd2a08e66b47d0.js → 6e4940fe3bba014c921b.js} +57 -58
- package/assets/esri/core/workers/chunks/{170bdbdb4e21bf91a17f.js → 6eaa7a51efde2dd4a5a4.js} +1 -1
- package/assets/esri/core/workers/chunks/{0407bf97ad621c89a734.js → 6f724f75f85dc3989d60.js} +1 -1
- package/assets/esri/core/workers/chunks/{2bdc63395c7466ce1641.js → 7053c2f5a958d4c8629b.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c35c663528f710e8c78.js → 79cb672c85ea29e8484a.js} +1 -1
- package/assets/esri/core/workers/chunks/82939ead43848a13f765.js +1 -0
- package/assets/esri/core/workers/chunks/8b05fb365336cc42fecc.js +1 -0
- package/assets/esri/core/workers/chunks/8b6b963230df56850580.js +1 -0
- package/assets/esri/core/workers/chunks/8eec6da5e862cc33ea2b.js +1 -0
- package/assets/esri/core/workers/chunks/90d8f297d9cb359e071d.js +1 -0
- package/assets/esri/core/workers/chunks/91785144901dfe56c5e2.js +1 -0
- package/assets/esri/core/workers/chunks/{471f6eba213412b82840.js → 927417abea79c955b216.js} +1 -1
- package/assets/esri/core/workers/chunks/9472184ef1432fc55d6b.js +1 -0
- package/assets/esri/core/workers/chunks/{adaa9d4239f4e905d011.js → 9d4bd73dd50400e9d328.js} +1 -1
- package/assets/esri/core/workers/chunks/a324cc07d486061d0d8e.js +1 -0
- package/assets/esri/core/workers/chunks/a40130579791293cefa2.js +1 -0
- package/assets/esri/core/workers/chunks/{3e239bfad611985e50fb.js → a49718c74053314ed741.js} +1 -1
- package/assets/esri/core/workers/chunks/a80a6267d88246ede5d3.js +1 -0
- package/assets/esri/core/workers/chunks/ad2891985e0fe45aa8d2.js +1 -0
- package/assets/esri/core/workers/chunks/afcba35eea836aea98ca.js +1 -0
- package/assets/esri/core/workers/chunks/b3d2e397ea74ebef4423.js +1 -0
- package/assets/esri/core/workers/chunks/b5fb9da45cc9dee286f8.js +1 -0
- package/assets/esri/core/workers/chunks/{f505ebd4bd3bfb6c790d.js → b6a55fdfe16795ebf02c.js} +1 -1
- package/assets/esri/core/workers/chunks/b846d4215210aac9f6ef.js +1 -0
- package/assets/esri/core/workers/chunks/c7dc821db8c14fec24a7.js +1 -0
- package/assets/esri/core/workers/chunks/c9df9a0a4a45f9a53ce9.js +1 -0
- package/assets/esri/core/workers/chunks/{45a4041881e6235d73a2.js → d0a9711f48dfa5fee68a.js} +1 -1
- package/assets/esri/core/workers/chunks/{1f69fb9687de9ebfcf90.js → d4ba894a2583f3930a4f.js} +1 -1
- package/assets/esri/core/workers/chunks/d5dfd3d693d5e393a542.js +1 -0
- package/assets/esri/core/workers/chunks/{74fd2059ddda9083cbcc.js → dc6c97a43d642eeaf477.js} +1 -1
- package/assets/esri/core/workers/chunks/e23ec4f867c4735eec20.js +1 -0
- package/assets/esri/core/workers/chunks/ea16230a0edfc9f756bd.js +1 -0
- package/assets/esri/core/workers/chunks/{2154d395f405be3cd3ba.js → eca0c3d57b3a1e3a14ee.js} +1 -1
- package/assets/esri/core/workers/chunks/ef900614353505afb210.js +1 -0
- package/assets/esri/core/workers/chunks/f36697f6aac782007d1a.js +1 -0
- package/assets/esri/core/workers/chunks/f52054f27619a98b7bb7.js +1 -0
- package/assets/esri/core/workers/chunks/fb7fe307a583b6a22218.js +1 -0
- package/assets/esri/core/workers/chunks/fbd3c78ee8e2219a6c7a.js +1 -0
- package/assets/esri/images/portal/livestreamvideolayer16.png +0 -0
- package/assets/esri/images/portal/{mediaservice16.png → videolayer16.png} +0 -0
- package/assets/esri/themes/base/_View.scss +2 -5
- package/assets/esri/themes/base/widgets/_Feature.scss +12 -4
- package/assets/esri/themes/base/widgets/_FeatureForm.scss +19 -2
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/DefaultMaterial.glsl.js +42 -42
- package/chunks/Terrain.glsl.js +7 -7
- package/copyright.txt +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/support/DoubleArray.js +1 -1
- package/geometry/support/meshUtils/bounds.js +1 -1
- package/geometry/support/meshUtils/georeference.js +1 -1
- package/interfaces.d.ts +87 -3
- package/kernel.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/VideoLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/editingSupport.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/graphics/sources/OGCFeatureSource.js +1 -1
- package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
- package/layers/graphics/sources/support/uploadAssets.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/orientedImagery/core/bestImageUtils.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/orientedImagery/transformations/groundToImageUtils.js +1 -1
- package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/capabilities.js +1 -1
- package/layers/support/editableLayers.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/layers/video/VideoCameraSensorModel.js +5 -0
- package/layers/video/VideoController.js +1 -1
- package/layers/video/videoUtils.js +1 -1
- package/package.json +1 -1
- package/portal/PortalItem.js +1 -1
- package/renderers/support/colorRampUtils.js +1 -1
- package/request.js +1 -1
- package/rest/support/meshFeatureSet.js +1 -1
- package/smartMapping/labels/bins.js +5 -0
- package/smartMapping/labels/clusters.js +1 -1
- package/smartMapping/labels/support/utils.js +5 -0
- package/smartMapping/support/binningUtils.js +1 -1
- package/support/requestUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/layers/features/schemaUtils.js +1 -1
- package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/I3SMeshViewLabeler.js +1 -1
- package/views/3d/layers/I3SMeshWorkerHandle.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/i3s/I3SClientMaterialUtil.js +5 -0
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +19 -20
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +9 -9
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/DOMContainer.js +1 -1
- package/views/PopupView.js +1 -1
- package/views/ui/DefaultUI.js +1 -1
- package/views/ui/UI.js +1 -1
- package/webmap/initialViewPropertiesUtils.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/CreateWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflowData.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Feature/support/featureUtils.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
- package/widgets/FeatureForm/RelationshipInput.js +1 -1
- package/widgets/FeatureForm/css.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Popup.js +1 -1
- package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.d.ts +4 -0
- package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
- package/widgets/UtilityNetworkValidateTopology.d.ts +4 -0
- package/widgets/support/geolocationUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0610691a0c0d9fbbd6d2.js +0 -1
- package/assets/esri/core/workers/chunks/0618fb0058f39ecd363f.js +0 -1
- package/assets/esri/core/workers/chunks/0fcb8d408696075338e2.js +0 -1
- package/assets/esri/core/workers/chunks/16e459b16bdd6e1a821b.js +0 -1
- package/assets/esri/core/workers/chunks/1b8074269800b384ecf6.js +0 -1
- package/assets/esri/core/workers/chunks/2b55295590b4a0503749.js +0 -1
- package/assets/esri/core/workers/chunks/3ba2fcb9110230f8790c.js +0 -1
- package/assets/esri/core/workers/chunks/5576858f56314afcb4d5.js +0 -1
- package/assets/esri/core/workers/chunks/5706edf45402dff279a6.js +0 -1
- package/assets/esri/core/workers/chunks/624521961fe1f2c4f2c5.js +0 -1
- package/assets/esri/core/workers/chunks/659b7bad7281c0e2aed3.js +0 -1
- package/assets/esri/core/workers/chunks/6cd248d065f6d1616294.js +0 -1
- package/assets/esri/core/workers/chunks/6f510f28526c73ab453c.js +0 -1
- package/assets/esri/core/workers/chunks/7479dc0c790337af7597.js +0 -1
- package/assets/esri/core/workers/chunks/9326120c750799eb2d28.js +0 -1
- package/assets/esri/core/workers/chunks/99e0cec47e3ef72c1de4.js +0 -1
- package/assets/esri/core/workers/chunks/9c0e1e87790424f42d7e.js +0 -1
- package/assets/esri/core/workers/chunks/9e66af3b1c70cf25fb32.js +0 -1
- package/assets/esri/core/workers/chunks/a1c31bb8c12831539328.js +0 -1
- package/assets/esri/core/workers/chunks/a7fd2a95fde197c06828.js +0 -1
- package/assets/esri/core/workers/chunks/b0cda39b53ecd6c44cd0.js +0 -1
- package/assets/esri/core/workers/chunks/b8e6c64792a512df4c4d.js +0 -1
- package/assets/esri/core/workers/chunks/c08e03165043df67c11b.js +0 -1
- package/assets/esri/core/workers/chunks/c26148d4bfab3b3dfab2.js +0 -1
- package/assets/esri/core/workers/chunks/c96db6b7ce47bd343fdb.js +0 -1
- package/assets/esri/core/workers/chunks/d6b6bb8aecc85d2a3f6b.js +0 -1
- package/assets/esri/core/workers/chunks/d95ca50ca7af4c222036.js +0 -1
- package/assets/esri/core/workers/chunks/da57eba2fe25495ea217.js +0 -1
- package/assets/esri/core/workers/chunks/ee5ee03dd2c7dc940272.js +0 -1
- package/assets/esri/core/workers/chunks/eeaf8010e38b65a101ac.js +0 -1
- package/assets/esri/core/workers/chunks/f235392c56063fbf89c6.js +0 -1
- package/assets/esri/core/workers/chunks/f720967ba8c5486a26a2.js +0 -1
- package/assets/esri/core/workers/chunks/fdd0d3616c97e408b104.js +0 -1
- package/layers/orientedImagery/core/Affixes.js +0 -5
- package/layers/orientedImagery/core/CameraProperties.js +0 -5
- package/layers/orientedImagery/core/ImageProperties.js +0 -5
- package/layers/orientedImagery/core/ImageryTypes.js +0 -5
- package/layers/orientedImagery/core/imageryUtils.js +0 -5
package/widgets/Popup.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import t from"../core/Collection.js";import{deprecatedProperty as i}from"../core/deprecate.js";import{eventKey as o}from"../core/events.js";import n from"../core/Handles.js";import s from"../core/Logger.js";import{watch as r,when as l,on as a,whenOnce as c,initial as u}from"../core/reactiveUtils.js";import{throttle as d}from"../core/throttle.js";import{property as h}from"../core/accessorSupport/decorators/property.js";import{cast as p}from"../core/accessorSupport/decorators/cast.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as g}from"../core/accessorSupport/decorators/subclass.js";import m from"./Feature.js";import v from"./Spinner.js";import f from"./Widget.js";import{CSS as _}from"./Feature/resources.js";import{FeatureContentMixin as w}from"./Feature/support/FeatureContentMixin.js";import{getPointFromGeometry as b}from"./Popup/actionUtils.js";import{CSS as M}from"./Popup/css.js";import y from"./Popup/PopupViewModel.js";import{loadCalciteComponents as k}from"./support/componentsUtils.js";import{Heading as A}from"./support/Heading.js";import{accessibleHandler as F}from"./support/decorators/accessibleHandler.js";import{messageBundle as C}from"./support/decorators/messageBundle.js";import{vmEvent as I}from"./support/decorators/vmEvent.js";import{tsx as O}from"./support/jsxFactory.js";import{storeNode as x,cssTransition as E,isRTL as N}from"./support/widgetUtils.js";import{isDarkTheme as B}from"../support/themeUtils.js";import{substitute as P}from"../intl/substitute.js";const T="selected-index",D=0,S="popup-spinner",L={buttonEnabled:!0,position:"auto",breakpoint:{width:544}},R="esri-popup";function V(e,t){return void 0===t?`${R}__${e}`:`${R}__${e}-${t}`}const j={closeButton:!0,featureNavigation:!0};let U=class extends(w(f)){constructor(e,i){super(e,i),this._blurClose=!1,this._blurContainer=!1,this._containerNode=null,this._mainContainerNode=null,this._featureMenuNode=null,this._actionsMenuNode=null,this._focusClose=!1,this._focusContainer=!1,this._focusDockButton=!1,this._focusFeatureMenuButton=!1,this._focusActionsMenuButton=!1,this._focusFirstFeature=!1,this._focusFirstAction=!1,this._handles=new n,this._pointerOffsetInPx=16,this._spinner=null,this._feature=null,this._featureMenuIntersectionObserverNode=null,this._featureMenuViewportNode=null,this._rootFlowItemNode=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&null!=this.viewModel.featurePage&&this.viewModel.featurePage++},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._displaySpinnerThrottled=d((()=>this._displaySpinner()),D),this._exitRelatedRecordsActions=new WeakMap,this._featureSelectionActions=new WeakMap,this._flowItems=new t,this.alignment="auto",this.collapsed=!1,this.collapseEnabled=!0,this.dockEnabled=!1,this.headingLevel=2,this.maxInlineActions=3,this.messages=null,this.messagesCommon=null,this.spinnerEnabled=!0,this.viewModel=new y,this.visibleElements={...j},this._handleOpenRelatedFeature=e=>{this._openRelatedFeature(e)},this._addSelectedFeatureIndexHandle(),this.addHandles([this._displaySpinnerThrottled,r((()=>this.viewModel?.screenLocation),(()=>this._positionContainer())),r((()=>[this.viewModel?.active,this.dockEnabled]),(()=>this._toggleScreenLocationEnabled())),r((()=>this.viewModel?.screenLocation),((e,t)=>{!!e!=!!t&&this.reposition()})),r((()=>[this.viewModel?.view?.padding,this.viewModel?.view?.size,this.viewModel?.active,this.viewModel?.location,this.alignment]),(()=>this.reposition())),r((()=>this.spinnerEnabled),(e=>this._spinnerEnabledChange(e))),r((()=>this.viewModel?.view?.size),((e,t)=>this._updateDockEnabledForViewSize(e,t))),r((()=>this.viewModel?.view),((e,t)=>this._viewChange(e,t))),r((()=>this.viewModel?.view?.ready),((e,t)=>this._viewReadyChange(e??!1,t??!1))),r((()=>[this.viewModel?.waitingForResult,this.viewModel?.location]),(()=>{this._hideSpinner(),this._displaySpinnerThrottled()})),r((()=>this.selectedFeatureWidget),(()=>this._destroyFlowItemWidgets())),r((()=>[this.selectedFeatureWidget?.viewModel?.title,this.selectedFeatureWidget?.viewModel?.state]),(()=>this._setTitleFromFeatureWidget())),r((()=>[this.selectedFeatureWidget?.viewModel?.content,this.selectedFeatureWidget?.viewModel?.state]),(()=>this._setContentFromFeatureWidget())),l((()=>!this.collapsed),(()=>{"xsmall"===this.viewModel?.view?.widthBreakpoint&&this.viewModel.active&&this.collapseEnabled&&this.viewModel.centerAtLocation()})),a((()=>this.viewModel?.allActions),"change",(()=>this._watchActions())),r((()=>this.viewModel?.allActions),(()=>this._watchActions()),u),r((()=>this.viewModel?.featureViewModels),(()=>this._featureMenuViewportScrollTop())),a((()=>this._flowItems),"change",(()=>{this.notifyChange("_activeFlowItemWidget"),this.scheduleRender()})),r((()=>[this._activeFlowItemWidget?.viewModel?.state,this._activeFlowItemWidget?.viewModel?.title]),(()=>this.scheduleRender()))])}loadDependencies(){return k({action:()=>import("@esri/calcite-components/dist/components/calcite-action.js"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow.js"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item.js"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon.js"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip.js")})}initialize(){this.addHandles(this._displaySpinnerThrottled)}destroy(){this._destroyFlowItemWidgets(),this._destroySelectedFeatureWidget(),this._destroySpinner(),this._handles?.destroy(),this._unobserveFeatureMenuObserver(),this._featureMenuIntersectionObserver?.disconnect()}get actionsMenuId(){return`${this.id}-actions-menu`}get actionsMenuButtonId(){return`${this.id}-actions-menu-button`}get featureMenuId(){return`${this.id}-feature-menu`}get titleId(){return`${this.id}-popup-title`}get contentId(){return`${this.id}-popup-content`}get hasContent(){const{selectedFeatureWidget:e,viewModel:t}=this;if(!e)return!!t?.content;const i=e.viewModel;if(i?.waitingForContent||"error"===i?.state)return!0;const o=i?.content;return Array.isArray(o)?!!o.length:!!o}get featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&!!this.visibleElements.featureNavigation}get collapsible(){return!!(this.collapseEnabled&&this.viewModel.title&&this.hasContent)}get featureMenuVisible(){return this.featureNavigationVisible&&this.featureMenuOpen}get contentCollapsed(){return this.collapsible&&!this.featureMenuVisible&&this.collapsed}get dividedActions(){return this._divideActions()}get _activeFlowItemWidget(){const{_flowItems:e}=this;return e.at(-1)??null}get actions(){return this.viewModel.actions}set actions(e){this.viewModel.actions=e}set actionsMenuOpen(e){this._set("actionsMenuOpen",!!e)}get actionsMenuOpen(){return!!this.viewModel.active&&this._get("actionsMenuOpen")}get autoCloseEnabled(){return this.viewModel.autoCloseEnabled}set autoCloseEnabled(e){this.viewModel.autoCloseEnabled=e}get autoOpenEnabled(){return i(s.getLogger(this),"autoOpenEnabled",{replacement:"MapView/SceneView.popupEnabled",version:"4.27"}),this.viewModel.autoOpenEnabled}set autoOpenEnabled(e){i(s.getLogger(this),"autoOpenEnabled",{replacement:"MapView/SceneView.popupEnabled",version:"4.27"}),this.viewModel.autoOpenEnabled=e}get defaultPopupTemplateEnabled(){return this.viewModel.defaultPopupTemplateEnabled}set defaultPopupTemplateEnabled(e){this.viewModel.defaultPopupTemplateEnabled=e}get content(){return this.viewModel.content}set content(e){this.viewModel.content=e}get currentAlignment(){return this._getCurrentAlignment()}get currentDockPosition(){return this._getCurrentDockPosition()}get dockOptions(){return this._get("dockOptions")||L}set dockOptions(e){const t={...L},i=this.viewModel?.view?.breakpoints,o={};i&&(o.width=i.xsmall,o.height=i.xsmall);const n={...t,...e},s={...t.breakpoint,...o},{breakpoint:r}=n;"object"==typeof r?n.breakpoint={...s,...r}:r&&(n.breakpoint=s),this._set("dockOptions",n),this._setCurrentDockPosition(),this.reposition()}get featureCount(){return this.viewModel.featureCount}get featureMenuOpen(){return this.viewModel.featureMenuOpen}set featureMenuOpen(e){this.viewModel.featureMenuOpen=e}get features(){return this.viewModel.features}set features(e){this.viewModel.features=e}get goToOverride(){return this.viewModel.goToOverride}set goToOverride(e){this.viewModel.goToOverride=e}get highlightEnabled(){return this.viewModel.highlightEnabled}set highlightEnabled(e){this.viewModel.highlightEnabled=e}get location(){return this.viewModel.location}set location(e){this.viewModel.location=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get promises(){return this.viewModel.promises}set promises(e){this.viewModel.promises=e}get selectedFeature(){return this.viewModel.selectedFeature}get selectedFeatureIndex(){return this.viewModel.selectedFeatureIndex}set selectedFeatureIndex(e){this.viewModel.selectedFeatureIndex=e}get selectedFeatureWidget(){const{_feature:e,visibleElements:t,headingLevel:i,_flowItems:o}=this,{selectedFeatureViewModel:n}=this.viewModel,s={...t,title:!1};return n?(e?(e.viewModel=n,e.visibleElements=s):this._feature=new m({flowItems:o,headingLevel:i+1,viewModel:n,visibleElements:s}),this._feature):null}get title(){return this.viewModel.title}set title(e){this.viewModel.title=e}get updateLocationEnabled(){return this.viewModel.updateLocationEnabled}set updateLocationEnabled(e){this.viewModel.updateLocationEnabled=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get visible(){return this.viewModel.visible}set visible(e){this.viewModel.visible=e}castVisibleElements(e){return{...j,...e}}blur(){const{active:e}=this.viewModel;e||s.getLogger(this).warn("Popup can only be blurred when currently active."),this.visibleElements.closeButton?this._blurClose=!0:this._blurContainer=!0,this.scheduleRender()}clear(){return this.viewModel.clear()}close(){this.visible=!1}fetchFeatures(e,t){return this.viewModel.fetchFeatures(e,t)}focus(){const{active:e}=this.viewModel;e||s.getLogger(this).warn("Popup can only be focused when currently active."),this.visibleElements.closeButton?this._focusClose=!0:this._focusContainer=!0,this.scheduleRender()}next(){return this.viewModel.next()}open(e){this._handles.remove(T);const t=!!e&&!!e.featureMenuOpen,i=!!e&&!!e.actionsMenuOpen,o={collapsed:!!e&&!!e.collapsed,actionsMenuOpen:i,featureMenuOpen:t};"xsmall"===this.viewModel?.view?.widthBreakpoint&&(o.collapsed=!0),this.set(o),this.viewModel.open(e),this._shouldFocus(e),this._addSelectedFeatureIndexHandle()}previous(){return this.viewModel.previous()}reposition(){this.renderNow(),this._positionContainer(),this._setCurrentAlignment()}triggerAction(e){return this.viewModel.triggerAction(e)}render(){const{actionsMenuOpen:e,dockEnabled:t,featureMenuVisible:i,dividedActions:o,currentAlignment:n,currentDockPosition:s}=this,{active:r}=this.viewModel,{menuActions:l}=o,a=r&&l.length>1&&e,c=r&&t,u=r&&!t,d=this.selectedFeature?.layer?.title,h=this.selectedFeature?.layer?.id,p={[M.alignTopCenter]:"top-center"===n,[M.alignBottomCenter]:"bottom-center"===n,[M.alignTopLeft]:"top-left"===n,[M.alignBottomLeft]:"bottom-left"===n,[M.alignTopRight]:"top-right"===n,[M.alignBottomRight]:"bottom-right"===n,[M.isDocked]:c,[M.shadow]:u,[M.isDockedTopLeft]:"top-left"===s,[M.isDockedTopCenter]:"top-center"===s,[M.isDockedTopRight]:"top-right"===s,[M.isDockedBottomLeft]:"bottom-left"===s,[M.isDockedBottomCenter]:"bottom-center"===s,[M.isDockedBottomRight]:"bottom-right"===s,[M.isFeatureMenuOpen]:i,[M.isActionsMenuOpen]:a};return O("div",{class:this.classes(M.base,p),role:"presentation","data-layer-title":d,"data-layer-id":h,bind:this,afterCreate:this._positionContainer,afterUpdate:this._positionContainer},r?[this.renderMainContainer(),this.renderPointer()]:null)}renderLoadingIcon(){return O("span",{"aria-hidden":"true",class:this.classes(M.icon,M.iconLoading,M.rotating)})}renderNavigationLoading(){const{messagesCommon:e}=this;return this.viewModel.pendingPromisesCount?O("div",{key:V("loading-container"),role:"presentation",class:M.loadingContainer,"aria-label":e.loading,title:e.loading},this.renderLoadingIcon()):null}renderPreviousButton(){const{messages:e}=this;return O("div",{role:"button",tabIndex:0,bind:this,onclick:this._previous,onkeydown:this._previous,class:this.classes(M.button,M.paginationPrevious),"aria-label":e.previous,title:e.previous},O("calcite-icon",{icon:"chevron-left",scale:"s",class:M.paginationIcon}))}renderNextButton(){const{messages:e}=this;return O("div",{role:"button",tabIndex:0,bind:this,onclick:this._next,onkeydown:this._next,class:this.classes(M.button,M.paginationNext),"aria-label":e.next,title:e.next},O("calcite-icon",{icon:"chevron-right",scale:"s",class:M.paginationIcon}))}renderFeatureMenuButton(){const{featureMenuOpen:e,featureMenuId:t,messagesCommon:i}=this,{featureCount:o,selectedFeatureIndex:n}=this.viewModel;return O("div",{role:"button",tabIndex:0,bind:this,onclick:this._toggleFeatureMenu,onkeydown:this._toggleFeatureMenu,afterCreate:this._focusFeatureMenuButtonNode,afterUpdate:this._focusFeatureMenuButtonNode,class:M.featureMenuButton,"aria-haspopup":"true","aria-controls":t,"aria-expanded":e.toString(),"aria-label":i.menu,title:i.menu},O("calcite-icon",{icon:"list-bullet",scale:"s",class:M.featureMenuButtonIcon}),this._getPageText(o,n))}renderNavigationButtons(){return this.featureNavigationVisible?[this.renderPreviousButton(),this.renderNextButton(),this.renderNavigationLoading()||this.renderFeatureMenuButton()]:[]}renderDockIcon(){const{dockEnabled:e}=this,t=this._wouldDockTo(),i={[M.iconUndock]:e,[M.iconDock]:!e,[M.iconDockToRight]:!e&&("top-right"===t||"bottom-right"===t),[M.iconDockToLeft]:!e&&("top-left"===t||"bottom-left"===t),[M.iconDockToTop]:!e&&"top-center"===t,[M.iconDockToBottom]:!e&&"bottom-center"===t};return O("span",{"aria-hidden":"true",class:this.classes(i,M.icon)})}renderDockButton(){const{dockEnabled:e,messages:t}=this,i=this.viewModel?.view?.widthBreakpoint,o=e?t.undock:t.dock;return"xsmall"!==i&&this.dockOptions?.buttonEnabled?O("div",{role:"button","aria-label":o,title:o,tabIndex:0,bind:this,onclick:this._toggleDockEnabled,onkeydown:this._toggleDockEnabled,afterCreate:this._focusDockButtonNode,afterUpdate:this._focusDockButtonNode,class:this.classes(M.button,M.buttonDock)},this.renderDockIcon()):null}renderTitle(){const{title:e}=this.viewModel,{titleId:t,collapsible:i,contentCollapsed:o,messagesCommon:n}=this,s={[M.headerContainerButton]:i},r=O(A,{level:this.headingLevel,class:M.headerTitle,innerHTML:e??""}),l=i?O("button",{key:`${e}--collapsible`,id:t,title:o?n.expand:n.collapse,bind:this,enterAnimation:this._createFeatureUpdatedAnimation(),class:this.classes(M.headerContainer,s),"aria-expanded":o?"false":"true",onclick:this._toggleCollapsed,type:"button"},r,O("calcite-icon",{class:M.collapseIcon,key:"collapse-icon",icon:o?"chevron-down":"chevron-up",scale:"m"})):O("div",{key:e??"title",id:t,bind:this,enterAnimation:this._createFeatureUpdatedAnimation(),class:this.classes(M.headerContainer,s)},r);return e?l:null}renderCloseIcon(){return O("span",{"aria-hidden":"true",class:this.classes(M.icon,M.iconClose)})}renderCloseButton(){const{visibleElements:e,messagesCommon:t}=this;return e.closeButton?O("div",{role:"button",tabIndex:0,bind:this,onclick:this._close,onkeydown:this._close,class:M.button,"aria-label":t.close,title:t.close,afterCreate:this._closeButtonNodeUpdated,afterUpdate:this._closeButtonNodeUpdated},this.renderCloseIcon()):null}renderHeader(){return O("header",{class:M.header},this.renderTitle(),O("div",{class:M.headerButtons},this.renderDockButton(),this.renderCloseButton()))}renderContentContainer(){const{contentId:e,hasContent:t,contentCollapsed:i,_flowItems:o}=this,{content:n}=this.viewModel,s=o.toArray(),r={[M.contentHasFlows]:!!s.length};return t&&!i?O("div",{key:n??"content",enterAnimation:this._createFeatureUpdatedAnimation(),id:e,class:this.classes(M.content,r)},O("calcite-flow",{bind:this},O("calcite-flow-item",{bind:this,"data-node-ref":"_rootFlowItemNode",afterCreate:x,key:"root-flow-item",onCalciteFlowItemBack:this._handleBackClick},this.renderContent()),s.map((e=>this.renderFlowItem(e)))),s.map((e=>this.renderFlowItemTooltips(e)))):null}renderFlowItem(e){const{messages:t}=this,i=B(),o="graphic"in e&&!e.isTable;return O("calcite-flow-item",{bind:this,class:this.classes({[M.calciteThemeDark]:!i,[M.calciteThemeLight]:i}),heading:e.title??"",description:this._getFlowItemDescription(e),onCalciteFlowItemBack:this._handleBackClick,key:`flow-item-${e.viewModel.uid}`},O("calcite-action",{class:M.actionExit,icon:"move-up",label:t?.exitRelatedRecords,text:t?.exitRelatedRecords,slot:"header-actions-start",bind:this,afterCreate:t=>this._storeExitRelatedRecordsAction(e,t),onclick:this._destroyFlowItemWidgets}),o?O("calcite-action",{class:M.actionSelectFeature,icon:"zoom-to-object",label:t?.selectFeature,text:t?.selectFeature,slot:"header-actions-end",bind:this,afterCreate:t=>this._storeFeatureSelectionAction(e,t),onclick:()=>this._handleOpenRelatedFeature(e)}):null,O("div",{class:this.classes(M.contentFlowItem,{[M.calciteThemeDark]:i,[M.calciteThemeLight]:!i})},e.render()))}renderFlowItemTooltips(e){const{messages:t,_exitRelatedRecordsActions:i,_featureSelectionActions:o}=this,n=B(),s=o.get(e);return[O("calcite-tooltip",{class:this.classes({[M.calciteThemeDark]:!n,[M.calciteThemeLight]:n}),key:`exit-related-records-tooltip-${e.viewModel.uid}`,label:t?.exitRelatedRecords,overlayPositioning:"fixed",referenceElement:i.get(e),placement:"top"},t?.exitRelatedRecords),s?O("calcite-tooltip",{class:this.classes({[M.calciteThemeDark]:!n,[M.calciteThemeLight]:n}),key:`select-related-record-tooltip-${e.viewModel.uid}`,label:t?.selectFeature,overlayPositioning:"fixed",referenceElement:s,placement:"top"},t?.selectFeature):null]}renderActionsMenuButton(){const{actionsMenuId:e,actionsMenuButtonId:t,actionsMenuOpen:i,dividedActions:o,messagesCommon:n}=this,s=i?n.close:n.open,{menuActions:r}=o;return r.length?O("div",{key:V("actions-menu-button"),class:this.classes(M.button,M.actionsMenuButton),role:"button",id:t,"aria-haspopup":"true","aria-controls":i?e:null,tabIndex:0,bind:this,onclick:this._toggleActionsMenu,onkeydown:this._toggleActionsMenu,afterCreate:this._focusActionsMenuButtonNode,afterUpdate:this._focusActionsMenuButtonNode,"aria-label":s,title:s},O("span",{"aria-hidden":"true",class:M.iconActionsMenu})):null}renderMenuActions(){const{actionsMenuId:e,actionsMenuButtonId:t,actionsMenuOpen:i,dividedActions:o}=this,{menuActions:n}=o;return n.length&&i?O("ul",{id:e,role:"menu","aria-labelledby":t,key:V("actions"),class:M.actions,bind:this,onkeyup:this._handleActionMenuKeyup,afterCreate:this._actionsMenuNodeUpdated,afterUpdate:this._actionsMenuNodeUpdated},n.toArray().map((e=>this.renderAction({action:e,type:"menu-item"})))):null}renderInlineActions(){const{inlineActions:e}=this.dividedActions;return e.length?e.toArray().map((e=>this.renderAction({action:e,type:"inline"}))):[]}renderInlineActionsContainer(){const{inlineActions:e,menuActions:t}=this.dividedActions,i=!!e.length,o=!!t.length;return i||o?O("div",{key:"inline-actions-container","data-inline-actions":i.toString(),"data-menu-actions":o.toString(),class:M.inlineActionsContainer},this.renderInlineActions(),this.renderActionsMenuButton(),this.renderMenuActions()):null}renderNavigation(){return this.featureNavigationVisible?O("section",{key:V("navigation"),class:this.classes(M.navigation)},this.renderNavigationButtons()):null}renderFooter(){const{featureNavigationVisible:e,dividedActions:t}=this,{inlineActions:i,menuActions:o}=t,n=!!i.length,s=!!o.length,r={[M.footerHasPagination]:e,[M.footerHasActions]:n,[M.footerHasActionsMenu]:s};return e||n?O("div",{key:V("feature-buttons"),class:this.classes(M.footer,r)},this.renderInlineActionsContainer(),this.renderNavigation()):null}renderFeatureMenuContainer(){const{messages:e}=this,{featureViewModels:t,isLoadingFeature:i}=this.viewModel,o=P(e.selectedFeatures,{total:t.length});return O("section",{key:V("menu"),class:M.featureMenu},O("strong",{class:M.featureMenuHeader},o),O("nav",{bind:this,class:M.featureMenuViewport,"data-node-ref":"_featureMenuViewportNode",afterCreate:x},this.renderFeatureMenu(),O("div",{class:M.featureMenuObserver,bind:this,afterCreate:this._featureMenuIntersectionObserverCreated}),i?O("div",{class:M.featureMenuLoader},this.renderLoadingIcon()):null))}renderPointer(){return this.dockEnabled?null:O("div",{key:V("pointer"),class:M.pointer,role:"presentation"},O("div",{class:this.classes(M.pointerDirection,M.shadow)}))}renderMainContainer(){const{dockEnabled:e,currentAlignment:t,currentDockPosition:i,titleId:o,contentId:n,collapsible:s,hasContent:r,contentCollapsed:l,visibleElements:a}=this,{title:c}=this.viewModel,u="bottom-left"===t||"bottom-center"===t||"bottom-right"===t||"top-left"===i||"top-center"===i||"top-right"===i,d="top-left"===t||"top-center"===t||"top-right"===t||"bottom-left"===i||"bottom-center"===i||"bottom-right"===i,h={[M.shadow]:e,[M.isCollapsible]:s,[M.isCollapsed]:l};return O("div",{class:this.classes(M.main,M.widget,h),tabIndex:a.closeButton?void 0:-1,role:"dialog","aria-live":"polite","aria-labelledby":c?o:"","aria-describedby":r&&!l?n:"",bind:this,onkeyup:this._handleMainKeyup,afterCreate:this._mainContainerNodeUpdated,afterUpdate:this._mainContainerNodeUpdated},u?this.renderFooter():null,u?this.renderFeatureMenuContainer():null,this.renderHeader(),this.renderContentContainer(),d?this.renderFooter():null,d?this.renderFeatureMenuContainer():null)}renderContent(){const e=this.viewModel?.content;return e?"string"==typeof e?O("div",{class:_.contentNode,key:e,innerHTML:e}):this.renderNodeContent(e):null}renderActionText(e){return O("span",{key:"text",class:M.actionText},e)}renderActionCalciteIcon(e,t){return O("calcite-icon",{scale:"s",key:`calcite-icon-${t}`,icon:e,class:M.icon})}renderActionIcon(e){const t=this._getActionClass(e),i=this._getActionImage(e),o={[M.iconLoading]:e.active,[M.rotating]:e.active,[M.icon]:!!t,[M.actionImage]:!e.active&&!!i};return t&&(o[t]=!e.active),O("span",{key:"icon","aria-hidden":"true",class:this.classes(M.icon,o),styles:this._getIconStyles(i)})}renderAction(e){const{action:t,type:i}=e,o=this._getActionTitle(t),n={[M.action]:"toggle"!==t.type,[M.actionToggle]:"toggle"===t.type,[M.actionToggleOn]:"toggle"===t.type&&t.value,[M.buttonDisabled]:t.disabled},s=[t.icon&&!t.active?this.renderActionCalciteIcon(t.icon,t.uid):this.renderActionIcon(t),this.renderActionText(o)],r="menu-item"===i?O("li",{key:t.uid,role:"menuitem",tabIndex:0,title:o,"aria-label":o,class:this.classes(M.button,n),onkeyup:this._handleActionMenuItemKeyup,bind:this,"data-action-uid":t.uid,onclick:this._triggerAction,onkeydown:this._triggerAction},s):O("div",{key:t.uid,role:"button",tabIndex:0,title:o,"aria-label":o,class:this.classes(M.button,n),onkeyup:this._handleActionMenuItemKeyup,bind:this,"data-action-uid":t.uid,onclick:this._triggerAction,onkeydown:this._triggerAction},s);return t.visible?r:null}renderFeatureMenuItem(e,t){const{messages:i,messagesCommon:o}=this,{selectedFeatureIndex:n,selectedFeatureViewModel:s}=this.viewModel,r=e===s,l={[M.featureMenuSelected]:r},a=r?O("span",{key:V(`feature-menu-selected-feature-${n}`),title:i.selectedFeature,"aria-label":i.selectedFeature,class:M.iconCheckMark}):null,c=O("span",{innerHTML:e.title||o.untitled});return O("li",{role:"menuitem",tabIndex:-1,key:V(`feature-menu-feature-${n}`),class:this.classes(l,M.featureMenuItem),bind:this,"data-feature-index":t,onblur:this._removeActiveFeature,onfocus:this._setActiveFeature,onkeyup:this._handleFeatureMenuItemKeyup,onclick:this._selectFeature,onkeydown:this._selectFeature,onmouseover:this._setActiveFeature,onmouseleave:this._removeActiveFeature},O("span",{class:M.featureMenuTitle},c,a))}renderFeatureMenu(){const{featureMenuId:e}=this,{featureViewModels:t}=this.viewModel;return t.length>1?O("ol",{class:M.featureMenuList,id:e,bind:this,afterCreate:this._featureMenuNodeUpdated,afterUpdate:this._featureMenuNodeUpdated,onkeyup:this._handleFeatureMenuKeyup,role:"menu"},t.filter((e=>!!e.graphic)).map(((e,t)=>this.renderFeatureMenuItem(e,t)))):null}_storeFeatureSelectionAction(e,t){this._featureSelectionActions.set(e,t),this.scheduleRender()}_storeExitRelatedRecordsAction(e,t){this._exitRelatedRecordsActions.set(e,t),this.scheduleRender()}_getFlowItemDescription(e){return"featureCountDescription"in e?e.featureCountDescription:e.viewModel.description??""}async _openRelatedFeature(e){await e.viewModel.updateGeometry();const t=e.graphic,i=t?.geometry;if(null==i||null==t)return;this._destroyFlowItemWidgets(),await this.viewModel.zoomTo({target:i});const o=b(i);this.open({features:[t],location:null!=o?o:void 0})}_destroyFlowItemWidgets(){this._flowItems.removeAll().forEach((e=>{"showAllEnabled"in e.viewModel&&(e.viewModel.showAllEnabled=!1),e.viewModel=null,e.destroy()}))}_handleBackClick(){const e=this._flowItems.pop();e&&(this._exitRelatedRecordsActions.delete(e),this._featureSelectionActions.delete(e),"showAllEnabled"in e.viewModel&&(e.viewModel.showAllEnabled=!1),e&&(e.viewModel=null,e.destroy()))}_getActionTitle(e){const{messages:t,selectedFeature:i,messagesCommon:o}=this,{id:n}=e,s=i?.attributes,r=e.title??"",l="zoom-to-feature"===n?P(r,{messages:t}):"remove-selected-feature"===n?P(r,{messages:o}):"zoom-to-clustered-features"===n||"browse-clustered-features"===n?P(r,{messages:t}):e.title;return l&&s?P(l,s):l??""}_getActionClass(e){const{selectedFeature:t}=this,i=t?.attributes,{className:o,image:n}=e,s=n||o?o:M.iconDefaultAction;return s&&i?P(s,i):s??""}_getActionImage(e){if(e.active)return"";const{selectedFeature:t}=this,i=t?.attributes,{image:o}=e;return o&&i?P(o,i):o??""}_createFeatureUpdatedAnimation(){return E("enter",M.hasFeatureUpdated)}_getInlineActionCount(){const{maxInlineActions:e,featureNavigationVisible:t}=this;if("number"!=typeof e)return null;const i=Math.round(e);return Math.max(t?i-1:i,0)}_watchActions(){const{allActions:e}=this.viewModel;this.notifyChange("dividedActions");const t="actions";this._handles.remove(t),e&&e.forEach((e=>{this._handles.add(r((()=>[e.uid,e.active,e.className,e.disabled,e.id,e.title,e.image,e.visible]),(()=>this.scheduleRender())),t)}))}_divideActions(){const{allActions:e}=this.viewModel,i=e.filter((e=>e.visible)),o=this._getInlineActionCount(),n=null===o,s=0===o;return{inlineActions:n?i.slice(0):s?new t:i.slice(0,o),menuActions:n?new t:s?i.slice(0):i.slice(o)}}_featureMenuOpenChanged(e){e?this._focusFirstFeature=!0:this._focusFeatureMenuButton=!0}_actionsMenuOpenChanged(e){e?this._focusFirstAction=!0:this._focusActionsMenuButton=!0}_setTitleFromFeatureWidget(){const{selectedFeatureWidget:e,messagesCommon:t}=this;e&&(this.viewModel.title="error"===e.viewModel?.state?t.errorMessage:e.viewModel?.title||"")}_setContentFromFeatureWidget(){const{selectedFeatureWidget:e}=this;e&&(this.viewModel.content=e)}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){this._unobserveFeatureMenuObserver(),this._featureMenuIntersectionObserver.observe(e),this._featureMenuIntersectionObserverNode=e}_handleFeatureMenuKeyup(e){"Escape"===o(e)&&(e.stopPropagation(),this._focusFeatureMenuButton=!0,this.featureMenuOpen=!1,this.scheduleRender())}_handleActionMenuKeyup(e){"Escape"===o(e)&&(e.stopPropagation(),this._focusActionsMenuButton=!0,this.actionsMenuOpen=!1,this.scheduleRender())}_setActiveFeature(e){const{viewModel:t}=this,i=W(e.currentTarget);t.activeFeature=t.features[i]||null}_removeActiveFeature(){this.viewModel.activeFeature=null}_handleFeatureMenuItemKeyup(e){const t=o(e),{_featureMenuNode:i}=this,n=W(e.currentTarget);if(!i)return;const s=i.querySelectorAll("li"),r=s.length;if("ArrowUp"!==t)if("ArrowDown"!==t)if("Home"!==t)if("End"!==t);else{e.stopPropagation();s[s.length-1].focus()}else{e.stopPropagation();s[0].focus()}else{e.stopPropagation();s[(n+1+r)%r].focus()}else{e.stopPropagation();s[(n-1+r)%r].focus()}}_handleActionMenuItemKeyup(e){const t=o(e),{_actionsMenuNode:i}=this,n=e.currentTarget.dataset.actionUid,{menuActions:s}=this.dividedActions,r=s.findIndex((e=>e.uid===n));if(!i)return;const l=i.querySelectorAll("li"),a=l.length;if("ArrowUp"!==t)if("ArrowDown"!==t)if("Home"!==t)if("End"!==t);else{e.stopPropagation();l[l.length-1].focus()}else{e.stopPropagation();l[0].focus()}else{e.stopPropagation();l[(r+1+a)%a].focus()}else{e.stopPropagation();l[(r-1+a)%a].focus()}}_handleMainKeyup(e){const t=o(e);"ArrowLeft"===t&&(e.stopPropagation(),this.previous()),"ArrowRight"===t&&(e.stopPropagation(),this.next())}_spinnerEnabledChange(e){if(this._destroySpinner(),!e)return;const t=this.get("viewModel.view");this._createSpinner(t)}_hideSpinner(){const{_spinner:e}=this;e&&(e.location=null,e.hide())}_displaySpinner(){const{_spinner:e}=this;if(!e)return;const{location:t,waitingForResult:i}=this.viewModel;i&&t?e.show({location:t}):e.hide()}_getIconStyles(e){return{"background-image":e?`url(${e})`:""}}async _shouldFocus(e){e?.shouldFocus&&(await c((()=>!0===this.viewModel?.active)),this.focus())}_addSelectedFeatureIndexHandle(){const e=r((()=>this.viewModel?.selectedFeatureIndex),((e,t)=>this._selectedFeatureIndexUpdated(e,t)));this._handles.add(e,T)}_selectedFeatureIndexUpdated(e,t){const{featureCount:i}=this;i&&e!==t&&-1!==e&&(this._destroyFlowItemWidgets(),this.actionsMenuOpen=!1,this.featureMenuOpen=!1,this._mainContainerNode&&(this._mainContainerNode.scrollTop=0),this._rootFlowItemNode&&this._rootFlowItemNode.scrollContentTo({top:0}))}_destroySelectedFeatureWidget(){const{_feature:e}=this;e&&(e.viewModel=null,e&&!e.destroyed&&e.destroy()),this._feature=null}_isScreenLocationWithinView(e,t){return e.x>-1&&e.y>-1&&e.x<=t.width&&e.y<=t.height}_isOutsideView(e){const{popupHeight:t,popupWidth:i,screenLocation:o,side:n,view:s}=e;if(isNaN(i)||isNaN(t)||!s||!o)return!1;const r=s.padding;return"right"===n&&o.x+i/2>s.width-r.right||("left"===n&&o.x-i/2<r.left||("top"===n&&o.y-t<r.top||"bottom"===n&&o.y+t>s.height-r.bottom))}_calculateAutoAlignment(e){if("auto"!==e)return e;const{_pointerOffsetInPx:t,_containerNode:i,_mainContainerNode:o,viewModel:n}=this,{screenLocation:s,view:r}=n;if(null==s||!r||!i)return"top-center";if(!this._isScreenLocationWithinView(s,r))return this._get("currentAlignment")||"top-center";function l(e){return parseInt(e.replaceAll(/[^-\d\.]/g,""),10)}const a=o?window.getComputedStyle(o,null):null,c=a?l(a.getPropertyValue("max-height")):0,u=a?l(a.getPropertyValue("height")):0,{height:d,width:h}=i.getBoundingClientRect(),p=h+t,g=Math.max(d,c,u)+t,m=this._isOutsideView({popupHeight:g,popupWidth:p,screenLocation:s,side:"right",view:r}),v=this._isOutsideView({popupHeight:g,popupWidth:p,screenLocation:s,side:"left",view:r}),f=this._isOutsideView({popupHeight:g,popupWidth:p,screenLocation:s,side:"top",view:r}),_=this._isOutsideView({popupHeight:g,popupWidth:p,screenLocation:s,side:"bottom",view:r});return v?f?"bottom-right":"top-right":m?f?"bottom-left":"top-left":f?_?"top-center":"bottom-center":"top-center"}_callCurrentAlignment(e){return"function"==typeof e?e.call(this):e}_getCurrentAlignment(){const{alignment:e,dockEnabled:t}=this;return t||!this.viewModel.active?null:this._calculatePositionResult(this._calculateAutoAlignment(this._callCurrentAlignment(e)))}_setCurrentAlignment(){this._set("currentAlignment",this._getCurrentAlignment())}_setCurrentDockPosition(){this._set("currentDockPosition",this._getCurrentDockPosition())}_calculatePositionResult(e){const t=["left","right"];return N(this.container)&&t.reverse(),e?.replace(/leading/gi,t[0]).replaceAll(/trailing/gi,t[1])}_callDockPosition(e){return"function"==typeof e?e.call(this):e}_getDockPosition(){return this._calculatePositionResult(this._calculateAutoDockPosition(this._callDockPosition(this.dockOptions?.position)))}_getCurrentDockPosition(){return this.dockEnabled&&this.viewModel.active?this._getDockPosition():null}_wouldDockTo(){return this.dockEnabled?null:this._getDockPosition()}_calculateAutoDockPosition(e){if("auto"!==e)return e;const t=this.viewModel?.view,i=N(this.container)?"top-left":"top-right";if(!t)return i;const o=t.padding||{left:0,right:0,top:0,bottom:0},n=t.width-o.left-o.right,{breakpoints:s}=t;return s&&n<=s.xsmall?"bottom-center":i}_positionContainer(e=this._containerNode){if(e&&(this._containerNode=e),!this._containerNode)return;const{screenLocation:t}=this.viewModel,{width:i}=this._containerNode.getBoundingClientRect(),o=this._calculatePositionStyle(t,i);o&&Object.assign(this._containerNode.style,o)}_calculateFullWidth(e){const{currentAlignment:t,_pointerOffsetInPx:i}=this;return"top-left"===t||"bottom-left"===t||"top-right"===t||"bottom-right"===t?e+i:e}_calculateAlignmentPosition(e,t,i,o){const{currentAlignment:n,_pointerOffsetInPx:s}=this;if(!i)return;const{padding:r}=i,l=o/2,a=i.height-t,c=i.width-e;return"bottom-center"===n?{top:t+s-r.top,left:e-l-r.left}:"top-left"===n?{bottom:a+s-r.bottom,right:c+s-r.right}:"bottom-left"===n?{top:t+s-r.top,right:c+s-r.right}:"top-right"===n?{bottom:a+s-r.bottom,left:e+s-r.left}:"bottom-right"===n?{top:t+s-r.top,left:e+s-r.left}:"top-center"===n?{bottom:a+s-r.bottom,left:e-l-r.left}:void 0}_calculatePositionStyle(e,t){const{dockEnabled:i,view:o}=this;if(!o)return;if(i)return{left:"",top:"",right:"",bottom:""};if(null==e||!t)return;const n=this._calculateFullWidth(t),s=this._calculateAlignmentPosition(e.x,e.y,o,n);return s?{top:void 0!==s.top?`${s.top}px`:"auto",left:void 0!==s.left?`${s.left}px`:"auto",bottom:void 0!==s.bottom?`${s.bottom}px`:"auto",right:void 0!==s.right?`${s.right}px`:"auto"}:void 0}_viewChange(e,t){e&&t&&(this.close(),this.clear())}_viewReadyChange(e,t){if(e){const e=this.get("viewModel.view");this._wireUpView(e)}else t&&(this.close(),this.clear())}_wireUpView(e){if(this._destroySpinner(),!e)return;const{spinnerEnabled:t}=this;t&&this._createSpinner(e),this._setDockEnabledForViewSize(this.dockOptions)}_dockingThresholdCrossed(e,t,i){const[o,n]=e,[s,r]=t,{width:l=0,height:a=0}=i??{};return o<=l&&s>l||o>l&&s<=l||n<=a&&r>a||n>a&&r<=a}_updateDockEnabledForViewSize(e,t){if(!e||!t)return;const i=this.get("viewModel.view.padding")||{left:0,right:0,top:0,bottom:0},o=i.left+i.right,n=i.top+i.bottom,s=[],r=[];s[0]=e[0]-o,s[1]=e[1]-n,r[0]=t[0]-o,r[1]=t[1]-n;const{dockOptions:l}=this,a=l.breakpoint;this._dockingThresholdCrossed(s,r,a)&&this._setDockEnabledForViewSize(l),this._setCurrentDockPosition()}_focusDockButtonNode(e){this._focusDockButton&&(this._focusDockButton=!1,e.focus())}_closeButtonNodeUpdated(e){return this._focusClose?(this._focusClose=!1,void e.focus()):this._blurClose?(this._blurClose=!1,void e.blur()):void 0}_mainContainerNodeUpdated(e){return this._mainContainerNode=e,this._focusContainer?(this._focusContainer=!1,void e.focus()):this._blurContainer?(this._blurContainer=!1,void e.blur()):void 0}_featureMenuNodeUpdated(e){if(this._featureMenuNode=e,!e||!this._focusFirstFeature)return;this._focusFirstFeature=!1;const t=e.querySelectorAll("li");if(t.length){t[0].focus()}}_actionsMenuNodeUpdated(e){if(this._actionsMenuNode=e,!e||!this._focusFirstAction)return;this._focusFirstAction=!1;const t=e.querySelectorAll("li");if(t.length){t[0].focus()}}_focusFeatureMenuButtonNode(e){this._focusFeatureMenuButton&&(this._focusFeatureMenuButton=!1,e.focus())}_focusActionsMenuButtonNode(e){this._focusActionsMenuButton&&(this._focusActionsMenuButton=!1,e.focus())}_featureMenuViewportScrollTop(){this._featureMenuViewportNode&&(this._featureMenuViewportNode.scrollTop=0)}_toggleScreenLocationEnabled(){const{dockEnabled:e,viewModel:t}=this;if(!t)return;const i=t.active&&!e;t.screenLocationEnabled=i}_shouldDockAtCurrentViewSize(e){const t=e.breakpoint,i=this.viewModel?.view?.ui;if(!i)return!1;const{width:o,height:n}=i;if(isNaN(o)||isNaN(n))return!1;if(!t)return!1;const s=t.hasOwnProperty("width")&&o<=(t.width??0),r=t.hasOwnProperty("height")&&n<=(t.height??0);return s||r}_setDockEnabledForViewSize(e){e.breakpoint&&(this.dockEnabled=this._shouldDockAtCurrentViewSize(e))}_getPageText(e,t){return this.featureNavigationVisible?P(this.messages.pageText,{index:t+1,total:e}):null}_destroySpinner(){const{_spinner:e,view:t}=this;e&&(t&&t.ui&&t.ui.remove(e,S),e.destroy(),this._spinner=null)}_createSpinner(e){e&&(this._spinner=new v({view:e}),e.ui.add(this._spinner,{key:S,position:"manual"}))}_toggleCollapsed(){this.collapsed=!this.collapsed}_close(){this.close(),this.view&&this.view.focus()}_toggleDockEnabled(){this.dockEnabled=!this.dockEnabled,this._focusDockButton=!0,this.scheduleRender()}_toggleFeatureMenu(){const e=!this.featureMenuOpen;this._featureMenuOpenChanged(e),this.actionsMenuOpen=!1,this.featureMenuOpen=e}_toggleActionsMenu(){const e=!this.actionsMenuOpen;this._actionsMenuOpenChanged(e),this.featureMenuOpen=!1,this.actionsMenuOpen=e}_triggerAction(e){const t=e.currentTarget.dataset.actionUid,{allActions:i}=this.viewModel,o=i.findIndex((e=>e.uid===t)),n=i.at(o);n&&"toggle"===n.type&&(n.value=!n.value),this.actionsMenuOpen=!1,this.viewModel.triggerAction(o)}_selectFeature(e){const t=W(e.currentTarget);null==t||isNaN(t)||(this.viewModel.selectedFeatureIndex=t),this.featureMenuOpen=!1,this._focusFeatureMenuButton=!0,this.scheduleRender()}_next(){this.next()}_previous(){this.previous()}};function W(e){return e?.["data-feature-index"]}e([h({readOnly:!0})],U.prototype,"actionsMenuId",null),e([h({readOnly:!0})],U.prototype,"actionsMenuButtonId",null),e([h({readOnly:!0})],U.prototype,"featureMenuId",null),e([h({readOnly:!0})],U.prototype,"titleId",null),e([h({readOnly:!0})],U.prototype,"contentId",null),e([h({readOnly:!0})],U.prototype,"hasContent",null),e([h({readOnly:!0})],U.prototype,"featureNavigationVisible",null),e([h({readOnly:!0})],U.prototype,"collapsible",null),e([h({readOnly:!0})],U.prototype,"featureMenuVisible",null),e([h({readOnly:!0})],U.prototype,"contentCollapsed",null),e([h({readOnly:!0})],U.prototype,"dividedActions",null),e([h({readOnly:!0,dependsOn:["_flowItems.length"]})],U.prototype,"_activeFlowItemWidget",null),e([h()],U.prototype,"actions",null),e([h()],U.prototype,"actionsMenuOpen",null),e([h()],U.prototype,"alignment",void 0),e([h()],U.prototype,"autoCloseEnabled",null),e([h()],U.prototype,"autoOpenEnabled",null),e([h()],U.prototype,"defaultPopupTemplateEnabled",null),e([h()],U.prototype,"content",null),e([h()],U.prototype,"collapsed",void 0),e([h()],U.prototype,"collapseEnabled",void 0),e([h({readOnly:!0})],U.prototype,"currentAlignment",null),e([h({readOnly:!0})],U.prototype,"currentDockPosition",null),e([h()],U.prototype,"dockOptions",null),e([h()],U.prototype,"dockEnabled",void 0),e([h({readOnly:!0})],U.prototype,"featureCount",null),e([h()],U.prototype,"featureMenuOpen",null),e([h()],U.prototype,"features",null),e([h()],U.prototype,"goToOverride",null),e([h()],U.prototype,"headingLevel",void 0),e([h()],U.prototype,"highlightEnabled",null),e([h()],U.prototype,"location",null),e([h()],U.prototype,"label",null),e([h()],U.prototype,"maxInlineActions",void 0),e([h(),C("esri/widgets/Popup/t9n/Popup")],U.prototype,"messages",void 0),e([h(),C("esri/t9n/common")],U.prototype,"messagesCommon",void 0),e([h()],U.prototype,"promises",null),e([h({readOnly:!0})],U.prototype,"selectedFeature",null),e([h()],U.prototype,"selectedFeatureIndex",null),e([h({readOnly:!0})],U.prototype,"selectedFeatureWidget",null),e([h()],U.prototype,"spinnerEnabled",void 0),e([h()],U.prototype,"title",null),e([h()],U.prototype,"updateLocationEnabled",null),e([h()],U.prototype,"view",null),e([h({type:y}),I(["triggerAction","trigger-action"])],U.prototype,"viewModel",void 0),e([h()],U.prototype,"visible",null),e([h()],U.prototype,"visibleElements",void 0),e([p("visibleElements")],U.prototype,"castVisibleElements",null),e([F()],U.prototype,"_close",null),e([F()],U.prototype,"_toggleDockEnabled",null),e([F()],U.prototype,"_toggleFeatureMenu",null),e([F()],U.prototype,"_toggleActionsMenu",null),e([F()],U.prototype,"_triggerAction",null),e([F()],U.prototype,"_selectFeature",null),e([F()],U.prototype,"_next",null),e([F()],U.prototype,"_previous",null),U=e([g("esri.widgets.Popup")],U);const H=U;export{H as default};
|
|
5
|
+
import{_ as e}from"../chunks/tslib.es6.js";import"../intl.js";import t from"../core/Collection.js";import{deprecatedProperty as i}from"../core/deprecate.js";import{eventKey as o}from"../core/events.js";import n from"../core/Handles.js";import s from"../core/Logger.js";import{watch as r,when as l,on as a,whenOnce as c,initial as u}from"../core/reactiveUtils.js";import{throttle as d}from"../core/throttle.js";import{property as h}from"../core/accessorSupport/decorators/property.js";import{cast as p}from"../core/accessorSupport/decorators/cast.js";import"../core/arrayUtils.js";import"../core/has.js";import{subclass as g}from"../core/accessorSupport/decorators/subclass.js";import m from"./Feature.js";import v from"./Spinner.js";import f from"./Widget.js";import{CSS as _}from"./Feature/resources.js";import{FeatureContentMixin as w}from"./Feature/support/FeatureContentMixin.js";import{getPointFromGeometry as b}from"./Popup/actionUtils.js";import{CSS as M}from"./Popup/css.js";import y from"./Popup/PopupViewModel.js";import{loadCalciteComponents as k}from"./support/componentsUtils.js";import{Heading as A}from"./support/Heading.js";import{accessibleHandler as F}from"./support/decorators/accessibleHandler.js";import{messageBundle as C}from"./support/decorators/messageBundle.js";import{vmEvent as I}from"./support/decorators/vmEvent.js";import{tsx as O}from"./support/jsxFactory.js";import{storeNode as x,cssTransition as E,isRTL as N}from"./support/widgetUtils.js";import{isDarkTheme as B}from"../support/themeUtils.js";import{substitute as P}from"../intl/substitute.js";const T="selected-index",D=0,S="popup-spinner",L={buttonEnabled:!0,position:"auto",breakpoint:{width:544}},R="esri-popup";function V(e,t){return void 0===t?`${R}__${e}`:`${R}__${e}-${t}`}const j={closeButton:!0,featureNavigation:!0};let U=class extends(w(f)){constructor(e,i){super(e,i),this._blurClose=!1,this._blurContainer=!1,this._containerNode=null,this._mainContainerNode=null,this._featureMenuNode=null,this._actionsMenuNode=null,this._focusClose=!1,this._focusContainer=!1,this._focusDockButton=!1,this._focusFeatureMenuButton=!1,this._focusActionsMenuButton=!1,this._focusFirstFeature=!1,this._focusFirstAction=!1,this._handles=new n,this._pointerOffsetInPx=16,this._spinner=null,this._feature=null,this._featureMenuIntersectionObserverNode=null,this._featureMenuViewportNode=null,this._rootFlowItemNode=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&null!=this.viewModel.featurePage&&this.viewModel.featurePage++},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._displaySpinnerThrottled=d((()=>this._displaySpinner()),D),this._exitRelatedRecordsActions=new WeakMap,this._featureSelectionActions=new WeakMap,this._flowItems=new t,this.alignment="auto",this.collapsed=!1,this.collapseEnabled=!0,this.dockEnabled=!1,this.headingLevel=2,this.maxInlineActions=3,this.messages=null,this.messagesCommon=null,this.spinnerEnabled=!0,this.viewModel=new y,this.visibleElements={...j},this._handleOpenRelatedFeature=e=>{this._openRelatedFeature(e)},this._addSelectedFeatureIndexHandle(),this.addHandles([this._displaySpinnerThrottled,r((()=>this.viewModel?.screenLocation),(()=>this._positionContainer())),r((()=>[this.viewModel?.active,this.dockEnabled]),(()=>this._toggleScreenLocationEnabled())),r((()=>this.viewModel?.screenLocation),((e,t)=>{!!e!=!!t&&this.reposition()})),r((()=>[this.viewModel?.view?.padding,this.viewModel?.view?.size,this.viewModel?.active,this.viewModel?.location,this.alignment]),(()=>this.reposition())),r((()=>this.spinnerEnabled),(e=>this._spinnerEnabledChange(e))),r((()=>this.viewModel?.view?.size),((e,t)=>this._updateDockEnabledForViewSize(e,t))),r((()=>this.viewModel?.view),((e,t)=>this._viewChange(e,t))),r((()=>this.viewModel?.view?.ready),((e,t)=>this._viewReadyChange(e??!1,t??!1))),r((()=>[this.viewModel?.waitingForResult,this.viewModel?.location]),(()=>{this._hideSpinner(),this._displaySpinnerThrottled()})),r((()=>this.selectedFeatureWidget),(()=>this._destroyFlowItemWidgets())),r((()=>[this.selectedFeatureWidget?.viewModel?.title,this.selectedFeatureWidget?.viewModel?.state]),(()=>this._setTitleFromFeatureWidget())),r((()=>[this.selectedFeatureWidget?.viewModel?.content,this.selectedFeatureWidget?.viewModel?.state]),(()=>this._setContentFromFeatureWidget())),l((()=>!this.collapsed),(()=>{"xsmall"===this.viewModel?.view?.widthBreakpoint&&this.viewModel.active&&this.collapseEnabled&&this.viewModel.centerAtLocation()})),a((()=>this.viewModel?.allActions),"change",(()=>this._watchActions())),r((()=>this.viewModel?.allActions),(()=>this._watchActions()),u),r((()=>this.viewModel?.featureViewModels),(()=>this._featureMenuViewportScrollTop())),a((()=>this._flowItems),"change",(()=>{this.notifyChange("_activeFlowItemWidget"),this.scheduleRender()})),r((()=>[this._activeFlowItemWidget?.viewModel?.state,this._activeFlowItemWidget?.viewModel?.title]),(()=>this.scheduleRender()))])}loadDependencies(){return k({action:()=>import("@esri/calcite-components/dist/components/calcite-action.js"),flow:()=>import("@esri/calcite-components/dist/components/calcite-flow.js"),"flow-item":()=>import("@esri/calcite-components/dist/components/calcite-flow-item.js"),icon:()=>import("@esri/calcite-components/dist/components/calcite-icon.js"),tooltip:()=>import("@esri/calcite-components/dist/components/calcite-tooltip.js")})}initialize(){this.addHandles(this._displaySpinnerThrottled)}destroy(){this._destroyFlowItemWidgets(),this._destroySelectedFeatureWidget(),this._destroySpinner(),this._handles?.destroy(),this._unobserveFeatureMenuObserver(),this._featureMenuIntersectionObserver?.disconnect()}get actionsMenuId(){return`${this.id}-actions-menu`}get actionsMenuButtonId(){return`${this.id}-actions-menu-button`}get featureMenuId(){return`${this.id}-feature-menu`}get titleId(){return`${this.id}-popup-title`}get contentId(){return`${this.id}-popup-content`}get hasContent(){const{selectedFeatureWidget:e,viewModel:t}=this;if(!e)return!!t?.content;const i=e.viewModel;if(i?.waitingForContent||"error"===i?.state)return!0;const o=i?.content;return Array.isArray(o)?!!o.length:!!o}get featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&!!this.visibleElements.featureNavigation}get collapsible(){return!!(this.collapseEnabled&&this.viewModel.title&&this.hasContent)}get featureMenuVisible(){return this.featureNavigationVisible&&this.featureMenuOpen}get contentCollapsed(){return this.collapsible&&!this.featureMenuVisible&&this.collapsed}get dividedActions(){return this._divideActions()}get _activeFlowItemWidget(){const{_flowItems:e}=this;return e.at(-1)??null}get actions(){return this.viewModel.actions}set actions(e){this.viewModel.actions=e}set actionsMenuOpen(e){this._set("actionsMenuOpen",!!e)}get actionsMenuOpen(){return!!this.viewModel.active&&this._get("actionsMenuOpen")}get autoCloseEnabled(){return this.viewModel.autoCloseEnabled}set autoCloseEnabled(e){this.viewModel.autoCloseEnabled=e}get autoOpenEnabled(){return i(s.getLogger(this),"autoOpenEnabled",{replacement:"MapView/SceneView.popupEnabled",version:"4.27"}),this.viewModel.autoOpenEnabled}set autoOpenEnabled(e){i(s.getLogger(this),"autoOpenEnabled",{replacement:"MapView/SceneView.popupEnabled",version:"4.27"}),this.viewModel.autoOpenEnabled=e}get defaultPopupTemplateEnabled(){return this.viewModel.defaultPopupTemplateEnabled}set defaultPopupTemplateEnabled(e){this.viewModel.defaultPopupTemplateEnabled=e}get content(){return this.viewModel.content}set content(e){this.viewModel.content=e}get currentAlignment(){return this._getCurrentAlignment()}get currentDockPosition(){return this._getCurrentDockPosition()}get dockOptions(){return this._get("dockOptions")||L}set dockOptions(e){const t={...L},i=this.viewModel?.view?.breakpoints,o={};i&&(o.width=i.xsmall,o.height=i.xsmall);const n={...t,...e},s={...t.breakpoint,...o},{breakpoint:r}=n;"object"==typeof r?n.breakpoint={...s,...r}:r&&(n.breakpoint=s),this._set("dockOptions",n),this._setCurrentDockPosition(),this.reposition()}get featureCount(){return this.viewModel.featureCount}get featureMenuOpen(){return this.viewModel.featureMenuOpen}set featureMenuOpen(e){this.viewModel.featureMenuOpen=e}get features(){return this.viewModel.features}set features(e){this.viewModel.features=e}get goToOverride(){return this.viewModel.goToOverride}set goToOverride(e){this.viewModel.goToOverride=e}get highlightEnabled(){return this.viewModel.highlightEnabled}set highlightEnabled(e){this.viewModel.highlightEnabled=e}get location(){return this.viewModel.location}set location(e){this.viewModel.location=e}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get promises(){return this.viewModel.promises}set promises(e){this.viewModel.promises=e}get selectedFeature(){return this.viewModel.selectedFeature}get selectedFeatureIndex(){return this.viewModel.selectedFeatureIndex}set selectedFeatureIndex(e){this.viewModel.selectedFeatureIndex=e}get selectedFeatureWidget(){const{_feature:e,visibleElements:t,headingLevel:i,_flowItems:o}=this,{selectedFeatureViewModel:n}=this.viewModel,s={...t,title:!1};return n?(e?(e.viewModel=n,e.visibleElements=s):this._feature=new m({flowItems:o,headingLevel:i+1,viewModel:n,visibleElements:s}),this._feature):null}get title(){return this.viewModel.title}set title(e){this.viewModel.title=e}get updateLocationEnabled(){return this.viewModel.updateLocationEnabled}set updateLocationEnabled(e){this.viewModel.updateLocationEnabled=e}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get visible(){return this.viewModel.visible}set visible(e){this.viewModel.visible=e}castVisibleElements(e){return{...j,...e}}blur(){const{active:e}=this.viewModel;e||s.getLogger(this).warn("Popup can only be blurred when currently active."),this.visibleElements.closeButton?this._blurClose=!0:this._blurContainer=!0,this.scheduleRender()}clear(){return this.viewModel.clear()}close(){this.visible=!1}fetchFeatures(e,t){return this.viewModel.fetchFeatures(e,t)}focus(){const{active:e}=this.viewModel;e||s.getLogger(this).warn("Popup can only be focused when currently active."),this.visibleElements.closeButton?this._focusClose=!0:this._focusContainer=!0,this.scheduleRender()}next(){return this.viewModel.next()}open(e){this._handles.remove(T);const t=!!e&&!!e.featureMenuOpen,i=!!e&&!!e.actionsMenuOpen,o={collapsed:!!e&&!!e.collapsed,actionsMenuOpen:i,featureMenuOpen:t};"xsmall"===this.viewModel?.view?.widthBreakpoint&&(o.collapsed=!0),this.set(o),this.viewModel.open(e),this._shouldFocus(e),this._addSelectedFeatureIndexHandle()}previous(){return this.viewModel.previous()}reposition(){this.renderNow(),this._positionContainer(),this._setCurrentAlignment()}triggerAction(e){return this.viewModel.triggerAction(e)}render(){const{actionsMenuOpen:e,dockEnabled:t,featureMenuVisible:i,dividedActions:o,currentAlignment:n,currentDockPosition:s}=this,{active:r}=this.viewModel,{menuActions:l}=o,a=r&&l.length>1&&e,c=r&&t,u=r&&!t,d=this.selectedFeature?.layer?.title,h=this.selectedFeature?.layer?.id,p={[M.alignTopCenter]:"top-center"===n,[M.alignBottomCenter]:"bottom-center"===n,[M.alignTopLeft]:"top-left"===n,[M.alignBottomLeft]:"bottom-left"===n,[M.alignTopRight]:"top-right"===n,[M.alignBottomRight]:"bottom-right"===n,[M.isDocked]:c,[M.shadow]:u,[M.isDockedTopLeft]:"top-left"===s,[M.isDockedTopCenter]:"top-center"===s,[M.isDockedTopRight]:"top-right"===s,[M.isDockedBottomLeft]:"bottom-left"===s,[M.isDockedBottomCenter]:"bottom-center"===s,[M.isDockedBottomRight]:"bottom-right"===s,[M.isFeatureMenuOpen]:i,[M.isActionsMenuOpen]:a};return O("div",{class:this.classes(M.base,p),role:"presentation","data-layer-title":d,"data-layer-id":h,bind:this,afterCreate:this._positionContainer,afterUpdate:this._positionContainer},r?[this.renderMainContainer(),this.renderPointer()]:null)}renderLoadingIcon(){return O("span",{"aria-hidden":"true",class:this.classes(M.icon,M.iconLoading,M.rotating)})}renderNavigationLoading(){const{messagesCommon:e}=this;return this.viewModel.pendingPromisesCount?O("div",{key:V("loading-container"),role:"presentation",class:M.loadingContainer,"aria-label":e.loading,title:e.loading},this.renderLoadingIcon()):null}renderPreviousButton(){const{messages:e}=this;return O("div",{role:"button",tabIndex:0,bind:this,onclick:this._previous,onkeydown:this._previous,class:this.classes(M.button,M.paginationPrevious),"aria-label":e.previous,title:e.previous},O("calcite-icon",{icon:"chevron-left",scale:"s",class:M.paginationIcon}))}renderNextButton(){const{messages:e}=this;return O("div",{role:"button",tabIndex:0,bind:this,onclick:this._next,onkeydown:this._next,class:this.classes(M.button,M.paginationNext),"aria-label":e.next,title:e.next},O("calcite-icon",{icon:"chevron-right",scale:"s",class:M.paginationIcon}))}renderFeatureMenuButton(){const{featureMenuOpen:e,featureMenuId:t,messagesCommon:i}=this,{featureCount:o,selectedFeatureIndex:n}=this.viewModel;return O("div",{role:"button",tabIndex:0,bind:this,onclick:this._toggleFeatureMenu,onkeydown:this._toggleFeatureMenu,afterCreate:this._focusFeatureMenuButtonNode,afterUpdate:this._focusFeatureMenuButtonNode,class:M.featureMenuButton,"aria-haspopup":"true","aria-controls":t,"aria-expanded":e.toString(),"aria-label":i.menu,title:i.menu},O("calcite-icon",{icon:"list-bullet",scale:"s",class:M.featureMenuButtonIcon}),this._getPageText(o,n))}renderNavigationButtons(){return this.featureNavigationVisible?[this.renderPreviousButton(),this.renderNextButton(),this.renderNavigationLoading()||this.renderFeatureMenuButton()]:[]}renderDockIcon(){const{dockEnabled:e}=this,t=this._wouldDockTo(),i={[M.iconUndock]:e,[M.iconDock]:!e,[M.iconDockToRight]:!e&&("top-right"===t||"bottom-right"===t),[M.iconDockToLeft]:!e&&("top-left"===t||"bottom-left"===t),[M.iconDockToTop]:!e&&"top-center"===t,[M.iconDockToBottom]:!e&&"bottom-center"===t};return O("span",{"aria-hidden":"true",class:this.classes(i,M.icon)})}renderDockButton(){const{dockEnabled:e,messages:t}=this,i=this.viewModel?.view?.widthBreakpoint,o=e?t.undock:t.dock;return"xsmall"!==i&&this.dockOptions?.buttonEnabled?O("div",{role:"button","aria-label":o,title:o,tabIndex:0,bind:this,onclick:this._toggleDockEnabled,onkeydown:this._toggleDockEnabled,afterCreate:this._focusDockButtonNode,afterUpdate:this._focusDockButtonNode,class:this.classes(M.button,M.buttonDock)},this.renderDockIcon()):null}renderTitle(){const{title:e}=this.viewModel,{titleId:t,collapsible:i,contentCollapsed:o,messagesCommon:n}=this,s={[M.headerContainerButton]:i},r=O(A,{level:this.headingLevel,class:M.headerTitle,innerHTML:e??""}),l=i?O("button",{key:`${e}--collapsible`,id:t,title:o?n.expand:n.collapse,bind:this,enterAnimation:this._createFeatureUpdatedAnimation(),class:this.classes(M.headerContainer,s),"aria-expanded":o?"false":"true",onclick:this._toggleCollapsed,type:"button"},r,O("calcite-icon",{class:M.collapseIcon,key:"collapse-icon",icon:o?"chevron-down":"chevron-up",scale:"m"})):O("div",{key:e??"title",id:t,bind:this,enterAnimation:this._createFeatureUpdatedAnimation(),class:this.classes(M.headerContainer,s)},r);return e?l:null}renderCloseIcon(){return O("span",{"aria-hidden":"true",class:this.classes(M.icon,M.iconClose)})}renderCloseButton(){const{visibleElements:e,messagesCommon:t}=this;return e.closeButton?O("div",{role:"button",tabIndex:0,bind:this,onclick:this._close,onkeydown:this._close,class:M.button,"aria-label":t.close,title:t.close,afterCreate:this._closeButtonNodeUpdated,afterUpdate:this._closeButtonNodeUpdated},this.renderCloseIcon()):null}renderHeader(){return O("header",{class:M.header},this.renderTitle(),O("div",{class:M.headerButtons},this.renderDockButton(),this.renderCloseButton()))}renderContentContainer(){const{contentId:e,hasContent:t,contentCollapsed:i,_flowItems:o}=this,{content:n}=this.viewModel,s=o.toArray(),r={[M.contentHasFlows]:!!s.length};return t&&!i?O("div",{key:n??"content",enterAnimation:this._createFeatureUpdatedAnimation(),id:e,class:this.classes(M.content,r)},O("calcite-flow",{bind:this},O("calcite-flow-item",{bind:this,"data-node-ref":"_rootFlowItemNode",afterCreate:x,key:"root-flow-item",onCalciteFlowItemBack:this._handleBackClick},this.renderContent()),s.map((e=>this.renderFlowItem(e)))),s.map((e=>this.renderFlowItemTooltips(e)))):null}renderFlowItem(e){const{messages:t}=this,i=B(),o="graphic"in e&&!e.isTable;return O("calcite-flow-item",{bind:this,class:this.classes({[M.calciteThemeDark]:!i,[M.calciteThemeLight]:i}),heading:e.title??"",description:this._getFlowItemDescription(e),onCalciteFlowItemBack:this._handleBackClick,key:`flow-item-${e.viewModel.uid}`},O("calcite-action",{class:M.actionExit,icon:"move-up",label:t?.exitRelatedRecords,text:t?.exitRelatedRecords,slot:"header-actions-start",bind:this,afterCreate:t=>this._storeExitRelatedRecordsAction(e,t),onclick:this._destroyFlowItemWidgets}),o?O("calcite-action",{class:M.actionSelectFeature,icon:"zoom-to-object",label:t?.selectFeature,text:t?.selectFeature,slot:"header-actions-end",bind:this,afterCreate:t=>this._storeFeatureSelectionAction(e,t),onclick:()=>this._handleOpenRelatedFeature(e)}):null,O("div",{class:this.classes(M.contentFlowItem,{[M.calciteThemeDark]:i,[M.calciteThemeLight]:!i})},e.render()))}renderFlowItemTooltips(e){const{messages:t,_exitRelatedRecordsActions:i,_featureSelectionActions:o}=this,n=B(),s=o.get(e);return[O("calcite-tooltip",{class:this.classes({[M.calciteThemeDark]:!n,[M.calciteThemeLight]:n}),key:`exit-related-records-tooltip-${e.viewModel.uid}`,label:t?.exitRelatedRecords,overlayPositioning:"fixed",referenceElement:i.get(e),placement:"top"},t?.exitRelatedRecords),s?O("calcite-tooltip",{class:this.classes({[M.calciteThemeDark]:!n,[M.calciteThemeLight]:n}),key:`select-related-record-tooltip-${e.viewModel.uid}`,label:t?.selectFeature,overlayPositioning:"fixed",referenceElement:s,placement:"top"},t?.selectFeature):null]}renderActionsMenuButton(){const{actionsMenuId:e,actionsMenuButtonId:t,actionsMenuOpen:i,dividedActions:o,messagesCommon:n}=this,s=i?n.close:n.open,{menuActions:r}=o;return r.length?O("div",{key:V("actions-menu-button"),class:this.classes(M.button,M.actionsMenuButton),role:"button",id:t,"aria-haspopup":"true","aria-controls":i?e:null,tabIndex:0,bind:this,onclick:this._toggleActionsMenu,onkeydown:this._toggleActionsMenu,afterCreate:this._focusActionsMenuButtonNode,afterUpdate:this._focusActionsMenuButtonNode,"aria-label":s,title:s},O("span",{"aria-hidden":"true",class:M.iconActionsMenu})):null}renderMenuActions(){const{actionsMenuId:e,actionsMenuButtonId:t,actionsMenuOpen:i,dividedActions:o}=this,{menuActions:n}=o;return n.length&&i?O("ul",{id:e,role:"menu","aria-labelledby":t,key:V("actions"),class:M.actions,bind:this,onkeyup:this._handleActionMenuKeyup,afterCreate:this._actionsMenuNodeUpdated,afterUpdate:this._actionsMenuNodeUpdated},n.toArray().map((e=>this.renderAction({action:e,type:"menu-item"})))):null}renderInlineActions(){const{inlineActions:e}=this.dividedActions;return e.length?e.toArray().map((e=>this.renderAction({action:e,type:"inline"}))):[]}renderInlineActionsContainer(){const{inlineActions:e,menuActions:t}=this.dividedActions,i=!!e.length,o=!!t.length;return i||o?O("div",{key:"inline-actions-container","data-inline-actions":i.toString(),"data-menu-actions":o.toString(),class:M.inlineActionsContainer},this.renderInlineActions(),this.renderActionsMenuButton(),this.renderMenuActions()):null}renderNavigation(){return this.featureNavigationVisible?O("section",{key:V("navigation"),class:this.classes(M.navigation)},this.renderNavigationButtons()):null}renderFooter(){const{featureNavigationVisible:e,dividedActions:t}=this,{inlineActions:i,menuActions:o}=t,n=!!i.length,s=!!o.length,r={[M.footerHasPagination]:e,[M.footerHasActions]:n,[M.footerHasActionsMenu]:s};return e||n?O("div",{key:V("feature-buttons"),class:this.classes(M.footer,r)},this.renderInlineActionsContainer(),this.renderNavigation()):null}renderFeatureMenuContainer(){const{messages:e}=this,{featureViewModels:t,isLoadingFeature:i}=this.viewModel,o=P(e.selectedFeatures,{total:t.length});return O("section",{key:V("menu"),class:M.featureMenu},O("strong",{class:M.featureMenuHeader},o),O("nav",{bind:this,class:M.featureMenuViewport,"data-node-ref":"_featureMenuViewportNode",afterCreate:x},this.renderFeatureMenu(),O("div",{class:M.featureMenuObserver,bind:this,afterCreate:this._featureMenuIntersectionObserverCreated}),i?O("div",{class:M.featureMenuLoader},this.renderLoadingIcon()):null))}renderPointer(){return this.dockEnabled?null:O("div",{key:V("pointer"),class:M.pointer,role:"presentation"},O("div",{class:this.classes(M.pointerDirection,M.shadow)}))}renderMainContainer(){const{dockEnabled:e,currentAlignment:t,currentDockPosition:i,titleId:o,contentId:n,collapsible:s,hasContent:r,contentCollapsed:l,visibleElements:a}=this,{title:c}=this.viewModel,u="bottom-left"===t||"bottom-center"===t||"bottom-right"===t||"top-left"===i||"top-center"===i||"top-right"===i,d="top-left"===t||"top-center"===t||"top-right"===t||"bottom-left"===i||"bottom-center"===i||"bottom-right"===i,h={[M.shadow]:e,[M.isCollapsible]:s,[M.isCollapsed]:l};return O("div",{class:this.classes(M.main,M.widget,h),tabIndex:a.closeButton?void 0:-1,role:"dialog","aria-live":"polite","aria-labelledby":c?o:"","aria-describedby":r&&!l?n:"",bind:this,onkeyup:this._handleMainKeyup,afterCreate:this._mainContainerNodeUpdated,afterUpdate:this._mainContainerNodeUpdated},u?this.renderFooter():null,u?this.renderFeatureMenuContainer():null,this.renderHeader(),this.renderContentContainer(),d?this.renderFooter():null,d?this.renderFeatureMenuContainer():null)}renderContent(){const e=this.viewModel?.content;return e?"string"==typeof e?O("div",{class:_.contentNode,key:e,innerHTML:e}):this.renderNodeContent(e):null}renderActionText(e){return O("span",{key:"text",class:M.actionText},e)}renderActionCalciteIcon(e,t){return O("calcite-icon",{scale:"s",key:`calcite-icon-${t}`,icon:e,class:M.icon})}renderActionIcon(e){const t=this._getActionClass(e),i=this._getActionImage(e),o={[M.iconLoading]:e.active,[M.rotating]:e.active,[M.icon]:!!t,[M.actionImage]:!e.active&&!!i};return t&&(o[t]=!e.active),O("span",{key:"icon","aria-hidden":"true",class:this.classes(M.icon,o),styles:this._getIconStyles(i)})}renderAction(e){const{action:t,type:i}=e,o=this._getActionTitle(t),n={[M.action]:"toggle"!==t.type,[M.actionToggle]:"toggle"===t.type,[M.actionToggleOn]:"toggle"===t.type&&t.value,[M.buttonDisabled]:t.disabled},s=[t.icon&&!t.active?this.renderActionCalciteIcon(t.icon,t.uid):this.renderActionIcon(t),this.renderActionText(o)],r="menu-item"===i?O("li",{key:t.uid,role:"menuitem",tabIndex:0,title:o,"aria-label":o,class:this.classes(M.button,n),onkeyup:this._handleActionMenuItemKeyup,bind:this,"data-action-uid":t.uid,onclick:this._triggerAction,onkeydown:this._triggerAction},s):O("div",{key:t.uid,role:"button",tabIndex:0,title:o,"aria-label":o,class:this.classes(M.button,n),onkeyup:this._handleActionMenuItemKeyup,bind:this,"data-action-uid":t.uid,onclick:this._triggerAction,onkeydown:this._triggerAction},s);return t.visible?r:null}renderFeatureMenuItem(e,t){const{messages:i,messagesCommon:o}=this,{selectedFeatureIndex:n,selectedFeatureViewModel:s}=this.viewModel,r=e===s,l={[M.featureMenuSelected]:r},a=r?O("span",{key:V(`feature-menu-selected-feature-${n}`),title:i.selectedFeature,"aria-label":i.selectedFeature,class:M.iconCheckMark}):null,c=O("span",{innerHTML:e.title||o.untitled});return O("li",{role:"menuitem",tabIndex:-1,key:V(`feature-menu-feature-${n}`),class:this.classes(l,M.featureMenuItem),bind:this,"data-feature-index":t,onblur:this._removeActiveFeature,onfocus:this._setActiveFeature,onkeyup:this._handleFeatureMenuItemKeyup,onclick:this._selectFeature,onkeydown:this._selectFeature,onmouseover:this._setActiveFeature,onmouseleave:this._removeActiveFeature},O("span",{class:M.featureMenuTitle},c,a))}renderFeatureMenu(){const{featureMenuId:e}=this,{featureViewModels:t}=this.viewModel;return t.length>1?O("ol",{class:M.featureMenuList,id:e,bind:this,afterCreate:this._featureMenuNodeUpdated,afterUpdate:this._featureMenuNodeUpdated,onkeyup:this._handleFeatureMenuKeyup,role:"menu"},t.filter((e=>!!e.graphic)).map(((e,t)=>this.renderFeatureMenuItem(e,t)))):null}_storeFeatureSelectionAction(e,t){this._featureSelectionActions.set(e,t),this.scheduleRender()}_storeExitRelatedRecordsAction(e,t){this._exitRelatedRecordsActions.set(e,t),this.scheduleRender()}_getFlowItemDescription(e){return"featureCountDescription"in e?e.featureCountDescription:e.viewModel.description??""}async _openRelatedFeature(e){await e.viewModel.updateGeometry();const t=e.graphic,i=t?.geometry;if(null==i||null==t)return;this._destroyFlowItemWidgets(),await this.viewModel.zoomTo({target:i});const o=b(i);this.open({features:[t],location:null!=o?o:void 0})}_destroyFlowItemWidgets(){this._flowItems.removeAll().forEach((e=>{"showAllEnabled"in e.viewModel&&(e.viewModel.showAllEnabled=!1),e.viewModel=null,e.destroy()}))}_handleBackClick(){const e=this._flowItems.pop();e&&(this._exitRelatedRecordsActions.delete(e),this._featureSelectionActions.delete(e),"showAllEnabled"in e.viewModel&&(e.viewModel.showAllEnabled=!1),e&&(e.viewModel=null,e.destroy()))}_getActionTitle(e){const{messages:t,selectedFeature:i,messagesCommon:o}=this,{id:n}=e,s=i?.attributes,r=e.title??"",l="zoom-to-feature"===n?P(r,{messages:t}):"remove-selected-feature"===n?P(r,{messages:o}):"zoom-to-clustered-features"===n||"browse-clustered-features"===n?P(r,{messages:t}):e.title;return l&&s?P(l,s):l??""}_getActionClass(e){const{selectedFeature:t}=this,i=t?.attributes,{className:o,image:n}=e,s=n||o?o:M.iconDefaultAction;return s&&i?P(s,i):s??""}_getActionImage(e){if(e.active)return"";const{selectedFeature:t}=this,i=t?.attributes,{image:o}=e;return o&&i?P(o,i):o??""}_createFeatureUpdatedAnimation(){return E("enter",M.hasFeatureUpdated)}_getInlineActionCount(){const{maxInlineActions:e,featureNavigationVisible:t}=this;if("number"!=typeof e)return null;const i=Math.round(e);return Math.max(t?i-1:i,0)}_watchActions(){const{allActions:e}=this.viewModel;this.notifyChange("dividedActions");const t="actions";this._handles.remove(t),e&&e.forEach((e=>{this._handles.add(r((()=>[e.uid,e.active,e.className,e.disabled,e.id,e.title,e.image,e.visible]),(()=>this.scheduleRender())),t)}))}_divideActions(){const{allActions:e}=this.viewModel,i=e.filter((e=>e.visible)),o=this._getInlineActionCount(),n=null===o,s=0===o;return{inlineActions:n?i.slice(0):s?new t:i.slice(0,o),menuActions:n?new t:s?i.slice(0):i.slice(o)}}_featureMenuOpenChanged(e){e?this._focusFirstFeature=!0:this._focusFeatureMenuButton=!0}_actionsMenuOpenChanged(e){e?this._focusFirstAction=!0:this._focusActionsMenuButton=!0}_setTitleFromFeatureWidget(){const{selectedFeatureWidget:e,messagesCommon:t}=this;e&&(this.viewModel.title="error"===e.viewModel?.state?t.errorMessage:e.viewModel?.title||"")}_setContentFromFeatureWidget(){const{selectedFeatureWidget:e}=this;e&&(this.viewModel.content=e)}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){this._unobserveFeatureMenuObserver(),this._featureMenuIntersectionObserver.observe(e),this._featureMenuIntersectionObserverNode=e}_handleFeatureMenuKeyup(e){"Escape"===o(e)&&(e.stopPropagation(),this._focusFeatureMenuButton=!0,this.featureMenuOpen=!1,this.scheduleRender())}_handleActionMenuKeyup(e){"Escape"===o(e)&&(e.stopPropagation(),this._focusActionsMenuButton=!0,this.actionsMenuOpen=!1,this.scheduleRender())}_setActiveFeature(e){const{viewModel:t}=this,i=W(e.currentTarget);t.activeFeature=t.features[i]||null}_removeActiveFeature(){this.viewModel.activeFeature=null}_handleFeatureMenuItemKeyup(e){const t=o(e),{_featureMenuNode:i}=this,n=W(e.currentTarget);if(!i)return;const s=i.querySelectorAll("li"),r=s.length;if("ArrowUp"!==t)if("ArrowDown"!==t)if("Home"!==t)if("End"!==t);else{e.stopPropagation();s[s.length-1].focus()}else{e.stopPropagation();s[0].focus()}else{e.stopPropagation();s[(n+1+r)%r].focus()}else{e.stopPropagation();s[(n-1+r)%r].focus()}}_handleActionMenuItemKeyup(e){const t=o(e),{_actionsMenuNode:i}=this,n=e.currentTarget.dataset.actionUid,{menuActions:s}=this.dividedActions,r=s.findIndex((e=>e.uid===n));if(!i)return;const l=i.querySelectorAll("li"),a=l.length;if("ArrowUp"!==t)if("ArrowDown"!==t)if("Home"!==t)if("End"!==t);else{e.stopPropagation();l[l.length-1].focus()}else{e.stopPropagation();l[0].focus()}else{e.stopPropagation();l[(r+1+a)%a].focus()}else{e.stopPropagation();l[(r-1+a)%a].focus()}}_handleMainKeyup(e){const t=o(e);"ArrowLeft"===t&&(e.stopPropagation(),this.previous()),"ArrowRight"===t&&(e.stopPropagation(),this.next())}_spinnerEnabledChange(e){if(this._destroySpinner(),!e)return;const t=this.get("viewModel.view");this._createSpinner(t)}_hideSpinner(){const{_spinner:e}=this;e&&(e.location=null,e.hide())}_displaySpinner(){const{_spinner:e}=this;if(!e)return;const{location:t,waitingForResult:i}=this.viewModel;i&&t?e.show({location:t}):e.hide()}_getIconStyles(e){return{"background-image":e?`url(${e})`:""}}async _shouldFocus(e){e?.shouldFocus&&(await c((()=>!0===this.viewModel?.active)),this.focus())}_addSelectedFeatureIndexHandle(){const e=r((()=>this.viewModel?.selectedFeatureIndex),((e,t)=>this._selectedFeatureIndexUpdated(e,t)));this._handles.add(e,T)}_selectedFeatureIndexUpdated(e,t){const{featureCount:i}=this;i&&e!==t&&-1!==e&&(this._destroyFlowItemWidgets(),this.actionsMenuOpen=!1,this.featureMenuOpen=!1,this._mainContainerNode&&(this._mainContainerNode.scrollTop=0),this._rootFlowItemNode&&this._rootFlowItemNode.scrollContentTo({top:0}))}_destroySelectedFeatureWidget(){const{_feature:e}=this;e&&(e.viewModel=null,e&&!e.destroyed&&e.destroy()),this._feature=null}_isScreenLocationWithinView(e,t){return e.x>-1&&e.y>-1&&e.x<=t.width&&e.y<=t.height}_isOutsideView(e){const{popupHeight:t,popupWidth:i,screenLocation:o,side:n,view:s}=e;if(isNaN(i)||isNaN(t)||!s||!o)return!1;const r=s.padding;return"right"===n&&o.x+i/2>s.width-r.right||("left"===n&&o.x-i/2<r.left||("top"===n&&o.y-t<r.top||"bottom"===n&&o.y+t>s.height-r.bottom))}_calculateAutoAlignment(e){if("auto"!==e)return e;const{_pointerOffsetInPx:t,_containerNode:i,_mainContainerNode:o,viewModel:n}=this,{screenLocation:s,view:r}=n;if(null==s||!r||!i)return"top-center";if(!this._isScreenLocationWithinView(s,r))return this._get("currentAlignment")||"top-center";function l(e){return parseInt(e.replaceAll(/[^-\d\.]/g,""),10)}const a=o?window.getComputedStyle(o,null):null,c=a?l(a.getPropertyValue("max-height")):0,u=a?l(a.getPropertyValue("height")):0,{height:d,width:h}=i.getBoundingClientRect(),p=h+t,g=Math.max(d,c,u)+t,m=this._isOutsideView({popupHeight:g,popupWidth:p,screenLocation:s,side:"right",view:r}),v=this._isOutsideView({popupHeight:g,popupWidth:p,screenLocation:s,side:"left",view:r}),f=this._isOutsideView({popupHeight:g,popupWidth:p,screenLocation:s,side:"top",view:r}),_=this._isOutsideView({popupHeight:g,popupWidth:p,screenLocation:s,side:"bottom",view:r});return v?f?"bottom-right":"top-right":m?f?"bottom-left":"top-left":f?_?"top-center":"bottom-center":"top-center"}_callCurrentAlignment(e){return"function"==typeof e?e.call(this):e}_getCurrentAlignment(){const{alignment:e,dockEnabled:t}=this;return t||!this.viewModel.active?null:this._calculatePositionResult(this._calculateAutoAlignment(this._callCurrentAlignment(e)))}_setCurrentAlignment(){this._set("currentAlignment",this._getCurrentAlignment())}_setCurrentDockPosition(){this._set("currentDockPosition",this._getCurrentDockPosition())}_calculatePositionResult(e){const t=["left","right"];return N(this.container)&&t.reverse(),e?.replace(/leading/gi,t[0]).replaceAll(/trailing/gi,t[1])}_callDockPosition(e){return"function"==typeof e?e.call(this):e}_getDockPosition(){return this._calculatePositionResult(this._calculateAutoDockPosition(this._callDockPosition(this.dockOptions?.position)))}_getCurrentDockPosition(){return this.dockEnabled&&this.viewModel.active?this._getDockPosition():null}_wouldDockTo(){return this.dockEnabled?null:this._getDockPosition()}_calculateAutoDockPosition(e){if("auto"!==e)return e;const t=this.viewModel?.view,i=N(this.container)?"top-left":"top-right";if(!t)return i;const o=t.padding||{left:0,right:0,top:0,bottom:0},n=t.width-o.left-o.right,{breakpoints:s}=t;return s&&n<=s.xsmall?"bottom-center":i}_positionContainer(e=this._containerNode){if(e&&(this._containerNode=e),!this._containerNode)return;const{screenLocation:t}=this.viewModel,{width:i}=this._containerNode.getBoundingClientRect(),o=this._calculatePositionStyle(t,i);o&&Object.assign(this._containerNode.style,o)}_calculateFullWidth(e){const{currentAlignment:t,_pointerOffsetInPx:i}=this;return"top-left"===t||"bottom-left"===t||"top-right"===t||"bottom-right"===t?e+i:e}_calculateAlignmentPosition(e,t,i,o){const{currentAlignment:n,_pointerOffsetInPx:s}=this;if(!i)return;const{padding:r}=i,l=o/2,a=i.height-t,c=i.width-e;return"bottom-center"===n?{top:t+s-r.top,left:e-l-r.left}:"top-left"===n?{bottom:a+s-r.bottom,right:c+s-r.right}:"bottom-left"===n?{top:t+s-r.top,right:c+s-r.right}:"top-right"===n?{bottom:a+s-r.bottom,left:e+s-r.left}:"bottom-right"===n?{top:t+s-r.top,left:e+s-r.left}:"top-center"===n?{bottom:a+s-r.bottom,left:e-l-r.left}:void 0}_calculatePositionStyle(e,t){const{dockEnabled:i,view:o}=this;if(!o)return;if(i)return{left:"",top:"",right:"",bottom:""};if(null==e||!t)return;const n=this._calculateFullWidth(t),s=this._calculateAlignmentPosition(e.x,e.y,o,n);return s?{top:void 0!==s.top?`${s.top}px`:"auto",left:void 0!==s.left?`${s.left}px`:"auto",bottom:void 0!==s.bottom?`${s.bottom}px`:"auto",right:void 0!==s.right?`${s.right}px`:"auto"}:void 0}_viewChange(e,t){e&&t&&(this.close(),this.clear())}_viewReadyChange(e,t){if(e){const e=this.get("viewModel.view");this._wireUpView(e)}else t&&(this.close(),this.clear())}_wireUpView(e){if(this._destroySpinner(),!e)return;const{spinnerEnabled:t}=this;t&&this._createSpinner(e),this._setDockEnabledForViewSize(this.dockOptions)}_dockingThresholdCrossed(e,t,i){const[o,n]=e,[s,r]=t,{width:l=0,height:a=0}=i??{};return o<=l&&s>l||o>l&&s<=l||n<=a&&r>a||n>a&&r<=a}_updateDockEnabledForViewSize(e,t){if(!e||!t)return;const i=this.get("viewModel.view.padding")||{left:0,right:0,top:0,bottom:0},o=i.left+i.right,n=i.top+i.bottom,s=[],r=[];s[0]=e[0]-o,s[1]=e[1]-n,r[0]=t[0]-o,r[1]=t[1]-n;const{dockOptions:l}=this,a=l.breakpoint;this._dockingThresholdCrossed(s,r,a)&&this._setDockEnabledForViewSize(l),this._setCurrentDockPosition()}_focusDockButtonNode(e){this._focusDockButton&&(this._focusDockButton=!1,e.focus())}_closeButtonNodeUpdated(e){return this._focusClose?(this._focusClose=!1,void e.focus()):this._blurClose?(this._blurClose=!1,void e.blur()):void 0}_mainContainerNodeUpdated(e){return this._mainContainerNode=e,this._focusContainer?(this._focusContainer=!1,void e.focus()):this._blurContainer?(this._blurContainer=!1,void e.blur()):void 0}_featureMenuNodeUpdated(e){if(this._featureMenuNode=e,!e||!this._focusFirstFeature)return;this._focusFirstFeature=!1;const t=e.querySelectorAll("li");if(t.length){t[0].focus()}}_actionsMenuNodeUpdated(e){if(this._actionsMenuNode=e,!e||!this._focusFirstAction)return;this._focusFirstAction=!1;const t=e.querySelectorAll("li");if(t.length){t[0].focus()}}_focusFeatureMenuButtonNode(e){this._focusFeatureMenuButton&&(this._focusFeatureMenuButton=!1,e.focus())}_focusActionsMenuButtonNode(e){this._focusActionsMenuButton&&(this._focusActionsMenuButton=!1,e.focus())}_featureMenuViewportScrollTop(){this._featureMenuViewportNode&&(this._featureMenuViewportNode.scrollTop=0)}_toggleScreenLocationEnabled(){const{dockEnabled:e,viewModel:t}=this;if(!t)return;const i=t.active&&!e;t.screenLocationEnabled=i}_shouldDockAtCurrentViewSize(e){const t=e.breakpoint,i=this.viewModel?.view?.ui;if(!i)return!1;const{width:o,height:n}=i;if(isNaN(o)||isNaN(n))return!1;if(!t)return!1;const s=t.hasOwnProperty("width")&&o<=(t.width??0),r=t.hasOwnProperty("height")&&n<=(t.height??0);return s||r}_setDockEnabledForViewSize(e){e.breakpoint&&(this.dockEnabled=this._shouldDockAtCurrentViewSize(e))}_getPageText(e,t){return this.featureNavigationVisible?P(this.messages.pageText,{index:t+1,total:e}):null}_destroySpinner(){this._spinner&&(this.view?.ui?.remove(this._spinner,S),this._spinner.destroy(),this._spinner=null)}_createSpinner(e){e&&(this._spinner=new v({view:e}),e.ui.add(this._spinner,{key:S,position:"manual",internal:!0}))}_toggleCollapsed(){this.collapsed=!this.collapsed}_close(){this.close(),this.view&&this.view.focus()}_toggleDockEnabled(){this.dockEnabled=!this.dockEnabled,this._focusDockButton=!0,this.scheduleRender()}_toggleFeatureMenu(){const e=!this.featureMenuOpen;this._featureMenuOpenChanged(e),this.actionsMenuOpen=!1,this.featureMenuOpen=e}_toggleActionsMenu(){const e=!this.actionsMenuOpen;this._actionsMenuOpenChanged(e),this.featureMenuOpen=!1,this.actionsMenuOpen=e}_triggerAction(e){const t=e.currentTarget.dataset.actionUid,{allActions:i}=this.viewModel,o=i.findIndex((e=>e.uid===t)),n=i.at(o);n&&"toggle"===n.type&&(n.value=!n.value),this.actionsMenuOpen=!1,this.viewModel.triggerAction(o)}_selectFeature(e){const t=W(e.currentTarget);null==t||isNaN(t)||(this.viewModel.selectedFeatureIndex=t),this.featureMenuOpen=!1,this._focusFeatureMenuButton=!0,this.scheduleRender()}_next(){this.next()}_previous(){this.previous()}};function W(e){return e?.["data-feature-index"]}e([h({readOnly:!0})],U.prototype,"actionsMenuId",null),e([h({readOnly:!0})],U.prototype,"actionsMenuButtonId",null),e([h({readOnly:!0})],U.prototype,"featureMenuId",null),e([h({readOnly:!0})],U.prototype,"titleId",null),e([h({readOnly:!0})],U.prototype,"contentId",null),e([h({readOnly:!0})],U.prototype,"hasContent",null),e([h({readOnly:!0})],U.prototype,"featureNavigationVisible",null),e([h({readOnly:!0})],U.prototype,"collapsible",null),e([h({readOnly:!0})],U.prototype,"featureMenuVisible",null),e([h({readOnly:!0})],U.prototype,"contentCollapsed",null),e([h({readOnly:!0})],U.prototype,"dividedActions",null),e([h({readOnly:!0,dependsOn:["_flowItems.length"]})],U.prototype,"_activeFlowItemWidget",null),e([h()],U.prototype,"actions",null),e([h()],U.prototype,"actionsMenuOpen",null),e([h()],U.prototype,"alignment",void 0),e([h()],U.prototype,"autoCloseEnabled",null),e([h()],U.prototype,"autoOpenEnabled",null),e([h()],U.prototype,"defaultPopupTemplateEnabled",null),e([h()],U.prototype,"content",null),e([h()],U.prototype,"collapsed",void 0),e([h()],U.prototype,"collapseEnabled",void 0),e([h({readOnly:!0})],U.prototype,"currentAlignment",null),e([h({readOnly:!0})],U.prototype,"currentDockPosition",null),e([h()],U.prototype,"dockOptions",null),e([h()],U.prototype,"dockEnabled",void 0),e([h({readOnly:!0})],U.prototype,"featureCount",null),e([h()],U.prototype,"featureMenuOpen",null),e([h()],U.prototype,"features",null),e([h()],U.prototype,"goToOverride",null),e([h()],U.prototype,"headingLevel",void 0),e([h()],U.prototype,"highlightEnabled",null),e([h()],U.prototype,"location",null),e([h()],U.prototype,"label",null),e([h()],U.prototype,"maxInlineActions",void 0),e([h(),C("esri/widgets/Popup/t9n/Popup")],U.prototype,"messages",void 0),e([h(),C("esri/t9n/common")],U.prototype,"messagesCommon",void 0),e([h()],U.prototype,"promises",null),e([h({readOnly:!0})],U.prototype,"selectedFeature",null),e([h()],U.prototype,"selectedFeatureIndex",null),e([h({readOnly:!0})],U.prototype,"selectedFeatureWidget",null),e([h()],U.prototype,"spinnerEnabled",void 0),e([h()],U.prototype,"title",null),e([h()],U.prototype,"updateLocationEnabled",null),e([h()],U.prototype,"view",null),e([h({type:y}),I(["triggerAction","trigger-action"])],U.prototype,"viewModel",void 0),e([h()],U.prototype,"visible",null),e([h()],U.prototype,"visibleElements",void 0),e([p("visibleElements")],U.prototype,"castVisibleElements",null),e([F()],U.prototype,"_close",null),e([F()],U.prototype,"_toggleDockEnabled",null),e([F()],U.prototype,"_toggleFeatureMenu",null),e([F()],U.prototype,"_toggleActionsMenu",null),e([F()],U.prototype,"_triggerAction",null),e([F()],U.prototype,"_selectFeature",null),e([F()],U.prototype,"_next",null),e([F()],U.prototype,"_previous",null),U=e([g("esri.widgets.Popup")],U);const H=U;export{H as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../chunks/tslib.es6.js";import"../../intl.js";import e from"../../core/Accessor.js";import i from"../../core/Collection.js";import r from"../../core/Error.js";import{HandleOwnerMixin as s}from"../../core/HandleOwner.js";import{watch as
|
|
5
|
+
import{_ as t}from"../../chunks/tslib.es6.js";import"../../intl.js";import e from"../../core/Accessor.js";import i from"../../core/Collection.js";import r from"../../core/Error.js";import{HandleOwnerMixin as s}from"../../core/HandleOwner.js";import o from"../../core/Logger.js";import{watch as a,on as n}from"../../core/reactiveUtils.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import"../../core/arrayUtils.js";import"../../core/has.js";import{subclass as d}from"../../core/accessorSupport/decorators/subclass.js";import y from"../../geometry/Extent.js";import{isFeatureLayer as c}from"../../layers/support/layerUtils.js";import h from"../../rest/networks/support/ValidateNetworkTopologyParameters.js";import{onLocaleChange as p}from"../../intl/locale.js";import{fetchMessageBundle as w}from"../../intl/messages.js";const m={noDirtyAreasInExtent:-2147208940,noUtilityNetworkExtension:-2147208474,cannotAcquireVersionLock_v10:-2147217146,cannotAcquireVersionLock_v11:-2147220947};let u=class extends(s(e)){constructor(t){super(t),this._activeOperationDidSucceed=!1,this._initialValidationsFinished=!1,this._dirtyAreasLayer=null,this._noViewPropertyErrorMessage="Property 'view' is missing on UtilityNetworkValidateTopologyViewModel.",this._validView=!1,this.executionError="",this.extentToValidate="current",this.loadErrors=new i}initialize(){const t=async()=>{this.messages||(this.messages=await w("esri/widgets/UtilityNetworkValidateTopology/t9n/UtilityNetworkValidateTopology"))};t().then((()=>{this.view||(this.view=null),this.utilityNetwork||(this.utilityNetwork=null),this.addHandles([a((()=>[this.view,this.utilityNetwork]),(async()=>{const{loadErrors:t,messages:e}=this,i=e.info;if(this._initialValidationsFinished=!1,t.removeAll(),this._validView=!0,this._dirtyAreasLayer=null,this.view&&"2d"===this.view.type||(this._validView=!1,o.getLogger(this).error(new r("validateNetworkTopology:missing-property",this._noViewPropertyErrorMessage))),this.utilityNetwork&&"utility"===this.utilityNetwork.type){this.utilityNetwork.loaded||await this.utilityNetwork.load(),await this._checkUtilityNetworkExtension();const e=1===t.length&&this.loadErrors.find((t=>t===i.noUtilityNetworkServiceUserTypeExtension));t.length&&!e||this._setDirtyAreasLayer(),this._validView&&(this._initialValidationsFinished=!0)}else this.loadErrors.push(i.noUtilityNetwork)}),{initial:!0}),n((()=>this.view?.map?.layers),"change",(()=>{const{loadErrors:t,messages:e}=this,i=e.info,r=t.find((t=>t===i.noUtilityNetwork)),s=t.find((t=>t===i.noUtilityNetworkServiceUserTypeExtension));this._initialValidationsFinished=!1,r||(t.removeAll(),s&&t.push(i.noUtilityNetworkServiceUserTypeExtension),this._setDirtyAreasLayer()),this._validView&&(this._initialValidationsFinished=!0)})),p(t)])}))}get state(){return this.loadErrors.length?"disabled":this.executionError?"failed":this.updatingHandles.updating?"executing":this._activeOperationDidSucceed?"success":this._initialValidationsFinished?"ready":"loading"}set utilityNetwork(t){this._get("utilityNetwork")!==t&&this._set("utilityNetwork",t)}set view(t){this._get("view")!==t&&this._set("view",t)}async validateTopology(){const{messages:t,utilityNetwork:e,view:i}=this;if(!this.loadErrors.length){let s;this._activeOperationDidSucceed=!1,this._set("executionError",""),s="current"===this.extentToValidate?{xmin:i?.extent.xmin,ymin:i?.extent.ymin,xmax:i?.extent.xmax,ymax:i?.extent.ymax,spatialReference:{wkid:i?.spatialReference.wkid,latestWkid:i?.spatialReference.latestWkid}}:{xmin:e?.fullExtent?.xmin,ymin:e?.fullExtent?.ymin,xmax:e?.fullExtent?.xmax,ymax:e?.fullExtent?.ymax,spatialReference:{wkid:e?.spatialReference.wkid,latestWkid:e?.spatialReference.latestWkid}},this.updatingHandles.addPromise(e?.validateTopology(new h({gdbVersion:this._dirtyAreasLayer.gdbVersion,validateArea:new y(s)})).then((()=>{this._activeOperationDidSucceed=!0}),(e=>{let i="Error: "+e;e instanceof r&&e.details&&e.details.raw&&(e.details.raw.extendedCode===m.noDirtyAreasInExtent?i=t.info.noDirtyAreasInExtent:e.details.raw.extendedCode!==m.cannotAcquireVersionLock_v10&&e.details.raw.extendedCode!==m.cannotAcquireVersionLock_v11||(i=t.info.cannotAcquireVersionLock)),this._set("executionError",i)})))}}_setDirtyAreasLayer(){const t=this.view?.map.layers;if(t){const e=t.items.filter((t=>c(t))).find((t=>t.parsedUrl?.path===this.utilityNetwork?.networkSystemLayers.dirtyAreasLayerUrl));e?this._dirtyAreasLayer=e:this.loadErrors.push(this.messages.info.noDirtyAreasLayer)}}async _checkUtilityNetworkExtension(){await(this.utilityNetwork?.queryNamedTraceConfigurations({globalIds:["{AAAAAAAA-AAAA-AAAA-AAAA-AAAAAAAAAAAA}"]}).catch((t=>{t.details.raw.extendedCode===m.noUtilityNetworkExtension?this.loadErrors.push(this.messages.info.noUtilityNetworkServiceUserTypeExtension):this.loadErrors.push(t.message)})))}};t([l()],u.prototype,"_initialValidationsFinished",void 0),t([l()],u.prototype,"_dirtyAreasLayer",void 0),t([l({readOnly:!0})],u.prototype,"executionError",void 0),t([l()],u.prototype,"extentToValidate",void 0),t([l()],u.prototype,"loadErrors",void 0),t([l()],u.prototype,"messages",void 0),t([l({readOnly:!0})],u.prototype,"state",null),t([l()],u.prototype,"utilityNetwork",null),t([l()],u.prototype,"view",null),u=t([d("esri.widgets.UtilityNetworkValidateTopology.UtilityNetworkValidateTopologyViewModel")],u);const A=u;export{A as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.27/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../config.js";import t from"../../core/Error.js";import has from"../../core/has.js";import
|
|
5
|
+
import e from"../../config.js";import t from"../../core/Error.js";import has from"../../core/has.js";import o from"../../core/Logger.js";import r from"../../geometry/Point.js";import{geographicToWebMercator as i}from"../../geometry/support/webMercatorUtils.js";import n from"../../portal/Portal.js";import{project as c}from"../../rest/geometryService/project.js";import s from"../../rest/support/ProjectParameters.js";const u=o.getLogger("esri.widgets.support.geolocationUtils"),a={maximumAge:0,timeout:15e3,enableHighAccuracy:!0};function m(){const e=has("esri-geolocation");return e||u.warn("geolocation-unsupported","Geolocation unsupported."),e}function l(){const e=window.isSecureContext;return e||u.warn("insecure-context","Geolocation requires a secure origin."),e}function g(){return m()&&l()}function p(e){const o=15e3;return e||(e=a),new Promise(((r,i)=>{setTimeout((()=>i(new t("geolocation:timeout","getting the current geolocation position timed out"))),o),navigator.geolocation.getCurrentPosition(r,i,e??void 0)}))}let d;function f(e,o){if(d)return d(e,o);const{position:r,view:i}=e,n=v(r),c=n?.coords;if(!c)throw new t("geometry-service:no-coords","Geolocation has no coordinates");return h(y(c),i,o)}function w(e){d=e}function v(e){const t=e&&e.coords||{},o={accuracy:t.accuracy,altitude:t.altitude,altitudeAccuracy:t.altitudeAccuracy,heading:t.heading,latitude:t.latitude,longitude:t.longitude,speed:t.speed};return e?{coords:o,timestamp:e.timestamp}:e}function y({longitude:e,latitude:t,altitude:o}){return new r({longitude:e,latitude:t,z:o||void 0,spatialReference:{wkid:4326}})}function h(e,o,r){if(!o)return Promise.resolve(e);const n=o.spatialReference;return n.isWGS84?Promise.resolve(e):n.isWebMercator?Promise.resolve(i(e)):j(r).then((o=>{if(!o)throw new t("geometry-service:missing-url","Geometry service URL is missing");const i=new s({geometries:[e],outSpatialReference:n});return c(o,i,r).then((e=>e[0]))}))}function j(t){if(e.geometryServiceUrl)return Promise.resolve(e.geometryServiceUrl);const o=n.getDefault();return o.load(t).catch((()=>{})).then((()=>o.get("helperServices.geometry.url")))}export{p as getCurrentPosition,w as overridePositionToPoint,f as positionToPoint,g as supported};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2653],{84552:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),n=r(2368),s=r(96674),o=r(35463),a=r(5600),l=(r(75215),r(67676),r(80442),r(36030)),u=r(52011),p=r(78981);let c=class extends((0,n.J)(s.wq)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.rJ)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,l.J)(p.v,{nonNullable:!0})],c.prototype,"unit",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0},nonNullable:!0})],c.prototype,"value",void 0),c=(0,i._)([(0,u.j)("esri.TimeInterval")],c);const d=c},3920:(e,t,r)=>{r.d(t,{p:()=>u,r:()=>p});var i=r(43697),n=r(92036),s=r(61247),o=r(5600),a=r(52011),l=r(72762);const u=e=>{let t=class extends e{constructor(){super(...arguments),this._handles=new s.Z,this._updatingHandles=new l.t}destroy(){this.destroyed||(this._handles.destroy(),this._updatingHandles.destroy())}get handles(){return this._handles}get updatingHandles(){return this._updatingHandles}};return(0,i._)([(0,o.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,i._)([(0,o.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,i._)([(0,a.j)("esri.core.HandleOwner")],t),t};let p=class extends(u(n.Z)){};p=(0,i._)([(0,a.j)("esri.core.HandleOwner")],p)},72762:(e,t,r)=>{r.d(t,{t:()=>c});var i=r(43697),n=r(92036),s=r(61247),o=r(50758),a=r(17445),l=r(1654),u=r(5600),p=r(52011);let c=class extends n.Z{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._handles=new s.Z,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll(),this._handles.destroy()}add(e,t,r={}){return this._installWatch(e,t,r,a.YP)}addWhen(e,t,r={}){return this._installWatch(e,t,r,a.gx)}addOnCollectionChange(e,t,{initial:r=!1,final:i=!1}={}){const n=++this._handleId;return this._handles.add([(0,a.on)(e,"after-changes",this._createSyncUpdatingCallback(),a.Z_),(0,a.on)(e,"change",t,{onListenerAdd:r?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:i?e=>t({added:[],removed:e.toArray()}):void 0})],n),(0,o.kB)((()=>this._handles.remove(n)))}addPromise(e){if(null==e)return e;const t=++this._handleId;this._handles.add({remove:()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this._handles.has(d)||this._set("updating",!1))}},t),this._pendingPromises.add(e),this._set("updating",!0);const r=()=>this._handles.remove(t);return e.then(r,r),e}removeAll(){this._pendingPromises.clear(),this._handles.removeAll(),this._set("updating",!1)}_installWatch(e,t,r={},i){const n=++this._handleId;r.sync||this._installSyncUpdatingWatch(e,n);const s=i(e,t,r);return this._handles.add(s,n),(0,o.kB)((()=>this._handles.remove(n)))}_installSyncUpdatingWatch(e,t){const r=this._createSyncUpdatingCallback(),i=(0,a.YP)(e,r,{sync:!0,equals:()=>!1});return this._handles.add(i,t),i}_createSyncUpdatingCallback(){return()=>{this._handles.remove(d),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this._handles.add((0,l.Os)((()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this._handles.remove(d))})),d)}}};(0,i._)([(0,u.Cb)({readOnly:!0})],c.prototype,"updating",void 0),c=(0,i._)([(0,p.j)("esri.core.support.WatchUpdatingTracking")],c);const d=-42},12653:(e,t,r)=>{r.r(t),r.d(t,{default:()=>B});var i=r(43697),n=(r(66577),r(51773)),s=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423),r(32400)),o=r(16453),a=r(78286),l=r(81271),u=r(5600),p=r(75215),c=(r(67676),r(80442)),d=r(52011),y=r(30556),f=r(86973),m=r(87085),h=r(20102),g=r(3920),w=r(83379),b=r(95330),v=r(78346),_=r(25278),S=r(51432),C=r(74889),x=r(6570);let F=class extends((0,g.p)(w.Z)){constructor(){super(...arguments),this._connection=null,this.capabilities=(0,_.MS)(!1,!1),this.type="wfs",this.refresh=(0,b.Ds)((async e=>{await this.load();const{extent:t}=await this._connection.invoke("refresh",e);return t&&(this.sourceJSON.extent=t),{dataChanged:!0,updates:{extent:this.sourceJSON.extent}}}))}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker({signal:t})),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}async openPorts(){return await this.load(),this._connection.openPorts()}async queryFeatures(e,t={}){await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);return C.Z.fromJSON(r)}async queryFeaturesJSON(e,t={}){return await this.load(t),this._connection.invoke("queryFeatures",e?e.toJSON():null,t)}async queryFeatureCount(e,t={}){return await this.load(t),this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t)}async queryObjectIds(e,t={}){return await this.load(t),this._connection.invoke("queryObjectIds",e?e.toJSON():null,t)}async queryExtent(e,t={}){await this.load(t);const r=await this._connection.invoke("queryExtent",e?e.toJSON():null,t);return{count:r.count,extent:x.Z.fromJSON(r.extent)}}async querySnapping(e,t={}){return await this.load(t),this._connection.invoke("querySnapping",e,t)}async _createLoadOptions(e){const{url:t,customParameters:r,name:i,namespaceUri:n,spatialReference:s,fields:o,geometryType:a,swapXY:l}=this.layer;if(!t)throw new h.Z("wfs-layer:missing-url","WFSLayer must be created with a url");this.wfsCapabilities||(this.wfsCapabilities=await(0,S.FU)(t,{customParameters:r,...e}));const u=["fields","geometryType","name","namespaceUri","spatialReference","swapXY"].some((e=>null==this.layer[e])),p=u?await(0,S.be)(this.wfsCapabilities,i,n,{spatialReference:s,customParameters:r,signal:e?.signal}):{...(0,S.eB)(o??[]),geometryType:a,name:i,namespaceUri:n,spatialReference:s,swapXY:l},c=(0,S.ft)(this.wfsCapabilities.readFeatureTypes(),p.name,p.namespaceUri),d=f.M.toJSON(p.geometryType);return{customParameters:r,featureType:c,fields:p.fields?.map((e=>e.toJSON()))??[],geometryField:p.geometryField,geometryType:d,getFeatureUrl:this.wfsCapabilities.operations.GetFeature.url,getFeatureOutputFormat:this.wfsCapabilities.operations.GetFeature.outputFormat,objectIdField:p.objectIdField,spatialReference:p.spatialReference.toJSON(),swapXY:!!p.swapXY}}async _startWorker(e){const[t,r]=await(0,b.as)([this._createLoadOptions(e),(0,v.bA)("WFSSourceWorker",{...e,strategy:(0,c.Z)("feature-layers-workers")?"dedicated":"local"})]),i=t.error||r.error||null,n=r.value||null;if(i)throw n&&n.close(),i;const s=t.value;this._connection=r.value;const o=(await this._connection.invoke("load",s,e)).extent;this.sourceJSON={extent:o,fields:s.fields,geometryType:s.geometryType,objectIdField:s.objectIdField,geometryField:s.geometryField,drawingInfo:(0,_.bU)(s.geometryType),name:s.featureType.title,wfsInfo:{name:s.featureType.name,featureUrl:s.getFeatureUrl,maxFeatures:3e3,swapXY:s.swapXY,supportedSpatialReferences:s.featureType.supportedSpatialReferences,version:"2.0.0",wfsNamespace:s.featureType.namespaceUri}}}};(0,i._)([(0,u.Cb)()],F.prototype,"capabilities",void 0),(0,i._)([(0,u.Cb)({constructOnly:!0})],F.prototype,"layer",void 0),(0,i._)([(0,u.Cb)()],F.prototype,"sourceJSON",void 0),(0,i._)([(0,u.Cb)()],F.prototype,"type",void 0),(0,i._)([(0,u.Cb)()],F.prototype,"wfsCapabilities",void 0),F=(0,i._)([(0,d.j)("esri.layers.graphics.sources.WFSSource")],F);var T,I=r(71612),P=r(17017),E=r(69637),R=r(6404),j=r(38009),O=r(68825),U=r(16859),N=r(34760),Z=r(72965),k=r(28294),M=r(21506),q=r(1231),G=r(53518),L=r(35671),D=r(54306),A=r(30707),H=r(14165),J=r(32163),$=r(82971);const z=(0,G.v)();let W=T=class extends((0,O.c)((0,P.N)((0,R.M)((0,E.b)((0,I.h)((0,k.n)((0,N.Q)((0,Z.M)((0,j.q)((0,U.I)((0,o.R)(m.Z)))))))))))){static fromWFSLayerInfo(e){const{customParameters:t,fields:r,geometryField:i,geometryType:n,name:s,namespaceUri:o,objectIdField:a,spatialReference:l,swapXY:u,url:p,wfsCapabilities:c}=e;return new T({customParameters:t,fields:r,geometryField:i,geometryType:n,name:s,namespaceUri:o,objectIdField:a,spatialReference:l,swapXY:u,url:p,wfsCapabilities:c})}constructor(e){super(e),this.copyright=null,this.customParameters=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.featureUrl=void 0,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="WFS",this.maxFeatures=3e3,this.mode=0,this.name=null,this.namespaceUri=null,this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new F({layer:this}),this.spatialReference=$.Z.WGS84,this.spatialReferences=[4326],this.swapXY=void 0,this.title="WFS",this.type="wfs",this.url=null,this.version=void 0}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WFS"]},e).then((()=>this.source.load(e))).then((()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo","spatialReference","name","namespaceUri"],"service"),(0,L.YN)(this.renderer,this.fieldsIndex),(0,L.UF)(this.timeInfo,this.fieldsIndex)}))),Promise.resolve(this)}get capabilities(){return this.source?.capabilities}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,t,r){const i=e.filter((e=>e.name!==S.M8));this.geometryField&&i.unshift(new q.Z({name:this.geometryField,alias:this.geometryField,type:"geometry"})),(0,a.RB)(r,i.map((e=>e.toJSON())),t)}get parsedUrl(){return(0,l.mN)(this.url)}set renderer(e){(0,L.YN)(e,this.fieldsIndex),this._set("renderer",e)}get wfsCapabilities(){return this.source?.wfsCapabilities}set wfsCapabilities(e){this.source&&(this.source.wfsCapabilities=e)}createPopupTemplate(e){return(0,J.eZ)(this,e)}createQuery(){const e=new H.Z;e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1";const{timeOffset:t,timeExtent:r}=this;return e.timeExtent=null!=t&&null!=r?r.offset(-t.value,t.unit):r||null,e}getFieldDomain(e,t){return this.getField(e)?.domain}getField(e){return this.fieldsIndex?.get(e)}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(H.Z.from(e)||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryObjectIds(e,t){return this.load().then((()=>this.source.queryObjectIds(H.Z.from(e)||this.createQuery(),t)))}queryFeatureCount(e,t){return this.load().then((()=>this.source.queryFeatureCount(H.Z.from(e)||this.createQuery(),t)))}queryExtent(e,t){return this.load().then((()=>this.source.queryExtent(H.Z.from(e)||this.createQuery(),t)))}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh(this.customParameters);return null!=t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};(0,i._)([(0,u.Cb)({readOnly:!0})],W.prototype,"capabilities",null),(0,i._)([(0,u.Cb)({type:String})],W.prototype,"copyright",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],W.prototype,"createQueryVersion",null),(0,i._)([(0,u.Cb)({json:{name:"wfsInfo.customParameters",write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0),ignoreOrigin:!0})}}})],W.prototype,"customParameters",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],W.prototype,"defaultPopupTemplate",null),(0,i._)([(0,u.Cb)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],W.prototype,"definitionExpression",void 0),(0,i._)([(0,u.Cb)({type:String})],W.prototype,"displayField",void 0),(0,i._)([(0,u.Cb)(M.PV)],W.prototype,"elevationInfo",void 0),(0,i._)([(0,u.Cb)({type:String,readOnly:!0,json:{name:"wfsInfo.featureUrl",write:{ignoreOrigin:!0,isRequired:!0}}})],W.prototype,"featureUrl",void 0),(0,i._)([(0,u.Cb)({type:[q.Z],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],W.prototype,"fields",void 0),(0,i._)([(0,y.c)("fields")],W.prototype,"writeFields",null),(0,i._)([(0,u.Cb)(z.fieldsIndex)],W.prototype,"fieldsIndex",void 0),(0,i._)([(0,u.Cb)({type:x.Z,json:{name:"extent"}})],W.prototype,"fullExtent",void 0),(0,i._)([(0,u.Cb)()],W.prototype,"geometryField",void 0),(0,i._)([(0,u.Cb)({type:String,json:{read:{source:"layerDefinition.geometryType",reader:f.M.read},write:{target:"layerDefinition.geometryType",writer:f.M.write,ignoreOrigin:!0},origins:{service:{read:f.M.read}}}})],W.prototype,"geometryType",void 0),(0,i._)([(0,u.Cb)({type:String})],W.prototype,"id",void 0),(0,i._)([(0,u.Cb)(M.iR)],W.prototype,"labelsVisible",void 0),(0,i._)([(0,u.Cb)({type:[D.Z],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:A.r},write:!0}})],W.prototype,"labelingInfo",void 0),(0,i._)([(0,u.Cb)(M.rn)],W.prototype,"legendEnabled",void 0),(0,i._)([(0,u.Cb)({type:["show","hide"]})],W.prototype,"listMode",void 0),(0,i._)([(0,u.Cb)({type:String})],W.prototype,"objectIdField",void 0),(0,i._)([(0,u.Cb)({type:["WFS"]})],W.prototype,"operationalLayerType",void 0),(0,i._)([(0,u.Cb)({type:p.z8,json:{name:"wfsInfo.maxFeatures",write:{ignoreOrigin:!0,isRequired:!0}}})],W.prototype,"maxFeatures",void 0),(0,i._)([(0,u.Cb)({type:[0],readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],W.prototype,"mode",void 0),(0,i._)([(0,u.Cb)({type:String,json:{name:"wfsInfo.name",write:{ignoreOrigin:!0,isRequired:!0}}})],W.prototype,"name",void 0),(0,i._)([(0,u.Cb)({type:String,json:{name:"wfsInfo.wfsNamespace",write:{ignoreOrigin:!0,isRequired:!0}}})],W.prototype,"namespaceUri",void 0),(0,i._)([(0,u.Cb)(M.bT)],W.prototype,"opacity",void 0),(0,i._)([(0,u.Cb)(z.outFields)],W.prototype,"outFields",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],W.prototype,"parsedUrl",null),(0,i._)([(0,u.Cb)(M.C_)],W.prototype,"popupEnabled",void 0),(0,i._)([(0,u.Cb)({type:n.Z,json:{name:"popupInfo",write:!0}})],W.prototype,"popupTemplate",void 0),(0,i._)([(0,u.Cb)({types:s.A,json:{origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:s.o,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:{ignoreOrigin:!0}}})],W.prototype,"renderer",null),(0,i._)([(0,u.Cb)(M.YI)],W.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],W.prototype,"source",void 0),(0,i._)([(0,u.Cb)({type:$.Z,json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"extent.spatialReference"}}}})],W.prototype,"spatialReference",void 0),(0,i._)([(0,u.Cb)({readOnly:!0,type:[p.z8],json:{name:"wfsInfo.supportedSpatialReferences",write:{ignoreOrigin:!0,isRequired:!0}}})],W.prototype,"spatialReferences",void 0),(0,i._)([(0,u.Cb)({type:Boolean,value:!1,json:{name:"wfsInfo.swapXY",write:{ignoreOrigin:!0,isRequired:!0}}})],W.prototype,"swapXY",void 0),(0,i._)([(0,u.Cb)({json:{write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"name"}}}})],W.prototype,"title",void 0),(0,i._)([(0,u.Cb)({json:{read:!1},readOnly:!0})],W.prototype,"type",void 0),(0,i._)([(0,u.Cb)(M.HQ)],W.prototype,"url",void 0),(0,i._)([(0,u.Cb)({type:String,readOnly:!0,json:{name:"wfsInfo.version",write:{ignoreOrigin:!0,isRequired:!0}}})],W.prototype,"version",void 0),(0,i._)([(0,u.Cb)()],W.prototype,"wfsCapabilities",null),W=T=(0,i._)([(0,d.j)("esri.layers.WFSLayer")],W);const B=W},61159:(e,t,r)=>{r.d(t,{g:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},92722:(e,t,r)=>{r.d(t,{O3:()=>_,lG:()=>C,my:()=>S,q9:()=>l});var i=r(20102),n=r(70272),s=r(5428),o=r(35671);const a={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function l(e){return a[e]}function*u(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*p(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function c(e){for(const t of e)if(t.length>2)return!0;return!1}function d(e){let t=0;for(let r=0;r<e.length;r++){const i=e[r],n=e[(r+1)%e.length];t+=i[0]*n[1]-n[0]*i[1]}return t<=0}function y(e){const t=e[0],r=e[e.length-1];return t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]||e.push(t),e}function f(e,t,r){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,r){return g(e,t.coordinates,r),e}(e,t,r);case"MultiLineString":return function(e,t,r){for(const i of t.coordinates)g(e,i,r);return e}(e,t,r);case"MultiPolygon":return function(e,t,r){for(const i of t.coordinates){m(e,i[0],r);for(let t=1;t<i.length;t++)h(e,i[t],r)}return e}(e,t,r);case"Point":return function(e,t,r){return b(e,t.coordinates,r),e}(e,t,r);case"Polygon":return function(e,t,r){const i=t.coordinates;m(e,i[0],r);for(let t=1;t<i.length;t++)h(e,i[t],r);return e}(e,t,r)}}function m(e,t,r){const i=y(t);!function(e){return!d(e)}(i)?g(e,i,r):w(e,i,r)}function h(e,t,r){const i=y(t);!function(e){return d(e)}(i)?g(e,i,r):w(e,i,r)}function g(e,t,r){for(const i of t)b(e,i,r);e.lengths.push(t.length)}function w(e,t,r){for(let i=t.length-1;i>=0;i--)b(e,t[i],r);e.lengths.push(t.length)}function b(e,t,r){const[i,n,s]=t;e.coords.push(i,n),r.hasZ&&e.coords.push(s||0)}function v(e){switch(typeof e){case"string":return"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function _(e){if(!e)throw new i.Z("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new i.Z("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:t}=e;if(!t)return;const r="string"==typeof t?t:"name"===t.type?t.properties.name:"EPSG"===t.type?t.properties.code:null,n=new RegExp(".*(CRS84H?|4326)$","i");if(!r||!n.test(r))throw new i.Z("geojson-layer:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:t})}function S(e,t={}){const r=[],i=new Set,n=new Set;let s,a=!1,d=null,y=!1,{geometryType:f=null}=t,m=!1;for(const t of u(e)){const{geometry:e,properties:u,id:h}=t;if((!e||(f||(f=l(e.type)),l(e.type)===f))&&(a||(a=c(p(e))),y||(y=null!=h,y&&(s=typeof h,u&&(d=Object.keys(u).filter((e=>u[e]===h))))),u&&d&&y&&null!=h&&(d.length>1?d=d.filter((e=>u[e]===h)):1===d.length&&(d=u[d[0]]===h?d:[])),!m&&u)){let e=!0;for(const t in u){if(i.has(t))continue;const s=u[t];if(null==s){e=!1,n.add(t);continue}const a=v(s);if("unknown"===a){n.add(t);continue}n.delete(t),i.add(t);const l=(0,o.q6)(t);l&&r.push({name:l,alias:t,type:a})}m=e}}const h=(0,o.q6)(1===d?.length&&d[0]||null)??void 0;if(h)for(const e of r)if(e.name===h&&(0,o.H7)(e)){e.type="esriFieldTypeOID";break}return{fields:r,geometryType:f,hasZ:a,objectIdFieldName:h,objectIdFieldType:s,unknownFields:Array.from(n)}}function C(e,t){return Array.from(function*(e,t={}){const{geometryType:r,objectIdField:i}=t;for(const o of e){const{geometry:e,properties:a,id:u}=o;if(e&&l(e.type)!==r)continue;const p=a||{};let c;i&&(c=p[i],null==u||c||(p[i]=c=u));const d=new n.u_(e?f(new s.Z,e,t):null,p,null,c??void 0);yield d}}(u(e),t))}},25278:(e,t,r)=>{r.d(t,{Dm:()=>p,Hq:()=>c,MS:()=>d,bU:()=>a});var i=r(80442),n=r(22974),s=r(61159),o=r(58333);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.I4:"esriGeometryPolyline"===e?o.ET:o.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function p(e,t){if((0,i.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new i}catch(r){return()=>({[t]:null,...e})}}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.d9)(e)}}]}function d(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0},query:s.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1}}}},17017:(e,t,r)=>{r.d(t,{N:()=>o});var i=r(43697),n=r(5600),s=(r(75215),r(67676),r(80442),r(52011));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,n.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,s.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},69637:(e,t,r)=>{r.d(t,{b:()=>I});var i,n=r(43697),s=r(5600),o=(r(75215),r(67676),r(80442),r(52011)),a=r(20102),l=r(96674),u=r(78286),p=r(67760),c=r(66577),d=r(92835),y=r(35454),f=r(22974),m=r(14165);const h=new y.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),g=new y.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let w=i=class extends l.wq{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:i,timeExtent:n,objectIds:s,units:o,distance:a}=this;return new m.Z({geometry:(0,f.d9)(r),objectIds:(0,f.d9)(s),spatialRelationship:i,timeExtent:(0,f.d9)(n),where:t,units:o,distance:a,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:n,objectIds:s,units:o,distance:a}=this;return new i({geometry:(0,f.d9)(t),objectIds:(0,f.d9)(s),spatialRelationship:r,timeExtent:(0,f.d9)(n),where:e,units:o,distance:a})}};(0,n._)([(0,s.Cb)({type:String,json:{write:!0}})],w.prototype,"where",void 0),(0,n._)([(0,s.Cb)({types:c.qM,json:{write:!0}})],w.prototype,"geometry",void 0),(0,n._)([(0,s.Cb)({type:h.apiValues,json:{name:"spatialRel",read:{reader:h.read},write:{allowNull:!1,writer:h.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],w.prototype,"spatialRelationship",void 0),(0,n._)([(0,s.Cb)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],w.prototype,"distance",void 0),(0,n._)([(0,s.Cb)({type:[Number],json:{write:!0}})],w.prototype,"objectIds",void 0),(0,n._)([(0,s.Cb)({type:g.apiValues,json:{read:g.read,write:{writer:g.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],w.prototype,"units",void 0),(0,n._)([(0,s.Cb)({type:d.Z,json:{write:!0}})],w.prototype,"timeExtent",void 0),w=i=(0,n._)([(0,o.j)("esri.layers.support.FeatureFilter")],w);const b=w;var v;const _={read:{reader:p.ij},write:{writer:p.cW,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},S={read:{reader:p.ij},write:{writer:p.cW,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},C={name:"showExcludedLabels",default:!0};let x=v=class extends l.wq{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new a.Z("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new a.Z("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new v({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,n._)([(0,s.Cb)({type:b,json:{write:{allowNull:!0,writer(e,t,r,i){const n=e?.write({},i);n&&0!==Object.keys(n).length?(0,u.RB)(r,n,t):(0,u.RB)(r,null,t)}}}})],x.prototype,"filter",void 0),(0,n._)([(0,s.Cb)({json:{write:!0,origins:{"web-map":_,"portal-item":_}}})],x.prototype,"includedEffect",void 0),(0,n._)([(0,s.Cb)({json:{write:!0,origins:{"web-map":S,"portal-item":S}}})],x.prototype,"excludedEffect",void 0),(0,n._)([(0,s.Cb)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":C,"portal-item":C}}})],x.prototype,"excludedLabelsVisible",void 0),x=v=(0,n._)([(0,o.j)("esri.layers.support.FeatureEffect")],x);const F=x,T={write:{allowNull:!0}},I=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return(0,n._)([(0,s.Cb)({type:F,json:{origins:{"web-map":T,"portal-item":T}}})],t.prototype,"featureEffect",void 0),t=(0,n._)([(0,o.j)("esri.layers.mixins.FeatureEffectLayer")],t),t}},68825:(e,t,r)=>{r.d(t,{c:()=>m});var i,n=r(43697),s=r(78286),o=r(5600),a=(r(75215),r(67676),r(80442),r(52011)),l=r(35454),u=r(96674);const p=new l.X({asc:"ascending",desc:"descending"});let c=i=class extends u.wq{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,n._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"valueExpression",void 0),(0,n._)([(0,o.Cb)({type:p.apiValues,json:{read:p.read,write:p.write}})],c.prototype,"order",void 0),c=i=(0,n._)([(0,a.j)("esri.layers.support.OrderByInfo")],c);const d=c;function y(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const n=new d;return n.read(i,r),[n]}function f(e,t,r,i){const n=e.find((e=>!!e.field));n&&(0,s.RB)(r,[n.toJSON()],t)}const m=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,n._)([(0,o.Cb)({type:[d],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:y},write:{target:"layerDefinition.orderBy",writer:f}}})],t.prototype,"orderBy",void 0),t=(0,n._)([(0,a.j)("esri.layers.mixins.OrderedLayer")],t),t}},16859:(e,t,r)=>{r.d(t,{I:()=>S});var i=r(43697),n=r(68773),s=r(40330),o=r(3172),a=r(66643),l=r(20102),u=r(92604),p=r(70586),c=r(95330),d=r(81271),y=r(5600),f=(r(75215),r(67676),r(80442),r(71715)),m=r(52011),h=r(30556),g=r(84230),w=r(48522),b=r(15235),v=r(86082),_=r(14661);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new b.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:i}=await r.e(8062).then(r.bind(r,18062));return(0,c.k_)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.r9)(e),!0))))}async _setUserPrivileges(e,t){if(!n.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,c.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,_.Ss)(r);let n,o;if(i)n=r.portal.url;else try{n=await(0,g.oP)(this.url,t)}catch(e){(0,c.r9)(e)}if(!n||!(0,d.Zo)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(s.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.r9)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new b.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return(0,_.Ss)(r)}catch(e){(0,c.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=w.Z.getDefault();if(n&&n.loaded&&(0,d.Fv)(n.restUrl)===(0,d.Fv)(i))return n.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,a.q6)((0,o.default)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?v.default.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||w.Z.getDefault());return r&&i&&!(0,d.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,y.Cb)({type:b.default})],t.prototype,"portalItem",null),(0,i._)([(0,f.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,h.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,y.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,y.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,y.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,y.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,m.j)("esri.layers.mixins.PortalLayer")],t),t},C={credential:null,user:null}},28294:(e,t,r)=>{r.d(t,{n:()=>d});var i=r(43697),n=r(92835),s=r(84552),o=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),l=r(52011),u=r(35671),p=r(76259),c=r(78981);const d=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,n=c.v.fromJSON(r.timeOffsetUnits);return i&&n?new s.Z({value:i,unit:n}):null}set timeInfo(e){(0,u.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,o.Cb)({type:n.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,o.Cb)({type:s.Z})],t.prototype,"timeOffset",void 0),(0,i._)([(0,a.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,o.Cb)({value:null,type:p.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,o.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,l.j)("esri.layers.mixins.TemporalLayer")],t),t}},51432:(e,t,r)=>{r.d(t,{M8:()=>v,ft:()=>N,FU:()=>j,Bm:()=>L,be:()=>Z,eB:()=>k}),r(66577);var i=r(3172),n=r(20102),s=r(66374),o=r(95330),a=r(81271),l=r(44547),u=r(8744),p=r(86973),c=r(92722);function d(e){return function(e){const t=y.exec(e);if(!t?.groups)return null;const r=t.groups,i=+r.year,n=+r.month-1,s=+r.day,o=+(r.hours??"0"),a=+(r.minutes??"0"),l=+(r.seconds??"0");if(o>23)return null;if(a>59)return null;if(l>59)return null;const u=r.ms??"0",p=u?+u.padEnd(3,"0").substring(0,3):0;let c;if(r.isUTC)c=Date.UTC(i,n,s,o,a,l,p);else if(r.offsetSign){const e=+r.offsetHours,t=+r.offsetMinutes;c=6e4*("+"===r.offsetSign?-1:1)*(60*e+t)+Date.UTC(i,n,s,o,a,l,p)}else c=new Date(i,n,s,o,a,l,p).getTime();return Number.isNaN(c)?null:c}(e)??function(e){const t=new Date(e).getTime();return Number.isNaN(t)?null:t}(e)}const y=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/;var f=r(88724),m=r(1231),h=r(82971),g=r(6570);const w="xlink:href",b="2.0.0",v="__esri_wfs_id__",_="wfs-layer:getWFSLayerTypeInfo-error",S="wfs-layer:empty-service",C="wfs-layer:feature-type-not-found",x="wfs-layer:geojson-not-supported",F="wfs-layer:kvp-encoding-not-supported",T="wfs-layer:malformed-json",I="wfs-layer:unknown-geometry-type",P="wfs-layer:unknown-field-type",E="wfs-layer:unsupported-spatial-reference",R="wfs-layer:unsupported-wfs-version";async function j(e,t){const r=function(e){const t=A(e);(function(e){const t=e.firstElementChild?.getAttribute("version");if(t&&t!==b)throw new n.Z(R,`Unsupported WFS version ${t}. Supported version: ${b}`)})(t),J(t);const r=t.firstElementChild,i=(0,s.Fs)(function(e){return(0,f.H)(e,{FeatureTypeList:{FeatureType:e=>{const t={typeName:"undefined:undefined",name:"",title:"",description:"",extent:null,namespacePrefix:"",namespaceUri:"",supportedSpatialReferences:[]},r=new Set([4326]),i=e=>{const t=parseInt(e.textContent?.match(/(?<wkid>\d+$)/i)?.groups?.wkid??"",10);Number.isNaN(t)||r.add(t)};return(0,f.h)(e,{Name:e=>{const{name:r,prefix:i}=H(e.textContent);t.typeName=`${i}:${r}`,t.name=r,t.namespacePrefix=i,t.namespaceUri=e.lookupNamespaceURI(i)},Abstract:e=>{t.description=e.textContent},Title:e=>{t.title=e.textContent},WGS84BoundingBox:e=>{t.extent=function(e){let t,r,i,n;for(const s of e.children)switch(s.localName){case"LowerCorner":[t,r]=s.textContent.split(" ").map((e=>Number.parseFloat(e)));break;case"UpperCorner":[i,n]=s.textContent.split(" ").map((e=>Number.parseFloat(e)))}return{xmin:t,ymin:r,xmax:i,ymax:n,spatialReference:u.Zn}}(e)},DefaultSRS:i,DefaultCRS:i,OtherSRS:i,OtherCRS:i}),t.title||(t.title=t.name),t.supportedSpatialReferences.push(...r),t}}})}(r));return{operations:U(r),get featureTypes(){return Array.from(i())},readFeatureTypes:i}}((await(0,i.default)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetCapabilities",VERSION:b,...t?.customParameters},signal:t?.signal})).data);return function(e,t){(0,a.$U)(e)&&((0,a.D6)(e,t.operations.DescribeFeatureType.url,!0)&&(t.operations.DescribeFeatureType.url=(0,a.hO)(t.operations.DescribeFeatureType.url)),(0,a.D6)(e,t.operations.GetFeature.url,!0)&&(t.operations.GetFeature.url=(0,a.hO)(t.operations.GetFeature.url)))}(e,r),r}const O=new Set(["json","application/json","geojson","application/json; subtype=geojson"]);function U(e){let t=!1;const r={GetCapabilities:{url:""},DescribeFeatureType:{url:""},GetFeature:{url:"",outputFormat:null,supportsPagination:!1}};if((0,f.h)(e,{OperationsMetadata:{Operation:e=>{switch(e.getAttribute("name")){case"GetCapabilities":return{DCP:{HTTP:{Get:e=>{r.GetCapabilities.url=e.getAttribute(w)}}}};case"DescribeFeatureType":return{DCP:{HTTP:{Get:e=>{r.DescribeFeatureType.url=e.getAttribute(w)}}}};case"GetFeature":return{DCP:{HTTP:{Get:e=>{r.GetFeature.url=e.getAttribute(w)}}},Parameter:e=>{if("outputFormat"===e.getAttribute("name"))return{AllowedValues:{Value:e=>{const t=e.textContent;t&&O.has(t.toLowerCase())&&(r.GetFeature.outputFormat=t)}}}}}}},Constraint:e=>{switch(e.getAttribute("name")){case"KVPEncoding":return{DefaultValue:e=>{t="true"===e.textContent.toLowerCase()}};case"ImplementsResultPaging":return{DefaultValue:e=>{r.GetFeature.supportsPagination="true"===e.textContent.toLowerCase()}}}}}}),!t)throw new n.Z(F,"WFS service doesn't support key/value pair (KVP) encoding");if(null==r.GetFeature.outputFormat)throw new n.Z(x,"WFS service doesn't support GeoJSON output format");return r}function N(e,t,r){return(0,s.sE)(e,(e=>r?e.name===t&&e.namespaceUri===r:e.typeName===t||e.name===t))}async function Z(e,t,r,i={}){const{featureType:s,extent:a}=await async function(e,t,r,i={}){const{spatialReference:s=h.Z.WGS84}=i,o=e.readFeatureTypes(),a=t?N(o,t,r):o.next().value;if(null==a)throw t?new n.Z(C,`The type '${t}' could not be found in the service`):new n.Z(S,"The service is empty");let p=new g.Z({...a.extent,spatialReference:s});if(!(0,u.fS)(s,u.Zn))try{await(0,l.iQ)(u.Zn,s,void 0,i),p=(0,l.iV)(p,u.Zn)}catch{throw new n.Z(E,"Projection not supported")}return{extent:p,spatialReference:s,featureType:a}}(e,t,r,i),{fields:p,geometryType:c,swapXY:d,objectIdField:y,geometryField:f}=await async function(e,t,r={}){const[i,s]=await(0,o.as)([q(e.operations.DescribeFeatureType.url,t,r),M(e,t,r)]);if(i.error||s.error)throw new n.Z(_,`An error occurred while getting info about the feature type '${t}'`,{error:i.error||s.error});const{fields:a,errors:l}=i.value??{},u=i.value?.geometryType||s.value?.geometryType,p=s.value?.swapXY??!1;if(null==u)throw new n.Z(I,`The geometry type could not be determined for type '${t}`,{typeName:t,geometryType:u,fields:a,errors:l});return{...k(a??[]),geometryType:u,swapXY:p}}(e,s.typeName,i);return{url:e.operations.GetCapabilities.url,name:s.name,namespaceUri:s.namespaceUri,fields:p,geometryField:f,geometryType:c,objectIdField:y,spatialReference:i.spatialReference??h.Z.WGS84,extent:a,swapXY:d,wfsCapabilities:e,customParameters:i.customParameters}}function k(e){const t=e.find((e=>"geometry"===e.type));let r=e.find((e=>"oid"===e.type));return e=e.filter((e=>"geometry"!==e.type)),r||(r=new m.Z({name:v,type:"oid",alias:v}),e.unshift(r)),{geometryField:t?.name??null,objectIdField:r.name,fields:e}}async function M(e,t,r={}){let n,s=!1;const[o,a]=await Promise.all([L(e.operations.GetFeature.url,t,e.operations.GetFeature.outputFormat,{...r,count:1}),(0,i.default)(e.operations.GetFeature.url,{responseType:"text",query:D(t,void 0,{...r,count:1}),signal:r?.signal})]),l="FeatureCollection"===o.type&&o.features[0]?.geometry;if(l){let e;switch(n=p.M.fromJSON((0,c.q9)(l.type)),l.type){case"Point":e=l.coordinates;break;case"LineString":case"MultiPoint":e=l.coordinates[0];break;case"MultiLineString":case"Polygon":e=l.coordinates[0][0];break;case"MultiPolygon":e=l.coordinates[0][0][0]}const t=/<[^>]*pos[^>]*> *(-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)/.exec(a.data);if(t){const r=e[0].toFixed(3),i=e[1].toFixed(3),n=parseFloat(t[1]).toFixed(3);r===parseFloat(t[2]).toFixed(3)&&i===n&&(s=!0)}}return{geometryType:n,swapXY:s}}async function q(e,t,r){return function(e,t){const{name:r}=H(e),i=A(t);J(i);const o=(0,s.sE)((0,f.H)(i.firstElementChild,{element:e=>({name:e.getAttribute("name"),typeName:H(e.getAttribute("type")).name})}),(({name:e})=>e===r));if(null!=o){const e=(0,s.sE)((0,f.H)(i.firstElementChild,{complexType:e=>e}),(e=>e.getAttribute("name")===o.typeName));if(null!=e)return function(e){const t=[],r=[];let i;const s=(0,f.H)(e,{complexContent:{extension:{sequence:{element:e=>e}}}});for(const o of s){const s=o.getAttribute("name");if(!s)continue;let a,l;if(o.hasAttribute("type")?a=H(o.getAttribute("type")).name:(0,f.h)(o,{simpleType:{restriction:e=>(a=H(e.getAttribute("base")).name,{maxLength:e=>{l=+e.getAttribute("value")}})}}),!a)continue;const u="true"===o.getAttribute("nillable");let p=!1;switch(a.toLowerCase()){case"integer":case"nonpositiveinteger":case"negativeinteger":case"long":case"int":case"short":case"byte":case"nonnegativeinteger":case"unsignedlong":case"unsignedint":case"unsignedshort":case"unsignedbyte":case"positiveinteger":r.push(new m.Z({name:s,alias:s,type:"integer",nullable:u}));break;case"float":case"double":case"decimal":r.push(new m.Z({name:s,alias:s,type:"double",nullable:u}));break;case"boolean":case"string":case"gyearmonth":case"gyear":case"gmonthday":case"gday":case"gmonth":case"anyuri":case"qname":case"notation":case"normalizedstring":case"token":case"language":case"idrefs":case"entities":case"nmtoken":case"nmtokens":case"name":case"ncname":case"id":case"idref":case"entity":case"duration":case"time":r.push(new m.Z({name:s,alias:s,type:"string",nullable:u,length:l??255}));break;case"datetime":case"date":r.push(new m.Z({name:s,alias:s,type:"date",nullable:u,length:l??36}));break;case"pointpropertytype":i="point",p=!0;break;case"multipointpropertytype":i="multipoint",p=!0;break;case"curvepropertytype":case"multicurvepropertytype":case"multilinestringpropertytype":i="polyline",p=!0;break;case"surfacepropertytype":case"multisurfacepropertytype":case"multipolygonpropertytype":i="polygon",p=!0;break;case"geometrypropertytype":case"multigeometrypropertytype":p=!0,t.push(new n.Z(I,`geometry type '${a}' is not supported`,{type:(new XMLSerializer).serializeToString(e)}));break;default:t.push(new n.Z(P,`Unknown field type '${a}'`,{type:(new XMLSerializer).serializeToString(e)}))}p&&r.push(new m.Z({name:s,alias:s,type:"geometry",nullable:u}))}for(const e of r)if("integer"===e.type&&!e.nullable&&G.has(e.name.toLowerCase())){e.type="oid";break}return{geometryType:i,fields:r,errors:t}}(e)}throw new n.Z(C,`Type '${e}' not found in document`,{document:(new XMLSerializer).serializeToString(i)})}(t,(await(0,i.default)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"DescribeFeatureType",VERSION:b,TYPENAME:t,...r?.customParameters},signal:r?.signal})).data)}const G=new Set(["objectid","fid"]);async function L(e,t,r,s){let{data:o}=await(0,i.default)(e,{responseType:"text",query:D(t,r,s),signal:s?.signal});o=o.replaceAll(/": +(-?\d+),(\d+)(,)?/g,'": $1.$2$3');try{if(s?.dateFields?.length){const e=new Set(s.dateFields);return JSON.parse(o,((t,r)=>e.has(t)?d(r):r))}return JSON.parse(o)}catch(e){throw new n.Z(T,"Error while parsing the response",{response:o,error:e})}}function D(e,t,r){return{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:b,TYPENAMES:e,OUTPUTFORMAT:t,SRSNAME:"EPSG:4326",STARTINDEX:r?.startIndex,COUNT:r?.count,...r?.customParameters}}function A(e){return(new DOMParser).parseFromString(e.trim(),"text/xml")}function H(e){const[t,r]=e.split(":");return{prefix:r?t:"",name:r??t}}function J(e){let t="",r="";if((0,f.h)(e.firstElementChild,{Exception:e=>(t=e.getAttribute("exceptionCode"),{ExceptionText:e=>{r=e.textContent}})}),t)throw new n.Z(`wfs-layer:${t}`,r)}},88724:(e,t,r)=>{function i(e,t){if(e&&t)for(const r of e.children)if(r.localName in t){const e=t[r.localName];if("function"==typeof e){const t=e(r);t&&i(r,t)}else i(r,e)}}function*n(e,t){for(const r of e.children)if(r.localName in t){const e=t[r.localName];"function"==typeof e?yield e(r):yield*n(r,e)}}r.d(t,{H:()=>n,h:()=>i})},76259:(e,t,r)=>{r.d(t,{Z:()=>m});var i=r(43697),n=r(92835),s=r(84552),o=r(2368),a=r(96674),l=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),p=r(52011),c=r(30556),d=r(80216);function y(e,t){return s.Z.fromJSON({value:e,unit:t})}let f=class extends((0,o.J)(a.wq)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeReference=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),i=new Date(t.timeExtent[1]);return new n.Z({start:r,end:i})}writeFullTimeExtent(e,t){e&&null!=e.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?y(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?y(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,l.Cb)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],f.prototype,"cumulative",void 0),(0,i._)([(0,l.Cb)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],f.prototype,"endField",void 0),(0,i._)([(0,l.Cb)({type:n.Z,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"fullTimeExtent",void 0),(0,i._)([(0,u.r)("fullTimeExtent",["timeExtent"])],f.prototype,"readFullTimeExtent",null),(0,i._)([(0,c.c)("fullTimeExtent")],f.prototype,"writeFullTimeExtent",null),(0,i._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"hasLiveData",void 0),(0,i._)([(0,l.Cb)({type:s.Z,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"interval",void 0),(0,i._)([(0,u.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],f.prototype,"readInterval",null),(0,i._)([(0,c.c)("interval")],f.prototype,"writeInterval",null),(0,i._)([(0,l.Cb)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],f.prototype,"startField",void 0),(0,i._)([(0,l.Cb)({type:d.Z,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"timeReference",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"trackIdField",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],f.prototype,"useTime",void 0),f=(0,i._)([(0,p.j)("esri.layers.support.TimeInfo")],f);const m=f},30707:(e,t,r)=>{r.d(t,{a:()=>c,r:()=>u});var i=r(20102),n=r(22974),s=r(92604),o=r(54306);const a=s.Z.getLogger("esri.layers.support.labelingInfo"),l=/\[([^\[\]]+)\]/gi;function u(e,t,r){return e?e.map((e=>{const i=new o.Z;if(i.read(e,r),i.labelExpression){const e=t.fields||t.layerDefinition&&t.layerDefinition.fields||this.fields;i.labelExpression=i.labelExpression.replaceAll(l,((t,r)=>`[${function(e,t){if(!t)return e;const r=e.toLowerCase();for(let e=0;e<t.length;e++){const i=t[e].name;if(i.toLowerCase()===r)return i}return e}(r,e)}]`))}return i})):null}const p={esriGeometryPoint:["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along"],esriGeometryMultipoint:null};function c(e,t){const r=(0,n.d9)(e);return r.some((e=>function(e,t){const r=e.labelPlacement,n=p[t];if(!e.symbol)return a.warn("No ILabelClass symbol specified."),!0;if(!n)return a.error(new i.Z("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),!0;if(!n.includes(r)){const i=n[0];r&&a.warn(`Found invalid label placement type ${r} for ${t}. Defaulting to ${i}`),e.labelPlacement=i}return!1}(e,t)))?[]:r}},78981:(e,t,r)=>{r.d(t,{v:()=>i});const i=(0,r(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},74889:(e,t,r)=>{r.d(t,{Z:()=>b});var i,n=r(43697),s=r(66577),o=r(38171),a=r(35454),l=r(96674),u=r(22974),p=r(5600),c=(r(75215),r(71715)),d=r(52011),y=r(30556),f=r(82971),m=r(33955),h=r(1231);const g=new a.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=i=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=f.Z.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const n=e[t],s=o.Z.fromJSON(n),a=n.geometry&&n.geometry.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=r);const l=n.aggregateGeometries,u=s.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],i=l[e],n=i?.spatialReference;null==t||n||(t.spatialReference=r)}i.push(s)}return i}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(e&&null!=e.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,m.im)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=f.Z.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e&&e[r];i.geometry=t&&t.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,s=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((n-e)/r)));for(let e=0,t=s.length;e<t;e++)o?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[s,o]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*s+i),(e=>n-e*o),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,n;const s=[];for(let o=0,a=e.length;o<a;o++){const a=e[o];if(o>0){const e=t(a[0]),o=r(a[1]);e===i&&o===n||(s.push([e-i,o-n]),i=e,n=o)}else i=t(a[0]),n=r(a[1]),s.push([i,n])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,m.oU)(e)?e.rings:e.paths,n=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],o=this._quantizePoints(s,t,r);o&&n.push(o)}return n.length>0?((0,m.oU)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,m.oU)(e)?e.rings:e.paths;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(o+=n[0],a+=n[1]):(o=n[0],a=n[1]),n[0]=t(o),n[1]=r(a)}}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let o,a;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],a+=i[1]):(o=i[0],a=i[1]),i[0]=t(o),i[1]=r(a)}if(i&&n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(n)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=n(t[2])}}:null}};(0,n._)([(0,p.Cb)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,n._)([(0,p.Cb)({type:[o.Z],json:{write:!0}})],w.prototype,"features",void 0),(0,n._)([(0,c.r)("features")],w.prototype,"readFeatures",null),(0,n._)([(0,p.Cb)({type:[h.Z],json:{write:!0}})],w.prototype,"fields",void 0),(0,n._)([(0,p.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,n._)([(0,y.c)("geometryType")],w.prototype,"writeGeometryType",null),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,n._)([(0,p.Cb)({types:s.qM,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,n._)([(0,c.r)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,n._)([(0,p.Cb)({type:f.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,n._)([(0,y.c)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,n._)([(0,p.Cb)({json:{write:!0}})],w.prototype,"transform",void 0),w=i=(0,n._)([(0,d.j)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const b=w},58333:(e,t,r)=>{r.d(t,{ET:()=>s,I4:()=>n,eG:()=>l,lF:()=>o,lj:()=>p,qP:()=>a,wW:()=>u});const i=[252,146,31,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},s={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={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},p={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6946],{36946:(e,t,s)=>{s.d(t,{uploadAssets:()=>h});var a=s(3172),r=s(20102),o=s(92604),n=s(95330),i=s(81271),l=s(41123),u=s(84470),p=s(66677);const c=1e6,d=20*c,f=2e9,y=3;async function m({data:e,name:t,description:s},r,o){let l=null;try{const u=(0,i.v_)(r,"uploads"),m=(0,i.v_)(u,"info"),{data:w}=await(0,a.default)(m,{query:{f:"json"},responseType:"json"});(0,n.k_)(o);const h=(0,p.M8)(r),g=w.maxUploadFileSize*c,T=h?f:g,b=h?Math.min(d,g):d;if(e.size>T)throw new Error("Data too large");const _=(0,i.v_)(u,"register"),{data:$}=await(0,a.default)(_,{query:{f:"json",itemName:t,description:s},responseType:"json",method:"post"});if((0,n.k_)(o),!$.success)throw new Error("Registration failed");const{itemID:v}=$.item;l=(0,i.v_)(u,v);const E=(0,i.v_)(l,"uploadPart"),F=Math.ceil(e.size/b),k=new Array;for(let t=0;t<F;++t)k.push(e.slice(t*b,Math.min((t+1)*b,e.size)));const j=k.slice().reverse(),N=new Array,D=async()=>{for(;0!==j.length;){const e=k.length-j.length,t=j.pop(),s=new FormData;s.append("f","json"),s.append("file",t),s.append("partId",`${e}`);const{data:r}=await(0,a.default)(E,{timeout:0,body:s,responseType:"json",method:"post"});if((0,n.k_)(o),!r.success)throw new Error("Part upload failed")}};for(let e=0;e<y&&0!==j.length;++e)N.push(D());await Promise.all(N);const S=(0,i.v_)(l,"commit"),{data:U}=await(0,a.default)(S,{query:{f:"json",parts:k.map(((e,t)=>t)).join(",")},responseType:"json",method:"post"});if((0,n.k_)(o),!U.success)throw new Error("Commit failed");return U.item}catch(e){if(null!=l){const e=(0,i.v_)(l,"delete");await(0,a.default)(e,{query:{f:"json"},responseType:"json",method:"post"})}throw e}}var w=s(2981);async function h(e,t,s){return e.length?Promise.all(e.map((e=>async function(e,{layer:t,ongoingUploads:s},a){const o=s.get(e);if(o)return o;if(!function(e){return!!e.infoFor3D&&!!e.url}(t))throw new r.Z(`${t.type}-layer:upload-failure`,"Layer does not support asset uploads.",new Error);if(function(e,t){const{parsedUrl:s}=t;return null!=s&&e.metadata.externalSources.some((e=>(0,u.JG)(e,s)))}(e,t))return e;const i=async function(e,t,s){const{metadata:a}=e,{displaySource:o}=a,i=g(o?.source,t),u=!!i,p=a.externalSources.length>0,c=u?async function(e,t,s){return{source:await b(e,t,s),original:!0}}(i,t,s):p?async function(e,t,s){const a=v(t),{externalSources:o}=e.metadata,n=function(e,t){for(const s of e){const e=g(s.source,t);if(e)return e}return null}(o,t);if(!n)throw new r.Z(`${t.type}-layer:upload-failure`,"Could not find an external source that is supported by the service.",new Error);const i=await b(n,t,s);return e.addExternalSources([{source:i,original:!0}]),{source:await $(i,t,a)}}(e,t,s):async function(e,t,s){const a=async function(e,t,s){const a=v(t),r=await e.load(s),o=await r.toBinaryGLTF({ignoreLocalTransform:!0});(0,n.k_)(s);const i=await o.buffer();return(0,n.k_)(s),{blob:new Blob([i.data],{type:i.type}),assetName:`${(0,l.z)()}.glb`,assetType:a}}(e,t,s);return{source:await _([a],t,s),extent:e.extent.clone(),original:!0}}(e,t,s),d=await c;return(0,n.k_)(s),e.addExternalSources([d]),e}(e,t,a);s.set(e,i);try{await i}finally{s.delete(e)}return e}(e,t,s)))):[]}function g(e,t){if(!e)return null;const{infoFor3D:{supportedFormats:s,editFormats:a}}=t,r=(0,u.zE)(e),o=new Array;let n=!1;for(let e=0;e<r.length;++e){const t=T(r[e],s);if(!t)return null;a.includes(t.assetType)&&(n=!0),o.push(t)}return n?o:null}function T(e,t){const s=(0,u.vj)(e,t);return s?{asset:e,assetType:s}:null}async function b(e,t,s){return _(e.map((e=>async function(e,t){const{asset:s,assetType:a}=e;if(s instanceof File)return{blob:s,assetName:s.name,assetType:a};const r=await s.toBlob(t);return(0,n.k_)(t),{blob:r,assetName:s.assetName,assetType:a}}(e,s))),t,s)}async function _(e,t,s){const l=await Promise.all(e.map((async e=>{const a=async function(e,t,s){const{blob:a,assetType:l,assetName:u}=e;let p=null;try{const e=await m({data:a,name:u},t.url,s);(0,n.k_)(s),p={assetType:l,assetUploadId:e.itemID}}catch(e){(0,n.r9)(e),o.Z.getLogger("esri.layers.graphics.sources.support.uploadAssets").warnOnce(`Service ${t.url} does not support the REST Uploads API.`)}if(!p){const e=await(0,i.IR)(a);if((0,n.k_)(s),!e.isBase64)throw new r.Z(`${t.type}-layer:uploadAssets-failure`,"Expected gltf data in base64 format after conversion.",new Error);p={assetType:l,assetData:e.data}}if(!p)throw new r.Z(`${t.type}-layer:uploadAssets-failure`,"Unable to prepare uploadAsset request options.",new Error);return{item:p,assetName:u}}(await e,t,s);return(0,n.k_)(s),a})));(0,n.k_)(s);const{uploadResults:p}=await async function(e,t,s){const o=await(0,a.default)((0,i.v_)(t.parsedUrl.path,"uploadAssets"),{timeout:0,query:{f:"json",assets:JSON.stringify(e)},method:"post",responseType:"json"});if((0,n.k_)(s),o.data.uploadResults.length!==e.length)throw new r.Z(`${t.type}-layer:uploadAssets-failure`,`Bad response. Uploaded ${e.length} items and received ${o.data.uploadResults.length} results.`,new Error);return o.data}(l.map((({item:e})=>e)),t,s);return(0,n.k_)(s),e.map(((e,s)=>function(e,t,s){const{success:a}=t;if(!a){const{error:a}=t;throw new r.Z(`${s.type}-layer:upload-failure`,`Failed to upload mesh file ${e.assetName}. Error code: ${a.code}. Error message: ${a.messages}`,new Error)}const{assetHash:o}=t,{assetName:n,item:{assetType:i}}=e,{infoFor3D:{supportedFormats:l}}=s,p=(0,w.d1)(i,l);if(!p)throw new r.Z(`${s.type}-layer:upload-failure`,`The service allowed us to upload an asset of FormatID ${i}, but it does not list it in its supported formats.`,new Error);return new u.CP(n,p,[new u.LL(`${s.parsedUrl.path}/assets/${o}`,o)])}(l[s],p[s],t)))}async function $(e,t,s){const o=e.map((({assetName:e,parts:t})=>({assetName:e,assetHash:t[0].partHash}))),n=(await(0,a.default)((0,i.v_)(t.parsedUrl.path,"convert3D"),{query:{f:"json",assets:JSON.stringify(o),transportType:"esriTransportTypeUrl",targetFormat:s},responseType:"json",timeout:0})).data,{infoFor3D:{supportedFormats:l}}=t;return n.assets.map((e=>{const s=(0,w.S0)(e.contentType,l);if(!s)throw new r.Z(`${t.type}-layer:upload-failure`,`The service allowed us to upload an asset of FormatID ${s}, but it does not list it in its supported formats.`,new Error);return new u.CP(e.assetName,e.contentType,[new u.LL(e.assetURL,e.assetHash)])}))}function v(e){const{infoFor3D:t}=e,s=(0,w.S0)("model/gltf-binary",t.supportedFormats)??(0,w.Ow)("glb",t.supportedFormats);if(!s)throw new r.Z(`${e.type}-layer:upload-failure`,"Layer does not support glb.",new Error);return s}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4547],{52138:(t,e,n)=>{n.d(e,{A:()=>M,a:()=>a,d:()=>f,e:()=>P,f:()=>E,g:()=>h,h:()=>A,i:()=>i,j:()=>C,k:()=>c,m:()=>l,s:()=>s,t:()=>u,w:()=>_,y:()=>N,z:()=>O});var r=n(65617),o=n(46851);function s(t,e,n,r,o,s,i,u,a,l,_,c,P,E,f,M,S){return t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=s,t[5]=i,t[6]=u,t[7]=a,t[8]=l,t[9]=_,t[10]=c,t[11]=P,t[12]=E,t[13]=f,t[14]=M,t[15]=S,t}function i(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function u(t,e){if(t===e){const n=e[1],r=e[2],o=e[3],s=e[6],i=e[7],u=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=n,t[6]=e[9],t[7]=e[13],t[8]=r,t[9]=s,t[11]=e[14],t[12]=o,t[13]=i,t[14]=u}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function a(t,e){const n=e[0],r=e[1],o=e[2],s=e[3],i=e[4],u=e[5],a=e[6],l=e[7],_=e[8],c=e[9],P=e[10],E=e[11],f=e[12],M=e[13],S=e[14],p=e[15],h=n*u-r*i,R=n*a-o*i,A=n*l-s*i,C=r*a-o*u,O=r*l-s*u,N=o*l-s*a,T=_*M-c*f,g=_*S-P*f,d=_*p-E*f,L=c*S-P*M,G=c*p-E*M,y=P*p-E*S;let m=h*y-R*G+A*L+C*d-O*g+N*T;return m?(m=1/m,t[0]=(u*y-a*G+l*L)*m,t[1]=(o*G-r*y-s*L)*m,t[2]=(M*N-S*O+p*C)*m,t[3]=(P*O-c*N-E*C)*m,t[4]=(a*d-i*y-l*g)*m,t[5]=(n*y-o*d+s*g)*m,t[6]=(S*A-f*N-p*R)*m,t[7]=(_*N-P*A+E*R)*m,t[8]=(i*G-u*d+l*T)*m,t[9]=(r*d-n*G-s*T)*m,t[10]=(f*O-M*A+p*h)*m,t[11]=(c*A-_*O-E*h)*m,t[12]=(u*g-i*L-a*T)*m,t[13]=(n*L-r*g+o*T)*m,t[14]=(M*R-f*C-S*h)*m,t[15]=(_*C-c*R+P*h)*m,t):null}function l(t,e,n){const r=e[0],o=e[1],s=e[2],i=e[3],u=e[4],a=e[5],l=e[6],_=e[7],c=e[8],P=e[9],E=e[10],f=e[11],M=e[12],S=e[13],p=e[14],h=e[15];let R=n[0],A=n[1],C=n[2],O=n[3];return t[0]=R*r+A*u+C*c+O*M,t[1]=R*o+A*a+C*P+O*S,t[2]=R*s+A*l+C*E+O*p,t[3]=R*i+A*_+C*f+O*h,R=n[4],A=n[5],C=n[6],O=n[7],t[4]=R*r+A*u+C*c+O*M,t[5]=R*o+A*a+C*P+O*S,t[6]=R*s+A*l+C*E+O*p,t[7]=R*i+A*_+C*f+O*h,R=n[8],A=n[9],C=n[10],O=n[11],t[8]=R*r+A*u+C*c+O*M,t[9]=R*o+A*a+C*P+O*S,t[10]=R*s+A*l+C*E+O*p,t[11]=R*i+A*_+C*f+O*h,R=n[12],A=n[13],C=n[14],O=n[15],t[12]=R*r+A*u+C*c+O*M,t[13]=R*o+A*a+C*P+O*S,t[14]=R*s+A*l+C*E+O*p,t[15]=R*i+A*_+C*f+O*h,t}function _(t,e,n){const r=n[0],o=n[1],s=n[2];if(e===t)t[12]=e[0]*r+e[4]*o+e[8]*s+e[12],t[13]=e[1]*r+e[5]*o+e[9]*s+e[13],t[14]=e[2]*r+e[6]*o+e[10]*s+e[14],t[15]=e[3]*r+e[7]*o+e[11]*s+e[15];else{const n=e[0],i=e[1],u=e[2],a=e[3],l=e[4],_=e[5],c=e[6],P=e[7],E=e[8],f=e[9],M=e[10],S=e[11];t[0]=n,t[1]=i,t[2]=u,t[3]=a,t[4]=l,t[5]=_,t[6]=c,t[7]=P,t[8]=E,t[9]=f,t[10]=M,t[11]=S,t[12]=n*r+l*o+E*s+e[12],t[13]=i*r+_*o+f*s+e[13],t[14]=u*r+c*o+M*s+e[14],t[15]=a*r+P*o+S*s+e[15]}return t}function c(t,e,n){const r=n[0],o=n[1],s=n[2];return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*o,t[5]=e[5]*o,t[6]=e[6]*o,t[7]=e[7]*o,t[8]=e[8]*s,t[9]=e[9]*s,t[10]=e[10]*s,t[11]=e[11]*s,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function P(t,e,n,r){let s,i,u,a,l,_,c,P,E,f,M,S,p,h,R,A,C,O,N,T,g,d,L,G,y=r[0],m=r[1],I=r[2],F=Math.sqrt(y*y+m*m+I*I);return F<(0,o.g)()?null:(F=1/F,y*=F,m*=F,I*=F,s=Math.sin(n),i=Math.cos(n),u=1-i,a=e[0],l=e[1],_=e[2],c=e[3],P=e[4],E=e[5],f=e[6],M=e[7],S=e[8],p=e[9],h=e[10],R=e[11],A=y*y*u+i,C=m*y*u+I*s,O=I*y*u-m*s,N=y*m*u-I*s,T=m*m*u+i,g=I*m*u+y*s,d=y*I*u+m*s,L=m*I*u-y*s,G=I*I*u+i,t[0]=a*A+P*C+S*O,t[1]=l*A+E*C+p*O,t[2]=_*A+f*C+h*O,t[3]=c*A+M*C+R*O,t[4]=a*N+P*T+S*g,t[5]=l*N+E*T+p*g,t[6]=_*N+f*T+h*g,t[7]=c*N+M*T+R*g,t[8]=a*d+P*L+S*G,t[9]=l*d+E*L+p*G,t[10]=_*d+f*L+h*G,t[11]=c*d+M*L+R*G,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function E(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function f(t,e,n){if(0===e)return i(t);let r,s,u,a=n[0],l=n[1],_=n[2],c=Math.sqrt(a*a+l*l+_*_);return c<(0,o.g)()?null:(c=1/c,a*=c,l*=c,_*=c,r=Math.sin(e),s=Math.cos(e),u=1-s,t[0]=a*a*u+s,t[1]=l*a*u+_*r,t[2]=_*a*u-l*r,t[3]=0,t[4]=a*l*u-_*r,t[5]=l*l*u+s,t[6]=_*l*u+a*r,t[7]=0,t[8]=a*_*u+l*r,t[9]=l*_*u-a*r,t[10]=_*_*u+s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function M(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=r,t[6]=n,t[7]=0,t[8]=0,t[9]=-n,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function S(t,e,n){const r=e[0],o=e[1],s=e[2],i=e[3],u=r+r,a=o+o,l=s+s,_=r*u,c=r*a,P=r*l,E=o*a,f=o*l,M=s*l,S=i*u,p=i*a,h=i*l;return t[0]=1-(E+M),t[1]=c+h,t[2]=P-p,t[3]=0,t[4]=c-h,t[5]=1-(_+M),t[6]=f+S,t[7]=0,t[8]=P+p,t[9]=f-S,t[10]=1-(_+E),t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}const p=(0,r.c)();function h(t,e,n,r){const o=e[0],s=e[1],i=e[2],u=e[3],a=o+o,l=s+s,_=i+i,c=o*a,P=o*l,E=o*_,f=s*l,M=s*_,S=i*_,p=u*a,h=u*l,R=u*_,A=r[0],C=r[1],O=r[2];return t[0]=(1-(f+S))*A,t[1]=(P+R)*A,t[2]=(E-h)*A,t[3]=0,t[4]=(P-R)*C,t[5]=(1-(c+S))*C,t[6]=(M+p)*C,t[7]=0,t[8]=(E+h)*O,t[9]=(M-p)*O,t[10]=(1-(c+f))*O,t[11]=0,t[12]=n[0],t[13]=n[1],t[14]=n[2],t[15]=1,t}function R(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t[9]=e[9]-n[9],t[10]=e[10]-n[10],t[11]=e[11]-n[11],t[12]=e[12]-n[12],t[13]=e[13]-n[13],t[14]=e[14]-n[14],t[15]=e[15]-n[15],t}function A(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]}function C(t,e){if(t===e)return!0;const n=t[0],r=t[1],s=t[2],i=t[3],u=t[4],a=t[5],l=t[6],_=t[7],c=t[8],P=t[9],E=t[10],f=t[11],M=t[12],S=t[13],p=t[14],h=t[15],R=e[0],A=e[1],C=e[2],O=e[3],N=e[4],T=e[5],g=e[6],d=e[7],L=e[8],G=e[9],y=e[10],m=e[11],I=e[12],F=e[13],W=e[14],w=e[15],b=(0,o.g)();return Math.abs(n-R)<=b*Math.max(1,Math.abs(n),Math.abs(R))&&Math.abs(r-A)<=b*Math.max(1,Math.abs(r),Math.abs(A))&&Math.abs(s-C)<=b*Math.max(1,Math.abs(s),Math.abs(C))&&Math.abs(i-O)<=b*Math.max(1,Math.abs(i),Math.abs(O))&&Math.abs(u-N)<=b*Math.max(1,Math.abs(u),Math.abs(N))&&Math.abs(a-T)<=b*Math.max(1,Math.abs(a),Math.abs(T))&&Math.abs(l-g)<=b*Math.max(1,Math.abs(l),Math.abs(g))&&Math.abs(_-d)<=b*Math.max(1,Math.abs(_),Math.abs(d))&&Math.abs(c-L)<=b*Math.max(1,Math.abs(c),Math.abs(L))&&Math.abs(P-G)<=b*Math.max(1,Math.abs(P),Math.abs(G))&&Math.abs(E-y)<=b*Math.max(1,Math.abs(E),Math.abs(y))&&Math.abs(f-m)<=b*Math.max(1,Math.abs(f),Math.abs(m))&&Math.abs(M-I)<=b*Math.max(1,Math.abs(M),Math.abs(I))&&Math.abs(S-F)<=b*Math.max(1,Math.abs(S),Math.abs(F))&&Math.abs(p-W)<=b*Math.max(1,Math.abs(p),Math.abs(W))&&Math.abs(h-w)<=b*Math.max(1,Math.abs(h),Math.abs(w))}function O(t){const e=(0,o.g)(),n=t[0],r=t[1],s=t[2],i=t[4],u=t[5],a=t[6],l=t[8],_=t[9],c=t[10];return Math.abs(1-(n*n+i*i+l*l))<=e&&Math.abs(1-(r*r+u*u+_*_))<=e&&Math.abs(1-(s*s+a*a+c*c))<=e}function N(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const T=l,g=R;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t[9]=e[9]+n[9],t[10]=e[10]+n[10],t[11]=e[11]+n[11],t[12]=e[12]+n[12],t[13]=e[13]+n[13],t[14]=e[14]+n[14],t[15]=e[15]+n[15],t},adjoint:function(t,e){const n=e[0],r=e[1],o=e[2],s=e[3],i=e[4],u=e[5],a=e[6],l=e[7],_=e[8],c=e[9],P=e[10],E=e[11],f=e[12],M=e[13],S=e[14],p=e[15];return t[0]=u*(P*p-E*S)-c*(a*p-l*S)+M*(a*E-l*P),t[1]=-(r*(P*p-E*S)-c*(o*p-s*S)+M*(o*E-s*P)),t[2]=r*(a*p-l*S)-u*(o*p-s*S)+M*(o*l-s*a),t[3]=-(r*(a*E-l*P)-u*(o*E-s*P)+c*(o*l-s*a)),t[4]=-(i*(P*p-E*S)-_*(a*p-l*S)+f*(a*E-l*P)),t[5]=n*(P*p-E*S)-_*(o*p-s*S)+f*(o*E-s*P),t[6]=-(n*(a*p-l*S)-i*(o*p-s*S)+f*(o*l-s*a)),t[7]=n*(a*E-l*P)-i*(o*E-s*P)+_*(o*l-s*a),t[8]=i*(c*p-E*M)-_*(u*p-l*M)+f*(u*E-l*c),t[9]=-(n*(c*p-E*M)-_*(r*p-s*M)+f*(r*E-s*c)),t[10]=n*(u*p-l*M)-i*(r*p-s*M)+f*(r*l-s*u),t[11]=-(n*(u*E-l*c)-i*(r*E-s*c)+_*(r*l-s*u)),t[12]=-(i*(c*S-P*M)-_*(u*S-a*M)+f*(u*P-a*c)),t[13]=n*(c*S-P*M)-_*(r*S-o*M)+f*(r*P-o*c),t[14]=-(n*(u*S-a*M)-i*(r*S-o*M)+f*(r*a-o*u)),t[15]=n*(u*P-a*c)-i*(r*P-o*c)+_*(r*a-o*u),t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},determinant:function(t){const e=t[0],n=t[1],r=t[2],o=t[3],s=t[4],i=t[5],u=t[6],a=t[7],l=t[8],_=t[9],c=t[10],P=t[11],E=t[12],f=t[13],M=t[14],S=t[15];return(e*i-n*s)*(c*S-P*M)-(e*u-r*s)*(_*S-P*f)+(e*a-o*s)*(_*M-c*f)+(n*u-r*i)*(l*S-P*E)-(n*a-o*i)*(l*M-c*E)+(r*a-o*u)*(l*f-_*E)},equals:C,exactEquals:A,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,e){const n=e[0],r=e[1],o=e[2],s=e[3],i=n+n,u=r+r,a=o+o,l=n*i,_=r*i,c=r*u,P=o*i,E=o*u,f=o*a,M=s*i,S=s*u,p=s*a;return t[0]=1-c-f,t[1]=_+p,t[2]=P-S,t[3]=0,t[4]=_-p,t[5]=1-l-f,t[6]=E+M,t[7]=0,t[8]=P+S,t[9]=E-M,t[10]=1-l-c,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){const n=p,r=-e[0],o=-e[1],s=-e[2],i=e[3],u=e[4],a=e[5],l=e[6],_=e[7],c=r*r+o*o+s*s+i*i;return c>0?(n[0]=2*(u*i+_*r+a*s-l*o)/c,n[1]=2*(a*i+_*o+l*r-u*s)/c,n[2]=2*(l*i+_*s+u*o-a*r)/c):(n[0]=2*(u*i+_*r+a*s-l*o),n[1]=2*(a*i+_*o+l*r-u*s),n[2]=2*(l*i+_*s+u*o-a*r)),S(t,e,n),t},fromRotation:f,fromRotationTranslation:S,fromRotationTranslationScale:h,fromRotationTranslationScaleOrigin:function(t,e,n,r,o){const s=e[0],i=e[1],u=e[2],a=e[3],l=s+s,_=i+i,c=u+u,P=s*l,E=s*_,f=s*c,M=i*_,S=i*c,p=u*c,h=a*l,R=a*_,A=a*c,C=r[0],O=r[1],N=r[2],T=o[0],g=o[1],d=o[2],L=(1-(M+p))*C,G=(E+A)*C,y=(f-R)*C,m=(E-A)*O,I=(1-(P+p))*O,F=(S+h)*O,W=(f+R)*N,w=(S-h)*N,b=(1-(P+M))*N;return t[0]=L,t[1]=G,t[2]=y,t[3]=0,t[4]=m,t[5]=I,t[6]=F,t[7]=0,t[8]=W,t[9]=w,t[10]=b,t[11]=0,t[12]=n[0]+T-(L*T+m*g+W*d),t[13]=n[1]+g-(G*T+I*g+w*d),t[14]=n[2]+d-(y*T+F*g+b*d),t[15]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:E,fromXRotation:M,fromYRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=0,t[2]=-n,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=n,t[9]=0,t[10]=r,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=0,t[4]=-n,t[5]=r,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,e,n,r,o,s,i){const u=1/(n-e),a=1/(o-r),l=1/(s-i);return t[0]=2*s*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*s*a,t[6]=0,t[7]=0,t[8]=(n+e)*u,t[9]=(o+r)*a,t[10]=(i+s)*l,t[11]=-1,t[12]=0,t[13]=0,t[14]=i*s*2*l,t[15]=0,t},getRotation:function(t,e){const n=e[0]+e[5]+e[10];let r=0;return n>0?(r=2*Math.sqrt(n+1),t[3]=.25*r,t[0]=(e[6]-e[9])/r,t[1]=(e[8]-e[2])/r,t[2]=(e[1]-e[4])/r):e[0]>e[5]&&e[0]>e[10]?(r=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/r,t[0]=.25*r,t[1]=(e[1]+e[4])/r,t[2]=(e[8]+e[2])/r):e[5]>e[10]?(r=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/r,t[0]=(e[1]+e[4])/r,t[1]=.25*r,t[2]=(e[6]+e[9])/r):(r=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/r,t[0]=(e[8]+e[2])/r,t[1]=(e[6]+e[9])/r,t[2]=.25*r),t},getScaling:function(t,e){const n=e[0],r=e[1],o=e[2],s=e[4],i=e[5],u=e[6],a=e[8],l=e[9],_=e[10];return t[0]=Math.sqrt(n*n+r*r+o*o),t[1]=Math.sqrt(s*s+i*i+u*u),t[2]=Math.sqrt(a*a+l*l+_*_),t},getTranslation:function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},hasIdentityRotation:N,identity:i,invert:a,invertOrIdentity:function(t,e){return a(t,e)||i(t),t},isOrthoNormal:O,lookAt:function(t,e,n,r){const s=e[0],u=e[1],a=e[2];let l=s-n[0],_=u-n[1],c=a-n[2];const P=(0,o.g)();if(Math.abs(l)<P&&Math.abs(_)<P&&Math.abs(c)<P)return void i(t);let E=1/Math.sqrt(l*l+_*_+c*c);l*=E,_*=E,c*=E;const f=r[0],M=r[1],S=r[2];let p=M*c-S*_,h=S*l-f*c,R=f*_-M*l;E=Math.sqrt(p*p+h*h+R*R),E?(E=1/E,p*=E,h*=E,R*=E):(p=0,h=0,R=0);let A=_*R-c*h,C=c*p-l*R,O=l*h-_*p;E=Math.sqrt(A*A+C*C+O*O),E?(E=1/E,A*=E,C*=E,O*=E):(A=0,C=0,O=0),t[0]=p,t[1]=A,t[2]=l,t[3]=0,t[4]=h,t[5]=C,t[6]=_,t[7]=0,t[8]=R,t[9]=O,t[10]=c,t[11]=0,t[12]=-(p*s+h*u+R*a),t[13]=-(A*s+C*u+O*a),t[14]=-(l*s+_*u+c*a),t[15]=1},mul:T,multiply:l,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t[9]=e[9]*n,t[10]=e[10]*n,t[11]=e[11]*n,t[12]=e[12]*n,t[13]=e[13]*n,t[14]=e[14]*n,t[15]=e[15]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t[9]=e[9]+n[9]*r,t[10]=e[10]+n[10]*r,t[11]=e[11]+n[11]*r,t[12]=e[12]+n[12]*r,t[13]=e[13]+n[13]*r,t[14]=e[14]+n[14]*r,t[15]=e[15]+n[15]*r,t},ortho:function(t,e,n,r,o,s,i){const u=1/(e-n),a=1/(r-o),l=1/(s-i);return t[0]=-2*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*l,t[11]=0,t[12]=(e+n)*u,t[13]=(o+r)*a,t[14]=(i+s)*l,t[15]=1,t},perspective:function(t,e,n,r,o){const s=1/Math.tan(e/2);let i;return t[0]=s/n,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=o&&o!==1/0?(i=1/(r-o),t[10]=(o+r)*i,t[14]=2*o*r*i):(t[10]=-1,t[14]=-2*r),t},perspectiveFromFieldOfView:function(t,e,n,r){const o=Math.tan(e.upDegrees*Math.PI/180),s=Math.tan(e.downDegrees*Math.PI/180),i=Math.tan(e.leftDegrees*Math.PI/180),u=Math.tan(e.rightDegrees*Math.PI/180),a=2/(i+u),l=2/(o+s);return t[0]=a,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=l,t[6]=0,t[7]=0,t[8]=-(i-u)*a*.5,t[9]=(o-s)*l*.5,t[10]=r/(n-r),t[11]=-1,t[12]=0,t[13]=0,t[14]=r*n/(n-r),t[15]=0,t},rotate:P,rotateX:function(t,e,n){const r=Math.sin(n),o=Math.cos(n),s=e[4],i=e[5],u=e[6],a=e[7],l=e[8],_=e[9],c=e[10],P=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=s*o+l*r,t[5]=i*o+_*r,t[6]=u*o+c*r,t[7]=a*o+P*r,t[8]=l*o-s*r,t[9]=_*o-i*r,t[10]=c*o-u*r,t[11]=P*o-a*r,t},rotateY:function(t,e,n){const r=Math.sin(n),o=Math.cos(n),s=e[0],i=e[1],u=e[2],a=e[3],l=e[8],_=e[9],c=e[10],P=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=s*o-l*r,t[1]=i*o-_*r,t[2]=u*o-c*r,t[3]=a*o-P*r,t[8]=s*r+l*o,t[9]=i*r+_*o,t[10]=u*r+c*o,t[11]=a*r+P*o,t},rotateZ:function(t,e,n){const r=Math.sin(n),o=Math.cos(n),s=e[0],i=e[1],u=e[2],a=e[3],l=e[4],_=e[5],c=e[6],P=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=s*o+l*r,t[1]=i*o+_*r,t[2]=u*o+c*r,t[3]=a*o+P*r,t[4]=l*o-s*r,t[5]=_*o-i*r,t[6]=c*o-u*r,t[7]=P*o-a*r,t},scale:c,set:s,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:g,subtract:R,targetTo:function(t,e,n,r){const o=e[0],s=e[1],i=e[2],u=r[0],a=r[1],l=r[2];let _=o-n[0],c=s-n[1],P=i-n[2],E=_*_+c*c+P*P;E>0&&(E=1/Math.sqrt(E),_*=E,c*=E,P*=E);let f=a*P-l*c,M=l*_-u*P,S=u*c-a*_;return E=f*f+M*M+S*S,E>0&&(E=1/Math.sqrt(E),f*=E,M*=E,S*=E),t[0]=f,t[1]=M,t[2]=S,t[3]=0,t[4]=c*S-P*M,t[5]=P*f-_*S,t[6]=_*M-c*f,t[7]=0,t[8]=_,t[9]=c,t[10]=P,t[11]=0,t[12]=o,t[13]=s,t[14]=i,t[15]=1,t},translate:_,transpose:u},Symbol.toStringTag,{value:"Module"}))},83305:(t,e,n)=>{n.d(e,{e:()=>c,f:()=>_,g:()=>l,h:()=>S,i:()=>u,j:()=>C,l:()=>a,p:()=>G});var r=n(99880),o=n(80442);let s,i=null;function u(){return!!i}function a(){return s||(s=n.e(6774).then(n.bind(n,66774)).then((t=>t.p)).then((({default:t})=>t({locateFile:t=>(0,r.V)(`esri/geometry/support/${t}`)}))).then((t=>{N(t)})),s)}var l,_,c,P;!function(t){function e(t,e,n){i.ensureCache.prepare();const r=d(n),o=n===r,s=i.ensureFloat64(r),u=i._pe_geog_to_proj(i.getPointer(t),e,s);return u&&L(n,e,s,o),u}function n(t,e,n){return r(t,e,n,0)}function r(t,e,n,r){i.ensureCache.prepare();const o=d(n),s=n===o,u=i.ensureFloat64(o),a=i._pe_proj_to_geog_center(i.getPointer(t),e,u,r);return a&&L(n,e,u,s),a}t.geogToProj=e,t.projGeog=function(t,r,o,s){switch(s){case _.PE_TRANSFORM_P_TO_G:return n(t,r,o);case _.PE_TRANSFORM_G_TO_P:return e(t,r,o)}return 0},t.projToGeog=n,t.projToGeogCenter=r}(l||(l={})),(P=_||(_={})).init=function(){P.PE_BUFFER_MAX=i.PeDefs.prototype.PE_BUFFER_MAX,P.PE_NAME_MAX=i.PeDefs.prototype.PE_NAME_MAX,P.PE_MGRS_MAX=i.PeDefs.prototype.PE_MGRS_MAX,P.PE_USNG_MAX=i.PeDefs.prototype.PE_USNG_MAX,P.PE_DD_MAX=i.PeDefs.prototype.PE_DD_MAX,P.PE_DDM_MAX=i.PeDefs.prototype.PE_DDM_MAX,P.PE_DMS_MAX=i.PeDefs.prototype.PE_DMS_MAX,P.PE_UTM_MAX=i.PeDefs.prototype.PE_UTM_MAX,P.PE_PARM_MAX=i.PeDefs.prototype.PE_PARM_MAX,P.PE_TYPE_NONE=i.PeDefs.prototype.PE_TYPE_NONE,P.PE_TYPE_GEOGCS=i.PeDefs.prototype.PE_TYPE_GEOGCS,P.PE_TYPE_PROJCS=i.PeDefs.prototype.PE_TYPE_PROJCS,P.PE_TYPE_GEOGTRAN=i.PeDefs.prototype.PE_TYPE_GEOGTRAN,P.PE_TYPE_COORDSYS=i.PeDefs.prototype.PE_TYPE_COORDSYS,P.PE_TYPE_UNIT=i.PeDefs.prototype.PE_TYPE_UNIT,P.PE_TYPE_LINUNIT=i.PeDefs.prototype.PE_TYPE_LINUNIT,P.PE_STR_OPTS_NONE=i.PeDefs.prototype.PE_STR_OPTS_NONE,P.PE_STR_AUTH_NONE=i.PeDefs.prototype.PE_STR_AUTH_NONE,P.PE_STR_AUTH_TOP=i.PeDefs.prototype.PE_STR_AUTH_TOP,P.PE_STR_NAME_CANON=i.PeDefs.prototype.PE_STR_NAME_CANON,P.PE_PARM_X0=i.PeDefs.prototype.PE_PARM_X0,P.PE_PARM_ND=i.PeDefs.prototype.PE_PARM_ND,P.PE_TRANSFORM_1_TO_2=i.PeDefs.prototype.PE_TRANSFORM_1_TO_2,P.PE_TRANSFORM_2_TO_1=i.PeDefs.prototype.PE_TRANSFORM_2_TO_1,P.PE_TRANSFORM_P_TO_G=i.PeDefs.prototype.PE_TRANSFORM_P_TO_G,P.PE_TRANSFORM_G_TO_P=i.PeDefs.prototype.PE_TRANSFORM_G_TO_P,P.PE_HORIZON_RECT=i.PeDefs.prototype.PE_HORIZON_RECT,P.PE_HORIZON_POLY=i.PeDefs.prototype.PE_HORIZON_POLY,P.PE_HORIZON_LINE=i.PeDefs.prototype.PE_HORIZON_LINE,P.PE_HORIZON_DELTA=i.PeDefs.prototype.PE_HORIZON_DELTA},function(t){const e={},n={},r=t=>{if(t){const e=t.getType();switch(e){case _.PE_TYPE_GEOGCS:t=i.castObject(t,i.PeGeogcs);break;case _.PE_TYPE_PROJCS:t=i.castObject(t,i.PeProjcs);break;case _.PE_TYPE_GEOGTRAN:t=i.castObject(t,i.PeGeogtran);break;default:e&_.PE_TYPE_UNIT&&(t=i.castObject(t,i.PeUnit))}}return t};function o(t,n){let o=null,s=e[t];if(s||(s={},e[t]=s),s.hasOwnProperty(String(n)))o=s[n];else{const e=i.PeFactory.prototype.factoryByType(t,n);i.compare(e,i.NULL)||(o=e,s[n]=o)}return o=r(o),o}t.initialize=function(){i.PeFactory.prototype.initialize(null)},t.coordsys=function(t){return o(_.PE_TYPE_COORDSYS,t)},t.factoryByType=o,t.fromString=function(t,e){let o=null,s=n[t];if(s||(s={},n[t]=s),s.hasOwnProperty(e))o=s[e];else{const n=i.PeFactory.prototype.fromString(t,e);i.compare(n,i.NULL)||(o=n,s[e]=o)}return o=r(o),o},t.geogcs=function(t){return o(_.PE_TYPE_GEOGCS,t)},t.geogtran=function(t){return o(_.PE_TYPE_GEOGTRAN,t)},t.getCode=function(t){return i.PeFactory.prototype.getCode(t)},t.projcs=function(t){return o(_.PE_TYPE_PROJCS,t)},t.unit=function(t){return o(_.PE_TYPE_UNIT,t)}}(c||(c={}));let E=null;var f,M,S,p,h,R,A,C,O;function N(t){function e(t,e,n){t[e]=n(t[e])}i=t,_.init(),f.init(),h.init(),A.init(),C.init(),E=class extends i.PeGCSExtent{destroy(){i.destroy(this)}};const n=[i.PeDatum,i.PeGeogcs,i.PeGeogtran,i.PeObject,i.PeParameter,i.PePrimem,i.PeProjcs,i.PeSpheroid,i.PeUnit];for(const t of n)e(t.prototype,"getName",(t=>function(){return t.call(this,new Array(_.PE_NAME_MAX))}));for(const t of[i.PeGeogtran,i.PeProjcs])e(t.prototype,"getParameters",(t=>function(){const e=new Array(_.PE_PARM_MAX);let n=t.call(this);for(let t=0;t<e.length;t++){const r=i.getValue(n,"*");e[t]=r?i.wrapPointer(r,i.PeParameter):null,n+=Int32Array.BYTES_PER_ELEMENT}return e}));e(i.PeHorizon.prototype,"getCoord",(t=>function(){const e=this.getSize();if(!e)return null;const n=[];return L(n,e,t.call(this)),n})),e(i.PeGTlistExtendedEntry.prototype,"getEntries",(t=>{const e=i._pe_getPeGTlistExtendedGTsSize();return function(){let n=null;const r=t.call(this);if(!i.compare(r,i.NULL)){n=[r];const t=this.getSteps();if(t>1){const o=i.getPointer(r);for(let r=1;r<t;r++)n.push(i.wrapPointer(o+e*r,i.PeGTlistExtendedGTs))}}return n}}));const r=i._pe_getPeHorizonSize(),o=t=>function(){let e=this._cache;if(e||(e=new Map,this._cache=e),e.has(t))return e.get(t);let n=null;const o=t.call(this);if(!i.compare(o,i.NULL)){n=[o];const t=o.getNump();if(t>1){const e=i.getPointer(o);for(let o=1;o<t;o++)n.push(i.wrapPointer(e+r*o,i.PeHorizon))}}return e.set(t,n),n};e(i.PeProjcs.prototype,"horizonGcsGenerate",o),e(i.PeProjcs.prototype,"horizonPcsGenerate",o),i.PeObject.prototype.toString=function(t=_.PE_STR_OPTS_NONE){i.ensureCache.prepare();const e=i.getPointer(this),n=i.ensureInt8(new Array(_.PE_BUFFER_MAX));return i.UTF8ToString(i._pe_object_to_string_ext(e,t,n))}}function T(t){if(!t)return;const e=i.getClass(t);if(!e)return;const n=i.getCache(e);if(!n)return;const r=i.getPointer(t);r&&delete n[r]}function g(t,e){const n=[],r=new Array(e);for(let e=0;e<t;e++)n.push(i.ensureInt8(r));return n}function d(t){let e;return Array.isArray(t[0])?(e=[],t.forEach((t=>{e.push(t[0],t[1])}))):e=t,e}function L(t,e,n,r=!1){if(r)for(let r=0;r<2*e;r++)t[r]=i.getValue(n+r*Float64Array.BYTES_PER_ELEMENT,"double");else{const r=0===t.length;for(let o=0;o<e;o++)r&&(t[o]=new Array(2)),t[o][0]=i.getValue(n,"double"),t[o][1]=i.getValue(n+Float64Array.BYTES_PER_ELEMENT,"double"),n+=2*Float64Array.BYTES_PER_ELEMENT}}!function(t){let e;t.init=function(){t.PE_GTLIST_OPTS_COMMON=i.PeGTlistExtended.prototype.PE_GTLIST_OPTS_COMMON,e=i._pe_getPeGTlistExtendedEntrySize()},t.getGTlist=function(t,n,r,o,s,u){let a=null;const l=new i.PeInteger(u);try{const _=i.PeGTlistExtended.prototype.getGTlist(t,n,r,o,s,l);if((u=l.val)&&(a=[_],u>1)){const t=i.getPointer(_);for(let n=1;n<u;n++)a.push(i.wrapPointer(t+e*n,i.PeGTlistExtendedEntry))}}finally{i.destroy(l)}return a}}(f||(f={})),function(t){t.destroy=function(t){if(t&&t.length){for(const e of t)T(e),e.getEntries().forEach((t=>{T(t);const e=t.getGeogtran();T(e),e.getParameters().forEach(T),[e.getGeogcs1(),e.getGeogcs2()].forEach((t=>{T(t);const e=t.getDatum();T(e),T(e.getSpheroid()),T(t.getPrimem()),T(t.getUnit())}))}));i.PeGTlistExtendedEntry.prototype.Delete(t[0])}}}(M||(M={})),function(t){t.geogToGeog=function(t,e,n,r,o){i.ensureCache.prepare();const s=d(n),u=n===s,a=i.ensureFloat64(s);let l=0;r&&(l=i.ensureFloat64(r));const _=i._pe_geog_to_geog(i.getPointer(t),e,a,l,o);return _&&L(n,e,a,u),_}}(S||(S={})),function(t){const e=(t,e,n,r,o,s)=>{let u,a;switch(i.ensureCache.prepare(),t){case"dd":u=i._pe_geog_to_dd,a=_.PE_DD_MAX;break;case"ddm":u=i._pe_geog_to_ddm,a=_.PE_DDM_MAX;break;case"dms":u=i._pe_geog_to_dms,a=_.PE_DMS_MAX}let l=0;e&&(l=i.getPointer(e));const c=d(r),P=i.ensureFloat64(c),E=g(n,a),f=u(l,n,P,o,i.ensureInt32(E));if(f)for(let t=0;t<n;t++)s[t]=i.UTF8ToString(E[t]);return f},n=(t,e,n,r,o)=>{let s;switch(i.ensureCache.prepare(),t){case"dd":s=i._pe_dd_to_geog;break;case"ddm":s=i._pe_ddm_to_geog;break;case"dms":s=i._pe_dms_to_geog}let u=0;e&&(u=i.getPointer(e));const a=r.map((t=>i.ensureString(t))),l=i.ensureInt32(a),_=i.ensureFloat64(new Array(2*n)),c=s(u,n,l,_);return c&&L(o,n,_),c};t.geogToDms=function(t,n,r,o,s){return e("dms",t,n,r,o,s)},t.dmsToGeog=function(t,e,r,o){return n("dms",t,e,r,o)},t.geogToDdm=function(t,n,r,o,s){return e("ddm",t,n,r,o,s)},t.ddmToGeog=function(t,e,r,o){return n("ddm",t,e,r,o)},t.geogToDd=function(t,n,r,o,s){return e("dd",t,n,r,o,s)},t.ddToGeog=function(t,e,r,o){return n("dd",t,e,r,o)}}(p||(p={})),function(t){t.init=function(){t.PE_MGRS_STYLE_NEW=i.PeNotationMgrs.prototype.PE_MGRS_STYLE_NEW,t.PE_MGRS_STYLE_OLD=i.PeNotationMgrs.prototype.PE_MGRS_STYLE_OLD,t.PE_MGRS_STYLE_AUTO=i.PeNotationMgrs.prototype.PE_MGRS_STYLE_AUTO,t.PE_MGRS_180_ZONE_1_PLUS=i.PeNotationMgrs.prototype.PE_MGRS_180_ZONE_1_PLUS,t.PE_MGRS_ADD_SPACES=i.PeNotationMgrs.prototype.PE_MGRS_ADD_SPACES},t.geogToMgrsExtended=function(t,e,n,r,o,s,u){i.ensureCache.prepare();let a=0;t&&(a=i.getPointer(t));const l=d(n),c=i.ensureFloat64(l),P=g(e,_.PE_MGRS_MAX),E=i.ensureInt32(P),f=i._pe_geog_to_mgrs_extended(a,e,c,r,o,s,E);if(f)for(let t=0;t<e;t++)u[t]=i.UTF8ToString(P[t]);return f},t.mgrsToGeogExtended=function(t,e,n,r,o){i.ensureCache.prepare();let s=0;t&&(s=i.getPointer(t));const u=n.map((t=>i.ensureString(t))),a=i.ensureInt32(u),l=i.ensureFloat64(new Array(2*e)),_=i._pe_mgrs_to_geog_extended(s,e,a,r,l);return _&&L(o,e,l),_}}(h||(h={})),function(t){t.geogToUsng=function(t,e,n,r,o,s,u){i.ensureCache.prepare();let a=0;t&&(a=i.getPointer(t));const l=d(n),c=i.ensureFloat64(l),P=g(e,_.PE_MGRS_MAX),E=i.ensureInt32(P),f=i._pe_geog_to_usng(a,e,c,r,o,s,E);if(f)for(let t=0;t<e;t++)u[t]=i.UTF8ToString(P[t]);return f},t.usngToGeog=function(t,e,n,r){i.ensureCache.prepare();let o=0;t&&(o=i.getPointer(t));const s=n.map((t=>i.ensureString(t))),u=i.ensureInt32(s),a=i.ensureFloat64(new Array(2*e)),l=i._pe_usng_to_geog(o,e,u,a);return l&&L(r,e,a),l}}(R||(R={})),function(t){t.init=function(){t.PE_UTM_OPTS_NONE=i.PeNotationUtm.prototype.PE_UTM_OPTS_NONE,t.PE_UTM_OPTS_ADD_SPACES=i.PeNotationUtm.prototype.PE_UTM_OPTS_ADD_SPACES,t.PE_UTM_OPTS_NS=i.PeNotationUtm.prototype.PE_UTM_OPTS_NS},t.geogToUtm=function(t,e,n,r,o){i.ensureCache.prepare();let s=0;t&&(s=i.getPointer(t));const u=d(n),a=i.ensureFloat64(u),l=g(e,_.PE_UTM_MAX),c=i.ensureInt32(l),P=i._pe_geog_to_utm(s,e,a,r,c);if(P)for(let t=0;t<e;t++)o[t]=i.UTF8ToString(l[t]);return P},t.utmToGeog=function(t,e,n,r,o){i.ensureCache.prepare();let s=0;t&&(s=i.getPointer(t));const u=n.map((t=>i.ensureString(t))),a=i.ensureInt32(u),l=i.ensureFloat64(new Array(2*e)),_=i._pe_utm_to_geog(s,e,a,r,l);return _&&L(o,e,l),_}}(A||(A={})),function(t){const e=new Map;t.init=function(){t.PE_PCSINFO_OPTION_NONE=i.PePCSInfo.prototype.PE_PCSINFO_OPTION_NONE,t.PE_PCSINFO_OPTION_DOMAIN=i.PePCSInfo.prototype.PE_PCSINFO_OPTION_DOMAIN,t.PE_POLE_OUTSIDE_BOUNDARY=i.PePCSInfo.prototype.PE_POLE_OUTSIDE_BOUNDARY,t.PE_POLE_POINT=i.PePCSInfo.prototype.PE_POLE_POINT},t.generate=function(n,r=t.PE_PCSINFO_OPTION_DOMAIN){let o=null,s=null;return e.has(n)&&(s=e.get(n),s[r]&&(o=s[r])),o||(o=i.PePCSInfo.prototype.generate(n,r),s||(s=[],e.set(n,s)),s[r]=o),o}}(C||(C={})),function(t){t.versionString=function(){return i.PeVersion.prototype.version_string()}}(O||(O={}));const G=Object.freeze(Object.defineProperty({__proto__:null,get PeCSTransformations(){return l},get PeDefs(){return _},get PeFactory(){return c},get PeGCSExtent(){return E},get PeGTTransformations(){return S},get PeGTlistExtended(){return f},get PeGTlistExtendedEntry(){return M},get PeNotationDms(){return p},get PeNotationMgrs(){return h},get PeNotationUsng(){return R},get PeNotationUtm(){return A},get PePCSInfo(){return C},get PeVersion(){return O},_init:N,get _pe(){return i},isLoaded:u,isSupported:function(){return!!(0,o.Z)("esri-wasm")},load:a},Symbol.toStringTag,{value:"Module"}))},44547:(t,e,n)=>{n.d(e,{Up:()=>k,Bm:()=>K,iQ:()=>v,kR:()=>I,zD:()=>F,iV:()=>W,CM:()=>Z,oj:()=>w,dz:()=>b,JY:()=>D,KC:()=>B,Wt:()=>x});var r=n(20102),o=n(22021),s=n(95330),i=n(67900),u=n(58971),a=n(10661),l=n(52138),_=(n(17896),n(65617)),c=n(2109),P=n(6570),E=n(65091),f=n(83305),M=n(94139),S=n(38913),p=n(58901),h=(n(24470),n(68441));Math.PI;const R=h.sv.radius,A=h.sv.eccentricitySquared,C={a1:R*A,a2:R*A*R*A,a3:R*A*A/2,a4:R*A*R*A*2.5,a5:R*A+R*A*A/2,a6:1-A};h.sv.radius,h.sv.flattening,h.Z1.radius,h.Z1.flattening,h.yr.radius,h.yr.flattening,h.yr.radius;var O=n(18571),N=n(8744),T=n(56726),g=n(69285);let d=null,L=null,G=null,y={};const m=new a.s;function I(){return!!d&&(0,f.i)()}function F(t){return null==G&&(G=Promise.all([(0,f.l)(),Promise.all([n.e(5837),n.e(5732)]).then(n.bind(n,45837)).then((t=>t.g)),n.e(819).then(n.bind(n,80819))])),G.then((([,e,{hydratedAdapter:n}])=>{(0,s.k_)(t),L=n,d=e.default,d._enableProjection(f.p),m.notify()}))}function W(t,e,n=null,r=null){return Array.isArray(t)?0===t.length?[]:w(L,t,t[0].spatialReference,e,n,r):w(L,[t],t.spatialReference,e,n,r)[0]}function w(t,e,n,r,o=null,s=null){if(null==n||null==r)return e;if(k(n,r,o))return e.map((t=>function(t,e,n){return t?"x"in t?function(t,e,n,r,o){gt[0]=t.x,gt[1]=t.y;const s=t.z;return gt[2]=void 0!==s?s:o,Z(gt,e,0,gt,r,0,1)?(n.x=gt[0],n.y=gt[1],n.spatialReference=r,void 0===s?(n.z=void 0,n.hasZ=!1):(n.z=gt[2],n.hasZ=!0),void 0===t.m?(n.m=void 0,n.hasM=!1):(n.m=t.m,n.hasM=!0),n):null}(t,e,new M.Z,n,0):"xmin"in t?function(t,e,n,r,o){const{xmin:s,ymin:i,xmax:u,ymax:a,hasZ:l,hasM:_}=t;return j(s,i,l?t.zmin:o,e,gt,r)?(n.xmin=gt[0],n.ymin=gt[1],l&&(n.zmin=gt[2]),j(u,a,l?t.zmax:o,e,gt,r)?(n.xmax=gt[0],n.ymax=gt[1],l&&(n.zmax=gt[2]),_&&(n.mmin=t.mmin,n.mmax=t.mmax),n.spatialReference=r,n):null):null}(t,e,new P.Z,n,0):"rings"in t?Y(t,e,new S.Z,n,0):"paths"in t?function(t,e,n,r,o){const{paths:s,hasZ:i,hasM:u}=t,a=[];return z(s,i??!1,u??!1,e,a,r,o)?(n.paths=a,n.spatialReference=r,n.hasZ=i,n.hasM=u,n):null}(t,e,new p.Z,n,0):"points"in t?function(t,e,n,r,o){const{points:s,hasZ:i,hasM:u}=t,a=[],l=s.length,_=[];for(const t of s)_.push(t[0],t[1],i?t[2]:o);if(!Z(_,e,0,_,r,0,l))return null;for(let t=0;t<l;++t){const e=3*t,n=_[e],r=_[e+1];i&&u?a.push([n,r,_[e+2],s[t][3]]):i?a.push([n,r,_[e+2]]):u?a.push([n,r,s[t][2]]):a.push([n,r])}return n.points=a,n.spatialReference=r,n.hasZ=i,n.hasM=u,n}(t,e,new E.Z,n,0):null:null}(t,n,r)));if(null==o){const t=O.Z.cacheKey(n,r);void 0!==y[t]?o=y[t]:(null==(o=function(t,e,n=null){if(null==t||null==e)return null;if(null==d||null==L)throw new U;const r=d._getTransformation(L,t,e,n,n?.spatialReference);return null!==r?O.Z.fromGE(r):null}(n,r,void 0))&&(o=new O.Z),y[t]=o)}if(null==d||null==t)throw new U;return null!=s?d._project(t,e,n,r,o,s):d._project(t,e,n,r,o)}function b(t,e){const n=D([t],e);return null!=n.pending?{pending:n.pending,geometry:null}:null!=n.geometries?{pending:null,geometry:n.geometries[0]}:{pending:null,geometry:null}}function D(t,e){if(!I())for(const n of t)if(null!=n&&!(0,N.fS)(n.spatialReference,e)&&(0,N.JY)(n.spatialReference)&&(0,N.JY)(e)&&!k(n.spatialReference,e))return(0,u.it)(m),{pending:F(),geometries:null};return{pending:null,geometries:t.map((t=>null==t?null:(0,N.fS)(t.spatialReference,e)?t:(0,N.JY)(t.spatialReference)&&(0,N.JY)(e)?function(t,e){try{const n=W(t,e);if(null==n)return null;"xmin"in t&&"xmin"in n&&(n.zmin=t.zmin,n.zmax=t.zmax);const r=(0,g.k)(n.type,t.spatialReference,e);return null!=r&&r(n),n}catch(t){if(!(t instanceof U))throw t;return null}}(t,e):null))}}class U extends r.Z{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}var H;function k(t,e,n){return!n&&(!!(0,N.fS)(t,e)||(0,N.JY)(t)&&(0,N.JY)(e)&&!!Mt(t,e,Rt))}async function v(t,e,n,r){if(I())return(0,s.Yn)(r);if(Array.isArray(t)){for(const{source:e,dest:n,geographicTransformation:o}of t)if(!k(e,n,o))return F(r)}else if(!k(t,e,n))return F(r);return(0,s.Yn)(r)}function x(t,e,n=e.spatialReference,r=0){return null!=t.spatialReference&&null!=n&&null!=Y(t,t.spatialReference,e,n,r)}function Y(t,e,n,r,o){const{rings:s,hasZ:i,hasM:u}=t,a=[];return z(s,i??!1,u??!1,e,a,r,o)?(n.rings=a,n.spatialReference=r,n.hasZ=i,n.hasM=u,n):null}function B(t,e,n,r=0){gt[0]=t.x,gt[1]=t.y;const o=t.z;return gt[2]=void 0!==o?o:r,Z(gt,t.spatialReference,0,e,n,0,1)}function j(t,e,n,r,o,s){return Ot[0]=t,Ot[1]=e,Ot[2]=n,Z(Ot,r,0,o,s,0,1)}function Z(t,e,n,r,o,s,i=1){const u=Mt(e,o,Rt);if(null==u)return!1;if(u===V){if(t===r&&n===s)return!0;const e=n+3*i;for(let o=n,i=s;o<e;o++,i++)r[i]=t[o];return!0}const a=n+3*i;for(let e=n,o=s;e<a;e+=3,o+=3)u(t,e,r,o);return!0}function z(t,e,n,r,o,s,i=0){const u=new Array;for(const n of t)for(const t of n)u.push(t[0],t[1],e?t[2]:i);if(!Z(u,r,0,u,s,0,u.length/3))return!1;let a=0;o.length=0;for(const r of t){const t=new Array;for(const o of r)e&&n?t.push([u[a++],u[a++],u[a++],o[3]]):e?t.push([u[a++],u[a++],u[a++]]):n?(t.push([u[a++],u[a++],o[2]]),a++):(t.push([u[a++],u[a++]]),a++);o.push(t)}return!0}function K(t,e,n,r){if(null==t||null==r)return!1;const o=J(t,pt),s=J(r,ht);if(o===s&&!X(s)&&(o!==H.UNKNOWN||(0,N.fS)(t,r)))return(0,l.f)(n,e),!0;if(X(s)){const t=ft[o][H.LON_LAT],r=ft[H.LON_LAT][s];return null!=t&&null!=r&&(t(e,0,Nt,0),r(Nt,0,Tt,0),q(At*Nt[0],At*Nt[1],n),n[12]=Tt[0],n[13]=Tt[1],n[14]=Tt[2],!0)}if((s===H.WEB_MERCATOR||s===H.PLATE_CARREE)&&(o===H.WGS84||o===H.CGCS2000&&s===H.PLATE_CARREE||o===H.SPHERICAL_ECEF||o===H.WEB_MERCATOR)){const t=ft[o][H.LON_LAT],r=ft[H.LON_LAT][s];return null!=t&&null!=r&&(t(e,0,Nt,0),r(Nt,0,Tt,0),o===H.SPHERICAL_ECEF?function(t,e,n){q(t,e,n),(0,l.t)(n,n)}(At*Nt[0],At*Nt[1],n):(0,l.i)(n),n[12]=Tt[0],n[13]=Tt[1],n[14]=Tt[2],!0)}return!1}function X(t){return t===H.SPHERICAL_ECEF||t===H.SPHERICAL_MARS_PCPF||t===H.SPHERICAL_MOON_PCPF}function q(t,e,n){const r=Math.sin(t),o=Math.cos(t),s=Math.sin(e),i=Math.cos(e),u=n;return u[0]=-r,u[4]=-s*o,u[8]=i*o,u[12]=0,u[1]=o,u[5]=-s*r,u[9]=i*r,u[13]=0,u[2]=0,u[6]=i,u[10]=s,u[14]=0,u[3]=0,u[7]=0,u[11]=0,u[15]=1,u}function J(t,e){return t?e.spatialReference===t?e.spatialReferenceId:(e.spatialReference=t,"metersPerUnit"in e&&(e.metersPerUnit=(0,i.c9)(t,1)),t.wkt===c.kU.wkt?e.spatialReferenceId=H.SPHERICAL_ECEF:(0,N.oR)(t)?e.spatialReferenceId=H.WGS84:(0,N.sS)(t)?e.spatialReferenceId=H.WEB_MERCATOR:(0,N.QM)(t)?e.spatialReferenceId=H.PLATE_CARREE:t.wkt===c.pn.wkt?e.spatialReferenceId=H.WGS84_ECEF:t.wkid===T.W.CGCS2000?e.spatialReferenceId=H.CGCS2000:t.wkt===c.JL.wkt?e.spatialReferenceId=H.SPHERICAL_MARS_PCPF:t.wkt===c.mM.wkt?e.spatialReferenceId=H.SPHERICAL_MOON_PCPF:(0,N.BZ)(t)?e.spatialReferenceId=H.GCSMARS2000:(0,N.V2)(t)?e.spatialReferenceId=H.GCSMOON2000:e.spatialReferenceId=H.UNKNOWN):H.UNKNOWN}function V(t,e,n,r){t!==n&&(n[r++]=t[e++],n[r++]=t[e++],n[r]=t[e])}function Q(t,e,n,r){n[r++]=Ct*(t[e++]/h.sv.radius),n[r++]=Ct*(Math.PI/2-2*Math.atan(Math.exp(-t[e++]/h.sv.radius))),n[r]=t[e]}function $(t,e,n,r){!function(t,e,n,r,s){const i=.4999999*Math.PI,u=(0,o.uZ)(At*t[e+1],-i,i),a=Math.sin(u);n[r++]=At*t[e]*s.radius,n[r++]=s.halfSemiMajorAxis*Math.log((1+a)/(1-a)),n[r]=t[e+2]}(t,e,n,r,h.sv)}!function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.SPHERICAL_ECEF=1]="SPHERICAL_ECEF",t[t.WGS84=2]="WGS84",t[t.WEB_MERCATOR=3]="WEB_MERCATOR",t[t.WGS84_ECEF=4]="WGS84_ECEF",t[t.CGCS2000=5]="CGCS2000",t[t.WGS84_COMPARABLE_LON_LAT=6]="WGS84_COMPARABLE_LON_LAT",t[t.SPHERICAL_MARS_PCPF=7]="SPHERICAL_MARS_PCPF",t[t.GCSMARS2000=8]="GCSMARS2000",t[t.SPHERICAL_MOON_PCPF=9]="SPHERICAL_MOON_PCPF",t[t.GCSMOON2000=10]="GCSMOON2000",t[t.LON_LAT=11]="LON_LAT",t[t.PLATE_CARREE=12]="PLATE_CARREE"}(H||(H={}));const tt=h.sv.radius*Math.PI/180,et=180/(h.sv.radius*Math.PI);function nt(t,e,n,r){n[r]=t[e]*tt,n[r+1]=t[e+1]*tt,n[r+2]=t[e+2]}function rt(t,e,n,r){n[r]=t[e]*et,n[r+1]=t[e+1]*et,n[r+2]=t[e+2]}function ot(t,e,n,r,o){const s=o+t[e+2],i=At*t[e+1],u=At*t[e],a=Math.cos(i);n[r++]=Math.cos(u)*a*s,n[r++]=Math.sin(u)*a*s,n[r]=Math.sin(i)*s}function st(t,e,n,r){ot(t,e,n,r,h.Z1.radius)}function it(t,e,n,r){ot(t,e,n,r,h.yr.radius)}function ut(t,e,n,r){ot(t,e,n,r,h.sv.radius)}function at(t,e,n,r,s){const i=t[e],u=t[e+1],a=t[e+2],l=Math.sqrt(i*i+u*u+a*a),_=(0,o.Kt)(a/(0===l?1:l)),c=Math.atan2(u,i);n[r++]=Ct*c,n[r++]=Ct*_,n[r]=l-s}function lt(t,e,n,r){at(t,e,n,r,h.Z1.radius)}function _t(t,e,n,r){at(t,e,n,r,h.yr.radius)}function ct(t,e,n,r){at(t,e,n,r,h.sv.radius)}function Pt(t,e,n,r){!function(t,e,n,r,o){const s=At*t[e],i=At*t[e+1],u=t[e+2],a=Math.sin(i),l=Math.cos(i),_=o.radius/Math.sqrt(1-o.eccentricitySquared*a*a);n[r++]=(_+u)*l*Math.cos(s),n[r++]=(_+u)*l*Math.sin(s),n[r++]=(_*(1-o.eccentricitySquared)+u)*a}(t,e,n,r,h.sv)}function Et(t,e,n,r){const o=C,s=t[e],i=t[e+1],u=t[e+2];let a,l,_,c,P,E,f,M,S,p,R,A,O,N,T,g,d,L,G,y,m;a=Math.abs(u),l=s*s+i*i,_=Math.sqrt(l),c=l+u*u,P=Math.sqrt(c),y=Math.atan2(i,s),E=u*u/c,f=l/c,N=o.a2/P,T=o.a3-o.a4/P,f>.3?(M=a/P*(1+f*(o.a1+N+E*T)/P),G=Math.asin(M),p=M*M,S=Math.sqrt(1-p)):(S=_/P*(1-E*(o.a5-N-f*T)/P),G=Math.acos(S),p=1-S*S,M=Math.sqrt(p)),R=1-h.sv.eccentricitySquared*p,A=h.sv.radius/Math.sqrt(R),O=o.a6*A,N=_-A*S,T=a-O*M,d=S*N+M*T,g=S*T-M*N,L=g/(O/R+d),G+=L,m=d+g*L/2,u<0&&(G=-G),n[r++]=Ct*y,n[r++]=Ct*G,n[r]=m}const ft={[H.WGS84]:{[H.CGCS2000]:null,[H.GCSMARS2000]:null,[H.GCSMOON2000]:null,[H.LON_LAT]:V,[H.WGS84_COMPARABLE_LON_LAT]:V,[H.SPHERICAL_ECEF]:ut,[H.SPHERICAL_MARS_PCPF]:null,[H.SPHERICAL_MOON_PCPF]:null,[H.UNKNOWN]:null,[H.WEB_MERCATOR]:$,[H.PLATE_CARREE]:nt,[H.WGS84]:V,[H.WGS84_ECEF]:Pt},[H.CGCS2000]:{[H.CGCS2000]:V,[H.GCSMARS2000]:null,[H.GCSMOON2000]:null,[H.LON_LAT]:V,[H.WGS84_COMPARABLE_LON_LAT]:V,[H.SPHERICAL_ECEF]:ut,[H.SPHERICAL_MARS_PCPF]:null,[H.SPHERICAL_MOON_PCPF]:null,[H.UNKNOWN]:null,[H.WEB_MERCATOR]:null,[H.PLATE_CARREE]:nt,[H.WGS84]:null,[H.WGS84_ECEF]:Pt},[H.GCSMARS2000]:{[H.CGCS2000]:null,[H.GCSMARS2000]:V,[H.GCSMOON2000]:null,[H.LON_LAT]:V,[H.WGS84_COMPARABLE_LON_LAT]:null,[H.SPHERICAL_ECEF]:null,[H.SPHERICAL_MARS_PCPF]:it,[H.SPHERICAL_MOON_PCPF]:null,[H.UNKNOWN]:null,[H.WEB_MERCATOR]:null,[H.PLATE_CARREE]:null,[H.WGS84]:null,[H.WGS84_ECEF]:null},[H.GCSMOON2000]:{[H.CGCS2000]:null,[H.GCSMARS2000]:null,[H.GCSMOON2000]:V,[H.LON_LAT]:V,[H.WGS84_COMPARABLE_LON_LAT]:null,[H.SPHERICAL_ECEF]:null,[H.SPHERICAL_MARS_PCPF]:null,[H.SPHERICAL_MOON_PCPF]:st,[H.UNKNOWN]:null,[H.WEB_MERCATOR]:null,[H.PLATE_CARREE]:null,[H.WGS84]:null,[H.WGS84_ECEF]:null},[H.WEB_MERCATOR]:{[H.CGCS2000]:null,[H.GCSMARS2000]:null,[H.GCSMOON2000]:null,[H.LON_LAT]:Q,[H.WGS84_COMPARABLE_LON_LAT]:Q,[H.SPHERICAL_ECEF]:function(t,e,n,r){Q(t,e,n,r),ut(n,r,n,r)},[H.SPHERICAL_MARS_PCPF]:null,[H.SPHERICAL_MOON_PCPF]:null,[H.UNKNOWN]:null,[H.WEB_MERCATOR]:V,[H.PLATE_CARREE]:function(t,e,n,r){Q(t,e,n,r),nt(n,r,n,r)},[H.WGS84]:Q,[H.WGS84_ECEF]:function(t,e,n,r){Q(t,e,n,r),Pt(n,r,n,r)}},[H.WGS84_ECEF]:{[H.CGCS2000]:Et,[H.GCSMARS2000]:null,[H.GCSMOON2000]:null,[H.LON_LAT]:Et,[H.WGS84_COMPARABLE_LON_LAT]:Et,[H.SPHERICAL_ECEF]:function(t,e,n,r){Et(t,e,n,r),ut(n,r,n,r)},[H.SPHERICAL_MARS_PCPF]:null,[H.SPHERICAL_MOON_PCPF]:null,[H.UNKNOWN]:null,[H.WEB_MERCATOR]:function(t,e,n,r){Et(t,e,n,r),$(n,r,n,r)},[H.PLATE_CARREE]:function(t,e,n,r){Et(t,e,n,r),nt(n,r,n,r)},[H.WGS84]:Et,[H.WGS84_ECEF]:V},[H.SPHERICAL_ECEF]:{[H.CGCS2000]:ct,[H.GCSMARS2000]:null,[H.GCSMOON2000]:null,[H.LON_LAT]:ct,[H.WGS84_COMPARABLE_LON_LAT]:ct,[H.SPHERICAL_ECEF]:V,[H.SPHERICAL_MARS_PCPF]:null,[H.SPHERICAL_MOON_PCPF]:null,[H.UNKNOWN]:null,[H.WEB_MERCATOR]:function(t,e,n,r){ct(t,e,n,r),$(n,r,n,r)},[H.PLATE_CARREE]:function(t,e,n,r){ct(t,e,n,r),nt(n,r,n,r)},[H.WGS84]:ct,[H.WGS84_ECEF]:function(t,e,n,r){ct(t,e,n,r),Pt(n,r,n,r)}},[H.SPHERICAL_MARS_PCPF]:{[H.CGCS2000]:null,[H.GCSMARS2000]:_t,[H.GCSMOON2000]:null,[H.LON_LAT]:_t,[H.WGS84_COMPARABLE_LON_LAT]:null,[H.SPHERICAL_ECEF]:null,[H.SPHERICAL_MARS_PCPF]:V,[H.SPHERICAL_MOON_PCPF]:null,[H.UNKNOWN]:null,[H.WEB_MERCATOR]:null,[H.PLATE_CARREE]:null,[H.WGS84]:null,[H.WGS84_ECEF]:null},[H.SPHERICAL_MOON_PCPF]:{[H.CGCS2000]:null,[H.GCSMARS2000]:null,[H.GCSMOON2000]:lt,[H.LON_LAT]:lt,[H.WGS84_COMPARABLE_LON_LAT]:null,[H.SPHERICAL_ECEF]:null,[H.SPHERICAL_MARS_PCPF]:null,[H.SPHERICAL_MOON_PCPF]:V,[H.UNKNOWN]:null,[H.WEB_MERCATOR]:null,[H.PLATE_CARREE]:null,[H.WGS84]:null,[H.WGS84_ECEF]:null},[H.UNKNOWN]:{[H.CGCS2000]:null,[H.GCSMARS2000]:null,[H.GCSMOON2000]:null,[H.LON_LAT]:null,[H.WGS84_COMPARABLE_LON_LAT]:null,[H.SPHERICAL_ECEF]:null,[H.SPHERICAL_MARS_PCPF]:null,[H.SPHERICAL_MOON_PCPF]:null,[H.UNKNOWN]:V,[H.WEB_MERCATOR]:null,[H.PLATE_CARREE]:null,[H.WGS84]:null,[H.WGS84_ECEF]:null},[H.LON_LAT]:{[H.CGCS2000]:V,[H.GCSMARS2000]:V,[H.GCSMOON2000]:V,[H.LON_LAT]:V,[H.WGS84_COMPARABLE_LON_LAT]:V,[H.SPHERICAL_ECEF]:ut,[H.SPHERICAL_MARS_PCPF]:it,[H.SPHERICAL_MOON_PCPF]:st,[H.UNKNOWN]:null,[H.WEB_MERCATOR]:$,[H.PLATE_CARREE]:nt,[H.WGS84]:V,[H.WGS84_ECEF]:Pt},[H.WGS84_COMPARABLE_LON_LAT]:{[H.CGCS2000]:null,[H.GCSMARS2000]:null,[H.GCSMOON2000]:null,[H.LON_LAT]:V,[H.WGS84_COMPARABLE_LON_LAT]:V,[H.SPHERICAL_ECEF]:ut,[H.SPHERICAL_MARS_PCPF]:null,[H.SPHERICAL_MOON_PCPF]:null,[H.UNKNOWN]:null,[H.WEB_MERCATOR]:null,[H.PLATE_CARREE]:nt,[H.WGS84]:V,[H.WGS84_ECEF]:Pt},[H.PLATE_CARREE]:{[H.CGCS2000]:rt,[H.GCSMARS2000]:null,[H.GCSMOON2000]:null,[H.LON_LAT]:rt,[H.WGS84_COMPARABLE_LON_LAT]:rt,[H.SPHERICAL_ECEF]:function(t,e,n,r){rt(t,e,n,r),ut(n,r,n,r)},[H.SPHERICAL_MARS_PCPF]:null,[H.SPHERICAL_MOON_PCPF]:null,[H.UNKNOWN]:null,[H.WEB_MERCATOR]:function(t,e,n,r){rt(t,e,n,r),$(n,r,n,r)},[H.PLATE_CARREE]:V,[H.WGS84]:rt,[H.WGS84_ECEF]:function(t,e,n,r){rt(t,e,n,r),Pt(n,r,n,r)}}};function Mt(t,e,n=St()){return null==t||null==e?null:function(t,e,n){if(null==t||null==e||n.source.spatialReference===t&&n.dest.spatialReference===e)return n;const r=J(t,n.source),o=J(e,n.dest);return r===H.UNKNOWN&&o===H.UNKNOWN?(0,N.fS)(t,e)?n.projector=V:n.projector=null:n.projector=ft[r][o],n}(t,e,n).projector}function St(){return{source:{spatialReference:null,spatialReferenceId:H.UNKNOWN,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:H.UNKNOWN,metersPerUnit:1},projector:V}}const pt={spatialReference:null,spatialReferenceId:H.UNKNOWN},ht={spatialReference:null,spatialReferenceId:H.UNKNOWN},Rt=St(),At=(St(),(0,o.Vl)(1)),Ct=(0,o.BV)(1),Ot=(0,_.c)(),Nt=(0,_.c)(),Tt=(0,_.c)(),gt=(0,_.c)();(0,_.c)()},18571:(t,e,n)=>{n.d(e,{Z:()=>s});let r=0;class o{static fromGE(t){const e=new o;return e._wkt=t.wkt,e._wkid=t.wkid,e._isInverse=t.isInverse,e}constructor(t){this.uid=r++,t?(this._wkt=null!=t.wkt?t.wkt:null,this._wkid=null!=t.wkid?t.wkid:-1,this._isInverse=null!=t.isInverse&&!0===t.isInverse):(this._wkt=null,this._wkid=-1,this._isInverse=!1)}get wkt(){return this._wkt}set wkt(t){this._wkt=t,this.uid=r++}get wkid(){return this._wkid}set wkid(t){this._wkid=t,this.uid=r++}get isInverse(){return this._isInverse}set isInverse(t){this._isInverse=t,this.uid=r++}getInverse(){const t=new o;return t._wkt=this.wkt,t._wkid=this._wkid,t._isInverse=!this.isInverse,t}}class s{static cacheKey(t,e){return[void 0!==t.wkid&&null!==t.wkid?t.wkid.toString():"-1",void 0!==t.wkt&&null!==t.wkt?t.wkt.toString():"",void 0!==e.wkid&&null!==e.wkid?e.wkid.toString():"-1",void 0!==e.wkt&&null!==e.wkt?e.wkt.toString():""].join(",")}static fromGE(t){const e=new s;let n="";for(const r of t.steps){const t=o.fromGE(r);e.steps.push(t),n+=t.uid.toString()+","}return e._cachedProjection={},e._gtlistentry=null,e._chain=n,e}constructor(t){if(this.steps=[],this._cachedProjection={},this._chain="",this._gtlistentry=null,t&&t.steps)for(const e of t.steps)e instanceof o?this.steps.push(e):this.steps.push(new o({wkid:e.wkid,wkt:e.wkt,isInverse:e.isInverse}))}getInverse(){const t=new s;t.steps=[];for(let e=this.steps.length-1;e>=0;e--){const n=this.steps[e];t.steps.push(n.getInverse())}return t}getGTListEntry(){let t="";for(const e of this.steps)t+=e.uid.toString()+",";return t!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=t),this._gtlistentry}assignCachedGe(t,e,n){this._cachedProjection[s.cacheKey(t,e)]=n}getCachedGeTransformation(t,e){let n="";for(const t of this.steps)n+=t.uid.toString()+",";n!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=n);const r=this._cachedProjection[s.cacheKey(t,e)];return void 0===r?null:r}}},69285:(t,e,n)=>{n.d(e,{k:()=>s});var r=n(67900),o=n(8744);function s(t,e,n){if(null==e||null==n||n.vcsWkid||(0,o.fS)(e,n))return null;const s=(0,r._R)(e)/(0,r._R)(n);if(1===s)return null;switch(t){case"point":case"esriGeometryPoint":return t=>function(t,e){t&&null!=t.z&&(t.z*=e)}(t,s);case"polyline":case"esriGeometryPolyline":return t=>function(t,e){if(t)for(const n of t.paths)for(const t of n)t.length>2&&(t[2]*=e)}(t,s);case"polygon":case"esriGeometryPolygon":return t=>function(t,e){if(t)for(const n of t.rings)for(const t of n)t.length>2&&(t[2]*=e)}(t,s);case"multipoint":case"esriGeometryMultipoint":return t=>function(t,e){if(t)for(const n of t.points)n.length>2&&(n[2]*=e)}(t,s);case"extent":case"esriGeometryEnvelope":return t=>function(t,e){t&&null!=t.zmin&&null!=t.zmax&&(t.zmin*=e,t.zmax*=e)}(t,s);default:return null}}}}]);
|