@arcgis/core 4.31.0-next.20240919 → 4.31.0-next.20240921
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/WebDocument2D.js +1 -1
- package/WebLinkChart.js +1 -1
- package/WebMap.js +1 -1
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/arcade/featureset/actions/Adapted.js +1 -1
- package/arcade/featureset/support/StatsField.js +1 -1
- package/arcade/featureset/support/errorsupport.js +1 -1
- package/arcade/featureset/support/sqlUtils.js +1 -1
- package/arcade/functions/maths.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{d9d8606f0a7c82b42755.js → 093a1ee161cb6a840283.js} +1 -1
- package/assets/esri/core/workers/chunks/2020b99675caabf5ac87.js +1 -0
- package/assets/esri/core/workers/chunks/24d45530fe47b3114daf.js +1 -0
- package/assets/esri/core/workers/chunks/35f92652df2561845d47.js +1 -0
- package/assets/esri/core/workers/chunks/42b92b4c2c9fd2b15f60.js +2 -0
- package/assets/esri/core/workers/chunks/{ba561e03df67894e437f.js.LICENSE.txt → 42b92b4c2c9fd2b15f60.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/65b1d7fa57d4c764efe8.js +1 -0
- package/assets/esri/core/workers/chunks/{b99d380cce485e65c990.js → 6cda92678ffeeaea0330.js} +1 -1
- package/assets/esri/core/workers/chunks/736e0c5cb9010ca818d8.js +1 -0
- package/assets/esri/core/workers/chunks/757b83799555958e059c.js +1 -0
- package/assets/esri/core/workers/chunks/76d8192015ce46dbf92a.js +1 -0
- package/assets/esri/core/workers/chunks/7b4880b2dc6b01d70ccc.js +1 -0
- package/assets/esri/core/workers/chunks/884cd0bd036c65567929.js +1 -0
- package/assets/esri/core/workers/chunks/95ea77a7d63c9d7ed78b.js +1 -0
- package/assets/esri/core/workers/chunks/{da3a4eb3fbb9dd509b4b.js → 98e872da08203455a5b6.js} +1 -1
- package/assets/esri/core/workers/chunks/ad4fa125e09cc0047f5b.js +1 -0
- package/assets/esri/core/workers/chunks/bb5a18dd1e6a71905668.js +2 -0
- package/assets/esri/core/workers/chunks/bf406a46515d5dfebe06.js +1 -0
- package/assets/esri/core/workers/chunks/d9c34e07627d93d4670b.js +1 -0
- package/assets/esri/core/workers/chunks/e1e9a7695e48e34a69bd.js +1 -0
- package/assets/esri/core/workers/chunks/e4f1464ed269c301b4ee.js +1 -0
- package/assets/esri/core/workers/chunks/{072029d05ccb56979523.js → e611141692355a1ba2b2.js} +1 -1
- package/assets/esri/core/workers/chunks/f41e8d0d6f5e81289179.js +1 -0
- package/assets/esri/core/workers/chunks/f7c96d34c70ed36da7c2.js +1 -0
- package/assets/esri/core/workers/chunks/{5ca8e767cc03e1425338.js → f9e90a2fda559ca68848.js} +1 -1
- package/assets/esri/themes/base/_functions.scss +6 -2
- package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +4 -0
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +6 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ar.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bg.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bs.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ca.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_cs.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_da.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_de.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_el.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_en.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_es.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_et.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fi.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fr.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_he.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hr.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hu.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_id.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_it.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ja.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ko.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lt.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lv.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_nb.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_nl.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pl.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-BR.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-PT.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ro.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ru.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sk.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sl.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sr.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sv.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_th.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_tr.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_uk.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_vi.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-CN.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-HK.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-TW.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nb.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
- package/chunks/Bufferer-93RDFIRm.js +5 -0
- package/chunks/Centroid-DZi-eb9F.js +1 -1
- package/chunks/ComponentShader.glsl.js +10 -13
- package/chunks/Distance2DCalculator-De7WFGFq.js +5 -0
- package/chunks/GeodeticDistanceCalculator-CN7xMqrJ.js +5 -0
- package/chunks/LineSeries.js +1 -1
- package/chunks/{OITCompositing.glsl.js → OITBlend.glsl.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/OperatorProximity.js +1 -1
- package/chunks/OperatorShapePreservingLength.js +5 -0
- package/chunks/Polyline.js +1 -1
- package/chunks/Theme.js +1 -1
- package/chunks/Tick.js +1 -1
- package/chunks/tslib.es6.js +1 -1
- package/core/mathUtils.js +1 -1
- package/core/sql/AggregateFunctions.js +1 -1
- package/core/sql/SqlInterval.js +1 -1
- package/core/sql/StandardizedFunctions.js +1 -1
- package/core/sql/WhereClause.js +1 -1
- package/core/sql/WhereGrammar.js +1 -1
- package/core/sql/errorSupport.js +5 -0
- package/core/sql/sqlArithmeticUtils.js +1 -1
- package/core/sql/sqlCompareUtils.js +1 -1
- package/core/sql/sqlDateParsingUtils.js +1 -1
- package/geometry/operators/areaOperator.js +5 -0
- package/geometry/operators/containsOperator.js +1 -1
- package/geometry/operators/crossesOperator.js +1 -1
- package/geometry/operators/disjointOperator.js +1 -1
- package/geometry/operators/distanceOperator.js +1 -1
- package/geometry/operators/equalsOperator.js +1 -1
- package/geometry/operators/geodeticDensifyOperator.js +5 -0
- package/geometry/operators/graphicBufferOperator.js +5 -0
- package/geometry/operators/gx/operatorAutoComplete.js +1 -1
- package/geometry/operators/gx/operatorBuffer.js +1 -1
- package/geometry/operators/gx/operatorClip.js +1 -1
- package/geometry/operators/gx/operatorConvexHull.js +1 -1
- package/geometry/operators/gx/operatorCut.js +1 -1
- package/geometry/operators/gx/operatorDifference.js +1 -1
- package/geometry/operators/gx/operatorGeodesicBuffer.js +1 -1
- package/geometry/operators/gx/operatorGeodeticArea.js +1 -1
- package/geometry/operators/gx/{operatorGeodeticDensifyByLength.js → operatorGeodeticDensify.js} +1 -1
- package/geometry/operators/gx/operatorGeodeticDistance.js +1 -1
- package/geometry/operators/gx/operatorGeodeticLength.js +1 -1
- package/geometry/operators/gx/operatorGraphicBuffer.js +5 -0
- package/geometry/operators/gx/operatorIntegrate.js +1 -1
- package/geometry/operators/gx/operatorIntersection.js +1 -1
- package/geometry/operators/gx/operatorLabelPoint.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/operators/gx/operatorSimplify.js +1 -1
- package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
- package/geometry/operators/gx/operatorUnion.js +1 -1
- package/geometry/operators/intersectsOperator.js +1 -1
- package/geometry/operators/isNearOperator.js +1 -1
- package/geometry/operators/lengthOperator.js +5 -0
- package/geometry/operators/overlapsOperator.js +1 -1
- package/geometry/operators/proximityOperator.d.ts +4 -0
- package/geometry/operators/proximityOperator.js +1 -1
- package/geometry/operators/relateOperator.js +1 -1
- package/geometry/operators/reshapeOperator.js +1 -1
- package/geometry/operators/touchesOperator.js +1 -1
- package/geometry/operators/withinOperator.js +1 -1
- package/interfaces.d.ts +310 -28
- package/layers/mixins/ArcGISMapService.js +1 -1
- package/layers/support/ControlPointsGeoreference.js +1 -1
- package/layers/support/MediaElementBase.js +1 -1
- package/layers/support/mediaUtils.js +1 -1
- package/linkChart/LinkChartProperties.js +1 -1
- package/linkChart/utils.js +1 -1
- package/package.json +2 -2
- package/portal/schemas/definitions.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/layers/GraphicsLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/support/highlightGroupUtils.js +1 -1
- package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/transform/ExtentTransformTool.js +1 -1
- package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
- package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlend.glsl.js +5 -0
- package/views/3d/webgl-engine/effects/transparency/OITBlend.js +5 -0
- package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +5 -0
- package/views/3d/webgl-engine/lib/CompositingHelper.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/LinkChartView.js +1 -1
- package/views/MapView.js +1 -1
- package/views/View.js +1 -1
- package/views/View2D.js +1 -1
- package/views/draw/DrawGraphicTool.js +1 -1
- package/views/draw/support/Box.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/interactive/Tooltip.d.ts +4 -0
- package/views/interactive/Tooltip.js +5 -0
- package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
- package/webdoc/widgets/TimeSlider.js +1 -1
- package/webmap/InitialViewProperties.js +1 -1
- package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
- package/widgets/BasemapGallery.js +1 -1
- package/widgets/BasemapLayerList/css.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/templates/BatchAttributeFormElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/BatchAttributeFormTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/BatchFieldElementTemplate.js +1 -1
- package/widgets/BatchAttributeForm/templates/batchAttributeFormTemplateUtils.js +1 -1
- package/widgets/CatalogLayerList.js +1 -1
- package/widgets/Feature/FeatureMedia/pieChart.js +1 -1
- package/widgets/Feature/FeatureMedia/xyChart.js +1 -1
- package/widgets/FeatureForm/FieldInput.js +1 -1
- package/widgets/LayerList/LayerListItem.js +1 -1
- package/widgets/LayerList/LayerListViewModel.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/OrientedImageryViewerViewModelAdapter2D.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/OrientedImageryViewerViewModelAdapter3D.js +1 -1
- package/widgets/OrientedImageryViewer/constants.js +1 -1
- package/widgets/OrientedImageryViewer/css.js +1 -1
- package/widgets/OrientedImageryViewer/utils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/ScaleBar/ScaleBarViewModel.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/support/SnappingControls.js +1 -1
- package/assets/esri/core/workers/chunks/0cfa9665dab31e5235a8.js +0 -1
- package/assets/esri/core/workers/chunks/22fb5687932019304225.js +0 -1
- package/assets/esri/core/workers/chunks/3b3c8362359a82c66793.js +0 -1
- package/assets/esri/core/workers/chunks/3cb1de0b9bf9a25112e0.js +0 -1
- package/assets/esri/core/workers/chunks/59833b27d8413b6d9312.js +0 -1
- package/assets/esri/core/workers/chunks/5e43cb91bbe20f2d32e3.js +0 -1
- package/assets/esri/core/workers/chunks/67df47efb9a9dfeafee2.js +0 -1
- package/assets/esri/core/workers/chunks/6be62448e33baabe028c.js +0 -1
- package/assets/esri/core/workers/chunks/6d668f7696f280ec9588.js +0 -1
- package/assets/esri/core/workers/chunks/74edde71352e1f578a3b.js +0 -1
- package/assets/esri/core/workers/chunks/907e74abb4a85a76e3b5.js +0 -1
- package/assets/esri/core/workers/chunks/941fe04f47059074c05b.js +0 -2
- package/assets/esri/core/workers/chunks/a0005bc65f79e83f26ee.js +0 -1
- package/assets/esri/core/workers/chunks/a6560ff77be29344bc50.js +0 -1
- package/assets/esri/core/workers/chunks/a6c3c1827d2e8bbfcd9e.js +0 -1
- package/assets/esri/core/workers/chunks/ba561e03df67894e437f.js +0 -2
- package/assets/esri/core/workers/chunks/df9daac7ea581e9e5ca4.js +0 -1
- package/assets/esri/core/workers/chunks/ea51a7c32f716f4f1a34.js +0 -1
- package/assets/esri/core/workers/chunks/ef7dcb8758e7f21d30bc.js +0 -1
- package/chunks/Distance2DCalculator-BzAEa8Xe.js +0 -5
- package/chunks/GeodeticDistanceCalculator-BS_KY66f.js +0 -5
- package/chunks/OperatorShapePreservingDensify.js +0 -5
- package/geometry/operators/geodeticDensifyByLengthOperator.js +0 -5
- package/geometry/operators/gx/operatorShapePreservingDensify.js +0 -5
- package/geometry/operators/shapePreservingDensifyOperator.js +0 -5
- package/views/3d/webgl-engine/shaders/OITCompositing.glsl.js +0 -5
- package/views/3d/webgl-engine/shaders/OITCompositingTechnique.js +0 -5
- package/views/interactive/tooltip/Tooltip.js +0 -5
- /package/assets/esri/core/workers/chunks/{941fe04f47059074c05b.js.LICENSE.txt → bb5a18dd1e6a71905668.js.LICENSE.txt} +0 -0
|
@@ -959,7 +959,7 @@ screenSizePerspectiveScaleFactor(absCosAngle, distanceToCamera, params)
|
|
|
959
959
|
return mix(size * clamp(factor.x, factor.z, 1.0), size, factor.y);
|
|
960
960
|
}`),e.vertex.code.add(a.H`vec2 screenSizePerspectiveScaleVec2(vec2 size, float absCosAngle, float distanceToCamera, vec3 params) {
|
|
961
961
|
return applyScreenSizePerspectiveScaleFactorVec2(size, screenSizePerspectiveScaleFactor(absCosAngle, distanceToCamera, params));
|
|
962
|
-
}`)}function c(e){e.uniforms.add(new n.t("screenSizePerspective",(e=>d(e.screenSizePerspective))))}function l(e){e.uniforms.add(new n.t("screenSizePerspectiveAlignment",(e=>d(e.screenSizePerspectiveAlignment||e.screenSizePerspective))))}function d(e){return(0,i.a)(u,e.parameters.divisor,e.parameters.offset,e.minScaleFactor)}const u=(0,o.vt)()},20693:(e,t,r)=>{r.d(t,{yu:()=>f,Nz:()=>T,NB:()=>p,S7:()=>_});var i=r(58083),o=r(9093),n=r(38954),a=r(51850),s=r(40710),c=r(33079),l=r(20304),d=r(39589),u=r(46263);class h extends d.n{constructor(e,t){super(e,"mat4",u.c.Draw,((r,i,o)=>r.setUniformMatrix4fv(e,t(i,o))))}}var m=r(40095);function f(e,t){t.instancedDoublePrecision?e.constants.add("cameraPosition","vec3",a.uY):e.uniforms.add(new s.W("cameraPosition",((e,t)=>(0,n.a)(v,t.camera.viewInverseTransposeMatrix[3]-e.origin[0],t.camera.viewInverseTransposeMatrix[7]-e.origin[1],t.camera.viewInverseTransposeMatrix[11]-e.origin[2]))))}function p(e,t){if(!t.instancedDoublePrecision)return void e.uniforms.add(new m.X("proj",((e,t)=>t.camera.projectionMatrix)),new h("view",((e,t)=>(0,i.Tl)(g,t.camera.viewMatrix,e.origin))),new s.W("localOrigin",(e=>e.origin)));const r=e=>(0,n.a)(v,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]);e.uniforms.add(new m.X("proj",((e,t)=>t.camera.projectionMatrix)),new m.X("view",((e,t)=>(0,i.Tl)(g,t.camera.viewMatrix,r(t)))),new c.t("localOrigin",((e,t)=>r(t))))}const g=(0,o.vt)(),v=(0,a.vt)();function _(e){e.uniforms.add(new m.X("viewNormal",((e,t)=>t.camera.viewInverseTransposeMatrix)))}function T(e){e.uniforms.add(new l.m("pixelRatio",((e,t)=>t.camera.pixelRatio/t.overlayStretch)))}},95250:(e,t,r)=>{r.d(t,{e:()=>n});var i=r(39589),o=r(46263);class n extends i.n{constructor(e,t){super(e,"bool",o.c.Pass,((r,i,o)=>r.setUniform1b(e,t(i,o))))}}},68259:(e,t,r)=>{r.d(t,{t:()=>n});var i=r(39589),o=r(46263);class n extends i.n{constructor(e,t){super(e,"vec2",o.c.Draw,((r,i,o,n)=>r.setUniform2fv(e,t(i,o,n))))}}},47286:(e,t,r)=>{r.d(t,{G:()=>n});var i=r(39589),o=r(46263);class n extends i.n{constructor(e,t){super(e,"vec2",o.c.Pass,((r,i,o)=>r.setUniform2fv(e,t(i,o))))}}},71988:(e,t,r)=>{r.d(t,{E:()=>n});var i=r(39589),o=r(46263);class n extends i.n{constructor(e,t){super(e,"vec4",o.c.Pass,((r,i,o)=>r.setUniform4fv(e,t(i,o))))}}},93588:(e,t,r)=>{r.d(t,{c:()=>n});var i=r(39589),o=r(46263);class n extends i.n{constructor(e,t){super(e,"int",o.c.Pass,((r,i,o)=>r.setUniform1i(e,t(i,o))))}}},85977:(e,t,r)=>{r.d(t,{N5:()=>c});var i=r(49186),o=(r(44208),r(53966)),n=r(46263),a=r(620);class s{constructor(){this._includedModules=new Map}include(e,t){this._includedModules.has(e)?this._includedModules.get(e):(this._includedModules.set(e,t),e(this.builder,t))}}class c extends s{constructor(){super(...arguments),this.vertex=new h,this.fragment=new h,this.attributes=new m,this.varyings=new f,this.extensions=new p,this.outputs=new g}get fragmentUniforms(){return this.fragment.uniforms.entries}get builder(){return this}generate(e){const t=this.extensions.generateSource(e),r=this.attributes.generateSource(e),i=this.varyings.generateSource(e),o="vertex"===e?this.vertex:this.fragment,n=o.uniforms.generateSource(),a=o.code.generateSource(),s=o.main.generateSource(),c="vertex"===e?T:_,l=o.constants.generateSource(),d=this.outputs.generateSource(e);return`#version 300 es\n${t.join("\n")}\n\n${c}\n\n${l.join("\n")}\n\n${n.join("\n")}\n\n${r.join("\n")}\n\n${i.join("\n")}\n\n${d.join("\n")}\n\n${a.join("\n")}\n\n${s.join("\n")}`}generateBindPass(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Pass];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Pass];r&&t.set(e.name,r)}));const r=Array.from(t.values()),i=r.length;return(t,o)=>{for(let n=0;n<i;++n)r[n](e,t,o)}}generateBindDraw(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Draw];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Draw];r&&t.set(e.name,r)}));const r=Array.from(t.values()),i=r.length;return(t,o,n)=>{for(let a=0;a<i;++a)r[a](e,n,t,o)}}}class l{constructor(e){this._stage=e,this._entries=new Map}add(...e){for(const t of e)this._add(t);return this._stage}get(e){return this._entries.get(e)}_add(e){if(null!=e){if(this._entries.has(e.name)&&!this._entries.get(e.name).equals(e))throw new i.A(`Duplicate uniform name ${e.name} for different uniform type`);this._entries.set(e.name,e)}else o.A.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder").error(`Trying to add null Uniform from ${(new Error).stack}.`)}generateSource(){return Array.from(this._entries.values()).map((e=>null!=e.arraySize?`uniform ${e.type} ${e.name}[${e.arraySize}];`:`uniform ${e.type} ${e.name};`))}get entries(){return Array.from(this._entries.values())}}class d{constructor(e){this._stage=e,this._bodies=new Array}add(e){return this._bodies.push(e),this._stage}generateSource(){if(this._bodies.length>0)return[`void main() {\n ${this._bodies.join("\n")||""} \n}`];throw new i.A("Shader does not contain main function body.")}}class u{constructor(e){this._stage=e,this._entries=new Array}add(e){return this._entries.push(e),this._stage}generateSource(){return this._entries}}class h extends s{constructor(){super(...arguments),this.uniforms=new l(this),this.main=new d(this),this.code=new u(this),this.constants=new v(this)}get builder(){return this}}class m{constructor(){this._entries=new Array}add(e,t){this._entries.push([e,t])}generateSource(e){return"fragment"===e?[]:this._entries.map((e=>`in ${e[1]} ${e[0]};`))}}class f{constructor(){this._entries=new Map}add(e,t){this._entries.has(e)&&(0,a.vA)(this._entries.get(e)===t),this._entries.set(e,t)}generateSource(e){const t=new Array;return this._entries.forEach(((r,i)=>t.push("vertex"===e?`out ${r} ${i};`:`in ${r} ${i};`))),t}}class p{constructor(){this._entries=new Set}add(e){this._entries.add(e)}generateSource(e){const t="vertex"===e?p.ALLOWLIST_VERTEX:p.ALLOWLIST_FRAGMENT;return Array.from(this._entries).filter((e=>t.includes(e))).map((e=>`#extension ${e} : enable`))}}p.ALLOWLIST_FRAGMENT=["GL_EXT_shader_texture_lod","GL_OES_standard_derivatives"],p.ALLOWLIST_VERTEX=[];class g{constructor(){this._entries=new Map}add(e,t,r=0){const i=this._entries.get(r);i?(0,a.vA)(i.name===e&&i.type===t,`Fragment shader output location ${r} occupied`):this._entries.set(r,{name:e,type:t})}generateSource(e){if("vertex"===e)return[];0===this._entries.size&&this._entries.set(0,{name:g.DEFAULT_NAME,type:g.DEFAULT_TYPE});const t=new Array;return this._entries.forEach(((e,r)=>t.push(`layout(location = ${r}) out ${e.type} ${e.name};`))),t}}g.DEFAULT_TYPE="vec4",g.DEFAULT_NAME="fragColor";class v{constructor(e){this._stage=e,this._entries=new Set}add(e,t,r){let i="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":i=v._numberToFloatStr(r);break;case"int":i=v._numberToIntStr(r);break;case"bool":i=r.toString();break;case"vec2":i=`vec2(${v._numberToFloatStr(r[0])}, ${v._numberToFloatStr(r[1])})`;break;case"vec3":i=`vec3(${v._numberToFloatStr(r[0])}, ${v._numberToFloatStr(r[1])}, ${v._numberToFloatStr(r[2])})`;break;case"vec4":i=`vec4(${v._numberToFloatStr(r[0])}, ${v._numberToFloatStr(r[1])}, ${v._numberToFloatStr(r[2])}, ${v._numberToFloatStr(r[3])})`;break;case"ivec2":i=`ivec2(${v._numberToIntStr(r[0])}, ${v._numberToIntStr(r[1])})`;break;case"ivec3":i=`ivec3(${v._numberToIntStr(r[0])}, ${v._numberToIntStr(r[1])}, ${v._numberToIntStr(r[2])})`;break;case"ivec4":i=`ivec4(${v._numberToIntStr(r[0])}, ${v._numberToIntStr(r[1])}, ${v._numberToIntStr(r[2])}, ${v._numberToIntStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":i=`${t}(${Array.prototype.map.call(r,(e=>v._numberToFloatStr(e))).join(", ")})`}return this._entries.add(`const ${t} ${e} = ${i};`),this._stage}static _numberToIntStr(e){return e.toFixed(0)}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}}const _="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp sampler2D;\n#else\n precision mediump float;\n precision mediump sampler2D;\n#endif",T="precision highp float;\nprecision highp sampler2D;"},63761:(e,t,r)=>{r.d(t,{N:()=>n});var i=r(39589),o=r(46263);class n extends i.n{constructor(e,t){super(e,"sampler2D",o.c.Pass,((r,i,o)=>r.bindTexture(e,t(i,o))))}}},97220:(e,t,r)=>{r.d(t,{$:()=>i});class i{constructor(e,t){this._module=e,this._loadModule=t}get(){return this._module}async reload(){return this._module=await this._loadModule(),this._module}}},84867:(e,t,r)=>{r.d(t,{w:()=>a});var i=r(97768),o=r(63907),n=r(90644);class a{constructor(e,t,r){this.release=r,this.primitiveType=o.WR.TRIANGLES,this.key=t.key,this._program=this.initializeProgram(e,t),this._pipeline=this.initializePipeline(t),this.reload=()=>{if(!this.key.equals(t.key))throw new Error("Configuration was changed after construction, cannot reload shader");(0,i.WD)(this._program),this._program=this.initializeProgram(e,t),this._pipeline=this.initializePipeline(t)}}destroy(){this._program=(0,i.WD)(this._program),this._pipeline=null}get program(){return this._program}get compiled(){return this.program.compiled}ensureAttributeLocations(e){this.program.assertCompatibleVertexAttributeLocations(e)}getPipeline(e,t){return this._pipeline}initializePipeline(e){return(0,n.Ey)({blending:n.dH,colorWrite:n.kn})}}},51976:(e,t,r)=>{r.d(t,{K:()=>s,W:()=>c});var i=r(49186),o=r(2597),n=r(4576);class a{constructor(e){this._bits=[...e]}equals(e){return(0,n.aI)(this._bits,e.bits)}get code(){return this._code??=String.fromCharCode(...this._bits),this._code}get bits(){return this._bits}}class s extends o.Y{constructor(){super(),this._parameterBits=this._parameterBits?.map((()=>0))??[],this._parameterNames??=[]}get key(){return this._key??=new a(this._parameterBits),this._key}decode(e=this.key){const t=this._parameterBits;this._parameterBits=[...e.bits];const r=this._parameterNames.map((e=>` ${e}: ${this[e]}`)).join("\n");return this._parameterBits=t,r}}function c(e={}){return(t,r)=>{t.hasOwnProperty("_parameterNames")||Object.defineProperty(t,"_parameterNames",{value:t._parameterNames?.slice()??[],configurable:!0,writable:!0}),t.hasOwnProperty("_parameterBits")||Object.defineProperty(t,"_parameterBits",{value:t._parameterBits?.slice()??[0],configurable:!0,writable:!0}),t._parameterNames.push(r);const o=e.count||2,n=Math.ceil(Math.log2(o)),a=t._parameterBits;let s=0;for(;a[s]+n>16;)s++,s>=a.length&&a.push(0);const c=a[s],l=(1<<n)-1<<c;a[s]+=n,e.count?Object.defineProperty(t,r,{get(){return(this._parameterBits[s]&l)>>c},set(t){if(this[r]!==t){if(this._key=null,this._parameterBits[s]=this._parameterBits[s]&~l|+t<<c&l,"number"!=typeof t)throw new i.A(`Configuration value for ${r} must be a number, got ${typeof t}`);if(null==e.count)throw new i.A(`Configuration value for ${r} must provide a count option`)}}}):Object.defineProperty(t,r,{get(){return!!((this._parameterBits[s]&l)>>c)},set(e){if(this[r]!==e&&(this._key=null,this._parameterBits[s]=this._parameterBits[s]&~l|+e<<c&l,"boolean"!=typeof e))throw new i.A(`Configuration value for ${r} must be boolean, got ${typeof e}`)}})}}},57917:(e,t,r)=>{r.d(t,{S:()=>o});var i=r(34275);function o(e){if(e.length<i.y9)return Array.from(e);if((0,i.cy)(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,i.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}},29920:(e,t,r)=>{r.d(t,{j:()=>s});var i=r(3694),o=r(38954),n=r(51850),a=r(620);class s{constructor(e,t,r){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this.position=r,this._children=void 0,(0,a.vA)(e.length>=1),(0,a.vA)(3===r.size||4===r.size);const{data:i,size:s,indices:l}=r;(0,a.vA)(l.length%this._numIndexPerPrimitive==0),(0,a.vA)(l.length>=e.length*this._numIndexPerPrimitive);const d=e.length;let u=s*l[this._numIndexPerPrimitive*e[0]];c.clear(),c.push(u);const h=(0,n.fA)(i[u],i[u+1],i[u+2]),m=(0,n.o8)(h);for(let t=0;t<d;++t){const r=this._numIndexPerPrimitive*e[t];for(let e=0;e<this._numIndexPerPrimitive;++e){u=s*l[r+e],c.push(u);let t=i[u];h[0]=Math.min(t,h[0]),m[0]=Math.max(t,m[0]),t=i[u+1],h[1]=Math.min(t,h[1]),m[1]=Math.max(t,m[1]),t=i[u+2],h[2]=Math.min(t,h[2]),m[2]=Math.max(t,m[2])}}this.bbMin=h,this.bbMax=m;const f=(0,o.o)((0,n.vt)(),this.bbMin,this.bbMax,.5);this.radius=.5*Math.max(Math.max(m[0]-h[0],m[1]-h[1]),m[2]-h[2]);let p=this.radius*this.radius;for(let e=0;e<c.length;++e){u=c.at(e);const t=i[u]-f[0],r=i[u+1]-f[1],o=i[u+2]-f[2],n=t*t+r*r+o*o;if(n<=p)continue;const a=Math.sqrt(n),s=.5*(a-this.radius);this.radius=this.radius+s,p=this.radius*this.radius;const l=s/a;f[0]+=t*l,f[1]+=r*l,f[2]+=o*l}this.center=f,c.clear()}getChildren(){if(this._children||(0,o.s)(this.bbMin,this.bbMax)<=1)return this._children;const e=(0,o.o)((0,n.vt)(),this.bbMin,this.bbMax,.5),t=this.primitiveIndices.length,r=new Uint8Array(t),i=new Array(8);for(let e=0;e<8;++e)i[e]=0;const{data:a,size:c,indices:l}=this.position;for(let o=0;o<t;++o){let t=0;const n=this._numIndexPerPrimitive*this.primitiveIndices[o];let s=c*l[n],d=a[s],u=a[s+1],h=a[s+2];for(let e=1;e<this._numIndexPerPrimitive;++e){s=c*l[n+e];const t=a[s],r=a[s+1],i=a[s+2];t<d&&(d=t),r<u&&(u=r),i<h&&(h=i)}d<e[0]&&(t|=1),u<e[1]&&(t|=2),h<e[2]&&(t|=4),r[o]=t,++i[t]}let d=0;for(let e=0;e<8;++e)i[e]>0&&++d;if(d<2)return;const u=new Array(8);for(let e=0;e<8;++e)u[e]=i[e]>0?new Uint32Array(i[e]):void 0;for(let e=0;e<8;++e)i[e]=0;for(let e=0;e<t;++e){const t=r[e];u[t][i[t]++]=this.primitiveIndices[e]}this._children=new Array;for(let e=0;e<8;++e)void 0!==u[e]&&this._children.push(new s(u[e],this._numIndexPerPrimitive,this.position));return this._children}static prune(){c.prune()}}const c=new i.A({deallocator:null})},69720:(e,t,r)=>{r.d(t,{J:()=>o});var i=r(24326);class o{constructor(){this.id=(0,i.c)()}}},96672:(e,t,r)=>{var i;r.d(t,{X:()=>i}),function(e){e[e.Layer=0]="Layer",e[e.Object=1]="Object",e[e.Mesh=2]="Mesh",e[e.Line=3]="Line",e[e.Point=4]="Point",e[e.Material=5]="Material",e[e.Texture=6]="Texture",e[e.COUNT=7]="COUNT"}(i||(i={}))},39341:(e,t,r)=>{r.d(t,{D:()=>o});var i=r(46540);const o=new Map([[i.r.POSITION,0],[i.r.NORMAL,1],[i.r.NORMALCOMPRESSED,1],[i.r.UV0,2],[i.r.COLOR,3],[i.r.COLORFEATUREATTRIBUTE,3],[i.r.SIZE,4],[i.r.TANGENT,4],[i.r.CENTEROFFSETANDDISTANCE,5],[i.r.SYMBOLCOLOR,5],[i.r.FEATUREATTRIBUTE,6],[i.r.INSTANCEFEATUREATTRIBUTE,6],[i.r.INSTANCECOLOR,7],[i.r.OBJECTANDLAYERIDCOLOR,7],[i.r.INSTANCEOBJECTANDLAYERIDCOLOR,7],[i.r.ROTATION,8],[i.r.INSTANCEMODEL,8],[i.r.INSTANCEMODELNORMAL,12],[i.r.INSTANCEMODELORIGINHI,11],[i.r.INSTANCEMODELORIGINLO,15]])},25634:(e,t,r)=>{r.d(t,{m8:()=>c,NV:()=>d});var i=r(97768),o=r(74887),n=r(2597),a=r(89192);class s{constructor(e){this._material=e.material,this._techniques=e.techniques,this._output=e.output}dispose(){}get _stippleTextures(){return this._techniques.context.stippleTextures}get _markerTextures(){return this._techniques.context.markerTextures}acquireTechnique(e,t){return this._techniques.acquire(e,this._material.getConfiguration(this._output,t))}ensureResources(e){return a.Am.LOADED}}class c extends s{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this._textureId=e.textureId,this._acquire(e.textureId,(e=>this._texture=e)),this._acquire(e.normalTextureId,(e=>this._textureNormal=e)),this._acquire(e.emissiveTextureId,(e=>this._textureEmissive=e)),this._acquire(e.occlusionTextureId,(e=>this._textureOcclusion=e)),this._acquire(e.metallicRoughnessTextureId,(e=>this._textureMetallicRoughness=e))}dispose(){super.dispose(),this._texture=(0,i.Gz)(this._texture),this._textureNormal=(0,i.Gz)(this._textureNormal),this._textureEmissive=(0,i.Gz)(this._textureEmissive),this._textureOcclusion=(0,i.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,i.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?a.Am.LOADED:a.Am.LOADING}get textureBindParameters(){return new d(null!=this._texture?this._texture.glTexture:null,null!=this._textureNormal?this._textureNormal.glTexture:null,null!=this._textureEmissive?this._textureEmissive.glTexture:null,null!=this._textureOcclusion?this._textureOcclusion.glTexture:null,null!=this._textureMetallicRoughness?this._textureMetallicRoughness.glTexture:null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,i.Gz)(this._texture),this._textureId=e,this._acquire(this._textureId,(e=>this._texture=e)))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,o.$X)(r))return++this._numLoading,void r.then((e=>{if(this._disposed)return(0,i.Gz)(e),void t(null);t(e)})).finally((()=>--this._numLoading));t(r)}}class l extends n.Y{constructor(e=null){super(),this.textureEmissive=e}}class d extends l{constructor(e=null,t=null,r=null,i=null,o=null,n,a){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=i,this.textureMetallicRoughness=o,this.scale=n,this.normalTextureTransformMatrix=a}}},87170:(e,t,r)=>{r.d(t,{V:()=>R});var i=r(9093),o=r(38954),n=r(97146),a=r(57917),s=r(29920),c=r(69720),l=r(96672),d=r(51850),u=r(4341),h=r(11964);function m(e,t,r){return(0,o.f)(f,t,e),(0,o.f)(p,r,e),.5*(0,o.m)((0,o.b)(f,f,p))}r(32114),new u.I(h.vt),new u.I((()=>{return e?{p0:(0,d.o8)(e.p0),p1:(0,d.o8)(e.p1),p2:(0,d.o8)(e.p2)}:{p0:(0,d.vt)(),p1:(0,d.vt)(),p2:(0,d.vt)()};var e}));const f=(0,d.vt)(),p=(0,d.vt)(),g=(0,d.vt)(),v=(0,d.vt)(),_=(0,d.vt)(),T=(0,d.vt)();var x=r(24326),A=r(89192);class E{constructor(e){this.channel=e,this.id=(0,x.c)()}}class b extends E{constructor(e){super(A.Mg.Highlight),this.highlightGroup=e}}var S=r(620),M=r(46540);class R extends c.J{constructor(e,t,r=null,i=l.X.Mesh,o=null,a=-1){super(),this.material=e,this.mapPositions=r,this.type=i,this.objectAndLayerIdColor=o,this.edgeIndicesLength=a,this.highlights=new Set,this._highlightGroupCounts=new Map,this.visible=!0,this._attributes=new Map,this._boundingInfo=null;for(const[e,r]of t)this._attributes.set(e,{...r,indices:(0,n.Dg)(r.indices)}),e===M.r.POSITION&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._attributes.get(e).indices.length:this.edgeIndicesLength)}instantiate(e={}){const t=new R(e.material||this.material,[],this.mapPositions,this.type,this.objectAndLayerIdColor,this.edgeIndicesLength);return this._attributes.forEach(((e,r)=>{e.exclusive=!1,t._attributes.set(r,e)})),t._boundingInfo=this._boundingInfo,t.transformation=e.transformation||this.transformation,t}get attributes(){return this._attributes}getMutableAttribute(e){let t=this._attributes.get(e);return t&&!t.exclusive&&(t={...t,exclusive:!0,data:(0,a.S)(t.data)},this._attributes.set(e,t)),t}setAttributeData(e,t){const r=this._attributes.get(e);r&&this._attributes.set(e,{...r,exclusive:!0,data:t})}get indexCount(){const e=this._attributes.values().next().value.indices;return e?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return null==this._boundingInfo&&(this._boundingInfo=this._calculateBoundingInfo()),this._boundingInfo}computeAttachmentOrigin(e){return!!(this.type===l.X.Mesh?this._computeAttachmentOriginTriangles(e):this.type===l.X.Line?this._computeAttachmentOriginLines(e):this._computeAttachmentOriginPoints(e))&&(null!=this._transformation&&(0,o.h)(e,e,this._transformation),!0)}_computeAttachmentOriginTriangles(e){return function(e,t){if(!e)return!1;const{size:r,data:i,indices:n}=e;(0,o.a)(t,0,0,0),(0,o.a)(T,0,0,0);let a=0,s=0;for(let e=0;e<n.length-2;e+=3){const c=n[e]*r,l=n[e+1]*r,d=n[e+2]*r;(0,o.a)(g,i[c],i[c+1],i[c+2]),(0,o.a)(v,i[l],i[l+1],i[l+2]),(0,o.a)(_,i[d],i[d+1],i[d+2]);const u=m(g,v,_);u?((0,o.g)(g,g,v),(0,o.g)(g,g,_),(0,o.j)(g,g,1/3*u),(0,o.g)(t,t,g),a+=u):((0,o.g)(T,T,g),(0,o.g)(T,T,v),(0,o.g)(T,T,_),s+=3)}return!(0===s&&0===a||(0!==a?((0,o.j)(t,t,1/a),0):0===s||((0,o.j)(t,T,1/s),0)))}(this.attributes.get(M.r.POSITION),e)}_computeAttachmentOriginLines(e){const t=this.attributes.get(M.r.POSITION);return function(e,t,r){if(!e)return!1;(0,o.a)(r,0,0,0),(0,o.a)(T,0,0,0);let i=0,n=0;const{size:a,data:s,indices:c}=e,l=c.length-1,d=l+(t?2:0);for(let e=0;e<d;e+=2){const t=e<l?e+1:0,d=c[e<l?e:l]*a,u=c[t]*a;g[0]=s[d],g[1]=s[d+1],g[2]=s[d+2],v[0]=s[u],v[1]=s[u+1],v[2]=s[u+2],(0,o.j)(g,(0,o.g)(g,g,v),.5);const h=(0,o.F)(g,v);h>0?((0,o.g)(r,r,(0,o.j)(g,g,h)),i+=h):0===i&&((0,o.g)(T,T,g),n++)}return 0!==i?((0,o.j)(r,r,1/i),!0):0!==n&&((0,o.j)(r,T,1/n),!0)}(t,function(e,t){return!(!("isClosed"in e)||!e.isClosed)&&t.indices.length>2}(this.material.parameters,t),e)}_computeAttachmentOriginPoints(e){return function(e,t){if(!e)return!1;const{size:r,data:i,indices:n}=e;(0,o.a)(t,0,0,0);let a=-1,s=0;for(let e=0;e<n.length;e++){const o=n[e]*r;a!==o&&(t[0]+=i[o],t[1]+=i[o+1],t[2]+=i[o+2],s++),a=o}return s>1&&(0,o.j)(t,t,1/s),s>0}(this.attributes.get(M.r.POSITION),e)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const e=this.attributes.get(M.r.POSITION);if(!e||0===e.indices.length)return null;const t=this.type===l.X.Mesh?3:1;(0,S.vA)(e.indices.length%t==0,"Indexing error: "+e.indices.length+" not divisible by "+t);const r=(0,n.tM)(e.indices.length/t);return new s.j(r,t,e)}get transformation(){return this._transformation??i.zK}set transformation(e){this._transformation=e&&e!==i.zK?(0,i.o8)(e):null}get highlightGroups(){return this._highlightGroupCounts}get hasHighlights(){return this._highlightGroupCounts.size>0}foreachHighlightGroup(e){this._highlightGroupCounts.forEach(((t,r)=>e(r)))}allocateIdAndHighlight(e){const t=new b(e);return this.addHighlight(t)}addHighlight(e){this.highlights.add(e);const{highlightGroup:t}=e,r=(this._highlightGroupCounts.get(t)??0)+1;return this._highlightGroupCounts.set(t,r),e}removeHighlight(e){if(this.highlights.delete(e)){const{highlightGroup:t}=e,r=this._highlightGroupCounts.get(t)??0;r<=1?this._highlightGroupCounts.delete(t):this._highlightGroupCounts.set(t,r-1)}}}},14903:(e,t,r)=>{r.d(t,{im:()=>h,m$:()=>i});var i,o,n=r(51850),a=r(2597),s=r(89192),c=r(69720),l=r(96672),d=r(39341),u=r(43616);class h extends c.J{constructor(e,t){super(),this.type=l.X.Material,this.supportsEdges=!1,this._renderPriority=0,this._vertexAttributeLocations=d.D,this._pp0=(0,n.fA)(0,0,1),this._pp1=(0,n.fA)(0,0,0),this._parameters=new t,(0,u.MB)(this._parameters,e),this.validateParameters(this._parameters)}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,u.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations===s.ID.ON)&&!!(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}get vertexAttributeLocations(){return this._vertexAttributeLocations}_parametersChanged(){this.repository?.materialChanged(this)}queryRenderOccludedState(e){return this.visible&&this.parameters.renderOccluded===e}get hasEmissions(){return!1}intersectDraped(e,t,r,i,o,n){return this._pp0[0]=this._pp1[0]=i[0],this._pp0[1]=this._pp1[1]=i[1],this.intersect(e,t,r,this._pp0,this._pp1,o)}}(o=i||(i={}))[o.None=0]="None",o[o.Occlude=1]="Occlude",o[o.Transparent=2]="Transparent",o[o.OccludeAndTransparent=4]="OccludeAndTransparent",o[o.OccludeAndTransparentStencil=8]="OccludeAndTransparentStencil",o[o.Opaque=16]="Opaque",a.Y},59643:(e,t,r)=>{var i;r.d(t,{Y:()=>i}),function(e){e[e.ColorAlpha=0]="ColorAlpha",e[e.FrontFace=1]="FrontFace",e[e.NONE=2]="NONE",e[e.COUNT=3]="COUNT"}(i||(i={}))},33524:(e,t,r)=>{r.d(t,{K_:()=>p,Yf:()=>d,aB:()=>f,ez:()=>l,m6:()=>g,xt:()=>h,z5:()=>u});var i=r(49255),o=r(59643),n=r(63907),a=r(90644);const s=(0,a.p3)(n.dn.SRC_ALPHA,n.dn.ONE,n.dn.ONE_MINUS_SRC_ALPHA,n.dn.ONE_MINUS_SRC_ALPHA),c=(0,a.p3)(n.dn.ONE,n.dn.ZERO,n.dn.ONE,n.dn.ONE_MINUS_SRC_ALPHA);function l(e){return e===o.Y.FrontFace?null:c}function d(e){switch(e){case o.Y.NONE:return s;case o.Y.ColorAlpha:return c;case o.Y.FrontFace:case o.Y.COUNT:return null}}function u(e){if(e.draped)return null;switch(e.oitPass){case o.Y.NONE:case o.Y.FrontFace:return e.writeDepth?a.Uy:null;case o.Y.ColorAlpha:case o.Y.COUNT:return null}}const h=5e5,m={factor:-1,units:-2};function f(e){return e?m:null}function p(e,t=n.MT.LESS){return e===o.Y.NONE||e===o.Y.FrontFace?t:n.MT.LEQUAL}function g(e,t){const r=(0,i.LG)(t);return e===o.Y.ColorAlpha?r?{buffers:[n.Nm.COLOR_ATTACHMENT0,n.Nm.COLOR_ATTACHMENT1,n.Nm.COLOR_ATTACHMENT2]}:{buffers:[n.Nm.COLOR_ATTACHMENT0,n.Nm.COLOR_ATTACHMENT1]}:r?{buffers:[n.Nm.COLOR_ATTACHMENT0,n.Nm.COLOR_ATTACHMENT1]}:null}},34886:(e,t,r)=>{r.d(t,{B:()=>n});var i=r(3694),o=r(94656);class n{constructor(e,t,r){this._context=e,this._locations=r,this._textures=new Map,this._freeTextureUnits=new i.A({deallocator:null}),this._glProgram=e.programCache.acquire(t.generate("vertex"),t.generate("fragment"),r),this._glProgram.stop=()=>{throw new Error("Wrapped _glProgram used directly")},this.bindPass=t.generateBindPass(this),this.bindDraw=t.generateBindDraw(this),this._fragmentUniforms=(0,o.en)()?t.fragmentUniforms:null}dispose(){this._glProgram.dispose()}get glName(){return this._glProgram.glName}get hasTransformFeedbackVaryings(){return this._glProgram.hasTransformFeedbackVaryings}get compiled(){return this._glProgram.compiled}setUniform1b(e,t){this._glProgram.setUniform1i(e,t?1:0)}setUniform1i(e,t){this._glProgram.setUniform1i(e,t)}setUniform1f(e,t){this._glProgram.setUniform1f(e,t)}setUniform2fv(e,t){this._glProgram.setUniform2fv(e,t)}setUniform3fv(e,t){this._glProgram.setUniform3fv(e,t)}setUniform4fv(e,t){this._glProgram.setUniform4fv(e,t)}setUniformMatrix3fv(e,t){this._glProgram.setUniformMatrix3fv(e,t)}setUniformMatrix4fv(e,t){this._glProgram.setUniformMatrix4fv(e,t)}setUniform1fv(e,t){this._glProgram.setUniform1fv(e,t)}setUniform1iv(e,t){this._glProgram.setUniform1iv(e,t)}setUniform2iv(e,t){this._glProgram.setUniform2iv(e,t)}setUniform3iv(e,t){this._glProgram.setUniform3iv(e,t)}setUniform4iv(e,t){this._glProgram.setUniform4iv(e,t)}assertCompatibleVertexAttributeLocations(e){e.locations!==this._locations&&console.error("VertexAttributeLocations are incompatible")}stop(){this._textures.clear(),this._freeTextureUnits.clear()}bindTexture(e,t){if(null==t?.glName){const t=this._textures.get(e);return t&&(this._context.bindTexture(null,t.unit),this._freeTextureUnit(t),this._textures.delete(e)),null}let r=this._textures.get(e);return null==r?(r=this._allocTextureUnit(t),this._textures.set(e,r)):r.texture=t,this._context.useProgram(this),this.setUniform1i(e,r.unit),this._context.bindTexture(t,r.unit),r.unit}rebindTextures(){this._context.useProgram(this),this._textures.forEach(((e,t)=>{this._context.bindTexture(e.texture,e.unit),this.setUniform1i(t,e.unit)})),this._fragmentUniforms?.forEach((e=>{"sampler2D"!==e.type&&"samplerCube"!==e.type||this._textures.has(e.name)||console.error(`Texture sampler ${e.name} has no bound texture`)}))}_allocTextureUnit(e){return{texture:e,unit:0===this._freeTextureUnits.length?this._textures.size:this._freeTextureUnits.pop()}}_freeTextureUnit(e){this._freeTextureUnits.push(e.unit)}}},13464:(e,t,r)=>{var i;r.d(t,{N:()=>i}),function(e){e[e.INTEGRATED_MESH=0]="INTEGRATED_MESH",e[e.OPAQUE_TERRAIN=1]="OPAQUE_TERRAIN",e[e.OPAQUE_MATERIAL=2]="OPAQUE_MATERIAL",e[e.OPAQUE_MATERIAL_WITHOUT_NORMALS=3]="OPAQUE_MATERIAL_WITHOUT_NORMALS",e[e.TRANSPARENT_MATERIAL=4]="TRANSPARENT_MATERIAL",e[e.TRANSPARENT_MATERIAL_WITHOUT_NORMALS=5]="TRANSPARENT_MATERIAL_WITHOUT_NORMALS",e[e.TRANSPARENT_TERRAIN=6]="TRANSPARENT_TERRAIN",e[e.TRANSPARENT_MATERIAL_WITHOUT_DEPTH=7]="TRANSPARENT_MATERIAL_WITHOUT_DEPTH",e[e.OCCLUDED_TERRAIN=8]="OCCLUDED_TERRAIN",e[e.OCCLUDER_MATERIAL=9]="OCCLUDER_MATERIAL",e[e.TRANSPARENT_OCCLUDER_MATERIAL=10]="TRANSPARENT_OCCLUDER_MATERIAL",e[e.OCCLUSION_PIXELS=11]="OCCLUSION_PIXELS",e[e.OPAQUE_ENVIRONMENT=12]="OPAQUE_ENVIRONMENT",e[e.TRANSPARENT_ENVIRONMENT=13]="TRANSPARENT_ENVIRONMENT",e[e.HUD_MATERIAL=14]="HUD_MATERIAL",e[e.LABEL_MATERIAL=15]="LABEL_MATERIAL",e[e.LINE_CALLOUTS=16]="LINE_CALLOUTS",e[e.LINE_CALLOUTS_HUD_DEPTH=17]="LINE_CALLOUTS_HUD_DEPTH",e[e.DRAPED_MATERIAL=18]="DRAPED_MATERIAL",e[e.DRAPED_WATER=19]="DRAPED_WATER",e[e.VOXEL=20]="VOXEL",e[e.MAX_SLOTS=21]="MAX_SLOTS"}(i||(i={}))},76844:(e,t,r)=>{r.d(t,{g:()=>z}),r(44208);var i=r(49186),o=r(65529),n=r(97768),a=r(74887),s=r(34275),c=r(84952),l=r(99677),d=r(56058),u=r(89192),h=r(2741);let m;var f,p;(p=f||(f={}))[p.ETC1_RGB=0]="ETC1_RGB",p[p.ETC2_RGBA=1]="ETC2_RGBA",p[p.BC1_RGB=2]="BC1_RGB",p[p.BC3_RGBA=3]="BC3_RGBA",p[p.BC4_R=4]="BC4_R",p[p.BC5_RG=5]="BC5_RG",p[p.BC7_M6_RGB=6]="BC7_M6_RGB",p[p.BC7_M5_RGBA=7]="BC7_M5_RGBA",p[p.PVRTC1_4_RGB=8]="PVRTC1_4_RGB",p[p.PVRTC1_4_RGBA=9]="PVRTC1_4_RGBA",p[p.ASTC_4x4_RGBA=10]="ASTC_4x4_RGBA",p[p.ATC_RGB=11]="ATC_RGB",p[p.ATC_RGBA=12]="ATC_RGBA",p[p.FXT1_RGB=17]="FXT1_RGB",p[p.PVRTC2_4_RGB=18]="PVRTC2_4_RGB",p[p.PVRTC2_4_RGBA=19]="PVRTC2_4_RGBA",p[p.ETC2_EAC_R11=20]="ETC2_EAC_R11",p[p.ETC2_EAC_RG11=21]="ETC2_EAC_RG11",p[p.RGBA32=13]="RGBA32",p[p.RGB565=14]="RGB565",p[p.BGR565=15]="BGR565",p[p.RGBA4444=16]="RGBA4444";var g=r(63907),v=r(21231),_=r(42293);let T=null,x=null;async function A(){return null==x&&(m??=(async()=>{const e=await r.e(9321).then(r.bind(r,49321)),t=await e.default({locateFile:e=>(0,h.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),x=m,T=await x),x}function E(e,t,r,i,o){const n=(0,_.IB)(t?g.CQ.COMPRESSED_RGBA8_ETC2_EAC:g.CQ.COMPRESSED_RGB8_ETC2),a=o&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*n*a)}function b(e){return e.getNumImages()>=1&&!e.isUASTC()}function S(e){return e.getFaces()>=1&&e.isETC1S()}function M(e,t,r,i,o,n,a,s){const{compressedTextureETC:c,compressedTextureS3TC:l}=e.capabilities,[d,u]=c?i?[f.ETC2_RGBA,g.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[f.ETC1_RGB,g.CQ.COMPRESSED_RGB8_ETC2]:l?i?[f.BC3_RGBA,g.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[f.BC1_RGB,g.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[f.RGBA32,g.Ab.RGBA],h=t.hasMipmap?r:Math.min(1,r),m=[];for(let e=0;e<h;e++)m.push(new Uint8Array(a(e,d))),s(e,d,m[e]);return t.internalFormat=u,t.hasMipmap=m.length>1,t.samplingMode=t.hasMipmap?g.Cj.LINEAR_MIPMAP_LINEAR:g.Cj.LINEAR,t.width=o,t.height=n,new v.g(e,t,{type:"compressed",levels:m})}var R=r(69720),C=r(96672),I=r(53966);const w=()=>I.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function O(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const N=O("DXT1"),y=O("DXT3"),P=O("DXT5");function L(e,t){const r=new Int32Array(e,0,31);if(542327876!==r[0])return w().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return w().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let o,n;switch(i){case N:o=8,n=g.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case y:o=16,n=g.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case P:o=16,n=g.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return w().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let a=1,s=r[4],c=r[3];(3&s||3&c)&&(w().warn("Rounding up compressed texture size to nearest multiple of 4."),s=s+3&-4,c=c+3&-4);const l=s,d=c;let u,h;131072&r[2]&&!1!==t&&(a=Math.max(1,r[7]));let m=r[1]+4;const f=[];for(let t=0;t<a;++t)h=(s+3>>2)*(c+3>>2)*o,u=new Uint8Array(e,m,h),f.push(u),m+=h,s=Math.max(1,s>>1),c=Math.max(1,c>>1);return{textureData:{type:"compressed",levels:f},internalFormat:n,width:l,height:d}}function H(e,t,r){if(e instanceof ImageData)return H(D(e),t,r);const i=document.createElement("canvas");return i.width=t,i.height=r,i.getContext("2d").drawImage(e,0,0,i.width,i.height),i}function D(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new i.A("Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}var F,G,B=r(620),U=r(67171);class z extends R.J{get parameters(){return this._parameters}constructor(e,t){super(),this._data=e,this.type=C.X.Texture,this._glTexture=null,this._loadingPromise=null,this._loadingController=null,this.events=new o.A,this._parameters={...W,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.frameUpdate=void 0}_startPreload(e){null!=e&&(e instanceof HTMLVideoElement?(this.frameUpdate=t=>this._frameUpdate(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e))}_startPreloadVideoElement(e){if(!((0,c.w8)(e.src)||"auto"===e.preload&&e.crossOrigin)){e.preload="auto",e.crossOrigin="anonymous";const t=!e.paused;if(e.src=e.src,t&&e.autoplay){const t=()=>{e.removeEventListener("canplay",t),e.play()};e.addEventListener("canplay",t)}}}_startPreloadImageElement(e){(0,c.DB)(e.src)||(0,c.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new U.R;return t.wrapMode=this._parameters.wrap??g.pF.REPEAT,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?g.Cj.LINEAR_MIPMAP_LINEAR:g.Cj.LINEAR,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t}get glTexture(){return this._glTexture}get memoryEstimate(){return this._glTexture?.usedMemory||function(e,t){if(null==e)return 0;if((0,s.mw)(e)||(0,s.mg)(e))return t.encoding===u.JS.KTX2_ENCODING?function(e,t){if(null==T)return e.byteLength;const r=new T.KTX2File(new Uint8Array(e)),i=S(r)?E(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):t.encoding===u.JS.BASIS_ENCODING?function(e,t){if(null==T)return e.byteLength;const r=new T.BasisFile(new Uint8Array(e)),i=b(r)?E(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?V(e):t;return(t.mipmap?4/3:1)*r*i*(t.components||4)||0}(this._data,this._parameters)}load(e){if(this._glTexture)return this._glTexture;if(this._loadingPromise)return this._loadingPromise;const t=this._data;return null==t?(this._glTexture=new v.g(e,this._createDescriptor(e),null),this._glTexture):(this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):((0,s.mw)(t)||(0,s.mg)(t))&&this._parameters.encoding===u.JS.DDS_ENCODING?this._loadFromDDSData(e,t):((0,s.mw)(t)||(0,s.mg)(t))&&this._parameters.encoding===u.JS.KTX2_ENCODING?this._loadFromKTX2(e,t):((0,s.mw)(t)||(0,s.mg)(t))&&this._parameters.encoding===u.JS.BASIS_ENCODING?this._loadFromBasis(e,t):(0,s.mg)(t)?this._loadFromPixelData(e,t):(0,s.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):null)}_frameUpdate(e,t){return null==this._glTexture||e.readyState<F.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._glTexture.setData(e),this._glTexture.descriptor.hasMipmap&&this._glTexture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._glTexture=function(e,t,r){const i=L(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:o,internalFormat:n,width:a,height:s}=i;return t.samplingMode=o.levels.length>1?g.Cj.LINEAR_MIPMAP_LINEAR:g.Cj.LINEAR,t.hasMipmap=o.levels.length>1,t.internalFormat=n,t.width=a,t.height=s,new v.g(e,t,o)}(e,this._createDescriptor(e),t),this._glTexture}_loadFromKTX2(e,t){return this._loadAsync((()=>async function(e,t,r){null==T&&(T=await A());const i=new T.KTX2File(new Uint8Array(r));if(!S(i))return null;i.startTranscoding();const o=M(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),((e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t)),((e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1)));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromBasis(e,t){return this._loadAsync((()=>async function(e,t,r){null==T&&(T=await A());const i=new T.BasisFile(new Uint8Array(r));if(!b(i))return null;i.startTranscoding();const o=M(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),((e,t)=>i.getImageTranscodedSizeInBytes(0,e,t)),((e,t,r)=>i.transcodeImage(r,0,e,t,0,0)));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromPixelData(e,t){(0,B.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return r.pixelFormat=1===this._parameters.components?g.Ab.LUMINANCE:3===this._parameters.components?g.Ab.RGB:g.Ab.RGBA,r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new v.g(e,r,t),this._glTexture}_loadFromURL(e,t){return this._loadAsync((async r=>{const i=await(0,l.D)(t,{signal:r});return(0,a.Te)(r),this._loadFromImage(e,i)}))}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync((async r=>{const i=await(0,d.Sx)(t,t.src,!1,r);return(0,a.Te)(r),this._loadFromImage(e,i)}))}_loadFromVideoElement(e,t){return t.readyState>=F.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync((r=>new Promise(((o,s)=>{const c=()=>{t.removeEventListener("loadeddata",l),t.removeEventListener("error",d),(0,n.xt)(u)},l=()=>{t.readyState>=F.HAVE_CURRENT_DATA&&(c(),o(this._loadFromImage(e,t)))},d=e=>{c(),s(e||new i.A("Failed to load video"))};t.addEventListener("loadeddata",l),t.addEventListener("error",d);const u=(0,a.u7)(r,(()=>d((0,a.NK)())))}))))}_loadFromImage(e,t){let r=t;if(!(r instanceof HTMLVideoElement)){const{maxTextureSize:t}=e.parameters;r=this._parameters.downsampleUncompressed?function(e,t){let r=e.width*e.height;if(r<4096)return e instanceof ImageData?D(e):e;let i=e.width,o=e.height;do{i=Math.ceil(i/2),o=Math.ceil(o/2),r=i*o}while(r>1048576||null!=t&&(i>t||o>t));return H(e,i,o)}(r,t):function(e,t){const r=Math.max(e.width,e.height);if(r<=t)return e;const i=t/r;return H(e,Math.round(e.width*i),Math.round(e.height*i))}(r,t)}const i=V(r);this._parameters.width=i.width,this._parameters.height=i.height;const o=this._createDescriptor(e);return o.pixelFormat=3===this._parameters.components?g.Ab.RGB:g.Ab.RGBA,o.width=i.width,o.height=i.height,this._glTexture=new v.g(e,o,r),this._glTexture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null)};return r.then(i,i),r}unload(){if(this._glTexture=(0,n.WD)(this._glTexture),null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}}function V(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}(G=F||(F={}))[G.HAVE_NOTHING=0]="HAVE_NOTHING",G[G.HAVE_METADATA=1]="HAVE_METADATA",G[G.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",G[G.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",G[G.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA";const W={wrap:{s:g.pF.REPEAT,t:g.pF.REPEAT},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1,downsampleUncompressed:!1}},89192:(e,t,r)=>{var i,o,n,a,s,c,l,d,u;r.d(t,{Am:()=>a,C7:()=>n,ID:()=>d,JS:()=>u,Mg:()=>c,dd:()=>s,it:()=>o,s2:()=>i,sf:()=>l}),function(e){e[e.None=0]="None",e[e.Front=1]="Front",e[e.Back=2]="Back",e[e.COUNT=3]="COUNT"}(i||(i={})),function(e){e[e.Less=0]="Less",e[e.Lequal=1]="Lequal",e[e.COUNT=2]="COUNT"}(o||(o={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.UPDATE=1]="UPDATE"}(n||(n={})),function(e){e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED"}(a||(a={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(s||(s={})),function(e){e[e.Highlight=0]="Highlight",e[e.MaskOccludee=1]="MaskOccludee",e[e.COUNT=2]="COUNT"}(c||(c={})),function(e){e[e.Blend=0]="Blend",e[e.Opaque=1]="Opaque",e[e.Mask=2]="Mask",e[e.MaskBlend=3]="MaskBlend",e[e.COUNT=4]="COUNT"}(l||(l={})),function(e){e[e.OFF=0]="OFF",e[e.ON=1]="ON"}(d||(d={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(u||(u={}))},77194:(e,t,r)=>{r.d(t,{MD:()=>c,cJ:()=>s,hs:()=>l,m0:()=>a});var i=r(34727),o=(r(17352),r(97937));function n(e,t,r){const i=r.parameters;return d.scale=Math.min(i.divisor/(t-i.offset),1),d.factor=function(e){return Math.abs(e*e*e)}(e),d}function a(e,t){return(0,i.Cc)(e*Math.max(t.scale,t.minScaleFactor),e,t.factor)}function s(e,t,r,i){i.scale=function(e,t,r){const i=n(e,t,r);return i.minScaleFactor=0,a(1,i)}(e,t,r),i.factor=0,i.minScaleFactor=r.minScaleFactor}function c(e,t,r=[0,0]){const i=Math.min(Math.max(t.scale,t.minScaleFactor),1);return r[0]=e[0]*i,r[1]=e[1]*i,r}function l(e,t,r,i){return a(e,n(t,r,i))}r(24151),(0,i.kU)(10),(0,i.kU)(12),(0,i.kU)(70),(0,i.kU)(40);const d={scale:0,factor:0,minScaleFactor:0};(0,o.c)()},16396:(e,t,r)=>{r.d(t,{ou:()=>l}),r(77690),r(29242),r(58083),r(9093);var i=r(38954),o=r(51850),n=r(97937),a=r(24151),s=r(57005);const c=new class{constructor(e=0){this.offset=e,this.sphere=(0,n.c)(),this.tmpVertex=(0,o.vt)()}applyToVertex(e,t,r){const o=this.objectTransform.transform,n=(0,i.a)(d,e,t,r),a=(0,i.h)(n,n,o),s=this.offset/(0,i.m)(a);(0,i.r)(a,a,a,s);const c=this.objectTransform.inverse;return(0,i.h)(this.tmpVertex,a,c),this.tmpVertex}applyToMinMax(e,t){const r=this.offset/(0,i.m)(e);(0,i.r)(e,e,e,r);const o=this.offset/(0,i.m)(t);(0,i.r)(t,t,t,o)}applyToAabb(e){const t=this.offset/Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]+=e[0]*t,e[1]+=e[1]*t,e[2]+=e[2]*t;const r=this.offset/Math.sqrt(e[3]*e[3]+e[4]*e[4]+e[5]*e[5]);return e[3]+=e[3]*r,e[4]+=e[4]*r,e[5]+=e[5]*r,e}applyToBoundingSphere(e){const t=(0,i.m)((0,n.g)(e)),r=this.offset/t;return(0,i.r)((0,n.g)(this.sphere),(0,n.g)(e),(0,n.g)(e),r),this.sphere[3]=e[3]+e[3]*this.offset/t,this.sphere}};function l(e){return null!=e?(c.offset=e,c):null}new class{constructor(e=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpVertex=(0,o.vt)(),this._tmpMbs=(0,n.c)(),this._tmpObb=new s.ab,this._resetOffset(e)}_resetOffset(e){this._offset=e,this._totalOffset=e}set offset(e){this._resetOffset(e)}get offset(){return this._offset}set componentOffset(e){this._totalOffset=this._offset+e}set localOrigin(e){this.componentLocalOriginLength=(0,i.m)(e)}applyToVertex(e,t,r){const o=(0,i.a)(d,e,t,r),n=(0,i.a)(u,e,t,r+this.componentLocalOriginLength),a=this._totalOffset/(0,i.m)(n);return(0,i.r)(this._tmpVertex,o,n,a),this._tmpVertex}applyToAabb(e){const t=this.componentLocalOriginLength,r=e[0],i=e[1],o=e[2]+t,n=e[3],a=e[4],s=e[5]+t,c=Math.abs(r),l=Math.abs(i),d=Math.abs(o),u=Math.abs(n),h=Math.abs(a),m=Math.abs(s),f=.5*(1+Math.sign(r*n))*Math.min(c,u),p=.5*(1+Math.sign(i*a))*Math.min(l,h),g=.5*(1+Math.sign(o*s))*Math.min(d,m),v=Math.max(c,u),_=Math.max(l,h),T=Math.max(d,m),x=Math.sqrt(f*f+p*p+g*g),A=Math.sign(c+r),E=Math.sign(l+i),b=Math.sign(d+o),S=Math.sign(u+n),M=Math.sign(h+a),R=Math.sign(m+s),C=this._totalOffset;if(x<C)return e[0]-=(1-A)*C,e[1]-=(1-E)*C,e[2]-=(1-b)*C,e[3]+=S*C,e[4]+=M*C,e[5]+=R*C,e;const I=C/Math.sqrt(v*v+_*_+T*T),w=C/x,O=w-I,N=-O;return e[0]+=r*(A*N+w),e[1]+=i*(E*N+w),e[2]+=o*(b*N+w),e[3]+=n*(S*O+I),e[4]+=a*(M*O+I),e[5]+=s*(R*O+I),e}applyToMbs(e){const t=(0,i.m)((0,n.g)(e)),r=this._totalOffset/t;return(0,i.r)((0,n.g)(this._tmpMbs),(0,n.g)(e),(0,n.g)(e),r),this._tmpMbs[3]=e[3]+e[3]*this._totalOffset/t,this._tmpMbs}applyToObb(e){return(0,s.gm)(e,this._totalOffset,this._totalOffset,a.RT.Global,this._tmpObb),this._tmpObb}},new class{constructor(e=0){this.offset=e,this.tmpVertex=(0,o.vt)()}applyToVertex(e,t,r){const o=(0,i.a)(d,e,t,r),n=(0,i.g)(u,o,this.localOrigin),a=this.offset/(0,i.m)(n);return(0,i.r)(this.tmpVertex,o,n,a),this.tmpVertex}applyToAabb(e){const t=h,r=m,i=f;for(let o=0;o<3;++o)t[o]=e[0+o]+this.localOrigin[o],r[o]=e[3+o]+this.localOrigin[o],i[o]=t[o];const o=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=o[t],e[t+3]=o[t];const n=t=>{const r=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=Math.min(e[t],r[t]),e[t+3]=Math.max(e[t+3],r[t])};for(let e=1;e<8;++e){for(let o=0;o<3;++o)i[o]=e&1<<o?r[o]:t[o];n(i)}let a=0;for(let e=0;e<3;++e)t[e]*r[e]<0&&(a|=1<<e);if(0!==a&&7!==a)for(let e=0;e<8;++e)if(!(a&e)){for(let o=0;o<3;++o)i[o]=a&1<<o?0:e&1<<o?t[o]:r[o];n(i)}for(let t=0;t<3;++t)e[t]-=this.localOrigin[t],e[t+3]-=this.localOrigin[t];return e}};const d=(0,o.vt)(),u=(0,o.vt)(),h=(0,o.vt)(),m=(0,o.vt)(),f=(0,o.vt)()},11787:(e,t,r)=>{r.d(t,{$U:()=>K});var i=r(38954),o=r(51850),n=r(24151),a=r(1843),s=r(49255),c=r(96336),l=r(22911),d=r(62602),u=r(59469),h=r(35093),m=r(16943),f=r(89192),p=r(25634),g=r(14903),v=r(33524),_=r(70328),T=r(96672),x=r(620),A=r(46540);class E{constructor(e=!1,t=!0){this.isVerticalRay=e,this.normalRequired=t}}const b=(0,_.vt)(),S=(0,o.vt)();function M(e,t,r,o,n,a,s){if(null==e)return;const c=function(e,t){return(0,i.a)(t,1/e[0],1/e[1],1/e[2])}(r,S);if((0,_.Ne)(b,e.bbMin),(0,_.vI)(b,e.bbMax),null!=n&&n.applyToAabb(b),function(e,t,r,i){return function(e,t,r,i){const o=(e[0]-i-t[0])*r[0],n=(e[3]+i-t[0])*r[0];let a=Math.min(o,n),s=Math.max(o,n);const c=(e[1]-i-t[1])*r[1],l=(e[4]+i-t[1])*r[1];if(s=Math.min(s,Math.max(c,l)),s<0)return!1;if(a=Math.max(a,Math.min(c,l)),a>s)return!1;const d=(e[2]-i-t[2])*r[2],u=(e[5]+i-t[2])*r[2];return s=Math.min(s,Math.max(d,u)),!(s<0)&&(a=Math.max(a,Math.min(d,u)),!(a>s)&&a<1/0)}(e,t,r,i)}(b,t,c,o)){const{primitiveIndices:i,position:c}=e,l=i?i.length:c.indices.length/3;if(l>L){const i=e.getChildren();if(void 0!==i){for(const e of i)M(e,t,r,o,n,a,s);return}}!function(e,t,r,i,o,n,a,s,c,l,d){const u=e[0],h=e[1],m=e[2],f=t[0],p=t[1],g=t[2],{normalRequired:v}=l;for(let e=0;e<i;++e){const t=s[e],r=3*t,i=a*o[r];let l=n[i],_=n[i+1],T=n[i+2];const x=a*o[r+1];let A=n[x],E=n[x+1],b=n[x+2];const S=a*o[r+2];let M=n[S],C=n[S+1],I=n[S+2];null!=c&&([l,_,T]=c.applyToVertex(l,_,T,e),[A,E,b]=c.applyToVertex(A,E,b,e),[M,C,I]=c.applyToVertex(M,C,I,e));const w=A-l,N=E-_,y=b-T,P=M-l,L=C-_,D=I-T,F=p*D-L*g,G=g*P-D*f,B=f*L-P*p,U=w*F+N*G+y*B;if(Math.abs(U)<=H)continue;const z=u-l,V=h-_,W=m-T,j=z*F+V*G+W*B;if(U>0){if(j<0||j>U)continue}else if(j>0||j<U)continue;const k=V*y-N*W,q=W*w-y*z,Y=z*N-w*V,X=f*k+p*q+g*Y;if(U>0){if(X<0||j+X>U)continue}else if(X>0||j+X<U)continue;const $=(P*k+L*q+D*Y)/U;$>=0&&d($,t,v?O(w,N,y,P,L,D,R):null)}}(t,r,0,l,c.indices,c.data,c.stride,i,n,a,s)}}const R=(0,o.vt)();const C=(0,o.vt)(),I=(0,o.vt)(),w=(0,o.vt)();function O(e,t,r,o,n,a,s){return(0,i.a)(y,e,t,r),(0,i.a)(P,o,n,a),(0,i.b)(s,y,P),(0,i.n)(s,s),s}function N(e){return(0,i.z)(y,e[1],e[0]),(0,i.z)(P,e[2],e[0]),(0,i.b)(R,y,P),(0,i.n)(R,R),R}const y=(0,o.vt)(),P=(0,o.vt)(),L=1e3,H=1e-7,D=(0,o.vt)(),F=[(0,o.vt)(),(0,o.vt)(),(0,o.vt)()];var G=r(13464),B=r(16396),U=r(59907);class z{constructor(e){this.vertexBufferLayout=e}elementCount(e){return e.get(A.r.POSITION).indices.length}write(e,t,r,i,o,n){(0,U.SA)(r,i,this.vertexBufferLayout,e,t,o,n)}}var V=r(43616),W=r(97225),j=r(90237),k=r(53466),q=r(51976),Y=r(35256);class X extends Y.E{constructor(e,t){super(),this.spherical=e,this.doublePrecisionRequiresObfuscation=t,this.alphaDiscardMode=f.sf.Opaque,this.doubleSidedMode=d.W.None,this.pbrMode=u.A9.Disabled,this.cullFace=f.s2.None,this.normalType=c.W.Attribute,this.customDepthTest=f.it.Less,this.emissionSource=l.ZX.None,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.multipassEnabled=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.vvSize=!1,this.vvColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instanced=!1,this.instancedColor=!1,this.instancedDoublePrecision=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.cullAboveGround=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.occlusionPass=!1,this.hasVvInstancing=!0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0}get textureCoordinateType(){return this.hasColorTexture||this.hasMetallicRoughnessTexture||this.emissionSource===l.ZX.Texture||this.hasOcclusionTexture||this.hasNormalTexture?k.I.Default:k.I.None}get objectAndLayerIdColorInstanced(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}(0,j._)([(0,q.W)({count:f.sf.COUNT})],X.prototype,"alphaDiscardMode",void 0),(0,j._)([(0,q.W)({count:d.W.COUNT})],X.prototype,"doubleSidedMode",void 0),(0,j._)([(0,q.W)({count:u.A9.COUNT})],X.prototype,"pbrMode",void 0),(0,j._)([(0,q.W)({count:f.s2.COUNT})],X.prototype,"cullFace",void 0),(0,j._)([(0,q.W)({count:c.W.COUNT})],X.prototype,"normalType",void 0),(0,j._)([(0,q.W)({count:f.it.COUNT})],X.prototype,"customDepthTest",void 0),(0,j._)([(0,q.W)({count:l.ZX.COUNT})],X.prototype,"emissionSource",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasVertexColors",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasSymbolColors",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasVerticalOffset",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasSlicePlane",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasSliceHighlight",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasColorTexture",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasMetallicRoughnessTexture",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasOcclusionTexture",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasNormalTexture",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasScreenSizePerspective",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasVertexTangents",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasOccludees",void 0),(0,j._)([(0,q.W)()],X.prototype,"multipassEnabled",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasModelTransformation",void 0),(0,j._)([(0,q.W)()],X.prototype,"offsetBackfaces",void 0),(0,j._)([(0,q.W)()],X.prototype,"vvSize",void 0),(0,j._)([(0,q.W)()],X.prototype,"vvColor",void 0),(0,j._)([(0,q.W)()],X.prototype,"receiveShadows",void 0),(0,j._)([(0,q.W)()],X.prototype,"receiveAmbientOcclusion",void 0),(0,j._)([(0,q.W)()],X.prototype,"textureAlphaPremultiplied",void 0),(0,j._)([(0,q.W)()],X.prototype,"instanced",void 0),(0,j._)([(0,q.W)()],X.prototype,"instancedColor",void 0),(0,j._)([(0,q.W)()],X.prototype,"instancedDoublePrecision",void 0),(0,j._)([(0,q.W)()],X.prototype,"writeDepth",void 0),(0,j._)([(0,q.W)()],X.prototype,"transparent",void 0),(0,j._)([(0,q.W)()],X.prototype,"enableOffset",void 0),(0,j._)([(0,q.W)()],X.prototype,"cullAboveGround",void 0),(0,j._)([(0,q.W)()],X.prototype,"snowCover",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasColorTextureTransform",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasEmissionTextureTransform",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasNormalTextureTransform",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasOcclusionTextureTransform",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasMetallicRoughnessTextureTransform",void 0);var $=r(97220),Z=r(57323);class J extends W.R5{initializeProgram(e,t){return this._initializeProgram(e,t,J.shader)}}J.shader=new $.$(Z.R,(()=>r.e(9933).then(r.bind(r,39933))));class K extends g.im{constructor(e,t){super(e,ee),this.materialType="default",this.supportsEdges=!0,this.produces=new Map([[G.N.OPAQUE_MATERIAL,e=>((0,s.iq)(e)||(0,s.PJ)(e))&&!this.parameters.transparent],[G.N.TRANSPARENT_MATERIAL,e=>((0,s.iq)(e)||(0,s.PJ)(e))&&this.parameters.transparent&&this.parameters.writeDepth],[G.N.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>((0,s.XY)(e)||(0,s.PJ)(e))&&this.parameters.transparent&&!this.parameters.writeDepth]]),this._vertexBufferLayout=function(e){const t=(0,a.BP)().vec3f(A.r.POSITION);return e.normalType===c.W.Compressed?t.vec2i16(A.r.NORMALCOMPRESSED,{glNormalized:!0}):t.vec3f(A.r.NORMAL),e.hasVertexTangents&&t.vec4f(A.r.TANGENT),(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&t.vec2f(A.r.UV0),e.hasVertexColors&&t.vec4u8(A.r.COLOR),e.hasSymbolColors&&t.vec4u8(A.r.SYMBOLCOLOR),(0,m.E)()&&t.vec4u8(A.r.OBJECTANDLAYERIDCOLOR),t}(this.parameters),this._configuration=new X(t.spherical,t.doublePrecisionRequiresObfuscation)}isVisibleForOutput(e){return e!==s.V.Shadow&&e!==s.V.ShadowExcludeHighlight&&e!==s.V.ShadowHighlight||this.parameters.castShadows}get visible(){const e=this.parameters;if(e.layerOpacity<h.Q)return!1;const{hasInstancedColor:t,hasVertexColors:r,hasSymbolColors:i,vvColor:o}=e,n=t||o||i,a="replace"===e.colorMixMode,s=e.opacity>=h.Q;if(r&&n)return a||s;const c=e.externalColor&&e.externalColor[3]>=h.Q;return r?a?c:s:n?a||s:a?c:s}get hasEmissions(){return!!this.parameters.emissiveTextureId||!(0,i.e)(this.parameters.emissiveFactor,o.uY)}getConfiguration(e,t){const r=this.parameters,{treeRendering:i,doubleSided:o,doubleSidedType:n}=r;return this._configuration.output=e,this._configuration.hasNormalTexture=!i&&!!r.normalTextureId,this._configuration.hasColorTexture=!!r.textureId,this._configuration.hasVertexTangents=!i&&r.hasVertexTangents,this._configuration.instanced=r.isInstanced,this._configuration.instancedDoublePrecision=r.instancedDoublePrecision,this._configuration.vvSize=!!r.vvSize,this._configuration.hasVerticalOffset=null!=r.verticalOffset,this._configuration.hasScreenSizePerspective=null!=r.screenSizePerspective,this._configuration.hasSlicePlane=r.hasSlicePlane,this._configuration.hasSliceHighlight=r.hasSliceHighlight,this._configuration.alphaDiscardMode=r.textureAlphaMode,this._configuration.normalType=i?c.W.Attribute:r.normalType,this._configuration.transparent=r.transparent,this._configuration.writeDepth=r.writeDepth,null!=r.customDepthTest&&(this._configuration.customDepthTest=r.customDepthTest),this._configuration.hasOccludees=r.hasOccludees,this._configuration.cullFace=r.hasSlicePlane?f.s2.None:r.cullFace,this._configuration.multipassEnabled=t.multipassEnabled,this._configuration.cullAboveGround=t.multipassTerrain.cullAboveGround,this._configuration.hasModelTransformation=!i&&null!=r.modelTransformation,this._configuration.hasVertexColors=r.hasVertexColors,this._configuration.hasSymbolColors=r.hasSymbolColors,this._configuration.doubleSidedMode=i?d.W.WindingOrder:o&&"normal"===n?d.W.View:o&&"winding-order"===n?d.W.WindingOrder:d.W.None,this._configuration.instancedColor=r.hasInstancedColor,this._configuration.receiveShadows=r.receiveShadows&&r.shadowMappingEnabled,this._configuration.receiveAmbientOcclusion=r.receiveAmbientOcclusion&&null!=t.ssao,this._configuration.vvColor=!!r.vvColor,this._configuration.textureAlphaPremultiplied=!!r.textureAlphaPremultiplied,this._configuration.pbrMode=r.usePBR?r.isSchematic?u.A9.Schematic:u.A9.Normal:u.A9.Disabled,this._configuration.hasMetallicRoughnessTexture=!i&&!!r.metallicRoughnessTextureId,this._configuration.emissionSource=i?l.ZX.None:null!=r.emissiveTextureId?l.ZX.Texture:r.usePBR?l.ZX.Value:l.ZX.None,this._configuration.hasOcclusionTexture=!i&&!!r.occlusionTextureId,this._configuration.offsetBackfaces=!(!r.transparent||!r.offsetTransparentBackfaces),this._configuration.oitPass=t.oitPass,this._configuration.enableOffset=t.camera.relativeElevation<v.xt,this._configuration.snowCover=function(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}(t),this._configuration.hasColorTextureTransform=!!r.colorTextureTransformMatrix,this._configuration.hasNormalTextureTransform=!!r.normalTextureTransformMatrix,this._configuration.hasEmissionTextureTransform=!!r.emissiveTextureTransformMatrix,this._configuration.hasOcclusionTextureTransform=!!r.occlusionTextureTransformMatrix,this._configuration.hasMetallicRoughnessTextureTransform=!!r.metallicRoughnessTextureTransformMatrix,this._configuration}intersect(e,t,r,o,a,s){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,i.a)(ae,t[12],t[13],t[14]);let s=null;switch(r.viewingMode){case n.RT.Global:s=(0,i.n)(oe,ae);break;case n.RT.Local:s=(0,i.c)(oe,ie)}let c=0;const l=(0,i.f)(se,ae,e.eye),d=(0,i.m)(l),u=(0,i.j)(l,l,1/d);let h=null;this.parameters.screenSizePerspective&&(h=(0,i.l)(s,u)),c+=(0,V.kE)(e,d,this.parameters.verticalOffset,h??0,this.parameters.screenSizePerspective),(0,i.j)(s,s,c),(0,i.t)(ne,s,r.transform.inverseRotation),o=(0,i.f)(te,o,ne),a=(0,i.f)(re,a,ne)}!function(e,t,r,o,n,a){if(!e.visible)return;const s=(0,i.z)(D,o,r),c=(e,t,r)=>{a(e,r,t,!1)},l=new E(!1,t.options.normalRequired);if(e.boundingInfo){(0,x.vA)(e.type===T.X.Mesh);const i=t.tolerance;M(e.boundingInfo,r,s,i,n,l,c)}else{const t=e.attributes.get(A.r.POSITION),o=t.indices;!function(e,t,r,o,n,a,s,c,l,d){const u=t,h=F,m=Math.abs(u[0]),f=Math.abs(u[1]),p=Math.abs(u[2]),g=m>=f?m>=p?0:2:f>=p?1:2,v=g,_=u[v]<0?2:1,T=(g+_)%3,x=(g+(3-_))%3,A=u[T]/u[v],E=u[x]/u[v],b=1/u[v],S=C,M=I,R=w,{normalRequired:O}=l;for(let t=r;t<o;++t){const r=3*t,o=s*n[r];(0,i.a)(h[0],a[o+0],a[o+1],a[o+2]);const l=s*n[r+1];(0,i.a)(h[1],a[l+0],a[l+1],a[l+2]);const u=s*n[r+2];(0,i.a)(h[2],a[u+0],a[u+1],a[u+2]),c&&((0,i.c)(h[0],c.applyToVertex(h[0][0],h[0][1],h[0][2],t)),(0,i.c)(h[1],c.applyToVertex(h[1][0],h[1][1],h[1][2],t)),(0,i.c)(h[2],c.applyToVertex(h[2][0],h[2][1],h[2][2],t))),(0,i.z)(S,h[0],e),(0,i.z)(M,h[1],e),(0,i.z)(R,h[2],e);const m=S[T]-A*S[v],f=S[x]-E*S[v],p=M[T]-A*M[v],g=M[x]-E*M[v],_=R[T]-A*R[v],C=R[x]-E*R[v],I=_*g-C*p,w=m*C-f*_,y=p*f-g*m;if((I<0||w<0||y<0)&&(I>0||w>0||y>0))continue;const P=I+w+y;if(0===P)continue;const L=I*(b*S[v])+w*(b*M[v])+y*(b*R[v]);if(L*Math.sign(P)<0)continue;const H=L/P;H>=0&&d(H,t,O?N(h):null)}}(r,s,0,o.length/3,o,t.data,t.stride,n,l,c)}}(e,r,o,a,(0,B.ou)(r.verticalOffset),s)}createGLMaterial(e){return new Q(e)}createBufferWriter(){return new z(this._vertexBufferLayout)}}class Q extends p.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({shadowMappingEnabled:e.shadowMap.enabled,hasOccludees:e.hasOccludees});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,i.a)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.acquireTechnique(t.treeRendering?J:W.R5,e)}}class ee extends W.uD{constructor(){super(...arguments),this.initTextureTransparent=!1,this.treeRendering=!1,this.hasVertexTangents=!1}}const te=(0,o.vt)(),re=(0,o.vt)(),ie=(0,o.fA)(0,0,1),oe=(0,o.vt)(),ne=(0,o.vt)(),ae=(0,o.vt)(),se=(0,o.vt)()},35256:(e,t,r)=>{r.d(t,{E:()=>l});var i=r(90237),o=r(49255),n=r(51976);class a extends n.K{constructor(){super(...arguments),this.instancedDoublePrecision=!1,this.hasModelTransformation=!1}}(0,i._)([(0,n.W)()],a.prototype,"instancedDoublePrecision",void 0),(0,i._)([(0,n.W)()],a.prototype,"hasModelTransformation",void 0);var s=r(46263),c=r(59643);class l extends a{constructor(){super(...arguments),this.output=o.V.Color,this.oitPass=c.Y.NONE,this.hasSliceHighlight=!0,this.hasSliceInVertexProgram=!1,this.bindType=s.c.Pass,this.writeDepth=!0}}(0,i._)([(0,n.W)({count:o.V.COUNT})],l.prototype,"output",void 0),(0,i._)([(0,n.W)({count:c.Y.COUNT})],l.prototype,"oitPass",void 0)},43616:(e,t,r)=>{r.d(t,{MB:()=>s,Um:()=>c,kE:()=>a});var i=r(4576),o=r(34727),n=r(77194);function a(e,t,r,i,a){let s=(r.screenLength||0)*e.pixelRatio;null!=a&&(s=(0,n.hs)(s,i,t,a));const c=s*Math.tan(.5*e.fovY)/(.5*e.fullHeight);return(0,o.qE)(c*t,r.minWorldLength||0,null!=r.maxWorldLength?r.maxWorldLength:1/0)}function s(e,t){let r=!1;for(const o in t){const n=t[o];void 0!==n&&(Array.isArray(n)?Array.isArray(e[o])&&(0,i.aI)(n,e[o])||(e[o]=n.slice(),r=!0):e[o]!==n&&(r=!0,e[o]=n))}return r}const c={multiply:1,ignore:2,replace:3,tint:4}},59907:(e,t,r)=>{r.d(t,{Hk:()=>h,Pq:()=>u,SA:()=>g,Ut:()=>d,p1:()=>m,tH:()=>p,tb:()=>f,uO:()=>s});var i=r(58083),o=r(13030),n=r(620),a=r(46540);function s(e,t,r,i=1){const{data:o,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,c=n.length;if(r*=s,1===i)for(let e=0;e<c;++e)a[r]=o[n[e]],r+=s;else for(let e=0;e<c;++e){const t=o[n[e]];for(let e=0;e<i;e++)a[r]=t,r+=s}}function c(e,t,r){const{data:i,indices:o}=e,n=t.typedBuffer,a=t.typedBufferStride,s=o.length;r*=a;for(let e=0;e<s;++e){const t=2*o[e];n[r]=i[t],n[r+1]=i[t+1],r+=a}}function l(e,t,r,i){const{data:o,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,c=n.length;if(r*=s,null==i||1===i)for(let e=0;e<c;++e){const t=3*n[e];a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],r+=s}else for(let e=0;e<c;++e){const t=3*n[e];for(let e=0;e<i;++e)a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],r+=s}}function d(e,t,r,i=1){const{data:o,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,c=n.length;if(r*=s,1===i)for(let e=0;e<c;++e){const t=4*n[e];a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],a[r+3]=o[t+3],r+=s}else for(let e=0;e<c;++e){const t=4*n[e];for(let e=0;e<i;++e)a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],a[r+3]=o[t+3],r+=s}}function u(e,t,r){const i=e.typedBuffer,o=e.typedBufferStride;t*=o;for(let e=0;e<r;++e)i[t]=0,i[t+1]=0,i[t+2]=0,i[t+3]=0,t+=o}function h(e,t,r,o,n=1){if(!t)return void l(e,r,o,n);const{data:a,indices:s}=e,c=r.typedBuffer,d=r.typedBufferStride,u=s.length,h=t[0],m=t[1],f=t[2],p=t[4],g=t[5],v=t[6],_=t[8],T=t[9],x=t[10],A=t[12],E=t[13],b=t[14];o*=d;let S=0,M=0,R=0;const C=(0,i.tZ)(t)?e=>{S=a[e]+A,M=a[e+1]+E,R=a[e+2]+b}:e=>{const t=a[e],r=a[e+1],i=a[e+2];S=h*t+p*r+_*i+A,M=m*t+g*r+T*i+E,R=f*t+v*r+x*i+b};if(1===n)for(let e=0;e<u;++e)C(3*s[e]),c[o]=S,c[o+1]=M,c[o+2]=R,o+=d;else for(let e=0;e<u;++e){C(3*s[e]);for(let e=0;e<n;++e)c[o]=S,c[o+1]=M,c[o+2]=R,o+=d}}function m(e,t,r,o,n=1){if(!t)return void l(e,r,o,n);const{data:a,indices:s}=e,c=t,d=r.typedBuffer,u=r.typedBufferStride,h=s.length,m=c[0],f=c[1],p=c[2],g=c[4],v=c[5],_=c[6],T=c[8],x=c[9],A=c[10],E=!(0,i.ut)(c),b=1e-6,S=1-b;o*=u;let M=0,R=0,C=0;const I=(0,i.tZ)(c)?e=>{M=a[e],R=a[e+1],C=a[e+2]}:e=>{const t=a[e],r=a[e+1],i=a[e+2];M=m*t+g*r+T*i,R=f*t+v*r+x*i,C=p*t+_*r+A*i};if(1===n)if(E)for(let e=0;e<h;++e){I(3*s[e]);const t=M*M+R*R+C*C;if(t<S&&t>b){const e=1/Math.sqrt(t);d[o]=M*e,d[o+1]=R*e,d[o+2]=C*e}else d[o]=M,d[o+1]=R,d[o+2]=C;o+=u}else for(let e=0;e<h;++e)I(3*s[e]),d[o]=M,d[o+1]=R,d[o+2]=C,o+=u;else for(let e=0;e<h;++e){if(I(3*s[e]),E){const e=M*M+R*R+C*C;if(e<S&&e>b){const t=1/Math.sqrt(e);M*=t,R*=t,C*=t}}for(let e=0;e<n;++e)d[o]=M,d[o+1]=R,d[o+2]=C,o+=u}}function f(e,t,r,i,o=1){const{data:n,indices:a}=e,s=r.typedBuffer,c=r.typedBufferStride,l=a.length;if(i*=c,t!==n.length||4!==t)if(1!==o)if(4!==t)for(let e=0;e<l;++e){const t=3*a[e];for(let e=0;e<o;++e)s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=255,i+=c}else for(let e=0;e<l;++e){const t=4*a[e];for(let e=0;e<o;++e)s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=n[t+3],i+=c}else{if(4===t){for(let e=0;e<l;++e){const t=4*a[e];s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=n[t+3],i+=c}return}for(let e=0;e<l;++e){const t=3*a[e];s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=255,i+=c}}else{s[i]=n[0],s[i+1]=n[1],s[i+2]=n[2],s[i+3]=n[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=c/4,a=e[i/=4];i+=t;const d=l*o;for(let r=1;r<d;++r)e[i]=a,i+=t}}function p(e,t,r,i,o=1){const n=t.typedBuffer,a=t.typedBufferStride;if(i*=a,1===o)for(let t=0;t<r;++t)n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2],n[i+3]=e[3],i+=a;else for(let t=0;t<r;++t)for(let t=0;t<o;++t)n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2],n[i+3]=e[3],i+=a}function g(e,t,r,i,n,s,c){for(const l of r.fields.keys()){const r=e.get(l),d=r?.indices;if(r&&d)v(l,r,i,n,s,c);else if(l===a.r.OBJECTANDLAYERIDCOLOR&&null!=t){const r=e.get(a.r.POSITION)?.indices;if(r){const e=r.length;p(t,s.getField(l,o.XP),e,c)}}}}function v(e,t,r,s,l,u){switch(e){case a.r.POSITION:{(0,n.vA)(3===t.size);const i=l.getField(e,o.xs);(0,n.vA)(!!i,`No buffer view for ${e}`),i&&h(t,r,i,u);break}case a.r.NORMAL:{(0,n.vA)(3===t.size);const r=l.getField(e,o.xs);(0,n.vA)(!!r,`No buffer view for ${e}`),r&&m(t,s,r,u);break}case a.r.NORMALCOMPRESSED:{(0,n.vA)(2===t.size);const r=l.getField(e,o.mJ);(0,n.vA)(!!r,`No buffer view for ${e}`),r&&c(t,r,u);break}case a.r.UV0:{(0,n.vA)(2===t.size);const r=l.getField(e,o.gH);(0,n.vA)(!!r,`No buffer view for ${e}`),r&&c(t,r,u);break}case a.r.COLOR:case a.r.SYMBOLCOLOR:{const r=l.getField(e,o.XP);(0,n.vA)(!!r,`No buffer view for ${e}`),(0,n.vA)(3===t.size||4===t.size),!r||3!==t.size&&4!==t.size||f(t,t.size,r,u);break}case a.r.COLORFEATUREATTRIBUTE:{const r=l.getField(e,o.Y$);(0,n.vA)(!!r,`No buffer view for ${e}`),(0,n.vA)(1===t.size),r&&1===t.size&&function(e,t,r){const{data:i,indices:o}=e,n=t.typedBuffer,a=t.typedBufferStride,s=o.length,c=i[0];r*=a;for(let e=0;e<s;++e)n[r]=c,r+=a}(t,r,u);break}case a.r.TANGENT:{(0,n.vA)(4===t.size);const a=l.getField(e,o.Eq);(0,n.vA)(!!a,`No buffer view for ${e}`),a&&function(e,t,r,o,n=1){if(!t)return void d(e,r,o,n);const{data:a,indices:s}=e,c=t,l=r.typedBuffer,u=r.typedBufferStride,h=s.length,m=c[0],f=c[1],p=c[2],g=c[4],v=c[5],_=c[6],T=c[8],x=c[9],A=c[10],E=!(0,i.ut)(c),b=1e-6,S=1-b;if(o*=u,1===n)for(let e=0;e<h;++e){const t=4*s[e],r=a[t],i=a[t+1],n=a[t+2],c=a[t+3];let d=m*r+g*i+T*n,h=f*r+v*i+x*n,M=p*r+_*i+A*n;if(E){const e=d*d+h*h+M*M;if(e<S&&e>b){const t=1/Math.sqrt(e);d*=t,h*=t,M*=t}}l[o]=d,l[o+1]=h,l[o+2]=M,l[o+3]=c,o+=u}else for(let e=0;e<h;++e){const t=4*s[e],r=a[t],i=a[t+1],c=a[t+2],d=a[t+3];let h=m*r+g*i+T*c,M=f*r+v*i+x*c,R=p*r+_*i+A*c;if(E){const e=h*h+M*M+R*R;if(e<S&&e>b){const t=1/Math.sqrt(e);h*=t,M*=t,R*=t}}for(let e=0;e<n;++e)l[o]=h,l[o+1]=M,l[o+2]=R,l[o+3]=d,o+=u}}(t,r,a,u);break}case a.r.PROFILERIGHT:case a.r.PROFILEUP:case a.r.PROFILEVERTEXANDNORMAL:case a.r.FEATUREVALUE:{(0,n.vA)(4===t.size);const r=l.getField(e,o.Eq);(0,n.vA)(!!r,`No buffer view for ${e}`),r&&d(t,r,u)}}}},74810:(e,t,r)=>{r.d(t,{Bt:()=>s,Jr:()=>n,SY:()=>c,mb:()=>a});var i=r(38954),o=r(51850);function n({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:n,emissiveTexture:a,emissiveFactor:s,occlusionTexture:c}){return null==e&&null==t&&null==a&&(null==s||(0,i.e)(s,o.uY))&&null==c&&(null==n||1===n)&&(null==r||1===r)}const a=(0,o.CN)(1,1,.5),s=(0,o.CN)(0,.6,.2),c=(0,o.CN)(0,1,.2)},97225:(e,t,r)=>{r.d(t,{V:()=>M,uD:()=>S,R5:()=>R});var i=r(51850),o=r(91829),n=r(49255),a=r(96336),s=r(72824),c=r(35093),l=r(97220),d=r(84867),u=r(89192),h=r(39341),m=r(14903),f=r(59643),p=r(33524),g=r(34886),v=r(63907);v.MT.LESS,v.MT.ALWAYS;const _={mask:255},T={function:{func:v.MT.ALWAYS,ref:u.dd.OutlineVisualElementMask,mask:u.dd.OutlineVisualElementMask},operation:{fail:v.eA.KEEP,zFail:v.eA.KEEP,zPass:v.eA.ZERO}},x={function:{func:v.MT.ALWAYS,ref:u.dd.OutlineVisualElementMask,mask:u.dd.OutlineVisualElementMask},operation:{fail:v.eA.KEEP,zFail:v.eA.KEEP,zPass:v.eA.REPLACE}};v.MT.EQUAL,u.dd.OutlineVisualElementMask,u.dd.OutlineVisualElementMask,v.eA.KEEP,v.eA.KEEP,v.eA.KEEP,v.MT.NOTEQUAL,u.dd.OutlineVisualElementMask,u.dd.OutlineVisualElementMask,v.eA.KEEP,v.eA.KEEP,v.eA.KEEP;var A=r(74810),E=r(28491),b=r(90644);class S extends s.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=A.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=u.s2.Back,this.isInstanced=!1,this.hasInstancedColor=!1,this.emissiveFactor=i.uY,this.instancedDoublePrecision=!1,this.normalType=a.W.Attribute,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.shadowMappingEnabled=!1,this.ambient=(0,i.CN)(.2,.2,.2),this.diffuse=(0,i.CN)(.8,.8,.8),this.externalColor=(0,o.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,i.vt)(),this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.transparent=!1,this.writeDepth=!0,this.customDepthTest=u.it.Less,this.textureAlphaMode=u.sf.Blend,this.textureAlphaCutoff=c.Q,this.textureAlphaPremultiplied=!1,this.hasOccludees=!1,this.renderOccluded=m.m$.Occlude,this.isDecoration=!1}}class M extends s.gy{constructor(){super(...arguments),this.origin=(0,i.vt)(),this.slicePlaneLocalOrigin=this.origin}}class R extends d.w{initializeProgram(e,t){return this._initializeProgram(e,t,R.shader)}_initializeProgram(e,t,r){return new g.B(e.rctx,r.get().build(t),h.D)}_makePipeline(e,t){const{oitPass:r,output:i,transparent:o,cullFace:a,customDepthTest:s,hasOccludees:c,enableOffset:l}=e,d=r===f.Y.NONE,u=r===f.Y.FrontFace;return(0,b.Ey)({blending:(0,n.RN)(i)&&o?(0,p.Yf)(r):null,culling:I(e)?(0,b.Xt)(a):null,depthTest:{func:(0,p.K_)(r,C(s))},depthWrite:(0,p.z5)(e),drawBuffers:i===n.V.Depth?{buffers:[v.Hr.NONE]}:(0,p.m6)(r,i),colorWrite:b.kn,stencilWrite:c?_:null,stencilTest:c?t?x:T:null,polygonOffset:d||u?null:(0,p.aB)(l)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}}function C(e){return e===u.it.Lequal?v.MT.LEQUAL:v.MT.LESS}function I(e){return e.cullFace!==u.s2.None||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}R.shader=new l.$(E.D,(()=>r.e(5141).then(r.bind(r,5141))))},60517:(e,t,r)=>{r.d(t,{z:()=>d});var i=r(49255),o=r(22911),n=r(45935),a=r(35093),s=r(63365),c=r(2597),l=r(59643);function d(e,t){e.include(n.Q,t),e.include(o.NL,t),e.fragment.include(s.a);const r=t.output===i.V.ObjectAndLayerIdColor,d=(0,i.LG)(t.output),u=(0,i.RN)(t.output)&&t.oitPass===l.Y.ColorAlpha,h=(0,i.RN)(t.output)&&t.oitPass!==l.Y.ColorAlpha,m=t.discardInvisibleFragments;let f=0;(h||d||u)&&e.outputs.add("fragColor","vec4",f++),d&&e.outputs.add("fragEmission","vec4",f++),u&&e.outputs.add("fragAlpha","float",f++),e.fragment.code.add(c.H`
|
|
962
|
+
}`)}function c(e){e.uniforms.add(new n.t("screenSizePerspective",(e=>d(e.screenSizePerspective))))}function l(e){e.uniforms.add(new n.t("screenSizePerspectiveAlignment",(e=>d(e.screenSizePerspectiveAlignment||e.screenSizePerspective))))}function d(e){return(0,i.a)(u,e.parameters.divisor,e.parameters.offset,e.minScaleFactor)}const u=(0,o.vt)()},20693:(e,t,r)=>{r.d(t,{yu:()=>f,Nz:()=>T,NB:()=>p,S7:()=>_});var i=r(58083),o=r(9093),n=r(38954),a=r(51850),s=r(40710),c=r(33079),l=r(20304),d=r(39589),u=r(46263);class h extends d.n{constructor(e,t){super(e,"mat4",u.c.Draw,((r,i,o)=>r.setUniformMatrix4fv(e,t(i,o))))}}var m=r(40095);function f(e,t){t.instancedDoublePrecision?e.constants.add("cameraPosition","vec3",a.uY):e.uniforms.add(new s.W("cameraPosition",((e,t)=>(0,n.a)(v,t.camera.viewInverseTransposeMatrix[3]-e.origin[0],t.camera.viewInverseTransposeMatrix[7]-e.origin[1],t.camera.viewInverseTransposeMatrix[11]-e.origin[2]))))}function p(e,t){if(!t.instancedDoublePrecision)return void e.uniforms.add(new m.X("proj",((e,t)=>t.camera.projectionMatrix)),new h("view",((e,t)=>(0,i.Tl)(g,t.camera.viewMatrix,e.origin))),new s.W("localOrigin",(e=>e.origin)));const r=e=>(0,n.a)(v,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]);e.uniforms.add(new m.X("proj",((e,t)=>t.camera.projectionMatrix)),new m.X("view",((e,t)=>(0,i.Tl)(g,t.camera.viewMatrix,r(t)))),new c.t("localOrigin",((e,t)=>r(t))))}const g=(0,o.vt)(),v=(0,a.vt)();function _(e){e.uniforms.add(new m.X("viewNormal",((e,t)=>t.camera.viewInverseTransposeMatrix)))}function T(e){e.uniforms.add(new l.m("pixelRatio",((e,t)=>t.camera.pixelRatio/t.overlayStretch)))}},95250:(e,t,r)=>{r.d(t,{e:()=>n});var i=r(39589),o=r(46263);class n extends i.n{constructor(e,t){super(e,"bool",o.c.Pass,((r,i,o)=>r.setUniform1b(e,t(i,o))))}}},68259:(e,t,r)=>{r.d(t,{t:()=>n});var i=r(39589),o=r(46263);class n extends i.n{constructor(e,t){super(e,"vec2",o.c.Draw,((r,i,o,n)=>r.setUniform2fv(e,t(i,o,n))))}}},47286:(e,t,r)=>{r.d(t,{G:()=>n});var i=r(39589),o=r(46263);class n extends i.n{constructor(e,t){super(e,"vec2",o.c.Pass,((r,i,o)=>r.setUniform2fv(e,t(i,o))))}}},71988:(e,t,r)=>{r.d(t,{E:()=>n});var i=r(39589),o=r(46263);class n extends i.n{constructor(e,t){super(e,"vec4",o.c.Pass,((r,i,o)=>r.setUniform4fv(e,t(i,o))))}}},93588:(e,t,r)=>{r.d(t,{c:()=>n});var i=r(39589),o=r(46263);class n extends i.n{constructor(e,t){super(e,"int",o.c.Pass,((r,i,o)=>r.setUniform1i(e,t(i,o))))}}},85977:(e,t,r)=>{r.d(t,{N5:()=>c});var i=r(49186),o=(r(44208),r(53966)),n=r(46263),a=r(620);class s{constructor(){this._includedModules=new Map}include(e,t){this._includedModules.has(e)?this._includedModules.get(e):(this._includedModules.set(e,t),e(this.builder,t))}}class c extends s{constructor(){super(...arguments),this.vertex=new h,this.fragment=new h,this.attributes=new m,this.varyings=new f,this.extensions=new p,this.outputs=new g}get fragmentUniforms(){return this.fragment.uniforms.entries}get builder(){return this}generate(e){const t=this.extensions.generateSource(e),r=this.attributes.generateSource(e),i=this.varyings.generateSource(e),o="vertex"===e?this.vertex:this.fragment,n=o.uniforms.generateSource(),a=o.code.generateSource(),s=o.main.generateSource(),c="vertex"===e?T:_,l=o.constants.generateSource(),d=this.outputs.generateSource(e);return`#version 300 es\n${t.join("\n")}\n\n${c}\n\n${l.join("\n")}\n\n${n.join("\n")}\n\n${r.join("\n")}\n\n${i.join("\n")}\n\n${d.join("\n")}\n\n${a.join("\n")}\n\n${s.join("\n")}`}generateBindPass(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Pass];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Pass];r&&t.set(e.name,r)}));const r=Array.from(t.values()),i=r.length;return(t,o)=>{for(let n=0;n<i;++n)r[n](e,t,o)}}generateBindDraw(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Draw];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[n.c.Draw];r&&t.set(e.name,r)}));const r=Array.from(t.values()),i=r.length;return(t,o,n)=>{for(let a=0;a<i;++a)r[a](e,n,t,o)}}}class l{constructor(e){this._stage=e,this._entries=new Map}add(...e){for(const t of e)this._add(t);return this._stage}get(e){return this._entries.get(e)}_add(e){if(null!=e){if(this._entries.has(e.name)&&!this._entries.get(e.name).equals(e))throw new i.A(`Duplicate uniform name ${e.name} for different uniform type`);this._entries.set(e.name,e)}else o.A.getLogger("esri.views.3d.webgl-engine.core.shaderModules.shaderBuilder").error(`Trying to add null Uniform from ${(new Error).stack}.`)}generateSource(){return Array.from(this._entries.values()).map((e=>null!=e.arraySize?`uniform ${e.type} ${e.name}[${e.arraySize}];`:`uniform ${e.type} ${e.name};`))}get entries(){return Array.from(this._entries.values())}}class d{constructor(e){this._stage=e,this._bodies=new Array}add(e){return this._bodies.push(e),this._stage}generateSource(){if(this._bodies.length>0)return[`void main() {\n ${this._bodies.join("\n")||""} \n}`];throw new i.A("Shader does not contain main function body.")}}class u{constructor(e){this._stage=e,this._entries=new Array}add(e){return this._entries.push(e),this._stage}generateSource(){return this._entries}}class h extends s{constructor(){super(...arguments),this.uniforms=new l(this),this.main=new d(this),this.code=new u(this),this.constants=new v(this)}get builder(){return this}}class m{constructor(){this._entries=new Array}add(e,t){this._entries.push([e,t])}generateSource(e){return"fragment"===e?[]:this._entries.map((e=>`in ${e[1]} ${e[0]};`))}}class f{constructor(){this._entries=new Map}add(e,t){this._entries.has(e)&&(0,a.vA)(this._entries.get(e)===t),this._entries.set(e,t)}generateSource(e){const t=new Array;return this._entries.forEach(((r,i)=>t.push("vertex"===e?`out ${r} ${i};`:`in ${r} ${i};`))),t}}class p{constructor(){this._entries=new Set}add(e){this._entries.add(e)}generateSource(e){const t="vertex"===e?p.ALLOWLIST_VERTEX:p.ALLOWLIST_FRAGMENT;return Array.from(this._entries).filter((e=>t.includes(e))).map((e=>`#extension ${e} : enable`))}}p.ALLOWLIST_FRAGMENT=["GL_EXT_shader_texture_lod","GL_OES_standard_derivatives"],p.ALLOWLIST_VERTEX=[];class g{constructor(){this._entries=new Map}add(e,t,r=0){const i=this._entries.get(r);i?(0,a.vA)(i.name===e&&i.type===t,`Fragment shader output location ${r} occupied`):this._entries.set(r,{name:e,type:t})}generateSource(e){if("vertex"===e)return[];0===this._entries.size&&this._entries.set(0,{name:g.DEFAULT_NAME,type:g.DEFAULT_TYPE});const t=new Array;return this._entries.forEach(((e,r)=>t.push(`layout(location = ${r}) out ${e.type} ${e.name};`))),t}}g.DEFAULT_TYPE="vec4",g.DEFAULT_NAME="fragColor";class v{constructor(e){this._stage=e,this._entries=new Set}add(e,t,r){let i="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":i=v._numberToFloatStr(r);break;case"int":i=v._numberToIntStr(r);break;case"bool":i=r.toString();break;case"vec2":i=`vec2(${v._numberToFloatStr(r[0])}, ${v._numberToFloatStr(r[1])})`;break;case"vec3":i=`vec3(${v._numberToFloatStr(r[0])}, ${v._numberToFloatStr(r[1])}, ${v._numberToFloatStr(r[2])})`;break;case"vec4":i=`vec4(${v._numberToFloatStr(r[0])}, ${v._numberToFloatStr(r[1])}, ${v._numberToFloatStr(r[2])}, ${v._numberToFloatStr(r[3])})`;break;case"ivec2":i=`ivec2(${v._numberToIntStr(r[0])}, ${v._numberToIntStr(r[1])})`;break;case"ivec3":i=`ivec3(${v._numberToIntStr(r[0])}, ${v._numberToIntStr(r[1])}, ${v._numberToIntStr(r[2])})`;break;case"ivec4":i=`ivec4(${v._numberToIntStr(r[0])}, ${v._numberToIntStr(r[1])}, ${v._numberToIntStr(r[2])}, ${v._numberToIntStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":i=`${t}(${Array.prototype.map.call(r,(e=>v._numberToFloatStr(e))).join(", ")})`}return this._entries.add(`const ${t} ${e} = ${i};`),this._stage}static _numberToIntStr(e){return e.toFixed(0)}static _numberToFloatStr(e){return Number.isInteger(e)?e.toFixed(1):e.toString()}generateSource(){return Array.from(this._entries)}}const _="#ifdef GL_FRAGMENT_PRECISION_HIGH\n precision highp float;\n precision highp sampler2D;\n#else\n precision mediump float;\n precision mediump sampler2D;\n#endif",T="precision highp float;\nprecision highp sampler2D;"},63761:(e,t,r)=>{r.d(t,{N:()=>n});var i=r(39589),o=r(46263);class n extends i.n{constructor(e,t){super(e,"sampler2D",o.c.Pass,((r,i,o)=>r.bindTexture(e,t(i,o))))}}},97220:(e,t,r)=>{r.d(t,{$:()=>i});class i{constructor(e,t){this._module=e,this._loadModule=t}get(){return this._module}async reload(){return this._module=await this._loadModule(),this._module}}},84867:(e,t,r)=>{r.d(t,{w:()=>a});var i=r(97768),o=r(63907),n=r(90644);class a{constructor(e,t,r){this.release=r,this.primitiveType=o.WR.TRIANGLES,this.key=t.key,this._program=this.initializeProgram(e,t),this._pipeline=this.initializePipeline(t),this.reload=()=>{if(!this.key.equals(t.key))throw new Error("Configuration was changed after construction, cannot reload shader");(0,i.WD)(this._program),this._program=this.initializeProgram(e,t),this._pipeline=this.initializePipeline(t)}}destroy(){this._program=(0,i.WD)(this._program),this._pipeline=null}get program(){return this._program}get compiled(){return this.program.compiled}ensureAttributeLocations(e){this.program.assertCompatibleVertexAttributeLocations(e)}getPipeline(e,t){return this._pipeline}initializePipeline(e){return(0,n.Ey)({blending:n.dH,colorWrite:n.kn})}}},51976:(e,t,r)=>{r.d(t,{K:()=>s,W:()=>c});var i=r(49186),o=r(2597),n=r(4576);class a{constructor(e){this._bits=[...e]}equals(e){return(0,n.aI)(this._bits,e.bits)}get code(){return this._code??=String.fromCharCode(...this._bits),this._code}get bits(){return this._bits}}class s extends o.Y{constructor(){super(),this._parameterBits=this._parameterBits?.map((()=>0))??[],this._parameterNames??=[]}get key(){return this._key??=new a(this._parameterBits),this._key}decode(e=this.key){const t=this._parameterBits;this._parameterBits=[...e.bits];const r=this._parameterNames.map((e=>` ${e}: ${this[e]}`)).join("\n");return this._parameterBits=t,r}}function c(e={}){return(t,r)=>{t.hasOwnProperty("_parameterNames")||Object.defineProperty(t,"_parameterNames",{value:t._parameterNames?.slice()??[],configurable:!0,writable:!0}),t.hasOwnProperty("_parameterBits")||Object.defineProperty(t,"_parameterBits",{value:t._parameterBits?.slice()??[0],configurable:!0,writable:!0}),t._parameterNames.push(r);const o=e.count||2,n=Math.ceil(Math.log2(o)),a=t._parameterBits;let s=0;for(;a[s]+n>16;)s++,s>=a.length&&a.push(0);const c=a[s],l=(1<<n)-1<<c;a[s]+=n,e.count?Object.defineProperty(t,r,{get(){return(this._parameterBits[s]&l)>>c},set(t){if(this[r]!==t){if(this._key=null,this._parameterBits[s]=this._parameterBits[s]&~l|+t<<c&l,"number"!=typeof t)throw new i.A(`Configuration value for ${r} must be a number, got ${typeof t}`);if(null==e.count)throw new i.A(`Configuration value for ${r} must provide a count option`)}}}):Object.defineProperty(t,r,{get(){return!!((this._parameterBits[s]&l)>>c)},set(e){if(this[r]!==e&&(this._key=null,this._parameterBits[s]=this._parameterBits[s]&~l|+e<<c&l,"boolean"!=typeof e))throw new i.A(`Configuration value for ${r} must be boolean, got ${typeof e}`)}})}}},57917:(e,t,r)=>{r.d(t,{S:()=>o});var i=r(34275);function o(e){if(e.length<i.y9)return Array.from(e);if((0,i.cy)(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,i.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}},29920:(e,t,r)=>{r.d(t,{j:()=>s});var i=r(3694),o=r(38954),n=r(51850),a=r(620);class s{constructor(e,t,r){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this.position=r,this._children=void 0,(0,a.vA)(e.length>=1),(0,a.vA)(3===r.size||4===r.size);const{data:i,size:s,indices:l}=r;(0,a.vA)(l.length%this._numIndexPerPrimitive==0),(0,a.vA)(l.length>=e.length*this._numIndexPerPrimitive);const d=e.length;let u=s*l[this._numIndexPerPrimitive*e[0]];c.clear(),c.push(u);const h=(0,n.fA)(i[u],i[u+1],i[u+2]),m=(0,n.o8)(h);for(let t=0;t<d;++t){const r=this._numIndexPerPrimitive*e[t];for(let e=0;e<this._numIndexPerPrimitive;++e){u=s*l[r+e],c.push(u);let t=i[u];h[0]=Math.min(t,h[0]),m[0]=Math.max(t,m[0]),t=i[u+1],h[1]=Math.min(t,h[1]),m[1]=Math.max(t,m[1]),t=i[u+2],h[2]=Math.min(t,h[2]),m[2]=Math.max(t,m[2])}}this.bbMin=h,this.bbMax=m;const f=(0,o.o)((0,n.vt)(),this.bbMin,this.bbMax,.5);this.radius=.5*Math.max(Math.max(m[0]-h[0],m[1]-h[1]),m[2]-h[2]);let p=this.radius*this.radius;for(let e=0;e<c.length;++e){u=c.at(e);const t=i[u]-f[0],r=i[u+1]-f[1],o=i[u+2]-f[2],n=t*t+r*r+o*o;if(n<=p)continue;const a=Math.sqrt(n),s=.5*(a-this.radius);this.radius=this.radius+s,p=this.radius*this.radius;const l=s/a;f[0]+=t*l,f[1]+=r*l,f[2]+=o*l}this.center=f,c.clear()}getChildren(){if(this._children||(0,o.s)(this.bbMin,this.bbMax)<=1)return this._children;const e=(0,o.o)((0,n.vt)(),this.bbMin,this.bbMax,.5),t=this.primitiveIndices.length,r=new Uint8Array(t),i=new Array(8);for(let e=0;e<8;++e)i[e]=0;const{data:a,size:c,indices:l}=this.position;for(let o=0;o<t;++o){let t=0;const n=this._numIndexPerPrimitive*this.primitiveIndices[o];let s=c*l[n],d=a[s],u=a[s+1],h=a[s+2];for(let e=1;e<this._numIndexPerPrimitive;++e){s=c*l[n+e];const t=a[s],r=a[s+1],i=a[s+2];t<d&&(d=t),r<u&&(u=r),i<h&&(h=i)}d<e[0]&&(t|=1),u<e[1]&&(t|=2),h<e[2]&&(t|=4),r[o]=t,++i[t]}let d=0;for(let e=0;e<8;++e)i[e]>0&&++d;if(d<2)return;const u=new Array(8);for(let e=0;e<8;++e)u[e]=i[e]>0?new Uint32Array(i[e]):void 0;for(let e=0;e<8;++e)i[e]=0;for(let e=0;e<t;++e){const t=r[e];u[t][i[t]++]=this.primitiveIndices[e]}this._children=new Array;for(let e=0;e<8;++e)void 0!==u[e]&&this._children.push(new s(u[e],this._numIndexPerPrimitive,this.position));return this._children}static prune(){c.prune()}}const c=new i.A({deallocator:null})},69720:(e,t,r)=>{r.d(t,{J:()=>o});var i=r(24326);class o{constructor(){this.id=(0,i.c)()}}},96672:(e,t,r)=>{var i;r.d(t,{X:()=>i}),function(e){e[e.Layer=0]="Layer",e[e.Object=1]="Object",e[e.Mesh=2]="Mesh",e[e.Line=3]="Line",e[e.Point=4]="Point",e[e.Material=5]="Material",e[e.Texture=6]="Texture",e[e.COUNT=7]="COUNT"}(i||(i={}))},39341:(e,t,r)=>{r.d(t,{D:()=>o});var i=r(46540);const o=new Map([[i.r.POSITION,0],[i.r.NORMAL,1],[i.r.NORMALCOMPRESSED,1],[i.r.UV0,2],[i.r.COLOR,3],[i.r.COLORFEATUREATTRIBUTE,3],[i.r.SIZE,4],[i.r.TANGENT,4],[i.r.CENTEROFFSETANDDISTANCE,5],[i.r.SYMBOLCOLOR,5],[i.r.FEATUREATTRIBUTE,6],[i.r.INSTANCEFEATUREATTRIBUTE,6],[i.r.INSTANCECOLOR,7],[i.r.OBJECTANDLAYERIDCOLOR,7],[i.r.INSTANCEOBJECTANDLAYERIDCOLOR,7],[i.r.ROTATION,8],[i.r.INSTANCEMODEL,8],[i.r.INSTANCEMODELNORMAL,12],[i.r.INSTANCEMODELORIGINHI,11],[i.r.INSTANCEMODELORIGINLO,15]])},25634:(e,t,r)=>{r.d(t,{m8:()=>c,NV:()=>d});var i=r(97768),o=r(74887),n=r(2597),a=r(89192);class s{constructor(e){this._material=e.material,this._techniques=e.techniques,this._output=e.output}dispose(){}get _stippleTextures(){return this._techniques.context.stippleTextures}get _markerTextures(){return this._techniques.context.markerTextures}acquireTechnique(e,t){return this._techniques.acquire(e,this._material.getConfiguration(this._output,t))}ensureResources(e){return a.Am.LOADED}}class c extends s{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this._textureId=e.textureId,this._acquire(e.textureId,(e=>this._texture=e)),this._acquire(e.normalTextureId,(e=>this._textureNormal=e)),this._acquire(e.emissiveTextureId,(e=>this._textureEmissive=e)),this._acquire(e.occlusionTextureId,(e=>this._textureOcclusion=e)),this._acquire(e.metallicRoughnessTextureId,(e=>this._textureMetallicRoughness=e))}dispose(){super.dispose(),this._texture=(0,i.Gz)(this._texture),this._textureNormal=(0,i.Gz)(this._textureNormal),this._textureEmissive=(0,i.Gz)(this._textureEmissive),this._textureOcclusion=(0,i.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,i.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?a.Am.LOADED:a.Am.LOADING}get textureBindParameters(){return new d(null!=this._texture?this._texture.glTexture:null,null!=this._textureNormal?this._textureNormal.glTexture:null,null!=this._textureEmissive?this._textureEmissive.glTexture:null,null!=this._textureOcclusion?this._textureOcclusion.glTexture:null,null!=this._textureMetallicRoughness?this._textureMetallicRoughness.glTexture:null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,i.Gz)(this._texture),this._textureId=e,this._acquire(this._textureId,(e=>this._texture=e)))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,o.$X)(r))return++this._numLoading,void r.then((e=>{if(this._disposed)return(0,i.Gz)(e),void t(null);t(e)})).finally((()=>--this._numLoading));t(r)}}class l extends n.Y{constructor(e=null){super(),this.textureEmissive=e}}class d extends l{constructor(e=null,t=null,r=null,i=null,o=null,n,a){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=i,this.textureMetallicRoughness=o,this.scale=n,this.normalTextureTransformMatrix=a}}},87170:(e,t,r)=>{r.d(t,{V:()=>R});var i=r(9093),o=r(38954),n=r(97146),a=r(57917),s=r(29920),c=r(69720),l=r(96672),d=r(51850),u=r(4341),h=r(11964);function m(e,t,r){return(0,o.f)(f,t,e),(0,o.f)(p,r,e),.5*(0,o.m)((0,o.b)(f,f,p))}r(32114),new u.I(h.vt),new u.I((()=>{return e?{p0:(0,d.o8)(e.p0),p1:(0,d.o8)(e.p1),p2:(0,d.o8)(e.p2)}:{p0:(0,d.vt)(),p1:(0,d.vt)(),p2:(0,d.vt)()};var e}));const f=(0,d.vt)(),p=(0,d.vt)(),g=(0,d.vt)(),v=(0,d.vt)(),_=(0,d.vt)(),T=(0,d.vt)();var x=r(24326),A=r(89192);class E{constructor(e){this.channel=e,this.id=(0,x.c)()}}class b extends E{constructor(e){super(A.Mg.Highlight),this.highlightGroup=e}}var S=r(620),M=r(46540);class R extends c.J{constructor(e,t,r=null,i=l.X.Mesh,o=null,a=-1){super(),this.material=e,this.mapPositions=r,this.type=i,this.objectAndLayerIdColor=o,this.edgeIndicesLength=a,this.highlights=new Set,this._highlightGroupCounts=new Map,this.visible=!0,this._attributes=new Map,this._boundingInfo=null;for(const[e,r]of t)this._attributes.set(e,{...r,indices:(0,n.Dg)(r.indices)}),e===M.r.POSITION&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._attributes.get(e).indices.length:this.edgeIndicesLength)}instantiate(e={}){const t=new R(e.material||this.material,[],this.mapPositions,this.type,this.objectAndLayerIdColor,this.edgeIndicesLength);return this._attributes.forEach(((e,r)=>{e.exclusive=!1,t._attributes.set(r,e)})),t._boundingInfo=this._boundingInfo,t.transformation=e.transformation||this.transformation,t}get attributes(){return this._attributes}getMutableAttribute(e){let t=this._attributes.get(e);return t&&!t.exclusive&&(t={...t,exclusive:!0,data:(0,a.S)(t.data)},this._attributes.set(e,t)),t}setAttributeData(e,t){const r=this._attributes.get(e);r&&this._attributes.set(e,{...r,exclusive:!0,data:t})}get indexCount(){const e=this._attributes.values().next().value.indices;return e?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return null==this._boundingInfo&&(this._boundingInfo=this._calculateBoundingInfo()),this._boundingInfo}computeAttachmentOrigin(e){return!!(this.type===l.X.Mesh?this._computeAttachmentOriginTriangles(e):this.type===l.X.Line?this._computeAttachmentOriginLines(e):this._computeAttachmentOriginPoints(e))&&(null!=this._transformation&&(0,o.h)(e,e,this._transformation),!0)}_computeAttachmentOriginTriangles(e){return function(e,t){if(!e)return!1;const{size:r,data:i,indices:n}=e;(0,o.a)(t,0,0,0),(0,o.a)(T,0,0,0);let a=0,s=0;for(let e=0;e<n.length-2;e+=3){const c=n[e]*r,l=n[e+1]*r,d=n[e+2]*r;(0,o.a)(g,i[c],i[c+1],i[c+2]),(0,o.a)(v,i[l],i[l+1],i[l+2]),(0,o.a)(_,i[d],i[d+1],i[d+2]);const u=m(g,v,_);u?((0,o.g)(g,g,v),(0,o.g)(g,g,_),(0,o.j)(g,g,1/3*u),(0,o.g)(t,t,g),a+=u):((0,o.g)(T,T,g),(0,o.g)(T,T,v),(0,o.g)(T,T,_),s+=3)}return!(0===s&&0===a||(0!==a?((0,o.j)(t,t,1/a),0):0===s||((0,o.j)(t,T,1/s),0)))}(this.attributes.get(M.r.POSITION),e)}_computeAttachmentOriginLines(e){const t=this.attributes.get(M.r.POSITION);return function(e,t,r){if(!e)return!1;(0,o.a)(r,0,0,0),(0,o.a)(T,0,0,0);let i=0,n=0;const{size:a,data:s,indices:c}=e,l=c.length-1,d=l+(t?2:0);for(let e=0;e<d;e+=2){const t=e<l?e+1:0,d=c[e<l?e:l]*a,u=c[t]*a;g[0]=s[d],g[1]=s[d+1],g[2]=s[d+2],v[0]=s[u],v[1]=s[u+1],v[2]=s[u+2],(0,o.j)(g,(0,o.g)(g,g,v),.5);const h=(0,o.F)(g,v);h>0?((0,o.g)(r,r,(0,o.j)(g,g,h)),i+=h):0===i&&((0,o.g)(T,T,g),n++)}return 0!==i?((0,o.j)(r,r,1/i),!0):0!==n&&((0,o.j)(r,T,1/n),!0)}(t,function(e,t){return!(!("isClosed"in e)||!e.isClosed)&&t.indices.length>2}(this.material.parameters,t),e)}_computeAttachmentOriginPoints(e){return function(e,t){if(!e)return!1;const{size:r,data:i,indices:n}=e;(0,o.a)(t,0,0,0);let a=-1,s=0;for(let e=0;e<n.length;e++){const o=n[e]*r;a!==o&&(t[0]+=i[o],t[1]+=i[o+1],t[2]+=i[o+2],s++),a=o}return s>1&&(0,o.j)(t,t,1/s),s>0}(this.attributes.get(M.r.POSITION),e)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const e=this.attributes.get(M.r.POSITION);if(!e||0===e.indices.length)return null;const t=this.type===l.X.Mesh?3:1;(0,S.vA)(e.indices.length%t==0,"Indexing error: "+e.indices.length+" not divisible by "+t);const r=(0,n.tM)(e.indices.length/t);return new s.j(r,t,e)}get transformation(){return this._transformation??i.zK}set transformation(e){this._transformation=e&&e!==i.zK?(0,i.o8)(e):null}get highlightGroups(){return this._highlightGroupCounts}get hasHighlights(){return this._highlightGroupCounts.size>0}foreachHighlightGroup(e){this._highlightGroupCounts.forEach(((t,r)=>e(r)))}allocateIdAndHighlight(e){const t=new b(e);return this.addHighlight(t)}addHighlight(e){this.highlights.add(e);const{highlightGroup:t}=e,r=(this._highlightGroupCounts.get(t)??0)+1;return this._highlightGroupCounts.set(t,r),e}removeHighlight(e){if(this.highlights.delete(e)){const{highlightGroup:t}=e,r=this._highlightGroupCounts.get(t)??0;r<=1?this._highlightGroupCounts.delete(t):this._highlightGroupCounts.set(t,r-1)}}}},14903:(e,t,r)=>{r.d(t,{im:()=>h,m$:()=>i});var i,o,n=r(51850),a=r(2597),s=r(89192),c=r(69720),l=r(96672),d=r(39341),u=r(43616);class h extends c.J{constructor(e,t){super(),this.type=l.X.Material,this.supportsEdges=!1,this._renderPriority=0,this._vertexAttributeLocations=d.D,this._pp0=(0,n.fA)(0,0,1),this._pp1=(0,n.fA)(0,0,0),this._parameters=new t,(0,u.MB)(this._parameters,e),this.validateParameters(this._parameters)}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,u.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations===s.ID.ON)&&!!(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}get vertexAttributeLocations(){return this._vertexAttributeLocations}_parametersChanged(){this.repository?.materialChanged(this)}queryRenderOccludedState(e){return this.visible&&this.parameters.renderOccluded===e}get hasEmissions(){return!1}intersectDraped(e,t,r,i,o,n){return this._pp0[0]=this._pp1[0]=i[0],this._pp0[1]=this._pp1[1]=i[1],this.intersect(e,t,r,this._pp0,this._pp1,o)}}(o=i||(i={}))[o.None=0]="None",o[o.Occlude=1]="Occlude",o[o.Transparent=2]="Transparent",o[o.OccludeAndTransparent=4]="OccludeAndTransparent",o[o.OccludeAndTransparentStencil=8]="OccludeAndTransparentStencil",o[o.Opaque=16]="Opaque",a.Y},59643:(e,t,r)=>{var i;r.d(t,{Y:()=>i}),function(e){e[e.ColorAlpha=0]="ColorAlpha",e[e.FrontFace=1]="FrontFace",e[e.NONE=2]="NONE",e[e.COUNT=3]="COUNT"}(i||(i={}))},33524:(e,t,r)=>{r.d(t,{K_:()=>p,Yf:()=>d,aB:()=>f,ez:()=>l,m6:()=>g,xt:()=>h,z5:()=>u});var i=r(49255),o=r(59643),n=r(63907),a=r(90644);const s=(0,a.p3)(n.dn.SRC_ALPHA,n.dn.ONE,n.dn.ONE_MINUS_SRC_ALPHA,n.dn.ONE_MINUS_SRC_ALPHA),c=(0,a.p3)(n.dn.ONE,n.dn.ZERO,n.dn.ONE,n.dn.ONE_MINUS_SRC_ALPHA);function l(e){return e===o.Y.FrontFace?null:c}function d(e){switch(e){case o.Y.NONE:return s;case o.Y.ColorAlpha:return c;case o.Y.FrontFace:case o.Y.COUNT:return null}}function u(e){if(e.draped)return null;switch(e.oitPass){case o.Y.NONE:case o.Y.FrontFace:return e.writeDepth?a.Uy:null;case o.Y.ColorAlpha:case o.Y.COUNT:return null}}const h=5e5,m={factor:-1,units:-2};function f(e){return e?m:null}function p(e,t=n.MT.LESS){return e===o.Y.NONE||e===o.Y.FrontFace?t:n.MT.LEQUAL}function g(e,t){const r=(0,i.LG)(t);return e===o.Y.ColorAlpha?r?{buffers:[n.Nm.COLOR_ATTACHMENT0,n.Nm.COLOR_ATTACHMENT1,n.Nm.COLOR_ATTACHMENT2]}:{buffers:[n.Nm.COLOR_ATTACHMENT0,n.Nm.COLOR_ATTACHMENT1]}:r?{buffers:[n.Nm.COLOR_ATTACHMENT0,n.Nm.COLOR_ATTACHMENT1]}:null}},34886:(e,t,r)=>{r.d(t,{B:()=>n});var i=r(3694),o=r(94656);class n{constructor(e,t,r){this._context=e,this._locations=r,this._textures=new Map,this._freeTextureUnits=new i.A({deallocator:null}),this._glProgram=e.programCache.acquire(t.generate("vertex"),t.generate("fragment"),r),this._glProgram.stop=()=>{throw new Error("Wrapped _glProgram used directly")},this.bindPass=t.generateBindPass(this),this.bindDraw=t.generateBindDraw(this),this._fragmentUniforms=(0,o.en)()?t.fragmentUniforms:null}dispose(){this._glProgram.dispose()}get glName(){return this._glProgram.glName}get hasTransformFeedbackVaryings(){return this._glProgram.hasTransformFeedbackVaryings}get compiled(){return this._glProgram.compiled}setUniform1b(e,t){this._glProgram.setUniform1i(e,t?1:0)}setUniform1i(e,t){this._glProgram.setUniform1i(e,t)}setUniform1f(e,t){this._glProgram.setUniform1f(e,t)}setUniform2fv(e,t){this._glProgram.setUniform2fv(e,t)}setUniform3fv(e,t){this._glProgram.setUniform3fv(e,t)}setUniform4fv(e,t){this._glProgram.setUniform4fv(e,t)}setUniformMatrix3fv(e,t){this._glProgram.setUniformMatrix3fv(e,t)}setUniformMatrix4fv(e,t){this._glProgram.setUniformMatrix4fv(e,t)}setUniform1fv(e,t){this._glProgram.setUniform1fv(e,t)}setUniform1iv(e,t){this._glProgram.setUniform1iv(e,t)}setUniform2iv(e,t){this._glProgram.setUniform2iv(e,t)}setUniform3iv(e,t){this._glProgram.setUniform3iv(e,t)}setUniform4iv(e,t){this._glProgram.setUniform4iv(e,t)}assertCompatibleVertexAttributeLocations(e){e.locations!==this._locations&&console.error("VertexAttributeLocations are incompatible")}stop(){this._textures.clear(),this._freeTextureUnits.clear()}bindTexture(e,t){if(null==t?.glName){const t=this._textures.get(e);return t&&(this._context.bindTexture(null,t.unit),this._freeTextureUnit(t),this._textures.delete(e)),null}let r=this._textures.get(e);return null==r?(r=this._allocTextureUnit(t),this._textures.set(e,r)):r.texture=t,this._context.useProgram(this),this.setUniform1i(e,r.unit),this._context.bindTexture(t,r.unit),r.unit}rebindTextures(){this._context.useProgram(this),this._textures.forEach(((e,t)=>{this._context.bindTexture(e.texture,e.unit),this.setUniform1i(t,e.unit)})),this._fragmentUniforms?.forEach((e=>{"sampler2D"!==e.type&&"samplerCube"!==e.type||this._textures.has(e.name)||console.error(`Texture sampler ${e.name} has no bound texture`)}))}_allocTextureUnit(e){return{texture:e,unit:0===this._freeTextureUnits.length?this._textures.size:this._freeTextureUnits.pop()}}_freeTextureUnit(e){this._freeTextureUnits.push(e.unit)}}},13464:(e,t,r)=>{var i;r.d(t,{N:()=>i}),function(e){e[e.INTEGRATED_MESH=0]="INTEGRATED_MESH",e[e.OPAQUE_TERRAIN=1]="OPAQUE_TERRAIN",e[e.OPAQUE_MATERIAL=2]="OPAQUE_MATERIAL",e[e.OPAQUE_MATERIAL_WITHOUT_NORMALS=3]="OPAQUE_MATERIAL_WITHOUT_NORMALS",e[e.TRANSPARENT_MATERIAL=4]="TRANSPARENT_MATERIAL",e[e.TRANSPARENT_MATERIAL_WITHOUT_NORMALS=5]="TRANSPARENT_MATERIAL_WITHOUT_NORMALS",e[e.TRANSPARENT_TERRAIN=6]="TRANSPARENT_TERRAIN",e[e.TRANSPARENT_MATERIAL_WITHOUT_DEPTH=7]="TRANSPARENT_MATERIAL_WITHOUT_DEPTH",e[e.OCCLUDED_TERRAIN=8]="OCCLUDED_TERRAIN",e[e.OCCLUDER_MATERIAL=9]="OCCLUDER_MATERIAL",e[e.TRANSPARENT_OCCLUDER_MATERIAL=10]="TRANSPARENT_OCCLUDER_MATERIAL",e[e.OCCLUSION_PIXELS=11]="OCCLUSION_PIXELS",e[e.OPAQUE_ENVIRONMENT=12]="OPAQUE_ENVIRONMENT",e[e.TRANSPARENT_ENVIRONMENT=13]="TRANSPARENT_ENVIRONMENT",e[e.HUD_MATERIAL=14]="HUD_MATERIAL",e[e.LABEL_MATERIAL=15]="LABEL_MATERIAL",e[e.LINE_CALLOUTS=16]="LINE_CALLOUTS",e[e.LINE_CALLOUTS_HUD_DEPTH=17]="LINE_CALLOUTS_HUD_DEPTH",e[e.DRAPED_MATERIAL=18]="DRAPED_MATERIAL",e[e.DRAPED_WATER=19]="DRAPED_WATER",e[e.VOXEL=20]="VOXEL",e[e.MAX_SLOTS=21]="MAX_SLOTS"}(i||(i={}))},76844:(e,t,r)=>{r.d(t,{g:()=>U}),r(44208);var i=r(49186),o=r(65529),n=r(97768),a=r(74887),s=r(34275),c=r(84952),l=r(99677),d=r(56058),u=r(89192),h=r(2741);let m;var f,p;(p=f||(f={}))[p.ETC1_RGB=0]="ETC1_RGB",p[p.ETC2_RGBA=1]="ETC2_RGBA",p[p.BC1_RGB=2]="BC1_RGB",p[p.BC3_RGBA=3]="BC3_RGBA",p[p.BC4_R=4]="BC4_R",p[p.BC5_RG=5]="BC5_RG",p[p.BC7_M6_RGB=6]="BC7_M6_RGB",p[p.BC7_M5_RGBA=7]="BC7_M5_RGBA",p[p.PVRTC1_4_RGB=8]="PVRTC1_4_RGB",p[p.PVRTC1_4_RGBA=9]="PVRTC1_4_RGBA",p[p.ASTC_4x4_RGBA=10]="ASTC_4x4_RGBA",p[p.ATC_RGB=11]="ATC_RGB",p[p.ATC_RGBA=12]="ATC_RGBA",p[p.FXT1_RGB=17]="FXT1_RGB",p[p.PVRTC2_4_RGB=18]="PVRTC2_4_RGB",p[p.PVRTC2_4_RGBA=19]="PVRTC2_4_RGBA",p[p.ETC2_EAC_R11=20]="ETC2_EAC_R11",p[p.ETC2_EAC_RG11=21]="ETC2_EAC_RG11",p[p.RGBA32=13]="RGBA32",p[p.RGB565=14]="RGB565",p[p.BGR565=15]="BGR565",p[p.RGBA4444=16]="RGBA4444";var g=r(63907),v=r(21231),_=r(42293);let T=null,x=null;async function A(){return null==x&&(m??=(async()=>{const e=await r.e(9321).then(r.bind(r,49321)),t=await e.default({locateFile:e=>(0,h.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),x=m,T=await x),x}function E(e,t,r,i,o){const n=(0,_.IB)(t?g.CQ.COMPRESSED_RGBA8_ETC2_EAC:g.CQ.COMPRESSED_RGB8_ETC2),a=o&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*n*a)}function b(e){return e.getNumImages()>=1&&!e.isUASTC()}function S(e){return e.getFaces()>=1&&e.isETC1S()}function M(e,t,r,i,o,n,a,s){const{compressedTextureETC:c,compressedTextureS3TC:l}=e.capabilities,[d,u]=c?i?[f.ETC2_RGBA,g.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[f.ETC1_RGB,g.CQ.COMPRESSED_RGB8_ETC2]:l?i?[f.BC3_RGBA,g.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[f.BC1_RGB,g.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[f.RGBA32,g.Ab.RGBA],h=t.hasMipmap?r:Math.min(1,r),m=[];for(let e=0;e<h;e++)m.push(new Uint8Array(a(e,d))),s(e,d,m[e]);return t.internalFormat=u,t.hasMipmap=m.length>1,t.samplingMode=t.hasMipmap?g.Cj.LINEAR_MIPMAP_LINEAR:g.Cj.LINEAR,t.width=o,t.height=n,new v.g(e,t,{type:"compressed",levels:m})}var R=r(69720),C=r(96672),I=r(53966);const w=()=>I.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function O(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const N=O("DXT1"),y=O("DXT3"),P=O("DXT5");function L(e,t,r){if(e instanceof ImageData)return L(H(e),t,r);const i=document.createElement("canvas");return i.width=t,i.height=r,i.getContext("2d").drawImage(e,0,0,i.width,i.height),i}function H(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new i.A("Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}var D,F,G=r(620),B=r(67171);class U extends R.J{get parameters(){return this._parameters}constructor(e,t){super(),this._data=e,this.type=C.X.Texture,this._glTexture=null,this._loadingPromise=null,this._loadingController=null,this.events=new o.A,this._parameters={...V,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.frameUpdate=void 0}_startPreload(e){null!=e&&(e instanceof HTMLVideoElement?(this.frameUpdate=t=>this._frameUpdate(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e))}_startPreloadVideoElement(e){if(!((0,c.w8)(e.src)||"auto"===e.preload&&e.crossOrigin)){e.preload="auto",e.crossOrigin="anonymous";const t=!e.paused;if(e.src=e.src,t&&e.autoplay){const t=()=>{e.removeEventListener("canplay",t),e.play()};e.addEventListener("canplay",t)}}}_startPreloadImageElement(e){(0,c.DB)(e.src)||(0,c.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new B.R;return t.wrapMode=this._parameters.wrap??g.pF.REPEAT,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?g.Cj.LINEAR_MIPMAP_LINEAR:g.Cj.LINEAR,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t}get glTexture(){return this._glTexture}get memoryEstimate(){return this._glTexture?.usedMemory||function(e,t){if(null==e)return 0;if((0,s.mw)(e)||(0,s.mg)(e))return t.encoding===u.JS.KTX2_ENCODING?function(e,t){if(null==T)return e.byteLength;const r=new T.KTX2File(new Uint8Array(e)),i=S(r)?E(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):t.encoding===u.JS.BASIS_ENCODING?function(e,t){if(null==T)return e.byteLength;const r=new T.BasisFile(new Uint8Array(e)),i=b(r)?E(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?z(e):t;return(t.mipmap?4/3:1)*r*i*(t.components||4)||0}(this._data,this._parameters)}load(e){if(this._glTexture)return this._glTexture;if(this._loadingPromise)return this._loadingPromise;const t=this._data;return null==t?(this._glTexture=new v.g(e,this._createDescriptor(e),null),this._glTexture):(this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):((0,s.mw)(t)||(0,s.mg)(t))&&this._parameters.encoding===u.JS.DDS_ENCODING?this._loadFromDDSData(e,t):((0,s.mw)(t)||(0,s.mg)(t))&&this._parameters.encoding===u.JS.KTX2_ENCODING?this._loadFromKTX2(e,t):((0,s.mw)(t)||(0,s.mg)(t))&&this._parameters.encoding===u.JS.BASIS_ENCODING?this._loadFromBasis(e,t):(0,s.mg)(t)?this._loadFromPixelData(e,t):(0,s.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):null)}_frameUpdate(e,t){return null==this._glTexture||e.readyState<D.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._glTexture.setData(e),this._glTexture.descriptor.hasMipmap&&this._glTexture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._glTexture=function(e,t,r){const i=function(e,t){const r=new Int32Array(e,0,31);if(542327876!==r[0])return w().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return w().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let o,n;switch(i){case N:o=8,n=g.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case y:o=16,n=g.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case P:o=16,n=g.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return w().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let a=1,s=r[4],c=r[3];(3&s||3&c)&&(w().warn("Rounding up compressed texture size to nearest multiple of 4."),s=s+3&-4,c=c+3&-4);const l=s,d=c;let u,h;131072&r[2]&&!1!==t&&(a=Math.max(1,r[7]));let m=r[1]+4;const f=[];for(let t=0;t<a;++t)h=(s+3>>2)*(c+3>>2)*o,u=new Uint8Array(e,m,h),f.push(u),m+=h,s=Math.max(1,s>>1),c=Math.max(1,c>>1);return{textureData:{type:"compressed",levels:f},internalFormat:n,width:l,height:d}}(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:o,internalFormat:n,width:a,height:s}=i;return t.samplingMode=o.levels.length>1?g.Cj.LINEAR_MIPMAP_LINEAR:g.Cj.LINEAR,t.hasMipmap=o.levels.length>1,t.internalFormat=n,t.width=a,t.height=s,new v.g(e,t,o)}(e,this._createDescriptor(e),t),this._glTexture}_loadFromKTX2(e,t){return this._loadAsync((()=>async function(e,t,r){null==T&&(T=await A());const i=new T.KTX2File(new Uint8Array(r));if(!S(i))return null;i.startTranscoding();const o=M(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),((e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t)),((e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1)));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromBasis(e,t){return this._loadAsync((()=>async function(e,t,r){null==T&&(T=await A());const i=new T.BasisFile(new Uint8Array(r));if(!b(i))return null;i.startTranscoding();const o=M(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),((e,t)=>i.getImageTranscodedSizeInBytes(0,e,t)),((e,t,r)=>i.transcodeImage(r,0,e,t,0,0)));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then((e=>(this._glTexture=e,e)))))}_loadFromPixelData(e,t){(0,G.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return r.pixelFormat=1===this._parameters.components?g.Ab.LUMINANCE:3===this._parameters.components?g.Ab.RGB:g.Ab.RGBA,r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new v.g(e,r,t),this._glTexture}_loadFromURL(e,t){return this._loadAsync((async r=>{const i=await(0,l.D)(t,{signal:r});return(0,a.Te)(r),this._loadFromImage(e,i)}))}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync((async r=>{const i=await(0,d.Sx)(t,t.src,!1,r);return(0,a.Te)(r),this._loadFromImage(e,i)}))}_loadFromVideoElement(e,t){return t.readyState>=D.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync((r=>new Promise(((o,s)=>{const c=()=>{t.removeEventListener("loadeddata",l),t.removeEventListener("error",d),(0,n.xt)(u)},l=()=>{t.readyState>=D.HAVE_CURRENT_DATA&&(c(),o(this._loadFromImage(e,t)))},d=e=>{c(),s(e||new i.A("Failed to load video"))};t.addEventListener("loadeddata",l),t.addEventListener("error",d);const u=(0,a.u7)(r,(()=>d((0,a.NK)())))}))))}_loadFromImage(e,t){let r=t;if(!(r instanceof HTMLVideoElement)){const{maxTextureSize:t}=e.parameters;r=this._parameters.downsampleUncompressed?function(e,t){let r=e.width*e.height;if(r<4096)return e instanceof ImageData?H(e):e;let i=e.width,o=e.height;do{i=Math.ceil(i/2),o=Math.ceil(o/2),r=i*o}while(r>1048576||null!=t&&(i>t||o>t));return L(e,i,o)}(r,t):function(e,t){const r=Math.max(e.width,e.height);if(r<=t)return e;const i=t/r;return L(e,Math.round(e.width*i),Math.round(e.height*i))}(r,t)}const i=z(r);this._parameters.width=i.width,this._parameters.height=i.height;const o=this._createDescriptor(e);return o.pixelFormat=3===this._parameters.components?g.Ab.RGB:g.Ab.RGBA,o.width=i.width,o.height=i.height,this._glTexture=new v.g(e,o,r),this._glTexture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null)};return r.then(i,i),r}unload(){if(this._glTexture=(0,n.WD)(this._glTexture),null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}}function z(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}(F=D||(D={}))[F.HAVE_NOTHING=0]="HAVE_NOTHING",F[F.HAVE_METADATA=1]="HAVE_METADATA",F[F.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",F[F.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",F[F.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA";const V={wrap:{s:g.pF.REPEAT,t:g.pF.REPEAT},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1,downsampleUncompressed:!1}},89192:(e,t,r)=>{var i,o,n,a,s,c,l,d,u;r.d(t,{Am:()=>a,C7:()=>n,ID:()=>d,JS:()=>u,Mg:()=>c,dd:()=>s,it:()=>o,s2:()=>i,sf:()=>l}),function(e){e[e.None=0]="None",e[e.Front=1]="Front",e[e.Back=2]="Back",e[e.COUNT=3]="COUNT"}(i||(i={})),function(e){e[e.Less=0]="Less",e[e.Lequal=1]="Lequal",e[e.COUNT=2]="COUNT"}(o||(o={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.UPDATE=1]="UPDATE"}(n||(n={})),function(e){e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED"}(a||(a={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(s||(s={})),function(e){e[e.Highlight=0]="Highlight",e[e.MaskOccludee=1]="MaskOccludee",e[e.COUNT=2]="COUNT"}(c||(c={})),function(e){e[e.Blend=0]="Blend",e[e.Opaque=1]="Opaque",e[e.Mask=2]="Mask",e[e.MaskBlend=3]="MaskBlend",e[e.COUNT=4]="COUNT"}(l||(l={})),function(e){e[e.OFF=0]="OFF",e[e.ON=1]="ON"}(d||(d={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(u||(u={}))},77194:(e,t,r)=>{r.d(t,{MD:()=>c,cJ:()=>s,hs:()=>l,m0:()=>a});var i=r(34727),o=(r(17352),r(97937));function n(e,t,r){const i=r.parameters;return d.scale=Math.min(i.divisor/(t-i.offset),1),d.factor=function(e){return Math.abs(e*e*e)}(e),d}function a(e,t){return(0,i.Cc)(e*Math.max(t.scale,t.minScaleFactor),e,t.factor)}function s(e,t,r,i){i.scale=function(e,t,r){const i=n(e,t,r);return i.minScaleFactor=0,a(1,i)}(e,t,r),i.factor=0,i.minScaleFactor=r.minScaleFactor}function c(e,t,r=[0,0]){const i=Math.min(Math.max(t.scale,t.minScaleFactor),1);return r[0]=e[0]*i,r[1]=e[1]*i,r}function l(e,t,r,i){return a(e,n(t,r,i))}r(24151),(0,i.kU)(10),(0,i.kU)(12),(0,i.kU)(70),(0,i.kU)(40);const d={scale:0,factor:0,minScaleFactor:0};(0,o.c)()},16396:(e,t,r)=>{r.d(t,{ou:()=>l}),r(77690),r(29242),r(58083),r(9093);var i=r(38954),o=r(51850),n=r(97937),a=r(24151),s=r(57005);const c=new class{constructor(e=0){this.offset=e,this.sphere=(0,n.c)(),this.tmpVertex=(0,o.vt)()}applyToVertex(e,t,r){const o=this.objectTransform.transform,n=(0,i.a)(d,e,t,r),a=(0,i.h)(n,n,o),s=this.offset/(0,i.m)(a);(0,i.r)(a,a,a,s);const c=this.objectTransform.inverse;return(0,i.h)(this.tmpVertex,a,c),this.tmpVertex}applyToMinMax(e,t){const r=this.offset/(0,i.m)(e);(0,i.r)(e,e,e,r);const o=this.offset/(0,i.m)(t);(0,i.r)(t,t,t,o)}applyToAabb(e){const t=this.offset/Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]+=e[0]*t,e[1]+=e[1]*t,e[2]+=e[2]*t;const r=this.offset/Math.sqrt(e[3]*e[3]+e[4]*e[4]+e[5]*e[5]);return e[3]+=e[3]*r,e[4]+=e[4]*r,e[5]+=e[5]*r,e}applyToBoundingSphere(e){const t=(0,i.m)((0,n.g)(e)),r=this.offset/t;return(0,i.r)((0,n.g)(this.sphere),(0,n.g)(e),(0,n.g)(e),r),this.sphere[3]=e[3]+e[3]*this.offset/t,this.sphere}};function l(e){return null!=e?(c.offset=e,c):null}new class{constructor(e=0){this.componentLocalOriginLength=0,this._totalOffset=0,this._offset=0,this._tmpVertex=(0,o.vt)(),this._tmpMbs=(0,n.c)(),this._tmpObb=new s.ab,this._resetOffset(e)}_resetOffset(e){this._offset=e,this._totalOffset=e}set offset(e){this._resetOffset(e)}get offset(){return this._offset}set componentOffset(e){this._totalOffset=this._offset+e}set localOrigin(e){this.componentLocalOriginLength=(0,i.m)(e)}applyToVertex(e,t,r){const o=(0,i.a)(d,e,t,r),n=(0,i.a)(u,e,t,r+this.componentLocalOriginLength),a=this._totalOffset/(0,i.m)(n);return(0,i.r)(this._tmpVertex,o,n,a),this._tmpVertex}applyToAabb(e){const t=this.componentLocalOriginLength,r=e[0],i=e[1],o=e[2]+t,n=e[3],a=e[4],s=e[5]+t,c=Math.abs(r),l=Math.abs(i),d=Math.abs(o),u=Math.abs(n),h=Math.abs(a),m=Math.abs(s),f=.5*(1+Math.sign(r*n))*Math.min(c,u),p=.5*(1+Math.sign(i*a))*Math.min(l,h),g=.5*(1+Math.sign(o*s))*Math.min(d,m),v=Math.max(c,u),_=Math.max(l,h),T=Math.max(d,m),x=Math.sqrt(f*f+p*p+g*g),A=Math.sign(c+r),E=Math.sign(l+i),b=Math.sign(d+o),S=Math.sign(u+n),M=Math.sign(h+a),R=Math.sign(m+s),C=this._totalOffset;if(x<C)return e[0]-=(1-A)*C,e[1]-=(1-E)*C,e[2]-=(1-b)*C,e[3]+=S*C,e[4]+=M*C,e[5]+=R*C,e;const I=C/Math.sqrt(v*v+_*_+T*T),w=C/x,O=w-I,N=-O;return e[0]+=r*(A*N+w),e[1]+=i*(E*N+w),e[2]+=o*(b*N+w),e[3]+=n*(S*O+I),e[4]+=a*(M*O+I),e[5]+=s*(R*O+I),e}applyToMbs(e){const t=(0,i.m)((0,n.g)(e)),r=this._totalOffset/t;return(0,i.r)((0,n.g)(this._tmpMbs),(0,n.g)(e),(0,n.g)(e),r),this._tmpMbs[3]=e[3]+e[3]*this._totalOffset/t,this._tmpMbs}applyToObb(e){return(0,s.gm)(e,this._totalOffset,this._totalOffset,a.RT.Global,this._tmpObb),this._tmpObb}},new class{constructor(e=0){this.offset=e,this.tmpVertex=(0,o.vt)()}applyToVertex(e,t,r){const o=(0,i.a)(d,e,t,r),n=(0,i.g)(u,o,this.localOrigin),a=this.offset/(0,i.m)(n);return(0,i.r)(this.tmpVertex,o,n,a),this.tmpVertex}applyToAabb(e){const t=h,r=m,i=f;for(let o=0;o<3;++o)t[o]=e[0+o]+this.localOrigin[o],r[o]=e[3+o]+this.localOrigin[o],i[o]=t[o];const o=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=o[t],e[t+3]=o[t];const n=t=>{const r=this.applyToVertex(t[0],t[1],t[2]);for(let t=0;t<3;++t)e[t]=Math.min(e[t],r[t]),e[t+3]=Math.max(e[t+3],r[t])};for(let e=1;e<8;++e){for(let o=0;o<3;++o)i[o]=e&1<<o?r[o]:t[o];n(i)}let a=0;for(let e=0;e<3;++e)t[e]*r[e]<0&&(a|=1<<e);if(0!==a&&7!==a)for(let e=0;e<8;++e)if(!(a&e)){for(let o=0;o<3;++o)i[o]=a&1<<o?0:e&1<<o?t[o]:r[o];n(i)}for(let t=0;t<3;++t)e[t]-=this.localOrigin[t],e[t+3]-=this.localOrigin[t];return e}};const d=(0,o.vt)(),u=(0,o.vt)(),h=(0,o.vt)(),m=(0,o.vt)(),f=(0,o.vt)()},11787:(e,t,r)=>{r.d(t,{$U:()=>K});var i=r(38954),o=r(51850),n=r(24151),a=r(1843),s=r(49255),c=r(96336),l=r(22911),d=r(62602),u=r(59469),h=r(35093),m=r(16943),f=r(89192),p=r(25634),g=r(14903),v=r(33524),_=r(70328),T=r(96672),x=r(620),A=r(46540);class E{constructor(e=!1,t=!0){this.isVerticalRay=e,this.normalRequired=t}}const b=(0,_.vt)(),S=(0,o.vt)();function M(e,t,r,o,n,a,s){if(null==e)return;const c=function(e,t){return(0,i.a)(t,1/e[0],1/e[1],1/e[2])}(r,S);if((0,_.Ne)(b,e.bbMin),(0,_.vI)(b,e.bbMax),null!=n&&n.applyToAabb(b),function(e,t,r,i){return function(e,t,r,i){const o=(e[0]-i-t[0])*r[0],n=(e[3]+i-t[0])*r[0];let a=Math.min(o,n),s=Math.max(o,n);const c=(e[1]-i-t[1])*r[1],l=(e[4]+i-t[1])*r[1];if(s=Math.min(s,Math.max(c,l)),s<0)return!1;if(a=Math.max(a,Math.min(c,l)),a>s)return!1;const d=(e[2]-i-t[2])*r[2],u=(e[5]+i-t[2])*r[2];return s=Math.min(s,Math.max(d,u)),!(s<0)&&(a=Math.max(a,Math.min(d,u)),!(a>s)&&a<1/0)}(e,t,r,i)}(b,t,c,o)){const{primitiveIndices:i,position:c}=e,l=i?i.length:c.indices.length/3;if(l>L){const i=e.getChildren();if(void 0!==i){for(const e of i)M(e,t,r,o,n,a,s);return}}!function(e,t,r,i,o,n,a,s,c,l,d){const u=e[0],h=e[1],m=e[2],f=t[0],p=t[1],g=t[2],{normalRequired:v}=l;for(let e=0;e<i;++e){const t=s[e],r=3*t,i=a*o[r];let l=n[i],_=n[i+1],T=n[i+2];const x=a*o[r+1];let A=n[x],E=n[x+1],b=n[x+2];const S=a*o[r+2];let M=n[S],C=n[S+1],I=n[S+2];null!=c&&([l,_,T]=c.applyToVertex(l,_,T,e),[A,E,b]=c.applyToVertex(A,E,b,e),[M,C,I]=c.applyToVertex(M,C,I,e));const w=A-l,N=E-_,y=b-T,P=M-l,L=C-_,D=I-T,F=p*D-L*g,G=g*P-D*f,B=f*L-P*p,U=w*F+N*G+y*B;if(Math.abs(U)<=H)continue;const z=u-l,V=h-_,W=m-T,j=z*F+V*G+W*B;if(U>0){if(j<0||j>U)continue}else if(j>0||j<U)continue;const k=V*y-N*W,q=W*w-y*z,Y=z*N-w*V,X=f*k+p*q+g*Y;if(U>0){if(X<0||j+X>U)continue}else if(X>0||j+X<U)continue;const $=(P*k+L*q+D*Y)/U;$>=0&&d($,t,v?O(w,N,y,P,L,D,R):null)}}(t,r,0,l,c.indices,c.data,c.stride,i,n,a,s)}}const R=(0,o.vt)();const C=(0,o.vt)(),I=(0,o.vt)(),w=(0,o.vt)();function O(e,t,r,o,n,a,s){return(0,i.a)(y,e,t,r),(0,i.a)(P,o,n,a),(0,i.b)(s,y,P),(0,i.n)(s,s),s}function N(e){return(0,i.z)(y,e[1],e[0]),(0,i.z)(P,e[2],e[0]),(0,i.b)(R,y,P),(0,i.n)(R,R),R}const y=(0,o.vt)(),P=(0,o.vt)(),L=1e3,H=1e-7,D=(0,o.vt)(),F=[(0,o.vt)(),(0,o.vt)(),(0,o.vt)()];var G=r(13464),B=r(16396),U=r(59907);class z{constructor(e){this.vertexBufferLayout=e}elementCount(e){return e.get(A.r.POSITION).indices.length}write(e,t,r,i,o,n){(0,U.SA)(r,i,this.vertexBufferLayout,e,t,o,n)}}var V=r(43616),W=r(97225),j=r(90237),k=r(53466),q=r(51976),Y=r(35256);class X extends Y.E{constructor(e,t){super(),this.spherical=e,this.doublePrecisionRequiresObfuscation=t,this.alphaDiscardMode=f.sf.Opaque,this.doubleSidedMode=d.W.None,this.pbrMode=u.A9.Disabled,this.cullFace=f.s2.None,this.normalType=c.W.Attribute,this.customDepthTest=f.it.Less,this.emissionSource=l.ZX.None,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.multipassEnabled=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.vvSize=!1,this.vvColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instanced=!1,this.instancedColor=!1,this.instancedDoublePrecision=!1,this.writeDepth=!0,this.transparent=!1,this.enableOffset=!0,this.cullAboveGround=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.occlusionPass=!1,this.hasVvInstancing=!0,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0}get textureCoordinateType(){return this.hasColorTexture||this.hasMetallicRoughnessTexture||this.emissionSource===l.ZX.Texture||this.hasOcclusionTexture||this.hasNormalTexture?k.I.Default:k.I.None}get objectAndLayerIdColorInstanced(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}(0,j._)([(0,q.W)({count:f.sf.COUNT})],X.prototype,"alphaDiscardMode",void 0),(0,j._)([(0,q.W)({count:d.W.COUNT})],X.prototype,"doubleSidedMode",void 0),(0,j._)([(0,q.W)({count:u.A9.COUNT})],X.prototype,"pbrMode",void 0),(0,j._)([(0,q.W)({count:f.s2.COUNT})],X.prototype,"cullFace",void 0),(0,j._)([(0,q.W)({count:c.W.COUNT})],X.prototype,"normalType",void 0),(0,j._)([(0,q.W)({count:f.it.COUNT})],X.prototype,"customDepthTest",void 0),(0,j._)([(0,q.W)({count:l.ZX.COUNT})],X.prototype,"emissionSource",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasVertexColors",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasSymbolColors",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasVerticalOffset",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasSlicePlane",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasSliceHighlight",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasColorTexture",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasMetallicRoughnessTexture",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasOcclusionTexture",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasNormalTexture",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasScreenSizePerspective",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasVertexTangents",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasOccludees",void 0),(0,j._)([(0,q.W)()],X.prototype,"multipassEnabled",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasModelTransformation",void 0),(0,j._)([(0,q.W)()],X.prototype,"offsetBackfaces",void 0),(0,j._)([(0,q.W)()],X.prototype,"vvSize",void 0),(0,j._)([(0,q.W)()],X.prototype,"vvColor",void 0),(0,j._)([(0,q.W)()],X.prototype,"receiveShadows",void 0),(0,j._)([(0,q.W)()],X.prototype,"receiveAmbientOcclusion",void 0),(0,j._)([(0,q.W)()],X.prototype,"textureAlphaPremultiplied",void 0),(0,j._)([(0,q.W)()],X.prototype,"instanced",void 0),(0,j._)([(0,q.W)()],X.prototype,"instancedColor",void 0),(0,j._)([(0,q.W)()],X.prototype,"instancedDoublePrecision",void 0),(0,j._)([(0,q.W)()],X.prototype,"writeDepth",void 0),(0,j._)([(0,q.W)()],X.prototype,"transparent",void 0),(0,j._)([(0,q.W)()],X.prototype,"enableOffset",void 0),(0,j._)([(0,q.W)()],X.prototype,"cullAboveGround",void 0),(0,j._)([(0,q.W)()],X.prototype,"snowCover",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasColorTextureTransform",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasEmissionTextureTransform",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasNormalTextureTransform",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasOcclusionTextureTransform",void 0),(0,j._)([(0,q.W)()],X.prototype,"hasMetallicRoughnessTextureTransform",void 0);var $=r(97220),Z=r(57323);class J extends W.R5{initializeProgram(e,t){return this._initializeProgram(e,t,J.shader)}}J.shader=new $.$(Z.R,(()=>r.e(9933).then(r.bind(r,39933))));class K extends g.im{constructor(e,t){super(e,ee),this.materialType="default",this.supportsEdges=!0,this.produces=new Map([[G.N.OPAQUE_MATERIAL,e=>((0,s.iq)(e)||(0,s.PJ)(e))&&!this.parameters.transparent],[G.N.TRANSPARENT_MATERIAL,e=>((0,s.iq)(e)||(0,s.PJ)(e))&&this.parameters.transparent&&this.parameters.writeDepth],[G.N.TRANSPARENT_MATERIAL_WITHOUT_DEPTH,e=>((0,s.XY)(e)||(0,s.PJ)(e))&&this.parameters.transparent&&!this.parameters.writeDepth]]),this._vertexBufferLayout=function(e){const t=(0,a.BP)().vec3f(A.r.POSITION);return e.normalType===c.W.Compressed?t.vec2i16(A.r.NORMALCOMPRESSED,{glNormalized:!0}):t.vec3f(A.r.NORMAL),e.hasVertexTangents&&t.vec4f(A.r.TANGENT),(e.textureId||e.normalTextureId||e.metallicRoughnessTextureId||e.emissiveTextureId||e.occlusionTextureId)&&t.vec2f(A.r.UV0),e.hasVertexColors&&t.vec4u8(A.r.COLOR),e.hasSymbolColors&&t.vec4u8(A.r.SYMBOLCOLOR),(0,m.E)()&&t.vec4u8(A.r.OBJECTANDLAYERIDCOLOR),t}(this.parameters),this._configuration=new X(t.spherical,t.doublePrecisionRequiresObfuscation)}isVisibleForOutput(e){return e!==s.V.Shadow&&e!==s.V.ShadowExcludeHighlight&&e!==s.V.ShadowHighlight||this.parameters.castShadows}get visible(){const e=this.parameters;if(e.layerOpacity<h.Q)return!1;const{hasInstancedColor:t,hasVertexColors:r,hasSymbolColors:i,vvColor:o}=e,n=t||o||i,a="replace"===e.colorMixMode,s=e.opacity>=h.Q;if(r&&n)return a||s;const c=e.externalColor&&e.externalColor[3]>=h.Q;return r?a?c:s:n?a||s:a?c:s}get hasEmissions(){return!!this.parameters.emissiveTextureId||!(0,i.e)(this.parameters.emissiveFactor,o.uY)}getConfiguration(e,t){const r=this.parameters,{treeRendering:i,doubleSided:o,doubleSidedType:n}=r;return this._configuration.output=e,this._configuration.hasNormalTexture=!i&&!!r.normalTextureId,this._configuration.hasColorTexture=!!r.textureId,this._configuration.hasVertexTangents=!i&&r.hasVertexTangents,this._configuration.instanced=r.isInstanced,this._configuration.instancedDoublePrecision=r.instancedDoublePrecision,this._configuration.vvSize=!!r.vvSize,this._configuration.hasVerticalOffset=null!=r.verticalOffset,this._configuration.hasScreenSizePerspective=null!=r.screenSizePerspective,this._configuration.hasSlicePlane=r.hasSlicePlane,this._configuration.hasSliceHighlight=r.hasSliceHighlight,this._configuration.alphaDiscardMode=r.textureAlphaMode,this._configuration.normalType=i?c.W.Attribute:r.normalType,this._configuration.transparent=r.transparent,this._configuration.writeDepth=r.writeDepth,null!=r.customDepthTest&&(this._configuration.customDepthTest=r.customDepthTest),this._configuration.hasOccludees=r.hasOccludees,this._configuration.cullFace=r.hasSlicePlane?f.s2.None:r.cullFace,this._configuration.multipassEnabled=t.multipassEnabled,this._configuration.cullAboveGround=t.multipassTerrain.cullAboveGround,this._configuration.hasModelTransformation=!i&&null!=r.modelTransformation,this._configuration.hasVertexColors=r.hasVertexColors,this._configuration.hasSymbolColors=r.hasSymbolColors,this._configuration.doubleSidedMode=i?d.W.WindingOrder:o&&"normal"===n?d.W.View:o&&"winding-order"===n?d.W.WindingOrder:d.W.None,this._configuration.instancedColor=r.hasInstancedColor,this._configuration.receiveShadows=r.receiveShadows&&r.shadowMappingEnabled,this._configuration.receiveAmbientOcclusion=r.receiveAmbientOcclusion&&null!=t.ssao,this._configuration.vvColor=!!r.vvColor,this._configuration.textureAlphaPremultiplied=!!r.textureAlphaPremultiplied,this._configuration.pbrMode=r.usePBR?r.isSchematic?u.A9.Schematic:u.A9.Normal:u.A9.Disabled,this._configuration.hasMetallicRoughnessTexture=!i&&!!r.metallicRoughnessTextureId,this._configuration.emissionSource=i?l.ZX.None:null!=r.emissiveTextureId?l.ZX.Texture:r.usePBR?l.ZX.Value:l.ZX.None,this._configuration.hasOcclusionTexture=!i&&!!r.occlusionTextureId,this._configuration.offsetBackfaces=!(!r.transparent||!r.offsetTransparentBackfaces),this._configuration.oitPass=t.oitPass,this._configuration.enableOffset=t.camera.relativeElevation<v.xt,this._configuration.snowCover=function(e){return null!=e.weather&&e.weatherVisible&&"snowy"===e.weather.type&&"enabled"===e.weather.snowCover}(t),this._configuration.hasColorTextureTransform=!!r.colorTextureTransformMatrix,this._configuration.hasNormalTextureTransform=!!r.normalTextureTransformMatrix,this._configuration.hasEmissionTextureTransform=!!r.emissiveTextureTransformMatrix,this._configuration.hasOcclusionTextureTransform=!!r.occlusionTextureTransformMatrix,this._configuration.hasMetallicRoughnessTextureTransform=!!r.metallicRoughnessTextureTransformMatrix,this._configuration}intersect(e,t,r,o,a,s){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,i.a)(ae,t[12],t[13],t[14]);let s=null;switch(r.viewingMode){case n.RT.Global:s=(0,i.n)(oe,ae);break;case n.RT.Local:s=(0,i.c)(oe,ie)}let c=0;const l=(0,i.f)(se,ae,e.eye),d=(0,i.m)(l),u=(0,i.j)(l,l,1/d);let h=null;this.parameters.screenSizePerspective&&(h=(0,i.l)(s,u)),c+=(0,V.kE)(e,d,this.parameters.verticalOffset,h??0,this.parameters.screenSizePerspective),(0,i.j)(s,s,c),(0,i.t)(ne,s,r.transform.inverseRotation),o=(0,i.f)(te,o,ne),a=(0,i.f)(re,a,ne)}!function(e,t,r,o,n,a){if(!e.visible)return;const s=(0,i.z)(D,o,r),c=(e,t,r)=>{a(e,r,t,!1)},l=new E(!1,t.options.normalRequired);if(e.boundingInfo){(0,x.vA)(e.type===T.X.Mesh);const i=t.tolerance;M(e.boundingInfo,r,s,i,n,l,c)}else{const t=e.attributes.get(A.r.POSITION),o=t.indices;!function(e,t,r,o,n,a,s,c,l,d){const u=t,h=F,m=Math.abs(u[0]),f=Math.abs(u[1]),p=Math.abs(u[2]),g=m>=f?m>=p?0:2:f>=p?1:2,v=g,_=u[v]<0?2:1,T=(g+_)%3,x=(g+(3-_))%3,A=u[T]/u[v],E=u[x]/u[v],b=1/u[v],S=C,M=I,R=w,{normalRequired:O}=l;for(let t=r;t<o;++t){const r=3*t,o=s*n[r];(0,i.a)(h[0],a[o+0],a[o+1],a[o+2]);const l=s*n[r+1];(0,i.a)(h[1],a[l+0],a[l+1],a[l+2]);const u=s*n[r+2];(0,i.a)(h[2],a[u+0],a[u+1],a[u+2]),c&&((0,i.c)(h[0],c.applyToVertex(h[0][0],h[0][1],h[0][2],t)),(0,i.c)(h[1],c.applyToVertex(h[1][0],h[1][1],h[1][2],t)),(0,i.c)(h[2],c.applyToVertex(h[2][0],h[2][1],h[2][2],t))),(0,i.z)(S,h[0],e),(0,i.z)(M,h[1],e),(0,i.z)(R,h[2],e);const m=S[T]-A*S[v],f=S[x]-E*S[v],p=M[T]-A*M[v],g=M[x]-E*M[v],_=R[T]-A*R[v],C=R[x]-E*R[v],I=_*g-C*p,w=m*C-f*_,y=p*f-g*m;if((I<0||w<0||y<0)&&(I>0||w>0||y>0))continue;const P=I+w+y;if(0===P)continue;const L=I*(b*S[v])+w*(b*M[v])+y*(b*R[v]);if(L*Math.sign(P)<0)continue;const H=L/P;H>=0&&d(H,t,O?N(h):null)}}(r,s,0,o.length/3,o,t.data,t.stride,n,l,c)}}(e,r,o,a,(0,B.ou)(r.verticalOffset),s)}createGLMaterial(e){return new Q(e)}createBufferWriter(){return new z(this._vertexBufferLayout)}}class Q extends p.m8{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({shadowMappingEnabled:e.shadowMap.enabled,hasOccludees:e.hasOccludees});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,i.a)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.acquireTechnique(t.treeRendering?J:W.R5,e)}}class ee extends W.uD{constructor(){super(...arguments),this.initTextureTransparent=!1,this.treeRendering=!1,this.hasVertexTangents=!1}}const te=(0,o.vt)(),re=(0,o.vt)(),ie=(0,o.fA)(0,0,1),oe=(0,o.vt)(),ne=(0,o.vt)(),ae=(0,o.vt)(),se=(0,o.vt)()},35256:(e,t,r)=>{r.d(t,{E:()=>l});var i=r(90237),o=r(49255),n=r(51976);class a extends n.K{constructor(){super(...arguments),this.instancedDoublePrecision=!1,this.hasModelTransformation=!1}}(0,i._)([(0,n.W)()],a.prototype,"instancedDoublePrecision",void 0),(0,i._)([(0,n.W)()],a.prototype,"hasModelTransformation",void 0);var s=r(46263),c=r(59643);class l extends a{constructor(){super(...arguments),this.output=o.V.Color,this.oitPass=c.Y.NONE,this.hasSliceHighlight=!0,this.hasSliceInVertexProgram=!1,this.bindType=s.c.Pass,this.writeDepth=!0}}(0,i._)([(0,n.W)({count:o.V.COUNT})],l.prototype,"output",void 0),(0,i._)([(0,n.W)({count:c.Y.COUNT})],l.prototype,"oitPass",void 0)},43616:(e,t,r)=>{r.d(t,{MB:()=>s,Um:()=>c,kE:()=>a});var i=r(4576),o=r(34727),n=r(77194);function a(e,t,r,i,a){let s=(r.screenLength||0)*e.pixelRatio;null!=a&&(s=(0,n.hs)(s,i,t,a));const c=s*Math.tan(.5*e.fovY)/(.5*e.fullHeight);return(0,o.qE)(c*t,r.minWorldLength||0,null!=r.maxWorldLength?r.maxWorldLength:1/0)}function s(e,t){let r=!1;for(const o in t){const n=t[o];void 0!==n&&(Array.isArray(n)?Array.isArray(e[o])&&(0,i.aI)(n,e[o])||(e[o]=n.slice(),r=!0):e[o]!==n&&(r=!0,e[o]=n))}return r}const c={multiply:1,ignore:2,replace:3,tint:4}},59907:(e,t,r)=>{r.d(t,{Hk:()=>h,Pq:()=>u,SA:()=>g,Ut:()=>d,p1:()=>m,tH:()=>p,tb:()=>f,uO:()=>s});var i=r(58083),o=r(13030),n=r(620),a=r(46540);function s(e,t,r,i=1){const{data:o,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,c=n.length;if(r*=s,1===i)for(let e=0;e<c;++e)a[r]=o[n[e]],r+=s;else for(let e=0;e<c;++e){const t=o[n[e]];for(let e=0;e<i;e++)a[r]=t,r+=s}}function c(e,t,r){const{data:i,indices:o}=e,n=t.typedBuffer,a=t.typedBufferStride,s=o.length;r*=a;for(let e=0;e<s;++e){const t=2*o[e];n[r]=i[t],n[r+1]=i[t+1],r+=a}}function l(e,t,r,i){const{data:o,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,c=n.length;if(r*=s,null==i||1===i)for(let e=0;e<c;++e){const t=3*n[e];a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],r+=s}else for(let e=0;e<c;++e){const t=3*n[e];for(let e=0;e<i;++e)a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],r+=s}}function d(e,t,r,i=1){const{data:o,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,c=n.length;if(r*=s,1===i)for(let e=0;e<c;++e){const t=4*n[e];a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],a[r+3]=o[t+3],r+=s}else for(let e=0;e<c;++e){const t=4*n[e];for(let e=0;e<i;++e)a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],a[r+3]=o[t+3],r+=s}}function u(e,t,r){const i=e.typedBuffer,o=e.typedBufferStride;t*=o;for(let e=0;e<r;++e)i[t]=0,i[t+1]=0,i[t+2]=0,i[t+3]=0,t+=o}function h(e,t,r,o,n=1){if(!t)return void l(e,r,o,n);const{data:a,indices:s}=e,c=r.typedBuffer,d=r.typedBufferStride,u=s.length,h=t[0],m=t[1],f=t[2],p=t[4],g=t[5],v=t[6],_=t[8],T=t[9],x=t[10],A=t[12],E=t[13],b=t[14];o*=d;let S=0,M=0,R=0;const C=(0,i.tZ)(t)?e=>{S=a[e]+A,M=a[e+1]+E,R=a[e+2]+b}:e=>{const t=a[e],r=a[e+1],i=a[e+2];S=h*t+p*r+_*i+A,M=m*t+g*r+T*i+E,R=f*t+v*r+x*i+b};if(1===n)for(let e=0;e<u;++e)C(3*s[e]),c[o]=S,c[o+1]=M,c[o+2]=R,o+=d;else for(let e=0;e<u;++e){C(3*s[e]);for(let e=0;e<n;++e)c[o]=S,c[o+1]=M,c[o+2]=R,o+=d}}function m(e,t,r,o,n=1){if(!t)return void l(e,r,o,n);const{data:a,indices:s}=e,c=t,d=r.typedBuffer,u=r.typedBufferStride,h=s.length,m=c[0],f=c[1],p=c[2],g=c[4],v=c[5],_=c[6],T=c[8],x=c[9],A=c[10],E=!(0,i.ut)(c),b=1e-6,S=1-b;o*=u;let M=0,R=0,C=0;const I=(0,i.tZ)(c)?e=>{M=a[e],R=a[e+1],C=a[e+2]}:e=>{const t=a[e],r=a[e+1],i=a[e+2];M=m*t+g*r+T*i,R=f*t+v*r+x*i,C=p*t+_*r+A*i};if(1===n)if(E)for(let e=0;e<h;++e){I(3*s[e]);const t=M*M+R*R+C*C;if(t<S&&t>b){const e=1/Math.sqrt(t);d[o]=M*e,d[o+1]=R*e,d[o+2]=C*e}else d[o]=M,d[o+1]=R,d[o+2]=C;o+=u}else for(let e=0;e<h;++e)I(3*s[e]),d[o]=M,d[o+1]=R,d[o+2]=C,o+=u;else for(let e=0;e<h;++e){if(I(3*s[e]),E){const e=M*M+R*R+C*C;if(e<S&&e>b){const t=1/Math.sqrt(e);M*=t,R*=t,C*=t}}for(let e=0;e<n;++e)d[o]=M,d[o+1]=R,d[o+2]=C,o+=u}}function f(e,t,r,i,o=1){const{data:n,indices:a}=e,s=r.typedBuffer,c=r.typedBufferStride,l=a.length;if(i*=c,t!==n.length||4!==t)if(1!==o)if(4!==t)for(let e=0;e<l;++e){const t=3*a[e];for(let e=0;e<o;++e)s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=255,i+=c}else for(let e=0;e<l;++e){const t=4*a[e];for(let e=0;e<o;++e)s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=n[t+3],i+=c}else{if(4===t){for(let e=0;e<l;++e){const t=4*a[e];s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=n[t+3],i+=c}return}for(let e=0;e<l;++e){const t=3*a[e];s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=255,i+=c}}else{s[i]=n[0],s[i+1]=n[1],s[i+2]=n[2],s[i+3]=n[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=c/4,a=e[i/=4];i+=t;const d=l*o;for(let r=1;r<d;++r)e[i]=a,i+=t}}function p(e,t,r,i,o=1){const n=t.typedBuffer,a=t.typedBufferStride;if(i*=a,1===o)for(let t=0;t<r;++t)n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2],n[i+3]=e[3],i+=a;else for(let t=0;t<r;++t)for(let t=0;t<o;++t)n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2],n[i+3]=e[3],i+=a}function g(e,t,r,i,n,s,c){for(const l of r.fields.keys()){const r=e.get(l),d=r?.indices;if(r&&d)v(l,r,i,n,s,c);else if(l===a.r.OBJECTANDLAYERIDCOLOR&&null!=t){const r=e.get(a.r.POSITION)?.indices;if(r){const e=r.length;p(t,s.getField(l,o.XP),e,c)}}}}function v(e,t,r,s,l,u){switch(e){case a.r.POSITION:{(0,n.vA)(3===t.size);const i=l.getField(e,o.xs);(0,n.vA)(!!i,`No buffer view for ${e}`),i&&h(t,r,i,u);break}case a.r.NORMAL:{(0,n.vA)(3===t.size);const r=l.getField(e,o.xs);(0,n.vA)(!!r,`No buffer view for ${e}`),r&&m(t,s,r,u);break}case a.r.NORMALCOMPRESSED:{(0,n.vA)(2===t.size);const r=l.getField(e,o.mJ);(0,n.vA)(!!r,`No buffer view for ${e}`),r&&c(t,r,u);break}case a.r.UV0:{(0,n.vA)(2===t.size);const r=l.getField(e,o.gH);(0,n.vA)(!!r,`No buffer view for ${e}`),r&&c(t,r,u);break}case a.r.COLOR:case a.r.SYMBOLCOLOR:{const r=l.getField(e,o.XP);(0,n.vA)(!!r,`No buffer view for ${e}`),(0,n.vA)(3===t.size||4===t.size),!r||3!==t.size&&4!==t.size||f(t,t.size,r,u);break}case a.r.COLORFEATUREATTRIBUTE:{const r=l.getField(e,o.Y$);(0,n.vA)(!!r,`No buffer view for ${e}`),(0,n.vA)(1===t.size),r&&1===t.size&&function(e,t,r){const{data:i,indices:o}=e,n=t.typedBuffer,a=t.typedBufferStride,s=o.length,c=i[0];r*=a;for(let e=0;e<s;++e)n[r]=c,r+=a}(t,r,u);break}case a.r.TANGENT:{(0,n.vA)(4===t.size);const a=l.getField(e,o.Eq);(0,n.vA)(!!a,`No buffer view for ${e}`),a&&function(e,t,r,o,n=1){if(!t)return void d(e,r,o,n);const{data:a,indices:s}=e,c=t,l=r.typedBuffer,u=r.typedBufferStride,h=s.length,m=c[0],f=c[1],p=c[2],g=c[4],v=c[5],_=c[6],T=c[8],x=c[9],A=c[10],E=!(0,i.ut)(c),b=1e-6,S=1-b;if(o*=u,1===n)for(let e=0;e<h;++e){const t=4*s[e],r=a[t],i=a[t+1],n=a[t+2],c=a[t+3];let d=m*r+g*i+T*n,h=f*r+v*i+x*n,M=p*r+_*i+A*n;if(E){const e=d*d+h*h+M*M;if(e<S&&e>b){const t=1/Math.sqrt(e);d*=t,h*=t,M*=t}}l[o]=d,l[o+1]=h,l[o+2]=M,l[o+3]=c,o+=u}else for(let e=0;e<h;++e){const t=4*s[e],r=a[t],i=a[t+1],c=a[t+2],d=a[t+3];let h=m*r+g*i+T*c,M=f*r+v*i+x*c,R=p*r+_*i+A*c;if(E){const e=h*h+M*M+R*R;if(e<S&&e>b){const t=1/Math.sqrt(e);h*=t,M*=t,R*=t}}for(let e=0;e<n;++e)l[o]=h,l[o+1]=M,l[o+2]=R,l[o+3]=d,o+=u}}(t,r,a,u);break}case a.r.PROFILERIGHT:case a.r.PROFILEUP:case a.r.PROFILEVERTEXANDNORMAL:case a.r.FEATUREVALUE:{(0,n.vA)(4===t.size);const r=l.getField(e,o.Eq);(0,n.vA)(!!r,`No buffer view for ${e}`),r&&d(t,r,u)}}}},74810:(e,t,r)=>{r.d(t,{Bt:()=>s,Jr:()=>n,SY:()=>c,mb:()=>a});var i=r(38954),o=r(51850);function n({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:n,emissiveTexture:a,emissiveFactor:s,occlusionTexture:c}){return null==e&&null==t&&null==a&&(null==s||(0,i.e)(s,o.uY))&&null==c&&(null==n||1===n)&&(null==r||1===r)}const a=(0,o.CN)(1,1,.5),s=(0,o.CN)(0,.6,.2),c=(0,o.CN)(0,1,.2)},97225:(e,t,r)=>{r.d(t,{V:()=>M,uD:()=>S,R5:()=>R});var i=r(51850),o=r(91829),n=r(49255),a=r(96336),s=r(72824),c=r(35093),l=r(97220),d=r(84867),u=r(89192),h=r(39341),m=r(14903),f=r(59643),p=r(33524),g=r(34886),v=r(63907);v.MT.LESS,v.MT.ALWAYS;const _={mask:255},T={function:{func:v.MT.ALWAYS,ref:u.dd.OutlineVisualElementMask,mask:u.dd.OutlineVisualElementMask},operation:{fail:v.eA.KEEP,zFail:v.eA.KEEP,zPass:v.eA.ZERO}},x={function:{func:v.MT.ALWAYS,ref:u.dd.OutlineVisualElementMask,mask:u.dd.OutlineVisualElementMask},operation:{fail:v.eA.KEEP,zFail:v.eA.KEEP,zPass:v.eA.REPLACE}};v.MT.EQUAL,u.dd.OutlineVisualElementMask,u.dd.OutlineVisualElementMask,v.eA.KEEP,v.eA.KEEP,v.eA.KEEP,v.MT.NOTEQUAL,u.dd.OutlineVisualElementMask,u.dd.OutlineVisualElementMask,v.eA.KEEP,v.eA.KEEP,v.eA.KEEP;var A=r(74810),E=r(28491),b=r(90644);class S extends s.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=A.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=u.s2.Back,this.isInstanced=!1,this.hasInstancedColor=!1,this.emissiveFactor=i.uY,this.instancedDoublePrecision=!1,this.normalType=a.W.Attribute,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.shadowMappingEnabled=!1,this.ambient=(0,i.CN)(.2,.2,.2),this.diffuse=(0,i.CN)(.8,.8,.8),this.externalColor=(0,o.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,i.vt)(),this.hasSlicePlane=!1,this.hasSliceHighlight=!0,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.vvSymbolAnchor=null,this.vvSymbolRotationMatrix=null,this.modelTransformation=null,this.transparent=!1,this.writeDepth=!0,this.customDepthTest=u.it.Less,this.textureAlphaMode=u.sf.Blend,this.textureAlphaCutoff=c.Q,this.textureAlphaPremultiplied=!1,this.hasOccludees=!1,this.renderOccluded=m.m$.Occlude,this.isDecoration=!1}}class M extends s.gy{constructor(){super(...arguments),this.origin=(0,i.vt)(),this.slicePlaneLocalOrigin=this.origin}}class R extends d.w{initializeProgram(e,t){return this._initializeProgram(e,t,R.shader)}_initializeProgram(e,t,r){return new g.B(e.rctx,r.get().build(t),h.D)}_makePipeline(e,t){const{oitPass:r,output:i,transparent:o,cullFace:a,customDepthTest:s,hasOccludees:c,enableOffset:l}=e,d=r===f.Y.NONE,u=r===f.Y.FrontFace;return(0,b.Ey)({blending:(0,n.RN)(i)&&o?(0,p.Yf)(r):null,culling:I(e)?(0,b.Xt)(a):null,depthTest:{func:(0,p.K_)(r,C(s))},depthWrite:(0,p.z5)(e),drawBuffers:i===n.V.Depth?{buffers:[v.Hr.NONE]}:(0,p.m6)(r,i),colorWrite:b.kn,stencilWrite:c?_:null,stencilTest:c?t?x:T:null,polygonOffset:d||u?null:(0,p.aB)(l)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e){return e?this._occludeePipelineState:super.getPipeline()}}function C(e){return e===u.it.Lequal?v.MT.LEQUAL:v.MT.LESS}function I(e){return e.cullFace!==u.s2.None||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}R.shader=new l.$(E.D,(()=>r.e(5141).then(r.bind(r,5141))))},60517:(e,t,r)=>{r.d(t,{z:()=>d});var i=r(49255),o=r(22911),n=r(45935),a=r(35093),s=r(63365),c=r(2597),l=r(59643);function d(e,t){e.include(n.Q,t),e.include(o.NL,t),e.fragment.include(s.a);const r=t.output===i.V.ObjectAndLayerIdColor,d=(0,i.LG)(t.output),u=(0,i.RN)(t.output)&&t.oitPass===l.Y.ColorAlpha,h=(0,i.RN)(t.output)&&t.oitPass!==l.Y.ColorAlpha,m=t.discardInvisibleFragments;let f=0;(h||d||u)&&e.outputs.add("fragColor","vec4",f++),d&&e.outputs.add("fragEmission","vec4",f++),u&&e.outputs.add("fragAlpha","float",f++),e.fragment.code.add(c.H`
|
|
963
963
|
void outputColorHighlightOID(vec4 finalColor, const in vec3 vWorldPosition) {
|
|
964
964
|
${(0,c.If)(r,c.H`finalColor.a = 1.0;`)}
|
|
965
965
|
|