@arcgis/map-components 6.0.0-next.22 → 6.0.0-next.24
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/{WUWF6ZDM.js → 2Z36ICJZ.js} +1 -1
- package/dist/cdn/{GQQTIX2X.js → 3HI5IZSQ.js} +1 -1
- package/dist/cdn/3KAC2MKA.js +2 -0
- package/dist/cdn/{2NM6UWC4.js → 47CFYOUT.js} +1 -1
- package/dist/cdn/4N4XDCDQ.js +2 -0
- package/dist/cdn/{7ZWBGSCM.js → 4NG7CALI.js} +1 -1
- package/dist/cdn/{NTHSQXKG.js → 5DEJDR4W.js} +1 -1
- package/dist/cdn/{LUW2PXWZ.js → 5PPYHS6V.js} +1 -1
- package/dist/cdn/{M5OK7RKI.js → 66GRDX36.js} +1 -1
- package/dist/cdn/{SAQ5BNZJ.js → 6CKQPMJB.js} +1 -1
- package/dist/cdn/6GE2WBKV.js +2 -0
- package/dist/cdn/6GGKA7MT.js +2 -0
- package/dist/cdn/{XPBFBRSY.js → 6K4IASNK.js} +1 -1
- package/dist/cdn/{7LO6ACC7.js → 6VV5SX76.js} +1 -1
- package/dist/cdn/{Y3E2FJPQ.js → 74WM2EIB.js} +1 -1
- package/dist/cdn/{4I6F64B2.js → 7U2V3LDM.js} +1 -1
- package/dist/cdn/{3GN3DAON.js → A7YFCO3R.js} +1 -1
- package/dist/cdn/{3SXQLU4S.js → APFZ2FVO.js} +1 -1
- package/dist/cdn/{VLHURRRU.js → BM3FQ4OG.js} +1 -1
- package/dist/cdn/{LWVYNWD5.js → CGE6E3O3.js} +1 -1
- package/dist/cdn/CVLOQWUD.js +2 -0
- package/dist/cdn/{NORQIOSX.js → DGXTCH6B.js} +1 -1
- package/dist/cdn/{JUYPQUPQ.js → E5CGORXN.js} +1 -1
- package/dist/cdn/E5X5BYWA.js +2 -0
- package/dist/cdn/ECF4B24M.js +2 -0
- package/dist/cdn/EJVFK7JX.js +2 -0
- package/dist/cdn/{BUH3AQ7E.js → FTLNYN3G.js} +1 -1
- package/dist/cdn/{BJ35LPCU.js → G7BWEBJH.js} +1 -1
- package/dist/cdn/GIQT67VT.js +2 -0
- package/dist/cdn/{V7DMA5ZO.js → GZ6UBR6R.js} +1 -1
- package/dist/cdn/{AOGDXJ2J.js → H66E4VOY.js} +1 -1
- package/dist/cdn/HADZXZIE.js +2 -0
- package/dist/cdn/{BDZHLGVT.js → HL6WL2YA.js} +1 -1
- package/dist/cdn/HTCPPGCR.js +2 -0
- package/dist/cdn/HTONXZBP.js +2 -0
- package/dist/cdn/{F2DTKJTK.js → HUWIY53T.js} +1 -1
- package/dist/cdn/{UE6EBLH3.js → IKVGZFZ6.js} +1 -1
- package/dist/cdn/{NKFAPBY3.js → JRO4IBJP.js} +1 -1
- package/dist/cdn/KXDLX4RE.js +2 -0
- package/dist/cdn/LHYI2QBZ.js +2 -0
- package/dist/cdn/{LXJURAXP.js → NLG5U5ZN.js} +1 -1
- package/dist/cdn/{BLYXYNGB.js → PPGKQRNY.js} +1 -1
- package/dist/cdn/{DS6EUOYE.js → PW3QCZXY.js} +1 -1
- package/dist/cdn/{7EIN5VCY.js → Q2GYNZYQ.js} +1 -1
- package/dist/cdn/{SJGQALDG.js → Q2ZQOGM2.js} +1 -1
- package/dist/cdn/{UFK7DHVC.js → QBRGIFBY.js} +1 -1
- package/dist/cdn/{ZC5YVHZ3.js → QQLN6RWA.js} +1 -1
- package/dist/cdn/QXEOEFF3.js +2 -0
- package/dist/cdn/{BJJZGYBG.js → R6ARQKAY.js} +1 -1
- package/dist/cdn/RFO3M46K.js +2 -0
- package/dist/cdn/{YBXCTOS7.js → RQPOCDJS.js} +1 -1
- package/dist/cdn/{CNJSDHZI.js → RT53VCER.js} +1 -1
- package/dist/cdn/{AIF4MCBB.js → RXKIZFNQ.js} +1 -1
- package/dist/cdn/{SKAZPI3A.js → TTERKXN5.js} +1 -1
- package/dist/cdn/{LKGURYDH.js → TTWQ7RNF.js} +1 -1
- package/dist/cdn/{VHZM25YV.js → UB6BQW3G.js} +1 -1
- package/dist/cdn/{DGSTI5DI.js → UJURQACP.js} +1 -1
- package/dist/cdn/{UHDJ2SI5.js → VW35MSDL.js} +1 -1
- package/dist/cdn/{IQGL3AGV.js → WU4NDBMC.js} +1 -1
- package/dist/cdn/{FRX4ZT35.js → XKGD4N75.js} +1 -1
- package/dist/cdn/{3B4VHD67.js → XN3MG6YU.js} +1 -1
- package/dist/cdn/{PFMWLSWQ.js → XWBR6FXI.js} +1 -1
- package/dist/cdn/{B2TICPHR.js → Y5ZZCA3R.js} +1 -1
- package/dist/cdn/YITBBUPR.js +2 -0
- package/dist/cdn/{4IG6WUCI.js → YTZZRJ7Z.js} +1 -1
- package/dist/cdn/{OQ6SYZBT.js → YXIJXXTK.js} +1 -1
- package/dist/cdn/{L6FLCEH6.js → Z3674FMT.js} +1 -1
- package/dist/cdn/assets/video-player/t9n/messages.en.json +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/cdn/main.css +1 -1
- package/dist/chunks/useArcgisViewReadyError.js +155 -151
- package/dist/chunks/useViewModel.js +7 -7
- package/dist/chunks/utils.js +17 -17
- package/dist/chunks/utils5.js +2 -2
- package/dist/components/arcgis-basemap-gallery/customElement.js +17 -17
- package/dist/components/arcgis-basemap-gallery-item/customElement.js +1 -1
- package/dist/components/arcgis-coordinate-conversion/customElement.d.ts +5 -0
- package/dist/components/arcgis-coordinate-conversion-next/customElement.d.ts +6 -5
- package/dist/components/arcgis-feature-attachments/customElement.js +18 -18
- package/dist/components/arcgis-feature-next/customElement.d.ts +1 -1
- package/dist/components/arcgis-features-next/customElement.js +14 -15
- package/dist/components/arcgis-scale-bar/customElement.js +11 -11
- package/dist/components/arcgis-search/customElement.d.ts +12 -0
- package/dist/components/arcgis-search/customElement.js +3 -0
- package/dist/components/arcgis-sketch/customElement.js +1 -1
- package/dist/components/arcgis-swipe/customElement.d.ts +0 -22
- package/dist/components/arcgis-swipe/customElement.js +47 -65
- package/dist/components/arcgis-time-bar/customElement.d.ts +486 -409
- package/dist/components/arcgis-time-bar/types.d.ts +36 -15
- package/dist/components/arcgis-time-bar-slider/customElement.d.ts +179 -162
- package/dist/components/arcgis-time-slider/customElement.d.ts +1 -0
- package/dist/components/arcgis-time-slider/customElement.js +8 -7
- package/dist/components/arcgis-track/customElement.d.ts +12 -3
- package/dist/components/arcgis-utility-network-trace-aggregated-geometry-result-item/customElement.d.ts +7 -0
- package/dist/components/arcgis-utility-network-trace-aggregated-geometry-result-item/customElement.js +8 -5
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +45 -2
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +23 -20
- package/dist/components/arcgis-utility-network-trace-configuration-picker/customElement.d.ts +125 -12
- package/dist/components/arcgis-utility-network-trace-elements-result-item/customElement.d.ts +9 -2
- package/dist/components/arcgis-utility-network-trace-elements-result-item/customElement.js +60 -57
- package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.d.ts +7 -0
- package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.js +12 -9
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.d.ts +217 -14
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +119 -108
- package/dist/components/arcgis-utility-network-trace-locations/customElement.d.ts +155 -8
- package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +9 -73
- package/dist/components/arcgis-utility-network-trace-results/customElement.js +132 -125
- package/dist/components/arcgis-utility-network-trace-results-pane/customElement.d.ts +161 -2
- package/dist/components/arcgis-video-player/customElement.d.ts +18 -0
- package/dist/components/arcgis-video-player/customElement.js +72 -72
- package/dist/components/arcgis-video-player/index.js +4 -4
- package/dist/components/arcgis-video-player-action-bar/customElement.js +1 -1
- package/dist/components/arcgis-video-player-previews/customElement.js +159 -0
- package/dist/components/arcgis-video-player-settings/customElement.js +17 -16
- package/dist/components/arcgis-video-player-slider/customElement.js +23 -12
- package/dist/components/arcgis-video-player-slider/index.js +1 -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 +0 -20
- package/dist/loader.js +6 -7
- package/dist/types/lumina.d.ts +2 -23
- package/dist/types/preact.d.ts +2 -25
- package/dist/types/react.d.ts +2 -27
- package/dist/types/stencil.d.ts +2 -23
- package/package.json +6 -6
- package/dist/cdn/2WJ53TNR.js +0 -2
- package/dist/cdn/5A7LDBDR.js +0 -2
- package/dist/cdn/COSETVX4.js +0 -2
- package/dist/cdn/F74YQZ2X.js +0 -2
- package/dist/cdn/H4BTVLCG.js +0 -2
- package/dist/cdn/KXD4VEKE.js +0 -2
- package/dist/cdn/MNL7ONFB.js +0 -2
- package/dist/cdn/NHMHVWNB.js +0 -2
- package/dist/cdn/NQ3COROI.js +0 -2
- package/dist/cdn/OJJSIN3V.js +0 -2
- package/dist/cdn/P3565WG3.js +0 -2
- package/dist/cdn/QAOT2TJ6.js +0 -2
- package/dist/cdn/QVJ2FUNW.js +0 -2
- package/dist/cdn/SIT5NBLS.js +0 -2
- package/dist/cdn/SU2SAOBL.js +0 -2
- package/dist/cdn/UI4IEVSV.js +0 -2
- package/dist/cdn/VEV3AAVP.js +0 -2
- package/dist/cdn/YYCTSS52.js +0 -2
- package/dist/components/arcgis-scale-range-slider/customElement.d.ts +0 -158
- package/dist/components/arcgis-scale-range-slider/customElement.js +0 -26
- package/dist/components/arcgis-scale-range-slider/index.d.ts +0 -1
- package/dist/components/arcgis-time-bar/TimeBarViewModel.d.ts +0 -73
- package/dist/components/arcgis-value-picker-legacy/customElement.d.ts +0 -642
- package/dist/components/arcgis-value-picker-legacy/customElement.js +0 -39
- package/dist/components/arcgis-value-picker-legacy/index.d.ts +0 -1
- package/dist/components/arcgis-value-picker-legacy/index.js +0 -1
- /package/dist/components/{arcgis-scale-range-slider → arcgis-video-player-previews}/index.js +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import l from"./UYAOMCP7.js";import{a as $,b as S,e as u,g as h,j as D,k as R}from"./FXUZU52U.js";import{a as p}from"./6J3KSMFG.js";import j from"./BOPNSNUT.js";import"./WJQUE4DR.js";import i from"./QVJ2FUNW.js";import{a as U}from"./REB4CHAK.js";import{a as g}from"./L5IRXOCJ.js";import e from"./7JPHMESH.js";import d from"./OLY5EME5.js";import{h as k}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import"./LXME6MU5.js";import{R as b,T as v,X as x,_ as y,a as w,b as c,x as f}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([A,{hasValidAreaResult:j},{property:l,subclass:B},{watch:C},,,,M,{e:z},O])=>{var E=w`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}.esri-unit-select{width:100%}.esri-unit-select__label{--calcite-label-margin-bottom: 0;width:100%}:host{display:block}.esri-measurement-widget-content{padding:var(--arcgis-internal-padding);flex-direction:column;gap:var(--calcite-spacing-xxl);display:flex;position:relative;overflow-y:auto}.esri-measurement-widget-content__error{color:var(--calcite-color-status-danger)}.esri-measurement-widget-content__error,.esri-measurement-widget-content__hint{overflow:hidden}.esri-measurement-widget-content__error p,.esri-measurement-widget-content__hint p{margin:0;padding:0}.esri-measurement-widget-content__hint,.esri-measurement-widget-content__error,.esri-measurement-widget-content__measurement,.esri-measurement-widget-content__measurement-item{flex-direction:column;gap:var(--calcite-spacing-md);animation:.25s ease-in-out esri-fade-in;display:flex}.esri-measurement-widget-content__measurement-item--disabled{color:var(--calcite-color-border-ghost)}.esri-measurement-widget-content__measurement-item__value{font-weight:var(--calcite-font-weight-semibold)}.esri-measurement-widget-content__actions{flex-direction:column;justify-content:center;gap:var(--calcite-spacing-xs);display:flex}:host{width:300px;.esri-widget--panel{min-width:0}}`,L=Object.defineProperty,P=Object.getOwnPropertyDescriptor,n=(e,i,t,r)=>{for(var a=r>1?void 0:r?P(i,t):i,s=e.length-1,d;s>=0;s--)(d=e[s])&&(a=(r?d(i,t,a):d(a))||a);return r&&a&&L(i,t,a),a},o=class extends O{constructor(){super(...arguments),this.supportedViewType="3d",this.unsupportedErrorMessage="The Area Measurement 3D component is only supported in 3D views."}initialize(){this.addHandles(C(()=>({analysis:this.analysis,unit:this._userUnit}),({analysis:e,unit:i})=>{i&&(e.unit=i)},{sync:!0,initial:!0}))}get state(){let{analysis:e,disabled:i,operationState:t,ready:r,supported:a}=this,{valid:s}=e;return $({supported:a,disabled:i,ready:r,operationState:t,valid:s})}get displayState(){return S(this.state,!!this.analysis.geometry)}get measurement(){let{analysisView:e}=this,i=e?.result,t=i?.mode??"euclidean",r=e?.type==="area-measurement-view-3d"&&j(e);return{mode:t,area:h(i?.area,r),perimeter:h(i?.perimeter,r)}}get unitOptions(){return D(this._userUnitOptions,u,u)}set unitOptions(e){this._userUnitOptions=e}get unit(){return R({userUnit:this._userUnit,analysisUnit:this.analysis.unit,options:this.unitOptions,defaultUnit:this.defaultMeasurementSystem,viewUnit:this.view?.options.displayUnits.area})}set unit(e){this._userUnit=e}get canResetUnit(){return this._userUnit!=null||this.analysis.unit!=null}resetUnit(){this._userUnit=void 0,this.analysis.unit=null}async place(e){await this.analysisView?.place(e)}clearAnalysis(){this.analysis.geometry=null}constructAnalysis(){return new A}};n([l({readOnly:!0})],o.prototype,"state",1);n([l({readOnly:!0})],o.prototype,"displayState",1);n([l({readOnly:!0})],o.prototype,"measurement",1);n([l()],o.prototype,"unitOptions",1);n([l()],o.prototype,"_userUnitOptions",2);n([l()],o.prototype,"unit",1);n([l()],o.prototype,"_userUnit",2);n([l({readOnly:!0})],o.prototype,"canResetUnit",1);o=n([B("components.area-measurement-3d.AreaMeasurement3dViewModel")],o);var Z=M(o),m=class extends b{constructor(){super(...arguments),this.viewModel=Z(this),this.messages=U({blocking:!0}),this.view=this.viewModel.view,this.analysis=this.viewModel.analysis,this.autoDestroyDisabled=!1,this.hideStartButton=!1,this.hideResetUnitsButton=!1,this.hideUnitSelect=!1,this.hideVisualization=this.viewModel.hideVisualization,this.icon="measure-area",this.interactionDisabled=this.viewModel.interactionDisabled,this.state=this.viewModel.state,this.unit=this.viewModel.unit,this.unitOptions=this.viewModel.unitOptions,this.arcgisPropertyChange=k()("analysis","interactionDisabled","state"),this.arcgisReady=f()}static{this.properties={view:0,analysis:0,autoDestroyDisabled:5,hideStartButton:5,hideResetUnitsButton:5,hideUnitSelect:5,hideVisualization:5,icon:3,interactionDisabled:5,label:1,messageOverrides:0,referenceElement:1,state:32,unit:1,unitOptions:0}}static{this.styles=E}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy()}async start(){z(this.viewModel.start())}render(){let{hideResetUnitsButton:i,messages:t,unit:r,unitOptions:a,viewModel:s}=this,{measurement:d,state:_}=s;return c`<div aria-label=${t.componentLabel??x} class=${v({[g.widget]:!0,[g.panel]:!0})} role=region><arcgis-measurement-content .state=${s.displayState} .hintLabel=${t.hint} .unsupportedLabel=${t.unsupported} .items=${[{title:t.area,measurement:d.area},{title:t.perimeterLength,measurement:d.perimeter}]}>${p({hidden:this.hideUnitSelect,children:c`<arcgis-unit-select slot=settings .options=${a} .selectLabel=${t.unit} .value=${r} .canReset=${!i&&s.canResetUnit} .resetLabel=${t.reset} @arcgisInternalUnitReset=${()=>s.resetUnit()} @arcgisUnitSelectChange=${V=>{this.unit=V.detail}}></arcgis-unit-select>`})}${p({hidden:this.hideStartButton,children:c`<calcite-button slot=actions .disabled=${_==="unsupported"||_==="disabled"||this.interactionDisabled} @click=${this.start}>${t.newMeasurement}</calcite-button>`})}</arcgis-measurement-content></div>`}};y("arcgis-area-measurement-3d",m);return m},"analysis/AreaMeasurementAnalysis","applications/Components/analysisUtils","core/accessorSupport/decorators","core/reactiveUtils",a,d,e,i,j,l)
|
|
2
|
+
import l from"./UYAOMCP7.js";import{a as $,b as S,e as u,g as h,j as D,k as R}from"./FXUZU52U.js";import{a as p}from"./6J3KSMFG.js";import j from"./BOPNSNUT.js";import"./WJQUE4DR.js";import i from"./EJVFK7JX.js";import{a as U}from"./REB4CHAK.js";import{a as g}from"./L5IRXOCJ.js";import e from"./7JPHMESH.js";import d from"./OLY5EME5.js";import{h as k}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import"./LXME6MU5.js";import{R as b,T as v,X as x,_ as y,a as w,b as c,x as f}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([A,{hasValidAreaResult:j},{property:l,subclass:B},{watch:C},,,,M,{e:z},O])=>{var E=w`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}.esri-unit-select{width:100%}.esri-unit-select__label{--calcite-label-margin-bottom: 0;width:100%}:host{display:block}.esri-measurement-widget-content{padding:var(--arcgis-internal-padding);flex-direction:column;gap:var(--calcite-spacing-xxl);display:flex;position:relative;overflow-y:auto}.esri-measurement-widget-content__error{color:var(--calcite-color-status-danger)}.esri-measurement-widget-content__error,.esri-measurement-widget-content__hint{overflow:hidden}.esri-measurement-widget-content__error p,.esri-measurement-widget-content__hint p{margin:0;padding:0}.esri-measurement-widget-content__hint,.esri-measurement-widget-content__error,.esri-measurement-widget-content__measurement,.esri-measurement-widget-content__measurement-item{flex-direction:column;gap:var(--calcite-spacing-md);animation:.25s ease-in-out esri-fade-in;display:flex}.esri-measurement-widget-content__measurement-item--disabled{color:var(--calcite-color-border-ghost)}.esri-measurement-widget-content__measurement-item__value{font-weight:var(--calcite-font-weight-semibold)}.esri-measurement-widget-content__actions{flex-direction:column;justify-content:center;gap:var(--calcite-spacing-xs);display:flex}:host{width:300px;.esri-widget--panel{min-width:0}}`,L=Object.defineProperty,P=Object.getOwnPropertyDescriptor,n=(e,i,t,r)=>{for(var a=r>1?void 0:r?P(i,t):i,s=e.length-1,d;s>=0;s--)(d=e[s])&&(a=(r?d(i,t,a):d(a))||a);return r&&a&&L(i,t,a),a},o=class extends O{constructor(){super(...arguments),this.supportedViewType="3d",this.unsupportedErrorMessage="The Area Measurement 3D component is only supported in 3D views."}initialize(){this.addHandles(C(()=>({analysis:this.analysis,unit:this._userUnit}),({analysis:e,unit:i})=>{i&&(e.unit=i)},{sync:!0,initial:!0}))}get state(){let{analysis:e,disabled:i,operationState:t,ready:r,supported:a}=this,{valid:s}=e;return $({supported:a,disabled:i,ready:r,operationState:t,valid:s})}get displayState(){return S(this.state,!!this.analysis.geometry)}get measurement(){let{analysisView:e}=this,i=e?.result,t=i?.mode??"euclidean",r=e?.type==="area-measurement-view-3d"&&j(e);return{mode:t,area:h(i?.area,r),perimeter:h(i?.perimeter,r)}}get unitOptions(){return D(this._userUnitOptions,u,u)}set unitOptions(e){this._userUnitOptions=e}get unit(){return R({userUnit:this._userUnit,analysisUnit:this.analysis.unit,options:this.unitOptions,defaultUnit:this.defaultMeasurementSystem,viewUnit:this.view?.options.displayUnits.area})}set unit(e){this._userUnit=e}get canResetUnit(){return this._userUnit!=null||this.analysis.unit!=null}resetUnit(){this._userUnit=void 0,this.analysis.unit=null}async place(e){await this.analysisView?.place(e)}clearAnalysis(){this.analysis.geometry=null}constructAnalysis(){return new A}};n([l({readOnly:!0})],o.prototype,"state",1);n([l({readOnly:!0})],o.prototype,"displayState",1);n([l({readOnly:!0})],o.prototype,"measurement",1);n([l()],o.prototype,"unitOptions",1);n([l()],o.prototype,"_userUnitOptions",2);n([l()],o.prototype,"unit",1);n([l()],o.prototype,"_userUnit",2);n([l({readOnly:!0})],o.prototype,"canResetUnit",1);o=n([B("components.area-measurement-3d.AreaMeasurement3dViewModel")],o);var Z=M(o),m=class extends b{constructor(){super(...arguments),this.viewModel=Z(this),this.messages=U({blocking:!0}),this.view=this.viewModel.view,this.analysis=this.viewModel.analysis,this.autoDestroyDisabled=!1,this.hideStartButton=!1,this.hideResetUnitsButton=!1,this.hideUnitSelect=!1,this.hideVisualization=this.viewModel.hideVisualization,this.icon="measure-area",this.interactionDisabled=this.viewModel.interactionDisabled,this.state=this.viewModel.state,this.unit=this.viewModel.unit,this.unitOptions=this.viewModel.unitOptions,this.arcgisPropertyChange=k()("analysis","interactionDisabled","state"),this.arcgisReady=f()}static{this.properties={view:0,analysis:0,autoDestroyDisabled:5,hideStartButton:5,hideResetUnitsButton:5,hideUnitSelect:5,hideVisualization:5,icon:3,interactionDisabled:5,label:1,messageOverrides:0,referenceElement:1,state:32,unit:1,unitOptions:0}}static{this.styles=E}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy()}async start(){z(this.viewModel.start())}render(){let{hideResetUnitsButton:i,messages:t,unit:r,unitOptions:a,viewModel:s}=this,{measurement:d,state:_}=s;return c`<div aria-label=${t.componentLabel??x} class=${v({[g.widget]:!0,[g.panel]:!0})} role=region><arcgis-measurement-content .state=${s.displayState} .hintLabel=${t.hint} .unsupportedLabel=${t.unsupported} .items=${[{title:t.area,measurement:d.area},{title:t.perimeterLength,measurement:d.perimeter}]}>${p({hidden:this.hideUnitSelect,children:c`<arcgis-unit-select slot=settings .options=${a} .selectLabel=${t.unit} .value=${r} .canReset=${!i&&s.canResetUnit} .resetLabel=${t.reset} @arcgisInternalUnitReset=${()=>s.resetUnit()} @arcgisUnitSelectChange=${V=>{this.unit=V.detail}}></arcgis-unit-select>`})}${p({hidden:this.hideStartButton,children:c`<calcite-button slot=actions .disabled=${_==="unsupported"||_==="disabled"||this.interactionDisabled} @click=${this.start}>${t.newMeasurement}</calcite-button>`})}</arcgis-measurement-content></div>`}};y("arcgis-area-measurement-3d",m);return m},"analysis/AreaMeasurementAnalysis","applications/Components/analysisUtils","core/accessorSupport/decorators","core/reactiveUtils",a,d,e,i,j,l)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import l from"./UYAOMCP7.js";import{a as D,b as S,d as u,g as V,j as R,k as j}from"./FXUZU52U.js";import{a as g}from"./6J3KSMFG.js";import i from"./BOPNSNUT.js";import"./WJQUE4DR.js";import h from"./QVJ2FUNW.js";import{a as U}from"./REB4CHAK.js";import{a as p}from"./L5IRXOCJ.js";import e from"./7JPHMESH.js";import d from"./OLY5EME5.js";import{h as k}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import{a as y}from"./LXME6MU5.js";import{R as f,T as b,X as v,_ as x,a as _,b as c,x as w}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([L,{property:a,subclass:A},{watch:B},C,,,,M,{b:z,e:O},$])=>{var P=_`.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}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}.esri-unit-select{width:100%}.esri-unit-select__label{--calcite-label-margin-bottom: 0;width:100%}:host{display:block}.esri-measurement-widget-content{padding:var(--arcgis-internal-padding);flex-direction:column;gap:var(--calcite-spacing-xxl);display:flex;position:relative;overflow-y:auto}.esri-measurement-widget-content__error{color:var(--calcite-color-status-danger)}.esri-measurement-widget-content__error,.esri-measurement-widget-content__hint{overflow:hidden}.esri-measurement-widget-content__error p,.esri-measurement-widget-content__hint p{margin:0;padding:0}.esri-measurement-widget-content__hint,.esri-measurement-widget-content__error,.esri-measurement-widget-content__measurement,.esri-measurement-widget-content__measurement-item{flex-direction:column;gap:var(--calcite-spacing-md);animation:.25s ease-in-out esri-fade-in;display:flex}.esri-measurement-widget-content__measurement-item--disabled{color:var(--calcite-color-border-ghost)}.esri-measurement-widget-content__measurement-item__value{font-weight:var(--calcite-font-weight-semibold)}.esri-measurement-widget-content__actions{flex-direction:column;justify-content:center;gap:var(--calcite-spacing-xs);display:flex}:host{.esri-widget--panel{min-width:0}}`,T=Object.defineProperty,I=Object.getOwnPropertyDescriptor,o=(e,t,i,l)=>{for(var s=l>1?void 0:l?I(t,i):t,n=e.length-1,d;n>=0;n--)(d=e[n])&&(s=(l?d(t,i,s):d(s))||s);return l&&s&&T(t,i,s),s},r=class extends ${constructor(){super(...arguments),this.snappingOptions=new C,this.supportedViewType="2d",this.unsupportedErrorMessage="The Distance Measurement 2D component is only supported in 2D views."}initialize(){this.addHandles([B(()=>({analysis:this.analysis,unit:this._userUnit}),({analysis:e,unit:t})=>{t&&(e.unit=t)},{sync:!0,initial:!0}),B(()=>({analysisView:this.analysisView,snappingOptions:this.snappingOptions}),({analysisView:e,snappingOptions:t})=>{e&&(e.snappingOptions=t)},{sync:!0,initial:!0})])}get state(){let{analysis:e,disabled:t,operationState:i,ready:l,supported:s}=this,{valid:n}=e;return D({supported:s,disabled:t,ready:l,operationState:i,valid:n})}get displayState(){return S(this.state,!!this.analysis.geometry)}get measurement(){return{mode:this.analysisView?.result?.mode??"euclidean",length:V(this.analysis.valid?this.analysisView?.result?.length:void 0)}}get unitOptions(){return R(this._userUnitOptions,u,u)}set unitOptions(e){this._userUnitOptions=e}get unit(){return j({userUnit:this._userUnit,analysisUnit:this.analysis.unit,options:this.unitOptions,defaultUnit:this.defaultMeasurementSystem,viewUnit:this.view?.options.displayUnits.length})}set unit(e){this._userUnit=e}get canResetUnit(){return this._userUnit!=null||this.analysis.unit!=null}resetUnit(){this._userUnit=void 0,this.analysis.unit=null}async place(e){let t=this.analysisView;t&&(await t.place(e),z(e?.signal))}clearAnalysis(){this.analysis.geometry=null}constructAnalysis(){return new L}};o([a({readOnly:!0})],r.prototype,"state",1);o([a({readOnly:!0})],r.prototype,"displayState",1);o([a()],r.prototype,"measurement",1);o([a({type:C})],r.prototype,"snappingOptions",2);o([a()],r.prototype,"unitOptions",1);o([a()],r.prototype,"_userUnitOptions",2);o([a()],r.prototype,"unit",1);o([a()],r.prototype,"_userUnit",2);o([a({readOnly:!0})],r.prototype,"canResetUnit",1);r=o([A("components.distance-measurement-2d.DistanceMeasurement2dViewModel")],r);var H=M(r),h=class extends f{constructor(){super(...arguments),this.viewModel=H(this),this.messages=U({name:"distance-measurement-2d",blocking:!0}),this.view=this.viewModel.view,this.analysis=this.viewModel.analysis,this.autoDestroyDisabled=!1,this.hideStartButton=!1,this.hideResetUnitsButton=!1,this.hideUnitSelect=!1,this.hideVisualization=this.viewModel.hideVisualization,this.icon="measure-line",this.interactionDisabled=this.viewModel.interactionDisabled,this.snappingOptions=this.viewModel.snappingOptions,this.state=this.viewModel.state,this.unit=this.viewModel.unit,this.unitOptions=this.viewModel.unitOptions,this.arcgisPropertyChange=k()("analysis","interactionDisabled","state"),this.arcgisReady=w()}static{this.properties={view:0,analysis:0,autoDestroyDisabled:5,hideStartButton:5,hideResetUnitsButton:5,hideUnitSelect:5,hideVisualization:5,icon:3,interactionDisabled:5,label:1,messageOverrides:0,referenceElement:1,snappingOptions:0,state:32,unit:1,unitOptions:0}}static{this.styles=P}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy()}async start(){O(this.viewModel.start())}render(){let{hideResetUnitsButton:t,messages:i,unit:l,unitOptions:s,viewModel:n}=this,{measurement:d,state:m}=n;return c`<div aria-label=${i.componentLabel??v} class=${b(y("root",p.widget,p.panel))} role=presentation><arcgis-measurement-content .state=${n.displayState} .hintLabel=${i.hint} .unsupportedLabel=${i.unsupported} .items=${[{title:i.distance,measurement:d.length}]}>${g({hidden:this.hideUnitSelect,children:c`<arcgis-unit-select slot=settings .options=${s} .selectLabel=${i.unit} .value=${l} .canReset=${!t&&n.canResetUnit} .resetLabel=${i.reset} @arcgisInternalUnitReset=${()=>n.resetUnit()} @arcgisUnitSelectChange=${E=>{this.unit=E.detail}}></arcgis-unit-select>`})}${g({hidden:this.hideStartButton,children:c`<calcite-button slot=actions .disabled=${m==="unsupported"||m==="disabled"||this.interactionDisabled} @click=${this.start}>${i.newMeasurement}</calcite-button>`})}</arcgis-measurement-content></div>`}};x("arcgis-distance-measurement-2d",h);return h},"analysis/DistanceMeasurementAnalysis","core/accessorSupport/decorators","core/reactiveUtils","views/interactive/options/SnappingOptions",a,d,e,h,i,l)
|
|
2
|
+
import l from"./UYAOMCP7.js";import{a as D,b as S,d as u,g as V,j as R,k as j}from"./FXUZU52U.js";import{a as g}from"./6J3KSMFG.js";import i from"./BOPNSNUT.js";import"./WJQUE4DR.js";import h from"./EJVFK7JX.js";import{a as U}from"./REB4CHAK.js";import{a as p}from"./L5IRXOCJ.js";import e from"./7JPHMESH.js";import d from"./OLY5EME5.js";import{h as k}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import{a as y}from"./LXME6MU5.js";import{R as f,T as b,X as v,_ as x,a as _,b as c,x as w}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([L,{property:a,subclass:A},{watch:B},C,,,,M,{b:z,e:O},$])=>{var P=_`.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}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}.esri-unit-select{width:100%}.esri-unit-select__label{--calcite-label-margin-bottom: 0;width:100%}:host{display:block}.esri-measurement-widget-content{padding:var(--arcgis-internal-padding);flex-direction:column;gap:var(--calcite-spacing-xxl);display:flex;position:relative;overflow-y:auto}.esri-measurement-widget-content__error{color:var(--calcite-color-status-danger)}.esri-measurement-widget-content__error,.esri-measurement-widget-content__hint{overflow:hidden}.esri-measurement-widget-content__error p,.esri-measurement-widget-content__hint p{margin:0;padding:0}.esri-measurement-widget-content__hint,.esri-measurement-widget-content__error,.esri-measurement-widget-content__measurement,.esri-measurement-widget-content__measurement-item{flex-direction:column;gap:var(--calcite-spacing-md);animation:.25s ease-in-out esri-fade-in;display:flex}.esri-measurement-widget-content__measurement-item--disabled{color:var(--calcite-color-border-ghost)}.esri-measurement-widget-content__measurement-item__value{font-weight:var(--calcite-font-weight-semibold)}.esri-measurement-widget-content__actions{flex-direction:column;justify-content:center;gap:var(--calcite-spacing-xs);display:flex}:host{.esri-widget--panel{min-width:0}}`,T=Object.defineProperty,I=Object.getOwnPropertyDescriptor,o=(e,t,i,l)=>{for(var s=l>1?void 0:l?I(t,i):t,n=e.length-1,d;n>=0;n--)(d=e[n])&&(s=(l?d(t,i,s):d(s))||s);return l&&s&&T(t,i,s),s},r=class extends ${constructor(){super(...arguments),this.snappingOptions=new C,this.supportedViewType="2d",this.unsupportedErrorMessage="The Distance Measurement 2D component is only supported in 2D views."}initialize(){this.addHandles([B(()=>({analysis:this.analysis,unit:this._userUnit}),({analysis:e,unit:t})=>{t&&(e.unit=t)},{sync:!0,initial:!0}),B(()=>({analysisView:this.analysisView,snappingOptions:this.snappingOptions}),({analysisView:e,snappingOptions:t})=>{e&&(e.snappingOptions=t)},{sync:!0,initial:!0})])}get state(){let{analysis:e,disabled:t,operationState:i,ready:l,supported:s}=this,{valid:n}=e;return D({supported:s,disabled:t,ready:l,operationState:i,valid:n})}get displayState(){return S(this.state,!!this.analysis.geometry)}get measurement(){return{mode:this.analysisView?.result?.mode??"euclidean",length:V(this.analysis.valid?this.analysisView?.result?.length:void 0)}}get unitOptions(){return R(this._userUnitOptions,u,u)}set unitOptions(e){this._userUnitOptions=e}get unit(){return j({userUnit:this._userUnit,analysisUnit:this.analysis.unit,options:this.unitOptions,defaultUnit:this.defaultMeasurementSystem,viewUnit:this.view?.options.displayUnits.length})}set unit(e){this._userUnit=e}get canResetUnit(){return this._userUnit!=null||this.analysis.unit!=null}resetUnit(){this._userUnit=void 0,this.analysis.unit=null}async place(e){let t=this.analysisView;t&&(await t.place(e),z(e?.signal))}clearAnalysis(){this.analysis.geometry=null}constructAnalysis(){return new L}};o([a({readOnly:!0})],r.prototype,"state",1);o([a({readOnly:!0})],r.prototype,"displayState",1);o([a()],r.prototype,"measurement",1);o([a({type:C})],r.prototype,"snappingOptions",2);o([a()],r.prototype,"unitOptions",1);o([a()],r.prototype,"_userUnitOptions",2);o([a()],r.prototype,"unit",1);o([a()],r.prototype,"_userUnit",2);o([a({readOnly:!0})],r.prototype,"canResetUnit",1);r=o([A("components.distance-measurement-2d.DistanceMeasurement2dViewModel")],r);var H=M(r),h=class extends f{constructor(){super(...arguments),this.viewModel=H(this),this.messages=U({name:"distance-measurement-2d",blocking:!0}),this.view=this.viewModel.view,this.analysis=this.viewModel.analysis,this.autoDestroyDisabled=!1,this.hideStartButton=!1,this.hideResetUnitsButton=!1,this.hideUnitSelect=!1,this.hideVisualization=this.viewModel.hideVisualization,this.icon="measure-line",this.interactionDisabled=this.viewModel.interactionDisabled,this.snappingOptions=this.viewModel.snappingOptions,this.state=this.viewModel.state,this.unit=this.viewModel.unit,this.unitOptions=this.viewModel.unitOptions,this.arcgisPropertyChange=k()("analysis","interactionDisabled","state"),this.arcgisReady=w()}static{this.properties={view:0,analysis:0,autoDestroyDisabled:5,hideStartButton:5,hideResetUnitsButton:5,hideUnitSelect:5,hideVisualization:5,icon:3,interactionDisabled:5,label:1,messageOverrides:0,referenceElement:1,snappingOptions:0,state:32,unit:1,unitOptions:0}}static{this.styles=P}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy()}async start(){O(this.viewModel.start())}render(){let{hideResetUnitsButton:t,messages:i,unit:l,unitOptions:s,viewModel:n}=this,{measurement:d,state:m}=n;return c`<div aria-label=${i.componentLabel??v} class=${b(y("root",p.widget,p.panel))} role=presentation><arcgis-measurement-content .state=${n.displayState} .hintLabel=${i.hint} .unsupportedLabel=${i.unsupported} .items=${[{title:i.distance,measurement:d.length}]}>${g({hidden:this.hideUnitSelect,children:c`<arcgis-unit-select slot=settings .options=${s} .selectLabel=${i.unit} .value=${l} .canReset=${!t&&n.canResetUnit} .resetLabel=${i.reset} @arcgisInternalUnitReset=${()=>n.resetUnit()} @arcgisUnitSelectChange=${E=>{this.unit=E.detail}}></arcgis-unit-select>`})}${g({hidden:this.hideStartButton,children:c`<calcite-button slot=actions .disabled=${m==="unsupported"||m==="disabled"||this.interactionDisabled} @click=${this.start}>${i.newMeasurement}</calcite-button>`})}</arcgis-measurement-content></div>`}};x("arcgis-distance-measurement-2d",h);return h},"analysis/DistanceMeasurementAnalysis","core/accessorSupport/decorators","core/reactiveUtils","views/interactive/options/SnappingOptions",a,d,e,h,i,l)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import s from"./V7DMA5ZO.js";import"./EVWWTIEQ.js";import{a as g}from"./4L43F7HU.js";import r from"./SIT5NBLS.js";import o from"./BFYJTV6Q.js";import{a as j,b as q,c as z,g as A,h as J,j as K,k as Q,m,n as F}from"./ZCFWKPXL.js";import{a as H}from"./WVKMYNN7.js";import{a as _}from"./5GFPOTOB.js";import n from"./GEOME3IC.js";import l from"./HU57LQOA.js";import i from"./BOPNSNUT.js";import"./WJQUE4DR.js";import h from"./QVJ2FUNW.js";import{a as k}from"./REB4CHAK.js";import{a as b}from"./L5IRXOCJ.js";import{a as G}from"./7Y4SF2NT.js";import f from"./7ILT5PDJ.js";import e from"./7JPHMESH.js";import d from"./OLY5EME5.js";import{h as N}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import{a as B}from"./LXME6MU5.js";import{B as P,P as v,Q as L,R as D,T as w,X as M,Y as C,_ as x,b as c,x as p}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([le,u,{on:T,watch:te},,,,U,S,,,,,{e:V,h:W,k:X},{a:Y,b:Z,c:ee}])=>{var ie="nested",re=S(le),O=class extends D{constructor(){super(...arguments),this.#i=null,this._rootListRef=v(),this._layerFlowItemRef=v(),this._panelFlowItemRef=v(),this._selectedDragItemLayerUid=null,this._rootGroupUid=`operational-${P()}`,this.#s=null,this.messages=k(),this._canMove=({dragEl:e,fromEl:t,toEl:i},a)=>{let s=a==="pull"?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,l=m(e,this.operationalItems);if(!l?.sortable)return!1;let r=this.#e(t),o=this.#e(i),n=this.#t(r),d=F(r),f=this.#t(o),y=F(o),$=!!d&&!!y&&d===y,I={selected:l,from:n,to:f},E=r?.group,h=o?.group,se=n?.layer?.type??"",ae=f?.layer?.type??"",R=new Set(["map-image","catalog","knowledge-graph"]);return E&&h&&typeof s=="function"?s(I):$&&!R.has(se)&&!R.has(ae)&&l?.layer?.type!=="sublayer"},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent)},this._onTablesOpen=e=>{this.openedLayers.push(e.layer)},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(a=>a.classList?.contains(g.item)),i=m(t,this.operationalItems);this._activeItem=i},this.viewModel=re(this),this.arcgisClose=G(this),this._activeItem=null,this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._tooltipReferenceMap=new Map,this._layerListMap=new Map,this.layerTablesEnabled=new u(["knowledge-graph"]),this.mapImageOptions=null,this.openedLayerLists=new u,this.tileOptions=null,this.autoDestroyDisabled=!1,this.closed=!1,this.collapsed=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterText="",this.headingLevel=2,this.hideCatalogLayerList=!1,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.hideStatusIndicators=!1,this.icon="layers",this.layerTablesAvailable=new u(["knowledge-graph"]),this.listItemCreatedFunction=this.viewModel.listItemCreatedFunction,this.listModeDisabled=this.viewModel.listModeDisabled,this.minDragEnabledItems=z,this.minFilterItems=q,this.openedLayers=new u,this.operationalItems=this.viewModel.operationalItems,this.selectedItems=new u,this.selectionMode="none",this.showCloseButton=!1,this.showCollapseButton=!1,this.showErrors=!1,this.showFilter=!1,this.showHeading=!1,this.showTemporaryLayerIndicators=!1,this.state=this.viewModel.state,this.view=this.viewModel.view,this.visibilityAppearance="default",this.arcgisFilterChange=p(),this.arcgisOpenedLayersChange=p(),this.arcgisPropertyChange=N()("state"),this.arcgisReady=p(),this.arcgisSelectedItemsChange=p(),this.arcgisTriggerAction=U(()=>this.viewModel,"trigger-action")}static{this.properties={_catalogLayerList:16,_tableList:16,_tooltipReferenceMap:16,_layerListMap:16,_totalItems:16,_visibleItems:16,_openedPanelItems:16,_dragEnabled:16,_filterEnabled:16,layerTablesEnabled:16,mapImageOptions:16,openedLayerLists:16,tileOptions:16,_renderedOpenLayerFlowItems:16,autoDestroyDisabled:5,catalogLayerList:32,catalogOptions:0,closed:5,collapsed:5,dragEnabled:5,filterPlaceholder:1,filterPredicate:0,filterText:1,headingLevel:9,hideCatalogLayerList:5,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,hideStatusIndicators:5,icon:1,knowledgeGraphOptions:0,label:1,layerTablesAvailable:0,listItemCanGiveFunction:0,listItemCanReceiveFunction:0,listItemCreatedFunction:0,listModeDisabled:5,messageOverrides:0,minDragEnabledItems:9,minFilterItems:9,openedLayers:32,operationalItems:0,referenceElement:1,selectedItems:0,selectionMode:1,showCloseButton:5,showCollapseButton:5,showErrors:5,showFilter:5,showHeading:5,showTemporaryLayerIndicators:5,state:32,tableList:32,view:0,visibilityAppearance:1}}static{this.styles=[ee,Z]}#i;#s;get _totalItems(){return this.viewModel.operationalItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _visibleItems(){return this.operationalItems?.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleItems.flatten(e=>e.children).filter(e=>!e.hidden&&e.panel?.open&&!e.panel.disabled&&e.panel.flowEnabled&&(!W(e)||V(e)))}get _dragEnabled(){return this._totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this._totalItems>=this.minFilterItems&&this.showFilter}get _renderedOpenLayerFlowItems(){let{openedLayers:e}=this;return e.toArray().map((t,i)=>this.#b(t,i===e.length-1))}get catalogLayerList(){return this._catalogLayerList}get tableList(){return this._tableList}async destroy(){await this.manager.destroy(),this.#h(),this._tooltipReferenceMap.clear()}loaded(){this.manager.onLifecycle(()=>[T(()=>this.openedLayers,"change",()=>{this.#n()},{initial:!0}),T(()=>this.viewModel.operationalItems,"change",()=>A(this.selectedItems),{initial:!0}),te(()=>this.operationalItems.flatten(e=>e.children).map(e=>e.uid).join(","),()=>{A(this.selectedItems),this.requestUpdate()},{initial:!0}),T(()=>this.selectedItems,"change",()=>this.arcgisSelectedItemsChange.emit()),te(()=>[this.filterPredicate,this._rootListRef.value],()=>J(this._rootListRef.value,this.filterPredicate,this.operationalItems))])}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}#e(e){return e?e.matches("calcite-list")?e:e.closest("calcite-list[data-item]")||(this._rootListRef.value?.contains(e)?this._rootListRef.value:null):null}#t(e){let t=e?.getAttribute("data-item");return t?this.#r(t):null}#r(e){let t=this.operationalItems?.toArray()??[];for(;t.length;){let i=t.shift();if(!i)continue;if(i.uid===e)return i;let a=i.children?.toArray()??[];t.push(...a)}return null}async#o(e,t){let{_layerListMap:i}=this,a=i.get(e);if(a)return a;let s=e.type==="catalog"?await this.#c(e):await this.#m(e);return t.aborted||i.set(e,s),s}async#n(){let{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this.#s?.abort();let a=new AbortController,{signal:s}=a;this.#s=a,e.forEach((o,n)=>{t.includes(n)||(o?.destroy?.(),e.delete(n))});let l=await Promise.all(t.map(o=>this.#o(o,s)));if(s.aborted)return;i.removeAll(),i.addMany(l);let r=i.at(-1);r?"catalogLayer"in r?(this._catalogLayerList=r,this._tableList=void 0):(this._catalogLayerList=void 0,this._tableList=r):(this._catalogLayerList=void 0,this._tableList=void 0),this.arcgisOpenedLayersChange.emit()}#h(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}async#c(e){let{headingLevel:t,catalogOptions:i,filterPlaceholder:a,listItemCreatedFunction:s,minFilterItems:l,selectionMode:r,visibilityAppearance:o}=this;return C(c`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${i?.filterPlaceholder??a} .listItemCreatedFunction=${i?.listItemCreatedFunction??s} .minFilterItems=${i?.minFilterItems??l} .selectionMode=${i?.selectionMode??r} .visibilityAppearance=${i?.visibilityAppearance??o} .showErrors=${i?.showErrors??this.showErrors} .showFilter=${i?.showFilter??this.showFilter} .hideStatusIndicators=${i?.hideStatusIndicators??this.hideStatusIndicators} .showTemporaryLayerIndicators=${i?.showTemporaryLayerIndicators??this.showTemporaryLayerIndicators} .messageOverrides=${this.messageOverrides} @arcgisReady=${n=>n.stopPropagation()} .catalogLayer=${e} .view=${this.view} .referenceElement=${this.referenceElement} @catalogOpen=${this._onCatalogOpen} @tablesOpen=${this._onTablesOpen}></arcgis-catalog-layer-list-next>`)}#d(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#m(e){let{headingLevel:t,selectionMode:i,dragEnabled:a}=this,s=this.#d(e);return C(c`<arcgis-table-list-next .headingLevel=${s?.headingLevel??t} .selectionMode=${s?.selectionMode??i} .dragEnabled=${s?.dragEnabled??a} .collapsed=${s?.collapsed} .filterPlaceholder=${s?.filterPlaceholder} .filterText=${s?.filterText} .icon=${s?.icon??void 0} .label=${s?.label??void 0} .listItemCreatedFunction=${s?.listItemCreatedFunction} .messageOverrides=${this.messageOverrides} .tables=${s?.tables} .referenceElement=${this.referenceElement} @arcgisReady=${l=>l.stopPropagation()}></arcgis-table-list-next>`)}#p(e){e.open=!1}#g({toEl:e,fromEl:t,dragEl:i,newIndex:a}){let s=this.#e(e),l=this.#e(t),r=m(i,this.operationalItems),o=this.#t(s),n=this.#t(l);a==null||!r||(this.viewModel.moveItem(r,n,o,a),X(this,r.uid,d=>d!==i&&this.#e(d.parentElement)===s))}#u(e){let{fromEl:t,toEl:i,dragEl:a,oldIndex:s}=e;if(t!==i){a.remove();return}s==null||!t||!a||t.insertBefore(a,t.children[s])}#f(e){let t=this.#i,{dragEl:i,newIndex:a}=e,s=this.#e(e.fromEl),l=this.#e(e.toEl),r=t?.newIndex===a&&t?.dragEl===i&&t?.toEl===l&&t?.fromEl===s;if(!(!s||!l||r)){if(this.#i={...e,fromEl:s,toEl:l},this._selectedDragItemLayerUid=i.value,s===l){let o=Array.from(s.children).filter(n=>n?.matches("calcite-list-item")).map(n=>n.value.layer?.uid??"");this.#y(s,o);return}this.#g({toEl:l,fromEl:s,dragEl:i,newIndex:a})}}#y(e,t){if(e)if(e===this._rootListRef.value)K(this.el.view?.map?.layers,t);else{let i=m(e,this.operationalItems);if(!i)return;Q(i,t)}}#I(e){let{selectionMode:t,selectedItems:i}=this;if(t==="none")return;let a=e.target.selectedItems.map(s=>m(s,this.operationalItems)).filter(Boolean);i.removeAll(),i.addMany(a)}render(){let{state:e}=this,t={[b.hidden]:e==="loading",[b.disabled]:e==="disabled"};return c`<div class=${w(B(b.widget,t))}>${this._visibleItems?.length?this.#L():null}${this.#$()}</div>`}#v(e){let{_tooltipReferenceMap:t,messages:i}=this;return e?c`<calcite-tooltip overlay-positioning=fixed .referenceElement=${t.get(e.layer?.uid??"")}>${i.layerIncompatibleTooltip}</calcite-tooltip>`:null}#a(e){if(e.incompatible)return this.#v(e);let t=e.children?.filter(i=>!i.hidden).toArray().map(i=>this.#a(i))??[];return t.length?t:null}#L(){return this._visibleItems?.toArray().map(e=>this.#a(e))}#l(){return c`<div slot=message>${this.messages.noItemsToDisplay}</div>`}#w(){return this.hideNoItemsNotice?null:c`<div class=${w(g.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this.#l()}</calcite-notice></div>`}#b(e,t){let{messages:i,openedLayers:a}=this,s=e.title||this.messages.untitledLayer;return _(e?.uid??s,c`<calcite-flow-item data-layer-uid=${e?.uid??""??M} .description=${s} .heading=${i[e.type==="catalog"?"catalogLayers":"tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${l=>{l.preventDefault(),a.pop(),a.at(-1)&&this._layerFlowItemRef.value?.setFocus()}} ${L(this._layerFlowItemRef)}>${this._layerListMap.get(e)}</calcite-flow-item>`)}#_(){let{_openedPanelItems:e,openedLayers:t}=this;return H(e.toArray(),i=>i.uid,(i,a)=>{let{panel:s,title:l}=i,r=()=>this.#p(s);return c`<calcite-flow-item .description=${l} .heading=${s.title} .headingLevel=${this.headingLevel} .selected=${!t.length&&a===e.length-1} @calciteFlowItemBack=${o=>{o.preventDefault(),r()}} ${L(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${i} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${r} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`})}#$(){let{collapsed:e,_visibleItems:t,_openedPanelItems:i,_filterEnabled:a,_rootGroupUid:s,showCloseButton:l,showCollapseButton:r,showHeading:o,_dragEnabled:n,selectionMode:d,filterText:f,openedLayers:y,filterPlaceholder:$,messages:I}=this,E=[c`<calcite-flow-item .closable=${l} .closed=${this.closed} .collapsed=${e} .collapsible=${r} .heading=${o?I.componentLabel:void 0} .headingLevel=${this.headingLevel} .selected=${!y.length&&!i.length} @calciteFlowItemClose=${()=>this.closed=!1}>${t?.length?c`<calcite-list @focusin=${this._setActiveItem} @focusout=${this._clearActiveItem} .canPull=${h=>this._canMove(h,"pull")} .canPut=${h=>this._canMove(h,"put")} data-layer-type=${s??M} .displayMode=${ie} .dragEnabled=${n} .filterEnabled=${a} .filterPlaceholder=${$} .filterProps=${j} .filterText=${a?f:""} .group=${s} .label=${I.componentLabel} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=highlight .selectionMode=${d} @calciteListChange=${this.#I} @calciteListFilter=${h=>{this.filterText=h.currentTarget?.filterText??"",this.arcgisFilterChange.emit()}} @calciteListOrderChange=${h=>this.#f(h.detail)} @calciteListDragEnd=${h=>this.#u(h.detail)} ${L(this._rootListRef)}>${t.toArray().map(h=>this.#E(h))}${a&&!this.hideNoFilterResultsNotice?c`<div class=${w(g.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this.#l()}</calcite-notice></div>`:null}</calcite-list>`:this.#w()}</calcite-flow-item>`,this.#_(),this._renderedOpenLayerFlowItems];return this.closed?null:_("root-flow",c`<calcite-flow>${E}</calcite-flow>`)}#E(e,t,i){return _(e.uid,Y({activeItem:this._activeItem,canMove:this._canMove,css:g,displayMode:ie,dragEnabled:this.dragEnabled,hideStatusIndicators:this.hideStatusIndicators,hideCatalogLayerList:this.hideCatalogLayerList,item:e,messages:this.messages,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,operationalItems:this.operationalItems,parent:t,parentTitles:i,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,setCurrentActiveItem:this._setCurrentActiveItem,showTemporaryLayerIndicators:this.showTemporaryLayerIndicators,showCloseButton:this.showCloseButton,showCollapseButton:this.showCollapseButton,showErrors:this.showErrors,showHeading:this.showHeading,showFilter:this.showFilter,clearActiveItem:this._clearActiveItem,visibilityAppearance:this.visibilityAppearance,handleAction:this._onTriggerAction,handleCatalogOpen:this._onCatalogOpen,handleSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,handleTablesOpen:this._onTablesOpen,handleTooltipReferenceChange:this._onTooltipReferenceChange,view:this.view}))}};x("arcgis-layer-list-next",O);return O},"layerList/LayerListModel","core/Collection","core/reactiveUtils",a,d,e,f,h,i,l,n,o,r,s)
|
|
2
|
+
import s from"./GZ6UBR6R.js";import"./EVWWTIEQ.js";import{a as g}from"./4L43F7HU.js";import r from"./3KAC2MKA.js";import o from"./BFYJTV6Q.js";import{a as j,b as q,c as z,g as A,h as J,j as K,k as Q,m,n as F}from"./ZCFWKPXL.js";import{a as H}from"./WVKMYNN7.js";import{a as _}from"./5GFPOTOB.js";import n from"./GEOME3IC.js";import l from"./HU57LQOA.js";import i from"./BOPNSNUT.js";import"./WJQUE4DR.js";import h from"./EJVFK7JX.js";import{a as k}from"./REB4CHAK.js";import{a as b}from"./L5IRXOCJ.js";import{a as G}from"./7Y4SF2NT.js";import f from"./7ILT5PDJ.js";import e from"./7JPHMESH.js";import d from"./OLY5EME5.js";import{h as N}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import{a as B}from"./LXME6MU5.js";import{B as P,P as v,Q as L,R as D,T as w,X as M,Y as C,_ as x,b as c,x as p}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([le,u,{on:T,watch:te},,,,U,S,,,,,{e:V,h:W,k:X},{a:Y,b:Z,c:ee}])=>{var ie="nested",re=S(le),O=class extends D{constructor(){super(...arguments),this.#i=null,this._rootListRef=v(),this._layerFlowItemRef=v(),this._panelFlowItemRef=v(),this._selectedDragItemLayerUid=null,this._rootGroupUid=`operational-${P()}`,this.#s=null,this.messages=k(),this._canMove=({dragEl:e,fromEl:t,toEl:i},a)=>{let s=a==="pull"?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,l=m(e,this.operationalItems);if(!l?.sortable)return!1;let r=this.#e(t),o=this.#e(i),n=this.#t(r),d=F(r),f=this.#t(o),y=F(o),$=!!d&&!!y&&d===y,I={selected:l,from:n,to:f},E=r?.group,h=o?.group,se=n?.layer?.type??"",ae=f?.layer?.type??"",R=new Set(["map-image","catalog","knowledge-graph"]);return E&&h&&typeof s=="function"?s(I):$&&!R.has(se)&&!R.has(ae)&&l?.layer?.type!=="sublayer"},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent)},this._onTablesOpen=e=>{this.openedLayers.push(e.layer)},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(a=>a.classList?.contains(g.item)),i=m(t,this.operationalItems);this._activeItem=i},this.viewModel=re(this),this.arcgisClose=G(this),this._activeItem=null,this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._tooltipReferenceMap=new Map,this._layerListMap=new Map,this.layerTablesEnabled=new u(["knowledge-graph"]),this.mapImageOptions=null,this.openedLayerLists=new u,this.tileOptions=null,this.autoDestroyDisabled=!1,this.closed=!1,this.collapsed=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterText="",this.headingLevel=2,this.hideCatalogLayerList=!1,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.hideStatusIndicators=!1,this.icon="layers",this.layerTablesAvailable=new u(["knowledge-graph"]),this.listItemCreatedFunction=this.viewModel.listItemCreatedFunction,this.listModeDisabled=this.viewModel.listModeDisabled,this.minDragEnabledItems=z,this.minFilterItems=q,this.openedLayers=new u,this.operationalItems=this.viewModel.operationalItems,this.selectedItems=new u,this.selectionMode="none",this.showCloseButton=!1,this.showCollapseButton=!1,this.showErrors=!1,this.showFilter=!1,this.showHeading=!1,this.showTemporaryLayerIndicators=!1,this.state=this.viewModel.state,this.view=this.viewModel.view,this.visibilityAppearance="default",this.arcgisFilterChange=p(),this.arcgisOpenedLayersChange=p(),this.arcgisPropertyChange=N()("state"),this.arcgisReady=p(),this.arcgisSelectedItemsChange=p(),this.arcgisTriggerAction=U(()=>this.viewModel,"trigger-action")}static{this.properties={_catalogLayerList:16,_tableList:16,_tooltipReferenceMap:16,_layerListMap:16,_totalItems:16,_visibleItems:16,_openedPanelItems:16,_dragEnabled:16,_filterEnabled:16,layerTablesEnabled:16,mapImageOptions:16,openedLayerLists:16,tileOptions:16,_renderedOpenLayerFlowItems:16,autoDestroyDisabled:5,catalogLayerList:32,catalogOptions:0,closed:5,collapsed:5,dragEnabled:5,filterPlaceholder:1,filterPredicate:0,filterText:1,headingLevel:9,hideCatalogLayerList:5,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,hideStatusIndicators:5,icon:1,knowledgeGraphOptions:0,label:1,layerTablesAvailable:0,listItemCanGiveFunction:0,listItemCanReceiveFunction:0,listItemCreatedFunction:0,listModeDisabled:5,messageOverrides:0,minDragEnabledItems:9,minFilterItems:9,openedLayers:32,operationalItems:0,referenceElement:1,selectedItems:0,selectionMode:1,showCloseButton:5,showCollapseButton:5,showErrors:5,showFilter:5,showHeading:5,showTemporaryLayerIndicators:5,state:32,tableList:32,view:0,visibilityAppearance:1}}static{this.styles=[ee,Z]}#i;#s;get _totalItems(){return this.viewModel.operationalItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _visibleItems(){return this.operationalItems?.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleItems.flatten(e=>e.children).filter(e=>!e.hidden&&e.panel?.open&&!e.panel.disabled&&e.panel.flowEnabled&&(!W(e)||V(e)))}get _dragEnabled(){return this._totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this._totalItems>=this.minFilterItems&&this.showFilter}get _renderedOpenLayerFlowItems(){let{openedLayers:e}=this;return e.toArray().map((t,i)=>this.#b(t,i===e.length-1))}get catalogLayerList(){return this._catalogLayerList}get tableList(){return this._tableList}async destroy(){await this.manager.destroy(),this.#h(),this._tooltipReferenceMap.clear()}loaded(){this.manager.onLifecycle(()=>[T(()=>this.openedLayers,"change",()=>{this.#n()},{initial:!0}),T(()=>this.viewModel.operationalItems,"change",()=>A(this.selectedItems),{initial:!0}),te(()=>this.operationalItems.flatten(e=>e.children).map(e=>e.uid).join(","),()=>{A(this.selectedItems),this.requestUpdate()},{initial:!0}),T(()=>this.selectedItems,"change",()=>this.arcgisSelectedItemsChange.emit()),te(()=>[this.filterPredicate,this._rootListRef.value],()=>J(this._rootListRef.value,this.filterPredicate,this.operationalItems))])}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}#e(e){return e?e.matches("calcite-list")?e:e.closest("calcite-list[data-item]")||(this._rootListRef.value?.contains(e)?this._rootListRef.value:null):null}#t(e){let t=e?.getAttribute("data-item");return t?this.#r(t):null}#r(e){let t=this.operationalItems?.toArray()??[];for(;t.length;){let i=t.shift();if(!i)continue;if(i.uid===e)return i;let a=i.children?.toArray()??[];t.push(...a)}return null}async#o(e,t){let{_layerListMap:i}=this,a=i.get(e);if(a)return a;let s=e.type==="catalog"?await this.#c(e):await this.#m(e);return t.aborted||i.set(e,s),s}async#n(){let{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this.#s?.abort();let a=new AbortController,{signal:s}=a;this.#s=a,e.forEach((o,n)=>{t.includes(n)||(o?.destroy?.(),e.delete(n))});let l=await Promise.all(t.map(o=>this.#o(o,s)));if(s.aborted)return;i.removeAll(),i.addMany(l);let r=i.at(-1);r?"catalogLayer"in r?(this._catalogLayerList=r,this._tableList=void 0):(this._catalogLayerList=void 0,this._tableList=r):(this._catalogLayerList=void 0,this._tableList=void 0),this.arcgisOpenedLayersChange.emit()}#h(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}async#c(e){let{headingLevel:t,catalogOptions:i,filterPlaceholder:a,listItemCreatedFunction:s,minFilterItems:l,selectionMode:r,visibilityAppearance:o}=this;return C(c`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${i?.filterPlaceholder??a} .listItemCreatedFunction=${i?.listItemCreatedFunction??s} .minFilterItems=${i?.minFilterItems??l} .selectionMode=${i?.selectionMode??r} .visibilityAppearance=${i?.visibilityAppearance??o} .showErrors=${i?.showErrors??this.showErrors} .showFilter=${i?.showFilter??this.showFilter} .hideStatusIndicators=${i?.hideStatusIndicators??this.hideStatusIndicators} .showTemporaryLayerIndicators=${i?.showTemporaryLayerIndicators??this.showTemporaryLayerIndicators} .messageOverrides=${this.messageOverrides} @arcgisReady=${n=>n.stopPropagation()} .catalogLayer=${e} .view=${this.view} .referenceElement=${this.referenceElement} @catalogOpen=${this._onCatalogOpen} @tablesOpen=${this._onTablesOpen}></arcgis-catalog-layer-list-next>`)}#d(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#m(e){let{headingLevel:t,selectionMode:i,dragEnabled:a}=this,s=this.#d(e);return C(c`<arcgis-table-list-next .headingLevel=${s?.headingLevel??t} .selectionMode=${s?.selectionMode??i} .dragEnabled=${s?.dragEnabled??a} .collapsed=${s?.collapsed} .filterPlaceholder=${s?.filterPlaceholder} .filterText=${s?.filterText} .icon=${s?.icon??void 0} .label=${s?.label??void 0} .listItemCreatedFunction=${s?.listItemCreatedFunction} .messageOverrides=${this.messageOverrides} .tables=${s?.tables} .referenceElement=${this.referenceElement} @arcgisReady=${l=>l.stopPropagation()}></arcgis-table-list-next>`)}#p(e){e.open=!1}#g({toEl:e,fromEl:t,dragEl:i,newIndex:a}){let s=this.#e(e),l=this.#e(t),r=m(i,this.operationalItems),o=this.#t(s),n=this.#t(l);a==null||!r||(this.viewModel.moveItem(r,n,o,a),X(this,r.uid,d=>d!==i&&this.#e(d.parentElement)===s))}#u(e){let{fromEl:t,toEl:i,dragEl:a,oldIndex:s}=e;if(t!==i){a.remove();return}s==null||!t||!a||t.insertBefore(a,t.children[s])}#f(e){let t=this.#i,{dragEl:i,newIndex:a}=e,s=this.#e(e.fromEl),l=this.#e(e.toEl),r=t?.newIndex===a&&t?.dragEl===i&&t?.toEl===l&&t?.fromEl===s;if(!(!s||!l||r)){if(this.#i={...e,fromEl:s,toEl:l},this._selectedDragItemLayerUid=i.value,s===l){let o=Array.from(s.children).filter(n=>n?.matches("calcite-list-item")).map(n=>n.value.layer?.uid??"");this.#y(s,o);return}this.#g({toEl:l,fromEl:s,dragEl:i,newIndex:a})}}#y(e,t){if(e)if(e===this._rootListRef.value)K(this.el.view?.map?.layers,t);else{let i=m(e,this.operationalItems);if(!i)return;Q(i,t)}}#I(e){let{selectionMode:t,selectedItems:i}=this;if(t==="none")return;let a=e.target.selectedItems.map(s=>m(s,this.operationalItems)).filter(Boolean);i.removeAll(),i.addMany(a)}render(){let{state:e}=this,t={[b.hidden]:e==="loading",[b.disabled]:e==="disabled"};return c`<div class=${w(B(b.widget,t))}>${this._visibleItems?.length?this.#L():null}${this.#$()}</div>`}#v(e){let{_tooltipReferenceMap:t,messages:i}=this;return e?c`<calcite-tooltip overlay-positioning=fixed .referenceElement=${t.get(e.layer?.uid??"")}>${i.layerIncompatibleTooltip}</calcite-tooltip>`:null}#a(e){if(e.incompatible)return this.#v(e);let t=e.children?.filter(i=>!i.hidden).toArray().map(i=>this.#a(i))??[];return t.length?t:null}#L(){return this._visibleItems?.toArray().map(e=>this.#a(e))}#l(){return c`<div slot=message>${this.messages.noItemsToDisplay}</div>`}#w(){return this.hideNoItemsNotice?null:c`<div class=${w(g.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this.#l()}</calcite-notice></div>`}#b(e,t){let{messages:i,openedLayers:a}=this,s=e.title||this.messages.untitledLayer;return _(e?.uid??s,c`<calcite-flow-item data-layer-uid=${e?.uid??""??M} .description=${s} .heading=${i[e.type==="catalog"?"catalogLayers":"tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${l=>{l.preventDefault(),a.pop(),a.at(-1)&&this._layerFlowItemRef.value?.setFocus()}} ${L(this._layerFlowItemRef)}>${this._layerListMap.get(e)}</calcite-flow-item>`)}#_(){let{_openedPanelItems:e,openedLayers:t}=this;return H(e.toArray(),i=>i.uid,(i,a)=>{let{panel:s,title:l}=i,r=()=>this.#p(s);return c`<calcite-flow-item .description=${l} .heading=${s.title} .headingLevel=${this.headingLevel} .selected=${!t.length&&a===e.length-1} @calciteFlowItemBack=${o=>{o.preventDefault(),r()}} ${L(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${i} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${r} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`})}#$(){let{collapsed:e,_visibleItems:t,_openedPanelItems:i,_filterEnabled:a,_rootGroupUid:s,showCloseButton:l,showCollapseButton:r,showHeading:o,_dragEnabled:n,selectionMode:d,filterText:f,openedLayers:y,filterPlaceholder:$,messages:I}=this,E=[c`<calcite-flow-item .closable=${l} .closed=${this.closed} .collapsed=${e} .collapsible=${r} .heading=${o?I.componentLabel:void 0} .headingLevel=${this.headingLevel} .selected=${!y.length&&!i.length} @calciteFlowItemClose=${()=>this.closed=!1}>${t?.length?c`<calcite-list @focusin=${this._setActiveItem} @focusout=${this._clearActiveItem} .canPull=${h=>this._canMove(h,"pull")} .canPut=${h=>this._canMove(h,"put")} data-layer-type=${s??M} .displayMode=${ie} .dragEnabled=${n} .filterEnabled=${a} .filterPlaceholder=${$} .filterProps=${j} .filterText=${a?f:""} .group=${s} .label=${I.componentLabel} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=highlight .selectionMode=${d} @calciteListChange=${this.#I} @calciteListFilter=${h=>{this.filterText=h.currentTarget?.filterText??"",this.arcgisFilterChange.emit()}} @calciteListOrderChange=${h=>this.#f(h.detail)} @calciteListDragEnd=${h=>this.#u(h.detail)} ${L(this._rootListRef)}>${t.toArray().map(h=>this.#E(h))}${a&&!this.hideNoFilterResultsNotice?c`<div class=${w(g.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this.#l()}</calcite-notice></div>`:null}</calcite-list>`:this.#w()}</calcite-flow-item>`,this.#_(),this._renderedOpenLayerFlowItems];return this.closed?null:_("root-flow",c`<calcite-flow>${E}</calcite-flow>`)}#E(e,t,i){return _(e.uid,Y({activeItem:this._activeItem,canMove:this._canMove,css:g,displayMode:ie,dragEnabled:this.dragEnabled,hideStatusIndicators:this.hideStatusIndicators,hideCatalogLayerList:this.hideCatalogLayerList,item:e,messages:this.messages,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,operationalItems:this.operationalItems,parent:t,parentTitles:i,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,setCurrentActiveItem:this._setCurrentActiveItem,showTemporaryLayerIndicators:this.showTemporaryLayerIndicators,showCloseButton:this.showCloseButton,showCollapseButton:this.showCollapseButton,showErrors:this.showErrors,showHeading:this.showHeading,showFilter:this.showFilter,clearActiveItem:this._clearActiveItem,visibilityAppearance:this.visibilityAppearance,handleAction:this._onTriggerAction,handleCatalogOpen:this._onCatalogOpen,handleSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,handleTablesOpen:this._onTablesOpen,handleTooltipReferenceChange:this._onTooltipReferenceChange,view:this.view}))}};x("arcgis-layer-list-next",O);return O},"layerList/LayerListModel","core/Collection","core/reactiveUtils",a,d,e,f,h,i,l,n,o,r,s)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import n from"./
|
|
2
|
+
import n from"./GZ6UBR6R.js";import{a as k}from"./4L43F7HU.js";import l from"./3KAC2MKA.js";import j from"./BFYJTV6Q.js";import{a as x,b as N,c as R,g as B}from"./ZCFWKPXL.js";import{a as U}from"./WVKMYNN7.js";import{a as I}from"./5GFPOTOB.js";import i from"./GEOME3IC.js";import h from"./HU57LQOA.js";import g from"./BOPNSNUT.js";import"./WJQUE4DR.js";import f from"./EJVFK7JX.js";import{a as T}from"./REB4CHAK.js";import{a as m}from"./L5IRXOCJ.js";import e from"./7ILT5PDJ.js";import c from"./7JPHMESH.js";import b from"./OLY5EME5.js";import{h as D}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import{a as F}from"./LXME6MU5.js";import{B as y,P as M,Q as E,R as _,T as p,X as C,_ as L,b as o,x as d}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([j,{watch:w,on:q},V,,,,A,P,,,,,,{a:S,b:G,c:O}])=>{var v=k,H="nested",J=P(V),$=class extends _{constructor(){super(...arguments),this.#t=null,this._rootGroupUid=`table-${y()}`,this._rootListRef=M(),this._selectedDragItemLayerUid=null,this.messages=T(),this.viewModel=J(this),this._canMove=({dragEl:e,fromEl:t,toEl:i},s)=>{let l=s==="pull"?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,a=this.#e(e);if(!a||!("sortable"in a)||!a.sortable)return!1;let c=this.#e(t),h=this.#i(t),n=this.#e(i),g=this.#i(i),f=!!h&&!!g&&h===g,u={selected:a,from:c,to:n},b=t?.group,r=i?.group;return b&&r&&typeof l=="function"?l(u):f},this._onPanelOpen=()=>{this.requestUpdate()},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this.autoDestroyDisabled=!1,this.closed=!1,this.collapsed=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterText="",this.headingLevel=2,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.hideStatusIndicators=!1,this.icon="table",this.listItemCreatedFunction=this.viewModel.listItemCreatedFunction,this.listModeDisabled=this.viewModel.listModeDisabled,this.map=this.viewModel.map,this.minDragEnabledItems=R,this.minFilterItems=N,this.selectedItems=new j,this.selectionMode="none",this.showCloseButton=!1,this.showCollapseButton=!1,this.showErrors=!1,this.showFilter=!1,this.showHeading=!1,this.showTemporaryTableIndicators=!1,this.tables=this.viewModel.tables,this.arcgisClose=d(),this.arcgisFilterChange=d(),this.arcgisPropertyChange=D()("state"),this.arcgisReady=d(),this.arcgisSelectedItemsChange=d(),this.arcgisTableItemsChanged=d(),this.arcgisTriggerAction=A(()=>this.viewModel,"trigger-action")}static{this.properties={_visibleItems:16,_openedPanelItems:16,_dragEnabled:16,_filterEnabled:16,autoDestroyDisabled:5,closed:5,collapsed:7,dragEnabled:5,filterPlaceholder:1,filterPredicate:0,filterText:1,headingLevel:9,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,hideStatusIndicators:5,icon:1,label:1,listItemCanGiveFunction:0,listItemCanReceiveFunction:0,listItemCreatedFunction:0,listModeDisabled:5,map:0,messageOverrides:0,minDragEnabledItems:9,minFilterItems:9,referenceElement:1,selectedItems:0,selectionMode:1,showCloseButton:5,showCollapseButton:5,showErrors:5,showFilter:5,showHeading:5,showTemporaryTableIndicators:5,state:32,tableItems:32,tables:0,view:0}}static{this.styles=[O,G]}#t;get _visibleItems(){return this.tableItems?.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleItems.filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _dragEnabled(){return this.viewModel.totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this.viewModel.totalItems>=this.minFilterItems&&this.showFilter}get state(){return this.viewModel.state}get tableItems(){return this.viewModel.tableItems}async destroy(){await this.manager.destroy()}willUpdate(e){e.has("map")&&(this.viewModel.map=this.map),e.has("tables")&&(this.viewModel.tables=this.tables),e.has("listItemCreatedFunction")&&(this.viewModel.listItemCreatedFunction=this.listItemCreatedFunction)}loaded(){this.manager.onLifecycle(()=>[w(()=>this.view?.map,e=>{this.map||(this.viewModel.map=e)},{initial:!0}),q(()=>this.viewModel.tableItems,"change",()=>{B(this.selectedItems),this.arcgisTableItemsChanged.emit(),this.requestUpdate()},{initial:!0}),q(()=>this.selectedItems,"change",()=>this.arcgisSelectedItemsChange.emit()),w(()=>[this.viewModel.state,this.viewModel.totalItems],()=>this.requestUpdate(),{initial:!0}),w(()=>[this.filterPredicate,this._rootListRef.value],()=>this.#a())])}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}#e(e){if(e?.tagName.toLowerCase()==="calcite-list-item")return e.value;let t=e?.getAttribute("data-item");return t?this.#l(t):null}#l(e){let t=this.tableItems?.toArray()??[];for(;t.length;){let i=t.shift();if(i){if(i.uid===e)return i;t.push(...i.children?.toArray()??[])}}return null}#i(e){return e?.getAttribute("data-layer-type")??null}#a(){let e=this._rootListRef.value;e&&(e.filterPredicate=this.filterPredicate?t=>{let i=this.#e(t);return i?this.filterPredicate(i):!1}:void 0)}#r(e){e.open=!1}#o(e,t){e?.sort((i,s)=>{let l=i.uid!=null?t.indexOf(i.uid):-1,a=s.uid!=null?t.indexOf(s.uid):-1;return l>a?-1:l<a?1:0})}#n(e){let{fromEl:t,dragEl:i,oldIndex:s}=e;s==null||!t||!i||t.insertBefore(i,t.children[s])}#h(e){let t=this.#t,{toEl:i,fromEl:s,dragEl:l,newIndex:a}=e,c=t?.newIndex===a&&t?.dragEl===l&&t?.toEl===i&&t?.fromEl===s;if(!s||!i||c)return;this.#t=e,this._selectedDragItemLayerUid=l.value;let h=Array.from(s.children).filter(n=>n?.matches("calcite-list-item")).map(n=>n.value.layer?.uid??"");this.#o(this.viewModel.tables,h)}#d(e){let{selectionMode:t,selectedItems:i}=this;if(t==="none")return;let s=e.target.selectedItems.map(l=>this.#e(l)).filter(Boolean);i.removeAll(),i.addMany(s)}#c(){this.closed=!0,this.arcgisClose.emit(),this.autoDestroyDisabled||this.destroy()}render(){let{state:e}=this,t={[m.hidden]:e==="loading",[m.disabled]:e==="disabled"};return o`<div class=${p(F(m.widget,m.panel,t))}>${this.#u()}</div>`}#s(){return o`<div slot=message>${this.messages.noItemsToDisplay}</div>`}#m(){return this.hideNoItemsNotice?null:o`<div class=${p(v.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this.#s()}</calcite-notice></div>`}#g(){return U(this._openedPanelItems.toArray(),e=>e.uid,(e,t)=>{let{panel:i,title:s}=e,l=()=>this.#r(i);return o`<calcite-flow-item .description=${s} .heading=${i.title} .headingLevel=${this.headingLevel} .selected=${t===this._openedPanelItems.length-1} @calciteFlowItemBack=${a=>{a.preventDefault(),l()}}><arcgis-layer-list-item-panel .item=${e} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${l} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`})}#u(){let{collapsed:e,_visibleItems:t,_filterEnabled:i,_rootGroupUid:s,showCloseButton:l,showCollapseButton:a,showHeading:c,_dragEnabled:h,selectionMode:n,filterText:g,filterPlaceholder:f,messages:u}=this,b=[o`<calcite-flow-item .closable=${l} .closed=${this.closed} .collapsed=${e} .collapsible=${a} .heading=${c?this.label??u.componentLabel:void 0} .headingLevel=${this.headingLevel} .selected=${!this._openedPanelItems.length} @calciteFlowItemClose=${()=>this.#c()}>${t?.length?o`<calcite-list .canPull=${r=>this._canMove(r,"pull")} .canPut=${r=>this._canMove(r,"put")} data-layer-type=${s??C} .displayMode=${H} .dragEnabled=${h} .filterEnabled=${i} .filterPlaceholder=${f} .filterProps=${x} .filterText=${i?g:""} .group=${s} .label=${this.label??u.componentLabel} selection-appearance=border .selectionMode=${n} @calciteListChange=${this.#d} @calciteListDragEnd=${r=>this.#n(r.detail)} @calciteListFilter=${r=>{this.filterText=r.currentTarget?.filterText??"",this.arcgisFilterChange.emit()}} @calciteListOrderChange=${r=>this.#h(r.detail)} ${E(this._rootListRef)}>${t.toArray().map(r=>this.#p(r))}${i&&!this.hideNoFilterResultsNotice?o`<div class=${p(v.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this.#s()}</calcite-notice></div>`:null}</calcite-list>`:this.#m()}</calcite-flow-item>`,this.#g()];return this.closed?null:I("root-flow",o`<calcite-flow>${b}</calcite-flow>`)}#p(e){return I(e.uid,S({canMove:this._canMove,css:v,displayMode:H,dragEnabled:this.dragEnabled,hideStatusIndicators:this.hideStatusIndicators,item:e,itemType:"table",listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,showErrors:this.showErrors,showFilter:this.showFilter,showTemporaryTableIndicators:this.showTemporaryTableIndicators,handleAction:(t,i)=>this._onTriggerAction(t,i),handlePanelOpen:this._onPanelOpen,handleSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,view:this.view}))}};L("arcgis-table-list-next",$);return $},"core/Collection","core/reactiveUtils","layerList/TableListModel",a,b,c,e,f,g,h,i,j,l,n)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{a as w}from"./Y6WTYXVP.js";import{a as P}from"./FH3WFF5O.js";import h from"./UYAOMCP7.js";import{d as _,k as y}from"./FXUZU52U.js";import f from"./BOPNSNUT.js";import{a as B}from"./WJQUE4DR.js";import e from"./QVJ2FUNW.js";import{a as $}from"./REB4CHAK.js";import{a as u}from"./L5IRXOCJ.js";import c from"./7JPHMESH.js";import b from"./OLY5EME5.js";import{h as D}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import"./LXME6MU5.js";import{Q as U,R as k,T as v,X as g,_ as M,a as C,b as d,x as S}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{createChart:F},{signal:L},{ignoreAbortErrors:b},{watch:m},A,{property:a,subclass:R},,,,z,{b:O,d:f},E])=>{var I=C`.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}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}:host{--internal-chart-height: 180px;--internal-gap: var(--calcite-spacing-sm-plus);width:550px;isolation:isolate;position:relative;container-type:inline-size}.root{display:flex;flex-direction:column;width:100%;min-width:0;gap:var(--internal-gap)}.header{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;margin-bottom:calc(var(--internal-gap) * -1)}.actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--calcite-spacing-xs)}.action-button{width:auto;min-height:32px}.main-container{display:flex;position:relative;flex-flow:column;width:100%;height:var(--internal-chart-height)}.chart-container{position:relative;width:100%;height:100%}.prompt-container{box-sizing:border-box;display:grid;place-content:center;padding-inline:var(--calcite-spacing-md);height:100%;text-align:center}.prompt-message{margin:0;width:100%}.spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transition:opacity .15s ease-in-out;transition-delay:0;opacity:0;&.visible{transition-delay:50ms;opacity:1}&.small{inset-inline-start:0;inset-block-start:-24px;left:unset;transform:none;color:var(--calcite-color-brand)}}@container (max-width: 400px){.esri-widget--panel{height:auto}.actions{flex-direction:column}.action-button{align-self:stretch}}`;async function T(t,e,i){let s=await H(t,e);return O(i),Z(s)?s.highlight(e):P()}async function H(t,e){let i=e?.layer;if(!(!i||i.type==="subtype-sublayer"||i.type==="sublayer"||i.type==="building-component"))return await t.whenLayerView(i)}function Z(t){return t!=null&&"highlight"in t&&typeof t.highlight=="function"}function j({geometry:t}){return t?.type==="polyline"&&t.paths.length>0&&t.paths.every(e=>e.length>=2)}function G({geometry:t}){return t?.type==="polyline"&&t.paths.reduce((e,i)=>e+i.length,0)>0}function q(t){return t?.samples?.some(e=>e.z!=null)??!1}var J=Object.defineProperty,N=Object.getOwnPropertyDescriptor,o=(t,e,i,s)=>{for(var r=s>1?void 0:s?N(e,i):e,l=t.length-1,c;l>=0;l--)(c=t[l])&&(r=(s?c(e,i,r):c(r))||r);return s&&r&&J(e,i,r),r},n=class extends E{constructor(){super(...arguments),this._resettingUnits=!1,this.highlightDisabled=!1,this.uniformChartScaling=!1,this.shouldForceInteractive=!1,this.supportedViewType="both",this.unsupportedErrorMessage=""}get _hasSamples(){let{progress:t}=this;return!!this.analysisView?.results?.some(e=>e.available&&(t<1||q(e)))}get doneButtonAvailable(){return this.featureIsSelected?!1:this.analysisView?.canStopPlacing??!1}get effectiveDisplayUnits(){return this.analysisView?.effectiveDisplayUnits}get errorState(){if(!j(this.analysis))return"no-valid-input";let t=this.analysisView?.error;if(t)switch(t.name){case"too-complex":return"too-complex";case"elevation-query-error":return"no-valid-input";default:return"unknown"}return this._hasSamples?"none":"no-available-profiles"}get feature(){return this._selectedFeature}set feature(t){t?t!==this.feature&&(this.analysis.setGeometryFromFeature(t),this._selectedFeature=t):this._selectedFeature=void 0}get featureIsSelected(){return this.feature!=null}get hasVertices(){return G(this.analysis)}get indicatorRelativePosition(){return this.analysisView?.indicatorRelativePosition??void 0}get geometry(){return this.analysis.geometry}set geometry(t){this.analysis.geometry=t}get elevationInfo(){return this.analysis.elevationInfo}set elevationInfo(t){this.analysis.elevationInfo=t}get profiles(){return this.analysis.profiles}set profiles(t){this.analysis.profiles=t}get progress(){return this.analysisView?.progress??0}get results(){return this.analysisView?.results??[]}get selectButtonAvailable(){for(let t of this.view?.map?.allLayers.toArray()??[])if(t.type==="graphics"&&!("internal"in t&&t.internal)&&t.graphics.some(e=>e.geometry?.type==="polyline")||"geometryType"in t&&t.geometryType==="polyline")return!0;return!!this.view?.graphics?.some(t=>t.geometry?.type==="polyline")}get state(){return this.disabled||!this.ready?"disabled":this._selectingPromise?"selecting":this.operationState==="active"?"creating":this.analysis.valid?this.featureIsSelected?"selected":"created":"ready"}get distanceUnit(){return y({userUnit:this._userDistanceUnit,analysisUnit:this.analysis.displayUnits?.distance,options:this.distanceUnitOptions,defaultUnit:this.defaultMeasurementSystem,viewUnit:this.view?.options.displayUnits.length})}set distanceUnit(t){this._userDistanceUnit=t}get distanceUnitOptions(){return V(this._userDistanceUnitOptions)}set distanceUnitOptions(t){this._userDistanceUnitOptions=t}get elevationUnit(){return y({userUnit:this._userElevationUnit,analysisUnit:this.analysis.displayUnits?.elevation,options:this.elevationUnitOptions,defaultUnit:this.defaultMeasurementSystem,viewUnit:this.view?.options.displayUnits.verticalLength})}set elevationUnit(t){this._userElevationUnit=t}get elevationUnitOptions(){return V(this._userElevationUnitOptions)}set elevationUnitOptions(t){this._userElevationUnitOptions=t}get canResetDistanceUnit(){return this._userDistanceUnit!=null||this.analysis.displayUnits.distance!=null}get canResetElevationUnit(){return this._userElevationUnit!=null||this.analysis.displayUnits.elevation!=null}resetUnit(t){this._resettingUnits=!0;try{t==="distance"?this._userDistanceUnit=void 0:this._userElevationUnit=void 0,this.analysis.displayUnits[t]=null}finally{this._resettingUnits=!1}}initialize(){this.addHandles([m(()=>({analysis:this.analysis,unitDistance:this._userDistanceUnit,unitElevation:this._userElevationUnit}),({analysis:t,unitDistance:e,unitElevation:i})=>{this._resettingUnits||(i&&(t.displayUnits.elevation=i),e&&(t.displayUnits.distance=e))},{sync:!0,initial:!0}),m(()=>({selectedFeature:this.feature,profiles:this.analysis.profiles.toArray()}),({selectedFeature:t,profiles:e},i)=>{this._highlightSelectedFeature(this.highlightDisabled?void 0:t),this.analysis.viewOptions.geometryVisualizationVisible=!this.highlightDisabled&&t==null;let s=i?.selectedFeature;e.forEach(r=>{switch(r.type){case"scene":this._excludeSelectedFeatureFromProfile(r,t,s);break;case"input":r.chartOptions.lineVisible=t!=null,r.viewOptions.lineVisible=t!=null;break}})},{initial:!0})])}destroy(){this._removeSelectionHighlight()}async select(){if(this.interactionDisabled)return;let t=this.analysisView;if(!t)return;this.clear();let e=super.start({operation:async i=>{let s=await t.pickFeature(i);i?.signal?.aborted||(t.interactive=!1,this.feature=s.feature)},clear:!1});this._selectingPromise=e;try{await b(e)}finally{this._selectingPromise===e&&(this._selectingPromise=void 0)}}async place(t){await this.analysisView?.place(t)}clearAnalysis(){this.geometry=null,this.elevationInfo=null,this.feature=void 0}constructAnalysis(){return new A}_highlightSelectedFeature(t){this._removeSelectionHighlight();let e=this.view;!e||!t||(this._selectionHighlightTask=f(async i=>await T(e,t,{signal:i})))}_removeSelectionHighlight(){this._selectionHighlightTask?.value?.remove(),this._selectionHighlightTask=B(this._selectionHighlightTask)}_excludeSelectedFeatureFromProfile(t,e,i){let s=new Set(t.exclude??[]);i&&s.delete(i),e&&s.add(e),t.exclude=Array.from(s)}};o([a()],n.prototype,"_userDistanceUnit",2);o([a()],n.prototype,"_userDistanceUnitOptions",2);o([a()],n.prototype,"_userElevationUnit",2);o([a()],n.prototype,"_userElevationUnitOptions",2);o([a()],n.prototype,"_selectingPromise",2);o([a()],n.prototype,"_selectedFeature",2);o([a()],n.prototype,"_selectionHighlightTask",2);o([a()],n.prototype,"_hasSamples",1);o([a()],n.prototype,"doneButtonAvailable",1);o([a({readOnly:!0})],n.prototype,"effectiveDisplayUnits",1);o([a({readOnly:!0})],n.prototype,"errorState",1);o([a()],n.prototype,"feature",1);o([a()],n.prototype,"featureIsSelected",1);o([a({readOnly:!0})],n.prototype,"hasVertices",1);o([a()],n.prototype,"highlightDisabled",2);o([a()],n.prototype,"indicatorRelativePosition",1);o([a()],n.prototype,"geometry",1);o([a()],n.prototype,"elevationInfo",1);o([a()],n.prototype,"profiles",1);o([a({readOnly:!0})],n.prototype,"progress",1);o([a({readOnly:!0})],n.prototype,"results",1);o([a({readOnly:!0})],n.prototype,"selectButtonAvailable",1);o([a({readOnly:!0})],n.prototype,"state",1);o([a()],n.prototype,"uniformChartScaling",2);o([a()],n.prototype,"distanceUnit",1);o([a()],n.prototype,"distanceUnitOptions",1);o([a()],n.prototype,"elevationUnit",1);o([a()],n.prototype,"elevationUnitOptions",1);o([a({readOnly:!0})],n.prototype,"canResetDistanceUnit",1);o([a({readOnly:!0})],n.prototype,"canResetElevationUnit",1);n=o([R("components.elevation-profile.ElevationProfileViewModel")],n);function V(t){let e=t?.filter(i=>_.includes(i));return e&&e.length>0?e:_.slice()}var Q=z(n),x=class extends k{constructor(){super(...arguments),this.viewModel=Q(this),this._chartInitializationTask=L(void 0),this._messages=$(),this._hideZoomOutButton=!0,this._hasSettingsStartContent=!1,this._hasSettingsEndContent=!1,this.analysis=this.viewModel.analysis,this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.effectiveDisplayUnits=this.viewModel.effectiveDisplayUnits,this.feature=this.viewModel.feature,this.hideChart=!1,this.hideChartGridLines=!1,this.hideChartAxisLabels=!1,this.hideClearButton=!1,this.hideLegend=!1,this.hideSelectButton=!1,this.hideSettingsButton=!1,this.hideResetUnitsButton=!1,this.hideStartButton=!1,this.hideUniformChartScalingToggle=!1,this.hideDistanceDisplayUnitSelect=!1,this.hideElevationDisplayUnitSelect=!1,this.hideVisualization=this.viewModel.hideVisualization,this.highlightDisabled=this.viewModel.highlightDisabled,this.icon="altitude",this.indicatorRelativePosition=this.viewModel.indicatorRelativePosition,this.interactionDisabled=this.viewModel.interactionDisabled,this.geometry=this.viewModel.geometry,this.elevationInfo=this.viewModel.elevationInfo,this.profiles=this.viewModel.profiles,this.progress=this.viewModel.progress,this.state=this.viewModel.state,this.uniformChartScaling=this.viewModel.uniformChartScaling,this.distanceUnit=this.viewModel.distanceUnit,this.distanceUnitOptions=this.viewModel.distanceUnitOptions,this.elevationUnit=this.viewModel.elevationUnit,this.elevationUnitOptions=this.viewModel.elevationUnitOptions,this.arcgisPropertyChange=D()("analysis","effectiveDisplayUnits","elevationInfo","feature","geometry","indicatorRelativePosition","interactionDisabled","progress","state"),this.arcgisReady=S()}static{this.properties={_messages:16,_hideZoomOutButton:16,_chartContainer:16,_hasSettingsStartContent:16,_hasSettingsEndContent:16,analysis:0,view:0,autoDestroyDisabled:5,effectiveDisplayUnits:32,feature:0,hideChart:5,hideChartGridLines:5,hideChartAxisLabels:5,hideClearButton:5,hideLegend:5,hideSelectButton:5,hideSettingsButton:5,hideResetUnitsButton:5,hideStartButton:5,hideUniformChartScalingToggle:5,hideDistanceDisplayUnitSelect:5,hideElevationDisplayUnitSelect:5,hideVisualization:5,highlightDisabled:5,icon:3,indicatorRelativePosition:40,interactionDisabled:5,geometry:0,elevationInfo:0,label:1,messageOverrides:0,referenceElement:1,profiles:0,progress:40,state:32,uniformChartScaling:5,distanceUnit:1,distanceUnitOptions:0,elevationUnit:1,elevationUnitOptions:0}}static{this.styles=I}get _selectButtonVisible(){return!this.hideSelectButton&&this.viewModel.selectButtonAvailable}get _chart(){return this._chartInitializationTask.value?.value}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy()}async select(){b(this.viewModel.select())}async start(){b(this.viewModel.start())}async stop(){this.viewModel.stop()}load(){this.manager.onLifecycle(()=>[m(()=>({container:this._chartContainer,messages:this._messages}),({container:e,messages:i})=>{this._destroyChart(),!(!e||i._loading)&&(this._chartInitializationTask.value=f(async s=>await F({view:this.viewModel.view,analysisView:this.viewModel.analysisView,container:e,messages:i,signal:s,uniformScaling:this.viewModel.uniformChartScaling,onRangeChange:(r,l)=>{this._hideZoomOutButton=r===1&&l===1},onCursorPositionChange:(r,l)=>{let{analysisView:c}=this.viewModel;c&&(c.indicatorRelativePosition=r)}})))},{sync:!0,initial:!0}),m(()=>({chart:this._chart,messages:this._messages,view:this.viewModel.view,analysisView:this.viewModel.analysisView,uniformScaling:this.viewModel.uniformChartScaling,hideGridLines:this.hideChartGridLines,hideLabels:this.hideChartAxisLabels}),({chart:e,messages:i,view:s,analysisView:r,uniformScaling:l})=>{e&&(e.messages=i,e.view=s,e.analysisView=r,e.uniformScaling=l,e.hideGridLines=this.hideChartGridLines,e.hideAxisLabels=this.hideChartAxisLabels)},{sync:!0,initial:!0}),{remove:()=>this._destroyChart()}])}_destroyChart(){let e=this._chart;this._chartInitializationTask.value?.abort(),this._chartInitializationTask.value=void 0,e?.destroy()}_onCancelButtonClick(){this.viewModel.stop(),this.viewModel.clear()}_onDoneButtonClick(){this.viewModel.stop()}_getErrorMessage(){let e=W[this.viewModel.errorState];return e?this._messages?.errors?.[e]:void 0}_onClearButtonClick(){this.viewModel.clear()}_onZoomOutButtonClick(){this._chart?.zoomOut()}_onChartContainerRef(e){this._chartContainer=e}render(){return d`<div aria-label=${this._messages.componentLabel??g} class=${v({root:!0,[u.widget]:!0,[u.widgetDisabled]:this.viewModel.state==="disabled",[u.panel]:!0})} role=presentation>${this._renderContentForState()}</div>`}_renderContentForState(){switch(this.viewModel.state){case"ready":return this._renderContentForReadyState();case"selecting":return this._renderContentForSelectingState();case"creating":return this._renderContentForCreatingState();case"selected":return this._renderContentForSelectedState();case"created":return this._renderContentForCreatedState();case"disabled":return this._renderContentForReadyState()}}_renderContentForReadyState(){let{_messages:e,hideSelectButton:i,hideStartButton:s}=this,{selectButtonAvailable:r}=this.viewModel,l=!i&&r,c;return!s&&l?c=e.readyPrompt:s?l?c=e.readyPromptSelectOnly:c=e.errors?.noProfile:c=e.readyPromptCreateOnly,this._renderContent({prompt:c,chart:!1,actions:p})}_renderContentForSelectingState(){let{view:e}=this.viewModel;if(!e)return;let i=this._messages[`selectingPrompt-${e.type}`];return this._renderContent({prompt:i,chart:!1,actions:[{type:"select-cancel"}]})}_renderContentForCreatingState(){let{viewModel:e}=this,{view:i}=e;if(!i)return;let s=e.hasVertices?[{type:"sketch-cancel"},{type:"sketch-done",disabled:!e.doneButtonAvailable}]:[{type:"select"},{type:"sketch",disabled:!0}];if(e.errorState==="no-valid-input"){let l=this._messages[`creatingPrompt-${i.type}`];return this._renderContent({chart:!1,actions:s,prompt:l})}let r=this._getErrorMessage();return r?this._renderContent({chart:!1,actions:s,prompt:r}):this._renderContent({chart:!0,actions:s})}_renderContentForSelectedState(){let e=this._getErrorMessage();return e?this._renderContent({chart:!1,actions:p,prompt:e}):this._renderContent({chart:!0,actions:p})}_renderContentForCreatedState(){let e=this._getErrorMessage();return e?this._renderContent({chart:!1,actions:p,prompt:e}):this._renderContent({chart:!0,actions:p})}_renderContent(e){let{viewModel:i}=this,s=i.geometry!=null;return d`<header class="header">${h({hidden:this._hideZoomOutButton,children:this._renderZoomOutButton()})}${h({hidden:this.hideClearButton||!s,children:this._renderClearButton()})}${h({hidden:this.hideSettingsButton,children:this._renderSettingsButton()})}</header><div class="main-container">${e.prompt!=null?this._renderPrompt(e.prompt):e.chart?this._renderChart():void 0}</div>${h({hidden:this.hideLegend,children:this._renderLegend()})}${this._renderActions(e)}`}_renderPrompt(e){return[d`<div class="prompt-container"><p class="prompt-message">${e}</p></div>`]}_renderZoomOutButton(){let e=this._messages.zoomOut??"";return d`<calcite-action icon=magnifying-glass-minus @click=${this._onZoomOutButtonClick} .text=${e} title=${e??g}></calcite-action>`}_renderChart(){if(this.hideChart)return;let e=this._chart;return d`${this._renderSpinner({size:e?.chartVisible?"small":"large",visible:e?.spinnerVisible??!1})}<div class="chart-container" ${U(this._onChartContainerRef)}></div>`}_renderSpinner(e){let i=e.size==="small",s=e.visible??!0;return d`<calcite-loader class=${v({spinner:!0,small:i,visible:s})} .inline=${i} label></calcite-loader>`}_renderClearButton(){let e=this._messages.clearProfile??"";return d`<calcite-action icon=trash @click=${this._onClearButtonClick} .text=${e} title=${e??g}></calcite-action>`}_renderLegend(){return d`<arcgis-elevation-profile-legend .effectiveDisplayUnits=${this.viewModel.effectiveDisplayUnits} .featureSelected=${this.viewModel.featureIsSelected} .messages=${this._messages} .profiles=${this.profiles} .results=${this.viewModel.results}></arcgis-elevation-profile-legend>`}_renderSettingsButton(){return d`<arcgis-elevation-profile-settings .hasCustomStartContent=${this._hasSettingsStartContent} .hasCustomEndContent=${this._hasSettingsEndContent} .viewModel=${this.viewModel} .hideUniformChartScalingToggle=${this.hideUniformChartScalingToggle} .hideDistanceDisplayUnitSelect=${this.hideDistanceDisplayUnitSelect} .hideElevationDisplayUnitSelect=${this.hideElevationDisplayUnitSelect} .hideResetUnitsButton=${this.hideResetUnitsButton} .messages=${this._messages} .messageOverrides=${this.messageOverrides} .uniformChartScaling=${this.viewModel.uniformChartScaling} .unitOptionsDistance=${this.viewModel.distanceUnitOptions} .unitOptionsElevation=${this.viewModel.elevationUnitOptions} @arcgisElevationProfileSettingsUniformChartScalingChange=${e=>{this.viewModel.uniformChartScaling=e.detail}}><slot name=settings-start slot=settings-start @slotchange=${e=>{this._hasSettingsStartContent=w(e)}}></slot><slot name=settings-end slot=settings-end @slotchange=${e=>{this._hasSettingsEndContent=w(e)}}></slot></arcgis-elevation-profile-settings>`}_renderActions({actions:e}){let i=this._messages,s=e.map(r=>{switch(r.type){case"sketch":return h({hidden:this.hideStartButton,children:this._renderAction({action:r,label:i.sketchButtonLabel,primary:!0,onClick:()=>{this.start()}})});case"sketch-cancel":return h({hidden:this.hideStartButton,children:this._renderAction({action:r,label:i.cancelButtonLabel,primary:!1,onClick:this._onCancelButtonClick})});case"sketch-done":return h({hidden:this.hideStartButton,children:this._renderAction({action:r,label:i.doneButtonLabel,primary:!0,onClick:this._onDoneButtonClick})});case"select":return h({hidden:!this._selectButtonVisible,children:this._renderAction({action:r,label:i.selectButtonLabel,primary:!1,onClick:()=>{this.select()}})});case"select-cancel":return h({hidden:!this._selectButtonVisible,children:this._renderAction({action:r,label:i.cancelButtonLabel,primary:!1,onClick:this._onCancelButtonClick})});default:return}}).filter(Boolean);return s.length?d`<footer class="actions">${s}</footer>`:void 0}_renderAction({action:e,label:i,onClick:s,primary:r}){return d`<calcite-button .appearance=${r?"solid":"outline-fill"} class="action-button" .disabled=${e.disabled||this.interactionDisabled&&(e.type==="sketch"||e.type==="select")} @click=${s}>${i}</calcite-button>`}};function h(t){return t.hidden?void 0:t.children}var p=[{type:"select"},{type:"sketch"}],W={none:void 0,"no-valid-input":"noProfile","no-available-profiles":"noProfile","too-complex":"tooComplex",unknown:"unknown"};M("arcgis-elevation-profile",x);return x},"applications/Components/analysisUtils","applications/Components/reactiveUtils","core/promiseUtils","core/reactiveUtils","analysis/ElevationProfileAnalysis","core/accessorSupport/decorators",a,b,c,e,f,h)
|
|
2
|
+
import{a as w}from"./Y6WTYXVP.js";import{a as P}from"./FH3WFF5O.js";import h from"./UYAOMCP7.js";import{d as _,k as y}from"./FXUZU52U.js";import f from"./BOPNSNUT.js";import{a as B}from"./WJQUE4DR.js";import e from"./EJVFK7JX.js";import{a as $}from"./REB4CHAK.js";import{a as u}from"./L5IRXOCJ.js";import c from"./7JPHMESH.js";import b from"./OLY5EME5.js";import{h as D}from"./Q7GF26CL.js";import"./U77WHUC6.js";import a from"./SI2DEXWH.js";import"./LXME6MU5.js";import{Q as U,R as k,T as v,X as g,_ as M,a as C,b as d,x as S}from"./PQ7NUE5C.js";import"./TAVTDQ6S.js";export default $arcgis.t(([{createChart:F},{signal:L},{ignoreAbortErrors:b},{watch:m},A,{property:a,subclass:R},,,,z,{b:O,d:f},E])=>{var I=C`.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}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}:host{--internal-chart-height: 180px;--internal-gap: var(--calcite-spacing-sm-plus);width:550px;isolation:isolate;position:relative;container-type:inline-size}.root{display:flex;flex-direction:column;width:100%;min-width:0;gap:var(--internal-gap)}.header{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;margin-bottom:calc(var(--internal-gap) * -1)}.actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--calcite-spacing-xs)}.action-button{width:auto;min-height:32px}.main-container{display:flex;position:relative;flex-flow:column;width:100%;height:var(--internal-chart-height)}.chart-container{position:relative;width:100%;height:100%}.prompt-container{box-sizing:border-box;display:grid;place-content:center;padding-inline:var(--calcite-spacing-md);height:100%;text-align:center}.prompt-message{margin:0;width:100%}.spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transition:opacity .15s ease-in-out;transition-delay:0;opacity:0;&.visible{transition-delay:50ms;opacity:1}&.small{inset-inline-start:0;inset-block-start:-24px;left:unset;transform:none;color:var(--calcite-color-brand)}}@container (max-width: 400px){.esri-widget--panel{height:auto}.actions{flex-direction:column}.action-button{align-self:stretch}}`;async function T(t,e,i){let s=await H(t,e);return O(i),Z(s)?s.highlight(e):P()}async function H(t,e){let i=e?.layer;if(!(!i||i.type==="subtype-sublayer"||i.type==="sublayer"||i.type==="building-component"))return await t.whenLayerView(i)}function Z(t){return t!=null&&"highlight"in t&&typeof t.highlight=="function"}function j({geometry:t}){return t?.type==="polyline"&&t.paths.length>0&&t.paths.every(e=>e.length>=2)}function G({geometry:t}){return t?.type==="polyline"&&t.paths.reduce((e,i)=>e+i.length,0)>0}function q(t){return t?.samples?.some(e=>e.z!=null)??!1}var J=Object.defineProperty,N=Object.getOwnPropertyDescriptor,o=(t,e,i,s)=>{for(var r=s>1?void 0:s?N(e,i):e,l=t.length-1,c;l>=0;l--)(c=t[l])&&(r=(s?c(e,i,r):c(r))||r);return s&&r&&J(e,i,r),r},n=class extends E{constructor(){super(...arguments),this._resettingUnits=!1,this.highlightDisabled=!1,this.uniformChartScaling=!1,this.shouldForceInteractive=!1,this.supportedViewType="both",this.unsupportedErrorMessage=""}get _hasSamples(){let{progress:t}=this;return!!this.analysisView?.results?.some(e=>e.available&&(t<1||q(e)))}get doneButtonAvailable(){return this.featureIsSelected?!1:this.analysisView?.canStopPlacing??!1}get effectiveDisplayUnits(){return this.analysisView?.effectiveDisplayUnits}get errorState(){if(!j(this.analysis))return"no-valid-input";let t=this.analysisView?.error;if(t)switch(t.name){case"too-complex":return"too-complex";case"elevation-query-error":return"no-valid-input";default:return"unknown"}return this._hasSamples?"none":"no-available-profiles"}get feature(){return this._selectedFeature}set feature(t){t?t!==this.feature&&(this.analysis.setGeometryFromFeature(t),this._selectedFeature=t):this._selectedFeature=void 0}get featureIsSelected(){return this.feature!=null}get hasVertices(){return G(this.analysis)}get indicatorRelativePosition(){return this.analysisView?.indicatorRelativePosition??void 0}get geometry(){return this.analysis.geometry}set geometry(t){this.analysis.geometry=t}get elevationInfo(){return this.analysis.elevationInfo}set elevationInfo(t){this.analysis.elevationInfo=t}get profiles(){return this.analysis.profiles}set profiles(t){this.analysis.profiles=t}get progress(){return this.analysisView?.progress??0}get results(){return this.analysisView?.results??[]}get selectButtonAvailable(){for(let t of this.view?.map?.allLayers.toArray()??[])if(t.type==="graphics"&&!("internal"in t&&t.internal)&&t.graphics.some(e=>e.geometry?.type==="polyline")||"geometryType"in t&&t.geometryType==="polyline")return!0;return!!this.view?.graphics?.some(t=>t.geometry?.type==="polyline")}get state(){return this.disabled||!this.ready?"disabled":this._selectingPromise?"selecting":this.operationState==="active"?"creating":this.analysis.valid?this.featureIsSelected?"selected":"created":"ready"}get distanceUnit(){return y({userUnit:this._userDistanceUnit,analysisUnit:this.analysis.displayUnits?.distance,options:this.distanceUnitOptions,defaultUnit:this.defaultMeasurementSystem,viewUnit:this.view?.options.displayUnits.length})}set distanceUnit(t){this._userDistanceUnit=t}get distanceUnitOptions(){return V(this._userDistanceUnitOptions)}set distanceUnitOptions(t){this._userDistanceUnitOptions=t}get elevationUnit(){return y({userUnit:this._userElevationUnit,analysisUnit:this.analysis.displayUnits?.elevation,options:this.elevationUnitOptions,defaultUnit:this.defaultMeasurementSystem,viewUnit:this.view?.options.displayUnits.verticalLength})}set elevationUnit(t){this._userElevationUnit=t}get elevationUnitOptions(){return V(this._userElevationUnitOptions)}set elevationUnitOptions(t){this._userElevationUnitOptions=t}get canResetDistanceUnit(){return this._userDistanceUnit!=null||this.analysis.displayUnits.distance!=null}get canResetElevationUnit(){return this._userElevationUnit!=null||this.analysis.displayUnits.elevation!=null}resetUnit(t){this._resettingUnits=!0;try{t==="distance"?this._userDistanceUnit=void 0:this._userElevationUnit=void 0,this.analysis.displayUnits[t]=null}finally{this._resettingUnits=!1}}initialize(){this.addHandles([m(()=>({analysis:this.analysis,unitDistance:this._userDistanceUnit,unitElevation:this._userElevationUnit}),({analysis:t,unitDistance:e,unitElevation:i})=>{this._resettingUnits||(i&&(t.displayUnits.elevation=i),e&&(t.displayUnits.distance=e))},{sync:!0,initial:!0}),m(()=>({selectedFeature:this.feature,profiles:this.analysis.profiles.toArray()}),({selectedFeature:t,profiles:e},i)=>{this._highlightSelectedFeature(this.highlightDisabled?void 0:t),this.analysis.viewOptions.geometryVisualizationVisible=!this.highlightDisabled&&t==null;let s=i?.selectedFeature;e.forEach(r=>{switch(r.type){case"scene":this._excludeSelectedFeatureFromProfile(r,t,s);break;case"input":r.chartOptions.lineVisible=t!=null,r.viewOptions.lineVisible=t!=null;break}})},{initial:!0})])}destroy(){this._removeSelectionHighlight()}async select(){if(this.interactionDisabled)return;let t=this.analysisView;if(!t)return;this.clear();let e=super.start({operation:async i=>{let s=await t.pickFeature(i);i?.signal?.aborted||(t.interactive=!1,this.feature=s.feature)},clear:!1});this._selectingPromise=e;try{await b(e)}finally{this._selectingPromise===e&&(this._selectingPromise=void 0)}}async place(t){await this.analysisView?.place(t)}clearAnalysis(){this.geometry=null,this.elevationInfo=null,this.feature=void 0}constructAnalysis(){return new A}_highlightSelectedFeature(t){this._removeSelectionHighlight();let e=this.view;!e||!t||(this._selectionHighlightTask=f(async i=>await T(e,t,{signal:i})))}_removeSelectionHighlight(){this._selectionHighlightTask?.value?.remove(),this._selectionHighlightTask=B(this._selectionHighlightTask)}_excludeSelectedFeatureFromProfile(t,e,i){let s=new Set(t.exclude??[]);i&&s.delete(i),e&&s.add(e),t.exclude=Array.from(s)}};o([a()],n.prototype,"_userDistanceUnit",2);o([a()],n.prototype,"_userDistanceUnitOptions",2);o([a()],n.prototype,"_userElevationUnit",2);o([a()],n.prototype,"_userElevationUnitOptions",2);o([a()],n.prototype,"_selectingPromise",2);o([a()],n.prototype,"_selectedFeature",2);o([a()],n.prototype,"_selectionHighlightTask",2);o([a()],n.prototype,"_hasSamples",1);o([a()],n.prototype,"doneButtonAvailable",1);o([a({readOnly:!0})],n.prototype,"effectiveDisplayUnits",1);o([a({readOnly:!0})],n.prototype,"errorState",1);o([a()],n.prototype,"feature",1);o([a()],n.prototype,"featureIsSelected",1);o([a({readOnly:!0})],n.prototype,"hasVertices",1);o([a()],n.prototype,"highlightDisabled",2);o([a()],n.prototype,"indicatorRelativePosition",1);o([a()],n.prototype,"geometry",1);o([a()],n.prototype,"elevationInfo",1);o([a()],n.prototype,"profiles",1);o([a({readOnly:!0})],n.prototype,"progress",1);o([a({readOnly:!0})],n.prototype,"results",1);o([a({readOnly:!0})],n.prototype,"selectButtonAvailable",1);o([a({readOnly:!0})],n.prototype,"state",1);o([a()],n.prototype,"uniformChartScaling",2);o([a()],n.prototype,"distanceUnit",1);o([a()],n.prototype,"distanceUnitOptions",1);o([a()],n.prototype,"elevationUnit",1);o([a()],n.prototype,"elevationUnitOptions",1);o([a({readOnly:!0})],n.prototype,"canResetDistanceUnit",1);o([a({readOnly:!0})],n.prototype,"canResetElevationUnit",1);n=o([R("components.elevation-profile.ElevationProfileViewModel")],n);function V(t){let e=t?.filter(i=>_.includes(i));return e&&e.length>0?e:_.slice()}var Q=z(n),x=class extends k{constructor(){super(...arguments),this.viewModel=Q(this),this._chartInitializationTask=L(void 0),this._messages=$(),this._hideZoomOutButton=!0,this._hasSettingsStartContent=!1,this._hasSettingsEndContent=!1,this.analysis=this.viewModel.analysis,this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.effectiveDisplayUnits=this.viewModel.effectiveDisplayUnits,this.feature=this.viewModel.feature,this.hideChart=!1,this.hideChartGridLines=!1,this.hideChartAxisLabels=!1,this.hideClearButton=!1,this.hideLegend=!1,this.hideSelectButton=!1,this.hideSettingsButton=!1,this.hideResetUnitsButton=!1,this.hideStartButton=!1,this.hideUniformChartScalingToggle=!1,this.hideDistanceDisplayUnitSelect=!1,this.hideElevationDisplayUnitSelect=!1,this.hideVisualization=this.viewModel.hideVisualization,this.highlightDisabled=this.viewModel.highlightDisabled,this.icon="altitude",this.indicatorRelativePosition=this.viewModel.indicatorRelativePosition,this.interactionDisabled=this.viewModel.interactionDisabled,this.geometry=this.viewModel.geometry,this.elevationInfo=this.viewModel.elevationInfo,this.profiles=this.viewModel.profiles,this.progress=this.viewModel.progress,this.state=this.viewModel.state,this.uniformChartScaling=this.viewModel.uniformChartScaling,this.distanceUnit=this.viewModel.distanceUnit,this.distanceUnitOptions=this.viewModel.distanceUnitOptions,this.elevationUnit=this.viewModel.elevationUnit,this.elevationUnitOptions=this.viewModel.elevationUnitOptions,this.arcgisPropertyChange=D()("analysis","effectiveDisplayUnits","elevationInfo","feature","geometry","indicatorRelativePosition","interactionDisabled","progress","state"),this.arcgisReady=S()}static{this.properties={_messages:16,_hideZoomOutButton:16,_chartContainer:16,_hasSettingsStartContent:16,_hasSettingsEndContent:16,analysis:0,view:0,autoDestroyDisabled:5,effectiveDisplayUnits:32,feature:0,hideChart:5,hideChartGridLines:5,hideChartAxisLabels:5,hideClearButton:5,hideLegend:5,hideSelectButton:5,hideSettingsButton:5,hideResetUnitsButton:5,hideStartButton:5,hideUniformChartScalingToggle:5,hideDistanceDisplayUnitSelect:5,hideElevationDisplayUnitSelect:5,hideVisualization:5,highlightDisabled:5,icon:3,indicatorRelativePosition:40,interactionDisabled:5,geometry:0,elevationInfo:0,label:1,messageOverrides:0,referenceElement:1,profiles:0,progress:40,state:32,uniformChartScaling:5,distanceUnit:1,distanceUnitOptions:0,elevationUnit:1,elevationUnitOptions:0}}static{this.styles=I}get _selectButtonVisible(){return!this.hideSelectButton&&this.viewModel.selectButtonAvailable}get _chart(){return this._chartInitializationTask.value?.value}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy()}async select(){b(this.viewModel.select())}async start(){b(this.viewModel.start())}async stop(){this.viewModel.stop()}load(){this.manager.onLifecycle(()=>[m(()=>({container:this._chartContainer,messages:this._messages}),({container:e,messages:i})=>{this._destroyChart(),!(!e||i._loading)&&(this._chartInitializationTask.value=f(async s=>await F({view:this.viewModel.view,analysisView:this.viewModel.analysisView,container:e,messages:i,signal:s,uniformScaling:this.viewModel.uniformChartScaling,onRangeChange:(r,l)=>{this._hideZoomOutButton=r===1&&l===1},onCursorPositionChange:(r,l)=>{let{analysisView:c}=this.viewModel;c&&(c.indicatorRelativePosition=r)}})))},{sync:!0,initial:!0}),m(()=>({chart:this._chart,messages:this._messages,view:this.viewModel.view,analysisView:this.viewModel.analysisView,uniformScaling:this.viewModel.uniformChartScaling,hideGridLines:this.hideChartGridLines,hideLabels:this.hideChartAxisLabels}),({chart:e,messages:i,view:s,analysisView:r,uniformScaling:l})=>{e&&(e.messages=i,e.view=s,e.analysisView=r,e.uniformScaling=l,e.hideGridLines=this.hideChartGridLines,e.hideAxisLabels=this.hideChartAxisLabels)},{sync:!0,initial:!0}),{remove:()=>this._destroyChart()}])}_destroyChart(){let e=this._chart;this._chartInitializationTask.value?.abort(),this._chartInitializationTask.value=void 0,e?.destroy()}_onCancelButtonClick(){this.viewModel.stop(),this.viewModel.clear()}_onDoneButtonClick(){this.viewModel.stop()}_getErrorMessage(){let e=W[this.viewModel.errorState];return e?this._messages?.errors?.[e]:void 0}_onClearButtonClick(){this.viewModel.clear()}_onZoomOutButtonClick(){this._chart?.zoomOut()}_onChartContainerRef(e){this._chartContainer=e}render(){return d`<div aria-label=${this._messages.componentLabel??g} class=${v({root:!0,[u.widget]:!0,[u.widgetDisabled]:this.viewModel.state==="disabled",[u.panel]:!0})} role=presentation>${this._renderContentForState()}</div>`}_renderContentForState(){switch(this.viewModel.state){case"ready":return this._renderContentForReadyState();case"selecting":return this._renderContentForSelectingState();case"creating":return this._renderContentForCreatingState();case"selected":return this._renderContentForSelectedState();case"created":return this._renderContentForCreatedState();case"disabled":return this._renderContentForReadyState()}}_renderContentForReadyState(){let{_messages:e,hideSelectButton:i,hideStartButton:s}=this,{selectButtonAvailable:r}=this.viewModel,l=!i&&r,c;return!s&&l?c=e.readyPrompt:s?l?c=e.readyPromptSelectOnly:c=e.errors?.noProfile:c=e.readyPromptCreateOnly,this._renderContent({prompt:c,chart:!1,actions:p})}_renderContentForSelectingState(){let{view:e}=this.viewModel;if(!e)return;let i=this._messages[`selectingPrompt-${e.type}`];return this._renderContent({prompt:i,chart:!1,actions:[{type:"select-cancel"}]})}_renderContentForCreatingState(){let{viewModel:e}=this,{view:i}=e;if(!i)return;let s=e.hasVertices?[{type:"sketch-cancel"},{type:"sketch-done",disabled:!e.doneButtonAvailable}]:[{type:"select"},{type:"sketch",disabled:!0}];if(e.errorState==="no-valid-input"){let l=this._messages[`creatingPrompt-${i.type}`];return this._renderContent({chart:!1,actions:s,prompt:l})}let r=this._getErrorMessage();return r?this._renderContent({chart:!1,actions:s,prompt:r}):this._renderContent({chart:!0,actions:s})}_renderContentForSelectedState(){let e=this._getErrorMessage();return e?this._renderContent({chart:!1,actions:p,prompt:e}):this._renderContent({chart:!0,actions:p})}_renderContentForCreatedState(){let e=this._getErrorMessage();return e?this._renderContent({chart:!1,actions:p,prompt:e}):this._renderContent({chart:!0,actions:p})}_renderContent(e){let{viewModel:i}=this,s=i.geometry!=null;return d`<header class="header">${h({hidden:this._hideZoomOutButton,children:this._renderZoomOutButton()})}${h({hidden:this.hideClearButton||!s,children:this._renderClearButton()})}${h({hidden:this.hideSettingsButton,children:this._renderSettingsButton()})}</header><div class="main-container">${e.prompt!=null?this._renderPrompt(e.prompt):e.chart?this._renderChart():void 0}</div>${h({hidden:this.hideLegend,children:this._renderLegend()})}${this._renderActions(e)}`}_renderPrompt(e){return[d`<div class="prompt-container"><p class="prompt-message">${e}</p></div>`]}_renderZoomOutButton(){let e=this._messages.zoomOut??"";return d`<calcite-action icon=magnifying-glass-minus @click=${this._onZoomOutButtonClick} .text=${e} title=${e??g}></calcite-action>`}_renderChart(){if(this.hideChart)return;let e=this._chart;return d`${this._renderSpinner({size:e?.chartVisible?"small":"large",visible:e?.spinnerVisible??!1})}<div class="chart-container" ${U(this._onChartContainerRef)}></div>`}_renderSpinner(e){let i=e.size==="small",s=e.visible??!0;return d`<calcite-loader class=${v({spinner:!0,small:i,visible:s})} .inline=${i} label></calcite-loader>`}_renderClearButton(){let e=this._messages.clearProfile??"";return d`<calcite-action icon=trash @click=${this._onClearButtonClick} .text=${e} title=${e??g}></calcite-action>`}_renderLegend(){return d`<arcgis-elevation-profile-legend .effectiveDisplayUnits=${this.viewModel.effectiveDisplayUnits} .featureSelected=${this.viewModel.featureIsSelected} .messages=${this._messages} .profiles=${this.profiles} .results=${this.viewModel.results}></arcgis-elevation-profile-legend>`}_renderSettingsButton(){return d`<arcgis-elevation-profile-settings .hasCustomStartContent=${this._hasSettingsStartContent} .hasCustomEndContent=${this._hasSettingsEndContent} .viewModel=${this.viewModel} .hideUniformChartScalingToggle=${this.hideUniformChartScalingToggle} .hideDistanceDisplayUnitSelect=${this.hideDistanceDisplayUnitSelect} .hideElevationDisplayUnitSelect=${this.hideElevationDisplayUnitSelect} .hideResetUnitsButton=${this.hideResetUnitsButton} .messages=${this._messages} .messageOverrides=${this.messageOverrides} .uniformChartScaling=${this.viewModel.uniformChartScaling} .unitOptionsDistance=${this.viewModel.distanceUnitOptions} .unitOptionsElevation=${this.viewModel.elevationUnitOptions} @arcgisElevationProfileSettingsUniformChartScalingChange=${e=>{this.viewModel.uniformChartScaling=e.detail}}><slot name=settings-start slot=settings-start @slotchange=${e=>{this._hasSettingsStartContent=w(e)}}></slot><slot name=settings-end slot=settings-end @slotchange=${e=>{this._hasSettingsEndContent=w(e)}}></slot></arcgis-elevation-profile-settings>`}_renderActions({actions:e}){let i=this._messages,s=e.map(r=>{switch(r.type){case"sketch":return h({hidden:this.hideStartButton,children:this._renderAction({action:r,label:i.sketchButtonLabel,primary:!0,onClick:()=>{this.start()}})});case"sketch-cancel":return h({hidden:this.hideStartButton,children:this._renderAction({action:r,label:i.cancelButtonLabel,primary:!1,onClick:this._onCancelButtonClick})});case"sketch-done":return h({hidden:this.hideStartButton,children:this._renderAction({action:r,label:i.doneButtonLabel,primary:!0,onClick:this._onDoneButtonClick})});case"select":return h({hidden:!this._selectButtonVisible,children:this._renderAction({action:r,label:i.selectButtonLabel,primary:!1,onClick:()=>{this.select()}})});case"select-cancel":return h({hidden:!this._selectButtonVisible,children:this._renderAction({action:r,label:i.cancelButtonLabel,primary:!1,onClick:this._onCancelButtonClick})});default:return}}).filter(Boolean);return s.length?d`<footer class="actions">${s}</footer>`:void 0}_renderAction({action:e,label:i,onClick:s,primary:r}){return d`<calcite-button .appearance=${r?"solid":"outline-fill"} class="action-button" .disabled=${e.disabled||this.interactionDisabled&&(e.type==="sketch"||e.type==="select")} @click=${s}>${i}</calcite-button>`}};function h(t){return t.hidden?void 0:t.children}var p=[{type:"select"},{type:"sketch"}],W={none:void 0,"no-valid-input":"noProfile","no-available-profiles":"noProfile","too-complex":"tooComplex",unknown:"unknown"};M("arcgis-elevation-profile",x);return x},"applications/Components/analysisUtils","applications/Components/reactiveUtils","core/promiseUtils","core/reactiveUtils","analysis/ElevationProfileAnalysis","core/accessorSupport/decorators",a,b,c,e,f,h)
|