@arcgis/map-components 5.0.0-next.63 → 5.0.0-next.64
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/{IN74VEN5.js → 25VQ7HAJ.js} +2 -2
- package/dist/cdn/{ONEREHFB.js → 2JS2PGFQ.js} +2 -2
- package/dist/cdn/{3V7OWRL2.js → 2MLEZ2K7.js} +2 -2
- package/dist/cdn/{S7N55PYB.js → 2PXPFBQ7.js} +2 -2
- package/dist/cdn/{O4Y27ACE.js → 2SAO54SA.js} +2 -2
- package/dist/cdn/{7O4ZAXYX.js → 2TU2MDZV.js} +2 -2
- package/dist/cdn/{WO7WQYWO.js → 2YDSH7Y5.js} +2 -2
- package/dist/cdn/{E6Y2ODL4.js → 3IWCKR5O.js} +2 -2
- package/dist/cdn/{ZT3IEYMJ.js → 3S7N5UUV.js} +2 -2
- package/dist/cdn/{L2E2VIOC.js → 43FO2UHY.js} +2 -2
- package/dist/cdn/{2C5R4BGP.js → 44QDGYHC.js} +2 -2
- package/dist/cdn/{U6F3BX3X.js → 4BVWEKAK.js} +2 -2
- package/dist/cdn/{DHW755EI.js → 4HSHH5OD.js} +2 -2
- package/dist/cdn/{BKCRKBXQ.js → 4JCGYSBS.js} +1 -1
- package/dist/cdn/{N47MAD42.js → 4R7DIIL7.js} +2 -2
- package/dist/cdn/{BDKVRKA3.js → 4TWZYR2K.js} +2 -2
- package/dist/cdn/{P5GYIRF4.js → 4ULAAVPV.js} +2 -2
- package/dist/cdn/{SCNDABXN.js → 4WZMABIW.js} +2 -2
- package/dist/cdn/{N74YN4YG.js → 56PC3NSX.js} +2 -2
- package/dist/cdn/{3UPJHYQX.js → 57FH4CUS.js} +2 -2
- package/dist/cdn/{4XS7QJGI.js → 5A2U7MRE.js} +2 -2
- package/dist/cdn/{C2K5LB6T.js → 5CPJBIFM.js} +2 -2
- package/dist/cdn/{WXNWY3FO.js → 5IMCYYOC.js} +1 -1
- package/dist/cdn/{3UTCTFKM.js → 5LCWSXDW.js} +2 -2
- package/dist/cdn/{FZKPALV3.js → 5MQZ7SQB.js} +2 -2
- package/dist/cdn/{HZ4D6X5M.js → 5PFSS2LK.js} +2 -2
- package/dist/cdn/{MA3KGV5V.js → 5UBDGUWA.js} +1 -1
- package/dist/cdn/{S2DA4JKU.js → 662CJM7V.js} +2 -2
- package/dist/cdn/{ZZX4I57F.js → 6DX2HHMI.js} +2 -2
- package/dist/cdn/{WM3CHEXH.js → 6LS4IHZP.js} +2 -2
- package/dist/cdn/6PHMH4CD.js +4 -0
- package/dist/cdn/{UHHFJQFG.js → 6Q7MKJCB.js} +2 -2
- package/dist/cdn/{RA2HPMJA.js → 6R5O25BH.js} +2 -2
- package/dist/cdn/{IDCDKVAK.js → 757MIUP2.js} +2 -2
- package/dist/cdn/{3VGB5UGM.js → 76O2MV62.js} +2 -2
- package/dist/cdn/{MZP3UNHF.js → 77TZUMBC.js} +2 -2
- package/dist/cdn/{UG4WNHFA.js → 7BZHRB6W.js} +2 -2
- package/dist/cdn/{T3I5632H.js → 7CKU3SXJ.js} +2 -2
- package/dist/cdn/{QJYLNR7H.js → 7JTOSZIR.js} +2 -2
- package/dist/cdn/7NUWAF7D.js +4 -0
- package/dist/cdn/{BHO4CWWK.js → 7S7EDMAU.js} +2 -2
- package/dist/cdn/{NESBSXOT.js → ACOMCONC.js} +2 -2
- package/dist/cdn/{22UN5EMA.js → ALMUOVFH.js} +2 -2
- package/dist/cdn/{OMTH6BPB.js → AQU3RGC5.js} +2 -2
- package/dist/cdn/{VLRXHKTG.js → ATMPH35W.js} +2 -2
- package/dist/cdn/{EZ5ULW5M.js → AUYQ24TT.js} +2 -2
- package/dist/cdn/{WKFT5EV6.js → AYPKHJHS.js} +2 -2
- package/dist/cdn/{FNAEFXUS.js → AZFSH3FH.js} +2 -2
- package/dist/cdn/{PDXRUKM5.js → B5XWNPKD.js} +2 -2
- package/dist/cdn/{JDTQL3KJ.js → BA6KM5H5.js} +2 -2
- package/dist/cdn/{MVTYPMIJ.js → BHVYYTN2.js} +2 -2
- package/dist/cdn/{TBXZE2E4.js → BMHSAEZ2.js} +2 -2
- package/dist/cdn/{FL4GZJWM.js → BOGTZN2J.js} +2 -2
- package/dist/cdn/{5ZHY4S77.js → BTAUNG25.js} +2 -2
- package/dist/cdn/{MOJ7PX7T.js → BTGGUP2V.js} +2 -2
- package/dist/cdn/{SO5O543S.js → BX2YMAGN.js} +2 -2
- package/dist/cdn/{BYNBZ2YA.js → C2TAID3X.js} +2 -2
- package/dist/cdn/{5EKA4EYB.js → C46P3EUK.js} +2 -2
- package/dist/cdn/{SQ7V54CL.js → C7FCOWWT.js} +2 -2
- package/dist/cdn/{HFR4WG3I.js → CABM3NUA.js} +2 -2
- package/dist/cdn/{SOJR6SNQ.js → CEFJEYZK.js} +2 -2
- package/dist/cdn/{VBF2CALE.js → CNRBEIFB.js} +2 -2
- package/dist/cdn/{QZKNX7YL.js → CUZMPQ2O.js} +1 -1
- package/dist/cdn/{UNZLK4CV.js → CVTPZQGA.js} +2 -2
- package/dist/cdn/{XF5TV5DY.js → CXKZ7GGF.js} +2 -2
- package/dist/cdn/{STIBEUOA.js → D4XJC63H.js} +2 -2
- package/dist/cdn/{3XN3IN2L.js → DDJLL7EL.js} +2 -2
- package/dist/cdn/{FUJWOXGN.js → DHCK7U2A.js} +2 -2
- package/dist/cdn/{TWIZU36Z.js → DMZ7TC53.js} +2 -2
- package/dist/cdn/{SGF3FW7V.js → EBWEOCVW.js} +2 -2
- package/dist/cdn/{5E3KSKG2.js → EN27G5WZ.js} +2 -2
- package/dist/cdn/{V3OUQFOL.js → EOAI242C.js} +2 -2
- package/dist/cdn/{WHOV6Q5Z.js → EOCIRFMA.js} +2 -2
- package/dist/cdn/{IGJFSSX4.js → EQL4436G.js} +2 -2
- package/dist/cdn/{343TSYF2.js → EVAE6YAC.js} +2 -2
- package/dist/cdn/{DXVWT2AJ.js → EZHOW32S.js} +2 -2
- package/dist/cdn/{UJDMZM7S.js → EZYYD4CL.js} +2 -2
- package/dist/cdn/{NDPRUIRJ.js → FEBGCB5D.js} +1 -1
- package/dist/cdn/{3PAFT6A5.js → FQHR66J5.js} +2 -2
- package/dist/cdn/{EWVGSQVI.js → G34KR5UI.js} +2 -2
- package/dist/cdn/{266CAKJH.js → G3YYSSV2.js} +2 -2
- package/dist/cdn/{JC7T2EF2.js → G7WBRF3F.js} +1 -1
- package/dist/cdn/{S2RESMX6.js → GAZ33ABI.js} +2 -2
- package/dist/cdn/{TDHJIJLS.js → GC3J2KGC.js} +2 -2
- package/dist/cdn/{YERH5EVL.js → GGXTJCYM.js} +2 -2
- package/dist/cdn/{Z7ZS7KFN.js → GHDGNI7M.js} +2 -2
- package/dist/cdn/{PG4HFKOA.js → GHOU67T6.js} +2 -2
- package/dist/cdn/{OUDH32KU.js → GLF65OBX.js} +1 -1
- package/dist/cdn/{5P6IH22V.js → GVVQMDNM.js} +2 -2
- package/dist/cdn/{S5TZH6LH.js → GYCKGIS4.js} +2 -2
- package/dist/cdn/{U4C3VIRO.js → H3IUE6CV.js} +2 -2
- package/dist/cdn/{56BICWHI.js → H4TPBR5Y.js} +2 -2
- package/dist/cdn/{I5VMPNA2.js → HCH2CQP4.js} +2 -2
- package/dist/cdn/{J3JKAZHE.js → HJBWBLZ5.js} +2 -2
- package/dist/cdn/{Q4SMULWN.js → HO2KNEVK.js} +2 -2
- package/dist/cdn/{AC2M4WVN.js → HOLLTQSD.js} +2 -2
- package/dist/cdn/{UYOBZLOH.js → HOYDXBYD.js} +2 -2
- package/dist/cdn/{ZKABMQ5G.js → HPESBGFY.js} +2 -2
- package/dist/cdn/{6XY2ECBK.js → HUEGYPDA.js} +2 -2
- package/dist/cdn/{4ASZKML7.js → HZYFJTPW.js} +2 -2
- package/dist/cdn/{UFHCCPHJ.js → I3A7RXYF.js} +2 -2
- package/dist/cdn/{ZY56FSAX.js → IBBDBGKJ.js} +2 -2
- package/dist/cdn/{MB54VJTR.js → IBHXUQKG.js} +2 -2
- package/dist/cdn/{MCCO2GWM.js → IGBOVP4S.js} +2 -2
- package/dist/cdn/{NWHWBATX.js → IGWPYMOO.js} +2 -2
- package/dist/cdn/{AIJTFLS6.js → J2Z7ICW3.js} +2 -2
- package/dist/cdn/{CNMS3WCQ.js → J4JDU5EN.js} +2 -2
- package/dist/cdn/{Y7TBM52S.js → J54SY6MF.js} +2 -2
- package/dist/cdn/{4TVD7FIX.js → JFZE6VKW.js} +2 -2
- package/dist/cdn/{LFY52V7X.js → JLRKZLDS.js} +2 -2
- package/dist/cdn/{QSHSEFY5.js → JXUDKHKG.js} +1 -1
- package/dist/cdn/{MUDD5WSO.js → K2AGVCW5.js} +2 -2
- package/dist/cdn/{P4M2NO2P.js → K3B2BXNT.js} +2 -2
- package/dist/cdn/{TTIBYEQ4.js → K5XEYIVH.js} +2 -2
- package/dist/cdn/{45F5IKR2.js → K5YLX2BM.js} +2 -2
- package/dist/cdn/{SNUCA2ZP.js → KG6KICVD.js} +2 -2
- package/dist/cdn/{CEHLRON7.js → KGWEHD4H.js} +1 -1
- package/dist/cdn/{TBDDJS63.js → KOMSKD3T.js} +2 -2
- package/dist/cdn/{6NRITPUN.js → KPVBPDT6.js} +2 -2
- package/dist/cdn/{733VUIRB.js → KTFIRUJG.js} +2 -2
- package/dist/cdn/{LISVDU2K.js → LE22CSNF.js} +2 -2
- package/dist/cdn/{XB5KJL22.js → LE5SVYYF.js} +2 -2
- package/dist/cdn/{VLDJL5AC.js → LM7XBDBC.js} +2 -2
- package/dist/cdn/{NJJZST4U.js → LMY2U2EZ.js} +2 -2
- package/dist/cdn/{ZOEX6HWX.js → LNPWPJWV.js} +2 -2
- package/dist/cdn/{ZGELIG2B.js → LSWDZM5M.js} +2 -2
- package/dist/cdn/{OKEXFOAJ.js → M4FZZL5C.js} +2 -2
- package/dist/cdn/{O6HWFB4W.js → M6LJ434S.js} +2 -2
- package/dist/cdn/{CXFO6IWQ.js → MEJNTXAO.js} +2 -2
- package/dist/cdn/{F5QESYPX.js → MFDLEEQL.js} +2 -2
- package/dist/cdn/{WSCFF7FC.js → MOCDFHBM.js} +2 -2
- package/dist/cdn/{TIM66V2M.js → MQ4FGSRU.js} +2 -2
- package/dist/cdn/{H6ST3XWL.js → N2WPWYBH.js} +2 -2
- package/dist/cdn/{KDBLEPBP.js → NBNIJR3C.js} +2 -2
- package/dist/cdn/{53E6RXRI.js → NETXBRSR.js} +2 -2
- package/dist/cdn/{XCAK6VPC.js → NIDPKSBS.js} +2 -2
- package/dist/cdn/{HEBUK7Q5.js → NNECYZTP.js} +2 -2
- package/dist/cdn/{GDVUSF2C.js → NPJOPJA3.js} +2 -2
- package/dist/cdn/{2CGSNF2W.js → NPQD4JTF.js} +2 -2
- package/dist/cdn/{VEJYIBQA.js → OD3FGA5C.js} +2 -2
- package/dist/cdn/{56AX4KSD.js → OFIVNZT6.js} +2 -2
- package/dist/cdn/{MOMSFCJ3.js → OJYHNJC3.js} +2 -2
- package/dist/cdn/{CFYRO5ZJ.js → OOK22FYJ.js} +2 -2
- package/dist/cdn/{6MOO75U6.js → OPSQTMQ3.js} +2 -2
- package/dist/cdn/{3NACO3KH.js → OTCI7IQX.js} +2 -2
- package/dist/cdn/{A3MXGVCR.js → OTHHN5HY.js} +2 -2
- package/dist/cdn/{UH6GR34I.js → OZ3QZ5EV.js} +2 -2
- package/dist/cdn/{6SOYMZKQ.js → P64QJKZM.js} +2 -2
- package/dist/cdn/{WVEW5KWN.js → PGEDOJRG.js} +2 -2
- package/dist/cdn/{5KROKORO.js → PHTGQMKE.js} +2 -2
- package/dist/cdn/{OFGOU3B7.js → PIVVNZFS.js} +2 -2
- package/dist/cdn/{63Q7R555.js → PLEYUHX7.js} +1 -1
- package/dist/cdn/{UAJAWJID.js → POWMB2QV.js} +2 -2
- package/dist/cdn/{B57T3FDU.js → PPEJPTOI.js} +2 -2
- package/dist/cdn/{XJW3VF3R.js → PRSEN636.js} +2 -2
- package/dist/cdn/{WVOXLBW3.js → PW7AZXP2.js} +2 -2
- package/dist/cdn/{KHECL4IX.js → PZ5ZB5KO.js} +2 -2
- package/dist/cdn/{MWD233DH.js → QI5J7YMH.js} +2 -2
- package/dist/cdn/{Y6SJXGXL.js → QLX6BJAK.js} +2 -2
- package/dist/cdn/{HIAWSD3H.js → QOTB4LG7.js} +2 -2
- package/dist/cdn/{EIRHYHVC.js → QPLAUXLO.js} +2 -2
- package/dist/cdn/{XPXOUWKF.js → QPZKL665.js} +2 -2
- package/dist/cdn/{KUYSNGXI.js → QQRSN4QR.js} +2 -2
- package/dist/cdn/{XQ73HX5G.js → QQZ7KI5G.js} +2 -2
- package/dist/cdn/{WJEUU7WB.js → QUKXHMGR.js} +2 -2
- package/dist/cdn/{3THXQFW2.js → QZIFYIKL.js} +2 -2
- package/dist/cdn/{YINGHE7J.js → R62KCUML.js} +2 -2
- package/dist/cdn/{76LUDNCL.js → RBBLHES7.js} +2 -2
- package/dist/cdn/{7U2DSCAB.js → RCF3CK7P.js} +2 -2
- package/dist/cdn/{VWMAQ72D.js → RLXA4UUF.js} +2 -2
- package/dist/cdn/{LP4XFOZW.js → RSSVVGRU.js} +1 -1
- package/dist/cdn/{3NWPJEVA.js → RTA54ZTT.js} +2 -2
- package/dist/cdn/{G37MGQOR.js → RWKAM4WY.js} +2 -2
- package/dist/cdn/{7AO3FK35.js → S27V56II.js} +2 -2
- package/dist/cdn/{2PJBKTYM.js → S4ZO3CAO.js} +2 -2
- package/dist/cdn/{J7EXV3PY.js → S5D3ZGNG.js} +2 -2
- package/dist/cdn/{VMFKNWFL.js → SDTRH2WZ.js} +2 -2
- package/dist/cdn/{N7LCMASB.js → SE2WM7RZ.js} +2 -2
- package/dist/cdn/SFRXPLKF.js +4 -0
- package/dist/cdn/{QB64EJHB.js → SGTCBTC5.js} +1 -1
- package/dist/cdn/{GULB7V64.js → SKDCBPER.js} +2 -2
- package/dist/cdn/{JTDI3AJI.js → SLNNSNKY.js} +2 -2
- package/dist/cdn/{NP4GVU5L.js → SRUO5I3S.js} +2 -2
- package/dist/cdn/{JGGCFURF.js → T33HPQVD.js} +2 -2
- package/dist/cdn/{SQM6IUOU.js → T6N3W64J.js} +2 -2
- package/dist/cdn/{5SIIVXZF.js → TTUX33GW.js} +2 -2
- package/dist/cdn/{3CVPBOOR.js → TVDC5UDE.js} +2 -2
- package/dist/cdn/{6RM6W77T.js → TY7G6ZIO.js} +2 -2
- package/dist/cdn/{GQCGG7X7.js → UA5THJX5.js} +2 -2
- package/dist/cdn/{2FAJEOFF.js → UINWXFMM.js} +2 -2
- package/dist/cdn/{YB2NIUG5.js → UKHDHUH6.js} +2 -2
- package/dist/cdn/{EXF5I7ZN.js → UL43B4RH.js} +2 -2
- package/dist/cdn/{XZ667J77.js → USMA77IB.js} +2 -2
- package/dist/cdn/{F3PVKUCJ.js → UTCUGJ27.js} +2 -2
- package/dist/cdn/{JNKOP34L.js → UXXQCW53.js} +2 -2
- package/dist/cdn/{D3ZIZCIH.js → UY5PEY5Q.js} +2 -2
- package/dist/cdn/{JW4BZSJR.js → V2HJXCYM.js} +2 -2
- package/dist/cdn/{Y57UKJ6Q.js → V72D6ZQJ.js} +2 -2
- package/dist/cdn/{EYTWSVGM.js → V7QEK5GF.js} +2 -2
- package/dist/cdn/{QUKVIOMU.js → VBQZ7UNO.js} +2 -2
- package/dist/cdn/{ZXCOVCDH.js → VIZNUIWH.js} +2 -2
- package/dist/cdn/{U6EX4LDS.js → VJWECPUY.js} +2 -2
- package/dist/cdn/{4UQJTWNP.js → VQBN5PCK.js} +2 -2
- package/dist/cdn/{GCPCLM74.js → VUG7WUL4.js} +2 -2
- package/dist/cdn/{Z53XQPKF.js → VXVV53RL.js} +1 -1
- package/dist/cdn/{OWOLEYFO.js → W25CJVAD.js} +2 -2
- package/dist/cdn/{MICUFX5U.js → W27OKV2F.js} +2 -2
- package/dist/cdn/{PBSEDXON.js → W7SB5UGL.js} +2 -2
- package/dist/cdn/{DVA6T7C2.js → WAKARYHE.js} +2 -2
- package/dist/cdn/{OYHHODPI.js → WBOMAHNA.js} +2 -2
- package/dist/cdn/{E2S547OR.js → WIK2QV6Y.js} +2 -2
- package/dist/cdn/{Q5QA7G4T.js → WMXNOFT7.js} +2 -2
- package/dist/cdn/{ZJVOCEY6.js → WU73LKLD.js} +1 -1
- package/dist/cdn/{45RHFUU2.js → WWNYPX23.js} +2 -2
- package/dist/cdn/{UHA4JU4R.js → XDFYWKMN.js} +3 -3
- package/dist/cdn/{PI25YVFX.js → XHSSXTOC.js} +2 -2
- package/dist/cdn/{WJ4IR2AK.js → XOS5D2RH.js} +2 -2
- package/dist/cdn/{UDBKHWH4.js → XQCMQTND.js} +2 -2
- package/dist/cdn/{MKAQE44U.js → XRMSZFX6.js} +2 -2
- package/dist/cdn/{IV4WBZ5H.js → XYUXWIUE.js} +2 -2
- package/dist/cdn/{F3CCUPJZ.js → Y6ZRUTXX.js} +2 -2
- package/dist/cdn/{LVHD6GZD.js → Y77HECJ4.js} +1 -1
- package/dist/cdn/{WMKVVX3K.js → YBV6SSEW.js} +2 -2
- package/dist/cdn/{TNKTU7EN.js → YBZN74HY.js} +2 -2
- package/dist/cdn/{CIGBSEQO.js → YOEOVWH7.js} +1 -1
- package/dist/cdn/{Y453EEUF.js → YTCSJTV2.js} +1 -1
- package/dist/cdn/{DOJXUZJ5.js → YU2AAVRK.js} +2 -2
- package/dist/cdn/{JGO66UXH.js → YUKHVCBG.js} +2 -2
- package/dist/cdn/{PP37ONS4.js → YW7EJDBN.js} +2 -2
- package/dist/cdn/{57OSO7QX.js → ZHJTZAFB.js} +2 -2
- package/dist/cdn/{TZMF54TA.js → ZKLYHN4V.js} +2 -2
- package/dist/cdn/{A3AREYL2.js → ZVNPSBDC.js} +2 -2
- package/dist/cdn/{IJZXUNGQ.js → ZWGPLLUI.js} +2 -2
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/AnalysisViewModel.js +1 -1
- package/dist/chunks/action-utils.js +1 -1
- package/dist/chunks/async-utils.js +1 -1
- package/dist/chunks/basemap-gallery-resources.js +1 -1
- package/dist/chunks/chart-utils.js +1 -1
- package/dist/chunks/chartCommon.js +1 -1
- package/dist/chunks/component-utils.js +1 -1
- package/dist/chunks/constants.js +1 -1
- package/dist/chunks/createCloseEvent.js +1 -1
- package/dist/chunks/esri-main.js +1 -1
- package/dist/chunks/feature-utils.js +1 -1
- package/dist/chunks/globalCss.js +1 -1
- package/dist/chunks/handle.js +1 -1
- package/dist/chunks/heading.js +1 -1
- package/dist/chunks/layer-list.js +1 -1
- package/dist/chunks/legacyIcon.js +1 -1
- package/dist/chunks/maybe.js +1 -1
- package/dist/chunks/measurementUtils.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/screenLocation.js +1 -1
- package/dist/chunks/slots.js +1 -1
- package/dist/chunks/svgUtils.js +1 -1
- package/dist/chunks/time-utils.js +1 -1
- package/dist/chunks/univariateUtils.js +1 -1
- package/dist/chunks/useArcgisViewReadyError.js +1 -1
- package/dist/chunks/useHandles.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/useView.js +1 -1
- package/dist/chunks/useViewModel.js +1 -1
- package/dist/chunks/useWidget.js +1 -1
- package/dist/chunks/utils.js +1 -1
- package/dist/chunks/utils2.js +1 -1
- package/dist/chunks/visible-element.js +1 -1
- package/dist/components/arcgis-area-measurement-2d/customElement.js +1 -1
- package/dist/components/arcgis-area-measurement-3d/customElement.js +1 -1
- package/dist/components/arcgis-attachments/customElement.js +1 -1
- package/dist/components/arcgis-basemap-gallery/customElement.js +1 -1
- package/dist/components/arcgis-basemap-gallery-item/customElement.js +1 -1
- package/dist/components/arcgis-basemap-layer-list/customElement.js +1 -1
- package/dist/components/arcgis-basemap-toggle/customElement.js +1 -1
- package/dist/components/arcgis-bookmarks/customElement.js +1 -1
- package/dist/components/arcgis-building-explorer/customElement.js +1 -1
- package/dist/components/arcgis-catalog-layer-list/customElement.js +1 -1
- package/dist/components/arcgis-color-select/customElement.js +1 -1
- package/dist/components/arcgis-compass/customElement.js +1 -1
- package/dist/components/arcgis-coordinate-conversion/customElement.js +1 -1
- package/dist/components/arcgis-daylight/customElement.js +1 -1
- package/dist/components/arcgis-direct-line-measurement-3d/customElement.js +1 -1
- package/dist/components/arcgis-directional-pad/customElement.js +1 -1
- package/dist/components/arcgis-directions/customElement.js +1 -1
- package/dist/components/arcgis-distance-measurement-2d/customElement.js +1 -1
- package/dist/components/arcgis-editor/customElement.js +1 -1
- package/dist/components/arcgis-elevation-profile/customElement.js +1 -1
- package/dist/components/arcgis-elevation-profile-legend/customElement.js +1 -1
- package/dist/components/arcgis-elevation-profile-legend-item/customElement.js +1 -1
- package/dist/components/arcgis-elevation-profile-settings/customElement.js +1 -1
- package/dist/components/arcgis-elevation-profile-statistics/customElement.js +1 -1
- package/dist/components/arcgis-expand/customElement.js +1 -1
- package/dist/components/arcgis-feature/customElement.js +1 -1
- package/dist/components/arcgis-feature-attachments/customElement.js +1 -1
- package/dist/components/arcgis-feature-content/customElement.js +1 -1
- package/dist/components/arcgis-feature-element-info/customElement.js +1 -1
- package/dist/components/arcgis-feature-expression/customElement.js +1 -1
- package/dist/components/arcgis-feature-fields/customElement.js +1 -1
- package/dist/components/arcgis-feature-form/customElement.js +1 -1
- package/dist/components/arcgis-feature-media/customElement.js +1 -1
- package/dist/components/arcgis-feature-relationship/customElement.js +1 -1
- package/dist/components/arcgis-feature-table/customElement.js +1 -1
- package/dist/components/arcgis-feature-templates/customElement.js +1 -1
- package/dist/components/arcgis-feature-utility-network-association-list/customElement.js +1 -1
- package/dist/components/arcgis-feature-utility-network-associations/customElement.js +1 -1
- package/dist/components/arcgis-features/customElement.js +1 -1
- package/dist/components/arcgis-floor-filter/customElement.js +1 -1
- package/dist/components/arcgis-fullscreen/customElement.js +1 -1
- package/dist/components/arcgis-grid-controls/customElement.js +1 -1
- package/dist/components/arcgis-histogram-range-slider/customElement.js +1 -1
- package/dist/components/arcgis-home/customElement.js +1 -1
- package/dist/components/arcgis-labeled-switch/customElement.js +1 -1
- package/dist/components/arcgis-layer-list/customElement.js +1 -1
- package/dist/components/arcgis-layer-list-item/customElement.js +1 -1
- package/dist/components/arcgis-legend/customElement.js +1 -1
- package/dist/components/arcgis-legend-card-color-ramp/customElement.js +1 -1
- package/dist/components/arcgis-legend-card-element/customElement.js +1 -1
- package/dist/components/arcgis-legend-card-size-ramp/customElement.js +1 -1
- package/dist/components/arcgis-legend-card-univariate-above-and-below-ramp/customElement.js +1 -1
- package/dist/components/arcgis-legend-card-univariate-color-size-ramp/customElement.js +1 -1
- package/dist/components/arcgis-legend-card-view/customElement.js +1 -1
- package/dist/components/arcgis-legend-classic-color-ramp/customElement.js +1 -1
- package/dist/components/arcgis-legend-classic-element/customElement.js +1 -1
- package/dist/components/arcgis-legend-classic-size-ramp/customElement.js +1 -1
- package/dist/components/arcgis-legend-classic-univariate-above-and-below-ramp/customElement.js +1 -1
- package/dist/components/arcgis-legend-classic-univariate-color-size-ramp/customElement.js +1 -1
- package/dist/components/arcgis-legend-classic-view/customElement.js +1 -1
- package/dist/components/arcgis-legend-relationship-ramp/customElement.js +1 -1
- package/dist/components/arcgis-legend-spike-ramp/customElement.js +1 -1
- package/dist/components/arcgis-line-of-sight/customElement.js +1 -1
- package/dist/components/arcgis-link-chart/customElement.js +1 -1
- package/dist/components/arcgis-link-chart-layout-switcher/customElement.js +1 -1
- package/dist/components/arcgis-locate/customElement.js +1 -1
- package/dist/components/arcgis-map/customElement.js +1 -1
- package/dist/components/arcgis-measurement/customElement.js +1 -1
- package/dist/components/arcgis-measurement-content/customElement.js +1 -1
- package/dist/components/arcgis-navigation-toggle/customElement.js +1 -1
- package/dist/components/arcgis-oriented-imagery-viewer/customElement.js +1 -1
- package/dist/components/arcgis-placement/customElement.js +1 -1
- package/dist/components/arcgis-popup/customElement.js +1 -1
- package/dist/components/arcgis-presentation/customElement.js +1 -1
- package/dist/components/arcgis-print/customElement.js +1 -1
- package/dist/components/arcgis-print-custom-text-elements/customElement.js +1 -1
- package/dist/components/arcgis-print-dpi-input/customElement.js +1 -1
- package/dist/components/arcgis-print-export-button/customElement.js +1 -1
- package/dist/components/arcgis-print-exports-panel/customElement.js +1 -1
- package/dist/components/arcgis-print-format-select/customElement.js +1 -1
- package/dist/components/arcgis-print-layout-advanced-options/customElement.js +1 -1
- package/dist/components/arcgis-print-layout-panel/customElement.js +1 -1
- package/dist/components/arcgis-print-main-panel/customElement.js +1 -1
- package/dist/components/arcgis-print-map-only-advanced-options/customElement.js +1 -1
- package/dist/components/arcgis-print-map-only-panel/customElement.js +1 -1
- package/dist/components/arcgis-print-out-spatial-reference-input/customElement.js +1 -1
- package/dist/components/arcgis-print-preview-input/customElement.js +1 -1
- package/dist/components/arcgis-print-scale-section/customElement.js +1 -1
- package/dist/components/arcgis-print-template-select/customElement.js +1 -1
- package/dist/components/arcgis-print-template-selector/customElement.js +1 -1
- package/dist/components/arcgis-scale-bar/customElement.js +1 -1
- package/dist/components/arcgis-scale-range-slider/customElement.js +1 -1
- package/dist/components/arcgis-scene/customElement.js +1 -1
- package/dist/components/arcgis-search/customElement.js +1 -1
- package/dist/components/arcgis-search-result-renderer/customElement.js +1 -1
- package/dist/components/arcgis-shadow-cast/customElement.js +1 -1
- package/dist/components/arcgis-shadow-cast-discrete-config/customElement.js +1 -1
- package/dist/components/arcgis-shadow-cast-duration-config/customElement.js +1 -1
- package/dist/components/arcgis-shadow-cast-threshold-config/customElement.js +1 -1
- package/dist/components/arcgis-sketch/customElement.js +1 -1
- package/dist/components/arcgis-slice/customElement.js +1 -1
- package/dist/components/arcgis-spinner/customElement.js +1 -1
- package/dist/components/arcgis-swipe/customElement.js +1 -1
- package/dist/components/arcgis-table-list/customElement.js +1 -1
- package/dist/components/arcgis-time-slider/customElement.js +1 -1
- package/dist/components/arcgis-time-zone-label/customElement.js +1 -1
- package/dist/components/arcgis-track/customElement.js +1 -1
- package/dist/components/arcgis-unit-select/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-association-list/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-associations/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-result-feature-list/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-subnetwork-info/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-trace/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-trace-inputs/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-trace-location/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-trace-location-list/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-trace-results/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-validate-topology/customElement.js +1 -1
- package/dist/components/arcgis-value-picker/customElement.js +1 -1
- package/dist/components/arcgis-version-management/customElement.js +1 -1
- package/dist/components/arcgis-version-management-service-item/customElement.js +1 -1
- package/dist/components/arcgis-version-management-version-list/customElement.js +1 -1
- package/dist/components/arcgis-version-management-version-properties/customElement.js +1 -1
- package/dist/components/arcgis-video/customElement.js +1 -1
- package/dist/components/arcgis-video-player/customElement.js +1 -1
- package/dist/components/arcgis-video-player-action-bar/customElement.js +1 -1
- package/dist/components/arcgis-video-player-actions-group/customElement.js +1 -1
- package/dist/components/arcgis-video-player-controls-group/customElement.js +1 -1
- package/dist/components/arcgis-video-player-metadata/customElement.js +1 -1
- package/dist/components/arcgis-video-player-settings/customElement.js +1 -1
- package/dist/components/arcgis-video-player-slider/customElement.js +1 -1
- package/dist/components/arcgis-volume-measurement/customElement.js +1 -1
- package/dist/components/arcgis-weather/customElement.js +1 -1
- package/dist/components/arcgis-zoom/customElement.js +1 -1
- package/dist/docs/api.json +2 -2
- package/dist/docs/docs.json +2 -2
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/package.json +3 -3
- package/dist/cdn/527X7JSV.js +0 -4
- package/dist/cdn/K63TEYDD.js +0 -4
- package/dist/cdn/VHWP2BID.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as f}from"./JC7T2EF2.js";import a from"./NDPRUIRJ.js";import{a as M}from"./53E6RXRI.js";import{b as E}from"./BKCRKBXQ.js";import{G as Q,H as j,I as k,J as h,M as R,O as B,a as D,b as o}from"./Y453EEUF.js";import"./OUDH32KU.js";export default $arcgis.t(([{templateHasKey:H,stripHTML:K},{isRelatableFeatureSupportedLayer:U,findRelatedLayer:X},{substitute:Y,formatNumber:T},{watch:F,on:ee},Z,W,{ignoreAbortErrors:N},te,{h:V}])=>{var re=D`:host{position:relative;flex:1 1 auto}.arcgis-feature-relationship__list{min-height:var(--calcite-spacing-xxxl)}.arcgis-feature-relationship__list-item--hidden{display:none}.arcgis-feature-relationship__feature-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.arcgis-feature-relationship__sticky-loading-container{display:flex;position:sticky;bottom:var(--calcite-spacing-sm);align-items:center;justify-content:center;z-index:2;margin:0;padding:0;height:var(--calcite-spacing-xxxl);pointer-events:none}`,ie=_=>{let e=[];if(_.formTemplate){let{description:t,title:r}=_.formTemplate;_.fields?.forEach(i=>{let s=r&&H(r,i.name),a=t&&H(t,i.name);(s||a)&&e.push(i.name)})}return e},O=100,se="arcgis-feature",c=`${se}-relationship`,u={base:c,listContainer:`${c}__list`,listItem:`${c}__list-item`,listItemHidden:`${c}__list-item--hidden`,listContainerQuerying:`${c}__list--querying`,featureObserver:`${c}__feature-observer`,stickySpinnerContainer:`${c}__sticky-loading-container`,loadingSpinnerContainer:`${c}__loading-container`},x=class extends k{constructor(){super(...arguments),this._increaseFeaturePage=()=>{let{state:e,showAllEnabled:t,relatedFeatures:r,featuresPerPage:i,featurePage:s}=this;e==="ready"&&t&&r.length>=i*s&&this.featurePage++},this._relatedFeatureIntersectionObserver=new IntersectionObserver(([e])=>{e?.isIntersecting&&this._increaseFeaturePage()},{root:window.document}),this._featurePage=1,this._cancelQuery=()=>{let{_queryAbortController:e}=this;e&&e.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{let{_queryFeatureCountAbortController:e}=this;e&&e.abort(),this._queryFeatureCountAbortController=null},this._cancelQueryPage=()=>{let{_queryPageAbortController:e}=this;e&&e.abort(),this._queryPageAbortController=null},this._queryController=async()=>{this._cancelQuery();let e=new AbortController;this._queryAbortController=e,await N(this._query()),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();let e=new AbortController;this._queryFeatureCountAbortController=e,await N(this._queryFeatureCount()),this._queryFeatureCountAbortController===e&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryPageController=async()=>{let e=new AbortController;this._queryPageAbortController=e,await N(this._queryPage()),this._queryPageAbortController===e&&(this._queryPageAbortController=null)},this._queryDebounced=f(this._queryController,O),this._queryFeatureCountDebounced=f(this._queryFeatureCountController,O),this._queryPageDebounced=f(this._queryPageController,O),this._query=async()=>{let{_queryAbortController:e,relatedFeatures:t}=this;!this.featureCount||this.relatedLayer?.type==="subtype-group"&&!this.activeCategory||(this.relatedFeatureViewModels.destroyAll(),this.featurePage=1,t.destroyAll(),t.addMany(this._sliceFeatures(await this._queryRelatedFeatures({signal:e?.signal}))))},this._addFlowItem=e=>{e&&this.flowItems?.push(e)},this._relatedFeatureIntersectionObserverNode=Q(),this.relatedFeatures=new Z,this._queryAbortController=null,this._queryPageAbortController=null,this._queryFeatureCountAbortController=null,this.featureCount=0,this._loaded=!1,this.relatedFeatureViewModels=new Z,this.autoDestroyDisabled=!1,this.featuresPerPage=10,this.flowType="feature-relationship",this.headingLevel=2,this.hideHeading=!1,this.hideDescription=!1,this.showAllEnabled=!1}static{this.properties={allCategories:16,_queryAbortController:16,_queryPageAbortController:16,_queryFeatureCountAbortController:16,featureCount:16,_loaded:16,canLoad:16,canQuery:16,displayShowAllButton:16,displayListItems:16,categories:16,itemDescriptionFieldName:16,relatedFeatureViewModels:16,state:16,autoDestroyDisabled:5,allItemsDescription:32,featurePage:9,featuresPerPage:9,flowItems:0,flowType:1,headingLevel:9,messages:0,heading:1,description:1,values:0,activeCategory:0,hideHeading:5,hideDescription:5,displayCount:9,graphic:0,layer:0,map:0,view:0,spatialReference:0,timeZone:1,orderByFields:0,relationshipId:9,showAllEnabled:5,label:3}}static{this.styles=re}get orderByFieldsFixedCasing(){let{orderByFields:e,relatedLayer:t}=this;return e&&t?.loaded?e.map(r=>{let i=r.clone();return i.field=V(r.field,t),i}):e??[]}get supportsCacheHint(){return!!this.layer?.capabilities?.queryRelated?.supportsCacheHint}get allCategoriesCount(){return this.allCategories?.length??0}get objectId(){return(this.objectIdField&&this.graphic?.attributes?.[this.objectIdField])??null}get objectIdField(){return this.layer?.objectIdField||null}get relatedLayer(){let{layer:e,map:t,relationship:r}=this;if(!e?.loaded||!t||!r)return null;let i=e.type==="subtype-sublayer"&&e.parent&&U(e.parent)?e.parent:e;return X(t,i,r)??null}get relatedLayerKeyField(){let{relatedLayer:e,relationshipId:t}=this;return e?.loaded&&t!=null?e.relationships?.find(r=>r.id===t)?.keyField:null}get relatedLayerKeyFields(){let{relatedLayer:e}=this;return e?.loaded?e.relationships?.map(t=>t.keyField).filter(t=>t!=null)??[]:[]}get relationship(){let{relationshipId:e,layer:t}=this;return e!=null&&t?.loaded?t.relationships?.find(({id:r})=>r===e)??null:null}get relationshipKey(){let{relationshipKeyField:e}=this;return(e&&this.graphic?.attributes?.[e])??null}get relationshipKeyField(){return this.relationship?.keyField||null}get canLoad(){return!!this.map&&this.relationshipId!=null&&typeof this.objectId=="number"}get canQuery(){let e=this.layer?.capabilities?.queryRelated;return!!this.relatedLayer&&!!this.relationship&&this.relationshipId!=null&&this.objectId!=null&&!!e?.supportsCount&&e?.supportsPagination}get displayShowAllButton(){let{showAllEnabled:e,featureCount:t,displayCount:r,state:i,allCategoriesCount:s}=this,a=!!s&&(s>r||r===0),n=!!t&&(t>r||r===0);return!e&&i==="ready"&&(a||n)}get displayListItems(){let{relatedFeatures:e,allCategoriesCount:t}=this;return this.displayShowAllButton||!!e.length||!!t}get categories(){let{allCategories:e}=this;return this.showAllEnabled?e:e?.slice(0,this.displayCount)??null}get itemDescriptionFieldName(){return this.orderByFieldsFixedCasing[0]?.field||null}get state(){let{_queryAbortController:e,_queryFeatureCountAbortController:t,_queryPageAbortController:r,canQuery:i,_loaded:s,canLoad:a}=this;return t||a&&!s?"loading":e||r?"querying":i?"ready":"disabled"}get allItemsDescription(){let{messages:e,featureCount:t,allCategories:r,allCategoriesCount:i}=this;return Y(e?.numberRecords??"",{number:T(r?i:t)})}get featurePage(){return this._featurePage}set featurePage(e){let{featuresPerPage:t,featureCount:r}=this,i=1,s=Math.ceil(r/t)||1;this._featurePage=Math.min(Math.max(e,i),s)}get heading(){let{activeCategory:e}=this;return this._heading??e?.name}set heading(e){this._heading=e}get displayCount(){return this._displayCount??3}set displayCount(e){this._displayCount=Math.min(Math.max(e??3,0),10)}async destroy(){await this.manager.destroy()}loaded(){this.manager.onLifecycle(()=>[F(()=>[this.displayCount,this.graphic,this.layer,this.layer?.loaded,this.map,this.orderByFields,this.relationshipId,this.featuresPerPage,this.showAllEnabled,this.canQuery,this.featureCount,this.activeCategory],()=>this._queryDebounced(),{initial:!0}),F(()=>[this.featurePage,this.showAllEnabled],()=>this._queryPageDebounced()),F(()=>[this.layer,this.relationshipId,this.objectId,this.canQuery,this.activeCategory],()=>this._queryFeatureCountDebounced(),{initial:!0}),F(()=>[this.state,this.showAllEnabled,this._relatedFeatureIntersectionObserverNode],()=>this._handleRelatedFeatureObserverChange()),ee(()=>this.relatedFeatures,"change",()=>this._setRelatedFeaturesViewModels())]),this.manager.onDestroy(()=>{this.relatedFeatureViewModels.destroyAll(),this.relatedFeatures.destroyAll(),this._cancelQuery(),this._cancelQueryFeatureCount(),this._cancelQueryPage(),this._unobserveRelatedFeatureObserver()})}async _queryFeatureCount(){let{layer:e,relatedLayer:t}=this;await e?.load(),await t?.load();let{_queryFeatureCountAbortController:r,activeCategory:i,canQuery:s,objectId:a,relatedLayerKeyField:n,relationshipId:l,relationshipKey:g,supportsCacheHint:v}=this;if(!s||!e||!t||a==null){this.featureCount=0,this.allCategories=void 0;return}if(t?.type==="subtype-group"&&!i){if(this.featureCount=0,this.relatedFeatureViewModels.destroyAll(),this.featurePage=1,this.relatedFeatures.destroyAll(),n&&g!=null){let{default:$}=await $arcgis.t(m=>m[0],"smartMapping/statistics/uniqueValues"),{uniqueValueInfos:A}=await $({layer:t,sqlWhere:`${n} = '${g}'`,field:t.subtypeField??void 0,signal:r?.signal}),q=A.map(({count:y,value:m})=>{let C=t.subtypes?.find(L=>L.code===m)?.name;return m!=null&&C?{count:y,value:m,name:C}:void 0}).filter(y=>y!=null);this.allCategories=q}return}let{historicMoment:b,gdbVersion:w}=e,I=new W({cacheHint:v,gdbVersion:w,historicMoment:b,relationshipId:l,returnGeometry:!1,objectIds:[a],where:this._getRelationshipWhereClause(t)}),p=await e.queryRelatedFeaturesCount(I,{signal:r?.signal});this.allCategories=void 0,this.featureCount=p[a]||0}_getRelationshipWhereClause(e){let{activeCategory:t}=this,r=e.createQuery(),i="subtypeField"in e?e.subtypeField:void 0,s=t&&i?`${i} = ${t.value}`:void 0,a=r.where;return a&&s?`(${a}) AND (${s})`:a??s}_sliceFeatures(e){let{showAllEnabled:t,displayCount:r}=this;return t?e:r?e.slice(0,r):[]}async _queryPage(){let{relatedFeatures:e,featurePage:t,showAllEnabled:r,_queryPageAbortController:i,featureCount:s}=this;!r||t<2||!s||this.relatedLayer?.type==="subtype-group"&&!this.activeCategory||e.addMany(await this._queryRelatedFeatures({signal:i?.signal}))}async _queryRelatedFeatures(e){let{displayCount:t,featureCount:r,featurePage:i,featuresPerPage:s,layer:a,orderByFieldsFixedCasing:n,relatedLayer:l,relatedLayerKeyFields:g,relationshipId:v,showAllEnabled:b,supportsCacheHint:w}=this,{canQuery:I,objectId:p}=this;if(!I||!a||!l||p==null)return[];let $=b?((i-1)*s+r)%r:0,A=b?s:t,q=l.objectIdField,y="subtypeField"in l?l.subtypeField:void 0,m=[...n.map(d=>d.field),...ie(l),...g,q,y].filter(d=>d!=null),C=n.map(d=>`${d.field} ${d.order}`),{historicMoment:L,gdbVersion:z}=a,G=new W({orderByFields:C,start:$,num:A,outFields:m,cacheHint:w,historicMoment:L,gdbVersion:z,relationshipId:v,returnGeometry:!1,objectIds:[p],where:this._getRelationshipWhereClause(l)}),P=(await a.queryRelatedFeatures(G,{signal:e?.signal}))[p]?.features||[];return l.type==="subtype-group"&&y?P.forEach(d=>{let J=d.attributes[y],S=l.findSublayerForSubtypeCode?.(J);d.sourceLayer=S,d.layer=S}):P.forEach(d=>{d.sourceLayer=l,d.layer=l}),P}_selectCategory(e){let{flowItems:t}=this;t&&this._addRelationshipFlowItem({showAllEnabled:!0,activeCategory:e})}_selectRecord(e){let{flowItems:t}=this;t&&this._addFlowItem(R(M(e,o`<arcgis-feature .flowItems=${t} .flowType=${this.flowType} .graphic=${e.graphic} .map=${this.map} show-relationship-content .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature>`)))}_addRelationshipFlowItem({showAllEnabled:e=!1,activeCategory:t}){this._addFlowItem(R(M(t,o`<arcgis-feature-relationship .messages=${this.messages} .activeCategory=${t} .displayCount=${this.displayCount} .flowItems=${this.flowItems} .flowType=${this.flowType} .graphic=${this.graphic} .heading=${this.heading} hide-description .showAllEnabled=${e} hide-heading .layer=${this.layer} .map=${this.map} .orderByFields=${this.orderByFields} .relationshipId=${this.relationshipId} .spatialReference=${this.spatialReference} .values=${this.values} .view=${this.view}></arcgis-feature-relationship>`)))}_showAllRecords(){let{flowItems:e}=this;e&&this._addRelationshipFlowItem({showAllEnabled:!0})}_handleRelatedFeatureObserverChange(){this._unobserveRelatedFeatureObserver();let{state:e,showAllEnabled:t}=this;this._relatedFeatureIntersectionObserverNode.value&&e==="ready"&&t&&this._relatedFeatureIntersectionObserver.observe(this._relatedFeatureIntersectionObserverNode.value)}_unobserveRelatedFeatureObserver(){this._relatedFeatureIntersectionObserverNode.value&&this._relatedFeatureIntersectionObserver.unobserve(this._relatedFeatureIntersectionObserverNode.value)}_matchesFeature(e,t){let r=e?.graphic?.getObjectId(),i=t?.getObjectId();return r!=null&&i!=null&&r===i}_setRelatedFeaturesViewModels(){let{relatedFeatures:e,relatedFeatureViewModels:t,map:r,view:i,spatialReference:s,timeZone:a}=this;e?.filter(Boolean).forEach(n=>{t.some(l=>this._matchesFeature(l,n))||t.add(new te({abilities:{relationshipContent:!1},map:r,view:i,spatialReference:s,timeZone:a,graphic:n}))}),t.forEach(n=>{e?.find(l=>this._matchesFeature(n,l))||t.remove(n)})}render(){let{state:e}=this;return o`<div class=${h(u.base)}><arcgis-feature-element-info .heading=${this.heading} .headingLevel=${this.headingLevel} .description=${this.description}></arcgis-feature-element-info>${e==="loading"?this._renderLoading():e==="disabled"?this._renderRelationshipNotFound():this._renderRelatedFeatures()}</div>`}_renderStickyLoading(){return this.state==="querying"?o`<div class=${h(u.stickySpinnerContainer)}>${this._renderLoadingIcon()}</div>`:null}_renderLoadingIcon(){return o`<calcite-loader inline label></calcite-loader>`}_renderLoading(){return o`<div class=${h(u.loadingSpinnerContainer)}>${this._renderLoadingIcon()}</div>`}_renderShowAllIconNode(){return o`<calcite-icon icon=list scale=s slot=content-end></calcite-icon>`}_renderChevronIconNode(){return o`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`}_renderCategory(e){let{count:t,name:r}=e,i=T(t);return o`<calcite-list-item class=${h(u.listItem)} .disabled=${!t} .label=${r} @calciteListItemSelect=${()=>this._selectCategory(e)}><calcite-chip .label=${i} scale=s slot=content-end>${i}</calcite-chip>${this._renderChevronIconNode()}</calcite-list-item>`}_renderRelatedFeature(e){let{itemDescriptionFieldName:t,values:r}=this,{formattedAttributes:i,state:s,title:a}=e,n={...i?.global,...r},l=(t&&n?.[t])??"",g=s==="loading";return o`<calcite-list-item class=${h(E(u.listItem,{[u.listItemHidden]:g}))} .description=${K(l.toString())} .label=${K(a)} @calciteListItemSelect=${()=>this._selectRecord(e)}>${this._renderChevronIconNode()}</calcite-list-item>`}_renderShowAllListItem(){return this.displayShowAllButton?o`<calcite-list-item .description=${this.allItemsDescription} .label=${this.messages?.showAll} @calciteListItemSelect=${()=>this._showAllRecords()}>${this._renderShowAllIconNode()}</calcite-list-item>`:null}_renderNoRelatedFeaturesMessage(){return o`<calcite-notice icon=information kind=brand open scale=s width=full><div slot=message>${this.messages?.noRelatedFeatures}</div></calcite-notice>`}_renderFeatureObserver(){return o`<div class=${h(u.featureObserver)} ${j(this._relatedFeatureIntersectionObserverNode)}></div>`}_renderList(){let{relatedFeatureViewModels:e,categories:t}=this;return o`<calcite-list display-mode=flat .label=${this.messages?.relatedFeaturesList??""}>${t?.map(r=>this._renderCategory(r))??e.toArray().map(r=>this._renderRelatedFeature(r))}${this._renderShowAllListItem()}</calcite-list>`}_renderRelatedFeatures(){let{displayListItems:e}=this,{state:t}=this;return o`<div class=${h(E(u.listContainer,{[u.listContainerQuerying]:t==="querying"}))}>${e?this._renderList():t==="ready"?this._renderNoRelatedFeaturesMessage():null}${this._renderStickyLoading()}${this._renderFeatureObserver()}</div>`}_renderRelationshipNotFound(){return o`<calcite-notice icon=exclamation-mark-triangle kind=danger open scale=s width=full><div slot=message>${this.messages?.relationshipNotFound}</div></calcite-notice>`}};B("arcgis-feature-relationship",x);return x},"applications/Components/stringUtils","applications/Components/featureUtils","intl","core/reactiveUtils","core/Collection","rest/support/RelationshipQuery","core/promiseUtils","widgets/Feature/FeatureViewModel",a)
|
|
3
|
+
v5.0.0-next.64 */
|
|
4
|
+
import{a as f}from"./G7WBRF3F.js";import a from"./FEBGCB5D.js";import{a as M}from"./NETXBRSR.js";import{b as E}from"./4JCGYSBS.js";import{G as Q,H as j,I as k,J as h,M as R,O as B,a as D,b as o}from"./YTCSJTV2.js";import"./GLF65OBX.js";export default $arcgis.t(([{templateHasKey:H,stripHTML:K},{isRelatableFeatureSupportedLayer:U,findRelatedLayer:X},{substitute:Y,formatNumber:T},{watch:F,on:ee},Z,W,{ignoreAbortErrors:N},te,{h:V}])=>{var re=D`:host{position:relative;flex:1 1 auto}.arcgis-feature-relationship__list{min-height:var(--calcite-spacing-xxxl)}.arcgis-feature-relationship__list-item--hidden{display:none}.arcgis-feature-relationship__feature-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.arcgis-feature-relationship__sticky-loading-container{display:flex;position:sticky;bottom:var(--calcite-spacing-sm);align-items:center;justify-content:center;z-index:2;margin:0;padding:0;height:var(--calcite-spacing-xxxl);pointer-events:none}`,ie=_=>{let e=[];if(_.formTemplate){let{description:t,title:r}=_.formTemplate;_.fields?.forEach(i=>{let s=r&&H(r,i.name),a=t&&H(t,i.name);(s||a)&&e.push(i.name)})}return e},O=100,se="arcgis-feature",c=`${se}-relationship`,u={base:c,listContainer:`${c}__list`,listItem:`${c}__list-item`,listItemHidden:`${c}__list-item--hidden`,listContainerQuerying:`${c}__list--querying`,featureObserver:`${c}__feature-observer`,stickySpinnerContainer:`${c}__sticky-loading-container`,loadingSpinnerContainer:`${c}__loading-container`},x=class extends k{constructor(){super(...arguments),this._increaseFeaturePage=()=>{let{state:e,showAllEnabled:t,relatedFeatures:r,featuresPerPage:i,featurePage:s}=this;e==="ready"&&t&&r.length>=i*s&&this.featurePage++},this._relatedFeatureIntersectionObserver=new IntersectionObserver(([e])=>{e?.isIntersecting&&this._increaseFeaturePage()},{root:window.document}),this._featurePage=1,this._cancelQuery=()=>{let{_queryAbortController:e}=this;e&&e.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{let{_queryFeatureCountAbortController:e}=this;e&&e.abort(),this._queryFeatureCountAbortController=null},this._cancelQueryPage=()=>{let{_queryPageAbortController:e}=this;e&&e.abort(),this._queryPageAbortController=null},this._queryController=async()=>{this._cancelQuery();let e=new AbortController;this._queryAbortController=e,await N(this._query()),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();let e=new AbortController;this._queryFeatureCountAbortController=e,await N(this._queryFeatureCount()),this._queryFeatureCountAbortController===e&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryPageController=async()=>{let e=new AbortController;this._queryPageAbortController=e,await N(this._queryPage()),this._queryPageAbortController===e&&(this._queryPageAbortController=null)},this._queryDebounced=f(this._queryController,O),this._queryFeatureCountDebounced=f(this._queryFeatureCountController,O),this._queryPageDebounced=f(this._queryPageController,O),this._query=async()=>{let{_queryAbortController:e,relatedFeatures:t}=this;!this.featureCount||this.relatedLayer?.type==="subtype-group"&&!this.activeCategory||(this.relatedFeatureViewModels.destroyAll(),this.featurePage=1,t.destroyAll(),t.addMany(this._sliceFeatures(await this._queryRelatedFeatures({signal:e?.signal}))))},this._addFlowItem=e=>{e&&this.flowItems?.push(e)},this._relatedFeatureIntersectionObserverNode=Q(),this.relatedFeatures=new Z,this._queryAbortController=null,this._queryPageAbortController=null,this._queryFeatureCountAbortController=null,this.featureCount=0,this._loaded=!1,this.relatedFeatureViewModels=new Z,this.autoDestroyDisabled=!1,this.featuresPerPage=10,this.flowType="feature-relationship",this.headingLevel=2,this.hideHeading=!1,this.hideDescription=!1,this.showAllEnabled=!1}static{this.properties={allCategories:16,_queryAbortController:16,_queryPageAbortController:16,_queryFeatureCountAbortController:16,featureCount:16,_loaded:16,canLoad:16,canQuery:16,displayShowAllButton:16,displayListItems:16,categories:16,itemDescriptionFieldName:16,relatedFeatureViewModels:16,state:16,autoDestroyDisabled:5,allItemsDescription:32,featurePage:9,featuresPerPage:9,flowItems:0,flowType:1,headingLevel:9,messages:0,heading:1,description:1,values:0,activeCategory:0,hideHeading:5,hideDescription:5,displayCount:9,graphic:0,layer:0,map:0,view:0,spatialReference:0,timeZone:1,orderByFields:0,relationshipId:9,showAllEnabled:5,label:3}}static{this.styles=re}get orderByFieldsFixedCasing(){let{orderByFields:e,relatedLayer:t}=this;return e&&t?.loaded?e.map(r=>{let i=r.clone();return i.field=V(r.field,t),i}):e??[]}get supportsCacheHint(){return!!this.layer?.capabilities?.queryRelated?.supportsCacheHint}get allCategoriesCount(){return this.allCategories?.length??0}get objectId(){return(this.objectIdField&&this.graphic?.attributes?.[this.objectIdField])??null}get objectIdField(){return this.layer?.objectIdField||null}get relatedLayer(){let{layer:e,map:t,relationship:r}=this;if(!e?.loaded||!t||!r)return null;let i=e.type==="subtype-sublayer"&&e.parent&&U(e.parent)?e.parent:e;return X(t,i,r)??null}get relatedLayerKeyField(){let{relatedLayer:e,relationshipId:t}=this;return e?.loaded&&t!=null?e.relationships?.find(r=>r.id===t)?.keyField:null}get relatedLayerKeyFields(){let{relatedLayer:e}=this;return e?.loaded?e.relationships?.map(t=>t.keyField).filter(t=>t!=null)??[]:[]}get relationship(){let{relationshipId:e,layer:t}=this;return e!=null&&t?.loaded?t.relationships?.find(({id:r})=>r===e)??null:null}get relationshipKey(){let{relationshipKeyField:e}=this;return(e&&this.graphic?.attributes?.[e])??null}get relationshipKeyField(){return this.relationship?.keyField||null}get canLoad(){return!!this.map&&this.relationshipId!=null&&typeof this.objectId=="number"}get canQuery(){let e=this.layer?.capabilities?.queryRelated;return!!this.relatedLayer&&!!this.relationship&&this.relationshipId!=null&&this.objectId!=null&&!!e?.supportsCount&&e?.supportsPagination}get displayShowAllButton(){let{showAllEnabled:e,featureCount:t,displayCount:r,state:i,allCategoriesCount:s}=this,a=!!s&&(s>r||r===0),n=!!t&&(t>r||r===0);return!e&&i==="ready"&&(a||n)}get displayListItems(){let{relatedFeatures:e,allCategoriesCount:t}=this;return this.displayShowAllButton||!!e.length||!!t}get categories(){let{allCategories:e}=this;return this.showAllEnabled?e:e?.slice(0,this.displayCount)??null}get itemDescriptionFieldName(){return this.orderByFieldsFixedCasing[0]?.field||null}get state(){let{_queryAbortController:e,_queryFeatureCountAbortController:t,_queryPageAbortController:r,canQuery:i,_loaded:s,canLoad:a}=this;return t||a&&!s?"loading":e||r?"querying":i?"ready":"disabled"}get allItemsDescription(){let{messages:e,featureCount:t,allCategories:r,allCategoriesCount:i}=this;return Y(e?.numberRecords??"",{number:T(r?i:t)})}get featurePage(){return this._featurePage}set featurePage(e){let{featuresPerPage:t,featureCount:r}=this,i=1,s=Math.ceil(r/t)||1;this._featurePage=Math.min(Math.max(e,i),s)}get heading(){let{activeCategory:e}=this;return this._heading??e?.name}set heading(e){this._heading=e}get displayCount(){return this._displayCount??3}set displayCount(e){this._displayCount=Math.min(Math.max(e??3,0),10)}async destroy(){await this.manager.destroy()}loaded(){this.manager.onLifecycle(()=>[F(()=>[this.displayCount,this.graphic,this.layer,this.layer?.loaded,this.map,this.orderByFields,this.relationshipId,this.featuresPerPage,this.showAllEnabled,this.canQuery,this.featureCount,this.activeCategory],()=>this._queryDebounced(),{initial:!0}),F(()=>[this.featurePage,this.showAllEnabled],()=>this._queryPageDebounced()),F(()=>[this.layer,this.relationshipId,this.objectId,this.canQuery,this.activeCategory],()=>this._queryFeatureCountDebounced(),{initial:!0}),F(()=>[this.state,this.showAllEnabled,this._relatedFeatureIntersectionObserverNode],()=>this._handleRelatedFeatureObserverChange()),ee(()=>this.relatedFeatures,"change",()=>this._setRelatedFeaturesViewModels())]),this.manager.onDestroy(()=>{this.relatedFeatureViewModels.destroyAll(),this.relatedFeatures.destroyAll(),this._cancelQuery(),this._cancelQueryFeatureCount(),this._cancelQueryPage(),this._unobserveRelatedFeatureObserver()})}async _queryFeatureCount(){let{layer:e,relatedLayer:t}=this;await e?.load(),await t?.load();let{_queryFeatureCountAbortController:r,activeCategory:i,canQuery:s,objectId:a,relatedLayerKeyField:n,relationshipId:l,relationshipKey:g,supportsCacheHint:v}=this;if(!s||!e||!t||a==null){this.featureCount=0,this.allCategories=void 0;return}if(t?.type==="subtype-group"&&!i){if(this.featureCount=0,this.relatedFeatureViewModels.destroyAll(),this.featurePage=1,this.relatedFeatures.destroyAll(),n&&g!=null){let{default:$}=await $arcgis.t(m=>m[0],"smartMapping/statistics/uniqueValues"),{uniqueValueInfos:A}=await $({layer:t,sqlWhere:`${n} = '${g}'`,field:t.subtypeField??void 0,signal:r?.signal}),q=A.map(({count:y,value:m})=>{let C=t.subtypes?.find(L=>L.code===m)?.name;return m!=null&&C?{count:y,value:m,name:C}:void 0}).filter(y=>y!=null);this.allCategories=q}return}let{historicMoment:b,gdbVersion:w}=e,I=new W({cacheHint:v,gdbVersion:w,historicMoment:b,relationshipId:l,returnGeometry:!1,objectIds:[a],where:this._getRelationshipWhereClause(t)}),p=await e.queryRelatedFeaturesCount(I,{signal:r?.signal});this.allCategories=void 0,this.featureCount=p[a]||0}_getRelationshipWhereClause(e){let{activeCategory:t}=this,r=e.createQuery(),i="subtypeField"in e?e.subtypeField:void 0,s=t&&i?`${i} = ${t.value}`:void 0,a=r.where;return a&&s?`(${a}) AND (${s})`:a??s}_sliceFeatures(e){let{showAllEnabled:t,displayCount:r}=this;return t?e:r?e.slice(0,r):[]}async _queryPage(){let{relatedFeatures:e,featurePage:t,showAllEnabled:r,_queryPageAbortController:i,featureCount:s}=this;!r||t<2||!s||this.relatedLayer?.type==="subtype-group"&&!this.activeCategory||e.addMany(await this._queryRelatedFeatures({signal:i?.signal}))}async _queryRelatedFeatures(e){let{displayCount:t,featureCount:r,featurePage:i,featuresPerPage:s,layer:a,orderByFieldsFixedCasing:n,relatedLayer:l,relatedLayerKeyFields:g,relationshipId:v,showAllEnabled:b,supportsCacheHint:w}=this,{canQuery:I,objectId:p}=this;if(!I||!a||!l||p==null)return[];let $=b?((i-1)*s+r)%r:0,A=b?s:t,q=l.objectIdField,y="subtypeField"in l?l.subtypeField:void 0,m=[...n.map(d=>d.field),...ie(l),...g,q,y].filter(d=>d!=null),C=n.map(d=>`${d.field} ${d.order}`),{historicMoment:L,gdbVersion:z}=a,G=new W({orderByFields:C,start:$,num:A,outFields:m,cacheHint:w,historicMoment:L,gdbVersion:z,relationshipId:v,returnGeometry:!1,objectIds:[p],where:this._getRelationshipWhereClause(l)}),P=(await a.queryRelatedFeatures(G,{signal:e?.signal}))[p]?.features||[];return l.type==="subtype-group"&&y?P.forEach(d=>{let J=d.attributes[y],S=l.findSublayerForSubtypeCode?.(J);d.sourceLayer=S,d.layer=S}):P.forEach(d=>{d.sourceLayer=l,d.layer=l}),P}_selectCategory(e){let{flowItems:t}=this;t&&this._addRelationshipFlowItem({showAllEnabled:!0,activeCategory:e})}_selectRecord(e){let{flowItems:t}=this;t&&this._addFlowItem(R(M(e,o`<arcgis-feature .flowItems=${t} .flowType=${this.flowType} .graphic=${e.graphic} .map=${this.map} show-relationship-content .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature>`)))}_addRelationshipFlowItem({showAllEnabled:e=!1,activeCategory:t}){this._addFlowItem(R(M(t,o`<arcgis-feature-relationship .messages=${this.messages} .activeCategory=${t} .displayCount=${this.displayCount} .flowItems=${this.flowItems} .flowType=${this.flowType} .graphic=${this.graphic} .heading=${this.heading} hide-description .showAllEnabled=${e} hide-heading .layer=${this.layer} .map=${this.map} .orderByFields=${this.orderByFields} .relationshipId=${this.relationshipId} .spatialReference=${this.spatialReference} .values=${this.values} .view=${this.view}></arcgis-feature-relationship>`)))}_showAllRecords(){let{flowItems:e}=this;e&&this._addRelationshipFlowItem({showAllEnabled:!0})}_handleRelatedFeatureObserverChange(){this._unobserveRelatedFeatureObserver();let{state:e,showAllEnabled:t}=this;this._relatedFeatureIntersectionObserverNode.value&&e==="ready"&&t&&this._relatedFeatureIntersectionObserver.observe(this._relatedFeatureIntersectionObserverNode.value)}_unobserveRelatedFeatureObserver(){this._relatedFeatureIntersectionObserverNode.value&&this._relatedFeatureIntersectionObserver.unobserve(this._relatedFeatureIntersectionObserverNode.value)}_matchesFeature(e,t){let r=e?.graphic?.getObjectId(),i=t?.getObjectId();return r!=null&&i!=null&&r===i}_setRelatedFeaturesViewModels(){let{relatedFeatures:e,relatedFeatureViewModels:t,map:r,view:i,spatialReference:s,timeZone:a}=this;e?.filter(Boolean).forEach(n=>{t.some(l=>this._matchesFeature(l,n))||t.add(new te({abilities:{relationshipContent:!1},map:r,view:i,spatialReference:s,timeZone:a,graphic:n}))}),t.forEach(n=>{e?.find(l=>this._matchesFeature(n,l))||t.remove(n)})}render(){let{state:e}=this;return o`<div class=${h(u.base)}><arcgis-feature-element-info .heading=${this.heading} .headingLevel=${this.headingLevel} .description=${this.description}></arcgis-feature-element-info>${e==="loading"?this._renderLoading():e==="disabled"?this._renderRelationshipNotFound():this._renderRelatedFeatures()}</div>`}_renderStickyLoading(){return this.state==="querying"?o`<div class=${h(u.stickySpinnerContainer)}>${this._renderLoadingIcon()}</div>`:null}_renderLoadingIcon(){return o`<calcite-loader inline label></calcite-loader>`}_renderLoading(){return o`<div class=${h(u.loadingSpinnerContainer)}>${this._renderLoadingIcon()}</div>`}_renderShowAllIconNode(){return o`<calcite-icon icon=list scale=s slot=content-end></calcite-icon>`}_renderChevronIconNode(){return o`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`}_renderCategory(e){let{count:t,name:r}=e,i=T(t);return o`<calcite-list-item class=${h(u.listItem)} .disabled=${!t} .label=${r} @calciteListItemSelect=${()=>this._selectCategory(e)}><calcite-chip .label=${i} scale=s slot=content-end>${i}</calcite-chip>${this._renderChevronIconNode()}</calcite-list-item>`}_renderRelatedFeature(e){let{itemDescriptionFieldName:t,values:r}=this,{formattedAttributes:i,state:s,title:a}=e,n={...i?.global,...r},l=(t&&n?.[t])??"",g=s==="loading";return o`<calcite-list-item class=${h(E(u.listItem,{[u.listItemHidden]:g}))} .description=${K(l.toString())} .label=${K(a)} @calciteListItemSelect=${()=>this._selectRecord(e)}>${this._renderChevronIconNode()}</calcite-list-item>`}_renderShowAllListItem(){return this.displayShowAllButton?o`<calcite-list-item .description=${this.allItemsDescription} .label=${this.messages?.showAll} @calciteListItemSelect=${()=>this._showAllRecords()}>${this._renderShowAllIconNode()}</calcite-list-item>`:null}_renderNoRelatedFeaturesMessage(){return o`<calcite-notice icon=information kind=brand open scale=s width=full><div slot=message>${this.messages?.noRelatedFeatures}</div></calcite-notice>`}_renderFeatureObserver(){return o`<div class=${h(u.featureObserver)} ${j(this._relatedFeatureIntersectionObserverNode)}></div>`}_renderList(){let{relatedFeatureViewModels:e,categories:t}=this;return o`<calcite-list display-mode=flat .label=${this.messages?.relatedFeaturesList??""}>${t?.map(r=>this._renderCategory(r))??e.toArray().map(r=>this._renderRelatedFeature(r))}${this._renderShowAllListItem()}</calcite-list>`}_renderRelatedFeatures(){let{displayListItems:e}=this,{state:t}=this;return o`<div class=${h(E(u.listContainer,{[u.listContainerQuerying]:t==="querying"}))}>${e?this._renderList():t==="ready"?this._renderNoRelatedFeaturesMessage():null}${this._renderStickyLoading()}${this._renderFeatureObserver()}</div>`}_renderRelationshipNotFound(){return o`<calcite-notice icon=exclamation-mark-triangle kind=danger open scale=s width=full><div slot=message>${this.messages?.relationshipNotFound}</div></calcite-notice>`}};B("arcgis-feature-relationship",x);return x},"applications/Components/stringUtils","applications/Components/featureUtils","intl","core/reactiveUtils","core/Collection","rest/support/RelationshipQuery","core/promiseUtils","widgets/Feature/FeatureViewModel",a)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as p,d as c}from"./LVHD6GZD.js";import j from"./S2RESMX6.js";import"./ZJVOCEY6.js";import i from"./Z7ZS7KFN.js";import"./WXNWY3FO.js";import e from"./O6HWFB4W.js";import{a as y}from"./3NACO3KH.js";import{a as g}from"./QB64EJHB.js";import d from"./S7N55PYB.js";import a from"./22UN5EMA.js";import{g as x}from"./XCAK6VPC.js";import"./TDHJIJLS.js";import"./63Q7R555.js";import"./BKCRKBXQ.js";import{I as w,J as f,L as v,O as b,a as m,b as h,s as _}from"./Y453EEUF.js";import"./OUDH32KU.js";export default $arcgis.t(([M,{isAboveGeodesicDistanceThreshold:$},{getDefaultUnitForView:U},{property:n,subclass:L},{watch:j},,,k,{e:z},D])=>{var C=m`.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{--esri-widget-padding-x: 15px;--esri-widget-padding-y: var(--calcite-spacing-md);--esri-widget-padding: var(--esri-widget-padding-y) var(--esri-widget-padding-x);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__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(--esri-widget-padding);transition:max-height .25s ease-in-out;overflow-y:auto}.esri-unit-select{width:100%}.esri-unit-select__label{--calcite-label-margin-bottom: 0;width:100%}:host{display:block}.esri-measurement-widget-content{padding:var(--esri-widget-padding);flex-direction:column;gap:var(--calcite-spacing-xxl);display:flex;position:relative;overflow-y:auto}.esri-measurement-widget-content__error{color:var(--calcite-color-status-danger)}.esri-measurement-widget-content__error,.esri-measurement-widget-content__hint{overflow:hidden}.esri-measurement-widget-content__error p,.esri-measurement-widget-content__hint p{margin:0;padding:0}.esri-measurement-widget-content__hint,.esri-measurement-widget-content__error,.esri-measurement-widget-content__measurement,.esri-measurement-widget-content__measurement-item{flex-direction:column;gap:var(--calcite-spacing-md);animation:.25s ease-in-out esri-fade-in;display:flex}.esri-measurement-widget-content__measurement-item--disabled{color:var(--calcite-color-border-ghost)}.esri-measurement-widget-content__measurement-item__value{font-weight:var(--calcite-font-weight-semibold)}.esri-measurement-widget-content__actions{flex-direction:column;justify-content:center;gap:var(--calcite-spacing-xs);display:flex}:host{width:300px}`,E=Object.defineProperty,P=Object.getOwnPropertyDescriptor,a=(e,t,i,s)=>{for(var o=s>1?void 0:s?P(t,i):t,l=e.length-1,d;l>=0;l--)(d=e[l])&&(o=(s?d(t,i,o):d(o))||o);return s&&o&&E(t,i,o),o},r=class extends D{constructor(){super(...arguments),this.supportedViewType="3d",this.unsupportedErrorMessage="The Direct Line Measurement 3D component is only supported in 3D views."}initialize(){this.addHandles(j(()=>({analysis:this.analysis,unit:this.unit}),({analysis:e,unit:t})=>{e!=null&&(e.unit=t)},{sync:!0,initial:!0}))}get state(){return this.disabled||!this.ready?"disabled":this.operationState==="inactive"?this.analysis.valid?"measured":"ready":"measuring"}get displayState(){if(!this.supported)return"unsupported";switch(this.state){case"disabled":case"ready":return"ready";case"measuring":return this.analysis.startPoint==null?"measuring":"measured";case"measured":return"measured"}}get measurement(){let e=this.analysisView?.result,t=e?.mode??"euclidean";if(!this.analysis.valid)return{mode:t,directDistance:c(void 0),horizontalDistance:c(void 0),verticalDistance:c(void 0)};let i=e?.directDistance,s=i!=null&&$(i);return{mode:t,directDistance:c(s?void 0:i),horizontalDistance:c(e?.horizontalDistance),verticalDistance:c(e?.verticalDistance)}}get unitOptions(){let e=this._userUnitOptions?.filter(t=>p.includes(t));return e&&e.length>0?e:p.slice()}set unitOptions(e){this._userUnitOptions=e}get unit(){let e=this._userUnit??this.analysis.unit,t=this.unitOptions;if(e&&t.includes(e))return e;let i=this._defaultUnit;return i&&t.includes(i)?i:t[0]}set unit(e){this._userUnit=e}get _defaultUnit(){return this.view?U(this.view):void 0}async place(e){await this.analysisView?.place(e)}clearAnalysis(){this.analysis.startPoint=null,this.analysis.endPoint=null}constructAnalysis(){return new M}};a([n({readOnly:!0})],r.prototype,"state",1);a([n({readOnly:!0})],r.prototype,"displayState",1);a([n({readOnly:!0})],r.prototype,"measurement",1);a([n()],r.prototype,"unitOptions",1);a([n()],r.prototype,"_userUnitOptions",2);a([n()],r.prototype,"unit",1);a([n()],r.prototype,"_userUnit",2);a([n({readOnly:!0})],r.prototype,"_defaultUnit",1);r=a([L("components.direct-line-measurement-3d.DirectLineMeasurement3dViewModel")],r);var V="arcgis-direct-line-measurement-3d",A={base:V},S=k(r),u=class extends w{constructor(){super(...arguments),this.viewModel=S(this),this.messages=y({name:"directline-measurement-3d",blocking:!0}),this.view=this.viewModel.view,this.analysis=this.viewModel.analysis,this.autoDestroyDisabled=!1,this.icon="measure-line",this.state=this.viewModel.state,this.unit=this.viewModel.unit,this.unitOptions=this.viewModel.unitOptions,this.arcgisPropertyChange=x()("analysis","state"),this.arcgisReady=_()}static{this.properties={view:0,analysis:0,autoDestroyDisabled:5,icon:3,label:1,position:1,referenceElement:1,state:35,unit:1,unitOptions:0}}static{this.styles=C}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy()}async start(){z(this.viewModel.start())}render(){let{messages:t,unit:i,unitOptions:s,viewModel:o}=this,{measurement:l,state:d}=o;return h`<div aria-label=${t.componentLabel??v} class=${f({[A.base]:!0,[g.widget]:!0,[g.panel]:!0})} role=presentation><arcgis-measurement-content .state=${o.displayState} .hintLabel=${t.hint} .unsupportedLabel=${t.unsupported} .items=${[{title:t.direct,measurement:l.directDistance},{title:t.horizontal,measurement:l.horizontalDistance},{title:t.vertical,measurement:l.verticalDistance}]}><arcgis-unit-select slot=settings .options=${s} .selectLabel=${t.unit} .value=${i} @arcgisUnitSelectChange=${O=>{this.unit=O.detail}}></arcgis-unit-select><calcite-button slot=actions .disabled=${d==="disabled"} @click=${this.start}>${t.newMeasurement}</calcite-button></arcgis-measurement-content></div>`}};b("arcgis-direct-line-measurement-3d",u);return u},"analysis/DirectLineMeasurementAnalysis","applications/Components/analysisUtils","applications/Components/getDefaultUnits","core/accessorSupport/decorators","core/reactiveUtils",a,d,e,i,j)
|
|
3
|
+
v5.0.0-next.64 */
|
|
4
|
+
import{a as p,d as c}from"./Y77HECJ4.js";import j from"./GAZ33ABI.js";import"./WU73LKLD.js";import i from"./GHDGNI7M.js";import"./5IMCYYOC.js";import e from"./M6LJ434S.js";import{a as y}from"./OTCI7IQX.js";import{a as g}from"./SGTCBTC5.js";import d from"./2PXPFBQ7.js";import a from"./ALMUOVFH.js";import{g as x}from"./NIDPKSBS.js";import"./GC3J2KGC.js";import"./PLEYUHX7.js";import"./4JCGYSBS.js";import{I as w,J as f,L as v,O as b,a as m,b as h,s as _}from"./YTCSJTV2.js";import"./GLF65OBX.js";export default $arcgis.t(([M,{isAboveGeodesicDistanceThreshold:$},{getDefaultUnitForView:U},{property:n,subclass:L},{watch:j},,,k,{e:z},D])=>{var C=m`.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{--esri-widget-padding-x: 15px;--esri-widget-padding-y: var(--calcite-spacing-md);--esri-widget-padding: var(--esri-widget-padding-y) var(--esri-widget-padding-x);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__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(--esri-widget-padding);transition:max-height .25s ease-in-out;overflow-y:auto}.esri-unit-select{width:100%}.esri-unit-select__label{--calcite-label-margin-bottom: 0;width:100%}:host{display:block}.esri-measurement-widget-content{padding:var(--esri-widget-padding);flex-direction:column;gap:var(--calcite-spacing-xxl);display:flex;position:relative;overflow-y:auto}.esri-measurement-widget-content__error{color:var(--calcite-color-status-danger)}.esri-measurement-widget-content__error,.esri-measurement-widget-content__hint{overflow:hidden}.esri-measurement-widget-content__error p,.esri-measurement-widget-content__hint p{margin:0;padding:0}.esri-measurement-widget-content__hint,.esri-measurement-widget-content__error,.esri-measurement-widget-content__measurement,.esri-measurement-widget-content__measurement-item{flex-direction:column;gap:var(--calcite-spacing-md);animation:.25s ease-in-out esri-fade-in;display:flex}.esri-measurement-widget-content__measurement-item--disabled{color:var(--calcite-color-border-ghost)}.esri-measurement-widget-content__measurement-item__value{font-weight:var(--calcite-font-weight-semibold)}.esri-measurement-widget-content__actions{flex-direction:column;justify-content:center;gap:var(--calcite-spacing-xs);display:flex}:host{width:300px}`,E=Object.defineProperty,P=Object.getOwnPropertyDescriptor,a=(e,t,i,s)=>{for(var o=s>1?void 0:s?P(t,i):t,l=e.length-1,d;l>=0;l--)(d=e[l])&&(o=(s?d(t,i,o):d(o))||o);return s&&o&&E(t,i,o),o},r=class extends D{constructor(){super(...arguments),this.supportedViewType="3d",this.unsupportedErrorMessage="The Direct Line Measurement 3D component is only supported in 3D views."}initialize(){this.addHandles(j(()=>({analysis:this.analysis,unit:this.unit}),({analysis:e,unit:t})=>{e!=null&&(e.unit=t)},{sync:!0,initial:!0}))}get state(){return this.disabled||!this.ready?"disabled":this.operationState==="inactive"?this.analysis.valid?"measured":"ready":"measuring"}get displayState(){if(!this.supported)return"unsupported";switch(this.state){case"disabled":case"ready":return"ready";case"measuring":return this.analysis.startPoint==null?"measuring":"measured";case"measured":return"measured"}}get measurement(){let e=this.analysisView?.result,t=e?.mode??"euclidean";if(!this.analysis.valid)return{mode:t,directDistance:c(void 0),horizontalDistance:c(void 0),verticalDistance:c(void 0)};let i=e?.directDistance,s=i!=null&&$(i);return{mode:t,directDistance:c(s?void 0:i),horizontalDistance:c(e?.horizontalDistance),verticalDistance:c(e?.verticalDistance)}}get unitOptions(){let e=this._userUnitOptions?.filter(t=>p.includes(t));return e&&e.length>0?e:p.slice()}set unitOptions(e){this._userUnitOptions=e}get unit(){let e=this._userUnit??this.analysis.unit,t=this.unitOptions;if(e&&t.includes(e))return e;let i=this._defaultUnit;return i&&t.includes(i)?i:t[0]}set unit(e){this._userUnit=e}get _defaultUnit(){return this.view?U(this.view):void 0}async place(e){await this.analysisView?.place(e)}clearAnalysis(){this.analysis.startPoint=null,this.analysis.endPoint=null}constructAnalysis(){return new M}};a([n({readOnly:!0})],r.prototype,"state",1);a([n({readOnly:!0})],r.prototype,"displayState",1);a([n({readOnly:!0})],r.prototype,"measurement",1);a([n()],r.prototype,"unitOptions",1);a([n()],r.prototype,"_userUnitOptions",2);a([n()],r.prototype,"unit",1);a([n()],r.prototype,"_userUnit",2);a([n({readOnly:!0})],r.prototype,"_defaultUnit",1);r=a([L("components.direct-line-measurement-3d.DirectLineMeasurement3dViewModel")],r);var V="arcgis-direct-line-measurement-3d",A={base:V},S=k(r),u=class extends w{constructor(){super(...arguments),this.viewModel=S(this),this.messages=y({name:"directline-measurement-3d",blocking:!0}),this.view=this.viewModel.view,this.analysis=this.viewModel.analysis,this.autoDestroyDisabled=!1,this.icon="measure-line",this.state=this.viewModel.state,this.unit=this.viewModel.unit,this.unitOptions=this.viewModel.unitOptions,this.arcgisPropertyChange=x()("analysis","state"),this.arcgisReady=_()}static{this.properties={view:0,analysis:0,autoDestroyDisabled:5,icon:3,label:1,position:1,referenceElement:1,state:35,unit:1,unitOptions:0}}static{this.styles=C}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy()}async start(){z(this.viewModel.start())}render(){let{messages:t,unit:i,unitOptions:s,viewModel:o}=this,{measurement:l,state:d}=o;return h`<div aria-label=${t.componentLabel??v} class=${f({[A.base]:!0,[g.widget]:!0,[g.panel]:!0})} role=presentation><arcgis-measurement-content .state=${o.displayState} .hintLabel=${t.hint} .unsupportedLabel=${t.unsupported} .items=${[{title:t.direct,measurement:l.directDistance},{title:t.horizontal,measurement:l.horizontalDistance},{title:t.vertical,measurement:l.verticalDistance}]}><arcgis-unit-select slot=settings .options=${s} .selectLabel=${t.unit} .value=${i} @arcgisUnitSelectChange=${O=>{this.unit=O.detail}}></arcgis-unit-select><calcite-button slot=actions .disabled=${d==="disabled"} @click=${this.start}>${t.newMeasurement}</calcite-button></arcgis-measurement-content></div>`}};b("arcgis-direct-line-measurement-3d",u);return u},"analysis/DirectLineMeasurementAnalysis","applications/Components/analysisUtils","applications/Components/getDefaultUnits","core/accessorSupport/decorators","core/reactiveUtils",a,d,e,i,j)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{b as g,d as p}from"./LVHD6GZD.js";import j from"./S2RESMX6.js";import"./ZJVOCEY6.js";import i from"./Z7ZS7KFN.js";import"./WXNWY3FO.js";import e from"./O6HWFB4W.js";import{a as y}from"./3NACO3KH.js";import{a as c}from"./QB64EJHB.js";import d from"./S7N55PYB.js";import a from"./22UN5EMA.js";import{g as x}from"./XCAK6VPC.js";import"./TDHJIJLS.js";import"./63Q7R555.js";import"./BKCRKBXQ.js";import{I as w,J as f,L as v,O as b,a as m,b as h,s as _}from"./Y453EEUF.js";import"./OUDH32KU.js";export default $arcgis.t(([$,{hasValidAreaResult:U},{getDefaultUnitForView:A},{property:n,subclass:D},{watch:j},,,k,{e:z},M])=>{var C=m`.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{--esri-widget-padding-x: 15px;--esri-widget-padding-y: var(--calcite-spacing-md);--esri-widget-padding: var(--esri-widget-padding-y) var(--esri-widget-padding-x);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__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(--esri-widget-padding);transition:max-height .25s ease-in-out;overflow-y:auto}.esri-unit-select{width:100%}.esri-unit-select__label{--calcite-label-margin-bottom: 0;width:100%}:host{display:block}.esri-measurement-widget-content{padding:var(--esri-widget-padding);flex-direction:column;gap:var(--calcite-spacing-xxl);display:flex;position:relative;overflow-y:auto}.esri-measurement-widget-content__error{color:var(--calcite-color-status-danger)}.esri-measurement-widget-content__error,.esri-measurement-widget-content__hint{overflow:hidden}.esri-measurement-widget-content__error p,.esri-measurement-widget-content__hint p{margin:0;padding:0}.esri-measurement-widget-content__hint,.esri-measurement-widget-content__error,.esri-measurement-widget-content__measurement,.esri-measurement-widget-content__measurement-item{flex-direction:column;gap:var(--calcite-spacing-md);animation:.25s ease-in-out esri-fade-in;display:flex}.esri-measurement-widget-content__measurement-item--disabled{color:var(--calcite-color-border-ghost)}.esri-measurement-widget-content__measurement-item__value{font-weight:var(--calcite-font-weight-semibold)}.esri-measurement-widget-content__actions{flex-direction:column;justify-content:center;gap:var(--calcite-spacing-xs);display:flex}:host{width:300px}`,E=Object.defineProperty,V=Object.getOwnPropertyDescriptor,s=(e,t,i,o)=>{for(var a=o>1?void 0:o?V(t,i):t,l=e.length-1,d;l>=0;l--)(d=e[l])&&(a=(o?d(t,i,a):d(a))||a);return o&&a&&E(t,i,a),a},r=class extends M{constructor(){super(...arguments),this.supportedViewType="3d",this.unsupportedErrorMessage="The Area Measurement 3D component is only supported in 3D views."}initialize(){this.addHandles(j(()=>({analysis:this.analysis,unit:this.unit}),({analysis:e,unit:t})=>{e!=null&&(e.unit=t)},{sync:!0,initial:!0}))}get state(){return this.disabled||!this.ready?"disabled":this.operationState==="inactive"?this.analysis.valid?"measured":"ready":"measuring"}get displayState(){if(!this.supported)return"unsupported";switch(this.state){case"disabled":case"ready":return"ready";case"measuring":return this.analysis.geometry==null?"measuring":"measured";case"measured":return"measured"}}get measurement(){let{analysisView:e}=this,t=e?.result,i=t?.mode??"euclidean",o=e!=null&&e.type==="area-measurement-view-3d"&&U(e);return{mode:i,area:p(t?.area,o),perimeter:p(t?.perimeter,o)}}get unitOptions(){let e=this._userUnitOptions?.filter(t=>g.includes(t));return e&&e.length>0?e:g.slice()}set unitOptions(e){this._userUnitOptions=e}get unit(){let e=this._userUnit??this.analysis.unit,t=this.unitOptions;if(e&&t.includes(e))return e;let i=this._defaultUnit;return i&&t.includes(i)?i:t[0]}set unit(e){this._userUnit=e}get _defaultUnit(){return this.view?A(this.view):void 0}async place(e){await this.analysisView?.place(e)}clearAnalysis(){this.analysis.geometry=null}constructAnalysis(){return new $}};s([n({readOnly:!0})],r.prototype,"state",1);s([n({readOnly:!0})],r.prototype,"displayState",1);s([n({readOnly:!0})],r.prototype,"measurement",1);s([n()],r.prototype,"unitOptions",1);s([n()],r.prototype,"_userUnitOptions",2);s([n()],r.prototype,"unit",1);s([n()],r.prototype,"_userUnit",2);s([n()],r.prototype,"_defaultUnit",1);r=s([D("components.area-measurement-3d.AreaMeasurement3dViewModel")],r);var L="arcgis-area-measurement-3d",P={base:L},S=k(r),u=class extends w{constructor(){super(...arguments),this.viewModel=S(this),this.messages=y({blocking:!0}),this.view=this.viewModel.view,this.analysis=this.viewModel.analysis,this.autoDestroyDisabled=!1,this.icon="measure-area",this.state=this.viewModel.state,this.unit=this.viewModel.unit,this.unitOptions=this.viewModel.unitOptions,this.arcgisPropertyChange=x()("analysis","state"),this.arcgisReady=_()}static{this.properties={view:0,analysis:0,autoDestroyDisabled:5,icon:3,label:1,position:1,referenceElement:1,state:35,unit:1,unitOptions:0}}static{this.styles=C}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy()}async start(){z(this.viewModel.start())}render(){let{messages:t,unit:i,unitOptions:o,viewModel:a}=this,{measurement:l,state:d}=a;return h`<div aria-label=${t.componentLabel??v} class=${f({[P.base]:!0,[c.widget]:!0,[c.panel]:!0})} role=presentation><arcgis-measurement-content .state=${a.displayState} .hintLabel=${t.hint} .unsupportedLabel=${t.unsupported} .items=${[{title:t.area,measurement:l.area},{title:t.perimeterLength,measurement:l.perimeter}]}><arcgis-unit-select slot=settings .options=${o} .selectLabel=${t.unit} .value=${i} @arcgisUnitSelectChange=${O=>{this.unit=O.detail}}></arcgis-unit-select><calcite-button slot=actions .disabled=${d==="disabled"} @click=${this.start}>${t.newMeasurement}</calcite-button></arcgis-measurement-content></div>`}};b("arcgis-area-measurement-3d",u);return u},"analysis/AreaMeasurementAnalysis","applications/Components/analysisUtils","applications/Components/getDefaultUnits","core/accessorSupport/decorators","core/reactiveUtils",a,d,e,i,j)
|
|
3
|
+
v5.0.0-next.64 */
|
|
4
|
+
import{b as g,d as p}from"./Y77HECJ4.js";import j from"./GAZ33ABI.js";import"./WU73LKLD.js";import i from"./GHDGNI7M.js";import"./5IMCYYOC.js";import e from"./M6LJ434S.js";import{a as y}from"./OTCI7IQX.js";import{a as c}from"./SGTCBTC5.js";import d from"./2PXPFBQ7.js";import a from"./ALMUOVFH.js";import{g as x}from"./NIDPKSBS.js";import"./GC3J2KGC.js";import"./PLEYUHX7.js";import"./4JCGYSBS.js";import{I as w,J as f,L as v,O as b,a as m,b as h,s as _}from"./YTCSJTV2.js";import"./GLF65OBX.js";export default $arcgis.t(([$,{hasValidAreaResult:U},{getDefaultUnitForView:A},{property:n,subclass:D},{watch:j},,,k,{e:z},M])=>{var C=m`.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{--esri-widget-padding-x: 15px;--esri-widget-padding-y: var(--calcite-spacing-md);--esri-widget-padding: var(--esri-widget-padding-y) var(--esri-widget-padding-x);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__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(--esri-widget-padding);transition:max-height .25s ease-in-out;overflow-y:auto}.esri-unit-select{width:100%}.esri-unit-select__label{--calcite-label-margin-bottom: 0;width:100%}:host{display:block}.esri-measurement-widget-content{padding:var(--esri-widget-padding);flex-direction:column;gap:var(--calcite-spacing-xxl);display:flex;position:relative;overflow-y:auto}.esri-measurement-widget-content__error{color:var(--calcite-color-status-danger)}.esri-measurement-widget-content__error,.esri-measurement-widget-content__hint{overflow:hidden}.esri-measurement-widget-content__error p,.esri-measurement-widget-content__hint p{margin:0;padding:0}.esri-measurement-widget-content__hint,.esri-measurement-widget-content__error,.esri-measurement-widget-content__measurement,.esri-measurement-widget-content__measurement-item{flex-direction:column;gap:var(--calcite-spacing-md);animation:.25s ease-in-out esri-fade-in;display:flex}.esri-measurement-widget-content__measurement-item--disabled{color:var(--calcite-color-border-ghost)}.esri-measurement-widget-content__measurement-item__value{font-weight:var(--calcite-font-weight-semibold)}.esri-measurement-widget-content__actions{flex-direction:column;justify-content:center;gap:var(--calcite-spacing-xs);display:flex}:host{width:300px}`,E=Object.defineProperty,V=Object.getOwnPropertyDescriptor,s=(e,t,i,o)=>{for(var a=o>1?void 0:o?V(t,i):t,l=e.length-1,d;l>=0;l--)(d=e[l])&&(a=(o?d(t,i,a):d(a))||a);return o&&a&&E(t,i,a),a},r=class extends M{constructor(){super(...arguments),this.supportedViewType="3d",this.unsupportedErrorMessage="The Area Measurement 3D component is only supported in 3D views."}initialize(){this.addHandles(j(()=>({analysis:this.analysis,unit:this.unit}),({analysis:e,unit:t})=>{e!=null&&(e.unit=t)},{sync:!0,initial:!0}))}get state(){return this.disabled||!this.ready?"disabled":this.operationState==="inactive"?this.analysis.valid?"measured":"ready":"measuring"}get displayState(){if(!this.supported)return"unsupported";switch(this.state){case"disabled":case"ready":return"ready";case"measuring":return this.analysis.geometry==null?"measuring":"measured";case"measured":return"measured"}}get measurement(){let{analysisView:e}=this,t=e?.result,i=t?.mode??"euclidean",o=e!=null&&e.type==="area-measurement-view-3d"&&U(e);return{mode:i,area:p(t?.area,o),perimeter:p(t?.perimeter,o)}}get unitOptions(){let e=this._userUnitOptions?.filter(t=>g.includes(t));return e&&e.length>0?e:g.slice()}set unitOptions(e){this._userUnitOptions=e}get unit(){let e=this._userUnit??this.analysis.unit,t=this.unitOptions;if(e&&t.includes(e))return e;let i=this._defaultUnit;return i&&t.includes(i)?i:t[0]}set unit(e){this._userUnit=e}get _defaultUnit(){return this.view?A(this.view):void 0}async place(e){await this.analysisView?.place(e)}clearAnalysis(){this.analysis.geometry=null}constructAnalysis(){return new $}};s([n({readOnly:!0})],r.prototype,"state",1);s([n({readOnly:!0})],r.prototype,"displayState",1);s([n({readOnly:!0})],r.prototype,"measurement",1);s([n()],r.prototype,"unitOptions",1);s([n()],r.prototype,"_userUnitOptions",2);s([n()],r.prototype,"unit",1);s([n()],r.prototype,"_userUnit",2);s([n()],r.prototype,"_defaultUnit",1);r=s([D("components.area-measurement-3d.AreaMeasurement3dViewModel")],r);var L="arcgis-area-measurement-3d",P={base:L},S=k(r),u=class extends w{constructor(){super(...arguments),this.viewModel=S(this),this.messages=y({blocking:!0}),this.view=this.viewModel.view,this.analysis=this.viewModel.analysis,this.autoDestroyDisabled=!1,this.icon="measure-area",this.state=this.viewModel.state,this.unit=this.viewModel.unit,this.unitOptions=this.viewModel.unitOptions,this.arcgisPropertyChange=x()("analysis","state"),this.arcgisReady=_()}static{this.properties={view:0,analysis:0,autoDestroyDisabled:5,icon:3,label:1,position:1,referenceElement:1,state:35,unit:1,unitOptions:0}}static{this.styles=C}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy()}async start(){z(this.viewModel.start())}render(){let{messages:t,unit:i,unitOptions:o,viewModel:a}=this,{measurement:l,state:d}=a;return h`<div aria-label=${t.componentLabel??v} class=${f({[P.base]:!0,[c.widget]:!0,[c.panel]:!0})} role=presentation><arcgis-measurement-content .state=${a.displayState} .hintLabel=${t.hint} .unsupportedLabel=${t.unsupported} .items=${[{title:t.area,measurement:l.area},{title:t.perimeterLength,measurement:l.perimeter}]}><arcgis-unit-select slot=settings .options=${o} .selectLabel=${t.unit} .value=${i} @arcgisUnitSelectChange=${O=>{this.unit=O.detail}}></arcgis-unit-select><calcite-button slot=actions .disabled=${d==="disabled"} @click=${this.start}>${t.newMeasurement}</calcite-button></arcgis-measurement-content></div>`}};b("arcgis-area-measurement-3d",u);return u},"analysis/AreaMeasurementAnalysis","applications/Components/analysisUtils","applications/Components/getDefaultUnits","core/accessorSupport/decorators","core/reactiveUtils",a,d,e,i,j)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import e from"./NDPRUIRJ.js";import d from"./O6HWFB4W.js";import{a as F}from"./3NACO3KH.js";import c from"./S7N55PYB.js";import a from"./22UN5EMA.js";import{g as L}from"./XCAK6VPC.js";import"./TDHJIJLS.js";import"./63Q7R555.js";import{b as E}from"./BKCRKBXQ.js";import{H as M,I as x,J as l,L as _,O as b,a as y,b as o,s as I}from"./Y453EEUF.js";import"./OUDH32KU.js";export default $arcgis.t(([H,{substitute:B},Z,{watch:P},{stripHTML:U},,,T,{b:A,c:V,d:R,e:k,f:D,j:N,q:h}])=>{var z=y`:host{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1);--calcite-color-background: var(--calcite-color-foreground-1)}.arcgis-feature{flex:1 1 auto}.arcgis-feature calcite-icon{box-sizing:content-box}.arcgis-feature__loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.arcgis-feature__content-element{margin-bottom:var(--calcite-spacing-lg);padding:0 var(--calcite-spacing-sm);display:flex;flex-direction:column}.arcgis-feature__content-element:only-child,.arcgis-feature__content-element:last-child{margin-bottom:var(--calcite-spacing-xxs)}.arcgis-feature__last-edited-info{padding-top:var(--calcite-spacing-xs);font-size:var(--calcite-font-size-sm)}`,f="arcgis-feature",d={base:f,container:`${f}__size-container`,main:`${f}__main-container`,contentElement:`${f}__content-element`,lastEditedInfo:`${f}__last-edited-info`,loadingSpinnerContainer:`${f}__loading-container`},S=T(H),C=class extends x{constructor(){super(...arguments),this.messages=F(),this._rootFlowNode=null,this.flowType="feature",this.internalFlowItems=new Z,this.viewModel=S(this),this.view=this.viewModel.view,this.icon="icon",this.isFeatureFromTable=this.viewModel.isFeatureFromTable,this.graphic=this.viewModel.graphic,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.headingLevel=2,this.spatialReference=this.viewModel.spatialReference,this.timeZone=this.viewModel.timeZone,this.heading=this.viewModel.title,this.map=this.viewModel.map,this.chartAnimationDisabled=this.viewModel.abilities.chartAnimation,this.hideHeading=!1,this.hideContent=!1,this.hideAttachmentsContent=!1,this.hideCustomContent=!1,this.hideExpressionContent=!1,this.hideFieldsContent=!1,this.hideMediaContent=!1,this.showRelationshipContent=!1,this.hideTextContent=!1,this.showUtilityNetworkContent=!1,this.hideLastEditedInfo=!1,this.autoDestroyDisabled=!1,this.location=this.viewModel.location,this.state=this.viewModel.state,this.arcgisPropertyChange=L()("flowItems","state"),this.arcgisReady=I()}static{this.properties={flowType:16,popupTemplate:16,sourceLayer:16,fieldInfoMap:16,values:16,globalValues:16,internalFlowItems:16,viewModel:0,view:0,flowItems:0,referenceElement:1,position:3,icon:1,isFeatureFromTable:4,graphic:0,defaultPopupTemplateEnabled:5,headingLevel:9,spatialReference:0,timeZone:1,heading:0,map:0,chartAnimationDisabled:5,hideHeading:5,hideTitle:5,hideContent:5,hideAttachmentsContent:5,hideContentAttachments:5,hideCustomContent:5,hideExpressionContent:5,hideContentExpression:5,hideFieldsContent:5,hideContentFields:5,hideMediaContent:5,hideContentMedia:5,showRelationshipContent:5,hideTextContent:5,hideContentText:5,showUtilityNetworkContent:5,hideLastEditedInfo:5,hideLastEditInfo:5,autoDestroyDisabled:5,messageOverrides:0,label:1,location:0,state:3}}static{this.styles=z}get popupTemplate(){return R(this.graphic,this.defaultPopupTemplateEnabled)??void 0}get sourceLayer(){return k(this.graphic)}get fieldInfoMap(){return A(V(this.popupTemplate),this.sourceLayer)}get values(){return this.graphic?.attributes??{}}get globalValues(){return this.viewModel.formattedAttributes?.global??{}}get hideTitle(){return this.hideHeading}set hideTitle(e){this.hideHeading=e}get hideContentAttachments(){return this.hideAttachmentsContent}set hideContentAttachments(e){this.hideAttachmentsContent=e}get hideContentExpression(){return this.hideExpressionContent}set hideContentExpression(e){this.hideExpressionContent=e}get hideContentFields(){return this.hideFieldsContent}set hideContentFields(e){this.hideFieldsContent=e}get hideContentMedia(){return this.hideMediaContent}set hideContentMedia(e){this.hideMediaContent=e}get hideContentText(){return this.hideTextContent}set hideContentText(e){this.hideTextContent=e}get hideLastEditInfo(){return this.hideLastEditedInfo}set hideLastEditInfo(e){this.hideLastEditedInfo=e}async destroy(){await this.manager.destroy()}async nextMedia(e){return this.viewModel.nextMedia(e)}async previousMedia(e){return this.viewModel.previousMedia(e)}async setActiveMedia(e,t){return this.viewModel.setActiveMedia(e,t)}async updateGeometry(){return await this.viewModel.updateGeometry()}loaded(){this.manager.onLifecycle(()=>[P(()=>[this.internalFlowItems?.length],()=>this._setFocus())])}_removeFlowItems(){this.internalFlowItems?.removeAll()}_storeRootFlowNode(e){this._rootFlowNode=e}_setFocus(){this._rootFlowNode?.setFocus()}_handleDrillInBackClick(){this.internalFlowItems?.pop()}render(){let{state:e}=this.viewModel,t=o`<div class=${l(d.container)}>${e==="error"?this._renderError():e==="loading"?this._renderLoading():this._renderContentContainer()}</div>`;return o`<div class=${l(d.base)}>${t}</div>`}_renderError(){let{messages:e,hideHeading:t}=this;return o`<calcite-notice icon=exclamation-mark-circle kind=danger open scale=s>${t?null:o`<div slot=title>${e.error}</div>`}<div slot=message>${e.loadingError}</div></calcite-notice>`}_renderLoading(){return o`<div class=${l(d.loadingSpinnerContainer)}><calcite-loader inline label></calcite-loader></div>`}_renderAttachments(e){let{values:t,fieldInfoMap:i,sourceLayer:n,globalValues:a}=this,s=h({values:t,fieldInfoMap:i,globalValues:a,layer:n,text:e.title}),r=h({values:t,fieldInfoMap:i,globalValues:a,layer:n,text:e.description});return o`<arcgis-feature-attachments .headingLevel=${this.headingLevel} .heading=${s} .displayType=${e.displayType} .attachmentKeywords=${e.attachmentKeywords??void 0} .attachmentTypes=${e.attachmentTypes??void 0} .graphic=${this.graphic??void 0} .description=${r} .messages=${this.messages}></arcgis-feature-attachments>`}_renderCustom(e){return o`<arcgis-feature-content .creator=${e.creator} .destroyer=${e.destroyer??void 0} .graphic=${this.graphic??void 0} class=${l(d.contentElement)}></arcgis-feature-content>`}_renderFields(e,t){let i=this.viewModel.formattedAttributes,{values:n,fieldInfoMap:a,sourceLayer:s,popupTemplate:r,globalValues:c,graphic:p}=this,u=!!e?.fieldInfos,m=(e.fieldInfos??r?.fieldInfos??[])?.filter(({fieldName:g})=>!!g&&(N(g)||D(g)||g in n)),v=r?.expressionInfos,$=h({values:n,fieldInfoMap:a,globalValues:c,layer:s,text:e.title}),w=h({values:n,fieldInfoMap:a,globalValues:c,layer:s,text:e.description});return o`<arcgis-feature-fields .headingLevel=${this.headingLevel} .heading=${$} class=${l(d.contentElement)} .messages=${this.messages} .graphic=${p??void 0} .isContentFieldInfos=${u} .layer=${s} .description=${w} .values=${{...i?.global,...i?.content?.[t]}} .fieldInfos=${m} .expressionInfos=${v??void 0}></arcgis-feature-fields>`}_renderMedia(e,t){let{values:i,graphic:n,fieldInfoMap:a,sourceLayer:s,popupTemplate:r,globalValues:c}=this,{formattedAttributes:p,relatedInfos:u}=this.viewModel,m={...p?.global,...p?.content?.[t]},v=h({values:i,fieldInfoMap:a,globalValues:c,layer:s,text:e.title}),$=h({values:i,fieldInfoMap:a,globalValues:c,layer:s,text:e.description});return o`<arcgis-feature-media .activeMediaInfoIndex=${e.activeMediaInfoIndex??0} .chartAnimationDisabled=${this.chartAnimationDisabled} .headingLevel=${this.headingLevel} .heading=${v} class=${l(d.contentElement)} .description=${$} .values=${i} .layer=${s} .graphic=${n??void 0} .messages=${this.messages} .fieldInfoMap=${a} .mediaInfos=${e.mediaInfos??[]} .popupTemplate=${r??void 0} .relatedInfos=${u} .formattedValues=${m}></arcgis-feature-media>`}_renderText(e){let{values:t,fieldInfoMap:i,sourceLayer:n,globalValues:a}=this,s=h({values:t,fieldInfoMap:i,globalValues:a,layer:n,text:e.text});return o`<arcgis-feature-content .creator=${s} .graphic=${this.graphic??void 0} class=${l(d.contentElement)}></arcgis-feature-content>`}_renderExpression(e,t){let i=this.viewModel.formattedAttributes,{fieldInfoMap:n}=this;return o`<arcgis-feature-expression .expressionInfo=${e.expressionInfo} .map=${this.map??void 0} .spatialReference=${this.spatialReference??void 0} .view=${this.viewModel.view??void 0} .graphic=${this.graphic??void 0} .location=${this.location??void 0} .headingLevel=${this.headingLevel} class=${l(d.contentElement)} .interceptor=${this.viewModel.interceptor} .messages=${this.messages} .fieldInfoMap=${n} .values=${{...i?.global,...i?.content?.[t]}}></arcgis-feature-expression>`}_renderRelationship(e,t){let{values:i,graphic:n,fieldInfoMap:a,sourceLayer:s,globalValues:r}=this,{displayCount:c,orderByFields:p,relationshipId:u}=e,{formattedAttributes:m,view:v}=this.viewModel,$={...m?.global,...m?.content?.[t]},w=h({values:i,fieldInfoMap:a,globalValues:r,layer:s,text:e.title}),g=h({values:i,fieldInfoMap:a,globalValues:r,layer:s,text:e.description});return o`<arcgis-feature-relationship class=${l(d.contentElement)} .flowItems=${this.flowItems??this.internalFlowItems} .description=${g} .layer=${s} .map=${this.map??void 0} .displayCount=${c} .graphic=${n??void 0} .heading=${w} .headingLevel=${this.headingLevel} .messages=${this.messages} .orderByFields=${p??void 0} .relationshipId=${u??void 0} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .values=${$} .view=${v??void 0}></arcgis-feature-relationship>`}_renderAssociation(e){let{fieldInfoMap:t,globalValues:i,graphic:n,messages:a,sourceLayer:s,values:r}=this,c=h({values:r,fieldInfoMap:t,globalValues:i,layer:s,text:e.title}),p=h({values:r,fieldInfoMap:t,globalValues:i,layer:s,text:e.description});return o`<arcgis-feature-utility-network-associations .associationTypes=${e.associationTypes} class=${l(d.contentElement)} .description=${p} .flowItems=${this.flowItems??this.internalFlowItems} .graphic=${n??void 0} .heading=${c} .headingLevel=${this.headingLevel} .layer=${s} .map=${this.map??void 0} .messages=${a} .parentFeatureViewModel=${this.viewModel} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .view=${this.viewModel.view??void 0}></arcgis-feature-utility-network-associations>`}_renderContentElement(e,t){switch(e.type){case"attachments":return this.hideAttachmentsContent?null:this._renderAttachments(e);case"custom":return this.hideCustomContent?null:this._renderCustom(e);case"fields":return this.hideFieldsContent?null:this._renderFields(e,t);case"media":return this.hideMediaContent?null:this._renderMedia(e,t);case"text":return this.hideTextContent?null:this._renderText(e);case"expression":return this.hideExpressionContent?null:this._renderExpression(e,t);case"relationship":return this.showRelationshipContent?this._renderRelationship(e,t):null;case"utility-network-associations":return this.showUtilityNetworkContent?this._renderAssociation(e):null;default:return null}}_renderContent(){let{content:e,graphic:t}=this.viewModel;return e?Array.isArray(e)&&e.length?e.length?e.map(this._renderContentElement,this):null:typeof e=="string"?o`<arcgis-feature-content .creator=${e} .graphic=${t??void 0} class=${l(d.contentElement)}></arcgis-feature-content>`:e instanceof HTMLElement?e:null:null}_renderContentContainer(){let{hideContent:e,internalFlowItems:t,headingLevel:i,state:n,messages:a}=this;if(e)return null;let s=o`<div class=${l(d.main)}>${[this._renderContent(),this._renderLastEditInfo()]}</div>`,r=a.returnToInitialFeature??"";return this.flowItems?s:o`<calcite-flow ${M(this._storeRootFlowNode)}><calcite-flow-item .loading=${n==="loading"} .headingLevel=${i} .heading=${this.hideHeading?void 0:U(this.heading)} .selected=${!t.length}>${s}</calcite-flow-item>${t.toArray().map((c,p)=>o`<calcite-flow-item @calciteFlowItemBack=${u=>{u.preventDefault(),this._handleDrillInBackClick()}} .loading=${n==="loading"} .headingLevel=${i} .selected=${p===t.length-1}><calcite-action appearance=transparent icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${r} title=${r??_}></calcite-action>${c}</calcite-flow-item>`)}</calcite-flow>`}_renderLastEditInfo(){let{hideLastEditedInfo:e,messages:t}=this,{lastEditInfo:i}=this.viewModel;if(!i||e)return null;let{date:n,user:a}=i,s=i.type==="edit"?a?t.lastEditedByUser:t.lastEdited:a?t.lastCreatedByUser:t.lastCreated,r=B(s??"",{date:n,user:a});return o`<div class=${l(E(d.lastEditedInfo,d.contentElement))}>${r}</div>`}};b("arcgis-feature",C);return C},"widgets/Feature/FeatureViewModel","intl","core/Collection","core/reactiveUtils","applications/Components/stringUtils",a,c,d,e)
|
|
3
|
+
v5.0.0-next.64 */
|
|
4
|
+
import e from"./FEBGCB5D.js";import d from"./M6LJ434S.js";import{a as F}from"./OTCI7IQX.js";import c from"./2PXPFBQ7.js";import a from"./ALMUOVFH.js";import{g as L}from"./NIDPKSBS.js";import"./GC3J2KGC.js";import"./PLEYUHX7.js";import{b as E}from"./4JCGYSBS.js";import{H as M,I as x,J as l,L as _,O as b,a as y,b as o,s as I}from"./YTCSJTV2.js";import"./GLF65OBX.js";export default $arcgis.t(([H,{substitute:B},Z,{watch:P},{stripHTML:U},,,T,{b:A,c:V,d:R,e:k,f:D,j:N,q:h}])=>{var z=y`:host{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1);--calcite-color-background: var(--calcite-color-foreground-1)}.arcgis-feature{flex:1 1 auto}.arcgis-feature calcite-icon{box-sizing:content-box}.arcgis-feature__loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.arcgis-feature__content-element{margin-bottom:var(--calcite-spacing-lg);padding:0 var(--calcite-spacing-sm);display:flex;flex-direction:column}.arcgis-feature__content-element:only-child,.arcgis-feature__content-element:last-child{margin-bottom:var(--calcite-spacing-xxs)}.arcgis-feature__last-edited-info{padding-top:var(--calcite-spacing-xs);font-size:var(--calcite-font-size-sm)}`,f="arcgis-feature",d={base:f,container:`${f}__size-container`,main:`${f}__main-container`,contentElement:`${f}__content-element`,lastEditedInfo:`${f}__last-edited-info`,loadingSpinnerContainer:`${f}__loading-container`},S=T(H),C=class extends x{constructor(){super(...arguments),this.messages=F(),this._rootFlowNode=null,this.flowType="feature",this.internalFlowItems=new Z,this.viewModel=S(this),this.view=this.viewModel.view,this.icon="icon",this.isFeatureFromTable=this.viewModel.isFeatureFromTable,this.graphic=this.viewModel.graphic,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.headingLevel=2,this.spatialReference=this.viewModel.spatialReference,this.timeZone=this.viewModel.timeZone,this.heading=this.viewModel.title,this.map=this.viewModel.map,this.chartAnimationDisabled=this.viewModel.abilities.chartAnimation,this.hideHeading=!1,this.hideContent=!1,this.hideAttachmentsContent=!1,this.hideCustomContent=!1,this.hideExpressionContent=!1,this.hideFieldsContent=!1,this.hideMediaContent=!1,this.showRelationshipContent=!1,this.hideTextContent=!1,this.showUtilityNetworkContent=!1,this.hideLastEditedInfo=!1,this.autoDestroyDisabled=!1,this.location=this.viewModel.location,this.state=this.viewModel.state,this.arcgisPropertyChange=L()("flowItems","state"),this.arcgisReady=I()}static{this.properties={flowType:16,popupTemplate:16,sourceLayer:16,fieldInfoMap:16,values:16,globalValues:16,internalFlowItems:16,viewModel:0,view:0,flowItems:0,referenceElement:1,position:3,icon:1,isFeatureFromTable:4,graphic:0,defaultPopupTemplateEnabled:5,headingLevel:9,spatialReference:0,timeZone:1,heading:0,map:0,chartAnimationDisabled:5,hideHeading:5,hideTitle:5,hideContent:5,hideAttachmentsContent:5,hideContentAttachments:5,hideCustomContent:5,hideExpressionContent:5,hideContentExpression:5,hideFieldsContent:5,hideContentFields:5,hideMediaContent:5,hideContentMedia:5,showRelationshipContent:5,hideTextContent:5,hideContentText:5,showUtilityNetworkContent:5,hideLastEditedInfo:5,hideLastEditInfo:5,autoDestroyDisabled:5,messageOverrides:0,label:1,location:0,state:3}}static{this.styles=z}get popupTemplate(){return R(this.graphic,this.defaultPopupTemplateEnabled)??void 0}get sourceLayer(){return k(this.graphic)}get fieldInfoMap(){return A(V(this.popupTemplate),this.sourceLayer)}get values(){return this.graphic?.attributes??{}}get globalValues(){return this.viewModel.formattedAttributes?.global??{}}get hideTitle(){return this.hideHeading}set hideTitle(e){this.hideHeading=e}get hideContentAttachments(){return this.hideAttachmentsContent}set hideContentAttachments(e){this.hideAttachmentsContent=e}get hideContentExpression(){return this.hideExpressionContent}set hideContentExpression(e){this.hideExpressionContent=e}get hideContentFields(){return this.hideFieldsContent}set hideContentFields(e){this.hideFieldsContent=e}get hideContentMedia(){return this.hideMediaContent}set hideContentMedia(e){this.hideMediaContent=e}get hideContentText(){return this.hideTextContent}set hideContentText(e){this.hideTextContent=e}get hideLastEditInfo(){return this.hideLastEditedInfo}set hideLastEditInfo(e){this.hideLastEditedInfo=e}async destroy(){await this.manager.destroy()}async nextMedia(e){return this.viewModel.nextMedia(e)}async previousMedia(e){return this.viewModel.previousMedia(e)}async setActiveMedia(e,t){return this.viewModel.setActiveMedia(e,t)}async updateGeometry(){return await this.viewModel.updateGeometry()}loaded(){this.manager.onLifecycle(()=>[P(()=>[this.internalFlowItems?.length],()=>this._setFocus())])}_removeFlowItems(){this.internalFlowItems?.removeAll()}_storeRootFlowNode(e){this._rootFlowNode=e}_setFocus(){this._rootFlowNode?.setFocus()}_handleDrillInBackClick(){this.internalFlowItems?.pop()}render(){let{state:e}=this.viewModel,t=o`<div class=${l(d.container)}>${e==="error"?this._renderError():e==="loading"?this._renderLoading():this._renderContentContainer()}</div>`;return o`<div class=${l(d.base)}>${t}</div>`}_renderError(){let{messages:e,hideHeading:t}=this;return o`<calcite-notice icon=exclamation-mark-circle kind=danger open scale=s>${t?null:o`<div slot=title>${e.error}</div>`}<div slot=message>${e.loadingError}</div></calcite-notice>`}_renderLoading(){return o`<div class=${l(d.loadingSpinnerContainer)}><calcite-loader inline label></calcite-loader></div>`}_renderAttachments(e){let{values:t,fieldInfoMap:i,sourceLayer:n,globalValues:a}=this,s=h({values:t,fieldInfoMap:i,globalValues:a,layer:n,text:e.title}),r=h({values:t,fieldInfoMap:i,globalValues:a,layer:n,text:e.description});return o`<arcgis-feature-attachments .headingLevel=${this.headingLevel} .heading=${s} .displayType=${e.displayType} .attachmentKeywords=${e.attachmentKeywords??void 0} .attachmentTypes=${e.attachmentTypes??void 0} .graphic=${this.graphic??void 0} .description=${r} .messages=${this.messages}></arcgis-feature-attachments>`}_renderCustom(e){return o`<arcgis-feature-content .creator=${e.creator} .destroyer=${e.destroyer??void 0} .graphic=${this.graphic??void 0} class=${l(d.contentElement)}></arcgis-feature-content>`}_renderFields(e,t){let i=this.viewModel.formattedAttributes,{values:n,fieldInfoMap:a,sourceLayer:s,popupTemplate:r,globalValues:c,graphic:p}=this,u=!!e?.fieldInfos,m=(e.fieldInfos??r?.fieldInfos??[])?.filter(({fieldName:g})=>!!g&&(N(g)||D(g)||g in n)),v=r?.expressionInfos,$=h({values:n,fieldInfoMap:a,globalValues:c,layer:s,text:e.title}),w=h({values:n,fieldInfoMap:a,globalValues:c,layer:s,text:e.description});return o`<arcgis-feature-fields .headingLevel=${this.headingLevel} .heading=${$} class=${l(d.contentElement)} .messages=${this.messages} .graphic=${p??void 0} .isContentFieldInfos=${u} .layer=${s} .description=${w} .values=${{...i?.global,...i?.content?.[t]}} .fieldInfos=${m} .expressionInfos=${v??void 0}></arcgis-feature-fields>`}_renderMedia(e,t){let{values:i,graphic:n,fieldInfoMap:a,sourceLayer:s,popupTemplate:r,globalValues:c}=this,{formattedAttributes:p,relatedInfos:u}=this.viewModel,m={...p?.global,...p?.content?.[t]},v=h({values:i,fieldInfoMap:a,globalValues:c,layer:s,text:e.title}),$=h({values:i,fieldInfoMap:a,globalValues:c,layer:s,text:e.description});return o`<arcgis-feature-media .activeMediaInfoIndex=${e.activeMediaInfoIndex??0} .chartAnimationDisabled=${this.chartAnimationDisabled} .headingLevel=${this.headingLevel} .heading=${v} class=${l(d.contentElement)} .description=${$} .values=${i} .layer=${s} .graphic=${n??void 0} .messages=${this.messages} .fieldInfoMap=${a} .mediaInfos=${e.mediaInfos??[]} .popupTemplate=${r??void 0} .relatedInfos=${u} .formattedValues=${m}></arcgis-feature-media>`}_renderText(e){let{values:t,fieldInfoMap:i,sourceLayer:n,globalValues:a}=this,s=h({values:t,fieldInfoMap:i,globalValues:a,layer:n,text:e.text});return o`<arcgis-feature-content .creator=${s} .graphic=${this.graphic??void 0} class=${l(d.contentElement)}></arcgis-feature-content>`}_renderExpression(e,t){let i=this.viewModel.formattedAttributes,{fieldInfoMap:n}=this;return o`<arcgis-feature-expression .expressionInfo=${e.expressionInfo} .map=${this.map??void 0} .spatialReference=${this.spatialReference??void 0} .view=${this.viewModel.view??void 0} .graphic=${this.graphic??void 0} .location=${this.location??void 0} .headingLevel=${this.headingLevel} class=${l(d.contentElement)} .interceptor=${this.viewModel.interceptor} .messages=${this.messages} .fieldInfoMap=${n} .values=${{...i?.global,...i?.content?.[t]}}></arcgis-feature-expression>`}_renderRelationship(e,t){let{values:i,graphic:n,fieldInfoMap:a,sourceLayer:s,globalValues:r}=this,{displayCount:c,orderByFields:p,relationshipId:u}=e,{formattedAttributes:m,view:v}=this.viewModel,$={...m?.global,...m?.content?.[t]},w=h({values:i,fieldInfoMap:a,globalValues:r,layer:s,text:e.title}),g=h({values:i,fieldInfoMap:a,globalValues:r,layer:s,text:e.description});return o`<arcgis-feature-relationship class=${l(d.contentElement)} .flowItems=${this.flowItems??this.internalFlowItems} .description=${g} .layer=${s} .map=${this.map??void 0} .displayCount=${c} .graphic=${n??void 0} .heading=${w} .headingLevel=${this.headingLevel} .messages=${this.messages} .orderByFields=${p??void 0} .relationshipId=${u??void 0} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .values=${$} .view=${v??void 0}></arcgis-feature-relationship>`}_renderAssociation(e){let{fieldInfoMap:t,globalValues:i,graphic:n,messages:a,sourceLayer:s,values:r}=this,c=h({values:r,fieldInfoMap:t,globalValues:i,layer:s,text:e.title}),p=h({values:r,fieldInfoMap:t,globalValues:i,layer:s,text:e.description});return o`<arcgis-feature-utility-network-associations .associationTypes=${e.associationTypes} class=${l(d.contentElement)} .description=${p} .flowItems=${this.flowItems??this.internalFlowItems} .graphic=${n??void 0} .heading=${c} .headingLevel=${this.headingLevel} .layer=${s} .map=${this.map??void 0} .messages=${a} .parentFeatureViewModel=${this.viewModel} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .view=${this.viewModel.view??void 0}></arcgis-feature-utility-network-associations>`}_renderContentElement(e,t){switch(e.type){case"attachments":return this.hideAttachmentsContent?null:this._renderAttachments(e);case"custom":return this.hideCustomContent?null:this._renderCustom(e);case"fields":return this.hideFieldsContent?null:this._renderFields(e,t);case"media":return this.hideMediaContent?null:this._renderMedia(e,t);case"text":return this.hideTextContent?null:this._renderText(e);case"expression":return this.hideExpressionContent?null:this._renderExpression(e,t);case"relationship":return this.showRelationshipContent?this._renderRelationship(e,t):null;case"utility-network-associations":return this.showUtilityNetworkContent?this._renderAssociation(e):null;default:return null}}_renderContent(){let{content:e,graphic:t}=this.viewModel;return e?Array.isArray(e)&&e.length?e.length?e.map(this._renderContentElement,this):null:typeof e=="string"?o`<arcgis-feature-content .creator=${e} .graphic=${t??void 0} class=${l(d.contentElement)}></arcgis-feature-content>`:e instanceof HTMLElement?e:null:null}_renderContentContainer(){let{hideContent:e,internalFlowItems:t,headingLevel:i,state:n,messages:a}=this;if(e)return null;let s=o`<div class=${l(d.main)}>${[this._renderContent(),this._renderLastEditInfo()]}</div>`,r=a.returnToInitialFeature??"";return this.flowItems?s:o`<calcite-flow ${M(this._storeRootFlowNode)}><calcite-flow-item .loading=${n==="loading"} .headingLevel=${i} .heading=${this.hideHeading?void 0:U(this.heading)} .selected=${!t.length}>${s}</calcite-flow-item>${t.toArray().map((c,p)=>o`<calcite-flow-item @calciteFlowItemBack=${u=>{u.preventDefault(),this._handleDrillInBackClick()}} .loading=${n==="loading"} .headingLevel=${i} .selected=${p===t.length-1}><calcite-action appearance=transparent icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${r} title=${r??_}></calcite-action>${c}</calcite-flow-item>`)}</calcite-flow>`}_renderLastEditInfo(){let{hideLastEditedInfo:e,messages:t}=this,{lastEditInfo:i}=this.viewModel;if(!i||e)return null;let{date:n,user:a}=i,s=i.type==="edit"?a?t.lastEditedByUser:t.lastEdited:a?t.lastCreatedByUser:t.lastCreated,r=B(s??"",{date:n,user:a});return o`<div class=${l(E(d.lastEditedInfo,d.contentElement))}>${r}</div>`}};b("arcgis-feature",C);return C},"widgets/Feature/FeatureViewModel","intl","core/Collection","core/reactiveUtils","applications/Components/stringUtils",a,c,d,e)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import a from"./
|
|
3
|
+
v5.0.0-next.64 */
|
|
4
|
+
import a from"./CUZMPQ2O.js";import{b as r}from"./4JCGYSBS.js";import{I as m,J as s,O as g,a as c,b as l}from"./YTCSJTV2.js";import"./GLF65OBX.js";export default $arcgis.t(([{a:d,g:o,h:p}])=>{var _=c`.arcgis-legend__size-ramp--container{margin-left:var(--calcite-spacing-sm);display:table}:dir(rtl) .arcgis-legend__size-ramp--container{margin-right:var(--calcite-spacing-sm);margin-left:0;overflow:auto}.arcgis-legend__size-ramp--row{display:table-row}.arcgis-legend__size-ramp--cell{padding:var(--calcite-spacing-xxs) 0;min-width:100px;vertical-align:middle;word-break:break-word;display:table-cell}.arcgis-legend__size-ramp--label{padding-right:var(--calcite-spacing-sm);padding-left:var(--calcite-spacing-sm);max-width:250px;word-break:normal;word-wrap:normal;font-size:var(--calcite-font-size-sm)}.arcgis-legend__size-ramp--symbol-container{min-width:10px;text-align:center}.arcgis-legend__size-ramp--symbol{display:flex;justify-content:center}`,e={container:"arcgis-legend__size-ramp--container",row:"arcgis-legend__size-ramp--row",cell:"arcgis-legend__size-ramp--cell",label:"arcgis-legend__size-ramp--label",symbol:"arcgis-legend__size-ramp--symbol",symbolContainer:"arcgis-legend__size-ramp--symbol-container"},n=class extends m{constructor(){super(...arguments),this.legendElement=null}static{this.properties={legendElement:0,messages:0}}static{this.styles=_}render(){let a=this.legendElement.infos.map(i=>this._renderRow(i)).filter(Boolean);return a.length?this.legendElement.theme==="spike"?l`<arcgis-legend-spike-ramp .legendElement=${this.legendElement} .messages=${this.messages}></arcgis-legend-spike-ramp>`:l`<div class=${s(e.container)}>${a}</div>`:null}_renderRow(a){let{preview:i}=a;if(!i)return null;let t=d(this.messages,a.label,!1);return p(i,o(this.messages,t)),l`<div class=${s(e.row)}><div class=${s(r(e.cell,e.symbolContainer))}><div class=${s(e.symbol)}>${i}</div></div><div class=${s(r(e.cell,e.label))}>${t}</div></div>`}};g("arcgis-legend-classic-size-ramp",n);return n},a)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.64 */
|
|
4
4
|
var f={"top-left":"top-left","top-right":"top-right","bottom-left":"bottom-left","bottom-right":"bottom-right","bottom-leading":"bottom-start","bottom-trailing":"bottom-end","top-leading":"top-start","top-trailing":"top-end"},p=["manual"];function v(e){e.el.childElem&&(e.el.childElem.ownedBy=e.el),e.position&&p.includes(e.position)?e.el.removeAttribute("slot"):e.position&&(e.el.slot=f[e.position]);let n=m(e);if(!n){let t=E(e);if(!t){u(e);return}return a(t,e,!0),t}return g(n,e.el.parent)||(e.el.parent=n,n.localName==="arcgis-expand"?h(n,e):n.localName==="arcgis-placement"?y(n,e):a(n,e,!1)),n}function m({el:e}){for(let n=e.parentElement;n;n=n?.parentElement??null){if(c.has(n.localName))return n;if("ownedBy"in n&&n.ownedBy instanceof HTMLElement&&c.has(n.ownedBy.localName))return n.ownedBy}}var c=new Set(["arcgis-map","arcgis-scene","arcgis-link-chart","arcgis-expand","arcgis-placement"]);function g(e,n){if(e!==n)return!1;let t=e.localName;return t==="arcgis-expand"||t==="arcgis-placement"}function l(e,n,t="arcgisReady"){let o=e;if(o.view)n(o.view);else{let i=function(d){d.target===e&&(l(e,n,t),e.removeEventListener(t,i))};e.addEventListener(t,i)}}var h=(e,n)=>l(e,t=>{let o=r(n);n.el.shadowRoot?e.content=n.el:n.el.childElem&&e.content!=null&&o.append(n.el.childElem),n.el.view=t}),y=(e,n)=>l(e,t=>{let o=r(n);n.el.childElem&&o.append(n.el.childElem),n.el.view=t}),a=(e,n,t)=>l(e,o=>{t&&u(n),n.el.view=o,n.referenceElement=e},"arcgisViewReadyChange");function w(e){return e==null||e===""}function b(e,n){return n!=null&&e?.position===n.position&&e?.heading===n.heading&&e?.tilt===n.tilt&&e?.fov===n.fov}function N(e,n){return n===void 0||e?.targetGeometry!==n?.targetGeometry||e?.rotation!==n?.rotation||e?.scale!==n?.scale}function R(e,n){return s(n?.center,e)}function s(e,n){if(typeof n=="string")return s(e,n.split(",").map(Number));if(!e)return n;if(Array.isArray(n)){let t=n[0],o=n[1],i=n.length>2?n[2]:void 0;if(t!==e.longitude||o!==e.latitude||i!==e.z)return n}else if(n&&!e?.equals(n))return n}function u(e){e.el.childElem&&r(e).append(e.el.childElem)}function r(e){return e.el.shadowRoot??e.el}function E(e,n){let t=e.referenceElement;if(typeof t!="string")return t??void 0;let o=t.includes("#")||t.includes(".")||t.includes("["),i=e.el.getRootNode();return(o?void 0:i.querySelector(`#${t}`))??i.querySelector(t)??void 0}var B=e=>e.el.childElem;async function x(e){let n=typeof e=="function"?e():e;n&&("setFocus"in n&&typeof n.setFocus=="function"?await n.setFocus():n instanceof HTMLElement&&n.focus())}export{v as a,w as b,b as c,N as d,R as e,s as f,B as g,x as h};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import e from"./O6HWFB4W.js";import{a as I}from"./3NACO3KH.js";import{a as f}from"./QB64EJHB.js";import d from"./S7N55PYB.js";import a from"./22UN5EMA.js";import{g as k}from"./XCAK6VPC.js";import"./TDHJIJLS.js";import"./63Q7R555.js";import{b as p}from"./BKCRKBXQ.js";import{H as b,I as S,J as c,L as m,O as C,a as x,b as r,s as y,w as $}from"./Y453EEUF.js";import"./OUDH32KU.js";export default $arcgis.t(([O,h,{substitute:D},{watch:R},z,,,M])=>{function L(n){if(n==null||Number.isNaN(n))return 0;let e=n+180;return Math.trunc(T(e,360))}function B(n){let e=n;return e==null||(typeof e=="string"&&(e=Number.parseInt(e,10)),Number.isNaN(e))?0:T(Math.trunc(e),360)-180}function T(n,e){return(n%e+e)%e}var E={fromAttribute:n=>h.fromHex(n),toAttribute:n=>typeof n=="string"?n:n?.toHex()??""},N=x`.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{--esri-widget-padding-x: 15px;--esri-widget-padding-y: var(--calcite-spacing-md);--esri-widget-padding: var(--esri-widget-padding-y) var(--esri-widget-padding-x);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__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}:host{display:flex}.arcgis-grid-controls{user-select:none;display:flex;flex-flow:column wrap;padding:var(--calcite-spacing-sm);overflow-y:auto;width:100%;.container{display:flex;flex:1 1 auto;flex-direction:column;gap:var(--calcite-spacing-sm)}.numeric-inputs-container{display:grid;grid-auto-columns:1fr;grid-auto-flow:column;gap:var(--calcite-spacing-sm)}arcgis-labeled-switch{margin-block-end:var(--calcite-spacing-sm)}.switch--bordered{border-width:0 0 var(--calcite-spacing-px) 0;border-style:solid;border-color:var(--calcite-color-border-1);padding-block-end:var(--calcite-spacing-sm)}.tile-group{display:flex;column-gap:var(--calcite-spacing-md);align-items:start;margin-bottom:calc(0px - var(--calcite-spacing-sm))}.tile{position:relative;.content{display:flex;flex-direction:column;row-gap:var(--calcite-spacing-md);align-items:center;padding:var(--calcite-spacing-md);color:var(--calcite-color-text-2)}&.disabled{opacity:var(--calcite-opacity-disabled)}&:focus-within{outline:var(--calcite-spacing-base) solid var(--calcite-color-brand);outline-offset:var(--calcite-spacing-base)}input[type=radio]{appearance:none;position:absolute;inset:0;opacity:.001;border:var(--calcite-spacing-px) solid transparent;cursor:pointer;&:checked+.content{border:var(--calcite-spacing-px) solid var(--calcite-color-brand)}+.content{border:var(--calcite-spacing-px) solid transparent;calcite-label{margin-bottom:calc(0px - var(--calcite-label-margin-bottom, .75rem));font-weight:var(--calcite-font-weight-medium)}}}}.inline-icon{margin-left:var(--calcite-spacing-xs);vertical-align:top;color:var(--calcite-color-status-warning)}}`,W="arcgis-grid-controls",s={base:W,borderedSwitch:"switch--bordered",container:"container",numericInputsContainer:"numeric-inputs-container",tileGroup:"tile-group",tile:"tile",tileDisabled:"disabled",tileContent:"content",inlineIcon:"inline-icon"},u={componentIcon:"grid-unit",gridTheme:{light:"circle",dark:"circle-area",custom:"palette"},placementState:{interactive:"maximum-territory-distance",place:"move",rotate:"rotate"},warning:"exclamation-mark-triangle"},v=h.fromArray([115,115,115]),_=h.fromArray([200,200,200]),j=["interactive","place","rotate"],A=M(z),w=class extends S{constructor(){super(...arguments),this._labelUid=$(),this._messages=I({}),this._viewModel=A(this),this._placementModeButtonRefs=new Map,this.numericSpacingInputShouldBeVisible=this._viewModel.numericSpacingInputShouldBeVisible,this.view=this._viewModel.view,this.icon=u.componentIcon,this.snappingOptions=this._viewModel.snappingOptions,this.hideColorSelection=!1,this.hideDynamicScaleToggle=!1,this.hideGridEnabledToggle=!1,this.hideNumericInputs=!1,this.hideGridSnapEnabledToggle=!1,this.hideLineIntervalInput=!1,this.hideOutOfScaleWarning=!1,this.hidePlacementButtons=!1,this.hideRotateWithMapToggle=!1,this.rotation=this._viewModel.rotation,this.rotateWithMap=this._viewModel.rotateWithMap,this.spacing=this._viewModel.spacing,this.majorLineInterval=this._viewModel.majorLineInterval,this.gridColor=this._viewModel.gridColor,this.displayEnabled=this._viewModel.displayEnabled,this.gridOutOfScale=this._viewModel.gridOutOfScale,this.unit=this._viewModel.unit,this.dynamicScaling=this._viewModel.dynamicScaling,this.gridControlsEnabled=this._viewModel.gridControlsEnabled,this.interactivePlacementState=this._viewModel.interactivePlacementState,this.snappingEnabled=this._viewModel.snappingEnabled,this.effectiveSpacingAfterDynamicScaling=this._viewModel.effectiveSpacingAfterDynamicScaling,this.placementDisabled=this._viewModel.placementDisabled,this.autoDestroyDisabled=!1,this.arcgisPropertyChange=k()("customColor","theme","spacing","rotation","majorLineInterval","rotateWithMap","dynamicScaling","snappingEnabled","interactivePlacementState","displayEnabled","gridOutOfScale","effectiveSpacingAfterDynamicScaling","gridControlsEnabled","gridColor"),this.arcgisReady=y()}static{this.properties={_placementModeButtonRefs:16,_warningIconTooltipRef:16,_themePopoverRef:16,numericSpacingInputShouldBeVisible:16,view:0,referenceElement:1,position:3,icon:1,customColor:[3,{converter:E}],snappingOptions:0,theme:1,hideColorSelection:5,hideDynamicScaleToggle:5,hideGridEnabledToggle:5,hideNumericInputs:5,hideGridSnapEnabledToggle:5,hideLineIntervalInput:5,hideOutOfScaleWarning:5,hidePlacementButtons:5,hideRotateWithMapToggle:5,rotation:11,rotateWithMap:5,spacing:11,majorLineInterval:11,gridColor:[3,{converter:E}],displayEnabled:4,gridOutOfScale:7,unit:1,dynamicScaling:5,gridControlsEnabled:4,interactivePlacementState:3,snappingEnabled:5,effectiveSpacingAfterDynamicScaling:43,placementDisabled:5,autoDestroyDisabled:5,messageOverrides:0,label:1}}static{this.styles=N}get theme(){let e=this.gridColor;return!e||v.equals(e)?"dark":_.equals(e)?"light":"custom"}set theme(e){let i=this._viewModel.view;switch(e){case"dark":this.gridColor=v;break;case"custom":this.customColor==null&&(this.customColor=i?.theme?.accentColor??new O().accentColor),this.gridColor=this.customColor;break;case"light":default:this.gridColor=_;break}}async destroy(){await this.manager.destroy()}trySetDisplayEnabled(e){this._viewModel.trySetDisplayEnabled(e)}loaded(){this.manager.onLifecycle(()=>[R(()=>this._viewModel.gridColor,e=>{let i=e instanceof h?e:typeof e=="string"?h.fromHex(e):null;i&&!v.equals(e)&&!_.equals(i)?this.customColor=i:v.equals(i)?this.theme="dark":_.equals(i)&&(this.theme="light")})])}_togglePlacementState(e){this.interactivePlacementState=this.interactivePlacementState===e?null:e}_setWarningIconRef(e){this._warningIconTooltipRef=e}_setPopoverRef(e){this._themePopoverRef=e}_emptyFunction(e){}_setPlacementButtonRef(e){if(e){let i=e.dataset.placementAction;this._placementModeButtonRefs.set(i,e)}else this._placementModeButtonRefs.clear()}render(){return r`<div class=${c(p(s.base,f.widget,f.panel))}><div class=${c(s.container)}>${this._renderContent()}</div></div>`}_renderContent(){let{hideGridEnabledToggle:e,hidePlacementButtons:i,hideNumericInputs:t,hideLineIntervalInput:a,hideGridSnapEnabledToggle:o,hideDynamicScaleToggle:l,hideRotateWithMapToggle:d,hideColorSelection:g}=this;return[e?void 0:this._renderEnabledToggle(),i?void 0:this._renderGridPlacementButtons(),t?void 0:this._renderNumericInputs(),a?void 0:this._renderIntervalInput(),!o&&this.snappingOptions?this._renderSnappingToggle():void 0,l?void 0:this._renderDynamicScaleToggle(),d?void 0:this._renderRotateToggle(),g?void 0:this._renderColorSelection()]}_renderGridPlacementButtons(){let{interactivePlacementState:e,placementDisabled:i,gridControlsEnabled:t}=this,a=i||!t;return r`<calcite-label scale=s>${this._messages.placementOptions}<calcite-action-bar expand-disabled layout=horizontal>${j.map(o=>this._renderPlacementModeButton(o,a,e))}</calcite-action-bar></calcite-label>`}_renderPlacementModeButton(e,i,t){let a=this._messages?.placementState?.[e],o=this._placementModeButtonRefs.get(e);return r`<div><calcite-action .active=${t===e} alignment=center .disabled=${i} .icon=${u.placementState[e]} data-placement-action=${e??m} @click=${()=>this._togglePlacementState(e)} .text=${a??""} ${b(this._setPlacementButtonRef)}></calcite-action>${o?r`<calcite-tooltip overlay-positioning=fixed placement=top .referenceElement=${o}>${a}</calcite-tooltip>`:void 0}</div>`}_renderNumericInputs(){let{rotation:e,spacing:i,effectiveSpacingAfterDynamicScaling:t,numericSpacingInputShouldBeVisible:a,gridControlsEnabled:o}=this,l=t!=null&&t!==i;return r`<div class=${c(p(s.numericInputsContainer))}>${[a?r`<calcite-label scale=s><span>${this._messages?.inputLabel?.spacing}${l?r`<calcite-icon class=${c(p(s.inlineIcon))} .icon=${u.warning} scale=s tabindex=0 ${b(this._setWarningIconRef)}></calcite-icon>`:void 0}</span><calcite-input-number .disabled=${!o} number-button-type=none .value=${i?.toFixed(2)} @calciteInputNumberChange=${({currentTarget:d})=>{let g=Number.parseFloat(d.value);this.spacing=g,g!==this.spacing&&(d.value=`${this.spacing}`)}}></calcite-input-number>${l&&this._warningIconTooltipRef?r`<calcite-tooltip overlay-positioning=fixed placement=leading .referenceElement=${this._warningIconTooltipRef}>${D(this._messages?.warnings?.dynamicSpacing??"",{actualSpacingIncludingUnit:t},{format:{actualSpacingIncludingUnit:{type:"number",intlOptions:{minimumFractionDigits:2,maximumFractionDigits:2,unit:this.unit??"meters",style:"decimal"}}}})}</calcite-tooltip>`:void 0}</calcite-label>`:void 0,r`<calcite-label scale=s>${this._messages?.inputLabel?.angle}<calcite-input-number .disabled=${!o} integer number-button-type=none suffix-text=\u00B0 .value=${`${L(e)}`} @calciteInputNumberChange=${({currentTarget:d})=>this.rotation=B(d.value)}></calcite-input-number></calcite-label>`]}</div>`}_renderIntervalInput(){let{majorLineInterval:e,gridControlsEnabled:i}=this;return r`<div class=${c(p(s.numericInputsContainer))}><calcite-label scale=s>${this._messages?.inputLabel?.interval}<calcite-input-number .disabled=${!i} integer max=15 min=1 number-button-type=vertical .value=${`${e}`} @calciteInputNumberChange=${({currentTarget:t})=>{let a=Number.parseInt(t.value,10);this.majorLineInterval=a,a!==this.majorLineInterval&&(t.value=`${this.majorLineInterval}`)}}></calcite-input-number></calcite-label></div>`}_renderSnappingToggle(){let{snappingOptions:e,gridControlsEnabled:i}=this,t=e?.gridEnabled??!1;return r`<arcgis-labeled-switch .checked=${!!t} .disabled=${!(i&&e)} .label=${this._messages?.switchLabel?.snap} @arcgisCheckedChanged=${a=>{a.stopPropagation(),this.snappingOptions?.set("gridEnabled",a.detail)}}></arcgis-labeled-switch>`}_renderDynamicScaleToggle(){let{_messages:e,gridOutOfScale:i,dynamicScaling:t,gridControlsEnabled:a}=this,o=!this.hideOutOfScaleWarning&&i;return r`<arcgis-labeled-switch .checked=${t} .disabled=${!a} .hint=${o?e?.warnings?.outOfScale:void 0} .hintIcon=${u.warning} hint-kind=warning .label=${e?.switchLabel?.scaling} @arcgisCheckedChanged=${l=>{l.stopPropagation(),this.dynamicScaling=l.detail}}></arcgis-labeled-switch>`}_renderRotateToggle(){let{gridControlsEnabled:e,rotateWithMap:i}=this;return r`<arcgis-labeled-switch .checked=${i} .disabled=${!e} .label=${this._messages?.switchLabel?.rotateWithMap??""} @arcgisCheckedChanged=${t=>{t.stopPropagation(),this.rotateWithMap=t.detail}}></arcgis-labeled-switch>`}_renderEnabledToggle(){return r`<div class=${c(s.borderedSwitch)}><arcgis-labeled-switch .checked=${this.displayEnabled} .disabled=${!!this.interactivePlacementState} .label=${this._messages?.switchLabel?.display} @arcgisCheckedChanged=${e=>{e.stopPropagation(),this.trySetDisplayEnabled(e.detail)}}></arcgis-labeled-switch></div>`}_renderColorSelection(){let{customColor:e}=this;return r`<calcite-label scale=s>${this._messages?.inputLabel?.theme}<div class=${c(s.tileGroup)}>${[this._renderThemeTile({value:"dark"}),this._renderThemeTile({value:"light"}),this._renderThemeTile({value:"custom"}),this._themePopoverRef?r`<calcite-popover auto-close .label=${this._messages?.gridLineColorPopoverLabel??""} overlay-positioning=fixed .referenceElement=${this._themePopoverRef}><calcite-color-picker alpha-channel saved-disabled .value=${e?.toHex({digits:8})??"#000000ff"} @calciteColorPickerChange=${i=>{let t=h.fromHex(i.currentTarget.value);t&&(this.customColor=t,this.theme="custom")}}></calcite-color-picker></calcite-popover>`:void 0]}</div></calcite-label>`}_renderThemeTile(e){let{theme:i,gridControlsEnabled:t}=this,{value:a}=e,o=this._messages?.gridTheme?.[a],l=`${this._labelUid}--theme_tile_${a}`,d=`${l}__label`,g=u.gridTheme[a];return r`<div class=${c(p({[s.tile]:!0,[s.tileDisabled]:!t}))} role=button ${b(a==="custom"?this._setPopoverRef:this._emptyFunction)}><input aria-labelledby=${d??m} .checked=${i===a} .disabled=${!t} id=${l??m} .name=${`${this._labelUid}--theme`} @change=${P=>{this.theme=a,P.currentTarget.focus()}} tabindex=0 type=radio><div class=${c(s.tileContent)}><calcite-icon .icon=${g} scale=l></calcite-icon><calcite-label .for=${l} id=${d??m}>${o}</calcite-label></div></div>`}};C("arcgis-grid-controls",w);return w},"views/Theme","Color","intl","core/reactiveUtils","widgets/support/GridControls/GridControlsViewModel",a,d,e)
|
|
3
|
+
v5.0.0-next.64 */
|
|
4
|
+
import e from"./M6LJ434S.js";import{a as I}from"./OTCI7IQX.js";import{a as f}from"./SGTCBTC5.js";import d from"./2PXPFBQ7.js";import a from"./ALMUOVFH.js";import{g as k}from"./NIDPKSBS.js";import"./GC3J2KGC.js";import"./PLEYUHX7.js";import{b as p}from"./4JCGYSBS.js";import{H as b,I as S,J as c,L as m,O as C,a as x,b as r,s as y,w as $}from"./YTCSJTV2.js";import"./GLF65OBX.js";export default $arcgis.t(([O,h,{substitute:D},{watch:R},z,,,M])=>{function L(n){if(n==null||Number.isNaN(n))return 0;let e=n+180;return Math.trunc(T(e,360))}function B(n){let e=n;return e==null||(typeof e=="string"&&(e=Number.parseInt(e,10)),Number.isNaN(e))?0:T(Math.trunc(e),360)-180}function T(n,e){return(n%e+e)%e}var E={fromAttribute:n=>h.fromHex(n),toAttribute:n=>typeof n=="string"?n:n?.toHex()??""},N=x`.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{--esri-widget-padding-x: 15px;--esri-widget-padding-y: var(--calcite-spacing-md);--esri-widget-padding: var(--esri-widget-padding-y) var(--esri-widget-padding-x);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__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}:host{display:flex}.arcgis-grid-controls{user-select:none;display:flex;flex-flow:column wrap;padding:var(--calcite-spacing-sm);overflow-y:auto;width:100%;.container{display:flex;flex:1 1 auto;flex-direction:column;gap:var(--calcite-spacing-sm)}.numeric-inputs-container{display:grid;grid-auto-columns:1fr;grid-auto-flow:column;gap:var(--calcite-spacing-sm)}arcgis-labeled-switch{margin-block-end:var(--calcite-spacing-sm)}.switch--bordered{border-width:0 0 var(--calcite-spacing-px) 0;border-style:solid;border-color:var(--calcite-color-border-1);padding-block-end:var(--calcite-spacing-sm)}.tile-group{display:flex;column-gap:var(--calcite-spacing-md);align-items:start;margin-bottom:calc(0px - var(--calcite-spacing-sm))}.tile{position:relative;.content{display:flex;flex-direction:column;row-gap:var(--calcite-spacing-md);align-items:center;padding:var(--calcite-spacing-md);color:var(--calcite-color-text-2)}&.disabled{opacity:var(--calcite-opacity-disabled)}&:focus-within{outline:var(--calcite-spacing-base) solid var(--calcite-color-brand);outline-offset:var(--calcite-spacing-base)}input[type=radio]{appearance:none;position:absolute;inset:0;opacity:.001;border:var(--calcite-spacing-px) solid transparent;cursor:pointer;&:checked+.content{border:var(--calcite-spacing-px) solid var(--calcite-color-brand)}+.content{border:var(--calcite-spacing-px) solid transparent;calcite-label{margin-bottom:calc(0px - var(--calcite-label-margin-bottom, .75rem));font-weight:var(--calcite-font-weight-medium)}}}}.inline-icon{margin-left:var(--calcite-spacing-xs);vertical-align:top;color:var(--calcite-color-status-warning)}}`,W="arcgis-grid-controls",s={base:W,borderedSwitch:"switch--bordered",container:"container",numericInputsContainer:"numeric-inputs-container",tileGroup:"tile-group",tile:"tile",tileDisabled:"disabled",tileContent:"content",inlineIcon:"inline-icon"},u={componentIcon:"grid-unit",gridTheme:{light:"circle",dark:"circle-area",custom:"palette"},placementState:{interactive:"maximum-territory-distance",place:"move",rotate:"rotate"},warning:"exclamation-mark-triangle"},v=h.fromArray([115,115,115]),_=h.fromArray([200,200,200]),j=["interactive","place","rotate"],A=M(z),w=class extends S{constructor(){super(...arguments),this._labelUid=$(),this._messages=I({}),this._viewModel=A(this),this._placementModeButtonRefs=new Map,this.numericSpacingInputShouldBeVisible=this._viewModel.numericSpacingInputShouldBeVisible,this.view=this._viewModel.view,this.icon=u.componentIcon,this.snappingOptions=this._viewModel.snappingOptions,this.hideColorSelection=!1,this.hideDynamicScaleToggle=!1,this.hideGridEnabledToggle=!1,this.hideNumericInputs=!1,this.hideGridSnapEnabledToggle=!1,this.hideLineIntervalInput=!1,this.hideOutOfScaleWarning=!1,this.hidePlacementButtons=!1,this.hideRotateWithMapToggle=!1,this.rotation=this._viewModel.rotation,this.rotateWithMap=this._viewModel.rotateWithMap,this.spacing=this._viewModel.spacing,this.majorLineInterval=this._viewModel.majorLineInterval,this.gridColor=this._viewModel.gridColor,this.displayEnabled=this._viewModel.displayEnabled,this.gridOutOfScale=this._viewModel.gridOutOfScale,this.unit=this._viewModel.unit,this.dynamicScaling=this._viewModel.dynamicScaling,this.gridControlsEnabled=this._viewModel.gridControlsEnabled,this.interactivePlacementState=this._viewModel.interactivePlacementState,this.snappingEnabled=this._viewModel.snappingEnabled,this.effectiveSpacingAfterDynamicScaling=this._viewModel.effectiveSpacingAfterDynamicScaling,this.placementDisabled=this._viewModel.placementDisabled,this.autoDestroyDisabled=!1,this.arcgisPropertyChange=k()("customColor","theme","spacing","rotation","majorLineInterval","rotateWithMap","dynamicScaling","snappingEnabled","interactivePlacementState","displayEnabled","gridOutOfScale","effectiveSpacingAfterDynamicScaling","gridControlsEnabled","gridColor"),this.arcgisReady=y()}static{this.properties={_placementModeButtonRefs:16,_warningIconTooltipRef:16,_themePopoverRef:16,numericSpacingInputShouldBeVisible:16,view:0,referenceElement:1,position:3,icon:1,customColor:[3,{converter:E}],snappingOptions:0,theme:1,hideColorSelection:5,hideDynamicScaleToggle:5,hideGridEnabledToggle:5,hideNumericInputs:5,hideGridSnapEnabledToggle:5,hideLineIntervalInput:5,hideOutOfScaleWarning:5,hidePlacementButtons:5,hideRotateWithMapToggle:5,rotation:11,rotateWithMap:5,spacing:11,majorLineInterval:11,gridColor:[3,{converter:E}],displayEnabled:4,gridOutOfScale:7,unit:1,dynamicScaling:5,gridControlsEnabled:4,interactivePlacementState:3,snappingEnabled:5,effectiveSpacingAfterDynamicScaling:43,placementDisabled:5,autoDestroyDisabled:5,messageOverrides:0,label:1}}static{this.styles=N}get theme(){let e=this.gridColor;return!e||v.equals(e)?"dark":_.equals(e)?"light":"custom"}set theme(e){let i=this._viewModel.view;switch(e){case"dark":this.gridColor=v;break;case"custom":this.customColor==null&&(this.customColor=i?.theme?.accentColor??new O().accentColor),this.gridColor=this.customColor;break;case"light":default:this.gridColor=_;break}}async destroy(){await this.manager.destroy()}trySetDisplayEnabled(e){this._viewModel.trySetDisplayEnabled(e)}loaded(){this.manager.onLifecycle(()=>[R(()=>this._viewModel.gridColor,e=>{let i=e instanceof h?e:typeof e=="string"?h.fromHex(e):null;i&&!v.equals(e)&&!_.equals(i)?this.customColor=i:v.equals(i)?this.theme="dark":_.equals(i)&&(this.theme="light")})])}_togglePlacementState(e){this.interactivePlacementState=this.interactivePlacementState===e?null:e}_setWarningIconRef(e){this._warningIconTooltipRef=e}_setPopoverRef(e){this._themePopoverRef=e}_emptyFunction(e){}_setPlacementButtonRef(e){if(e){let i=e.dataset.placementAction;this._placementModeButtonRefs.set(i,e)}else this._placementModeButtonRefs.clear()}render(){return r`<div class=${c(p(s.base,f.widget,f.panel))}><div class=${c(s.container)}>${this._renderContent()}</div></div>`}_renderContent(){let{hideGridEnabledToggle:e,hidePlacementButtons:i,hideNumericInputs:t,hideLineIntervalInput:a,hideGridSnapEnabledToggle:o,hideDynamicScaleToggle:l,hideRotateWithMapToggle:d,hideColorSelection:g}=this;return[e?void 0:this._renderEnabledToggle(),i?void 0:this._renderGridPlacementButtons(),t?void 0:this._renderNumericInputs(),a?void 0:this._renderIntervalInput(),!o&&this.snappingOptions?this._renderSnappingToggle():void 0,l?void 0:this._renderDynamicScaleToggle(),d?void 0:this._renderRotateToggle(),g?void 0:this._renderColorSelection()]}_renderGridPlacementButtons(){let{interactivePlacementState:e,placementDisabled:i,gridControlsEnabled:t}=this,a=i||!t;return r`<calcite-label scale=s>${this._messages.placementOptions}<calcite-action-bar expand-disabled layout=horizontal>${j.map(o=>this._renderPlacementModeButton(o,a,e))}</calcite-action-bar></calcite-label>`}_renderPlacementModeButton(e,i,t){let a=this._messages?.placementState?.[e],o=this._placementModeButtonRefs.get(e);return r`<div><calcite-action .active=${t===e} alignment=center .disabled=${i} .icon=${u.placementState[e]} data-placement-action=${e??m} @click=${()=>this._togglePlacementState(e)} .text=${a??""} ${b(this._setPlacementButtonRef)}></calcite-action>${o?r`<calcite-tooltip overlay-positioning=fixed placement=top .referenceElement=${o}>${a}</calcite-tooltip>`:void 0}</div>`}_renderNumericInputs(){let{rotation:e,spacing:i,effectiveSpacingAfterDynamicScaling:t,numericSpacingInputShouldBeVisible:a,gridControlsEnabled:o}=this,l=t!=null&&t!==i;return r`<div class=${c(p(s.numericInputsContainer))}>${[a?r`<calcite-label scale=s><span>${this._messages?.inputLabel?.spacing}${l?r`<calcite-icon class=${c(p(s.inlineIcon))} .icon=${u.warning} scale=s tabindex=0 ${b(this._setWarningIconRef)}></calcite-icon>`:void 0}</span><calcite-input-number .disabled=${!o} number-button-type=none .value=${i?.toFixed(2)} @calciteInputNumberChange=${({currentTarget:d})=>{let g=Number.parseFloat(d.value);this.spacing=g,g!==this.spacing&&(d.value=`${this.spacing}`)}}></calcite-input-number>${l&&this._warningIconTooltipRef?r`<calcite-tooltip overlay-positioning=fixed placement=leading .referenceElement=${this._warningIconTooltipRef}>${D(this._messages?.warnings?.dynamicSpacing??"",{actualSpacingIncludingUnit:t},{format:{actualSpacingIncludingUnit:{type:"number",intlOptions:{minimumFractionDigits:2,maximumFractionDigits:2,unit:this.unit??"meters",style:"decimal"}}}})}</calcite-tooltip>`:void 0}</calcite-label>`:void 0,r`<calcite-label scale=s>${this._messages?.inputLabel?.angle}<calcite-input-number .disabled=${!o} integer number-button-type=none suffix-text=\u00B0 .value=${`${L(e)}`} @calciteInputNumberChange=${({currentTarget:d})=>this.rotation=B(d.value)}></calcite-input-number></calcite-label>`]}</div>`}_renderIntervalInput(){let{majorLineInterval:e,gridControlsEnabled:i}=this;return r`<div class=${c(p(s.numericInputsContainer))}><calcite-label scale=s>${this._messages?.inputLabel?.interval}<calcite-input-number .disabled=${!i} integer max=15 min=1 number-button-type=vertical .value=${`${e}`} @calciteInputNumberChange=${({currentTarget:t})=>{let a=Number.parseInt(t.value,10);this.majorLineInterval=a,a!==this.majorLineInterval&&(t.value=`${this.majorLineInterval}`)}}></calcite-input-number></calcite-label></div>`}_renderSnappingToggle(){let{snappingOptions:e,gridControlsEnabled:i}=this,t=e?.gridEnabled??!1;return r`<arcgis-labeled-switch .checked=${!!t} .disabled=${!(i&&e)} .label=${this._messages?.switchLabel?.snap} @arcgisCheckedChanged=${a=>{a.stopPropagation(),this.snappingOptions?.set("gridEnabled",a.detail)}}></arcgis-labeled-switch>`}_renderDynamicScaleToggle(){let{_messages:e,gridOutOfScale:i,dynamicScaling:t,gridControlsEnabled:a}=this,o=!this.hideOutOfScaleWarning&&i;return r`<arcgis-labeled-switch .checked=${t} .disabled=${!a} .hint=${o?e?.warnings?.outOfScale:void 0} .hintIcon=${u.warning} hint-kind=warning .label=${e?.switchLabel?.scaling} @arcgisCheckedChanged=${l=>{l.stopPropagation(),this.dynamicScaling=l.detail}}></arcgis-labeled-switch>`}_renderRotateToggle(){let{gridControlsEnabled:e,rotateWithMap:i}=this;return r`<arcgis-labeled-switch .checked=${i} .disabled=${!e} .label=${this._messages?.switchLabel?.rotateWithMap??""} @arcgisCheckedChanged=${t=>{t.stopPropagation(),this.rotateWithMap=t.detail}}></arcgis-labeled-switch>`}_renderEnabledToggle(){return r`<div class=${c(s.borderedSwitch)}><arcgis-labeled-switch .checked=${this.displayEnabled} .disabled=${!!this.interactivePlacementState} .label=${this._messages?.switchLabel?.display} @arcgisCheckedChanged=${e=>{e.stopPropagation(),this.trySetDisplayEnabled(e.detail)}}></arcgis-labeled-switch></div>`}_renderColorSelection(){let{customColor:e}=this;return r`<calcite-label scale=s>${this._messages?.inputLabel?.theme}<div class=${c(s.tileGroup)}>${[this._renderThemeTile({value:"dark"}),this._renderThemeTile({value:"light"}),this._renderThemeTile({value:"custom"}),this._themePopoverRef?r`<calcite-popover auto-close .label=${this._messages?.gridLineColorPopoverLabel??""} overlay-positioning=fixed .referenceElement=${this._themePopoverRef}><calcite-color-picker alpha-channel saved-disabled .value=${e?.toHex({digits:8})??"#000000ff"} @calciteColorPickerChange=${i=>{let t=h.fromHex(i.currentTarget.value);t&&(this.customColor=t,this.theme="custom")}}></calcite-color-picker></calcite-popover>`:void 0]}</div></calcite-label>`}_renderThemeTile(e){let{theme:i,gridControlsEnabled:t}=this,{value:a}=e,o=this._messages?.gridTheme?.[a],l=`${this._labelUid}--theme_tile_${a}`,d=`${l}__label`,g=u.gridTheme[a];return r`<div class=${c(p({[s.tile]:!0,[s.tileDisabled]:!t}))} role=button ${b(a==="custom"?this._setPopoverRef:this._emptyFunction)}><input aria-labelledby=${d??m} .checked=${i===a} .disabled=${!t} id=${l??m} .name=${`${this._labelUid}--theme`} @change=${P=>{this.theme=a,P.currentTarget.focus()}} tabindex=0 type=radio><div class=${c(s.tileContent)}><calcite-icon .icon=${g} scale=l></calcite-icon><calcite-label .for=${l} id=${d??m}>${o}</calcite-label></div></div>`}};C("arcgis-grid-controls",w);return w},"views/Theme","Color","intl","core/reactiveUtils","widgets/support/GridControls/GridControlsViewModel",a,d,e)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as _}from"./LVHD6GZD.js";import f from"./S2RESMX6.js";import{a as $}from"./ZJVOCEY6.js";import e from"./Z7ZS7KFN.js";import{a as B}from"./WXNWY3FO.js";import d from"./O6HWFB4W.js";import{a as U}from"./3NACO3KH.js";import{a as u}from"./QB64EJHB.js";import c from"./S7N55PYB.js";import a from"./22UN5EMA.js";import{g as k}from"./XCAK6VPC.js";import"./TDHJIJLS.js";import"./63Q7R555.js";import"./BKCRKBXQ.js";import{H as x,I as C,J as v,L as g,O as S,a as w,b as l,s as b}from"./Y453EEUF.js";import"./OUDH32KU.js";export default $arcgis.t(([{ignoreAbortErrors:D},F,{getDefaultUnitForView:E},{property:a,subclass:A},{watch:m},{createChart:I},,,M,{a:O,d:f},z])=>{var T=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{--esri-widget-padding-x: 15px;--esri-widget-padding-y: var(--calcite-spacing-md);--esri-widget-padding: var(--esri-widget-padding-y) var(--esri-widget-padding-x);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__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(--esri-widget-padding);transition:max-height .25s ease-in-out;overflow-y:auto}:host{--internal-chart-height: 180px;--internal-gap: var(--calcite-spacing-sm-plus);width:550px;isolation:isolate;padding:var(--esri-widget-padding);position:relative;container-type:inline-size}.container{display:flex;flex-direction:column;width:100%;min-width:0;gap:var(--internal-gap)}.header{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;margin-bottom:calc(var(--internal-gap) * -1)}.actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--calcite-spacing-xs)}.action-button{width:auto;min-height:32px}.main-container{display:flex;position:relative;flex-flow:column;width:100%;height:var(--internal-chart-height)}.chart-container{position:relative;width:100%;height:100%}.prompt-container{box-sizing:border-box;display:grid;place-content:center;padding-inline:var(--calcite-spacing-md);height:100%;text-align:center}.prompt-message{margin:0;width:100%}.spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transition:opacity .15s ease-in-out;transition-delay:0;opacity:0;&.visible{transition-delay:50ms;opacity:1}&.small{inset-inline-start:0;top:-22px;left:unset;transform:none;color:var(--calcite-color-brand)}}@container (max-width: 400px){.esri-widget--panel{height:auto}.actions{flex-direction:column}.action-button{align-self:stretch}}`;function L({geometry:t}){return t!=null&&t.type==="polyline"&&t.paths.length>0&&t.paths.every(e=>e.length>=2)}function Z({geometry:t}){return t?.type==="polyline"&&t.paths.reduce((e,i)=>e+i.length,0)>0}function H(t){return t?.samples?.some(e=>e.z!=null)??!1}function j(t){return t?.type==="polyline"}async function R(t,e,i){let r=await q(t,e);return O(i),G(r)?r.highlight(e):$()}async function q(t,e){let i=e?.layer;if(!(!i||i.type==="subtype-sublayer"||i.type==="sublayer"||i.type==="building-component"))return await t.whenLayerView(i)}function G(t){return t!=null&&"highlight"in t&&typeof t.highlight=="function"}var J=Object.defineProperty,N=Object.getOwnPropertyDescriptor,s=(t,e,i,r)=>{for(var o=r>1?void 0:r?N(e,i):e,c=t.length-1,d;c>=0;c--)(d=t[c])&&(o=(r?d(e,i,o):d(o))||o);return r&&o&&J(e,i,o),o},n=class extends z{constructor(){super(...arguments),this.highlightDisabled=!1,this.uniformChartScaling=!1,this.shouldForceInteractive=!1,this.supportedViewType="both",this.unsupportedErrorMessage=""}get _measurementSystem(){return this.view?E(this.view):void 0}get _hasSamples(){let{progress:t}=this;return this._analysisView?.results?.some(e=>e.available&&(t<1||H(e)))??!1}get doneButtonAvailable(){if(this.featureIsSelected)return!1;let{geometry:t}=this.analysis;return j(t)&&t.paths.length>0&&t.paths[0].length>2}get effectiveDisplayUnits(){return this.analysisView?.effectiveDisplayUnits}get errorState(){if(!L(this.analysis))return"no-valid-input";let t=this.analysisView?.error;if(t)switch(t.name){case"too-complex":return"too-complex";case"elevation-query-error":return"no-valid-input";default:return"unknown"}return this._hasSamples?"none":"no-available-profiles"}get feature(){return this._selectedFeature}set feature(t){t?t!==this.feature&&(this.analysis.setGeometryFromFeature(t),this._selectedFeature=t):this._selectedFeature=void 0}get featureIsSelected(){return this.feature!=null}get hasVertices(){return Z(this.analysis)}get hoveredPosition(){return this.analysisView?.hoveredPosition??void 0}get geometry(){return this.analysis.geometry}set geometry(t){this.analysis.geometry=t}get elevationInfo(){return this.analysis.elevationInfo}set elevationInfo(t){this.analysis.elevationInfo=t}get profiles(){return this.analysis.profiles}set profiles(t){this.analysis.profiles=t}get progress(){return this.analysisView?.progress??0}get results(){return this.analysisView?.results??[]}get selectButtonAvailable(){for(let t of this.view?.map?.allLayers.toArray()??[])if(t.type==="graphics"&&!("internal"in t&&t.internal)&&t.graphics.some(e=>e.geometry?.type==="polyline")||"geometryType"in t&&t.geometryType==="polyline")return!0;return!!this.view?.graphics?.some(t=>t.geometry?.type==="polyline")}get state(){return this.disabled||!this.ready?"disabled":this._selectingPromise?"selecting":this.operationState==="active"?"creating":this.analysis.valid?this.featureIsSelected?"selected":"created":"ready"}get distanceUnit(){return P(this._userDistanceUnit??this.analysis.displayUnits?.distance??void 0,this.distanceUnitOptions,this._measurementSystem)}set distanceUnit(t){this._userDistanceUnit=t}get distanceUnitOptions(){return V(this._userDistanceUnitOptions)}set distanceUnitOptions(t){this._userDistanceUnitOptions=t}get elevationUnit(){return P(this._userElevationUnit??this.analysis.displayUnits?.elevation??void 0,this.elevationUnitOptions,this._measurementSystem)}set elevationUnit(t){this._userElevationUnit=t}get elevationUnitOptions(){return V(this._userElevationUnitOptions)}set elevationUnitOptions(t){this._userElevationUnitOptions=t}initialize(){this.addHandles([m(()=>({analysis:this.analysis,unitDistance:this.distanceUnit,unitElevation:this.elevationUnit}),({analysis:t,unitDistance:e,unitElevation:i})=>{if(t!=null){let r=t.displayUnits;r.elevation=i,r.distance=e}},{sync:!0,initial:!0}),m(()=>({selectedFeature:this.feature,profiles:this.analysis.profiles.toArray()}),({selectedFeature:t,profiles:e},i)=>{this._highlightSelectedFeature(this.highlightDisabled?void 0:t),this.analysis.viewOptions.geometryVisualizationVisible=!this.highlightDisabled&&t==null;let r=i?.selectedFeature;e.forEach(o=>{switch(o.type){case"scene":this._excludeSelectedFeatureFromProfile(o,t,r);break;case"input":o.chartOptions.lineVisible=t!=null,o.viewOptions.lineVisible=t!=null;break}})},{initial:!0})])}destroy(){this._removeSelectionHighlight()}async select(){let t=this.analysisView;if(!t)return;let e=super.start({operation:async i=>{let r=await t.pickFeature(i);i?.signal?.aborted||(t.interactive=!1,this.feature=r.feature)},clear:!1});e.finally(()=>{this._selectingPromise===e&&(this._selectingPromise=void 0)}),this._selectingPromise=e,await e.catch()}async place(t){await this.analysisView?.place(t)}clearAnalysis(){this.geometry=null,this.elevationInfo=null,this.feature=void 0}constructAnalysis(){return new F}_highlightSelectedFeature(t){this._removeSelectionHighlight();let e=this.view;!e||!t||(this._selectionHighlightTask=f(async i=>await R(e,t,{signal:i})))}_removeSelectionHighlight(){this._selectionHighlightTask?.value?.remove(),this._selectionHighlightTask=B(this._selectionHighlightTask)}_excludeSelectedFeatureFromProfile(t,e,i){let r=new Set(t.exclude??[]);i&&r.delete(i),e&&r.add(e),t.exclude=Array.from(r)}};s([a()],n.prototype,"_userDistanceUnit",2);s([a()],n.prototype,"_userDistanceUnitOptions",2);s([a()],n.prototype,"_userElevationUnit",2);s([a()],n.prototype,"_userElevationUnitOptions",2);s([a({readOnly:!0})],n.prototype,"_measurementSystem",1);s([a()],n.prototype,"_selectingPromise",2);s([a()],n.prototype,"_selectedFeature",2);s([a()],n.prototype,"_selectionHighlightTask",2);s([a()],n.prototype,"_hasSamples",1);s([a()],n.prototype,"doneButtonAvailable",1);s([a({readOnly:!0})],n.prototype,"effectiveDisplayUnits",1);s([a({readOnly:!0})],n.prototype,"errorState",1);s([a()],n.prototype,"feature",1);s([a()],n.prototype,"featureIsSelected",1);s([a({readOnly:!0})],n.prototype,"hasVertices",1);s([a()],n.prototype,"highlightDisabled",2);s([a()],n.prototype,"hoveredPosition",1);s([a()],n.prototype,"geometry",1);s([a()],n.prototype,"elevationInfo",1);s([a()],n.prototype,"profiles",1);s([a({readOnly:!0})],n.prototype,"progress",1);s([a({readOnly:!0})],n.prototype,"results",1);s([a({readOnly:!0})],n.prototype,"selectButtonAvailable",1);s([a({readOnly:!0})],n.prototype,"state",1);s([a()],n.prototype,"uniformChartScaling",2);s([a()],n.prototype,"distanceUnit",1);s([a()],n.prototype,"distanceUnitOptions",1);s([a()],n.prototype,"elevationUnit",1);s([a()],n.prototype,"elevationUnitOptions",1);n=s([A("components.elevation-profile.ElevationProfileViewModel")],n);function P(t,e,i){return t&&e.includes(t)?t:i&&e.includes(i)?i:e[0]}function V(t){let e=t?.filter(i=>_.includes(i));return e&&e.length>0?e:_.slice()}var Q=M(n),y=class extends C{constructor(){super(...arguments),this.viewModel=Q(this),this._messages=U(),this._hideZoomOutButton=!0,this.analysis=this.viewModel.analysis,this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.effectiveDisplayUnits=this.viewModel.effectiveDisplayUnits,this.feature=this.viewModel.feature,this.hideChart=!1,this.hideClearButton=!1,this.hideLegend=!1,this.hideSelectButton=!1,this.hideSettingsButton=!1,this.hideSketchButton=!1,this.hideUniformChartScalingToggle=!1,this.hideUnitSelector=!1,this.highlightDisabled=this.viewModel.highlightDisabled,this.hoveredPosition=this.viewModel.hoveredPosition,this.icon="altitude",this.geometry=this.viewModel.geometry,this.elevationInfo=this.viewModel.elevationInfo,this.profiles=this.viewModel.profiles,this.progress=this.viewModel.progress,this.state=this.viewModel.state,this.uniformChartScaling=this.viewModel.uniformChartScaling,this.distanceUnit=this.viewModel.distanceUnit,this.distanceUnitOptions=this.viewModel.distanceUnitOptions,this.elevationUnit=this.viewModel.elevationUnit,this.elevationUnitOptions=this.viewModel.elevationUnitOptions,this.arcgisPropertyChange=k()("geometry","effectiveDisplayUnits","progress","state"),this.arcgisReady=b()}static{this.properties={_hideZoomOutButton:16,_chartContainer:16,analysis:0,view:0,autoDestroyDisabled:5,effectiveDisplayUnits:32,feature:0,hideChart:5,hideClearButton:5,hideLegend:5,hideSelectButton:5,hideSettingsButton:5,hideSketchButton:5,hideUniformChartScalingToggle:5,hideUnitSelector:5,highlightDisabled:5,hoveredPosition:9,icon:3,geometry:0,elevationInfo:0,label:1,messageOverrides:0,position:1,referenceElement:1,profiles:0,progress:40,state:3,uniformChartScaling:5,distanceUnit:1,distanceUnitOptions:0,elevationUnit:1,elevationUnitOptions:0}}static{this.styles=T}get _selectButtonVisible(){return!this.hideSelectButton&&this.viewModel.selectButtonAvailable}get _chart(){return this._chartInitializationTask?.value}async destroy(){await this.manager.destroy()}async select(){D(this.viewModel.select())}async start(){D(this.viewModel.start())}async stop(){this.viewModel.stop()}async clear(){this.viewModel.clear()}load(){this.manager.onLifecycle(()=>[m(()=>({container:this._chartContainer}),({container:e})=>{this._destroyChart(),e&&(this._chartInitializationTask=f(async i=>await I({view:this.viewModel.view,analysisView:this.viewModel.analysisView,container:e,messages:this._messages,signal:i,uniformScaling:this.viewModel.uniformChartScaling,onRangeChange:(r,o)=>{this._hideZoomOutButton=r===1&&o===1},onCursorPositionChange:(r,o)=>{let{analysisView:c}=this.viewModel;c&&(c.hoveredPosition=r)}})))},{sync:!0,initial:!0}),m(()=>({chart:this._chart,view:this.viewModel.view,analysisView:this.viewModel.analysisView,uniformScaling:this.viewModel.uniformChartScaling}),({chart:e,view:i,analysisView:r,uniformScaling:o})=>{e&&(e.view=i,e.analysisView=r,e.uniformScaling=o)},{sync:!0,initial:!0}),{remove:()=>this._destroyChart()}])}_destroyChart(){let e=this._chart;this._chartInitializationTask?.abort(),this._chartInitializationTask=void 0,e?.destroy()}_onCancelButtonClick(){this.viewModel.stop(),this.viewModel.clear()}_onDoneButtonClick(){this.viewModel.stop()}_getErrorMessage(){let e=W[this.viewModel.errorState];return e?this._messages?.errors?.[e]:void 0}_onClearButtonClick(){this.viewModel.clear()}_onZoomOutButtonClick(){this._chart?.zoomOut()}_onChartContainerRef(e){this._chartContainer=e}render(){return l`<div aria-label=${this._messages.componentLabel??g} class=${v({container:!0,[u.widget]:!0,[u.widgetDisabled]:this.viewModel.state==="disabled",[u.panel]:!0})} role=presentation>${this._renderContentForState()}</div>`}_renderContentForState(){switch(this.viewModel.state){case"ready":return this._renderContentForReadyState();case"selecting":return this._renderContentForSelectingState();case"creating":return this._renderContentForCreatingState();case"selected":return this._renderContentForSelectedState();case"created":return this._renderContentForCreatedState();case"disabled":return this._renderContentForReadyState()}}_renderContentForReadyState(){let{_messages:e,hideSelectButton:i,hideSketchButton:r}=this,{selectButtonAvailable:o}=this.viewModel,c=!i&&o,d;return!r&&c?d=e.readyPrompt:r?c?d=e.readyPromptSelectOnly:d=e.errors?.noProfile:d=e.readyPromptCreateOnly,this._renderContent({prompt:d,chart:!1,actions:p})}_renderContentForSelectingState(){let{view:e}=this.viewModel;if(!e)return;let i=this._messages[`selectingPrompt-${e.type}`];return this._renderContent({prompt:i,chart:!1,actions:[{type:"select-cancel"}]})}_renderContentForCreatingState(){let{viewModel:e}=this,{view:i}=e;if(!i)return;let r=e.hasVertices?[{type:"sketch-cancel"},{type:"sketch-done",disabled:!e.doneButtonAvailable}]:[{type:"select"},{type:"sketch",disabled:!0}];if(e.errorState==="no-valid-input"){let c=this._messages[`creatingPrompt-${i.type}`];return this._renderContent({chart:!1,actions:r,prompt:c})}let o=this._getErrorMessage();return o?this._renderContent({chart:!1,actions:r,prompt:o}):this._renderContent({chart:!0,actions:r})}_renderContentForSelectedState(){let e=this._getErrorMessage();return e?this._renderContent({chart:!1,actions:p,prompt:e}):this._renderContent({chart:!0,actions:p})}_renderContentForCreatedState(){let e=this._getErrorMessage();return e?this._renderContent({chart:!1,actions:p,prompt:e}):this._renderContent({chart:!0,actions:p})}_renderContent(e){let{viewModel:i}=this,r=i.geometry!=null;return l`<header class="header">${h({hidden:this._hideZoomOutButton,children:this._renderZoomOutButton()})}${h({hidden:this.hideClearButton||!r,children:this._renderClearButton()})}${h({hidden:this.hideSettingsButton,children:this._renderSettingsButton()})}</header><div class="main-container">${e.prompt!=null?this._renderPrompt(e.prompt):e.chart?this._renderChart():void 0}</div>${h({hidden:this.hideLegend,children:this._renderLegend()})}${this._renderActions(e)}`}_renderPrompt(e){return[l`<div class="prompt-container"><p class="prompt-message">${e}</p></div>`]}_renderZoomOutButton(){let e=this._messages.zoomOut??"";return l`<calcite-action appearance=transparent icon=magnifying-glass-minus @click=${this._onZoomOutButtonClick} scale=s .text=${e} title=${e??g}></calcite-action>`}_renderChart(){if(this.hideChart)return;let e=this._chart;return l`${this._renderSpinner({size:e?.chartVisible?"small":"large",visible:e?.spinnerVisible??!1})}<div class="chart-container" ${x(this._onChartContainerRef)}></div>`}_renderSpinner(e){let i=e.size==="small",r=e.visible??!0;return l`<calcite-loader class=${v({spinner:!0,small:i,visible:r})} .inline=${i} label scale=s></calcite-loader>`}_renderClearButton(){let e=this._messages.clearProfile??"";return l`<calcite-action appearance=transparent icon=trash @click=${this._onClearButtonClick} scale=s .text=${e} title=${e??g}></calcite-action>`}_renderLegend(){return l`<arcgis-elevation-profile-legend .effectiveDisplayUnits=${this.viewModel.effectiveDisplayUnits} .featureSelected=${this.viewModel.featureIsSelected} .messages=${this._messages} .results=${this.viewModel.results}></arcgis-elevation-profile-legend>`}_renderSettingsButton(){return l`<arcgis-elevation-profile-settings .analysis=${this.viewModel.analysis} .hideUniformChartScalingToggle=${this.hideUniformChartScalingToggle} .hideUnitSelector=${this.hideUnitSelector} .messages=${this._messages} .uniformChartScaling=${this.viewModel.uniformChartScaling} .unitOptionsDistance=${this.viewModel.distanceUnitOptions} .unitOptionsElevation=${this.viewModel.elevationUnitOptions} @arcgisElevationProfileSettingsUniformChartScalingChange=${e=>{this.viewModel.uniformChartScaling=e.detail}}></arcgis-elevation-profile-settings>`}_renderActions({actions:e}){let i=this._messages,r=e.map(o=>{switch(o.type){case"sketch":return h({hidden:this.hideSketchButton,children:this._renderAction({action:o,label:i.sketchButtonLabel,primary:!0,onClick:()=>void this.start()})});case"sketch-cancel":return h({hidden:this.hideSketchButton,children:this._renderAction({action:o,label:i.cancelButtonLabel,primary:!1,onClick:this._onCancelButtonClick})});case"sketch-done":return h({hidden:this.hideSketchButton,children:this._renderAction({action:o,label:i.doneButtonLabel,primary:!0,onClick:this._onDoneButtonClick})});case"select":return h({hidden:!this._selectButtonVisible,children:this._renderAction({action:o,label:i.selectButtonLabel,primary:!1,onClick:()=>void this.select()})});case"select-cancel":return h({hidden:!this._selectButtonVisible,children:this._renderAction({action:o,label:i.cancelButtonLabel,primary:!1,onClick:this._onCancelButtonClick})});default:return}}).filter(Boolean);return r.length?l`<footer class="actions">${r}</footer>`:void 0}_renderAction({action:e,label:i,onClick:r,primary:o}){return l`<calcite-button .appearance=${o?"solid":"outline-fill"} class="action-button" .disabled=${e.disabled||void 0} @click=${r}>${i}</calcite-button>`}};function h(t){return t.hidden?void 0:t.children}var p=[{type:"select"},{type:"sketch"}],W={none:void 0,"no-valid-input":"noProfile","no-available-profiles":"noProfile","too-complex":"tooComplex",unknown:"unknown"};S("arcgis-elevation-profile",y);return y},"core/promiseUtils","analysis/ElevationProfileAnalysis","applications/Components/getDefaultUnits","core/accessorSupport/decorators","core/reactiveUtils","applications/Components/analysisUtils",a,c,d,e,f)
|
|
3
|
+
v5.0.0-next.64 */
|
|
4
|
+
import{a as _}from"./Y77HECJ4.js";import f from"./GAZ33ABI.js";import{a as $}from"./WU73LKLD.js";import e from"./GHDGNI7M.js";import{a as B}from"./5IMCYYOC.js";import d from"./M6LJ434S.js";import{a as U}from"./OTCI7IQX.js";import{a as u}from"./SGTCBTC5.js";import c from"./2PXPFBQ7.js";import a from"./ALMUOVFH.js";import{g as k}from"./NIDPKSBS.js";import"./GC3J2KGC.js";import"./PLEYUHX7.js";import"./4JCGYSBS.js";import{H as x,I as C,J as v,L as g,O as S,a as w,b as l,s as b}from"./YTCSJTV2.js";import"./GLF65OBX.js";export default $arcgis.t(([{ignoreAbortErrors:D},F,{getDefaultUnitForView:E},{property:a,subclass:A},{watch:m},{createChart:I},,,M,{a:O,d:f},z])=>{var T=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{--esri-widget-padding-x: 15px;--esri-widget-padding-y: var(--calcite-spacing-md);--esri-widget-padding: var(--esri-widget-padding-y) var(--esri-widget-padding-x);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__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(--esri-widget-padding);transition:max-height .25s ease-in-out;overflow-y:auto}:host{--internal-chart-height: 180px;--internal-gap: var(--calcite-spacing-sm-plus);width:550px;isolation:isolate;padding:var(--esri-widget-padding);position:relative;container-type:inline-size}.container{display:flex;flex-direction:column;width:100%;min-width:0;gap:var(--internal-gap)}.header{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;margin-bottom:calc(var(--internal-gap) * -1)}.actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--calcite-spacing-xs)}.action-button{width:auto;min-height:32px}.main-container{display:flex;position:relative;flex-flow:column;width:100%;height:var(--internal-chart-height)}.chart-container{position:relative;width:100%;height:100%}.prompt-container{box-sizing:border-box;display:grid;place-content:center;padding-inline:var(--calcite-spacing-md);height:100%;text-align:center}.prompt-message{margin:0;width:100%}.spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transition:opacity .15s ease-in-out;transition-delay:0;opacity:0;&.visible{transition-delay:50ms;opacity:1}&.small{inset-inline-start:0;top:-22px;left:unset;transform:none;color:var(--calcite-color-brand)}}@container (max-width: 400px){.esri-widget--panel{height:auto}.actions{flex-direction:column}.action-button{align-self:stretch}}`;function L({geometry:t}){return t!=null&&t.type==="polyline"&&t.paths.length>0&&t.paths.every(e=>e.length>=2)}function Z({geometry:t}){return t?.type==="polyline"&&t.paths.reduce((e,i)=>e+i.length,0)>0}function H(t){return t?.samples?.some(e=>e.z!=null)??!1}function j(t){return t?.type==="polyline"}async function R(t,e,i){let r=await q(t,e);return O(i),G(r)?r.highlight(e):$()}async function q(t,e){let i=e?.layer;if(!(!i||i.type==="subtype-sublayer"||i.type==="sublayer"||i.type==="building-component"))return await t.whenLayerView(i)}function G(t){return t!=null&&"highlight"in t&&typeof t.highlight=="function"}var J=Object.defineProperty,N=Object.getOwnPropertyDescriptor,s=(t,e,i,r)=>{for(var o=r>1?void 0:r?N(e,i):e,c=t.length-1,d;c>=0;c--)(d=t[c])&&(o=(r?d(e,i,o):d(o))||o);return r&&o&&J(e,i,o),o},n=class extends z{constructor(){super(...arguments),this.highlightDisabled=!1,this.uniformChartScaling=!1,this.shouldForceInteractive=!1,this.supportedViewType="both",this.unsupportedErrorMessage=""}get _measurementSystem(){return this.view?E(this.view):void 0}get _hasSamples(){let{progress:t}=this;return this._analysisView?.results?.some(e=>e.available&&(t<1||H(e)))??!1}get doneButtonAvailable(){if(this.featureIsSelected)return!1;let{geometry:t}=this.analysis;return j(t)&&t.paths.length>0&&t.paths[0].length>2}get effectiveDisplayUnits(){return this.analysisView?.effectiveDisplayUnits}get errorState(){if(!L(this.analysis))return"no-valid-input";let t=this.analysisView?.error;if(t)switch(t.name){case"too-complex":return"too-complex";case"elevation-query-error":return"no-valid-input";default:return"unknown"}return this._hasSamples?"none":"no-available-profiles"}get feature(){return this._selectedFeature}set feature(t){t?t!==this.feature&&(this.analysis.setGeometryFromFeature(t),this._selectedFeature=t):this._selectedFeature=void 0}get featureIsSelected(){return this.feature!=null}get hasVertices(){return Z(this.analysis)}get hoveredPosition(){return this.analysisView?.hoveredPosition??void 0}get geometry(){return this.analysis.geometry}set geometry(t){this.analysis.geometry=t}get elevationInfo(){return this.analysis.elevationInfo}set elevationInfo(t){this.analysis.elevationInfo=t}get profiles(){return this.analysis.profiles}set profiles(t){this.analysis.profiles=t}get progress(){return this.analysisView?.progress??0}get results(){return this.analysisView?.results??[]}get selectButtonAvailable(){for(let t of this.view?.map?.allLayers.toArray()??[])if(t.type==="graphics"&&!("internal"in t&&t.internal)&&t.graphics.some(e=>e.geometry?.type==="polyline")||"geometryType"in t&&t.geometryType==="polyline")return!0;return!!this.view?.graphics?.some(t=>t.geometry?.type==="polyline")}get state(){return this.disabled||!this.ready?"disabled":this._selectingPromise?"selecting":this.operationState==="active"?"creating":this.analysis.valid?this.featureIsSelected?"selected":"created":"ready"}get distanceUnit(){return P(this._userDistanceUnit??this.analysis.displayUnits?.distance??void 0,this.distanceUnitOptions,this._measurementSystem)}set distanceUnit(t){this._userDistanceUnit=t}get distanceUnitOptions(){return V(this._userDistanceUnitOptions)}set distanceUnitOptions(t){this._userDistanceUnitOptions=t}get elevationUnit(){return P(this._userElevationUnit??this.analysis.displayUnits?.elevation??void 0,this.elevationUnitOptions,this._measurementSystem)}set elevationUnit(t){this._userElevationUnit=t}get elevationUnitOptions(){return V(this._userElevationUnitOptions)}set elevationUnitOptions(t){this._userElevationUnitOptions=t}initialize(){this.addHandles([m(()=>({analysis:this.analysis,unitDistance:this.distanceUnit,unitElevation:this.elevationUnit}),({analysis:t,unitDistance:e,unitElevation:i})=>{if(t!=null){let r=t.displayUnits;r.elevation=i,r.distance=e}},{sync:!0,initial:!0}),m(()=>({selectedFeature:this.feature,profiles:this.analysis.profiles.toArray()}),({selectedFeature:t,profiles:e},i)=>{this._highlightSelectedFeature(this.highlightDisabled?void 0:t),this.analysis.viewOptions.geometryVisualizationVisible=!this.highlightDisabled&&t==null;let r=i?.selectedFeature;e.forEach(o=>{switch(o.type){case"scene":this._excludeSelectedFeatureFromProfile(o,t,r);break;case"input":o.chartOptions.lineVisible=t!=null,o.viewOptions.lineVisible=t!=null;break}})},{initial:!0})])}destroy(){this._removeSelectionHighlight()}async select(){let t=this.analysisView;if(!t)return;let e=super.start({operation:async i=>{let r=await t.pickFeature(i);i?.signal?.aborted||(t.interactive=!1,this.feature=r.feature)},clear:!1});e.finally(()=>{this._selectingPromise===e&&(this._selectingPromise=void 0)}),this._selectingPromise=e,await e.catch()}async place(t){await this.analysisView?.place(t)}clearAnalysis(){this.geometry=null,this.elevationInfo=null,this.feature=void 0}constructAnalysis(){return new F}_highlightSelectedFeature(t){this._removeSelectionHighlight();let e=this.view;!e||!t||(this._selectionHighlightTask=f(async i=>await R(e,t,{signal:i})))}_removeSelectionHighlight(){this._selectionHighlightTask?.value?.remove(),this._selectionHighlightTask=B(this._selectionHighlightTask)}_excludeSelectedFeatureFromProfile(t,e,i){let r=new Set(t.exclude??[]);i&&r.delete(i),e&&r.add(e),t.exclude=Array.from(r)}};s([a()],n.prototype,"_userDistanceUnit",2);s([a()],n.prototype,"_userDistanceUnitOptions",2);s([a()],n.prototype,"_userElevationUnit",2);s([a()],n.prototype,"_userElevationUnitOptions",2);s([a({readOnly:!0})],n.prototype,"_measurementSystem",1);s([a()],n.prototype,"_selectingPromise",2);s([a()],n.prototype,"_selectedFeature",2);s([a()],n.prototype,"_selectionHighlightTask",2);s([a()],n.prototype,"_hasSamples",1);s([a()],n.prototype,"doneButtonAvailable",1);s([a({readOnly:!0})],n.prototype,"effectiveDisplayUnits",1);s([a({readOnly:!0})],n.prototype,"errorState",1);s([a()],n.prototype,"feature",1);s([a()],n.prototype,"featureIsSelected",1);s([a({readOnly:!0})],n.prototype,"hasVertices",1);s([a()],n.prototype,"highlightDisabled",2);s([a()],n.prototype,"hoveredPosition",1);s([a()],n.prototype,"geometry",1);s([a()],n.prototype,"elevationInfo",1);s([a()],n.prototype,"profiles",1);s([a({readOnly:!0})],n.prototype,"progress",1);s([a({readOnly:!0})],n.prototype,"results",1);s([a({readOnly:!0})],n.prototype,"selectButtonAvailable",1);s([a({readOnly:!0})],n.prototype,"state",1);s([a()],n.prototype,"uniformChartScaling",2);s([a()],n.prototype,"distanceUnit",1);s([a()],n.prototype,"distanceUnitOptions",1);s([a()],n.prototype,"elevationUnit",1);s([a()],n.prototype,"elevationUnitOptions",1);n=s([A("components.elevation-profile.ElevationProfileViewModel")],n);function P(t,e,i){return t&&e.includes(t)?t:i&&e.includes(i)?i:e[0]}function V(t){let e=t?.filter(i=>_.includes(i));return e&&e.length>0?e:_.slice()}var Q=M(n),y=class extends C{constructor(){super(...arguments),this.viewModel=Q(this),this._messages=U(),this._hideZoomOutButton=!0,this.analysis=this.viewModel.analysis,this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.effectiveDisplayUnits=this.viewModel.effectiveDisplayUnits,this.feature=this.viewModel.feature,this.hideChart=!1,this.hideClearButton=!1,this.hideLegend=!1,this.hideSelectButton=!1,this.hideSettingsButton=!1,this.hideSketchButton=!1,this.hideUniformChartScalingToggle=!1,this.hideUnitSelector=!1,this.highlightDisabled=this.viewModel.highlightDisabled,this.hoveredPosition=this.viewModel.hoveredPosition,this.icon="altitude",this.geometry=this.viewModel.geometry,this.elevationInfo=this.viewModel.elevationInfo,this.profiles=this.viewModel.profiles,this.progress=this.viewModel.progress,this.state=this.viewModel.state,this.uniformChartScaling=this.viewModel.uniformChartScaling,this.distanceUnit=this.viewModel.distanceUnit,this.distanceUnitOptions=this.viewModel.distanceUnitOptions,this.elevationUnit=this.viewModel.elevationUnit,this.elevationUnitOptions=this.viewModel.elevationUnitOptions,this.arcgisPropertyChange=k()("geometry","effectiveDisplayUnits","progress","state"),this.arcgisReady=b()}static{this.properties={_hideZoomOutButton:16,_chartContainer:16,analysis:0,view:0,autoDestroyDisabled:5,effectiveDisplayUnits:32,feature:0,hideChart:5,hideClearButton:5,hideLegend:5,hideSelectButton:5,hideSettingsButton:5,hideSketchButton:5,hideUniformChartScalingToggle:5,hideUnitSelector:5,highlightDisabled:5,hoveredPosition:9,icon:3,geometry:0,elevationInfo:0,label:1,messageOverrides:0,position:1,referenceElement:1,profiles:0,progress:40,state:3,uniformChartScaling:5,distanceUnit:1,distanceUnitOptions:0,elevationUnit:1,elevationUnitOptions:0}}static{this.styles=T}get _selectButtonVisible(){return!this.hideSelectButton&&this.viewModel.selectButtonAvailable}get _chart(){return this._chartInitializationTask?.value}async destroy(){await this.manager.destroy()}async select(){D(this.viewModel.select())}async start(){D(this.viewModel.start())}async stop(){this.viewModel.stop()}async clear(){this.viewModel.clear()}load(){this.manager.onLifecycle(()=>[m(()=>({container:this._chartContainer}),({container:e})=>{this._destroyChart(),e&&(this._chartInitializationTask=f(async i=>await I({view:this.viewModel.view,analysisView:this.viewModel.analysisView,container:e,messages:this._messages,signal:i,uniformScaling:this.viewModel.uniformChartScaling,onRangeChange:(r,o)=>{this._hideZoomOutButton=r===1&&o===1},onCursorPositionChange:(r,o)=>{let{analysisView:c}=this.viewModel;c&&(c.hoveredPosition=r)}})))},{sync:!0,initial:!0}),m(()=>({chart:this._chart,view:this.viewModel.view,analysisView:this.viewModel.analysisView,uniformScaling:this.viewModel.uniformChartScaling}),({chart:e,view:i,analysisView:r,uniformScaling:o})=>{e&&(e.view=i,e.analysisView=r,e.uniformScaling=o)},{sync:!0,initial:!0}),{remove:()=>this._destroyChart()}])}_destroyChart(){let e=this._chart;this._chartInitializationTask?.abort(),this._chartInitializationTask=void 0,e?.destroy()}_onCancelButtonClick(){this.viewModel.stop(),this.viewModel.clear()}_onDoneButtonClick(){this.viewModel.stop()}_getErrorMessage(){let e=W[this.viewModel.errorState];return e?this._messages?.errors?.[e]:void 0}_onClearButtonClick(){this.viewModel.clear()}_onZoomOutButtonClick(){this._chart?.zoomOut()}_onChartContainerRef(e){this._chartContainer=e}render(){return l`<div aria-label=${this._messages.componentLabel??g} class=${v({container:!0,[u.widget]:!0,[u.widgetDisabled]:this.viewModel.state==="disabled",[u.panel]:!0})} role=presentation>${this._renderContentForState()}</div>`}_renderContentForState(){switch(this.viewModel.state){case"ready":return this._renderContentForReadyState();case"selecting":return this._renderContentForSelectingState();case"creating":return this._renderContentForCreatingState();case"selected":return this._renderContentForSelectedState();case"created":return this._renderContentForCreatedState();case"disabled":return this._renderContentForReadyState()}}_renderContentForReadyState(){let{_messages:e,hideSelectButton:i,hideSketchButton:r}=this,{selectButtonAvailable:o}=this.viewModel,c=!i&&o,d;return!r&&c?d=e.readyPrompt:r?c?d=e.readyPromptSelectOnly:d=e.errors?.noProfile:d=e.readyPromptCreateOnly,this._renderContent({prompt:d,chart:!1,actions:p})}_renderContentForSelectingState(){let{view:e}=this.viewModel;if(!e)return;let i=this._messages[`selectingPrompt-${e.type}`];return this._renderContent({prompt:i,chart:!1,actions:[{type:"select-cancel"}]})}_renderContentForCreatingState(){let{viewModel:e}=this,{view:i}=e;if(!i)return;let r=e.hasVertices?[{type:"sketch-cancel"},{type:"sketch-done",disabled:!e.doneButtonAvailable}]:[{type:"select"},{type:"sketch",disabled:!0}];if(e.errorState==="no-valid-input"){let c=this._messages[`creatingPrompt-${i.type}`];return this._renderContent({chart:!1,actions:r,prompt:c})}let o=this._getErrorMessage();return o?this._renderContent({chart:!1,actions:r,prompt:o}):this._renderContent({chart:!0,actions:r})}_renderContentForSelectedState(){let e=this._getErrorMessage();return e?this._renderContent({chart:!1,actions:p,prompt:e}):this._renderContent({chart:!0,actions:p})}_renderContentForCreatedState(){let e=this._getErrorMessage();return e?this._renderContent({chart:!1,actions:p,prompt:e}):this._renderContent({chart:!0,actions:p})}_renderContent(e){let{viewModel:i}=this,r=i.geometry!=null;return l`<header class="header">${h({hidden:this._hideZoomOutButton,children:this._renderZoomOutButton()})}${h({hidden:this.hideClearButton||!r,children:this._renderClearButton()})}${h({hidden:this.hideSettingsButton,children:this._renderSettingsButton()})}</header><div class="main-container">${e.prompt!=null?this._renderPrompt(e.prompt):e.chart?this._renderChart():void 0}</div>${h({hidden:this.hideLegend,children:this._renderLegend()})}${this._renderActions(e)}`}_renderPrompt(e){return[l`<div class="prompt-container"><p class="prompt-message">${e}</p></div>`]}_renderZoomOutButton(){let e=this._messages.zoomOut??"";return l`<calcite-action appearance=transparent icon=magnifying-glass-minus @click=${this._onZoomOutButtonClick} scale=s .text=${e} title=${e??g}></calcite-action>`}_renderChart(){if(this.hideChart)return;let e=this._chart;return l`${this._renderSpinner({size:e?.chartVisible?"small":"large",visible:e?.spinnerVisible??!1})}<div class="chart-container" ${x(this._onChartContainerRef)}></div>`}_renderSpinner(e){let i=e.size==="small",r=e.visible??!0;return l`<calcite-loader class=${v({spinner:!0,small:i,visible:r})} .inline=${i} label scale=s></calcite-loader>`}_renderClearButton(){let e=this._messages.clearProfile??"";return l`<calcite-action appearance=transparent icon=trash @click=${this._onClearButtonClick} scale=s .text=${e} title=${e??g}></calcite-action>`}_renderLegend(){return l`<arcgis-elevation-profile-legend .effectiveDisplayUnits=${this.viewModel.effectiveDisplayUnits} .featureSelected=${this.viewModel.featureIsSelected} .messages=${this._messages} .results=${this.viewModel.results}></arcgis-elevation-profile-legend>`}_renderSettingsButton(){return l`<arcgis-elevation-profile-settings .analysis=${this.viewModel.analysis} .hideUniformChartScalingToggle=${this.hideUniformChartScalingToggle} .hideUnitSelector=${this.hideUnitSelector} .messages=${this._messages} .uniformChartScaling=${this.viewModel.uniformChartScaling} .unitOptionsDistance=${this.viewModel.distanceUnitOptions} .unitOptionsElevation=${this.viewModel.elevationUnitOptions} @arcgisElevationProfileSettingsUniformChartScalingChange=${e=>{this.viewModel.uniformChartScaling=e.detail}}></arcgis-elevation-profile-settings>`}_renderActions({actions:e}){let i=this._messages,r=e.map(o=>{switch(o.type){case"sketch":return h({hidden:this.hideSketchButton,children:this._renderAction({action:o,label:i.sketchButtonLabel,primary:!0,onClick:()=>void this.start()})});case"sketch-cancel":return h({hidden:this.hideSketchButton,children:this._renderAction({action:o,label:i.cancelButtonLabel,primary:!1,onClick:this._onCancelButtonClick})});case"sketch-done":return h({hidden:this.hideSketchButton,children:this._renderAction({action:o,label:i.doneButtonLabel,primary:!0,onClick:this._onDoneButtonClick})});case"select":return h({hidden:!this._selectButtonVisible,children:this._renderAction({action:o,label:i.selectButtonLabel,primary:!1,onClick:()=>void this.select()})});case"select-cancel":return h({hidden:!this._selectButtonVisible,children:this._renderAction({action:o,label:i.cancelButtonLabel,primary:!1,onClick:this._onCancelButtonClick})});default:return}}).filter(Boolean);return r.length?l`<footer class="actions">${r}</footer>`:void 0}_renderAction({action:e,label:i,onClick:r,primary:o}){return l`<calcite-button .appearance=${o?"solid":"outline-fill"} class="action-button" .disabled=${e.disabled||void 0} @click=${r}>${i}</calcite-button>`}};function h(t){return t.hidden?void 0:t.children}var p=[{type:"select"},{type:"sketch"}],W={none:void 0,"no-valid-input":"noProfile","no-available-profiles":"noProfile","too-complex":"tooComplex",unknown:"unknown"};S("arcgis-elevation-profile",y);return y},"core/promiseUtils","analysis/ElevationProfileAnalysis","applications/Components/getDefaultUnits","core/accessorSupport/decorators","core/reactiveUtils","applications/Components/analysisUtils",a,c,d,e,f)
|