@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 as l,T as b,a as o,b as i,w as g}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([,{watch:d}])=>{var x=o`:host{--arcgis-internal-presentation-background-opacity: .6}.captions-container{width:100%;height:100%;padding-inline-start:var(--arcgis-internal-presentation-padding-start);padding-inline-end:var(--arcgis-internal-presentation-padding-end)}.captions{height:auto;position:relative;box-sizing:border-box;transition:padding .05s ease-in 0s;min-height:48px;max-width:max(400px,40%);padding:12px 16px;&:before{content:"";position:absolute;inset-block:-16px -144px;inset-inline:calc(-64px - var(--arcgis-internal-presentation-padding-start)) calc(0px - max(360px,32vw));background:var(--caption-gradient);mask:var(--caption-gradient-mask-before);opacity:var(--arcgis-internal-presentation-background-opacity);z-index:-1}&:after{content:"";position:absolute;inset:-32px;z-index:-2;background-color:#fff0;mask:var(--caption-gradient-mask-after);mask-mode:luminance;mask-composite:intersect;background-size:cover;backdrop-filter:blur(2px);opacity:var(--calcite-opacity-dark)}}:dir(rtl) .captions{&:before{mask:var(--caption-gradient-mask-before-RTL)}}.title{text-wrap:pretty;text-align:start;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;text-shadow:var(--title-text-shadow);font-size:var(--caption-title-font-size);font-family:Avenir Next World,sans-serif;font-style:normal;font-weight:var(--calcite-font-weight-bold);line-height:var(--calcite-font-line-height-relative-snug);margin-bottom:2px;color:var(--calcite-color-text-1)}.captions-description{text-wrap:pretty;text-align:start;overflow:hidden;text-overflow:ellipsis;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:5;line-clamp:5;text-shadow:var(--description-text-shadow);font-size:var(--caption-description-font-size);font-style:normal;font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug);color:var(--calcite-color-text-1)}.cover-container{width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:space-evenly;padding-block-start:calc(var(--arcgis-internal-presentation-cover-padding-top) + var(--calcite-space-lg));padding-block-end:calc(var(--arcgis-internal-presentation-cover-padding-bottom) + var(--calcite-space-lg))}.cover{display:flex;flex-direction:column;align-items:center;justify-content:center;padding-inline:8px;min-height:88px;min-width:200px;position:relative;padding-inline-start:16px;padding-inline-end:16px;opacity:1;transition:opacity .25s,color .25s;&:before{content:"";position:absolute;inset:calc(0vw - max(320px,12vw,18vh)) calc(0vw - max(320px,24vw));border-radius:120px;background:var(--cover-gradient-before);mask:var(--cover-mask-before);opacity:var(--arcgis-internal-presentation-background-opacity);z-index:-1}&:after{content:"";position:absolute;inset:-32px;z-index:-2;background-color:#fff0;mask:var(--cover-mask-after);mask-mode:luminance;mask-composite:intersect;background-size:cover;backdrop-filter:blur(2px);opacity:var(--calcite-opacity-dark)}}.cover-description{text-wrap:pretty;text-align:center;text-shadow:var(--description-text-shadow);font-size:var(--cover-description-font-size);font-style:normal;font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-snug);display:-webkit-box;max-width:75ch;overflow-wrap:break-word;overflow:hidden;text-overflow:ellipsis;-webkit-box-orient:vertical;-webkit-line-clamp:5;line-clamp:5;color:var(--calcite-color-text-1)}:host{width:100%;height:100%;position:absolute;top:0;left:0;display:flex;align-items:flex-start;box-sizing:border-box;--caption-gradient: linear-gradient( 180deg, rgb(255 255 255 / 100%) 0%, rgb(255 255 255 / 98.3%) 8.1%, rgb(255 255 255 / 95%) 15.5%, rgb(255 255 255 / 90%) 22.5%, rgb(255 255 255 / 83.3%) 29%, rgb(255 255 255 / 73.3%) 35%, rgb(255 255 255 / 65%) 41%, rgb(255 255 255 / 55%) 47%, rgb(255 255 255 / 45%) 53%, rgb(255 255 255 / 35%) 59%, rgb(255 255 255 / 26.7%) 65%, rgb(255 255 255 / 18.3%) 71%, rgb(255 255 255 / 10%) 77%, rgb(255 255 255 / 4%) 84.5%, rgb(255 255 255 / 1%) 91%, rgb(255 255 255 / 0%) 100% );--title-text-shadow: 0 1px 1px #fff3, 0 0 3px #fff2, 0 0 6px #fff2;--caption-gradient-mask-before: linear-gradient( 90deg, rgb(255 255 255 / 100%) 30%, rgb(255 255 255 / 98.3%) 35.6%, rgb(255 255 255 / 95%) 41%, rgb(255 255 255 / 90%) 46%, rgb(255 255 255 / 83.3%) 50.3%, rgb(255 255 255 / 73.3%) 54.5%, rgb(255 255 255 / 65%) 58.7%, rgb(255 255 255 / 55%) 62.9%, rgb(255 255 255 / 45%) 67%, rgb(255 255 255 / 35%) 71%, rgb(255 255 255 / 26.7%) 75.5%, rgb(255 255 255 / 18.3%) 80%, rgb(255 255 255 / 10%) 84%, rgb(255 255 255 / 4%) 89%, rgb(255 255 255 / 1%) 94%, rgb(255 255 255 / 0%) 100% );--caption-gradient-mask-before-RTL: linear-gradient( 270deg, rgb(255 255 255 / 100%) 30%, rgb(255 255 255 / 98.3%) 35.6%, rgb(255 255 255 / 95%) 41%, rgb(255 255 255 / 90%) 46%, rgb(255 255 255 / 83.3%) 50.3%, rgb(255 255 255 / 73.3%) 54.5%, rgb(255 255 255 / 65%) 58.7%, rgb(255 255 255 / 55%) 62.9%, rgb(255 255 255 / 45%) 67%, rgb(255 255 255 / 35%) 71%, rgb(255 255 255 / 26.7%) 75.5%, rgb(255 255 255 / 18.3%) 80%, rgb(255 255 255 / 10%) 84%, rgb(255 255 255 / 4%) 89%, rgb(255 255 255 / 1%) 94%, rgb(255 255 255 / 0%) 100% );--caption-gradient-mask-after: linear-gradient( 90deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 180deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 270deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 0deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% );--description-text-shadow: 0 .5px .5px #fff2, 0 1px 1px #fff2, 0 0 8px #fff2;--caption-title-font-size: max(var(--calcite-font-size-2xl), calc(18px + .64vw) );--caption-description-font-size: max(var(--calcite-font-size), calc(10px + .4vw) );--cover-description-font-size: max(var(--calcite-font-size-md), calc(10px + .5vw) );--cover-gradient-before: linear-gradient( 0deg, rgb(255 255 255 / 0%) 0, rgb(255 255 255 / 1%) 4%, rgb(255 255 255 / 4%) 7.7%, rgb(255 255 255 / 10%) 11.2%, rgb(255 255 255 / 18.3%) 14.5%, rgb(255 255 255 / 26.7%) 17.5%, rgb(255 255 255 / 35%) 20.5%, rgb(255 255 255 / 45%) 23.5%, rgb(255 255 255 / 55%) 26.5%, rgb(255 255 255 / 65%) 29.5%, rgb(255 255 255 / 73.3%) 32.5%, rgb(255 255 255 / 83.3%) 35.5%, rgb(255 255 255 / 90%) 38.5%, rgb(255 255 255 / 95%) 42.2%, rgb(255 255 255 / 98.3%) 46%, rgb(255 255 255 / 100%) 50%, rgb(255 255 255 / 98.3%) 54%, rgb(255 255 255 / 95%) 57.8%, rgb(255 255 255 / 90%) 61.5%, rgb(255 255 255 / 83.3%) 64.5%, rgb(255 255 255 / 73.3%) 67.5%, rgb(255 255 255 / 65%) 70.5%, rgb(255 255 255 / 55%) 73.5%, rgb(255 255 255 / 45%) 76.5%, rgb(255 255 255 / 35%) 79.5%, rgb(255 255 255 / 26.7%) 82.5%, rgb(255 255 255 / 18.3%) 85.5%, rgb(255 255 255 / 10%) 88.8%, rgb(255 255 255 / 4%) 92.3%, rgb(255 255 255 / 1%) 96%, rgb(255 255 255 / 0%) 100% );--cover-mask-before: linear-gradient( 90deg, rgb(255 255 255 / 0%) 0, rgb(255 255 255 / 1%) 3.2%, rgb(255 255 255 / 4%) 6.2%, rgb(255 255 255 / 10%) 9%, rgb(255 255 255 / 18.3%) 11.6%, rgb(255 255 255 / 26.7%) 14%, rgb(255 255 255 / 35%) 16.4%, rgb(255 255 255 / 45%) 18.8%, rgb(255 255 255 / 55%) 21.2%, rgb(255 255 255 / 65%) 23.6%, rgb(255 255 255 / 73.3%) 26%, rgb(255 255 255 / 83.3%) 28.4%, rgb(255 255 255 / 90%) 30.8%, rgb(255 255 255 / 95%) 33.8%, rgb(255 255 255 / 98.3%) 36.8%, rgb(255 255 255 / 100%) 40%, rgb(255 255 255 / 100%) 60%, rgb(255 255 255 / 98.3%) 63.2%, rgb(255 255 255 / 95%) 66.2%, rgb(255 255 255 / 90%) 69.2%, rgb(255 255 255 / 83.3%) 71.6%, rgb(255 255 255 / 73.3%) 74%, rgb(255 255 255 / 65%) 76.4%, rgb(255 255 255 / 55%) 78.8%, rgb(255 255 255 / 45%) 81.2%, rgb(255 255 255 / 35%) 83.6%, rgb(255 255 255 / 26.7%) 86%, rgb(255 255 255 / 18.3%) 88.4%, rgb(255 255 255 / 10%) 91%, rgb(255 255 255 / 4%) 93.9%, rgb(255 255 255 / 1%) 96.8%, rgb(255 255 255 / 0%) 100% );--cover-mask-after: linear-gradient( 90deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 180deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 270deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% ), linear-gradient( 0deg, white calc(100% - 40px) , rgb(255 255 255 / 90%) calc(100% - 35px) , rgb(255 255 255 / 70%) calc(100% - 30px) , rgb(255 255 255 / 50%) calc(100% - 25px) , rgb(255 255 255 / 30%) calc(100% - 20px) , rgb(255 255 255 / 10%) calc(100% - 15px) , black 100% );--cover-gradient-phone: linear-gradient( 0deg, rgb(255 255 255 / 0%) .59%, rgb(255 255 255 / 4%) 4.94%, rgb(255 255 255 / 50%) 25.87%, rgb(255 255 255 / 70%) 37.02%, rgb(255 255 255 / 80%) 48.43%, rgb(255 255 255 / 70%) 60.34%, rgb(255 255 255 / 30%) 80.55%, rgb(255 255 255 / 4%) 93.22%, rgb(255 255 255 / 0%) 99.74% );.fadeOut{opacity:1!important}}`,s=50,p=256,a=class extends l{constructor(){super(...arguments),this.transitionActive=!1,this.autoDestroyDisabled=!1,this.arcgisReady=g()}static{this.properties={_appliedSlide:16,slide:0,transitionActive:5,autoDestroyDisabled:5}}static{this.styles=x}async destroy(){await this.manager.destroy()}loaded(){this.manager.onLifecycle(()=>d(()=>({slide:this.slide,transitionActive:this.transitionActive}),({slide:e,transitionActive:r})=>{r?this._appliedSlide=void 0:this._appliedSlide=e},{initial:!0}))}render(){let e=this._appliedSlide?.layout;if(!this._appliedSlide||!e||e==="none")return null;let r=this._appliedSlide.title?.text,t=this._appliedSlide.description?.text,c=r?.length&&r.length>s?`${r?.substring(0,s)}...`:r,n=t?.length&&t.length>p?`${t?.substring(0,p)}...`:t;return e==="caption"?this._renderCaptions(c,n):this._renderCover(c,n)}_renderCover(e,r){return i`<div class="cover-container"><div class="cover"><div class="title">${e}</div><div class="cover-description">${r}</div></div></div>`}_renderCaptions(e,r){return i`<div class="captions-container"><div class="captions"><div class="title">${e}</div><div class="captions-description">${r}</div></div></div>`}};b("arcgis-presentation-captions",a);return a},"core/accessorSupport/decorators","core/reactiveUtils")
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import c from"./7HL2TQ7E.js";import b from"./MZWO5JYA.js";import a from"./FHWOIM57.js";import{a as A}from"./VJVKFKSG.js";import{g as y}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{N as F,R as _,T as p,a as m,b as n,n as d}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([w,I,v,{getDisplayedSymbol:b},{stripHTML:x},{watch:h},{d:C},,{d:f}])=>{var $=m`calcite-notice{padding:var(--calcite-space-lg)}`,l=class extends F{constructor(){super(...arguments),this._aggregatedGraphicsSet=new Set,this.aggregatedFeatureCount=0,this.selectedAggregatedFeatureIndex=-1,this.aggregatedFeatureItems=[],this.aggregatedFeatures=[],this.autoDestroyDisabled=!1,this.chartAnimationDisabled=!1,this.defaultPopupTemplateEnabled=!1,this.headingLevel=2,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.loading=!1,this.selectedAggregateBoundaryFeature=new I({symbol:new v({outline:{width:1.5,color:"cyan"},style:"none"})}),this.arcgisPropertyChange=y()("aggregatedFeatureCount","selectedAggregatedFeatureIndex","aggregatedFeatureItems","aggregatedFeatures","loading"),this._renderableAggregatedFeatureItems=[]}static{this.properties={_abortController:16,aggregatedFeatureCount:32,selectedAggregatedFeatureIndex:32,aggregatedFeatureItems:32,aggregatedFeatures:32,autoDestroyDisabled:5,chartAnimationDisabled:5,defaultPopupTemplateEnabled:5,headingLevel:9,location:0,messageOverrides:0,hideHeading:5,hideContent:5,hideAttachmentsContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,showRelationshipContent:5,hideTextContent:5,showUtilityNetworkContent:5,hideLastEditedInfo:5,feature:0,flowItems:0,loading:32,map:0,messages:0,selectedAggregateBoundaryFeature:32,spatialReference:0,timeZone:1,view:0}}static{this.styles=$}async destroy(){await this.manager.destroy(),this._cancelQuery(),this._clearAggregatedFeatureItems(),this._removeAggregateBoundaryFeature()}async next(){await this._selectRelativeAggregatedFeature(1)}async previous(){await this._selectRelativeAggregatedFeature(-1)}loaded(){this.manager.onLifecycle(()=>[h(()=>[this.feature,this.view],()=>{this._updateAggregatedFeatures()},{initial:!0}),h(()=>this._getAggregatedFeatureItemsHeadingSignature(),()=>this.requestUpdate()),h(()=>this.flowItems?.length,()=>{let{flowItems:e}=this,t=e?.getItemAt((e.length??0)-1)?.graphic??void 0;this._setSelectedAggregatedFeatureIndex(t?this.aggregatedFeatures.indexOf(t):-1),this._removeSelectedAggregatedFeature(),t&&this._aggregatedGraphicsSet.has(t)&&this._addSelectedAggregatedFeature(t)})])}disconnectedCallback(){super.disconnectedCallback(),this._cancelQuery(),this._clearAggregatedFeatureItems(),this._removeAggregateBoundaryFeature()}_setAggregatedFeatureCount(e){d(()=>this.aggregatedFeatureCount=e)}_setSelectedAggregatedFeatureIndex(e){d(()=>this.selectedAggregatedFeatureIndex=e)}_setAggregatedFeatureItemsReadOnly(e){d(()=>{this.aggregatedFeatureItems=e}),this._renderableAggregatedFeatureItems=e.filter(t=>!!t.graphic)}_setAggregatedFeatures(e){this._aggregatedGraphicsSet=new Set(e),d(()=>this.aggregatedFeatures=e)}_getAggregatedFeatureItemsHeadingSignature(){let e="";for(let t of this.aggregatedFeatureItems)e+=`${t.heading??""}|`;return e}_setLoading(e){d(()=>this.loading=e)}_cancelQuery(){this._abortController=A(this._abortController),this._setLoading(!1)}_removeBoundaryGraphicFromView(e){e?.graphics.remove(this.selectedAggregateBoundaryFeature)}_clearAggregatedFeatureItems(){this._setAggregatedFeatureItemsReadOnly([]),this._setSelectedAggregatedFeatureIndex(-1),this._removeSelectedAggregatedFeature()}_resetAggregatedFeaturesState(){this._setAggregatedFeatures([]),this._clearAggregatedFeatureItems(),this._setAggregatedFeatureCount(0),this._removeAggregateBoundaryFeature()}_setAggregatedFeatureItems(e){this._setAggregatedFeatureItemsReadOnly(e.map(t=>new w({graphic:t})))}_setAggregatedFeaturesState(e){this._setAggregatedFeatures(e),this._setAggregatedFeatureItems(e),this._setAggregatedFeatureCount(e.length)}_removeAggregateBoundaryFeature(){this._removeBoundaryGraphicFromView(this._boundaryGraphicView),this.selectedAggregateBoundaryFeature.geometry=null,this._boundaryGraphicView=void 0}_updateAggregateBoundaryFeature(e){let{view:t}=this,a=this._boundaryGraphicView;if(!t){this._removeAggregateBoundaryFeature();return}a!==t&&this._removeBoundaryGraphicFromView(a),this.selectedAggregateBoundaryFeature.geometry=e,this._boundaryGraphicView=t,t.graphics.includes(this.selectedAggregateBoundaryFeature)||t.graphics.add(this.selectedAggregateBoundaryFeature)}async _getLayerViewAndQuery(e){let{view:t}=this,a=f(e);if(!t||!a)return null;let r=await t.whenLayerView(a);if(!r?.createQuery||!r?.queryFeatures||!r?.queryExtent)return null;let s=r.createQuery(),i=e.getObjectId();return s.aggregateIds=i!=null?[i]:[],[r,s]}async _updateAggregatedFeatures(){this._cancelQuery();let{feature:e}=this;if(!e?.isAggregate){this._resetAggregatedFeaturesState();return}let t=await this._getLayerViewAndQuery(e);if(!t){this._resetAggregatedFeaturesState();return}let[a,r]=t,s=new AbortController;this._abortController=s,this._setLoading(!0);try{let[i,o]=await Promise.all([a.queryFeatures(r,{signal:s.signal}),a.queryExtent(r,{signal:s.signal})]);if(this._abortController!==s||s.signal.aborted)return;this._abortController=null,this._setLoading(!1);let g=i.features??[];this._setAggregatedFeaturesState(g),o.extent?this._updateAggregateBoundaryFeature(o.extent):this._removeAggregateBoundaryFeature()}catch(i){if(this._abortController!==s||(this._abortController=null,this._setLoading(!1),C(i)))return;this._resetAggregatedFeaturesState()}}_addFlowItem(e){e&&this.flowItems?.push(e)}async _addSelectedAggregatedFeature(e){let{view:t}=this;if(e&&t){let a=await b(e),r=e.clone();r.symbol=a,this._selectedAggregatedFeature=r,t.graphics.add(this._selectedAggregatedFeature)}}_removeSelectedAggregatedFeature(){this._selectedAggregatedFeature&&this.view&&(this.view.graphics.remove(this._selectedAggregatedFeature),this._selectedAggregatedFeature=void 0)}async _selectFeature(e){let{flowItems:t,view:a}=this;t&&this._addFlowItem(_(n`<arcgis-feature-next .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${t} .graphic=${e.graphic} .headingLevel=${this.headingLevel} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} .hideHeading=${this.hideHeading} .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map} .messageOverrides=${this.messageOverrides} .showRelationshipContent=${this.showRelationshipContent} .showUtilityNetworkContent=${this.showUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${a??void 0}></arcgis-feature-next>`))}async _selectRelativeAggregatedFeature(e){let{aggregatedFeatures:t,aggregatedFeatureItems:a,flowItems:r}=this;if(!r||t.length===0||a.length===0)return;let s=t.length,i=this.selectedAggregatedFeatureIndex>=0&&this.selectedAggregatedFeatureIndex<s?this.selectedAggregatedFeatureIndex:-1;if(i===-1){let c=r.getItemAt(r.length-1)?.graphic;i=c?t.indexOf(c):-1}let o=i===-1?e>0?0:s-1:(i+e+s)%s,g=a[o];if(!g?.graphic)return;this._setSelectedAggregatedFeatureIndex(o);let u=r.getItemAt(r.length-1);if(u?.flowType==="feature"){u.graphic=g.graphic,this._removeSelectedAggregatedFeature(),await this._addSelectedAggregatedFeature(g.graphic);return}await this._selectFeature(g)}_renderChevronIconNode(){return n`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`}render(){let{_renderableAggregatedFeatureItems:e}=this,{loading:t}=this;return t||e.length>0?n`<calcite-list .loading=${t} display-mode=flat .label=${this.messages?.aggregatedFeatures??""} selection-mode=none>${e.map(a=>n`<calcite-list-item .label=${a.heading?x(a.heading):void 0} @calciteListItemSelect=${()=>this._selectFeature(a)}>${this._renderChevronIconNode()}</calcite-list-item>`)}</calcite-list>`:n`<calcite-notice icon=information kind=brand open scale=s width=full><div slot=message>${this.messages?.noAggregatedFeatures}</div></calcite-notice>`}};p("arcgis-aggregated-features",l);return l},"popup/FeatureContent","Graphic","symbols/SimpleFillSymbol","symbols/support/symbolUtils","applications/Components/stringUtils","core/reactiveUtils",a,b,c)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{C as u,D as d,E as g,L as y,M as f,N as _,P as v,T as b,a as h,b as s,e as p,f as l,o as m}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([x,{isSharedTemplateMetadata:D,isStandardFeatureTemplate:C},{renderPreviewHTML:L},{isTable:M}])=>{var n=class extends g{constructor(t){if(super(t),this.it=l,t.type!==u.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===l||t==null)return this._t=void 0,this.it=t;if(t===p)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let i=[t];return i.raw=i,this._t={_$litType$:this.constructor.resultType,strings:i,values:[]}}};n.directiveName="unsafeHTML",n.resultType=1;var w=d(n);var O=h`.esri-thumbnail-preview{width:22px;height:22px;background-position:50% 50%;background-repeat:no-repeat}.template-image-container{width:32px;height:32px;display:flex;align-items:center;justify-content:center}`;async function $(e,t,i){if(D(e)&&e.thumbnail){let T=`data:image/png;base64,${e.thumbnail.imageData}`;return s`<div class="esri-thumbnail-preview" style=${v({backgroundImage:`url(${T})`})}></div>`}if(M(t))return s`<calcite-icon icon=table scale=s></calcite-icon>`;let r=await H(t,e);if(r==null)return null;let a={maxSize:24,ariaLabel:i?.ariaLabel};C(e)&&"renderer"in t&&t.renderer?.type==="dictionary"&&(a.fieldMap=t.renderer.fieldMap??void 0,a.feature={attributes:e.prototype.attributes??{}});let o=await L(r,a);return o?s`${w(o.outerHTML)}`:null}async function H(e,t){if(D(t))return await I(e);if("renderer"in e&&e.renderer){let{renderer:i}=e,r=new x({attributes:t.prototype.attributes});if("getSymbolAsync"in i){let a=await i.getSymbolAsync(r);if(a)return a}}return await I(e)}async function S(e){let t=e==="point"||e==="multipoint"?await $arcgis.t(m=>m[0],"symbols/SimpleMarkerSymbol"):e==="polyline"?await $arcgis.t(m=>m[0],"symbols/SimpleLineSymbol"):e==="polygon"||e==="mesh"||e==="multipatch"?await $arcgis.t(m=>m[0],"symbols/SimpleFillSymbol"):null;return t?new t.default:null}async function I(e){return"geometryType"in e&&e.geometryType?await S(e.geometryType):null}var c=class extends _{constructor(){super(...arguments),this._lastRun=0,this._attempted=!1,this._isCurrentlyInView=!1,this._intersectionObserver=null,this._imageContainerDiv=y(),this._generatedImageData=null}static{this.properties={_generatedImageData:16,template:0}}static{this.styles=O}get rootLayer(){return this.template?.layer?.type==="subtype-sublayer"?this.template.layer.parent:this.template?.layer}willUpdate(t){t.has("template")&&(this.hasUpdated||this.template!==null)&&this._resetData()}updated(){!this._attempted&&this._isCurrentlyInView&&(this._attempted=!0,this._handleImage().catch(t=>{m("warn",this,"Failed processing image")}))}loaded(){this.manager.onLifecycle(()=>(this._addIntersectionObserver(),()=>{this._removeIntersectionObserver()}))}_resetData(){this._generatedImageData=null,this._attempted=!1}async _generateImage(){return this.template?await $(this.template.template,this.template.layer):""}async _handleImage(){let t=++this._lastRun;if(!this._generatedImageData||this._generatedImageData==="")try{let i=await this._generateImage();if(this._lastRun!==t||this._generatedImageData===i)return;this._generatedImageData=i}finally{this._attempted=!0}}_addIntersectionObserver(){let t={rootMargin:"50px 0px",threshold:.01};this._imageContainerDiv.value&&requestAnimationFrame(()=>{this.isConnected&&(this._intersectionObserver=new IntersectionObserver(i=>{let r=!1;i.forEach(a=>{a.intersectionRatio>0&&!r?(r=!0,this._isCurrentlyInView=!0,this._handleImage().catch(o=>{m("warn",this,"Failed processing image")})):this._isCurrentlyInView=!1})},t),this._intersectionObserver?.observe(this._imageContainerDiv.value))})}_removeIntersectionObserver(){this._intersectionObserver?.disconnect(),this._intersectionObserver=null}render(){return s`<div class="template-image-container" ${f(this._imageContainerDiv)}>${this._generatedImageData??""}</div>`}};b("arcgis-template-image",c);return c},"Graphic","applications/Components/templateUtils","symbols/support/symbolUtils","applications/Components/layerUtils")
|
|
@@ -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 S}from"./2BVXNQ3U.js";import{g as $}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{M as h,N as y,T as k,a as b,b as s,o as d,q as w,w as n}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([l,{watch:L},{substitute:x},I,D,E,C,F,{a:_},{a:T,b:m,d:g,e:v,f:N}])=>{var P=b`:host{height:100%;flex-grow:1}calcite-flow{min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-block-group{flex-grow:1;padding-bottom:var(--calcite-spacing-md);background-color:var(--calcite-color-foreground-1)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-block calcite-input{margin:0 var(--calcite-spacing-md)}calcite-block calcite-input-message{padding:var(--calcite-spacing-sm) var(--calcite-spacing-md) 0}calcite-notice{margin:var(--calcite-spacing-md)}#subnetwork-info-block{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0}#results-limited-message{padding:var(--calcite-spacing-sm)}.inline-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.add-spatial-mode{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);margin:var(--calcite-spacing-md)}.heading{color:var(--calcite-color-text-1);margin:0 0 var(--calcite-spacing-md);font-size:var(--calcite-font-size);font-weight:var(--calcite-font-weight-medium)}`,p=`utility-network-trace-inputs-sketch-${Date.now()}`,U=20,f=class extends y{constructor(){super(...arguments),this._messages=S({blocking:!0}),this.#d=!0,this.#u=new Map,this.#s=new l,this.#r=new l,this.#o=new l,this.#b=new Set(["subnetwork","subnetwork-controller","upstream","downstream","isolation"]),this.#i=null,this.#n=20,this._candidateFeatures=[],this._compatibleSubnetworkNames=[],this._namedTraceConfigurations=[],this._subnetworkNamesState="ready",this._exceedDisplayLimit=!1,this.autoDestroyDisabled=!1,this.hideActionBar=!1,this.mode="default",this.arcgisPropertyChange=$()("mode"),this.arcgisSelectedNamedTraceConfigurationChange=n(),this.arcgisTraceInputsChange=n(),this.arcgisTraceLocationSelectEnd=n(),this.arcgisTraceLocationSelectStart=n(),this.arcgisUtilityNetworkChange=n()}static{this.properties={_selectedFeature:16,_candidateFeatures:16,_compatibleSubnetworkNames:16,_subnetworksTable:16,_namedTraceConfigurations:16,_traceConfiguration:16,_error:16,_subnetworkNamesState:16,_activeTraceLocationType:16,_exceedDisplayLimit:16,beforeTraceLocationSelectStart:0,view:0,selectedUtilityNetwork:0,selectedNamedTraceConfiguration:0,autoDestroyDisabled:5,hideActionBar:5,traceConfiguration:32,isSubnetworkNameTraceSelected:32,referenceElement:1,mode:3,traceLocationFlagInfos:32,traceLocations:32}}static{this.styles=P}get#t(){return this._traceConfiguration?.subnetworkName??void 0}set#t(t){this._traceConfiguration&&(this._traceConfiguration.subnetworkName=t)}#d;get#C(){let{view:t}=this;return t?.map?t.map.allLayers.toArray().concat(t.map.allTables.toArray()):[]}#e;#a;#u;#s;#r;#o;#b;#i;#c;#w;#y;#k;#n;get#$(){return!this.isSubnetworkNameTraceSelected}get#T(){let t=this.selectedNamedTraceConfiguration?.traceType;return t==="path"||t==="circuit"}get#L(){let t=this.selectedUtilityNetwork?.dataElement?.domainNetworks;return t?t.map(e=>e.subnetworkLayerId).filter(e=>e!=null&&e>-1):[]}#x({detail:t,target:e}){(t.name==="selectedDrillInFeature"||t.name==="selectedFeature")&&(this._selectedFeature=e.selectedDrillInFeature??e.selectedFeature??void 0)}get traceConfiguration(){return this._traceConfiguration}get isSubnetworkNameTraceSelected(){let{selectedNamedTraceConfiguration:t}=this;return!!t?.traceConfiguration?.subnetworkName&&t?.traceType==="subnetwork"}get traceLocationFlagInfos(){return new l([...this.#s,...this.#r,...this.#o])}get traceLocations(){let t=[];return this.#$&&this.#s.forEach(e=>t.push(...this.#m(e))),this.#T&&this.#o.forEach(e=>t.push(...this.#m(e))),this.#r.forEach(e=>t.push(...this.#m(e))),t}async destroy(){this.#A(p),this.#N(),this.#e?.cancel(),this.#c?.destroy(),this.#w?.destroy(),this.#y?.destroy(),this.#k?.destroy(),await this.manager.destroy()}load(){this.#v(),this.manager.onLifecycle(()=>[L(()=>this.view?.map,()=>this.#v())])}willUpdate(t){t.has("selectedUtilityNetwork")&&(this.arcgisUtilityNetworkChange.emit(),this.#K()),t.has("selectedNamedTraceConfiguration")&&(this.arcgisTraceInputsChange.emit(),this.arcgisSelectedNamedTraceConfigurationChange.emit(),this.#H())}disconnectedCallback(){super.disconnectedCallback(),this.#u.clear()}#v(){if(this._error=void 0,!this.view?.map){this._error=this._messages.errors.noView;return}let t=this.view.map;this.#B(t)}#I(t){t&&(this.#w=t)}#D(t){t&&(this.#y=t)}#E(t){t&&(this.#k=t)}#F(t){t&&(this.#c=t)}#m(t){let e=t.flagProperties.selectedTerminals;return t.flagProperties.terminalConfiguration&&e?.size?Array.from(e,i=>new E({type:t.traceLocation.type,isFilterBarrier:t.traceLocation.isFilterBarrier,globalId:t.traceLocation.globalId,percentAlong:t.traceLocation.percentAlong,terminalId:i})):[t.traceLocation]}#N(){let{view:t}=this;this.#s.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#s.removeAll(),this.#r.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#r.removeAll(),this.#o.forEach(e=>{e.spatialProperties.flagGraphic&&t?.graphics.remove(e.spatialProperties.flagGraphic)}),this.#o.removeAll()}#P(t,e){if(!t.findLayerById(e)){let i=new I({id:e,listMode:"hide",title:e});T(this.view,i)}}#U(t,e){let i=t.findLayerById(e);return g(i)?(t.reorder(i,t.layers.length-1),i):null}#A(t){if(!this.view?.map)return;let{map:e}=this.view,i=e?.findLayerById(t);i&&g(i)&&e?.remove(i)}#_(){if(!this.#e)return;let t=new l;this.#a?.forEach(e=>{v(e)?e.sublayers.forEach(i=>{t.add(new C({layer:i,enabled:!0}))}):t.add(new C({layer:e,enabled:!0}))}),this.#e.snappingOptions={enabled:!1,featureSources:t}}#M(t){let{view:e}=this,i=this.#U(t,p);return new F({layer:i,view:e})}#B(t){this.#P(t,p),this.#e=this.#M(t),this.#_()}#V(){this.#t=void 0,this._subnetworksTable=void 0,this._compatibleSubnetworkNames=[]}async#j(){this._subnetworksTable||(this._subnetworksTable=await this.selectedUtilityNetwork?.loadSubnetworksTable())}async#G(){let{_subnetworksTable:t}=this;if(!t)return;let e=t.fieldsIndex.get("SUBNETWORKNAME"),i=(o,c,u)=>c===0||o.getAttribute(e.name)!==u[c-1].getAttribute(e.name),a=t.createQuery();a.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,a.where=this.#O(),a.outFields=[e.name],a.orderByFields=[e.name];let{features:r}=await m(t,a,void 0,!1);this._compatibleSubnetworkNames=r.filter(i).map(o=>o.getAttribute(e.name))}#O(){let t=this._traceConfiguration,e=`DOMAINNETWORKNAME = '${t.domainNetworkName}'`,i=`TIERNAME = '${t.tierName}'`;return[e,i].join(" AND ")}async#R(t){await this.#j(),await this.#G(),t.subnetworkName&&!this._compatibleSubnetworkNames.some(e=>e===t.subnetworkName)&&(this.#t=this._compatibleSubnetworkNames.at(0))}#z(t){let e=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.find(i=>i.globalId===t);if(!e){d("error",this,"`traceConfig` not found in `selectedUtilityNetwork.sharedNamedTraceConfigurations`");return}this.selectedNamedTraceConfiguration=e}async#H(){let{selectedNamedTraceConfiguration:t}=this;if(!(t?.traceConfiguration instanceof D)){d("error",this,w("selectedNamedTraceConfiguration.traceConfiguration")),this._traceConfiguration=void 0;return}this._traceConfiguration=t.traceConfiguration.clone(),this.isSubnetworkNameTraceSelected&&(this._subnetworkNamesState="loading",await this.#R(this._traceConfiguration),this._subnetworkNamesState="ready")}async#K(){let{selectedUtilityNetwork:t}=this;try{t&&!t.loaded&&await t.load()}catch(e){_(e,this,"Error while loading the selected utility network")}this.#V(),this.#Q(),this.#W(),this.#N()}#Q(){this._traceConfiguration=void 0,this.selectedNamedTraceConfiguration=void 0,this._namedTraceConfigurations=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.filter(Boolean).filter(t=>t.traceType!=="circuit").sort((t,e)=>t.title.localeCompare(e.title))||[],this._namedTraceConfigurations.length?this.selectedNamedTraceConfiguration=this._namedTraceConfigurations.at(0):d("error",this,"The selected utility network has no compatible named trace configurations.")}#W(){let{selectedUtilityNetwork:t}=this;this.#a=new l(this.#C.filter(e=>t?.isUtilityLayer(e)&&!this.#L.includes(e.layerId))),this.#_()}#g(t){if(t.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(t.detail).defaultPrevented){t.preventDefault();return}this._activeTraceLocationType=t?.target?.traceLocationType,this.mode="add-spatial-instructions"}#q(t){if(t==null)return;let e=this.#u,i=this.#a,a=e.get(t);if(a)return a;if(!i)return;let r=i.find(o=>"layerId"in o&&o.layerId===t);return r&&e.set(t,r),r}async#J(t,e){let i=t.createQuery();i.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,i.objectIds=e.map(r=>r.getObjectId()),i.outFields=["*"];let{features:a}=await m(t,i);return a.forEach(r=>{if(!r.getEffectivePopupTemplate(this.#d)){let o=r.layer;r.popupTemplate=o.createPopupTemplate()}}),a}async#X(t){let e=new Map,i=[];return t.forEach(a=>{let r=N(a.layer)?a.layer.parent:a.layer;if(r){let o=this.#q(r.layerId);if(o){let c=e.get(o)||[];c.push(a),e.set(o,c)}}}),await Promise.all(Array.from(e.keys()).map(async a=>{let r=e.get(a)??[],o=await this.#J(a,r);i.push(...o)})),i}async#p(t){return this._exceedDisplayLimit=t.length>this.#n,this._candidateFeatures=await this.#X(t.slice(0,this.#n)),this._candidateFeatures.length===0?(this.#l(),await Promise.reject(Error("No features found"))):(this._candidateFeatures.length===1&&(this._selectedFeature=this._candidateFeatures.at(0)),this.mode="add-spatial-feature",this.#i?.reject(),this.#i=Promise.withResolvers(),await this.#i.promise)}#f(t){t.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit(),this._activeTraceLocationType=void 0,this.mode="default",this.#l()}#l(t){t?.stopPropagation(),this.#c?.clear(),this.#S(),this.#e?.cancel()}#S(){this.mode="default",this._candidateFeatures=[],this._selectedFeature=void 0,this.#i?.reject(),this.#i=null}#Y(){let t=this.#i,e=this.#c,{_selectedFeature:i}=this;if(t&&e){if(!i)return;t.resolve(i),this.#i=null}}#h(t,e=!1,i){return s`<calcite-notice .closable=${e} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${t}</div></calcite-notice>`}#Z(){let t=this._namedTraceConfigurations.map(i=>s`<calcite-combobox-item .value=${i.globalId} .heading=${i.title} .selected=${i.globalId===this.selectedNamedTraceConfiguration?.globalId}></calcite-combobox-item>`),e=this._messages.labels.traceConfiguration;return s`<calcite-block .heading=${e} .label=${e} expanded><calcite-combobox .label=${e} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{let a=i.selectedItems[0]?.value;this.#z(a)}}>${t}</calcite-combobox></calcite-block>`}#tt(){let{selectedUtilityNetwork:t,view:e}=this;return s`<arcgis-utility-network-picker .selectedUtilityNetwork=${t} .view=${e} @arcgisPropertyChange=${i=>{i.detail.name==="selectedUtilityNetwork"&&(this.selectedUtilityNetwork=i.target.selectedUtilityNetwork)}}></arcgis-utility-network-picker>`}#et(){let{_error:t}=this,{noView:e}=this._messages.errors,i;return t===e?i=this.#h(t,!1,"exclamation-mark-triangle"):i=this.#ut(),s`<calcite-flow-item .selected=${this.mode==="default"}>${i}</calcite-flow-item>`}#it(){let{_messages:t,mode:e}=this,i=this._activeTraceLocationType==="starting-point"?t.labels.addSpatial.startingPoint:this._activeTraceLocationType==="barrier"?t.labels.addSpatial.barrier:t.labels.addSpatial.stoppingPoint;return s`<calcite-flow-item .selected=${e==="add-spatial-instructions"} .heading=${i} @calciteFlowItemBack=${a=>this.#l(a)}><div class="add-spatial-mode"><div><h5 class="heading">${t.instructions.addSpatial.selectFeature.heading}</h5>${t.instructions.addSpatial.selectFeature.subheading}</div><div><h5 class="heading">${t.instructions.addSpatial.selectAssociatedFeature.heading}</h5>${t.instructions.addSpatial.selectAssociatedFeature.subheading}</div></div></calcite-flow-item>`}#at(){let{_activeTraceLocationType:t,_candidateFeatures:e,_messages:i}=this;if(!e.length)return this.mode="default",null;let a=t==="starting-point"?i.labels.addSpatial.startingPoint:t==="barrier"?i.labels.addSpatial.barrier:i.labels.addSpatial.stoppingPoint,r=e.length===1?"feature":"list";return s`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#d} .features=${this._candidateFeatures} .featureMenuTitle=${a} .hideActionBar=${this.hideActionBar} hide-select-feature .initialDisplayMode=${r} @arcgisClose=${()=>this.#S()} @arcgisPropertyChange=${this.#x} open .referenceElement=${this.referenceElement} .view=${this.view} ${h(this.#F)}></arcgis-features-next>`}#st(){let{mode:t,_messages:e,_selectedFeature:i,selectedUtilityNetwork:a}=this,r=t==="add-spatial-feature"&&this._exceedDisplayLimit&&!i,o=x(e.warnings.exceededDisplayLimit,{limit:this.#n.toString()}),c=i?!(a?.isUtilityLayer(i.layer)??!0):!0;return s`${r&&s`<calcite-input-message id=results-limited-message icon=exclamation-mark-circle status=idle>${o}</calcite-input-message>`||""}<calcite-button appearance=outline width=full @click=${()=>this.#l()} slot=footer>${e.buttons.cancel}</calcite-button>${t==="add-spatial-feature"&&s`<calcite-button width=full slot=footer appearance=solid @click=${()=>this.#Y()} .disabled=${c}>${e.buttons.add}</calcite-button>`||""}`}#rt(){return s`<arcgis-utility-network-trace-location-next .view=${this.view} trace-location-type=starting-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#g} @arcgisTraceLocationSelectEnd=${this.#f} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#e} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#s} .afterHitTest=${this.#p.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this.#I)}></arcgis-utility-network-trace-location-next>`}#ot(){return s`<arcgis-utility-network-trace-location-next .view=${this.view} trace-location-type=stopping-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#g} @arcgisTraceLocationSelectEnd=${this.#f} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#e} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#o} .afterHitTest=${this.#p.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this.#E)}></arcgis-utility-network-trace-location-next>`}#ct(){return s`<arcgis-utility-network-trace-location-next .view=${this.view} trace-location-type=barrier .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this.#g} @arcgisTraceLocationSelectEnd=${this.#f} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this.#e} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this.#a} .traceLocations=${this.#r} .afterHitTest=${this.#p.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this.#D)}></arcgis-utility-network-trace-location-next>`}#nt(){let{_messages:t}=this;return s`<calcite-input clearable type=text .placeholder=${t.instructions.enterSubnetworkName} max-length=64 .status=${this.#t?"valid":"invalid"} .value=${this.#t} @calciteInputInput=${e=>this.#t=e.target.value}></calcite-input><calcite-input-message icon=exclamation-mark-triangle status=idle>${t.labels.tooManySubnetworks}</calcite-input-message>`}#lt(){return s`<calcite-combobox .label=${this._messages.labels.subnetworkName} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:t})=>{let e=t.selectedItems[0]?.value;this.#t=e}}>${this._compatibleSubnetworkNames.map(t=>s`<calcite-combobox-item .value=${t} .heading=${t} .selected=${t===this.#t}></calcite-combobox-item>`)}</calcite-combobox>`}#ht(){let{_messages:t}=this,e=t.labels.subnetworkName;return this.isSubnetworkNameTraceSelected?this._subnetworkNamesState==="loading"?s`<calcite-loader class="inline-loader" label=loading scale=s></calcite-loader>`:this._compatibleSubnetworkNames.length?s`<calcite-block .heading=${e} .label=${e} expanded>${this._compatibleSubnetworkNames.length>U?this.#nt():this.#lt()}</calcite-block>`:this.#h(t.errors.noCompatibleSubnetworks,!1,"exclamation-mark-triangle"):null}#dt(){let{selectedNamedTraceConfiguration:t}=this;return this._traceConfiguration&&t?.traceType&&this.#b.has(t.traceType)?s`<calcite-block id=subnetwork-info-block expanded .label=${this._messages.labels.subnetworkInfo}><arcgis-utility-network-subnetwork-info-next .namedTraceConfiguration=${t}></arcgis-utility-network-subnetwork-info-next></calcite-block>`:null}#ut(){let{_messages:t}=this,{noTraceConfiguration:e,noNamedTraceConfigurations:i}=t.errors,a=this.#tt(),r;this._namedTraceConfigurations.length||(r=this.#h(i,!1,"exclamation-mark-triangle"));let o=s`${this.#Z()}${this.#dt()}${this.#ht()}`,c=this.traceConfiguration?s`${this.#$?this.#rt():null}${this.#T?this.#ot():null}${this.#ct()}`:this.#h(e,!1,"exclamation-mark-triangle"),u=this.selectedUtilityNetwork?.loaded?r??s`${o}${c}`:null;return s`<calcite-block-group .label=${t.labels.traceInputs}>${a}${u}</calcite-block-group>`}render(){let{mode:t}=this;return s`<calcite-panel>${t==="add-spatial-feature"?this.#at():null}<calcite-flow .hidden=${t==="add-spatial-feature"}>${this.#et()}${this.#it()}</calcite-flow>${t!=="default"?this.#st():null}</calcite-panel>`}};k("arcgis-utility-network-trace-inputs-next",f);return f},"core/Collection","core/reactiveUtils","intl","layers/GraphicsLayer","networks/support/UNTraceConfiguration","rest/networks/support/TraceLocation","views/interactive/snapping/FeatureSnappingLayerSource","widgets/Sketch/SketchViewModel",a,c)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import i from"./TIOCQR7Z.js";import g from"./SUUKWB22.js";import"./LTOXLO3L.js";import e from"./3T7L7UT5.js";import{a as F}from"./2BVXNQ3U.js";import d from"./2FM2FJAY.js";import c from"./YHNRTH56.js";import{e as E,g as P}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import a from"./SDWFNKIL.js";import"./QUZTFUWM.js";import{d as k}from"./4W3T75SY.js";import{L as h,M as u,N as M,O as v,P as D,T as A,a as z,b,w as f}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([H,{stripHTML:B},{watch:p},V,,,,$,,L])=>{var R=z`:host{display:contents;--arcgis-internal-popup-pointer-size: 12px;--arcgis-internal-popup-content-small-size: 280px;--arcgis-internal-popup-content-medium-size: 340px;--arcgis-internal-popup-content-large-size: 400px;--arcgis-internal-popup-content-x-large-size: 460px;--arcgis-internal-popup-content-min-size-y: 48px;--arcgis-internal-popup-pointer-size-half: calc(var(--arcgis-internal-popup-pointer-size) / 2);--arcgis-internal-popup-pointer-size-half-negative: calc(var(--arcgis-internal-popup-pointer-size-half) * -1)}.root{display:flex;position:absolute;flex-flow:column nowrap;z-index:401;pointer-events:none;border:none;overflow:visible;padding:0;width:auto;height:auto;background-color:transparent}.hidden{visibility:hidden}.root:popover-open{display:flex;position:fixed;flex-flow:column nowrap;margin:0}arcgis-features{flex:1;width:100%}.shadow{box-shadow:var(--calcite-shadow-sm)}.aligned-top-center{transform-origin:50% 100%}.aligned-bottom-center{transform-origin:50% -5%}.aligned-top-left,.aligned-bottom-left{transform-origin:100% 50%}.aligned-top-right,.aligned-bottom-right{transform-origin:-5% 50%}.aligned-top-center,.aligned-top-left,.aligned-top-right{animation:popup-intro-animation-down .2s ease-in-out}.aligned-bottom-center,.aligned-bottom-left,.aligned-bottom-right{animation:popup-intro-animation-up .2s ease-in-out}.main-container{display:flex;position:relative;z-index:1;background-color:var(--calcite-color-foreground-1);width:var(--arcgis-internal-popup-content-medium-size);min-height:var(--arcgis-internal-popup-content-min-size-y);max-height:var(--arcgis-internal-popup-content-medium-size);overflow:hidden;pointer-events:auto}.pointer{position:absolute;width:0;height:0}.pointer-direction{position:absolute;width:var(--arcgis-internal-popup-pointer-size);height:var(--arcgis-internal-popup-pointer-size);content:"";background-color:var(--calcite-color-foreground-1)}.aligned-top-center .pointer{top:100%;left:50%;margin:0 0 0 var(--arcgis-internal-popup-pointer-size-half-negative)}.aligned-bottom-center .pointer{bottom:100%;left:50%;margin:0 0 0 var(--arcgis-internal-popup-pointer-size-half-negative)}.aligned-top-left .pointer{right:var(--arcgis-internal-popup-pointer-size-half);bottom:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(-45deg)}.aligned-bottom-left .pointer{top:var(--arcgis-internal-popup-pointer-size-half);right:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(45deg)}.aligned-top-right .pointer{bottom:var(--arcgis-internal-popup-pointer-size-half);left:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(45deg)}.aligned-bottom-right .pointer{top:var(--arcgis-internal-popup-pointer-size-half);left:var(--arcgis-internal-popup-pointer-size-half);transform:rotate(-45deg)}.aligned-top-center .pointer-direction,.aligned-bottom-center .pointer-direction{transform:scale(.75,2) rotate(45deg)}.aligned-top-left .pointer-direction,.aligned-bottom-left .pointer-direction,.aligned-top-right .pointer-direction,.aligned-bottom-right .pointer-direction{top:var(--arcgis-internal-popup-pointer-size-half-negative);left:var(--arcgis-internal-popup-pointer-size-half-negative);transform:scale(.75,2.5) rotate(45deg)}.aligned-top-center .pointer-direction{top:var(--arcgis-internal-popup-pointer-size-half-negative);left:0}.aligned-bottom-center .pointer-direction{bottom:var(--arcgis-internal-popup-pointer-size-half-negative);left:0}.is-xl-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-x-large-size)}.is-lg-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-large-size)}.is-md-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-medium-size)}.is-sm-width-breakpoint .main-container,.is-xs-width-breakpoint .main-container{width:var(--arcgis-internal-popup-content-small-size)}.is-xs-width-breakpoint.is-docked-top-center,.is-xs-width-breakpoint.is-docked-bottom-center{margin:0;width:auto}.is-xs-width-breakpoint.is-docked-top-center .main-container,.is-xs-width-breakpoint.is-docked-bottom-center .main-container{position:absolute;right:0;left:0;width:100%;max-height:75%}.is-xs-width-breakpoint.is-docked-bottom-center .main-container{bottom:0}.is-xs-width-breakpoint.is-docked-top-center .main-container{top:0}.is-xl-height-breakpoint .main-container{max-height:var(--arcgis-internal-popup-content-x-large-size)}.is-lg-height-breakpoint .main-container{max-height:var(--arcgis-internal-popup-content-large-size)}.is-sm-height-breakpoint .main-container,.is-xs-height-breakpoint .main-container{max-height:var(--arcgis-internal-popup-content-small-size)}.is-docked{flex-flow:row nowrap;inset:0;margin:var(--arcgis-layout-overlay-space-top, 0) var(--arcgis-layout-overlay-space-right, 0) var(--arcgis-layout-overlay-space-bottom, 0) var(--arcgis-layout-overlay-space-left, 0);padding:var(--calcite-spacing-lg) var(--calcite-spacing-lg) var(--calcite-spacing-xxxl) var(--calcite-spacing-lg);animation:docking-animation .25s ease-out}.is-docked-top-left,.is-docked-top-center,.is-docked-top-right,.is-docked-top-start,.is-docked-top-end{align-items:flex-start}.is-docked-bottom-left,.is-docked-bottom-center,.is-docked-bottom-right,.is-docked-bottom-start,.is-docked-bottom-end{align-items:flex-end}.is-docked-top-left,.is-docked-bottom-left,.is-docked-top-start,.is-docked-bottom-start{justify-content:flex-start}.is-docked-top-center,.is-docked-bottom-center{justify-content:center}.is-docked-top-right,.is-docked-bottom-right,.is-docked-top-end,.is-docked-bottom-end{justify-content:flex-end}.is-docked-top-left.is-rtl,.is-docked-top-right.is-rtl,.is-docked-bottom-left.is-rtl,.is-docked-bottom-right.is-rtl{flex-direction:row-reverse}.is-docked-top-left .main-container,.is-docked-top-right .main-container,.is-docked-bottom-left .main-container,.is-docked-bottom-right .main-container,.is-docked-top-start .main-container,.is-docked-top-end .main-container,.is-docked-bottom-start .main-container,.is-docked-bottom-end .main-container{max-height:80%}.is-docked-top-center .main-container,.is-docked-bottom-center .main-container{max-height:40%}@media(prefers-reduced-motion){.aligned-top-center,.aligned-top-left,.aligned-top-right,.aligned-bottom-center,.aligned-bottom-left,.aligned-bottom-right{animation:none}}@media(prefers-reduced-motion){.is-docked{animation:none}}@keyframes docking-animation{0%{opacity:0}25%{opacity:0}to{opacity:1}}@keyframes popup-intro-animation-down{0%{transform:translateY(calc(var(--calcite-spacing-xs) * -1));opacity:0}to{transform:translate(0);opacity:1}}@keyframes popup-intro-animation-up{0%{transform:translateY(var(--calcite-spacing-xs));opacity:0}to{transform:translate(0);opacity:1}}`;function w(_){return _&&Number.parseInt(_.replaceAll(/[^-\d.]/gu,""),10)||0}var I=$(H),N={buttonEnabled:!0,position:"auto",breakpoint:{width:544}},C=class extends M{constructor(){super(...arguments),this._direction=E(),this._featuresComponent=h(),this._dockAction=new V({id:"popup-dock-action"}),this._mainContainerNode=h(),this._pointerNode=h(),this.messages=F(),this.viewModel=I(this),this._containerNode=h(),this._popupResizeObserver=new ResizeObserver(()=>this._positionContainer()),this._positionContainer=()=>{this.positionStyle=this._calculatePositionStyle()},this.screenLocation=L(this),this.actions=this.viewModel.actions,this.active=this.viewModel.active,this.alignment="auto",this.autoCloseEnabled=!1,this.autoDestroyDisabled=!1,this.collapsed=!1,this.content=this.viewModel.content,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.dockEnabled=!1,this.effectiveHeading=this.viewModel.effectiveHeading,this.featureCount=this.viewModel.featureCount,this.featureMenuOpen=!1,this.features=this.viewModel.features,this.featureStream=this.viewModel.featureStream,this.focusTrapDisabled=!1,this.goToOverride=this.viewModel.goToOverride,this.heading=this.viewModel.heading,this.headingLevel=2,this.hideActionBar=!1,this.hideCloseButton=!1,this.hideCollapseButton=!1,this.hideFeatureMenuHeading=!1,this.hideFeatureNavigation=!1,this.hideFeatureListLayerTitle=!1,this.hideHeading=!1,this.hideSpinner=!1,this.highlightDisabled=this.viewModel.highlightEnabled,this.includeDefaultActionsDisabled=this.viewModel.includeDefaultActions,this.initialDisplayMode=this.viewModel.initialDisplayMode,this.location=this.viewModel.location,this.open=this.viewModel.open,this.promises=this.viewModel.promises,this.selectedFeature=this.viewModel.selectedFeature,this.selectedFeatureIndex=this.viewModel.selectedFeatureIndex,this.state=this.viewModel.state,this.topLayerDisabled=!1,this.updateLocationEnabled=this.viewModel.updateLocationEnabled,this.view=this.viewModel.view,this.arcgisPropertyChange=P()("active","collapsed","currentAlignment","dockEnabled","effectiveHeading","featureCount","featureMenuOpen","features","promises","selectedDrillInFeature","selectedFeature","selectedFeatureComponent","selectedFeatureIndex","state","open"),this.arcgisReady=f(),this.arcgisClose=f(),this.arcgisTriggerAction=f()}static{this.properties={screenLocation:16,positionStyle:16,_featureNavigationTop:16,actions:0,active:0,alignment:1,autoCloseEnabled:5,autoDestroyDisabled:5,collapsed:5,content:1,currentAlignment:32,currentDockPosition:32,defaultPopupTemplateEnabled:5,dockEnabled:5,dockOptions:0,effectiveHeading:32,featureCount:0,featureMenuOpen:5,featureMenuTitle:1,features:0,featureStream:0,focusTrapDisabled:5,goToOverride:0,heading:1,headingLevel:9,hideActionBar:5,hideCloseButton:5,hideCollapseButton:5,hideFeatureMenuHeading:5,hideFeatureNavigation:5,hideFeatureListLayerTitle:5,hideHeading:5,hideSpinner:5,highlightDisabled:5,includeDefaultActionsDisabled:5,initialDisplayMode:1,label:1,location:0,messageOverrides:0,open:5,promises:0,referenceElement:1,selectedDrillInFeature:32,selectedFeature:0,selectedFeatureComponent:32,selectedFeatureIndex:9,state:32,topLayerDisabled:5,updateLocationEnabled:5,view:0}}static{this.styles=R}get trackLocation(){return this.active&&!this.dockEnabled}get _featureNavigationTop(){let{currentAlignment:t,currentDockPosition:e}=this;return t==="bottom-left"||t==="bottom-center"||t==="bottom-right"||t==="bottom-start"||t==="bottom-end"||e==="top-left"||e==="top-center"||e==="top-right"||e==="top-start"||e==="top-end"}get currentAlignment(){return this._getCurrentAlignment()}get currentDockPosition(){return this._getCurrentDockPosition()}get dockOptions(){return this._dockOptions||N}set dockOptions(t){let e={...N},o=this.viewModel?.view?.breakpoints,i={};o&&(i.width=o.xsmall,i.height=o.xsmall);let a={...e,...t},n={...e.breakpoint,...i},{breakpoint:r}=a;typeof r=="object"?a.breakpoint={...n,...r}:r&&(a.breakpoint=n),this._dockOptions=a}get selectedDrillInFeature(){return this._featuresComponent.value?.selectedDrillInFeature??null}get selectedFeatureComponent(){return this._featuresComponent.value?.selectedFeatureComponent??null}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy(),this._dockAction.destroy(),this._popupResizeObserver.disconnect()}async fetchFeatures(t,e){await this._featuresComponent.value?.fetchFeatures(t,e)}async next(){this.viewModel.next()}async previous(){this.viewModel.previous()}async setFocus(){this._featuresComponent.value?.setFocus()}connectedCallback(){super.connectedCallback(),this._syncPopupResizeObserver()}loaded(){this.manager.onLifecycle(()=>[p(()=>[this.viewModel?.view?.widthBreakpoint,this.dockEnabled,this._direction],()=>this._handleDockIcon(),{initial:!0}),p(()=>[this.dockEnabled,this.messages?.undock,this.messages?.dock],()=>this._handleDockEnabled(),{initial:!0}),p(()=>[this.dockOptions,this._featuresComponent.value],()=>{let{_dockAction:t,dockOptions:e}=this,o=this._featuresComponent.value?.headerActions;o?.remove(t),e.buttonEnabled&&o?.add(t)},{initial:!0}),p(()=>[this._pointerNode.value,this.alignment,this.currentAlignment,this.dockEnabled,this.dockOptions,this.screenLocation,this.viewModel?.active,this.viewModel?.location,this.viewModel?.view?.size],()=>this._positionContainer(),{initial:!0}),p(()=>this._mainContainerNode.value,t=>{this._syncPopupResizeObserver(t)},{initial:!0}),p(()=>this.viewModel?.view?.size,(t,e)=>this._updateDockEnabledForViewSize(t,e)),p(()=>this.viewModel?.view?.ready,()=>this._setDockEnabledForViewSize(this.dockOptions),{initial:!0}),p(()=>this.view?.map,t=>{this.viewModel.map=t},{initial:!0}),p(()=>this.screenLocation,(t,e)=>this._autoClose(t,e)),p(()=>[this.active,this._containerNode.value,this.dockEnabled,this.topLayerDisabled],()=>this._togglePopover(),{initial:!0})])}disconnectedCallback(){super.disconnectedCallback(),this._popupResizeObserver.disconnect()}_togglePopover(){this._containerNode.value?.togglePopover(this.active&&!this.dockEnabled&&!this.topLayerDisabled)}_syncPopupResizeObserver(t=this._mainContainerNode.value){this._popupResizeObserver.disconnect(),t&&this._popupResizeObserver.observe(t)}_handleClose(t){t.stopPropagation(),this.arcgisClose.emit()}_autoClose(t,e){this.autoCloseEnabled&&t!=null&&e!=null&&(this.open=!1)}_handleArcgisPropertyChange(t){t.detail.name==="collapsed"&&(this.collapsed=t.target.collapsed)}_handleArcgisTriggerAction(t){t.stopPropagation(),t.detail.action===this._dockAction&&(this.dockEnabled=!this.dockEnabled),this.arcgisTriggerAction.emit({action:t.detail.action})}_isOutsideView(t){let{popupHeight:e,popupWidth:o,screenLocation:i,side:a,view:n}=t;return Number.isNaN(o)||Number.isNaN(e)||!n||!i?!1:a==="right"&&i.x+o/2>n.width||a==="left"&&i.x-o/2<0||a==="top"&&i.y-e<0||a==="bottom"&&i.y+e>n.height}_getPointerSize(){let{_pointerNode:t}=this,e=t.value?window.getComputedStyle(t.value):null,o=w(e?.height),i=w(e?.width);return Math.hypot(o,i)}_calculateAutoAlignment(t){if(t!=="auto")return t;let{_mainContainerNode:e,_popupRect:o,viewModel:i}=this,{view:a}=i,{screenLocation:n}=this;if(n==null||!a||!o||!e.value)return"top-center";let r=window.getComputedStyle(e.value),l=w(r.maxHeight),s=w(r.height),c=this._getPointerSize(),{height:d,width:y}=o,g=y+c,m=Math.max(d,l,s)+c,O=this._isOutsideView({popupHeight:m,popupWidth:g,screenLocation:n,side:"right",view:a}),S=this._isOutsideView({popupHeight:m,popupWidth:g,screenLocation:n,side:"left",view:a}),x=this._isOutsideView({popupHeight:m,popupWidth:g,screenLocation:n,side:"top",view:a}),T=this._isOutsideView({popupHeight:m,popupWidth:g,screenLocation:n,side:"bottom",view:a});return S?x?"bottom-right":"top-right":O?x?"bottom-left":"top-left":x?T?"top-center":"bottom-center":"top-center"}_callCurrentAlignment(t){return typeof t=="function"?t.call(this):t}_getCurrentAlignment(){return this.dockEnabled||!this.active||!this._mainContainerNode.value?null:this._calculateAutoAlignment(this._callCurrentAlignment(this.alignment))}_callDockPosition(t){return typeof t=="function"?t.call(this):t}_getDockPosition(){return this._calculateAutoDockPosition(this._callDockPosition(this.dockOptions?.position))}_getCurrentDockPosition(){return this.dockEnabled&&this.active?this._getDockPosition():null}_calculateAutoDockPosition(t){if(t!=="auto")return t;let e=this.viewModel?.view,o="top-end";if(!e)return o;let{breakpoints:i}=e;return i?.xsmall&&e.width<=i.xsmall?"bottom-center":o}_getDockIcon(){let t=this._getDockPosition(),{_direction:e}=this;if(this.dockEnabled)return"minimize";switch(t){case"top-left":case"bottom-left":return"dock-left";case"top-center":return"maximize";case"bottom-center":return"dock-bottom";case"top-right":case"bottom-right":return"dock-right";case"top-start":case"bottom-start":return e==="rtl"?"dock-right":"dock-left";default:return e==="rtl"?"dock-left":"dock-right"}}_handleDockIcon(){this._dockAction.icon=this._getDockIcon()}_handleDockEnabled(){this._dockAction.title=this.dockEnabled?this.messages?.undock:this.messages?.dock}_calculateAlignmentPosition(t,e,o,i){if(t<0||e<0||!o||!i||t>o.width||e>o.height)return;let{topLayerDisabled:a}=this,n=a?t:t+o.x,r=a?e:e+o.y,{_direction:l,currentAlignment:s}=this,c=this._getPointerSize(),d=c/2;if(s==="top-left"||s==="top-start"&&l==="ltr"||s==="top-end"&&l==="rtl")return{top:r-(i.height+d),left:n-i.width-d};if(s==="top-center")return{top:r-(i.height+c),left:n-i.width/2};if(s==="top-right"||s==="top-end"&&l==="ltr"||s==="top-start"&&l==="rtl")return{top:r-(i.height+d),left:n+d};if(s==="bottom-left"||s==="bottom-start"&&l==="ltr"||s==="bottom-end"&&l==="rtl")return{top:r+d,left:n-i.width-d};if(s==="bottom-center")return{top:r+c,left:n-i.width/2};if(s==="bottom-right"||s==="bottom-end"&&l==="ltr"||s==="bottom-start"&&l==="rtl")return{top:r+d,left:n+d}}_getPositionStyleValue(t){return t!=null?`${t}px`:"auto"}_calculatePositionStyle(){if(this.dockEnabled)return;let{screenLocation:t}=this;if(t==null)return;let e=this.view?.container?.getBoundingClientRect(),o=this._mainContainerNode.value?.getBoundingClientRect();this._popupRect=o;let i=this._calculateAlignmentPosition(t.x,t.y,e,o);if(i)return`inset: ${this._getPositionStyleValue(i.top)} ${this._getPositionStyleValue(i.right)} ${this._getPositionStyleValue(i.bottom)} ${this._getPositionStyleValue(i.left)};`}_dockingThresholdCrossed(t,e,o){let[i,a]=t,[n,r]=e,{width:l=0,height:s=0}=o??{};return i<=l&&n>l||i>l&&n<=l||a<=s&&r>s||a>s&&r<=s}_updateDockEnabledForViewSize(t,e){if(!t||!e||!this.viewModel?.view?.ready)return;let{dockOptions:o}=this,i=o.breakpoint;typeof i=="object"&&this._dockingThresholdCrossed(t,e,i)&&this._setDockEnabledForViewSize(o)}_shouldDockAtCurrentViewSize(t){let e=t.breakpoint,o=this.viewModel?.view?.ui;if(!o)return!1;let{width:i,height:a}=o;if(Number.isNaN(i)||Number.isNaN(a)||typeof e!="object")return!1;let n=typeof e.width=="number"&&i<=(e.width??0),r=typeof e.height=="number"&&a<=(e.height??0);return n||r}_setDockEnabledForViewSize(t){this.viewModel?.view?.ready&&typeof t.breakpoint=="object"&&(this.dockEnabled=this._shouldDockAtCurrentViewSize(t))}render(){let{_direction:t,dockEnabled:e,currentAlignment:o,currentDockPosition:i,positionStyle:a}=this,{active:n,view:r}=this.viewModel,l=n&&e,s=n&&!e,c=r?.widthBreakpoint,d=r?.heightBreakpoint,y={"aligned-top-center":o==="top-center","aligned-bottom-center":o==="bottom-center","aligned-top-left":o==="top-left"||o==="top-start"&&t==="ltr"||o==="top-end"&&t==="rtl","aligned-bottom-left":o==="bottom-left"||o==="bottom-start"&&t==="ltr"||o==="bottom-end"&&t==="rtl","aligned-top-right":o==="top-right"||o==="top-end"&&t==="ltr"||o==="top-start"&&t==="rtl","aligned-bottom-right":o==="bottom-right"||o==="bottom-end"&&t==="ltr"||o==="bottom-start"&&t==="rtl","is-docked":l,shadow:s,"is-rtl":this._direction==="rtl","is-docked-top-start":i==="top-start","is-docked-top-end":i==="top-end","is-docked-top-left":i==="top-left","is-docked-top-center":i==="top-center","is-docked-top-right":i==="top-right","is-docked-bottom-left":i==="bottom-left","is-docked-bottom-center":i==="bottom-center","is-docked-bottom-right":i==="bottom-right","is-docked-bottom-start":i==="bottom-start","is-docked-bottom-end":i==="bottom-end","is-xl-width-breakpoint":c==="xlarge","is-lg-width-breakpoint":c==="large","is-md-width-breakpoint":c==="medium","is-sm-width-breakpoint":c==="small","is-xs-width-breakpoint":c==="xsmall","is-xl-height-breakpoint":d==="xlarge","is-lg-height-breakpoint":d==="large","is-md-height-breakpoint":d==="medium","is-sm-height-breakpoint":d==="small","is-xs-height-breakpoint":d==="xsmall"};return b`<div style=${D(a)} class=${v(k("root",y,{hidden:!n||!a&&!e}))} .ariaHidden=${!n} .ariaLabel=${B(this.heading??"")} popover=manual ${u(this._containerNode)}>${this._renderMainContainer()}${this._renderPointer()}</div>`}_renderPointer(){return!this.dockEnabled||!this.active?b`<div class="pointer" role=presentation><div class=${v(k("pointer-direction","shadow"))} ${u(this._pointerNode)}></div></div>`:null}_renderMainContainer(){let t={shadow:this.dockEnabled},e={...this.messageOverrides,collapse:this.messageOverrides?.collapse??this.messages.collapse,expand:this.messageOverrides?.expand??this.messages.expand};return b`<div class=${v(k("main-container",t))} ${u(this._mainContainerNode)}><arcgis-features-next .collapsed=${this.collapsed} .autoDestroyDisabled=${this.autoDestroyDisabled} .featureNavigationTop=${this._featureNavigationTop} .focusTrapEnabled=${!this.focusTrapDisabled} .headingLevel=${this.headingLevel} .hideActionBar=${this.hideActionBar} .hideCloseButton=${this.hideCloseButton} .hideFeatureListLayerTitle=${this.hideFeatureListLayerTitle} .hideFeatureMenuHeading=${this.hideFeatureMenuHeading} .hideFeatureNavigation=${this.hideFeatureNavigation} .hideHeading=${this.hideHeading} .hideSpinner=${this.hideSpinner} @arcgisPropertyChange=${this._handleArcgisPropertyChange} @arcgisTriggerAction=${this._handleArcgisTriggerAction} @arcgisClose=${this._handleClose} .messageOverrides=${e} .referenceElement=${this.referenceElement} .responsiveActionsEnabled=${!0} .showCollapseButton=${!this.hideCollapseButton} .viewModel=${this.viewModel} ${u(this._featuresComponent)}><slot name=actions-start slot=actions-start></slot><slot name=actions-end slot=actions-end></slot></arcgis-features-next></div>`}};A("arcgis-popup",C);return C},"popup/FeatureContentCollection","applications/Components/stringUtils","core/reactiveUtils","support/actions/ActionButton",a,c,d,e,g,i)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{a as k}from"./5L5UYV3H.js";import{c as S}from"./TN5C3MSL.js";import e from"./3T7L7UT5.js";import{a as O}from"./2BVXNQ3U.js";import d from"./2FM2FJAY.js";import c from"./YHNRTH56.js";import{a as R,e as B}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import a from"./SDWFNKIL.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{N as F,Q as b,T as E,a as C,b as u,w as v,y as x}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([{property:c,subclass:H},j,_,{ignoreAbortErrors:V},{watch:g,on:M,whenOnce:I},W,U,K,Q,q,J,X,Y,{fetchPopupFeaturesFromGraphics:T},,,,G])=>{var Z=C`:host{width:100%;height:100%;padding:var(--calcite-space-none);margin:var(--calcite-space-none);display:flex;--internal-attribution-height: 16px;--arcgis-internal-presentation-padding-start: unset;--arcgis-internal-presentation-padding-end: unset;--arcgis-internal-presentation-cover-padding-top: unset;--arcgis-internal-presentation-cover-padding-bottom: unset;--arcgis-internal-presentation-cover-padding-start: unset;--arcgis-internal-presentation-cover-padding-end: unset}p{padding:0;margin:0}.root{display:flex;flex-direction:column;justify-content:space-between;width:100%;height:100%}.presentation-content{display:flex;width:100%;justify-content:flex-end;padding-top:var(--calcite-space-lg);padding-inline-start:calc(var(--calcite-space-lg) + var(--arcgis-internal-presentation-padding-start));padding-inline-end:calc(var(--calcite-space-lg) + var(--arcgis-internal-presentation-padding-end))}.navigation-container{display:flex;flex-direction:column;margin-inline-start:var(--calcite-space-lg);margin-block:auto calc(var(--calcite-space-lg) + var(--arcgis-internal-attribution-space-top));width:fit-content;height:100%}.navigation{width:fit-content;display:flex;align-items:center;background-color:var(--calcite-color-surface-2);box-shadow:var(--arcgis-internal-box-shadow);pointer-events:auto}.navigation-slide-list-container{position:relative;height:100%;min-height:0;margin-block-start:var(--calcite-space-lg)}.slide-list-action-container{height:100%;align-content:center;border-inline-end:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.slide-list-action{padding-inline:var(--calcite-space-sm)}.slide-counter-text{display:flex;align-items:center;justify-content:center;gap:var(--calcite-space-base);font-size:var(--calcite-font-size-md)}.slide-counter-text-element{box-sizing:border-box;max-width:28px;margin:0;padding:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-variant-numeric:tabular-nums;min-width:var(--calcite-spacing-md);text-align:center}.legend-container{pointer-events:all;box-shadow:var(--calcite-shadow-sm);max-width:300px;height:auto;max-height:calc(100vh - 136px);overflow:hidden auto}.legend{padding:var(--esri-widget-padding);background-color:var(--calcite-color-surface-2)}`,ee=Object.defineProperty,te=Object.getOwnPropertyDescriptor,d=(i,e,t,s)=>{for(var n=s>1?void 0:s?te(e,t):e,a=i.length-1,r;a>=0;a--)(r=i[a])&&(n=(s?r(e,t,n):r(n))||n);return s&&n&&ee(e,t,n),n},l=class extends j{constructor(i){super(i),this.transitionActive=!1,this.showLegend=!1,this.keyboardNavigationEnabled=!1,this._subscribeToSlideEvents=e=>{this._unsubscribeToSlideEvents(e),e.forEach(t=>{let s=t.on("apply-slide-start",()=>this._onApplySlideStart(t)),n=t.on("apply-slide-complete",()=>this._onApplySlideComplete(t)),a=t.on("apply-slide-cancel",()=>this._onApplySlideCancel(t));this.addHandles(s,t.id),this.addHandles(n,t.id),this.addHandles(a,t.id)})},this._unsubscribeToSlideEvents=e=>{e.forEach(t=>{this.hasHandles(t.id)&&this.removeHandles(t.id)})}}initialize(){this.addHandles(g(()=>this.view?.map,(i,e)=>{if(this.hasHandles("sceneLoaded")&&this.removeHandles("sceneLoaded"),e){let t=e.presentation?.slides;t&&t.length>0&&this._unsubscribeToSlideEvents(t)}i&&this.addHandles(g(()=>i.loaded,t=>{t&&(this.removeHandles("sceneLoaded"),this._startWatchSlides(),this._slideId&&this._applySlideById(this._slideId))},{initial:!0}),"sceneLoaded")},{initial:!0}))}destroy(){this._unsubscribeToSlideEvents(this.slides)}get slideId(){return this._slideId}set slideId(i){i===void 0||!this.view?.map?.loaded?this._slideId=i:this._applySlideById(i)}get visibleSlides(){return this.view?.map?.presentation?.slides?.filter(i=>!i.hidden)??new _}get slides(){return this.view?.map?.presentation?.slides??new _}get lastSlideSelected(){return this.getSlideIndexBySlideId(this.slideId)===this.visibleSlides.length-1}get firstSlideSelected(){return this.getSlideIndexBySlideId(this.slideId)===0}get slideSelected(){return this.getSlideIndexBySlideId(this.slideId)>-1}get hasOnlyOneSlide(){return this.visibleSlides.length===1}get slideIndex(){return this.getSlideIndexBySlideId(this.slideId)}getSlideIndexBySlideId(i){let e=-1;return i&&(e=this.visibleSlides.findIndex(t=>t.id===i)),e}navigateInPresentation(i){let e=this.slideIndex+i,t=this._getSlideBySlideIndex(e);t??=this._getSlideBySlideIndex(0),t&&this.applySlide(t)}captureArrowKeysForNavigation(i,e){let t=["ArrowLeft","ArrowRight","PageUp","PageDown"];if(document.activeElement?.nodeName.toLowerCase()==="arcgis-scene"||!t.includes(i.code))return;let s=e==="rtl"?"ArrowRight":"ArrowLeft",n=i.code===s||i.code==="PageUp"?-1:1;this.navigateInPresentation(n)}async setSliceAnalysisInteractive(i){if(!this.view?.analyses?.length)return;let e=this.view.analyses.find(s=>s.type==="slice"&&s.origin?.type==="web-scene");if(!e)return;let t=await this.view.whenAnalysisView(e);t&&(t.interactive=i)}getSlideBySlideId(i){return this.visibleSlides.find(e=>e.id===i)}async applySlide(i,e,t){if(this.view){let s=t?{signal:t?.signal}:{};await V(i.applyTo(this.view,{...s,animate:!e}))}}_getSlideBySlideIndex(i){if(i!=null&&i>=0&&i<this.visibleSlides.length)return this.visibleSlides.getItemAt(i)}async _applySlideById(i){let e=i?this.getSlideBySlideId(i):void 0;e&&await this.applySlide(e)}_startWatchSlides(){this._subscribeToSlideEvents(this.slides),this.addHandles(M(()=>this.slides,"change",i=>{this._subscribeToSlideEvents(new _(i.added)),this._unsubscribeToSlideEvents(new _(i.removed))},{onListenerAdd:this._subscribeToSlideEvents,onListenerRemove:this._unsubscribeToSlideEvents}))}_onApplySlideStart(i){this._slideId=i.id,this.transitionActive=!0,this.showLegend=!1,this.onApplySlideStart?.(i)}_onApplySlideComplete(i){this.transitionActive=!1,this.showLegend=!!i.elements.legendInfo?.visible,this.onApplySlideComplete?.(i)}_onApplySlideCancel(i){this.transitionActive=!1,this.showLegend=!!i.elements.legendInfo?.visible,this.onApplySlideCancel?.(i)}};d([c()],l.prototype,"_slideId",2);d([c()],l.prototype,"view",2);d([c()],l.prototype,"slideId",1);d([c()],l.prototype,"transitionActive",2);d([c()],l.prototype,"showLegend",2);d([c()],l.prototype,"keyboardNavigationEnabled",2);d([c()],l.prototype,"visibleSlides",1);d([c()],l.prototype,"slides",1);d([c()],l.prototype,"lastSlideSelected",1);d([c()],l.prototype,"firstSlideSelected",1);d([c()],l.prototype,"slideSelected",1);d([c()],l.prototype,"hasOnlyOneSlide",1);d([c()],l.prototype,"onApplySlideStart",2);d([c()],l.prototype,"onApplySlideComplete",2);d([c()],l.prototype,"onApplySlideCancel",2);d([c()],l.prototype,"getSlideIndexBySlideId",1);l=d([H("components.presentation.PresentationViewModel")],l);var A=class extends x{constructor(e){super(e)}hostLoaded(){this.component.manager.onLifecycle(()=>{let e=this.component;I(()=>e.referenceElement).then(t=>{this._isArcgisScene(t)&&(this._sceneRef=t)})})}openPopup(e){this.component.view&&this.component.slideId===e.id&&e.elements.popupInfo!=null&&this._preparePopupFeature(this.component.view,e.elements.popupInfo).then(({success:t,features:s,popupInfo:n})=>{this.component.slideId===e.id&&(t?this._handlePopupFeatureFound(e,s,n):this.component.arcgisPopupFeatureNotFound.emit({slide:e}))})}_isArcgisScene(e){return e===void 0||typeof e=="string"?!1:"tagName"in e&&e.tagName==="ARCGIS-SCENE"}closePopup(e){(!this.component.slidePopupDisabled||e)&&this._sceneRef?.closePopup()}async _handlePopupFeatureFound(e,t,s){let n=s?.location??void 0;this.component.arcgisPopupFeaturesRetrieved.emit({slide:e,features:t,location:n}),this.component.slidePopupDisabled||await this._sceneRef?.openPopup({features:t,location:n})}async _preparePopupFeature(e,t){let s=[];if(!t.features?.length||t.features.length===0)return{success:!1,features:s};let n=t.features?.getItemAt(t.selectedFeatureIndex)?.layerReference;if(n?.layerId==null)return{success:!1,features:s};let{layer:a,sublayer:r}=this._getLayersFromView(e,n.layerId,n?.sublayerId);if(!a)return{success:!1,features:s};let p=r??a;if(!p||!this._layerTypeSupportsCapturePopup(p))return{success:!1,features:s};if(s=await this._fetchFeaturesFromQueryable(e,t,a,r,p),s&&this._featureHasBeenFilledWithAttributes(s)){let o=s[0];return this._setFallbackPopupTemplate(o,r,a),this._setFallbackGeometry(o,t?.location),{success:!0,features:s,popupInfo:t}}return{success:!1,features:s}}_getLayersFromView(e,t,s){let n=e.map?.findLayerById(t)??void 0,a=this._getBuildingSceneLayerSublayer(n,s);return{layer:n,sublayer:a}}_getBuildingSceneLayerSublayer(e,t){let s;return e&&this._isLayer(e)&&this._isBuildingSceneLayer(e)&&t!=null&&(s=e.allSublayers.find(n=>n.id===t&&n.type==="building-component")),s}_featureHasBeenFilledWithAttributes(e){return e&&e.length>0&&e[0].attributes&&Object.entries(e[0].attributes)?.length>1}async _fetchFeaturesFromQueryable(e,t,s,n,a){let r=t.features?.getItemAt(t.selectedFeatureIndex);if(r?.id==null)return await Promise.resolve([]);let p=await e.whenLayerView(s);await I(()=>!p.updating);let o=this._tryGetBuildingComponentSublayerView(s,n,p)??p;await I(()=>!o.updating);let h=this._createFeatureGraphic(s,n,a,r.id),y=await T(o,[h]);return this._featureHasBeenFilledWithAttributes(y)||(await I(()=>!e.updating),y=await T(o,[h])),y}_tryGetBuildingComponentSublayerView(e,t,s){let n;return this._isLayer(e)&&this._isBuildingSceneLayer(e)&&t!=null&&(n=s.sublayerViews.find(a=>a.sublayer.id===t.id)),n}_setFallbackPopupTemplate(e,t,s){e.popupTemplate==null&&(e.popupTemplate=t?.popupTemplate?t.popupTemplate:s.popupTemplate)}_setFallbackGeometry(e,t){e.geometry==null&&t&&(e.geometry=t.clone())}_createFeatureGraphic(e,t,s,n){let a=this._getGlobalIdFieldNameFromLayer(s),r=n.type==="global-id"&&a?a:s.objectIdField,p=this._getGraphicOrigin(e,t),o=new W({attributes:{},layer:e,origin:p});return o.attributes[r]=n.value,o}_getGraphicOrigin(e,t){switch(e.type){case"csv":return new K(e);case"feature":return new Y(e);case"geojson":return new Q(e);case"scene":return new q(e);case"wfs":return new J(e);case"building-scene":return t?new X(t):void 0;default:return}}_layerTypeSupportsCapturePopup(e){return e!=null&&["csv","feature","geojson","wfs","scene","building-component"].includes(e.type)}_isLayer(e){return!!e&&e instanceof U}_isBuildingSceneLayer(e){return e?.type==="building-scene"}_getGlobalIdFieldNameFromLayer(e){return e.fields?.find(t=>t.type==="global-id")?.name}},ie=i=>new A(i),m=Object.freeze({width:0,height:0}),w=new WeakMap,f=()=>({topCenter:{...m},topLeft:{...m},topRight:{...m},bottomCenter:{...m},bottomLeft:{...m},bottomRight:{...m}}),D=i=>({topCenter:{...i.topCenter},topLeft:{...i.topLeft},topRight:{...i.topRight},bottomCenter:{...i.bottomCenter},bottomLeft:{...i.bottomLeft},bottomRight:{...i.bottomRight}}),N=i=>{let e=w.get(i);return e||(e={observedGroups:new Map,observedSizes:f(),subscribers:new Set},w.set(i,e)),e},se=i=>{let e=i?.topCenter.value,t=i?.topLeft.value,s=i?.topRight.value,n=i?.bottomCenter.value,a=i?.bottomLeft.value,r=i?.bottomRight.value;return e&&t&&s&&n&&a&&r?{topCenter:e,topLeft:t,topRight:s,bottomCenter:n,bottomLeft:a,bottomRight:r}:null},ne=(i,e)=>S.every(t=>i.get(t)===e[t]),ae=i=>{let e=D(i.observedSizes);i.subscribers.forEach(t=>t(e))},re=(i,e)=>{let t=w.get(i);if(!t)return;let s=!1;e.forEach(n=>{let a=S.find(y=>t.observedGroups.get(y)===n.target);if(!a)return;let{width:r,height:p}=n.contentRect,o={width:r,height:p},h=t.observedSizes[a];h.width===o.width&&h.height===o.height||(t.observedSizes[a]=o,s=!0)}),s&&ae(t)},L=(i,e)=>{let t=N(i);t.resizeObserver||(t.resizeObserver=new ResizeObserver(n=>{re(i,n)}));let s=se(e);if(!s){t.observedGroups.size>0&&(t.resizeObserver.disconnect(),t.observedGroups.clear());return}ne(t.observedGroups,s)||(t.resizeObserver.disconnect(),t.observedGroups.clear(),S.forEach(n=>{let a=s[n];t.observedGroups.set(n,a),t.resizeObserver?.observe(a)}))},le=(i,e)=>{let t=N(i);return t.subscribers.add(e),e(D(t.observedSizes)),()=>{let s=w.get(i);s&&(s.subscribers.delete(e),s.subscribers.size===0&&(s.resizeObserver?.disconnect(),s.observedGroups.clear(),w.delete(i)))}},P=class extends x{#e;#t;#i;constructor(e){super(e),this.exports=f()}hostDisconnected(){this.#i?.(),this.#i=void 0,this.#t=void 0,this.#e=void 0,this.exports=f()}hostLifecycle(){return[g(()=>this.#s(),e=>{if(this.#t!==e){if(this.#i?.(),this.#i=void 0,this.#t=e,this.#e=e?.slotGroupRefs,!e){this.exports=f();return}this.#i=le(e,t=>{this.#n(t)||(this.exports=t)}),L(e,this.#e)}},{sync:!0,initial:!0}),g(()=>this.#s()?.slotGroupRefs,e=>{this.#e=e,this.#t&&e&&L(this.#t,e)},{sync:!0,initial:!0})]}#s(){let{referenceElement:e}=this.component;return e&&typeof e!="string"?e:void 0}hostUpdated(){!this.#t||!this.#e||L(this.#t,this.#e)}#n(e){let t=this.exports??f();return S.every(s=>{let n=t[s],a=e[s];return n.width===a.width&&n.height===a.height})}},oe=R(P),de=G(l),$=class extends F{constructor(){super(...arguments),this._messages=O(),this._direction=B(),this.#e=de(this),this.#i=e=>{this.#e.captureArrowKeysForNavigation(e,this._direction)},this.#s=ie(this),this.#a=null,this.#l=e=>{this.#s.closePopup(),this.arcgisSlideApplyStart.emit({slide:e})},this.#o=e=>{this.#s.openPopup(e),this.sliceAnalysisInteractive&&this.#e.setSliceAnalysisInteractive(!0),this.arcgisSlideApplyComplete.emit({slide:e})},this.#d=e=>{this.sliceAnalysisInteractive&&this.#e.setSliceAnalysisInteractive(!0),this.arcgisSlideApplyCancel.emit({slide:e})},this.#c=e=>{let t=e.detail?.selectedSlide;if(!t)return;this.#n?.abort(),this.#n=new AbortController;let s=Date.now(),n=this.#a!==null&&s-this.#a<300;if(this.#a=s,this.#e.applySlide(t,n,this.#n),n){this._showSlideList=!1;return}setTimeout(()=>{this.#n?.signal.aborted||(this._showSlideList=!1,this.#e.applySlide(t,!1,this.#n))},300)},this.#r=()=>{this._showSlideList=!1},this._showSlideList=!1,this.autoDestroyDisabled=!1,this.view=this.#e.view,this.visualScale="m",this.keyboardNavigationEnabled=!1,this.slidePopupDisabled=!1,this.slideCaptionsDisabled=!1,this.slideLegendDisabled=!1,this.sliceAnalysisInteractive=!1,this.navigationHidden=!1,this.arcgisPopupFeatureNotFound=v(),this.arcgisPopupFeaturesRetrieved=v(),this.arcgisReady=v(),this.arcgisSlideApplyCancel=v(),this.arcgisSlideApplyComplete=v(),this.arcgisSlideApplyStart=v()}static{this.properties={_slotSizesController:16,_showSlideList:16,slideId:1,autoDestroyDisabled:5,view:0,visualScale:1,keyboardNavigationEnabled:5,slidePopupDisabled:5,slideCaptionsDisabled:5,slideLegendDisabled:5,sliceAnalysisInteractive:5,navigationHidden:5}}static{this.styles=Z}#e;#t;#i;#s;#n;#a;#l;#o;#d;#c;#r;#h;#p;get slideId(){return this.#e.slideId}set slideId(e){this.#e.slideId=e}async destroy(){await this.manager.destroy()}loaded(){this.#e.onApplySlideStart=this.#l,this.#e.onApplySlideComplete=this.#o,this.#e.onApplySlideCancel=this.#d,this.#m();let e=this;this.manager.onLifecycle(()=>[g(()=>this.slidePopupDisabled,t=>{if(this.slideId&&!t){let s=this.#e.getSlideBySlideId(this.slideId);s&&this.#s?.openPopup(s)}else t&&this.#s?.closePopup(!0)}),g(()=>this.sliceAnalysisInteractive,t=>{this.#e.setSliceAnalysisInteractive(t)},{initial:!0}),g(()=>e.referenceElement,t=>{this.#u(t)&&(this._slotSizesController=oe(this),this.#p=this.#g())},{once:!0,initial:!0}),{remove:()=>{document.removeEventListener("keydown",this.#i),this.#h?.removeEventListener("arcgisSlideListClose",this.#r),this.#t?.remove(),this.#p?.remove(),this.#n?.abort()}}])}#u(e){return e===void 0||typeof e=="string"?!1:"tagName"in e&&e.tagName==="ARCGIS-SCENE"}#g(){return g(()=>this._slotSizesController,e=>this.#v(e?.topLeft,e?.topRight,e?.bottomLeft,e?.bottomRight),{initial:!0})}#v(e,t,s,n){let a=this._direction==="ltr"?e?.width??0:t?.width??0,r=this._direction==="ltr"?t?.width??0:e?.width??0,p=Math.max(e?.height??0,t?.height??0),o=Math.max(s?.height??0,n?.height??0);a>0?this.el.style.setProperty("--arcgis-internal-presentation-padding-start",`calc(var(--calcite-space-lg) + ${a.toString()}px)`):this.el.style.setProperty("--arcgis-internal-presentation-padding-start","0px"),r>0?this.el.style.setProperty("--arcgis-internal-presentation-padding-end",`calc(var(--calcite-space-lg) + ${r.toString()}px)`):this.el.style.setProperty("--arcgis-internal-presentation-padding-end","0px");let h=a<=Math.max(p,o)&&r<=Math.max(p,o);this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-top",h?"0":`${p}px`),this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-bottom",h?"0":`${o}px`),this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-start",h?`${a}px`:"0"),this.el.style.setProperty("--arcgis-internal-presentation-cover-padding-end",h?`${r}px`:"0")}#m(){this.#t=g(()=>this.keyboardNavigationEnabled,e=>{document.removeEventListener("keydown",this.#i),e&&document.addEventListener("keydown",this.#i)},{initial:!0})}render(){if(this.#e?.visibleSlides?.length===0)return u`<div></div>`;let e=this.#e.visibleSlides.find(a=>a.id===this.slideId),t=this.#y(),s=this.#S(e),n=this.#f();return u`<div class="root"><div class="presentation-content">${s}${n}</div>${t}</div>`}#y(){if(this.navigationHidden)return null;let e=this.#e.lastSlideSelected&&!this.#e.hasOnlyOneSlide,t=this.#w();return u`<div class="navigation-container"><div class="navigation-slide-list-container">${t}</div><div class="navigation"><div class="slide-list-action-container"><calcite-action id=${k} class="slide-list-action" .text=${this._messages.slideList??""} selection-appearance=highlight icon=list .scale=${this.visualScale==="l"?"m":"s"} .label=${this._messages.slideList} title=${this._messages.slideList??b} .active=${this._showSlideList} @click=${()=>this._showSlideList=!this._showSlideList}></calcite-action></div><calcite-button appearance=transparent icon-start=chevron-left icon-flip-rtl=start kind=neutral .scale=${this.visualScale} .disabled=${this.#e.firstSlideSelected||!this.#e.slideSelected} .label=${this._messages.previous} title=${this._messages.previous??b} @click=${()=>this.#e.navigateInPresentation(-1)}></calcite-button><div class="slide-counter-text">${this.#b()}</div><calcite-button appearance=transparent icon-start=${e?"reset":"chevron-right"} icon-flip-rtl=start kind=neutral .scale=${this.visualScale} .label=${e?this._messages.restart:this._messages.next} title=${(e?this._messages.restart:this._messages.next)??b} @click=${()=>this.#e.navigateInPresentation(1)}></calcite-button></div></div>`}#b(){let e=this.#e.slideIndex+1,t=this._messages?.slideNavAriaText?.replace("${index}",e.toString()).replace("${numberOfSlides}",this.#e.visibleSlides.length.toString());return this.#e.slideSelected?u`<p role=banner aria-label=${t??b} aria-live=polite><div class="slide-counter-text-element" data-testId=arcgis-map-presentation-slideIndex>${e}</div><div>/</div><p class="slide-counter-text-element" data-testId=arcgis-map-presentation-numberOfSlides>${this.#e.visibleSlides.length}</p></p>`:u`<p role=banner data-testId=arcgis-map-presentation-numberOfSlides>${this.#e.visibleSlides?.length} ${this._messages?.slides}</p>`}#S(e){return this.slideCaptionsDisabled?null:u`<arcgis-presentation-captions .slide=${e} .transitionActive=${this.#e.transitionActive}></arcgis-presentation-captions>`}#f(){return this.slideLegendDisabled||!this.#e.showLegend?null:u`<calcite-panel data-testid=presentation-legend class="legend-container" .heading=${this._messages.legend} closable @calcitePanelClose=${()=>this.#e.showLegend=!1}><arcgis-legend class="legend" .view=${this.view} @arcgisReady=${e=>e.stopPropagation()}></arcgis-legend></calcite-panel>`}#w(){return this._showSlideList?u`<arcgis-presentation-slide-list .slides=${this.#e.visibleSlides} .slideId=${this.#e.slideId} .label=${this._messages.slideList} .visualScale=${this.visualScale} @arcgisSlideListItemSelected=${this.#c} @arcgisSlideListOutsideClick=${this.#r}></arcgis-presentation-slide-list>`:null}};E("arcgis-presentation",$);return $},"core/accessorSupport/decorators","core/Accessor","core/Collection","core/promiseUtils","core/reactiveUtils","Graphic","layers/Layer","graphic/CSVGraphicOrigin","graphic/GeoJSONGraphicOrigin","graphic/SceneGraphicOrigin","graphic/WFSGraphicOrigin","graphic/BuildingGraphicOrigin","graphic/FeatureGraphicOrigin","applications/SceneViewer/sceneViewerUtils",a,c,d,e)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import g from"./TSZ26CSX.js";import{a as b}from"./MZBCC5YA.js";import{a as c}from"./TN5C3MSL.js";import{a as f}from"./BXP5RGPD.js";import e from"./2FM2FJAY.js";import"./3AQ6NC3C.js";import"./A4X5YDA6.js";import d from"./SDWFNKIL.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{L as n,M as o,N as m,O as h,T as p,b as a,w as r}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([A,{watch:s},D,M,R,{c:u,d:g,e:d,f:y},{a:t,b:w,f:v},{a:V,b:_,c:C,d:E}])=>{var I=w(R,{}),k=w(M,{}),l=class extends m{constructor(){super(),this._attributionMode=null,this._containerRef=n(),this._mapRef=n(),this._uiController=new V(this),this._cameraProperties={},this.arcgisLoadError=C(this),this.arcgisViewReadyError=E(this),this._map=I(this),this.view=k(this),this.allLayerViews=this.view.allLayerViews,this.alphaCompositingEnabled=this.view.alphaCompositingEnabled,this.analyses=this.view.analyses,this.animationsDisabled=this.view.animationsEnabled,this.autoDestroyDisabled=!1,this.basemap=this._map.basemap,this.basemapView=this.view.basemapView,this.canZoomIn=this.view.canZoomIn,this.canZoomOut=this.view.canZoomOut,this.clippingArea=this.view.clippingArea,this.constraints=this.view.constraints,this.displayFilterDisabled=this.view.displayFilterEnabled,this.environment=this.view.environment,this.fatalError=this.view.fatalError,this.floors=this.view.floors,this.graphics=this.view.graphics,this.ground=this._map.ground,this.groundView=this.view.groundView,this.highlights=this.view.highlights,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.qualityProfile=this.view.qualityProfile,this.ready=this.view.ready,this.selectionManager=this.view.selectionManager,this.slotGroupRefs=this._uiController.slotGroupRefs,this.spatialReference=this.view.spatialReference,this.suspended=this.view.suspended,this.theme=this.view.theme,this.timeExtent=this.view.timeExtent,this.updating=this.view.updating,this.viewingMode=this.view.viewingMode,this.visibleArea=this.view.visibleArea,this.arcgisViewAnalysisViewCreate=t(()=>this.view,"analysis-view-create"),this.arcgisViewAnalysisViewCreateError=t(()=>this.view,"analysis-view-create-error"),this.arcgisViewAnalysisViewDestroy=t(()=>this.view,"analysis-view-destroy"),this.arcgisViewChange=r(),this.arcgisViewClick=t(()=>this.view,"click"),this.arcgisViewDoubleClick=t(()=>this.view,"double-click"),this.arcgisViewDoubleTapDrag=t(()=>this.view,"double-tap-drag"),this.arcgisViewDrag=t(()=>this.view,"drag"),this.arcgisViewHold=t(()=>this.view,"hold"),this.arcgisViewImmediateClick=t(()=>this.view,"immediate-click"),this.arcgisViewImmediateDoubleClick=t(()=>this.view,"immediate-double-click"),this.arcgisViewKeyDown=t(()=>this.view,"key-down"),this.arcgisViewKeyUp=t(()=>this.view,"key-up"),this.arcgisViewLayerviewCreate=t(()=>this.view,"layerview-create"),this.arcgisViewLayerviewCreateError=t(()=>this.view,"layerview-create-error"),this.arcgisViewLayerviewDestroy=t(()=>this.view,"layerview-destroy"),this.arcgisViewMouseWheel=t(()=>this.view,"mouse-wheel"),this.arcgisViewPointerDown=t(()=>this.view,"pointer-down"),this.arcgisViewPointerEnter=t(()=>this.view,"pointer-enter"),this.arcgisViewPointerLeave=t(()=>this.view,"pointer-leave"),this.arcgisViewPointerMove=t(()=>this.view,"pointer-move"),this.arcgisViewPointerUp=t(()=>this.view,"pointer-up"),this.arcgisViewReadyChange=r(),this.arcgisViewVerticalTwoFingerDrag=t(()=>this.view,"vertical-two-finger-drag"),_(this),this.view.ui={components:[]}}static{this.properties={_map:16,aria:0,view:32,allLayerViews:32,alphaCompositingEnabled:5,analyses:0,animationsDisabled:5,attributionItems:32,attributionMode:1,autoDestroyDisabled:5,basemap:1,basemapView:0,camera:0,cameraFov:9,cameraHeading:9,cameraPosition:1,cameraTilt:9,canZoomIn:36,canZoomOut:36,center:1,clippingArea:0,constraints:0,displayFilterDisabled:5,environment:0,extent:0,fatalError:0,floors:0,focusAreas:0,gamepad:32,graphics:0,ground:1,groundView:32,hideAttribution:5,highlights:0,interacting:32,itemId:3,layerViews:32,magnifier:32,map:0,navigating:32,navigation:0,padding:0,performanceInfo:32,popup:0,popupElement:32,popupDisabled:5,popupComponentEnabled:5,qualityProfile:1,ready:36,resolution:32,selectionManager:32,scale:9,slotGroupRefs:32,spatialReference:0,stationary:32,suspended:39,theme:0,timeExtent:0,updating:36,viewingMode:1,viewpoint:0,visibleArea:32,zoom:9,loadErrorSources:0}}static{this.styles=[f,b]}get aria(){return this.view?.aria??null}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 camera(){return this.view.camera}set camera(i){u(this.camera,i)||(this.view.camera=i)}get cameraFov(){let{view:i}=this;return i.ready?this.view.camera?.fov:this._cameraProperties.fov}set cameraFov(i){i!=null&&this._mutateCamera(e=>{e.fov=i})}get cameraHeading(){let{view:i}=this;return i.ready?i.camera?.heading:this._cameraProperties.heading}set cameraHeading(i){i!=null&&this._mutateCamera(e=>{e.heading=i})}get cameraPosition(){let{view:i}=this;if(i.ready)return i.camera?.position;let{position:e}=this._cameraProperties;return e?new D(e):void 0}set cameraPosition(i){let e=y(this.view.camera?.position,i);e&&this._mutateCamera(P=>{P.position=e})}get cameraTilt(){let{view:i}=this;return i.ready?i.camera?.tilt:this._cameraProperties.tilt}set cameraTilt(i){i!=null&&this._mutateCamera(e=>{e.tilt=i})}get center(){return this.view.center}set center(i){let e=d(i,this.view);e&&(this.view.center=e)}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){v(this._map,this),this._map.portalItem={id:i},this.view.map=this._map}get navigating(){return this.view.navigating}get performanceInfo(){return this.view.performanceInfo}get popupElement(){return this._uiController.popupElement||null}get resolution(){return this.view.resolution}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){g(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,e){return this.view.fetchPopupFeatures(i,e)}async destroy(){await this.manager.destroy()}async goTo(i,e){return await this.view.goTo(i,e)}async hitTest(i,e){return await this.view.hitTest(i,e)}async openPopup(i){this._uiController.openPopup(i)}async takeScreenshot(i){return await this.view.takeScreenshot(i)}toMap(i,e){return this.view.toMap(i,e)}toScreen(i){return this.view.toScreen(i)}async tryFatalErrorRecovery(){this.view.tryFatalErrorRecovery()}async viewOnReady(i,e){return await this.componentOnReady(),await this.view.whenReady().then(()=>i?.()).catch(e)}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,e=>{e&&(this._map=e)},{initial:!0,sync:!0}),s(()=>this.view.stationary,()=>this.arcgisViewChange.emit(),{initial:!0}),s(()=>this.view.ready,e=>{e&&(this.camera=this.view.camera.clone().set(this._cameraProperties),this._cameraProperties={}),this.arcgisViewReadyChange.emit()},{initial:this.view.ready}),s(()=>this.view.attributionHeight,e=>{this._uiController.handleAttributionHeightChange(e)},{initial:!0})])}_mutateCamera(i){if(!this.view.ready){i(this._cameraProperties);return}let e=this.view.camera?.clone()??new A;i(e),this.camera=e}renderMain(){return a`<div class=${h(c.base)} ${o(this._mapRef)}></div>`}render(){return a`${this.renderMain()}<section class=${h(c.containerUI)} ${o(this._containerRef)}>${this._uiController.render()}</section>`}};p("arcgis-scene",l);return l},"Camera","core/reactiveUtils","geometry/Point","views/SceneView","WebScene",d,e,g)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import e from"./TSZ26CSX.js";import{a as E}from"./MZBCC5YA.js";import{a as g}from"./TN5C3MSL.js";import{a as A}from"./BXP5RGPD.js";import d from"./FHWOIM57.js";import"./VJVKFKSG.js";import b from"./2FM2FJAY.js";import"./3AQ6NC3C.js";import"./A4X5YDA6.js";import a from"./SDWFNKIL.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{L as w,M as v,N as _,O as m,T as f,b as p,w as c}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:n},P,U,{fetchKnowledgeGraph:x},Q,{isAbortError:R},z,{d:V,e:I},{a:i,b:d,f:C},{b:u},{a:L,b:M,c:k,d:D}])=>{var Z=d(U,{}),F=d(P,{}),y=class extends _{constructor(){super(),this._attributionMode=null,this._containerRef=w(),this._mapRef=w(),this._uiController=new L(this),this._activeLoadAbortController=null,this.arcgisLoadError=k(this),this.arcgisViewReadyError=D(this),this._map=Z(this),this._baseCypherQuery="",this._serviceUrl="",this._propItemId="",this.view=F(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.graphics=this.view.graphics,this.highlights=this.view.highlights,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.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.arcgisViewAnalysisViewCreate=i(()=>this.view,"analysis-view-create"),this.arcgisViewAnalysisViewCreateError=i(()=>this.view,"analysis-view-create-error"),this.arcgisViewAnalysisViewDestroy=i(()=>this.view,"analysis-view-destroy"),this.arcgisViewChange=c(),this.arcgisViewClick=i(()=>this.view,"click"),this.arcgisViewDoubleClick=i(()=>this.view,"double-click"),this.arcgisViewDoubleTapDrag=i(()=>this.view,"double-tap-drag"),this.arcgisViewDrag=i(()=>this.view,"drag"),this.arcgisViewHold=i(()=>this.view,"hold"),this.arcgisViewImmediateClick=i(()=>this.view,"immediate-click"),this.arcgisViewImmediateDoubleClick=i(()=>this.view,"immediate-double-click"),this.arcgisViewKeyDown=i(()=>this.view,"key-down"),this.arcgisViewKeyUp=i(()=>this.view,"key-up"),this.arcgisViewLayerviewCreate=i(()=>this.view,"layerview-create"),this.arcgisViewLayerviewCreateError=i(()=>this.view,"layerview-create-error"),this.arcgisViewLayerviewDestroy=i(()=>this.view,"layerview-destroy"),this.arcgisViewMouseWheel=i(()=>this.view,"mouse-wheel"),this.arcgisViewPointerDown=i(()=>this.view,"pointer-down"),this.arcgisViewPointerEnter=i(()=>this.view,"pointer-enter"),this.arcgisViewPointerLeave=i(()=>this.view,"pointer-leave"),this.arcgisViewPointerMove=i(()=>this.view,"pointer-move"),this.arcgisViewPointerUp=i(()=>this.view,"pointer-up"),this.arcgisViewReadyChange=c(),this.arcgisViewVerticalTwoFingerDrag=i(()=>this.view,"vertical-two-finger-drag"),M(this),this.view.ui={components:[]}}static{this.properties={_map:16,_baseCypherQuery:16,_serviceUrl:16,_propItemId: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,focusAreas:0,graphics:0,hideAttribution:5,highlights:0,interacting:32,itemId:3,baseCypherQuery:3,serviceUrl: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,selectionManager:32,scale:9,slotGroupRefs:32,spatialReference:0,stationary:32,suspended:39,theme:0,timeExtent:0,timeZone:1,updating:36,viewpoint:0,zoom:9,loadErrorSources:0}}static{this.styles=[A,E]}get aria(){return this.view?.aria}set aria(e){this.view&&(this.view.aria=e)}get attributionItems(){return this.view?.attributionItems??[]}get attributionMode(){return this._attributionMode}set attributionMode(e){this._attributionMode=e,e!=="auto"&&(this.view.attributionMode=e)}get center(){return this.view.center}set center(e){let t=I(e,this.view);t&&(this.view.center=t)}get extent(){return this.view.extent}set extent(e){this.extent?.equals(e)||(this.view.extent=e)}get focusAreas(){return this.map?this.map?.focusAreas:{areas:[],style:"bright"}}set focusAreas(e){this.map&&(this.map.focusAreas=e)}get hideAttribution(){return!this.view.attributionVisible}set hideAttribution(e){this.view.attributionVisible=!e}get interacting(){return this.view.interacting}get itemId(){return this._map.portalItem?.id}set itemId(e){this._propItemId=e}get baseCypherQuery(){return this._baseCypherQuery}set baseCypherQuery(e){this._baseCypherQuery=e}get serviceUrl(){return this._serviceUrl}set serviceUrl(e){this._serviceUrl=e}get navigating(){return this.view.navigating}get popupElement(){return this._uiController.popupElement||null}get scale(){return this.view.scale}set scale(e){this.view.scale=e}get stationary(){return this.view.stationary}get viewpoint(){return this.view.viewpoint}set viewpoint(e){V(this.viewpoint,e)&&(this.view.viewpoint=e)}get zoom(){return this.view.zoom}set zoom(e){this.view.zoom=e}async closePopup(){this._uiController.closePopup()}async fetchPopupFeatures(e,t){return this.view.fetchPopupFeatures(e,t)}async destroy(){await this.manager.destroy()}async goTo(e,t){return await this.view.goTo(e,t)}async openPopup(e){this._uiController.openPopup(e)}toMap(e){return this.view.toMap(e)}toScreen(e,t){return this.view.toScreen(e,t)}async tryFatalErrorRecovery(){this.view.tryFatalErrorRecovery()}async viewOnReady(e,t){return await this.componentOnReady(),await this.view.whenReady().then(()=>e?.()).catch(t)}async whenAnalysisView(e){return await this.view.whenAnalysisView(e)}async whenLayerView(e){return await this.view.whenLayerView(e)}async zoomIn(){this.view.zoomIn()}async zoomOut(){this.view.zoomOut()}loaded(){let e=this;e.el.childElem=this._mapRef.value,this.view.container??=e.el.childElem,s.setLocalPublicMap(this,this._map),this.manager.onLifecycle(()=>[n(()=>this.map,t=>{t&&s.setLocalPrivateMap(this,t)},{initial:!0,sync:!0}),n(()=>this.view.stationary,()=>this.arcgisViewChange.emit(),{initial:!0}),n(()=>this.view.ready,()=>this.arcgisViewReadyChange.emit(),{initial:this.view.ready}),n(()=>this.view.attributionHeight,t=>{this._uiController.handleAttributionHeightChange(t)},{initial:!0})])}willUpdate(e){let t=()=>{this._activeLoadAbortController?.abort();let a=new AbortController;return this._activeLoadAbortController=a,a};if(e.has("_propItemId")||e.has("_serviceUrl")||e.has("_baseCypherQuery")){if(e.has("_propItemId")&&this._propItemId||e.has("_propItemId")&&!this._serviceUrl)t(),s.reCreateAccessor(this._map,this),s.setPortalItem(this._map,this._propItemId),s.setMap(this.view,this._map);else if(!this._propItemId)if(this._serviceUrl&&!this._baseCypherQuery){let a=t();s.fetchKnowledgeGraph(this._serviceUrl).then(l=>{let h=new s.WebLinkChart,o=new s.LinkChartLayer({url:l.url});o.load({signal:a?.signal});try{u(a.signal),h.add(o),this._setLinkChartAndZoom(h)}catch(b){if(!R(b))throw b}})}else if(this._baseCypherQuery&&this._serviceUrl){let a=t();s.fetchKnowledgeGraph(this._serviceUrl).then(l=>{s.WebLinkChart.fromCypherQuery(l,new Q({openCypherQuery:this._baseCypherQuery}),void 0,{signal:a?.signal}).then(async h=>{try{u(a.signal),this._setLinkChartAndZoom(h)}catch(o){if(!R(o))throw o}})})}else!this._serviceUrl&&e.has("_serviceUrl")&&(t(),s.setMap(this.view,null))}}_setLinkChartAndZoom(e){s.reCreateAccessor(this._map,this),s.setLocalPrivateMap(this,e),s.setMap(this.view,e),this._map&&this.view.when(()=>{e.diagramNodesExtent&&this.view.goTo(e.diagramNodesExtent)})}renderMain(){return p`<div class=${m(g.base)} ${v(this._mapRef)}></div>`}render(){return p`${this.renderMain()}<section class=${m(g.containerUI)} ${v(this._containerRef)}>${this._uiController.render()}</section>`}},s={fetchKnowledgeGraph:async r=>await x(r),WebLinkChart:U,LinkChartLayer:z,setMap:(r,e)=>{r.map=e},setLocalPrivateMap:(r,e)=>{r._map=e},setLocalPublicMap:(r,e)=>{r.map||=e},setPortalItem(r,e){r.portalItem={id:e}},reCreateAccessor:C};f("arcgis-link-chart",y);return{ArcgisLinkChart:y,exportsForTests:s}},"core/reactiveUtils","views/LinkChartView","WebLinkChart","rest/knowledgeGraphService","rest/knowledgeGraph/GraphQueryStreaming","core/promiseUtils","layers/LinkChartLayer",a,b,d,e)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{e as m}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{N as g,T as p,b as t}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:v}])=>{var n=class extends g{constructor(){super(...arguments),this._direction=m(),this._disabled=!1,this._playing=!1}static{this.properties={_disabled:16,_playing:16,_isLive:16,viewModel:0,messages:0,inline:7}}loaded(){this.manager.onLifecycle(()=>[v(()=>[this.viewModel.state,this.viewModel.playing],()=>{let{state:i,playing:e}=this.viewModel;this._disabled=i==="not-ready"||i==="waiting",this._playing=e},{initial:!0}),v(()=>this.viewModel.layer?.isLive,i=>{this._isLive=i??void 0},{initial:!0})])}render(){let{viewModel:i,messages:e,_disabled:a,_playing:c}=this,s=this._isLive,h=this._direction==="rtl",l=t`<calcite-action .active=${c} alignment=center .disabled=${a} .icon=${c?"pause-f":"play-f"} @click=${c?()=>i.pause():()=>i.play()} scale=s .text=${c?e.pause:e.play}></calcite-action>`,$=s?void 0:t`<calcite-action alignment=center .disabled=${a} icon=reverse-f @click=${()=>i.seekBackward()} scale=s .text=${e.reverse}></calcite-action>`,y=s?void 0:t`<calcite-action alignment=center .disabled=${a} icon=forward-f @click=${()=>i.seekForward()} scale=s .text=${e.forward}></calcite-action>`,o=s?void 0:t`<calcite-action alignment=center .disabled=${a} icon=beginning-f @click=${()=>i.seekToBeginning()} scale=s .text=${e.beginning}></calcite-action>`,r=s?void 0:t`<calcite-action alignment=center .disabled=${a} icon=end-f @click=${()=>i.seekToEnding()} scale=s .text=${e.end}></calcite-action>`,d=this.inline?[o,l,r]:[o,$,l,y,r];return h&&d.reverse(),t`<calcite-action-bar expand-disabled layout=horizontal scale=s>${d}</calcite-action-bar>`}};p("arcgis-video-player-actions-group",n);return n},"core/reactiveUtils")
|
|
2
|
+
import{e as m}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{N as g,T as p,b as t}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:v}])=>{var n=class extends g{constructor(){super(...arguments),this._direction=m(),this._disabled=!1,this._playing=!1}static{this.properties={_disabled:16,_playing:16,_isLive:16,viewModel:0,messages:0,inline:7}}loaded(){this.manager.onLifecycle(()=>[v(()=>[this.viewModel.state,this.viewModel.playing],()=>{let{state:i,playing:e}=this.viewModel;this._disabled=i==="not-ready"||i==="waiting",this._playing=e},{initial:!0}),v(()=>this.viewModel.layer?.isLive,i=>{this._isLive=i??void 0},{initial:!0})])}render(){let{viewModel:i,messages:e,_disabled:a,_playing:c}=this,s=this._isLive,h=this._direction==="rtl",l=t`<calcite-action .active=${c} alignment=center .disabled=${a} .icon=${c?"pause-f":"play-f"} @click=${c?()=>i.pause():()=>i.play()} scale=s .text=${c?e.pause:e.play}></calcite-action>`,$=s?void 0:t`<calcite-action alignment=center .disabled=${a} icon=reverse-f @click=${()=>i.seekBackward()} scale=s .text=${e.reverse}></calcite-action>`,y=s?void 0:t`<calcite-action alignment=center .disabled=${a} icon=forward-f @click=${()=>i.seekForward()} scale=s .text=${e.forward}></calcite-action>`,o=s?void 0:t`<calcite-action alignment=center .disabled=${a} icon=beginning-f @click=${()=>i.seekToBeginning()} scale=s .text=${e.beginning}></calcite-action>`,r=s?void 0:t`<calcite-action alignment=center .disabled=${a} icon=end-f @click=${()=>i.seekToEnding()} scale=s .text=${e.end}></calcite-action>`,d=this.inline?[o,l,r]:[o,$,l,y,r];return h&&d.reverse(),t`<calcite-action-bar expand-toggle-disabled layout=horizontal scale=s>${d}</calcite-action-bar>`}};p("arcgis-video-player-actions-group",n);return n},"core/reactiveUtils")
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{a as V}from"./4MJJOPAL.js";import{a as R}from"./I4VCDQAJ.js";import{a as N}from"./LTOXLO3L.js";import{a as L}from"./Z24LPE5P.js";import{a as z}from"./2BVXNQ3U.js";import"./JD74LG7K.js";import c from"./YHNRTH56.js";import{g as A}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import a from"./SDWFNKIL.js";import"./QUZTFUWM.js";import{d as F}from"./4W3T75SY.js";import{A as I,M as b,N as C,O as D,Q as w,T as U,a as T,b as o,w as v}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([Z,E,x,j,H,M,{property:p,subclass:G},{isHTTPSProtocol:f,isDataProtocol:y},{formatDate:P,convertDateFormatToIntlOptions:q},{watch:B},,{a:O}])=>{var J=Object.defineProperty,K=Object.getOwnPropertyDescriptor,k=(s,e,t,i)=>{for(var r=i>1?void 0:i?K(e,t):e,a=s.length-1,n;a>=0;a--)(n=s[a])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&J(e,t,r),r},h=class extends M{constructor(s){super(s)}get editedBookmark(){let{bookmark:s}=this;return s?this._get("editedBookmark")||s.clone():null}get customUrl(){if(this._customUrl)return this._customUrl;let s=this.editedBookmark?.thumbnail?.url??"";return s??(f(s)?s:null)}set customUrl(s){this._customUrl=s}get screenshotUrl(){if(this._screenshotUrl)return this._screenshotUrl;let s=this.editedBookmark?.thumbnail?.url??"";return s??(y(s)?s:null)}set screenshotUrl(s){this._screenshotUrl=s}get state(){return this._get("state")}set state(s){this.validationState=void 0,this.creatingBookmark=void 0,this._set("state",s)}get thumbnailState(){if(this._thumbnailState)return this._thumbnailState;let s=this.editedBookmark?.thumbnail?.url;return s?f(s)?"url":"screenshot":"none"}set thumbnailState(s){this._thumbnailState=s}};k([p()],h.prototype,"bookmark",2);k([p({readOnly:!0})],h.prototype,"editedBookmark",1);k([p()],h.prototype,"_customUrl",2);k([p()],h.prototype,"customUrl",1);k([p()],h.prototype,"_screenshotUrl",2);k([p()],h.prototype,"screenshotUrl",1);k([p()],h.prototype,"state",1);k([p()],h.prototype,"_thumbnailState",2);k([p()],h.prototype,"thumbnailState",1);k([p()],h.prototype,"validationState",2);k([p()],h.prototype,"creatingBookmark",2);h=k([G("UserState")],h);var Q=T`.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{display:flex;flex:1 1 auto;overflow:hidden auto;transition:max-height .25s ease-in-out}:host([closed]) .root{display:none}.empty{display:flex;flex-flow:column wrap;align-items:center;padding:var(--calcite-spacing-md) var(--calcite-spacing-lg);text-align:center;color:var(--calcite-color-text-1)}.root .arcgis-widget__content--empty{background-color:var(--calcite-color-foreground-2)}.root calcite-flow-item[loading]{min-height:150px}.loader{margin-inline-end:0}.filter-no-results{padding:var(--calcite-spacing-md) var(--calcite-spacing-lg)}.bookmark-image-container{display:flex;position:relative;margin:0;margin-inline-start:var(--calcite-spacing-xs);min-width:16px;min-height:16px}.bookmark-image-container .bookmark-image{max-width:64px;overflow:hidden}.drag-enabled .bookmark-image-container{margin-inline-start:0}.no-bookmarks-heading{margin:0;margin-block-start:var(--calcite-spacing-md);font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-relative-tight);font-weight:var(--calcite-font-weight-regular)}.authoring{display:flex;flex-direction:column}.authoring-image-container{display:flex;align-items:middle;justify-content:center;margin-block-end:var(--calcite-spacing-md);margin-inline-end:var(--calcite-spacing-lg);background-image:repeating-conic-gradient(#ccc 0% 25%,#fff 0% 50%);background-position:0 0,10px 10px;background-size:20px 20px;background-color:#fff;width:128px;height:128px;text-align:center}.authoring-image-container .bookmark-image{max-width:128px;max-height:128px}.form{display:flex;height:100%}.form-content{padding-block:var(--calcite-spacing-md);padding-inline:var(--calcite-spacing-lg)}.authoring-refresh-thumbnail-button{margin-block-end:var(--calcite-spacing-md)}.bookmark-content-label{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-sm);line-height:var(--calcite-font-line-height-relative-normal)}.bookmark-content calcite-table{margin-inline-start:-.25rem}.bookmark-content calcite-table,.bookmark-content calcite-table-row{--calcite-table-border-color: transparent;--calcite-color-text-1: var(--calcite-color-text-3);--calcite-table-row-background-color: transparent;pointer-events:none}`,W=E.ofType(Z),X={width:128,height:128,format:"png"},$={takeScreenshot:!0,captureViewpoint:!0,captureRotation:!0,captureScale:!0,captureTimeExtent:!0},S=class extends C{constructor(){super(...arguments),this._bookmarks=null,this._defaultCreateOptions={...$},this._defaultEditOptions={...$},this._defaultBookmarks=new W,this._guid=I(),this._addInputNode=null,this._editInputNode=null,this._urlEditInputNode=null,this._lastDragDetail=null,this.messages=z({}),this._storeEditFlowItemNode=e=>{this._editFlowItemEl=e},this._storeRootFlowItem=e=>{this._rootFlowItemEl=e},this._storeAddFlowItemNode=e=>{this._addFlowItemEl=e},this._updateTimeExtentLayout=e=>{let t=e[0]?.contentRect.width;this._useStackedTimeExtentRows=(t??0)<300},this._activeBookmark=null,this._userState=null,this._userCreatingBookmark=!1,this.editIncludeTimeExtent=!1,this._useStackedTimeExtentRows=!1,this.view=O(this),this.icon="bookmark",this.closed=!1,this.disabled=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterText="",this.headingLevel=2,this.showAddBookmarkButton=!1,this.showCloseButton=!1,this.showCollapseButton=!1,this.showEditBookmarkButton=!1,this.showFilter=!1,this.showHeading=!1,this.hideThumbnail=!1,this.hideTime=!1,this.timeDisabled=!1,this.autoDestroyDisabled=!1,this.state=this._state,this.arcgisBookmarkEdit=v(),this.arcgisBookmarkSelect=v(),this.arcgisPropertyChange=A()("state"),this.arcgisReady=v(),this.arcgisClose=v()}static{this.properties={_bookmarkSelectedMessage:16,_activeBookmark:16,_userState:16,_userStateValue:16,_userValidationState:16,_userThumbnailState:16,_userCreatingBookmark:16,editIncludeTimeExtent:16,_useStackedTimeExtentRows:16,_state:16,view:0,referenceElement:1,icon:1,closed:7,defaultCreateOptions:0,defaultEditOptions:0,bookmarks:[1,{type:E}],disabled:5,dragEnabled:5,filterPlaceholder:1,filterText:1,headingLevel:9,goToOverride:0,showAddBookmarkButton:5,showCloseButton:5,showCollapseButton:5,showEditBookmarkButton:5,showFilter:5,showHeading:5,hideThumbnail:5,hideTime:5,timeDisabled:5,autoDestroyDisabled:5,messageOverrides:0,label:1,state:32}}static{this.styles=[Q,R]}get _state(){let{view:e}=this;return e&&!e.ready?"loading":"ready"}get defaultCreateOptions(){return this._defaultCreateOptions}set defaultCreateOptions(e){this._defaultCreateOptions={...$,...e}}get defaultEditOptions(){return this._defaultEditOptions}set defaultEditOptions(e){this._defaultEditOptions={...$,...e}}get bookmarks(){return this._bookmarks??this.view?.map?.bookmarks??this._defaultBookmarks}set bookmarks(e){this._bookmarks=E.isCollection(e)?e:new E(e)}async destroy(){await this.manager.destroy(),this._activeBookmark=null}goTo(e){let{view:t}=this;if(!t)throw new x("go-to:invalid-view","Cannot go to a bookmark without a view");let i=e?.viewpoint;if(!i)throw new x("go-to:invalid-bookmark","Cannot go to a bookmark that does not contain a 'viewpoint'.",{bookmark:e});this._activeBookmark=e;let r=V({target:i},t,this.goToOverride),a=e?.timeExtent;return!this.timeDisabled&&a&&(t.timeExtent=a),this.arcgisBookmarkSelect.emit({bookmark:e}),this._bookmarkSelectedMessage=this.messages?.bookmarkSelected?.replace("{bookmarkName}",e.name),r.catch(()=>{}).then(()=>this._activeBookmark=null),r}connectedCallback(){super.connectedCallback(),this._resizeObserver=new ResizeObserver(this._updateTimeExtentLayout),this._resizeObserver.observe(this.el)}loaded(){this.manager.onLifecycle(()=>[B(()=>this._userState?.state,e=>this._userStateValue=e,{initial:!0}),B(()=>this._userState?.validationState,e=>this._userValidationState=e,{initial:!0}),B(()=>this._userState?.thumbnailState,e=>this._userThumbnailState=e,{initial:!0}),B(()=>this._userState?.creatingBookmark,e=>this._userCreatingBookmark=!!e,{initial:!0})])}disconnectedCallback(){this._resizeObserver?.disconnect(),this._resizeObserver=void 0,super.disconnectedCallback()}async _createBookmark(e){let{view:t,defaultCreateOptions:i}=this;if(!t)throw new x("create-bookmark:invalid-view","Cannot create a bookmark without a view.");let{takeScreenshot:r,screenshotSettings:a,captureViewpoint:n,captureRotation:l,captureScale:u,captureTimeExtent:d}={...i,...e},c=r?await this._createThumbnail(a):void 0,m=!this.timeDisabled&&d&&t.timeExtent!=null?t.timeExtent.clone():void 0;return new Z({...c&&{thumbnail:c},...d&&{timeExtent:m},...n&&{viewpoint:this._createViewpoint({view:t,captureScale:u,captureRotation:l})}})}async _editBookmark(e,t){if(!e)return e;let{view:i,defaultEditOptions:r}=this;if(!i)throw new x("edit-bookmark:invalid-view","Cannot edit a bookmark without a view.");let{takeScreenshot:a,screenshotSettings:n,captureViewpoint:l,captureRotation:u,captureScale:d,captureTimeExtent:c}={...r,...t},m=a?await this._createThumbnail(n):void 0;return m&&(e.thumbnail=m),l&&(e.viewpoint=this._createViewpoint({view:i,captureScale:d,captureRotation:u})),c&&i.timeExtent!=null&&(e.timeExtent=i.timeExtent.clone()),this.arcgisBookmarkEdit.emit({bookmark:e}),e}async _createThumbnail(e){let{view:t}=this;if(!t)throw new x("bookmark:invalid-view","Cannot create slide thumbnail without a view");let i=await t.takeScreenshot({...X,...e});return new j({url:i.dataUrl})}_createViewpoint({view:e,captureRotation:t,captureScale:i}){let r=e.viewpoint?.clone();return new H({targetGeometry:e.extent?.clone(),rotation:(t?r?.rotation:null)??0,scale:(i?r?.scale:null)??0})}_handleClose(){this.closed=!0,this.arcgisClose.emit()}startAddBookmark(){this._userState=new h({state:"add"}),requestAnimationFrame(()=>{this._addFlowItemEl?.setFocus()})}_clearState(){this._userState=null}_getTimeExtentStrings(e){let{hideTime:t}=this,{timeExtent:i}=e;if(!i)return{};let{start:r,end:a}=i,n=a!=null&&r?.getTime()!==a.getTime(),l=r?this._formatDate(r):"",u=r&&!t?this._formatTime(r):"";if(!n)return{startDate:l,startTime:u};let d=this._formatDate(a),c=t?"":this._formatTime(a);return{startDate:l,startTime:u,endDate:d,endTime:c}}_handleUrlEditInputChange(){let{_userState:e,_urlEditInputNode:t}=this,i=t?.value;if(!e?.editedBookmark||!i)return;e.validationState=void 0,y(e.editedBookmark.thumbnail?.url??"")&&(e.screenshotUrl=e.editedBookmark.thumbnail?.url);let r={url:i};f(r.url)&&(e.customUrl=i,e.editedBookmark.thumbnail=r)}_getBookmarkTitle(e){return(e?.name||this.messages.untitled)??""}_formatDate(e){if(!e)return"";let t=this.view,i=t&&"timeZone"in t?t.timeZone:"system";return P(e,{...q("short-date"),timeZone:i})}_formatTime(e){if(!e)return"";let t=this.view,i=t&&"timeZone"in t?t.timeZone:"system";return P(e,{...q("long-time"),timeZone:i})}_onCalciteListOrderChange(e){let{_lastDragDetail:t,bookmarks:i}=this,{toEl:r,fromEl:a,dragEl:n,newIndex:l}=e;if(!i.length)return;let u=t?.newIndex===l&&t?.dragEl===n&&t?.toEl===r&&t?.fromEl===a;if(!a||!r||u)return;this._lastDragDetail=e;let d=Array.from(a.children).filter(c=>c?.matches("calcite-list-item")).map(c=>c.value);i.sort((c,m)=>{let _=d.indexOf(c.uid),g=d.indexOf(m.uid);return _>g?1:_<g?-1:0})}_endAddBookmark(){this._clearState(),this._focusRootFlowItem()}_showEditBookmarkForm(e){e&&(this.editIncludeTimeExtent=!!e.timeExtent,this._userState=new h({bookmark:e,state:"edit"}),requestAnimationFrame(()=>{this._editFlowItemEl?.setFocus()}),this.goTo(e))}async _createNewScreenshotUrl(){return(await this._createBookmark()).thumbnail?.url??null}_storeCurrentUrl(){let{_userState:e}=this,t=e?.editedBookmark?.thumbnail?.url;t&&(f(t)?e.customUrl=t:y(t)&&(e.screenshotUrl=t))}async _handleThumbnailTypeSelect(e){let{_userState:t}=this;if(!t)return;let{screenshotUrl:i,customUrl:r,editedBookmark:a}=t,n=e==="screenshot"?i??await this._createNewScreenshotUrl():e==="url"&&r?r:null;this._storeCurrentUrl(),a&&n&&(a.thumbnail={url:n}),t.validationState=void 0,t.thumbnailState=e}_focusRootFlowItem(){requestAnimationFrame(()=>{this._rootFlowItemEl?.setFocus()})}_closeEditBookmarkForm(){this._clearState(),this._focusRootFlowItem()}_addBookmarkSubmitClick(e){e.preventDefault(),this._addBookmarkSubmit()}async _addBookmarkSubmit(){let{_addInputNode:e,_userState:t,bookmarks:i}=this;if(!t)return;let r=e?e.value.trim():null;if(!r){t.validationState="name-required";return}t.creatingBookmark=!0;let a=await this._createBookmark();a.name=r,i.add(a),this._endAddBookmark()}async _editBookmarkAndClose(e,t){let{defaultEditOptions:i}=this;await this._editBookmark(e,{...i,...t}),this._closeEditBookmarkForm()}_editBookmarkSubmit(e){e.preventDefault();let{_userState:t,_editInputNode:i,editIncludeTimeExtent:r,_urlEditInputNode:a}=this;if(!t?.bookmark||!t.editedBookmark)return;t.validationState=void 0,t.customUrl=void 0,t.screenshotUrl=void 0;let n=i?.value.trim();if(!n){t.validationState="name-required";return}if(t.bookmark.name=n,t.bookmark.thumbnail=t.editedBookmark.thumbnail,r||(t.bookmark.timeExtent=null),t.thumbnailState==="url"&&a){let l={url:a.value};if(!f(l.url)){t.validationState="absolute-url-required";return}t.bookmark.thumbnail=l}else t.thumbnailState==="none"&&(t.bookmark.thumbnail=null);this._editBookmarkAndClose(t.bookmark,{takeScreenshot:!1,captureTimeExtent:r})}_storeEditInput(e){this._editInputNode=e}_storeAddInput(e){this._addInputNode=e}_storeUrlEditInput(e){this._urlEditInputNode=e}_deleteBookmark(e){this._closeEditBookmarkForm(),e&&(this.bookmarks.remove(e),e.destroy())}_goToBookmark(e){this._clearState(),this.goTo(e)}async _updateThumbnail(){let{_userState:e}=this;e&&(e.validationState=void 0,await this._editBookmark(e.editedBookmark,{takeScreenshot:!0,captureViewpoint:!1,captureRotation:!1,captureScale:!1,captureTimeExtent:!1}))}_handleCalciteListDragEnd(e){let{fromEl:t,dragEl:i,oldIndex:r}=e;r==null||!t||!i||t.insertBefore(i,t.children[r])}render(){return o`<div class="root"><div class="sr-only" aria-live=polite>${this._bookmarkSelectedMessage}</div>${this._renderBookmarksContainer()}</div>`}_renderNoBookmarksContainer(e){let{messages:t,_state:i}=this;return!e.length&&i!=="loading"?o`<div class="empty"><calcite-icon .icon=${this.icon} scale=l></calcite-icon>${L({class:"no-bookmarks-heading",level:this.headingLevel,children:t.noBookmarksHeading})}<p class="no-bookmarks-description">${t.noBookmarksDescription}</p></div>`:null}_renderEditBookmarkFlowItems(){let e=this._userStateValue==="edit",t=this._userState?.editedBookmark;return!t||!e?[]:this._renderEditingBookmark(t)}_renderBookmarkItems(e){return e?e.toArray().map(t=>this._renderBookmark(t)):[]}_renderBookmarksContainer(){let{_state:e,bookmarks:t,dragEnabled:i,messages:r,disabled:a,filterPlaceholder:n,filterText:l,closed:u,headingLevel:d}=this,c=t.filter(g=>g!=null),m=c.length?o`<calcite-list class="list" display-mode=flat .dragEnabled=${i} .filterEnabled=${this.showFilter} .filterPlaceholder=${n} .filterProps=${["label","description","metadata"]} .filterText=${l} .group=${`bookmarks-${this._guid}`} .label=${r.componentLabel??""} selection-appearance=border selection-mode=none @calciteListDragEnd=${g=>this._handleCalciteListDragEnd(g.detail)} @calciteListFilter=${g=>this.filterText=g.currentTarget?.filterText??""} @calciteListOrderChange=${g=>this._onCalciteListOrderChange(g.detail)}>${this._renderBookmarkItems(c)}${this.showFilter?o`<div class="filter-no-results" slot=filter-no-results><calcite-notice kind=info open width=full><div slot=message>${r.noBookmarksHeading}</div>;</calcite-notice></div>`:null}</calcite-list>`:null,_=[o`<calcite-flow-item .closable=${this.showCloseButton} .closed=${u} .collapsible=${this.showCollapseButton} .disabled=${a} .heading=${this.showHeading?r.componentLabel:void 0} .headingLevel=${d} .loading=${e==="loading"} .selected=${!this._userStateValue} @calciteFlowItemClose=${this._handleClose} ${b(this._storeRootFlowItem)}>${this._renderNoBookmarksContainer(c)}${m}${this._renderAddBookmarkButton()}</calcite-flow-item>`,this._renderAddingBookmark(),this._renderEditBookmarkFlowItems()];return u?null:o`<calcite-flow>${_}</calcite-flow>`}_renderAddBookmarkButton(){let{messages:e,disabled:t,view:i,_state:r}=this,a=this._userCreatingBookmark;return i&&r!=="loading"&&this.showAddBookmarkButton?o`<calcite-fab appearance=outline-fill class="add-bookmark-button" .disabled=${t||a} icon=plus kind=neutral .loading=${a} @click=${this.startAddBookmark} slot=fab .text=${e.addBookmark} text-enabled title=${e.addBookmark??w}></calcite-fab>`:null}_renderEditContainer(e){let{messages:t}=this,i=`${t.edit} ${this._getBookmarkTitle(e)}`;return this.showEditBookmarkButton?o`<calcite-action icon=pencil @click=${()=>this._showEditBookmarkForm(e)} slot=actions-end .text=${i} title=${i??w}></calcite-action>`:null}_renderBookmarkImage(e,t){return t?o`<img alt class="bookmark-image" src=${e.thumbnail?.url??w}>`:null}_renderBookmarkTimeSwitch(e){let{messages:t,view:i}=this,{timeExtent:r}=e;return i?.timeExtent??r?o`<calcite-label layout=inline-space-between>${t.includeTimeExtent}<calcite-switch .checked=${!!r} @calciteSwitchChange=${a=>{this.editIncludeTimeExtent=a.currentTarget.checked}}></calcite-switch></calcite-label>`:null}_renderEditBookmarkTimeExtent(e){return this.editIncludeTimeExtent?this._renderBookmarkTimeExtent(e):null}_renderTimeExtentDescription(e){let{startDate:t,startTime:i,endDate:r,endTime:a}=this._getTimeExtentStrings(e);if(!t)return"";let n=`${t} ${i}`,l=`${r} ${a}`;return r?`${n} - ${l}`:n}_renderBookmarkTimeExtent(e,t=!1){let{messages:i}=this,{startDate:r,startTime:a,endDate:n,endTime:l}=this._getTimeExtentStrings(e),u=this._useStackedTimeExtentRows&&!!n,d=(m,_,g)=>o`<calcite-table-cell title=${g??""??w}>${m} ${_?[o`<br>`,_]:null}</calcite-table-cell>`,c=[];return r&&c.push({heading:i.startDate,date:r,time:a}),n&&c.push({heading:i.endDate,date:n,time:l}),r?o`<calcite-table .caption=${i.timeExtent??""} scale=s>${u?c.map(m=>o`<calcite-table-row>${t?null:o`<calcite-table-header .heading=${m.heading}></calcite-table-header>`}${d(m.date,m.time,m.heading)}</calcite-table-row>`):[t?null:o`<calcite-table-row slot=table-header><calcite-table-header .heading=${i.startDate}></calcite-table-header>${n?o`<calcite-table-header .heading=${i.endDate}></calcite-table-header>`:null}</calcite-table-row>`,o`<calcite-table-row>${d(r,a,i.startDate)}${n?d(n,l,i.endDate):null}</calcite-table-row>`]}</calcite-table>`:null}_renderBookmarkActiveScrim(e,t){return this._activeBookmark===e&&t?o`<calcite-scrim loading></calcite-scrim>`:null}_renderBookmarkActiveLoader(e,t){return this._activeBookmark===e&&!t?o`<calcite-loader class="loader" inline .label=${this.messages.loading??""}></calcite-loader>`:null}_renderBookmarkImageIcon(e,t){return this._activeBookmark!==e&&!t?o`<calcite-icon icon=bookmark scale=s></calcite-icon>`:null}_renderBookmarkThumbnail(e){let t=!this.hideThumbnail&&!!e.thumbnail?.url;return o`<div class="bookmark-image-container" slot=content-start>${this._renderBookmarkActiveScrim(e,t)}${this._renderBookmarkImage(e,t)}${this._renderBookmarkActiveLoader(e,t)}${this._renderBookmarkImageIcon(e,t)}</div>`}_renderBookmark(e){return N(e.uid,o`<calcite-list-item class=${D(F({"drag-enabled":this.dragEnabled}))} .description=${this._renderTimeExtentDescription(e)} .label=${this._getBookmarkTitle(e)} .value=${e.uid} @calciteListItemSelect=${()=>this._goToBookmark(e)}>${this._renderBookmarkThumbnail(e)}${this._renderBookmarkContent(e)}${this._renderEditContainer(e)}</calcite-list-item>`)}_renderBookmarkContent(e){return o`<div class="bookmark-content" slot=content><span class="bookmark-content-label">${this._getBookmarkTitle(e)}</span>${this._renderBookmarkTimeExtent(e,!0)}</div>`}_renderEditingBookmarkName(e){let{messages:t}=this,i=this._userValidationState==="name-required";return o`<calcite-label>${t.title}<calcite-input class="edit-bookmark-input" name=bookmark-name .placeholder=${t.titlePlaceholder} required type=text .value=${e.name} ${b(this._storeEditInput)}></calcite-input>${i?o`<calcite-input-message icon=exclamation-mark-triangle status=invalid>${t.invalidTitle}</calcite-input-message>`:null}</calcite-label>`}_renderEditingBookmarkActions(){let{messages:e,_userState:t}=this,i=t?.bookmark;return[o`<calcite-button appearance=transparent kind=danger @click=${()=>this._deleteBookmark(i)} slot=footer type=button width=full>${e.delete}</calcite-button>`,o`<calcite-button appearance=outline @click=${this._closeEditBookmarkForm} slot=footer type=button width=full>${e.cancel}</calcite-button>`,o`<calcite-button slot=footer type=submit width=full>${e.save}</calcite-button>`]}_renderEditingTimeExtent(e){let{view:t}=this,{timeExtent:i}=e;return!this.timeDisabled&&(t?.timeExtent??i)?o`<div>${this._renderBookmarkTimeSwitch(e)}${this._renderEditBookmarkTimeExtent(e)}</div>`:null}_renderEditingBookmarkImage(e){let{_userThumbnailState:t}=this,i=e.thumbnail?.url??"",r=f(i)?t==="url":y(i)?t==="screenshot":null;if(r)return this._renderBookmarkImage(e,r)}_renderEditingThumbnail(e){let{_userThumbnailState:t,hideThumbnail:i}=this;return!i&&t!=="none"?o`<div class="authoring-image-container">${this._renderEditingBookmarkImage(e)}</div>`:null}_renderUpdateThumbnailButton(){let{hideThumbnail:e,messages:t,_userThumbnailState:i}=this;return!e&&i==="screenshot"?o`<calcite-button appearance=outline class="authoring-refresh-thumbnail-button" icon-start=refresh kind=neutral @click=${()=>{this._updateThumbnail()}} width=full>${t.updateThumbnail}</calcite-button>`:null}_renderEditingBookmarkUrlInput(e){let{messages:t,_userValidationState:i,_userThumbnailState:r}=this,a=e.thumbnail?.url??"",n=f(a)?a:void 0,l=a&&i==="absolute-url-required";return r==="url"?o`<calcite-label><calcite-input name=bookmark-thumbnail-url pattern=https://.* .placeholder=${t?`https://<${t.imageUrlPlaceholder}>`:void 0} required title=${t.imageUrlTooltip??w} type=text .value=${n} @calciteInputChange=${this._handleUrlEditInputChange} @calciteInputInput=${this._handleUrlEditInputChange} ${b(this._storeUrlEditInput)}></calcite-input>${l?o`<calcite-input-message icon=exclamation-mark-triangle status=invalid>${t.invalidImageUrl}</calcite-input-message>`:null}</calcite-label>`:null}_renderThumbnailSelector(){let{hideThumbnail:e,messages:t,_userThumbnailState:i}=this;return e?null:o`<calcite-label>${t.thumbnail}<calcite-chip-group .label=${t.thumbnail??""} selection-mode=single-persist @calciteChipGroupSelect=${r=>this._handleThumbnailTypeSelect(r.currentTarget.selectedItems[0].value)}><calcite-chip .label=${t.screenshot??""} .selected=${i==="screenshot"} value=screenshot>${t.screenshot}</calcite-chip><calcite-chip .label=${t.url??""} .selected=${i==="url"} value=url>${t.url}</calcite-chip><calcite-chip .label=${t.none??""} .selected=${i==="none"} value=none>${t.none}</calcite-chip></calcite-chip-group></calcite-label>`}_renderEditingBookmark(e){let{disabled:t,messages:i,headingLevel:r}=this;return e?o`<form class="form" @submit=${this._editBookmarkSubmit}><calcite-flow-item .disabled=${t} .heading=${i.edit??""} .headingLevel=${r} .selected=${this._userStateValue==="edit"} @calciteFlowItemBack=${a=>{a.preventDefault(),this._closeEditBookmarkForm()}} ${b(this._storeEditFlowItemNode)}><div class="form-content"><div class="authoring">${this._renderEditingBookmarkName(e)}${this._renderThumbnailSelector()}${this._renderEditingThumbnail(e)}${this._renderEditingBookmarkUrlInput(e)}${this._renderUpdateThumbnailButton()}${this._renderEditingTimeExtent(e)}</div></div>${this._renderEditingBookmarkActions()}</calcite-flow-item></form>`:null}_renderAddingBookmarkName(){let{messages:e}=this,t=this._userValidationState==="name-required";return o`<calcite-label>${e.title}<calcite-input class="add-bookmark-input" name=bookmark-name .placeholder=${e.titlePlaceholder} required type=text value ${b(this._storeAddInput)}></calcite-input>${t?o`<calcite-input-message icon=exclamation-mark-triangle status=invalid>${e.invalidTitle}</calcite-input-message>`:null}</calcite-label>`}_renderAddingBookmarkActions(){let{messages:e}=this;return[o`<calcite-button appearance=outline @click=${this._endAddBookmark} slot=footer type=button width=full>${e.cancel}</calcite-button>`,o`<calcite-button slot=footer type=submit width=full>${e.add}</calcite-button>`]}_renderAddingBookmark(){let{disabled:e,messages:t,headingLevel:i,_userStateValue:r}=this;return r==="add"?o`<form class="form" @submit=${this._addBookmarkSubmitClick}><calcite-flow-item .disabled=${e} .heading=${t.addBookmark} .headingLevel=${i} selected @calciteFlowItemBack=${a=>{a.preventDefault(),this._endAddBookmark()}} ${b(this._storeAddFlowItemNode)}><div class="form-content">${this._renderAddingBookmarkName()}</div>${this._renderAddingBookmarkActions()}</calcite-flow-item></form>`:null}};U("arcgis-bookmarks",S);return S},"webmap/Bookmark","core/Collection","core/Error","webdoc/support/SlideThumbnail","Viewpoint","core/Accessor","core/accessorSupport/decorators","core/urlUtils","intl","core/reactiveUtils",a,c)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import c from"./MZWO5JYA.js";import b from"./FHWOIM57.js";import"./VJVKFKSG.js";import{a as R}from"./2BVXNQ3U.js";import"./3AQ6NC3C.js";import"./A4X5YDA6.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{M as u,N as f,T as v,a as p,b as a,o,q as d,r as y,w as h}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([k,{a:$},{b:b,e:w}])=>{var E=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)}#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)}.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)}`,g={dirtyAreasDiscovered:-2147208511,noValidControllers:-2147208935,pathNotFound:-2147208444},m=class extends f{constructor(){super(...arguments),this._messages=R({blocking:!0}),this.#l=!0,this.#t=[],this.#s=new Map,this.#n=new Map,this.#i=new Map,this.#a=new Map,this.#r=[],this._aggregatedGeometryDisabled=!1,this.aggregatedGeometryGraphicsColor=new k([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=E}#l;#t;#c;#s;#n;#i;#a;#r;get numResults(){return this.traceResultFeatures.length+this.#t.length}clearAggregatedGeometryGraphics(){this.#c?.destroy()}async destroy(){this.#s.clear(),this.#i.clear(),this.#a.clear(),this.#c?.destroy(),this._featuresComponentElement?.destroy(),await this.manager.destroy()}load(){this.traceResult&&(this.#b(),this.#f().then(()=>this.#v()).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,d("utilityNetwork")),this.layers.length||o("warn",this,y("layers")),this.view||o("warn",this,d("view")))}disconnectedCallback(){super.disconnectedCallback(),this.#n.clear()}#d(e){e&&(this.#c=e)}#u(e){e&&(this._featuresComponentElement=e)}async#g([e,t]){let i=this.utilityNetwork?.getLayerIdBySourceId(e),s=this.#m(i),r=this.#p(t);if(i==null||!s){this.#t.push(...r);return}let l=s.createQuery();l.gdbVersion=this.utilityNetwork?.gdbVersion,l.objectIds=r.map(n=>n.objectId),l.outFields=["*"];let{features:c}=await b(s,l);c.forEach(n=>{let C=n.layer;n.getEffectivePopupTemplate(this.#l)||(n.popupTemplate=C.createPopupTemplate())}),w(s)?c.forEach(n=>this.#o(this.#i,n.layer.subtypeCode,n)):this.#s.set(i,c)}#o(e,t,i){let s=e.get(t);s==null?e.set(t,[i]):s.push(i)}#m(e){if(e==null)return;let t=this.#n,i=this.#r,s=t.get(e);if(s)return s;if(!i)return;let r=i.find(l=>"layerId"in l&&l.layerId===e);return r&&t.set(e,r),r}#p(e){return Array.from(new Map(e.map(t=>[t.globalId,t])).values())}#y(e){let{detail:t,target:i}=e;if(t.name==="hideGraphics"){e.stopPropagation();let s=i[t.name];this.arcgisHideGraphicsChange.emit(s)}if(t.name==="graphicsColor"){e.stopPropagation();let s=i[t.name];this.aggregatedGeometryGraphicsColor=s,this.arcgisAggregatedGeometryGraphicsColorChange.emit(s)}}async#f(){let{layers:e,utilityNetwork:t}=this;if(!t)return;try{t.loaded||(this.state="loading",await t.load())}catch(s){$(s,this,"Error while loading the selected utility network")}this.#r=e.filter(s=>t.isUtilityLayer(s));let i=this.#r.filter(s=>!s.loaded).map(s=>s.load());i.length>0&&(this.state="loading",(await Promise.allSettled(i)).forEach(s=>{s.status==="rejected"&&o("error",this,`Failed to load layer. Reason: ${s.reason}`)}))}async#v(){let e=Array.from(this.#a.entries());if(!e.length)return;this.state="loading";let t=e.map(r=>this.#g(r));(await Promise.allSettled(t)).forEach((r,l)=>{if(r.status==="rejected"){let[c]=e[l];o("error",this,`Failed to query features for source ${c}. Reason: ${r.reason}`)}});let i=Array.from(this.#s.values()),s=Array.from(this.#i.values());this.traceResultFeatures=i.concat(s).flat()}#b(){this.traceResult.elements?.forEach(e=>this.#o(this.#a,e.networkSourceId,e))}render(){let{traceError:e,traceResult:t}=this;if(e)return this.#E(e);if(!t)return this.#F();let{elements:i,globalFunctionResults:s,aggregatedGeometry:r}=t,l=!i.length&&!s.length&&!r,c=i.length>0&&!s.length&&!r;return l?this.#x():this.state==="loading"?this.#w():this.hideFeatureResults&&c?this.#R():this.isElementsSelected||c?a`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#l} .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} ${u(this.#u)}></arcgis-features-next>`:this.#$(t)}#w(){return a`<calcite-panel class="white-panel-background"><calcite-loader .label=${this._messages.gettingResults} .text=${this._messages.gettingResults}></calcite-loader></calcite-panel>`}#$(e){let{elements:t,globalFunctionResults:i,aggregatedGeometry:s}=e;return a`<calcite-panel class="white-panel-background">${this.#e()}${s!=null?a`<arcgis-utility-network-aggregated-geometry-result-item auto-destroy-disabled .graphicsColor=${this.aggregatedGeometryGraphicsColor} .traceResult=${e} .view=${this.view} @arcgisPropertyChange=${this.#y} ${u(this.#d)}></arcgis-utility-network-aggregated-geometry-result-item>`:null}${s!=null&&!t.length?this.#C():null}${t.length>0?this.hideFeatureResults?this.#h():this.#k():null}${i.length>0?a`<arcgis-utility-network-trace-functions-result-item .heading=${this._messages.headings.functions} .traceResult=${e}></arcgis-utility-network-trace-functions-result-item>`:null}</calcite-panel>`}#R(){return a`<calcite-panel class="white-panel-background">${this.#e()}${this.#h()}</calcite-panel>`}#h(){return a`<div class="no-selectable-results">${this._messages.resultFeaturesAreHidden}</div>`}#C(){return a`<div class="no-selectable-results">${this._messages.noSelectableFeatures}</div>`}#k(){let{_messages:e}=this;return a`<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>`}#e(){return a`<div class="results-heading"><div class="results-heading-title">${this._messages.headings.traceResultsGeneric}</div>${this.traceConfigTitle?a`<div class="results-heading-subtitle">${this.traceConfigTitle}</div>`:null}</div>`}#E(e){let{_messages:t}=this,i=e.message;switch(e.details?.raw?.extendedCode){case g.dirtyAreasDiscovered:i=t.traceErrors.dirtyAreasDiscovered;break;case g.noValidControllers:i=t.traceErrors.noValidControllers;break;case g.pathNotFound:i=t.traceErrors.pathNotFound;break}return a`<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">${i}</div></div></calcite-panel>`}#x(){let{_messages:e}=this;return a`<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>`}#F(){let{_messages:e}=this;return a`<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>`}};v("arcgis-utility-network-trace-results-next",m);return m},"Color",b,c)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import o from"./XWALVOZP.js";import n from"./C4LCKYWW.js";import"./AG6XG3QV.js";import{a as Q}from"./JCRPP54Z.js";import"./KKBLRTCV.js";import{a as S,b as U,g as G,h as v,j as H,k as q,m as c,n as $}from"./LDDAJOTV.js";import{a as N}from"./RHXVVGD3.js";import{a as m}from"./LTOXLO3L.js";import l from"./7HL2TQ7E.js";import j from"./MZWO5JYA.js";import i from"./FHWOIM57.js";import"./VJVKFKSG.js";import h from"./3T7L7UT5.js";import{a as O}from"./2BVXNQ3U.js";import{a as b}from"./JD74LG7K.js";import{a as k}from"./VNUQ4CCT.js";import f from"./2FM2FJAY.js";import e from"./YHNRTH56.js";import{g as B}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import a from"./SDWFNKIL.js";import"./QUZTFUWM.js";import{d as P}from"./4W3T75SY.js";import{A as M,L as d,M as g,N as R,O as p,Q as _,R as w,T as A,a as C,b as r,w as y}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([se,L,{on:ae,watch:le},,,{a:x},D,,,,,{a:j,b:z,c:J,d:K}])=>{var u={...Q,section:"section",editing:"editing",editingForm:"editing-form"},re=C`:host{--arcgis-layer-list-visibility-icon: hidden}.editing-form{display:flex;height:100%}.editing{padding-block:var(--calcite-spacing-sm);padding-inline:var(--calcite-spacing-sm)}`,V="nested",oe=".*\\S+.*",W="data-basemap-layer-type",ne=D(se),F=class extends R{constructor(){super(...arguments),this._baseListRef=d(),this._referenceListRef=d(),this._editTitleInputRef=d(),this._layerFlowItemRef=d(),this._panelFlowItemRef=d(),this._rootFlowItemRef=d(),this._editingFlowItemRef=d(),this._lastDragDetail=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`basemap-${M()}`,this._openedLayersController=null,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this._focusEditingFlowItem=!1,this.messages=O(),this.viewModel=ne(this),this.arcgisClose=k(this),this._canMove=({dragEl:e,fromEl:t,toEl:i},s)=>{let a=s==="pull"?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,o=c(e,this._allItems);if(!o?.sortable)return!1;let l=c(t,this._allItems),n=$(t),h=c(i,this._allItems),f=$(i),I=!!n&&!!f&&n===f,Y={selected:o,from:l,to:h},Z=t.group,ee=i.group,te=l?.layer?.type??"",ie=h?.layer?.type??"",T=new Set(["map-image","catalog","knowledge-graph"]);return Z&&ee&&typeof a=="function"?a(Y):I&&!T.has(te)&&!T.has(ie)&&o.layer?.type!=="sublayer"},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onTablesOpen=e=>{this.openedLayers.push(e.layer),this._focusLayerFlowItem=e.layer?.uid??null},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent),this._focusLayerFlowItem=e.layer?.uid??null},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0},this._clearActiveItem=()=>{this._activeItem=null},this._setCurrentActiveItem=e=>{this._activeItem=e},this._setActiveItem=e=>{if(this.visibilityAppearance!=="default")return;let t=Array.from(e.composedPath()).find(i=>i.classList?.contains(u.item));this._activeItem=c(t,this._allItems)??null},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._toggleEditingTitle=()=>{let e=!this.editingTitle;this.editingTitle=e,e?this._focusEditingFlowItem=!0:this._focusRootFlowItem=!0},this._formSubmit=e=>{e.preventDefault();let t=this._editTitleInputRef.value?.value;t?.trim()&&(this.basemapTitle=t),this._toggleEditingTitle()},this._activeItem=null,this._tooltipReferenceMap=new Map,this._layerListMap=new Map,this.openedLayerLists=new L,this.autoDestroyDisabled=!1,this.baseFilterText="",this.baseItemCreatedFunction=this.viewModel.baseItemCreatedFunction,this.basemapTitle=this.viewModel.basemapTitle,this.closed=!1,this.collapsed=!1,this.dragEnabled=!1,this.editingTitle=!1,this.filterPlaceholder="",this.headingLevel=2,this.hideBaseLayers=!1,this.hideCatalogLayerList=!1,this.hideHeading=!1,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.hideReferenceLayers=!1,this.hideStatusIndicators=!1,this.icon="layers",this.layerTablesEnabled=new L(["knowledge-graph"]),this.listModeDisabled=this.viewModel.listModeDisabled,this.minFilterItems=U,this.openedLayers=new L,this.referenceFilterText="",this.referenceItemCreatedFunction=this.viewModel.referenceItemCreatedFunction,this.selectedItems=new L,this.selectionMode="none",this.showCloseButton=!1,this.showCollapseButton=!1,this.showEditTitleButton=!1,this.showErrors=!1,this.showFilter=!1,this.showTemporaryLayerIndicators=!1,this.state=this.viewModel.state,this.view=this.viewModel.view,this.visibilityAppearance="default",this.arcgisBaseFilterChange=y(),this.arcgisOpenedLayersChange=y(),this.arcgisPropertyChange=B()("state"),this.arcgisReady=y(),this.arcgisReferenceFilterChange=y(),this.arcgisTriggerAction=x(()=>this.viewModel,"trigger-action")}static{this.properties={_activeItem:16,_catalogLayerList:16,_tableList:16,_tooltipReferenceMap:16,_layerListMap:16,openedLayerLists:16,_allItems:16,_visibleBaseItems:16,_visibleReferenceItems:16,_openedPanelItems:16,_totalBaseItems:16,_totalReferenceItems:16,_baseFilterEnabled:16,_referenceFilterEnabled:16,_renderedOpenLayerFlowItems:16,autoDestroyDisabled:5,baseFilterPredicate:0,baseFilterText:1,baseItemCreatedFunction:0,baseItems:32,basemapTitle:1,catalogLayerList:32,catalogOptions:0,closed:5,collapsed:7,dragEnabled:5,editingTitle:5,filterPlaceholder:1,headingLevel:9,hideBaseLayers:5,hideCatalogLayerList:5,hideHeading:5,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,hideReferenceLayers:5,hideStatusIndicators:5,icon:1,knowledgeGraphOptions:0,label:1,layerTablesEnabled:0,listItemCanGiveFunction:0,listItemCanReceiveFunction:0,listModeDisabled:5,mapImageOptions:0,messageOverrides:0,minFilterItems:9,openedLayers:32,referenceElement:1,referenceFilterPredicate:0,referenceFilterText:1,referenceItems:32,referenceItemCreatedFunction:0,selectedItems:0,selectionMode:1,showCloseButton:5,showCollapseButton:5,showEditTitleButton:5,showErrors:5,showFilter:5,showTemporaryLayerIndicators:5,state:32,tableList:32,tileOptions:0,view:0,visibilityAppearance:1}}static{this.styles=[K,re,J]}get _allItems(){return this.referenceItems.concat(this.baseItems)}get _visibleBaseItems(){return this.baseItems.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _visibleReferenceItems(){return this.referenceItems.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleReferenceItems.concat(this._visibleBaseItems).flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _totalBaseItems(){return this.viewModel.baseItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _totalReferenceItems(){return this.viewModel.referenceItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _baseFilterEnabled(){return this._totalBaseItems>=this.minFilterItems&&this.showFilter}get _referenceFilterEnabled(){return this._totalReferenceItems>=this.minFilterItems&&this.showFilter}get _renderedOpenLayerFlowItems(){return this.openedLayers.toArray().map((e,t)=>this._renderLayerFlowItem(e,t===this.openedLayers.length-1))}get baseItems(){return this.viewModel.baseItems}get catalogLayerList(){return this._catalogLayerList}get referenceItems(){return this.viewModel.referenceItems}get tableList(){return this._tableList}async destroy(){await this.manager.destroy(),this._destroyOpenedLayerLists(),this._tooltipReferenceMap.clear()}loaded(){this.manager.onLifecycle(()=>[ae(()=>this.openedLayers,"change",()=>{this._handleOpenedLayersChange()},{initial:!0}),le(()=>[this.viewModel.referenceItems.toArray(),this.viewModel.baseItems.toArray()],()=>G(this.selectedItems),{initial:!0})])}updated(){v(this._baseListRef.value,this.baseFilterPredicate,this.baseItems),v(this._referenceListRef.value,this.referenceFilterPredicate,this.referenceItems)}triggerAction(e,t){this.viewModel.triggerAction(e,t)}async _createFlowList(e,t){let i=this._layerListMap.get(e);if(i)return i;let s=e.type==="catalog"?await this._createCatalogLayerList(e):await this._createTableList(e);return t.aborted||this._layerListMap.set(e,s),s}async _handleOpenedLayersChange(){let{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this._openedLayersController?.abort();let s=new AbortController,{signal:a}=s;this._openedLayersController=s,e.forEach((n,h)=>{t.includes(h)||(n?.destroy?.(),e.delete(h))});let o=await Promise.all(t.map(n=>this._createFlowList(n,a)));if(a.aborted)return;i.removeAll(),i.addMany(o);let l=i.at(-1);l?"catalogLayer"in l?(this._catalogLayerList=l,this._tableList=void 0):(this._catalogLayerList=void 0,this._tableList=l):(this._catalogLayerList=void 0,this._tableList=void 0),this.arcgisOpenedLayersChange.emit()}_destroyOpenedLayerLists(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}async _createCatalogLayerList(e){let{headingLevel:t,catalogOptions:i,filterPlaceholder:s,minFilterItems:a,selectionMode:o,visibilityAppearance:l,layerTablesEnabled:n}=this;return w(r`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${i?.filterPlaceholder??s} .listItemCreatedFunction=${i?.listItemCreatedFunction} .minFilterItems=${i?.minFilterItems??a} .selectionMode=${i?.selectionMode??o} .visibilityAppearance=${i?.visibilityAppearance??l} .showErrors=${i?.showErrors??this.showErrors} .showFilter=${i?.showFilter??this.showFilter} .hideStatusIndicators=${i?.hideStatusIndicators??this.hideStatusIndicators} .showTemporaryLayerIndicators=${i?.showTemporaryLayerIndicators??this.showTemporaryLayerIndicators} @arcgisReady=${h=>h.stopPropagation()} .catalogLayer=${e} .layerTablesEnabled=${n} .view=${this.view} .referenceElement=${this.referenceElement} @catalogOpen=${this._onCatalogOpen} @tablesOpen=${this._onTablesOpen}></arcgis-catalog-layer-list-next>`)}_getTableListParams(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 _createTableList(e){let t=this._getTableListParams(e);return w(r`<arcgis-table-list-next .headingLevel=${t?.headingLevel??this.headingLevel} .selectionMode=${t?.selectionMode??this.selectionMode} .dragEnabled=${t?.dragEnabled??this.dragEnabled} .collapsed=${t?.collapsed} .filterPlaceholder=${t?.filterPlaceholder} .filterText=${t?.filterText} .icon=${t?.icon??void 0} .label=${t?.label??void 0} .listItemCreatedFunction=${t?.listItemCreatedFunction} .tables=${t?.tables} .referenceElement=${this.referenceElement} @arcgisReady=${i=>i.stopPropagation()}></arcgis-table-list-next>`)}_handlePanelFlowItemBack(e){e.open=!1,this._focusRootFlowItem=!0}_moveLayerFromChildList({toEl:e,fromEl:t,dragEl:i,newIndex:s}){let a=c(i,this._allItems),o=e.hasAttribute("data-item")?c(e,this._allItems):null,l=t.hasAttribute("data-item")?c(t,this._allItems):null,n=X(t),h=X(e);s==null||!a||!n||!h||(this.viewModel.moveItem({targetItem:a,fromParentItem:l,toParentItem:o,newIndex:s,from:n,to:h}),j(this,a.uid,f=>f.parentElement?.closest("calcite-list")===e))}_handleCalciteListDragEnd(e){let{fromEl:t,toEl:i,dragEl:s,oldIndex:a}=e;if(t!==i){s.remove();return}a==null||!t||!s||t.insertBefore(s,t.children[a])}_onCalciteListOrderChange(e){let{_lastDragDetail:t}=this,{toEl:i,fromEl:s,dragEl:a,newIndex:o}=e,l=t?.newIndex===o&&t?.dragEl===a&&t?.toEl===i&&t?.fromEl===s;if(!s||!i||l)return;this._lastDragDetail=e,this._selectedDragItemLayerUid=a.value.layer?.uid??null;let n=s,h=i;if(n===h){let f=Array.from(s.children).filter(I=>I?.matches("calcite-list-item")).map(I=>I.value.layer?.uid??"");this._sortLayers(n,f);return}this._moveLayerFromChildList({toEl:h,fromEl:n,dragEl:a,newIndex:o})}_sortLayers(e,t){if(e===this._referenceListRef.value||e===this._baseListRef.value){let s=e===this._baseListRef.value?this.view?.map?.basemap?.baseLayers:this.view?.map?.basemap?.referenceLayers;H(s,t);return}let i=c(e,this._allItems);i&&q(i,t)}_handleCalciteListChange(e){if(this.selectionMode==="none")return;let t=e.target.selectedItems.map(i=>c(i,this._allItems)).filter(Boolean);this.selectedItems.removeAll(),this.selectedItems.addMany(t)}_focusFlowItem(e,t){return!t||!e?t:(e.setFocus(),!1)}render(){let e={[b.hidden]:this.state==="loading",[b.disabled]:this.state==="disabled"};return r`<div class=${p(P(b.widget,b.panel,e))}>${this._renderItems()}${this._renderItemTooltips()}</div>`}_renderItemTooltip(e){return e?r`<calcite-tooltip overlay-positioning=fixed .referenceElement=${this._tooltipReferenceMap.get(e.layer?.uid??"")}>${this.messages.layerIncompatibleTooltip}</calcite-tooltip>`:null}_renderItemTooltipNodes(e){if(e.incompatible)return this._renderItemTooltip(e);let t=e.children?.filter(i=>!i.hidden).toArray().map(i=>this._renderItemTooltipNodes(i));return t?.length?t:null}_renderItemTooltips(){return this._visibleReferenceItems.concat(this._visibleBaseItems).toArray().map(e=>this._renderItemTooltipNodes(e))}_renderNoLayersInfoMessage(e){return r`<div slot=message>${e}</div>`}_renderNoLayersInfo(e,t){return this.hideNoItemsNotice?null:r`<div class=${p(u.itemMessage)}>${m(t,r`<calcite-notice icon=information kind=info open width=full>${this._renderNoLayersInfoMessage(e)}</calcite-notice>`)}</div>`}_renderEditingInput(){return r`<div class=${p(u.editing)}><calcite-label>${this.messages.basemapTitle}<calcite-input .label=${this.messages.basemapTitle} name=basemaptitle .pattern=${oe} .placeholder=${this.messages.basemapTitle} required title=${this.messages.basemapTitle??_} type=text .value=${this.viewModel.basemapTitle??void 0} ${g(this._editTitleInputRef)}></calcite-input></calcite-label></div>`}_renderEditingForm(){return this.editingTitle?r`<form class=${p(u.editingForm)} @submit=${this._formSubmit}><calcite-flow-item .heading=${this.hideHeading?void 0:this.messages.basemapTitle} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length&&!this._openedPanelItems.length} @calciteFlowItemBack=${e=>{e.preventDefault(),this._toggleEditingTitle()}} ${g(this._editingFlowItemRef)}>${this._renderEditingInput()}<calcite-button appearance=outline @click=${this._toggleEditingTitle} slot=footer-actions width=full>${this.messages.cancel}</calcite-button><calcite-button slot=footer-actions type=submit width=full>${this.messages.ok}</calcite-button></calcite-flow-item></form>`:null}_renderEditTitleButton(){return this.showEditTitleButton&&!this.editingTitle?r`<calcite-action icon=pencil @click=${this._toggleEditingTitle} slot=header-actions-end .text=${this.messages.edit??""} title=${this.messages.edit??_}></calcite-action>`:null}_renderItems(){let e=[m("root-flow-item",r`<calcite-flow-item .closable=${this.showCloseButton} .closed=${this.closed} .collapsed=${this.collapsed} .collapsible=${this.showCollapseButton} .heading=${this.hideHeading?void 0:this.viewModel.basemapTitle??this.messages.componentLabel} .headingLevel=${this.headingLevel} .selected=${!this.editingTitle&&!this.openedLayers.length&&!this._openedPanelItems.length} @calciteFlowItemClose=${()=>{this.closed=!0}} ${g(this._rootFlowItemRef)}>${this._renderEditTitleButton()}${this._renderReferenceSection()}${this._renderBaseSection()}</calcite-flow-item>`),this._renderEditingForm(),this._renderPanelFlowItems(),this._renderedOpenLayerFlowItems];return this._focusRootFlowItem=this._focusFlowItem(this._rootFlowItemRef.value,this._focusRootFlowItem),this._focusEditingFlowItem=this._focusFlowItem(this._editingFlowItemRef.value,this._focusEditingFlowItem),this.closed?null:m("root-flow",r`<calcite-flow>${e}</calcite-flow>`)}_renderPanelFlowItems(){return N(this._openedPanelItems.toArray(),e=>e.uid,(e,t)=>{let{panel:i,title:s}=e,a=()=>this._handlePanelFlowItemBack(i);return this._focusPanelFlowItem=this._focusFlowItem(this._panelFlowItemRef.value,this._focusPanelFlowItem),r`<calcite-flow-item .description=${s} .heading=${i.title} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length&&t===this._openedPanelItems.length-1} @calciteFlowItemBack=${o=>{o.preventDefault(),a()}} ${g(this._panelFlowItemRef)}><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>`})}_renderLayerFlowItem(e,t){let i=e.title||this.messages.untitledLayer;return this._focusLayerFlowItem===e.uid&&(this._focusLayerFlowItem=this._focusFlowItem(this._layerFlowItemRef.value,!0)?e.uid:null),m(e.uid,r`<calcite-flow-item data-layer-uid=${e.uid??_} .description=${i} .heading=${this.messages[e.type==="catalog"?"catalogLayers":"tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${s=>{s.preventDefault(),this.openedLayers.pop();let a=this.openedLayers.at(-1);a?this._focusLayerFlowItem=a.uid:this._focusRootFlowItem=!0}} ${g(this._layerFlowItemRef)}>${this._layerListMap.get(e)}</calcite-flow-item>`)}_renderList(e,t,i){let s=t==="reference"?this._referenceFilterEnabled:this._baseFilterEnabled,a=t==="reference"?this.referenceFilterText:this.baseFilterText,o=(t==="reference"?this.messages.noReferenceLayers:this.messages.noBaseLayers)??this.messages.noItemsToDisplay??"";return m(`block-${t}`,r`<calcite-block class=${p(u.section)} collapsible expanded .heading=${t==="reference"?this.messages.referenceHeading:this.messages.baseHeading} .headingLevel=${this.headingLevel+1}>${e?.length?null:this._renderNoLayersInfo(o,t)}${m(`list-${t}`,r`<calcite-list @focusin=${this._setActiveItem} @focusout=${this._clearActiveItem} .canPull=${l=>this._canMove(l,"pull")} .canPut=${l=>this._canMove(l,"put")} data-basemap-layer-type=${t??_} data-layer-type=${this._rootGroupUid??_} .displayMode=${V} .dragEnabled=${this.dragEnabled} .filterEnabled=${s} .filterPlaceholder=${this.filterPlaceholder} .filterProps=${S} .filterText=${s?a:""} .group=${this._rootGroupUid} .label=${this.messages.componentLabel??""} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=border .selectionMode=${this.selectionMode} @calciteListChange=${this._handleCalciteListChange} @calciteListDragEnd=${l=>this._handleCalciteListDragEnd(l.detail)} @calciteListFilter=${l=>{let n=l.currentTarget?.filterText??"";this[t==="reference"?"referenceFilterText":"baseFilterText"]=n,t==="base"?this.arcgisBaseFilterChange.emit():this.arcgisReferenceFilterChange.emit()}} @calciteListOrderChange=${l=>this._onCalciteListOrderChange(l.detail)} ${g(t==="reference"?this._referenceListRef:this._baseListRef)}>${e?.toArray().map(l=>this._renderItem(l,i))}${s&&!this.hideNoFilterResultsNotice?r`<div class=${p(u.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this._renderNoLayersInfoMessage(o)}</calcite-notice></div>`:null}</calcite-list>`)}</calcite-block>`)}_renderBaseSection(){return this.hideBaseLayers?null:this._renderList(this._visibleBaseItems,"base",this._visibleBaseItems.length===1)}_renderReferenceSection(){return this.hideReferenceLayers?null:this._renderList(this._visibleReferenceItems,"reference",!1)}_renderItem(e,t,i,s){return m(e.uid,z({activeItem:this._activeItem,canMove:this._canMove,css:u,displayMode:V,dragEnabled:this.dragEnabled&&!t,hideCatalogLayerList:this.hideCatalogLayerList,hideStatusIndicators:this.hideStatusIndicators,item:e,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,operationalItems:this._allItems,parent:i,parentTitles:s,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,setCurrentActiveItem:this._setCurrentActiveItem,clearActiveItem:this._clearActiveItem,showErrors:this.showErrors,showTemporaryLayerIndicators:this.showTemporaryLayerIndicators,visibilityAppearance:this.visibilityAppearance,handleAction:this._onTriggerAction,handleCatalogOpen:this._onCatalogOpen,handlePanelOpen:this._onPanelOpen,handleSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,handleTablesOpen:this._onTablesOpen,handleTooltipReferenceChange:this._onTooltipReferenceChange,view:this.view}))}};function X(E){let e=E.closest(`[${W}]`)?.getAttribute(W);return e==="base"||e==="reference"?e:null}A("arcgis-basemap-layer-list-next",F);return F},"layers/list/BasemapItemCollection","core/Collection","core/reactiveUtils",a,e,f,h,i,j,l,n,o)
|
|
@@ -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(([w,{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[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 w([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 $=Number(i.layerUrl.split("/").pop());return r.layerId===$}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=new w(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 .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>`}</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 .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>`;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",u);return u},"Color","core/reactiveUtils","networks/UtilityNetworkTraceAnalysis",b,c,e,f,i)
|