@arcgis/map-components 5.1.2 → 5.1.3
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/{WS6O6JDT.js → 22CAB26H.js} +1 -1
- package/dist/cdn/{VC3ODN5I.js → 234MCNW5.js} +1 -1
- package/dist/cdn/{JSBX7T66.js → 2ATLQSL6.js} +1 -1
- package/dist/cdn/{EQSJ5YJJ.js → 2CSNMII5.js} +1 -1
- package/dist/cdn/{KDS4IULF.js → 2HUE3S6F.js} +1 -1
- package/dist/cdn/{6JPTHKPG.js → 2HZVYLC6.js} +1 -1
- package/dist/cdn/{N3775HAR.js → 2UB3BT2U.js} +1 -1
- package/dist/cdn/{J2XCQDID.js → 375JMFKX.js} +1 -1
- package/dist/cdn/{BQRQUB7L.js → 3R6BYVE5.js} +1 -1
- package/dist/cdn/{KLSSO2IB.js → 3TQ5TC4S.js} +1 -1
- package/dist/cdn/{ZJEARGVC.js → 3TW6V4CW.js} +1 -1
- package/dist/cdn/{CCWC5JAB.js → 42QRW2S2.js} +1 -1
- package/dist/cdn/{2JTPRZNY.js → 43LX6RHJ.js} +1 -1
- package/dist/cdn/{D2YGTQUJ.js → 46LZGJFB.js} +1 -1
- package/dist/cdn/{Q776G7X5.js → 4GFFNLBW.js} +1 -1
- package/dist/cdn/{HIZGTBQP.js → 4QGOC3VS.js} +1 -1
- package/dist/cdn/{EXJC56IX.js → 4QXD3DRF.js} +1 -1
- package/dist/cdn/{7ZVCWVJ4.js → 56TLIBGY.js} +1 -1
- package/dist/cdn/{GIEH2633.js → 57ROKVQ2.js} +1 -1
- package/dist/cdn/{UMOM6TOJ.js → 5N7IFFE2.js} +1 -1
- package/dist/cdn/{CWQJJUOX.js → 5OIUJD7K.js} +1 -1
- package/dist/cdn/{Z2ZUNDTK.js → 5R7WVXXM.js} +1 -1
- package/dist/cdn/{FMEISWZH.js → 5RUSKVV6.js} +1 -1
- package/dist/cdn/{KQGEFVQX.js → 5XBREOBT.js} +1 -1
- package/dist/cdn/{ECLPZ5RI.js → 62STONE3.js} +1 -1
- package/dist/cdn/{H7LJBN7J.js → 62Z75YUH.js} +1 -1
- package/dist/cdn/{UL3AN5J2.js → 66M5ARP4.js} +1 -1
- package/dist/cdn/{XBVK56RR.js → 6GQTRINR.js} +1 -1
- package/dist/cdn/{PLFEJPQ4.js → 6TANGSXU.js} +1 -1
- package/dist/cdn/{XC5JKO2J.js → 6UB5WBZA.js} +1 -1
- package/dist/cdn/{IYBSQOCK.js → 76CURZLY.js} +1 -1
- package/dist/cdn/{LTIOECNS.js → 77G6FXTF.js} +1 -1
- package/dist/cdn/7HNVZH7N.js +2 -0
- package/dist/cdn/{EA3H5LNK.js → 7JA5D57X.js} +1 -1
- package/dist/cdn/{KUHZAASH.js → 7KF6PFMC.js} +1 -1
- package/dist/cdn/{W257I7HW.js → 7REDKRWF.js} +1 -1
- package/dist/cdn/{LHN2QDKV.js → 7VSC32MP.js} +1 -1
- package/dist/cdn/{2HOCZD2I.js → 7X2E65NW.js} +1 -1
- package/dist/cdn/{MBIHEJP7.js → A5ZMTUHZ.js} +1 -1
- package/dist/cdn/{6MQTAMXU.js → ASNQKKPL.js} +1 -1
- package/dist/cdn/{P32YELXJ.js → AZSFY4Y3.js} +1 -1
- package/dist/cdn/{7BJ2XF54.js → B3Q7ZJGZ.js} +1 -1
- package/dist/cdn/{MEXVYRBT.js → B42J3Z2C.js} +1 -1
- package/dist/cdn/BM6JSXBV.js +2 -0
- package/dist/cdn/{RVQMNX4D.js → BPOOZIOV.js} +1 -1
- package/dist/cdn/{BPQEFPAB.js → C6ECGO7E.js} +1 -1
- package/dist/cdn/{ROQ3ZMNX.js → CFBDXHQG.js} +1 -1
- package/dist/cdn/{765ALWKM.js → CM5CTL6G.js} +1 -1
- package/dist/cdn/{CWFQYXQG.js → COEEFBPJ.js} +1 -1
- package/dist/cdn/{ZAQBVTA2.js → CPBG33GJ.js} +1 -1
- package/dist/cdn/{LEIE3RAW.js → CPZ76XWX.js} +1 -1
- package/dist/cdn/{TM3BGDCH.js → CV57D36E.js} +1 -1
- package/dist/cdn/{Y2R2Z5YV.js → CYINKGVZ.js} +1 -1
- package/dist/cdn/{GW4KIJTE.js → CZ5Y6IKS.js} +1 -1
- package/dist/cdn/{KG6NYEKA.js → D3EZDMYN.js} +1 -1
- package/dist/cdn/{ITHFRHDS.js → DFBCXA3L.js} +1 -1
- package/dist/cdn/{SEV6YOS5.js → DH6TP6IC.js} +1 -1
- package/dist/cdn/{7SUBS4HT.js → DISROOJH.js} +1 -1
- package/dist/cdn/{RCODAEH5.js → DJUAOUVW.js} +1 -1
- package/dist/cdn/{5AKUQIOQ.js → DLKWPINB.js} +1 -1
- package/dist/cdn/{PLB2IOFI.js → DMN7NRMW.js} +1 -1
- package/dist/cdn/{KGXW3NCW.js → DYTTT2ZE.js} +1 -1
- package/dist/cdn/{ENJ32A62.js → DZU4EJJL.js} +1 -1
- package/dist/cdn/{JQBG6N6T.js → E4FXVV2A.js} +1 -1
- package/dist/cdn/{EFEEI6XK.js → EFJTCCD7.js} +1 -1
- package/dist/cdn/{Y3MUXO2N.js → EGE3UDWJ.js} +1 -1
- package/dist/cdn/{WAY7FVQT.js → EJXJ7MR4.js} +1 -1
- package/dist/cdn/{4WV4BCZL.js → ELLHJHX3.js} +1 -1
- package/dist/cdn/{GXNR2JOT.js → EPPDNWCZ.js} +1 -1
- package/dist/cdn/{H5AYWCIW.js → EQODY5HW.js} +1 -1
- package/dist/cdn/{LLPQYUPW.js → ET7J5T6W.js} +1 -1
- package/dist/cdn/{7UAUOLPG.js → F2LZ6I4A.js} +1 -1
- package/dist/cdn/{DYN47Y7R.js → F4ZAFN45.js} +1 -1
- package/dist/cdn/{PYF4Y6SP.js → FDVDYQ7T.js} +1 -1
- package/dist/cdn/{QSU3LQPB.js → FGXH3TZL.js} +1 -1
- package/dist/cdn/{MQOSO6YX.js → FI34ZKXN.js} +1 -1
- package/dist/cdn/{LN5UJQQN.js → FJ357YAU.js} +1 -1
- package/dist/cdn/{LJBJBQNB.js → FJAJTMWA.js} +1 -1
- package/dist/cdn/{6UZI5Y3V.js → FLQFYNRW.js} +1 -1
- package/dist/cdn/{7WLS3KJQ.js → FMDJOPBV.js} +1 -1
- package/dist/cdn/{DYIGVLWT.js → FPTCG5LT.js} +1 -1
- package/dist/cdn/{QWP4PXBX.js → FS4HU7OG.js} +1 -1
- package/dist/cdn/{CON3M6Z5.js → FUUAJI3B.js} +1 -1
- package/dist/cdn/{ULAPVDLG.js → FZHTYAGO.js} +1 -1
- package/dist/cdn/{P7XVSVLJ.js → GDDNUZON.js} +1 -1
- package/dist/cdn/{QVGTWFEN.js → GFQSHSEN.js} +1 -1
- package/dist/cdn/{MLYJ4SA5.js → GGTQ3NSM.js} +1 -1
- package/dist/cdn/{XUHASJUA.js → GNT3B6OW.js} +1 -1
- package/dist/cdn/{DFKYJ3TJ.js → GPPB5HLY.js} +1 -1
- package/dist/cdn/{KL6P26PU.js → GUBN7F55.js} +1 -1
- package/dist/cdn/{XOPYGAIJ.js → GZAUW4IF.js} +1 -1
- package/dist/cdn/{JWFUYNQL.js → H2U3NNOZ.js} +1 -1
- package/dist/cdn/{RI54YWGC.js → H45Q2UZB.js} +1 -1
- package/dist/cdn/{6SWLNG5U.js → H6AN4E2A.js} +1 -1
- package/dist/cdn/{4NETFLDI.js → H7WH3JOV.js} +1 -1
- package/dist/cdn/{5EXHPG7W.js → HAWPBGFJ.js} +1 -1
- package/dist/cdn/{ONBIIQSD.js → HOAYGQXL.js} +1 -1
- package/dist/cdn/{7DOKGLVM.js → HPEDYILP.js} +1 -1
- package/dist/cdn/{BJFYUEWF.js → HQTXIXC6.js} +1 -1
- package/dist/cdn/{U7ME6ZY2.js → I4V5JQ2W.js} +1 -1
- package/dist/cdn/{S6MIUB7T.js → IFA7CCS4.js} +1 -1
- package/dist/cdn/{CSP2FJKC.js → IMR53T7L.js} +1 -1
- package/dist/cdn/{6ZHIODBL.js → IVOJRHXF.js} +1 -1
- package/dist/cdn/{LS254AGB.js → IX5WKWY7.js} +1 -1
- package/dist/cdn/{56HPXBAX.js → J5LRI3NQ.js} +1 -1
- package/dist/cdn/{OBAYSCIU.js → JDV4OCE6.js} +1 -1
- package/dist/cdn/{FKQZ5V6R.js → JEHLCJKG.js} +1 -1
- package/dist/cdn/{BHRMN454.js → JETPDLY5.js} +1 -1
- package/dist/cdn/{PIWGSAQF.js → JMPW3PER.js} +1 -1
- package/dist/cdn/{N7UWJZJN.js → K4N46SEF.js} +1 -1
- package/dist/cdn/{CF4W2DNT.js → K6NBKJEY.js} +1 -1
- package/dist/cdn/{RVLWTZAT.js → KCVRXOGC.js} +1 -1
- package/dist/cdn/{KOSEAFDF.js → KGUXQ4D2.js} +1 -1
- package/dist/cdn/{WSGEYDSY.js → KKQCCHI3.js} +1 -1
- package/dist/cdn/{BQGAXWJH.js → KO7RGO6I.js} +1 -1
- package/dist/cdn/{DFXZ77W6.js → KVXPMMSF.js} +1 -1
- package/dist/cdn/{44CYTUO7.js → KW4HHQEV.js} +1 -1
- package/dist/cdn/{FUSXXX2H.js → L4TOTMG6.js} +1 -1
- package/dist/cdn/{DKPPAY7S.js → LIJL5PUN.js} +1 -1
- package/dist/cdn/{OBGINW7D.js → LKHC7NZP.js} +1 -1
- package/dist/cdn/{SF2STORW.js → LMHFLDIC.js} +1 -1
- package/dist/cdn/{DOCOL5GC.js → LRCD6STF.js} +1 -1
- package/dist/cdn/{6RZSTHRB.js → LSVKPEGY.js} +1 -1
- package/dist/cdn/{5EO7L5PZ.js → LXOQDXSC.js} +1 -1
- package/dist/cdn/{ARE6XXZN.js → M4UEO3ZQ.js} +1 -1
- package/dist/cdn/{TP3HEJQL.js → M7CGZOVT.js} +1 -1
- package/dist/cdn/{OG6DSDF4.js → M7JYXGUN.js} +1 -1
- package/dist/cdn/{YALHHW5A.js → M7N6HRKE.js} +1 -1
- package/dist/cdn/{C46USWU3.js → MEHLA2FT.js} +1 -1
- package/dist/cdn/{D3J2KBQF.js → MZ46DTYD.js} +1 -1
- package/dist/cdn/{ATQJXHRC.js → N4HTIYQE.js} +1 -1
- package/dist/cdn/{N5TOUUMP.js → N6UZ7QWU.js} +1 -1
- package/dist/cdn/{LV5WJ5J7.js → NSODS5HH.js} +1 -1
- package/dist/cdn/{BI6C5QWY.js → NT3JWVW3.js} +1 -1
- package/dist/cdn/{LH5EEOUE.js → NUZULSBH.js} +1 -1
- package/dist/cdn/{AG6YMYYG.js → O2CMDG4R.js} +1 -1
- package/dist/cdn/{VDI6V7A7.js → O3B6CHMR.js} +1 -1
- package/dist/cdn/{QODAKOAD.js → O6V45QKW.js} +1 -1
- package/dist/cdn/{2PMBQVDJ.js → ODUKRCXF.js} +1 -1
- package/dist/cdn/{HOTRPDNE.js → OF3EAYXS.js} +1 -1
- package/dist/cdn/{TK4Q74KL.js → ON6QA6GZ.js} +1 -1
- package/dist/cdn/{2AKK5ZKG.js → OULNKECC.js} +1 -1
- package/dist/cdn/{DOXOIFUY.js → OVXXROS6.js} +1 -1
- package/dist/cdn/{J2U5EPDT.js → OWAKPV45.js} +1 -1
- package/dist/cdn/{IH57AOIE.js → OXRQP246.js} +1 -1
- package/dist/cdn/{O6U4WH4G.js → OZMQKJLV.js} +1 -1
- package/dist/cdn/{CKTJHIDM.js → P3H4R2QR.js} +1 -1
- package/dist/cdn/{YCVGEU74.js → P54POXV6.js} +1 -1
- package/dist/cdn/{SL2D573Y.js → PMJU3M4K.js} +1 -1
- package/dist/cdn/{6UIQON4J.js → Q646IQNZ.js} +1 -1
- package/dist/cdn/{Q7KIJ3P5.js → QACNH34P.js} +1 -1
- package/dist/cdn/{JO5GGDBR.js → QU7GPH72.js} +1 -1
- package/dist/cdn/{LJ4STQXJ.js → QWPMSWF5.js} +1 -1
- package/dist/cdn/{PYTF3K7R.js → R2MVBDJU.js} +1 -1
- package/dist/cdn/{6APQBBDM.js → R4HMNLS6.js} +1 -1
- package/dist/cdn/{UEQHIK7T.js → R7AG2SRN.js} +1 -1
- package/dist/cdn/{SDXUPDBK.js → RR2NKKKH.js} +1 -1
- package/dist/cdn/{WP6IZGJG.js → RT6G3Z72.js} +1 -1
- package/dist/cdn/{YXJZ4BLP.js → RTF754UJ.js} +1 -1
- package/dist/cdn/{EVSYTEQK.js → RYQVNGCF.js} +1 -1
- package/dist/cdn/{QP6IONYI.js → RZYKZ4G7.js} +1 -1
- package/dist/cdn/{5WWVWTLV.js → SDBGQMSY.js} +1 -1
- package/dist/cdn/SE4NXCRP.js +2 -0
- package/dist/cdn/{SILCE4O4.js → SHUVETZ7.js} +1 -1
- package/dist/cdn/{P3LUQEUB.js → SIWCBIJP.js} +1 -1
- package/dist/cdn/{YPK7YXNJ.js → SQSGXJ54.js} +1 -1
- package/dist/cdn/{5ALJO7UH.js → SSWJID24.js} +1 -1
- package/dist/cdn/{IKSX6FKO.js → T3J25TJS.js} +1 -1
- package/dist/cdn/{Y6F5INEC.js → T44XJPJU.js} +1 -1
- package/dist/cdn/{4PFCZYCL.js → T45EBBTN.js} +1 -1
- package/dist/cdn/{XW3G7QDY.js → T7K7IRUE.js} +1 -1
- package/dist/cdn/{CVFALL4S.js → TAM5BMQE.js} +1 -1
- package/dist/cdn/{GY4THDW6.js → TCB2YVIA.js} +1 -1
- package/dist/cdn/{MNV6C5ZE.js → TPAFEBWM.js} +1 -1
- package/dist/cdn/{MWIYHELY.js → TPSGDOBV.js} +1 -1
- package/dist/cdn/{VDTJT5WM.js → TZWITU5I.js} +1 -1
- package/dist/cdn/{WHGRCGYI.js → UASAJVWH.js} +1 -1
- package/dist/cdn/{QVABJ2GG.js → UASHWZNE.js} +1 -1
- package/dist/cdn/{IOJPGOON.js → UITNJIFZ.js} +1 -1
- package/dist/cdn/{RXZTEC5Z.js → UOTWRHTN.js} +1 -1
- package/dist/cdn/{F56R6NNL.js → USDQKP5Z.js} +1 -1
- package/dist/cdn/{OG6CGCQR.js → USPJDSCZ.js} +1 -1
- package/dist/cdn/{CU6D4FDO.js → V6KIZSVA.js} +1 -1
- package/dist/cdn/{7TTB6IBQ.js → VHUIDNTM.js} +1 -1
- package/dist/cdn/{A2Y4L3CO.js → VN3COZMZ.js} +1 -1
- package/dist/cdn/{OA3H52O2.js → VQYYNFZV.js} +1 -1
- package/dist/cdn/{YFOSZSWF.js → VRWYIEHE.js} +1 -1
- package/dist/cdn/{DJFGZDPY.js → VSBVGO66.js} +1 -1
- package/dist/cdn/{7UTPZBBS.js → VXBCQ6RG.js} +1 -1
- package/dist/cdn/{JNHR22ZB.js → VXQOK7ST.js} +1 -1
- package/dist/cdn/{TBUQX27Z.js → VYGVL22X.js} +1 -1
- package/dist/cdn/{OT62GDM7.js → VYRKUI6Z.js} +1 -1
- package/dist/cdn/{BFOAKOBV.js → W2DYHZSJ.js} +1 -1
- package/dist/cdn/{THWNQRP5.js → W6IMOQUF.js} +1 -1
- package/dist/cdn/{2YMZU2DI.js → W7DTRMHF.js} +1 -1
- package/dist/cdn/{34KX2CZ2.js → WATWGCHU.js} +1 -1
- package/dist/cdn/{OTKIXRQV.js → WWN76S2X.js} +1 -1
- package/dist/cdn/{ETOHKNYW.js → WWUFUNG7.js} +1 -1
- package/dist/cdn/{DQSUSD33.js → X3GJQ2HW.js} +1 -1
- package/dist/cdn/{QQGP2YSG.js → XB2ULNV6.js} +1 -1
- package/dist/cdn/{NPRZRV7N.js → XIE3L6TO.js} +1 -1
- package/dist/cdn/{DX5IW4LD.js → XKWFXCW3.js} +1 -1
- package/dist/cdn/{3LUAFLYH.js → XP3CB7W5.js} +1 -1
- package/dist/cdn/{PTDDLSKF.js → XQTUZF4F.js} +1 -1
- package/dist/cdn/{WHWRXOOY.js → XYCO5VO6.js} +1 -1
- package/dist/cdn/{GVHLQK4X.js → XYLNSPWX.js} +1 -1
- package/dist/cdn/{3Q6H4RYO.js → YA4NYUQW.js} +1 -1
- package/dist/cdn/{TVG3G3CQ.js → YU3OSVQX.js} +1 -1
- package/dist/cdn/{UXO5X7OY.js → Z2DLZCZA.js} +1 -1
- package/dist/cdn/{I3ZPH7M5.js → ZIDAAK2P.js} +1 -1
- package/dist/cdn/{T5PK3CSG.js → ZNQCLZ3Z.js} +1 -1
- package/dist/cdn/ZRKPBNDX.js +2 -0
- package/dist/cdn/{FGCLPEYP.js → ZXC3LV5S.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +4 -4
- package/dist/cdn/37ZP4563.js +0 -2
- package/dist/cdn/BHEPSUS4.js +0 -2
- package/dist/cdn/XMF2WHDG.js +0 -2
- package/dist/cdn/ZK7PHXMP.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as k}from"./
|
|
2
|
+
import{a as k}from"./3TW6V4CW.js";import{a as M,b as v}from"./KSH446AM.js";import{a as w}from"./3TQ5TC4S.js";import{M as P,N as L,O as $,P as c,Q as u,R as h,U as y,a as b,b as l,x}from"./ASNQKKPL.js";import"./3TTFCHAA.js";export default $arcgis.t(([{watch:B}])=>{var a=(t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(t,e,i),i);var H;function C(t){return(e,i)=>a(e,i,{get(){return(this.renderRoot??(H??=document.createDocumentFragment())).querySelectorAll(t)}})}var W=b`:host{transition:max-height .25s ease-in-out;--esri-widget-padding: 12px 15px;--level-picker-padding: var(--calcite-spacing-md);--level-label-color: var(--calcite-color-text-1);--level-label-color--empty: var(--calcite-color-text-2);--level-label-color--active: var(--calcite-color-brand);--level-border-width: 2px;--level-border-color: var(--calcite-color-border-2);--level-border-color--hover: var(--calcite-color-brand);--level-border-color--active: var(--calcite-color-brand);--level-background-color: rgb(from var(--calcite-color-foreground-1) r g b / 70%);--level-background-color--hover: rgb(from var(--calcite-color-foreground-1) r g b / 90%);--level-background-color--active: var(--calcite-color-brand);--focus-outline-width: 2px;--focus-outline-color: var(--calcite-color-brand);--focus-outline-offset: 2px}.container{height:max-content;display:flex;flex-direction:row;align-items:center;&.no-level{display:none}>*{height:max-content}}.clear-button{appearance:none;margin-inline-start:7px;display:none;position:absolute;inset-block-start:-4px}.label-container{--width: 90px;--height: 40px;flex-direction:column;justify-content:space-between;align-items:center;width:50%;margin-inline-end:var(--calcite-spacing-md);display:flex;&.active{color:var(--calcite-color-brand)}&.empty{cursor:default;color:var(--calcite-color-border-2);font-size:var(--calcite-font-size);font-weight:var(--calcite-font-weight-light)}&:focus{outline:none}&:focus-visible{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus)}}.level-label{position:relative;text-align:center;>span{pointer-events:none}&.active{font-size:var(--height);line-height:calc(var(--height) + 6px);>.clear-button{display:inline-block}}}.tiles-container{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;transform:rotate(180deg);cursor:pointer;padding:20px 0;width:50%}.tiles-inner-container{transition:margin .3s}`,j=Object.defineProperty,F=(t,e,i,n)=>{for(var r=void 0,o=t.length-1,s;o>=0;o--)(s=t[o])&&(r=s(e,i,r)||r);return r&&j(e,i,r),r},d=class extends ${constructor(){super(...arguments),this.hovering=!1,this.onPointerMove=e=>{if(!this.hovering)return!1;if(window.getSelection()?.removeAllRanges(),this.containerPosTop!=null){let i=this.containerPosTop,n=40,r=this.expandedLevelsMargin,o=this.levelsHeight,s=i+n+r,m=this.levelHeight/2;s+=m,o-=m;let f=(e.clientY-s)/o;f+=.035,this.normalizedPointerPosition=f}return!1},this.onPointerEnter=()=>{let e=this.levelsContainer.value;this.hovering||e==null||(this.hovering=!0,this.containerPosTop=e.getBoundingClientRect().top??0)},this.levelsContainer=P(),this.onPointerLeave=()=>{if(this.hovering){window.getSelection()?.removeAllRanges();for(let e of this.levelItems)e.width=void 0;this.normalizedPointerPosition=0,this.hoveredLevel=null,this.hovering=!1}},this.onPointerUp=()=>{window.getSelection()?.removeAllRanges();let e=this.level;this.hoveredLevel==null||e==null||this.#o()},this.expandedLevelsHeight=void 0,this.normalizedPointerPosition=0,this.hoveredLevel=null,this.arcgisBuildingLevelChange=x({bubbles:!0,composed:!0})}static{this.properties={expandedLevelsHeight:16,normalizedPointerPosition:16,hoveredLevel:16,messages:0,level:0,numberOfLevels:32,levelHeight:32,levelsHeight:32}}static{this.styles=W}get levels(){return this.level?.allowedValues??[]}get levelWidth(){let{levelWidthNominator:e,levelWidthConstant:i}=M,n=e/Math.sqrt(this.numberOfLevels)+i;return Math.round(v(n,30,80))}get _gaussianFactor(){let e=this.numberOfLevels;return e/Math.log(30*e)*10}get expandedLevelsMargin(){return Math.round(((this.expandedLevelsHeight??0)-this.levelsHeight)/2)}get levelClosestToPointer(){if(!this.hovering)return null;let e=this.numberOfLevels-1,i=this.clampedNormalizedPointerPosition;return e>=0&&i!=null?this.levels[Math.round((1-i)*e)]:null}get clampedNormalizedPointerPosition(){return v(this.normalizedPointerPosition,0,1)}get numberOfLevels(){return this.levels.length}get levelHeight(){let e=14,i=e*2/Math.sqrt(this.numberOfLevels);return Math.round(v(i,2,e))}get levelsHeight(){return Math.round(this.levelHeight*this.numberOfLevels)}async loaded(){this.listen("keydown",this.#n.bind(this)),this.manager.onLifecycle(()=>[B(()=>[this.normalizedPointerPosition,this.hovering],()=>this.onPointerPositionChange(),{initial:!0})])}onPointerPositionChange(){let e=0;this.levelItems.forEach((n,r)=>{let{width:o,height:s}=this.getLevelWidgetSize(r);n.height=s,n.width=o,e+=s}),this.hoveredLevel=this.levelClosestToPointer;let i=this.expandedLevelsHeight;(i==null||Math.abs(i-e)>30)&&(this.expandedLevelsHeight=e)}getLevelWidgetSize(e){let i={width:this.levelWidth,height:this.levelHeight};if(this.hovering){let n=this.getGaussianFactor(e,this.clampedNormalizedPointerPosition);i.width+=20*n,i.height+=30*n}return i}getGaussianFactor(e,i){let n=this.numberOfLevels-1,r=(n-e)/n,o=this._gaussianFactor*(r-i);return Math.exp(-(o**2))}#n(e){switch(e.key){case"ArrowDown":case"ArrowLeft":e.preventDefault(),e.stopPropagation(),this.#i(),this.#e();break;case"ArrowUp":case"ArrowRight":e.preventDefault(),e.stopPropagation(),this.#t(),this.#e();break}}#e(){Array.from(this.levelItems).find(e=>e.level===this.level?.value)?.focus()}#t(){this.level&&(this.level.next(),this.arcgisBuildingLevelChange.emit())}#i(){this.level&&(this.level.previous(),this.arcgisBuildingLevelChange.emit())}#o(){this.level==null||this.hoveredLevel==null||(this.level.value===this.hoveredLevel&&!this.level.disabled?this.#r():(this.level.select(this.hoveredLevel),this.arcgisBuildingLevelChange.emit()))}#r(){this.level&&!this.level.disabled&&(this.level.clear(),this.arcgisBuildingLevelChange.emit())}render(){if(!this.messages)return null;let e=this.level;e?.value;let i=e&&!e.disabled,n=this.numberOfLevels>1?k(this.levels,r=>r,r=>l`<arcgis-building-level-item .level=${r} .baseWidth=${this.levelWidth} .hovered=${this.hoveredLevel===r} .active=${e&&!e.disabled&&e.value===r} class=${c({"animate-level":!this.hovering})} .messages=${this.messages}></arcgis-building-level-item>`):null;return l`<div class=${c({container:!0,"no-level":this.numberOfLevels<2,"animate-level":this.hovering})}>${T({messages:this.messages,active:i,hasNext:e?.hasNext,hasPrevious:e?.hasPrevious,onNext:()=>this.#t(),onPrevious:()=>this.#i(),children:U({messages:this.messages,level:this.hoveredLevel??e?.value,active:i,onClear:()=>this.#r()})})}${D({ref:this.levelsContainer,expandedLevelsMargin:this.expandedLevelsMargin,levelsHeight:this.levelsHeight,onPointerEnter:this.onPointerEnter,onPointerMove:this.onPointerMove,onPointerLeave:this.onPointerLeave,onPointerUp:this.onPointerUp,children:n})}</div>`}};F([C("arcgis-building-level-item")],d.prototype,"levelItems");function T(t){return l`<div class=${c({"label-container":!0,empty:!t.active,active:!0,hover:!0})} title=${t.messages.selectLevel??h} tabindex=0><calcite-action icon=chevron-up appearance=transparent .text=${t.messages.nextLevel} @click=${t.onNext} .disabled=${!t.hasNext}></calcite-action>${t.children}<calcite-action icon=chevron-down appearance=transparent .text=${t.messages.previousLevel} @click=${t.onPrevious} .disabled=${!t.hasPrevious}></calcite-action></div>`}function U(t){let e=t.messages;return l`<div aria-label=${e.clearLevel??h} class=${c({"level-label":!0,active:t.active&&t.level!=null})} @click=${t.onClear} title=${e.clearLevel??h}>${t.active?l`<span>${t.level}</span>${w("clear-button",l`<calcite-fab appearance=outline-fill class="clear-button" icon=x kind=neutral @click=${t.onClear} scale=s></calcite-fab>`)}`:l`<span>${e.selectLevel}</span>`}</div>`}function D(t){let e=40,i=-e/2,n=t.levelsHeight,r=n+e*2;return l`<div class="tiles-container" @pointerenter=${t.onPointerEnter} @pointerover=${t.onPointerEnter} @pointermove=${t.onPointerMove} @pointerleave=${t.onPointerLeave} @pointerup=${t.onPointerUp} @click=${t.onClick} style=${u({height:`${r}px`,marginBlockStart:`${i}px`,marginBlockEnd:`${i}px`})} ${L(t.ref)}><div class="tiles-inner-container" style=${u({height:`${n}px`,margin:"0",marginBlockStart:`${20-t.expandedLevelsMargin}px`})}>${t.children}</div></div>`}y("arcgis-building-level-picker",d);return d},"core/reactiveUtils")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import b from"./
|
|
2
|
+
import b from"./P3H4R2QR.js";import a from"./ET7J5T6W.js";import{a as f}from"./KVXPMMSF.js";import{i as d,u as v}from"./ASNQKKPL.js";export default $arcgis.t(([{watch:E},{b:b},{c:w,d:u,e:y}])=>{var k=(m,e)=>t=>g(t,m),h=class extends w{#o=new Map;#e;#t;constructor(e,t){super(e,t),new b(e);let s=this,o=s.instance,i=o.viewModel,r=o.visibleElements,l=new Proxy(this.exports,{get(n,c,p){return c==="viewModel"?i:c==="visibleElements"?r:Reflect.get(n,c,p)}});if(s.#t=o,s.instance=l,s.exports=l,i){let n={component:e,get exports(){return s.instance.viewModel}};y(s).set("viewModel","viewModel"),e.addController(n),i=u(e,new WeakRef(n),d(e)-1,i,s.#o)}s.instance.visibleElements&&(r=s.#s(o))}hostConnected(){this.instance=this.#t,super.hostConnected()}hostLoad(){this.#e=E(()=>this.component.el.view,e=>{let t=this.instance;!("view"in t)&&typeof t.viewModel=="object"?t.viewModel.view=e:t.view=e,!("map"in t)&&typeof t.viewModel=="object"?t.viewModel.map=e?.map:t.map=e?.map},{sync:!0,initial:!0})}hostUpdate(e){e.has("closed")&&(this.instance.visible=!this.component.closed)}hostLoaded(){let{el:e}=this.component;e.childElem??=document.createElement("div"),e.childElem.setAttribute("arcgis-widget-wrapped",""),this.instance.container=e.childElem,(this.component.el.shadowRoot??this.component.el).appendChild(this.instance.container),this.component.closed!==void 0&&this.onLifecycle(()=>E(()=>this.instance.visible,t=>this.component.closed=!t,{initial:!0}))}#s(e){return new Proxy(e.visibleElements,{get:(t,s)=>{if(typeof s=="symbol"||s in Promise.prototype)return t[s];let o=[s],i=this.#n(o);return v(this.component,r=>{let l=r;this.component[l]=!1;let n=e.visibleElements??{},c;for(let a of o.slice(0,-1))if(typeof n[a]=="object"&&n[a]!==null)n=n[a];else{c=!!n[a];break}c===void 0&&(c=!!(n[o.slice(-1)[0]]??!0));let p=l.startsWith("hide")||l.startsWith("show")?l.startsWith("hide"):c;this.onUpdate(a=>{if(a.has(l)){let x=this.component[l];this.#i(o,x,p)}})},i)}})}#n(e){let t=new Proxy({},{get:(s,o)=>{let i=Reflect.get(s,o);return typeof o=="symbol"||o in Promise.prototype?i:(e.push(o),t)}});return t}#i(e,t,s){let o=this.instance.visibleElements??{};for(let r of e.slice(0,-1))(typeof o[r]!="object"||o[r]===null)&&(o[r]={}),o=o[r];let i=!!(s?!t:t);o[e.at(-1)]=i}hostDestroy(){this.#e?.remove(),super.hostDestroy()}},g=f(h);return k},"core/reactiveUtils",a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{d as h,i as T}from"./NTESPOTX.js";import j from"./KUHZAASH.js";import{a as g}from"./IGSZABNU.js";import i from"./3Q6H4RYO.js";import"./PC4PAQXQ.js";import{a as v}from"./S6MIUB7T.js";import f from"./DOCOL5GC.js";import{a as M}from"./SL2D573Y.js";import{a as p}from"./54VXNFQ4.js";import e from"./CKTJHIDM.js";import d from"./LLPQYUPW.js";import{h as _}from"./DFXZ77W6.js";import"./LEIE3RAW.js";import a from"./KGXW3NCW.js";import"./PYF4Y6SP.js";import{O as x,P as u,R as b,U as y,a as w,b as c,x as D}from"./6MQTAMXU.js";import"./3TTFCHAA.js";export default $arcgis.t(([L,{property:n,subclass:E},{watch:R,whenOnce:A},{forceInteractive:j},,,,C,,O])=>{var H=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}:host{position:relative;width:var(--arcgis-internal-panel-width, 300px)}.root{--section-internal-gap: var(--calcite-spacing-md);display:flex;flex-direction:column;gap:var(--calcite-spacing-lg);min-width:var(--arcgis-internal-panel-min-width, 300px);overflow:var(--arcgis-internal-panel-overflow, visible);height:fit-content}:host([visual-scale="s"]) .root{--section-internal-gap: var(--calcite-spacing-sm)}:host([visual-scale="l"]) .root{--section-internal-gap: var(--calcite-spacing-lg)}.time-range-section arcgis-time-of-day-slider{margin-block-end:var(--section-internal-gap)}.time-range-section calcite-label:last-child,.visualization-options-section calcite-label:last-child{--calcite-label-margin-bottom: 0}.date-picker{flex-grow:1;display:block}.visualization-options{flex-direction:column;display:flex;gap:var(--section-internal-gap)}.hidden-config{display:none}`,Z=Object.defineProperty,B=Object.getOwnPropertyDescriptor,a=(i,e,o,r)=>{for(var s=r>1?void 0:r?B(e,o):e,l=i.length-1,d;l>=0;l--)(d=i[l])&&(s=(r?d(e,o,s):d(s))||s);return r&&s&&Z(e,o,s),s},S=Symbol("interactiveHandle"),t=class extends O{constructor(){super(...arguments),this.supportedViewType="3d",this.unsupportedErrorMessage="The Shadow Cast component is only supported in 3D views.",this.shouldForceInteractive=!1,this.minMinDuration=0,this.maxMinDuration=h(8,"hours","milliseconds"),this.hideShadowDurationTooltip=!1}constructAnalysis(){return new L}initialize(){this.addHandles(R(()=>({analysisView:this.analysisView,tooltipVisible:!this.hideShadowDurationTooltip}),({analysisView:i,tooltipVisible:e})=>{this.removeHandles(S),i&&(i.interactive=e,e&&this.addHandles(j(i),S))},{sync:!0,initial:!0}))}get date(){return this.analysis.date}set date(i){this.analysis.date=i}get discreteColor(){return this.analysis.discreteOptions.color}set discreteColor(i){this.analysis.discreteOptions.color=i}get discreteInterval(){return this.analysis.discreteOptions.interval}set discreteInterval(i){this.analysis.discreteOptions.interval=i}get totalDurationColor(){return this.analysis.totalDurationOptions.color}set totalDurationColor(i){this.analysis.totalDurationOptions.color=i}get totalDurationMode(){return this.analysis.totalDurationOptions.mode}set totalDurationMode(i){this.analysis.totalDurationOptions.mode=i}get localDate(){return T(this.view)}get mode(){return this.analysis.mode}set mode(i){this.analysis.mode=i}get visualizeSunlight(){return this.analysis.visualizeSunlight}set visualizeSunlight(i){this.analysis.visualizeSunlight=i}get startTimeOfDay(){return this.analysis.startTimeOfDay}set startTimeOfDay(i){this.analysis.startTimeOfDay=i}get endTimeOfDay(){return this.analysis.endTimeOfDay}set endTimeOfDay(i){this.analysis.endTimeOfDay=i}get state(){return this.view?.ready&&this.analysisView?"ready":"disabled"}get minDurationColor(){return this.analysis.minDurationOptions.color}set minDurationColor(i){this.analysis.minDurationOptions.color=i}get minDuration(){return this.analysis.minDurationOptions.minDuration}set minDuration(i){this.analysis.minDurationOptions.minDuration=i}get minDurationContextEnabled(){return this.analysis.minDurationOptions.contextEnabled}set minDurationContextEnabled(i){this.analysis.minDurationOptions.contextEnabled=i}get minDurationContextColor(){return this.analysis.minDurationOptions.contextOptions.color}set minDurationContextColor(i){this.analysis.minDurationOptions.contextOptions.color=i}get minDurationContextInterval(){return this.analysis.minDurationOptions.contextOptions.interval}set minDurationContextInterval(i){this.analysis.minDurationOptions.contextOptions.interval=i}get utcOffset(){return this.analysis.utcOffset}set utcOffset(i){this.analysis.utcOffset=i}async getDurationAtScreen(i){return await(await A(()=>this.analysisView)).getDurationAtScreen(i)}};a([n()],t.prototype,"date",1);a([n()],t.prototype,"discreteColor",1);a([n()],t.prototype,"discreteInterval",1);a([n()],t.prototype,"totalDurationColor",1);a([n()],t.prototype,"totalDurationMode",1);a([n()],t.prototype,"localDate",1);a([n()],t.prototype,"mode",1);a([n()],t.prototype,"visualizeSunlight",1);a([n()],t.prototype,"startTimeOfDay",1);a([n()],t.prototype,"endTimeOfDay",1);a([n()],t.prototype,"state",1);a([n()],t.prototype,"minDurationColor",1);a([n()],t.prototype,"minMinDuration",2);a([n()],t.prototype,"maxMinDuration",2);a([n()],t.prototype,"minDuration",1);a([n()],t.prototype,"minDurationContextEnabled",1);a([n()],t.prototype,"minDurationContextColor",1);a([n()],t.prototype,"minDurationContextInterval",1);a([n()],t.prototype,"utcOffset",1);a([n()],t.prototype,"hideShadowDurationTooltip",2);t=a([E("components.shadow-cast.ShadowCastViewModel")],t);var q=C(t),f=class extends x{constructor(){super(...arguments),this.viewModel=q(this),this.messages=M(),this.analysis=this.viewModel.analysis,this.view=this.viewModel.view,this.visualizeSunlight=this.viewModel.visualizeSunlight,this.visualScale="m",this.autoDestroyDisabled=!1,this.endTimeOfDay=this.viewModel.endTimeOfDay,this.headingLevel=4,this.hideTimeRangeSlider=!1,this.hideTimezone=!1,this.hideDatePicker=!1,this.hideShadowDurationTooltip=this.viewModel.hideShadowDurationTooltip,this.hideVisualization=this.viewModel.hideVisualization,this.hideVisualizationOptions=!1,this.hideDiscreteOptions=!1,this.hideDiscreteColorPicker=!1,this.hideDiscreteInterval=!1,this.hideTotalDurationOptions=!1,this.hideTotalDurationColorPicker=!1,this.hideTotalDurationModeSelect=!1,this.hideMinDurationOptions=!1,this.hideMinDurationColorPicker=!1,this.hideMinDurationSlider=!1,this.hideMinDurationContextOptions=!1,this.hideMinDurationContextToggle=!1,this.hideMinDurationContextColorPicker=!1,this.hideMinDurationContextInterval=!1,this.icon="measure-building-height-shadow",this.mode=this.viewModel.mode,this.startTimeOfDay=this.viewModel.startTimeOfDay,this.state=this.viewModel.state,this.utcOffset=this.viewModel.utcOffset,this.discreteColor=this.viewModel.discreteColor,this.discreteInterval=this.viewModel.discreteInterval,this.totalDurationColor=this.viewModel.totalDurationColor,this.totalDurationMode=this.viewModel.totalDurationMode,this.minDuration=this.viewModel.minDuration,this.minDurationColor=this.viewModel.minDurationColor,this.minMinDuration=this.viewModel.minMinDuration,this.maxMinDuration=this.viewModel.maxMinDuration,this.minDurationContextEnabled=this.viewModel.minDurationContextEnabled,this.minDurationContextColor=this.viewModel.minDurationContextColor,this.minDurationContextInterval=this.viewModel.minDurationContextInterval,this.arcgisPropertyChange=_()("state"),this.arcgisReady=D()}static{this.properties={analysis:0,view:0,visualizeSunlight:5,visualScale:3,autoDestroyDisabled:5,date:1,endTimeOfDay:9,headingLevel:9,hideTimeRangeSlider:5,hideTimezone:5,hideDatePicker:5,hideShadowDurationTooltip:5,hideVisualization:5,hideVisualizationOptions:5,hideDiscreteOptions:5,hideDiscreteColorPicker:5,hideDiscreteInterval:5,hideTotalDurationOptions:5,hideTotalDurationColorPicker:5,hideTotalDurationModeSelect:5,hideMinDurationOptions:5,hideMinDurationColorPicker:5,hideMinDurationSlider:5,hideMinDurationContextOptions:5,hideMinDurationContextToggle:5,hideMinDurationContextColorPicker:5,hideMinDurationContextInterval:5,icon:3,label:1,mode:1,referenceElement:1,startTimeOfDay:9,state:32,utcOffset:9,discreteColor:0,discreteInterval:9,totalDurationColor:0,totalDurationMode:1,minDuration:9,minDurationColor:0,minMinDuration:9,maxMinDuration:9,minDurationContextEnabled:5,minDurationContextColor:0,minDurationContextInterval:9}}static{this.styles=H}get _effectiveMessages(){let{messages:e,visualizeSunlight:o}=this,{sunlight:r}=e;return{...e,discrete:o?r?.discrete:e.discrete,minDuration:o?r?.minDuration:e.minDuration,totalDuration:o?r?.totalDuration:e.totalDuration,timeInShadow:o?e.timeInSunlight:e.timeInShadow,timeRangeSliderLabel:e.timeRangeSliderLabel}}get date(){return this.viewModel.date}set date(e){this.viewModel.date=e}async destroy(){await this.manager.destroy()}async getDurationAtScreen(e){return await this.viewModel.getDurationAtScreen(e)}render(){let{_effectiveMessages:e}=this;return c`<div aria-label=${e.componentLabel??b} class=${u({root:!0,[p.widget]:!0,[p.widgetDisabled]:this.viewModel.state==="disabled",[p.panel]:!0})} role=presentation>${this._renderTimeRangeSection()}${g({hidden:this.hideVisualizationOptions,children:this._renderVisualizationOptionsSection()})}</div>`}_renderTimeRangeSection(){if(!this.analysis||this.hideTimeRangeSlider&&this.hideDatePicker)return;let{_effectiveMessages:e,utcOffset:o,viewModel:r}=this,s=this.visualScale;return c`<section class="time-range-section">${v({level:this.headingLevel,children:e.timeRangeHeading})}${g({hidden:this.hideTimeRangeSlider,children:this._renderTimeRange()})}${g({hidden:this.hideTimezone,children:c`<calcite-label .scale=${s}>${e.timezoneLabel}<calcite-input-time-zone mode=offset overlay-positioning=fixed .referenceDate=${r.localDate} .scale=${s} .value=${`${h(o??0,"hours","minutes")}`} @calciteInputTimeZoneChange=${l=>{r.utcOffset=+l.target.value/60}}></calcite-input-time-zone></calcite-label>`})}${g({hidden:this.hideDatePicker,children:c`<calcite-label .scale=${s}>${e.dateLabel}<calcite-input-date-picker overlay-positioning=fixed placement=bottom .scale=${s} .valueAsDate=${r.date} @calciteInputDatePickerChange=${l=>{let d=l.currentTarget.valueAsDate;r.date=Array.isArray(d)?d[0]:d}}></calcite-input-date-picker></calcite-label>`})}</section>`}_renderTimeRange(){let{_effectiveMessages:e,viewModel:o}=this;return c`<arcgis-time-of-day-slider mode=range .startTime=${$(this.startTimeOfDay)} .endTime=${$(this.endTimeOfDay)} .label=${e.timeRangeSliderLabel} .visualScale=${this.visualScale} @arcgisTimeChange=${({currentTarget:r})=>{o.startTimeOfDay=h(r.startTime,"minutes","milliseconds"),o.endTimeOfDay=h(r.endTime,"minutes","milliseconds")}}></arcgis-time-of-day-slider>`}_renderVisualizationOptionsSection(){let{analysis:e,_effectiveMessages:o,headingLevel:r,viewModel:s}=this;if(!e)return;let{discreteOptions:l,totalDurationOptions:d,minDurationOptions:k}=e,m=(P,V)=>s.mode===P&&!V?void 0:"hidden-config",z=this.hideMinDurationContextOptions||this.visualizeSunlight,I=this.hideMinDurationContextToggle||this.visualizeSunlight;return c`<section class="visualization-options-section">${v({level:r,children:o.visualizationLabel})}<div class="visualization-options">${this._renderModeSelect()}<div class=${u(m("min-duration",this.hideMinDurationOptions))}><arcgis-shadow-cast-min-duration-config .hideColorPicker=${this.hideMinDurationColorPicker} .hideContextColorPicker=${this.hideMinDurationContextColorPicker} .hideContextInterval=${this.hideMinDurationContextInterval} .hideContextOptions=${z} .hideContextToggle=${I} .hideSlider=${this.hideMinDurationSlider} .minMinDuration=${this.minMinDuration} .maxMinDuration=${this.maxMinDuration} .messages=${o} .options=${k} .scale=${this.visualScale}></arcgis-shadow-cast-min-duration-config></div><div class=${u(m("total-duration",this.hideTotalDurationOptions))}><arcgis-shadow-cast-total-duration-config .hideColorPicker=${this.hideTotalDurationColorPicker} .hideModeSelect=${this.hideTotalDurationModeSelect} .messages=${o} .options=${d} .scale=${this.visualScale}></arcgis-shadow-cast-total-duration-config></div><div class=${u(m("discrete",this.hideDiscreteOptions))}><arcgis-shadow-cast-discrete-config .hideColorPicker=${this.hideDiscreteColorPicker} .hideInterval=${this.hideDiscreteInterval} .messages=${o} .options=${l} .scale=${this.visualScale}></arcgis-shadow-cast-discrete-config></div></div></section>`}_renderModeSelect(){let{_effectiveMessages:e,viewModel:o}=this,{mode:r}=o;return c`<calcite-select .label=${e.visualizationLabel??""} .scale=${this.visualScale} @calciteSelectChange=${s=>{let l=s.target.selectedOption?.value;o.mode=l??"min-duration"}}>${[{mode:"min-duration",label:e.minDuration?.optionLabel},{mode:"total-duration",label:e.totalDuration?.optionLabel},{mode:"discrete",label:e.discrete?.optionLabel}].map(({mode:s,label:l})=>c`<calcite-option .selected=${s===r} .value=${s} .label=${l}></calcite-option>`)}</calcite-select>`}};function $(i){return Math.round(h(i,"milliseconds","minutes"))}y("arcgis-shadow-cast",f);return f},"analysis/ShadowCastAnalysis","core/accessorSupport/decorators","core/reactiveUtils","applications/Components/analysisUtils",a,d,e,f,i,j)
|
|
2
|
+
import{d as h,i as T}from"./NTESPOTX.js";import j from"./7KF6PFMC.js";import{a as g}from"./IGSZABNU.js";import i from"./YA4NYUQW.js";import"./PC4PAQXQ.js";import{a as v}from"./IFA7CCS4.js";import f from"./LRCD6STF.js";import{a as M}from"./PMJU3M4K.js";import{a as p}from"./54VXNFQ4.js";import e from"./P3H4R2QR.js";import d from"./ET7J5T6W.js";import{h as _}from"./KVXPMMSF.js";import"./CPZ76XWX.js";import a from"./DYTTT2ZE.js";import"./FDVDYQ7T.js";import{O as x,P as u,R as b,U as y,a as w,b as c,x as D}from"./ASNQKKPL.js";import"./3TTFCHAA.js";export default $arcgis.t(([L,{property:n,subclass:E},{watch:R,whenOnce:A},{forceInteractive:j},,,,C,,O])=>{var H=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}:host{position:relative;width:var(--arcgis-internal-panel-width, 300px)}.root{--section-internal-gap: var(--calcite-spacing-md);display:flex;flex-direction:column;gap:var(--calcite-spacing-lg);min-width:var(--arcgis-internal-panel-min-width, 300px);overflow:var(--arcgis-internal-panel-overflow, visible);height:fit-content}:host([visual-scale="s"]) .root{--section-internal-gap: var(--calcite-spacing-sm)}:host([visual-scale="l"]) .root{--section-internal-gap: var(--calcite-spacing-lg)}.time-range-section arcgis-time-of-day-slider{margin-block-end:var(--section-internal-gap)}.time-range-section calcite-label:last-child,.visualization-options-section calcite-label:last-child{--calcite-label-margin-bottom: 0}.date-picker{flex-grow:1;display:block}.visualization-options{flex-direction:column;display:flex;gap:var(--section-internal-gap)}.hidden-config{display:none}`,Z=Object.defineProperty,B=Object.getOwnPropertyDescriptor,a=(i,e,o,r)=>{for(var s=r>1?void 0:r?B(e,o):e,l=i.length-1,d;l>=0;l--)(d=i[l])&&(s=(r?d(e,o,s):d(s))||s);return r&&s&&Z(e,o,s),s},S=Symbol("interactiveHandle"),t=class extends O{constructor(){super(...arguments),this.supportedViewType="3d",this.unsupportedErrorMessage="The Shadow Cast component is only supported in 3D views.",this.shouldForceInteractive=!1,this.minMinDuration=0,this.maxMinDuration=h(8,"hours","milliseconds"),this.hideShadowDurationTooltip=!1}constructAnalysis(){return new L}initialize(){this.addHandles(R(()=>({analysisView:this.analysisView,tooltipVisible:!this.hideShadowDurationTooltip}),({analysisView:i,tooltipVisible:e})=>{this.removeHandles(S),i&&(i.interactive=e,e&&this.addHandles(j(i),S))},{sync:!0,initial:!0}))}get date(){return this.analysis.date}set date(i){this.analysis.date=i}get discreteColor(){return this.analysis.discreteOptions.color}set discreteColor(i){this.analysis.discreteOptions.color=i}get discreteInterval(){return this.analysis.discreteOptions.interval}set discreteInterval(i){this.analysis.discreteOptions.interval=i}get totalDurationColor(){return this.analysis.totalDurationOptions.color}set totalDurationColor(i){this.analysis.totalDurationOptions.color=i}get totalDurationMode(){return this.analysis.totalDurationOptions.mode}set totalDurationMode(i){this.analysis.totalDurationOptions.mode=i}get localDate(){return T(this.view)}get mode(){return this.analysis.mode}set mode(i){this.analysis.mode=i}get visualizeSunlight(){return this.analysis.visualizeSunlight}set visualizeSunlight(i){this.analysis.visualizeSunlight=i}get startTimeOfDay(){return this.analysis.startTimeOfDay}set startTimeOfDay(i){this.analysis.startTimeOfDay=i}get endTimeOfDay(){return this.analysis.endTimeOfDay}set endTimeOfDay(i){this.analysis.endTimeOfDay=i}get state(){return this.view?.ready&&this.analysisView?"ready":"disabled"}get minDurationColor(){return this.analysis.minDurationOptions.color}set minDurationColor(i){this.analysis.minDurationOptions.color=i}get minDuration(){return this.analysis.minDurationOptions.minDuration}set minDuration(i){this.analysis.minDurationOptions.minDuration=i}get minDurationContextEnabled(){return this.analysis.minDurationOptions.contextEnabled}set minDurationContextEnabled(i){this.analysis.minDurationOptions.contextEnabled=i}get minDurationContextColor(){return this.analysis.minDurationOptions.contextOptions.color}set minDurationContextColor(i){this.analysis.minDurationOptions.contextOptions.color=i}get minDurationContextInterval(){return this.analysis.minDurationOptions.contextOptions.interval}set minDurationContextInterval(i){this.analysis.minDurationOptions.contextOptions.interval=i}get utcOffset(){return this.analysis.utcOffset}set utcOffset(i){this.analysis.utcOffset=i}async getDurationAtScreen(i){return await(await A(()=>this.analysisView)).getDurationAtScreen(i)}};a([n()],t.prototype,"date",1);a([n()],t.prototype,"discreteColor",1);a([n()],t.prototype,"discreteInterval",1);a([n()],t.prototype,"totalDurationColor",1);a([n()],t.prototype,"totalDurationMode",1);a([n()],t.prototype,"localDate",1);a([n()],t.prototype,"mode",1);a([n()],t.prototype,"visualizeSunlight",1);a([n()],t.prototype,"startTimeOfDay",1);a([n()],t.prototype,"endTimeOfDay",1);a([n()],t.prototype,"state",1);a([n()],t.prototype,"minDurationColor",1);a([n()],t.prototype,"minMinDuration",2);a([n()],t.prototype,"maxMinDuration",2);a([n()],t.prototype,"minDuration",1);a([n()],t.prototype,"minDurationContextEnabled",1);a([n()],t.prototype,"minDurationContextColor",1);a([n()],t.prototype,"minDurationContextInterval",1);a([n()],t.prototype,"utcOffset",1);a([n()],t.prototype,"hideShadowDurationTooltip",2);t=a([E("components.shadow-cast.ShadowCastViewModel")],t);var q=C(t),f=class extends x{constructor(){super(...arguments),this.viewModel=q(this),this.messages=M(),this.analysis=this.viewModel.analysis,this.view=this.viewModel.view,this.visualizeSunlight=this.viewModel.visualizeSunlight,this.visualScale="m",this.autoDestroyDisabled=!1,this.endTimeOfDay=this.viewModel.endTimeOfDay,this.headingLevel=4,this.hideTimeRangeSlider=!1,this.hideTimezone=!1,this.hideDatePicker=!1,this.hideShadowDurationTooltip=this.viewModel.hideShadowDurationTooltip,this.hideVisualization=this.viewModel.hideVisualization,this.hideVisualizationOptions=!1,this.hideDiscreteOptions=!1,this.hideDiscreteColorPicker=!1,this.hideDiscreteInterval=!1,this.hideTotalDurationOptions=!1,this.hideTotalDurationColorPicker=!1,this.hideTotalDurationModeSelect=!1,this.hideMinDurationOptions=!1,this.hideMinDurationColorPicker=!1,this.hideMinDurationSlider=!1,this.hideMinDurationContextOptions=!1,this.hideMinDurationContextToggle=!1,this.hideMinDurationContextColorPicker=!1,this.hideMinDurationContextInterval=!1,this.icon="measure-building-height-shadow",this.mode=this.viewModel.mode,this.startTimeOfDay=this.viewModel.startTimeOfDay,this.state=this.viewModel.state,this.utcOffset=this.viewModel.utcOffset,this.discreteColor=this.viewModel.discreteColor,this.discreteInterval=this.viewModel.discreteInterval,this.totalDurationColor=this.viewModel.totalDurationColor,this.totalDurationMode=this.viewModel.totalDurationMode,this.minDuration=this.viewModel.minDuration,this.minDurationColor=this.viewModel.minDurationColor,this.minMinDuration=this.viewModel.minMinDuration,this.maxMinDuration=this.viewModel.maxMinDuration,this.minDurationContextEnabled=this.viewModel.minDurationContextEnabled,this.minDurationContextColor=this.viewModel.minDurationContextColor,this.minDurationContextInterval=this.viewModel.minDurationContextInterval,this.arcgisPropertyChange=_()("state"),this.arcgisReady=D()}static{this.properties={analysis:0,view:0,visualizeSunlight:5,visualScale:3,autoDestroyDisabled:5,date:1,endTimeOfDay:9,headingLevel:9,hideTimeRangeSlider:5,hideTimezone:5,hideDatePicker:5,hideShadowDurationTooltip:5,hideVisualization:5,hideVisualizationOptions:5,hideDiscreteOptions:5,hideDiscreteColorPicker:5,hideDiscreteInterval:5,hideTotalDurationOptions:5,hideTotalDurationColorPicker:5,hideTotalDurationModeSelect:5,hideMinDurationOptions:5,hideMinDurationColorPicker:5,hideMinDurationSlider:5,hideMinDurationContextOptions:5,hideMinDurationContextToggle:5,hideMinDurationContextColorPicker:5,hideMinDurationContextInterval:5,icon:3,label:1,mode:1,referenceElement:1,startTimeOfDay:9,state:32,utcOffset:9,discreteColor:0,discreteInterval:9,totalDurationColor:0,totalDurationMode:1,minDuration:9,minDurationColor:0,minMinDuration:9,maxMinDuration:9,minDurationContextEnabled:5,minDurationContextColor:0,minDurationContextInterval:9}}static{this.styles=H}get _effectiveMessages(){let{messages:e,visualizeSunlight:o}=this,{sunlight:r}=e;return{...e,discrete:o?r?.discrete:e.discrete,minDuration:o?r?.minDuration:e.minDuration,totalDuration:o?r?.totalDuration:e.totalDuration,timeInShadow:o?e.timeInSunlight:e.timeInShadow,timeRangeSliderLabel:e.timeRangeSliderLabel}}get date(){return this.viewModel.date}set date(e){this.viewModel.date=e}async destroy(){await this.manager.destroy()}async getDurationAtScreen(e){return await this.viewModel.getDurationAtScreen(e)}render(){let{_effectiveMessages:e}=this;return c`<div aria-label=${e.componentLabel??b} class=${u({root:!0,[p.widget]:!0,[p.widgetDisabled]:this.viewModel.state==="disabled",[p.panel]:!0})} role=presentation>${this._renderTimeRangeSection()}${g({hidden:this.hideVisualizationOptions,children:this._renderVisualizationOptionsSection()})}</div>`}_renderTimeRangeSection(){if(!this.analysis||this.hideTimeRangeSlider&&this.hideDatePicker)return;let{_effectiveMessages:e,utcOffset:o,viewModel:r}=this,s=this.visualScale;return c`<section class="time-range-section">${v({level:this.headingLevel,children:e.timeRangeHeading})}${g({hidden:this.hideTimeRangeSlider,children:this._renderTimeRange()})}${g({hidden:this.hideTimezone,children:c`<calcite-label .scale=${s}>${e.timezoneLabel}<calcite-input-time-zone mode=offset overlay-positioning=fixed .referenceDate=${r.localDate} .scale=${s} .value=${`${h(o??0,"hours","minutes")}`} @calciteInputTimeZoneChange=${l=>{r.utcOffset=+l.target.value/60}}></calcite-input-time-zone></calcite-label>`})}${g({hidden:this.hideDatePicker,children:c`<calcite-label .scale=${s}>${e.dateLabel}<calcite-input-date-picker overlay-positioning=fixed placement=bottom .scale=${s} .valueAsDate=${r.date} @calciteInputDatePickerChange=${l=>{let d=l.currentTarget.valueAsDate;r.date=Array.isArray(d)?d[0]:d}}></calcite-input-date-picker></calcite-label>`})}</section>`}_renderTimeRange(){let{_effectiveMessages:e,viewModel:o}=this;return c`<arcgis-time-of-day-slider mode=range .startTime=${$(this.startTimeOfDay)} .endTime=${$(this.endTimeOfDay)} .label=${e.timeRangeSliderLabel} .visualScale=${this.visualScale} @arcgisTimeChange=${({currentTarget:r})=>{o.startTimeOfDay=h(r.startTime,"minutes","milliseconds"),o.endTimeOfDay=h(r.endTime,"minutes","milliseconds")}}></arcgis-time-of-day-slider>`}_renderVisualizationOptionsSection(){let{analysis:e,_effectiveMessages:o,headingLevel:r,viewModel:s}=this;if(!e)return;let{discreteOptions:l,totalDurationOptions:d,minDurationOptions:k}=e,m=(P,V)=>s.mode===P&&!V?void 0:"hidden-config",z=this.hideMinDurationContextOptions||this.visualizeSunlight,I=this.hideMinDurationContextToggle||this.visualizeSunlight;return c`<section class="visualization-options-section">${v({level:r,children:o.visualizationLabel})}<div class="visualization-options">${this._renderModeSelect()}<div class=${u(m("min-duration",this.hideMinDurationOptions))}><arcgis-shadow-cast-min-duration-config .hideColorPicker=${this.hideMinDurationColorPicker} .hideContextColorPicker=${this.hideMinDurationContextColorPicker} .hideContextInterval=${this.hideMinDurationContextInterval} .hideContextOptions=${z} .hideContextToggle=${I} .hideSlider=${this.hideMinDurationSlider} .minMinDuration=${this.minMinDuration} .maxMinDuration=${this.maxMinDuration} .messages=${o} .options=${k} .scale=${this.visualScale}></arcgis-shadow-cast-min-duration-config></div><div class=${u(m("total-duration",this.hideTotalDurationOptions))}><arcgis-shadow-cast-total-duration-config .hideColorPicker=${this.hideTotalDurationColorPicker} .hideModeSelect=${this.hideTotalDurationModeSelect} .messages=${o} .options=${d} .scale=${this.visualScale}></arcgis-shadow-cast-total-duration-config></div><div class=${u(m("discrete",this.hideDiscreteOptions))}><arcgis-shadow-cast-discrete-config .hideColorPicker=${this.hideDiscreteColorPicker} .hideInterval=${this.hideDiscreteInterval} .messages=${o} .options=${l} .scale=${this.visualScale}></arcgis-shadow-cast-discrete-config></div></div></section>`}_renderModeSelect(){let{_effectiveMessages:e,viewModel:o}=this,{mode:r}=o;return c`<calcite-select .label=${e.visualizationLabel??""} .scale=${this.visualScale} @calciteSelectChange=${s=>{let l=s.target.selectedOption?.value;o.mode=l??"min-duration"}}>${[{mode:"min-duration",label:e.minDuration?.optionLabel},{mode:"total-duration",label:e.totalDuration?.optionLabel},{mode:"discrete",label:e.discrete?.optionLabel}].map(({mode:s,label:l})=>c`<calcite-option .selected=${s===r} .value=${s} .label=${l}></calcite-option>`)}</calcite-select>`}};function $(i){return Math.round(h(i,"milliseconds","minutes"))}y("arcgis-shadow-cast",f);return f},"analysis/ShadowCastAnalysis","core/accessorSupport/decorators","core/reactiveUtils","applications/Components/analysisUtils",a,d,e,f,i,j)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import b from"./
|
|
2
|
+
import b from"./SQSGXJ54.js";import a from"./R3NYK6BO.js";import{N as c,O as s,U as l,a as n,b as o}from"./ASNQKKPL.js";import"./3TTFCHAA.js";export default $arcgis.t(([{watch:g},{renderingSanitizer:m},,{f:h,q:r}])=>{var f=n`.loader-container{display:flex;align-items:center;justify-content:center;padding:0;height:150px}.root{font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-normal)}.root h1,.root h2,.root h3,.root h4,.root h5,.root h6{margin:var(--calcite-spacing-sm) 0;line-height:var(--calcite-font-line-height-relative-tight);letter-spacing:0;color:var(--calcite-color-text-1);font-weight:var(--calcite-font-weight-semibold)}.root h1{font-size:var(--calcite-font-size-xxl)}.root h2{font-size:var(--calcite-font-size-xl)}.root h3{font-size:var(--calcite-font-size-lg)}.root h4,.root h5,.root h6{font-size:var(--calcite-font-size)}.description{margin-bottom:var(--calcite-spacing-xs)}.root p{margin:0 0 var(--calcite-spacing-xs);font-size:var(--calcite-font-size)}.root p:last-child{margin-block-end:0}.root img{max-width:100%;max-height:100%;image-orientation:from-image}.root video{max-width:100%;max-height:100%}.root figure{margin:0;padding:0}.root figcaption{display:block;margin:var(--calcite-spacing-xs) 0 0;padding:0;font-size:var(--calcite-font-size-sm);font-style:italic}.root ul,.root ol{margin-block:var(--calcite-spacing-sm)}.root ul:first-child,.root ol:first-child{margin-block-start:0}.root a,.root a:hover,.root a:focus{color:var(--calcite-color-text-link)}`,a=class extends s{static{this.properties={_loadingPromise:16,_created:16,creator:1,destroyer:0,graphic:0}}static{this.styles=f}loaded(){this.manager.onLifecycle(()=>g(()=>this.creator,t=>{this._destroyContent(),this._createContent(t)},{initial:!0}))}async _createContent(t){let{graphic:e}=this;if(!e||!t)return;let i=r({type:"content",value:t,event:{graphic:e}});this._loadingPromise=i;let d=await i;i===this._loadingPromise&&(this._loadingPromise=void 0,this._created=d)}_destroyContent(){let{_created:t,graphic:e,destroyer:i}=this;t&&e&&(r({type:"content",value:i,event:{graphic:e}}),this._created=null)}_addTargetToAnchors(t){t&&Array.from(t.querySelectorAll("a")).forEach(e=>{h(e.href)&&!e.hasAttribute("target")&&e.setAttribute("target","_blank")})}render(){return o`<div class="root">${this._loadingPromise?this._renderLoading():this._renderCreated()}</div>`}_renderLoading(){return o`<div class="loader-container"><calcite-loader inline label></calcite-loader></div>`}_renderCreated(){let{_created:t}=this;return t instanceof HTMLElement?t:typeof t=="string"?o`<div .innerHTML=${m.sanitize(t)??""} ${c(this._addTargetToAnchors)}></div>`:null}};l("arcgis-feature-content",a);return a},"core/reactiveUtils","applications/Components/sanitizerUtils",a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as m}from"./
|
|
2
|
+
import{a as m}from"./PMJU3M4K.js";import{a as y}from"./54VXNFQ4.js";import b from"./ET7J5T6W.js";import{h as u}from"./KVXPMMSF.js";import"./CPZ76XWX.js";import a from"./DYTTT2ZE.js";import"./FDVDYQ7T.js";import{O as h,P as p,R as e,U as v,a as l,b as d,x as g}from"./ASNQKKPL.js";import"./3TTFCHAA.js";export default $arcgis.t(([{when:b},,{a:f}])=>{var $=l`.arcgis-button{--calcite-icon-color: var(--calcite-color-text-3);--calcite-button-background-color: var(--calcite-color-foreground-1);color:var(--calcite-color-text-3);line-height:var(--calcite-font-line-height-relative-tight);calcite-button{--calcite-offset-invert-focus: 1}display:flex;flex-flow:column;cursor:pointer;background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);:hover{--calcite-icon-color: var(--calcite-color-text-1);--calcite-button-background-color: var(--calcite-color-transparent-hover)}}:host{display:flex;inline-size:fit-content;block-size:fit-content}.root{--calcite-internal-action-bar-padding: 0;--calcite-internal-action-bar-gap: 0;--calcite-action-corner-radius: 0}`,o={pan:"move",rotate:"rotate"},c=class extends h{constructor(){super(...arguments),this._messages=m(),this._state="disabled",this.autoDestroyDisabled=!1,this.view=f(this),this.icon=o.pan,this.layout="vertical",this.navigationMode="pan",this.visualScale="m",this.arcgisPropertyChange=u()("layout","state"),this.arcgisReady=g()}static{this.properties={_state:16,autoDestroyDisabled:5,view:0,icon:1,label:1,layout:3,messageOverrides:0,navigationMode:3,referenceElement:1,state:35,visualScale:1}}static{this.styles=$}get state(){return this._state}async destroy(){await this.manager.destroy()}async toggle(){this.state!=="disabled"&&(this.navigationMode=this.navigationMode!=="pan"?"pan":"rotate")}load(){this.manager.onLifecycle(()=>[b(()=>this.view?.navigation?.actionMap,()=>this._updateNavigationActionMap()),b(()=>{let{view:t}=this;return t?.ready&&t?.type==="3d"?"ready":"disabled"},t=>{this._state=t},{sync:!0,initial:!0})])}willUpdate(t){t.has("navigationMode")&&this._updateNavigationActionMap()}_onPanClick(){this.navigationMode="pan"}_onRotateClick(){this.navigationMode="rotate"}_updateNavigationActionMap(){let t=this.view?.navigation?.actionMap;if(!t)return;let a=this.navigationMode==="pan";t.dragPrimary=a?"pan":"rotate",t.dragSecondary=a?"rotate":"pan"}render(){let{_messages:t,navigationMode:a,state:M}=this,s=t.pan??"",n=t.rotate??"",i=M==="disabled",r=a==="pan";return d`<calcite-action-bar class=${p({root:!0,[y.disabled]:i})} expand-disabled .layout=${this.layout}><calcite-action .active=${r} .disabled=${i} .icon=${o.pan} @click=${this._onPanClick} .scale=${this.visualScale} .text=${s} title=${s??e}></calcite-action><calcite-action .active=${!r} .disabled=${i} .icon=${o.rotate} @click=${this._onRotateClick} .scale=${this.visualScale} .text=${n} title=${n??e}></calcite-action></calcite-action-bar>`}};v("arcgis-navigation-toggle",c);return c},"core/reactiveUtils",a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{b as v}from"./4TLYAVND.js";import c from"./
|
|
2
|
+
import{b as v}from"./4TLYAVND.js";import c from"./SQSGXJ54.js";import b from"./R3NYK6BO.js";import a from"./YA4NYUQW.js";import{a as d}from"./PC4PAQXQ.js";import{O as x,U as k,a as T,b as o}from"./ASNQKKPL.js";import"./3TTFCHAA.js";export default $arcgis.t(([{watch:w,when:I},L,A,E,{compileExpression:J},{b:m,e:f},,{p:y}])=>{var b=T`.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}`,$=1,g=class extends x{constructor(){super(...arguments),this._compileThrottled=v(this._startCompile,$),this._evaluateThrottled=v(this._startEvaluate,$),this.headingLevel=2}static{this.properties={_compileTask:16,_evaluateTask:16,values:0,fieldInfoMap:0,expressionInfo:0,graphic:0,headingLevel:9,interceptor:0,location:0,messages:0,spatialReference:0,map:0,view:0}}static{this.styles=b}loaded(){this.manager.onLifecycle(()=>[w(()=>[this.expressionInfo,this.graphic],()=>this._compileThrottled(),{initial:!0}),I(()=>{if(!this._compileTask?.finished)return null;let t=this._compileTask.value,s=t?.dependencies,{view:e}=this;return[t,this.spatialReference,this.map,e,s?.has("view-scale")&&e&&"scale"in e?e.scale:null,s?.has("view-time-extent")?e?.timeExtent?.start:null,s?.has("view-time-extent")?e?.timeExtent?.end:null]},([t])=>this._evaluateThrottled(t)),{remove:()=>this._cancelThrottles()}])}_cancelThrottles(){this._compileThrottled.cancel(),this._evaluateThrottled.cancel()}_startCompile(){this._evaluateTask=d(this._evaluateTask),this._compileTask=d(this._compileTask),this._compileTask=f(async t=>{let{expressionInfo:s,graphic:e}=this,i=s?.expression;if(!i||!e)return null;let a=await J({expression:i,graphic:e});return m(t),a})}_startEvaluate(t){this._evaluateTask=d(this._evaluateTask),this._evaluateTask=f(async s=>{let{graphic:e}=this;if(!t||!e)return null;let{interceptor:i,spatialReference:a,map:r,location:c,view:l}=this,h=await t.evaluate({graphic:e,interceptor:i,location:c,map:r,options:{signal:s},spatialReference:a,view:l});m(s);let _=h&&"castAsJsonAsync"in h&&typeof h.castAsJsonAsync=="function"?h:null;if(!_)return null;let p=await _.castAsJsonAsync(s);m(s);let u=p?.type,n=u==="media"?L.fromJSON(p):u==="text"?E.fromJSON(p):u==="fields"?A.fromJSON(p):null;return!n||n.type==="media"&&!n.mediaInfos||n.type==="fields"&&!n.fieldInfos||n.type==="text"&&!n.text?null:n})}render(){let t=!this._compileTask?.finished||!this._evaluateTask?.finished;return o`<div class="root">${t?this._renderLoading():this._evaluateTask?.value?this._renderContent():null}</div>`}_renderContent(){let{values:t,fieldInfoMap:s}=this,e=this._evaluateTask?.value,i=e?.type,a={...t,...e?.attributes};if(!i)return null;if(i==="text"){let r=y({values:a,fieldInfoMap:s??new Map,globalValues:a,layer:void 0,text:e.text});return o`<arcgis-feature-content .creator=${r} .graphic=${this.graphic}></arcgis-feature-content>`}else if(i==="media"){let{title:r,description:c,mediaInfos:l}=e;return l?.length?o`<arcgis-feature-media .heading=${r??""} .values=${a} .formattedValues=${a} .description=${c??""} .mediaInfos=${l} .messages=${this.messages} .headingLevel=${this.headingLevel}></arcgis-feature-media>`:null}else if(i==="fields"){let{title:r,description:c,fieldInfos:l}=e;return l?.length?o`<arcgis-feature-fields .fieldInfos=${l} .heading=${r??""} .values=${a} .description=${c??""} .headingLevel=${this.headingLevel} .messages=${this.messages}></arcgis-feature-fields>`:null}return null}_renderLoading(){return o`<div class="loading-container"><calcite-loader inline label></calcite-loader></div>`}};k("arcgis-feature-expression",g);return g},"core/reactiveUtils","popup/content/MediaContent","popup/content/FieldsContent","popup/content/TextContent","applications/Components/arcadeFeatureUtils",a,b,c)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import a from"./
|
|
2
|
+
import a from"./YA4NYUQW.js";import"./PC4PAQXQ.js";import{a as C}from"./PMJU3M4K.js";import"./KVXPMMSF.js";import"./CPZ76XWX.js";import"./FDVDYQ7T.js";import{M as f,N as v,O as w,U as L,a as g,b as _,p as y,z as u}from"./ASNQKKPL.js";import"./3TTFCHAA.js";export default $arcgis.t(([{property:c,subclass:M},b,,G,{watch:m},{rotateDimensions:P,registerPanConstraint:I},z,,O,{b:d}])=>{var x=g`:host{height:100%;--arcgis-view-color-focus: none}`,A=Object.defineProperty,E=Object.getOwnPropertyDescriptor,h=(t,e,r,i)=>{for(var a=i>1?void 0:i?E(e,r):e,s=t.length-1,o;s>=0;s--)(o=t[s])&&(a=(i?o(e,r,a):o(a))||a);return i&&a&&A(e,r,a),a},n=class extends b{constructor(t){super(t),this.autoLoad=!1}static isNonPanoramicMedia(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&typeof t.declaredClass=="string"&&t.declaredClass==="components.oriented-imagery-viewer.support.NonPanoramicMedia"}destroy(){this._cache?.destroy(),this._cache=void 0}get layer(){return this._cache}get size(){if(!this._cache||this._cache.destroyed||this._cache.loadError||!this._cache.serviceRasterInfo)return;let{serviceRasterInfo:t}=this._cache;return[t.width,t.height]}async load(t){if(this._cache&&!this._cache.destroyed)return await this._cache.load(t),{layer:this._cache,size:this.size};let{url:e,customParameters:r}=this,i=this.datasetFormat;if(!e)throw new Error("URL is required to load NonPanoramicMedia.");if(!i){let o=await import("./3A4SIMPX.js").then(m=>m.default);if(d(t),i=o.guessExtensionFromURI(e),!i){try{i=await o.getDatasetFormat(e)}catch{y("warn",this,"Failed to determine dataset format from URL or response headers."),i="UNKNOWN FORMAT"}d(t)}}this.datasetFormat=i;let a=(await $arcgis.t(m=>m[0],"layers/ImageryTileLayer")).default;d(t);let s=new a({url:e,ioConfig:{skipExtensions:["aux.xml","jgw"],skipMapInfo:!0,datasetFormat:i},customParameters:r??void 0});return await s.load(t),d(t),this._cache=s,{layer:this._cache,size:this.size}}};h([c()],n.prototype,"_cache",2);h([c()],n.prototype,"autoLoad",2);h([c()],n.prototype,"customParameters",2);h([c()],n.prototype,"datasetFormat",2);h([c()],n.prototype,"url",2);h([c()],n.prototype,"layer",1);h([c()],n.prototype,"size",1);n=h([M("components.oriented-imagery-viewer.support.NonPanoramicMedia")],n);function F(t,e,r,i,a){let{width:s,height:o}=P(t,e,a);return Math.max(s/r,o/i)}var N=96,$=39.37,R=$*N;function j(t){let e=R*.25,r=R*t,i=[],a=r;for(;a>e;)i.push(a),a*=.5;i.push(e);let{lods:s}=z.create({scales:i});return{minScale:r,lods:s}}var l=class extends u{get graphics(){return this._graphicsLayer?.graphics}_ensureGraphicsLayer(){(!this._graphicsLayer||this._graphicsLayer.destroyed)&&(this._graphicsLayer=new O({title:"Overlays",listMode:"hide",visible:!0,blendMode:"source-atop"}))}hostLoaded(){this._ensureGraphicsLayer(),this.component.manager.onLifecycle(()=>[m(()=>this.component?.map,(e,r)=>{r?.layers.remove(this._graphicsLayer),e&&e?.layers.add(this._graphicsLayer)},{initial:!0,sync:!0}),m(()=>this.component?.map?.allLayers.length,e=>{e&&this.component?.map?.layers.reorder(this._graphicsLayer,e-1)},{initial:!0,sync:!0})])}addGraphic(e){this._graphicsLayer.add(e)}addGraphics(e){this._graphicsLayer.addMany(e)}removeGraphic(e){this._graphicsLayer?.destroyed||this._graphicsLayer.remove(e)}removeGraphics(e){this._graphicsLayer?.destroyed||this._graphicsLayer.removeMany(e)}clearGraphics(){this._graphicsLayer?.destroyed||this._graphicsLayer.removeAll()}destroy(){this._graphicsLayer?.destroy()}},p=class extends w{constructor(){super(...arguments),this._messages=C(),this._graphicsController=new l(this),this._imageChanged=!1,this._internalMap=f(),this._loading=!1,this.hideHeader=!1,this.hideLoader=!1,this.hideZoomControls=!1,this.messageOverrides=this._messages._overrides,this.rotation=0}static{this.properties={_imageChanged:16,_internalMap:16,_image:16,_loading:16,_media:16,hideHeader:5,hideLoader:5,hideZoomControls:5,messageOverrides:0,media:0,rotation:9}}static{this.styles=[x]}get imageRenderer(){return this._internalMap?.value?.view}get map(){return this.imageRenderer?.map}get media(){return this._media}set media(e){if(!e){this._mediaAbortController?.abort(),this._media=void 0,this._clearImage();return}this._media=e instanceof n?e:new n(e)}addGraphic(e){this._graphicsController.addGraphic(e)}addGraphics(e){this._graphicsController.addGraphics(e)}clearGraphics(){this._graphicsController.clearGraphics()}async mediaOnLoad(){return this._mediaPromise&&await this._mediaPromise,this._media}removeGraphic(e){this._graphicsController.removeGraphic(e)}removeGraphics(e){this._graphicsController.removeGraphics(e)}loaded(){this.manager.onLifecycle(()=>[this._createResizeConstraint(),this._createRotationHandler(),this._createPanConstraint(),m(()=>this._media,e=>{this._mediaAbortController?.abort(),e&&(this._mediaAbortController=new AbortController,this._mediaPromise=this._loadMediaInternal(e,this._mediaAbortController))},{initial:!0,sync:!0})])}_createPanConstraint(){return m(()=>({image:this._image,imageRenderer:this.imageRenderer}),({image:e,imageRenderer:r})=>{!e||!r?.ready||I(r,e)},{sync:!0,initial:!0})}_createResizeConstraint(){return m(()=>{if(!this.imageRenderer?.ready||!this._image)return;let{width:e,height:r}=this._image.serviceRasterInfo,{width:i,height:a,rotation:s}=this.imageRenderer;return F(e,r,i,a,s)},e=>{if(!e||!this.imageRenderer)return;let{constraints:r,scale:i}=this.imageRenderer,a=r.minScale,{lods:s,minScale:o}=j(e);r.set({minScale:o,lods:s}),this.imageRenderer.scale=this._imageChanged||Math.abs(i-a)<=1e-6?o:i,this._imageChanged=!1},{sync:!0,initial:!0})}_createRotationHandler(){return m(()=>this.rotation,e=>{this.imageRenderer&&(this.imageRenderer.constraints.rotationEnabled=!0,this.imageRenderer.rotation=e,this.imageRenderer.constraints.rotationEnabled=!1)},{sync:!0,initial:!0})}_clearImage(){this._image?.destroy(),this._image=void 0}async _loadMediaInternal(e,r){if(this._loading=!0,this._clearImage(),!e)throw new Error("No media provided");let{layer:i}=await e.load(r).finally(()=>{this._loading=!1});d(r),this._imageChanged=!0,this._image=i,this.imageRenderer?.map?.layers.add(this._image)}render(){return _`<calcite-panel .loading=${this.hideLoader?void 0:this._loading} .heading=${this.hideHeader?void 0:this._messages.title}><arcgis-map hide-attribution .spatialReference=${G.WebMercator} ${v(this._internalMap)}><arcgis-zoom .hidden=${this.hideZoomControls} slot=top-left></arcgis-zoom></arcgis-map></calcite-panel>`}};L("arcgis-oriented-imagery-viewer-image-viewer",p);return p},"core/accessorSupport/decorators","core/Accessor","views/MapView","geometry/SpatialReference","core/reactiveUtils","applications/Components/OrientedImageryViewer/ImageViewer/utils","layers/support/TileInfo","Graphic","layers/GraphicsLayer",a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as g}from"./
|
|
2
|
+
import{a as g}from"./PMJU3M4K.js";import{a as v}from"./54VXNFQ4.js";import c from"./ET7J5T6W.js";import{h}from"./KVXPMMSF.js";import"./CPZ76XWX.js";import b from"./DYTTT2ZE.js";import{d,f}from"./FDVDYQ7T.js";import{O as i,P as a,R as u,U as m,a as n,b as r,x as o}from"./ASNQKKPL.js";import"./3TTFCHAA.js";export default $arcgis.t(([,{a:p}])=>{var E=n`.arcgis-button{--calcite-icon-color: var(--calcite-color-text-3);--calcite-button-background-color: var(--calcite-color-foreground-1);color:var(--calcite-color-text-3);line-height:var(--calcite-font-line-height-relative-tight);calcite-button{--calcite-offset-invert-focus: 1}display:flex;flex-flow:column;cursor:pointer;background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);:hover{--calcite-icon-color: var(--calcite-color-text-1);--calcite-button-background-color: var(--calcite-color-transparent-hover)}}`;function x(l){return l.includes("#")||l.includes(".")||l.includes("[")?l:`#${l}`}var c=class extends i{constructor(){super(),this.messages=g(),this.view=p(this),this.visualScale="m",this.arcgisPropertyChange=h()("state"),this.arcgisReady=o(),this.listenOn(document,"fullscreenchange",()=>this.fullscreenElement=document.fullscreenElement)}static{this.properties={fullscreenElement:16,view:0,element:1,label:1,messageOverrides:0,referenceElement:1,visualScale:1,state:35}}static{this.styles=E}get fullscreenTitle(){let e=this.state;return e==="active"?this.messages.exit:e==="ready"?this.messages.enter:""}#e;get element(){return this.#e}set element(e){if(typeof e=="string"){let t=x(e),s=f(this.el,t);this.#e=s||void 0}else this.#e=e}get state(){if(!document.fullscreenEnabled)return"unsupported";let e=this._getElement();return e?this.fullscreenElement===e?"active":"ready":"disabled"}connectedCallback(){super.connectedCallback(),this.fullscreenElement=document.fullscreenElement}_getElement(){let e=this.view?.container,t=e?.getRootNode(),s=t instanceof ShadowRoot?t.host:null;return this.element??e?.parentElement??s??null}_toggle(){document.fullscreenElement?document.exitFullscreen():this._getElement()?.requestFullscreen()}render(){let{fullscreenTitle:e,state:t}=this,s=t==="unsupported",b=t==="ready"||t==="disabled"||t==="unsupported"?"zoom-out-fixed":"zoom-in-fixed";return r`<div class=${a(d("root",v.arcgisButton))}>${!s&&r`<calcite-button .disabled=${t==="disabled"} .iconStart=${b} kind=neutral .label=${e} @click=${this._toggle} .scale=${this.visualScale} title=${e??u}></calcite-button>`||""}</div>`}};m("arcgis-fullscreen",c);return c},b,c)
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as q}from"./
|
|
2
|
+
import{a as q}from"./3TQ5TC4S.js";import b from"./SQSGXJ54.js";import a from"./R3NYK6BO.js";import{e as D,f as O}from"./KVXPMMSF.js";import"./CPZ76XWX.js";import{g as H}from"./FDVDYQ7T.js";import{N as P,O as U,R as M,U as B,a as E,b as I}from"./ASNQKKPL.js";import"./3TTFCHAA.js";export default $arcgis.t(([{getColorsFromRenderer:re},{substitute:ne},{watch:se},oe,J,{renderingSanitizer:Q},,{e:C,f:j,g:V,h:G,i:K,j:W,l:L,n:F,o:k,p:R}])=>{var le=E`.container{display:flex;flex-flow:row wrap;align-items:center;margin-top:var(--calcite-spacing-xs);width:100%;min-height:150px}.container .pagination-button{display:flex;align-items:center;justify-content:center;border:none;background:transparent;cursor:pointer;padding-block:var(--calcite-spacing-xs);padding-inline:var(--calcite-spacing-xs);color:var(--calcite-color-text-3)}.container .pagination-button:hover,.container .pagination-button:focus{background-color:var(--calcite-color-foreground-3);color:var(--calcite-color-text-1);fill:var(--calcite-color-text-1)}.item-title{margin:0;font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-relative-snug)}.item-caption{padding-block-start:var(--calcite-spacing-xxs);font-size:var(--calcite-font-size-sm);line-height:var(--calcite-font-line-height-relative-snug)}.item{display:flex;align-items:flex-start;justify-content:center;margin-block:var(--calcite-spacing-xs);width:100%;height:auto}.item-navigation{display:flex;flex:0 1 100%;align-items:flex-start;justify-content:space-between;margin-block-end:var(--calcite-spacing-xs)}.item-text{margin-inline-end:var(--calcite-spacing-xs)}.pagination{display:flex;flex:0 0 auto;align-items:center;overflow:hidden}.pagination:only-child{margin-inline-start:auto}.pagination-text{padding-inline:var(--calcite-spacing-xxs);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm);line-height:var(--calcite-font-line-height-relative-normal)}.item-container{flex:0 1 auto;width:100%}.item-container img{max-width:100%}.item-container img[src$=".SVG"],.item-container img[src$=".svg"]{width:100%}.chart{width:100%;height:155px}`;function z(S){if(!C(S))return null;let[e,t]=S.split("/").slice(1);return{layerId:e,fieldName:t}}var X=15,w="category",A="value",ce="rgba(50, 50, 50, 1)",de=250,he=500,ue=200,N=class extends U{constructor(){super(...arguments),this._direction=O(),this._prefersReducedMotion=D("(prefers-reduced-motion)"),this.activeMediaInfoIndex=0,this.chartAnimationDisabled=!1,this.headingLevel=2}static{this.properties={_refreshIntervalInfo:16,messages:0,values:0,expressionValues:0,activeMediaInfoIndex:9,chartAnimationDisabled:5,activeMediaInfo:32,formattedMediaInfos:32,description:1,fieldInfoMap:0,layer:0,mediaInfos:0,popupTemplate:0,relatedInfos:0,formattedValues:0,heading:1,graphic:0,formattedMediaInfoCount:32,headingLevel:9}}static{this.styles=le}get activeMediaInfo(){return this.formattedMediaInfos[this.activeMediaInfoIndex]||null}get formattedMediaInfos(){return this._formatMediaInfos()||[]}get formattedMediaInfoCount(){return this.formattedMediaInfos.length}next(){this._pageContentElementMedia(1)}previous(){this._pageContentElementMedia(-1)}setActiveMedia(e){this._setContentElementMedia(e)}loaded(){this.manager.onLifecycle(()=>[se(()=>[this.activeMediaInfo,this.activeMediaInfoIndex],()=>this._setupMediaRefreshTimer(),{initial:!0}),{remove:()=>this._clearMediaRefreshTimer()}])}_setContentElementMedia(e){let{formattedMediaInfoCount:t}=this,i=(e+t)%t;this.activeMediaInfoIndex=i}_pageContentElementMedia(e){let{activeMediaInfoIndex:t}=this,i=t+e;this._setContentElementMedia(i)}_formatMediaInfos(){let{mediaInfos:e,layer:t}=this,i=this.values??{},a=this.formattedValues??{},s=this.fieldInfoMap??new Map,r=this.expressionValues??{};return e?.map(o=>{let n=o?.clone();if(!n)return null;if(n.title=R({values:i,fieldInfoMap:s,globalValues:a,layer:t,text:n.title}),n.caption=R({values:i,fieldInfoMap:s,globalValues:a,layer:t,text:n.caption}),n.altText=R({values:i,fieldInfoMap:s,globalValues:a,layer:t,text:n.altText}),n.type==="image"){if(!n.value)return null;let l=n.value;return this._setImageValue({value:l,formattedValues:a,layer:t}),l.sourceURL?n:void 0}if(n.type==="pie-chart"||n.type==="line-chart"||n.type==="column-chart"||n.type==="bar-chart"){if(!n.value)return null;let l=n.value;return this._setChartValue({value:l,chartType:n.type,values:i,expressionValues:r,formattedValues:a,layer:t}),n}return null}).filter(o=>o!=null)??[]}_setImageValue(e){let t=this.fieldInfoMap??new Map,{value:i,formattedValues:a,layer:s}=e,{linkURL:r,sourceURL:o}=i;if(o){let n=k(o,s);i.sourceURL=F({formattedValues:a,template:n,fieldInfoMap:t})}if(r){let n=k(r,s);i.linkURL=F({formattedValues:a,template:n,fieldInfoMap:t})}}_setChartValue(e){let{value:t,values:i,expressionValues:a,formattedValues:s,chartType:r,layer:o}=e,{popupTemplate:n,relatedInfos:l}=this,{fields:p,normalizeField:d}=t,c=o;if(t.fields=G(p,c),d&&(t.normalizeField=V(d,c)),!p.some(u=>!!(s[u]!=null||C(u)&&l?.size)))return;let m=n?.fieldInfos??[];t.series=[],p.forEach((u,g)=>{let h=t.colors?.[g];if(C(u)){t.series=[...t.series,...this._getRelatedChartInfos({fieldInfos:m,fieldName:u,formattedValues:s,expressionValues:a,chartType:r,value:t,color:h})];return}let v=this._getChartOption({value:t,values:i,chartType:r,formattedValues:s,expressionValues:a,fieldName:u,fieldInfos:m,color:h});t.series.push(v)})}_getRelatedChartInfos(e){let{fieldInfos:t,fieldName:i,formattedValues:a,chartType:s,value:r,color:o,expressionValues:n}=e,l=[],p=z(i),d=p&&this.relatedInfos?.get(p.layerId);if(!d)return l;let{relatedFeatures:c,relation:m}=d;if(!m||!c)return l;let{cardinality:u}=m;return c.forEach(g=>{let h=g.attributes;h&&Object.keys(h).forEach(v=>{v===p.fieldName&&l.push(this._getChartOption({value:r,values:h,formattedValues:a,expressionValues:n,fieldName:i,chartType:s,relatedFieldName:v,hasMultipleRelatedFeatures:c?.length>1,fieldInfos:t,color:o}))})}),u&&(u==="one-to-many"||u==="many-to-many")?l:[l[0]]}_getTooltip({label:e,value:t,chartType:i}){return i==="pie-chart"?`${e}`:`${e}: ${t}`}_getChartOption(e){let{value:t,values:i,formattedValues:a,expressionValues:s,fieldName:r,relatedFieldName:o,fieldInfos:n,chartType:l,hasMultipleRelatedFeatures:p,color:d}=e,{layer:c,graphic:m}=this,u=this.fieldInfoMap??new Map,{normalizeField:g,tooltipField:h}=t,v=g?C(g)?i[z(g).fieldName]:i[g]:null,x=K(r)&&s?.[r]!==void 0?s[r]:o&&i[o]!==void 0?i[o]:i[r]!==void 0?i[r]:a[r],_=x===void 0?null:x&&v&&typeof x=="number"&&typeof v=="number"?x/v:x,f=W(n,r),y=V(r,c),b=(h&&a[h]!==void 0?a[h]:L({fieldInfo:f||new oe({fieldName:y}),expressionInfos:this.popupTemplate?.expressionInfos,graphic:m,layer:c}))??"",Z=a[y]??"",Y=_!=null?typeof _=="number"?_:Number(_):null;if(C(r)){let T=u.get(r.toLowerCase()),ee=h?u.get(h.toLowerCase()):null,te=T?.fieldName??r,$=p&&h?z(h).fieldName:ee?.fieldName??h,ie=(p&&$?i[$]:a[$]??(T&&L({fieldInfo:T,layer:c,graphic:m}))??T?.fieldName??o)??"",ae=(p&&o?i[o]:a[te])??"";return new J({fieldName:r,tooltip:this._getTooltip({label:ie,value:ae,chartType:l}),color:d,value:Y})}return new J({fieldName:r,tooltip:this._getTooltip({label:b,value:Z,chartType:l}),color:d,value:Y})}_getRenderer(){let e=this.layer;return this.graphic?.isAggregate&&e?.featureReduction&&"renderer"in e.featureReduction?e.featureReduction.renderer:e?.renderer}async _getSeriesColors(e){let{color:t}=await import("./23N5RSQM.js"),i=new Map;return e.forEach(a=>{a.color&&i.set(a,t(a.color.toCss(!0)))}),i}async _getRendererColors(){let{color:e}=await import("./23N5RSQM.js"),t=new Map,i=this._getRenderer(),a="default";if(!i)return t;let s=await re(i);return s.delete(a),Array.from(s.values()).every(r=>r?.length===1)&&Array.from(s.keys()).forEach(r=>{let o=s.get(r)?.[0]?.toCss(!0);o&&t.set(r,e(o))}),t}async _createChart(e){let{activeMediaInfo:t}=this;if(!e||!t)return;let{createRoot:i}=await import("./7DGQHON2.js").then(m=>m.default.then(e=>({createRoot:e}))),a=await i(e);this._chartRoot=a,this._renderChart({mediaInfo:t,root:a})}_handleMediaKeyup(e){let{key:t}=e;t==="ArrowLeft"&&(e.stopPropagation(),this.previous()),t==="ArrowRight"&&(e.stopPropagation(),this.next())}_canAnimateChart(){return!this.chartAnimationDisabled&&!this._prefersReducedMotion}_getChartAnimationMS(){return this._canAnimateChart()?de:0}_getChartSeriesAnimationMS(){return this._canAnimateChart()?he:0}async _customizeChartTooltip(e,t="horizontal"){let{color:i}=await import("./23N5RSQM.js");e.setAll({pointerOrientation:t}),e.get("background")?.setAll({stroke:i(ce)}),e.label.setAll({direction:this._direction,oversizedBehavior:"wrap",maxWidth:ue})}async _createPieChart(e,t){let[{Tooltip:i},{PieChart:a,PieSeries:s}]=await Promise.all([import("./23N5RSQM.js"),import("./BLJAHET2.js")]),{mediaInfo:r,root:o}=e,{title:n}=r,l=5,p=r?.altText||r?.title||"",d=o.container.children.push(a.new(o,{role:"figure",ariaLabel:p,focusable:!0,paddingBottom:l,paddingTop:l,paddingLeft:l,paddingRight:l})),c=`{category}: {valuePercentTotal.formatNumber('0.00')}%
|
|
3
3
|
({value})`,m=i.new(o,{labelText:c}),u=d.series.push(s.new(o,{name:n,valueField:A,categoryField:w,tooltip:m}));u.ticks.template.set("forceHidden",!0),u.labels.template.set("forceHidden",!0),u.slices.template.states.create("active",{shiftRadius:l}),this._customizeChartTooltip(m),u.slices.template.setAll({ariaLabel:c,focusable:!0,templateField:"columnSettings"}),u.data.setAll(t),u.appear(this._getChartSeriesAnimationMS()),d.appear(this._getChartAnimationMS()),d.root.dom.classList.toggle("chart-rendered",!0)}_getMinSeriesValue(e){let t=0;return e.forEach(i=>t=Math.min(i.value,t)),t}async _createColumnChart(e,t,i){let[{Tooltip:a,Scrollbar:s},{CategoryAxis:r,AxisRendererX:o,AxisRendererY:n,ValueAxis:l,ColumnSeries:p}]=await Promise.all([import("./23N5RSQM.js"),import("./G4FCTRVU.js")]),{mediaInfo:d,root:c}=t,{value:m,title:u}=d,{_direction:g}=this;e.setAll({wheelX:"panX",wheelY:"zoomX"});let h=e.xAxes.push(r.new(c,{renderer:o.new(c,{inversed:g==="rtl"}),categoryField:w}));h.get("renderer").labels.template.setAll({forceHidden:!0});let v=e.yAxes.push(l.new(c,{renderer:n.new(c,{inside:!1}),min:this._getMinSeriesValue(m.series)}));v.get("renderer").labels.template.setAll({direction:g});let x="{categoryX}",_=a.new(c,{labelText:x}),f=e.series.push(p.new(c,{name:u,xAxis:h,yAxis:v,valueYField:A,categoryXField:w,tooltip:_}));this._customizeChartTooltip(_),f.columns.template.setAll({ariaLabel:x,focusable:!0,templateField:"columnSettings"}),m.series.length>X&&e.set("scrollbarX",s.new(c,{orientation:"horizontal"})),h.data.setAll(i),f.data.setAll(i),f.appear(this._getChartSeriesAnimationMS()),e.appear(this._getChartAnimationMS())}async _createBarChart(e,t,i){let[{Tooltip:a,Scrollbar:s},{CategoryAxis:r,AxisRendererX:o,AxisRendererY:n,ValueAxis:l,ColumnSeries:p}]=await Promise.all([import("./23N5RSQM.js"),import("./G4FCTRVU.js")]),{mediaInfo:d,root:c}=t,{value:m,title:u}=d,{_direction:g}=this;e.setAll({wheelX:"panY",wheelY:"zoomY"});let h=e.yAxes.push(r.new(c,{renderer:n.new(c,{inversed:!0}),categoryField:w}));h.get("renderer").labels.template.setAll({forceHidden:!0});let v=e.xAxes.push(l.new(c,{renderer:o.new(c,{inside:!1,inversed:g==="rtl"}),min:this._getMinSeriesValue(m.series)}));v.get("renderer").labels.template.setAll({direction:g});let x="{categoryY}",_=a.new(c,{labelText:x}),f=e.series.push(p.new(c,{name:u,xAxis:v,yAxis:h,valueXField:A,categoryYField:w,tooltip:_}));this._customizeChartTooltip(_,"vertical"),f.columns.template.setAll({ariaLabel:x,focusable:!0,templateField:"columnSettings"}),m.series.length>X&&e.set("scrollbarY",s.new(c,{orientation:"vertical"})),h.data.setAll(i),f.data.setAll(i),f.appear(this._getChartSeriesAnimationMS()),e.appear(this._getChartAnimationMS())}async _createLineChart(e,t,i){let[{Tooltip:a,Scrollbar:s},{CategoryAxis:r,AxisRendererX:o,AxisRendererY:n,ValueAxis:l,LineSeries:p}]=await Promise.all([import("./23N5RSQM.js"),import("./G4FCTRVU.js")]),{root:d,mediaInfo:c}=t,{value:m,title:u}=c,{_direction:g}=this;e.setAll({wheelX:"panX",wheelY:"zoomX"});let h=e.xAxes.push(r.new(d,{renderer:o.new(d,{inversed:g==="rtl"}),categoryField:w}));h.get("renderer").labels.template.setAll({forceHidden:!0});let v=e.yAxes.push(l.new(d,{renderer:n.new(d,{inside:!1}),min:this._getMinSeriesValue(m.series)}));v.get("renderer").labels.template.setAll({direction:g});let x="{categoryX}",_=i[0]?.lineSettings?.stroke,f=a.new(d,{getFillFromSprite:!_,labelText:x});_&&f.get("background")?.setAll({fill:_});let y=e.series.push(p.new(d,{name:u,xAxis:h,yAxis:v,valueYField:A,categoryXField:w,tooltip:f}));y.strokes.template.setAll({templateField:"lineSettings"}),this._customizeChartTooltip(f,"vertical"),m.series.length>X&&e.set("scrollbarX",s.new(d,{orientation:"horizontal"})),h.data.setAll(i),y.data.setAll(i),y.appear(this._getChartSeriesAnimationMS()),e.appear(this._getChartAnimationMS())}async _createXYChart(e,t){let{XYChart:i,XYCursor:a}=await import("./G4FCTRVU.js"),{root:s,mediaInfo:r}=e,{type:o}=r,n=r?.altText||r?.title||"",l=s.container.children.push(i.new(s,{role:"figure",ariaLabel:n,focusable:!0,panX:!0,panY:!0}));l.set("cursor",a.new(s,{})),o==="column-chart"&&await this._createColumnChart(l,e,t),o==="bar-chart"&&await this._createBarChart(l,e,t),o==="line-chart"&&await this._createLineChart(l,e,t),l.root.dom.classList.toggle("chart-rendered",!0)}_clearMediaRefreshTimer(){let{_refreshTimer:e}=this;e&&(clearTimeout(e),this._refreshTimer=void 0)}_updateMediaInfoTimestamp(e){let t=Date.now();this._refreshIntervalInfo={timestamp:t,sourceURL:e&&this._getImageSource(e,t)}}_setupMediaRefreshTimer(){this._clearMediaRefreshTimer();let{activeMediaInfo:e}=this;e?.type==="image"&&e.refreshInterval>0&&this._setRefreshTimeout(e)}_setRefreshTimeout(e){let{refreshInterval:t,value:i}=e,a=t*6e4;this._updateMediaInfoTimestamp(i.sourceURL);let s=window.setInterval(()=>{this._updateMediaInfoTimestamp(i.sourceURL)},a);this._refreshTimer=s}_getImageSource(e,t){let i=e.includes("?")?"&":"?",[a,s=""]=e.split("#");return`${a}${i}timestamp=${t}${s?"#":""}${s}`}_updateChartElement(e){this._chartRoot?.dispose(),this._chartRoot=void 0,e&&this._createChart(e)}render(){return I`<div class="root" @keyup=${this._handleMediaKeyup}><arcgis-feature-element-info .heading=${this.heading} .description=${this.description} .headingLevel=${this.headingLevel}></arcgis-feature-element-info>${this._renderMedia()}</div>`}_renderMedia(){let{formattedMediaInfoCount:e,activeMediaInfoIndex:t}=this,i=this._renderMediaText();return e?I`<div class="container">${this._renderMediaInfo()}<div class="item-navigation">${i}${e>1?I`<div class="pagination">${this._renderMediaPageButton("previous")}<span class="pagination-text">${ne(this.messages?.pageText??"",{index:t+1,total:e})}</span>${this._renderMediaPageButton("next")}</div>`:null}</div></div>`:null}_renderMediaText(){let{activeMediaInfo:e}=this;if(!e)return null;let t=e?.title?I`<div class="item-title" .innerHTML=${Q.sanitize(e.title)??""}></div>`:null,i=e?.caption?I`<div class="item-caption" .innerHTML=${Q.sanitize(e.caption)??""}></div>`:null;return t||i?I`<div class="item-text">${t}${i}</div>`:null}_renderImageMediaInfo(e){if(!e.value)return null;let{_refreshIntervalInfo:t}=this,{value:i,refreshInterval:a,altText:s,title:r}=e,{sourceURL:o,linkURL:n}=i,l=j(n??void 0)?"_blank":"_self",p=l==="_blank"?"noreferrer":"",d=a?t:null,c=d?d.sourceURL:o,m=I`<img alt=${(s||r)??M} src=${c??void 0??M}>`;return(n?I`<a href=${n??M} rel=${p??M} target=${l??M} title=${r??M}>${m}</a>`:null)??m}_renderChartMediaInfo(e){let{activeMediaInfoIndex:t,formattedMediaInfoCount:i}=this;return q(`media-${e.type}-${t}-${i}`,I`<div class="chart" ${P(this._updateChartElement)}></div>`)}_renderMediaInfoType(){let{activeMediaInfo:e}=this;return e?e.type==="image"?this._renderImageMediaInfo(e):e.type.includes("chart")?this._renderChartMediaInfo(e):null:null}_renderMediaInfo(){let{activeMediaInfo:e}=this;return e?I`<div class="item-container"><div class="item">${this._renderMediaInfoType()}</div></div>`:null}_renderMediaPageButton(e){if(this.formattedMediaInfoCount<2)return null;let t=e==="previous",i=t?this.messages?.previous??"":this.messages?.next??"",a=t?"chevron-left":"chevron-right",s=t?this.previous:this.next;return I`<button .ariaLabel=${i} class="pagination-button" @click=${s} tabindex=0 title=${i??M} type=button><calcite-icon flip-rtl class="pagination-icon" .icon=${a} scale=s></calcite-icon></button>`}async _renderChart(e){let{root:t,mediaInfo:i}=e,{value:a,type:s}=i,[{default:r},{default:o},{default:n},{esriChartColorSet:l},{ColorSet:p,Theme:d}]=await Promise.all([import("./AJTKCFGJ.js"),import("./INHQ3RYK.js"),import("./KZS3PUUX.js"),import("./WKTEY3AU.js"),import("./23N5RSQM.js")]),c=d.new(t);c.rule("ColorSet").set("colors",l),c.rule("ColorSet").set("reuse",!0);let m=[n.new(t),c];H(this.el)==="dark"&&m.push(o.new(t)),this._canAnimateChart()&&m.push(r.new(t)),t.setThemes(m);let u=await this._getRendererColors(),g=await this._getSeriesColors(a.series),h=p.new(t,{}),v=g.get(a.series[0]),x=v?{lineSettings:{stroke:v}}:void 0,_=a.series.map((f,y)=>{let b=g.get(f)||u.get(f.fieldName)||h.getIndex(y);return{[w]:f.tooltip,[A]:f.value,columnSettings:{fill:b,stroke:b},...x}}).filter(f=>s==="pie-chart"?f.value!=null&&f.value>0:!0);s==="pie-chart"?this._createPieChart(e,_):this._createXYChart(e,_)}};B("arcgis-feature-media",N);return N},"renderers/support/utils","intl","core/reactiveUtils","popup/FieldInfo","popup/content/support/ChartMediaInfoValueSeries","applications/Components/sanitizerUtils",a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import b from"./R3NYK6BO.js";import a from"./3Q6H4RYO.js";import"./PC4PAQXQ.js";import{a as N}from"./SL2D573Y.js";import{h as T}from"./DFXZ77W6.js";import"./LEIE3RAW.js";import"./PYF4Y6SP.js";import{N as h,O as k,U as S,a as f,b as r,p as d,r as y,s as _,x as l}from"./6MQTAMXU.js";import"./3TTFCHAA.js";export default $arcgis.t(([c,{watch:E},{substitute:I},x,U,F,v,A,{a:p},{a:C,b:g,d:m,e:L,f:$}])=>{var D=f`:host{height:100%;flex-grow:1}calcite-flow{min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-block-group{flex-grow:1;padding-bottom:var(--calcite-spacing-md);background-color:var(--calcite-color-foreground-1)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-block calcite-input{margin:0 var(--calcite-spacing-md)}calcite-block calcite-input-message{padding:var(--calcite-spacing-sm) var(--calcite-spacing-md) 0 var(--calcite-spacing-md)}calcite-notice{margin:var(--calcite-spacing-md)}#subnetwork-info-block{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0 var(--calcite-spacing-md)}#results-limited-message{padding:var(--calcite-spacing-sm)}.inline-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.add-spatial-mode{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);margin:var(--calcite-spacing-md)}.heading{color:var(--calcite-color-text-1);margin:0 0 var(--calcite-spacing-md) 0;font-size:var(--calcite-font-size);font-style:normal;font-weight:var(--calcite-font-weight-medium)}`,b=`utility-network-trace-inputs-sketch-${Date.now()}`,M=20,w=class extends k{constructor(){super(...arguments),this._defaultPopupTemplateEnabled=!0,this._messages=N({blocking:!0}),this._layerIdToLayer=new Map,this._startingPoints=new c,this._barriers=new c,this._stoppingPoints=new c,this._subnetworkTraceTypes=new Set(["subnetwork","subnetwork-controller","upstream","downstream","isolation"]),this._setUpMap=()=>{if(this._error=void 0,!this.view?.map){this._error=this._messages.errors.noView,this.utilityNetworks=void 0;return}let e=this.view.map;this._setupUtilityNetworks(e),this._setupSketchViewModel(e)},this._hitTestPromise=null,this._displayLimit=20,this._traceLocationStartingRefChange=e=>{e&&(this._traceLocationStartingElement=e)},this._traceLocationBarrierRefChange=e=>{e&&(this._traceLocationBarrierElement=e)},this._traceLocationStoppingRefChange=e=>{e&&(this._traceLocationStoppingElement=e)},this._featuresComponentRefChange=e=>{e&&(this._featuresComponentElement=e)},this._handleFeaturesPropertyChange=({detail:e,target:t})=>{(e.name==="selectedDrillInFeature"||e.name==="selectedFeature")&&(this.selectedFeature=t.selectedDrillInFeature??t.selectedFeature??void 0)},this.candidateFeatures=[],this.compatibleSubnetworkNames=[],this.traceConfigurations=[],this._subnetworkNamesState="ready",this._exceedDisplayLimit=!1,this.autoDestroyDisabled=!1,this.hideActionBar=!1,this.mode="default",this.arcgisPropertyChange=T()("mode"),this.arcgisSelectedNamedTraceConfigurationChange=l(),this.arcgisTraceInputsChange=l(),this.arcgisTraceLocationSelectEnd=l(),this.arcgisTraceLocationSelectStart=l(),this.arcgisUtilityNetworkChange=l()}static{this.properties={selectedFeature:16,candidateFeatures:16,compatibleSubnetworkNames:16,subnetworksTable:16,traceConfigurations:16,utilityNetworks:16,_unTraceConfiguration:16,_error:16,_subnetworkNamesState:16,_activeTraceLocationType:16,_exceedDisplayLimit:16,beforeTraceLocationSelectStart:0,view:0,selectedUtilityNetwork:0,selectedNamedTraceConfiguration:0,autoDestroyDisabled:5,hideActionBar:5,unTraceConfiguration:32,isSubnetworkNameTraceSelected:32,referenceElement:1,mode:3,traceLocationFlagInfos:32,traceLocations:32}}static{this.styles=D}get selectedSubnetworkName(){return this._unTraceConfiguration?.subnetworkName??void 0}set selectedSubnetworkName(e){this._unTraceConfiguration&&(this._unTraceConfiguration.subnetworkName=e)}get _allLayers(){let{view:e}=this;return e?.map?e.map.allLayers.toArray().concat(e.map.allTables.toArray()):[]}get showStartingPoints(){return!this.isSubnetworkNameTraceSelected}get showStoppingPoints(){let e=this.selectedNamedTraceConfiguration?.traceType;return e==="path"||e==="circuit"}get _subnetworkLayerIds(){let e=this.selectedUtilityNetwork?.dataElement?.domainNetworks;return e?e.map(t=>t.subnetworkLayerId).filter(t=>t!=null&&t>-1):[]}get unTraceConfiguration(){return this._unTraceConfiguration}get isSubnetworkNameTraceSelected(){let{selectedNamedTraceConfiguration:e}=this;return!!e?.traceConfiguration?.subnetworkName&&e?.traceType==="subnetwork"}get traceLocationFlagInfos(){return new c([...this._startingPoints,...this._barriers,...this._stoppingPoints])}get traceLocations(){let e=[];return this.showStartingPoints&&this._startingPoints.forEach(t=>e.push(...this._createTraceLocations(t))),this.showStoppingPoints&&this._stoppingPoints.forEach(t=>e.push(...this._createTraceLocations(t))),this._barriers.forEach(t=>e.push(...this._createTraceLocations(t))),e}async destroy(){this._removeGraphicLayer(b),this._clearTraceLocations(),this._sketchViewModel?.cancel(),this._featuresComponentElement?.destroy(),this._traceLocationStartingElement?.destroy(),this._traceLocationBarrierElement?.destroy(),this._traceLocationStoppingElement?.destroy(),await this.manager.destroy()}load(){this._setUpMap(),this.manager.onLifecycle(()=>[E(()=>this.view?.map,()=>this._setUpMap())])}willUpdate(e){e.has("utilityNetworks")&&this._handleUtilityNetworksChange(),e.has("selectedUtilityNetwork")&&(this.arcgisUtilityNetworkChange.emit(),this._handleSelectedUtilityNetworkChange()),e.has("selectedNamedTraceConfiguration")&&(this.arcgisTraceInputsChange.emit(),this.arcgisSelectedNamedTraceConfigurationChange.emit(),this._handleTraceConfigChange()),e.has("selectedSubnetworkName")&&this.arcgisTraceInputsChange.emit()}disconnectedCallback(){super.disconnectedCallback(),this._layerIdToLayer.clear()}_createTraceLocations(e){let t=e.flagProperties.selectedTerminals;return e.flagProperties.terminalConfiguration&&t?.size?Array.from(t,i=>new F({type:e.traceLocation.type,isFilterBarrier:e.traceLocation.isFilterBarrier,globalId:e.traceLocation.globalId,percentAlong:e.traceLocation.percentAlong,terminalId:i})):[e.traceLocation]}_clearTraceLocations(){this._startingPoints.forEach(e=>{e.spatialProperties.flagGraphic&&this.view?.graphics.remove(e.spatialProperties.flagGraphic)}),this._startingPoints.removeAll(),this._barriers.forEach(e=>{e.spatialProperties.flagGraphic&&this.view?.graphics.remove(e.spatialProperties.flagGraphic)}),this._barriers.removeAll(),this._stoppingPoints.forEach(e=>{e.spatialProperties.flagGraphic&&this.view?.graphics.remove(e.spatialProperties.flagGraphic)}),this._stoppingPoints.removeAll()}_createGraphicLayer(e,t){if(!e.findLayerById(t)){let i=new x({id:t,listMode:"hide",title:t});C(this.view,i)}}_getGraphicLayer(e,t){let i=e.findLayerById(t);return m(i)?(e.reorder(i,e.layers.length-1),i):null}_removeGraphicLayer(e){if(!this.view?.map)return;let{map:t}=this.view,i=t?.findLayerById(e);i&&m(i)&&t?.remove(i)}_setSnappingOption(){if(!this._sketchViewModel)return;let e=new c;this._unLayers?.forEach(t=>{L(t)?t.sublayers.forEach(i=>{e.add(new v({layer:i,enabled:!0}))}):e.add(new v({layer:t,enabled:!0}))}),this._sketchViewModel.snappingOptions={enabled:!1,featureSources:e}}_initializeSketchViewModel(e){let{view:t}=this,i=this._getGraphicLayer(e,b);return new A({layer:i,view:t})}_setupSketchViewModel(e){this._createGraphicLayer(e,b),this._sketchViewModel=this._initializeSketchViewModel(e),this._setSnappingOption()}_clearSubnetworks(){this.selectedSubnetworkName=void 0,this.subnetworksTable=void 0,this.compatibleSubnetworkNames=[]}async _loadSubnetworksTable(){this.subnetworksTable||(this.subnetworksTable=await this.selectedUtilityNetwork?.loadSubnetworksTable())}async _querySubnetworks(){let{subnetworksTable:e}=this;if(!e)return;let t=e.fieldsIndex.get("SUBNETWORKNAME"),i=(o,n,u)=>n===0||o.getAttribute(t.name)!==u[n-1].getAttribute(t.name),a=e.createQuery();a.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,a.where=this._getSubnetworkQueryWhereClause(),a.outFields=[t.name],a.orderByFields=[t.name];let{features:s}=await g(e,a,void 0,!1);this.compatibleSubnetworkNames=s.filter(i).map(o=>o.getAttribute(t.name))}_getSubnetworkQueryWhereClause(){let e=this._unTraceConfiguration,t=`DOMAINNETWORKNAME = '${e.domainNetworkName}'`,i=`TIERNAME = '${e.tierName}'`;return[t,i].join(" AND ")}async _handleSubnetworkTraceConfigChange(e){await this._loadSubnetworksTable(),await this._querySubnetworks();let{compatibleSubnetworkNames:t}=this;e.subnetworkName&&!t.some(i=>i===e.subnetworkName)&&(this.selectedSubnetworkName=t.at(0))}_selectTraceConfigurationByGuid(e){let t=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.find(i=>i.globalId===e);if(!t){d("error",this,"`traceConfig` not found in `selectedUtilityNetwork.sharedNamedTraceConfigurations`");return}this.selectedNamedTraceConfiguration=t}async _handleTraceConfigChange(){let{selectedNamedTraceConfiguration:e}=this;if(!(e?.traceConfiguration instanceof U)){d("error",this,y("selectedNamedTraceConfiguration.traceConfiguration")),this._unTraceConfiguration=void 0;return}this._unTraceConfiguration=e.traceConfiguration.clone(),this.isSubnetworkNameTraceSelected&&(this._subnetworkNamesState="loading",await this._handleSubnetworkTraceConfigChange(this._unTraceConfiguration),this._subnetworkNamesState="ready")}async _handleSelectedUtilityNetworkChange(){let{selectedUtilityNetwork:e}=this;try{e&&!e.loaded&&await e.load()}catch(t){p(t,this,"Error while loading the selected utility network")}this._clearSubnetworks(),this._setupTraceConfigurations(),this._filterUnLayers(),this._clearTraceLocations()}_setupTraceConfigurations(){this._unTraceConfiguration=void 0,this.selectedNamedTraceConfiguration=void 0,this.traceConfigurations=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.filter(Boolean).filter(e=>e.traceType!=="circuit").sort((e,t)=>e.title.localeCompare(t.title))||[],this.traceConfigurations.length?this.selectedNamedTraceConfiguration=this.traceConfigurations.at(0):d("error",this,"The selected utility network has no compatible named trace configurations.")}_filterUnLayers(){let{selectedUtilityNetwork:e}=this;this._unLayers=new c(this._allLayers.filter(t=>e?.isUtilityLayer(t)&&!this._subnetworkLayerIds.includes(t.layerId))),this._setSnappingOption()}_handleUtilityNetworksChange(){let{utilityNetworks:e,selectedUtilityNetwork:t}=this;e?.length?(!t||!e.includes(t))&&(this.selectedUtilityNetwork=e.at(0)):(d("error",this,_("utilityNetworks")),this.selectedUtilityNetwork=void 0,this._error=this._messages.errors.noUtilityNetwork)}async _setupUtilityNetworks(e){try{e.loaded||await e.load()}catch(t){p(t,this,"Error while loading `view.map`")}finally{this.utilityNetworks=e.utilityNetworks||new c}}_handleTraceLocationSelectStart(e){if(e.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(e.detail).defaultPrevented){e.preventDefault();return}this._activeTraceLocationType=e?.target?.traceLocationType,this.mode="add-spatial-instructions"}_getLayerByLayerId(e){if(e==null)return;let{_layerIdToLayer:t,_unLayers:i}=this;if(t.get(e))return t.get(e);if(!i)return;let a=i.find(s=>"layerId"in s&&s.layerId===e);return a&&t.set(e,a),a}async _queryFeaturesOnLayer(e,t){let i=e.createQuery();i.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,i.objectIds=t.map(s=>s.getObjectId()),i.outFields=["*"];let{features:a}=await g(e,i);return a.forEach(s=>{if(!s.getEffectivePopupTemplate(this._defaultPopupTemplateEnabled)){let o=s.layer;s.popupTemplate=o.createPopupTemplate()}}),a}async _queryFeatures(e){let t=new Map,i=[];return e.forEach(a=>{let s=$(a.layer)?a.layer.parent:a.layer;if(s){let o=this._getLayerByLayerId(s.layerId);if(o){let n=t.get(o)||[];n.push(a),t.set(o,n)}}}),await Promise.all(Array.from(t.keys()).map(async a=>{let s=t.get(a)??[],o=await this._queryFeaturesOnLayer(a,s);i.push(...o)})),i}async _handleHitTestComplete(e){return this._exceedDisplayLimit=e.length>this._displayLimit,this.candidateFeatures=await this._queryFeatures(e.slice(0,this._displayLimit)),this.candidateFeatures.length===0?(this._handleAddSpatialCancelClick(),await Promise.reject(Error("No features found"))):(this.candidateFeatures.length===1&&(this.selectedFeature=this.candidateFeatures.at(0)),this.mode="add-spatial-feature",this._hitTestPromise?.reject(),this._hitTestPromise=Promise.withResolvers(),await this._hitTestPromise.promise)}_handleTraceLocationSelectEnd(e){e.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit(),this._activeTraceLocationType=void 0,this.mode="default",this._handleAddSpatialCancelClick()}_handleAddSpatialCancelClick(e){e?.stopPropagation(),this._featuresComponentElement?.clear(),this._handleFeaturesClose(),this._sketchViewModel?.cancel()}_handleFeaturesClose(){this.mode="default",this.candidateFeatures=[],this.selectedFeature=void 0,this._hitTestPromise?.reject(),this._hitTestPromise=null}_handleAddSpatialAddClick(){let{_hitTestPromise:e,_featuresComponentElement:t,selectedFeature:i}=this;if(e&&t){if(!i)return;e.resolve(i),this._hitTestPromise=null}}renderError(e,t=!1,i){return r`<calcite-notice .closable=${t} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${e}</div></calcite-notice>`}renderLoader(){return r`<calcite-loader label=loading></calcite-loader>`}renderTraceSelection(){let e=this.traceConfigurations.map(i=>r`<calcite-combobox-item .value=${i.globalId} .heading=${i.title} .selected=${i.globalId===this.selectedNamedTraceConfiguration?.globalId}></calcite-combobox-item>`),t=this._messages.labels.traceConfiguration;return r`<calcite-block .heading=${t} .label=${t} expanded><calcite-combobox .label=${t} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{this._selectTraceConfigurationByGuid(i.selectedItems[0]?.value)}}>${e}</calcite-combobox></calcite-block>`}renderUtilityNetworkSelection(){let{_messages:e}=this,t=e.labels.utilityNetwork,i=this.utilityNetworks?.map(a=>r`<calcite-combobox-item .value=${a.id} .heading=${a.title||a.id} .selected=${a.id===this.selectedUtilityNetwork?.id}></calcite-combobox-item>`);return r`<calcite-block .heading=${t} .label=${t} expanded><calcite-combobox .label=${t} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:a})=>{let s=a.selectedItems[0]?.value;this.selectedUtilityNetwork?.id!==s&&(this.selectedUtilityNetwork=this.utilityNetworks?.find(o=>o.id===s))}}>${i}</calcite-combobox></calcite-block>`}renderDefaultMode(){let{selectedUtilityNetwork:e}=this,{noView:t,noUtilityNetwork:i}=this._messages.errors,a;return this._error===t||this._error===i?a=this.renderError(this._error,!1,"exclamation-mark-triangle"):!e?.loaded&&!e?.loadError?a=this.renderLoader():a=this.renderContent(),r`<calcite-flow-item .selected=${this.mode==="default"}>${a}</calcite-flow-item>`}renderSpatialSelectInstructions(){let{_messages:e,_activeTraceLocationType:t,mode:i}=this,a=t==="starting-point"?e.labels.addSpatial.startingPoint:t==="barrier"?e.labels.addSpatial.barrier:e.labels.addSpatial.stoppingPoint;return r`<calcite-flow-item .selected=${i==="add-spatial-instructions"} .heading=${a} @calciteFlowItemBack=${s=>this._handleAddSpatialCancelClick(s)}><div class="add-spatial-mode"><div><h5 class="heading">${e.instructions.addSpatial.selectFeature.heading}</h5>${e.instructions.addSpatial.selectFeature.subheading}</div><div><h5 class="heading">${e.instructions.addSpatial.selectAssociatedFeature.heading}</h5>${e.instructions.addSpatial.selectAssociatedFeature.subheading}</div></div></calcite-flow-item>`}renderCandidateFeatures(){let{candidateFeatures:e}=this;if(!e.length)return this.mode="default",null;let t=this._activeTraceLocationType==="starting-point"?this._messages.labels.addSpatial.startingPoint:this._activeTraceLocationType==="barrier"?this._messages.labels.addSpatial.barrier:this._messages.labels.addSpatial.stoppingPoint,i=e.length===1?"feature":"list";return r`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this._defaultPopupTemplateEnabled} .features=${e} .featureMenuTitle=${t} .hideActionBar=${this.hideActionBar} hide-select-feature .initialDisplayMode=${i} @arcgisClose=${()=>this._handleFeaturesClose()} @arcgisPropertyChange=${this._handleFeaturesPropertyChange} open .referenceElement=${this.referenceElement} .view=${this.view} ${h(this._featuresComponentRefChange)}></arcgis-features-next>`}renderAddSpatialFooter(){let{mode:e,_messages:t,selectedFeature:i,selectedUtilityNetwork:a}=this,s=e==="add-spatial-feature"&&this._exceedDisplayLimit&&!i,o=I(t.warnings.exceededDisplayLimit,{limit:this._displayLimit.toString()}),n=i?!(a?.isUtilityLayer(i.layer)??!0):!0;return r`${s&&r`<calcite-input-message id=results-limited-message icon=exclamation-mark-circle status=idle>${o}</calcite-input-message>`||""}<calcite-button appearance=outline width=full @click=${()=>this._handleAddSpatialCancelClick()} slot=footer>${t.buttons.cancel}</calcite-button>${e==="add-spatial-feature"&&r`<calcite-button width=full slot=footer appearance=solid @click=${()=>this._handleAddSpatialAddClick()} .disabled=${n}>${t.buttons.add}</calcite-button>`||""}`}renderStartingPointSelection(){return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=starting-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this._unLayers} .traceLocations=${this._startingPoints} .afterHitTest=${this._handleHitTestComplete.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this._traceLocationStartingRefChange)}></arcgis-utility-network-trace-location>`}renderStoppingPointSelection(){return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=stopping-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this._unLayers} .traceLocations=${this._stoppingPoints} .afterHitTest=${this._handleHitTestComplete.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this._traceLocationStoppingRefChange)}></arcgis-utility-network-trace-location>`}renderBarrierSelection(){return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=barrier .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this._unLayers} .traceLocations=${this._barriers} .afterHitTest=${this._handleHitTestComplete.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this._traceLocationBarrierRefChange)}></arcgis-utility-network-trace-location>`}renderSubnetworkNameInput(){return r`<calcite-input clearable type=text .placeholder=${this._messages.instructions.enterSubnetworkName} max-length=64 .status=${this.selectedSubnetworkName?"valid":"invalid"} .value=${this.selectedSubnetworkName} @calciteInputInput=${e=>this.selectedSubnetworkName=e.target.value}></calcite-input><calcite-input-message icon=exclamation-mark-triangle status=idle>${this._messages.labels.tooManySubnetworks}</calcite-input-message>`}renderSubnetworkSelectList(){return r`<calcite-combobox .label=${this._messages.labels.subnetworkName} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:e})=>{this.selectedSubnetworkName=e.selectedItems[0]?.value}}>${this.compatibleSubnetworkNames.map(e=>r`<calcite-combobox-item .value=${e} .heading=${e} .selected=${e===this.selectedSubnetworkName}></calcite-combobox-item>`)}</calcite-combobox>`}renderSubnetworkSelection(){let{compatibleSubnetworkNames:e}=this,t=this._messages.labels.subnetworkName;return this.isSubnetworkNameTraceSelected?this._subnetworkNamesState==="loading"?r`<calcite-loader class="inline-loader" label=loading scale=s></calcite-loader>`:e.length?r`<calcite-block .heading=${t} .label=${t} expanded>${e.length>M?this.renderSubnetworkNameInput():this.renderSubnetworkSelectList()}</calcite-block>`:this.renderError(this._messages.errors.noCompatibleSubnetworks,!1,"exclamation-mark-triangle"):null}renderSubnetworkInfo(){let{_messages:e,selectedNamedTraceConfiguration:t,_unTraceConfiguration:i}=this;return i&&t?.traceType&&this._subnetworkTraceTypes.has(t.traceType)?r`<calcite-block id=subnetwork-info-block expanded .label=${e.labels.subnetworkInfo}><arcgis-utility-network-subnetwork-info .namedTraceConfig=${t}></arcgis-utility-network-subnetwork-info></calcite-block>`:null}renderContent(){let{utilityNetworks:e,unTraceConfiguration:t}=this,{noTraceConfiguration:i,noNamedTraceConfigurations:a,utilityNetworkLoadFailed:s}=this._messages.errors,o=e&&e.length>1?this.renderUtilityNetworkSelection():null,n;this.selectedUtilityNetwork?.loadError?n=this.renderError(s,!1,"exclamation-mark-triangle"):this.traceConfigurations.length||(n=this.renderError(a,!1,"exclamation-mark-triangle"));let u=r`${this.renderTraceSelection()}${this.renderSubnetworkInfo()}${this.renderSubnetworkSelection()}`,P=t?r`${this.showStartingPoints?this.renderStartingPointSelection():null}${this.showStoppingPoints?this.renderStoppingPointSelection():null}${this.renderBarrierSelection()}`:this.renderError(i,!1,"exclamation-mark-triangle");return r`<calcite-block-group .label=${this._messages.labels.traceInputs}>${o}${n??r`${u}${P}`}</calcite-block-group>`}render(){let{mode:e}=this;return r`<calcite-panel>${e==="add-spatial-feature"?this.renderCandidateFeatures():null}<calcite-flow .hidden=${e==="add-spatial-feature"}>${this.renderDefaultMode()}${this.renderSpatialSelectInstructions()}</calcite-flow>${e!=="default"?this.renderAddSpatialFooter():null}</calcite-panel>`}};S("arcgis-utility-network-trace-inputs",w);return w},"core/Collection","core/reactiveUtils","intl","layers/GraphicsLayer","networks/support/UNTraceConfiguration","rest/networks/support/TraceLocation","views/interactive/snapping/FeatureSnappingLayerSource","widgets/Sketch/SketchViewModel",a,b)
|
|
2
|
+
import b from"./R3NYK6BO.js";import a from"./YA4NYUQW.js";import"./PC4PAQXQ.js";import{a as N}from"./PMJU3M4K.js";import{h as T}from"./KVXPMMSF.js";import"./CPZ76XWX.js";import"./FDVDYQ7T.js";import{N as h,O as k,U as S,a as f,b as r,p as d,r as y,s as _,x as l}from"./ASNQKKPL.js";import"./3TTFCHAA.js";export default $arcgis.t(([c,{watch:E},{substitute:I},x,U,F,v,A,{a:p},{a:C,b:g,d:m,e:L,f:$}])=>{var D=f`:host{height:100%;flex-grow:1}calcite-flow{min-height:var(--arcgis-internal-panel-height-sm, 240px)}calcite-block-group{flex-grow:1;padding-bottom:var(--calcite-spacing-md);background-color:var(--calcite-color-foreground-1)}calcite-block{--calcite-block-content-space: 0;--calcite-block-border-color: transparent;margin:0}calcite-block calcite-combobox,calcite-block calcite-input{margin:0 var(--calcite-spacing-md)}calcite-block calcite-input-message{padding:var(--calcite-spacing-sm) var(--calcite-spacing-md) 0 var(--calcite-spacing-md)}calcite-notice{margin:var(--calcite-spacing-md)}#subnetwork-info-block{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) 0 var(--calcite-spacing-md)}#results-limited-message{padding:var(--calcite-spacing-sm)}.inline-loader{--calcite-loader-spacing: var(--calcite-spacing-md)}.add-spatial-mode{display:flex;flex-direction:column;gap:var(--calcite-spacing-md);margin:var(--calcite-spacing-md)}.heading{color:var(--calcite-color-text-1);margin:0 0 var(--calcite-spacing-md) 0;font-size:var(--calcite-font-size);font-style:normal;font-weight:var(--calcite-font-weight-medium)}`,b=`utility-network-trace-inputs-sketch-${Date.now()}`,M=20,w=class extends k{constructor(){super(...arguments),this._defaultPopupTemplateEnabled=!0,this._messages=N({blocking:!0}),this._layerIdToLayer=new Map,this._startingPoints=new c,this._barriers=new c,this._stoppingPoints=new c,this._subnetworkTraceTypes=new Set(["subnetwork","subnetwork-controller","upstream","downstream","isolation"]),this._setUpMap=()=>{if(this._error=void 0,!this.view?.map){this._error=this._messages.errors.noView,this.utilityNetworks=void 0;return}let e=this.view.map;this._setupUtilityNetworks(e),this._setupSketchViewModel(e)},this._hitTestPromise=null,this._displayLimit=20,this._traceLocationStartingRefChange=e=>{e&&(this._traceLocationStartingElement=e)},this._traceLocationBarrierRefChange=e=>{e&&(this._traceLocationBarrierElement=e)},this._traceLocationStoppingRefChange=e=>{e&&(this._traceLocationStoppingElement=e)},this._featuresComponentRefChange=e=>{e&&(this._featuresComponentElement=e)},this._handleFeaturesPropertyChange=({detail:e,target:t})=>{(e.name==="selectedDrillInFeature"||e.name==="selectedFeature")&&(this.selectedFeature=t.selectedDrillInFeature??t.selectedFeature??void 0)},this.candidateFeatures=[],this.compatibleSubnetworkNames=[],this.traceConfigurations=[],this._subnetworkNamesState="ready",this._exceedDisplayLimit=!1,this.autoDestroyDisabled=!1,this.hideActionBar=!1,this.mode="default",this.arcgisPropertyChange=T()("mode"),this.arcgisSelectedNamedTraceConfigurationChange=l(),this.arcgisTraceInputsChange=l(),this.arcgisTraceLocationSelectEnd=l(),this.arcgisTraceLocationSelectStart=l(),this.arcgisUtilityNetworkChange=l()}static{this.properties={selectedFeature:16,candidateFeatures:16,compatibleSubnetworkNames:16,subnetworksTable:16,traceConfigurations:16,utilityNetworks:16,_unTraceConfiguration:16,_error:16,_subnetworkNamesState:16,_activeTraceLocationType:16,_exceedDisplayLimit:16,beforeTraceLocationSelectStart:0,view:0,selectedUtilityNetwork:0,selectedNamedTraceConfiguration:0,autoDestroyDisabled:5,hideActionBar:5,unTraceConfiguration:32,isSubnetworkNameTraceSelected:32,referenceElement:1,mode:3,traceLocationFlagInfos:32,traceLocations:32}}static{this.styles=D}get selectedSubnetworkName(){return this._unTraceConfiguration?.subnetworkName??void 0}set selectedSubnetworkName(e){this._unTraceConfiguration&&(this._unTraceConfiguration.subnetworkName=e)}get _allLayers(){let{view:e}=this;return e?.map?e.map.allLayers.toArray().concat(e.map.allTables.toArray()):[]}get showStartingPoints(){return!this.isSubnetworkNameTraceSelected}get showStoppingPoints(){let e=this.selectedNamedTraceConfiguration?.traceType;return e==="path"||e==="circuit"}get _subnetworkLayerIds(){let e=this.selectedUtilityNetwork?.dataElement?.domainNetworks;return e?e.map(t=>t.subnetworkLayerId).filter(t=>t!=null&&t>-1):[]}get unTraceConfiguration(){return this._unTraceConfiguration}get isSubnetworkNameTraceSelected(){let{selectedNamedTraceConfiguration:e}=this;return!!e?.traceConfiguration?.subnetworkName&&e?.traceType==="subnetwork"}get traceLocationFlagInfos(){return new c([...this._startingPoints,...this._barriers,...this._stoppingPoints])}get traceLocations(){let e=[];return this.showStartingPoints&&this._startingPoints.forEach(t=>e.push(...this._createTraceLocations(t))),this.showStoppingPoints&&this._stoppingPoints.forEach(t=>e.push(...this._createTraceLocations(t))),this._barriers.forEach(t=>e.push(...this._createTraceLocations(t))),e}async destroy(){this._removeGraphicLayer(b),this._clearTraceLocations(),this._sketchViewModel?.cancel(),this._featuresComponentElement?.destroy(),this._traceLocationStartingElement?.destroy(),this._traceLocationBarrierElement?.destroy(),this._traceLocationStoppingElement?.destroy(),await this.manager.destroy()}load(){this._setUpMap(),this.manager.onLifecycle(()=>[E(()=>this.view?.map,()=>this._setUpMap())])}willUpdate(e){e.has("utilityNetworks")&&this._handleUtilityNetworksChange(),e.has("selectedUtilityNetwork")&&(this.arcgisUtilityNetworkChange.emit(),this._handleSelectedUtilityNetworkChange()),e.has("selectedNamedTraceConfiguration")&&(this.arcgisTraceInputsChange.emit(),this.arcgisSelectedNamedTraceConfigurationChange.emit(),this._handleTraceConfigChange()),e.has("selectedSubnetworkName")&&this.arcgisTraceInputsChange.emit()}disconnectedCallback(){super.disconnectedCallback(),this._layerIdToLayer.clear()}_createTraceLocations(e){let t=e.flagProperties.selectedTerminals;return e.flagProperties.terminalConfiguration&&t?.size?Array.from(t,i=>new F({type:e.traceLocation.type,isFilterBarrier:e.traceLocation.isFilterBarrier,globalId:e.traceLocation.globalId,percentAlong:e.traceLocation.percentAlong,terminalId:i})):[e.traceLocation]}_clearTraceLocations(){this._startingPoints.forEach(e=>{e.spatialProperties.flagGraphic&&this.view?.graphics.remove(e.spatialProperties.flagGraphic)}),this._startingPoints.removeAll(),this._barriers.forEach(e=>{e.spatialProperties.flagGraphic&&this.view?.graphics.remove(e.spatialProperties.flagGraphic)}),this._barriers.removeAll(),this._stoppingPoints.forEach(e=>{e.spatialProperties.flagGraphic&&this.view?.graphics.remove(e.spatialProperties.flagGraphic)}),this._stoppingPoints.removeAll()}_createGraphicLayer(e,t){if(!e.findLayerById(t)){let i=new x({id:t,listMode:"hide",title:t});C(this.view,i)}}_getGraphicLayer(e,t){let i=e.findLayerById(t);return m(i)?(e.reorder(i,e.layers.length-1),i):null}_removeGraphicLayer(e){if(!this.view?.map)return;let{map:t}=this.view,i=t?.findLayerById(e);i&&m(i)&&t?.remove(i)}_setSnappingOption(){if(!this._sketchViewModel)return;let e=new c;this._unLayers?.forEach(t=>{L(t)?t.sublayers.forEach(i=>{e.add(new v({layer:i,enabled:!0}))}):e.add(new v({layer:t,enabled:!0}))}),this._sketchViewModel.snappingOptions={enabled:!1,featureSources:e}}_initializeSketchViewModel(e){let{view:t}=this,i=this._getGraphicLayer(e,b);return new A({layer:i,view:t})}_setupSketchViewModel(e){this._createGraphicLayer(e,b),this._sketchViewModel=this._initializeSketchViewModel(e),this._setSnappingOption()}_clearSubnetworks(){this.selectedSubnetworkName=void 0,this.subnetworksTable=void 0,this.compatibleSubnetworkNames=[]}async _loadSubnetworksTable(){this.subnetworksTable||(this.subnetworksTable=await this.selectedUtilityNetwork?.loadSubnetworksTable())}async _querySubnetworks(){let{subnetworksTable:e}=this;if(!e)return;let t=e.fieldsIndex.get("SUBNETWORKNAME"),i=(o,n,u)=>n===0||o.getAttribute(t.name)!==u[n-1].getAttribute(t.name),a=e.createQuery();a.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,a.where=this._getSubnetworkQueryWhereClause(),a.outFields=[t.name],a.orderByFields=[t.name];let{features:s}=await g(e,a,void 0,!1);this.compatibleSubnetworkNames=s.filter(i).map(o=>o.getAttribute(t.name))}_getSubnetworkQueryWhereClause(){let e=this._unTraceConfiguration,t=`DOMAINNETWORKNAME = '${e.domainNetworkName}'`,i=`TIERNAME = '${e.tierName}'`;return[t,i].join(" AND ")}async _handleSubnetworkTraceConfigChange(e){await this._loadSubnetworksTable(),await this._querySubnetworks();let{compatibleSubnetworkNames:t}=this;e.subnetworkName&&!t.some(i=>i===e.subnetworkName)&&(this.selectedSubnetworkName=t.at(0))}_selectTraceConfigurationByGuid(e){let t=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.find(i=>i.globalId===e);if(!t){d("error",this,"`traceConfig` not found in `selectedUtilityNetwork.sharedNamedTraceConfigurations`");return}this.selectedNamedTraceConfiguration=t}async _handleTraceConfigChange(){let{selectedNamedTraceConfiguration:e}=this;if(!(e?.traceConfiguration instanceof U)){d("error",this,y("selectedNamedTraceConfiguration.traceConfiguration")),this._unTraceConfiguration=void 0;return}this._unTraceConfiguration=e.traceConfiguration.clone(),this.isSubnetworkNameTraceSelected&&(this._subnetworkNamesState="loading",await this._handleSubnetworkTraceConfigChange(this._unTraceConfiguration),this._subnetworkNamesState="ready")}async _handleSelectedUtilityNetworkChange(){let{selectedUtilityNetwork:e}=this;try{e&&!e.loaded&&await e.load()}catch(t){p(t,this,"Error while loading the selected utility network")}this._clearSubnetworks(),this._setupTraceConfigurations(),this._filterUnLayers(),this._clearTraceLocations()}_setupTraceConfigurations(){this._unTraceConfiguration=void 0,this.selectedNamedTraceConfiguration=void 0,this.traceConfigurations=this.selectedUtilityNetwork?.sharedNamedTraceConfigurations.filter(Boolean).filter(e=>e.traceType!=="circuit").sort((e,t)=>e.title.localeCompare(t.title))||[],this.traceConfigurations.length?this.selectedNamedTraceConfiguration=this.traceConfigurations.at(0):d("error",this,"The selected utility network has no compatible named trace configurations.")}_filterUnLayers(){let{selectedUtilityNetwork:e}=this;this._unLayers=new c(this._allLayers.filter(t=>e?.isUtilityLayer(t)&&!this._subnetworkLayerIds.includes(t.layerId))),this._setSnappingOption()}_handleUtilityNetworksChange(){let{utilityNetworks:e,selectedUtilityNetwork:t}=this;e?.length?(!t||!e.includes(t))&&(this.selectedUtilityNetwork=e.at(0)):(d("error",this,_("utilityNetworks")),this.selectedUtilityNetwork=void 0,this._error=this._messages.errors.noUtilityNetwork)}async _setupUtilityNetworks(e){try{e.loaded||await e.load()}catch(t){p(t,this,"Error while loading `view.map`")}finally{this.utilityNetworks=e.utilityNetworks||new c}}_handleTraceLocationSelectStart(e){if(e.stopPropagation(),this.arcgisTraceLocationSelectStart.emit(e.detail).defaultPrevented){e.preventDefault();return}this._activeTraceLocationType=e?.target?.traceLocationType,this.mode="add-spatial-instructions"}_getLayerByLayerId(e){if(e==null)return;let{_layerIdToLayer:t,_unLayers:i}=this;if(t.get(e))return t.get(e);if(!i)return;let a=i.find(s=>"layerId"in s&&s.layerId===e);return a&&t.set(e,a),a}async _queryFeaturesOnLayer(e,t){let i=e.createQuery();i.gdbVersion=this.selectedUtilityNetwork?.gdbVersion,i.objectIds=t.map(s=>s.getObjectId()),i.outFields=["*"];let{features:a}=await g(e,i);return a.forEach(s=>{if(!s.getEffectivePopupTemplate(this._defaultPopupTemplateEnabled)){let o=s.layer;s.popupTemplate=o.createPopupTemplate()}}),a}async _queryFeatures(e){let t=new Map,i=[];return e.forEach(a=>{let s=$(a.layer)?a.layer.parent:a.layer;if(s){let o=this._getLayerByLayerId(s.layerId);if(o){let n=t.get(o)||[];n.push(a),t.set(o,n)}}}),await Promise.all(Array.from(t.keys()).map(async a=>{let s=t.get(a)??[],o=await this._queryFeaturesOnLayer(a,s);i.push(...o)})),i}async _handleHitTestComplete(e){return this._exceedDisplayLimit=e.length>this._displayLimit,this.candidateFeatures=await this._queryFeatures(e.slice(0,this._displayLimit)),this.candidateFeatures.length===0?(this._handleAddSpatialCancelClick(),await Promise.reject(Error("No features found"))):(this.candidateFeatures.length===1&&(this.selectedFeature=this.candidateFeatures.at(0)),this.mode="add-spatial-feature",this._hitTestPromise?.reject(),this._hitTestPromise=Promise.withResolvers(),await this._hitTestPromise.promise)}_handleTraceLocationSelectEnd(e){e.stopPropagation(),this.arcgisTraceLocationSelectEnd.emit(),this._activeTraceLocationType=void 0,this.mode="default",this._handleAddSpatialCancelClick()}_handleAddSpatialCancelClick(e){e?.stopPropagation(),this._featuresComponentElement?.clear(),this._handleFeaturesClose(),this._sketchViewModel?.cancel()}_handleFeaturesClose(){this.mode="default",this.candidateFeatures=[],this.selectedFeature=void 0,this._hitTestPromise?.reject(),this._hitTestPromise=null}_handleAddSpatialAddClick(){let{_hitTestPromise:e,_featuresComponentElement:t,selectedFeature:i}=this;if(e&&t){if(!i)return;e.resolve(i),this._hitTestPromise=null}}renderError(e,t=!1,i){return r`<calcite-notice .closable=${t} kind=danger open scale=s width=auto .icon=${i}><div slot=message>${e}</div></calcite-notice>`}renderLoader(){return r`<calcite-loader label=loading></calcite-loader>`}renderTraceSelection(){let e=this.traceConfigurations.map(i=>r`<calcite-combobox-item .value=${i.globalId} .heading=${i.title} .selected=${i.globalId===this.selectedNamedTraceConfiguration?.globalId}></calcite-combobox-item>`),t=this._messages.labels.traceConfiguration;return r`<calcite-block .heading=${t} .label=${t} expanded><calcite-combobox .label=${t} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:i})=>{this._selectTraceConfigurationByGuid(i.selectedItems[0]?.value)}}>${e}</calcite-combobox></calcite-block>`}renderUtilityNetworkSelection(){let{_messages:e}=this,t=e.labels.utilityNetwork,i=this.utilityNetworks?.map(a=>r`<calcite-combobox-item .value=${a.id} .heading=${a.title||a.id} .selected=${a.id===this.selectedUtilityNetwork?.id}></calcite-combobox-item>`);return r`<calcite-block .heading=${t} .label=${t} expanded><calcite-combobox .label=${t} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:a})=>{let s=a.selectedItems[0]?.value;this.selectedUtilityNetwork?.id!==s&&(this.selectedUtilityNetwork=this.utilityNetworks?.find(o=>o.id===s))}}>${i}</calcite-combobox></calcite-block>`}renderDefaultMode(){let{selectedUtilityNetwork:e}=this,{noView:t,noUtilityNetwork:i}=this._messages.errors,a;return this._error===t||this._error===i?a=this.renderError(this._error,!1,"exclamation-mark-triangle"):!e?.loaded&&!e?.loadError?a=this.renderLoader():a=this.renderContent(),r`<calcite-flow-item .selected=${this.mode==="default"}>${a}</calcite-flow-item>`}renderSpatialSelectInstructions(){let{_messages:e,_activeTraceLocationType:t,mode:i}=this,a=t==="starting-point"?e.labels.addSpatial.startingPoint:t==="barrier"?e.labels.addSpatial.barrier:e.labels.addSpatial.stoppingPoint;return r`<calcite-flow-item .selected=${i==="add-spatial-instructions"} .heading=${a} @calciteFlowItemBack=${s=>this._handleAddSpatialCancelClick(s)}><div class="add-spatial-mode"><div><h5 class="heading">${e.instructions.addSpatial.selectFeature.heading}</h5>${e.instructions.addSpatial.selectFeature.subheading}</div><div><h5 class="heading">${e.instructions.addSpatial.selectAssociatedFeature.heading}</h5>${e.instructions.addSpatial.selectAssociatedFeature.subheading}</div></div></calcite-flow-item>`}renderCandidateFeatures(){let{candidateFeatures:e}=this;if(!e.length)return this.mode="default",null;let t=this._activeTraceLocationType==="starting-point"?this._messages.labels.addSpatial.startingPoint:this._activeTraceLocationType==="barrier"?this._messages.labels.addSpatial.barrier:this._messages.labels.addSpatial.stoppingPoint,i=e.length===1?"feature":"list";return r`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this._defaultPopupTemplateEnabled} .features=${e} .featureMenuTitle=${t} .hideActionBar=${this.hideActionBar} hide-select-feature .initialDisplayMode=${i} @arcgisClose=${()=>this._handleFeaturesClose()} @arcgisPropertyChange=${this._handleFeaturesPropertyChange} open .referenceElement=${this.referenceElement} .view=${this.view} ${h(this._featuresComponentRefChange)}></arcgis-features-next>`}renderAddSpatialFooter(){let{mode:e,_messages:t,selectedFeature:i,selectedUtilityNetwork:a}=this,s=e==="add-spatial-feature"&&this._exceedDisplayLimit&&!i,o=I(t.warnings.exceededDisplayLimit,{limit:this._displayLimit.toString()}),n=i?!(a?.isUtilityLayer(i.layer)??!0):!0;return r`${s&&r`<calcite-input-message id=results-limited-message icon=exclamation-mark-circle status=idle>${o}</calcite-input-message>`||""}<calcite-button appearance=outline width=full @click=${()=>this._handleAddSpatialCancelClick()} slot=footer>${t.buttons.cancel}</calcite-button>${e==="add-spatial-feature"&&r`<calcite-button width=full slot=footer appearance=solid @click=${()=>this._handleAddSpatialAddClick()} .disabled=${n}>${t.buttons.add}</calcite-button>`||""}`}renderStartingPointSelection(){return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=starting-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this._unLayers} .traceLocations=${this._startingPoints} .afterHitTest=${this._handleHitTestComplete.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this._traceLocationStartingRefChange)}></arcgis-utility-network-trace-location>`}renderStoppingPointSelection(){return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=stopping-point .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this._unLayers} .traceLocations=${this._stoppingPoints} .afterHitTest=${this._handleHitTestComplete.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this._traceLocationStoppingRefChange)}></arcgis-utility-network-trace-location>`}renderBarrierSelection(){return r`<arcgis-utility-network-trace-location .view=${this.view} trace-location-type=barrier .beforeTraceLocationSelectStart=${this.beforeTraceLocationSelectStart} @arcgisTraceLocationSelectStart=${this._handleTraceLocationSelectStart} @arcgisTraceLocationSelectEnd=${this._handleTraceLocationSelectEnd} @arcgisTraceLocationChange=${()=>this.arcgisTraceInputsChange.emit()} .sketchViewModel=${this._sketchViewModel} .utilityNetwork=${this.selectedUtilityNetwork} .filterLayers=${this._unLayers} .traceLocations=${this._barriers} .afterHitTest=${this._handleHitTestComplete.bind(this)} .autoDestroyDisabled=${this.autoDestroyDisabled} ${h(this._traceLocationBarrierRefChange)}></arcgis-utility-network-trace-location>`}renderSubnetworkNameInput(){return r`<calcite-input clearable type=text .placeholder=${this._messages.instructions.enterSubnetworkName} max-length=64 .status=${this.selectedSubnetworkName?"valid":"invalid"} .value=${this.selectedSubnetworkName} @calciteInputInput=${e=>this.selectedSubnetworkName=e.target.value}></calcite-input><calcite-input-message icon=exclamation-mark-triangle status=idle>${this._messages.labels.tooManySubnetworks}</calcite-input-message>`}renderSubnetworkSelectList(){return r`<calcite-combobox .label=${this._messages.labels.subnetworkName} selection-mode=single-persist @calciteComboboxChange=${({currentTarget:e})=>{this.selectedSubnetworkName=e.selectedItems[0]?.value}}>${this.compatibleSubnetworkNames.map(e=>r`<calcite-combobox-item .value=${e} .heading=${e} .selected=${e===this.selectedSubnetworkName}></calcite-combobox-item>`)}</calcite-combobox>`}renderSubnetworkSelection(){let{compatibleSubnetworkNames:e}=this,t=this._messages.labels.subnetworkName;return this.isSubnetworkNameTraceSelected?this._subnetworkNamesState==="loading"?r`<calcite-loader class="inline-loader" label=loading scale=s></calcite-loader>`:e.length?r`<calcite-block .heading=${t} .label=${t} expanded>${e.length>M?this.renderSubnetworkNameInput():this.renderSubnetworkSelectList()}</calcite-block>`:this.renderError(this._messages.errors.noCompatibleSubnetworks,!1,"exclamation-mark-triangle"):null}renderSubnetworkInfo(){let{_messages:e,selectedNamedTraceConfiguration:t,_unTraceConfiguration:i}=this;return i&&t?.traceType&&this._subnetworkTraceTypes.has(t.traceType)?r`<calcite-block id=subnetwork-info-block expanded .label=${e.labels.subnetworkInfo}><arcgis-utility-network-subnetwork-info .namedTraceConfig=${t}></arcgis-utility-network-subnetwork-info></calcite-block>`:null}renderContent(){let{utilityNetworks:e,unTraceConfiguration:t}=this,{noTraceConfiguration:i,noNamedTraceConfigurations:a,utilityNetworkLoadFailed:s}=this._messages.errors,o=e&&e.length>1?this.renderUtilityNetworkSelection():null,n;this.selectedUtilityNetwork?.loadError?n=this.renderError(s,!1,"exclamation-mark-triangle"):this.traceConfigurations.length||(n=this.renderError(a,!1,"exclamation-mark-triangle"));let u=r`${this.renderTraceSelection()}${this.renderSubnetworkInfo()}${this.renderSubnetworkSelection()}`,P=t?r`${this.showStartingPoints?this.renderStartingPointSelection():null}${this.showStoppingPoints?this.renderStoppingPointSelection():null}${this.renderBarrierSelection()}`:this.renderError(i,!1,"exclamation-mark-triangle");return r`<calcite-block-group .label=${this._messages.labels.traceInputs}>${o}${n??r`${u}${P}`}</calcite-block-group>`}render(){let{mode:e}=this;return r`<calcite-panel>${e==="add-spatial-feature"?this.renderCandidateFeatures():null}<calcite-flow .hidden=${e==="add-spatial-feature"}>${this.renderDefaultMode()}${this.renderSpatialSelectInstructions()}</calcite-flow>${e!=="default"?this.renderAddSpatialFooter():null}</calcite-panel>`}};S("arcgis-utility-network-trace-inputs",w);return w},"core/Collection","core/reactiveUtils","intl","layers/GraphicsLayer","networks/support/UNTraceConfiguration","rest/networks/support/TraceLocation","views/interactive/snapping/FeatureSnappingLayerSource","widgets/Sketch/SketchViewModel",a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as h}from"./
|
|
2
|
+
import{a as h}from"./3TQ5TC4S.js";import{N as n,O as o,P as r,U as d,a as s,b as a,x as l}from"./ASNQKKPL.js";import"./3TTFCHAA.js";var f=s`.label{--calcite-label-margin-bottom: 0}.label-content{display:flex;flex:1;gap:var(--calcite-spacing-sm);align-items:center;text-wrap:balance}.label-content>div{flex-grow:1}.icon{margin-top:-1px;&.info{color:var(--calcite-color-status-info)}&.warning{color:var(--calcite-color-status-warning)}}.tooltip{text-wrap:wrap}`,c=class extends o{constructor(){super(...arguments),this.checked=!1,this.disabled=!1,this.hintKind="info",this.arcgisCheckedChanged=l()}static{this.properties={checked:7,disabled:7,label:1,hint:1,hintIcon:1,hintKind:1}}static{this.styles=f}async destroy(){await this.manager.destroy()}_setIconRef(e){this._icon=e,this.requestUpdate()}render(){let{label:e,hint:i,hintKind:p,hintIcon:b,checked:m,disabled:g}=this;return a`<calcite-label class="label" layout=inline-space-between scale=s>${i?h("label-content",a`<div class="label-content"><div>${e}</div><calcite-icon class=${r(p!=="warning"?"icon info":"icon warning")} .icon=${b??"information"} @click=${t=>t.stopPropagation()} .textLabel=${i} scale=s tabindex=0 ${n(this._setIconRef)}></calcite-icon><calcite-tooltip id=labeledSwitchTooltip class="tooltip" overlay-positioning=fixed .referenceElement=${this._icon??void 0}>${i}</calcite-tooltip></div>`):e}<calcite-switch .checked=${m} .disabled=${g} scale=s .name=${e} @calciteSwitchChange=${t=>{this.checked=t.target.checked,this.arcgisCheckedChanged.emit(t.target.checked)}}></calcite-switch></calcite-label>`}};d("arcgis-labeled-switch",c);export{c as LabeledSwitch};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{a as h}from"./
|
|
2
|
+
import{a as h}from"./DMN7NRMW.js";import"./KVXPMMSF.js";import"./CPZ76XWX.js";import"./FDVDYQ7T.js";import{O as c,U as r,a as n,b as t}from"./ASNQKKPL.js";import"./3TTFCHAA.js";export default $arcgis.t(([{watch:s}])=>{var u=n`.advanced-options-container{padding:var(--calcite-spacing-xxs);display:flex;flex-direction:column;gap:var(--calcite-spacing-xs)}`,p=["catalog-footprint","geojson","csv","graphics","kml","map-notes","stream"];function m(i){if(!i)return!1;let{map:e,graphics:d}=i;return d?.length?!0:e?.allLayers.some(a=>{if(a.type==="feature"&&"source"in a){let{type:o}=a.source;return o!=="feature-layer"&&o!=="ogc-feature"}return p.includes(a.type)})??!1}function g(i){let e=i?.map;return!!e&&e.tables.length>0}var l=class extends c{constructor(){super(...arguments),this._handles=h("disconnect"),this.autoPopulateAuthor=!1,this.hideFeatureAttributes=!1,this.hideIncludeTables=!1}static{this.properties={_selectedTemplate:16,_showAuthorInput:16,_showCopyrightInput:16,_showLegendInput:16,_showNorthArrowInput:16,_showScaleBarInput:16,_showForceFeatureAttributes:16,_showTablesInput:16,autoPopulateAuthor:5,viewModel:0,messages:0,hideFeatureAttributes:5,hideIncludeTables:5}}static{this.styles=u}loaded(){this.manager.onLifecycle(()=>[s(()=>this.viewModel.templateOptions.id,e=>{this._handles.removeHandles("template-handle"),this._selectedTemplate=e?this.viewModel.getLayoutTemplateById(e)??void 0:void 0,this._handles.addHandles(s(()=>[this._selectedTemplate?.layoutTemplateInfo?.layoutOptions?.hasAuthorText,this._selectedTemplate?.layoutTemplateInfo?.layoutOptions?.hasCopyrightText,this._selectedTemplate?.layoutTemplateInfo?.layoutOptions?.hasLegend,this._selectedTemplate?.mapSurroundInfoOptions?.northArrow?.length,this._selectedTemplate?.mapSurroundInfoOptions?.scaleBar?.length],()=>{this._showAuthorInput=this._selectedTemplate?.layoutTemplateInfo?.layoutOptions?.hasAuthorText??!0,this._showCopyrightInput=this._selectedTemplate?.layoutTemplateInfo?.layoutOptions?.hasCopyrightText??!0,this._showLegendInput=this._selectedTemplate?.layoutTemplateInfo?.layoutOptions?.hasLegend??!0,this._showNorthArrowInput=!!this._selectedTemplate?.mapSurroundInfoOptions?.northArrow.length,this._showScaleBarInput=!!this._selectedTemplate?.mapSurroundInfoOptions?.scaleBar.length,this._showForceFeatureAttributes=m(this.viewModel.view)&&!!this._selectedTemplate?.layoutItem?.id&&!this.hideFeatureAttributes,this._showTablesInput=g(this.viewModel.view)&&!!this._selectedTemplate?.layoutItem?.id&&!this.hideIncludeTables},{initial:!0}),"template-handle")},{initial:!0}),s(()=>[this.viewModel.portal?.user,this.autoPopulateAuthor],()=>{!this.viewModel.templateOptions.author&&this.autoPopulateAuthor&&this.viewModel.portal?.user?.username&&(this.viewModel.templateOptions.author=this.viewModel.portal.user.username,this.requestUpdate())},{initial:!0})])}render(){return t`<div aria-labelledby=${`${this.el.id}__advancedOptionsForLayout`} class="advanced-options-container">${this._renderScaleSection()}${this._renderAuthorSection()}${this._renderCopyrightSection()}${this._renderDpiSection()}${this._renderOutSpatialReferenceSection()}${this._renderDatumTransformationSection()}${this._renderCustomTextElementSection()}${this._renderLegendSection()}${this._renderNorthArrowSection()}${this._renderScaleBarSection()}${this._renderForceFeatureAttributesSection()}${this._renderIncludeTablesSection()}</div>`}_renderScaleSection(){return t`<arcgis-print-scale-section .messages=${this.messages} .viewModel=${this.viewModel}></arcgis-print-scale-section>`}_renderAuthorSection(){return this._showAuthorInput?t`<div><calcite-label>${this.messages.author}<calcite-input .value=${this.viewModel.templateOptions.author??""} @calciteInputInput=${e=>this.viewModel.templateOptions.author=e.target.value}></calcite-input></calcite-label></div>`:null}_renderCopyrightSection(){return this._showCopyrightInput?t`<div><calcite-label>${this.messages.copyright}<calcite-input .value=${this.viewModel.templateOptions.copyright??""} @calciteInputInput=${e=>this.viewModel.templateOptions.copyright=e.target.value}></calcite-input></calcite-label></div>`:null}_renderDpiSection(){return t`<arcgis-print-dpi-input .messages=${this.messages} .viewModel=${this.viewModel}></arcgis-print-dpi-input>`}_renderOutSpatialReferenceSection(){return t`<arcgis-print-out-spatial-reference-input .messages=${this.messages} .viewModel=${this.viewModel}></arcgis-print-out-spatial-reference-input>`}_renderDatumTransformationSection(){return t`<arcgis-print-datum-transformation-input .messages=${this.messages} .viewModel=${this.viewModel}></arcgis-print-datum-transformation-input>`}_renderCustomTextElementSection(){return t`<arcgis-print-custom-text-elements .viewModel=${this.viewModel}></arcgis-print-custom-text-elements>`}_renderLegendSection(){return this._showLegendInput?t`<div><calcite-label layout=inline><calcite-checkbox .checked=${!!this.viewModel.templateOptions.legendEnabled} @calciteCheckboxChange=${e=>this.viewModel.templateOptions.legendEnabled=e.target.checked}></calcite-checkbox>${this.messages.legend}</calcite-label>${this.viewModel.templateOptions.legendEnabled?t`<calcite-label layout=inline><calcite-checkbox .checked=${!!this.viewModel.templateOptions.dynamicLegendEnabled} @calciteCheckboxChange=${e=>this.viewModel.templateOptions.dynamicLegendEnabled=e.target.checked}></calcite-checkbox>${this.messages.dynamicLegend}</calcite-label>`:null}</div>`:null}_renderNorthArrowSection(){return this._showNorthArrowInput?t`<div><calcite-label layout=inline><calcite-checkbox .checked=${!!this.viewModel.templateOptions.northArrowEnabled} @calciteCheckboxChange=${e=>this.viewModel.templateOptions.northArrowEnabled=e.target.checked}></calcite-checkbox>${this.messages.northArrow}</calcite-label></div>`:null}_renderScaleBarSection(){return this._showScaleBarInput?t`<div><calcite-label layout=inline><calcite-checkbox .checked=${!!this.viewModel.templateOptions.scaleBarEnabled} @calciteCheckboxChange=${e=>this.viewModel.templateOptions.scaleBarEnabled=e.target.checked}></calcite-checkbox>${this.messages.scaleBar}</calcite-label>${this.viewModel.templateOptions.scaleBarEnabled&&!this._selectedTemplate?.layoutItem?.id?t`<calcite-label>${this.messages.scaleBarUnit}<calcite-select label="Scale bar unit" .value=${this.viewModel.templateOptions.scaleBarUnit||void 0} @calciteSelectChange=${e=>{this.viewModel.templateOptions.scaleBarUnit=e.target.value}}><calcite-option value=kilometers>${this.messages.milesAndKilometers}</calcite-option><calcite-option value=meters>${this.messages.feetAndMeters}</calcite-option></calcite-select></calcite-label>`:null}</div>`:null}_renderForceFeatureAttributesSection(){return this._showForceFeatureAttributes?t`<div><calcite-label layout=inline><calcite-checkbox .checked=${!!this.viewModel.templateOptions.forceFeatureAttributes} @calciteCheckboxChange=${e=>this.viewModel.templateOptions.forceFeatureAttributes=e.target.checked}></calcite-checkbox>${this.messages.forceFeatureAttributes}</calcite-label></div>`:null}_renderIncludeTablesSection(){return this._showTablesInput?t`<div><calcite-label layout=inline><calcite-checkbox .checked=${!!this.viewModel.templateOptions.includeTables} @calciteCheckboxChange=${e=>this.viewModel.templateOptions.includeTables=e.target.checked}></calcite-checkbox>${this.messages.includeTables}</calcite-label></div>`:null}};r("arcgis-print-layout-advanced-options",l);return l},"core/reactiveUtils")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import c from"./
|
|
2
|
+
import c from"./SQSGXJ54.js";import b from"./R3NYK6BO.js";import a from"./YA4NYUQW.js";import{a as y}from"./PC4PAQXQ.js";import{h as p}from"./KVXPMMSF.js";import"./CPZ76XWX.js";import"./FDVDYQ7T.js";import{O as F,S as _,U as A,a as m,b as d,o as n}from"./ASNQKKPL.js";import"./3TTFCHAA.js";export default $arcgis.t(([,I,v,b,{getDisplayedSymbol:S},{stripHTML:x},{watch:u},{d:w},,{d:f}])=>{var C=m`calcite-notice{padding:var(--calcite-space-lg)}`,l=class extends F{constructor(){super(...arguments),this._aggregatedGraphicsSet=new Set,this.aggregatedFeatureCount=0,this.selectedAggregatedFeatureIndex=-1,this.aggregatedFeatureItems=[],this.aggregatedFeatures=[],this.autoDestroyDisabled=!1,this.loading=!1,this.selectedAggregateBoundaryFeature=new v({symbol:new b({outline:{width:1.5,color:"cyan"},style:"none"})}),this.arcgisPropertyChange=p()("aggregatedFeatureCount","selectedAggregatedFeatureIndex","aggregatedFeatureItems","aggregatedFeatures","loading"),this._renderableAggregatedFeatureItems=[]}static{this.properties={_abortController:16,aggregatedFeatureCount:32,selectedAggregatedFeatureIndex:32,aggregatedFeatureItems:32,aggregatedFeatures:32,autoDestroyDisabled:5,feature:0,flowItems:0,loading:32,map:0,messages:0,selectedAggregateBoundaryFeature:32,spatialReference:0,timeZone:1,view:0}}static{this.styles=C}async destroy(){await this.manager.destroy(),this._cancelQuery(),this._clearAggregatedFeatureItems(),this._removeAggregateBoundaryFeature()}async next(){await this._selectRelativeAggregatedFeature(1)}async previous(){await this._selectRelativeAggregatedFeature(-1)}loaded(){this.manager.onLifecycle(()=>[u(()=>[this.feature,this.view],()=>{this._updateAggregatedFeatures()},{initial:!0}),u(()=>this._getAggregatedFeatureItemsHeadingSignature(),()=>this.requestUpdate()),u(()=>this.flowItems?.length,()=>{let{flowItems:e}=this,t=e?.getItemAt((e.length??0)-1)?.graphic??void 0;this._setSelectedAggregatedFeatureIndex(t?this.aggregatedFeatures.indexOf(t):-1),this._removeSelectedAggregatedFeature(),t&&this._aggregatedGraphicsSet.has(t)&&this._addSelectedAggregatedFeature(t)})])}disconnectedCallback(){super.disconnectedCallback(),this._cancelQuery(),this._clearAggregatedFeatureItems(),this._removeAggregateBoundaryFeature()}_setAggregatedFeatureCount(e){n(()=>this.aggregatedFeatureCount=e)}_setSelectedAggregatedFeatureIndex(e){n(()=>this.selectedAggregatedFeatureIndex=e)}_setAggregatedFeatureItemsReadOnly(e){n(()=>{this.aggregatedFeatureItems=e}),this._renderableAggregatedFeatureItems=e.filter(t=>!!t.graphic)}_setAggregatedFeatures(e){this._aggregatedGraphicsSet=new Set(e),n(()=>this.aggregatedFeatures=e)}_getAggregatedFeatureItemsHeadingSignature(){let e="";for(let t of this.aggregatedFeatureItems)e+=`${t.heading??""}|`;return e}_setLoading(e){n(()=>this.loading=e)}_cancelQuery(){this._abortController=y(this._abortController),this._setLoading(!1)}_removeBoundaryGraphicFromView(e){e?.graphics.remove(this.selectedAggregateBoundaryFeature)}_clearAggregatedFeatureItems(){this._setAggregatedFeatureItemsReadOnly([]),this._setSelectedAggregatedFeatureIndex(-1),this._removeSelectedAggregatedFeature()}_resetAggregatedFeaturesState(){this._setAggregatedFeatures([]),this._clearAggregatedFeatureItems(),this._setAggregatedFeatureCount(0),this._removeAggregateBoundaryFeature()}_setAggregatedFeatureItems(e){this._setAggregatedFeatureItemsReadOnly(e.map(t=>new I({graphic:t})))}_setAggregatedFeaturesState(e){this._setAggregatedFeatures(e),this._setAggregatedFeatureItems(e),this._setAggregatedFeatureCount(e.length)}_removeAggregateBoundaryFeature(){this._removeBoundaryGraphicFromView(this._boundaryGraphicView),this.selectedAggregateBoundaryFeature.geometry=null,this._boundaryGraphicView=void 0}_updateAggregateBoundaryFeature(e){let{view:t}=this,a=this._boundaryGraphicView;if(!t){this._removeAggregateBoundaryFeature();return}a!==t&&this._removeBoundaryGraphicFromView(a),this.selectedAggregateBoundaryFeature.geometry=e,this._boundaryGraphicView=t,t.graphics.includes(this.selectedAggregateBoundaryFeature)||t.graphics.add(this.selectedAggregateBoundaryFeature)}async _getLayerViewAndQuery(e){let{view:t}=this,a=f(e);if(!t||!a)return null;let r=await t.whenLayerView(a);if(!r?.createQuery||!r?.queryFeatures||!r?.queryExtent)return null;let g=r.createQuery(),s=e.getObjectId();return g.aggregateIds=s!=null?[s]:[],[r,g]}async _updateAggregatedFeatures(){this._cancelQuery();let{feature:e}=this;if(!e?.isAggregate){this._resetAggregatedFeaturesState();return}let t=await this._getLayerViewAndQuery(e);if(!t){this._resetAggregatedFeaturesState();return}let[a,r]=t,g=new AbortController;this._abortController=g,this._setLoading(!0);try{let[s,o]=await Promise.all([a.queryFeatures(r,{signal:g.signal}),a.queryExtent(r,{signal:g.signal})]);if(this._abortController!==g||g.signal.aborted)return;this._abortController=null,this._setLoading(!1);let i=s.features??[];this._setAggregatedFeaturesState(i),o.extent?this._updateAggregateBoundaryFeature(o.extent):this._removeAggregateBoundaryFeature()}catch(s){if(this._abortController!==g||(this._abortController=null,this._setLoading(!1),w(s)))return;this._resetAggregatedFeaturesState()}}_addFlowItem(e){e&&this.flowItems?.push(e)}async _addSelectedAggregatedFeature(e){let{view:t}=this;if(e&&t){let a=await S(e),r=e.clone();r.symbol=a,this._selectedAggregatedFeature=r,t.graphics.add(this._selectedAggregatedFeature)}}_removeSelectedAggregatedFeature(){this._selectedAggregatedFeature&&this.view&&(this.view.graphics.remove(this._selectedAggregatedFeature),this._selectedAggregatedFeature=void 0)}async _selectFeature(e){let{flowItems:t,view:a}=this;t&&this._addFlowItem(_(d`<arcgis-feature-next .autoDestroyDisabled=${this.autoDestroyDisabled} .flowItems=${t} .graphic=${e.graphic} .map=${this.map} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${a??void 0}></arcgis-feature-next>`))}async _selectRelativeAggregatedFeature(e){let{aggregatedFeatures:t,aggregatedFeatureItems:a,flowItems:r}=this;if(!r||t.length===0||a.length===0)return;let g=t.length,s=this.selectedAggregatedFeatureIndex>=0&&this.selectedAggregatedFeatureIndex<g?this.selectedAggregatedFeatureIndex:-1;if(s===-1){let h=r.getItemAt(r.length-1)?.graphic;s=h?t.indexOf(h):-1}let o=s===-1?e>0?0:g-1:(s+e+g)%g,i=a[o];if(!i?.graphic)return;this._setSelectedAggregatedFeatureIndex(o);let c=r.getItemAt(r.length-1);if(c?.flowType==="feature"){c.graphic=i.graphic,this._removeSelectedAggregatedFeature(),await this._addSelectedAggregatedFeature(i.graphic);return}await this._selectFeature(i)}_renderChevronIconNode(){return d`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`}render(){let{_renderableAggregatedFeatureItems:e}=this,{loading:t}=this;return t||e.length>0?d`<calcite-list .loading=${t} display-mode=flat .label=${this.messages?.aggregatedFeatures??""} selection-mode=none>${e.map(a=>d`<calcite-list-item .label=${a.heading?x(a.heading):void 0} @calciteListItemSelect=${()=>this._selectFeature(a)}>${this._renderChevronIconNode()}</calcite-list-item>`)}</calcite-list>`:d`<calcite-notice icon=information kind=brand open scale=s width=full><div slot=message>${this.messages?.noAggregatedFeatures}</div></calcite-notice>`}};A("arcgis-aggregated-features",l);return l},"core/Collection","popup/Feature","Graphic","symbols/SimpleFillSymbol","symbols/support/symbolUtils","applications/Components/stringUtils","core/reactiveUtils",a,b,c)
|