@arcgis/map-components 5.2.0-next.86 → 5.2.0-next.88
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/2GQ6KVNI.js +2 -0
- package/dist/cdn/3CFRD2EN.js +2 -0
- package/dist/cdn/{YXA3DG4H.js → 3W4IH5LQ.js} +1 -1
- package/dist/cdn/5L5UYV3H.js +2 -0
- package/dist/cdn/{7IWMEBK6.js → 6BNYO33V.js} +1 -1
- package/dist/cdn/6NGRUK5C.js +2 -0
- package/dist/cdn/BPHJ4VBC.js +2 -0
- package/dist/cdn/CFB4ZR5F.js +2 -0
- package/dist/cdn/D6MRDGUC.js +2 -0
- package/dist/cdn/EFUTKX2O.js +2 -0
- package/dist/cdn/{PNSES5YC.js → EGUVICJF.js} +1 -1
- package/dist/cdn/FXK4G4VK.js +2 -0
- package/dist/cdn/GNVPXNTX.js +2 -0
- package/dist/cdn/HTEIMRY6.js +2 -0
- package/dist/cdn/I2D75Q7M.js +2 -0
- package/dist/cdn/IMG5GOJB.js +2 -0
- package/dist/cdn/JXBEE5GW.js +2 -0
- package/dist/cdn/JZC42PXS.js +2 -0
- package/dist/cdn/K3N6NHJW.js +2 -0
- package/dist/cdn/KN4PG54T.js +2 -0
- package/dist/cdn/{56NINR5L.js → KNMMVZVV.js} +1 -1
- package/dist/cdn/M66G67OC.js +2 -0
- package/dist/cdn/MQX2F54G.js +2 -0
- package/dist/cdn/NB5DQKQY.js +2 -0
- package/dist/cdn/NFWFRHUT.js +2 -0
- package/dist/cdn/PCEAIDCB.js +2 -0
- package/dist/cdn/PMU2DO3P.js +2 -0
- package/dist/cdn/{LTGPFC6N.js → PWEF6IKF.js} +1 -1
- package/dist/cdn/{HWLBIEGO.js → RS5BEGC5.js} +1 -1
- package/dist/cdn/{K4V76SMR.js → TAIZWQYU.js} +1 -1
- package/dist/cdn/TPG3TU6B.js +2 -0
- package/dist/cdn/TRFWUKXA.js +2 -0
- package/dist/cdn/TSZ26CSX.js +2 -0
- package/dist/cdn/V4W4ZP6M.js +2 -0
- package/dist/cdn/XM2OBGXW.js +2 -0
- package/dist/cdn/assets/presentation/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/utility-network-picker/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/constants2.js +6 -0
- package/dist/chunks/useArcgisViewReadyError.js +42 -27
- package/dist/components/arcgis-aggregated-features/customElement.js +0 -1
- package/dist/components/arcgis-area-measurement-2d/customElement.d.ts +10 -0
- package/dist/components/arcgis-area-measurement-3d/customElement.d.ts +10 -0
- package/dist/components/arcgis-attachments/customElement.d.ts +10 -0
- package/dist/components/arcgis-basemap-gallery/customElement.d.ts +10 -0
- package/dist/components/arcgis-basemap-layer-list/customElement.d.ts +23 -0
- package/dist/components/arcgis-basemap-layer-list-next/customElement.d.ts +604 -51
- package/dist/components/arcgis-basemap-layer-list-next/customElement.js +2 -2
- package/dist/components/arcgis-basemap-layer-list-next/types.d.ts +39 -0
- package/dist/components/arcgis-basemap-toggle/customElement.d.ts +10 -0
- package/dist/components/arcgis-bookmarks/customElement.d.ts +20 -0
- package/dist/components/arcgis-bookmarks/customElement.js +0 -1
- package/dist/components/arcgis-building-explorer/customElement.d.ts +10 -0
- package/dist/components/arcgis-catalog-layer-list/customElement.d.ts +23 -0
- package/dist/components/arcgis-catalog-layer-list-next/customElement.d.ts +433 -59
- package/dist/components/arcgis-catalog-layer-list-next/customElement.js +2 -2
- package/dist/components/arcgis-catalog-layer-list-next/types.d.ts +41 -6
- package/dist/components/arcgis-compass/customElement.d.ts +10 -0
- package/dist/components/arcgis-coordinate-conversion/customElement.d.ts +10 -0
- package/dist/components/arcgis-coordinate-conversion-next/customElement.d.ts +10 -0
- package/dist/components/arcgis-daylight/customElement.d.ts +10 -0
- package/dist/components/arcgis-direct-line-measurement-3d/customElement.d.ts +10 -0
- package/dist/components/arcgis-directional-pad/customElement.d.ts +10 -0
- package/dist/components/arcgis-directions/customElement.d.ts +10 -0
- package/dist/components/arcgis-distance-measurement-2d/customElement.d.ts +10 -0
- package/dist/components/arcgis-editor/customElement.d.ts +10 -0
- package/dist/components/arcgis-elevation-profile/customElement.d.ts +10 -0
- package/dist/components/arcgis-expand/customElement.d.ts +10 -0
- package/dist/components/arcgis-feature/customElement.d.ts +10 -0
- package/dist/components/arcgis-feature-form/customElement.d.ts +10 -0
- package/dist/components/arcgis-feature-next/customElement.d.ts +32 -1
- package/dist/components/arcgis-feature-next/customElement.js +4 -4
- package/dist/components/arcgis-feature-table/customElement.d.ts +10 -0
- package/dist/components/arcgis-feature-templates/customElement.d.ts +10 -0
- package/dist/components/arcgis-feature-templates-legacy/customElement.d.ts +10 -0
- package/dist/components/arcgis-features/customElement.d.ts +20 -0
- package/dist/components/arcgis-features/customElement.js +3 -3
- package/dist/components/arcgis-features-next/customElement.d.ts +32 -1
- package/dist/components/arcgis-features-next/customElement.js +98 -86
- package/dist/components/arcgis-features-next/index.js +0 -1
- package/dist/components/arcgis-floor-filter/customElement.d.ts +10 -0
- package/dist/components/arcgis-grid-controls/customElement.d.ts +10 -0
- package/dist/components/arcgis-grid-controls/customElement.js +1 -1
- package/dist/components/arcgis-histogram-range-slider/customElement.d.ts +10 -0
- package/dist/components/arcgis-home/customElement.d.ts +10 -0
- package/dist/components/arcgis-layer-list/customElement.d.ts +20 -0
- package/dist/components/arcgis-layer-list-next/customElement.d.ts +285 -123
- package/dist/components/arcgis-layer-list-next/customElement.js +2 -3
- package/dist/components/arcgis-layer-list-next/types.d.ts +44 -6
- package/dist/components/arcgis-legend/customElement.d.ts +10 -0
- package/dist/components/arcgis-line-of-sight/customElement.d.ts +10 -0
- package/dist/components/arcgis-link-chart/customElement.d.ts +19 -5
- package/dist/components/arcgis-link-chart/customElement.js +24 -18
- package/dist/components/arcgis-link-chart-layout-switcher/customElement.d.ts +10 -0
- package/dist/components/arcgis-link-chart-nonspatial-visibility-toggle/customElement.d.ts +10 -0
- package/dist/components/arcgis-locate/customElement.d.ts +10 -0
- package/dist/components/arcgis-map/customElement.d.ts +19 -5
- package/dist/components/arcgis-map/customElement.js +19 -13
- package/dist/components/arcgis-measurement/customElement.d.ts +10 -0
- package/dist/components/arcgis-multi-feature-form/customElement.d.ts +25 -1
- package/dist/components/arcgis-navigation-toggle/customElement.d.ts +10 -0
- package/dist/components/arcgis-oriented-imagery-viewer/customElement.d.ts +10 -0
- package/dist/components/arcgis-oriented-imagery-viewer-non-panoramic-viewer/customElement.js +0 -2
- package/dist/components/arcgis-oriented-imagery-viewer-panoramic-viewer/customElement.js +15 -16
- package/dist/components/arcgis-oriented-imagery-viewer-panoramic-viewer-zoom/customElement.d.ts +10 -0
- package/dist/components/arcgis-paste/customElement.d.ts +10 -0
- package/dist/components/arcgis-paste/customElement.js +0 -1
- package/dist/components/arcgis-popup/customElement.d.ts +27 -7
- package/dist/components/arcgis-popup/customElement.js +11 -14
- package/dist/components/arcgis-presentation/PresentationViewModel.d.ts +6 -0
- package/dist/components/arcgis-presentation/customElement.d.ts +18 -6
- package/dist/components/arcgis-presentation/customElement.js +197 -157
- package/dist/components/arcgis-presentation/index.js +2 -0
- package/dist/components/arcgis-presentation-captions/customElement.js +4 -4
- package/dist/components/arcgis-presentation-slide-list/customElement.js +49 -0
- package/dist/components/arcgis-presentation-slide-list/index.js +3 -0
- package/dist/components/arcgis-print/customElement.d.ts +10 -0
- package/dist/components/arcgis-scale-bar/customElement.d.ts +10 -0
- package/dist/components/arcgis-scale-range-slider/customElement.d.ts +10 -0
- package/dist/components/arcgis-scene/customElement.d.ts +19 -5
- package/dist/components/arcgis-scene/customElement.js +21 -15
- package/dist/components/arcgis-search/customElement.d.ts +10 -0
- package/dist/components/arcgis-search-result-renderer/customElement.d.ts +10 -0
- package/dist/components/arcgis-selection-toolbar/customElement.d.ts +10 -0
- package/dist/components/arcgis-shadow-cast/customElement.d.ts +10 -0
- package/dist/components/arcgis-sketch/customElement.d.ts +10 -0
- package/dist/components/arcgis-slice/customElement.d.ts +10 -0
- package/dist/components/arcgis-slider-binary-color-size-legacy/customElement.d.ts +10 -0
- package/dist/components/arcgis-slider-classed-color-legacy/customElement.d.ts +10 -0
- package/dist/components/arcgis-slider-classed-size-legacy/customElement.d.ts +10 -0
- package/dist/components/arcgis-slider-color-legacy/customElement.d.ts +10 -0
- package/dist/components/arcgis-slider-color-size-legacy/customElement.d.ts +10 -0
- package/dist/components/arcgis-slider-heatmap-legacy/customElement.d.ts +10 -0
- package/dist/components/arcgis-slider-opacity-legacy/customElement.d.ts +10 -0
- package/dist/components/arcgis-slider-scale-range/customElement.d.ts +10 -0
- package/dist/components/arcgis-slider-size-legacy/customElement.d.ts +10 -0
- package/dist/components/arcgis-snapping-controls/customElement.d.ts +10 -0
- package/dist/components/arcgis-swipe/customElement.d.ts +10 -0
- package/dist/components/arcgis-table-list/customElement.d.ts +102 -15
- package/dist/components/arcgis-table-list-next/customElement.d.ts +310 -44
- package/dist/components/arcgis-table-list-next/customElement.js +2 -3
- package/dist/components/arcgis-table-list-next/types.d.ts +37 -0
- package/dist/components/arcgis-template-image/customElement.js +0 -1
- package/dist/components/arcgis-time-bar/customElement.d.ts +10 -0
- package/dist/components/arcgis-time-bar/customElement.js +1 -1
- package/dist/components/arcgis-time-bar-slider/customElement.d.ts +10 -0
- package/dist/components/arcgis-time-slider/customElement.d.ts +10 -0
- package/dist/components/arcgis-track/customElement.d.ts +10 -0
- package/dist/components/arcgis-utility-network-aggregated-geometry/customElement.d.ts +10 -0
- package/dist/components/arcgis-utility-network-aggregated-geometry-result-item/customElement.d.ts +10 -0
- package/dist/components/arcgis-utility-network-associations/customElement.d.ts +10 -0
- package/dist/components/arcgis-utility-network-picker/customElement.d.ts +56 -0
- package/dist/components/arcgis-utility-network-picker/customElement.js +91 -0
- package/dist/components/arcgis-utility-network-picker/index.d.ts +1 -0
- package/dist/components/arcgis-utility-network-picker/index.js +7 -0
- package/dist/components/arcgis-utility-network-trace/customElement.d.ts +10 -0
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +10 -0
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +0 -1
- package/dist/components/arcgis-utility-network-trace-analysis-next/customElement.d.ts +10 -0
- package/dist/components/arcgis-utility-network-trace-analysis-next/customElement.js +0 -1
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.d.ts +10 -0
- package/dist/components/arcgis-utility-network-trace-inputs-next/customElement.d.ts +10 -0
- package/dist/components/arcgis-utility-network-trace-inputs-next/customElement.js +123 -140
- package/dist/components/arcgis-utility-network-trace-inputs-next/index.js +2 -1
- package/dist/components/arcgis-utility-network-trace-location/customElement.d.ts +10 -0
- package/dist/components/arcgis-utility-network-trace-location-next/customElement.d.ts +10 -0
- package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +10 -0
- package/dist/components/arcgis-utility-network-trace-results/customElement.js +0 -2
- package/dist/components/arcgis-utility-network-trace-results-next/customElement.d.ts +10 -0
- package/dist/components/arcgis-utility-network-trace-results-next/customElement.js +0 -2
- package/dist/components/arcgis-utility-network-validate-network-topology/customElement.js +0 -2
- package/dist/components/arcgis-utility-network-validate-topology/customElement.d.ts +10 -0
- package/dist/components/arcgis-value-picker-legacy/customElement.d.ts +10 -0
- package/dist/components/arcgis-version-management/customElement.d.ts +10 -0
- package/dist/components/arcgis-version-management-service-item/customElement.js +3 -4
- package/dist/components/arcgis-video/customElement.d.ts +15 -3
- package/dist/components/arcgis-video-player/customElement.d.ts +10 -0
- package/dist/components/arcgis-video-player-actions-group/customElement.js +6 -6
- package/dist/components/arcgis-video-player-controls-group/customElement.js +1 -1
- package/dist/components/arcgis-volume-measurement/customElement.d.ts +22 -1
- package/dist/components/arcgis-weather/customElement.d.ts +10 -0
- package/dist/components/arcgis-zoom/customElement.d.ts +10 -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 +10 -0
- package/dist/loader.js +5 -3
- package/dist/types/lumina.d.ts +10 -3
- package/dist/types/preact.d.ts +11 -3
- package/dist/types/react.d.ts +12 -3
- package/dist/types/stencil.d.ts +10 -3
- package/package.json +7 -7
- package/dist/cdn/3UUQJCZL.js +0 -2
- package/dist/cdn/42TPQKQZ.js +0 -2
- package/dist/cdn/4T6ECCFH.js +0 -2
- package/dist/cdn/4UBDCXSK.js +0 -2
- package/dist/cdn/6MEC4BFN.js +0 -2
- package/dist/cdn/AJ7XRBWN.js +0 -2
- package/dist/cdn/ARVN7QLQ.js +0 -2
- package/dist/cdn/BVDQQOCR.js +0 -2
- package/dist/cdn/DKBC3UMW.js +0 -2
- package/dist/cdn/DSIL7TYR.js +0 -2
- package/dist/cdn/FZHWZNBO.js +0 -2
- package/dist/cdn/G2PAKIMS.js +0 -2
- package/dist/cdn/JOOHHKWH.js +0 -2
- package/dist/cdn/KS5TQB2A.js +0 -2
- package/dist/cdn/NAQYIBE5.js +0 -2
- package/dist/cdn/NBYN44GP.js +0 -2
- package/dist/cdn/NGB5WVIG.js +0 -2
- package/dist/cdn/PBNP6WFU.js +0 -2
- package/dist/cdn/RDARV7HC.js +0 -2
- package/dist/cdn/RXAUCQQC.js +0 -2
- package/dist/cdn/S22ZRUS7.js +0 -2
- package/dist/cdn/SVOAX4K6.js +0 -2
- package/dist/cdn/TI4BX367.js +0 -2
- package/dist/cdn/TUTTPXC5.js +0 -2
- package/dist/cdn/W5WXJT7N.js +0 -2
- package/dist/cdn/YTC3XBSZ.js +0 -2
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import n from"./C4LCKYWW.js";import{a as S}from"./LTOXLO3L.js";import l from"./7HL2TQ7E.js";import i from"./MZWO5JYA.js";import h from"./FHWOIM57.js";import{a as E}from"./VJVKFKSG.js";import{b as Z,c as j}from"./32XG4IQO.js";import g from"./3T7L7UT5.js";import{a as V}from"./2BVXNQ3U.js";import e from"./2FM2FJAY.js";import d from"./YHNRTH56.js";import{e as P,g as z}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import a from"./SDWFNKIL.js";import"./QUZTFUWM.js";import{a as k,d as A}from"./4W3T75SY.js";import{L as f,M as m,N as B,O as M,Q as c,R as N,T as H,a as R,b as o,n as T,w as b}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([X,G,J,{initializeProjection:Q},{renderingSanitizer:C},{stripHTML:L},{substitute:h,formatNumber:I},{when:Y,watch:u},,,,U,,,{d:D},{c:K,d:q}])=>{var ee=R`: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)}.content-feature{--calcite-flow-item-footer-padding: 0;--calcite-flow-header-top-space: 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 te(F){return F?.declaredClass.startsWith("esri.layers.")??!1}function ie(F){if(!(!F||!("featureReduction"in F)))return F.featureReduction?.type}var ae=U(J),O=class extends B{constructor(){super(...arguments),this._zoomToFeature=new X({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._setFocusAnimationFrameId=null,this._setFocusAnimationFrameResolve=null,this._rootFlowItemNode=f(),this._featureMenuViewportNode=f(),this._actionBarMenuNode=f(),this._flowContainerNode=f(),this._aggregatedFeaturesComponent=f(),this.messages=V(),this._selectedFeatureComponent=f(),this._direction=P(),this._cancelOpenRelatedFeature=()=>{this._openRelatedFeatureAbortController=E(this._openRelatedFeatureAbortController)},this._openRelatedFeatureAbortController=null,this.flowItems=new G,this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._aggregatedFeaturesLoading=!1,this._hasActionsStartSlotContent=!1,this._hasActionsEndSlotContent=!1,this.viewModel=ae(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 G,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=z()("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,_selectedFeatureHeading:16,_selectedFeatureHeadingText:16,_selectedFeatureContent: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=ee}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._selectedFeatureHeading)&&!!(this.content||this._selectedFeatureContent))}get _selectedFeatureHeading(){return this.viewModel.selectedFeatureItem?.heading}get _selectedFeatureHeadingText(){return this._selectedFeatureHeading??this.messages.untitled}get _selectedFeatureContent(){return 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._cancelSetFocusAnimationFrame(),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;this._fetchFeaturesController=i,!e&&this.view&&this.location&&(await Q(this.location.spatialReference,this.view.spatialReference,null,{signal:n}),e=this.view.toScreen(this.location)??void 0),e&&await this.viewModel.fetchFeatures(e,{...t,signal:n})}next(){this.viewModel.next()}previous(){this.viewModel.previous()}async setFocus(){this._cancelSetFocusAnimationFrame(),await new Promise(e=>{this._setFocusAnimationFrameResolve=e,this._setFocusAnimationFrameId=requestAnimationFrame(()=>{this._setFocusAnimationFrameId=null;try{if(!this.isConnected||!this.viewModel?.active)return;this._flowContainerNode.value?.setFocus()}finally{this._resolveSetFocusAnimationFrame()}})})}connectedCallback(){super.connectedCallback(),this._createSpinner()}disconnectedCallback(){super.disconnectedCallback(),this._cancelSetFocusAnimationFrame(),this._removeSpinner(this.referenceElement)}loaded(){this.manager.onLifecycle(()=>[Y(()=>[this.initialDisplayMode==="list"&&!!this.viewModel?.selectedFeature,this.viewModel?.active],()=>{this.setFocus()}),u(()=>[this.flowItems?.length,this.featureMenuOpen],()=>{this.setFocus()}),u(()=>this.viewModel?.selectedFeatureIndex,(e,t)=>this._selectedFeatureIndexUpdated(e,t)),u(()=>this.viewModel?.view?.scale,()=>this._viewScaleChange()),u(()=>this.viewModel?.view,(e,t)=>t&&this._viewChange()),u(()=>this._spinnerEl?.screenLocation,()=>this._closeOpenActionMenu()),u(()=>this.selectedFeatureComponent?.viewModel,()=>this._removeFlowItems()),u(()=>this.viewModel?.featureItems,()=>this._featureMenuViewportScrollTop()),u(()=>this.flowItems.length,()=>this._syncSelectedDrillInFeature()),u(()=>this.viewModel.aggregatedFeaturesEnabled,e=>{e||(this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._aggregatedFeaturesLoading=!1,this._removeFlowItems())}),u(()=>this.referenceElement,(e,t)=>{this._removeSpinner(t),this._createSpinner()},{initial:!0}),u(()=>[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)}_resolveSetFocusAnimationFrame(){let e=this._setFocusAnimationFrameResolve;this._setFocusAnimationFrameResolve=null,e?.()}_cancelSetFocusAnimationFrame(){this._setFocusAnimationFrameId!=null&&(cancelAnimationFrame(this._setFocusAnimationFrameId),this._setFocusAnimationFrameId=null),this._resolveSetFocusAnimationFrame()}_cancelFetchingFeatures(){this._fetchFeaturesController=E(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=D(i),n=te(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,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._openFeatureMenu()}_handleFeatureMenuBack(){this.initialDisplayMode==="list"?this.selectedFeatureIndex=-1: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()}_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"?h(n,{messages:t}):i==="remove-selected-feature"?h(n,{messages:t}):i==="zoom-to-aggregated-features"?h(n,{messages:t}):i==="browse-aggregated-features"?h(n,{messages:t}):e.title;return r&&s?h(r,s):r??""}_onMainKeydown(e){let{key:t}=e;e.defaultPrevented||(j(t,this._direction)&&(e.stopPropagation(),this._handleFeatureMenuBack(),this.previous()),Z(t,this._direction)&&(e.stopPropagation(),this._handleFeatureMenuBack(),this.next()))}_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),q(e,this.viewModel),this.arcgisTriggerAction.emit({action:e}))}_viewScaleChange(){let{selectedFeature:e}=this;!e?.isAggregate||ie(D(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=k(e)}_handleActionsEndSlotChange(e){this._hasActionsEndSlotContent=k(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=N(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}>${this._renderContentContainer()}</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 slot=header-top 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">${h(a.pageText??"",{index:I(t+1),total:I(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.showAllFeatures??""} .loading=${s>0} @click=${this._handlePaginationMenuButton} .text=${h(e.pageText??"",{index:I(i+1),total:I(a)})} text-enabled title=${e.showAllFeatures??""??c}></calcite-action>`}_renderPagination(e,t){let{previous:a,next:i}=this.messages;return o`<calcite-action-bar class="pagination-action-bar" expand-toggle-disabled layout=horizontal overflow-mode=none 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??""??c}></calcite-action><calcite-action icon=chevron-right icon-flip-rtl .label=${i??""} @click=${t} .text=${i??""} title=${i??""??c}></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=${(C.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(d=>{let g=i.get(d);return g==null?null:this._renderFeatureMenuItem(d,g)}),l=n?n.title??this.messages.untitled:null;return!this.hideFeatureListLayerTitle&&l!==null?S(n??"map-graphics",o`<calcite-list-item-group .heading=${l}>${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??c}></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:l,hideHeading:d}=this,{active:g,selectedFeatureItem:v,content:_}=this.viewModel,p=this._getHeading();if(r==="list"&&!l)return null;let w=v?!v.content:!_;return o`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} class=${M(A({"content-feature":!0,"flow-item-collapsed":i}))} .closable=${!a} .closed=${!g} .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=${!d&&p?L(p):void 0} ${m(this._rootFlowItemNode)}>${this._renderHeader()}${!d&&p?o`<div slot=heading><div .innerHTML=${C.sanitize(p??"")??""}></div></div>`:null}${this._renderHeaderActions()}${this._renderActionBar()}<div class=${M(A("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:l,_isCollapsed:d,featureNavigationTop:g,headingLevel:v}=this,{active:_,featureItems:p,pendingPromisesCount:w}=e,x=a??i.selectFeature,$=h(i.backLabel??"",{title:this._selectedFeatureHeadingText});if(s==="feature"&&!n)return null;let y=!r;return o`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} class=${M(A({"flow-item-collapsed":d}))} .closable=${!t} .closed=${!_} .collapsed=${s==="list"&&d} .collapseDirection=${this.collapseDirection??(g?"down":"up")} .collapsible=${s==="list"&&l} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand,back:$}} .description=${this.hideFeatureMenuHeading?void 0:h(i.total??"",{total:p.length})} .heading=${this.hideFeatureMenuHeading?void 0:x} .headingLevel=${v} .loading=${e.waitingForContents} .selected=${y} @calciteFlowItemBack=${W=>{W.preventDefault(),this._handleFeatureMenuBack()}} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${m(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()}</div><div class="feature-menu-observer" ${m(this._featureMenuIntersectionObserverCreated)}></div>${s==="feature"?o`<calcite-button scale=s appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full .label=${$} title=${$??c}>${i.back}</calcite-button>`:null}</calcite-flow-item>`}_renderFlowItem(e,t){let{messages:a,hideCloseButton:i,hideSelectFeature:s,active:n,hideHeading:r}=this,l="graphic"in e&&"isFeatureFromTable"in e&&!e.isFeatureFromTable,d=l&&!s,g=e.flowType==="feature-association",v=a.returnToInitialFeature??"",_=a?.selectFeature,p=this._getActionTitle(this._zoomToFeature),w=h(a.zoomLabel??"",{messages:a,title:this._selectedFeatureHeadingText}),x=!this.hideActionBar&&g&&l,$=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} .focusTrapEnabled=${this.focusTrapEnabled} class="flow-item-drill-in" .description=${L(this._getDrillInFlowItemDescription(e)??"")} .heading=${r?void 0:L(e.heading??"")} .selected=${t} @calciteFlowItemBack=${y=>{y.preventDefault(),this._handleDrillInBackClick()}} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}>${r?null:o`<div slot=heading><div .innerHTML=${C.sanitize(e.heading??"")??""}></div></div>`}<div slot=description><div .innerHTML=${C.sanitize(this._getDrillInFlowItemDescription(e)??"")??""}></div></div><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${v??""} title=${v??""??c}></calcite-action>${d?o`<calcite-action icon=zoom-to-object @click=${()=>this._openRelatedFeature(e)} slot=header-actions-end .text=${_??""} title=${_??c}></calcite-action>`:null}${x?o`<calcite-action-bar expand-toggle-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=${p} title=${w??c} .label=${w} @click=${()=>K(this.viewModel,this._zoomToFeature,e)}></calcite-action></calcite-action-group></calcite-action-bar>`:null}<div class="container">${e}</div>${$}</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((d,g)=>this._renderFlowItem(d,this._featureFlowItemSelected&&g===e.length-1)),r=this._renderBrowseAggregateContainer(!!i),l=this.initialDisplayMode==="list"?[this._renderFeatureMenuContainer(),this._renderContentFeature(s)]:[this._renderContentFeature(s),this._renderFeatureMenuContainer()];return o`<calcite-flow ${m(this._flowContainerNode)}>${l}${r}${n}</calcite-flow>`}_renderBrowseAggregateContainer(e){let{hideCloseButton:t,active:a,messages:i}=this,{selectedFeature:s}=this.viewModel,n=this.viewModel.aggregatedFeaturesEnabled&&s?.isAggregate,r=h(i.backLabel??"",{title:this._selectedFeatureHeadingText});return n?o`<calcite-flow-item .selected=${e} .closable=${!t} .closed=${!a} .focusTrapEnabled=${this.focusTrapEnabled} .description=${this._aggregatedFeatureCount?h(i.total??"",{total:this._aggregatedFeatureCount}):""} .heading=${i.aggregatedFeatures} @calciteFlowItemBack=${l=>{l.preventDefault(),this.viewModel.aggregatedFeaturesEnabled=!1}} .messageOverrides=${{back:r}} .loading=${this._aggregatedFeaturesLoading} @calciteFlowItemClose=${this._handleClose}><arcgis-aggregated-features .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .feature=${s??void 0} .flowItems=${this.flowItems} .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??void 0} .messageOverrides=${this.messageOverrides} .messages=${i} @arcgisPropertyChange=${this._handleAggregatedFeaturesPropertyChange} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .view=${this.view??void 0} ${m(this._aggregatedFeaturesComponent)}></arcgis-aggregated-features><calcite-button appearance=transparent @click=${()=>this.viewModel.aggregatedFeaturesEnabled=!1} slot=footer-start scale=s width=full .label=${r} title=${r??c}>${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(n=>n.id!==this._zoomToFeature.id):t,i=!!a.length||this._hasActionsStartSlotContent||this._hasActionsEndSlotContent,s=this._isCollapsed||this.hideActionBar||!i;return o`<calcite-action-bar expand-toggle-disabled .expanded=${!this._hideActionText} scale=s slot=${(s?void 0:"action-bar")??c} .hidden=${s}><slot name=actions-start @slotchange=${this._handleActionsStartSlotChange}></slot><calcite-action-group overlay-positioning=fixed scale=s ${m(this._actionBarMenuNode)}>${this._renderActions(a)}</calcite-action-group><slot name=actions-end @slotchange=${this._handleActionsEndSlotChange}></slot></calcite-action-bar>`}_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??c} .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} ${m(this._selectedFeatureComponent)}></arcgis-feature-next>`:typeof e=="string"?S(e,o`<div .innerHTML=${C.sanitize(e)??""}></div>`):e??null}};H("arcgis-features-next",O);return O},"support/actions/ActionButton","core/Collection","popup/FeatureContentCollection","applications/Components/featureUtils","applications/Components/sanitizerUtils","applications/Components/stringUtils","intl","core/reactiveUtils",a,d,e,g,h,i,l,n)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import j from"./XWALVOZP.js";import i from"./C4LCKYWW.js";import{a as G}from"./JCRPP54Z.js";import{a as A,b as x,c as B,g as R}from"./LDDAJOTV.js";import{a as U}from"./RHXVVGD3.js";import{a as w}from"./LTOXLO3L.js";import g from"./7HL2TQ7E.js";import f from"./MZWO5JYA.js";import e from"./FHWOIM57.js";import"./VJVKFKSG.js";import d from"./3T7L7UT5.js";import{a as T}from"./2BVXNQ3U.js";import{a as m}from"./JD74LG7K.js";import c from"./2FM2FJAY.js";import b from"./YHNRTH56.js";import{g as D}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import a from"./SDWFNKIL.js";import"./QUZTFUWM.js";import{d as F}from"./4W3T75SY.js";import{A as y,L as C,M as $,N as M,O as p,Q as E,T as L,b as o,w as h}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([j,{watch:b,on:q},V,,,{a:P},N,,,,,{b:O,c:S,d:k}])=>{var _=G,H="nested",J=N(V),v=class extends M{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,u={selected:l,from:c,to:n},f=t?.group,r=i?.group;return f&&r&&typeof a=="function"?a(u):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.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.hideStatusIndicators=!1,this.icon="table",this.listItemCreatedFunction=this.viewModel.listItemCreatedFunction,this.listModeDisabled=this.viewModel.listModeDisabled,this.map=this.viewModel.map,this.minDragEnabledItems=B,this.minFilterItems=x,this.selectedItems=new j,this.selectionMode="none",this.showCloseButton=!1,this.showCollapseButton=!1,this.showErrors=!1,this.showFilter=!1,this.showHeading=!1,this.showTemporaryTableIndicators=!1,this.tables=this.viewModel.tables,this.arcgisClose=h(),this.arcgisFilterChange=h(),this.arcgisPropertyChange=D()("state"),this.arcgisReady=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,autoDestroyDisabled:5,closed:5,collapsed:7,dragEnabled:5,filterPlaceholder:1,filterPredicate:0,filterText:1,headingLevel:9,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,hideStatusIndicators:5,icon:1,label:1,listItemCanGiveFunction:0,listItemCanReceiveFunction:0,listItemCreatedFunction:0,listModeDisabled:5,map:0,messageOverrides:0,minDragEnabledItems:9,minFilterItems:9,referenceElement:1,selectedItems:0,selectionMode:1,showCloseButton:5,showCollapseButton:5,showErrors:5,showFilter:5,showHeading:5,showTemporaryTableIndicators:5,state:32,tableItems:32,tables:0,view:0}}static{this.styles=[k,S]}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(()=>[b(()=>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()),b(()=>[this.viewModel.state,this.viewModel.totalItems],()=>this.requestUpdate(),{initial:!0}),b(()=>[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=${p(F(m.widget,m.panel,t))}>${this._renderItems()}</div>`}_renderNoItemsMessage(){return o`<div slot=message>${this.messages.noItemsToDisplay}</div>`}_renderNoItems(){return this.hideNoItemsNotice?null:o`<div class=${p(_.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this._renderNoItemsMessage()}</calcite-notice></div>`}_renderPanelFlowItems(){return U(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:u}=this,f=[o`<calcite-flow-item .closable=${a} .closed=${this.closed} .collapsed=${e} .collapsible=${l} .heading=${c?this.label??u.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??E} .displayMode=${H} .dragEnabled=${d} .filterEnabled=${i} .filterPlaceholder=${I} .filterProps=${A} .filterText=${i?g:""} .group=${s} .label=${this.label??u.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&&!this.hideNoFilterResultsNotice?o`<div class=${p(_.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,O({canMove:this._canMove,css:_,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","layers/list/TableItemCollection",a,b,c,d,e,f,g,i,j)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import g from"./7HL2TQ7E.js";import f from"./MZWO5JYA.js";import e from"./3T7L7UT5.js";import{a as D}from"./2BVXNQ3U.js";import d from"./2FM2FJAY.js";import c from"./YHNRTH56.js";import{g as _}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import a from"./SDWFNKIL.js";import"./QUZTFUWM.js";import{d as C}from"./4W3T75SY.js";import{M as y,N as I,O as M,Q as b,T as x,a as $,b as r,w}from"./WXLC6FPD.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)
|
|
2
|
+
import g from"./7HL2TQ7E.js";import f from"./MZWO5JYA.js";import e from"./3T7L7UT5.js";import{a as D}from"./2BVXNQ3U.js";import d from"./2FM2FJAY.js";import c from"./YHNRTH56.js";import{g as _}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import a from"./SDWFNKIL.js";import"./QUZTFUWM.js";import{d as C}from"./4W3T75SY.js";import{M as y,N as I,O as M,Q as b,T as x,a as $,b as r,w}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([{substitute:k},{renderingSanitizer:N},B,{watch:H},{stripHTML:Z},P,,,,R,,{a:F,b:E,c:L,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 L(this.graphic,this.defaultPopupTemplateEnabled)??void 0}get sourceLayer(){return T(this.graphic)}get fieldInfoMap(){return F(E(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 .focusTrapEnabled=${this.focusTrapEnabled} .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 .focusTrapEnabled=${this.focusTrapEnabled} @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)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import j from"./XWALVOZP.js";import i from"./C4LCKYWW.js";import{a as J}from"./JCRPP54Z.js";import{a as S,b as H,g as G,h as U,m as F}from"./LDDAJOTV.js";import{a as B}from"./RHXVVGD3.js";import{a as w}from"./LTOXLO3L.js";import h from"./7HL2TQ7E.js";import g from"./MZWO5JYA.js";import f from"./FHWOIM57.js";import"./VJVKFKSG.js";import e from"./3T7L7UT5.js";import{a as R}from"./2BVXNQ3U.js";import{a as p}from"./JD74LG7K.js";import d from"./2FM2FJAY.js";import b from"./YHNRTH56.js";import{g as D}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import a from"./SDWFNKIL.js";import"./QUZTFUWM.js";import{d as x}from"./4W3T75SY.js";import{A as T,L as O,M as m,N as P,O as y,Q as $,R as L,T as A,b as r,w as c}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([{createReactiveMap:K},I,{on:C,watch:W},X,Y,{h:f},,{a:N},k,,,,,{b:j,c:q,d:z}])=>{var g=J,Z=u=>{let e=u?.type;return e==="knowledge-graph"||e==="map-image"||e==="tile"},ee=u=>u?.type==="catalog",Q="nested",te=I.ofType(Y),se=k(X),_=class extends P{constructor(){super(...arguments),this.#l=`operational-${T()}`,this.#e=null,this.#o=O(),this.#i=!1,this.#t=!1,this.messages=R(),this.#r=()=>{this._activeItem=null},this.#n=e=>{if(this.visibilityAppearance!=="default")return;let t=Array.from(e.composedPath()).find(s=>s.classList?.contains(g.item));this._activeItem=F(t)},this.#a=K(),this.#s=K(),this.#h=e=>{e&&this.#v(e)},this.#c=e=>{e&&this.#b(e)},this.#d=e=>{e&&this.#$(e)},this.viewModel=se(this),this._activeItem=null,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this.layerTablesEnabled=new I(["knowledge-graph"]),this.mapImageOptions=null,this.tileOptions=null,this.view=this.viewModel.view,this.hideCatalogLayerList=!1,this.showCloseButton=!1,this.showCollapseButton=!1,this.showErrors=!1,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.showFilter=!1,this.showHeading=!1,this.hideStatusIndicators=!1,this.showTemporaryLayerIndicators=!1,this.closed=!1,this.topLayerDisabled=!1,this.autoDestroyDisabled=!1,this.state=this.viewModel.state,this.openedLayers=new I,this.openedLayerLists=new I,this.collapsed=!1,this.filterPlaceholder="",this.filterText="",this.headingLevel=2,this.listItemCreatedFunction=this.viewModel.listItemCreatedFunction,this.listModeDisabled=this.viewModel.listModeDisabled,this.minFilterItems=H,this.selectedItems=new te,this.selectionMode="none",this.visibilityAppearance="default",this.arcgisPropertyChange=D()("state"),this.arcgisReady=c(),this.arcgisCatalogItemsChange=c(),this.arcgisFilterChange=c(),this.arcgisSelectedItemsChange=c(),this.arcgisOpenedLayersChange=c(),this.arcgisTriggerAction=N(()=>this.viewModel,"trigger-action")}static{this.properties={_catalogLayerList:16,_activeItem:16,_focusRootFlowItem:16,_focusPanelFlowItem:16,_focusLayerFlowItem:16,_totalItems:16,_filterEnabled:16,_visibleItems:16,_openedPanelItems:16,_renderedOpenLayerFlowItems:16,layerTablesEnabled:16,mapImageOptions:16,tileOptions:16,view:0,hideCatalogLayerList:5,showCloseButton:5,showCollapseButton:5,showErrors:5,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,showFilter:5,showHeading:5,hideStatusIndicators:5,showTemporaryLayerIndicators:5,closed:5,topLayerDisabled:5,autoDestroyDisabled:5,referenceElement:1,state:32,openedLayers:32,openedLayerLists:32,catalogItems:0,catalogLayer:0,catalogOptions:0,collapsed:5,filterPlaceholder:1,filterPredicate:0,filterText:1,headingLevel:9,knowledgeGraphOptions:0,label:1,listItemCreatedFunction:0,listModeDisabled:5,minFilterItems:9,selectedItems:0,selectionMode:1,visibilityAppearance:1,messageOverrides:0,onCatalogOpen:0,onTablesOpen:0}}static{this.styles=[z,q]}#l;#e;#o;#i;#t;#r;#n;#a;#s;#h;#c;#d;get _totalItems(){return this.catalogItems?.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length??0}get _filterEnabled(){return this._totalItems>=this.minFilterItems&&this.showFilter}get _visibleItems(){return this.catalogItems?.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleItems.flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _renderedOpenLayerFlowItems(){let{openedLayers:e}=this;return e.toArray().map((t,s)=>this.#D(t,s===e.length-1))}get catalogItems(){return this.viewModel.catalogItems}set catalogItems(e){this.viewModel.catalogItems=e}get catalogLayer(){return this.viewModel.catalogLayer}set catalogLayer(e){this.viewModel.catalogLayer=e}async destroy(){this.#i||this.#t||(this.#i=!0,this.#e?.abort(),this.#e=null,await this.manager.destroy(),this.openedLayerLists.removeAll(),this.openedLayers.removeAll(),this.#s.clear(),this.#a.clear(),this.#t=!0,this.#i=!1)}loaded(){this.manager.onLifecycle(()=>[C(()=>this.openedLayers,"change",()=>{this.#w()}),C(()=>this.viewModel.catalogItems,"change",()=>{G(this.selectedItems),this.arcgisCatalogItemsChange.emit()}),C(()=>this.selectedItems,"change",()=>this.arcgisSelectedItemsChange.emit()),W(()=>[this.filterPredicate,this.#o.value],()=>U(this.#o.value,this.filterPredicate))])}disconnectedCallback(){super.disconnectedCallback(),this.#e?.abort(),this.#e=null,!this.autoDestroyDisabled&&!this.#t&&!this.#i&&this.destroy()}#y(e,t){return this.viewModel.triggerAction(e,t)}async#f(e,t){let s=this.#s.get(e);if(s)return s;let a=e.type==="catalog"?await this.#L(e):await this.#C(e);return t.aborted||!this.isConnected||this.#t?(a?.destroy?.(),a):(t.aborted||this.#s.set(e,a),a)}async#w(){if(!this.isConnected||this.#t)return;let{openedLayers:e,openedLayerLists:t}=this;this.#e?.abort();let s=new AbortController,{signal:a}=s;this.#e=s,this.#s.forEach((n,h)=>{e.includes(h)||(n?.destroy?.(),this.#s.delete(h))});let o=await Promise.all(e.map(n=>this.#f(n,a)));if(a.aborted||!this.isConnected||this.#t)return;t.removeAll(),t.addMany(o);let i=t.at(-1),l=i&&"catalogLayer"in i?i:void 0;this._catalogLayerList!==l&&(this._catalogLayerList=l),this.arcgisOpenedLayersChange.emit()}#I(e){e.open=!1,this._focusRootFlowItem=!0}#b(e){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,f(e))}#v(e){this._focusPanelFlowItem&&(this._focusPanelFlowItem=!1,f(e))}#$(e){this._focusLayerFlowItem===e.dataset.layerUid&&(this._focusLayerFlowItem=null,f(e))}async#L(e){let{headingLevel:t,catalogOptions:s,view:a,referenceElement:o,filterPlaceholder:i,listItemCreatedFunction:l,minFilterItems:n,selectionMode:h,visibilityAppearance:d}=this;return L(r`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${s?.filterPlaceholder??i} .listItemCreatedFunction=${s?.listItemCreatedFunction??l} .minFilterItems=${s?.minFilterItems??n} .selectionMode=${s?.selectionMode??h} .visibilityAppearance=${s?.visibilityAppearance??d} .showErrors=${s?.showErrors??this.showErrors} .showFilter=${s?.showFilter??this.showFilter} .hideStatusIndicators=${s?.hideStatusIndicators??this.hideStatusIndicators} .showTemporaryLayerIndicators=${s?.showTemporaryLayerIndicators??this.showTemporaryLayerIndicators} .messageOverrides=${this.messageOverrides} @arcgisReady=${b=>b.stopPropagation()} .catalogLayer=${e} .view=${a} .referenceElement=${o} @catalogOpen=${this.#p} @tablesOpen=${this.#m}></arcgis-catalog-layer-list-next>`)}#F(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async#C(e){let{headingLevel:t,selectionMode:s,referenceElement:a,view:o}=this,i=this.#F(e);return L(r`<arcgis-table-list-next .headingLevel=${i?.headingLevel??t} .selectionMode=${i?.selectionMode??s} .collapsed=${i?.collapsed} .filterPlaceholder=${i?.filterPlaceholder} .filterText=${i?.filterText} .label=${i?.label} .tables=${i?.tables} .view=${o} .referenceElement=${a} @arcgisReady=${l=>l.stopPropagation()}></arcgis-table-list-next>`)}#m(e){if(this.onTablesOpen){this.onTablesOpen(e);return}let t=e.layer;Z(t)&&(this.openedLayers.push(t),this._focusLayerFlowItem=t.uid)}#p(e){if(this.onCatalogOpen){this.onCatalogOpen(e);return}let t=e.layer?.parent;ee(t)&&(this.openedLayers.push(t),this._focusLayerFlowItem=e.layer?.uid)}#_(e,t){t?this.#a.set(e,t):this.#a.delete(e)}#M(e,t){this.#y(e,t)}#E(e){let{selectionMode:t,selectedItems:s}=this;if(t==="none")return;let a=e.target.selectedItems.map(o=>F(o)).filter(Boolean);s.removeAll(),s.addMany(a)}render(){let{state:e}=this,t={[p.hidden]:e==="loading",[p.disabled]:e==="disabled"};return r`<div class=${y(x(p.widget,p.panel,t))}>${this._visibleItems?.length?this.#O():null}${this.#x()}</div>`}#T(e){let t=this.#a,s=this.messages;return e?.layer?r`<calcite-tooltip overlay-positioning=fixed .referenceElement=${t.get(e.layer.uid)} .topLayerDisabled=${this.topLayerDisabled}>${s.layerIncompatibleTooltip}</calcite-tooltip>`:null}#g(e){return e.incompatible?this.#T(e):e.children?.filter(t=>!t.hidden).toArray().map(t=>this.#g(t))}#O(){return this._visibleItems?.toArray().map(e=>this.#g(e))}#u(){return r`<div slot=message>${this.messages.noItemsToDisplay}</div>`}#P(){return this.hideNoItemsNotice?null:r`<div class=${y(g.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this.#u()}</calcite-notice></div>`}#A(){let{_openedPanelItems:e,openedLayers:t}=this;return B(e.toArray(),({uid:s})=>s,(s,a)=>{let{uid:o,title:i,panel:l}=s,n=()=>this.#I(l);return r`<calcite-flow-item .description=${i} .heading=${l.title} .headingLevel=${this.headingLevel} .selected=${!t.length&&a===e.length-1} @calciteFlowItemBack=${h=>{h.preventDefault(),n()}} ${m(this.#h)}><arcgis-layer-list-item-panel .item=${s} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent slot=footer-actions width=full @click=${n}>Back</calcite-button></calcite-flow-item>`})}#x(){let{collapsed:e,_visibleItems:t,_filterEnabled:s,showCloseButton:a,showCollapseButton:o,showHeading:i,selectionMode:l,filterText:n,filterPlaceholder:h,openedLayers:d,_openedPanelItems:b}=this,M=this.#l,E=this.label??this.messages.componentLabel??"",V=[r`<calcite-flow-item .closable=${a} .closed=${this.closed} .collapsed=${e} .collapsible=${o} .heading=${i?E:void 0} .headingLevel=${this.headingLevel} .selected=${!d.length&&!b.length} @calciteFlowItemClose=${()=>this.closed=!0} ${m(this.#c)}>${t?.length?r`<calcite-list data-layer-type=${M??$} .displayMode=${Q} .filterEnabled=${s} .filterPlaceholder=${h} .filterProps=${S} .filterText=${s?n:""} .group=${M} .label=${E} @focusin=${this.#n} @focusout=${this.#r} selection-appearance=border .selectionMode=${l} @calciteListChange=${this.#E} @calciteListFilter=${v=>{this.filterText=v.currentTarget?.filterText??"",this.arcgisFilterChange.emit()}} @mouseleave=${this.#r} @mouseover=${this.#n} ${m(this.#o)}>${t.toArray().map(v=>this.#R(v))}${s&&!this.hideNoFilterResultsNotice?r`<div class=${y(g.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this.#u()}</calcite-notice></div>`:null}</calcite-list>`:this.#P()}</calcite-flow-item>`,this.#A(),this._renderedOpenLayerFlowItems];return this.closed?null:w("root-flow",r`<calcite-flow>${V}</calcite-flow>`)}#D(e,t){let{openedLayers:s}=this,a=e.title||this.messages.untitledLayer;return w(e.uid,r`<calcite-flow-item data-layer-uid=${e.uid??$} .description=${a} .heading=${this.messages[e.type==="catalog"?"catalogLayers":"tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${o=>{o.preventDefault(),s.pop();let i=s.at(-1);i?this._focusLayerFlowItem=i.uid:this._focusRootFlowItem=!0}} ${m(this.#d)}>${this.#s.get(e)}</calcite-flow-item>`)}#R(e,t,s){let{hideStatusIndicators:a,showCloseButton:o,showCollapseButton:i,showErrors:l,showFilter:n,showHeading:h,showTemporaryLayerIndicators:d}=this;return w(e.uid,j({activeItem:this._activeItem??void 0,css:{...g,itemCatalogIcon:g.itemActionIcon},displayMode:Q,dragEnabled:!1,item:e,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,parent:t,parentTitles:s,rootGroupUid:this.#l,selectedItems:this.selectedItems,selectionMode:this.selectionMode,visibilityAppearance:this.visibilityAppearance,hideStatusIndicators:a,showCloseButton:o,showCollapseButton:i,showErrors:l,showFilter:n,showHeading:h,showTemporaryLayerIndicators:d,handleAction:this.#M.bind(this),handleCatalogOpen:this.#p.bind(this),handleTablesOpen:this.#m.bind(this),handleTooltipReferenceChange:this.#_.bind(this),view:this.view}))}};A("arcgis-catalog-layer-list-next",_);return _},"applications/Components/featureUtils","core/Collection","core/reactiveUtils","layers/list/CatalogItemCollection","layers/list/Item",a,b,d,e,f,g,h,i,j)
|
|
2
|
+
import j from"./XWALVOZP.js";import i from"./C4LCKYWW.js";import{a as J}from"./JCRPP54Z.js";import{a as S,b as H,g as G,h as U,m as F}from"./LDDAJOTV.js";import{a as B}from"./RHXVVGD3.js";import{a as w}from"./LTOXLO3L.js";import h from"./7HL2TQ7E.js";import g from"./MZWO5JYA.js";import f from"./FHWOIM57.js";import"./VJVKFKSG.js";import e from"./3T7L7UT5.js";import{a as R}from"./2BVXNQ3U.js";import{a as p}from"./JD74LG7K.js";import d from"./2FM2FJAY.js";import b from"./YHNRTH56.js";import{g as D}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import a from"./SDWFNKIL.js";import"./QUZTFUWM.js";import{d as x}from"./4W3T75SY.js";import{A as T,L as O,M as m,N as P,O as y,Q as $,R as L,T as A,b as r,w as c}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([{createReactiveMap:K},I,{on:C,watch:W},X,Y,{h:f},,{a:N},k,,,,,{b:j,c:q,d:z}])=>{var g=J,Z=u=>{let e=u?.type;return e==="knowledge-graph"||e==="map-image"||e==="tile"},ee=u=>u?.type==="catalog",Q="nested",te=I.ofType(Y),se=k(X),_=class extends P{constructor(){super(...arguments),this.#l=`operational-${T()}`,this.#e=null,this.#o=O(),this.#i=!1,this.#t=!1,this.messages=R(),this.#r=()=>{this._activeItem=null},this.#n=e=>{if(this.visibilityAppearance!=="default")return;let t=Array.from(e.composedPath()).find(s=>s.classList?.contains(g.item));this._activeItem=F(t)},this.#a=K(),this.#s=K(),this.#h=e=>{e&&this.#v(e)},this.#c=e=>{e&&this.#b(e)},this.#d=e=>{e&&this.#$(e)},this.viewModel=se(this),this._activeItem=null,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this.layerTablesEnabled=new I(["knowledge-graph"]),this.mapImageOptions=null,this.tileOptions=null,this.autoDestroyDisabled=!1,this.closed=!1,this.collapsed=!1,this.filterPlaceholder="",this.filterText="",this.headingLevel=2,this.hideCatalogLayerList=!1,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.hideStatusIndicators=!1,this.listItemCreatedFunction=this.viewModel.listItemCreatedFunction,this.listModeDisabled=this.viewModel.listModeDisabled,this.minFilterItems=H,this.openedLayerLists=new I,this.openedLayers=new I,this.selectedItems=new te,this.selectionMode="none",this.showCloseButton=!1,this.showCollapseButton=!1,this.showErrors=!1,this.showFilter=!1,this.showHeading=!1,this.showTemporaryLayerIndicators=!1,this.state=this.viewModel.state,this.topLayerDisabled=!1,this.view=this.viewModel.view,this.visibilityAppearance="default",this.arcgisCatalogItemsChange=c(),this.arcgisFilterChange=c(),this.arcgisOpenedLayersChange=c(),this.arcgisPropertyChange=D()("state"),this.arcgisReady=c(),this.arcgisSelectedItemsChange=c(),this.arcgisTriggerAction=N(()=>this.viewModel,"trigger-action")}static{this.properties={_catalogLayerList:16,_activeItem:16,_focusRootFlowItem:16,_focusPanelFlowItem:16,_focusLayerFlowItem:16,_totalItems:16,_filterEnabled:16,_visibleItems:16,_openedPanelItems:16,_renderedOpenLayerFlowItems:16,layerTablesEnabled:16,mapImageOptions:16,tileOptions:16,autoDestroyDisabled:5,catalogItems:0,catalogLayer:0,catalogOptions:0,closed:5,collapsed:5,filterPlaceholder:1,filterPredicate:0,filterText:1,headingLevel:9,hideCatalogLayerList:5,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,hideStatusIndicators:5,knowledgeGraphOptions:0,label:1,listItemCreatedFunction:0,listModeDisabled:5,messageOverrides:0,minFilterItems:9,onCatalogOpen:0,onTablesOpen:0,openedLayerLists:32,openedLayers:32,referenceElement:1,selectedItems:0,selectionMode:1,showCloseButton:5,showCollapseButton:5,showErrors:5,showFilter:5,showHeading:5,showTemporaryLayerIndicators:5,state:32,topLayerDisabled:5,view:0,visibilityAppearance:1}}static{this.styles=[z,q]}#l;#e;#o;#i;#t;#r;#n;#a;#s;#h;#c;#d;get _totalItems(){return this.catalogItems?.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length??0}get _filterEnabled(){return this._totalItems>=this.minFilterItems&&this.showFilter}get _visibleItems(){return this.catalogItems?.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleItems.flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _renderedOpenLayerFlowItems(){let{openedLayers:e}=this;return e.toArray().map((t,s)=>this.#D(t,s===e.length-1))}get catalogItems(){return this.viewModel.catalogItems}set catalogItems(e){this.viewModel.catalogItems=e}get catalogLayer(){return this.viewModel.catalogLayer}set catalogLayer(e){this.viewModel.catalogLayer=e}async destroy(){this.#i||this.#t||(this.#i=!0,this.#e?.abort(),this.#e=null,await this.manager.destroy(),this.openedLayerLists.removeAll(),this.openedLayers.removeAll(),this.#s.clear(),this.#a.clear(),this.#t=!0,this.#i=!1)}loaded(){this.manager.onLifecycle(()=>[C(()=>this.openedLayers,"change",()=>{this.#w()}),C(()=>this.viewModel.catalogItems,"change",()=>{G(this.selectedItems),this.arcgisCatalogItemsChange.emit()}),C(()=>this.selectedItems,"change",()=>this.arcgisSelectedItemsChange.emit()),W(()=>[this.filterPredicate,this.#o.value],()=>U(this.#o.value,this.filterPredicate))])}disconnectedCallback(){super.disconnectedCallback(),this.#e?.abort(),this.#e=null,!this.autoDestroyDisabled&&!this.#t&&!this.#i&&this.destroy()}#y(e,t){return this.viewModel.triggerAction(e,t)}async#f(e,t){let s=this.#s.get(e);if(s)return s;let a=e.type==="catalog"?await this.#L(e):await this.#C(e);return t.aborted||!this.isConnected||this.#t?(a?.destroy?.(),a):(t.aborted||this.#s.set(e,a),a)}async#w(){if(!this.isConnected||this.#t)return;let{openedLayers:e,openedLayerLists:t}=this;this.#e?.abort();let s=new AbortController,{signal:a}=s;this.#e=s,this.#s.forEach((n,h)=>{e.includes(h)||(n?.destroy?.(),this.#s.delete(h))});let o=await Promise.all(e.map(n=>this.#f(n,a)));if(a.aborted||!this.isConnected||this.#t)return;t.removeAll(),t.addMany(o);let i=t.at(-1),l=i&&"catalogLayer"in i?i:void 0;this._catalogLayerList!==l&&(this._catalogLayerList=l),this.arcgisOpenedLayersChange.emit()}#I(e){e.open=!1,this._focusRootFlowItem=!0}#b(e){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,f(e))}#v(e){this._focusPanelFlowItem&&(this._focusPanelFlowItem=!1,f(e))}#$(e){this._focusLayerFlowItem===e.dataset.layerUid&&(this._focusLayerFlowItem=null,f(e))}async#L(e){let{headingLevel:t,catalogOptions:s,view:a,referenceElement:o,filterPlaceholder:i,listItemCreatedFunction:l,minFilterItems:n,selectionMode:h,visibilityAppearance:d}=this;return L(r`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${s?.filterPlaceholder??i} .listItemCreatedFunction=${s?.listItemCreatedFunction??l} .minFilterItems=${s?.minFilterItems??n} .selectionMode=${s?.selectionMode??h} .visibilityAppearance=${s?.visibilityAppearance??d} .showErrors=${s?.showErrors??this.showErrors} .showFilter=${s?.showFilter??this.showFilter} .hideStatusIndicators=${s?.hideStatusIndicators??this.hideStatusIndicators} .showTemporaryLayerIndicators=${s?.showTemporaryLayerIndicators??this.showTemporaryLayerIndicators} .messageOverrides=${this.messageOverrides} @arcgisReady=${b=>b.stopPropagation()} .catalogLayer=${e} .view=${a} .referenceElement=${o} @catalogOpen=${this.#p} @tablesOpen=${this.#m}></arcgis-catalog-layer-list-next>`)}#F(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async#C(e){let{headingLevel:t,selectionMode:s,referenceElement:a,view:o}=this,i=this.#F(e);return L(r`<arcgis-table-list-next .headingLevel=${i?.headingLevel??t} .selectionMode=${i?.selectionMode??s} .collapsed=${i?.collapsed} .filterPlaceholder=${i?.filterPlaceholder} .filterText=${i?.filterText} .label=${i?.label} .tables=${i?.tables} .view=${o} .referenceElement=${a} @arcgisReady=${l=>l.stopPropagation()}></arcgis-table-list-next>`)}#m(e){if(this.onTablesOpen){this.onTablesOpen(e);return}let t=e.layer;Z(t)&&(this.openedLayers.push(t),this._focusLayerFlowItem=t.uid)}#p(e){if(this.onCatalogOpen){this.onCatalogOpen(e);return}let t=e.layer?.parent;ee(t)&&(this.openedLayers.push(t),this._focusLayerFlowItem=e.layer?.uid)}#_(e,t){t?this.#a.set(e,t):this.#a.delete(e)}#M(e,t){this.#y(e,t)}#E(e){let{selectionMode:t,selectedItems:s}=this;if(t==="none")return;let a=e.target.selectedItems.map(o=>F(o)).filter(Boolean);s.removeAll(),s.addMany(a)}render(){let{state:e}=this,t={[p.hidden]:e==="loading",[p.disabled]:e==="disabled"};return r`<div class=${y(x(p.widget,p.panel,t))}>${this._visibleItems?.length?this.#O():null}${this.#x()}</div>`}#T(e){let t=this.#a,s=this.messages;return e?.layer?r`<calcite-tooltip overlay-positioning=fixed .referenceElement=${t.get(e.layer.uid)} .topLayerDisabled=${this.topLayerDisabled}>${s.layerIncompatibleTooltip}</calcite-tooltip>`:null}#g(e){return e.incompatible?this.#T(e):e.children?.filter(t=>!t.hidden).toArray().map(t=>this.#g(t))}#O(){return this._visibleItems?.toArray().map(e=>this.#g(e))}#u(){return r`<div slot=message>${this.messages.noItemsToDisplay}</div>`}#P(){return this.hideNoItemsNotice?null:r`<div class=${y(g.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this.#u()}</calcite-notice></div>`}#A(){let{_openedPanelItems:e,openedLayers:t}=this;return B(e.toArray(),({uid:s})=>s,(s,a)=>{let{uid:o,title:i,panel:l}=s,n=()=>this.#I(l);return r`<calcite-flow-item .description=${i} .heading=${l.title} .headingLevel=${this.headingLevel} .selected=${!t.length&&a===e.length-1} @calciteFlowItemBack=${h=>{h.preventDefault(),n()}} ${m(this.#h)}><arcgis-layer-list-item-panel .item=${s} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent slot=footer-actions width=full @click=${n}>Back</calcite-button></calcite-flow-item>`})}#x(){let{collapsed:e,_visibleItems:t,_filterEnabled:s,showCloseButton:a,showCollapseButton:o,showHeading:i,selectionMode:l,filterText:n,filterPlaceholder:h,openedLayers:d,_openedPanelItems:b}=this,M=this.#l,E=this.label??this.messages.componentLabel??"",V=[r`<calcite-flow-item .closable=${a} .closed=${this.closed} .collapsed=${e} .collapsible=${o} .heading=${i?E:void 0} .headingLevel=${this.headingLevel} .selected=${!d.length&&!b.length} @calciteFlowItemClose=${()=>this.closed=!0} ${m(this.#c)}>${t?.length?r`<calcite-list data-layer-type=${M??$} .displayMode=${Q} .filterEnabled=${s} .filterPlaceholder=${h} .filterProps=${S} .filterText=${s?n:""} .group=${M} .label=${E} @focusin=${this.#n} @focusout=${this.#r} selection-appearance=border .selectionMode=${l} @calciteListChange=${this.#E} @calciteListFilter=${v=>{this.filterText=v.currentTarget?.filterText??"",this.arcgisFilterChange.emit()}} @mouseleave=${this.#r} @mouseover=${this.#n} ${m(this.#o)}>${t.toArray().map(v=>this.#R(v))}${s&&!this.hideNoFilterResultsNotice?r`<div class=${y(g.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this.#u()}</calcite-notice></div>`:null}</calcite-list>`:this.#P()}</calcite-flow-item>`,this.#A(),this._renderedOpenLayerFlowItems];return this.closed?null:w("root-flow",r`<calcite-flow>${V}</calcite-flow>`)}#D(e,t){let{openedLayers:s}=this,a=e.title||this.messages.untitledLayer;return w(e.uid,r`<calcite-flow-item data-layer-uid=${e.uid??$} .description=${a} .heading=${this.messages[e.type==="catalog"?"catalogLayers":"tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${o=>{o.preventDefault(),s.pop();let i=s.at(-1);i?this._focusLayerFlowItem=i.uid:this._focusRootFlowItem=!0}} ${m(this.#d)}>${this.#s.get(e)}</calcite-flow-item>`)}#R(e,t,s){let{hideStatusIndicators:a,showCloseButton:o,showCollapseButton:i,showErrors:l,showFilter:n,showHeading:h,showTemporaryLayerIndicators:d}=this;return w(e.uid,j({activeItem:this._activeItem??void 0,css:{...g,itemCatalogIcon:g.itemActionIcon},displayMode:Q,dragEnabled:!1,item:e,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,parent:t,parentTitles:s,rootGroupUid:this.#l,selectedItems:this.selectedItems,selectionMode:this.selectionMode,visibilityAppearance:this.visibilityAppearance,hideStatusIndicators:a,showCloseButton:o,showCollapseButton:i,showErrors:l,showFilter:n,showHeading:h,showTemporaryLayerIndicators:d,handleAction:this.#M.bind(this),handleCatalogOpen:this.#p.bind(this),handleTablesOpen:this.#m.bind(this),handleTooltipReferenceChange:this.#_.bind(this),view:this.view}))}};A("arcgis-catalog-layer-list-next",_);return _},"applications/Components/featureUtils","core/Collection","core/reactiveUtils","layers/list/CatalogItemCollection","layers/list/Item",a,b,d,e,f,g,h,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"./3NWZC6DC.js";import a from"./FHWOIM57.js";import"./VJVKFKSG.js";import{a as se}from"./2BVXNQ3U.js";import"./3AQ6NC3C.js";import"./A4X5YDA6.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{L as H,M as U,N as ie,T as oe,a as ee,b as O,o as te}from"./WXLC6FPD.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,pe,Z,W,Le,X,{createSphere:Re},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=Re(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 Ae({components:[y],vertexAttributes:new Le({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 Pe({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 Fe({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","views/3d/environment/Environment","core/reactiveUtils","applications/Components/baUtils","core/Collection","symbols/FillSymbol3DLayer","symbols/MeshSymbol3D","Ground","core/Accessor","core/accessorSupport/decorators","core/Error","geometry/Extent","geometry/Mesh","geometry/support/MeshComponent","geometry/support/MeshMaterialMetallicRoughness","geometry/support/MeshTexture","geometry/support/MeshVertexAttributes","geometry/Point","geometry/support/meshUtils","layers/ImageryTileLayer","symbols/Font","symbols/TextSymbol",a,b,c)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import c from"./MZWO5JYA.js";import a from"./FHWOIM57.js";import"./VJVKFKSG.js";import{a as C}from"./2BVXNQ3U.js";import"./3AQ6NC3C.js";import"./A4X5YDA6.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{L as y,M as d,N as f,T as b,a as p,b as r,o,q as g,r as v,w as h}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([E,{a:R},{b:$,e:w}])=>{var x=p`:host{min-height:var(--arcgis-internal-panel-height-sm, 240px);height:100%}arcgis-features-next{height:100%}calcite-table{--calcite-table-border-color: none}calcite-table-row{--calcite-table-row-border-color: var(--calcite-color-border-3)}.white-panel-background{--calcite-panel-background-color: var(--calcite-color-foreground-1)}.aggregated-geometry-container{display:flex;justify-content:space-between;margin:0 var(--calcite-spacing-md) var(--calcite-spacing-md)}#elements-list-item{border:solid 1px var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sm);margin:0 var(--calcite-spacing-sm)}.no-selectable-results{margin:0 var(--calcite-spacing-md);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size)}.results-heading{display:flex;flex-direction:column;margin:var(--calcite-spacing-md);gap:var(--calcite-spacing-xs)}.results-heading-title{font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size);color:var(--calcite-color-text-1)}.results-heading-subtitle{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-3)}.functions-heading{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) var(--calcite-spacing-xxs);font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size);color:var(--calcite-color-text-1)}.no-results-landing{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;margin:var(--calcite-spacing-sm) var(--calcite-spacing-xl) var(--calcite-spacing-xl);gap:var(--calcite-spacing-md)}.no-results-landing calcite-icon{margin-bottom:var(--calcite-spacing-sm);--calcite-icon-color: var(--calcite-color-text-3)}.no-results-landing .no-results-heading{font-size:var(--calcite-font-size-2)}.no-results-landing .no-results-description{color:var(--calcite-color-text-3)}`,u={dirtyAreasDiscovered:-2147208511,noValidControllers:-2147208935,pathNotFound:-2147208444},m=class extends f{constructor(){super(...arguments),this._messages=C({blocking:!0}),this.#c=!0,this.#t=[],this.#s=y(),this.#a=new Map,this.#o=new Map,this.#i=new Map,this.#r=new Map,this.#l=[],this._aggregatedGeometryDisabled=!1,this.aggregatedGeometryGraphicsColor=new E([255,255,0,.6]),this.hideActionBar=!1,this.hideFeatureResults=!1,this.isElementsSelected=!1,this.layers=[],this.state="ready",this.traceResultFeatures=[],this.autoDestroyDisabled=!1,this.arcgisAggregatedGeometryGraphicsColorChange=h(),this.arcgisHideGraphicsChange=h(),this.arcgisSelectedResultTypeChange=h(),this.arcgisTraceResultFeaturesReady=h()}static{this.properties={_aggregatedGeometryDisabled:16,_featuresComponentElement:16,aggregatedGeometryGraphicsColor:0,hideActionBar:5,hideFeatureResults:5,isElementsSelected:5,layers:0,messageOverrides:0,numResults:32,referenceElement:1,state:1,traceConfigTitle:1,traceError:0,traceResult:0,traceResultFeatures:0,utilityNetwork:0,view:0,autoDestroyDisabled:5}}static{this.styles=x}#c;#t;#n;#s;#a;#o;#i;#r;#l;get numResults(){return this.traceResultFeatures.length+this.#t.length}clearAggregatedGeometryGraphics(){this.#n?.destroy()}async destroy(){this.#a.clear(),this.#i.clear(),this.#r.clear(),this.#n?.destroy(),this._featuresComponentElement?.destroy(),await this.manager.destroy()}load(){this.traceResult&&(this.#$(),this.#f().then(()=>this.#b()).finally(()=>{this.arcgisTraceResultFeaturesReady.emit(),this.state="ready"}))}willUpdate(e){e.has("isElementsSelected")&&this.arcgisSelectedResultTypeChange.emit(),e.has("traceResult")&&(this.isElementsSelected=!1,this.traceResult||(this.traceResultFeatures=[],this.#t=[]))}loaded(){this.traceResult&&(this.utilityNetwork||o("warn",this,g("utilityNetwork")),this.layers.length||o("warn",this,v("layers")),this.view||o("warn",this,g("view")))}disconnectedCallback(){super.disconnectedCallback(),this.#o.clear()}#g(e){e&&(this.#n=e)}#u(e){e&&(this._featuresComponentElement=e)}async#m([e,t]){let a=this.utilityNetwork?.getLayerIdBySourceId(e),s=this.#p(a),i=this.#v(t);if(a==null||!s){this.#t.push(...i);return}let l=s.createQuery();l.gdbVersion=this.utilityNetwork?.gdbVersion,l.objectIds=i.map(n=>n.objectId),l.outFields=["*"];let{features:c}=await $(s,l);c.forEach(n=>{let k=n.layer;n.getEffectivePopupTemplate(this.#c)||(n.popupTemplate=k.createPopupTemplate())}),w(s)?c.forEach(n=>this.#h(this.#i,n.layer.subtypeCode,n)):this.#a.set(a,c)}#h(e,t,a){let s=e.get(t);s==null?e.set(t,[a]):s.push(a)}#p(e){if(e==null)return;let t=this.#o,a=this.#l,s=t.get(e);if(s)return s;if(!a)return;let i=a.find(l=>"layerId"in l&&l.layerId===e);return i&&t.set(e,i),i}#v(e){return Array.from(new Map(e.map(t=>[t.globalId,t])).values())}#y(e){e.stopPropagation();let t=e.detail;this.arcgisHideGraphicsChange.emit(t),this._aggregatedGeometryDisabled=t,t&&this.#s.value?.open&&(this.#s.value.open=!1)}async#f(){let{layers:e,utilityNetwork:t}=this;if(!t)return;try{t.loaded||(this.state="loading",await t.load())}catch(s){R(s,this,"Error while loading the selected utility network")}this.#l=e.filter(s=>t.isUtilityLayer(s));let a=this.#l.filter(s=>!s.loaded).map(s=>s.load());a.length>0&&(this.state="loading",(await Promise.allSettled(a)).forEach(s=>{s.status==="rejected"&&o("error",this,`Failed to load layer. Reason: ${s.reason}`)}))}async#b(){let e=Array.from(this.#r.entries());if(!e.length)return;this.state="loading";let t=e.map(i=>this.#m(i));(await Promise.allSettled(t)).forEach((i,l)=>{if(i.status==="rejected"){let[c]=e[l];o("error",this,`Failed to query features for source ${c}. Reason: ${i.reason}`)}});let a=Array.from(this.#a.values()),s=Array.from(this.#i.values());this.traceResultFeatures=a.concat(s).flat()}#$(){this.traceResult.elements?.forEach(e=>this.#h(this.#r,e.networkSourceId,e))}render(){let{traceError:e,traceResult:t}=this;if(e)return this.#G(e);if(!t)return this.#A();let{elements:a,globalFunctionResults:s,aggregatedGeometry:i}=t,l=!a.length&&!s.length&&!i,c=a.length>0&&!s.length&&!i;return l?this.#_():this.state==="loading"?this.#w():this.hideFeatureResults&&c?this.#k():this.isElementsSelected||c?r`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#c} .features=${this.traceResultFeatures} .hideActionBar=${this.hideActionBar} .hideCloseButton=${c} hide-select-feature initial-display-mode=list .messageOverrides=${this.messageOverrides} @arcgisClose=${()=>this.isElementsSelected=!1} open .referenceElement=${this.referenceElement} .view=${this.view} ${d(this.#u)}></arcgis-features-next>`:this.#R(t)}#w(){return r`<calcite-panel class="white-panel-background"><calcite-loader .label=${this._messages.gettingResults} .text=${this._messages.gettingResults}></calcite-loader></calcite-panel>`}#R(e){let{elements:t,globalFunctionResults:a,aggregatedGeometry:s}=e;return r`<calcite-panel class="white-panel-background">${this.#e()}${s!=null?this.#C(s):null}${s!=null&&!t.length?this.#E():null}${t.length>0?this.hideFeatureResults?this.#d():this.#x():null}${a.length>0?this.#F(a):null}</calcite-panel>`}#C(e){let{_aggregatedGeometryDisabled:t,aggregatedGeometryGraphicsColor:a,_messages:s}=this;return r`<div class="aggregated-geometry-container"><arcgis-utility-network-aggregated-geometry .graphicsColor=${a} .geometry=${e} .view=${this.view} @arcgisHideGraphicsChange=${this.#y} auto-destroy-disabled ${d(this.#g)}></arcgis-utility-network-aggregated-geometry><calcite-swatch id=geometry-color-swatch .label=${s.labels.aggregatedGeometryGraphicsColor} .color=${a.toCss()} .disabled=${t}></calcite-swatch><calcite-popover .heading=${s.headings.setColor} .label=${s.headings.setColor} reference-element=geometry-color-swatch closable ${d(this.#s)}><calcite-color-picker alpha-channel channels-disabled clearable hex-disabled saved-disabled .value=${a} @calciteColorPickerChange=${i=>{let l=i.target.value;this.arcgisAggregatedGeometryGraphicsColorChange.emit(l)}} .disabled=${t}></calcite-color-picker></calcite-popover></div>`}#k(){return r`<calcite-panel class="white-panel-background">${this.#e()}${this.#d()}</calcite-panel>`}#d(){return r`<div class="no-selectable-results">${this._messages.resultFeaturesAreHidden}</div>`}#E(){return r`<div class="no-selectable-results">${this._messages.noSelectableFeatures}</div>`}#x(){let{_messages:e}=this;return r`<calcite-list .label=${e.headings.traceResultsGeneric}><calcite-list-item id=elements-list-item .label=${e.headings.features} @calciteListItemSelect=${()=>this.isElementsSelected=!0}><calcite-chip .label=${e.labels.numFeatures} scale=s slot=content-end>${this.numResults}</calcite-chip><calcite-icon icon=chevron-right slot=content-end></calcite-icon></calcite-list-item></calcite-list>`}#F(e){let{_messages:t}=this;return r`<div class="functions-heading">${t.headings.functions}</div><calcite-table .caption=${t.labels.functionResults}>${e.filter(a=>a.networkAttributeName!=null&&a.result!=null&&a.functionType!=null).map(a=>{let{functionName:s,networkAttributeName:i,functionType:l,result:c}=a,n=s||`${i} ${l}`;return r`<calcite-table-row><calcite-table-cell>${n}</calcite-table-cell><calcite-table-cell>${c}</calcite-table-cell></calcite-table-row>`})}</calcite-table>`}#e(){return r`<div class="results-heading"><div class="results-heading-title">${this._messages.headings.traceResultsGeneric}</div>${this.traceConfigTitle?r`<div class="results-heading-subtitle">${this.traceConfigTitle}</div>`:null}</div>`}#G(e){let{_messages:t}=this,a=e.message;switch(e.details?.raw?.extendedCode){case u.dirtyAreasDiscovered:a=t.traceErrors.dirtyAreasDiscovered;break;case u.noValidControllers:a=t.traceErrors.noValidControllers;break;case u.pathNotFound:a=t.traceErrors.pathNotFound;break}return r`<calcite-panel class="white-panel-background">${this.#e()}<div class="no-results-landing"><calcite-icon icon=exclamation-mark-triangle scale=l></calcite-icon><div class="no-results-heading">${t.traceFailedHeading}</div><div class="no-results-description">${t.traceFailedDescription}</div><div class="no-results-description">${a}</div></div></calcite-panel>`}#_(){let{_messages:e}=this;return r`<calcite-panel class="white-panel-background">${this.#e()}<div class="no-results-landing"><calcite-icon icon=exclamation-mark-triangle scale=l></calcite-icon><div class="no-results-heading">${e.noResultsHeading}</div><div class="no-results-description">${e.noResultsDescription}</div></div></calcite-panel>`}#A(){let{_messages:e}=this;return r`<calcite-panel class="white-panel-background">${this.#e()}<div class="no-results-landing"><calcite-icon icon=utility-network-trace scale=l></calcite-icon><div class="no-results-heading">${e.noTraceConfigHeading}</div><div class="no-results-description">${e.noTraceConfigDescription}</div></div></calcite-panel>`}};b("arcgis-utility-network-trace-results",m);return m},"Color",a,c)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{a as g}from"./LTOXLO3L.js";import i from"./FHWOIM57.js";import"./VJVKFKSG.js";import f from"./3T7L7UT5.js";import{a as v}from"./2BVXNQ3U.js";import e from"./2FM2FJAY.js";import c from"./YHNRTH56.js";import"./3AQ6NC3C.js";import"./A4X5YDA6.js";import b from"./SDWFNKIL.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{M as h,N as m,T as y,a as p,b as a,o as d,w as n}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([$,{when:_},T,,,,f,{a:b}])=>{var x=p`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{display:flex;flex-direction:column;height:var(--arcgis-internal-panel-height, 100%)}arcgis-utility-network-trace-inputs-next[mode=default]{height:auto}calcite-tabs{display:flex;flex-direction:column;height:100%}calcite-tab{--calcite-tab-content-space-y: 0;min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-tab:not([selected]){flex:0}calcite-panel{--calcite-panel-background-color: var(--calcite-color-foreground-1)}calcite-notice{margin:var(--calcite-spacing-md)}.inputs-tab-container{display:flex;flex-direction:column;height:100%}.trace-inputs-warning{flex:none;height:fit-content;calcite-notice{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0}}`,R=f(T),u=class extends m{constructor(){super(...arguments),this._messages=v({blocking:!0}),this.#t=R(this),this.#s=[],this._activeTab="input",this._showMissingTerminalWarning=!1,this._showNoStartingPointsWarning=!1,this._mode="default",this.autoDestroyDisabled=!1,this.aggregatedGeometryGraphicsColor=new $([255,255,0,.6]),this.disableHighlightFeatureResults=!1,this.hideActionBar=!1,this.hideFeatureResults=!1,this.state=this.#t.state,this.view=this.#t.view,this.arcgisHideGraphicsChange=n(),this.arcgisReady=n(),this.arcgisTraceLocationSelectEnd=n(),this.arcgisTraceLocationSelectStart=n(),this.arcgisTraceResultClear=n(),this.arcgisTraceResultFeaturesReady=n()}static{this.properties={_activeTab:16,_traceError:16,_traceResult:16,_showMissingTerminalWarning:16,_showNoStartingPointsWarning:16,_mode:16,autoDestroyDisabled:5,beforeTraceLocationSelectStart:0,aggregatedGeometryGraphicsColor:0,disableHighlightFeatureResults:5,hideActionBar:5,hideFeatureResults:5,label:3,messageOverrides:0,traceResultFeatures:32,referenceElement:1,state:32,view:0}}static{this.styles=x}#t;#e;#i;get#c(){let{view:t}=this;return t?.map?t.map.allLayers.toArray().concat(t.map.allTables.toArray()):[]}#o;#s;get traceResultFeatures(){return this.#i?.traceResultFeatures??[]}async destroy(){this.#n(),this.#i?.destroy(),this.#e?.destroy(),await this.manager.destroy()}load(){this.manager.onLifecycle(()=>[_(()=>!this.#t.utilityNetwork,()=>this.#a("input"))])}#r(){this._traceResult=void 0,this.#n(),this.#g()}#l(){if(!this.#e)return;let{traceLocations:t,traceLocationFlagInfos:e,traceConfiguration:s,isSubnetworkNameTraceSelected:i}=this.#e,c=!!s?.subnetworkName,o=t?.some(r=>r.type==="starting-point"),l=e?.some(r=>!!r.flagProperties.terminalConfiguration&&!r.flagProperties.selectedTerminals?.size)??!1;this._traceError=void 0,this._showNoStartingPointsWarning=!i&&!o||i&&!c,this._showMissingTerminalWarning=l}#a(t){this._activeTab=t}#h(t){let{_messages:e}=this;switch(t){case"no-user-type-extension":return e.errors.loadErrors.noUserTypeExtension;case"no-utility-network":return e.errors.loadErrors.noUtilityNetwork;case"no-view":return e.errors.loadErrors.noView;case"sceneView-not-supported":return e.errors.loadErrors.sceneViewNotSupported;default:return t}}#n(){this.#s.forEach(t=>t.remove()),this.#s=[]}#g(){this.#i?.clearAggregatedGeometryGraphics()}#u(){let{_traceResult:t,view:e}=this,s=this.#t.utilityNetwork;!s||!t?.elements||!e||s.getObjectIdsFromElements(t.elements).forEach(i=>{let c=e.allLayerViews.find(l=>{let r=l.layer;if(s.isUtilityLayer(r)){let w=Number(i.layerUrl.split("/").pop());return r.layerId===w}return!1});if(!c)return;let o=c.highlight(i.objectIds);this.#s.push(o)})}async#p(){let t=this.#e?.selectedNamedTraceConfiguration,e=this.#e?.traceConfiguration;if(!(t?.traceType&&e)){d("error",this,"Trace configuration not found");return}let s=this.#e?.traceLocations;try{this._traceResult=await this.#t.executeTraceConfiguration({traceType:t.traceType,traceConfiguration:e,traceLocations:s??[],resultTypes:t.resultTypes,outSpatialReference:this.view?.spatialReference}),this.disableHighlightFeatureResults||this.#u()}catch(i){b(i,this,"Error while running trace"),this._traceError=i,this._traceResult=void 0}}#d(){this.#l(),!(this._showNoStartingPointsWarning||this._showMissingTerminalWarning)&&(this._showNoStartingPointsWarning=!1,this._showMissingTerminalWarning=!1,this.#r(),this.#a("results"),this.#p())}#m(t){t&&(this.#e=t)}#y(t){t&&(this.#i=t)}#b(t){t.stopPropagation(),this.arcgisHideGraphicsChange.emit(t.detail)}#v(t){t.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(t.detail).defaultPrevented&&t.preventDefault()}#f(t){t.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit()}#w(t){t.stopPropagation(),this.arcgisTraceResultFeaturesReady.emit()}#$(t){let e=t.detail;this.aggregatedGeometryGraphicsColor=e}#_(){this._showNoStartingPointsWarning=!1,this._showMissingTerminalWarning=!1}#T(){this.#t.utilityNetwork=this.#e?.selectedUtilityNetwork}#x(){let{_messages:t}=this;return a`<calcite-panel class="trace-inputs-warning"><calcite-notice open icon=exclamation-mark-triangle closable kind=danger scale=s @calciteNoticeClose=${()=>this._showMissingTerminalWarning=!1}><div slot=title>${t.errors.missingTerminalTitle}</div><div slot=message>${t.errors.missingTerminalBody}</div></calcite-notice></calcite-panel>`}#R(){let{_messages:t}=this;return a`<calcite-panel class="trace-inputs-warning"><calcite-notice open icon=exclamation-mark-triangle closable kind=danger scale=s @calciteNoticeClose=${()=>this._showNoStartingPointsWarning=!1}><div slot=title>${t.errors.noStartingPointsTitle}</div><div slot=message>${t.errors.noStartingPointsBody}</div></calcite-notice></calcite-panel>`}#k(){return g(`${this.el.id}__results-tab-item`,a`<calcite-tab .selected=${this._activeTab==="results"}>${this.state==="executing"?a`<calcite-panel><calcite-loader .label=${this._messages.runningTrace} .text=${this._messages.runningTrace}></calcite-loader></calcite-panel>`:a`<arcgis-utility-network-trace-results-next .autoDestroyDisabled=${this.autoDestroyDisabled} .aggregatedGeometryGraphicsColor=${this.aggregatedGeometryGraphicsColor} .hideActionBar=${this.hideActionBar} .hideFeatureResults=${this.hideFeatureResults} .layers=${this.#c} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .traceConfigTitle=${this.#o?.title} .traceError=${this._traceError} .traceResult=${this._traceResult} .utilityNetwork=${this.#t.utilityNetwork??void 0} .view=${this.view??void 0} @arcgisAggregatedGeometryGraphicsColorChange=${this.#$} @arcgisHideGraphicsChange=${this.#b} @arcgisTraceResultFeaturesReady=${this.#w} ${h(this.#y)}></arcgis-utility-network-trace-results-next>`}</calcite-tab>`)}#S(){let{_messages:t,_traceResult:e}=this,s=!!(e?.elements.length||e?.globalFunctionResults.length||e?.aggregatedGeometry)&&this.#i?.state==="ready",i=this.#i?.numResults??0;return a`<calcite-button appearance=outline width=full @click=${()=>{this.#a("input"),this.#r(),this.arcgisTraceResultClear.emit()}} .disabled=${!s} slot=footer>${i>0&&!this.hideFeatureResults&&this.state!=="executing"?t.buttons.clearResultsCustom.replace("{number}",i.toString()):t.buttons.clearResultsGeneric}</calcite-button>`}#C(){let{_mode:t}=this,{loadError:e}=this.#t,s=(e==="no-user-type-extension"||e==="sceneView-not-supported"?a`<calcite-notice kind=danger open scale=s slot=content-top width=auto><div slot=message>${this.#h(e)}</div></calcite-notice>`:void 0)??a`${this._showNoStartingPointsWarning&&t==="default"&&this.#R()||""}${this._showMissingTerminalWarning&&t==="default"&&this.#x()||""}<arcgis-utility-network-trace-inputs-next .autoDestroyDisabled=${this.autoDestroyDisabled} .hideActionBar=${this.hideActionBar} .referenceElement=${this.referenceElement} .view=${this.view??void 0} .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisPropertyChange=${i=>{i.stopPropagation(),i.detail.name==="mode"&&(this._mode=i.target.mode)}} @arcgisSelectedNamedTraceConfigurationChange=${this.#_} @arcgisTraceLocationSelectEnd=${this.#f} @arcgisTraceLocationSelectStart=${this.#v} @arcgisUtilityNetworkChange=${this.#T} ${h(this.#m)}></arcgis-utility-network-trace-inputs-next>`;return g(`${this.el.id}__inputs-tab-item`,a`<calcite-tab .selected=${this._activeTab==="input"}><div class="inputs-tab-container">${s}</div></calcite-tab>`)}#N(){let{state:t}=this;if(this._mode!=="default")return null;let e=t==="disabled"||t==="loading"||!this.#e?.traceConfiguration;return a`<calcite-button appearance=solid width=full @click=${this.#d} slot=footer .disabled=${e}>${this._messages.buttons.getResults}</calcite-button>`}render(){let{_activeTab:t,state:e}=this;return a`<calcite-panel><calcite-tabs layout=center position=top><calcite-tab-nav slot=title-group><calcite-tab-title @click=${()=>this.#a("input")} .selected=${t==="input"}>${this._messages.tabs.inputTab}</calcite-tab-title><calcite-tab-title @click=${()=>this.#a("results")} .selected=${t==="results"} .disabled=${e==="disabled"||e==="loading"}>${this._messages.tabs.resultsTab}</calcite-tab-title></calcite-tab-nav>${this.#C()}${this.#k()}</calcite-tabs>${t==="input"?this.#N():null}${t==="results"?this.#S():null}</calcite-panel>`}};y("arcgis-utility-network-trace-analysis-next",u);return u},"Color","core/reactiveUtils","networks/UtilityNetworkTraceAnalysis",b,c,e,f,i)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import a from"./FHWOIM57.js";import"./VJVKFKSG.js";import{a as g}from"./2BVXNQ3U.js";import{g as m}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{N as d,T as n,a as c,b as r,o,w as h}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([k,{watch:y},{a:a}])=>{var u=c`:host{height:100%;flex-grow:1}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-label{margin:0 var(--calcite-space-md)}calcite-block calcite-notice{margin:var(--calcite-space-md) var(--calcite-space-md) 0}calcite-notice{margin:var(--calcite-space-md)}`,l=class extends d{constructor(){super(...arguments),this._messages=g({blocking:!0}),this.hideErrors=!1,this.hideLoader=!1,this.state="loading",this.arcgisPropertyChange=m()("selectedUtilityNetwork","state"),this.arcgisError=h()}static{this.properties={_utilityNetworks:16,view:0,hideErrors:5,hideLoader:5,state:1,error:1,selectedUtilityNetwork:0,heading:1}}static{this.styles=u}load(){this.#e(),this.manager.onLifecycle(()=>[y(()=>this.view?.map,()=>this.#e())])}willUpdate(t){t.has("_utilityNetworks")&&this.#s(),t.has("selectedUtilityNetwork")&&this.#r()}#t(t){this.error=t,this.state="error",this.arcgisError.emit()}#e(){if(this.error=void 0,this.state="loading",!this.view?.map){o("error",this,this._messages.errors.noView),this._utilityNetworks=void 0,this.#t(this._messages.errors.noView);return}let t=this.view.map;this.#i(t)}async#i(t){try{t.loaded||await t.load()}catch(e){this.#t(this._messages.errors.mapLoadFailed),a(e,this,this._messages.errors.mapLoadFailed)}finally{this._utilityNetworks=t.utilityNetworks||new k}}#s(){let{selectedUtilityNetwork:t,_utilityNetworks:e}=this;e?.length?(!t||!e.includes(t))&&(this.selectedUtilityNetwork=e.at(0)):(this.#t(this._messages.errors.noUtilityNetwork),o("error",this,this._messages.errors.noUtilityNetwork),this.selectedUtilityNetwork=void 0)}async#r(){let{selectedUtilityNetwork:t}=this;try{t&&!t.loaded&&await t.load(),this.state="ready"}catch(e){a(e,this,this._messages.errors.utilityNetworkLoadFailed),this.#t(this._messages.errors.utilityNetworkLoadFailed)}}#o(){return this.hideLoader?null:r`<calcite-loader label=loading></calcite-loader>`}#a(t,e=!1,i){return this.hideErrors?null:r`<calcite-notice .closable=${e} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${t}</div></calcite-notice>`}#l(){let t=this._messages.labels.utilityNetwork,e=this._utilityNetworks?.map(i=>r`<calcite-combobox-item .value=${i.id} .heading=${i.title||i.id} .selected=${i.id===this.selectedUtilityNetwork?.id}></calcite-combobox-item>`);return r`<calcite-combobox .label=${t} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{let s=i.selectedItems[0]?.value;this.selectedUtilityNetwork?.id!==s&&(this.selectedUtilityNetwork=this._utilityNetworks?.find(w=>w.id===s))}}>${e}</calcite-combobox>`}#c(){let{selectedUtilityNetwork:t}=this;return r`<calcite-label>${t?.title}</calcite-label>`}#h(t){let e=this._messages.labels.utilityNetwork,i=this.heading||e,s=this._utilityNetworks?.length?this._utilityNetworks?.length===1?this.#c():this.#l():void 0;return r`<calcite-block .heading=${i} .label=${e} expanded>${s}${t}</calcite-block>`}render(){let{error:t,state:e,selectedUtilityNetwork:i}=this,s=e==="error"&&t?this.#a(t,!1,"exclamation-mark-triangle"):void 0;return!s&&!i?.loaded&&!i?.loadError?this.#o():e==="error"&&s&&!this._utilityNetworks?.length?s:this.#h(s)}};n("arcgis-utility-network-picker",l);return l},"core/Collection","core/reactiveUtils",a)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import f from"./TSZ26CSX.js";import{a as y}from"./MZBCC5YA.js";import{a as p}from"./TN5C3MSL.js";import{a as d}from"./BXP5RGPD.js";import e from"./2FM2FJAY.js";import"./3AQ6NC3C.js";import"./A4X5YDA6.js";import b from"./SDWFNKIL.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{L as n,M as o,N as c,O as h,T as v,b as a,w as r}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:s},E,_,A,{d:u,e:g},{a:e,b:w,f:m},{a:b,b:f,c:V,d:C}])=>{var R=w(_,{}),D=w(E,{}),l=class extends c{constructor(){super(),this._attributionMode=null,this._containerRef=n(),this._mapRef=n(),this._uiController=new b(this),this.extraContent=new A,this.arcgisLoadError=V(this),this.arcgisViewReadyError=C(this),this._map=R(this),this.view=D(this),this.animationsDisabled=this.view.animationsEnabled,this.allLayerViews=this.view.allLayerViews,this.analyses=this.view.analyses,this.autoDestroyDisabled=!1,this.background=this.view.background,this.basemap=this._map.basemap,this.basemapView=this.view.basemapView,this.canZoomIn=this.view.canZoomIn,this.canZoomOut=this.view.canZoomOut,this.constraints=this.view.constraints,this.displayFilterDisabled=this.view.displayFilterEnabled,this.fatalError=this.view.fatalError,this.floors=this.view.floors,this.graphics=this.view.graphics,this.ground=this._map.ground,this.highlights=this.view.highlights,this.ipsInfo=this._map.ipsInfo,this.layerViews=this.view.layerViews,this.magnifier=this.view.magnifier,this.map=this.view.map,this.navigation=this.view.navigation,this.padding=this.view.padding,this.popup=this.view.popup,this.popupDisabled=this.view.popupEnabled,this.popupComponentEnabled=!1,this.ready=this.view.ready,this.resizeAlign=this.view.resizeAlign,this.resolution=this.view.resolution,this.rotation=this.view.rotation,this.selectionManager=this.view.selectionManager,this.slotGroupRefs=this._uiController.slotGroupRefs,this.spatialReference=this.view.spatialReference,this.spatialReferenceLocked=this.view.spatialReferenceLocked,this.suspended=this.view.suspended,this.theme=this.view.theme,this.timeExtent=this.view.timeExtent,this.timeZone=this.view.timeZone,this.updating=this.view.updating,this.visibleArea=this.view.visibleArea,this.arcgisViewAnalysisViewCreate=e(()=>this.view,"analysis-view-create"),this.arcgisViewAnalysisViewCreateError=e(()=>this.view,"analysis-view-create-error"),this.arcgisViewAnalysisViewDestroy=e(()=>this.view,"analysis-view-destroy"),this.arcgisViewChange=r(),this.arcgisViewClick=e(()=>this.view,"click"),this.arcgisViewDoubleClick=e(()=>this.view,"double-click"),this.arcgisViewDoubleTapDrag=e(()=>this.view,"double-tap-drag"),this.arcgisViewDrag=e(()=>this.view,"drag"),this.arcgisViewHold=e(()=>this.view,"hold"),this.arcgisViewImmediateClick=e(()=>this.view,"immediate-click"),this.arcgisViewImmediateDoubleClick=e(()=>this.view,"immediate-double-click"),this.arcgisViewKeyDown=e(()=>this.view,"key-down"),this.arcgisViewKeyUp=e(()=>this.view,"key-up"),this.arcgisViewLayerviewCreate=e(()=>this.view,"layerview-create"),this.arcgisViewLayerviewCreateError=e(()=>this.view,"layerview-create-error"),this.arcgisViewLayerviewDestroy=e(()=>this.view,"layerview-destroy"),this.arcgisViewMouseWheel=e(()=>this.view,"mouse-wheel"),this.arcgisViewPointerDown=e(()=>this.view,"pointer-down"),this.arcgisViewPointerEnter=e(()=>this.view,"pointer-enter"),this.arcgisViewPointerLeave=e(()=>this.view,"pointer-leave"),this.arcgisViewPointerMove=e(()=>this.view,"pointer-move"),this.arcgisViewPointerUp=e(()=>this.view,"pointer-up"),this.arcgisViewReadyChange=r(),this.arcgisViewVerticalTwoFingerDrag=e(()=>this.view,"vertical-two-finger-drag"),f(this),this.view.ui={components:[]}}static{this.properties={_map:16,view:32,animationsDisabled:5,aria:0,allLayerViews:32,analyses:0,attributionItems:32,attributionMode:1,autoDestroyDisabled:5,background:0,basemap:1,basemapView:0,canZoomIn:36,canZoomOut:36,center:1,constraints:0,displayFilterDisabled:5,extent:0,fatalError:0,floors:0,focusAreas:0,gamepad:32,graphics:0,ground:1,hideAttribution:5,highlights:0,interacting:32,ipsInfo:0,itemId:3,layerViews:32,magnifier:32,map:0,navigating:32,navigation:0,padding:0,popup:0,popupElement:32,popupDisabled:5,popupComponentEnabled:5,ready:36,resizeAlign:1,resolution:40,rotation:9,scale:9,selectionManager:32,slotGroupRefs:32,spatialReference:0,spatialReferenceLocked:5,stationary:32,suspended:39,theme:0,timeExtent:0,timeZone:1,updating:36,viewpoint:0,visibleArea:32,zoom:9,loadErrorSources:0}}static{this.styles=[d,y]}get aria(){return this.view?.aria}set aria(i){this.view&&(this.view.aria=i)}get attributionItems(){return this.view?.attributionItems??[]}get attributionMode(){return this._attributionMode}set attributionMode(i){this._attributionMode=i,i!=="auto"&&(this.view.attributionMode=i)}get center(){return this.view.center}set center(i){let t=g(i,this.view);t&&(this.view.center=t)}get extent(){return this.view.extent}set extent(i){i&&!this.extent?.equals(i)&&(this.view.extent=i)}get focusAreas(){return this.map?this.map.focusAreas:{areas:[],style:"bright"}}set focusAreas(i){this.map&&(this.map.focusAreas=i)}get gamepad(){return this.view.input.gamepad}get hideAttribution(){return!this.view.attributionVisible}set hideAttribution(i){this.view.attributionVisible=!i}get interacting(){return this.view.interacting}get itemId(){return this._map.portalItem?.id}set itemId(i){m(this._map,this),this._map.portalItem={id:i},this.view.map=this._map}get navigating(){return this.view.navigating}get popupElement(){return this._uiController.popupElement||null}get scale(){return this.view.scale}set scale(i){this.view.scale=i}get stationary(){return this.view.stationary}get viewpoint(){return this.view.viewpoint}set viewpoint(i){u(this.viewpoint,i)&&(this.view.viewpoint=i)}get zoom(){return this.view.zoom}set zoom(i){this.view.zoom=i}async closePopup(){this._uiController.closePopup()}async fetchPopupFeatures(i,t){return this.view.fetchPopupFeatures(i,t)}async destroy(){await this.manager.destroy()}async goTo(i,t){return await this.view.goTo(i,t)}async hitTest(i,t){return await this.view.hitTest(i,t)}async openPopup(i){this._uiController.openPopup(i)}async takeScreenshot(i){return await this.view.takeScreenshot(i)}toMap(i){return this.view.toMap(i)}toScreen(i,t){return this.view.toScreen(i,t)}async tryFatalErrorRecovery(){this.view.tryFatalErrorRecovery()}async viewOnReady(i,t){return await this.componentOnReady(),await this.view.whenReady().then(()=>i?.()).catch(t)}async whenAnalysisView(i){return await this.view.whenAnalysisView(i)}async whenLayerView(i){return await this.view?.whenLayerView(i)}async zoomIn(){this.view.zoomIn()}async zoomOut(){this.view.zoomOut()}loaded(){let i=this;i.el.childElem=this._mapRef.value,this.view.container??=i.el.childElem,this.map||=this._map,this.manager.onLifecycle(()=>[s(()=>this.map,t=>{t&&(this._map=t)},{initial:!0,sync:!0}),s(()=>this.view.stationary,()=>this.arcgisViewChange.emit(),{initial:!0}),s(()=>this.view.ready,()=>this.arcgisViewReadyChange.emit(),{initial:this.view.ready}),s(()=>this.view.attributionHeight,t=>{this._uiController.handleAttributionHeightChange(t)},{initial:!0})])}renderMain(){return a`<div class=${h(p.base)} ${o(this._mapRef)}></div>`}render(){return a`${this.renderMain()}<section class=${h(p.containerUI)} ${o(this._containerRef)}>${this._uiController.render()}${this.extraContent}</section>`}};v("arcgis-map",l);return l},"core/reactiveUtils","views/MapView","WebMap","core/Collection",b,e,f)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import f from"./3T7L7UT5.js";import{a as k}from"./2BVXNQ3U.js";import{a as _}from"./JD74LG7K.js";import e from"./2FM2FJAY.js";import c from"./YHNRTH56.js";import{g as C}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import b from"./SDWFNKIL.js";import"./QUZTFUWM.js";import{d as g}from"./4W3T75SY.js";import{A as y,M as u,N as $,O as d,Q as h,T as S,a as w,b as a,w as x}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([P,p,{substitute:O},{watch:R},z,,,,M])=>{function D(o){if(o==null||Number.isNaN(o))return 0;let e=o+180;return Math.trunc(E(e,360))}function L(o){let e=o;return e==null||(typeof e=="string"&&(e=Number.parseInt(e,10)),Number.isNaN(e))?0:E(Math.trunc(e),360)-180}function E(o,e){return(o%e+e)%e}var I={fromAttribute:o=>p.fromHex(o),toAttribute:o=>typeof o=="string"?o:o?.toHex()??""},B=w`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}:host{display:flex}.root{user-select:none;display:flex;flex-flow:column wrap;padding:var(--arcgis-internal-padding);overflow-y:auto;width:100%;.container{display:flex;flex:1 1 auto;flex-direction:column;gap:var(--calcite-spacing-sm)}.numeric-inputs-container{display:grid;grid-auto-columns:1fr;grid-auto-flow:column;gap:var(--calcite-spacing-sm)}arcgis-labeled-switch{margin-block-end:var(--calcite-spacing-sm)}.switch--bordered{border-width:0 0 var(--calcite-spacing-px) 0;border-style:solid;border-color:var(--calcite-color-border-1);padding-block-end:var(--calcite-spacing-sm)}.tile-group{display:flex;column-gap:var(--calcite-spacing-md);align-items:start;margin-bottom:calc(0px - var(--calcite-spacing-sm))}.tile{position:relative;.content{display:flex;flex-direction:column;row-gap:var(--calcite-spacing-md);align-items:center;padding:var(--calcite-spacing-md);color:var(--calcite-color-text-2)}&.disabled{opacity:var(--calcite-opacity-disabled)}&:focus-within{outline:var(--calcite-spacing-base) solid var(--calcite-color-brand);outline-offset:var(--calcite-spacing-base)}input[type=radio]{appearance:none;position:absolute;inset:0;opacity:.001;border:var(--calcite-spacing-px) solid transparent;cursor:pointer;&:checked+.content{border:var(--calcite-spacing-px) solid var(--calcite-color-brand)}+.content{border:var(--calcite-spacing-px) solid transparent;calcite-label{margin-bottom:calc(0px - var(--calcite-label-margin-bottom, .75rem));font-weight:var(--calcite-font-weight-medium)}}}}.inline-icon{margin-left:var(--calcite-spacing-xs);vertical-align:top;color:var(--calcite-color-status-warning)}}`,m={componentIcon:"grid-unit",gridTheme:{light:"circle",dark:"circle-area",custom:"palette"},placementState:{interactive:"maximum-territory-distance",place:"move",rotate:"rotate"},warning:"exclamation-mark-triangle"},b=p.fromArray([115,115,115]),v=p.fromArray([200,200,200]),N=["interactive","place","rotate"],W=M(z),f=class extends ${constructor(){super(...arguments),this._labelUid=y(),this._messages=k({}),this._viewModel=W(this),this._placementModeButtonRefs=new Map,this.numericSpacingInputShouldBeVisible=this._viewModel.numericSpacingInputShouldBeVisible,this.view=this._viewModel.view,this.icon=m.componentIcon,this.snappingOptions=this._viewModel.snappingOptions,this.hideColorSelection=!1,this.hideDynamicScaleToggle=!1,this.hideGridEnabledToggle=!1,this.hideNumericInputs=!1,this.hideGridSnapEnabledToggle=!1,this.hideLineIntervalInput=!1,this.hideOutOfScaleWarning=!1,this.hidePlacementButtons=!1,this.hideRotateWithMapToggle=!1,this.rotation=this._viewModel.rotation,this.rotateWithMap=this._viewModel.rotateWithMap,this.spacing=this._viewModel.spacing,this.majorLineInterval=this._viewModel.majorLineInterval,this.gridColor=this._viewModel.gridColor,this.displayEnabled=this._viewModel.displayEnabled,this.gridOutOfScale=this._viewModel.gridOutOfScale,this.unit=this._viewModel.unit,this.dynamicScaling=this._viewModel.dynamicScaling,this.gridControlsEnabled=this._viewModel.gridControlsEnabled,this.interactivePlacementState=this._viewModel.interactivePlacementState,this.snappingEnabled=this._viewModel.snappingEnabled,this.effectiveSpacingAfterDynamicScaling=this._viewModel.effectiveSpacingAfterDynamicScaling,this.placementDisabled=this._viewModel.placementDisabled,this.autoDestroyDisabled=!1,this.arcgisPropertyChange=C()("customColor","theme","spacing","rotation","majorLineInterval","rotateWithMap","dynamicScaling","snappingEnabled","interactivePlacementState","displayEnabled","gridOutOfScale","effectiveSpacingAfterDynamicScaling","gridControlsEnabled","gridColor"),this.arcgisReady=x()}static{this.properties={_placementModeButtonRefs:16,_warningIconTooltipRef:16,_themePopoverRef:16,numericSpacingInputShouldBeVisible:16,view:0,referenceElement:1,icon:1,customColor:[3,{converter:I}],snappingOptions:0,theme:1,hideColorSelection:5,hideDynamicScaleToggle:5,hideGridEnabledToggle:5,hideNumericInputs:5,hideGridSnapEnabledToggle:5,hideLineIntervalInput:5,hideOutOfScaleWarning:5,hidePlacementButtons:5,hideRotateWithMapToggle:5,rotation:11,rotateWithMap:5,spacing:11,majorLineInterval:11,gridColor:[3,{converter:I}],displayEnabled:36,gridOutOfScale:39,unit:1,dynamicScaling:5,gridControlsEnabled:36,interactivePlacementState:3,snappingEnabled:5,effectiveSpacingAfterDynamicScaling:43,placementDisabled:5,autoDestroyDisabled:5,messageOverrides:0,label:1}}static{this.styles=B}get theme(){let e=this.gridColor;return!e||b.equals(e)?"dark":v.equals(e)?"light":"custom"}set theme(e){let i=this._viewModel.view;switch(e){case"dark":this.gridColor=b;break;case"custom":this.customColor==null&&(this.customColor=i?.theme?.accentColor??new P().accentColor),this.gridColor=this.customColor;break;default:this.gridColor=v;break}}async destroy(){await this.manager.destroy()}trySetDisplayEnabled(e){this._viewModel.trySetDisplayEnabled(e)}loaded(){this.manager.onLifecycle(()=>[R(()=>this._viewModel.gridColor,e=>{let i=e instanceof p?e:typeof e=="string"?p.fromHex(e):null;i&&!b.equals(e)&&!v.equals(i)?this.customColor=i:b.equals(i)?this.theme="dark":v.equals(i)&&(this.theme="light")})])}_togglePlacementState(e){this.interactivePlacementState=this.interactivePlacementState===e?null:e}_setWarningIconRef(e){this._warningIconTooltipRef=e}_setPopoverRef(e){this._themePopoverRef=e}_emptyFunction(e){}_setPlacementButtonRef(e){if(e){let i=e.dataset.placementAction;this._placementModeButtonRefs.set(i,e)}else this._placementModeButtonRefs.clear()}render(){return a`<div class=${d(g("root",_.widget,_.panel))}><div class="container">${this._viewModel.destroyed?null:this._renderContent()}</div></div>`}_renderContent(){let{hideGridEnabledToggle:e,hidePlacementButtons:i,hideNumericInputs:t,hideLineIntervalInput:r,hideGridSnapEnabledToggle:n,hideDynamicScaleToggle:l,hideRotateWithMapToggle:c,hideColorSelection:s}=this;return[e?void 0:this._renderEnabledToggle(),i?void 0:this._renderGridPlacementButtons(),t?void 0:this._renderNumericInputs(),r?void 0:this._renderIntervalInput(),!n&&this.snappingOptions?this._renderSnappingToggle():void 0,l?void 0:this._renderDynamicScaleToggle(),c?void 0:this._renderRotateToggle(),s?void 0:this._renderColorSelection()]}_renderGridPlacementButtons(){let{interactivePlacementState:e,placementDisabled:i,gridControlsEnabled:t}=this,r=i||!t;return a`<calcite-label scale=s>${this._messages.placementOptions}<calcite-action-bar expand-disabled layout=horizontal>${N.map(n=>this._renderPlacementModeButton(n,r,e))}</calcite-action-bar></calcite-label>`}_renderPlacementModeButton(e,i,t){let r=this._messages?.placementState?.[e],n=this._placementModeButtonRefs.get(e);return a`<div><calcite-action .active=${t===e} alignment=center .disabled=${i} .icon=${m.placementState[e]} data-placement-action=${e??h} @click=${()=>this._togglePlacementState(e)} .text=${r??""} ${u(this._setPlacementButtonRef)}></calcite-action>${n?a`<calcite-tooltip overlay-positioning=fixed placement=top .referenceElement=${n}>${r}</calcite-tooltip>`:void 0}</div>`}_renderNumericInputs(){let{rotation:e,spacing:i,effectiveSpacingAfterDynamicScaling:t,numericSpacingInputShouldBeVisible:r,gridControlsEnabled:n}=this,l=t!=null&&t!==i;return a`<div class=${d(g("numeric-inputs-container"))}>${[r?a`<calcite-label scale=s><span>${this._messages?.inputLabel?.spacing}${l?a`<calcite-icon class=${d(g("inline-icon"))} .icon=${m.warning} scale=s tabindex=0 ${u(this._setWarningIconRef)}></calcite-icon>`:void 0}</span><calcite-input-number .disabled=${!n} number-button-type=none .value=${i?.toFixed(2)} @calciteInputNumberChange=${({currentTarget:c})=>{let s=Number.parseFloat(c.value);this.spacing=s,s!==this.spacing&&(c.value=`${this.spacing}`)}}></calcite-input-number>${l&&this._warningIconTooltipRef?a`<calcite-tooltip overlay-positioning=fixed placement=leading .referenceElement=${this._warningIconTooltipRef}>${O(this._messages?.warnings?.dynamicSpacing??"",{actualSpacingIncludingUnit:t},{format:{actualSpacingIncludingUnit:{type:"number",intlOptions:{minimumFractionDigits:2,maximumFractionDigits:2,unit:this.unit??"meters",style:"decimal"}}}})}</calcite-tooltip>`:void 0}</calcite-label>`:void 0,a`<calcite-label scale=s>${this._messages?.inputLabel?.angle}<calcite-input-number .disabled=${!n} integer number-button-type=none suffix-text=\u00B0 .value=${`${D(e)}`} @calciteInputNumberChange=${({currentTarget:c})=>this.rotation=L(c.value)}></calcite-input-number></calcite-label>`]}</div>`}_renderIntervalInput(){let{majorLineInterval:e,gridControlsEnabled:i}=this;return a`<div class=${d(g("numeric-inputs-container"))}><calcite-label scale=s>${this._messages?.inputLabel?.interval}<calcite-input-number .disabled=${!i} integer max=15 min=1 number-button-type=vertical .value=${`${e}`} @calciteInputNumberChange=${({currentTarget:t})=>{let r=Number.parseInt(t.value,10);this.majorLineInterval=r,r!==this.majorLineInterval&&(t.value=`${this.majorLineInterval}`)}}></calcite-input-number></calcite-label></div>`}_renderSnappingToggle(){let{snappingOptions:e,gridControlsEnabled:i}=this,t=e?.gridEnabled??!1;return a`<arcgis-labeled-switch .checked=${t} .disabled=${!(i&&e)} .label=${this._messages?.switchLabel?.snap} @arcgisCheckedChanged=${r=>{r.stopPropagation(),this.snappingOptions?.set("gridEnabled",r.detail)}}></arcgis-labeled-switch>`}_renderDynamicScaleToggle(){let{_messages:e,gridOutOfScale:i,dynamicScaling:t,gridControlsEnabled:r}=this,n=!this.hideOutOfScaleWarning&&i;return a`<arcgis-labeled-switch .checked=${t} .disabled=${!r} .hint=${n?e?.warnings?.outOfScale:void 0} .hintIcon=${m.warning} hint-kind=warning .label=${e?.switchLabel?.scaling} @arcgisCheckedChanged=${l=>{l.stopPropagation(),this.dynamicScaling=l.detail}}></arcgis-labeled-switch>`}_renderRotateToggle(){let{gridControlsEnabled:e,rotateWithMap:i}=this;return a`<arcgis-labeled-switch .checked=${i} .disabled=${!e} .label=${this._messages?.switchLabel?.rotateWithMap??""} @arcgisCheckedChanged=${t=>{t.stopPropagation(),this.rotateWithMap=t.detail}}></arcgis-labeled-switch>`}_renderEnabledToggle(){return a`<div class="switch--bordered"><arcgis-labeled-switch .checked=${this.displayEnabled} .disabled=${!!this.interactivePlacementState} .label=${this._messages?.switchLabel?.display} @arcgisCheckedChanged=${e=>{e.stopPropagation(),this.trySetDisplayEnabled(e.detail)}}></arcgis-labeled-switch></div>`}_renderColorSelection(){let{customColor:e}=this;return a`<calcite-label scale=s>${this._messages?.inputLabel?.theme}<div class="tile-group">${[this._renderThemeTile({value:"dark"}),this._renderThemeTile({value:"light"}),this._renderThemeTile({value:"custom"}),this._themePopoverRef?a`<calcite-popover auto-close .label=${this._messages?.gridLineColorPopoverLabel??""} overlay-positioning=fixed .referenceElement=${this._themePopoverRef}><calcite-color-picker alpha-channel saved-disabled .value=${e?.toHex({digits:8})??"#000000ff"} @calciteColorPickerChange=${i=>{let t=p.fromHex(i.currentTarget.value);t&&(this.customColor=t,this.theme="custom")}}></calcite-color-picker></calcite-popover>`:void 0]}</div></calcite-label>`}_renderThemeTile(e){let{theme:i,gridControlsEnabled:t}=this,{value:r}=e,n=this._messages?.gridTheme?.[r],l=`${this._labelUid}--theme_tile_${r}`,c=`${l}__label`,s=m.gridTheme[r];return a`<div class=${d(g({tile:!0,disabled:!t}))} role=button ${u(r==="custom"?this._setPopoverRef:this._emptyFunction)}><input aria-labelledby=${c??h} .checked=${i===r} .disabled=${!t} id=${l??h} .name=${`${this._labelUid}--theme`} @change=${T=>{this.theme=r,T.currentTarget.focus()}} tabindex=0 type=radio><div class="content"><calcite-icon .icon=${s} scale=l></calcite-icon><calcite-label .for=${l} id=${c??h}>${n}</calcite-label></div></div>`}};S("arcgis-grid-controls",f);return f},"views/Theme","Color","intl","core/reactiveUtils","widgets/support/GridControls/GridControlsViewModel",b,c,e,f)
|
|
2
|
+
import f from"./3T7L7UT5.js";import{a as k}from"./2BVXNQ3U.js";import{a as _}from"./JD74LG7K.js";import e from"./2FM2FJAY.js";import c from"./YHNRTH56.js";import{g as C}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import b from"./SDWFNKIL.js";import"./QUZTFUWM.js";import{d as g}from"./4W3T75SY.js";import{A as y,M as u,N as $,O as d,Q as h,T as S,a as w,b as a,w as x}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([P,p,{substitute:O},{watch:R},z,,,,M])=>{function D(o){if(o==null||Number.isNaN(o))return 0;let e=o+180;return Math.trunc(E(e,360))}function L(o){let e=o;return e==null||(typeof e=="string"&&(e=Number.parseInt(e,10)),Number.isNaN(e))?0:E(Math.trunc(e),360)-180}function E(o,e){return(o%e+e)%e}var I={fromAttribute:o=>p.fromHex(o),toAttribute:o=>typeof o=="string"?o:o?.toHex()??""},B=w`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}:host{display:flex}.root{user-select:none;display:flex;flex-flow:column wrap;padding:var(--arcgis-internal-padding);overflow-y:auto;width:100%;.container{display:flex;flex:1 1 auto;flex-direction:column;gap:var(--calcite-spacing-sm)}.numeric-inputs-container{display:grid;grid-auto-columns:1fr;grid-auto-flow:column;gap:var(--calcite-spacing-sm)}arcgis-labeled-switch{margin-block-end:var(--calcite-spacing-sm)}.switch--bordered{border-width:0 0 var(--calcite-spacing-px) 0;border-style:solid;border-color:var(--calcite-color-border-1);padding-block-end:var(--calcite-spacing-sm)}.tile-group{display:flex;column-gap:var(--calcite-spacing-md);align-items:start;margin-bottom:calc(0px - var(--calcite-spacing-sm))}.tile{position:relative;.content{display:flex;flex-direction:column;row-gap:var(--calcite-spacing-md);align-items:center;padding:var(--calcite-spacing-md);color:var(--calcite-color-text-2)}&.disabled{opacity:var(--calcite-opacity-disabled)}&:focus-within{outline:var(--calcite-spacing-base) solid var(--calcite-color-brand);outline-offset:var(--calcite-spacing-base)}input[type=radio]{appearance:none;position:absolute;inset:0;opacity:.001;border:var(--calcite-spacing-px) solid transparent;cursor:pointer;&:checked+.content{border:var(--calcite-spacing-px) solid var(--calcite-color-brand)}+.content{border:var(--calcite-spacing-px) solid transparent;calcite-label{margin-bottom:calc(0px - var(--calcite-label-margin-bottom, .75rem));font-weight:var(--calcite-font-weight-medium)}}}}.inline-icon{margin-left:var(--calcite-spacing-xs);vertical-align:top;color:var(--calcite-color-status-warning)}}`,m={componentIcon:"grid-unit",gridTheme:{light:"circle",dark:"circle-area",custom:"palette"},placementState:{interactive:"maximum-territory-distance",place:"move",rotate:"rotate"},warning:"exclamation-mark-triangle"},b=p.fromArray([115,115,115]),v=p.fromArray([200,200,200]),N=["interactive","place","rotate"],W=M(z),f=class extends ${constructor(){super(...arguments),this._labelUid=y(),this._messages=k({}),this._viewModel=W(this),this._placementModeButtonRefs=new Map,this.numericSpacingInputShouldBeVisible=this._viewModel.numericSpacingInputShouldBeVisible,this.view=this._viewModel.view,this.icon=m.componentIcon,this.snappingOptions=this._viewModel.snappingOptions,this.hideColorSelection=!1,this.hideDynamicScaleToggle=!1,this.hideGridEnabledToggle=!1,this.hideNumericInputs=!1,this.hideGridSnapEnabledToggle=!1,this.hideLineIntervalInput=!1,this.hideOutOfScaleWarning=!1,this.hidePlacementButtons=!1,this.hideRotateWithMapToggle=!1,this.rotation=this._viewModel.rotation,this.rotateWithMap=this._viewModel.rotateWithMap,this.spacing=this._viewModel.spacing,this.majorLineInterval=this._viewModel.majorLineInterval,this.gridColor=this._viewModel.gridColor,this.displayEnabled=this._viewModel.displayEnabled,this.gridOutOfScale=this._viewModel.gridOutOfScale,this.unit=this._viewModel.unit,this.dynamicScaling=this._viewModel.dynamicScaling,this.gridControlsEnabled=this._viewModel.gridControlsEnabled,this.interactivePlacementState=this._viewModel.interactivePlacementState,this.snappingEnabled=this._viewModel.snappingEnabled,this.effectiveSpacingAfterDynamicScaling=this._viewModel.effectiveSpacingAfterDynamicScaling,this.placementDisabled=this._viewModel.placementDisabled,this.autoDestroyDisabled=!1,this.arcgisPropertyChange=C()("customColor","theme","spacing","rotation","majorLineInterval","rotateWithMap","dynamicScaling","snappingEnabled","interactivePlacementState","displayEnabled","gridOutOfScale","effectiveSpacingAfterDynamicScaling","gridControlsEnabled","gridColor"),this.arcgisReady=x()}static{this.properties={_placementModeButtonRefs:16,_warningIconTooltipRef:16,_themePopoverRef:16,numericSpacingInputShouldBeVisible:16,view:0,referenceElement:1,icon:1,customColor:[3,{converter:I}],snappingOptions:0,theme:1,hideColorSelection:5,hideDynamicScaleToggle:5,hideGridEnabledToggle:5,hideNumericInputs:5,hideGridSnapEnabledToggle:5,hideLineIntervalInput:5,hideOutOfScaleWarning:5,hidePlacementButtons:5,hideRotateWithMapToggle:5,rotation:11,rotateWithMap:5,spacing:11,majorLineInterval:11,gridColor:[3,{converter:I}],displayEnabled:36,gridOutOfScale:39,unit:1,dynamicScaling:5,gridControlsEnabled:36,interactivePlacementState:3,snappingEnabled:5,effectiveSpacingAfterDynamicScaling:43,placementDisabled:5,autoDestroyDisabled:5,messageOverrides:0,label:1}}static{this.styles=B}get theme(){let e=this.gridColor;return!e||b.equals(e)?"dark":v.equals(e)?"light":"custom"}set theme(e){let i=this._viewModel.view;switch(e){case"dark":this.gridColor=b;break;case"custom":this.customColor==null&&(this.customColor=i?.theme?.accentColor??new P().accentColor),this.gridColor=this.customColor;break;default:this.gridColor=v;break}}async destroy(){await this.manager.destroy()}trySetDisplayEnabled(e){this._viewModel.trySetDisplayEnabled(e)}loaded(){this.manager.onLifecycle(()=>[R(()=>this._viewModel.gridColor,e=>{let i=e instanceof p?e:typeof e=="string"?p.fromHex(e):null;i&&!b.equals(e)&&!v.equals(i)?this.customColor=i:b.equals(i)?this.theme="dark":v.equals(i)&&(this.theme="light")})])}_togglePlacementState(e){this.interactivePlacementState=this.interactivePlacementState===e?null:e}_setWarningIconRef(e){this._warningIconTooltipRef=e}_setPopoverRef(e){this._themePopoverRef=e}_emptyFunction(e){}_setPlacementButtonRef(e){if(e){let i=e.dataset.placementAction;this._placementModeButtonRefs.set(i,e)}else this._placementModeButtonRefs.clear()}render(){return a`<div class=${d(g("root",_.widget,_.panel))}><div class="container">${this._viewModel.destroyed?null:this._renderContent()}</div></div>`}_renderContent(){let{hideGridEnabledToggle:e,hidePlacementButtons:i,hideNumericInputs:t,hideLineIntervalInput:r,hideGridSnapEnabledToggle:n,hideDynamicScaleToggle:l,hideRotateWithMapToggle:c,hideColorSelection:s}=this;return[e?void 0:this._renderEnabledToggle(),i?void 0:this._renderGridPlacementButtons(),t?void 0:this._renderNumericInputs(),r?void 0:this._renderIntervalInput(),!n&&this.snappingOptions?this._renderSnappingToggle():void 0,l?void 0:this._renderDynamicScaleToggle(),c?void 0:this._renderRotateToggle(),s?void 0:this._renderColorSelection()]}_renderGridPlacementButtons(){let{interactivePlacementState:e,placementDisabled:i,gridControlsEnabled:t}=this,r=i||!t;return a`<calcite-label scale=s>${this._messages.placementOptions}<calcite-action-bar expand-toggle-disabled layout=horizontal>${N.map(n=>this._renderPlacementModeButton(n,r,e))}</calcite-action-bar></calcite-label>`}_renderPlacementModeButton(e,i,t){let r=this._messages?.placementState?.[e],n=this._placementModeButtonRefs.get(e);return a`<div><calcite-action .active=${t===e} alignment=center .disabled=${i} .icon=${m.placementState[e]} data-placement-action=${e??h} @click=${()=>this._togglePlacementState(e)} .text=${r??""} ${u(this._setPlacementButtonRef)}></calcite-action>${n?a`<calcite-tooltip overlay-positioning=fixed placement=top .referenceElement=${n}>${r}</calcite-tooltip>`:void 0}</div>`}_renderNumericInputs(){let{rotation:e,spacing:i,effectiveSpacingAfterDynamicScaling:t,numericSpacingInputShouldBeVisible:r,gridControlsEnabled:n}=this,l=t!=null&&t!==i;return a`<div class=${d(g("numeric-inputs-container"))}>${[r?a`<calcite-label scale=s><span>${this._messages?.inputLabel?.spacing}${l?a`<calcite-icon class=${d(g("inline-icon"))} .icon=${m.warning} scale=s tabindex=0 ${u(this._setWarningIconRef)}></calcite-icon>`:void 0}</span><calcite-input-number .disabled=${!n} number-button-type=none .value=${i?.toFixed(2)} @calciteInputNumberChange=${({currentTarget:c})=>{let s=Number.parseFloat(c.value);this.spacing=s,s!==this.spacing&&(c.value=`${this.spacing}`)}}></calcite-input-number>${l&&this._warningIconTooltipRef?a`<calcite-tooltip overlay-positioning=fixed placement=leading .referenceElement=${this._warningIconTooltipRef}>${O(this._messages?.warnings?.dynamicSpacing??"",{actualSpacingIncludingUnit:t},{format:{actualSpacingIncludingUnit:{type:"number",intlOptions:{minimumFractionDigits:2,maximumFractionDigits:2,unit:this.unit??"meters",style:"decimal"}}}})}</calcite-tooltip>`:void 0}</calcite-label>`:void 0,a`<calcite-label scale=s>${this._messages?.inputLabel?.angle}<calcite-input-number .disabled=${!n} integer number-button-type=none suffix-text=\u00B0 .value=${`${D(e)}`} @calciteInputNumberChange=${({currentTarget:c})=>this.rotation=L(c.value)}></calcite-input-number></calcite-label>`]}</div>`}_renderIntervalInput(){let{majorLineInterval:e,gridControlsEnabled:i}=this;return a`<div class=${d(g("numeric-inputs-container"))}><calcite-label scale=s>${this._messages?.inputLabel?.interval}<calcite-input-number .disabled=${!i} integer max=15 min=1 number-button-type=vertical .value=${`${e}`} @calciteInputNumberChange=${({currentTarget:t})=>{let r=Number.parseInt(t.value,10);this.majorLineInterval=r,r!==this.majorLineInterval&&(t.value=`${this.majorLineInterval}`)}}></calcite-input-number></calcite-label></div>`}_renderSnappingToggle(){let{snappingOptions:e,gridControlsEnabled:i}=this,t=e?.gridEnabled??!1;return a`<arcgis-labeled-switch .checked=${t} .disabled=${!(i&&e)} .label=${this._messages?.switchLabel?.snap} @arcgisCheckedChanged=${r=>{r.stopPropagation(),this.snappingOptions?.set("gridEnabled",r.detail)}}></arcgis-labeled-switch>`}_renderDynamicScaleToggle(){let{_messages:e,gridOutOfScale:i,dynamicScaling:t,gridControlsEnabled:r}=this,n=!this.hideOutOfScaleWarning&&i;return a`<arcgis-labeled-switch .checked=${t} .disabled=${!r} .hint=${n?e?.warnings?.outOfScale:void 0} .hintIcon=${m.warning} hint-kind=warning .label=${e?.switchLabel?.scaling} @arcgisCheckedChanged=${l=>{l.stopPropagation(),this.dynamicScaling=l.detail}}></arcgis-labeled-switch>`}_renderRotateToggle(){let{gridControlsEnabled:e,rotateWithMap:i}=this;return a`<arcgis-labeled-switch .checked=${i} .disabled=${!e} .label=${this._messages?.switchLabel?.rotateWithMap??""} @arcgisCheckedChanged=${t=>{t.stopPropagation(),this.rotateWithMap=t.detail}}></arcgis-labeled-switch>`}_renderEnabledToggle(){return a`<div class="switch--bordered"><arcgis-labeled-switch .checked=${this.displayEnabled} .disabled=${!!this.interactivePlacementState} .label=${this._messages?.switchLabel?.display} @arcgisCheckedChanged=${e=>{e.stopPropagation(),this.trySetDisplayEnabled(e.detail)}}></arcgis-labeled-switch></div>`}_renderColorSelection(){let{customColor:e}=this;return a`<calcite-label scale=s>${this._messages?.inputLabel?.theme}<div class="tile-group">${[this._renderThemeTile({value:"dark"}),this._renderThemeTile({value:"light"}),this._renderThemeTile({value:"custom"}),this._themePopoverRef?a`<calcite-popover auto-close .label=${this._messages?.gridLineColorPopoverLabel??""} overlay-positioning=fixed .referenceElement=${this._themePopoverRef}><calcite-color-picker alpha-channel saved-disabled .value=${e?.toHex({digits:8})??"#000000ff"} @calciteColorPickerChange=${i=>{let t=p.fromHex(i.currentTarget.value);t&&(this.customColor=t,this.theme="custom")}}></calcite-color-picker></calcite-popover>`:void 0]}</div></calcite-label>`}_renderThemeTile(e){let{theme:i,gridControlsEnabled:t}=this,{value:r}=e,n=this._messages?.gridTheme?.[r],l=`${this._labelUid}--theme_tile_${r}`,c=`${l}__label`,s=m.gridTheme[r];return a`<div class=${d(g({tile:!0,disabled:!t}))} role=button ${u(r==="custom"?this._setPopoverRef:this._emptyFunction)}><input aria-labelledby=${c??h} .checked=${i===r} .disabled=${!t} id=${l??h} .name=${`${this._labelUid}--theme`} @change=${T=>{this.theme=r,T.currentTarget.focus()}} tabindex=0 type=radio><div class="content"><calcite-icon .icon=${s} scale=l></calcite-icon><calcite-label .for=${l} id=${c??h}>${n}</calcite-label></div></div>`}};S("arcgis-grid-controls",f);return f},"views/Theme","Color","intl","core/reactiveUtils","widgets/support/GridControls/GridControlsViewModel",b,c,e,f)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import k from"./MZWO5JYA.js";import j from"./FHWOIM57.js";import"./VJVKFKSG.js";import{a as $}from"./2BVXNQ3U.js";import i from"./YHNRTH56.js";import"./3AQ6NC3C.js";import"./A4X5YDA6.js";import e from"./SDWFNKIL.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{A as w,N as x,Q as g,T as f,a as b,b as a,o as c,q as h,w as d}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([{getOwningPortalUrl:C,hasUserTypeExtension:I},{on:E,watch:T,whenOnce:L},D,{getVersioningStates:q},,{a:_},{a:k,b:l,d:N,e:V},{c:v}])=>{var B=b`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host{display:flex;flex-direction:column;height:var(--arcgis-internal-panel-height, 100%)}calcite-block{margin:0;border-bottom:none}calcite-combobox{margin-bottom:var(--calcite-spacing-sm)}calcite-icon{width:32px}`,p={noDirtyAreasInExtent:-2147208940,operationOnlyAllowedByOwner:-2147217144,cannotAcquireVersionLockV10:-2147217146,cannotAcquireVersionLockV11:-2147220947},m=class extends x{constructor(){super(...arguments),this._messages=$({blocking:!0}),this.#o=`unvnt_${w()}`,this.disabled=!1,this.disableExecuteOnDefaultVersion=!1,this.extentToValidate="current",this.hideUtilityNetworkSelect=!1,this.state={type:"disabled"},this.view=_(this),this.arcgisReady=d(),this.arcgisValidateNetworkTopologyEnd=d(),this.arcgisValidateNetworkTopologyStart=d()}static{this.properties={beforeValidateNetworkTopologyStart:0,disabled:5,disableExecuteOnDefaultVersion:5,extentToValidate:1,hideUtilityNetworkSelect:5,label:1,messageOverrides:0,referenceElement:1,result:0,state:0,utilityNetwork:0,view:0}}static{this.styles=B}get#n(){return`${this.#o}_execute-action`}get#r(){return this._messages.actions.validateTopology+(this.extentToValidate==="current"?` ${this._messages.input.selectExtent.options.currentExtent.toLowerCase()}`:` ${this._messages.input.selectExtent.options.entireExtent.toLowerCase()}`)}get#h(){return this.#a.isDefault}get#d(){return this.#a?.currentVersionInfo?.access==="protected"}get#g(){return this.#i?.privileges?.includes("features:user:manageVersions")??!1}get#p(){let e=this.#a?.currentVersionInfo?.versionIdentifier.name;return e?.substring(0,e.lastIndexOf("."))?.toUpperCase()===this.#i?.username?.toUpperCase()}#i;#s;#o;#e;get#a(){return this.#l?.find(e=>e.featureServiceUrl===this.utilityNetwork?.featureServiceUrl)}#l;async load(){this.manager.onLifecycle(()=>[E(()=>this.view?.map?.allLayers,"change",e=>{let t=e.added.concat(e.removed);this.#c(t)&&this.#t()}),E(()=>this.view?.map?.utilityNetworks,"change",()=>{this.#t()}),T(()=>this.utilityNetwork?.gdbVersion,()=>{L(()=>this.utilityNetwork?.gdbVersion===this.#a?.currentVersionInfo?.versionIdentifier.name).then(()=>{this.#t()})}),T(()=>this.view,()=>{this.#t()},{initial:!0})])}#c(e){let t=this.utilityNetwork?.networkSystemLayers.dirtyAreasLayerUrl;if(t)return e.find(i=>v(i)&&`${i.url}/${i.layerId}`===t)}async#u(){try{if(this.result=void 0,!this.view){this.state={type:"error-disable-component",message:this._messages.errors.noView};return}if(!this.utilityNetwork){this.state={type:"error-disable-component",message:this._messages.errors.noUtilityNetworks};return}this.beforeValidateNetworkTopologyStart&&await this.beforeValidateNetworkTopologyStart();let{view:e,utilityNetwork:t}=this;if(!e){this.state={type:"error-disable-component",message:this._messages.errors.noView};return}if(!t){this.state={type:"error-disable-component",message:this._messages.errors.noUtilityNetwork},c("warn",this,h("utilityNetwork"));return}if(this.arcgisValidateNetworkTopologyStart.emit().defaultPrevented){c("info",this,this._messages.info.validateCanceled);return}this.state={type:"executing"};let i={outSpatialReference:e.spatialReference?.clone()||null,validateArea:this.extentToValidate==="current"||!t.fullExtent?e.extent.clone():t.fullExtent.clone()};this.result=await t.validateTopology(i),this.state={type:"success",message:this._messages.status.success}}catch(e){let{_messages:{errors:{cannotAcquireVersionLock:t,noDirtyAreasInExtent:i,operationOnlyAllowedByOwner:o}}}=this;this.result=void 0;let r=e,s=r.details?.raw?.extendedCode,n=r.message||this._messages.info.validateCanceled;switch(s){case p.noDirtyAreasInExtent:n=i;break;case p.cannotAcquireVersionLockV10:case p.cannotAcquireVersionLockV11:n=t;break;case p.operationOnlyAllowedByOwner:n=o;break}this.state={type:"error-info",message:n}}finally{this.arcgisValidateNetworkTopologyEnd.emit()}}async#t(){this.#s?.abort();let e=V(async t=>{this.state={type:"loading"},this.result=void 0;let{view:i}=this;if(!i){this.utilityNetwork=void 0,this.state={type:"error-disable-component",message:this._messages.errors.noView},c("warn",this,h("view"));return}if(i.type!=="2d"){this.utilityNetwork=void 0,this.state={type:"error-disable-component",message:this._messages.errors.sceneViewNotSupported};return}let o=i.map;await o.load({signal:t}),l(t);let r=o.utilityNetworks??null;if(!r?.length){this.utilityNetwork=void 0,this.state={type:"error-disable-component",message:this._messages.errors.noUtilityNetworks};return}let s=this.utilityNetwork;if((!s||!r.find(O=>O.id===s?.id))&&(s=r.getItemAt(0)),!s){this.state={type:"error-disable-component",message:this._messages.errors.noUtilityNetworks},c("warn",this,h("utilityNetwork"));return}await s.load({signal:t}),l(t);let n=(Number(s.sourceJSON.currentVersion)||0)<=11.1?"utilityNetwork":"advediting",A=await C(s.layerUrl,{signal:t})??void 0;l(t);let u=new D({url:A});await u.load({signal:t}),l(t),this.#i=u.user;let U=this.#i?.username??"",S=await I(u,U,n);if(l(t),this.#e=r,this.utilityNetwork=s,!S){this.state=n==="advediting"?{type:"error-disable-execute",message:this._messages.errors.noAdvancedEditingUserTypeExtension}:{type:"error-disable-execute",message:this._messages.errors.noUtilityNetworkServiceUserTypeExtension};return}let y=this.#c(o.allLayers.toArray());if(!y){this.state={type:"error-disable-execute",message:this._messages.errors.noDirtyAreasLayer};return}if(await y.load({signal:t}),l(t),this.#l=await q(this.view,!1),this.#h&&this.disableExecuteOnDefaultVersion){this.state={type:"error-disable-execute",message:this._messages.errors.operationDisabledOnDefaultVersion};return}if(this.#d&&!this.#p&&!this.#g){this.state={type:"error-disable-execute",message:this._messages.errors.operationOnlyAllowedByOwner};return}this.state={type:"ready"}});this.#s=e;try{await e.promise}catch(t){if(N(t))return;this.state={type:"error-disable-execute",message:this._messages.errors.utilityNetworkLoadFailed},k(t,this,this.state.message)}finally{this.#s===e&&(this.#s=void 0)}}_renderExtentToValidateCombobox(){if(this.state.type!=="error-disable-component")return a`<calcite-combobox .disabled=${this.disabled||this.state.type==="disabled"||this.state.type==="executing"} .label=${this._messages.input.selectExtent.label} .labelText=${this._messages.input.selectExtent.label} selection-mode=single-persist @calciteComboboxChange=${e=>{this.extentToValidate=e.target.value}}><calcite-combobox-item .heading=${this._messages.input.selectExtent.options.currentExtent} .selected=${this.extentToValidate==="current"} value=current></calcite-combobox-item><calcite-combobox-item .heading=${this._messages.input.selectExtent.options.entireExtent} .selected=${this.extentToValidate==="entire"} value=entire></calcite-combobox-item></calcite-combobox>`}_renderInfoNotice(){if(this.state.type==="error-disable-component"||this.state.type==="error-disable-execute"||this.state.type==="error-info"||this.state.type==="success")return a`<calcite-notice .closable=${this.state.type==="error-info"||this.state.type==="success"} .kind=${this.state.type==="success"?"success":"warning"} open scale=s width=full @calciteNoticeClose=${()=>this.state={type:"ready"}}><div slot=message>${this.state.message}</div></calcite-notice>`}_renderStatusIcon(){let e=`${this.#o}_status-icon`;switch(this.state.type){case"error-disable-component":case"error-disable-execute":case"error-info":return a`<calcite-icon icon=exclamation-mark-triangle id=${e??g} scale=s slot=actions-end></calcite-icon>`;case"executing":return a`<calcite-action loading disabled slot=actions-end .text=${this._messages.status.executing}></calcite-action>`;case"success":return a`<calcite-icon icon=check-circle id=${e??g} scale=s slot=actions-end></calcite-icon>`;default:return a`<calcite-icon icon=blank scale=m slot=actions-end></calcite-icon>`}}_renderUtilityNetworkCombobox(){if(!(!this.#e||this.#e?.length===1||this.state.type==="error-disable-component"||this.hideUtilityNetworkSelect))return a`<calcite-combobox .disabled=${this.state.type==="executing"} .label=${this._messages.input.selectUtilityNetwork.label} .labelText=${this._messages.input.selectUtilityNetwork.label} selection-mode=single-persist @calciteComboboxChange=${e=>{let t=e.target.value;this.utilityNetwork=this.#e?.find(i=>i.id===t),this.#t()}}>${this.#e.map(e=>a`<calcite-combobox-item .heading=${e.title} .selected=${e===this.utilityNetwork} .value=${e.id}></calcite-combobox-item>`)}</calcite-combobox>`}_renderValidateNetworkTopologyAction(){if(this.state.type!=="error-disable-component")return a`<calcite-action .disabled=${this.disabled||this.state.type==="disabled"||this.state.type==="error-disable-execute"||this.state.type==="executing"} icon=play-f id=${this.#n??g} .label=${this.#r} slot=actions-end .text=${this.#r} @click=${this.#u}></calcite-action>`}_renderValidateNetworkTopologyActionTooltip(){if(this.state.type!=="error-disable-component")return a`<calcite-tooltip .referenceElement=${this.#n}><span>${this.#r}</span></calcite-tooltip>`}render(){let e=this._renderStatusIcon(),t=this._renderValidateNetworkTopologyAction(),i=this._renderValidateNetworkTopologyActionTooltip(),o=this._renderUtilityNetworkCombobox(),r=this._renderExtentToValidateCombobox(),s=this._renderInfoNotice();return a`<calcite-panel .loading=${this.state.type==="loading"}><calcite-block collapsible expanded .heading=${this.label}>${e}${t}${o}${r}${s}</calcite-block>${i}</calcite-panel>`}};f("arcgis-utility-network-validate-network-topology",m);return m},"applications/Components/featureUtils","core/reactiveUtils","portal/Portal","versionManagement/utils",e,i,j,k)
|