@arcgis/core 4.31.0-next.20240819 → 4.31.0-next.20240821
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{d2fa4d2887692a1ec9b1.js → 0553357f4cdf4deb13d0.js} +1 -1
- package/assets/esri/core/workers/chunks/{b21db356f243d097ab3e.js → 122f3f294b8f95619f27.js} +1 -1
- package/assets/esri/core/workers/chunks/{dc03a639c97a6f99dbc9.js → 1ac47b7a77818c372e1a.js} +1 -1
- package/assets/esri/core/workers/chunks/{23a6700a3278d2cfcd75.js → 203cf58345df86caf4ca.js} +1 -1
- package/assets/esri/core/workers/chunks/{a2c40517266fe420017c.js → 25fa59544c13db8cee30.js} +1 -1
- package/assets/esri/core/workers/chunks/29545cd255b763d393d0.js +1 -0
- package/assets/esri/core/workers/chunks/3f75b7ed24b440b4508a.js +1 -0
- package/assets/esri/core/workers/chunks/40e4224f700206c67053.js +1 -0
- package/assets/esri/core/workers/chunks/48ab5ce08a97e5dac709.js +1 -0
- package/assets/esri/core/workers/chunks/{56bb7b589a0c040263ff.js → 4f1d44ce2f68e2ec2b60.js} +1 -1
- package/assets/esri/core/workers/chunks/5429c2e1d2f159f332f9.js +1 -0
- package/assets/esri/core/workers/chunks/{d8f416440963b77595e3.js → 58c476c8f6c274d77c0c.js} +1 -1
- package/assets/esri/core/workers/chunks/5c4173205f885cd21422.js +1 -0
- package/assets/esri/core/workers/chunks/5cb07fa227b7fd06499f.js +1 -0
- package/assets/esri/core/workers/chunks/6f7c2d02fbd29870f6ee.js +1 -0
- package/assets/esri/core/workers/chunks/75ac4dfa3c8feeb82de2.js +1 -0
- package/assets/esri/core/workers/chunks/7fda3d3b211b6da5b0e5.js +1 -0
- package/assets/esri/core/workers/chunks/{1e7ce327435e0f4a4bec.js → 8224351edd777843180d.js} +1 -1
- package/assets/esri/core/workers/chunks/949cbb667531527e6918.js +1 -0
- package/assets/esri/core/workers/chunks/{6e966c885e2ac9dff46b.js → 991295637f51e8207efe.js} +1 -1
- package/assets/esri/core/workers/chunks/{252ff37bf5e12dae0b18.js → 9acc02df376d5bdfac87.js} +1 -1
- package/assets/esri/core/workers/chunks/9bbf7129579fe04ab268.js +1 -0
- package/assets/esri/core/workers/chunks/{492137ecf03ad2b2c2e3.js → a0fdb0fa96680ac758c0.js} +1 -1
- package/assets/esri/core/workers/chunks/{3ab02b7660e751cffe1c.js → a4b0e6084971989c526b.js} +1 -1
- package/assets/esri/core/workers/chunks/a6834f66d8da628c3fb2.js +1 -0
- package/assets/esri/core/workers/chunks/{238936d241e76c4c0343.js → ace8b6351ed35b03499b.js} +1 -1
- package/assets/esri/core/workers/chunks/b08689e5b0d1449877f5.js +1 -0
- package/assets/esri/core/workers/chunks/b686d70586623f7bf9a6.js +1 -0
- package/assets/esri/core/workers/chunks/b6dffcacd8b02384d6e2.js +1 -0
- package/assets/esri/core/workers/chunks/{bf7253f7e5d6d63333c3.js → b765a72c9d4f092855f5.js} +1 -1
- package/assets/esri/core/workers/chunks/b9490d5cc65cce2f2948.js +1 -0
- package/assets/esri/core/workers/chunks/{4706798c58398447d79f.js → bbd5477944da39234c30.js} +1 -1
- package/assets/esri/core/workers/chunks/cd8d595d577b74817623.js +1 -0
- package/assets/esri/core/workers/chunks/{145592dc516b86fbda63.js → cfc93bbd35cc4bfde7c0.js} +1 -1
- package/assets/esri/core/workers/chunks/{48aeb087a1b10a8f4c0b.js → d5d70b3ecc0aca2ac184.js} +1 -1
- package/assets/esri/core/workers/chunks/{a784222a7f9dc40ed67c.js → e2a6f77c05d0818e3f74.js} +1 -1
- package/assets/esri/core/workers/chunks/{1ee365125c9fb9d9cafe.js → e5474bcde5b8fa037b56.js} +11 -11
- package/assets/esri/core/workers/chunks/{f7ab24d3dfc0ba9bf760.js → ea561b2460e634a643fc.js} +1 -1
- package/assets/esri/core/workers/chunks/{cf7be98af841fadacf50.js → fc5129c825bc3c78b112.js} +1 -1
- package/chunks/BloomComposition.glsl.js +45 -0
- package/chunks/Centroid-DZi-eb9F.js +5 -0
- package/chunks/OperatorGeodesicBuffer.js +1 -1
- package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
- package/chunks/OperatorGeodeticDistance.js +5 -0
- package/chunks/OperatorProximity.js +5 -0
- package/chunks/OperatorShapePreservingDensify.js +1 -1
- package/chunks/Polyline.js +1 -1
- package/core/mathUtils.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/operators/gx/operatorAutoComplete.js +5 -0
- package/geometry/operators/gx/operatorClip.js +1 -1
- package/geometry/operators/gx/operatorCut.js +1 -1
- package/geometry/operators/gx/operatorDensify.js +1 -1
- package/geometry/operators/gx/operatorGeodesicBuffer.js +1 -1
- package/geometry/operators/gx/operatorGeodeticDensifyByLength.js +1 -1
- package/geometry/operators/gx/operatorGeodeticDistance.js +5 -0
- package/geometry/operators/gx/operatorIntersection.js +1 -1
- package/geometry/operators/gx/operatorLabelPoint.js +5 -0
- package/geometry/operators/gx/operatorOffset.js +5 -0
- package/geometry/operators/gx/operatorShapePreservingDensify.js +1 -1
- package/geometry/operators/gx/operatorSimplify.js +1 -1
- package/geometry/operators/gx/operatorUnion.js +1 -1
- package/geometry/operators/operatorAutoComplete.js +5 -0
- package/geometry/operators/operatorCentroid.js +5 -0
- package/geometry/operators/operatorContains.js +1 -1
- package/geometry/operators/operatorCrosses.js +1 -1
- package/geometry/operators/operatorCut.js +1 -1
- package/geometry/operators/operatorDensify.js +1 -1
- package/geometry/operators/operatorDifference.js +1 -1
- package/geometry/operators/operatorDisjoint.js +1 -1
- package/geometry/operators/operatorEquals.js +1 -1
- package/geometry/operators/operatorGeodesicBuffer.js +1 -1
- package/geometry/operators/operatorGeodeticDensifyByLength.js +1 -1
- package/geometry/operators/operatorGeodeticDistance.js +5 -0
- package/geometry/operators/operatorIntersection.js +1 -1
- package/geometry/operators/operatorIntersects.js +1 -1
- package/geometry/operators/operatorLabelPoint.js +5 -0
- package/geometry/operators/operatorOffset.js +5 -0
- package/geometry/operators/operatorOverlaps.js +1 -1
- package/geometry/operators/operatorProximity.js +5 -0
- package/geometry/operators/operatorRelate.js +1 -1
- package/geometry/operators/operatorReshape.js +5 -0
- package/geometry/operators/operatorShapePreservingDensify.js +1 -1
- package/geometry/operators/operatorTouches.js +1 -1
- package/geometry/operators/operatorWithin.js +1 -1
- package/geometry/operators/support/converterAPI.js +1 -1
- package/geometry/support/spatialReferenceUtils.js +1 -1
- package/geometry/support/webMercatorUtils.js +1 -1
- package/interfaces.d.ts +34 -6
- package/layers/LinkChartLayer.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/graphics/sources/geojson/geojson.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/knowledgeGraph/SessionMemoryStorage.js +1 -1
- package/layers/knowledgeGraph/layerUtils.js +1 -1
- package/layers/mixins/operationalLayers.js +1 -1
- package/layers/orientedImagery/core/ElevationSourceDefinitions.js +1 -1
- package/layers/orientedImagery/core/utils.js +1 -1
- package/layers/support/layersCreator.js +1 -1
- package/libs/linkchartlayout/LinkChartLayout.js +1 -1
- package/package.json +1 -1
- package/portal/PortalItem.js +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/rest/versionManagement/gdbVersion/differences.js +5 -0
- package/rest/versionManagement/gdbVersion/support/DifferencesParameters.js +5 -0
- package/rest/versionManagement/gdbVersion/support/DifferencesResult.js +5 -0
- package/smartMapping/statistics/support/utils.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/support/utils.js +1 -1
- package/views/2d/engine/webgl/mesh/MultiTileMeshData.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/RenderState.js +1 -1
- package/views/2d/support/highlightGroupUtils.js +1 -1
- package/views/2d/tiling/LODInfo.js +1 -1
- package/views/2d/tiling/TileKey.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +3 -3
- package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +5 -0
- package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +5 -0
- package/views/3d/webgl-engine/effects/bloom/BloomTechnique.js +5 -0
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/assets/esri/core/workers/chunks/0c6411a08d8b40fc7f4c.js +0 -1
- package/assets/esri/core/workers/chunks/22128034bf3b5aa713fc.js +0 -1
- package/assets/esri/core/workers/chunks/2dddb8a989b9c96572fe.js +0 -1
- package/assets/esri/core/workers/chunks/31f931de94414f13bd13.js +0 -1
- package/assets/esri/core/workers/chunks/370dd36904acad113842.js +0 -1
- package/assets/esri/core/workers/chunks/5f93a59c92f464925f9c.js +0 -1
- package/assets/esri/core/workers/chunks/6a04b6c7a5ec2389a768.js +0 -1
- package/assets/esri/core/workers/chunks/6f1853ab502bebefd3c3.js +0 -1
- package/assets/esri/core/workers/chunks/8a37c5b110665c8ff5a7.js +0 -1
- package/assets/esri/core/workers/chunks/945a3cc2191606f3a917.js +0 -1
- package/assets/esri/core/workers/chunks/9661398ce832137461f6.js +0 -1
- package/assets/esri/core/workers/chunks/b09bc516b7a7bf5a44a8.js +0 -1
- package/assets/esri/core/workers/chunks/b370dae404d8ff733a54.js +0 -1
- package/assets/esri/core/workers/chunks/c2ba052733e8ccae82e1.js +0 -1
- package/assets/esri/core/workers/chunks/d7d2552ff3e2d44319c7.js +0 -1
- package/assets/esri/core/workers/chunks/f2c3b68f00f88700e698.js +0 -1
- package/assets/esri/core/workers/chunks/f4d9689194d8d2547bb1.js +0 -1
- package/assets/esri/core/workers/chunks/f91b811fa044a01b6bb3.js +0 -1
- package/chunks/SimpleGeometryCursor.js +0 -5
- package/geometry/operators/support/cursorUtils.js +0 -5
- package/views/2d/layers/features/support/tileUtils.js +0 -5
|
@@ -58,28 +58,28 @@ return mix(color, vec4(HIGHLIGHT_COLOR.rgb, color.a), highlightFactor * HIGHLIGH
|
|
|
58
58
|
}`,s=t.hasSliceHighlight?c.H`
|
|
59
59
|
${n}
|
|
60
60
|
#define highlightSlice(_color_, _pos_) (sliceEnabled() ? applySliceHighlight(_color_, _pos_) : (_color_))
|
|
61
|
-
`:c.H`#define highlightSlice(_color_, _pos_) (_color_)`;t.hasSliceInVertexProgram&&e.vertex.uniforms.add(...r).code.add(i),e.fragment.uniforms.add(...r).code.add(i),e.fragment.code.add(s)}(e,t,new a.W("slicePlaneOrigin",((e,r)=>function(e,t,r){if(null==r.slicePlane)return o.uY;const i=u(e,t,r),n=d(i,r.slicePlane),a=h(e,i,r);return null!=a?(0,s.h)(f,n,a):n}(t,e,r))),new a.W("slicePlaneBasis1",((e,r)=>
|
|
61
|
+
`:c.H`#define highlightSlice(_color_, _pos_) (_color_)`;t.hasSliceInVertexProgram&&e.vertex.uniforms.add(...r).code.add(i),e.fragment.uniforms.add(...r).code.add(i),e.fragment.code.add(s)}(e,t,new a.W("slicePlaneOrigin",((e,r)=>function(e,t,r){if(null==r.slicePlane)return o.uY;const i=u(e,t,r),n=d(i,r.slicePlane),a=h(e,i,r);return null!=a?(0,s.h)(f,n,a):n}(t,e,r))),new a.W("slicePlaneBasis1",((e,r)=>m(t,e,r,r.slicePlane?.basis1))),new a.W("slicePlaneBasis2",((e,r)=>m(t,e,r,r.slicePlane?.basis2))))}function u(e,t,r){return e.instancedDoublePrecision?(0,s.s)(_,r.camera.viewInverseTransposeMatrix[3],r.camera.viewInverseTransposeMatrix[7],r.camera.viewInverseTransposeMatrix[11]):t.slicePlaneLocalOrigin}function d(e,t){return null!=e?(0,s.f)(f,t.origin,e):t.origin}function h(e,t,r){return e.hasSliceTranslatedView?null!=t?(0,i.Tl)(g,r.camera.viewMatrix,t):r.camera.viewMatrix:null}function m(e,t,r,i){if(null==i||null==r.slicePlane)return o.uY;const n=u(e,t,r),a=d(n,r.slicePlane),c=h(e,n,r);return null!=c?((0,s.g)(p,i,a),(0,s.h)(f,a,c),(0,s.h)(p,p,c),(0,s.f)(p,p,f)):i}c.Y;const _=(0,o.vt)(),f=(0,o.vt)(),p=(0,o.vt)(),g=(0,n.vt)()},82991:(e,t,r)=>{r.d(t,{BK:()=>A,nW:()=>T});var i=r(90237),n=r(77690),s=r(29242),o=r(9093),a=r(38954),c=r(51850),l=r(49255),u=r(26425),d=r(20693),h=r(40710),m=r(2597),_=r(35644),f=r(40095),p=r(99769),g=r(46540),v=r(28449);class T extends p.K{constructor(){super(...arguments),this.instancedDoublePrecision=!1,this.hasModelTransformation=!1}}(0,i._)([(0,p.W)()],T.prototype,"instancedDoublePrecision",void 0),(0,i._)([(0,p.W)()],T.prototype,"hasModelTransformation",void 0),m.Y;const E=(0,s.vt)();function A(e,t){const r=t.hasModelTransformation,i=t.instancedDoublePrecision;r&&(e.vertex.uniforms.add(new f.X("model",(e=>e.modelTransformation??o.zK))),e.vertex.uniforms.add(new _.k("normalLocalOriginFromModel",(e=>((0,n.Ge)(E,e.modelTransformation??o.zK),E))))),t.instanced&&i&&(e.attributes.add(g.r.INSTANCEMODELORIGINHI,"vec3"),e.attributes.add(g.r.INSTANCEMODELORIGINLO,"vec3"),e.attributes.add(g.r.INSTANCEMODEL,"mat3"),e.attributes.add(g.r.INSTANCEMODELNORMAL,"mat3"));const s=e.vertex;i&&(s.include(u.u,t),s.uniforms.add(new h.W("viewOriginHi",((e,t)=>(0,v.Zo)((0,a.s)(R,t.camera.viewInverseTransposeMatrix[3],t.camera.viewInverseTransposeMatrix[7],t.camera.viewInverseTransposeMatrix[11]),R))),new h.W("viewOriginLo",((e,t)=>(0,v.jA)((0,a.s)(R,t.camera.viewInverseTransposeMatrix[3],t.camera.viewInverseTransposeMatrix[7],t.camera.viewInverseTransposeMatrix[11]),R))))),s.code.add(m.H`
|
|
62
62
|
vec3 getVertexInLocalOriginSpace() {
|
|
63
63
|
return ${r?i?"(model * vec4(instanceModel * localPosition().xyz, 1.0)).xyz":"(model * localPosition()).xyz":i?"instanceModel * localPosition().xyz":"localPosition().xyz"};
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
vec3 subtractOrigin(vec3 _pos) {
|
|
67
|
-
${i?
|
|
67
|
+
${i?m.H`
|
|
68
68
|
// Negated inputs are intentionally the first two arguments. The other way around the obfuscation in dpAdd() stopped
|
|
69
69
|
// working for macOS 14+ and iOS 17+.
|
|
70
70
|
// Issue: https://devtopia.esri.com/WebGIS/arcgis-js-api/issues/56280
|
|
71
71
|
vec3 originDelta = dpAdd(-instanceModelOriginHi, -instanceModelOriginLo, viewOriginHi, viewOriginLo);
|
|
72
72
|
return _pos - originDelta;`:"return vpos;"}
|
|
73
73
|
}
|
|
74
|
-
`),s.code.add(
|
|
74
|
+
`),s.code.add(m.H`
|
|
75
75
|
vec3 dpNormal(vec4 _normal) {
|
|
76
76
|
return normalize(${r?i?"normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz)":"normalLocalOriginFromModel * _normal.xyz":i?"instanceModelNormal * _normal.xyz":"_normal.xyz"});
|
|
77
77
|
}
|
|
78
|
-
`),t.output===l.V.Normal&&((0,d.S7)(s),s.code.add(
|
|
78
|
+
`),t.output===l.V.Normal&&((0,d.S7)(s),s.code.add(m.H`
|
|
79
79
|
vec3 dpNormalView(vec4 _normal) {
|
|
80
80
|
return normalize((viewNormal * ${r?i?"vec4(normalLocalOriginFromModel * (instanceModelNormal * _normal.xyz), 1.0)":"vec4(normalLocalOriginFromModel * _normal.xyz, 1.0)":i?"vec4(instanceModelNormal * _normal.xyz, 1.0)":"_normal"}).xyz);
|
|
81
81
|
}
|
|
82
|
-
`)),t.hasVertexTangents&&s.code.add(
|
|
82
|
+
`)),t.hasVertexTangents&&s.code.add(m.H`
|
|
83
83
|
vec4 dpTransformVertexTangent(vec4 _tangent) {
|
|
84
84
|
${r?i?"return vec4(normalLocalOriginFromModel * (instanceModelNormal * _tangent.xyz), _tangent.w);":"return vec4(normalLocalOriginFromModel * _tangent.xyz, _tangent.w);":i?"return vec4(instanceModelNormal * _tangent.xyz, _tangent.w);":"return _tangent;"}
|
|
85
85
|
}`)}const R=(0,c.vt)()},36782:(e,t,r)=>{r.d(t,{g:()=>o});var i=r(49255),n=r(2597),s=r(46540);function o(e,t){if(t.output!==i.V.ObjectAndLayerIdColor)return e.vertex.code.add(n.H`void forwardObjectAndLayerIdColor() {}`),void e.fragment.code.add(n.H`void outputObjectAndLayerIdColor() {}`);const r=t.objectAndLayerIdColorInstanced;e.varyings.add("objectAndLayerIdColorVarying","vec4"),e.attributes.add(r?s.r.INSTANCEOBJECTANDLAYERIDCOLOR:s.r.OBJECTANDLAYERIDCOLOR,"vec4"),e.vertex.code.add(n.H`
|
|
@@ -97,14 +97,14 @@ vuv0 = getUV0();
|
|
|
97
97
|
}`);case i.Atlas:return e.attributes.add(a.r.UV0,"vec2"),e.varyings.add("vuv0","vec2"),e.attributes.add(a.r.UVREGION,"vec4"),e.varyings.add("vuvRegion","vec4"),void e.vertex.code.add(o.H`void forwardTextureCoordinates() {
|
|
98
98
|
vuv0 = uv0;
|
|
99
99
|
vuvRegion = uvRegion;
|
|
100
|
-
}`);default:(0,s.Xb)(t.textureCoordinateType);case i.None:return void e.vertex.code.add(o.H`void forwardTextureCoordinates() {}`);case i.COUNT:return}}(n=i||(i={}))[n.None=0]="None",n[n.Default=1]="Default",n[n.Atlas=2]="Atlas",n[n.Compressed=3]="Compressed",n[n.COUNT=4]="COUNT"},72824:(e,t,r)=>{r.d(t,{Mh:()=>d,Zo:()=>h,gy:()=>
|
|
100
|
+
}`);default:(0,s.Xb)(t.textureCoordinateType);case i.None:return void e.vertex.code.add(o.H`void forwardTextureCoordinates() {}`);case i.COUNT:return}}(n=i||(i={}))[n.None=0]="None",n[n.Default=1]="Default",n[n.Atlas=2]="Atlas",n[n.Compressed=3]="Compressed",n[n.COUNT=4]="COUNT"},72824:(e,t,r)=>{r.d(t,{Mh:()=>d,Zo:()=>h,gy:()=>m});var i=r(21818),n=r(29242),s=r(91829),o=r(96336),a=r(33752),c=r(2597),l=r(98353),u=r(35644);function d(e,t){switch(t.normalType){case o.W.Attribute:case o.W.Compressed:e.include(o.Y,t),e.varyings.add("vNormalWorld","vec3"),e.varyings.add("vNormalView","vec3"),e.vertex.uniforms.add(new l.h("transformNormalGlobalFromModel",(e=>e.transformNormalGlobalFromModel)),new u.k("transformNormalViewFromGlobal",(e=>e.transformNormalViewFromGlobal))),e.vertex.code.add(c.H`void forwardNormal() {
|
|
101
101
|
vNormalWorld = transformNormalGlobalFromModel * normalModel();
|
|
102
102
|
vNormalView = transformNormalViewFromGlobal * vNormalWorld;
|
|
103
103
|
}`);break;case o.W.Ground:e.include(a.em,t),e.varyings.add("vNormalWorld","vec3"),e.vertex.code.add(c.H`
|
|
104
104
|
void forwardNormal() {
|
|
105
105
|
vNormalWorld = ${t.spherical?c.H`normalize(vPositionWorldCameraRelative);`:c.H`vec3(0.0, 0.0, 1.0);`}
|
|
106
106
|
}
|
|
107
|
-
`);break;case o.W.ScreenDerivative:e.vertex.code.add(c.H`void forwardNormal() {}`);break;default:(0,i.Xb)(t.normalType);case o.W.COUNT:}}class h extends a.dO{constructor(){super(...arguments),this.transformNormalViewFromGlobal=(0,n.vt)()}}class
|
|
107
|
+
`);break;case o.W.ScreenDerivative:e.vertex.code.add(c.H`void forwardNormal() {}`);break;default:(0,i.Xb)(t.normalType);case o.W.COUNT:}}class h extends a.dO{constructor(){super(...arguments),this.transformNormalViewFromGlobal=(0,n.vt)()}}class m extends a.EM{constructor(){super(...arguments),this.transformNormalGlobalFromModel=(0,n.vt)(),this.toMapSpace=(0,s.vt)()}}},33752:(e,t,r)=>{r.d(t,{EM:()=>p,dO:()=>f,em:()=>_});var i=r(29242),n=r(9093),s=r(51850),o=r(10764),a=r(26425),c=r(40710),l=r(33079),u=r(2597),d=r(98353),h=r(35644),m=r(40095);function _(e,t){e.include(o.I);const r=e.vertex;r.include(a.u,t),e.varyings.add("vPositionWorldCameraRelative","vec3"),e.varyings.add("vPosition_view","vec3"),r.uniforms.add(new l.t("transformWorldFromViewTH",(e=>e.transformWorldFromViewTH)),new l.t("transformWorldFromViewTL",(e=>e.transformWorldFromViewTL)),new h.k("transformViewFromCameraRelativeRS",(e=>e.transformViewFromCameraRelativeRS)),new m.X("transformProjFromView",(e=>e.transformProjFromView)),new d.h("transformWorldFromModelRS",(e=>e.transformWorldFromModelRS)),new c.W("transformWorldFromModelTH",(e=>e.transformWorldFromModelTH)),new c.W("transformWorldFromModelTL",(e=>e.transformWorldFromModelTL))),r.code.add(u.H`vec3 positionWorldCameraRelative() {
|
|
108
108
|
vec3 rotatedModelPosition = transformWorldFromModelRS * positionModel();
|
|
109
109
|
vec3 transform_CameraRelativeFromModel = dpAdd(
|
|
110
110
|
transformWorldFromModelTL,
|
|
@@ -154,10 +154,10 @@ return textureGrad(tex, uvAtlas, dUVdx, dUVdy);
|
|
|
154
154
|
vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) {
|
|
155
155
|
return worldPos + calculateVerticalOffset(worldPos, localOrigin);
|
|
156
156
|
}
|
|
157
|
-
`)):r.code.add(c.H`vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) { return worldPos; }`)}const u=(0,n.vt)();function d(e){e.uniforms.add(new a.E("verticalOffset",((e,t)=>{const{minWorldLength:r,maxWorldLength:n,screenLength:s}=e.verticalOffset,o=Math.tan(.5*t.camera.fovY)/(.5*t.camera.fullViewport[3]),a=t.camera.pixelRatio||1;return(0,i.s)(u,s*a,o,r,n)})))}},22911:(e,t,r)=>{r.d(t,{NL:()=>
|
|
157
|
+
`)):r.code.add(c.H`vec3 addVerticalOffset(vec3 worldPos, vec3 localOrigin) { return worldPos; }`)}const u=(0,n.vt)();function d(e){e.uniforms.add(new a.E("verticalOffset",((e,t)=>{const{minWorldLength:r,maxWorldLength:n,screenLength:s}=e.verticalOffset,o=Math.tan(.5*t.camera.fovY)/(.5*t.camera.fullViewport[3]),a=t.camera.pixelRatio||1;return(0,i.s)(u,s*a,o,r,n)})))}},22911:(e,t,r)=>{r.d(t,{NL:()=>m,ZX:()=>i});var i,n,s=r(49255),o=r(99208),a=r(40710),c=r(33079),l=r(2597),u=r(15976),d=r(63761),h=r(46263);function m(e,t){if(t.output!==s.V.ColorEmission&&t.output!==s.V.Color)return;const{emissionSource:r,hasEmissiveTextureTransform:n,bindType:m}=t,_=r===i.Texture;_&&(e.include(o.r,t),e.fragment.uniforms.add(m===h.c.Pass?new d.N("texEmission",(e=>e.textureEmissive)):new u.o("texEmission",(e=>e.textureEmissive))));const f=r===i.Value||_;f&&e.fragment.uniforms.add(m===h.c.Pass?new c.t("emissionFactor",(e=>e.emissiveFactor)):new a.W("emissionFactor",(e=>e.emissiveFactor))),e.fragment.code.add(l.H`
|
|
158
158
|
vec4 getEmissions() {
|
|
159
159
|
vec4 emissions = ${f?"vec4(emissionFactor, 1.0)":"vec4(0.0)"};
|
|
160
|
-
${(0,l.If)(
|
|
160
|
+
${(0,l.If)(_,`emissions *= textureLookup(texEmission, ${n?"emissiveUV":"vuv0"});\n emissions.w = emissions.rgb == vec3(0.0) ? 0.0: emissions.w;`)};
|
|
161
161
|
return emissions;
|
|
162
162
|
}
|
|
163
163
|
`)}r(25634),(n=i||(i={}))[n.None=0]="None",n[n.Value=1]="Value",n[n.Texture=2]="Texture",n[n.COUNT=3]="COUNT"},76662:(e,t,r)=>{r.d(t,{Q:()=>a});var i=r(49255),n=r(93588),s=r(2597),o=r(63761);function a(e,t){t.output===i.V.Highlight?(e.fragment.uniforms.add(new o.N("depthTexture",((e,t)=>t.mainDepth))),e.fragment.uniforms.add(new o.N("highlightTexture",((e,t)=>t.highlightTexture))),e.fragment.uniforms.add(new n.c("highlightLevel",((e,t)=>t.highlightLevel))),e.outputs.add("fragHighlight","vec4",0),e.fragment.code.add(s.H`void outputHighlightNet(bool occluded) {
|
|
@@ -194,7 +194,7 @@ return linearizeDepth(depthFromTexture(depthTexture, uv));
|
|
|
194
194
|
float depth = texelFetch(terrainDepthTexture, ivec2(gl_FragCoord.xy), 0).r;
|
|
195
195
|
float linearDepth = linearizeDepth(depth);
|
|
196
196
|
${r?n.H`return fragmentDepth < linearDepth && depth < 1.0;`:n.H`if(fragmentDepth ${t.cullAboveGround?">":"<="} linearDepth) discard;`}
|
|
197
|
-
}`)}},42398:(e,t,r)=>{r.d(t,{A:()=>
|
|
197
|
+
}`)}},42398:(e,t,r)=>{r.d(t,{A:()=>m});var i=r(33079),n=r(39589),s=r(46263);class o extends n.n{constructor(e,t,r){super(e,"vec4",s.c.Pass,((r,i,n)=>r.setUniform4fv(e,t(i,n))),r)}}class a extends n.n{constructor(e,t,r){super(e,"float",s.c.Pass,((r,i,n)=>r.setUniform1fv(e,t(i,n))),r)}}var c=r(2597),l=r(35644),u=r(46540),d=r(78662);r(14903),d.Gd;const h=8;function m(e,t){const{vertex:r,attributes:n}=e;t.hasVvInstancing&&(t.vvSize||t.vvColor)&&n.add(u.r.INSTANCEFEATUREATTRIBUTE,"vec4"),t.vvSize?(r.uniforms.add(new i.t("vvSizeMinSize",(e=>e.vvSize.minSize))),r.uniforms.add(new i.t("vvSizeMaxSize",(e=>e.vvSize.maxSize))),r.uniforms.add(new i.t("vvSizeOffset",(e=>e.vvSize.offset))),r.uniforms.add(new i.t("vvSizeFactor",(e=>e.vvSize.factor))),r.uniforms.add(new l.k("vvSymbolRotationMatrix",(e=>e.vvSymbolRotationMatrix))),r.uniforms.add(new i.t("vvSymbolAnchor",(e=>e.vvSymbolAnchor))),r.code.add(c.H`vec3 vvScale(vec4 _featureAttribute) {
|
|
198
198
|
return clamp(vvSizeOffset + _featureAttribute.x * vvSizeFactor, vvSizeMinSize, vvSizeMaxSize);
|
|
199
199
|
}
|
|
200
200
|
vec4 vvTransformPosition(vec3 position, vec4 _featureAttribute) {
|
|
@@ -275,4 +275,4 @@ screenSizePerspectiveScaleFactor(absCosAngle, distanceToCamera, params)
|
|
|
275
275
|
return mix(size * clamp(factor.x, factor.z, 1.0), size, factor.y);
|
|
276
276
|
}`),e.vertex.code.add(o.H`vec2 screenSizePerspectiveScaleVec2(vec2 size, float absCosAngle, float distanceToCamera, vec3 params) {
|
|
277
277
|
return applyScreenSizePerspectiveScaleFactorVec2(size, screenSizePerspectiveScaleFactor(absCosAngle, distanceToCamera, params));
|
|
278
|
-
}`)}function c(e){e.uniforms.add(new s.t("screenSizePerspective",(e=>u(e.screenSizePerspective))))}function l(e){e.uniforms.add(new s.t("screenSizePerspectiveAlignment",(e=>u(e.screenSizePerspectiveAlignment||e.screenSizePerspective))))}function u(e){return(0,i.s)(d,e.parameters.divisor,e.parameters.offset,e.minScaleFactor)}const d=(0,n.vt)()},20693:(e,t,r)=>{r.d(t,{yu:()=>m,Nz:()=>T,NB:()=>f,S7:()=>v});var i=r(58083),n=r(9093),s=r(38954),o=r(51850),a=r(40710),c=r(33079),l=r(20304),u=r(39589),d=r(46263);class h extends u.n{constructor(e,t){super(e,"mat4",d.c.Draw,((r,i,n)=>r.setUniformMatrix4fv(e,t(i,n))))}}var _=r(40095);function m(e,t){t.instancedDoublePrecision?e.constants.add("cameraPosition","vec3",o.uY):e.uniforms.add(new a.W("cameraPosition",((e,t)=>(0,s.s)(g,t.camera.viewInverseTransposeMatrix[3]-e.origin[0],t.camera.viewInverseTransposeMatrix[7]-e.origin[1],t.camera.viewInverseTransposeMatrix[11]-e.origin[2]))))}function f(e,t){if(!t.instancedDoublePrecision)return void e.uniforms.add(new _.X("proj",((e,t)=>t.camera.projectionMatrix)),new h("view",((e,t)=>(0,i.Tl)(p,t.camera.viewMatrix,e.origin))),new a.W("localOrigin",(e=>e.origin)));const r=e=>(0,s.s)(g,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]);e.uniforms.add(new _.X("proj",((e,t)=>t.camera.projectionMatrix)),new _.X("view",((e,t)=>(0,i.Tl)(p,t.camera.viewMatrix,r(t)))),new c.t("localOrigin",((e,t)=>r(t))))}const p=(0,n.vt)(),g=(0,o.vt)();function v(e){e.uniforms.add(new _.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:()=>s});var i=r(39589),n=r(46263);class s extends i.n{constructor(e,t){super(e,"bool",n.c.Pass,((r,i,n)=>r.setUniform1b(e,t(i,n))))}}},47286:(e,t,r)=>{r.d(t,{G:()=>s});var i=r(39589),n=r(46263);class s extends i.n{constructor(e,t){super(e,"vec2",n.c.Pass,((r,i,n)=>r.setUniform2fv(e,t(i,n))))}}},71988:(e,t,r)=>{r.d(t,{E:()=>s});var i=r(39589),n=r(46263);class s extends i.n{constructor(e,t){super(e,"vec4",n.c.Pass,((r,i,n)=>r.setUniform4fv(e,t(i,n))))}}},93588:(e,t,r)=>{r.d(t,{c:()=>s});var i=r(39589),n=r(46263);class s extends i.n{constructor(e,t){super(e,"int",n.c.Pass,((r,i,n)=>r.setUniform1i(e,t(i,n))))}}},85977:(e,t,r)=>{r.d(t,{N5:()=>c});var i=r(49186),n=(r(44208),r(53966)),s=r(46263),o=r(620);class a{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 a{constructor(){super(...arguments),this.vertex=new h,this.fragment=new h,this.attributes=new _,this.varyings=new m,this.extensions=new f,this.outputs=new p}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),n="vertex"===e?this.vertex:this.fragment,s=n.uniforms.generateSource(),o=n.code.generateSource(),a=n.main.generateSource(),c="vertex"===e?T:v,l=n.constants.generateSource(),u=this.outputs.generateSource(e);return`#version 300 es\n${t.join("\n")}\n\n${c}\n\n${l.join("\n")}\n\n${s.join("\n")}\n\n${r.join("\n")}\n\n${i.join("\n")}\n\n${u.join("\n")}\n\n${o.join("\n")}\n\n${a.join("\n")}`}generateBindPass(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[s.c.Pass];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[s.c.Pass];r&&t.set(e.name,r)}));const r=Array.from(t.values()),i=r.length;return(t,n)=>{for(let s=0;s<i;++s)r[s](e,t,n)}}generateBindDraw(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[s.c.Draw];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[s.c.Draw];r&&t.set(e.name,r)}));const r=Array.from(t.values()),i=r.length;return(t,n,s)=>{for(let o=0;o<i;++o)r[o](e,s,t,n)}}}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 n.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 u{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 d{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 a{constructor(){super(...arguments),this.uniforms=new l(this),this.main=new u(this),this.code=new d(this),this.constants=new g(this)}get builder(){return this}}class _{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 m{constructor(){this._entries=new Map}add(e,t){this._entries.has(e)&&(0,o.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 f{constructor(){this._entries=new Set}add(e){this._entries.add(e)}generateSource(e){const t="vertex"===e?f.ALLOWLIST_VERTEX:f.ALLOWLIST_FRAGMENT;return Array.from(this._entries).filter((e=>t.includes(e))).map((e=>`#extension ${e} : enable`))}}f.ALLOWLIST_FRAGMENT=["GL_EXT_shader_texture_lod","GL_OES_standard_derivatives"],f.ALLOWLIST_VERTEX=[];class p{constructor(){this._entries=new Map}add(e,t,r=0){const i=this._entries.get(r);i?(0,o.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:p.DEFAULT_NAME,type:p.DEFAULT_TYPE});const t=new Array;return this._entries.forEach(((e,r)=>t.push(`layout(location = ${r}) out ${e.type} ${e.name};`))),t}}p.DEFAULT_TYPE="vec4",p.DEFAULT_NAME="fragColor";class g{constructor(e){this._stage=e,this._entries=new Set}add(e,t,r){let i="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":i=g._numberToFloatStr(r);break;case"int":i=g._numberToIntStr(r);break;case"bool":i=r.toString();break;case"vec2":i=`vec2(${g._numberToFloatStr(r[0])}, ${g._numberToFloatStr(r[1])})`;break;case"vec3":i=`vec3(${g._numberToFloatStr(r[0])}, ${g._numberToFloatStr(r[1])}, ${g._numberToFloatStr(r[2])})`;break;case"vec4":i=`vec4(${g._numberToFloatStr(r[0])}, ${g._numberToFloatStr(r[1])}, ${g._numberToFloatStr(r[2])}, ${g._numberToFloatStr(r[3])})`;break;case"ivec2":i=`ivec2(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])})`;break;case"ivec3":i=`ivec3(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])}, ${g._numberToIntStr(r[2])})`;break;case"ivec4":i=`ivec4(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])}, ${g._numberToIntStr(r[2])}, ${g._numberToIntStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":i=`${t}(${Array.prototype.map.call(r,(e=>g._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 v="#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:()=>s});var i=r(39589),n=r(46263);class s extends i.n{constructor(e,t){super(e,"sampler2D",n.c.Pass,((r,i,n)=>r.bindTexture(e,t(i,n))))}}},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:()=>s});var i=r(97768),n=r(63907);class s{constructor(e,t,r){this.release=r,this._configuration=t.snapshot(),this._program=this.initializeProgram(e),this._pipeline=this.initializePipeline(e)}destroy(){this._program=(0,i.WD)(this._program),this._pipeline=null}reload(e){(0,i.WD)(this._program),this._program=this.initializeProgram(e),this._pipeline=this.initializePipeline(e)}get program(){return this._program}get compiled(){return this.program.compiled}get key(){return this._configuration.key}get configuration(){return this._configuration}ensureAttributeLocations(e){this.program.assertCompatibleVertexAttributeLocations(e)}get primitiveType(){return n.WR.TRIANGLES}getPipeline(e,t=null){return this._pipeline}}},99769:(e,t,r)=>{r.d(t,{K:()=>s,W:()=>o});var i=r(49186),n=r(2597);class s extends n.Y{constructor(){super(),this._key="",this._keyDirty=!1,this._parameterBits=this._parameterBits?.map((()=>0))??[],this._parameterNames??=[],this._parameterValues=this._parameterValues?.slice()??[]}get key(){return this._keyDirty&&(this._keyDirty=!1,this._key=String.fromCharCode.apply(String,this._parameterBits)),this._key}snapshot(){const e=this._parameterNames,t={key:this.key};for(const r of e)t[r]=this[r];return t}}function o(e={}){return(t,r)=>{if(t.hasOwnProperty("_parameterNames")||Object.defineProperty(t,"_parameterNames",{value:t._parameterNames?.slice()??[],configurable:!0,writable:!0}),t._parameterNames.push(r),null!=e.constValue)Object.defineProperty(t,r,{get:()=>e.constValue});else{const n=t._parameterNames.length-1,s=e.count||2,o=Math.ceil(Math.log2(s));t.hasOwnProperty("_parameterBits")||Object.defineProperty(t,"_parameterBits",{value:t._parameterBits?.slice()??[0],configurable:!0,writable:!0}),t.hasOwnProperty("_parameterValues")||Object.defineProperty(t,"_parameterValues",{value:t._parameterValues?.slice()??[],configurable:!0,writable:!0});const a=t._parameterBits;let c=0;for(;a[c]+o>16;)c++,c>=a.length&&a.push(0);const l=a[c],u=(1<<o)-1<<l;a[c]+=o,Object.defineProperty(t,r,{get(){return this._parameterValues[n]},set(t){if(this._parameterValues[n]!==t)if(this._parameterValues[n]=t,this._keyDirty=!0,this._parameterBits[c]=this._parameterBits[c]&~u|+t<<l&u,"number"==typeof t){if(null==e.count)throw new i.A(`Configuration value for ${r} must provide a count option`)}else if("boolean"!=typeof t)throw new i.A(`Configuration value for ${r} must be boolean or number, got ${typeof t}`)}})}}}},69720:(e,t,r)=>{r.d(t,{J:()=>n});var i=r(24326);class n{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:()=>n});var i=r(46540);const n=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:()=>u});var i=r(97768),n=r(74887),s=r(2597),o=r(89192);class a{constructor(e){this._material=e.material,this._techniques=e.techniques,this._output=e.output}dispose(){this._techniques.release(this._technique)}get technique(){return this._technique}get _stippleTextures(){return this._techniques.constructionContext.stippleTextures}get _markerTextures(){return this._techniques.constructionContext.markerTextures}ensureTechnique(e,t){return this._technique=this._techniques.releaseAndAcquire(e,this._material.getConfiguration(this._output,t),this._technique),this._technique}ensureResources(e){return o.Am.LOADED}}class c extends a{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(){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?o.Am.LOADED:o.Am.LOADING}get textureBindParameters(){return new u(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,n.$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 s.Y{constructor(e=null){super(),this.textureEmissive=e}}class u extends l{constructor(e=null,t=null,r=null,i=null,n=null,s,o){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=i,this.textureMetallicRoughness=n,this.scale=s,this.normalTextureTransformMatrix=o}}},14903:(e,t,r)=>{r.d(t,{im:()=>h,m$:()=>i});var i,n,s=r(51850),o=r(2597),a=r(89192),c=r(69720),l=r(96672),u=r(39341),d=r(43616);class h extends c.J{constructor(e,t){super(),this.type=l.X.Material,this.supportsEdges=!1,this._renderPriority=0,this._vertexAttributeLocations=u.D,this._pp0=(0,s.fA)(0,0,1),this._pp1=(0,s.fA)(0,0,0),this._parameters=new t,(0,d.MB)(this._parameters,e),this.validateParameters(this._parameters)}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,d.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.bindParameters.decorations===a.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,n,s){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,n)}}(n=i||(i={}))[n.None=0]="None",n[n.Occlude=1]="Occlude",n[n.Transparent=2]="Transparent",n[n.OccludeAndTransparent=4]="OccludeAndTransparent",n[n.OccludeAndTransparentStencil=8]="OccludeAndTransparentStencil",n[n.Opaque=16]="Opaque",o.Y},33524:(e,t,r)=>{r.d(t,{K_:()=>m,Yf:()=>u,aB:()=>_,ez:()=>l,m6:()=>f,xt:()=>d});var i=r(49255),n=r(14327),s=r(63907),o=r(90644);const a=(0,o.p3)(s.dn.SRC_ALPHA,s.dn.ONE,s.dn.ONE_MINUS_SRC_ALPHA,s.dn.ONE_MINUS_SRC_ALPHA),c=(0,o.p3)(s.dn.ONE,s.dn.ZERO,s.dn.ONE,s.dn.ONE_MINUS_SRC_ALPHA);function l(e){return e===n.y.FrontFace?null:c}function u(e){switch(e){case n.y.NONE:return a;case n.y.ColorAlpha:return c;case n.y.FrontFace:case n.y.COUNT:return null}}const d=5e5,h={factor:-1,units:-2};function _(e){return e?h:null}function m(e,t=s.MT.LESS){return e===n.y.NONE||e===n.y.FrontFace?t:s.MT.LEQUAL}function f(e,t){const r=t===i.V.ColorEmission;return e===n.y.ColorAlpha?r?{buffers:[s.Nm.COLOR_ATTACHMENT0,s.Nm.COLOR_ATTACHMENT1,s.Nm.COLOR_ATTACHMENT2]}:{buffers:[s.Nm.COLOR_ATTACHMENT0,s.Nm.COLOR_ATTACHMENT1]}:r?{buffers:[s.Nm.COLOR_ATTACHMENT0,s.Nm.COLOR_ATTACHMENT1]}:null}},34886:(e,t,r)=>{r.d(t,{B:()=>s});var i=r(3694),n=r(94656);class s{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,n.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_NO_SSAO_DEPTH=3]="OPAQUE_NO_SSAO_DEPTH",e[e.TRANSPARENT_MATERIAL=4]="TRANSPARENT_MATERIAL",e[e.TRANSPARENT_NO_SSAO_DEPTH=5]="TRANSPARENT_NO_SSAO_DEPTH",e[e.TRANSPARENT_TERRAIN=6]="TRANSPARENT_TERRAIN",e[e.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL=7]="TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL",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:()=>V}),r(44208);var i=r(49186),n=r(65529),s=r(97768),o=r(74887),a=r(34275),c=r(84952),l=r(99677),u=r(56058),d=r(89192),h=r(2741);let _;var m,f;(f=m||(m={}))[f.ETC1_RGB=0]="ETC1_RGB",f[f.ETC2_RGBA=1]="ETC2_RGBA",f[f.BC1_RGB=2]="BC1_RGB",f[f.BC3_RGBA=3]="BC3_RGBA",f[f.BC4_R=4]="BC4_R",f[f.BC5_RG=5]="BC5_RG",f[f.BC7_M6_RGB=6]="BC7_M6_RGB",f[f.BC7_M5_RGBA=7]="BC7_M5_RGBA",f[f.PVRTC1_4_RGB=8]="PVRTC1_4_RGB",f[f.PVRTC1_4_RGBA=9]="PVRTC1_4_RGBA",f[f.ASTC_4x4_RGBA=10]="ASTC_4x4_RGBA",f[f.ATC_RGB=11]="ATC_RGB",f[f.ATC_RGBA=12]="ATC_RGBA",f[f.FXT1_RGB=17]="FXT1_RGB",f[f.PVRTC2_4_RGB=18]="PVRTC2_4_RGB",f[f.PVRTC2_4_RGBA=19]="PVRTC2_4_RGBA",f[f.ETC2_EAC_R11=20]="ETC2_EAC_R11",f[f.ETC2_EAC_RG11=21]="ETC2_EAC_RG11",f[f.RGBA32=13]="RGBA32",f[f.RGB565=14]="RGB565",f[f.BGR565=15]="BGR565",f[f.RGBA4444=16]="RGBA4444";var p=r(63907),g=r(21231),v=r(42293);let T=null,E=null;async function A(){return null==E&&(_??=(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})(),E=_,T=await E),E}function R(e,t,r,i,n){const s=(0,v.IB)(t?p.CQ.COMPRESSED_RGBA8_ETC2_EAC:p.CQ.COMPRESSED_RGB8_ETC2),o=n&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*s*o)}function S(e){return e.getNumImages()>=1&&!e.isUASTC()}function x(e){return e.getFaces()>=1&&e.isETC1S()}function I(e,t,r,i,n,s,o,a){const{compressedTextureETC:c,compressedTextureS3TC:l}=e.capabilities,[u,d]=c?i?[m.ETC2_RGBA,p.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[m.ETC1_RGB,p.CQ.COMPRESSED_RGB8_ETC2]:l?i?[m.BC3_RGBA,p.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[m.BC1_RGB,p.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[m.RGBA32,p.Ab.RGBA],h=t.hasMipmap?r:Math.min(1,r),_=[];for(let e=0;e<h;e++)_.push(new Uint8Array(o(e,u))),a(e,u,_[e]);return t.internalFormat=d,t.hasMipmap=_.length>1,t.samplingMode=t.hasMipmap?p.Cj.LINEAR_MIPMAP_LINEAR:p.Cj.LINEAR,t.width=n,t.height=s,new g.g(e,t,{type:"compressed",levels:_})}var N=r(69720),C=r(96672),b=r(53966);const O=()=>b.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function M(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const w=M("DXT1"),D=M("DXT3"),P=M("DXT5");function L(e,t){const r=new Int32Array(e,0,31);if(542327876!==r[0])return O().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return O().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let n,s;switch(i){case w:n=8,s=p.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case D:n=16,s=p.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case P:n=16,s=p.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return O().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let o=1,a=r[4],c=r[3];(3&a||3&c)&&(O().warn("Rounding up compressed texture size to nearest multiple of 4."),a=a+3&-4,c=c+3&-4);const l=a,u=c;let d,h;131072&r[2]&&!1!==t&&(o=Math.max(1,r[7]));let _=r[1]+4;const m=[];for(let t=0;t<o;++t)h=(a+3>>2)*(c+3>>2)*n,d=new Uint8Array(e,_,h),m.push(d),_+=h,a=Math.max(1,a>>1),c=Math.max(1,c>>1);return{textureData:{type:"compressed",levels:m},internalFormat:s,width:l,height:u}}function y(e,t,r){if(e instanceof ImageData)return y(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 F,U,B=r(620),G=r(67171);class V extends N.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 n.A,this._parameters={...z,...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 G.R;return t.wrapMode=this._parameters.wrap??p.pF.REPEAT,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?p.Cj.LINEAR_MIPMAP_LINEAR:p.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,a.mw)(e)||(0,a.mg)(e))return t.encoding===d.JS.KTX2_ENCODING?function(e,t){if(null==T)return e.byteLength;const r=new T.KTX2File(new Uint8Array(e)),i=x(r)?R(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):t.encoding===d.JS.BASIS_ENCODING?function(e,t){if(null==T)return e.byteLength;const r=new T.BasisFile(new Uint8Array(e)),i=S(r)?R(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?W(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 g.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,a.mw)(t)||(0,a.mg)(t))&&this._parameters.encoding===d.JS.DDS_ENCODING?this._loadFromDDSData(e,t):((0,a.mw)(t)||(0,a.mg)(t))&&this._parameters.encoding===d.JS.KTX2_ENCODING?this._loadFromKTX2(e,t):((0,a.mw)(t)||(0,a.mg)(t))&&this._parameters.encoding===d.JS.BASIS_ENCODING?this._loadFromBasis(e,t):(0,a.mg)(t)?this._loadFromPixelData(e,t):(0,a.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:n,internalFormat:s,width:o,height:a}=i;return t.samplingMode=n.levels.length>1?p.Cj.LINEAR_MIPMAP_LINEAR:p.Cj.LINEAR,t.hasMipmap=n.levels.length>1,t.internalFormat=s,t.width=o,t.height=a,new g.g(e,t,n)}(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(!x(i))return null;i.startTranscoding();const n=I(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(),n}(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(!S(i))return null;i.startTranscoding();const n=I(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(),n}(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?p.Ab.LUMINANCE:3===this._parameters.components?p.Ab.RGB:p.Ab.RGBA,r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new g.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,o.Te)(r),this._loadFromImage(e,i)}))}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync((async r=>{const i=await(0,u.Sx)(t,t.src,!1,r);return(0,o.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(((n,a)=>{const c=()=>{t.removeEventListener("loadeddata",l),t.removeEventListener("error",u),(0,s.xt)(d)},l=()=>{t.readyState>=F.HAVE_CURRENT_DATA&&(c(),n(this._loadFromImage(e,t)))},u=e=>{c(),a(e||new i.A("Failed to load video"))};t.addEventListener("loadeddata",l),t.addEventListener("error",u);const d=(0,o.u7)(r,(()=>u((0,o.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,n=e.height;do{i=Math.ceil(i/2),n=Math.ceil(n/2),r=i*n}while(r>1048576||null!=t&&(i>t||n>t));return y(e,i,n)}(r,t):function(e,t){const r=Math.max(e.width,e.height);if(r<=t)return e;const i=t/r;return y(e,Math.round(e.width*i),Math.round(e.height*i))}(r,t)}const i=W(r);this._parameters.width=i.width,this._parameters.height=i.height;const n=this._createDescriptor(e);return n.pixelFormat=3===this._parameters.components?p.Ab.RGB:p.Ab.RGBA,n.width=i.width,n.height=i.height,this._glTexture=new g.g(e,n,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,s.WD)(this._glTexture),null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}}function W(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}(U=F||(F={}))[U.HAVE_NOTHING=0]="HAVE_NOTHING",U[U.HAVE_METADATA=1]="HAVE_METADATA",U[U.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",U[U.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",U[U.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA";const z={wrap:{s:p.pF.REPEAT,t:p.pF.REPEAT},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1,downsampleUncompressed:!1}},14327:(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={}))},89192:(e,t,r)=>{var i,n,s,o,a,c,l,u,d;r.d(t,{Am:()=>o,C7:()=>s,ID:()=>u,JS:()=>d,Mg:()=>c,dd:()=>a,it:()=>n,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"}(n||(n={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.UPDATE=1]="UPDATE"}(s||(s={})),function(e){e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED"}(o||(o={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(a||(a={})),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"}(u||(u={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(d||(d={}))},30669:(e,t,r)=>{r.d(t,{MD:()=>q,m0:()=>j,cJ:()=>$,hs:()=>Y});var i=r(34727),n=(r(44208),r(53966)),s=r(4341),o=r(58083),a=r(9093),c=r(38954),l=r(51850),u=r(19419),d=r(88582),h=r(11964),_=r(240),m=r(71351),f=r(44280),p=r(32114);const g=()=>n.A.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function v(e=H){return{plane:(0,_.vt)(e.plane),origin:(0,l.o8)(e.origin),basis1:(0,l.o8)(e.basis1),basis2:(0,l.o8)(e.basis2)}}function T(e,t=v()){return E(e.origin,e.basis1,e.basis2,t)}function E(e,t,r,i=v()){return(0,c.c)(i.origin,e),(0,c.c)(i.basis1,t),(0,c.c)(i.basis2,r),A(i),function(e,t){Math.abs((0,c.m)(e.basis1,e.basis2)/((0,c.l)(e.basis1)*(0,c.l)(e.basis2)))>1e-6&&g().warn(t,"Provided basis vectors are not perpendicular"),Math.abs((0,c.m)(e.basis1,w(e)))>1e-6&&g().warn(t,"Basis vectors and plane normal are not perpendicular"),Math.abs(-(0,c.m)(w(e),e.origin)-e.plane[3])>1e-6&&g().warn(t,"Plane offset is not consistent with plane origin")}(i,"fromValues()"),i}function A(e){(0,_.mR)(e.basis2,e.basis1,e.origin,e.plane)}function R(e,t,r){e!==r&&T(e,r);const i=(0,c.j)(p.rq.get(),w(e),t);return(0,c.g)(r.origin,r.origin,i),r.plane[3]-=t,r}function S(e,t=v()){const r=(e[2]-e[0])/2,i=(e[3]-e[1])/2;return(0,c.s)(t.origin,e[0]+r,e[1]+i,0),(0,c.s)(t.basis1,r,0,0),(0,c.s)(t.basis2,0,i,0),(0,_.fA)(0,0,1,0,t.plane),t}function x(e,t,r){return!!(0,_.Ui)(e.plane,t,r)&&D(e,r)}function I(e,t,r){const n=F.get();y(e,t,n,F.get());let s=Number.POSITIVE_INFINITY;for(const o of V){const a=L(e,o,U.get()),l=p.rq.get();if((0,_.T7)(n,a,l)){const e=(0,c.E)(p.rq.get(),t.origin,l),n=Math.abs((0,i.XM)((0,c.m)(t.direction,e)));n<s&&(s=n,(0,c.c)(r,l))}}return s===Number.POSITIVE_INFINITY?N(e,t,r):r}function N(e,t,r){if(x(e,t,r))return r;const i=F.get(),n=F.get();y(e,t,i,n);let s=Number.POSITIVE_INFINITY;for(const o of V){const a=L(e,o,U.get()),l=p.rq.get();if((0,_.gv)(i,a,l)){const e=(0,m.kb)(t,l);if(!(0,_.Tj)(n,l))continue;e<s&&(s=e,(0,c.c)(r,l))}}return O(e,t.origin)<s&&C(e,t.origin,r),r}function C(e,t,r){const i=(0,_._I)(e.plane,t,p.rq.get()),n=(0,h.H6)(P(e,e.basis1),i,-1,1,p.rq.get()),s=(0,h.H6)(P(e,e.basis2),i,-1,1,p.rq.get());return(0,c.f)(r,(0,c.g)(p.rq.get(),n,s),e.origin),r}function b(e,t,r){const{origin:i,basis1:n,basis2:s}=e,o=(0,c.f)(p.rq.get(),t,i),a=(0,f.gr)(n,o),l=(0,f.gr)(s,o),u=(0,f.gr)(w(e),o);return(0,c.s)(r,a,l,u)}function O(e,t){const r=b(e,t,p.rq.get()),{basis1:i,basis2:n}=e,s=(0,c.l)(i),o=(0,c.l)(n),a=Math.max(Math.abs(r[0])-s,0),l=Math.max(Math.abs(r[1])-o,0),u=r[2];return a*a+l*l+u*u}function M(e,t){const r=-e.plane[3];return(0,f.gr)(w(e),t)-r}function w(e){return(0,_.Qj)(e.plane)}function D(e,t){const r=(0,c.f)(p.rq.get(),t,e.origin),i=(0,c.q)(e.basis1),n=(0,c.q)(e.basis2),s=(0,c.m)(e.basis1,r),o=(0,c.m)(e.basis2,r);return-s-i<0&&s-i<0&&-o-n<0&&o-n<0}function P(e,t){const r=U.get();return(0,c.c)(r.origin,e.origin),(0,c.c)(r.vector,t),r}function L(e,t,r){const{basis1:i,basis2:n,origin:s}=e,o=(0,c.j)(p.rq.get(),i,t.origin[0]),a=(0,c.j)(p.rq.get(),n,t.origin[1]);(0,c.g)(r.origin,o,a),(0,c.g)(r.origin,r.origin,s);const l=(0,c.j)(p.rq.get(),i,t.direction[0]),u=(0,c.j)(p.rq.get(),n,t.direction[1]);return(0,c.j)(r.vector,(0,c.g)(l,l,u),2),r}function y(e,t,r,i){const n=w(e);(0,_.mR)(n,t.direction,t.origin,r),(0,_.mR)((0,_.Qj)(r),n,t.origin,i)}const H={plane:(0,_.vt)(),origin:(0,l.fA)(0,0,0),basis1:(0,l.fA)(1,0,0),basis2:(0,l.fA)(0,1,0)},F=new s.I(_.vt),U=new s.I(h.vt),B=(0,l.vt)(),G=new s.I((()=>v())),V=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],W=(0,a.vt)(),z=(0,a.vt)();Object.freeze(Object.defineProperty({__proto__:null,BoundedPlaneClass:class{constructor(){this.plane=(0,_.vt)(),this.origin=(0,l.vt)(),this.basis1=(0,l.vt)(),this.basis2=(0,l.vt)()}},altitudeAt:M,axisAt:function(e,t,r,i){return function(e,t,r){switch(t){case d._.X:(0,c.c)(r,e.basis1),(0,c.n)(r,r);break;case d._.Y:(0,c.c)(r,e.basis2),(0,c.n)(r,r);break;case d._.Z:(0,c.c)(r,w(e))}return r}(e,r,i)},cameraFrustumCoverage:function(e,t){return(t-e)/t},closestPoint:N,closestPointOnSilhouette:I,copy:T,copyWithoutVerify:function(e,t){(0,c.c)(t.origin,e.origin),(0,c.c)(t.basis1,e.basis1),(0,c.c)(t.basis2,e.basis2),(0,_.C)(t.plane,e.plane)},create:v,distance:function(e,t){return Math.sqrt(O(e,t))},distance2:O,distanceToSilhouette:function(e,t){let r=Number.NEGATIVE_INFINITY;for(const i of V){const n=L(e,i,U.get()),s=(0,h.kb)(n,t);s>r&&(r=s)}return Math.sqrt(r)},elevate:R,equals:function(e,t){return(0,c.e)(e.basis1,t.basis1)&&(0,c.e)(e.basis2,t.basis2)&&(0,c.e)(e.origin,t.origin)},extrusionContainsPoint:function(e,t){return(0,_.Tj)(e.plane,t)&&D(e,t)},fromAABoundingRect:S,fromValues:E,getExtent:function(e,t){const r=e.basis1[0],i=e.basis2[1],[n,s]=e.origin;return(0,u.fA)(n-r,s-i,n+i,s+i,t)},intersectRay:x,intersectRayClosestSilhouette:function(e,t,r){if(x(e,t,r))return r;const i=I(e,t,p.rq.get());return(0,c.g)(r,t.origin,(0,c.j)(p.rq.get(),t.direction,(0,c.p)(t.origin,i)/(0,c.l)(t.direction))),r},normal:w,projectPoint:C,projectPointLocal:b,rotate:function(e,t,r,i){return e!==i&&T(e,i),(0,o.$0)(z,t,r),(0,c.h)(i.basis1,e.basis1,z),(0,c.h)(i.basis2,e.basis2,z),A(i),i},setAltitudeAt:function(e,t,r,i){const n=M(e,t),s=(0,c.j)(B,w(e),r-n);return(0,c.g)(i,t,s),i},setExtent:function(e,t,r){return S(t,r),R(r,M(e,e.origin),r),r},transform:function(e,t,r){return e!==r&&T(e,r),(0,o.B8)(W,t),(0,o.mg)(W,W),(0,c.h)(r.basis1,e.basis1,W),(0,c.h)(r.basis2,e.basis2,W),(0,c.h)((0,_.Qj)(r.plane),(0,_.Qj)(e.plane),W),(0,c.h)(r.origin,e.origin,t),(0,_.mP)(r.plane,r.plane,r.origin),r},up:H,updateUnboundedPlane:A,wrap:function(e,t,r){const i=G.get();return i.origin=e,i.basis1=t,i.basis2=r,i.plane=(0,_.LV)(0,0,0,0),A(i),i}},Symbol.toStringTag,{value:"Module"}));var X=r(76412);function k(e,t,r){const i=r.parameters;return Q.scale=Math.min(i.divisor/(t-i.offset),1),Q.factor=function(e){return Math.abs(e*e*e)}(e),Q}function j(e,t){return(0,i.Cc)(e*Math.max(t.scale,t.minScaleFactor),e,t.factor)}function $(e,t,r,i){i.scale=function(e,t,r){const i=k(e,t,r);return i.minScaleFactor=0,j(1,i)}(e,t,r),i.factor=0,i.minScaleFactor=r.minScaleFactor}function q(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 Y(e,t,r,i){return j(e,k(t,r,i))}r(24151),(0,i.kU)(10),(0,i.kU)(12),(0,i.kU)(70),(0,i.kU)(40);const Q={scale:0,factor:0,minScaleFactor:0};(0,X.c)()},99550:(e,t,r)=>{r.d(t,{E:()=>a});var i=r(90237),n=r(82991),s=r(46263),o=r(99769);class a extends n.nW{}(0,i._)([(0,o.W)({constValue:!0})],a.prototype,"hasSliceHighlight",void 0),(0,i._)([(0,o.W)({constValue:!1})],a.prototype,"hasSliceInVertexProgram",void 0),(0,i._)([(0,o.W)({constValue:s.c.Pass})],a.prototype,"bindType",void 0)},43616:(e,t,r)=>{r.d(t,{MB:()=>a,Um:()=>c,kE:()=>o});var i=r(4576),n=r(34727),s=r(30669);function o(e,t,r,i,o){let a=(r.screenLength||0)*e.pixelRatio;null!=o&&(a=(0,s.hs)(a,i,t,o));const c=a*Math.tan(.5*e.fovY)/(.5*e.fullHeight);return(0,n.qE)(c*t,r.minWorldLength||0,null!=r.maxWorldLength?r.maxWorldLength:1/0)}function a(e,t){let r=!1;for(const n in t){const s=t[n];void 0!==s&&(Array.isArray(s)?Array.isArray(e[n])&&(0,i.aI)(s,e[n])||(e[n]=s.slice(),r=!0):e[n]!==s&&(r=!0,e[n]=s))}return r}const c={multiply:1,ignore:2,replace:3,tint:4}},59907:(e,t,r)=>{r.d(t,{Hk:()=>h,Pq:()=>d,SA:()=>p,Ut:()=>u,p1:()=>_,tH:()=>f,tb:()=>m,uO:()=>a});var i=r(58083),n=r(13030),s=r(620),o=r(46540);function a(e,t,r,i=1){const{data:n,indices:s}=e,o=t.typedBuffer,a=t.typedBufferStride,c=s.length;if(r*=a,1===i)for(let e=0;e<c;++e)o[r]=n[s[e]],r+=a;else for(let e=0;e<c;++e){const t=n[s[e]];for(let e=0;e<i;e++)o[r]=t,r+=a}}function c(e,t,r){const{data:i,indices:n}=e,s=t.typedBuffer,o=t.typedBufferStride,a=n.length;r*=o;for(let e=0;e<a;++e){const t=2*n[e];s[r]=i[t],s[r+1]=i[t+1],r+=o}}function l(e,t,r,i){const{data:n,indices:s}=e,o=t.typedBuffer,a=t.typedBufferStride,c=s.length;if(r*=a,null==i||1===i)for(let e=0;e<c;++e){const t=3*s[e];o[r]=n[t],o[r+1]=n[t+1],o[r+2]=n[t+2],r+=a}else for(let e=0;e<c;++e){const t=3*s[e];for(let e=0;e<i;++e)o[r]=n[t],o[r+1]=n[t+1],o[r+2]=n[t+2],r+=a}}function u(e,t,r,i=1){const{data:n,indices:s}=e,o=t.typedBuffer,a=t.typedBufferStride,c=s.length;if(r*=a,1===i)for(let e=0;e<c;++e){const t=4*s[e];o[r]=n[t],o[r+1]=n[t+1],o[r+2]=n[t+2],o[r+3]=n[t+3],r+=a}else for(let e=0;e<c;++e){const t=4*s[e];for(let e=0;e<i;++e)o[r]=n[t],o[r+1]=n[t+1],o[r+2]=n[t+2],o[r+3]=n[t+3],r+=a}}function d(e,t,r){const i=e.typedBuffer,n=e.typedBufferStride;t*=n;for(let e=0;e<r;++e)i[t]=0,i[t+1]=0,i[t+2]=0,i[t+3]=0,t+=n}function h(e,t,r,n,s=1){if(!t)return void l(e,r,n,s);const{data:o,indices:a}=e,c=r.typedBuffer,u=r.typedBufferStride,d=a.length,h=t[0],_=t[1],m=t[2],f=t[4],p=t[5],g=t[6],v=t[8],T=t[9],E=t[10],A=t[12],R=t[13],S=t[14];n*=u;let x=0,I=0,N=0;const C=(0,i.tZ)(t)?e=>{x=o[e]+A,I=o[e+1]+R,N=o[e+2]+S}:e=>{const t=o[e],r=o[e+1],i=o[e+2];x=h*t+f*r+v*i+A,I=_*t+p*r+T*i+R,N=m*t+g*r+E*i+S};if(1===s)for(let e=0;e<d;++e)C(3*a[e]),c[n]=x,c[n+1]=I,c[n+2]=N,n+=u;else for(let e=0;e<d;++e){C(3*a[e]);for(let e=0;e<s;++e)c[n]=x,c[n+1]=I,c[n+2]=N,n+=u}}function _(e,t,r,n,s=1){if(!t)return void l(e,r,n,s);const{data:o,indices:a}=e,c=t,u=r.typedBuffer,d=r.typedBufferStride,h=a.length,_=c[0],m=c[1],f=c[2],p=c[4],g=c[5],v=c[6],T=c[8],E=c[9],A=c[10],R=!(0,i.ut)(c),S=1e-6,x=1-S;n*=d;let I=0,N=0,C=0;const b=(0,i.tZ)(c)?e=>{I=o[e],N=o[e+1],C=o[e+2]}:e=>{const t=o[e],r=o[e+1],i=o[e+2];I=_*t+p*r+T*i,N=m*t+g*r+E*i,C=f*t+v*r+A*i};if(1===s)if(R)for(let e=0;e<h;++e){b(3*a[e]);const t=I*I+N*N+C*C;if(t<x&&t>S){const e=1/Math.sqrt(t);u[n]=I*e,u[n+1]=N*e,u[n+2]=C*e}else u[n]=I,u[n+1]=N,u[n+2]=C;n+=d}else for(let e=0;e<h;++e)b(3*a[e]),u[n]=I,u[n+1]=N,u[n+2]=C,n+=d;else for(let e=0;e<h;++e){if(b(3*a[e]),R){const e=I*I+N*N+C*C;if(e<x&&e>S){const t=1/Math.sqrt(e);I*=t,N*=t,C*=t}}for(let e=0;e<s;++e)u[n]=I,u[n+1]=N,u[n+2]=C,n+=d}}function m(e,t,r,i,n=1){const{data:s,indices:o}=e,a=r.typedBuffer,c=r.typedBufferStride,l=o.length;if(i*=c,t!==s.length||4!==t)if(1!==n)if(4!==t)for(let e=0;e<l;++e){const t=3*o[e];for(let e=0;e<n;++e)a[i]=s[t],a[i+1]=s[t+1],a[i+2]=s[t+2],a[i+3]=255,i+=c}else for(let e=0;e<l;++e){const t=4*o[e];for(let e=0;e<n;++e)a[i]=s[t],a[i+1]=s[t+1],a[i+2]=s[t+2],a[i+3]=s[t+3],i+=c}else{if(4===t){for(let e=0;e<l;++e){const t=4*o[e];a[i]=s[t],a[i+1]=s[t+1],a[i+2]=s[t+2],a[i+3]=s[t+3],i+=c}return}for(let e=0;e<l;++e){const t=3*o[e];a[i]=s[t],a[i+1]=s[t+1],a[i+2]=s[t+2],a[i+3]=255,i+=c}}else{a[i]=s[0],a[i+1]=s[1],a[i+2]=s[2],a[i+3]=s[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=c/4,o=e[i/=4];i+=t;const u=l*n;for(let r=1;r<u;++r)e[i]=o,i+=t}}function f(e,t,r,i,n=1){const s=t.typedBuffer,o=t.typedBufferStride;if(i*=o,1===n)for(let t=0;t<r;++t)s[i]=e[0],s[i+1]=e[1],s[i+2]=e[2],s[i+3]=e[3],i+=o;else for(let t=0;t<r;++t)for(let t=0;t<n;++t)s[i]=e[0],s[i+1]=e[1],s[i+2]=e[2],s[i+3]=e[3],i+=o}function p(e,t,r,i,s,a,c){for(const l of r.fields.keys()){const r=e.get(l),u=r?.indices;if(r&&u)g(l,r,i,s,a,c);else if(l===o.r.OBJECTANDLAYERIDCOLOR&&null!=t){const r=e.get(o.r.POSITION)?.indices;if(r){const e=r.length;f(t,a.getField(l,n.XP),e,c)}}}}function g(e,t,r,a,l,d){switch(e){case o.r.POSITION:{(0,s.vA)(3===t.size);const i=l.getField(e,n.xs);(0,s.vA)(!!i,`No buffer view for ${e}`),i&&h(t,r,i,d);break}case o.r.NORMAL:{(0,s.vA)(3===t.size);const r=l.getField(e,n.xs);(0,s.vA)(!!r,`No buffer view for ${e}`),r&&_(t,a,r,d);break}case o.r.NORMALCOMPRESSED:{(0,s.vA)(2===t.size);const r=l.getField(e,n.mJ);(0,s.vA)(!!r,`No buffer view for ${e}`),r&&c(t,r,d);break}case o.r.UV0:{(0,s.vA)(2===t.size);const r=l.getField(e,n.gH);(0,s.vA)(!!r,`No buffer view for ${e}`),r&&c(t,r,d);break}case o.r.COLOR:case o.r.SYMBOLCOLOR:{const r=l.getField(e,n.XP);(0,s.vA)(!!r,`No buffer view for ${e}`),(0,s.vA)(3===t.size||4===t.size),!r||3!==t.size&&4!==t.size||m(t,t.size,r,d);break}case o.r.COLORFEATUREATTRIBUTE:{const r=l.getField(e,n.Y$);(0,s.vA)(!!r,`No buffer view for ${e}`),(0,s.vA)(1===t.size),r&&1===t.size&&function(e,t,r){const{data:i,indices:n}=e,s=t.typedBuffer,o=t.typedBufferStride,a=n.length,c=i[0];r*=o;for(let e=0;e<a;++e)s[r]=c,r+=o}(t,r,d);break}case o.r.TANGENT:{(0,s.vA)(4===t.size);const o=l.getField(e,n.Eq);(0,s.vA)(!!o,`No buffer view for ${e}`),o&&function(e,t,r,n,s=1){if(!t)return void u(e,r,n,s);const{data:o,indices:a}=e,c=t,l=r.typedBuffer,d=r.typedBufferStride,h=a.length,_=c[0],m=c[1],f=c[2],p=c[4],g=c[5],v=c[6],T=c[8],E=c[9],A=c[10],R=!(0,i.ut)(c),S=1e-6,x=1-S;if(n*=d,1===s)for(let e=0;e<h;++e){const t=4*a[e],r=o[t],i=o[t+1],s=o[t+2],c=o[t+3];let u=_*r+p*i+T*s,h=m*r+g*i+E*s,I=f*r+v*i+A*s;if(R){const e=u*u+h*h+I*I;if(e<x&&e>S){const t=1/Math.sqrt(e);u*=t,h*=t,I*=t}}l[n]=u,l[n+1]=h,l[n+2]=I,l[n+3]=c,n+=d}else for(let e=0;e<h;++e){const t=4*a[e],r=o[t],i=o[t+1],c=o[t+2],u=o[t+3];let h=_*r+p*i+T*c,I=m*r+g*i+E*c,N=f*r+v*i+A*c;if(R){const e=h*h+I*I+N*N;if(e<x&&e>S){const t=1/Math.sqrt(e);h*=t,I*=t,N*=t}}for(let e=0;e<s;++e)l[n]=h,l[n+1]=I,l[n+2]=N,l[n+3]=u,n+=d}}(t,r,o,d);break}case o.r.PROFILERIGHT:case o.r.PROFILEUP:case o.r.PROFILEVERTEXANDNORMAL:case o.r.FEATUREVALUE:{(0,s.vA)(4===t.size);const r=l.getField(e,n.Eq);(0,s.vA)(!!r,`No buffer view for ${e}`),r&&u(t,r,d)}}}},36421:(e,t,r)=>{var i;r.d(t,{p:()=>i}),function(e){e[e.Texture=0]="Texture",e[e.RenderBuffer=1]="RenderBuffer"}(i||(i={}))},21231:(e,t,r)=>{r.d(t,{g:()=>l});var i=r(49186),n=(r(44208),r(94656)),s=r(63907),o=r(36421),a=r(67171);class c extends a.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case s.H0.R16F:case s.H0.R16I:case s.H0.R16UI:case s.H0.R32F:case s.H0.R32I:case s.H0.R32UI:case s.H0.R8_SNORM:case s.H0.R8:case s.H0.R8I:case s.H0.R8UI:this.pixelFormat=s.Ab.RED}}static validate(e,t){return new c(e,t)}}let l=class e{constructor(e,t=null,r=null){if(this.type=o.p.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=t;else{const r=c.validate(e,t);if(!r)throw new i.A("Texture descriptor invalid");this._descriptor=r}this._descriptor.target===s.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return(0,a.e)(this._descriptor)}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}dispose(){this._glName&&this._descriptor.context.instanceCounter.decrement(s.vt.Texture,this),this._descriptor.context.gl&&this._glName&&(this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}resize(e,t){const r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new i.A("Immutable textures can't be resized!");r.width=e,r.height=t,this._descriptor.target===s.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}_setDataCubeMap(e=null){for(let t=s.Ap.TEXTURE_CUBE_MAP_POSITIVE_X;t<=s.Ap.TEXTURE_CUBE_MAP_NEGATIVE_Z;t++)this._setData(e,t)}setData(e){this._setData(e)}_setData(t,r){if(!this._descriptor.context?.gl)return;const o=this._descriptor.context.gl;(0,n.Y2)(o),this._glName||(this._glName=o.createTexture(),this._glName&&this._descriptor.context.instanceCounter.increment(s.vt.Texture,this)),void 0===t&&(t=null);const a=this._descriptor,c=r??a.target,l=f(c);null===t&&(a.width=a.width||4,a.height=a.height||4,l&&(a.depth=a.depth??1));const g=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),u(a),this._configurePixelStorage(),(0,n.Y2)(o);const v=this._deriveInternalFormat();if(m(t)){let e="width"in t?t.width:t.codedWidth,r="height"in t?t.height:t.codedHeight;const i=1;t instanceof HTMLVideoElement&&(e=t.videoWidth,r=t.videoHeight),a.width&&a.height,l&&a.depth,a.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(c,v,a.hasMipmap,e,r,i),this._texImage(c,0,v,e,r,i,t),(0,n.Y2)(o),a.hasMipmap&&this.generateMipmap(),a.width||(a.width=e),a.height||(a.height=r),l&&!a.depth&&(a.depth=i)}else{const{width:e,height:r,depth:u}=a;if(null==e||null==r)throw new i.A("Width and height must be specified!");if(l&&null==u)throw new i.A("Depth must be specified!");if(a.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(c,v,a.hasMipmap,e,r,u),_(t)){const n=t.levels,l=p(c,e,r,u),d=Math.min(l-1,n.length-1);o.texParameteri(a.target,this._descriptor.context.gl.TEXTURE_MAX_LEVEL,d);const h=v;if(!(h in s.CQ))throw new i.A("Attempting to use compressed data with an uncompressed format!");this._forEachMipmapLevel(((e,t,r,i)=>{const s=n[Math.min(e,n.length-1)];this._compressedTexImage(c,e,h,t,r,i,s)}),d)}else this._texImage(c,0,v,e,r,u,t),(0,n.Y2)(o),a.hasMipmap&&this.generateMipmap()}d(o,this._descriptor),h(o,this._descriptor),function(e,t){const r=e.capabilities.textureFilterAnisotropic;r&&e.gl.texParameterf(t.target,r.TEXTURE_MAX_ANISOTROPY,t.maxAnisotropy??1)}(this._descriptor.context,this._descriptor),(0,n.Y2)(o),this._descriptor.context.bindTexture(g,e.TEXTURE_UNIT_FOR_UPDATES)}updateData(t,r,n,s,o,a,c=0){a||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const l=this._descriptor,u=this._deriveInternalFormat(),{context:d,pixelFormat:h,dataType:f,target:p,isImmutable:g}=l;if(g&&!this._wasImmutablyAllocated)throw new i.A("Cannot update immutable texture before allocation!");const v=d.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES,!0);(r<0||n<0||r+s>l.width||n+o>l.height)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:T}=d;c&&T.pixelStorei(T.UNPACK_SKIP_ROWS,c),m(a)?T.texSubImage2D(p,t,r,n,s,o,h,f,a):_(a)?T.compressedTexSubImage2D(p,t,r,n,s,o,u,a.levels[t]):T.texSubImage2D(p,t,r,n,s,o,h,f,a),c&&T.pixelStorei(T.UNPACK_SKIP_ROWS,0),d.bindTexture(v,e.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(t,r,n,s,o,a,c,l){l||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const u=this._descriptor,d=this._deriveInternalFormat(),{context:h,pixelFormat:m,dataType:p,isImmutable:g,target:v}=u;if(g&&!this._wasImmutablyAllocated)throw new i.A("Cannot update immutable texture before allocation!");f(v)||console.warn("Attempting to set 3D texture data on a non-3D texture");const T=h.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);h.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),(r<0||n<0||s<0||r+o>u.width||n+a>u.height||s+c>u.depth)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:E}=h;if(_(l))l=l.levels[t],E.compressedTexSubImage3D(v,t,r,n,s,o,a,c,d,l);else{const e=l;E.texSubImage3D(v,t,r,n,s,o,a,c,m,p,e)}h.bindTexture(T,e.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const t=this._descriptor;if(!t.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("Cannot add mipmaps to immutable texture after allocation");t.hasMipmap=!0,this._samplingModeDirty=!0,u(t)}t.samplingMode===s.Cj.LINEAR?(this._samplingModeDirty=!0,t.samplingMode=s.Cj.LINEAR_MIPMAP_NEAREST):t.samplingMode===s.Cj.NEAREST&&(this._samplingModeDirty=!0,t.samplingMode=s.Cj.NEAREST_MIPMAP_NEAREST);const r=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(t.target),this._descriptor.context.bindTexture(r,e.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,u(e)}e.samplingMode===s.Cj.LINEAR_MIPMAP_NEAREST?(this._samplingModeDirty=!0,e.samplingMode=s.Cj.LINEAR):e.samplingMode===s.Cj.NEAREST_MIPMAP_NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=s.Cj.NEAREST)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,u(this._descriptor),this._wrapModeDirty=!0)}applyChanges(){const e=this._descriptor,t=e.context.gl;this._samplingModeDirty&&(d(t,e),this._samplingModeDirty=!1),this._wrapModeDirty&&(h(t,e),this._wrapModeDirty=!1)}_deriveInternalFormat(){if(null!=this._descriptor.internalFormat)return this._descriptor.internalFormat===s.Ab.DEPTH_STENCIL&&(this._descriptor.internalFormat=s.Ab.DEPTH24_STENCIL8),this._descriptor.internalFormat;switch(this._descriptor.dataType){case s.ld.FLOAT:switch(this._descriptor.pixelFormat){case s.Ab.RGBA:return this._descriptor.internalFormat=s.H0.RGBA32F;case s.Ab.RGB:return this._descriptor.internalFormat=s.H0.RGB32F;default:throw new i.A("Unable to derive format")}case s.ld.UNSIGNED_BYTE:switch(this._descriptor.pixelFormat){case s.Ab.RGBA:return this._descriptor.internalFormat=s.H0.RGBA8;case s.Ab.RGB:return this._descriptor.internalFormat=s.H0.RGB8}}return this._descriptor.internalFormat=this._descriptor.pixelFormat===s.Ab.DEPTH_STENCIL?s.Ab.DEPTH24_STENCIL8:this._descriptor.pixelFormat}_configurePixelStorage(){const e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:i}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r?1:0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i?1:0)}_texStorage(e,t,r,n,o,a){const{gl:c}=this._descriptor.context;if(!(t in s.H0))throw new i.A("Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const l=r?p(e,n,o,a):1;if(f(e)){if(null==a)throw new i.A("Missing depth dimension for 3D texture upload");c.texStorage3D(e,l,t,n,o,a)}else c.texStorage2D(e,l,t,n,o);this._wasImmutablyAllocated=!0}_texImage(e,t,r,n,s,o,a){const c=this._descriptor.context.gl,l=f(e),{isImmutable:u,pixelFormat:d,dataType:h}=this._descriptor;if(u){if(null!=a){const r=a;if(l){if(null==o)throw new i.A("Missing depth dimension for 3D texture upload");c.texSubImage3D(e,t,0,0,0,n,s,o,d,h,r)}else c.texSubImage2D(e,t,0,0,n,s,d,h,r)}}else{const u=a;if(l){if(null==o)throw new i.A("Missing depth dimension for 3D texture upload");c.texImage3D(e,t,r,n,s,o,0,d,h,u)}else c.texImage2D(e,t,r,n,s,0,d,h,u)}}_compressedTexImage(e,t,r,n,s,o,a){const c=this._descriptor.context.gl,l=f(e);if(this._descriptor.isImmutable){if(null!=a)if(l){if(null==o)throw new i.A("Missing depth dimension for 3D texture upload");c.compressedTexSubImage3D(e,t,0,0,0,n,s,o,r,a)}else c.compressedTexSubImage2D(e,t,0,0,n,s,r,a)}else if(l){if(null==o)throw new i.A("Missing depth dimension for 3D texture upload");c.compressedTexImage3D(e,t,r,n,s,o,0,a)}else c.compressedTexImage2D(e,t,r,n,s,0,a)}_forEachMipmapLevel(e,t=1/0){let{width:r,height:n,depth:o,hasMipmap:a,target:c}=this._descriptor;const l=c===s.Ap.TEXTURE_3D;if(null==r||null==n||l&&null==o)throw new i.A("Missing texture dimensions for mipmap calculation");for(let i=0;e(i,r,n,o),a&&(1!==r||1!==n||l&&1!==o)&&!(i>=t);++i)r=Math.max(1,r>>1),n=Math.max(1,n>>1),l&&(o=Math.max(1,o>>1))}};function u(e){(null!=e.width&&e.width<0||null!=e.height&&e.height<0||null!=e.depth&&e.depth<0)&&console.error("Negative dimension parameters are not allowed!")}function d(e,t){let r=t.samplingMode,i=t.samplingMode;r===s.Cj.LINEAR_MIPMAP_NEAREST||r===s.Cj.LINEAR_MIPMAP_LINEAR?(r=s.Cj.LINEAR,t.hasMipmap||(i=s.Cj.LINEAR)):r!==s.Cj.NEAREST_MIPMAP_NEAREST&&r!==s.Cj.NEAREST_MIPMAP_LINEAR||(r=s.Cj.NEAREST,t.hasMipmap||(i=s.Cj.NEAREST)),e.texParameteri(t.target,e.TEXTURE_MAG_FILTER,r),e.texParameteri(t.target,e.TEXTURE_MIN_FILTER,i)}function h(e,t){"number"==typeof t.wrapMode?(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode)):(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode.s),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode.t))}function _(e){return null!=e&&"type"in e&&"compressed"===e.type}function m(e){return null!=e&&!_(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function f(e){return e===s.Ap.TEXTURE_3D||e===s.Ap.TEXTURE_2D_ARRAY}function p(e,t,r,i=1){let n=Math.max(t,r);return e===s.Ap.TEXTURE_3D&&(n=Math.max(n,i)),Math.round(Math.log(n)/Math.LN2)+1}l.TEXTURE_UNIT_FOR_UPDATES=0},67171:(e,t,r)=>{r.d(t,{R:()=>s,e:()=>o});var i=r(63907),n=r(42293);class s{constructor(e=0,t=e){this.width=e,this.height=t,this.target=i.Ap.TEXTURE_2D,this.pixelFormat=i.Ab.RGBA,this.dataType=i.ld.UNSIGNED_BYTE,this.samplingMode=i.Cj.LINEAR,this.wrapMode=i.pF.REPEAT,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.depth=1,this.isImmutable=!1}}function o(e){return e.width<=0||e.height<=0?0:Math.round(e.width*e.height*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,n.IB)(e.internalFormat)))}},42293:(e,t,r)=>{r.d(t,{IB:()=>n}),r(44208),r(94656);var i=r(63907);function n(e){switch(e){case i.Ab.ALPHA:case i.Ab.LUMINANCE:case i.Ab.RED:case i.Ab.RED_INTEGER:case i.H0.R8:case i.H0.R8I:case i.H0.R8UI:case i.H0.R8_SNORM:case i.yQ.STENCIL_INDEX8:return 1;case i.Ab.LUMINANCE_ALPHA:case i.Ab.RG:case i.Ab.RG_INTEGER:case i.H0.RGBA4:case i.H0.R16F:case i.H0.R16I:case i.H0.R16UI:case i.H0.RG8:case i.H0.RG8I:case i.H0.RG8UI:case i.H0.RG8_SNORM:case i.H0.RGB565:case i.H0.RGB5_A1:case i.yQ.DEPTH_COMPONENT16:return 2;case i.Ab.DEPTH_COMPONENT:case i.Ab.RGB:case i.Ab.RGB_INTEGER:case i.H0.RGB8:case i.H0.RGB8I:case i.H0.RGB8UI:case i.H0.RGB8_SNORM:case i.H0.SRGB8:case i.yQ.DEPTH_COMPONENT24:return 3;case i.Ab.DEPTH_STENCIL:case i.Ab.DEPTH24_STENCIL8:case i.Ab.RGBA:case i.Ab.RGBA_INTEGER:case i.H0.RGBA8:case i.H0.R32F:case i.H0.R11F_G11F_B10F:case i.H0.RG16F:case i.H0.R32I:case i.H0.R32UI:case i.H0.RG16I:case i.H0.RG16UI:case i.H0.RGBA8I:case i.H0.RGBA8UI:case i.H0.RGBA8_SNORM:case i.H0.SRGB8_ALPHA8:case i.H0.RGB9_E5:case i.H0.RGB10_A2UI:case i.H0.RGB10_A2:case i.yQ.DEPTH_STENCIL:case i.yQ.DEPTH_COMPONENT32F:case i.yQ.DEPTH24_STENCIL8:return 4;case i.yQ.DEPTH32F_STENCIL8:return 5;case i.H0.RGB16F:case i.H0.RGB16I:case i.H0.RGB16UI:return 6;case i.H0.RG32F:case i.H0.RG32I:case i.H0.RG32UI:case i.H0.RGBA16F:case i.H0.RGBA16I:case i.H0.RGBA16UI:return 8;case i.H0.RGB32F:case i.H0.RGB32I:case i.H0.RGB32UI:return 12;case i.H0.RGBA32F:case i.H0.RGBA32I:case i.H0.RGBA32UI:return 16;case i.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case i.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case i.CQ.COMPRESSED_R11_EAC:case i.CQ.COMPRESSED_SIGNED_R11_EAC:case i.CQ.COMPRESSED_RGB8_ETC2:case i.CQ.COMPRESSED_SRGB8_ETC2:case i.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case i.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case i.CQ.COMPRESSED_RG11_EAC:case i.CQ.COMPRESSED_SIGNED_RG11_EAC:case i.CQ.COMPRESSED_RGBA8_ETC2_EAC:case i.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}r(62298)},94656:(e,t,r)=>{r.d(t,{Xc:()=>l,Y2:()=>u,en:()=>c});var i=r(49186),n=r(44208),s=r(53966);const o=()=>s.A.getLogger("esri.views.webgl.checkWebGLError"),a=!!(0,n.A)("enable-feature:webgl-debug");function c(){return a}function l(){return a}function u(e){if(c()){const t=e.getError();if(t){const r=function(e,t){switch(t){case e.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case e.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case e.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case e.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case e.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case e.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}(e,t),n=(new Error).stack;o().error(new i.A("webgl-error","WebGL error occurred",{message:r,stack:n}))}}}},28449:(e,t,r)=>{function i(e,t){const r=e.length;for(let i=0;i<r;++i)s[0]=e[i],t[i]=s[0];return t}function n(e,t){const r=e.length;for(let i=0;i<r;++i)s[0]=e[i],s[1]=e[i]-s[0],t[i]=s[1];return t}r.d(t,{Zo:()=>i,jA:()=>n});const s=new Float32Array(2)},62298:(e,t,r)=>{r(63907)},90644:(e,t,r)=>{r.d(t,{Ey:()=>A,Xt:()=>l,kn:()=>u,ox:()=>s,p3:()=>o,wE:()=>d});var i=r(89192),n=r(63907);function s(e,t,r=n.Tb.ADD,i=[0,0,0,0]){return{srcRgb:e,srcAlpha:e,dstRgb:t,dstAlpha:t,opRgb:r,opAlpha:r,color:{r:i[0],g:i[1],b:i[2],a:i[3]}}}function o(e,t,r,i,s=n.Tb.ADD,o=n.Tb.ADD,a=[0,0,0,0]){return{srcRgb:e,srcAlpha:t,dstRgb:r,dstAlpha:i,opRgb:s,opAlpha:o,color:{r:a[0],g:a[1],b:a[2],a:a[3]}}}const a={face:n.Y7.BACK,mode:n.Ac.CCW},c={face:n.Y7.FRONT,mode:n.Ac.CCW},l=e=>e===i.s2.Back?a:e===i.s2.Front?c:null,u={zNear:0,zFar:1},d={r:!0,g:!0,b:!0,a:!0};function h(e){return x.intern(e)}function _(e){return N.intern(e)}function m(e){return b.intern(e)}function f(e){return M.intern(e)}function p(e){return D.intern(e)}function g(e){return L.intern(e)}function v(e){return H.intern(e)}function T(e){return U.intern(e)}function E(e){return G.intern(e)}function A(e){return W.intern(e)}class R{constructor(e,t){this._makeKey=e,this._makeRef=t,this._interns=new Map}intern(e){if(!e)return null;const t=this._makeKey(e),r=this._interns;return r.has(t)||r.set(t,this._makeRef(e)),r.get(t)??null}}function S(e){return"["+e.join(",")+"]"}const x=new R(I,(e=>({__tag:"Blending",...e})));function I(e){return e?S([e.srcRgb,e.srcAlpha,e.dstRgb,e.dstAlpha,e.opRgb,e.opAlpha,e.color.r,e.color.g,e.color.b,e.color.a]):null}const N=new R(C,(e=>({__tag:"Culling",...e})));function C(e){return e?S([e.face,e.mode]):null}const b=new R(O,(e=>({__tag:"PolygonOffset",...e})));function O(e){return e?S([e.factor,e.units]):null}const M=new R(w,(e=>({__tag:"DepthTest",...e})));function w(e){return e?S([e.func]):null}const D=new R(P,(e=>({__tag:"StencilTest",...e})));function P(e){return e?S([e.function.func,e.function.ref,e.function.mask,e.operation.fail,e.operation.zFail,e.operation.zPass]):null}const L=new R(y,(e=>({__tag:"DepthWrite",...e})));function y(e){return e?S([e.zNear,e.zFar]):null}const H=new R(F,(e=>({__tag:"ColorWrite",...e})));function F(e){return e?S([e.r,e.g,e.b,e.a]):null}const U=new R(B,(e=>({__tag:"StencilWrite",...e})));function B(e){return e?S([e.mask]):null}const G=new R(V,(e=>({__tag:"DrawBuffers",...e})));function V(e){return e?S(e.buffers):null}const W=new R((function(e){return e?S([I(e.blending),C(e.culling),O(e.polygonOffset),w(e.depthTest),P(e.stencilTest),y(e.depthWrite),F(e.colorWrite),B(e.stencilWrite),V(e.drawBuffers)]):null}),(e=>({blending:h(e.blending),culling:_(e.culling),polygonOffset:m(e.polygonOffset),depthTest:f(e.depthTest),stencilTest:p(e.stencilTest),depthWrite:g(e.depthWrite),colorWrite:v(e.colorWrite),stencilWrite:T(e.stencilWrite),drawBuffers:E(e.drawBuffers)})))}}]);
|
|
278
|
+
}`)}function c(e){e.uniforms.add(new s.t("screenSizePerspective",(e=>u(e.screenSizePerspective))))}function l(e){e.uniforms.add(new s.t("screenSizePerspectiveAlignment",(e=>u(e.screenSizePerspectiveAlignment||e.screenSizePerspective))))}function u(e){return(0,i.s)(d,e.parameters.divisor,e.parameters.offset,e.minScaleFactor)}const d=(0,n.vt)()},20693:(e,t,r)=>{r.d(t,{yu:()=>_,Nz:()=>T,NB:()=>f,S7:()=>v});var i=r(58083),n=r(9093),s=r(38954),o=r(51850),a=r(40710),c=r(33079),l=r(20304),u=r(39589),d=r(46263);class h extends u.n{constructor(e,t){super(e,"mat4",d.c.Draw,((r,i,n)=>r.setUniformMatrix4fv(e,t(i,n))))}}var m=r(40095);function _(e,t){t.instancedDoublePrecision?e.constants.add("cameraPosition","vec3",o.uY):e.uniforms.add(new a.W("cameraPosition",((e,t)=>(0,s.s)(g,t.camera.viewInverseTransposeMatrix[3]-e.origin[0],t.camera.viewInverseTransposeMatrix[7]-e.origin[1],t.camera.viewInverseTransposeMatrix[11]-e.origin[2]))))}function f(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)(p,t.camera.viewMatrix,e.origin))),new a.W("localOrigin",(e=>e.origin)));const r=e=>(0,s.s)(g,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)(p,t.camera.viewMatrix,r(t)))),new c.t("localOrigin",((e,t)=>r(t))))}const p=(0,n.vt)(),g=(0,o.vt)();function v(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:()=>s});var i=r(39589),n=r(46263);class s extends i.n{constructor(e,t){super(e,"bool",n.c.Pass,((r,i,n)=>r.setUniform1b(e,t(i,n))))}}},47286:(e,t,r)=>{r.d(t,{G:()=>s});var i=r(39589),n=r(46263);class s extends i.n{constructor(e,t){super(e,"vec2",n.c.Pass,((r,i,n)=>r.setUniform2fv(e,t(i,n))))}}},71988:(e,t,r)=>{r.d(t,{E:()=>s});var i=r(39589),n=r(46263);class s extends i.n{constructor(e,t){super(e,"vec4",n.c.Pass,((r,i,n)=>r.setUniform4fv(e,t(i,n))))}}},93588:(e,t,r)=>{r.d(t,{c:()=>s});var i=r(39589),n=r(46263);class s extends i.n{constructor(e,t){super(e,"int",n.c.Pass,((r,i,n)=>r.setUniform1i(e,t(i,n))))}}},85977:(e,t,r)=>{r.d(t,{N5:()=>c});var i=r(49186),n=(r(44208),r(53966)),s=r(46263),o=r(620);class a{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 a{constructor(){super(...arguments),this.vertex=new h,this.fragment=new h,this.attributes=new m,this.varyings=new _,this.extensions=new f,this.outputs=new p}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),n="vertex"===e?this.vertex:this.fragment,s=n.uniforms.generateSource(),o=n.code.generateSource(),a=n.main.generateSource(),c="vertex"===e?T:v,l=n.constants.generateSource(),u=this.outputs.generateSource(e);return`#version 300 es\n${t.join("\n")}\n\n${c}\n\n${l.join("\n")}\n\n${s.join("\n")}\n\n${r.join("\n")}\n\n${i.join("\n")}\n\n${u.join("\n")}\n\n${o.join("\n")}\n\n${a.join("\n")}`}generateBindPass(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[s.c.Pass];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[s.c.Pass];r&&t.set(e.name,r)}));const r=Array.from(t.values()),i=r.length;return(t,n)=>{for(let s=0;s<i;++s)r[s](e,t,n)}}generateBindDraw(e){const t=new Map;this.vertex.uniforms.entries.forEach((e=>{const r=e.bind[s.c.Draw];r&&t.set(e.name,r)})),this.fragment.uniforms.entries.forEach((e=>{const r=e.bind[s.c.Draw];r&&t.set(e.name,r)}));const r=Array.from(t.values()),i=r.length;return(t,n,s)=>{for(let o=0;o<i;++o)r[o](e,s,t,n)}}}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 n.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 u{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 d{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 a{constructor(){super(...arguments),this.uniforms=new l(this),this.main=new u(this),this.code=new d(this),this.constants=new g(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 _{constructor(){this._entries=new Map}add(e,t){this._entries.has(e)&&(0,o.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 f{constructor(){this._entries=new Set}add(e){this._entries.add(e)}generateSource(e){const t="vertex"===e?f.ALLOWLIST_VERTEX:f.ALLOWLIST_FRAGMENT;return Array.from(this._entries).filter((e=>t.includes(e))).map((e=>`#extension ${e} : enable`))}}f.ALLOWLIST_FRAGMENT=["GL_EXT_shader_texture_lod","GL_OES_standard_derivatives"],f.ALLOWLIST_VERTEX=[];class p{constructor(){this._entries=new Map}add(e,t,r=0){const i=this._entries.get(r);i?(0,o.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:p.DEFAULT_NAME,type:p.DEFAULT_TYPE});const t=new Array;return this._entries.forEach(((e,r)=>t.push(`layout(location = ${r}) out ${e.type} ${e.name};`))),t}}p.DEFAULT_TYPE="vec4",p.DEFAULT_NAME="fragColor";class g{constructor(e){this._stage=e,this._entries=new Set}add(e,t,r){let i="ERROR_CONSTRUCTOR_STRING";switch(t){case"float":i=g._numberToFloatStr(r);break;case"int":i=g._numberToIntStr(r);break;case"bool":i=r.toString();break;case"vec2":i=`vec2(${g._numberToFloatStr(r[0])}, ${g._numberToFloatStr(r[1])})`;break;case"vec3":i=`vec3(${g._numberToFloatStr(r[0])}, ${g._numberToFloatStr(r[1])}, ${g._numberToFloatStr(r[2])})`;break;case"vec4":i=`vec4(${g._numberToFloatStr(r[0])}, ${g._numberToFloatStr(r[1])}, ${g._numberToFloatStr(r[2])}, ${g._numberToFloatStr(r[3])})`;break;case"ivec2":i=`ivec2(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])})`;break;case"ivec3":i=`ivec3(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])}, ${g._numberToIntStr(r[2])})`;break;case"ivec4":i=`ivec4(${g._numberToIntStr(r[0])}, ${g._numberToIntStr(r[1])}, ${g._numberToIntStr(r[2])}, ${g._numberToIntStr(r[3])})`;break;case"mat2":case"mat3":case"mat4":i=`${t}(${Array.prototype.map.call(r,(e=>g._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 v="#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:()=>s});var i=r(39589),n=r(46263);class s extends i.n{constructor(e,t){super(e,"sampler2D",n.c.Pass,((r,i,n)=>r.bindTexture(e,t(i,n))))}}},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:()=>s});var i=r(97768),n=r(63907);class s{constructor(e,t,r){this.release=r,this._configuration=t.snapshot(),this._program=this.initializeProgram(e),this._pipeline=this.initializePipeline(e)}destroy(){this._program=(0,i.WD)(this._program),this._pipeline=null}reload(e){(0,i.WD)(this._program),this._program=this.initializeProgram(e),this._pipeline=this.initializePipeline(e)}get program(){return this._program}get compiled(){return this.program.compiled}get key(){return this._configuration.key}get configuration(){return this._configuration}ensureAttributeLocations(e){this.program.assertCompatibleVertexAttributeLocations(e)}get primitiveType(){return n.WR.TRIANGLES}getPipeline(e,t=null){return this._pipeline}}},99769:(e,t,r)=>{r.d(t,{K:()=>s,W:()=>o});var i=r(49186),n=r(2597);class s extends n.Y{constructor(){super(),this._key="",this._keyDirty=!1,this._parameterBits=this._parameterBits?.map((()=>0))??[],this._parameterNames??=[],this._parameterValues=this._parameterValues?.slice()??[]}get key(){return this._keyDirty&&(this._keyDirty=!1,this._key=String.fromCharCode.apply(String,this._parameterBits)),this._key}snapshot(){const e=this._parameterNames,t={key:this.key};for(const r of e)t[r]=this[r];return t}}function o(e={}){return(t,r)=>{if(t.hasOwnProperty("_parameterNames")||Object.defineProperty(t,"_parameterNames",{value:t._parameterNames?.slice()??[],configurable:!0,writable:!0}),t._parameterNames.push(r),null!=e.constValue)Object.defineProperty(t,r,{get:()=>e.constValue});else{const n=t._parameterNames.length-1,s=e.count||2,o=Math.ceil(Math.log2(s));t.hasOwnProperty("_parameterBits")||Object.defineProperty(t,"_parameterBits",{value:t._parameterBits?.slice()??[0],configurable:!0,writable:!0}),t.hasOwnProperty("_parameterValues")||Object.defineProperty(t,"_parameterValues",{value:t._parameterValues?.slice()??[],configurable:!0,writable:!0});const a=t._parameterBits;let c=0;for(;a[c]+o>16;)c++,c>=a.length&&a.push(0);const l=a[c],u=(1<<o)-1<<l;a[c]+=o,Object.defineProperty(t,r,{get(){return this._parameterValues[n]},set(t){if(this._parameterValues[n]!==t)if(this._parameterValues[n]=t,this._keyDirty=!0,this._parameterBits[c]=this._parameterBits[c]&~u|+t<<l&u,"number"==typeof t){if(null==e.count)throw new i.A(`Configuration value for ${r} must provide a count option`)}else if("boolean"!=typeof t)throw new i.A(`Configuration value for ${r} must be boolean or number, got ${typeof t}`)}})}}}},69720:(e,t,r)=>{r.d(t,{J:()=>n});var i=r(24326);class n{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:()=>n});var i=r(46540);const n=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:()=>u});var i=r(97768),n=r(74887),s=r(2597),o=r(89192);class a{constructor(e){this._material=e.material,this._techniques=e.techniques,this._output=e.output}dispose(){this._techniques.release(this._technique)}get technique(){return this._technique}get _stippleTextures(){return this._techniques.constructionContext.stippleTextures}get _markerTextures(){return this._techniques.constructionContext.markerTextures}ensureTechnique(e,t){return this._technique=this._techniques.releaseAndAcquire(e,this._material.getConfiguration(this._output,t),this._technique),this._technique}ensureResources(e){return o.Am.LOADED}}class c extends a{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(){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?o.Am.LOADED:o.Am.LOADING}get textureBindParameters(){return new u(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,n.$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 s.Y{constructor(e=null){super(),this.textureEmissive=e}}class u extends l{constructor(e=null,t=null,r=null,i=null,n=null,s,o){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=i,this.textureMetallicRoughness=n,this.scale=s,this.normalTextureTransformMatrix=o}}},14903:(e,t,r)=>{r.d(t,{im:()=>h,m$:()=>i});var i,n,s=r(51850),o=r(2597),a=r(89192),c=r(69720),l=r(96672),u=r(39341),d=r(43616);class h extends c.J{constructor(e,t){super(),this.type=l.X.Material,this.supportsEdges=!1,this._renderPriority=0,this._vertexAttributeLocations=u.D,this._pp0=(0,s.fA)(0,0,1),this._pp1=(0,s.fA)(0,0,0),this._parameters=new t,(0,d.MB)(this._parameters,e),this.validateParameters(this._parameters)}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,d.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.bindParameters.decorations===a.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,n,s){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,n)}}(n=i||(i={}))[n.None=0]="None",n[n.Occlude=1]="Occlude",n[n.Transparent=2]="Transparent",n[n.OccludeAndTransparent=4]="OccludeAndTransparent",n[n.OccludeAndTransparentStencil=8]="OccludeAndTransparentStencil",n[n.Opaque=16]="Opaque",o.Y},33524:(e,t,r)=>{r.d(t,{K_:()=>_,Yf:()=>u,aB:()=>m,ez:()=>l,m6:()=>f,xt:()=>d});var i=r(49255),n=r(14327),s=r(63907),o=r(90644);const a=(0,o.p3)(s.dn.SRC_ALPHA,s.dn.ONE,s.dn.ONE_MINUS_SRC_ALPHA,s.dn.ONE_MINUS_SRC_ALPHA),c=(0,o.p3)(s.dn.ONE,s.dn.ZERO,s.dn.ONE,s.dn.ONE_MINUS_SRC_ALPHA);function l(e){return e===n.y.FrontFace?null:c}function u(e){switch(e){case n.y.NONE:return a;case n.y.ColorAlpha:return c;case n.y.FrontFace:case n.y.COUNT:return null}}const d=5e5,h={factor:-1,units:-2};function m(e){return e?h:null}function _(e,t=s.MT.LESS){return e===n.y.NONE||e===n.y.FrontFace?t:s.MT.LEQUAL}function f(e,t){const r=t===i.V.ColorEmission;return e===n.y.ColorAlpha?r?{buffers:[s.Nm.COLOR_ATTACHMENT0,s.Nm.COLOR_ATTACHMENT1,s.Nm.COLOR_ATTACHMENT2]}:{buffers:[s.Nm.COLOR_ATTACHMENT0,s.Nm.COLOR_ATTACHMENT1]}:r?{buffers:[s.Nm.COLOR_ATTACHMENT0,s.Nm.COLOR_ATTACHMENT1]}:null}},34886:(e,t,r)=>{r.d(t,{B:()=>s});var i=r(3694),n=r(94656);class s{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,n.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_NO_SSAO_DEPTH=3]="OPAQUE_NO_SSAO_DEPTH",e[e.TRANSPARENT_MATERIAL=4]="TRANSPARENT_MATERIAL",e[e.TRANSPARENT_NO_SSAO_DEPTH=5]="TRANSPARENT_NO_SSAO_DEPTH",e[e.TRANSPARENT_TERRAIN=6]="TRANSPARENT_TERRAIN",e[e.TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL=7]="TRANSPARENT_DEPTH_WRITE_DISABLED_MATERIAL",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:()=>V}),r(44208);var i=r(49186),n=r(65529),s=r(97768),o=r(74887),a=r(34275),c=r(84952),l=r(99677),u=r(56058),d=r(89192),h=r(2741);let m;var _,f;(f=_||(_={}))[f.ETC1_RGB=0]="ETC1_RGB",f[f.ETC2_RGBA=1]="ETC2_RGBA",f[f.BC1_RGB=2]="BC1_RGB",f[f.BC3_RGBA=3]="BC3_RGBA",f[f.BC4_R=4]="BC4_R",f[f.BC5_RG=5]="BC5_RG",f[f.BC7_M6_RGB=6]="BC7_M6_RGB",f[f.BC7_M5_RGBA=7]="BC7_M5_RGBA",f[f.PVRTC1_4_RGB=8]="PVRTC1_4_RGB",f[f.PVRTC1_4_RGBA=9]="PVRTC1_4_RGBA",f[f.ASTC_4x4_RGBA=10]="ASTC_4x4_RGBA",f[f.ATC_RGB=11]="ATC_RGB",f[f.ATC_RGBA=12]="ATC_RGBA",f[f.FXT1_RGB=17]="FXT1_RGB",f[f.PVRTC2_4_RGB=18]="PVRTC2_4_RGB",f[f.PVRTC2_4_RGBA=19]="PVRTC2_4_RGBA",f[f.ETC2_EAC_R11=20]="ETC2_EAC_R11",f[f.ETC2_EAC_RG11=21]="ETC2_EAC_RG11",f[f.RGBA32=13]="RGBA32",f[f.RGB565=14]="RGB565",f[f.BGR565=15]="BGR565",f[f.RGBA4444=16]="RGBA4444";var p=r(63907),g=r(21231),v=r(42293);let T=null,E=null;async function A(){return null==E&&(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})(),E=m,T=await E),E}function R(e,t,r,i,n){const s=(0,v.IB)(t?p.CQ.COMPRESSED_RGBA8_ETC2_EAC:p.CQ.COMPRESSED_RGB8_ETC2),o=n&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*s*o)}function S(e){return e.getNumImages()>=1&&!e.isUASTC()}function x(e){return e.getFaces()>=1&&e.isETC1S()}function I(e,t,r,i,n,s,o,a){const{compressedTextureETC:c,compressedTextureS3TC:l}=e.capabilities,[u,d]=c?i?[_.ETC2_RGBA,p.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[_.ETC1_RGB,p.CQ.COMPRESSED_RGB8_ETC2]:l?i?[_.BC3_RGBA,p.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[_.BC1_RGB,p.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[_.RGBA32,p.Ab.RGBA],h=t.hasMipmap?r:Math.min(1,r),m=[];for(let e=0;e<h;e++)m.push(new Uint8Array(o(e,u))),a(e,u,m[e]);return t.internalFormat=d,t.hasMipmap=m.length>1,t.samplingMode=t.hasMipmap?p.Cj.LINEAR_MIPMAP_LINEAR:p.Cj.LINEAR,t.width=n,t.height=s,new g.g(e,t,{type:"compressed",levels:m})}var N=r(69720),C=r(96672),b=r(53966);const O=()=>b.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function M(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const w=M("DXT1"),D=M("DXT3"),P=M("DXT5");function L(e,t){const r=new Int32Array(e,0,31);if(542327876!==r[0])return O().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return O().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let n,s;switch(i){case w:n=8,s=p.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case D:n=16,s=p.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case P:n=16,s=p.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return O().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let o=1,a=r[4],c=r[3];(3&a||3&c)&&(O().warn("Rounding up compressed texture size to nearest multiple of 4."),a=a+3&-4,c=c+3&-4);const l=a,u=c;let d,h;131072&r[2]&&!1!==t&&(o=Math.max(1,r[7]));let m=r[1]+4;const _=[];for(let t=0;t<o;++t)h=(a+3>>2)*(c+3>>2)*n,d=new Uint8Array(e,m,h),_.push(d),m+=h,a=Math.max(1,a>>1),c=Math.max(1,c>>1);return{textureData:{type:"compressed",levels:_},internalFormat:s,width:l,height:u}}function y(e,t,r){if(e instanceof ImageData)return y(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 F,U,B=r(620),G=r(67171);class V extends N.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 n.A,this._parameters={...z,...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 G.R;return t.wrapMode=this._parameters.wrap??p.pF.REPEAT,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?p.Cj.LINEAR_MIPMAP_LINEAR:p.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,a.mw)(e)||(0,a.mg)(e))return t.encoding===d.JS.KTX2_ENCODING?function(e,t){if(null==T)return e.byteLength;const r=new T.KTX2File(new Uint8Array(e)),i=x(r)?R(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):t.encoding===d.JS.BASIS_ENCODING?function(e,t){if(null==T)return e.byteLength;const r=new T.BasisFile(new Uint8Array(e)),i=S(r)?R(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?W(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 g.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,a.mw)(t)||(0,a.mg)(t))&&this._parameters.encoding===d.JS.DDS_ENCODING?this._loadFromDDSData(e,t):((0,a.mw)(t)||(0,a.mg)(t))&&this._parameters.encoding===d.JS.KTX2_ENCODING?this._loadFromKTX2(e,t):((0,a.mw)(t)||(0,a.mg)(t))&&this._parameters.encoding===d.JS.BASIS_ENCODING?this._loadFromBasis(e,t):(0,a.mg)(t)?this._loadFromPixelData(e,t):(0,a.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:n,internalFormat:s,width:o,height:a}=i;return t.samplingMode=n.levels.length>1?p.Cj.LINEAR_MIPMAP_LINEAR:p.Cj.LINEAR,t.hasMipmap=n.levels.length>1,t.internalFormat=s,t.width=o,t.height=a,new g.g(e,t,n)}(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(!x(i))return null;i.startTranscoding();const n=I(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(),n}(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(!S(i))return null;i.startTranscoding();const n=I(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(),n}(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?p.Ab.LUMINANCE:3===this._parameters.components?p.Ab.RGB:p.Ab.RGBA,r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._glTexture=new g.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,o.Te)(r),this._loadFromImage(e,i)}))}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync((async r=>{const i=await(0,u.Sx)(t,t.src,!1,r);return(0,o.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(((n,a)=>{const c=()=>{t.removeEventListener("loadeddata",l),t.removeEventListener("error",u),(0,s.xt)(d)},l=()=>{t.readyState>=F.HAVE_CURRENT_DATA&&(c(),n(this._loadFromImage(e,t)))},u=e=>{c(),a(e||new i.A("Failed to load video"))};t.addEventListener("loadeddata",l),t.addEventListener("error",u);const d=(0,o.u7)(r,(()=>u((0,o.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,n=e.height;do{i=Math.ceil(i/2),n=Math.ceil(n/2),r=i*n}while(r>1048576||null!=t&&(i>t||n>t));return y(e,i,n)}(r,t):function(e,t){const r=Math.max(e.width,e.height);if(r<=t)return e;const i=t/r;return y(e,Math.round(e.width*i),Math.round(e.height*i))}(r,t)}const i=W(r);this._parameters.width=i.width,this._parameters.height=i.height;const n=this._createDescriptor(e);return n.pixelFormat=3===this._parameters.components?p.Ab.RGB:p.Ab.RGBA,n.width=i.width,n.height=i.height,this._glTexture=new g.g(e,n,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,s.WD)(this._glTexture),null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}}function W(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}(U=F||(F={}))[U.HAVE_NOTHING=0]="HAVE_NOTHING",U[U.HAVE_METADATA=1]="HAVE_METADATA",U[U.HAVE_CURRENT_DATA=2]="HAVE_CURRENT_DATA",U[U.HAVE_FUTURE_DATA=3]="HAVE_FUTURE_DATA",U[U.HAVE_ENOUGH_DATA=4]="HAVE_ENOUGH_DATA";const z={wrap:{s:p.pF.REPEAT,t:p.pF.REPEAT},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1,downsampleUncompressed:!1}},14327:(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={}))},89192:(e,t,r)=>{var i,n,s,o,a,c,l,u,d;r.d(t,{Am:()=>o,C7:()=>s,ID:()=>u,JS:()=>d,Mg:()=>c,dd:()=>a,it:()=>n,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"}(n||(n={})),function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.UPDATE=1]="UPDATE"}(s||(s={})),function(e){e[e.NOT_LOADED=0]="NOT_LOADED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED"}(o||(o={})),function(e){e[e.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",e[e.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(a||(a={})),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"}(u||(u={})),function(e){e.DDS_ENCODING="image/vnd-ms.dds",e.KTX2_ENCODING="image/ktx2",e.BASIS_ENCODING="image/x.basis"}(d||(d={}))},30669:(e,t,r)=>{r.d(t,{MD:()=>q,m0:()=>j,cJ:()=>$,hs:()=>Y});var i=r(34727),n=(r(44208),r(53966)),s=r(4341),o=r(58083),a=r(9093),c=r(38954),l=r(51850),u=r(19419),d=r(88582),h=r(11964),m=r(240),_=r(71351),f=r(44280),p=r(32114);const g=()=>n.A.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function v(e=H){return{plane:(0,m.vt)(e.plane),origin:(0,l.o8)(e.origin),basis1:(0,l.o8)(e.basis1),basis2:(0,l.o8)(e.basis2)}}function T(e,t=v()){return E(e.origin,e.basis1,e.basis2,t)}function E(e,t,r,i=v()){return(0,c.c)(i.origin,e),(0,c.c)(i.basis1,t),(0,c.c)(i.basis2,r),A(i),function(e,t){Math.abs((0,c.m)(e.basis1,e.basis2)/((0,c.l)(e.basis1)*(0,c.l)(e.basis2)))>1e-6&&g().warn(t,"Provided basis vectors are not perpendicular"),Math.abs((0,c.m)(e.basis1,w(e)))>1e-6&&g().warn(t,"Basis vectors and plane normal are not perpendicular"),Math.abs(-(0,c.m)(w(e),e.origin)-e.plane[3])>1e-6&&g().warn(t,"Plane offset is not consistent with plane origin")}(i,"fromValues()"),i}function A(e){(0,m.mR)(e.basis2,e.basis1,e.origin,e.plane)}function R(e,t,r){e!==r&&T(e,r);const i=(0,c.j)(p.rq.get(),w(e),t);return(0,c.g)(r.origin,r.origin,i),r.plane[3]-=t,r}function S(e,t=v()){const r=(e[2]-e[0])/2,i=(e[3]-e[1])/2;return(0,c.s)(t.origin,e[0]+r,e[1]+i,0),(0,c.s)(t.basis1,r,0,0),(0,c.s)(t.basis2,0,i,0),(0,m.fA)(0,0,1,0,t.plane),t}function x(e,t,r){return!!(0,m.Ui)(e.plane,t,r)&&D(e,r)}function I(e,t,r){const n=F.get();y(e,t,n,F.get());let s=Number.POSITIVE_INFINITY;for(const o of V){const a=L(e,o,U.get()),l=p.rq.get();if((0,m.T7)(n,a,l)){const e=(0,c.E)(p.rq.get(),t.origin,l),n=Math.abs((0,i.XM)((0,c.m)(t.direction,e)));n<s&&(s=n,(0,c.c)(r,l))}}return s===Number.POSITIVE_INFINITY?N(e,t,r):r}function N(e,t,r){if(x(e,t,r))return r;const i=F.get(),n=F.get();y(e,t,i,n);let s=Number.POSITIVE_INFINITY;for(const o of V){const a=L(e,o,U.get()),l=p.rq.get();if((0,m.gv)(i,a,l)){const e=(0,_.kb)(t,l);if(!(0,m.Tj)(n,l))continue;e<s&&(s=e,(0,c.c)(r,l))}}return O(e,t.origin)<s&&C(e,t.origin,r),r}function C(e,t,r){const i=(0,m._I)(e.plane,t,p.rq.get()),n=(0,h.H6)(P(e,e.basis1),i,-1,1,p.rq.get()),s=(0,h.H6)(P(e,e.basis2),i,-1,1,p.rq.get());return(0,c.f)(r,(0,c.g)(p.rq.get(),n,s),e.origin),r}function b(e,t,r){const{origin:i,basis1:n,basis2:s}=e,o=(0,c.f)(p.rq.get(),t,i),a=(0,f.gr)(n,o),l=(0,f.gr)(s,o),u=(0,f.gr)(w(e),o);return(0,c.s)(r,a,l,u)}function O(e,t){const r=b(e,t,p.rq.get()),{basis1:i,basis2:n}=e,s=(0,c.l)(i),o=(0,c.l)(n),a=Math.max(Math.abs(r[0])-s,0),l=Math.max(Math.abs(r[1])-o,0),u=r[2];return a*a+l*l+u*u}function M(e,t){const r=-e.plane[3];return(0,f.gr)(w(e),t)-r}function w(e){return(0,m.Qj)(e.plane)}function D(e,t){const r=(0,c.f)(p.rq.get(),t,e.origin),i=(0,c.q)(e.basis1),n=(0,c.q)(e.basis2),s=(0,c.m)(e.basis1,r),o=(0,c.m)(e.basis2,r);return-s-i<0&&s-i<0&&-o-n<0&&o-n<0}function P(e,t){const r=U.get();return(0,c.c)(r.origin,e.origin),(0,c.c)(r.vector,t),r}function L(e,t,r){const{basis1:i,basis2:n,origin:s}=e,o=(0,c.j)(p.rq.get(),i,t.origin[0]),a=(0,c.j)(p.rq.get(),n,t.origin[1]);(0,c.g)(r.origin,o,a),(0,c.g)(r.origin,r.origin,s);const l=(0,c.j)(p.rq.get(),i,t.direction[0]),u=(0,c.j)(p.rq.get(),n,t.direction[1]);return(0,c.j)(r.vector,(0,c.g)(l,l,u),2),r}function y(e,t,r,i){const n=w(e);(0,m.mR)(n,t.direction,t.origin,r),(0,m.mR)((0,m.Qj)(r),n,t.origin,i)}const H={plane:(0,m.vt)(),origin:(0,l.fA)(0,0,0),basis1:(0,l.fA)(1,0,0),basis2:(0,l.fA)(0,1,0)},F=new s.I(m.vt),U=new s.I(h.vt),B=(0,l.vt)(),G=new s.I((()=>v())),V=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],W=(0,a.vt)(),z=(0,a.vt)();Object.freeze(Object.defineProperty({__proto__:null,BoundedPlaneClass:class{constructor(){this.plane=(0,m.vt)(),this.origin=(0,l.vt)(),this.basis1=(0,l.vt)(),this.basis2=(0,l.vt)()}},altitudeAt:M,axisAt:function(e,t,r,i){return function(e,t,r){switch(t){case d._.X:(0,c.c)(r,e.basis1),(0,c.n)(r,r);break;case d._.Y:(0,c.c)(r,e.basis2),(0,c.n)(r,r);break;case d._.Z:(0,c.c)(r,w(e))}return r}(e,r,i)},cameraFrustumCoverage:function(e,t){return(t-e)/t},closestPoint:N,closestPointOnSilhouette:I,copy:T,copyWithoutVerify:function(e,t){(0,c.c)(t.origin,e.origin),(0,c.c)(t.basis1,e.basis1),(0,c.c)(t.basis2,e.basis2),(0,m.C)(t.plane,e.plane)},create:v,distance:function(e,t){return Math.sqrt(O(e,t))},distance2:O,distanceToSilhouette:function(e,t){let r=Number.NEGATIVE_INFINITY;for(const i of V){const n=L(e,i,U.get()),s=(0,h.kb)(n,t);s>r&&(r=s)}return Math.sqrt(r)},elevate:R,equals:function(e,t){return(0,c.e)(e.basis1,t.basis1)&&(0,c.e)(e.basis2,t.basis2)&&(0,c.e)(e.origin,t.origin)},extrusionContainsPoint:function(e,t){return(0,m.Tj)(e.plane,t)&&D(e,t)},fromAABoundingRect:S,fromValues:E,getExtent:function(e,t){const r=e.basis1[0],i=e.basis2[1],[n,s]=e.origin;return(0,u.fA)(n-r,s-i,n+i,s+i,t)},intersectRay:x,intersectRayClosestSilhouette:function(e,t,r){if(x(e,t,r))return r;const i=I(e,t,p.rq.get());return(0,c.g)(r,t.origin,(0,c.j)(p.rq.get(),t.direction,(0,c.p)(t.origin,i)/(0,c.l)(t.direction))),r},normal:w,projectPoint:C,projectPointLocal:b,rotate:function(e,t,r,i){return e!==i&&T(e,i),(0,o.$0)(z,t,r),(0,c.h)(i.basis1,e.basis1,z),(0,c.h)(i.basis2,e.basis2,z),A(i),i},setAltitudeAt:function(e,t,r,i){const n=M(e,t),s=(0,c.j)(B,w(e),r-n);return(0,c.g)(i,t,s),i},setExtent:function(e,t,r){return S(t,r),R(r,M(e,e.origin),r),r},transform:function(e,t,r){return e!==r&&T(e,r),(0,o.B8)(W,t),(0,o.mg)(W,W),(0,c.h)(r.basis1,e.basis1,W),(0,c.h)(r.basis2,e.basis2,W),(0,c.h)((0,m.Qj)(r.plane),(0,m.Qj)(e.plane),W),(0,c.h)(r.origin,e.origin,t),(0,m.mP)(r.plane,r.plane,r.origin),r},up:H,updateUnboundedPlane:A,wrap:function(e,t,r){const i=G.get();return i.origin=e,i.basis1=t,i.basis2=r,i.plane=(0,m.LV)(0,0,0,0),A(i),i}},Symbol.toStringTag,{value:"Module"}));var X=r(76412);function k(e,t,r){const i=r.parameters;return Q.scale=Math.min(i.divisor/(t-i.offset),1),Q.factor=function(e){return Math.abs(e*e*e)}(e),Q}function j(e,t){return(0,i.Cc)(e*Math.max(t.scale,t.minScaleFactor),e,t.factor)}function $(e,t,r,i){i.scale=function(e,t,r){const i=k(e,t,r);return i.minScaleFactor=0,j(1,i)}(e,t,r),i.factor=0,i.minScaleFactor=r.minScaleFactor}function q(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 Y(e,t,r,i){return j(e,k(t,r,i))}r(24151),(0,i.kU)(10),(0,i.kU)(12),(0,i.kU)(70),(0,i.kU)(40);const Q={scale:0,factor:0,minScaleFactor:0};(0,X.c)()},99550:(e,t,r)=>{r.d(t,{E:()=>a});var i=r(90237),n=r(82991),s=r(46263),o=r(99769);class a extends n.nW{}(0,i._)([(0,o.W)({constValue:!0})],a.prototype,"hasSliceHighlight",void 0),(0,i._)([(0,o.W)({constValue:!1})],a.prototype,"hasSliceInVertexProgram",void 0),(0,i._)([(0,o.W)({constValue:s.c.Pass})],a.prototype,"bindType",void 0)},43616:(e,t,r)=>{r.d(t,{MB:()=>a,Um:()=>c,kE:()=>o});var i=r(4576),n=r(34727),s=r(30669);function o(e,t,r,i,o){let a=(r.screenLength||0)*e.pixelRatio;null!=o&&(a=(0,s.hs)(a,i,t,o));const c=a*Math.tan(.5*e.fovY)/(.5*e.fullHeight);return(0,n.qE)(c*t,r.minWorldLength||0,null!=r.maxWorldLength?r.maxWorldLength:1/0)}function a(e,t){let r=!1;for(const n in t){const s=t[n];void 0!==s&&(Array.isArray(s)?Array.isArray(e[n])&&(0,i.aI)(s,e[n])||(e[n]=s.slice(),r=!0):e[n]!==s&&(r=!0,e[n]=s))}return r}const c={multiply:1,ignore:2,replace:3,tint:4}},59907:(e,t,r)=>{r.d(t,{Hk:()=>h,Pq:()=>d,SA:()=>p,Ut:()=>u,p1:()=>m,tH:()=>f,tb:()=>_,uO:()=>a});var i=r(58083),n=r(13030),s=r(620),o=r(46540);function a(e,t,r,i=1){const{data:n,indices:s}=e,o=t.typedBuffer,a=t.typedBufferStride,c=s.length;if(r*=a,1===i)for(let e=0;e<c;++e)o[r]=n[s[e]],r+=a;else for(let e=0;e<c;++e){const t=n[s[e]];for(let e=0;e<i;e++)o[r]=t,r+=a}}function c(e,t,r){const{data:i,indices:n}=e,s=t.typedBuffer,o=t.typedBufferStride,a=n.length;r*=o;for(let e=0;e<a;++e){const t=2*n[e];s[r]=i[t],s[r+1]=i[t+1],r+=o}}function l(e,t,r,i){const{data:n,indices:s}=e,o=t.typedBuffer,a=t.typedBufferStride,c=s.length;if(r*=a,null==i||1===i)for(let e=0;e<c;++e){const t=3*s[e];o[r]=n[t],o[r+1]=n[t+1],o[r+2]=n[t+2],r+=a}else for(let e=0;e<c;++e){const t=3*s[e];for(let e=0;e<i;++e)o[r]=n[t],o[r+1]=n[t+1],o[r+2]=n[t+2],r+=a}}function u(e,t,r,i=1){const{data:n,indices:s}=e,o=t.typedBuffer,a=t.typedBufferStride,c=s.length;if(r*=a,1===i)for(let e=0;e<c;++e){const t=4*s[e];o[r]=n[t],o[r+1]=n[t+1],o[r+2]=n[t+2],o[r+3]=n[t+3],r+=a}else for(let e=0;e<c;++e){const t=4*s[e];for(let e=0;e<i;++e)o[r]=n[t],o[r+1]=n[t+1],o[r+2]=n[t+2],o[r+3]=n[t+3],r+=a}}function d(e,t,r){const i=e.typedBuffer,n=e.typedBufferStride;t*=n;for(let e=0;e<r;++e)i[t]=0,i[t+1]=0,i[t+2]=0,i[t+3]=0,t+=n}function h(e,t,r,n,s=1){if(!t)return void l(e,r,n,s);const{data:o,indices:a}=e,c=r.typedBuffer,u=r.typedBufferStride,d=a.length,h=t[0],m=t[1],_=t[2],f=t[4],p=t[5],g=t[6],v=t[8],T=t[9],E=t[10],A=t[12],R=t[13],S=t[14];n*=u;let x=0,I=0,N=0;const C=(0,i.tZ)(t)?e=>{x=o[e]+A,I=o[e+1]+R,N=o[e+2]+S}:e=>{const t=o[e],r=o[e+1],i=o[e+2];x=h*t+f*r+v*i+A,I=m*t+p*r+T*i+R,N=_*t+g*r+E*i+S};if(1===s)for(let e=0;e<d;++e)C(3*a[e]),c[n]=x,c[n+1]=I,c[n+2]=N,n+=u;else for(let e=0;e<d;++e){C(3*a[e]);for(let e=0;e<s;++e)c[n]=x,c[n+1]=I,c[n+2]=N,n+=u}}function m(e,t,r,n,s=1){if(!t)return void l(e,r,n,s);const{data:o,indices:a}=e,c=t,u=r.typedBuffer,d=r.typedBufferStride,h=a.length,m=c[0],_=c[1],f=c[2],p=c[4],g=c[5],v=c[6],T=c[8],E=c[9],A=c[10],R=!(0,i.ut)(c),S=1e-6,x=1-S;n*=d;let I=0,N=0,C=0;const b=(0,i.tZ)(c)?e=>{I=o[e],N=o[e+1],C=o[e+2]}:e=>{const t=o[e],r=o[e+1],i=o[e+2];I=m*t+p*r+T*i,N=_*t+g*r+E*i,C=f*t+v*r+A*i};if(1===s)if(R)for(let e=0;e<h;++e){b(3*a[e]);const t=I*I+N*N+C*C;if(t<x&&t>S){const e=1/Math.sqrt(t);u[n]=I*e,u[n+1]=N*e,u[n+2]=C*e}else u[n]=I,u[n+1]=N,u[n+2]=C;n+=d}else for(let e=0;e<h;++e)b(3*a[e]),u[n]=I,u[n+1]=N,u[n+2]=C,n+=d;else for(let e=0;e<h;++e){if(b(3*a[e]),R){const e=I*I+N*N+C*C;if(e<x&&e>S){const t=1/Math.sqrt(e);I*=t,N*=t,C*=t}}for(let e=0;e<s;++e)u[n]=I,u[n+1]=N,u[n+2]=C,n+=d}}function _(e,t,r,i,n=1){const{data:s,indices:o}=e,a=r.typedBuffer,c=r.typedBufferStride,l=o.length;if(i*=c,t!==s.length||4!==t)if(1!==n)if(4!==t)for(let e=0;e<l;++e){const t=3*o[e];for(let e=0;e<n;++e)a[i]=s[t],a[i+1]=s[t+1],a[i+2]=s[t+2],a[i+3]=255,i+=c}else for(let e=0;e<l;++e){const t=4*o[e];for(let e=0;e<n;++e)a[i]=s[t],a[i+1]=s[t+1],a[i+2]=s[t+2],a[i+3]=s[t+3],i+=c}else{if(4===t){for(let e=0;e<l;++e){const t=4*o[e];a[i]=s[t],a[i+1]=s[t+1],a[i+2]=s[t+2],a[i+3]=s[t+3],i+=c}return}for(let e=0;e<l;++e){const t=3*o[e];a[i]=s[t],a[i+1]=s[t+1],a[i+2]=s[t+2],a[i+3]=255,i+=c}}else{a[i]=s[0],a[i+1]=s[1],a[i+2]=s[2],a[i+3]=s[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=c/4,o=e[i/=4];i+=t;const u=l*n;for(let r=1;r<u;++r)e[i]=o,i+=t}}function f(e,t,r,i,n=1){const s=t.typedBuffer,o=t.typedBufferStride;if(i*=o,1===n)for(let t=0;t<r;++t)s[i]=e[0],s[i+1]=e[1],s[i+2]=e[2],s[i+3]=e[3],i+=o;else for(let t=0;t<r;++t)for(let t=0;t<n;++t)s[i]=e[0],s[i+1]=e[1],s[i+2]=e[2],s[i+3]=e[3],i+=o}function p(e,t,r,i,s,a,c){for(const l of r.fields.keys()){const r=e.get(l),u=r?.indices;if(r&&u)g(l,r,i,s,a,c);else if(l===o.r.OBJECTANDLAYERIDCOLOR&&null!=t){const r=e.get(o.r.POSITION)?.indices;if(r){const e=r.length;f(t,a.getField(l,n.XP),e,c)}}}}function g(e,t,r,a,l,d){switch(e){case o.r.POSITION:{(0,s.vA)(3===t.size);const i=l.getField(e,n.xs);(0,s.vA)(!!i,`No buffer view for ${e}`),i&&h(t,r,i,d);break}case o.r.NORMAL:{(0,s.vA)(3===t.size);const r=l.getField(e,n.xs);(0,s.vA)(!!r,`No buffer view for ${e}`),r&&m(t,a,r,d);break}case o.r.NORMALCOMPRESSED:{(0,s.vA)(2===t.size);const r=l.getField(e,n.mJ);(0,s.vA)(!!r,`No buffer view for ${e}`),r&&c(t,r,d);break}case o.r.UV0:{(0,s.vA)(2===t.size);const r=l.getField(e,n.gH);(0,s.vA)(!!r,`No buffer view for ${e}`),r&&c(t,r,d);break}case o.r.COLOR:case o.r.SYMBOLCOLOR:{const r=l.getField(e,n.XP);(0,s.vA)(!!r,`No buffer view for ${e}`),(0,s.vA)(3===t.size||4===t.size),!r||3!==t.size&&4!==t.size||_(t,t.size,r,d);break}case o.r.COLORFEATUREATTRIBUTE:{const r=l.getField(e,n.Y$);(0,s.vA)(!!r,`No buffer view for ${e}`),(0,s.vA)(1===t.size),r&&1===t.size&&function(e,t,r){const{data:i,indices:n}=e,s=t.typedBuffer,o=t.typedBufferStride,a=n.length,c=i[0];r*=o;for(let e=0;e<a;++e)s[r]=c,r+=o}(t,r,d);break}case o.r.TANGENT:{(0,s.vA)(4===t.size);const o=l.getField(e,n.Eq);(0,s.vA)(!!o,`No buffer view for ${e}`),o&&function(e,t,r,n,s=1){if(!t)return void u(e,r,n,s);const{data:o,indices:a}=e,c=t,l=r.typedBuffer,d=r.typedBufferStride,h=a.length,m=c[0],_=c[1],f=c[2],p=c[4],g=c[5],v=c[6],T=c[8],E=c[9],A=c[10],R=!(0,i.ut)(c),S=1e-6,x=1-S;if(n*=d,1===s)for(let e=0;e<h;++e){const t=4*a[e],r=o[t],i=o[t+1],s=o[t+2],c=o[t+3];let u=m*r+p*i+T*s,h=_*r+g*i+E*s,I=f*r+v*i+A*s;if(R){const e=u*u+h*h+I*I;if(e<x&&e>S){const t=1/Math.sqrt(e);u*=t,h*=t,I*=t}}l[n]=u,l[n+1]=h,l[n+2]=I,l[n+3]=c,n+=d}else for(let e=0;e<h;++e){const t=4*a[e],r=o[t],i=o[t+1],c=o[t+2],u=o[t+3];let h=m*r+p*i+T*c,I=_*r+g*i+E*c,N=f*r+v*i+A*c;if(R){const e=h*h+I*I+N*N;if(e<x&&e>S){const t=1/Math.sqrt(e);h*=t,I*=t,N*=t}}for(let e=0;e<s;++e)l[n]=h,l[n+1]=I,l[n+2]=N,l[n+3]=u,n+=d}}(t,r,o,d);break}case o.r.PROFILERIGHT:case o.r.PROFILEUP:case o.r.PROFILEVERTEXANDNORMAL:case o.r.FEATUREVALUE:{(0,s.vA)(4===t.size);const r=l.getField(e,n.Eq);(0,s.vA)(!!r,`No buffer view for ${e}`),r&&u(t,r,d)}}}},36421:(e,t,r)=>{var i;r.d(t,{p:()=>i}),function(e){e[e.Texture=0]="Texture",e[e.RenderBuffer=1]="RenderBuffer"}(i||(i={}))},21231:(e,t,r)=>{r.d(t,{g:()=>l});var i=r(49186),n=(r(44208),r(94656)),s=r(63907),o=r(36421),a=r(67171);class c extends a.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case s.H0.R16F:case s.H0.R16I:case s.H0.R16UI:case s.H0.R32F:case s.H0.R32I:case s.H0.R32UI:case s.H0.R8_SNORM:case s.H0.R8:case s.H0.R8I:case s.H0.R8UI:this.pixelFormat=s.Ab.RED}}static validate(e,t){return new c(e,t)}}let l=class e{constructor(e,t=null,r=null){if(this.type=o.p.Texture,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=t;else{const r=c.validate(e,t);if(!r)throw new i.A("Texture descriptor invalid");this._descriptor=r}this._descriptor.target===s.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return(0,a.e)(this._descriptor)}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty}dispose(){this._glName&&this._descriptor.context.instanceCounter.decrement(s.vt.Texture,this),this._descriptor.context.gl&&this._glName&&(this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}resize(e,t){const r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new i.A("Immutable textures can't be resized!");r.width=e,r.height=t,this._descriptor.target===s.Ap.TEXTURE_CUBE_MAP?this._setDataCubeMap(null):this.setData(null)}}_setDataCubeMap(e=null){for(let t=s.Ap.TEXTURE_CUBE_MAP_POSITIVE_X;t<=s.Ap.TEXTURE_CUBE_MAP_NEGATIVE_Z;t++)this._setData(e,t)}setData(e){this._setData(e)}_setData(t,r){if(!this._descriptor.context?.gl)return;const o=this._descriptor.context.gl;(0,n.Y2)(o),this._glName||(this._glName=o.createTexture(),this._glName&&this._descriptor.context.instanceCounter.increment(s.vt.Texture,this)),void 0===t&&(t=null);const a=this._descriptor,c=r??a.target,l=f(c);null===t&&(a.width=a.width||4,a.height=a.height||4,l&&(a.depth=a.depth??1));const g=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),u(a),this._configurePixelStorage(),(0,n.Y2)(o);const v=this._deriveInternalFormat();if(_(t)){let e="width"in t?t.width:t.codedWidth,r="height"in t?t.height:t.codedHeight;const i=1;t instanceof HTMLVideoElement&&(e=t.videoWidth,r=t.videoHeight),a.width&&a.height,l&&a.depth,a.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(c,v,a.hasMipmap,e,r,i),this._texImage(c,0,v,e,r,i,t),(0,n.Y2)(o),a.hasMipmap&&this.generateMipmap(),a.width||(a.width=e),a.height||(a.height=r),l&&!a.depth&&(a.depth=i)}else{const{width:e,height:r,depth:u}=a;if(null==e||null==r)throw new i.A("Width and height must be specified!");if(l&&null==u)throw new i.A("Depth must be specified!");if(a.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(c,v,a.hasMipmap,e,r,u),m(t)){const n=t.levels,l=p(c,e,r,u),d=Math.min(l-1,n.length-1);o.texParameteri(a.target,this._descriptor.context.gl.TEXTURE_MAX_LEVEL,d);const h=v;if(!(h in s.CQ))throw new i.A("Attempting to use compressed data with an uncompressed format!");this._forEachMipmapLevel(((e,t,r,i)=>{const s=n[Math.min(e,n.length-1)];this._compressedTexImage(c,e,h,t,r,i,s)}),d)}else this._texImage(c,0,v,e,r,u,t),(0,n.Y2)(o),a.hasMipmap&&this.generateMipmap()}d(o,this._descriptor),h(o,this._descriptor),function(e,t){const r=e.capabilities.textureFilterAnisotropic;r&&e.gl.texParameterf(t.target,r.TEXTURE_MAX_ANISOTROPY,t.maxAnisotropy??1)}(this._descriptor.context,this._descriptor),(0,n.Y2)(o),this._descriptor.context.bindTexture(g,e.TEXTURE_UNIT_FOR_UPDATES)}updateData(t,r,n,s,o,a,c=0){a||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const l=this._descriptor,u=this._deriveInternalFormat(),{context:d,pixelFormat:h,dataType:f,target:p,isImmutable:g}=l;if(g&&!this._wasImmutablyAllocated)throw new i.A("Cannot update immutable texture before allocation!");const v=d.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES,!0);(r<0||n<0||r+s>l.width||n+o>l.height)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:T}=d;c&&T.pixelStorei(T.UNPACK_SKIP_ROWS,c),_(a)?T.texSubImage2D(p,t,r,n,s,o,h,f,a):m(a)?T.compressedTexSubImage2D(p,t,r,n,s,o,u,a.levels[t]):T.texSubImage2D(p,t,r,n,s,o,h,f,a),c&&T.pixelStorei(T.UNPACK_SKIP_ROWS,0),d.bindTexture(v,e.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(t,r,n,s,o,a,c,l){l||console.error("An attempt to use uninitialized data!"),this._glName||console.error("An attempt to update uninitialized texture!");const u=this._descriptor,d=this._deriveInternalFormat(),{context:h,pixelFormat:_,dataType:p,isImmutable:g,target:v}=u;if(g&&!this._wasImmutablyAllocated)throw new i.A("Cannot update immutable texture before allocation!");f(v)||console.warn("Attempting to set 3D texture data on a non-3D texture");const T=h.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);h.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),(r<0||n<0||s<0||r+o>u.width||n+a>u.height||s+c>u.depth)&&console.error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();const{gl:E}=h;if(m(l))l=l.levels[t],E.compressedTexSubImage3D(v,t,r,n,s,o,a,c,d,l);else{const e=l;E.texSubImage3D(v,t,r,n,s,o,a,c,_,p,e)}h.bindTexture(T,e.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){const t=this._descriptor;if(!t.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("Cannot add mipmaps to immutable texture after allocation");t.hasMipmap=!0,this._samplingModeDirty=!0,u(t)}t.samplingMode===s.Cj.LINEAR?(this._samplingModeDirty=!0,t.samplingMode=s.Cj.LINEAR_MIPMAP_NEAREST):t.samplingMode===s.Cj.NEAREST&&(this._samplingModeDirty=!0,t.samplingMode=s.Cj.NEAREST_MIPMAP_NEAREST);const r=this._descriptor.context.bindTexture(this,e.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(e.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(t.target),this._descriptor.context.bindTexture(r,e.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){const e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,u(e)}e.samplingMode===s.Cj.LINEAR_MIPMAP_NEAREST?(this._samplingModeDirty=!0,e.samplingMode=s.Cj.LINEAR):e.samplingMode===s.Cj.NEAREST_MIPMAP_NEAREST&&(this._samplingModeDirty=!0,e.samplingMode=s.Cj.NEAREST)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,u(this._descriptor),this._wrapModeDirty=!0)}applyChanges(){const e=this._descriptor,t=e.context.gl;this._samplingModeDirty&&(d(t,e),this._samplingModeDirty=!1),this._wrapModeDirty&&(h(t,e),this._wrapModeDirty=!1)}_deriveInternalFormat(){if(null!=this._descriptor.internalFormat)return this._descriptor.internalFormat===s.Ab.DEPTH_STENCIL&&(this._descriptor.internalFormat=s.Ab.DEPTH24_STENCIL8),this._descriptor.internalFormat;switch(this._descriptor.dataType){case s.ld.FLOAT:switch(this._descriptor.pixelFormat){case s.Ab.RGBA:return this._descriptor.internalFormat=s.H0.RGBA32F;case s.Ab.RGB:return this._descriptor.internalFormat=s.H0.RGB32F;default:throw new i.A("Unable to derive format")}case s.ld.UNSIGNED_BYTE:switch(this._descriptor.pixelFormat){case s.Ab.RGBA:return this._descriptor.internalFormat=s.H0.RGBA8;case s.Ab.RGB:return this._descriptor.internalFormat=s.H0.RGB8}}return this._descriptor.internalFormat=this._descriptor.pixelFormat===s.Ab.DEPTH_STENCIL?s.Ab.DEPTH24_STENCIL8:this._descriptor.pixelFormat}_configurePixelStorage(){const e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:i}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,r?1:0),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i?1:0)}_texStorage(e,t,r,n,o,a){const{gl:c}=this._descriptor.context;if(!(t in s.H0))throw new i.A("Immutable textures must have a sized internal format");if(!this._descriptor.isImmutable)return;const l=r?p(e,n,o,a):1;if(f(e)){if(null==a)throw new i.A("Missing depth dimension for 3D texture upload");c.texStorage3D(e,l,t,n,o,a)}else c.texStorage2D(e,l,t,n,o);this._wasImmutablyAllocated=!0}_texImage(e,t,r,n,s,o,a){const c=this._descriptor.context.gl,l=f(e),{isImmutable:u,pixelFormat:d,dataType:h}=this._descriptor;if(u){if(null!=a){const r=a;if(l){if(null==o)throw new i.A("Missing depth dimension for 3D texture upload");c.texSubImage3D(e,t,0,0,0,n,s,o,d,h,r)}else c.texSubImage2D(e,t,0,0,n,s,d,h,r)}}else{const u=a;if(l){if(null==o)throw new i.A("Missing depth dimension for 3D texture upload");c.texImage3D(e,t,r,n,s,o,0,d,h,u)}else c.texImage2D(e,t,r,n,s,0,d,h,u)}}_compressedTexImage(e,t,r,n,s,o,a){const c=this._descriptor.context.gl,l=f(e);if(this._descriptor.isImmutable){if(null!=a)if(l){if(null==o)throw new i.A("Missing depth dimension for 3D texture upload");c.compressedTexSubImage3D(e,t,0,0,0,n,s,o,r,a)}else c.compressedTexSubImage2D(e,t,0,0,n,s,r,a)}else if(l){if(null==o)throw new i.A("Missing depth dimension for 3D texture upload");c.compressedTexImage3D(e,t,r,n,s,o,0,a)}else c.compressedTexImage2D(e,t,r,n,s,0,a)}_forEachMipmapLevel(e,t=1/0){let{width:r,height:n,depth:o,hasMipmap:a,target:c}=this._descriptor;const l=c===s.Ap.TEXTURE_3D;if(null==r||null==n||l&&null==o)throw new i.A("Missing texture dimensions for mipmap calculation");for(let i=0;e(i,r,n,o),a&&(1!==r||1!==n||l&&1!==o)&&!(i>=t);++i)r=Math.max(1,r>>1),n=Math.max(1,n>>1),l&&(o=Math.max(1,o>>1))}};function u(e){(null!=e.width&&e.width<0||null!=e.height&&e.height<0||null!=e.depth&&e.depth<0)&&console.error("Negative dimension parameters are not allowed!")}function d(e,t){let r=t.samplingMode,i=t.samplingMode;r===s.Cj.LINEAR_MIPMAP_NEAREST||r===s.Cj.LINEAR_MIPMAP_LINEAR?(r=s.Cj.LINEAR,t.hasMipmap||(i=s.Cj.LINEAR)):r!==s.Cj.NEAREST_MIPMAP_NEAREST&&r!==s.Cj.NEAREST_MIPMAP_LINEAR||(r=s.Cj.NEAREST,t.hasMipmap||(i=s.Cj.NEAREST)),e.texParameteri(t.target,e.TEXTURE_MAG_FILTER,r),e.texParameteri(t.target,e.TEXTURE_MIN_FILTER,i)}function h(e,t){"number"==typeof t.wrapMode?(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode)):(e.texParameteri(t.target,e.TEXTURE_WRAP_S,t.wrapMode.s),e.texParameteri(t.target,e.TEXTURE_WRAP_T,t.wrapMode.t))}function m(e){return null!=e&&"type"in e&&"compressed"===e.type}function _(e){return null!=e&&!m(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function f(e){return e===s.Ap.TEXTURE_3D||e===s.Ap.TEXTURE_2D_ARRAY}function p(e,t,r,i=1){let n=Math.max(t,r);return e===s.Ap.TEXTURE_3D&&(n=Math.max(n,i)),Math.round(Math.log(n)/Math.LN2)+1}l.TEXTURE_UNIT_FOR_UPDATES=0},67171:(e,t,r)=>{r.d(t,{R:()=>s,e:()=>o});var i=r(63907),n=r(42293);class s{constructor(e=0,t=e){this.width=e,this.height=t,this.target=i.Ap.TEXTURE_2D,this.pixelFormat=i.Ab.RGBA,this.dataType=i.ld.UNSIGNED_BYTE,this.samplingMode=i.Cj.LINEAR,this.wrapMode=i.pF.REPEAT,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.depth=1,this.isImmutable=!1}}function o(e){return e.width<=0||e.height<=0?0:Math.round(e.width*e.height*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,n.IB)(e.internalFormat)))}},42293:(e,t,r)=>{r.d(t,{IB:()=>n}),r(44208),r(94656);var i=r(63907);function n(e){switch(e){case i.Ab.ALPHA:case i.Ab.LUMINANCE:case i.Ab.RED:case i.Ab.RED_INTEGER:case i.H0.R8:case i.H0.R8I:case i.H0.R8UI:case i.H0.R8_SNORM:case i.yQ.STENCIL_INDEX8:return 1;case i.Ab.LUMINANCE_ALPHA:case i.Ab.RG:case i.Ab.RG_INTEGER:case i.H0.RGBA4:case i.H0.R16F:case i.H0.R16I:case i.H0.R16UI:case i.H0.RG8:case i.H0.RG8I:case i.H0.RG8UI:case i.H0.RG8_SNORM:case i.H0.RGB565:case i.H0.RGB5_A1:case i.yQ.DEPTH_COMPONENT16:return 2;case i.Ab.DEPTH_COMPONENT:case i.Ab.RGB:case i.Ab.RGB_INTEGER:case i.H0.RGB8:case i.H0.RGB8I:case i.H0.RGB8UI:case i.H0.RGB8_SNORM:case i.H0.SRGB8:case i.yQ.DEPTH_COMPONENT24:return 3;case i.Ab.DEPTH_STENCIL:case i.Ab.DEPTH24_STENCIL8:case i.Ab.RGBA:case i.Ab.RGBA_INTEGER:case i.H0.RGBA8:case i.H0.R32F:case i.H0.R11F_G11F_B10F:case i.H0.RG16F:case i.H0.R32I:case i.H0.R32UI:case i.H0.RG16I:case i.H0.RG16UI:case i.H0.RGBA8I:case i.H0.RGBA8UI:case i.H0.RGBA8_SNORM:case i.H0.SRGB8_ALPHA8:case i.H0.RGB9_E5:case i.H0.RGB10_A2UI:case i.H0.RGB10_A2:case i.yQ.DEPTH_STENCIL:case i.yQ.DEPTH_COMPONENT32F:case i.yQ.DEPTH24_STENCIL8:return 4;case i.yQ.DEPTH32F_STENCIL8:return 5;case i.H0.RGB16F:case i.H0.RGB16I:case i.H0.RGB16UI:return 6;case i.H0.RG32F:case i.H0.RG32I:case i.H0.RG32UI:case i.H0.RGBA16F:case i.H0.RGBA16I:case i.H0.RGBA16UI:return 8;case i.H0.RGB32F:case i.H0.RGB32I:case i.H0.RGB32UI:return 12;case i.H0.RGBA32F:case i.H0.RGBA32I:case i.H0.RGBA32UI:return 16;case i.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case i.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case i.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case i.CQ.COMPRESSED_R11_EAC:case i.CQ.COMPRESSED_SIGNED_R11_EAC:case i.CQ.COMPRESSED_RGB8_ETC2:case i.CQ.COMPRESSED_SRGB8_ETC2:case i.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case i.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case i.CQ.COMPRESSED_RG11_EAC:case i.CQ.COMPRESSED_SIGNED_RG11_EAC:case i.CQ.COMPRESSED_RGBA8_ETC2_EAC:case i.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}r(62298)},94656:(e,t,r)=>{r.d(t,{Xc:()=>l,Y2:()=>u,en:()=>c});var i=r(49186),n=r(44208),s=r(53966);const o=()=>s.A.getLogger("esri.views.webgl.checkWebGLError"),a=!!(0,n.A)("enable-feature:webgl-debug");function c(){return a}function l(){return a}function u(e){if(c()){const t=e.getError();if(t){const r=function(e,t){switch(t){case e.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case e.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case e.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case e.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case e.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case e.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}(e,t),n=(new Error).stack;o().error(new i.A("webgl-error","WebGL error occurred",{message:r,stack:n}))}}}},28449:(e,t,r)=>{function i(e,t){const r=e.length;for(let i=0;i<r;++i)s[0]=e[i],t[i]=s[0];return t}function n(e,t){const r=e.length;for(let i=0;i<r;++i)s[0]=e[i],s[1]=e[i]-s[0],t[i]=s[1];return t}r.d(t,{Zo:()=>i,jA:()=>n});const s=new Float32Array(2)},62298:(e,t,r)=>{r(63907)},90644:(e,t,r)=>{r.d(t,{Ey:()=>A,Xt:()=>l,kn:()=>u,ox:()=>s,p3:()=>o,wE:()=>d});var i=r(89192),n=r(63907);function s(e,t,r=n.Tb.ADD,i=[0,0,0,0]){return{srcRgb:e,srcAlpha:e,dstRgb:t,dstAlpha:t,opRgb:r,opAlpha:r,color:{r:i[0],g:i[1],b:i[2],a:i[3]}}}function o(e,t,r,i,s=n.Tb.ADD,o=n.Tb.ADD,a=[0,0,0,0]){return{srcRgb:e,srcAlpha:t,dstRgb:r,dstAlpha:i,opRgb:s,opAlpha:o,color:{r:a[0],g:a[1],b:a[2],a:a[3]}}}const a={face:n.Y7.BACK,mode:n.Ac.CCW},c={face:n.Y7.FRONT,mode:n.Ac.CCW},l=e=>e===i.s2.Back?a:e===i.s2.Front?c:null,u={zNear:0,zFar:1},d={r:!0,g:!0,b:!0,a:!0};function h(e){return x.intern(e)}function m(e){return N.intern(e)}function _(e){return b.intern(e)}function f(e){return M.intern(e)}function p(e){return D.intern(e)}function g(e){return L.intern(e)}function v(e){return H.intern(e)}function T(e){return U.intern(e)}function E(e){return G.intern(e)}function A(e){return W.intern(e)}class R{constructor(e,t){this._makeKey=e,this._makeRef=t,this._interns=new Map}intern(e){if(!e)return null;const t=this._makeKey(e),r=this._interns;return r.has(t)||r.set(t,this._makeRef(e)),r.get(t)??null}}function S(e){return"["+e.join(",")+"]"}const x=new R(I,(e=>({__tag:"Blending",...e})));function I(e){return e?S([e.srcRgb,e.srcAlpha,e.dstRgb,e.dstAlpha,e.opRgb,e.opAlpha,e.color.r,e.color.g,e.color.b,e.color.a]):null}const N=new R(C,(e=>({__tag:"Culling",...e})));function C(e){return e?S([e.face,e.mode]):null}const b=new R(O,(e=>({__tag:"PolygonOffset",...e})));function O(e){return e?S([e.factor,e.units]):null}const M=new R(w,(e=>({__tag:"DepthTest",...e})));function w(e){return e?S([e.func]):null}const D=new R(P,(e=>({__tag:"StencilTest",...e})));function P(e){return e?S([e.function.func,e.function.ref,e.function.mask,e.operation.fail,e.operation.zFail,e.operation.zPass]):null}const L=new R(y,(e=>({__tag:"DepthWrite",...e})));function y(e){return e?S([e.zNear,e.zFar]):null}const H=new R(F,(e=>({__tag:"ColorWrite",...e})));function F(e){return e?S([e.r,e.g,e.b,e.a]):null}const U=new R(B,(e=>({__tag:"StencilWrite",...e})));function B(e){return e?S([e.mask]):null}const G=new R(V,(e=>({__tag:"DrawBuffers",...e})));function V(e){return e?S(e.buffers):null}const W=new R((function(e){return e?S([I(e.blending),C(e.culling),O(e.polygonOffset),w(e.depthTest),P(e.stencilTest),y(e.depthWrite),F(e.colorWrite),B(e.stencilWrite),V(e.drawBuffers)]):null}),(e=>({blending:h(e.blending),culling:m(e.culling),polygonOffset:_(e.polygonOffset),depthTest:f(e.depthTest),stencilTest:p(e.stencilTest),depthWrite:g(e.depthWrite),colorWrite:v(e.colorWrite),stencilWrite:T(e.stencilWrite),drawBuffers:E(e.drawBuffers)})))}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3359,5740],{46130:(e,a,t)=>{t.d(a,{v:()=>n});var r=t(76553);function n(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:a,newOrigin:t})=>{(0,r.H)(e)&&t&&e.originOf(a)!==t&&e.updateOrigin(a,t)}))}},76553:(e,a,t)=>{function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}t.d(a,{H:()=>r})},33359:(e,a,t)=>{t.d(a,{save:()=>I,saveAs:()=>O});var r=t(4576),n=(t(49186),t(71530)),i=t(60694),s=t(23154),o=t(83531),l=t(4513),u=t(10407);const d="Feature Service",c="feature-layer-utils",y=`${c}-save`,f=`${c}-save-as`;function p(e){return{isValid:(0,o.W_)(e)&&("feature"!==e.type||!e.dynamicDataSource),errorMessage:"Feature layer should be a layer or table in a map or feature service"}}function m(e){const a=[],t=[];for(const{layer:r,layerJSON:n}of e)r.isTable?t.push(n):a.push(n);return{layers:a,tables:t}}function w(e){return m([e])}async function h(e,a){return/\/\d+\/?$/.test(e.url)?w(a[0]):async function(e,a){if(e.reverse(),!a)return m(e);const t=await async function(e,a){let t=await e.fetchData("json");if(function(e){return!!(e&&Array.isArray(e.layers)&&Array.isArray(e.tables))}(t))return t;t||={},function(e){e.layers||=[],e.tables||=[]}(t);const{layer:{url:r,customParameters:n,apiKey:i}}=a[0];return await async function(e,a,t){const{url:r,customParameters:n,apiKey:i}=a,{serviceJSON:o,layersJSON:u}=await(0,s.Q)(r,{customParameters:n,apiKey:i}),d=P(e.layers,o.layers,t),c=P(e.tables,o.tables,t);e.layers=d.itemResources,e.tables=c.itemResources;const y=[...d.added,...c.added],f=u?[...u.layers,...u.tables]:[];await async function(e,a,t,r){const n=await async function(e){const a=[];e.forEach((({type:e})=>{const t=(0,s.K)(e),r=l.S[t];a.push(r())}));const t=await Promise.all(a),r=new Map;return e.forEach((({type:e},a)=>{r.set(e,t[a])})),r}(a),i=a.map((({id:e,type:a})=>new(n.get(a))({url:t,layerId:e,sourceJSON:r.find((({id:a})=>a===e))})));await Promise.allSettled(i.map((e=>e.load()))),i.forEach((a=>{const{layerId:t,loaded:r,defaultPopupTemplate:n}=a;if(!r||null==n)return;const i={id:t,popupInfo:n.toJSON()};"ArcGISFeatureLayer"!==a.operationalLayerType&&(i.layerType=a.operationalLayerType),v(a,i,e)}))}(e,y,r,f)}(t,{url:r??"",customParameters:n,apiKey:i},a.map((e=>e.layer.layerId))),t}(a,e);for(const a of e)v(a.layer,a.layerJSON,t);return function(e,a){const t=[],r=[];for(const{layer:e}of a){const{isTable:a,layerId:n}=e;a?r.push(n):t.push(n)}b(e.layers,t),b(e.tables,r)}(t,e),t}(a,e)}function b(e,a){if(e.length<2)return;const t=[];for(const{id:a}of e)t.push(a);(0,r.aI)(t.sort(L),a.slice().sort(L))&&e.sort(((e,t)=>{const r=a.indexOf(e.id),n=a.indexOf(t.id);return r<n?-1:r>n?1:0}))}function L(e,a){return e<a?-1:e>a?1:0}function P(e,a,t){const n=(0,r.iv)(e,a,((e,a)=>e.id===a.id));e=e.filter((e=>!n.removed.some((a=>a.id===e.id))));const i=n.added;return i.forEach((({id:a})=>{e.push({id:a})})),{itemResources:e,added:i.filter((({id:e})=>!t.includes(e)))}}function v(e,a,t){e.isTable?S(t.tables,a):S(t.layers,a)}function S(e,a){const t=e.findIndex((({id:e})=>e===a.id));-1===t?e.push(a):e[t]=a}async function g(e,a){const{url:t,layerId:r,title:n,fullExtent:s,isTable:o}=e,l=(0,i.qg)(t);a.url=("FeatureServer"===l?.serverType?t:`${t}/${r}`)??null,a.title||=n,a.extent=null,o||null==s||(a.extent=await(0,u.sQ)(s)),(0,u.OM)(a,u.mm.METADATA),(0,u.OM)(a,u.mm.MULTI_LAYER),(0,u.LG)(a,u.mm.SINGLE_LAYER),o&&(0,u.LG)(a,u.mm.TABLE)}async function I(e,a){return(0,n.UN)({layer:e,itemType:d,validateLayer:p,createItemData:(e,a)=>h(a,[e]),errorNamePrefix:y},a)}async function O(e,a,t){return(0,n.Uh)({layer:e,itemType:d,validateLayer:p,createItemData:(e,a)=>Promise.resolve(w(e)),errorNamePrefix:f,newItem:a,setItemProperties:g},t)}},71530:(e,a,t)=>{t.d(a,{UN:()=>L,Uh:()=>P});var r=t(49186),n=t(46130),i=t(20655),s=t(80812),o=t(88788),l=t(10407),u=t(49864),d=t(26121);async function c(e){const{layer:a,errorNamePrefix:t,validateLayer:n}=e;await a.load(),function(e,a,t){const n=t(e);if(!n.isValid)throw new r.A(`${a}:invalid-parameters`,n.errorMessage,{layer:e})}(a,t,n)}function y(e,a){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${a}`}function f(e){const{item:a,errorNamePrefix:t,layer:n,validateItem:i}=e;if((0,u.X)(a),function(e){const{item:a,itemType:t,additionalItemType:n,errorNamePrefix:i,layer:s}=e,o=[t];if(n&&o.push(n),!o.includes(a.type)){const e=o.map((e=>`'${e}'`)).join(", ");throw new r.A(`${i}:portal-item-wrong-type`,`Portal item type should be one of: "${e}"`,{item:a,layer:s})}}(e),i){const e=i(a);if(!e.isValid)throw new r.A(`${t}:invalid-parameters`,e.errorMessage,{layer:n})}}function p(e){const{layer:a,errorNamePrefix:t}=e,{portalItem:n}=a;if(!n)throw new r.A(`${t}:portal-item-not-set`,y(a,"requires the portalItem property to be set"));if(!n.loaded)throw new r.A(`${t}:portal-item-not-loaded`,y(a,"cannot be saved to a portal item that does not exist or is inaccessible"));f({...e,item:n})}function m(e){const{newItem:a,itemType:t}=e;let r=s.default.from(a);return r.id&&(r=r.clone(),r.id=null),r.type??=t,r.portal??=i.A.getDefault(),f({...e,item:r}),r}function w(e){return(0,o.m)(e,"portal-item")}async function h(e,a,t){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const r=e.write({},a);return await Promise.all(a.resources?.pendingOperations??[]),(0,d.c)(a,{errorName:"layer-write:unsupported"},t),r}function b(e){(0,l.LG)(e,l.mm.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,a,t)=>t.indexOf(e)===a)))}async function L(e,a){const{layer:t,createItemData:r,createJSONContext:i,setItemProperties:s,saveResources:o,supplementalUnsupportedErrors:l}=e;await c(e),p(e);const u=t.portalItem,d=i?i(u):w(u),y=await h(t,d,{...a,supplementalUnsupportedErrors:l}),f=await r({layer:t,layerJSON:y},u);return await(s?.(t,u)),b(u),await u.update({data:f}),(0,n.v)(d),await(o?.(u,d)),u}async function P(e,a){const{layer:t,createItemData:r,createJSONContext:i,setItemProperties:s,saveResources:o,supplementalUnsupportedErrors:l}=e;await c(e);const u=m(e),d=i?i(u):w(u),y=await h(t,d,{...a,supplementalUnsupportedErrors:l}),f=await r({layer:t,layerJSON:y},u);return await s(t,u),b(u),await async function(e,a,t){const r=e.portal;await r.signIn(),await(r.user?.addItem({item:e,data:a,folder:t?.folder}))}(u,f,a),t.portalItem=u,(0,n.v)(d),await(o?.(u,d)),u}},23154:(e,a,t)=>{t.d(a,{K:()=>y,Q:()=>i});var r=t(24183);const n=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function i(e,a){const{loadContext:t,...n}=a||{},i=t?await t.fetchServiceMetadata(e,n):await(0,r.V)(e,n);c(i),l(i);const s={serviceJSON:i};if((i.currentVersion??0)<10.5)return s;const o=`${e}/layers`,u=t?await t.fetchServiceMetadata(o,n):await(0,r.V)(o,n);return c(u),l(u),s.layersJSON={layers:u.layers,tables:u.tables},s}function s(e){const{type:a}=e;return!!a&&n.has(a)}function o(e){return"Table"===e.type}function l(e){e.layers=e.layers?.filter(s),e.tables=e.tables?.filter(o)}function u(e){e.type||="Feature Layer"}function d(e){e.type||="Table"}function c(e){e.layers?.forEach(u),e.tables?.forEach(d)}function y(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},4513:(e,a,t)=>{t.d(a,{S:()=>r});const r={BingMapsLayer:async()=>(await Promise.all([t.e(3161),t.e(7029)]).then(t.bind(t,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(6245),t.e(3600),t.e(2059),t.e(7005),t.e(8947),t.e(5778),t.e(5900),t.e(7110),t.e(1738)]).then(t.bind(t,88303))).default,CSVLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(6245),t.e(3600),t.e(7139)]).then(t.bind(t,72256))).default,CatalogLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(620),t.e(364),t.e(3622),t.e(2593),t.e(9970)]).then(t.bind(t,79003))).default,DimensionLayer:async()=>(await t.e(1493).then(t.bind(t,71493))).default,ElevationLayer:async()=>(await Promise.all([t.e(9186),t.e(5204)]).then(t.bind(t,5111))).default,FeatureLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(6245),t.e(3600),t.e(6470)]).then(t.bind(t,13600))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(3839)]).then(t.bind(t,17625))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(3161),t.e(1147),t.e(360),t.e(6184)]).then(t.bind(t,63201))).default,GroupLayer:async()=>(await Promise.all([t.e(3161),t.e(5989)]).then(t.bind(t,85989))).default,ImageryLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(364),t.e(2876),t.e(1291),t.e(4135)]).then(t.bind(t,5159))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(2876),t.e(5915),t.e(1291),t.e(7327)]).then(t.bind(t,97327))).default,IntegratedMesh3DTilesLayer:async()=>(await t.e(1528).then(t.bind(t,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(8947),t.e(964),t.e(8003)]).then(t.bind(t,84453))).default,KMLLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(5494),t.e(4850)]).then(t.bind(t,79465))).default,KnowledgeGraphLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(835),t.e(630),t.e(1402),t.e(7050),t.e(9858),t.e(8692)]).then(t.bind(t,28692))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(964),t.e(7272)]).then(t.bind(t,42452))).default,LinkChartLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(835),t.e(630),t.e(1402),t.e(7050),t.e(9858),t.e(1728)]).then(t.bind(t,71728))).default,MapImageLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(364),t.e(3622),t.e(9390),t.e(7656)]).then(t.bind(t,7656))).default,MapNotesLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(6245),t.e(3600),t.e(7050),t.e(4273)]).then(t.bind(t,96953))).default,MediaLayer:async()=>(await Promise.all([t.e(3161),t.e(7899)]).then(t.bind(t,87899))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(821),t.e(659)]).then(t.bind(t,87152))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(3161),t.e(7314),t.e(349)]).then(t.bind(t,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(6245),t.e(3600),t.e(3071)]).then(t.bind(t,16230))).default,PointCloudLayer:async()=>(await Promise.all([t.e(2829),t.e(8947),t.e(171)]).then(t.bind(t,76742))).default,RouteLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(5494),t.e(3920)]).then(t.bind(t,97550))).default,SceneLayer:async()=>(await Promise.all([t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(3030),t.e(2059),t.e(7005),t.e(8947),t.e(5778),t.e(964),t.e(5900),t.e(1535),t.e(7110),t.e(1737)]).then(t.bind(t,13899))).default,StreamLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4761)]).then(t.bind(t,60683))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(620),t.e(7e3)]).then(t.bind(t,70048))).default,TileLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(364),t.e(3622),t.e(9186),t.e(9390),t.e(1756)]).then(t.bind(t,71756))).default,UnknownLayer:async()=>(await t.e(146).then(t.bind(t,146))).default,UnsupportedLayer:async()=>(await t.e(5165).then(t.bind(t,45165))).default,VectorTileLayer:async()=>(await Promise.all([t.e(3161),t.e(9186),t.e(9949),t.e(5013),t.e(9885)]).then(t.bind(t,64152))).default,VideoLayer:async()=>(await Promise.all([t.e(3161),t.e(6875)]).then(t.bind(t,86875))).default,ViewshedLayer:async()=>(await t.e(6650).then(t.bind(t,96650))).default,VoxelLayer:async()=>(await Promise.all([t.e(2829),t.e(8947),t.e(964),t.e(1389)]).then(t.bind(t,16183))).default,WFSLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4322),t.e(9511)]).then(t.bind(t,16350))).default,WMSLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(5181)]).then(t.bind(t,51904))).default,WMTSLayer:async()=>(await Promise.all([t.e(3161),t.e(7314),t.e(309)]).then(t.bind(t,20309))).default,WebTileLayer:async()=>(await Promise.all([t.e(3161),t.e(7314)]).then(t.bind(t,47314))).default}},88788:(e,a,t)=>{t.d(a,{m:()=>s,v:()=>i});var r=t(84952),n=t(20655);function i(e,a){return{...o(e,a),readResourcePaths:[]}}function s(e,a,t){const n=(0,r.An)(e.itemUrl);return{...o(e,a),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:n?{rootPath:n.path,writtenUrls:[]}:null,resources:t?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function o(e,a){return{origin:a,url:(0,r.An)(e.itemUrl),portal:e.portal||n.A.getDefault(),portalItem:e}}},24183:(e,a,t)=>{t.d(a,{V:()=>n});var r=t(78888);async function n(e,a){const{data:t}=await(0,r.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return t}},49864:(e,a,t)=>{t.d(a,{X:()=>s});var r=t(92602),n=t(49186),i=t(926);function s(e){if(r.A.apiKey&&(0,i.Q)(e.portal.url))throw new n.A("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${e.portal.url} when using an api key`)}},26121:(e,a,t)=>{t.d(a,{c:()=>s,d:()=>n});var r=t(49186);async function n(e){const a=[];for(const t of e.allLayers)if("beforeSave"in t&&"function"==typeof t.beforeSave){const e=t.beforeSave();e&&a.push(e)}await Promise.allSettled(a)}const i=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function s(e,a,t){let n=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:a,details:t})=>new r.A(e,a,t)));if(e.blockedRelativeUrls&&(n=n.concat(e.blockedRelativeUrls.map((e=>new r.A("url:unsupported",`Relative url '${e}' is not supported`))))),t){const{ignoreUnsupported:e,supplementalUnsupportedErrors:a=[],requiredPropertyChecksDisabled:r}=t;e&&(n=n.filter((({name:e})=>!(i.has(e)||a.includes(e))))),r&&(n=n.filter((e=>"web-document-write:property-required"!==e.name)))}if(n.length>0)throw new r.A(a.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:n})}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3359,5740],{46130:(e,a,t)=>{t.d(a,{v:()=>n});var r=t(76553);function n(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:a,newOrigin:t})=>{(0,r.H)(e)&&t&&e.originOf(a)!==t&&e.updateOrigin(a,t)}))}},76553:(e,a,t)=>{function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}t.d(a,{H:()=>r})},33359:(e,a,t)=>{t.d(a,{save:()=>I,saveAs:()=>O});var r=t(4576),n=(t(49186),t(71530)),i=t(60694),s=t(23154),o=t(83531),l=t(4513),u=t(10407);const d="Feature Service",c="feature-layer-utils",y=`${c}-save`,f=`${c}-save-as`;function p(e){return{isValid:(0,o.W_)(e)&&("feature"!==e.type||!e.dynamicDataSource),errorMessage:"Feature layer should be a layer or table in a map or feature service"}}function m(e){const a=[],t=[];for(const{layer:r,layerJSON:n}of e)r.isTable?t.push(n):a.push(n);return{layers:a,tables:t}}function w(e){return m([e])}async function h(e,a){return/\/\d+\/?$/.test(e.url)?w(a[0]):async function(e,a){if(e.reverse(),!a)return m(e);const t=await async function(e,a){let t=await e.fetchData("json");if(function(e){return!!(e&&Array.isArray(e.layers)&&Array.isArray(e.tables))}(t))return t;t||={},function(e){e.layers||=[],e.tables||=[]}(t);const{layer:{url:r,customParameters:n,apiKey:i}}=a[0];return await async function(e,a,t){const{url:r,customParameters:n,apiKey:i}=a,{serviceJSON:o,layersJSON:u}=await(0,s.Q)(r,{customParameters:n,apiKey:i}),d=P(e.layers,o.layers,t),c=P(e.tables,o.tables,t);e.layers=d.itemResources,e.tables=c.itemResources;const y=[...d.added,...c.added],f=u?[...u.layers,...u.tables]:[];await async function(e,a,t,r){const n=await async function(e){const a=[];e.forEach((({type:e})=>{const t=(0,s.K)(e),r=l.S[t];a.push(r())}));const t=await Promise.all(a),r=new Map;return e.forEach((({type:e},a)=>{r.set(e,t[a])})),r}(a),i=a.map((({id:e,type:a})=>new(n.get(a))({url:t,layerId:e,sourceJSON:r.find((({id:a})=>a===e))})));await Promise.allSettled(i.map((e=>e.load()))),i.forEach((a=>{const{layerId:t,loaded:r,defaultPopupTemplate:n}=a;if(!r||null==n)return;const i={id:t,popupInfo:n.toJSON()};"ArcGISFeatureLayer"!==a.operationalLayerType&&(i.layerType=a.operationalLayerType),v(a,i,e)}))}(e,y,r,f)}(t,{url:r??"",customParameters:n,apiKey:i},a.map((e=>e.layer.layerId))),t}(a,e);for(const a of e)v(a.layer,a.layerJSON,t);return function(e,a){const t=[],r=[];for(const{layer:e}of a){const{isTable:a,layerId:n}=e;a?r.push(n):t.push(n)}b(e.layers,t),b(e.tables,r)}(t,e),t}(a,e)}function b(e,a){if(e.length<2)return;const t=[];for(const{id:a}of e)t.push(a);(0,r.aI)(t.sort(L),a.slice().sort(L))&&e.sort(((e,t)=>{const r=a.indexOf(e.id),n=a.indexOf(t.id);return r<n?-1:r>n?1:0}))}function L(e,a){return e<a?-1:e>a?1:0}function P(e,a,t){const n=(0,r.iv)(e,a,((e,a)=>e.id===a.id));e=e.filter((e=>!n.removed.some((a=>a.id===e.id))));const i=n.added;return i.forEach((({id:a})=>{e.push({id:a})})),{itemResources:e,added:i.filter((({id:e})=>!t.includes(e)))}}function v(e,a,t){e.isTable?S(t.tables,a):S(t.layers,a)}function S(e,a){const t=e.findIndex((({id:e})=>e===a.id));-1===t?e.push(a):e[t]=a}async function g(e,a){const{url:t,layerId:r,title:n,fullExtent:s,isTable:o}=e,l=(0,i.qg)(t);a.url=("FeatureServer"===l?.serverType?t:`${t}/${r}`)??null,a.title||=n,a.extent=null,o||null==s||(a.extent=await(0,u.sQ)(s)),(0,u.OM)(a,u.mm.METADATA),(0,u.OM)(a,u.mm.MULTI_LAYER),(0,u.LG)(a,u.mm.SINGLE_LAYER),o&&(0,u.LG)(a,u.mm.TABLE)}async function I(e,a){return(0,n.UN)({layer:e,itemType:d,validateLayer:p,createItemData:(e,a)=>h(a,[e]),errorNamePrefix:y},a)}async function O(e,a,t){return(0,n.Uh)({layer:e,itemType:d,validateLayer:p,createItemData:(e,a)=>Promise.resolve(w(e)),errorNamePrefix:f,newItem:a,setItemProperties:g},t)}},71530:(e,a,t)=>{t.d(a,{UN:()=>L,Uh:()=>P});var r=t(49186),n=t(46130),i=t(20655),s=t(80812),o=t(88788),l=t(10407),u=t(49864),d=t(26121);async function c(e){const{layer:a,errorNamePrefix:t,validateLayer:n}=e;await a.load(),function(e,a,t){const n=t(e);if(!n.isValid)throw new r.A(`${a}:invalid-parameters`,n.errorMessage,{layer:e})}(a,t,n)}function y(e,a){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${a}`}function f(e){const{item:a,errorNamePrefix:t,layer:n,validateItem:i}=e;if((0,u.X)(a),function(e){const{item:a,itemType:t,additionalItemType:n,errorNamePrefix:i,layer:s}=e,o=[t];if(n&&o.push(n),!o.includes(a.type)){const e=o.map((e=>`'${e}'`)).join(", ");throw new r.A(`${i}:portal-item-wrong-type`,`Portal item type should be one of: "${e}"`,{item:a,layer:s})}}(e),i){const e=i(a);if(!e.isValid)throw new r.A(`${t}:invalid-parameters`,e.errorMessage,{layer:n})}}function p(e){const{layer:a,errorNamePrefix:t}=e,{portalItem:n}=a;if(!n)throw new r.A(`${t}:portal-item-not-set`,y(a,"requires the portalItem property to be set"));if(!n.loaded)throw new r.A(`${t}:portal-item-not-loaded`,y(a,"cannot be saved to a portal item that does not exist or is inaccessible"));f({...e,item:n})}function m(e){const{newItem:a,itemType:t}=e;let r=s.default.from(a);return r.id&&(r=r.clone(),r.id=null),r.type??=t,r.portal??=i.A.getDefault(),f({...e,item:r}),r}function w(e){return(0,o.m)(e,"portal-item")}async function h(e,a,t){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const r=e.write({},a);return await Promise.all(a.resources?.pendingOperations??[]),(0,d.c)(a,{errorName:"layer-write:unsupported"},t),r}function b(e){(0,l.LG)(e,l.mm.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,a,t)=>t.indexOf(e)===a)))}async function L(e,a){const{layer:t,createItemData:r,createJSONContext:i,setItemProperties:s,saveResources:o,supplementalUnsupportedErrors:l}=e;await c(e),p(e);const u=t.portalItem,d=i?i(u):w(u),y=await h(t,d,{...a,supplementalUnsupportedErrors:l}),f=await r({layer:t,layerJSON:y},u);return await(s?.(t,u)),b(u),await u.update({data:f}),(0,n.v)(d),await(o?.(u,d)),u}async function P(e,a){const{layer:t,createItemData:r,createJSONContext:i,setItemProperties:s,saveResources:o,supplementalUnsupportedErrors:l}=e;await c(e);const u=m(e),d=i?i(u):w(u),y=await h(t,d,{...a,supplementalUnsupportedErrors:l}),f=await r({layer:t,layerJSON:y},u);return await s(t,u),b(u),await async function(e,a,t){const r=e.portal;await r.signIn(),await(r.user?.addItem({item:e,data:a,folder:t?.folder}))}(u,f,a),t.portalItem=u,(0,n.v)(d),await(o?.(u,d)),u}},23154:(e,a,t)=>{t.d(a,{K:()=>y,Q:()=>i});var r=t(24183);const n=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function i(e,a){const{loadContext:t,...n}=a||{},i=t?await t.fetchServiceMetadata(e,n):await(0,r.V)(e,n);c(i),l(i);const s={serviceJSON:i};if((i.currentVersion??0)<10.5)return s;const o=`${e}/layers`,u=t?await t.fetchServiceMetadata(o,n):await(0,r.V)(o,n);return c(u),l(u),s.layersJSON={layers:u.layers,tables:u.tables},s}function s(e){const{type:a}=e;return!!a&&n.has(a)}function o(e){return"Table"===e.type}function l(e){e.layers=e.layers?.filter(s),e.tables=e.tables?.filter(o)}function u(e){e.type||="Feature Layer"}function d(e){e.type||="Table"}function c(e){e.layers?.forEach(u),e.tables?.forEach(d)}function y(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},4513:(e,a,t)=>{t.d(a,{S:()=>r});const r={BingMapsLayer:async()=>(await Promise.all([t.e(3161),t.e(7029)]).then(t.bind(t,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(6245),t.e(3600),t.e(2059),t.e(7005),t.e(8947),t.e(5778),t.e(5900),t.e(7110),t.e(1738)]).then(t.bind(t,88303))).default,CSVLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(6245),t.e(3600),t.e(7139)]).then(t.bind(t,72256))).default,CatalogLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(620),t.e(364),t.e(3622),t.e(2593),t.e(9970)]).then(t.bind(t,79003))).default,DimensionLayer:async()=>(await t.e(1493).then(t.bind(t,71493))).default,ElevationLayer:async()=>(await Promise.all([t.e(9186),t.e(5204)]).then(t.bind(t,5111))).default,FeatureLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(6245),t.e(3600),t.e(6470)]).then(t.bind(t,13600))).default,GeoJSONLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(3839)]).then(t.bind(t,17625))).default,GeoRSSLayer:async()=>(await Promise.all([t.e(3161),t.e(1147),t.e(360),t.e(6184)]).then(t.bind(t,63201))).default,GroupLayer:async()=>(await Promise.all([t.e(3161),t.e(5989)]).then(t.bind(t,85989))).default,ImageryLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(364),t.e(2876),t.e(1291),t.e(4135)]).then(t.bind(t,5159))).default,ImageryTileLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(2876),t.e(5915),t.e(1291),t.e(7327)]).then(t.bind(t,97327))).default,IntegratedMesh3DTilesLayer:async()=>(await t.e(1528).then(t.bind(t,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([t.e(8947),t.e(964),t.e(8003)]).then(t.bind(t,84453))).default,KMLLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(5494),t.e(4850)]).then(t.bind(t,79465))).default,KnowledgeGraphLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(835),t.e(630),t.e(1402),t.e(7050),t.e(5242),t.e(8692)]).then(t.bind(t,28692))).default,LineOfSightLayer:async()=>(await Promise.all([t.e(964),t.e(7272)]).then(t.bind(t,42452))).default,LinkChartLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(835),t.e(630),t.e(1402),t.e(7050),t.e(5242),t.e(1728)]).then(t.bind(t,71728))).default,MapImageLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(364),t.e(3622),t.e(9390),t.e(7656)]).then(t.bind(t,7656))).default,MapNotesLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(6245),t.e(3600),t.e(7050),t.e(4273)]).then(t.bind(t,96953))).default,MediaLayer:async()=>(await Promise.all([t.e(3161),t.e(7899)]).then(t.bind(t,87899))).default,OGCFeatureLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(821),t.e(659)]).then(t.bind(t,87152))).default,OpenStreetMapLayer:async()=>(await Promise.all([t.e(3161),t.e(7314),t.e(349)]).then(t.bind(t,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(9558),t.e(620),t.e(6245),t.e(3600),t.e(4376)]).then(t.bind(t,84007))).default,PointCloudLayer:async()=>(await Promise.all([t.e(2829),t.e(8947),t.e(171)]).then(t.bind(t,76742))).default,RouteLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(5494),t.e(3920)]).then(t.bind(t,97550))).default,SceneLayer:async()=>(await Promise.all([t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(3030),t.e(2059),t.e(7005),t.e(8947),t.e(5778),t.e(964),t.e(5900),t.e(1535),t.e(7110),t.e(1737)]).then(t.bind(t,13899))).default,StreamLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4761)]).then(t.bind(t,60683))).default,SubtypeGroupLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(620),t.e(7e3)]).then(t.bind(t,70048))).default,TileLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(9558),t.e(364),t.e(3622),t.e(9186),t.e(9390),t.e(1756)]).then(t.bind(t,71756))).default,UnknownLayer:async()=>(await t.e(146).then(t.bind(t,146))).default,UnsupportedLayer:async()=>(await t.e(5165).then(t.bind(t,45165))).default,VectorTileLayer:async()=>(await Promise.all([t.e(3161),t.e(9186),t.e(9949),t.e(5013),t.e(9885)]).then(t.bind(t,64152))).default,VideoLayer:async()=>(await Promise.all([t.e(3161),t.e(6875)]).then(t.bind(t,86875))).default,ViewshedLayer:async()=>(await t.e(6650).then(t.bind(t,96650))).default,VoxelLayer:async()=>(await Promise.all([t.e(2829),t.e(8947),t.e(964),t.e(1389)]).then(t.bind(t,16183))).default,WFSLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(1132),t.e(9566),t.e(1956),t.e(5494),t.e(4796),t.e(5894),t.e(4322),t.e(9511)]).then(t.bind(t,16350))).default,WMSLayer:async()=>(await Promise.all([t.e(3161),t.e(2829),t.e(1147),t.e(360),t.e(5181)]).then(t.bind(t,51904))).default,WMTSLayer:async()=>(await Promise.all([t.e(3161),t.e(7314),t.e(309)]).then(t.bind(t,20309))).default,WebTileLayer:async()=>(await Promise.all([t.e(3161),t.e(7314)]).then(t.bind(t,47314))).default}},88788:(e,a,t)=>{t.d(a,{m:()=>s,v:()=>i});var r=t(84952),n=t(20655);function i(e,a){return{...o(e,a),readResourcePaths:[]}}function s(e,a,t){const n=(0,r.An)(e.itemUrl);return{...o(e,a),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:n?{rootPath:n.path,writtenUrls:[]}:null,resources:t?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function o(e,a){return{origin:a,url:(0,r.An)(e.itemUrl),portal:e.portal||n.A.getDefault(),portalItem:e}}},24183:(e,a,t)=>{t.d(a,{V:()=>n});var r=t(78888);async function n(e,a){const{data:t}=await(0,r.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}});return t}},49864:(e,a,t)=>{t.d(a,{X:()=>s});var r=t(92602),n=t(49186),i=t(926);function s(e){if(r.A.apiKey&&(0,i.Q)(e.portal.url))throw new n.A("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${e.portal.url} when using an api key`)}},26121:(e,a,t)=>{t.d(a,{c:()=>s,d:()=>n});var r=t(49186);async function n(e){const a=[];for(const t of e.allLayers)if("beforeSave"in t&&"function"==typeof t.beforeSave){const e=t.beforeSave();e&&a.push(e)}await Promise.allSettled(a)}const i=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function s(e,a,t){let n=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:a,details:t})=>new r.A(e,a,t)));if(e.blockedRelativeUrls&&(n=n.concat(e.blockedRelativeUrls.map((e=>new r.A("url:unsupported",`Relative url '${e}' is not supported`))))),t){const{ignoreUnsupported:e,supplementalUnsupportedErrors:a=[],requiredPropertyChecksDisabled:r}=t;e&&(n=n.filter((({name:e})=>!(i.has(e)||a.includes(e))))),r&&(n=n.filter((e=>"web-document-write:property-required"!==e.name)))}if(n.length>0)throw new r.A(a.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:n})}}}]);
|