@arcgis/core 5.2.0-next.95 → 5.2.0-next.97
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/WebScene.d.ts +6 -3
- package/WebScene.js +1 -1
- package/applications/WebEditor/geometryUtils.d.ts +1 -1
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/containerUtils.js +1 -1
- package/arcade/functions/track.js +1 -1
- package/arcgisGlobal.d.ts +2 -0
- package/assets/components/assets/icon/aiAgent16.json +1 -0
- package/assets/components/assets/icon/aiAgent24.json +1 -0
- package/assets/components/assets/icon/aiAgent32.json +1 -0
- package/assets/components/assets/icon/aiAgents16.json +1 -0
- package/assets/components/assets/icon/aiAgents24.json +1 -0
- package/assets/components/assets/icon/aiAgents32.json +1 -0
- package/assets/components/assets/icon/explodeGeometry16.json +1 -0
- package/assets/components/assets/icon/explodeGeometry24.json +1 -0
- package/assets/components/assets/icon/explodeGeometry32.json +1 -0
- package/assets/components/assets/icon/integration16.json +1 -0
- package/assets/components/assets/icon/integration24.json +1 -0
- package/assets/components/assets/icon/integration32.json +1 -0
- package/assets/components/assets/icon/spatiotemporalCatalog16.json +1 -0
- package/assets/components/assets/icon/spatiotemporalCatalog24.json +1 -0
- package/assets/components/assets/icon/spatiotemporalCatalog32.json +1 -0
- package/assets/components/assets/input-time-zone/t9n/messages.de.json +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/000f91a18c22377f8525.js +1 -0
- package/assets/esri/core/workers/chunks/{05662a663f761dd3dea5.js → 006146ad6d4a5cbf1a1f.js} +1 -1
- package/assets/esri/core/workers/chunks/{bd1a7e95a797e1ed4a7b.js → 013c17e07756fa465845.js} +1 -1
- package/assets/esri/core/workers/chunks/014eaccf2c2d357981f0.js +1 -0
- package/assets/esri/core/workers/chunks/{f253875feb11883deb84.js → 04d4cd66485b622403d0.js} +1 -1
- package/assets/esri/core/workers/chunks/05eb064f9b543890ae24.js +1 -0
- package/assets/esri/core/workers/chunks/{26737d061c7cfbbab95c.js → 0809a55a2f9be07cc5a9.js} +1 -1
- package/assets/esri/core/workers/chunks/0930738f43ce09b2ed2d.js +1 -0
- package/assets/esri/core/workers/chunks/{691434d4c6a38e63d819.js → 0a242e76bc293b0ad04b.js} +1 -1
- package/assets/esri/core/workers/chunks/0a4092578dc7578bcf76.js +1 -0
- package/assets/esri/core/workers/chunks/0e11bee9b56a7f51b012.js +1 -0
- package/assets/esri/core/workers/chunks/0e65869a5dd5a3917da7.js +1 -0
- package/assets/esri/core/workers/chunks/0ffb5a1275d07dcd9115.js +1 -0
- package/assets/esri/core/workers/chunks/{e370a3337b3c90240e73.js → 105da965fc90604eb6bf.js} +1 -1
- package/assets/esri/core/workers/chunks/1082bb0858585bd4fa21.js +2 -0
- package/assets/esri/core/workers/chunks/{5235b9c21ac4156c2375.js → 10f4c5533f50c3693318.js} +1 -1
- package/assets/esri/core/workers/chunks/1201bb22a2bfd7d7ecba.js +1 -0
- package/assets/esri/core/workers/chunks/16f55c5d642a23c2547e.js +1 -0
- package/assets/esri/core/workers/chunks/{09e01fd1c199be0c8e03.js → 16ffbe484f6cd4736f79.js} +1 -1
- package/assets/esri/core/workers/chunks/{1bf967c68d0c795d3fb4.js → 19a4907fc93ae8b817e9.js} +1 -1
- package/assets/esri/core/workers/chunks/{f74c7cbe4bd12f73ae90.js → 19d7339f20f3008c4893.js} +1 -1
- package/assets/esri/core/workers/chunks/{a8aa8cb60b30f0983e7e.js → 1a9f17781e0a3bc5106f.js} +1 -1
- package/assets/esri/core/workers/chunks/{bf7875fda48b15271a10.js → 1bef7097fe5e402539ea.js} +1 -1
- package/assets/esri/core/workers/chunks/{fa377112ef3b78f6ed18.js → 1de1cc0ed0f169a58aff.js} +1 -1
- package/assets/esri/core/workers/chunks/{0549e2badf511e27aa54.js → 1e3b07cf0e608431a277.js} +1 -1
- package/assets/esri/core/workers/chunks/{2e51764c8aa31096cb2a.js → 20feca2fdd304b3e9664.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c73c2f4331351e2a50c.js → 22ff018342860249b3eb.js} +1 -1
- package/assets/esri/core/workers/chunks/248df6fda489a9de5852.js +1 -0
- package/assets/esri/core/workers/chunks/279b16727d4b515eca44.js +1 -0
- package/assets/esri/core/workers/chunks/2b10d6597af3eeec5396.js +1 -0
- package/assets/esri/core/workers/chunks/2bd4b536e329112591c4.js +1 -0
- package/assets/esri/core/workers/chunks/2c01477b69c38f691e19.js +1 -0
- package/assets/esri/core/workers/chunks/2e2349387a2b9903f13c.js +2 -0
- package/assets/esri/core/workers/chunks/{4d700cb028f6306b163e.js → 32aa1529e84b839d051d.js} +1 -1
- package/assets/esri/core/workers/chunks/33041e50ea02d99480b0.js +1 -0
- package/assets/esri/core/workers/chunks/{5d7a5aa608ed6192b016.js → 349982635e921e838030.js} +1 -1
- package/assets/esri/core/workers/chunks/35d0a7597473d46866de.js +1 -0
- package/assets/esri/core/workers/chunks/374d726fdd0a9848cea5.js +1 -0
- package/assets/esri/core/workers/chunks/379f5ca5372d834af497.js +1 -0
- package/assets/esri/core/workers/chunks/37ae52c71bf9c70fbb92.js +1 -0
- package/assets/esri/core/workers/chunks/{05393b23ab24126d4236.js → 38bc5d09ae07f486d457.js} +1 -1
- package/assets/esri/core/workers/chunks/3bafa01ca01a67d09432.js +1 -0
- package/assets/esri/core/workers/chunks/3c7901ea007c9615ba54.js +1 -0
- package/assets/esri/core/workers/chunks/4047208f9559e06d7102.js +1 -0
- package/assets/esri/core/workers/chunks/4049e9b86c8e27a7ff12.js +1 -0
- package/assets/esri/core/workers/chunks/411bbdecba340df11d95.js +2 -0
- package/assets/esri/core/workers/chunks/42b5533f94ebcdc4befe.js +1 -0
- package/assets/esri/core/workers/chunks/44ca13c874b5aa0ed5a0.js +1 -0
- package/assets/esri/core/workers/chunks/4717831effb1ac6d5f5d.js +1 -0
- package/assets/esri/core/workers/chunks/{5edf77618ca51819d7c4.js → 476535cfb06ced74d611.js} +2 -2
- package/assets/esri/core/workers/chunks/486f1277fe834c0fc4c1.js +1 -0
- package/assets/esri/core/workers/chunks/48ade66f1685a1aaffba.js +1 -0
- package/assets/esri/core/workers/chunks/4d13c1a04788e5222678.js +1 -0
- package/assets/esri/core/workers/chunks/{cc3186dcbbf5edff8b9e.js → 4d7f6c92041d52cc8732.js} +1 -1
- package/assets/esri/core/workers/chunks/{595edbc1e9bba47d5676.js → 4f89da01b67b66a92c01.js} +1 -1
- package/assets/esri/core/workers/chunks/507bbcde2b39321b50a4.js +1 -0
- package/assets/esri/core/workers/chunks/{9b8e33985310f281f084.js → 56a5b65961e722f5cae9.js} +1 -1
- package/assets/esri/core/workers/chunks/5830deda121e4c95d199.js +1 -0
- package/assets/esri/core/workers/chunks/{b102ae764c14d8b32ace.js → 58a52adc42fbe5cd12c6.js} +1 -1
- package/assets/esri/core/workers/chunks/{b0e25ccb5a1e57a82628.js → 58b93f13316196d2e97d.js} +1 -1
- package/assets/esri/core/workers/chunks/58f98bd89b644cfdafae.js +1 -0
- package/assets/esri/core/workers/chunks/5a8658e4ef5163e8ab3b.js +1 -0
- package/assets/esri/core/workers/chunks/5bb8d9d887dd4211afd2.js +1 -0
- package/assets/esri/core/workers/chunks/5d7625eb9997cd0dff09.js +1 -0
- package/assets/esri/core/workers/chunks/5e56a004b4407b8066eb.js +1 -0
- package/assets/esri/core/workers/chunks/5efc66be4576c6f67064.js +1 -0
- package/assets/esri/core/workers/chunks/60b1af54e7fc20fd9588.js +1 -0
- package/assets/esri/core/workers/chunks/6134a2c6983792787184.js +1 -0
- package/assets/esri/core/workers/chunks/6319413b89e23f671487.js +1 -0
- package/assets/esri/core/workers/chunks/{1b311ff39dede07865df.js → 633454b27c34f9ec7940.js} +1 -1
- package/assets/esri/core/workers/chunks/63c43ebf46964c283b4d.js +1 -0
- package/assets/esri/core/workers/chunks/65d3638ded62c5606ae3.js +1 -0
- package/assets/esri/core/workers/chunks/{aa0ef4493a7e9bed159f.js → 662f4b39ec44c68e0733.js} +1 -1
- package/assets/esri/core/workers/chunks/680bef5e8237cc3bdd84.js +1 -0
- package/assets/esri/core/workers/chunks/6835f959952f70972fce.js +1 -0
- package/assets/esri/core/workers/chunks/{ddf284648a73b6993737.js → 68d823697c298122ee08.js} +1 -1
- package/assets/esri/core/workers/chunks/6aaefd61505027267c9b.js +1 -0
- package/assets/esri/core/workers/chunks/6ceb17eada151230abf7.js +1 -0
- package/assets/esri/core/workers/chunks/6df29716f75696434807.js +1 -0
- package/assets/esri/core/workers/chunks/6e804bd6bb4b0ee44fa9.js +1 -0
- package/assets/esri/core/workers/chunks/{ee77999df3785468b2b6.js → 6f6e8b7e6e2c856e4ed1.js} +1 -1
- package/assets/esri/core/workers/chunks/{8ea28a4b1afe8bb2d313.js → 7091bbdc36f1f03f14b3.js} +1 -1
- package/assets/esri/core/workers/chunks/7608de0d942b4c16b2f6.js +1 -0
- package/assets/esri/core/workers/chunks/{4b6f433022a6822706cb.js → 762817d30474c15142b4.js} +1 -1
- package/assets/esri/core/workers/chunks/762e9a15b2638475a2b4.js +1 -0
- package/assets/esri/core/workers/chunks/79088d5c9c2e6a780929.js +1 -0
- package/assets/esri/core/workers/chunks/{f3d57c5b9dffd12e45b4.js → 7c3a89c12ea32a071ad4.js} +1 -1
- package/assets/esri/core/workers/chunks/7c67596c0792282afdfc.js +1 -0
- package/assets/esri/core/workers/chunks/7cef6e5f39137e74bbc3.js +1 -0
- package/assets/esri/core/workers/chunks/{87e0ceb1a64ab08e679a.js → 7fd54fa2f91cdab44ab3.js} +1 -1
- package/assets/esri/core/workers/chunks/822a5020afbca21df7f7.js +1 -0
- package/assets/esri/core/workers/chunks/8599d2f2eb0fbb4a8bf5.js +1 -0
- package/assets/esri/core/workers/chunks/862f7090ba4a56c07093.js +1 -0
- package/assets/esri/core/workers/chunks/{97c7dfd29ad4c2966cb4.js → 88252899a5291ad29710.js} +1 -1
- package/assets/esri/core/workers/chunks/8837fbcc0d484659b79c.js +1 -0
- package/assets/esri/core/workers/chunks/8dcc7749de3391710864.js +1 -0
- package/assets/esri/core/workers/chunks/900dad076347443b3ad9.js +1 -0
- package/assets/esri/core/workers/chunks/{f8f7b86bbd62106bc3d4.js → 925f83be3c1eb4b5c6af.js} +1 -1
- package/assets/esri/core/workers/chunks/{a4a22149077c7780481c.js → 9378ce457b02717304e6.js} +1 -1
- package/assets/esri/core/workers/chunks/93a7cf23f73b23fc7802.js +1 -0
- package/assets/esri/core/workers/chunks/93c1d1e7c0935242071e.js +1 -0
- package/assets/esri/core/workers/chunks/{fddcb8be714ad18ad0c8.js → 970b33947bf61fccd461.js} +1 -1
- package/assets/esri/core/workers/chunks/97aaff86e06380a68df8.js +1 -0
- package/assets/esri/core/workers/chunks/9bc7df2b8ae0ed443d13.js +1 -0
- package/assets/esri/core/workers/chunks/9cc14a41d4a90f6d626e.js +1 -0
- package/assets/esri/core/workers/chunks/9e514a58b1165e273202.js +1 -0
- package/assets/esri/core/workers/chunks/9fe1db0762ab3326eab4.js +1 -0
- package/assets/esri/core/workers/chunks/{a5bb19d2b7d7db22222b.js → a10188c4d1904965898a.js} +1 -1
- package/assets/esri/core/workers/chunks/a2288d44cba34d947613.js +1 -0
- package/assets/esri/core/workers/chunks/a26916de4c105859621e.js +1 -0
- package/assets/esri/core/workers/chunks/a322afbb48898ce35851.js +1 -0
- package/assets/esri/core/workers/chunks/a34cadd486e7fcc79063.js +1 -0
- package/assets/esri/core/workers/chunks/{cefb70d633c220cbedf9.js → a4dc1a80ed6604d71722.js} +1 -1
- package/assets/esri/core/workers/chunks/{6baae3e856d904fef9b1.js → a8f70cece5ce2b095cdd.js} +1 -1
- package/assets/esri/core/workers/chunks/ab332bd411d6c7d4190c.js +1 -0
- package/assets/esri/core/workers/chunks/{777f2fdf1f4b9f243893.js → ab3a6ce7bc2a27b92469.js} +1 -1
- package/assets/esri/core/workers/chunks/abd2f8fae6b918fbdd6d.js +1 -0
- package/assets/esri/core/workers/chunks/ad695de9f73b268af139.js +1 -0
- package/assets/esri/core/workers/chunks/{b13d2da33ec07e9d41ff.js → b0da2b089a89d643df1e.js} +1 -1
- package/assets/esri/core/workers/chunks/{65f4ca7201e7267bfc81.js → b5fcf4165ac72654742d.js} +1 -1
- package/assets/esri/core/workers/chunks/b82b523b6837ed1f28d3.js +2 -0
- package/assets/esri/core/workers/chunks/{527b87fddf33bb5d519e.js → ba77a8892cb23c7a297d.js} +1 -1
- package/assets/esri/core/workers/chunks/bb8089929ded0613d8e7.js +1 -0
- package/assets/esri/core/workers/chunks/bc7ca87d3bfe8a4aec81.js +1 -0
- package/assets/esri/core/workers/chunks/bc9b96a539f28afcb8cb.js +1 -0
- package/assets/esri/core/workers/chunks/{2d07d5a9ec67c39ef10c.js → bd4f29d2681e5596591a.js} +1 -1
- package/assets/esri/core/workers/chunks/bf9eba555aebca2c132b.js +1 -0
- package/assets/esri/core/workers/chunks/{903c7bd079888f65fef1.js → c3fbd81bb5820e48038f.js} +1 -1
- package/assets/esri/core/workers/chunks/c9df18e9ff7367a004b6.js +1 -0
- package/assets/esri/core/workers/chunks/ca8061e0a6d78d646ebf.js +1 -0
- package/assets/esri/core/workers/chunks/cc73ac8404615dc392d2.js +1 -0
- package/assets/esri/core/workers/chunks/{e823c9ccb7bc348d8824.js → ccb26860518dce6d01c0.js} +1 -1
- package/assets/esri/core/workers/chunks/cded34b161fcc790e672.js +1 -0
- package/assets/esri/core/workers/chunks/{1bf5c0a4bc5a960a3fa2.js → d1d4979e9dcabe5e4619.js} +1 -1
- package/assets/esri/core/workers/chunks/d2865c604849ce79183f.js +1 -0
- package/assets/esri/core/workers/chunks/{9b81bd62a2c72f592db1.js → d826f6d32b4c5885276a.js} +1 -1
- package/assets/esri/core/workers/chunks/d92540d3ffc4af980dd8.js +1 -0
- package/assets/esri/core/workers/chunks/dc7853795439ae77ace9.js +1 -0
- package/assets/esri/core/workers/chunks/{1f047dd747e7c1916dc7.js → dd55737fba0a8fe68101.js} +3 -3
- package/assets/esri/core/workers/chunks/dd8d19eb6b8e955c8067.js +1 -0
- package/assets/esri/core/workers/chunks/dda269a088275c823b40.js +1 -0
- package/assets/esri/core/workers/chunks/{7b70d6fdfa7a19ffffb0.js → de95dee8db92cf8f796f.js} +1 -1
- package/assets/esri/core/workers/chunks/e1c8767143f9f9d1f049.js +1 -0
- package/assets/esri/core/workers/chunks/{2cf2f2842c19be84ab4d.js → e6cb31c727f799c1297c.js} +1 -1
- package/assets/esri/core/workers/chunks/e934ef66d130c212c05b.js +1 -0
- package/assets/esri/core/workers/chunks/{7c56446184abcd14678b.js → ea77654c8964cc39b9a6.js} +1 -1
- package/assets/esri/core/workers/chunks/eb167f9f6132a6348d2e.js +1 -0
- package/assets/esri/core/workers/chunks/ed5ac1efd3cba49be756.js +1 -0
- package/assets/esri/core/workers/chunks/ef24fd6c0322e5de9fdf.js +2 -0
- package/assets/esri/core/workers/chunks/f219ba010c480bb75684.js +1 -0
- package/assets/esri/core/workers/chunks/fbf2d90240d36f8b423f.js +1 -0
- package/assets/esri/core/workers/chunks/{4ee99e654dad6f09abee.js → fc042b9936686785c39e.js} +1 -1
- package/assets/esri/core/workers/chunks/fc1658eae7b312502fab.js +1 -0
- package/assets/esri/core/workers/chunks/{af6b9fd77b1792fbb66e.js → fd4d124c5bf810d9e352.js} +1 -1
- package/assets/esri/core/workers/chunks/ffa35ecc681ec1c4739a.js +1 -0
- package/assets/esri/core/workers/chunks/ffca0b2333e760b66d3a.js +1 -0
- package/config.js +1 -1
- package/editing/sharedTemplates/executor/builders/bufferLineToPolygon.js +1 -1
- package/editing/sharedTemplates/executor/builders/bufferPointToPolygon.js +1 -1
- package/editing/sharedTemplates/executor/builders/bufferPolygonToPolygon.js +1 -1
- package/editing/sharedTemplates/executor/builders/pointAtIntersectionVerticesOfLine.js +1 -1
- package/editing/sharedTemplates/executor/builders/support/offsetUtils.js +1 -1
- package/editing/sharedTemplates/executor/support/createPresetServiceEdit.js +1 -1
- package/geometry/Polygon.js +1 -1
- package/geometry/geometryEngine.d.ts +36 -36
- package/geometry/operators/affineTransformOperator.d.ts +30 -1
- package/geometry/operators/affineTransformOperator.js +1 -1
- package/geometry/operators/alphaShapeOperator.d.ts +49 -5
- package/geometry/operators/alphaShapeOperator.js +1 -1
- package/geometry/operators/areaOperator.d.ts +28 -4
- package/geometry/operators/areaOperator.js +1 -1
- package/geometry/operators/autoCompleteOperator.d.ts +25 -2
- package/geometry/operators/autoCompleteOperator.js +1 -1
- package/geometry/operators/boundaryOperator.d.ts +40 -2
- package/geometry/operators/boundaryOperator.js +1 -1
- package/geometry/operators/bufferOperator.d.ts +51 -6
- package/geometry/operators/bufferOperator.js +1 -1
- package/geometry/operators/centroidOperator.d.ts +23 -2
- package/geometry/operators/centroidOperator.js +1 -1
- package/geometry/operators/clipOperator.d.ts +34 -2
- package/geometry/operators/clipOperator.js +1 -1
- package/geometry/operators/containsOperator.d.ts +32 -2
- package/geometry/operators/containsOperator.js +1 -1
- package/geometry/operators/convexHullOperator.d.ts +47 -4
- package/geometry/operators/convexHullOperator.js +1 -1
- package/geometry/operators/crossesOperator.d.ts +35 -2
- package/geometry/operators/crossesOperator.js +1 -1
- package/geometry/operators/cutOperator.d.ts +23 -2
- package/geometry/operators/cutOperator.js +1 -1
- package/geometry/operators/densifyOperator.d.ts +61 -6
- package/geometry/operators/densifyOperator.js +1 -1
- package/geometry/operators/differenceOperator.d.ts +34 -2
- package/geometry/operators/differenceOperator.js +1 -1
- package/geometry/operators/disjointOperator.d.ts +33 -2
- package/geometry/operators/disjointOperator.js +1 -1
- package/geometry/operators/distanceOperator.d.ts +29 -4
- package/geometry/operators/distanceOperator.js +1 -1
- package/geometry/operators/equalsOperator.d.ts +32 -2
- package/geometry/operators/equalsOperator.js +1 -1
- package/geometry/operators/extendOperator.d.ts +29 -3
- package/geometry/operators/extendOperator.js +1 -1
- package/geometry/operators/generalizeOperator.d.ts +46 -5
- package/geometry/operators/generalizeOperator.js +1 -1
- package/geometry/operators/geodesicBufferOperator.d.ts +71 -7
- package/geometry/operators/geodesicBufferOperator.js +1 -1
- package/geometry/operators/geodesicProximityOperator.d.ts +106 -14
- package/geometry/operators/geodesicProximityOperator.js +1 -1
- package/geometry/operators/geodeticAreaOperator.d.ts +51 -5
- package/geometry/operators/geodeticAreaOperator.js +1 -1
- package/geometry/operators/geodeticDensifyOperator.d.ts +65 -6
- package/geometry/operators/geodeticDensifyOperator.js +1 -1
- package/geometry/operators/geodeticDistanceOperator.d.ts +52 -5
- package/geometry/operators/geodeticDistanceOperator.js +1 -1
- package/geometry/operators/geodeticLengthOperator.d.ts +51 -5
- package/geometry/operators/geodeticLengthOperator.js +1 -1
- package/geometry/operators/geodeticUtilsOperator.d.ts +79 -9
- package/geometry/operators/geodeticUtilsOperator.js +1 -1
- package/geometry/operators/graphicBufferOperator.d.ts +47 -4
- package/geometry/operators/graphicBufferOperator.js +1 -1
- package/geometry/operators/integrateOperator.d.ts +24 -2
- package/geometry/operators/integrateOperator.js +1 -1
- package/geometry/operators/intersectionOperator.d.ts +88 -3
- package/geometry/operators/intersectionOperator.js +1 -1
- package/geometry/operators/intersectsOperator.d.ts +32 -2
- package/geometry/operators/intersectsOperator.js +1 -1
- package/geometry/operators/isNearOperator.d.ts +31 -4
- package/geometry/operators/isNearOperator.js +1 -1
- package/geometry/operators/json/bufferOperator.js +1 -1
- package/geometry/operators/json/containsOperator.js +1 -1
- package/geometry/operators/json/convexHullOperator.js +1 -1
- package/geometry/operators/json/crossesOperator.js +1 -1
- package/geometry/operators/json/disjointOperator.js +1 -1
- package/geometry/operators/json/generalizeOperator.js +1 -1
- package/geometry/operators/json/geodesicBufferOperator.js +1 -1
- package/geometry/operators/json/graphicBufferOperator.js +1 -1
- package/geometry/operators/json/intersectionOperator.js +1 -1
- package/geometry/operators/json/intersectsOperator.js +1 -1
- package/geometry/operators/json/lengthOperator.js +1 -1
- package/geometry/operators/json/offsetOperator.js +1 -1
- package/geometry/operators/json/overlapsOperator.js +1 -1
- package/geometry/operators/json/projectOperator.js +1 -1
- package/geometry/operators/json/simplifyOperator.js +1 -1
- package/geometry/operators/json/simplifyOperatorOGC.js +1 -1
- package/geometry/operators/json/touchesOperator.js +1 -1
- package/geometry/operators/json/unionOperator.js +1 -1
- package/geometry/operators/json/withinOperator.js +1 -1
- package/geometry/operators/labelPointOperator.d.ts +32 -2
- package/geometry/operators/labelPointOperator.js +1 -1
- package/geometry/operators/lengthOperator.d.ts +28 -4
- package/geometry/operators/lengthOperator.js +1 -1
- package/geometry/operators/linesToPolygonsOperator.d.ts +23 -2
- package/geometry/operators/linesToPolygonsOperator.js +1 -1
- package/geometry/operators/locateBetweenOperator.d.ts +28 -2
- package/geometry/operators/locateBetweenOperator.js +1 -1
- package/geometry/operators/minimumBoundingCircleOperator.d.ts +38 -4
- package/geometry/operators/minimumBoundingCircleOperator.js +1 -1
- package/geometry/operators/multiPartToSinglePartOperator.d.ts +33 -4
- package/geometry/operators/multiPartToSinglePartOperator.js +1 -1
- package/geometry/operators/offsetOperator.d.ts +50 -5
- package/geometry/operators/offsetOperator.js +1 -1
- package/geometry/operators/overlapsOperator.d.ts +33 -2
- package/geometry/operators/overlapsOperator.js +1 -1
- package/geometry/operators/polygonOverlayOperator.d.ts +31 -5
- package/geometry/operators/polygonOverlayOperator.js +1 -1
- package/geometry/operators/polygonSlicerOperator.d.ts +72 -10
- package/geometry/operators/polygonSlicerOperator.js +1 -1
- package/geometry/operators/projectOperator.d.ts +63 -3
- package/geometry/operators/projectOperator.js +1 -1
- package/geometry/operators/proximityOperator.d.ts +71 -9
- package/geometry/operators/proximityOperator.js +1 -1
- package/geometry/operators/relateOperator.d.ts +41 -2
- package/geometry/operators/relateOperator.js +1 -1
- package/geometry/operators/reshapeOperator.d.ts +28 -2
- package/geometry/operators/reshapeOperator.js +1 -1
- package/geometry/operators/shapePreservingProjectOperator.d.ts +64 -6
- package/geometry/operators/shapePreservingProjectOperator.js +1 -1
- package/geometry/operators/simplifyOGCOperator.d.ts +72 -6
- package/geometry/operators/simplifyOGCOperator.js +1 -1
- package/geometry/operators/simplifyOperator.d.ts +72 -4
- package/geometry/operators/simplifyOperator.js +1 -1
- package/geometry/operators/singlePartToMultiPartOperator.js +1 -1
- package/geometry/operators/support/Transformation.d.ts +17 -11
- package/geometry/operators/support/jsonConverter.js +1 -1
- package/geometry/operators/symmetricDifferenceOperator.d.ts +33 -2
- package/geometry/operators/symmetricDifferenceOperator.js +1 -1
- package/geometry/operators/touchesOperator.d.ts +32 -2
- package/geometry/operators/touchesOperator.js +1 -1
- package/geometry/operators/types.d.ts +4 -1
- package/geometry/operators/unionOperator.d.ts +33 -2
- package/geometry/operators/unionOperator.js +1 -1
- package/geometry/operators/withinOperator.d.ts +32 -2
- package/geometry/operators/withinOperator.js +1 -1
- package/geometry/projectionUtils.js +1 -1
- package/geometry/support/geometryUtils.js +1 -1
- package/geometry/support/normalizeUtils.d.ts +5 -3
- package/geometry/support/normalizeUtils.js +1 -1
- package/interfaces.d.ts +202 -202
- package/kernel.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/data/queryUtils.js +1 -1
- package/layers/graphics/data/spatialQuerySupport.js +1 -1
- package/layers/graphics/sources/support/sourceUtils.js +1 -1
- package/layers/list/Item.d.ts +27 -3
- package/layers/list/Item.js +1 -1
- package/layers/list/ItemPanel.d.ts +1 -1
- package/layers/list/LayerItemCollection.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/TiledImagery.js +1 -1
- package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
- package/layers/raster/datasets/FunctionRaster.js +1 -1
- package/layers/raster/datasets/pixelReader.js +1 -1
- package/layers/raster/functions/clipUtils.js +1 -1
- package/layers/raster/functions/rasterProjectionHelper.js +1 -1
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/trackInfoUtils.js +2 -0
- package/layers/video/videoUtils.js +1 -1
- package/package.json +5 -5
- package/popup/FeatureContentCollection.d.ts +3 -3
- package/popup/FeatureContentCollection.js +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/portal/schemas/webScene.js +1 -1
- package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
- package/support/revision.js +1 -1
- package/support/tests/serviceMockDependencies.js +1 -1
- package/support/tests/setupServiceMocksMesh.js +1 -1
- package/symbols/cim/CIMEffects.js +1 -1
- package/symbols/cim/effects/EffectBuffer.js +1 -1
- package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
- package/symbols/cim/effects/EffectDonut.js +1 -1
- package/symbols/cim/effects/EffectEnclosingPolygon.js +1 -1
- package/symbols/cim/effects/EffectOffset.js +1 -1
- package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
- package/views/2d/analysis/AreaMeasurement/AreaMeasurementController.js +1 -1
- package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementController.js +1 -1
- package/views/2d/engine/webgl/Overlay.js +1 -1
- package/views/2d/engine/webgl/VideoScreenRenderer.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/support/RouteLayerWaypointVisualization.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementController.js +1 -1
- package/views/3d/layers/ElevationLayerView3D.js +1 -1
- package/views/3d/layers/ElevationLayerView3DModifications.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
- package/views/MapView.d.ts +3 -3
- package/views/SceneView.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/View2D.d.ts +22 -22
- package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
- package/views/draw/DrawTool.js +1 -1
- package/views/draw/support/createUtils.js +1 -1
- package/views/layers/SceneLayerView.js +1 -1
- package/views/support/GeometryWorker.js +1 -1
- package/views/support/imageReprojection.js +1 -1
- package/views/video/VideoOperationalDataView.js +1 -1
- package/webscene/InitialViewProperties.d.ts +9 -1
- package/webscene/InitialViewProperties.js +1 -1
- package/webscene/Slide.d.ts +10 -1
- package/webscene/Slide.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
- package/widgets/BatchAttributeForm/expressions/ExpressionsModel.js +1 -1
- package/widgets/BatchAttributeForm/expressions/expressionUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/DynamicChoiceController.js +1 -1
- package/widgets/BatchAttributeForm/templates/FieldElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
- package/widgets/Editor/support/mergeFeaturesUtils.js +1 -1
- package/widgets/Editor/support/splitFeatureUtils.js +1 -1
- package/widgets/ElevationProfile/support/ElevationProfileView.js +1 -1
- package/widgets/ElevationProfile/support/InputRepresentation2D.js +1 -1
- package/widgets/ElevationProfile/support/InputRepresentation3D.js +1 -1
- package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/OrientedImageryViewer/support/panConstraint.js +1 -1
- package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
- package/widgets/OrientedImageryViewer/videoViewerUtils.js +1 -1
- package/widgets/Print.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Search/support/layerSearchUtils.js +1 -1
- package/widgets/Search/support/locatorUtils.js +1 -1
- package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
- package/widgets/support/FilterBuilder/FilterBuilderViewModel.d.ts +104 -0
- package/widgets/support/FilterBuilder/FilterBuilderViewModel.js +1 -1
- package/widgets/support/FilterBuilder.js +1 -1
- package/widgets/support/FilterCondition/FilterConditionViewModel.d.ts +145 -0
- package/widgets/support/FilterCondition/FilterConditionViewModel.js +1 -1
- package/widgets/support/FilterCondition/types.d.ts +20 -0
- package/widgets/support/ItemList.js +1 -1
- package/widgets/support/SelectionList/FeatureItem.d.ts +17 -68
- package/widgets/support/SelectionList/FeatureItem.js +1 -1
- package/widgets/support/SelectionList/GroupLayerItem.d.ts +12 -50
- package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
- package/widgets/support/SelectionList/ItemBase.d.ts +14 -44
- package/widgets/support/SelectionList/ItemBase.js +1 -1
- package/widgets/support/SelectionList/LayerItem.d.ts +10 -56
- package/widgets/support/SelectionList/LayerItem.js +1 -1
- package/widgets/support/SelectionList/types.d.ts +4 -4
- package/widgets/support/Selector2D/selectorUtils.js +1 -1
- package/assets/esri/core/workers/chunks/090ea7a131f8f60203ed.js +0 -1
- package/assets/esri/core/workers/chunks/0b4a7209b99227a842ad.js +0 -1
- package/assets/esri/core/workers/chunks/0be98adfef79fc5036f0.js +0 -1
- package/assets/esri/core/workers/chunks/0d2e2d90a4e4a28e2c0c.js +0 -1
- package/assets/esri/core/workers/chunks/0d7763d39a5a8586a0ae.js +0 -1
- package/assets/esri/core/workers/chunks/0d95f72e1c07ab867d21.js +0 -1
- package/assets/esri/core/workers/chunks/0dbbac7a2378728571a7.js +0 -1
- package/assets/esri/core/workers/chunks/0df9864ecebe6a2b973f.js +0 -1
- package/assets/esri/core/workers/chunks/104d74bc36c28c519396.js +0 -1
- package/assets/esri/core/workers/chunks/1670e9867efde4d7a6d6.js +0 -1
- package/assets/esri/core/workers/chunks/1c803eef9a8fdabc61e3.js +0 -2
- package/assets/esri/core/workers/chunks/1e192ac0533a5c0b5a7a.js +0 -1
- package/assets/esri/core/workers/chunks/1fe077f57a087c0e9119.js +0 -1
- package/assets/esri/core/workers/chunks/20f7b5fe64a217cb3d3d.js +0 -1
- package/assets/esri/core/workers/chunks/212222b64039d436b9a6.js +0 -1
- package/assets/esri/core/workers/chunks/24944b625ed8dcd904f0.js +0 -1
- package/assets/esri/core/workers/chunks/2b6d261fe79fe186fb22.js +0 -1
- package/assets/esri/core/workers/chunks/2bc3e7f394386fa75447.js +0 -1
- package/assets/esri/core/workers/chunks/30af0f7c4cfa541c9efd.js +0 -1
- package/assets/esri/core/workers/chunks/30d816bdeea00f6fa1ca.js +0 -1
- package/assets/esri/core/workers/chunks/35d46c2f658a8e92d913.js +0 -1
- package/assets/esri/core/workers/chunks/36e35a8067b18f59cc05.js +0 -1
- package/assets/esri/core/workers/chunks/3869dca884d7ca6488f5.js +0 -1
- package/assets/esri/core/workers/chunks/3f5234120d3a14186c1c.js +0 -1
- package/assets/esri/core/workers/chunks/45c1c90ac6c14657f3ff.js +0 -1
- package/assets/esri/core/workers/chunks/4a40b894ec89b0a4f9bf.js +0 -1
- package/assets/esri/core/workers/chunks/5165d367328ac7badf47.js +0 -1
- package/assets/esri/core/workers/chunks/5168bd8ab6233dc9c32a.js +0 -1
- package/assets/esri/core/workers/chunks/545bec045167c433af8f.js +0 -1
- package/assets/esri/core/workers/chunks/5782c0362a1799ceef41.js +0 -1
- package/assets/esri/core/workers/chunks/59598023c0aea62a6297.js +0 -1
- package/assets/esri/core/workers/chunks/59f0a2bd40b033ce77e4.js +0 -1
- package/assets/esri/core/workers/chunks/5af16937904c06fb06f6.js +0 -1
- package/assets/esri/core/workers/chunks/5b8591486f33627f5389.js +0 -1
- package/assets/esri/core/workers/chunks/6057a79c68c33ee4a193.js +0 -1
- package/assets/esri/core/workers/chunks/607acd9f615f87e14075.js +0 -1
- package/assets/esri/core/workers/chunks/62ee6c247f783acabb74.js +0 -1
- package/assets/esri/core/workers/chunks/63127e3b22e7eac6003d.js +0 -2
- package/assets/esri/core/workers/chunks/6564f17c4700dc8d9c0e.js +0 -2
- package/assets/esri/core/workers/chunks/678585509706755c0434.js +0 -2
- package/assets/esri/core/workers/chunks/691e9cc541cfaebe1776.js +0 -1
- package/assets/esri/core/workers/chunks/6a2d890640b2cd6c5ccb.js +0 -1
- package/assets/esri/core/workers/chunks/6b84982dfaf084a61b93.js +0 -1
- package/assets/esri/core/workers/chunks/6cbc30b31f0bb39c73ca.js +0 -1
- package/assets/esri/core/workers/chunks/6f01bd01b13662eb3bd7.js +0 -1
- package/assets/esri/core/workers/chunks/74cd9df85c4560bb8e52.js +0 -1
- package/assets/esri/core/workers/chunks/75bddfe2be64379db8fd.js +0 -1
- package/assets/esri/core/workers/chunks/7cf903db44f3647c8fd4.js +0 -1
- package/assets/esri/core/workers/chunks/7ddb5800777fbecee3a8.js +0 -1
- package/assets/esri/core/workers/chunks/7eae9053065d3d38e54e.js +0 -1
- package/assets/esri/core/workers/chunks/80f38ab2b7ae61e6f301.js +0 -1
- package/assets/esri/core/workers/chunks/854f42f16fdb40000aae.js +0 -1
- package/assets/esri/core/workers/chunks/87094044458b0ea5cb0f.js +0 -2
- package/assets/esri/core/workers/chunks/88f03352a4dc6184ea1f.js +0 -1
- package/assets/esri/core/workers/chunks/909ee7d2a0eec773037a.js +0 -1
- package/assets/esri/core/workers/chunks/91ac9328afff8a51bd96.js +0 -1
- package/assets/esri/core/workers/chunks/92a6559a6999b26362d7.js +0 -1
- package/assets/esri/core/workers/chunks/94ddfe165ac25aef8229.js +0 -1
- package/assets/esri/core/workers/chunks/9509bef285929c52c244.js +0 -1
- package/assets/esri/core/workers/chunks/99966339b061eb9945b8.js +0 -1
- package/assets/esri/core/workers/chunks/99f627938dbf0152fc02.js +0 -1
- package/assets/esri/core/workers/chunks/9df38cadebf8e6fd746c.js +0 -1
- package/assets/esri/core/workers/chunks/9e2b3754a76e0dd4a94a.js +0 -1
- package/assets/esri/core/workers/chunks/a0565137027c83108953.js +0 -1
- package/assets/esri/core/workers/chunks/a0eb882a5a81d25b9153.js +0 -1
- package/assets/esri/core/workers/chunks/a785e827f0215a73103d.js +0 -1
- package/assets/esri/core/workers/chunks/abe7670db06b27c0c8c8.js +0 -1
- package/assets/esri/core/workers/chunks/b19cff0e43fab2632660.js +0 -1
- package/assets/esri/core/workers/chunks/b333de4dea14c5db0a4d.js +0 -1
- package/assets/esri/core/workers/chunks/b6af90be328ebda26b8d.js +0 -1
- package/assets/esri/core/workers/chunks/b7c0da9d255d5e48320d.js +0 -1
- package/assets/esri/core/workers/chunks/bd7d87d175ba933ab2ce.js +0 -1
- package/assets/esri/core/workers/chunks/be0417df35a7d99af675.js +0 -1
- package/assets/esri/core/workers/chunks/c30b6bbabd05e4976fba.js +0 -1
- package/assets/esri/core/workers/chunks/c35553d07ad169910742.js +0 -1
- package/assets/esri/core/workers/chunks/c5c2fed38e0ccf84f1fa.js +0 -1
- package/assets/esri/core/workers/chunks/c88bfa51d2a8a024fc24.js +0 -1
- package/assets/esri/core/workers/chunks/ca36d85a47179d95f2fc.js +0 -1
- package/assets/esri/core/workers/chunks/d0cf9ff48f051adbd455.js +0 -1
- package/assets/esri/core/workers/chunks/d1304d414b1fa725168a.js +0 -1
- package/assets/esri/core/workers/chunks/d24125a791247019e2ca.js +0 -1
- package/assets/esri/core/workers/chunks/d26be8313526ecea9c68.js +0 -1
- package/assets/esri/core/workers/chunks/d2cb3d5ef0a9285afb78.js +0 -1
- package/assets/esri/core/workers/chunks/d4b0012ae1d3b8a9ba01.js +0 -1
- package/assets/esri/core/workers/chunks/e018cbd97e6e0e4ca5c4.js +0 -1
- package/assets/esri/core/workers/chunks/e39bccc000c768120a32.js +0 -1
- package/assets/esri/core/workers/chunks/e4380706b629729f2212.js +0 -1
- package/assets/esri/core/workers/chunks/ea1877ce00da3b585a30.js +0 -1
- package/assets/esri/core/workers/chunks/ea5ee1b12b43594592a0.js +0 -1
- package/assets/esri/core/workers/chunks/ea91c57a0b31f3f65ee5.js +0 -1
- package/assets/esri/core/workers/chunks/eafc591e1a98000d54ef.js +0 -1
- package/assets/esri/core/workers/chunks/ef851a2cff76fd211c07.js +0 -1
- package/assets/esri/core/workers/chunks/f3e53be08ab9dbdf17ae.js +0 -1
- package/assets/esri/core/workers/chunks/f53010adb70463b75bb9.js +0 -1
- package/assets/esri/core/workers/chunks/f5a058a0ce006bce2a2a.js +0 -1
- package/assets/esri/core/workers/chunks/f5f5b54cab722abe88e0.js +0 -1
- package/assets/esri/core/workers/chunks/f60ed579981913d44675.js +0 -1
- package/assets/esri/core/workers/chunks/f6f56f3e011dcef90bbb.js +0 -1
- package/assets/esri/core/workers/chunks/f83c3597e9332bd991eb.js +0 -1
- package/assets/esri/core/workers/chunks/f9a4387f850d85c44ca5.js +0 -1
- package/assets/esri/core/workers/chunks/fdd0e6d9927d3c43b0d3.js +0 -1
- package/geometry/operators/importUtils.js +0 -2
- /package/assets/esri/core/workers/chunks/{1c803eef9a8fdabc61e3.js.LICENSE.txt → 1082bb0858585bd4fa21.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{87094044458b0ea5cb0f.js.LICENSE.txt → 2e2349387a2b9903f13c.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{678585509706755c0434.js.LICENSE.txt → 411bbdecba340df11d95.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{5edf77618ca51819d7c4.js.LICENSE.txt → 476535cfb06ced74d611.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{6564f17c4700dc8d9c0e.js.LICENSE.txt → b82b523b6837ed1f28d3.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{63127e3b22e7eac6003d.js.LICENSE.txt → ef24fd6c0322e5de9fdf.js.LICENSE.txt} +0 -0
package/kernel.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let r,s=e;function i(o){r=o}function t(e){const s=r?.findCredential(e);return s?.token?o(e,"token",s.token):e}s="5.2.0-next.
|
|
2
|
+
import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let r,s=e;function i(o){r=o}function t(e){const s=r?.findCredential(e);return s?.token?o(e,"token",s.token):e}s="5.2.0-next.97",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,s as fullVersion,r as id,i as setId,e as version};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{insertSortedStableTopN as e}from"../../../core/arrayUtils.js";import{clone as t}from"../../../core/lang.js";import s from"../../../geometry/SpatialReference.js";import{importLazily as i}from"../../../geometry/operators/importUtils.js";import{polygonCentroid as a,extentCentroid as r}from"../../../geometry/support/centroid.js";import{getPolygonExtent as n,getGeometryExtent as o,expandExtent as l}from"../../../geometry/support/extentUtils.js";import{toQuantizationTransform as u}from"../../../geometry/support/quantizationUtils.js";import{isValid as c,equals as m}from"../../../geometry/support/spatialReferenceUtils.js";import{closestPointOnCurve as d}from"../../../geometry/support/curves/closestPointOnCurve.js";import{getEndpoint as f,isCoordinate as p,cloneCurve as h}from"../../../geometry/support/curves/curveUtils.js";import g from"./AttributesBuilder.js";import{cleanFromGeometryEngine as y,getGeometry as x,transformCentroid as I}from"./geometryUtils.js";import{project as T}from"./projectionSupport.js";import{getDateInNumber as F}from"./queryUtils.js";import{SnappingCandidateEdge as _,SnappingCandidateVertex as v}from"./SnappingCandidate.js";import{isDateField as V,isDateOnlyField as S,isTimestampOffsetField as b,isStringField as R,isTimeOnlyField as z}from"../../support/fieldUtils.js";import B from"../../../rest/support/AutoIntervalBinParameters.js";import M from"../../../rest/support/DateBinParameters.js";import{unitsDict as A}from"../../../rest/support/DateBinUtils.js";import w from"../../../rest/support/FixedBoundariesBinParameters.js";import N from"../../../rest/support/FixedIntervalBinParameters.js";import{calculateStringStatistics as P,calculateStatistics as D,processSummaryStatisticsResult as O,calculateUniqueValuesCount as j,createUVResult as q,calculateClassBreaks as C,resolveCBResult as G,calculateHistogram as Z,calculatePercentile as E,binIndex as U,getBinParams as H,isNullCountSupported as k,getAttributeComparator as J}from"../../../statistics/utils.js";import{utc as Q}from"../../../time/constants.js";import{DateTime as Y}from"luxon";const X="bin",L=i(()=>import("../../../geometry/operators/json/convexHullOperator.js"));class W{constructor(e,t,s){this.items=e,this.query=t,this.geometryType=s.geometryType,this.hasZ=!!t.returnZ&&s.hasZ,this.hasM=!!t.returnM&&s.hasM,this.fieldsIndex=s.fieldsIndex,this.spatialReference=s.spatialReference,this.featureAdapter=s.featureAdapter,this.featureIdInfo=s.featureIdInfo}get size(){return this.items.length}createQueryResponseForCount(){const e=new g(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:s,outStatistics:i}=this.query,a=t?.length;if(!!!a)return 1;const r=new Map,n=new Map,o=new Set;for(const l of i){const{statisticType:i}=l,a="exceedslimit"!==i?l.onStatisticField:void 0;if(!n.has(a)){const s=[];for(const i of t){const t=this._getAttributeValues(e,i,this.items,r);s.push(t)}n.set(a,this._calculateUniqueValues(s,this.items,e.returnDistinctValues))}const u=n.get(a);for(const t in u){const{data:i,items:a}=u[t],r=i.join(",");s&&!e.validateItems(a,s)||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;c(this.query.outSR)&&!m(t.spatialReference,this.query.outSR)?e.queryGeometry=y({spatialReference:this.query.outSR,...T(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=y({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,s){const i=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 s=(e-a.x)/r,i=(t-a.y)/n;return s*s+i*i}const l={candidates:[]},u="esriGeometryPolygon"===this.geometryType,c="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,m=this._getPointCreator(t,this.spatialReference,s),g=new ee(null,0),y=new ee(null,0),x={x:0,y:0,z:0};for(const d of this.items){const e=i.getObjectId(d),t=i.getGeometryWithCurves?.(d);if(null!=t){T(t,e);continue}const s=i.getGeometry(d);null==s||I(s,e)}return l.candidates.sort((e,t)=>e.distance-t.distance),l;function I(t,s){const{coords:i,stride:r}=t,n=t.isPoint?te:t.lengths;if(g.coords=i,y.coords=i,e.returnEdge){let e=0;for(let t=0;t<n.length;t++){const i=n[t],c=e;for(let t=0;t<i;t++,e+=r){if(!u&&t===i-1)continue;if(g.coordsIndex=e,y.coordsIndex=t===i-1?c:e+r,!$(x,a,g,y))continue;const n=o(x.x,x.y);n<=1&&l.candidates.push(new _(s,m(x),Math.sqrt(n),m(g),m(y)))}}}if("all"===e.vertexMode){let e=0;for(let t=0;t<n.length;t++){const i=n[t],a=e,c=y;c.coordsIndex=a;for(let t=0;t<i;t++,e+=r){if(g.coordsIndex=e,u&&t===i-1&&g.x===c.x&&g.y===c.y)continue;const a=o(g.x,g.y);a<=1&&l.candidates.push(new v(s,m(g),Math.sqrt(a)))}}}else if(c&&"ends"===e.vertexMode){let e=0;const t=[];for(let s=0;s<n.length;s++){t.push(e);const i=n[s];e+=i*r,i>1&&t.push(e-r)}for(const i of t){g.coordsIndex=i;const e=o(g.x,g.y);e<=1&&l.candidates.push(new v(s,m(g),Math.sqrt(e)))}}}function T(t,s){const{candidates:i}=l,r={x:0,y:0,z:0};if(e.returnEdge){const e=[a.x,a.y],n=new ee(e,0),l=new ee(e,0);for(const{segments:a}of t.parts)for(const{start:t,curve:u}of a){const{curvePoint:a}=d(t,u,e),c=o(...a);if(c>1)continue;[r.x,r.y]=a,n.coords=t,l.coords=f(u);const g=p(u)?null:h(u);i.push(new _(s,m(r),Math.sqrt(c),m(n),m(l),!1,g))}}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,i.push(new v(s,m(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 s=t.partOffsets[e],i=t.partOffsets[e+1]-1;n(s),i!==s&&n(i)}}}}_getPointCreator(e,t,s){const i=null==s||m(t,s)?e=>e:e=>T(e,t,s),{hasZ:a}=this,r=0;return a&&e?({x:e,y:t,z:s})=>i({x:e,y:t,z:s}):({x:e,y:t})=>i({x:e,y:t,z:r})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:a,normalizationTotal:r,minValue:n,maxValue:o,scale:l,timeZone:u,outStatisticTypes:c}=e,m=this.fieldsIndex.get(t),d=V(m)||S(m)||b(m),f=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:a,normalizationTotal:r,scale:l,timeZone:u},this.items),p=k({normalizationType:a,normalizationField:i,minValue:n,maxValue:o}),h={value:.5,fieldType:m?.type},g=R(m)?P({values:f,supportsNullCount:p,percentileParams:h,outStatisticTypes:c}):D({values:f,minValue:n,maxValue:o,useSampleStdDev:!a,supportsNullCount:p,percentileParams:h,outStatisticTypes:c});return O(g,c,d)}async createUniqueValuesResponse(e){const{field:t,valueExpression:s,domains:i,returnAllCodedValues:a,scale:r,timeZone:n}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:s,scale:r,timeZone:n},this.items,!1),l=j(o);return q(l,i,a,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:m,timeZone:d}=e,f=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:a,normalizationTotal:r,scale:m,timeZone:d},this.items),p=C(f,{field:t,normalizationField:i,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return G(p,n)}async createHistogramResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:m,timeZone:d}=e,f=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:a,normalizationTotal:r,scale:m,timeZone:d},this.items);return Z(f,{field:t,normalizationField:i,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,s){if(e.length>1&&t?.length)for(const i of t.slice().reverse()){const{compare:t,fieldOrExpression:a,fieldInfo:r}=se(i,this.fieldsIndex);e.sort((e,i)=>t(s(e,a,r),s(i,a,r)))}}_topNFeatures(t,s,i,a){if(t.length>1&&s?.length){const r=s.map(e=>{const{compare:t,fieldOrExpression:s,fieldInfo:i}=se(e,this.fieldsIndex);return(e,r)=>t(a(e,s,i),a(r,s,i))}).reduceRight((e,t)=>(s,i)=>{const a=t(s,i);return 0===a||Number.isNaN(a)?e(s,i):a}),n=[];for(const s of t)e(n,s,i,r);return n}return t.slice(0,i)}_createFeatureQueryResponse(e){const{items:t,geometryType:s,hasM:i,hasZ:a,featureIdInfo:r,spatialReference:n}=this,{outFields:o,outSR:l,quantizationParameters:c,resultRecordCount:m,resultOffset:d,returnZ:f,returnM:p}=e,h=null!=m&&t.length>(d||0)+m,g=o&&(o.includes("*")?[...this.fieldsIndex.fields]:o.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:h,features:this._createFeatures(e,t),fields:g,geometryType:s,hasM:i&&p,hasZ:a&&f,objectIdFieldName:"object-id"===r.type?r.fieldName:null,spatialReference:y(l||n),transform:c&&u(c)||null}}_createFeatures(e,t){const s=new g(e,this.featureAdapter,this.fieldsIndex),{hasM:i,hasZ:a}=this,{orderByFields:r,quantizationParameters:n,returnGeometry:o,returnCentroid:l,maxAllowableOffset:c,resultOffset:m,resultRecordCount:d,returnZ:f=!1,returnM:p=!1}=e,h=a&&f,y=i&&p;let T;const F=m||0,_=null!=d?F+d:null;null!=_&&_<=5e3&&_<t.length?T=this._topNFeatures(t,r,_,(e,t,i)=>s.getFieldValue(e,t,i)):(T=[...t],this._sortFeatures(T,r,(e,t,i)=>s.getFieldValue(e,t,i))),(F>0||null!=_)&&(T=T.slice(F,_??void 0));const v=[];let V=0;if(this.geometryType&&(o||l)){const e=u(n)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(o&&!l)for(const i of T){const a=this.featureAdapter.getGeometry(i),r=this._addFeatureJSONMetadata(i,{attributes:s.getAttributes(i),geometry:x(this.geometryType,a,c,e,h,y)});t&&a&&!r.geometry&&(r.centroid=I(this,this.featureAdapter.getCentroid(i,this),e)),v[V++]=r}else if(!o&&l)for(const i of T)v[V++]=this._addFeatureJSONMetadata(i,{attributes:s.getAttributes(i),centroid:I(this,this.featureAdapter.getCentroid(i,this),e)});else for(const i of T)v[V++]=this._addFeatureJSONMetadata(i,{attributes:s.getAttributes(i),centroid:I(this,this.featureAdapter.getCentroid(i,this),e),geometry:x(this.geometryType,this.featureAdapter.getGeometry(i),c,e,h,y)})}else for(const u of T){const e=s.getAttributes(u);e&&(v[V++]=this._addFeatureJSONMetadata(u,{attributes:e}))}return v}_addFeatureJSONMetadata(e,t){const s=this.featureAdapter.getMetadata?.(e);return void 0!==s&&(t.metadata=s),t}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;for(const a of this.query.outStatistics??[])if("exceedslimit"===a.statisticType){t=null!=a.maxPointCount?a.maxPointCount:Number.POSITIVE_INFINITY,s=null!=a.maxRecordCount?a.maxRecordCount:Number.POSITIVE_INFINITY,i=null!=a.maxVertexCount?a.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>s)e=!0;else{e=this.items.reduce((e,t)=>{const s=this.featureAdapter.getGeometry(t);return e+(s?.size??0)},0)>i}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,s={attributes:{}}){const i=[],a=new Map,r=new Map,n=new Map,o=new Map,l=new g(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:c,having:m,orderByFields:d,resultRecordCount:f}=e,p=c?.length,h=!!p,y=h?c[0]:null,x=h&&!this.fieldsIndex.get(y);for(const g of u??[]){const{outStatisticFieldName:u,statisticType:d}=g,f=g,I="exceedslimit"!==d?g.onStatisticField:void 0,T="percentile_disc"===d||"percentile_cont"===d,F="EnvelopeAggregate"===d||"CentroidAggregate"===d||"ConvexHullAggregate"===d,_=h&&1===p&&(I===y||x)&&"count"===d;if(h){if(!n.has(I)){const e=[];for(const s of c){const i=this._getAttributeValues(l,s,t,a);e.push(i)}n.set(I,this._calculateUniqueValues(e,t,!F&&l.returnDistinctValues))}const s=n.get(I);if(!s)continue;const i=Object.keys(s);for(const r of i){const{count:i,data:n,items:d,itemPositions:p}=s[r],h=n.join(",");if(!m||l.validateItems(d,m)){const s=o.get(h)||{attributes:{}};if(e.returnAggIds&&(s.aggregateIds=d.map(e=>this.featureAdapter.getObjectId(e)).filter(e=>null!=e)),F){s.aggregateGeometries||(s.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:t}=await this._getAggregateGeometry(f,d);s.aggregateGeometries[t]=e}else{let e=null;if(_)e=i;else{const s=this._getAttributeValues(l,I,t,a),i=p.map(e=>s[e]);e=T&&"statisticParameters"in f?this._getPercentileValue(f,i):this._getStatisticValue(f,i,null,l.returnDistinctValues)}s.attributes[u]=e}let r=0;c.forEach((e,t)=>s.attributes[this.fieldsIndex.get(e)?e:"EXPR_"+ ++r]=n[t]),o.set(h,s)}}}else if(F){s.aggregateGeometries||(s.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:i}=await this._getAggregateGeometry(f,t);s.aggregateGeometries[i]=e}else{const e=this._getAttributeValues(l,I,t,a);s.attributes[u]=T&&"statisticParameters"in f?this._getPercentileValue(f,e):this._getStatisticValue(f,e,r,l.returnDistinctValues)}const v="min"!==d&&"max"!==d||!R(this.fieldsIndex.get(I))&&!this._isAnyDateField(I)?null:this.fieldsIndex.get(I)?.type;i.push({name:u,alias:u,type:v||"esriFieldTypeDouble"})}const I=h?Array.from(o.values()):[s];return this._sortFeatures(I,d,(e,t)=>e.attributes[t]),f&&(I.length=Math.min(f,I.length)),{fields:i,features:I}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return V(t)||S(t)||b(t)||z(t)}async _getAggregateGeometry(e,t){const{statisticType:s,outStatisticFieldName:i}=e,{featureAdapter:o,spatialReference:l,geometryType:u}=this,c=t.map(e=>x(u,o.getGeometry(e))),m={aggregateGeometries:null,outStatisticFieldName:null},d=await L.getImportPromise();let[f]=d.executeMany(c,{merge:!0});if(f&&f.rings[0].length<=3&&(f=null),"EnvelopeAggregate"===s){const e=f?n(f):K(c);m.aggregateGeometries={...e,spatialReference:l},m.outStatisticFieldName=i||"extent"}else if("CentroidAggregate"===s){const[e,t]=f?a(f):r(K(c));m.aggregateGeometries={x:e,y:t,spatialReference:l},m.outStatisticFieldName=i||"centroid"}else"ConvexHullAggregate"===s&&(m.aggregateGeometries=f&&{...f,spatialReference:l},m.outStatisticFieldName=i||"convexHull");return m}_getStatisticValue(e,t,s,i){const{onStatisticField:a,statisticType:r}=e;let n=null;n=s?.has(a)?s.get(a):R(this.fieldsIndex.get(a))||this._isAnyDateField(a)?P({values:t,returnDistinct:i}):D({values:i?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),s&&s.set(a,n);return n["var"===r?"variance":r]}_getPercentileValue(e,t){const{onStatisticField:s,statisticParameters:i,statisticType:a}=e,{value:r,orderBy:n}=i,o=this.fieldsIndex.get(s);return E(t,{value:r,orderBy:n,fieldType:o?.type,isDiscrete:"percentile_disc"===a})}_getAttributeValues(e,t,s,i){if(i.has(t))return i.get(t);const a=this.fieldsIndex.get(t),r=s.map(s=>e.getFieldValue(s,t,a));return i.set(t,r),r}_calculateUniqueValues(e,t,s){const i={},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==i[o]?i[o]={count:1,data:n,items:[a],itemPositions:[r]}:(s||i[o].count++,i[o].items.push(a),i[o].itemPositions.push(r))}return i}async _getDataValues(e,i,a=!0){const r=new g(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:n,scale:o,timeZone:l}=e,u=s.fromJSON(this.query.outSR||this.spatialReference);return n?r.getExpressionValues(i,n,{viewingMode:"map",scale:o,spatialReference:u},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},l):r.getDataValues(i,t(e),a)}_calculateHistogramBins(e,t,s){if(null==t.min&&null==t.max)return[];const i=t.intervals,a=t.min??0,r=t.max??0,n=i.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let o=0;o<e.length;o++){const t=e[o],l=s[o];if(null!=t&&t>=a&&t<=r){const e=U(i,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:s,outAlias:i,valueType:a}=t,r=[],n=[{name:i??s,alias:i??s,type:a??"esriFieldTypeString"},{name:X,alias:X,type:"esriFieldTypeInteger"}],o=new g(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[s],(e,t,s)=>o.getFieldValue(e,t,s));const c=this._getAttributeValues(o,s,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,[i??s]: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 s=e.bin;switch(t=t??this.items,s.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(B.fromJSON(s),e,t);case"dateBin":return this._createDateBinsResponse(M.fromJSON(s),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(w.fromJSON(s),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(N.fromJSON(s),e,t)}}async _createAutoIntervalBinsResponse(e,t,s){const{field:i,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},s),m=H(c,{field:i,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,s);return this._createFeaturesFromHistogramBins(d,t)}async _createDateBinsResponse(e,t,s){const{field:i,interval:a,start:r,end:n,snapToData:o,returnFullIntervalBin:l,offset:u,firstDayOfWeek:c}=e,m=a.unit,d=await this._getDataValues({field:i||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},s),f=z(this.fieldsIndex.get(i)),p=A.toJSON(m),h=d.filter(Boolean).sort((e,t)=>e-t),g=null!=r?F(r,f):h[0],y=null!=n?F(n,f):h[h.length-1],x=[];if(null!=g&&null!=y){const e={zone:t.outTimeReference?.ianaTimeZone??Q},s=u?.unit?A.toJSON(u.unit):"milliseconds",i={[s]:u?.value||0},r=Y.fromMillis(g,e).minus(i),n=Y.fromMillis(y,e).minus(i),m="number"==typeof c&&c>=1&&c<=7?c:7,d=(e,t)=>{const s=(e.weekday-t+7)%7;return e.minus({days:s}).startOf("day")};if("last"===o){let e="week"===p?((e,t)=>d(e,t).plus({days:7}))(n,m):n;for(;e>r;){const t=e.minus({[p]:a.value});if(t<r){x.unshift([l?t.plus(i).toMillis():r.plus(i).toMillis(),e.plus(i).toMillis()]);break}x.unshift([t.plus(i).toMillis(),e.plus(i).toMillis()]),e=t}}else{let e="first"===o?r:"week"===p?d(r,m):r.startOf(p);for(;e<=n;){const t=e.plus({[p]:a.value});if(t>n){x.push([e.plus(i).toMillis(),l?t.plus(i).toMillis():n.plus(i).toMillis()]);break}x.push([e.plus(i).toMillis(),t.plus(i).toMillis()]),e=t}}}const I=this._calculateHistogramBins(d,{intervals:x,min:g,max:y},s);return this._createFeaturesFromHistogramBins(I,t)}async _createFixedBoundariesBinsResponse(e,t,s){const{field:i}=e,a=await this._getDataValues({field:i||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},s),r=z(this.fieldsIndex.get(i)),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,s);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,s){const{field:i,interval:a,normalizationType:r,start:n,end:o}=e,l=await this._getDataValues({field:i||e.expression,normalizationField:e.normalizationField,normalizationType:r,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},s),u=z(this.fieldsIndex.get(i)),c=H(l,{field:i,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,s);return this._createFeaturesFromHistogramBins(m,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:s,lowerBoundaryAlias:i}=t,a=i||"lowerBoundary",r=s||"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:X,alias:X,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 f of e){const{minValue:e,maxValue:s,items:i}=f,p={attributes:{}};let h;if(p.attributes[a]=m&&d&&null!=e?Y.fromMillis(e,{zone:d}).toISO():e,t.bin.hideUpperBound||(p.attributes[r]=m&&d&&null!=s?Y.fromMillis(s,{zone:d}).toISO():s),t.returnAggIds&&(p.aggregateIds=i.map(e=>this.featureAdapter.getObjectId(e)).filter(e=>null!=e)),l?(h=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},i),p.attributes[X]=++c,"flat"===t.bin.jsonStyle?n.push(...h.features.map(({attributes:{EXPR_1:e,...t},...s})=>({...s,attributes:u??e?{...t,[u??e]:e,...p.attributes}:{...t,...p.attributes}}))):(p.stackedAttributes=h.features.map(({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t),n.push(p))):(t.bin?.splitBy&&(p.attributes[X]=++c),h=await this._createStatisticsQueryResponse(t,i,p),n.push(p)),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 K(e){const t=o(e[0]);for(const s of e.slice(1))l(t,o(s));return t}function $(e,t,s,i){const a=i.x-s.x,r=i.y-s.y,n=t.x-s.x,o=t.y-s.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=s.x+a*c,e.y=s.y+r*c,!0}class ee{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 te=[1];function se(e,t){const s=e.split(" "),i=s[0],a=t.get(i),r=!!s[1]&&"desc"===s[1].toLowerCase();return{compare:J(a?.type,r,"case-insensitive"),fieldOrExpression:i,fieldInfo:a}}export{W as QueryEngineResult};
|
|
2
|
+
import{insertSortedStableTopN as e}from"../../../core/arrayUtils.js";import{importLazily as t}from"../../../core/importUtils.js";import{clone as s}from"../../../core/lang.js";import i from"../../../geometry/SpatialReference.js";import{polygonCentroid as a,extentCentroid as r}from"../../../geometry/support/centroid.js";import{getPolygonExtent as n,getGeometryExtent as o,expandExtent as l}from"../../../geometry/support/extentUtils.js";import{toQuantizationTransform as u}from"../../../geometry/support/quantizationUtils.js";import{isValid as c,equals as m}from"../../../geometry/support/spatialReferenceUtils.js";import{closestPointOnCurve as d}from"../../../geometry/support/curves/closestPointOnCurve.js";import{getEndpoint as f,isCoordinate as p,cloneCurve as h}from"../../../geometry/support/curves/curveUtils.js";import g from"./AttributesBuilder.js";import{cleanFromGeometryEngine as y,getGeometry as x,transformCentroid as I}from"./geometryUtils.js";import{project as T}from"./projectionSupport.js";import{getDateInNumber as F}from"./queryUtils.js";import{SnappingCandidateEdge as _,SnappingCandidateVertex as v}from"./SnappingCandidate.js";import{isDateField as V,isDateOnlyField as S,isTimestampOffsetField as b,isStringField as R,isTimeOnlyField as z}from"../../support/fieldUtils.js";import B from"../../../rest/support/AutoIntervalBinParameters.js";import M from"../../../rest/support/DateBinParameters.js";import{unitsDict as A}from"../../../rest/support/DateBinUtils.js";import w from"../../../rest/support/FixedBoundariesBinParameters.js";import N from"../../../rest/support/FixedIntervalBinParameters.js";import{calculateStringStatistics as P,calculateStatistics as D,processSummaryStatisticsResult as O,calculateUniqueValuesCount as j,createUVResult as q,calculateClassBreaks as C,resolveCBResult as G,calculateHistogram as Z,calculatePercentile as E,binIndex as H,getBinParams as U,isNullCountSupported as k,getAttributeComparator as J}from"../../../statistics/utils.js";import{utc as Q}from"../../../time/constants.js";import{DateTime as Y}from"luxon";const X="bin",L=t(()=>import("../../../geometry/operators/json/convexHullOperator.js"));class W{constructor(e,t,s){this.items=e,this.query=t,this.geometryType=s.geometryType,this.hasZ=!!t.returnZ&&s.hasZ,this.hasM=!!t.returnM&&s.hasM,this.fieldsIndex=s.fieldsIndex,this.spatialReference=s.spatialReference,this.featureAdapter=s.featureAdapter,this.featureIdInfo=s.featureIdInfo}get size(){return this.items.length}createQueryResponseForCount(){const e=new g(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:s,outStatistics:i}=this.query,a=t?.length;if(!!!a)return 1;const r=new Map,n=new Map,o=new Set;for(const l of i){const{statisticType:i}=l,a="exceedslimit"!==i?l.onStatisticField:void 0;if(!n.has(a)){const s=[];for(const i of t){const t=this._getAttributeValues(e,i,this.items,r);s.push(t)}n.set(a,this._calculateUniqueValues(s,this.items,e.returnDistinctValues))}const u=n.get(a);for(const t in u){const{data:i,items:a}=u[t],r=i.join(",");s&&!e.validateItems(a,s)||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;c(this.query.outSR)&&!m(t.spatialReference,this.query.outSR)?e.queryGeometry=y({spatialReference:this.query.outSR,...T(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=y({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,s){const i=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 s=(e-a.x)/r,i=(t-a.y)/n;return s*s+i*i}const l={candidates:[]},u="esriGeometryPolygon"===this.geometryType,c="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,m=this._getPointCreator(t,this.spatialReference,s),g=new ee(null,0),y=new ee(null,0),x={x:0,y:0,z:0};for(const d of this.items){const e=i.getObjectId(d),t=i.getGeometryWithCurves?.(d);if(null!=t){T(t,e);continue}const s=i.getGeometry(d);null==s||I(s,e)}return l.candidates.sort((e,t)=>e.distance-t.distance),l;function I(t,s){const{coords:i,stride:r}=t,n=t.isPoint?te:t.lengths;if(g.coords=i,y.coords=i,e.returnEdge){let e=0;for(let t=0;t<n.length;t++){const i=n[t],c=e;for(let t=0;t<i;t++,e+=r){if(!u&&t===i-1)continue;if(g.coordsIndex=e,y.coordsIndex=t===i-1?c:e+r,!$(x,a,g,y))continue;const n=o(x.x,x.y);n<=1&&l.candidates.push(new _(s,m(x),Math.sqrt(n),m(g),m(y)))}}}if("all"===e.vertexMode){let e=0;for(let t=0;t<n.length;t++){const i=n[t],a=e,c=y;c.coordsIndex=a;for(let t=0;t<i;t++,e+=r){if(g.coordsIndex=e,u&&t===i-1&&g.x===c.x&&g.y===c.y)continue;const a=o(g.x,g.y);a<=1&&l.candidates.push(new v(s,m(g),Math.sqrt(a)))}}}else if(c&&"ends"===e.vertexMode){let e=0;const t=[];for(let s=0;s<n.length;s++){t.push(e);const i=n[s];e+=i*r,i>1&&t.push(e-r)}for(const i of t){g.coordsIndex=i;const e=o(g.x,g.y);e<=1&&l.candidates.push(new v(s,m(g),Math.sqrt(e)))}}}function T(t,s){const{candidates:i}=l,r={x:0,y:0,z:0};if(e.returnEdge){const e=[a.x,a.y],n=new ee(e,0),l=new ee(e,0);for(const{segments:a}of t.parts)for(const{start:t,curve:u}of a){const{curvePoint:a}=d(t,u,e),c=o(...a);if(c>1)continue;[r.x,r.y]=a,n.coords=t,l.coords=f(u);const g=p(u)?null:h(u);i.push(new _(s,m(r),Math.sqrt(c),m(n),m(l),!1,g))}}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,i.push(new v(s,m(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 s=t.partOffsets[e],i=t.partOffsets[e+1]-1;n(s),i!==s&&n(i)}}}}_getPointCreator(e,t,s){const i=null==s||m(t,s)?e=>e:e=>T(e,t,s),{hasZ:a}=this,r=0;return a&&e?({x:e,y:t,z:s})=>i({x:e,y:t,z:s}):({x:e,y:t})=>i({x:e,y:t,z:r})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:a,normalizationTotal:r,minValue:n,maxValue:o,scale:l,timeZone:u,outStatisticTypes:c}=e,m=this.fieldsIndex.get(t),d=V(m)||S(m)||b(m),f=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:a,normalizationTotal:r,scale:l,timeZone:u},this.items),p=k({normalizationType:a,normalizationField:i,minValue:n,maxValue:o}),h={value:.5,fieldType:m?.type},g=R(m)?P({values:f,supportsNullCount:p,percentileParams:h,outStatisticTypes:c}):D({values:f,minValue:n,maxValue:o,useSampleStdDev:!a,supportsNullCount:p,percentileParams:h,outStatisticTypes:c});return O(g,c,d)}async createUniqueValuesResponse(e){const{field:t,valueExpression:s,domains:i,returnAllCodedValues:a,scale:r,timeZone:n}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:s,scale:r,timeZone:n},this.items,!1),l=j(o);return q(l,i,a,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:m,timeZone:d}=e,f=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:a,normalizationTotal:r,scale:m,timeZone:d},this.items),p=C(f,{field:t,normalizationField:i,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return G(p,n)}async createHistogramResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:m,timeZone:d}=e,f=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:a,normalizationTotal:r,scale:m,timeZone:d},this.items);return Z(f,{field:t,normalizationField:i,normalizationType:a,normalizationTotal:r,classificationMethod:n,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,s){if(e.length>1&&t?.length)for(const i of t.slice().reverse()){const{compare:t,fieldOrExpression:a,fieldInfo:r}=se(i,this.fieldsIndex);e.sort((e,i)=>t(s(e,a,r),s(i,a,r)))}}_topNFeatures(t,s,i,a){if(t.length>1&&s?.length){const r=s.map(e=>{const{compare:t,fieldOrExpression:s,fieldInfo:i}=se(e,this.fieldsIndex);return(e,r)=>t(a(e,s,i),a(r,s,i))}).reduceRight((e,t)=>(s,i)=>{const a=t(s,i);return 0===a||Number.isNaN(a)?e(s,i):a}),n=[];for(const s of t)e(n,s,i,r);return n}return t.slice(0,i)}_createFeatureQueryResponse(e){const{items:t,geometryType:s,hasM:i,hasZ:a,featureIdInfo:r,spatialReference:n}=this,{outFields:o,outSR:l,quantizationParameters:c,resultRecordCount:m,resultOffset:d,returnZ:f,returnM:p}=e,h=null!=m&&t.length>(d||0)+m,g=o&&(o.includes("*")?[...this.fieldsIndex.fields]:o.map(e=>this.fieldsIndex.get(e)));return{exceededTransferLimit:h,features:this._createFeatures(e,t),fields:g,geometryType:s,hasM:i&&p,hasZ:a&&f,objectIdFieldName:"object-id"===r.type?r.fieldName:null,spatialReference:y(l||n),transform:c&&u(c)||null}}_createFeatures(e,t){const s=new g(e,this.featureAdapter,this.fieldsIndex),{hasM:i,hasZ:a}=this,{orderByFields:r,quantizationParameters:n,returnGeometry:o,returnCentroid:l,maxAllowableOffset:c,resultOffset:m,resultRecordCount:d,returnZ:f=!1,returnM:p=!1}=e,h=a&&f,y=i&&p;let T;const F=m||0,_=null!=d?F+d:null;null!=_&&_<=5e3&&_<t.length?T=this._topNFeatures(t,r,_,(e,t,i)=>s.getFieldValue(e,t,i)):(T=[...t],this._sortFeatures(T,r,(e,t,i)=>s.getFieldValue(e,t,i))),(F>0||null!=_)&&(T=T.slice(F,_??void 0));const v=[];let V=0;if(this.geometryType&&(o||l)){const e=u(n)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(o&&!l)for(const i of T){const a=this.featureAdapter.getGeometry(i),r=this._addFeatureJSONMetadata(i,{attributes:s.getAttributes(i),geometry:x(this.geometryType,a,c,e,h,y)});t&&a&&!r.geometry&&(r.centroid=I(this,this.featureAdapter.getCentroid(i,this),e)),v[V++]=r}else if(!o&&l)for(const i of T)v[V++]=this._addFeatureJSONMetadata(i,{attributes:s.getAttributes(i),centroid:I(this,this.featureAdapter.getCentroid(i,this),e)});else for(const i of T)v[V++]=this._addFeatureJSONMetadata(i,{attributes:s.getAttributes(i),centroid:I(this,this.featureAdapter.getCentroid(i,this),e),geometry:x(this.geometryType,this.featureAdapter.getGeometry(i),c,e,h,y)})}else for(const u of T){const e=s.getAttributes(u);e&&(v[V++]=this._addFeatureJSONMetadata(u,{attributes:e}))}return v}_addFeatureJSONMetadata(e,t){const s=this.featureAdapter.getMetadata?.(e);return void 0!==s&&(t.metadata=s),t}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;for(const a of this.query.outStatistics??[])if("exceedslimit"===a.statisticType){t=null!=a.maxPointCount?a.maxPointCount:Number.POSITIVE_INFINITY,s=null!=a.maxRecordCount?a.maxRecordCount:Number.POSITIVE_INFINITY,i=null!=a.maxVertexCount?a.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>s)e=!0;else{e=this.items.reduce((e,t)=>{const s=this.featureAdapter.getGeometry(t);return e+(s?.size??0)},0)>i}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,s={attributes:{}}){const i=[],a=new Map,r=new Map,n=new Map,o=new Map,l=new g(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:c,having:m,orderByFields:d,resultRecordCount:f}=e,p=c?.length,h=!!p,y=h?c[0]:null,x=h&&!this.fieldsIndex.get(y);for(const g of u??[]){const{outStatisticFieldName:u,statisticType:d}=g,f=g,I="exceedslimit"!==d?g.onStatisticField:void 0,T="percentile_disc"===d||"percentile_cont"===d,F="EnvelopeAggregate"===d||"CentroidAggregate"===d||"ConvexHullAggregate"===d,_=h&&1===p&&(I===y||x)&&"count"===d;if(h){if(!n.has(I)){const e=[];for(const s of c){const i=this._getAttributeValues(l,s,t,a);e.push(i)}n.set(I,this._calculateUniqueValues(e,t,!F&&l.returnDistinctValues))}const s=n.get(I);if(!s)continue;const i=Object.keys(s);for(const r of i){const{count:i,data:n,items:d,itemPositions:p}=s[r],h=n.join(",");if(!m||l.validateItems(d,m)){const s=o.get(h)||{attributes:{}};if(e.returnAggIds&&(s.aggregateIds=d.map(e=>this.featureAdapter.getObjectId(e)).filter(e=>null!=e)),F){s.aggregateGeometries||(s.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:t}=await this._getAggregateGeometry(f,d);s.aggregateGeometries[t]=e}else{let e=null;if(_)e=i;else{const s=this._getAttributeValues(l,I,t,a),i=p.map(e=>s[e]);e=T&&"statisticParameters"in f?this._getPercentileValue(f,i):this._getStatisticValue(f,i,null,l.returnDistinctValues)}s.attributes[u]=e}let r=0;c.forEach((e,t)=>s.attributes[this.fieldsIndex.get(e)?e:"EXPR_"+ ++r]=n[t]),o.set(h,s)}}}else if(F){s.aggregateGeometries||(s.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:i}=await this._getAggregateGeometry(f,t);s.aggregateGeometries[i]=e}else{const e=this._getAttributeValues(l,I,t,a);s.attributes[u]=T&&"statisticParameters"in f?this._getPercentileValue(f,e):this._getStatisticValue(f,e,r,l.returnDistinctValues)}const v="min"!==d&&"max"!==d||!R(this.fieldsIndex.get(I))&&!this._isAnyDateField(I)?null:this.fieldsIndex.get(I)?.type;i.push({name:u,alias:u,type:v||"esriFieldTypeDouble"})}const I=h?Array.from(o.values()):[s];return this._sortFeatures(I,d,(e,t)=>e.attributes[t]),f&&(I.length=Math.min(f,I.length)),{fields:i,features:I}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return V(t)||S(t)||b(t)||z(t)}async _getAggregateGeometry(e,t){const{statisticType:s,outStatisticFieldName:i}=e,{featureAdapter:o,spatialReference:l,geometryType:u}=this,c=t.map(e=>x(u,o.getGeometry(e))),m={aggregateGeometries:null,outStatisticFieldName:null},{convexHullExecuteMany:d}=await L.getImportPromise();let[f]=d(c,{merge:!0});if(f&&f.rings[0].length<=3&&(f=null),"EnvelopeAggregate"===s){const e=f?n(f):K(c);m.aggregateGeometries={...e,spatialReference:l},m.outStatisticFieldName=i||"extent"}else if("CentroidAggregate"===s){const[e,t]=f?a(f):r(K(c));m.aggregateGeometries={x:e,y:t,spatialReference:l},m.outStatisticFieldName=i||"centroid"}else"ConvexHullAggregate"===s&&(m.aggregateGeometries=f&&{...f,spatialReference:l},m.outStatisticFieldName=i||"convexHull");return m}_getStatisticValue(e,t,s,i){const{onStatisticField:a,statisticType:r}=e;let n=null;n=s?.has(a)?s.get(a):R(this.fieldsIndex.get(a))||this._isAnyDateField(a)?P({values:t,returnDistinct:i}):D({values:i?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),s&&s.set(a,n);return n["var"===r?"variance":r]}_getPercentileValue(e,t){const{onStatisticField:s,statisticParameters:i,statisticType:a}=e,{value:r,orderBy:n}=i,o=this.fieldsIndex.get(s);return E(t,{value:r,orderBy:n,fieldType:o?.type,isDiscrete:"percentile_disc"===a})}_getAttributeValues(e,t,s,i){if(i.has(t))return i.get(t);const a=this.fieldsIndex.get(t),r=s.map(s=>e.getFieldValue(s,t,a));return i.set(t,r),r}_calculateUniqueValues(e,t,s){const i={},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==i[o]?i[o]={count:1,data:n,items:[a],itemPositions:[r]}:(s||i[o].count++,i[o].items.push(a),i[o].itemPositions.push(r))}return i}async _getDataValues(e,t,a=!0){const r=new g(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(t,n,{viewingMode:"map",scale:o,spatialReference:u},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},l):r.getDataValues(t,s(e),a)}_calculateHistogramBins(e,t,s){if(null==t.min&&null==t.max)return[];const i=t.intervals,a=t.min??0,r=t.max??0,n=i.map(([e,t])=>({minValue:e,maxValue:t,count:0,items:[]}));for(let o=0;o<e.length;o++){const t=e[o],l=s[o];if(null!=t&&t>=a&&t<=r){const e=H(i,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:s,outAlias:i,valueType:a}=t,r=[],n=[{name:i??s,alias:i??s,type:a??"esriFieldTypeString"},{name:X,alias:X,type:"esriFieldTypeInteger"}],o=new g(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[s],(e,t,s)=>o.getFieldValue(e,t,s));const c=this._getAttributeValues(o,s,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,[i??s]: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 s=e.bin;switch(t=t??this.items,s.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(B.fromJSON(s),e,t);case"dateBin":return this._createDateBinsResponse(M.fromJSON(s),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(w.fromJSON(s),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(N.fromJSON(s),e,t)}}async _createAutoIntervalBinsResponse(e,t,s){const{field:i,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},s),m=U(c,{field:i,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,s);return this._createFeaturesFromHistogramBins(d,t)}async _createDateBinsResponse(e,t,s){const{field:i,interval:a,start:r,end:n,snapToData:o,returnFullIntervalBin:l,offset:u,firstDayOfWeek:c}=e,m=a.unit,d=await this._getDataValues({field:i||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},s),f=z(this.fieldsIndex.get(i)),p=A.toJSON(m),h=d.filter(Boolean).sort((e,t)=>e-t),g=null!=r?F(r,f):h[0],y=null!=n?F(n,f):h[h.length-1],x=[];if(null!=g&&null!=y){const e={zone:t.outTimeReference?.ianaTimeZone??Q},s=u?.unit?A.toJSON(u.unit):"milliseconds",i={[s]:u?.value||0},r=Y.fromMillis(g,e).minus(i),n=Y.fromMillis(y,e).minus(i),m="number"==typeof c&&c>=1&&c<=7?c:7,d=(e,t)=>{const s=(e.weekday-t+7)%7;return e.minus({days:s}).startOf("day")};if("last"===o){let e="week"===p?((e,t)=>d(e,t).plus({days:7}))(n,m):n;for(;e>r;){const t=e.minus({[p]:a.value});if(t<r){x.unshift([l?t.plus(i).toMillis():r.plus(i).toMillis(),e.plus(i).toMillis()]);break}x.unshift([t.plus(i).toMillis(),e.plus(i).toMillis()]),e=t}}else{let e="first"===o?r:"week"===p?d(r,m):r.startOf(p);for(;e<=n;){const t=e.plus({[p]:a.value});if(t>n){x.push([e.plus(i).toMillis(),l?t.plus(i).toMillis():n.plus(i).toMillis()]);break}x.push([e.plus(i).toMillis(),t.plus(i).toMillis()]),e=t}}}const I=this._calculateHistogramBins(d,{intervals:x,min:g,max:y},s);return this._createFeaturesFromHistogramBins(I,t)}async _createFixedBoundariesBinsResponse(e,t,s){const{field:i}=e,a=await this._getDataValues({field:i||e.expression,timeZone:t.outTimeReference?.ianaTimeZone},s),r=z(this.fieldsIndex.get(i)),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,s);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,s){const{field:i,interval:a,normalizationType:r,start:n,end:o}=e,l=await this._getDataValues({field:i||e.expression,normalizationField:e.normalizationField,normalizationType:r,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},s),u=z(this.fieldsIndex.get(i)),c=U(l,{field:i,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,s);return this._createFeaturesFromHistogramBins(m,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:s,lowerBoundaryAlias:i}=t,a=i||"lowerBoundary",r=s||"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:X,alias:X,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 f of e){const{minValue:e,maxValue:s,items:i}=f,p={attributes:{}};let h;if(p.attributes[a]=m&&d&&null!=e?Y.fromMillis(e,{zone:d}).toISO():e,t.bin.hideUpperBound||(p.attributes[r]=m&&d&&null!=s?Y.fromMillis(s,{zone:d}).toISO():s),t.returnAggIds&&(p.aggregateIds=i.map(e=>this.featureAdapter.getObjectId(e)).filter(e=>null!=e)),l?(h=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},i),p.attributes[X]=++c,"flat"===t.bin.jsonStyle?n.push(...h.features.map(({attributes:{EXPR_1:e,...t},...s})=>({...s,attributes:u??e?{...t,[u??e]:e,...p.attributes}:{...t,...p.attributes}}))):(p.stackedAttributes=h.features.map(({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t),n.push(p))):(t.bin?.splitBy&&(p.attributes[X]=++c),h=await this._createStatisticsQueryResponse(t,i,p),n.push(p)),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 K(e){const t=o(e[0]);for(const s of e.slice(1))l(t,o(s));return t}function $(e,t,s,i){const a=i.x-s.x,r=i.y-s.y,n=t.x-s.x,o=t.y-s.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=s.x+a*c,e.y=s.y+r*c,!0}class ee{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 te=[1];function se(e,t){const s=e.split(" "),i=s[0],a=t.get(i),r=!!s[1]&&"desc"===s[1].toLowerCase();return{compare:J(a?.type,r,"case-insensitive"),fieldOrExpression:i,fieldInfo:a}}export{W as QueryEngineResult};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import t from"../../../core/Error.js";import{JSONMap as e}from"../../../core/jsonMap.js";import{getUnitString as i}from"../../../core/units.js";import r from"../../../geometry/Polygon.js";import{canProjectWithoutEngine as o}from"../../../geometry/projectionUtils.js";import{getGeometryExtent as s}from"../../../geometry/support/extentUtils.js";import{isExtent as a,isPolygon as n,isPolyline as l}from"../../../geometry/support/jsonTypeUtils.js";import{fromJSON as m}from"../../../geometry/support/jsonUtils.js";import{normalizeCentralMeridian as u}from"../../../geometry/support/normalizeUtils.js";import{equals as
|
|
2
|
+
import t from"../../../core/Error.js";import{JSONMap as e}from"../../../core/jsonMap.js";import{getUnitString as i}from"../../../core/units.js";import r from"../../../geometry/Polygon.js";import{canProjectWithoutEngine as o}from"../../../geometry/projectionUtils.js";import{getGeometryExtent as s}from"../../../geometry/support/extentUtils.js";import{isExtent as a,isPolygon as n,isPolyline as l}from"../../../geometry/support/jsonTypeUtils.js";import{fromJSON as m}from"../../../geometry/support/jsonUtils.js";import{normalizeCentralMeridian as u}from"../../../geometry/support/normalizeUtils.js";import{equals as c,isGeographic as p,isWebMercator as f,wgs84 as y}from"../../../geometry/support/spatialReferenceUtils.js";import{checkProjectionSupport as d,project as g}from"./projectionSupport.js";const S=new e({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),R=Object.freeze({}),j="frequency";async function B(t,e,i){const r=t.bin;return r.onField&&(r.onField=r.onField.trim()),r.onExpression?.value&&(r.onExpression.value=r.onExpression.value.trim()),r.splitBy&&(r.splitBy.value&&(r.splitBy.value=r.splitBy.value.trim()),r.splitBy.outAlias&&(r.splitBy.outAlias=r.splitBy.outAlias.trim())),r.stackBy&&(r.stackBy.value&&(r.stackBy.value=r.stackBy.value.trim()),r.stackBy.outAlias&&(r.stackBy.outAlias=r.stackBy.outAlias.trim())),"normalizationField"in r.parameters&&r.parameters.normalizationField&&(r.parameters.normalizationField=r.parameters.normalizationField.trim()),t.outStatistics?.length||(t.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:j}]),w(t,e,i)}async function w(t,e,i){const{outFields:r,orderByFields:o,groupByFieldsForStatistics:s,outStatistics:a}=t;if(r)for(let n=0;n<r.length;n++)r[n]=r[n].trim();if(o)for(let n=0;n<o.length;n++)o[n]=o[n].trim();if(s)for(let n=0;n<s.length;n++)s[n]=s[n].trim();if(a)for(let n=0;n<a.length;n++)a[n].onStatisticField&&(a[n].onStatisticField=a[n].onStatisticField.trim());return t.geometry&&!t.outSR&&(t.outSR=t.geometry.spatialReference),F(t,e,i)}async function F(t,e,i){if(!t)return null;let{where:p}=t;if(t.where=p=p?.trim(),(!p||/^1 *= *1$/.test(p)||e&&e===p)&&(t.where=null),!t.geometry)return t;let f=await v(t);if(t.distance=0,t.units=null,"esriSpatialRelEnvelopeIntersects"===t.spatialRel){const{spatialReference:e}=t.geometry;f=s(f),f.spatialReference=e}if(!f)return t;await d(f.spatialReference,i);let[y]=await u(m(f));if(null==y)throw R;let S=!1;(a(y)||n(y)||l(y))&&(S=!c(y.spatialReference,i)&&!o(y.spatialReference,i)),S&&a(y)&&(y=r.fromExtent(y));const j="quantizationParameters"in t&&t.quantizationParameters?.tolerance||"maxAllowableOffset"in t&&t.maxAllowableOffset||0,B=S&&j?{extendedParams:{densificationStep:8*j}}:void 0,w=y.toJSON(),F=g(w,w.spatialReference,i,B);if(!F)throw R;return F.spatialReference=i,t.geometry=F,t}async function v(e){const{distance:r,units:o}=e,s=e.geometry;if(!r||"vertexAttributes"in s)return s;const a=s.spatialReference,l=o?S.fromJSON(o):i(a),m=a&&(p(a)||f(a))?s:await d(a,y).then(()=>g(s,y)),{geodesicBufferExecute:u,geodesicBufferLoad:c}=await(import("../../../geometry/operators/json/geodesicBufferOperator.js"));await c();const R=u(m,r||1,{unit:l})??void 0;if(!R||!n(R)||0===R.rings.length)throw new t("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return R}function h(t,e){return null==t?null:"string"==typeof t?e?new Date(`1970-01-01T${t}Z`).getTime():new Date(t).getTime():t instanceof Date?t.getTime():t}export{h as getDateInNumber,B as normalizeAttributeBinsQuery,w as normalizeQuery,F as normalizeQueryLike,R as queryEngineEmptyResult,S as unitsKebabDict};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import e from"../../../core/Error.js";import{extentContainsPoint as
|
|
2
|
+
import e from"../../../core/Error.js";import{extentContainsPoint as t,extentContainsMultipoint as r}from"../../../geometry/support/contains.js";import{getExtentIntersector as i}from"../../../geometry/support/intersects.js";import{isPolygon as o,isExtent as s,getJsonType as n}from"../../../geometry/support/jsonTypeUtils.js";import{isValid as a}from"../../../geometry/support/spatialReferenceUtils.js";import{polygonContainsPoint as l,polygonContainsMultipoint as p}from"../contains.js";import{convertFromPolygon as u}from"../featureConversionUtils.js";import{getGeometry as m}from"./geometryUtils.js";import{checkProjectionSupport as c}from"./projectionSupport.js";const y="unsupported-query",f={spatialRelationship:{esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},queryGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!1,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},layerGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1}};function R(e){return null!=e&&!0===f.spatialRelationship[e]}function S(e){return null!=e&&!0===f.queryGeometry[n(e)]}function j(e){return null!=e&&!0===f.layerGeometry[e]}const h={esriSpatialRelIntersects:()=>import("../../../geometry/operators/json/intersectsOperator.js").then(e=>e.intersectsExecute),esriSpatialRelContains:()=>import("../../../geometry/operators/json/containsOperator.js").then(e=>e.containsExecute),esriSpatialRelCrosses:()=>import("../../../geometry/operators/json/crossesOperator.js").then(e=>e.crossesExecute),esriSpatialRelDisjoint:()=>import("../../../geometry/operators/json/disjointOperator.js").then(e=>e.disjointExecute),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>import("../../../geometry/operators/json/overlapsOperator.js").then(e=>e.overlapsExecute),esriSpatialRelTouches:()=>import("../../../geometry/operators/json/touchesOperator.js").then(e=>e.touchesExecute),esriSpatialRelWithin:()=>import("../../../geometry/operators/json/withinOperator.js").then(e=>e.withinExecute),esriSpatialRelRelation:null};function g(e){const t=h[e];if(null==t)throw new Error(`Cannot load unsupported spatial operator: ${e}`);return t()}async function G(e,n,a){if(o(n)){if("esriGeometryPoint"===a&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=u(n,!1,!1);return t=>l(e,t)}if("esriGeometryMultipoint"===a){const t=u(n,!1,!1);if("esriSpatialRelContains"===e)return e=>p(t,e)}}if(s(n)){if("esriGeometryPoint"===a&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>t(n,m(a,e));if("esriGeometryMultipoint"===a&&"esriSpatialRelContains"===e)return e=>r(n,m(a,e));if("esriSpatialRelIntersects"===e){const e=i(a);return t=>e(n,m(a,t))}}"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");const c=await g(e);return e=>c(n,m(a,e))}async function E(t,r,i){const{spatialRel:o,geometry:s}=t;if(s){if(!R(o))throw new e(y,"Unsupported query spatial relationship",{query:t});if(a(s.spatialReference)&&a(i)){if(!S(s))throw new e(y,"Unsupported query geometry type",{query:t});if(!j(r))throw new e(y,"Unsupported layer geometry type",{query:t});if(t.outSR)return c(t.geometry?.spatialReference,t.outSR)}}}function I(e){if(s(e))return!0;if(o(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}export{I as canQueryWithRBush,E as checkSpatialQuerySupport,G as getSpatialQueryOperator};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{parseDate as t}from"../../../../core/date.js";import{importLazily as e}from"../../../../
|
|
2
|
+
import{parseDate as t}from"../../../../core/date.js";import{importLazily as e}from"../../../../core/importUtils.js";import{isPolygon as r,isPolyline as o}from"../../../../geometry/support/jsonTypeUtils.js";import{isValid as s}from"../../../../geometry/support/spatialReferenceUtils.js";import{validateFieldValue as n,validationErrorToString as i,isNumericField as l,sanitizedParseFloat as u,isStringField as p,isDateField as c,sanitizeNullFieldValue as a}from"../../../support/fieldUtils.js";class f{constructor(t){this.description=t,this.code=null}}class m{constructor(t){this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error=new f(t)}}function d(t){return new m(t)}class g{constructor(t){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=t}}function y(t){return new g(t)}const h=new Set;function I(t,e,r,o=!1){h.clear();for(const s in r){const l=t.get(s);if(!l)continue;const u=j(l,r[s]);if(h.add(l.name),l&&(o||l.editable)){const t=n(l,u);if(t)return d(i(t,l,u));e[l.name]=u}}for(const s of t.requiredFields??[])if(!h.has(s.name))return d(`missing required field "${s.name}"`);return null}function j(e,r){let o=r;return l(e)&&"string"==typeof r?o=u(r):p(e)&&null!=r&&"string"!=typeof r?o=String(r):c(e)&&"string"==typeof r&&(o=t(r)),a(o)}const E=e(()=>import("../../../../geometry/operators/json/simplifyOperator.js"));function T(t,e){if(!r(t)&&!o(t))return t;if(!s(e))return t;const n=E.module;if(null==n)throw new TypeError("simplify operator not loaded");return n.simplifyExecute({...t,spatialReference:e})??t}async function S(t,e){!s(t)||"esriGeometryPolygon"!==e&&"esriGeometryPolyline"!==e||await E.getImportPromise()}const w={supportsAutoIntervalBin:!0,supportsFixedIntervalBin:!0,supportsFixedBoundariesBin:!0,supportsDateBin:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsNormalization:!0,supportedStatisticTypes:["COUNT","SUM","AVG","VAR","STDDEV","MIN","MAX","PERCENTILE_CONT","PERCENTILE_DISC","CentroidAggregate","EnvelopeAggregate","ConvexHullAggregate"],supportedNormalizationTypes:["field","log","naturalLog","percentOfTotal","squareRoot"]};export{d as createFeatureEditErrorResult,y as createFeatureEditSuccessResult,S as loadGeometryEngineForSimplify,I as mixAttributes,w as queryBinsCapabilities,T as simplify};
|
package/layers/list/Item.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import type SubtypeGroupLayer from "../SubtypeGroupLayer.js";
|
|
|
6
6
|
import type ItemPanel from "./ItemPanel.js";
|
|
7
7
|
import type Sublayer from "../support/Sublayer.js";
|
|
8
8
|
import type SubtypeSublayer from "../support/SubtypeSublayer.js";
|
|
9
|
+
import type TrackPartInfo from "../support/TrackPartInfo.js";
|
|
9
10
|
import type LayerView from "../../views/layers/LayerView.js";
|
|
10
11
|
import type { IdentifiableMixin, IdentifiableMixinProperties } from "../../core/Identifiable.js";
|
|
11
12
|
import type { Action, State } from "./types.js";
|
|
@@ -16,10 +17,10 @@ import type { ActionButtonProperties } from "../../support/actions/ActionButton.
|
|
|
16
17
|
import type { ReadonlyArrayOrCollection } from "../../core/Collection.js";
|
|
17
18
|
import type { ItemPanelProperties } from "./ItemPanel.js";
|
|
18
19
|
|
|
19
|
-
export interface ItemProperties extends IdentifiableMixinProperties, Partial<Pick<Item, "actionsExpanded" | "actionsOpen" | "checkPublishStatusEnabled" | "childrenSortable" | "expanded" | "hidden" | "layer" | "listModeDisabled" | "open" | "parent" | "sortable" | "view" | "visible">> {
|
|
20
|
+
export interface ItemProperties extends IdentifiableMixinProperties, Partial<Pick<Item, "actionsExpanded" | "actionsOpen" | "checkPublishStatusEnabled" | "childrenSortable" | "expanded" | "hidden" | "layer" | "listModeDisabled" | "open" | "parent" | "sortable" | "trackInfoType" | "view" | "visible">> {
|
|
20
21
|
/** A nested 2-dimensional collection of actions that could be triggered on the item. */
|
|
21
22
|
actionsSections?: ReadonlyArrayOrCollection<ReadonlyArrayOrCollection<((ActionButtonProperties & { type: "button" }) | (ActionToggleProperties & { type: "toggle" }))>>;
|
|
22
|
-
/**
|
|
23
|
+
/** The child layer and track info items belonging to this item. */
|
|
23
24
|
children?: ReadonlyArrayOrCollection<ItemProperties>;
|
|
24
25
|
/**
|
|
25
26
|
* Additional panel state associated with this list item.
|
|
@@ -63,6 +64,14 @@ export interface ConnectedLayerView extends LayerView {
|
|
|
63
64
|
connectionStatus: StreamLayerViewConnectionStatus;
|
|
64
65
|
}
|
|
65
66
|
|
|
67
|
+
/**
|
|
68
|
+
* Identifies a displayable part of [TrackInfo](https://developers.arcgis.com/javascript/latest/references/core/layers/support/TrackInfo/).
|
|
69
|
+
*
|
|
70
|
+
* @beta
|
|
71
|
+
* @since 5.2
|
|
72
|
+
*/
|
|
73
|
+
export type TrackInfoType = "latestObservations" | "previousObservations" | "trackLines";
|
|
74
|
+
|
|
66
75
|
/**
|
|
67
76
|
* Defines how the visibility of child layers is managed within a list item.
|
|
68
77
|
*
|
|
@@ -106,7 +115,7 @@ export default class Item extends ItemSuperclass {
|
|
|
106
115
|
* @since 5.2
|
|
107
116
|
*/
|
|
108
117
|
accessor checkPublishStatusEnabled: boolean;
|
|
109
|
-
/**
|
|
118
|
+
/** The child layer and track info items belonging to this item. */
|
|
110
119
|
get children(): Collection<Item>;
|
|
111
120
|
set children(value: ReadonlyArrayOrCollection<ItemProperties>);
|
|
112
121
|
/**
|
|
@@ -212,6 +221,21 @@ export default class Item extends ItemSuperclass {
|
|
|
212
221
|
/** The title of the layer. */
|
|
213
222
|
get title(): string;
|
|
214
223
|
set title(value: string | null | undefined);
|
|
224
|
+
/**
|
|
225
|
+
* The track info part represented by this item, or `null` when this item represents a layer.
|
|
226
|
+
*
|
|
227
|
+
* @beta
|
|
228
|
+
* @since 5.2
|
|
229
|
+
*/
|
|
230
|
+
accessor trackInfoType: TrackInfoType | null;
|
|
231
|
+
/**
|
|
232
|
+
* The track part represented by this item.
|
|
233
|
+
*
|
|
234
|
+
* @internal
|
|
235
|
+
* @beta
|
|
236
|
+
* @since 5.2
|
|
237
|
+
*/
|
|
238
|
+
get trackPart(): TrackPartInfo | null;
|
|
215
239
|
/**
|
|
216
240
|
* Value is `true` when the layer is updating; for example, if it is in the process of fetching data.
|
|
217
241
|
*
|
package/layers/list/Item.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../core/Accessor.js";import{isSome as i}from"../../core/arrayUtils.js";import r from"../../core/Collection.js";import{IdentifiableMixin as s}from"../../core/Identifiable.js";import{watch as n,initial as l}from"../../core/reactiveUtils.js";import{property as o,cast as a,subclass as h}from"../../core/accessorSupport/decorators.js";import{ensureType as d}from"../../core/accessorSupport/ensureType.js";import{get as p}from"../../core/accessorSupport/get.js";import c from"./ItemPanel.js";import{isLayerOutsideScaleRange as y,findLayerVisibilityMode as u,findLayerListMode as b,canDisplayLayer as f,getNormalizedChildLayerProperty as m}from"./support/layerListUtils.js";import{trackInfoPartPropertyNames as v}from"../support/trackInfoUtils.js";import g from"../../support/actions/ActionBase.js";import I from"../../support/actions/ActionButton.js";import k from"../../support/actions/ActionToggle.js";var C;const _=r.ofType({key:"type",defaultKeyValue:"button",base:g,typeMap:{button:I,toggle:k}}),w=r.ofType(_);function T(t){return"csv"===t?.type||"feature"===t?.type||"geojson"===t?.type||"ogc-feature"===t?.type||"stream"===t?.type}const S="layer",P="child-list-mode",M="hide";let x=C=class extends(s(e)){constructor(t){super(t),this.actionsSections=new w,this.actionsExpanded=!1,this.checkPublishStatusEnabled=!1,this.children=new(r.ofType(C)),this.childrenSortable=!0,this.hidden=!1,this.layer=null,this.listItemCreatedFunction=null,this.listModeDisabled=!1,this.expanded=!1,this.parent=null,this.trackInfoType=null,this.view=null}initialize(){if(this.addHandles([n(()=>[this.layer,this.layer?.listMode,this.listModeDisabled],()=>this._watchLayerProperties(this.layer),l),n(()=>this.checkPublishStatusEnabled,t=>this._updateChildrenPublishing(t),l),n(()=>this.view,t=>this._updateChildrenView(t),l),n(()=>this.panel,t=>this._setItemOnPanel(t),l),n(()=>{const t=this.layer,e=T(t)?t.trackInfo:null;return[t,e,e?.enabled]},()=>this._compileTrackInfoChildren(),l)]),"function"==typeof this.listItemCreatedFunction){const t={item:this};this.listItemCreatedFunction.call(null,t)}}destroy(){this.panel?.destroy(),this.children.destroyAll(),this.view=null}get actionsOpen(){return this.actionsExpanded}set actionsOpen(t){this.actionsExpanded=t}get connectionStatus(){const{layerView:t,publishing:e}=this;if(!e&&t&&"connectionStatus"in t)return t.connectionStatus}get error(){return this.layer?.loadError}get incompatible(){const{layerView:t}=this;return!(!t||!("spatialReferenceSupported"in t))&&!t.spatialReferenceSupported}get layerView(){const{layer:t,view:e}=this;if(!t||!e||"sublayer"===t.type)return null;const i="subtype-sublayer"===t.type?t.parent:t;return e.allLayerViews.find(t=>t.layer===i)??null}get open(){return this.expanded}set open(t){this.expanded=t}set panel(t){const e=this._get("panel");t!==e&&t&&e?.destroy(),this._set("panel",t)}castPanel(t){return this.expanded&&!t.hasOwnProperty("open")&&(t.open=!0),d(c,t)}get sortable(){return!this.trackInfoType&&"knowledge-graph-sublayer"!==this.layer?.type&&this._get("sortable")}set sortable(t){this._set("sortable",t)}get state(){return!this.layer||this.hidden||this.incompatible?"disabled":this.updating?"loading":"ready"}get title(){if(this.trackInfoType)return this._get("title")||"";const t=p(this,"layer.layer");return(!t||t&&p(this,"layer.layer.loaded"))&&p(this,"layer.title")||p(this,"layer.attributes.title")||""}set title(t){this._override("title",t)}get trackPart(){const{layer:t,trackInfoType:e}=this;return e&&T(t)?t.trackInfo?.[e]??null:null}get publishing(){const{layer:t,checkPublishStatusEnabled:e}=this;return!!(e&&t&&"publishingInfo"in t&&"publishing"===t.publishingInfo?.status)}get updating(){const{layerView:t,connectionStatus:e,layer:i,publishing:r}=this;return!r&&!e&&(t?t.updating:"loading"===i?.loadStatus||!1)}get visible(){return this.trackInfoType?this.trackPart?.visible??!1:!!this.layer?.visible}set visible(t){if(this.trackInfoType){const e=this.trackPart;return void(e&&(e.visible=t))}const e=this.layer;e&&(e.visible=t)}get visibleAtCurrentScale(){return this.layerView?.visibleAtCurrentScale??!y(this.layer,this.view?.scale)}get visibleAtCurrentTimeExtent(){return this.layerView?.visibleAtCurrentTimeExtent??!0}get visibilityMode(){return u(this.layer)}clone(){return new C({actionsExpanded:this.actionsExpanded,actionsSections:this.actionsSections.clone(),checkPublishStatusEnabled:this.checkPublishStatusEnabled,children:this.children.clone(),childrenSortable:this.childrenSortable,expanded:this.expanded,hidden:this.hidden,layer:this.layer,listItemCreatedFunction:this.listItemCreatedFunction,listModeDisabled:this.listModeDisabled,panel:this.panel,parent:this.parent,sortable:this.sortable,title:this.title,trackInfoType:this.trackInfoType,view:this.view,visible:this.visible})}toggleVisibility(t){if(!this.layer)return!1;const e=t??!this.visible;return this.visible=e,this.visible}_setItemOnPanel(t){t&&(t.listItem=this)}_compileTrackInfoChildren(){const t=this.layer,e=this.children.filter(t=>!!t.trackInfoType);if(!this.trackInfoType&&T(t)&&t.trackInfo?.enabled){e.some(e=>e.layer!==t)&&this.children.destroyMany(e.toArray());for(const e of v)this.children.some(t=>t.trackInfoType===e)||this.children.add(new C({layer:t,listItemCreatedFunction:this.listItemCreatedFunction,parent:this,trackInfoType:e}))}else this.children.destroyMany(e.toArray())}_updateChildrenPublishing(t){this.children?.forEach(e=>e.checkPublishStatusEnabled=t)}_updateChildrenView(t){const e=this.children;e&&e.forEach(e=>e.view=t)}_createChildren(t){const{listModeDisabled:e,children:i}=this,r=t.filter(t=>!i.some(e=>!e.trackInfoType&&e.layer===t));i.addMany(this._createChildItems(r,e).toArray())}_destroyChildren(t){const{children:e}=this,i=e.filter(e=>!e.trackInfoType&&!!e.layer&&!t.includes(e.layer));e.destroyMany(i.toArray())}_sortChildren(t){this.children.sort((e,i)=>e.trackInfoType||i.trackInfoType?e.trackInfoType?i.trackInfoType?v.indexOf(e.trackInfoType)-v.indexOf(i.trackInfoType):1:-1:t.indexOf(i.layer)-t.indexOf(e.layer))}_destroyLayerChildren(){this.removeHandles(P),this.children.destroyMany(this.children.filter(t=>!t.trackInfoType).toArray())}_watchChildLayerListMode(t){this.removeHandles(P),this.listModeDisabled||this.addHandles(t.toArray().map(e=>n(()=>e.listMode,()=>this._compileChildren(t))),P)}_compileChildren(t){const e=this.listModeDisabled?t:t?.filter(t=>b(t)!==M);t?.length?(this._createChildren(e),this._destroyChildren(e),this._sortChildren(e),this._watchChildLayerListMode(t)):this._destroyLayerChildren()}_watchSublayerChanges(t){t&&this.addHandles(t.on("change",()=>this._compileChildren(t)),S)}_initializeChildLayers(t){this._compileChildren(t),this._watchSublayerChanges(t)}_createChildItems(t,e){return t.reverse().map(t=>e||f(t)?new C({layer:t,checkPublishStatusEnabled:this.checkPublishStatusEnabled,listItemCreatedFunction:this.listItemCreatedFunction,listModeDisabled:this.listModeDisabled,parent:this,view:this.view}):null).filter(i)}_watchLayerProperties(t){if(this.removeHandles(S),this.removeHandles(P),!t||this.trackInfoType)return;if("hide-children"===(!this.listModeDisabled&&b(t)))return void this._destroyLayerChildren();const e=m(t);e&&this.addHandles(n(()=>t[e],i=>{const r=i;t.hasOwnProperty(e)&&r&&this._initializeChildLayers(r)},l),S)}};t([o({type:w})],x.prototype,"actionsSections",void 0),t([o()],x.prototype,"actionsExpanded",void 0),t([o()],x.prototype,"actionsOpen",null),t([o()],x.prototype,"checkPublishStatusEnabled",void 0),t([o({type:r.ofType(C)})],x.prototype,"children",void 0),t([o()],x.prototype,"childrenSortable",void 0),t([o({readOnly:!0})],x.prototype,"connectionStatus",null),t([o({readOnly:!0})],x.prototype,"error",null),t([o()],x.prototype,"hidden",void 0),t([o({readOnly:!0})],x.prototype,"incompatible",null),t([o()],x.prototype,"layer",void 0),t([o({readOnly:!0})],x.prototype,"layerView",null),t([o()],x.prototype,"listItemCreatedFunction",void 0),t([o({nonNullable:!0})],x.prototype,"listModeDisabled",void 0),t([o()],x.prototype,"expanded",void 0),t([o()],x.prototype,"open",null),t([o({type:c})],x.prototype,"panel",null),t([a("panel")],x.prototype,"castPanel",null),t([o()],x.prototype,"parent",void 0),t([o({value:!0})],x.prototype,"sortable",null),t([o({readOnly:!0})],x.prototype,"state",null),t([o()],x.prototype,"title",null),t([o()],x.prototype,"trackInfoType",void 0),t([o({readOnly:!0})],x.prototype,"trackPart",null),t([o({readOnly:!0})],x.prototype,"publishing",null),t([o({readOnly:!0})],x.prototype,"updating",null),t([o()],x.prototype,"view",void 0),t([o()],x.prototype,"visible",null),t([o({readOnly:!0})],x.prototype,"visibleAtCurrentScale",null),t([o({readOnly:!0})],x.prototype,"visibleAtCurrentTimeExtent",null),t([o({readOnly:!0})],x.prototype,"visibilityMode",null),x=C=t([h("esri.layers.list.Item")],x);const O=x;export{O as default};
|
|
@@ -51,7 +51,7 @@ export default class ItemPanel extends ItemPanelSuperclass {
|
|
|
51
51
|
accessor icon: string | null | undefined;
|
|
52
52
|
/** URL or data URI used by consumer UIs to represent the panel. */
|
|
53
53
|
accessor image: string | null | undefined;
|
|
54
|
-
/** The
|
|
54
|
+
/** The list item associated with this panel. */
|
|
55
55
|
accessor listItem: Item | null | undefined;
|
|
56
56
|
/**
|
|
57
57
|
* Indicates if the panel is open.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../core/Collection.js";import{EventedAccessor as s}from"../../core/Evented.js";import{watch as i,initial as a}from"../../core/reactiveUtils.js";import{property as r,subclass as l}from"../../core/accessorSupport/decorators.js";import o from"./Item.js";import{getItemLayers as n,findLayerListMode as d}from"./support/layerListUtils.js";import{isLinkChartView as h}from"../../linkChart/guards.js";const m={view:"view",viewLayers:"view-layers",mapLayers:"map-layers",layerViews:"layer-views",layerListMode:"layer-list-mode"},c="hide",p=t.ofType(o);let y=class extends s{constructor(e){super(e),this.checkPublishStatusEnabled=!1,this.listItemCreatedFunction=null,this.listModeDisabled=!1,this.operationalItems=new p,this.view=null}initialize(){this.addHandles([i(()=>!0===this.view?.ready,()=>this._viewHandles(),a),i(()=>[this.listItemCreatedFunction,this.checkPublishStatusEnabled,this.listModeDisabled],()=>this._recompileList()),i(()=>h(this.view)?this.view.inGeographicLayout:null,()=>this._compileList())],m.view)}destroy(){this._removeAllItems(),this.view=null}get state(){const{view:e}=this;return e?.ready?"ready":e?"loading":"disabled"}get totalItems(){return this.operationalItems.flatten(e=>e.children).length}triggerAction(e,t){e&&!e.disabled&&this.emit("trigger-action",{action:e,item:t})}moveItem(e,t,s,i){const a=e?.layer;if(!a||"subtype-sublayer"===a.type||"sublayer"===a.type)return;const r=this.view?.map?.layers,l=t?n(t):r,o=s?n(s):r;if(!l||!o)return;const{operationalItems:d}=this,h=t?.children||d,m=s?.children||d,c=o.length-i;e.parent=s||null,h.remove(e),l.remove(a),m.includes(e)||m.add(e,c),o.includes(a)||o.add(a,c),this._compileList()}_createLayerViewHandles(e){this.removeHandles(m.layerViews),this._compileList(),e&&this.addHandles(e.on("change",()=>this._compileList()),m.layerViews)}_createMapLayerHandles(e){this.removeHandles(m.mapLayers),this._compileList(),e&&this.addHandles(e.on("change",()=>this._compileList()),m.mapLayers)}_createItem(e){const{view:t,listItemCreatedFunction:s,checkPublishStatusEnabled:i,listModeDisabled:a}=this;return new o({checkPublishStatusEnabled:i,listModeDisabled:a,layer:e,listItemCreatedFunction:s,view:t})}_removeAllItems(){this.operationalItems.destroyAll()}_getViewableLayers(e){return e?this.listModeDisabled?e:e.filter(e=>d(e)!==c):void 0}_watchLayersListMode(e){this.removeHandles(m.layerListMode),e&&!this.listModeDisabled&&this.addHandles(i(()=>e.filter(e=>"listMode"in e).map(e=>e.listMode).toArray(),()=>this._compileList()),m.layerListMode)}_compileList(){const e=this.view?.map?.layers,t=h(this.view)&&!this.view.inGeographicLayout?e?.filter(({type:e})=>"link-chart"===e):e;this._watchLayersListMode(t);const s=this._getViewableLayers(t);s?.length?(this._createNewItems(s),this._removeItems(s),this._sortItems(s)):this._removeAllItems()}_createNewItems(e){const{operationalItems:t}=this;e.forEach(e=>{t.some(t=>t.layer===e)||t.add(this._createItem(e))})}_removeItems(e){const{operationalItems:t}=this,s=[];t.forEach(t=>{t&&e&&e.includes(t.layer)||s.push(t)}),t.destroyMany(s)}_sortItems(e){const{operationalItems:t}=this;t.sort((t,s)=>{const i=e.indexOf(t.layer),a=e.indexOf(s.layer);return i>a?-1:i<a?1:0})}_recompileList(){this._removeAllItems(),this._compileList()}_viewHandles(){const{view:e}=this;this.removeHandles([m.mapLayers,m.layerViews,m.viewLayers]),e?.ready?this.addHandles([i(()=>this.view?.map?.allLayers,e=>this._createMapLayerHandles(e),a),i(()=>this.view?.allLayerViews,e=>this._createLayerViewHandles(e),a)],m.viewLayers):this._removeAllItems()}};e([r()],y.prototype,"checkPublishStatusEnabled",void 0),e([r()],y.prototype,"listItemCreatedFunction",void 0),e([r({nonNullable:!0})],y.prototype,"listModeDisabled",void 0),e([r({type:p})],y.prototype,"operationalItems",void 0),e([r({readOnly:!0})],y.prototype,"state",null),e([r()],y.prototype,"totalItems",null),e([r()],y.prototype,"view",void 0),y=e([l("esri.layers.list.LayerItemCollection")],y);const v=y;export{v as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../core/Collection.js";import{EventedAccessor as s}from"../../core/Evented.js";import{watch as i,initial as a}from"../../core/reactiveUtils.js";import{property as r,subclass as l}from"../../core/accessorSupport/decorators.js";import o from"./Item.js";import{getItemLayers as n,findLayerListMode as d}from"./support/layerListUtils.js";import{isLinkChartView as h}from"../../linkChart/guards.js";const m={view:"view",viewLayers:"view-layers",mapLayers:"map-layers",layerViews:"layer-views",layerListMode:"layer-list-mode"},c="hide",p=t.ofType(o);let y=class extends s{constructor(e){super(e),this.checkPublishStatusEnabled=!1,this.listItemCreatedFunction=null,this.listModeDisabled=!1,this.operationalItems=new p,this.view=null}initialize(){this.addHandles([i(()=>!0===this.view?.ready,()=>this._viewHandles(),a),i(()=>[this.listItemCreatedFunction,this.checkPublishStatusEnabled,this.listModeDisabled],()=>this._recompileList()),i(()=>h(this.view)?this.view.inGeographicLayout:null,()=>this._compileList())],m.view)}destroy(){this._removeAllItems(),this.view=null}get state(){const{view:e}=this;return e?.ready?"ready":e?"loading":"disabled"}get totalItems(){return this.operationalItems.flatten(e=>e.children).length}triggerAction(e,t){e&&!e.disabled&&this.emit("trigger-action",{action:e,item:t})}moveItem(e,t,s,i){const a=e?.layer;if(!a||e.trackInfoType||"subtype-sublayer"===a.type||"sublayer"===a.type)return;const r=this.view?.map?.layers,l=t?n(t):r,o=s?n(s):r;if(!l||!o)return;const{operationalItems:d}=this,h=t?.children||d,m=s?.children||d,c=o.length-i;e.parent=s||null,h.remove(e),l.remove(a),m.includes(e)||m.add(e,c),o.includes(a)||o.add(a,c),this._compileList()}_createLayerViewHandles(e){this.removeHandles(m.layerViews),this._compileList(),e&&this.addHandles(e.on("change",()=>this._compileList()),m.layerViews)}_createMapLayerHandles(e){this.removeHandles(m.mapLayers),this._compileList(),e&&this.addHandles(e.on("change",()=>this._compileList()),m.mapLayers)}_createItem(e){const{view:t,listItemCreatedFunction:s,checkPublishStatusEnabled:i,listModeDisabled:a}=this;return new o({checkPublishStatusEnabled:i,listModeDisabled:a,layer:e,listItemCreatedFunction:s,view:t})}_removeAllItems(){this.operationalItems.destroyAll()}_getViewableLayers(e){return e?this.listModeDisabled?e:e.filter(e=>d(e)!==c):void 0}_watchLayersListMode(e){this.removeHandles(m.layerListMode),e&&!this.listModeDisabled&&this.addHandles(i(()=>e.filter(e=>"listMode"in e).map(e=>e.listMode).toArray(),()=>this._compileList()),m.layerListMode)}_compileList(){const e=this.view?.map?.layers,t=h(this.view)&&!this.view.inGeographicLayout?e?.filter(({type:e})=>"link-chart"===e):e;this._watchLayersListMode(t);const s=this._getViewableLayers(t);s?.length?(this._createNewItems(s),this._removeItems(s),this._sortItems(s)):this._removeAllItems()}_createNewItems(e){const{operationalItems:t}=this;e.forEach(e=>{t.some(t=>t.layer===e)||t.add(this._createItem(e))})}_removeItems(e){const{operationalItems:t}=this,s=[];t.forEach(t=>{t&&e&&e.includes(t.layer)||s.push(t)}),t.destroyMany(s)}_sortItems(e){const{operationalItems:t}=this;t.sort((t,s)=>{const i=e.indexOf(t.layer),a=e.indexOf(s.layer);return i>a?-1:i<a?1:0})}_recompileList(){this._removeAllItems(),this._compileList()}_viewHandles(){const{view:e}=this;this.removeHandles([m.mapLayers,m.layerViews,m.viewLayers]),e?.ready?this.addHandles([i(()=>this.view?.map?.allLayers,e=>this._createMapLayerHandles(e),a),i(()=>this.view?.allLayerViews,e=>this._createLayerViewHandles(e),a)],m.viewLayers):this._removeAllItems()}};e([r()],y.prototype,"checkPublishStatusEnabled",void 0),e([r()],y.prototype,"listItemCreatedFunction",void 0),e([r({nonNullable:!0})],y.prototype,"listModeDisabled",void 0),e([r({type:p})],y.prototype,"operationalItems",void 0),e([r({readOnly:!0})],y.prototype,"state",null),e([r()],y.prototype,"totalItems",null),e([r()],y.prototype,"view",void 0),y=e([l("esri.layers.list.LayerItemCollection")],y);const v=y;export{v as default};
|