@arcgis/core 5.1.0-next.70 → 5.1.0-next.72
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/PopupTemplate.js +1 -1
- package/assets/components/assets/combobox/t9n/messages.ar.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.bg.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.bs.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ca.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.cs.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.da.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.de.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.el.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.en.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.es.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.et.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.fi.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.fr.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.he.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.hr.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.hu.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.id.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.it.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ja.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ko.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.lt.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.lv.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.nl.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.no.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.pl.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.pt-BR.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.pt-PT.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ro.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.ru.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.sk.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.sl.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.sr.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.sv.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.th.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.tr.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.uk.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.vi.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.zh-CN.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.zh-HK.json +1 -1
- package/assets/components/assets/combobox/t9n/messages.zh-TW.json +1 -1
- package/assets/components/assets/icon/addToLivestreamVideoLayer16.json +1 -0
- package/assets/components/assets/icon/addToLivestreamVideoLayer24.json +1 -0
- package/assets/components/assets/icon/addToLivestreamVideoLayer32.json +1 -0
- package/assets/components/assets/icon/addToVideoLayer16.json +1 -0
- package/assets/components/assets/icon/addToVideoLayer24.json +1 -0
- package/assets/components/assets/icon/addToVideoLayer32.json +1 -0
- package/assets/components/assets/icon/arcgisQuickcapture16.json +1 -0
- package/assets/components/assets/icon/arcgisQuickcapture24.json +1 -0
- package/assets/components/assets/icon/arcgisQuickcapture32.json +1 -0
- package/assets/components/assets/icon/arcgisSurvey12316.json +1 -0
- package/assets/components/assets/icon/arcgisSurvey12324.json +1 -0
- package/assets/components/assets/icon/arcgisSurvey12332.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode16.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode16F.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode24.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode24F.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode32.json +1 -0
- package/assets/components/assets/icon/bicycleTravelMode32F.json +1 -0
- package/assets/components/assets/icon/busTravelMode16.json +1 -0
- package/assets/components/assets/icon/busTravelMode16F.json +1 -0
- package/assets/components/assets/icon/busTravelMode24.json +1 -0
- package/assets/components/assets/icon/busTravelMode24F.json +1 -0
- package/assets/components/assets/icon/busTravelMode32.json +1 -0
- package/assets/components/assets/icon/busTravelMode32F.json +1 -0
- package/assets/components/assets/icon/carTravelMode16.json +1 -0
- package/assets/components/assets/icon/carTravelMode16F.json +1 -0
- package/assets/components/assets/icon/carTravelMode24.json +1 -0
- package/assets/components/assets/icon/carTravelMode24F.json +1 -0
- package/assets/components/assets/icon/carTravelMode32.json +1 -0
- package/assets/components/assets/icon/carTravelMode32F.json +1 -0
- package/assets/components/assets/icon/conditionalRulesDown16.json +1 -0
- package/assets/components/assets/icon/conditionalRulesDown24.json +1 -0
- package/assets/components/assets/icon/conditionalRulesDown32.json +1 -0
- package/assets/components/assets/icon/emergency16.json +1 -0
- package/assets/components/assets/icon/emergency16F.json +1 -0
- package/assets/components/assets/icon/emergency24.json +1 -0
- package/assets/components/assets/icon/emergency24F.json +1 -0
- package/assets/components/assets/icon/emergency32.json +1 -0
- package/assets/components/assets/icon/emergency32F.json +1 -0
- package/assets/components/assets/icon/eyedropper16.json +1 -1
- package/assets/components/assets/icon/eyedropper24.json +1 -1
- package/assets/components/assets/icon/eyedropper32.json +1 -1
- package/assets/components/assets/icon/featureDetailsSet16.json +1 -0
- package/assets/components/assets/icon/featureDetailsSet24.json +1 -0
- package/assets/components/assets/icon/featureDetailsSet32.json +1 -0
- package/assets/components/assets/icon/fileBim16.json +1 -0
- package/assets/components/assets/icon/fileBim24.json +1 -0
- package/assets/components/assets/icon/fileBim32.json +1 -0
- package/assets/components/assets/icon/fileDwg16.json +1 -0
- package/assets/components/assets/icon/fileDwg24.json +1 -0
- package/assets/components/assets/icon/fileDwg32.json +1 -0
- package/assets/components/assets/icon/fileRvt16.json +1 -0
- package/assets/components/assets/icon/fileRvt24.json +1 -0
- package/assets/components/assets/icon/fileRvt32.json +1 -0
- package/assets/components/assets/icon/gradient16.json +1 -0
- package/assets/components/assets/icon/gradient24.json +1 -0
- package/assets/components/assets/icon/gradient32.json +1 -0
- package/assets/components/assets/icon/layerStreamSetting16.json +1 -0
- package/assets/components/assets/icon/layerStreamSetting24.json +1 -0
- package/assets/components/assets/icon/layerStreamSetting32.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode16.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode16F.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode24.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode24F.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode32.json +1 -0
- package/assets/components/assets/icon/mopedTravelMode32F.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode16.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode16F.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode24.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode24F.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode32.json +1 -0
- package/assets/components/assets/icon/motorcycleTravelMode32F.json +1 -0
- package/assets/components/assets/icon/publish16.json +1 -0
- package/assets/components/assets/icon/publish24.json +1 -0
- package/assets/components/assets/icon/publish32.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode16.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode16F.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode24.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode24F.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode32.json +1 -0
- package/assets/components/assets/icon/scooterTravelMode32F.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode16.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode16F.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode24.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode24F.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode32.json +1 -0
- package/assets/components/assets/icon/shuttleTravelMode32F.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode16.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode16F.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode24.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode24F.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode32.json +1 -0
- package/assets/components/assets/icon/strollerTravelMode32F.json +1 -0
- package/assets/components/assets/icon/trainTravelMode16.json +1 -0
- package/assets/components/assets/icon/trainTravelMode16F.json +1 -0
- package/assets/components/assets/icon/trainTravelMode24.json +1 -0
- package/assets/components/assets/icon/trainTravelMode24F.json +1 -0
- package/assets/components/assets/icon/trainTravelMode32.json +1 -0
- package/assets/components/assets/icon/trainTravelMode32F.json +1 -0
- package/assets/components/assets/icon/tramTravelMode16.json +1 -0
- package/assets/components/assets/icon/tramTravelMode16F.json +1 -0
- package/assets/components/assets/icon/tramTravelMode24.json +1 -0
- package/assets/components/assets/icon/tramTravelMode24F.json +1 -0
- package/assets/components/assets/icon/tramTravelMode32.json +1 -0
- package/assets/components/assets/icon/tramTravelMode32F.json +1 -0
- package/assets/components/assets/icon/truckTravelMode16.json +1 -0
- package/assets/components/assets/icon/truckTravelMode16F.json +1 -0
- package/assets/components/assets/icon/truckTravelMode24.json +1 -0
- package/assets/components/assets/icon/truckTravelMode24F.json +1 -0
- package/assets/components/assets/icon/truckTravelMode32.json +1 -0
- package/assets/components/assets/icon/truckTravelMode32F.json +1 -0
- package/assets/components/assets/icon/velocityServer16.json +1 -0
- package/assets/components/assets/icon/velocityServer24.json +1 -0
- package/assets/components/assets/icon/velocityServer32.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode16.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode16F.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode24.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode24F.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode32.json +1 -0
- package/assets/components/assets/icon/walkingTravelMode32F.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode16.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode16F.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode24.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode24F.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode32.json +1 -0
- package/assets/components/assets/icon/wheelchairTravelMode32F.json +1 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/003fd7745966fe03510c.js +1 -0
- package/assets/esri/core/workers/chunks/00bae4b7e179336e0362.js +1 -0
- package/assets/esri/core/workers/chunks/026d3fa331caec1ea3d2.js +1 -0
- package/assets/esri/core/workers/chunks/027c3ea756db68e51f0a.js +1 -0
- package/assets/esri/core/workers/chunks/{81b2985b83be8f8f1090.js → 02876e434dc91c42b2f4.js} +1 -1
- package/assets/esri/core/workers/chunks/041c372e98a6fba90b36.js +1 -0
- package/assets/esri/core/workers/chunks/0783890816bac45277b9.js +1 -0
- package/assets/esri/core/workers/chunks/07aac6245a0d1adbb2d4.js +1 -0
- package/assets/esri/core/workers/chunks/0839da55707f7c4cf780.js +1 -0
- package/assets/esri/core/workers/chunks/0b1454a77a6a682541dc.js +2 -0
- package/assets/esri/core/workers/chunks/{d82b543c96f09ded3bf9.js.LICENSE.txt → 0b1454a77a6a682541dc.js.LICENSE.txt} +6 -1
- package/assets/esri/core/workers/chunks/0c00e5e4bd18467bcecd.js +1 -0
- package/assets/esri/core/workers/chunks/{478879ba965798f61bf3.js → 0d96e39380fd84cea9ba.js} +1 -1
- package/assets/esri/core/workers/chunks/0dad0bca8d58b2c63d22.js +1 -0
- package/assets/esri/core/workers/chunks/0ef93722524620023f69.js +1 -0
- package/assets/esri/core/workers/chunks/{03e20ac54d6f141b5001.js → 11241781baaed346af52.js} +1 -1
- package/assets/esri/core/workers/chunks/127cd8fee3717a473fc5.js +1 -0
- package/assets/esri/core/workers/chunks/1286f41f245ef22b3a26.js +1 -0
- package/assets/esri/core/workers/chunks/161d60fdac2013c15543.js +1 -0
- package/assets/esri/core/workers/chunks/1661684357912726a72a.js +1 -0
- package/assets/esri/core/workers/chunks/168de44a789d1cecc1f8.js +1 -0
- package/assets/esri/core/workers/chunks/1961b59756933e0a82f2.js +1 -0
- package/assets/esri/core/workers/chunks/1c7183551f5269bdcf13.js +30 -0
- package/assets/esri/core/workers/chunks/1d9560eb8b21b9e76616.js +1 -0
- package/assets/esri/core/workers/chunks/1d9d7915cf7449e5d468.js +1 -0
- package/assets/esri/core/workers/chunks/{b364ec104dd59faa41b6.js → 1f82a0f134ea912fc686.js} +1 -1
- package/assets/esri/core/workers/chunks/1f85646936200a399c15.js +1 -0
- package/assets/esri/core/workers/chunks/2171aaa147aa4d9fc5b5.js +1 -0
- package/assets/esri/core/workers/chunks/235cb82952a18ff8d206.js +1 -0
- package/assets/esri/core/workers/chunks/260d4571722cb1ff1366.js +1 -0
- package/assets/esri/core/workers/chunks/266ba61b72a278d93a26.js +1 -0
- package/assets/esri/core/workers/chunks/27b80c386cebadcaca3c.js +1 -0
- package/assets/esri/core/workers/chunks/29d3890a5a43d934067a.js +1 -0
- package/assets/esri/core/workers/chunks/{333a0038d782d8a34d58.js → 2abf124e2956e4f76688.js} +1 -1
- package/assets/esri/core/workers/chunks/2f17438d215bea3ce70f.js +1 -0
- package/assets/esri/core/workers/chunks/30e710ec4d22c43d4e7e.js +1 -0
- package/assets/esri/core/workers/chunks/356cb86606b8c674f947.js +1 -0
- package/assets/esri/core/workers/chunks/3697e51e1e4cf442f39a.js +1 -0
- package/assets/esri/core/workers/chunks/398e0dd2bc7e1ab84831.js +1 -0
- package/assets/esri/core/workers/chunks/3a58708217a9c11836ab.js +1 -0
- package/assets/esri/core/workers/chunks/3b1052aa30af3f6186cc.js +1 -0
- package/assets/esri/core/workers/chunks/3bbf684ee2484eb44c9f.js +1 -0
- package/assets/esri/core/workers/chunks/3cd9bd20e75ba4d5b294.js +1 -0
- package/assets/esri/core/workers/chunks/3e87e3ad857d72f6ecbb.js +1 -0
- package/assets/esri/core/workers/chunks/3ea5a18b264628dc37f0.js +1 -0
- package/assets/esri/core/workers/chunks/41809c16544ec25120fa.js +1 -0
- package/assets/esri/core/workers/chunks/41913575dd45c65d645e.js +1 -0
- package/assets/esri/core/workers/chunks/427dec43ef2d67467699.js +1 -0
- package/assets/esri/core/workers/chunks/42e483fde18f12da32a6.js +1 -0
- package/assets/esri/core/workers/chunks/43ab44d37bc0ea97ef98.js +1 -0
- package/assets/esri/core/workers/chunks/{746b3e98bad32c366a27.js → 444f0f51b3ee0b9845a5.js} +1 -1
- package/assets/esri/core/workers/chunks/46e622857ba92a72a317.js +1 -0
- package/assets/esri/core/workers/chunks/47f2113357b2aa4f4f37.js +1 -0
- package/assets/esri/core/workers/chunks/488ed9584b527ec47be3.js +1 -0
- package/assets/esri/core/workers/chunks/4ad32580e0c0699fde1f.js +1 -0
- package/assets/esri/core/workers/chunks/4d0f793dee4ad919221b.js +1 -0
- package/assets/esri/core/workers/chunks/{f209a7076d67cbf4d205.js → 4e676e888a935c507d90.js} +1 -1
- package/assets/esri/core/workers/chunks/4eed175277eb0df3c821.js +1 -0
- package/assets/esri/core/workers/chunks/50d5d6654ada9f28345d.js +1 -0
- package/assets/esri/core/workers/chunks/54c6e870262469d0d702.js +1 -0
- package/assets/esri/core/workers/chunks/54d07eadf113f0e4e506.js +1 -0
- package/assets/esri/core/workers/chunks/54ed37ec9682ea739deb.js +1 -0
- package/assets/esri/core/workers/chunks/55369c5bd65bcaf78da1.js +1 -0
- package/assets/esri/core/workers/chunks/56fd3da911c2c4511e5d.js +1 -0
- package/assets/esri/core/workers/chunks/58c79e15ca95238a4b43.js +1 -0
- package/assets/esri/core/workers/chunks/59592bb25f226865e88a.js +1 -0
- package/assets/esri/core/workers/chunks/5a4d7ba6dc1d4b41d80d.js +1 -0
- package/assets/esri/core/workers/chunks/5d55b4449bcb24cd72b6.js +1 -0
- package/assets/esri/core/workers/chunks/5d8fe41a3c06ddb4094b.js +1 -0
- package/assets/esri/core/workers/chunks/5ef37f37e405b3bb5450.js +1 -0
- package/assets/esri/core/workers/chunks/608d707fd9d9f9088473.js +1 -0
- package/assets/esri/core/workers/chunks/61ef14e42bc09b787d89.js +1 -0
- package/assets/esri/core/workers/chunks/628f56c09838eb9c573b.js +1 -0
- package/assets/esri/core/workers/chunks/656d6963e8f837fbf28f.js +1 -0
- package/assets/esri/core/workers/chunks/68b47a5a50e0b5fffca2.js +1 -0
- package/assets/esri/core/workers/chunks/6a0352d20596ca3f4b64.js +1 -0
- package/assets/esri/core/workers/chunks/6c7ff968bd4fc816442d.js +1 -0
- package/assets/esri/core/workers/chunks/6dac8dfcd63fc757ae2d.js +1 -0
- package/assets/esri/core/workers/chunks/6e526c06825ecc6c99c0.js +1 -0
- package/assets/esri/core/workers/chunks/6e70e922331704b92a08.js +1 -0
- package/assets/esri/core/workers/chunks/6ea8b0d68881d16a2432.js +1 -0
- package/assets/esri/core/workers/chunks/6f67c9f68101a084b683.js +30 -0
- package/assets/esri/core/workers/chunks/6f9ea461c268c421f9c9.js +1 -0
- package/assets/esri/core/workers/chunks/7027d93dc5a4595d70c6.js +1 -0
- package/assets/esri/core/workers/chunks/70b35b2446558d5280e3.js +1 -0
- package/assets/esri/core/workers/chunks/728ad5bbbcbf88d6249f.js +1 -0
- package/assets/esri/core/workers/chunks/7349cb45a93e6916f115.js +1 -0
- package/assets/esri/core/workers/chunks/74be994d789c57031631.js +1 -0
- package/assets/esri/core/workers/chunks/751609831b283903ba48.js +1 -0
- package/assets/esri/core/workers/chunks/76edaeaf8fe344bb77a8.js +1 -0
- package/assets/esri/core/workers/chunks/76fe5b821d6b54db5721.js +1 -0
- package/assets/esri/core/workers/chunks/7bacdd65a6cc4d284e0a.js +2 -0
- package/assets/esri/core/workers/chunks/7c7c11c0fde8b63e330b.js +1 -0
- package/assets/esri/core/workers/chunks/7e6ccf9f3e756186e93e.js +1 -0
- package/assets/esri/core/workers/chunks/81d30c9062ad0120a863.js +1 -0
- package/assets/esri/core/workers/chunks/824051af00e7a1f05ed0.js +1 -0
- package/assets/esri/core/workers/chunks/84772b023d04e415f17f.js +1 -0
- package/assets/esri/core/workers/chunks/85edbb072a2ce6c1bb30.js +2 -0
- package/assets/esri/core/workers/chunks/{2d2c10c31cc1460dd96a.js → 88827e23f8938342781c.js} +1 -1
- package/assets/esri/core/workers/chunks/88b480a1d1fb01778798.js +267 -0
- package/assets/esri/core/workers/chunks/88c5f7c712c6b89b5109.js +1 -0
- package/assets/esri/core/workers/chunks/88e469b82d2594f23649.js +1 -0
- package/assets/esri/core/workers/chunks/8a14e3db28c403b046cf.js +1 -0
- package/assets/esri/core/workers/chunks/8a48a6760c33ed50b650.js +1 -0
- package/assets/esri/core/workers/chunks/8a664451845a47048859.js +1 -0
- package/assets/esri/core/workers/chunks/8a8242e7cc7e6a9e7876.js +1 -0
- package/assets/esri/core/workers/chunks/8acee3fba488f202f82f.js +1 -0
- package/assets/esri/core/workers/chunks/8b73f4d2f99c0b54cced.js +1 -0
- package/assets/esri/core/workers/chunks/91a0227a64a944af3286.js +596 -0
- package/assets/esri/core/workers/chunks/943cf0653a2b7de16a4f.js +1 -0
- package/assets/esri/core/workers/chunks/9444ed8ea117861ae89b.js +1 -0
- package/assets/esri/core/workers/chunks/9482a6d7baa24bbf5693.js +1 -0
- package/assets/esri/core/workers/chunks/96bba4d93a32ad34a1c8.js +1 -0
- package/assets/esri/core/workers/chunks/9a38fd68b02b617c45d3.js +1 -0
- package/assets/esri/core/workers/chunks/{e0a63b5861e8c975097e.js → 9aaf78b831f8739bc127.js} +1 -1
- package/assets/esri/core/workers/chunks/{4d378d4e021a33b0047e.js → 9be4438ce2c7180adadf.js} +1 -1
- package/assets/esri/core/workers/chunks/9d434360dfce1e49b7b9.js +1 -0
- package/assets/esri/core/workers/chunks/9f4b97204def91567e3c.js +1 -0
- package/assets/esri/core/workers/chunks/a169d9fe66b5865911d9.js +1 -0
- package/assets/esri/core/workers/chunks/a37c28e3c4a2be9fd1d5.js +1 -0
- package/assets/esri/core/workers/chunks/a37fc886227365f7ecd5.js +1 -0
- package/assets/esri/core/workers/chunks/a5d8d6f3c0c8de474efd.js +1 -0
- package/assets/esri/core/workers/chunks/a65d576e90179a2b5400.js +1 -0
- package/assets/esri/core/workers/chunks/a8d7f59927bdad564141.js +1 -0
- package/assets/esri/core/workers/chunks/{678c9f15712cf3d3bb9e.js → aa1a3a849aba84cf585b.js} +1 -1
- package/assets/esri/core/workers/chunks/abc06d10c7ac8ba5b0e4.js +1 -0
- package/assets/esri/core/workers/chunks/abe22ae8ee0dcc9efbb7.js +1 -0
- package/assets/esri/core/workers/chunks/ae0a572cbbdd9815ee2e.js +1 -0
- package/assets/esri/core/workers/chunks/af5db0372d526e592fcc.js +1 -0
- package/assets/esri/core/workers/chunks/b1a21a4d7d73ad7d0e47.js +1 -0
- package/assets/esri/core/workers/chunks/b2983f521d8c96becd8a.js +1 -0
- package/assets/esri/core/workers/chunks/{915a5e8aecf25f3bc72b.js → b475f5492c6e3fd4cca8.js} +1 -1
- package/assets/esri/core/workers/chunks/b495f14d90abe8d1a558.js +1 -0
- package/assets/esri/core/workers/chunks/{f11ea0d3de93ec0392af.js → b54b7cc6b23a70fed700.js} +1 -1
- package/assets/esri/core/workers/chunks/b702279c48f3009f6dd8.js +1 -0
- package/assets/esri/core/workers/chunks/b79058f5bda6fcac22f8.js +1 -0
- package/assets/esri/core/workers/chunks/b801631b58e6fc6cec8a.js +1 -0
- package/assets/esri/core/workers/chunks/b92794def31592a6a25f.js +1 -0
- package/assets/esri/core/workers/chunks/bc53ce9a643f82d516c2.js +1 -0
- package/assets/esri/core/workers/chunks/be1d6a571f76933dfbb0.js +1 -0
- package/assets/esri/core/workers/chunks/bea70be8e38b8c83ccd2.js +1 -0
- package/assets/esri/core/workers/chunks/bfcdc5c315131aae34d8.js +1 -0
- package/assets/esri/core/workers/chunks/c0f624a2ca0d07ef8f8c.js +1 -0
- package/assets/esri/core/workers/chunks/c1189316d24fb4cdb2a0.js +1 -0
- package/assets/esri/core/workers/chunks/c1838822b096d5f36a8b.js +1 -0
- package/assets/esri/core/workers/chunks/c3381b9a36299210ee47.js +1 -0
- package/assets/esri/core/workers/chunks/c46a4adea39636a96d03.js +1 -0
- package/assets/esri/core/workers/chunks/{c2882a9e67124b7c18be.js → c503c79ba5761f7abbeb.js} +1 -1
- package/assets/esri/core/workers/chunks/c6030271bd6d39b6e1db.js +1 -0
- package/assets/esri/core/workers/chunks/c9065cee85eb8dde6a42.js +1 -0
- package/assets/esri/core/workers/chunks/c961aff385e38b081204.js +1 -0
- package/assets/esri/core/workers/chunks/cb5e4b9b4a59c2622eb5.js +1 -0
- package/assets/esri/core/workers/chunks/cca095f0c623e037002d.js +1 -0
- package/assets/esri/core/workers/chunks/ce2aa75e084ee56f5e29.js +1 -0
- package/assets/esri/core/workers/chunks/cf826787ab8d4b27ad80.js +1 -0
- package/assets/esri/core/workers/chunks/d05a7ce6c1d4b883ed4c.js +30 -0
- package/assets/esri/core/workers/chunks/d201a5dff18a5bb467ab.js +1 -0
- package/assets/esri/core/workers/chunks/d2aa75816e84b1e7fd25.js +1 -0
- package/assets/esri/core/workers/chunks/d4a9eb4470cc6a1f67fc.js +2 -0
- package/assets/esri/core/workers/chunks/{8ccf2f65d8ed3c48ffff.js → d950d5c2844206502ff0.js} +1 -1
- package/assets/esri/core/workers/chunks/db3c484bfa607dec6050.js +1 -0
- package/assets/esri/core/workers/chunks/db588bf3256e95c977b7.js +1 -0
- package/assets/esri/core/workers/chunks/dbc9249dae41096d750d.js +1 -0
- package/assets/esri/core/workers/chunks/dcc719e15b2e0cce1f3b.js +1 -0
- package/assets/esri/core/workers/chunks/{6bb090f3e5c18604cb39.js → dd5b362bded458afa2d6.js} +1 -1
- package/assets/esri/core/workers/chunks/de583214195eff13cb00.js +1140 -0
- package/assets/esri/core/workers/chunks/dec6d41d614105e6fd93.js +1 -0
- package/assets/esri/core/workers/chunks/df8143b72ef94806c992.js +1 -0
- package/assets/esri/core/workers/chunks/dfdd474fddcd1d6091ce.js +1 -0
- package/assets/esri/core/workers/chunks/e0b47b08ae2c36c76fa2.js +1 -0
- package/assets/esri/core/workers/chunks/e235ea4293d5d463acfb.js +1 -0
- package/assets/esri/core/workers/chunks/e43486113aaf72ac4dc1.js +1 -0
- package/assets/esri/core/workers/chunks/ea4c3393c5757e309a71.js +1 -0
- package/assets/esri/core/workers/chunks/ed216ddeb7f59f510bd0.js +1 -0
- package/assets/esri/core/workers/chunks/ef8886dff54063928bcb.js +1 -0
- package/assets/esri/core/workers/chunks/f05932aea4eb267cba4d.js +1 -0
- package/assets/esri/core/workers/chunks/f09a41ad239d467d9438.js +2 -0
- package/assets/esri/core/workers/chunks/f1673e723b336204ad77.js +1 -0
- package/assets/esri/core/workers/chunks/f5223ffb3be548c9b0a1.js +1 -0
- package/assets/esri/core/workers/chunks/f52443cd203e687551da.js +1 -0
- package/assets/esri/core/workers/chunks/f6912532aae1638cbe8f.js +1 -0
- package/assets/esri/core/workers/chunks/fae147d03ed723ab234d.js +1 -0
- package/assets/esri/core/workers/chunks/ffcd4fca7f67e1f943f1.js +1 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/CheckerBoard.glsl.js +3 -5
- package/chunks/ColorMaterial.glsl.js +4 -6
- package/chunks/ComponentShader.glsl.js +42 -44
- package/chunks/DefaultMaterial.glsl.js +21 -23
- package/chunks/EdgeShader.glsl.js +9 -11
- package/chunks/GaussianSplat.glsl.js +8 -8
- package/chunks/ImageMaterial.glsl.js +5 -7
- package/chunks/LineCallout.glsl.js +9 -12
- package/chunks/LineMarker.glsl.js +24 -26
- package/chunks/OITDim.glsl.js +3 -4
- package/chunks/Path.glsl.js +15 -17
- package/chunks/Pattern.glsl.js +25 -27
- package/chunks/RealisticTree.glsl.js +11 -13
- package/chunks/RibbonLine.glsl.js +42 -45
- package/chunks/ShadedColorMaterial.glsl.js +8 -9
- package/chunks/Water.glsl.js +18 -20
- package/config.js +1 -1
- package/core/workers/WorkerHandle.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/support/DoubleArray.js +1 -1
- package/geometry/support/triangulationUtilsDeprecated.js +1 -1
- package/kernel.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/graphics/FlatFeature.js +1 -1
- package/layers/graphics/FlatFeatureSet.js +1 -1
- package/layers/graphics/OptimizedFeature.js +1 -1
- package/layers/graphics/data/AttributesBuilder.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/data/flatFeatureQueryEngineAdapter.js +1 -1
- package/layers/graphics/data/optimizedFeatureQueryEngineAdapter.js +1 -1
- package/layers/graphics/featureConversionUtils.js +1 -1
- package/layers/support/LabelClass.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/layers/support/labelUtils.js +1 -1
- package/layers/video/videoUtils.js +1 -1
- package/package.json +3 -3
- package/popup/Feature.d.ts +2 -0
- package/popup/Feature.js +1 -1
- package/popup/actions.js +1 -1
- package/popupTemplateUtils.js +2 -0
- package/renderers/visualVariables/SizeVariable.js +1 -1
- package/renderers/visualVariables/support/sizeVariableUtils.js +1 -1
- package/rest/query/operations/pbfFeatureServiceParser.js +1 -1
- package/rest/support/OutDistance.js +2 -0
- package/rest/support/Query.js +1 -1
- package/smartMapping/statistics/support/utils.js +1 -1
- package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
- package/support/arcadeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/ImageryLayerView2D.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryView2D.js +1 -1
- package/views/2d/layers/imagery/VectorFieldView2D.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementController.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
- package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshNormals.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/StreamLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/featureExpressionInfoUtils.js +1 -1
- package/views/3d/layers/graphics/polygonUtils.js +1 -1
- package/views/3d/layers/graphics/tessellationUtils.js +1 -1
- package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/support/renderInfoUtils/polygon.js +1 -1
- package/views/3d/support/renderInfoUtils/polygonDeprecated.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialGlobalParameters.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +20 -32
- package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +5 -3
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/EmissionDimming.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/Compositor.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.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/SamplerRepository.js +2 -0
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShader.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCalloutTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/ViewAnimation.d.ts +2 -21
- package/views/interactive/tooltip/content/TooltipContent.js +1 -1
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/views/support/rasterHitTestUtils.js +2 -0
- package/views/video/VideoOperationalDataView.js +1 -1
- package/views/webgl/Sampler.js +1 -1
- package/views/webgl/ShaderBuilder.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +19 -3
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable/VisibleElements.d.ts +15 -1
- package/widgets/FeatureTable/VisibleElements.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/FeatureTable.d.ts +15 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/support/widgetUtils.js +1 -1
- package/assets/esri/core/workers/chunks/01be1315c60810651783.js +0 -1
- package/assets/esri/core/workers/chunks/0dd12d6af0cf7707109c.js +0 -2
- package/assets/esri/core/workers/chunks/0e2e4cb34ac6aac88ebf.js +0 -1
- package/assets/esri/core/workers/chunks/155f57fe9886ef322e2a.js +0 -1
- package/assets/esri/core/workers/chunks/170f4d83555d238e365b.js +0 -1
- package/assets/esri/core/workers/chunks/171cca726a763c770469.js +0 -1
- package/assets/esri/core/workers/chunks/1761dc5799850ca7b66c.js +0 -1
- package/assets/esri/core/workers/chunks/17d54e77001ccb48a258.js +0 -1
- package/assets/esri/core/workers/chunks/19afacc9a741038e4bfb.js +0 -1
- package/assets/esri/core/workers/chunks/1a198c9e17f7a058669e.js +0 -1
- package/assets/esri/core/workers/chunks/1ae4e43a399e1974f106.js +0 -1
- package/assets/esri/core/workers/chunks/1c742bfe3b0aa51823d1.js +0 -1
- package/assets/esri/core/workers/chunks/1d8777266fb1c5cfca55.js +0 -1
- package/assets/esri/core/workers/chunks/1f76c06af4682c85bc21.js +0 -1
- package/assets/esri/core/workers/chunks/205e957ffd7e95f530f7.js +0 -1
- package/assets/esri/core/workers/chunks/20e715e3aeb1c3265901.js +0 -1
- package/assets/esri/core/workers/chunks/210629f3c28d4339c655.js +0 -1
- package/assets/esri/core/workers/chunks/21a8e2a11ffacc226e2b.js +0 -1
- package/assets/esri/core/workers/chunks/27643750dce502fedef3.js +0 -1
- package/assets/esri/core/workers/chunks/29b1a4ce7646b403008e.js +0 -1
- package/assets/esri/core/workers/chunks/2a65bbe6c63c384cbf5f.js +0 -1
- package/assets/esri/core/workers/chunks/2fa69ca3ba8c442dd7d6.js +0 -1
- package/assets/esri/core/workers/chunks/314140e2e9b813191907.js +0 -1
- package/assets/esri/core/workers/chunks/3158a3487d3e8a61b680.js +0 -1
- package/assets/esri/core/workers/chunks/35217befc8f9882d139e.js +0 -1
- package/assets/esri/core/workers/chunks/38328a785365c4783b1e.js +0 -1
- package/assets/esri/core/workers/chunks/3a2ecb883fdb5c598544.js +0 -30
- package/assets/esri/core/workers/chunks/3eef3c2e94aa2a00d76a.js +0 -1
- package/assets/esri/core/workers/chunks/40d6ad030614099155cd.js +0 -1414
- package/assets/esri/core/workers/chunks/41396724040180d2537f.js +0 -1
- package/assets/esri/core/workers/chunks/41e59d75ccb51a238739.js +0 -1
- package/assets/esri/core/workers/chunks/44016e1176629c36bc11.js +0 -1
- package/assets/esri/core/workers/chunks/453280ea87a696a4df81.js +0 -1
- package/assets/esri/core/workers/chunks/499b899bf88aaf29230d.js +0 -1
- package/assets/esri/core/workers/chunks/4b0d6309abf273f1f79f.js +0 -1
- package/assets/esri/core/workers/chunks/4e07827ab870c65377d3.js +0 -1
- package/assets/esri/core/workers/chunks/51852ef71ac04954fdae.js +0 -1
- package/assets/esri/core/workers/chunks/53b797e384be9628fc94.js +0 -1
- package/assets/esri/core/workers/chunks/549a51dedcc49f366e53.js +0 -1
- package/assets/esri/core/workers/chunks/54c0306082d30d59cba2.js +0 -1
- package/assets/esri/core/workers/chunks/56c7d7c7217557375fb6.js +0 -1
- package/assets/esri/core/workers/chunks/57cdd5d4ae073d5ca725.js +0 -1
- package/assets/esri/core/workers/chunks/5a1d975b3e9e6b7eff67.js +0 -1
- package/assets/esri/core/workers/chunks/5b9257c5359fa05f4f28.js +0 -1
- package/assets/esri/core/workers/chunks/5d574079f0e96e883aab.js +0 -1
- package/assets/esri/core/workers/chunks/5d967bcf71c05ddb1ab6.js +0 -1
- package/assets/esri/core/workers/chunks/5f6942ac94acd7842926.js +0 -1
- package/assets/esri/core/workers/chunks/60d0f8a949b130baff81.js +0 -1
- package/assets/esri/core/workers/chunks/61778185d702da468b00.js +0 -1
- package/assets/esri/core/workers/chunks/61b49cdaf288f36f9288.js +0 -1
- package/assets/esri/core/workers/chunks/621ea864e2774f160d1c.js +0 -1
- package/assets/esri/core/workers/chunks/679086351352756b33c9.js +0 -1
- package/assets/esri/core/workers/chunks/681e97ebbf9c69c410c6.js +0 -1
- package/assets/esri/core/workers/chunks/69644b8a6ce340ca1159.js +0 -1
- package/assets/esri/core/workers/chunks/6a567755b67c06d16f21.js +0 -1
- package/assets/esri/core/workers/chunks/6e7bb6d3e739527116a4.js +0 -1
- package/assets/esri/core/workers/chunks/70263c2182dc43046742.js +0 -1
- package/assets/esri/core/workers/chunks/71326d16b5cc35c3ff7f.js +0 -1
- package/assets/esri/core/workers/chunks/73a045061e69a22b6869.js +0 -1
- package/assets/esri/core/workers/chunks/73e000cc3c4da10e9937.js +0 -1
- package/assets/esri/core/workers/chunks/75669912cddcb5db52c8.js +0 -1
- package/assets/esri/core/workers/chunks/78fbfc03d9b827c3f767.js +0 -1
- package/assets/esri/core/workers/chunks/7d0350f459844162d3a7.js +0 -1
- package/assets/esri/core/workers/chunks/7e39e9d4d68843b60e4c.js +0 -1
- package/assets/esri/core/workers/chunks/823127b23bec07e1f9d0.js +0 -2
- package/assets/esri/core/workers/chunks/84eb889b9cce35dac2e5.js +0 -1
- package/assets/esri/core/workers/chunks/854fe80272b59fafc2e9.js +0 -1
- package/assets/esri/core/workers/chunks/861817be5e050e9522ab.js +0 -1
- package/assets/esri/core/workers/chunks/888f6387e795d45a7ad3.js +0 -2
- package/assets/esri/core/workers/chunks/891d97d0da6361d63679.js +0 -1
- package/assets/esri/core/workers/chunks/8969788c57bcc11bf77b.js +0 -1
- package/assets/esri/core/workers/chunks/8d6da6573d07385f4ed5.js +0 -1
- package/assets/esri/core/workers/chunks/8ede12f54b215c52cf3c.js +0 -1
- package/assets/esri/core/workers/chunks/8fb336c2066113300d0d.js +0 -1
- package/assets/esri/core/workers/chunks/8fed6becd107d2ed9bbd.js +0 -1
- package/assets/esri/core/workers/chunks/97062996e1e4196cfa7c.js +0 -1
- package/assets/esri/core/workers/chunks/97210bcb5e3cf3ac961b.js +0 -1
- package/assets/esri/core/workers/chunks/9a235c92f21df2c17aa8.js +0 -1
- package/assets/esri/core/workers/chunks/9c819ebdc98ed8b6afcf.js +0 -1
- package/assets/esri/core/workers/chunks/9d7ffd83f69d6e639f09.js +0 -1
- package/assets/esri/core/workers/chunks/9dfd00972c12a4adc15d.js +0 -1
- package/assets/esri/core/workers/chunks/9f1f5fb648302c43ad12.js +0 -1
- package/assets/esri/core/workers/chunks/9fab410b9fa668dc498b.js +0 -1
- package/assets/esri/core/workers/chunks/a061a17b62686f945e81.js +0 -1
- package/assets/esri/core/workers/chunks/a30815a0155a3b8790b4.js +0 -1
- package/assets/esri/core/workers/chunks/a43decc8ede8b4910553.js +0 -1
- package/assets/esri/core/workers/chunks/a462aa1c7b68efad6906.js +0 -1
- package/assets/esri/core/workers/chunks/a4b6fdbc995be03d2afb.js +0 -1
- package/assets/esri/core/workers/chunks/a520f83ae0c3c3e78858.js +0 -1
- package/assets/esri/core/workers/chunks/a5d9dbb1fef8c4465943.js +0 -1
- package/assets/esri/core/workers/chunks/a73e8b80760dc88f926f.js +0 -1
- package/assets/esri/core/workers/chunks/a96692514dcaa50340dd.js +0 -1
- package/assets/esri/core/workers/chunks/aa7aaeae31ddb259e55e.js +0 -1
- package/assets/esri/core/workers/chunks/b014f0b2385dc82dc683.js +0 -2
- package/assets/esri/core/workers/chunks/b2120c4c56656be941ae.js +0 -1
- package/assets/esri/core/workers/chunks/b3950d5f1f3352521504.js +0 -1
- package/assets/esri/core/workers/chunks/b3f0600729227b458a75.js +0 -1
- package/assets/esri/core/workers/chunks/b8005b1996f42dee8237.js +0 -1
- package/assets/esri/core/workers/chunks/b85c9ceeece1bae67a16.js +0 -1
- package/assets/esri/core/workers/chunks/b8a11d32a4847513619b.js +0 -1
- package/assets/esri/core/workers/chunks/b8acb6c2538053c01cc6.js +0 -1
- package/assets/esri/core/workers/chunks/b8e85b7d5eed6e7c79b5.js +0 -1
- package/assets/esri/core/workers/chunks/bbaf1d9835671c0165ca.js +0 -1
- package/assets/esri/core/workers/chunks/bbdf27bc34fadbe8e6fe.js +0 -1
- package/assets/esri/core/workers/chunks/bc2c7cb99e227ddbd3a6.js +0 -1
- package/assets/esri/core/workers/chunks/bc85bb82cfcbc216fa31.js +0 -1
- package/assets/esri/core/workers/chunks/bcefdf9753d9d2f6f1be.js +0 -1
- package/assets/esri/core/workers/chunks/be42fe0b7ba0e27030b2.js +0 -1
- package/assets/esri/core/workers/chunks/be4d13088a557b7de4b1.js +0 -1
- package/assets/esri/core/workers/chunks/be61ea8e1883b915bbb1.js +0 -1
- package/assets/esri/core/workers/chunks/bf758d57091fa534c1f8.js +0 -1
- package/assets/esri/core/workers/chunks/bfd516c37fb717e14d71.js +0 -1
- package/assets/esri/core/workers/chunks/c22945637a40355fbe61.js +0 -1
- package/assets/esri/core/workers/chunks/c25a58d9f94aaa96957d.js +0 -1
- package/assets/esri/core/workers/chunks/c6a43f748dbf8bac4bb5.js +0 -1
- package/assets/esri/core/workers/chunks/c79827f879d1d58d3f1b.js +0 -1
- package/assets/esri/core/workers/chunks/c7ca47f5d4b2f3885239.js +0 -1
- package/assets/esri/core/workers/chunks/cb903ccbce87172a0757.js +0 -1
- package/assets/esri/core/workers/chunks/cda2e445eb2ac269abdf.js +0 -1
- package/assets/esri/core/workers/chunks/d024278a1c2aa7d22be3.js +0 -1
- package/assets/esri/core/workers/chunks/d264aed5dbe09e34040f.js +0 -1
- package/assets/esri/core/workers/chunks/d315098b038a96084ff5.js +0 -1
- package/assets/esri/core/workers/chunks/d4e55eb75fa4d3ac1e84.js +0 -1
- package/assets/esri/core/workers/chunks/d5c7ebfd5c2ca635a7a8.js +0 -1
- package/assets/esri/core/workers/chunks/d635f97b7b82a37482d6.js +0 -1
- package/assets/esri/core/workers/chunks/d7b92bd9198dd3b27eb5.js +0 -1
- package/assets/esri/core/workers/chunks/d816d1a4220d827faf63.js +0 -1
- package/assets/esri/core/workers/chunks/d82b543c96f09ded3bf9.js +0 -2
- package/assets/esri/core/workers/chunks/d8dde0d1759e009b8373.js +0 -1
- package/assets/esri/core/workers/chunks/da0a61f73d45ea9e71fc.js +0 -1
- package/assets/esri/core/workers/chunks/e305ced975d885c28e7e.js +0 -1
- package/assets/esri/core/workers/chunks/e3a73d9acebccd3ba49b.js +0 -1
- package/assets/esri/core/workers/chunks/e3c60b7df2740e600066.js +0 -1
- package/assets/esri/core/workers/chunks/e5801b0f3893d4d4f5b0.js +0 -1
- package/assets/esri/core/workers/chunks/e59f5dc8c85bcea66e98.js +0 -1
- package/assets/esri/core/workers/chunks/e611cd03eee4fae7c413.js +0 -1
- package/assets/esri/core/workers/chunks/e62d08f5488a74cbda82.js +0 -1
- package/assets/esri/core/workers/chunks/e64a92b6f4075616f40f.js +0 -1
- package/assets/esri/core/workers/chunks/e67bdd8bf38ebe89a344.js +0 -1
- package/assets/esri/core/workers/chunks/e78b442417f6a903b9b1.js +0 -1
- package/assets/esri/core/workers/chunks/e9dd60d0220036545ebb.js +0 -1
- package/assets/esri/core/workers/chunks/ea6d3b7c7d720aa7bc94.js +0 -1
- package/assets/esri/core/workers/chunks/edc2e87968c958bc852b.js +0 -1
- package/assets/esri/core/workers/chunks/ef0fe4e1a9e960a74c60.js +0 -1
- package/assets/esri/core/workers/chunks/ef9d74f8d5a502fda809.js +0 -1
- package/assets/esri/core/workers/chunks/efbbcf467b2a27a92b85.js +0 -1
- package/assets/esri/core/workers/chunks/f09446b9ff937a84d6d3.js +0 -1
- package/assets/esri/core/workers/chunks/f0bc5e8e44d53b73d431.js +0 -1
- package/assets/esri/core/workers/chunks/f201edf9b68717a6106d.js +0 -1
- package/assets/esri/core/workers/chunks/f59f1db572be1f19887f.js +0 -1
- package/assets/esri/core/workers/chunks/f9cde38cb56c547e87e5.js +0 -1
- package/assets/esri/core/workers/chunks/fb9a889ec9fd23739a14.js +0 -1
- package/assets/esri/core/workers/chunks/fc64ae69581e4c38fa8a.js +0 -1
- package/assets/esri/core/workers/chunks/fd6bbe47773bbd9f7dd9.js +0 -1
- package/assets/esri/core/workers/chunks/fe1b67ab7748a3aef231.js +0 -1
- package/assets/esri/core/workers/chunks/fe3b42eadcdd9ba54f05.js +0 -1
- package/chunks/HUDCompositing.glsl.js +0 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassGeometryTest.glsl.js +0 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js +0 -8
- package/views/3d/webgl-engine/effects/fboFormatUtils.js +0 -2
- package/views/3d/webgl-engine/shaders/HUDCompositing.glsl.js +0 -2
- package/views/3d/webgl-engine/shaders/HUDCompositingTechnique.js +0 -2
- /package/assets/esri/core/workers/chunks/{0dd12d6af0cf7707109c.js.LICENSE.txt → 7bacdd65a6cc4d284e0a.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{823127b23bec07e1f9d0.js.LICENSE.txt → 85edbb072a2ce6c1bb30.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{888f6387e795d45a7ad3.js.LICENSE.txt → d4a9eb4470cc6a1f67fc.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{b014f0b2385dc82dc683.js.LICENSE.txt → f09a41ad239d467d9438.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../request.js";import has from"../core/has.js";import s from"../core/Logger.js";import{isAbortError as r}from"../core/promiseUtils.js";import{watch as i,initial as a}from"../core/reactiveUtils.js";import{convertTime as n}from"../core/timeUtils.js";import{property as o,subclass as l}from"../core/accessorSupport/decorators.js";import{distance as h}from"../core/libs/gl-matrix-2/math/vec3.js";import{create as d}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{renderSRFromViewSR as u}from"../geometry/support/coordinateSystem.js";import{loadVoxelWASM as _}from"../libs/vxl/VxlModule.js";import{InternalRenderCategory as c}from"../views/3d/webgl.js";import{VoxelGraphic as m}from"../views/3d/layers/VoxelGraphic.js";import{VoxelTarget as f}from"../views/3d/layers/i3s/Intersector.js";import{Frustum as p}from"../views/3d/state/Frustum.js";import{RenderCoordsHelper as g}from"../views/3d/support/RenderCoordsHelper.js";import y from"../views/3d/webgl/RenderNode.js";import{IntersectorResult as x}from"../views/3d/webgl-engine/lib/IntersectorResult.js";let v=class extends y{constructor(e){super(e),this._havePreparedWithAllLayers=!1,this.produces="disabled",this.consumes={required:[c.VOXEL]},this._vxlPromise=null,this._moreToLoad=!1,this._viewportWidth=-1,this._viewportHeight=-1,this._newLayers=[],this._layers=new Map,this._renderTargetToRestore=null,this._lastFrameWasStationary=!1,this._wasmMemBlockSizes=[512,1024,2048,4096,8192,16384,32768,65536],this._wasmMemBlocks=new Map,this._dbgFlags=new Set,this._captureFrustum=!1,this._frustum=null,this._frustumRenderableId=-1,this._renderCoordsHelper=null,this.type=9,this.slicePlaneEnabled=!0,this.isGround=!1,this.layerViewUid=[]}_dbg(e,t){this._dbgFlags.has(e)&&(4===e?s.getLogger(this).error(t):s.getLogger(this).warn(t))}initialize(){this._dbg(1,"--initialize--");for(const e of this._wasmMemBlockSizes)this._wasmMemBlocks.set(e,0);this.addHandles([i(()=>"local"===this.view.viewingMode,e=>{e?(this._dbg(1,"view switched to local view, enabling rendering"),this.produces=c.VOXEL,this.view.sceneIntersectionHelper.addIntersectionHandler(this)):(this._dbg(1,"view switched to global view, disabling rendering"),this.view.sceneIntersectionHelper.removeIntersectionHandler(this),this.produces="disabled")},a),i(()=>this.view?.qualityProfile,e=>{this._dbg(3,"qualityProfile changed to "+e),this._vxl?.set_quality(this._toWasmQuality(e))},a),i(()=>this.view?.timeExtent,()=>{if(this._vxl){const e=this._getTimeArgs(this.view?.timeExtent);this._dbg(3,"sceneView timeExtent changed to useTime="+e.hasTime+" st="+e.startTime+" et="+e.endTime),this._vxl.set_scene_time_extent(e.startTime,e.endTime,e.hasTime),this.requestRender(1)}},a),i(()=>this.view?.stationary,e=>{this._vxl&&e&&!this._lastFrameWasStationary&&this.requestRender(1)})])}get _rctx(){return this.renderContext?.rctx}get _halfIntTexturesAvailable(){return!!this._rctx?.capabilities.textureNorm16}get _textureFloatLinearAvailable(){return!!this._rctx?.capabilities.textureFloatLinear}_restoreFramebuffer(){if(!this._renderTargetToRestore||!this._rctx)return;const e=this._renderTargetToRestore.fbo;if(!!!this._rctx)return void this._dbg(4,"no context in restoreFramebuffer!");this._rctx.bindFramebuffer(e,!0);const t=this._renderTargetToRestore.viewport;this._rctx.setViewport(t.x,t.y,t.width,t.height)}_bindPreviousDepthToSlot(e,t){if(!this._rctx||!this._renderTargetToRestore)return 0;const s=this._renderTargetToRestore.fbo?.depthStencilTexture;return s?(0===t?this._rctx.bindTexture(null,e,!0):this._rctx.bindTexture(s,e,!0),1):(this._dbg(4,"no depth/stencil texture exists!"),0)}_modifyResourceCount(e,t,s){if(!this._rctx)return void this._dbg(4,"modifyAllocation callback has no rendering context!");const r=e;1===s?this._rctx.instanceCounter.increment(r,t):this._rctx.instanceCounter.decrement(r,t)}_setBlendState(e,t,s,r){this._rctx?(this._rctx.setBlendingEnabled(1===e),this._rctx.setBlendFunction(t,s),this._rctx.setBlendEquation(r)):this._dbg(4,"setBlendState callback has no rendering context!")}_setFrontFace(e){this._rctx?this._rctx.setFrontFace(e):this._dbg(4,"setFrontFace callback has no rendering context!")}_setDepthStencilStateFunction(e,t,s){this._rctx?(this._rctx.setDepthFunction(s),this._rctx.setDepthTestEnabled(1===e),this._rctx.setDepthWriteEnabled(1===t),this._rctx.setStencilTestEnabled(!1),this._rctx.setStencilFunction(519,0,255),this._rctx.setStencilOpSeparate(1028,7680,7682,7680),this._rctx.setStencilOpSeparate(1029,7680,7683,7680)):this._dbg(4,"setDepthStencilStateFunction callback has no rendering context!")}_setRasterizerState(e){if(this._rctx)switch(e){case 1:this._rctx.setFaceCullingEnabled(!1);break;case 3:this._rctx.setCullFace(1029),this._rctx.setFaceCullingEnabled(!0);break;case 2:this._rctx.setCullFace(1028),this._rctx.setFaceCullingEnabled(!0)}else this._dbg(4,"setRasterizerState callback has no rendering context!")}_setViewport(e,t,s,r){this._rctx?this._rctx.setViewport(e,t,s,r):this._dbg(4,"setViewport callback has no rendering context!")}_updateMemoryUsage(){this._layers.forEach((e,t)=>{if(e.needMemoryUsageUpdate){const s=this._vxl?.estimate_memory_usage(t)??0;s>=0&&(e.needMemoryUsageUpdate=!1,e.layerView.setUsedMemory(s))}})}_syncRequestsResponses(){this._vxl&&this._layers.forEach((e,s)=>{const i=[];e.responses.forEach((t,r)=>{i.push(r),this._dbg(2,"responding for requestID:"+r+" size:"+t.size),this._vxl?.respond(s,r,t),0!==t.requestType&&4!==t.requestType||(e.needMemoryUsageUpdate=!0)});const a=e.responses;for(const t of i)a.delete(t);const n=this._vxl.get_new_requests(s),o=e.abortController.signal;for(const l in n){e.outstandingRequestCount+=1,1===e.outstandingRequestCount&&e.layerView.updatingFlagChanged();const s=n[l],i={responseType:"array-buffer",signal:o,query:{...e.layerView.layer.customParameters,token:e.layerView.layer.apiKey}};this._dbg(2,"making requestID:"+l+" url:"+s.url),t(s.url,i).then(t=>{e.outstandingRequestCount-=1,0===e.outstandingRequestCount&&e.layerView.updatingFlagChanged(),this._dbg(2,"have response for requestID:"+l);let r=0;if(t.data.byteLength>0&&this._vxl){r=this._vxl._malloc(t.data.byteLength);const e=new Uint8Array(this._vxl.HEAPU8.buffer,r,t.data.byteLength),s=new Uint8Array(t.data);for(let r=0;r<t.data.byteLength;++r)e[r]=s[r]}a.set(+l,{responseType:s.responseType,ptr:r,size:t.data.byteLength,success:!0,requestType:s.requestType})}).catch(t=>{e.outstandingRequestCount-=1,0===e.outstandingRequestCount&&e.layerView.updatingFlagChanged(),r(t)||(this._dbg(4,`requestID:${l} failed, error=${t.toString()}`),a.set(+l,{responseType:s.responseType,ptr:0,size:0,success:!1,requestType:s.requestType}))})}})}updateWasmCamera(e){this._vxl?.set_projection_matrix.apply(this._vxl,e.projectionMatrix),this._vxl?.set_view_matrix.apply(this._vxl,e.viewMatrix),this._vxl?.set_near_far(e.near,e.far)}isUpdating(e){if(!this._vxl&&this._vxlPromise)return!0;const t=this._layers.get(e);return!!t&&t.outstandingRequestCount>0}getLayerTimes(e){const t=[];return this._vxl?(this._layers.forEach((s,r)=>{if(s.layerView.wasmLayerId===e.wasmLayerId){const s=this._vxl.get_layer_epoch_times(r,e.layer.currentVariableId);for(let e=0;e<s.length;++e)t.push(s[e])}}),t):t}getCurrentLayerTimeIndex(e){let t=0;return this._layers.forEach((s,r)=>{s.layerView.wasmLayerId===e.wasmLayerId&&(t=this._vxl?.get_layer_current_time_id(r)??0)}),t}setEnabled(e,t){this._layers.forEach((s,r)=>{s.layerView.wasmLayerId===e.wasmLayerId&&(this._vxl?.set_enabled(r,t),s.needMemoryUsageUpdate=!0,this.requestRender(1))})}setIsInScaleRange(e,t){const s=this._layers.get(e.wasmLayerId);s&&t!==s.isInScaleRange&&(s.isInScaleRange=t,this._vxl?.set_is_in_scale_range(e.wasmLayerId,t),s.needMemoryUsageUpdate=!t,this.requestRender(1))}setStaticSections(e,t){const s={mask:1,staticSections:t};return this._doMaskedUIUpdate(e,s,!0)}setCurrentVariable(e,t){const s={mask:1024,currentVariable:t};return this._doMaskedUIUpdate(e,s,!0)}setRenderMode(e,t){const s={mask:8192,renderMode:t};return this._doMaskedUIUpdate(e,s,!0)}setVerticalExaggerationAndOffset(e,t,s,r){const i={mask:256,volStyleDesc:{volumeId:t,verticalExaggeration:s,verticalOffset:r}};return this._doMaskedUIUpdate(e,i,!0)}setVariableStyles(e,t){const s={mask:32768,variableStyles:t};return this._doMaskedUIUpdate(e,s,!0)}setVolumeStyles(e,t){const s={mask:65536,volumeStyles:t};return this._doMaskedUIUpdate(e,s,!0)}setEnableDynamicSections(e,t){const s={mask:4096,containerIsVisible:t,container:1};return this._doMaskedUIUpdate(e,s,!0)}setEnableIsosurfaces(e,t){const s={mask:4096,containerIsVisible:t,container:0};return this._doMaskedUIUpdate(e,s,!0)}setEnableSections(e,t){const s={mask:4096,containerIsVisible:t,container:2};return this._doMaskedUIUpdate(e,s,!0)}setAnalysisSlice(e,t,s,r){const i={mask:131072,analysisSlice:{point:s,normal:r,enabled:t}};return this._doMaskedUIUpdate(e,i,!0)}updateLayerTimeProperties(e){if(!this._vxl)return;const t=this._layers.get(e.wasmLayerId);if(t){const s=t.layerView.layer;let r=0;s.timeOffset&&(r=n(s.timeOffset.value,s.timeOffset.unit,"seconds"));const i=this._getTimeArgs(s.timeExtent);this._vxl?.set_layer_time_properties(e.wasmLayerId,i.startTime,i.endTime,i.hasTime,s.useViewTime,r),this.requestRender(1)}}_doMaskedUIUpdate(e,t,s){if(!this._vxl)return!1;let r=!1;return this._layers.forEach((s,i)=>{if(s.layerView.wasmLayerId===e.wasmLayerId){const e={str:JSON.stringify(t),byteCount:0,ptr:0,isReusable:!1};this._allocateBlock(e)&&(r=1===this._vxl?.handle_masked_ui_update(i,e.ptr,e.byteCount),e.isReusable||this._vxl?._free(e.ptr))}}),r&&s&&this.requestRender(1),r}_addTriangleToWasmBuffer(e,t,s,r,i){return e[3*t]=s[0],e[3*t+1]=s[1],e[3*t+2]=s[2],e[3*(t+=1)]=r[0],e[3*t+1]=r[1],e[3*t+2]=r[2],e[3*(t+=1)]=i[0],e[3*t+1]=i[1],e[3*t+2]=i[2],t+=1}_addNormalToWasmBuffer(e,t,s){return e[3*t]=s[0],e[3*t+1]=s[1],e[3*t+2]=s[2],t+=1}_doCaptureFrustum(){if(!this._vxl)return;const e=36,t=e/3,s=this._vxl._malloc(3*e*Float32Array.BYTES_PER_ELEMENT),r=new Float32Array(this._vxl.HEAPF32.buffer,s,3*e),i=this._vxl._malloc(3*t*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(this._vxl.HEAPF32.buffer,i,e),n=this._frustum.points[0],o=this._frustum.points[1],l=this._frustum.points[2],h=this._frustum.points[3],d=this._frustum.points[4],u=this._frustum.points[5],_=this._frustum.points[6],c=this._frustum.points[7];let m=0,f=0;const p=this._frustum.planes[4];m=this._addTriangleToWasmBuffer(r,m,l,o,n),f=this._addNormalToWasmBuffer(a,f,p),m=this._addTriangleToWasmBuffer(r,m,n,h,l),f=this._addNormalToWasmBuffer(a,f,p);const g=this._frustum.planes[5];m=this._addTriangleToWasmBuffer(r,m,d,u,_),f=this._addNormalToWasmBuffer(a,f,g),m=this._addTriangleToWasmBuffer(r,m,_,c,d),f=this._addNormalToWasmBuffer(a,f,g);const y=this._frustum.planes[3];m=this._addTriangleToWasmBuffer(r,m,_,l,h),f=this._addNormalToWasmBuffer(a,f,y),m=this._addTriangleToWasmBuffer(r,m,h,c,_),f=this._addNormalToWasmBuffer(a,f,y);const x=this._frustum.planes[2];m=this._addTriangleToWasmBuffer(r,m,n,o,u),f=this._addNormalToWasmBuffer(a,f,x),m=this._addTriangleToWasmBuffer(r,m,u,d,n),f=this._addNormalToWasmBuffer(a,f,x);const v=this._frustum.planes[0];m=this._addTriangleToWasmBuffer(r,m,h,n,d),f=this._addNormalToWasmBuffer(a,f,v),m=this._addTriangleToWasmBuffer(r,m,d,c,h),f=this._addNormalToWasmBuffer(a,f,v);const b=this._frustum.planes[1];m=this._addTriangleToWasmBuffer(r,m,l,_,u),f=this._addNormalToWasmBuffer(a,f,b),this._addTriangleToWasmBuffer(r,m,u,o,l),this._addNormalToWasmBuffer(a,f,b),-1!==this._frustumRenderableId&&this._vxl.remove_generic_mesh(this._frustumRenderableId),this._frustumRenderableId=this._vxl.add_generic_mesh(s,3*e,i,e,255,0,0,64),this._vxl._free(s),this._vxl._free(i),this._captureFrustum=!1,this.requestRender(1)}captureFrustum(){null===this._renderCoordsHelper&&(this._renderCoordsHelper=g.create(2,u(!1,this.view.spatialReference))),null===this._frustum&&(this._frustum=new p(this._renderCoordsHelper)),this._captureFrustum=!0,this.requestRender(1)}toggleFullVolumeExtentDraw(e){this._vxl&&this._layers.forEach((t,s)=>{t.layerView.wasmLayerId===e.wasmLayerId&&(this._vxl?.toggle_full_volume_extent_draw(s),this.requestRender(1))})}dropQueryRenderTarget(){this._vxl?.drop_query_rt()}addVoxelLayer(e){if(!this._vxl){const t={layerView:e,resolveCallback:null,rejectCallback:null},s=new Promise((e,s)=>{t.resolveCallback=e,t.rejectCallback=s});return this._newLayers.push(t),s}const t=this._addVoxelLayer(e,this._vxl);return t<0?Promise.reject(-1):Promise.resolve(t)}removeVoxelLayer(e){if(!this._vxl){const t=this._newLayers.findIndex(t=>e.uid===t.layerView.uid);t>=0&&(this._newLayers[t].resolveCallback(-1),this._newLayers.splice(t,1));const s=this._newLayers.length;return 0===s&&(this._dbg(1,"No voxel layers left after removing a layer, destroying render node"),this.destroy()),s}let t=-1;this._layers.forEach((s,r)=>{if(s.layerView.wasmLayerId===e.wasmLayerId){t=r,s.abortController.abort(),this._vxl?.remove_layer(t);const i=this.layerViewUid.indexOf(e.uid);-1!==i&&this.layerViewUid.splice(i,1)}}),t>=0&&this._layers.delete(t);const s=this._layers.size;return 0===s&&(this._dbg(1,"No voxel layers left after removing a layer, destroying render node"),this.destroy()),s}_getBlockSize(e){for(const t of this._wasmMemBlockSizes)if(e<t)return t;return-1}_allocateBlock(e){if(!this._vxl)return!1;e.byteCount=this._vxl.lengthBytesUTF8(e.str)+1;const t=this._getBlockSize(e.byteCount);return t<0?(e.isReusable=!1,e.ptr=this._vxl._malloc(e.byteCount)):(e.isReusable=!0,e.ptr=this._wasmMemBlocks.get(t),0===e.ptr&&(e.ptr=this._vxl._malloc(t),this._wasmMemBlocks.set(t,e.ptr))),0!==e.ptr&&(this._vxl.stringToUTF8(e.str,e.ptr,e.byteCount),!0)}_getTimeArgs(e){let t=-Number.MAX_VALUE,s=Number.MAX_VALUE,r=!1;return null!=e&&(e.isAllTime?r=!0:(null!=e.start&&(r=!0,t=e.start.getTime()/1e3),null!=e.end&&(r=!0,s=e.end.getTime()/1e3))),{startTime:t,endTime:s,hasTime:r}}_addVoxelLayer(e,t){const r=e.layer;let i=-1;const a=r.getConfiguration();if(a.length<1)return-1;const o={str:a,byteCount:0,ptr:0,isReusable:!1};if(!this._allocateBlock(o))return-1;const l=this._getTimeArgs(r.timeExtent),h=this.view.spatialReference.isWGS84&&r.spatialReference.isWGS84?111319.49079327357:1;let d=0;if(r.timeOffset&&(d=n(r.timeOffset.value,r.timeOffset.unit,"seconds")),i=t.add_layer(r.serviceRoot,o.ptr,o.byteCount,h,h,l.startTime,l.endTime,l.hasTime,r.useViewTime,d,this._toWasmQuality(this.view.qualityProfile)),o.isReusable||t._free(o.ptr),i>=0){r.test?.constantUpscaling&&(this._setUpscalingLimits(0,.25,.25),this._setUpscalingLimits(1,.5,.5),this._setUpscalingLimits(2,.75,.75));const t=new AbortController;if(this._layers.set(i,{layerView:e,responses:new Map,outstandingRequestCount:0,abortController:t,needMemoryUsageUpdate:!1,isInScaleRange:!0}),this.layerViewUid.push(e.uid),!this._halfIntTexturesAvailable||has("mac")){const t=[];let r="";for(const s of e.layer.variables)"Int16"!==s.renderingFormat.type&&"UInt16"!==s.renderingFormat.type||(t.push(s.name),s.id===e.layer.currentVariableId&&(r=s.name));""!==r&&s.getLogger(this).error("#addVoxelLayer_error()",e.layer,`The voxel layer '${e.layer.title}' cannot render the current variable '${r}' in this browser`),t.length>0&&s.getLogger(this).warn("#addVoxelLayer_warning()",e.layer,`The voxel layer '${e.layer.title}' cannot render the variables '${t.toString()}' in this browser`)}if(!this._textureFloatLinearAvailable){const t=[];let r="";for(const s of e.layer.variables)"Float32"===s.renderingFormat.type&&(t.push(s.name),s.id===e.layer.currentVariableId&&(r=s.name));""!==r&&s.getLogger(this).error("#addVoxelLayer_error()",e.layer,`The voxel layer '${e.layer.title}' cannot render the current variable '${r}' in this browser`),t.length>0&&s.getLogger(this).warn("#addVoxelLayer_warning()",e.layer,`The voxel layer '${e.layer.title}' cannot render the variables '${t.toString()}' in this browser`)}return has("esri-mobile")&&s.getLogger(this).warnOnce("Mobile support differs across devices. Voxel layer might not display as expected."),i}return-1}_prepareRender(){if(!this._vxl)return void this._initializeWasm();const e=this.bindParameters.camera.viewForward,t=this.bindParameters.camera.eye;this._vxl.update_camera_pos_and_direction(t[0],t[1],t[2],e[0],e[1],e[2]);const s=this._vxl.cull();this._dbg(2,"missingResourceCount="+s),this._moreToLoad=s>0,this._havePreparedWithAllLayers=0===this._newLayers.length,this._updateMemoryUsage()}render(){this._prepareRender();const e=this.bindRenderTarget();if(!this._vxl||!this._rctx)return this.requestRender(1),e;for(const s of this._newLayers){const e=this._addVoxelLayer(s.layerView,this._vxl);-1===e?s.rejectCallback(-1):s.resolveCallback(e)}if(this._newLayers=[],0===this._layers.size)return this._dbg(4,"No voxel layers but RenderNode is being asked to render!"),e;this._lastFrameWasStationary=this.view.stationary,this._syncRequestsResponses(),this._beforeDraw(this._rctx),this._vxl.begin_color_frame(!this.view.stage.renderer.isFeatureEnabled(2),this.bindParameters.lighting.mainLight.direction[0],this.bindParameters.lighting.mainLight.direction[1],this.bindParameters.lighting.mainLight.direction[2]);const t=this._renderTargetToRestore.viewport;return t.width===this._viewportWidth&&t.height===this._viewportHeight||(this._viewportWidth=t.width,this._viewportHeight=t.height,this._vxl.set_viewport(t.width,t.height),this._layers.forEach(e=>e.needMemoryUsageUpdate=!0)),0===t.x&&0===t.y||this._dbg(4,"Unsupported viewport parameters detected!"),this.updateWasmCamera(this.bindParameters.camera),this._captureFrustum&&(this._frustum.update(this.bindParameters.camera),this._doCaptureFrustum()),this._vxl.draw(),this._afterDraw(this._rctx,this._vxl),(this._moreToLoad||!this._havePreparedWithAllLayers&&this._layers.size>0)&&this.requestRender(1),e}destroy(){this._dbg(1,"--destroy--"),this._vxl&&(this._layers.forEach(e=>{e.abortController.abort()}),this._wasmMemBlocks.forEach(e=>{0!==e&&this._vxl?._free(e)}),this._vxl.uninitialize_voxel_wasm(),this._vxl=null)}_initializeWasm(){if(this._vxl||this._vxlPromise||!this._rctx?.gl)return;const e=this._rctx.gl;this._vxlPromise=_(e).then(t=>{if(t.specialHTMLTargets.jsAPI3DRenderingContext=e,this._vxl=t,this._vxlPromise=null,this._newLayers.length<=0)return this._dbg(1," no voxel layers left after WASM downloaded, removing RenderNode and destroying"),void this.destroy();const s=this._getTimeArgs(this.view?.timeExtent),r=this._vxl.addFunction(this._restoreFramebuffer.bind(this),"v"),i=this._vxl.addFunction(this._setBlendState.bind(this),"viiii"),a=this._vxl.addFunction(this._setFrontFace.bind(this),"vi"),n=this._vxl.addFunction(this._setRasterizerState.bind(this),"vi"),o=this._vxl.addFunction(this._setDepthStencilStateFunction.bind(this),"viii"),l=this._vxl.addFunction(this._setViewport.bind(this),"viiii"),h=this._vxl.addFunction(this._bindPreviousDepthToSlot.bind(this),"iii"),d=this._vxl.addFunction(this._modifyResourceCount.bind(this),"viii"),u=this._halfIntTexturesAvailable&&!has("mac"),_=this._textureFloatLinearAvailable;this._vxl.initialize_voxel_wasm(r,i,a,n,o,l,h,d,s.startTime,s.endTime,s.hasTime,u,_),this.requestRender(1)}).catch(()=>{for(const e of this._newLayers)e.rejectCallback(-2);this._dbg(4," WASM failed to download, destroying render node"),this.destroy()})}pickDepth(e,t,s){if(!this._vxl||!this._rctx||0===this._layers.size)return null;const r=s.viewport[3]-t;if(e<0||e>s.viewport[2]||t<0||t>s.viewport[3])return this._dbg(4,`[js] pickDepth: outOfRange, screenXY=[${e.toFixed(0)}, ${r.toFixed(0)}]]`),null;this._beforeDraw(this._rctx);const i=s.viewForward,a=s.eye;this._vxl.update_camera_pos_and_direction(a[0],a[1],a[2],i[0],i[1],i[2]),this.updateWasmCamera(s),this._vxl.begin_frame();const n=this._vxl.pick_depth(e,r);if(this._afterDraw(this._rctx,this._vxl),n.success){return n.distanceToCamera}return null}pickObject(e,t,s,r){if(!this._vxl||!this._rctx||0===this._layers.size)return null;const i=Math.round(e),a=Math.round(t);if(i<0||i>s.viewport[2]||a<0||a>s.viewport[3])return this._dbg(4,`[js] pickObject: outOfRange, screenXY=[${i}, ${a}], vp=[${s.viewport.toString()}]`),null;this._beforeDraw(this._rctx);const n=s.viewForward,o=s.eye;this._vxl.update_camera_pos_and_direction(o[0],o[1],o[2],n[0],n[1],n[2]),this.updateWasmCamera(s),this._vxl.begin_frame();let l=null;if(0===r.length)l=this._vxl.pick_object(i,a,0,0);else{const e={str:JSON.stringify({layerIds:r}),byteCount:0,ptr:0,isReusable:!1};this._allocateBlock(e)&&(l=this._vxl.pick_object(i,a,e.ptr,e.byteCount),e.isReusable||this._vxl._free(e.ptr))}return this._afterDraw(this._rctx,this._vxl),l}async getOtherFieldPopupValues(e,s){if(!this._vxl)return[];for(const r of e){const e=r.gpuResult;if(!e)continue;const i=this._layers.get(e.layerId);if(!i||!i.layerView.layer.url)continue;const a=i.layerView.layer,n={responseType:"array-buffer",signal:i.abortController.signal,query:{...i.layerView.layer.customParameters,token:i.layerView.layer.apiKey}},o=e.voxelSpacePosition,l=[Math.floor(o[0]/32),Math.floor(o[1]/32),Math.floor(o[2]/32)],h=[-4&l[0],-4&l[1],-4&l[2]];let d=0;if(e.epochTime){const t=this._vxl.get_layer_epoch_times(i.layerView.wasmLayerId,a.currentVariableId);for(let s=0;s<t.length;++s)if(t[s]===e.epochTime/1e3){d=s;break}}const u=[],_={varIds:[],ptrs:[],sizes:[]};for(const r of s){const e=a.variables.findIndex(e=>e.name===r);if(-1===e)continue;const s=a.variables.getItemAt(e)?.id;if(null==s)continue;const i=`${a.url}/variables/${s}/${d}/bundles/0/${h[0]}-${h[1]}-${h[2]}`;u.push(t(i,n).then(e=>e.data)),_.varIds.push(s)}const c=await Promise.allSettled(u),m=c.length;for(let t=0;t<m;++t){const e=c[t];if("fulfilled"===e.status){const t=e.value,s=this._vxl._malloc(t.byteLength);new Uint8Array(this._vxl.HEAPU8.buffer,s,t.byteLength).set(new Uint8Array(t)),_.ptrs.push(s),_.sizes.push(t.byteLength)}else _.varIds.splice(t,1)}const f=this._vxl.get_other_field_popup_values(e,_);for(let t=0;t<_.ptrs.length;++t)this._vxl._free(_.ptrs[t]);if(f.continuousValues)for(const t in f.continuousValues)r.attributes[t]=f.continuousValues[t];if(f.uniqueValues)for(const t in f.uniqueValues)r.attributes[t]=f.uniqueValues[t]}return e}_beforeDraw(e){this._renderTargetToRestore={fbo:e.boundFramebuffer,viewport:e.getViewport()},e.setPolygonOffsetFillEnabled(!1),e.setScissorTestEnabled(!1),e.setColorMask(!0,!0,!0,!0)}_afterDraw(e,t){this._renderTargetToRestore.fbo=null,e.externalTextureUnitUpdate(t.get_texture_units_bound_in_frame(),t.get_active_texture_unit()),e.externalVertexArrayObjectUpdate(),e.externalVertexBufferUpdate(),e.externalProgramUpdate()}intersect(e,t,s,r,i){if(!this._vxl||!this._rctx||0===this._layers.size||!e.options.selectionMode||e.options.isFiltered||!e.camera)return;if(null==i||i[0]<0||i[0]>e.camera.viewport[2]||i[1]<0||i[1]>e.camera.viewport[3])return this._dbg(4,i?`[js] VoxelWasmPerScene.intersect: outOfRange, screenXY=[${i[0].toFixed(0)}, ${i[1].toFixed(0)}]`:"[js] VoxelWasmPerScene.intersect: outOfRange, screenXY=null"),null;const a=[];this._layers.forEach(t=>{e.options.filteredLayerViewUids.includes(t.layerView.uid)&&a.push(t.layerView.wasmLayerId)});const n=this.pickObject(i[0],i[1],e.camera,a);if(null==n||-1===n.layerId)return;const o=this._layers.get(n.layerId);if(o){const t=o.layerView.layer.uid,i=n.distanceToCamera/h(s,r),a=d();a[0]=n.worldX,a[1]=n.worldY,a[2]=n.worldZ;const l={},u=o.layerView.layer,_=u.variables.findIndex(e=>e.id===u.currentVariableId);if(_>=0){const e=u.variables.getItemAt(_);null!=e&&(null!=n.continuousValue?l[e.name]=n.continuousValue:null!=n.uniqueValueLabel&&null!=n.uniqueValue?l[e.name]=`${n.uniqueValueLabel} (${n.uniqueValue})`:null!=n.uniqueValue&&(l[e.name]=`${n.uniqueValue}`),e.description.length>0?l["Voxel.CurrentVariable"]=e.description:e.name?.length>0&&(l["Voxel.CurrentVariable"]=e.name))}if(l["Voxel.Position"]=`[${n.voxelSpacePosition.toString()}]`,null!=n.epochTime&&null!=n.nativeTime&&null!=n.nativeTimeUnits){const e=new Date(n.epochTime);l["Voxel.LocalTime"]=e,l["Voxel.SourceTime"]=`${n.nativeTime.toLocaleString()} ${n.nativeTimeUnits}`}null!=n.depth&&(l["Voxel.Depth"]=n.depth);const c=n.faceNormal;l["Voxel.WorldPosition"]=`[${a[0]}, ${a[1]}, ${a[2]}]`;const m=e=>{const s=new f(a,t,()=>this._createVoxelGraphic(o.layerView.layer,l,n));e.set(this.type,s,i,c)},p=e.results,g=2===e.options.store;if((null==p.min.distance||i<p.min.distance)&&m(p.min),(null==p.max.distance||i>p.max.distance)&&m(p.max),g){const t=new x(e.ray);m(t),e.results.all.push(t)}}}_createVoxelGraphic(e,t,s){return new m({layer:e,sourceLayer:e,origin:e.graphicOrigin,attributes:t,gpuResult:s})}_toWasmQuality(e){switch(e){case"low":return 0;case"medium":return 1;case"high":return 2}}_setUpscalingLimits(e,t,s){this._vxl&&this._vxl.set_upscaling_limits(e,t,s)}};e([o()],v.prototype,"produces",void 0),e([o()],v.prototype,"consumes",void 0),v=e([l("esri.layers.VoxelWasmPerSceneView")],v);const b=v;export{b as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../request.js";import has from"../core/has.js";import s from"../core/Logger.js";import{isAbortError as r}from"../core/promiseUtils.js";import{watch as i,initial as a}from"../core/reactiveUtils.js";import{convertTime as n}from"../core/timeUtils.js";import{property as o,subclass as l}from"../core/accessorSupport/decorators.js";import{distance as h}from"../core/libs/gl-matrix-2/math/vec3.js";import{create as d}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{renderSRFromViewSR as u}from"../geometry/support/coordinateSystem.js";import{loadVoxelWASM as _}from"../libs/vxl/VxlModule.js";import{InternalRenderCategory as c}from"../views/3d/webgl.js";import{VoxelGraphic as m}from"../views/3d/layers/VoxelGraphic.js";import{VoxelTarget as f}from"../views/3d/layers/i3s/Intersector.js";import{Frustum as p}from"../views/3d/state/Frustum.js";import{RenderCoordsHelper as g}from"../views/3d/support/RenderCoordsHelper.js";import y from"../views/3d/webgl/RenderNode.js";import{IntersectorResult as x}from"../views/3d/webgl-engine/lib/IntersectorResult.js";let v=class extends y{constructor(e){super(e),this._havePreparedWithAllLayers=!1,this.produces="disabled",this.consumes={required:[c.VOXEL]},this._vxlPromise=null,this._moreToLoad=!1,this._viewportWidth=-1,this._viewportHeight=-1,this._newLayers=[],this._layers=new Map,this._renderTargetToRestore=null,this._lastFrameWasStationary=!1,this._wasmMemBlockSizes=[512,1024,2048,4096,8192,16384,32768,65536],this._wasmMemBlocks=new Map,this._dbgFlags=new Set,this._captureFrustum=!1,this._frustum=null,this._frustumRenderableId=-1,this._renderCoordsHelper=null,this.type=9,this.slicePlaneEnabled=!0,this.isGround=!1,this.layerViewUid=[]}_dbg(e,t){this._dbgFlags.has(e)&&(4===e?s.getLogger(this).error(t):s.getLogger(this).warn(t))}initialize(){this._dbg(1,"--initialize--");for(const e of this._wasmMemBlockSizes)this._wasmMemBlocks.set(e,0);this.addHandles([i(()=>"local"===this.view.viewingMode,e=>{e?(this._dbg(1,"view switched to local view, enabling rendering"),this.produces=c.VOXEL,this.view.sceneIntersectionHelper.addIntersectionHandler(this)):(this._dbg(1,"view switched to global view, disabling rendering"),this.view.sceneIntersectionHelper.removeIntersectionHandler(this),this.produces="disabled")},a),i(()=>this.view?.qualityProfile,e=>{this._dbg(3,"qualityProfile changed to "+e),this._vxl?.set_quality(this._toWasmQuality(e))},a),i(()=>this.view?.timeExtent,()=>{if(this._vxl){const e=this._getTimeArgs(this.view?.timeExtent);this._dbg(3,"sceneView timeExtent changed to useTime="+e.hasTime+" st="+e.startTime+" et="+e.endTime),this._vxl.set_scene_time_extent(e.startTime,e.endTime,e.hasTime),this.requestRender(1)}},a),i(()=>this.view?.stationary,e=>{this._vxl&&e&&!this._lastFrameWasStationary&&this.requestRender(1)})])}get _rctx(){return this.renderContext?.rctx}get _halfIntTexturesAvailable(){return!!this._rctx?.capabilities.textureNorm16}get _textureFloatLinearAvailable(){return!!this._rctx?.capabilities.textureFloatLinear}_restoreFramebuffer(){if(!this._renderTargetToRestore||!this._rctx)return;const e=this._renderTargetToRestore.fbo;if(!!!this._rctx)return void this._dbg(4,"no context in restoreFramebuffer!");this._rctx.bindFramebuffer(e,!0);const t=this._renderTargetToRestore.viewport;this._rctx.setViewport(t.x,t.y,t.width,t.height)}_bindPreviousDepthToSlot(e,t){if(!this._rctx||!this._renderTargetToRestore)return 0;const s=this._renderTargetToRestore.fbo?.depthStencilTexture;return s?(0===t?this._rctx.bindTexture(null,e,!0):this._rctx.bindTexture(s,e,!0),1):(this._dbg(4,"no depth/stencil texture exists!"),0)}_modifyResourceCount(e,t,s){if(!this._rctx)return void this._dbg(4,"modifyAllocation callback has no rendering context!");const r=e;1===s?this._rctx.instanceCounter.increment(r,t):this._rctx.instanceCounter.decrement(r,t)}_setBlendState(e,t,s,r){this._rctx?(this._rctx.setBlendingEnabled(1===e),this._rctx.setBlendFunction(t,s),this._rctx.setBlendEquation(r)):this._dbg(4,"setBlendState callback has no rendering context!")}_setFrontFace(e){this._rctx?this._rctx.setFrontFace(e):this._dbg(4,"setFrontFace callback has no rendering context!")}_setDepthStencilStateFunction(e,t,s){this._rctx?(this._rctx.setDepthFunction(s),this._rctx.setDepthTestEnabled(1===e),this._rctx.setDepthWriteEnabled(1===t),this._rctx.setStencilTestEnabled(!1),this._rctx.setStencilFunction(519,0,255),this._rctx.setStencilOpSeparate(1028,7680,7682,7680),this._rctx.setStencilOpSeparate(1029,7680,7683,7680)):this._dbg(4,"setDepthStencilStateFunction callback has no rendering context!")}_setRasterizerState(e){if(this._rctx)switch(e){case 1:this._rctx.setFaceCullingEnabled(!1);break;case 3:this._rctx.setCullFace(1029),this._rctx.setFaceCullingEnabled(!0);break;case 2:this._rctx.setCullFace(1028),this._rctx.setFaceCullingEnabled(!0)}else this._dbg(4,"setRasterizerState callback has no rendering context!")}_setViewport(e,t,s,r){this._rctx?this._rctx.setViewport(e,t,s,r):this._dbg(4,"setViewport callback has no rendering context!")}_updateMemoryUsage(){this._layers.forEach((e,t)=>{if(e.needMemoryUsageUpdate){const s=this._vxl?.estimate_memory_usage(t)??0;s>=0&&(e.needMemoryUsageUpdate=!1,e.layerView.setUsedMemory(s))}})}_syncRequestsResponses(){this._vxl&&this._layers.forEach((e,s)=>{const i=[];e.responses.forEach((t,r)=>{i.push(r),this._dbg(2,"responding for requestID:"+r+" size:"+t.size),this._vxl?.respond(s,r,t),0!==t.requestType&&4!==t.requestType||(e.needMemoryUsageUpdate=!0)});const a=e.responses;for(const t of i)a.delete(t);const n=this._vxl.get_new_requests(s),o=e.abortController.signal;for(const l in n){e.outstandingRequestCount+=1,1===e.outstandingRequestCount&&e.layerView.updatingFlagChanged();const s=n[l],i={responseType:"array-buffer",signal:o,query:{...e.layerView.layer.customParameters,token:e.layerView.layer.apiKey}};this._dbg(2,"making requestID:"+l+" url:"+s.url),t(s.url,i).then(t=>{e.outstandingRequestCount-=1,0===e.outstandingRequestCount&&e.layerView.updatingFlagChanged(),this._dbg(2,"have response for requestID:"+l);let r=0;if(t.data.byteLength>0&&this._vxl){r=this._vxl._malloc(t.data.byteLength);const e=new Uint8Array(this._vxl.HEAPU8.buffer,r,t.data.byteLength),s=new Uint8Array(t.data);for(let r=0;r<t.data.byteLength;++r)e[r]=s[r]}a.set(+l,{responseType:s.responseType,ptr:r,size:t.data.byteLength,success:!0,requestType:s.requestType})}).catch(t=>{e.outstandingRequestCount-=1,0===e.outstandingRequestCount&&e.layerView.updatingFlagChanged(),r(t)||(this._dbg(4,`requestID:${l} failed, error=${t.toString()}`),a.set(+l,{responseType:s.responseType,ptr:0,size:0,success:!1,requestType:s.requestType}))})}})}updateWasmCamera(e){this._vxl?.set_projection_matrix.apply(this._vxl,e.projectionMatrix),this._vxl?.set_view_matrix.apply(this._vxl,e.viewMatrix),this._vxl?.set_near_far(e.near,e.far)}isUpdating(e){if(!this._vxl&&this._vxlPromise)return!0;const t=this._layers.get(e);return!!t&&t.outstandingRequestCount>0}getLayerTimes(e){const t=[];return this._vxl?(this._layers.forEach((s,r)=>{if(s.layerView.wasmLayerId===e.wasmLayerId){const s=this._vxl.get_layer_epoch_times(r,e.layer.currentVariableId);for(let e=0;e<s.length;++e)t.push(s[e])}}),t):t}getCurrentLayerTimeIndex(e){let t=0;return this._layers.forEach((s,r)=>{s.layerView.wasmLayerId===e.wasmLayerId&&(t=this._vxl?.get_layer_current_time_id(r)??0)}),t}setEnabled(e,t){this._layers.forEach((s,r)=>{s.layerView.wasmLayerId===e.wasmLayerId&&(this._vxl?.set_enabled(r,t),s.needMemoryUsageUpdate=!0,this.requestRender(1))})}setIsInScaleRange(e,t){const s=this._layers.get(e.wasmLayerId);s&&t!==s.isInScaleRange&&(s.isInScaleRange=t,this._vxl?.set_is_in_scale_range(e.wasmLayerId,t),s.needMemoryUsageUpdate=!t,this.requestRender(1))}setStaticSections(e,t){const s={mask:1,staticSections:t};return this._doMaskedUIUpdate(e,s,!0)}setCurrentVariable(e,t){const s={mask:1024,currentVariable:t};return this._doMaskedUIUpdate(e,s,!0)}setRenderMode(e,t){const s={mask:8192,renderMode:t};return this._doMaskedUIUpdate(e,s,!0)}setVerticalExaggerationAndOffset(e,t,s,r){const i={mask:256,volStyleDesc:{volumeId:t,verticalExaggeration:s,verticalOffset:r}};return this._doMaskedUIUpdate(e,i,!0)}setVariableStyles(e,t){const s={mask:32768,variableStyles:t};return this._doMaskedUIUpdate(e,s,!0)}setVolumeStyles(e,t){const s={mask:65536,volumeStyles:t};return this._doMaskedUIUpdate(e,s,!0)}setEnableDynamicSections(e,t){const s={mask:4096,containerIsVisible:t,container:1};return this._doMaskedUIUpdate(e,s,!0)}setEnableIsosurfaces(e,t){const s={mask:4096,containerIsVisible:t,container:0};return this._doMaskedUIUpdate(e,s,!0)}setEnableSections(e,t){const s={mask:4096,containerIsVisible:t,container:2};return this._doMaskedUIUpdate(e,s,!0)}setAnalysisSlice(e,t,s,r){const i={mask:131072,analysisSlice:{point:s,normal:r,enabled:t}};return this._doMaskedUIUpdate(e,i,!0)}updateLayerTimeProperties(e){if(!this._vxl)return;const t=this._layers.get(e.wasmLayerId);if(t){const s=t.layerView.layer;let r=0;s.timeOffset&&(r=n(s.timeOffset.value,s.timeOffset.unit,"seconds"));const i=this._getTimeArgs(s.timeExtent);this._vxl?.set_layer_time_properties(e.wasmLayerId,i.startTime,i.endTime,i.hasTime,s.useViewTime,r),this.requestRender(1)}}_doMaskedUIUpdate(e,t,s){if(!this._vxl)return!1;let r=!1;return this._layers.forEach((s,i)=>{if(s.layerView.wasmLayerId===e.wasmLayerId){const e={str:JSON.stringify(t),byteCount:0,ptr:0,isReusable:!1};this._allocateBlock(e)&&(r=1===this._vxl?.handle_masked_ui_update(i,e.ptr,e.byteCount),e.isReusable||this._vxl?._free(e.ptr))}}),r&&s&&this.requestRender(1),r}_addTriangleToWasmBuffer(e,t,s,r,i){return e[3*t]=s[0],e[3*t+1]=s[1],e[3*t+2]=s[2],e[3*(t+=1)]=r[0],e[3*t+1]=r[1],e[3*t+2]=r[2],e[3*(t+=1)]=i[0],e[3*t+1]=i[1],e[3*t+2]=i[2],t+=1}_addNormalToWasmBuffer(e,t,s){return e[3*t]=s[0],e[3*t+1]=s[1],e[3*t+2]=s[2],t+=1}_doCaptureFrustum(){if(!this._vxl)return;const e=36,t=e/3,s=this._vxl._malloc(3*e*Float32Array.BYTES_PER_ELEMENT),r=new Float32Array(this._vxl.HEAPF32.buffer,s,3*e),i=this._vxl._malloc(3*t*Float32Array.BYTES_PER_ELEMENT),a=new Float32Array(this._vxl.HEAPF32.buffer,i,e),n=this._frustum.points[0],o=this._frustum.points[1],l=this._frustum.points[2],h=this._frustum.points[3],d=this._frustum.points[4],u=this._frustum.points[5],_=this._frustum.points[6],c=this._frustum.points[7];let m=0,f=0;const p=this._frustum.planes[4];m=this._addTriangleToWasmBuffer(r,m,l,o,n),f=this._addNormalToWasmBuffer(a,f,p),m=this._addTriangleToWasmBuffer(r,m,n,h,l),f=this._addNormalToWasmBuffer(a,f,p);const g=this._frustum.planes[5];m=this._addTriangleToWasmBuffer(r,m,d,u,_),f=this._addNormalToWasmBuffer(a,f,g),m=this._addTriangleToWasmBuffer(r,m,_,c,d),f=this._addNormalToWasmBuffer(a,f,g);const y=this._frustum.planes[3];m=this._addTriangleToWasmBuffer(r,m,_,l,h),f=this._addNormalToWasmBuffer(a,f,y),m=this._addTriangleToWasmBuffer(r,m,h,c,_),f=this._addNormalToWasmBuffer(a,f,y);const x=this._frustum.planes[2];m=this._addTriangleToWasmBuffer(r,m,n,o,u),f=this._addNormalToWasmBuffer(a,f,x),m=this._addTriangleToWasmBuffer(r,m,u,d,n),f=this._addNormalToWasmBuffer(a,f,x);const v=this._frustum.planes[0];m=this._addTriangleToWasmBuffer(r,m,h,n,d),f=this._addNormalToWasmBuffer(a,f,v),m=this._addTriangleToWasmBuffer(r,m,d,c,h),f=this._addNormalToWasmBuffer(a,f,v);const b=this._frustum.planes[1];m=this._addTriangleToWasmBuffer(r,m,l,_,u),f=this._addNormalToWasmBuffer(a,f,b),this._addTriangleToWasmBuffer(r,m,u,o,l),this._addNormalToWasmBuffer(a,f,b),-1!==this._frustumRenderableId&&this._vxl.remove_generic_mesh(this._frustumRenderableId),this._frustumRenderableId=this._vxl.add_generic_mesh(s,3*e,i,e,255,0,0,64),this._vxl._free(s),this._vxl._free(i),this._captureFrustum=!1,this.requestRender(1)}captureFrustum(){null===this._renderCoordsHelper&&(this._renderCoordsHelper=g.create(2,u(!1,this.view.spatialReference))),null===this._frustum&&(this._frustum=new p(this._renderCoordsHelper)),this._captureFrustum=!0,this.requestRender(1)}toggleFullVolumeExtentDraw(e){this._vxl&&this._layers.forEach((t,s)=>{t.layerView.wasmLayerId===e.wasmLayerId&&(this._vxl?.toggle_full_volume_extent_draw(s),this.requestRender(1))})}dropQueryRenderTarget(){this._vxl?.drop_query_rt()}addVoxelLayer(e){if(!this._vxl){const t={layerView:e,resolveCallback:null,rejectCallback:null},s=new Promise((e,s)=>{t.resolveCallback=e,t.rejectCallback=s});return this._newLayers.push(t),s}const t=this._addVoxelLayer(e,this._vxl);return t<0?Promise.reject(-1):Promise.resolve(t)}removeVoxelLayer(e){if(!this._vxl){const t=this._newLayers.findIndex(t=>e.uid===t.layerView.uid);t>=0&&(this._newLayers[t].resolveCallback(-1),this._newLayers.splice(t,1));const s=this._newLayers.length;return 0===s&&(this._dbg(1,"No voxel layers left after removing a layer, destroying render node"),this.destroy()),s}let t=-1;this._layers.forEach((s,r)=>{if(s.layerView.wasmLayerId===e.wasmLayerId){t=r,s.abortController.abort(),this._vxl?.remove_layer(t);const i=this.layerViewUid.indexOf(e.uid);-1!==i&&this.layerViewUid.splice(i,1)}}),t>=0&&this._layers.delete(t);const s=this._layers.size;return 0===s&&(this._dbg(1,"No voxel layers left after removing a layer, destroying render node"),this.destroy()),s}_getBlockSize(e){for(const t of this._wasmMemBlockSizes)if(e<t)return t;return-1}_allocateBlock(e){if(!this._vxl)return!1;e.byteCount=this._vxl.lengthBytesUTF8(e.str)+1;const t=this._getBlockSize(e.byteCount);return t<0?(e.isReusable=!1,e.ptr=this._vxl._malloc(e.byteCount)):(e.isReusable=!0,e.ptr=this._wasmMemBlocks.get(t),0===e.ptr&&(e.ptr=this._vxl._malloc(t),this._wasmMemBlocks.set(t,e.ptr))),0!==e.ptr&&(this._vxl.stringToUTF8(e.str,e.ptr,e.byteCount),!0)}_getTimeArgs(e){let t=-Number.MAX_VALUE,s=Number.MAX_VALUE,r=!1;return null!=e&&(e.isAllTime?r=!0:(null!=e.start&&(r=!0,t=e.start.getTime()/1e3),null!=e.end&&(r=!0,s=e.end.getTime()/1e3))),{startTime:t,endTime:s,hasTime:r}}_addVoxelLayer(e,t){const r=e.layer;let i=-1;const a=r.getConfiguration();if(a.length<1)return-1;const o={str:a,byteCount:0,ptr:0,isReusable:!1};if(!this._allocateBlock(o))return-1;const l=this._getTimeArgs(r.timeExtent),h=this.view.spatialReference.isWGS84&&r.spatialReference.isWGS84?111319.49079327357:1;let d=0;if(r.timeOffset&&(d=n(r.timeOffset.value,r.timeOffset.unit,"seconds")),i=t.add_layer(r.serviceRoot,o.ptr,o.byteCount,h,h,l.startTime,l.endTime,l.hasTime,r.useViewTime,d,this._toWasmQuality(this.view.qualityProfile)),o.isReusable||t._free(o.ptr),i>=0){r.test?.constantUpscaling&&(this._setUpscalingLimits(0,.25,.25),this._setUpscalingLimits(1,.5,.5),this._setUpscalingLimits(2,.75,.75));const t=new AbortController;if(this._layers.set(i,{layerView:e,responses:new Map,outstandingRequestCount:0,abortController:t,needMemoryUsageUpdate:!1,isInScaleRange:!0}),this.layerViewUid.push(e.uid),!this._halfIntTexturesAvailable||has("mac")){const t=[];let r="";for(const s of e.layer.variables)"Int16"!==s.renderingFormat.type&&"UInt16"!==s.renderingFormat.type||(t.push(s.name),s.id===e.layer.currentVariableId&&(r=s.name));""!==r&&s.getLogger(this).error("#addVoxelLayer_error()",e.layer,`The voxel layer '${e.layer.title}' cannot render the current variable '${r}' in this browser`),t.length>0&&s.getLogger(this).warn("#addVoxelLayer_warning()",e.layer,`The voxel layer '${e.layer.title}' cannot render the variables '${t.toString()}' in this browser`)}if(!this._textureFloatLinearAvailable){const t=[];let r="";for(const s of e.layer.variables)"Float32"===s.renderingFormat.type&&(t.push(s.name),s.id===e.layer.currentVariableId&&(r=s.name));""!==r&&s.getLogger(this).error("#addVoxelLayer_error()",e.layer,`The voxel layer '${e.layer.title}' cannot render the current variable '${r}' in this browser`),t.length>0&&s.getLogger(this).warn("#addVoxelLayer_warning()",e.layer,`The voxel layer '${e.layer.title}' cannot render the variables '${t.toString()}' in this browser`)}return has("esri-mobile")&&s.getLogger(this).warnOnce("Mobile support differs across devices. Voxel layer might not display as expected."),i}return-1}_prepareRender(){if(!this._vxl)return void this._initializeWasm();const e=this.bindParameters.camera.viewForward,t=this.bindParameters.camera.eye;this._vxl.update_camera_pos_and_direction(t[0],t[1],t[2],e[0],e[1],e[2]);const s=this._vxl.cull();this._dbg(2,"missingResourceCount="+s),this._moreToLoad=s>0,this._havePreparedWithAllLayers=0===this._newLayers.length,this._updateMemoryUsage()}render(){this._prepareRender();const e=this.bindRenderTarget();if(!this._vxl||!this._rctx)return this.requestRender(1),e;for(const s of this._newLayers){const e=this._addVoxelLayer(s.layerView,this._vxl);-1===e?s.rejectCallback(-1):s.resolveCallback(e)}if(this._newLayers=[],0===this._layers.size)return this._dbg(4,"No voxel layers but RenderNode is being asked to render!"),e;this._lastFrameWasStationary=this.view.stationary,this._syncRequestsResponses(),this._beforeDraw(this._rctx),this._vxl.begin_color_frame(!this.view.stage.renderer.isFeatureEnabled(1),this.bindParameters.lighting.mainLight.direction[0],this.bindParameters.lighting.mainLight.direction[1],this.bindParameters.lighting.mainLight.direction[2]);const t=this._renderTargetToRestore.viewport;return t.width===this._viewportWidth&&t.height===this._viewportHeight||(this._viewportWidth=t.width,this._viewportHeight=t.height,this._vxl.set_viewport(t.width,t.height),this._layers.forEach(e=>e.needMemoryUsageUpdate=!0)),0===t.x&&0===t.y||this._dbg(4,"Unsupported viewport parameters detected!"),this.updateWasmCamera(this.bindParameters.camera),this._captureFrustum&&(this._frustum.update(this.bindParameters.camera),this._doCaptureFrustum()),this._vxl.draw(),this._afterDraw(this._rctx,this._vxl),(this._moreToLoad||!this._havePreparedWithAllLayers&&this._layers.size>0)&&this.requestRender(1),e}destroy(){this._dbg(1,"--destroy--"),this._vxl&&(this._layers.forEach(e=>{e.abortController.abort()}),this._wasmMemBlocks.forEach(e=>{0!==e&&this._vxl?._free(e)}),this._vxl.uninitialize_voxel_wasm(),this._vxl=null)}_initializeWasm(){if(this._vxl||this._vxlPromise||!this._rctx?.gl)return;const e=this._rctx.gl;this._vxlPromise=_(e).then(t=>{if(t.specialHTMLTargets.jsAPI3DRenderingContext=e,this._vxl=t,this._vxlPromise=null,this._newLayers.length<=0)return this._dbg(1," no voxel layers left after WASM downloaded, removing RenderNode and destroying"),void this.destroy();const s=this._getTimeArgs(this.view?.timeExtent),r=this._vxl.addFunction(this._restoreFramebuffer.bind(this),"v"),i=this._vxl.addFunction(this._setBlendState.bind(this),"viiii"),a=this._vxl.addFunction(this._setFrontFace.bind(this),"vi"),n=this._vxl.addFunction(this._setRasterizerState.bind(this),"vi"),o=this._vxl.addFunction(this._setDepthStencilStateFunction.bind(this),"viii"),l=this._vxl.addFunction(this._setViewport.bind(this),"viiii"),h=this._vxl.addFunction(this._bindPreviousDepthToSlot.bind(this),"iii"),d=this._vxl.addFunction(this._modifyResourceCount.bind(this),"viii"),u=this._halfIntTexturesAvailable&&!has("mac"),_=this._textureFloatLinearAvailable;this._vxl.initialize_voxel_wasm(r,i,a,n,o,l,h,d,s.startTime,s.endTime,s.hasTime,u,_),this.requestRender(1)}).catch(()=>{for(const e of this._newLayers)e.rejectCallback(-2);this._dbg(4," WASM failed to download, destroying render node"),this.destroy()})}pickDepth(e,t,s){if(!this._vxl||!this._rctx||0===this._layers.size)return null;const r=s.viewport[3]-t;if(e<0||e>s.viewport[2]||t<0||t>s.viewport[3])return this._dbg(4,`[js] pickDepth: outOfRange, screenXY=[${e.toFixed(0)}, ${r.toFixed(0)}]]`),null;this._beforeDraw(this._rctx);const i=s.viewForward,a=s.eye;this._vxl.update_camera_pos_and_direction(a[0],a[1],a[2],i[0],i[1],i[2]),this.updateWasmCamera(s),this._vxl.begin_frame();const n=this._vxl.pick_depth(e,r);if(this._afterDraw(this._rctx,this._vxl),n.success){return n.distanceToCamera}return null}pickObject(e,t,s,r){if(!this._vxl||!this._rctx||0===this._layers.size)return null;const i=Math.round(e),a=Math.round(t);if(i<0||i>s.viewport[2]||a<0||a>s.viewport[3])return this._dbg(4,`[js] pickObject: outOfRange, screenXY=[${i}, ${a}], vp=[${s.viewport.toString()}]`),null;this._beforeDraw(this._rctx);const n=s.viewForward,o=s.eye;this._vxl.update_camera_pos_and_direction(o[0],o[1],o[2],n[0],n[1],n[2]),this.updateWasmCamera(s),this._vxl.begin_frame();let l=null;if(0===r.length)l=this._vxl.pick_object(i,a,0,0);else{const e={str:JSON.stringify({layerIds:r}),byteCount:0,ptr:0,isReusable:!1};this._allocateBlock(e)&&(l=this._vxl.pick_object(i,a,e.ptr,e.byteCount),e.isReusable||this._vxl._free(e.ptr))}return this._afterDraw(this._rctx,this._vxl),l}async getOtherFieldPopupValues(e,s){if(!this._vxl)return[];for(const r of e){const e=r.gpuResult;if(!e)continue;const i=this._layers.get(e.layerId);if(!i||!i.layerView.layer.url)continue;const a=i.layerView.layer,n={responseType:"array-buffer",signal:i.abortController.signal,query:{...i.layerView.layer.customParameters,token:i.layerView.layer.apiKey}},o=e.voxelSpacePosition,l=[Math.floor(o[0]/32),Math.floor(o[1]/32),Math.floor(o[2]/32)],h=[-4&l[0],-4&l[1],-4&l[2]];let d=0;if(e.epochTime){const t=this._vxl.get_layer_epoch_times(i.layerView.wasmLayerId,a.currentVariableId);for(let s=0;s<t.length;++s)if(t[s]===e.epochTime/1e3){d=s;break}}const u=[],_={varIds:[],ptrs:[],sizes:[]};for(const r of s){const e=a.variables.findIndex(e=>e.name===r);if(-1===e)continue;const s=a.variables.getItemAt(e)?.id;if(null==s)continue;const i=`${a.url}/variables/${s}/${d}/bundles/0/${h[0]}-${h[1]}-${h[2]}`;u.push(t(i,n).then(e=>e.data)),_.varIds.push(s)}const c=await Promise.allSettled(u),m=c.length;for(let t=0;t<m;++t){const e=c[t];if("fulfilled"===e.status){const t=e.value,s=this._vxl._malloc(t.byteLength);new Uint8Array(this._vxl.HEAPU8.buffer,s,t.byteLength).set(new Uint8Array(t)),_.ptrs.push(s),_.sizes.push(t.byteLength)}else _.varIds.splice(t,1)}const f=this._vxl.get_other_field_popup_values(e,_);for(let t=0;t<_.ptrs.length;++t)this._vxl._free(_.ptrs[t]);if(f.continuousValues)for(const t in f.continuousValues)r.attributes[t]=f.continuousValues[t];if(f.uniqueValues)for(const t in f.uniqueValues)r.attributes[t]=f.uniqueValues[t]}return e}_beforeDraw(e){this._renderTargetToRestore={fbo:e.boundFramebuffer,viewport:e.getViewport()},e.setPolygonOffsetFillEnabled(!1),e.setScissorTestEnabled(!1),e.setColorMask(!0,!0,!0,!0)}_afterDraw(e,t){this._renderTargetToRestore.fbo=null,e.externalTextureUnitUpdate(t.get_texture_units_bound_in_frame(),t.get_active_texture_unit()),e.externalVertexArrayObjectUpdate(),e.externalVertexBufferUpdate(),e.externalProgramUpdate()}intersect(e,t,s,r,i){if(!this._vxl||!this._rctx||0===this._layers.size||!e.options.selectionMode||e.options.isFiltered||!e.camera)return;if(null==i||i[0]<0||i[0]>e.camera.viewport[2]||i[1]<0||i[1]>e.camera.viewport[3])return this._dbg(4,i?`[js] VoxelWasmPerScene.intersect: outOfRange, screenXY=[${i[0].toFixed(0)}, ${i[1].toFixed(0)}]`:"[js] VoxelWasmPerScene.intersect: outOfRange, screenXY=null"),null;const a=[];this._layers.forEach(t=>{e.options.filteredLayerViewUids.includes(t.layerView.uid)&&a.push(t.layerView.wasmLayerId)});const n=this.pickObject(i[0],i[1],e.camera,a);if(null==n||-1===n.layerId)return;const o=this._layers.get(n.layerId);if(o){const t=o.layerView.layer.uid,i=n.distanceToCamera/h(s,r),a=d();a[0]=n.worldX,a[1]=n.worldY,a[2]=n.worldZ;const l={},u=o.layerView.layer,_=u.variables.findIndex(e=>e.id===u.currentVariableId);if(_>=0){const e=u.variables.getItemAt(_);null!=e&&(null!=n.continuousValue?l[e.name]=n.continuousValue:null!=n.uniqueValueLabel&&null!=n.uniqueValue?l[e.name]=`${n.uniqueValueLabel} (${n.uniqueValue})`:null!=n.uniqueValue&&(l[e.name]=`${n.uniqueValue}`),e.description.length>0?l["Voxel.CurrentVariable"]=e.description:e.name?.length>0&&(l["Voxel.CurrentVariable"]=e.name))}if(l["Voxel.Position"]=`[${n.voxelSpacePosition.toString()}]`,null!=n.epochTime&&null!=n.nativeTime&&null!=n.nativeTimeUnits){const e=new Date(n.epochTime);l["Voxel.LocalTime"]=e,l["Voxel.SourceTime"]=`${n.nativeTime.toLocaleString()} ${n.nativeTimeUnits}`}null!=n.depth&&(l["Voxel.Depth"]=n.depth);const c=n.faceNormal;l["Voxel.WorldPosition"]=`[${a[0]}, ${a[1]}, ${a[2]}]`;const m=e=>{const s=new f(a,t,()=>this._createVoxelGraphic(o.layerView.layer,l,n));e.set(this.type,s,i,c)},p=e.results,g=2===e.options.store;if((null==p.min.distance||i<p.min.distance)&&m(p.min),(null==p.max.distance||i>p.max.distance)&&m(p.max),g){const t=new x(e.ray);m(t),e.results.all.push(t)}}}_createVoxelGraphic(e,t,s){return new m({layer:e,sourceLayer:e,origin:e.graphicOrigin,attributes:t,gpuResult:s})}_toWasmQuality(e){switch(e){case"low":return 0;case"medium":return 1;case"high":return 2}}_setUpscalingLimits(e,t,s){this._vxl&&this._vxl.set_upscaling_limits(e,t,s)}};e([o()],v.prototype,"produces",void 0),e([o()],v.prototype,"consumes",void 0),v=e([l("esri.layers.VoxelWasmPerSceneView")],v);const b=v;export{b as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{estimateAttributesMemory as t}from"../../core/memoryEstimations.js";import{convertFlatToOptimizedGeometry as e,convertOptimizedGeometryToFlat as
|
|
2
|
+
import{estimateAttributesMemory as t}from"../../core/memoryEstimations.js";import{convertFlatToOptimizedGeometry as e,convertOptimizedGeometryToFlat as i}from"../../geometry/FlatGeometry.js";import{getCentroidOptimizedGeometry as s}from"./centroid.js";class r{constructor(t=null,e={},i,s,r=0,o=null){this.geometry=t,this.attributes=e,this.centroid=i,this.objectId=s,this.displayId=r,this.distance=o}weakClone(){return new r(this.geometry,this.attributes,this.centroid,this.objectId,this.displayId,this.distance)}clone(){return new r(this.geometry?.clone(),{...this.attributes},this.centroid?.clone(),this.objectId,this.displayId,this.distance)}get usedMemory(){return 128+t(this.attributes)+(this.geometry?.usedMemory??0)}ensureCentroid(t){return this.centroid??=s(this.geometry&&e(this.geometry)),this.centroid}}function o(t,{geometry:e,attributes:s,centroid:o,objectId:n,displayId:d,distance:h},c){return new r(e&&i(t,e,c),s,o,n,d,h)}export{r as FlatFeature,o as convertOptimizedFeatureToFlat};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{convertGeometryToFlat as e,convertOptimizedGeometryToFlat as t}from"../../geometry/FlatGeometry.js";import{featureGeometryTypeKebabDictionary as r}from"../../geometry/support/typeUtils.js";import{FlatFeature as s,convertOptimizedFeatureToFlat as i}from"./FlatFeature.js";import a from"./OptimizedGeometry.js";import{createFeatureId as o}from"./data/createFeatureId.js";class l{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new l;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}function m(e){const s=r.fromJSON(e.geometryType),a=new l;return a.globalIdFieldName=e.globalIdFieldName,a.geohashFieldName=e.geohashFieldName,a.geometryProperties=e.geometryProperties,a.geometryType=e.geometryType,a.spatialReference=e.spatialReference,a.hasZ=e.hasZ,a.hasM=e.hasM,a.features=e.features.map(t=>i(s,t,e.spatialReference)),a.fields=e.fields,a.transform=e.transform,a.exceededTransferLimit=e.exceededTransferLimit,a.uniqueIdField=e.uniqueIdField,a.queryGeometry=e.queryGeometry&&t(s,e.queryGeometry),a.queryGeometryType=e.queryGeometryType,a}function n({exceededTransferLimit:t,features:r,fields:i,geometryType:m,hasM:n,hasZ:y,spatialReference:d,transform:h},u){const f=new l;f.exceededTransferLimit=t??!1;for(const l of r??[]){let t,r;m&&(t=l.geometry&&e(l.geometry),r=l.centroid&&new a([],[l.centroid.x,l.centroid.y]));const i=o(l,u);f.features.push(new s(t,l.attributes,r,i))}return f.fields=i??f.fields,f.geometryType=m??null,f.hasM=n??!1,f.hasZ=y??!1,f.spatialReference=d??null,f.transform=h??null,f}export{l as FlatFeatureSet,n as convertFeatureSetToFlat,m as convertOptimizedFeatureSetToFlat};
|
|
2
|
+
import{convertGeometryToFlat as e,convertOptimizedGeometryToFlat as t}from"../../geometry/FlatGeometry.js";import{featureGeometryTypeKebabDictionary as r}from"../../geometry/support/typeUtils.js";import{FlatFeature as s,convertOptimizedFeatureToFlat as i}from"./FlatFeature.js";import a from"./OptimizedGeometry.js";import{createFeatureId as o}from"./data/createFeatureId.js";class l{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new l;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}function m(e){const s=r.fromJSON(e.geometryType),a=new l;return a.globalIdFieldName=e.globalIdFieldName,a.geohashFieldName=e.geohashFieldName,a.geometryProperties=e.geometryProperties,a.geometryType=e.geometryType,a.spatialReference=e.spatialReference,a.hasZ=e.hasZ,a.hasM=e.hasM,a.features=e.features.map(t=>i(s,t,e.spatialReference)),a.fields=e.fields,a.transform=e.transform,a.exceededTransferLimit=e.exceededTransferLimit,a.uniqueIdField=e.uniqueIdField,a.queryGeometry=e.queryGeometry&&t(s,e.queryGeometry),a.queryGeometryType=e.queryGeometryType,a}function n({exceededTransferLimit:t,features:r,fields:i,geometryType:m,hasM:n,hasZ:y,spatialReference:d,transform:h},u){const f=new l;f.exceededTransferLimit=t??!1;for(const l of r??[]){let t,r;m&&(t=l.geometry&&e(l.geometry),r=l.centroid&&new a([],[l.centroid.x,l.centroid.y]));const i=o(l,u),n=void 0;f.features.push(new s(t,l.attributes,r,i,n,l.distance))}return f.fields=i??f.fields,f.geometryType=m??null,f.hasM=n??!1,f.hasZ=y??!1,f.spatialReference=d??null,f.transform=h??null,f}export{l as FlatFeatureSet,n as convertFeatureSetToFlat,m as convertOptimizedFeatureSetToFlat};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{estimateAttributesMemory as t}from"../../core/memoryEstimations.js";import{getCentroidOptimizedGeometry as e}from"./centroid.js";import
|
|
2
|
+
import{estimateAttributesMemory as t}from"../../core/memoryEstimations.js";import{getCentroidOptimizedGeometry as e}from"./centroid.js";import i from"./OptimizedGeometry.js";class r{constructor(t=null,e={},i,r,s=0,o=null){this.geometry=t,this.attributes=e,this.centroid=i,this.objectId=r,this.displayId=s,this.distance=o}static fromJSON(t){const e=t.geometry?i.fromJSON(t.geometry):null,s=t.centroid?i.fromJSON(t.centroid):null,o=t.objectId;return new r(e,t.attributes,s,o,void 0,t.distance)}weakClone(){return new r(this.geometry,this.attributes,this.centroid,this.objectId,this.displayId,this.distance)}clone(){return new r(this.geometry?.clone(),{...this.attributes},this.centroid?.clone(),this.objectId,this.displayId,this.distance)}ensureCentroid(t){return this.centroid??=e(this.geometry),this.centroid}get usedMemory(){return 128+t(this.attributes)+(this.geometry?.usedMemory??0)}}function s(t){return!!t.geometry?.coords?.length}class o extends r{}export{r as OptimizedFeature,o as OptimizedFeatureWithGeometry,s as hasGeometry};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{timeOnlyToMilliseconds as t}from"../../../core/timeUtils.js";import{getExpressionFromFieldName as e,getWhereClause as i,getAliasFromFieldName as s}from"./attributeSupport.js";import{getGeometry as a}from"./geometryUtils.js";import{isDateOnlyField as l,isTimestampOffsetField as r,isTimeOnlyField as n}from"../../support/fieldUtils.js";import{processNullValue as u,getNormalizedValue as o}from"../../../statistics/utils.js";import{loadArcade as d}from"../../../support/loadArcade.js";class c{constructor(t,a,l){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=t.returnDistinctValues??!1,this.fieldsIndex=l,this.featureAdapter=a;const r=t.outFields;if(r&&!r.includes("*")){this.outFields=r;let t=0;for(const a of r){const r=e(a),n=this.fieldsIndex.get(r),u=n?null:i(r,l),o=n?n.name:s(a)||"FIELD_EXP_"+t++;this._fieldDataCache.set(a,{alias:o,clause:u})}}}countDistinctValues(t){return this.returnDistinctValues?(t.forEach(t=>this.getAttributes(t)),this._returnDistinctMap.size):t.length}getAttributes(t){const e=this._processAttributesForOutFields(t);return this._processAttributesForDistinctValues(e)}getFieldValue(t,e,s){if(s)return this.featureAdapter.getAttribute(t,s.name);const a=e;let l=null;return this._fieldDataCache.has(a)?l=this._fieldDataCache.get(a)?.clause:s||(l=i(e,this.fieldsIndex),this._fieldDataCache.set(a,{alias:a,clause:l})),l?.calculateValue(t,this.featureAdapter)}getDataValues(e,i,s=!0){const a=i.normalizationType,d=i.normalizationTotal,c=this.fieldsIndex.get(i.field),f=l(c)||r(c),h=n(c);return e.map(e=>{let l=i.field&&this.getFieldValue(e,i.field,this.fieldsIndex.get(i.field));if(i.field2?(l=`${u(l)}${i.fieldDelimiter}${u(this.getFieldValue(e,i.field2,this.fieldsIndex.get(i.field2)))}`,i.field3&&(l=`${l}${i.fieldDelimiter}${u(this.getFieldValue(e,i.field3,this.fieldsIndex.get(i.field3)))}`)):"string"==typeof l&&s&&(f?l=l?new Date(l).getTime():null:h&&(l=l?t(l):null)),a&&Number.isFinite(l)){const t="field"===a&&i.normalizationField?this.getFieldValue(e,i.normalizationField,this.fieldsIndex.get(i.normalizationField)):null;l=o(l,a,t,d)}return l})}async getExpressionValues(t,e,i,s,l){const{arcadeUtils:r}=await d(),n=r.hasGeometryOperations(e);n&&await r.enableGeometryOperations();const u=r.createFunction(e),o=r.getViewInfo(i),c={fields:this.fieldsIndex.fields};return t.map(t=>{const e={attributes:this.featureAdapter.getAttributes(t),layer:c,geometry:n?{...a(s.geometryType,this.featureAdapter.getGeometry(t)),spatialReference:i
|
|
2
|
+
import{timeOnlyToMilliseconds as t}from"../../../core/timeUtils.js";import{getExpressionFromFieldName as e,getWhereClause as i,getAliasFromFieldName as s}from"./attributeSupport.js";import{getGeometry as a}from"./geometryUtils.js";import{isDateOnlyField as l,isTimestampOffsetField as r,isTimeOnlyField as n}from"../../support/fieldUtils.js";import{processNullValue as u,getNormalizedValue as o}from"../../../statistics/utils.js";import{loadArcade as d}from"../../../support/loadArcade.js";class c{constructor(t,a,l){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=t.returnDistinctValues??!1,this.fieldsIndex=l,this.featureAdapter=a;const r=t.outFields;if(r&&!r.includes("*")){this.outFields=r;let t=0;for(const a of r){const r=e(a),n=this.fieldsIndex.get(r),u=n?null:i(r,l),o=n?n.name:s(a)||"FIELD_EXP_"+t++;this._fieldDataCache.set(a,{alias:o,clause:u})}}}countDistinctValues(t){return this.returnDistinctValues?(t.forEach(t=>this.getAttributes(t)),this._returnDistinctMap.size):t.length}getAttributes(t){const e=this._processAttributesForOutFields(t);return this._processAttributesForDistinctValues(e)}getFieldValue(t,e,s){if(s)return this.featureAdapter.getAttribute(t,s.name);const a=e;let l=null;return this._fieldDataCache.has(a)?l=this._fieldDataCache.get(a)?.clause:s||(l=i(e,this.fieldsIndex),this._fieldDataCache.set(a,{alias:a,clause:l})),l?.calculateValue(t,this.featureAdapter)}getDataValues(e,i,s=!0){const a=i.normalizationType,d=i.normalizationTotal,c=this.fieldsIndex.get(i.field),f=l(c)||r(c),h=n(c);return e.map(e=>{let l=i.field&&this.getFieldValue(e,i.field,this.fieldsIndex.get(i.field));if(i.field2?(l=`${u(l)}${i.fieldDelimiter}${u(this.getFieldValue(e,i.field2,this.fieldsIndex.get(i.field2)))}`,i.field3&&(l=`${l}${i.fieldDelimiter}${u(this.getFieldValue(e,i.field3,this.fieldsIndex.get(i.field3)))}`)):"string"==typeof l&&s&&(f?l=l?new Date(l).getTime():null:h&&(l=l?t(l):null)),a&&Number.isFinite(l)){const t="field"===a&&i.normalizationField?this.getFieldValue(e,i.normalizationField,this.fieldsIndex.get(i.normalizationField)):null;l=o(l,a,t,d)}return l})}async getExpressionValues(t,e,i,s,l){const{arcadeUtils:r}=await d(),n=r.hasGeometryOperations(e);n&&await r.enableGeometryOperations();const u=r.createFunction(e),o=r.getViewInfo(i),c={fields:this.fieldsIndex.fields};return t.map(t=>{const e={attributes:this.featureAdapter.getAttributes(t),layer:c,geometry:n?{...a(s.geometryType,this.featureAdapter.getGeometry(t)),spatialReference:i.spatialReference}:null},d=r.createExecContext(e,o,l);return r.executeFunction(u,d)})}validateItem(t,e){return this._fieldDataCache.has(e)||this._fieldDataCache.set(e,{alias:e,clause:i(e,this.fieldsIndex)}),this._fieldDataCache.get(e)?.clause?.testFeature(t,this.featureAdapter)??!1}validateItems(t,e){return this._fieldDataCache.has(e)||this._fieldDataCache.set(e,{alias:e,clause:i(e,this.fieldsIndex)}),this._fieldDataCache.get(e)?.clause?.testSet(t,this.featureAdapter)??!1}_processAttributesForOutFields(t){const e=this.outFields;if(!e?.length)return this.featureAdapter.getAttributes(t);const i={};for(const s of e){const{alias:e,clause:a}=this._fieldDataCache.get(s);i[e]=a?a.calculateValue(t,this.featureAdapter):this.featureAdapter.getAttribute(t,e)}return i}_processAttributesForDistinctValues(t){if(null==t||!this.returnDistinctValues)return t;const e=this.outFields,i=[];if(e)for(const l of e){const{alias:e}=this._fieldDataCache.get(l);i.push(t[e])}else for(const l in t)i.push(t[l]);const s=`${(e||["*"]).join(",")}=${i.join(",")}`;let a=this._returnDistinctMap.get(s)||0;return this._returnDistinctMap.set(s,++a),a>1?null:t}}export{c as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{insertSortedStableTopN as e}from"../../../core/arrayUtils.js";import{clone as t}from"../../../core/lang.js";import{polygonCentroid as i,extentCentroid as s}from"../../../geometry/support/centroid.js";import{getPolygonExtent as a,getGeometryExtent as r}from"../../../geometry/support/extentUtils.js";import{toQuantizationTransform as n}from"../../../geometry/support/quantizationUtils.js";import{isValid as o,equals as l}from"../../../geometry/support/spatialReferenceUtils.js";import{closestPointOnCurve as u}from"../../../geometry/support/curves/closestPointOnCurve.js";import{getEndpoint as c,isCoordinate as m,cloneCurve as d}from"../../../geometry/support/curves/curveUtils.js";import p from"./AttributesBuilder.js";import{cleanFromGeometryEngine as f,getGeometry as h,transformCentroid as y}from"./geometryUtils.js";import{project as g}from"./projectionSupport.js";import{getDateInNumber as x}from"./queryUtils.js";import{SnappingCandidateEdge as F,SnappingCandidateVertex as T}from"./SnappingCandidate.js";import{isDateField as I,isDateOnlyField as _,isTimestampOffsetField as v,isStringField as V,isTimeOnlyField as S}from"../../support/fieldUtils.js";import b from"../../../rest/support/AutoIntervalBinParameters.js";import z from"../../../rest/support/DateBinParameters.js";import{unitsDict as R}from"../../../rest/support/DateBinUtils.js";import B from"../../../rest/support/FixedBoundariesBinParameters.js";import M from"../../../rest/support/FixedIntervalBinParameters.js";import{calculateStringStatistics as A,calculateStatistics as w,processSummaryStatisticsResult as N,calculateUniqueValuesCount as D,createUVResult as P,calculateClassBreaks as q,resolveCBResult as O,calculateHistogram as j,calculatePercentile as C,binIndex as G,getBinParams as Z,isNullCountSupported as E,getAttributeComparator as H}from"../../../statistics/utils.js";import{utc as U}from"../../../time/constants.js";import{DateTime as k}from"luxon";const J="bin";class Q{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasZ=!!t.returnZ&&i.hasZ,this.hasM=!!t.returnM&&i.hasM,this.fieldsIndex=i.fieldsIndex,this.objectIdField=i.objectIdField,this.spatialReference=i.spatialReference,this.featureAdapter=i.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new p(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:i,outStatistics:s}=this.query,a=t?.length;if(!!!a)return 1;const r=new Map,n=new Map,o=new Set;for(const l of s){const{statisticType:s}=l,a="exceedslimit"!==s?l.onStatisticField:void 0;if(!n.has(a)){const i=[];for(const s of t){const t=this._getAttributeValues(e,s,this.items,r);i.push(t)}n.set(a,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}const u=n.get(a);for(const t in u){const{data:s,items:a}=u[t],r=s.join(",");i&&!e.validateItems(a,i)||o.add(r)}}return o.size}async createQueryResponse(){let e;if(this.query.outStatistics){e=this.query.outStatistics.some(e=>"exceedslimit"===e.statisticType)?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items)}else e=this._createFeatureQueryResponse(this.query);if(this.query.returnQueryGeometry){const t=this.query.geometry;o(this.query.outSR)&&!l(t.spatialReference,this.query.outSR)?e.queryGeometry=f({spatialReference:this.query.outSR,...g(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=f({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,i){const s=this.featureAdapter,{point:a}=e,r="number"==typeof e.distance?e.distance:e.distance.x,n="number"==typeof e.distance?e.distance:e.distance.y;function o(e,t){const i=(e-a.x)/r,s=(t-a.y)/n;return i*i+s*s}const l={candidates:[]},p="esriGeometryPolygon"===this.geometryType,f="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,h=this._getPointCreator(t,this.spatialReference,i),y=new X(null,0),g=new X(null,0),x={x:0,y:0,z:0};for(const u of this.items){const e=s.getObjectId(u),t=s.getGeometryWithCurves?.(u);if(null!=t){_(t,e);continue}const i=s.getGeometry(u);null==i||I(i,e)}return l.candidates.sort((e,t)=>e.distance-t.distance),l;function I(t,i){const{coords:s,stride:r}=t,n=t.isPoint?L:t.lengths;if(y.coords=s,g.coords=s,e.returnEdge){let e=0;for(let t=0;t<n.length;t++){const s=n[t],u=e;for(let t=0;t<s;t++,e+=r){if(!p&&t===s-1)continue;if(y.coordsIndex=e,g.coordsIndex=t===s-1?u:e+r,!Y(x,a,y,g))continue;const n=o(x.x,x.y);n<=1&&l.candidates.push(new F(i,h(x),Math.sqrt(n),h(y),h(g)))}}}if("all"===e.vertexMode){let e=0;for(let t=0;t<n.length;t++){const s=n[t],a=e,u=g;u.coordsIndex=a;for(let t=0;t<s;t++,e+=r){if(y.coordsIndex=e,p&&t===s-1&&y.x===u.x&&y.y===u.y)continue;const a=o(y.x,y.y);a<=1&&l.candidates.push(new T(i,h(y),Math.sqrt(a)))}}}else if(f&&"ends"===e.vertexMode){let e=0;const t=[];for(let i=0;i<n.length;i++){t.push(e);const s=n[i];e+=s*r,s>1&&t.push(e-r)}for(const s of t){y.coordsIndex=s;const e=o(y.x,y.y);e<=1&&l.candidates.push(new T(i,h(y),Math.sqrt(e)))}}}function _(t,i){const{candidates:s}=l,r={x:0,y:0,z:0};if(e.returnEdge){const e=[a.x,a.y],n=new X(e,0),l=new X(e,0);for(const{segments:a}of t.parts)for(const{start:t,curve:p}of a){const{curvePoint:a}=u(t,p,e),f=o(...a);if(f>1)continue;[r.x,r.y]=a,n.coords=t,l.coords=c(p);const y=m(p)?null:d(p);s.push(new F(i,h(r),Math.sqrt(f),h(n),h(l),!1,y))}}function n(e){r.x=t.vertexXY[2*e],r.y=t.vertexXY[2*e+1];const a=o(r.x,r.y);a>1||(r.z=t.vertexZ?.[e]??0,s.push(new T(i,h(r),Math.sqrt(a))))}if("all"===e.vertexMode){const{vertexCount:e}=t;for(let t=0;t<e;++t)n(t);return}if("ends"===e.vertexMode)switch(t.type){case"point":n(0);break;case"polyline":for(let e=0;e<t.partCount;++e){const i=t.partOffsets[e],s=t.partOffsets[e+1]-1;n(i),s!==i&&n(s)}}}}_getPointCreator(e,t,i){const s=null==i||l(t,i)?e=>e:e=>g(e,t,i),{hasZ:a}=this,r=0;return a&&e?({x:e,y:t,z:i})=>s({x:e,y:t,z:i}):({x:e,y:t})=>s({x:e,y:t,z:r})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,minValue:n,maxValue:o,scale:l,timeZone:u,outStatisticTypes:c}=e,m=this.fieldsIndex.get(t),d=I(m)||_(m)||v(m),p=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,scale:l,timeZone:u},this.items),f=E({normalizationType:a,normalizationField:s,minValue:n,maxValue:o}),h={value:.5,fieldType:m?.type},y=V(m)?A({values:p,supportsNullCount:f,percentileParams:h,outStatisticTypes:c}):w({values:p,minValue:n,maxValue:o,useSampleStdDev:!a,supportsNullCount:f,percentileParams:h,outStatisticTypes:c});return N(y,c,d)}async createUniqueValuesResponse(e){const{field:t,valueExpression:i,domains:s,returnAllCodedValues:a,scale:r,timeZone:n}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:r,timeZone:n},this.items,!1),l=D(o);return P(l,s,a,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:m,timeZone:d}=e,p=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,scale:m,timeZone:d},this.items),f=q(p,{field:t,normalizationField:s,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return O(f,n)}async createHistogramResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:m,timeZone:d}=e,p=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,scale:m,timeZone:d},this.items);return j(p,{field:t,normalizationField:s,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(const s of t.slice().reverse()){const{compare:t,fieldOrExpression:a,fieldInfo:r}=W(s,this.fieldsIndex);e.sort((e,s)=>t(i(e,a,r),i(s,a,r)))}}_topNFeatures(t,i,s,a){if(t.length>1&&i?.length){const r=i.map(e=>{const{compare:t,fieldOrExpression:i,fieldInfo:s}=W(e,this.fieldsIndex);return(e,r)=>t(a(e,i,s),a(r,i,s))}).reduceRight((e,t)=>(i,s)=>{const a=t(i,s);return 0===a||Number.isNaN(a)?e(i,s):a}),n=[];for(const i of t)e(n,i,s,r);return n}return t.slice(0,s)}_createFeatureQueryResponse(e){const{items:t,geometryType:i,hasM:s,hasZ:a,objectIdField:r,spatialReference:o}=this,{outFields:l,outSR:u,quantizationParameters:c,resultRecordCount:m,resultOffset:d,returnZ:p,returnM:h}=e,y=null!=m&&t.length>(d||0)+m,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:i,hasM:s&&h,hasZ:a&&p,objectIdFieldName:r,spatialReference:f(u||o),transform:c&&n(c)||null}}_createFeatures(e,t){const i=new p(e,this.featureAdapter,this.fieldsIndex),{hasM:s,hasZ:a}=this,{orderByFields:r,quantizationParameters:o,returnGeometry:l,returnCentroid:u,maxAllowableOffset:c,resultOffset:m,resultRecordCount:d,returnZ:f=!1,returnM:g=!1}=e,x=a&&f,F=s&&g;let T;const I=m||0,_=null!=d?I+d:null;null!=_&&_<=5e3&&_<t.length?T=this._topNFeatures(t,r,_,(e,t,s)=>i.getFieldValue(e,t,s)):(T=[...t],this._sortFeatures(T,r,(e,t,s)=>i.getFieldValue(e,t,s))),(I>0||null!=_)&&(T=T.slice(I,_??void 0));const v=[];let V=0;if(this.geometryType&&(l||u)){const e=n(o)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!u)for(const s of T){const a=this.featureAdapter.getGeometry(s),r=this._addFeatureJSONMetadata(s,{attributes:i.getAttributes(s),geometry:h(this.geometryType,a,c,e,x,F)});t&&a&&!r.geometry&&(r.centroid=y(this,this.featureAdapter.getCentroid(s,this),e)),v[V++]=r}else if(!l&&u)for(const s of T)v[V++]=this._addFeatureJSONMetadata(s,{attributes:i.getAttributes(s),centroid:y(this,this.featureAdapter.getCentroid(s,this),e)});else for(const s of T)v[V++]=this._addFeatureJSONMetadata(s,{attributes:i.getAttributes(s),centroid:y(this,this.featureAdapter.getCentroid(s,this),e),geometry:h(this.geometryType,this.featureAdapter.getGeometry(s),c,e,x,F)})}else for(const n of T){const e=i.getAttributes(n);e&&(v[V++]=this._addFeatureJSONMetadata(n,{attributes:e}))}return v}_addFeatureJSONMetadata(e,t){const i=this.featureAdapter.getMetadata?.(e);return void 0!==i&&(t.metadata=i),t}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;for(const a of this.query.outStatistics??[])if("exceedslimit"===a.statisticType){t=null!=a.maxPointCount?a.maxPointCount:Number.POSITIVE_INFINITY,i=null!=a.maxRecordCount?a.maxRecordCount:Number.POSITIVE_INFINITY,s=null!=a.maxVertexCount?a.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>i)e=!0;else{e=this.items.reduce((e,t)=>{const i=this.featureAdapter.getGeometry(t);return e+(i?.size??0)},0)>s}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,i={attributes:{}}){const s=[],a=new Map,r=new Map,n=new Map,o=new Map,l=new p(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:c,having:m,orderByFields:d,resultRecordCount:f}=e,h=c?.length,y=!!h,g=y?c[0]:null,x=y&&!this.fieldsIndex.get(g);for(const p of u??[]){const{outStatisticFieldName:e,statisticType:u}=p,d=p,f="exceedslimit"!==u?p.onStatisticField:void 0,F="percentile_disc"===u||"percentile_cont"===u,T="EnvelopeAggregate"===u||"CentroidAggregate"===u||"ConvexHullAggregate"===u,I=y&&1===h&&(f===g||x)&&"count"===u;if(y){if(!n.has(f)){const e=[];for(const i of c){const s=this._getAttributeValues(l,i,t,a);e.push(s)}n.set(f,this._calculateUniqueValues(e,t,!T&&l.returnDistinctValues))}const i=n.get(f);if(!i)continue;const s=Object.keys(i);for(const r of s){const{count:s,data:n,items:u,itemPositions:p}=i[r],h=n.join(",");if(!m||l.validateItems(u,m)){const i=o.get(h)||{attributes:{}};if(T){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:t}=await this._getAggregateGeometry(d,u);i.aggregateGeometries[t]=e}else{let r=null;if(I)r=s;else{const e=this._getAttributeValues(l,f,t,a),i=p.map(t=>e[t]);r=F&&"statisticParameters"in d?this._getPercentileValue(d,i):this._getStatisticValue(d,i,null,l.returnDistinctValues)}i.attributes[e]=r}let r=0;c.forEach((e,t)=>i.attributes[this.fieldsIndex.get(e)?e:"EXPR_"+ ++r]=n[t]),o.set(h,i)}}}else if(T){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(d,t);i.aggregateGeometries[s]=e}else{const s=this._getAttributeValues(l,f,t,a);i.attributes[e]=F&&"statisticParameters"in d?this._getPercentileValue(d,s):this._getStatisticValue(d,s,r,l.returnDistinctValues)}const _="min"!==u&&"max"!==u||!V(this.fieldsIndex.get(f))&&!this._isAnyDateField(f)?null:this.fieldsIndex.get(f)?.type;s.push({name:e,alias:e,type:_||"esriFieldTypeDouble"})}const F=y?Array.from(o.values()):[i];return this._sortFeatures(F,d,(e,t)=>e.attributes[t]),f&&(F.length=Math.min(f,F.length)),{fields:s,features:F}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return I(t)||_(t)||v(t)||S(t)}async _getAggregateGeometry(e,t){const{convexHull:n,union:o}=await import("../../../geometry/geometryEngineJSON.js"),{statisticType:l,outStatisticFieldName:u}=e,{featureAdapter:c,spatialReference:m,geometryType:d}=this,p=t.map(e=>h(d,c.getGeometry(e))),f=n(m,p,!0)[0],y={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===l){const e=f?a(f):r(o(m,p));y.aggregateGeometries={...e,spatialReference:m},y.outStatisticFieldName=u||"extent"}else if("CentroidAggregate"===l){const e=f?i(f):s(r(o(m,p)));y.aggregateGeometries={x:e[0],y:e[1],spatialReference:m},y.outStatisticFieldName=u||"centroid"}else"ConvexHullAggregate"===l&&(y.aggregateGeometries=f,y.outStatisticFieldName=u||"convexHull");return y}_getStatisticValue(e,t,i,s){const{onStatisticField:a,statisticType:r}=e;let n=null;n=i?.has(a)?i.get(a):V(this.fieldsIndex.get(a))||this._isAnyDateField(a)?A({values:t,returnDistinct:s}):w({values:s?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(a,n);return n["var"===r?"variance":r]}_getPercentileValue(e,t){const{onStatisticField:i,statisticParameters:s,statisticType:a}=e,{value:r,orderBy:n}=s,o=this.fieldsIndex.get(i);return C(t,{value:r,orderBy:n,fieldType:o?.type,isDiscrete:"percentile_disc"===a})}_getAttributeValues(e,t,i,s){if(s.has(t))return s.get(t);const a=this.fieldsIndex.get(t),r=i.map(i=>e.getFieldValue(i,t,a));return s.set(t,r),r}_calculateUniqueValues(e,t,i){const s={},a=t.length;for(let r=0;r<a;r++){const a=t[r],n=[];for(const t of e)n.push(t[r]);const o=n.join(",");null==s[o]?s[o]={count:1,data:n,items:[a],itemPositions:[r]}:(i||s[o].count++,s[o].items.push(a),s[o].itemPositions.push(r))}return s}async _getDataValues(e,i,s=!0){const a=new p(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:r,scale:n,timeZone:o}=e;return r?a.getExpressionValues(i,r,{viewingMode:"map",scale:n,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):a.getDataValues(i,t(e),s)}_calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];const s=t.intervals,a=t.min??0,r=t.max??0,n=s.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let o=0;o<e.length;o++){const t=e[o],l=i[o];if(null!=t&&t>=a&&t<=r){const e=G(s,t);e>-1&&(n[e].count++,n[e].items.push(l))}}return n}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:i,outAlias:s,valueType:a}=t,r=[],n=[{name:s??i,alias:s??i,type:a??"esriFieldTypeString"},{name:J,alias:J,type:"esriFieldTypeInteger"}],o=new p(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[i],(e,t,i)=>o.getFieldValue(e,t,i));const c=this._getAttributeValues(o,i,u,l),m=this._calculateUniqueValues([c],u,o.returnDistinctValues);for(const d in m){const{items:t}=m[d],a=await this._createBinsResponse(e,t);if(r.push(...a.features.map(e=>({...e,attributes:{...e.attributes,[s??i]:d}}))),a.fields)for(const e of a.fields)n.some(t=>t.name===e.name)||n.push(e)}return{fields:n,features:r}}async _createBinsResponse(e,t){const i=e.bin;switch(t=t??this.items,i.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(b.fromJSON(i),e,t);case"dateBin":return this._createDateBinsResponse(z.fromJSON(i),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(B.fromJSON(i),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(M.fromJSON(i),e,t)}}async _createAutoIntervalBinsResponse(e,t,i){const{field:s,normalizationField:a,numBins:r,normalizationType:n,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field||e.expression,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),m=Z(c,{field:s,normalizationField:a,normalizationType:n,normalizationTotal:o,numBins:r,minValue:x(n?e.normalizationMinValue:l,!1),maxValue:x(n?e.normalizationMaxValue:u,!1)}),d=this._calculateHistogramBins(c,m,i);return this._createFeaturesFromHistogramBins(d,t)}async _createDateBinsResponse(e,t,i){const{field:s,interval:a,start:r,end:n,snapToData:o,returnFullIntervalBin:l,offset:u,firstDayOfWeek:c}=e,m=a.unit,d=await this._getDataValues({field:s||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},i),p=S(this.fieldsIndex.get(s)),f=R.toJSON(m),h=d.filter(Boolean).sort((e,t)=>e-t),y=null!=r?x(r,p):h[0],g=null!=n?x(n,p):h[h.length-1],F=[];if(null!=y&&null!=g){const e={zone:t.outTimeReference?.ianaTimeZone??U},i=u?.unit?R.toJSON(u.unit):"milliseconds",s={[i]:u?.value||0},r=k.fromMillis(y,e).minus(s),n=k.fromMillis(g,e).minus(s),m="number"==typeof c&&c>=1&&c<=7?c:7,d=(e,t)=>{const i=(e.weekday-t+7)%7;return e.minus({days:i}).startOf("day")};if("last"===o){let e="week"===f?((e,t)=>d(e,t).plus({days:7}))(n,m):n;for(;e>r;){const t=e.minus({[f]:a.value});if(t<r){F.unshift([l?t.plus(s).toMillis():r.plus(s).toMillis(),e.plus(s).toMillis()]);break}F.unshift([t.plus(s).toMillis(),e.plus(s).toMillis()]),e=t}}else{let e="first"===o?r:"week"===f?d(r,m):r.startOf(f);for(;e<=n;){const t=e.plus({[f]:a.value});if(t>n){F.push([e.plus(s).toMillis(),l?t.plus(s).toMillis():n.plus(s).toMillis()]);break}F.push([e.plus(s).toMillis(),t.plus(s).toMillis()]),e=t}}}const T=this._calculateHistogramBins(d,{intervals:F,min:y,max:g},i);return this._createFeaturesFromHistogramBins(T,t)}async _createFixedBoundariesBinsResponse(e,t,i){const{field:s}=e,a=await this._getDataValues({field:s||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},i),r=S(this.fieldsIndex.get(s)),n=e.boundaries.map(e=>x(e,r)).sort((e,t)=>e-t),o=[];for(let c=0;c<n.length-1;c++)o.push([n[c],n[c+1]]);const l={intervals:o,min:n.at(0),max:n.at(-1)},u=this._calculateHistogramBins(a,l,i);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,i){const{field:s,interval:a,normalizationType:r,start:n,end:o}=e,l=await this._getDataValues({field:s||e.expression,normalizationField:e.normalizationField,normalizationType:r,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),u=S(this.fieldsIndex.get(s)),c=Z(l,{field:s,classificationMethod:"defined-interval",definedInterval:a,minValue:x(r?e.normalizationMinValue:n,u),maxValue:x(r?e.normalizationMaxValue:o,u)},!0),m=this._calculateHistogramBins(l,c,i);return this._createFeaturesFromHistogramBins(m,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:i,lowerBoundaryAlias:s}=t,a=s||"lowerBoundary",r=i||"upperBoundary",n=[],o=[{name:a,alias:a,type:"esriFieldTypeDouble"},{name:r,alias:r,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:J,alias:J,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;const m="dateBin"===t.bin.type,d=t.outTimeReference?.ianaTimeZone;for(const p of e){const{minValue:e,maxValue:i,items:s}=p,f={attributes:{}};let h;if(f.attributes[a]=m&&d&&null!=e?k.fromMillis(e,{zone:d}).toISO():e,t.bin.hideUpperBound||(f.attributes[r]=m&&d&&null!=i?k.fromMillis(i,{zone:d}).toISO():i),l?(h=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},s),f.attributes[J]=++c,"flat"===t.bin.jsonStyle?n.push(...h.features.map(({attributes:{EXPR_1:e,...t},...i})=>({...i,attributes:u??e?{...t,[u??e]:e,...f.attributes}:{...t,...f.attributes}}))):(f.stackedAttributes=h.features.map(({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t),n.push(f))):(t.bin?.splitBy&&(f.attributes[J]=++c),h=await this._createStatisticsQueryResponse(t,s,f),n.push(f)),h.fields)for(const t of h.fields)o.some(e=>e.name===t.name)||o.push(t)}return"desc"===t.binOrder&&n.reverse(),{fields:o,features:n}}}function Y(e,t,i,s){const a=s.x-i.x,r=s.y-i.y,n=t.x-i.x,o=t.y-i.y,l=a*a+r*r;if(0===l)return!1;const u=n*a+o*r,c=Math.min(1,Math.max(0,u/l));return e.x=i.x+a*c,e.y=i.y+r*c,!0}class X{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const L=[1];function W(e,t){const i=e.split(" "),s=i[0],a=t.get(s),r=!!i[1]&&"desc"===i[1].toLowerCase();return{compare:H(a?.type,r,"case-insensitive"),fieldOrExpression:s,fieldInfo:a}}export{Q as QueryEngineResult};
|
|
2
|
+
import{insertSortedStableTopN as e}from"../../../core/arrayUtils.js";import{clone as t}from"../../../core/lang.js";import i from"../../../geometry/SpatialReference.js";import{polygonCentroid as s,extentCentroid as a}from"../../../geometry/support/centroid.js";import{getPolygonExtent as r,getGeometryExtent as n}from"../../../geometry/support/extentUtils.js";import{toQuantizationTransform as o}from"../../../geometry/support/quantizationUtils.js";import{isValid as l,equals as u}from"../../../geometry/support/spatialReferenceUtils.js";import{closestPointOnCurve as c}from"../../../geometry/support/curves/closestPointOnCurve.js";import{getEndpoint as m,isCoordinate as d,cloneCurve as p}from"../../../geometry/support/curves/curveUtils.js";import f from"./AttributesBuilder.js";import{cleanFromGeometryEngine as h,getGeometry as y,transformCentroid as g}from"./geometryUtils.js";import{project as x}from"./projectionSupport.js";import{getDateInNumber as F}from"./queryUtils.js";import{SnappingCandidateEdge as T,SnappingCandidateVertex as I}from"./SnappingCandidate.js";import{isDateField as _,isDateOnlyField as v,isTimestampOffsetField as V,isStringField as S,isTimeOnlyField as b}from"../../support/fieldUtils.js";import R from"../../../rest/support/AutoIntervalBinParameters.js";import z from"../../../rest/support/DateBinParameters.js";import{unitsDict as B}from"../../../rest/support/DateBinUtils.js";import M from"../../../rest/support/FixedBoundariesBinParameters.js";import A from"../../../rest/support/FixedIntervalBinParameters.js";import{calculateStringStatistics as w,calculateStatistics as N,processSummaryStatisticsResult as D,calculateUniqueValuesCount as P,createUVResult as q,calculateClassBreaks as O,resolveCBResult as j,calculateHistogram as C,calculatePercentile as G,binIndex as Z,getBinParams as E,isNullCountSupported as H,getAttributeComparator as U}from"../../../statistics/utils.js";import{utc as k}from"../../../time/constants.js";import{DateTime as J}from"luxon";const Q="bin";class Y{constructor(e,t,i){this.items=e,this.query=t,this.geometryType=i.geometryType,this.hasZ=!!t.returnZ&&i.hasZ,this.hasM=!!t.returnM&&i.hasM,this.fieldsIndex=i.fieldsIndex,this.objectIdField=i.objectIdField,this.spatialReference=i.spatialReference,this.featureAdapter=i.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new f(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:i,outStatistics:s}=this.query,a=t?.length;if(!!!a)return 1;const r=new Map,n=new Map,o=new Set;for(const l of s){const{statisticType:s}=l,a="exceedslimit"!==s?l.onStatisticField:void 0;if(!n.has(a)){const i=[];for(const s of t){const t=this._getAttributeValues(e,s,this.items,r);i.push(t)}n.set(a,this._calculateUniqueValues(i,this.items,e.returnDistinctValues))}const u=n.get(a);for(const t in u){const{data:s,items:a}=u[t],r=s.join(",");i&&!e.validateItems(a,i)||o.add(r)}}return o.size}async createQueryResponse(){let e;if(this.query.outStatistics){e=this.query.outStatistics.some(e=>"exceedslimit"===e.statisticType)?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items)}else e=this._createFeatureQueryResponse(this.query);if(this.query.returnQueryGeometry){const t=this.query.geometry;l(this.query.outSR)&&!u(t.spatialReference,this.query.outSR)?e.queryGeometry=h({spatialReference:this.query.outSR,...x(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=h({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,i){const s=this.featureAdapter,{point:a}=e,r="number"==typeof e.distance?e.distance:e.distance.x,n="number"==typeof e.distance?e.distance:e.distance.y;function o(e,t){const i=(e-a.x)/r,s=(t-a.y)/n;return i*i+s*s}const l={candidates:[]},u="esriGeometryPolygon"===this.geometryType,f="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,h=this._getPointCreator(t,this.spatialReference,i),y=new L(null,0),g=new L(null,0),x={x:0,y:0,z:0};for(const c of this.items){const e=s.getObjectId(c),t=s.getGeometryWithCurves?.(c);if(null!=t){_(t,e);continue}const i=s.getGeometry(c);null==i||F(i,e)}return l.candidates.sort((e,t)=>e.distance-t.distance),l;function F(t,i){const{coords:s,stride:r}=t,n=t.isPoint?W:t.lengths;if(y.coords=s,g.coords=s,e.returnEdge){let e=0;for(let t=0;t<n.length;t++){const s=n[t],c=e;for(let t=0;t<s;t++,e+=r){if(!u&&t===s-1)continue;if(y.coordsIndex=e,g.coordsIndex=t===s-1?c:e+r,!X(x,a,y,g))continue;const n=o(x.x,x.y);n<=1&&l.candidates.push(new T(i,h(x),Math.sqrt(n),h(y),h(g)))}}}if("all"===e.vertexMode){let e=0;for(let t=0;t<n.length;t++){const s=n[t],a=e,c=g;c.coordsIndex=a;for(let t=0;t<s;t++,e+=r){if(y.coordsIndex=e,u&&t===s-1&&y.x===c.x&&y.y===c.y)continue;const a=o(y.x,y.y);a<=1&&l.candidates.push(new I(i,h(y),Math.sqrt(a)))}}}else if(f&&"ends"===e.vertexMode){let e=0;const t=[];for(let i=0;i<n.length;i++){t.push(e);const s=n[i];e+=s*r,s>1&&t.push(e-r)}for(const s of t){y.coordsIndex=s;const e=o(y.x,y.y);e<=1&&l.candidates.push(new I(i,h(y),Math.sqrt(e)))}}}function _(t,i){const{candidates:s}=l,r={x:0,y:0,z:0};if(e.returnEdge){const e=[a.x,a.y],n=new L(e,0),l=new L(e,0);for(const{segments:a}of t.parts)for(const{start:t,curve:u}of a){const{curvePoint:a}=c(t,u,e),f=o(...a);if(f>1)continue;[r.x,r.y]=a,n.coords=t,l.coords=m(u);const y=d(u)?null:p(u);s.push(new T(i,h(r),Math.sqrt(f),h(n),h(l),!1,y))}}function n(e){r.x=t.vertexXY[2*e],r.y=t.vertexXY[2*e+1];const a=o(r.x,r.y);a>1||(r.z=t.vertexZ?.[e]??0,s.push(new I(i,h(r),Math.sqrt(a))))}if("all"===e.vertexMode){const{vertexCount:e}=t;for(let t=0;t<e;++t)n(t);return}if("ends"===e.vertexMode)switch(t.type){case"point":n(0);break;case"polyline":for(let e=0;e<t.partCount;++e){const i=t.partOffsets[e],s=t.partOffsets[e+1]-1;n(i),s!==i&&n(s)}}}}_getPointCreator(e,t,i){const s=null==i||u(t,i)?e=>e:e=>x(e,t,i),{hasZ:a}=this,r=0;return a&&e?({x:e,y:t,z:i})=>s({x:e,y:t,z:i}):({x:e,y:t})=>s({x:e,y:t,z:r})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,minValue:n,maxValue:o,scale:l,timeZone:u,outStatisticTypes:c}=e,m=this.fieldsIndex.get(t),d=_(m)||v(m)||V(m),p=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,scale:l,timeZone:u},this.items),f=H({normalizationType:a,normalizationField:s,minValue:n,maxValue:o}),h={value:.5,fieldType:m?.type},y=S(m)?w({values:p,supportsNullCount:f,percentileParams:h,outStatisticTypes:c}):N({values:p,minValue:n,maxValue:o,useSampleStdDev:!a,supportsNullCount:f,percentileParams:h,outStatisticTypes:c});return D(y,c,d)}async createUniqueValuesResponse(e){const{field:t,valueExpression:i,domains:s,returnAllCodedValues:a,scale:r,timeZone:n}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:i,scale:r,timeZone:n},this.items,!1),l=P(o);return q(l,s,a,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:m,timeZone:d}=e,p=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,scale:m,timeZone:d},this.items),f=O(p,{field:t,normalizationField:s,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return j(f,n)}async createHistogramResponse(e){const{field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:m,timeZone:d}=e,p=await this._getDataValues({field:t,valueExpression:i,normalizationField:s,normalizationType:a,normalizationTotal:r,scale:m,timeZone:d},this.items);return C(p,{field:t,normalizationField:s,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,i){if(e.length>1&&t?.length)for(const s of t.slice().reverse()){const{compare:t,fieldOrExpression:a,fieldInfo:r}=K(s,this.fieldsIndex);e.sort((e,s)=>t(i(e,a,r),i(s,a,r)))}}_topNFeatures(t,i,s,a){if(t.length>1&&i?.length){const r=i.map(e=>{const{compare:t,fieldOrExpression:i,fieldInfo:s}=K(e,this.fieldsIndex);return(e,r)=>t(a(e,i,s),a(r,i,s))}).reduceRight((e,t)=>(i,s)=>{const a=t(i,s);return 0===a||Number.isNaN(a)?e(i,s):a}),n=[];for(const i of t)e(n,i,s,r);return n}return t.slice(0,s)}_createFeatureQueryResponse(e){const{items:t,geometryType:i,hasM:s,hasZ:a,objectIdField:r,spatialReference:n}=this,{outFields:l,outSR:u,quantizationParameters:c,resultRecordCount:m,resultOffset:d,returnZ:p,returnM:f}=e,y=null!=m&&t.length>(d||0)+m,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:i,hasM:s&&f,hasZ:a&&p,objectIdFieldName:r,spatialReference:h(u||n),transform:c&&o(c)||null}}_createFeatures(e,t){const i=new f(e,this.featureAdapter,this.fieldsIndex),{hasM:s,hasZ:a}=this,{orderByFields:r,quantizationParameters:n,returnGeometry:l,returnCentroid:u,maxAllowableOffset:c,resultOffset:m,resultRecordCount:d,returnZ:p=!1,returnM:h=!1}=e,x=a&&p,F=s&&h;let T;const I=m||0,_=null!=d?I+d:null;null!=_&&_<=5e3&&_<t.length?T=this._topNFeatures(t,r,_,(e,t,s)=>i.getFieldValue(e,t,s)):(T=[...t],this._sortFeatures(T,r,(e,t,s)=>i.getFieldValue(e,t,s))),(I>0||null!=_)&&(T=T.slice(I,_??void 0));const v=[];let V=0;if(this.geometryType&&(l||u)){const e=o(n)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!u)for(const s of T){const a=this.featureAdapter.getGeometry(s),r=this._addFeatureJSONMetadata(s,{attributes:i.getAttributes(s),geometry:y(this.geometryType,a,c,e,x,F)});t&&a&&!r.geometry&&(r.centroid=g(this,this.featureAdapter.getCentroid(s,this),e)),v[V++]=r}else if(!l&&u)for(const s of T)v[V++]=this._addFeatureJSONMetadata(s,{attributes:i.getAttributes(s),centroid:g(this,this.featureAdapter.getCentroid(s,this),e)});else for(const s of T)v[V++]=this._addFeatureJSONMetadata(s,{attributes:i.getAttributes(s),centroid:g(this,this.featureAdapter.getCentroid(s,this),e),geometry:y(this.geometryType,this.featureAdapter.getGeometry(s),c,e,x,F)})}else for(const o of T){const e=i.getAttributes(o);e&&(v[V++]=this._addFeatureJSONMetadata(o,{attributes:e}))}return v}_addFeatureJSONMetadata(e,t){const i=this.featureAdapter.getMetadata?.(e);return void 0!==i&&(t.metadata=i),t}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;for(const a of this.query.outStatistics??[])if("exceedslimit"===a.statisticType){t=null!=a.maxPointCount?a.maxPointCount:Number.POSITIVE_INFINITY,i=null!=a.maxRecordCount?a.maxRecordCount:Number.POSITIVE_INFINITY,s=null!=a.maxVertexCount?a.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>i)e=!0;else{e=this.items.reduce((e,t)=>{const i=this.featureAdapter.getGeometry(t);return e+(i?.size??0)},0)>s}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,i={attributes:{}}){const s=[],a=new Map,r=new Map,n=new Map,o=new Map,l=new f(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:c,having:m,orderByFields:d,resultRecordCount:p}=e,h=c?.length,y=!!h,g=y?c[0]:null,x=y&&!this.fieldsIndex.get(g);for(const f of u??[]){const{outStatisticFieldName:e,statisticType:u}=f,d=f,p="exceedslimit"!==u?f.onStatisticField:void 0,F="percentile_disc"===u||"percentile_cont"===u,T="EnvelopeAggregate"===u||"CentroidAggregate"===u||"ConvexHullAggregate"===u,I=y&&1===h&&(p===g||x)&&"count"===u;if(y){if(!n.has(p)){const e=[];for(const i of c){const s=this._getAttributeValues(l,i,t,a);e.push(s)}n.set(p,this._calculateUniqueValues(e,t,!T&&l.returnDistinctValues))}const i=n.get(p);if(!i)continue;const s=Object.keys(i);for(const r of s){const{count:s,data:n,items:u,itemPositions:f}=i[r],h=n.join(",");if(!m||l.validateItems(u,m)){const i=o.get(h)||{attributes:{}};if(T){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:t}=await this._getAggregateGeometry(d,u);i.aggregateGeometries[t]=e}else{let r=null;if(I)r=s;else{const e=this._getAttributeValues(l,p,t,a),i=f.map(t=>e[t]);r=F&&"statisticParameters"in d?this._getPercentileValue(d,i):this._getStatisticValue(d,i,null,l.returnDistinctValues)}i.attributes[e]=r}let r=0;c.forEach((e,t)=>i.attributes[this.fieldsIndex.get(e)?e:"EXPR_"+ ++r]=n[t]),o.set(h,i)}}}else if(T){i.aggregateGeometries||(i.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:s}=await this._getAggregateGeometry(d,t);i.aggregateGeometries[s]=e}else{const s=this._getAttributeValues(l,p,t,a);i.attributes[e]=F&&"statisticParameters"in d?this._getPercentileValue(d,s):this._getStatisticValue(d,s,r,l.returnDistinctValues)}const _="min"!==u&&"max"!==u||!S(this.fieldsIndex.get(p))&&!this._isAnyDateField(p)?null:this.fieldsIndex.get(p)?.type;s.push({name:e,alias:e,type:_||"esriFieldTypeDouble"})}const F=y?Array.from(o.values()):[i];return this._sortFeatures(F,d,(e,t)=>e.attributes[t]),p&&(F.length=Math.min(p,F.length)),{fields:s,features:F}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return _(t)||v(t)||V(t)||b(t)}async _getAggregateGeometry(e,t){const{convexHull:i,union:o}=await import("../../../geometry/geometryEngineJSON.js"),{statisticType:l,outStatisticFieldName:u}=e,{featureAdapter:c,spatialReference:m,geometryType:d}=this,p=t.map(e=>y(d,c.getGeometry(e))),f=i(m,p,!0)[0],h={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===l){const e=f?r(f):n(o(m,p));h.aggregateGeometries={...e,spatialReference:m},h.outStatisticFieldName=u||"extent"}else if("CentroidAggregate"===l){const e=f?s(f):a(n(o(m,p)));h.aggregateGeometries={x:e[0],y:e[1],spatialReference:m},h.outStatisticFieldName=u||"centroid"}else"ConvexHullAggregate"===l&&(h.aggregateGeometries=f,h.outStatisticFieldName=u||"convexHull");return h}_getStatisticValue(e,t,i,s){const{onStatisticField:a,statisticType:r}=e;let n=null;n=i?.has(a)?i.get(a):S(this.fieldsIndex.get(a))||this._isAnyDateField(a)?w({values:t,returnDistinct:s}):N({values:s?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),i&&i.set(a,n);return n["var"===r?"variance":r]}_getPercentileValue(e,t){const{onStatisticField:i,statisticParameters:s,statisticType:a}=e,{value:r,orderBy:n}=s,o=this.fieldsIndex.get(i);return G(t,{value:r,orderBy:n,fieldType:o?.type,isDiscrete:"percentile_disc"===a})}_getAttributeValues(e,t,i,s){if(s.has(t))return s.get(t);const a=this.fieldsIndex.get(t),r=i.map(i=>e.getFieldValue(i,t,a));return s.set(t,r),r}_calculateUniqueValues(e,t,i){const s={},a=t.length;for(let r=0;r<a;r++){const a=t[r],n=[];for(const t of e)n.push(t[r]);const o=n.join(",");null==s[o]?s[o]={count:1,data:n,items:[a],itemPositions:[r]}:(i||s[o].count++,s[o].items.push(a),s[o].itemPositions.push(r))}return s}async _getDataValues(e,s,a=!0){const r=new f(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:n,scale:o,timeZone:l}=e,u=i.fromJSON(this.query.outSR||this.spatialReference);return n?r.getExpressionValues(s,n,{viewingMode:"map",scale:o,spatialReference:u},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},l):r.getDataValues(s,t(e),a)}_calculateHistogramBins(e,t,i){if(null==t.min&&null==t.max)return[];const s=t.intervals,a=t.min??0,r=t.max??0,n=s.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let o=0;o<e.length;o++){const t=e[o],l=i[o];if(null!=t&&t>=a&&t<=r){const e=Z(s,t);e>-1&&(n[e].count++,n[e].items.push(l))}}return n}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:i,outAlias:s,valueType:a}=t,r=[],n=[{name:s??i,alias:s??i,type:a??"esriFieldTypeString"},{name:Q,alias:Q,type:"esriFieldTypeInteger"}],o=new f(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[i],(e,t,i)=>o.getFieldValue(e,t,i));const c=this._getAttributeValues(o,i,u,l),m=this._calculateUniqueValues([c],u,o.returnDistinctValues);for(const d in m){const{items:t}=m[d],a=await this._createBinsResponse(e,t);if(r.push(...a.features.map(e=>({...e,attributes:{...e.attributes,[s??i]:d}}))),a.fields)for(const e of a.fields)n.some(t=>t.name===e.name)||n.push(e)}return{fields:n,features:r}}async _createBinsResponse(e,t){const i=e.bin;switch(t=t??this.items,i.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(R.fromJSON(i),e,t);case"dateBin":return this._createDateBinsResponse(z.fromJSON(i),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(M.fromJSON(i),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(A.fromJSON(i),e,t)}}async _createAutoIntervalBinsResponse(e,t,i){const{field:s,normalizationField:a,numBins:r,normalizationType:n,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field||e.expression,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),m=E(c,{field:s,normalizationField:a,normalizationType:n,normalizationTotal:o,numBins:r,minValue:F(n?e.normalizationMinValue:l,!1),maxValue:F(n?e.normalizationMaxValue:u,!1)}),d=this._calculateHistogramBins(c,m,i);return this._createFeaturesFromHistogramBins(d,t)}async _createDateBinsResponse(e,t,i){const{field:s,interval:a,start:r,end:n,snapToData:o,returnFullIntervalBin:l,offset:u,firstDayOfWeek:c}=e,m=a.unit,d=await this._getDataValues({field:s||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},i),p=b(this.fieldsIndex.get(s)),f=B.toJSON(m),h=d.filter(Boolean).sort((e,t)=>e-t),y=null!=r?F(r,p):h[0],g=null!=n?F(n,p):h[h.length-1],x=[];if(null!=y&&null!=g){const e={zone:t.outTimeReference?.ianaTimeZone??k},i=u?.unit?B.toJSON(u.unit):"milliseconds",s={[i]:u?.value||0},r=J.fromMillis(y,e).minus(s),n=J.fromMillis(g,e).minus(s),m="number"==typeof c&&c>=1&&c<=7?c:7,d=(e,t)=>{const i=(e.weekday-t+7)%7;return e.minus({days:i}).startOf("day")};if("last"===o){let e="week"===f?((e,t)=>d(e,t).plus({days:7}))(n,m):n;for(;e>r;){const t=e.minus({[f]:a.value});if(t<r){x.unshift([l?t.plus(s).toMillis():r.plus(s).toMillis(),e.plus(s).toMillis()]);break}x.unshift([t.plus(s).toMillis(),e.plus(s).toMillis()]),e=t}}else{let e="first"===o?r:"week"===f?d(r,m):r.startOf(f);for(;e<=n;){const t=e.plus({[f]:a.value});if(t>n){x.push([e.plus(s).toMillis(),l?t.plus(s).toMillis():n.plus(s).toMillis()]);break}x.push([e.plus(s).toMillis(),t.plus(s).toMillis()]),e=t}}}const T=this._calculateHistogramBins(d,{intervals:x,min:y,max:g},i);return this._createFeaturesFromHistogramBins(T,t)}async _createFixedBoundariesBinsResponse(e,t,i){const{field:s}=e,a=await this._getDataValues({field:s||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},i),r=b(this.fieldsIndex.get(s)),n=e.boundaries.map(e=>F(e,r)).sort((e,t)=>e-t),o=[];for(let c=0;c<n.length-1;c++)o.push([n[c],n[c+1]]);const l={intervals:o,min:n.at(0),max:n.at(-1)},u=this._calculateHistogramBins(a,l,i);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,i){const{field:s,interval:a,normalizationType:r,start:n,end:o}=e,l=await this._getDataValues({field:s||e.expression,normalizationField:e.normalizationField,normalizationType:r,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},i),u=b(this.fieldsIndex.get(s)),c=E(l,{field:s,classificationMethod:"defined-interval",definedInterval:a,minValue:F(r?e.normalizationMinValue:n,u),maxValue:F(r?e.normalizationMaxValue:o,u)},!0),m=this._calculateHistogramBins(l,c,i);return this._createFeaturesFromHistogramBins(m,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:i,lowerBoundaryAlias:s}=t,a=s||"lowerBoundary",r=i||"upperBoundary",n=[],o=[{name:a,alias:a,type:"esriFieldTypeDouble"},{name:r,alias:r,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:Q,alias:Q,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;const m="dateBin"===t.bin.type,d=t.outTimeReference?.ianaTimeZone;for(const p of e){const{minValue:e,maxValue:i,items:s}=p,f={attributes:{}};let h;if(f.attributes[a]=m&&d&&null!=e?J.fromMillis(e,{zone:d}).toISO():e,t.bin.hideUpperBound||(f.attributes[r]=m&&d&&null!=i?J.fromMillis(i,{zone:d}).toISO():i),l?(h=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},s),f.attributes[Q]=++c,"flat"===t.bin.jsonStyle?n.push(...h.features.map(({attributes:{EXPR_1:e,...t},...i})=>({...i,attributes:u??e?{...t,[u??e]:e,...f.attributes}:{...t,...f.attributes}}))):(f.stackedAttributes=h.features.map(({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t),n.push(f))):(t.bin?.splitBy&&(f.attributes[Q]=++c),h=await this._createStatisticsQueryResponse(t,s,f),n.push(f)),h.fields)for(const t of h.fields)o.some(e=>e.name===t.name)||o.push(t)}return"desc"===t.binOrder&&n.reverse(),{fields:o,features:n}}}function X(e,t,i,s){const a=s.x-i.x,r=s.y-i.y,n=t.x-i.x,o=t.y-i.y,l=a*a+r*r;if(0===l)return!1;const u=n*a+o*r,c=Math.min(1,Math.max(0,u/l));return e.x=i.x+a*c,e.y=i.y+r*c,!0}class L{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const W=[1];function K(e,t){const i=e.split(" "),s=i[0],a=t.get(s),r=!!i[1]&&"desc"===i[1].toLowerCase();return{compare:U(a?.type,r,"case-insensitive"),fieldOrExpression:s,fieldInfo:a}}export{Y as QueryEngineResult};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{convertFlatToOptimizedGeometry as t,convertOptimizedGeometryToFlat as e}from"../../../geometry/FlatGeometry.js";import{featureGeometryTypeKebabDictionary as r}from"../../../geometry/support/typeUtils.js";import{FlatFeature as o}from"../FlatFeature.js";const m={getObjectId:t=>t.objectId,getAttributes:t=>t.attributes,getAttribute:(t,e)=>t.attributes[e],cloneWithGeometry:(t,m,i)=>new o(e(r.fromJSON(i),m),t.attributes,null,t.objectId),getGeometry:e=>e.geometry&&t(e.geometry),getGeometryWithCurves:t=>t.geometry,getCentroid:(t,e)=>t.ensureCentroid(e)};export{m as flatFeatureQueryEngineAdapter};
|
|
2
|
+
import{convertFlatToOptimizedGeometry as t,convertOptimizedGeometryToFlat as e}from"../../../geometry/FlatGeometry.js";import{featureGeometryTypeKebabDictionary as r}from"../../../geometry/support/typeUtils.js";import{FlatFeature as o}from"../FlatFeature.js";const m={getObjectId:t=>t.objectId,getAttributes:t=>t.attributes,getAttribute:(t,e)=>t.attributes[e],cloneWithGeometry:(t,m,i)=>new o(e(r.fromJSON(i),m),t.attributes,null,t.objectId,t.displayId,t.distance),getGeometry:e=>e.geometry&&t(e.geometry),getGeometryWithCurves:t=>t.geometry,getCentroid:(t,e)=>t.ensureCentroid(e)};export{m as flatFeatureQueryEngineAdapter};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{OptimizedFeature as t}from"../OptimizedFeature.js";const e={getObjectId:t=>t.objectId,getAttributes:t=>t.attributes,getAttribute:(t,e)=>t.attributes[e],cloneWithGeometry:(e,r,
|
|
2
|
+
import{OptimizedFeature as t}from"../OptimizedFeature.js";const e={getObjectId:t=>t.objectId,getAttributes:t=>t.attributes,getAttribute:(t,e)=>t.attributes[e],cloneWithGeometry:(e,r,i)=>new t(r,e.attributes,null,e.objectId,e.displayId,e.distance),getGeometry:t=>t.geometry,getCentroid:(t,e)=>t.ensureCentroid(e)};export{e as optimizedFeatureQueryEngineAdapter};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import t from"../../core/Error.js";import e from"../../core/Logger.js";import{assertIsSome as r}from"../../core/maybe.js";import{is as n,fromRectValues as o}from"../../geometry/support/aaBoundingBox.js";import{fromValues as s}from"../../geometry/support/aaBoundingRect.js";import{isPoint as u,isPolygon as c,isPolyline as l,isMultipoint as i,isGeometryWithZ as f,isGeometryWithM as a}from"../../geometry/support/jsonTypeUtils.js";import{OptimizedFeature as h}from"./OptimizedFeature.js";import m from"./OptimizedFeatureSet.js";import d from"./OptimizedGeometry.js";import{createFeatureId as g}from"./data/createFeatureId.js";const y=()=>e.getLogger("esri.layers.graphics.featureConversionUtils"),p={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryMultiPatch:3,esriGeometryEnvelope:0};function I({scale:t,translate:e},r){return Math.round((r-e[0])/t[0])}function M({scale:t,translate:e},r){return Math.round((e[1]-r)/t[1])}function b({scale:t,translate:e},r){return Math.round((r-e[0])/t[0])}function w({scale:t,translate:e},r){return Math.round((r-e[1])/t[1])}function G(t,e){return T(t,e,0)}function N(t,e){return T(t,-e,1)}function T({scale:t,translate:e},r,n){return r*t[n]+e[n]}function P(t,e,r){return e&&(t.hasZ=!0),r&&(t.hasM=!0),t}function F(t,e,r,n){if(e&&n&&t!==r)return(e,r,n,o)=>{n[o++]=e[r++],n[o++]=e[r++],t?r++:n[o++]=0,n[o++]=e[r++]??0};const o=2+(r?1:0)+(n?1:0),s=o-((!t&&r?1:0)+(!e&&n?1:0));return(t,e,r,n)=>{for(let u=0;u<o;++u)r[n++]=u<s?t[e++]??0:0}}function Z(t,e,r){if(!t)return null;const{coords:n,hasZ:o,hasM:s}=t,[u,c]=n,l=o?n[2]:0,i=s?n[2+(o?1:0)]:0;return{x:u,y:c,z:e?l:void 0,m:r?i:void 0}}function x(t,e,r,n){for(const{geometry:o,attributes:s}of e)t.push({attributes:s,geometry:Z(o,r,n)});return t}function E(t,e,r,n,o){for(const s of e){const{geometry:e,attributes:u,centroid:c}=s,l=f(e),i=a(e);t.push(new h(e?j(e,r&&l,n&&i):null,u,c?j(c,!1,!1):null,g(s,o)))}return t}function j(t,e=f(t),r=a(t)){const{x:n,y:o,z:s,m:u}=t,c=[n,o];return e&&c.push(s??0),r&&c.push(u??0),new d([],c,e,r)}function v(t,e,r,n){for(const{geometry:o,attributes:s}of e)t.push({geometry:o&&k(o,r,n),attributes:s});return t}function k(t,e,r){if(null==t)return null;const{coords:n,stride:o,hasZ:s,hasM:u}=t,c=F(s,u,e,r),l=[];for(let i=0;i<n.length;i+=o){const t=[];c(n,i,t,0),l.push(t)}return P({points:l},e,r)}function V(t,e,r,n,o){for(const s of e){const{geometry:e,attributes:u}=s,c=f(e),l=a(e);t.push(new h(e?Y(e,r&&c,n&&l):null,u,null,g(s,o)))}return t}function Y(t,e=f(t),r=a(t)){const{points:n,hasZ:o,hasM:s}=t,u=new d([n.length],[],e,r),{coords:c,stride:l}=u;let i=0;const h=F(o??!1,s??!1,e,r);for(const f of n)h(f,0,c,i),i+=l;return u}function _(t,e,r,n){for(const{geometry:o,attributes:s}of e)t.push({geometry:o&&L(o,r,n),attributes:s});return t}function L(t,e,r){if(!t)return null;const{coords:n,lengths:o,stride:s,hasZ:u,hasM:c}=t;let l=0;const i=F(u,c,e,r),f=[];for(const a of o){const t=[];for(let e=0;e<a;e++){const e=[];i(n,l,e,0),l+=s,t.push(e)}f.push(t)}return P({paths:f},e,r)}function O(t,e,r,n,o){for(const s of e){const{geometry:e,attributes:u,centroid:c}=s,l=f(e),i=a(e);t.push(new h(e?S(e,r&&l,n&&i):null,u,c?j(c,!1,!1):null,g(s,o)))}return t}function S(t,e=f(t),r=a(t)){const{paths:n,hasZ:o,hasM:s}=t,u=F(o??!1,s??!1,e,r),c=new d([],[],e,r),{lengths:l,coords:i,stride:h}=c;let m=0;for(const f of n){for(const t of f)u(t,0,i,m),m+=h;l.push(f.length)}return c}function U(t,e,r,n){for(const{geometry:o,attributes:s,centroid:u}of e){const e=z(o,r,n),c=Z(u,!1,!1);t.push(u?{geometry:e,attributes:s,centroid:c}:{geometry:e,attributes:s})}return t}function z(t,e,r){if(!t)return null;const{coords:n,lengths:o,stride:s,hasZ:u,hasM:c}=t;let l=0;const i=F(u,c,e,r),f=[];for(const a of o){const t=[];for(let e=0;e<a;e++){const e=[];i(n,l,e,0),l+=s,t.push(e)}f.push(t)}return P({rings:f},e,r)}function R(t,e,r,n,o){for(const s of e){const{geometry:e,attributes:u,centroid:c}=s,l=f(e),i=a(e);t.push(new h(e?A(e,r&&l,n&&i):null,u,c?j(c,!1,!1):null,g(s,o)))}return t}function A(t,e=f(t),r=a(t)){const{rings:n,hasZ:o,hasM:s}=t,u=new d([],[],e,r),{lengths:c,coords:l,stride:i}=u;let h=0;const m=F(o??!1,s??!1,e,r);for(const f of n){for(const t of f)m(t,0,l,h),h+=i;c.push(f.length)}return u}const $=[],q=[];function B(t,e,r,n,o){$[0]=t;const[s]=C(q,$,e,r,n,o);return dt($),dt(q),s}function C(e,r,n,o,s,u){if(dt(e),!n){for(const t of r){const r=g(t,u);e.push(new h(null,t.attributes,null,r))}return e}switch(n){case"esriGeometryPoint":return E(e,r,o,s,u);case"esriGeometryMultipoint":return V(e,r,o,s,u);case"esriGeometryPolyline":return O(e,r,o,s,u);case"esriGeometryPolygon":case"esriGeometryMultiPatch":return R(e,r,o,s,u);default:y().error("convertToFeatureSet:unknown-geometry",new t("internal:geometry",`Unable to parse unknown geometry type '${n}'`)),dt(e)}return e}function D(t,e,r,n){q[0]=t,Q($,q,e,r,n);const o=$[0];return dt($),dt(q),o}function H(e,r=f(e),n=a(e)){return null==e?null:u(e)?j(e,r,n):c(e)?A(e,r,n):l(e)?S(e,r,n):i(e)?Y(e,r,n):void y().error("convertFromGeometry:unknown-geometry",new t("internal:geometry",`Unable to parse unknown geometry type '${e}'`))}function J(e,r,n,o){if(null==e)return null;const s="coords"in e?e:e.geometry;if(null==s)return null;switch(r){case"esriGeometryPoint":return Z(s,n,o);case"esriGeometryMultipoint":return k(s,n,o);case"esriGeometryPolyline":return L(s,n,o);case"esriGeometryPolygon":return z(s,n,o);default:return y().error("convertToGeometry:unknown-geometry",new t("internal:geometry",`Unable to parse unknown geometry type '${r}'`)),null}}function K(t,e){for(const r of e)t.push({attributes:r.attributes});return t}function Q(e,r,n,o,s){if(dt(e),null==n)return K(e,r);switch(n){case"esriGeometryPoint":return x(e,r,o,s);case"esriGeometryMultipoint":return v(e,r,o,s);case"esriGeometryPolyline":return _(e,r,o,s);case"esriGeometryPolygon":return U(e,r,o,s);default:y().error("convertToFeatureSet:unknown-geometry",new t("internal:geometry",`Unable to parse unknown geometry type '${n}'`))}return e}function W(t){const{spatialReference:e,transform:r,fields:n,hasM:o,hasZ:s,features:u,geometryType:c,exceededTransferLimit:l,queryGeometry:i,queryGeometryType:f}=t,a={features:Q([],u,c,s,o),fields:n,geometryType:c,spatialReference:e,queryGeometry:J(i,f,s,o)};return r&&(a.transform=r),l&&(a.exceededTransferLimit=l),o&&(a.hasM=o),s&&(a.hasZ=s),a}function X(t,e){const r=new m,{hasM:n,hasZ:o,features:s,spatialReference:u,geometryType:c,exceededTransferLimit:l,transform:i,fields:f,globalIdFieldName:a}=t;return f&&(r.fields=f),r.geometryType=c??null,r.spatialReference=u??null,s&&C(r.features,s,c,o,n,e),l&&(r.exceededTransferLimit=l),n&&(r.hasM=n),o&&(r.hasZ=o),i&&(r.transform=i),a&&(r.globalIdFieldName=a),r}function tt(t){const{transform:e,features:r}=t;if(!e)return t;for(const n of r)null!=n.geometry&<(n.geometry,e),null!=n.centroid&<(n.centroid,e);return t.transform=null,t}function et(t,e){const{geometryType:r,features:n}=e;if(!t)return e;for(let o=0;o<n.length;o++){const e=n[o],s=e.weakClone();s.geometry=rt(e.geometry,r,t),s.centroid=rt(e.centroid,"esriGeometryPoint",t),n[o]=s}return e.transform=t,e}function rt(t,e,r,n,o){if(null==t)return null;if(!t?.coords.length)return null;const s=p[e],{coords:u,lengths:c,stride:l,hasZ:i,hasM:f}=t;n??=i,o??=f;const a=new d([],[],n,o),h=a.stride,m=F(i,f,n,o);let g=0;const y=[0,0,0,0].slice(h);function b(){m(u,g,y,0),g+=l,y[0]=I(r,y[0]),y[1]=M(r,y[1])}if(t.isPoint)return b(),a.coords.push(...y),a;let w=0;for(const d of c){if(d<s)continue;let t=1;b(),a.coords.push(...y);let[e,r]=y;for(let n=1;n<d;n++){b();const[n,o]=y;e===n&&r===o||(y[0]-=e,y[1]-=r,a.coords.push(...y),e=n,r=o,t++)}t>=s?(a.lengths.push(t),w=a.coords.length):dt(a.coords,w)}return dt(a.coords,w),a.coords.length?a:null}function nt(t,e,r,n=t.hasZ,o=t.hasM){if(!t.coords.length)return null;const s=p[e],{coords:u,lengths:c,stride:l,hasZ:i,hasM:f}=t,a=new d([],[],n,o),h=a.stride,m=F(i,f,n,o);if(t.isPoint)return m(u,0,a.coords,0),a;let g=0;const y=r*r;for(const d of c){if(d<s){g+=d*l;continue}const t=a.coords.length/h,e=g,r=g+(d-1)*l;m(u,e,a.coords,a.coords.length),st(a.coords,u,l,y,m,e,r),m(u,r,a.coords,a.coords.length);const n=a.coords.length/h-t;n>=s?a.lengths.push(n):dt(a.coords,t*h),g+=d*l}return a.coords.length?a:null}function ot(t,e,r,n){const o=t[e],s=t[e+1],u=t[r],c=t[r+1],l=t[n],i=t[n+1];let f=u,a=c,h=l-f,m=i-a;if(0!==h||0!==m){const t=((o-f)*h+(s-a)*m)/(h*h+m*m);t>1?(f=l,a=i):t>0&&(f+=h*t,a+=m*t)}return h=o-f,m=s-a,h*h+m*m}function st(t,e,r,n,o,s,u){let c,l=n,i=0;for(let f=s+r;f<u;f+=r)c=ot(e,f,s,u),c>l&&(i=f,l=c);l>n&&(i-s>r&&st(t,e,r,n,o,s,i),o(e,i,t,t.length),u-i>r&&st(t,e,r,n,o,i,u))}function ut(t,e){if(!e?.coords?.length)return null;let r=Number.POSITIVE_INFINITY,u=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,l=Number.NEGATIVE_INFINITY;const{coords:i,stride:f}=e;for(let n=0;n<i.length;n+=f){const t=i[n],e=i[n+1];r=Math.min(r,t),c=Math.max(c,t),u=Math.min(u,e),l=Math.max(l,e)}return n(t)?o(t,r,u,c,l):s(r,u,c,l,t),t}function ct(t,e){const{lengths:r,coords:n,stride:o}=e;let s=Number.POSITIVE_INFINITY,u=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,l=Number.NEGATIVE_INFINITY,i=0;for(const f of r){let t=n[i],e=n[i+1];s=Math.min(t,s),u=Math.min(e,u),c=Math.max(t,c),l=Math.max(e,l),i+=o;for(let r=1;r<f;r++,i+=o){const r=n[i],o=n[i+1];t+=r,e+=o,r<0&&(s=Math.min(s,t)),r>0&&(c=Math.max(c,t)),o<0?u=Math.min(u,e):o>0&&(l=Math.max(l,e))}}return t[0]=s,t[1]=u,t[2]=c,t[3]=l,t}function lt(t,e){const{coords:n,lengths:o,stride:s}=t;if(!n.length)return void(o.length=0);r(e);const{originPosition:u,scale:c,translate:l}=e,i=gt;i.originPosition=u;const f=i.scale;f[0]=c[0]??1,f[1]=-(c[1]??1),f[2]=c[2]??1,f[3]=c[3]??1;const a=i.translate;if(a[0]=l[0]??0,a[1]=l[1]??0,a[2]=l[2]??0,a[3]=l[3]??0,!o.length){for(let t=0;t<s;++t)n[t]=T(i,n[t],t);return void(o.length=0)}let h=0;for(let r=0;r<o.length;r++){const t=o[r];o[r]=t;for(let r=0;r<s;++r)n[h+r]=T(i,n[h+r],r);let e=n[h],u=n[h+1];h+=s;for(let r=1;r<t;r++,h+=s){e+=n[h]*f[0],u+=n[h+1]*f[1],n[h]=e,n[h+1]=u;for(let t=2;t<s;++t)n[h+t]=T(i,n[h+t],t)}}}function it(t,e){if(!t?.coords?.length)return null;const r=p[e],{coords:n,lengths:o,stride:s,hasZ:u,hasM:c}=t,l=F(u,c,u,c),i=new d([],[],u,c);let f=0,a=0,h=0,m=0;for(const d of o){a=m,l(n,f,i.coords,a),f+=s,a+=s;let t=n[f],e=n[f+1];for(let r=1;r<d;r++){const o=n[f+s],u=n[f+s+1];t*u-e*o===0&&r!==d-1||(l(n,f,i.coords,a),i.coords[a]=t,i.coords[a+1]=e,a+=s,t=e=0),t+=o,e+=u,f+=s}const o=(a-m)/s;o>=r&&(i.lengths[h]=o,m=a,h++)}return i.coords.length>m&&(i.coords.length=m),i.lengths.length>h&&(i.lengths.length=h),i.coords.length&&i.lengths.length?i:null}function ft(t,e,r,n){let o=0,s=t[n*e],u=t[n*(e+1)];for(let c=1;c<r;c++){const r=s+t[n*(e+c)],l=u+t[n*(e+c)+1],i=(r-s)*(l+u);s=r,u=l,o+=i}return.5*o}function at(t,e){const{coords:r,lengths:n}=t;let o=0,s=0;for(let u=0;u<n.length;u++){const t=n[u];s+=ft(r,o,t,e),o+=t}return Math.abs(s)}function ht(t,e,r,n){return 0===t*n-r*e&&t*r+e*n>0}function mt(t,e,r){const{stride:n}=t;if(t.isPoint){if(t.coords.length<2)return null;const[r,n]=t.coords,o=b(e,r),s=w(e,n);return new d([],[o,s])}const o=new d([],[0,0]),s=p[r],u="esriGeometryPolygon"===r||"esriGeometryPolyline"===r;let c=0,l=0;for(let i=0;i<t.lengths.length;i++){const r=t.lengths[i],f=l;let a=b(e,t.coords[n*c]),h=w(e,t.coords[n*c+1]);o.coords[l++]=a,o.coords[l++]=h;let m=0,d=0,g=1;for(let s=1;s<r;s++){const r=b(e,t.coords[n*(s+c)]),i=w(e,t.coords[n*(s+c)+1]);if(r!==a||i!==h){const t=r-a,e=i-h;u&&ht(m,d,t,e)?(o.coords[l-2]+=t,o.coords[l-1]+=e,a+=t,h+=e):(o.coords[l++]=r,o.coords[l++]=i,a=r,h=i,m=t,d=e,g+=1)}}g<s?l=f:o.lengths.push(g),c+=r}return 0===o.lengths.length?null:o}function dt(t,e=0){t.length!==e&&(t.length=e)}const gt={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]};export{B as convertFromFeature,X as convertFromFeatureSet,C as convertFromFeatures,H as convertFromGeometry,Y as convertFromMultipoint,V as convertFromMultipointFeatures,j as convertFromPoint,E as convertFromPointFeatures,A as convertFromPolygon,S as convertFromPolyline,O as convertFromPolylineFeatures,D as convertToFeature,W as convertToFeatureSet,Q as convertToFeatures,J as convertToGeometry,k as convertToMultipoint,v as convertToMultipointFeatures,Z as convertToPoint,z as convertToPolygon,L as convertToPolyline,nt as generalizeOptimizedGeometry,ut as getBoundsOptimizedGeometry,at as getQuantizedArea,ct as getQuantizedBoundsOptimizedGeometry,ft as getSignedQuantizedRingArea,mt as quantizeForDisplay,et as quantizeOptimizedFeatureSet,rt as quantizeOptimizedGeometry,I as quantizeX,M as quantizeY,it as removeCollinearVertices,tt as unquantizeOptimizedFeatureSetInPlace,lt as unquantizeOptimizedGeometryInPlace,T as unquantizeValue,G as unquantizeX,N as unquantizeY};
|
|
2
|
+
import t from"../../core/Error.js";import e from"../../core/Logger.js";import{assertIsSome as n}from"../../core/maybe.js";import{is as r,fromRectValues as o}from"../../geometry/support/aaBoundingBox.js";import{fromValues as s}from"../../geometry/support/aaBoundingRect.js";import{isPoint as u,isPolygon as c,isPolyline as i,isMultipoint as l,isGeometryWithZ as a,isGeometryWithM as f}from"../../geometry/support/jsonTypeUtils.js";import{OptimizedFeature as h}from"./OptimizedFeature.js";import d from"./OptimizedFeatureSet.js";import m from"./OptimizedGeometry.js";import{createFeatureId as g}from"./data/createFeatureId.js";const y=()=>e.getLogger("esri.layers.graphics.featureConversionUtils"),p={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryMultiPatch:3,esriGeometryEnvelope:0};function I({scale:t,translate:e},n){return Math.round((n-e[0])/t[0])}function M({scale:t,translate:e},n){return Math.round((e[1]-n)/t[1])}function b({scale:t,translate:e},n){return Math.round((n-e[0])/t[0])}function w({scale:t,translate:e},n){return Math.round((n-e[1])/t[1])}function G(t,e){return T(t,e,0)}function N(t,e){return T(t,-e,1)}function T({scale:t,translate:e},n,r){return n*t[r]+e[r]}function P(t,e,n){return e&&(t.hasZ=!0),n&&(t.hasM=!0),t}function Z(t,e,n,r){if(e&&r&&t!==n)return(e,n,r,o)=>{r[o++]=e[n++],r[o++]=e[n++],t?n++:r[o++]=0,r[o++]=e[n++]??0};const o=2+(n?1:0)+(r?1:0),s=o-((!t&&n?1:0)+(!e&&r?1:0));return(t,e,n,r)=>{for(let u=0;u<o;++u)n[r++]=u<s?t[e++]??0:0}}function F(t,e,n){if(!t)return null;const{coords:r,hasZ:o,hasM:s}=t,[u,c]=r,i=o?r[2]:0,l=s?r[2+(o?1:0)]:0;return{x:u,y:c,z:e?i:void 0,m:n?l:void 0}}function x(t,e,n,r){for(const{geometry:o,attributes:s}of e)t.push({attributes:s,geometry:F(o,n,r)});return t}function E(t,e,n,r,o){for(const s of e){const{geometry:e,attributes:u,centroid:c}=s,i=a(e),l=f(e);t.push(new h(e?j(e,n&&i,r&&l):null,u,c?j(c,!1,!1):null,g(s,o),s.displayId,s.distance))}return t}function j(t,e=a(t),n=f(t)){const{x:r,y:o,z:s,m:u}=t,c=[r,o];return e&&c.push(s??0),n&&c.push(u??0),new m([],c,e,n)}function v(t,e,n,r){for(const{geometry:o,attributes:s}of e)t.push({geometry:o&&k(o,n,r),attributes:s});return t}function k(t,e,n){if(null==t)return null;const{coords:r,stride:o,hasZ:s,hasM:u}=t,c=Z(s,u,e,n),i=[];for(let l=0;l<r.length;l+=o){const t=[];c(r,l,t,0),i.push(t)}return P({points:i},e,n)}function V(t,e,n,r,o){for(const s of e){const{geometry:e,attributes:u}=s,c=a(e),i=f(e);t.push(new h(e?Y(e,n&&c,r&&i):null,u,null,g(s,o),s.displayId,s.distance))}return t}function Y(t,e=a(t),n=f(t)){const{points:r,hasZ:o,hasM:s}=t,u=new m([r.length],[],e,n),{coords:c,stride:i}=u;let l=0;const h=Z(o??!1,s??!1,e,n);for(const a of r)h(a,0,c,l),l+=i;return u}function _(t,e,n,r){for(const{geometry:o,attributes:s}of e)t.push({geometry:o&&L(o,n,r),attributes:s});return t}function L(t,e,n){if(!t)return null;const{coords:r,lengths:o,stride:s,hasZ:u,hasM:c}=t;let i=0;const l=Z(u,c,e,n),a=[];for(const f of o){const t=[];for(let e=0;e<f;e++){const e=[];l(r,i,e,0),i+=s,t.push(e)}a.push(t)}return P({paths:a},e,n)}function O(t,e,n,r,o){for(const s of e){const{geometry:e,attributes:u,centroid:c}=s,i=a(e),l=f(e);t.push(new h(e?S(e,n&&i,r&&l):null,u,c?j(c,!1,!1):null,g(s,o),s.displayId,s.distance))}return t}function S(t,e=a(t),n=f(t)){const{paths:r,hasZ:o,hasM:s}=t,u=Z(o??!1,s??!1,e,n),c=new m([],[],e,n),{lengths:i,coords:l,stride:h}=c;let d=0;for(const a of r){for(const t of a)u(t,0,l,d),d+=h;i.push(a.length)}return c}function U(t,e,n,r){for(const{geometry:o,attributes:s,centroid:u}of e){const e=z(o,n,r),c=F(u,!1,!1);t.push(u?{geometry:e,attributes:s,centroid:c}:{geometry:e,attributes:s})}return t}function z(t,e,n){if(!t)return null;const{coords:r,lengths:o,stride:s,hasZ:u,hasM:c}=t;let i=0;const l=Z(u,c,e,n),a=[];for(const f of o){const t=[];for(let e=0;e<f;e++){const e=[];l(r,i,e,0),i+=s,t.push(e)}a.push(t)}return P({rings:a},e,n)}function R(t,e,n,r,o){for(const s of e){const{geometry:e,attributes:u,centroid:c}=s,i=a(e),l=f(e);t.push(new h(e?A(e,n&&i,r&&l):null,u,c?j(c,!1,!1):null,g(s,o),s.displayId,s.distance))}return t}function A(t,e=a(t),n=f(t)){const{rings:r,hasZ:o,hasM:s}=t,u=new m([],[],e,n),{lengths:c,coords:i,stride:l}=u;let h=0;const d=Z(o??!1,s??!1,e,n);for(const a of r){for(const t of a)d(t,0,i,h),h+=l;c.push(a.length)}return u}const $=[],q=[];function B(t,e,n,r,o){$[0]=t;const[s]=C(q,$,e,n,r,o);return mt($),mt(q),s}function C(e,n,r,o,s,u){if(mt(e),!r){for(const t of n){const n=g(t,u);e.push(new h(null,t.attributes,null,n))}return e}switch(r){case"esriGeometryPoint":return E(e,n,o,s,u);case"esriGeometryMultipoint":return V(e,n,o,s,u);case"esriGeometryPolyline":return O(e,n,o,s,u);case"esriGeometryPolygon":case"esriGeometryMultiPatch":return R(e,n,o,s,u);default:y().error("convertToFeatureSet:unknown-geometry",new t("internal:geometry",`Unable to parse unknown geometry type '${r}'`)),mt(e)}return e}function D(t,e,n,r){q[0]=t,Q($,q,e,n,r);const o=$[0];return mt($),mt(q),o}function H(e,n=a(e),r=f(e)){return null==e?null:u(e)?j(e,n,r):c(e)?A(e,n,r):i(e)?S(e,n,r):l(e)?Y(e,n,r):void y().error("convertFromGeometry:unknown-geometry",new t("internal:geometry",`Unable to parse unknown geometry type '${e}'`))}function J(e,n,r,o){if(null==e)return null;const s="coords"in e?e:e.geometry;if(null==s)return null;switch(n){case"esriGeometryPoint":return F(s,r,o);case"esriGeometryMultipoint":return k(s,r,o);case"esriGeometryPolyline":return L(s,r,o);case"esriGeometryPolygon":return z(s,r,o);default:return y().error("convertToGeometry:unknown-geometry",new t("internal:geometry",`Unable to parse unknown geometry type '${n}'`)),null}}function K(t,e){for(const n of e)t.push({attributes:n.attributes});return t}function Q(e,n,r,o,s){if(mt(e),null==r)return K(e,n);switch(r){case"esriGeometryPoint":return x(e,n,o,s);case"esriGeometryMultipoint":return v(e,n,o,s);case"esriGeometryPolyline":return _(e,n,o,s);case"esriGeometryPolygon":return U(e,n,o,s);default:y().error("convertToFeatureSet:unknown-geometry",new t("internal:geometry",`Unable to parse unknown geometry type '${r}'`))}return e}function W(t){const{spatialReference:e,transform:n,fields:r,hasM:o,hasZ:s,features:u,geometryType:c,exceededTransferLimit:i,queryGeometry:l,queryGeometryType:a}=t,f={features:Q([],u,c,s,o),fields:r,geometryType:c,spatialReference:e,queryGeometry:J(l,a,s,o)};return n&&(f.transform=n),i&&(f.exceededTransferLimit=i),o&&(f.hasM=o),s&&(f.hasZ=s),f}function X(t,e){const n=new d,{hasM:r,hasZ:o,features:s,spatialReference:u,geometryType:c,exceededTransferLimit:i,transform:l,fields:a,globalIdFieldName:f}=t;return a&&(n.fields=a),n.geometryType=c??null,n.spatialReference=u??null,s&&C(n.features,s,c,o,r,e),i&&(n.exceededTransferLimit=i),r&&(n.hasM=r),o&&(n.hasZ=o),l&&(n.transform=l),f&&(n.globalIdFieldName=f),n}function tt(t){const{transform:e,features:n}=t;if(!e)return t;for(const r of n)null!=r.geometry&&it(r.geometry,e),null!=r.centroid&&it(r.centroid,e);return t.transform=null,t}function et(t,e){const{geometryType:n,features:r}=e;if(!t)return e;for(let o=0;o<r.length;o++){const e=r[o],s=e.weakClone();s.geometry=nt(e.geometry,n,t),s.centroid=nt(e.centroid,"esriGeometryPoint",t),r[o]=s}return e.transform=t,e}function nt(t,e,n,r,o){if(null==t)return null;if(!t?.coords.length)return null;const s=p[e],{coords:u,lengths:c,stride:i,hasZ:l,hasM:a}=t;r??=l,o??=a;const f=new m([],[],r,o),h=f.stride,d=Z(l,a,r,o);let g=0;const y=[0,0,0,0].slice(h);function b(){d(u,g,y,0),g+=i,y[0]=I(n,y[0]),y[1]=M(n,y[1])}if(t.isPoint)return b(),f.coords.push(...y),f;let w=0;for(const m of c){if(m<s)continue;let t=1;b(),f.coords.push(...y);let[e,n]=y;for(let r=1;r<m;r++){b();const[r,o]=y;e===r&&n===o||(y[0]-=e,y[1]-=n,f.coords.push(...y),e=r,n=o,t++)}t>=s?(f.lengths.push(t),w=f.coords.length):mt(f.coords,w)}return mt(f.coords,w),f.coords.length?f:null}function rt(t,e,n,r=t.hasZ,o=t.hasM){if(!t.coords.length)return null;const s=p[e],{coords:u,lengths:c,stride:i,hasZ:l,hasM:a}=t,f=new m([],[],r,o),h=f.stride,d=Z(l,a,r,o);if(t.isPoint)return d(u,0,f.coords,0),f;let g=0;const y=n*n;for(const m of c){if(m<s){g+=m*i;continue}const t=f.coords.length/h,e=g,n=g+(m-1)*i;d(u,e,f.coords,f.coords.length),st(f.coords,u,i,y,d,e,n),d(u,n,f.coords,f.coords.length);const r=f.coords.length/h-t;r>=s?f.lengths.push(r):mt(f.coords,t*h),g+=m*i}return f.coords.length?f:null}function ot(t,e,n,r){const o=t[e],s=t[e+1],u=t[n],c=t[n+1],i=t[r],l=t[r+1];let a=u,f=c,h=i-a,d=l-f;if(0!==h||0!==d){const t=((o-a)*h+(s-f)*d)/(h*h+d*d);t>1?(a=i,f=l):t>0&&(a+=h*t,f+=d*t)}return h=o-a,d=s-f,h*h+d*d}function st(t,e,n,r,o,s,u){let c,i=r,l=0;for(let a=s+n;a<u;a+=n)c=ot(e,a,s,u),c>i&&(l=a,i=c);i>r&&(l-s>n&&st(t,e,n,r,o,s,l),o(e,l,t,t.length),u-l>n&&st(t,e,n,r,o,l,u))}function ut(t,e){if(!e?.coords?.length)return null;let n=Number.POSITIVE_INFINITY,u=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY;const{coords:l,stride:a}=e;for(let r=0;r<l.length;r+=a){const t=l[r],e=l[r+1];n=Math.min(n,t),c=Math.max(c,t),u=Math.min(u,e),i=Math.max(i,e)}return r(t)?o(t,n,u,c,i):s(n,u,c,i,t),t}function ct(t,e){const{lengths:n,coords:r,stride:o}=e;let s=Number.POSITIVE_INFINITY,u=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY,l=0;for(const a of n){let t=r[l],e=r[l+1];s=Math.min(t,s),u=Math.min(e,u),c=Math.max(t,c),i=Math.max(e,i),l+=o;for(let n=1;n<a;n++,l+=o){const n=r[l],o=r[l+1];t+=n,e+=o,n<0&&(s=Math.min(s,t)),n>0&&(c=Math.max(c,t)),o<0?u=Math.min(u,e):o>0&&(i=Math.max(i,e))}}return t[0]=s,t[1]=u,t[2]=c,t[3]=i,t}function it(t,e){const{coords:r,lengths:o,stride:s,hasZ:u,hasM:c}=t;if(!r.length)return void(o.length=0);n(e);const{originPosition:i,scale:l,translate:a}=e,f=gt;f.originPosition=i;const h=f.scale;h[0]=l[0]??1,h[1]=-(l[1]??1),h[2]=l[2]??1,h[3]=l[3]??1;const d=f.translate;if(d[0]=a[0]??0,d[1]=a[1]??0,d[2]=a[2]??0,d[3]=a[3]??0,c&&!u&&(h[2]=h[3],d[2]=d[3]),!o.length){for(let t=0;t<s;++t)r[t]=T(f,r[t],t);return void(o.length=0)}let m=0;for(let n=0;n<o.length;n++){const t=o[n];o[n]=t;for(let n=0;n<s;++n)r[m+n]=T(f,r[m+n],n);let e=r[m],u=r[m+1];m+=s;for(let n=1;n<t;n++,m+=s){e+=r[m]*h[0],u+=r[m+1]*h[1],r[m]=e,r[m+1]=u;for(let t=2;t<s;++t)r[m+t]=T(f,r[m+t],t)}}}function lt(t,e){if(!t?.coords?.length)return null;const n=p[e],{coords:r,lengths:o,stride:s,hasZ:u,hasM:c}=t,i=Z(u,c,u,c),l=new m([],[],u,c);let a=0,f=0,h=0,d=0;for(const m of o){f=d,i(r,a,l.coords,f),a+=s,f+=s;let t=r[a],e=r[a+1];for(let n=1;n<m;n++){const o=r[a+s],u=r[a+s+1];t*u-e*o===0&&n!==m-1||(i(r,a,l.coords,f),l.coords[f]=t,l.coords[f+1]=e,f+=s,t=e=0),t+=o,e+=u,a+=s}const o=(f-d)/s;o>=n&&(l.lengths[h]=o,d=f,h++)}return l.coords.length>d&&(l.coords.length=d),l.lengths.length>h&&(l.lengths.length=h),l.coords.length&&l.lengths.length?l:null}function at(t,e,n,r){let o=0,s=t[r*e],u=t[r*(e+1)];for(let c=1;c<n;c++){const n=s+t[r*(e+c)],i=u+t[r*(e+c)+1],l=(n-s)*(i+u);s=n,u=i,o+=l}return.5*o}function ft(t,e){const{coords:n,lengths:r}=t;let o=0,s=0;for(let u=0;u<r.length;u++){const t=r[u];s+=at(n,o,t,e),o+=t}return Math.abs(s)}function ht(t,e,n,r){return 0===t*r-n*e&&t*n+e*r>0}function dt(t,e,n){const{stride:r}=t;if(t.isPoint){if(t.coords.length<2)return null;const[n,r]=t.coords,o=b(e,n),s=w(e,r);return new m([],[o,s])}const o=new m([],[0,0]),s=p[n],u="esriGeometryPolygon"===n||"esriGeometryPolyline"===n;let c=0,i=0;for(let l=0;l<t.lengths.length;l++){const n=t.lengths[l],a=i;let f=b(e,t.coords[r*c]),h=w(e,t.coords[r*c+1]);o.coords[i++]=f,o.coords[i++]=h;let d=0,m=0,g=1;for(let s=1;s<n;s++){const n=b(e,t.coords[r*(s+c)]),l=w(e,t.coords[r*(s+c)+1]);if(n!==f||l!==h){const t=n-f,e=l-h;u&&ht(d,m,t,e)?(o.coords[i-2]+=t,o.coords[i-1]+=e,f+=t,h+=e):(o.coords[i++]=n,o.coords[i++]=l,f=n,h=l,d=t,m=e,g+=1)}}g<s?i=a:o.lengths.push(g),c+=n}return 0===o.lengths.length?null:o}function mt(t,e=0){t.length!==e&&(t.length=e)}const gt={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]};export{B as convertFromFeature,X as convertFromFeatureSet,C as convertFromFeatures,H as convertFromGeometry,Y as convertFromMultipoint,V as convertFromMultipointFeatures,j as convertFromPoint,E as convertFromPointFeatures,A as convertFromPolygon,S as convertFromPolyline,O as convertFromPolylineFeatures,D as convertToFeature,W as convertToFeatureSet,Q as convertToFeatures,J as convertToGeometry,k as convertToMultipoint,v as convertToMultipointFeatures,F as convertToPoint,z as convertToPolygon,L as convertToPolyline,rt as generalizeOptimizedGeometry,ut as getBoundsOptimizedGeometry,ft as getQuantizedArea,ct as getQuantizedBoundsOptimizedGeometry,at as getSignedQuantizedRingArea,dt as quantizeForDisplay,et as quantizeOptimizedFeatureSet,nt as quantizeOptimizedGeometry,I as quantizeX,M as quantizeY,lt as removeCollinearVertices,tt as unquantizeOptimizedFeatureSetInPlace,it as unquantizeOptimizedGeometryInPlace,T as unquantizeValue,G as unquantizeX,N as unquantizeY};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import"../../core/has.js";import{JSONMap as r}from"../../core/jsonMap.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{clone as o}from"../../core/lang.js";import{toPt as i}from"../../core/screenUtils.js";import{property as l,subclass as n}from"../../core/accessorSupport/decorators.js";import s from"./LabelExpressionInfo.js";import{templateStringToSql as a,getSingleFieldArcadeExpression as p,getLabelExpression as c,getLabelExpressionArcade as b,getLabelExpressionSingleField as m}from"./labelUtils.js";import{isSceneServiceLayer as
|
|
2
|
+
import{__decorate as e}from"tslib";import"../../core/has.js";import{JSONMap as r}from"../../core/jsonMap.js";import{JSONSupport as t}from"../../core/JSONSupport.js";import{clone as o}from"../../core/lang.js";import{toPt as i}from"../../core/screenUtils.js";import{property as l,subclass as n}from"../../core/accessorSupport/decorators.js";import s from"./LabelExpressionInfo.js";import{templateStringToSql as a,getSingleFieldArcadeExpression as p,getLabelExpression as c,getLabelExpressionArcade as b,getLabelExpressionSingleField as m,LabelClassSymbol as u}from"./labelUtils.js";import{isSceneServiceLayer as w}from"./layerUtils.js";import{defaultTextSymbol2D as f}from"../../symbols/support/defaults.js";import{writeLabelSymbol as v}from"../../symbols/support/jsonUtils.js";import{symbolTypesLabel3D as y,symbolTypesLabel as h}from"../../symbols/support/typeUtils.js";import{reader as d}from"../../core/accessorSupport/decorators/reader.js";import{writer as S}from"../../core/accessorSupport/decorators/writer.js";var L,P;const x=new r({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function g(e,r,t){return{enabled:!w(t?.layer)}}function E(e){return!e||"service"!==e.origin&&!("map-image"===e.layer?.type)}function j(e){return"map-image"===e?.type}function A(e){return!!j(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}function C(e){return E(e)||A(e?.layer)}let I=class extends t{static{L=u}static{P=this}static evaluateWhere(e,r){const t=(e,r,t)=>{switch(r){case"=":return e==t;case"<>":return e!=t;case">":return e>t;case">=":return e>=t;case"<":return e<t;case"<=":return e<=t}return!1};try{if(null==e)return!0;const o=e.split(" ");if(3===o.length)return t(r[o[0]],o[1],o[2]);if(7===o.length){const e=t(r[o[0]],o[1],o[2]),i=o[3],l=t(r[o[4]],o[5],o[6]);switch(i){case"AND":return e&&l;case"OR":return e||l}}return!1}catch(o){}}constructor(e){super(e),this[L]=!0,this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.symbol=f,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,r){const t=r.labelExpressionInfo;if(!t||!t.value&&!t.expression)return e}writeLabelExpression(e,r,t){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=a(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){const r=p(this.labelExpressionInfo.expression);r&&(e="["+r+"]")}null!=e&&(r[t]=e)}writeLabelExpressionInfo(e,r,t,o){if(null==e&&null!=this.labelExpression&&E(o))e=new s({expression:this.getLabelExpressionArcade()});else if(!e)return;const i=e.toJSON(o);i.expression&&(r[t]=i)}writeMaxScale(e,r){(e||this.minScale)&&(r.maxScale=e)}writeMinScale(e,r){(e||this.maxScale)&&(r.minScale=e)}get repeatLabelDistance(){return this._get("repeatLabelDistance")}set repeatLabelDistance(e){this._set("repeatLabelDistance",e)}getLabelExpression(){return c(this)}getLabelExpressionArcade(){return b(this)}getLabelExpressionSingleField(){return m(this)}hash(){return JSON.stringify(this)}clone(){return new P({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:o(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:o(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};e([l({type:String,json:{write:!0}})],I.prototype,"name",void 0),e([l({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:g}}}}})],I.prototype,"allowOverrun",void 0),e([l({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:g}}}}})],I.prototype,"deconflictionStrategy",void 0),e([l({type:String,json:{write:{overridePolicy(e,r,t){return this.labelExpressionInfo&&"service"===t?.origin&&A(t.layer)?{enabled:!1}:{allowNull:!0}}}}})],I.prototype,"labelExpression",void 0),e([d("labelExpression")],I.prototype,"readLabelExpression",null),e([S("labelExpression")],I.prototype,"writeLabelExpression",null),e([l({type:s,json:{write:{overridePolicy:(e,r,t)=>C(t)?{allowNull:!0}:{enabled:!1}}}})],I.prototype,"labelExpressionInfo",void 0),e([S("labelExpressionInfo")],I.prototype,"writeLabelExpressionInfo",null),e([l({type:x.apiValues,json:{type:x.jsonValues,read:x.read,write:x.write}})],I.prototype,"labelPlacement",void 0),e([l({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],I.prototype,"labelPosition",void 0),e([l({type:Number})],I.prototype,"maxScale",void 0),e([S("maxScale")],I.prototype,"writeMaxScale",null),e([l({type:Number})],I.prototype,"minScale",void 0),e([S("minScale")],I.prototype,"writeMinScale",null),e([l({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:g}}}}})],I.prototype,"repeatLabel",void 0),e([l({type:Number,cast:i,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:g}}}}})],I.prototype,"repeatLabelDistance",null),e([l({types:h,json:{origins:{"web-scene":{types:y,write:v,default:null}},write:v,default:null}})],I.prototype,"symbol",void 0),e([l({type:Boolean,json:{write:!0}})],I.prototype,"useCodedValues",void 0),e([l({type:String,json:{write:!0}})],I.prototype,"where",void 0),I=P=e([n("esri.layers.support.LabelClass")],I);export{I as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{id as e}from"../../kernel.js";import{resultOrAbort as t}from"../../core/asyncUtils.js";import r from"../../core/Error.js";import{JSONMap as n}from"../../core/jsonMap.js";import o from"../../core/Logger.js";import{parseWhereClause as i}from"../../core/sql.js";import{normalizeGlobalID as s}from"../../core/uuid.js";import{createTypeReader as a}from"../../core/accessorSupport/extensions/serializableProperty/reader.js";import{isHostedAgolService as u}from"./arcgisLayerUrl.js";import c from"./CodedValue.js";import l from"./CodedValueDomain.js";import{queryAllJSON as p}from"./featureQueryAll.js";import{isStringField as d,isIntegerField as f}from"./fieldUtils.js";import{isLayerWithFeatureCapabilities as y,getOwningPortalUrl as m}from"./layerUtils.js";import h from"../../renderers/SimpleRenderer.js";import w from"../../renderers/UniqueValueRenderer.js";import b from"../../rest/support/AttachmentQuery.js";import{normalizationTypeJsonMap as g}from"../../rest/support/NormalizationBinParametersMixin.js";import I from"../../rest/support/Query.js";import j from"../../rest/support/RelationshipQuery.js";import{symbolTypesRenderer as F}from"../../symbols/support/typeUtils.js";const x=()=>o.getLogger("esri.layers.support.featureLayerUtils"),P=new n({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function S(e,t,n,o){const i=await W(e);if(await q(e,t,o),!i.addAttachment)throw new r(o,"Layer source does not support addAttachment capability");return i.addAttachment(t,n)}function q(e,t,n){const{attributes:o}=t,{objectIdField:i}=e;return e.capabilities?.data?.supportsAttachment?t?o?i&&o[i]?Promise.resolve():Promise.reject(new r(n,`feature is missing the identifying attribute ${i}`)):Promise.reject(new r(n,"'attributes' are required on a feature to query attachments")):Promise.reject(new r(n,"A feature is required to add/delete/update attachments")):Promise.reject(new r(n,"this layer doesn't support attachments"))}async function v(e,t,n,o,i){const s=await W(e);if(await q(e,t,i),!s.updateAttachment)throw new r(i,"Layer source does not support updateAttachment capability");return s.updateAttachment(t,n,o)}async function L(e,t,r){const{applyEdits:n}=await import("../graphics/editingSupport.js"),o=await e.load();let i=r;const{url:s,type:a,globalIdField:c}=o;return"feature"===a&&u(s)&&o.infoFor3D&&null!=t.deleteFeatures&&null!=c&&(i={...i,globalIdToObjectId:await ae(o,t.deleteFeatures,c)}),n(o,o.source,t,i)}async function O(e,t,r){const{uploadAssets:n}=await import("../graphics/editingSupport.js"),o=await e.load();return n(o,o.source,t,r)}async function A(e,t,n,o){const i=await W(e);if(await q(e,t,o),!i.deleteAttachments)throw new r(o,"Layer source does not support deleteAttachments capability");return i.deleteAttachments(t,n)}async function E(e,t,n){const o=(await e.load({signal:t?.signal})).source;if(!o.fetchRecomputedExtents)throw new r(n,"Layer source does not support fetchUpdates capability");return o.fetchRecomputedExtents(t)}async function D(e,t,n,o){let i=b.from(t);await e.load();const s=e.source,a=e.capabilities;if(!a?.data?.supportsAttachment)throw new r(o,"this layer doesn't support attachments");const{attachmentTypes:u,objectIds:c,globalIds:l,num:p,size:d,start:f,where:y}=i;if(!a?.operations?.supportsQueryAttachments){if(u?.length>0||l?.length>0||d?.length>0||p||f||y)throw new r(o,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",i)}if(!(c?.length||l?.length||y))throw new r(o,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",i);if(!s.queryAttachments)throw new r(o,"Layer source does not support queryAttachments capability",i);return!a?.attachment?.supportsOrderByFields&&i.orderByFields?.length&&(i=i.clone(),i.orderByFields=null),s.queryAttachments(i)}async function T(e,t,n,o){const i=await W(e);if(!i.queryObjectIds)throw new r(o,"Layer source does not support queryObjectIds capability");return i.queryObjectIds(I.from(t)??e.createQuery(),n)}async function C(e,t,n,o){const i=await W(e);if(!i.queryFeatureCount)throw new r(o,"Layer source does not support queryFeatureCount capability");return i.queryFeatureCount(I.from(t)??e.createQuery(),n)}async function B(e,t,n,o){const i=await W(e);if(!i.queryExtent)throw new r(o,"Layer source does not support queryExtent capability");return i.queryExtent(I.from(t)??e.createQuery(),n)}async function R(e,t,n,o){const i=await W(e);if(!i.queryRelatedFeatures)throw new r(o,"Layer source does not support queryRelatedFeatures capability");return i.queryRelatedFeatures(j.from(t),n)}async function M(e,t,n,o){const i=await W(e);if(!i.queryRelatedFeaturesCount)throw new r(o,"Layer source does not support queryRelatedFeaturesCount capability");return i.queryRelatedFeaturesCount(j.from(t),n)}async function k(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:n}=await t.refresh();if(null!=n&&(e.sourceJSON={...e.sourceJSON,...n},e.read(n,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await i(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function z(e){const t=new I;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,t.outFields=["*"],t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null;const r=e.capabilities?.query;r&&(t.compactGeometryEnabled=r.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=r.supportsDefaultSpatialReference);const n=e.capabilities?.data;n?.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),n?.supportsM&&null!=e.returnM&&(t.returnM=e.returnM);const{timeOffset:o,timeExtent:i}=e;return t.timeExtent=null!=o&&null!=i?i.offset(-o.value,o.unit):i||null,t}function U(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const n of r)if("esriFieldTypeGlobalID"===n.type)return n.name}function N(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const n of r)if("esriFieldTypeOID"===n.type)return n.name}function Q(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}function V(e,t,r,n){const o=r?.feature,i=!!e.subtypes?.length;if(i&&!r?.excludeImpliedDomains){const r=$(e,t);if(r)return r}const s=i&&G(e,o);if(s){const e=s?.domains?.[t];return"inherited"===e?.type?n:e}const a=ue(e.types,e.typeIdField,o);if(a){const e=a.domains&&a.domains[t];if(e&&"inherited"!==e?.type)return e}if(n)return n;if(!r?.excludeImpliedDomains){const r=J(e,t);if(r)return r}return null}function G(e,t){const{subtypes:r,subtypeField:n}=e;if(!t?.attributes||!r?.length||!n)return null;const o=t.attributes[n];return null==o?null:r.find(e=>e.code===o)}function $(e,t){const{fieldsIndex:r,subtypeField:n}=e,{name:o,type:i}=r.get(t)??{};if(!o)return null;if((n&&r.get(n)?.name)===o&&e.subtypes?.length){const t=e.subtypes.map(e=>new c({code:H(e.code,i),name:e.name}));if(t?.length)return new l({codedValues:t})}return null}function J(e,t){const{fieldsIndex:r}=e,{name:n,type:o}=r.get(t)??{};if(!n)return null;if(("typeIdField"in e?r.get(e.typeIdField)?.name:null)===n&&"types"in e&&e.types?.length&&Z(e.types)){const t=e.types?.map(e=>new c({code:H(e.id,o),name:e.name}));return new l({codedValues:t})}return null}function Z(e){const t=new Set,r=new Set;for(const n of e){if(t.has(n.id)||r.has(n.name))return!1;t.add(n.id),r.add(n.name)}return!0}function H(e,t){return t?d({type:t})&&"number"==typeof e?`${e}`:f({type:t})&&"string"==typeof e?Number.parseInt(e,10):e:e}async function W(e){return(await e.load()).source}async function _(t,r){if(!e)return;const n=e.findCredential(t);if(n)return n.userId;let o;try{const n=await m(t,r);n&&(o=await e.checkSignInStatus(`${n}/sharing`))}catch(i){}return o?o.userId:null}async function K(t,r){if(!e)return;if(e.findCredential(t))return;let n;try{const o=await m(t,r);o&&(n=await e.checkSignInStatus(`${o}/sharing`))}catch(o){}if(n)try{const n=null!=r?r.signal:null;await e.getCredential(t,{signal:n})}catch(o){}}async function X(e,t,r){const n=e.parsedUrl?.path;n&&e.authenticationTriggerEvent===t&&await K(n,r)}async function Y(e){const t=e.parsedUrl?.path;t&&ee(e)&&await K(t)}function ee(e){return te(e)&&("serviceDefinitionExpression"in e&&re(e.serviceDefinitionExpression)||"definitionExpression"in e&&re(e.definitionExpression))}function te(e){return!(!y(e)||!e.capabilities?.query.supportsCurrentUser)}function re(e){return!!e?.toLowerCase().includes("current_user")}function ne(e){return!ce(e)&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const oe=a({types:F});function ie(e,t){if(e.defaultSymbol)return e.types?.length?new w({defaultSymbol:oe(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map(e=>({id:e.id,symbol:oe(e.symbol,e,t)}))}):new h({symbol:oe(e.defaultSymbol,e,t)})}function se(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}async function ae(e,r,n){if(null==r)return null;const o=[],{objectIdField:i}=e;if(r.forEach(e=>{let t=null;if("attributes"in e){const{attributes:r}=e;t={globalId:r[n],objectId:null!=r[i]&&-1!==r[i]?r[i]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||o.push(t.globalId))}),0===o.length)return null;const a=e.createQuery();a.where=o.map(e=>`${n}='${e}'`).join(" OR "),a.returnGeometry=!1,a.outFields=[i,n],a.cacheHint=!1;const u=await t(p(e,a));if(!u.ok)return null;const c=new Map,l=u.value.features;for(const t of l){const e=t.attributes[n],r=t.attributes[i];null!=e&&null!=r&&-1!==r&&c.set(s(e),r)}return c}function ue(e,t,r){if(!t||!r||!e)return null;const n=r.getAttribute(t);if(null==n)return null;const o=e.filter(e=>{const{id:t}=e;return null!=t&&t.toString()===n.toString()});return o.length>1&&x().warn("getFeatureType",`Cannot unambiguously determine feature type because multiple types have the id ${n}.`),o[0]??null}function ce(e){return e.sourceJSON?.isMultiServicesView||le(e)}function le(e){return!!e.sourceJSON?.capabilities?.toLowerCase().split(",").map(e=>e.trim()).includes("map")}function pe(e,t,n){const o=t?.queryAttributeBins;if(!t?.operations?.supportsQueryBins||!o)throw new r(n,"Layer source does not support binning");switch(e.binParameters?.type){case"auto-interval":if(!o.supportsAutoInterval)throw new r(n,"Layer source does not support auto-interval binning");if(e.binParameters.normalizationType&&(!o.supportsNormalization||!de(e.binParameters.normalizationType,o.supportedNormalizationTypes)))throw new r(n,"Layer source does not support normalization binning");break;case"date":if(!o.supportsDate)throw new r(n,"Layer source does not support date binning");if(e.binParameters.snapToData&&!o.supportsSnapToData)throw new r(n,"Layer source does not support snapToData binning");if(e.binParameters.returnFullIntervalBin&&!o.supportsReturnFullIntervalBin)throw new r(n,"Layer source does not support returnFullIntervalBin binning");break;case"fixed-boundaries":if(!o.supportsFixedBoundaries)throw new r(n,"Layer source does not support fixed-boundaries binning");break;case"fixed-interval":if(!o.supportsFixedInterval)throw new r(n,"Layer source does not support fixed-interval binning");if(e.binParameters.normalizationType&&(!o.supportsNormalization||!de(e.binParameters.normalizationType,o.supportedNormalizationTypes)))throw new r(n,"Layer source does not support normalization binning")}if(e.binParameters?.stackBy&&!o.supportsStackBy)throw new r(n,"Layer source does not support stackBy binning");if(e.binParameters?.splitBy&&!o.supportsSplitBy)throw new r(n,"Layer source does not support splitBy binning");if(e.binParameters?.firstDayOfWeek&&!o.supportsFirstDayOfWeek)throw new r(n,"Layer source does not support firstDayOfWeek binning");const i=o?.supportedStatistics;if(e.outStatistics&&i){const t=new Map([["count","count"],["sum","sum"],["min","min"],["max","max"],["avg","avg"],["stddev","stddev"],["var","var"],["percentile-continuous","percentileContinuous"],["percentile-discrete","percentileDiscrete"],["centroid-aggregate","centroid"],["convex-hull-aggregate","convexHull"],["envelope-aggregate","envelope"]]);for(const{statisticType:o}of e.outStatistics){const e=t.get(o);if(e&&!i[e])throw new r(n,`Layer source does not support ${o} statistic type`)}}}function de(e,t){return null!=e&&!!t?.[g.toJSON(e)]}export{S as addAttachment,L as applyEdits,Y as checkServiceCurrentUserSupport,$ as computeDomainFromSubtypes,J as computeDomainFromTypes,ne as computeEffectiveEditingEnabled,ie as createDefaultRenderer,z as createQuery,A as deleteAttachments,K as ensureCredentialIfSignedIn,X as ensureLayerCredential,E as fetchRecomputedExtents,P as geometryTypeKebabDict,G as getFeatureSubtype,ue as getFeatureType,V as getFieldDomain,ae as getGlobalIdToObjectIdMap,_ as getSignedInUser,re as hasCurrentUser,k as hasDataChanged,se as isLayerCacheStale,D as queryAttachments,B as queryExtent,C as queryFeatureCount,T as queryObjectIds,R as queryRelatedFeatures,M as queryRelatedFeaturesCount,U as readGlobalIdField,N as readObjectIdField,Q as readVersion,ce as supportsQueryOnly,Z as typesHaveUniqueIdsAndNames,v as updateAttachment,O as uploadAssets,pe as validateBinsQuery};
|
|
2
|
+
import{id as e}from"../../kernel.js";import{isPopupTemplate as t}from"../../popupTemplateUtils.js";import{resultOrAbort as r}from"../../core/asyncUtils.js";import n from"../../core/Error.js";import{JSONMap as o}from"../../core/jsonMap.js";import i from"../../core/Logger.js";import{parseWhereClause as s}from"../../core/sql.js";import{normalizeGlobalID as a}from"../../core/uuid.js";import{createTypeReader as u}from"../../core/accessorSupport/extensions/serializableProperty/reader.js";import{isHostedAgolService as l}from"./arcgisLayerUrl.js";import c from"./CodedValue.js";import p from"./CodedValueDomain.js";import{queryAllJSON as d}from"./featureQueryAll.js";import{isStringField as f,isIntegerField as y}from"./fieldUtils.js";import{isLabelClass as m}from"./labelUtils.js";import{isLayerWithFeatureCapabilities as b,getOwningPortalUrl as h}from"./layerUtils.js";import w from"../../renderers/SimpleRenderer.js";import g from"../../renderers/UniqueValueRenderer.js";import{isSizeVariable as I}from"../../renderers/visualVariables/support/sizeVariableUtils.js";import j from"../../rest/support/AttachmentQuery.js";import{normalizationTypeJsonMap as x}from"../../rest/support/NormalizationBinParametersMixin.js";import F from"../../rest/support/Query.js";import v from"../../rest/support/RelationshipQuery.js";import{loadArcade as S}from"../../support/loadArcade.js";import{symbolTypesRenderer as P}from"../../symbols/support/typeUtils.js";const L=()=>i.getLogger("esri.layers.support.featureLayerUtils"),q=new o({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function A(e,t,r,o){const i=await Y(e);if(await E(e,t,o),!i.addAttachment)throw new n(o,"Layer source does not support addAttachment capability");return i.addAttachment(t,r)}function E(e,t,r){const{attributes:o}=t,{objectIdField:i}=e;return e.capabilities?.data?.supportsAttachment?t?o?i&&o[i]?Promise.resolve():Promise.reject(new n(r,`feature is missing the identifying attribute ${i}`)):Promise.reject(new n(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new n(r,"A feature is required to add/delete/update attachments")):Promise.reject(new n(r,"this layer doesn't support attachments"))}async function M(e,t,r,o,i){const s=await Y(e);if(await E(e,t,i),!s.updateAttachment)throw new n(i,"Layer source does not support updateAttachment capability");return s.updateAttachment(t,r,o)}async function O(e,t,r){const{applyEdits:n}=await import("../graphics/editingSupport.js"),o=await e.load();let i=r;const{url:s,type:a,globalIdField:u}=o;return"feature"===a&&l(s)&&o.infoFor3D&&null!=t.deleteFeatures&&null!=u&&(i={...i,globalIdToObjectId:await pe(o,t.deleteFeatures,u)}),n(o,o.source,t,i)}async function C(e,t,r){const{uploadAssets:n}=await import("../graphics/editingSupport.js"),o=await e.load();return n(o,o.source,t,r)}async function D(e,t,r,o){const i=await Y(e);if(await E(e,t,o),!i.deleteAttachments)throw new n(o,"Layer source does not support deleteAttachments capability");return i.deleteAttachments(t,r)}async function T(e,t,r){const o=(await e.load({signal:t?.signal})).source;if(!o.fetchRecomputedExtents)throw new n(r,"Layer source does not support fetchUpdates capability");return o.fetchRecomputedExtents(t)}async function z(e,t,r,o){let i=j.from(t);await e.load();const s=e.source,a=e.capabilities;if(!a?.data?.supportsAttachment)throw new n(o,"this layer doesn't support attachments");const{attachmentTypes:u,objectIds:l,globalIds:c,num:p,size:d,start:f,where:y}=i;if(!a?.operations?.supportsQueryAttachments){if(u?.length>0||c?.length>0||d?.length>0||p||f||y)throw new n(o,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",i)}if(!(l?.length||c?.length||y))throw new n(o,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",i);if(!s.queryAttachments)throw new n(o,"Layer source does not support queryAttachments capability",i);return!a?.attachment?.supportsOrderByFields&&i.orderByFields?.length&&(i=i.clone(),i.orderByFields=null),s.queryAttachments(i)}async function U(e,t,r,o){const i=await Y(e);if(!i.queryObjectIds)throw new n(o,"Layer source does not support queryObjectIds capability");return i.queryObjectIds(F.from(t)??e.createQuery(),r)}async function k(e,t,r,o){const i=await Y(e);if(!i.queryFeatureCount)throw new n(o,"Layer source does not support queryFeatureCount capability");return i.queryFeatureCount(F.from(t)??e.createQuery(),r)}async function B(e,t,r,o){const i=await Y(e);if(!i.queryExtent)throw new n(o,"Layer source does not support queryExtent capability");return i.queryExtent(F.from(t)??e.createQuery(),r)}async function V(e,t,r,o){const i=await Y(e);if(!i.queryRelatedFeatures)throw new n(o,"Layer source does not support queryRelatedFeatures capability");return i.queryRelatedFeatures(v.from(t),r)}async function R(e,t,r,o){const i=await Y(e);if(!i.queryRelatedFeaturesCount)throw new n(o,"Layer source does not support queryRelatedFeaturesCount capability");return i.queryRelatedFeaturesCount(v.from(t),r)}async function N(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:n}=await t.refresh();if(null!=n&&(e.sourceJSON={...e.sourceJSON,...n},e.read(n,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await s(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function G(e){const t=new F;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,t.outFields=["*"],t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null;const r=e.capabilities?.query;r&&(t.compactGeometryEnabled=r.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=r.supportsDefaultSpatialReference);const n=e.capabilities?.data;n?.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),n?.supportsM&&null!=e.returnM&&(t.returnM=e.returnM);const{timeOffset:o,timeExtent:i}=e;return t.timeExtent=null!=o&&null!=i?i.offset(-o.value,o.unit):i||null,t}function Q(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const n of r)if("esriFieldTypeGlobalID"===n.type)return n.name}function Z(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const n of r)if("esriFieldTypeOID"===n.type)return n.name}function $(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}function J(e,t,r,n){const o=r?.feature,i=!!e.subtypes?.length;if(i&&!r?.excludeImpliedDomains){const r=W(e,t);if(r)return r}const s=i&&H(e,o);if(s){const e=s?.domains?.[t];return"inherited"===e?.type?n:e}const a=de(e.types,e.typeIdField,o);if(a){const e=a.domains&&a.domains[t];if(e&&"inherited"!==e?.type)return e}if(n)return n;if(!r?.excludeImpliedDomains){const r=_(e,t);if(r)return r}return null}function H(e,t){const{subtypes:r,subtypeField:n}=e;if(!t?.attributes||!r?.length||!n)return null;const o=t.attributes[n];return null==o?null:r.find(e=>e.code===o)}function W(e,t){const{fieldsIndex:r,subtypeField:n}=e,{name:o,type:i}=r.get(t)??{};if(!o)return null;if((n&&r.get(n)?.name)===o&&e.subtypes?.length){const t=e.subtypes.map(e=>new c({code:X(e.code,i),name:e.name}));if(t?.length)return new p({codedValues:t})}return null}function _(e,t){const{fieldsIndex:r}=e,{name:n,type:o}=r.get(t)??{};if(!n)return null;if(("typeIdField"in e?r.get(e.typeIdField)?.name:null)===n&&"types"in e&&e.types?.length&&K(e.types)){const t=e.types?.map(e=>new c({code:X(e.id,o),name:e.name}));return new p({codedValues:t})}return null}function K(e){const t=new Set,r=new Set;for(const n of e){if(t.has(n.id)||r.has(n.name))return!1;t.add(n.id),r.add(n.name)}return!0}function X(e,t){return t?f({type:t})&&"number"==typeof e?`${e}`:y({type:t})&&"string"==typeof e?Number.parseInt(e,10):e:e}async function Y(e){return(await e.load()).source}async function ee(t,r){if(!e)return;const n=e.findCredential(t);if(n)return n.userId;let o;try{const n=await h(t,r);n&&(o=await e.checkSignInStatus(`${n}/sharing`))}catch(i){}return o?o.userId:null}async function te(t,r){if(!e)return;if(e.findCredential(t))return;let n;try{const o=await h(t,r);o&&(n=await e.checkSignInStatus(`${o}/sharing`))}catch(o){}if(n)try{const n=null!=r?r.signal:null;await e.getCredential(t,{signal:n})}catch(o){}}async function re(e,t,r){const n=e.parsedUrl?.path;n&&e.authenticationTriggerEvent===t&&await te(n,r)}async function ne(e){const t=e.parsedUrl?.path;t&&oe(e)&&await te(t)}function oe(e){return ie(e)&&("serviceDefinitionExpression"in e&&se(e.serviceDefinitionExpression)||"definitionExpression"in e&&se(e.definitionExpression))}function ie(e){return!(!b(e)||!e.capabilities?.query.supportsCurrentUser)}function se(e){return!!e?.toLowerCase().includes("current_user")}function ae(e){return!fe(e)&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const ue=u({types:P});function le(e,t){if(e.defaultSymbol)return e.types?.length?new g({defaultSymbol:ue(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map(e=>({id:e.id,symbol:ue(e.symbol,e,t)}))}):new w({symbol:ue(e.defaultSymbol,e,t)})}function ce(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}async function pe(e,t,n){if(null==t)return null;const o=[],{objectIdField:i}=e;if(t.forEach(e=>{let t=null;if("attributes"in e){const{attributes:r}=e;t={globalId:r[n],objectId:null!=r[i]&&-1!==r[i]?r[i]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||o.push(t.globalId))}),0===o.length)return null;const s=e.createQuery();s.where=o.map(e=>`${n}='${e}'`).join(" OR "),s.returnGeometry=!1,s.outFields=[i,n],s.cacheHint=!1;const u=await r(d(e,s));if(!u.ok)return null;const l=new Map,c=u.value.features;for(const r of c){const e=r.attributes[n],t=r.attributes[i];null!=e&&null!=t&&-1!==t&&l.set(a(e),t)}return l}function de(e,t,r){if(!t||!r||!e)return null;const n=r.getAttribute(t);if(null==n)return null;const o=e.filter(e=>{const{id:t}=e;return null!=t&&t.toString()===n.toString()});return o.length>1&&L().warn("getFeatureType",`Cannot unambiguously determine feature type because multiple types have the id ${n}.`),o[0]??null}function fe(e){return e.sourceJSON?.isMultiServicesView||ye(e)}function ye(e){return!!e.sourceJSON?.capabilities?.toLowerCase().split(",").map(e=>e.trim()).includes("map")}function me(e,t,r){const o=t?.queryAttributeBins;if(!t?.operations?.supportsQueryBins||!o)throw new n(r,"Layer source does not support binning");switch(e.binParameters?.type){case"auto-interval":if(!o.supportsAutoInterval)throw new n(r,"Layer source does not support auto-interval binning");if(e.binParameters.normalizationType&&(!o.supportsNormalization||!be(e.binParameters.normalizationType,o.supportedNormalizationTypes)))throw new n(r,"Layer source does not support normalization binning");break;case"date":if(!o.supportsDate)throw new n(r,"Layer source does not support date binning");if(e.binParameters.snapToData&&!o.supportsSnapToData)throw new n(r,"Layer source does not support snapToData binning");if(e.binParameters.returnFullIntervalBin&&!o.supportsReturnFullIntervalBin)throw new n(r,"Layer source does not support returnFullIntervalBin binning");break;case"fixed-boundaries":if(!o.supportsFixedBoundaries)throw new n(r,"Layer source does not support fixed-boundaries binning");break;case"fixed-interval":if(!o.supportsFixedInterval)throw new n(r,"Layer source does not support fixed-interval binning");if(e.binParameters.normalizationType&&(!o.supportsNormalization||!be(e.binParameters.normalizationType,o.supportedNormalizationTypes)))throw new n(r,"Layer source does not support normalization binning")}if(e.binParameters?.stackBy&&!o.supportsStackBy)throw new n(r,"Layer source does not support stackBy binning");if(e.binParameters?.splitBy&&!o.supportsSplitBy)throw new n(r,"Layer source does not support splitBy binning");if(e.binParameters?.firstDayOfWeek&&!o.supportsFirstDayOfWeek)throw new n(r,"Layer source does not support firstDayOfWeek binning");const i=o?.supportedStatistics;if(e.outStatistics&&i){const t=new Map([["count","count"],["sum","sum"],["min","min"],["max","max"],["avg","avg"],["stddev","stddev"],["var","var"],["percentile-continuous","percentileContinuous"],["percentile-discrete","percentileDiscrete"],["centroid-aggregate","centroid"],["convex-hull-aggregate","convexHull"],["envelope-aggregate","envelope"]]);for(const{statisticType:o}of e.outStatistics){const e=t.get(o);if(e&&!i[e])throw new n(r,`Layer source does not support ${o} statistic type`)}}}function be(e,t){return null!=e&&!!t?.[x.toJSON(e)]}function he(e){return m(e)?Boolean(e.labelExpressionInfo?.expression):t(e)?!!e.expressionInfos?.some(e=>e.expression)||!!Array.isArray(e.content)&&e.content.some(e=>"expression"===e.type&&e.expressionInfo?.expression):!("dot-density"!==e.type||!e.attributes?.some(e=>e.valueExpression))||(!(!("valueExpression"in e)||!e.valueExpression)||"visualVariables"in e&&null!=e.visualVariables&&e.visualVariables.some(e=>!!e.valueExpression||"size"===e.type&&(I(e.minSize)&&e.minSize.valueExpression||I(e.maxSize)&&e.maxSize.valueExpression)))}function we(e){if("renderer"in e&&e.renderer&&he(e.renderer))return!0;if("labelingInfo"in e&&e.labelingInfo)for(const t of e.labelingInfo)if(m(t)&&he(t))return!0;return!1}async function ge(e){let t="returnZ"in e&&e.returnZ,r="returnM"in e&&e.returnM;if(null!=t&&null!=r)return{returnZ:t,returnM:r};if(we(e)){const{arcadeUtils:n}=await S();n.layerHasGeometryFunctions(e)&&(t??=!0,r??=!0)}if("renderer"in e&&e.renderer?.symbols)for(const n of e.renderer.symbols)"cim"===n.type&&(Ie??=(await import("../../symbols/cim/CIMSymbolHelper.js")).forEachSymbolLayer,Ie(n.data.symbol,e=>{switch(e.type){case"CIMPictureMarker":case"CIMVectorMarker":if("CIMMarkerPlacementAtMeasuredUnits"===e.markerPlacement?.type)r??=!0}}));return{returnZ:t,returnM:r}}let Ie;export{A as addAttachment,O as applyEdits,ne as checkServiceCurrentUserSupport,W as computeDomainFromSubtypes,_ as computeDomainFromTypes,ae as computeEffectiveEditingEnabled,le as createDefaultRenderer,G as createQuery,D as deleteAttachments,te as ensureCredentialIfSignedIn,re as ensureLayerCredential,T as fetchRecomputedExtents,q as geometryTypeKebabDict,H as getFeatureSubtype,de as getFeatureType,J as getFieldDomain,pe as getGlobalIdToObjectIdMap,ee as getSignedInUser,se as hasCurrentUser,N as hasDataChanged,ce as isLayerCacheStale,ge as layerRequiresGeometryZM,z as queryAttachments,B as queryExtent,k as queryFeatureCount,U as queryObjectIds,V as queryRelatedFeatures,R as queryRelatedFeaturesCount,Q as readGlobalIdField,Z as readObjectIdField,$ as readVersion,fe as supportsQueryOnly,K as typesHaveUniqueIdsAndNames,M as updateAttachment,C as uploadAssets,me as validateBinsQuery};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{replace as e}from"../../core/string.js";const n="__begin__",r="__end__",s=new RegExp(n,"ig"),t=new RegExp(r,"ig"),l=new RegExp("^"+n,"i"),o=new RegExp(r+"$","i"),i='"',a=i+" + ",c=" + "+i;function
|
|
2
|
+
import{replace as e}from"../../core/string.js";const n="__begin__",r="__end__",s=new RegExp(n,"ig"),t=new RegExp(r,"ig"),l=new RegExp("^"+n,"i"),o=new RegExp(r+"$","i"),i='"',a=i+" + ",c=" + "+i;function u(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function p(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function x(e){const n={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(n.expression=e.labelExpressionInfo.value,n.type="conventional"):e.labelExpressionInfo.expression&&(n.expression=e.labelExpressionInfo.expression,n.type="arcade"):null!=e.labelExpression&&(n.expression=u(e.labelExpression),n.type="conventional"),n}function f(e){const n=x(e);if(!n)return null;switch(n.type){case"conventional":return E(n.expression);case"arcade":return n.expression}return null}function g(e){const n=x(e);if(!n)return null;switch(n.type){case"conventional":return $(n.expression);case"arcade":return R(n.expression)}return null}function E(u){let p;return u?(p=e(u,e=>n+'$feature["'+e+'"]'+r),p=l.test(p)?p.replace(l,""):i+p,p=o.test(p)?p.replace(o,""):p+i,p=p.replaceAll(s,a).replaceAll(t,c)):p='""',p}const w=/^\s*\{([^}]+)\}\s*$/i;function $(e){const n=e?.match(w);return n?.[1].trim()||null}const b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,m=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,y=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function R(e){if(!e)return null;let n=b.exec(e)||m.exec(e);return n?n[1]||n[3]:(n=y.exec(e),n?n[2]:null)}const _=Symbol("LabelClassInstance");function v(e){return null!=e&&"object"==typeof e&&_ in e}export{_ as LabelClassSymbol,E as convertTemplatedStringToArcade,x as getLabelExpression,f as getLabelExpressionArcade,g as getLabelExpressionSingleField,R as getSingleFieldArcadeExpression,$ as getSingleFieldTemplatedString,v as isLabelClass,u as sqlToTemplateString,p as templateStringToSql};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import e from"../../geometry/Point.js";import t from"../../geometry/Polygon.js";import r from"../../geometry/Polyline.js";import n from"../support/TelemetryData.js";import
|
|
2
|
+
import e from"../../geometry/Point.js";import t from"../../geometry/Polygon.js";import r from"../../geometry/Polyline.js";import n from"../../geometry/SpatialReference.js";import{execute as o}from"../../geometry/operators/projectOperator.js";import i from"../support/TelemetryData.js";import a from"../support/VideoTimeExtent.js";import{applyCIMSymbolColor as u}from"../../symbols/support/cimSymbolUtils.js";import{applyColorToSymbol as s}from"../../symbols/support/utils.js";const l="application/x-mpegURL",f="video/mp4",d="video/webm",g={UASDatalinkLocalSet:1e4,PrecisionTimeStamp:10002,MissionId:10003,PlatformTailNumber:10004,PlatformHeadingAngle:10005,PlatformPitchAngle:10006,PlatformRollAngle:10007,PlatformTrueAirspeed:10008,PlatformIndicatedAirspeed:10009,PlatformDesignation:10010,ImageSourceSensor:10011,ImageCoordinateSystem:10012,SensorLatitude:10013,SensorLongitude:10014,SensorTrueAltitude:10015,SensorHorizontalFOV:10016,SensorVerticalFOV:10017,SensorAzimuthAngle:10018,SensorElevationAngle:10019,SensorRollAngle:10020,PlatformSlantRange:10021,TargetWidth:10022,FrameCenterLatitude:10023,FrameCenterLongitude:10024,FrameCenterElevation:10025,OffsetCorner1Latitude:10026,OffsetCorner1Longitude:10027,OffsetCorner2Latitude:10028,OffsetCorner2Longitude:10029,OffsetCorner3Latitude:10030,OffsetCorner3Longitude:10031,OffsetCorner4Latitude:10032,OffsetCorner4Longitude:10033,TargetLocationLatitude:10040,TargetLocationLongitude:10041,TargetLocationElevation:10042,TargetTrackGateWidth:10043,TargetTrackGateHeight:10044,TargetErrorEstimateHorizontal:10045,TargetErrorEstimateLateral:10046,GenericFlagData:10047,PlatformGroundSpeed:10056,PlatformGroundRange:10057,PlatformRemainingFuel:10058,PlatformCallSign:10059,SensorFOVName:10063,PlatformMagneticHeading:10064,LDSVersionNumber:10065,AlternatePlatformName:10070,EventStartTimeUTC:10072,VMTIDataSet:10074,SensorEllipsoidHeight:10075,OperationalMode:10077,FrameCenterAboveEllipsoid:10078,CornerLatitudePoint1:10082,CornerLongitudePoint1:10083,CornerLatitudePoint2:10084,CornerLongitudePoint2:10085,CornerLatitudePoint3:10086,CornerLongitudePoint3:10087,CornerLatitudePoint4:10088,CornerLongitudePoint4:10089,SARMotionImageryMetadata:10095,SecurityClassification:20001,SecurityClassifyingAuthority:20002,SecurityClassifyingCountry:20003,SecuritySCI:20004,SecurityCaveats:20005,SecurityReleaseInstructions:20006,SecurityLDSVersion:20022,EsriVideoWidth:90001,EsriVideoHeight:90002,EsriFrameCenterLatitude:90050,EsriFrameCenterLongitude:90051,EsriCornerLatitudePt1:90052,EsriCornerLongitudePt1:90053,EsriCornerLatitudePt2:90054,EsriCornerLongitudePt2:90055,EsriCornerLatitudePt3:90056,EsriCornerLongitudePt3:90057,EsriCornerLatitudePt4:90058,EsriCornerLongitudePt4:90059,EsriFrameOutline:90060,EsriSensorPosition:90061,EsriHorizonPixelPack:90063,EsriGroundControlPoints:90064};function m(e,t=1e4){if(!e||!e.length)return[];let r=[],n=[];for(let i=0;i<e.length;i++){const t=e[i],n=t?.text?JSON.parse(t.text):null;"EsriVideoServer"===n?.source&&(r=[...n.data])}const o=r.find(e=>e.tagId===t);return Array.isArray(o?.value)&&(n=[...o.value]),n}function C(e){const{duration:t,end:r,start:n,timezone:o="UTC"}=e||{};return"number"!=typeof t?null:new a({duration:t||null,end:"number"==typeof r?new Date(r):null,start:"number"==typeof n?new Date(n):null,timezone:o})}function c(e,t){const r=[...t],n=r.findIndex(t=>t.equals(e));return n>-1&&r.splice(n),r.push(e),r}function L(e){if(!e?.size)return new i;const t=z(e),r=p(e),n=w(e),o=b(t,r);return new i({frameCenter:r,frameOutline:n,lineOfSight:o,sensorLocation:t})}function y(e){if(!e?.size)return null;return e.get(g.EsriGroundControlPoints)?.value??null??null}function P(e){return e?.size?e.get(g.EsriHorizonPixelPack)?.value??null:null}function p(e){return O(e)??F(e)}function E(e){if(!e)return l;const t=e.match(/\.(\w{3,4})(?:$|\?)/i);if(!t)return l;switch(t[1].toLowerCase()){case"mp4":return f;case"webm":return d;default:return l}}function S(e){const t=e?.layers;return t?.length?t.map(e=>({layerId:e.id,posterUrl:e.poster,sourceType:e.serviceType,title:e.name,type:e.type||"Video Layer"})):[]}function h(e,t,r){if(!e)return null;const n=e.clone();switch(n.type){case"simple-fill":s(n,r),n.outline.color=t;break;case"simple-line":s(n,t);break;case"simple-marker":s(n,t),n?.outline?.color&&(n.outline.color=t);break;case"cim":u(n,t)}return n}function v(e){const{cameraAzimuth:t,platformHeading:r,source:n=null,symbolOffset:o=0}=e||{};let i=0;if(!n)return i;i="platformHeading"===n?r+o:r+t+o;const a=i>360?i-360:i;return Math.round(Math.abs(a))}function x(t,r,i){if(!r||r.length<3)return null;const a=[...r].sort((e,t)=>e.y===t.y?e.x-t.x:e.y-t.y),u=Array.from(new Set(a.map(e=>e.x))).sort((e,t)=>e-t),s=Array.from(new Set(a.map(e=>e.y)));let l=-1;for(let e=u.length-2;e>=0;e--)if(t.x>=u[e]&&t.x<=u[e+1]){l=e;break}let f=-1;for(let e=s.length-2;e>=0;e--)if(t.y>=s[e]&&t.y<=s[e+1]){f=e;break}if(l<0||f<0||l>=u.length-1||f>=s.length-1)return null;const d=u[l],g=u[l+1],m=s[f],C=s[f+1],c=(e,t)=>{const n=r.find(r=>r.x===e&&r.y===t);if(!n)throw new Error(`Control point not found for x: ${e}, y: ${t}`);return n},L=c(d,m),y=c(g,m),P=c(d,C),p=c(g,C),E=t.x,S=t.y;let h,v;if(G(L.x,L.y,y.x,y.y,p.x,p.y,E,S)){const t=new e(L.lon,L.lat,n.WGS84),r=new e(y.lon,y.lat,n.WGS84),a=new e(p.lon,p.lat,n.WGS84);v=[L,y,p],h=[o(t,i),o(r,i),o(a,i)]}else{if(!G(L.x,L.y,p.x,p.y,P.x,P.y,E,S))return null;{const t=new e(L.lon,L.lat,n.WGS84),r=new e(p.lon,p.lat,n.WGS84),a=new e(P.lon,P.lat,n.WGS84);v=[L,p,P],h=[o(t,i),o(r,i),o(a,i)]}}const[x,O,F]=v,[w,T,A]=h,b=(O.y-F.y)*(x.x-F.x)+(F.x-O.x)*(x.y-F.y),z=((O.y-F.y)*(E-F.x)+(F.x-O.x)*(S-F.y))/b,V=((F.y-x.y)*(E-F.x)+(x.x-F.x)*(S-F.y))/b,k=1-z-V;return[z*w.x+V*T.x+k*A.x,z*w.y+V*T.y+k*A.y]}function O(t){return t&&t.has(g.EsriFrameCenterLatitude)&&t.has(g.EsriFrameCenterLongitude)?new e({x:t.get(g.EsriFrameCenterLongitude).value,y:t.get(g.EsriFrameCenterLatitude).value,z:t.get(g.FrameCenterAboveEllipsoid)?.value??t.get(g.FrameCenterElevation)?.value}):null}function F(t){return t&&t.has(g.FrameCenterLatitude)&&t.has(g.FrameCenterLongitude)?new e({x:t.get(g.FrameCenterLongitude)?.value,y:t.get(g.FrameCenterLatitude)?.value,z:t.get(g.FrameCenterElevation)?.value}):null}function w(e){if(!e)return null;const r=e.get(g.EsriFrameOutline)?.value;return r?t.fromJSON(r.geometry):T(e)??A(e)}function T(e){if(!(e.has(g.EsriCornerLatitudePt1)&&e.has(g.EsriCornerLongitudePt1)&&e.has(g.EsriCornerLatitudePt2)&&e.has(g.EsriCornerLongitudePt2)&&e.has(g.EsriCornerLatitudePt3)&&e.has(g.EsriCornerLongitudePt3)&&e.has(g.EsriCornerLatitudePt4)&&e.has(g.EsriCornerLongitudePt4)))return null;const r=[e.get(g.EsriCornerLongitudePt1)?.value,e.get(g.EsriCornerLatitudePt1)?.value],n=[e.get(g.EsriCornerLongitudePt2)?.value,e.get(g.EsriCornerLatitudePt2)?.value],o=[e.get(g.EsriCornerLongitudePt3)?.value,e.get(g.EsriCornerLatitudePt3)?.value],i=[e.get(g.EsriCornerLongitudePt4)?.value,e.get(g.EsriCornerLatitudePt4)?.value];return new t({rings:[[r,n,o,i]]})}function A(e){if(!(e.has(g.OffsetCorner1Latitude)&&e.has(g.OffsetCorner1Longitude)&&e.has(g.OffsetCorner2Latitude)&&e.has(g.OffsetCorner2Longitude)&&e.has(g.OffsetCorner3Latitude)&&e.has(g.OffsetCorner3Longitude)&&e.has(g.OffsetCorner4Latitude)&&e.has(g.OffsetCorner4Longitude)&&e.has(g.FrameCenterLatitude)&&e.has(g.FrameCenterLongitude)))return null;const r=e.get(g.FrameCenterLatitude)?.value,n=e.get(g.FrameCenterLongitude)?.value,o=r+e.get(g.OffsetCorner1Latitude)?.value,i=n+e.get(g.OffsetCorner1Longitude)?.value,a=r+e.get(g.OffsetCorner2Latitude)?.value,u=n+e.get(g.OffsetCorner2Longitude)?.value,s=r+e.get(g.OffsetCorner3Latitude)?.value,l=n+e.get(g.OffsetCorner3Longitude)?.value,f=r+e.get(g.OffsetCorner4Latitude)?.value,d=n+e.get(g.OffsetCorner4Longitude)?.value;return new t({rings:[[[i,o],[u,a],[l,s],[d,f]]]})}function b(e,t){if(!e||!t)return null;const n=[e.x,e.y,e.z??0],o=[t.x,t.y,t.z??0];return new r({paths:[[n,o]]})}function z(t){if(!t?.size)return null;if(t.has(g.EsriSensorPosition)){const r=t.get(g.EsriSensorPosition)?.value;if(r)return e.fromJSON(r.geometry)}return t.has(g.SensorLongitude)&&t.has(g.SensorLatitude)?new e({x:t.get(g.SensorLongitude)?.value,y:t.get(g.SensorLatitude)?.value,z:t.get(g.SensorTrueAltitude)?.value}):null}function G(e,t,r,n,o,i,a,u){return(o-a)*(t-u)-(e-a)*(i-u)>=0&&(e-a)*(n-u)-(r-a)*(t-u)>=0&&(r-a)*(i-u)-(o-a)*(n-u)>=0}export{x as computeVideoToMapBaricentric,p as getFrameCenter,P as getFrameHorizonPoints,y as getGroundControlPoints,c as getSensorTrailPoints,S as getServiceLayersInfo,h as getStyledTelemetrySymbol,v as getSymbolDisplayAngle,L as getTelemetryData,m as getVideoMetadataFromCueList,E as getVideoMimeType,C as readVideoTimeExtent,g as videoMetadataEntryId};
|