@arcgis/core 4.34.0-next.86 → 4.34.0-next.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Basemap.js +1 -1
- package/Ground.js +1 -1
- package/Map.js +1 -1
- package/analysis/ElevationProfile/ElevationProfileLineGround.d.ts +4 -0
- package/analysis/ElevationProfile/{ElevationProfileGroundLine.js → ElevationProfileLineGround.js} +1 -1
- package/analysis/ElevationProfile/ElevationProfileLineInput.d.ts +4 -0
- package/analysis/ElevationProfile/{ElevationProfileInputLine.js → ElevationProfileLineInput.js} +1 -1
- package/analysis/ElevationProfile/ElevationProfileLineQuery.d.ts +4 -0
- package/analysis/ElevationProfile/{ElevationProfileQueryLine.js → ElevationProfileLineQuery.js} +1 -1
- package/analysis/ElevationProfile/ElevationProfileLineScene.d.ts +4 -0
- package/analysis/ElevationProfile/{ElevationProfileSceneLine.js → ElevationProfileLineScene.js} +1 -1
- package/analysis/ElevationProfile/elevationProfileLineTypes.js +1 -1
- package/analysis/ElevationProfileAnalysis.js +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.ar.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.bg.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.bs.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.ca.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.cs.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.da.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.de.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.el.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.es.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.et.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.fi.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.fr.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.he.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.hr.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.hu.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.id.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.it.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.ja.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.ko.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.lt.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.lv.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.nl.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.no.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.pl.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.pt-BR.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.pt-PT.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.ro.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.ru.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.sk.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.sl.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.sr.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.sv.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.th.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.tr.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.uk.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.vi.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.zh-CN.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.zh-HK.json +1 -1
- package/assets/components/assets/accordion-item/t9n/messages.zh-TW.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.ar.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.bg.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.bs.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.ca.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.cs.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.da.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.de.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.el.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.es.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.et.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.fi.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.fr.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.he.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.hr.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.hu.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.id.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.it.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.ja.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.ko.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.lt.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.lv.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.nl.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.no.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.pl.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.pt-BR.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.pt-PT.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.ro.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.ru.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.sk.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.sl.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.sr.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.sv.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.th.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.tr.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.uk.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.vi.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.zh-CN.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.zh-HK.json +1 -1
- package/assets/components/assets/action-bar/t9n/messages.zh-TW.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.ar.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.bg.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.bs.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.ca.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.cs.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.da.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.de.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.el.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.es.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.et.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.fi.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.fr.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.he.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.hr.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.hu.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.id.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.it.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.ja.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.ko.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.lt.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.lv.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.nl.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.no.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.pl.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.pt-BR.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.pt-PT.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.ro.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.ru.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.sk.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.sl.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.sr.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.sv.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.th.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.tr.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.uk.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.vi.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.zh-CN.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.zh-HK.json +1 -1
- package/assets/components/assets/action-pad/t9n/messages.zh-TW.json +1 -1
- package/assets/components/assets/icon/layer3D16.json +1 -0
- package/assets/components/assets/icon/layer3D24.json +1 -0
- package/assets/components/assets/icon/layer3D32.json +1 -0
- package/assets/components/assets/sort-handle/t9n/messages.ar.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.bg.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.bs.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.ca.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.cs.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.da.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.de.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.el.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.es.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.et.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.fi.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.fr.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.he.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.hr.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.hu.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.id.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.it.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.ja.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.ko.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.lt.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.lv.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.nl.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.no.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.pl.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.pt-BR.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.pt-PT.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.ro.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.ru.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.sk.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.sl.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.sr.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.sv.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.th.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.tr.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.uk.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.vi.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.zh-CN.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.zh-HK.json +1 -1
- package/assets/components/assets/sort-handle/t9n/messages.zh-TW.json +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0074f1836d7ff69ff6ec.js +1 -0
- package/assets/esri/core/workers/chunks/{c6d4b8d683a34fc0d111.js → 0103b70126bc5dffc55e.js} +1 -1
- package/assets/esri/core/workers/chunks/03ef19f0753d68770444.js +1 -0
- package/assets/esri/core/workers/chunks/{4a06ab00d095f63598b5.js → 09c2004126f4a5242b85.js} +1 -1
- package/assets/esri/core/workers/chunks/0f05425954578ac796ec.js +1 -0
- package/assets/esri/core/workers/chunks/109149c378aa4c5f8526.js +1 -0
- package/assets/esri/core/workers/chunks/{8307f635a5c0c4a95825.js → 143503f6eb270c4683f8.js} +1 -1
- package/assets/esri/core/workers/chunks/{6c36cef0b58b87a1f17f.js → 177840d5f0076c0de46b.js} +4 -4
- package/assets/esri/core/workers/chunks/1c1b0cc91fe9cb3fec61.js +1 -0
- package/assets/esri/core/workers/chunks/1fc6311d4f0d27e88737.js +1 -0
- package/assets/esri/core/workers/chunks/24921d31efa8d222ad2d.js +2 -0
- package/assets/esri/core/workers/chunks/{268f5b233640a9dbbf89.js.LICENSE.txt → 24921d31efa8d222ad2d.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/257fd65786feb5951b90.js +1 -0
- package/assets/esri/core/workers/chunks/2dc88379ee94fabdaf52.js +1 -0
- package/assets/esri/core/workers/chunks/366db86914a63e6d0c68.js +1 -0
- package/assets/esri/core/workers/chunks/3a457e718a901a45902e.js +2 -0
- package/assets/esri/core/workers/chunks/{47e4f66c33bb697fbe6b.js.LICENSE.txt → 3a457e718a901a45902e.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/46ef545d2b3b3f4e6d32.js +2 -0
- package/assets/esri/core/workers/chunks/{336b54144afec0c7d396.js.LICENSE.txt → 46ef545d2b3b3f4e6d32.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/481c2b01e2fe92249698.js +1 -0
- package/assets/esri/core/workers/chunks/4e77b9cc1d9437bcbb0c.js +1 -0
- package/assets/esri/core/workers/chunks/5f0a50ebd2a08b9b9de2.js +1 -0
- package/assets/esri/core/workers/chunks/639d856cd217914dfe1f.js +1 -0
- package/assets/esri/core/workers/chunks/67d9cfe02613cb73ee37.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/7540b34e743a23e67729.js +1 -0
- package/assets/esri/core/workers/chunks/773d106f60f7dad1493d.js +1 -0
- package/assets/esri/core/workers/chunks/7be11a3ef1f49245089f.js +1 -0
- package/assets/esri/core/workers/chunks/819a8bc1f0a694017ee6.js +1 -0
- package/assets/esri/core/workers/chunks/{1537b02e674f8ef77f4a.js → 8d63b42aea32ce2e5d09.js} +1 -1
- package/assets/esri/core/workers/chunks/8de11aab65d91e7f1a4d.js +1 -0
- package/assets/esri/core/workers/chunks/9386a0ebff78b6303ed2.js +1 -0
- package/assets/esri/core/workers/chunks/{4d47187bc0821413492d.js → 95bae3c275f1483eb7ed.js} +1 -1
- package/assets/esri/core/workers/chunks/9ca55d33ae4bf25e8edd.js +1 -0
- package/assets/esri/core/workers/chunks/{47e4f66c33bb697fbe6b.js → a8f998b8ec8c56150479.js} +2 -2
- package/assets/esri/core/workers/chunks/{f6e18668f728dfd8ba5e.js.LICENSE.txt → a8f998b8ec8c56150479.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/a9e133166e9200fe135e.js +1 -0
- package/assets/esri/core/workers/chunks/aa78b69219d9a0ef1c54.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/acb1c5dd987c801d7b31.js +1 -0
- package/assets/esri/core/workers/chunks/b09b34f64a6bc2b49e0a.js +1 -0
- package/assets/esri/core/workers/chunks/b0a03b6edbcf6e933431.js +1 -0
- package/assets/esri/core/workers/chunks/b8997ae5893afa0298d1.js +1 -0
- package/assets/esri/core/workers/chunks/c0ae186620b68d43b338.js +1 -0
- package/assets/esri/core/workers/chunks/c1d75c48558ed23c5b2b.js +1 -0
- package/assets/esri/core/workers/chunks/{9d7a22746dae1451deaf.js → c6cae8471c5d4ae40c65.js} +1 -1
- package/assets/esri/core/workers/chunks/{c50e8d5f554cf151865c.js → ce16489cf7eb0d78c741.js} +2 -2
- package/assets/esri/core/workers/chunks/{c50e8d5f554cf151865c.js.LICENSE.txt → ce16489cf7eb0d78c741.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/d6e0528eacee7ea4c1ce.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/db5a985ccc6b7d0ad855.js +1 -0
- package/assets/esri/core/workers/chunks/f3ee035fa7bf638c8e60.js +1 -0
- package/assets/esri/core/workers/chunks/f651c05604eab83aef5f.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/fc5ac54aab66562c8463.js +1 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis.json +1 -0
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/VolumeMeasurementAnalysis_en.json +1 -0
- package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_no.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
- package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
- package/config.js +1 -1
- package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
- package/identity/IdentityManagerBase.js +1 -1
- package/interfaces.d.ts +199 -149
- package/kernel.js +1 -1
- package/layers/GaussianSplatLayer.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/VectorTileLayer.js +1 -1
- package/layers/graphics/sources/ParquetSource.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/support/BuildingFieldStatistics.js +5 -0
- package/layers/support/BuildingSummaryStatistics.js +1 -1
- package/layers/support/ControlPoint.js +5 -0
- package/layers/support/ControlPointsGeoreference.js +1 -1
- package/layers/support/FieldConfiguration.js +1 -1
- package/layers/support/VideoFrame.js +1 -1
- package/layers/support/fieldConfigUtils.js +1 -1
- package/layers/support/mediaUtils.js +1 -1
- package/layers/support/vectorTileLayerLoader.js +1 -1
- package/package.json +3 -3
- package/portal/schemas/definitions.js +1 -1
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/rest/support/imageMeasureUtils.js +1 -1
- package/support/basemapEnsureType.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
- package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsDiffShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsMinMaxSumShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsStdDevShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/TextureStatisticsSumOfSquaredDiffShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterColorizerStretchShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/math.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/stretch.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/utils.js +1 -1
- package/views/2d/layers/BaseLayerView2D.js +1 -1
- package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/featureServiceUtils.js +1 -1
- package/views/2d/layers/features/schema/SourceSchema.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
- package/views/2d/layers/features/sources/strategies/AFeatureLoadStrategy.js +5 -0
- package/views/2d/layers/features/sources/strategies/AFeatureTileLoadStrategy.js +5 -0
- package/views/2d/layers/features/sources/strategies/ALoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/FeatureDrillDownTileLoadStrategy.js +5 -0
- package/views/2d/layers/features/sources/strategies/FeaturePagedTileLoadStrategy.js +5 -0
- package/views/2d/layers/features/sources/strategies/FeatureSnapshotLoadStrategy.js +5 -0
- package/views/2d/layers/features/sources/strategies/ParquetSnapshotLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/StreamLoadStrategy.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/FeatureSnapshotSourceChunk.js +1 -1
- package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
- package/views/2d/layers/features/sources/strategies/support/queryAdapters.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderParquet.js +1 -1
- package/views/3d/GroundView3D.js +5 -0
- package/views/3d/analysis/ElevationProfile/{ElevationProfileSceneLineComputation.js → ElevationProfileLineSceneComputation.js} +1 -1
- package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementConfiguration.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/interactive/SnappingVisualizer3D.js +1 -1
- package/views/3d/interactive/visualElements/DrapedVisualElementResources.js +1 -1
- package/views/3d/interactive/visualElements/LabelVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/layers/DrapedSubView3D.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/MediaLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
- package/views/3d/layers/support/MediaLayerInteractionOptions.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/support/MemoryController.js +1 -1
- package/views/3d/support/QualitySettings.js +1 -1
- package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
- package/views/3d/support/popupHitTest.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileChart.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileHoveredPointsVisualization.js +1 -1
- package/views/analysis/ElevationProfile/{ElevationProfileGroundLineComputation.js → ElevationProfileLineGroundComputation.js} +1 -1
- package/views/analysis/ElevationProfile/{ElevationProfileInputLineComputation.js → ElevationProfileLineInputComputation.js} +1 -1
- package/views/analysis/ElevationProfile/{ElevationProfileQueryLineComputation.js → ElevationProfileLineQueryComputation.js} +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
- package/views/draw/input/DrawEvents.js +1 -1
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/widgets/Editor/AddAssociationWorkflowData.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/SplitFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflowData.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflowData.js +1 -1
- package/widgets/Editor/Upload.js +1 -1
- package/widgets/Editor/components/FeatureList.js +1 -1
- package/widgets/Editor/components/Notices.js +1 -1
- package/widgets/Editor/modelUploadUtils.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileLineGround.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineInput.d.ts +2 -2
- package/widgets/ElevationProfile/ElevationProfileLineQuery.d.ts +2 -2
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/FeatureTable/support/templateUtils.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/PanoramicVideoViewer.js +5 -0
- package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +5 -0
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/analysis/ElevationProfile/ElevationProfileGroundLine.d.ts +0 -4
- package/analysis/ElevationProfile/ElevationProfileInputLine.d.ts +0 -4
- package/analysis/ElevationProfile/ElevationProfileQueryLine.d.ts +0 -4
- package/analysis/ElevationProfile/ElevationProfileSceneLine.d.ts +0 -4
- package/assets/esri/core/workers/chunks/03e5d1a00d85e4d16bff.js +0 -1
- package/assets/esri/core/workers/chunks/0914a52fb33af5d77fab.js +0 -1
- package/assets/esri/core/workers/chunks/0dd6b8b3e634bb5f0ca7.js +0 -1
- package/assets/esri/core/workers/chunks/1d491447b13f2f2b4399.js +0 -1
- package/assets/esri/core/workers/chunks/20850b0fdb55fb17bc90.js +0 -1
- package/assets/esri/core/workers/chunks/268f5b233640a9dbbf89.js +0 -2
- package/assets/esri/core/workers/chunks/336b54144afec0c7d396.js +0 -2
- package/assets/esri/core/workers/chunks/42bc1e981624ce9844a4.js +0 -1
- package/assets/esri/core/workers/chunks/436bbe99bedd7b331edb.js +0 -1
- package/assets/esri/core/workers/chunks/4840bd93d8fe15c7aefd.js +0 -1
- package/assets/esri/core/workers/chunks/486ea51306c619238e41.js +0 -1
- package/assets/esri/core/workers/chunks/49cb78c85de0102e5f02.js +0 -1
- package/assets/esri/core/workers/chunks/5610dfde4e636e2333a9.js +0 -1
- package/assets/esri/core/workers/chunks/655a878ddea4907d830e.js +0 -1
- package/assets/esri/core/workers/chunks/72fe4f1f789abb5b4035.js +0 -1
- package/assets/esri/core/workers/chunks/7402c2853f6aed8d1bc7.js +0 -1
- package/assets/esri/core/workers/chunks/79a9f47dfa9ebabb5dbd.js +0 -1
- package/assets/esri/core/workers/chunks/804e3b3df375177e6c86.js +0 -1
- package/assets/esri/core/workers/chunks/86378d4f4d7f9a370c22.js +0 -1
- package/assets/esri/core/workers/chunks/a2652d10bb0bc41c9a8d.js +0 -1
- package/assets/esri/core/workers/chunks/b19d723d09f5bea9ca27.js +0 -1
- package/assets/esri/core/workers/chunks/b78ea9cc4d5f2fd3d871.js +0 -1
- package/assets/esri/core/workers/chunks/bd4125d163f372a7e978.js +0 -1
- package/assets/esri/core/workers/chunks/d0a149050f7f1c1ada09.js +0 -1
- package/assets/esri/core/workers/chunks/d142a42755a78bb157ed.js +0 -1
- package/assets/esri/core/workers/chunks/da42cc4f6142846cb745.js +0 -1
- package/assets/esri/core/workers/chunks/dd84f630466a26722d57.js +0 -1
- package/assets/esri/core/workers/chunks/e17df11c98dbd869302b.js +0 -1
- package/assets/esri/core/workers/chunks/e1b3ae6426886e2fab07.js +0 -1
- package/assets/esri/core/workers/chunks/f35003a90163847fe1e2.js +0 -1
- package/assets/esri/core/workers/chunks/f6513ec888a7d927d948.js +0 -1
- package/assets/esri/core/workers/chunks/f6e18668f728dfd8ba5e.js +0 -2
- package/views/2d/layers/features/sources/strategies/AFetchLoadStrategy.js +0 -5
- package/views/2d/layers/features/sources/strategies/ATileLoadStrategy.js +0 -5
- package/views/2d/layers/features/sources/strategies/DrillDownTileLoadStrategy.js +0 -5
- package/views/2d/layers/features/sources/strategies/PagedTileLoadStrategy.js +0 -5
- package/views/2d/layers/features/sources/strategies/SnapshotLoadStrategy.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{isSome as i}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import r from"../../../../core/Error.js";import s from"../../../../core/Logger.js";import{findInMap as a}from"../../../../core/MapUtils.js";import{abortMaybe as n,removeMaybe as o,destroyMaybe as l}from"../../../../core/maybe.js";import{MinPriority as h}from"../../../../core/MemCache.js";import d from"../../../../core/PooledArray.js";import{throwIfAborted as p,ignoreAbortErrors as c,createResolver as y,isAbortError as u}from"../../../../core/promiseUtils.js";import g from"../../../../core/Queue.js";import{when as m,watch as b,on as _,syncAndInitial as f,whenOnce as v}from"../../../../core/reactiveUtils.js";import{schedule as C}from"../../../../core/scheduling.js";import{property as S}from"../../../../core/accessorSupport/decorators/property.js";import{subclass as G}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as w,isEmpty as x}from"../../../../core/accessorSupport/diffUtils.js";import{i as P,f as R,g as U}from"../../../../chunks/vec32.js";import{create as D}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import I from"../../../../geometry/Extent.js";import E from"../../../../geometry/Point.js";import{canProjectWithoutEngine as L}from"../../../../geometry/projectionUtils.js";import{projectBuffer as j}from"../../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as V}from"../../../../geometry/projection/projectVectorToVector.js";import{projectXYZToVector as A}from"../../../../geometry/projection/projectXYZToVector.js";import{center as O,create as F,fromRect as T,equals as M}from"../../../../geometry/support/aaBoundingBox.js";import{create as k}from"../../../../geometry/support/aaBoundingRect.js";import{equals as z}from"../../../../geometry/support/spatialReferenceUtils.js";import{isPopupProvider as W}from"../../../../graphic/getPopupProvider.js";import H from"../../../../layers/Layer.js";import{getObjectId as B,computeAABB as q,hasGeometry as Q}from"../../../../layers/graphics/dehydratedFeatures.js";import{hydrateGraphic as N}from"../../../../layers/graphics/hydratedFeatures.js";import $ from"../../../../renderers/UniqueValueRenderer.js";import{isSupportedRenderer3D as Z,validateTo3D as Y}from"../../../../renderers/support/rendererConversion.js";import{RenderingInfo as X}from"../../../../renderers/support/RenderingInfo.js";import{isBasemapLayerView as J}from"../../../../support/basemapUtils.js";import{loadArcade as K}from"../../../../support/loadArcade.js";import ee from"../../../../symbols/LabelSymbol3D.js";import te from"../../../../symbols/TextSymbol.js";import ie from"../../../../symbols/WebStyleSymbol.js";import{getDefaultSymbol3D as re}from"../../../../symbols/support/defaults3D.js";import{to3D as se}from"../../../../symbols/support/symbolConversion.js";import{averageSymbolComplexities as ae,defaultSymbolComplexity as ne}from"./defaultSymbolComplexity.js";import{DisplayFeatureLimit as oe}from"./DisplayFeatureLimit.js";import{ViewElevationProvider as le}from"./ElevationQuery.js";import{extractExpressionInfo as he,createContext as de}from"./featureExpressionInfoUtils.js";import{Graphics3DFeatureStore as pe}from"./Graphics3DFeatureStore.js";import{Graphics3DGraphicCreationContext as ce}from"./Graphics3DGraphicCreationContext.js";import{Graphics3DSymbolCreationContext as ye}from"./Graphics3DSymbolCreationContext.js";import{make as ue}from"./Graphics3DSymbolFactory.js";import{Graphics3DWebStyleSymbol as ge}from"./Graphics3DWebStyleSymbol.js";import{GraphicsCorePerformanceInfo as me}from"./GraphicsCorePerformanceInfo.js";import{GraphicStateTracking as be}from"./GraphicStateTracking.js";import{computeCentroid as _e}from"./graphicUtils.js";import{placePointOnGeometry as fe}from"./pointUtils.js";import{SpatialIndex2D as ve}from"./SpatialIndex2D.js";import{StageLayerElevationProvider as Ce}from"../support/StageLayerElevationProvider.js";import{toBoundingRect as Se}from"../../support/extentUtils.js";import{GridLocalOriginFactory as Ge}from"../../webgl-engine/lib/GridLocalOriginFactory.js";import{isScreenSizePerspectiveEnabled as we}from"../../webgl-engine/lib/screenSizePerspectiveUtils.js";import{affectsGeometry as xe}from"../../webgl-engine/lib/VertexAttribute.js";import{WebGLLayer as Pe}from"../../webgl-engine/lib/WebGLLayer.js";import{HUDMaterial as Re}from"../../webgl-engine/materials/HUDMaterial.js";import{hasPopupTemplate as Ue}from"../../../layers/support/popupUtils.js";import{PromiseQueue as De}from"../../../support/PromiseQueue.js";import{PropertiesPool as Ie}from"../../../support/PropertiesPool.js";import{ImmediateTask as Ee,noBudget as Le,TaskPriority as je}from"../../../support/Scheduler.js";import{TextureCompressionTracker as Ve}from"../../../support/TextureCompressionTracker.js";import{Yield as Ae}from"../../../support/Yield.js";import{alphaCutoff as Oe}from"../../../../webscene/support/AlphaCutoff.js";var Fe;const Te=D(),Me=F();let ke=class extends t{static{Fe=this}static{this.tmpVec=D()}get _viewSpatialReference(){return this.owner.view.spatialReference}get spatialIndex(){return this._spatialIndex||(this._spatialIndex=new ve({objectIdField:this.owner.layer?.objectIdField,spatialReference:this._viewSpatialReference,hasZ:!!this.hasZ,hasM:!!this.hasM}),this._spatialIndex.setup(Array.from(this.graphics3DGraphics.values()))),this._spatialIndex.update(),this._spatialIndex}get deconflictor(){return this._deconflictor}get labeler(){return this._labeler}get numberOfGraphics(){return this._numberOfGraphics}get effectiveUpdatePolicy(){return null!=this.currentRenderer&&"dictionary"===this.currentRenderer.type?0:this._forcedUpdatePolicy??this.preferredUpdatePolicy}get featureStore(){return this._featureStore}get initializePromise(){return this._initializePromise}get scaleVisibility(){return this._scaleVisibility}get elevationAlignment(){return this._elevationAlignment}get objectStates(){return this._objectStates}get filterVisibility(){return this._filterVisibility}get updating(){return!!(this.dataUpdating||this._elevationAlignment?.updating||this._scaleVisibility?.updating||this._filterVisibility?.updating||this._rendererChangeAbortController||this._elevationInfoChangeAbortController||this._frameTaskHandle.updating||this._updateQueue.updating||this.readyToRun)}get dataUpdating(){return!!(this._graphicsWaitingForSymbol.size>0||this._pendingUpdates.size>0||this._spatialIndex?.updating||this._updatingPendingLoadedGraphicsChange||this._dataUpdateQueue.updating||this._loadingSymbols>0||this.compressionTracker.compressing)}get readyToRun(){return this._pendingUpdates.size>0||!!this._spatialIndex?.updating||this._dataUpdateQueue.readyToRun||this._updateQueue.readyToRun||this._focusAreasGraphicsQueue.length>0}get suspendedOrOutsideOfView(){return this.owner.suspended||!!this.owner.suspendInfo?.outsideOfView}get updatingRemaining(){return this.updating?this._pendingUpdates.size+.1*(this._spatialIndex?.updatingRemaining||0)+.1*(this._elevationAlignment?.updatingRemaining||0):0}get displayFeatureLimit(){const e=this.owner&&this.owner.view&&this.owner.view.qualitySettings,t=e?.graphics3D.minTotalNumberOfFeatures??0,i=e?.graphics3D.maxTotalNumberOfFeatures??0,r=e?.graphics3D.maxNumberOfDrawCalls??0,s=e?.graphics3D.maxTotalNumberOfVertices??0,a=this.averageSymbolComplexity,n=Math.max(1,a?.verticesPerFeature??1),o=a&&a.drawCallsPerFeature>0&&r>0?r/a.drawCallsPerFeature:i,l=Math.ceil(s/n),h=Math.max(t,Math.min(i,l,o)),d=this._get("displayFeatureLimit");return d&&d.maximumTotalNumberOfVertices===s&&d.averageSymbolComplexity===a&&d.maximumNumberOfFeatures===h?d:new oe(s,h,a)}get averageSymbolComplexity(){const e=ae(this._symbolComplexities),t=this._get("averageSymbolComplexity");return 0===e.numComplexities||null!=t&&(e.estimated&&(t.verticesPerFeature>=e.verticesPerFeature||t.verticesPerCoordinate>=e.verticesPerCoordinate||t.drawCallsPerFeature>=e.drawCallsPerFeature)||t.verticesPerFeature===e.verticesPerFeature&&t.verticesPerCoordinate===e.verticesPerCoordinate&&t.drawCallsPerFeature===e.drawCallsPerFeature)?t:e}get usedMemory(){const e=this.labelsEnabled?(this.averageSymbolComplexity?.memory.bytesPerFeatureLabel??0)*this._numberOfGraphics:0,t=this._getSymbolComplexitiesUsed().reduce((e,t)=>e+t.memory.resourceBytes,0);if(null==this._symbolMaterials){this._symbolMaterials=[];for(const e of this._symbols.values())if(null!=e)for(const t of e.symbolLayers)if(t)for(const e of t.materials)e&&this._symbolMaterials.push(e)}const i=this.owner.view.stage.renderer,r=this.owner.view.basemapTerrain.overlayManager.renderer,s=this._symbolMaterials.reduce((e,t)=>e+((i.getMaterialRenderer(t)||r.getMaterialRenderer(t))?.usedMemory??0),0);return this._usedMemory+e+t+s}get usedMemoryPerGraphic(){if(this._usedMemory&&this._numberOfGraphics){const e=this._numberOfGraphics/(this._numberOfGraphics+Math.max(this._pendingAdds,this._pendingRemoves));return this._usedMemory/this._numberOfGraphics*e}if(null!=this.averageSymbolComplexity){const e=this.labelsEnabled?this.averageSymbolComplexity.memory.bytesPerFeatureLabel:0;return this.averageSymbolComplexity.memory.bytesPerFeature+e}return 0}get unprocessedMemoryEstimate(){return(this._pendingAdds-this._pendingRemoves)*this.usedMemoryPerGraphic}get _symbolComplexities(){return this.currentRenderer?this._getSymbolComplexitiesUsedOrRenderer(this.currentRenderer):this._getSymbolComplexitiesUsed()}get visible(){return this._visible}_getConvertedSymbol(e){const t=e;if("web-style"===t.type)return t.clone();const i=this._symbolConversionCache.get(t.id);if(null!=i)return i;const r=se(t,{geometryType:this.layer?.geometryType??void 0,retainId:!0,hasLabelingContext:this._hasLabelingContext(t),cimFallbackEnabled:!0}),a=r.symbol||null;return null==a&&r.error&&s.getLogger(this).error(r.error.message),this._symbolConversionCache.set(t.id,a),a}_getSymbolComplexitiesUsedOrRenderer(e){if(null==e)return[];const t=e.symbols,i="backgroundFillSymbol"in e?e.backgroundFillSymbol:null;if(!i&&!t.length)return[];const r=[],s=this._getSymbolComplexityUsedOrRenderer(i);null!=s&&r.push(s);for(const a of t){const e=this._getSymbolComplexityUsedOrRenderer(a);null!=e&&r.push(e)}return r}_getSymbolComplexityUsedOrRenderer(e){if(null==e)return null;const t=this._symbols.get(e.id);if(null!=t)return t.complexity;const i=this._getConvertedSymbol(e);return null!=i?ne(i):null}_getSymbolComplexitiesUsed(){const e=[];return this._symbols.forEach(t=>{null!=t&&e.push(t.complexity)}),e}get _objectIdField(){return this.layer.objectIdField}constructor(e){super(e),this._propertiesPool=new Ie({computedExtent:()=>new I},this),this.computedExtent=null,this.currentRenderer=null,this.rendererHasGeometryOperations=!1,this._graphicStateTracking=null,this.graphics3DGraphics=new Map,this.stageLayer=null,this.stage=null,this._graphicsDrapedUids=new Set,this._graphicsBySymbol=new Map,this._symbolConversionCache=new Map,this._symbols=new Map,this._graphicsWithoutSymbol=new Map,this._graphicsWaitingForSymbol=new Map,this._graphicsUpdateId=0,this._frameTaskHandle=Ee,this._dataUpdateQueue=new De,this._updateQueue=new De,this._focusAreasGraphicsQueue=new g,this._suspendSymbolCleanup=!1,this._arcadeOnDemand=null,this._rendererChangeAbortController=null,this._elevationInfoChangeAbortController=null,this._initializeAbortController=null,this._elevationAlignment=null,this._scaleVisibility=null,this._filterVisibility=null,this._spatialIndex=null,this.extentPadding=0,this._updatingPendingLoadedGraphicsChange=null,this._featureStore=null,this._deconflictor=null,this._labeler=null,this._objectStates=null,this._viewElevationProvider=null,this._stageLayerElevationProvider=null,this._whenGraphics3DGraphicRequests={},this._pendingUpdates=new Map,this._numberOfGraphics=0,this._numberOfGraphicsProvidingElevation=0,this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1,this._loadingSymbols=0,this.compressionTracker=new Ve,this._symbolWarningLogged=!1,this._geometryWarningLogged=!1,this._objectIdInvisibleSet=new Set,this._whenSymbolRemoved=new d,this.preferredUpdatePolicy=1,this._forcedUpdatePolicy=null,this.elevationFeatureExpressionEnabled=!0,this.owner=null,this.layer=null,this.graphicSymbolSupported=!0,this.getRenderingInfoWithoutRenderer=!1,this.setUidToIdOnAdd=!0,this.hasZ=null,this.hasM=null,this._usedMemory=0,this._visible=!1,this._startCreateGraphics=!1,this._unusedSymbolsCache=e.owner.view.resourceController.memoryController.newCache("graphics-3d-unused-symbols",e=>e.destroy()),this.symbolCreationContext=new ye(e.owner.view.resourceController.scheduler,(e,t)=>this._updateQueue.push(e,t),e.owner.layerViewUid,this.compressionTracker)}initialize(){this._featureStore=new pe({objectIdField:this.owner.layer?.objectIdField,hasZ:!!this.hasZ,hasM:!!this.hasM,viewSpatialReference:this._viewSpatialReference,featureSpatialReference:this.owner.featureSpatialReference,getSpatialIndex:()=>this.spatialIndex,forEach:e=>this.graphics3DGraphics.forEach(e)});const e=(e,t,i)=>this.spatialIndex.queryGraphicUIDsInExtent(e,t,i),{componentFactories:t}=this;this._elevationAlignment=t.elevationAlignment?.(this,e),this._scaleVisibility=t.scaleVisibility?.(this,e),this._filterVisibility=t.filterVisibility?.({featureStore:this._featureStore,getFeatureCount:()=>this.graphics3DGraphics.size,updateFeatureVisibilities:e=>this.modifyGraphics3DGraphicVisibilities(t=>t.setVisibilityFlag(1,4,e(B(t.graphic,this._objectIdField)))),setAllFeaturesVisibility:e=>this.modifyGraphics3DGraphicVisibilities(t=>t.setVisibilityFlag(1,4,e)),clearFeaturesVisibility:()=>this.modifyGraphics3DGraphicVisibilities(e=>e.setVisibilityFlag(1,4,!0))}),this._deconflictor=t.deconflictor?.(this),this._labeler=t.labeler?.(this,this._scaleVisibility),this._objectStates=t.objectStates?.(this),this._initializeAbortController=new AbortController,this.addHandles(m(()=>this.owner.view.state.highlights,()=>{const{highlightOrderMap:e}=this.owner.view.state;this.graphics3DGraphics.forEach(t=>t.updateHighlights(e))})),this._initializePromise=this._initializeAsync()}async _initializeAsync(){const e=this._initializeAbortController?.signal,t=this.owner.view;this._viewElevationProvider=new le(this._viewSpatialReference,t),this._initializeStage(t,this.owner.layerViewUid);const i=t.sharedSymbolResources;this.symbolCreationContext.sharedResources=i,null!=this.currentRenderer&&(this.symbolCreationContext.renderer=this.currentRenderer),this.symbolCreationContext.stage=this.stage,this.symbolCreationContext.streamDataRequester=i.streamDataRequester,this.symbolCreationContext.renderCoordsHelper=t.renderCoordsHelper,this.symbolCreationContext.layer=this.layer,this.symbolCreationContext.graphicsCoreOwner=this.owner,this.symbolCreationContext.localOriginFactory=new Ge(t.renderSpatialReference),this.symbolCreationContext.elevationProvider=t.elevationProvider,this.symbolCreationContext.notifyGraphicGeometryChanged=e=>this.notifyGraphicGeometryChanged(e),this.symbolCreationContext.notifyGraphicVisibilityChanged=e=>this.notifyGraphicVisibilityChanged(e);const r=he(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);if(this.symbolCreationContext.featureExpressionInfoContext=await de(r,this._viewSpatialReference,e,s.getLogger(this)),p(e),this.symbolCreationContext.screenSizePerspectiveEnabled=we(this.layer.screenSizePerspectiveEnabled),this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this.symbolCreationContext.physicalBasedRenderingEnabled=!!this.owner.view.qualitySettings?.physicallyBasedRenderingEnabled,this.symbolCreationContext.skipHighSymbolLods=!!this.owner.view.qualitySettings?.graphics3D?.skipHighSymbolLods,"drapeSourceType"in this.owner){const{owner:e}=this;this.symbolCreationContext.drapeSourceRenderer=t.basemapTerrain.overlayManager.registerGeometryDrapeSource(e)}this.addHandles([b(()=>this.suspendedOrOutsideOfView,()=>this._updateQueue.unshift(()=>this._updateLayerVisibility(),null).catch(c)),b(()=>we(this.layer?.screenSizePerspectiveEnabled),e=>{e!==this.symbolCreationContext.screenSizePerspectiveEnabled&&(this.symbolCreationContext.screenSizePerspectiveEnabled=e,this._screenSizePerspectiveEnabledChange())}),b(()=>this.owner.slicePlaneEnabled,e=>this._slicePlaneEnabledChange(!!e)),b(()=>this.owner.view.state?.rasterPixelRatio,()=>this._pixelRatioChange()),b(()=>!!this.owner.view.qualitySettings?.physicallyBasedRenderingEnabled,e=>this._physicalBasedRenderingChange(e)),b(()=>!!this.owner.view.qualitySettings?.graphics3D?.skipHighSymbolLods,e=>this._skipHighSymbolLoDsChange(e)),b(()=>this.owner.view.focusAreasView?.polygons,()=>this._updateFocusedLabels()),b(()=>this.owner.view.map?.focusAreas.style,()=>this.recreateAllGraphicsAndSymbols()),m(()=>t.basemapTerrain?.tilingScheme,e=>{if(e.spatialReference.equals(this.symbolCreationContext.overlaySR)||null==t.basemapTerrain.spatialReference||(this.symbolCreationContext.overlaySR=t.basemapTerrain.spatialReference),this.hasHandles("loaded-graphics"))this.recreateAllGraphics();else{const e=()=>this.owner?.loadedGraphics;this.addHandles([_(e,"change",e=>{this._graphicsCollectionChanged(e),this._signalUpdatingDuringAsyncLoadedGraphicsChange()},{onListenerAdd:()=>{this.recreateAllGraphics(),this._signalUpdatingDuringAsyncLoadedGraphicsChange()}})],"loaded-graphics")}},{initial:!0}),b(()=>this.effectiveUpdatePolicy,e=>{null!=this.stageLayer&&(this.stageLayer.updatePolicy=e),this.symbolCreationContext.isAsync=0===this.effectiveUpdatePolicy,1===e&&this.runTask(Le)},f)]),this._frameTaskHandle=t.resourceController.scheduler.registerTask(je.GRAPHICS_CORE,this),this.layer&&"featureReduction"in this.layer&&this.addHandles(b(()=>this.layer.featureReduction,()=>this._deconflictor?.featureReductionChange())),this.notifyChange("averageSymbolComplexity"),this.rendererChange(this.owner.renderer).catch(()=>{}),this._initializeAbortController=null}_abortInitialize(){this._initializeAbortController=n(this._initializeAbortController)}_updateFocusedLabels(){this._focusAreasGraphicsQueue.clear(),this.forEachGraphics3DSymbol((e,t)=>{t&&e.needsUpdateFocus&&t.forEach(e=>{this._focusAreasGraphicsQueue.push(e)})})}destroy(){if(this._unusedSymbolsCache.destroy(),this._abortInitialize(),this._rendererChangeAbortController=n(this._rendererChangeAbortController),this._abortElevationInfoChange(),this._frameTaskHandle.remove(),this._frameTaskHandle=Ee,this._dataUpdateQueue.cancelAll(),this._updateQueue.cancelAll(),this._deconflictor=o(this._deconflictor),this._labeler=o(this._labeler),this._elevationAlignment=l(this._elevationAlignment),this._scaleVisibility=l(this._scaleVisibility),this._filterVisibility=l(this._filterVisibility),this._objectStates=l(this._objectStates),this.clear(),"drapeSourceType"in this.owner){const{owner:e}=this;this.stage.view.basemapTerrain.overlayManager.unregisterDrapeSource(e)}this._featureStore=l(this._featureStore),this._updatingPendingLoadedGraphicsChange=o(this._updatingPendingLoadedGraphicsChange),this._graphicStateTracking=l(this._graphicStateTracking),this.stage&&(this.stageLayer=l(this.stageLayer),this.stage=null),this._set("owner",null);for(const e in this._whenGraphics3DGraphicRequests)this._whenGraphics3DGraphicRequests[e].reject(new r("graphic:layer-destroyed","Layer has been destroyed"));this._whenGraphics3DGraphicRequests=null,this._propertiesPool=l(this._propertiesPool),this._whenSymbolRemoved.prune(),this._symbolConversionCache.clear(),this._objectIdInvisibleSet.clear(),this._spatialIndex=l(this._spatialIndex),this._symbolMaterials=null}clear(){this._objectStates?.allGraphicsDeleted(),null!=this._graphicStateTracking&&this._graphicStateTracking.allGraphicsDeleted(),this.graphics3DGraphics.forEach(e=>e.destroy()),this._spatialIndex?.clear(),this.graphics3DGraphics.clear(),this._numberOfGraphics=0,this._usedMemory=0,this._updateLayerVisibility(),this._symbols.forEach(l),this._symbols.clear(),this._symbolMaterials&&(this._symbolMaterials.length=0,this._symbolMaterials=null),this._graphicsBySymbol.clear(),this._graphicsWithoutSymbol.clear(),this._graphicsWaitingForSymbol.clear(),this._pendingUpdates.clear(),this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1,this.notifyChange("dataUpdating"),this.notifyChange("readyToRun"),this.notifyChange("updatingRemaining"),this._featureStore.events.emit("changed"),this.owner.notifyContentGeometryUpdate?.()}_initializeStage(e,t){this.stage=e.stage,this.stageLayer=new Pe(this.stage,{visible:!this.suspendedOrOutsideOfView,updatePolicy:this.effectiveUpdatePolicy},t);const i=this.stageLayer.events;i.on("transformationChanged",e=>this.notifyGraphicGeometryChanged(e.graphicUid)),i.on("shaderTransformationChanged",e=>this.notifyGraphicGeometryChanged(e.graphicUid)),i.on("visibilityChanged",e=>this.notifyGraphicVisibilityChanged(e.graphicUid)),i.on("geometryAdded",e=>this.notifyGraphicGeometryChanged(e.object.graphicUid)),i.on("geometryRemoved",e=>this.notifyGraphicGeometryChanged(e.object.graphicUid)),i.on("attributesChanged",e=>xe(e.attribute)&&this.notifyGraphicGeometryChanged(e.object.graphicUid))}notifyGraphicGeometryChanged(e){if(this.owner.notifyContentGeometryUpdate?.(),null==this._graphicStateTracking||null==e)return;const t=this.graphics3DGraphics.get(e);t&&this._graphicStateTracking.updateGraphicGeometry(t)}notifyGraphicVisibilityChanged(e){if(this.owner.notifyContentGeometryUpdate?.(),null==this._graphicStateTracking||null==e)return;const t=this.graphics3DGraphics.get(e);t&&this._graphicStateTracking.updateGraphicVisibility(t)}_updateLayerVisibility(){const e=this.displayFeatureLimit.maximumNumberOfFeatures,t=this._numberOfGraphics>e*We,i=!this.suspendedOrOutsideOfView&&!t;i!==this._visible&&(this._visible=i,this._updateStageLayerVisibility())}_updateStageLayerVisibility(){const e=this._visible&&(null==this.layer.opacity||this.layer.opacity>=Oe);this.stageLayer.visible!==e&&(this.stageLayer.visible=e,e?this.updateGraphicsVisibilities():this._hideAllGraphics(),this.owner.notifyContentGeometryUpdate?.())}getGraphics3DGraphicById(e){return null!=e?this.graphics3DGraphics.get(e):void 0}getGraphics3DGraphicByObjectId(e){return this.owner.layer?.objectIdField?this._findGraphics3DGraphicByObjectId(e):null}_getGraphicObjectID(e,t=this.owner.layer?.objectIdField){return B(e,t)}get graphics3DGraphicsByObjectID(){const e=this.owner.layer?.objectIdField;if(!e)return;const t=new Map;return this.graphics3DGraphics.forEach(i=>{if(!i)return;const r=i.graphic,s=this._getGraphicObjectID(r,e);null!=s&&t.set(s,i)}),t}get labelsEnabled(){return!!this._labeler?.layerLabelsEnabled()}async updateLabelingInfo(e){const t=this._deconflictor?.labelingInfoChange(e),i=this._labeler?.labelingInfoChange(e);await Promise.allSettled([t,i])}updateVisibilityInfo(){this._deconflictor?.labelingInfoChange(),this._labeler?.visibilityInfoChange()}get symbolUpdateType(){if(this._pendingUpdates.size>0)return"unknown";let e=!1,t=!1;for(const[i,r]of this._symbols)if(null!=r){switch(r.getFastUpdateStatus()){case 3:return"unknown";case 1:this._graphicsBySymbol.has(i)&&(t=!0);break;case 0:this._graphicsBySymbol.has(i)&&(e=!0);break;case 2:this._graphicsBySymbol.has(i)&&(t=e=!0)}}return t?e?"mixed":"fast":e?"slow":"mixed"}runTask(e){if(this._dataUpdateQueue.runTask(e),this._updateQueue.runTask(e),this._applyPendingUpdates(e),this._applyFocusAreasUpdates(e),this.notifyChange("readyToRun"),this.readyToRun||this.notifyChange("dataUpdating"),this.notifyChange("updatingRemaining"),!e.hasProgressed)return Ae}setObjectIdVisibility(e,t){t?this._objectIdInvisibleSet.delete(e):this._objectIdInvisibleSet.add(e);const i=this._findGraphics3DGraphicByObjectId(e);null!=i&&this._updateUserVisibility(i)}_findGraphics3DGraphicByObjectId(e){return a(this.graphics3DGraphics,t=>this._getGraphicObjectID(t.graphic)===e)}_updateUserVisibility(e){if(null==e)return!1;const t=e.graphic,i=this._getGraphicObjectID(t),r=t.visible&&!this.owner.suspended&&this.stageLayer.visible&&(null==i||!this._objectIdInvisibleSet.has(i));return e.setVisibilityFlag(1,1,r)}_whenGraphics3DGraphic(e){const t=this.graphics3DGraphics.get(e.uid);if(t)return Promise.resolve(t);const i=this._whenGraphics3DGraphicRequests[e.uid];if(i)return i.promise;const r=y();return this._whenGraphics3DGraphicRequests[e.uid]=r,r.promise}async _boundsForGraphics3DGraphic(e,t){const i=this._viewSpatialReference,r=this.owner.view.renderSpatialReference,s=this.owner.view.basemapTerrain.spatialReference,a=(e,t,s)=>j(e,r,t,e,i,t,s),n=(e,t,r)=>j(e,s,t,e,i,t,r),o=this._viewElevationProvider?{service:this._viewElevationProvider,useViewElevation:null!=t&&!!t.useViewElevation,minDemResolution:null!=t?t.minDemResolution:null,minDemResolutionForPoints:this.owner.view.resolution}:null,l=await e.getProjectedBoundingBox(a,n,o,t?.signal);if(!l)return null;const h=l.boundingBox;if(l.requiresDrapedElevation){const e=this.symbolCreationContext.elevationProvider;if(e){O(h,Te);const t=e.getElevation(Te[0],Te[1],0,i,"ground")??0;h[2]=Math.min(h[2],t),h[5]=Math.max(h[5],t)}}return{boundingBox:h,screenSpaceObjects:l.screenSpaceObjects}}async whenGraphicBounds(e,t){await v(()=>this.owner?.loadedGraphics);const i=this.owner.layer?.objectIdField,s=this.owner.loadedGraphics.find(t=>t===e||null!=i&&null!=t.attributes&&e.attributes&&t.attributes[i]===e.attributes[i]);if(!s)throw new r("internal:graphic-not-part-of-view","Graphic is not part of this view");const a=await this._whenGraphics3DGraphic(s);return this._boundsForGraphics3DGraphic(a,t)}computeAttachmentOrigin(e,t){const i=this.graphics3DGraphics.get(e.uid);if(!i)return null;const r=i.computeAttachmentOrigin();if(0===r.render.num&&0===r.draped.num)return null;P(He,0,0,0);let s=0;if(r.render.num>0){if(!V(r.render.origin,this.symbolCreationContext.renderCoordsHelper.spatialReference,Be,t))return null;R(He,He,Be),s++}if(r.draped.num>0){const[e,i]=r.draped.origin,a=this._viewElevationProvider.getElevation(e,i,"ground")??0;if(P(Be,e,i,a),!V(Be,this._viewElevationProvider.spatialReference,Be,t))return null;R(He,He,Be),s++}return s>1&&U(He,He,1/s),new E({x:He[0],y:He[1],z:He[2],spatialReference:t})}getSymbolLayerSize(e,t){const i=this._symbols.get(e.id);if(null==i)throw new r("internal:symbol-not-part-of-view","Symbol is not part of this view");const s=e.symbolLayers.indexOf(t);if(-1===s)throw new r("internal:missing-symbol-layer","Symbol layer is not in symbol");const a=i.getSymbolLayerSize(s);if(null==a)throw new r("internal:missing-size","Symbol layer has no valid size");return a}_graphicsCollectionChanged(e){this._startCreateGraphics&&(this.add(e.added),this.remove(e.removed))}graphicUpdateHandler(e){const t=e.graphic.uid,i=this.graphics3DGraphics.get(t);if(null!=i||null!=this._graphicsWithoutSymbol.get(t)){switch(e.property){case"visible":this._graphicUpdateVisibleHandler(i);break;case"geometry":this._graphicUpdateGeometryHandler(i,e.graphic);break;case"symbol":this._graphicUpdateSymbolHandler(i,e);break;case"attributes":{const t=this.symbolCreationContext.featureExpressionInfoContext;t?.arcade&&this._graphicUpdateGeometryHandler(i,e.graphic)}break;case"popupTemplate":break;case"origin-transform":this._graphicUpdateTransformHandler(i,e)}this.owner.notifyContentGeometryUpdate?.()}}_graphicUpdateGeometryHandler(e,t){this._graphicUpdateGeometryOrTransformHandler(e,t,()=>!(null==e||!e.graphics3DSymbol.updateGeometry(e)||!(this._labeler?.updateGraphicGeometry(e)??1))&&(this._labeler?.setDirty(),!0));const i=t.geometry;null!=i&&this._expandComputedExtent(i)}_graphicUpdateTransformHandler(e,t){const i=t.graphic.geometry;this._graphicUpdateGeometryOrTransformHandler(e,t.graphic,()=>null!=t.newValue&&null!=e&&null!=i&&e.graphics3DSymbol.updateTransform(e,i.spatialReference,t.newValue,t.action))}_graphicUpdateGeometryOrTransformHandler(e,t,i){if(null!=t.geometry){if(null==e){const e=t.symbol?.id;if(e){const t=this._symbols.get(e);if(null!=t&&0===t.loadStatus)return}return void this._recreateGraphic(t)}i()||this._recreateGraphic(e.graphic)}else this._recreateGraphic(t)}_graphicUpdateSymbolHandler(e,t){const i=t.graphic,r=null!=e?e.graphics3DSymbol:null!=t.oldValue?this._symbols.get(t.oldValue.id):null;if(null==r||null==t.newValue)return void this._recreateGraphic(i);const s=r.symbol,a=this._getConvertedSymbol(t.newValue);if(null!=a&&(a.type!==s.type||"web-style"===a.type)||"web-style"===s.type)return void this._recreateGraphic(i);const n=this._graphicsBySymbol.get(s.id);if(n&&1!==n.size)return void this._recreateGraphic(i);const o=w(s,a);if(null==o)return void this._updateSymbolMapping(s.id,a);const l={diff:o,graphics3DGraphicPatches:[],symbolStatePatches:[]};if(r.prepareSymbolPatch(l),!x(l.diff))return void this._recreateGraphic(i);const h=this._getRenderingInfo(i,!1);if(null==h)return void this._recreateGraphic(i);const d=r.extentPadding;for(const p of l.symbolStatePatches)p();if(d!==r.extentPadding&&this._recomputeExtentPadding(),null!=e)for(const p of l.graphics3DGraphicPatches)p(e,h);this._updateSymbolMapping(s.id,a)}_graphicUpdateVisibleHandler(e){this._updateUserVisibility(e)&&(this._labeler?.setDirty(),this._deconflictor?.setDirty())}recreateGraphics(e){this._suspendSymbolCleanup=!0,this.remove(e),this.add(e),this._suspendSymbolCleanup=!1,1===this.effectiveUpdatePolicy&&this._cleanupSymbols()}_recreateGraphic(e){this.recreateGraphics([e])}_beginGraphicUpdate(e){const t=this._graphicsUpdateId;return this._graphicsUpdateId++,this._graphicsWaitingForSymbol.set(e.uid,t),1===this._graphicsWaitingForSymbol.size&&this.notifyChange("dataUpdating"),t}_endGraphicUpdate(e,t){e&&(t&&this._graphicStateTracking?.updateGraphicError(e,t),this._graphicsWaitingForSymbol.delete(e.uid),0===this._graphicsWaitingForSymbol.size&&(this._cleanupSymbols(),this.notifyChange("dataUpdating")))}_recomputeExtentPadding(){let e=0;this._symbols.forEach(t=>{null!=t&&(e=Math.max(e,t.extentPadding))}),this._set("extentPadding",e)}_expandComputedExtent(e){const t=Me,i=e.spatialReference;q(e,t);const r=this._viewSpatialReference,s=Fe.tmpVec;if(z(i,r)||A(t[0],t[1],0,i,s,r)&&(t[0]=s[0],t[1]=s[1],A(t[3],t[4],0,i,s,r),t[3]=s[0],t[4]=s[1]),!(isFinite(t[0])&&isFinite(t[3])&&isFinite(t[1])&&isFinite(t[4])))return;const a=this.computedExtent;let n=null;const o=isFinite(t[2])&&isFinite(t[5]),l=o&&(null==a?.zmin||t[2]<a.zmin),h=o&&(null==a?.zmax||t[5]>a.zmax);if(a){(t[0]<a.xmin||t[1]<a.ymin||t[3]>a.xmax||t[4]>a.ymax||l||h)&&(n=this._propertiesPool.get("computedExtent"),n.xmin=Math.min(t[0],a.xmin),n.ymin=Math.min(t[1],a.ymin),n.xmax=Math.max(t[3],a.xmax),n.ymax=Math.max(t[4],a.ymax),n.spatialReference=r)}else n=this._propertiesPool.get("computedExtent"),n.xmin=t[0],n.ymin=t[1],n.xmax=t[3],n.ymax=t[4],n.spatialReference=r;n&&(l&&(n.zmin=t[2]),h&&(n.zmax=t[5]),this._set("computedExtent",n))}_abortElevationInfoChange(){this._elevationInfoChangeAbortController&&(this._elevationInfoChangeAbortController.abort(),this._elevationInfoChangeAbortController=null)}async elevationInfoChange(){this._abortElevationInfoChange();const e=new AbortController;this._elevationInfoChangeAbortController=e;const t=he(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);this.symbolCreationContext.featureExpressionInfoContext=await de(t,this._viewSpatialReference,e.signal,s.getLogger(this)),p(e.signal),this._elevationInfoChangeAbortController=null,this._labeler?.elevationInfoChange(),this.forEachGraphics3DSymbol((e,t,i)=>{e.globalPropertyChanged("elevationInfo",t)?t?.forEach(e=>{const t=e.graphic,i=e.labelLayers;for(const r of i){r.graphics3DSymbolLayer.graphics3DGraphicLayerElevationInfoChanged(t,r)}}):this._recreateSymbol(i)}),this.updateStageLayerElevationProvider(),this._elevationAlignment?.elevationInfoChange()}updateStageLayerElevationProvider(){this._stageLayerElevationProvider?(this.layer.elevationInfo&&"relative-to-scene"===this.layer.elevationInfo.mode||0===this._numberOfGraphicsProvidingElevation)&&(this.owner.view.elevationProvider.unregister(this._stageLayerElevationProvider),this._stageLayerElevationProvider=l(this._stageLayerElevationProvider)):(!this.layer.elevationInfo||this.layer.elevationInfo&&"relative-to-scene"!==this.layer.elevationInfo.mode)&&this._numberOfGraphicsProvidingElevation>0&&(this._stageLayerElevationProvider=new Ce({layer:this.layer,stageLayer:this.stageLayer,view:this.owner.view}),this.owner.view.elevationProvider.register(2,this._stageLayerElevationProvider))}_clearSymbolsAndGraphics(){this.clear(),null!=this._filterVisibility&&this._filterVisibility.clear(),this._labeler?.reset(),this._deconflictor?.clear(),this._elevationAlignment?.clear(),this.stageLayer?.invalidateSpatialQueryAccelerator(),this._stageLayerElevationProvider&&(this.owner.view.elevationProvider.unregister(this._stageLayerElevationProvider),this._stageLayerElevationProvider=l(this._stageLayerElevationProvider))}startCreateGraphics(){this._startCreateGraphics=!0,this.recreateAllGraphics()}recreateAllGraphics(){this._recreateAllGraphics(!1)}recreateAllGraphicsAndSymbols(){this._recreateAllGraphics(!0)}_recreateAllGraphics(e=!1){if(!this._startCreateGraphics)return;const{loadedGraphics:t,view:i}=this.owner,r=i.basemapTerrain?.tilingScheme&&t?.length?t.toArray():null;!e&&r||this._clearSymbolsAndGraphics(),this.symbolCreationContext.screenSizePerspectiveEnabled=we(this.layer.screenSizePerspectiveEnabled),this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this._set("computedExtent",null),r&&(e?this.add(r):this.recreateGraphics(r))}_recreateSymbol(e){const t=this._graphicsBySymbol.get(e),i=[];t&&(t.forEach((e,t)=>{const r=e.usedMemory;this._conditionalRemove(e,t),this._spatialIndex?.remove(e),i.push(e.graphic),e.destroy(),this._removeGraphics3DGraphic(t,r),this._updateLayerVisibility(),this._featureStore.events.emit("changed"),this.owner.notifyContentGeometryUpdate?.()}),this._graphicsBySymbol.set(e,new Map));const r=this._symbols.get(e);l(r),this._symbols.delete(e),this._symbolMaterials=null,l(this._unusedSymbolsCache.pop(e)),this.add(i)}_recreateGraphicsForSymbol(e){const t=this._graphicsBySymbol.get(e);if(t){const e=[];t.forEach(t=>e.push(t.graphic)),this.recreateGraphics(e)}}_conditionalRemove(e,t){this._graphicsDrapedUids.delete(t),this._objectStates?.removeGraphic(e),this._labeler?.removeGraphic(e),this._deconflictor?.removeGraphic(e),null!=this._graphicStateTracking&&this._graphicStateTracking.removeGraphic(e)}add(e){e&&0!==e.length&&(this.owner.view.basemapTerrain?.tilingScheme?(0===this._updatePolicyForGraphics(e)?this._addDelayed(e):this._addImmediate(e),this.notifyChange("dataUpdating")):s.getLogger(this).error("#add()","Cannot add graphics before terrain surface has been initialized"))}_updatePolicyForGraphics(e){if(1===this.effectiveUpdatePolicy&&("mesh"===this.layer.geometryType||null==this.layer.geometryType))for(const t of e)if(null!=t.geometry&&"mesh"===t.geometry.type&&!t.geometry.loaded)return 0;return this.effectiveUpdatePolicy}_addImmediate(e){this._geometryWarningLogged=!1,this._symbolWarningLogged=!1;for(const t of e)this._addGraphic(t,this._getRenderingInfo(t),1);this._cleanupSymbols(),this._labeler?.setDirty(),this._deconflictor?.setDirty()}_addDelayed(e){for(const t of e){const e=t.uid;let i=this._pendingUpdates.get(e);i?i.add?0!==i.state&&i.abortController?.abort():this._pendingAdds++:(i=new ze,this._pendingAdds++,this._pendingUpdates.set(e,i)),i.add=t}this.notifyChange("readyToRun"),this.notifyChange("updatingRemaining"),this.notifyChange("dataUpdating")}remove(e){0===this.effectiveUpdatePolicy?this._removeDelayed(e):this._removeImmediate(e),this.notifyChange("dataUpdating")}_removeImmediate(e){for(const t of e)this._removeGraphic(t);this._cleanupSymbols(),this._labeler?.setDirty(),this._deconflictor?.setDirty()}_removeDelayed(e){for(const t of e){const e=t.uid,i=this._pendingUpdates.get(e);if(i)i.add&&(i.remove?i.add=null:this._pendingUpdates.delete(e),1===i.state&&i.abortController?.abort(),this._pendingAdds--);else{const i=new ze;i.remove=t,this._pendingUpdates.set(e,i),this._pendingRemoves++,this._applyPendingRemovesFirst=!0}}0===this._pendingUpdates.size&&this._finishPendingUpdates(),this.notifyChange("readyToRun"),this.notifyChange("updatingRemaining"),this.notifyChange("dataUpdating")}_finishPendingUpdates(){this._cleanupSymbols(),(this._pendingAdds||this._pendingRemoves)&&s.getLogger(this).warn("pendingAdds/Removes in inconsistent state!"),this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1}_applyFocusAreasUpdates(e){for(;this._focusAreasGraphicsQueue.length>0&&!e.done;){e.madeProgress();const t=this._focusAreasGraphicsQueue.pop(),i=fe(t.graphic.geometry);if(null==i)continue;const r=this.stage.view.focusAreasView?.containsGeometry(i)??!0;t.layers.forEach(e=>{if(e.stageObject){e.stageObject.geometries.some(e=>e.material instanceof Re&&e.material.parameters.isFocused!==r)&&this.recreateGraphics([t.graphic])}})}0===this._focusAreasGraphicsQueue.length&&this.notifyChange("readyToRun")}_applyPendingUpdates(e){if(this._geometryWarningLogged=!1,this._symbolWarningLogged=!1,0===this._pendingUpdates.size&&this._spatialIndex?.updating)return this._spatialIndex.update(),void e.madeProgress();if(this._applyPendingRemovesFirst){this._applyPendingRemovesFirst=!1;for(const[t,i]of this._pendingUpdates){if(e.done){this._applyPendingRemovesFirst=!0;break}if(i.remove&&!i.add&&(this._pendingRemoves--,e.madeProgress(),this._removeGraphic(i.remove),i.remove=null,this._pendingUpdates.delete(t),0===this._pendingRemoves))break}}for(const[t,i]of this._pendingUpdates){if(e.done)break;i.add&&0===i.state&&this._processPendingUpdateNew(i);let r=this.effectiveUpdatePolicy;if(!i.remove||i.add&&2!==i.state||(this._pendingRemoves--,e.madeProgress(),this._removeGraphic(i.remove),i.remove=null,r=1),i.add)switch(i.state){case 2:this._addGraphic(i.add,i.renderingInfo,r),i.add=null,this._pendingAdds--,e.madeProgress();break;case 3:i.add=null,this._pendingAdds--}null==i.remove&&null==i.add&&this._pendingUpdates.delete(t)}0===this._pendingUpdates.size&&(this._finishPendingUpdates(),this.notifyChange("readyToRun"),this.notifyChange("dataUpdating"))}_processPendingUpdateNew(e){if(!e.add)return void(e.state=2);const t=e.add.geometry;null==t||"mesh"!==t.type||t.loaded?this._processPendingUpdateNewRenderingInfo(e):this._processPendingUpdateNewMesh(e,t)}async _processPendingUpdateNewMesh(e,t){e.state=1,e.abortController=new AbortController;const i=e.abortController.signal;try{await t.load({signal:i})}catch(r){return this._processPendingUpdateNewError(e,r)}e.abortController=null,this._processPendingUpdateNewRenderingInfo(e)}_processPendingUpdateNewError(e,t){e.abortController=null,u(t)?e.state=0:e.state=3}async _processPendingUpdateNewRenderingInfo(e){if(null==this.layer.renderer||"dictionary"!==this.layer.renderer.type)return e.renderingInfo=this._getRenderingInfo(e.add),void(e.state=2);e.state=1,e.abortController=new AbortController;let t=null;try{t=await this._getRenderingInfoAsync(e.add,{signal:e.abortController.signal})}catch(i){return e.abortController=null,void(u(i)?e.state=0:e.state=3)}null==t?.symbol?(this._symbolWarningLogged||(this._symbolWarningLogged=!0,s.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),e.renderingInfo=null):e.renderingInfo=t,e.state=2}_addGraphic(e,t,i){if(this._graphicsWithoutSymbol.set(e.uid,e),null==t?.symbol||!Q(e))return;const r=this.stage.renderView.olidRenderHelper;if(r&&this.setUidToIdOnAdd){const t=J(this.owner.view,this.owner.layerViewUid);r.setUidToObjectAndLayerId(e.objectId,e.uid,this.layer.id,this.owner.layerViewUid,W(this.layer)&&!!this.layer.popupEnabled&&!t&&Ue(this.layer,this.owner.view.popup?.defaultPopupTemplateEnabled))}const s=t.symbol,a=this.getOrCreateGraphics3DSymbol(s,t.renderer);if(null==a)return;this._expandComputedExtent(e.geometry);const n=this._beginGraphicUpdate(e),o=new ce(e,t,this.layer);let l=!1;const h=e=>{e===a.symbol.id&&(l=!0)};this._whenSymbolRemoved.push(h);const d=()=>{if(--this._loadingSymbols,this.destroyed)return;this._whenSymbolRemoved.removeUnordered(h);if(this._graphicsWaitingForSymbol.get(e.uid)!==n||l||a.destroyed||this.graphicSymbolSupported&&e.symbol&&e.symbol.id!==a.symbol.id)--a.referenced,this._cleanupSymbols();else{const t=this._createGraphics3DGraphic(a,o);this._spatialIndex&&null!=t&&this._spatialIndex.add(t),--a.referenced,this._endGraphicUpdate(e)}this._featureStore.events.emit("changed"),this.owner.notifyContentGeometryUpdate?.(),this._labeler?.setDirty()},p=t=>{--this._loadingSymbols,this.destroyed||(this._whenSymbolRemoved.removeUnordered(h),l||(u(t)?this.add([e]):a.destroyed||this._endGraphicUpdate(e,t)))};++this._loadingSymbols,0===i?a.load(()=>this._dataUpdateQueue.push(d,null).catch(c),e=>this._dataUpdateQueue.push(()=>p(e),null).catch(c)):a.load(d,p)}_removeGraphic(e){const t=e.uid,i=this.graphics3DGraphics.get(t);if(i){i.graphics3DSymbol.onRemoveGraphic(i);const e=i.usedMemory,r=i.isElevationSource;this._conditionalRemove(i,t),this._spatialIndex?.remove(i);const s=i.graphics3DSymbol.symbol.id;this._graphicsBySymbol.get(s)?.delete(t),this._graphicsWithoutSymbol.delete(t),this._removeGraphics3DGraphic(t,e,r),i.destroy(),this._featureStore.events.emit("changed"),this.owner.notifyContentGeometryUpdate?.()}else this._graphicsWithoutSymbol.delete(t),this._graphicsWaitingForSymbol.delete(t),0===this._graphicsWaitingForSymbol.size&&(this._cleanupSymbols(),this.notifyChange("dataUpdating"))}_hasLabelingContext(e){if(e instanceof ee||e instanceof te){const t=this.symbolCreationContext.layer;return!!t.labelingInfo&&t.labelingInfo.some(t=>t.symbol===e)}return!1}_hasValidSymbolCreationContext(e){return!(e instanceof ee&&!this._hasLabelingContext(e))||(s.getLogger(this).error("LabelSymbol3D is only valid as part of a LabelClass. Using LabelSymbol3D as a renderer symbol is not supported."),!1)}_getRenderingInfo(e,t=!0){const i=e.geometry;if(null==i)return t&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,s.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!L(i.spatialReference,this._viewSpatialReference))return t&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,s.getLogger(this).warn(`Graphic in layer ${this.layer.id} has incompatible spatial reference and will not render`)),null;if(!this.graphicSymbolSupported&&null!=e.symbol)return t&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,s.getLogger(this).warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;const r=this.rendererHasGeometryOperations?N(e,this.layer,null):e;let a;if(this.owner.getRenderingInfo&&(this.getRenderingInfoWithoutRenderer||null!=this.currentRenderer))a=this.owner.getRenderingInfo(r,this.currentRenderer,this._arcadeOnDemand);else{const e=r.symbol||re(r.geometry);a=new X(null,e)}return null==a?.symbol?(t&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,s.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),null):a}_getRenderingInfoAsync(e,t){if(null==e.geometry)return this._geometryWarningLogged||(this._geometryWarningLogged=!0,s.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!this.graphicSymbolSupported&&null!=e.symbol)return this._symbolWarningLogged||(this._symbolWarningLogged=!0,s.getLogger(this).warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;const i=this.rendererHasGeometryOperations?N(e,this.layer,null):e;return this.owner.getRenderingInfoAsync(i,this.currentRenderer,this._arcadeOnDemand,t)}_createGraphics3DSymbol(e,t){if(!this._hasValidSymbolCreationContext(e))return null;const i=this._getConvertedSymbol(e);if(!i)return null;let r;if(null!=t&&"backgroundFillSymbol"in t&&t.backgroundFillSymbol){const e=se(t.backgroundFillSymbol,{ignoreDrivers:!0});null!=e.symbol&&(r=e.symbol.symbolLayers)}const s=ue(i,this.symbolCreationContext,r);return s.load(()=>{const e=s.extentPadding;e>this.extentPadding&&this._set("extentPadding",e),this.notifyChange("averageSymbolComplexity")},()=>{}),s}getOrCreateGraphics3DSymbol(e,t){let i=this._symbols.get(e.id);if(void 0===i){const r=this._unusedSymbolsCache.pop(e.id);i=null!=r?r:e instanceof ie?new ge(e,e=>this._dataUpdateQueue.push(e,null),e=>this._createGraphics3DSymbol(e,t)):this._createGraphics3DSymbol(e,t),this._symbols.set(e.id,i),this._symbolMaterials=null}return null!=i&&++i.referenced,i}trackGraphicState(e){return null==this._graphicStateTracking&&(this._graphicStateTracking=new be(this)),this._graphicStateTracking.add(e)}_addGraphics3DGraphic(e){this._usedMemory+=e.usedMemory,this.graphics3DGraphics.set(e.graphic.uid,e),this._numberOfGraphics++,e.isElevationSource&&(this._numberOfGraphicsProvidingElevation++,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_removeGraphics3DGraphic(e,t,i=!1){this._usedMemory-=t,this.graphics3DGraphics.delete(e),this._numberOfGraphics--,i&&(this._numberOfGraphicsProvidingElevation--,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_createGraphics3DGraphic(e,t){const{graphic:i}=t;if(this._graphicsWithoutSymbol.delete(i.uid),!this._symbols.has(e.symbol.id))return this.add([i]),null;if(this.graphics3DGraphics.has(i.uid))return null;const r=e.createGraphics3DGraphic(t);if(null==r)return null;this._addGraphics3DGraphic(r);const s=e.symbol.id;this._graphicsBySymbol.has(s)||this._graphicsBySymbol.set(s,new Map),this._graphicsBySymbol.get(s).set(i.uid,r);if(r.isDraped&&this._graphicsDrapedUids.add(i.uid),r.centroid=null,null!=i.geometry&&"point"!==i.geometry.type&&(r.centroid=_e(i.geometry,this._viewSpatialReference)),this._updateUserVisibility(r),null!=this._scaleVisibility&&this._scaleVisibility.updateVisibility(r),null!=this._filterVisibility){const{defaultVisibility:e}=this._filterVisibility;r.setVisibilityFlag(1,4,e),e||this._filterVisibility.reapply()}this._deconflictor?.addGraphic(r),this._labeler?.addGraphic(r),this._objectStates?.addGraphic(r),r.initialize(this.stageLayer),null!=this._graphicStateTracking&&this._graphicStateTracking.addGraphic(r);const a=this._whenGraphics3DGraphicRequests[i.uid];return a&&(delete this._whenGraphics3DGraphicRequests[i.uid],a.resolve(r)),this._symbolMaterials=null,r}async rendererChange(e){if(this._rendererChangeAbortController=n(this._rendererChangeAbortController),e!==this.currentRenderer)if(this._validateRenderer(e),null==e&&this._currentRendererChange(null,!1),Z(e))if(e?.arcadeRequired){const t=new AbortController;this._rendererChangeAbortController=t;const{arcadeUtils:i}=await this._ensureArcade();p(t);const r=i.hasGeometryOperations(e);r&&(await i.enableGeometryOperations(),p(t)),0===this.effectiveUpdatePolicy?await this._updateQueue.push(()=>this._currentRendererChange(e,r),t.signal):this._currentRendererChange(e,r),this._rendererChangeAbortController=null}else if(0===this.effectiveUpdatePolicy){const t=new AbortController;this._rendererChangeAbortController=t,await this._updateQueue.push(()=>this._currentRendererChange(e,!1),t.signal),this._rendererChangeAbortController=null}else this._currentRendererChange(e,!1);else this._currentRendererChange(e,!1)}async _ensureArcade(){return null==this._arcadeOnDemand?(this._arcadeOnDemand=await K(),this._arcadeOnDemand):this._arcadeOnDemand}_currentRendererChange(e,t){this.currentRenderer=e,this.rendererHasGeometryOperations=t,this.symbolCreationContext.arcade=this._arcadeOnDemand;const i=this.symbolCreationContext.renderer;if(e===i)return;if(this._symbolConversionCache.clear(),this._unusedSymbolsCache.clear(),null==e)return this.symbolCreationContext.renderer=null,void this.recreateAllGraphicsAndSymbols();const r=w(i,e);this._updateUnchangedSymbolMappings(r,e,i),this.symbolCreationContext.renderer=e,null!=r&&("complete"===r.type?this.recreateAllGraphicsAndSymbols():"partial"===r.type&&(this._applyRendererDiff(r,e,i)?this._labeler?.reset():this.recreateAllGraphicsAndSymbols()),this.notifyChange("averageSymbolComplexity"))}_diffHasSymbolChange(e){for(const t in e.diff)switch(t){case"visualVariables":case"defaultSymbol":case"uniqueValueInfos":break;case"uniqueValueGroups":case"authoringInfo":case"fieldDelimiter":delete e.diff[t];break;default:return!0}return!1}_applySymbolSetDiff(e,t,i){e=e||[],t=t||[];const r=[];for(const s of t){const t=this._graphicsBySymbol.get(s.id);t&&t.forEach((a,n)=>{const o=a.graphic,l=this.layer instanceof H?this.layer:null,h=this._arcadeOnDemand;if(s===i.defaultSymbol&&i.getSymbol(N(o,l,null),{arcade:h})===i.defaultSymbol)return;const d=a.usedMemory;e.length||i.defaultSymbol?r.push(o):this._graphicsWithoutSymbol.set(n,o);const p=this.graphics3DGraphics.get(n);this._conditionalRemove(p,n),a.destroy(),t.delete(n),this._removeGraphics3DGraphic(n,d),this._updateLayerVisibility()}),this._whenSymbolRemoved.forAll(e=>e(s.id))}(e.length||r.length)&&(this._graphicsWithoutSymbol.forEach(e=>r.push(e)),this._graphicsWithoutSymbol.clear(),this.add(r)),this._cleanupSymbols(),this._labeler?.setDirty(),this._deconflictor?.setDirty()}_applyUniqueValueRendererDiff(e,t,r){const s=e.diff.defaultSymbol,a=e.diff.uniqueValueInfos;if(s||a){const n=a?.changed,o=a?.unchanged;if(n&&o&&n.some(e=>o.some(t=>t.oldValue.symbol?.id===e.oldValue.symbol?.id)))return!1;const l=a?a.added.map(e=>e.symbol).filter(i):[],h=a?a.removed.map(e=>e.symbol).filter(i):[];if(n)for(let e=0;e<n.length;e++)l.push(n[e].newValue.symbol),h.push(n[e].oldValue.symbol);return s?(r.defaultSymbol&&h.push(r.defaultSymbol),t.defaultSymbol&&l.push(t.defaultSymbol)):r.defaultSymbol&&l.length&&h.push(t.defaultSymbol),this._applySymbolSetDiff(l,h,t),delete e.diff.defaultSymbol,delete e.diff.uniqueValueInfos,!0}return!1}_calculateUnchangedSymbolMapping(e,t,i){if("unique-value"!==t?.type||"unique-value"!==i?.type||null!=e&&"partial"!==e.type)return[];const r=e=>null!=e?e.id:null,s=e&&e.diff,a=s?.defaultSymbol,n=s&&s.uniqueValueInfos;let o;if(n)o=n.unchanged.map(e=>({oldId:r(e.oldValue.symbol),newId:r(e.newValue.symbol)}));else{o=[];for(const e of i.uniqueValueInfos??[]){const i=r(e.symbol),s=t.uniqueValueInfos?.find(t=>t.value===e.value);s&&i!==r(s.symbol)&&o.push({oldId:i,newId:r(s.symbol)})}}return!a&&i.defaultSymbol&&o.push({oldId:r(i.defaultSymbol),newId:r(t.defaultSymbol)}),o}_updateSymbolMapping(e,t){const i=null!=t&&t?"string"==typeof t?t:t.id:null;if(null==e||e===i)return;const r=this._graphicsBySymbol.get(e);this._graphicsBySymbol.delete(e),void 0!==r&&this._graphicsBySymbol.set(i,r);const s=this._symbols.get(e);if(void 0!==s&&(this._symbols.delete(e),this._symbols.set(i,s),this._symbolMaterials=null,null!=s)){const e="string"==typeof t?null:t;null!=e?s.symbol=e:s.symbol.id=i}}_updateUnchangedSymbolMappings(e,t,i){const r=this._calculateUnchangedSymbolMapping(e,t,i);for(const{oldId:s,newId:a}of r)this._updateSymbolMapping(s,a)}_applyRendererDiff(e,t,i){if(this._diffHasSymbolChange(e))return!1;if(t instanceof $&&i instanceof $&&this._applyUniqueValueRendererDiff(e,t,i)&&0===Object.keys(e.diff).length)return!0;for(const r of this._graphicsBySymbol.keys()){const i=this._symbols.get(r);if(null!=i)switch(i.applyRendererDiff(e,t)){case 0:this._recreateSymbol(r);break;case 1:this._recreateGraphicsForSymbol(r)}}return!0}opacityChange(){this._updateStageLayerVisibility(),this.forEachGraphics3DSymbol((e,t)=>e.globalPropertyChanged("opacity",t))}_screenSizePerspectiveEnabledChange(){this.forEachGraphics3DSymbol((e,t)=>e.globalPropertyChanged("screenSizePerspectiveEnabled",t)),this._labeler?.screenSizePerspectiveEnabledChanged(),this._deconflictor?.screenSizePerspectiveEnabledChanged()}_slicePlaneEnabledChange(e){e!==this.symbolCreationContext.slicePlaneEnabled&&(this.symbolCreationContext.slicePlaneEnabled=e,this.stageLayer.sliceable=e,this.forEachGraphics3DSymbol((e,t)=>e.globalPropertyChanged("slicePlaneEnabled",t)),this._deconflictor?.slicePlaneEnabledChange(),this._labeler?.slicePlaneEnabledChange())}_physicalBasedRenderingChange(e){this.symbolCreationContext.physicalBasedRenderingEnabled=e,this.forEachGraphics3DSymbol((e,t,i)=>{e.globalPropertyChanged("physicalBasedRenderingEnabled",t)||this._recreateSymbol(i)})}_skipHighSymbolLoDsChange(e){this.symbolCreationContext.skipHighSymbolLods=e,this.forEachGraphics3DSymbol((e,t,i)=>{e.globalPropertyChanged("skipHighSymbolLods",t)||this._recreateSymbol(i)})}_pixelRatioChange(){this.forEachGraphics3DSymbol((e,t,i)=>{e.globalPropertyChanged("pixelRatio",t)||this._recreateSymbol(i)})}_signalUpdatingDuringAsyncLoadedGraphicsChange(){this._updatingPendingLoadedGraphicsChange&&this._updatingPendingLoadedGraphicsChange.remove(),this._updatingPendingLoadedGraphicsChange=C(()=>{this._updatingPendingLoadedGraphicsChange=null})}setClippingExtent(e,t){const i=this.symbolCreationContext.clippingExtent,r=k();return Se(e,r,t)?this.symbolCreationContext.clippingExtent=T(F(),r):this.symbolCreationContext.clippingExtent=null,!M(this.symbolCreationContext.clippingExtent,i)}modifyGraphics3DGraphicVisibilities(e){if(this.destroyed)return;let t=!1;this.graphics3DGraphics.forEach(i=>{e(i)&&(t=!0)}),t&&(this._labeler?.setDirty(),this._deconflictor?.setDirty())}forEachGraphics3DSymbol(e,t){for(const[i,r]of this._symbols){if(null==r)return;e(r,this._graphicsBySymbol.get(i)||qe,i)}if(!t?.excludeUnused)for(const i of this._unusedSymbolsCache)e(i,void 0,i.symbol.id)}updateGraphicsVisibilities(){null!=this._filterVisibility&&this._filterVisibility.reapply(),this.modifyGraphics3DGraphicVisibilities(e=>{const t=this._updateUserVisibility(e),i=!!this._scaleVisibility?.updateVisibility(e);return t||i})}_hideAllGraphics(){this.modifyGraphics3DGraphicVisibilities(e=>e.setVisibilityFlag(1,1,!1))}_validateRenderer(e){const t=()=>`'${this.layer.title?`${this.layer.title}, `:""}id:${this.layer.id}'`,i=Y(e,{geometryType:this.layer?.geometryType,logWarning:(e,i)=>s.getLogger(this).warn(e,`Symbology conversion for layer ${t()}: ${i}`)});if(i){const e=`Renderer for layer ${t} is not supported in a SceneView`;s.getLogger(this).warn(e,i.message)}}_cleanupSymbols(){if(this._graphicsWaitingForSymbol.size>0||this._suspendSymbolCleanup)return;let e=!1;this._symbols.forEach((t,i)=>{if(null==t||t.referenced>0)return;const r=this._graphicsBySymbol.get(i);r&&0!==r.size||(this._graphicsBySymbol.delete(i),this._symbols.delete(i),this._symbolMaterials=null,this._unusedSymbolsCache.put(i,t,h),e=!0)}),e&&(this._recomputeExtentPadding(),this.notifyChange("averageSymbolComplexity"))}get test(){}get performanceInfo(){return new me(this.graphics3DGraphics.size,Array.from(this.graphics3DGraphics.values()).reduce((e,t)=>e+(t.isVisible()?1:0),0),this._graphicsWithoutSymbol.size,this._pendingUpdates.size)}};e([S({readOnly:!0})],ke.prototype,"computedExtent",void 0),e([S()],ke.prototype,"currentRenderer",void 0),e([S()],ke.prototype,"rendererHasGeometryOperations",void 0),e([S()],ke.prototype,"_frameTaskHandle",void 0),e([S()],ke.prototype,"_dataUpdateQueue",void 0),e([S()],ke.prototype,"_updateQueue",void 0),e([S({readOnly:!0})],ke.prototype,"_viewSpatialReference",null),e([S()],ke.prototype,"_rendererChangeAbortController",void 0),e([S()],ke.prototype,"_elevationInfoChangeAbortController",void 0),e([S()],ke.prototype,"_initializeAbortController",void 0),e([S()],ke.prototype,"_elevationAlignment",void 0),e([S()],ke.prototype,"_scaleVisibility",void 0),e([S()],ke.prototype,"_filterVisibility",void 0),e([S()],ke.prototype,"_initializePromise",void 0),e([S()],ke.prototype,"_spatialIndex",void 0),e([S({readOnly:!0})],ke.prototype,"extentPadding",void 0),e([S()],ke.prototype,"_updatingPendingLoadedGraphicsChange",void 0),e([S()],ke.prototype,"_featureStore",void 0),e([S()],ke.prototype,"_objectStates",void 0),e([S()],ke.prototype,"_loadingSymbols",void 0),e([S({constructOnly:!0})],ke.prototype,"compressionTracker",void 0),e([S()],ke.prototype,"preferredUpdatePolicy",void 0),e([S()],ke.prototype,"_forcedUpdatePolicy",void 0),e([S({readOnly:!0})],ke.prototype,"effectiveUpdatePolicy",null),e([S({constructOnly:!0})],ke.prototype,"elevationFeatureExpressionEnabled",void 0),e([S({constructOnly:!0})],ke.prototype,"owner",void 0),e([S({constructOnly:!0})],ke.prototype,"layer",void 0),e([S({constructOnly:!0})],ke.prototype,"graphicSymbolSupported",void 0),e([S({constructOnly:!0})],ke.prototype,"getRenderingInfoWithoutRenderer",void 0),e([S({constructOnly:!0})],ke.prototype,"componentFactories",void 0),e([S({constructOnly:!0})],ke.prototype,"setUidToIdOnAdd",void 0),e([S()],ke.prototype,"featureStore",null),e([S()],ke.prototype,"initializePromise",null),e([S()],ke.prototype,"scaleVisibility",null),e([S()],ke.prototype,"elevationAlignment",null),e([S()],ke.prototype,"objectStates",null),e([S()],ke.prototype,"filterVisibility",null),e([S({readOnly:!0})],ke.prototype,"updating",null),e([S({readOnly:!0})],ke.prototype,"dataUpdating",null),e([S({readOnly:!0})],ke.prototype,"readyToRun",null),e([S({readOnly:!0})],ke.prototype,"suspendedOrOutsideOfView",null),e([S({readOnly:!0,dependsOn:[]})],ke.prototype,"updatingRemaining",null),e([S({readOnly:!0})],ke.prototype,"displayFeatureLimit",null),e([S({readOnly:!0,dependsOn:[]})],ke.prototype,"averageSymbolComplexity",null),e([S({constructOnly:!0})],ke.prototype,"hasZ",void 0),e([S({constructOnly:!0})],ke.prototype,"hasM",void 0),e([S()],ke.prototype,"_objectIdField",null),ke=Fe=e([G("esri.views.3d.layers.graphics.Graphics3DCore")],ke);class ze{constructor(){this.add=null,this.renderingInfo=null,this.state=0,this.abortController=null,this.remove=null}clear(){this.add=null,this.renderingInfo=null,this.state=0,this.abortController=null,this.remove=null}}const We=10,He=D(),Be=D(),qe=new Map;export{ke as Graphics3DCore};
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import{isSome as i}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import r from"../../../../core/Error.js";import s from"../../../../core/Logger.js";import{findInMap as a}from"../../../../core/MapUtils.js";import{abortMaybe as n,removeMaybe as o,destroyMaybe as l}from"../../../../core/maybe.js";import{MinPriority as h}from"../../../../core/MemCache.js";import d from"../../../../core/PooledArray.js";import{throwIfAborted as p,ignoreAbortErrors as c,createResolver as y,isAbortError as u}from"../../../../core/promiseUtils.js";import g from"../../../../core/Queue.js";import{when as m,watch as b,on as _,syncAndInitial as f,whenOnce as v}from"../../../../core/reactiveUtils.js";import{schedule as C}from"../../../../core/scheduling.js";import{property as S}from"../../../../core/accessorSupport/decorators/property.js";import{subclass as G}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as w,isEmpty as x}from"../../../../core/accessorSupport/diffUtils.js";import{i as P,f as R,g as U}from"../../../../chunks/vec32.js";import{create as D}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import I from"../../../../geometry/Extent.js";import E from"../../../../geometry/Point.js";import{canProjectWithoutEngine as L}from"../../../../geometry/projectionUtils.js";import{projectBuffer as j}from"../../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as V}from"../../../../geometry/projection/projectVectorToVector.js";import{projectXYZToVector as A}from"../../../../geometry/projection/projectXYZToVector.js";import{center as O,create as F,fromRect as T,equals as M}from"../../../../geometry/support/aaBoundingBox.js";import{create as k}from"../../../../geometry/support/aaBoundingRect.js";import{equals as z}from"../../../../geometry/support/spatialReferenceUtils.js";import{isPopupProvider as W}from"../../../../graphic/getPopupProvider.js";import H from"../../../../layers/Layer.js";import{getObjectId as B,computeAABB as q,hasGeometry as Q}from"../../../../layers/graphics/dehydratedFeatures.js";import{hydrateGraphic as N}from"../../../../layers/graphics/hydratedFeatures.js";import $ from"../../../../renderers/UniqueValueRenderer.js";import{isSupportedRenderer3D as Z,validateTo3D as Y}from"../../../../renderers/support/rendererConversion.js";import{RenderingInfo as X}from"../../../../renderers/support/RenderingInfo.js";import{isBasemapLayerView as J}from"../../../../support/basemapUtils.js";import{loadArcade as K}from"../../../../support/loadArcade.js";import ee from"../../../../symbols/LabelSymbol3D.js";import te from"../../../../symbols/TextSymbol.js";import ie from"../../../../symbols/WebStyleSymbol.js";import{getDefaultSymbol3D as re}from"../../../../symbols/support/defaults3D.js";import{to3D as se}from"../../../../symbols/support/symbolConversion.js";import{averageSymbolComplexities as ae,defaultSymbolComplexity as ne}from"./defaultSymbolComplexity.js";import{DisplayFeatureLimit as oe}from"./DisplayFeatureLimit.js";import{ViewElevationProvider as le}from"./ElevationQuery.js";import{extractExpressionInfo as he,createContext as de}from"./featureExpressionInfoUtils.js";import{Graphics3DFeatureStore as pe}from"./Graphics3DFeatureStore.js";import{Graphics3DGraphicCreationContext as ce}from"./Graphics3DGraphicCreationContext.js";import{Graphics3DSymbolCreationContext as ye}from"./Graphics3DSymbolCreationContext.js";import{make as ue}from"./Graphics3DSymbolFactory.js";import{Graphics3DWebStyleSymbol as ge}from"./Graphics3DWebStyleSymbol.js";import{GraphicsCorePerformanceInfo as me}from"./GraphicsCorePerformanceInfo.js";import{GraphicStateTracking as be}from"./GraphicStateTracking.js";import{computeCentroid as _e}from"./graphicUtils.js";import{placePointOnGeometry as fe}from"./pointUtils.js";import{SpatialIndex2D as ve}from"./SpatialIndex2D.js";import{StageLayerElevationProvider as Ce}from"../support/StageLayerElevationProvider.js";import{toBoundingRect as Se}from"../../support/extentUtils.js";import{GridLocalOriginFactory as Ge}from"../../webgl-engine/lib/GridLocalOriginFactory.js";import{isScreenSizePerspectiveEnabled as we}from"../../webgl-engine/lib/screenSizePerspectiveUtils.js";import{affectsGeometry as xe}from"../../webgl-engine/lib/VertexAttribute.js";import{WebGLLayer as Pe}from"../../webgl-engine/lib/WebGLLayer.js";import{HUDMaterial as Re}from"../../webgl-engine/materials/HUDMaterial.js";import{hasPopupTemplate as Ue}from"../../../layers/support/popupUtils.js";import{PromiseQueue as De}from"../../../support/PromiseQueue.js";import{PropertiesPool as Ie}from"../../../support/PropertiesPool.js";import{ImmediateTask as Ee,noBudget as Le,TaskPriority as je}from"../../../support/Scheduler.js";import{TextureCompressionTracker as Ve}from"../../../support/TextureCompressionTracker.js";import{Yield as Ae}from"../../../support/Yield.js";import{alphaCutoff as Oe}from"../../../../webscene/support/AlphaCutoff.js";var Fe;const Te=D(),Me=F();let ke=class extends t{static{Fe=this}static{this.tmpVec=D()}get _viewSpatialReference(){return this.owner.view.spatialReference}get spatialIndex(){return this._spatialIndex||(this._spatialIndex=new ve({objectIdField:this.owner.layer?.objectIdField,spatialReference:this._viewSpatialReference,hasZ:!!this.hasZ,hasM:!!this.hasM}),this._spatialIndex.setup(Array.from(this.graphics3DGraphics.values()))),this._spatialIndex.update(),this._spatialIndex}get deconflictor(){return this._deconflictor}get labeler(){return this._labeler}get numberOfGraphics(){return this._numberOfGraphics}get effectiveUpdatePolicy(){return null!=this.currentRenderer&&"dictionary"===this.currentRenderer.type?0:this._forcedUpdatePolicy??this.preferredUpdatePolicy}get featureStore(){return this._featureStore}get initializePromise(){return this._initializePromise}get scaleVisibility(){return this._scaleVisibility}get elevationAlignment(){return this._elevationAlignment}get objectStates(){return this._objectStates}get filterVisibility(){return this._filterVisibility}get updating(){return!!(this.dataUpdating||this._elevationAlignment?.updating||this._scaleVisibility?.updating||this._filterVisibility?.updating||this._rendererChangeAbortController||this._elevationInfoChangeAbortController||this._frameTaskHandle.updating||this._updateQueue.updating||this.readyToRun)}get dataUpdating(){return!!(this._graphicsWaitingForSymbol.size>0||this._pendingUpdates.size>0||this._spatialIndex?.updating||this._updatingPendingLoadedGraphicsChange||this._dataUpdateQueue.updating||this._loadingSymbols>0||this.compressionTracker.compressing)}get readyToRun(){return this._pendingUpdates.size>0||!!this._spatialIndex?.updating||this._dataUpdateQueue.readyToRun||this._updateQueue.readyToRun||this._focusAreasGraphicsQueue.length>0}get suspendedOrOutsideOfView(){return this.owner.suspended||!!this.owner.suspendInfo?.outsideOfView}get updatingRemaining(){return this.updating?this._pendingUpdates.size+.1*(this._spatialIndex?.updatingRemaining||0)+.1*(this._elevationAlignment?.updatingRemaining||0):0}get displayFeatureLimit(){const e=this.owner&&this.owner.view&&this.owner.view.qualitySettings,t=e?.graphics3D.minTotalNumberOfFeatures??0,i=e?.graphics3D.maxTotalNumberOfFeatures??0,r=e?.graphics3D.maxNumberOfDrawCalls??0,s=e?.graphics3D.maxTotalNumberOfVertices??0,a=this.averageSymbolComplexity,n=Math.max(1,a?.verticesPerFeature??1),o=a&&a.drawCallsPerFeature>0&&r>0?r/a.drawCallsPerFeature:i,l=Math.ceil(s/n),h=Math.max(t,Math.min(i,l,o)),d=this._get("displayFeatureLimit");return d&&d.maximumTotalNumberOfVertices===s&&d.averageSymbolComplexity===a&&d.maximumNumberOfFeatures===h?d:new oe(s,h,a)}get averageSymbolComplexity(){const e=ae(this._symbolComplexities),t=this._get("averageSymbolComplexity");return 0===e.numComplexities||null!=t&&(e.estimated&&(t.verticesPerFeature>=e.verticesPerFeature||t.verticesPerCoordinate>=e.verticesPerCoordinate||t.drawCallsPerFeature>=e.drawCallsPerFeature)||t.verticesPerFeature===e.verticesPerFeature&&t.verticesPerCoordinate===e.verticesPerCoordinate&&t.drawCallsPerFeature===e.drawCallsPerFeature)?t:e}get usedMemory(){const e=this.labelsEnabled?(this.averageSymbolComplexity?.memory.bytesPerFeatureLabel??0)*this._numberOfGraphics:0,t=this._getSymbolComplexitiesUsed().reduce((e,t)=>e+t.memory.resourceBytes,0);if(null==this._symbolMaterials){this._symbolMaterials=[];for(const e of this._symbols.values())if(null!=e)for(const t of e.symbolLayers)if(t)for(const e of t.materials)e&&this._symbolMaterials.push(e)}const i=this.owner.view.stage.renderer,r=this.owner.view.overlayManager.renderer,s=this._symbolMaterials.reduce((e,t)=>e+((i.getMaterialRenderer(t)||r.getMaterialRenderer(t))?.usedMemory??0),0);return this._usedMemory+e+t+s}get usedMemoryPerGraphic(){if(this._usedMemory&&this._numberOfGraphics){const e=this._numberOfGraphics/(this._numberOfGraphics+Math.max(this._pendingAdds,this._pendingRemoves));return this._usedMemory/this._numberOfGraphics*e}if(null!=this.averageSymbolComplexity){const e=this.labelsEnabled?this.averageSymbolComplexity.memory.bytesPerFeatureLabel:0;return this.averageSymbolComplexity.memory.bytesPerFeature+e}return 0}get unprocessedMemoryEstimate(){return(this._pendingAdds-this._pendingRemoves)*this.usedMemoryPerGraphic}get _symbolComplexities(){return this.currentRenderer?this._getSymbolComplexitiesUsedOrRenderer(this.currentRenderer):this._getSymbolComplexitiesUsed()}get visible(){return this._visible}_getConvertedSymbol(e){const t=e;if("web-style"===t.type)return t.clone();const i=this._symbolConversionCache.get(t.id);if(null!=i)return i;const r=se(t,{geometryType:this.layer?.geometryType??void 0,retainId:!0,hasLabelingContext:this._hasLabelingContext(t),cimFallbackEnabled:!0}),a=r.symbol||null;return null==a&&r.error&&s.getLogger(this).error(r.error.message),this._symbolConversionCache.set(t.id,a),a}_getSymbolComplexitiesUsedOrRenderer(e){if(null==e)return[];const t=e.symbols,i="backgroundFillSymbol"in e?e.backgroundFillSymbol:null;if(!i&&!t.length)return[];const r=[],s=this._getSymbolComplexityUsedOrRenderer(i);null!=s&&r.push(s);for(const a of t){const e=this._getSymbolComplexityUsedOrRenderer(a);null!=e&&r.push(e)}return r}_getSymbolComplexityUsedOrRenderer(e){if(null==e)return null;const t=this._symbols.get(e.id);if(null!=t)return t.complexity;const i=this._getConvertedSymbol(e);return null!=i?ne(i):null}_getSymbolComplexitiesUsed(){const e=[];return this._symbols.forEach(t=>{null!=t&&e.push(t.complexity)}),e}get _objectIdField(){return this.layer.objectIdField}constructor(e){super(e),this._propertiesPool=new Ie({computedExtent:()=>new I},this),this.computedExtent=null,this.currentRenderer=null,this.rendererHasGeometryOperations=!1,this._graphicStateTracking=null,this.graphics3DGraphics=new Map,this.stageLayer=null,this.stage=null,this._graphicsDrapedUids=new Set,this._graphicsBySymbol=new Map,this._symbolConversionCache=new Map,this._symbols=new Map,this._graphicsWithoutSymbol=new Map,this._graphicsWaitingForSymbol=new Map,this._graphicsUpdateId=0,this._frameTaskHandle=Ee,this._dataUpdateQueue=new De,this._updateQueue=new De,this._focusAreasGraphicsQueue=new g,this._suspendSymbolCleanup=!1,this._arcadeOnDemand=null,this._rendererChangeAbortController=null,this._elevationInfoChangeAbortController=null,this._initializeAbortController=null,this._elevationAlignment=null,this._scaleVisibility=null,this._filterVisibility=null,this._spatialIndex=null,this.extentPadding=0,this._updatingPendingLoadedGraphicsChange=null,this._featureStore=null,this._deconflictor=null,this._labeler=null,this._objectStates=null,this._viewElevationProvider=null,this._stageLayerElevationProvider=null,this._whenGraphics3DGraphicRequests={},this._pendingUpdates=new Map,this._numberOfGraphics=0,this._numberOfGraphicsProvidingElevation=0,this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1,this._loadingSymbols=0,this.compressionTracker=new Ve,this._symbolWarningLogged=!1,this._geometryWarningLogged=!1,this._objectIdInvisibleSet=new Set,this._whenSymbolRemoved=new d,this.preferredUpdatePolicy=1,this._forcedUpdatePolicy=null,this.elevationFeatureExpressionEnabled=!0,this.owner=null,this.layer=null,this.graphicSymbolSupported=!0,this.getRenderingInfoWithoutRenderer=!1,this.setUidToIdOnAdd=!0,this.hasZ=null,this.hasM=null,this._usedMemory=0,this._visible=!1,this._startCreateGraphics=!1,this._unusedSymbolsCache=e.owner.view.resourceController.memoryController.newCache("graphics-3d-unused-symbols",e=>e.destroy()),this.symbolCreationContext=new ye(e.owner.view.resourceController.scheduler,(e,t)=>this._updateQueue.push(e,t),e.owner.layerViewUid,this.compressionTracker)}initialize(){this._featureStore=new pe({objectIdField:this.owner.layer?.objectIdField,hasZ:!!this.hasZ,hasM:!!this.hasM,viewSpatialReference:this._viewSpatialReference,featureSpatialReference:this.owner.featureSpatialReference,getSpatialIndex:()=>this.spatialIndex,forEach:e=>this.graphics3DGraphics.forEach(e)});const e=(e,t,i)=>this.spatialIndex.queryGraphicUIDsInExtent(e,t,i),{componentFactories:t}=this;this._elevationAlignment=t.elevationAlignment?.(this,e),this._scaleVisibility=t.scaleVisibility?.(this,e),this._filterVisibility=t.filterVisibility?.({featureStore:this._featureStore,getFeatureCount:()=>this.graphics3DGraphics.size,updateFeatureVisibilities:e=>this.modifyGraphics3DGraphicVisibilities(t=>t.setVisibilityFlag(1,4,e(B(t.graphic,this._objectIdField)))),setAllFeaturesVisibility:e=>this.modifyGraphics3DGraphicVisibilities(t=>t.setVisibilityFlag(1,4,e)),clearFeaturesVisibility:()=>this.modifyGraphics3DGraphicVisibilities(e=>e.setVisibilityFlag(1,4,!0))}),this._deconflictor=t.deconflictor?.(this),this._labeler=t.labeler?.(this,this._scaleVisibility),this._objectStates=t.objectStates?.(this),this._initializeAbortController=new AbortController,this.addHandles(m(()=>this.owner.view.state.highlights,()=>{const{highlightOrderMap:e}=this.owner.view.state;this.graphics3DGraphics.forEach(t=>t.updateHighlights(e))})),this._initializePromise=this._initializeAsync()}async _initializeAsync(){const e=this._initializeAbortController?.signal,t=this.owner.view;this._viewElevationProvider=new le(this._viewSpatialReference,t),this._initializeStage(t,this.owner.layerViewUid);const i=t.sharedSymbolResources;this.symbolCreationContext.sharedResources=i,null!=this.currentRenderer&&(this.symbolCreationContext.renderer=this.currentRenderer),this.symbolCreationContext.stage=this.stage,this.symbolCreationContext.streamDataRequester=i.streamDataRequester,this.symbolCreationContext.renderCoordsHelper=t.renderCoordsHelper,this.symbolCreationContext.layer=this.layer,this.symbolCreationContext.graphicsCoreOwner=this.owner,this.symbolCreationContext.localOriginFactory=new Ge(t.renderSpatialReference),this.symbolCreationContext.elevationProvider=t.elevationProvider,this.symbolCreationContext.notifyGraphicGeometryChanged=e=>this.notifyGraphicGeometryChanged(e),this.symbolCreationContext.notifyGraphicVisibilityChanged=e=>this.notifyGraphicVisibilityChanged(e);const r=he(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);if(this.symbolCreationContext.featureExpressionInfoContext=await de(r,this._viewSpatialReference,e,s.getLogger(this)),p(e),this.symbolCreationContext.screenSizePerspectiveEnabled=we(this.layer.screenSizePerspectiveEnabled),this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this.symbolCreationContext.physicalBasedRenderingEnabled=!!this.owner.view.qualitySettings?.physicallyBasedRenderingEnabled,this.symbolCreationContext.skipHighSymbolLods=!!this.owner.view.qualitySettings?.graphics3D?.skipHighSymbolLods,"drapeSourceType"in this.owner){const{owner:e}=this;this.symbolCreationContext.drapeSourceRenderer=t.overlayManager.registerGeometryDrapeSource(e)}this.addHandles([b(()=>this.suspendedOrOutsideOfView,()=>this._updateQueue.unshift(()=>this._updateLayerVisibility(),null).catch(c)),b(()=>we(this.layer?.screenSizePerspectiveEnabled),e=>{e!==this.symbolCreationContext.screenSizePerspectiveEnabled&&(this.symbolCreationContext.screenSizePerspectiveEnabled=e,this._screenSizePerspectiveEnabledChange())}),b(()=>this.owner.slicePlaneEnabled,e=>this._slicePlaneEnabledChange(!!e)),b(()=>this.owner.view.state?.rasterPixelRatio,()=>this._pixelRatioChange()),b(()=>!!this.owner.view.qualitySettings?.physicallyBasedRenderingEnabled,e=>this._physicalBasedRenderingChange(e)),b(()=>!!this.owner.view.qualitySettings?.graphics3D?.skipHighSymbolLods,e=>this._skipHighSymbolLoDsChange(e)),b(()=>this.owner.view.focusAreasView?.polygons,()=>this._updateFocusedLabels()),b(()=>this.owner.view.map?.focusAreas.style,()=>this.recreateAllGraphicsAndSymbols()),m(()=>t.basemapTerrain?.tilingScheme,e=>{if(e.spatialReference.equals(this.symbolCreationContext.overlaySR)||null==t.basemapTerrain.spatialReference||(this.symbolCreationContext.overlaySR=t.basemapTerrain.spatialReference),this.hasHandles("loaded-graphics"))this.recreateAllGraphics();else{const e=()=>this.owner?.loadedGraphics;this.addHandles([_(e,"change",e=>{this._graphicsCollectionChanged(e),this._signalUpdatingDuringAsyncLoadedGraphicsChange()},{onListenerAdd:()=>{this.recreateAllGraphics(),this._signalUpdatingDuringAsyncLoadedGraphicsChange()}})],"loaded-graphics")}},{initial:!0}),b(()=>this.effectiveUpdatePolicy,e=>{null!=this.stageLayer&&(this.stageLayer.updatePolicy=e),this.symbolCreationContext.isAsync=0===this.effectiveUpdatePolicy,1===e&&this.runTask(Le)},f)]),this._frameTaskHandle=t.resourceController.scheduler.registerTask(je.GRAPHICS_CORE,this),this.layer&&"featureReduction"in this.layer&&this.addHandles(b(()=>this.layer.featureReduction,()=>this._deconflictor?.featureReductionChange())),this.notifyChange("averageSymbolComplexity"),this.rendererChange(this.owner.renderer).catch(()=>{}),this._initializeAbortController=null}_abortInitialize(){this._initializeAbortController=n(this._initializeAbortController)}_updateFocusedLabels(){this._focusAreasGraphicsQueue.clear(),this.forEachGraphics3DSymbol((e,t)=>{t&&e.needsUpdateFocus&&t.forEach(e=>{this._focusAreasGraphicsQueue.push(e)})})}destroy(){if(this._unusedSymbolsCache.destroy(),this._abortInitialize(),this._rendererChangeAbortController=n(this._rendererChangeAbortController),this._abortElevationInfoChange(),this._frameTaskHandle.remove(),this._frameTaskHandle=Ee,this._dataUpdateQueue.cancelAll(),this._updateQueue.cancelAll(),this._deconflictor=o(this._deconflictor),this._labeler=o(this._labeler),this._elevationAlignment=l(this._elevationAlignment),this._scaleVisibility=l(this._scaleVisibility),this._filterVisibility=l(this._filterVisibility),this._objectStates=l(this._objectStates),this.clear(),"drapeSourceType"in this.owner){const{owner:e}=this;this.stage.view.overlayManager.unregisterDrapeSource(e)}this._featureStore=l(this._featureStore),this._updatingPendingLoadedGraphicsChange=o(this._updatingPendingLoadedGraphicsChange),this._graphicStateTracking=l(this._graphicStateTracking),this.stage&&(this.stageLayer=l(this.stageLayer),this.stage=null),this._set("owner",null);for(const e in this._whenGraphics3DGraphicRequests)this._whenGraphics3DGraphicRequests[e].reject(new r("graphic:layer-destroyed","Layer has been destroyed"));this._whenGraphics3DGraphicRequests=null,this._propertiesPool=l(this._propertiesPool),this._whenSymbolRemoved.prune(),this._symbolConversionCache.clear(),this._objectIdInvisibleSet.clear(),this._spatialIndex=l(this._spatialIndex),this._symbolMaterials=null}clear(){this._objectStates?.allGraphicsDeleted(),null!=this._graphicStateTracking&&this._graphicStateTracking.allGraphicsDeleted(),this.graphics3DGraphics.forEach(e=>e.destroy()),this._spatialIndex?.clear(),this.graphics3DGraphics.clear(),this._numberOfGraphics=0,this._usedMemory=0,this._updateLayerVisibility(),this._symbols.forEach(l),this._symbols.clear(),this._symbolMaterials&&(this._symbolMaterials.length=0,this._symbolMaterials=null),this._graphicsBySymbol.clear(),this._graphicsWithoutSymbol.clear(),this._graphicsWaitingForSymbol.clear(),this._pendingUpdates.clear(),this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1,this.notifyChange("dataUpdating"),this.notifyChange("readyToRun"),this.notifyChange("updatingRemaining"),this._featureStore.events.emit("changed"),this.owner.notifyContentGeometryUpdate?.()}_initializeStage(e,t){this.stage=e.stage,this.stageLayer=new Pe(this.stage,{visible:!this.suspendedOrOutsideOfView,updatePolicy:this.effectiveUpdatePolicy},t);const i=this.stageLayer.events;i.on("transformationChanged",e=>this.notifyGraphicGeometryChanged(e.graphicUid)),i.on("shaderTransformationChanged",e=>this.notifyGraphicGeometryChanged(e.graphicUid)),i.on("visibilityChanged",e=>this.notifyGraphicVisibilityChanged(e.graphicUid)),i.on("geometryAdded",e=>this.notifyGraphicGeometryChanged(e.object.graphicUid)),i.on("geometryRemoved",e=>this.notifyGraphicGeometryChanged(e.object.graphicUid)),i.on("attributesChanged",e=>xe(e.attribute)&&this.notifyGraphicGeometryChanged(e.object.graphicUid))}notifyGraphicGeometryChanged(e){if(this.owner.notifyContentGeometryUpdate?.(),null==this._graphicStateTracking||null==e)return;const t=this.graphics3DGraphics.get(e);t&&this._graphicStateTracking.updateGraphicGeometry(t)}notifyGraphicVisibilityChanged(e){if(this.owner.notifyContentGeometryUpdate?.(),null==this._graphicStateTracking||null==e)return;const t=this.graphics3DGraphics.get(e);t&&this._graphicStateTracking.updateGraphicVisibility(t)}_updateLayerVisibility(){const e=this.displayFeatureLimit.maximumNumberOfFeatures,t=this._numberOfGraphics>e*We,i=!this.suspendedOrOutsideOfView&&!t;i!==this._visible&&(this._visible=i,this._updateStageLayerVisibility())}_updateStageLayerVisibility(){const e=this._visible&&(null==this.layer.opacity||this.layer.opacity>=Oe);this.stageLayer.visible!==e&&(this.stageLayer.visible=e,e?this.updateGraphicsVisibilities():this._hideAllGraphics(),this.owner.notifyContentGeometryUpdate?.())}getGraphics3DGraphicById(e){return null!=e?this.graphics3DGraphics.get(e):void 0}getGraphics3DGraphicByObjectId(e){return this.owner.layer?.objectIdField?this._findGraphics3DGraphicByObjectId(e):null}_getGraphicObjectID(e,t=this.owner.layer?.objectIdField){return B(e,t)}get graphics3DGraphicsByObjectID(){const e=this.owner.layer?.objectIdField;if(!e)return;const t=new Map;return this.graphics3DGraphics.forEach(i=>{if(!i)return;const r=i.graphic,s=this._getGraphicObjectID(r,e);null!=s&&t.set(s,i)}),t}get labelsEnabled(){return!!this._labeler?.layerLabelsEnabled()}async updateLabelingInfo(e){const t=this._deconflictor?.labelingInfoChange(e),i=this._labeler?.labelingInfoChange(e);await Promise.allSettled([t,i])}updateVisibilityInfo(){this._deconflictor?.labelingInfoChange(),this._labeler?.visibilityInfoChange()}get symbolUpdateType(){if(this._pendingUpdates.size>0)return"unknown";let e=!1,t=!1;for(const[i,r]of this._symbols)if(null!=r){switch(r.getFastUpdateStatus()){case 3:return"unknown";case 1:this._graphicsBySymbol.has(i)&&(t=!0);break;case 0:this._graphicsBySymbol.has(i)&&(e=!0);break;case 2:this._graphicsBySymbol.has(i)&&(t=e=!0)}}return t?e?"mixed":"fast":e?"slow":"mixed"}runTask(e){if(this._dataUpdateQueue.runTask(e),this._updateQueue.runTask(e),this._applyPendingUpdates(e),this._applyFocusAreasUpdates(e),this.notifyChange("readyToRun"),this.readyToRun||this.notifyChange("dataUpdating"),this.notifyChange("updatingRemaining"),!e.hasProgressed)return Ae}setObjectIdVisibility(e,t){t?this._objectIdInvisibleSet.delete(e):this._objectIdInvisibleSet.add(e);const i=this._findGraphics3DGraphicByObjectId(e);null!=i&&this._updateUserVisibility(i)}_findGraphics3DGraphicByObjectId(e){return a(this.graphics3DGraphics,t=>this._getGraphicObjectID(t.graphic)===e)}_updateUserVisibility(e){if(null==e)return!1;const t=e.graphic,i=this._getGraphicObjectID(t),r=t.visible&&!this.owner.suspended&&this.stageLayer.visible&&(null==i||!this._objectIdInvisibleSet.has(i));return e.setVisibilityFlag(1,1,r)}_whenGraphics3DGraphic(e){const t=this.graphics3DGraphics.get(e.uid);if(t)return Promise.resolve(t);const i=this._whenGraphics3DGraphicRequests[e.uid];if(i)return i.promise;const r=y();return this._whenGraphics3DGraphicRequests[e.uid]=r,r.promise}async _boundsForGraphics3DGraphic(e,t){const i=this._viewSpatialReference,r=this.owner.view.renderSpatialReference,s=this.owner.view.basemapTerrain.spatialReference,a=(e,t,s)=>j(e,r,t,e,i,t,s),n=(e,t,r)=>j(e,s,t,e,i,t,r),o=this._viewElevationProvider?{service:this._viewElevationProvider,useViewElevation:null!=t&&!!t.useViewElevation,minDemResolution:null!=t?t.minDemResolution:null,minDemResolutionForPoints:this.owner.view.resolution}:null,l=await e.getProjectedBoundingBox(a,n,o,t?.signal);if(!l)return null;const h=l.boundingBox;if(l.requiresDrapedElevation){const e=this.symbolCreationContext.elevationProvider;if(e){O(h,Te);const t=e.getElevation(Te[0],Te[1],0,i,"ground")??0;h[2]=Math.min(h[2],t),h[5]=Math.max(h[5],t)}}return{boundingBox:h,screenSpaceObjects:l.screenSpaceObjects}}async whenGraphicBounds(e,t){await v(()=>this.owner?.loadedGraphics);const i=this.owner.layer?.objectIdField,s=this.owner.loadedGraphics.find(t=>t===e||null!=i&&null!=t.attributes&&e.attributes&&t.attributes[i]===e.attributes[i]);if(!s)throw new r("internal:graphic-not-part-of-view","Graphic is not part of this view");const a=await this._whenGraphics3DGraphic(s);return this._boundsForGraphics3DGraphic(a,t)}computeAttachmentOrigin(e,t){const i=this.graphics3DGraphics.get(e.uid);if(!i)return null;const r=i.computeAttachmentOrigin();if(0===r.render.num&&0===r.draped.num)return null;P(He,0,0,0);let s=0;if(r.render.num>0){if(!V(r.render.origin,this.symbolCreationContext.renderCoordsHelper.spatialReference,Be,t))return null;R(He,He,Be),s++}if(r.draped.num>0){const[e,i]=r.draped.origin,a=this._viewElevationProvider.getElevation(e,i,"ground")??0;if(P(Be,e,i,a),!V(Be,this._viewElevationProvider.spatialReference,Be,t))return null;R(He,He,Be),s++}return s>1&&U(He,He,1/s),new E({x:He[0],y:He[1],z:He[2],spatialReference:t})}getSymbolLayerSize(e,t){const i=this._symbols.get(e.id);if(null==i)throw new r("internal:symbol-not-part-of-view","Symbol is not part of this view");const s=e.symbolLayers.indexOf(t);if(-1===s)throw new r("internal:missing-symbol-layer","Symbol layer is not in symbol");const a=i.getSymbolLayerSize(s);if(null==a)throw new r("internal:missing-size","Symbol layer has no valid size");return a}_graphicsCollectionChanged(e){this._startCreateGraphics&&(this.add(e.added),this.remove(e.removed))}graphicUpdateHandler(e){const t=e.graphic.uid,i=this.graphics3DGraphics.get(t);if(null!=i||null!=this._graphicsWithoutSymbol.get(t)){switch(e.property){case"visible":this._graphicUpdateVisibleHandler(i);break;case"geometry":this._graphicUpdateGeometryHandler(i,e.graphic);break;case"symbol":this._graphicUpdateSymbolHandler(i,e);break;case"attributes":{const t=this.symbolCreationContext.featureExpressionInfoContext;t?.arcade&&this._graphicUpdateGeometryHandler(i,e.graphic)}break;case"popupTemplate":break;case"origin-transform":this._graphicUpdateTransformHandler(i,e)}this.owner.notifyContentGeometryUpdate?.()}}_graphicUpdateGeometryHandler(e,t){this._graphicUpdateGeometryOrTransformHandler(e,t,()=>!(null==e||!e.graphics3DSymbol.updateGeometry(e)||!(this._labeler?.updateGraphicGeometry(e)??1))&&(this._labeler?.setDirty(),!0));const i=t.geometry;null!=i&&this._expandComputedExtent(i)}_graphicUpdateTransformHandler(e,t){const i=t.graphic.geometry;this._graphicUpdateGeometryOrTransformHandler(e,t.graphic,()=>null!=t.newValue&&null!=e&&null!=i&&e.graphics3DSymbol.updateTransform(e,i.spatialReference,t.newValue,t.action))}_graphicUpdateGeometryOrTransformHandler(e,t,i){if(null!=t.geometry){if(null==e){const e=t.symbol?.id;if(e){const t=this._symbols.get(e);if(null!=t&&0===t.loadStatus)return}return void this._recreateGraphic(t)}i()||this._recreateGraphic(e.graphic)}else this._recreateGraphic(t)}_graphicUpdateSymbolHandler(e,t){const i=t.graphic,r=null!=e?e.graphics3DSymbol:null!=t.oldValue?this._symbols.get(t.oldValue.id):null;if(null==r||null==t.newValue)return void this._recreateGraphic(i);const s=r.symbol,a=this._getConvertedSymbol(t.newValue);if(null!=a&&(a.type!==s.type||"web-style"===a.type)||"web-style"===s.type)return void this._recreateGraphic(i);const n=this._graphicsBySymbol.get(s.id);if(n&&1!==n.size)return void this._recreateGraphic(i);const o=w(s,a);if(null==o)return void this._updateSymbolMapping(s.id,a);const l={diff:o,graphics3DGraphicPatches:[],symbolStatePatches:[]};if(r.prepareSymbolPatch(l),!x(l.diff))return void this._recreateGraphic(i);const h=this._getRenderingInfo(i,!1);if(null==h)return void this._recreateGraphic(i);const d=r.extentPadding;for(const p of l.symbolStatePatches)p();if(d!==r.extentPadding&&this._recomputeExtentPadding(),null!=e)for(const p of l.graphics3DGraphicPatches)p(e,h);this._updateSymbolMapping(s.id,a)}_graphicUpdateVisibleHandler(e){this._updateUserVisibility(e)&&(this._labeler?.setDirty(),this._deconflictor?.setDirty())}recreateGraphics(e){this._suspendSymbolCleanup=!0,this.remove(e),this.add(e),this._suspendSymbolCleanup=!1,1===this.effectiveUpdatePolicy&&this._cleanupSymbols()}_recreateGraphic(e){this.recreateGraphics([e])}_beginGraphicUpdate(e){const t=this._graphicsUpdateId;return this._graphicsUpdateId++,this._graphicsWaitingForSymbol.set(e.uid,t),1===this._graphicsWaitingForSymbol.size&&this.notifyChange("dataUpdating"),t}_endGraphicUpdate(e,t){e&&(t&&this._graphicStateTracking?.updateGraphicError(e,t),this._graphicsWaitingForSymbol.delete(e.uid),0===this._graphicsWaitingForSymbol.size&&(this._cleanupSymbols(),this.notifyChange("dataUpdating")))}_recomputeExtentPadding(){let e=0;this._symbols.forEach(t=>{null!=t&&(e=Math.max(e,t.extentPadding))}),this._set("extentPadding",e)}_expandComputedExtent(e){const t=Me,i=e.spatialReference;q(e,t);const r=this._viewSpatialReference,s=Fe.tmpVec;if(z(i,r)||A(t[0],t[1],0,i,s,r)&&(t[0]=s[0],t[1]=s[1],A(t[3],t[4],0,i,s,r),t[3]=s[0],t[4]=s[1]),!(isFinite(t[0])&&isFinite(t[3])&&isFinite(t[1])&&isFinite(t[4])))return;const a=this.computedExtent;let n=null;const o=isFinite(t[2])&&isFinite(t[5]),l=o&&(null==a?.zmin||t[2]<a.zmin),h=o&&(null==a?.zmax||t[5]>a.zmax);if(a){(t[0]<a.xmin||t[1]<a.ymin||t[3]>a.xmax||t[4]>a.ymax||l||h)&&(n=this._propertiesPool.get("computedExtent"),n.xmin=Math.min(t[0],a.xmin),n.ymin=Math.min(t[1],a.ymin),n.xmax=Math.max(t[3],a.xmax),n.ymax=Math.max(t[4],a.ymax),n.spatialReference=r)}else n=this._propertiesPool.get("computedExtent"),n.xmin=t[0],n.ymin=t[1],n.xmax=t[3],n.ymax=t[4],n.spatialReference=r;n&&(l&&(n.zmin=t[2]),h&&(n.zmax=t[5]),this._set("computedExtent",n))}_abortElevationInfoChange(){this._elevationInfoChangeAbortController&&(this._elevationInfoChangeAbortController.abort(),this._elevationInfoChangeAbortController=null)}async elevationInfoChange(){this._abortElevationInfoChange();const e=new AbortController;this._elevationInfoChangeAbortController=e;const t=he(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);this.symbolCreationContext.featureExpressionInfoContext=await de(t,this._viewSpatialReference,e.signal,s.getLogger(this)),p(e.signal),this._elevationInfoChangeAbortController=null,this._labeler?.elevationInfoChange(),this.forEachGraphics3DSymbol((e,t,i)=>{e.globalPropertyChanged("elevationInfo",t)?t?.forEach(e=>{const t=e.graphic,i=e.labelLayers;for(const r of i){r.graphics3DSymbolLayer.graphics3DGraphicLayerElevationInfoChanged(t,r)}}):this._recreateSymbol(i)}),this.updateStageLayerElevationProvider(),this._elevationAlignment?.elevationInfoChange()}updateStageLayerElevationProvider(){this._stageLayerElevationProvider?(this.layer.elevationInfo&&"relative-to-scene"===this.layer.elevationInfo.mode||0===this._numberOfGraphicsProvidingElevation)&&(this.owner.view.elevationProvider.unregister(this._stageLayerElevationProvider),this._stageLayerElevationProvider=l(this._stageLayerElevationProvider)):(!this.layer.elevationInfo||this.layer.elevationInfo&&"relative-to-scene"!==this.layer.elevationInfo.mode)&&this._numberOfGraphicsProvidingElevation>0&&(this._stageLayerElevationProvider=new Ce({layer:this.layer,stageLayer:this.stageLayer,view:this.owner.view}),this.owner.view.elevationProvider.register(2,this._stageLayerElevationProvider))}_clearSymbolsAndGraphics(){this.clear(),null!=this._filterVisibility&&this._filterVisibility.clear(),this._labeler?.reset(),this._deconflictor?.clear(),this._elevationAlignment?.clear(),this.stageLayer?.invalidateSpatialQueryAccelerator(),this._stageLayerElevationProvider&&(this.owner.view.elevationProvider.unregister(this._stageLayerElevationProvider),this._stageLayerElevationProvider=l(this._stageLayerElevationProvider))}startCreateGraphics(){this._startCreateGraphics=!0,this.recreateAllGraphics()}recreateAllGraphics(){this._recreateAllGraphics(!1)}recreateAllGraphicsAndSymbols(){this._recreateAllGraphics(!0)}_recreateAllGraphics(e=!1){if(!this._startCreateGraphics)return;const{loadedGraphics:t,view:i}=this.owner,r=i.basemapTerrain?.tilingScheme&&t?.length?t.toArray():null;!e&&r||this._clearSymbolsAndGraphics(),this.symbolCreationContext.screenSizePerspectiveEnabled=we(this.layer.screenSizePerspectiveEnabled),this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this._set("computedExtent",null),r&&(e?this.add(r):this.recreateGraphics(r))}_recreateSymbol(e){const t=this._graphicsBySymbol.get(e),i=[];t&&(t.forEach((e,t)=>{const r=e.usedMemory;this._conditionalRemove(e,t),this._spatialIndex?.remove(e),i.push(e.graphic),e.destroy(),this._removeGraphics3DGraphic(t,r),this._updateLayerVisibility(),this._featureStore.events.emit("changed"),this.owner.notifyContentGeometryUpdate?.()}),this._graphicsBySymbol.set(e,new Map));const r=this._symbols.get(e);l(r),this._symbols.delete(e),this._symbolMaterials=null,l(this._unusedSymbolsCache.pop(e)),this.add(i)}_recreateGraphicsForSymbol(e){const t=this._graphicsBySymbol.get(e);if(t){const e=[];t.forEach(t=>e.push(t.graphic)),this.recreateGraphics(e)}}_conditionalRemove(e,t){this._graphicsDrapedUids.delete(t),this._objectStates?.removeGraphic(e),this._labeler?.removeGraphic(e),this._deconflictor?.removeGraphic(e),null!=this._graphicStateTracking&&this._graphicStateTracking.removeGraphic(e)}add(e){e&&0!==e.length&&(this.owner.view.basemapTerrain?.tilingScheme?(0===this._updatePolicyForGraphics(e)?this._addDelayed(e):this._addImmediate(e),this.notifyChange("dataUpdating")):s.getLogger(this).error("#add()","Cannot add graphics before terrain surface has been initialized"))}_updatePolicyForGraphics(e){if(1===this.effectiveUpdatePolicy&&("mesh"===this.layer.geometryType||null==this.layer.geometryType))for(const t of e)if(null!=t.geometry&&"mesh"===t.geometry.type&&!t.geometry.loaded)return 0;return this.effectiveUpdatePolicy}_addImmediate(e){this._geometryWarningLogged=!1,this._symbolWarningLogged=!1;for(const t of e)this._addGraphic(t,this._getRenderingInfo(t),1);this._cleanupSymbols(),this._labeler?.setDirty(),this._deconflictor?.setDirty()}_addDelayed(e){for(const t of e){const e=t.uid;let i=this._pendingUpdates.get(e);i?i.add?0!==i.state&&i.abortController?.abort():this._pendingAdds++:(i=new ze,this._pendingAdds++,this._pendingUpdates.set(e,i)),i.add=t}this.notifyChange("readyToRun"),this.notifyChange("updatingRemaining"),this.notifyChange("dataUpdating")}remove(e){0===this.effectiveUpdatePolicy?this._removeDelayed(e):this._removeImmediate(e),this.notifyChange("dataUpdating")}_removeImmediate(e){for(const t of e)this._removeGraphic(t);this._cleanupSymbols(),this._labeler?.setDirty(),this._deconflictor?.setDirty()}_removeDelayed(e){for(const t of e){const e=t.uid,i=this._pendingUpdates.get(e);if(i)i.add&&(i.remove?i.add=null:this._pendingUpdates.delete(e),1===i.state&&i.abortController?.abort(),this._pendingAdds--);else{const i=new ze;i.remove=t,this._pendingUpdates.set(e,i),this._pendingRemoves++,this._applyPendingRemovesFirst=!0}}0===this._pendingUpdates.size&&this._finishPendingUpdates(),this.notifyChange("readyToRun"),this.notifyChange("updatingRemaining"),this.notifyChange("dataUpdating")}_finishPendingUpdates(){this._cleanupSymbols(),(this._pendingAdds||this._pendingRemoves)&&s.getLogger(this).warn("pendingAdds/Removes in inconsistent state!"),this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1}_applyFocusAreasUpdates(e){for(;this._focusAreasGraphicsQueue.length>0&&!e.done;){e.madeProgress();const t=this._focusAreasGraphicsQueue.pop(),i=fe(t.graphic.geometry);if(null==i)continue;const r=this.stage.view.focusAreasView?.containsGeometry(i)??!0;t.layers.forEach(e=>{if(e.stageObject){e.stageObject.geometries.some(e=>e.material instanceof Re&&e.material.parameters.isFocused!==r)&&this.recreateGraphics([t.graphic])}})}0===this._focusAreasGraphicsQueue.length&&this.notifyChange("readyToRun")}_applyPendingUpdates(e){if(this._geometryWarningLogged=!1,this._symbolWarningLogged=!1,0===this._pendingUpdates.size&&this._spatialIndex?.updating)return this._spatialIndex.update(),void e.madeProgress();if(this._applyPendingRemovesFirst){this._applyPendingRemovesFirst=!1;for(const[t,i]of this._pendingUpdates){if(e.done){this._applyPendingRemovesFirst=!0;break}if(i.remove&&!i.add&&(this._pendingRemoves--,e.madeProgress(),this._removeGraphic(i.remove),i.remove=null,this._pendingUpdates.delete(t),0===this._pendingRemoves))break}}for(const[t,i]of this._pendingUpdates){if(e.done)break;i.add&&0===i.state&&this._processPendingUpdateNew(i);let r=this.effectiveUpdatePolicy;if(!i.remove||i.add&&2!==i.state||(this._pendingRemoves--,e.madeProgress(),this._removeGraphic(i.remove),i.remove=null,r=1),i.add)switch(i.state){case 2:this._addGraphic(i.add,i.renderingInfo,r),i.add=null,this._pendingAdds--,e.madeProgress();break;case 3:i.add=null,this._pendingAdds--}null==i.remove&&null==i.add&&this._pendingUpdates.delete(t)}0===this._pendingUpdates.size&&(this._finishPendingUpdates(),this.notifyChange("readyToRun"),this.notifyChange("dataUpdating"))}_processPendingUpdateNew(e){if(!e.add)return void(e.state=2);const t=e.add.geometry;null==t||"mesh"!==t.type||t.loaded?this._processPendingUpdateNewRenderingInfo(e):this._processPendingUpdateNewMesh(e,t)}async _processPendingUpdateNewMesh(e,t){e.state=1,e.abortController=new AbortController;const i=e.abortController.signal;try{await t.load({signal:i})}catch(r){return this._processPendingUpdateNewError(e,r)}e.abortController=null,this._processPendingUpdateNewRenderingInfo(e)}_processPendingUpdateNewError(e,t){e.abortController=null,u(t)?e.state=0:e.state=3}async _processPendingUpdateNewRenderingInfo(e){if(null==this.layer.renderer||"dictionary"!==this.layer.renderer.type)return e.renderingInfo=this._getRenderingInfo(e.add),void(e.state=2);e.state=1,e.abortController=new AbortController;let t=null;try{t=await this._getRenderingInfoAsync(e.add,{signal:e.abortController.signal})}catch(i){return e.abortController=null,void(u(i)?e.state=0:e.state=3)}null==t?.symbol?(this._symbolWarningLogged||(this._symbolWarningLogged=!0,s.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),e.renderingInfo=null):e.renderingInfo=t,e.state=2}_addGraphic(e,t,i){if(this._graphicsWithoutSymbol.set(e.uid,e),null==t?.symbol||!Q(e))return;const r=this.stage.renderView.olidRenderHelper;if(r&&this.setUidToIdOnAdd){const t=J(this.owner.view,this.owner.layerViewUid);r.setUidToObjectAndLayerId(e.objectId,e.uid,this.layer.id,this.owner.layerViewUid,W(this.layer)&&!!this.layer.popupEnabled&&!t&&Ue(this.layer,this.owner.view.popup?.defaultPopupTemplateEnabled))}const s=t.symbol,a=this.getOrCreateGraphics3DSymbol(s,t.renderer);if(null==a)return;this._expandComputedExtent(e.geometry);const n=this._beginGraphicUpdate(e),o=new ce(e,t,this.layer);let l=!1;const h=e=>{e===a.symbol.id&&(l=!0)};this._whenSymbolRemoved.push(h);const d=()=>{if(--this._loadingSymbols,this.destroyed)return;this._whenSymbolRemoved.removeUnordered(h);if(this._graphicsWaitingForSymbol.get(e.uid)!==n||l||a.destroyed||this.graphicSymbolSupported&&e.symbol&&e.symbol.id!==a.symbol.id)--a.referenced,this._cleanupSymbols();else{const t=this._createGraphics3DGraphic(a,o);this._spatialIndex&&null!=t&&this._spatialIndex.add(t),--a.referenced,this._endGraphicUpdate(e)}this._featureStore.events.emit("changed"),this.owner.notifyContentGeometryUpdate?.(),this._labeler?.setDirty()},p=t=>{--this._loadingSymbols,this.destroyed||(this._whenSymbolRemoved.removeUnordered(h),l||(u(t)?this.add([e]):a.destroyed||this._endGraphicUpdate(e,t)))};++this._loadingSymbols,0===i?a.load(()=>this._dataUpdateQueue.push(d,null).catch(c),e=>this._dataUpdateQueue.push(()=>p(e),null).catch(c)):a.load(d,p)}_removeGraphic(e){const t=e.uid,i=this.graphics3DGraphics.get(t);if(i){i.graphics3DSymbol.onRemoveGraphic(i);const e=i.usedMemory,r=i.isElevationSource;this._conditionalRemove(i,t),this._spatialIndex?.remove(i);const s=i.graphics3DSymbol.symbol.id;this._graphicsBySymbol.get(s)?.delete(t),this._graphicsWithoutSymbol.delete(t),this._removeGraphics3DGraphic(t,e,r),i.destroy(),this._featureStore.events.emit("changed"),this.owner.notifyContentGeometryUpdate?.()}else this._graphicsWithoutSymbol.delete(t),this._graphicsWaitingForSymbol.delete(t),0===this._graphicsWaitingForSymbol.size&&(this._cleanupSymbols(),this.notifyChange("dataUpdating"))}_hasLabelingContext(e){if(e instanceof ee||e instanceof te){const t=this.symbolCreationContext.layer;return!!t.labelingInfo&&t.labelingInfo.some(t=>t.symbol===e)}return!1}_hasValidSymbolCreationContext(e){return!(e instanceof ee&&!this._hasLabelingContext(e))||(s.getLogger(this).error("LabelSymbol3D is only valid as part of a LabelClass. Using LabelSymbol3D as a renderer symbol is not supported."),!1)}_getRenderingInfo(e,t=!0){const i=e.geometry;if(null==i)return t&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,s.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!L(i.spatialReference,this._viewSpatialReference))return t&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,s.getLogger(this).warn(`Graphic in layer ${this.layer.id} has incompatible spatial reference and will not render`)),null;if(!this.graphicSymbolSupported&&null!=e.symbol)return t&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,s.getLogger(this).warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;const r=this.rendererHasGeometryOperations?N(e,this.layer,null):e;let a;if(this.owner.getRenderingInfo&&(this.getRenderingInfoWithoutRenderer||null!=this.currentRenderer))a=this.owner.getRenderingInfo(r,this.currentRenderer,this._arcadeOnDemand);else{const e=r.symbol||re(r.geometry);a=new X(null,e)}return null==a?.symbol?(t&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,s.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),null):a}_getRenderingInfoAsync(e,t){if(null==e.geometry)return this._geometryWarningLogged||(this._geometryWarningLogged=!0,s.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!this.graphicSymbolSupported&&null!=e.symbol)return this._symbolWarningLogged||(this._symbolWarningLogged=!0,s.getLogger(this).warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;const i=this.rendererHasGeometryOperations?N(e,this.layer,null):e;return this.owner.getRenderingInfoAsync(i,this.currentRenderer,this._arcadeOnDemand,t)}_createGraphics3DSymbol(e,t){if(!this._hasValidSymbolCreationContext(e))return null;const i=this._getConvertedSymbol(e);if(!i)return null;let r;if(null!=t&&"backgroundFillSymbol"in t&&t.backgroundFillSymbol){const e=se(t.backgroundFillSymbol,{ignoreDrivers:!0});null!=e.symbol&&(r=e.symbol.symbolLayers)}const s=ue(i,this.symbolCreationContext,r);return s.load(()=>{const e=s.extentPadding;e>this.extentPadding&&this._set("extentPadding",e),this.notifyChange("averageSymbolComplexity")},()=>{}),s}getOrCreateGraphics3DSymbol(e,t){let i=this._symbols.get(e.id);if(void 0===i){const r=this._unusedSymbolsCache.pop(e.id);i=null!=r?r:e instanceof ie?new ge(e,e=>this._dataUpdateQueue.push(e,null),e=>this._createGraphics3DSymbol(e,t)):this._createGraphics3DSymbol(e,t),this._symbols.set(e.id,i),this._symbolMaterials=null}return null!=i&&++i.referenced,i}trackGraphicState(e){return null==this._graphicStateTracking&&(this._graphicStateTracking=new be(this)),this._graphicStateTracking.add(e)}_addGraphics3DGraphic(e){this._usedMemory+=e.usedMemory,this.graphics3DGraphics.set(e.graphic.uid,e),this._numberOfGraphics++,e.isElevationSource&&(this._numberOfGraphicsProvidingElevation++,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_removeGraphics3DGraphic(e,t,i=!1){this._usedMemory-=t,this.graphics3DGraphics.delete(e),this._numberOfGraphics--,i&&(this._numberOfGraphicsProvidingElevation--,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_createGraphics3DGraphic(e,t){const{graphic:i}=t;if(this._graphicsWithoutSymbol.delete(i.uid),!this._symbols.has(e.symbol.id))return this.add([i]),null;if(this.graphics3DGraphics.has(i.uid))return null;const r=e.createGraphics3DGraphic(t);if(null==r)return null;this._addGraphics3DGraphic(r);const s=e.symbol.id;this._graphicsBySymbol.has(s)||this._graphicsBySymbol.set(s,new Map),this._graphicsBySymbol.get(s).set(i.uid,r);if(r.isDraped&&this._graphicsDrapedUids.add(i.uid),r.centroid=null,null!=i.geometry&&"point"!==i.geometry.type&&(r.centroid=_e(i.geometry,this._viewSpatialReference)),this._updateUserVisibility(r),null!=this._scaleVisibility&&this._scaleVisibility.updateVisibility(r),null!=this._filterVisibility){const{defaultVisibility:e}=this._filterVisibility;r.setVisibilityFlag(1,4,e),e||this._filterVisibility.reapply()}this._deconflictor?.addGraphic(r),this._labeler?.addGraphic(r),this._objectStates?.addGraphic(r),r.initialize(this.stageLayer),null!=this._graphicStateTracking&&this._graphicStateTracking.addGraphic(r);const a=this._whenGraphics3DGraphicRequests[i.uid];return a&&(delete this._whenGraphics3DGraphicRequests[i.uid],a.resolve(r)),this._symbolMaterials=null,r}async rendererChange(e){if(this._rendererChangeAbortController=n(this._rendererChangeAbortController),e!==this.currentRenderer)if(this._validateRenderer(e),null==e&&this._currentRendererChange(null,!1),Z(e))if(e?.arcadeRequired){const t=new AbortController;this._rendererChangeAbortController=t;const{arcadeUtils:i}=await this._ensureArcade();p(t);const r=i.hasGeometryOperations(e);r&&(await i.enableGeometryOperations(),p(t)),0===this.effectiveUpdatePolicy?await this._updateQueue.push(()=>this._currentRendererChange(e,r),t.signal):this._currentRendererChange(e,r),this._rendererChangeAbortController=null}else if(0===this.effectiveUpdatePolicy){const t=new AbortController;this._rendererChangeAbortController=t,await this._updateQueue.push(()=>this._currentRendererChange(e,!1),t.signal),this._rendererChangeAbortController=null}else this._currentRendererChange(e,!1);else this._currentRendererChange(e,!1)}async _ensureArcade(){return null==this._arcadeOnDemand?(this._arcadeOnDemand=await K(),this._arcadeOnDemand):this._arcadeOnDemand}_currentRendererChange(e,t){this.currentRenderer=e,this.rendererHasGeometryOperations=t,this.symbolCreationContext.arcade=this._arcadeOnDemand;const i=this.symbolCreationContext.renderer;if(e===i)return;if(this._symbolConversionCache.clear(),this._unusedSymbolsCache.clear(),null==e)return this.symbolCreationContext.renderer=null,void this.recreateAllGraphicsAndSymbols();const r=w(i,e);this._updateUnchangedSymbolMappings(r,e,i),this.symbolCreationContext.renderer=e,null!=r&&("complete"===r.type?this.recreateAllGraphicsAndSymbols():"partial"===r.type&&(this._applyRendererDiff(r,e,i)?this._labeler?.reset():this.recreateAllGraphicsAndSymbols()),this.notifyChange("averageSymbolComplexity"))}_diffHasSymbolChange(e){for(const t in e.diff)switch(t){case"visualVariables":case"defaultSymbol":case"uniqueValueInfos":break;case"uniqueValueGroups":case"authoringInfo":case"fieldDelimiter":delete e.diff[t];break;default:return!0}return!1}_applySymbolSetDiff(e,t,i){e=e||[],t=t||[];const r=[];for(const s of t){const t=this._graphicsBySymbol.get(s.id);t&&t.forEach((a,n)=>{const o=a.graphic,l=this.layer instanceof H?this.layer:null,h=this._arcadeOnDemand;if(s===i.defaultSymbol&&i.getSymbol(N(o,l,null),{arcade:h})===i.defaultSymbol)return;const d=a.usedMemory;e.length||i.defaultSymbol?r.push(o):this._graphicsWithoutSymbol.set(n,o);const p=this.graphics3DGraphics.get(n);this._conditionalRemove(p,n),a.destroy(),t.delete(n),this._removeGraphics3DGraphic(n,d),this._updateLayerVisibility()}),this._whenSymbolRemoved.forAll(e=>e(s.id))}(e.length||r.length)&&(this._graphicsWithoutSymbol.forEach(e=>r.push(e)),this._graphicsWithoutSymbol.clear(),this.add(r)),this._cleanupSymbols(),this._labeler?.setDirty(),this._deconflictor?.setDirty()}_applyUniqueValueRendererDiff(e,t,r){const s=e.diff.defaultSymbol,a=e.diff.uniqueValueInfos;if(s||a){const n=a?.changed,o=a?.unchanged;if(n&&o&&n.some(e=>o.some(t=>t.oldValue.symbol?.id===e.oldValue.symbol?.id)))return!1;const l=a?a.added.map(e=>e.symbol).filter(i):[],h=a?a.removed.map(e=>e.symbol).filter(i):[];if(n)for(let e=0;e<n.length;e++)l.push(n[e].newValue.symbol),h.push(n[e].oldValue.symbol);return s?(r.defaultSymbol&&h.push(r.defaultSymbol),t.defaultSymbol&&l.push(t.defaultSymbol)):r.defaultSymbol&&l.length&&h.push(t.defaultSymbol),this._applySymbolSetDiff(l,h,t),delete e.diff.defaultSymbol,delete e.diff.uniqueValueInfos,!0}return!1}_calculateUnchangedSymbolMapping(e,t,i){if("unique-value"!==t?.type||"unique-value"!==i?.type||null!=e&&"partial"!==e.type)return[];const r=e=>null!=e?e.id:null,s=e&&e.diff,a=s?.defaultSymbol,n=s&&s.uniqueValueInfos;let o;if(n)o=n.unchanged.map(e=>({oldId:r(e.oldValue.symbol),newId:r(e.newValue.symbol)}));else{o=[];for(const e of i.uniqueValueInfos??[]){const i=r(e.symbol),s=t.uniqueValueInfos?.find(t=>t.value===e.value);s&&i!==r(s.symbol)&&o.push({oldId:i,newId:r(s.symbol)})}}return!a&&i.defaultSymbol&&o.push({oldId:r(i.defaultSymbol),newId:r(t.defaultSymbol)}),o}_updateSymbolMapping(e,t){const i=null!=t&&t?"string"==typeof t?t:t.id:null;if(null==e||e===i)return;const r=this._graphicsBySymbol.get(e);this._graphicsBySymbol.delete(e),void 0!==r&&this._graphicsBySymbol.set(i,r);const s=this._symbols.get(e);if(void 0!==s&&(this._symbols.delete(e),this._symbols.set(i,s),this._symbolMaterials=null,null!=s)){const e="string"==typeof t?null:t;null!=e?s.symbol=e:s.symbol.id=i}}_updateUnchangedSymbolMappings(e,t,i){const r=this._calculateUnchangedSymbolMapping(e,t,i);for(const{oldId:s,newId:a}of r)this._updateSymbolMapping(s,a)}_applyRendererDiff(e,t,i){if(this._diffHasSymbolChange(e))return!1;if(t instanceof $&&i instanceof $&&this._applyUniqueValueRendererDiff(e,t,i)&&0===Object.keys(e.diff).length)return!0;for(const r of this._graphicsBySymbol.keys()){const i=this._symbols.get(r);if(null!=i)switch(i.applyRendererDiff(e,t)){case 0:this._recreateSymbol(r);break;case 1:this._recreateGraphicsForSymbol(r)}}return!0}opacityChange(){this._updateStageLayerVisibility(),this.forEachGraphics3DSymbol((e,t)=>e.globalPropertyChanged("opacity",t))}_screenSizePerspectiveEnabledChange(){this.forEachGraphics3DSymbol((e,t)=>e.globalPropertyChanged("screenSizePerspectiveEnabled",t)),this._labeler?.screenSizePerspectiveEnabledChanged(),this._deconflictor?.screenSizePerspectiveEnabledChanged()}_slicePlaneEnabledChange(e){e!==this.symbolCreationContext.slicePlaneEnabled&&(this.symbolCreationContext.slicePlaneEnabled=e,this.stageLayer.sliceable=e,this.forEachGraphics3DSymbol((e,t)=>e.globalPropertyChanged("slicePlaneEnabled",t)),this._deconflictor?.slicePlaneEnabledChange(),this._labeler?.slicePlaneEnabledChange())}_physicalBasedRenderingChange(e){this.symbolCreationContext.physicalBasedRenderingEnabled=e,this.forEachGraphics3DSymbol((e,t,i)=>{e.globalPropertyChanged("physicalBasedRenderingEnabled",t)||this._recreateSymbol(i)})}_skipHighSymbolLoDsChange(e){this.symbolCreationContext.skipHighSymbolLods=e,this.forEachGraphics3DSymbol((e,t,i)=>{e.globalPropertyChanged("skipHighSymbolLods",t)||this._recreateSymbol(i)})}_pixelRatioChange(){this.forEachGraphics3DSymbol((e,t,i)=>{e.globalPropertyChanged("pixelRatio",t)||this._recreateSymbol(i)})}_signalUpdatingDuringAsyncLoadedGraphicsChange(){this._updatingPendingLoadedGraphicsChange&&this._updatingPendingLoadedGraphicsChange.remove(),this._updatingPendingLoadedGraphicsChange=C(()=>{this._updatingPendingLoadedGraphicsChange=null})}setClippingExtent(e,t){const i=this.symbolCreationContext.clippingExtent,r=k();return Se(e,r,t)?this.symbolCreationContext.clippingExtent=T(F(),r):this.symbolCreationContext.clippingExtent=null,!M(this.symbolCreationContext.clippingExtent,i)}modifyGraphics3DGraphicVisibilities(e){if(this.destroyed)return;let t=!1;this.graphics3DGraphics.forEach(i=>{e(i)&&(t=!0)}),t&&(this._labeler?.setDirty(),this._deconflictor?.setDirty())}forEachGraphics3DSymbol(e,t){for(const[i,r]of this._symbols){if(null==r)return;e(r,this._graphicsBySymbol.get(i)||qe,i)}if(!t?.excludeUnused)for(const i of this._unusedSymbolsCache)e(i,void 0,i.symbol.id)}updateGraphicsVisibilities(){null!=this._filterVisibility&&this._filterVisibility.reapply(),this.modifyGraphics3DGraphicVisibilities(e=>{const t=this._updateUserVisibility(e),i=!!this._scaleVisibility?.updateVisibility(e);return t||i})}_hideAllGraphics(){this.modifyGraphics3DGraphicVisibilities(e=>e.setVisibilityFlag(1,1,!1))}_validateRenderer(e){const t=()=>`'${this.layer.title?`${this.layer.title}, `:""}id:${this.layer.id}'`,i=Y(e,{geometryType:this.layer?.geometryType,logWarning:(e,i)=>s.getLogger(this).warn(e,`Symbology conversion for layer ${t()}: ${i}`)});if(i){const e=`Renderer for layer ${t} is not supported in a SceneView`;s.getLogger(this).warn(e,i.message)}}_cleanupSymbols(){if(this._graphicsWaitingForSymbol.size>0||this._suspendSymbolCleanup)return;let e=!1;this._symbols.forEach((t,i)=>{if(null==t||t.referenced>0)return;const r=this._graphicsBySymbol.get(i);r&&0!==r.size||(this._graphicsBySymbol.delete(i),this._symbols.delete(i),this._symbolMaterials=null,this._unusedSymbolsCache.put(i,t,h),e=!0)}),e&&(this._recomputeExtentPadding(),this.notifyChange("averageSymbolComplexity"))}get test(){}get performanceInfo(){return new me(this.graphics3DGraphics.size,Array.from(this.graphics3DGraphics.values()).reduce((e,t)=>e+(t.isVisible()?1:0),0),this._graphicsWithoutSymbol.size,this._pendingUpdates.size)}};e([S({readOnly:!0})],ke.prototype,"computedExtent",void 0),e([S()],ke.prototype,"currentRenderer",void 0),e([S()],ke.prototype,"rendererHasGeometryOperations",void 0),e([S()],ke.prototype,"_frameTaskHandle",void 0),e([S()],ke.prototype,"_dataUpdateQueue",void 0),e([S()],ke.prototype,"_updateQueue",void 0),e([S({readOnly:!0})],ke.prototype,"_viewSpatialReference",null),e([S()],ke.prototype,"_rendererChangeAbortController",void 0),e([S()],ke.prototype,"_elevationInfoChangeAbortController",void 0),e([S()],ke.prototype,"_initializeAbortController",void 0),e([S()],ke.prototype,"_elevationAlignment",void 0),e([S()],ke.prototype,"_scaleVisibility",void 0),e([S()],ke.prototype,"_filterVisibility",void 0),e([S()],ke.prototype,"_initializePromise",void 0),e([S()],ke.prototype,"_spatialIndex",void 0),e([S({readOnly:!0})],ke.prototype,"extentPadding",void 0),e([S()],ke.prototype,"_updatingPendingLoadedGraphicsChange",void 0),e([S()],ke.prototype,"_featureStore",void 0),e([S()],ke.prototype,"_objectStates",void 0),e([S()],ke.prototype,"_loadingSymbols",void 0),e([S({constructOnly:!0})],ke.prototype,"compressionTracker",void 0),e([S()],ke.prototype,"preferredUpdatePolicy",void 0),e([S()],ke.prototype,"_forcedUpdatePolicy",void 0),e([S({readOnly:!0})],ke.prototype,"effectiveUpdatePolicy",null),e([S({constructOnly:!0})],ke.prototype,"elevationFeatureExpressionEnabled",void 0),e([S({constructOnly:!0})],ke.prototype,"owner",void 0),e([S({constructOnly:!0})],ke.prototype,"layer",void 0),e([S({constructOnly:!0})],ke.prototype,"graphicSymbolSupported",void 0),e([S({constructOnly:!0})],ke.prototype,"getRenderingInfoWithoutRenderer",void 0),e([S({constructOnly:!0})],ke.prototype,"componentFactories",void 0),e([S({constructOnly:!0})],ke.prototype,"setUidToIdOnAdd",void 0),e([S()],ke.prototype,"featureStore",null),e([S()],ke.prototype,"initializePromise",null),e([S()],ke.prototype,"scaleVisibility",null),e([S()],ke.prototype,"elevationAlignment",null),e([S()],ke.prototype,"objectStates",null),e([S()],ke.prototype,"filterVisibility",null),e([S({readOnly:!0})],ke.prototype,"updating",null),e([S({readOnly:!0})],ke.prototype,"dataUpdating",null),e([S({readOnly:!0})],ke.prototype,"readyToRun",null),e([S({readOnly:!0})],ke.prototype,"suspendedOrOutsideOfView",null),e([S({readOnly:!0,dependsOn:[]})],ke.prototype,"updatingRemaining",null),e([S({readOnly:!0})],ke.prototype,"displayFeatureLimit",null),e([S({readOnly:!0,dependsOn:[]})],ke.prototype,"averageSymbolComplexity",null),e([S({constructOnly:!0})],ke.prototype,"hasZ",void 0),e([S({constructOnly:!0})],ke.prototype,"hasM",void 0),e([S()],ke.prototype,"_objectIdField",null),ke=Fe=e([G("esri.views.3d.layers.graphics.Graphics3DCore")],ke);class ze{constructor(){this.add=null,this.renderingInfo=null,this.state=0,this.abortController=null,this.remove=null}clear(){this.add=null,this.renderingInfo=null,this.state=0,this.abortController=null,this.remove=null}}const We=10,He=D(),Be=D(),qe=new Map;export{ke as Graphics3DCore};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import{isSome as t}from"../../../../core/arrayUtils.js";import{makeHandle as r}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import i from"../../../../core/Logger.js";import{estimateAttributesMemory as a,estimateFixedArrayMemory as s,estimateNumberMemory as o}from"../../../../core/memoryEstimations.js";import{EsriPromise as n}from"../../../../core/Promise.js";import{initial as l,sync as p,watch as d}from"../../../../core/reactiveUtils.js";import{pt2px as u}from"../../../../core/screenUtils.js";import{property as h}from"../../../../core/accessorSupport/decorators/property.js";import{subclass as m}from"../../../../core/accessorSupport/decorators/subclass.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as y}from"../../../../core/support/UpdatingHandles.js";import{projectPointToVector as _}from"../../../../geometry/projection/projectPointToVector.js";import{getContinuousIndexArray as g}from"../../../../geometry/support/Indices.js";import{getResolutionForScale as f}from"../../../../geometry/support/scaleUtils.js";import{getObjectId as R}from"../../../../layers/graphics/dehydratedFeatures.js";import{convertFromPoint as F}from"../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as b}from"../../../../layers/graphics/OptimizedFeature.js";import v from"../../../../layers/graphics/OptimizedGeometry.js";import w from"../../../../layers/graphics/data/FeatureStore.js";import{isNumericField as S}from"../../../../layers/support/fieldUtils.js";import{generateGradient as P}from"../../../../renderers/support/heatmapUtils.js";import{DisplayFeatureLimit as j}from"../graphics/DisplayFeatureLimit.js";import{GraphicsCorePerformanceInfo as G}from"../graphics/GraphicsCorePerformanceInfo.js";import{FeatureVisibilityFilter as V}from"./FeatureVisibilityFilter.js";import{emptyHighlightHandle as x}from"./highlightUtils.js";import{drapedZ as T}from"../../terrain/OverlayRenderer.js";import{Attribute as M}from"../../webgl-engine/lib/Attribute.js";import{DrapedHeatmapRenderer as I}from"../../webgl-engine/lib/DrapedHeatmapRenderer.js";import{Geometry as A}from"../../webgl-engine/lib/Geometry.js";import{GeometryBaseInstance as N}from"../../webgl-engine/lib/GeometryBaseInstance.js";import{RenderGeometry as H}from"../../webgl-engine/lib/RenderGeometry.js";import{HeatmapDensityMaterial as O}from"../../webgl-engine/materials/HeatmapDensityMaterial.js";import{scaleBoundsPredicate as U,isScaleRangeActive as L}from"../../../support/layerViewUtils.js";import{PixelType as C}from"../../../webgl/enums.js";import{loadHeatmapTextureConfiguration as D,fallBackHeatmapConfiguration as E}from"../../../webgl/heatmapTextureUtils.js";const W=112;let Z=class extends n{constructor(e){super(e),this.type="heatmap",this.preferredUpdatePolicy=0,this.dataExtent=null,this.drapeSourceType=1,this._renderGeometries=new Map,this._fieldTotal=0,this._drapeSourceRenderer=null,this._dataType=C.HALF_FLOAT,this._pixelFormat=6408,this._baseInstance=new N([]),this._updatingHandles=new y}initialize(){let e;try{e=D(this._renderView.renderingContext,i.getLogger(this))}catch(m){this.addResolvingPromise(Promise.reject(m)),e=E}const{dataType:t,samplingMode:a,pixelFormat:s,internalFormat:o}=e;this._featureStore=new w({geometryType:"esriGeometryPoint",hasZ:this.hasZ,hasM:this.hasM}),this._dataType=t,this._pixelFormat=s;const n=t!==C.FLOAT,u=this.view.basemapTerrain.overlayManager,h={...this._rendererParameters,stage:this.view.stage,dataType:t,samplingMode:a,pixelFormat:s,internalFormat:o,rendererContext:u.renderer,drapeSource:this};this._drapeSourceRenderer=new I(h),u.registerDrapeSource(this,this._drapeSourceRenderer),this._material=new O({usesHalfFloats:n}),this._materialWithField=new O({usesHalfFloats:n,isAttributeDriven:!0}),this._filterVisibility=new V({context:{configuration:this.owner,featureStore:this.featureStore,getFeatureCount:()=>this._loadedPointGraphics.length,setAllFeaturesVisibility:e=>this._setAllFeaturesVisibility(e),clearFeaturesVisibility:()=>this._setAllFeaturesVisibility(!0),updateFeatureVisibilities:e=>this._updateFeatureVisibilities(e)}}),this._updatingHandles.addOnCollectionChange(()=>this._loadedPointGraphics,e=>this._onLoadedFeaturesChange(e),l),this._updatingHandles.addWhen(()=>this._materialParameters,e=>this._forEachMaterial(t=>t.setParameters(e)),l),this._updatingHandles.add(()=>this._rendererParameters,e=>this._drapeSourceRenderer.set(e)),this._updatingHandles.add(()=>this._heatmapRendererField,()=>{this._recreate()},p),this._updatingHandles.add(()=>({fieldName:this._heatmapRendererFieldName,numeric:this._heatmapRendererFieldIsNumeric}),({fieldName:e,numeric:t})=>{if(null!=e&&t){let t=0;this._featureStore.forEach(r=>t+=r.attributes[e]??0),this._fieldTotal=t}else this._fieldTotal=this._featureStore.numFeatures},l),this.addHandles([d(()=>({fieldName:this._heatmapRendererFieldName,field:this._heatmapRendererField}),({fieldName:e,field:t})=>{e&&!t&&i.getLogger(this).warn(`Heatmap renderer field '${e}' for layer '${this.layer.title??this.layer.id}' not found`)}),d(()=>({field:this._heatmapRendererField,numeric:this._heatmapRendererFieldIsNumeric}),({field:e,numeric:t})=>{null==e||t||i.getLogger(this).warn(`Heatmap renderer field '${e.name}' for layer '${this.layer.title??this.layer.id}' does not contain numeric values and cannot be used to drive the heatmap density`)}),r(()=>this.view.basemapTerrain.overlayManager.unregisterDrapeSource(this))])}destroy(){this._renderGeometries.clear(),this._material=null,this._materialWithField=null,this._featureStore.clear(),this._featureStore=null,this._updatingHandles.destroy(),this._baseInstance=null}get layer(){return this.owner.layer}get featureStore(){return this._featureStore}get updating(){return this._updatingHandles.updating||this.filterVisibility.updating}get updatingRemaining(){return 0}get suspendInfo(){return{}}get legendEnabled(){return!0}get filterVisibility(){return this._filterVisibility}get displayFeatureLimit(){const e=this.owner?.view?.quality??1,t=this.owner?.view?.qualitySettings,r=t?Math.ceil(t.heatmap.maxTotalNumberOfFeatures*e):0;return new j(r*6,r)}get hasZ(){return"hasZ"in this.layer&&!0===this.layer.hasZ}get hasM(){return"hasM"in this.layer&&this.layer.hasM}get view(){return this.owner.view}get fullOpacity(){return this.owner.fullOpacity}get updatePolicy(){return this.owner.updatePolicy}get scaleVisibilitySuspended(){if(!this._isScaleRangeActive)return!1;const{minScale:e,maxScale:t}=this.layer.effectiveScaleRange,{scale:r}=this.view;return!U(r,e??0,t??0)}get usedMemory(){const e=this.usedMemoryPerFeature*this._featureStore.numFeatures,t=6403===this._pixelFormat?1:4,r=this._dataType===C.FLOAT?4:2,i=Math.ceil((this._overlayRenderer?.overlays[0]?.resolution??0)*this._densityMapPixelRatio)??0;return i*i*t*r+e}get usedMemoryPerFeature(){const e=this._loadedPointGraphics.find(()=>!0);if(null==e)return 0;const t=a(e),r=6;return r*s([0,0,0],o)+r*s([0,0],o)+(this._heatmapRendererFieldIsNumeric?r*o:0)+t}get loadedFeatures(){return this._featureStore.numFeatures}get unprocessedMemoryEstimate(){return 0}get performanceInfo(){return new G(this._renderGeometries.size,this._visibleFeatures,0,0)}get renderer(){return this._heatmapRenderer}get _overlayRenderer(){return this.view.basemapTerrain.overlayManager.renderer}get _overlaySpatialReference(){return this._overlayRenderer.spatialReference}get _rendererParameters(){return{...this._radiusParameter,...this._densityParameters,...this._colorRampParameter,...this._pixelRatioParameter}}get _materialParameters(){return{...this._radiusParameter,...this._resolutionForScaleParameter}}get _densityParameters(){const e=this._heatmapRenderer;if(null==e)return null;const{minDensity:t,maxDensity:r}=e;return{minDensity:t,maxDensity:r,fieldTotal:this._fieldTotal}}get _radiusParameter(){const e=this._heatmapRenderer;return e?{searchRadius:u(this._clampSearchRadius(e.radius))}:null}get _resolutionForScaleParameter(){const e=this._heatmapRenderer;if(!e)return null;const{referenceScale:t}=e;return{resolutionForScale:0===t?0:f(t,this.view.spatialReference)}}get _colorRampParameter(){const e=this._heatmapRenderer;return e?{colorRampData:P(e.colorStops)}:null}get _pixelRatioParameter(){return{pixelRatio:this._densityMapPixelRatio}}get _densityMapPixelRatio(){return this.owner?.view?.qualitySettings.heatmap.pixelRatio??1}get _renderView(){return this.view.stage.renderView}get _featuresArePoints(){return"point"===this.layer.geometryType}get _loadedPointGraphics(){return this.owner.loadedGraphics}get _heatmapRenderer(){const e=this.layer.renderer;return"heatmap"===e?.type?e:null}get _heatmapRendererFieldName(){return this._heatmapRenderer?.field}get _heatmapRendererField(){const e=this._heatmapRendererFieldName;return null!=e?this.layer.fieldsIndex.get(e):null}get _heatmapRendererFieldIsNumeric(){const e=this._heatmapRendererField;return null!=e&&S(e)}get _isScaleRangeActive(){const{layer:e}=this;if(!("effectiveScaleRange"in e))return!1;const{minScale:t,maxScale:r}=e.effectiveScaleRange;return L(t,r)}get _visibleFeatures(){return Array.from(this._renderGeometries.values()).reduce((e,{visible:t})=>e+(t?1:0),0)}async whenGraphicBounds(){return null}computeAttachmentOrigin(){return null}highlightByGraphics(){return x}highlightByObjectIds(){return x}maskOccludee(){return r()}setObjectIdVisibility(){}refreshFilter(){this.filterVisibility.reapply()}_onLoadedFeaturesChange(e){if(!this._featuresArePoints)return;const{objectIdField:r}=this.layer;this._featureStore.removeManyById(e.removed.map(e=>R(e,r))),this._featureStore.addMany(e.added.map(e=>{const{attributes:t,centroid:i,geometry:a}=e,s=new b(F(new v,a),t,i?F(new v,i):null,R(e,r));return s.displayId=e.uid,s}));const i=e.added,a=e.removed;this._fieldTotal+=this._computeFieldTotalChange(i,a);const s=a.map(({uid:e})=>{const t=this._renderGeometries.get(e);return this._renderGeometries.delete(e),t}).filter(t),o=i.map(e=>{const t=this._pointGraphicToRenderGeometry(e);return this._renderGeometries.set(e.uid,t),t});s.length>0&&this._drapeSourceRenderer.removeGeometries(s,2),o.length>0&&this._drapeSourceRenderer.addGeometries(o,0),(o.length>0||s.length>0)&&(this.filterVisibility.reapply(),this._renderView.requestRender())}_recreate(){if(!this._loadedPointGraphics)return;const e=this._loadedPointGraphics.toArray();this._onLoadedFeaturesChange({added:e,removed:e})}_pointGraphicToRenderGeometry(e){const t=this._heatmapRendererFieldName,r=null!=t?this._materialWithField:this._material,i=c();_(e.geometry,i,this._overlaySpatialReference),i[2]=T;const a=g(1),s=[["position",new M(i,a,i.length)]],o=this._heatmapRendererFieldIsNumeric;null!=t&&s.push(["featureAttribute",new M([o?e.attributes[t]??0:0],a,1)]);const n=new H(new A(r,s,null,1,null,void 0,this._baseInstance),{layerViewUid:this.owner.layerViewUid,graphicUid:e.uid});return n.visible=this.filterVisibility.defaultVisibility,n}_forEachMaterial(e){e(this._material),e(this._materialWithField)}_computeFieldTotalChange(e,t){if(null==this._heatmapRendererFieldName||!this._heatmapRendererFieldIsNumeric)return e.length-t.length;const r=this._heatmapRendererFieldName,i=(e,t)=>e+(t.attributes[r]??0);return e.reduce(i,0)-t.reduce(i,0)}_clampSearchRadius(e){return e>W&&i.getLogger(this).warnOnce(`SceneView supports a maximum radius of ${W} pt for HeatmapRenderer.`),Math.min(e,W)}_updateFeatureVisibilities(e){const t=[];this._featureStore.forEach(({objectId:r,displayId:i})=>{const a=e(r),s=this._renderGeometries.get(i);s&&s.visible!==a&&(t.push(s),s.visible=a)}),this._drapeSourceRenderer.modifyGeometries(t,1)}_setAllFeaturesVisibility(e){const t=[];for(const r of this._renderGeometries.values())r.visible!==e&&(t.push(r),r.visible=e);this._drapeSourceRenderer.modifyGeometries(t,1)}get test(){}};e([h()],Z.prototype,"type",void 0),e([h({constructOnly:!0})],Z.prototype,"owner",void 0),e([h()],Z.prototype,"layer",null),e([h()],Z.prototype,"featureStore",null),e([h()],Z.prototype,"updating",null),e([h()],Z.prototype,"updatingRemaining",null),e([h()],Z.prototype,"suspendInfo",null),e([h()],Z.prototype,"legendEnabled",null),e([h()],Z.prototype,"filterVisibility",null),e([h()],Z.prototype,"displayFeatureLimit",null),e([h()],Z.prototype,"preferredUpdatePolicy",void 0),e([h()],Z.prototype,"hasZ",null),e([h()],Z.prototype,"hasM",null),e([h()],Z.prototype,"dataExtent",void 0),e([h()],Z.prototype,"view",null),e([h()],Z.prototype,"fullOpacity",null),e([h()],Z.prototype,"updatePolicy",null),e([h()],Z.prototype,"drapeSourceType",void 0),e([h()],Z.prototype,"scaleVisibilitySuspended",null),e([h()],Z.prototype,"renderer",null),e([h()],Z.prototype,"_featureStore",void 0),e([h()],Z.prototype,"_filterVisibility",void 0),e([h()],Z.prototype,"_overlayRenderer",null),e([h()],Z.prototype,"_overlaySpatialReference",null),e([h()],Z.prototype,"_rendererParameters",null),e([h()],Z.prototype,"_materialParameters",null),e([h()],Z.prototype,"_densityParameters",null),e([h()],Z.prototype,"_radiusParameter",null),e([h()],Z.prototype,"_resolutionForScaleParameter",null),e([h()],Z.prototype,"_colorRampParameter",null),e([h()],Z.prototype,"_pixelRatioParameter",null),e([h()],Z.prototype,"_densityMapPixelRatio",null),e([h()],Z.prototype,"_renderGeometries",void 0),e([h()],Z.prototype,"_material",void 0),e([h()],Z.prototype,"_materialWithField",void 0),e([h()],Z.prototype,"_renderView",null),e([h()],Z.prototype,"_featuresArePoints",null),e([h()],Z.prototype,"_loadedPointGraphics",null),e([h()],Z.prototype,"_heatmapRenderer",null),e([h()],Z.prototype,"_heatmapRendererFieldName",null),e([h()],Z.prototype,"_heatmapRendererField",null),e([h()],Z.prototype,"_heatmapRendererFieldIsNumeric",null),e([h()],Z.prototype,"_fieldTotal",void 0),e([h()],Z.prototype,"_drapeSourceRenderer",void 0),e([h()],Z.prototype,"_isScaleRangeActive",null),Z=e([m("esri.views.3d.layers.support.HeatmapFeatureProcessor")],Z);export{Z as HeatmapFeatureProcessor,W as maxRadiusPt};
|
|
5
|
+
import{__decorate as e}from"tslib";import{isSome as t}from"../../../../core/arrayUtils.js";import{makeHandle as r}from"../../../../core/handleUtils.js";import"../../../../core/has.js";import i from"../../../../core/Logger.js";import{estimateAttributesMemory as a,estimateFixedArrayMemory as s,estimateNumberMemory as o}from"../../../../core/memoryEstimations.js";import{EsriPromise as n}from"../../../../core/Promise.js";import{initial as l,sync as d,watch as p}from"../../../../core/reactiveUtils.js";import{pt2px as u}from"../../../../core/screenUtils.js";import{property as h}from"../../../../core/accessorSupport/decorators/property.js";import{subclass as m}from"../../../../core/accessorSupport/decorators/subclass.js";import{create as c}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as y}from"../../../../core/support/UpdatingHandles.js";import{projectPointToVector as _}from"../../../../geometry/projection/projectPointToVector.js";import{getContinuousIndexArray as g}from"../../../../geometry/support/Indices.js";import{getResolutionForScale as f}from"../../../../geometry/support/scaleUtils.js";import{getObjectId as R}from"../../../../layers/graphics/dehydratedFeatures.js";import{convertFromPoint as F}from"../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as v}from"../../../../layers/graphics/OptimizedFeature.js";import b from"../../../../layers/graphics/OptimizedGeometry.js";import w from"../../../../layers/graphics/data/FeatureStore.js";import{isNumericField as S}from"../../../../layers/support/fieldUtils.js";import{generateGradient as P}from"../../../../renderers/support/heatmapUtils.js";import{DisplayFeatureLimit as j}from"../graphics/DisplayFeatureLimit.js";import{GraphicsCorePerformanceInfo as G}from"../graphics/GraphicsCorePerformanceInfo.js";import{FeatureVisibilityFilter as V}from"./FeatureVisibilityFilter.js";import{emptyHighlightHandle as x}from"./highlightUtils.js";import{drapedZ as M}from"../../terrain/OverlayRenderer.js";import{Attribute as T}from"../../webgl-engine/lib/Attribute.js";import{DrapedHeatmapRenderer as I}from"../../webgl-engine/lib/DrapedHeatmapRenderer.js";import{Geometry as A}from"../../webgl-engine/lib/Geometry.js";import{GeometryBaseInstance as N}from"../../webgl-engine/lib/GeometryBaseInstance.js";import{RenderGeometry as H}from"../../webgl-engine/lib/RenderGeometry.js";import{HeatmapDensityMaterial as O}from"../../webgl-engine/materials/HeatmapDensityMaterial.js";import{scaleBoundsPredicate as U,isScaleRangeActive as L}from"../../../support/layerViewUtils.js";import{PixelType as C}from"../../../webgl/enums.js";import{loadHeatmapTextureConfiguration as D,fallBackHeatmapConfiguration as E}from"../../../webgl/heatmapTextureUtils.js";const W=112;let Z=class extends n{constructor(e){super(e),this.type="heatmap",this.preferredUpdatePolicy=0,this.dataExtent=null,this.drapeSourceType=1,this._renderGeometries=new Map,this._fieldTotal=0,this._drapeSourceRenderer=null,this._dataType=C.HALF_FLOAT,this._pixelFormat=6408,this._baseInstance=new N([]),this._updatingHandles=new y}initialize(){let e;try{e=D(this._renderView.renderingContext,i.getLogger(this))}catch(m){this.addResolvingPromise(Promise.reject(m)),e=E}const{dataType:t,samplingMode:a,pixelFormat:s,internalFormat:o}=e;this._featureStore=new w({geometryType:"esriGeometryPoint",hasZ:this.hasZ,hasM:this.hasM}),this._dataType=t,this._pixelFormat=s;const n=t!==C.FLOAT,u=this.view.overlayManager,h={...this._rendererParameters,stage:this.view.stage,dataType:t,samplingMode:a,pixelFormat:s,internalFormat:o,rendererContext:u.renderer,drapeSource:this};this._drapeSourceRenderer=new I(h),u.registerDrapeSource(this,this._drapeSourceRenderer),this._material=new O({usesHalfFloats:n}),this._materialWithField=new O({usesHalfFloats:n,isAttributeDriven:!0}),this._filterVisibility=new V({context:{configuration:this.owner,featureStore:this.featureStore,getFeatureCount:()=>this._loadedPointGraphics.length,setAllFeaturesVisibility:e=>this._setAllFeaturesVisibility(e),clearFeaturesVisibility:()=>this._setAllFeaturesVisibility(!0),updateFeatureVisibilities:e=>this._updateFeatureVisibilities(e)}}),this._updatingHandles.addOnCollectionChange(()=>this._loadedPointGraphics,e=>this._onLoadedFeaturesChange(e),l),this._updatingHandles.addWhen(()=>this._materialParameters,e=>this._forEachMaterial(t=>t.setParameters(e)),l),this._updatingHandles.add(()=>this._rendererParameters,e=>this._drapeSourceRenderer.set(e)),this._updatingHandles.add(()=>this._heatmapRendererField,()=>{this._recreate()},d),this._updatingHandles.add(()=>({fieldName:this._heatmapRendererFieldName,numeric:this._heatmapRendererFieldIsNumeric}),({fieldName:e,numeric:t})=>{if(null!=e&&t){let t=0;this._featureStore.forEach(r=>t+=r.attributes[e]??0),this._fieldTotal=t}else this._fieldTotal=this._featureStore.numFeatures},l),this.addHandles([p(()=>({fieldName:this._heatmapRendererFieldName,field:this._heatmapRendererField}),({fieldName:e,field:t})=>{e&&!t&&i.getLogger(this).warn(`Heatmap renderer field '${e}' for layer '${this.layer.title??this.layer.id}' not found`)}),p(()=>({field:this._heatmapRendererField,numeric:this._heatmapRendererFieldIsNumeric}),({field:e,numeric:t})=>{null==e||t||i.getLogger(this).warn(`Heatmap renderer field '${e.name}' for layer '${this.layer.title??this.layer.id}' does not contain numeric values and cannot be used to drive the heatmap density`)}),r(()=>this.view.overlayManager.unregisterDrapeSource(this))])}destroy(){this._renderGeometries.clear(),this._material=null,this._materialWithField=null,this._featureStore.clear(),this._featureStore=null,this._updatingHandles.destroy(),this._baseInstance=null}get layer(){return this.owner.layer}get featureStore(){return this._featureStore}get updating(){return this._updatingHandles.updating||this.filterVisibility.updating}get updatingRemaining(){return 0}get suspendInfo(){return{}}get legendEnabled(){return!0}get filterVisibility(){return this._filterVisibility}get displayFeatureLimit(){const e=this.owner?.view?.quality??1,t=this.owner?.view?.qualitySettings,r=t?Math.ceil(t.heatmap.maxTotalNumberOfFeatures*e):0;return new j(r*6,r)}get hasZ(){return"hasZ"in this.layer&&!0===this.layer.hasZ}get hasM(){return"hasM"in this.layer&&this.layer.hasM}get view(){return this.owner.view}get fullOpacity(){return this.owner.fullOpacity}get updatePolicy(){return this.owner.updatePolicy}get scaleVisibilitySuspended(){if(!this._isScaleRangeActive)return!1;const{minScale:e,maxScale:t}=this.layer.effectiveScaleRange,{scale:r}=this.view;return!U(r,e??0,t??0)}get usedMemory(){const e=this.usedMemoryPerFeature*this._featureStore.numFeatures,t=6403===this._pixelFormat?1:4,r=this._dataType===C.FLOAT?4:2,i=Math.ceil((this._overlayRenderer?.overlays[0]?.resolution??0)*this._densityMapPixelRatio)??0;return i*i*t*r+e}get usedMemoryPerFeature(){const e=this._loadedPointGraphics.find(()=>!0);if(null==e)return 0;const t=a(e),r=6;return r*s([0,0,0],o)+r*s([0,0],o)+(this._heatmapRendererFieldIsNumeric?r*o:0)+t}get loadedFeatures(){return this._featureStore.numFeatures}get unprocessedMemoryEstimate(){return 0}get performanceInfo(){return new G(this._renderGeometries.size,this._visibleFeatures,0,0)}get renderer(){return this._heatmapRenderer}get _overlayRenderer(){return this.view.overlayManager.renderer}get _overlaySpatialReference(){return this.view.overlayManager.spatialReference}get _rendererParameters(){return{...this._radiusParameter,...this._densityParameters,...this._colorRampParameter,...this._pixelRatioParameter}}get _materialParameters(){return{...this._radiusParameter,...this._resolutionForScaleParameter}}get _densityParameters(){const e=this._heatmapRenderer;if(null==e)return null;const{minDensity:t,maxDensity:r}=e;return{minDensity:t,maxDensity:r,fieldTotal:this._fieldTotal}}get _radiusParameter(){const e=this._heatmapRenderer;return e?{searchRadius:u(this._clampSearchRadius(e.radius))}:null}get _resolutionForScaleParameter(){const e=this._heatmapRenderer;if(!e)return null;const{referenceScale:t}=e;return{resolutionForScale:0===t?0:f(t,this.view.spatialReference)}}get _colorRampParameter(){const e=this._heatmapRenderer;return e?{colorRampData:P(e.colorStops)}:null}get _pixelRatioParameter(){return{pixelRatio:this._densityMapPixelRatio}}get _densityMapPixelRatio(){return this.owner?.view?.qualitySettings.heatmap.pixelRatio??1}get _renderView(){return this.view.stage.renderView}get _featuresArePoints(){return"point"===this.layer.geometryType}get _loadedPointGraphics(){return this.owner.loadedGraphics}get _heatmapRenderer(){const e=this.layer.renderer;return"heatmap"===e?.type?e:null}get _heatmapRendererFieldName(){return this._heatmapRenderer?.field}get _heatmapRendererField(){const e=this._heatmapRendererFieldName;return null!=e?this.layer.fieldsIndex.get(e):null}get _heatmapRendererFieldIsNumeric(){const e=this._heatmapRendererField;return null!=e&&S(e)}get _isScaleRangeActive(){const{layer:e}=this;if(!("effectiveScaleRange"in e))return!1;const{minScale:t,maxScale:r}=e.effectiveScaleRange;return L(t,r)}get _visibleFeatures(){return Array.from(this._renderGeometries.values()).reduce((e,{visible:t})=>e+(t?1:0),0)}async whenGraphicBounds(){return null}computeAttachmentOrigin(){return null}highlightByGraphics(){return x}highlightByObjectIds(){return x}maskOccludee(){return r()}setObjectIdVisibility(){}refreshFilter(){this.filterVisibility.reapply()}_onLoadedFeaturesChange(e){if(!this._featuresArePoints)return;const{objectIdField:r}=this.layer;this._featureStore.removeManyById(e.removed.map(e=>R(e,r))),this._featureStore.addMany(e.added.map(e=>{const{attributes:t,centroid:i,geometry:a}=e,s=new v(F(new b,a),t,i?F(new b,i):null,R(e,r));return s.displayId=e.uid,s}));const i=e.added,a=e.removed;this._fieldTotal+=this._computeFieldTotalChange(i,a);const s=a.map(({uid:e})=>{const t=this._renderGeometries.get(e);return this._renderGeometries.delete(e),t}).filter(t),o=i.map(e=>{const t=this._pointGraphicToRenderGeometry(e);return this._renderGeometries.set(e.uid,t),t});s.length>0&&this._drapeSourceRenderer.removeGeometries(s,2),o.length>0&&this._drapeSourceRenderer.addGeometries(o,0),(o.length>0||s.length>0)&&(this.filterVisibility.reapply(),this._renderView.requestRender())}_recreate(){if(!this._loadedPointGraphics)return;const e=this._loadedPointGraphics.toArray();this._onLoadedFeaturesChange({added:e,removed:e})}_pointGraphicToRenderGeometry(e){const t=this._heatmapRendererFieldName,r=null!=t?this._materialWithField:this._material,i=c();_(e.geometry,i,this._overlaySpatialReference),i[2]=M;const a=g(1),s=[["position",new T(i,a,i.length)]],o=this._heatmapRendererFieldIsNumeric;null!=t&&s.push(["featureAttribute",new T([o?e.attributes[t]??0:0],a,1)]);const n=new H(new A(r,s,null,1,null,void 0,this._baseInstance),{layerViewUid:this.owner.layerViewUid,graphicUid:e.uid});return n.visible=this.filterVisibility.defaultVisibility,n}_forEachMaterial(e){e(this._material),e(this._materialWithField)}_computeFieldTotalChange(e,t){if(null==this._heatmapRendererFieldName||!this._heatmapRendererFieldIsNumeric)return e.length-t.length;const r=this._heatmapRendererFieldName,i=(e,t)=>e+(t.attributes[r]??0);return e.reduce(i,0)-t.reduce(i,0)}_clampSearchRadius(e){return e>W&&i.getLogger(this).warnOnce(`SceneView supports a maximum radius of ${W} pt for HeatmapRenderer.`),Math.min(e,W)}_updateFeatureVisibilities(e){const t=[];this._featureStore.forEach(({objectId:r,displayId:i})=>{const a=e(r),s=this._renderGeometries.get(i);s&&s.visible!==a&&(t.push(s),s.visible=a)}),this._drapeSourceRenderer.modifyGeometries(t,1)}_setAllFeaturesVisibility(e){const t=[];for(const r of this._renderGeometries.values())r.visible!==e&&(t.push(r),r.visible=e);this._drapeSourceRenderer.modifyGeometries(t,1)}get test(){}};e([h()],Z.prototype,"type",void 0),e([h({constructOnly:!0})],Z.prototype,"owner",void 0),e([h()],Z.prototype,"layer",null),e([h()],Z.prototype,"featureStore",null),e([h()],Z.prototype,"updating",null),e([h()],Z.prototype,"updatingRemaining",null),e([h()],Z.prototype,"suspendInfo",null),e([h()],Z.prototype,"legendEnabled",null),e([h()],Z.prototype,"filterVisibility",null),e([h()],Z.prototype,"displayFeatureLimit",null),e([h()],Z.prototype,"preferredUpdatePolicy",void 0),e([h()],Z.prototype,"hasZ",null),e([h()],Z.prototype,"hasM",null),e([h()],Z.prototype,"dataExtent",void 0),e([h()],Z.prototype,"view",null),e([h()],Z.prototype,"fullOpacity",null),e([h()],Z.prototype,"updatePolicy",null),e([h()],Z.prototype,"drapeSourceType",void 0),e([h()],Z.prototype,"scaleVisibilitySuspended",null),e([h()],Z.prototype,"renderer",null),e([h()],Z.prototype,"_featureStore",void 0),e([h()],Z.prototype,"_filterVisibility",void 0),e([h()],Z.prototype,"_overlayRenderer",null),e([h()],Z.prototype,"_overlaySpatialReference",null),e([h()],Z.prototype,"_rendererParameters",null),e([h()],Z.prototype,"_materialParameters",null),e([h()],Z.prototype,"_densityParameters",null),e([h()],Z.prototype,"_radiusParameter",null),e([h()],Z.prototype,"_resolutionForScaleParameter",null),e([h()],Z.prototype,"_colorRampParameter",null),e([h()],Z.prototype,"_pixelRatioParameter",null),e([h()],Z.prototype,"_densityMapPixelRatio",null),e([h()],Z.prototype,"_renderGeometries",void 0),e([h()],Z.prototype,"_material",void 0),e([h()],Z.prototype,"_materialWithField",void 0),e([h()],Z.prototype,"_renderView",null),e([h()],Z.prototype,"_featuresArePoints",null),e([h()],Z.prototype,"_loadedPointGraphics",null),e([h()],Z.prototype,"_heatmapRenderer",null),e([h()],Z.prototype,"_heatmapRendererFieldName",null),e([h()],Z.prototype,"_heatmapRendererField",null),e([h()],Z.prototype,"_heatmapRendererFieldIsNumeric",null),e([h()],Z.prototype,"_fieldTotal",void 0),e([h()],Z.prototype,"_drapeSourceRenderer",void 0),e([h()],Z.prototype,"_isScaleRangeActive",null),Z=e([m("esri.views.3d.layers.support.HeatmapFeatureProcessor")],Z);export{Z as HeatmapFeatureProcessor,W as maxRadiusPt};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as o}from"tslib";import r from"../../../../core/Accessor.js";import{property as s}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as t}from"../../../../core/accessorSupport/decorators/subclass.js";let e=class extends r{constructor(o){super(o),this.editSourcePoints=!1}};o([s()],e.prototype,"editSourcePoints",void 0),e=o([t("esri.views.3d.layers.support.MediaLayerInteractionOptions.ReshapeOptions")],e);let p=class extends r{constructor(o){super(o),this.tool="transform",this.reshapeOptions=new e}};o([s()],p.prototype,"tool",void 0),o([s({type:e})],p.prototype,"reshapeOptions",void 0),p=o([t("esri.views.3d.layers.support.MediaLayerInteractionOptions")],p);export{p as MediaLayerInteractionOptions};
|
|
5
|
+
import{__decorate as o}from"tslib";import r from"../../../../core/Accessor.js";import{property as s}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as t}from"../../../../core/accessorSupport/decorators/subclass.js";let e=class extends r{constructor(o){super(o),this.editSourcePoints=!1}};o([s()],e.prototype,"editSourcePoints",void 0),e=o([t("esri.views.3d.layers.support.MediaLayerInteractionOptions.ReshapeOptions")],e);let p=class extends r{constructor(o){super(o),this.tool="transform",this.reshapeOptions=new e}};o([s()],p.prototype,"tool",void 0),o([s({type:e})],p.prototype,"reshapeOptions",void 0),p=o([t("esri.views.3d.layers.support.MediaLayerInteractionOptions")],p);export{p as MediaLayerInteractionOptions,e as ReshapeOptions};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../../core/has.js";import e from"../../../../core/PooledArray.js";import{createRenderScreenPointArray3 as t,castRenderScreenPointArray3 as r}from"../../../../core/screenUtils.js";import{getMetersPerVerticalUnitForSR as n}from"../../../../core/unitUtils.js";import{f as i,n as s,e as o}from"../../../../chunks/vec32.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as a,copy as c,negativeInfinity as u,width as h,height as p,expandPointInPlace as d}from"../../../../geometry/support/aaBoundingRect.js";import{create as m}from"../../../../geometry/support/ray.js";import{sv3d as y}from"../../../../geometry/support/vectorStacks.js";import{getElevationOffsetInMeters as f}from"../../../../support/elevationInfoUtils.js";import{computeMapPointFromVec3d as g}from"../../support/hitTest.js";import{fromRenderAtEye as _,fromScreen as w}from"../../support/geometryUtils/ray.js";import{defaultTolerance as R,Intersector as b}from"../../webgl-engine/lib/Intersector.js";import{isValidIntersectorResult as v}from"../../webgl-engine/lib/IntersectorResult.js";import{sliceFilterPredicate as I}from"../../webgl-engine/lib/intersectorUtils.js";import{HUDMaterial as P}from"../../webgl-engine/materials/HUDMaterial.js";class j{constructor(t,r,n){this.viewingMode=t,this._forEachLayer=r,this._view=n,this._externalIntersectionHandlers=new e,this._tolerance=R,this._tmpRay=m(),this._tmpRegion=a(),this._validateHUDIntersector=new b(this.viewingMode),this._validateHUDIntersector.options.hud=!1}destroy(){this._externalIntersectionHandlers.prune()}intersectScreen(e,t,r){return this.intersectRay(this._getPickRay(e,this._tmpRay),L(this.viewingMode),t,r)}intersectScreenFreePointFallback(e,t,r){return this.intersectRayFreePointFallback(this._getPickRay(e,this._tmpRay),t,r)}intersectRayFreePointFallback(e,t,r){return this.intersectRay(e,L(this.viewingMode),t,r)||this._intersectRayFreePointLocal(e,t)}intersectRay(e,t,r,n){return t.options.selectionMode=!1,t.options.store=0,this.computeIntersection(e,t,!1,n),!!t.results.min&&t.results.min.getIntersectionPoint(r)}getCenterRayWithSubpixelOffset(e,t,r=.5,n=.5){return e.getRenderCenter(F,r,n),F[0]+=.0466,F[1]-=.0123,_(e,F,t)}intersectIntersectorScreen(e,t,r){this.computeIntersection(this._getPickRay(e,this._tmpRay),t,!1,r)}intersectToolIntersectorScreen(e,t,r){const n=this._getPickRay(e,this._tmpRay);this.intersectToolIntersectorRay(n,t,r)}intersectToolIntersectorRay(e,t,r){t.options.selectionMode=!0,this.computeIntersection(e,t,!1,r);const n=t.results.min;!!this._view.basemapTerrain&&this._view.basemapTerrain.opaque||v(n)&&7!==n.intersector||(t.options.selectionMode=!1,this.computeIntersection(e,t,!1,r))}setTolerance(e=R){this._tolerance=e}addIntersectionHandler(e){this._externalIntersectionHandlers.push(e),this._externalIntersectionHandlers.sort((e,t)=>7===e.type?1:7===t.type?-1:0)}removeIntersectionHandler(e){null!=this._externalIntersectionHandlers.removeUnordered(e)&&this._externalIntersectionHandlers.sort((e,t)=>7===e.type?1:7===t.type?-1:0)}_getPickRay(e,t){const r=this._view.state.camera;return w(r,e,t)}_intersectRayFreePointLocal(e,t){return 2!==this.viewingMode||null==e||i(t,e.origin,s(y.get(),e.direction)),!1}intersectElevationFromScreen(e,t,r=0,n=null){return this._intersectElevation(this._getPickRay(e,this._tmpRay),t,r,n)}_intersectElevation(e,t,l=0,a=null){if(null==e)return null;const c=this._view,{renderCoordsHelper:u}=c,h=n(c.spatialReference),p=null!=t?t.mode:"absolute-height",d=f(t)/h,m=("on-the-ground"!==p?d+l:0)*h/u.unitInMeters,{camera:_}=c.state;if("absolute-height"===p){const t=u?.getAltitude(_.eye),r=o(s(E,e.direction),u.worldUpAtPosition(_.eye,V));if(t<m&&r<0||t>=m&&r>0)return null;if(u.intersectInfiniteManifold(e,m,E)){const e=g(c,E);return e.z??=0,e.z-=d,e}return null}const w=_.projectToRenderScreen(e.origin,r(y.get())),R=new k(null,this._forEachLayer),v=c.slice.plane,P=null!=v?I(v):null,j=new b(this.viewingMode);j.options.store=0,j.options.verticalOffset=m,j.options.normalRequired=!1;const U=e.origin,x=i(y.get(),U,e.direction);j.reset(U,x,_),j.point=w;let M=null;if(a&&"type"in a&&"graphics"===a.type){const e=c.allLayerViews.find(e=>e.layer===a)?.uid;M=e?t=>t.layerViewUid===e:null}else a&&(M=e=>e.graphicUid!==a.uid);switch(p){case"relative-to-scene":{const e=e=>(!M||M(e))&&!!e.lastValidElevationBB;j.intersect(R.layers,w,this._tolerance,null,e),this._externalIntersectionHandlers.forAll(e=>{if(2===e.type||7===e.type||8===e.type){const t=e.slicePlaneEnabled?P:null;e.intersect(j,t,j.rayBegin,j.rayEnd,w,!1)}});break}case"on-the-ground":case"relative-to-ground":this._externalIntersectionHandlers.forAll(e=>{if(e.isGround){const t=e.slicePlaneEnabled?P:null;e.intersect(j,t,j.rayBegin,j.rayEnd,w,!1)}})}if(j.results.min.getIntersectionPoint(E)){const e=g(c,E);return e.z=l,e}return null}computeIntersection(e,t,n,s){if(null==e)return;const o=this._view.state.camera,l=o.projectToRenderScreen(e.origin,r(y.get())),a=new k(s,this._forEachLayer);t.options.selectOpaqueTerrainOnly=!s||!("include"in s||"exclude"in s);const c=e.origin,u=i(y.get(),e.origin,e.direction);t.reset(c,u,o),t.intersect(a.layers,l,this._tolerance);const h=this._view.slice.plane,p=null!=h?I(h):null;t.intersect(a.sliceableLayers,l,this._tolerance,p);const d=s&&(s.requiresGroundFeedback||s.enableDraped);this._externalIntersectionHandlers.forAll(e=>{const r=e.layerViewUid,i=e.sublayerId,s=Array.isArray(r),o=s?r:[r];s&&(t.options.filteredLayerViewUids=[]);let h=!1;for(const n of o)a.filterLayerViewUid(n,i)?h=!0:s&&t.options.filteredLayerViewUids.push(n);if(t.options.isFiltered=!h,e.isGround&&d||!t.options.isFiltered){const r=e.slicePlaneEnabled?p:null;e.intersect(t,r,c,u,l,n)}});const m=y.get(),f=this._view.basemapTerrain;if(s&&s.enableDraped&&null!=
|
|
5
|
+
import"../../../../core/has.js";import e from"../../../../core/PooledArray.js";import{createRenderScreenPointArray3 as t,castRenderScreenPointArray3 as r}from"../../../../core/screenUtils.js";import{getMetersPerVerticalUnitForSR as n}from"../../../../core/unitUtils.js";import{f as i,n as s,e as o}from"../../../../chunks/vec32.js";import{create as l}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{create as a,copy as c,negativeInfinity as u,width as h,height as p,expandPointInPlace as d}from"../../../../geometry/support/aaBoundingRect.js";import{create as m}from"../../../../geometry/support/ray.js";import{sv3d as y}from"../../../../geometry/support/vectorStacks.js";import{getElevationOffsetInMeters as f}from"../../../../support/elevationInfoUtils.js";import{computeMapPointFromVec3d as g}from"../../support/hitTest.js";import{fromRenderAtEye as _,fromScreen as w}from"../../support/geometryUtils/ray.js";import{defaultTolerance as R,Intersector as b}from"../../webgl-engine/lib/Intersector.js";import{isValidIntersectorResult as v}from"../../webgl-engine/lib/IntersectorResult.js";import{sliceFilterPredicate as I}from"../../webgl-engine/lib/intersectorUtils.js";import{HUDMaterial as P}from"../../webgl-engine/materials/HUDMaterial.js";class j{constructor(t,r,n){this.viewingMode=t,this._forEachLayer=r,this._view=n,this._externalIntersectionHandlers=new e,this._tolerance=R,this._tmpRay=m(),this._tmpRegion=a(),this._validateHUDIntersector=new b(this.viewingMode),this._validateHUDIntersector.options.hud=!1}destroy(){this._externalIntersectionHandlers.prune()}intersectScreen(e,t,r){return this.intersectRay(this._getPickRay(e,this._tmpRay),L(this.viewingMode),t,r)}intersectScreenFreePointFallback(e,t,r){return this.intersectRayFreePointFallback(this._getPickRay(e,this._tmpRay),t,r)}intersectRayFreePointFallback(e,t,r){return this.intersectRay(e,L(this.viewingMode),t,r)||this._intersectRayFreePointLocal(e,t)}intersectRay(e,t,r,n){return t.options.selectionMode=!1,t.options.store=0,this.computeIntersection(e,t,!1,n),!!t.results.min&&t.results.min.getIntersectionPoint(r)}getCenterRayWithSubpixelOffset(e,t,r=.5,n=.5){return e.getRenderCenter(F,r,n),F[0]+=.0466,F[1]-=.0123,_(e,F,t)}intersectIntersectorScreen(e,t,r){this.computeIntersection(this._getPickRay(e,this._tmpRay),t,!1,r)}intersectToolIntersectorScreen(e,t,r){const n=this._getPickRay(e,this._tmpRay);this.intersectToolIntersectorRay(n,t,r)}intersectToolIntersectorRay(e,t,r){t.options.selectionMode=!0,this.computeIntersection(e,t,!1,r);const n=t.results.min;!!this._view.basemapTerrain&&this._view.basemapTerrain.opaque||v(n)&&7!==n.intersector||(t.options.selectionMode=!1,this.computeIntersection(e,t,!1,r))}setTolerance(e=R){this._tolerance=e}addIntersectionHandler(e){this._externalIntersectionHandlers.push(e),this._externalIntersectionHandlers.sort((e,t)=>7===e.type?1:7===t.type?-1:0)}removeIntersectionHandler(e){null!=this._externalIntersectionHandlers.removeUnordered(e)&&this._externalIntersectionHandlers.sort((e,t)=>7===e.type?1:7===t.type?-1:0)}_getPickRay(e,t){const r=this._view.state.camera;return w(r,e,t)}_intersectRayFreePointLocal(e,t){return 2!==this.viewingMode||null==e||i(t,e.origin,s(y.get(),e.direction)),!1}intersectElevationFromScreen(e,t,r=0,n=null){return this._intersectElevation(this._getPickRay(e,this._tmpRay),t,r,n)}_intersectElevation(e,t,l=0,a=null){if(null==e)return null;const c=this._view,{renderCoordsHelper:u}=c,h=n(c.spatialReference),p=null!=t?t.mode:"absolute-height",d=f(t)/h,m=("on-the-ground"!==p?d+l:0)*h/u.unitInMeters,{camera:_}=c.state;if("absolute-height"===p){const t=u?.getAltitude(_.eye),r=o(s(E,e.direction),u.worldUpAtPosition(_.eye,V));if(t<m&&r<0||t>=m&&r>0)return null;if(u.intersectInfiniteManifold(e,m,E)){const e=g(c,E);return e.z??=0,e.z-=d,e}return null}const w=_.projectToRenderScreen(e.origin,r(y.get())),R=new k(null,this._forEachLayer),v=c.slice.plane,P=null!=v?I(v):null,j=new b(this.viewingMode);j.options.store=0,j.options.verticalOffset=m,j.options.normalRequired=!1;const U=e.origin,x=i(y.get(),U,e.direction);j.reset(U,x,_),j.point=w;let M=null;if(a&&"type"in a&&"graphics"===a.type){const e=c.allLayerViews.find(e=>e.layer===a)?.uid;M=e?t=>t.layerViewUid===e:null}else a&&(M=e=>e.graphicUid!==a.uid);switch(p){case"relative-to-scene":{const e=e=>(!M||M(e))&&!!e.lastValidElevationBB;j.intersect(R.layers,w,this._tolerance,null,e),this._externalIntersectionHandlers.forAll(e=>{if(2===e.type||7===e.type||8===e.type){const t=e.slicePlaneEnabled?P:null;e.intersect(j,t,j.rayBegin,j.rayEnd,w,!1)}});break}case"on-the-ground":case"relative-to-ground":this._externalIntersectionHandlers.forAll(e=>{if(e.isGround){const t=e.slicePlaneEnabled?P:null;e.intersect(j,t,j.rayBegin,j.rayEnd,w,!1)}})}if(j.results.min.getIntersectionPoint(E)){const e=g(c,E);return e.z=l,e}return null}computeIntersection(e,t,n,s){if(null==e)return;const o=this._view.state.camera,l=o.projectToRenderScreen(e.origin,r(y.get())),a=new k(s,this._forEachLayer);t.options.selectOpaqueTerrainOnly=!s||!("include"in s||"exclude"in s);const c=e.origin,u=i(y.get(),e.origin,e.direction);t.reset(c,u,o),t.intersect(a.layers,l,this._tolerance);const h=this._view.slice.plane,p=null!=h?I(h):null;t.intersect(a.sliceableLayers,l,this._tolerance,p);const d=s&&(s.requiresGroundFeedback||s.enableDraped);this._externalIntersectionHandlers.forAll(e=>{const r=e.layerViewUid,i=e.sublayerId,s=Array.isArray(r),o=s?r:[r];s&&(t.options.filteredLayerViewUids=[]);let h=!1;for(const n of o)a.filterLayerViewUid(n,i)?h=!0:s&&t.options.filteredLayerViewUids.push(n);if(t.options.isFiltered=!h,e.isGround&&d||!t.options.isFiltered){const r=e.slicePlaneEnabled?p:null;e.intersect(t,r,c,u,l,n)}});const m=y.get(),f=this._view,g=f.basemapTerrain;if(s&&s.enableDraped&&null!=g.spatialReference&&t.results.ground.getIntersectionPoint(m)){const e=f.overlayManager.renderer,r=f.renderCoordsHelper.spatialReference,n=y.get();f.renderCoordsHelper.fromRenderCoords(m,n,g.spatialReference),n[2]=f.elevationProvider?.getElevation(m[0],m[1],m[2],r,"ground")??0,e.intersect(t,n,t.results.ground,e=>a.filterRenderGeometry(e))}t.sortResults(),this._processHUDResults(t)}_processHUDResults(e){const t=e.results.hud;c(this._tmpRegion,u);const r=this._view.state.camera,n=[],i=this._tmpRegion,s=e=>{const t=new M(e),s=t.result.target.object.geometries.every(e=>e.material instanceof P&&e.material.parameters.occlusionTest);n.push({item:t,occlusionTest:s}),s&&(r.projectToRenderScreen(e.target.center,t.screenPoint),t.screenPoint[0]=Math.floor(t.screenPoint[0]),t.screenPoint[1]=Math.floor(t.screenPoint[1]),d(i,t.screenPoint))};e.sortResults(t.all),null!=t.min.distance&&s(t.min);for(const c of t.all)t.min.target.object!==c.target.object&&t.max.target.object!==c.target.object&&s(c);if(null!=t.max.distance&&t.max.target.object!==t.min.target.object&&s(t.max),!n.length)return;i[0]===i[2]&&(i[2]+=1),i[1]===i[3]&&(i[3]+=1);const o=r.fullWidth,l=r.fullHeight,a=Math.max(0,i[0]-U),m=Math.max(0,i[1]-U),y=Math.min(h(i)+2*U,o-a),f=Math.min(p(i)+2*U,l-m),g=y>0&&f>0?new Uint8Array(y*f*4):null;g&&this._view.stage.renderer.readHUDVisibility(a,m,y,f,g);let _=!0;const w=null==e.results.max.distance;let R=0;for(const{item:c,occlusionTest:u}of n){let t=!u;if(u&&g)for(const e of x){const r=4*(Math.min(c.screenPoint[0]+e[0],o)-i[0]+(Math.min(c.screenPoint[1]+e[1],l)-i[1])*y);if(r>=0&&r<g.length&&g[r]){t=!0;break}}t&&(_&&(e.results.min.copy(c.result),_=!1),w&&e.results.max.copy(c.result),2===e.options.store&&e.results.all.splice(R++,0,c.result))}}}const U=1,x=(()=>{const e=[],t=U;for(let r=-t;r<=t;r++)for(let n=-t;n<=t;n++)e.push([n+t,r+t]);return e})();class M{constructor(e){this.result=e,this.screenPoint=t()}}let H;function L(e){return H&&H.viewingMode===e||(H=new b(e)),H}class k{constructor(e,t){this.layers=new Array,this.sliceableLayers=new Array,this.include=e?.include,this.exclude=e?.exclude,t(e=>{e.pickable&&this.filterLayerViewUid(e.apiLayerViewUid)&&(e.sliceable?this.sliceableLayers:this.layers).push(e)})}filterLayerViewUid(e,t){const{include:r,exclude:n}=this;if(null==e)return null==r&&null==n;const i=r instanceof Map?r.get(e)??!1:r?.has(e),s=n instanceof Map?n.get(e)??!1:n?.has(e);return(null==i||("boolean"==typeof i?i:null!=t&&i.has(t)))&&(null==s||!("boolean"==typeof s?s:null!=t&&s.has(t)))}filterRenderGeometry(e){return this.filterLayerViewUid(e.layerViewUid)}}function T(e){return"object"==typeof e&&"intersect"in e}const E=l(),V=l(),F=t();export{j as SceneIntersectionHelper,T as isIntersectionHandler};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import has from"../../../core/has.js";import i from"../../../core/Logger.js";import{MemCacheStorage as s,MemCache as r}from"../../../core/MemCache.js";import{addFrameTask as
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import has from"../../../core/has.js";import i from"../../../core/Logger.js";import{MemCacheStorage as s,MemCache as r}from"../../../core/MemCache.js";import{addFrameTask as o}from"../../../core/scheduling.js";import{Milliseconds as a}from"../../../core/time.js";import{property as d}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/RandomLCG.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{isMemoryManagedView as y}from"./MemoryManagedView.js";import{makeBudget as l}from"../../support/Scheduler.js";function m(e){return new w({view:e})}const u=.1,n=1,c=1,_=.75,p=.6,M=1.3,g=!!has("esri-tests-disable-memory-pools");let w=class extends t{constructor(e){super(e),this._quality=1,this._usedMemory=0,this._updating=!1,this._stableQuality=0,this._downscaleMemoryUsed=0,this._canFastRecover=!1,this._predictedMemory=0,this._cacheStorage=new s,this._warnMemoryUsage=null,this._numQualityChanges=0,this._maxMemory=g?4096:750,this._additionalCacheMemory=g?-4096:0,this.addHandles(o({prepare:()=>this._updateMemory()}))}destroy(){this._cacheStorage.destroy()}get maxMemory(){return this._maxMemory}set maxMemory(e){null==e||e<=0||g||(this._stableQuality=0,this._canFastRecover=!1,this._maxMemory<e&&this._updateQuality(n),this._maxMemory=e)}get additionalCacheMemory(){return this._additionalCacheMemory}set additionalCacheMemory(e){null==e||g||(this._additionalCacheMemory=e)}get memoryFactor(){return this._quality}get updating(){return this._updating}get usedMemory(){return this._usedMemory}get usedCacheMemory(){return this._cacheStorage.size}newCache(e,t,i){return new r(e,this._cacheStorage,t,i)}resetStableQuality(){this._stableQuality=0}disableMemCache(){this.additionalCacheMemory=-4096}update(){if(this._predictedMemory<=0&&!this._updating)return;let e=this._layersUpdating();if(this._predictedMemory<p&&this._canFastRecover)this._downscaleMemoryUsed=0,this._stableQuality=0,this._canFastRecover=!1,this._updateQuality(n);else if(e){if(this._predictedMemory>1.1*c||this._usedMemory>c)if(this._stableQuality>0)this._downscaleMemoryUsed=0,this._updateQuality(this._stableQuality);else if(this._quality>u&&this._downscaleMemoryUsed<this._usedMemory){if(this._compactAndUpdate())return;this._updateQuality(this._quality/M),this._downscaleMemoryUsed=this._usedMemory,this._canFastRecover=!1}}else if(this._downscaleMemoryUsed=0,this._usedMemory>c){if(this._compactAndUpdate())return;this._stableQuality=0,this._canFastRecover=!1,e=this._updateQuality(this._quality/M),this._downscaleMemoryUsed=this._predictedMemory}else if(this._stableQuality!==this._quality)if(this._usedMemory<_&&this._quality<n){this._stableQuality=this._quality;const t=.05;e=this._updateQuality(this._quality+t)}else this._quality<1&&(this._canFastRecover=!0);this._updating=e}_compactAndUpdate(){const e=l(a(100)),t=this.view.stage.compact(e);return this.view.overlayManager.renderer.compact(e)||t}_updateQuality(e){return(e=Math.min(Math.max(e,u),n))!==this._quality&&(this._quality=e,++this._numQualityChanges,!0)}_layersUpdating(){return this.view.allLayerViews.some(e=>!!e.updating)}_updateMemory(){if(!this.view?.updating||this.view.destroyed||this.view.destroying)return;this.view.stage?.renderer?.tick();const e=this.view.stage?.renderer?.usedMemory;let t=(this.view.basemapTerrain?.usedMemory??0)+(e?e.fbos+e.edges+e.plugins:0)+this.view.deconflictor?.usedMemory+this.view.labeler?.usedMemory,s=0;this.view.allLayerViews&&this.view.allLayerViews.forEach(e=>{if(y(e)){const i=e.ignoresMemoryFactor?this._quality:1;t+=e.usedMemory*i,s+=e.unloadedMemory*i}});const r=null==this._warnMemoryUsage||Math.round(10*t)!==Math.round(10*this._warnMemoryUsage),o=1048576*this.maxMemory;if(t>o&&r){this._warnMemoryUsage=t;const e=e=>(e/1048576).toLocaleString(void 0,{maximumFractionDigits:1})+" MB",r=Math.round(100*this._quality);i.getLogger(this).warn(`Memory Limit exceeded! Limit: ${e(o)} Current: ${e(t)} Projected: ${e(t+s)} Quality: ${r}%`)}this._usedMemory=t/o,this._predictedMemory=(t+s)/o;const a=o-t;this._cacheStorage.maxSize=Math.max(0,a+1048576*this.additionalCacheMemory)}get test(){}};e([d({constructOnly:!0})],w.prototype,"view",void 0),e([d()],w.prototype,"maxMemory",null),e([d()],w.prototype,"additionalCacheMemory",null),e([d({readOnly:!0})],w.prototype,"memoryFactor",null),e([d({readOnly:!0})],w.prototype,"updating",null),e([d({readOnly:!0})],w.prototype,"usedMemory",null),e([d({readOnly:!0})],w.prototype,"usedCacheMemory",null),e([d()],w.prototype,"_quality",void 0),e([d()],w.prototype,"_usedMemory",void 0),e([d()],w.prototype,"_updating",void 0),e([d()],w.prototype,"_stableQuality",void 0),e([d()],w.prototype,"_maxMemory",void 0),e([d()],w.prototype,"_additionalCacheMemory",void 0),w=e([h("esri.views.3d.support.MemoryController")],w);export{u as minQuality,m as newMemoryController};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import{Milliseconds as o}from"../../../core/time.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";let r=class extends e{constructor(){super(...arguments),this.minTotalNumberOfFeatures=2e3,this.maxTotalNumberOfFeatures=5e4,this.maxNumberOfDrawCalls=17e3,this.maxTotalNumberOfVertices=17e5,this.snapshotAvailable=!0,this.polygonLodFactor=1,this.polylineLodFactor=1,this.skipHighSymbolLods=!1}};t([i()],r.prototype,"minTotalNumberOfFeatures",void 0),t([i()],r.prototype,"maxTotalNumberOfFeatures",void 0),t([i()],r.prototype,"maxNumberOfDrawCalls",void 0),t([i()],r.prototype,"maxTotalNumberOfVertices",void 0),t([i()],r.prototype,"snapshotAvailable",void 0),t([i()],r.prototype,"polygonLodFactor",void 0),t([i()],r.prototype,"polylineLodFactor",void 0),t([i()],r.prototype,"skipHighSymbolLods",void 0),r=t([s("esri.views.3d.support.QualitySettings.Graphics3DSettings")],r);let p=class{constructor(){this.minimumSplatPixelRadius=2,this.minimumOpacity=.05,this.maxAllowedVisibleGaussians=1/0}};t([i()],p.prototype,"minimumSplatPixelRadius",void 0),t([i()],p.prototype,"minimumOpacity",void 0),t([i()],p.prototype,"maxAllowedVisibleGaussians",void 0),p=t([s("esri.views.3d.support.QualitySettings.GaussianSplatSettings")],p);let a=class extends e{constructor(){super(...arguments),this.lodFactor=1}};t([i()],a.prototype,"lodFactor",void 0),a=t([s("esri.views.3d.support.QualitySettings.LoDFactorSettings")],a);let l=class extends e{constructor(){super(...arguments),this.object=new a,this.point=new a,this.integratedMesh=new a,this.pointCloud=new a}};t([i({type:a})],l.prototype,"object",void 0),t([i({type:a})],l.prototype,"point",void 0),t([i({type:a})],l.prototype,"integratedMesh",void 0),t([i({type:a})],l.prototype,"pointCloud",void 0),l=t([s("esri.views.3d.support.QualitySettings.SceneServiceSettings")],l);let n=class extends e{constructor(){super(...arguments),this.lodBias=0,this.angledSplitBias=1,this.vtlContentZoom=1,this.elevationLevelDelta=3,this.reduceTileLevelDifferences=!0}};t([i()],n.prototype,"lodBias",void 0),t([i()],n.prototype,"angledSplitBias",void 0),t([i()],n.prototype,"vtlContentZoom",void 0),t([i()],n.prototype,"elevationLevelDelta",void 0),t([i()],n.prototype,"reduceTileLevelDifferences",void 0),n=t([s("esri.views.3d.support.QualitySettings.TiledSurfaceSettings")],n);let d=class extends e{constructor(){super(...arguments),this.pixelRatio=1,this.maxTotalNumberOfFeatures=5e4}};t([i()],d.prototype,"pixelRatio",void 0),t([i()],d.prototype,"maxTotalNumberOfFeatures",void 0),d=t([s("esri.views.3d.support.QualitySettings.HeatmapSettings")],d);let c=class extends e{constructor(){super(...arguments),this.graphics3D=new r,this.sceneService=new l,this.tiledSurface=new n,this.gaussianSplat=new p,this.heatmap=new d,this.fadeDuration=o(400),this.antialiasingEnabled=!0,this.physicallyBasedRenderingEnabled=!1,this.highQualityTransparency=!0,this.highResolutionAtmosphere=!1,this.reflections=!1,this.ambientOcclusion=!1,this.glow=!
|
|
5
|
+
import{__decorate as t}from"tslib";import e from"../../../core/Accessor.js";import{Milliseconds as o}from"../../../core/time.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";let r=class extends e{constructor(){super(...arguments),this.minTotalNumberOfFeatures=2e3,this.maxTotalNumberOfFeatures=5e4,this.maxNumberOfDrawCalls=17e3,this.maxTotalNumberOfVertices=17e5,this.snapshotAvailable=!0,this.polygonLodFactor=1,this.polylineLodFactor=1,this.skipHighSymbolLods=!1}};t([i()],r.prototype,"minTotalNumberOfFeatures",void 0),t([i()],r.prototype,"maxTotalNumberOfFeatures",void 0),t([i()],r.prototype,"maxNumberOfDrawCalls",void 0),t([i()],r.prototype,"maxTotalNumberOfVertices",void 0),t([i()],r.prototype,"snapshotAvailable",void 0),t([i()],r.prototype,"polygonLodFactor",void 0),t([i()],r.prototype,"polylineLodFactor",void 0),t([i()],r.prototype,"skipHighSymbolLods",void 0),r=t([s("esri.views.3d.support.QualitySettings.Graphics3DSettings")],r);let p=class{constructor(){this.minimumSplatPixelRadius=2,this.minimumOpacity=.05,this.maxAllowedVisibleGaussians=1/0}};t([i()],p.prototype,"minimumSplatPixelRadius",void 0),t([i()],p.prototype,"minimumOpacity",void 0),t([i()],p.prototype,"maxAllowedVisibleGaussians",void 0),p=t([s("esri.views.3d.support.QualitySettings.GaussianSplatSettings")],p);let a=class extends e{constructor(){super(...arguments),this.lodFactor=1}};t([i()],a.prototype,"lodFactor",void 0),a=t([s("esri.views.3d.support.QualitySettings.LoDFactorSettings")],a);let l=class extends e{constructor(){super(...arguments),this.object=new a,this.point=new a,this.integratedMesh=new a,this.pointCloud=new a}};t([i({type:a})],l.prototype,"object",void 0),t([i({type:a})],l.prototype,"point",void 0),t([i({type:a})],l.prototype,"integratedMesh",void 0),t([i({type:a})],l.prototype,"pointCloud",void 0),l=t([s("esri.views.3d.support.QualitySettings.SceneServiceSettings")],l);let n=class extends e{constructor(){super(...arguments),this.lodBias=0,this.angledSplitBias=1,this.vtlContentZoom=1,this.elevationLevelDelta=3,this.reduceTileLevelDifferences=!0}};t([i()],n.prototype,"lodBias",void 0),t([i()],n.prototype,"angledSplitBias",void 0),t([i()],n.prototype,"vtlContentZoom",void 0),t([i()],n.prototype,"elevationLevelDelta",void 0),t([i()],n.prototype,"reduceTileLevelDifferences",void 0),n=t([s("esri.views.3d.support.QualitySettings.TiledSurfaceSettings")],n);let d=class extends e{constructor(){super(...arguments),this.pixelRatio=1,this.maxTotalNumberOfFeatures=5e4}};t([i()],d.prototype,"pixelRatio",void 0),t([i()],d.prototype,"maxTotalNumberOfFeatures",void 0),d=t([s("esri.views.3d.support.QualitySettings.HeatmapSettings")],d);let c=class extends e{constructor(){super(...arguments),this.graphics3D=new r,this.sceneService=new l,this.tiledSurface=new n,this.gaussianSplat=new p,this.heatmap=new d,this.fadeDuration=o(400),this.antialiasingEnabled=!0,this.physicallyBasedRenderingEnabled=!1,this.highQualityTransparency=!0,this.highResolutionAtmosphere=!1,this.reflections=!1,this.ambientOcclusion=!1,this.glow=!1,this.maxTexturePixels=1/0,this.memoryLimit=750,this.additionalCacheMemory=0,this.frameRate=void 0,this.maximumPixelRatio=1/0}};t([i({type:r})],c.prototype,"graphics3D",void 0),t([i({type:l})],c.prototype,"sceneService",void 0),t([i({type:n})],c.prototype,"tiledSurface",void 0),t([i({type:p})],c.prototype,"gaussianSplat",void 0),t([i({type:d})],c.prototype,"heatmap",void 0),t([i()],c.prototype,"fadeDuration",void 0),t([i()],c.prototype,"antialiasingEnabled",void 0),t([i()],c.prototype,"physicallyBasedRenderingEnabled",void 0),t([i()],c.prototype,"highQualityTransparency",void 0),t([i()],c.prototype,"highResolutionAtmosphere",void 0),t([i()],c.prototype,"reflections",void 0),t([i()],c.prototype,"ambientOcclusion",void 0),t([i()],c.prototype,"glow",void 0),t([i()],c.prototype,"maxTexturePixels",void 0),t([i()],c.prototype,"memoryLimit",void 0),t([i()],c.prototype,"additionalCacheMemory",void 0),t([i()],c.prototype,"frameRate",void 0),t([i()],c.prototype,"maximumPixelRatio",void 0),c=t([s("esri.views.3d.support.QualitySettings")],c);const m=c;export{m as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as t}from"tslib";import{clamp as e}from"../../../../core/mathUtils.js";import{removeMaybe as r,destroyMaybe as s}from"../../../../core/maybe.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as o}from"../../../../core/accessorSupport/decorators/subclass.js";import{c as a,j as n,g as c,f as u,q as l,k as d}from"../../../../chunks/vec32.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as h}from"../../../../geometry/ellipsoidUtils.js";import f from"../../../../geometry/Point.js";import{projectBoundingRect as m}from"../../../../geometry/projection/projectBoundingRect.js";import{create as _}from"../../../../geometry/support/aaBoundingRect.js";import{debugFlags as S}from"../debugFlags.js";import{PointOfInterest as g}from"./PointOfInterest.js";import{PropertiesPool as y}from"../../../support/PropertiesPool.js";import{Yield as A}from"../../../support/Yield.js";let j=class extends g{constructor(t){super(t),this._propertiesPool=new y({location:()=>new f,renderLocation:()=>p()},this),this._currentSurfaceAltitude=0,this._latestSurfaceAltitude=0,this.distance=0,this.renderLocation=p(),this.updating=!1}initialize(){this._frameWorker=this.scheduler.registerTask(this.task,this),this.runTask()}destroy(){this._frameWorker=r(this._frameWorker),this._propertiesPool=s(this._propertiesPool)}get _camera(){return this.state.contentCamera}get location(){const t=this._propertiesPool?.get("location");return t?(t.spatialReference=this.state.spatialReference,this.renderCoordsHelper.fromRenderCoords(this.renderLocation,t),t):new f}updateRenderLocation(){this.updating=!0,this._updateRenderLocation()}get estimatedSurfaceAltitude(){return this._latestSurfaceAltitude}get readyToRun(){return this.updating}runTask(){return this._latestSurfaceAltitude=this.estimateSurfaceAltitudeAtCenter(),this._updateRenderLocation(),this.updating=!1,A}_updateRenderLocation(){const t=
|
|
5
|
+
import{__decorate as t}from"tslib";import{clamp as e}from"../../../../core/mathUtils.js";import{removeMaybe as r,destroyMaybe as s}from"../../../../core/maybe.js";import{property as i}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as o}from"../../../../core/accessorSupport/decorators/subclass.js";import{c as a,j as n,g as c,f as u,q as l,k as d}from"../../../../chunks/vec32.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{getReferenceEllipsoid as h}from"../../../../geometry/ellipsoidUtils.js";import f from"../../../../geometry/Point.js";import{projectBoundingRect as m}from"../../../../geometry/projection/projectBoundingRect.js";import{create as _}from"../../../../geometry/support/aaBoundingRect.js";import{debugFlags as S}from"../debugFlags.js";import{PointOfInterest as g}from"./PointOfInterest.js";import{PropertiesPool as y}from"../../../support/PropertiesPool.js";import{Yield as A}from"../../../support/Yield.js";let j=class extends g{constructor(t){super(t),this._propertiesPool=new y({location:()=>new f,renderLocation:()=>p()},this),this._currentSurfaceAltitude=0,this._latestSurfaceAltitude=0,this.distance=0,this.renderLocation=p(),this.updating=!1}initialize(){this._frameWorker=this.scheduler.registerTask(this.task,this),this.runTask()}destroy(){this._frameWorker=r(this._frameWorker),this._propertiesPool=s(this._propertiesPool)}get _camera(){return this.state.contentCamera}get location(){const t=this._propertiesPool?.get("location");return t?(t.spatialReference=this.state.spatialReference,this.renderCoordsHelper.fromRenderCoords(this.renderLocation,t),t):new f}updateRenderLocation(){this.updating=!0,this._updateRenderLocation()}get estimatedSurfaceAltitude(){return this._latestSurfaceAltitude}get readyToRun(){return this.updating}runTask(){return this._latestSurfaceAltitude=this.estimateSurfaceAltitudeAtCenter(),this._updateRenderLocation(),this.updating=!1,A}_updateRenderLocation(){const t=L;let e=this._calculateSurfaceIntersection(this._currentSurfaceAltitude,t);const r=this._currentSurfaceAltitude!==this._latestSurfaceAltitude;!e&&r&&(e=this._calculateSurfaceIntersection(this._latestSurfaceAltitude,t),e&&(this._currentSurfaceAltitude=this._latestSurfaceAltitude));const s=C;e&&this._latestSurfaceAltitudeChangesDistanceSignificantly(t,s)&&(a(t,s),this._currentSurfaceAltitude=this._latestSurfaceAltitude),e?this.distance=n(this._camera.eye,t):(c(t,this._camera.viewForward,this._get("distance")),u(t,t,this._camera.eye)),l(this._get("renderLocation"),t)||this._set("renderLocation",a(this._propertiesPool.get("renderLocation"),t))}_calculateSurfaceIntersection(t,r){const s=this._camera;if(!this.renderCoordsHelper.intersectInfiniteManifold(s.ray,t,r))return!1;if(this.state.isGlobal){const e=h(this.renderCoordsHelper.spatialReference).radius,i=e+t,o=d(s.eye),a=o<i*i,l=n(s.eye,r);if(a&&l>e/4){const t=i-Math.sqrt(o);return c(r,s.viewForward,t),u(r,r,s.eye),!0}}else{const t=this.surface?.ready?this.surface.extentAABR:null;null!=t&&m(t,this.surface?.spatialReference,v,this.renderCoordsHelper.spatialReference)&&(r[0]=e(r[0],v[0],v[2]),r[1]=e(r[1],v[1],v[3]))}return!0}_latestSurfaceAltitudeChangesDistanceSignificantly(t,e){if(this._latestSurfaceAltitude===this._currentSurfaceAltitude||null==t)return!1;if(this._calculateSurfaceIntersection(this._latestSurfaceAltitude,e)){if(S.TESTS_DISABLE_OPTIMIZATIONS)return!0;const r=this._camera.eye,s=n(r,t),i=n(r,e);if(Math.abs(i-s)/s>R)return!0}return!1}};t([i({constructOnly:!0})],j.prototype,"scheduler",void 0),t([i({constructOnly:!0})],j.prototype,"task",void 0),t([i()],j.prototype,"distance",void 0),t([i({constructOnly:!0})],j.prototype,"estimateSurfaceAltitudeAtCenter",void 0),t([i({readOnly:!0})],j.prototype,"location",null),t([i({readOnly:!0})],j.prototype,"renderLocation",void 0),t([i()],j.prototype,"updating",void 0),j=t([o("esri.views.3d.support.pointsOfInterest.CenterOnSurface")],j);const R=.05,L=p(),C=p(),v=_();export{j as CenterOnSurface};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import"../../../../core/has.js";import{watch as r,when as s,on as n,sync as i,initial as o}from"../../../../core/reactiveUtils.js";import{property as a}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{f as u,q as d,c as h}from"../../../../chunks/vec32.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as f}from"../../../../core/support/UpdatingHandles.js";import{create as l}from"../../../../geometry/support/ray.js";import{debugFlags as _}from"../debugFlags.js";import{DebugPoint as m}from"../debugUtils.js";import{fromRenderAtEye as C}from"../geometryUtils/ray.js";import{CameraOnSurface as g}from"./CameraOnSurface.js";import{CenterOnSurface as y}from"./CenterOnSurface.js";import{ContentGeometryUpdates as O}from"./ContentGeometryUpdates.js";import{Focus as A}from"./Focus.js";import{StableSurfaceCenter as w}from"./StableSurfaceCenter.js";import{SurfaceGeometryUpdates as S}from"./SurfaceGeometryUpdates.js";import{Intersector as v}from"../../webgl-engine/lib/Intersector.js";import{terrainId as I}from"../../webgl-engine/lib/verticalOffsetUtils.js";import{PropertiesPool as
|
|
5
|
+
import{__decorate as e}from"tslib";import t from"../../../../core/Accessor.js";import"../../../../core/has.js";import{watch as r,when as s,on as n,sync as i,initial as o}from"../../../../core/reactiveUtils.js";import{property as a}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{f as u,q as d,c as h}from"../../../../chunks/vec32.js";import{create as p}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{UpdatingHandles as f}from"../../../../core/support/UpdatingHandles.js";import{create as l}from"../../../../geometry/support/ray.js";import{debugFlags as _}from"../debugFlags.js";import{DebugPoint as m}from"../debugUtils.js";import{fromRenderAtEye as C}from"../geometryUtils/ray.js";import{CameraOnSurface as g}from"./CameraOnSurface.js";import{CenterOnSurface as y}from"./CenterOnSurface.js";import{ContentGeometryUpdates as O}from"./ContentGeometryUpdates.js";import{Focus as A}from"./Focus.js";import{StableSurfaceCenter as w}from"./StableSurfaceCenter.js";import{SurfaceGeometryUpdates as S}from"./SurfaceGeometryUpdates.js";import{Intersector as v}from"../../webgl-engine/lib/Intersector.js";import{terrainId as I}from"../../webgl-engine/lib/verticalOffsetUtils.js";import{PropertiesPool as R}from"../../../support/PropertiesPool.js";import{TaskPriority as b}from"../../../support/Scheduler.js";let P=class extends t{constructor(e){super(e),this.renderPointOfView=p(),this._pois=new Array,this._updatingHandles=new f,this._debugCenters=null,this._tmpRay=l(),this._centerRayDirty=!0,this._surfaceAltitudeAtCenter=0,this._surfaceAltitudeAtCenterDirty=!0,this._contentAltitudeAtCenter=0,this._contentAltitudeAtCenterDirty=!0,this._propertiesPool=new R({renderPointOfView:()=>p()},this),this._contentIntersector=new v(e.view.state.viewingMode),this._surfaceIntersector=new v(e.view.state.viewingMode),this._surfaceIntersector.options.invisibleTerrain=!1,this._surfaceIntersector.options.store=0}initialize(){const{state:e,groundView:t,renderCoordsHelper:a,map:c}=this.view,u=()=>this._estimateSurfaceAltitudeAtCenter(),d=this.view.resourceController.scheduler,h=t?.elevationQueryCache,p={state:e,scheduler:d,surface:t,renderCoordsHelper:a};this._set("centerOnSurfaceInfrequent",new y({...p,task:b.POINT_OF_INTEREST_INFREQUENT,estimateSurfaceAltitudeAtCenter:u})),this._set("centerOnSurfaceFrequent",new y({...p,task:b.POINT_OF_INTEREST_FREQUENT,estimateSurfaceAltitudeAtCenter:u})),this._set("centerOnContent",new y({...p,task:b.POINT_OF_INTEREST_FREQUENT,estimateSurfaceAltitudeAtCenter:()=>this._estimateContentAltitudeAtCenter()}));const f=t.integratedMeshElevationSampler;this._set("cameraOnSurface",new g({...p,cache:h,integratedMeshElevationSampler:f,task:b.POINT_OF_INTEREST_INFREQUENT,map:c})),this._set("surfaceGeometryUpdates",new S({...p,centerOnSurfaces:[this.centerOnSurfaceFrequent,this.centerOnContent,this.centerOnSurfaceInfrequent]})),this._set("contentGeometryUpdates",new O(this.view.allLayerViews,()=>this.view.graphicsView)),this._set("surfaceOrigin",new w({cache:h,view:this.view})),this._set("focus",new A({state:e,scheduler:d,surface:t,renderCoordsHelper:a,centerOnSurface:this.centerOnSurfaceFrequent,estimateSurfaceIntersectionAtRenderPoint:(e,t)=>this._estimateSurfaceIntersectionAtRenderPoint(e,this.view.state.contentCamera,t)})),this._pois.push(this.centerOnContent,this.centerOnSurfaceFrequent,this.centerOnSurfaceInfrequent,this.cameraOnSurface,this.focus),this.addHandles([r(()=>e.contentCamera,e=>this._cameraChanged(e),i),this._updatingHandles.add(()=>t.extentAABR,()=>this._updateCenterPointsOfInterest()),this._updatingHandles.add(()=>this.view.map?.ground?.navigationConstraint?.type,e=>{this._surfaceIntersector.options.backfacesTerrain="none"===e},o),s(()=>!t.updating,()=>this._updateCenterPointsOfInterest(),i),n(()=>this.surfaceGeometryUpdates.events,"request-update",()=>this._updateCenterPointsOfInterest()),n(()=>this.contentGeometryUpdates.events,"request-update",()=>this._updateCenterOnContent()),this._updatingHandles.add(()=>_.SHOW_POI,e=>this._setDebug(e),o)]),this._cameraChanged(this.view.state.contentCamera);for(const r of this._pois)r.runTask()}destroy(){this._setDebug(!1),this._propertiesPool.destroy();for(const e of this._pois)e.destroy();this._pois.length=0,this.surfaceOrigin.destroy(),this._updatingHandles.destroy(),this._set("centerOnSurfaceInfrequent",null),this._set("centerOnSurfaceFrequent",null),this._set("centerOnContent",null),this._set("cameraOnSurface",null),this._set("surfaceGeometryUpdates",null),this._set("contentGeometryUpdates",null),this._set("surfaceOrigin",null),this._set("focus",null)}get updating(){return!(!this.surfaceGeometryUpdates?.updating&&!this._pois.some(e=>e.updating))||this._updatingHandles.updating}get _centerRay(){return this._centerRayDirty&&(this._centerRayCached=this.view.sceneIntersectionHelper.getCenterRayWithSubpixelOffset(this.view.state.contentCamera,this._tmpRay),this._centerRayDirty=!1),this._centerRayCached}_estimateContentAltitudeAtCenter(){if(!this._contentAltitudeAtCenterDirty)return this._contentAltitudeAtCenter;this._contentAltitudeAtCenterDirty=!1;const e=this._centerRay;return null==e||(this.view.sceneIntersectionHelper.intersectRay(e,this._contentIntersector,j,U)?this._contentAltitudeAtCenter=this.view.renderCoordsHelper.getAltitude(j):this._contentAltitudeAtCenter=this._estimateSurfaceAltitudeAtCenter()),this._contentAltitudeAtCenter}_estimateSurfaceAltitudeAtCenter(){const{view:e}=this,{groundView:t}=e;if(!t)return 0;if(!this._surfaceAltitudeAtCenterDirty)return this._surfaceAltitudeAtCenter;this._surfaceAltitudeAtCenterDirty=!1;const r=this._centerRay;if(null==r)return this._surfaceAltitudeAtCenter;const s=r.origin,n=u(j,r.origin,r.direction);return this._surfaceIntersector.resetWithRay(r,e.state.contentCamera),t.intersect(this._surfaceIntersector,null,s,n),this._surfaceIntersector.results.min.getIntersectionPoint(j)&&(this._surfaceAltitudeAtCenter=e.renderCoordsHelper.getAltitude(j)),this._surfaceAltitudeAtCenter}_estimateSurfaceIntersectionAtRenderPoint(e,t,r){const s=C(t,e,H);if(null==s)return null;const n=s.origin,i=u(j,s.origin,s.direction);return this._surfaceIntersector.resetWithRay(s,t),this.view.groundView.intersect(this._surfaceIntersector,null,n,i),this._surfaceIntersector.results.min.getIntersectionPoint(r)?r:null}_cameraChanged(e){this._updateCenterPointsOfInterest();const t=e.eye;d(this.renderPointOfView,t)||this._set("renderPointOfView",h(this._propertiesPool.get("renderPointOfView"),t))}_updateCenterPointsOfInterest(){this._centerRayDirty=!0,this._surfaceAltitudeAtCenterDirty=!0,this._contentAltitudeAtCenterDirty=!0;for(const e of this._pois)e.updateRenderLocation()}_updateCenterOnContent(){this._contentAltitudeAtCenterDirty=!0,this.centerOnContent.updateRenderLocation()}_setDebug(e){if(!e)return this._debugCenters?.forEach(e=>e.hide()),void this.removeHandles("debug");if(!this._debugCenters){this._debugCenters=new Map;const e=this.view.graphics;this._debugCenters.set(this.centerOnContent,new m(e,"red","CenterOnContent")),this._debugCenters.set(this.centerOnSurfaceFrequent,new m(e,"red","CenterOnSurface")),this._debugCenters.set(this.centerOnSurfaceInfrequent,new m(e,"red","CenterOnSurface")),this._debugCenters.set(this.cameraOnSurface,new m(e,"blue","CameraOnSurface")),this._debugCenters.set(this.focus,new m(e,"green","Focus"))}for(const t of this._pois)this.addHandles(this._updatingHandles.add(()=>t.renderLocation,e=>this._debugCenters?.get(t)?.show(e,t.renderCoordsHelper.spatialReference),o),"debug")}get test(){}};e([a()],P.prototype,"centerOnContent",void 0),e([a()],P.prototype,"centerOnSurfaceFrequent",void 0),e([a()],P.prototype,"centerOnSurfaceInfrequent",void 0),e([a()],P.prototype,"cameraOnSurface",void 0),e([a()],P.prototype,"focus",void 0),e([a()],P.prototype,"renderPointOfView",void 0),e([a()],P.prototype,"surfaceOrigin",void 0),e([a()],P.prototype,"contentGeometryUpdates",void 0),e([a()],P.prototype,"surfaceGeometryUpdates",void 0),e([a({constructOnly:!0})],P.prototype,"view",void 0),e([a()],P.prototype,"updating",null),P=e([c("esri.views.3d.support.pointsOfInterest.PointsOfInterest")],P);const j=p(),H=l(),U={exclude:new Set([I])};export{P as PointsOfInterest};
|