@arcgis/core 6.0.0-next.43 → 6.0.0-next.44
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/WebMap.d.ts +9 -1
- package/WebMap.js +1 -1
- package/WebScene.js +1 -1
- package/applications/Components/OrientedImageryViewer/ImageViewer/utils.d.ts +3 -1
- package/applications/Components/OrientedImageryViewer/ImageViewer/utils.js +1 -1
- package/applications/Components/OrientedImageryViewer/VideoFeatureCache.js +2 -0
- package/applications/Components/OrientedImageryViewer/galleryUtils.d.ts +2 -1
- package/applications/Components/OrientedImageryViewer/galleryUtils.js +1 -1
- package/applications/Components/OrientedImageryViewer/imageMeasurementUtils.js +2 -0
- package/applications/Components/OrientedImageryViewer/imageUtils.d.ts +756 -0
- package/applications/Components/OrientedImageryViewer/imageUtils.js +2 -0
- package/applications/Components/OrientedImageryViewer/measurementUtils.d.ts +15 -0
- package/applications/Components/OrientedImageryViewer/measurementUtils.js +2 -0
- package/applications/Components/OrientedImageryViewer/queryFeatures.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/ImageMeasurementWorker.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/constants.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/featureCoverage.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/galleryUtils.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/imageMeasurementWorkerUtils.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/navigation/queries.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/navigation/utils.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/panoramicImageProperties.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/services/ImageMeasurementService.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/services/SuperimposeService.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/services/TransformationService.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/support/NonPanoramicMedia.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/support/dataCaptureUtils.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/support/geometryUtils.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/support/panConstraint.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/support/resolveMediaProps.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/support/superimposeUtils.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/support/typeUtils.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/support/urlUtils.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/symbols.js +2 -0
- package/applications/Components/OrientedImageryViewer/shared/utils.js +2 -0
- package/applications/Components/OrientedImageryViewer/videoUtils.d.ts +15 -0
- package/applications/Components/OrientedImageryViewer/videoUtils.js +2 -0
- package/applications/Components/testUtils.d.ts +9 -0
- package/applications/Components/testUtils.js +1 -1
- package/applications/SceneViewer/sceneViewerUtils.d.ts +117 -1
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/arcade/Feature.js +1 -1
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +4 -4
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/compilerUtils.js +1 -1
- package/arcade/featureSetUtils.js +1 -1
- package/arcade/featureset/support/sqlUtils.js +1 -1
- package/arcade/functions/convertdirection.js +1 -1
- package/arcade/functions/hash.js +1 -1
- package/arcade/functions/string.js +1 -1
- package/arcade/geometry/isSelfIntersecting.js +1 -1
- package/arcade/treeAnalysis.js +1 -1
- package/arcgisGlobal.d.ts +6 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/00620a90b32352bcdc71.js +1 -0
- package/assets/esri/core/workers/chunks/{fdffefd7de540272a8a6.js → 02feb2550b6878e62e2d.js} +1 -1
- package/assets/esri/core/workers/chunks/06326c8cbe0d644eca16.js +1 -0
- package/assets/esri/core/workers/chunks/{3ec3589f6e74d7cb87cf.js → 090a7d0b0128d20879be.js} +1 -1
- package/assets/esri/core/workers/chunks/{a33ba23aee3f8f40200f.js → 0ac4a3029ba17a9e2492.js} +1 -1
- package/assets/esri/core/workers/chunks/0ae2933ab9b4a6ca56f2.js +1 -0
- package/assets/esri/core/workers/chunks/{18dbee576b7b9dbe69fb.js → 0b480583373b69773333.js} +1 -1
- package/assets/esri/core/workers/chunks/0bfc4e7640058811e10c.js +1 -0
- package/assets/esri/core/workers/chunks/0caaa03659f4f4e8df03.js +1 -0
- package/assets/esri/core/workers/chunks/{3de07326da4c47cd2aab.js → 0dc1ac5531f7c8854686.js} +1 -1
- package/assets/esri/core/workers/chunks/0e57bac610d41c7c9ad4.js +1 -0
- package/assets/esri/core/workers/chunks/{2294254af2c6afb560ee.js → 11e313dfca2579e68419.js} +1 -1
- package/assets/esri/core/workers/chunks/{cadd60fa4370284c7ae3.js → 13b40a611224ff5f4697.js} +1 -1
- package/assets/esri/core/workers/chunks/15a18c803a3aafa9a65b.js +1 -0
- package/assets/esri/core/workers/chunks/15a7a3264915fc8d3188.js +1 -0
- package/assets/esri/core/workers/chunks/162de06e54c0f9cba012.js +1 -0
- package/assets/esri/core/workers/chunks/1c61ced6079443fc0ce8.js +1 -0
- package/assets/esri/core/workers/chunks/1c94d4d79952dc4067be.js +1 -0
- package/assets/esri/core/workers/chunks/{804606b194dc9e71d088.js → 1ca9f823caff691e964d.js} +1 -1
- package/assets/esri/core/workers/chunks/{8f4fba4d2339c91c8b3f.js → 1d9b0db37d5f3819ffca.js} +1 -1
- package/assets/esri/core/workers/chunks/200da109115eab8b2480.js +1 -0
- package/assets/esri/core/workers/chunks/{edd36a1fc80b1d29907e.js → 21939ef53bc71b42370f.js} +1 -1
- package/assets/esri/core/workers/chunks/230189a28552ab00546d.js +1 -0
- package/assets/esri/core/workers/chunks/{81b9894e81cce3490984.js → 2515ce2ef279cdd4d5fa.js} +1 -1
- package/assets/esri/core/workers/chunks/27a5c6be4f847900d6ed.js +1 -0
- package/assets/esri/core/workers/chunks/{45b5a61c4e9fbd9ca0b3.js → 27f0bbde1e9fa3f06d46.js} +1 -1
- package/assets/esri/core/workers/chunks/{d51bb11baadc741c46bc.js → 29a437a2b7b3a9b3e104.js} +1 -1
- package/assets/esri/core/workers/chunks/{070684943698fa43c2b4.js → 2a224bc845c9bf682c54.js} +1 -1
- package/assets/esri/core/workers/chunks/2c619c50cdcc37652c0b.js +1 -0
- package/assets/esri/core/workers/chunks/2c7f3fb74a076acf9b30.js +1 -0
- package/assets/esri/core/workers/chunks/{bc38def1983089514e4b.js → 2e9d2f0a4e3c84d2ac2e.js} +1 -1
- package/assets/esri/core/workers/chunks/{9fe1812aad6e566aea31.js → 30c5b584e8658b2b3607.js} +1 -1
- package/assets/esri/core/workers/chunks/{ae6dc159be974ca0e8da.js → 32ba94e59b411d3ff063.js} +1 -1
- package/assets/esri/core/workers/chunks/{67efdd296007a809586c.js → 3463b52d633a9336af28.js} +1 -1
- package/assets/esri/core/workers/chunks/{864194927d05ebc4cc31.js → 35426786de409d42a87f.js} +1 -1
- package/assets/esri/core/workers/chunks/{898359be6996fd9763b8.js → 377158a19c9d6ef11387.js} +1 -1
- package/assets/esri/core/workers/chunks/394b329e64d880cdb500.js +1 -0
- package/assets/esri/core/workers/chunks/{ca2adcbcf44454484fd5.js → 3a295fab549ae3caf9df.js} +1 -1
- package/assets/esri/core/workers/chunks/3a3b57abfb92494cac84.js +1 -0
- package/assets/esri/core/workers/chunks/{fd031150d3a7f896e6b3.js → 3cbb3c4e0e60a874ac6d.js} +1 -1
- package/assets/esri/core/workers/chunks/{50763ea061d5fb3f2e49.js → 4136c4de42b8818e2710.js} +1 -1
- package/assets/esri/core/workers/chunks/41d674e73b57c8abe838.js +1 -0
- package/assets/esri/core/workers/chunks/{0cfdeb53fb7d5532cf01.js → 425347186c279bcc595c.js} +1 -1
- package/assets/esri/core/workers/chunks/{6ccf9535013fe672c93b.js → 434a7ef5b25d83593b50.js} +1 -1
- package/assets/esri/core/workers/chunks/{4fe10650ba3cd30aa9a2.js → 46d0db736c6e7decbcf6.js} +1 -1
- package/assets/esri/core/workers/chunks/{cca8bd07bcd1d267a2e8.js → 489b37c459e1af116aeb.js} +1 -1
- package/assets/esri/core/workers/chunks/49c21c11621ff077e401.js +1 -0
- package/assets/esri/core/workers/chunks/{bfb8fc6b940bd5510e29.js → 4eab4e74c6a479c5f930.js} +1 -1
- package/assets/esri/core/workers/chunks/{5fd4d3cb3c9350131a59.js → 4f8a915795f107b772c5.js} +1 -1
- package/assets/esri/core/workers/chunks/5565b4e7c31d31a7e546.js +1 -0
- package/assets/esri/core/workers/chunks/{344f5334ad95c7974349.js → 5744c7350e4e2eb73aa9.js} +1 -1
- package/assets/esri/core/workers/chunks/{8d3e92a3367a3ddc02bd.js → 57e0bf4be8a166d5b1eb.js} +1 -1
- package/assets/esri/core/workers/chunks/{3dd49f910834a2fb2142.js → 5b3db2c40feaefb7cbc0.js} +1 -1
- package/assets/esri/core/workers/chunks/5ba40e98e9300d1ebc85.js +1 -0
- package/assets/esri/core/workers/chunks/60137300db0e0c3caf13.js +1 -0
- package/assets/esri/core/workers/chunks/63d2645a744dce469bbb.js +1 -0
- package/assets/esri/core/workers/chunks/649e4ecb1d9e6da3fcd7.js +1 -0
- package/assets/esri/core/workers/chunks/6637fb99033bfa7646d4.js +1 -0
- package/assets/esri/core/workers/chunks/68b4ce0b2e754ac2e552.js +1 -0
- package/assets/esri/core/workers/chunks/69c338d1d359075371bc.js +1 -0
- package/assets/esri/core/workers/chunks/{6b4c3411f63a9ad9354c.js → 72020d86e3fc7ecc139f.js} +1 -1
- package/assets/esri/core/workers/chunks/{9630234267098115de4d.js → 73ab4f0275a85b9671ec.js} +1 -1
- package/assets/esri/core/workers/chunks/{449a2dee17b54946f245.js → 7b7208237123e948f170.js} +1 -1
- package/assets/esri/core/workers/chunks/{5529831dd891382c79df.js → 7d866911d1171d25ca78.js} +1 -1
- package/assets/esri/core/workers/chunks/7eddde6c4249f46c67f3.js +1 -0
- package/assets/esri/core/workers/chunks/82160bd873cdb5a23557.js +1 -0
- package/assets/esri/core/workers/chunks/82e238375582f90dc94c.js +1 -0
- package/assets/esri/core/workers/chunks/831d896587d10fb689dc.js +1 -0
- package/assets/esri/core/workers/chunks/{ca204c110438f7315790.js → 834bbda7719b04301f74.js} +1 -1
- package/assets/esri/core/workers/chunks/835ccd95f2d312ecda5a.js +1 -0
- package/assets/esri/core/workers/chunks/8385bede56cc95d1a388.js +1 -0
- package/assets/esri/core/workers/chunks/8a8c9a3969b7016c20d9.js +1 -0
- package/assets/esri/core/workers/chunks/8c1ae93dae934aedc6dc.js +1 -0
- package/assets/esri/core/workers/chunks/{ef274db3fa260eadf371.js → 8cddfdbab3ad3809462f.js} +1 -1
- package/assets/esri/core/workers/chunks/8cec3f48e995aab3d62e.js +1 -0
- package/assets/esri/core/workers/chunks/{076e8d2e08ff2a013736.js → 8f1dd383502432d8a039.js} +1 -1
- package/assets/esri/core/workers/chunks/{78a69594c82d37aecbfb.js → 90a7cd7564f2a92199cc.js} +1 -1
- package/assets/esri/core/workers/chunks/98e3f7ab4bfbabf0b952.js +1 -0
- package/assets/esri/core/workers/chunks/99a72b65afdcd3ee091a.js +1 -0
- package/assets/esri/core/workers/chunks/{be04f40f8b403befd0ef.js → 9bb90097368b200fa730.js} +1 -1
- package/assets/esri/core/workers/chunks/{f7398cfd8bbd041bd635.js → 9bf77f92760aacbd636f.js} +1 -1
- package/assets/esri/core/workers/chunks/{237a1f68a0efbfe5b77c.js → 9e7622379d777ea88018.js} +1 -1
- package/assets/esri/core/workers/chunks/9fb4c10d5b3e32bc86e9.js +1 -0
- package/assets/esri/core/workers/chunks/{564d7f2e58fbc16853c0.js → a8bedc53d4a316953108.js} +1 -1
- package/assets/esri/core/workers/chunks/{f2dab9fcd90ce38ae3d1.js → a8fbef765a6fb68e1115.js} +1 -1
- package/assets/esri/core/workers/chunks/aaac620f93a20fbd3f08.js +1 -0
- package/assets/esri/core/workers/chunks/ab684cce869973ea71cf.js +1 -0
- package/assets/esri/core/workers/chunks/ad787100602e18dde650.js +1 -0
- package/assets/esri/core/workers/chunks/{cb1642ea8b66231cbfb5.js → af70a81620203c030f5b.js} +1 -1
- package/assets/esri/core/workers/chunks/{efff269424d76f1dbb15.js → b10850c48f4eee60b8a9.js} +1 -1
- package/assets/esri/core/workers/chunks/{f11eaab5354cc6aa9569.js → b25104337f2495a4296a.js} +1 -1
- package/assets/esri/core/workers/chunks/{784d6c6949284ed6e10b.js → b3707d2cd2f4b2f70889.js} +1 -1
- package/assets/esri/core/workers/chunks/b89b634e9d38b5a51d33.js +1 -0
- package/assets/esri/core/workers/chunks/bb6573d794bbe670216a.js +1 -0
- package/assets/esri/core/workers/chunks/{8ebaf5754e86a45b0497.js → be11cec9979ed5e9738e.js} +1 -1
- package/assets/esri/core/workers/chunks/c063de8f57a393280c39.js +1 -0
- package/assets/esri/core/workers/chunks/c420ab79d85e5dbddb0b.js +29 -0
- package/assets/esri/core/workers/chunks/{14ed0c34b910eba3434e.js → c473c8b480de9802711b.js} +1 -1
- package/assets/esri/core/workers/chunks/{b3dbcf43f136ba2dadc5.js → c67ce7896789ac7275b2.js} +1 -1
- package/assets/esri/core/workers/chunks/c75cc72a306a617d9cd8.js +1 -0
- package/assets/esri/core/workers/chunks/{394ae3199c78a94c6a2a.js → c85336a50a4994a2a7eb.js} +1 -1
- package/assets/esri/core/workers/chunks/ccb0046b883286e65429.js +1 -0
- package/assets/esri/core/workers/chunks/cf684026e7f1ab7df4f7.js +1 -0
- package/assets/esri/core/workers/chunks/d19ac8368bb769fa5fba.js +1 -0
- package/assets/esri/core/workers/chunks/d26c9db8c0a772d0923c.js +1 -0
- package/assets/esri/core/workers/chunks/{58d10e0b35968680fd9f.js → d31f6598b76380e8688a.js} +1 -1
- package/assets/esri/core/workers/chunks/d3cd09b2d78ce9f2ea42.js +1 -0
- package/assets/esri/core/workers/chunks/{ad94f54b4c88b3a047bc.js → d4028536542db8b623cc.js} +1 -1
- package/assets/esri/core/workers/chunks/{cb6fb04fe5c8d90d4196.js → d4fe26716c4eca13d493.js} +1 -1
- package/assets/esri/core/workers/chunks/{c86d3af148b28ded5875.js → d64054cd6865d3a1af78.js} +38 -44
- package/assets/esri/core/workers/chunks/d7270a2db6f3bfcf0565.js +1 -0
- package/assets/esri/core/workers/chunks/d85d1064ba87ea1b1410.js +1 -0
- package/assets/esri/core/workers/chunks/{7a8ca15271e42b6131ac.js → d8b9d14f8d3e82ad26dc.js} +1 -1
- package/assets/esri/core/workers/chunks/{63c4412c16d8a44a5668.js → d99d5aa04e2d74ef57a7.js} +1 -1
- package/assets/esri/core/workers/chunks/{dfd4782b11d6fdca0492.js → d9e75266ac28f934eb61.js} +1 -1
- package/assets/esri/core/workers/chunks/dbf37b1c4e0567d9fb32.js +1 -0
- package/assets/esri/core/workers/chunks/{0c948ad4572000218afc.js → dc9792b2aa55975b8a95.js} +1 -1
- package/assets/esri/core/workers/chunks/dca0e2505a6cbef6f7f5.js +1 -0
- package/assets/esri/core/workers/chunks/ddaa8f8098e4a663e4e5.js +1 -0
- package/assets/esri/core/workers/chunks/df88bb9117967fe72eb4.js +1 -0
- package/assets/esri/core/workers/chunks/{1c378d489c5402888f76.js → e1f5da51115472347b55.js} +1 -1
- package/assets/esri/core/workers/chunks/e2535c83b97725e89256.js +1 -0
- package/assets/esri/core/workers/chunks/{406f24ec13eb30d43405.js → e2ebf0ea3af2e6907987.js} +1 -1
- package/assets/esri/core/workers/chunks/{ffe2077a9df7c838ea27.js → e7719bfbc5875a515a2b.js} +1 -1
- package/assets/esri/core/workers/chunks/{26ceb0ff8d93dbb9b84f.js → ec88631b5033c19f569e.js} +1 -1
- package/assets/esri/core/workers/chunks/{a2cc53ad1a514167e4b8.js → ef8f9b61b829c3bdf999.js} +1 -1
- package/assets/esri/core/workers/chunks/ef9740c4d1bd808af38a.js +1 -0
- package/assets/esri/core/workers/chunks/{f08a2a262a3b55149396.js → f0b897319ca8578df63f.js} +1 -1
- package/assets/esri/core/workers/chunks/{acea0946049136578354.js → f1e87e3ff65d8594e6b3.js} +1 -1
- package/assets/esri/core/workers/chunks/f36376b126c80d0983fb.js +1 -0
- package/assets/esri/core/workers/chunks/f3ca7fa35eb8d55f5907.js +1 -0
- package/assets/esri/core/workers/chunks/{1f9d6180a96d557838e9.js → f4d714d0a1a513861704.js} +1 -1
- package/assets/esri/core/workers/chunks/{14ded73842154d91ef4e.js → f7f73de8c63924e347ab.js} +1 -1
- package/assets/esri/core/workers/chunks/f91e36a104e84d985517.js +1 -0
- package/assets/esri/core/workers/chunks/{69f6d5997b8ff1326e39.js → fa5d4b9a098441ebf505.js} +1 -1
- package/assets/esri/core/workers/chunks/{9c3db7a7c05fa0e81f0a.js → fc9d66fe2cc9e2d31964.js} +1 -1
- package/chunks/Bufferer-CclWhXVb.js +1 -1
- package/chunks/ColorMaterial.glsl.js +26 -16
- package/chunks/Component.glsl.js +0 -1
- package/chunks/CypherParser.js +1 -1
- package/chunks/DefaultMaterial.glsl.js +1 -1
- package/chunks/Distance2DCalculator-DjIp2uQi.js +1 -1
- package/chunks/EdgeShader.glsl.js +1 -1
- package/chunks/Envelope.js +1 -1
- package/chunks/Envelope2D.js +1 -1
- package/chunks/GeodeticDistanceCalculator-zRp89-dW.js +1 -1
- package/chunks/GeodeticUtils.js +1 -1
- package/chunks/Geometry.js +1 -1
- package/chunks/Jpg.js +1 -1
- package/chunks/MultiPathImpl.js +1 -1
- package/chunks/OperatorAffineTransform.js +1 -1
- package/chunks/OperatorClip.js +1 -1
- package/chunks/OperatorCrosses.js +1 -1
- package/chunks/OperatorCut.js +1 -1
- package/chunks/OperatorDensify.js +1 -1
- package/chunks/OperatorDistance.js +1 -1
- package/chunks/OperatorEquals.js +1 -1
- package/chunks/OperatorGeneralize.js +1 -1
- package/chunks/OperatorGeodesicBuffer.js +1 -1
- package/chunks/OperatorGeodeticArea.js +1 -1
- package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
- package/chunks/OperatorGeodeticDistance.js +1 -1
- package/chunks/OperatorGeodeticLength.js +1 -1
- package/chunks/OperatorGraphicBuffer.js +1 -1
- package/chunks/OperatorIntegrate.js +1 -1
- package/chunks/OperatorIntersects.js +1 -1
- package/chunks/OperatorMultiPartToSinglePart.js +1 -1
- package/chunks/OperatorOverlaps.js +1 -1
- package/chunks/OperatorProximity.js +1 -1
- package/chunks/OperatorProximityGeodesic.js +1 -1
- package/chunks/OperatorRelate.js +1 -1
- package/chunks/OperatorShapePreservingLength.js +1 -1
- package/chunks/OperatorShapePreservingProject.js +1 -1
- package/chunks/OperatorSimplifyOGC.js +1 -1
- package/chunks/OperatorTouches.js +1 -1
- package/chunks/OperatorWithin.js +1 -1
- package/chunks/Point2D.js +1 -1
- package/chunks/RealisticTree.glsl.js +1 -1
- package/chunks/SideCalculator2D-DX0718xq.js +1 -1
- package/chunks/Transformation2D.js +1 -1
- package/chunks/UnitFactory.js +1 -1
- package/chunks/antlr4.web.js +3 -3
- package/chunks/arcgis-knowledge-client-core-simd.js +3 -3
- package/chunks/arcgis-knowledge-client-core.js +3 -3
- package/chunks/basis_encoder.js +2 -2
- package/chunks/basis_transcoder.js +2 -2
- package/chunks/draco_mesh_decoder.js +2 -2
- package/chunks/dxt_encoder.js +3 -3
- package/chunks/earcut.js +1 -1
- package/chunks/i3s.js +2 -2
- package/chunks/index.js +2 -2
- package/chunks/lclayout.js +2 -2
- package/chunks/lerc-wasm.js +1 -1
- package/chunks/libtess-f32.js +1 -1
- package/chunks/libtess-f64.js +1 -1
- package/chunks/lyr3DMain.js +1 -1
- package/chunks/lyr3DWorker.js +1 -1
- package/chunks/parquet.js +1 -1
- package/chunks/pe-wasm.js +1 -1
- package/chunks/projector.js +1 -1
- package/chunks/qb3-wasm.js +1 -1
- package/chunks/text.js +1 -1
- package/chunks/urlUtils.js +2 -0
- package/chunks/vxlLayer.js +1 -1
- package/config.js +1 -1
- package/core/Accessor.js +1 -1
- package/core/Clonable.js +1 -1
- package/core/Collection.js +1 -1
- package/core/MD5.js +1 -1
- package/core/MemCache.js +1 -1
- package/core/ObjectPool.js +1 -1
- package/core/RandomLCG.js +1 -1
- package/core/accessorSupport/decorators/subclass.js +1 -1
- package/core/accessorSupport/diffUtils.js +1 -1
- package/core/accessorSupport/extensions/serializableProperty/reader.js +1 -1
- package/core/accessorSupport/get.js +1 -1
- package/core/colorUtils.js +1 -1
- package/core/has.js +1 -1
- package/core/image/apng.js +1 -1
- package/core/lang.js +1 -1
- package/core/object.js +1 -1
- package/core/pbf.js +1 -1
- package/core/sql/StandardizedFunctions.js +1 -1
- package/core/string.js +1 -1
- package/core/typedArrayUtil.js +1 -1
- package/core/urlUtils.js +1 -1
- package/core/workers/RemoteClient.js +1 -1
- package/editing/sharedTemplates/executor/createTemplateExecutor.js +1 -1
- package/geometry/Circle.js +1 -1
- package/geometry/SpatialReference.d.ts +12 -3
- package/geometry/geodesicUtils.js +1 -1
- package/geometry/geometryEngine.js +1 -1
- package/geometry/libtess.js +1 -1
- package/geometry/operators/extendOperator.js +1 -1
- package/geometry/operators/geodeticDensifyOperator.js +1 -1
- package/geometry/operators/geodeticLengthOperator.js +1 -1
- package/geometry/operators/gx/operatorAlphaShape.js +1 -1
- package/geometry/operators/gx/operatorAutoComplete.js +1 -1
- package/geometry/operators/gx/operatorBoundary.js +1 -1
- package/geometry/operators/gx/operatorBuffer.js +1 -1
- package/geometry/operators/gx/operatorConvexHull.js +1 -1
- package/geometry/operators/gx/operatorDifference.js +1 -1
- package/geometry/operators/gx/operatorIntersection.js +1 -1
- package/geometry/operators/gx/operatorLabelPoint.js +1 -1
- package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
- package/geometry/operators/gx/operatorLocateBetween.js +1 -1
- package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
- package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
- package/geometry/operators/gx/operatorSimplify.js +1 -1
- package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
- package/geometry/operators/intersectionOperator.js +1 -1
- package/geometry/operators/isNearOperator.js +1 -1
- package/geometry/operators/reshapeOperator.js +1 -1
- package/geometry/operators/simplifyOperator.js +1 -1
- package/geometry/operators/support/jsonConverter.js +2 -2
- package/geometry/projectionUtils.js +1 -1
- package/geometry/support/buffer/types.js +1 -1
- package/geometry/support/curves/densifyCurvedGeometry.js +1 -1
- package/geometry/support/frustumPlanes.js +1 -1
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/geometry/support/intersectsBase.js +1 -1
- package/geometry/support/meshUtils/External.js +1 -1
- package/geometry/support/meshUtils/exporters/gltf/glb.js +1 -1
- package/geometry/support/plane.js +1 -1
- package/interfaces.d.ts +16 -41
- package/kernel.js +1 -1
- package/layers/GaussianSplatLayer.d.ts +1 -9
- package/layers/GaussianSplatLayer.js +1 -1
- package/layers/ILyr3DWasmPerSceneView.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.d.ts +1 -5
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/IntegratedMeshLayer.d.ts +25 -2
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/MapNotesLayer.js +1 -1
- package/layers/ParquetLayer.d.ts +0 -32
- package/layers/ParquetLayer.js +1 -1
- package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +2 -2
- package/layers/graphics/OptimizedGeometry.js +1 -1
- package/layers/graphics/applyEditsUtils.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/data/FeatureIdInfo.js +1 -1
- package/layers/graphics/data/StreamFeatureManager.js +1 -1
- package/layers/graphics/dehydratedFeatures.js +1 -1
- package/layers/graphics/sources/csv/csv.js +2 -2
- package/layers/graphics/sources/geojson/geojson.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/graphics/sources/support/sourceUtils.js +1 -1
- package/layers/mixins/SceneService.js +1 -1
- package/layers/orientedImagery/core/NavigationNode.js +2 -0
- package/layers/orientedImagery/core/imageNavigationUtils.d.ts +2 -0
- package/layers/orientedImagery/core/imageNavigationUtils.js +2 -0
- package/layers/orientedImagery/core/utils.js +1 -1
- package/layers/orientedImagery/queries.js +1 -1
- package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
- package/layers/orientedImagery/transformations/rectifyMapPoint.js +1 -1
- package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/orientedImagery/types.d.ts +3 -0
- package/layers/raster/datasets/RasterFactory.js +1 -1
- package/layers/raster/datasets/xmlUtilities.js +1 -1
- package/layers/raster/formats/Lerc.js +1 -1
- package/layers/raster/formats/pixelRangeUtils.js +1 -1
- package/layers/raster/functions/convolutionUtils.js +1 -1
- package/layers/raster/functions/customBandIndexUtils.js +1 -1
- package/layers/support/I3SIntegratedMeshElevationQuery.js +1 -1
- package/layers/support/MosaicRule.js +1 -1
- package/layers/support/PixelBlock.js +1 -1
- package/layers/support/SpriteSource.js +1 -1
- package/layers/support/arcgisLayers.js +1 -1
- package/layers/support/csvUtils.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/floorFilterUtils.js +1 -1
- package/layers/support/layersCreator.js +1 -1
- package/layers/support/tiles3DUtils.js +1 -1
- package/layers/support/wmtsUtils.js +1 -1
- package/layers/video/VideoController.js +21 -21
- package/libs/ajv/ajv.bundle-wrapper.js +1 -1
- package/libs/linkchartlayout/LinkChartLayout.js +1 -1
- package/networks/Network.js +1 -1
- package/networks/support/UtilityNetworkLookupHelper.js +1 -1
- package/package.json +2 -2
- package/parcelFabric/ParcelFabric.d.ts +760 -0
- package/parcelFabric/ParcelFabric.js +2 -0
- package/parcelFabric/support/ParcelJobInfo.d.ts +97 -0
- package/parcelFabric/support/ParcelJobInfo.js +2 -0
- package/parcelFabric/support/ParcelParameters.d.ts +48 -0
- package/parcelFabric/support/ParcelParameters.js +2 -0
- package/popup/FeatureModel.d.ts +2 -2
- package/popup/FeaturesModel.d.ts +2 -2
- package/popup/support/featureUtils.js +1 -1
- package/portal/support/loadUtils.js +1 -1
- package/portal/support/portalLayers.js +1 -1
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/renderers/support/rendererConversion.js +1 -1
- package/request/queue.js +1 -1
- package/rest/geoprocessor/utils.js +1 -1
- package/rest/parcelFabric/analyzeByLeastSquaresAdjustment.js +2 -0
- package/rest/parcelFabric/applyLeastSquaresAdjustment.js +2 -0
- package/rest/parcelFabric/assignFeaturesToRecord.js +2 -0
- package/rest/parcelFabric/build.js +2 -0
- package/rest/parcelFabric/changeParcelType.js +2 -0
- package/rest/parcelFabric/clip.js +2 -0
- package/rest/parcelFabric/copyLinesToParcelType.js +2 -0
- package/rest/parcelFabric/createSeeds.js +2 -0
- package/rest/parcelFabric/deleteParcels.js +2 -0
- package/rest/parcelFabric/divide.js +2 -0
- package/rest/parcelFabric/duplicateParcels.js +2 -0
- package/rest/parcelFabric/merge.js +2 -0
- package/rest/parcelFabric/mergeParcelPoints.js +2 -0
- package/rest/parcelFabric/reassignFeaturesToRecord.js +2 -0
- package/rest/parcelFabric/reconstructFromSeeds.js +2 -0
- package/rest/parcelFabric/setParcelLineLabelPosition.js +2 -0
- package/rest/parcelFabric/shrinkToSeed.js +2 -0
- package/rest/parcelFabric/transferParcel.js +2 -0
- package/rest/parcelFabric/updateParcelHistory.js +2 -0
- package/rest/parcelFabric/utils.js +2 -0
- package/rest/support/JobInfo.js +1 -1
- package/rest/support/printTaskUtils.js +1 -1
- package/smartMapping/heuristics/scaleRange.js +1 -1
- package/smartMapping/raster/renderers/classBreaks.js +1 -1
- package/smartMapping/renderers/color.js +1 -1
- package/smartMapping/renderers/location.js +1 -1
- package/smartMapping/renderers/support/utils.js +1 -1
- package/smartMapping/renderers/univariateColorSize.js +1 -1
- package/support/basemapUtils.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/symbols/support/cimSymbolUtils.js +1 -1
- package/undoredo/support/ServiceVersionInfo.js +1 -1
- package/views/2d/engine/flow/dataUtils.js +1 -1
- package/views/2d/engine/vectorTiles/VectorTileContainer.js +1 -1
- package/views/2d/engine/vectorTiles/style/StyleProperty.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/TextureManager.js +1 -1
- package/views/2d/engine/webgl/cpuMapped/CpuBuffer.js +1 -1
- package/views/2d/engine/webgl/cpuMapped/CpuMeshData.js +1 -1
- package/views/2d/engine/webgl/definitions.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/engine/webgl/number.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterInputEvaluator.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterVertexPack.js +1 -1
- package/views/2d/engine/webgl/util/createMatcher.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/features/support/ComputedAttributeStorage.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
- package/views/2d/layers/features/support/StaticBitSet.js +1 -1
- package/views/2d/layers/features/support/rendererUtils.js +1 -1
- package/views/2d/layers/support/annodime/annotationSchema.js +1 -1
- package/views/2d/layers/support/annodime/cimAnnotations.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightManipulators.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedArrowManipulator.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedShapeVisualElement.js +1 -1
- package/views/3d/analysis/Viewshed/viewshedToolManipulatorUtils.js +1 -1
- package/views/3d/glTF/internal/Resource.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveXYAxisManipulation.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveXYDiscManipulation.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/MoveZManipulation.js +1 -1
- package/views/3d/interactive/editingTools/move/isSupportedObject.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
- package/views/3d/interactive/manipulatorUtils.js +1 -1
- package/views/3d/interactive/manipulators/ShiftManipulator.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
- package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/VerticesVisualElement.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerWorker.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerWorkerHandle.js +1 -1
- package/views/3d/layers/IntegratedMeshNormals.js +1 -1
- package/views/3d/layers/graphics/ElevationAligners.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/LabelInfo.js +1 -1
- package/views/3d/layers/graphics/extrudePolygon.js +1 -1
- package/views/3d/layers/graphics/polygonUtils.js +1 -1
- package/views/3d/layers/graphics/primitiveObjectSymbolUtils.js +1 -1
- package/views/3d/layers/graphics/tessellationUtils.js +1 -1
- package/views/3d/layers/graphics/wosrLoader.js +1 -1
- package/views/3d/layers/i3s/I3SBinaryReader.js +1 -1
- package/views/3d/layers/i3s/IDBCache.js +1 -1
- package/views/3d/layers/support/IntegratedMesh3DTilesVertexProcessing.js +1 -1
- package/views/3d/layers/support/patternUtils.js +1 -1
- package/views/3d/support/PBFDecoder.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatAtlasPages.js +1 -1
- package/views/3d/support/meshProcessing.js +1 -1
- package/views/3d/support/renderInfoUtils/polygon.js +1 -1
- package/views/3d/support/sunUtils.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl/RenderCamera.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ObjectParameters.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/NormalAttribute.glsl.js +1 -6
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexNormal.glsl.js +2 -4
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +19 -19
- package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +16 -15
- package/views/3d/webgl-engine/effects/atmosphere/LocalAtmosphere.js +1 -1
- package/views/3d/webgl-engine/lib/BasisUtil.js +1 -1
- package/views/3d/webgl-engine/lib/GPUPointOcclusionQuery.js +5 -5
- package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
- package/views/3d/webgl-engine/lib/ObjectAndLayerIdRenderHelper.js +1 -1
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/3d/webgl-engine/lib/Program.js +1 -1
- package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
- package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeUtil.glsl.js +1 -2
- package/views/3d/webgl-engine/lib/screenPolygonOverlapUtils.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/draw/DrawManipulator3D.js +1 -1
- package/views/draw/support/managers/TooltipManager.js +1 -1
- package/views/draw/support/reshapeUtils.js +1 -1
- package/views/interactive/options/SnappingOptions.d.ts +3 -2
- package/views/interactive/sketch/constraints.js +1 -1
- package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
- package/views/interactive/snapping/FeatureSnappingLayerSource.d.ts +6 -3
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTileStore.js +1 -1
- package/views/interactive/snapping/featureSources/symbologySnappingCandidates.js +1 -1
- package/views/selection/SelectionOperation.js +1 -1
- package/views/support/GeometryWorker.js +1 -1
- package/views/support/flow/dataUtils.js +1 -1
- package/views/support/screenUtils.js +1 -1
- package/views/support/screenshotUtils.js +1 -1
- package/views/support/waitForResources.js +1 -1
- package/views/webgl/InstanceCounter.js +1 -1
- package/views/webgl/Program.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/webdoc/support/webdocLoadUtils.js +1 -1
- package/webscene/spec-certification/api.js +1 -1
- package/widgets/BasemapLayerList/BasemapLayerListViewModel.d.ts +2 -2
- package/widgets/BasemapLayerList/BasemapLayerListViewModel.js +1 -1
- package/widgets/BasemapLayerList/BasemapLayerListVisibleElements.d.ts +2 -2
- package/widgets/BasemapLayerList/types.d.ts +3 -3
- package/widgets/BasemapLayerList.d.ts +2 -2
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/CatalogLayerList/CatalogLayerListViewModel.d.ts +2 -2
- package/widgets/CatalogLayerList/CatalogLayerListViewModel.js +1 -1
- package/widgets/CatalogLayerList/CatalogLayerListVisibleElements.d.ts +2 -2
- package/widgets/CatalogLayerList/types.d.ts +3 -3
- package/widgets/CatalogLayerList.d.ts +3 -3
- package/widgets/CatalogLayerList.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileInteraction.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/LayerList/LayerListViewModel.js +1 -1
- package/widgets/LayerList/LayerListVisibleElements.d.ts +2 -2
- package/widgets/LayerList/ListItem.d.ts +1 -1
- package/widgets/LayerList/ListItemPanel.d.ts +1 -1
- package/widgets/LayerList/types.d.ts +1 -1
- package/widgets/Measurement.js +1 -1
- package/widgets/OrientedImageryViewer/ImageMeasurementWorker.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/draw/HeightMeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/DataCaptureAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/sketch/TriangulatedMeasurementAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageLocationViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageOverlays.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationNode.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationUI360.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationUIPanoramicViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationUIViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/OverlayLayersListViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/imageNavigationUtils.js +1 -1
- package/widgets/OrientedImageryViewer/constants.js +1 -1
- package/widgets/OrientedImageryViewer/featureCoverage.js +1 -1
- package/widgets/OrientedImageryViewer/galleryUtils.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
- package/widgets/OrientedImageryViewer/imageMeasurementWorkerUtils.js +1 -1
- package/widgets/OrientedImageryViewer/mixins/ImageMeasurementMixin.js +1 -1
- package/widgets/OrientedImageryViewer/mixins/TriangulatedImageMeasurementMixin.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/utils.js +1 -1
- package/widgets/OrientedImageryViewer/panoramicImageProperties.js +1 -1
- package/widgets/OrientedImageryViewer/services/DepthImageService.js +1 -1
- package/widgets/OrientedImageryViewer/services/ImageMeasurementService.js +1 -1
- package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
- package/widgets/OrientedImageryViewer/services/TransformationService.js +1 -1
- package/widgets/OrientedImageryViewer/support/MediaPrefetcher.js +1 -1
- package/widgets/OrientedImageryViewer/support/NonPanoramicMedia.js +1 -1
- package/widgets/OrientedImageryViewer/support/dataCaptureUtils.js +1 -1
- package/widgets/OrientedImageryViewer/support/geometryUtils.js +1 -1
- package/widgets/OrientedImageryViewer/support/navigationViewStateUtils.js +1 -1
- package/widgets/OrientedImageryViewer/support/panConstraint.js +1 -1
- package/widgets/OrientedImageryViewer/support/resolveMediaProps.js +1 -1
- package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
- package/widgets/OrientedImageryViewer/support/typeUtils.js +1 -1
- package/widgets/OrientedImageryViewer/support/urlUtils.js +1 -1
- package/widgets/OrientedImageryViewer/symbols.js +1 -1
- package/widgets/OrientedImageryViewer/types.d.ts +10 -0
- package/widgets/OrientedImageryViewer/utils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/support/PanoramicMedia.js +1 -1
- package/widgets/ScaleRangeSlider/ScaleRanges.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/Sketch/support/PluginManager.js +1 -1
- package/widgets/TableList/ListItem.d.ts +2 -2
- package/widgets/TableList/ListItemPanel.d.ts +4 -4
- package/widgets/TableList/TableListViewModel.d.ts +4 -4
- package/widgets/TableList/TableListViewModel.js +1 -1
- package/widgets/TableList/TableListVisibleElements.d.ts +2 -2
- package/widgets/TableList/types.d.ts +5 -5
- package/widgets/TableList.d.ts +3 -3
- package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
- package/widgets/UtilityNetworkTrace.js +1 -1
- package/assets/esri/core/workers/chunks/105865a4d8cb4ddf8a8a.js +0 -1
- package/assets/esri/core/workers/chunks/1aebb8fe0692058bf2fb.js +0 -1
- package/assets/esri/core/workers/chunks/1cdb55d9a5ab1a5e3f08.js +0 -1
- package/assets/esri/core/workers/chunks/1e5c5029b0653047a769.js +0 -1
- package/assets/esri/core/workers/chunks/20db6e844708d3e71437.js +0 -1
- package/assets/esri/core/workers/chunks/29ef9d357e30082d267a.js +0 -1
- package/assets/esri/core/workers/chunks/29feef121b0916fb90bf.js +0 -1
- package/assets/esri/core/workers/chunks/2e760d04641755d1820d.js +0 -1
- package/assets/esri/core/workers/chunks/2ef91e8da260454f46d8.js +0 -1
- package/assets/esri/core/workers/chunks/361d620b3f91868b1490.js +0 -1
- package/assets/esri/core/workers/chunks/37c16e20f022ca27cdae.js +0 -1
- package/assets/esri/core/workers/chunks/380aefa522dfeccb8c65.js +0 -1
- package/assets/esri/core/workers/chunks/3a90b6eafa92f1a68ac5.js +0 -1
- package/assets/esri/core/workers/chunks/3b552afffaa78bf4fe18.js +0 -1
- package/assets/esri/core/workers/chunks/44782e8318dc47cb08a0.js +0 -1
- package/assets/esri/core/workers/chunks/46969f379623810b2eca.js +0 -1
- package/assets/esri/core/workers/chunks/47f0c717acc2c33ea670.js +0 -1
- package/assets/esri/core/workers/chunks/487500443a6037d3599f.js +0 -1
- package/assets/esri/core/workers/chunks/4a4fab74442c3d914505.js +0 -1
- package/assets/esri/core/workers/chunks/4e03aa5518d46a36661c.js +0 -1
- package/assets/esri/core/workers/chunks/5470a29a69010c8361c4.js +0 -1
- package/assets/esri/core/workers/chunks/59295b99bdff4045a0e7.js +0 -1
- package/assets/esri/core/workers/chunks/5c2fe67527c9d7b4dba3.js +0 -1
- package/assets/esri/core/workers/chunks/5d908a823b324bafda1e.js +0 -1
- package/assets/esri/core/workers/chunks/5dea74fe52583e77f3ce.js +0 -1
- package/assets/esri/core/workers/chunks/5f1cb79aec9c4a9b7ddc.js +0 -29
- package/assets/esri/core/workers/chunks/60637f38159e9bf68d4e.js +0 -1
- package/assets/esri/core/workers/chunks/67c2e5953087dadfd245.js +0 -1
- package/assets/esri/core/workers/chunks/6f3732e7ba2d031ba789.js +0 -1
- package/assets/esri/core/workers/chunks/7191ab31fa040a7c561e.js +0 -1
- package/assets/esri/core/workers/chunks/71ba848c3352ea3ff96f.js +0 -1
- package/assets/esri/core/workers/chunks/863f04cacdc843d3f208.js +0 -1
- package/assets/esri/core/workers/chunks/87992070008812f8ae6f.js +0 -1
- package/assets/esri/core/workers/chunks/89b9d716d96135d4f057.js +0 -1
- package/assets/esri/core/workers/chunks/8b38798ac6d774185238.js +0 -1
- package/assets/esri/core/workers/chunks/8b53369cace136ed1329.js +0 -1
- package/assets/esri/core/workers/chunks/8ba4f5e1912edf397947.js +0 -1
- package/assets/esri/core/workers/chunks/919a6aedf38e9631ee09.js +0 -1
- package/assets/esri/core/workers/chunks/9869c696e6321c8db0a9.js +0 -1
- package/assets/esri/core/workers/chunks/9d0976f5979c4f9154dc.js +0 -1
- package/assets/esri/core/workers/chunks/a332e31165b65a6fb92e.js +0 -1
- package/assets/esri/core/workers/chunks/a4d3944700f1cc240176.js +0 -1
- package/assets/esri/core/workers/chunks/a7937b06f4b0860c7671.js +0 -1
- package/assets/esri/core/workers/chunks/b03f32f02858244c6cd0.js +0 -1
- package/assets/esri/core/workers/chunks/b42e50ec6b819f669400.js +0 -1
- package/assets/esri/core/workers/chunks/b5e7475cc5fbf31289d3.js +0 -1
- package/assets/esri/core/workers/chunks/bd02d927b0b4991b61c5.js +0 -1
- package/assets/esri/core/workers/chunks/bdf1c4c038d556527483.js +0 -1
- package/assets/esri/core/workers/chunks/c1273f14a5ef3d81de0d.js +0 -1
- package/assets/esri/core/workers/chunks/c7f49493bd548d5dc1e0.js +0 -1
- package/assets/esri/core/workers/chunks/cb62326b6526cde429c1.js +0 -1
- package/assets/esri/core/workers/chunks/cd8304b1db83d48c57db.js +0 -1
- package/assets/esri/core/workers/chunks/ce0274847ccce6a1ac53.js +0 -1
- package/assets/esri/core/workers/chunks/d00dd961a5b79f563123.js +0 -1
- package/assets/esri/core/workers/chunks/d893c3bb093104d3db95.js +0 -1
- package/assets/esri/core/workers/chunks/d8fb1d9da16492574a11.js +0 -1
- package/assets/esri/core/workers/chunks/df32a3fe81d60f0d7462.js +0 -1
- package/assets/esri/core/workers/chunks/e8cdec961e9cff1cb73b.js +0 -1
- package/assets/esri/core/workers/chunks/eaf720dfdf6ceca31249.js +0 -1
- package/assets/esri/core/workers/chunks/efca82a4dc494f57380b.js +0 -1
- package/assets/esri/core/workers/chunks/f05990e6fb378e2e1a3b.js +0 -1
- package/assets/esri/core/workers/chunks/f0fc89cdf50a40913c02.js +0 -1
- package/assets/esri/core/workers/chunks/f86ff791a10c802879ec.js +0 -1
- package/assets/esri/core/workers/chunks/fd17c4a9e13bf77aa86a.js +0 -1
- package/widgets/OrientedImageryViewer/support/VideoFeatureCache.js +0 -2
- package/widgets/OrientedImageryViewer/videoViewerUtils.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{createScreenPoint as e,createScreenPointArray as t}from"../../core/screenUtils.js";function n(t){return e(t.x,t.y)}function r(e){return t(e.x,e.y)}function i(t,n){let r=(t instanceof HTMLElement?t:t.surface)?.getBoundingClientRect();return r?e(n.clientX-r.left,n.clientY-r.top):e(0,0)}function a(e,t){return t instanceof Event?i(e,t):n(t)}function o(e){if(e instanceof Event)return!0;if(typeof e==`object`&&`type`in e)switch(e.type){case`click`:case`double-click`:case`pointer-down`:case`pointer-drag`:case`pointer-enter`:case`pointer-leave`:case`pointer-up`:case`pointer-move`:case`immediate-click`:case`immediate-double-click`:case`hold`:case`drag`:case`mouse-wheel`:case`double-tap-drag`:case`vertical-two-finger-drag`:return!0;
|
|
2
|
+
import{createScreenPoint as e,createScreenPointArray as t}from"../../core/screenUtils.js";function n(t){return e(t.x,t.y)}function r(e){return t(e.x,e.y)}function i(t,n){let r=(t instanceof HTMLElement?t:t.surface)?.getBoundingClientRect();return r?e(n.clientX-r.left,n.clientY-r.top):e(0,0)}function a(e,t){return t instanceof Event?i(e,t):n(t)}function o(e){if(e instanceof Event)return!0;if(typeof e==`object`&&`type`in e)switch(e.type){case`click`:case`double-click`:case`pointer-down`:case`pointer-drag`:case`pointer-enter`:case`pointer-leave`:case`pointer-up`:case`pointer-move`:case`immediate-click`:case`immediate-double-click`:case`hold`:case`drag`:case`mouse-wheel`:case`double-tap-drag`:case`vertical-two-finger-drag`:return!0;default:return!1}return!1}export{r as createScreenPointArrayFromEvent,n as createScreenPointFromEvent,i as createScreenPointFromNativeEvent,a as createScreenPointFromSupportedEvent,o as isSupportedScreenPointEvent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{clamp as e}from"../../core/mathUtils.js";import{createEmptyImageData as t}from"../../core/imageUtils.js";const n=2048;function r(t,n){let{format:r,quality:i,rotation:a,disableDecorations:o}=t||{},s=b(t,n.padding),c=_(t,{width:n.width-s.left-s.right,height:n.height-s.top-s.bottom}),{width:l,height:u}=g(t,c),d=x(r),f=E[d];return{format:d,quality:e(i??f,0,100),area:c,width:l,height:u,rotation:a,disableDecorations:!!o,ignoreBackground:!!t?.ignoreBackground,ignorePadding:!!t?.ignorePadding}}function i(e,t){let n=r(e,t),i=n.area,a=n.width/i.width,o=b(n,t.padding),s=o.left+o.right,c=o.top+o.bottom,l=t.width-s,u=t.height-c,d=Math.floor(l*a+s),f=Math.floor(u*a+c);(d<=0||f<=0)&&(d=i.width,f=i.height);let p=e?.layers??[],m=n.ignoreBackground,h=n.ignorePadding;return{framebufferWidth:d,framebufferHeight:f,region:{x:Math.floor(i.x*a)+o.left,y:Math.floor(i.y*a)+o.top,width:n.width,height:n.height},format:n.format,quality:n.quality,rotation:n.rotation,pixelRatio:a,layers:p,disableDecorations:n.disableDecorations,ignoreBackground:m,ignorePadding:h,olidColor:!1}}function a(e,t,n){let{ctx:r,canvas:i}=s(e,n),a=r.getImageData(0,0,e.width,e.height),o=d(i,t);return c(i),{dataUrl:o,data:a}}function o(e,t){let{ctx:n,canvas:r}=s(e,t),i=n.getImageData(0,0,e.width,e.height);return c(r),i}function s(e,t){let n=l();t.premultipliedAlpha&&C(e),n.width=e.width,n.height=e.height;let r=n.getContext(`2d`,{willReadFrequently:!0});return r.putImageData(e,0,0),t.flipY&&S(r),{ctx:r,canvas:n}}function c(e){e.width=0,e.height=0}function l(){return u??=document.createElement(`canvas`),u}let u=null;function d(e,t){let n=w[t.format],r=t.quality/100;return e.toDataURL(n,r)}function f(t,n){let r=x(t),i=E[r];return{format:r,quality:e(n??i,0,100)}}function p(e,t){return t/Math.max(e[0],e[1])}function m(e,t,n,r=0,i=0,a=e.width-r,o=e.height-i,s=!1){let{data:c}=e,{width:l,height:u,data:d}=t,f=a/l,p=o/u,m=Math.ceil(f/2),h=Math.ceil(p/2),g=e.width;for(let e=0;e<u;e++)for(let t=0;t<l;t++){let a=(t+(s?u-e-1:e)*l)*4,o=0,_=0,v=0,y=0,b=0,x=0,S=(e+.5)*p;for(let a=Math.floor(e*p);a<(e+1)*p;a++){let e=Math.abs(S-(a+.5))/h,s=(t+.5)*f,l=e*e;for(let e=Math.floor(t*f);e<(t+1)*f;e++){let t=Math.abs(s-(e+.5))/m,u=Math.sqrt(l+t*t);if(u>=1)continue;let d=2*u*u*u-3*u*u+1,f=4*(r+e+(i+a)*g);x+=d*c[f+3],_+=d,!n&&c[f+3]<255&&(d=d*c[f+3]/255),v+=d*c[f],y+=d*c[f+1],b+=d*c[f+2],o+=d}}d[a]=v/o,d[a+1]=y/o,d[a+2]=b/o,d[a+3]=x/_}return t}function h(e,t,r){if(!t)return e;let{framebufferWidth:i,framebufferHeight:a,pixelRatio:o,region:s}=e,c=b(e,r),l=c.left+c.right,u=c.top+c.bottom,d=i-l,f=a-u,p=Math.min(8,Math.min((n-l)/d,(n-u)/f));return p<1.5?e:{...e,framebufferWidth:Math.round(d*p)+l,framebufferHeight:Math.round(f*p)+u,pixelRatio:o*p,resample:{region:{x:Math.round((s.x-c.left)*p)+c.left,y:Math.round((s.y-c.top)*p)+c.top,width:Math.round(s.width*p),height:Math.round(s.height*p)},width:i,height:a}}}function g(e,t){if(!e)return t;let n=e.width,r=e.height;if(n!=null&&r!=null)return{width:Math.floor(n),height:Math.floor(r)};if(n==null&&r==null)return t;let i=t.width/t.height;return r==null?{width:Math.floor(n),height:Math.floor(n/i)}:{width:Math.floor(r*i),height:Math.floor(r)}}function _(e,t){let n={x:0,y:0,width:t.width,height:t.height};if(e?.area){e.area.x!=null&&(n.x=Math.floor(e.area.x)),e.area.y!=null&&(n.y=Math.floor(e.area.y));let r=e.area.width==null?null:Math.floor(e.area.width),i=e.area.height==null?null:Math.floor(e.area.height);if(n.width=t.width-n.x,n.height=t.height-n.y,r!=null&&i!=null)n.width=Math.min(n.width,r),n.height=Math.min(n.height,i);else if(r==null&&i!=null){let e=Math.min(n.width,r);n.height=e/n.width*n.height,n.width=e}else if(r!=null&&i==null){let e=Math.min(n.height,i);n.width=e/n.height*n.width,n.height=e}}return v(y(n,e),t)}function v(e,t){let n=Math.floor(Math.max(e.x,0)),r=Math.floor(Math.max(e.y,0)),i={x:n,y:r,width:t.width>0?Math.floor(Math.min(e.width,t.width-n)):e.width,height:t.height>0?Math.floor(Math.min(e.height,t.height-r)):e.height},a=i.width/i.height,o=e.width/e.height;if(o===a)return i;if(o>a){let e=Math.floor(i.width/o),t=i.height-e;return{x:i.x,y:Math.floor(i.y+t/2),width:i.width,height:e}}let s=Math.floor(i.height*o),c=i.width-s;return{x:Math.floor(i.x+c/2),y:i.y,width:s,height:i.height}}function y(e,t){if(t?.width==null||t.height==null)return e;let n=t.width/t.height,r=e.width>0&&e.height>0?e.width/e.height:0;if(r===0)return e.x=0,e.y=0,e.width=Math.floor(t.width),e.height=Math.floor(t.height),e;if(r===n)return e;if(r<n){let t=Math.floor(e.height*n);return e.x-=(t-e.width)/2,e.width=t,e}let i=Math.floor(e.width/n);return e.y-=(i-e.height)/2,e.height=i,e}function b(e,t){return!t||e?.ignorePadding?D:t}function x(e){switch(e){case`png`:case`jpg`:case`jpeg`:return e;case null:case void 0:
|
|
2
|
+
import{clamp as e}from"../../core/mathUtils.js";import{createEmptyImageData as t}from"../../core/imageUtils.js";const n=2048;function r(t,n){let{format:r,quality:i,rotation:a,disableDecorations:o}=t||{},s=b(t,n.padding),c=_(t,{width:n.width-s.left-s.right,height:n.height-s.top-s.bottom}),{width:l,height:u}=g(t,c),d=x(r),f=E[d];return{format:d,quality:e(i??f,0,100),area:c,width:l,height:u,rotation:a,disableDecorations:!!o,ignoreBackground:!!t?.ignoreBackground,ignorePadding:!!t?.ignorePadding}}function i(e,t){let n=r(e,t),i=n.area,a=n.width/i.width,o=b(n,t.padding),s=o.left+o.right,c=o.top+o.bottom,l=t.width-s,u=t.height-c,d=Math.floor(l*a+s),f=Math.floor(u*a+c);(d<=0||f<=0)&&(d=i.width,f=i.height);let p=e?.layers??[],m=n.ignoreBackground,h=n.ignorePadding;return{framebufferWidth:d,framebufferHeight:f,region:{x:Math.floor(i.x*a)+o.left,y:Math.floor(i.y*a)+o.top,width:n.width,height:n.height},format:n.format,quality:n.quality,rotation:n.rotation,pixelRatio:a,layers:p,disableDecorations:n.disableDecorations,ignoreBackground:m,ignorePadding:h,olidColor:!1}}function a(e,t,n){let{ctx:r,canvas:i}=s(e,n),a=r.getImageData(0,0,e.width,e.height),o=d(i,t);return c(i),{dataUrl:o,data:a}}function o(e,t){let{ctx:n,canvas:r}=s(e,t),i=n.getImageData(0,0,e.width,e.height);return c(r),i}function s(e,t){let n=l();t.premultipliedAlpha&&C(e),n.width=e.width,n.height=e.height;let r=n.getContext(`2d`,{willReadFrequently:!0});return r.putImageData(e,0,0),t.flipY&&S(r),{ctx:r,canvas:n}}function c(e){e.width=0,e.height=0}function l(){return u??=document.createElement(`canvas`),u}let u=null;function d(e,t){let n=w[t.format],r=t.quality/100;return e.toDataURL(n,r)}function f(t,n){let r=x(t),i=E[r];return{format:r,quality:e(n??i,0,100)}}function p(e,t){return t/Math.max(e[0],e[1])}function m(e,t,n,r=0,i=0,a=e.width-r,o=e.height-i,s=!1){let{data:c}=e,{width:l,height:u,data:d}=t,f=a/l,p=o/u,m=Math.ceil(f/2),h=Math.ceil(p/2),g=e.width;for(let e=0;e<u;e++)for(let t=0;t<l;t++){let a=(t+(s?u-e-1:e)*l)*4,o=0,_=0,v=0,y=0,b=0,x=0,S=(e+.5)*p;for(let a=Math.floor(e*p);a<(e+1)*p;a++){let e=Math.abs(S-(a+.5))/h,s=(t+.5)*f,l=e*e;for(let e=Math.floor(t*f);e<(t+1)*f;e++){let t=Math.abs(s-(e+.5))/m,u=Math.sqrt(l+t*t);if(u>=1)continue;let d=2*u*u*u-3*u*u+1,f=4*(r+e+(i+a)*g);x+=d*c[f+3],_+=d,!n&&c[f+3]<255&&(d=d*c[f+3]/255),v+=d*c[f],y+=d*c[f+1],b+=d*c[f+2],o+=d}}d[a]=v/o,d[a+1]=y/o,d[a+2]=b/o,d[a+3]=x/_}return t}function h(e,t,r){if(!t)return e;let{framebufferWidth:i,framebufferHeight:a,pixelRatio:o,region:s}=e,c=b(e,r),l=c.left+c.right,u=c.top+c.bottom,d=i-l,f=a-u,p=Math.min(8,Math.min((n-l)/d,(n-u)/f));return p<1.5?e:{...e,framebufferWidth:Math.round(d*p)+l,framebufferHeight:Math.round(f*p)+u,pixelRatio:o*p,resample:{region:{x:Math.round((s.x-c.left)*p)+c.left,y:Math.round((s.y-c.top)*p)+c.top,width:Math.round(s.width*p),height:Math.round(s.height*p)},width:i,height:a}}}function g(e,t){if(!e)return t;let n=e.width,r=e.height;if(n!=null&&r!=null)return{width:Math.floor(n),height:Math.floor(r)};if(n==null&&r==null)return t;let i=t.width/t.height;return r==null?{width:Math.floor(n),height:Math.floor(n/i)}:{width:Math.floor(r*i),height:Math.floor(r)}}function _(e,t){let n={x:0,y:0,width:t.width,height:t.height};if(e?.area){e.area.x!=null&&(n.x=Math.floor(e.area.x)),e.area.y!=null&&(n.y=Math.floor(e.area.y));let r=e.area.width==null?null:Math.floor(e.area.width),i=e.area.height==null?null:Math.floor(e.area.height);if(n.width=t.width-n.x,n.height=t.height-n.y,r!=null&&i!=null)n.width=Math.min(n.width,r),n.height=Math.min(n.height,i);else if(r==null&&i!=null){let e=Math.min(n.width,r);n.height=e/n.width*n.height,n.width=e}else if(r!=null&&i==null){let e=Math.min(n.height,i);n.width=e/n.height*n.width,n.height=e}}return v(y(n,e),t)}function v(e,t){let n=Math.floor(Math.max(e.x,0)),r=Math.floor(Math.max(e.y,0)),i={x:n,y:r,width:t.width>0?Math.floor(Math.min(e.width,t.width-n)):e.width,height:t.height>0?Math.floor(Math.min(e.height,t.height-r)):e.height},a=i.width/i.height,o=e.width/e.height;if(o===a)return i;if(o>a){let e=Math.floor(i.width/o),t=i.height-e;return{x:i.x,y:Math.floor(i.y+t/2),width:i.width,height:e}}let s=Math.floor(i.height*o),c=i.width-s;return{x:Math.floor(i.x+c/2),y:i.y,width:s,height:i.height}}function y(e,t){if(t?.width==null||t.height==null)return e;let n=t.width/t.height,r=e.width>0&&e.height>0?e.width/e.height:0;if(r===0)return e.x=0,e.y=0,e.width=Math.floor(t.width),e.height=Math.floor(t.height),e;if(r===n)return e;if(r<n){let t=Math.floor(e.height*n);return e.x-=(t-e.width)/2,e.width=t,e}let i=Math.floor(e.width/n);return e.y-=(i-e.height)/2,e.height=i,e}function b(e,t){return!t||e?.ignorePadding?D:t}function x(e){switch(e){case`png`:case`jpg`:case`jpeg`:return e;case null:case void 0:default:return T}}function S(e){e.save(),e.globalCompositeOperation=`copy`,e.scale(1,-1),e.translate(0,-e.canvas.height),e.drawImage(e.canvas,0,0),e.restore()}function C(e){let t=e.data,n=t.length;for(let e=0;e<n;e+=4){let n=t[e+3];if(n!==255&&n>0){let r=255/n;t[e]=t[e]*r,t[e+1]=t[e+1]*r,t[e+2]=t[e+2]*r}}}const w={png:`image/png`,jpg:`image/jpeg`,jpeg:`image/jpeg`},T=`png`,E={png:100,jpg:98,jpeg:98},D={top:0,right:0,bottom:0,left:0};export{r as completeUserSettings,t as createEmptyImageData,a as encode,o as encodeData,f as getFormatAndQuality,p as getMaximumResolutionScale,m as resampleHermite,h as screenshotSuperSampleSettings,d as toDataUrl,i as toRenderSettings};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{whenOnce as e}from"../../core/reactiveUtils.js";import{debug as t}from"../../core/scheduling.js";import{dispatch as n}from"../../core/accessorSupport/watch.js";async function r(r){switch(r.type){case`2d`:
|
|
2
|
+
import{whenOnce as e}from"../../core/reactiveUtils.js";import{debug as t}from"../../core/scheduling.js";import{dispatch as n}from"../../core/accessorSupport/watch.js";async function r(r){switch(r.type){case`2d`:case`3d`:n(),t.dispatch(),await e(()=>r.fatalError||!r.updating).then(()=>i(r))}if(r.fatalError)throw r.fatalError}function i(e){if(e.updating||e.fatalError!=null)return;let t=e.type===`3d`?e.resourceController?.scheduler?.test?.getRunning()??null:null;if(t!=null)throw Error(`View is not updating, but scheduler is running:${t} at ${Error().stack}`)}export{r as default};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{getKey as e}from"../../core/object.js";import{AllocationTracer as t}from"./AllocationTracer.js";import{ResourceType as n}from"./enums.js";const r={RECORD_ALLOCATIONS:!1};class i{constructor(){for(this._current=[],this._allocations=r.RECORD_ALLOCATIONS?new t(`
|
|
2
|
+
import{getKey as e}from"../../core/object.js";import{AllocationTracer as t}from"./AllocationTracer.js";import{ResourceType as n}from"./enums.js";const r={RECORD_ALLOCATIONS:!1};class i{constructor(){for(this._current=[],this._allocations=r.RECORD_ALLOCATIONS?new t(`InstanceCounter`):null;this._current.length<n.COUNT;)this._current.push(0)}increment(e,t,n=1){this._current[e]+=n,this._allocations?.add(t)}decrement(e,t,n=1){this._current[e]-=n,this._allocations?.remove(t)}get current(){return this._current}get total(){return this.current.reduce((e,t,r)=>e+(r<n.UNCOUNTED?t:0),0)}get resourceInformation(){let t=``;if(this.total>0){t+=`Live objects:
|
|
3
3
|
`;for(let r=0;r<n.COUNT;++r){let i=this._current[r];i>0&&(t+=`${e(n,r)}: ${i}\n`)}}return t+=this._allocations?.resetLog(),t}}export{i as InstanceCounter,r as test};
|
package/views/webgl/Program.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import{numbersEquals as e}from"../../core/arrayUtils.js";import has from"../../core/has.js";import{webglValidateShadersEnabled as t,webglDebugEnabled as n}from"./checkWebGLError.js";import{ResourceType as r}from"./enums.js";import{transpileShader as i}from"./ShaderTranspiler.js";const a=!!has(`esri-tests-disable-gpu-memory-measurements`);class o{constructor(e,n,o,c,l=new Map,u=[]){this._context=e,this._compiled=!1,this._linesOfCode=0,this._nameToUniformLocation=new Map,this._nameToUniform1=new Map,this._nameToUniform1v=new Map,this._nameToUniform2=new Map,this._nameToUniform3=new Map,this._nameToUniform4=new Map,this._nameToUniformMatrix3=new Map,this._nameToUniformMatrix4=new Map,e||console.error(`RenderingContext isn't initialized!`),n.length===0&&console.error(`Shaders source should not be empty!`),n=i(n,35633),o=i(o,35632),this._vShader=s(this._context,35633,n),this._fShader=s(this._context,35632,o),d.enabled&&(this._linesOfCode=n.match(/\n/g).length+o.match(/\n/g).length+2,e.instanceCounter.increment(r.LinesOfCode,this._vShader,this._linesOfCode)),this._vShader&&this._fShader||console.error(`Error loading shaders!`),e.instanceCounter.increment(r.Shader,this),t()&&(this.vertexShader=n,this.fragmentShader=o),this.usedMemory=a?0:n.length+o.length;let f=this._context.gl,p=f.createProgram();f.attachShader(p,this._vShader),f.attachShader(p,this._fShader),c.forEach((e,t)=>f.bindAttribLocation(p,e,t)),this.hasTransformFeedbackVaryings=!!u?.length,this.hasTransformFeedbackVaryings&&f.transformFeedbackVaryings(p,u,f.SEPARATE_ATTRIBS),f.linkProgram(p),t()&&!f.getProgramParameter(p,f.LINK_STATUS)&&console.error(`Could not link shader
|
|
3
|
-
validated: ${f.getProgramParameter(p,f.VALIDATE_STATUS)}, gl error ${f.getError()}, vertex: ${f.getShaderParameter(this._vShader,f.COMPILE_STATUS)}, fragment: ${f.getShaderParameter(this._fShader,f.COMPILE_STATUS)}, info log: ${f.getProgramInfoLog(p)}, vertex source: ${this.vertexShader}, fragment source: ${this.fragmentShader}`);for(let[e,t]of l){let n=f.getUniformBlockIndex(p,e);n<
|
|
3
|
+
validated: ${f.getProgramParameter(p,f.VALIDATE_STATUS)}, gl error ${f.getError()}, vertex: ${f.getShaderParameter(this._vShader,f.COMPILE_STATUS)}, fragment: ${f.getShaderParameter(this._fShader,f.COMPILE_STATUS)}, info log: ${f.getProgramInfoLog(p)}, vertex source: ${this.vertexShader}, fragment source: ${this.fragmentShader}`);for(let[e,t]of l){let n=f.getUniformBlockIndex(p,e);n<0xffffffff&&f.uniformBlockBinding(p,n,t)}this._glName=p,e.instanceCounter.increment(r.Program,this)}get glName(){return this._glName}get hasGLName(){return this._glName!=null}get compiled(){return this._compiled?!0:!this._context.capabilities.parallelShaderCompile||this.glName==null?(this._compiled=!0,!0):(this._compiled=!!this._context.gl.getProgramParameter(this.glName,37297),this._compiled)}dispose(){let e=this._context.gl,t=this._context.instanceCounter;this._nameToUniformLocation.forEach(e=>e&&t.decrement(r.Uniform,e)),this._nameToUniformLocation.clear(),this._vShader&&(this._linesOfCode>0&&(t.decrement(r.LinesOfCode,this._vShader,this._linesOfCode),this._linesOfCode=0),e.deleteShader(this._vShader),this._vShader=null,t.decrement(r.Shader,this)),this._fShader&&=(e.deleteShader(this._fShader),null),this._glName&&(e.deleteProgram(this._glName),this._glName=null,t.decrement(r.Program,this))}_getUniformLocation(e){let t=this._nameToUniformLocation.get(e);if(t!==void 0)return t;if(this.glName){let t=this._context.gl.getUniformLocation(this.glName,e);return this._nameToUniformLocation.set(e,t),t&&this._context.instanceCounter.increment(r.Uniform,t),t}return null}hasUniform(e){return this._getUniformLocation(e)!=null}setUniform1i(e,t,n){f(n,t);let r=this._nameToUniform1.get(e);(r===void 0||t!==r)&&(this._context.gl.uniform1i(this._getUniformLocation(e),t),this._nameToUniform1.set(e,t))}setUniform1iv(e,t,n){p(n,t),u(this._nameToUniform1v,e,t)&&this._context.gl.uniform1iv(this._getUniformLocation(e),t)}setUniform2iv(e,t,n){p(n,t),u(this._nameToUniform2,e,t)&&this._context.gl.uniform2iv(this._getUniformLocation(e),t)}setUniform3iv(e,t,n){p(n,t),u(this._nameToUniform3,e,t)&&this._context.gl.uniform3iv(this._getUniformLocation(e),t)}setUniform4iv(e,t,n){p(n,t),u(this._nameToUniform4,e,t)&&this._context.gl.uniform4iv(this._getUniformLocation(e),t)}setUniform1f(e,t,n){f(n,t);let r=this._nameToUniform1.get(e);(r===void 0||t!==r)&&(this._context.gl.uniform1f(this._getUniformLocation(e),t),this._nameToUniform1.set(e,t))}setUniform1fv(e,t,n){p(n,t),u(this._nameToUniform1v,e,t)&&this._context.gl.uniform1fv(this._getUniformLocation(e),t)}setUniform2f(e,t,n,r){f(r,t,n);let i=this._nameToUniform2.get(e);i===void 0?(this._context.gl.uniform2f(this._getUniformLocation(e),t,n),this._nameToUniform2.set(e,[t,n])):(t!==i[0]||n!==i[1])&&(this._context.gl.uniform2f(this._getUniformLocation(e),t,n),i[0]=t,i[1]=n)}setUniform2fv(e,t,n){p(n,t),u(this._nameToUniform2,e,t)&&this._context.gl.uniform2fv(this._getUniformLocation(e),t)}setUniform3f(e,t,n,r,i){f(i,t,n,r);let a=this._nameToUniform3.get(e);a===void 0?(this._context.gl.uniform3f(this._getUniformLocation(e),t,n,r),this._nameToUniform3.set(e,[t,n,r])):(t!==a[0]||n!==a[1]||r!==a[2])&&(this._context.gl.uniform3f(this._getUniformLocation(e),t,n,r),a[0]=t,a[1]=n,a[2]=r)}setUniform3fv(e,t,n){p(n,t);let r=this._getUniformLocation(e);r!=null&&u(this._nameToUniform3,e,t)&&this._context.gl.uniform3fv(r,t)}setUniform4f(e,t,n,r,i,a){f(a,t,n,r,i);let o=this._nameToUniform4.get(e);o===void 0?(this._context.gl.uniform4f(this._getUniformLocation(e),t,n,r,i),this._nameToUniform4.set(e,[t,n,r,i])):(o===void 0||t!==o[0]||n!==o[1]||r!==o[2]||i!==o[3])&&(this._context.gl.uniform4f(this._getUniformLocation(e),t,n,r,i),o[0]=t,o[1]=n,o[2]=r,o[3]=i)}setUniform4fv(e,t,n){p(n,t);let r=this._getUniformLocation(e);r!=null&&u(this._nameToUniform4,e,t)&&this._context.gl.uniform4fv(r,t)}setUniformMatrix3fv(e,t,n=!1,r){p(r,t);let i=this._getUniformLocation(e);i!=null&&u(this._nameToUniformMatrix3,e,t)&&this._context.gl.uniformMatrix3fv(i,n,t)}setUniformMatrix4fv(e,t,n=!1,r){p(r,t);let i=this._getUniformLocation(e);if(i!=null){let r=this._nameToUniformMatrix4,a=r.get(e),o=!1;if(!a)r.set(e,Array.from(t)),o=!0;else{let n=t.length;if(a.length!==n)r.set(e,Array.from(t)),o=!0;else for(let e=0;e<n;++e){let r=t[e];if(a[e]!==r){for(a[e]=r;e<n;++e)a[e]=t[e];o=!0;break}}}o&&this._context.gl.uniformMatrix4fv(i,n,t)}}setUniformMatrices4fv(e,t,n=!1,r){p(r,t);let i=this._getUniformLocation(e);i!=null&&u(this._nameToUniformMatrix4,e,t)&&this._context.gl.uniformMatrix4fv(i,n,t)}stop(){}}function s(e,n,r){let i=e.gl,a=i.createShader(n);return i.shaderSource(a,r),i.compileShader(a),t()&&!i.getShaderParameter(a,i.COMPILE_STATUS)&&(console.error(`Compile error in ${n===35633?`vertex`:`fragment`} shader`),console.error(i.getShaderInfoLog(a)),console.error(c(r))),a}function c(e){let t=2;return e.replaceAll(`
|
|
4
4
|
`,()=>`
|
|
5
5
|
`+l(t++)+`:`)}function l(e){return e>=1e3?e.toString():(` `+e).slice(-3)}function u(t,n,r){let i=t.get(n);return!e(i,r)&&(t.set(n,Array.from(r)),!0)}const d={enabled:!1},f=n()?(e,...t)=>p(e,t):()=>{},p=n()?(e,t)=>{if(e?.supportsNaN)return;let n=t.length;for(let e=0;e<n;++e){let n=t[e];Number.isNaN(n)&&console.error(`Got ${n} as uniform value from ${Error().stack}`)}}:()=>{};export{o as DisposableProgram,d as test};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
2
|
import has from"../../core/has.js";import e from"../../core/Logger.js";import{disposeMaybe as t}from"../../core/maybe.js";import{after as n}from"../../core/promiseUtils.js";import{Milliseconds as r}from"../../core/time.js";import{webglDebugEnabled as i,checkWebGLError as a,getErrorMessage as o,webglValidateShadersEnabled as s}from"./checkWebGLError.js";import{ContextState as c}from"./ContextState.js";import{baseTextureUnit as l,DrawBufferBack as u,DrawBufferNone as d,ResourceType as f,ColorAttachment0 as p,PrimitiveType as m}from"./enums.js";import{InstanceCounter as h}from"./InstanceCounter.js";import{Parameters as g}from"./Parameters.js";import{ProgramCache as _}from"./ProgramCache.js";import{StateTracker as v}from"./renderState.js";import{Texture as y}from"./Texture.js";import{WebGLDriverTest as b}from"./WebGLDriverTest.js";import{Capabilities as x}from"./capabilities/Capabilities.js";const S=()=>e.getLogger(`esri.views.webgl.RenderingContext`);let C=class{constructor(e,t){this.gl=e,this.instanceCounter=new h,this._programCache=new _(this),this._transformFeedbackRequestInfo=null,this._state=new c,this._numOfDrawCalls=0,this._numOfTriangles=0,this._options=t,this.configure(t)}configure(e){this._options=e,this._capabilities=new x(this.gl,e),this._parameters=new g(this.gl,this._capabilities,e),y.TEXTURE_UNIT_FOR_UPDATES=this._parameters.maxTextureImageUnits-1;let n=this.gl.getParameter(this.gl.VIEWPORT);this._state=new c,this._state.viewport={x:n[0],y:n[1],width:n[2],height:n[3]},this._stateTracker=new v({setBlending:e=>{if(e){this.setBlendingEnabled(!0),this.setBlendEquationSeparate(e.opRgb,e.opAlpha),this.setBlendFunctionSeparate(e.srcRgb,e.dstRgb,e.srcAlpha,e.dstAlpha);let t=e.color;this.setBlendColor(t.r,t.g,t.b,t.a)}else this.setBlendingEnabled(!1)},setCulling:e=>{e?(this.setFaceCullingEnabled(!0),this.setCullFace(e.face),this.setFrontFace(e.mode)):this.setFaceCullingEnabled(!1)},setPolygonOffset:e=>{e?(this.setPolygonOffsetFillEnabled(!0),this.setPolygonOffset(e.factor,e.units)):this.setPolygonOffsetFillEnabled(!1)},setDepthTest:e=>{e?(this.setDepthTestEnabled(!0),this.setDepthFunction(e.func)):this.setDepthTestEnabled(!1)},setStencilTest:e=>{if(e){this.setStencilTestEnabled(!0);let{ref:t,readMask:n,stencilFront:r,stencilBack:i}=e;r.compare===i.compare?this.setStencilFunction(r.compare,t,n):(this.setStencilFunctionSeparate(1028,r.compare,t,n),this.setStencilFunctionSeparate(1029,i.compare,t,n)),r.fail===i.fail&&r.zFail===i.zFail&&r.zPass===i.zPass?this.setStencilOp(r.fail,r.zFail,r.zPass):(this.setStencilOpSeparate(1028,r.fail,r.zFail,r.zPass),this.setStencilOpSeparate(1029,i.fail,i.zFail,i.zPass))}else this.setStencilTestEnabled(!1)},setDepthWrite:e=>{e?(this.setDepthWriteEnabled(!0),this.setDepthRange(e.zNear,e.zFar)):this.setDepthWriteEnabled(!1)},setColorWrite:e=>{e?this.setColorMask(e.r,e.g,e.b,e.a):this.setColorMask(!1,!1,!1,!1)},setStencilWrite:e=>{e?this.setStencilWriteMask(e.mask):this.setStencilWriteMask(0)}}),this.enforceState(),t(this._driverTest),this._driverTest=new b(this)}updateOptions(e){this._options={...this._options,...e},this._parameters=new g(this.gl,this._capabilities,this._options)}dispose(){this._driverTest=t(this._driverTest),this._programCache=t(this._programCache),this.bindVAO(null),this.unbindBuffer(34962),this.unbindBuffer(34963),this.unbindBuffer(35345),this.bindUniformBufferBindingPoints([]),this.unbindBuffer(35051),this.unbindBuffer(35052),this.unbindBuffer(36662),this.unbindBuffer(36663),this._state.textureUnitMap.length=0,this._state.textureUnitSamplerMap.length=0,this._state=null,this._capabilities=null,this._stateTracker=null;let e=i()&&this.instanceCounter.resourceInformation;e&&console.log(e)}get driverTest(){return this._driverTest}get contextAttributes(){return this.gl.getContextAttributes()}get parameters(){return this._parameters}get programCache(){return this._programCache}setPipelineState(e){this._stateTracker.setPipeline(e)}getPipelineState(){return this._stateTracker.getPipelineState()}setBlendingEnabled(e){this._state.blend!==e&&(e===!0?this.gl.enable(this.gl.BLEND):this.gl.disable(this.gl.BLEND),this._state.blend=e,this._stateTracker.invalidateBlending())}externalProgramUpdate(){this._state.program?.stop(),this._state.program=null}externalTextureUnitUpdate(e,t){for(let t=0;t<e.length;++t){let n=e[t];this._state.textureUnitMap[n]=null,this._state.textureUnitSamplerMap[n]=null}t>=0&&(this._state.activeTexture=t)}externalVertexArrayObjectUpdate(){this.gl.bindVertexArray(null),this._state.vertexArrayObject=null,this._state.vertexBuffer=null,this._state.indexBuffer=null}externalVertexBufferUpdate(){this._state.vertexBuffer=null}externalIndexBufferUpdate(){this._state.indexBuffer=null}setBlendColor(e,t,n,r){(e!==this._state.blendColor.r||t!==this._state.blendColor.g||n!==this._state.blendColor.b||r!==this._state.blendColor.a)&&(this.gl.blendColor(e,t,n,r),this._state.blendColor.r=e,this._state.blendColor.g=t,this._state.blendColor.b=n,this._state.blendColor.a=r,this._stateTracker.invalidateBlending())}setBlendFunction(e,t){(e!==this._state.blendFunction.srcRGB||t!==this._state.blendFunction.dstRGB)&&(this.gl.blendFunc(e,t),this._state.blendFunction.srcRGB=e,this._state.blendFunction.srcAlpha=e,this._state.blendFunction.dstRGB=t,this._state.blendFunction.dstAlpha=t,this._stateTracker.invalidateBlending())}setBlendFunctionSeparate(e,t,n,r){(this._state.blendFunction.srcRGB!==e||this._state.blendFunction.srcAlpha!==n||this._state.blendFunction.dstRGB!==t||this._state.blendFunction.dstAlpha!==r)&&(this.gl.blendFuncSeparate(e,t,n,r),this._state.blendFunction.srcRGB=e,this._state.blendFunction.srcAlpha=n,this._state.blendFunction.dstRGB=t,this._state.blendFunction.dstAlpha=r,this._stateTracker.invalidateBlending())}setBlendEquation(e){this._state.blendEquation.mode!==e&&(this.gl.blendEquation(e),this._state.blendEquation.mode=e,this._state.blendEquation.modeAlpha=e,this._stateTracker.invalidateBlending())}setBlendEquationSeparate(e,t){(this._state.blendEquation.mode!==e||this._state.blendEquation.modeAlpha!==t)&&(this.gl.blendEquationSeparate(e,t),this._state.blendEquation.mode=e,this._state.blendEquation.modeAlpha=t,this._stateTracker.invalidateBlending())}setColorMask(e,t,n,r){(this._state.colorMask.r!==e||this._state.colorMask.g!==t||this._state.colorMask.b!==n||this._state.colorMask.a!==r)&&(this.gl.colorMask(e,t,n,r),this._state.colorMask.r=e,this._state.colorMask.g=t,this._state.colorMask.b=n,this._state.colorMask.a=r,this._stateTracker.invalidateColorWrite())}setClearColor(e,t,n,r){(this._state.clearColor.r!==e||this._state.clearColor.g!==t||this._state.clearColor.b!==n||this._state.clearColor.a!==r)&&(this.gl.clearColor(e,t,n,r),this._state.clearColor.r=e,this._state.clearColor.g=t,this._state.clearColor.b=n,this._state.clearColor.a=r)}setFaceCullingEnabled(e){this._state.faceCulling!==e&&(e===!0?this.gl.enable(this.gl.CULL_FACE):this.gl.disable(this.gl.CULL_FACE),this._state.faceCulling=e,this._stateTracker.invalidateCulling())}setPolygonOffsetFillEnabled(e){this._state.polygonOffsetFill!==e&&(e===!0?this.gl.enable(this.gl.POLYGON_OFFSET_FILL):this.gl.disable(this.gl.POLYGON_OFFSET_FILL),this._state.polygonOffsetFill=e,this._stateTracker.invalidatePolygonOffset())}setPolygonOffset(e,t){(this._state.polygonOffset[0]!==e||this._state.polygonOffset[1]!==t)&&(this._state.polygonOffset[0]=e,this._state.polygonOffset[1]=t,this.gl.polygonOffset(e,t),this._stateTracker.invalidatePolygonOffset())}setCullFace(e){this._state.cullFace!==e&&(this.gl.cullFace(e),this._state.cullFace=e,this._stateTracker.invalidateCulling())}setFrontFace(e){this._state.frontFace!==e&&(this.gl.frontFace(e),this._state.frontFace=e,this._stateTracker.invalidateCulling())}setScissorTestEnabled(e){this._state.scissorTest!==e&&(e===!0?this.gl.enable(this.gl.SCISSOR_TEST):this.gl.disable(this.gl.SCISSOR_TEST),this._state.scissorTest=e)}setScissorRect(e,t,n,r){(this._state.scissorRect.x!==e||this._state.scissorRect.y!==t||this._state.scissorRect.width!==n||this._state.scissorRect.height!==r)&&(this.gl.scissor(e,t,n,r),this._state.scissorRect.x=e,this._state.scissorRect.y=t,this._state.scissorRect.width=n,this._state.scissorRect.height=r)}setDepthTestEnabled(e){this._state.depthTest!==e&&(e===!0?this.gl.enable(this.gl.DEPTH_TEST):this.gl.disable(this.gl.DEPTH_TEST),this._state.depthTest=e,this._stateTracker.invalidateDepthTest())}setClearDepth(e){this._state.clearDepth!==e&&(this.gl.clearDepth(e),this._state.clearDepth=e)}setDepthFunction(e){this._state.depthFunction!==e&&(this.gl.depthFunc(e),this._state.depthFunction=e,this._stateTracker.invalidateDepthTest())}setDepthWriteEnabled(e){this._state.depthWrite!==e&&(this.gl.depthMask(e),this._state.depthWrite=e,this._stateTracker.invalidateDepthWrite())}setDepthRange(e,t){(this._state.depthRange.zNear!==e||this._state.depthRange.zFar!==t)&&(this.gl.depthRange(e,t),this._state.depthRange.zNear=e,this._state.depthRange.zFar=t,this._stateTracker.invalidateDepthWrite())}setStencilTestEnabled(e){this._state.stencilTest!==e&&(e===!0?this.gl.enable(this.gl.STENCIL_TEST):this.gl.disable(this.gl.STENCIL_TEST),this._state.stencilTest=e,this._stateTracker.invalidateStencilTest())}setClearStencil(e){e!==this._state.clearStencil&&(this.gl.clearStencil(e),this._state.clearStencil=e)}setStencilFunction(e,t,n){(this._state.stencilFunction.face!==1032||this._state.stencilFunction.func!==e||this._state.stencilFunction.ref!==t||this._state.stencilFunction.mask!==n)&&(this.gl.stencilFunc(e,t,n),this._state.stencilFunction.face=1032,this._state.stencilFunction.func=e,this._state.stencilFunction.ref=t,this._state.stencilFunction.mask=n,this._stateTracker.invalidateStencilTest())}setStencilFunctionSeparate(e,t,n,r){(this._state.stencilFunction.face!==e||this._state.stencilFunction.func!==t||this._state.stencilFunction.ref!==n||this._state.stencilFunction.mask!==r)&&(this.gl.stencilFuncSeparate(e,t,n,r),this._state.stencilFunction.face=e,this._state.stencilFunction.func=t,this._state.stencilFunction.ref=n,this._state.stencilFunction.mask=r,this._stateTracker.invalidateStencilTest())}setStencilWriteMask(e){this._state.stencilWriteMask!==e&&(this.gl.stencilMask(e),this._state.stencilWriteMask=e,this._stateTracker.invalidateStencilWrite())}setStencilOp(e,t,n){(this._state.stencilOperation.face!==1032||this._state.stencilOperation.fail!==e||this._state.stencilOperation.zFail!==t||this._state.stencilOperation.zPass!==n)&&(this.gl.stencilOp(e,t,n),this._state.stencilOperation.face=1032,this._state.stencilOperation.fail=e,this._state.stencilOperation.zFail=t,this._state.stencilOperation.zPass=n,this._stateTracker.invalidateStencilTest())}setStencilOpSeparate(e,t,n,r){(this._state.stencilOperation.face!==e||this._state.stencilOperation.fail!==t||this._state.stencilOperation.zFail!==n||this._state.stencilOperation.zPass!==r)&&(this.gl.stencilOpSeparate(e,t,n,r),this._state.stencilOperation.face=e,this._state.stencilOperation.fail=t,this._state.stencilOperation.zFail=n,this._state.stencilOperation.zPass=r,this._stateTracker.invalidateStencilTest())}setActiveTexture(e,t=!1){let n=this._state.activeTexture;return e>=0&&(t||e!==this._state.activeTexture)&&(this.gl.activeTexture(l+e),this._state.activeTexture=e),n}setDrawBuffers(e){let t=this.drawBuffers;if(t.length===e.length&&t.every((t,n)=>t===e[n]))return t;if(e.length>this.parameters.maxDrawBuffers)return S().error(`Setting more active draw buffers (${e.length}) than GL.MAX_DRAW_BUFFERS allows ( ${this.parameters.maxDrawBuffers}).`),t;let n=this._state.drawFramebuffer,r=n===null;if(r){if(e.length>1)return S().error(`The default framebuffer can only have 1 active draw buffer but was requested with ${e.length}.`),t;if(e[0]!==u&&e[0]!==d)return S().error(`The default framebuffer can only use the constants GL.BACK or GL.NONE as draw buffers but got ${e[0]}`),t}else if(e.includes(u))return S().error(`A framebuffer object can only use the constants GL.COLOR_ATTACHMENTx or GL.NONE as draw buffers.`),t;return this.gl.drawBuffers(e),a(this.gl),r?this._state.drawBuffers.defaultFramebuffer=e:this._state.drawBuffers.fbos.set(n,e),t}get drawBuffers(){let e=this._state.drawFramebuffer;return e===null?this._state.drawBuffers.defaultFramebuffer:this._state.drawBuffers.fbos.get(e)??[]}clear(e,t=255){e&&(e&16384&&this.setColorMask(!0,!0,!0,!0),e&256&&this.setDepthWriteEnabled(!0),e&1024&&this.setStencilWriteMask(t),this.gl.clear(e))}clearFramebuffer(e,t=!1,n=!1){let r=0;if(e){let t=Math.max(1e-13,e[3]);this.setClearColor(e[0],e[1],e[2],t),r|=16384}t&&(r|=256),n===!1?n=0:(n===!0&&(n=255),r|=1024),r&&this.clear(r,n)}clearBuffer(e,t,n=6144,r){this.gl.clearBufferfv(n,e,t,r)}clearBufferInteger(e,t,n=6144,r){this.gl.clearBufferiv(n,e,t,r)}clearBufferUnsignedInteger(e,t,n=6144,r){this.gl.clearBufferuiv(n,e,t,r)}drawArrays(e,t,n){if(this._transformFeedbackRequestInfo){if(e!==this._transformFeedbackRequestInfo.primitiveType)throw Error(`DrawArrays called during transform feedback, but primitiveType does not match that of the current transform feedback request`);if(this._state.program?.hasTransformFeedbackVaryings==null)throw Error(`DrawArrays called during transform feedback, but the shader program was not linked with a transform feedback varying`)}if(i()&&(this._numOfDrawCalls++,this._numOfTriangles+=T(e,n),has(`enable-feature:webgl-debug:textureReadWrite`))){let e=this._state.textureUnitMap;for(let t=0;t<e.length;t++){let n=e[t];if(n!=null&&n===this._state.drawFramebuffer?.colorTexture)throw Error(`Detected readWrite. Texture already bound at index ${t}`)}}this.gl.drawArrays(e,t,n),a(this.gl)}drawArraysInstanced(e,t,n,r){this.gl.drawArraysInstanced(e,t,n,r),a(this.gl)}drawElements(e,t,n,r){if(this._transformFeedbackRequestInfo)throw Error(`Cannot called drawElements during a transform feedback request`);if(i()&&(this._numOfDrawCalls++,this._numOfTriangles+=T(e,t)),this.gl.drawElements(e,t,n,r),i()){let i=o(this.gl);if(i){let a=this.getBoundVAO(),o=a?.indexBuffer,s={indexBuffer:o,vertexBuffers:a?.buffers},c={mode:e,count:t,type:n,offset:r},l=o?.size??0,u=r+t,d=l<u?`. Buffer is too small. Attempted to draw index ${u} of ${l}`:``;S().error(`drawElements: ${i}${d}`,{args:c,vao:s})}}}drawElementsInstanced(e,t,n,r,i){this.gl.drawElementsInstanced(e,t,n,r,i),a(this.gl)}logInfo(){i()&&console.log(`DrawCalls: ${this._numOfDrawCalls}, Triangles: ${this._numOfTriangles}`)}resetInfo(){i()&&(this._numOfDrawCalls=0,this._numOfTriangles=0)}get capabilities(){return this._capabilities}setViewport(e,t,n,r){n=Math.max(Math.round(n),1),r=Math.max(Math.round(r),1);let i=this._state.viewport;(i.x!==e||i.y!==t||i.width!==n||i.height!==r)&&(i.x=e,i.y=t,i.width=n,i.height=r,this.gl.viewport(e,t,n,r))}setViewport4fv(e){this.setViewport(e[0],e[1],e[2],e[3])}restoreViewport({x:e,y:t,width:n,height:r}){this.setViewport(e,t,n,r)}getViewport(){let e=this._state.viewport;return{x:e.x,y:e.y,width:e.width,height:e.height}}useProgram(e){if(this._state.program!==e){if(e&&e.glName==null&&s())throw Error(`Attempting to use disposed or invalid Program`);this._state.program?.stop(),this._state.program=e,this.gl.useProgram(e?.glName??null)}}bindTexture(e,t,n=!1,r=null){(t>=this.parameters.maxTextureImageUnits||t<0)&&S().error(`Input texture unit (${t}) is out of range of available units (0...${this.parameters.maxTextureImageUnits})
|
|
3
3
|
`);let i=this._state.textureUnitMap[t],a=this._state.textureUnitSamplerMap[t],{gl:o}=this;return e?.glName==null?(i!=null&&(this.setActiveTexture(t,n),o.bindTexture(i.descriptor.target,null)),this._state.textureUnitMap[t]=null,a!=null&&(this._state.textureUnitSamplerMap[t]=null,o.bindSampler(t,null)),i):(a!==r&&(o.bindSampler(t,r?.glName??null),this._state.textureUnitSamplerMap[t]=r),!n&&i===e?(e.isDirty&&(this.setActiveTexture(t,n),e.applyChanges()),i):(this.setActiveTexture(t,n),o.bindTexture(e.descriptor.target,e.glName),e.applyChanges(),this._state.textureUnitMap[t]=e,i))}unbindTexture(e){if(e!=null)for(let t=0;t<this.parameters.maxTextureImageUnits;t++)this._state.textureUnitMap[t]===e&&(this.bindTexture(null,t),this._state.textureUnitMap[t]=null)}bindFramebuffer(e,t=!1){let n=E(e);!t&&this._state.readFramebuffer===e&&this._state.drawFramebuffer===e?this.setDrawBuffers(n):e==null?(this.gl.bindFramebuffer(36160,null),this._state.readFramebuffer=this._state.drawFramebuffer=null,this.setDrawBuffers(n)):(e.initializeAndBind(36160),this._state.readFramebuffer=e,this._state.drawFramebuffer=e,this.setDrawBuffers(n))}bindFramebufferSeparate(e,t,n=!1){let r=t===36008,i=r?this._state.readFramebuffer:this._state.drawFramebuffer;(n||i!==e)&&(e==null?this.gl.bindFramebuffer(t,null):e.initializeAndBind(t),r?this._state.readFramebuffer=e??null:(this._state.drawFramebuffer=e??null,this.setDrawBuffers(E(e))))}blitFramebuffer(e,t,n=16384,r=9728,i=0,a=0,o=e.width,s=e.height,c=0,l=0,u=t.width,d=t.height){this.bindFramebufferSeparate(e,36008,!0),this.bindFramebufferSeparate(t,36009,!0),this.gl.blitFramebuffer(i,a,o,s,c,l,u,d,n,r)}bindBuffer(e,t){if(e)switch(t??=e.bufferType,t){case 34962:this._state.vertexBuffer=w(this.gl,e,t,this._state.vertexBuffer);break;case 34963:this._state.indexBuffer=w(this.gl,e,t,this._state.indexBuffer);break;case 35345:this._state.uniformBuffer=w(this.gl,e,t,this._state.uniformBuffer);break;case 35051:this._state.pixelPackBuffer=w(this.gl,e,t,this._state.pixelPackBuffer);break;case 35052:this._state.pixelUnpackBuffer=w(this.gl,e,t,this._state.pixelUnpackBuffer);break;case 36662:this._state.copyReadBuffer=w(this.gl,e,t,this._state.copyReadBuffer);break;case 36663:this._state.copyWriteBuffer=w(this.gl,e,t,this._state.copyWriteBuffer);break;case 35982:this._state.transformFeedbackBuffer=w(this.gl,e,t,this._state.transformFeedbackBuffer)}}bindRenderbuffer(e){let t=this.gl;e||(t.bindRenderbuffer(t.RENDERBUFFER,null),this._state.renderbuffer=null),this._state.renderbuffer!==e&&(t.bindRenderbuffer(t.RENDERBUFFER,e.glName),this._state.renderbuffer=e)}_getBufferBinding(e,t){if(t>=this.parameters.maxUniformBufferBindings||t<0)return S().error(`Uniform buffer binding point (${t}) is out of range (0...${this.parameters.maxUniformBufferBindings})
|
|
4
|
-
`),null;let n=e===35345?this._state.uniformBufferBindingPoints:this._state.transformBufferBindingPoints,r=n[t];return r??(r={buffer:null,offset:0,size:0},n[t]=r),r}bindBufferBase(e,t,n){let r=this._getBufferBinding(e,t);r!=null&&(r.buffer!==n||r.offset!==0||r.size!==0)&&(this.gl.bindBufferBase(e,t,n?n.glName:null),e===35345?this._state.uniformBuffer=n:this._state.transformFeedbackBuffer=n,r.buffer=n,r.offset=0,r.size=0)}bindBufferRange(e,t,n,r,i){let a=this._getBufferBinding(e,t);a!=null&&(a.buffer!==n||a.offset!==r||a.size!==i)&&(r%this._parameters.uniformBufferOffsetAlignment===0?(this.gl.bindBufferRange(e,t,n.glName,r,i),this._state.uniformBuffer=n,a.buffer=n,a.offset=r,a.size=i):S().error(`Uniform buffer binding offset is not a multiple of the context offset alignment`))}bindUniformBufferBindingPoints(e){let t=this._state.uniformBufferBindingPoints,n=Math.max(t.length,e.length);t.length=0;for(let r=0;r<n;r++){let n=e[r];if(n?.buffer!=null){let{buffer:e,offset:t,size:i}=n;t===0&&i===0?this.gl.bindBufferBase(35345,r,e.glName):this.gl.bindBufferRange(35345,r,e.glName,t,i),this._state.uniformBuffer=e}else this.gl.bindBufferBase(35345,r,null),this._state.uniformBuffer=null;r<e.length&&(t[r]=n?{buffer:n.buffer,offset:n.offset,size:n.size}:{buffer:null,offset:0,size:0})}}bindUBO(e,t,n,r){t==null?this.bindBufferBase(35345,e,null):(i()&&(r??t.byteLength)>this._parameters.maxUniformBlockSize&&S().error(`Attempting to bind more data than the maximum uniform block size`),t.initialize(),n!==void 0&&r!==void 0?this.bindBufferRange(35345,e,t.buffer,n,r):this.bindBufferBase(35345,e,t.buffer))}unbindUBO(e){for(let t=0,n=this._state.uniformBufferBindingPoints.length;t<n;t++){let n=this._state.uniformBufferBindingPoints[t];n!=null&&n.buffer===e.buffer&&this.bindBufferBase(35345,t,null)}}unbindBuffer(e){switch(e){case 34962:this._state.vertexBuffer=w(this.gl,null,e,this._state.vertexBuffer);break;case 34963:this._state.indexBuffer=w(this.gl,null,e,this._state.indexBuffer);break;case 35345:this._state.uniformBuffer=w(this.gl,null,e,this._state.uniformBuffer);break;case 35051:this._state.pixelPackBuffer=w(this.gl,null,e,this._state.pixelPackBuffer);break;case 35052:this._state.pixelUnpackBuffer=w(this.gl,null,e,this._state.pixelUnpackBuffer);break;case 36662:this._state.copyReadBuffer=w(this.gl,null,e,this._state.copyReadBuffer);break;case 36663:this._state.copyWriteBuffer=w(this.gl,null,e,this._state.copyWriteBuffer)}}bindVAO(e,t){e==null?(this._state.vertexArrayObject?.unbind(),this._state.vertexArrayObject=null):this._state.vertexArrayObject!==e&&(e.bind(t),this._state.vertexArrayObject=e)}bindTransformFeedback(e){let{gl:t}=this;t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,e.glName)}beginTransformFeedback(e,t){if(this._transformFeedbackRequestInfo)throw Error(`Already in a transform feedback request`);let{gl:n}=this;n.bindTransformFeedback(n.TRANSFORM_FEEDBACK,e.glName),n.beginTransformFeedback(t),this._transformFeedbackRequestInfo={primitiveType:t}}endTransformFeedback(){if(!this._transformFeedbackRequestInfo)throw Error(`Not in a transform feedback request`);let{gl:e}=this;e.endTransformFeedback(),e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,null),this._transformFeedbackRequestInfo=null}async clientWaitAsync(e=r(10),t){let{gl:i}=this,a=i.fenceSync(37143,0);if(!a)throw Error(`Client wait failed, could not create sync object`);this.instanceCounter.increment(f.Sync,a),i.flush();try{let r;do await n(e,null,t),r=i.clientWaitSync(a,0,0);while(r===37147);if(r===37149)throw Error(`Client wait failed`)}finally{this.instanceCounter.decrement(f.Sync,a),i.deleteSync(a)}}get boundFramebuffer(){return this._state.drawFramebuffer}get uniformBufferBindingPoints(){return this._state.uniformBufferBindingPoints.map(e=>e&&{buffer:e.buffer,offset:e.offset,size:e.size})}temporaryBindFramebuffer(e,t,n=!1){let r=this.boundFramebuffer,i={...this._state.viewport};try{this.bindFramebuffer(e,n),e&&this.setViewport(0,0,e.width,e.height),t()}finally{this.bindFramebuffer(r,n),e&&this.setViewport(i.x,i.y,i.width,i.height)}}getBoundVAO(){return this._state.vertexArrayObject}resetState(){this.useProgram(null),this.bindVAO(null),this.bindFramebuffer(null,!0),this.unbindBuffer(34962),this.unbindBuffer(34963),this.unbindBuffer(35345),this.bindUniformBufferBindingPoints([]),this.unbindBuffer(35051),this.unbindBuffer(35052),this.unbindBuffer(36662),this.unbindBuffer(36663);for(let e=0;e<this.parameters.maxTextureImageUnits;++e)this.bindTexture(null,e);this.setBlendingEnabled(!1),this.setBlendFunction(1,0),this.setBlendEquation(32774),this.setBlendColor(0,0,0,0),this.setFaceCullingEnabled(!1),this.setCullFace(1029),this.setFrontFace(2305),this.setPolygonOffsetFillEnabled(!1),this.setPolygonOffset(0,0),this.setScissorTestEnabled(!1),this.setScissorRect(0,0,this.gl.canvas.width,this.gl.canvas.height),this.setDepthTestEnabled(!1),this.setDepthFunction(513),this.setDepthRange(0,1),this.setStencilTestEnabled(!1),this.setStencilFunction(519,0,0),this.setStencilOp(7680,7680,7680),this.setClearColor(0,0,0,0),this.setClearDepth(1),this.setClearStencil(0),this.setColorMask(!0,!0,!0,!0),this.setStencilWriteMask(4294967295),this.setDepthWriteEnabled(!0),this.setViewport(0,0,this.gl.canvas.width,this.gl.canvas.height)}enforceState(){let{gl:e}=this;e.bindVertexArray(null);for(let t=0;t<this.parameters.maxVertexAttributes;t++)e.disableVertexAttribArray(t);this._state.vertexBuffer?e.bindBuffer(this._state.vertexBuffer.bufferType,this._state.vertexBuffer.glName):e.bindBuffer(34962,null),this._state.indexBuffer?e.bindBuffer(this._state.indexBuffer.bufferType,this._state.indexBuffer.glName):e.bindBuffer(34963,null);for(let t=0;t<this._parameters.maxUniformBufferBindings;t++){let n=this._state.uniformBufferBindingPoints[t];if(n!=null){let{buffer:r,offset:i,size:a}=n;r===null?e.bindBufferBase(35345,t,null):i===0&&a===0?e.bindBufferBase(35345,t,r.glName):e.bindBufferRange(35345,t,r.glName,i,a)}}if(this._state.uniformBuffer?e.bindBuffer(this._state.uniformBuffer.bufferType,this._state.uniformBuffer.glName):e.bindBuffer(35345,null),this._state.pixelPackBuffer?e.bindBuffer(this._state.pixelPackBuffer.bufferType,this._state.pixelPackBuffer.glName):e.bindBuffer(35051,null),this._state.pixelUnpackBuffer?e.bindBuffer(this._state.pixelUnpackBuffer.bufferType,this._state.pixelUnpackBuffer.glName):e.bindBuffer(35052,null),this._state.copyReadBuffer?e.bindBuffer(this._state.copyReadBuffer.bufferType,this._state.copyReadBuffer.glName):e.bindBuffer(36662,null),this._state.copyWriteBuffer?e.bindBuffer(this._state.copyWriteBuffer.bufferType,this._state.copyWriteBuffer.glName):e.bindBuffer(36663,null),e.bindFramebuffer(36008,null),e.readBuffer(e.BACK),this._state.readFramebuffer&&(e.bindFramebuffer(36008,this._state.readFramebuffer.glName),e.readBuffer(p)),e.bindFramebuffer(36009,this._state.drawFramebuffer?.glName??null),this._state.drawFramebuffer===null){let t=this._state.drawBuffers.defaultFramebuffer;e.drawBuffers(t??[u])}else{let t=this._state.drawBuffers.fbos.get(this._state.drawFramebuffer);e.drawBuffers(t??[p])}if(this._state.vertexArrayObject){let e=this._state.vertexArrayObject;this._state.vertexArrayObject&&(this._state.vertexArrayObject.unbind(),this._state.vertexArrayObject=null),this.bindVAO(e)}e.useProgram(this._state.program?.glName??null),e.blendColor(this._state.blendColor.r,this._state.blendColor.g,this._state.blendColor.b,this._state.blendColor.a),e.bindRenderbuffer(e.RENDERBUFFER,this._state.renderbuffer?.glName??null),this._state.blend===!0?e.enable(this.gl.BLEND):e.disable(this.gl.BLEND),e.blendEquationSeparate(this._state.blendEquation.mode,this._state.blendEquation.modeAlpha),e.blendFuncSeparate(this._state.blendFunction.srcRGB,this._state.blendFunction.dstRGB,this._state.blendFunction.srcAlpha,this._state.blendFunction.dstAlpha),e.clearColor(this._state.clearColor.r,this._state.clearColor.g,this._state.clearColor.b,this._state.clearColor.a),e.clearDepth(this._state.clearDepth),e.clearStencil(this._state.clearStencil),e.colorMask(this._state.colorMask.r,this._state.colorMask.g,this._state.colorMask.b,this._state.colorMask.a),e.cullFace(this._state.cullFace),e.depthFunc(this._state.depthFunction),e.depthRange(this._state.depthRange.zNear,this._state.depthRange.zFar),this._state.depthTest===!0?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),e.depthMask(this._state.depthWrite),e.frontFace(this._state.frontFace),e.lineWidth(1),this._state.faceCulling===!0?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),e.polygonOffset(this._state.polygonOffset[0],this._state.polygonOffset[1]),this._state.polygonOffsetFill===!0?e.enable(e.POLYGON_OFFSET_FILL):e.disable(e.POLYGON_OFFSET_FILL),e.scissor(this._state.scissorRect.x,this._state.scissorRect.y,this._state.scissorRect.width,this._state.scissorRect.height),this._state.scissorTest===!0?e.enable(e.SCISSOR_TEST):e.disable(e.SCISSOR_TEST),e.stencilFunc(this._state.stencilFunction.func,this._state.stencilFunction.ref,this._state.stencilFunction.mask),e.stencilOpSeparate(this._state.stencilOperation.face,this._state.stencilOperation.fail,this._state.stencilOperation.zFail,this._state.stencilOperation.zPass),this._state.stencilTest===!0?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),e.stencilMask(this._state.stencilWriteMask);for(let t=0;t<this.parameters.maxTextureImageUnits;t++){e.activeTexture(l+t),e.bindTexture(3553,null),e.bindTexture(34067,null),e.bindTexture(32879,null),e.bindTexture(35866,null),e.bindSampler(t,null);let n=this._state.textureUnitMap[t];n!=null&&e.bindTexture(n.descriptor.target,n.glName);let r=this._state.textureUnitSamplerMap[t];r!=null&&e.bindSampler(t,r?.glName)}e.activeTexture(l+this._state.activeTexture);let t=this._state.viewport;e.viewport(t.x,t.y,t.width,t.height),this.resetInfo()}};function w(e,t,n,r){return t?r!==t&&e.bindBuffer(n,t.glName):e.bindBuffer(n,null),t}function T(e,t){switch(e){case m.POINTS:return 2*t;case m.TRIANGLES:return t/3;case m.TRIANGLE_STRIP:return t-2;case m.TRIANGLE_FAN:return t-2;default:return 0}}function E(e){return e?e.colorAttachments.length>0?e.colorAttachments:[d]:[u]}export{C as RenderingContext,E as getFramebufferDrawBuffers};
|
|
4
|
+
`),null;let n=e===35345?this._state.uniformBufferBindingPoints:this._state.transformBufferBindingPoints,r=n[t];return r??(r={buffer:null,offset:0,size:0},n[t]=r),r}bindBufferBase(e,t,n){let r=this._getBufferBinding(e,t);r!=null&&(r.buffer!==n||r.offset!==0||r.size!==0)&&(this.gl.bindBufferBase(e,t,n?n.glName:null),e===35345?this._state.uniformBuffer=n:this._state.transformFeedbackBuffer=n,r.buffer=n,r.offset=0,r.size=0)}bindBufferRange(e,t,n,r,i){let a=this._getBufferBinding(e,t);a!=null&&(a.buffer!==n||a.offset!==r||a.size!==i)&&(r%this._parameters.uniformBufferOffsetAlignment===0?(this.gl.bindBufferRange(e,t,n.glName,r,i),this._state.uniformBuffer=n,a.buffer=n,a.offset=r,a.size=i):S().error(`Uniform buffer binding offset is not a multiple of the context offset alignment`))}bindUniformBufferBindingPoints(e){let t=this._state.uniformBufferBindingPoints,n=Math.max(t.length,e.length);t.length=0;for(let r=0;r<n;r++){let n=e[r];if(n?.buffer!=null){let{buffer:e,offset:t,size:i}=n;t===0&&i===0?this.gl.bindBufferBase(35345,r,e.glName):this.gl.bindBufferRange(35345,r,e.glName,t,i),this._state.uniformBuffer=e}else this.gl.bindBufferBase(35345,r,null),this._state.uniformBuffer=null;r<e.length&&(t[r]=n?{buffer:n.buffer,offset:n.offset,size:n.size}:{buffer:null,offset:0,size:0})}}bindUBO(e,t,n,r){t==null?this.bindBufferBase(35345,e,null):(i()&&(r??t.byteLength)>this._parameters.maxUniformBlockSize&&S().error(`Attempting to bind more data than the maximum uniform block size`),t.initialize(),n!==void 0&&r!==void 0?this.bindBufferRange(35345,e,t.buffer,n,r):this.bindBufferBase(35345,e,t.buffer))}unbindUBO(e){for(let t=0,n=this._state.uniformBufferBindingPoints.length;t<n;t++){let n=this._state.uniformBufferBindingPoints[t];n!=null&&n.buffer===e.buffer&&this.bindBufferBase(35345,t,null)}}unbindBuffer(e){switch(e){case 34962:this._state.vertexBuffer=w(this.gl,null,e,this._state.vertexBuffer);break;case 34963:this._state.indexBuffer=w(this.gl,null,e,this._state.indexBuffer);break;case 35345:this._state.uniformBuffer=w(this.gl,null,e,this._state.uniformBuffer);break;case 35051:this._state.pixelPackBuffer=w(this.gl,null,e,this._state.pixelPackBuffer);break;case 35052:this._state.pixelUnpackBuffer=w(this.gl,null,e,this._state.pixelUnpackBuffer);break;case 36662:this._state.copyReadBuffer=w(this.gl,null,e,this._state.copyReadBuffer);break;case 36663:this._state.copyWriteBuffer=w(this.gl,null,e,this._state.copyWriteBuffer)}}bindVAO(e,t){e==null?(this._state.vertexArrayObject?.unbind(),this._state.vertexArrayObject=null):this._state.vertexArrayObject!==e&&(e.bind(t),this._state.vertexArrayObject=e)}bindTransformFeedback(e){let{gl:t}=this;t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,e.glName)}beginTransformFeedback(e,t){if(this._transformFeedbackRequestInfo)throw Error(`Already in a transform feedback request`);let{gl:n}=this;n.bindTransformFeedback(n.TRANSFORM_FEEDBACK,e.glName),n.beginTransformFeedback(t),this._transformFeedbackRequestInfo={primitiveType:t}}endTransformFeedback(){if(!this._transformFeedbackRequestInfo)throw Error(`Not in a transform feedback request`);let{gl:e}=this;e.endTransformFeedback(),e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,null),this._transformFeedbackRequestInfo=null}async clientWaitAsync(e=r(10),t){let{gl:i}=this,a=i.fenceSync(37143,0);if(!a)throw Error(`Client wait failed, could not create sync object`);this.instanceCounter.increment(f.Sync,a),i.flush();try{let r;do await n(e,null,t),r=i.clientWaitSync(a,0,0);while(r===37147);if(r===37149)throw Error(`Client wait failed`)}finally{this.instanceCounter.decrement(f.Sync,a),i.deleteSync(a)}}get boundFramebuffer(){return this._state.drawFramebuffer}get uniformBufferBindingPoints(){return this._state.uniformBufferBindingPoints.map(e=>e&&{buffer:e.buffer,offset:e.offset,size:e.size})}temporaryBindFramebuffer(e,t,n=!1){let r=this.boundFramebuffer,i={...this._state.viewport};try{this.bindFramebuffer(e,n),e&&this.setViewport(0,0,e.width,e.height),t()}finally{this.bindFramebuffer(r,n),e&&this.setViewport(i.x,i.y,i.width,i.height)}}getBoundVAO(){return this._state.vertexArrayObject}resetState(){this.useProgram(null),this.bindVAO(null),this.bindFramebuffer(null,!0),this.unbindBuffer(34962),this.unbindBuffer(34963),this.unbindBuffer(35345),this.bindUniformBufferBindingPoints([]),this.unbindBuffer(35051),this.unbindBuffer(35052),this.unbindBuffer(36662),this.unbindBuffer(36663);for(let e=0;e<this.parameters.maxTextureImageUnits;++e)this.bindTexture(null,e);this.setBlendingEnabled(!1),this.setBlendFunction(1,0),this.setBlendEquation(32774),this.setBlendColor(0,0,0,0),this.setFaceCullingEnabled(!1),this.setCullFace(1029),this.setFrontFace(2305),this.setPolygonOffsetFillEnabled(!1),this.setPolygonOffset(0,0),this.setScissorTestEnabled(!1),this.setScissorRect(0,0,this.gl.canvas.width,this.gl.canvas.height),this.setDepthTestEnabled(!1),this.setDepthFunction(513),this.setDepthRange(0,1),this.setStencilTestEnabled(!1),this.setStencilFunction(519,0,0),this.setStencilOp(7680,7680,7680),this.setClearColor(0,0,0,0),this.setClearDepth(1),this.setClearStencil(0),this.setColorMask(!0,!0,!0,!0),this.setStencilWriteMask(0xffffffff),this.setDepthWriteEnabled(!0),this.setViewport(0,0,this.gl.canvas.width,this.gl.canvas.height)}enforceState(){let{gl:e}=this;e.bindVertexArray(null);for(let t=0;t<this.parameters.maxVertexAttributes;t++)e.disableVertexAttribArray(t);this._state.vertexBuffer?e.bindBuffer(this._state.vertexBuffer.bufferType,this._state.vertexBuffer.glName):e.bindBuffer(34962,null),this._state.indexBuffer?e.bindBuffer(this._state.indexBuffer.bufferType,this._state.indexBuffer.glName):e.bindBuffer(34963,null);for(let t=0;t<this._parameters.maxUniformBufferBindings;t++){let n=this._state.uniformBufferBindingPoints[t];if(n!=null){let{buffer:r,offset:i,size:a}=n;r===null?e.bindBufferBase(35345,t,null):i===0&&a===0?e.bindBufferBase(35345,t,r.glName):e.bindBufferRange(35345,t,r.glName,i,a)}}if(this._state.uniformBuffer?e.bindBuffer(this._state.uniformBuffer.bufferType,this._state.uniformBuffer.glName):e.bindBuffer(35345,null),this._state.pixelPackBuffer?e.bindBuffer(this._state.pixelPackBuffer.bufferType,this._state.pixelPackBuffer.glName):e.bindBuffer(35051,null),this._state.pixelUnpackBuffer?e.bindBuffer(this._state.pixelUnpackBuffer.bufferType,this._state.pixelUnpackBuffer.glName):e.bindBuffer(35052,null),this._state.copyReadBuffer?e.bindBuffer(this._state.copyReadBuffer.bufferType,this._state.copyReadBuffer.glName):e.bindBuffer(36662,null),this._state.copyWriteBuffer?e.bindBuffer(this._state.copyWriteBuffer.bufferType,this._state.copyWriteBuffer.glName):e.bindBuffer(36663,null),e.bindFramebuffer(36008,null),e.readBuffer(e.BACK),this._state.readFramebuffer&&(e.bindFramebuffer(36008,this._state.readFramebuffer.glName),e.readBuffer(p)),e.bindFramebuffer(36009,this._state.drawFramebuffer?.glName??null),this._state.drawFramebuffer===null){let t=this._state.drawBuffers.defaultFramebuffer;e.drawBuffers(t??[u])}else{let t=this._state.drawBuffers.fbos.get(this._state.drawFramebuffer);e.drawBuffers(t??[p])}if(this._state.vertexArrayObject){let e=this._state.vertexArrayObject;this._state.vertexArrayObject&&(this._state.vertexArrayObject.unbind(),this._state.vertexArrayObject=null),this.bindVAO(e)}e.useProgram(this._state.program?.glName??null),e.blendColor(this._state.blendColor.r,this._state.blendColor.g,this._state.blendColor.b,this._state.blendColor.a),e.bindRenderbuffer(e.RENDERBUFFER,this._state.renderbuffer?.glName??null),this._state.blend===!0?e.enable(this.gl.BLEND):e.disable(this.gl.BLEND),e.blendEquationSeparate(this._state.blendEquation.mode,this._state.blendEquation.modeAlpha),e.blendFuncSeparate(this._state.blendFunction.srcRGB,this._state.blendFunction.dstRGB,this._state.blendFunction.srcAlpha,this._state.blendFunction.dstAlpha),e.clearColor(this._state.clearColor.r,this._state.clearColor.g,this._state.clearColor.b,this._state.clearColor.a),e.clearDepth(this._state.clearDepth),e.clearStencil(this._state.clearStencil),e.colorMask(this._state.colorMask.r,this._state.colorMask.g,this._state.colorMask.b,this._state.colorMask.a),e.cullFace(this._state.cullFace),e.depthFunc(this._state.depthFunction),e.depthRange(this._state.depthRange.zNear,this._state.depthRange.zFar),this._state.depthTest===!0?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),e.depthMask(this._state.depthWrite),e.frontFace(this._state.frontFace),e.lineWidth(1),this._state.faceCulling===!0?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),e.polygonOffset(this._state.polygonOffset[0],this._state.polygonOffset[1]),this._state.polygonOffsetFill===!0?e.enable(e.POLYGON_OFFSET_FILL):e.disable(e.POLYGON_OFFSET_FILL),e.scissor(this._state.scissorRect.x,this._state.scissorRect.y,this._state.scissorRect.width,this._state.scissorRect.height),this._state.scissorTest===!0?e.enable(e.SCISSOR_TEST):e.disable(e.SCISSOR_TEST),e.stencilFunc(this._state.stencilFunction.func,this._state.stencilFunction.ref,this._state.stencilFunction.mask),e.stencilOpSeparate(this._state.stencilOperation.face,this._state.stencilOperation.fail,this._state.stencilOperation.zFail,this._state.stencilOperation.zPass),this._state.stencilTest===!0?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),e.stencilMask(this._state.stencilWriteMask);for(let t=0;t<this.parameters.maxTextureImageUnits;t++){e.activeTexture(l+t),e.bindTexture(3553,null),e.bindTexture(34067,null),e.bindTexture(32879,null),e.bindTexture(35866,null),e.bindSampler(t,null);let n=this._state.textureUnitMap[t];n!=null&&e.bindTexture(n.descriptor.target,n.glName);let r=this._state.textureUnitSamplerMap[t];r!=null&&e.bindSampler(t,r?.glName)}e.activeTexture(l+this._state.activeTexture);let t=this._state.viewport;e.viewport(t.x,t.y,t.width,t.height),this.resetInfo()}};function w(e,t,n,r){return t?r!==t&&e.bindBuffer(n,t.glName):e.bindBuffer(n,null),t}function T(e,t){switch(e){case m.POINTS:return 2*t;case m.TRIANGLES:return t/3;case m.TRIANGLE_STRIP:case m.TRIANGLE_FAN:return t-2;default:return 0}}function E(e){return e?e.colorAttachments.length>0?e.colorAttachments:[d]:[u]}export{C as RenderingContext,E as getFramebufferDrawBuffers};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import e from"../../Viewpoint.js";import t from"../../core/Collection.js";import n from"../../core/Error.js";import r from"../../core/Logger.js";import{geographicToWebMercator as i}from"../../geometry/support/webMercatorUtils.js";import a from"../../portal/Portal.js";import{createForItemRead as o}from"../../portal/support/jsonContext.js";import{project as s}from"../../rest/geometryService/project.js";import c from"../../rest/support/ProjectParameters.js";import{hasWebDocumentAsPrimaryContent as l}from"./utils.js";function u(e,t){return t.resourceInfo?d(t,t.resourceInfo,{origin:e.origin}):t.portalItem?.id?f(e,t,t.portalItem):Promise.resolve()}async function d(e,n,r){let i=[],o={context:{...r,layerContainerType:`operational-layers`}};if(e.portalItem&&(o.context.portal=e.portalItem.portal||a.getDefault()),i.push(import(`../../layers/support/layersCreator.js`).then(({populateOperationalLayers:t})=>{let r=[],i=n.operationalLayers;i?.length&&r.push(t(e.layers,i,o));let a={...o,context:{...o.context,layerContainerType:`tables`},defaultLayerType:`ArcGISFeatureLayer`},s=n.tables;return s?.length&&r.push(t(e.tables,s,a)),Promise.allSettled(r)})),n.utilityNetworks&&`utilityNetworks`in e){let a=n.utilityNetworks;i.push(import(`../../networks/UtilityNetwork.js`).then(({default:n})=>{let i=new(t.ofType(n))(a.map(e=>{let t=new n;return t.read(e,r),t}));e.setAtOrigin(`utilityNetworks`,i,r.origin)}))}if(n.geotriggersInfo&&`geotriggersInfo`in e){let t=n.geotriggersInfo;i.push(import(`../GeotriggersInfo.js`).then(({default:n})=>{let i=new n;i.read(t,r),e.setAtOrigin(`geotriggersInfo`,i,r.origin)}))}if(n.mapIPSInfo&&`ipsInfo`in e){let t=n.mapIPSInfo;i.push(import(`../IPSInfo.js`).then(({default:n})=>{let i=new n;i.read(t,r),e.setAtOrigin(`ipsInfo`,i,r.origin)}))}await Promise.all(i)}async function f(e,t,i){await i.load().catch(t=>{throw new n(`${e.name}:load-portal-item`,`Failed to load portal item`,{error:t})});let a=i.type,s=e.supportedItemTypes;if(!a||!s.has(a))throw new n(`${e.name}:invalid-portal-item`,`Invalid portal item type '${a}', expected one of: '${Array.from(s).join(`', '`)}'`,{type:a});let c,{portalItemResourcePath:u}=t;if(l(i)){if(u)throw new n(`${e.name}:portal-item-resource-path-not-supported`,`'portalItemResourcePath' is not supported when loading a map from '${a}' item`);c=await i.fetchData()}else{if(!u)throw new n(`${e.name}:missing-portal-item-resource-path`,`'portalItemResourcePath' is required to load a map from '${a}' item`);c=await i.resourceFromPath(u).fetch()}t.resourceInfo=c;let d=o(i,e.origin);await p(e,t,c,d),t.resourceReferences={portalItem:i,portalItemResourcePath:u,paths:d.readResourcePaths};let f=await h(t.initialViewProperties,i,r.getLogger(t));if(f){let n=t.initialViewProperties?.clone()??e.createInitialViewProperties();n.viewpoint=f,t.initialViewProperties=n}}function p(e,t,n,r){let i=m(e,n);return t.read(i,r),d(t,i,r)}function m(e,t){let n=e.parseVersion(t.version||``,e.name);return e.currentVersion.validate(n),t.version=`${n.major}.${n.minor}`,t}async function h(t,n,r){if(t?.viewpoint?.targetGeometry)return null;let i=await g(t,n,r);return i?new e({targetGeometry:i}):null}async function g(e,t,n){let r=e?.spatialReference,a=t?.extent;if(!r||!a)return null;if(r.isWGS84)return a.clone();if(r.isWebMercator)return i(a);let{getGeometryServiceURL:o}=await import(`../../portal/support/geometryServiceUtils.js`);try{let e=await o(t),n=new c({geometries:[a],outSpatialReference:r});return(await s(e,n))[0]}catch(e){n.error(`Error projecting item's extent:`,e)}return null}export{u as loadFromSource};
|
|
2
|
+
import e from"../../Viewpoint.js";import t from"../../core/Collection.js";import n from"../../core/Error.js";import r from"../../core/Logger.js";import{geographicToWebMercator as i}from"../../geometry/support/webMercatorUtils.js";import a from"../../portal/Portal.js";import{createForItemRead as o}from"../../portal/support/jsonContext.js";import{project as s}from"../../rest/geometryService/project.js";import c from"../../rest/support/ProjectParameters.js";import{hasWebDocumentAsPrimaryContent as l}from"./utils.js";function u(e,t){return t.resourceInfo?d(t,t.resourceInfo,{origin:e.origin}):t.portalItem?.id?f(e,t,t.portalItem):Promise.resolve()}async function d(e,n,r){let i=[],o={context:{...r,layerContainerType:`operational-layers`}};if(e.portalItem&&(o.context.portal=e.portalItem.portal||a.getDefault()),i.push(import(`../../layers/support/layersCreator.js`).then(({populateOperationalLayers:t})=>{let r=[],i=n.operationalLayers;i?.length&&r.push(t(e.layers,i,o));let a={...o,context:{...o.context,layerContainerType:`tables`},defaultLayerType:`ArcGISFeatureLayer`},s=n.tables;return s?.length&&r.push(t(e.tables,s,a)),Promise.allSettled(r)})),n.utilityNetworks&&`utilityNetworks`in e){let a=n.utilityNetworks;i.push(import(`../../networks/UtilityNetwork.js`).then(({default:n})=>{let i=new(t.ofType(n))(a.map(e=>{let t=new n;return t.read(e,r),t}));e.setAtOrigin(`utilityNetworks`,i,r.origin)}))}if(n.geotriggersInfo&&`geotriggersInfo`in e){let t=n.geotriggersInfo;i.push(import(`../GeotriggersInfo.js`).then(({default:n})=>{let i=new n;i.read(t,r),e.setAtOrigin(`geotriggersInfo`,i,r.origin)}))}if(n.parcelFabric&&`parcelFabric`in e){let t=n.parcelFabric;i.push(import(`../../parcelFabric/ParcelFabric.js`).then(({default:n})=>{let i=new n;i.read(t,r),e.setAtOrigin(`parcelFabric`,i,r.origin)}))}if(n.mapIPSInfo&&`ipsInfo`in e){let t=n.mapIPSInfo;i.push(import(`../IPSInfo.js`).then(({default:n})=>{let i=new n;i.read(t,r),e.setAtOrigin(`ipsInfo`,i,r.origin)}))}await Promise.all(i)}async function f(e,t,i){await i.load().catch(t=>{throw new n(`${e.name}:load-portal-item`,`Failed to load portal item`,{error:t})});let a=i.type,s=e.supportedItemTypes;if(!a||!s.has(a))throw new n(`${e.name}:invalid-portal-item`,`Invalid portal item type '${a}', expected one of: '${Array.from(s).join(`', '`)}'`,{type:a});let c,{portalItemResourcePath:u}=t;if(l(i)){if(u)throw new n(`${e.name}:portal-item-resource-path-not-supported`,`'portalItemResourcePath' is not supported when loading a map from '${a}' item`);c=await i.fetchData()}else{if(!u)throw new n(`${e.name}:missing-portal-item-resource-path`,`'portalItemResourcePath' is required to load a map from '${a}' item`);c=await i.resourceFromPath(u).fetch()}t.resourceInfo=c;let d=o(i,e.origin);await p(e,t,c,d),t.resourceReferences={portalItem:i,portalItemResourcePath:u,paths:d.readResourcePaths};let f=await h(t.initialViewProperties,i,r.getLogger(t));if(f){let n=t.initialViewProperties?.clone()??e.createInitialViewProperties();n.viewpoint=f,t.initialViewProperties=n}}function p(e,t,n,r){let i=m(e,n);return t.read(i,r),d(t,i,r)}function m(e,t){let n=e.parseVersion(t.version||``,e.name);return e.currentVersion.validate(n),t.version=`${n.major}.${n.minor}`,t}async function h(t,n,r){if(t?.viewpoint?.targetGeometry)return null;let i=await g(t,n,r);return i?new e({targetGeometry:i}):null}async function g(e,t,n){let r=e?.spatialReference,a=t?.extent;if(!r||!a)return null;if(r.isWGS84)return a.clone();if(r.isWebMercator)return i(a);let{getGeometryServiceURL:o}=await import(`../../portal/support/geometryServiceUtils.js`);try{let e=await o(t),n=new c({geometries:[a],outSpatialReference:r});return(await s(e,n))[0]}catch(e){n.error(`Error projecting item's extent:`,e)}return null}export{u as loadFromSource};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__addDisposableResource as e,__disposeResources as t}from"tslib";import n from"../../Basemap.js";import r from"../../Ground.js";import i from"../../WebScene.js";import{isLongFormType as a,Null as o,Integer as s}from"../../core/accessorSupport/ensureType.js";import{isCollection as c}from"../../core/accessorSupport/extensions/serializableProperty/type.js";import l from"../../layers/GroupLayer.js";import u from"../../layers/KMLLayer.js";import{layerTypeMapForReadContext as d}from"../../layers/support/layersMapping.js";import f from"../../layers/support/Sublayer.js";import p from"../../rest/layerSources/DynamicDataLayer.js";import m from"../../rest/layerSources/DynamicMapLayer.js";import h from"../../rest/layerSources/JoinTableDataSource.js";import g from"../InitialViewProperties.js";import{ScanContext as _,sorted as v}from"./utils.js";import{webSceneAnalysisRegistry as y}from"../support/analysisUtils.js";import b from"../support/SlideElements.js";async function x(n){let r={stack:[],error:void 0,hasError:!1};try{let t=e(r,new _,!1);return await A(null,{typeName:`json`,type:n},void 0,t)}catch(e){r.error=e,r.hasError=!0}finally{t(r)}}async function S(e,t,n,r){switch(t.typeName){case`array`:await T(e,t,n,r);break;case`union`:await D(e,t,n,r);break;case`json`:await A(e,t,n,r);break;case`native`:await C(e,t,n,r);break;case`enum`:await w(e,t,n,r)}}async function C(e,t,n,r){let i=n??t;r.addProperty({name:e,type:N(r,t),default:i.default,required:i.isRequired,nullable:i.nullable})}async function w(e,t,n,r){let i=n??t;r.currentClass?.typeValue&&e===`type`?r.addProperty({name:e,type:`string`,enum:`"${r.currentClass.typeValue}"`,default:i.default,required:i.isRequired,nullable:i.nullable}):r.addProperty({name:e,type:N(r,t),enum:v(t.values).map(e=>typeof e==`string`?`"${e}"`:`${e}`).join(`|`),default:i.default,required:i.isRequired,nullable:i.nullable})}async function T(e,t,n,r){t.elementType.isRequired=t.isRequired,await S(`${e}[]`,t.elementType,n??t.elementType,r)}function E(e,t){if(e.typeName===`json`){let t=e.type.__accessorMetadata__?.type,n=(t&&K(t))?.type,r=n||t?.type;if(r&&Array.isArray(r)&&r.length===1&&typeof r[0]==`string`)return n?r[0]:B(t,r[0])}return t}async function D(e,t,n,r){let i=[],a=n??t;for(let a of t.types)a.type.typeName===`native`||!t.key?i.push(a.type):await S(`${e}<${E(a.type,a.value)}>`,a.type,n??t,r);if(i.length){let t=v(i.map(e=>N(r,e)));r.addProperty({type:t.join(`|`),name:e,default:a.default,required:a.isRequired,nullable:a.nullable})}}async function O(e,t){return e.type===i&&t===`layers`?M(`web-scene`,`operational-layers`):e.type===i&&t===`tables`?M(`web-scene`,`tables`):e.type===n&&(t===`baseLayers`||t===`baseMapLayers`)?M(`web-scene`,`basemap-base-layers`):e.type===n&&t===`groundLayers`?M(`web-scene`,`basemap-ground-layers`):e.type===n&&t===`elevationLayers`||e.type===r&&t===`layers`?M(`web-scene`,`ground`):e.type===l&&t===`layers`?M(`web-scene`,`operational-layers`,e=>e!==l):(e.type===b||e.type===g)&&t===`analyses`?{typeName:`array`,elementType:{typeName:`union`,key:`type`,types:await Promise.all(Object.entries(y).map(async([e,t])=>({type:{typeName:`json`,type:await t()},value:e})))}}:e.type===h&&(t===`leftTableSource`||t===`rightTableSource`)?R({},{key:`type`,base:null,typeMap:{"data-layer":p,"map-layer":m}}):null}async function k(e,t,n){let r=L(n),i=await O(e,t);return i?(i.isRequired=r.isRequired,i.nullable=r.nullable,i.default=r.default,i):r}async function A(e,t,n,r){let i=t.type.__accessorMetadata__,a=r.getDeclaredClass(t.type);if(!i)return e&&r.addProperty({name:e,type:`unknown`}),null;let o=a,s=null;t.layerContainerType&&(o+=`--${t.layerContainerType}`);let c=e?.match(/<([^>]+)>$/);c&&(o+=`--${c[1]}`,s=c[1]);let l=n??t;t.type===f&&(o+=`--${r.currentClass?.name}`,s=r.currentClass?.name);let u=r.seen.get(o);if(u&&e)return r.addProperty({name:e,type:u,required:l.isRequired,default:l.default,nullable:l.nullable}),u;let d={type:t.type,name:a,id:o,properties:[]};e&&(r.addProperty({name:e,type:d,required:l.isRequired,default:l.default,nullable:l.nullable}),d.typeValue=s),r.push(e,d);for(let e in i){let n=i[e],a=q(n);if(!a?.enabled||a.layerContainerTypes&&t.layerContainerType&&!a.layerContainerTypes.includes(t.layerContainerType))continue;if(t.type===f){let e=r.stack[r.stack.length-2].klass.name===`esri/layers/TileLayer`;if(e&&f.test.isMapImageLayerOverridePolicy(a.overridePolicy)||!e&&f.test.isTileImageLayerOverridePolicy(a.overridePolicy))continue}let o=a.target;if(typeof o==`string`||o==null){let i=await k(t,e,n);if(!i)continue;await S(typeof o==`string`?o:e,i,void 0,r)}else await j(t,o,r)}return r.pop()}async function j(e,t,n){for(let r in t){let i=await O(e,r);if(!i){let e=t[r];i=e.types?R({default:e.default,write:e},e.types):H(e.type),i.default=e.default,i.isRequired=e.isRequired,i.nullable=e.allowNull,i=I(i)}await S(r,i,void 0,n)}}async function M(e,t,n){let r={typeName:`union`,key:`layerType`,types:[]},i=d({origin:e,layerContainerType:t});for(let e of Object.keys(i||{})){if(t===`operational-layers`&&e===`ArcGISTiledElevationServiceLayer`)continue;let i=await J[e]();i&&(!n||n(i))&&i!==u&&r.types.push({type:{typeName:`json`,layerContainerType:t,type:i},value:e})}return r.types.length===0?null:{typeName:`array`,elementType:r.types.length===1?r.types[0].type:r}}function N(e,t){switch(t.typeName){case`array`:return`${N(e,t.elementType)}[]`;case`union`:return`${v(t.types.map(t=>N(e,t.type))).join(` | `)}`;case`native`:switch(t.type){case Number:return`number`;case s:return`integer`;case String:return`string`;case Boolean:return`boolean`;case Object:return`object`;default:return`unknown`}case`json`:return e.getDeclaredClass(t.type);case`enum`:return`string`}}function P(e){let t=e.prototype.itemType?.Type;if(!t)return{typeName:`array`,elementType:{typeName:`native`,type:null}};if(typeof t==`function`)return{typeName:`array`,elementType:H(t)};if(t.typeMap){let e=[];for(let n in t.typeMap){let r=t.typeMap[n];e.push({type:H(r),value:G(r)?null:n})}return{typeName:`array`,elementType:{typeName:`union`,key:typeof t.key==`string`?t.key:`type`,types:e}}}}function F(e){if(e.typeName!==`json`)return null;let t=e.type.__accessorMetadata__?.type,n=(t&&K(t))?.type,r=n||t?.type;return!r||!Array.isArray(r)||typeof r[0]!=`string`?null:n||t.type.map(e=>B(t,e))}function I(e){if(e.typeName===`array`)return e.elementType=I(e.elementType),e;let t=F(e);return t?{typeName:`union`,key:`type`,nullable:e.nullable,isRequired:e.isRequired,types:t.map(t=>({value:t,type:e}))}:e}function L(e){let t=K(e);return t?.types?R(t,t.types):!t?.type&&e.types?R(t,e.types):I(V(e))}function R(e,t){if(Array.isArray(t))return{typeName:`array`,elementType:R(e,t[0])};let n=[];for(let e in t.typeMap){let r=t.typeMap[e];n.push({type:H(r),value:G(r)?null:e})}return{typeName:`union`,key:typeof t.key==`string`?t.key:`type`,types:n,nullable:e?.write?.allowNull,isRequired:e?.write?.isRequired,default:e?.default}}function z(e){return e!=null&&e.isJSONMapWriter}function B(e,t){let n=q(e);if(n&&z(n.writer)){let e={value:``};return n.writer?.(t,e,`value`),e.value}return t}function V(e){let t=K(e),n=q(e),r=t?.type,i=H(r||e.type);return t?.default!==void 0&&typeof t.default!=`function`&&(i.default=B(e,t.default)),n?.allowNull&&(i.nullable=!0),n?.isRequired&&(i.isRequired=!0),i}function H(e){if(!e)return{typeName:`native`,type:null};if(a(e))return U(e);if(Array.isArray(e)){if(typeof e[0]==`string`||typeof e[0]==`number`)return{typeName:`enum`,values:e};if(e.length>1){let t=[],n;for(let r of e)r===o?n=!0:t.push({type:H(r),value:null});return t.length===1?{...t[0].type,nullable:n}:{typeName:`union`,key:null,types:t,nullable:n}}return{typeName:`array`,elementType:H(e[0])}}return c(e)?P(e):G(e)?{typeName:`native`,type:e}:W(e)?{typeName:`json`,type:e}:{typeName:`native`,type:null}}function U(e){switch(e.type){case`native`:return{typeName:`native`,type:e.value};case`array`:return{typeName:`array`,elementType:H(e.value)};case`one-of`:return{typeName:`union`,key:null,types:e.values.map(e=>({type:U(e),value:null}))}}}function W(e){let t=e;for(;t;){if(t.prototype&&(t.prototype.declaredClass===`esri.core.JSONSupport`||t.prototype.declaredClass===`esri.core.MultiOriginJSONSupport`))return!0;t=Object.getPrototypeOf(t)}return!1}function G(e){return e===String||e===Boolean||e===Number||e===s||e===Object||e===o}function K(e){if(!e.json)return null;let t=e.json.origins,n=e.json,r=t?.[`web-scene`],i=t?.[`web-document`];return r||i||n||null}function q(e){if(!e.json)return null;let t=e.json.origins,n=e.json.write,r=t?.[`web-scene`]?.write,i=t?.[`web-document`]?.write;return r||i||n||null}const J={ArcGISAnnotationLayer:()=>Promise.resolve(null),ArcGISDimensionLayer:async()=>(await import(`../../layers/DimensionLayer.js`)).default,ArcGISFeatureLayer:async()=>(await import(`../../layers/FeatureLayer.js`)).default,ArcGISImageServiceLayer:async()=>(await import(`../../layers/ImageryLayer.js`)).default,ArcGISImageServiceVectorLayer:()=>Promise.resolve(null),ArcGISMapServiceLayer:async()=>(await import(`../../layers/MapImageLayer.js`)).default,ArcGISSceneServiceLayer:async()=>(await import(`../../layers/SceneLayer.js`)).default,ArcGISStreamLayer:async()=>(await import(`../../layers/StreamLayer.js`)).default,ArcGISTiledElevationServiceLayer:async()=>(await import(`../../layers/ElevationLayer.js`)).default,ArcGISTiledImageServiceLayer:async()=>(await import(`../../layers/ImageryTileLayer.js`)).default,ArcGISTiledMapServiceLayer:async()=>(await import(`../../layers/TileLayer.js`)).default,ArcGISVideoLayer:async()=>(await import(`../../layers/VideoLayer.js`)).default,BingMapsAerial:async()=>(await import(`../../layers/BingMapsLayer.js`)).default,BingMapsRoad:async()=>(await import(`../../layers/BingMapsLayer.js`)).default,BingMapsHybrid:async()=>(await import(`../../layers/BingMapsLayer.js`)).default,BuildingSceneLayer:async()=>(await import(`../../layers/BuildingSceneLayer.js`)).default,CatalogLayer:async()=>(await import(`../../layers/CatalogLayer.js`)).default,CSV:async()=>(await import(`../../layers/CSVLayer.js`)).default,GaussianSplatLayer:async()=>(await import(`../../layers/GaussianSplatLayer.js`)).default,GeoRSS:async()=>(await import(`../../layers/GeoRSSLayer.js`)).default,GeoJSON:async()=>(await import(`../../layers/GeoJSONLayer.js`)).default,GroupLayer:async()=>(await import(`../../layers/GroupLayer.js`)).default,IntegratedMeshLayer:async()=>(await import(`../../layers/IntegratedMeshLayer.js`)).default,KML:async()=>(await import(`../../layers/KMLLayer.js`)).default,KnowledgeGraphLayer:async()=>(await import(`../../layers/KnowledgeGraphLayer.js`)).default,MediaLayer:async()=>(await import(`../../layers/MediaLayer.js`)).default,LineOfSightLayer:async()=>(await import(`../../layers/LineOfSightLayer.js`)).default,LinkChartLayer:()=>Promise.resolve(null),OGCFeatureLayer:async()=>(await import(`../../layers/OGCFeatureLayer.js`)).default,OpenStreetMap:async()=>(await import(`../../layers/OpenStreetMapLayer.js`)).default,OrientedImageryLayer:async()=>(await import(`../../layers/OrientedImageryLayer.js`)).default,ParquetLayer:async()=>(await import(`../../layers/ParquetLayer.js`)).default,PointCloudLayer:async()=>(await import(`../../layers/PointCloudLayer.js`)).default,VectorTileLayer:async()=>(await import(`../../layers/VectorTileLayer.js`)).default,ViewshedLayer:async()=>(await import(`../../layers/ViewshedLayer.js`)).default,Voxel:async()=>(await import(`../../layers/VoxelLayer.js`)).default,WCS:async()=>(await import(`../../layers/WCSLayer.js`)).default,WebTiledLayer:async()=>(await import(`../../layers/WebTileLayer.js`)).default,WFS:async()=>(await import(`../../layers/WFSLayer.js`)).default,SubtypeGroupLayer:async()=>(await import(`../../layers/SubtypeGroupLayer.js`)).default,SubtypeGroupTable:async()=>(await import(`../../layers/SubtypeGroupLayer.js`)).default,WMS:async()=>(await import(`../../layers/WMSLayer.js`)).default,RasterDataLayer:()=>Promise.resolve(null),RasterDataElevationLayer:()=>Promise.resolve(null),IntegratedMesh3DTilesLayer:async()=>(await import(`../../layers/IntegratedMesh3DTilesLayer.js`)).default,Object3DTilesLayer:()=>Promise.resolve(null)};export{x as scan};
|
|
2
|
+
import{__addDisposableResource as e,__disposeResources as t}from"tslib";import n from"../../Basemap.js";import r from"../../Ground.js";import i from"../../WebScene.js";import{isLongFormType as a,Null as o,Integer as s}from"../../core/accessorSupport/ensureType.js";import{isCollection as c}from"../../core/accessorSupport/extensions/serializableProperty/type.js";import l from"../../layers/GroupLayer.js";import u from"../../layers/KMLLayer.js";import{layerTypeMapForReadContext as d}from"../../layers/support/layersMapping.js";import f from"../../layers/support/Sublayer.js";import p from"../../rest/layerSources/DynamicDataLayer.js";import m from"../../rest/layerSources/DynamicMapLayer.js";import h from"../../rest/layerSources/JoinTableDataSource.js";import g from"../InitialViewProperties.js";import{ScanContext as _,sorted as v}from"./utils.js";import{webSceneAnalysisRegistry as y}from"../support/analysisUtils.js";import b from"../support/SlideElements.js";async function x(n){let r={stack:[],error:void 0,hasError:!1};try{let t=e(r,new _,!1);return await A(null,{typeName:`json`,type:n},void 0,t)}catch(e){r.error=e,r.hasError=!0}finally{t(r)}}async function S(e,t,n,r){switch(t.typeName){case`array`:await T(e,t,n,r);break;case`union`:await D(e,t,n,r);break;case`json`:await A(e,t,n,r);break;case`native`:await C(e,t,n,r);break;case`enum`:await w(e,t,n,r)}}async function C(e,t,n,r){let i=n??t;r.addProperty({name:e,type:N(r,t),default:i.default,required:i.isRequired,nullable:i.nullable})}async function w(e,t,n,r){let i=n??t;r.currentClass?.typeValue&&e===`type`?r.addProperty({name:e,type:`string`,enum:`"${r.currentClass.typeValue}"`,default:i.default,required:i.isRequired,nullable:i.nullable}):r.addProperty({name:e,type:N(r,t),enum:v(t.values).map(e=>typeof e==`string`?`"${e}"`:`${e}`).join(`|`),default:i.default,required:i.isRequired,nullable:i.nullable})}async function T(e,t,n,r){t.elementType.isRequired=t.isRequired,await S(`${e}[]`,t.elementType,n??t.elementType,r)}function E(e,t){if(e.typeName===`json`){let t=e.type.__accessorMetadata__?.type,n=(t&&K(t))?.type,r=n||t?.type;if(r&&Array.isArray(r)&&r.length===1&&typeof r[0]==`string`)return n?r[0]:B(t,r[0])}return t}async function D(e,t,n,r){let i=[],a=n??t;for(let a of t.types)a.type.typeName===`native`||!t.key?i.push(a.type):await S(`${e}<${E(a.type,a.value)}>`,a.type,n??t,r);if(i.length){let t=v(i.map(e=>N(r,e)));r.addProperty({type:t.join(`|`),name:e,default:a.default,required:a.isRequired,nullable:a.nullable})}}async function O(e,t){return e.type===i&&t===`layers`?M(`web-scene`,`operational-layers`):e.type===i&&t===`tables`?M(`web-scene`,`tables`):e.type===n&&(t===`baseLayers`||t===`baseMapLayers`)?M(`web-scene`,`basemap-base-layers`):e.type===n&&t===`groundLayers`?M(`web-scene`,`basemap-ground-layers`):e.type===n&&t===`elevationLayers`||e.type===r&&t===`layers`?M(`web-scene`,`ground`):e.type===l&&t===`layers`?M(`web-scene`,`operational-layers`,e=>e!==l):(e.type===b||e.type===g)&&t===`analyses`?{typeName:`array`,elementType:{typeName:`union`,key:`type`,types:await Promise.all(Object.entries(y).map(async([e,t])=>({type:{typeName:`json`,type:await t()},value:e})))}}:e.type===h&&(t===`leftTableSource`||t===`rightTableSource`)?R({},{key:`type`,base:null,typeMap:{"data-layer":p,"map-layer":m}}):null}async function k(e,t,n){let r=L(n),i=await O(e,t);return i?(i.isRequired=r.isRequired,i.nullable=r.nullable,i.default=r.default,i):r}async function A(e,t,n,r){let i=t.type.__accessorMetadata__,a=r.getDeclaredClass(t.type);if(!i)return e&&r.addProperty({name:e,type:`unknown`}),null;let o=a,s=null;t.layerContainerType&&(o+=`--${t.layerContainerType}`);let c=e?.match(/<([^>]+)>$/);c&&(o+=`--${c[1]}`,s=c[1]);let l=n??t;t.type===f&&(o+=`--${r.currentClass?.name}`,s=r.currentClass?.name);let u=r.seen.get(o);if(u&&e)return r.addProperty({name:e,type:u,required:l.isRequired,default:l.default,nullable:l.nullable}),u;let d={type:t.type,name:a,id:o,properties:[]};e&&(r.addProperty({name:e,type:d,required:l.isRequired,default:l.default,nullable:l.nullable}),d.typeValue=s),r.push(e,d);for(let e in i){let n=i[e],a=q(n);if(!a?.enabled||a.layerContainerTypes&&t.layerContainerType&&!a.layerContainerTypes.includes(t.layerContainerType))continue;if(t.type===f){let e=r.stack[r.stack.length-2].klass.name===`esri/layers/TileLayer`;if(e&&f.test.isMapImageLayerOverridePolicy(a.overridePolicy)||!e&&f.test.isTileImageLayerOverridePolicy(a.overridePolicy))continue}let o=a.target;if(typeof o==`string`||o==null){let i=await k(t,e,n);if(!i)continue;await S(typeof o==`string`?o:e,i,void 0,r)}else await j(t,o,r)}return r.pop()}async function j(e,t,n){for(let r in t){let i=await O(e,r);if(!i){let e=t[r];i=e.types?R({default:e.default,write:e},e.types):H(e.type),i.default=e.default,i.isRequired=e.isRequired,i.nullable=e.allowNull,i=I(i)}await S(r,i,void 0,n)}}async function M(e,t,n){let r={typeName:`union`,key:`layerType`,types:[]},i=d({origin:e,layerContainerType:t});for(let e of Object.keys(i||{})){if(t===`operational-layers`&&e===`ArcGISTiledElevationServiceLayer`)continue;let i=await J[e]();i&&(!n||n(i))&&i!==u&&r.types.push({type:{typeName:`json`,layerContainerType:t,type:i},value:e})}return r.types.length===0?null:{typeName:`array`,elementType:r.types.length===1?r.types[0].type:r}}function N(e,t){switch(t.typeName){case`array`:return`${N(e,t.elementType)}[]`;case`union`:return`${v(t.types.map(t=>N(e,t.type))).join(` | `)}`;case`native`:switch(t.type){case Number:return`number`;case s:return`integer`;case String:return`string`;case Boolean:return`boolean`;case Object:return`object`;default:return`unknown`}case`json`:return e.getDeclaredClass(t.type);case`enum`:return`string`}}function P(e){let t=e.prototype.itemType?.Type;if(!t)return{typeName:`array`,elementType:{typeName:`native`,type:null}};if(typeof t==`function`)return{typeName:`array`,elementType:H(t)};if(t.typeMap){let e=[];for(let n in t.typeMap){let r=t.typeMap[n];e.push({type:H(r),value:G(r)?null:n})}return{typeName:`array`,elementType:{typeName:`union`,key:typeof t.key==`string`?t.key:`type`,types:e}}}}function F(e){if(e.typeName!==`json`)return null;let t=e.type.__accessorMetadata__?.type,n=(t&&K(t))?.type,r=n||t?.type;return!r||!Array.isArray(r)||typeof r[0]!=`string`?null:n||t.type.map(e=>B(t,e))}function I(e){if(e.typeName===`array`)return e.elementType=I(e.elementType),e;let t=F(e);return t?{typeName:`union`,key:`type`,nullable:e.nullable,isRequired:e.isRequired,types:t.map(t=>({value:t,type:e}))}:e}function L(e){let t=K(e);return t?.types?R(t,t.types):!t?.type&&e.types?R(t,e.types):I(V(e))}function R(e,t){if(Array.isArray(t))return{typeName:`array`,elementType:R(e,t[0])};let n=[];for(let e in t.typeMap){let r=t.typeMap[e];n.push({type:H(r),value:G(r)?null:e})}return{typeName:`union`,key:typeof t.key==`string`?t.key:`type`,types:n,nullable:e?.write?.allowNull,isRequired:e?.write?.isRequired,default:e?.default}}function z(e){return e!=null&&e.isJSONMapWriter}function B(e,t){let n=q(e);if(n&&z(n.writer)){let e={value:``};return n.writer?.(t,e,`value`),e.value}return t}function V(e){let t=K(e),n=q(e),r=H(t?.type||e.type);return t?.default!==void 0&&typeof t.default!=`function`&&(r.default=B(e,t.default)),n?.allowNull&&(r.nullable=!0),n?.isRequired&&(r.isRequired=!0),r}function H(e){if(!e)return{typeName:`native`,type:null};if(a(e))return U(e);if(Array.isArray(e)){if(typeof e[0]==`string`||typeof e[0]==`number`)return{typeName:`enum`,values:e};if(e.length>1){let t=[],n;for(let r of e)r===o?n=!0:t.push({type:H(r),value:null});return t.length===1?{...t[0].type,nullable:n}:{typeName:`union`,key:null,types:t,nullable:n}}return{typeName:`array`,elementType:H(e[0])}}return c(e)?P(e):G(e)?{typeName:`native`,type:e}:W(e)?{typeName:`json`,type:e}:{typeName:`native`,type:null}}function U(e){switch(e.type){case`native`:return{typeName:`native`,type:e.value};case`array`:return{typeName:`array`,elementType:H(e.value)};case`one-of`:return{typeName:`union`,key:null,types:e.values.map(e=>({type:U(e),value:null}))}}}function W(e){let t=e;for(;t;){if(t.prototype&&(t.prototype.declaredClass===`esri.core.JSONSupport`||t.prototype.declaredClass===`esri.core.MultiOriginJSONSupport`))return!0;t=Object.getPrototypeOf(t)}return!1}function G(e){return e===String||e===Boolean||e===Number||e===s||e===Object||e===o}function K(e){if(!e.json)return null;let t=e.json.origins,n=e.json,r=t?.[`web-scene`],i=t?.[`web-document`];return r||i||n||null}function q(e){if(!e.json)return null;let t=e.json.origins,n=e.json.write,r=t?.[`web-scene`]?.write,i=t?.[`web-document`]?.write;return r||i||n||null}const J={ArcGISAnnotationLayer:()=>Promise.resolve(null),ArcGISDimensionLayer:async()=>(await import(`../../layers/DimensionLayer.js`)).default,ArcGISFeatureLayer:async()=>(await import(`../../layers/FeatureLayer.js`)).default,ArcGISImageServiceLayer:async()=>(await import(`../../layers/ImageryLayer.js`)).default,ArcGISImageServiceVectorLayer:()=>Promise.resolve(null),ArcGISMapServiceLayer:async()=>(await import(`../../layers/MapImageLayer.js`)).default,ArcGISSceneServiceLayer:async()=>(await import(`../../layers/SceneLayer.js`)).default,ArcGISStreamLayer:async()=>(await import(`../../layers/StreamLayer.js`)).default,ArcGISTiledElevationServiceLayer:async()=>(await import(`../../layers/ElevationLayer.js`)).default,ArcGISTiledImageServiceLayer:async()=>(await import(`../../layers/ImageryTileLayer.js`)).default,ArcGISTiledMapServiceLayer:async()=>(await import(`../../layers/TileLayer.js`)).default,ArcGISVideoLayer:async()=>(await import(`../../layers/VideoLayer.js`)).default,BingMapsAerial:async()=>(await import(`../../layers/BingMapsLayer.js`)).default,BingMapsRoad:async()=>(await import(`../../layers/BingMapsLayer.js`)).default,BingMapsHybrid:async()=>(await import(`../../layers/BingMapsLayer.js`)).default,BuildingSceneLayer:async()=>(await import(`../../layers/BuildingSceneLayer.js`)).default,CatalogLayer:async()=>(await import(`../../layers/CatalogLayer.js`)).default,CSV:async()=>(await import(`../../layers/CSVLayer.js`)).default,GaussianSplatLayer:async()=>(await import(`../../layers/GaussianSplatLayer.js`)).default,GeoRSS:async()=>(await import(`../../layers/GeoRSSLayer.js`)).default,GeoJSON:async()=>(await import(`../../layers/GeoJSONLayer.js`)).default,GroupLayer:async()=>(await import(`../../layers/GroupLayer.js`)).default,IntegratedMeshLayer:async()=>(await import(`../../layers/IntegratedMeshLayer.js`)).default,KML:async()=>(await import(`../../layers/KMLLayer.js`)).default,KnowledgeGraphLayer:async()=>(await import(`../../layers/KnowledgeGraphLayer.js`)).default,MediaLayer:async()=>(await import(`../../layers/MediaLayer.js`)).default,LineOfSightLayer:async()=>(await import(`../../layers/LineOfSightLayer.js`)).default,LinkChartLayer:()=>Promise.resolve(null),OGCFeatureLayer:async()=>(await import(`../../layers/OGCFeatureLayer.js`)).default,OpenStreetMap:async()=>(await import(`../../layers/OpenStreetMapLayer.js`)).default,OrientedImageryLayer:async()=>(await import(`../../layers/OrientedImageryLayer.js`)).default,ParquetLayer:async()=>(await import(`../../layers/ParquetLayer.js`)).default,PointCloudLayer:async()=>(await import(`../../layers/PointCloudLayer.js`)).default,VectorTileLayer:async()=>(await import(`../../layers/VectorTileLayer.js`)).default,ViewshedLayer:async()=>(await import(`../../layers/ViewshedLayer.js`)).default,Voxel:async()=>(await import(`../../layers/VoxelLayer.js`)).default,WCS:async()=>(await import(`../../layers/WCSLayer.js`)).default,WebTiledLayer:async()=>(await import(`../../layers/WebTileLayer.js`)).default,WFS:async()=>(await import(`../../layers/WFSLayer.js`)).default,SubtypeGroupLayer:async()=>(await import(`../../layers/SubtypeGroupLayer.js`)).default,SubtypeGroupTable:async()=>(await import(`../../layers/SubtypeGroupLayer.js`)).default,WMS:async()=>(await import(`../../layers/WMSLayer.js`)).default,RasterDataLayer:()=>Promise.resolve(null),RasterDataElevationLayer:()=>Promise.resolve(null),IntegratedMesh3DTilesLayer:async()=>(await import(`../../layers/IntegratedMesh3DTilesLayer.js`)).default,Object3DTilesLayer:()=>Promise.resolve(null)};export{x as scan};
|
|
@@ -8,13 +8,13 @@ import type { Action, ListItemModifier } from "../LayerList/types.js";
|
|
|
8
8
|
|
|
9
9
|
export interface BasemapLayerListViewModelProperties extends Partial<Pick<BasemapLayerListViewModel, "baseListItemCreatedFunction" | "basemapTitle" | "checkPublishStatusEnabled" | "listModeDisabled" | "referenceListItemCreatedFunction" | "view">> {}
|
|
10
10
|
|
|
11
|
-
/** @deprecated since 5.2. Use the [Basemap Layer List
|
|
11
|
+
/** @deprecated since 5.2. Use the [Basemap Layer List](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-basemap-layer-list/) component instead. */
|
|
12
12
|
export interface BasemapLayerListViewModelEvents extends LayerListViewModelEvents {}
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Provides logic for the [BasemapLayerList](https://developers.arcgis.com/javascript/latest/references/core/widgets/BasemapLayerList/) widget and [component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-basemap-layer-list/).
|
|
16
16
|
*
|
|
17
|
-
* @deprecated since 5.2. Use the [Basemap Layer List
|
|
17
|
+
* @deprecated since 5.2. Use the [Basemap Layer List](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-basemap-layer-list/) component instead.
|
|
18
18
|
* @since 4.13
|
|
19
19
|
* @see [BasemapLayerList](https://developers.arcgis.com/javascript/latest/references/core/widgets/BasemapLayerList/) widget
|
|
20
20
|
* @see [Basemap Layer List component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-basemap-layer-list/)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../../core/Collection.js";import{deprecateUnnecessaryViewModel as n}from"../../core/deprecate.js";import{EventedAccessor as r}from"../../core/Evented.js";import i from"../../core/Logger.js";import{watch as a,initial as o}from"../../core/reactiveUtils.js";import{property as s,subclass as c}from"../../core/accessorSupport/decorators.js";import l from"../LayerList/ListItem.js";import{getItemLayers as u,findLayerListMode as d}from"../LayerList/support/layerListUtils.js";const f={view:`view`,basemap:`basemap`,baseLayers:`base-layers`,referenceLayers:`reference-layers`,baseLayersListMode:`reference-layers-list-mode`,referenceLayersListMode:`base-layers-list-mode`,baseLayerViews:`base-layer-views`,referenceLayerViews:`reference-layer-views`,children:`children`},p=t.ofType(l);let m=class extends r{constructor(e){let{suppressDeprecationWarning:t,...r}=e??{};super(r),this.baseItems=new p,this.baseListItemCreatedFunction=null,this.checkPublishStatusEnabled=!1,this.listModeDisabled=!1,this.referenceListItemCreatedFunction=null,this.referenceItems=new p,this.view=null,t||n(i.getLogger(this),`Basemap Layer List
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../../core/Collection.js";import{deprecateUnnecessaryViewModel as n}from"../../core/deprecate.js";import{EventedAccessor as r}from"../../core/Evented.js";import i from"../../core/Logger.js";import{watch as a,initial as o}from"../../core/reactiveUtils.js";import{property as s,subclass as c}from"../../core/accessorSupport/decorators.js";import l from"../LayerList/ListItem.js";import{getItemLayers as u,findLayerListMode as d}from"../LayerList/support/layerListUtils.js";const f={view:`view`,basemap:`basemap`,baseLayers:`base-layers`,referenceLayers:`reference-layers`,baseLayersListMode:`reference-layers-list-mode`,referenceLayersListMode:`base-layers-list-mode`,baseLayerViews:`base-layer-views`,referenceLayerViews:`reference-layer-views`,children:`children`},p=t.ofType(l);let m=class extends r{constructor(e){let{suppressDeprecationWarning:t,...r}=e??{};super(r),this.baseItems=new p,this.baseListItemCreatedFunction=null,this.checkPublishStatusEnabled=!1,this.listModeDisabled=!1,this.referenceListItemCreatedFunction=null,this.referenceItems=new p,this.view=null,t||n(i.getLogger(this),`Basemap Layer List`,`arcgis-basemap-layer-list`,{version:`5.2`}),this._compileBaseList=this._compileBaseList.bind(this),this._compileReferenceList=this._compileReferenceList.bind(this)}initialize(){this.addHandles([a(()=>[this.view?.map?.basemap,this.view?.ready===!0,this.view?.basemapView],()=>this._watchBasemapLayers(),o),a(()=>[this.baseListItemCreatedFunction,this.checkPublishStatusEnabled,this.listModeDisabled],()=>this._baseListItemCreatedFunctionChanged()),a(()=>[this.referenceListItemCreatedFunction,this.checkPublishStatusEnabled,this.listModeDisabled],()=>this._referenceListItemCreatedFunctionChanged())],f.view)}destroy(){this.view=null,this._removeAllBaseItems(),this._removeAllReferenceItems()}get basemapTitle(){return this.view?.map?.basemap?.title??null}set basemapTitle(e){this._override(`basemapTitle`,e)}get state(){return this.view?.ready?`ready`:this.view?`loading`:`disabled`}get totalBaseItems(){return this.baseItems.flatten(e=>e.children).length}get totalReferenceItems(){return this.referenceItems.flatten(e=>e.children).length}triggerAction(e,t){e&&!e.disabled&&this.emit(`trigger-action`,{action:e,item:t})}moveListItem({targetItem:e,fromParentItem:t,toParentItem:n,from:r,to:i,newIndex:a}){let o=e?.layer;if(!o||o.type===`subtype-sublayer`||o.type===`sublayer`)return;let s=this.view?.map?.basemap,c=s?.baseLayers,l=s?.referenceLayers,d=t?u(t):r===`base`?c:l,f=n?u(n):i===`base`?c:l;if(!d||!f)return;let{baseItems:p,referenceItems:m}=this,h=r===`base`?p:m,g=i===`base`?p:m,_=t?.children||h,v=n?.children||g,y=f.length-a;e.parent=n||null,_.remove(e),d.remove(o),v.includes(e)||v.add(e,y),f.includes(o)||f.add(o,y),this._compileLists()}_createItemChangeHandles({items:e,key:t,callback:n}){this.removeHandles(t),n(),e&&this.addHandles(e.on(`change`,()=>n()),t)}_createListItem({layer:e,type:t}){let{view:n,baseListItemCreatedFunction:r,referenceListItemCreatedFunction:i,checkPublishStatusEnabled:a,listModeDisabled:o}=this;return new l({layer:e,checkPublishStatusEnabled:a,listItemCreatedFunction:t===`base`?r:i,listModeDisabled:o,view:n})}_watchLayersListMode({layers:e,key:t,callback:n}){this.removeHandles(t),e&&!this.listModeDisabled&&this.addHandles(a(()=>e.filter(e=>`listMode`in e).map(e=>e.listMode).toArray(),()=>n()),t)}_getViewableLayers(e){return e?this.listModeDisabled?e:e.filter(e=>d(e)!==`hide`):void 0}_compileListItems({layers:e,items:t,key:n,type:r,callback:i}){this._watchLayersListMode({layers:e,key:n,callback:i});let a=this._getViewableLayers(e);a?.length?(this._createNewItems({type:r,items:t,layers:a}),this._removeItems({items:t,layers:a}),this._sortItems(t,a)):r===`base`?this._removeAllBaseItems():this._removeAllReferenceItems()}_compileReferenceList(){let{referenceItems:e}=this,t=this.view?.map?.basemap?.referenceLayers;this._compileListItems({type:`reference`,layers:t,items:e,key:f.referenceLayersListMode,callback:this._compileReferenceList})}_compileBaseList(){let{baseItems:e}=this,t=this.view?.map?.basemap?.baseLayers;this._compileListItems({type:`base`,layers:t,items:e,key:f.baseLayersListMode,callback:this._compileBaseList})}_compileLists(){this._compileReferenceList(),this._compileBaseList()}_createNewItems({items:e,layers:t,type:n}){t?.forEach(t=>{e.some(e=>e.layer===t)||e.add(this._createListItem({type:n,layer:t}))})}_removeItems({items:e,layers:t}){e&&e.forEach(n=>{n&&(t?.some(e=>n.layer===e)||(this.removeHandles(`${f.children}-${n.uid}`),e.remove(n),n.destroy()))})}_sortItems(e,t){e&&t&&e.sort((e,n)=>{let r=t.indexOf(e.layer),i=t.indexOf(n.layer);return r>i?-1:+(r<i)})}_removeAllBaseItems(){this.baseItems.drain(e=>{this.removeHandles(`${f.children}-${e.uid}`),e.destroy()})}_removeAllReferenceItems(){this.referenceItems.drain(e=>{this.removeHandles(`${f.children}-${e.uid}`),e.destroy()})}_baseListItemCreatedFunctionChanged(){this._removeAllBaseItems(),this._compileLists()}_referenceListItemCreatedFunctionChanged(){this._removeAllReferenceItems(),this._compileLists()}_watchBasemapLayers(){let{view:e}=this;this.removeHandles([f.baseLayers,f.referenceLayers,f.basemap,f.baseLayerViews,f.referenceLayerViews]),e?.ready?(this._compileLists(),this.addHandles([a(()=>this.view?.map?.basemap?.baseLayers,e=>this._createItemChangeHandles({items:e,key:f.baseLayers,callback:this._compileBaseList}),o),a(()=>this.view?.map?.basemap?.referenceLayers,e=>this._createItemChangeHandles({items:e,key:f.referenceLayers,callback:this._compileReferenceList}),o),a(()=>this.view?.basemapView?.baseLayerViews,e=>this._createItemChangeHandles({items:e,key:f.baseLayerViews,callback:this._compileBaseList}),o),a(()=>this.view?.basemapView?.referenceLayerViews,e=>this._createItemChangeHandles({items:e,key:f.referenceLayerViews,callback:this._compileReferenceList}),o)],f.basemap)):(this._removeAllBaseItems(),this._removeAllReferenceItems())}};e([s({type:p,readOnly:!0})],m.prototype,`baseItems`,void 0),e([s()],m.prototype,`basemapTitle`,null),e([s()],m.prototype,`baseListItemCreatedFunction`,void 0),e([s()],m.prototype,`checkPublishStatusEnabled`,void 0),e([s({nonNullable:!0})],m.prototype,`listModeDisabled`,void 0),e([s()],m.prototype,`referenceListItemCreatedFunction`,void 0),e([s({type:p,readOnly:!0})],m.prototype,`referenceItems`,void 0),e([s({readOnly:!0})],m.prototype,`state`,null),e([s()],m.prototype,`totalBaseItems`,null),e([s()],m.prototype,`totalReferenceItems`,null),e([s()],m.prototype,`view`,void 0),m=e([c(`esri.widgets.BasemapLayerList.BasemapLayerListViewModel`)],m);const h=m;export{h as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type Accessor from "../../core/Accessor.js";
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
|
-
* @deprecated since 5.2. Use the [Basemap Layer List
|
|
4
|
+
* @deprecated since 5.2. Use the [Basemap Layer List](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-basemap-layer-list/) component instead.
|
|
5
5
|
* @since 5.0
|
|
6
6
|
*/
|
|
7
7
|
export interface BasemapLayerListVisibleElementsProperties extends Partial<Pick<BasemapLayerListVisibleElements, "baseLayers" | "closeButton" | "collapseButton" | "editTitleButton" | "errors" | "filter" | "flow" | "heading" | "referenceLayers" | "statusIndicators" | "temporaryLayerIndicators">> {}
|
|
@@ -10,7 +10,7 @@ export interface BasemapLayerListVisibleElementsProperties extends Partial<Pick<
|
|
|
10
10
|
* The visible elements that are displayed within the basemap layer list.
|
|
11
11
|
* This provides the ability to turn on/off individual elements of the basemap layer list.
|
|
12
12
|
*
|
|
13
|
-
* @deprecated since 5.2. Use the [Basemap Layer List
|
|
13
|
+
* @deprecated since 5.2. Use the [Basemap Layer List](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-basemap-layer-list/) component instead.
|
|
14
14
|
* @since 5.0
|
|
15
15
|
*/
|
|
16
16
|
export default class BasemapLayerListVisibleElements extends Accessor {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Types for the BasemapLayerList widget.
|
|
3
3
|
*
|
|
4
|
-
* @deprecated since 5.2. Use the [Basemap Layer List
|
|
4
|
+
* @deprecated since 5.2. Use the [Basemap Layer List](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-basemap-layer-list/) component instead.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Describes the current state of the list items in the [BasemapLayerListViewModel](https://developers.arcgis.com/javascript/latest/references/core/widgets/BasemapLayerList/BasemapLayerListViewModel/).
|
|
9
9
|
*
|
|
10
|
-
* @deprecated since 5.2. Use the [Basemap Layer List
|
|
10
|
+
* @deprecated since 5.2. Use the [Basemap Layer List](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-basemap-layer-list/) component instead.
|
|
11
11
|
* @since 5.0
|
|
12
12
|
*/
|
|
13
13
|
export type BasemapLayerListState = "ready" | "loading" | "disabled";
|
|
@@ -15,6 +15,6 @@ export type BasemapLayerListState = "ready" | "loading" | "disabled";
|
|
|
15
15
|
/**
|
|
16
16
|
* Defines whether an item is a base layer or a reference layer in the basemap.
|
|
17
17
|
*
|
|
18
|
-
* @deprecated since 5.2. Use the [Basemap Layer List
|
|
18
|
+
* @deprecated since 5.2. Use the [Basemap Layer List](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-basemap-layer-list/) component instead.
|
|
19
19
|
*/
|
|
20
20
|
export type BasemapItemType = "reference" | "base";
|
|
@@ -68,7 +68,7 @@ export interface BasemapLayerListProperties extends WidgetProperties, Identifiab
|
|
|
68
68
|
visibleElements?: BasemapLayerListVisibleElementsProperties;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
/** @deprecated since version 5.0. Use the [Basemap Layer List
|
|
71
|
+
/** @deprecated since version 5.0. Use the [Basemap Layer List](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-basemap-layer-list/) component instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/). */
|
|
72
72
|
export interface BasemapLayerListEvents extends BasemapLayerListViewModelEvents {}
|
|
73
73
|
|
|
74
74
|
/**
|
|
@@ -81,7 +81,7 @@ export interface BasemapLayerListEvents extends BasemapLayerListViewModelEvents
|
|
|
81
81
|
* [Sample - LayerList widget](https://developers.arcgis.com/javascript/latest/sample-code/widgets-layerlist/)\
|
|
82
82
|
* [Sample - LayerList widget with actions](https://developers.arcgis.com/javascript/latest/sample-code/widgets-layerlist-actions/)
|
|
83
83
|
*
|
|
84
|
-
* @deprecated since version 5.0. Use the [Basemap Layer List
|
|
84
|
+
* @deprecated since version 5.0. Use the [Basemap Layer List](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-basemap-layer-list/) component instead. For information on widget deprecation, read about [Esri's move to web components](https://developers.arcgis.com/javascript/latest/components-transition-plan/).
|
|
85
85
|
* @since 4.13
|
|
86
86
|
* @see [BasemapLayerListViewModel](https://developers.arcgis.com/javascript/latest/references/core/widgets/BasemapLayerList/BasemapLayerListViewModel/)
|
|
87
87
|
* @example
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import t from"../core/Collection.js";import{deprecateWidget as n}from"../core/deprecate.js";import{IdentifiableMixin as r}from"../core/Identifiable.js";import i from"../core/Logger.js";import a from"../core/ReactiveMap.js";import{on as o,initial as s,watch as c,syncAndInitial as l}from"../core/reactiveUtils.js";import{property as u,subclass as d}from"../core/accessorSupport/decorators.js";import f from"./Widget.js";import p from"./BasemapLayerList/BasemapLayerListViewModel.js";import m from"./BasemapLayerList/BasemapLayerListVisibleElements.js";import{css as h}from"./BasemapLayerList/css.js";import g from"./LayerList/LayerListItem.js";import _ from"./LayerList/ListItem.js";import{minFilterItems as v,getItem as y,getLayerType as b,removeDestroyedListItems as x,setFilterPredicate as S,sortLayersToIds as C,sortChildLayersToIds as w}from"./LayerList/support/layerListUtils.js";import{loadCalciteComponents as T}from"./support/componentsUtils.js";import{globalCss as E}from"./support/globalCss.js";import{incrementHeadingLevel as D}from"./support/Heading.js";import{calciteListFilterProps as O}from"./support/listUtils.js";import{tsx as k,messageBundle as A,vmEvent as j}from"./support/widget.js";import{setFocus as M}from"./support/widgetUtils.js";const N=t.ofType(_),P=`nested`,F=`data-basemap-layer-type`;let I=class extends r(f){constructor(e){super(e),this._baseListEl=null,this._referenceListEl=null,this._activeItem=null,this._tooltipReferenceMap=new Map,this._editTitleInput=null,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this._focusEditingFlowItem=!1,this._layerListMap=new a,this._lastDragDetail=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`basemap-${this.uid}`,this._openedLayersController=null,this.catalogLayerList=null,this.catalogOptions=null,this.collapsed=!1,this.dragEnabled=!1,this.editingTitle=!1,this.filterPlaceholder=``,this.baseFilterPredicate=null,this.baseFilterText=``,this.referenceFilterPredicate=null,this.referenceFilterText=``,this.listItemCanGiveFunction=null,this.listItemCanReceiveFunction=null,this.headingLevel=2,this.knowledgeGraphOptions=null,this.layerTablesEnabled=new t([`knowledge-graph`]),this.mapImageOptions=null,this.messages=null,this.messagesCommon=null,this.minFilterItems=v,this.openedLayers=new t,this.openedLayerLists=new t,this.tableList=null,this.selectedItems=new N,this.selectionMode=`none`,this.tileOptions=null,this.viewModel=new p({suppressDeprecationWarning:!0}),this.visibilityAppearance=`default`,this.visibleElements=new m,this._canMove=({dragEl:e,fromEl:t,toEl:n},r)=>{let i=r===`pull`?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,a=y(e);if(!a?.sortable)return!1;let o=y(t),s=b(t),c=y(n),l=b(n),u=!!s&&!!l&&s===l,d={selected:a,from:o,to:c},f=t.group,p=n.group,m=o?.layer?.type??``,h=c?.layer?.type??``,g=new Set([`map-image`,`catalog`,`knowledge-graph`]);return f&&p&&typeof i==`function`?i.call(null,d):u&&!g.has(m)&&!g.has(h)&&a?.layer?.type!==`sublayer`},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onTablesOpen=e=>{this.openedLayers.push(e.layer),this._focusLayerFlowItem=e.layer?.uid},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent),this._focusLayerFlowItem=e.layer?.uid},this._clearActiveItem=()=>{this._activeItem=null},this._setActiveItem=e=>{if(this.visibilityAppearance!=="default")return;let t=Array.from(e.composedPath()).find(e=>e.classList?.contains(h.item));this._activeItem=y(t)},this._onCalciteListOrderChange=e=>{let{_lastDragDetail:t}=this,{toEl:n,fromEl:r,dragEl:i,newIndex:a}=e,o=t?.newIndex===a&&t?.dragEl===i&&t?.toEl===n&&t?.fromEl===r;if(!r||!n||o)return;this._lastDragDetail=e,this._selectedDragItemLayerUid=i.value;let s=r,c=n;if(s===c){let e=Array.from(r.children).filter(e=>e?.matches(`calcite-list-item`)).map(e=>e.value);this._sortLayers(s,e)}else a!=null&&this._moveLayerFromChildList({toEl:c,fromEl:s,dragEl:i,newIndex:a})},this.announceDeprecation=()=>{n(i.getLogger(this),`Basemap Layer List (Next)`,`arcgis-basemap-layer-list-next`,{version:`5.0`})}}initialize(){this.addHandles([o(()=>this.openedLayers,`change`,()=>this._handleOpenedLayersChange(),s),c(()=>[this.viewModel.referenceItems.toArray(),this.viewModel.baseItems.toArray()],()=>x(this.selectedItems),l),c(()=>[this.baseFilterPredicate,this._baseListEl],()=>S(this._baseListEl,this.baseFilterPredicate)),c(()=>[this.referenceFilterPredicate,this._referenceListEl],()=>S(this._referenceListEl,this.referenceFilterPredicate))])}loadDependencies(){return T({action:()=>import(`@esri/calcite-components/dist/components/calcite-action`),block:()=>import(`@esri/calcite-components/dist/components/calcite-block`),label:()=>import(`@esri/calcite-components/dist/components/calcite-label`),input:()=>import(`@esri/calcite-components/dist/components/calcite-input`),button:()=>import(`@esri/calcite-components/dist/components/calcite-button`),flow:()=>import(`@esri/calcite-components/dist/components/calcite-flow`),"flow-item":()=>import(`@esri/calcite-components/dist/components/calcite-flow-item`),list:()=>import(`@esri/calcite-components/dist/components/calcite-list`),notice:()=>import(`@esri/calcite-components/dist/components/calcite-notice`),tooltip:()=>import(`@esri/calcite-components/dist/components/calcite-tooltip`)})}destroy(){this._tooltipReferenceMap.clear(),this._destroyOpenedLayerLists()}get _visibleBaseItems(){return this.baseItems?.filter(e=>!e.hidden&&(this.visibleElements.errors||!e.error))}get _visibleReferenceItems(){return this.referenceItems?.filter(e=>!e.hidden&&(this.visibleElements.errors||!e.error))}get _openedPanelItems(){return this._visibleReferenceItems.concat(this._visibleBaseItems).flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _totalBaseItems(){return this.viewModel.baseItems.flatten(e=>e.children.filter(e=>e.layer?.type!==`catalog-dynamic-group`)).length}get _totalReferenceItems(){return this.viewModel.referenceItems.flatten(e=>e.children.filter(e=>e.layer?.type!==`catalog-dynamic-group`)).length}get _baseFilterEnabled(){return this._totalBaseItems>=this.minFilterItems&&this.visibleElements.filter}get _referenceFilterEnabled(){return this._totalReferenceItems>=this.minFilterItems&&this.visibleElements.filter}get _renderedOpenLayerFlowItems(){let{openedLayers:e}=this;return e.toArray().map((t,n)=>this._renderLayerFlowItem(t,n===e.length-1))}get basemapTitle(){return this.viewModel.basemapTitle}set basemapTitle(e){this.viewModel.basemapTitle=e}get baseListItemCreatedFunction(){return this.viewModel.baseListItemCreatedFunction}set baseListItemCreatedFunction(e){this.viewModel.baseListItemCreatedFunction=e}get icon(){return`layers`}set icon(e){this._overrideIfSome(`icon`,e)}get label(){return this.messages?.widgetLabel??``}set label(e){this._overrideIfSome(`label`,e)}get referenceListItemCreatedFunction(){return this.viewModel.referenceListItemCreatedFunction}set referenceListItemCreatedFunction(e){this.viewModel.referenceListItemCreatedFunction=e}get baseItems(){return this.viewModel.baseItems}get referenceItems(){return this.viewModel.referenceItems}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}render(){let{state:e}=this.viewModel,t={[E.hidden]:e===`loading`,[E.disabled]:e===`disabled`};return k(`div`,{class:this.classes(h.base,E.widget,E.panel,t)},this._renderItems())}async _createCatalogLayerList(e){let{default:t}=await import(`./CatalogLayerList.js`),{headingLevel:n,catalogOptions:r,view:i,filterPlaceholder:a,minFilterItems:o,selectionMode:s,visibilityAppearance:c,_onCatalogOpen:l,_onTablesOpen:u,layerTablesEnabled:d}=this;return new t({headingLevel:n,view:i,filterPlaceholder:a,minFilterItems:o,selectionMode:s,visibilityAppearance:c,...r,catalogLayer:e,layerTablesEnabled:d,onCatalogOpen:l,onTablesOpen:u,suppressDeprecationWarning:!0})}_getTableListParams(e){switch(e.type){case`knowledge-graph`:return{...this.knowledgeGraphOptions,tables:e.tables};case`map-image`:return{...this.mapImageOptions,tables:e.subtables};case`tile`:return{...this.tileOptions,tables:e.subtables};default:return null}}async _createTableList(e){let{default:t}=await import(`./TableList.js`),{headingLevel:n,selectionMode:r,dragEnabled:i}=this;return new t({headingLevel:n,selectionMode:r,dragEnabled:i,...this._getTableListParams(e)})}async _createFlowList(e,t){let{_layerListMap:n}=this,r=n.get(e);if(r)return r;let i=e.type===`catalog`?await this._createCatalogLayerList(e):await this._createTableList(e);return t.aborted||n.set(e,i),i}async _handleOpenedLayersChange(){let{_layerListMap:e,openedLayers:t,openedLayerLists:n}=this;this._openedLayersController?.abort();let r=new AbortController,{signal:i}=r;this._openedLayersController=r,e.forEach((n,r)=>{t.includes(r)||(n.destroy(),e.delete(r))});let a=await Promise.all(t.map(e=>this._createFlowList(e,i)));if(i.aborted)return;n.removeAll(),n.addMany(a);let o=n.at(-1);o?`catalogLayer`in o?(this._set(`catalogLayerList`,o),this._set(`tableList`,null)):(this._set(`catalogLayerList`,null),this._set(`tableList`,o)):(this._set(`catalogLayerList`,null),this._set(`tableList`,null))}_destroyOpenedLayerLists(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}_renderItemTooltip(e){return e?k(`calcite-tooltip`,{key:`tooltip-${e.layer?.uid}`,overlayPositioning:`fixed`,referenceElement:this._tooltipReferenceMap.get(e.layer?.uid),topLayerDisabled:this.topLayerDisabled},this.messages.layerIncompatibleTooltip):null}_renderItemTooltipNodes(e){return e.incompatible?this._renderItemTooltip(e):e.children?.filter(e=>!e.hidden).toArray().map(e=>this._renderItemTooltipNodes(e))}_renderItemTooltips(){return this._visibleReferenceItems.concat(this._visibleBaseItems)?.toArray().map(e=>this._renderItemTooltipNodes(e))}_focusLayerFlowItemNode(e){this._focusLayerFlowItem===e.dataset.layerUid&&(this._focusLayerFlowItem=null,M(e))}_renderPanelFlowItems(){let{_openedPanelItems:e,openedLayers:t}=this;return e.toArray().map(({title:n,panel:r},i)=>{let a=()=>this._handlePanelFlowItemBack(r);return k(`calcite-flow-item`,{afterCreate:this._focusPanelFlowItemNode,afterUpdate:this._focusPanelFlowItemNode,bind:this,description:n,heading:r.title,headingLevel:this.headingLevel,key:`flow-panel-${r.uid}`,selected:!t.length&&i===e.length-1,onCalciteFlowItemBack:e=>{e.preventDefault(),a()}},r.render(),k(`calcite-button`,{appearance:`transparent`,slot:`footer-start`,width:`full`,onclick:a},this.messagesCommon.back))})}_handlePanelFlowItemBack(e){e.open=!1,this._focusRootFlowItem=!0}_focusEditingFlowItemNode(e){this._focusEditingFlowItem&&(this._focusEditingFlowItem=!1,M(e))}_focusRootFlowItemNode(e){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,M(e))}_focusPanelFlowItemNode(e){this._focusPanelFlowItem&&(this._focusPanelFlowItem=!1,M(e))}_renderItem(e,t,n,r){return k(g,{activeItem:this._activeItem,canMove:this._canMove,css:h,displayMode:P,dragDisabled:t,dragEnabled:this.dragEnabled,item:e,key:`layerListItem-${e.layer?.uid}`,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,messagesCommon:this.messagesCommon,parent:n,parentTitles:r,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,visibilityAppearance:this.visibilityAppearance,visibleElements:this.visibleElements,onAction:this._onTriggerAction,onCatalogOpen:this._onCatalogOpen,onPanelOpen:this._onPanelOpen,onSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,onTablesOpen:this._onTablesOpen,onTooltipReferenceChange:this._onTooltipReferenceChange})}_moveLayerFromChildList({toEl:e,fromEl:t,dragEl:n,newIndex:r}){let i=y(n),a=y(e),o=y(t),s=L(t),c=L(e);s&&c&&this.viewModel.moveListItem({targetItem:i,fromParentItem:o,toParentItem:a,newIndex:r,from:s,to:c})}_handleCalciteListDragEnd({fromEl:e,dragEl:t,oldIndex:n}){n!=null&&e.insertBefore(t,e.children[n])}_sortLayers(e,t){if(e){if(e===this._referenceListEl||e===this._baseListEl){let n=e===this._referenceListEl?`reference`:`base`,r=n===`base`?this.view?.map?.basemap?.baseLayers:n===`reference`?this.view?.map?.basemap?.referenceLayers:null;C(r,t)}else{let n=y(e);if(!n)return;w(n,t)}}}_handleCalciteListChange(e){let{selectionMode:t,selectedItems:n}=this;if(t===`none`)return;let r=e.target.selectedItems.map(e=>y(e)).filter(Boolean);n.removeAll(),n.addMany(r)}_renderEditingInput(){let{messages:e}=this,{basemapTitle:t}=this.viewModel;return k(`div`,{class:h.editing},k(`calcite-label`,null,e.basemapTitle,k(`calcite-input`,{afterCreate:e=>this._editTitleInput=e,label:e.basemapTitle,name:`basemaptitle`,pattern:`.*\\S+.*`,placeholder:e.basemapTitle,required:!0,title:e.basemapTitle,type:`text`,value:t??void 0})))}_renderCancelButton(){let{messagesCommon:{cancel:e}}=this;return k(`calcite-button`,{appearance:`outline`,bind:this,label:e,slot:`footer`,title:e,width:`full`,onclick:this._toggleEditingTitle},e)}_renderSubmitButton(){let{messagesCommon:e}=this;return k(`calcite-button`,{label:e.form.submit,slot:`footer`,title:e.form.submit,type:`submit`,width:`full`},e.form.ok)}_renderEditingFlowItem(){return this.editingTitle?k(`calcite-flow-item`,{afterCreate:this._focusEditingFlowItemNode,afterUpdate:this._focusEditingFlowItemNode,bind:this,heading:this.visibleElements.heading?this.messages.basemapTitle:void 0,headingLevel:this.headingLevel,selected:this.openedLayers.length===0&&this._openedPanelItems.length===0,onCalciteFlowItemBack:e=>{e.preventDefault(),this._toggleEditingTitle()}},this._renderEditingInput(),this._renderCancelButton(),this._renderSubmitButton()):null}_renderEditTitleButton(){let{editingTitle:e,visibleElements:t,messagesCommon:n}=this,r=n.edit;return t.editTitleButton&&!e?k(`calcite-action`,{bind:this,icon:`pencil`,slot:`header-actions-end`,text:r,title:r,onclick:this._toggleEditingTitle}):null}_renderNoLayersInfoMessage(e){return k(`div`,{slot:`message`},e)}_renderNoLayersInfo(e,t){return k(`div`,{class:h.itemMessage},k(`calcite-notice`,{icon:`information`,key:t,kind:`info`,open:!0,width:`full`},this._renderNoLayersInfoMessage(e)))}_renderItems(){let{collapsed:e,visible:t,visibleElements:{closeButton:n,collapseButton:r,heading:i,flow:a},messages:o,viewModel:s}=this,c=[k(`calcite-flow-item`,{afterCreate:this._focusRootFlowItemNode,afterUpdate:this._focusRootFlowItemNode,bind:this,closable:n,closed:!t,collapsed:e,collapsible:r,heading:i?s.basemapTitle??o.widgetLabel:void 0,headingLevel:this.headingLevel,key:`root-flow-item`,selected:!this.editingTitle&&this.openedLayers.length===0&&this._openedPanelItems.length===0,onCalciteFlowItemClose:()=>this.visible=!1},this._renderEditTitleButton(),this._renderReferenceSection(),this._renderBaseSection()),this._renderEditingFlowItem(),this._renderPanelFlowItems(),this._renderedOpenLayerFlowItems],l=a?k(`calcite-flow`,{key:`root-flow`},c):c;return t?[this.editingTitle?k(`form`,{bind:this,class:h.editingForm,onsubmit:this._formSubmit},l):l,this._renderItemTooltips()]:null}_renderLayerFlowItem(e,t){let{messages:n,openedLayers:r}=this,i=e.title||this.messages.untitledLayer;return k(`calcite-flow-item`,{afterCreate:this._focusLayerFlowItemNode,afterUpdate:this._focusLayerFlowItemNode,bind:this,"data-layer-uid":e.uid,description:i,heading:n[e.type===`catalog`?`catalogLayers`:`tables`],headingLevel:this.headingLevel,key:`flow-layer-list-${e.uid}`,selected:t,onCalciteFlowItemBack:e=>{e.preventDefault(),r.pop();let t=r.at(-1);t?this._focusLayerFlowItem=t.uid:this._focusRootFlowItem=!0}},this._layerListMap.get(e)?.render())}_renderList(e,t,n){let{messages:r,dragEnabled:i,selectionMode:a,filterPlaceholder:o,baseFilterText:s,referenceFilterText:c,_baseFilterEnabled:l,_referenceFilterEnabled:u,_rootGroupUid:d}=this,f=t===`reference`?r.noReferenceLayers:r.noBaseLayers,p=t===`reference`?u:l;return k(`calcite-block`,{class:h.section,expandable:!0,expanded:!0,heading:t===`reference`?r.referenceHeading:r.baseHeading,headingLevel:D(this.headingLevel),key:`block-${t}`},e?.length?null:this._renderNoLayersInfo(f,t),k(`calcite-list`,{afterCreate:e=>{t===`reference`?this._referenceListEl=e:this._baseListEl=e,e.addEventListener(`focusin`,this._setActiveItem),e.addEventListener(`focusout`,this._clearActiveItem)},afterRemoved:e=>{t===`reference`?this._referenceListEl=null:this._baseListEl=null,e.removeEventListener(`focusin`,this._setActiveItem),e.removeEventListener(`focusout`,this._clearActiveItem)},canPull:e=>this._canMove(e,`pull`),canPut:e=>this._canMove(e,`put`),displayMode:P,filterProps:O,[F]:t,"data-layer-type":d,dragEnabled:i,filterEnabled:p,filterPlaceholder:o,filterText:p?t===`reference`?c:s:``,group:d,key:`list-${t}`,label:r.widgetLabel,selectionAppearance:`border`,selectionMode:a,onCalciteListChange:e=>this._handleCalciteListChange(e),onCalciteListDragEnd:e=>this._handleCalciteListDragEnd(e.detail),onCalciteListFilter:e=>this[t===`reference`?`referenceFilterText`:`baseFilterText`]=e.currentTarget?.filterText??``,onCalciteListOrderChange:e=>this._onCalciteListOrderChange(e.detail),onmouseleave:this._clearActiveItem,onmouseover:this._setActiveItem},e?.toArray().map(e=>this._renderItem(e,n)),p?k(`div`,{class:h.filterNoResults,slot:`filter-no-results`},k(`calcite-notice`,{kind:`info`,open:!0,width:`full`},this._renderNoLayersInfoMessage(f))):null))}_renderBaseSection(){let{_visibleBaseItems:e}=this;return this.visibleElements.baseLayers?this._renderList(e,`base`,e?.length===1):null}_renderReferenceSection(){return this.visibleElements.referenceLayers?this._renderList(this._visibleReferenceItems,`reference`,!1):null}_toggleEditingTitle(){let{editingTitle:e}=this,t=!e;this.editingTitle=t,t?this._focusEditingFlowItem=!0:this._focusRootFlowItem=!0}_formSubmit(e){e.preventDefault();let t=this._editTitleInput?.value;t?.trim()&&(this.basemapTitle=t),this._toggleEditingTitle()}};e([u()],I.prototype,`_baseListEl`,void 0),e([u()],I.prototype,`_referenceListEl`,void 0),e([u()],I.prototype,`_activeItem`,void 0),e([u()],I.prototype,`_tooltipReferenceMap`,void 0),e([u()],I.prototype,`_focusRootFlowItem`,void 0),e([u()],I.prototype,`_focusPanelFlowItem`,void 0),e([u()],I.prototype,`_focusLayerFlowItem`,void 0),e([u()],I.prototype,`_focusEditingFlowItem`,void 0),e([u()],I.prototype,`_layerListMap`,void 0),e([u()],I.prototype,`_visibleBaseItems`,null),e([u()],I.prototype,`_visibleReferenceItems`,null),e([u()],I.prototype,`_openedPanelItems`,null),e([u()],I.prototype,`_totalBaseItems`,null),e([u()],I.prototype,`_totalReferenceItems`,null),e([u()],I.prototype,`_baseFilterEnabled`,null),e([u()],I.prototype,`_referenceFilterEnabled`,null),e([u()],I.prototype,`_renderedOpenLayerFlowItems`,null),e([u()],I.prototype,`basemapTitle`,null),e([u({readOnly:!0})],I.prototype,`catalogLayerList`,void 0),e([u()],I.prototype,`catalogOptions`,void 0),e([u()],I.prototype,`collapsed`,void 0),e([u()],I.prototype,`dragEnabled`,void 0),e([u()],I.prototype,`editingTitle`,void 0),e([u()],I.prototype,`filterPlaceholder`,void 0),e([u()],I.prototype,`baseFilterPredicate`,void 0),e([u()],I.prototype,`baseFilterText`,void 0),e([u()],I.prototype,`referenceFilterPredicate`,void 0),e([u()],I.prototype,`referenceFilterText`,void 0),e([u()],I.prototype,`listItemCanGiveFunction`,void 0),e([u()],I.prototype,`listItemCanReceiveFunction`,void 0),e([u()],I.prototype,`baseListItemCreatedFunction`,null),e([u()],I.prototype,`headingLevel`,void 0),e([u()],I.prototype,`icon`,null),e([u()],I.prototype,`knowledgeGraphOptions`,void 0),e([u()],I.prototype,`label`,null),e([u()],I.prototype,`layerTablesEnabled`,void 0),e([u()],I.prototype,`mapImageOptions`,void 0),e([u(),A(`esri/widgets/BasemapLayerList/t9n/BasemapLayerList`)],I.prototype,`messages`,void 0),e([u(),A(`esri/t9n/common`)],I.prototype,`messagesCommon`,void 0),e([u()],I.prototype,`minFilterItems`,void 0),e([u({readOnly:!0})],I.prototype,`openedLayers`,void 0),e([u({readOnly:!0})],I.prototype,`openedLayerLists`,void 0),e([u()],I.prototype,`referenceListItemCreatedFunction`,null),e([u({readOnly:!0})],I.prototype,`tableList`,void 0),e([u({readOnly:!0})],I.prototype,`baseItems`,null),e([u({readOnly:!0})],I.prototype,`referenceItems`,null),e([u({type:N})],I.prototype,`selectedItems`,void 0),e([u()],I.prototype,`selectionMode`,void 0),e([u()],I.prototype,`tileOptions`,void 0),e([u()],I.prototype,`view`,null),e([j(`trigger-action`),u({type:p})],I.prototype,`viewModel`,void 0),e([u()],I.prototype,`visibilityAppearance`,void 0),e([u({type:m,nonNullable:!0})],I.prototype,`visibleElements`,void 0),I=e([d(`esri.widgets.BasemapLayerList`)],I);function L(e){return e?.closest(`[${F}]`)?.getAttribute(F)}const R=I;export{R as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import t from"../core/Collection.js";import{deprecateWidget as n}from"../core/deprecate.js";import{IdentifiableMixin as r}from"../core/Identifiable.js";import i from"../core/Logger.js";import a from"../core/ReactiveMap.js";import{on as o,initial as s,watch as c,syncAndInitial as l}from"../core/reactiveUtils.js";import{property as u,subclass as d}from"../core/accessorSupport/decorators.js";import f from"./Widget.js";import p from"./BasemapLayerList/BasemapLayerListViewModel.js";import m from"./BasemapLayerList/BasemapLayerListVisibleElements.js";import{css as h}from"./BasemapLayerList/css.js";import g from"./LayerList/LayerListItem.js";import _ from"./LayerList/ListItem.js";import{minFilterItems as v,getItem as y,getLayerType as b,removeDestroyedListItems as x,setFilterPredicate as S,sortLayersToIds as C,sortChildLayersToIds as w}from"./LayerList/support/layerListUtils.js";import{loadCalciteComponents as T}from"./support/componentsUtils.js";import{globalCss as E}from"./support/globalCss.js";import{incrementHeadingLevel as D}from"./support/Heading.js";import{calciteListFilterProps as O}from"./support/listUtils.js";import{tsx as k,messageBundle as A,vmEvent as j}from"./support/widget.js";import{setFocus as M}from"./support/widgetUtils.js";const N=t.ofType(_),P=`nested`,F=`data-basemap-layer-type`;let I=class extends r(f){constructor(e){super(e),this._baseListEl=null,this._referenceListEl=null,this._activeItem=null,this._tooltipReferenceMap=new Map,this._editTitleInput=null,this._focusRootFlowItem=!1,this._focusPanelFlowItem=!1,this._focusLayerFlowItem=null,this._focusEditingFlowItem=!1,this._layerListMap=new a,this._lastDragDetail=null,this._selectedDragItemLayerUid=null,this._rootGroupUid=`basemap-${this.uid}`,this._openedLayersController=null,this.catalogLayerList=null,this.catalogOptions=null,this.collapsed=!1,this.dragEnabled=!1,this.editingTitle=!1,this.filterPlaceholder=``,this.baseFilterPredicate=null,this.baseFilterText=``,this.referenceFilterPredicate=null,this.referenceFilterText=``,this.listItemCanGiveFunction=null,this.listItemCanReceiveFunction=null,this.headingLevel=2,this.knowledgeGraphOptions=null,this.layerTablesEnabled=new t([`knowledge-graph`]),this.mapImageOptions=null,this.messages=null,this.messagesCommon=null,this.minFilterItems=v,this.openedLayers=new t,this.openedLayerLists=new t,this.tableList=null,this.selectedItems=new N,this.selectionMode=`none`,this.tileOptions=null,this.viewModel=new p({suppressDeprecationWarning:!0}),this.visibilityAppearance=`default`,this.visibleElements=new m,this._canMove=({dragEl:e,fromEl:t,toEl:n},r)=>{let i=r===`pull`?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,a=y(e);if(!a?.sortable)return!1;let o=y(t),s=b(t),c=y(n),l=b(n),u=!!s&&!!l&&s===l,d={selected:a,from:o,to:c},f=t.group,p=n.group,m=o?.layer?.type??``,h=c?.layer?.type??``,g=new Set([`map-image`,`catalog`,`knowledge-graph`]);return f&&p&&typeof i==`function`?i.call(null,d):u&&!g.has(m)&&!g.has(h)&&a?.layer?.type!==`sublayer`},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this._onTooltipReferenceChange=(e,t)=>{t?this._tooltipReferenceMap.set(e,t):this._tooltipReferenceMap.delete(e)},this._onTablesOpen=e=>{this.openedLayers.push(e.layer),this._focusLayerFlowItem=e.layer?.uid},this._onPanelOpen=()=>{this._focusPanelFlowItem=!0},this._onCatalogOpen=e=>{this.openedLayers.push(e.layer?.parent),this._focusLayerFlowItem=e.layer?.uid},this._clearActiveItem=()=>{this._activeItem=null},this._setActiveItem=e=>{if(this.visibilityAppearance!=="default")return;let t=Array.from(e.composedPath()).find(e=>e.classList?.contains(h.item));this._activeItem=y(t)},this._onCalciteListOrderChange=e=>{let{_lastDragDetail:t}=this,{toEl:n,fromEl:r,dragEl:i,newIndex:a}=e,o=t?.newIndex===a&&t?.dragEl===i&&t?.toEl===n&&t?.fromEl===r;if(!r||!n||o)return;this._lastDragDetail=e,this._selectedDragItemLayerUid=i.value;let s=r,c=n;if(s===c){let e=Array.from(r.children).filter(e=>e?.matches(`calcite-list-item`)).map(e=>e.value);this._sortLayers(s,e)}else a!=null&&this._moveLayerFromChildList({toEl:c,fromEl:s,dragEl:i,newIndex:a})},this.announceDeprecation=()=>{n(i.getLogger(this),`Basemap Layer List`,`arcgis-basemap-layer-list`,{version:`5.0`})}}initialize(){this.addHandles([o(()=>this.openedLayers,`change`,()=>this._handleOpenedLayersChange(),s),c(()=>[this.viewModel.referenceItems.toArray(),this.viewModel.baseItems.toArray()],()=>x(this.selectedItems),l),c(()=>[this.baseFilterPredicate,this._baseListEl],()=>S(this._baseListEl,this.baseFilterPredicate)),c(()=>[this.referenceFilterPredicate,this._referenceListEl],()=>S(this._referenceListEl,this.referenceFilterPredicate))])}loadDependencies(){return T({action:()=>import(`@esri/calcite-components/dist/components/calcite-action`),block:()=>import(`@esri/calcite-components/dist/components/calcite-block`),label:()=>import(`@esri/calcite-components/dist/components/calcite-label`),input:()=>import(`@esri/calcite-components/dist/components/calcite-input`),button:()=>import(`@esri/calcite-components/dist/components/calcite-button`),flow:()=>import(`@esri/calcite-components/dist/components/calcite-flow`),"flow-item":()=>import(`@esri/calcite-components/dist/components/calcite-flow-item`),list:()=>import(`@esri/calcite-components/dist/components/calcite-list`),notice:()=>import(`@esri/calcite-components/dist/components/calcite-notice`),tooltip:()=>import(`@esri/calcite-components/dist/components/calcite-tooltip`)})}destroy(){this._tooltipReferenceMap.clear(),this._destroyOpenedLayerLists()}get _visibleBaseItems(){return this.baseItems?.filter(e=>!e.hidden&&(this.visibleElements.errors||!e.error))}get _visibleReferenceItems(){return this.referenceItems?.filter(e=>!e.hidden&&(this.visibleElements.errors||!e.error))}get _openedPanelItems(){return this._visibleReferenceItems.concat(this._visibleBaseItems).flatten(e=>e.children).filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _totalBaseItems(){return this.viewModel.baseItems.flatten(e=>e.children.filter(e=>e.layer?.type!==`catalog-dynamic-group`)).length}get _totalReferenceItems(){return this.viewModel.referenceItems.flatten(e=>e.children.filter(e=>e.layer?.type!==`catalog-dynamic-group`)).length}get _baseFilterEnabled(){return this._totalBaseItems>=this.minFilterItems&&this.visibleElements.filter}get _referenceFilterEnabled(){return this._totalReferenceItems>=this.minFilterItems&&this.visibleElements.filter}get _renderedOpenLayerFlowItems(){let{openedLayers:e}=this;return e.toArray().map((t,n)=>this._renderLayerFlowItem(t,n===e.length-1))}get basemapTitle(){return this.viewModel.basemapTitle}set basemapTitle(e){this.viewModel.basemapTitle=e}get baseListItemCreatedFunction(){return this.viewModel.baseListItemCreatedFunction}set baseListItemCreatedFunction(e){this.viewModel.baseListItemCreatedFunction=e}get icon(){return`layers`}set icon(e){this._overrideIfSome(`icon`,e)}get label(){return this.messages?.widgetLabel??``}set label(e){this._overrideIfSome(`label`,e)}get referenceListItemCreatedFunction(){return this.viewModel.referenceListItemCreatedFunction}set referenceListItemCreatedFunction(e){this.viewModel.referenceListItemCreatedFunction=e}get baseItems(){return this.viewModel.baseItems}get referenceItems(){return this.viewModel.referenceItems}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}render(){let{state:e}=this.viewModel,t={[E.hidden]:e===`loading`,[E.disabled]:e===`disabled`};return k(`div`,{class:this.classes(h.base,E.widget,E.panel,t)},this._renderItems())}async _createCatalogLayerList(e){let{default:t}=await import(`./CatalogLayerList.js`),{headingLevel:n,catalogOptions:r,view:i,filterPlaceholder:a,minFilterItems:o,selectionMode:s,visibilityAppearance:c,_onCatalogOpen:l,_onTablesOpen:u,layerTablesEnabled:d}=this;return new t({headingLevel:n,view:i,filterPlaceholder:a,minFilterItems:o,selectionMode:s,visibilityAppearance:c,...r,catalogLayer:e,layerTablesEnabled:d,onCatalogOpen:l,onTablesOpen:u,suppressDeprecationWarning:!0})}_getTableListParams(e){switch(e.type){case`knowledge-graph`:return{...this.knowledgeGraphOptions,tables:e.tables};case`map-image`:return{...this.mapImageOptions,tables:e.subtables};case`tile`:return{...this.tileOptions,tables:e.subtables};default:return null}}async _createTableList(e){let{default:t}=await import(`./TableList.js`),{headingLevel:n,selectionMode:r,dragEnabled:i}=this;return new t({headingLevel:n,selectionMode:r,dragEnabled:i,...this._getTableListParams(e)})}async _createFlowList(e,t){let{_layerListMap:n}=this,r=n.get(e);if(r)return r;let i=e.type===`catalog`?await this._createCatalogLayerList(e):await this._createTableList(e);return t.aborted||n.set(e,i),i}async _handleOpenedLayersChange(){let{_layerListMap:e,openedLayers:t,openedLayerLists:n}=this;this._openedLayersController?.abort();let r=new AbortController,{signal:i}=r;this._openedLayersController=r,e.forEach((n,r)=>{t.includes(r)||(n.destroy(),e.delete(r))});let a=await Promise.all(t.map(e=>this._createFlowList(e,i)));if(i.aborted)return;n.removeAll(),n.addMany(a);let o=n.at(-1);o?`catalogLayer`in o?(this._set(`catalogLayerList`,o),this._set(`tableList`,null)):(this._set(`catalogLayerList`,null),this._set(`tableList`,o)):(this._set(`catalogLayerList`,null),this._set(`tableList`,null))}_destroyOpenedLayerLists(){this.openedLayerLists.destroyAll(),this.openedLayers.removeAll(),this._layerListMap.clear()}_renderItemTooltip(e){return e?k(`calcite-tooltip`,{key:`tooltip-${e.layer?.uid}`,overlayPositioning:`fixed`,referenceElement:this._tooltipReferenceMap.get(e.layer?.uid),topLayerDisabled:this.topLayerDisabled},this.messages.layerIncompatibleTooltip):null}_renderItemTooltipNodes(e){return e.incompatible?this._renderItemTooltip(e):e.children?.filter(e=>!e.hidden).toArray().map(e=>this._renderItemTooltipNodes(e))}_renderItemTooltips(){return this._visibleReferenceItems.concat(this._visibleBaseItems)?.toArray().map(e=>this._renderItemTooltipNodes(e))}_focusLayerFlowItemNode(e){this._focusLayerFlowItem===e.dataset.layerUid&&(this._focusLayerFlowItem=null,M(e))}_renderPanelFlowItems(){let{_openedPanelItems:e,openedLayers:t}=this;return e.toArray().map(({title:n,panel:r},i)=>{let a=()=>this._handlePanelFlowItemBack(r);return k(`calcite-flow-item`,{afterCreate:this._focusPanelFlowItemNode,afterUpdate:this._focusPanelFlowItemNode,bind:this,description:n,heading:r.title,headingLevel:this.headingLevel,key:`flow-panel-${r.uid}`,selected:!t.length&&i===e.length-1,onCalciteFlowItemBack:e=>{e.preventDefault(),a()}},r.render(),k(`calcite-button`,{appearance:`transparent`,slot:`footer-start`,width:`full`,onclick:a},this.messagesCommon.back))})}_handlePanelFlowItemBack(e){e.open=!1,this._focusRootFlowItem=!0}_focusEditingFlowItemNode(e){this._focusEditingFlowItem&&(this._focusEditingFlowItem=!1,M(e))}_focusRootFlowItemNode(e){this._focusRootFlowItem&&(this._focusRootFlowItem=!1,M(e))}_focusPanelFlowItemNode(e){this._focusPanelFlowItem&&(this._focusPanelFlowItem=!1,M(e))}_renderItem(e,t,n,r){return k(g,{activeItem:this._activeItem,canMove:this._canMove,css:h,displayMode:P,dragDisabled:t,dragEnabled:this.dragEnabled,item:e,key:`layerListItem-${e.layer?.uid}`,layerTablesEnabled:this.layerTablesEnabled,listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,messagesCommon:this.messagesCommon,parent:n,parentTitles:r,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,visibilityAppearance:this.visibilityAppearance,visibleElements:this.visibleElements,onAction:this._onTriggerAction,onCatalogOpen:this._onCatalogOpen,onPanelOpen:this._onPanelOpen,onSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,onTablesOpen:this._onTablesOpen,onTooltipReferenceChange:this._onTooltipReferenceChange})}_moveLayerFromChildList({toEl:e,fromEl:t,dragEl:n,newIndex:r}){let i=y(n),a=y(e),o=y(t),s=L(t),c=L(e);s&&c&&this.viewModel.moveListItem({targetItem:i,fromParentItem:o,toParentItem:a,newIndex:r,from:s,to:c})}_handleCalciteListDragEnd({fromEl:e,dragEl:t,oldIndex:n}){n!=null&&e.insertBefore(t,e.children[n])}_sortLayers(e,t){if(e){if(e===this._referenceListEl||e===this._baseListEl){let n=e===this._referenceListEl?`reference`:`base`,r=n===`base`?this.view?.map?.basemap?.baseLayers:n===`reference`?this.view?.map?.basemap?.referenceLayers:null;C(r,t)}else{let n=y(e);if(!n)return;w(n,t)}}}_handleCalciteListChange(e){let{selectionMode:t,selectedItems:n}=this;if(t===`none`)return;let r=e.target.selectedItems.map(e=>y(e)).filter(Boolean);n.removeAll(),n.addMany(r)}_renderEditingInput(){let{messages:e}=this,{basemapTitle:t}=this.viewModel;return k(`div`,{class:h.editing},k(`calcite-label`,null,e.basemapTitle,k(`calcite-input`,{afterCreate:e=>this._editTitleInput=e,label:e.basemapTitle,name:`basemaptitle`,pattern:`.*\\S+.*`,placeholder:e.basemapTitle,required:!0,title:e.basemapTitle,type:`text`,value:t??void 0})))}_renderCancelButton(){let{messagesCommon:{cancel:e}}=this;return k(`calcite-button`,{appearance:`outline`,bind:this,label:e,slot:`footer`,title:e,width:`full`,onclick:this._toggleEditingTitle},e)}_renderSubmitButton(){let{messagesCommon:e}=this;return k(`calcite-button`,{label:e.form.submit,slot:`footer`,title:e.form.submit,type:`submit`,width:`full`},e.form.ok)}_renderEditingFlowItem(){return this.editingTitle?k(`calcite-flow-item`,{afterCreate:this._focusEditingFlowItemNode,afterUpdate:this._focusEditingFlowItemNode,bind:this,heading:this.visibleElements.heading?this.messages.basemapTitle:void 0,headingLevel:this.headingLevel,selected:this.openedLayers.length===0&&this._openedPanelItems.length===0,onCalciteFlowItemBack:e=>{e.preventDefault(),this._toggleEditingTitle()}},this._renderEditingInput(),this._renderCancelButton(),this._renderSubmitButton()):null}_renderEditTitleButton(){let{editingTitle:e,visibleElements:t,messagesCommon:n}=this,r=n.edit;return t.editTitleButton&&!e?k(`calcite-action`,{bind:this,icon:`pencil`,slot:`header-actions-end`,text:r,title:r,onclick:this._toggleEditingTitle}):null}_renderNoLayersInfoMessage(e){return k(`div`,{slot:`message`},e)}_renderNoLayersInfo(e,t){return k(`div`,{class:h.itemMessage},k(`calcite-notice`,{icon:`information`,key:t,kind:`info`,open:!0,width:`full`},this._renderNoLayersInfoMessage(e)))}_renderItems(){let{collapsed:e,visible:t,visibleElements:{closeButton:n,collapseButton:r,heading:i,flow:a},messages:o,viewModel:s}=this,c=[k(`calcite-flow-item`,{afterCreate:this._focusRootFlowItemNode,afterUpdate:this._focusRootFlowItemNode,bind:this,closable:n,closed:!t,collapsed:e,collapsible:r,heading:i?s.basemapTitle??o.widgetLabel:void 0,headingLevel:this.headingLevel,key:`root-flow-item`,selected:!this.editingTitle&&this.openedLayers.length===0&&this._openedPanelItems.length===0,onCalciteFlowItemClose:()=>this.visible=!1},this._renderEditTitleButton(),this._renderReferenceSection(),this._renderBaseSection()),this._renderEditingFlowItem(),this._renderPanelFlowItems(),this._renderedOpenLayerFlowItems],l=a?k(`calcite-flow`,{key:`root-flow`},c):c;return t?[this.editingTitle?k(`form`,{bind:this,class:h.editingForm,onsubmit:this._formSubmit},l):l,this._renderItemTooltips()]:null}_renderLayerFlowItem(e,t){let{messages:n,openedLayers:r}=this,i=e.title||this.messages.untitledLayer;return k(`calcite-flow-item`,{afterCreate:this._focusLayerFlowItemNode,afterUpdate:this._focusLayerFlowItemNode,bind:this,"data-layer-uid":e.uid,description:i,heading:n[e.type===`catalog`?`catalogLayers`:`tables`],headingLevel:this.headingLevel,key:`flow-layer-list-${e.uid}`,selected:t,onCalciteFlowItemBack:e=>{e.preventDefault(),r.pop();let t=r.at(-1);t?this._focusLayerFlowItem=t.uid:this._focusRootFlowItem=!0}},this._layerListMap.get(e)?.render())}_renderList(e,t,n){let{messages:r,dragEnabled:i,selectionMode:a,filterPlaceholder:o,baseFilterText:s,referenceFilterText:c,_baseFilterEnabled:l,_referenceFilterEnabled:u,_rootGroupUid:d}=this,f=t===`reference`?r.noReferenceLayers:r.noBaseLayers,p=t===`reference`?u:l;return k(`calcite-block`,{class:h.section,expandable:!0,expanded:!0,heading:t===`reference`?r.referenceHeading:r.baseHeading,headingLevel:D(this.headingLevel),key:`block-${t}`},e?.length?null:this._renderNoLayersInfo(f,t),k(`calcite-list`,{afterCreate:e=>{t===`reference`?this._referenceListEl=e:this._baseListEl=e,e.addEventListener(`focusin`,this._setActiveItem),e.addEventListener(`focusout`,this._clearActiveItem)},afterRemoved:e=>{t===`reference`?this._referenceListEl=null:this._baseListEl=null,e.removeEventListener(`focusin`,this._setActiveItem),e.removeEventListener(`focusout`,this._clearActiveItem)},canPull:e=>this._canMove(e,`pull`),canPut:e=>this._canMove(e,`put`),displayMode:P,filterProps:O,[F]:t,"data-layer-type":d,dragEnabled:i,filterEnabled:p,filterPlaceholder:o,filterText:p?t===`reference`?c:s:``,group:d,key:`list-${t}`,label:r.widgetLabel,selectionAppearance:`border`,selectionMode:a,onCalciteListChange:e=>this._handleCalciteListChange(e),onCalciteListDragEnd:e=>this._handleCalciteListDragEnd(e.detail),onCalciteListFilter:e=>this[t===`reference`?`referenceFilterText`:`baseFilterText`]=e.currentTarget?.filterText??``,onCalciteListOrderChange:e=>this._onCalciteListOrderChange(e.detail),onmouseleave:this._clearActiveItem,onmouseover:this._setActiveItem},e?.toArray().map(e=>this._renderItem(e,n)),p?k(`div`,{class:h.filterNoResults,slot:`filter-no-results`},k(`calcite-notice`,{kind:`info`,open:!0,width:`full`},this._renderNoLayersInfoMessage(f))):null))}_renderBaseSection(){let{_visibleBaseItems:e}=this;return this.visibleElements.baseLayers?this._renderList(e,`base`,e?.length===1):null}_renderReferenceSection(){return this.visibleElements.referenceLayers?this._renderList(this._visibleReferenceItems,`reference`,!1):null}_toggleEditingTitle(){let{editingTitle:e}=this,t=!e;this.editingTitle=t,t?this._focusEditingFlowItem=!0:this._focusRootFlowItem=!0}_formSubmit(e){e.preventDefault();let t=this._editTitleInput?.value;t?.trim()&&(this.basemapTitle=t),this._toggleEditingTitle()}};e([u()],I.prototype,`_baseListEl`,void 0),e([u()],I.prototype,`_referenceListEl`,void 0),e([u()],I.prototype,`_activeItem`,void 0),e([u()],I.prototype,`_tooltipReferenceMap`,void 0),e([u()],I.prototype,`_focusRootFlowItem`,void 0),e([u()],I.prototype,`_focusPanelFlowItem`,void 0),e([u()],I.prototype,`_focusLayerFlowItem`,void 0),e([u()],I.prototype,`_focusEditingFlowItem`,void 0),e([u()],I.prototype,`_layerListMap`,void 0),e([u()],I.prototype,`_visibleBaseItems`,null),e([u()],I.prototype,`_visibleReferenceItems`,null),e([u()],I.prototype,`_openedPanelItems`,null),e([u()],I.prototype,`_totalBaseItems`,null),e([u()],I.prototype,`_totalReferenceItems`,null),e([u()],I.prototype,`_baseFilterEnabled`,null),e([u()],I.prototype,`_referenceFilterEnabled`,null),e([u()],I.prototype,`_renderedOpenLayerFlowItems`,null),e([u()],I.prototype,`basemapTitle`,null),e([u({readOnly:!0})],I.prototype,`catalogLayerList`,void 0),e([u()],I.prototype,`catalogOptions`,void 0),e([u()],I.prototype,`collapsed`,void 0),e([u()],I.prototype,`dragEnabled`,void 0),e([u()],I.prototype,`editingTitle`,void 0),e([u()],I.prototype,`filterPlaceholder`,void 0),e([u()],I.prototype,`baseFilterPredicate`,void 0),e([u()],I.prototype,`baseFilterText`,void 0),e([u()],I.prototype,`referenceFilterPredicate`,void 0),e([u()],I.prototype,`referenceFilterText`,void 0),e([u()],I.prototype,`listItemCanGiveFunction`,void 0),e([u()],I.prototype,`listItemCanReceiveFunction`,void 0),e([u()],I.prototype,`baseListItemCreatedFunction`,null),e([u()],I.prototype,`headingLevel`,void 0),e([u()],I.prototype,`icon`,null),e([u()],I.prototype,`knowledgeGraphOptions`,void 0),e([u()],I.prototype,`label`,null),e([u()],I.prototype,`layerTablesEnabled`,void 0),e([u()],I.prototype,`mapImageOptions`,void 0),e([u(),A(`esri/widgets/BasemapLayerList/t9n/BasemapLayerList`)],I.prototype,`messages`,void 0),e([u(),A(`esri/t9n/common`)],I.prototype,`messagesCommon`,void 0),e([u()],I.prototype,`minFilterItems`,void 0),e([u({readOnly:!0})],I.prototype,`openedLayers`,void 0),e([u({readOnly:!0})],I.prototype,`openedLayerLists`,void 0),e([u()],I.prototype,`referenceListItemCreatedFunction`,null),e([u({readOnly:!0})],I.prototype,`tableList`,void 0),e([u({readOnly:!0})],I.prototype,`baseItems`,null),e([u({readOnly:!0})],I.prototype,`referenceItems`,null),e([u({type:N})],I.prototype,`selectedItems`,void 0),e([u()],I.prototype,`selectionMode`,void 0),e([u()],I.prototype,`tileOptions`,void 0),e([u()],I.prototype,`view`,null),e([j(`trigger-action`),u({type:p})],I.prototype,`viewModel`,void 0),e([u()],I.prototype,`visibilityAppearance`,void 0),e([u({type:m,nonNullable:!0})],I.prototype,`visibleElements`,void 0),I=e([d(`esri.widgets.BasemapLayerList`)],I);function L(e){return e?.closest(`[${F}]`)?.getAttribute(F)}const R=I;export{R as default};
|