@arcgis/map-components 5.2.0-next.60 → 5.2.0-next.62
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/dist/cdn/2SZEQV37.js +2 -0
- package/dist/cdn/3WTBTYMS.js +2 -0
- package/dist/cdn/4ZHTGN7K.js +2 -0
- package/dist/cdn/55DP6FNP.js +2 -0
- package/dist/cdn/{X6K2RSPI.js → 5IYDETJ3.js} +1 -1
- package/dist/cdn/{WYZPOKJF.js → 7MH3SB7P.js} +1 -1
- package/dist/cdn/A2T36WPR.js +2 -0
- package/dist/cdn/AEIJFBBW.js +2 -0
- package/dist/cdn/{NRHOAASJ.js → APOCPBJG.js} +1 -1
- package/dist/cdn/AZFN3LR3.js +2 -0
- package/dist/cdn/{F3VS53GP.js → B4IHQKAA.js} +1 -1
- package/dist/cdn/{AFJW3C3J.js → CZ35ZBQO.js} +1 -1
- package/dist/cdn/DBA7NSTP.js +2 -0
- package/dist/cdn/{KEV6I36K.js → DJ5IUHJS.js} +1 -1
- package/dist/cdn/GU3M4JMW.js +2 -0
- package/dist/cdn/HFKN54XG.js +2 -0
- package/dist/cdn/{2JV5SN44.js → IDKRMHDS.js} +1 -1
- package/dist/cdn/{Y3X3K2RU.js → IYLOUQFV.js} +1 -1
- package/dist/cdn/{CJS5I43A.js → MZBHKC3U.js} +1 -1
- package/dist/cdn/{OMGRHB7H.js → ND6OMAWU.js} +1 -1
- package/dist/cdn/{KKBZEDN4.js → OIYQ43VS.js} +1 -1
- package/dist/cdn/{UX6QVJG6.js → ORL32J3S.js} +1 -1
- package/dist/cdn/{5W6NJGFF.js → QKCBSK73.js} +1 -1
- package/dist/cdn/{SCPSWHG4.js → QU6ARDF6.js} +1 -1
- package/dist/cdn/{QVOYYXIU.js → RLA7OC3V.js} +1 -1
- package/dist/cdn/{ALUQRMZW.js → RUI2QLEM.js} +1 -1
- package/dist/cdn/S3XR7KRN.js +2 -0
- package/dist/cdn/{T6CKYPI7.js → SADIYG5D.js} +1 -1
- package/dist/cdn/SRTPZO5Z.js +2 -0
- package/dist/cdn/U4S4I3VD.js +2 -0
- package/dist/cdn/{N2KU7FO4.js → UAA66BVA.js} +1 -1
- package/dist/cdn/VDTRRLON.js +2 -0
- package/dist/cdn/{CFIH5Y4K.js → YAXMVCUT.js} +1 -1
- package/dist/cdn/{5F6Q3XF5.js → ZV5BQFVT.js} +1 -1
- package/dist/cdn/assets/oriented-imagery-viewer-panoramic-viewer/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/action-utils.js +9 -9
- package/dist/chunks/graphicsLayerController.js +74 -0
- package/dist/chunks/utils3.js +13 -45
- package/dist/chunks/utils4.js +51 -0
- package/dist/chunks/zoom.js +32 -0
- package/dist/components/arcgis-aggregated-features/customElement.js +11 -11
- package/dist/components/arcgis-area-measurement-2d/customElement.d.ts +4 -4
- package/dist/components/arcgis-area-measurement-3d/customElement.d.ts +2 -2
- package/dist/components/arcgis-basemap-gallery/customElement.d.ts +2 -2
- package/dist/components/arcgis-basemap-layer-list/customElement.d.ts +2 -2
- package/dist/components/arcgis-basemap-layer-list-next/customElement.d.ts +2 -2
- package/dist/components/arcgis-basemap-toggle/customElement.d.ts +2 -2
- package/dist/components/arcgis-bookmarks/customElement.d.ts +2 -2
- package/dist/components/arcgis-building-explorer/customElement.d.ts +2 -2
- package/dist/components/arcgis-catalog-layer-list/customElement.d.ts +2 -2
- package/dist/components/arcgis-catalog-layer-list-next/customElement.d.ts +23 -18
- package/dist/components/arcgis-catalog-layer-list-next/customElement.js +125 -114
- package/dist/components/arcgis-clipboard/customElement.d.ts +2 -2
- package/dist/components/arcgis-compass/customElement.d.ts +2 -2
- package/dist/components/arcgis-coordinate-conversion/customElement.d.ts +2 -2
- package/dist/components/arcgis-coordinate-conversion-next/customElement.d.ts +2 -2
- package/dist/components/arcgis-daylight/customElement.d.ts +2 -2
- package/dist/components/arcgis-direct-line-measurement-3d/customElement.d.ts +2 -2
- package/dist/components/arcgis-directional-pad/customElement.d.ts +2 -2
- package/dist/components/arcgis-directions/customElement.d.ts +2 -2
- package/dist/components/arcgis-distance-measurement-2d/customElement.d.ts +2 -2
- package/dist/components/arcgis-editor/customElement.d.ts +3 -3
- package/dist/components/arcgis-elevation-profile/customElement.d.ts +2 -2
- package/dist/components/arcgis-expand/customElement.d.ts +2 -2
- package/dist/components/arcgis-feature/customElement.d.ts +2 -2
- package/dist/components/arcgis-feature-next/customElement.d.ts +2 -2
- package/dist/components/arcgis-feature-next/customElement.js +1 -1
- package/dist/components/arcgis-feature-relationship/customElement.js +1 -1
- package/dist/components/arcgis-feature-table/customElement.d.ts +2 -2
- package/dist/components/arcgis-feature-templates/customElement.d.ts +2 -2
- package/dist/components/arcgis-feature-utility-network-associations/customElement.js +1 -1
- package/dist/components/arcgis-features-next/customElement.d.ts +1 -1
- package/dist/components/arcgis-features-next/customElement.js +1 -1
- package/dist/components/arcgis-floor-filter/customElement.d.ts +2 -2
- package/dist/components/arcgis-grid-controls/customElement.d.ts +2 -2
- package/dist/components/arcgis-home/customElement.d.ts +2 -2
- package/dist/components/arcgis-layer-list/customElement.d.ts +2 -2
- package/dist/components/arcgis-layer-list-next/customElement.d.ts +2 -2
- package/dist/components/arcgis-legend/customElement.d.ts +2 -2
- package/dist/components/arcgis-line-of-sight/customElement.d.ts +2 -2
- package/dist/components/arcgis-link-chart-layout-switcher/customElement.d.ts +2 -2
- package/dist/components/arcgis-link-chart-nonspatial-visibility-toggle/customElement.d.ts +2 -2
- package/dist/components/arcgis-locate/customElement.d.ts +2 -2
- package/dist/components/arcgis-measurement/customElement.d.ts +2 -2
- package/dist/components/arcgis-multi-feature-form/customElement.d.ts +2 -2
- package/dist/components/arcgis-navigation-toggle/customElement.d.ts +2 -2
- package/dist/components/arcgis-oriented-imagery-viewer/customElement.d.ts +2 -2
- package/dist/components/arcgis-oriented-imagery-viewer-image-viewer/customElement.js +64 -132
- package/dist/components/arcgis-oriented-imagery-viewer-panoramic-viewer/customElement.d.ts +51 -0
- package/dist/components/arcgis-oriented-imagery-viewer-panoramic-viewer/customElement.js +1006 -0
- package/dist/components/arcgis-oriented-imagery-viewer-panoramic-viewer/index.d.ts +1 -0
- package/dist/components/arcgis-oriented-imagery-viewer-panoramic-viewer/index.js +5 -0
- package/dist/components/arcgis-oriented-imagery-viewer-panoramic-viewer/support/PanoramicMedia.d.ts +49 -0
- package/dist/components/arcgis-oriented-imagery-viewer-panoramic-viewer/support/PanoramicTilePlanner.d.ts +18 -0
- package/dist/components/arcgis-oriented-imagery-viewer-panoramic-viewer/support/PanoramicTileSource.d.ts +36 -0
- package/dist/components/arcgis-oriented-imagery-viewer-panoramic-viewer-zoom/customElement.d.ts +91 -0
- package/dist/components/arcgis-oriented-imagery-viewer-panoramic-viewer-zoom/customElement.js +93 -0
- package/dist/components/arcgis-oriented-imagery-viewer-panoramic-viewer-zoom/index.d.ts +1 -0
- package/dist/components/arcgis-oriented-imagery-viewer-panoramic-viewer-zoom/index.js +2 -0
- package/dist/components/arcgis-paste/customElement.d.ts +2 -2
- package/dist/components/arcgis-popup/customElement.d.ts +3 -3
- package/dist/components/arcgis-popup/customElement.js +1 -1
- package/dist/components/arcgis-presentation/customElement.d.ts +2 -2
- package/dist/components/arcgis-print/customElement.d.ts +2 -2
- package/dist/components/arcgis-print-dpi-input/customElement.js +1 -1
- package/dist/components/arcgis-print-export-button/customElement.js +1 -1
- package/dist/components/arcgis-print-format-select/customElement.js +1 -1
- package/dist/components/arcgis-print-main-panel/customElement.js +1 -1
- package/dist/components/arcgis-print-template-select/customElement.js +1 -1
- package/dist/components/arcgis-print-template-selector/customElement.js +1 -1
- package/dist/components/arcgis-scale-bar/customElement.d.ts +2 -2
- package/dist/components/arcgis-scale-range-slider/customElement.d.ts +2 -2
- package/dist/components/arcgis-search/customElement.d.ts +2 -2
- package/dist/components/arcgis-shadow-cast/customElement.d.ts +2 -2
- package/dist/components/arcgis-sketch/customElement.d.ts +2 -2
- package/dist/components/arcgis-slice/customElement.d.ts +2 -2
- package/dist/components/arcgis-slider-scale-range/customElement.d.ts +2 -2
- package/dist/components/arcgis-snapping-controls/customElement.d.ts +2 -2
- package/dist/components/arcgis-swipe/customElement.d.ts +2 -2
- package/dist/components/arcgis-table-list/customElement.d.ts +2 -2
- package/dist/components/arcgis-table-list-next/customElement.d.ts +2 -2
- package/dist/components/arcgis-time-bar/customElement.d.ts +5 -5
- package/dist/components/arcgis-time-bar/customElement.js +1 -1
- package/dist/components/arcgis-time-bar-slider/customElement.js +11 -11
- package/dist/components/arcgis-time-slider/customElement.d.ts +2 -2
- package/dist/components/arcgis-time-zone-label/customElement.d.ts +2 -2
- package/dist/components/arcgis-track/customElement.d.ts +2 -2
- package/dist/components/arcgis-utility-network-associations/customElement.d.ts +2 -2
- package/dist/components/arcgis-utility-network-trace/customElement.d.ts +2 -2
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +2 -2
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.d.ts +2 -2
- package/dist/components/arcgis-utility-network-trace-location/customElement.d.ts +2 -2
- package/dist/components/arcgis-utility-network-trace-location-list/customElement.d.ts +2 -2
- package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +2 -2
- package/dist/components/arcgis-utility-network-validate-topology/customElement.d.ts +2 -2
- package/dist/components/arcgis-video-player/customElement.d.ts +2 -2
- package/dist/components/arcgis-volume-measurement/customElement.d.ts +2 -2
- package/dist/components/arcgis-weather/customElement.d.ts +2 -2
- package/dist/components/arcgis-zoom/customElement.d.ts +2 -2
- package/dist/components/arcgis-zoom/customElement.js +21 -45
- package/dist/controllers/useT9n.d.ts +3 -0
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.d.ts +14 -0
- package/dist/loader.js +3 -1
- package/dist/types/lumina.d.ts +13 -0
- package/dist/types/preact.d.ts +15 -0
- package/dist/types/react.d.ts +17 -0
- package/dist/types/stencil.d.ts +13 -0
- package/package.json +4 -4
- package/dist/cdn/A5XIQWD5.js +0 -2
- package/dist/cdn/AK62SYBC.js +0 -2
- package/dist/cdn/D7DH54CE.js +0 -2
- package/dist/cdn/KBBYF7KD.js +0 -2
- package/dist/cdn/M4HY5VMM.js +0 -2
- package/dist/cdn/MBRWWICI.js +0 -2
- package/dist/cdn/OO6NV5GK.js +0 -2
- /package/dist/cdn/{MOJH7XEP.js → 3ZXNGXHC.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import j from"./NRHOAASJ.js";import{a as E}from"./OWAKPT2D.js";import i from"./XFH2TUXK.js";import h from"./MZWO5JYA.js";import f from"./XD52OHCM.js";import{a as y}from"./VJVKFKSG.js";import{b as Z,c as U}from"./32XG4IQO.js";import e from"./5W7XCJ5B.js";import{a as z}from"./PUAXDNBG.js";import d from"./EI6T7BKN.js";import c from"./7ICJOTUR.js";import{e as P,g as H}from"./A22AUGYH.js";import"./MZQT7KZP.js";import a from"./TWMQVARD.js";import"./QUZTFUWM.js";import{a as D,d as I}from"./XUSIBTEV.js";import{M as v,N as g,O as L,P as C,R as p,S as O,U as R,a as B,b as o,o as T,x as b}from"./XRPUXUOQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([W,q,X,{initializeProjection:J},{renderingSanitizer:M},{stripHTML:S},{substitute:m,formatNumber:A},{watch:c},,,,V,,,{d:k},{c:j,d:K}])=>{var Q=B`:host{display:flex;overflow:hidden;flex:1 1 auto}.root{--calcite-color-background: var(--calcite-color-foreground-1);display:flex;overflow:hidden;flex:1 1 auto;flex-direction:column}.root img{image-orientation:from-image}.flow-item-collapsed{--calcite-flow-item-header-border-block-end: none}.container{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1)}.container calcite-list{width:100%}.container:not(:empty,.content-hidden){padding:var(--arcgis-internal-padding-md, var(--calcite-spacing-md))}.root .arcgis-feature,.root .arcgis-feature-relationship,.root .arcgis-feature-utility-network-associations{background-color:transparent}.heading{word-break:break-word;word-wrap:break-word}.header,.footer{display:flex;align-items:center;justify-content:flex-end;background-color:var(--calcite-color-foreground-1)}.footer{flex:1}.pagination-text{padding-inline:var(--calcite-spacing-sm);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm)}.loader{align-self:center;padding-inline:var(--calcite-spacing-lg)}.pagination-action-bar{flex:1}.pagination-menu-button{padding-inline:var(--calcite-spacing-xxs);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.icon{display:inline-block;flex:0 0 var(--calcite-spacing-lg);width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.action-image{flex:0 0 var(--calcite-spacing-lg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain;width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.header{border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.content-feature{--calcite-flow-item-footer-padding: 0}.feature-menu-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.action-exit{transform:scaleX(-1)}.flow-item-drill-in{--calcite-flow-item-footer-padding: 0}`;function Y(_){return _?.declaredClass.startsWith("esri.layers.")??!1}function ee(_){if(!(!_||!("featureReduction"in _)))return _.featureReduction?.type}var te=V(X),N=class extends L{constructor(){super(...arguments),this._zoomToFeature=new W({icon:"magnifying-glass-plus",id:"zoom-to-feature",title:"{messages.zoom}"}),this._fetchFeaturesController=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&this.viewModel.featurePage!=null&&this.viewModel.featurePage++},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._featureMenuIntersectionObserverNode=null,this._focusTrapNode=v(),this._focusTrapAnimationFrameId=null,this._rootFlowItemNode=v(),this._featureMenuViewportNode=v(),this._actionBarMenuNode=v(),this._flowContainerNode=v(),this._aggregatedFeaturesComponent=v(),this.messages=z(),this._selectedFeatureComponent=v(),this._direction=P(),this._cancelOpenRelatedFeature=()=>{this._openRelatedFeatureAbortController=y(this._openRelatedFeatureAbortController)},this._openRelatedFeatureAbortController=null,this.flowItems=new q,this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._aggregatedFeaturesLoading=!1,this._hasActionsStartSlotContent=!1,this._hasActionsEndSlotContent=!1,this.viewModel=te(this),this.actions=this.viewModel.actions,this.active=this.viewModel.active,this.autoDestroyDisabled=!1,this.focusTrapEnabled=!1,this.collapsed=!1,this.content=this.viewModel.content,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.effectiveHeading=this.viewModel.effectiveHeading,this.featureCount=this.viewModel.featureCount,this.featureMenuOpen=!1,this.featureNavigationTop=!1,this.features=this.viewModel.features,this.featuresPerPage=this.viewModel.featuresPerPage,this.featureItemAbilities=this.viewModel.featureItemAbilities,this.goToOverride=this.viewModel.goToOverride,this.headerActions=new q,this.heading=this.viewModel.heading,this.headingLevel=2,this.hideActionBar=!1,this.hideCloseButton=!1,this.hideFeatureMenuHeading=!1,this.hideFeatureNavigation=!1,this.hideFeatureListLayerTitle=!1,this.hideHeading=!1,this.hideSelectFeature=!1,this.hideSpinner=!1,this.hideContent=!1,this.chartAnimationDisabled=this.viewModel.featureItemAbilities?.chartAnimation,this.hideAttachmentsContent=this.viewModel.featureItemAbilities?.attachmentsContent,this.hideCustomContent=this.viewModel.featureItemAbilities?.customContent,this.hideExpressionContent=!1,this.hideFieldsContent=this.viewModel.featureItemAbilities?.fieldsContent,this.hideMediaContent=this.viewModel.featureItemAbilities?.mediaContent,this.hideRelationshipContent=this.viewModel.featureItemAbilities?.relationshipContent,this.hideTextContent=this.viewModel.featureItemAbilities?.textContent,this.hideUtilityNetworkContent=this.viewModel.featureItemAbilities?.utilityNetworkAssociationsContent,this.hideLastEditedInfo=!1,this.highlightDisabled=this.viewModel.highlightEnabled,this.includeDefaultActionsDisabled=this.viewModel.includeDefaultActions,this.initialDisplayMode=this.viewModel.initialDisplayMode,this.location=this.viewModel.location,this.map=this.viewModel.map,this.open=this.viewModel.open,this.promises=this.viewModel.promises,this.responsiveActionsEnabled=!1,this.selectedFeature=this.viewModel.selectedFeature,this.selectedFeatureIndex=this.viewModel.selectedFeatureIndex,this.showCollapseButton=!1,this.spatialReference=this.viewModel.spatialReference,this.state=this.viewModel.state,this.timeZone=this.viewModel.timeZone,this.updateLocationEnabled=this.viewModel.updateLocationEnabled,this.view=this.viewModel.view,this.arcgisPropertyChange=H()("active","collapsed","effectiveHeading","featureCount","featureMenuOpen","features","promises","selectedDrillInFeature","selectedFeature","selectedFeatureComponent","selectedFeatureIndex","state","open"),this.arcgisReady=b(),this.arcgisClose=b(),this.arcgisTriggerAction=b()}static{this.properties={_openRelatedFeatureAbortController:16,flowItems:16,_aggregatedFeatureCount:16,_selectedAggregatedFeatureIndex:16,_aggregatedFeaturesLoading:16,_hasActionsStartSlotContent:16,_hasActionsEndSlotContent:16,_hideActionText:16,_featureNavigationVisible:16,_isCollapsed:16,_collapseEnabled:16,_featureFlowItemSelected:16,viewModel:0,actions:0,active:0,autoDestroyDisabled:5,focusTrapEnabled:5,collapseDirection:1,collapsed:5,content:1,defaultPopupTemplateEnabled:5,effectiveHeading:32,featureCount:9,featureMenuOpen:5,featureMenuTitle:1,featureNavigationTop:5,features:0,featuresPerPage:9,featureItemAbilities:0,goToOverride:0,headerActions:0,heading:1,headingLevel:9,hideActionBar:5,hideCloseButton:5,hideFeatureMenuHeading:5,hideFeatureNavigation:5,hideFeatureListLayerTitle:5,hideHeading:5,hideSelectFeature:5,hideSpinner:5,hideContent:5,chartAnimationDisabled:5,hideAttachmentsContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,hideRelationshipContent:5,hideTextContent:5,hideUtilityNetworkContent:5,hideLastEditedInfo:5,highlightDisabled:5,icon:1,includeDefaultActionsDisabled:5,initialDisplayMode:1,label:1,location:0,map:0,messageOverrides:0,open:5,referenceElement:1,promises:0,responsiveActionsEnabled:5,selectedDrillInFeature:32,selectedFeature:0,selectedFeatureComponent:32,selectedFeatureIndex:9,showCollapseButton:5,spatialReference:0,state:32,timeZone:1,updateLocationEnabled:5,view:0}}static{this.styles=Q}get _hideActionText(){if(!this.responsiveActionsEnabled)return!1;let e=this.viewModel.view?.widthBreakpoint;return e==="xsmall"||e==="small"||e==="medium"}get _featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&!!this.viewModel.selectedFeature&&!this.hideFeatureNavigation}get _isCollapsed(){return this._collapseEnabled&&this.collapsed}get _collapseEnabled(){return this.showCollapseButton&&(this.initialDisplayMode==="list"||!!(this.heading||this.viewModel.selectedFeatureItem?.heading)&&!!(this.content||this.viewModel.selectedFeatureItem?.content))}get _featureFlowItemSelected(){return this.initialDisplayMode==="list"?!!this.selectedFeature:!this.featureMenuOpen}clear(){this.viewModel.clear()}close(){this.open=!1}async destroy(){await this.manager.destroy(),this._removeSpinner(this.referenceElement),this._cancelOpenRelatedFeature(),this._cancelToggleFocusTrapAnimationFrame(),this._removeFlowItems(),this._unobserveFeatureMenuObserver(),this._cancelFetchingFeatures(),this._featureMenuIntersectionObserver?.disconnect()}async fetchFeatures(e,t){this._cancelFetchingFeatures();let{signal:a}=t??{},i=new AbortController,{signal:s}=i,n=a?AbortSignal.any([s,a]):s;if(this._fetchFeaturesController=i,!e&&this.view&&this.location&&(await J(this.location.spatialReference,this.view.spatialReference,null,{signal:n}),e=this.view.toScreen(this.location)??void 0),!e)return;let r=await this.viewModel.fetchFeatures(e,{...t,signal:n});this.location=r.location,this.promises=r.pendingFeatures}next(){this.viewModel.next()}previous(){this.viewModel.previous()}async setFocus(){await this._focusTrapNode.value?.setFocus()}connectedCallback(){super.connectedCallback(),this._createSpinner()}disconnectedCallback(){super.disconnectedCallback(),this._cancelToggleFocusTrapAnimationFrame(),this._removeSpinner(this.referenceElement)}loaded(){this.manager.onLifecycle(()=>[c(()=>this.viewModel?.active,()=>this._toggleFocusTrap()),c(()=>this.viewModel?.selectedFeatureIndex,(e,t)=>this._selectedFeatureIndexUpdated(e,t)),c(()=>this.viewModel?.view?.scale,()=>this._viewScaleChange()),c(()=>this.viewModel?.view,(e,t)=>t&&this._viewChange()),c(()=>this._spinnerEl?.screenLocation,()=>this._closeOpenActionMenu()),c(()=>this.selectedFeatureComponent?.viewModel,()=>this._removeFlowItems()),c(()=>this.viewModel?.featureItems,()=>this._featureMenuViewportScrollTop()),c(()=>this.flowItems.length,()=>this._syncSelectedDrillInFeature()),c(()=>[this.flowItems?.length,this.featureMenuOpen],()=>{this.setFocus()}),c(()=>this.viewModel.aggregatedFeaturesEnabled,e=>{e||(this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._aggregatedFeaturesLoading=!1,this._removeFlowItems())}),c(()=>this.referenceElement,(e,t)=>{this._removeSpinner(t),this._createSpinner()},{initial:!0}),c(()=>[this.hideSpinner,this.viewModel?.view,this.viewModel?.location,this.viewModel?.waitingForResult,this.viewModel?.open],()=>this._createSpinner(),{initial:!0})])}updated(){let e=this._selectedFeatureComponent.value??void 0;this.selectedFeatureComponent!==e&&T(()=>this.selectedFeatureComponent=e)}_toggleFocusTrap(){this._cancelToggleFocusTrapAnimationFrame(),this._focusTrapAnimationFrameId=requestAnimationFrame(()=>{this._focusTrapAnimationFrameId=null,this.viewModel.active?this._focusTrapNode.value?.activate():this._focusTrapNode.value?.deactivate()})}_cancelToggleFocusTrapAnimationFrame(){this._focusTrapAnimationFrameId!=null&&(cancelAnimationFrame(this._focusTrapAnimationFrameId),this._focusTrapAnimationFrameId=null)}_cancelFetchingFeatures(){this._fetchFeaturesController=y(this._fetchFeaturesController)}_handleClose(){this.close(),this.arcgisClose.emit()}_groupResultsByLayer(){let{featureItems:e}=this.viewModel,t=new Map;return e.forEach(a=>{let i=a?.graphic;if(!i)return;let s=k(i),n=Y(s)?s:null,r=t.get(n);r||(r=[],t.set(n,r)),r.push(a)}),t}_handleCollapseToggle(){this.collapsed=!this.collapsed}async _openRelatedFeature(e){this._cancelOpenRelatedFeature();let t=new AbortController;if(this._openRelatedFeatureAbortController=t,await e.updateGeometry(),t.signal.aborted)return;let a=e.graphic,i=a?.geometry;if(i==null||a==null){this._openRelatedFeatureAbortController=null;return}if(this._removeFlowItems(),await this.viewModel.zoomTo({target:i}),t.signal.aborted)return;let s=await $arcgis.t(m=>m[0],"geometry/operators/labelPointOperator");if(t.signal.aborted)return;let n=s.execute(i);n!=null&&(this.location=n),this.features=[a],this.open=!0,await this.setFocus(),this._openRelatedFeatureAbortController=null}_handlePaginationMenuButton(){this._updateFeatureMenu()}_openFeatureMenu(){this._updateFeatureMenu(!0)}_closeFeatureMenu(){this._updateFeatureMenu(!1)}_updateFeatureMenu(e=!this.featureMenuOpen){this.featureMenuOpen=e}_previousFeature(){this.viewModel.previous()}_nextFeature(){this.viewModel.next()}_handleFeatureBack(){this.initialDisplayMode==="list"?(this.selectedFeatureIndex=-1,this.setFocus()):this._openFeatureMenu()}_handleFeatureMenuBack(){this.initialDisplayMode==="list"?(this.selectedFeatureIndex=-1,this.setFocus()):this.featureMenuOpen&&this._closeFeatureMenu()}_setActiveFeature(e){let{viewModel:t}=this;t.activeFeature=t.features?.[e]||null}_removeActiveFeature(){this.viewModel.activeFeature=null}_selectFeature(e){this.viewModel.selectedFeatureIndex=e,this.initialDisplayMode==="feature"?this._handleFeatureMenuBack():this.setFocus()}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){this._unobserveFeatureMenuObserver(),e&&this._featureMenuIntersectionObserver.observe(e),this._featureMenuIntersectionObserverNode=e}_getActionTitle(e){let{messages:t,selectedFeature:a}=this,{id:i}=e,s=a?.attributes,n=e.title??"",r=i==="zoom-to-feature"?m(n,{messages:t}):i==="remove-selected-feature"?m(n,{messages:t}):i==="zoom-to-clustered-features"?m(n,{messages:t}):i==="browse-aggregated-features"?m(n,{messages:t}):e.title;return r&&s?m(r,s):r??""}_onMainKeydown(e){let{key:t}=e;U(t,this._direction)&&(e.stopPropagation(),this._handleFeatureMenuBack(),this.previous(),this.setFocus()),Z(t,this._direction)&&(e.stopPropagation(),this._handleFeatureMenuBack(),this.next(),this.setFocus())}_featureMenuViewportScrollTop(){this._featureMenuViewportNode.value?.scrollContentTo({top:0})}_selectedFeatureIndexUpdated(e,t){let{featureCount:a,waitingForResult:i}=this.viewModel;i||!a||e===t||e===-1||(this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._removeFlowItems(),this._rootFlowItemNode.value?.scrollContentTo({top:0}))}_triggerAction(e){e.disabled||(e?.type==="toggle"&&(e.value=!e.value),K(e,this.viewModel),this.arcgisTriggerAction.emit({action:e}))}_viewScaleChange(){let{selectedFeature:e}=this;!e?.isAggregate||ee(k(e))!=="cluster"||(this.viewModel.aggregatedFeaturesEnabled=!1,this.open=!1,this.clear())}_viewChange(){this.viewModel.clear(),this.open=!1,this._aggregatedFeatureCount=0,this._removeFlowItems()}_handleAggregatedFeaturesPropertyChange({detail:e,target:t}){e.name==="aggregatedFeatureCount"&&(this._aggregatedFeatureCount=t.aggregatedFeatureCount),e.name==="selectedAggregatedFeatureIndex"&&(this._selectedAggregatedFeatureIndex=t.selectedAggregatedFeatureIndex,this._syncSelectedDrillInFeature()),e.name==="loading"&&(this._aggregatedFeaturesLoading=t.loading)}_closeOpenActionMenu(){let{_actionBarMenuNode:e}=this;e.value&&(e.value.menuOpen=!1)}_syncSelectedDrillInFeature(){let e=this.flowItems.getItemAt(this.flowItems.length-1);T(()=>this.selectedDrillInFeature=e?.graphic??void 0)}_removeFlowItems(){this.viewModel.aggregatedFeaturesEnabled=!1,this.flowItems?.destroyAll()}_getDrillInFlowItemDescription(e){switch(e.flowType){case"feature":case"feature-association":case"feature-utility-network-associations":case"feature-utility-network-association-type":return e.description;case"feature-relationship":return e.allItemsDescription}}_handleDrillInBackClick(){this.flowItems?.pop()?.destroy()}_getHeading(){let{effectiveHeading:e}=this.viewModel;return!this.hideHeading&&e?e:""}_handleActionsStartSlotChange(e){this._hasActionsStartSlotContent=D(e)}_handleActionsEndSlotChange(e){this._hasActionsEndSlotContent=D(e)}_removeSpinner(e){e?.manager?.component?.extraContent?.remove(this._spinnerEl),this._spinnerEl=void 0}_createSpinner(){let e=this.referenceElement;e&&(this._removeSpinner(e),this._spinnerEl=O(o`<arcgis-spinner .label=${this.messages.loading??""} .trackLocation=${!this.hideSpinner&&this.viewModel.open&&this.viewModel?.waitingForResult} .location=${this.viewModel?.location??void 0} .view=${this.viewModel?.view??void 0}></arcgis-spinner>`),e.manager?.component?.extraContent?.add(this._spinnerEl))}render(){return o`<div class="root" @keydown=${this._onMainKeydown}><calcite-focus-trap .focusTrapDisabled=${!this.focusTrapEnabled} ${g(this._focusTrapNode)}>${this._renderHeader()}${this._renderContentContainer()}</calcite-focus-trap></div>`}_renderFeatureNavigation(){return[this._renderPagination(()=>this._previousFeature(),()=>this._nextFeature()),this.initialDisplayMode==="list"?this._renderFeaturePaginationText(this.viewModel.featureCount,this.viewModel.selectedFeatureIndex):this._renderFeatureMenuButton()]}_renderHeader(){return this.featureNavigationTop&&this._featureNavigationVisible?o`<div class="header">${this._renderFeatureNavigation()}</div>`:null}_renderFooter(){return!this.featureNavigationTop&&this._featureNavigationVisible?o`<div class="footer" slot=footer>${this._renderFeatureNavigation()}</div>`:null}_renderFeaturePaginationText(e,t){let{messages:a}=this;return o`<div class="pagination-text">${m(a.pageText??"",{index:A(t+1),total:A(e)})}</div>`}_renderFeatureMenuButton(){let{messages:e,viewModel:t}=this,{featureCount:a,selectedFeatureIndex:i,pendingPromisesCount:s}=t;return o`<calcite-action class="pagination-menu-button" icon=list .label=${e.selectFeature} .loading=${s>0} @click=${this._handlePaginationMenuButton} .text=${m(e.pageText??"",{index:A(i+1),total:A(a)})} text-enabled title=${e.selectFeature??p}></calcite-action>`}_renderPagination(e,t){let{previous:a,next:i}=this.messages;return o`<calcite-action-bar class="pagination-action-bar" expand-disabled layout=horizontal overflow-actions-disabled scale=s><calcite-action-group scale=s><calcite-action class="pagination-previous" icon=chevron-left icon-flip-rtl .label=${a??""} @click=${e} .text=${a??""} title=${a??""??p}></calcite-action><calcite-action icon=chevron-right icon-flip-rtl .label=${i??""} @click=${t} .text=${i??""} title=${i??""??p}></calcite-action></calcite-action-group></calcite-action-bar>`}_renderFeatureMenuItem(e,t){let{initialDisplayMode:a}=this,{selectedFeatureItem:i}=this.viewModel,s=e===i;return o`<calcite-list-item @blur=${this._removeActiveFeature} @focus=${()=>this._setActiveFeature(t)} @mouseleave=${this._removeActiveFeature} @mouseover=${()=>this._setActiveFeature(t)} .selected=${s} @calciteListItemSelect=${()=>this._selectFeature(t)}><span .innerHTML=${(M.sanitize(e.heading)||this.messages.untitled)??""} slot=content></span>${a==="list"?o`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`:null}</calcite-list-item>`}_renderFeatureMenu(){let{messages:e,viewModel:t}=this,a=this._groupResultsByLayer(),i=new Map;t.featureItems.forEach((n,r)=>i.set(n,r));let s=this.initialDisplayMode==="list"?"none":"single";return t.featureItems.length?o`<calcite-list display-mode=flat .label=${e?.featuresList??""} selection-appearance=icon .selectionMode=${s}>${Array.from(a.keys(),n=>{let r=a.get(n)?.map(l=>{let h=i.get(l);return h==null?null:this._renderFeatureMenuItem(l,h)}),d=n?n.title??this.messages.untitled:null;return!this.hideFeatureListLayerTitle&&d!==null?E(n??"map-graphics",o`<calcite-list-item-group .heading=${d}>${r}</calcite-list-item-group>`):r})}</calcite-list>`:null}_renderHeaderAction(e){let t=e.title||"";return e.visible?o`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .indicator=${e.active} .loading=${e.active} @click=${()=>this._triggerAction(e)} slot=header-actions-end .text=${t} title=${t??p}></calcite-action>`:null}_renderHeaderActions(){return this.headerActions.map(e=>this._renderHeaderAction(e)).toArray()}_renderContentFeature(e){let{headingLevel:t,hideCloseButton:a,_isCollapsed:i,_collapseEnabled:s,featureNavigationTop:n,initialDisplayMode:r,selectedFeature:d,hideHeading:l}=this,{active:h,selectedFeatureItem:f,content:F}=this.viewModel,u=this._getHeading();if(r==="list"&&!d)return null;let w=f?!f.content:!F;return o`<calcite-flow-item class=${C(I({"content-feature":!0,"flow-item-collapsed":i}))} .closable=${!a} .closed=${!h} .collapsed=${i} .collapseDirection=${this.collapseDirection??(n?"down":"up")} .collapsible=${s} .headingLevel=${t} .selected=${e} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand}} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} .heading=${!l&&u?S(u):void 0} ${g(this._rootFlowItemNode)}>${!l&&u?o`<div slot=heading><div .innerHTML=${M.sanitize(u??"")??""}></div></div>`:null}${this._renderHeaderActions()}${this._renderActionBar()}<div class=${C(I("container","content-container",{"content-hidden":w}))}>${this._renderContent()}</div>${this._renderFooter()}</calcite-flow-item>`}_renderFeatureMenuContainer(){let{viewModel:e,hideCloseButton:t,featureMenuTitle:a,messages:i,initialDisplayMode:s,featureMenuOpen:n,_featureFlowItemSelected:r,_collapseEnabled:d,_isCollapsed:l,featureNavigationTop:h,headingLevel:f}=this,{active:F,featureItems:u,pendingPromisesCount:w}=e,x=a??i.selectFeature;if(s==="feature"&&!n)return null;let $=!r;return o`<calcite-flow-item class=${C(I({"flow-item-collapsed":l}))} .closable=${s==="list"&&!t} .closed=${!F} .collapsed=${s==="list"&&l} .collapseDirection=${this.collapseDirection??(h?"down":"up")} .collapsible=${s==="list"&&d} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand}} .description=${this.hideFeatureMenuHeading?void 0:m(i.total??"",{total:u.length})} .heading=${this.hideFeatureMenuHeading?void 0:x} .headingLevel=${f} .loading=${e.waitingForContents} .selected=${$} @calciteFlowItemBack=${G=>{G.preventDefault(),this._handleFeatureMenuBack()}} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${g(this._featureMenuViewportNode)}>${s==="list"?this._renderHeaderActions():null}${w>0?o`<calcite-loader class="loader" inline .label=${i.loading??""} slot=header-actions-end></calcite-loader>`:null}<div class="container">${$?this._renderFeatureMenu():null}</div><div class="feature-menu-observer" ${g(this._featureMenuIntersectionObserverCreated)}></div>${s==="feature"?o`<calcite-button scale=s appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full>${i.back}</calcite-button>`:null}</calcite-flow-item>`}_renderFlowItem(e,t){let{messages:a,hideCloseButton:i,hideSelectFeature:s,active:n,hideHeading:r}=this,d="graphic"in e&&"isFeatureFromTable"in e&&!e.isFeatureFromTable,l=d&&!s,h=e.flowType==="feature-association",f=a.returnToInitialFeature??"",F=a?.selectFeature,u=this._getActionTitle(this._zoomToFeature),w=!this.hideActionBar&&h&&d,x=e.flowType==="feature"&&this.viewModel.aggregatedFeaturesEnabled?o`<div class="footer" slot=footer>${this._renderPagination(()=>{this._aggregatedFeaturesComponent.value?.previous()},()=>{this._aggregatedFeaturesComponent.value?.next()})}${this._renderFeaturePaginationText(this._aggregatedFeatureCount,this._selectedAggregatedFeatureIndex)}</div>`:null;return o`<calcite-flow-item .closable=${!i} .closed=${!n} class="flow-item-drill-in" .description=${S(this._getDrillInFlowItemDescription(e)??"")} .heading=${r?void 0:S(e.heading??"")} .selected=${t} @calciteFlowItemBack=${$=>{$.preventDefault(),this._handleDrillInBackClick()}} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}>${r?null:o`<div slot=heading><div .innerHTML=${M.sanitize(e.heading??"")??""}></div></div>`}<div slot=description><div .innerHTML=${M.sanitize(this._getDrillInFlowItemDescription(e)??"")??""}></div></div><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${f??""} title=${f??""??p}></calcite-action>${l?o`<calcite-action icon=zoom-to-object @click=${()=>this._openRelatedFeature(e)} slot=header-actions-end .text=${F??""} title=${F??p}></calcite-action>`:null}${w?o`<calcite-action-bar expand-disabled expanded scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s><calcite-action .disabled=${this._zoomToFeature.disabled} .icon=${this._zoomToFeature.icon??void 0} .loading=${this._zoomToFeature.active} scale=s text-enabled .text=${u} title=${u??p} @click=${()=>j(this.viewModel,this._zoomToFeature,e)}></calcite-action></calcite-action-group></calcite-action-bar>`:null}<div class="container">${e}</div>${x}</calcite-flow-item>`}_renderContentContainer(){let e=this.flowItems?.toArray(),t=e.length>0,a=this.viewModel.aggregatedFeaturesEnabled&&this.viewModel.selectedFeature?.isAggregate&&!t,i=a&&e.length===0,s=e.length===0&&this._featureFlowItemSelected&&!a,n=e?.map((l,h)=>this._renderFlowItem(l,this._featureFlowItemSelected&&h===e.length-1)),r=this._renderBrowseAggregateContainer(!!i),d=this.initialDisplayMode==="list"?[this._renderFeatureMenuContainer(),this._renderContentFeature(s)]:[this._renderContentFeature(s),this._renderFeatureMenuContainer()];return o`<calcite-flow ${g(this._flowContainerNode)}>${d}${r}${n}</calcite-flow>`}_renderBrowseAggregateContainer(e){let{hideCloseButton:t,active:a,messages:i}=this,{selectedFeature:s}=this.viewModel;return this.viewModel.aggregatedFeaturesEnabled&&s?.isAggregate?o`<calcite-flow-item .selected=${e} .closable=${!t} .closed=${!a} .description=${this._aggregatedFeatureCount?m(i.total??"",{total:this._aggregatedFeatureCount}):""} .heading=${i.aggregatedFeatures} @calciteFlowItemBack=${n=>{n.preventDefault(),this.viewModel.aggregatedFeaturesEnabled=!1}} .loading=${this._aggregatedFeaturesLoading} @calciteFlowItemClose=${this._handleClose}><arcgis-aggregated-features .autoDestroyDisabled=${this.autoDestroyDisabled} .feature=${s??void 0} .flowItems=${this.flowItems} .map=${this.map??void 0} .messages=${i} @arcgisPropertyChange=${this._handleAggregatedFeaturesPropertyChange} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .view=${this.view??void 0} ${g(this._aggregatedFeaturesComponent)}></arcgis-aggregated-features><calcite-button appearance=transparent @click=${()=>this.viewModel.aggregatedFeaturesEnabled=!1} slot=footer-start scale=s width=full>${i.back}</calcite-button></calcite-flow-item>`:null}_renderActionBar(){let e=this.viewModel.selectedFeatureItem?.isFeatureFromTable,t=this.viewModel.allActions.toArray(),a=e&&!this.location?t.filter(s=>s.id!==this._zoomToFeature.id):t,i=!!a.length||this._hasActionsStartSlotContent||this._hasActionsEndSlotContent;return!this._isCollapsed&&!this.hideActionBar&&i?o`<calcite-action-bar expand-disabled .expanded=${!this._hideActionText} scale=s slot=action-bar><slot name=actions-start @slotchange=${this._handleActionsStartSlotChange}></slot><calcite-action-group overlay-positioning=fixed scale=s ${g(this._actionBarMenuNode)}>${this._renderActions(a)}</calcite-action-group><slot name=actions-end @slotchange=${this._handleActionsEndSlotChange}></slot></calcite-action-bar>`:null}_renderActions(e){return e.map(t=>{let a=this._getActionTitle(t);return o`<calcite-action .active=${t.type==="toggle"?t.value:!1} .disabled=${t.disabled} .icon=${t.icon??void 0} .loading=${t.active} scale=s .textEnabled=${!this._hideActionText} .text=${a??""} title=${a??p} .hidden=${!t.visible} @click=${()=>this._triggerAction(t)}></calcite-action>`})}_renderContent(){let{content:e,selectedFeatureItem:t}=this.viewModel;return t?o`<arcgis-feature-next .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${this.flowItems} .graphic=${t.graphic} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${g(this._selectedFeatureComponent)}></arcgis-feature-next>`:typeof e=="string"?E(e,o`<div .innerHTML=${M.sanitize(e)??""}></div>`):e??null}};R("arcgis-features-next",N);return N},"support/actions/ActionButton","core/Collection","popup/Features","applications/Components/featureUtils","applications/Components/sanitizerUtils","applications/Components/stringUtils","intl","core/reactiveUtils",a,c,d,e,f,h,i,j)
|
|
2
|
+
import j from"./APOCPBJG.js";import{a as E}from"./OWAKPT2D.js";import i from"./XFH2TUXK.js";import h from"./MZWO5JYA.js";import f from"./XD52OHCM.js";import{a as y}from"./VJVKFKSG.js";import{b as Z,c as U}from"./32XG4IQO.js";import e from"./5W7XCJ5B.js";import{a as z}from"./PUAXDNBG.js";import d from"./EI6T7BKN.js";import c from"./7ICJOTUR.js";import{e as P,g as H}from"./A22AUGYH.js";import"./MZQT7KZP.js";import a from"./TWMQVARD.js";import"./QUZTFUWM.js";import{a as D,d as I}from"./XUSIBTEV.js";import{M as v,N as g,O as L,P as C,R as p,S as O,U as R,a as B,b as o,o as T,x as b}from"./XRPUXUOQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([W,q,X,{initializeProjection:J},{renderingSanitizer:M},{stripHTML:S},{substitute:m,formatNumber:A},{watch:c},,,,V,,,{d:k},{c:j,d:K}])=>{var Q=B`:host{display:flex;overflow:hidden;flex:1 1 auto}.root{--calcite-color-background: var(--calcite-color-foreground-1);display:flex;overflow:hidden;flex:1 1 auto;flex-direction:column}.root img{image-orientation:from-image}.flow-item-collapsed{--calcite-flow-item-header-border-block-end: none}.container{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1)}.container calcite-list{width:100%}.container:not(:empty,.content-hidden){padding:var(--arcgis-internal-padding-md, var(--calcite-spacing-md))}.root .arcgis-feature,.root .arcgis-feature-relationship,.root .arcgis-feature-utility-network-associations{background-color:transparent}.heading{word-break:break-word;word-wrap:break-word}.header,.footer{display:flex;align-items:center;justify-content:flex-end;background-color:var(--calcite-color-foreground-1)}.footer{flex:1}.pagination-text{padding-inline:var(--calcite-spacing-sm);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm)}.loader{align-self:center;padding-inline:var(--calcite-spacing-lg)}.pagination-action-bar{flex:1}.pagination-menu-button{padding-inline:var(--calcite-spacing-xxs);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.icon{display:inline-block;flex:0 0 var(--calcite-spacing-lg);width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.action-image{flex:0 0 var(--calcite-spacing-lg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain;width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.header{border-block-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.content-feature{--calcite-flow-item-footer-padding: 0}.feature-menu-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.action-exit{transform:scaleX(-1)}.flow-item-drill-in{--calcite-flow-item-footer-padding: 0}`;function Y(_){return _?.declaredClass.startsWith("esri.layers.")??!1}function ee(_){if(!(!_||!("featureReduction"in _)))return _.featureReduction?.type}var te=V(X),N=class extends L{constructor(){super(...arguments),this._zoomToFeature=new W({icon:"magnifying-glass-plus",id:"zoom-to-feature",title:"{messages.zoom}"}),this._fetchFeaturesController=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&this.viewModel.featurePage!=null&&this.viewModel.featurePage++},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._featureMenuIntersectionObserverNode=null,this._focusTrapNode=v(),this._focusTrapAnimationFrameId=null,this._rootFlowItemNode=v(),this._featureMenuViewportNode=v(),this._actionBarMenuNode=v(),this._flowContainerNode=v(),this._aggregatedFeaturesComponent=v(),this.messages=z(),this._selectedFeatureComponent=v(),this._direction=P(),this._cancelOpenRelatedFeature=()=>{this._openRelatedFeatureAbortController=y(this._openRelatedFeatureAbortController)},this._openRelatedFeatureAbortController=null,this.flowItems=new q,this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._aggregatedFeaturesLoading=!1,this._hasActionsStartSlotContent=!1,this._hasActionsEndSlotContent=!1,this.viewModel=te(this),this.actions=this.viewModel.actions,this.active=this.viewModel.active,this.autoDestroyDisabled=!1,this.focusTrapEnabled=!1,this.collapsed=!1,this.content=this.viewModel.content,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.effectiveHeading=this.viewModel.effectiveHeading,this.featureCount=this.viewModel.featureCount,this.featureMenuOpen=!1,this.featureNavigationTop=!1,this.features=this.viewModel.features,this.featuresPerPage=this.viewModel.featuresPerPage,this.featureItemAbilities=this.viewModel.featureItemAbilities,this.goToOverride=this.viewModel.goToOverride,this.headerActions=new q,this.heading=this.viewModel.heading,this.headingLevel=2,this.hideActionBar=!1,this.hideCloseButton=!1,this.hideFeatureMenuHeading=!1,this.hideFeatureNavigation=!1,this.hideFeatureListLayerTitle=!1,this.hideHeading=!1,this.hideSelectFeature=!1,this.hideSpinner=!1,this.hideContent=!1,this.chartAnimationDisabled=this.viewModel.featureItemAbilities?.chartAnimation,this.hideAttachmentsContent=this.viewModel.featureItemAbilities?.attachmentsContent,this.hideCustomContent=this.viewModel.featureItemAbilities?.customContent,this.hideExpressionContent=!1,this.hideFieldsContent=this.viewModel.featureItemAbilities?.fieldsContent,this.hideMediaContent=this.viewModel.featureItemAbilities?.mediaContent,this.hideRelationshipContent=this.viewModel.featureItemAbilities?.relationshipContent,this.hideTextContent=this.viewModel.featureItemAbilities?.textContent,this.hideUtilityNetworkContent=this.viewModel.featureItemAbilities?.utilityNetworkAssociationsContent,this.hideLastEditedInfo=!1,this.highlightDisabled=this.viewModel.highlightEnabled,this.includeDefaultActionsDisabled=this.viewModel.includeDefaultActions,this.initialDisplayMode=this.viewModel.initialDisplayMode,this.location=this.viewModel.location,this.map=this.viewModel.map,this.open=this.viewModel.open,this.promises=this.viewModel.promises,this.responsiveActionsEnabled=!1,this.selectedFeature=this.viewModel.selectedFeature,this.selectedFeatureIndex=this.viewModel.selectedFeatureIndex,this.showCollapseButton=!1,this.spatialReference=this.viewModel.spatialReference,this.state=this.viewModel.state,this.timeZone=this.viewModel.timeZone,this.updateLocationEnabled=this.viewModel.updateLocationEnabled,this.view=this.viewModel.view,this.arcgisPropertyChange=H()("active","collapsed","effectiveHeading","featureCount","featureMenuOpen","features","promises","selectedDrillInFeature","selectedFeature","selectedFeatureComponent","selectedFeatureIndex","state","open"),this.arcgisReady=b(),this.arcgisClose=b(),this.arcgisTriggerAction=b()}static{this.properties={_openRelatedFeatureAbortController:16,flowItems:16,_aggregatedFeatureCount:16,_selectedAggregatedFeatureIndex:16,_aggregatedFeaturesLoading:16,_hasActionsStartSlotContent:16,_hasActionsEndSlotContent:16,_hideActionText:16,_featureNavigationVisible:16,_isCollapsed:16,_collapseEnabled:16,_featureFlowItemSelected:16,viewModel:0,actions:0,active:0,autoDestroyDisabled:5,focusTrapEnabled:5,collapseDirection:1,collapsed:5,content:1,defaultPopupTemplateEnabled:5,effectiveHeading:32,featureCount:9,featureMenuOpen:5,featureMenuTitle:1,featureNavigationTop:5,features:0,featuresPerPage:9,featureItemAbilities:0,goToOverride:0,headerActions:0,heading:1,headingLevel:9,hideActionBar:5,hideCloseButton:5,hideFeatureMenuHeading:5,hideFeatureNavigation:5,hideFeatureListLayerTitle:5,hideHeading:5,hideSelectFeature:5,hideSpinner:5,hideContent:5,chartAnimationDisabled:5,hideAttachmentsContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,hideRelationshipContent:5,hideTextContent:5,hideUtilityNetworkContent:5,hideLastEditedInfo:5,highlightDisabled:5,icon:1,includeDefaultActionsDisabled:5,initialDisplayMode:1,label:1,location:0,map:0,messageOverrides:0,open:5,referenceElement:1,promises:0,responsiveActionsEnabled:5,selectedDrillInFeature:32,selectedFeature:0,selectedFeatureComponent:32,selectedFeatureIndex:9,showCollapseButton:5,spatialReference:0,state:32,timeZone:1,updateLocationEnabled:5,view:0}}static{this.styles=Q}get _hideActionText(){if(!this.responsiveActionsEnabled)return!1;let e=this.viewModel.view?.widthBreakpoint;return e==="xsmall"||e==="small"||e==="medium"}get _featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&!!this.viewModel.selectedFeature&&!this.hideFeatureNavigation}get _isCollapsed(){return this._collapseEnabled&&this.collapsed}get _collapseEnabled(){return this.showCollapseButton&&(this.initialDisplayMode==="list"||!!(this.heading||this.viewModel.selectedFeatureItem?.heading)&&!!(this.content||this.viewModel.selectedFeatureItem?.content))}get _featureFlowItemSelected(){return this.initialDisplayMode==="list"?!!this.selectedFeature:!this.featureMenuOpen}clear(){this.viewModel.clear()}close(){this.open=!1}async destroy(){await this.manager.destroy(),this._removeSpinner(this.referenceElement),this._cancelOpenRelatedFeature(),this._cancelToggleFocusTrapAnimationFrame(),this._removeFlowItems(),this._unobserveFeatureMenuObserver(),this._cancelFetchingFeatures(),this._featureMenuIntersectionObserver?.disconnect()}async fetchFeatures(e,t){this._cancelFetchingFeatures();let{signal:a}=t??{},i=new AbortController,{signal:s}=i,n=a?AbortSignal.any([s,a]):s;if(this._fetchFeaturesController=i,!e&&this.view&&this.location&&(await J(this.location.spatialReference,this.view.spatialReference,null,{signal:n}),e=this.view.toScreen(this.location)??void 0),!e)return;let r=await this.viewModel.fetchFeatures(e,{...t,signal:n});this.location=r.location,this.promises=r.pendingFeatures}next(){this.viewModel.next()}previous(){this.viewModel.previous()}async setFocus(){await this._focusTrapNode.value?.setFocus()}connectedCallback(){super.connectedCallback(),this._createSpinner()}disconnectedCallback(){super.disconnectedCallback(),this._cancelToggleFocusTrapAnimationFrame(),this._removeSpinner(this.referenceElement)}loaded(){this.manager.onLifecycle(()=>[c(()=>this.viewModel?.active,()=>this._toggleFocusTrap()),c(()=>this.viewModel?.selectedFeatureIndex,(e,t)=>this._selectedFeatureIndexUpdated(e,t)),c(()=>this.viewModel?.view?.scale,()=>this._viewScaleChange()),c(()=>this.viewModel?.view,(e,t)=>t&&this._viewChange()),c(()=>this._spinnerEl?.screenLocation,()=>this._closeOpenActionMenu()),c(()=>this.selectedFeatureComponent?.viewModel,()=>this._removeFlowItems()),c(()=>this.viewModel?.featureItems,()=>this._featureMenuViewportScrollTop()),c(()=>this.flowItems.length,()=>this._syncSelectedDrillInFeature()),c(()=>[this.flowItems?.length,this.featureMenuOpen],()=>{this.setFocus()}),c(()=>this.viewModel.aggregatedFeaturesEnabled,e=>{e||(this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._aggregatedFeaturesLoading=!1,this._removeFlowItems())}),c(()=>this.referenceElement,(e,t)=>{this._removeSpinner(t),this._createSpinner()},{initial:!0}),c(()=>[this.hideSpinner,this.viewModel?.view,this.viewModel?.location,this.viewModel?.waitingForResult,this.viewModel?.open],()=>this._createSpinner(),{initial:!0})])}updated(){let e=this._selectedFeatureComponent.value??void 0;this.selectedFeatureComponent!==e&&T(()=>this.selectedFeatureComponent=e)}_toggleFocusTrap(){this._cancelToggleFocusTrapAnimationFrame(),this._focusTrapAnimationFrameId=requestAnimationFrame(()=>{this._focusTrapAnimationFrameId=null,this.viewModel.active?this._focusTrapNode.value?.activate():this._focusTrapNode.value?.deactivate()})}_cancelToggleFocusTrapAnimationFrame(){this._focusTrapAnimationFrameId!=null&&(cancelAnimationFrame(this._focusTrapAnimationFrameId),this._focusTrapAnimationFrameId=null)}_cancelFetchingFeatures(){this._fetchFeaturesController=y(this._fetchFeaturesController)}_handleClose(){this.close(),this.arcgisClose.emit()}_groupResultsByLayer(){let{featureItems:e}=this.viewModel,t=new Map;return e.forEach(a=>{let i=a?.graphic;if(!i)return;let s=k(i),n=Y(s)?s:null,r=t.get(n);r||(r=[],t.set(n,r)),r.push(a)}),t}_handleCollapseToggle(){this.collapsed=!this.collapsed}async _openRelatedFeature(e){this._cancelOpenRelatedFeature();let t=new AbortController;if(this._openRelatedFeatureAbortController=t,await e.updateGeometry(),t.signal.aborted)return;let a=e.graphic,i=a?.geometry;if(i==null||a==null){this._openRelatedFeatureAbortController=null;return}if(this._removeFlowItems(),await this.viewModel.zoomTo({target:i}),t.signal.aborted)return;let s=await $arcgis.t(m=>m[0],"geometry/operators/labelPointOperator");if(t.signal.aborted)return;let n=s.execute(i);n!=null&&(this.location=n),this.features=[a],this.open=!0,await this.setFocus(),this._openRelatedFeatureAbortController=null}_handlePaginationMenuButton(){this._updateFeatureMenu()}_openFeatureMenu(){this._updateFeatureMenu(!0)}_closeFeatureMenu(){this._updateFeatureMenu(!1)}_updateFeatureMenu(e=!this.featureMenuOpen){this.featureMenuOpen=e}_previousFeature(){this.viewModel.previous()}_nextFeature(){this.viewModel.next()}_handleFeatureBack(){this.initialDisplayMode==="list"?(this.selectedFeatureIndex=-1,this.setFocus()):this._openFeatureMenu()}_handleFeatureMenuBack(){this.initialDisplayMode==="list"?(this.selectedFeatureIndex=-1,this.setFocus()):this.featureMenuOpen&&this._closeFeatureMenu()}_setActiveFeature(e){let{viewModel:t}=this;t.activeFeature=t.features?.[e]||null}_removeActiveFeature(){this.viewModel.activeFeature=null}_selectFeature(e){this.viewModel.selectedFeatureIndex=e,this.initialDisplayMode==="feature"?this._handleFeatureMenuBack():this.setFocus()}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){this._unobserveFeatureMenuObserver(),e&&this._featureMenuIntersectionObserver.observe(e),this._featureMenuIntersectionObserverNode=e}_getActionTitle(e){let{messages:t,selectedFeature:a}=this,{id:i}=e,s=a?.attributes,n=e.title??"",r=i==="zoom-to-feature"?m(n,{messages:t}):i==="remove-selected-feature"?m(n,{messages:t}):i==="zoom-to-clustered-features"?m(n,{messages:t}):i==="browse-aggregated-features"?m(n,{messages:t}):e.title;return r&&s?m(r,s):r??""}_onMainKeydown(e){let{key:t}=e;U(t,this._direction)&&(e.stopPropagation(),this._handleFeatureMenuBack(),this.previous(),this.setFocus()),Z(t,this._direction)&&(e.stopPropagation(),this._handleFeatureMenuBack(),this.next(),this.setFocus())}_featureMenuViewportScrollTop(){this._featureMenuViewportNode.value?.scrollContentTo({top:0})}_selectedFeatureIndexUpdated(e,t){let{featureCount:a,waitingForResult:i}=this.viewModel;i||!a||e===t||e===-1||(this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._removeFlowItems(),this._rootFlowItemNode.value?.scrollContentTo({top:0}))}_triggerAction(e){e.disabled||(e?.type==="toggle"&&(e.value=!e.value),K(e,this.viewModel),this.arcgisTriggerAction.emit({action:e}))}_viewScaleChange(){let{selectedFeature:e}=this;!e?.isAggregate||ee(k(e))!=="cluster"||(this.viewModel.aggregatedFeaturesEnabled=!1,this.open=!1,this.clear())}_viewChange(){this.viewModel.clear(),this.open=!1,this._aggregatedFeatureCount=0,this._removeFlowItems()}_handleAggregatedFeaturesPropertyChange({detail:e,target:t}){e.name==="aggregatedFeatureCount"&&(this._aggregatedFeatureCount=t.aggregatedFeatureCount),e.name==="selectedAggregatedFeatureIndex"&&(this._selectedAggregatedFeatureIndex=t.selectedAggregatedFeatureIndex,this._syncSelectedDrillInFeature()),e.name==="loading"&&(this._aggregatedFeaturesLoading=t.loading)}_closeOpenActionMenu(){let{_actionBarMenuNode:e}=this;e.value&&(e.value.menuOpen=!1)}_syncSelectedDrillInFeature(){let e=this.flowItems.getItemAt(this.flowItems.length-1);T(()=>this.selectedDrillInFeature=e?.graphic??void 0)}_removeFlowItems(){this.viewModel.aggregatedFeaturesEnabled=!1,this.flowItems?.destroyAll()}_getDrillInFlowItemDescription(e){switch(e.flowType){case"feature":case"feature-association":case"feature-utility-network-associations":case"feature-utility-network-association-type":return e.description;case"feature-relationship":return e.allItemsDescription}}_handleDrillInBackClick(){this.flowItems?.pop()?.destroy()}_getHeading(){let{effectiveHeading:e}=this.viewModel;return!this.hideHeading&&e?e:""}_handleActionsStartSlotChange(e){this._hasActionsStartSlotContent=D(e)}_handleActionsEndSlotChange(e){this._hasActionsEndSlotContent=D(e)}_removeSpinner(e){e?.manager?.component?.extraContent?.remove(this._spinnerEl),this._spinnerEl=void 0}_createSpinner(){let e=this.referenceElement;e&&(this._removeSpinner(e),this._spinnerEl=O(o`<arcgis-spinner .label=${this.messages.loading??""} .trackLocation=${!this.hideSpinner&&this.viewModel.open&&this.viewModel?.waitingForResult} .location=${this.viewModel?.location??void 0} .view=${this.viewModel?.view??void 0}></arcgis-spinner>`),e.manager?.component?.extraContent?.add(this._spinnerEl))}render(){return o`<div class="root" @keydown=${this._onMainKeydown}><calcite-focus-trap .focusTrapDisabled=${!this.focusTrapEnabled} ${g(this._focusTrapNode)}>${this._renderHeader()}${this._renderContentContainer()}</calcite-focus-trap></div>`}_renderFeatureNavigation(){return[this._renderPagination(()=>this._previousFeature(),()=>this._nextFeature()),this.initialDisplayMode==="list"?this._renderFeaturePaginationText(this.viewModel.featureCount,this.viewModel.selectedFeatureIndex):this._renderFeatureMenuButton()]}_renderHeader(){return this.featureNavigationTop&&this._featureNavigationVisible?o`<div class="header">${this._renderFeatureNavigation()}</div>`:null}_renderFooter(){return!this.featureNavigationTop&&this._featureNavigationVisible?o`<div class="footer" slot=footer>${this._renderFeatureNavigation()}</div>`:null}_renderFeaturePaginationText(e,t){let{messages:a}=this;return o`<div class="pagination-text">${m(a.pageText??"",{index:A(t+1),total:A(e)})}</div>`}_renderFeatureMenuButton(){let{messages:e,viewModel:t}=this,{featureCount:a,selectedFeatureIndex:i,pendingPromisesCount:s}=t;return o`<calcite-action class="pagination-menu-button" icon=list .label=${e.selectFeature} .loading=${s>0} @click=${this._handlePaginationMenuButton} .text=${m(e.pageText??"",{index:A(i+1),total:A(a)})} text-enabled title=${e.selectFeature??p}></calcite-action>`}_renderPagination(e,t){let{previous:a,next:i}=this.messages;return o`<calcite-action-bar class="pagination-action-bar" expand-disabled layout=horizontal overflow-actions-disabled scale=s><calcite-action-group scale=s><calcite-action class="pagination-previous" icon=chevron-left icon-flip-rtl .label=${a??""} @click=${e} .text=${a??""} title=${a??""??p}></calcite-action><calcite-action icon=chevron-right icon-flip-rtl .label=${i??""} @click=${t} .text=${i??""} title=${i??""??p}></calcite-action></calcite-action-group></calcite-action-bar>`}_renderFeatureMenuItem(e,t){let{initialDisplayMode:a}=this,{selectedFeatureItem:i}=this.viewModel,s=e===i;return o`<calcite-list-item @blur=${this._removeActiveFeature} @focus=${()=>this._setActiveFeature(t)} @mouseleave=${this._removeActiveFeature} @mouseover=${()=>this._setActiveFeature(t)} .selected=${s} @calciteListItemSelect=${()=>this._selectFeature(t)}><span .innerHTML=${(M.sanitize(e.heading)||this.messages.untitled)??""} slot=content></span>${a==="list"?o`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`:null}</calcite-list-item>`}_renderFeatureMenu(){let{messages:e,viewModel:t}=this,a=this._groupResultsByLayer(),i=new Map;t.featureItems.forEach((n,r)=>i.set(n,r));let s=this.initialDisplayMode==="list"?"none":"single";return t.featureItems.length?o`<calcite-list display-mode=flat .label=${e?.featuresList??""} selection-appearance=icon .selectionMode=${s}>${Array.from(a.keys(),n=>{let r=a.get(n)?.map(l=>{let h=i.get(l);return h==null?null:this._renderFeatureMenuItem(l,h)}),d=n?n.title??this.messages.untitled:null;return!this.hideFeatureListLayerTitle&&d!==null?E(n??"map-graphics",o`<calcite-list-item-group .heading=${d}>${r}</calcite-list-item-group>`):r})}</calcite-list>`:null}_renderHeaderAction(e){let t=e.title||"";return e.visible?o`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .indicator=${e.active} .loading=${e.active} @click=${()=>this._triggerAction(e)} slot=header-actions-end .text=${t} title=${t??p}></calcite-action>`:null}_renderHeaderActions(){return this.headerActions.map(e=>this._renderHeaderAction(e)).toArray()}_renderContentFeature(e){let{headingLevel:t,hideCloseButton:a,_isCollapsed:i,_collapseEnabled:s,featureNavigationTop:n,initialDisplayMode:r,selectedFeature:d,hideHeading:l}=this,{active:h,selectedFeatureItem:f,content:F}=this.viewModel,u=this._getHeading();if(r==="list"&&!d)return null;let w=f?!f.content:!F;return o`<calcite-flow-item class=${C(I({"content-feature":!0,"flow-item-collapsed":i}))} .closable=${!a} .closed=${!h} .collapsed=${i} .collapseDirection=${this.collapseDirection??(n?"down":"up")} .collapsible=${s} .headingLevel=${t} .selected=${e} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand}} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} .heading=${!l&&u?S(u):void 0} ${g(this._rootFlowItemNode)}>${!l&&u?o`<div slot=heading><div .innerHTML=${M.sanitize(u??"")??""}></div></div>`:null}${this._renderHeaderActions()}${this._renderActionBar()}<div class=${C(I("container","content-container",{"content-hidden":w}))}>${this._renderContent()}</div>${this._renderFooter()}</calcite-flow-item>`}_renderFeatureMenuContainer(){let{viewModel:e,hideCloseButton:t,featureMenuTitle:a,messages:i,initialDisplayMode:s,featureMenuOpen:n,_featureFlowItemSelected:r,_collapseEnabled:d,_isCollapsed:l,featureNavigationTop:h,headingLevel:f}=this,{active:F,featureItems:u,pendingPromisesCount:w}=e,x=a??i.selectFeature;if(s==="feature"&&!n)return null;let $=!r;return o`<calcite-flow-item class=${C(I({"flow-item-collapsed":l}))} .closable=${s==="list"&&!t} .closed=${!F} .collapsed=${s==="list"&&l} .collapseDirection=${this.collapseDirection??(h?"down":"up")} .collapsible=${s==="list"&&d} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand}} .description=${this.hideFeatureMenuHeading?void 0:m(i.total??"",{total:u.length})} .heading=${this.hideFeatureMenuHeading?void 0:x} .headingLevel=${f} .loading=${e.waitingForContents} .selected=${$} @calciteFlowItemBack=${G=>{G.preventDefault(),this._handleFeatureMenuBack()}} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${g(this._featureMenuViewportNode)}>${s==="list"?this._renderHeaderActions():null}${w>0?o`<calcite-loader class="loader" inline .label=${i.loading??""} slot=header-actions-end></calcite-loader>`:null}<div class="container">${$?this._renderFeatureMenu():null}</div><div class="feature-menu-observer" ${g(this._featureMenuIntersectionObserverCreated)}></div>${s==="feature"?o`<calcite-button scale=s appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full>${i.back}</calcite-button>`:null}</calcite-flow-item>`}_renderFlowItem(e,t){let{messages:a,hideCloseButton:i,hideSelectFeature:s,active:n,hideHeading:r}=this,d="graphic"in e&&"isFeatureFromTable"in e&&!e.isFeatureFromTable,l=d&&!s,h=e.flowType==="feature-association",f=a.returnToInitialFeature??"",F=a?.selectFeature,u=this._getActionTitle(this._zoomToFeature),w=!this.hideActionBar&&h&&d,x=e.flowType==="feature"&&this.viewModel.aggregatedFeaturesEnabled?o`<div class="footer" slot=footer>${this._renderPagination(()=>{this._aggregatedFeaturesComponent.value?.previous()},()=>{this._aggregatedFeaturesComponent.value?.next()})}${this._renderFeaturePaginationText(this._aggregatedFeatureCount,this._selectedAggregatedFeatureIndex)}</div>`:null;return o`<calcite-flow-item .closable=${!i} .closed=${!n} class="flow-item-drill-in" .description=${S(this._getDrillInFlowItemDescription(e)??"")} .heading=${r?void 0:S(e.heading??"")} .selected=${t} @calciteFlowItemBack=${$=>{$.preventDefault(),this._handleDrillInBackClick()}} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}>${r?null:o`<div slot=heading><div .innerHTML=${M.sanitize(e.heading??"")??""}></div></div>`}<div slot=description><div .innerHTML=${M.sanitize(this._getDrillInFlowItemDescription(e)??"")??""}></div></div><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${f??""} title=${f??""??p}></calcite-action>${l?o`<calcite-action icon=zoom-to-object @click=${()=>this._openRelatedFeature(e)} slot=header-actions-end .text=${F??""} title=${F??p}></calcite-action>`:null}${w?o`<calcite-action-bar expand-disabled expanded scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s><calcite-action .disabled=${this._zoomToFeature.disabled} .icon=${this._zoomToFeature.icon??void 0} .loading=${this._zoomToFeature.active} scale=s text-enabled .text=${u} title=${u??p} @click=${()=>j(this.viewModel,this._zoomToFeature,e)}></calcite-action></calcite-action-group></calcite-action-bar>`:null}<div class="container">${e}</div>${x}</calcite-flow-item>`}_renderContentContainer(){let e=this.flowItems?.toArray(),t=e.length>0,a=this.viewModel.aggregatedFeaturesEnabled&&this.viewModel.selectedFeature?.isAggregate&&!t,i=a&&e.length===0,s=e.length===0&&this._featureFlowItemSelected&&!a,n=e?.map((l,h)=>this._renderFlowItem(l,this._featureFlowItemSelected&&h===e.length-1)),r=this._renderBrowseAggregateContainer(!!i),d=this.initialDisplayMode==="list"?[this._renderFeatureMenuContainer(),this._renderContentFeature(s)]:[this._renderContentFeature(s),this._renderFeatureMenuContainer()];return o`<calcite-flow ${g(this._flowContainerNode)}>${d}${r}${n}</calcite-flow>`}_renderBrowseAggregateContainer(e){let{hideCloseButton:t,active:a,messages:i}=this,{selectedFeature:s}=this.viewModel;return this.viewModel.aggregatedFeaturesEnabled&&s?.isAggregate?o`<calcite-flow-item .selected=${e} .closable=${!t} .closed=${!a} .description=${this._aggregatedFeatureCount?m(i.total??"",{total:this._aggregatedFeatureCount}):""} .heading=${i.aggregatedFeatures} @calciteFlowItemBack=${n=>{n.preventDefault(),this.viewModel.aggregatedFeaturesEnabled=!1}} .loading=${this._aggregatedFeaturesLoading} @calciteFlowItemClose=${this._handleClose}><arcgis-aggregated-features .autoDestroyDisabled=${this.autoDestroyDisabled} .feature=${s??void 0} .flowItems=${this.flowItems} .map=${this.map??void 0} .messages=${i} @arcgisPropertyChange=${this._handleAggregatedFeaturesPropertyChange} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .view=${this.view??void 0} ${g(this._aggregatedFeaturesComponent)}></arcgis-aggregated-features><calcite-button appearance=transparent @click=${()=>this.viewModel.aggregatedFeaturesEnabled=!1} slot=footer-start scale=s width=full>${i.back}</calcite-button></calcite-flow-item>`:null}_renderActionBar(){let e=this.viewModel.selectedFeatureItem?.isFeatureFromTable,t=this.viewModel.allActions.toArray(),a=e&&!this.location?t.filter(s=>s.id!==this._zoomToFeature.id):t,i=!!a.length||this._hasActionsStartSlotContent||this._hasActionsEndSlotContent;return!this._isCollapsed&&!this.hideActionBar&&i?o`<calcite-action-bar expand-disabled .expanded=${!this._hideActionText} scale=s slot=action-bar><slot name=actions-start @slotchange=${this._handleActionsStartSlotChange}></slot><calcite-action-group overlay-positioning=fixed scale=s ${g(this._actionBarMenuNode)}>${this._renderActions(a)}</calcite-action-group><slot name=actions-end @slotchange=${this._handleActionsEndSlotChange}></slot></calcite-action-bar>`:null}_renderActions(e){return e.map(t=>{let a=this._getActionTitle(t);return o`<calcite-action .active=${t.type==="toggle"?t.value:!1} .disabled=${t.disabled} .icon=${t.icon??void 0} .loading=${t.active} scale=s .textEnabled=${!this._hideActionText} .text=${a??""} title=${a??p} .hidden=${!t.visible} @click=${()=>this._triggerAction(t)}></calcite-action>`})}_renderContent(){let{content:e,selectedFeatureItem:t}=this.viewModel;return t?o`<arcgis-feature-next .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${this.flowItems} .graphic=${t.graphic} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${g(this._selectedFeatureComponent)}></arcgis-feature-next>`:typeof e=="string"?E(e,o`<div .innerHTML=${M.sanitize(e)??""}></div>`):e??null}};R("arcgis-features-next",N);return N},"support/actions/ActionButton","core/Collection","popup/FeatureContentCollection","applications/Components/featureUtils","applications/Components/sanitizerUtils","applications/Components/stringUtils","intl","core/reactiveUtils",a,c,d,e,f,h,i,j)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"./XEK22IDA.js";import j from"./
|
|
2
|
+
import"./XEK22IDA.js";import j from"./QKCBSK73.js";import i from"./APOCPBJG.js";import{a as G}from"./JCRPP54Z.js";import{a as x,b as B,c as O,g as R}from"./LDDAJOTV.js";import{a as A}from"./AR56PQPF.js";import{a as w}from"./OWAKPT2D.js";import g from"./XFH2TUXK.js";import f from"./MZWO5JYA.js";import e from"./XD52OHCM.js";import"./VJVKFKSG.js";import d from"./5W7XCJ5B.js";import{a as T}from"./PUAXDNBG.js";import{a as m}from"./JD74LG7K.js";import c from"./EI6T7BKN.js";import b from"./7ICJOTUR.js";import{g as D}from"./A22AUGYH.js";import"./MZQT7KZP.js";import a from"./TWMQVARD.js";import"./QUZTFUWM.js";import{d as F}from"./XUSIBTEV.js";import{B as y,M as C,N as $,O as E,P as u,R as M,U as L,b as o,x as h}from"./XRPUXUOQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([j,{watch:_,on:q},V,,,{a:P},U,,,,,{a:S,b:k,c:N}])=>{var b=G,H="nested",J=U(V),v=class extends E{constructor(){super(...arguments),this._lastDragDetail=null,this._rootGroupUid=`table-${y()}`,this._rootListRef=C(),this._selectedDragItemLayerUid=null,this.messages=T(),this.viewModel=J(this),this._canMove=({dragEl:e,fromEl:t,toEl:i},s)=>{let a=s==="pull"?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,l=this._getItem(e);if(!l||!("sortable"in l)||!l.sortable)return!1;let c=this._getItem(t),d=this._getLayerType(t),n=this._getItem(i),g=this._getLayerType(i),I=!!d&&!!g&&d===g,p={selected:l,from:c,to:n},f=t?.group,r=i?.group;return f&&r&&typeof a=="function"?a(p):I},this._onPanelOpen=()=>{this.requestUpdate()},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this.autoDestroyDisabled=!1,this.closed=!1,this.collapsed=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterText="",this.headingLevel=2,this.icon="table",this.listItemCreatedFunction=this.viewModel.listItemCreatedFunction,this.map=this.viewModel.map,this.minDragEnabledItems=O,this.minFilterItems=B,this.selectedItems=new j,this.selectionMode="none",this.tables=this.viewModel.tables,this.showCloseButton=!1,this.showCollapseButton=!1,this.showErrors=!1,this.showFilter=!1,this.showHeading=!1,this.hideStatusIndicators=!1,this.showTemporaryTableIndicators=!1,this.arcgisClose=h(),this.arcgisPropertyChange=D()("state"),this.arcgisReady=h(),this.arcgisFilterChange=h(),this.arcgisSelectedItemsChange=h(),this.arcgisTableItemsChanged=h(),this.arcgisTriggerAction=P(()=>this.viewModel,"trigger-action")}static{this.properties={_visibleItems:16,_openedPanelItems:16,_dragEnabled:16,_filterEnabled:16,view:0,autoDestroyDisabled:5,closed:5,referenceElement:1,collapsed:7,dragEnabled:5,filterPlaceholder:1,filterPredicate:0,filterText:1,headingLevel:9,icon:1,label:1,listItemCanGiveFunction:0,listItemCanReceiveFunction:0,listItemCreatedFunction:0,map:0,minDragEnabledItems:9,minFilterItems:9,selectedItems:0,selectionMode:1,state:32,tableItems:32,tables:0,showCloseButton:5,showCollapseButton:5,showErrors:5,showFilter:5,showHeading:5,hideStatusIndicators:5,showTemporaryTableIndicators:5,messageOverrides:0}}static{this.styles=[N,k]}get _visibleItems(){return this.tableItems?.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleItems.filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _dragEnabled(){return this.viewModel.totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this.viewModel.totalItems>=this.minFilterItems&&this.showFilter}get state(){return this.viewModel.state}get tableItems(){return this.viewModel.tableItems}async destroy(){await this.manager.destroy()}willUpdate(e){e.has("map")&&(this.viewModel.map=this.map),e.has("tables")&&(this.viewModel.tables=this.tables),e.has("listItemCreatedFunction")&&(this.viewModel.listItemCreatedFunction=this.listItemCreatedFunction)}loaded(){this.manager.onLifecycle(()=>[_(()=>this.view?.map,e=>{this.map||(this.viewModel.map=e)},{initial:!0}),q(()=>this.viewModel.tableItems,"change",()=>{R(this.selectedItems),this.arcgisTableItemsChanged.emit(),this.requestUpdate()},{initial:!0}),q(()=>this.selectedItems,"change",()=>this.arcgisSelectedItemsChange.emit()),_(()=>[this.viewModel.state,this.viewModel.totalItems],()=>this.requestUpdate(),{initial:!0}),_(()=>[this.filterPredicate,this._rootListRef.value],()=>this._setFilterPredicate())])}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}_getItem(e){if(e?.tagName.toLowerCase()==="calcite-list-item")return e.value;let t=e?.getAttribute("data-item");return t?this._findItemByUid(t):null}_findItemByUid(e){let t=this.tableItems?.toArray()??[];for(;t.length;){let i=t.shift();if(i){if(i.uid===e)return i;t.push(...i.children?.toArray()??[])}}return null}_getLayerType(e){return e?.getAttribute("data-layer-type")??null}_setFilterPredicate(){let e=this._rootListRef.value;e&&(e.filterPredicate=this.filterPredicate?t=>{let i=this._getItem(t);return i?this.filterPredicate(i):!1}:void 0)}_handlePanelFlowItemBack(e){e.open=!1}_sortTablesToIds(e,t){e?.sort((i,s)=>{let a=i.uid!=null?t.indexOf(i.uid):-1,l=s.uid!=null?t.indexOf(s.uid):-1;return a>l?-1:a<l?1:0})}_handleCalciteListDragEnd(e){let{fromEl:t,dragEl:i,oldIndex:s}=e;s==null||!t||!i||t.insertBefore(i,t.children[s])}_onCalciteListOrderChange(e){let{_lastDragDetail:t}=this,{toEl:i,fromEl:s,dragEl:a,newIndex:l}=e,c=t?.newIndex===l&&t?.dragEl===a&&t?.toEl===i&&t?.fromEl===s;if(!s||!i||c)return;this._lastDragDetail=e,this._selectedDragItemLayerUid=a.value;let d=Array.from(s.children).filter(n=>n?.matches("calcite-list-item")).map(n=>n.value.layer?.uid??"");this._sortTablesToIds(this.viewModel.tables,d)}_handleCalciteListChange(e){let{selectionMode:t,selectedItems:i}=this;if(t==="none")return;let s=e.target.selectedItems.map(a=>this._getItem(a)).filter(Boolean);i.removeAll(),i.addMany(s)}_handleFlowItemClose(){this.closed=!0,this.arcgisClose.emit(),this.autoDestroyDisabled||this.destroy()}render(){let{state:e}=this,t={[m.hidden]:e==="loading",[m.disabled]:e==="disabled"};return o`<div class=${u(F(m.widget,m.panel,t))}>${this._renderItems()}</div>`}_renderNoItemsMessage(){return o`<div slot=message>${this.messages.noItemsToDisplay}</div>`}_renderNoItems(){return o`<div class=${u(b.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this._renderNoItemsMessage()}</calcite-notice></div>`}_renderPanelFlowItems(){return A(this._openedPanelItems.toArray(),e=>e.uid,(e,t)=>{let{panel:i,title:s}=e,a=()=>this._handlePanelFlowItemBack(i);return o`<calcite-flow-item .description=${s} .heading=${i.title} .headingLevel=${this.headingLevel} .selected=${t===this._openedPanelItems.length-1} @calciteFlowItemBack=${l=>{l.preventDefault(),a()}}><arcgis-layer-list-item-panel .item=${e} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${a} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`})}_renderItems(){let{collapsed:e,_visibleItems:t,_filterEnabled:i,_rootGroupUid:s,showCloseButton:a,showCollapseButton:l,showHeading:c,_dragEnabled:d,selectionMode:n,filterText:g,filterPlaceholder:I,messages:p}=this,f=[o`<calcite-flow-item .closable=${a} .closed=${this.closed} .collapsed=${e} .collapsible=${l} .heading=${c?this.label??p.componentLabel:void 0} .headingLevel=${this.headingLevel} .selected=${!this._openedPanelItems.length} @calciteFlowItemClose=${()=>this._handleFlowItemClose()}>${t?.length?o`<calcite-list .canPull=${r=>this._canMove(r,"pull")} .canPut=${r=>this._canMove(r,"put")} data-layer-type=${s??M} .displayMode=${H} .dragEnabled=${d} .filterEnabled=${i} .filterPlaceholder=${I} .filterProps=${x} .filterText=${i?g:""} .group=${s} .label=${this.label??p.componentLabel} selection-appearance=border .selectionMode=${n} @calciteListChange=${this._handleCalciteListChange} @calciteListDragEnd=${r=>this._handleCalciteListDragEnd(r.detail)} @calciteListFilter=${r=>{this.filterText=r.currentTarget?.filterText??"",this.arcgisFilterChange.emit()}} @calciteListOrderChange=${r=>this._onCalciteListOrderChange(r.detail)} ${$(this._rootListRef)}>${t.toArray().map(r=>this._renderItem(r))}${i?o`<div class=${u(b.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this._renderNoItemsMessage()}</calcite-notice></div>`:null}</calcite-list>`:this._renderNoItems()}</calcite-flow-item>`,this._renderPanelFlowItems()];return this.closed?null:w("root-flow",o`<calcite-flow>${f}</calcite-flow>`)}_renderItem(e){return w(e.uid,S({canMove:this._canMove,css:b,displayMode:H,dragEnabled:this.dragEnabled,hideStatusIndicators:this.hideStatusIndicators,item:e,itemType:"table",listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,showErrors:this.showErrors,showFilter:this.showFilter,showTemporaryTableIndicators:this.showTemporaryTableIndicators,handleAction:(t,i)=>this._onTriggerAction(t,i),handlePanelOpen:this._onPanelOpen,handleSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,view:this.view}))}};L("arcgis-table-list-next",v);return v},"core/Collection","core/reactiveUtils","widgets/TableList/TableListViewModel",a,b,c,d,e,f,g,i,j)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{a as he,b as ce,c as me}from"./VDTRRLON.js";import c from"./3WTBTYMS.js";import b from"./SRTPZO5Z.js";import a from"./XD52OHCM.js";import"./VJVKFKSG.js";import{a as se}from"./PUAXDNBG.js";import"./A22AUGYH.js";import"./MZQT7KZP.js";import"./QUZTFUWM.js";import"./XUSIBTEV.js";import{M as H,N as U,O as ie,U as oe,a as ee,b as O,p as te}from"./XRPUXUOQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([K,ue,,ye,{on:be,when:Me,watch:G},{once:Y,on:de},_e,xe,ze,Se,Te,{property:S,subclass:Ce},Ie,Pe,Ae,Le,pe,Z,W,Re,X,{createSphere:Fe},Ne,$e,{b:I,d:ae,e:re},ne,{a:le}])=>{var ke=ee`:host{height:100%;--arcgis-view-color-focus: none}`;function Be(a,e=!0){let t=((e?a:a*180/Math.PI)%360+360)%360;return e?t:t*Math.PI/180}function Ee(a,e=!0){let t=e?a:a*180/Math.PI,o=Math.max(.5,Math.min(179.5,t));return e?o:o*Math.PI/180}function Ge(a,e){return new Promise((t,o)=>{if(a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA){t();return}e(Y(a,"canplay",t)),e(Y(a,"error",o))})}function De(a){return new ue({geometry:a,symbol:new ze({symbolLayers:new _e([new xe])})})}function V({data:a,center:e=Ve(),size:t=Ke,horizonPitch:o=0,horizonYaw:i=0,horizonRoll:s=0}){let r=e.clone();r.z=-t/2;let n=Fe(r,{size:t,densificationFactor:2,vertexSpace:"georeferenced",material:new Z({colorTexture:new W({data:a}),unlit:!0})});if(n.components?.at(0)?.set({trustSourceNormals:!0}),n.vertexAttributes.uv){let l=n.vertexAttributes.uv.length??0;for(let d=0;d<l;d++)n.vertexAttributes.uv[d*2+0]=1-n.vertexAttributes.uv[d*2+0]}return n.rotate(o,s,i,{origin:n.extent.center}),n.centerAt(r),n}var Ve=()=>new X({x:0,y:0,z:0,spatialReference:K.WebMercator}),Ke=1e3,Oe=114;function He(a,e,t){let o=new Map,i=Array.from(a.keys()).sort((h,u)=>h-u)[0],{maxCol:s,minCol:r,maxRow:n,minRow:l}=a.get(i),d=s-r+1,m=n-l+1,c=d*(t-1)+1;return Ue({maximumPyramidLevel:e,blockBoundary:a,baseCols:d,baseRows:m,vertexPerEdge:t,baseVertexPerRow:c},o),o}function Ue(a,e){let{maximumPyramidLevel:t,blockBoundary:o,baseCols:i,baseRows:s,vertexPerEdge:r,baseVertexPerRow:n}=a;for(let l=0;l<=t;l+=1){let{maxCol:d,minCol:m,maxRow:c,minRow:h}=o.get(l),u=d-m+1,p=c-h+1,f=i/u,v=s/p,g=r-1;Ye({minRow:h,minCol:m,numberOfRows:p,numberOfColumns:u,vertexLimit:g,rowStep:v,colStep:f,baseVertexPerRow:n,level:l},e)}}function Ye(a,e){let{minRow:t,minCol:o,numberOfRows:i,numberOfColumns:s,vertexLimit:r,rowStep:n,colStep:l,baseVertexPerRow:d,level:m}=a;for(let c=0;c<i;c+=1)for(let h=0;h<s;h+=1){let u=2*r*r,p=new Uint32Array(u*3),f=0,v=o+(s-1-h),g=t+c;for(let w=0;w<r;w+=1)for(let y=0;y<r;y+=1){let _=c*n*r+w*n,C=h*l*r+y*l,N=Math.round(_*d+C),P=Math.round(N+l),T=Math.round(N+n*d),$=Math.round(T+l);p[f++]=N,p[f++]=T,p[f++]=P,p[f++]=P,p[f++]=T,p[f++]=$}e.set(`${m}/${g}/${v}`,p)}}function Ze(a,e){let t=new Map,{lods:o,origin:i,size:[s,r]}=a,{xmin:n,ymin:l,xmax:d,ymax:m}=e;for(let{resolution:c,level:h}of o){let u=Math.floor((i.y-m)/(r*c)),p=Math.floor((i.y-l)/(r*c))-1,f=Math.floor((n-i.x)/(s*c)),v=Math.ceil((d-i.x)/(s*c))-1,g=p-u+1,w=v-f+1;if(g<=0||w<=0)continue;let y=360/w,_=180/g,C=Math.max(y/s,_/r);Number.isFinite(C)&&t.set(o.length-1-h,{minRow:u,maxRow:p,minCol:f,maxCol:v,resolution:c,pixelAngle:C})}return t}function We(a){return typeof a=="string"?Number.parseInt(a,10):a}function je(a){a.set("premultiplyAlpha",!0);let e=a.getAsRGBA();return new ImageData(e,a.width,a.height)}function qe(a,e,t){return(a*(t-1)+1)*(e*(t-1)+1)}var j=class{constructor(e){this._componentCache=new Map,this._tileAnchorMap=new Map,this._attachedComponentKeys=new Set,this._remappedFaceMap=new Map,this._levels=[],this._blockBoundaryMap=new Map,this.radius=500,this.vertexPerEdge=25,this.imageSize=[0,0],this.layer=e.layer}get _meshResolutionLevel(){let e=this._levels[0],t=Number.POSITIVE_INFINITY;for(let o of this._levels){let i=this._blockBoundaryMap.get(o);i&&i.pixelAngle<t&&(t=i.pixelAngle,e=o)}return e}get blockBoundaryMap(){return this._blockBoundaryMap}get levels(){return this._levels}get baseLevel(){let e=this._levels[0],t=Number.NEGATIVE_INFINITY;for(let o of this._levels){let i=this._blockBoundaryMap.get(o);i&&i.pixelAngle>t&&(t=i.pixelAngle,e=o)}return e}get maxLevel(){return Math.max(...this._levels)}async load(e){if(await this.layer.load(e),this._blockBoundaryMap=Ze(this.layer.tileInfo,this.layer.fullExtent),this._levels=[...this._blockBoundaryMap.keys()].sort((t,o)=>t-o),this._levels.length===0)throw new Error("No valid tile levels found for panoramic mesh generation.");return this.imageSize=[this.layer.fullExtent.width,this.layer.fullExtent.height],this._baseMesh=this._createBaseMesh(this.radius,this.vertexPerEdge),this}get baseMesh(){if(!this._baseMesh)throw new Error("Base mesh is not created yet.");return this._baseMesh}destroy(){this._faceMap?.clear(),this._remappedFaceMap.clear(),this._componentCache.clear(),this._attachedComponentKeys.clear(),this._tileAnchorMap.clear(),this._baseMesh?.destroy()}_createBaseMesh(e,t){if(!this._blockBoundaryMap.has(this._meshResolutionLevel))throw new Error(`No block boundaries found for mesh resolution level ${this._meshResolutionLevel}`);let{maxCol:o,minCol:i,maxRow:s,minRow:r}=this._blockBoundaryMap.get(this._meshResolutionLevel),n=s-r+1,l=o-i+1,d=qe(n,l,t),m=new Float64Array(d*3),c=new Float32Array(d*3),h=new Float32Array(d*2),u=l*(t-1)+1,p=l*(t-1);for(let _=0;_<d;_+=1){let C=Math.floor(_/u),N=_%u,P=1-N/(l*(t-1)),T=C/(n*(t-1)),$=180*(1-T),E=360*(P-.5),A=[Math.sin($*Math.PI/180)*Math.sin(E*Math.PI/180),Math.cos(E*Math.PI/180)*Math.sin($*Math.PI/180),-Math.cos($*Math.PI/180)];m[_*3]=e*A[0],m[_*3+1]=e*A[1],m[_*3+2]=e*A[2],c[_*3]=-A[0],c[_*3+1]=-A[1],c[_*3+2]=-A[2];let k=C*u;N===p&&(m[_*3]=m[k*3],m[_*3+1]=m[k*3+1],m[_*3+2]=m[k*3+2],c[_*3]=c[k*3],c[_*3+1]=c[k*3+1],c[_*3+2]=c[k*3+2]),h[_*2]=P,h[_*2+1]=T}this._faceMap=He(this._blockBoundaryMap,Math.max(...this._levels),t);let{remappedFaceMap:f,splitPosition:v,splitNormals:g,splitUv:w}=this._preSplitTileGeometry(m,c,h);this._remappedFaceMap=f;let y=new pe({faces:new Uint32Array([0,1,2]),name:"__placeholder__"});return y.set({trustSourceNormals:!0}),this._baseMesh=new Pe({components:[y],vertexAttributes:new Re({position:v,normal:g,uv:w}),spatialReference:{wkid:3857}}),this._baseMesh}_preSplitTileGeometry(e,t,o){let i=0;for(let c of this._faceMap.values()){let h=new Set;for(let u=0;u<c.length;u+=1)h.add(c[u]);i+=h.size}let s=new Float64Array(i*3),r=new Float32Array(i*3),n=new Float32Array(i*2),l=new Map,d=1e-8,m=0;for(let[c,h]of this._faceMap){let u=new Map,p=0,f=0,v=0,g=Number.POSITIVE_INFINITY,w=Number.NEGATIVE_INFINITY,y=Number.POSITIVE_INFINITY,_=Number.NEGATIVE_INFINITY;for(let L=0;L<h.length;L+=1){let R=h[L];if(u.has(R))continue;let x=R*2,z=o[x],F=o[x+1];z<g&&(g=z),z>w&&(w=z),F<y&&(y=F),F>_&&(_=F);let B=R*3;p+=e[B],f+=e[B+1],v+=e[B+2],u.set(R,m),m+=1}let C=w-g,N=_-y,P=Math.hypot(p,f,v),T=this.radius*1.01,[$,E]=this.layer.tileInfo?.size??[256,256],A=.5/$,k=.5/E;this._tileAnchorMap.set(c,P>0?[p/P*T,f/P*T,v/P*T]:[0,0,T]);for(let[L,R]of u){let x=L*3,z=R*3;s[z]=e[x],s[z+1]=e[x+1],s[z+2]=e[x+2],r[z]=t[x],r[z+1]=t[x+1],r[z+2]=t[x+2];let F=L*2,B=R*2,fe=o[F],ge=o[F+1],ve=C<d?.5:(fe-g)/C,we=N<d?.5:(ge-y)/N;n[B]=A+ve*(1-2*A),n[B+1]=k+we*(1-2*k)}let D=new Uint32Array(h.length);for(let L=0;L<h.length;L+=1){let R=u.get(h[L]);if(R==null)throw new Error(`Failed to remap face index for tile ${c}`);D[L]=R}l.set(c,D)}return{remappedFaceMap:l,splitPosition:s,splitNormals:r,splitUv:n}}getTileAnchor(e,t,o){let i=this._tileAnchorMap.get(`${e}/${t}/${o}`);if(!i)throw new Error(`No tile anchor found for level ${e}, row ${t}, column ${o}`);return i}loadComponent(e,t,o,i){let s=`${e}/${t}/${o}`;if(this._attachedComponentKeys.has(s))return;let r=this._componentCache.get(s);if(r)r.material=new Z({unlit:!0,colorTexture:new W({data:i})});else{let l=this._remappedFaceMap.get(s);if(!l)throw new Error(`No faces found for level ${e}, row ${t}, column ${o}`);r=new pe({faces:l,name:s,material:new Z({unlit:!0,colorTexture:new W({data:i})})}),r.set({trustSourceNormals:!0}),this._componentCache.set(`${e}/${t}/${o}`,r)}r.name=s,this.baseMesh.addComponent(r);let n=this.baseMesh.components?.find(l=>l.name==="__placeholder__");n&&this.baseMesh.removeComponent(n),this._attachedComponentKeys.add(s),this.baseMesh.vertexAttributesChanged()}getFacesForTile(e,t,o){let i=this._remappedFaceMap.get(`${e}/${t}/${o}`);if(!i)throw new Error(`No faces found for level ${e}, row ${t}, column ${o}`);return i}unloadComponent(e,t,o){let i=`${e}/${t}/${o}`,s=this._componentCache.get(i);s&&this._attachedComponentKeys.has(i)&&(this.baseMesh.removeComponent(s),this._attachedComponentKeys.delete(i),this.baseMesh.vertexAttributesChanged())}},q=class{constructor(e){this._baseLevel=e.baseLevel,this._levels=[...e.levels],this._blockBoundaryMap=e.blockBoundaryMap}plan(e,t,o){let i=this._selectLevel(e);this._lastStableLevel=i;let s=this._createHybridDesiredSet(i,e);this._retainActiveLevelDetails(s,t,i);let r=this._prioritizeDesiredKeys(s,i),n=new Set([...t,...o]),l=r.filter(c=>!n.has(c)),d=r.filter(c=>t.has(c)),m=[...t].filter(c=>!s.has(c));return{stableLevel:i,desiredKeySet:s,toFetch:l,toKeep:d,toDrop:m}}_retainActiveLevelDetails(e,t,o){if(o!==this._baseLevel)for(let i of t){let s=this._parseTileKey(i);s&&s.level===o&&e.add(i)}}_createHybridDesiredSet(e,t){let o=new Set,i=this._blockBoundaryMap.get(this._baseLevel);if(!i)return o;for(let r=i.minRow;r<=i.maxRow;r+=1)for(let n=i.minCol;n<=i.maxCol;n+=1)o.add(`${this._baseLevel}/${r}/${n}`);if(e===this._baseLevel)return o;let s=this._getViewTileKeys(e,t.heading,t.pitch,t.hfov,t.vfov);for(let r of s)o.add(r);return o}_getViewTileKeys(e,t,o,i,s){let r=this._blockBoundaryMap.get(e);if(!r)return[];let{minRow:n,maxRow:l,minCol:d,maxCol:m}=r,c=l-n+1,h=m-d+1,u=Math.max(.1,Math.min(179.9,o))-90,p=Math.max(.01,Math.min(360,i)),f=Math.max(.01,Math.min(180,s)),v=360/h,g=180/c,w=Math.min(12,v*.35),y=Math.min(8,g*.35),_=Math.min(360,p+w*2),C=Math.min(180,f+y*2),N=Math.max(-89.9,Math.min(89.9,u-C/2)),P=Math.max(-89.9,Math.min(89.9,u+C/2)),T=x=>{let z=(90-x)/180,F=Math.floor(z*c);return n+Math.max(0,Math.min(c-1,F))},$=x=>{let z=this._normalizeHeading(x)/360,F=(Math.floor(z*h)%h+h)%h;return d+F},E=this._normalizeHeading(t-_/2),A=this._normalizeHeading(t+_/2),k=Math.min(T(P),T(N)),D=Math.max(T(P),T(N)),L=_>=360?[[d,m]]:E<=A?[[$(E),$(A)]]:[[d,$(A)],[$(E),m]],R=new Set;for(let x=k;x<=D;x+=1)for(let[z,F]of L)for(let B=z;B<=F;B+=1)R.add(`${e}/${x}/${B}`);return[...R]}_normalizeHeading(e){let t=e%360;return t<0?t+360:t}_prioritizeDesiredKeys(e,t){let o=[...e],i=s=>{let r=this._parseTileKey(s);return r?r.level===t?0:r.level===this._baseLevel?2:1:Number.POSITIVE_INFINITY};return o.sort((s,r)=>{let n=i(s)-i(r);if(n!==0)return n;let l=this._parseTileKey(s),d=this._parseTileKey(r);return!l||!d?s.localeCompare(r):l.level!==d.level?l.level-d.level:l.row!==d.row?l.row-d.row:l.col-d.col}),o}_parseTileKey(e){let[t,o,i]=e.split("/"),s=Number(t),r=Number(o),n=Number(i);if(!(!Number.isFinite(s)||!Number.isFinite(r)||!Number.isFinite(n)))return{level:s,row:r,col:n}}_selectLevel(e){let[t,o]=e.viewportSize,i=Math.max(1,t),s=Math.max(1,o),r=Math.max(e.hfov/i,e.vfov/s),n=.25,l=this._levels.map(h=>({level:h,boundary:this._blockBoundaryMap.get(h)})).filter(h=>h.boundary!=null).sort((h,u)=>u.boundary.pixelAngle-h.boundary.pixelAngle);if(l.length===0)return this._baseLevel;let d=new Map;for(let h of l)d.set(h.level,r/h.boundary.pixelAngle);let m=new Map;l.forEach((h,u)=>{m.set(h.level,u)});let c=l[l.length-1].level;for(let h of l)if((d.get(h.level)??0)>=n){c=h.level;break}if(this._lastStableLevel!=null&&m.has(this._lastStableLevel)){let h=m.get(this._lastStableLevel),u=m.get(c);if(u>h&&(d.get(this._lastStableLevel)??0)>=.2)return this._lastStableLevel;if(u<h)return this._lastStableLevel}return c}},J=class{constructor(e){this._layer=e,this._inflightControllers=new Map,this._inflightSet=new Set,this._loadedSet=new Set,this.fetchTileImageData=async(t,o,i,s)=>{let r=We(t),n=s?{signal:s}:void 0,l=this._meshBuilder.blockBoundaryMap.get(r);if(!l)throw new Error(`No tile boundary found for level ${t}`);let{maxCol:d,maxRow:m,minCol:c,minRow:h}=l,u=d-c+1,p=m-h+1,f=i-c,v=o-h,g=f*this._meshBuilder.imageSize[0]/u,w=v*this._meshBuilder.imageSize[1]/p,y=Math.min((f+1)*this._meshBuilder.imageSize[0]/u,this._meshBuilder.imageSize[0]),_=Math.min((v+1)*this._meshBuilder.imageSize[1]/p,this._meshBuilder.imageSize[1]),C=await this._layer.fetchPixels(new Ae({xmin:g-.5,ymin:.5-_,xmax:y-.5,ymax:.5-w,spatialReference:this._layer.fullExtent.spatialReference}),y-g,_-w,n);return je(C.pixelBlock)},this.loadComponent=(t,o,i,s)=>this._meshBuilder.loadComponent(t,o,i,s),this.unloadComponent=(t,o,i)=>this._meshBuilder.unloadComponent(t,o,i),this._meshBuilder=new j({layer:e})}get imageSize(){return this._meshBuilder.imageSize}get baseMesh(){return this._meshBuilder.baseMesh}get currentLevel(){return this._currentLevel}getTileAnchor(e,t,o){return this._meshBuilder.getTileAnchor(e,t,o)}async load(){return await this._meshBuilder.load(),this._tilePlanner=new q({blockBoundaryMap:this._meshBuilder.blockBoundaryMap,baseLevel:this._meshBuilder.baseLevel,levels:[...this._meshBuilder.levels]}),this}destroy(){for(let e of this._inflightControllers.values())e.abort();this._inflightControllers.clear(),this._inflightSet.clear(),this._loadedSet.clear(),this._tilePlanner=void 0,this._meshBuilder.destroy()}planTiles(e){if(!this._tilePlanner)throw new Error("PanoramicTileSource is not loaded yet.");let t=this._tilePlanner.plan(e,this._loadedSet,this._inflightSet);return this._currentLevel=t.stableLevel,t}markTileInflight(e,t){this._inflightSet.add(e),this._inflightControllers.set(e,t)}markTileLoaded(e){this._inflightSet.delete(e),this._inflightControllers.delete(e),this._loadedSet.add(e)}markTileInflightResolved(e){this._inflightSet.delete(e),this._inflightControllers.delete(e)}markTileDropped(e){this._loadedSet.delete(e)}cancelStaleInflight(e){for(let t of this._inflightSet)e.has(t)||(this._inflightControllers.get(t)?.abort(),this._inflightControllers.delete(t),this._inflightSet.delete(t))}},Je=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,M=(a,e,t,o)=>{for(var i=o>1?void 0:o?Qe(e,t):e,s=a.length-1,r;s>=0;s--)(r=a[s])&&(i=(o?r(e,t,i):r(i))||i);return o&&i&&Je(e,t,i),i},Xe=0,et=0,tt=0,it=new Set(["JPG","JPEG","TIFF","TIF","MRF"]),ot=new Set(["MRF","TIFF","TIF"]),b=class extends Te{constructor(a){super(a),this._size=[0,0],this.autoLoad=!1,this.type="image",this.uiStrings={},this._resolveMedia=async e=>{let t=Promise.withResolvers(),o=e?.signal?Y(e?.signal,"abort",t.resolve):null,i=this.type==="video"?document.createElement("video"):document.createElement("img");this.type==="video"&&(i.setAttribute("playsinline","true"),i.setAttribute("muted","true"),i.setAttribute("autoplay","true")),i.crossOrigin="anonymous",i.src=this.url;let s=null,r=this.type==="video"?Ge(i,m=>this.addHandles(m)):await new Promise((m,c)=>{s=[de(i,"error",h=>{c(h)}),de(i,"load",m)]}).finally(()=>{s?.forEach(m=>m.remove()),s=null}),n=Promise.race([r,t.promise]);try{await n}finally{o?.remove()}I(e);let l=i,d=await V({data:i,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return I(e),{media:l,mesh:d}}}static isPanoramicMedia(a){return!!a&&typeof a=="object"&&"declaredClass"in a&&typeof a.declaredClass=="string"&&a.declaredClass==="components.oriented-imagery-viewer-panoramic-viewer.support.PanoramicMedia"}destroy(){this._cache=void 0}get horizonPitch(){let{matrix:a}=this;return a?180*Math.asin(-a[6])/Math.PI:Xe}get horizonRoll(){let{matrix:a}=this;return a?180*Math.atan(a[7]/a[8])/Math.PI:tt}get horizonYaw(){let{matrix:a,cameraHeading:e}=this;return a?180*Math.atan2(a[3],a[0])/Math.PI:e?-e:et}get panoramicTileSource(){return this._panoramicTileSource}get element(){return this._cache}get size(){return this._size}async load(a){if(this.type==="video")return await this.loadVideoMesh(a);let e=this.extension;if(e||(e=le(this.url)),!e||!it.has(e))throw new Ie("unsupported-format",this.uiStrings["unsupported-format"]??"Unsupported image format: {extension}",{datasetFormat:e??"UNKNOWN FORMAT"});return ot.has(e)?await this.loadOptimizedImageMesh(a):await this.loadImageMesh(a)}async loadOptimizedImageMesh(a){this._panoramicTileSource?.destroy();let e=new Le({url:this.url,datasetFormat:this.extension,skipMapInfo:!0,skipExtensions:["aux.xml","jgw"]});this._panoramicTileSource=new J(e);let{imageSize:t,baseMesh:o}=await this._panoramicTileSource.load();return I(a),{mesh:o,size:t}}async loadVideoMesh(a){if(I(a),this._cache){let o=await V({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(a);return I(a),{mesh:o,size:this._size}}let e=await this._resolveMedia(a);I(a),this._cache=e.media,this._size=[this._cache.videoWidth,this._cache.videoHeight];let t=await V({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(a);return I(a),{mesh:t,size:this._size}}async loadImageMesh(a){if(this._cache){let o=await V({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(a);return I(a),{mesh:o,size:this._size}}let e=await this._resolveMedia(a);I(a),this._cache=e.media;let t=e.mesh;return this._size=[e.media.width,e.media.height],{mesh:t,size:this._size}}};M([S()],b.prototype,"_size",2);M([S()],b.prototype,"_cache",2);M([S()],b.prototype,"autoLoad",2);M([S()],b.prototype,"cameraHeading",2);M([S()],b.prototype,"extension",2);M([S()],b.prototype,"horizonPitch",1);M([S()],b.prototype,"horizonRoll",1);M([S()],b.prototype,"horizonYaw",1);M([S()],b.prototype,"id",2);M([S()],b.prototype,"_panoramicTileSource",2);M([S()],b.prototype,"panoramicTileSource",1);M([S()],b.prototype,"element",1);M([S()],b.prototype,"matrix",2);M([S()],b.prototype,"size",1);M([S()],b.prototype,"type",2);M([S()],b.prototype,"uiStrings",2);M([S()],b.prototype,"url",2);b=M([Ce("components.oriented-imagery-viewer-panoramic-viewer.support.PanoramicMedia")],b);var at=()=>new ye({atmosphereEnabled:!1,starsEnabled:!1,lighting:{type:"virtual"}}),rt=()=>new Se({opacity:0,navigationConstraint:null}),st=()=>new X({x:0,y:0,z:0,spatialReference:K.WebMercator}),Q=class extends ie{constructor(){super(...arguments),this.#e=at(),this._graphicsController=new ne(this),this._ground=rt(),this._messages=se(),this._startPosition=null,this.tileCache=new Set,this._currentGraphicsStore=new _e,this._tileLabelGraphics=new Map,this._handleMouseWheel=e=>{e.detail.stopPropagation(),e.detail.deltaY<0?this._internalZoom.value?.zoomIn():this._internalZoom.value?.zoomOut()},this._handleDrag=e=>{e.stopPropagation();let{x:t,y:o,action:i}=e,s=null,r=null;switch(i){case"start":this._startPosition={x:t,y:o};break;case"update":if(!this._startPosition)return;let n=l=>{if(!this._startPosition||!this.camera)return;if(r||(r=l),l-r<16){s=requestAnimationFrame(n);return}let d=t-this._startPosition.x,m=o-this._startPosition.y,c=Be(this.camera?.heading-d*.1),h=Ee(this.camera.tilt+m*.1);this.yaw=c,this.pitch=h,this._startPosition={x:t,y:o},r=null};s=requestAnimationFrame(n);break;case"end":s!==null&&cancelAnimationFrame(s),this._startPosition=null;break}},this._internalMap=H(),this._internalZoom=H(),this._loading=!1,this.yaw=0,this.pitch=90,this.hideLoader=!1,this.hideTitle=!1,this.hideZoomControls=!1,this.hideVideoControls=!1,this.messageOverrides=this._messages._overrides}static{this.properties={_media:16,_internalMap:16,_internalZoom:16,_loading:16,_base:16,yaw:9,pitch:9,hideLoader:5,hideTitle:7,hideZoomControls:5,hideVideoControls:5,imageSize:32,media:0,messageOverrides:0,hfov:32,base:32}}static{this.styles=[ke]}#e;get view(){return this._internalMap?.value?.view}get camera(){if(!this.view?.destroyed)return this.view?.camera}set camera(e){!e||!this.view||this.view.destroyed||(e.position=st(),this.view.camera=e.clone())}get map(){return this._internalMap.value?.view?.map}get _fov(){return this.camera?.fov}set _fov(e){typeof e!="number"||!this._internalZoom.value||this._internalZoom.value?.zoomFOV(e)}get imageSize(){return this._media?.size}get media(){return this._media}set media(e){if(!e){this._mediaAbortController?.abort(),this._media=void 0,this._clearImage();return}this._media=b.isPanoramicMedia(e)?e:new b(e)}get hfov(){return this._internalZoom.value?.hfov}get base(){return this._base?.geometry}addGraphic(e){this._graphicsController.addGraphic(e)}addGraphics(e){this._graphicsController.addGraphics(e)}clearGraphics(){this._graphicsController.clearGraphics()}async mediaOnLoad(){return this._mediaPromise&&await this._mediaPromise,this._media}removeGraphic(e){this._graphicsController.removeGraphic(e)}removeGraphics(e){this._graphicsController.removeGraphics(e)}zoomIn(){this._internalZoom.value?.zoomIn()}zoomOut(){this._internalZoom.value?.zoomOut()}loaded(){this.manager.onLifecycle(()=>[be(()=>this.view,"drag",this._handleDrag),Me(()=>this.camera!=null,()=>{this.camera&&(this.camera.heading=this.yaw,this.camera.tilt=this.pitch,this._reloadCamera())}),G(()=>this.yaw,()=>{this.camera&&(this.camera.heading=this.yaw,this._reloadCamera())},{sync:!0,initial:!0}),G(()=>this.pitch,()=>{this.camera&&(this.camera.tilt=this.pitch,this._reloadCamera())},{sync:!0,initial:!0}),G(()=>this._fov,()=>{this._reloadCamera()},{sync:!0,initial:!0}),G(()=>this._media,e=>{this._mediaAbortController?.abort(),e&&(this._mediaAbortController=new AbortController,this._mediaPromise=this._loadMediaInternal(e,this._mediaAbortController))},{initial:!0,sync:!0}),G(()=>{if(!this.view?.ready||!this.base)return;let e=this._media?.panoramicTileSource;if(!e)return;let{camera:{heading:t,tilt:o,fov:i},width:s,height:r}=this.view,n=s/r;return{panoramicTileSource:e,heading:t,pitch:o,hfov:ce(i,n),vfov:me(i,n)}},e=>{e&&(this._tileUpdateDebounceHandle!=null&&clearTimeout(this._tileUpdateDebounceHandle),this._tileUpdateDebounceHandle=window.setTimeout(()=>{this._tileUpdateTask?.abort(),this._tileUpdateTask=re(async t=>{await this._updateTilesForCurrentView(e,t)}),this._tileUpdateDebounceHandle=void 0},150))},{initial:!0,sync:!0})])}_reloadCamera(){this.camera=this.camera?.clone()}_clearImage(){this._tileUpdateDebounceHandle!=null&&(clearTimeout(this._tileUpdateDebounceHandle),this._tileUpdateDebounceHandle=void 0),this._tileUpdateTask?.abort(),this._tileUpdateTask=void 0,this.tileCache.clear();for(let e of this._tileLabelGraphics.values())this.removeGraphic(e);this._tileLabelGraphics.clear(),this.clearGraphics(),this._base=void 0,this._currentGraphicsStore.removeAll()}_parseTileKey(e){let[t,o,i]=e.split("/").map(Number);return{level:t,row:o,col:i}}_createTileLabelGraphic(e,t){let{level:o,row:i,col:s}=this._parseTileKey(t),[r,n,l]=e.getTileAnchor(o,i,s);return new ue({attributes:{tileKey:t},geometry:new X({x:r,y:n,z:l,spatialReference:K.WebMercator}),symbol:new $e({color:[255,255,255,.95],font:new Ne({family:"Avenir Next",size:8,weight:"bold"}),haloColor:[0,0,0,.9],haloSize:1,horizontalAlignment:"center",text:t,verticalAlignment:"middle"})})}_attachTileLabel(e,t){if(this._tileLabelGraphics.has(t))return;let o=this._createTileLabelGraphic(e,t);this._tileLabelGraphics.set(t,o),this._currentGraphicsStore.add(o),this.addGraphic(o)}_detachTileLabel(e){let t=this._tileLabelGraphics.get(e);t&&(this.removeGraphic(t),this._currentGraphicsStore.remove(t),this._tileLabelGraphics.delete(e))}async _updateTilesForCurrentView(e,t){let{base:o}=this;if(!o)return;let{panoramicTileSource:i,heading:s,pitch:r,hfov:n,vfov:l}=e,d=[Math.max(1,this.view?.width??1),Math.max(1,this.view?.height??1)],m=i.planTiles({heading:s,pitch:r,hfov:n,vfov:l,imageSize:i.imageSize,viewportSize:d});if(I(t),i.cancelStaleInflight(m.desiredKeySet),m.toDrop.length>0){let u=new Set(m.toDrop);for(let p of u){let{level:f,row:v,col:g}=this._parseTileKey(p);i.unloadComponent(f,v,g),i.markTileDropped(p),this._detachTileLabel(p),this.tileCache.delete(p)}}let c=async u=>{if(u>=m.toFetch.length)return;let p=m.toFetch[u];if(I(t),!this.tileCache.has(p)){let{level:f,row:v,col:g}=this._parseTileKey(p),w=new AbortController,y=()=>{w.abort()};t.addEventListener("abort",y,{once:!0}),i.markTileInflight(p,w);try{let _=await i.fetchTileImageData(f,v,g,w.signal);I(t),m.desiredKeySet.has(p)&&!this.tileCache.has(p)&&(i.loadComponent(f,v,g,_),i.markTileLoaded(p),this._attachTileLabel(i,p),this.tileCache.add(p))}catch(_){ae(_)||te("error",this,"Failed loading panoramic tile component",{detail:{key:p,error:_}})}finally{t.removeEventListener("abort",y),i.markTileInflightResolved(p)}}await c(u+1)};await c(0);let h=i.planTiles({heading:s,pitch:r,hfov:n,vfov:l,imageSize:i.imageSize,viewportSize:d});if(I(t),h.toDrop.length>0){let u=new Set(h.toDrop);for(let p of u){let{level:f,row:v,col:g}=this._parseTileKey(p);i.unloadComponent(f,v,g),i.markTileDropped(p),this._detachTileLabel(p),this.tileCache.delete(p)}}}async _loadMediaInternal(e,t){if(this._loading=!0,this._clearImage(),!e)throw new Error("No media provided");let{mesh:o}=await e.load(t).finally(()=>{this._loading=!1});I(t),this._fov=he(Oe,this.el.clientWidth/this.el.clientHeight),this._base=De(o),this.addGraphic(this._base)}render(){return O`<calcite-panel .loading=${this.hideLoader?void 0:this._loading} .heading=${this.hideTitle?void 0:this._messages.title}><arcgis-scene .environment=${this.#e} hide-attribution .spatialReference=${K.WebMercator} viewing-mode=local .ground=${this._ground} @arcgisViewMouseWheel=${this._handleMouseWheel} ${U(this._internalMap)}><arcgis-oriented-imagery-viewer-panoramic-viewer-zoom .hidden=${this.hideZoomControls} slot=top-left ${U(this._internalZoom)}></arcgis-oriented-imagery-viewer-panoramic-viewer-zoom></arcgis-scene>${this.hideVideoControls||this.media?.type!=="video"?null:O`<arcgis-oriented-imagery-viewer-video-controls .videoRef=${this._media?.element}></arcgis-oriented-imagery-viewer-video-controls>`}</calcite-panel>`}};oe("arcgis-oriented-imagery-viewer-panoramic-viewer",Q);return Q},"geometry/SpatialReference","Graphic","Camera","views/3d/environment/Environment","core/reactiveUtils","applications/Components/baUtils","core/Collection","symbols/FillSymbol3DLayer","symbols/MeshSymbol3D","Ground","core/Accessor","core/accessorSupport/decorators","core/Error","geometry/Mesh","geometry/Extent","layers/ImageryTileLayer","geometry/support/MeshComponent","geometry/support/MeshMaterialMetallicRoughness","geometry/support/MeshTexture","geometry/support/MeshVertexAttributes","geometry/Point","geometry/support/meshUtils","symbols/Font","symbols/TextSymbol",a,b,c)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
var
|
|
2
|
+
var e=Object.freeze(Object.defineProperty({__proto__:null,alphaLevelDependencyFactor:30,alphaSpreadFactor:10,levelHeightDefault:14,levelHoveredExtraHeight:30,levelHoveredExtraWidth:20,levelWidthConstant:40,levelWidthMax:80,levelWidthMin:30,levelWidthNominator:100,levelsMarginFactor:2,levelsPadding:20,levelsPointerAdjustment:.035},Symbol.toStringTag,{value:"Module"}));export{e as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as C}from"./XEK22IDA.js";import{a as I}from"./OWAKPT2D.js";import a from"./MZWO5JYA.js";import{O as $,S as F,U as L,a as q,b as p}from"./XRPUXUOQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([{createReactiveMap:k,findUtilityNetwork:U,getOrCreateMapValue:x},{stripHTML:E},f,{ignoreAbortErrors:S},{watch:v},V,P,Q,B,{b:N,f:A}])=>{var G=q`.list-container{min-height:var(--calcite-spacing-xxxl)}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.sticky-loading-container{display:flex;position:sticky;bottom:var(--calcite-spacing-sm);align-items:center;justify-content:center;z-index:2;margin:0;padding:0;height:var(--calcite-spacing-xxxl);pointer-events:none;height:500px}`,M=100,D={assetGroup:"assetgroup",assetType:"assettype"},j="{00000000-0000-0000-0000-000000000000}",T=class extends ${constructor(){super(...arguments),this._addFlowItem=t=>{t&&this.flowItems?.push(t)},this._attachmentAssociations=new f,this._attachmentFeatureCount=0,this._cancelQuery=()=>{let{_queryAbortController:t}=this;t&&t.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{let{_queryFeatureCountAbortController:t}=this;t&&t.abort(),this._queryFeatureCountAbortController=null},this._connectivityAssociations=new f,this._connectivityFeatureCount=0,this._containerAssociations=new f,this._containerFeatureCount=0,this._contentAssociations=new f,this._contentFeatureCount=0,this._networkSourceIdsInUse=new Set,this._query=async t=>{if(!t)return;await this._loadUtiltyNetworks();let{_queryAbortController:e}=this;this._destroyAssociatedFeatureViewModels(),this._clearFeatures(),this._featureCount&&await this._queryAssociatedFeatures(t,{signal:e?.signal})},this._queryController=async t=>{this._cancelQuery();let e=new AbortController;this._queryAbortController=e,await S(this._query(t)),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();let t=new AbortController;this._queryFeatureCountAbortController=t,await S(this._queryFeatureCount()),this._queryFeatureCountAbortController===t&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryDebounced=C(this._queryController,M),this._queryFeatureCountDebounced=C(this._queryFeatureCountController,M),this._structureAssociations=new f,this._structureFeatureCount=0,this._queryAssociationType=async()=>{this._activeAssociationType&&this._queryDebounced(this._activeAssociationType)},this._associationFeatures=k(),this._associationViewModels=k(),this._featureCount=0,this._loaded=!1,this._queryAbortController=null,this._queryFeatureCountAbortController=null,this._queryPageAbortController=null,this.associationTypes=null,this.autoDestroyDisabled=!1,this.useFeatureNextFlowItem=!1,this.flowType="feature-utility-network-associations",this.headingLevel=2,this.source="popup"}static{this.properties={_activeAssociationType:16,_associationFeatures:16,_associationViewModels:16,_canLoad:16,_canQuery:16,_featureCount:16,_loaded:16,_queryAbortController:16,_queryFeatureCountAbortController:16,_queryPageAbortController:16,_state:16,associationTypes:0,autoDestroyDisabled:5,description:1,flowItems:0,useFeatureNextFlowItem:5,flowType:1,graphic:0,heading:1,headingLevel:9,layer:0,map:0,messages:0,parentFeatureViewModel:0,referenceElement:1,source:1,spatialReference:0,timeZone:1,view:0}}static{this.styles=G}get _globalId(){return(this._globalIdField&&this.graphic?.attributes?.[this._globalIdField])??null}get _globalIdField(){return this.layer?.globalIdField}get _objectId(){return(this._objectIdField&&this.graphic?.attributes?.[this._objectIdField])??null}get _objectIdField(){return this.layer?.objectIdField}get _supportsCacheHint(){return!!this.layer?.capabilities?.queryRelated?.supportsCacheHint}get _utilityNetwork(){let{layer:t,map:e}=this;if(!t?.loaded||!e)return null;let s=A(t)?t.parent:t;return U(e,s)}get _canLoad(){return!!this.map}get _canQuery(){return!!this.layer?.capabilities?.query?.supportsPagination}get _state(){let{_canLoad:t,_canQuery:e,_featureCount:s,_loaded:a,_queryAbortController:i,_queryFeatureCountAbortController:r,_queryPageAbortController:o,associationTypes:l}=this;return r||t&&!a?"loading":i||o?"querying":!this._globalId||!l||!e||!s?"disabled":"ready"}get heading(){return this._heading}set heading(t){this._heading=t}async destroy(){await this.manager.destroy()}loaded(){this.manager.onLifecycle(()=>[v(()=>[this.graphic,this.layer,this.map,this.associationTypes,this._canQuery,this._objectId,this._globalId],()=>{this._queryFeatureCountDebounced(),this._queryAssociationType()},{initial:!0}),v(()=>this._activeAssociationType,t=>{this._queryDebounced(t)}),v(()=>this._associationFeatures.values(),()=>{this._setUpUtilityNetworkAssociationsViewModels()})]),this.manager.onDestroy(()=>{this._cancelQuery(),this._cancelQueryFeatureCount()})}_addAssociationTypeFlowItem(t){let e=this.useFeatureNextFlowItem?F(p`<arcgis-feature-utility-network-association-list .autoDestroyDisabled=${this.autoDestroyDisabled} .associationViewModels=${this._associationViewModels} .description=${this._getParentFeatureDescription()} .flowItems=${this.flowItems} .flowType=${this.flowType} .heading=${this._getAssociationTypeTitle(t)} .messages=${this.messages} .map=${this.map} .parentFeatureViewModel=${this.parentFeatureViewModel} .referenceElement=${this.referenceElement} .state=${this._state} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} use-feature-next-flow-item .view=${this.view}></arcgis-feature-utility-network-association-list>`):F(p`<arcgis-feature-utility-network-association-list .autoDestroyDisabled=${this.autoDestroyDisabled} .associationViewModels=${this._associationViewModels} .description=${this._getParentFeatureDescription()} .flowItems=${this.flowItems} .flowType=${this.flowType} .heading=${this._getAssociationTypeTitle(t)} .messages=${this.messages} .map=${this.map} .parentFeatureViewModel=${this.parentFeatureViewModel} .referenceElement=${this.referenceElement} .state=${this._state} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature-utility-network-association-list>`);this._addFlowItem(e)}_clearAssociations(){this._attachmentAssociations.removeAll(),this._connectivityAssociations.removeAll(),this._containerAssociations.removeAll(),this._contentAssociations.removeAll(),this._structureAssociations.removeAll()}_clearFeatures(){this._associationFeatures.forEach(t=>t.removeAll()),this._associationFeatures.clear()}_compareByFeatureTitle(t,e){return t.title.localeCompare(e.title,void 0,{numeric:!0})}async _countAssociatedFeatureCount(t,e,s,a,i){let r=this._getFeatureQueryWhereClause(t,e,s,a),o=t.createQuery();return o.where=r,o.outFields=["*"],o.returnGeometry=!1,await t.queryFeatureCount(o,{signal:i?.signal})}async _countAssociatedFeatures(t,e,s,a,i){if(!e.length)return 0;let r=await this._findLayersBySourceId(t);await this._loadLayers(r);let o=r.map(l=>this._countAssociatedFeatureCount(l,e,s,a,i));return(await Promise.all(o)).reduce((l,c)=>l+c,0)}async _createAssociationFeatureObjects(t,e,s,a,i){if(!t.length)return[];let r=new Map,o=Array.from(e.entries()).map(async([c,d])=>{let u=await this._findLayersBySourceId(c);await this._loadLayers(u);let h=u.map(m=>this._queryLayer(m,d,s,a,i));(await Promise.all(h)).forEach(m=>{m.forEach(n=>{if(this.source==="popup"?n.sourceLayer&&n.getEffectivePopupTemplate():n.sourceLayer){let _=n.layer.globalIdField??"",y=n.getAttribute(_),w=r.get(y)??[];w.push(n),r.set(y,w)}})})});await Promise.all(o);let l=[];return await Promise.all(t.toArray().map(async c=>{let{fromNetworkElement:d,toNetworkElement:u}=c,h=d.globalId===this._globalId?u:d,m=r.get(h.globalId)??[];await Promise.all(m.map(async n=>{let _=this._utilityNetwork?.getTerminalById(h?.terminalId??void 0)?.name,y=await n.sourceLayer.getFeatureTitle(n)||this._getFeatureTitle(n);l.push({title:y,feature:n,association:c,terminalName:_})}))})),l}_destroyAssociatedFeatureViewModels(){this._associationViewModels.forEach(t=>t.destroyAll())}_equals(t,e){if(t.globalId===j&&e.globalId===j){let s=function(d,u){return d.networkSourceId===u.networkSourceId&&d.globalId===u.globalId&&d.terminalId===u.terminalId&&d.firstUnit===u.firstUnit&&d.numUnits===u.numUnits},a=t.fromNetworkElement,i=t.toNetworkElement,r=e.fromNetworkElement,o=e.toNetworkElement,l=s(a,r),c=s(i,o);return l&&c&&t.associationType===e.associationType}return t.globalId!=null&&e.globalId!=null&&t.globalId===e.globalId}async _findLayersBySourceId(t){let{_utilityNetwork:e,map:s}=this;e?.loaded||await e?.load();let a=e.getLayerIdBySourceId(t),i=s.allLayers.filter(o=>!!e?.isUtilityLayer(o)&&o.layerId===a),r=s.allTables.filter(o=>!!e?.isUtilityLayer(o)&&o.layerId===a);return i.concat(r).toArray()}_getAssociationsByType(t){switch(t){case"attachment":return this._attachmentAssociations;case"structure":return this._structureAssociations;case"connectivity":return this._connectivityAssociations;case"container":return this._containerAssociations;case"content":return this._contentAssociations}}_getAssociationTypeTitle(t){let{messages:e}=this;if(t.title)return t.title;switch(t.type){case"attachment":return e?.associationsAttachments??this.messages?.noTitle??"";case"connectivity":return e?.associationsConnectivity??this.messages?.noTitle??"";case"structure":return e?.associationsStructure??this.messages?.noTitle??"";case"content":return e?.associationsContents??this.messages?.noTitle??"";case"container":return e?.associationsContainer??this.messages?.noTitle??""}}_getFeatureCountForAssociationType(t){switch(t){case"attachment":return this._attachmentFeatureCount;case"structure":return this._structureFeatureCount;case"content":return this._contentFeatureCount;case"container":return this._containerFeatureCount;case"connectivity":return this._connectivityFeatureCount}}_getFeatureQueryWhereClause(t,e,s,a){let i=t.globalIdField,r=t.fieldsIndex.get(D.assetGroup),o=t.fieldsIndex.get(D.assetType),l=s!=null,c=a!=null,d=i?V.sqlIn(i,e):null,u=l?`(${r?.name} = ${s})`:null,h=l&&c?`(${o?.name} = ${a})`:null;return[d,u,h].filter(Boolean).join(" AND ")}_getFeatureTitle(t){let e=t.attributes,s=t.sourceLayer;if(!e||!s)return"";let a="displayField"in s?s.displayField:null,i=a!=null?e[a.toString()]:null,r=i!=null?i.toString():null,o=t.getObjectId()?.toString();return r||o||""}_getParentFeatureDescription(){let{parentFeatureViewModel:t}=this;if(t){if("heading"in t)return t.heading;if("title"in t)return t.title}}async _loadUtiltyNetworks(){let t=this.map;if(!t)return;t.utilityNetworks&&await Promise.allSettled(t.utilityNetworks.map(s=>s.load()));let e=this._utilityNetwork;if(e){let s=a=>{if("layerId"in a&&e.isUtilityLayer(a)){let i=a.layerId!=null?e.getSourceIdByLayerId(a.layerId):null;i!=null&&this._networkSourceIdsInUse.add(i)}};this._networkSourceIdsInUse=new Set,t.allLayers.forEach(s),t.allTables.forEach(s)}}async _loadLayers(t){let e=t.filter(s=>!s.loaded).map(s=>s.load());e.length&&await Promise.allSettled(e)}_matchesGlobalFeature(t,e){return this._equals(t.association,e.association)}async _queryAssociatedFeatures(t,e){let{layer:s,_globalId:a,associationTypes:i,_utilityNetwork:r,_canQuery:o,_associationFeatures:l}=this;if(await Promise.allSettled([s?.load(),r?.load()]),!o||!s||!i||!r)return;let c=this._getAssociationsByType(t.type),{associatedAssetGroup:d,associatedAssetType:u}=t,h=new Map;c.forEach(n=>{let{fromNetworkElement:_,toNetworkElement:y}=n,{networkSourceId:w,elementGlobalId:b}=_.globalId===a?{networkSourceId:y.networkSourceId,elementGlobalId:y.globalId}:{networkSourceId:_.networkSourceId,elementGlobalId:_.globalId},g=h.get(w)||[];g.push(b),h.set(w,g)});let m=await this._createAssociationFeatureObjects(c,h,d,u,e);this._parseFeatureObjects(m,l)}async _queryAssociations(t){let{layer:e,_globalId:s,associationTypes:a,_utilityNetwork:i,_canQuery:r}=this;if(await Promise.allSettled([e?.load(),i?.load()]),this._clearAssociations(),!r||!e||!a||!i||!s)return;let o=A(e)?e.parent:e,l=new P({globalId:s,networkSourceId:i.getSourceIdByLayerId(o.layerId)}),c=new Set;a.forEach(n=>{switch(n.type){case"attachment":case"structure":c.add("attachment");break;case"container":case"content":c.add("containment");break;case"connectivity":c.add("connectivity"),c.add("junction-junction-connectivity"),c.add("junction-edge-from-connectivity"),c.add("junction-edge-midspan-connectivity"),c.add("junction-edge-to-connectivity");break}});let d=await i?.queryAssociations(new Q({elements:[l],types:Array.from(c)}),{signal:t?.signal}),u=new Map,h=new Map;a.forEach(n=>{h.set(n.type,n),u.set(n.type,[])}),d.forEach(n=>{let{toNetworkElement:_,fromNetworkElement:y}=n;switch(n.associationType){case"attachment":if(y?.globalId===s){if(this._shouldDiscardNetworkElement(_,"attachment",h))break;u.get("attachment")?.push(_.globalId),this._attachmentAssociations.add(n)}else{if(this._shouldDiscardNetworkElement(y,"structure",h))break;u.get("structure")?.push(y.globalId),this._structureAssociations.add(n)}break;case"connectivity":case"junction-edge-from-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-to-connectivity":case"junction-junction-connectivity":if(y?.globalId===s){if(this._shouldDiscardNetworkElement(_,"connectivity",h))break;u.get("connectivity")?.push(_.globalId)}else{if(this._shouldDiscardNetworkElement(y,"connectivity",h))break;u.get("connectivity")?.push(y.globalId)}this._connectivityAssociations.add(n);break;case"containment":if(y?.globalId===s){if(this._shouldDiscardNetworkElement(_,"content",h))break;u.get("content")?.push(_.globalId),this._contentAssociations.add(n)}else{if(this._shouldDiscardNetworkElement(y,"container",h))break;u.get("container")?.push(y.globalId),this._containerAssociations.add(n)}break}});let m=a.map(async n=>{let{associatedNetworkSourceId:_,associatedAssetGroup:y,associatedAssetType:w}=n,b=u.get(n.type),g=y!=null?await this._countAssociatedFeatures(_,b,y,w,t):b.length;switch(n.type){case"attachment":this._attachmentFeatureCount=g;break;case"connectivity":this._connectivityFeatureCount=g;break;case"container":this._containerFeatureCount=g;break;case"content":this._contentFeatureCount=g;break;case"structure":this._structureFeatureCount=g;break}});await Promise.allSettled(m)}async _queryFeatureCount(){await this._loadUtiltyNetworks();let{_queryFeatureCountAbortController:t,_canQuery:e}=this;if(!e){this._featureCount=0;return}await this._queryAssociations(t),this._featureCount=this._attachmentFeatureCount+this._connectivityFeatureCount+this._containerFeatureCount+this._contentFeatureCount+this._structureFeatureCount}async _queryLayer(t,e,s,a,i){let r=this._getFeatureQueryWhereClause(t,e,s,a),o=t.createQuery();o.where=r,o.outFields=["*"],o.returnGeometry=!1,o.cacheHint=this._supportsCacheHint;let{features:l}=await N(t,o,i);return l}_parseFeatureObjects(t,e){let s=k();t.forEach(a=>{let i=(a?.feature).sourceLayer;x(s,i,()=>new f).add(a)});for(let[a,i]of s)this._sortFeatureObjectsByTitle(i),e.set(a,i)}_selectAssociationType(t){let{flowItems:e}=this;e&&(this._activeAssociationType=t,this._setUpUtilityNetworkAssociationsViewModels(),this._addAssociationTypeFlowItem(t))}_setUpUtilityNetworkAssociationsViewModels(){this._associationViewModels.forEach((i,r)=>{let o=this._associationFeatures.get(r);o?i.forEach(l=>{o.find(c=>this._matchesGlobalFeature(l,c))||(i.remove(l),i.length||this._associationViewModels.delete(r))}):(i.removeAll(),this._associationViewModels.delete(r))});let{map:t,view:e,spatialReference:s,timeZone:a}=this;this._associationFeatures.forEach((i,r)=>{let o=this._associationViewModels.get(r)||new f;i?.filter(Boolean).forEach((l,c)=>{if(!o.some(d=>this._matchesGlobalFeature(d,l))){let{association:d,feature:u,terminalName:h,title:m}=l;o.add({title:m,association:d,featureViewModel:new B({abilities:{utilityNetworkAssociationsContent:!1},map:t,view:e,spatialReference:s,timeZone:a,graphic:u}),terminalName:h},c)}}),this._associationViewModels.set(r,o)})}_shouldDiscardNetworkElement(t,e,s){if(!t)return!1;let{networkSourceId:a}=t,i=s.get(e)?.associatedNetworkSourceId,r=this._networkSourceIdsInUse.has(a);return i!=null&&i!==a||!r}_sortFeatureObjectsByTitle(t){t.sort(this._compareByFeatureTitle)}render(){let{_state:t}=this;return p`<div class="root"><arcgis-feature-element-info .heading=${this.heading} .headingLevel=${this.headingLevel} .description=${this.description}></arcgis-feature-element-info>${t==="loading"?this._renderLoading():t==="disabled"?this._renderAssociationNotFound():this._renderContent()}</div>`}_renderAssociationNotFound(){return p`<calcite-notice icon=information kind=info open scale=s width=full><div slot=message>${this.messages?.noAssociations}</div></calcite-notice>`}_renderAssociationTypeList(t){return this._getFeatureCountForAssociationType(t.type)>0?this._renderAssociationTypeListItem(t):null}_renderAssociationTypeListItem(t){let e=this._getAssociationTypeTitle(t);return I(`association-type-${t.type}`,p`<calcite-list-item .description=${E(t.description)} .label=${E(e)} .value=${t.type} @calciteListItemSelect=${()=>this._selectAssociationType(t)}><calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon></calcite-list-item>`)}_renderContent(){let{_state:t,associationTypes:e,messages:s}=this,a=s?.associationsList??s?.noTitle??"";return I("list-container",p`<div class="list-container">${t==="ready"?p`<div><calcite-list display-mode=flat .label=${a}>${e.map(i=>this._renderAssociationTypeList(i))}</calcite-list></div>`:null}${this._renderStickyLoading()}</div>`)}_renderLoading(){return p`<div class="loading-container">${this._renderLoadingIcon()}${this._renderStickyLoading()}</div>`}_renderLoadingIcon(){return p`<calcite-loader inline label></calcite-loader>`}_renderStickyLoading(){return this._state==="querying"?p`<div class="sticky-loading-container">${this._renderLoadingIcon()}</div>`:null}};L("arcgis-feature-utility-network-associations",T);return T},"applications/Components/featureUtils","applications/Components/stringUtils","core/Collection","core/promiseUtils","core/reactiveUtils","core/sql","rest/networks/support/NetworkElement","rest/networks/support/QueryAssociationsParameters","popup/Feature",a)
|
|
2
|
+
import{a as C}from"./XEK22IDA.js";import{a as I}from"./OWAKPT2D.js";import a from"./MZWO5JYA.js";import{O as $,S as F,U as L,a as q,b as p}from"./XRPUXUOQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([{createReactiveMap:k,findUtilityNetwork:U,getOrCreateMapValue:x},{stripHTML:E},f,{ignoreAbortErrors:S},{watch:v},V,P,Q,B,{b:N,f:A}])=>{var G=q`.list-container{min-height:var(--calcite-spacing-xxxl)}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.sticky-loading-container{display:flex;position:sticky;bottom:var(--calcite-spacing-sm);align-items:center;justify-content:center;z-index:2;margin:0;padding:0;height:var(--calcite-spacing-xxxl);pointer-events:none;height:500px}`,M=100,D={assetGroup:"assetgroup",assetType:"assettype"},j="{00000000-0000-0000-0000-000000000000}",T=class extends ${constructor(){super(...arguments),this._addFlowItem=t=>{t&&this.flowItems?.push(t)},this._attachmentAssociations=new f,this._attachmentFeatureCount=0,this._cancelQuery=()=>{let{_queryAbortController:t}=this;t&&t.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{let{_queryFeatureCountAbortController:t}=this;t&&t.abort(),this._queryFeatureCountAbortController=null},this._connectivityAssociations=new f,this._connectivityFeatureCount=0,this._containerAssociations=new f,this._containerFeatureCount=0,this._contentAssociations=new f,this._contentFeatureCount=0,this._networkSourceIdsInUse=new Set,this._query=async t=>{if(!t)return;await this._loadUtiltyNetworks();let{_queryAbortController:e}=this;this._destroyAssociatedFeatureViewModels(),this._clearFeatures(),this._featureCount&&await this._queryAssociatedFeatures(t,{signal:e?.signal})},this._queryController=async t=>{this._cancelQuery();let e=new AbortController;this._queryAbortController=e,await S(this._query(t)),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();let t=new AbortController;this._queryFeatureCountAbortController=t,await S(this._queryFeatureCount()),this._queryFeatureCountAbortController===t&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryDebounced=C(this._queryController,M),this._queryFeatureCountDebounced=C(this._queryFeatureCountController,M),this._structureAssociations=new f,this._structureFeatureCount=0,this._queryAssociationType=async()=>{this._activeAssociationType&&this._queryDebounced(this._activeAssociationType)},this._associationFeatures=k(),this._associationViewModels=k(),this._featureCount=0,this._loaded=!1,this._queryAbortController=null,this._queryFeatureCountAbortController=null,this._queryPageAbortController=null,this.associationTypes=null,this.autoDestroyDisabled=!1,this.useFeatureNextFlowItem=!1,this.flowType="feature-utility-network-associations",this.headingLevel=2,this.source="popup"}static{this.properties={_activeAssociationType:16,_associationFeatures:16,_associationViewModels:16,_canLoad:16,_canQuery:16,_featureCount:16,_loaded:16,_queryAbortController:16,_queryFeatureCountAbortController:16,_queryPageAbortController:16,_state:16,associationTypes:0,autoDestroyDisabled:5,description:1,flowItems:0,useFeatureNextFlowItem:5,flowType:1,graphic:0,heading:1,headingLevel:9,layer:0,map:0,messages:0,parentFeatureViewModel:0,referenceElement:1,source:1,spatialReference:0,timeZone:1,view:0}}static{this.styles=G}get _globalId(){return(this._globalIdField&&this.graphic?.attributes?.[this._globalIdField])??null}get _globalIdField(){return this.layer?.globalIdField}get _objectId(){return(this._objectIdField&&this.graphic?.attributes?.[this._objectIdField])??null}get _objectIdField(){return this.layer?.objectIdField}get _supportsCacheHint(){return!!this.layer?.capabilities?.queryRelated?.supportsCacheHint}get _utilityNetwork(){let{layer:t,map:e}=this;if(!t?.loaded||!e)return null;let s=A(t)?t.parent:t;return U(e,s)}get _canLoad(){return!!this.map}get _canQuery(){return!!this.layer?.capabilities?.query?.supportsPagination}get _state(){let{_canLoad:t,_canQuery:e,_featureCount:s,_loaded:a,_queryAbortController:i,_queryFeatureCountAbortController:r,_queryPageAbortController:o,associationTypes:l}=this;return r||t&&!a?"loading":i||o?"querying":!this._globalId||!l||!e||!s?"disabled":"ready"}get heading(){return this._heading}set heading(t){this._heading=t}async destroy(){await this.manager.destroy()}loaded(){this.manager.onLifecycle(()=>[v(()=>[this.graphic,this.layer,this.map,this.associationTypes,this._canQuery,this._objectId,this._globalId],()=>{this._queryFeatureCountDebounced(),this._queryAssociationType()},{initial:!0}),v(()=>this._activeAssociationType,t=>{this._queryDebounced(t)}),v(()=>this._associationFeatures.values(),()=>{this._setUpUtilityNetworkAssociationsViewModels()})]),this.manager.onDestroy(()=>{this._cancelQuery(),this._cancelQueryFeatureCount()})}_addAssociationTypeFlowItem(t){let e=this.useFeatureNextFlowItem?F(p`<arcgis-feature-utility-network-association-list .autoDestroyDisabled=${this.autoDestroyDisabled} .associationViewModels=${this._associationViewModels} .description=${this._getParentFeatureDescription()} .flowItems=${this.flowItems} .flowType=${this.flowType} .heading=${this._getAssociationTypeTitle(t)} .messages=${this.messages} .map=${this.map} .parentFeatureViewModel=${this.parentFeatureViewModel} .referenceElement=${this.referenceElement} .state=${this._state} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} use-feature-next-flow-item .view=${this.view}></arcgis-feature-utility-network-association-list>`):F(p`<arcgis-feature-utility-network-association-list .autoDestroyDisabled=${this.autoDestroyDisabled} .associationViewModels=${this._associationViewModels} .description=${this._getParentFeatureDescription()} .flowItems=${this.flowItems} .flowType=${this.flowType} .heading=${this._getAssociationTypeTitle(t)} .messages=${this.messages} .map=${this.map} .parentFeatureViewModel=${this.parentFeatureViewModel} .referenceElement=${this.referenceElement} .state=${this._state} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature-utility-network-association-list>`);this._addFlowItem(e)}_clearAssociations(){this._attachmentAssociations.removeAll(),this._connectivityAssociations.removeAll(),this._containerAssociations.removeAll(),this._contentAssociations.removeAll(),this._structureAssociations.removeAll()}_clearFeatures(){this._associationFeatures.forEach(t=>t.removeAll()),this._associationFeatures.clear()}_compareByFeatureTitle(t,e){return t.title.localeCompare(e.title,void 0,{numeric:!0})}async _countAssociatedFeatureCount(t,e,s,a,i){let r=this._getFeatureQueryWhereClause(t,e,s,a),o=t.createQuery();return o.where=r,o.outFields=["*"],o.returnGeometry=!1,await t.queryFeatureCount(o,{signal:i?.signal})}async _countAssociatedFeatures(t,e,s,a,i){if(!e.length)return 0;let r=await this._findLayersBySourceId(t);await this._loadLayers(r);let o=r.map(l=>this._countAssociatedFeatureCount(l,e,s,a,i));return(await Promise.all(o)).reduce((l,c)=>l+c,0)}async _createAssociationFeatureObjects(t,e,s,a,i){if(!t.length)return[];let r=new Map,o=Array.from(e.entries()).map(async([c,d])=>{let u=await this._findLayersBySourceId(c);await this._loadLayers(u);let h=u.map(m=>this._queryLayer(m,d,s,a,i));(await Promise.all(h)).forEach(m=>{m.forEach(n=>{if(this.source==="popup"?n.sourceLayer&&n.getEffectivePopupTemplate():n.sourceLayer){let _=n.layer.globalIdField??"",y=n.getAttribute(_),w=r.get(y)??[];w.push(n),r.set(y,w)}})})});await Promise.all(o);let l=[];return await Promise.all(t.toArray().map(async c=>{let{fromNetworkElement:d,toNetworkElement:u}=c,h=d.globalId===this._globalId?u:d,m=r.get(h.globalId)??[];await Promise.all(m.map(async n=>{let _=this._utilityNetwork?.getTerminalById(h?.terminalId??void 0)?.name,y=await n.sourceLayer.getFeatureTitle(n)||this._getFeatureTitle(n);l.push({title:y,feature:n,association:c,terminalName:_})}))})),l}_destroyAssociatedFeatureViewModels(){this._associationViewModels.forEach(t=>t.destroyAll())}_equals(t,e){if(t.globalId===j&&e.globalId===j){let s=function(d,u){return d.networkSourceId===u.networkSourceId&&d.globalId===u.globalId&&d.terminalId===u.terminalId&&d.firstUnit===u.firstUnit&&d.numUnits===u.numUnits},a=t.fromNetworkElement,i=t.toNetworkElement,r=e.fromNetworkElement,o=e.toNetworkElement,l=s(a,r),c=s(i,o);return l&&c&&t.associationType===e.associationType}return t.globalId!=null&&e.globalId!=null&&t.globalId===e.globalId}async _findLayersBySourceId(t){let{_utilityNetwork:e,map:s}=this;e?.loaded||await e?.load();let a=e.getLayerIdBySourceId(t),i=s.allLayers.filter(o=>!!e?.isUtilityLayer(o)&&o.layerId===a),r=s.allTables.filter(o=>!!e?.isUtilityLayer(o)&&o.layerId===a);return i.concat(r).toArray()}_getAssociationsByType(t){switch(t){case"attachment":return this._attachmentAssociations;case"structure":return this._structureAssociations;case"connectivity":return this._connectivityAssociations;case"container":return this._containerAssociations;case"content":return this._contentAssociations}}_getAssociationTypeTitle(t){let{messages:e}=this;if(t.title)return t.title;switch(t.type){case"attachment":return e?.associationsAttachments??this.messages?.noTitle??"";case"connectivity":return e?.associationsConnectivity??this.messages?.noTitle??"";case"structure":return e?.associationsStructure??this.messages?.noTitle??"";case"content":return e?.associationsContents??this.messages?.noTitle??"";case"container":return e?.associationsContainer??this.messages?.noTitle??""}}_getFeatureCountForAssociationType(t){switch(t){case"attachment":return this._attachmentFeatureCount;case"structure":return this._structureFeatureCount;case"content":return this._contentFeatureCount;case"container":return this._containerFeatureCount;case"connectivity":return this._connectivityFeatureCount}}_getFeatureQueryWhereClause(t,e,s,a){let i=t.globalIdField,r=t.fieldsIndex.get(D.assetGroup),o=t.fieldsIndex.get(D.assetType),l=s!=null,c=a!=null,d=i?V.sqlIn(i,e):null,u=l?`(${r?.name} = ${s})`:null,h=l&&c?`(${o?.name} = ${a})`:null;return[d,u,h].filter(Boolean).join(" AND ")}_getFeatureTitle(t){let e=t.attributes,s=t.sourceLayer;if(!e||!s)return"";let a="displayField"in s?s.displayField:null,i=a!=null?e[a.toString()]:null,r=i!=null?i.toString():null,o=t.getObjectId()?.toString();return r||o||""}_getParentFeatureDescription(){let{parentFeatureViewModel:t}=this;if(t){if("heading"in t)return t.heading;if("title"in t)return t.title}}async _loadUtiltyNetworks(){let t=this.map;if(!t)return;t.utilityNetworks&&await Promise.allSettled(t.utilityNetworks.map(s=>s.load()));let e=this._utilityNetwork;if(e){let s=a=>{if("layerId"in a&&e.isUtilityLayer(a)){let i=a.layerId!=null?e.getSourceIdByLayerId(a.layerId):null;i!=null&&this._networkSourceIdsInUse.add(i)}};this._networkSourceIdsInUse=new Set,t.allLayers.forEach(s),t.allTables.forEach(s)}}async _loadLayers(t){let e=t.filter(s=>!s.loaded).map(s=>s.load());e.length&&await Promise.allSettled(e)}_matchesGlobalFeature(t,e){return this._equals(t.association,e.association)}async _queryAssociatedFeatures(t,e){let{layer:s,_globalId:a,associationTypes:i,_utilityNetwork:r,_canQuery:o,_associationFeatures:l}=this;if(await Promise.allSettled([s?.load(),r?.load()]),!o||!s||!i||!r)return;let c=this._getAssociationsByType(t.type),{associatedAssetGroup:d,associatedAssetType:u}=t,h=new Map;c.forEach(n=>{let{fromNetworkElement:_,toNetworkElement:y}=n,{networkSourceId:w,elementGlobalId:b}=_.globalId===a?{networkSourceId:y.networkSourceId,elementGlobalId:y.globalId}:{networkSourceId:_.networkSourceId,elementGlobalId:_.globalId},g=h.get(w)||[];g.push(b),h.set(w,g)});let m=await this._createAssociationFeatureObjects(c,h,d,u,e);this._parseFeatureObjects(m,l)}async _queryAssociations(t){let{layer:e,_globalId:s,associationTypes:a,_utilityNetwork:i,_canQuery:r}=this;if(await Promise.allSettled([e?.load(),i?.load()]),this._clearAssociations(),!r||!e||!a||!i||!s)return;let o=A(e)?e.parent:e,l=new P({globalId:s,networkSourceId:i.getSourceIdByLayerId(o.layerId)}),c=new Set;a.forEach(n=>{switch(n.type){case"attachment":case"structure":c.add("attachment");break;case"container":case"content":c.add("containment");break;case"connectivity":c.add("connectivity"),c.add("junction-junction-connectivity"),c.add("junction-edge-from-connectivity"),c.add("junction-edge-midspan-connectivity"),c.add("junction-edge-to-connectivity");break}});let d=await i?.queryAssociations(new Q({elements:[l],types:Array.from(c)}),{signal:t?.signal}),u=new Map,h=new Map;a.forEach(n=>{h.set(n.type,n),u.set(n.type,[])}),d.forEach(n=>{let{toNetworkElement:_,fromNetworkElement:y}=n;switch(n.associationType){case"attachment":if(y?.globalId===s){if(this._shouldDiscardNetworkElement(_,"attachment",h))break;u.get("attachment")?.push(_.globalId),this._attachmentAssociations.add(n)}else{if(this._shouldDiscardNetworkElement(y,"structure",h))break;u.get("structure")?.push(y.globalId),this._structureAssociations.add(n)}break;case"connectivity":case"junction-edge-from-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-to-connectivity":case"junction-junction-connectivity":if(y?.globalId===s){if(this._shouldDiscardNetworkElement(_,"connectivity",h))break;u.get("connectivity")?.push(_.globalId)}else{if(this._shouldDiscardNetworkElement(y,"connectivity",h))break;u.get("connectivity")?.push(y.globalId)}this._connectivityAssociations.add(n);break;case"containment":if(y?.globalId===s){if(this._shouldDiscardNetworkElement(_,"content",h))break;u.get("content")?.push(_.globalId),this._contentAssociations.add(n)}else{if(this._shouldDiscardNetworkElement(y,"container",h))break;u.get("container")?.push(y.globalId),this._containerAssociations.add(n)}break}});let m=a.map(async n=>{let{associatedNetworkSourceId:_,associatedAssetGroup:y,associatedAssetType:w}=n,b=u.get(n.type),g=y!=null?await this._countAssociatedFeatures(_,b,y,w,t):b.length;switch(n.type){case"attachment":this._attachmentFeatureCount=g;break;case"connectivity":this._connectivityFeatureCount=g;break;case"container":this._containerFeatureCount=g;break;case"content":this._contentFeatureCount=g;break;case"structure":this._structureFeatureCount=g;break}});await Promise.allSettled(m)}async _queryFeatureCount(){await this._loadUtiltyNetworks();let{_queryFeatureCountAbortController:t,_canQuery:e}=this;if(!e){this._featureCount=0;return}await this._queryAssociations(t),this._featureCount=this._attachmentFeatureCount+this._connectivityFeatureCount+this._containerFeatureCount+this._contentFeatureCount+this._structureFeatureCount}async _queryLayer(t,e,s,a,i){let r=this._getFeatureQueryWhereClause(t,e,s,a),o=t.createQuery();o.where=r,o.outFields=["*"],o.returnGeometry=!1,o.cacheHint=this._supportsCacheHint;let{features:l}=await N(t,o,i);return l}_parseFeatureObjects(t,e){let s=k();t.forEach(a=>{let i=(a?.feature).sourceLayer;x(s,i,()=>new f).add(a)});for(let[a,i]of s)this._sortFeatureObjectsByTitle(i),e.set(a,i)}_selectAssociationType(t){let{flowItems:e}=this;e&&(this._activeAssociationType=t,this._setUpUtilityNetworkAssociationsViewModels(),this._addAssociationTypeFlowItem(t))}_setUpUtilityNetworkAssociationsViewModels(){this._associationViewModels.forEach((i,r)=>{let o=this._associationFeatures.get(r);o?i.forEach(l=>{o.find(c=>this._matchesGlobalFeature(l,c))||(i.remove(l),i.length||this._associationViewModels.delete(r))}):(i.removeAll(),this._associationViewModels.delete(r))});let{map:t,view:e,spatialReference:s,timeZone:a}=this;this._associationFeatures.forEach((i,r)=>{let o=this._associationViewModels.get(r)||new f;i?.filter(Boolean).forEach((l,c)=>{if(!o.some(d=>this._matchesGlobalFeature(d,l))){let{association:d,feature:u,terminalName:h,title:m}=l;o.add({title:m,association:d,featureViewModel:new B({abilities:{utilityNetworkAssociationsContent:!1},map:t,view:e,spatialReference:s,timeZone:a,graphic:u}),terminalName:h},c)}}),this._associationViewModels.set(r,o)})}_shouldDiscardNetworkElement(t,e,s){if(!t)return!1;let{networkSourceId:a}=t,i=s.get(e)?.associatedNetworkSourceId,r=this._networkSourceIdsInUse.has(a);return i!=null&&i!==a||!r}_sortFeatureObjectsByTitle(t){t.sort(this._compareByFeatureTitle)}render(){let{_state:t}=this;return p`<div class="root"><arcgis-feature-element-info .heading=${this.heading} .headingLevel=${this.headingLevel} .description=${this.description}></arcgis-feature-element-info>${t==="loading"?this._renderLoading():t==="disabled"?this._renderAssociationNotFound():this._renderContent()}</div>`}_renderAssociationNotFound(){return p`<calcite-notice icon=information kind=info open scale=s width=full><div slot=message>${this.messages?.noAssociations}</div></calcite-notice>`}_renderAssociationTypeList(t){return this._getFeatureCountForAssociationType(t.type)>0?this._renderAssociationTypeListItem(t):null}_renderAssociationTypeListItem(t){let e=this._getAssociationTypeTitle(t);return I(`association-type-${t.type}`,p`<calcite-list-item .description=${E(t.description)} .label=${E(e)} .value=${t.type} @calciteListItemSelect=${()=>this._selectAssociationType(t)}><calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon></calcite-list-item>`)}_renderContent(){let{_state:t,associationTypes:e,messages:s}=this,a=s?.associationsList??s?.noTitle??"";return I("list-container",p`<div class="list-container">${t==="ready"?p`<div><calcite-list display-mode=flat .label=${a}>${e.map(i=>this._renderAssociationTypeList(i))}</calcite-list></div>`:null}${this._renderStickyLoading()}</div>`)}_renderLoading(){return p`<div class="loading-container">${this._renderLoadingIcon()}${this._renderStickyLoading()}</div>`}_renderLoadingIcon(){return p`<calcite-loader inline label></calcite-loader>`}_renderStickyLoading(){return this._state==="querying"?p`<div class="sticky-loading-container">${this._renderLoadingIcon()}</div>`:null}};L("arcgis-feature-utility-network-associations",T);return T},"applications/Components/featureUtils","applications/Components/stringUtils","core/Collection","core/promiseUtils","core/reactiveUtils","core/sql","rest/networks/support/NetworkElement","rest/networks/support/QueryAssociationsParameters","popup/FeatureContent",a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import a from"./
|
|
2
|
+
import a from"./3ZXNGXHC.js";import{O as m,U as r,b as i}from"./XRPUXUOQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:f},{e:c}])=>{var l=class extends m{constructor(){super(...arguments),this._formats=[]}static{this.properties={_formats:16,viewModel:0,messages:0}}loaded(){this.manager.onLifecycle(()=>[f(()=>[this.viewModel.templateOptions.format,this.viewModel.templatesInfo?.format],()=>{let e=this.viewModel.templatesInfo;if(!e)return;if(this._formats.length!==e.format.choiceList.length){let a=[...c.values()];this._formats=e.format.choiceList.map(t=>{let s=a.find(n=>new RegExp(`\\b${n}\\b`,"iu").test(t))??t;return{value:s,label:t===s?t.toUpperCase():t}}).sort((t,s)=>t.label.localeCompare(s.label))}let o=this._formats.some(({value:a})=>new RegExp(`\\b${a}\\b`,"iu").test(this.viewModel.templateOptions.format));if(e.format.defaultValue&&!o){let a=this._formats.find(({value:t})=>new RegExp(`\\b${t}\\b`,"iu").test(e.format.defaultValue))?.value;a&&(this.viewModel.templateOptions.format=a);return}},{initial:!0})])}render(){return i`<div><calcite-label>${this.messages.fileFormatTitle}<calcite-combobox clear-disabled .label=${this.messages.formatDefaultOption} max-items=6 .placeholder=${this.messages.formatDefaultOption} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:e})=>{let o=e.selectedItems[0]?.value;this.viewModel.templateOptions.format=o??"pdf"}}>${this._formats.map(({value:e,label:o})=>i`<calcite-combobox-item .heading=${o} .selected=${e===this.viewModel.templateOptions.format} .value=${e}></calcite-combobox-item>`)}</calcite-combobox></calcite-label></div>`}};r("arcgis-print-format-select",l);return l},"core/reactiveUtils",a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import a from"./
|
|
2
|
+
import a from"./3ZXNGXHC.js";import{O as d,R as m,U as p,a as r,b as l}from"./XRPUXUOQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:f},{a:u,b:h,c:v,d:g,f:c}])=>{var y=r`:host{overflow-y:hidden;display:flex;flex:1 0}.template-select-flow-item-container{display:flex;flex-direction:column;justify-content:space-between;overflow-y:hidden;flex-grow:1}.template-select-flow-item-container .template-select-flow-item-content{display:flex;flex-direction:column;overflow-y:auto;flex:1 0}.template-select-flow-item-container .template-select-flow-item-content .template-select-flow-item-list-heading{display:flex;gap:var(--calcite-spacing-xs);align-items:center;justify-content:space-between;padding:var(--calcite-spacing-md) var(--calcite-spacing-lg);background-color:var(--calcite-color-foreground-2);border-bottom:1px solid var(--calcite-color-border-3);font-weight:var(--calcite-font-weight-semibold)}.template-button-container{padding:var(--calcite-spacing-md)}.template-done-button{width:100%}`,n=class extends d{static{this.properties={_selectedTemplate:16,excludeOrganizationTemplates:5,viewModel:0,messages:0,hideTemplateSelector:0}}static{this.styles=y}loaded(){this.manager.onLifecycle(()=>{let e,i=f(()=>this.viewModel.templateOptions.id,t=>{e?.remove(),this._selectedTemplate=t?this.viewModel.getLayoutTemplateById(t)??void 0:void 0,e=f(()=>this._selectedTemplate?.state,()=>this.requestUpdate(),{initial:!0})},{initial:!0});return()=>{i.remove(),e?.remove()}})}_getPortalTemplates(){return this.viewModel.includeDefaultTemplates&&!this.excludeOrganizationTemplates?this.viewModel.defaultTemplates.toArray().filter(({layout:e,layoutItem:i})=>!c(e)&&!!i?.id):[]}_getDefaultTemplates(){return this.viewModel.includeDefaultTemplates?this.viewModel.defaultTemplates.toArray().filter(({layout:e,layoutItem:i})=>!c(e)&&!i?.id):[]}_getPrintServiceTemplates(){return!this.viewModel.includeDefaultTemplates||!this._getDefaultTemplates().length?this.viewModel.printServiceTemplates.toArray().filter(({layout:e})=>!c(e)):[]}render(){let{messages:e}=this,i=u.test(this.viewModel.portal?.url),t=this.viewModel.browseTemplates.toArray(),a=this._getPortalTemplates(),s=this._getDefaultTemplates(),o=this._getPrintServiceTemplates(),w=t.length+a.length+s.length+o.length>15;return l`<div class="template-select-flow-item-container"><div class="template-select-flow-item-content"><slot></slot><calcite-list .filterEnabled=${w} .filterProps=${["label"]} .label=${e.templateList} selection-mode=single-persist @calciteListChange=${({currentTarget:T})=>this.viewModel.applyTemplate(T.selectedItems[0]?.value)}>${t.length?l`<div><div class="template-select-flow-item-list-heading">${e.myTemplates}${i?l`<calcite-chip icon=credits appearance=outline kind=neutral .label=${e.consumesCredits} scale=s>${e.consumesCredits}</calcite-chip>`:null}</div>${this._renderLayoutTemplates(t,!0)}</div>`:null}${a.length?l`<div><div class="template-select-flow-item-list-heading">${e.organizationTemplates}${i?l`<calcite-chip icon=credits appearance=outline kind=neutral .label=${e.consumesCredits} scale=s>${e.consumesCredits}</calcite-chip>`:null}</div>${this._renderLayoutTemplates(a)}</div>`:null}${t.length||a.length?s.length?l`<div><div class="template-select-flow-item-list-heading">${e.defaultTemplates}</div>${this._renderLayoutTemplates(s)}</div>`:null:this._renderLayoutTemplates(s)}${t.length||a.length?o.length?l`<div><div class="template-select-flow-item-list-heading">${e.defaultTemplates}</div>${this._renderLayoutTemplates(o)}</div>`:null:this._renderLayoutTemplates(o)}</calcite-list></div><div class="template-button-container"><calcite-button class="template-done-button" @click=${this.hideTemplateSelector}>Done</calcite-button></div></div>`}_renderLayoutTemplates(e,i=!1){return e.map(t=>l`<calcite-list-item .description=${h(t)} .label=${v(t,this.messages)} .selected=${t.id===this.viewModel.templateOptions.id} title=${t.description??""??m} .value=${t}><calcite-icon .icon=${(t.layout?g(t.layout):null)||"custom-print"} slot=content-start></calcite-icon>${t.state==="loading"?l`<calcite-loader inline label=loading scale=s slot=content-end></calcite-loader>`:null}${t?.state==="error"?l`<calcite-icon class="template-select-error" icon=exclamation-mark-circle scale=s slot=content-end></calcite-icon>`:null}${i?l`<calcite-action icon=trash @click=${()=>this.viewModel.removePortalTemplate(t)} slot=actions-end text=delete></calcite-action>`:null}</calcite-list-item>`)}};p("arcgis-print-template-selector",n);return n},"core/reactiveUtils",a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import a from"./
|
|
2
|
+
import a from"./3ZXNGXHC.js";import{e as r}from"./A22AUGYH.js";import"./MZQT7KZP.js";import"./QUZTFUWM.js";import"./XUSIBTEV.js";import{O as c,U as o,a as i,b as l}from"./XRPUXUOQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:d},{b:n,c:m,d:p}])=>{var g=i`.template-select-container{border:1px solid var(--calcite-color-border-1);cursor:pointer}.template-select-container .template-select-error,.template-select-container .template-select-arrow{display:flex;align-self:center;margin-right:var(--calcite-spacing-md)}`,s=class extends c{constructor(){super(...arguments),this._direction=r(),this._templateState="not-loaded"}static{this.properties={_selectedTemplate:16,_templateState:16,viewModel:0,messages:0,showTemplateSelector:0}}static{this.styles=g}loaded(){this.manager.onLifecycle(()=>{let e,t=d(()=>this.viewModel.templateOptions.id,a=>{e?.remove(),this._selectedTemplate=a?this.viewModel.getLayoutTemplateById(a)??void 0:void 0,e=d(()=>this._selectedTemplate?.state,h=>this._templateState=h??"not-loaded",{initial:!0})},{initial:!0});return()=>{t.remove(),e?.remove()}})}render(){let e=this._selectedTemplate?m(this._selectedTemplate,this.messages):this.messages.selectTemplate;return l`<calcite-block class="template-select-container" .description=${n(this._selectedTemplate)} .heading=${e} .label=${e} .loading=${this._templateState==="loading"} @click=${this.showTemplateSelector} @keydown=${t=>{(t.key==="Enter"||t.key===" ")&&this.showTemplateSelector()}} tabindex=0><calcite-icon .icon=${(this._selectedTemplate?.layout?p(this._selectedTemplate.layout):null)||"custom-print"} scale=l slot=content-start></calcite-icon>${this._templateState==="error"?l`<calcite-icon class="template-select-error" icon=exclamation-mark-circle scale=s slot=actions-end></calcite-icon>`:null}<calcite-icon class="template-select-arrow" .icon=${this._direction==="rtl"?"chevron-left":"chevron-right"} scale=s slot=actions-end></calcite-icon></calcite-block>`}};o("arcgis-print-template-select",s);return s},"core/reactiveUtils",a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import g from"./XFH2TUXK.js";import f from"./MZWO5JYA.js";import e from"./5W7XCJ5B.js";import{a as D}from"./PUAXDNBG.js";import d from"./EI6T7BKN.js";import c from"./7ICJOTUR.js";import{g as _}from"./A22AUGYH.js";import"./MZQT7KZP.js";import a from"./TWMQVARD.js";import"./QUZTFUWM.js";import{d as C}from"./XUSIBTEV.js";import{N as y,O as I,P as M,R as b,U as x,a as $,b as r,x as w}from"./XRPUXUOQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([{substitute:k},{renderingSanitizer:N},B,{watch:H},{stripHTML:Z},P,,,,R,,{a:F,b:L,c:E,d:T,e:A,i:V,p:l}])=>{var z=$`:host{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1);--calcite-color-background: var(--calcite-color-foreground-1)}.root{flex:1 1 auto}.root calcite-icon{box-sizing:content-box}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.content-element{margin-bottom:var(--calcite-spacing-lg);padding:0 var(--calcite-spacing-sm);display:flex;flex-direction:column}.content-element:only-child,.content-element:last-child{margin-bottom:var(--calcite-spacing-xxs)}.last-edited-info{padding-top:var(--calcite-spacing-xs);font-size:var(--calcite-font-size-sm)}`,U=R(P),v=class extends I{constructor(){super(...arguments),this.messages=D(),this._rootFlowNode=null,this.internalFlowItems=new B,this.flowType="feature",this.viewModel=U(this),this.view=this.viewModel.view,this.icon="icon",this.isFeatureFromTable=this.viewModel.isFeatureFromTable,this.graphic=this.viewModel.graphic,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.headingLevel=2,this.spatialReference=this.viewModel.spatialReference,this.timeZone=this.viewModel.timeZone,this.heading=this.viewModel.heading,this.map=this.viewModel.map,this.chartAnimationDisabled=this.viewModel.abilities.chartAnimation,this.hideHeading=!1,this.hideContent=!1,this.hideAttachmentsContent=!1,this.hideCustomContent=!1,this.hideExpressionContent=!1,this.hideFieldsContent=!1,this.hideMediaContent=!1,this.showRelationshipContent=!1,this.hideTextContent=!1,this.showUtilityNetworkContent=!1,this.hideLastEditedInfo=!1,this.autoDestroyDisabled=!1,this.location=this.viewModel.location,this.state=this.viewModel.state,this.arcgisPropertyChange=_()("flowItems","state"),this.arcgisReady=w()}static{this.properties={popupTemplate:16,sourceLayer:16,fieldInfoMap:16,values:16,globalValues:16,internalFlowItems:16,flowType:1,viewModel:0,view:0,flowItems:0,referenceElement:1,icon:1,isFeatureFromTable:36,graphic:0,defaultPopupTemplateEnabled:5,headingLevel:9,spatialReference:0,timeZone:1,heading:0,map:0,chartAnimationDisabled:5,hideHeading:5,hideContent:5,hideAttachmentsContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,showRelationshipContent:5,hideTextContent:5,showUtilityNetworkContent:5,hideLastEditedInfo:5,autoDestroyDisabled:5,messageOverrides:0,label:1,location:0,state:32}}static{this.styles=z}get popupTemplate(){return E(this.graphic,this.defaultPopupTemplateEnabled)??void 0}get sourceLayer(){return T(this.graphic)}get fieldInfoMap(){return F(L(this.popupTemplate),this.sourceLayer)}get values(){return this.graphic?.attributes??{}}get globalValues(){return this.viewModel.formattedAttributes?.global??{}}async destroy(){this._removeFlowItems(),await this.manager.destroy()}nextMedia(e){this._pageContentElementMedia(e,1)}previousMedia(e){this._pageContentElementMedia(e,-1)}setActiveMedia(e,t){let i=this.viewModel.content;if(!Array.isArray(i))return;let a=i[e];if(a?.type!=="media")return;let s=a;this._setContentElementMedia(s,t)}async updateGeometry(){return await this.viewModel.updateGeometry()}loaded(){this.manager.onLifecycle(()=>[H(()=>[this.internalFlowItems?.length],()=>this._setFocus())])}_setContentElementMedia(e,t){let i=e.mediaInfos?.length??0,a=(t+i)%i;e.activeMediaInfoIndex=a}_pageContentElementMedia(e,t){let i=this.viewModel.content;if(!Array.isArray(i))return;let a=i[e];if(a?.type!=="media")return;let s=a,{activeMediaInfoIndex:n}=s,o=(n??0)+t;this._setContentElementMedia(s,o)}_removeFlowItems(){this.internalFlowItems?.destroyAll()}_storeRootFlowNode(e){this._rootFlowNode=e}_setFocus(){this._rootFlowNode?.setFocus()}_handleDrillInBackClick(){this.internalFlowItems?.pop()?.destroy()}render(){let{state:e}=this.viewModel,t=r`<div class="container">${e==="error"?this._renderError():this._renderContentContainer()}</div>`;return r`<div class="root">${t}</div>`}_renderError(){let{messages:e,hideHeading:t}=this;return r`<calcite-notice icon=exclamation-mark-circle kind=danger open scale=s>${t?null:r`<div slot=title>${e.error}</div>`}<div slot=message>${e.loadingError}</div></calcite-notice>`}_renderAttachments(e){let{values:t,fieldInfoMap:i,sourceLayer:a,globalValues:s}=this,n=l({values:t,fieldInfoMap:i,globalValues:s,layer:a,text:e.title}),o=l({values:t,fieldInfoMap:i,globalValues:s,layer:a,text:e.description});return r`<arcgis-feature-attachments .headingLevel=${this.headingLevel} .heading=${n} class="content-element" .displayType=${e.displayType} .attachmentKeywords=${e.attachmentKeywords??void 0} .attachmentTypes=${e.attachmentTypes??void 0} .orderByFields=${e.orderByFields??void 0} .graphic=${this.graphic??void 0} .description=${o} hide-preview-image-attachment-name .messages=${this.messages}></arcgis-feature-attachments>`}_renderCustom(e){return r`<arcgis-feature-content .creator=${e.creator} .destroyer=${e.destroyer??void 0} .graphic=${this.graphic??void 0} class="content-element"></arcgis-feature-content>`}_renderFields(e,t){let i=this.viewModel.formattedAttributes,{values:a,fieldInfoMap:s,sourceLayer:n,popupTemplate:o,globalValues:d,graphic:c}=this,h=!!e?.fieldInfos,p=(e.fieldInfos??o?.fieldInfos??[])?.filter(({fieldName:f})=>!!f&&(V(f)||A(f)||f in a)),u=o?.expressionInfos,m=l({values:a,fieldInfoMap:s,globalValues:d,layer:n,text:e.title}),g=l({values:a,fieldInfoMap:s,globalValues:d,layer:n,text:e.description});return r`<arcgis-feature-fields .headingLevel=${this.headingLevel} .heading=${m} class="content-element" .messages=${this.messages} .graphic=${c??void 0} .isContentFieldInfos=${h} .layer=${n} .description=${g} .values=${{...i?.global,...i?.content?.[t]}} .fieldInfos=${p} .expressionInfos=${u??void 0}></arcgis-feature-fields>`}_renderMedia(e,t){let{values:i,graphic:a,fieldInfoMap:s,sourceLayer:n,popupTemplate:o,globalValues:d}=this,{formattedAttributes:c,relatedInfos:h,expressionAttributes:p}=this.viewModel,u={...c?.global,...c?.content?.[t]},m=l({values:i,fieldInfoMap:s,globalValues:d,layer:n,text:e.title}),g=l({values:i,fieldInfoMap:s,globalValues:d,layer:n,text:e.description});return r`<arcgis-feature-media .activeMediaInfoIndex=${e.activeMediaInfoIndex??0} .chartAnimationDisabled=${this.chartAnimationDisabled} .headingLevel=${this.headingLevel} .heading=${m} class="content-element" .description=${g} .values=${i} .expressionValues=${p} .layer=${n} .graphic=${a??void 0} .messages=${this.messages} .fieldInfoMap=${s} .mediaInfos=${e.mediaInfos??[]} .popupTemplate=${o??void 0} .relatedInfos=${h} .formattedValues=${u}></arcgis-feature-media>`}_renderText(e){let{values:t,fieldInfoMap:i,sourceLayer:a,globalValues:s}=this;return r`<arcgis-feature-content .creator=${l({values:t,fieldInfoMap:i,globalValues:s,layer:a,text:e.text})} .graphic=${this.graphic??void 0} class="content-element"></arcgis-feature-content>`}_renderExpression(e,t){let i=this.viewModel.formattedAttributes,{fieldInfoMap:a,popupTemplate:s,sourceLayer:n}=this,o=s?.expressionInfos;return r`<arcgis-feature-expression .expressionInfo=${e.expressionInfo} .expressionInfos=${o??void 0} .map=${this.map??void 0} .spatialReference=${this.spatialReference??void 0} .view=${this.viewModel.view??void 0} .graphic=${this.graphic??void 0} .layer=${n} .location=${this.location??void 0} .headingLevel=${this.headingLevel} class="content-element" .interceptor=${this.viewModel.interceptor} .messages=${this.messages} .fieldInfoMap=${a} .values=${{...i?.global,...i?.content?.[t]}}></arcgis-feature-expression>`}_renderRelationship(e,t){let{values:i,graphic:a,fieldInfoMap:s,sourceLayer:n,globalValues:o}=this,{displayCount:d,orderByFields:c,relationshipId:h}=e,{formattedAttributes:p,view:u}=this.viewModel,m={...p?.global,...p?.content?.[t]},g=l({values:i,fieldInfoMap:s,globalValues:o,layer:n,text:e.title}),f=l({values:i,fieldInfoMap:s,globalValues:o,layer:n,text:e.description});return r`<arcgis-feature-relationship .autoDestroyDisabled=${this.autoDestroyDisabled} class="content-element" .flowItems=${this.flowItems??this.internalFlowItems} .description=${f} .layer=${n} .map=${this.map??void 0} .displayCount=${d} .graphic=${a??void 0} .heading=${g} .headingLevel=${this.headingLevel} .messages=${this.messages} .orderByFields=${c??void 0} .relationshipId=${h??void 0} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} use-feature-next-flow-item .values=${m} .view=${u??void 0}></arcgis-feature-relationship>`}_renderAssociation(e){let{fieldInfoMap:t,globalValues:i,graphic:a,messages:s,sourceLayer:n,values:o}=this,d=l({values:o,fieldInfoMap:t,globalValues:i,layer:n,text:e.title}),c=l({values:o,fieldInfoMap:t,globalValues:i,layer:n,text:e.description});return r`<arcgis-feature-utility-network-associations .autoDestroyDisabled=${this.autoDestroyDisabled} .associationTypes=${e.associationTypes} class="content-element" .description=${c} .flowItems=${this.flowItems??this.internalFlowItems} .graphic=${a??void 0} .heading=${d} .headingLevel=${this.headingLevel} .layer=${n} .map=${this.map??void 0} .messages=${s} .parentFeatureViewModel=${this.viewModel} .referenceElement=${this.referenceElement} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} use-feature-next-flow-item .view=${this.viewModel.view??void 0}></arcgis-feature-utility-network-associations>`}_renderContentElement(e,t){switch(e.type){case"attachments":return this.hideAttachmentsContent?null:this._renderAttachments(e);case"custom":return this.hideCustomContent?null:this._renderCustom(e);case"fields":return this.hideFieldsContent?null:this._renderFields(e,t);case"media":return this.hideMediaContent?null:this._renderMedia(e,t);case"text":return this.hideTextContent?null:this._renderText(e);case"expression":return this.hideExpressionContent?null:this._renderExpression(e,t);case"relationship":return this.showRelationshipContent?this._renderRelationship(e,t):null;case"utility-network-associations":return this.showUtilityNetworkContent?this._renderAssociation(e):null;default:return null}}_renderContent(){let{content:e,graphic:t}=this.viewModel;if(!e)return null;if(Array.isArray(e)&&e.length)return e.length?e.map(this._renderContentElement,this):null;if(typeof e=="string"){let{values:i,fieldInfoMap:a,sourceLayer:s,globalValues:n}=this;return r`<arcgis-feature-content .creator=${l({values:i,fieldInfoMap:a,globalValues:n,layer:s,text:e})} .graphic=${t??void 0} class="content-element"></arcgis-feature-content>`}return e instanceof HTMLElement?e:null}_renderContentContainer(){let{flowItems:e,hideContent:t,internalFlowItems:i,headingLevel:a,state:s,messages:n,heading:o,hideHeading:d}=this,c=t?null:r`<div class="main">${[this._renderContent(),this._renderLastEditInfo()]}</div>`,h=n.returnToInitialFeature??"";return e?c:r`<calcite-flow ${y(this._storeRootFlowNode)}><calcite-flow-item .loading=${s==="loading"} .headingLevel=${a} .heading=${d?void 0:Z(o)} .selected=${!i.length}>${!d&&o?r`<div slot=heading><div .innerHTML=${N.sanitize(o??"")??""}></div></div>`:null}${c}</calcite-flow-item>${i.toArray().map((p,u)=>r`<calcite-flow-item @calciteFlowItemBack=${m=>{m.preventDefault(),this._handleDrillInBackClick()}} .loading=${s==="loading"} .headingLevel=${a} .selected=${u===i.length-1}><calcite-action icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${h} title=${h??b}></calcite-action>${p}</calcite-flow-item>`)}</calcite-flow>`}_renderLastEditInfo(){let{hideLastEditedInfo:e,messages:t}=this,{lastEditInfo:i}=this.viewModel;if(!i||e)return null;let{date:a,user:s}=i,n=i.type==="edit"?s?t.lastEditedByUser:t.lastEdited:s?t.lastCreatedByUser:t.lastCreated,o=k(n??"",{date:a,user:s});return r`<div class=${M(C("last-edited-info","content-element"))}>${o}</div>`}};x("arcgis-feature-next",v);return v},"intl","applications/Components/sanitizerUtils","core/Collection","core/reactiveUtils","applications/Components/stringUtils","popup/Feature",a,c,d,e,f,g)
|
|
2
|
+
import g from"./XFH2TUXK.js";import f from"./MZWO5JYA.js";import e from"./5W7XCJ5B.js";import{a as D}from"./PUAXDNBG.js";import d from"./EI6T7BKN.js";import c from"./7ICJOTUR.js";import{g as _}from"./A22AUGYH.js";import"./MZQT7KZP.js";import a from"./TWMQVARD.js";import"./QUZTFUWM.js";import{d as C}from"./XUSIBTEV.js";import{N as y,O as I,P as M,R as b,U as x,a as $,b as r,x as w}from"./XRPUXUOQ.js";import"./H6RQVSYM.js";export default $arcgis.t(([{substitute:k},{renderingSanitizer:N},B,{watch:H},{stripHTML:Z},P,,,,R,,{a:F,b:L,c:E,d:T,e:A,i:V,p:l}])=>{var z=$`:host{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1);--calcite-color-background: var(--calcite-color-foreground-1)}.root{flex:1 1 auto}.root calcite-icon{box-sizing:content-box}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.content-element{margin-bottom:var(--calcite-spacing-lg);padding:0 var(--calcite-spacing-sm);display:flex;flex-direction:column}.content-element:only-child,.content-element:last-child{margin-bottom:var(--calcite-spacing-xxs)}.last-edited-info{padding-top:var(--calcite-spacing-xs);font-size:var(--calcite-font-size-sm)}`,U=R(P),v=class extends I{constructor(){super(...arguments),this.messages=D(),this._rootFlowNode=null,this.internalFlowItems=new B,this.flowType="feature",this.viewModel=U(this),this.view=this.viewModel.view,this.icon="icon",this.isFeatureFromTable=this.viewModel.isFeatureFromTable,this.graphic=this.viewModel.graphic,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.headingLevel=2,this.spatialReference=this.viewModel.spatialReference,this.timeZone=this.viewModel.timeZone,this.heading=this.viewModel.heading,this.map=this.viewModel.map,this.chartAnimationDisabled=this.viewModel.abilities.chartAnimation,this.hideHeading=!1,this.hideContent=!1,this.hideAttachmentsContent=!1,this.hideCustomContent=!1,this.hideExpressionContent=!1,this.hideFieldsContent=!1,this.hideMediaContent=!1,this.showRelationshipContent=!1,this.hideTextContent=!1,this.showUtilityNetworkContent=!1,this.hideLastEditedInfo=!1,this.autoDestroyDisabled=!1,this.location=this.viewModel.location,this.state=this.viewModel.state,this.arcgisPropertyChange=_()("flowItems","state"),this.arcgisReady=w()}static{this.properties={popupTemplate:16,sourceLayer:16,fieldInfoMap:16,values:16,globalValues:16,internalFlowItems:16,flowType:1,viewModel:0,view:0,flowItems:0,referenceElement:1,icon:1,isFeatureFromTable:36,graphic:0,defaultPopupTemplateEnabled:5,headingLevel:9,spatialReference:0,timeZone:1,heading:0,map:0,chartAnimationDisabled:5,hideHeading:5,hideContent:5,hideAttachmentsContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,showRelationshipContent:5,hideTextContent:5,showUtilityNetworkContent:5,hideLastEditedInfo:5,autoDestroyDisabled:5,messageOverrides:0,label:1,location:0,state:32}}static{this.styles=z}get popupTemplate(){return E(this.graphic,this.defaultPopupTemplateEnabled)??void 0}get sourceLayer(){return T(this.graphic)}get fieldInfoMap(){return F(L(this.popupTemplate),this.sourceLayer)}get values(){return this.graphic?.attributes??{}}get globalValues(){return this.viewModel.formattedAttributes?.global??{}}async destroy(){this._removeFlowItems(),await this.manager.destroy()}nextMedia(e){this._pageContentElementMedia(e,1)}previousMedia(e){this._pageContentElementMedia(e,-1)}setActiveMedia(e,t){let i=this.viewModel.content;if(!Array.isArray(i))return;let a=i[e];if(a?.type!=="media")return;let s=a;this._setContentElementMedia(s,t)}async updateGeometry(){return await this.viewModel.updateGeometry()}loaded(){this.manager.onLifecycle(()=>[H(()=>[this.internalFlowItems?.length],()=>this._setFocus())])}_setContentElementMedia(e,t){let i=e.mediaInfos?.length??0,a=(t+i)%i;e.activeMediaInfoIndex=a}_pageContentElementMedia(e,t){let i=this.viewModel.content;if(!Array.isArray(i))return;let a=i[e];if(a?.type!=="media")return;let s=a,{activeMediaInfoIndex:n}=s,o=(n??0)+t;this._setContentElementMedia(s,o)}_removeFlowItems(){this.internalFlowItems?.destroyAll()}_storeRootFlowNode(e){this._rootFlowNode=e}_setFocus(){this._rootFlowNode?.setFocus()}_handleDrillInBackClick(){this.internalFlowItems?.pop()?.destroy()}render(){let{state:e}=this.viewModel,t=r`<div class="container">${e==="error"?this._renderError():this._renderContentContainer()}</div>`;return r`<div class="root">${t}</div>`}_renderError(){let{messages:e,hideHeading:t}=this;return r`<calcite-notice icon=exclamation-mark-circle kind=danger open scale=s>${t?null:r`<div slot=title>${e.error}</div>`}<div slot=message>${e.loadingError}</div></calcite-notice>`}_renderAttachments(e){let{values:t,fieldInfoMap:i,sourceLayer:a,globalValues:s}=this,n=l({values:t,fieldInfoMap:i,globalValues:s,layer:a,text:e.title}),o=l({values:t,fieldInfoMap:i,globalValues:s,layer:a,text:e.description});return r`<arcgis-feature-attachments .headingLevel=${this.headingLevel} .heading=${n} class="content-element" .displayType=${e.displayType} .attachmentKeywords=${e.attachmentKeywords??void 0} .attachmentTypes=${e.attachmentTypes??void 0} .orderByFields=${e.orderByFields??void 0} .graphic=${this.graphic??void 0} .description=${o} hide-preview-image-attachment-name .messages=${this.messages}></arcgis-feature-attachments>`}_renderCustom(e){return r`<arcgis-feature-content .creator=${e.creator} .destroyer=${e.destroyer??void 0} .graphic=${this.graphic??void 0} class="content-element"></arcgis-feature-content>`}_renderFields(e,t){let i=this.viewModel.formattedAttributes,{values:a,fieldInfoMap:s,sourceLayer:n,popupTemplate:o,globalValues:d,graphic:c}=this,h=!!e?.fieldInfos,p=(e.fieldInfos??o?.fieldInfos??[])?.filter(({fieldName:f})=>!!f&&(V(f)||A(f)||f in a)),u=o?.expressionInfos,m=l({values:a,fieldInfoMap:s,globalValues:d,layer:n,text:e.title}),g=l({values:a,fieldInfoMap:s,globalValues:d,layer:n,text:e.description});return r`<arcgis-feature-fields .headingLevel=${this.headingLevel} .heading=${m} class="content-element" .messages=${this.messages} .graphic=${c??void 0} .isContentFieldInfos=${h} .layer=${n} .description=${g} .values=${{...i?.global,...i?.content?.[t]}} .fieldInfos=${p} .expressionInfos=${u??void 0}></arcgis-feature-fields>`}_renderMedia(e,t){let{values:i,graphic:a,fieldInfoMap:s,sourceLayer:n,popupTemplate:o,globalValues:d}=this,{formattedAttributes:c,relatedInfos:h,expressionAttributes:p}=this.viewModel,u={...c?.global,...c?.content?.[t]},m=l({values:i,fieldInfoMap:s,globalValues:d,layer:n,text:e.title}),g=l({values:i,fieldInfoMap:s,globalValues:d,layer:n,text:e.description});return r`<arcgis-feature-media .activeMediaInfoIndex=${e.activeMediaInfoIndex??0} .chartAnimationDisabled=${this.chartAnimationDisabled} .headingLevel=${this.headingLevel} .heading=${m} class="content-element" .description=${g} .values=${i} .expressionValues=${p} .layer=${n} .graphic=${a??void 0} .messages=${this.messages} .fieldInfoMap=${s} .mediaInfos=${e.mediaInfos??[]} .popupTemplate=${o??void 0} .relatedInfos=${h} .formattedValues=${u}></arcgis-feature-media>`}_renderText(e){let{values:t,fieldInfoMap:i,sourceLayer:a,globalValues:s}=this;return r`<arcgis-feature-content .creator=${l({values:t,fieldInfoMap:i,globalValues:s,layer:a,text:e.text})} .graphic=${this.graphic??void 0} class="content-element"></arcgis-feature-content>`}_renderExpression(e,t){let i=this.viewModel.formattedAttributes,{fieldInfoMap:a,popupTemplate:s,sourceLayer:n}=this,o=s?.expressionInfos;return r`<arcgis-feature-expression .expressionInfo=${e.expressionInfo} .expressionInfos=${o??void 0} .map=${this.map??void 0} .spatialReference=${this.spatialReference??void 0} .view=${this.viewModel.view??void 0} .graphic=${this.graphic??void 0} .layer=${n} .location=${this.location??void 0} .headingLevel=${this.headingLevel} class="content-element" .interceptor=${this.viewModel.interceptor} .messages=${this.messages} .fieldInfoMap=${a} .values=${{...i?.global,...i?.content?.[t]}}></arcgis-feature-expression>`}_renderRelationship(e,t){let{values:i,graphic:a,fieldInfoMap:s,sourceLayer:n,globalValues:o}=this,{displayCount:d,orderByFields:c,relationshipId:h}=e,{formattedAttributes:p,view:u}=this.viewModel,m={...p?.global,...p?.content?.[t]},g=l({values:i,fieldInfoMap:s,globalValues:o,layer:n,text:e.title}),f=l({values:i,fieldInfoMap:s,globalValues:o,layer:n,text:e.description});return r`<arcgis-feature-relationship .autoDestroyDisabled=${this.autoDestroyDisabled} class="content-element" .flowItems=${this.flowItems??this.internalFlowItems} .description=${f} .layer=${n} .map=${this.map??void 0} .displayCount=${d} .graphic=${a??void 0} .heading=${g} .headingLevel=${this.headingLevel} .messages=${this.messages} .orderByFields=${c??void 0} .relationshipId=${h??void 0} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} use-feature-next-flow-item .values=${m} .view=${u??void 0}></arcgis-feature-relationship>`}_renderAssociation(e){let{fieldInfoMap:t,globalValues:i,graphic:a,messages:s,sourceLayer:n,values:o}=this,d=l({values:o,fieldInfoMap:t,globalValues:i,layer:n,text:e.title}),c=l({values:o,fieldInfoMap:t,globalValues:i,layer:n,text:e.description});return r`<arcgis-feature-utility-network-associations .autoDestroyDisabled=${this.autoDestroyDisabled} .associationTypes=${e.associationTypes} class="content-element" .description=${c} .flowItems=${this.flowItems??this.internalFlowItems} .graphic=${a??void 0} .heading=${d} .headingLevel=${this.headingLevel} .layer=${n} .map=${this.map??void 0} .messages=${s} .parentFeatureViewModel=${this.viewModel} .referenceElement=${this.referenceElement} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} use-feature-next-flow-item .view=${this.viewModel.view??void 0}></arcgis-feature-utility-network-associations>`}_renderContentElement(e,t){switch(e.type){case"attachments":return this.hideAttachmentsContent?null:this._renderAttachments(e);case"custom":return this.hideCustomContent?null:this._renderCustom(e);case"fields":return this.hideFieldsContent?null:this._renderFields(e,t);case"media":return this.hideMediaContent?null:this._renderMedia(e,t);case"text":return this.hideTextContent?null:this._renderText(e);case"expression":return this.hideExpressionContent?null:this._renderExpression(e,t);case"relationship":return this.showRelationshipContent?this._renderRelationship(e,t):null;case"utility-network-associations":return this.showUtilityNetworkContent?this._renderAssociation(e):null;default:return null}}_renderContent(){let{content:e,graphic:t}=this.viewModel;if(!e)return null;if(Array.isArray(e)&&e.length)return e.length?e.map(this._renderContentElement,this):null;if(typeof e=="string"){let{values:i,fieldInfoMap:a,sourceLayer:s,globalValues:n}=this;return r`<arcgis-feature-content .creator=${l({values:i,fieldInfoMap:a,globalValues:n,layer:s,text:e})} .graphic=${t??void 0} class="content-element"></arcgis-feature-content>`}return e instanceof HTMLElement?e:null}_renderContentContainer(){let{flowItems:e,hideContent:t,internalFlowItems:i,headingLevel:a,state:s,messages:n,heading:o,hideHeading:d}=this,c=t?null:r`<div class="main">${[this._renderContent(),this._renderLastEditInfo()]}</div>`,h=n.returnToInitialFeature??"";return e?c:r`<calcite-flow ${y(this._storeRootFlowNode)}><calcite-flow-item .loading=${s==="loading"} .headingLevel=${a} .heading=${d?void 0:Z(o)} .selected=${!i.length}>${!d&&o?r`<div slot=heading><div .innerHTML=${N.sanitize(o??"")??""}></div></div>`:null}${c}</calcite-flow-item>${i.toArray().map((p,u)=>r`<calcite-flow-item @calciteFlowItemBack=${m=>{m.preventDefault(),this._handleDrillInBackClick()}} .loading=${s==="loading"} .headingLevel=${a} .selected=${u===i.length-1}><calcite-action icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${h} title=${h??b}></calcite-action>${p}</calcite-flow-item>`)}</calcite-flow>`}_renderLastEditInfo(){let{hideLastEditedInfo:e,messages:t}=this,{lastEditInfo:i}=this.viewModel;if(!i||e)return null;let{date:a,user:s}=i,n=i.type==="edit"?s?t.lastEditedByUser:t.lastEdited:s?t.lastCreatedByUser:t.lastCreated,o=k(n??"",{date:a,user:s});return r`<div class=${M(C("last-edited-info","content-element"))}>${o}</div>`}};x("arcgis-feature-next",v);return v},"intl","applications/Components/sanitizerUtils","core/Collection","core/reactiveUtils","applications/Components/stringUtils","popup/FeatureContent",a,c,d,e,f,g)
|