@arcgis/core 5.2.0-next.112 → 5.2.0-next.114
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/Ground.js +1 -1
- package/arcgisGlobal.d.ts +6 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/01ca17092545d72be7b6.js +1 -0
- package/assets/esri/core/workers/chunks/{f5a988bb850f7a7af143.js → 05b373a663cb5d4d722f.js} +1 -1
- package/assets/esri/core/workers/chunks/{36f8caeb574dcd5c0ed5.js → 0b727d7bf3e36e146725.js} +1 -1
- package/assets/esri/core/workers/chunks/0c65862e3dd810015491.js +1 -0
- package/assets/esri/core/workers/chunks/0e3e58ba8e2d358121a5.js +1 -0
- package/assets/esri/core/workers/chunks/0edebc6c516f0b9dac7b.js +1 -0
- package/assets/esri/core/workers/chunks/1004e77593dfa506cd5d.js +1 -0
- package/assets/esri/core/workers/chunks/184942ea601237c8241a.js +1 -0
- package/assets/esri/core/workers/chunks/20de0ea9fa08a6545978.js +1 -0
- package/assets/esri/core/workers/chunks/214d63813d268afc265d.js +1 -0
- package/assets/esri/core/workers/chunks/22e85819e23202a8ba90.js +1 -0
- package/assets/esri/core/workers/chunks/{6e677505d257e0848075.js → 23f9ab77e4e263f82636.js} +1 -1
- package/assets/esri/core/workers/chunks/28a04887ecaee5445d14.js +1 -0
- package/assets/esri/core/workers/chunks/{2fc5c1504691badc7792.js → 2ac2d0a7623dd060c144.js} +1 -1
- package/assets/esri/core/workers/chunks/2afce71e8b6ae86e0792.js +1 -0
- package/assets/esri/core/workers/chunks/36792b8a85e88044cb49.js +1 -0
- package/assets/esri/core/workers/chunks/36a7e19f43517aa94577.js +1 -0
- package/assets/esri/core/workers/chunks/{6e6cdff4bbe1ff2f44ac.js → 3ab25279aaa30f035038.js} +1 -1
- package/assets/esri/core/workers/chunks/{e6dae16208f6978b59e0.js → 3b499cfc89c8f87cdb20.js} +1 -1
- package/assets/esri/core/workers/chunks/445b0ca1b70730c9a2e6.js +1 -0
- package/assets/esri/core/workers/chunks/{24673aac70d6c949b6fa.js → 4bf2cc4d092601ff2b86.js} +1 -1
- package/assets/esri/core/workers/chunks/{d45483dd0dc2853b18b7.js → 4bfd63f3cf9208eb839b.js} +33 -33
- package/assets/esri/core/workers/chunks/501df20cdd09384f6ee2.js +1 -0
- package/assets/esri/core/workers/chunks/510a190a6f0a60ae38c3.js +1 -0
- package/assets/esri/core/workers/chunks/{89a785f8b61263e2d592.js → 552c92b01a5f02a115c5.js} +1 -1
- package/assets/esri/core/workers/chunks/564fdf0d663b773806cc.js +1 -0
- package/assets/esri/core/workers/chunks/{d9270f4935eb0d044db3.js → 57328c206f1e699ac06f.js} +1 -1
- package/assets/esri/core/workers/chunks/{50951fb13013b11b8a24.js → 58e62c8ce1292f4d3b06.js} +1 -1
- package/assets/esri/core/workers/chunks/5aee7739afb5160d4ace.js +1 -0
- package/assets/esri/core/workers/chunks/5b9925f23d4b10a7087e.js +1 -0
- package/assets/esri/core/workers/chunks/5f79ba5639067f734791.js +1 -0
- package/assets/esri/core/workers/chunks/{b013b70e40dfb6ce013e.js → 60c61f34733063730386.js} +1 -1
- package/assets/esri/core/workers/chunks/62b1f94f4fa978d4da48.js +1 -0
- package/assets/esri/core/workers/chunks/6b264006b96cbf93d8ed.js +1 -0
- package/assets/esri/core/workers/chunks/6b9d29ca568590358478.js +1 -0
- package/assets/esri/core/workers/chunks/{7c5310e0104c22da0261.js → 6c7cb7974969e3167f2b.js} +1 -1
- package/assets/esri/core/workers/chunks/6c82cbcd504c711a7450.js +1 -0
- package/assets/esri/core/workers/chunks/{e98b785e8f4edc8bd3ff.js → 6eceeca33fac8e900d9d.js} +1 -1
- package/assets/esri/core/workers/chunks/7232fc11b23777b6be94.js +1 -0
- package/assets/esri/core/workers/chunks/726ca458b98bb4334431.js +1 -0
- package/assets/esri/core/workers/chunks/785206da3962ba23de16.js +1 -0
- package/assets/esri/core/workers/chunks/{1c70620f40be02f532b5.js → 7b169eabafcc03bfaee6.js} +1 -1
- package/assets/esri/core/workers/chunks/7bbc3d22383388d11345.js +1 -0
- package/assets/esri/core/workers/chunks/{082069f80eee0407b828.js → 7edf57e31ff07af9032b.js} +1 -1
- package/assets/esri/core/workers/chunks/83ed38468e316302b157.js +1 -0
- package/assets/esri/core/workers/chunks/85c876ee9e63d5732937.js +1 -0
- package/assets/esri/core/workers/chunks/8f0ecf4d06ec7b67d4ed.js +1 -0
- package/assets/esri/core/workers/chunks/8f1c5f5e70d4b33d021d.js +1 -0
- package/assets/esri/core/workers/chunks/{a1916bca1af5c65be4b0.js → 90ab3c47138875070a53.js} +1 -1
- package/assets/esri/core/workers/chunks/{10389c87d9c6a43363ce.js → 917dec9c004218c58950.js} +1 -1
- package/assets/esri/core/workers/chunks/91f451b98e0f696043df.js +1 -0
- package/assets/esri/core/workers/chunks/943d0026ca4d49eb3ac2.js +1 -0
- package/assets/esri/core/workers/chunks/982a396bd4fffa62e911.js +1 -0
- package/assets/esri/core/workers/chunks/98a5327fd96d9542b39f.js +1 -0
- package/assets/esri/core/workers/chunks/9b9a60f1e0c48aa701f0.js +1 -0
- package/assets/esri/core/workers/chunks/9d92e6f0beed9a8580fa.js +1 -0
- package/assets/esri/core/workers/chunks/9df379041e8860fe7f01.js +1 -0
- package/assets/esri/core/workers/chunks/{1e8ceb4a4b28625236e3.js → a42505b978d54d36d3b6.js} +1 -1
- package/assets/esri/core/workers/chunks/{bfbe6ff786435fe1e7cf.js → a86a4e550a92f770d6d5.js} +1 -1
- package/assets/esri/core/workers/chunks/{a34eee4c9d4c1c2b8c49.js → ab60f3bc18b5ea504f70.js} +1 -1
- package/assets/esri/core/workers/chunks/{18b9ec6ba7a6c0fa2ac6.js → b1880d9f5eafd50ce84b.js} +1 -1
- package/assets/esri/core/workers/chunks/{777fc163530448eea13e.js → b4222152efaf73b37b53.js} +1 -1
- package/assets/esri/core/workers/chunks/b6ca73c1384f07b30b74.js +1 -0
- package/assets/esri/core/workers/chunks/bb4cbf6b7c35e8c78cc7.js +1 -0
- package/assets/esri/core/workers/chunks/bb831d23422acfb00ae2.js +1 -0
- package/assets/esri/core/workers/chunks/c0855be20ffcd52c7026.js +1 -0
- package/assets/esri/core/workers/chunks/{a0f742fd947104662d37.js → c6277236ec47586dca00.js} +1 -1
- package/assets/esri/core/workers/chunks/{3be33a129d3ae7dc4f06.js → caf38cf4d8542fb11c46.js} +1 -1
- package/assets/esri/core/workers/chunks/{2728eda8178e02fbca47.js → cd0f5cd0fefe7f49e3d8.js} +1 -1
- package/assets/esri/core/workers/chunks/{48a53bfeef11c32dadcc.js → d25fb32a233d2128afbe.js} +1 -1
- package/assets/esri/core/workers/chunks/d629708bf23da24ee523.js +1 -0
- package/assets/esri/core/workers/chunks/db141122060d8d9b38da.js +1 -0
- package/assets/esri/core/workers/chunks/dc1944a7601b518a9c48.js +1 -0
- package/assets/esri/core/workers/chunks/{573ee2e59d26bc75201e.js → dc8670f32bb0b93c1473.js} +1 -1
- package/assets/esri/core/workers/chunks/e164acd876bbd42ed658.js +1 -0
- package/assets/esri/core/workers/chunks/e1f2b07be33e33117313.js +1 -0
- package/assets/esri/core/workers/chunks/e52f30dfb7c82491a7f2.js +1 -0
- package/assets/esri/core/workers/chunks/e5906b28b981199fd489.js +1 -0
- package/assets/esri/core/workers/chunks/{b3293ee9f221423a6825.js → e611e452f04a9ce64cf8.js} +1 -1
- package/assets/esri/core/workers/chunks/{0f20c458f873564faff2.js → ec4f887153c24ab83f2c.js} +1 -1
- package/assets/esri/core/workers/chunks/{707b4ae689c4329cad3b.js → f40ceb5e03c699605302.js} +1 -1
- package/assets/esri/core/workers/chunks/{547a073c789fdfb78310.js → f42243c62dd0b6993816.js} +1 -1
- package/assets/esri/core/workers/chunks/f91cab9904020cf25d50.js +1 -0
- package/assets/esri/core/workers/chunks/fdf5ceffec9d5185953d.js +1 -0
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ar.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.bg.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.bs.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ca.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.cs.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.da.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.de.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.el.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.es.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.et.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.fi.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.fr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.he.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.hr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.hu.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.id.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.it.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ja.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ko.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.lt.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.lv.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.nl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.no.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.pl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.pt-BR.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ro.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.ru.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sk.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sl.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.sv.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.th.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.tr.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.uk.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.vi.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.zh-CN.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.zh-HK.json +1 -1
- package/assets/esri/views/3d/analysis/ShadowCast/t9n/messages.zh-TW.json +1 -1
- package/assets/esri/views/3d/analysis/VolumeMeasurement/t9n/messages.ja.json +1 -1
- package/assets/esri/views/3d/environment/resources/milkyway-band.ktx2 +0 -0
- package/assets/esri/widgets/DistanceMeasurement2D/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/DistanceMeasurement2D/t9n/messages.ro.json +1 -1
- package/assets/esri/widgets/Expand/t9n/messages.id.json +1 -1
- package/assets/esri/widgets/Features/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/Features/t9n/messages.uk.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.bs.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.et.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.hr.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.hu.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.id.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.nl.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.th.json +1 -1
- package/assets/esri/widgets/Home/t9n/messages.tr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/Print/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/Print/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/Print/t9n/messages.lt.json +1 -1
- package/assets/esri/widgets/Print/t9n/messages.pt-PT.json +1 -1
- package/assets/esri/widgets/Print/t9n/messages.sl.json +1 -1
- package/assets/esri/widgets/Print/t9n/messages.sr.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.bs.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.de.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.et.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.hr.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/Search/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.ar.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.ca.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.cs.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.el.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.es.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.fi.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.he.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.it.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.lt.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.lv.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.pl.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.ro.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.ru.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.sl.json +1 -1
- package/assets/esri/widgets/smartMapping/HeatmapSlider/t9n/messages.uk.json +1 -1
- package/assets/esri/widgets/support/GridControls/t9n/messages.pt-BR.json +1 -1
- package/chunks/DeepSky.glsl.js +2 -2
- package/chunks/FocusArea.glsl.js +1 -1
- package/chunks/GaussianSplatDepth.glsl.js +3 -3
- package/chunks/RibbonLine.glsl.js +15 -13
- package/config.js +1 -1
- package/core/Evented.d.ts +1 -1
- package/form/elements/AttachmentElement.d.ts +5 -5
- package/form/elements/inputs/attachments/AttachmentInput.d.ts +1 -1
- package/geometry/Extent.js +1 -1
- package/geometry/operators/affineTransformOperator.d.ts +9 -3
- package/geometry/operators/affineTransformOperator.js +1 -1
- package/geometry/operators/alphaShapeOperator.d.ts +14 -4
- package/geometry/operators/alphaShapeOperator.js +1 -1
- package/geometry/operators/areaOperator.d.ts +11 -3
- package/geometry/operators/areaOperator.js +1 -1
- package/geometry/operators/autoCompleteOperator.d.ts +6 -2
- package/geometry/operators/autoCompleteOperator.js +1 -1
- package/geometry/operators/boundaryOperator.d.ts +9 -3
- package/geometry/operators/boundaryOperator.js +1 -1
- package/geometry/operators/bufferOperator.d.ts +19 -5
- package/geometry/operators/bufferOperator.js +1 -1
- package/geometry/operators/centroidOperator.d.ts +6 -2
- package/geometry/operators/centroidOperator.js +1 -1
- package/geometry/operators/clipOperator.d.ts +9 -3
- package/geometry/operators/clipOperator.js +1 -1
- package/geometry/operators/containsOperator.d.ts +9 -3
- package/geometry/operators/containsOperator.js +1 -1
- package/geometry/operators/convexHullOperator.d.ts +17 -5
- package/geometry/operators/convexHullOperator.js +1 -1
- package/geometry/operators/crossesOperator.d.ts +9 -3
- package/geometry/operators/crossesOperator.js +1 -1
- package/geometry/operators/cutOperator.d.ts +6 -2
- package/geometry/operators/cutOperator.js +1 -1
- package/geometry/operators/densifyOperator.d.ts +14 -4
- package/geometry/operators/densifyOperator.js +1 -1
- package/geometry/operators/differenceOperator.d.ts +9 -3
- package/geometry/operators/differenceOperator.js +1 -1
- package/geometry/operators/disjointOperator.d.ts +9 -3
- package/geometry/operators/disjointOperator.js +1 -1
- package/geometry/operators/distanceOperator.d.ts +11 -3
- package/geometry/operators/distanceOperator.js +1 -1
- package/geometry/operators/equalsOperator.d.ts +9 -3
- package/geometry/operators/equalsOperator.js +1 -1
- package/geometry/operators/extendOperator.d.ts +11 -3
- package/geometry/operators/extendOperator.js +1 -1
- package/geometry/operators/generalizeOperator.d.ts +14 -4
- package/geometry/operators/generalizeOperator.js +1 -1
- package/geometry/operators/geodesicBufferOperator.d.ts +25 -7
- package/geometry/operators/geodesicBufferOperator.js +1 -1
- package/geometry/operators/geodesicProximityOperator.d.ts +28 -8
- package/geometry/operators/geodesicProximityOperator.js +1 -1
- package/geometry/operators/geodeticAreaOperator.d.ts +17 -5
- package/geometry/operators/geodeticAreaOperator.js +1 -1
- package/geometry/operators/geodeticDensifyOperator.d.ts +20 -6
- package/geometry/operators/geodeticDensifyOperator.js +1 -1
- package/geometry/operators/geodeticDistanceOperator.d.ts +17 -5
- package/geometry/operators/geodeticDistanceOperator.js +1 -1
- package/geometry/operators/geodeticLengthOperator.d.ts +17 -5
- package/geometry/operators/geodeticLengthOperator.js +1 -1
- package/geometry/operators/geodeticUtilsOperator.d.ts +17 -5
- package/geometry/operators/geodeticUtilsOperator.js +1 -1
- package/geometry/operators/graphicBufferOperator.d.ts +11 -3
- package/geometry/operators/graphicBufferOperator.js +1 -1
- package/geometry/operators/integrateOperator.d.ts +6 -2
- package/geometry/operators/integrateOperator.js +1 -1
- package/geometry/operators/intersectionOperator.d.ts +12 -4
- package/geometry/operators/intersectionOperator.js +1 -1
- package/geometry/operators/intersectsOperator.d.ts +9 -3
- package/geometry/operators/intersectsOperator.js +1 -1
- package/geometry/operators/isNearOperator.d.ts +11 -3
- package/geometry/operators/isNearOperator.js +1 -1
- package/geometry/operators/json/bufferOperator.js +1 -1
- package/geometry/operators/json/containsOperator.js +1 -1
- package/geometry/operators/json/convexHullOperator.js +1 -1
- package/geometry/operators/json/crossesOperator.js +1 -1
- package/geometry/operators/json/disjointOperator.js +1 -1
- package/geometry/operators/json/generalizeOperator.js +1 -1
- package/geometry/operators/json/geodesicBufferOperator.js +1 -1
- package/geometry/operators/json/graphicBufferOperator.js +1 -1
- package/geometry/operators/json/intersectionOperator.js +1 -1
- package/geometry/operators/json/intersectsOperator.js +1 -1
- package/geometry/operators/json/lengthOperator.js +1 -1
- package/geometry/operators/json/offsetOperator.js +1 -1
- package/geometry/operators/json/overlapsOperator.js +1 -1
- package/geometry/operators/json/projectOperator.js +1 -1
- package/geometry/operators/json/simplifyOperator.js +1 -1
- package/geometry/operators/json/simplifyOperatorOGC.js +1 -1
- package/geometry/operators/json/touchesOperator.js +1 -1
- package/geometry/operators/json/unionOperator.js +1 -1
- package/geometry/operators/json/withinOperator.js +1 -1
- package/geometry/operators/labelPointOperator.d.ts +9 -3
- package/geometry/operators/labelPointOperator.js +1 -1
- package/geometry/operators/lengthOperator.d.ts +11 -3
- package/geometry/operators/lengthOperator.js +1 -1
- package/geometry/operators/linesToPolygonsOperator.d.ts +6 -2
- package/geometry/operators/linesToPolygonsOperator.js +1 -1
- package/geometry/operators/locateBetweenOperator.d.ts +6 -2
- package/geometry/operators/locateBetweenOperator.js +1 -1
- package/geometry/operators/minimumBoundingCircleOperator.d.ts +14 -4
- package/geometry/operators/minimumBoundingCircleOperator.js +1 -1
- package/geometry/operators/multiPartToSinglePartOperator.d.ts +11 -3
- package/geometry/operators/multiPartToSinglePartOperator.js +1 -1
- package/geometry/operators/offsetOperator.d.ts +14 -4
- package/geometry/operators/offsetOperator.js +1 -1
- package/geometry/operators/overlapsOperator.d.ts +9 -3
- package/geometry/operators/overlapsOperator.js +1 -1
- package/geometry/operators/polygonOverlayOperator.d.ts +11 -3
- package/geometry/operators/polygonOverlayOperator.js +1 -1
- package/geometry/operators/polygonSlicerOperator.d.ts +22 -6
- package/geometry/operators/polygonSlicerOperator.js +1 -1
- package/geometry/operators/projectOperator.d.ts +15 -5
- package/geometry/operators/projectOperator.js +1 -1
- package/geometry/operators/proximityOperator.d.ts +22 -6
- package/geometry/operators/proximityOperator.js +1 -1
- package/geometry/operators/relateOperator.d.ts +12 -4
- package/geometry/operators/relateOperator.js +1 -1
- package/geometry/operators/reshapeOperator.d.ts +6 -2
- package/geometry/operators/reshapeOperator.js +1 -1
- package/geometry/operators/shapePreservingProjectOperator.d.ts +20 -6
- package/geometry/operators/shapePreservingProjectOperator.js +1 -1
- package/geometry/operators/simplifyOGCOperator.d.ts +3 -1
- package/geometry/operators/simplifyOGCOperator.js +1 -1
- package/geometry/operators/simplifyOperator.d.ts +12 -4
- package/geometry/operators/simplifyOperator.js +1 -1
- package/geometry/operators/singlePartToMultiPartOperator.js +1 -1
- package/geometry/operators/support/deprecatedOperator.js +2 -0
- package/geometry/operators/symmetricDifferenceOperator.d.ts +9 -3
- package/geometry/operators/symmetricDifferenceOperator.js +1 -1
- package/geometry/operators/touchesOperator.d.ts +9 -3
- package/geometry/operators/touchesOperator.js +1 -1
- package/geometry/operators/unionOperator.d.ts +9 -3
- package/geometry/operators/unionOperator.js +1 -1
- package/geometry/operators/withinOperator.d.ts +9 -3
- package/geometry/operators/withinOperator.js +1 -1
- package/geometry/support/intersectsBase.js +1 -1
- package/geometry/support/normalizeUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/FeatureLayer.d.ts +2 -2
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
- package/layers/list/BasemapItemCollection.d.ts +40 -14
- package/layers/list/BasemapItemCollection.js +1 -1
- package/layers/list/CatalogItemCollection.d.ts +29 -11
- package/layers/list/CatalogItemCollection.js +1 -1
- package/layers/list/Item.d.ts +66 -122
- package/layers/list/Item.js +1 -1
- package/layers/list/ItemPanel.d.ts +23 -34
- package/layers/list/LayerItemCollection.d.ts +33 -43
- package/layers/list/LayerItemCollection.js +1 -1
- package/layers/list/TableItem.d.ts +42 -53
- package/layers/list/TableItem.js +1 -1
- package/layers/list/TableItemCollection.d.ts +25 -55
- package/layers/list/TableItemCollection.js +1 -1
- package/layers/list/TableItemPanel.d.ts +25 -23
- package/layers/list/support/layerListUtils.js +1 -1
- package/layers/list/types.d.ts +158 -37
- package/layers/support/ElevationQuery.js +1 -1
- package/layers/support/FeatureFilter.d.ts +2 -1
- package/layers/support/FeatureFilter.js +1 -1
- package/layers/support/FeatureReductionBinning.d.ts +2 -2
- package/layers/support/FeatureReductionCluster.d.ts +2 -2
- package/layers/support/SubtypeSublayer.d.ts +1 -1
- package/package.json +3 -3
- package/popup/FeatureContent.d.ts +7 -7
- package/portal/schemas/definitions.js +1 -1
- package/portal/types.d.ts +1 -1
- package/renderers/DotDensityRenderer.d.ts +2 -2
- package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.d.ts +0 -1
- package/rest/knowledgeGraph/ReplicaDefinition.d.ts +1 -1
- package/rest/knowledgeGraphService.d.ts +2 -2
- package/rest/support/Query.d.ts +1 -3
- package/rest/support/RelationshipQuery.d.ts +1 -1
- package/support/revision.js +1 -1
- package/symbols/LineSymbol3D.js +1 -1
- package/symbols/LineSymbol3DLayer.d.ts +9 -3
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/OverrideHelper.js +1 -1
- package/symbols/cim/Rasterizer.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/dashUtils.js +2 -0
- package/symbols/cim/effects/EffectDashes.js +1 -1
- package/symbols/cim/fromCIMFontStyle.js +2 -0
- package/symbols/cim/richTextUtils.js +1 -1
- package/symbols/cim/types.d.ts +32 -0
- package/symbols/cim/utils.js +1 -1
- package/symbols/patterns/LinePattern3D.d.ts +10 -4
- package/symbols/patterns/LinePattern3D.js +1 -1
- package/symbols/patterns/LineTemplatePattern3D.d.ts +48 -0
- package/symbols/patterns/LineTemplatePattern3D.js +2 -0
- package/symbols/patterns/utils.js +1 -1
- package/symbols/support/Symbol3DOutline.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/FeatureDisplayList.js +1 -1
- package/views/2d/engine/webgl/GlyphMosaic.js +1 -1
- package/views/2d/engine/webgl/GlyphWorker.js +1 -1
- package/views/2d/engine/webgl/TextureManager.js +1 -1
- package/views/2d/engine/webgl/decorGlyphRect.js +2 -0
- package/views/2d/engine/webgl/definitions.js +1 -1
- package/views/2d/engine/webgl/effects/highlight/HighlightGradient.js +1 -1
- package/views/2d/engine/webgl/effects/highlight/MultiHighlightGradient.js +1 -1
- package/views/2d/engine/webgl/hashMosaic.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/ShaderHighlight.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/utils.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/GraphicsLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/MapImageLayerView2D.js +1 -1
- package/views/2d/layers/MapNotesLayerView2D.js +1 -1
- package/views/2d/layers/RouteLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.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/processor/AProcessorStrategy.js +1 -1
- package/views/2d/layers/features/processor/AggregateStrategy.js +1 -1
- package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
- package/views/2d/layers/features/processor/bins/BinLevelState.js +1 -1
- package/views/2d/layers/features/processor/clusters/ClusterLevelState.js +1 -1
- package/views/2d/layers/features/processor/tracks/TrackLevelState.js +1 -1
- package/views/2d/layers/features/schema/processor/SimpleProcessorSchema.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/graphics/AGraphicContainer.js +1 -1
- package/views/2d/layers/graphics/GraphicBoundsRenderer.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/2d/layers/support/FeatureCommandQueue.js +1 -1
- package/views/2d/layers/support/FilterSchema.js +2 -0
- package/views/2d/layers/support/HighlightRegistry.js +2 -0
- package/views/2d/layers/support/annodime/dimensionUtils.js +1 -1
- package/views/2d/layers/support/util.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.d.ts +1 -1
- package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/Viewshed/placementUtils.js +1 -1
- package/views/3d/input/SceneInputManager.js +1 -1
- package/views/3d/input/handlers/ground/GroundNavigation.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/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
- package/views/3d/navigation/Navigation3D.d.ts +16 -0
- package/views/3d/navigation/Navigation3D.js +2 -0
- package/views/3d/navigation/modes/DefaultNavigationMode3D.d.ts +4 -0
- package/views/3d/navigation/modes/DefaultNavigationMode3D.js +2 -0
- package/views/3d/navigation/modes/GroundNavigationMode3D.d.ts +4 -0
- package/views/3d/navigation/modes/GroundNavigationMode3D.js +2 -0
- package/views/3d/navigation/modes/NavigationMode3D.d.ts +4 -0
- package/views/3d/navigation/modes/NavigationMode3D.js +2 -0
- package/views/3d/navigation/modes/NavigationMode3DUnion.d.ts +5 -0
- package/views/3d/state/ConstraintsManager.js +1 -1
- package/views/3d/support/QualityProfile.js +1 -1
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/terrain/ExtentHelper.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/effects/AmbientIllumination.js +2 -0
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/glow/BlurEmission.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/EmissionComposite.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatDepthRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/lineStippleUtils.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +12 -8
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/BreakpointsOwner.d.ts +2 -2
- package/views/PopupView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/SelectionManager.d.ts +24 -24
- package/views/View.js +1 -1
- package/views/View2D.js +1 -1
- package/views/interactive/support/types.d.ts +0 -1
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/views/support/DefaultsFromMap.js +1 -1
- package/widgets/Attachments/support/attachmentUtils.d.ts +8 -0
- package/widgets/BasemapLayerList/BasemapLayerListViewModel.d.ts +1 -0
- package/widgets/BasemapLayerList/BasemapLayerListViewModel.js +1 -1
- package/widgets/BasemapLayerList/BasemapLayerListVisibleElements.d.ts +5 -1
- package/widgets/BasemapLayerList/types.d.ts +15 -2
- package/widgets/BasemapLayerList.d.ts +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +14 -0
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
- package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +29 -2
- package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/MultipleChoiceController.d.ts +1 -5
- package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/types.d.ts +8 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.d.ts +2 -2
- package/widgets/Editor.d.ts +2 -2
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +6 -6
- package/widgets/FeatureTable/support/FeatureStore.d.ts +2 -2
- package/widgets/FeatureTable.d.ts +5 -5
- package/widgets/LayerList/LayerListViewModel.d.ts +1 -0
- package/widgets/LayerList/LayerListViewModel.js +1 -1
- package/widgets/LayerList/LayerListVisibleElements.d.ts +4 -1
- package/widgets/LayerList/ListItem.d.ts +4 -0
- package/widgets/LayerList/ListItemPanel.d.ts +3 -0
- package/widgets/OrientedImageryViewer/types.d.ts +2 -2
- package/widgets/OrientedImageryViewer.d.ts +20 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/support/SelectionList/SelectionListViewModel.d.ts +1 -1
- package/widgets/support/iconUtils.js +1 -1
- package/assets/esri/core/workers/chunks/03601be8b0763f82e88f.js +0 -1
- package/assets/esri/core/workers/chunks/0bff8d589312be6588fe.js +0 -1
- package/assets/esri/core/workers/chunks/0de90b1ad8118457fd5a.js +0 -1
- package/assets/esri/core/workers/chunks/0e1a067ab243900d0371.js +0 -1
- package/assets/esri/core/workers/chunks/0ee6109e6578395a7900.js +0 -1
- package/assets/esri/core/workers/chunks/0ee7376c29e0fd8f676c.js +0 -1
- package/assets/esri/core/workers/chunks/13551987fbeaae154df8.js +0 -1
- package/assets/esri/core/workers/chunks/186350d720352bd5ff33.js +0 -1
- package/assets/esri/core/workers/chunks/25ecf94d776c3b6db0f3.js +0 -1
- package/assets/esri/core/workers/chunks/262052dfaec3af8a58b9.js +0 -1
- package/assets/esri/core/workers/chunks/2c01477b69c38f691e19.js +0 -1
- package/assets/esri/core/workers/chunks/307297e025eed110095f.js +0 -1
- package/assets/esri/core/workers/chunks/33422dca6f4bcaa0ea74.js +0 -1
- package/assets/esri/core/workers/chunks/33e583166ab3943ecf0e.js +0 -1
- package/assets/esri/core/workers/chunks/37ae52c71bf9c70fbb92.js +0 -1
- package/assets/esri/core/workers/chunks/3daddcb106a7009c5a70.js +0 -1
- package/assets/esri/core/workers/chunks/3de6e54b6ed0feae1940.js +0 -1
- package/assets/esri/core/workers/chunks/448f068a14f24f2f8a43.js +0 -1
- package/assets/esri/core/workers/chunks/4c088c26d5d546c95c90.js +0 -1
- package/assets/esri/core/workers/chunks/5134241be1f1bf25231a.js +0 -1
- package/assets/esri/core/workers/chunks/56163189fbe63aa11e94.js +0 -1
- package/assets/esri/core/workers/chunks/571cf99c3eab8e517542.js +0 -1
- package/assets/esri/core/workers/chunks/5762746cfb02a4119d82.js +0 -1
- package/assets/esri/core/workers/chunks/5830deda121e4c95d199.js +0 -1
- package/assets/esri/core/workers/chunks/58e4aecabca047f1d229.js +0 -1
- package/assets/esri/core/workers/chunks/5c8f423812a23c02c1fd.js +0 -1
- package/assets/esri/core/workers/chunks/5eb726317b6602f1e206.js +0 -1
- package/assets/esri/core/workers/chunks/6e2075bd4832ff0db68c.js +0 -1
- package/assets/esri/core/workers/chunks/7608de0d942b4c16b2f6.js +0 -1
- package/assets/esri/core/workers/chunks/7610dd0b46948b7bd840.js +0 -1
- package/assets/esri/core/workers/chunks/7737ab739eba6d81282d.js +0 -1
- package/assets/esri/core/workers/chunks/7be56ac60e580c806a5d.js +0 -1
- package/assets/esri/core/workers/chunks/7d9468e38f3bf006f86e.js +0 -1
- package/assets/esri/core/workers/chunks/7efc51324cfc8e08c756.js +0 -1
- package/assets/esri/core/workers/chunks/84dc2afd89263a311b81.js +0 -1
- package/assets/esri/core/workers/chunks/852649460d664b0a1a1d.js +0 -1
- package/assets/esri/core/workers/chunks/ab332bd411d6c7d4190c.js +0 -1
- package/assets/esri/core/workers/chunks/bc9b96a539f28afcb8cb.js +0 -1
- package/assets/esri/core/workers/chunks/be69e2dda75b079362b2.js +0 -1
- package/assets/esri/core/workers/chunks/bf9eba555aebca2c132b.js +0 -1
- package/assets/esri/core/workers/chunks/c18de0f6cbeecee4ce34.js +0 -1
- package/assets/esri/core/workers/chunks/c9df18e9ff7367a004b6.js +0 -1
- package/assets/esri/core/workers/chunks/d33d08cb6856cd2eb35e.js +0 -1
- package/assets/esri/core/workers/chunks/e688e6e816824b53a25e.js +0 -1
- package/assets/esri/core/workers/chunks/ea068c797e3e462f4518.js +0 -1
- package/assets/esri/core/workers/chunks/eaf1d38f09744b7e84f5.js +0 -1
- package/assets/esri/core/workers/chunks/eff99e45d818e58fd443.js +0 -1
- package/assets/esri/core/workers/chunks/f219ba010c480bb75684.js +0 -1
- package/assets/esri/core/workers/chunks/f60d5ce49c173d5381ec.js +0 -1
- package/assets/esri/core/workers/chunks/f72f4413fc7461e11a2a.js +0 -1
- package/assets/esri/core/workers/chunks/f834aa732c3f06525089.js +0 -1
- package/assets/esri/core/workers/chunks/fae14e30fa7d81bf706e.js +0 -1
- package/assets/esri/core/workers/chunks/fb6f1b562ee0983c8c6e.js +0 -1
- package/assets/esri/core/workers/chunks/fc1658eae7b312502fab.js +0 -1
- package/graphic/graphicOrigins.js +0 -2
- package/views/2d/engine/webgl/Utils.js +0 -2
- package/views/2d/layers/support/HighlightCounter.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{makeHandle as i}from"../../../core/handleUtils.js";import t from"../../../core/Logger.js";import{isAbortError as
|
|
2
|
+
import{__decorate as e}from"tslib";import{makeHandle as i}from"../../../core/handleUtils.js";import t from"../../../core/Logger.js";import{isAbortError as r,waitTick as s}from"../../../core/promiseUtils.js";import{property as h,subclass as a}from"../../../core/accessorSupport/decorators.js";import{equals as o}from"../../../geometry/support/spatialReferenceUtils.js";import l from"../../../layers/support/FeatureFilter.js";import{GraphicsCollection as p}from"../../../support/GraphicsCollection.js";import"../engine/Stage.js";import"../../../Color.js";import"../../../core/libs/gl-matrix-2/factories/vec4f32.js";import"../../../geometry/Point.js";import"../../../chunks/pe.js";import"../../../core/has.js";import"../../../core/units.js";import"../../../geometry/ellipsoidUtils.js";import"../../../core/RandomLCG.js";import"../../../core/Accessor.js";import"../engine/transitions/FadeTransition.js";import"../../webgl/BufferObject.js";import"../../webgl/FramebufferObject.js";import"../../webgl/Program.js";import"../../webgl/Renderbuffer.js";import"../../webgl/Texture.js";import"../../webgl/enums.js";import"../../webgl/Util.js";import"../engine/webgl/meshing/definitions.js";import"../engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js";import"../LabelManager.js";import n from"./graphics/GraphicsView2D.js";import"../../../layers/effects/EffectView.js";import"../engine/webgl/shaderGraph/techniques/clip/ClipTechnique.js";import"../engine/webgl/shaderGraph/techniques/shaders/TileInfo.js";import"../engine/webgl/AFeatureTile.js";import"../engine/webgl/DisplayEntity.js";import"../../../core/libs/gl-matrix-2/factories/vec2f32.js";import"../engine/webgl/number.js";import"../engine/webgl/shaderGraph/techniques/featureTechniqueUtils.js";import"../engine/webgl/cpuMapped/GpuMeshState.js";import"../engine/webgl/shaderGraph/techniques/shaders/TileDebugInfoShader.js";import"../engine/webgl/shaderGraph/techniques/shaders/TileStencilShader.js";import"../../webgl/UniformBufferLayout.js";import"../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import"../../../core/libs/gl-matrix-2/factories/vec3f32.js";import"../../../geometry/support/normalizeUtils.js";import"./support/util.js";import"../navigation/MapViewNavigation.js";import"../../../request.js";import"../../../core/asyncUtils.js";import"../../../core/accessorSupport/watch.js";import"../../../core/accessorSupport/tracking/SimpleTrackingTarget.js";import"../../../core/support/UpdatingHandles.js";import"../../../core/mathUtils.js";import"../../../core/urlUtils.js";import"../engine/webgl/shaderGraph/techniques/shaders/MagnifierShader.js";import"../../../geometry/Extent.js";import"../../../geometry/Geometry.js";import"../../../geometry/Multipoint.js";import"../../../geometry/Polygon.js";import"../../../geometry/Polyline.js";import"../../../geometry/SpatialReference.js";import"../../../geometry/spatialReferenceEllipsoidUtils.js";import"../../../geometry/operators/support/GeographicTransformation.js";import"../../../geometry/projection/projectors.js";import"../engine/webgl/shaderGraph/techniques/shaders/GridShader.js";import"../../../geometry/support/geodesicConstants.js";import"../../../geometry/support/Ellipsoid.js";import{BitmapTileLayerView2D as c}from"./BitmapTileLayerView2D.js";import{LayerView2D as g}from"./LayerView2D.js";import m from"./graphics/HighlightGraphicContainer.js";import{createBlankImage as u,resampleImage as f}from"./support/imageUtils.js";import d from"../tiling/TileInfoView.js";import y from"../tiling/TileKey.js";import w from"../tiling/TileQueue.js";import j from"../tiling/TileStrategy.js";import _ from"../../layers/LayerView.js";import{RefreshableLayerView as T}from"../../layers/RefreshableLayerView.js";import{getHighlightGraphics as b}from"../../layers/support/highlightUtils.js";import{isMapServiceLayerView as V,MapServiceLayerViewHelper as U}from"../../layers/support/MapServiceLayerViewHelper.js";import{createQueryGeometry as v}from"../../support/drapedUtils.js";import{getHighlightName as H}from"../../support/highlightOptionsUtils.js";import{TaskPriority as I}from"../../support/Scheduler.js";const q=[0,0];let G=class extends(T(c(g(_)))){constructor(){super(...arguments),this._fetchQueue=null,this._highlightGraphics=new p,this._highlightView=null,this._popupHighlightHelper=null,this._tileStrategy=null,this.layer=null}get resampling(){return!("resampling"in this.layer)||!1!==this.layer.resampling}get tilemapCache(){return"tilemapCache"in this.layer?this.layer.tilemapCache:null}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume(),this._highlightView?.processUpdate(e)}attach(){const e="tileServers"in this.layer?this.layer.tileServers:null,i=this.tilemapCache;if(this._tileInfoView=new d(this.layer.tileInfo,this.layer.fullExtent,i?.effectiveMinLOD,i?.effectiveMaxLOD),this._fetchQueue=new w({tileInfoView:this._tileInfoView,concurrency:e&&10*e.length||10,process:(e,i)=>this.fetchTile(e,i),scheduler:this.scheduler,priority:I.MAPVIEW_FETCH_QUEUE}),this._tileStrategy=new j({cachePolicy:"keep",resampling:this.resampling,acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),tileInfoView:this._tileInfoView}),V(this,this.layer)){const e=this._highlightView=new n({view:this.view,graphics:this._highlightGraphics,requestUpdateCallback:()=>this.requestUpdate(),container:new m(this.view.featuresTilingScheme),defaultPointSymbolEnabled:!1});this.container.addChild(this._highlightView.container),this._popupHighlightHelper=new U({createFetchPopupFeaturesQueryGeometry:(e,i)=>v(e,i,this.view),highlightGraphics:this._highlightGraphics,highlightGraphicUpdated:({graphic:i,property:t})=>e.graphicUpdateHandler({graphic:i,property:t}),layerView:this,updatingHandles:this._updatingHandles})}this.requestUpdate(),this.addAttachHandles(this._updatingHandles.add(()=>this.resampling,()=>{this.doRefresh()})),super.attach()}detach(){super.detach(),this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._popupHighlightHelper?.destroy(),this._highlightView?.destroy(),this._fetchQueue=this._tileStrategy=this._tileInfoView=this._popupHighlightHelper=null}async fetchPopupFeaturesAtTarget(e,i,t){return this._popupHighlightHelper?this._popupHighlightHelper.fetchPopupFeaturesAtTarget(i,t):[]}highlight(e,t){const r=b(e);if(0===r.length)return i();const s=H(t),h=this._addHighlightGraphics(r,s);return i(()=>!this.destroyed&&this._removeHighlightGraphics(r,h))}_onHighlightChange(){const e=this._getHighlightFilterGroups();this._highlightView?.setHighlightFilters(e)}_addHighlightGraphics(e,i){return this._highlightGraphics.addMany(e),this._addHighlightFilter(new l({objectIds:e.map(e=>e.uid)}),i)}_removeHighlightGraphics(e,i){this._highlightGraphics.removeMany(e),this._removeHighlight(i)}viewChange(){this.requestUpdate()}moveEnd(){this.requestUpdate()}supportsSpatialReference(e){return o(this.layer.tileInfo?.spatialReference,e)}async doRefresh(){if(this.attached){if(this.suspended)return this._tileStrategy.clear(),void this.requestUpdate();this._fetchQueue.reset(),this._tileStrategy.refresh(e=>this._updatingHandles.addPromise(this._enqueueTileFetch(e)))}}acquireTile(e){const i=this._bitmapView.createTile(e),t=i.bitmap;return[t.x,t.y]=this._tileInfoView.getTileCoords(q,i.key),t.resolution=this._tileInfoView.getTileResolution(i.key),[t.width,t.height]=this._tileInfoView.size,this._updatingHandles.consumePromise(this._enqueueTileFetch(i)),this._bitmapView.addChild(i),this.requestUpdate(),i}releaseTile(e){this._fetchQueue.abort(e.key.id),this._bitmapView.removeChild(e),e.once("detach",()=>e.destroy()),this.requestUpdate()}async fetchTile(e,i={}){return this.tilemapCache?this._fetchTileWithTilemapCache(e,i):this._fetchTileWithoutTilemapCache(e,i)}async _fetchTileWithoutTilemapCache(e,i={}){const{signal:t,resamplingLevel:s=0}=i;try{return await this._fetchImage(e,t)}catch(h){if(r(h))throw h;if(!this.resampling)return u(this._tileInfoView.size);if(s<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){const r=new y(t),h=await this._fetchTileWithoutTilemapCache(r,{...i,resamplingLevel:s+1});return f(this._tileInfoView,h,r,e)}}return u(this._tileInfoView.size)}}async _fetchTileWithTilemapCache(e,i={}){const t=this.tilemapCache,{signal:h,resamplingLevel:a=0}=i,o=new y(0,0,0,0);let l,p=null;try{if(p=await t.fetchAvailabilityUpsample(e.level,e.row,e.col,o,{signal:h}),!this.resampling&&o.level!==e.level)return await s(i),u(this._tileInfoView.size);l=await this._fetchImage(o,h)}catch(n){if(r(n))throw n;if(this.resampling&&"unknown"===p&&a<3){const t=this._tileInfoView.getTileParentId(e.id);if(t){o.set(t);try{l=await this._fetchTileWithTilemapCache(o,{...i,resamplingLevel:a+1})}catch{}}}}return l?this.resampling?f(this._tileInfoView,l,o,e):l:u(this._tileInfoView.size)}async _enqueueTileFetch(e){if(!this._fetchQueue.has(e.key.id)){try{const i=await this._fetchQueue.push(e.key);e.bitmap.source=i,e.bitmap.width=this._tileInfoView.size[0],e.bitmap.height=this._tileInfoView.size[1],e.once("attach",()=>this.requestUpdate()),e.once("isReady",()=>this.requestUpdate())}catch(i){r(i)||t.getLogger(this).error(i)}this.requestUpdate()}}async _fetchImage(e,i){return this.layer.fetchImageBitmapTile(e.level,e.row,e.col,{signal:i}).then(({bitmap:e})=>e)}};e([h()],G.prototype,"resampling",null),e([h()],G.prototype,"tilemapCache",null),G=e([a("esri.views.2d.layers.TileLayerView2D")],G);const S=G;export{S as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import has from"../../../../core/has.js";import{destroyMaybe as e}from"../../../../core/maybe.js";import{throwIfAborted as t}from"../../../../core/promiseUtils.js";import{signal as r}from"../../../../core/signal.js";import{AFeatureContainer as s}from"../../engine/AFeatureContainer.js";import{ClipMesh as i}from"../../engine/webgl/ClipMesh.js";import{effectFlag0 as n,filterFlag0 as a}from"../../engine/webgl/definitions.js";import o from"../../engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js";import{Techniques as l}from"../../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import{FeatureTilePresentStrategy as h}from"./FeatureTilePresentStrategy.js";import{RenderState as d}from"./RenderState.js";import{renderHighlight as u}from"../support/util.js";import{createHittestQuery as c}from"../../support/hitTestUtils.js";import p from"../../../layers/support/Path.js";class f{constructor(e){this.inner=e,this.resolver=Promise.withResolvers()}}class _{constructor(e){this.level=e,this.id=performance.now(),this.messages=[]}}class v{constructor(e,t){this.id=e,this.version=t}}class g extends s{constructor(e){super(e.view.featuresTilingScheme),this.referenceScale=null,this._updatingChildren=r(!1),this._hitTestsRequests=[],this._renderState=r(null),this._renderStateNext=r(null),this._store=new o,this._subscriptions=new Map,this._presentation=new h,this._updateStatisticsRequests=[],this._lockStatisticUpdates=!1,this._supportsInstanceCleanup=!0,this._shouldUnlockAttributeView=!1,this._layerView=e,this.addTransitionable(this._layerView.featureEffectView)}destroy(){super.destroy(),this._renderState.value=e(this._renderState.value),this._renderStateNext.value=e(this._renderStateNext.value)}get batching(){return has("featurelayer-strict-draw-order")?1:has("featurelayer-force-marker-text-draw-order")?2:0}get updating(){const e=this._updatingChildren.value,t=!this._renderState.value||this._renderState.value.updating,r=!!this._renderStateNext.value,s=this.attributeView.updating;return e||t||r||s}subscriptions(){return this._subscriptions.values()}get hasLabels(){return null!==this.labelSchema}get hasHighlight(){return this._layerView.hasHighlight}get children(){return this._renderState.value?this._renderState.value.tiles().filter(e=>e.presenting):[]}get usedMemory(){let e=0;return this._renderState.value&&(e+=this._renderState.value.usedMemory),this._renderStateNext.value&&(e+=this._renderStateNext.value.usedMemory),e+=this.attributeView.usedMemory,e}get instanceStore(){return this._store}get labelingCollisionInfos(){if(!this._deconflictionInfo)throw new Error("InternalError: DeconflictionInfo not defined. Was update called?");return this._deconflictionInfo}get labelSchema(){return this._schema?.mesh.factory.labels??null}get layerOrder(){return this._layerView.view.allLayerViews.items.indexOf(this._layerView)}get tiles(){return this._renderState.value?.tiles()}get requiresRefresh(){return!!this._renderState.value?.requiresRefresh}get _instanceStore(){return this._store}_getHeatmapInstance(e){if(null==this._instanceStore||!(e.drawPhase&l.heatmap.drawPhase))return null;for(const t of this._instanceStore.values())if(S(t))return t;return null}update(e,t){this._schema=e,this._deconflictionInfo=t}setCoverage(e){this._presentation.updateCoverage(e)}getPresenting(){const e=new Set;for(const t of this._renderState.value?.tiles()??[])t.presenting&&e.add(t.id);return e}beforeRender(e){if(super.beforeRender(e),this._renderState.value){for(const t of this._renderState.value.tiles())t.setTransform(e.state);if(!e.decluttering){this._presentation.update(this._renderState.value.tiles());for(const e of this._renderState.value.tiles())e.upload(this._instanceStore,this.batching)}this._updatingChildren.value=!this.children.every(e=>e.ended&&e.presenting)}}renderChildren(e){switch(super.renderChildren(e),e.drawPhase){case 1:return this._renderMapPhase(e);case 8:return this._renderHighlightPhase(e);case 2:return this._renderLabelPhase(e)}}afterRender(e){super.afterRender(e),e.decluttering||(this._finializeUpdate(),this._updateAttributeView(),this._handleSwapRenderState(),this._renderState.value?.update(this.attributeView.currentEpoch)),this._hitTestsRequests.length&&this.requestRender()}updateStart(e){return this.attributeView.lockTextureUploads(),this._supportsInstanceCleanup=!e&&"dictionary"!==this._schema?.mesh.factory.symbology.type,this.instanceStore.updateStart(this._supportsInstanceCleanup),this.instanceStore}async updateEnd(e,t,r){return this._updateResolver=new f({schema:e,deconflictionInfo:t,invalidateMesh:r}),this.requestRender(),e.mesh.factory.referenceScale&&(this.referenceScale=e.mesh.factory.referenceScale),this._updateResolver.resolver.promise}updateAttributeView(e){this.requestRender(),this.attributeView.requestUpdate(e)}updateSubscriptions(e){for(const{tileId:t,version:r}of e.subscribe){if(!this._subscriptions.has(t)){const e=new v(t,r);this._subscriptions.set(t,e);continue}this._subscriptions.get(t).version=r}for(const t of e.unsubscribe)this._subscriptions.delete(t),this.removeTile(t)}isFeatureFiltered(e){const t=this.attributeView.getFilterFlags(e),r=t&a,s=null==this._layerView.featureEffectView.featureEffect||this._layerView.featureEffectView.featureEffect.excludedLabelsVisible||t&n;return!(r&&s)}getDisplayStatistics(e,t){const r=this._statisticsByLevel.get(e);return r?r.get(t):null}updateStatistics(e,t){if(this._lockStatisticUpdates)return void this._updateStatisticsRequests.push({level:e,statistics:t});let r=this._statisticsByLevel.get(e);r||(r=new Map,this._statisticsByLevel.set(e,r));for(const s of t)r.set(s.fieldName,{minValue:s.minValue,maxValue:s.maxValue})}beginLevelMeshUpdate(e){if(null!=this._pendingLevelUpdate)throw new Error("InternalError: Pending level mesh update in progress");return this._pendingLevelUpdate=new _(e),has("esri-2d-update-debug")&&console.debug(`FeatureContainer.beginLevelMeshUpdate(level=${e}, id=${this._pendingLevelUpdate.id})`),this._pendingLevelUpdate.id}applyLevelMeshUpdate(e){if(null==this._pendingLevelUpdate)throw new Error("InternalError: No level mesh update to apply");if(this._pendingLevelUpdate.id!==e)throw new Error("InternalError: Unexpected id");if(has("esri-2d-update-debug")){const{id:e,level:t}=this._pendingLevelUpdate;console.debug(`FeatureContainer.applyLevelMeshUpdate(level=${t}, id=${e})`)}const{level:t,messages:r}=this._pendingLevelUpdate,s=this._renderStateNext.value??this._renderState.value;if(!s)throw new Error("InternalError: No renderState defined");s.enqueueLevelReplace(t,r),this._pendingLevelUpdate=null,this.requestRender()}lockForOverrides(){this._renderState.value?.lockUploads(),this._lockStatisticUpdates=!0,this.attributeView.locked||(this.attributeView.lockTextureUploads(),this._shouldUnlockAttributeView=!0)}unlockForOverrides(){this._renderState.value?.unlockUploads(),this._shouldUnlockAttributeView&&(this.attributeView.unlockTextureUploads()&&this.hasLabels&&this.requestDeclutter(),this._shouldUnlockAttributeView=!1),this._lockStatisticUpdates=!1;for(const e of this._updateStatisticsRequests)this.updateStatistics(e.level,e.statistics);this._updateStatisticsRequests=[],this._renderState.value?.flush(this.attributeView.currentEpoch),this.requestRender()}async updateRenderState(e){if(this._renderStateNext.value)throw new Error("InternalError: renderStateNext already exists");has("esri-2d-update-debug")&&console.debug(`Version[${e}] FeatureContainer.updateRenderState`),this._renderStateNext.value=new d(()=>this._stage,e=>this._subscriptions.get(e)?.version,e,this.tilingScheme)}async swapRenderState(){if(!this._renderStateNext.value)throw new Error("InternalError: renderStateNext not yet created");if(this._renderStateSwapResolver)throw new Error("InternalError: renderState swap already in progress");this._renderStateSwapResolver=Promise.withResolvers(),await this._renderStateSwapResolver.promise}async onMessage(e,r){if(t(r),!this._pendingLevelUpdate)return this._applyMessage(e);this._pendingLevelUpdate.messages.push(e)}removeTile(e){(this._renderState.value||this._renderStateNext.value)&&(this._renderState.value&&this._renderState.value.removeTile(e),this._renderStateNext.value&&this._renderStateNext.value.removeTile(e))}async hitTest(e,t){const r=c(e,t);if(!r)return console.warn("Unexpected hittest input:",e),{trueHitIds:[],candidateHitIds:[]};const s=this._hitTestsRequests.find(({query:e})=>r.hittestType===e.hittestType&&r.input===e.input&&r.options===e.options),n=Promise.withResolvers();if(s)s.resolvers.push(n);else{if("polygon"===r.hittestType&&(r.polygonMesh=await i.create(new p({path:[r.input.map(e=>[e.x,e.y])]})),!r.polygonMesh))return n.resolve({trueHitIds:[],candidateHitIds:[]}),n.promise;this._hitTestsRequests.push({query:r,resolvers:[n]})}return this.requestRender(),n.promise}getSortKeys(e){const t=new Set(e),r=new Map;for(const s of this.children)if(s.getSortKeys(t).forEach((e,t)=>r.set(t,e)),r.size===t.size)break;return r}get hasAnimation(){return this.hasLabels}doRender(e){const{minScale:t,maxScale:r}=this._layerView.layer.effectiveScaleRange,s=e.state.scale;s<=(t||1/0)&&s>=r&&super.doRender(e)}setStencilReference(e){if(null==this._getHeatmapInstance(e))super.setStencilReference(e);else for(const t of this.children)t.stencilRef=l.heatmap.getStencilReference(t)}createRenderParams(e){const t=super.createRenderParams(e);return t.referenceScale=this.referenceScale,t}_applyMessage(e){const t=e.inner;if(!this._subscriptions.has(t.id))return;const r=this._subscriptions.get(t.id);if(r.version!==t.subscriptionVesrion){if(has("esri-2d-update-debug")){const e=`${t.subscriptionVesrion} != ${r.version}`;console.debug(`Version[${e}] Tile[${t.id}] FeatureContainer - Dropping message, outdated version]`,t)}return}const s=this._renderStateNext.value??this._renderState.value;if(!s)throw new Error("InternalError: No renderState defined");s.version!==t.version&&console.error(`InternalError: Version mismatch. [renderState: ${s.version}, message: ${t.version}]`),s.enqueueUpdate(e),this.requestRender()}_finializeUpdate(){if(!this._updateResolver)return;const{schema:e,deconflictionInfo:t,invalidateMesh:r}=this._updateResolver.inner;this._schema=e,this._deconflictionInfo=t,this.attributeView.unlockTextureUploads()&&this.hasLabels&&this.requestDeclutter(),this.instanceStore.updateEnd(this._supportsInstanceCleanup),r&&(this.restartAllAnimations(),this.swapRenderState());const s="heatmap"===e.mesh.factory.symbology.type?"target-defer":"eager";this._presentation.updateStrategy(s),this._updateResolver.resolver.resolve(),this._updateResolver=null,this.requestRender()}_handleSwapRenderState(){if(this._renderStateSwapResolver&&this._renderStateNext.value){has("esri-2d-update-debug")&&console.debug(`Version[${this._renderStateNext.value}] FeatureContainer.update.swapRenderState`);const e=this._renderState.value,t=new Set,r=new Set;for(const s of e?.tiles()??[])s.decluttering&&t.add(s.id),s.presenting&&r.add(s.id);this._renderState.value=this._renderStateNext.value,this._renderStateNext.value=null,this._renderState.value.flush(this.attributeView.currentEpoch),e?.destroy(),this._renderStateSwapResolver.resolve(),this._renderStateSwapResolver=null;for(const s of this._renderState.value.tiles())t.has(s.id)&&(s.decluttering=!0),r.has(s.id)&&(s.presenting=!0);this.requestRender(),this.hasLabels&&this.requestDeclutter()}}_renderMapPhase(e){this._layerView.featureEffectView.hasEffects?(this._renderOutsideEffect(e),this._renderInsideEffect(e)):this._renderFeatures(e,0),this._hitTestsRequests.length>0&&this._renderHittest(e)}_renderHighlightPhase(e){this.hasHighlight&&u(e,!1,e=>{this._renderFeatures(e,1)})}_renderLabelPhase(e){this._renderFeatures(e,0)}_renderInsideEffect(e){const t=e.painter.effects.insideEffect;t.bind(e),this._renderFeatures(e,2),t.draw(e,this._layerView.featureEffectView.includedEffects),t.unbind()}_renderOutsideEffect(e){const t=e.painter.effects.outsideEffect;t.bind(e),this._renderFeatures(e,3),t.draw(e,this._layerView.featureEffectView.excludedEffects),t.unbind()}_renderHittest(e){const t=e.painter.effects.hittest,r=this._hitTestsRequests.shift(),s=r.query.hittestType;t.prepareResources(e,s),t.render(e,r,e=>{const s=t.getHittestableTiles(e,this.children,r.query);for(const t of s)this._renderTile(t,e,0)}),"polygon"===s&&r.query.polygonMesh&&r.query.polygonMesh.destroy(),t.readback(e,r)}_renderFeatures(e,t){const r=this._getHeatmapInstance(e);null!=r?this._renderHeatmapFeatures(e,t,r):this._renderGeometryFeatures(e,t)}_renderGeometryFeatures(e,t){for(const r of this.children)r.visible&&this._renderTile(r,e,t)}_renderHeatmapFeatures(e,t,r){for(const s of this.children)s.visible&&this._renderTile(s,e,t,19);r.techniqueRef.renderResolvePass(e,r)}_renderTile(e,t,r,s){t.selection=r,e.getDisplayList()?.render(t,s)}}function S(e){return 19===e.techniqueRef.type}export{g as FeatureContainer};
|
|
2
|
+
import has from"../../../../core/has.js";import{destroyMaybe as e}from"../../../../core/maybe.js";import{throwIfAborted as t}from"../../../../core/promiseUtils.js";import{signal as r}from"../../../../core/signal.js";import{AFeatureContainer as s}from"../../engine/AFeatureContainer.js";import{ClipMesh as i}from"../../engine/webgl/ClipMesh.js";import{effectFlag0 as n,filterFlag0 as a}from"../../engine/webgl/definitions.js";import o from"../../engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js";import{Techniques as l}from"../../engine/webgl/shaderGraph/techniques/TechniqueRegistry.js";import{FeatureTilePresentStrategy as h}from"./FeatureTilePresentStrategy.js";import{RenderState as d}from"./RenderState.js";import{renderHighlight as u}from"../support/util.js";import{createHittestQuery as c}from"../../support/hitTestUtils.js";import p from"../../../layers/support/Path.js";class f{constructor(e){this.inner=e,this.resolver=Promise.withResolvers()}}class _{constructor(e){this.level=e,this.id=performance.now(),this.messages=[]}}class v{constructor(e,t){this.id=e,this.version=t}}class g extends s{constructor(e){super(e.view.featuresTilingScheme),this.referenceScale=null,this._updatingChildren=r(!1),this._hitTestsRequests=[],this._firstDrawTime=null,this._renderState=r(null),this._renderStateNext=r(null),this._store=new o,this._subscriptions=new Map,this._presentation=new h,this._updateStatisticsRequests=[],this._lockStatisticUpdates=!1,this._supportsInstanceCleanup=!0,this._shouldUnlockAttributeView=!1,this._layerView=e,this.addTransitionable(this._layerView.featureEffectView)}destroy(){super.destroy(),this._renderState.value=e(this._renderState.value),this._renderStateNext.value=e(this._renderStateNext.value)}get batching(){return has("featurelayer-strict-draw-order")?1:has("featurelayer-force-marker-text-draw-order")?2:0}get firstDrawTime(){return this._firstDrawTime}get updating(){const e=this._updatingChildren.value,t=!this._renderState.value||this._renderState.value.updating,r=!!this._renderStateNext.value,s=this.attributeView.updating;return e||t||r||s}subscriptions(){return this._subscriptions.values()}get hasLabels(){return null!==this.labelSchema}get hasHighlight(){return this._layerView.hasHighlight}get children(){return this._renderState.value?this._renderState.value.tiles().filter(e=>e.presenting):[]}get usedMemory(){let e=0;return this._renderState.value&&(e+=this._renderState.value.usedMemory),this._renderStateNext.value&&(e+=this._renderStateNext.value.usedMemory),e+=this.attributeView.usedMemory,e}get instanceStore(){return this._store}get labelingCollisionInfos(){if(!this._deconflictionInfo)throw new Error("InternalError: DeconflictionInfo not defined. Was update called?");return this._deconflictionInfo}get labelSchema(){return this._schema?.mesh.factory.labels??null}get layerOrder(){return this._layerView.view.allLayerViews.items.indexOf(this._layerView)}get tiles(){return this._renderState.value?.tiles()}get requiresRefresh(){return!!this._renderState.value?.requiresRefresh}get _instanceStore(){return this._store}_getHeatmapInstance(e){if(null==this._instanceStore||!(e.drawPhase&l.heatmap.drawPhase))return null;for(const t of this._instanceStore.values())if(S(t))return t;return null}update(e,t){this._schema=e,this._deconflictionInfo=t}setCoverage(e){this._presentation.updateCoverage(e)}getPresenting(){const e=new Set;for(const t of this._renderState.value?.tiles()??[])t.presenting&&e.add(t.id);return e}beforeRender(e){if(super.beforeRender(e),this._renderState.value){for(const t of this._renderState.value.tiles())t.setTransform(e.state);if(!e.decluttering){this._presentation.update(this._renderState.value.tiles());for(const e of this._renderState.value.tiles())e.upload(this._instanceStore,this.batching)}this._updatingChildren.value=!this.children.every(e=>e.ended&&e.presenting)}}renderChildren(e){switch(super.renderChildren(e),e.drawPhase){case 1:return this._renderMapPhase(e);case 8:return this._renderHighlightPhase(e);case 2:return this._renderLabelPhase(e)}}afterRender(e){super.afterRender(e),e.decluttering||(this._finializeUpdate(),this._updateAttributeView(),this._handleSwapRenderState(),this._renderState.value?.update(this.attributeView.currentEpoch)),this._hitTestsRequests.length&&this.requestRender()}updateStart(e){return this.attributeView.lockTextureUploads(),this._supportsInstanceCleanup=!e&&"dictionary"!==this._schema?.mesh.factory.symbology.type,this.instanceStore.updateStart(this._supportsInstanceCleanup),this.instanceStore}async updateEnd(e,t,r){return this._updateResolver=new f({schema:e,deconflictionInfo:t,invalidateMesh:r}),this.requestRender(),e.mesh.factory.referenceScale&&(this.referenceScale=e.mesh.factory.referenceScale),this._updateResolver.resolver.promise}updateAttributeView(e){this.requestRender(),this.attributeView.requestUpdate(e)}updateSubscriptions(e){for(const{tileId:t,version:r}of e.subscribe){if(!this._subscriptions.has(t)){const e=new v(t,r);this._subscriptions.set(t,e);continue}this._subscriptions.get(t).version=r}for(const t of e.unsubscribe)this._subscriptions.delete(t),this.removeTile(t)}isFeatureFiltered(e){const t=this.attributeView.getFilterFlags(e),r=t&a,s=null==this._layerView.featureEffectView.featureEffect||this._layerView.featureEffectView.featureEffect.excludedLabelsVisible||t&n;return!(r&&s)}getDisplayStatistics(e,t){const r=this._statisticsByLevel.get(e);return r?r.get(t):null}updateStatistics(e,t){if(this._lockStatisticUpdates)return void this._updateStatisticsRequests.push({level:e,statistics:t});let r=this._statisticsByLevel.get(e);r||(r=new Map,this._statisticsByLevel.set(e,r));for(const s of t)r.set(s.fieldName,{minValue:s.minValue,maxValue:s.maxValue})}beginLevelMeshUpdate(e){if(null!=this._pendingLevelUpdate)throw new Error("InternalError: Pending level mesh update in progress");return this._pendingLevelUpdate=new _(e),has("esri-2d-update-debug")&&console.debug(`FeatureContainer.beginLevelMeshUpdate(level=${e}, id=${this._pendingLevelUpdate.id})`),this._pendingLevelUpdate.id}applyLevelMeshUpdate(e){if(null==this._pendingLevelUpdate)throw new Error("InternalError: No level mesh update to apply");if(this._pendingLevelUpdate.id!==e)throw new Error("InternalError: Unexpected id");if(has("esri-2d-update-debug")){const{id:e,level:t}=this._pendingLevelUpdate;console.debug(`FeatureContainer.applyLevelMeshUpdate(level=${t}, id=${e})`)}const{level:t,messages:r}=this._pendingLevelUpdate,s=this._renderStateNext.value??this._renderState.value;if(!s)throw new Error("InternalError: No renderState defined");s.enqueueLevelReplace(t,r),this._pendingLevelUpdate=null,this.requestRender()}lockForOverrides(){this._renderState.value?.lockUploads(),this._lockStatisticUpdates=!0,this.attributeView.locked||(this.attributeView.lockTextureUploads(),this._shouldUnlockAttributeView=!0)}unlockForOverrides(){this._renderState.value?.unlockUploads(),this._shouldUnlockAttributeView&&(this.attributeView.unlockTextureUploads()&&this.hasLabels&&this.requestDeclutter(),this._shouldUnlockAttributeView=!1),this._lockStatisticUpdates=!1;for(const e of this._updateStatisticsRequests)this.updateStatistics(e.level,e.statistics);this._updateStatisticsRequests=[],this._renderState.value?.flush(this.attributeView.currentEpoch),this.requestRender()}async updateRenderState(e){if(this._renderStateNext.value)throw new Error("InternalError: renderStateNext already exists");has("esri-2d-update-debug")&&console.debug(`Version[${e}] FeatureContainer.updateRenderState`),this._renderStateNext.value=new d(()=>this._stage,e=>this._subscriptions.get(e)?.version,e,this.tilingScheme)}async swapRenderState(){if(!this._renderStateNext.value)throw new Error("InternalError: renderStateNext not yet created");if(this._renderStateSwapResolver)throw new Error("InternalError: renderState swap already in progress");this._renderStateSwapResolver=Promise.withResolvers(),await this._renderStateSwapResolver.promise}async onMessage(e,r){if(t(r),!this._pendingLevelUpdate)return this._applyMessage(e);this._pendingLevelUpdate.messages.push(e)}removeTile(e){(this._renderState.value||this._renderStateNext.value)&&(this._renderState.value&&this._renderState.value.removeTile(e),this._renderStateNext.value&&this._renderStateNext.value.removeTile(e))}async hitTest(e,t){const r=c(e,t);if(!r)return console.warn("Unexpected hittest input:",e),{trueHitIds:[],candidateHitIds:[]};const s=this._hitTestsRequests.find(({query:e})=>r.hittestType===e.hittestType&&r.input===e.input&&r.options===e.options),n=Promise.withResolvers();if(s)s.resolvers.push(n);else{if("polygon"===r.hittestType&&(r.polygonMesh=await i.create(new p({path:[r.input.map(e=>[e.x,e.y])]})),!r.polygonMesh))return n.resolve({trueHitIds:[],candidateHitIds:[]}),n.promise;this._hitTestsRequests.push({query:r,resolvers:[n]})}return this.requestRender(),n.promise}getSortKeys(e){const t=new Set(e),r=new Map;for(const s of this.children)if(s.getSortKeys(t).forEach((e,t)=>r.set(t,e)),r.size===t.size)break;return r}get hasAnimation(){return this.hasLabels}doRender(e){const{minScale:t,maxScale:r}=this._layerView.layer.effectiveScaleRange,s=e.state.scale;s<=(t||1/0)&&s>=r&&super.doRender(e)}setStencilReference(e){if(null==this._getHeatmapInstance(e))super.setStencilReference(e);else for(const t of this.children)t.stencilRef=l.heatmap.getStencilReference(t)}createRenderParams(e){const t=super.createRenderParams(e);return t.referenceScale=this.referenceScale,t}_applyMessage(e){const t=e.inner;if(!this._subscriptions.has(t.id))return;const r=this._subscriptions.get(t.id);if(r.version!==t.subscriptionVesrion){if(has("esri-2d-update-debug")){const e=`${t.subscriptionVesrion} != ${r.version}`;console.debug(`Version[${e}] Tile[${t.id}] FeatureContainer - Dropping message, outdated version]`,t)}return}const s=this._renderStateNext.value??this._renderState.value;if(!s)throw new Error("InternalError: No renderState defined");s.version!==t.version&&console.error(`InternalError: Version mismatch. [renderState: ${s.version}, message: ${t.version}]`),s.enqueueUpdate(e),this.requestRender()}_finializeUpdate(){if(!this._updateResolver)return;const{schema:e,deconflictionInfo:t,invalidateMesh:r}=this._updateResolver.inner;this._schema=e,this._deconflictionInfo=t,this.attributeView.unlockTextureUploads()&&this.hasLabels&&this.requestDeclutter(),this.instanceStore.updateEnd(this._supportsInstanceCleanup),r&&(this.restartAllAnimations(),this.swapRenderState());const s="heatmap"===e.mesh.factory.symbology.type?"target-defer":"eager";this._presentation.updateStrategy(s),this._updateResolver.resolver.resolve(),this._updateResolver=null,this.requestRender()}_handleSwapRenderState(){if(this._renderStateSwapResolver&&this._renderStateNext.value){has("esri-2d-update-debug")&&console.debug(`Version[${this._renderStateNext.value}] FeatureContainer.update.swapRenderState`);const e=this._renderState.value,t=new Set,r=new Set;for(const s of e?.tiles()??[])s.decluttering&&t.add(s.id),s.presenting&&r.add(s.id);this._renderState.value=this._renderStateNext.value,this._renderStateNext.value=null,this._renderState.value.flush(this.attributeView.currentEpoch),e?.destroy(),this._renderStateSwapResolver.resolve(),this._renderStateSwapResolver=null;for(const s of this._renderState.value.tiles())t.has(s.id)&&(s.decluttering=!0),r.has(s.id)&&(s.presenting=!0);this.requestRender(),this.hasLabels&&this.requestDeclutter()}}_renderMapPhase(e){this._layerView.featureEffectView.hasEffects?(this._renderOutsideEffect(e),this._renderInsideEffect(e)):this._renderFeatures(e,0),this._hitTestsRequests.length>0&&this._renderHittest(e)}_renderHighlightPhase(e){this.hasHighlight&&u(e,!1,e=>{this._renderFeatures(e,1)})}_renderLabelPhase(e){this._renderFeatures(e,0)}_renderInsideEffect(e){const t=e.painter.effects.insideEffect;t.bind(e),this._renderFeatures(e,2),t.draw(e,this._layerView.featureEffectView.includedEffects),t.unbind()}_renderOutsideEffect(e){const t=e.painter.effects.outsideEffect;t.bind(e),this._renderFeatures(e,3),t.draw(e,this._layerView.featureEffectView.excludedEffects),t.unbind()}_renderHittest(e){const t=e.painter.effects.hittest,r=this._hitTestsRequests.shift(),s=r.query.hittestType;t.prepareResources(e,s),t.render(e,r,e=>{const s=t.getHittestableTiles(e,this.children,r.query);for(const t of s)this._renderTile(t,e,0)}),"polygon"===s&&r.query.polygonMesh&&r.query.polygonMesh.destroy(),t.readback(e,r)}_renderFeatures(e,t){const r=this._getHeatmapInstance(e);null!=r?this._renderHeatmapFeatures(e,t,r):this._renderGeometryFeatures(e,t)}_renderGeometryFeatures(e,t){for(const r of this.children)r.visible&&this._renderTile(r,e,t)}_renderHeatmapFeatures(e,t,r){for(const s of this.children)s.visible&&this._renderTile(s,e,t,19);r.techniqueRef.renderResolvePass(e,r)}_renderTile(e,t,r,s){t.selection=r;const i=e.getDisplayList()?.render(t,s)??!1;null==this._firstDrawTime&&i&&1===t.drawPhase&&(this._firstDrawTime=performance.now(),this._layerView.emitFirstDraw(this._firstDrawTime))}}function S(e){return 19===e.techniqueRef.type}export{g as FeatureContainer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../../../core/Error.js";import{handlesGroup as t}from"../../../../core/handleUtils.js";import has from"../../../../core/has.js";import{nextTick as s}from"../../../../core/nextTick.js";import{throwIfNotAbortError as i,ignoreAbortErrors as r}from"../../../../core/promiseUtils.js";import o from"../../../../core/RandomLCG.js";import{watch as n}from"../../../../core/reactiveUtils.js";import{pt2px as u}from"../../../../core/screenUtils.js";import{ignoreConnectionErrors as a}from"../../../../core/workers/utils.js";import d from"../../../../layers/support/TileInfo.js";import{tileSize as c}from"../../engine/webgl/definitions.js";import{PipelineConnectionHandlers as h}from"./PipelineConnectionHandlers.js";import p from"./Processor.js";import{FeatureSource as l}from"./sources/FeatureSource.js";import{FeatureTileSubscription as _}from"./sources/FeatureTileSubscription.js";import{Tile as g}from"./support/Tile.js";import f from"../../tiling/TileInfoView.js";class b{constructor(e){this.inner=e,this.resolver=Promise.withResolvers()}}class m{constructor(){this._aggregateAdapter={getFeatureObjectIds:e=>this._processor.getFeatureObjectIdsForAggregate(e)},this._subscriptions=new Map,this._cachedObjectIds=new Set,this._updateRequested=!1,this._didSourceRefresh=!1,this._refreshRequested=!0,this._updateSubscriptionRequests=[],this._updateHighlightRequests=[]}destroy(){this._subscriptions.clear(),this._processor?.destroy(),this._source?.destroy(),this._handles?.remove(),this._updateOverridesRequest=null,this._tileInfoView=null}onAttach(e){has("esri-2d-update-debug")&&console.debug("Pipeline.onAttach");const s=this._connection,i=d.fromJSON(e.tileInfoJSON);this._tileInfoView=new f(i),this._viewExtent=e.initialViewExtent,this._source=new l(this._aggregateAdapter,this._subscriptions,s,this._cachedObjectIds),this._processor=new p(s,this._source),this._handles=t([this._source.store.events.on("changed",()=>this._requestUpdate()),this._source.store.events.on("refresh",()=>this._requestRefresh()),n(()=>this._source.updateTracking.updating,()=>{this._requestUpdate(),r(this._connection.layerView.setUpdating({source:this._source.updateTracking.updating,pipeline:!0}))})])}onDetach(){has("esri-2d-update-debug")&&console.debug("Pipeline.onDetach"),this.destroy()}set remoteClient(e){this._connection=new h(e)}get features(){const t=this._source?.queryEngine;if(!t)throw new e("no-queryEngine","No query engine defined");return t}get aggregates(){const t=this._processor?.aggregateQueryEngine;if(!t)throw new e("no-queryEngine","No aggregate query engine defined");return t}get streamMessenger(){return this._source.streamMessenger}getUsedMemory(){return this._source.usedMemory+this._processor.usedMemory}getDisplayFeatures(e){return this._processor.getDisplayFeatures(e)}getDisplayIds(e){return this._processor.getDisplayIds(e)}getObjectIdsFromGlobalIds(e){return this._source.getObjectIdsFromGlobalIds(e)}updateStationaryExtent(e,t){t&&(this._refreshRequested=!0,this._requestUpdate()),this._viewExtent=e}async updateSchema(e){return has("esri-2d-update-debug")&&this._updateSchemaRequest&&console.error("InternalError: Schema already updating"),this._updateSchemaRequest=new b({version:e}),this._requestUpdate(),this._updateSchemaRequest.resolver.promise}updateSubscriptions(e){const t=new b(e);return this._updateSubscriptionRequests.push(t),this._requestUpdate(),t.resolver.promise}updateHighlight(e){const t=new b(e);return this._updateHighlightRequests.push(t),this._requestUpdate(),t.resolver.promise}async onOverride(t){if(null!=this._updateOverridesRequest)throw new e("featurelayer","InternalError - Already processing an edit");this._updateOverridesRequest=new b(t);const s=this._updateOverridesRequest.resolver.promise;return this._requestUpdate(),s}queryStatistics(){return this._source.statistics.toJSON()}async queryVisibleFeatures(e,t){return this.features.executeQuery(e,t)}async queryHeatmapStatistics(e){const t=Math.round(u(e.radius));let s=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;const r="string"==typeof e.fieldOffset,o=e.fieldOffset??0,n=Array.from(this._subscriptions.values()),a=this._source.chunks(),d=t**2,h=3/(Math.PI*d),p=2*t,l=Math.ceil(c/p);for(const u of n){const t=u.tile,n=new Float64Array(l*l);for(const s of a){const i=s.getTileReader(t);if(!i)continue;const u=i.getCursor();for(;u.next();){let t=1;if(null!=e.field){const s=u.readAttribute(e.field);t=r?-1*+s:+s+o}const s=u.readXForDisplay()/p,i=u.readYForDisplay()/p,a=Math.floor(s),c=Math.floor(i);if(a<0||c<0||a>=l||c>=l)continue;const _=((.5+a-s)*p)**2+((.5+c-i)*p)**2;if(_>d)continue;const g=t*(h*(1-_/d)**2);n[c+a*l]+=g}}for(let e=0;e<n.length;e++)s=Math.min(s,n[e]),i=Math.max(i,n[e])}return{max:i,min:s}}async getSampleFeatures(e){const t=this._source.chunks();if(t.reduce((e,t)=>e+t.size(),0)<=e.minFeatureCount){if(!this._source.updateTracking.updating){const e=[];return this._source.store.forEachUnsafe(t=>e.push(t.readLegacyFeatureWorldSpace())),e}return null}const s=new Set,i=[],r=t.map(e=>e.reader.getCursor()),n=new o,u=3*e.sampleSize;for(let o=0;o<u&&i.length<e.sampleSize;o++){const e=r[n.getIntRange(0,t.length-1)];if(0===e.getSize())continue;const o=n.getIntRange(0,e.getSize()-1);e.setIndex(o);const u=e.getObjectId();s.has(u)||(s.add(u),i.push(e.readLegacyFeatureWorldSpace()))}return i.length>=e.sampleSize?i:null}_requestUpdate(){this._updateRequested||(this._updateRequested=!0,s(()=>this._scheduleNextUpdate()))}_requestRefresh(){this._didSourceRefresh=!0,this._requestUpdate()}_scheduleNextUpdate(){this._updateRequested&&(this._ongoingUpdate||(this._ongoingUpdate=a(this._doUpdate()).finally(()=>{this._ongoingUpdate=null,this._scheduleNextUpdate()}),this._updateRequested=!1))}_subscribe(e){const t=e.tileId;if(this._subscriptions.has(t))return;has("esri-2d-update-debug")&&console.debug(`Tile[${t}] Pipeline.subscribe`);const s=new g(this._tileInfoView,t),i=new _(s,e.version);this._subscriptions.set(t,i),this._source.onSubscribe(i),this._processor.onSubscribe(i)}_unsubscribe(e){const t=this._subscriptions.get(e);t&&(has("esri-2d-update-debug")&&console.debug(`Tile[${e}] Pipeline.unsubscribe`),t.abort(),this._source.onUnsubscribe(t),this._processor.onUnsubscribe(t),this._subscriptions.delete(t.key.id))}async _doUpdate(){if(has("esri-2d-update-debug")&&console.debug("Pipeline._doUpdateStart"),await this._connection.layerView.setUpdating({source:this._source.updateTracking.updating,pipeline:!0}),this._updateSubscriptionRequests.length){const e=this._updateSubscriptionRequests;this._updateSubscriptionRequests=[];for(const t of e)this._doUpdateSubscriptions(t.inner),t.resolver.resolve()}if(this._updateHighlightRequests.length){const e=this._updateHighlightRequests,t=new Set,s=new Set;for(const i of e)for(const{objectId:e,highlightFlags:r}of i.inner.highlights)r?(t.add(e),s.delete(e)):(s.add(e),t.delete(e));this._source.prepareCacheUpdate(t,s)}const e=this._updateSchemaRequest;this._updateSchemaRequest=null;let t=!1;if(null!=e){const{version:s}=e.inner,i=await this._connection.layerView.updateSchemaStart();i&&(t=await this._doUpdateSchema(i,s))}const s=this._updateOverridesRequest;if(this._updateOverridesRequest=null,null!=s){has("esri-2d-update-debug")&&console.debug("Pipeline.applyOverride",s.inner),null!=s.inner.historicMoment&&this._source.unsafeSetQueryHistoricMoment(s.inner.historicMoment);const e=await this._source.normalizeOverrides(s.inner);await this._source.applyOverride(e),has("esri-2d-update-debug")&&console.debug("Pipeline.endOverride",s.inner)}await this._source.applyCacheUpdate();const r=this._source.chunks(),o=this._source.updateTracking.updating;if(this._processor.requiresInvalidation(r)&&(t=!0),this._didSourceRefresh&&(t=!0,this._didSourceRefresh=!1),this._refreshRequested&&(this._refreshRequested=!1,t=!0),t&&(this._processor.invalidate(),await this._connection.container.updateRenderState(this._processor.version)),this._updateHighlightRequests.length){const e=this._updateHighlightRequests;this._updateHighlightRequests=[];for(const t of e)this._processor.updateHighlight(t.inner),t.resolver.resolve()}const n=this._source.cleanup();this._processor.removeChunks(n);try{const e=this._source.takeOverrideUpdate();if(null!=e&&this._subscriptions.size){has("esri-2d-update-debug")&&console.debug("Pipeline.applyOverrideChangesStart"),await this._connection.container.lockForOverrides();try{await this._processor.applyOverrideUpdate(e,this._viewExtent)}catch(u){has("esri-2d-update-debug")&&console.debug("InternalError",u)}await this._connection.container.unlockForOverrides(),has("esri-2d-update-debug")&&console.debug("Pipeline.applyOverrideChangesEnd")}this._subscriptions.size&&(has("esri-2d-update-debug")&&console.debug("Pipeline.updateChunksStart"),await this._processor.updateChunks(r,o,this._viewExtent),has("esri-2d-update-debug")&&console.debug("Pipeline.updateChunksEnd"))}catch(u){i(u)}e?await this._connection.layerView.updateSchemaEnd(t):t&&await this._connection.container.swapRenderState(),null!=s&&s.resolver.resolve(),null!=e&&e.resolver.resolve(),this._connection.onEvent({type:"performance",usedMemory:this.getUsedMemory()}),this._updateRequested?(has("esri-2d-update-debug")&&console.debug("Pipeline._doUpdateEnd [updateRequested=true]"),await this._connection.layerView.setUpdating({source:this._source.updateTracking.updating,pipeline:!0})):(has("esri-2d-update-debug")&&console.debug("Pipeline._doUpdateEnd [updateRequested=false, After flush]"),await this._connection.layerView.setUpdating({source:this._source.updateTracking.updating,pipeline:this._updateRequested}))}async _doUpdateSchema(e,t){has("esri-2d-update-debug")&&console.debug(`Version[${t}] Pipeline.updateStart`,{schema:e});const s={tileInfo:this._tileInfoView?.tileInfo},i=await this._source.update(e.source,t),r=Array.from(this._subscriptions.values()),o=this._processor.update(e,t,s,i,r);return has("esri-2d-update-debug")&&console.debug(`Version[${t}] Pipeline.updateEnd`),o}_doUpdateSubscriptions(e){has("esri-2d-update-debug")&&console.debug("Pipeline.updateSubscriptions",e);for(const t of e.subscribe)this._subscribe(t);for(const t of e.unsubscribe)this._unsubscribe(t)}}export{m as default};
|
|
2
|
+
import e from"../../../../core/Error.js";import{handlesGroup as t}from"../../../../core/handleUtils.js";import has from"../../../../core/has.js";import{nextTick as s}from"../../../../core/nextTick.js";import{throwIfNotAbortError as i,ignoreAbortErrors as r}from"../../../../core/promiseUtils.js";import o from"../../../../core/RandomLCG.js";import{watch as n}from"../../../../core/reactiveUtils.js";import{pt2px as u}from"../../../../core/screenUtils.js";import{ignoreConnectionErrors as a}from"../../../../core/workers/utils.js";import d from"../../../../layers/support/TileInfo.js";import{tileSize as c}from"../../engine/webgl/definitions.js";import{PipelineConnectionHandlers as p}from"./PipelineConnectionHandlers.js";import h from"./Processor.js";import{FeatureSource as l}from"./sources/FeatureSource.js";import{FeatureTileSubscription as _}from"./sources/FeatureTileSubscription.js";import{Tile as g}from"./support/Tile.js";import f from"../../tiling/TileInfoView.js";class b{constructor(e){this.inner=e,this.resolver=Promise.withResolvers()}}class m{constructor(){this._aggregateAdapter={getFeatureObjectIds:e=>this._processor.getFeatureObjectIdsForAggregate(e)},this._subscriptions=new Map,this._updateRequested=!1,this._didSourceRefresh=!1,this._refreshRequested=!0,this._updateSubscriptionRequests=[]}destroy(){this._subscriptions.clear(),this._processor?.destroy(),this._source?.destroy(),this._handles?.remove(),this._updateOverridesRequest=null,this._tileInfoView=null}onAttach(e){has("esri-2d-update-debug")&&console.debug("Pipeline.onAttach");const s=this._connection,i=d.fromJSON(e.tileInfoJSON);this._tileInfoView=new f(i),this._viewExtent=e.initialViewExtent,this._source=new l(this._aggregateAdapter,this._subscriptions,s),this._processor=new h(s,this._source),this._handles=t([this._source.store.events.on("changed",()=>this._requestUpdate()),this._source.store.events.on("refresh",()=>this._requestRefresh()),n(()=>this._source.updateTracking.updating,()=>{this._requestUpdate(),r(this._connection.layerView.setUpdating({source:this._source.updateTracking.updating,pipeline:!0}))})])}onDetach(){has("esri-2d-update-debug")&&console.debug("Pipeline.onDetach"),this.destroy()}set remoteClient(e){this._connection=new p(e)}get features(){const t=this._source?.queryEngine;if(!t)throw new e("no-queryEngine","No query engine defined");return t}get aggregates(){const t=this._processor?.aggregateQueryEngine;if(!t)throw new e("no-queryEngine","No aggregate query engine defined");return t}get streamMessenger(){return this._source.streamMessenger}getUsedMemory(){return this._source.usedMemory+this._processor.usedMemory}getDisplayFeatures(e){return this._processor.getDisplayFeatures(e)}getDisplayIds(e){return this._processor.getDisplayIds(e)}getObjectIdsFromGlobalIds(e){return this._source.getObjectIdsFromGlobalIds(e)}updateStationaryExtent(e,t){t&&(this._refreshRequested=!0,this._requestUpdate()),this._viewExtent=e}async updateSchema(e){return has("esri-2d-update-debug")&&this._updateSchemaRequest&&console.error("InternalError: Schema already updating"),this._updateSchemaRequest=new b({version:e}),this._requestUpdate(),this._updateSchemaRequest.resolver.promise}updateSubscriptions(e){const t=new b(e);return this._updateSubscriptionRequests.push(t),this._requestUpdate(),t.resolver.promise}async onOverride(t){if(null!=this._updateOverridesRequest)throw new e("featurelayer","InternalError - Already processing an edit");this._updateOverridesRequest=new b(t);const s=this._updateOverridesRequest.resolver.promise;return this._requestUpdate(),s}queryStatistics(){return this._source.statistics.toJSON()}async queryVisibleFeatures(e,t){return this.features.executeQuery(e,t)}async queryHeatmapStatistics(e){const t=Math.round(u(e.radius));let s=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;const r="string"==typeof e.fieldOffset,o=e.fieldOffset??0,n=Array.from(this._subscriptions.values()),a=this._source.chunks(),d=t**2,p=3/(Math.PI*d),h=2*t,l=Math.ceil(c/h);for(const u of n){const t=u.tile,n=new Float64Array(l*l);for(const s of a){const i=s.getTileReader(t);if(!i)continue;const u=i.getCursor();for(;u.next();){let t=1;if(null!=e.field){const s=u.readAttribute(e.field);t=r?-1*+s:+s+o}const s=u.readXForDisplay()/h,i=u.readYForDisplay()/h,a=Math.floor(s),c=Math.floor(i);if(a<0||c<0||a>=l||c>=l)continue;const _=((.5+a-s)*h)**2+((.5+c-i)*h)**2;if(_>d)continue;const g=t*(p*(1-_/d)**2);n[c+a*l]+=g}}for(let e=0;e<n.length;e++)s=Math.min(s,n[e]),i=Math.max(i,n[e])}return{max:i,min:s}}async getSampleFeatures(e){const t=this._source.chunks();if(t.reduce((e,t)=>e+t.size(),0)<=e.minFeatureCount){if(!this._source.updateTracking.updating){const e=[];return this._source.store.forEachUnsafe(t=>e.push(t.readLegacyFeatureWorldSpace())),e}return null}const s=new Set,i=[],r=t.map(e=>e.reader.getCursor()),n=new o,u=3*e.sampleSize;for(let o=0;o<u&&i.length<e.sampleSize;o++){const e=r[n.getIntRange(0,t.length-1)];if(0===e.getSize())continue;const o=n.getIntRange(0,e.getSize()-1);e.setIndex(o);const u=e.getObjectId();s.has(u)||(s.add(u),i.push(e.readLegacyFeatureWorldSpace()))}return i.length>=e.sampleSize?i:null}_requestUpdate(){this._updateRequested||(this._updateRequested=!0,s(()=>this._scheduleNextUpdate()))}_requestRefresh(){this._didSourceRefresh=!0,this._requestUpdate()}_scheduleNextUpdate(){this._updateRequested&&(this._ongoingUpdate||(this._ongoingUpdate=a(this._doUpdate()).finally(()=>{this._ongoingUpdate=null,this._scheduleNextUpdate()}),this._updateRequested=!1))}_subscribe(e){const t=e.tileId;if(this._subscriptions.has(t))return;has("esri-2d-update-debug")&&console.debug(`Tile[${t}] Pipeline.subscribe`);const s=new g(this._tileInfoView,t),i=new _(s,e.version);this._subscriptions.set(t,i),this._source.onSubscribe(i),this._processor.onSubscribe(i)}_unsubscribe(e){const t=this._subscriptions.get(e);t&&(has("esri-2d-update-debug")&&console.debug(`Tile[${e}] Pipeline.unsubscribe`),t.abort(),this._source.onUnsubscribe(t),this._processor.onUnsubscribe(t),this._subscriptions.delete(t.key.id))}async _doUpdate(){if(has("esri-2d-update-debug")&&console.debug("Pipeline._doUpdateStart"),await this._connection.layerView.setUpdating({source:this._source.updateTracking.updating,pipeline:!0}),this._updateSubscriptionRequests.length){const e=this._updateSubscriptionRequests;this._updateSubscriptionRequests=[];for(const t of e)this._doUpdateSubscriptions(t.inner),t.resolver.resolve()}const e=this._updateSchemaRequest;this._updateSchemaRequest=null;let t=!1;if(null!=e){const{version:s}=e.inner,i=await this._connection.layerView.updateSchemaStart();i&&(t=await this._doUpdateSchema(i,s))}const s=this._updateOverridesRequest;if(this._updateOverridesRequest=null,null!=s){has("esri-2d-update-debug")&&console.debug("Pipeline.applyOverride",s.inner),null!=s.inner.historicMoment&&this._source.unsafeSetQueryHistoricMoment(s.inner.historicMoment);const e=await this._source.normalizeOverrides(s.inner);await this._source.applyOverride(e),has("esri-2d-update-debug")&&console.debug("Pipeline.endOverride",s.inner)}await this._source.applyCacheUpdate();const r=this._source.chunks(),o=this._source.updateTracking.updating;this._processor.requiresInvalidation(r)&&(t=!0),this._didSourceRefresh&&(t=!0,this._didSourceRefresh=!1),this._refreshRequested&&(this._refreshRequested=!1,t=!0),t&&(this._processor.invalidate(),await this._connection.container.updateRenderState(this._processor.version));const n=this._source.cleanup();this._processor.removeChunks(n);try{const e=this._source.takeOverrideUpdate();if(null!=e&&this._subscriptions.size){has("esri-2d-update-debug")&&console.debug("Pipeline.applyOverrideChangesStart"),await this._connection.container.lockForOverrides();try{await this._processor.applyOverrideUpdate(e,this._viewExtent)}catch(u){has("esri-2d-update-debug")&&console.debug("InternalError",u)}await this._connection.container.unlockForOverrides(),has("esri-2d-update-debug")&&console.debug("Pipeline.applyOverrideChangesEnd")}this._subscriptions.size&&(has("esri-2d-update-debug")&&console.debug("Pipeline.updateChunksStart"),await this._processor.updateChunks(r,o,this._viewExtent),has("esri-2d-update-debug")&&console.debug("Pipeline.updateChunksEnd"))}catch(u){i(u)}e?await this._connection.layerView.updateSchemaEnd(t):t&&await this._connection.container.swapRenderState(),null!=s&&s.resolver.resolve(),null!=e&&e.resolver.resolve(),this._connection.onEvent({type:"performance",usedMemory:this.getUsedMemory()}),this._updateRequested?(has("esri-2d-update-debug")&&console.debug("Pipeline._doUpdateEnd [updateRequested=true]"),await this._connection.layerView.setUpdating({source:this._source.updateTracking.updating,pipeline:!0})):(has("esri-2d-update-debug")&&console.debug("Pipeline._doUpdateEnd [updateRequested=false, After flush]"),await this._connection.layerView.setUpdating({source:this._source.updateTracking.updating,pipeline:this._updateRequested}))}async _doUpdateSchema(e,t){has("esri-2d-update-debug")&&console.debug(`Version[${t}] Pipeline.updateStart`,{schema:e});const s={tileInfo:this._tileInfoView?.tileInfo},i=await this._source.update(e.source,e.processor.storage.filters,t),r=Array.from(this._subscriptions.values()),o=this._processor.update(e,t,s,i,r);return has("esri-2d-update-debug")&&console.debug(`Version[${t}] Pipeline.updateEnd`),o}_doUpdateSubscriptions(e){has("esri-2d-update-debug")&&console.debug("Pipeline.updateSubscriptions",e);for(const t of e.subscribe)this._subscribe(t);for(const t of e.unsubscribe)this._unsubscribe(t)}}export{m as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../../../config.js";import has from"../../../../core/has.js";import{destroyMaybe as t}from"../../../../core/maybe.js";import{notDeepEqual as s}from"../../../../core/object.js";import{throwIfAborted as r,after as i}from"../../../../core/promiseUtils.js";import{diff as a}from"../../../../core/accessorSupport/diffUtils.js";import{ignoreConnectionErrors as o}from"../../../../core/workers/utils.js";import{openWithPorts as n}from"../../../../core/workers/workers.js";import{normalizeTransform as c,quantizeX as h,quantizeY as p}from"../../../../geometry/support/quantizationUtils.js";import{checkProjectionSupport as u}from"../../../../layers/graphics/data/projectionSupport.js";import{MultiTileMeshData as y}from"../../engine/webgl/mesh/MultiTileMeshData.js";import{FeatureMeshFactory as
|
|
2
|
+
import e from"../../../../config.js";import has from"../../../../core/has.js";import{destroyMaybe as t}from"../../../../core/maybe.js";import{notDeepEqual as s}from"../../../../core/object.js";import{throwIfAborted as r,after as i}from"../../../../core/promiseUtils.js";import{diff as a}from"../../../../core/accessorSupport/diffUtils.js";import{ignoreConnectionErrors as o}from"../../../../core/workers/utils.js";import{openWithPorts as n}from"../../../../core/workers/workers.js";import{normalizeTransform as c,quantizeX as h,quantizeY as p}from"../../../../geometry/support/quantizationUtils.js";import{checkProjectionSupport as u}from"../../../../layers/graphics/data/projectionSupport.js";import{MultiTileMeshData as y}from"../../engine/webgl/mesh/MultiTileMeshData.js";import{FeatureMeshFactory as l}from"../../engine/webgl/mesh/factories/FeatureMeshFactory.js";import{ResourceProxy as d}from"../../engine/webgl/mesh/factories/ResourceProxy.js";import{MeshWriterRegistry as g}from"../../engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js";import{MatcherContext as _}from"../../engine/webgl/util/MatcherContext.js";import{createAggregateStrategy as m}from"./processor/createAggregateStrategy.js";import{AttributeStore as f}from"./support/AttributeStore.js";import{ComputedAttributeStorage as b}from"./support/ComputedAttributeStorage.js";class w{constructor(t,s){this._connection=t,this._source=s,this._version=1,this._registry=new g;const r={fetch:(e,t)=>this._connection.layerView.fetch(e,t),fetchDictionary:(e,t)=>this._connection.layerView.fetchDictionary(e,t),fetchMesh:(e,t)=>this._connection.layerView.fetchMesh(e,t)},i={fetchGlyphs:async(t,s)=>{const r=[];if(await this._loaded,this._glyphProxy){const i=`${e.fontsUrl}/{fontstack}/{range}.pbf`;for(const e of t)r.push(this._glyphProxy.rasterizeText(i,e,s))}else console.error("Failed to fetch glyphs from worker: proxy not created");return Promise.all(r)}};this._proxy=new d(r,i),this._attributeStore=new f({isLocal:!1,update:e=>o(this._connection.container.updateAttributeView(e))}),this._loaded=this._load(t)}destroy(){this._proxy.destroy(),this._strategy?.destroy(),this._attributeStore.destroy(),this._loaded.finally(()=>{this._glyphClient?.close(),this._glyphClient=null,this._glyphPorts?.forEach(e=>e.close())})}get hasClusters(){return"cluster"===this._schema?.mesh.strategy.type}get aggregateQueryEngine(){return this._strategy?.aggregateQueryEngine}get usedMemory(){let e=0;return e+=this._attributeStore.usedMemory,this._strategy&&(e+=this._strategy.usedMemory),e}get version(){return this._version}getDisplayFeatures(e){return this._strategy?this._strategy.getDisplayFeatures(e):{features:[],aggregates:[],tracks:[]}}getDisplayIds(e){return this._strategy?this._strategy.getDisplayIds(e):{}}getFeatureObjectIdsForAggregate(e){return this._strategy?this._strategy.getFeatureObjectIdsForAggregate(e):[]}onSubscribe(e){this._strategy?.onSubscribe(e)}onUnsubscribe(e){this._strategy?.onUnsubscribe(e)}requiresInvalidation(e){return this._strategy?.requiresInvalidation(e)??!1}async update(e,t,r,i,o){const n=e.processor,c=s(this._schema?.storage,n.storage),h=s(this._schema?.mesh.properties,n.mesh.properties),p=s(this._schema?.mesh.factory,n.mesh.factory),y=s(this._schema?.mesh.strategy,n.mesh.strategy),d=S(this._schema?.expressionProperties,n.expressionProperties),g=d.some(e=>this._attributeStore.hasArcadeDependency(e)),m=d.some(e=>this._factory?.hasArcadeDependency(e)??!1),f=d.some(e=>this._strategy?.hasArcadeDependency(e))||this._strategy?.isAggregate&&g,w=m||f,x=h||p||y;if(!(c||x||(m||g||f))&&!i)return!1;if(has("esri-2d-update-debug")&&console.debug(`Version[${this._version}] SymbolProcessor.update`,{changes:a(this._schema,n),schema:n}),this._schema=n,"annotation-feature"===n.mesh.factory.symbology.type||"dimension-feature"===n.mesh.factory.symbology.type){const e=this._source.metadata.outSpatialReference,t=this._source.metadata.attributeSpatialReference??this._source.metadata.spatialReference??e;await u(t,e)}const j=new b({fields:this._source.metadata.fieldsIndex,spatialReference:this._source.metadata.outSpatialReference}),I={currentUser:n.mesh.properties.currentUser};if((c||x||g)&&(await this._attributeStore.update(n.storage,j,this._source.metadata,t),this._strategy?.invalidateAttributeData(v(n))),!i&&!x&&!w)return!1;(y||h||w)&&await this._updateStrategy(n.mesh.strategy,o,v(n),I),this._updateSortKey(j,"sortKey"in n.mesh.properties?n.mesh.properties.sortKey:null);const M="dictionary"===n.mesh.factory.symbology.type?n.mesh.factory.symbology.fieldMap:null,U=new _(j,this._proxy,r,this._registry,M);return(p||"dictionary"===n.mesh.factory.symbology.type)&&(this._factory=await l.create(U,n.mesh.factory)),this._version=t,!0}async applyOverrideUpdate(e,t){if(this._strategy)try{const s=await this._strategy.applyOverrideUpdate(e);s&&await this._process(s,t)}catch(s){}}async updateChunks(e,t,s){await this._doUpdateChunks(e,t,s),this._strategy?.afterUpdateChunks()}async removeChunks(e){this._strategy?.removeChunks(e),this._attributeStore.incrementDisplayIdGeneration()}invalidate(){this._strategy&&this._strategy.invalidate()}async _load(e){this._glyphPorts=await e.layerView.openGlyphPorts(),this._glyphClient=await n(this._glyphPorts,{maxNumberOfConcurrentJobs:20}),this._glyphProxy=this._glyphClient.createInvokeProxy()}async _doUpdateChunks(e,t,s){if(this._strategy){try{const r=await this._strategy.updateChunks(e,t);r&&await this._process(r,s)}catch(r){}has("esri-2d-update-debug")&&console.log("SendUpdates"),this._attributeStore.sendUpdates(),has("esri-2d-update-debug")&&console.log("SendUpdates.await")}}async _updateStrategy(e,t,s,r){this._strategy?.destroy(),this._strategy=await m(this._connection,e,this._source,this._attributeStore,s,r);for(const i of t)this._strategy.onSubscribe(i)}async _updateSortKey(e,s){if(this._sortInfo=t(this._sortInfo?.computed),null!=s){const t=s.byRenderer?null:await e.createComputedField(s);this._sortInfo={...s,computed:t}}}async _process(e,t){switch(e.type){case"level-replace":return this._processLevelBatch(e,t);case"append":case"update":return this._processStandardBatch(e,t)}}async _processLevelBatch(e,t){const s=await this._connection.container.beginLevelMeshUpdate(e.level);await this._processBatchMessages(e.messages,t),await this._connection.container.applyLevelMeshUpdate(s)}async _processStandardBatch(e,t){return this._processBatchMessages(e.messages,t)}async _processBatchMessages(e,t){for(const s of e){const e=s.subscription;if(has("esri-2d-update-debug")){const t=e.tile;console.debug(`Version[${this._version}] Tile[${t.key.id}, end=${s.end}] Processor._process`)}const i={currentUser:this._schema?.mesh.properties.currentUser};await this._fetchResources(s,i),r(e.signal);const a=await this._write(s,e.tile.createArcadeEvaluationOptions(v(this._schema)),i,t),o=e.tile.tileInfoView.getLODInfoAt(e.tile.key);r(e.signal);const{message:n,transferList:c}=a.serialize(o),h={objectIdMap:null,inner:s.createMessage(n,this._version,this._attributeStore.epoch)};if(this._schema?.mesh.properties.returnMeshObjectId){h.objectIdMap={};const e=s.reader?.getCursor();if(e)for(;e.next();)h.objectIdMap[e.getDisplayId()]=e.getObjectId()}if(r(e.signal),await this._connection.container.onMessage(h,{signal:e.signal,transferList:c}),this._attributeStore.sendUpdates(),has("esri-2d-update-debug")){const t=e.tile;console.debug(`Version[${this._version}] Tile[${t.key.id}, end=${s.end}] Processor._process.await`)}}}async _fetchResources(e,t){await this._loaded,await this._fetchMatcherResources(e),await this._fetchWriterResources(e,t)}async _fetchMatcherResources(e){if(!e.reader)return;const t=e.subscription.tile.createArcadeEvaluationOptions(v(this._schema));return this._factory.enqueueMatcherRequests(this._proxy,e.reader,{scale:t.$view.scale,viewingMode:"2d"},e.id)}async _fetchWriterResources(e,t){if(!e.reader)return;const s=e.reader.getCursor(),r=e.subscription.tile.createArcadeEvaluationOptions(v(this._schema));for(;s.next();)this._factory.enqueueWriterRequests(this._proxy,s,r,t,e.id);await this._proxy.fetchEnqueuedResources()}async _write(e,t,s,a){const o=e.subscription.tile,n=e.reader?.getCursor(),c=n?.getSize()??0,h=o.tileInfoView.tileInfo.isWrappable,p=o.tileInfoView.spatialReference.isWGS84,u=this._schema?.mesh.factory.referenceScale,l=new y(o.key,h,p,c);if(!n)return l;const d=x(o.transform,a),g=o.createArcadeEvaluationOptions(v(this._schema));let _=0;for(;n.next();){++_%1e3||(await i(0),r(e.subscription));const a=this._getSortKeyValue(n,t);l.entityStart(n.getDisplayId(),a);try{this._factory.write(l,this._proxy,n,g,s,o.level,d,u)}catch(m){}l.entityEnd()}return l}_getSortKeyValue(e,t){if(!this._sortInfo)return 0;const{computed:s,order:r,byRenderer:i}=this._sortInfo,a=i?this._factory.getSortKey(e,t):s?.read(e,t);return null==a||isNaN(a)?0:a*("asc"===r?-1:1)}}function S(e,t){const s=[];return e?.timeExtent?.start===t.timeExtent?.start&&e?.timeExtent?.end===t.timeExtent?.end||s.push("timeProperties"),s}function v(e){const{timeZone:t}=e?.mesh.properties??{},{timeExtent:s}=e?.expressionProperties??{};return{timeZone:t,timeExtent:s}}function x(e,t){const s=c(e),r=[];for(const i of t.rings){const e=[];for(const t of i)e.push([h(s,t[0]),p(s,t[1])]);r.push(e)}return{rings:r}}export{w as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import has from"../../../../../core/has.js";class
|
|
2
|
+
import has from"../../../../../core/has.js";class t{constructor(t){this.subscription=t,this.handledChunks=new Set,has("esri-2d-update-debug")&&console.debug(`Tile[${t.tile.id}] ASendState.create`)}destroy(){}}class e{constructor(){this.type="append",this.messages=[]}}class s{constructor(){this.type="update",this.messages=[]}}class r{constructor(t){this.level=t,this.type="level-replace",this.messages=[]}}class i{constructor(t,e,s){this._source=t,this._attributeStore=e,this._sqlOptions=s,this._sendStates=new Map}destroy(){}get isAggregate(){return!1}get usedMemory(){return 0}onSubscribe(t){const e=this.createState(t);this._sendStates.set(t.key.id,e)}onUnsubscribe(t){this._sendStates.get(t.key.id)?.destroy(),this._sendStates.delete(t.key.id)}get hasSubscribers(){return this._sendStates.size>0}requiresInvalidation(t){return!1}invalidate(){const t=Array.from(this._sendStates.values());this._sendStates.clear();for(const e of t)e.destroy(),this.onSubscribe(e.subscription)}invalidateAttributeData(t){}hasArcadeDependency(t){return!1}getFeatureObjectIdsForAggregate(t){throw new Error("InternalError: AggregateId lookup not supported")}getDisplayIds(t){const e={};for(const s of t){const t=this._attributeStore.getDisplayIdForObjectId(s);null!=t&&(e[s]=t)}return e}afterUpdateChunks(){}}export{i as AProcessorStrategy,t as ASendState,e as AppendBatch,r as LevelReplaceBatch,s as UpdateBatch};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{EventEmitter as e}from"../../../../../core/Evented.js";import{create as t}from"../../../../../geometry/support/aaBoundingBox.js";import{getBoundsOptimizedGeometry as r}from"../../../../../layers/graphics/featureConversionUtils.js";import{optimizedFeatureQueryEngineAdapter as s}from"../../../../../layers/graphics/data/optimizedFeatureQueryEngineAdapter.js";import{QueryEngine as a}from"../../../../../layers/graphics/data/QueryEngine.js";import{collectExpressionDependencies as i}from"../../../../../support/ArcadeExpression.js";import{AProcessorStrategy as n,LevelReplaceBatch as l}from"./AProcessorStrategy.js";class o extends n{constructor(t,r,a,n,l,o){super(t,r,l),this.spatialReference=a,this.aggregateFields=n,this._adapter=o,this._arcadeDependencies=new Set,this._levelStates=new Map,this.events=new e,this.featureAdapter=s;for(const e of n)i(this._arcadeDependencies,e.computed)}get aggregateQueryEngine(){if(!this._aggregateQueryEngine){const{metadata:e}=this._adapter;this._aggregateQueryEngine=new a({featureStore:this,fieldsIndex:e.fieldsIndex,geometryType:e.geometryType,featureIdInfo:e.featureIdInfo,spatialReference:this.spatialReference})}return this._aggregateQueryEngine}get isAggregate(){return!0}removeChunks(e){}hasArcadeDependency(e){return this._arcadeDependencies.has(e)}destroy(){super.destroy();for(const e of this._levelStates.values())e.destroy();this._levelStates.clear()}onSubscribe(e){super.onSubscribe(e);const{scale:t,level:r}=e.tile;this._lastSubscribedLodInfo={scale:t,level:r}}onUnsubscribe(e){this._levelStates.get(e.tile.level)?.removeTile(e),super.onUnsubscribe(e)}requiresInvalidation(e){return!1}invalidate(){for(const e of this._levelStates.values())e.invalidate()}
|
|
2
|
+
import{EventEmitter as e}from"../../../../../core/Evented.js";import{create as t}from"../../../../../geometry/support/aaBoundingBox.js";import{getBoundsOptimizedGeometry as r}from"../../../../../layers/graphics/featureConversionUtils.js";import{optimizedFeatureQueryEngineAdapter as s}from"../../../../../layers/graphics/data/optimizedFeatureQueryEngineAdapter.js";import{QueryEngine as a}from"../../../../../layers/graphics/data/QueryEngine.js";import{collectExpressionDependencies as i}from"../../../../../support/ArcadeExpression.js";import{AProcessorStrategy as n,LevelReplaceBatch as l}from"./AProcessorStrategy.js";class o extends n{constructor(t,r,a,n,l,o){super(t,r,l),this.spatialReference=a,this.aggregateFields=n,this._adapter=o,this._arcadeDependencies=new Set,this._levelStates=new Map,this.events=new e,this.featureAdapter=s;for(const e of n)i(this._arcadeDependencies,e.computed)}get aggregateQueryEngine(){if(!this._aggregateQueryEngine){const{metadata:e}=this._adapter;this._aggregateQueryEngine=new a({featureStore:this,fieldsIndex:e.fieldsIndex,geometryType:e.geometryType,featureIdInfo:e.featureIdInfo,spatialReference:this.spatialReference})}return this._aggregateQueryEngine}get isAggregate(){return!0}removeChunks(e){}hasArcadeDependency(e){return this._arcadeDependencies.has(e)}destroy(){super.destroy();for(const e of this._levelStates.values())e.destroy();this._levelStates.clear()}onSubscribe(e){super.onSubscribe(e);const{scale:t,level:r}=e.tile;this._lastSubscribedLodInfo={scale:t,level:r}}onUnsubscribe(e){this._levelStates.get(e.tile.level)?.removeTile(e),super.onUnsubscribe(e)}requiresInvalidation(e){return!1}invalidate(){for(const e of this._levelStates.values())e.invalidate()}getDisplayIds(e){return this.getActiveLevelState()?.getDisplayIds(e)??{}}getDisplayFeatures(e){return this.getActiveLevelState()?.getDisplayFeatures(e)??{features:[],aggregates:[],tracks:[]}}getFeatureObjectIdsForAggregate(e){return this.getActiveLevelState()?.getFeatureObjectIdsForAggregate(e)??[]}applyOverrideUpdate(e){return this._adapter.applyOverrideUpdate(e,this._levelStates.values())}createState(e){return this._adapter.createSendState(e)}async updateChunks(e,t){const r=this._lastSubscribedLodInfo;if(null==r)return null;const s=this._getOrCreateLevelState(r),a=this._getSendStatesForLevel(r.level);await s.update(e,a);const i=new l(r.level);for(const n of a)i.messages.push(...s.createMessages(n,e,t,()=>{this.events.emit("changed")}));return await this._adapter.afterUpdateLevelState(s,e,a),i}getActiveLevelState(){const e=this._lastSubscribedLodInfo;return null==e?null:this._levelStates.get(e.level)}_getOrCreateLevelState(e){let t=this._levelStates.get(e.level);return null==t&&(t=this._adapter.createLevelState(e),this._levelStates.set(e.level,t)),t}_getSendStatesForLevel(e){return Array.from(this._sendStates.values()).filter(t=>t.subscription.tile.level===e)}forEach(e){this.getActiveLevelState()?.forEachAggregateWorldSpace(e)}forEachInBounds(e,t){}forEachBounds(e,s){const a=t();for(const t of e){const e=r(a,t.geometry);e&&s(e)}}}export{o as AggregateStrategy};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import has from"../../../../../core/has.js";import{AProcessorStrategy as e,UpdateBatch as t,AppendBatch as s,ASendState as r}from"./AProcessorStrategy.js";import{FeatureTileUpdateMessage as a,FeatureTileAppendMessage as o}from"../sources/FeatureSourceMessage.js";import{OverrideChunk as n}from"../sources/strategies/chunks/Overrides.js";import{createArcadeEvaluationOptions as d}from"../support/arcadeUtils.js";import{FeatureSetReaderJSON as i}from"../support/FeatureSetReaderJSON.js";class u extends r{}class h extends e{constructor(e,t,s,r){super(e,t,r),this._arcadeContextInfo=s,this.handledChunks=new Set,this.handledChunksForIdCreation=new Set,this.handledChunksForAttributeData=new Set,this._streamLayerDeferredObjectIdsToRemove=[]}destroy(){super.destroy();for(const e of this._source.chunks())this._cleanupChunkIds(e)}invalidateAttributeData(e){this.handledChunksForAttributeData.clear(),this._arcadeContextInfo=e,null!=this._evalOptions&&(this._evalOptions=d(this._evalOptions.$view.scale,e))}onSubscribe(e){super.onSubscribe(e),this._evalOptions=e.tile.createArcadeEvaluationOptions(this._arcadeContextInfo)}createState(e){return new u(e)}get aggregateQueryEngine(){return null}
|
|
2
|
+
import has from"../../../../../core/has.js";import{AProcessorStrategy as e,UpdateBatch as t,AppendBatch as s,ASendState as r}from"./AProcessorStrategy.js";import{FeatureTileUpdateMessage as a,FeatureTileAppendMessage as o}from"../sources/FeatureSourceMessage.js";import{OverrideChunk as n}from"../sources/strategies/chunks/Overrides.js";import{createArcadeEvaluationOptions as d}from"../support/arcadeUtils.js";import{FeatureSetReaderJSON as i}from"../support/FeatureSetReaderJSON.js";class u extends r{}class h extends e{constructor(e,t,s,r){super(e,t,r),this._arcadeContextInfo=s,this.handledChunks=new Set,this.handledChunksForIdCreation=new Set,this.handledChunksForAttributeData=new Set,this._streamLayerDeferredObjectIdsToRemove=[]}destroy(){super.destroy();for(const e of this._source.chunks())this._cleanupChunkIds(e)}invalidateAttributeData(e){this.handledChunksForAttributeData.clear(),this._arcadeContextInfo=e,null!=this._evalOptions&&(this._evalOptions=d(this._evalOptions.$view.scale,e))}onSubscribe(e){super.onSubscribe(e),this._evalOptions=e.tile.createArcadeEvaluationOptions(this._arcadeContextInfo)}createState(e){return new u(e)}get aggregateQueryEngine(){return null}getDisplayFeatures(e){const t=new Set(e),s=new Set,r=[];for(const a of this._source.chunks()){const e=a.reader.getCursor();for(;e.next();){const a=e.getObjectId(),o=e.getDisplayId();t.has(o)&&!s.has(a)&&(r.push({...e.readLegacyFeatureWorldSpace(),displayId:o}),s.add(a))}}return{features:r,aggregates:[],tracks:[]}}async applyOverrideUpdate(e){const s=new t,r=[];for(const t of e.modified.values()){const e=this._attributeStore.createDisplayIdForObjectId(t.objectId);t.displayId=e,r.push(e)}const o=i.fromOptimizedFeatures(Array.from(e.modified.values()),this._source.metadata).getCursor();for(;o.next();)this._attributeStore.setAttributeData(o.getDisplayId(),o,this._evalOptions,this._sqlOptions);const d=[];for(const t of e.removed){const e=this._attributeStore.getDisplayIdForObjectId(t);null!=e&&d.push(e)}has("esri-2d-update-debug")&&console.debug("FeatureUpdateStrategy.applyLocalEdit",{message:e,modifiedDisplayIds:r,removedDisplayIds:d});const u=n.fromFeatures(Array.from(e.modified.values()),this._source.metadata);this.handledChunks.add(u.chunkId),this.handledChunksForAttributeData.add(u.chunkId),this.handledChunksForIdCreation.add(u.chunkId);for(const t of this._sendStates.values())t.handledChunks.add(u.chunkId),s.messages.push(new a(t.subscription,null,r,!1,u.queryInfo));for(const t of this._sendStates.values()){const e=u.getTileReader(t.subscription.tile);s.messages.push(new a(t.subscription,e,d,!1,u.queryInfo))}for(const t of e.removed)this._attributeStore.releaseDisplayIdForObjectId(t);return s}async updateChunks(e,t){const r=new s;if(!e.length)return r;this._updateAttributeData();for(const s of this._sendStates.values()){const{subscription:t,handledChunks:a}=s;for(const n of e){const{chunkId:e}=n;if(a.has(e)||!this.handledChunksForIdCreation.has(e)||!this.handledChunksForAttributeData.has(e))continue;a.add(e);const d=n.getTileReader(t.tile);if(!d)continue;const i=new o(s.subscription,d,n.end,n.queryInfo);r.messages.push(i)}}return r}removeChunks(e){for(const t of e)this.handledChunks.delete(t.chunkId),this.handledChunksForAttributeData.delete(t.chunkId),this._cleanupChunkIds(t)}afterUpdateChunks(){for(const e of this._streamLayerDeferredObjectIdsToRemove)this._attributeStore.releaseDisplayIdForObjectId(e);this._streamLayerDeferredObjectIdsToRemove=[]}_cleanupChunkIds(e){if(this.handledChunksForIdCreation.has(e.chunkId)){const t=e.reader.getCursor();for(;t.next();){const e=t.getObjectId();this._source.isStream?this._streamLayerDeferredObjectIdsToRemove.push(e):this._attributeStore.releaseDisplayIdForObjectId(e)}this.handledChunksForIdCreation.delete(e.chunkId)}}_updateAttributeData(){for(const e of this._source.chunks()){const{chunkId:t,reader:s}=e;if(!this.handledChunksForIdCreation.has(t)){this.handledChunksForIdCreation.add(t);const e=s.getCursor();for(;e.next();){const t=this._attributeStore.createDisplayIdForObjectId(e.getObjectId());e.setDisplayId(t)}}}for(const e of this._source.chunks())if(this._attributeStore.referencesScale()||!this.handledChunksForAttributeData.has(e.chunkId)){this.handledChunksForAttributeData.add(e.chunkId);const t=e.reader.getCursor();for(;t.next();){const e=t.getDisplayId();this._attributeStore.setAttributeData(e,t,this._evalOptions,this._sqlOptions)}}}}export{u as DefaultSendState,h as FeatureUpdateStrategy};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import has from"../../../../../../core/has.js";import{convertToFeature as e,unquantizeOptimizedGeometryInPlace as t}from"../../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as s}from"../../../../../../layers/graphics/OptimizedFeature.js";import{FeatureTileAppendMessage as o}from"../../sources/FeatureSourceMessage.js";import{FeatureSetReaderJSON as r}from"../../support/FeatureSetReaderJSON.js";class a{constructor(e,t){this.level=e,this._context=t,this._tileStates=new Map}destroy(){for(const e of this._tileStates.values())this._releaseTileState(e);this._tileStates.clear()}invalidate(){}update(e,t){}removeTile(e){const t=this._tileStates.get(e.key.id);null!=t&&(this._releaseTileState(t),this._tileStates.delete(e.key.id))}
|
|
2
|
+
import has from"../../../../../../core/has.js";import{convertToFeature as e,unquantizeOptimizedGeometryInPlace as t}from"../../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as s}from"../../../../../../layers/graphics/OptimizedFeature.js";import{FeatureTileAppendMessage as o}from"../../sources/FeatureSourceMessage.js";import{FeatureSetReaderJSON as r}from"../../support/FeatureSetReaderJSON.js";class a{constructor(e,t){this.level=e,this._context=t,this._tileStates=new Map}destroy(){for(const e of this._tileStates.values())this._releaseTileState(e);this._tileStates.clear()}invalidate(){}update(e,t){}removeTile(e){const t=this._tileStates.get(e.key.id);null!=t&&(this._releaseTileState(t),this._tileStates.delete(e.key.id))}getDisplayIds(e){const t=new Set(e),s={};for(const o of this._featuresWorldSpace()){const{objectId:e,displayId:r}=o;null!=e&&t.has(e)&&(s[e]=r)}return s}getDisplayFeatures(t){const s=new Set(t),o=new Set,r=[];for(const a of this._featuresWorldSpace())s.has(a.displayId)&&!o.has(a.objectId)&&(a.geometry&&r.push({...e(a,this._context.metadata.geometryType,!1,!1),displayId:a.displayId}),o.add(a.objectId));return{features:[],aggregates:r,tracks:[]}}getFeatureObjectIdsForAggregate(e){for(const t of this._tileStates.values())for(const s of t.bins.values())if(s.id===e){const e=[];for(const t of s.containedObjectIds)for(const s of t.values())e.push(s);return e}return[]}forEachAggregateWorldSpace(e){const t=new Set;for(const s of this._featuresWorldSpace())t.has(s.objectId)||(e(s),t.add(s.objectId))}createMessages(e,t,a,i){const{subscription:n}=e,c=this._getOrCreateTileState(n),l=this._takeTileState(c),d=n.tile,u=new Set;for(const s of t){this._context.getIndex(s,d).putBounded(c.bins,u,d.extent,d.resolution)}const f=[],p=n.tile.transform,h=n.tile.key.level;for(const o of c.bins.values()){const e=o.getGeometry(this._context.spatialReference,p),t=new s(e,o.getAttributes(),null,o.id);e||(t.centroid=o.getGeometricCentroid(this._context.spatialReference,p)),t.displayId=this._context.attributeStore.createDisplayIdForObjectId(`${t.objectId}.${h}`),c.featureCache.set(o.id,t),f.push(t)}i(),e.done||=!a;const b=r.fromOptimizedFeatures(f,this._context.metadata,p),g=b.getCursor(),S=e.subscription.tile.createArcadeEvaluationOptions(this._context.arcadeContextInfo);for(;g.next();)this._context.attributeStore.setAttributeData(g.getDisplayId(),g,S,this._context.sqlOptions);has("esri-2d-update-debug")&&console.debug(`Tile[${e.subscription.tile.id}] BinningStrategy._update`,{done:e.done});const _=new o(e.subscription,b,e.done,{});for(const s of l.featureCache.keys())this._context.attributeStore.releaseDisplayIdForObjectId(`${s}.${h}`);return[_]}_getOrCreateTileState(e){let t=this._tileStates.get(e.key.id);return null==t&&(t={subscription:e,bins:new Map,featureCache:new Map},this._tileStates.set(e.key.id,t)),t}_takeTileState(e){const t=e.bins,s=e.featureCache;return e.bins=new Map,e.featureCache=new Map,{bins:t,featureCache:s}}_releaseTileState(e){const t=e.subscription.tile.key.level;for(const s of e.featureCache.keys())this._context.attributeStore.releaseDisplayIdForObjectId(`${s}.${t}`);e.bins.clear(),e.featureCache.clear()}*_featuresWorldSpace(){for(const e of this._tileStates.values())for(const s of e.featureCache.values()){const o=s.clone();o.geometry&&t(o.geometry,e.subscription.tile.transform),yield o}}}export{a as BinLevelState};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import has from"../../../../../../core/has.js";import{convertToFeature as t}from"../../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as e}from"../../../../../../layers/graphics/OptimizedFeature.js";import s from"../../../../../../layers/graphics/OptimizedGeometry.js";import{tileSize as i}from"../../../../engine/webgl/definitions.js";import{GridCell as n}from"../../aggregation/GridCell.js";import{pixelsPerMapUnit as r}from"../../aggregation/GridSpatialIndex.js";import{WithDisplayId as a}from"../support/WithDisplayId.js";import{FeatureTileAppendMessage as o}from"../../sources/FeatureSourceMessage.js";import{FeatureSetReaderJSON as l}from"../../support/FeatureSetReaderJSON.js";import{Hashed as c}from"../../support/Hashed.js";const d=128;class u{constructor(t,e,s){this.level=t,this._scale=e,this._context=s,this._statistics=new Map,this._handledChunks=new Set,this._handledIds=new Set,this._cells=new Map,this._clusters=new Map}destroy(){this._clearClusters()}_clearClusters(){for(const t of this._clusters.values())this._context.attributeStore.releaseDisplayIdForObjectId(t.inner.id);this._clusters.clear()}invalidate(){this._cells.clear(),this._handledChunks.clear(),this._handledIds.clear()}removeTile(t){}*aggregatesWorldSpace(){for(const t of this._clusters.values()){const s=t.inner.getCentroid(null),i=new e(s,t.inner.getAttributes(),null,t.inner.id,t.displayId);yield i}}clusters(){return this._clusters.values()}
|
|
2
|
+
import has from"../../../../../../core/has.js";import{convertToFeature as t}from"../../../../../../layers/graphics/featureConversionUtils.js";import{OptimizedFeature as e}from"../../../../../../layers/graphics/OptimizedFeature.js";import s from"../../../../../../layers/graphics/OptimizedGeometry.js";import{tileSize as i}from"../../../../engine/webgl/definitions.js";import{GridCell as n}from"../../aggregation/GridCell.js";import{pixelsPerMapUnit as r}from"../../aggregation/GridSpatialIndex.js";import{WithDisplayId as a}from"../support/WithDisplayId.js";import{FeatureTileAppendMessage as o}from"../../sources/FeatureSourceMessage.js";import{FeatureSetReaderJSON as l}from"../../support/FeatureSetReaderJSON.js";import{Hashed as c}from"../../support/Hashed.js";const d=128;class u{constructor(t,e,s){this.level=t,this._scale=e,this._context=s,this._statistics=new Map,this._handledChunks=new Set,this._handledIds=new Set,this._cells=new Map,this._clusters=new Map}destroy(){this._clearClusters()}_clearClusters(){for(const t of this._clusters.values())this._context.attributeStore.releaseDisplayIdForObjectId(t.inner.id);this._clusters.clear()}invalidate(){this._cells.clear(),this._handledChunks.clear(),this._handledIds.clear()}removeTile(t){}*aggregatesWorldSpace(){for(const t of this._clusters.values()){const s=t.inner.getCentroid(null),i=new e(s,t.inner.getAttributes(),null,t.inner.id,t.displayId);yield i}}clusters(){return this._clusters.values()}getDisplayIds(t){const e=new Set(t),s={};for(const i of this._clusters.values())if(e.has(i.inner.id))s[i.inner.id]=i.displayId;else if(1===i.inner.count){const{firstObjectId:t}=i.inner;null!=t&&e.has(t)&&(s[t]=i.displayId)}return s}getDisplayFeatures(e){const s=new Set(e),i=new Set,n=[],r=[];for(const a of this.aggregatesWorldSpace())if(s.has(a.displayId)&&!i.has(a.displayId)){const e=t(a,this._context.metadata.geometryType,!1,!1);if(i.add(a.displayId),1===e.attributes.cluster_count){n.push({...e,displayId:a.displayId});continue}r.push({...e,displayId:a.displayId})}return{features:n,aggregates:r,tracks:[]}}getFeatureObjectIdsForAggregate(t){for(const e of this._clusters.values())if(e.inner.id===t){const t=[];for(const s of e.inner.containedObjectIds)for(const e of s.values())t.push(e);return t}return[]}forEachAggregateWorldSpace(t){for(const e of this.aggregatesWorldSpace())t(e)}update(t,e){let s=!1;const i=new c({...this._context.indexOptions,scale:this._scale});for(const r of t){if(this._handledChunks.has(r.normalizedChunkId))continue;if(this._handledChunks.add(r.normalizedChunkId),null!=r.lodInfo&&r.lodInfo.level!==this.level)continue;r.getGridIndex(i).put(this._cells,this._handledIds),s=!0}const n=r(this._context.indexOptions.spatialReference,this._scale),a=this._context.indexOptions.cellSize,o={xMin:1/0,yMin:1/0,xMax:-1/0,yMax:-1/0};for(const{subscription:r}of e){const t=r.tile.bounds,e=Math.floor(t[0]*n/a),s=Math.floor(t[1]*n/a),i=Math.ceil(t[2]*n/a),l=Math.ceil(t[3]*n/a);o.xMin=Math.min(o.xMin,e),o.yMin=Math.min(o.yMin,s),o.xMax=Math.max(o.xMax,i),o.yMax=Math.max(o.yMax,l)}null!=this._lastCellBounds&&o.xMin===this._lastCellBounds.xMin&&o.xMax===this._lastCellBounds.xMax&&o.yMin===this._lastCellBounds.yMin&&o.yMax===this._lastCellBounds.yMax||(this._lastCellBounds=o,s=!0),s&&this._clusterCells(o)}async updateStatistics(){let t=!1;for(const e of this._clusters.values())e.inner.count>1&&(t=this._updateAggregateStatistics(this._statistics,e.inner)||t);if(t){const t=Array.from(this._statistics.entries()).map(([t,e])=>({fieldName:t,minValue:e.minValue,maxValue:e.maxValue}));await this._context.connection.container.updateStatistics(this.level,t)}}createMessages(t,e,s,i){const n=this._createAggregateFeatures(t);i(),t.done=t.done||!s;const r=n.getCursor(),a=t.subscription.tile.createArcadeEvaluationOptions(this._context.indexOptions.arcadeContextInfo);for(;r.next();)this._context.attributeStore.setAttributeData(r.getDisplayId(),r,a,this._context.sqlOptions);return has("esri-2d-update-debug")&&console.debug(`Tile[${t.subscription.tile.id}] ClusterStrategy._update`,{done:t.done}),[new o(t.subscription,n,t.done,{})]}_createAggregateFeatures(t){const n=t.subscription,r=[],a=n.tile.transform,o=Array.from(this._clusters.values()),c=o.length;for(const l of o){const t=l.inner.getCentroidX(a),n=l.inner.getCentroidY(a),o=1===l.inner.count?l.inner.firstObjectId:l.inner.id,c=l.displayId;if(t<i+d&&t>=-d&&n<i+d&&n>=-d){const i=new s([],[t,n]),a=new e(i,l.inner.getAttributes(),null,o,c);r.push(a)}}const u=l.fromOptimizedFeatures(r,this._context.metadata,n.tile.transform);return has("esri-2d-update-debug")&&console.debug(`Tile[${t.subscription.tile.id}] ClusterLevelState.createAggregateFeatures`,{clusters:u,levelClusterCount:c}),u}_clusterCells(t){const e=this._clusters;this._clusters=new Map;const s=this._context.clusterRadius*(1/r(this._context.indexOptions.spatialReference,this._scale));let i=Array.from(this._cells.values());i=i.sort((t,e)=>e.count-t.count);const o=new Set;for(const r of i){if(o.has(r.id))continue;if(r.gridX<t.xMin||r.gridX>t.xMax||r.gridY<t.yMin||r.gridY>t.yMax)continue;const e=1+this._context.clusterRadius/this._context.indexOptions.cellSize,i=this._context.attributeStore.createDisplayIdForObjectId(r.id),l=new a(r.clone(),i);o.add(r.id),this._clusters.set(r.id,l);const c=r.centroidXWorld,d=r.centroidYWorld;for(let t=r.gridY-e;t<=r.gridY+e;t++)for(let i=r.gridX-e;i<=r.gridX+e;i++){if(t===r.gridY&&i===r.gridX)continue;const e=this._cells.get(n.createId(i,t));if(!e||o.has(e.id))continue;const a=Math.abs(e.centroidXWorld-c),u=Math.abs(e.centroidYWorld-d);a<s&&u<s&&(l.inner.merge(e),o.add(e.id))}}for(const n of e.values())this._context.attributeStore.releaseDisplayIdForObjectId(n.inner.id)}_updateAggregateStatistics(t,e){let s=!1;for(const i of e.statistics.values()){if("esriFieldTypeString"===i.field.type)continue;const e=i.value,n=i.field,r=t.get(n.name);if(r){const{minValue:t,maxValue:i}=r,n=Math.min(r.minValue,e),a=Math.max(r.maxValue,e);t===n&&i===a||(r.minValue=n,r.maxValue=a,s=!0);continue}t.set(n.name,{minValue:e,maxValue:e}),s=!0}return s}}export{u as ClusterLevelState};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{isSome as t}from"../../../../../../core/arrayUtils.js";import{internalTrackPartField as e}from"../../../../../../layers/support/streamLayerUtils.js";import{Track as s}from"./Track.js";import{FeatureTileAppendMessage as r}from"../../sources/FeatureSourceMessage.js";import{createArcadeEvaluationOptions as o}from"../../support/arcadeUtils.js";import{FeatureSetReaderIndirect as a}from"../../support/FeatureSetReaderIndirect.js";import{FeatureSetReaderJSON as i}from"../../support/FeatureSetReaderJSON.js";class n{constructor(t,e){this.level=t,this._context=e,this._chunks=[],this._tracks=new Map,this._handledChunks=new Set}destroy(){this._clear()}invalidate(){}removeTile(t){}update(t,e){const s=this._chunks,r=this._tracks,o=this._handledChunks;this._chunks=t,this._tracks=new Map,this._handledChunks=new Set,this._rebuildTracks(t),this._releaseState(s,r,o)}
|
|
2
|
+
import{isSome as t}from"../../../../../../core/arrayUtils.js";import{internalTrackPartField as e}from"../../../../../../layers/support/streamLayerUtils.js";import{Track as s}from"./Track.js";import{FeatureTileAppendMessage as r}from"../../sources/FeatureSourceMessage.js";import{createArcadeEvaluationOptions as o}from"../../support/arcadeUtils.js";import{FeatureSetReaderIndirect as a}from"../../support/FeatureSetReaderIndirect.js";import{FeatureSetReaderJSON as i}from"../../support/FeatureSetReaderJSON.js";class n{constructor(t,e){this.level=t,this._context=e,this._chunks=[],this._tracks=new Map,this._handledChunks=new Set}destroy(){this._clear()}invalidate(){}removeTile(t){}update(t,e){const s=this._chunks,r=this._tracks,o=this._handledChunks;this._chunks=t,this._tracks=new Map,this._handledChunks=new Set,this._rebuildTracks(t),this._releaseState(s,r,o)}getDisplayIds(t){const e=new Set(t),s={};for(const r of this._tracks.values()){if(e.has(r.objectId)){s[r.objectId]=r.displayId;continue}const t=r.latestObservationFeature;if(null!=t?.objectId&&e.has(t.objectId))s[t.objectId]=t.displayId;else for(const o of r.observations())null!=o.objectId&&e.has(o.objectId)&&(s[o.objectId]=o.displayId)}return s}getDisplayFeatures(t){const e=new Set(t),s=[],r=[],o=this._chunks.map(t=>t.reader.getCursor());for(const a of this._tracks.values()){if(e.has(a.displayId)&&r.push(a.getTrackLineDisplayFeature()),null!=a.latestObservationFeature&&e.has(a.latestObservationFeature.displayId)){const{displayId:t,chunkIndex:e,featureIndex:r}=a.latestObservationRecord,i=o[e];i.setIndex(r),s.push({displayId:t,...i.readLegacyFeatureWorldSpace()})}for(const{displayId:t,chunkIndex:r,featureIndex:i}of a.observations())if(e.has(t)){const e=o[r];e.setIndex(i),s.push({displayId:t,...e.readLegacyFeatureWorldSpace()})}}return{features:s,aggregates:[],tracks:r}}getFeatureObjectIdsForAggregate(t){for(const e of this._tracks.values())if(e.objectId===t)return Array.from(e.observations(),t=>t.objectId);return[]}forEachAggregateWorldSpace(t){for(const e of this._tracks.values())t(e.getTrackLineOptimizedFeature())}createMessages(s,o,n,c){s.done=s.done||!n;const l=[],u=[];for(const t of this._tracks.values())if(t.length>0){if(this._context.schema.showLatestObservation){const e=t.getLatestObservationFeatureForTile(s);null!=e&&l.push(e)}this._context.schema.showTrackLine&&t.overlapsTile(s.subscription.tile)&&u.push(t.getTrackLineFeatureForTile(s))}const h=i.fromOptimizedFeatures(l,this._context.metadata,s.subscription.tile.transform),d=i.fromOptimizedFeatures(u,this._context.trackLineMetadata,s.subscription.tile.transform);let f=[];if(this._context.schema.showPreviousObservations){const r=this._chunks.map(()=>[]);for(const t of this._tracks.values())for(const{chunkIndex:e,featureIndex:s}of t.previousObservations())r[e].push(s);f=this._chunks.map((t,o)=>{const i=s.subscription.tile;let n;if("esriGeometryPolygon"===this._context.metadata.geometryType){const e=t.queryFeaturesInBounds(i.bounds);e.setTransformForDisplay(i.transform),n=e}else n=t.getTileReader(i);if(null==n)return null;const c=a.from(n,r[o]);return c.setProcessorAttributes({[e]:2}),"esriGeometryPoint"!==c.geometryType&&null!=c.getInTransform()||c.setTransformForDisplay(s.subscription.tile.transform),c}).filter(t)}c();const p=s.subscription.tile.createArcadeEvaluationOptions(this._context.arcadeContextInfo),_=d.getCursor();for(;_.next();)this._context.attributeStore.setAttributeData(_.getDisplayId(),_,p,this._context.sqlOptions);for(const t of f){const e=t.getCursor();for(;e.next();)this._context.attributeStore.setAttributeData(e.getDisplayId(),e,p,this._context.sqlOptions)}const b=h.getCursor();for(;b.next();)this._context.attributeStore.setAttributeData(b.getDisplayId(),b,p,this._context.sqlOptions);return[new r(s.subscription,d,!1,{}),...f.map(t=>new r(s.subscription,t,!1,{})),new r(s.subscription,h,s.done,{})]}_clear(){this._releaseState(this._chunks,this._tracks,this._handledChunks),this._chunks=[],this._tracks.clear(),this._handledChunks.clear()}_rebuildTracks(t){if(!t.length)return;const e=this._context.metadata.timeInfo?.trackIdField;if(null!=e){for(let r=0;r<t.length;r++){const o=t[r];if(null!=o.lodInfo&&o.lodInfo.level!==this.level)continue;if(this._handledChunks.has(o.chunkId))continue;this._handledChunks.add(o.chunkId);const a=o.reader.getCursor();for(;a.next();){const t=a.getObjectId();a.setDisplayId(this._context.attributeStore.createDisplayIdForObjectId(t));const o=a.readAttribute(e);if(null!=o&&null!=t&&(null===this._context.featureFilter||this._context.featureFilter.check(a,this._context.sqlOptions))){if(!this._tracks.has(o)){const t=s.getOid(o),e=this._context.attributeStore.createDisplayIdForObjectId(t),r=new s(this._context,o,t,e);this._tracks.set(o,r)}this._tracks.get(o).stageObservation(r,a)}}}for(const e of this._tracks.values()){const s=e.commitObservations(this._context.attributeStore,t,this._context.featureFilter?.timeExtent);for(const t of s)this._context.attributeStore.releaseDisplayIdForObjectId(t);e.updateStatistics(t,o(1,this._context.arcadeContextInfo))}}}_releaseState(t,e,s){for(const r of t)if(s.has(r.chunkId)){const t=r.reader.getCursor();for(;t.next();){const e=t.getObjectId();this._context.attributeStore.releaseDisplayIdForObjectId(e)}}for(const r of e.values())this._releaseTrack(r)}_releaseTrack(t){this._context.attributeStore.releaseDisplayIdForObjectId(t.objectId),null!=t.latestObservationFeature&&this._context.attributeStore.releaseDisplayIdForObjectId(t.latestObservationFeature.objectId)}}export{n as TrackLevelState};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{pt2px as e}from"../../../../../../core/screenUtils.js";import r from"../../../../../../layers/support/OrderByInfo.js";import{createLabelMatcherSchema as t}from"./LabelMatcherSchema.js";import{createMatcherSchema as s,createClassBreaksMatcherSchema as i}from"./MatcherSchema.js";import{createStorageSchema as n,createTrackStorageSchema as a}from"./StorageSchema.js";import{createVisualVariableUniforms as o}from"./VisualVariablesSchema.js";async function
|
|
2
|
+
import{pt2px as e}from"../../../../../../core/screenUtils.js";import r from"../../../../../../layers/support/OrderByInfo.js";import{createLabelMatcherSchema as t}from"./LabelMatcherSchema.js";import{createMatcherSchema as s,createClassBreaksMatcherSchema as i}from"./MatcherSchema.js";import{createStorageSchema as n,createTrackStorageSchema as a}from"./StorageSchema.js";import{createVisualVariableUniforms as o}from"./VisualVariablesSchema.js";const l=e=>e.filter(({role:e})=>"highlight"===e),c=e=>e.find(({role:e})=>"visibility"===e)?.filters[0]??null;async function u(e,r,s){const i=r.renderer,n=o(i);return{symbology:s,labels:await t(e,r,n)}}async function f(e,r,t,s){const i=t.featureReduction;if(i)switch(i.type){case"binning":return p(i,e,r,t,s);case"cluster":return d(i,e,r,t,s)}if(t.trackInfo?.enabled)return g(t.trackInfo,e,r,t,s);e.symbolLayerDrawing=t.symbolLayerDrawing?.enabled?t.symbolLayerDrawing:null;const{symbology:n,storage:a}=await m(e,t.renderer,r.filters),o=v(t.orderBy,t.renderer,t.objectIdField),l=await u(e,t,n),c=I(l.symbology);return{storage:a,mesh:{properties:{sortKey:o,timeZone:r.timeZone,returnMeshObjectId:c,displayRefreshVersion:s,currentUser:r.currentUser},strategy:{type:"feature"},factory:l},expressionProperties:{timeExtent:r.timeExtent?.toJSON()}}}function y(e,r){return e.fields.map(e=>({...e.toJSON(),type:b(e,r)}))}function b(e,r){const{onStatisticExpression:t,onStatisticField:s,statisticType:i}=e;switch(i){case"min":case"max":case"avg":case"avg_angle":case"sum":case"count":return"esriFieldTypeDouble";case"mode":{if(t){const{returnType:e}=t;return e?"string"===e?"esriFieldTypeString":"esriFieldTypeDouble":"esriFieldTypeString"}const e=r.find(e=>e.name===s);return e?e.type:"esriFieldTypeString"}}}async function p(r,s,i,n,a){const u=y(r,n.fields),f=r.renderer,{symbology:b,storage:p}=await m(s,f,l(i.filters)),d=o(f),g=await t(s,{geometryType:"polygon",labelingInfoSource:n.labelingInfoSource+"-binning",labelingInfo:r.labelingInfo,labelsVisible:r.labelsVisible},d),v=I(b),h="geohash"===r.binType?{type:"geohash",fixBinLevel:r.fixedBinLevel??3}:{type:"grid",size:e(r.size),fixedBinLevel:r.fixedBinLevel};return{storage:p,mesh:{properties:{sortKey:null,timeZone:i.timeZone,returnMeshObjectId:v,displayRefreshVersion:a,currentUser:i.currentUser},strategy:{type:"binning",fields:u,index:h,featureFilter:c(i.filters)},factory:{labels:g,symbology:b}},expressionProperties:{timeExtent:i.timeExtent?.toJSON()}}}async function m(e,r,t){if("class-breaks"===r?.type){const{symbology:s,matcherFilter:a}=await i(e,r);return{symbology:s,storage:n(r,t,a)}}return{symbology:await s(e,r),storage:n(r,t)}}async function d(r,i,a,u,f){const b=y(r,u.fields),p={type:"cluster",feature:await s(i,r.effectiveFeatureRenderer),cluster:await s(i,r.effectiveClusterRenderer)},m=o(r.effectiveFeatureRenderer),d={type:"cluster",feature:await t(i,u,m),cluster:await t(i,{geometryType:"point",labelingInfoSource:u.labelingInfoSource+"-clusters",labelingInfo:r.labelingInfo,labelsVisible:r.labelsVisible},m)},g=n(r.effectiveFeatureRenderer,l(a.filters)),v=I(p);return{storage:g,mesh:{properties:{sortKey:null,timeZone:a.timeZone,displayRefreshVersion:f,returnMeshObjectId:v,currentUser:a.currentUser},strategy:{type:"cluster",fields:b,featureFilter:c(a.filters),clusterRadius:e(r.clusterRadius/2)},factory:{labels:d,symbology:p}},expressionProperties:{timeExtent:a.timeExtent?.toJSON()}}}async function g(e,r,i,n,u){const f=y(e,n.fields),b={type:"track",previousObservation:await s(r,e.previousObservations.renderer),latestObservation:await s(r,e.latestObservations.renderer),trackLine:await s(r,e.trackLines.renderer)},p={type:"track",previousObservation:await t(r,{geometryType:n.geometryType,labelingInfoSource:n.labelingInfoSource+"-track-prev",labelingInfo:e.previousObservations.labelingInfo,labelsVisible:e.previousObservations.labelsVisible},o(e.previousObservations.renderer)),latestObservation:await t(r,{geometryType:n.geometryType,labelingInfoSource:n.labelingInfoSource+"-track-latest",labelingInfo:e.latestObservations.labelingInfo,labelsVisible:e.latestObservations.labelsVisible},o(e.latestObservations.renderer)),trackLine:await t(r,{geometryType:"polyline",labelingInfoSource:n.labelingInfoSource+"-track-line",labelingInfo:e.trackLines.labelingInfo,labelsVisible:e.trackLines.labelsVisible},o(e.trackLines.renderer))},m=a(e,l(i.filters)),d=I(b);return{storage:m,mesh:{properties:{sortKey:null,timeZone:i.timeZone,returnMeshObjectId:d,displayRefreshVersion:u,currentUser:i.currentUser},strategy:{type:"track",featureFilter:c(i.filters),fields:f,maxDisplayDuration:e.maxDisplayDuration?.toMilliseconds()??0,maxDisplayObservationsPerTrack:e.maxDisplayObservationsPerTrack,showLatestObservation:e.latestObservations.visible,showPreviousObservations:e.previousObservations.visible,showTrackLine:e.trackLines.visible,timeField:e.timeField},factory:{labels:p,symbology:b}},expressionProperties:{timeExtent:i.timeExtent?.toJSON()}}}function v(e,t,s){const i=null!=t&&"unique-value"===t.type&&t.orderByClassesEnabled;if("default"!==e||i||(e=[new r({field:s,order:"descending"})]),"default"!==e&&e?.length){e.length;const r=e[0],t="ascending"===r.order?"asc":"desc";return r.field?{field:r.field,order:t}:r.valueExpression?{expression:r.valueExpression,order:t}:null}if(i){return{byRenderer:!0,order:"asc"}}return null}function h(e){return 2===e.techniqueType}function I(e){if("simple"===e.type&&e.meshes.some(h))return!0;if("interval"===e.type){if(e.intervals.some(e=>e.meshes.some(h)||e.alternateMeshes.some(h)))return!0;if(e.backgroundFill.some(h))return!0}if("map"===e.type){if(e.map.some(e=>e.meshes.some(h)||e.alternateMeshes.some(h)))return!0;if(e.backgroundFill.some(h))return!0}return!1}export{f as createSimpleProcessorSchema,y as getAggregateFields,v as getSortKey};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import has from"../../../../../core/has.js";import{destroyMaybe as e}from"../../../../../core/maybe.js";import{notDeepEqual as t}from"../../../../../core/object.js";import{ignoreAbortErrors as r,throwIfNotAbortError as s}from"../../../../../core/promiseUtils.js";import{OptimizedFeature as a}from"../../../../../layers/graphics/OptimizedFeature.js";import{QueryEngine as i}from"../../../../../layers/graphics/data/QueryEngine.js";import{FeatureStoreStatistics as
|
|
2
|
+
import has from"../../../../../core/has.js";import{destroyMaybe as e}from"../../../../../core/maybe.js";import{notDeepEqual as t}from"../../../../../core/object.js";import{ignoreAbortErrors as r,throwIfNotAbortError as s}from"../../../../../core/promiseUtils.js";import{OptimizedFeature as a}from"../../../../../layers/graphics/OptimizedFeature.js";import{QueryEngine as i}from"../../../../../layers/graphics/data/QueryEngine.js";import{FeatureStoreStatistics as o}from"../FeatureStoreStatistics.js";import{StreamMessenger as n}from"./StreamMessenger.js";import{UpdateStatus as c}from"./strategies/ALoadStrategy.js";import{FeatureDrillDownTileLoadStrategy as h}from"./strategies/FeatureDrillDownTileLoadStrategy.js";import{FeatureHybridTileLoadStrategy as d}from"./strategies/FeatureHybridTileLoadStrategy.js";import{FeaturePagedTileLoadStrategy as u}from"./strategies/FeaturePagedTileLoadStrategy.js";import{FeatureSnapshotLoadStrategy as m}from"./strategies/FeatureSnapshotLoadStrategy.js";import{ParquetSnapshotLoadStrategy as p}from"./strategies/ParquetSnapshotLoadStrategy.js";import{ParquetTileLoadStrategy as y}from"./strategies/ParquetTileLoadStrategy.js";import{StreamLoadStrategy as g}from"./strategies/StreamLoadStrategy.js";import{FeatureSourceChunkStore as l}from"./strategies/chunks/SourceChunkStore.js";import _ from"../support/FeatureFilterEvaluator.js";import{UpdateTracking2D as f}from"../../support/UpdateTracking2D.js";class S{constructor(e,t,r){this._aggregateAdapter=e,this._subscriptions=t,this._connection=r,this._updateTracking=new f({debugName:"FeatureSource"}),this._filters=[],this.store=new l}destroy(){this._strategy?.destroy(),this._streamMessenger?.destroy(),this._updateTracking?.destroy(),this.store.destroy()}get metadata(){return this._strategy.metadata}get streamMessenger(){return null==this._streamMessenger&&this._initStreamMessenger(),this._streamMessenger}get statistics(){return o.from(this.store)}get updateTracking(){return this._updateTracking}get usedMemory(){return this.store.usedMemory}get queryEngine(){if(!this._queryEngine){if(!this.store||!this._strategy)return null;this._queryEngine=new i({featureStore:this.store,fieldsIndex:this.metadata.fieldsIndex,geometryType:this.metadata.geometryType,featureIdInfo:this.metadata.featureIdInfo,hasZ:this.metadata.hasZ,hasM:this.metadata.hasM,spatialReference:this.metadata.outSpatialReference,aggregateAdapter:this._aggregateAdapter,timeInfo:this.metadata.timeInfo,definitionExpression:this._strategy?.definitionExpression,availableFields:this._strategy?.availableFields})}return this._queryEngine}get isStream(){return"stream"===this._schema.type}get hasQueryDisplayFilter(){if(!this._schema)return!1;switch(this._schema.type){case"feature":return null!=this._schema.strategy.full.displayFilterInfo;case"parquet":case"stream":return!1}}chunks(){return Array.from(this.store.chunks())}async applyCacheUpdate(){this.hasQueryDisplayFilter&&await this._updateTracking.addPromise(this._strategy.applyCacheUpdate())}cleanup(){return this.store.cleanup()}onSubscribe(e){if(this._connection.onEvent({type:"subscribe",tile:e.tile.id}),!this._strategy)return;const t=this._strategy.load(e);t.then(()=>this._connection.onEvent({type:"loaded",tile:e.tile.id})).catch(t=>this._connection.onEvent({type:"error",tile:e.tile.id,error:t})),this._updateTracking.consumePromise(t)}onResume(e){this._updateTracking.consumePromise(r(this._strategy?.load(e)))}onUnsubscribe(e){this._connection.onEvent({type:"unsubscribe",tile:e.tile.id}),this._strategy?.unload(e)}async applyOverride(e){await(this._strategy?.applyOverride(e))}takeOverrideUpdate(){return this._strategy?.takeOverrideUpdate()}async update(r,s,a){const i=this._schema,o=this._getCachedObjectIds(this._filters),n=this._getCachedObjectIds(s);if(this._schema=r,this._filters=s,this._queryEngine=e(this._queryEngine),i&&i.type!==r.type)throw new Error("InternalError: Reconfiguring source types is not supported.");const h=new c;if(!i||t(i.service,r.service)||i.strategy.type!==r.strategy.type||t(r.strategy.full,i.strategy.full)||!await this._strategy.tryUpdate(h,r.strategy.partial)){await this._updateStrategyType(this._schema.service,r,a);let e=null;return"postQueryFilter"in this._schema.strategy.full&&this._schema.strategy.full.postQueryFilter&&(e=await _.create({geometryType:this.metadata.geometryType,hasM:!1,hasZ:!1,timeInfo:this.metadata.timeInfo,fieldsIndex:this.metadata.fieldsIndex,spatialReference:this.metadata.outSpatialReference,filterJSON:this._schema.strategy.full.postQueryFilter})),await this.store.update({metadata:this.metadata,definitionExpression:this._schema.strategy.full.definitionExpression,postQueryFilter:e}),!0}return this._updateFilterCache(o,n),h.requiresInvalidation}unsafeSetQueryHistoricMoment(e){"feature"===this._schema.type&&(this._schema.strategy.full.historicMoment=e,this._strategy.unsafeSetQueryHistoricMoment(new Date(e)))}_initStreamMessenger(){null==this._streamMessenger&&(this._streamMessenger=new n(this._connection))}async normalizeOverrides(e){const t={historicMoment:e.historicMoment,commands:{updateWeak:e.commands.updateWeak.map(a.fromJSON),removeWeak:e.commands.removeWeak,update:e.commands.update.map(a.fromJSON),remove:e.commands.remove,release:e.commands.release}},r=e.commands.updateByIdWeak,s=await this._queryOptimizedFeatures(r);if(s.length!==r.length){const e=new Set(s.map(e=>e.objectId));for(const s of r)e.has(s)||t.commands.removeWeak.push(s)}return t.commands.updateWeak.push(...s),t}async _queryOptimizedFeatures(e){if(0===e.length)return[];const t=[],r=(await this._strategy.queryByObjectId(e,["*"])).getCursor();for(;r.next();)t.push(r.readOptimizedFeatureWorldSpace());return t}getObjectIdsFromGlobalIds(e){const t=this.metadata.globalIdField;if(null==t)throw new Error("InternalError: Recieved an edit with globalIds, but not supported by the service");const r=this.store.mapObjectIdsFromGlobalIds(e,t).values();return Array.from(r)}_getCachedObjectIds(e){const t=new Set;for(const{ensureCached:r,filters:s}of e)if(r)for(const e of s)for(const r of e.objectIds??[])t.add(r);return t}_updateFilterCache(e,t){if(!this.hasQueryDisplayFilter)return;const r=new Set,s=new Set;for(const a of t)e.has(a)||r.add(a);for(const a of e)t.has(a)||s.add(a);this._strategy.prepareCacheUpdate(r,s)}async _updateStrategyType(e,t,r){const a=this._createStrategy(e,t);this._connection.onEvent({type:"updateStrategyStart",about:a.about});const i=!!this._strategy;this.store.clear(),this._strategy?.destroy(),this._strategy=a,has("esri-2d-update-debug")&&console.debug(`Version[${r}] FeatureSource.updateStrategy`,{strategy:a});const o=Array.from(this._subscriptions.values());if(!o.length)return void this._connection.onEvent({type:"updateStrategyEnd"});const n=Promise.all(o.map(e=>this._strategy.load(e).then(()=>this._connection.onEvent({type:"loaded",tile:e.tile.id})).catch(t=>this._connection.onEvent({type:"error",tile:e.tile.id,error:t}))));this._updateTracking.consumePromise(n),this._strategy.prepareCacheUpdate(this._getCachedObjectIds(this._filters));try{i&&await n}catch(c){s(c)}this._connection.onEvent({type:"updateStrategyEnd"}),has("esri-2d-update-debug")&&console.debug(`Version[${r}] FeatureSource.updateStrategyEnd`,{strategy:a})}_createStrategy(e,t){const r={connection:this._connection,store:this.store};switch(t.type){case"feature":return this._createFeatureLoadStrategy(e,t.strategy,r);case"parquet":return this._createParquetLoadStrategy(e,t.strategy,r);case"stream":return this._createStreamLoadStrategy(e,t.strategy,r)}}_createFeatureLoadStrategy(e,t,r){switch(t.type){case"drill-down":return new h(e,t,r);case"hybrid-tile":return new d(e,t,r);case"paged-tile":return new u(e,t,r);case"snapshot":return new m(e,t,r)}}_createParquetLoadStrategy(e,t,r){switch(t.type){case"xz":return new y(e,t,r,this._connection);case"snapshot":return new p(e,t,r,this._connection)}}_createStreamLoadStrategy(e,t,r){const s=new g(e,t,r);return this.streamMessenger.strategy=s,s}}export{S as FeatureSource};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import t from"../../../../../core/Error.js";import has from"../../../../../core/has.js";import e from"../../../../../core/Logger.js";import{diff as i}from"../../../../../core/accessorSupport/diffUtils.js";import{collectExpressionDependencies as s}from"../../../../../support/ArcadeExpression.js";import{attributeStoreInitialSize as r,
|
|
2
|
+
import t from"../../../../../core/Error.js";import has from"../../../../../core/has.js";import e from"../../../../../core/Logger.js";import{diff as i}from"../../../../../core/accessorSupport/diffUtils.js";import{collectExpressionDependencies as s}from"../../../../../support/ArcadeExpression.js";import{attributeStoreInitialSize as r,maxHighlightGroups as a,filterFlag0 as n,effectFlag0 as o}from"../../../engine/webgl/definitions.js";import{getDisplayIdTexel as l}from"../../../engine/webgl/DisplayId.js";import{nanMagicNumber as h}from"../../../engine/webgl/shaderGraph/techniques/shaders/constants.js";import{createDebugLogger as c,DEBUG_ATTR_UPDATES as d}from"../../../engine/webgl/util/debug.js";import{DisplayIdGenerator as u}from"./DisplayIdGenerator.js";import p from"./FeatureFilterEvaluator.js";import{PixelType as _}from"../../../../webgl/enums.js";function m(t,e){if(!t||!e)return t;switch(e){case"radius":case"distance":return 2*t;case"diameter":case"width":return t;case"area":return Math.sqrt(t)}return t}const y=()=>e.getLogger("esri.views.layers.2d.features.support.AttributeStore"),f=e=>{switch(e){case _.UNSIGNED_BYTE:return Uint8Array;case _.UNSIGNED_SHORT_4_4_4_4:return Uint16Array;case _.FLOAT:return Float32Array;default:return void y().error(new t("webgl-utils",`Unable to handle type ${e}`))}},b=c(d,y()),g={sharedArrayBuffer:has("esri-shared-array-buffer"),atomics:has("esri-atomics")};class x{constructor(t,e,i){this.size=0,this.texelSize=4,this.dirtyStart=0,this.dirtyEnd=0;const{pixelType:s,layout:r,textureOnly:a}=e;this.textureOnly=a||!1,this.pixelType=s,this.layout=r,this._resetRange(),this.size=t,this.isLocal=i,a||(this.data=this._initData(s,t))}get usedMemory(){return this.data?.byteLength??0}get buffer(){return this.data?.buffer}unsetComponentAllTexels(t,e){const i=this.data;for(let s=0;s<this.size*this.size;s++)i[s*this.texelSize+t]&=~e;this.dirtyStart=0,this.dirtyEnd=this.size*this.size-1}setComponentAllTexels(t,e){const i=this.data;for(let s=0;s<this.size*this.size;s++)i[s*this.texelSize+t]|=255&e;this.dirtyStart=0,this.dirtyEnd=this.size*this.size-1}setComponent(t,e,i){const s=this.data;for(const r of i)s[r*this.texelSize+t]|=e,this.dirtyStart=Math.min(this.dirtyStart,r),this.dirtyEnd=Math.max(this.dirtyEnd,r)}setComponentTexel(t,e,i){this.data[i*this.texelSize+t]|=e,this.dirtyStart=Math.min(this.dirtyStart,i),this.dirtyEnd=Math.max(this.dirtyEnd,i)}unsetComponentTexel(t,e,i){this.data[i*this.texelSize+t]&=~e,this.dirtyStart=Math.min(this.dirtyStart,i),this.dirtyEnd=Math.max(this.dirtyEnd,i)}getData(t,e){const i=l(t);return this.data[i*this.texelSize+e]}setData(t,e,i){const s=l(t),r=1<<e;0!==(this.layout&r)?null!=this.data&&(this.data[s*this.texelSize+e]=i,this.dirtyStart=Math.min(this.dirtyStart,s),this.dirtyEnd=Math.max(this.dirtyEnd,s)):y().error("mapview-attributes-store","Tried to set a value for a texel's readonly component")}expand(t){if(this.size=t,!this.textureOnly){const e=this._initData(this.pixelType,t),i=this.data;e.set(i),this.data=e}}toMessage(){const t=this.dirtyStart,e=this.dirtyEnd,i=this.texelSize;if(t>e)return null;this._resetRange();const s=!this.isLocal,r=this.pixelType,a=this.layout,n=this.data;return{start:t,end:e,data:s&&n.slice(t*i,(e+1)*i)||null,pixelType:r,layout:a}}_initData(t,e){const i=ArrayBuffer,s=f(t),r=new s(new i(e*e*4*s.BYTES_PER_ELEMENT));for(let a=0;a<r.length;a+=4)r[a+1]=255;return r}_resetRange(){this.dirtyStart=2147483647,this.dirtyEnd=0}}class S{constructor(t){this._client=t,this._filters=[],this._blocks=new Array,this._attributeComputeInfo=null,this._abortController=new AbortController,this._size=r,this._arcadeDependencies=new Set,this._initialized=!1,this.version=0,this._idGenerator=new u,this._epoch=1}destroy(){this._abortController.abort()}_initialize(){if(null!=this._blockDescriptors)return;const t=_.FLOAT;b(`Creating AttributeStore ${g.sharedArrayBuffer?"with":"without"} shared memory`),this._blockDescriptors=[{pixelType:_.UNSIGNED_BYTE,layout:1},{pixelType:_.UNSIGNED_BYTE,layout:15,textureOnly:!0},{pixelType:_.UNSIGNED_BYTE,layout:15,textureOnly:!0},{pixelType:t,layout:15},{pixelType:t,layout:15},{pixelType:t,layout:15},{pixelType:t,layout:15},{pixelType:_.FLOAT,layout:15}],this._blocks=this._blockDescriptors.map(()=>null)}get usedMemory(){let t=0;for(const e of this._blocks)e&&(t+=e.usedMemory);return t+=this._idGenerator.usedMemory,t}createDisplayIdForObjectId(t){return this._idGenerator.createIdForObjectId(t)}releaseDisplayIdForObjectId(t){return this._idGenerator.releaseIdForObjectId(t)}getDisplayIdForObjectId(t){return this._idGenerator.getDisplayIdForObjectId(t)}incrementDisplayIdGeneration(){this._idGenerator.incrementGeneration()}hasArcadeDependency(t){return this._arcadeDependencies.has(t)}releaseAllIds(){this._idGenerator.releaseAll()}async update(t,e,s,r=0){const a=i(this._schema,t);if(this.version=r,a&&(has("esri-2d-update-debug")&&console.debug(`Version[${r}] AttributeStore.update`,{changed:a}),this._schema=t,this._attributeComputeInfo=null,this._matcherFilter=void 0,this._initialize(),null!=t))if(s&&(this._filters=await Promise.all(t.filters.map(async({bitIndex:t,filters:e})=>({bitIndex:t,evaluators:await Promise.all(e.map(t=>p.create({geometryType:s.geometryType,hasM:!1,hasZ:!1,timeInfo:s.timeInfo,fieldsIndex:s.fieldsIndex,spatialReference:s.outSpatialReference,filterJSON:t})))})))),"simple"===t.type&&t.matcherFilter&&(this._matcherFilter=await e.createComputedField(t.matcherFilter),this._updateReferences(this._matcherFilter)),"multi"!==t.type)this._attributeComputeInfo={type:"feature",map:new Map},await Promise.all(t.bindings.map(async t=>{const i=await this._bind(e,t);this._updateReferences(i)}));else{this._attributeComputeInfo={type:"multi",keyField:t.keyField,map:new Map};for(const i in t.bindings){const s=t.bindings[i];await Promise.all(s.map(async t=>{const s=await this._bind(e,t,parseInt(i,10));this._updateReferences(s)}))}}}setData(t,e,i,s){const r=l(t);this._ensureSizeForTexel(r),this._getBlock(e).setData(t,i,s)}getData(t,e,i){return this._getBlock(e).getData(t,i)}unsetAttributeData(t){const e=l(t);this._getBlock(0).setData(e,0,0)}referencesScale(){if(this._matcherFilter?.hasArcadeDependency("scale"))return!0;const t=this._attributeComputeInfo;if(!t)return!1;if("multi"===t.type){for(const e of t.map.values())for(const{field:t}of e.values())if(t?.hasArcadeDependency("scale"))return!0}else for(const{field:e}of t.map.values())if(e?.hasArcadeDependency("scale"))return!0;return!1}setAttributeData(t,e,i,s){const r=l(t);this._ensureSizeForTexel(r);let a=this.getFilterFlags(e,s);this._passesMatcherFilter(e,i)||(a&=~n),this._getBlock(0).setData(r,0,a);const o=this._attributeComputeInfo,c=1,d=4;let u=null;o&&(u="multi"===o.type?o.map.get(e.readAttribute(o.keyField)):o.map,u?.size&&u.forEach((t,s)=>{const a=s*c%d,n=Math.floor(s*c/d),o=this._getBlock(n+3);let l=t.field?.read(e,i);t.valueRepresentation&&(l=m(l,t.valueRepresentation));(null===l||isNaN(l)||l===1/0||l===-1/0)&&(l=h),o.setData(r,a,l)}))}get epoch(){return this._epoch}sendUpdates(){const t=this._blocks.map(t=>null!=t?t.toMessage():null),e=this._getInitArgs();this._client.update({initArgs:e,blockData:t,version:this.version,sendUpdateEpoch:this._epoch}),this._epoch+=1}_ensureSizeForTexel(t){for(;t>=this._size*this._size;)if(this._expand())return}async _bind(t,e,i){const s=await t.createComputedField(e),{valueRepresentation:r}=e,a=this._attributeComputeInfo;if("multi"===a.type){const t=a.map.get(i)??new Map;t.set(e.binding,{field:s,valueRepresentation:r}),a.map.set(i,t)}else a.map.set(e.binding,{field:s,valueRepresentation:r});return s}_getInitArgs(){return this._initialized?null:(this._initialized=!0,this._getBlock(1),this._getBlock(2),this._getBlock(7),{blockSize:this._size,blockDescriptors:this._blocks.map(t=>null!=t?{textureOnly:t.textureOnly,buffer:t.buffer,pixelType:t.pixelType}:null)})}_getBlock(t){const e=this._blocks[t];if(null!=e)return e;b(`Initializing AttributeBlock at index ${t}`);const i=new x(this._size,this._blockDescriptors[t],this._client.isLocal);return this._blocks[t]=i,this._initialized=!1,i}_expand(){if(this._size<this._schema.capabilities.maxTextureSize){const t=this._size<<=1;b("Expanding block size to",t,this._blocks);for(const e of this._blocks)e?.expand(t);return this._initialized=!1,this._size=t,0}return y().error(new t("mapview-limitations","Maximum number of onscreen features exceeded.")),-1}_updateReferences(t){s(this._arcadeDependencies,t)}_passesMatcherFilter(t,e){if(void 0===this._matcherFilter)return!0;if(null===this._matcherFilter)return!1;const i=this._matcherFilter.read(t,e);return null!=i&&!isNaN(i)&&i!==1/0&&i!==-1/0&&(i>=-Number.MAX_SAFE_INTEGER&&i<=Number.MAX_SAFE_INTEGER)}isVisible(t){return!!(this._getBlock(0).getData(t,0)&1<<a)}getFilterFlags(t,e){let i=n|o;for(const{bitIndex:s,evaluators:r}of this._filters){const a=1<<s;r.some(i=>i.check(t,e))?i|=a:i&=~a}return i}}export{S as AttributeStore,m as getVisualVariableSizeValueRepresentationRatio};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{destroyMaybe as e}from"../../../../core/maybe.js";import{AFeatureContainer as t}from"../../engine/AFeatureContainer.js";import{GraphicInstanceStore as r}from"../../engine/webgl/shaderGraph/techniques/GraphicInstanceStore.js";import
|
|
2
|
+
import{destroyMaybe as e}from"../../../../core/maybe.js";import{AFeatureContainer as t}from"../../engine/AFeatureContainer.js";import{GraphicInstanceStore as r}from"../../engine/webgl/shaderGraph/techniques/GraphicInstanceStore.js";import s from"./GraphicBoundsRenderer.js";class i extends t{constructor(e,t=!1){super(e),this.drawOnTop=t,this._hasHighlight=!1,this._instanceStore=new r}destroy(){super.destroy(),this._boundsRenderer=e(this._boundsRenderer)}get instanceStore(){return this._instanceStore}get hasHighlight(){return this._hasHighlight}enableRenderingBounds(e){this._boundsRenderer=new s(e),this.requestRender()}setHighlightActive(e){this._hasHighlight=e}onTileData(e,t){e.update(t),this.contains(e)||this.addChild(e),this.requestRender()}_renderChildren(e,t){e.selection=t;for(const r of this.children)r.visible&&(r.upload(this._instanceStore,1),r.getDisplayList()?.render(e))}}export{i as AGraphicContainer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{identity as t,multiply as e,translate as r,scale as i,rotate as s}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{fromValues as
|
|
2
|
+
import{identity as t,multiply as e,translate as r,scale as i,rotate as s}from"../../../../core/libs/gl-matrix-2/math/mat3.js";import{create as o}from"../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{fromValues as n}from"../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{fromValues as a}from"../../../../core/libs/gl-matrix-2/factories/vec3f32.js";import{normalizeMapX as l}from"../../../../geometry/support/normalizeUtils.js";import{DisplayObject as f}from"../../engine/DisplayObject.js";import{BufferObject as u}from"../../../webgl/BufferObject.js";import{PrimitiveType as c,DataType as m}from"../../../webgl/enums.js";import{getDataTypeBytes as p}from"../../../webgl/getDataTypeBytes.js";import{VertexArrayObject as h}from"../../../webgl/VertexArrayObject.js";import{VertexBuffer as d}from"../../../webgl/VertexBuffer.js";import{VertexElementDescriptor as _}from"../../../webgl/VertexElementDescriptor.js";const g=Math.PI/180,x=4,v=new Map,b=t=>{let e=0;const r=t.map(t=>{const r=new _(t.name,t.count,t.type,e,0,t.normalized||!1);return e+=t.count*p(t.type),r});return r.forEach(t=>t.stride=e),r},y=t=>{const e=new Map;for(const r of t)e.set(r.name,r.location);return e},B=(t,e)=>{if(!v.has(t)){const r={bufferLayout:b(e),attributes:y(e)};v.set(t,r)}return v.get(t)},j=()=>B("bounds",[{location:0,name:"a_position",count:2,type:m.FLOAT}]);class w extends f{constructor(t){super(),this._program=null,this._vao=null,this._vertexBuffer=null,this._indexBuffer=null,this._dvsMat3=o(),this._localOrigin={x:0,y:0},this._getBounds=t}destroy(){super.destroy(),this._vao&&(this._vao.dispose(),this._vao=null,this._vertexBuffer=null,this._indexBuffer=null)}doRender(t){const{context:e}=t,r=this._getBounds();if(r.length<1)return;this._createShaderProgram(e),this._updateMatricesAndLocalOrigin(t),this._updateBufferData(e,r),e.setBlendingEnabled(!0),e.setDepthTestEnabled(!1),e.setStencilWriteMask(0),e.setStencilTestEnabled(!1),e.setBlendFunction(1,771),e.setColorMask(!0,!0,!0,!0);const i=this._program;e.bindVAO(this._vao),e.useProgram(i),i.setUniformMatrix3fv("u_dvsMat3",this._dvsMat3),e.gl.lineWidth(1),e.drawElements(c.LINES,8*r.length,m.UNSIGNED_INT,0),e.bindVAO(null)}_createTransforms(){return{displayViewScreenMat3:o()}}_createShaderProgram(t){if(this._program)return;const e="precision highp float;\n uniform mat3 u_dvsMat3;\n\n attribute vec2 a_position;\n\n void main() {\n mediump vec3 pos = u_dvsMat3 * vec3(a_position, 1.0);\n gl_Position = vec4(pos.xy, 0.0, 1.0);\n }",r="precision mediump float;\n void main() {\n gl_FragColor = vec4(0.75, 0.0, 0.0, 0.75);\n }";this._program=t.programCache.get(e,r,j().attributes)}_updateMatricesAndLocalOrigin(o){const{state:f}=o,{displayMat3:u,size:c,resolution:m,pixelRatio:p,rotation:h,viewpoint:d}=f,_=g*h,{x,y:v}=d.targetGeometry,b=l(x,f.spatialReference);this._localOrigin.x=b,this._localOrigin.y=v;const y=p*c[0],B=p*c[1],j=m*y,w=m*B,M=t(this._dvsMat3);e(M,M,u),r(M,M,n(y/2,B/2)),i(M,M,a(c[0]/j,-B/w,1)),s(M,M,-_)}_updateBufferData(t,e){const{x:r,y:i}=this._localOrigin,s=2*x*e.length,o=new Float32Array(s),n=new Uint32Array(8*e.length);let a=0,l=0;for(const u of e)u&&(o[2*a]=u[0]-r,o[2*a+1]=u[1]-i,o[2*a+2]=u[0]-r,o[2*a+3]=u[3]-i,o[2*a+4]=u[2]-r,o[2*a+5]=u[3]-i,o[2*a+6]=u[2]-r,o[2*a+7]=u[1]-i,n[l]=a+0,n[l+1]=a+3,n[l+2]=a+3,n[l+3]=a+2,n[l+4]=a+2,n[l+5]=a+1,n[l+6]=a+1,n[l+7]=a+0,a+=4,l+=8);const f=j();this._vertexBuffer?this._vertexBuffer.setData(o.buffer):this._vertexBuffer=new d(t,f.bufferLayout,o.buffer,35048),this._indexBuffer?this._indexBuffer.setData(n):this._indexBuffer=u.createIndex(t,35048,n),this._vao||(this._vao=new h(t,this._vertexBuffer,this._indexBuffer))}}export{w as default};
|