@arcgis/map-components 5.2.0-next.79 → 5.2.0-next.84
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/{5AQ2DLHA.js → 22ORLWUA.js} +1 -1
- package/dist/cdn/{XZSUBU4T.js → 24PDYG7O.js} +1 -1
- package/dist/cdn/{BPARROZU.js → 2BDZP327.js} +1 -1
- package/dist/cdn/{NDMHZQ2Z.js → 2BVXNQ3U.js} +1 -1
- package/dist/cdn/{K3VQUQ6I.js → 2FM2FJAY.js} +1 -1
- package/dist/cdn/{FRBI5DO2.js → 2PBI4WYR.js} +1 -1
- package/dist/cdn/{NESU6NXH.js → 2VSEEB47.js} +1 -1
- package/dist/cdn/{K2KLJ32T.js → 2XRY235R.js} +1 -1
- package/dist/cdn/3AQ6NC3C.js +2 -0
- package/dist/cdn/{AZKD3JVJ.js → 3FTPFEZR.js} +1 -1
- package/dist/cdn/{3SN6IS3V.js → 3KVV7ZIB.js} +1 -1
- package/dist/cdn/{B2GZY6PZ.js → 3KYGTOFI.js} +1 -1
- package/dist/cdn/3L7T2IRD.js +2 -0
- package/dist/cdn/{SRAXSED3.js → 3MHQ3Y3W.js} +1 -1
- package/dist/cdn/{ETV3RIV4.js → 3NWZC6DC.js} +1 -1
- package/dist/cdn/{G3GFYB3W.js → 3T7L7UT5.js} +1 -1
- package/dist/cdn/{S55YL3HD.js → 3UUQJCZL.js} +1 -1
- package/dist/cdn/{KG4E7MUN.js → 3XE3WNGC.js} +1 -1
- package/dist/cdn/{KTCKSRJG.js → 42TPQKQZ.js} +1 -1
- package/dist/cdn/{EZ32225G.js → 453C7IUP.js} +1 -1
- package/dist/cdn/{5VHXHQ36.js → 4GEFIIBU.js} +1 -1
- package/dist/cdn/{SMTTIAFG.js → 4H6PSGCG.js} +1 -1
- package/dist/cdn/{UJ3FO7VY.js → 4Q6IWOPE.js} +1 -1
- package/dist/cdn/{B5GF4C7T.js → 4T6ECCFH.js} +1 -1
- package/dist/cdn/{RDA3MEE2.js → 4UBDCXSK.js} +1 -1
- package/dist/cdn/{QLIWDFZI.js → 4W3T75SY.js} +1 -1
- package/dist/cdn/{TZGK64CZ.js → 56NINR5L.js} +1 -1
- package/dist/cdn/{BHAY27CX.js → 5EP57RZK.js} +1 -1
- package/dist/cdn/{54LZZPH7.js → 5F4TM4DQ.js} +1 -1
- package/dist/cdn/{FCGXXNEE.js → 5VHJTIA4.js} +1 -1
- package/dist/cdn/{DSVRIWYW.js → 62LN764Z.js} +1 -1
- package/dist/cdn/{LWGNINKF.js → 62UEF6RI.js} +1 -1
- package/dist/cdn/{Q44GFWWJ.js → 645DRFAT.js} +1 -1
- package/dist/cdn/{R5RHR73A.js → 67PVPQ2A.js} +1 -1
- package/dist/cdn/{RAUX4YDR.js → 6AEBAXJV.js} +1 -1
- package/dist/cdn/{N7YPGWHZ.js → 6KVXHFAI.js} +1 -1
- package/dist/cdn/{QMXF5LPA.js → 6KXGNGPR.js} +1 -1
- package/dist/cdn/6MEC4BFN.js +2 -0
- package/dist/cdn/{KZQ5ZQEP.js → 6NDLOXKQ.js} +1 -1
- package/dist/cdn/{HGPMWYEJ.js → 6PFEONTQ.js} +1 -1
- package/dist/cdn/{AYJ4XEW3.js → 6ZURXEAE.js} +1 -1
- package/dist/cdn/{K2HEKJRC.js → 7HL2TQ7E.js} +1 -1
- package/dist/cdn/{HZVC4F3N.js → 7IWMEBK6.js} +1 -1
- package/dist/cdn/{5OPSVESB.js → 7J5Z2RHQ.js} +1 -1
- package/dist/cdn/{Q547RMCD.js → 7JCPGA62.js} +1 -1
- package/dist/cdn/{HSRSC5A3.js → 7OFFUYIA.js} +1 -1
- package/dist/cdn/{K76HO7P7.js → 7Q62J3QW.js} +1 -1
- package/dist/cdn/{KXYV52R5.js → 7XDG253K.js} +1 -1
- package/dist/cdn/{RP6OFG3R.js → A2LHW4XE.js} +1 -1
- package/dist/cdn/{42UVPIOD.js → A4X5YDA6.js} +1 -1
- package/dist/cdn/{LGFVRB7B.js → AEWE5NOZ.js} +1 -1
- package/dist/cdn/{JFNKQEAB.js → AG6XG3QV.js} +1 -1
- package/dist/cdn/{QM3KT7SZ.js → AJ7XRBWN.js} +1 -1
- package/dist/cdn/{7OBUF2FK.js → AKWAWGJI.js} +1 -1
- package/dist/cdn/{LBL4JL7T.js → ARVN7QLQ.js} +1 -1
- package/dist/cdn/{LFEMVA6D.js → ATJRAUEJ.js} +1 -1
- package/dist/cdn/{M2O6IGEH.js → AVJ3D46P.js} +1 -1
- package/dist/cdn/{LCWKOR7D.js → AY7A2WZ2.js} +1 -1
- package/dist/cdn/{IKTXSXXQ.js → BDKJXRDB.js} +1 -1
- package/dist/cdn/{UYF6TF6U.js → BHADA675.js} +1 -1
- package/dist/cdn/{OIZPPRAI.js → BHM6MPAV.js} +1 -1
- package/dist/cdn/{NMWFIDS3.js → BITXHOPV.js} +1 -1
- package/dist/cdn/{T6ONYBEY.js → BQLJNLRI.js} +1 -1
- package/dist/cdn/{263UQZGD.js → BRSERGCB.js} +1 -1
- package/dist/cdn/{7BHMRVKK.js → BTKSII6C.js} +1 -1
- package/dist/cdn/{KDTYT2TI.js → BVBHK4ZA.js} +1 -1
- package/dist/cdn/{GWNHAPDJ.js → BVDQQOCR.js} +1 -1
- package/dist/cdn/{M47N46M3.js → BWHORDTQ.js} +1 -1
- package/dist/cdn/{UFBHHNY2.js → BXP5RGPD.js} +1 -1
- package/dist/cdn/{N7QPTZOY.js → C3XXTXZL.js} +1 -1
- package/dist/cdn/{7MIEKJ57.js → C4LCKYWW.js} +1 -1
- package/dist/cdn/{UHY4YPDH.js → CK5JA6LG.js} +1 -1
- package/dist/cdn/{FKGG2CUG.js → CXM6X7CR.js} +1 -1
- package/dist/cdn/{W3LWWKRB.js → CYJZ7T4S.js} +1 -1
- package/dist/cdn/{TPF6CQWI.js → D5AGKEQQ.js} +1 -1
- package/dist/cdn/{KJJVLZO6.js → D66WATT4.js} +1 -1
- package/dist/cdn/{7B2ON35Y.js → DCSOI7OB.js} +1 -1
- package/dist/cdn/{4TUKX6PS.js → DFS7UXXA.js} +1 -1
- package/dist/cdn/{JWCHEYHG.js → DGE4UXLM.js} +1 -1
- package/dist/cdn/{WXNDZFDX.js → DKBC3UMW.js} +1 -1
- package/dist/cdn/{EF5I2PGI.js → DPZYWN5Y.js} +1 -1
- package/dist/cdn/{QJUYGJUN.js → DRER5LNM.js} +1 -1
- package/dist/cdn/{IOORBLHL.js → DSIL7TYR.js} +1 -1
- package/dist/cdn/{QO6WDURE.js → E5HTVW5O.js} +1 -1
- package/dist/cdn/{THUDFQBI.js → EFSE3OHY.js} +1 -1
- package/dist/cdn/{XRPHEZZD.js → EUPC4HDK.js} +1 -1
- package/dist/cdn/{FR3DD5XU.js → FHWOIM57.js} +1 -1
- package/dist/cdn/{YVQ5XK57.js → FJRDNR2D.js} +1 -1
- package/dist/cdn/{MNMMINQH.js → FUDA5H6R.js} +1 -1
- package/dist/cdn/{BZZONX7U.js → FVZJPOWC.js} +1 -1
- package/dist/cdn/{OHVLO7G3.js → FXGGTFFX.js} +1 -1
- package/dist/cdn/{OBHCFXFW.js → FZHWZNBO.js} +1 -1
- package/dist/cdn/G2PAKIMS.js +2 -0
- package/dist/cdn/{XUL2L7MJ.js → G43HMCDY.js} +1 -1
- package/dist/cdn/{4ULHWCEQ.js → G7KSSNBD.js} +1 -1
- package/dist/cdn/{JNZQSIHO.js → GJKLQ4DF.js} +1 -1
- package/dist/cdn/{T2JPACWT.js → GVT6ZVGQ.js} +1 -1
- package/dist/cdn/{UFUUA7WI.js → H3AOF7G6.js} +1 -1
- package/dist/cdn/{7ATMAAIA.js → H3N46TKW.js} +1 -1
- package/dist/cdn/{FQVFZLFR.js → HCH34CVA.js} +1 -1
- package/dist/cdn/{PFRNTJ3W.js → HPFRMRVM.js} +1 -1
- package/dist/cdn/{QMBBO7TG.js → HR3K5XIF.js} +1 -1
- package/dist/cdn/{BYURJH5S.js → HWLBIEGO.js} +1 -1
- package/dist/cdn/{7FSKEJN5.js → I4VCDQAJ.js} +1 -1
- package/dist/cdn/{WCWRRXW6.js → IA6DGMKU.js} +1 -1
- package/dist/cdn/{LFFKXHGN.js → IEEZAVKI.js} +1 -1
- package/dist/cdn/{IMG33Z76.js → IZLJF7QK.js} +1 -1
- package/dist/cdn/{KNC343OA.js → J2S23AFG.js} +1 -1
- package/dist/cdn/{KKN5ZNLH.js → J7O4NTZK.js} +1 -1
- package/dist/cdn/{U6BJ5CHT.js → JDKASAQ4.js} +1 -1
- package/dist/cdn/{UVZRGGFM.js → JJB3SLCR.js} +1 -1
- package/dist/cdn/{PUF3LPVV.js → JK24EYII.js} +1 -1
- package/dist/cdn/{3I3LMAGG.js → JKGEHJS3.js} +1 -1
- package/dist/cdn/{WTQIUFRF.js → JOOHHKWH.js} +1 -1
- package/dist/cdn/{27ESFL5A.js → JTUIUWLI.js} +1 -1
- package/dist/cdn/{NTODRT2V.js → K4BAIY7T.js} +1 -1
- package/dist/cdn/{VOQLL5JZ.js → K4V76SMR.js} +1 -1
- package/dist/cdn/{B5TWZ7RP.js → K5ORNQ7G.js} +1 -1
- package/dist/cdn/{SJXCBJJW.js → K5VWAQQ4.js} +1 -1
- package/dist/cdn/{D4HG2OIN.js → KKBLRTCV.js} +1 -1
- package/dist/cdn/{4QNVMHPG.js → KRIHSRTS.js} +1 -1
- package/dist/cdn/{GYD6SJRD.js → KS5TQB2A.js} +1 -1
- package/dist/cdn/KYZ4TF64.js +2 -0
- package/dist/cdn/{QMVQEHGP.js → LEKQIXDS.js} +1 -1
- package/dist/cdn/{4JVOJINY.js → LGO6UJXQ.js} +1 -1
- package/dist/cdn/{XLFPJW7K.js → LJAHKEOX.js} +1 -1
- package/dist/cdn/{RUPHNC7P.js → LPVFDDKF.js} +1 -1
- package/dist/cdn/{I236E7AW.js → LTGPFC6N.js} +1 -1
- package/dist/cdn/{RDWM76R2.js → LTOXLO3L.js} +1 -1
- package/dist/cdn/{OEOLTZDB.js → M2AZC3NB.js} +1 -1
- package/dist/cdn/{4FN75DFQ.js → MG6N3FKM.js} +1 -1
- package/dist/cdn/{3MDNGD5N.js → MKKJTX2G.js} +1 -1
- package/dist/cdn/{MGL4QBFB.js → MQKMDGBE.js} +1 -1
- package/dist/cdn/{CDGKWT2J.js → MTIYKLWI.js} +1 -1
- package/dist/cdn/{CEZOPIBZ.js → MUBRFGFC.js} +1 -1
- package/dist/cdn/{BMVELPGD.js → MYV6ULJI.js} +1 -1
- package/dist/cdn/{3RKTUDSL.js → MZBCC5YA.js} +1 -1
- package/dist/cdn/{NVYQR4DS.js → N2QRRWRV.js} +1 -1
- package/dist/cdn/{5FOOE24C.js → N73PMH4J.js} +1 -1
- package/dist/cdn/{3AN2HM4J.js → NAQYIBE5.js} +1 -1
- package/dist/cdn/{YPDSLXD2.js → NBYN44GP.js} +1 -1
- package/dist/cdn/{4HUPP5KY.js → NCBGRPO4.js} +1 -1
- package/dist/cdn/{6C542P4V.js → NGB5WVIG.js} +1 -1
- package/dist/cdn/{CVFKHMDF.js → NSOKY65Q.js} +1 -1
- package/dist/cdn/{N7G6DMQS.js → NV7K5IBW.js} +1 -1
- package/dist/cdn/{EUSNS4ZR.js → NWNMBN2U.js} +1 -1
- package/dist/cdn/{WD25DNJL.js → ONQKJHQF.js} +1 -1
- package/dist/cdn/{F3IKTIUT.js → OOZOKLAN.js} +1 -1
- package/dist/cdn/{KG4DME7S.js → OW3LJYAW.js} +1 -1
- package/dist/cdn/{7HGCXEVW.js → P5ZCQPIG.js} +1 -1
- package/dist/cdn/{ELVDMQEB.js → PBNP6WFU.js} +1 -1
- package/dist/cdn/{FC2KR2OJ.js → PL5FJKWH.js} +1 -1
- package/dist/cdn/{SB4Y3KAP.js → PNSES5YC.js} +1 -1
- package/dist/cdn/{D5DGYDNC.js → PYVC7VOE.js} +1 -1
- package/dist/cdn/{QXYIAQJR.js → Q7AWV6T7.js} +1 -1
- package/dist/cdn/{LSTPPCUH.js → Q7TBJT42.js} +1 -1
- package/dist/cdn/QIBBS7Z2.js +2 -0
- package/dist/cdn/{7RUDSAAC.js → QQJFRYNU.js} +1 -1
- package/dist/cdn/{IVBBBGIP.js → QTBE7N34.js} +1 -1
- package/dist/cdn/{3EJEDTKE.js → QWQY366N.js} +1 -1
- package/dist/cdn/{QJHRY67D.js → R2TL7RGF.js} +1 -1
- package/dist/cdn/{56HANFHY.js → R2YJFR4T.js} +1 -1
- package/dist/cdn/{OGRUHEZ4.js → RDARV7HC.js} +1 -1
- package/dist/cdn/{HSF2MYAX.js → RHXVVGD3.js} +1 -1
- package/dist/cdn/{45KA6IYP.js → RQXUHSYJ.js} +1 -1
- package/dist/cdn/{5UBFTTQG.js → RS4YM3X3.js} +1 -1
- package/dist/cdn/{MIRNWIIY.js → RSGPA5UD.js} +1 -1
- package/dist/cdn/{FOZXZGEZ.js → RXAUCQQC.js} +1 -1
- package/dist/cdn/{VRD2Y5E5.js → S22ZRUS7.js} +1 -1
- package/dist/cdn/{CL2BELDC.js → S2PCZUXW.js} +1 -1
- package/dist/cdn/{OMNTRBAL.js → S4PVHHL4.js} +1 -1
- package/dist/cdn/{2JK6IHRU.js → SDCDW6LW.js} +1 -1
- package/dist/cdn/{H2EVMLHD.js → SDJO7TU2.js} +1 -1
- package/dist/cdn/{34IPKNHM.js → SDWFNKIL.js} +1 -1
- package/dist/cdn/{ZS7I5TA6.js → SEEABOHD.js} +1 -1
- package/dist/cdn/{HHEQGXDE.js → SHZFDTMM.js} +1 -1
- package/dist/cdn/{4VH44HXD.js → SJT4UC5B.js} +1 -1
- package/dist/cdn/{IEUVYAB2.js → SMEKIUGI.js} +1 -1
- package/dist/cdn/{XPBKTZ6K.js → SPLMY3ET.js} +1 -1
- package/dist/cdn/{AQ5MEMRU.js → SRKRAAYN.js} +1 -1
- package/dist/cdn/{7F6SCTJC.js → SUUKWB22.js} +1 -1
- package/dist/cdn/{AFFS32W5.js → SVOAX4K6.js} +1 -1
- package/dist/cdn/{CO4UDHQO.js → SVPEZ73H.js} +1 -1
- package/dist/cdn/{5GD232OU.js → SWFTXNVA.js} +1 -1
- package/dist/cdn/{VQUASLS6.js → SWRUFDGD.js} +1 -1
- package/dist/cdn/{QORUWAIX.js → T7ZMS2L5.js} +1 -1
- package/dist/cdn/{53HZB27L.js → TATKNXHR.js} +1 -1
- package/dist/cdn/{VRZ2TCPU.js → THO5LAWY.js} +1 -1
- package/dist/cdn/{PPZFYY4R.js → TI4BX367.js} +1 -1
- package/dist/cdn/{G7AAB5J7.js → TIOCQR7Z.js} +1 -1
- package/dist/cdn/{SLPJAJDI.js → TUTTPXC5.js} +1 -1
- package/dist/cdn/{GTVZDMAZ.js → UFKHTNLP.js} +1 -1
- package/dist/cdn/UP4ICAUO.js +2 -0
- package/dist/cdn/{RYBETUNL.js → UPCPKKRL.js} +1 -1
- package/dist/cdn/{NEA3AO6Y.js → UPRC5DGZ.js} +1 -1
- package/dist/cdn/{ZA7J2T63.js → USGNZSD3.js} +1 -1
- package/dist/cdn/{BV5DVFHY.js → UZPRFNYH.js} +1 -1
- package/dist/cdn/{O2HG2WMJ.js → V522HKV2.js} +1 -1
- package/dist/cdn/{N6Y3DBA3.js → VCRTOOTR.js} +1 -1
- package/dist/cdn/{QBG72UPT.js → VGAUTY3U.js} +1 -1
- package/dist/cdn/{M2EPGLCO.js → VMFPLBAW.js} +1 -1
- package/dist/cdn/{5OJHCEN4.js → VNUQ4CCT.js} +1 -1
- package/dist/cdn/{CG52ER6Q.js → VXAY5W6P.js} +1 -1
- package/dist/cdn/{WW47L2EV.js → W5WXJT7N.js} +1 -1
- package/dist/cdn/{2SVHWSVG.js → WBTZYFQY.js} +1 -1
- package/dist/cdn/{NAW2XY64.js → WFGN3Z2K.js} +1 -1
- package/dist/cdn/{M2MHL5UA.js → WN23CO4W.js} +1 -1
- package/dist/cdn/WNHPFEPA.js +2 -0
- package/dist/cdn/{63AG67W4.js → WQNFBJ7C.js} +1 -1
- package/dist/cdn/{X6USSZBP.js → WVFQTFUT.js} +1 -1
- package/dist/cdn/{ICAEEYON.js → WXRDRJO2.js} +1 -1
- package/dist/cdn/WXSIUEVC.js +2 -0
- package/dist/cdn/{T4TCUOUB.js → WYC7AP3B.js} +1 -1
- package/dist/cdn/{732AA2XJ.js → XBEXETEH.js} +1 -1
- package/dist/cdn/{3S4WSOMS.js → XDNADMUB.js} +1 -1
- package/dist/cdn/{ABWJWVAT.js → XO23SMXO.js} +1 -1
- package/dist/cdn/{EFLJBQJB.js → XOOKXM7J.js} +1 -1
- package/dist/cdn/{VGMTHIUW.js → XWALVOZP.js} +1 -1
- package/dist/cdn/{S54DWYVB.js → YCU2NW3W.js} +1 -1
- package/dist/cdn/{ILE73UJE.js → YE74X5AX.js} +1 -1
- package/dist/cdn/{A4VZEZU3.js → YFM2FNJN.js} +1 -1
- package/dist/cdn/{6XJLNNXF.js → YGR7EQPR.js} +1 -1
- package/dist/cdn/{NFE73D6R.js → YHNRTH56.js} +1 -1
- package/dist/cdn/{OGYCHIZS.js → YMDPLIAN.js} +1 -1
- package/dist/cdn/{DXRIB5HU.js → YQMNH4EU.js} +1 -1
- package/dist/cdn/{GIMPEDA6.js → YT6GA6QR.js} +1 -1
- package/dist/cdn/{KI373EER.js → YTC3XBSZ.js} +1 -1
- package/dist/cdn/{7AJVAY4L.js → YX5QEVKH.js} +1 -1
- package/dist/cdn/{PLZVYFQY.js → YXA3DG4H.js} +1 -1
- package/dist/cdn/{U5BDUCMV.js → Z24LPE5P.js} +1 -1
- package/dist/cdn/{S6IOKQMR.js → ZC2ZAUG3.js} +1 -1
- package/dist/cdn/{6LPVSXTP.js → ZDGUYB7C.js} +1 -1
- package/dist/cdn/{P62M6P6V.js → ZSFJNJIA.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/AnalysisViewModel.js +3 -3
- package/dist/chunks/GeolocationPositioning.js +1 -1
- package/dist/chunks/action-utils.js +1 -1
- package/dist/chunks/async-utils.js +2 -2
- package/dist/chunks/constants.js +3 -3
- package/dist/chunks/feature-utils.js +7 -7
- package/dist/chunks/{building-layer-utils.js → layer-utils2.js} +21 -21
- package/dist/chunks/svgUtils.js +3 -3
- package/dist/chunks/utils2.js +3 -3
- package/dist/components/arcgis-aggregated-features/customElement.js +1 -1
- package/dist/components/arcgis-building-discipline-tree/customElement.js +2 -2
- package/dist/components/arcgis-building-explorer/customElement.js +1 -1
- package/dist/components/arcgis-building-level-picker/customElement.js +1 -1
- package/dist/components/arcgis-feature/customElement.js +1 -1
- package/dist/components/arcgis-feature-content/customElement.js +1 -1
- package/dist/components/arcgis-feature-expression/customElement.js +4 -4
- package/dist/components/arcgis-feature-media/customElement.js +1 -1
- package/dist/components/arcgis-feature-next/customElement.js +1 -1
- package/dist/components/arcgis-legend-relationship-ramp/customElement.js +3 -3
- package/dist/components/arcgis-line-of-sight/customElement.js +5 -5
- package/dist/components/arcgis-link-chart/customElement.js +1 -1
- package/dist/components/arcgis-locate/customElement.js +9 -9
- package/dist/components/arcgis-map/customElement.js +1 -1
- package/dist/components/arcgis-oriented-imagery-viewer-non-panoramic-viewer/customElement.js +8 -7
- package/dist/components/arcgis-oriented-imagery-viewer-panoramic-viewer/customElement.js +1 -1
- package/dist/components/arcgis-scene/customElement.js +1 -1
- package/dist/components/arcgis-slice/customElement.js +7 -7
- package/dist/components/arcgis-time-bar/customElement.js +1 -1
- package/dist/components/arcgis-track/customElement.js +1 -1
- package/dist/components/arcgis-utility-network-validate-network-topology/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +6 -6
- package/dist/cdn/4YZWUM36.js +0 -2
- package/dist/cdn/5GFBHLDY.js +0 -2
- package/dist/cdn/DKIT622U.js +0 -2
- package/dist/cdn/FHDJ7G3W.js +0 -2
- package/dist/cdn/JLZ2PFNC.js +0 -2
- package/dist/cdn/K5WNMCOI.js +0 -2
- package/dist/cdn/LTBXZRS5.js +0 -2
- package/dist/cdn/PGOXXWOQ.js +0 -2
- package/dist/cdn/YUJMRIVW.js +0 -2
- /package/dist/cdn/{ZJZBS5ZY.js → WXLC6FPD.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as he,b as ce,c as me}from"./VDTRRLON.js";import c from"./3WTBTYMS.js";import b from"./ETV3RIV4.js";import a from"./FR3DD5XU.js";import"./VJVKFKSG.js";import{a as se}from"./NDMHZQ2Z.js";import"./5GFBHLDY.js";import"./42UVPIOD.js";import"./QUZTFUWM.js";import"./QLIWDFZI.js";import{L as H,M as U,N as ie,T as oe,a as ee,b as O,o as te}from"./ZJZBS5ZY.js";import"./H6RQVSYM.js";export default $arcgis.t(([K,ue,,ye,{on:be,when:Me,watch:G},{once:Y,on:de},_e,xe,ze,Se,Te,{property:S,subclass:Ce},Ie,Pe,Ae,Le,pe,Z,W,Re,X,{createSphere:Fe},Ne,$e,{b:I,d:ae,e:re},ne,{a:le}])=>{var ke=ee`:host{height:100%;--arcgis-view-color-focus: none}`;function Be(a,e=!0){let t=((e?a:a*180/Math.PI)%360+360)%360;return e?t:t*Math.PI/180}function Ee(a,e=!0){let t=e?a:a*180/Math.PI,o=Math.max(.5,Math.min(179.5,t));return e?o:o*Math.PI/180}function Ge(a,e){return new Promise((t,o)=>{if(a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA){t();return}e(Y(a,"canplay",t)),e(Y(a,"error",o))})}function De(a){return new ue({geometry:a,symbol:new ze({symbolLayers:new _e([new xe])})})}function V({data:a,center:e=Ve(),size:t=Ke,horizonPitch:o=0,horizonYaw:i=0,horizonRoll:s=0}){let r=e.clone();r.z=-t/2;let n=Fe(r,{size:t,densificationFactor:2,vertexSpace:"georeferenced",material:new Z({colorTexture:new W({data:a}),unlit:!0})});if(n.components?.at(0)?.set({trustSourceNormals:!0}),n.vertexAttributes.uv){let l=n.vertexAttributes.uv.length??0;for(let d=0;d<l;d++)n.vertexAttributes.uv[d*2+0]=1-n.vertexAttributes.uv[d*2+0]}return n.rotate(o,s,i,{origin:n.extent.center}),n.centerAt(r),n}var Ve=()=>new X({x:0,y:0,z:0,spatialReference:K.WebMercator}),Ke=1e3,Oe=114;function He(a,e,t){let o=new Map,i=Array.from(a.keys()).sort((h,u)=>h-u)[0],{maxCol:s,minCol:r,maxRow:n,minRow:l}=a.get(i),d=s-r+1,m=n-l+1,c=d*(t-1)+1;return Ue({maximumPyramidLevel:e,blockBoundary:a,baseCols:d,baseRows:m,vertexPerEdge:t,baseVertexPerRow:c},o),o}function Ue(a,e){let{maximumPyramidLevel:t,blockBoundary:o,baseCols:i,baseRows:s,vertexPerEdge:r,baseVertexPerRow:n}=a;for(let l=0;l<=t;l+=1){let{maxCol:d,minCol:m,maxRow:c,minRow:h}=o.get(l),u=d-m+1,p=c-h+1,f=i/u,v=s/p,g=r-1;Ye({minRow:h,minCol:m,numberOfRows:p,numberOfColumns:u,vertexLimit:g,rowStep:v,colStep:f,baseVertexPerRow:n,level:l},e)}}function Ye(a,e){let{minRow:t,minCol:o,numberOfRows:i,numberOfColumns:s,vertexLimit:r,rowStep:n,colStep:l,baseVertexPerRow:d,level:m}=a;for(let c=0;c<i;c+=1)for(let h=0;h<s;h+=1){let u=2*r*r,p=new Uint32Array(u*3),f=0,v=o+(s-1-h),g=t+c;for(let w=0;w<r;w+=1)for(let y=0;y<r;y+=1){let _=c*n*r+w*n,C=h*l*r+y*l,N=Math.round(_*d+C),P=Math.round(N+l),T=Math.round(N+n*d),$=Math.round(T+l);p[f++]=N,p[f++]=T,p[f++]=P,p[f++]=P,p[f++]=T,p[f++]=$}e.set(`${m}/${g}/${v}`,p)}}function Ze(a,e){let t=new Map,{lods:o,origin:i,size:[s,r]}=a,{xmin:n,ymin:l,xmax:d,ymax:m}=e;for(let{resolution:c,level:h}of o){let u=Math.floor((i.y-m)/(r*c)),p=Math.floor((i.y-l)/(r*c))-1,f=Math.floor((n-i.x)/(s*c)),v=Math.ceil((d-i.x)/(s*c))-1,g=p-u+1,w=v-f+1;if(g<=0||w<=0)continue;let y=360/w,_=180/g,C=Math.max(y/s,_/r);Number.isFinite(C)&&t.set(o.length-1-h,{minRow:u,maxRow:p,minCol:f,maxCol:v,resolution:c,pixelAngle:C})}return t}function We(a){return typeof a=="string"?Number.parseInt(a,10):a}function je(a){a.set("premultiplyAlpha",!0);let e=a.getAsRGBA();return new ImageData(e,a.width,a.height)}function qe(a,e,t){return(a*(t-1)+1)*(e*(t-1)+1)}var j=class{constructor(e){this._componentCache=new Map,this._tileAnchorMap=new Map,this._attachedComponentKeys=new Set,this._remappedFaceMap=new Map,this._levels=[],this._blockBoundaryMap=new Map,this.radius=500,this.vertexPerEdge=25,this.imageSize=[0,0],this.layer=e.layer}get _meshResolutionLevel(){let e=this._levels[0],t=Number.POSITIVE_INFINITY;for(let o of this._levels){let i=this._blockBoundaryMap.get(o);i&&i.pixelAngle<t&&(t=i.pixelAngle,e=o)}return e}get blockBoundaryMap(){return this._blockBoundaryMap}get levels(){return this._levels}get baseLevel(){let e=this._levels[0],t=Number.NEGATIVE_INFINITY;for(let o of this._levels){let i=this._blockBoundaryMap.get(o);i&&i.pixelAngle>t&&(t=i.pixelAngle,e=o)}return e}get maxLevel(){return Math.max(...this._levels)}async load(e){if(await this.layer.load(e),this._blockBoundaryMap=Ze(this.layer.tileInfo,this.layer.fullExtent),this._levels=[...this._blockBoundaryMap.keys()].sort((t,o)=>t-o),this._levels.length===0)throw new Error("No valid tile levels found for panoramic mesh generation.");return this.imageSize=[this.layer.fullExtent.width,this.layer.fullExtent.height],this._baseMesh=this._createBaseMesh(this.radius,this.vertexPerEdge),this}get baseMesh(){if(!this._baseMesh)throw new Error("Base mesh is not created yet.");return this._baseMesh}destroy(){this._faceMap?.clear(),this._remappedFaceMap.clear(),this._componentCache.clear(),this._attachedComponentKeys.clear(),this._tileAnchorMap.clear(),this._baseMesh?.destroy()}_createBaseMesh(e,t){if(!this._blockBoundaryMap.has(this._meshResolutionLevel))throw new Error(`No block boundaries found for mesh resolution level ${this._meshResolutionLevel}`);let{maxCol:o,minCol:i,maxRow:s,minRow:r}=this._blockBoundaryMap.get(this._meshResolutionLevel),n=s-r+1,l=o-i+1,d=qe(n,l,t),m=new Float64Array(d*3),c=new Float32Array(d*3),h=new Float32Array(d*2),u=l*(t-1)+1,p=l*(t-1);for(let _=0;_<d;_+=1){let C=Math.floor(_/u),N=_%u,P=1-N/(l*(t-1)),T=C/(n*(t-1)),$=180*(1-T),E=360*(P-.5),A=[Math.sin($*Math.PI/180)*Math.sin(E*Math.PI/180),Math.cos(E*Math.PI/180)*Math.sin($*Math.PI/180),-Math.cos($*Math.PI/180)];m[_*3]=e*A[0],m[_*3+1]=e*A[1],m[_*3+2]=e*A[2],c[_*3]=-A[0],c[_*3+1]=-A[1],c[_*3+2]=-A[2];let k=C*u;N===p&&(m[_*3]=m[k*3],m[_*3+1]=m[k*3+1],m[_*3+2]=m[k*3+2],c[_*3]=c[k*3],c[_*3+1]=c[k*3+1],c[_*3+2]=c[k*3+2]),h[_*2]=P,h[_*2+1]=T}this._faceMap=He(this._blockBoundaryMap,Math.max(...this._levels),t);let{remappedFaceMap:f,splitPosition:v,splitNormals:g,splitUv:w}=this._preSplitTileGeometry(m,c,h);this._remappedFaceMap=f;let y=new pe({faces:new Uint32Array([0,1,2]),name:"__placeholder__"});return y.set({trustSourceNormals:!0}),this._baseMesh=new Pe({components:[y],vertexAttributes:new Re({position:v,normal:g,uv:w}),spatialReference:{wkid:3857}}),this._baseMesh}_preSplitTileGeometry(e,t,o){let i=0;for(let c of this._faceMap.values()){let h=new Set;for(let u=0;u<c.length;u+=1)h.add(c[u]);i+=h.size}let s=new Float64Array(i*3),r=new Float32Array(i*3),n=new Float32Array(i*2),l=new Map,d=1e-8,m=0;for(let[c,h]of this._faceMap){let u=new Map,p=0,f=0,v=0,g=Number.POSITIVE_INFINITY,w=Number.NEGATIVE_INFINITY,y=Number.POSITIVE_INFINITY,_=Number.NEGATIVE_INFINITY;for(let L=0;L<h.length;L+=1){let R=h[L];if(u.has(R))continue;let x=R*2,z=o[x],F=o[x+1];z<g&&(g=z),z>w&&(w=z),F<y&&(y=F),F>_&&(_=F);let B=R*3;p+=e[B],f+=e[B+1],v+=e[B+2],u.set(R,m),m+=1}let C=w-g,N=_-y,P=Math.hypot(p,f,v),T=this.radius*1.01,[$,E]=this.layer.tileInfo?.size??[256,256],A=.5/$,k=.5/E;this._tileAnchorMap.set(c,P>0?[p/P*T,f/P*T,v/P*T]:[0,0,T]);for(let[L,R]of u){let x=L*3,z=R*3;s[z]=e[x],s[z+1]=e[x+1],s[z+2]=e[x+2],r[z]=t[x],r[z+1]=t[x+1],r[z+2]=t[x+2];let F=L*2,B=R*2,fe=o[F],ge=o[F+1],ve=C<d?.5:(fe-g)/C,we=N<d?.5:(ge-y)/N;n[B]=A+ve*(1-2*A),n[B+1]=k+we*(1-2*k)}let D=new Uint32Array(h.length);for(let L=0;L<h.length;L+=1){let R=u.get(h[L]);if(R==null)throw new Error(`Failed to remap face index for tile ${c}`);D[L]=R}l.set(c,D)}return{remappedFaceMap:l,splitPosition:s,splitNormals:r,splitUv:n}}getTileAnchor(e,t,o){let i=this._tileAnchorMap.get(`${e}/${t}/${o}`);if(!i)throw new Error(`No tile anchor found for level ${e}, row ${t}, column ${o}`);return i}loadComponent(e,t,o,i){let s=`${e}/${t}/${o}`;if(this._attachedComponentKeys.has(s))return;let r=this._componentCache.get(s);if(r)r.material=new Z({unlit:!0,colorTexture:new W({data:i})});else{let l=this._remappedFaceMap.get(s);if(!l)throw new Error(`No faces found for level ${e}, row ${t}, column ${o}`);r=new pe({faces:l,name:s,material:new Z({unlit:!0,colorTexture:new W({data:i})})}),r.set({trustSourceNormals:!0}),this._componentCache.set(`${e}/${t}/${o}`,r)}r.name=s,this.baseMesh.addComponent(r);let n=this.baseMesh.components?.find(l=>l.name==="__placeholder__");n&&this.baseMesh.removeComponent(n),this._attachedComponentKeys.add(s),this.baseMesh.vertexAttributesChanged()}getFacesForTile(e,t,o){let i=this._remappedFaceMap.get(`${e}/${t}/${o}`);if(!i)throw new Error(`No faces found for level ${e}, row ${t}, column ${o}`);return i}unloadComponent(e,t,o){let i=`${e}/${t}/${o}`,s=this._componentCache.get(i);s&&this._attachedComponentKeys.has(i)&&(this.baseMesh.removeComponent(s),this._attachedComponentKeys.delete(i),this.baseMesh.vertexAttributesChanged())}},q=class{constructor(e){this._baseLevel=e.baseLevel,this._levels=[...e.levels],this._blockBoundaryMap=e.blockBoundaryMap}plan(e,t,o){let i=this._selectLevel(e);this._lastStableLevel=i;let s=this._createHybridDesiredSet(i,e);this._retainActiveLevelDetails(s,t,i);let r=this._prioritizeDesiredKeys(s,i),n=new Set([...t,...o]),l=r.filter(c=>!n.has(c)),d=r.filter(c=>t.has(c)),m=[...t].filter(c=>!s.has(c));return{stableLevel:i,desiredKeySet:s,toFetch:l,toKeep:d,toDrop:m}}_retainActiveLevelDetails(e,t,o){if(o!==this._baseLevel)for(let i of t){let s=this._parseTileKey(i);s&&s.level===o&&e.add(i)}}_createHybridDesiredSet(e,t){let o=new Set,i=this._blockBoundaryMap.get(this._baseLevel);if(!i)return o;for(let r=i.minRow;r<=i.maxRow;r+=1)for(let n=i.minCol;n<=i.maxCol;n+=1)o.add(`${this._baseLevel}/${r}/${n}`);if(e===this._baseLevel)return o;let s=this._getViewTileKeys(e,t.heading,t.pitch,t.hfov,t.vfov);for(let r of s)o.add(r);return o}_getViewTileKeys(e,t,o,i,s){let r=this._blockBoundaryMap.get(e);if(!r)return[];let{minRow:n,maxRow:l,minCol:d,maxCol:m}=r,c=l-n+1,h=m-d+1,u=Math.max(.1,Math.min(179.9,o))-90,p=Math.max(.01,Math.min(360,i)),f=Math.max(.01,Math.min(180,s)),v=360/h,g=180/c,w=Math.min(12,v*.35),y=Math.min(8,g*.35),_=Math.min(360,p+w*2),C=Math.min(180,f+y*2),N=Math.max(-89.9,Math.min(89.9,u-C/2)),P=Math.max(-89.9,Math.min(89.9,u+C/2)),T=x=>{let z=(90-x)/180,F=Math.floor(z*c);return n+Math.max(0,Math.min(c-1,F))},$=x=>{let z=this._normalizeHeading(x)/360,F=(Math.floor(z*h)%h+h)%h;return d+F},E=this._normalizeHeading(t-_/2),A=this._normalizeHeading(t+_/2),k=Math.min(T(P),T(N)),D=Math.max(T(P),T(N)),L=_>=360?[[d,m]]:E<=A?[[$(E),$(A)]]:[[d,$(A)],[$(E),m]],R=new Set;for(let x=k;x<=D;x+=1)for(let[z,F]of L)for(let B=z;B<=F;B+=1)R.add(`${e}/${x}/${B}`);return[...R]}_normalizeHeading(e){let t=e%360;return t<0?t+360:t}_prioritizeDesiredKeys(e,t){let o=[...e],i=s=>{let r=this._parseTileKey(s);return r?r.level===t?0:r.level===this._baseLevel?2:1:Number.POSITIVE_INFINITY};return o.sort((s,r)=>{let n=i(s)-i(r);if(n!==0)return n;let l=this._parseTileKey(s),d=this._parseTileKey(r);return!l||!d?s.localeCompare(r):l.level!==d.level?l.level-d.level:l.row!==d.row?l.row-d.row:l.col-d.col}),o}_parseTileKey(e){let[t,o,i]=e.split("/"),s=Number(t),r=Number(o),n=Number(i);if(!(!Number.isFinite(s)||!Number.isFinite(r)||!Number.isFinite(n)))return{level:s,row:r,col:n}}_selectLevel(e){let[t,o]=e.viewportSize,i=Math.max(1,t),s=Math.max(1,o),r=Math.max(e.hfov/i,e.vfov/s),n=.25,l=this._levels.map(h=>({level:h,boundary:this._blockBoundaryMap.get(h)})).filter(h=>h.boundary!=null).sort((h,u)=>u.boundary.pixelAngle-h.boundary.pixelAngle);if(l.length===0)return this._baseLevel;let d=new Map;for(let h of l)d.set(h.level,r/h.boundary.pixelAngle);let m=new Map;l.forEach((h,u)=>{m.set(h.level,u)});let c=l[l.length-1].level;for(let h of l)if((d.get(h.level)??0)>=n){c=h.level;break}if(this._lastStableLevel!=null&&m.has(this._lastStableLevel)){let h=m.get(this._lastStableLevel),u=m.get(c);if(u>h&&(d.get(this._lastStableLevel)??0)>=.2)return this._lastStableLevel;if(u<h)return this._lastStableLevel}return c}},J=class{constructor(e){this._layer=e,this._inflightControllers=new Map,this._inflightSet=new Set,this._loadedSet=new Set,this.fetchTileImageData=async(t,o,i,s)=>{let r=We(t),n=s?{signal:s}:void 0,l=this._meshBuilder.blockBoundaryMap.get(r);if(!l)throw new Error(`No tile boundary found for level ${t}`);let{maxCol:d,maxRow:m,minCol:c,minRow:h}=l,u=d-c+1,p=m-h+1,f=i-c,v=o-h,g=f*this._meshBuilder.imageSize[0]/u,w=v*this._meshBuilder.imageSize[1]/p,y=Math.min((f+1)*this._meshBuilder.imageSize[0]/u,this._meshBuilder.imageSize[0]),_=Math.min((v+1)*this._meshBuilder.imageSize[1]/p,this._meshBuilder.imageSize[1]),C=await this._layer.fetchPixels(new Ae({xmin:g-.5,ymin:.5-_,xmax:y-.5,ymax:.5-w,spatialReference:this._layer.fullExtent.spatialReference}),y-g,_-w,n);return je(C.pixelBlock)},this.loadComponent=(t,o,i,s)=>this._meshBuilder.loadComponent(t,o,i,s),this.unloadComponent=(t,o,i)=>this._meshBuilder.unloadComponent(t,o,i),this._meshBuilder=new j({layer:e})}get imageSize(){return this._meshBuilder.imageSize}get baseMesh(){return this._meshBuilder.baseMesh}get currentLevel(){return this._currentLevel}getTileAnchor(e,t,o){return this._meshBuilder.getTileAnchor(e,t,o)}async load(){return await this._meshBuilder.load(),this._tilePlanner=new q({blockBoundaryMap:this._meshBuilder.blockBoundaryMap,baseLevel:this._meshBuilder.baseLevel,levels:[...this._meshBuilder.levels]}),this}destroy(){for(let e of this._inflightControllers.values())e.abort();this._inflightControllers.clear(),this._inflightSet.clear(),this._loadedSet.clear(),this._tilePlanner=void 0,this._meshBuilder.destroy()}planTiles(e){if(!this._tilePlanner)throw new Error("PanoramicTileSource is not loaded yet.");let t=this._tilePlanner.plan(e,this._loadedSet,this._inflightSet);return this._currentLevel=t.stableLevel,t}markTileInflight(e,t){this._inflightSet.add(e),this._inflightControllers.set(e,t)}markTileLoaded(e){this._inflightSet.delete(e),this._inflightControllers.delete(e),this._loadedSet.add(e)}markTileInflightResolved(e){this._inflightSet.delete(e),this._inflightControllers.delete(e)}markTileDropped(e){this._loadedSet.delete(e)}cancelStaleInflight(e){for(let t of this._inflightSet)e.has(t)||(this._inflightControllers.get(t)?.abort(),this._inflightControllers.delete(t),this._inflightSet.delete(t))}},Je=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,M=(a,e,t,o)=>{for(var i=o>1?void 0:o?Qe(e,t):e,s=a.length-1,r;s>=0;s--)(r=a[s])&&(i=(o?r(e,t,i):r(i))||i);return o&&i&&Je(e,t,i),i},Xe=0,et=0,tt=0,it=new Set(["JPG","JPEG","TIFF","TIF","MRF"]),ot=new Set(["MRF","TIFF","TIF"]),b=class extends Te{constructor(a){super(a),this._size=[0,0],this.autoLoad=!1,this.type="image",this.uiStrings={},this._resolveMedia=async e=>{let t=Promise.withResolvers(),o=e?.signal?Y(e?.signal,"abort",t.resolve):null,i=this.type==="video"?document.createElement("video"):document.createElement("img");this.type==="video"&&(i.setAttribute("playsinline","true"),i.setAttribute("muted","true"),i.setAttribute("autoplay","true")),i.crossOrigin="anonymous",i.src=this.url;let s=null,r=this.type==="video"?Ge(i,m=>this.addHandles(m)):await new Promise((m,c)=>{s=[de(i,"error",h=>{c(h)}),de(i,"load",m)]}).finally(()=>{s?.forEach(m=>m.remove()),s=null}),n=Promise.race([r,t.promise]);try{await n}finally{o?.remove()}I(e);let l=i,d=await V({data:i,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return I(e),{media:l,mesh:d}}}static isPanoramicMedia(a){return!!a&&typeof a=="object"&&"declaredClass"in a&&typeof a.declaredClass=="string"&&a.declaredClass==="components.oriented-imagery-viewer-panoramic-viewer.support.PanoramicMedia"}destroy(){this._cache=void 0}get horizonPitch(){let{matrix:a}=this;return a?180*Math.asin(-a[6])/Math.PI:Xe}get horizonRoll(){let{matrix:a}=this;return a?180*Math.atan(a[7]/a[8])/Math.PI:tt}get horizonYaw(){let{matrix:a,cameraHeading:e}=this;return a?180*Math.atan2(a[3],a[0])/Math.PI:e?-e:et}get panoramicTileSource(){return this._panoramicTileSource}get element(){return this._cache}get size(){return this._size}async load(a){if(this.type==="video")return await this.loadVideoMesh(a);let e=this.extension;if(e||(e=le(this.url)),!e||!it.has(e))throw new Ie("unsupported-format",this.uiStrings["unsupported-format"]??"Unsupported image format: {extension}",{datasetFormat:e??"UNKNOWN FORMAT"});return ot.has(e)?await this.loadOptimizedImageMesh(a):await this.loadImageMesh(a)}async loadOptimizedImageMesh(a){this._panoramicTileSource?.destroy();let e=new Le({url:this.url,datasetFormat:this.extension,skipMapInfo:!0,skipExtensions:["aux.xml","jgw"]});this._panoramicTileSource=new J(e);let{imageSize:t,baseMesh:o}=await this._panoramicTileSource.load();return I(a),{mesh:o,size:t}}async loadVideoMesh(a){if(I(a),this._cache){let o=await V({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(a);return I(a),{mesh:o,size:this._size}}let e=await this._resolveMedia(a);I(a),this._cache=e.media,this._size=[this._cache.videoWidth,this._cache.videoHeight];let t=await V({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(a);return I(a),{mesh:t,size:this._size}}async loadImageMesh(a){if(this._cache){let o=await V({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(a);return I(a),{mesh:o,size:this._size}}let e=await this._resolveMedia(a);I(a),this._cache=e.media;let t=e.mesh;return this._size=[e.media.width,e.media.height],{mesh:t,size:this._size}}};M([S()],b.prototype,"_size",2);M([S()],b.prototype,"_cache",2);M([S()],b.prototype,"autoLoad",2);M([S()],b.prototype,"cameraHeading",2);M([S()],b.prototype,"extension",2);M([S()],b.prototype,"horizonPitch",1);M([S()],b.prototype,"horizonRoll",1);M([S()],b.prototype,"horizonYaw",1);M([S()],b.prototype,"id",2);M([S()],b.prototype,"_panoramicTileSource",2);M([S()],b.prototype,"panoramicTileSource",1);M([S()],b.prototype,"element",1);M([S()],b.prototype,"matrix",2);M([S()],b.prototype,"size",1);M([S()],b.prototype,"type",2);M([S()],b.prototype,"uiStrings",2);M([S()],b.prototype,"url",2);b=M([Ce("components.oriented-imagery-viewer-panoramic-viewer.support.PanoramicMedia")],b);var at=()=>new ye({atmosphereEnabled:!1,starsEnabled:!1,lighting:{type:"virtual"}}),rt=()=>new Se({opacity:0,navigationConstraint:null}),st=()=>new X({x:0,y:0,z:0,spatialReference:K.WebMercator}),Q=class extends ie{constructor(){super(...arguments),this.#e=at(),this._graphicsController=new ne(this),this._ground=rt(),this._messages=se(),this._startPosition=null,this.tileCache=new Set,this._currentGraphicsStore=new _e,this._tileLabelGraphics=new Map,this._handleMouseWheel=e=>{e.detail.stopPropagation(),e.detail.deltaY<0?this._internalZoom.value?.zoomIn():this._internalZoom.value?.zoomOut()},this._handleDrag=e=>{e.stopPropagation();let{x:t,y:o,action:i}=e,s=null,r=null;switch(i){case"start":this._startPosition={x:t,y:o};break;case"update":if(!this._startPosition)return;let n=l=>{if(!this._startPosition||!this.camera)return;if(r||(r=l),l-r<16){s=requestAnimationFrame(n);return}let d=t-this._startPosition.x,m=o-this._startPosition.y,c=Be(this.camera?.heading-d*.1),h=Ee(this.camera.tilt+m*.1);this.yaw=c,this.pitch=h,this._startPosition={x:t,y:o},r=null};s=requestAnimationFrame(n);break;case"end":s!==null&&cancelAnimationFrame(s),this._startPosition=null;break}},this._internalMap=H(),this._internalZoom=H(),this._loading=!1,this.yaw=0,this.pitch=90,this.hideLoader=!1,this.hideTitle=!1,this.hideZoomControls=!1,this.hideVideoControls=!1,this.messageOverrides=this._messages._overrides}static{this.properties={_media:16,_internalMap:16,_internalZoom:16,_loading:16,_base:16,yaw:9,pitch:9,hideLoader:5,hideTitle:7,hideZoomControls:5,hideVideoControls:5,imageSize:32,media:0,messageOverrides:0,hfov:32,base:32}}static{this.styles=[ke]}#e;get view(){return this._internalMap?.value?.view}get camera(){if(!this.view?.destroyed)return this.view?.camera}set camera(e){!e||!this.view||this.view.destroyed||(e.position=st(),this.view.camera=e.clone())}get map(){return this._internalMap.value?.view?.map}get _fov(){return this.camera?.fov}set _fov(e){typeof e!="number"||!this._internalZoom.value||this._internalZoom.value?.zoomFOV(e)}get imageSize(){return this._media?.size}get media(){return this._media}set media(e){if(!e){this._mediaAbortController?.abort(),this._media=void 0,this._clearImage();return}this._media=b.isPanoramicMedia(e)?e:new b(e)}get hfov(){return this._internalZoom.value?.hfov}get base(){return this._base?.geometry}addGraphic(e){this._graphicsController.addGraphic(e)}addGraphics(e){this._graphicsController.addGraphics(e)}clearGraphics(){this._graphicsController.clearGraphics()}async mediaOnLoad(){return this._mediaPromise&&await this._mediaPromise,this._media}removeGraphic(e){this._graphicsController.removeGraphic(e)}removeGraphics(e){this._graphicsController.removeGraphics(e)}zoomIn(){this._internalZoom.value?.zoomIn()}zoomOut(){this._internalZoom.value?.zoomOut()}loaded(){this.manager.onLifecycle(()=>[be(()=>this.view,"drag",this._handleDrag),Me(()=>this.camera!=null,()=>{this.camera&&(this.camera.heading=this.yaw,this.camera.tilt=this.pitch,this._reloadCamera())}),G(()=>this.yaw,()=>{this.camera&&(this.camera.heading=this.yaw,this._reloadCamera())},{sync:!0,initial:!0}),G(()=>this.pitch,()=>{this.camera&&(this.camera.tilt=this.pitch,this._reloadCamera())},{sync:!0,initial:!0}),G(()=>this._fov,()=>{this._reloadCamera()},{sync:!0,initial:!0}),G(()=>this._media,e=>{this._mediaAbortController?.abort(),e&&(this._mediaAbortController=new AbortController,this._mediaPromise=this._loadMediaInternal(e,this._mediaAbortController))},{initial:!0,sync:!0}),G(()=>{if(!this.view?.ready||!this.base)return;let e=this._media?.panoramicTileSource;if(!e)return;let{camera:{heading:t,tilt:o,fov:i},width:s,height:r}=this.view,n=s/r;return{panoramicTileSource:e,heading:t,pitch:o,hfov:ce(i,n),vfov:me(i,n)}},e=>{e&&(this._tileUpdateDebounceHandle!=null&&clearTimeout(this._tileUpdateDebounceHandle),this._tileUpdateDebounceHandle=window.setTimeout(()=>{this._tileUpdateTask?.abort(),this._tileUpdateTask=re(async t=>{await this._updateTilesForCurrentView(e,t)}),this._tileUpdateDebounceHandle=void 0},150))},{initial:!0,sync:!0})])}_reloadCamera(){this.camera=this.camera?.clone()}_clearImage(){this._tileUpdateDebounceHandle!=null&&(clearTimeout(this._tileUpdateDebounceHandle),this._tileUpdateDebounceHandle=void 0),this._tileUpdateTask?.abort(),this._tileUpdateTask=void 0,this.tileCache.clear();for(let e of this._tileLabelGraphics.values())this.removeGraphic(e);this._tileLabelGraphics.clear(),this.clearGraphics(),this._base=void 0,this._currentGraphicsStore.removeAll()}_parseTileKey(e){let[t,o,i]=e.split("/").map(Number);return{level:t,row:o,col:i}}_createTileLabelGraphic(e,t){let{level:o,row:i,col:s}=this._parseTileKey(t),[r,n,l]=e.getTileAnchor(o,i,s);return new ue({attributes:{tileKey:t},geometry:new X({x:r,y:n,z:l,spatialReference:K.WebMercator}),symbol:new $e({color:[255,255,255,.95],font:new Ne({family:"Avenir Next",size:8,weight:"bold"}),haloColor:[0,0,0,.9],haloSize:1,horizontalAlignment:"center",text:t,verticalAlignment:"middle"})})}_attachTileLabel(e,t){if(this._tileLabelGraphics.has(t))return;let o=this._createTileLabelGraphic(e,t);this._tileLabelGraphics.set(t,o),this._currentGraphicsStore.add(o),this.addGraphic(o)}_detachTileLabel(e){let t=this._tileLabelGraphics.get(e);t&&(this.removeGraphic(t),this._currentGraphicsStore.remove(t),this._tileLabelGraphics.delete(e))}async _updateTilesForCurrentView(e,t){let{base:o}=this;if(!o)return;let{panoramicTileSource:i,heading:s,pitch:r,hfov:n,vfov:l}=e,d=[Math.max(1,this.view?.width??1),Math.max(1,this.view?.height??1)],m=i.planTiles({heading:s,pitch:r,hfov:n,vfov:l,imageSize:i.imageSize,viewportSize:d});if(I(t),i.cancelStaleInflight(m.desiredKeySet),m.toDrop.length>0){let u=new Set(m.toDrop);for(let p of u){let{level:f,row:v,col:g}=this._parseTileKey(p);i.unloadComponent(f,v,g),i.markTileDropped(p),this._detachTileLabel(p),this.tileCache.delete(p)}}let c=async u=>{if(u>=m.toFetch.length)return;let p=m.toFetch[u];if(I(t),!this.tileCache.has(p)){let{level:f,row:v,col:g}=this._parseTileKey(p),w=new AbortController,y=()=>{w.abort()};t.addEventListener("abort",y,{once:!0}),i.markTileInflight(p,w);try{let _=await i.fetchTileImageData(f,v,g,w.signal);I(t),m.desiredKeySet.has(p)&&!this.tileCache.has(p)&&(i.loadComponent(f,v,g,_),i.markTileLoaded(p),this._attachTileLabel(i,p),this.tileCache.add(p))}catch(_){ae(_)||te("error",this,"Failed loading panoramic tile component",{detail:{key:p,error:_}})}finally{t.removeEventListener("abort",y),i.markTileInflightResolved(p)}}await c(u+1)};await c(0);let h=i.planTiles({heading:s,pitch:r,hfov:n,vfov:l,imageSize:i.imageSize,viewportSize:d});if(I(t),h.toDrop.length>0){let u=new Set(h.toDrop);for(let p of u){let{level:f,row:v,col:g}=this._parseTileKey(p);i.unloadComponent(f,v,g),i.markTileDropped(p),this._detachTileLabel(p),this.tileCache.delete(p)}}}async _loadMediaInternal(e,t){if(this._loading=!0,this._clearImage(),!e)throw new Error("No media provided");let{mesh:o}=await e.load(t).finally(()=>{this._loading=!1});I(t),this._fov=he(Oe,this.el.clientWidth/this.el.clientHeight),this._base=De(o),this.addGraphic(this._base)}render(){return O`<calcite-panel .loading=${this.hideLoader?void 0:this._loading} .heading=${this.hideTitle?void 0:this._messages.title}><arcgis-scene .environment=${this.#e} hide-attribution .spatialReference=${K.WebMercator} viewing-mode=local .ground=${this._ground} @arcgisViewMouseWheel=${this._handleMouseWheel} ${U(this._internalMap)}><arcgis-oriented-imagery-viewer-panoramic-viewer-zoom .hidden=${this.hideZoomControls} slot=top-left ${U(this._internalZoom)}></arcgis-oriented-imagery-viewer-panoramic-viewer-zoom></arcgis-scene>${this.hideVideoControls||this.media?.type!=="video"?null:O`<arcgis-oriented-imagery-viewer-video-controls .videoRef=${this._media?.element}></arcgis-oriented-imagery-viewer-video-controls>`}</calcite-panel>`}};oe("arcgis-oriented-imagery-viewer-panoramic-viewer",Q);return Q},"geometry/SpatialReference","Graphic","Camera","views/3d/environment/Environment","core/reactiveUtils","applications/Components/baUtils","core/Collection","symbols/FillSymbol3DLayer","symbols/MeshSymbol3D","Ground","core/Accessor","core/accessorSupport/decorators","core/Error","geometry/Mesh","geometry/Extent","layers/ImageryTileLayer","geometry/support/MeshComponent","geometry/support/MeshMaterialMetallicRoughness","geometry/support/MeshTexture","geometry/support/MeshVertexAttributes","geometry/Point","geometry/support/meshUtils","symbols/Font","symbols/TextSymbol",a,b,c)
|
|
2
|
+
import{a as he,b as ce,c as me}from"./VDTRRLON.js";import c from"./3WTBTYMS.js";import b from"./3NWZC6DC.js";import a from"./FHWOIM57.js";import"./VJVKFKSG.js";import{a as se}from"./2BVXNQ3U.js";import"./3AQ6NC3C.js";import"./A4X5YDA6.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{L as H,M as U,N as ie,T as oe,a as ee,b as O,o as te}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([K,ue,,ye,{on:be,when:Me,watch:G},{once:Y,on:de},_e,xe,ze,Se,Te,{property:S,subclass:Ce},Ie,Pe,Ae,Le,pe,Z,W,Re,X,{createSphere:Fe},Ne,$e,{b:I,d:ae,e:re},ne,{a:le}])=>{var ke=ee`:host{height:100%;--arcgis-view-color-focus: none}`;function Be(a,e=!0){let t=((e?a:a*180/Math.PI)%360+360)%360;return e?t:t*Math.PI/180}function Ee(a,e=!0){let t=e?a:a*180/Math.PI,o=Math.max(.5,Math.min(179.5,t));return e?o:o*Math.PI/180}function Ge(a,e){return new Promise((t,o)=>{if(a.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA){t();return}e(Y(a,"canplay",t)),e(Y(a,"error",o))})}function De(a){return new ue({geometry:a,symbol:new ze({symbolLayers:new _e([new xe])})})}function V({data:a,center:e=Ve(),size:t=Ke,horizonPitch:o=0,horizonYaw:i=0,horizonRoll:s=0}){let r=e.clone();r.z=-t/2;let n=Fe(r,{size:t,densificationFactor:2,vertexSpace:"georeferenced",material:new Z({colorTexture:new W({data:a}),unlit:!0})});if(n.components?.at(0)?.set({trustSourceNormals:!0}),n.vertexAttributes.uv){let l=n.vertexAttributes.uv.length??0;for(let d=0;d<l;d++)n.vertexAttributes.uv[d*2+0]=1-n.vertexAttributes.uv[d*2+0]}return n.rotate(o,s,i,{origin:n.extent.center}),n.centerAt(r),n}var Ve=()=>new X({x:0,y:0,z:0,spatialReference:K.WebMercator}),Ke=1e3,Oe=114;function He(a,e,t){let o=new Map,i=Array.from(a.keys()).sort((h,u)=>h-u)[0],{maxCol:s,minCol:r,maxRow:n,minRow:l}=a.get(i),d=s-r+1,m=n-l+1,c=d*(t-1)+1;return Ue({maximumPyramidLevel:e,blockBoundary:a,baseCols:d,baseRows:m,vertexPerEdge:t,baseVertexPerRow:c},o),o}function Ue(a,e){let{maximumPyramidLevel:t,blockBoundary:o,baseCols:i,baseRows:s,vertexPerEdge:r,baseVertexPerRow:n}=a;for(let l=0;l<=t;l+=1){let{maxCol:d,minCol:m,maxRow:c,minRow:h}=o.get(l),u=d-m+1,p=c-h+1,f=i/u,v=s/p,g=r-1;Ye({minRow:h,minCol:m,numberOfRows:p,numberOfColumns:u,vertexLimit:g,rowStep:v,colStep:f,baseVertexPerRow:n,level:l},e)}}function Ye(a,e){let{minRow:t,minCol:o,numberOfRows:i,numberOfColumns:s,vertexLimit:r,rowStep:n,colStep:l,baseVertexPerRow:d,level:m}=a;for(let c=0;c<i;c+=1)for(let h=0;h<s;h+=1){let u=2*r*r,p=new Uint32Array(u*3),f=0,v=o+(s-1-h),g=t+c;for(let w=0;w<r;w+=1)for(let y=0;y<r;y+=1){let _=c*n*r+w*n,C=h*l*r+y*l,N=Math.round(_*d+C),P=Math.round(N+l),T=Math.round(N+n*d),$=Math.round(T+l);p[f++]=N,p[f++]=T,p[f++]=P,p[f++]=P,p[f++]=T,p[f++]=$}e.set(`${m}/${g}/${v}`,p)}}function Ze(a,e){let t=new Map,{lods:o,origin:i,size:[s,r]}=a,{xmin:n,ymin:l,xmax:d,ymax:m}=e;for(let{resolution:c,level:h}of o){let u=Math.floor((i.y-m)/(r*c)),p=Math.floor((i.y-l)/(r*c))-1,f=Math.floor((n-i.x)/(s*c)),v=Math.ceil((d-i.x)/(s*c))-1,g=p-u+1,w=v-f+1;if(g<=0||w<=0)continue;let y=360/w,_=180/g,C=Math.max(y/s,_/r);Number.isFinite(C)&&t.set(o.length-1-h,{minRow:u,maxRow:p,minCol:f,maxCol:v,resolution:c,pixelAngle:C})}return t}function We(a){return typeof a=="string"?Number.parseInt(a,10):a}function je(a){a.set("premultiplyAlpha",!0);let e=a.getAsRGBA();return new ImageData(e,a.width,a.height)}function qe(a,e,t){return(a*(t-1)+1)*(e*(t-1)+1)}var j=class{constructor(e){this._componentCache=new Map,this._tileAnchorMap=new Map,this._attachedComponentKeys=new Set,this._remappedFaceMap=new Map,this._levels=[],this._blockBoundaryMap=new Map,this.radius=500,this.vertexPerEdge=25,this.imageSize=[0,0],this.layer=e.layer}get _meshResolutionLevel(){let e=this._levels[0],t=Number.POSITIVE_INFINITY;for(let o of this._levels){let i=this._blockBoundaryMap.get(o);i&&i.pixelAngle<t&&(t=i.pixelAngle,e=o)}return e}get blockBoundaryMap(){return this._blockBoundaryMap}get levels(){return this._levels}get baseLevel(){let e=this._levels[0],t=Number.NEGATIVE_INFINITY;for(let o of this._levels){let i=this._blockBoundaryMap.get(o);i&&i.pixelAngle>t&&(t=i.pixelAngle,e=o)}return e}get maxLevel(){return Math.max(...this._levels)}async load(e){if(await this.layer.load(e),this._blockBoundaryMap=Ze(this.layer.tileInfo,this.layer.fullExtent),this._levels=[...this._blockBoundaryMap.keys()].sort((t,o)=>t-o),this._levels.length===0)throw new Error("No valid tile levels found for panoramic mesh generation.");return this.imageSize=[this.layer.fullExtent.width,this.layer.fullExtent.height],this._baseMesh=this._createBaseMesh(this.radius,this.vertexPerEdge),this}get baseMesh(){if(!this._baseMesh)throw new Error("Base mesh is not created yet.");return this._baseMesh}destroy(){this._faceMap?.clear(),this._remappedFaceMap.clear(),this._componentCache.clear(),this._attachedComponentKeys.clear(),this._tileAnchorMap.clear(),this._baseMesh?.destroy()}_createBaseMesh(e,t){if(!this._blockBoundaryMap.has(this._meshResolutionLevel))throw new Error(`No block boundaries found for mesh resolution level ${this._meshResolutionLevel}`);let{maxCol:o,minCol:i,maxRow:s,minRow:r}=this._blockBoundaryMap.get(this._meshResolutionLevel),n=s-r+1,l=o-i+1,d=qe(n,l,t),m=new Float64Array(d*3),c=new Float32Array(d*3),h=new Float32Array(d*2),u=l*(t-1)+1,p=l*(t-1);for(let _=0;_<d;_+=1){let C=Math.floor(_/u),N=_%u,P=1-N/(l*(t-1)),T=C/(n*(t-1)),$=180*(1-T),E=360*(P-.5),A=[Math.sin($*Math.PI/180)*Math.sin(E*Math.PI/180),Math.cos(E*Math.PI/180)*Math.sin($*Math.PI/180),-Math.cos($*Math.PI/180)];m[_*3]=e*A[0],m[_*3+1]=e*A[1],m[_*3+2]=e*A[2],c[_*3]=-A[0],c[_*3+1]=-A[1],c[_*3+2]=-A[2];let k=C*u;N===p&&(m[_*3]=m[k*3],m[_*3+1]=m[k*3+1],m[_*3+2]=m[k*3+2],c[_*3]=c[k*3],c[_*3+1]=c[k*3+1],c[_*3+2]=c[k*3+2]),h[_*2]=P,h[_*2+1]=T}this._faceMap=He(this._blockBoundaryMap,Math.max(...this._levels),t);let{remappedFaceMap:f,splitPosition:v,splitNormals:g,splitUv:w}=this._preSplitTileGeometry(m,c,h);this._remappedFaceMap=f;let y=new pe({faces:new Uint32Array([0,1,2]),name:"__placeholder__"});return y.set({trustSourceNormals:!0}),this._baseMesh=new Pe({components:[y],vertexAttributes:new Re({position:v,normal:g,uv:w}),spatialReference:{wkid:3857}}),this._baseMesh}_preSplitTileGeometry(e,t,o){let i=0;for(let c of this._faceMap.values()){let h=new Set;for(let u=0;u<c.length;u+=1)h.add(c[u]);i+=h.size}let s=new Float64Array(i*3),r=new Float32Array(i*3),n=new Float32Array(i*2),l=new Map,d=1e-8,m=0;for(let[c,h]of this._faceMap){let u=new Map,p=0,f=0,v=0,g=Number.POSITIVE_INFINITY,w=Number.NEGATIVE_INFINITY,y=Number.POSITIVE_INFINITY,_=Number.NEGATIVE_INFINITY;for(let L=0;L<h.length;L+=1){let R=h[L];if(u.has(R))continue;let x=R*2,z=o[x],F=o[x+1];z<g&&(g=z),z>w&&(w=z),F<y&&(y=F),F>_&&(_=F);let B=R*3;p+=e[B],f+=e[B+1],v+=e[B+2],u.set(R,m),m+=1}let C=w-g,N=_-y,P=Math.hypot(p,f,v),T=this.radius*1.01,[$,E]=this.layer.tileInfo?.size??[256,256],A=.5/$,k=.5/E;this._tileAnchorMap.set(c,P>0?[p/P*T,f/P*T,v/P*T]:[0,0,T]);for(let[L,R]of u){let x=L*3,z=R*3;s[z]=e[x],s[z+1]=e[x+1],s[z+2]=e[x+2],r[z]=t[x],r[z+1]=t[x+1],r[z+2]=t[x+2];let F=L*2,B=R*2,fe=o[F],ge=o[F+1],ve=C<d?.5:(fe-g)/C,we=N<d?.5:(ge-y)/N;n[B]=A+ve*(1-2*A),n[B+1]=k+we*(1-2*k)}let D=new Uint32Array(h.length);for(let L=0;L<h.length;L+=1){let R=u.get(h[L]);if(R==null)throw new Error(`Failed to remap face index for tile ${c}`);D[L]=R}l.set(c,D)}return{remappedFaceMap:l,splitPosition:s,splitNormals:r,splitUv:n}}getTileAnchor(e,t,o){let i=this._tileAnchorMap.get(`${e}/${t}/${o}`);if(!i)throw new Error(`No tile anchor found for level ${e}, row ${t}, column ${o}`);return i}loadComponent(e,t,o,i){let s=`${e}/${t}/${o}`;if(this._attachedComponentKeys.has(s))return;let r=this._componentCache.get(s);if(r)r.material=new Z({unlit:!0,colorTexture:new W({data:i})});else{let l=this._remappedFaceMap.get(s);if(!l)throw new Error(`No faces found for level ${e}, row ${t}, column ${o}`);r=new pe({faces:l,name:s,material:new Z({unlit:!0,colorTexture:new W({data:i})})}),r.set({trustSourceNormals:!0}),this._componentCache.set(`${e}/${t}/${o}`,r)}r.name=s,this.baseMesh.addComponent(r);let n=this.baseMesh.components?.find(l=>l.name==="__placeholder__");n&&this.baseMesh.removeComponent(n),this._attachedComponentKeys.add(s),this.baseMesh.vertexAttributesChanged()}getFacesForTile(e,t,o){let i=this._remappedFaceMap.get(`${e}/${t}/${o}`);if(!i)throw new Error(`No faces found for level ${e}, row ${t}, column ${o}`);return i}unloadComponent(e,t,o){let i=`${e}/${t}/${o}`,s=this._componentCache.get(i);s&&this._attachedComponentKeys.has(i)&&(this.baseMesh.removeComponent(s),this._attachedComponentKeys.delete(i),this.baseMesh.vertexAttributesChanged())}},q=class{constructor(e){this._baseLevel=e.baseLevel,this._levels=[...e.levels],this._blockBoundaryMap=e.blockBoundaryMap}plan(e,t,o){let i=this._selectLevel(e);this._lastStableLevel=i;let s=this._createHybridDesiredSet(i,e);this._retainActiveLevelDetails(s,t,i);let r=this._prioritizeDesiredKeys(s,i),n=new Set([...t,...o]),l=r.filter(c=>!n.has(c)),d=r.filter(c=>t.has(c)),m=[...t].filter(c=>!s.has(c));return{stableLevel:i,desiredKeySet:s,toFetch:l,toKeep:d,toDrop:m}}_retainActiveLevelDetails(e,t,o){if(o!==this._baseLevel)for(let i of t){let s=this._parseTileKey(i);s&&s.level===o&&e.add(i)}}_createHybridDesiredSet(e,t){let o=new Set,i=this._blockBoundaryMap.get(this._baseLevel);if(!i)return o;for(let r=i.minRow;r<=i.maxRow;r+=1)for(let n=i.minCol;n<=i.maxCol;n+=1)o.add(`${this._baseLevel}/${r}/${n}`);if(e===this._baseLevel)return o;let s=this._getViewTileKeys(e,t.heading,t.pitch,t.hfov,t.vfov);for(let r of s)o.add(r);return o}_getViewTileKeys(e,t,o,i,s){let r=this._blockBoundaryMap.get(e);if(!r)return[];let{minRow:n,maxRow:l,minCol:d,maxCol:m}=r,c=l-n+1,h=m-d+1,u=Math.max(.1,Math.min(179.9,o))-90,p=Math.max(.01,Math.min(360,i)),f=Math.max(.01,Math.min(180,s)),v=360/h,g=180/c,w=Math.min(12,v*.35),y=Math.min(8,g*.35),_=Math.min(360,p+w*2),C=Math.min(180,f+y*2),N=Math.max(-89.9,Math.min(89.9,u-C/2)),P=Math.max(-89.9,Math.min(89.9,u+C/2)),T=x=>{let z=(90-x)/180,F=Math.floor(z*c);return n+Math.max(0,Math.min(c-1,F))},$=x=>{let z=this._normalizeHeading(x)/360,F=(Math.floor(z*h)%h+h)%h;return d+F},E=this._normalizeHeading(t-_/2),A=this._normalizeHeading(t+_/2),k=Math.min(T(P),T(N)),D=Math.max(T(P),T(N)),L=_>=360?[[d,m]]:E<=A?[[$(E),$(A)]]:[[d,$(A)],[$(E),m]],R=new Set;for(let x=k;x<=D;x+=1)for(let[z,F]of L)for(let B=z;B<=F;B+=1)R.add(`${e}/${x}/${B}`);return[...R]}_normalizeHeading(e){let t=e%360;return t<0?t+360:t}_prioritizeDesiredKeys(e,t){let o=[...e],i=s=>{let r=this._parseTileKey(s);return r?r.level===t?0:r.level===this._baseLevel?2:1:Number.POSITIVE_INFINITY};return o.sort((s,r)=>{let n=i(s)-i(r);if(n!==0)return n;let l=this._parseTileKey(s),d=this._parseTileKey(r);return!l||!d?s.localeCompare(r):l.level!==d.level?l.level-d.level:l.row!==d.row?l.row-d.row:l.col-d.col}),o}_parseTileKey(e){let[t,o,i]=e.split("/"),s=Number(t),r=Number(o),n=Number(i);if(!(!Number.isFinite(s)||!Number.isFinite(r)||!Number.isFinite(n)))return{level:s,row:r,col:n}}_selectLevel(e){let[t,o]=e.viewportSize,i=Math.max(1,t),s=Math.max(1,o),r=Math.max(e.hfov/i,e.vfov/s),n=.25,l=this._levels.map(h=>({level:h,boundary:this._blockBoundaryMap.get(h)})).filter(h=>h.boundary!=null).sort((h,u)=>u.boundary.pixelAngle-h.boundary.pixelAngle);if(l.length===0)return this._baseLevel;let d=new Map;for(let h of l)d.set(h.level,r/h.boundary.pixelAngle);let m=new Map;l.forEach((h,u)=>{m.set(h.level,u)});let c=l[l.length-1].level;for(let h of l)if((d.get(h.level)??0)>=n){c=h.level;break}if(this._lastStableLevel!=null&&m.has(this._lastStableLevel)){let h=m.get(this._lastStableLevel),u=m.get(c);if(u>h&&(d.get(this._lastStableLevel)??0)>=.2)return this._lastStableLevel;if(u<h)return this._lastStableLevel}return c}},J=class{constructor(e){this._layer=e,this._inflightControllers=new Map,this._inflightSet=new Set,this._loadedSet=new Set,this.fetchTileImageData=async(t,o,i,s)=>{let r=We(t),n=s?{signal:s}:void 0,l=this._meshBuilder.blockBoundaryMap.get(r);if(!l)throw new Error(`No tile boundary found for level ${t}`);let{maxCol:d,maxRow:m,minCol:c,minRow:h}=l,u=d-c+1,p=m-h+1,f=i-c,v=o-h,g=f*this._meshBuilder.imageSize[0]/u,w=v*this._meshBuilder.imageSize[1]/p,y=Math.min((f+1)*this._meshBuilder.imageSize[0]/u,this._meshBuilder.imageSize[0]),_=Math.min((v+1)*this._meshBuilder.imageSize[1]/p,this._meshBuilder.imageSize[1]),C=await this._layer.fetchPixels(new Ae({xmin:g-.5,ymin:.5-_,xmax:y-.5,ymax:.5-w,spatialReference:this._layer.fullExtent.spatialReference}),y-g,_-w,n);return je(C.pixelBlock)},this.loadComponent=(t,o,i,s)=>this._meshBuilder.loadComponent(t,o,i,s),this.unloadComponent=(t,o,i)=>this._meshBuilder.unloadComponent(t,o,i),this._meshBuilder=new j({layer:e})}get imageSize(){return this._meshBuilder.imageSize}get baseMesh(){return this._meshBuilder.baseMesh}get currentLevel(){return this._currentLevel}getTileAnchor(e,t,o){return this._meshBuilder.getTileAnchor(e,t,o)}async load(){return await this._meshBuilder.load(),this._tilePlanner=new q({blockBoundaryMap:this._meshBuilder.blockBoundaryMap,baseLevel:this._meshBuilder.baseLevel,levels:[...this._meshBuilder.levels]}),this}destroy(){for(let e of this._inflightControllers.values())e.abort();this._inflightControllers.clear(),this._inflightSet.clear(),this._loadedSet.clear(),this._tilePlanner=void 0,this._meshBuilder.destroy()}planTiles(e){if(!this._tilePlanner)throw new Error("PanoramicTileSource is not loaded yet.");let t=this._tilePlanner.plan(e,this._loadedSet,this._inflightSet);return this._currentLevel=t.stableLevel,t}markTileInflight(e,t){this._inflightSet.add(e),this._inflightControllers.set(e,t)}markTileLoaded(e){this._inflightSet.delete(e),this._inflightControllers.delete(e),this._loadedSet.add(e)}markTileInflightResolved(e){this._inflightSet.delete(e),this._inflightControllers.delete(e)}markTileDropped(e){this._loadedSet.delete(e)}cancelStaleInflight(e){for(let t of this._inflightSet)e.has(t)||(this._inflightControllers.get(t)?.abort(),this._inflightControllers.delete(t),this._inflightSet.delete(t))}},Je=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,M=(a,e,t,o)=>{for(var i=o>1?void 0:o?Qe(e,t):e,s=a.length-1,r;s>=0;s--)(r=a[s])&&(i=(o?r(e,t,i):r(i))||i);return o&&i&&Je(e,t,i),i},Xe=0,et=0,tt=0,it=new Set(["JPG","JPEG","TIFF","TIF","MRF"]),ot=new Set(["MRF","TIFF","TIF"]),b=class extends Te{constructor(a){super(a),this._size=[0,0],this.autoLoad=!1,this.type="image",this.uiStrings={},this._resolveMedia=async e=>{let t=Promise.withResolvers(),o=e?.signal?Y(e?.signal,"abort",t.resolve):null,i=this.type==="video"?document.createElement("video"):document.createElement("img");this.type==="video"&&(i.setAttribute("playsinline","true"),i.setAttribute("muted","true"),i.setAttribute("autoplay","true")),i.crossOrigin="anonymous",i.src=this.url;let s=null,r=this.type==="video"?Ge(i,m=>this.addHandles(m)):await new Promise((m,c)=>{s=[de(i,"error",h=>{c(h)}),de(i,"load",m)]}).finally(()=>{s?.forEach(m=>m.remove()),s=null}),n=Promise.race([r,t.promise]);try{await n}finally{o?.remove()}I(e);let l=i,d=await V({data:i,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return I(e),{media:l,mesh:d}}}static isPanoramicMedia(a){return!!a&&typeof a=="object"&&"declaredClass"in a&&typeof a.declaredClass=="string"&&a.declaredClass==="components.oriented-imagery-viewer-panoramic-viewer.support.PanoramicMedia"}destroy(){this._cache=void 0}get horizonPitch(){let{matrix:a}=this;return a?180*Math.asin(-a[6])/Math.PI:Xe}get horizonRoll(){let{matrix:a}=this;return a?180*Math.atan(a[7]/a[8])/Math.PI:tt}get horizonYaw(){let{matrix:a,cameraHeading:e}=this;return a?180*Math.atan2(a[3],a[0])/Math.PI:e?-e:et}get panoramicTileSource(){return this._panoramicTileSource}get element(){return this._cache}get size(){return this._size}async load(a){if(this.type==="video")return await this.loadVideoMesh(a);let e=this.extension;if(e||(e=le(this.url)),!e||!it.has(e))throw new Ie("unsupported-format",this.uiStrings["unsupported-format"]??"Unsupported image format: {extension}",{datasetFormat:e??"UNKNOWN FORMAT"});return ot.has(e)?await this.loadOptimizedImageMesh(a):await this.loadImageMesh(a)}async loadOptimizedImageMesh(a){this._panoramicTileSource?.destroy();let e=new Le({url:this.url,datasetFormat:this.extension,skipMapInfo:!0,skipExtensions:["aux.xml","jgw"]});this._panoramicTileSource=new J(e);let{imageSize:t,baseMesh:o}=await this._panoramicTileSource.load();return I(a),{mesh:o,size:t}}async loadVideoMesh(a){if(I(a),this._cache){let o=await V({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(a);return I(a),{mesh:o,size:this._size}}let e=await this._resolveMedia(a);I(a),this._cache=e.media,this._size=[this._cache.videoWidth,this._cache.videoHeight];let t=await V({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(a);return I(a),{mesh:t,size:this._size}}async loadImageMesh(a){if(this._cache){let o=await V({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(a);return I(a),{mesh:o,size:this._size}}let e=await this._resolveMedia(a);I(a),this._cache=e.media;let t=e.mesh;return this._size=[e.media.width,e.media.height],{mesh:t,size:this._size}}};M([S()],b.prototype,"_size",2);M([S()],b.prototype,"_cache",2);M([S()],b.prototype,"autoLoad",2);M([S()],b.prototype,"cameraHeading",2);M([S()],b.prototype,"extension",2);M([S()],b.prototype,"horizonPitch",1);M([S()],b.prototype,"horizonRoll",1);M([S()],b.prototype,"horizonYaw",1);M([S()],b.prototype,"id",2);M([S()],b.prototype,"_panoramicTileSource",2);M([S()],b.prototype,"panoramicTileSource",1);M([S()],b.prototype,"element",1);M([S()],b.prototype,"matrix",2);M([S()],b.prototype,"size",1);M([S()],b.prototype,"type",2);M([S()],b.prototype,"uiStrings",2);M([S()],b.prototype,"url",2);b=M([Ce("components.oriented-imagery-viewer-panoramic-viewer.support.PanoramicMedia")],b);var at=()=>new ye({atmosphereEnabled:!1,starsEnabled:!1,lighting:{type:"virtual"}}),rt=()=>new Se({opacity:0,navigationConstraint:null}),st=()=>new X({x:0,y:0,z:0,spatialReference:K.WebMercator}),Q=class extends ie{constructor(){super(...arguments),this.#e=at(),this._graphicsController=new ne(this),this._ground=rt(),this._messages=se(),this._startPosition=null,this.tileCache=new Set,this._currentGraphicsStore=new _e,this._tileLabelGraphics=new Map,this._handleMouseWheel=e=>{e.detail.stopPropagation(),e.detail.deltaY<0?this._internalZoom.value?.zoomIn():this._internalZoom.value?.zoomOut()},this._handleDrag=e=>{e.stopPropagation();let{x:t,y:o,action:i}=e,s=null,r=null;switch(i){case"start":this._startPosition={x:t,y:o};break;case"update":if(!this._startPosition)return;let n=l=>{if(!this._startPosition||!this.camera)return;if(r||(r=l),l-r<16){s=requestAnimationFrame(n);return}let d=t-this._startPosition.x,m=o-this._startPosition.y,c=Be(this.camera?.heading-d*.1),h=Ee(this.camera.tilt+m*.1);this.yaw=c,this.pitch=h,this._startPosition={x:t,y:o},r=null};s=requestAnimationFrame(n);break;case"end":s!==null&&cancelAnimationFrame(s),this._startPosition=null;break}},this._internalMap=H(),this._internalZoom=H(),this._loading=!1,this.yaw=0,this.pitch=90,this.hideLoader=!1,this.hideTitle=!1,this.hideZoomControls=!1,this.hideVideoControls=!1,this.messageOverrides=this._messages._overrides}static{this.properties={_media:16,_internalMap:16,_internalZoom:16,_loading:16,_base:16,yaw:9,pitch:9,hideLoader:5,hideTitle:7,hideZoomControls:5,hideVideoControls:5,imageSize:32,media:0,messageOverrides:0,hfov:32,base:32}}static{this.styles=[ke]}#e;get view(){return this._internalMap?.value?.view}get camera(){if(!this.view?.destroyed)return this.view?.camera}set camera(e){!e||!this.view||this.view.destroyed||(e.position=st(),this.view.camera=e.clone())}get map(){return this._internalMap.value?.view?.map}get _fov(){return this.camera?.fov}set _fov(e){typeof e!="number"||!this._internalZoom.value||this._internalZoom.value?.zoomFOV(e)}get imageSize(){return this._media?.size}get media(){return this._media}set media(e){if(!e){this._mediaAbortController?.abort(),this._media=void 0,this._clearImage();return}this._media=b.isPanoramicMedia(e)?e:new b(e)}get hfov(){return this._internalZoom.value?.hfov}get base(){return this._base?.geometry}addGraphic(e){this._graphicsController.addGraphic(e)}addGraphics(e){this._graphicsController.addGraphics(e)}clearGraphics(){this._graphicsController.clearGraphics()}async mediaOnLoad(){return this._mediaPromise&&await this._mediaPromise,this._media}removeGraphic(e){this._graphicsController.removeGraphic(e)}removeGraphics(e){this._graphicsController.removeGraphics(e)}zoomIn(){this._internalZoom.value?.zoomIn()}zoomOut(){this._internalZoom.value?.zoomOut()}loaded(){this.manager.onLifecycle(()=>[be(()=>this.view,"drag",this._handleDrag),Me(()=>this.camera!=null,()=>{this.camera&&(this.camera.heading=this.yaw,this.camera.tilt=this.pitch,this._reloadCamera())}),G(()=>this.yaw,()=>{this.camera&&(this.camera.heading=this.yaw,this._reloadCamera())},{sync:!0,initial:!0}),G(()=>this.pitch,()=>{this.camera&&(this.camera.tilt=this.pitch,this._reloadCamera())},{sync:!0,initial:!0}),G(()=>this._fov,()=>{this._reloadCamera()},{sync:!0,initial:!0}),G(()=>this._media,e=>{this._mediaAbortController?.abort(),e&&(this._mediaAbortController=new AbortController,this._mediaPromise=this._loadMediaInternal(e,this._mediaAbortController))},{initial:!0,sync:!0}),G(()=>{if(!this.view?.ready||!this.base)return;let e=this._media?.panoramicTileSource;if(!e)return;let{camera:{heading:t,tilt:o,fov:i},width:s,height:r}=this.view,n=s/r;return{panoramicTileSource:e,heading:t,pitch:o,hfov:ce(i,n),vfov:me(i,n)}},e=>{e&&(this._tileUpdateDebounceHandle!=null&&clearTimeout(this._tileUpdateDebounceHandle),this._tileUpdateDebounceHandle=window.setTimeout(()=>{this._tileUpdateTask?.abort(),this._tileUpdateTask=re(async t=>{await this._updateTilesForCurrentView(e,t)}),this._tileUpdateDebounceHandle=void 0},150))},{initial:!0,sync:!0})])}_reloadCamera(){this.camera=this.camera?.clone()}_clearImage(){this._tileUpdateDebounceHandle!=null&&(clearTimeout(this._tileUpdateDebounceHandle),this._tileUpdateDebounceHandle=void 0),this._tileUpdateTask?.abort(),this._tileUpdateTask=void 0,this.tileCache.clear();for(let e of this._tileLabelGraphics.values())this.removeGraphic(e);this._tileLabelGraphics.clear(),this.clearGraphics(),this._base=void 0,this._currentGraphicsStore.removeAll()}_parseTileKey(e){let[t,o,i]=e.split("/").map(Number);return{level:t,row:o,col:i}}_createTileLabelGraphic(e,t){let{level:o,row:i,col:s}=this._parseTileKey(t),[r,n,l]=e.getTileAnchor(o,i,s);return new ue({attributes:{tileKey:t},geometry:new X({x:r,y:n,z:l,spatialReference:K.WebMercator}),symbol:new $e({color:[255,255,255,.95],font:new Ne({family:"Avenir Next",size:8,weight:"bold"}),haloColor:[0,0,0,.9],haloSize:1,horizontalAlignment:"center",text:t,verticalAlignment:"middle"})})}_attachTileLabel(e,t){if(this._tileLabelGraphics.has(t))return;let o=this._createTileLabelGraphic(e,t);this._tileLabelGraphics.set(t,o),this._currentGraphicsStore.add(o),this.addGraphic(o)}_detachTileLabel(e){let t=this._tileLabelGraphics.get(e);t&&(this.removeGraphic(t),this._currentGraphicsStore.remove(t),this._tileLabelGraphics.delete(e))}async _updateTilesForCurrentView(e,t){let{base:o}=this;if(!o)return;let{panoramicTileSource:i,heading:s,pitch:r,hfov:n,vfov:l}=e,d=[Math.max(1,this.view?.width??1),Math.max(1,this.view?.height??1)],m=i.planTiles({heading:s,pitch:r,hfov:n,vfov:l,imageSize:i.imageSize,viewportSize:d});if(I(t),i.cancelStaleInflight(m.desiredKeySet),m.toDrop.length>0){let u=new Set(m.toDrop);for(let p of u){let{level:f,row:v,col:g}=this._parseTileKey(p);i.unloadComponent(f,v,g),i.markTileDropped(p),this._detachTileLabel(p),this.tileCache.delete(p)}}let c=async u=>{if(u>=m.toFetch.length)return;let p=m.toFetch[u];if(I(t),!this.tileCache.has(p)){let{level:f,row:v,col:g}=this._parseTileKey(p),w=new AbortController,y=()=>{w.abort()};t.addEventListener("abort",y,{once:!0}),i.markTileInflight(p,w);try{let _=await i.fetchTileImageData(f,v,g,w.signal);I(t),m.desiredKeySet.has(p)&&!this.tileCache.has(p)&&(i.loadComponent(f,v,g,_),i.markTileLoaded(p),this._attachTileLabel(i,p),this.tileCache.add(p))}catch(_){ae(_)||te("error",this,"Failed loading panoramic tile component",{detail:{key:p,error:_}})}finally{t.removeEventListener("abort",y),i.markTileInflightResolved(p)}}await c(u+1)};await c(0);let h=i.planTiles({heading:s,pitch:r,hfov:n,vfov:l,imageSize:i.imageSize,viewportSize:d});if(I(t),h.toDrop.length>0){let u=new Set(h.toDrop);for(let p of u){let{level:f,row:v,col:g}=this._parseTileKey(p);i.unloadComponent(f,v,g),i.markTileDropped(p),this._detachTileLabel(p),this.tileCache.delete(p)}}}async _loadMediaInternal(e,t){if(this._loading=!0,this._clearImage(),!e)throw new Error("No media provided");let{mesh:o}=await e.load(t).finally(()=>{this._loading=!1});I(t),this._fov=he(Oe,this.el.clientWidth/this.el.clientHeight),this._base=De(o),this.addGraphic(this._base)}render(){return O`<calcite-panel .loading=${this.hideLoader?void 0:this._loading} .heading=${this.hideTitle?void 0:this._messages.title}><arcgis-scene .environment=${this.#e} hide-attribution .spatialReference=${K.WebMercator} viewing-mode=local .ground=${this._ground} @arcgisViewMouseWheel=${this._handleMouseWheel} ${U(this._internalMap)}><arcgis-oriented-imagery-viewer-panoramic-viewer-zoom .hidden=${this.hideZoomControls} slot=top-left ${U(this._internalZoom)}></arcgis-oriented-imagery-viewer-panoramic-viewer-zoom></arcgis-scene>${this.hideVideoControls||this.media?.type!=="video"?null:O`<arcgis-oriented-imagery-viewer-video-controls .videoRef=${this._media?.element}></arcgis-oriented-imagery-viewer-video-controls>`}</calcite-panel>`}};oe("arcgis-oriented-imagery-viewer-panoramic-viewer",Q);return Q},"geometry/SpatialReference","Graphic","Camera","views/3d/environment/Environment","core/reactiveUtils","applications/Components/baUtils","core/Collection","symbols/FillSymbol3DLayer","symbols/MeshSymbol3D","Ground","core/Accessor","core/accessorSupport/decorators","core/Error","geometry/Mesh","geometry/Extent","layers/ImageryTileLayer","geometry/support/MeshComponent","geometry/support/MeshMaterialMetallicRoughness","geometry/support/MeshTexture","geometry/support/MeshVertexAttributes","geometry/Point","geometry/support/meshUtils","symbols/Font","symbols/TextSymbol",a,b,c)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import b from"./
|
|
2
|
+
import b from"./FVZJPOWC.js";import a from"./4RYR4YDD.js";import{N as P,O as k,P as g,T as A,a as N,b as v}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([,{c:C,e:I,f:R}])=>{var B=N`.size-ramp-container{display:flex;align-items:center;justify-content:center}.size-ramp-vertical-container{display:flex;flex-direction:column;align-items:center;justify-content:center}.size-ramp-label{margin:0 .5em;white-space:nowrap}.size-ramp-vertical-ramp{display:flex;flex-direction:column;align-items:center}.size-ramp-ramp{display:flex;flex-direction:row-reverse;align-items:center}.size-ramp-preview{display:flex}`,O="#ddd";function X(e){if(!e)return;if(e.type.includes("3d")){if(!("symbolLayers"in e)||!e.symbolLayers?.length)return;let s=e.symbolLayers.at(-1),i=s&&"resource"in s?s.resource?.primitive:void 0;return i==="circle"||i==="cross"||i==="kite"||i==="sphere"||i==="cube"||i==="diamond"}let n="style"in e?e.style:void 0;return n==="circle"||n==="diamond"||n==="cross"}function Y(e){if(e){if(e.type.includes("3d")){if(!("symbolLayers"in e)||!e.symbolLayers?.length)return;let n=e.symbolLayers.at(-1),s=n&&"resource"in n?n.resource?.primitive:void 0;return s==="triangle"||s==="cone"||s==="tetrahedron"}return"style"in e&&e.style==="triangle"}}var j=class extends P{constructor(){super(...arguments),this.hasIndicators=!1,this.legendElement=null,this.opacity=1}static{this.properties={hasIndicators:5,legendElement:0,opacity:9,messages:0}}static{this.styles=B}render(){if(this.legendElement.theme==="spike")return v`<div style=${g({display:"flex",flex:"1",justifyContent:"center"})}><arcgis-legend-spike-ramp .legendElement=${this.legendElement} .messages=${this.messages}></arcgis-legend-spike-ramp></div>`;let{legendElement:n,hasIndicators:s,opacity:i}=this,o=n.infos,d=o.at(0),m=o.at(-1);if(!d||!m)return null;let{label:y,...z}=d,{label:f,...x}=m,r=z.preview,t=x.preview;if(!r||!t)return null;r=r.cloneNode(!0),r.style.display="flex",R(r,I(this.messages,y)),t=t.cloneNode(!0),t.style.display="flex",R(t,I(this.messages,f));let l={opacity:`${i??""}`};return v`<div class=${k(s?"size-ramp-vertical-container":"size-ramp-container")}><div class="size-ramp-label">${s?y:f}</div><div class=${k(s?"size-ramp-vertical-ramp":"size-ramp-ramp")}><div class="size-ramp-preview" style=${g(l)}>${r}</div>${this._renderSizeRampLines(n)}<div class="size-ramp-preview" style=${g(l)}>${t}</div></div><div class="size-ramp-label">${s?f:y}</div></div>`}_renderSizeRampLines(n){let s=n.infos,i=s.at(0),o=s.at(-1);if(!i||!o)return null;let d=i.symbol,m=this.hasIndicators,y=i.size&&typeof i.size=="number"?i.size:0,z=o.size&&typeof o.size=="number"?o.size:0,f=i.outlineSize||0,x=o.outlineSize||0,r=C(y+f),t=C(z+x),l=m?r:r+50,p=m?r/2+50:r,u=Y(d),h=X(d),c=document.createElement("canvas");c.width=l,c.height=p,c.style.width=`${c.width}px`,c.style.height=`${c.height}px`;let a=c.getContext("2d");if(m){a.beginPath();let $=0,b=0,w=l/2-t/2,M=p;a.moveTo($,b),a.lineTo(w,M);let L=l,T=0,E=l/2+t/2,S=p;a.moveTo(L,T),a.lineTo(E,S)}else{a.beginPath();let $=0,b=p/2-t/2,w=l;a.moveTo($,b),a.lineTo(w,0);let L=0,T=p/2+t/2,E=l,S=p;a.moveTo(L,T),a.lineTo(E,S)}return a.strokeStyle=O,a.stroke(),v`<div style=${g(m?{display:"flex",marginTop:`-${u?0:h?r/2:0}px`,marginBottom:`-${u?t:h?t/2:0}px`}:{display:"flex",marginRight:`-${u?0:h?r/2:0}px`,marginLeft:`-${u?0:h?t/2:0}px`})}>${c}</div>`}};A("arcgis-legend-card-size-ramp",j);return j},a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{d as c}from"./4SV6HHMC.js";import{a as s}from"./POKO37D3.js";import{N as p,O as g,T as u,a as m,b as i}from"./
|
|
2
|
+
import{d as c}from"./4SV6HHMC.js";import{a as s}from"./POKO37D3.js";import{N as p,O as g,T as u,a as m,b as i}from"./WXLC6FPD.js";import"./H6RQVSYM.js";var b=m`:host{--calcite-label-margin-bottom: 0;gap:var(--calcite-spacing-md);flex-direction:column;display:flex}.label{display:block}.discrete-label-text{font-weight:var(--calcite-font-weight-medium);opacity:var(--calcite-opacity-disabled)}.label-open{&:not(.label-empty){margin-bottom:var(--calcite-spacing-xs)}.discrete-label-text{opacity:1}}arcgis-shadow-cast-discrete-config{padding:0 var(--calcite-spacing-xs)}`,d=class extends p{constructor(){super(...arguments),this.scale="s",this.minMinDuration=0,this.maxMinDuration=c(8,"hours","milliseconds"),this.hideColorPicker=!1,this.hideSlider=!1,this.hideContextOptions=!1,this.hideContextToggle=!1,this.hideContextColorPicker=!1,this.hideContextInterval=!1}static{this.properties={options:0,scale:1,minMinDuration:9,maxMinDuration:9,messages:0,hideColorPicker:5,hideSlider:5,hideContextOptions:5,hideContextToggle:5,hideContextColorPicker:5,hideContextInterval:5}}static{this.styles=b}render(){let{options:o,scale:t}=this,e=this.messages?.minDuration;return i`${s({hidden:this.hideSlider,children:i`<calcite-label .scale=${t}>${e?.minDurationLabel}<calcite-slider fill-placement=end label-ticks .min=${r(this.minMinDuration)} .max=${r(this.maxMinDuration)} .value=${r(o.minDuration)} snap step=0.5 .scale=${t} ticks=1 @calciteSliderInput=${a=>{o.minDuration=f(a.currentTarget.value)}}></calcite-slider></calcite-label>`})}${s({hidden:this.hideColorPicker,children:i`<arcgis-color-select .color=${this.options.color} .label=${e?.colorLabel} @arcgisColorChanged=${a=>{o.color=a.detail}}></arcgis-color-select>`})}${s({hidden:this.hideContextOptions,children:this._renderContextOptions()})}`}_renderContextOptions(){let{options:o,scale:t}=this,e=o.contextEnabled,a=this.messages?.minDuration,l=!this.hideContextToggle,x=!this.hideContextColorPicker,C=!this.hideContextInterval,h=x||C;if(!(!l&&(!e||!h)))return i`<div><calcite-label class=${g({label:!0,"label-open":e,"label-empty":!h})} .layout=${l?"inline-space-between":"default"} .scale=${t}><span class="discrete-label-text">${a?.discreteLabel??"foo"}</span>${s({hidden:!l,children:i`<calcite-switch .checked=${e} .scale=${t} @calciteSwitchChange=${$=>{this.options.contextEnabled=$.target.checked}}></calcite-switch>`})}</calcite-label>${s({hidden:!e,children:i`<arcgis-shadow-cast-discrete-config .hideColorPicker=${this.hideContextColorPicker} .hideInterval=${this.hideContextInterval} .messages=${this.messages} .options=${this.options.contextOptions} .scale=${t}></arcgis-shadow-cast-discrete-config>`})}</div>`}};function r(n){return c(n,"milliseconds","hours")}function f(n){return Math.round(c(n,"hours","milliseconds"))}u("arcgis-shadow-cast-min-duration-config",d);export{d as ArcgisShadowCastMinDurationConfig};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as M}from"./IDKRMHDS.js";import{a as v}from"./GU3M4JMW.js";import{a as k}from"./
|
|
2
|
+
import{a as M}from"./IDKRMHDS.js";import{a as v}from"./GU3M4JMW.js";import{a as k}from"./RHXVVGD3.js";import{a as w}from"./LTOXLO3L.js";import{L as P,M as L,N as $,O as c,P as u,Q as h,T as y,a as b,b as l,w as x}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:B}])=>{var a=(t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(t,e,i),i);var H;function C(t){return(e,i)=>a(e,i,{get(){return(this.renderRoot??(H??=document.createDocumentFragment())).querySelectorAll(t)}})}var W=b`:host{transition:max-height .25s ease-in-out;--esri-widget-padding: 12px 15px;--level-picker-padding: var(--calcite-spacing-md);--level-label-color: var(--calcite-color-text-1);--level-label-color--empty: var(--calcite-color-text-2);--level-label-color--active: var(--calcite-color-brand);--level-border-width: 2px;--level-border-color: var(--calcite-color-border-2);--level-border-color--hover: var(--calcite-color-brand);--level-border-color--active: var(--calcite-color-brand);--level-background-color: rgb(from var(--calcite-color-foreground-1) r g b / 70%);--level-background-color--hover: rgb(from var(--calcite-color-foreground-1) r g b / 90%);--level-background-color--active: var(--calcite-color-brand);--focus-outline-width: 2px;--focus-outline-color: var(--calcite-color-brand);--focus-outline-offset: 2px}.container{height:max-content;display:flex;flex-direction:row;align-items:center;&.no-level{display:none}>*{height:max-content}}.clear-button{appearance:none;margin-inline-start:7px;display:none;position:absolute;inset-block-start:-4px}.label-container{--width: 90px;--height: 40px;flex-direction:column;justify-content:space-between;align-items:center;width:50%;margin-inline-end:var(--calcite-spacing-md);display:flex;&.active{color:var(--calcite-color-brand)}&.empty{cursor:default;color:var(--calcite-color-border-2);font-size:var(--calcite-font-size);font-weight:var(--calcite-font-weight-light)}&:focus{outline:none}&:focus-visible{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus)}}.level-label{position:relative;text-align:center;>span{pointer-events:none}&.active{font-size:var(--height);line-height:calc(var(--height) + 6px);>.clear-button{display:inline-block}}}.tiles-container{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;transform:rotate(180deg);cursor:pointer;padding:20px 0;width:50%}.tiles-inner-container{transition:margin .3s}`,j=Object.defineProperty,F=(t,e,i,n)=>{for(var r=void 0,o=t.length-1,s;o>=0;o--)(s=t[o])&&(r=s(e,i,r)||r);return r&&j(e,i,r),r},d=class extends ${constructor(){super(...arguments),this.hovering=!1,this.onPointerMove=e=>{if(!this.hovering)return!1;if(window.getSelection()?.removeAllRanges(),this.containerPosTop!=null){let i=this.containerPosTop,n=40,r=this.expandedLevelsMargin,o=this.levelsHeight,s=i+n+r,m=this.levelHeight/2;s+=m,o-=m;let f=(e.clientY-s)/o;f+=.035,this.normalizedPointerPosition=f}return!1},this.onPointerEnter=()=>{let e=this.levelsContainer.value;this.hovering||e==null||(this.hovering=!0,this.containerPosTop=e.getBoundingClientRect().top??0)},this.levelsContainer=P(),this.onPointerLeave=()=>{if(this.hovering){window.getSelection()?.removeAllRanges();for(let e of this.levelItems)e.width=void 0;this.normalizedPointerPosition=0,this.hoveredLevel=null,this.hovering=!1}},this.onPointerUp=()=>{window.getSelection()?.removeAllRanges();let e=this.level;this.hoveredLevel==null||e==null||this.#o()},this.expandedLevelsHeight=void 0,this.normalizedPointerPosition=0,this.hoveredLevel=null,this.arcgisBuildingLevelChange=x({bubbles:!0,composed:!0})}static{this.properties={expandedLevelsHeight:16,normalizedPointerPosition:16,hoveredLevel:16,messages:0,level:0,numberOfLevels:32,levelHeight:32,levelsHeight:32}}static{this.styles=W}get levels(){return this.level?.allowedValues??[]}get levelWidth(){let{levelWidthNominator:e,levelWidthConstant:i}=M,n=e/Math.sqrt(this.numberOfLevels)+i;return Math.round(v(n,30,80))}get _gaussianFactor(){let e=this.numberOfLevels;return e/Math.log(30*e)*10}get expandedLevelsMargin(){return Math.round(((this.expandedLevelsHeight??0)-this.levelsHeight)/2)}get levelClosestToPointer(){if(!this.hovering)return null;let e=this.numberOfLevels-1,i=this.clampedNormalizedPointerPosition;return e>=0&&i!=null?this.levels[Math.round((1-i)*e)]:null}get clampedNormalizedPointerPosition(){return v(this.normalizedPointerPosition,0,1)}get numberOfLevels(){return this.levels.length}get levelHeight(){let e=14,i=e*2/Math.sqrt(this.numberOfLevels);return Math.round(v(i,2,e))}get levelsHeight(){return Math.round(this.levelHeight*this.numberOfLevels)}async loaded(){this.listen("keydown",this.#n.bind(this)),this.manager.onLifecycle(()=>[B(()=>[this.normalizedPointerPosition,this.hovering],()=>this.onPointerPositionChange(),{initial:!0})])}onPointerPositionChange(){let e=0;this.levelItems.forEach((n,r)=>{let{width:o,height:s}=this.getLevelWidgetSize(r);n.height=s,n.width=o,e+=s}),this.hoveredLevel=this.levelClosestToPointer;let i=this.expandedLevelsHeight;(i==null||Math.abs(i-e)>30)&&(this.expandedLevelsHeight=e)}getLevelWidgetSize(e){let i={width:this.levelWidth,height:this.levelHeight};if(this.hovering){let n=this.getGaussianFactor(e,this.clampedNormalizedPointerPosition);i.width+=20*n,i.height+=30*n}return i}getGaussianFactor(e,i){let n=this.numberOfLevels-1,r=(n-e)/n,o=this._gaussianFactor*(r-i);return Math.exp(-(o**2))}#n(e){switch(e.key){case"ArrowDown":case"ArrowLeft":e.preventDefault(),e.stopPropagation(),this.#i(),this.#e();break;case"ArrowUp":case"ArrowRight":e.preventDefault(),e.stopPropagation(),this.#t(),this.#e();break}}#e(){Array.from(this.levelItems).find(e=>e.level===this.level?.value)?.focus()}#t(){this.level&&(this.level.next(),this.arcgisBuildingLevelChange.emit())}#i(){this.level&&(this.level.previous(),this.arcgisBuildingLevelChange.emit())}#o(){this.level==null||this.hoveredLevel==null||(this.level.value===this.hoveredLevel&&!this.level.disabled?this.#r():(this.level.select(this.hoveredLevel),this.arcgisBuildingLevelChange.emit()))}#r(){this.level&&!this.level.disabled&&(this.level.clear(),this.arcgisBuildingLevelChange.emit())}render(){if(!this.messages)return null;let e=this.level;e?.value;let i=e&&!e.disabled,n=this.numberOfLevels>1?k(this.levels,r=>r,r=>l`<arcgis-building-level-item .level=${r} .baseWidth=${this.levelWidth} .hovered=${this.hoveredLevel===r} .active=${e&&!e.disabled&&e.value===r} class=${c({"animate-level":!this.hovering})} .messages=${this.messages}></arcgis-building-level-item>`):null;return l`<div class=${c({container:!0,"no-level":this.numberOfLevels<2,"animate-level":this.hovering})}>${T({messages:this.messages,active:i,hasNext:e?.hasNext,hasPrevious:e?.hasPrevious,onNext:()=>this.#t(),onPrevious:()=>this.#i(),children:U({messages:this.messages,level:this.hoveredLevel??e?.value,active:i,onClear:()=>this.#r()})})}${D({ref:this.levelsContainer,expandedLevelsMargin:this.expandedLevelsMargin,levelsHeight:this.levelsHeight,onPointerEnter:this.onPointerEnter,onPointerMove:this.onPointerMove,onPointerLeave:this.onPointerLeave,onPointerUp:this.onPointerUp,children:n})}</div>`}};F([C("arcgis-building-level-item")],d.prototype,"levelItems");function T(t){return l`<div class=${c({"label-container":!0,empty:!t.active,active:!0,hover:!0})} title=${t.messages.selectLevel??h} tabindex=0><calcite-action icon=chevron-up appearance=transparent .text=${t.messages.nextLevel} @click=${t.onNext} .disabled=${!t.hasNext}></calcite-action>${t.children}<calcite-action icon=chevron-down appearance=transparent .text=${t.messages.previousLevel} @click=${t.onPrevious} .disabled=${!t.hasPrevious}></calcite-action></div>`}function U(t){let e=t.messages;return l`<div aria-label=${e.clearLevel??h} class=${c({"level-label":!0,active:t.active&&t.level!=null})} @click=${t.onClear} title=${e.clearLevel??h}>${t.active?l`<span>${t.level}</span>${w("clear-button",l`<calcite-fab appearance=outline-fill class="clear-button" icon=x kind=neutral @click=${t.onClear} scale=s></calcite-fab>`)}`:l`<span>${e.selectLevel}</span>`}</div>`}function D(t){let e=40,i=-e/2,n=t.levelsHeight,r=n+e*2;return l`<div class="tiles-container" @pointerenter=${t.onPointerEnter} @pointerover=${t.onPointerEnter} @pointermove=${t.onPointerMove} @pointerleave=${t.onPointerLeave} @pointerup=${t.onPointerUp} @click=${t.onClick} style=${u({height:`${r}px`,marginBlockStart:`${i}px`,marginBlockEnd:`${i}px`})} ${L(t.ref)}><div class="tiles-inner-container" style=${u({height:`${n}px`,margin:"0",marginBlockStart:`${20-t.expandedLevelsMargin}px`})}>${t.children}</div></div>`}y("arcgis-building-level-picker",d);return d},"core/reactiveUtils")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as f,b as p}from"./VJVKFKSG.js";import{o as d}from"./
|
|
2
|
+
import{a as f,b as p}from"./VJVKFKSG.js";import{o as d}from"./WXLC6FPD.js";export default $arcgis.t(([h,{property:l,subclass:w},_])=>{var v=Object.defineProperty,y=Object.getOwnPropertyDescriptor,s=(r,t,e,o)=>{for(var n=o>1?void 0:o?y(t,e):t,i=r.length-1,u;i>=0;i--)(u=r[i])&&(n=(o?u(t,e,n):u(n))||n);return o&&n&&v(t,e,n),n};function q(r,t,e){if(r&&typeof r=="object"&&!Array.isArray(r)){let o="details"in r&&r.details&&typeof r.details=="object"&&!Array.isArray(r.details)?{detail:r.details}:void 0,n=e?`${e} - ${String(r)}`:String(r);d("error",t,n,o)}}function b(r="Aborted"){return new _("AbortError",r)}function L(r,t="Aborted"){if(g(r))throw b(t)}function m(r){return r instanceof AbortSignal?r:r?.signal??void 0}function g(r){return m(r)?.aborted??!1}function A(r){return r?.name==="AbortError"}function C(r){return{ok:!0,value:r}}function k(r){return{ok:!1,error:r}}function T(r){return r?.ok?r.value:null}function j(r){return r!=null&&!r.ok?r.error:null}function c(r,t){let e=m(r);if(e==null)return;if(e.aborted){t();return}let o=()=>t();return e.addEventListener("abort",o,{once:!0}),{remove:()=>e.removeEventListener("abort",o)}}function O(r,t){return new a(r,t)}var a=class extends h{constructor(r,t){super({}),this._abortHandle=null,this.abort=()=>{this._abortController=f(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;let{signal:e}=this._abortController;this.promise=r(e),this.promise.then(o=>{this._result=C(o),this._cleanup()},o=>{this._result=k(o),this._cleanup()}),this._abortHandle=c(t,this.abort)}get value(){return T(this._result)}get error(){return j(this._result)}get finished(){return this._result!=null}destroy(){this.abort()}_cleanup(){this._abortHandle=p(this._abortHandle),this._abortController=null}[Symbol.dispose](){this._cleanup()}};s([l()],a.prototype,"value",1);s([l()],a.prototype,"error",1);s([l()],a.prototype,"finished",1);s([l()],a.prototype,"promise",2);s([l()],a.prototype,"_result",2);a=s([w("esri.components.asyncUtils.ReactiveTask")],a);function P(r){return r.catch(t=>{if(!A(t))throw t})}function D(r,t={}){if("requestIdleCallback"in window)return window.requestIdleCallback(r,t);let e=t.timeout!=null?t.timeout:50,o=typeof performance<"u"&&performance.now?performance.now.bind(performance):Date.now,n=o();return window.setTimeout(()=>{r({didTimeout:!1,timeRemaining(){return Math.max(0,e-(o()-n))}})},1)}function M(r){"cancelIdleCallback"in window&&window.cancelIdleCallback(r),window.clearTimeout(r)}function R(r,t){let e=new AbortController;return c(t,()=>e.abort()),new Promise((o,n)=>{let i=setTimeout(()=>{i=void 0,o()},r);c(e,()=>{i!==void 0&&(clearTimeout(i),i=void 0,n(b()))})})}return{a:q,b:L,c:g,d:A,e:O,f:P,g:D,h:M,i:R}},"core/Accessor","core/accessorSupport/decorators","core/Error")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as i}from"./
|
|
2
|
+
import{a as i}from"./2BVXNQ3U.js";import"./3AQ6NC3C.js";import"./A4X5YDA6.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{N as s,T as t,b as r}from"./WXLC6FPD.js";import"./H6RQVSYM.js";var e=class extends s{constructor(){super(...arguments),this._messages=i({blocking:!0}),this.errorName=""}static{this.properties={errorName:1}}render(){return r`<calcite-alert icon=x-octagon kind=danger open .label=${this.errorName}><div slot=title>${this._messages.errrorTitle}</div><div slot=message>${this._messages.errorMessage}</div><calcite-link slot=link href=https://esriurl.com/webgl-faq>${this._messages.webglFaq}</calcite-link></calcite-alert>`}};t("arcgis-webgl-error",e);export{e as ArcgisWebGlError};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as f}from"./XEK22IDA.js";import c from"./K2HEKJRC.js";import a from"./MZWO5JYA.js";import"./QUZTFUWM.js";import{d as R}from"./QLIWDFZI.js";import{L as E,M as O,N as S,O as L,R as b,T as j,a as M,b as o}from"./ZJZBS5ZY.js";import"./H6RQVSYM.js";export default $arcgis.t(([{templateHasKey:B,stripHTML:V},{renderingSanitizer:T},{isRelatableFeatureSupportedLayer:G,findRelatedLayer:J},{substitute:U,formatNumber:H},{watch:_,on:X},k,K,{ignoreAbortErrors:P},Y,,{g:Q}])=>{var ee=M`:host{position:relative;flex:1 1 auto}.list{min-height:var(--calcite-spacing-xxxl)}.list-item-hidden{display:none}.feature-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.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}`,te=u=>{let e=[];if(u.formTemplate){let{description:t,title:r}=u.formTemplate;u.fields?.forEach(i=>{let s=r&&B(r,i.name),a=t&&B(t,i.name);(s||a)&&e.push(i.name)})}return e},D=100;function re(u){return typeof u=="string"&&u.trim().length>0}var x=class extends S{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 P(this._query()),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();let e=new AbortController;this._queryFeatureCountAbortController=e,await P(this._queryFeatureCount()),this._queryFeatureCountAbortController===e&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryPageController=async()=>{let e=new AbortController;this._queryPageAbortController=e,await P(this._queryPage()),this._queryPageAbortController===e&&(this._queryPageAbortController=null)},this._queryDebounced=f(this._queryController,D),this._queryFeatureCountDebounced=f(this._queryFeatureCountController,D),this._queryPageDebounced=f(this._queryPageController,D),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=E(),this.relatedFeatures=new k,this._queryAbortController=null,this._queryPageAbortController=null,this._queryFeatureCountAbortController=null,this.featureCount=0,this._loaded=!1,this.relatedFeatureViewModels=new k,this.autoDestroyDisabled=!1,this.featuresPerPage=10,this.useFeatureNextFlowItem=!1,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,useFeatureNextFlowItem:5,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=ee}get orderByFieldsFixedCasing(){let{orderByFields:e,relatedLayer:t}=this;return e&&t?.loaded?e.map(r=>{let i=r.clone();return i.field=Q(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&&G(e.parent)?e.parent:e;return J(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 U(e?.numberRecords??"",{number:H(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(()=>[_(()=>[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}),_(()=>[this.featurePage,this.showAllEnabled],()=>this._queryPageDebounced()),_(()=>[this.layer,this.relationshipId,this.objectId,this.canQuery,this.activeCategory],()=>this._queryFeatureCountDebounced(),{initial:!0}),_(()=>[this.state,this.showAllEnabled,this._relatedFeatureIntersectionObserverNode],()=>this._handleRelatedFeatureObserverChange()),X(()=>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:F}=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:v}=await $arcgis.t(m=>m[0],"smartMapping/statistics/uniqueValues"),{uniqueValueInfos:I}=await v({layer:t,sqlWhere:`${n} = '${g}'`,field:t.subtypeField??void 0,signal:r?.signal}),$=I.map(({count:h,value:y})=>{let m=t.subtypes?.find(A=>A.code===y)?.name;return y!=null&&m?{count:h,value:y,name:m}:void 0}).filter(h=>h!=null);this.allCategories=$}return}let{historicMoment:p,gdbVersion:C}=e,w=new K({cacheHint:F,gdbVersion:C,historicMoment:p,relationshipId:l,returnGeometry:!1,objectIds:[a],where:this._getRelationshipWhereClause(t)}),c=await e.queryRelatedFeaturesCount(w,{signal:r?.signal});this.allCategories=void 0,this.featureCount=c[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:F,showAllEnabled:p,supportsCacheHint:C}=this,{canQuery:w,objectId:c}=this;if(!w||!a||!l||c==null)return[];let v=p?((i-1)*s+r)%r:0,I=p?s:t,$=l.objectIdField,h="subtypeField"in l?l.subtypeField:void 0,y=[...n.map(d=>d.field),...te(l),...g,$,h].filter(re),m=n.map(d=>`${d.field} ${d.order}`),{historicMoment:A,gdbVersion:Z}=a,z=new K({orderByFields:m,start:v,num:I,outFields:y,cacheHint:C,historicMoment:A,gdbVersion:Z,relationshipId:F,returnGeometry:!1,objectIds:[c],where:this._getRelationshipWhereClause(l)}),q=(await a.queryRelatedFeatures(z,{signal:e?.signal}))[c]?.features||[];return l.type==="subtype-group"&&h?q.forEach(d=>{let W=d.attributes[h],N=l.findSublayerForSubtypeCode?.(W);d.sourceLayer=N,d.layer=N}):q.forEach(d=>{d.sourceLayer=l,d.layer=l}),q}_selectCategory(e){let{flowItems:t}=this;t&&this._addRelationshipFlowItem({showAllEnabled:!0,activeCategory:e})}_selectRecord(e){let{flowItems:t}=this;if(!t)return;let r=this.useFeatureNextFlowItem?b(o`<arcgis-feature-next .autoDestroyDisabled=${this.autoDestroyDisabled} .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-next>`):b(o`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .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>`);this._addFlowItem(r)}_addRelationshipFlowItem({showAllEnabled:e=!1,activeCategory:t}){this._addFlowItem(b(o`<arcgis-feature-relationship .autoDestroyDisabled=${this.autoDestroyDisabled} .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} .useFeatureNextFlowItem=${this.useFeatureNextFlowItem} .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 Y({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="root"><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="sticky-loading-container">${this._renderLoadingIcon()}</div>`:null}_renderLoadingIcon(){return o`<calcite-loader inline label></calcite-loader>`}_renderLoading(){return o`<div class="loading-container">${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=H(t);return o`<calcite-list-item class="list-item" .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,heading:a}=e,n={...r,...i?.global},l=(t&&n?.[t])??"";return o`<calcite-list-item class=${L(R("list-item",{"list-item-hidden":s==="loading"}))} .description=${V(l.toString())} .label=${V(a)} @calciteListItemSelect=${()=>this._selectRecord(e)}><div slot=heading><div .innerHTML=${T.sanitize(a??"")??""}></div></div><div slot=description><div .innerHTML=${T.sanitize(l??"")??""}></div></div>${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="feature-observer" ${O(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=${L(R("list",{"list-querying":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>`}};j("arcgis-feature-relationship",x);return x},"applications/Components/stringUtils","applications/Components/sanitizerUtils","applications/Components/featureUtils","intl","core/reactiveUtils","core/Collection","rest/support/RelationshipQuery","core/promiseUtils","popup/FeatureContent",a,c)
|
|
2
|
+
import{a as f}from"./XEK22IDA.js";import c from"./7HL2TQ7E.js";import a from"./MZWO5JYA.js";import"./QUZTFUWM.js";import{d as R}from"./4W3T75SY.js";import{L as E,M as O,N as S,O as L,R as b,T as j,a as M,b as o}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([{templateHasKey:B,stripHTML:V},{renderingSanitizer:T},{isRelatableFeatureSupportedLayer:G,findRelatedLayer:J},{substitute:U,formatNumber:H},{watch:_,on:X},k,K,{ignoreAbortErrors:P},Y,,{g:Q}])=>{var ee=M`:host{position:relative;flex:1 1 auto}.list{min-height:var(--calcite-spacing-xxxl)}.list-item-hidden{display:none}.feature-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.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}`,te=u=>{let e=[];if(u.formTemplate){let{description:t,title:r}=u.formTemplate;u.fields?.forEach(i=>{let s=r&&B(r,i.name),a=t&&B(t,i.name);(s||a)&&e.push(i.name)})}return e},D=100;function re(u){return typeof u=="string"&&u.trim().length>0}var x=class extends S{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 P(this._query()),this._queryAbortController===e&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();let e=new AbortController;this._queryFeatureCountAbortController=e,await P(this._queryFeatureCount()),this._queryFeatureCountAbortController===e&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryPageController=async()=>{let e=new AbortController;this._queryPageAbortController=e,await P(this._queryPage()),this._queryPageAbortController===e&&(this._queryPageAbortController=null)},this._queryDebounced=f(this._queryController,D),this._queryFeatureCountDebounced=f(this._queryFeatureCountController,D),this._queryPageDebounced=f(this._queryPageController,D),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=E(),this.relatedFeatures=new k,this._queryAbortController=null,this._queryPageAbortController=null,this._queryFeatureCountAbortController=null,this.featureCount=0,this._loaded=!1,this.relatedFeatureViewModels=new k,this.autoDestroyDisabled=!1,this.featuresPerPage=10,this.useFeatureNextFlowItem=!1,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,useFeatureNextFlowItem:5,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=ee}get orderByFieldsFixedCasing(){let{orderByFields:e,relatedLayer:t}=this;return e&&t?.loaded?e.map(r=>{let i=r.clone();return i.field=Q(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&&G(e.parent)?e.parent:e;return J(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 U(e?.numberRecords??"",{number:H(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(()=>[_(()=>[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}),_(()=>[this.featurePage,this.showAllEnabled],()=>this._queryPageDebounced()),_(()=>[this.layer,this.relationshipId,this.objectId,this.canQuery,this.activeCategory],()=>this._queryFeatureCountDebounced(),{initial:!0}),_(()=>[this.state,this.showAllEnabled,this._relatedFeatureIntersectionObserverNode],()=>this._handleRelatedFeatureObserverChange()),X(()=>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:F}=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:v}=await $arcgis.t(m=>m[0],"smartMapping/statistics/uniqueValues"),{uniqueValueInfos:I}=await v({layer:t,sqlWhere:`${n} = '${g}'`,field:t.subtypeField??void 0,signal:r?.signal}),$=I.map(({count:h,value:y})=>{let m=t.subtypes?.find(A=>A.code===y)?.name;return y!=null&&m?{count:h,value:y,name:m}:void 0}).filter(h=>h!=null);this.allCategories=$}return}let{historicMoment:p,gdbVersion:C}=e,w=new K({cacheHint:F,gdbVersion:C,historicMoment:p,relationshipId:l,returnGeometry:!1,objectIds:[a],where:this._getRelationshipWhereClause(t)}),c=await e.queryRelatedFeaturesCount(w,{signal:r?.signal});this.allCategories=void 0,this.featureCount=c[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:F,showAllEnabled:p,supportsCacheHint:C}=this,{canQuery:w,objectId:c}=this;if(!w||!a||!l||c==null)return[];let v=p?((i-1)*s+r)%r:0,I=p?s:t,$=l.objectIdField,h="subtypeField"in l?l.subtypeField:void 0,y=[...n.map(d=>d.field),...te(l),...g,$,h].filter(re),m=n.map(d=>`${d.field} ${d.order}`),{historicMoment:A,gdbVersion:Z}=a,z=new K({orderByFields:m,start:v,num:I,outFields:y,cacheHint:C,historicMoment:A,gdbVersion:Z,relationshipId:F,returnGeometry:!1,objectIds:[c],where:this._getRelationshipWhereClause(l)}),q=(await a.queryRelatedFeatures(z,{signal:e?.signal}))[c]?.features||[];return l.type==="subtype-group"&&h?q.forEach(d=>{let W=d.attributes[h],N=l.findSublayerForSubtypeCode?.(W);d.sourceLayer=N,d.layer=N}):q.forEach(d=>{d.sourceLayer=l,d.layer=l}),q}_selectCategory(e){let{flowItems:t}=this;t&&this._addRelationshipFlowItem({showAllEnabled:!0,activeCategory:e})}_selectRecord(e){let{flowItems:t}=this;if(!t)return;let r=this.useFeatureNextFlowItem?b(o`<arcgis-feature-next .autoDestroyDisabled=${this.autoDestroyDisabled} .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-next>`):b(o`<arcgis-feature .autoDestroyDisabled=${this.autoDestroyDisabled} .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>`);this._addFlowItem(r)}_addRelationshipFlowItem({showAllEnabled:e=!1,activeCategory:t}){this._addFlowItem(b(o`<arcgis-feature-relationship .autoDestroyDisabled=${this.autoDestroyDisabled} .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} .useFeatureNextFlowItem=${this.useFeatureNextFlowItem} .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 Y({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="root"><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="sticky-loading-container">${this._renderLoadingIcon()}</div>`:null}_renderLoadingIcon(){return o`<calcite-loader inline label></calcite-loader>`}_renderLoading(){return o`<div class="loading-container">${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=H(t);return o`<calcite-list-item class="list-item" .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,heading:a}=e,n={...r,...i?.global},l=(t&&n?.[t])??"";return o`<calcite-list-item class=${L(R("list-item",{"list-item-hidden":s==="loading"}))} .description=${V(l.toString())} .label=${V(a)} @calciteListItemSelect=${()=>this._selectRecord(e)}><div slot=heading><div .innerHTML=${T.sanitize(a??"")??""}></div></div><div slot=description><div .innerHTML=${T.sanitize(l??"")??""}></div></div>${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="feature-observer" ${O(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=${L(R("list",{"list-querying":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>`}};j("arcgis-feature-relationship",x);return x},"applications/Components/stringUtils","applications/Components/sanitizerUtils","applications/Components/featureUtils","intl","core/reactiveUtils","core/Collection","rest/support/RelationshipQuery","core/promiseUtils","popup/FeatureContent",a,c)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import a from"./4RYR4YDD.js";export default $arcgis.t(([{
|
|
2
|
+
import a from"./4RYR4YDD.js";export default $arcgis.t(([{formatNumber:o,substitute:l},{a:i}])=>{var u=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/iu;function p(e,r,n){switch(r){case"heatmap-ramp":return(n[e.label]||e.label)??null;case"stretch-ramp":let t="value"in e?e.value:void 0,a=e.label?n[e.label]:"";return a?`${a}: ${typeof t=="string"?t:o(t??0,{style:"decimal",notation:t?.toString().toLowerCase().includes("e")?"scientific":"standard"})}`:"";default:return e.label??null}}function b(e,r){return!!(r&&r==="Stretched"&&"version"in e&&typeof e.version=="number"&&e.version>=10.3&&e.declaredClass==="esri.layers.ImageryLayer")}function d(e){return e?e/72*96:0}function c(e){return e?e*72/96:0}function v(e){if(typeof e=="string"){let r=e.match(u);if(r){let n=Number(r[1]),t=r[3]?.toLowerCase(),a=e.startsWith("-"),s=t==="px"?c(n):n;return a?-s:s}return null}return e}function g(e,r){let n=i(e,r,!1),t=n?e.previewTemplateAriaLabel:e.previewAriaLabel;return l(t??"",{label:n})}function y(e,r){if(!r||!e)return;let n=e.querySelector("svg")??e.querySelector("canvas")??e;!(n instanceof SVGElement)&&!n.hasAttribute("role")&&n.setAttribute("role","img"),n.setAttribute("aria-label",r)}return{a:p,b:b,c:d,d:v,e:g,f:y}},"intl",a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import c from"./
|
|
2
|
+
import c from"./7HL2TQ7E.js";import a from"./MZWO5JYA.js";import{N as h,T as b,a as m,b as l,z as f}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([{renderingSanitizer:p},{replace:$},,{k:u,l:v,m:I}])=>{var w=[{pattern:/^\s*(https?:\/\/([^\s]+))\s*$/iu,target:"_blank",label:"{messages.view}"},{pattern:/^\s*(tel:([^\s]+))\s*$/iu,label:"{hierPart}"},{pattern:/^\s*(mailto:([^\s]+))\s*$/iu,label:"{hierPart}"},{pattern:/^\s*(arcgis-appstudio-player:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"App Studio Player"},{pattern:/^\s*(arcgis-collector:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Collector"},{pattern:/^\s*(arcgis-explorer:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Explorer"},{pattern:/^\s*(arcgis-navigator:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Navigator"},{pattern:/^\s*(arcgis-survey123:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Survey123"},{pattern:/^\s*(arcgis-trek2there:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Trek2There"},{pattern:/^\s*(arcgis-workforce:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Workforce"},{pattern:/^\s*(iform:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"iForm"},{pattern:/^\s*(flow:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"FlowFinity"},{pattern:/^\s*(lfmobile:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Laserfische"},{pattern:/^\s*(mspbi:\/\/([^\s]+))\s*$/iu,label:"{messages.openInApp}",appName:"Microsoft Power Bi"}];function F(d,a){let e=w.find(s=>s.pattern.test(a));if(!e)return a;let r=a.match(e.pattern)?.[2],o=$($(e.label,{messages:d,hierPart:r}),{appName:e.appName}),t=e.target?` target="${e.target}"`:"",n=e.target==="_blank"?' rel="noreferrer"':"";return p.sanitizeUrl(new URL(a,window.location.origin==="null"?void 0:window.location.origin).toString()).replace(e.pattern,`<a${t} href="$1"${n}>${o}</a>`)}var k=m`.table{border:none;width:100%;border-collapse:collapse;color:var(--calcite-color-text-2)}.table caption{clip:rect(0 0 0 0);clip-path:inset(50%);height:1px;overflow:hidden;position:absolute;white-space:nowrap;width:1px}.table tr{background-color:var(--arcgis-table-row-background-color, var(--calcite-color-foreground-1))}.table tr:nth-child(odd){background-color:var(--arcgis-table-row-alt-background-color, var(--calcite-color-foreground-2))}.table tr a{color:var(--calcite-color-text-link)}.table tr a:hover,.table tr a:focus{color:var(--calcite-color-brand-hover)}.table tr td,.table tr th{padding:var(--calcite-spacing-xs) var(--calcite-spacing-sm);vertical-align:top;word-break:break-word;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular);line-height:var(--calcite-font-line-height-relative-normal)}.table tr th{border-inline-end:var(--calcite-border-width-md) solid var(--calcite-color-border-3);width:50%;text-align:start}.table tr td{width:50%}`,c=class extends h{constructor(){super(...arguments),this.headingLevel=2}static{this.properties={values:0,description:1,expressionInfos:0,fieldInfos:0,heading:1,isContentFieldInfos:5,graphic:0,layer:0,headingLevel:9,messages:0}}static{this.styles=k}get formattedFieldInfos(){let{expressionInfos:a,fieldInfos:e,layer:r,graphic:o,isContentFieldInfos:t}=this,n=[];return e?.forEach(s=>{if(!(!("visible"in s)||s.visible))return;let i=s.clone();i.label=v({fieldInfo:i,expressionInfos:a,layer:r,graphic:o,isContentFieldInfos:t});let g=u({fieldInfo:s,graphic:o,layer:r});g&&(i.fieldFormat=I({configurableFieldsContainer:g,fieldInfo:i,isContentFieldInfos:t})),n.push(i)}),n}render(){return l`<div class="root"><arcgis-feature-element-info .heading=${this.heading} .description=${this.description} .headingLevel=${this.headingLevel}></arcgis-feature-element-info>${this._renderFields()}</div>`}_renderFieldInfo(a){let{values:e}=this,r=a.fieldName||"",o=a.label||r,t=e?e[r]==null?"":e[r]:"",n=a?.fieldFormat?.type==="date-time",s={openInApp:this.messages?.openInApp??"",view:this.messages?.view??""},i=typeof t=="number"&&!n?f(`${t}`):typeof t=="string"?F(s,t):`${t}`;return l`<tr><th .innerHTML=${p.sanitize(o)??""}></th><td .innerHTML=${p.sanitize(i)??""}></td></tr>`}_renderFields(){let{formattedFieldInfos:a}=this;return a?.length?l`<table class="table"><caption>${this.messages?.fieldsSummary}</caption><tbody>${a.map(e=>this._renderFieldInfo(e))}</tbody></table>`:null}};b("arcgis-feature-fields",c);return c},"applications/Components/sanitizerUtils","applications/Components/stringUtils",a,c)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import o from"./VGMTHIUW.js";import n from"./7MIEKJ57.js";import"./JFNKQEAB.js";import{a as Q}from"./JCRPP54Z.js";import"./D4HG2OIN.js";import{a as S,b as U,g as G,h as v,j as H,k as q,m as c,n as $}from"./LDDAJOTV.js";import{a as N}from"./HSF2MYAX.js";import{a as m}from"./RDWM76R2.js";import l from"./K2HEKJRC.js";import j from"./MZWO5JYA.js";import i from"./FR3DD5XU.js";import"./VJVKFKSG.js";import h from"./G3GFYB3W.js";import{a as O}from"./NDMHZQ2Z.js";import{a as b}from"./JD74LG7K.js";import{a as k}from"./5OJHCEN4.js";import f from"./K3VQUQ6I.js";import e from"./NFE73D6R.js";import{g as B}from"./5GFBHLDY.js";import"./42UVPIOD.js";import a from"./34IPKNHM.js";import"./QUZTFUWM.js";import{d as P}from"./QLIWDFZI.js";import{A as M,L as d,M as p,N as R,O as g,Q as _,R as w,T as A,a as C,b as r,w as y}from"./ZJZBS5ZY.js";import"./H6RQVSYM.js";export default $arcgis.t(([se,L,{on:ae,watch:le},,,{a:x},D,,,,,{a:j,b:z,c:J,d:K}])=>{var u={...Q,section:"section",editing:"editing",editingForm:"editing-form"},re=C`:host{--arcgis-layer-list-visibility-icon: hidden}.editing-form{display:flex;height:100%}.editing{padding-block:var(--calcite-spacing-sm);padding-inline:var(--calcite-spacing-sm)}`,V="nested",oe=".*\\S+.*",W="data-basemap-layer-type",ne=D(se),F=class extends R{constructor(){super(...arguments),this._baseListRef=d(),this._referenceListRef=d(),this._editTitleInputRef=d(),this._layerFlowItemRef=d(),this._panelFlowItemRef=d(),this._rootFlowItemRef=d(),this._editingFlowItemRef=d(),this._lastDragDetail=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`basemap-${M()}`,this._openedLayersController=null,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this._focusEditingFlowItem=!1,this.messages=O(),this.viewModel=ne(this),this.arcgisClose=k(this),this._canMove=({dragEl:e,fromEl:t,toEl:i},s)=>{let a=s==="pull"?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,o=c(e,this._allItems);if(!o?.sortable)return!1;let l=c(t,this._allItems),n=$(t),h=c(i,this._allItems),f=$(i),I=!!n&&!!f&&n===f,Y={selected:o,from:l,to:h},Z=t.group,ee=i.group,te=l?.layer?.type??"",ie=h?.layer?.type??"",T=new Set(["map-image","catalog","knowledge-graph"]);return Z&&ee&&typeof a=="function"?a(Y):I&&!T.has(te)&&!T.has(ie)&&o.layer?.type!=="sublayer"},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onTablesOpen=e=>{this.openedLayers.push(e.layer),this._focusLayerFlowItem=e.layer?.uid??null},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent),this._focusLayerFlowItem=e.layer?.uid??null},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0},this._clearActiveItem=()=>{this._activeItem=null},this._setCurrentActiveItem=e=>{this._activeItem=e},this._setActiveItem=e=>{if(this.visibilityAppearance!=="default")return;let t=Array.from(e.composedPath()).find(i=>i.classList?.contains(u.item));this._activeItem=c(t,this._allItems)??null},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._toggleEditingTitle=()=>{let e=!this.editingTitle;this.editingTitle=e,e?this._focusEditingFlowItem=!0:this._focusRootFlowItem=!0},this._formSubmit=e=>{e.preventDefault();let t=this._editTitleInputRef.value?.value;t?.trim()&&(this.basemapTitle=t),this._toggleEditingTitle()},this._activeItem=null,this._tooltipReferenceMap=new Map,this._layerListMap=new Map,this.openedLayerLists=new L,this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.baseFilterText="",this.baseItemCreatedFunction=this.viewModel.baseItemCreatedFunction,this.basemapTitle=this.viewModel.basemapTitle,this.closed=!1,this.collapsed=!1,this.dragEnabled=!1,this.editingTitle=!1,this.filterPlaceholder="",this.headingLevel=2,this.icon="layers",this.layerTablesEnabled=new L(["knowledge-graph"]),this.listModeDisabled=this.viewModel.listModeDisabled,this.minFilterItems=U,this.openedLayers=new L,this.referenceFilterText="",this.referenceItemCreatedFunction=this.viewModel.referenceItemCreatedFunction,this.selectedItems=new L,this.selectionMode="none",this.visibilityAppearance="default",this.hideBaseLayers=!1,this.hideCatalogLayerList=!1,this.hideHeading=!1,this.hideReferenceLayers=!1,this.hideStatusIndicators=!1,this.showCloseButton=!1,this.showCollapseButton=!1,this.showEditTitleButton=!1,this.showErrors=!1,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.showFilter=!1,this.showTemporaryLayerIndicators=!1,this.state=this.viewModel.state,this.arcgisPropertyChange=B()("state"),this.arcgisReady=y(),this.arcgisBaseFilterChange=y(),this.arcgisReferenceFilterChange=y(),this.arcgisOpenedLayersChange=y(),this.arcgisTriggerAction=x(()=>this.viewModel,"trigger-action")}static{this.properties={_activeItem:16,_catalogLayerList:16,_tableList:16,_tooltipReferenceMap:16,_layerListMap:16,openedLayerLists:16,_allItems:16,_visibleBaseItems:16,_visibleReferenceItems:16,_openedPanelItems:16,_totalBaseItems:16,_totalReferenceItems:16,_baseFilterEnabled:16,_referenceFilterEnabled:16,_renderedOpenLayerFlowItems:16,view:0,autoDestroyDisabled:5,baseFilterPredicate:0,baseFilterText:1,baseItems:32,baseItemCreatedFunction:0,basemapTitle:1,catalogLayerList:32,catalogOptions:0,closed:5,collapsed:7,dragEnabled:5,editingTitle:5,filterPlaceholder:1,headingLevel:9,icon:1,knowledgeGraphOptions:0,label:1,layerTablesEnabled:0,listItemCanGiveFunction:0,listItemCanReceiveFunction:0,listModeDisabled:5,mapImageOptions:0,minFilterItems:9,openedLayers:32,position:1,referenceElement:1,referenceFilterPredicate:0,referenceFilterText:1,referenceItems:32,referenceItemCreatedFunction:0,selectedItems:0,selectionMode:1,tableList:32,tileOptions:0,visibilityAppearance:1,hideBaseLayers:5,hideCatalogLayerList:5,hideHeading:5,hideReferenceLayers:5,hideStatusIndicators:5,showCloseButton:5,showCollapseButton:5,showEditTitleButton:5,showErrors:5,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,showFilter:5,showTemporaryLayerIndicators:5,messageOverrides:0,state:32}}static{this.styles=[K,re,J]}get _allItems(){return this.referenceItems.concat(this.baseItems)}get _visibleBaseItems(){return this.baseItems.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _visibleReferenceItems(){return this.referenceItems.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleReferenceItems.concat(this._visibleBaseItems).flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _totalBaseItems(){return this.viewModel.baseItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _totalReferenceItems(){return this.viewModel.referenceItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _baseFilterEnabled(){return this._totalBaseItems>=this.minFilterItems&&this.showFilter}get _referenceFilterEnabled(){return this._totalReferenceItems>=this.minFilterItems&&this.showFilter}get _renderedOpenLayerFlowItems(){return this.openedLayers.toArray().map((e,t)=>this._renderLayerFlowItem(e,t===this.openedLayers.length-1))}get baseItems(){return this.viewModel.baseItems}get catalogLayerList(){return this._catalogLayerList}get referenceItems(){return this.viewModel.referenceItems}get tableList(){return this._tableList}async destroy(){await this.manager.destroy(),this._destroyOpenedLayerLists(),this._tooltipReferenceMap.clear()}loaded(){this.manager.onLifecycle(()=>[ae(()=>this.openedLayers,"change",()=>{this._handleOpenedLayersChange()},{initial:!0}),le(()=>[this.viewModel.referenceItems.toArray(),this.viewModel.baseItems.toArray()],()=>G(this.selectedItems),{initial:!0})])}updated(){v(this._baseListRef.value,this.baseFilterPredicate,this.baseItems),v(this._referenceListRef.value,this.referenceFilterPredicate,this.referenceItems)}triggerAction(e,t){this.viewModel.triggerAction(e,t)}async _createFlowList(e,t){let i=this._layerListMap.get(e);if(i)return i;let s=e.type==="catalog"?await this._createCatalogLayerList(e):await this._createTableList(e);return t.aborted||this._layerListMap.set(e,s),s}async _handleOpenedLayersChange(){let{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this._openedLayersController?.abort();let s=new AbortController,{signal:a}=s;this._openedLayersController=s,e.forEach((n,h)=>{t.includes(h)||(n?.destroy?.(),e.delete(h))});let o=await Promise.all(t.map(n=>this._createFlowList(n,a)));if(a.aborted)return;i.removeAll(),i.addMany(o);let l=i.at(-1);l?"catalogLayer"in l?(this._catalogLayerList=l,this._tableList=void 0):(this._catalogLayerList=void 0,this._tableList=l):(this._catalogLayerList=void 0,this._tableList=void 0),this.arcgisOpenedLayersChange.emit()}_destroyOpenedLayerLists(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}async _createCatalogLayerList(e){let{headingLevel:t,catalogOptions:i,filterPlaceholder:s,minFilterItems:a,selectionMode:o,visibilityAppearance:l,layerTablesEnabled:n}=this;return w(r`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${i?.filterPlaceholder??s} .listItemCreatedFunction=${i?.listItemCreatedFunction} .minFilterItems=${i?.minFilterItems??a} .selectionMode=${i?.selectionMode??o} .visibilityAppearance=${i?.visibilityAppearance??l} .showErrors=${i?.showErrors??this.showErrors} .showFilter=${i?.showFilter??this.showFilter} .hideStatusIndicators=${i?.hideStatusIndicators??this.hideStatusIndicators} .showTemporaryLayerIndicators=${i?.showTemporaryLayerIndicators??this.showTemporaryLayerIndicators} @arcgisReady=${h=>h.stopPropagation()} .catalogLayer=${e} .layerTablesEnabled=${n} .view=${this.view} .referenceElement=${this.referenceElement} @catalogOpen=${this._onCatalogOpen} @tablesOpen=${this._onTablesOpen}></arcgis-catalog-layer-list-next>`)}_getTableListParams(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async _createTableList(e){let t=this._getTableListParams(e);return w(r`<arcgis-table-list-next .headingLevel=${t?.headingLevel??this.headingLevel} .selectionMode=${t?.selectionMode??this.selectionMode} .dragEnabled=${t?.dragEnabled??this.dragEnabled} .collapsed=${t?.collapsed} .filterPlaceholder=${t?.filterPlaceholder} .filterText=${t?.filterText} .icon=${t?.icon??void 0} .label=${t?.label??void 0} .listItemCreatedFunction=${t?.listItemCreatedFunction} .tables=${t?.tables} .referenceElement=${this.referenceElement} @arcgisReady=${i=>i.stopPropagation()}></arcgis-table-list-next>`)}_handlePanelFlowItemBack(e){e.open=!1,this._focusRootFlowItem=!0}_moveLayerFromChildList({toEl:e,fromEl:t,dragEl:i,newIndex:s}){let a=c(i,this._allItems),o=e.hasAttribute("data-item")?c(e,this._allItems):null,l=t.hasAttribute("data-item")?c(t,this._allItems):null,n=X(t),h=X(e);s==null||!a||!n||!h||(this.viewModel.moveItem({targetItem:a,fromParentItem:l,toParentItem:o,newIndex:s,from:n,to:h}),j(this,a.uid,f=>f.parentElement?.closest("calcite-list")===e))}_handleCalciteListDragEnd(e){let{fromEl:t,toEl:i,dragEl:s,oldIndex:a}=e;if(t!==i){s.remove();return}a==null||!t||!s||t.insertBefore(s,t.children[a])}_onCalciteListOrderChange(e){let{_lastDragDetail:t}=this,{toEl:i,fromEl:s,dragEl:a,newIndex:o}=e,l=t?.newIndex===o&&t?.dragEl===a&&t?.toEl===i&&t?.fromEl===s;if(!s||!i||l)return;this._lastDragDetail=e,this._selectedDragItemLayerUid=a.value.layer?.uid??null;let n=s,h=i;if(n===h){let f=Array.from(s.children).filter(I=>I?.matches("calcite-list-item")).map(I=>I.value.layer?.uid??"");this._sortLayers(n,f);return}this._moveLayerFromChildList({toEl:h,fromEl:n,dragEl:a,newIndex:o})}_sortLayers(e,t){if(e===this._referenceListRef.value||e===this._baseListRef.value){let s=e===this._baseListRef.value?this.view?.map?.basemap?.baseLayers:this.view?.map?.basemap?.referenceLayers;H(s,t);return}let i=c(e,this._allItems);i&&q(i,t)}_handleCalciteListChange(e){if(this.selectionMode==="none")return;let t=e.target.selectedItems.map(i=>c(i,this._allItems)).filter(Boolean);this.selectedItems.removeAll(),this.selectedItems.addMany(t)}_focusFlowItem(e,t){return!t||!e?t:(e.setFocus(),!1)}render(){let e={[b.hidden]:this.state==="loading",[b.disabled]:this.state==="disabled"};return r`<div class=${g(P(b.widget,b.panel,e))}>${this._renderItems()}${this._renderItemTooltips()}</div>`}_renderItemTooltip(e){return e?r`<calcite-tooltip overlay-positioning=fixed .referenceElement=${this._tooltipReferenceMap.get(e.layer?.uid??"")}>${this.messages.layerIncompatibleTooltip}</calcite-tooltip>`:null}_renderItemTooltipNodes(e){if(e.incompatible)return this._renderItemTooltip(e);let t=e.children?.filter(i=>!i.hidden).toArray().map(i=>this._renderItemTooltipNodes(i));return t?.length?t:null}_renderItemTooltips(){return this._visibleReferenceItems.concat(this._visibleBaseItems).toArray().map(e=>this._renderItemTooltipNodes(e))}_renderNoLayersInfoMessage(e){return r`<div slot=message>${e}</div>`}_renderNoLayersInfo(e,t){return this.hideNoItemsNotice?null:r`<div class=${g(u.itemMessage)}>${m(t,r`<calcite-notice icon=information kind=info open width=full>${this._renderNoLayersInfoMessage(e)}</calcite-notice>`)}</div>`}_renderEditingInput(){return r`<div class=${g(u.editing)}><calcite-label>${this.messages.basemapTitle}<calcite-input .label=${this.messages.basemapTitle} name=basemaptitle .pattern=${oe} .placeholder=${this.messages.basemapTitle} required title=${this.messages.basemapTitle??_} type=text .value=${this.viewModel.basemapTitle??void 0} ${p(this._editTitleInputRef)}></calcite-input></calcite-label></div>`}_renderEditingForm(){return this.editingTitle?r`<form class=${g(u.editingForm)} @submit=${this._formSubmit}><calcite-flow-item .heading=${this.hideHeading?void 0:this.messages.basemapTitle} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length&&!this._openedPanelItems.length} @calciteFlowItemBack=${e=>{e.preventDefault(),this._toggleEditingTitle()}} ${p(this._editingFlowItemRef)}>${this._renderEditingInput()}<calcite-button appearance=outline @click=${this._toggleEditingTitle} slot=footer-actions width=full>${this.messages.cancel}</calcite-button><calcite-button slot=footer-actions type=submit width=full>${this.messages.ok}</calcite-button></calcite-flow-item></form>`:null}_renderEditTitleButton(){return this.showEditTitleButton&&!this.editingTitle?r`<calcite-action icon=pencil @click=${this._toggleEditingTitle} slot=header-actions-end .text=${this.messages.edit??""} title=${this.messages.edit??_}></calcite-action>`:null}_renderItems(){let e=[m("root-flow-item",r`<calcite-flow-item .closable=${this.showCloseButton} .closed=${this.closed} .collapsed=${this.collapsed} .collapsible=${this.showCollapseButton} .heading=${this.hideHeading?void 0:this.viewModel.basemapTitle??this.messages.componentLabel} .headingLevel=${this.headingLevel} .selected=${!this.editingTitle&&!this.openedLayers.length&&!this._openedPanelItems.length} @calciteFlowItemClose=${()=>{this.closed=!0}} ${p(this._rootFlowItemRef)}>${this._renderEditTitleButton()}${this._renderReferenceSection()}${this._renderBaseSection()}</calcite-flow-item>`),this._renderEditingForm(),this._renderPanelFlowItems(),this._renderedOpenLayerFlowItems];return this._focusRootFlowItem=this._focusFlowItem(this._rootFlowItemRef.value,this._focusRootFlowItem),this._focusEditingFlowItem=this._focusFlowItem(this._editingFlowItemRef.value,this._focusEditingFlowItem),this.closed?null:m("root-flow",r`<calcite-flow>${e}</calcite-flow>`)}_renderPanelFlowItems(){return N(this._openedPanelItems.toArray(),e=>e.uid,(e,t)=>{let{panel:i,title:s}=e,a=()=>this._handlePanelFlowItemBack(i);return this._focusPanelFlowItem=this._focusFlowItem(this._panelFlowItemRef.value,this._focusPanelFlowItem),r`<calcite-flow-item .description=${s} .heading=${i.title} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length&&t===this._openedPanelItems.length-1} @calciteFlowItemBack=${o=>{o.preventDefault(),a()}} ${p(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${e} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${a} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`})}_renderLayerFlowItem(e,t){let i=e.title||this.messages.untitledLayer;return this._focusLayerFlowItem===e.uid&&(this._focusLayerFlowItem=this._focusFlowItem(this._layerFlowItemRef.value,!0)?e.uid:null),m(e.uid,r`<calcite-flow-item data-layer-uid=${e.uid??_} .description=${i} .heading=${this.messages[e.type==="catalog"?"catalogLayers":"tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${s=>{s.preventDefault(),this.openedLayers.pop();let a=this.openedLayers.at(-1);a?this._focusLayerFlowItem=a.uid:this._focusRootFlowItem=!0}} ${p(this._layerFlowItemRef)}>${this._layerListMap.get(e)}</calcite-flow-item>`)}_renderList(e,t,i){let s=t==="reference"?this._referenceFilterEnabled:this._baseFilterEnabled,a=t==="reference"?this.referenceFilterText:this.baseFilterText,o=(t==="reference"?this.messages.noReferenceLayers:this.messages.noBaseLayers)??this.messages.noItemsToDisplay??"";return m(`block-${t}`,r`<calcite-block class=${g(u.section)} collapsible expanded .heading=${t==="reference"?this.messages.referenceHeading:this.messages.baseHeading} .headingLevel=${this.headingLevel+1}>${e?.length?null:this._renderNoLayersInfo(o,t)}${m(`list-${t}`,r`<calcite-list @focusin=${this._setActiveItem} @focusout=${this._clearActiveItem} .canPull=${l=>this._canMove(l,"pull")} .canPut=${l=>this._canMove(l,"put")} data-basemap-layer-type=${t??_} data-layer-type=${this._rootGroupUid??_} .displayMode=${V} .dragEnabled=${this.dragEnabled} .filterEnabled=${s} .filterPlaceholder=${this.filterPlaceholder} .filterProps=${S} .filterText=${s?a:""} .group=${this._rootGroupUid} .label=${this.messages.componentLabel??""} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=border .selectionMode=${this.selectionMode} @calciteListChange=${this._handleCalciteListChange} @calciteListDragEnd=${l=>this._handleCalciteListDragEnd(l.detail)} @calciteListFilter=${l=>{let n=l.currentTarget?.filterText??"";this[t==="reference"?"referenceFilterText":"baseFilterText"]=n,t==="base"?this.arcgisBaseFilterChange.emit():this.arcgisReferenceFilterChange.emit()}} @calciteListOrderChange=${l=>this._onCalciteListOrderChange(l.detail)} ${p(t==="reference"?this._referenceListRef:this._baseListRef)}>${e?.toArray().map(l=>this._renderItem(l,i))}${s&&!this.hideNoFilterResultsNotice?r`<div class=${g(u.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this._renderNoLayersInfoMessage(o)}</calcite-notice></div>`:null}</calcite-list>`)}</calcite-block>`)}_renderBaseSection(){return this.hideBaseLayers?null:this._renderList(this._visibleBaseItems,"base",this._visibleBaseItems.length===1)}_renderReferenceSection(){return this.hideReferenceLayers?null:this._renderList(this._visibleReferenceItems,"reference",!1)}_renderItem(e,t,i,s){return m(e.uid,z({activeItem:this._activeItem,canMove:this._canMove,css:u,displayMode:V,dragEnabled:this.dragEnabled&&!t,hideCatalogLayerList:this.hideCatalogLayerList,hideStatusIndicators:this.hideStatusIndicators,item:e,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,operationalItems:this._allItems,parent:i,parentTitles:s,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,setCurrentActiveItem:this._setCurrentActiveItem,clearActiveItem:this._clearActiveItem,showErrors:this.showErrors,showTemporaryLayerIndicators:this.showTemporaryLayerIndicators,visibilityAppearance:this.visibilityAppearance,handleAction:this._onTriggerAction,handleCatalogOpen:this._onCatalogOpen,handlePanelOpen:this._onPanelOpen,handleSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,handleTablesOpen:this._onTablesOpen,handleTooltipReferenceChange:this._onTooltipReferenceChange,view:this.view}))}};function X(E){let e=E.closest(`[${W}]`)?.getAttribute(W);return e==="base"||e==="reference"?e:null}A("arcgis-basemap-layer-list-next",F);return F},"layers/list/BasemapItemCollection","core/Collection","core/reactiveUtils",a,e,f,h,i,j,l,n,o)
|
|
2
|
+
import o from"./XWALVOZP.js";import n from"./C4LCKYWW.js";import"./AG6XG3QV.js";import{a as Q}from"./JCRPP54Z.js";import"./KKBLRTCV.js";import{a as S,b as U,g as G,h as v,j as H,k as q,m as c,n as $}from"./LDDAJOTV.js";import{a as N}from"./RHXVVGD3.js";import{a as m}from"./LTOXLO3L.js";import l from"./7HL2TQ7E.js";import j from"./MZWO5JYA.js";import i from"./FHWOIM57.js";import"./VJVKFKSG.js";import h from"./3T7L7UT5.js";import{a as O}from"./2BVXNQ3U.js";import{a as b}from"./JD74LG7K.js";import{a as k}from"./VNUQ4CCT.js";import f from"./2FM2FJAY.js";import e from"./YHNRTH56.js";import{g as B}from"./3AQ6NC3C.js";import"./A4X5YDA6.js";import a from"./SDWFNKIL.js";import"./QUZTFUWM.js";import{d as P}from"./4W3T75SY.js";import{A as M,L as d,M as p,N as R,O as g,Q as _,R as w,T as A,a as C,b as r,w as y}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([se,L,{on:ae,watch:le},,,{a:x},D,,,,,{a:j,b:z,c:J,d:K}])=>{var u={...Q,section:"section",editing:"editing",editingForm:"editing-form"},re=C`:host{--arcgis-layer-list-visibility-icon: hidden}.editing-form{display:flex;height:100%}.editing{padding-block:var(--calcite-spacing-sm);padding-inline:var(--calcite-spacing-sm)}`,V="nested",oe=".*\\S+.*",W="data-basemap-layer-type",ne=D(se),F=class extends R{constructor(){super(...arguments),this._baseListRef=d(),this._referenceListRef=d(),this._editTitleInputRef=d(),this._layerFlowItemRef=d(),this._panelFlowItemRef=d(),this._rootFlowItemRef=d(),this._editingFlowItemRef=d(),this._lastDragDetail=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`basemap-${M()}`,this._openedLayersController=null,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this._focusEditingFlowItem=!1,this.messages=O(),this.viewModel=ne(this),this.arcgisClose=k(this),this._canMove=({dragEl:e,fromEl:t,toEl:i},s)=>{let a=s==="pull"?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,o=c(e,this._allItems);if(!o?.sortable)return!1;let l=c(t,this._allItems),n=$(t),h=c(i,this._allItems),f=$(i),I=!!n&&!!f&&n===f,Y={selected:o,from:l,to:h},Z=t.group,ee=i.group,te=l?.layer?.type??"",ie=h?.layer?.type??"",T=new Set(["map-image","catalog","knowledge-graph"]);return Z&&ee&&typeof a=="function"?a(Y):I&&!T.has(te)&&!T.has(ie)&&o.layer?.type!=="sublayer"},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onTablesOpen=e=>{this.openedLayers.push(e.layer),this._focusLayerFlowItem=e.layer?.uid??null},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent),this._focusLayerFlowItem=e.layer?.uid??null},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0},this._clearActiveItem=()=>{this._activeItem=null},this._setCurrentActiveItem=e=>{this._activeItem=e},this._setActiveItem=e=>{if(this.visibilityAppearance!=="default")return;let t=Array.from(e.composedPath()).find(i=>i.classList?.contains(u.item));this._activeItem=c(t,this._allItems)??null},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._toggleEditingTitle=()=>{let e=!this.editingTitle;this.editingTitle=e,e?this._focusEditingFlowItem=!0:this._focusRootFlowItem=!0},this._formSubmit=e=>{e.preventDefault();let t=this._editTitleInputRef.value?.value;t?.trim()&&(this.basemapTitle=t),this._toggleEditingTitle()},this._activeItem=null,this._tooltipReferenceMap=new Map,this._layerListMap=new Map,this.openedLayerLists=new L,this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.baseFilterText="",this.baseItemCreatedFunction=this.viewModel.baseItemCreatedFunction,this.basemapTitle=this.viewModel.basemapTitle,this.closed=!1,this.collapsed=!1,this.dragEnabled=!1,this.editingTitle=!1,this.filterPlaceholder="",this.headingLevel=2,this.icon="layers",this.layerTablesEnabled=new L(["knowledge-graph"]),this.listModeDisabled=this.viewModel.listModeDisabled,this.minFilterItems=U,this.openedLayers=new L,this.referenceFilterText="",this.referenceItemCreatedFunction=this.viewModel.referenceItemCreatedFunction,this.selectedItems=new L,this.selectionMode="none",this.visibilityAppearance="default",this.hideBaseLayers=!1,this.hideCatalogLayerList=!1,this.hideHeading=!1,this.hideReferenceLayers=!1,this.hideStatusIndicators=!1,this.showCloseButton=!1,this.showCollapseButton=!1,this.showEditTitleButton=!1,this.showErrors=!1,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.showFilter=!1,this.showTemporaryLayerIndicators=!1,this.state=this.viewModel.state,this.arcgisPropertyChange=B()("state"),this.arcgisReady=y(),this.arcgisBaseFilterChange=y(),this.arcgisReferenceFilterChange=y(),this.arcgisOpenedLayersChange=y(),this.arcgisTriggerAction=x(()=>this.viewModel,"trigger-action")}static{this.properties={_activeItem:16,_catalogLayerList:16,_tableList:16,_tooltipReferenceMap:16,_layerListMap:16,openedLayerLists:16,_allItems:16,_visibleBaseItems:16,_visibleReferenceItems:16,_openedPanelItems:16,_totalBaseItems:16,_totalReferenceItems:16,_baseFilterEnabled:16,_referenceFilterEnabled:16,_renderedOpenLayerFlowItems:16,view:0,autoDestroyDisabled:5,baseFilterPredicate:0,baseFilterText:1,baseItems:32,baseItemCreatedFunction:0,basemapTitle:1,catalogLayerList:32,catalogOptions:0,closed:5,collapsed:7,dragEnabled:5,editingTitle:5,filterPlaceholder:1,headingLevel:9,icon:1,knowledgeGraphOptions:0,label:1,layerTablesEnabled:0,listItemCanGiveFunction:0,listItemCanReceiveFunction:0,listModeDisabled:5,mapImageOptions:0,minFilterItems:9,openedLayers:32,position:1,referenceElement:1,referenceFilterPredicate:0,referenceFilterText:1,referenceItems:32,referenceItemCreatedFunction:0,selectedItems:0,selectionMode:1,tableList:32,tileOptions:0,visibilityAppearance:1,hideBaseLayers:5,hideCatalogLayerList:5,hideHeading:5,hideReferenceLayers:5,hideStatusIndicators:5,showCloseButton:5,showCollapseButton:5,showEditTitleButton:5,showErrors:5,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,showFilter:5,showTemporaryLayerIndicators:5,messageOverrides:0,state:32}}static{this.styles=[K,re,J]}get _allItems(){return this.referenceItems.concat(this.baseItems)}get _visibleBaseItems(){return this.baseItems.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _visibleReferenceItems(){return this.referenceItems.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleReferenceItems.concat(this._visibleBaseItems).flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _totalBaseItems(){return this.viewModel.baseItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _totalReferenceItems(){return this.viewModel.referenceItems.flatten(e=>e.children.filter(t=>t.layer?.type!=="catalog-dynamic-group")).length}get _baseFilterEnabled(){return this._totalBaseItems>=this.minFilterItems&&this.showFilter}get _referenceFilterEnabled(){return this._totalReferenceItems>=this.minFilterItems&&this.showFilter}get _renderedOpenLayerFlowItems(){return this.openedLayers.toArray().map((e,t)=>this._renderLayerFlowItem(e,t===this.openedLayers.length-1))}get baseItems(){return this.viewModel.baseItems}get catalogLayerList(){return this._catalogLayerList}get referenceItems(){return this.viewModel.referenceItems}get tableList(){return this._tableList}async destroy(){await this.manager.destroy(),this._destroyOpenedLayerLists(),this._tooltipReferenceMap.clear()}loaded(){this.manager.onLifecycle(()=>[ae(()=>this.openedLayers,"change",()=>{this._handleOpenedLayersChange()},{initial:!0}),le(()=>[this.viewModel.referenceItems.toArray(),this.viewModel.baseItems.toArray()],()=>G(this.selectedItems),{initial:!0})])}updated(){v(this._baseListRef.value,this.baseFilterPredicate,this.baseItems),v(this._referenceListRef.value,this.referenceFilterPredicate,this.referenceItems)}triggerAction(e,t){this.viewModel.triggerAction(e,t)}async _createFlowList(e,t){let i=this._layerListMap.get(e);if(i)return i;let s=e.type==="catalog"?await this._createCatalogLayerList(e):await this._createTableList(e);return t.aborted||this._layerListMap.set(e,s),s}async _handleOpenedLayersChange(){let{_layerListMap:e,openedLayers:t,openedLayerLists:i}=this;this._openedLayersController?.abort();let s=new AbortController,{signal:a}=s;this._openedLayersController=s,e.forEach((n,h)=>{t.includes(h)||(n?.destroy?.(),e.delete(h))});let o=await Promise.all(t.map(n=>this._createFlowList(n,a)));if(a.aborted)return;i.removeAll(),i.addMany(o);let l=i.at(-1);l?"catalogLayer"in l?(this._catalogLayerList=l,this._tableList=void 0):(this._catalogLayerList=void 0,this._tableList=l):(this._catalogLayerList=void 0,this._tableList=void 0),this.arcgisOpenedLayersChange.emit()}_destroyOpenedLayerLists(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}async _createCatalogLayerList(e){let{headingLevel:t,catalogOptions:i,filterPlaceholder:s,minFilterItems:a,selectionMode:o,visibilityAppearance:l,layerTablesEnabled:n}=this;return w(r`<arcgis-catalog-layer-list-next .headingLevel=${t} .filterPlaceholder=${i?.filterPlaceholder??s} .listItemCreatedFunction=${i?.listItemCreatedFunction} .minFilterItems=${i?.minFilterItems??a} .selectionMode=${i?.selectionMode??o} .visibilityAppearance=${i?.visibilityAppearance??l} .showErrors=${i?.showErrors??this.showErrors} .showFilter=${i?.showFilter??this.showFilter} .hideStatusIndicators=${i?.hideStatusIndicators??this.hideStatusIndicators} .showTemporaryLayerIndicators=${i?.showTemporaryLayerIndicators??this.showTemporaryLayerIndicators} @arcgisReady=${h=>h.stopPropagation()} .catalogLayer=${e} .layerTablesEnabled=${n} .view=${this.view} .referenceElement=${this.referenceElement} @catalogOpen=${this._onCatalogOpen} @tablesOpen=${this._onTablesOpen}></arcgis-catalog-layer-list-next>`)}_getTableListParams(e){switch(e.type){case"knowledge-graph":return{...this.knowledgeGraphOptions,tables:e.tables};case"map-image":return{...this.mapImageOptions,tables:e.subtables};case"tile":return{...this.tileOptions,tables:e.subtables};default:return null}}async _createTableList(e){let t=this._getTableListParams(e);return w(r`<arcgis-table-list-next .headingLevel=${t?.headingLevel??this.headingLevel} .selectionMode=${t?.selectionMode??this.selectionMode} .dragEnabled=${t?.dragEnabled??this.dragEnabled} .collapsed=${t?.collapsed} .filterPlaceholder=${t?.filterPlaceholder} .filterText=${t?.filterText} .icon=${t?.icon??void 0} .label=${t?.label??void 0} .listItemCreatedFunction=${t?.listItemCreatedFunction} .tables=${t?.tables} .referenceElement=${this.referenceElement} @arcgisReady=${i=>i.stopPropagation()}></arcgis-table-list-next>`)}_handlePanelFlowItemBack(e){e.open=!1,this._focusRootFlowItem=!0}_moveLayerFromChildList({toEl:e,fromEl:t,dragEl:i,newIndex:s}){let a=c(i,this._allItems),o=e.hasAttribute("data-item")?c(e,this._allItems):null,l=t.hasAttribute("data-item")?c(t,this._allItems):null,n=X(t),h=X(e);s==null||!a||!n||!h||(this.viewModel.moveItem({targetItem:a,fromParentItem:l,toParentItem:o,newIndex:s,from:n,to:h}),j(this,a.uid,f=>f.parentElement?.closest("calcite-list")===e))}_handleCalciteListDragEnd(e){let{fromEl:t,toEl:i,dragEl:s,oldIndex:a}=e;if(t!==i){s.remove();return}a==null||!t||!s||t.insertBefore(s,t.children[a])}_onCalciteListOrderChange(e){let{_lastDragDetail:t}=this,{toEl:i,fromEl:s,dragEl:a,newIndex:o}=e,l=t?.newIndex===o&&t?.dragEl===a&&t?.toEl===i&&t?.fromEl===s;if(!s||!i||l)return;this._lastDragDetail=e,this._selectedDragItemLayerUid=a.value.layer?.uid??null;let n=s,h=i;if(n===h){let f=Array.from(s.children).filter(I=>I?.matches("calcite-list-item")).map(I=>I.value.layer?.uid??"");this._sortLayers(n,f);return}this._moveLayerFromChildList({toEl:h,fromEl:n,dragEl:a,newIndex:o})}_sortLayers(e,t){if(e===this._referenceListRef.value||e===this._baseListRef.value){let s=e===this._baseListRef.value?this.view?.map?.basemap?.baseLayers:this.view?.map?.basemap?.referenceLayers;H(s,t);return}let i=c(e,this._allItems);i&&q(i,t)}_handleCalciteListChange(e){if(this.selectionMode==="none")return;let t=e.target.selectedItems.map(i=>c(i,this._allItems)).filter(Boolean);this.selectedItems.removeAll(),this.selectedItems.addMany(t)}_focusFlowItem(e,t){return!t||!e?t:(e.setFocus(),!1)}render(){let e={[b.hidden]:this.state==="loading",[b.disabled]:this.state==="disabled"};return r`<div class=${g(P(b.widget,b.panel,e))}>${this._renderItems()}${this._renderItemTooltips()}</div>`}_renderItemTooltip(e){return e?r`<calcite-tooltip overlay-positioning=fixed .referenceElement=${this._tooltipReferenceMap.get(e.layer?.uid??"")}>${this.messages.layerIncompatibleTooltip}</calcite-tooltip>`:null}_renderItemTooltipNodes(e){if(e.incompatible)return this._renderItemTooltip(e);let t=e.children?.filter(i=>!i.hidden).toArray().map(i=>this._renderItemTooltipNodes(i));return t?.length?t:null}_renderItemTooltips(){return this._visibleReferenceItems.concat(this._visibleBaseItems).toArray().map(e=>this._renderItemTooltipNodes(e))}_renderNoLayersInfoMessage(e){return r`<div slot=message>${e}</div>`}_renderNoLayersInfo(e,t){return this.hideNoItemsNotice?null:r`<div class=${g(u.itemMessage)}>${m(t,r`<calcite-notice icon=information kind=info open width=full>${this._renderNoLayersInfoMessage(e)}</calcite-notice>`)}</div>`}_renderEditingInput(){return r`<div class=${g(u.editing)}><calcite-label>${this.messages.basemapTitle}<calcite-input .label=${this.messages.basemapTitle} name=basemaptitle .pattern=${oe} .placeholder=${this.messages.basemapTitle} required title=${this.messages.basemapTitle??_} type=text .value=${this.viewModel.basemapTitle??void 0} ${p(this._editTitleInputRef)}></calcite-input></calcite-label></div>`}_renderEditingForm(){return this.editingTitle?r`<form class=${g(u.editingForm)} @submit=${this._formSubmit}><calcite-flow-item .heading=${this.hideHeading?void 0:this.messages.basemapTitle} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length&&!this._openedPanelItems.length} @calciteFlowItemBack=${e=>{e.preventDefault(),this._toggleEditingTitle()}} ${p(this._editingFlowItemRef)}>${this._renderEditingInput()}<calcite-button appearance=outline @click=${this._toggleEditingTitle} slot=footer-actions width=full>${this.messages.cancel}</calcite-button><calcite-button slot=footer-actions type=submit width=full>${this.messages.ok}</calcite-button></calcite-flow-item></form>`:null}_renderEditTitleButton(){return this.showEditTitleButton&&!this.editingTitle?r`<calcite-action icon=pencil @click=${this._toggleEditingTitle} slot=header-actions-end .text=${this.messages.edit??""} title=${this.messages.edit??_}></calcite-action>`:null}_renderItems(){let e=[m("root-flow-item",r`<calcite-flow-item .closable=${this.showCloseButton} .closed=${this.closed} .collapsed=${this.collapsed} .collapsible=${this.showCollapseButton} .heading=${this.hideHeading?void 0:this.viewModel.basemapTitle??this.messages.componentLabel} .headingLevel=${this.headingLevel} .selected=${!this.editingTitle&&!this.openedLayers.length&&!this._openedPanelItems.length} @calciteFlowItemClose=${()=>{this.closed=!0}} ${p(this._rootFlowItemRef)}>${this._renderEditTitleButton()}${this._renderReferenceSection()}${this._renderBaseSection()}</calcite-flow-item>`),this._renderEditingForm(),this._renderPanelFlowItems(),this._renderedOpenLayerFlowItems];return this._focusRootFlowItem=this._focusFlowItem(this._rootFlowItemRef.value,this._focusRootFlowItem),this._focusEditingFlowItem=this._focusFlowItem(this._editingFlowItemRef.value,this._focusEditingFlowItem),this.closed?null:m("root-flow",r`<calcite-flow>${e}</calcite-flow>`)}_renderPanelFlowItems(){return N(this._openedPanelItems.toArray(),e=>e.uid,(e,t)=>{let{panel:i,title:s}=e,a=()=>this._handlePanelFlowItemBack(i);return this._focusPanelFlowItem=this._focusFlowItem(this._panelFlowItemRef.value,this._focusPanelFlowItem),r`<calcite-flow-item .description=${s} .heading=${i.title} .headingLevel=${this.headingLevel} .selected=${!this.openedLayers.length&&t===this._openedPanelItems.length-1} @calciteFlowItemBack=${o=>{o.preventDefault(),a()}} ${p(this._panelFlowItemRef)}><arcgis-layer-list-item-panel .item=${e} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${a} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`})}_renderLayerFlowItem(e,t){let i=e.title||this.messages.untitledLayer;return this._focusLayerFlowItem===e.uid&&(this._focusLayerFlowItem=this._focusFlowItem(this._layerFlowItemRef.value,!0)?e.uid:null),m(e.uid,r`<calcite-flow-item data-layer-uid=${e.uid??_} .description=${i} .heading=${this.messages[e.type==="catalog"?"catalogLayers":"tables"]} .headingLevel=${this.headingLevel} .selected=${t} @calciteFlowItemBack=${s=>{s.preventDefault(),this.openedLayers.pop();let a=this.openedLayers.at(-1);a?this._focusLayerFlowItem=a.uid:this._focusRootFlowItem=!0}} ${p(this._layerFlowItemRef)}>${this._layerListMap.get(e)}</calcite-flow-item>`)}_renderList(e,t,i){let s=t==="reference"?this._referenceFilterEnabled:this._baseFilterEnabled,a=t==="reference"?this.referenceFilterText:this.baseFilterText,o=(t==="reference"?this.messages.noReferenceLayers:this.messages.noBaseLayers)??this.messages.noItemsToDisplay??"";return m(`block-${t}`,r`<calcite-block class=${g(u.section)} collapsible expanded .heading=${t==="reference"?this.messages.referenceHeading:this.messages.baseHeading} .headingLevel=${this.headingLevel+1}>${e?.length?null:this._renderNoLayersInfo(o,t)}${m(`list-${t}`,r`<calcite-list @focusin=${this._setActiveItem} @focusout=${this._clearActiveItem} .canPull=${l=>this._canMove(l,"pull")} .canPut=${l=>this._canMove(l,"put")} data-basemap-layer-type=${t??_} data-layer-type=${this._rootGroupUid??_} .displayMode=${V} .dragEnabled=${this.dragEnabled} .filterEnabled=${s} .filterPlaceholder=${this.filterPlaceholder} .filterProps=${S} .filterText=${s?a:""} .group=${this._rootGroupUid} .label=${this.messages.componentLabel??""} @mouseleave=${this._clearActiveItem} @mouseover=${this._setActiveItem} selection-appearance=border .selectionMode=${this.selectionMode} @calciteListChange=${this._handleCalciteListChange} @calciteListDragEnd=${l=>this._handleCalciteListDragEnd(l.detail)} @calciteListFilter=${l=>{let n=l.currentTarget?.filterText??"";this[t==="reference"?"referenceFilterText":"baseFilterText"]=n,t==="base"?this.arcgisBaseFilterChange.emit():this.arcgisReferenceFilterChange.emit()}} @calciteListOrderChange=${l=>this._onCalciteListOrderChange(l.detail)} ${p(t==="reference"?this._referenceListRef:this._baseListRef)}>${e?.toArray().map(l=>this._renderItem(l,i))}${s&&!this.hideNoFilterResultsNotice?r`<div class=${g(u.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this._renderNoLayersInfoMessage(o)}</calcite-notice></div>`:null}</calcite-list>`)}</calcite-block>`)}_renderBaseSection(){return this.hideBaseLayers?null:this._renderList(this._visibleBaseItems,"base",this._visibleBaseItems.length===1)}_renderReferenceSection(){return this.hideReferenceLayers?null:this._renderList(this._visibleReferenceItems,"reference",!1)}_renderItem(e,t,i,s){return m(e.uid,z({activeItem:this._activeItem,canMove:this._canMove,css:u,displayMode:V,dragEnabled:this.dragEnabled&&!t,hideCatalogLayerList:this.hideCatalogLayerList,hideStatusIndicators:this.hideStatusIndicators,item:e,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,operationalItems:this._allItems,parent:i,parentTitles:s,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,setCurrentActiveItem:this._setCurrentActiveItem,clearActiveItem:this._clearActiveItem,showErrors:this.showErrors,showTemporaryLayerIndicators:this.showTemporaryLayerIndicators,visibilityAppearance:this.visibilityAppearance,handleAction:this._onTriggerAction,handleCatalogOpen:this._onCatalogOpen,handlePanelOpen:this._onPanelOpen,handleSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,handleTablesOpen:this._onTablesOpen,handleTooltipReferenceChange:this._onTooltipReferenceChange,view:this.view}))}};function X(E){let e=E.closest(`[${W}]`)?.getAttribute(W);return e==="base"||e==="reference"?e:null}A("arcgis-basemap-layer-list-next",F);return F},"layers/list/BasemapItemCollection","core/Collection","core/reactiveUtils",a,e,f,h,i,j,l,n,o)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import b from"./3NWZC6DC.js";import a from"./FHWOIM57.js";import"./VJVKFKSG.js";import{a as P}from"./2BVXNQ3U.js";import"./3AQ6NC3C.js";import"./A4X5YDA6.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{L as R,M as E,N as x,T as V,a as f,b as g,o as w}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([{property:d,subclass:L},F,S,,H,{watch:p},{rotateDimensions:I,registerPanConstraint:O},T,,{b:l},b])=>{var G=f`:host{height:100%;--arcgis-view-color-focus: none}`,z={xmin:-150,ymin:1,xmax:20,ymax:80,spatialReference:{wkid:4326}},_=1e-6;function N(i,e){if(!e)return null;let t=i.width/2,a=i.height/2,r=e.xmin+t,s=e.xmax-t,o=e.ymin+a,c=e.ymax-a;return r>=s||o>=c?null:new S({xmin:r,xmax:s,ymin:o,ymax:c,spatialReference:i.spatialReference})}var $=Object.defineProperty,k=Object.getOwnPropertyDescriptor,h=(i,e,t,a)=>{for(var r=a>1?void 0:a?k(e,t):e,s=i.length-1,o;s>=0;s--)(o=i[s])&&(r=(a?o(e,t,r):o(r))||r);return a&&r&&$(e,t,r),r},n=class extends F{constructor(i){super(i),this.autoplay=!1,this.loop=!1,this.type="image",this.autoLoad=!1}static isNonPanoramicMedia(i){return!!i&&typeof i=="object"&&"declaredClass"in i&&typeof i.declaredClass=="string"&&i.declaredClass==="components.oriented-imagery-viewer.support.NonPanoramicMedia"}destroy(){this._cache?.destroy(),this._cache=void 0,this._videoElement=void 0}get layer(){return this._cache}get videoElement(){return this._videoElement}get size(){if(!this._cache||this._cache.destroyed||this._cache.loadError)return;let{type:i}=this._cache;if(i==="imagery-tile"){let{serviceRasterInfo:e}=this._cache;return e?[e.width,e.height]:void 0}if(i==="media"){let e=this._videoElement??this._getVideoElementFromLayer(this._cache);return!e||e.videoWidth<=0||e.videoHeight<=0?void 0:[e.videoWidth,e.videoHeight]}}async load(i){return this.type==="video"?await this._loadVideo(i):await this._loadImage(i)}async _loadVideo(i){if(this._cache&&!this._cache.destroyed&&this._cache.type==="media")return await this._cache.load(i),this._videoElement=this._getVideoElementFromLayer(this._cache)??this._videoElement,this._applyVideoPlaybackOptions(),{layer:this._cache,size:this.size};let{title:e,url:t}=this;if(!t)throw new Error("URL is required to load NonPanoramicMedia.");let a=(await $arcgis.t(m=>m[0],"geometry/Extent")).default,r=(await $arcgis.t(m=>m[0],"layers/support/ExtentAndRotationGeoreference")).default,s=(await $arcgis.t(m=>m[0],"layers/support/VideoElement")).default,o=(await $arcgis.t(m=>m[0],"layers/MediaLayer")).default;l(i);let c=new s({video:t,georeference:new r({extent:new a(z)})});await c.load(i),l(i),this._videoElement=c.content??void 0,this._applyVideoPlaybackOptions();let m=new o({source:c,title:e});return await m.load(i),l(i),this._cache=m,{layer:this._cache,size:this.size}}_getVideoElementFromLayer(i){let e=i.source;if(!e||!("content"in e))return;let{content:t}=e;if(t instanceof HTMLVideoElement)return t}_applyVideoPlaybackOptions(){let i=this._videoElement;i&&(i.autoplay=this.autoplay,i.loop=this.loop,this.autoplay||i.pause())}async _loadImage(i){if(this._cache&&!this._cache.destroyed&&this._cache.type==="imagery-tile")return await this._cache.load(i),this._videoElement=void 0,{layer:this._cache,size:this.size};let{url:e,customParameters:t}=this,a=this.datasetFormat;if(!e)throw new Error("URL is required to load NonPanoramicMedia.");if(!a){let o=await import("./DBA7NSTP.js").then(m=>m.default);if(l(i),a=o.guessExtensionFromURI(e),!a){try{a=await o.getDatasetFormat(e)}catch{w("warn",this,"Failed to determine dataset format from URL or response headers."),a="UNKNOWN FORMAT"}l(i)}}this.datasetFormat=a;let r=(await $arcgis.t(m=>m[0],"layers/ImageryTileLayer")).default;l(i);let s=new r({url:e,ioConfig:{skipExtensions:["aux.xml","jgw"],skipMapInfo:!0,datasetFormat:a},customParameters:t??void 0});return await s.load(i),l(i),this._videoElement=void 0,this._cache=s,{layer:this._cache,size:this.size}}};h([d()],n.prototype,"_cache",2);h([d()],n.prototype,"_videoElement",2);h([d()],n.prototype,"autoplay",2);h([d()],n.prototype,"loop",2);h([d()],n.prototype,"title",2);h([d()],n.prototype,"type",2);h([d()],n.prototype,"layer",1);h([d()],n.prototype,"videoElement",1);h([d()],n.prototype,"size",1);h([d()],n.prototype,"autoLoad",2);h([d()],n.prototype,"customParameters",2);h([d()],n.prototype,"datasetFormat",2);h([d()],n.prototype,"url",2);n=h([L("components.oriented-imagery-viewer.support.NonPanoramicMedia")],n);function W(i,e,t,a,r){let{width:s,height:o}=I(i,e,r);return Math.max(s/t,o/a)}var A=96,U=39.37,M=U*A;function C(i){let e=M*.25,t=M*i,a=[],r=t;for(;r>e;)a.push(r),r*=.5;a.push(e);let{lods:s}=T.create({scales:a});return{minScale:t,lods:s}}var y=class extends x{constructor(){super(...arguments),this._messages=P(),this.#t=new b(this),this._imageChanged=!1,this._internalMap=R(),this._loading=!1,this.hideHeader=!1,this.hideLoader=!1,this.hideZoomControls=!1,this.hideVideoControls=!1,this.rotation=0}static{this.properties={_imageChanged:16,_internalMap:16,_layer:16,_videoTargetExtent:16,_videoRef:16,_loading:16,_media:16,hideHeader:5,hideLoader:5,hideZoomControls:5,hideVideoControls:5,messageOverrides:0,media:0,rotation:9}}static{this.styles=[G]}#t;#i;#a;#e;#s;#r;get imageRenderer(){return this._internalMap?.value?.view}get map(){return this.imageRenderer?.map}get media(){return this._media}set media(e){if(!e){this.#i?.abort(),this._media=void 0,this._clearMedia();return}this._media=e instanceof n?e:new n(e)}addGraphic(e){this.#t.addGraphic(e)}addGraphics(e){this.#t.addGraphics(e)}clearGraphics(){this.#t.clearGraphics()}async mediaOnLoad(){return this.#a&&await this.#a,this._media}removeGraphic(e){this.#t.removeGraphic(e)}removeGraphics(e){this.#t.removeGraphics(e)}loaded(){this.manager.onLifecycle(()=>[this._createResizeConstraint(),this._createRotationHandler(),this._createPanConstraint(),this._createVideoInteractionWatcher(),{remove:()=>{this._removeVideoPanHandles()}},p(()=>this._media,e=>{this.#i?.abort(),e&&(this.#i=new AbortController,this.#a=this._loadMediaInternal(e,this.#i),this.#a.catch(()=>{}))},{initial:!0,sync:!0})])}_createPanConstraint(){return p(()=>({layer:this._layer,imageRenderer:this.imageRenderer}),({layer:e,imageRenderer:t})=>{this._media?.type!=="video"&&(e?.type!=="imagery-tile"||!t?.ready||O(t,e))},{sync:!0,initial:!0})}_createResizeConstraint(){return p(()=>{if(!this.imageRenderer?.ready||!this._layer)return;if(this._layer.type==="imagery-tile"){let{width:t,height:a}=this._layer.serviceRasterInfo,{width:r,height:s,rotation:o}=this.imageRenderer;return W(t,a,r,s,o)}let e=this._videoTargetExtent;if(!(!e||this.imageRenderer.width<=0||this.imageRenderer.height<=0))return Math.max(e.width/this.imageRenderer.width,e.height/this.imageRenderer.height)},e=>{if(!e||!this.imageRenderer)return;if(this._media?.type==="video"){this._updateVideoScaleForResize(e);return}let{constraints:t,scale:a}=this.imageRenderer,r=t.minScale,{lods:s,minScale:o}=C(e);t.set({minScale:o,lods:s}),this.imageRenderer.scale=this._imageChanged||Math.abs(a-r)<=1e-6?o:a,this._imageChanged=!1},{sync:!0,initial:!0})}_createVideoInteractionWatcher(){return p(()=>[this.imageRenderer?.interacting,this.imageRenderer?.navigating,this.imageRenderer?.scale],()=>{this._media?.type==="video"&&this._updateVideoInteraction()},{initial:!0})}_createRotationHandler(){return p(()=>this.rotation,e=>{this._media?.type!=="video"&&this.imageRenderer&&(this.imageRenderer.constraints.rotationEnabled=!0,this.imageRenderer.rotation=e,this.imageRenderer.constraints.rotationEnabled=!1)},{sync:!0,initial:!0})}_clearMedia(){this._removeVideoPanHandles(),this._restoreConstraints(),this.#e=void 0,this._videoTargetExtent=void 0,this._videoRef?.pause(),this._videoRef=void 0,this._layer&&this.map?.layers.includes(this._layer)&&this.map.layers.remove(this._layer),this._layer?.destroy(),this._layer=void 0}async _loadMediaInternal(e,t){if(this._loading=!0,this._clearMedia(),!e)throw new Error("No media provided");let{layer:a}=await e.load(t).finally(()=>{this._loading=!1});l(t),this._imageChanged=!0,this._layer=a,this.imageRenderer?.map?.layers.add(this._layer),e.type==="video"&&await this._loadVideoMedia(e)}async _loadVideoMedia(e){let t=this.imageRenderer,a=new S(z),r=e.videoElement;this._videoRef=r instanceof HTMLVideoElement?r:void 0,t&&(await t.when(),this._snapshotConstraints(),t.constraints.set({rotationEnabled:!1}),await t.goTo(a.clone(),{animate:!1}),this._videoTargetExtent=t.extent?.clone(),this.#e=t.extent?.clone(),this._videoTargetExtent&&t.width>0&&t.height>0&&this._updateVideoScaleForResize(Math.max(this._videoTargetExtent.width/t.width,this._videoTargetExtent.height/t.height))),this._updateVideoInteraction()}_snapshotConstraints(){let e=this.imageRenderer?.constraints;!e||this.#r||(this.#r={geometry:e.geometry?.clone()??null,lods:e.lods,maxScale:e.maxScale,minScale:e.minScale,rotationEnabled:e.rotationEnabled})}_restoreConstraints(){let e=this.imageRenderer?.constraints,t=this.#r;!e||!t||(e.set({geometry:t.geometry,lods:t.lods,maxScale:t.maxScale,minScale:t.minScale,rotationEnabled:t.rotationEnabled}),this.#r=void 0)}_disablePan(){let e=this.imageRenderer;if(this._removeVideoPanHandles(),!e)return;let t=e.on("drag",r=>r.stopPropagation()),a=e.on("key-down",r=>{r.key.startsWith("Arrow")&&r.stopPropagation()});this.#s=[t,a]}_enablePan(){this._removeVideoPanHandles()}_removeVideoPanHandles(){this.#s?.forEach(e=>e.remove()),this.#s=void 0}_updateVideoInteraction(){let e=this.imageRenderer,t=e?.extent;if(!e||!t||this._layer?.type!=="media")return;this.#e??=t.clone();let{minScale:a}=e.constraints;if(!a)return;let r=e.scale<a-_,s=N(t,this._videoTargetExtent);if(r&&s){this._enablePan(),e.constraints.geometry=s;return}if(r){this._disablePan(),e.constraints.geometry=null;return}this.#e&&!t.equals(this.#e)&&(e.extent=this.#e.clone()),this._disablePan(),e.constraints.geometry=null}_updateVideoScaleForResize(e){if(!this.imageRenderer)return;let{constraints:t,scale:a}=this.imageRenderer,r=t.minScale,s=r!=null&&Math.abs(a-r)<=_,{lods:o,minScale:c}=C(e);t.set({lods:o,minScale:c,rotationEnabled:!1}),this.imageRenderer.scale=this._imageChanged||s?c:a,this._imageChanged=!1,s&&requestAnimationFrame(()=>{let{extent:m,scale:u,constraints:v}=this.imageRenderer??{};m&&u&&v?.minScale!=null&&Math.abs(u-v.minScale)<=_&&(this.#e=m.clone())})}render(){return g`<calcite-panel .loading=${this.hideLoader?void 0:this._loading} .heading=${this.hideHeader?void 0:this._messages.title}><arcgis-map hide-attribution .spatialReference=${H.WebMercator} ${E(this._internalMap)}><arcgis-zoom .hidden=${this.hideZoomControls} .messageOverrides=${this.messageOverrides} slot=top-left></arcgis-zoom></arcgis-map>${this.hideVideoControls||this._media?.type!=="video"||!this._videoRef?void 0:g`<arcgis-oriented-imagery-viewer-video-controls .videoRef=${this._videoRef}></arcgis-oriented-imagery-viewer-video-controls>`}</calcite-panel>`}};V("arcgis-oriented-imagery-viewer-non-panoramic-viewer",y);return y},"core/accessorSupport/decorators","core/Accessor","geometry/Extent","views/MapView","geometry/SpatialReference","core/reactiveUtils","applications/Components/OrientedImageryViewer/ImageViewer/utils","layers/support/TileInfo","Graphic",a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as d}from"./
|
|
2
|
+
import{a as d}from"./2BVXNQ3U.js";import"./3AQ6NC3C.js";import"./A4X5YDA6.js";import"./QUZTFUWM.js";import"./4W3T75SY.js";import{L as l,M as c,N as n,T as h,a,b as o,o as r}from"./WXLC6FPD.js";import"./H6RQVSYM.js";export default $arcgis.t(([{on:t,when:p}])=>{function u(i,e,m){return i?e(i):m?.(i)}var f=a`:host{position:absolute;align-self:center;inset-block-end:0;background-color:color-mix(in srgb,var(--calcite-color-surface-1) 80%,transparent);inline-size:80%}calcite-label{padding:0 .5rem;--calcite-label-margin-bottom: 0}calcite-slider{inline-size:100%}`,s=class extends n{constructor(){super(...arguments),this.handlePlayPause=()=>{this._playing?this.pause():this.play()},this.handleSeek=()=>{let e=this.#e.value?.value;typeof e!="number"||e<0||e>this._duration||this.seek(e)},this.play=async()=>{try{await this.videoRef?.play()}catch(e){r("error",this,"Error playing video",{detail:{error:{message:e.message}}})}},this.pause=()=>this.videoRef?.pause(),this.rewind=async()=>await this.seek(0),this.seek=e=>(this.pause(),this.videoRef&&(this.videoRef.currentTime=e),this.play()),this.toggleMute=()=>{this.videoRef&&(this.videoRef.muted=!this.videoRef.muted,this._audio=!this.videoRef.muted)},this.#e=l(),this._messages=d(),this._audio=!1,this._playing=!1,this._currentTime=0,this._duration=0,this.messageOverrides=this._messages._overrides}static{this.properties={_audio:16,_playing:16,_currentTime:16,_duration:16,_videoReady:16,messageOverrides:0,videoRef:0}}static{this.styles=f}#e;get _videoReady(){return this.videoRef?.readyState!==void 0&&this.videoRef.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA}loaded(){this.manager.onLifecycle(()=>[t(()=>this.videoRef,"play",()=>{this._playing=!0}),t(()=>this.videoRef,"pause",()=>{this._playing=!1}),p(()=>this._videoReady,()=>{this.videoRef&&(this._duration=this.videoRef.duration,this._audio=!this.videoRef.muted,this._playing=!this.videoRef.paused)},{initial:!0,sync:!0}),t(()=>this.videoRef,"timeupdate",()=>{this.videoRef&&(this._currentTime=this.videoRef.currentTime)})])}render(){return u(()=>this._videoReady,()=>o`<calcite-label scale=s layout=inline-space-between><calcite-action-group layout=horizontal scale=s><calcite-action scale=m @click=${this.handlePlayPause} .text=${this._playing?this._messages.pause:this._messages.play} .icon=${this._playing?"pause-f":"play-f"}></calcite-action><calcite-action scale=m icon=reset .text=${this._messages.rewind} @click=${this.rewind}></calcite-action><calcite-action scale=m .text=${this._audio?this._messages.mute:this._messages.unmute} .icon=${this._audio?"sound":"sound-off"} @click=${this.toggleMute}></calcite-action></calcite-action-group><calcite-slider scale=s .value=${Number(this._currentTime.toFixed(2))??0} label-handles label-ticks .max=${this._duration} .ticks=${this._duration} step=0.001 @calciteSliderChange=${this.handleSeek} @calciteSliderInput=${this.pause} ${c(this.#e)}></calcite-slider></calcite-label>`)}};h("arcgis-oriented-imagery-viewer-video-controls",s);return s},"core/reactiveUtils")
|