@arcgis/core 5.1.0-next.100 → 5.1.0-next.102

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.
Files changed (158) hide show
  1. package/arcgisGlobal.d.ts +1449 -0
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/0d81409721d29d8bc276.js +1 -0
  4. package/assets/esri/core/workers/chunks/{9478a0478fb49a88685e.js → 119b84f5349f90d1dd28.js} +1 -1
  5. package/assets/esri/core/workers/chunks/15167eeb6d7dbe7e392d.js +1 -0
  6. package/assets/esri/core/workers/chunks/{6881ae969b48bd04f064.js → 1ba37706e5d5eaabcb8e.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{889a0405e3cdfa59b8e7.js → 1faa8a42d5a437fc40a3.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{40137b23d8ad4af7ff9c.js → 3996149146dd1eca7cc5.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{38b1d2ffcc318ac0119d.js → 48fcc10768d93e95a04e.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{e7637d6a8ce0af46843c.js → 55ccb8ed7325efb62091.js} +2 -2
  11. package/assets/esri/core/workers/chunks/{2b2e5628d08d0e3108d2.js → 5663df3cd1dfd4b43c73.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{0253292939b981134663.js → 5bc299f7f89a07a6e6a6.js} +1 -1
  13. package/assets/esri/core/workers/chunks/5dafd35801dca4229aed.js +1 -0
  14. package/assets/esri/core/workers/chunks/{d345030a89914348d3c5.js → 6f96ce41c47cae82e687.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{b6b6f190687813267d77.js → 7db09c5bf024242becfa.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{df232b8aa77f7e3285e3.js → 86bff154d46f8a562887.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{07ddf1b1f7602063ceb0.js → 8f9117d589de7caaa02d.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{2ad7c221ad317706387a.js → 9e7c84a3a2abec4d49df.js} +2 -2
  19. package/assets/esri/core/workers/chunks/{490e4a648cb2ab3e7956.js → a318cf6bb900e0ee268c.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{3ba29e7cf9fba3aa5f41.js → b1b8a7c00ec4d998ab84.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{fff4b9e43464ebb3fb4e.js → bb5512ecb5300d45d46b.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{d8c4fb66c733ab2f66d3.js → bb81da98546c4d923e0d.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{765ee0f2bfcec6d5bcc6.js → bc6a809a965355eb425f.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{53ff47c06ccfc0be885c.js → d30790c69724258dab2b.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{7a20941913d0115cfe26.js → de25311b6d13bf1c6089.js} +2 -2
  26. package/assets/esri/core/workers/chunks/{9940b318f38ea9d7a533.js → e86c073f0b6d395c7a38.js} +1 -1
  27. package/assets/esri/core/workers/chunks/f5bd0a4f82df5e942b70.js +1 -0
  28. package/assets/esri/core/workers/chunks/{b8d10d8db44c7c6acebe.js → fa38dc5010f8630a80fe.js} +1 -1
  29. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +125 -0
  30. package/assets/esri/themes/base/widgets/_Directions.scss +5 -1
  31. package/assets/esri/themes/dark/main.css +1 -1
  32. package/assets/esri/themes/light/main.css +1 -1
  33. package/assets/esri/themes/light/view.css +1 -1
  34. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
  35. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
  36. package/assets/esri/widgets/VideoPlayer/t9n/VideoPlayer.json +1 -1
  37. package/chunks/GaussianSplatShadow.glsl.js +39 -0
  38. package/chunks/GlobalIllumination.glsl.js +1 -1
  39. package/config.js +1 -1
  40. package/form/elements/inputs/MultipleChoiceInput.d.ts +5 -5
  41. package/form/elements/inputs/MultipleChoiceInput.js +1 -1
  42. package/interfaces.d.ts +17 -0
  43. package/kernel.js +1 -1
  44. package/layers/FeatureLayer.d.ts +29 -39
  45. package/layers/KnowledgeGraphLayer.d.ts +1 -1
  46. package/layers/KnowledgeGraphLayer.js +1 -1
  47. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  48. package/layers/OrientedImageryLayer.d.ts +233 -0
  49. package/layers/OrientedImageryLayer.js +1 -1
  50. package/layers/ParquetLayer.d.ts +73 -24
  51. package/layers/ParquetLayer.js +1 -1
  52. package/layers/SceneLayer.d.ts +2 -2
  53. package/layers/VideoLayer.d.ts +35 -9
  54. package/layers/VideoLayer.js +1 -1
  55. package/layers/catalog/CatalogFootprintLayer.d.ts +147 -0
  56. package/layers/graphics/sources/ParquetSource.js +1 -1
  57. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  58. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +3 -1
  59. package/layers/support/FeatureReductionBinning.d.ts +87 -9
  60. package/layers/support/FeatureReductionCluster.d.ts +87 -9
  61. package/layers/support/FieldConfiguration.d.ts +1 -1
  62. package/layers/support/ParquetFilesData.d.ts +46 -0
  63. package/layers/support/ParquetFilesData.js +2 -0
  64. package/layers/support/ParquetPortalItemData.d.ts +25 -0
  65. package/layers/support/ParquetPortalItemData.js +2 -0
  66. package/layers/support/SubtypeSublayer.d.ts +147 -0
  67. package/layers/support/TelemetryData.d.ts +5 -0
  68. package/layers/support/TelemetryData.js +1 -1
  69. package/layers/support/TelemetryDisplay.d.ts +10 -2
  70. package/layers/support/TelemetryDisplay.js +1 -1
  71. package/layers/support/parquetUtils.js +1 -1
  72. package/layers/support/types.d.ts +9 -0
  73. package/layers/video/VideoController.js +1 -1
  74. package/layers/video/types.d.ts +8 -1
  75. package/layers/video/videoUtils.js +1 -1
  76. package/networks/UtilityNetworkTraceAnalysis.d.ts +1 -1
  77. package/networks/UtilityNetworkTraceAnalysis.js +1 -1
  78. package/package.json +3 -3
  79. package/portal/jsonTypes.d.ts +7 -0
  80. package/renderers/support/ClassBreakInfo.d.ts +3 -3
  81. package/renderers/support/ClassBreakInfo.js +1 -1
  82. package/renderers/support/UniqueValueInfo.d.ts +3 -3
  83. package/renderers/support/UniqueValueInfo.js +1 -1
  84. package/rest/print.js +1 -1
  85. package/rest/support/PrintParameters.d.ts +8 -1
  86. package/rest/support/PrintParameters.js +1 -1
  87. package/support/revision.js +1 -1
  88. package/third-party-notices.txt +4 -0
  89. package/views/2d/engine/webgl/shaderGraph/graph/GlslGraphWriter.js +1 -1
  90. package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphContext.js +1 -1
  91. package/views/2d/engine/webgl/shaderGraph/graph/ShaderGraphNode.js +1 -1
  92. package/views/2d/engine/webgl/shaderGraph/graph/glsl.js +1 -1
  93. package/views/2d/engine/webgl/shaderGraph/techniques/dotDensity/DotDensityPolygonShader.js +1 -1
  94. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
  95. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/BloomShader.js +1 -1
  96. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/AspectShader.js +1 -1
  97. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/CurvatureShader.js +1 -1
  98. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/MaskShader.js +1 -1
  99. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/RemapShader.js +1 -1
  100. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/SlopeShader.js +1 -1
  101. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/math.js +1 -1
  102. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/surface.js +1 -1
  103. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  104. package/views/2d/layers/VideoLayerView2D.js +1 -1
  105. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  106. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  107. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  108. package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
  109. package/views/3d/webgl/RenderNode.js +1 -1
  110. package/views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js +5 -2
  111. package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
  112. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  113. package/views/3d/webgl-engine/lib/GaussianSplatShadowRenderNode.js +2 -0
  114. package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
  115. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  116. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  117. package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
  118. package/views/3d/webgl-engine/shaders/GaussianSplatShadow.glsl.js +2 -0
  119. package/views/3d/webgl-engine/shaders/GaussianSplatShadowTechnique.js +2 -0
  120. package/views/3d/webgl.js +1 -1
  121. package/views/Viewport2DBaseMixin.js +1 -1
  122. package/widgets/Attachments/support/attachmentUtils.js +1 -1
  123. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.d.ts +8 -1
  124. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  125. package/widgets/BatchAttributeForm/attachmentUtils.js +2 -0
  126. package/widgets/BatchAttributeForm/css.js +1 -1
  127. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +1 -1
  128. package/widgets/BatchAttributeForm/templates/RelationshipElementTemplate.js +1 -1
  129. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  130. package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
  131. package/widgets/BatchAttributeForm/types.d.ts +7 -0
  132. package/widgets/BatchAttributeForm.js +1 -1
  133. package/widgets/FeatureForm/RelationshipInput.d.ts +1 -1
  134. package/widgets/FeatureTable.js +1 -1
  135. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  136. package/widgets/OrientedImageryViewer/OrientedImageryViewerVisibleElements.js +1 -1
  137. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  138. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  139. package/widgets/OrientedImageryViewer/constants.js +1 -1
  140. package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
  141. package/widgets/OrientedImageryViewer/services/TransformationService.js +1 -1
  142. package/widgets/OrientedImageryViewer/support/dataCaptureUtils.js +1 -1
  143. package/widgets/OrientedImageryViewer/support/geometryUtils.js +1 -1
  144. package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
  145. package/widgets/OrientedImageryViewer/types.js +1 -1
  146. package/widgets/OrientedImageryViewer/videoViewerUtils.js +1 -1
  147. package/widgets/OrientedImageryViewer.js +1 -1
  148. package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
  149. package/widgets/VideoPlayer/VideoPlayerViewModel.d.ts +9 -0
  150. package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
  151. package/widgets/VideoPlayer/components/PlayerControlsGroup.js +1 -1
  152. package/widgets/support/forms/formUtils.js +1 -1
  153. package/assets/esri/core/workers/chunks/26f28406056ddc0e159c.js +0 -1
  154. package/assets/esri/core/workers/chunks/43cc82373be791b7cb4c.js +0 -1
  155. package/assets/esri/core/workers/chunks/b06cc59068d32baaaa87.js +0 -1
  156. package/assets/esri/core/workers/chunks/c9461568e1002ebac534.js +0 -1
  157. /package/assets/esri/core/workers/chunks/{e7637d6a8ce0af46843c.js.LICENSE.txt → 55ccb8ed7325efb62091.js.LICENSE.txt} +0 -0
  158. /package/assets/esri/core/workers/chunks/{7a20941913d0115cfe26.js.LICENSE.txt → de25311b6d13bf1c6089.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{ShaderPrimitiveNode as e,cloneShaderNode as n,ShaderConditionNode as r,ShaderPropertyAccessNode as i,ShaderFunctionNode as c,ShaderBlockNode as u,ShaderPropertyAccess2DNode as s,ShaderScopeNode as o}from"./ShaderGraphNode.js";var h,l,a,f,p,d,y,w,m,v,b,g,x,I;function E(t){switch(t.type){case"uint":return Y;case"uvec2":return _;case"uvec3":return A;case"uvec4":return G;default:throw new Error("Found unexpected type")}}function $(t){switch(t.type){case"float":return H;case"vec2":return V;case"vec3":return J;case"vec4":return K;default:throw new Error("Found unexpected type")}}function T(t){switch(t.type){case"int":return Y;case"ivec2":return _;case"ivec3":return A;case"ivec4":return G;default:throw new Error("Found unexpected type")}}function z(t){switch(t.type){case"float":return tt;case"vec2":return et;case"vec3":return nt;case"vec4":return rt;default:throw new Error("Found unexpected type")}}function N(t){switch(t.type){case"bool":case"float":case"int":case"uint":return L;case"bvec2":case"vec2":case"ivec2":case"uvec2":return O;case"bvec3":case"vec3":case"ivec3":case"uvec3":return Q;case"bvec4":case"vec4":case"ivec4":case"uvec4":return Z;default:throw new Error("Unable to handle type")}}function D(t){switch(t.type){case"bool":case"bvec2":case"bvec3":case"bvec4":return L;case"float":case"vec2":case"vec3":case"vec4":return Y;case"int":case"ivec2":case"ivec3":case"ivec4":return tt;case"uint":case"uvec2":case"uvec3":case"uvec4":return H;default:throw new Error("Unable to handle type")}}function F(t){switch(t.type){case"float":case"int":case"uint":case"bool":case"sampler2D":return 1;case"vec2":case"ivec2":case"uvec2":case"bvec2":return 2;case"vec3":case"ivec3":case"uvec3":case"bvec3":return 3;case"vec4":case"ivec4":case"uvec4":case"bvec4":case"mat2":return 4;case"mat3":return 9;case"mat4":return 16;case"array":case"array-2d":return t.size*F(t.elementType)}}function k(t){const e=[["float","vec2","vec3","vec4"],["int","ivec2","ivec3","ivec4"],["uint","uvec2","uvec3","uvec4"],["bool","bvec2","bvec3","bvec4"]];for(const n of e)if(n.includes(t))return n.map(t=>st[t]);throw new Error("Unable to find type family")}function M(t){return new Proxy(t,{get(e,n){if("constructor"===n)return new Proxy(e.constructor,{construct:(t,e,n)=>M(new t(...e))});if(n in e)return e[n];if("string"==typeof n){const e=k(t.type);return wt(t,n,e[n.length-1])}}})}function S(t){return new Proxy(t,{construct:(t,e,n)=>M(new t(...e))})}function R(t){return new Proxy(t,{get(e,n){if(n in e)return e[n];const r=j(n,e.size);return null!=r?wt(t,`[${r}]`,t.elementType.constructor):void 0},set(t,e,n,r){if(e in t)return Reflect.set(t,e,n,r);const i=j(e,t.size);return null!=i&&(P(t,n),t.children[i]=n,!0)}})}function j(t,e){if("string"!=typeof t||!/^(0|[1-9]\d*)$/.test(t))return null;const n=Number(t);if(!Number.isSafeInteger(n))return null;if(n<0||n>=e)throw new q;return n}function P(t,e){if("object"!=typeof e||null==e||!("type"in e))throw new TypeError(`Expected array element of type ${t.elementType.type}`);if(e.type!==t.elementType.type)throw new TypeError(`Expected array element of type ${t.elementType.type}, got ${e.type}`)}function B(t){return new Proxy(t,{construct:(t,e,n)=>R(new t(...e))})}class q extends Error{}let U=class extends e{static{h=this}static{this.type="array"}constructor(t,e){super(),this.elementType=t,this.size=e,this.type="array",this.children=Array(e).fill(t)}clone(){const t=new h(n(this.elementType),this.size);return t.children=this.children.map(n),super.cloneInto(t),t}get(t,e){const n=new tt(t),r=null!=e?new tt(e):null;if(null!=r){return mt(this,n,r,D(this.elementType.constructor))}return wt(this,n,this.elementType.constructor)}last(){return this.get(this.size-1)}first(){return this.get(0)}findIndex(t,e,n){return Tt(this,t,e,n)}glslFindIndex(t,e,n){return zt(this,t,e,n)}static ofType(t,e){const n={construct:(n,r)=>new h(new t,e)};return new Proxy(h,n)}};U=h=t([B],U);class C extends e{static{this.type="array-2d"}constructor(t,e,n,r=!1){super(),this.elementType=t,this.xSize=e,this.ySize=n,this.isRowMajor=r,this.type="array-2d",this.children=Array(e*n).fill(t)}clone(){const t=new C(n(this.elementType),this.xSize,this.ySize,this.isRowMajor);return t.children=this.children.map(n),super.cloneInto(t),t}get size(){return this.xSize*this.ySize}get(t,e){return this.isRowMajor?this._getRowMajor(t,e):this._getColumnMajor(t,e)}_getColumnMajor(t,e){const n=new tt(t);return wt(this,new tt(e).add(n.multiply(this.xSize)),this.elementType.constructor)}_getRowMajor(t,e){const n=new tt(t),r=new tt(e);return wt(this,n.add(r.multiply(this.ySize)),this.elementType.constructor)}static ofType(t,e,n,r=!1){return new Proxy(U,{construct:(i,c)=>new C(new t,e,n,r)})}}class X extends e{constructor(){super(...arguments),this.type="sampler2D",this.children=[]}static{this.type="sampler2D"}clone(){const t=new X;return t.children=this.children.map(n),super.cloneInto(t),t}}class Y extends e{static{this.type="float"}constructor(t){super(),this.type="float",this.children=[t]}clone(){const t=new Y(n(this.children[0]));return super.cloneInto(t),t}multiply(t){return kt(this,"number"==typeof t?W(t,Y):t)}divide(t){return Mt(this,"number"==typeof t?W(t,Y):t)}add(t){return St(this,"number"==typeof t?W(t,Y):t)}subtract(t){return Rt(this,"number"==typeof t?W(t,Y):t)}}let _=class extends e{static{l=this}static{this.type="vec2"}constructor(t,e){super(),this.type="vec2",this.children=[t,e].filter(t=>null!=t)}clone(){const t=new l(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return wt(this,"[0]",Y)}get 1(){return wt(this,"[1]",Y)}get 2(){throw new q}get 3(){throw new q}multiply(t){return kt(this,"number"==typeof t?W(t,Y):t)}divide(t){return Mt(this,"number"==typeof t?W(t,Y):t)}add(t){return St(this,"number"==typeof t?W(t,Y):t)}subtract(t){return Rt(this,"number"==typeof t?W(t,Y):t)}};_=l=t([S],_);let A=class extends e{static{a=this}static{this.type="vec3"}constructor(t,e,n){super(),this.type="vec3",this.children=[t,e,n].filter(t=>null!=t)}get 0(){return wt(this,"[0]",Y)}get 1(){return wt(this,"[1]",Y)}get 2(){return wt(this,"[2]",Y)}get 3(){throw new q}clone(){const t=new a(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}multiply(t){return kt(this,"number"==typeof t?W(t,Y):t)}divide(t){return Mt(this,"number"==typeof t?W(t,Y):t)}add(t){return St(this,"number"==typeof t?W(t,Y):t)}subtract(t){return Rt(this,"number"==typeof t?W(t,Y):t)}};A=a=t([S],A);let G=class extends e{static{f=this}static{this.type="vec4"}constructor(t,e,n,r){super(),this.type="vec4",this.children=[t,e,n,r].filter(t=>null!=t)}clone(){const t=new f(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return wt(this,"[0]",Y)}get 1(){return wt(this,"[1]",Y)}get 2(){return wt(this,"[2]",Y)}get 3(){return wt(this,"[3]",Y)}multiply(t){return kt(this,"number"==typeof t?W(t,Y):t)}divide(t){return Mt(this,"number"==typeof t?W(t,Y):t)}add(t){return St(this,"number"==typeof t?W(t,Y):t)}subtract(t){return Rt(this,"number"==typeof t?W(t,Y):t)}};G=f=t([S],G);let H=class extends e{static{p=this}static{this.type="uint"}constructor(t){super(),this.type="uint",this.children=[t]}clone(){const t=new p(n(this.children[0]));return super.cloneInto(t),t}multiply(t){return kt(this,W(t,p))}add(t){return St(this,W(t,p))}subtract(t){return Rt(this,W(t,p))}divide(t){return Mt(this,W(t,p))}};H=p=t([S],H);let V=class extends e{static{d=this}static{this.type="uvec2"}constructor(t,e){super(),this.type="uvec2",this.children=[t,e].filter(t=>null!=t)}clone(){const t=new d(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return wt(this,"[0]",tt)}get 1(){return wt(this,"[1]",tt)}get 2(){throw new q}get 3(){throw new q}multiply(t){return kt(this,"number"==typeof t?W(t,H):t)}divide(t){return Mt(this,"number"==typeof t?W(t,H):t)}add(t){return St(this,"number"==typeof t?W(t,H):t)}subtract(t){return Rt(this,"number"==typeof t?W(t,H):t)}};V=d=t([S],V);let J=class extends e{static{y=this}static{this.type="uvec3"}constructor(t,e,n){super(),this.type="uvec3",this.children=[t,e,n].filter(t=>null!=t)}clone(){const t=new y(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}get 0(){return wt(this,"[0]",H)}get 1(){return wt(this,"[1]",H)}get 2(){return wt(this,"[2]",H)}get 3(){throw new q}multiply(t){return kt(this,"number"==typeof t?W(t,H):t)}divide(t){return Mt(this,"number"==typeof t?W(t,H):t)}add(t){return St(this,"number"==typeof t?W(t,H):t)}subtract(t){return Rt(this,"number"==typeof t?W(t,H):t)}};J=y=t([S],J);let K=class extends e{static{w=this}static{this.type="uvec4"}constructor(t,e,n,r){super(),this.type="uvec4",this.children=[t,e,n,r].filter(t=>null!=t)}clone(){const t=new w(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return wt(this,"[0]",H)}get 1(){return wt(this,"[1]",H)}get 2(){return wt(this,"[2]",H)}get 3(){return wt(this,"[3]",H)}multiply(t){return kt(this,"number"==typeof t?W(t,H):t)}divide(t){return Mt(this,"number"==typeof t?W(t,H):t)}add(t){return St(this,"number"==typeof t?W(t,H):t)}subtract(t){return Rt(this,"number"==typeof t?W(t,H):t)}};K=w=t([S],K);class L extends e{static{this.type="bool"}constructor(t){super(),this.type="bool",this.children=[t]}and(t){return Qt(this,t)}or(t){return Jt(this,t)}xor(t){return Lt(this,t)}clone(){const t=new L(n(this.children[0]));return super.cloneInto(t),t}}let O=class extends e{static{m=this}static{this.type="bvec2"}constructor(t,e){super(),this.type="bvec2",this.children=[t,e].filter(t=>null!=t)}all(){return ne(this)}any(){return re(this)}clone(){const t=new m(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}};O=m=t([S],O);let Q=class extends e{static{v=this}static{this.type="bvec3"}constructor(t,e,n){super(),this.type="bvec3",this.children=[t,e,n].filter(t=>null!=t)}all(){return ne(this)}any(){return re(this)}clone(){const t=new v(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}};function W(t,e){if("number"==typeof t){return new e(t)}return t}Q=v=t([S],Q);let Z=class extends e{static{b=this}static{this.type="bvec4"}constructor(t,e,n,r){super(),this.type="bvec4",this.children=[t,e,n,r].filter(t=>null!=t)}all(){return ne(this)}any(){return re(this)}clone(){const t=new b(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}};Z=b=t([S],Z);class tt extends e{static{this.type="int"}constructor(t){super(),this.type="int",this.children=[t]}multiply(t){return kt(this,W(t,tt))}add(t){return St(this,W(t,tt))}subtract(t){return Rt(this,W(t,tt))}divide(t){return Mt(this,W(t,tt))}clone(){const t=new tt(n(this.children[0]));return super.cloneInto(t),t}}let et=class extends e{static{g=this}static{this.type="ivec2"}constructor(t,e){super(),this.type="ivec2",this.children=[t,e].filter(t=>null!=t)}clone(){const t=new g(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return wt(this,"[0]",tt)}get 1(){return wt(this,"[1]",tt)}get 2(){throw new q}get 3(){throw new q}multiply(t){return kt(this,"number"==typeof t?W(t,tt):t)}divide(t){return Mt(this,"number"==typeof t?W(t,tt):t)}add(t){return St(this,"number"==typeof t?W(t,tt):t)}subtract(t){return Rt(this,"number"==typeof t?W(t,tt):t)}};et=g=t([S],et);let nt=class extends e{static{x=this}static{this.type="ivec3"}constructor(t,e,n){super(),this.type="ivec3",this.children=[t,e,n].filter(t=>null!=t)}clone(){const t=new x(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}get 0(){return wt(this,"[0]",tt)}get 1(){return wt(this,"[1]",tt)}get 2(){return wt(this,"[2]",tt)}get 3(){throw new q}multiply(t){return kt(this,"number"==typeof t?W(t,tt):t)}divide(t){return Mt(this,"number"==typeof t?W(t,tt):t)}add(t){return St(this,"number"==typeof t?W(t,tt):t)}subtract(t){return Rt(this,"number"==typeof t?W(t,tt):t)}};nt=x=t([S],nt);let rt=class extends e{static{I=this}static{this.type="ivec4"}constructor(t,e,n,r){super(),this.type="ivec4",this.children=[t,e,n,r].filter(t=>null!=t)}clone(){const t=new I(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return wt(this,"[0]",tt)}get 1(){return wt(this,"[1]",tt)}get 2(){return wt(this,"[2]",tt)}get 3(){return wt(this,"[3]",tt)}multiply(t){return kt(this,"number"==typeof t?W(t,tt):t)}divide(t){return Mt(this,"number"==typeof t?W(t,tt):t)}add(t){return St(this,"number"==typeof t?W(t,tt):t)}subtract(t){return Rt(this,"number"==typeof t?W(t,tt):t)}};rt=I=t([S],rt);class it extends e{static{this.type="mat2"}constructor(t,e,n,r){super(),this.type="mat2",this.children=[t,e,n,r]}clone(){const t=new it(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get(t,e){return mt(this,new tt(t),new tt(e),Y)}multiply(t){return kt(this,t)}}class ct extends e{static{this.type="mat3"}static identity(){return new ct(1,0,0,0,1,0,0,0,1)}static fromRotation(t){const e=on(t),n=le(t);return new ct(n,e,0,It(e),n,0,0,0,1)}constructor(t,e,n,r,i,c,u,s,o){super(),this.type="mat3",this.children=[t,e,n,r,i,c,u,s,o]}add(t){return St(this,t)}multiply(t){return kt(this,t)}get(t,e){return mt(this,new tt(t),new tt(e),Y)}clone(){const t=new ct(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]),n(this.children[4]),n(this.children[5]),n(this.children[6]),n(this.children[7]),n(this.children[8]));return super.cloneInto(t),t}}class ut extends e{static{this.type="mat4"}static identity(){return new ut(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)}constructor(t,e,n,r,i,c,u,s,o,h,l,a,f,p,d,y){super(),this.type="mat4",this.children=[t,e,n,r,i,c,u,s,o,h,l,a,f,p,d,y]}static fromColumns(t,e,n,r){return new ut(t.x,t.y,t.z,t.w,e.x,e.y,e.z,e.w,n.x,n.y,n.z,n.w,r.x,r.y,r.z,r.w)}multiply(t){return kt(this,t)}get(t,e){return mt(this,new tt(t),new tt(e),Y)}clone(){const t=new ut(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]),n(this.children[4]),n(this.children[5]),n(this.children[6]),n(this.children[7]),n(this.children[8]),n(this.children[9]),n(this.children[10]),n(this.children[11]),n(this.children[12]),n(this.children[13]),n(this.children[14]),n(this.children[15]));return super.cloneInto(t),t}}const st={float:Y,vec2:_,vec3:A,vec4:G,int:tt,ivec2:et,ivec3:nt,ivec4:rt,uint:H,uvec2:V,uvec3:J,uvec4:K,bool:L,bvec2:O,bvec3:Q,bvec4:Z},ot=(...t)=>new tt(...t),ht=(...t)=>new Y(...t),lt=(...t)=>new _(...t),at=(...t)=>new A(...t),ft=(...t)=>new G(...t),pt=(...t)=>new it(...t),dt=(...t)=>new ct(...t),yt=(...t)=>new ut(...t);function wt(t,e,n){const r=new n(new i(e,t,n));return r.isImplicit=!0,r}function mt(t,e,n,r){const i=new r(new s(e,n,t,r));return i.isImplicit=!0,i}function vt(t,e,n,r=null){if(r){const i=new r,u=new r(new c(t,[e,n],!0,!1,i));return u.isImplicit=!0,u}if("float"===e.type||"int"===e.type){const r=new n.constructor(new c(t,[e,n],!0,!1,n.constructor));return r.isImplicit=!0,r}if(("mat2"===e.type||"mat3"===e.type||"mat4"===e.type)&&"float"!==n.type){const r=new n.constructor(new c(t,[e,n],!0,!1,n.constructor));return r.isImplicit=!0,r}const i=new e.constructor(new c(t,[e,n],!0,!1,e.constructor));return i.isImplicit=!0,i}function bt(t,e,n=e.constructor){const r=new n(new c(t,[e],!1,!1,n));return r.isImplicit=!0,r}function gt(t,e,n,r=e.constructor){const i=new r(new c(t,[e,n],!1,!1,r));return i.isImplicit=!0,i}function xt(t,e,n,r,i=e.constructor){const u=new i(new c(t,[e,n,r],!1,!1,i));return u.isImplicit=!0,u}function It(t){return kt(t,ht(-1))}function Et(t,e,n,r){return new e(new u(t,e,n,r))}function $t(t,e){const n="function"==typeof t?t():t,r=new n.constructor(new o(n).setDebugName(e));return r.isImplicit=!0,r}function Tt(t,e,n=0,r=t.size){const i=new tt(n).setMutable().setDebugName("FindIndexIterator"),c=e(t.get(i)).setDebugName("FindIndexPredicate"),u=Et({iter:i},tt,c,({out:t,iter:e,subgraph:n})=>`\n${t} = -1;\n\nfor (; ${e} < ${r}; ${e}++) {\n\n${n.body}\n\n if (${n.varName}) {\n ${t} = ${e};\n break;\n }\n\n}\n`).setDebugName("FindIndexBlock");return u}function zt(t,e,n=0,r=t.size){const i=Et({array:t},tt,null,({out:t,array:i})=>`\n${t} = -1;\nfor (int i = ${n}; i < ${r}; i++) {\n bool condition;\n ${e({array:i,i:"i",out:"condition"})}\n if (condition) {\n ${t} = i;\n break;\n }\n}\n`).setDebugName("GlslFindIndexBlock");return i}function Nt(t,e,n){const i="function"==typeof e?e():e,c="function"==typeof n?n():n,u=new i.constructor(new r(t,i,c));return u.isImplicit=!0,u}function Dt(...t){const e=t.map(([t,e])=>"function"==typeof e?[t,e()]:[t,e]),n=e[0][1].constructor,r=e.findIndex(t=>!0===t[0]);if(-1===r)throw new Error("A cond must have a fallthrough case with `true`/; ");const i=e.slice(0,r),c=e[r][1],u=new n(i.reduceRight((t,e)=>Nt(e[0],e[1],t),c));return u.isImplicit=!0,u}function Ft(t,e){const n=new e.constructor(new r(t,e,null));return n.isImplicit=!0,n}function kt(t,e){return vt("*",t,e)}function Mt(t,e){return vt("/",t,e)}function St(t,e){return vt("+",t,e)}function Rt(t,e){return vt("-",t,e)}function jt(t,e){return vt("%",t,e)}function Pt(t,e){return vt("<<",t,e)}function Bt(t,e){return vt(">>",t,e)}function qt(t,e){return vt("&",t,e)}function Ut(t,e){return vt("|",t,e)}function Ct(t,e){return vt("^",t,e)}function Xt(t){return bt("~",t)}function Yt(t,e){return vt("==",t,e,L)}function _t(t,e){return vt("!=",t,e,L)}function At(t,e){return vt("<",t,e,L)}function Gt(t,e){return vt("<=",t,e,L)}function Ht(t,e){return vt(">",t,e,L)}function Vt(t,e){return vt(">=",t,e,L)}function Jt(...t){return t.length<=1?t[0]:t.slice(1).reduce((t,e)=>Kt(t,e),t[0])}function Kt(t,e){return vt("||",t,e,L)}function Lt(...t){return t.length<=1?t[0]:t.slice(1).reduce((t,e)=>Ot(t,e),t[0])}function Ot(t,e){return vt("^^",t,e,L)}function Qt(...t){return t.length<=1?t[0]:t.slice(1).reduce((t,e)=>Wt(t,e),t[0])}function Wt(t,e){return vt("&&",t,e,L)}function Zt(t){return bt("abs",t)}function te(t){return bt("acos",t)}function ee(t){return bt("acosh",t)}function ne(t){return bt("all",t,L)}function re(t){return bt("any",t,L)}function ie(t){return bt("asin",t)}function ce(t){return bt("asinh",t)}function ue(t,e){return null==e?bt("atan",t):gt("atan",t,e,t.constructor)}function se(t){return bt("atanh",t)}function oe(t){return bt("ceil",t)}function he(t,e,n){return xt("clamp",t,e,n,t.constructor)}function le(t){return bt("cos",t)}function ae(t){return bt("cosh",t)}function fe(t,e){return gt("cross",t,e,t.constructor)}function pe(t){return bt("dFdX",t)}function de(t){return bt("dFdY",t)}function ye(t){return bt("degrees",t)}function we(t){return bt("determinant",t,Y)}function me(t,e){return gt("distance",t,e,Y)}function ve(t,e){return gt("dot",t,e,Y)}function be(t,e){return gt("equal",t,e,N(t))}function ge(t,e){return gt("greaterThan",t,e,N(t))}function xe(t,e){return gt("greaterThanEqual",t,e,N(t))}function Ie(t){return bt("exp",t)}function Ee(t){return bt("exp2",t)}function $e(t,e,n){return xt("faceforward",t,e,n)}function Te(t){return bt("floatBitsToInt",t,z(t))}function ze(t){return bt("floatBitsToUint",t,$(t))}function Ne(t){return bt("floor",t)}function De(t){return bt("fract",t)}function Fe(t){return bt("fwidth",t)}function ke(t){return bt("intBitsToFloat",t,T(t))}function Me(t){return bt("uintBitsToFloat",t,E(t))}function Se(t){return bt("inverse",t,Y)}function Re(t){return bt("inversesqrt",t)}function je(t){return bt("isinf",t,N(t))}function Pe(t){return bt("isnan",t,N(t))}function Be(t){return bt("length",t,Y)}function qe(t,e){return gt("lessThan",t,e,N(t))}function Ue(t,e){return gt("lessThanEqual",t,e,N(t))}function Ce(t){return bt("log",t)}function Xe(t){return bt("log2",t)}function Ye(t,e){return gt("matrixCompMult",t,e)}function _e(t,e){return gt("max",t,e)}function Ae(t,e){return gt("min",t,e)}function Ge(t,e,n){return xt("mix",t,e,n)}function He(t,e){return gt("mod",t,e)}function Ve(t,e){throw new Error("modf not implemented")}function Je(t){return bt("normalize",t)}function Ke(t){return"bool"===t.type?bt("!",t):bt("not",t)}function Le(t,e){return gt("notEqual",t,e,N(t))}function Oe(t,e){throw new Error("Impl type?")}function Qe(t){return bt("packHalf2x16",t,H)}function We(t){return bt("packUnorm2x16",t,H)}function Ze(t){return bt("packSnorm2x16",t,H)}function tn(t,e){return gt("pow",t,e)}function en(t){return bt("radians",t)}function nn(t,e){return gt("reflect",t,e)}function rn(t,e,n){return xt("refract",t,e,n)}function cn(t){return bt("round",t)}function un(t){return bt("roundEven",t)}function sn(t){return bt("sign",t)}function on(t){return bt("sin",t)}function hn(t){return bt("sinh",t)}function ln(t,e,n){return xt("smoothstep",t,e,n)}function an(t){return bt("sqrt",t)}function fn(t,e){return gt("step",t,e,e.constructor)}function pn(t){return bt("tan",t)}function dn(t){return bt("tanh",t)}function yn(t,e,n){return xt("texelFetch",t,e,n,G)}function wn(t,e,n,r){throw new Error("Impl type")}function mn(t,e,n){throw new Error("Impl type")}function vn(t,e){return gt("texture",t,e,G)}function bn(t,e,n,r){throw new Error("Impl type")}function gn(t,e,n,r,i){throw new Error("Impl type")}function xn(t,e,n){throw new Error("Impl type")}function In(t,e,n,r){throw new Error("Impl type")}function En(t,e,n,r){throw new Error("Impl type")}function $n(t,e,n){throw new Error("Impl type")}function Tn(t,e,n,r){throw new Error("Impl type")}function zn(t,e,n,r,i){throw new Error("Impl type")}function Nn(t,e,n){throw new Error("Impl type")}function Dn(t,e,n,r){throw new Error("Impl type")}function Fn(t,e,n,r){throw new Error("Impl type")}function kn(t,e){throw new Error("Impl type")}function Mn(t){return bt("transpose",t)}function Sn(t){return bt("trunc",t)}function Rn(t){return bt("unpackHalf2x16",t,_)}function jn(t){return bt("unpackUnorm2x16",t,_)}function Pn(t){return bt("unpackSnorm2x16",t,_)}function Bn(t,e){const n=tn(new Y(2),new Y(e));return[new G(He(t.x,n),Ne(t.x.divide(n)),He(t.y,n),Ne(t.y.divide(n))),new G(He(t.z,n),Ne(t.z.divide(n)),He(t.w,n),Ne(t.w.divide(n)))]}function qn(t,e){const{initialValue:n,xRange:r,yRange:i,callback:c}=e,[u,s]=r,[o,h]=i,l=new tt(0).setMutable().setDebugName("iterX"),a=new tt(0).setMutable().setDebugName("iterY"),f=n.setMutable().setDebugName("accumulator"),p=c(f,t.get(l,a),l,a).setDebugName("callback"),d=Et({iterX:l,iterY:a,accumulator:f},n.constructor,p,({out:t,iterX:e,iterY:n,accumulator:r,subgraph:i})=>`\nfor (${n} = ${o}; ${n} < ${h}; ${n}++) {\n for (${e} = ${u}; ${e} < ${s}; ${e}++) {\n\n ${i.body}\n\n ${r} = ${i.varName};\n }\n}\n${t} = ${r};\n`).setDebugName("reduce2DBody");return d}export{O as BVec2,Q as BVec3,Z as BVec4,L as Bool,U as FixedArray,C as FixedArray2D,Y as Float,et as IVec2,nt as IVec3,rt as IVec4,tt as Int,it as Mat2,ct as Mat3,ut as Mat4,X as Sampler2D,H as UInt,V as UVec2,J as UVec3,K as UVec4,_ as Vec2,A as Vec3,G as Vec4,Kt as _or,Ot as _xor,Zt as abs,te as acos,ee as acosh,St as add,ne as all,Qt as and,re as any,ie as asin,ce as asinh,ue as atan,se as atanh,qt as bitAnd,Xt as bitNot,Ut as bitOr,Bt as bitRShift,Pt as bitShift,Ct as bitXor,Et as block,oe as ceil,he as clamp,Dt as cond,le as cos,ae as cosh,fe as cross,pe as dFdx,de as dFdy,wt as definePropertyAccess,mt as definePropertyAccess2D,ye as degrees,we as determinant,me as distance,Mt as divide,ve as dot,Yt as equal,be as equalComponent,Ie as exp,Ee as exp2,$e as faceforward,Tt as findIndex,ht as float,Te as floatBitsToInt,ze as floatBitsToUint,Ne as floor,De as fract,Fe as fwidth,F as getTypeElementLengthForType,zt as glslFindIndex,Ht as greaterThan,ge as greaterThanComponent,Vt as greaterThanEqual,xe as greaterThanEqualComponent,Nt as ifElse,ot as int,ke as intBitsToFloat,jt as intMod,Se as inverse,Re as inversesqrt,je as isinf,Pe as isnan,Be as length,At as lessThan,qe as lessThanComponent,Gt as lessThanEqual,Ue as lessThanEqualComponent,Ce as log,Xe as log2,pt as mat2,dt as mat3,yt as mat4,Ye as matrixCompMult,_e as max,Ae as min,Ge as mix,He as mod,Ve as modf,kt as multiply,$t as namedScope,It as negate,Je as normalize,Ke as not,_t as notEqual,Le as notEqualComponent,Jt as or,Oe as outerProduct,Qe as packHalf2x16,Ze as packSnorm2x16,We as packUnorm2x16,tn as pow,en as radians,qn as reduce2D,nn as reflect,rn as refract,cn as round,un as roundEven,sn as sign,on as sin,hn as sinh,ln as smoothstep,an as sqrt,fn as step,Rt as subtract,pn as tan,dn as tanh,yn as texelFetch,wn as texelFetchOffset,mn as texture,vn as texture2D,bn as textureGrad,gn as textureGradOffset,xn as textureLod,In as textureLodOffset,En as textureOffset,$n as textureProj,Tn as textureProjGrad,zn as textureProjGradOffset,Nn as textureProjLod,Dn as textureProjLodOffset,Fn as textureProjOffset,kn as textureSize,z as transformFloatToInt,$ as transformFloatToUInt,T as transformIntToFloat,N as transformTypeToBooleanType,E as transformUIntToFloat,Mn as transpose,Sn as trunc,Me as uintBitsToFloat,Rn as unpackHalf2x16,Pn as unpackSnorm2x16,jn as unpackUnorm2x16,Bn as unpackVec4,lt as vec2,at as vec3,ft as vec4,Ft as when,Lt as xor};
2
+ import{__decorate as t}from"tslib";import{ShaderPrimitiveNode as e,cloneShaderNode as n,ShaderConditionNode as r,ShaderPropertyAccessNode as i,ShaderFunctionNode as c,ShaderArrayWriteNode as s,ShaderBlockNode as u,ShaderPropertyAccess2DNode as o,ShaderArrayReadNode as h,ShaderScopeNode as l}from"./ShaderGraphNode.js";var a,f,p,d,y,w,m,v,b,g,x,I,E;function $(t){switch(t.type){case"uint":return C;case"uvec2":return X;case"uvec3":return Y;case"uvec4":return _;default:throw new Error("Found unexpected type")}}function z(t){switch(t.type){case"float":return A;case"vec2":return G;case"vec3":return H;case"vec4":return V;default:throw new Error("Found unexpected type")}}function T(t){switch(t.type){case"int":return C;case"ivec2":return X;case"ivec3":return Y;case"ivec4":return _;default:throw new Error("Found unexpected type")}}function N(t){switch(t.type){case"float":return W;case"vec2":return Z;case"vec3":return tt;case"vec4":return et;default:throw new Error("Found unexpected type")}}function D(t){switch(t.type){case"bool":case"float":case"int":case"uint":return J;case"bvec2":case"vec2":case"ivec2":case"uvec2":return K;case"bvec3":case"vec3":case"ivec3":case"uvec3":return L;case"bvec4":case"vec4":case"ivec4":case"uvec4":return Q;default:throw new Error("Unable to handle type")}}function F(t){switch(t.type){case"bool":case"bvec2":case"bvec3":case"bvec4":return J;case"float":case"vec2":case"vec3":case"vec4":return C;case"int":case"ivec2":case"ivec3":case"ivec4":return W;case"uint":case"uvec2":case"uvec3":case"uvec4":return A;default:throw new Error("Unable to handle type")}}function k(t){switch(t.type){case"float":case"int":case"uint":case"bool":case"sampler2D":return 1;case"vec2":case"ivec2":case"uvec2":case"bvec2":return 2;case"vec3":case"ivec3":case"uvec3":case"bvec3":return 3;case"vec4":case"ivec4":case"uvec4":case"bvec4":case"mat2":return 4;case"mat3":return 9;case"mat4":return 16;case"array":case"array-2d":return t.size*k(t.elementType)}}function M(t){const e=[["float","vec2","vec3","vec4"],["int","ivec2","ivec3","ivec4"],["uint","uvec2","uvec3","uvec4"],["bool","bvec2","bvec3","bvec4"]];for(const n of e)if(n.includes(t))return n.map(t=>ct[t]);throw new Error("Unable to find type family")}function S(t){return new Proxy(t,{get(e,n){if("constructor"===n)return new Proxy(e.constructor,{construct:(t,e,n)=>S(new t(...e))});if(n in e)return e[n];if("string"==typeof n){const e=M(t.type);return dt(t,n,e[n.length-1])}}})}function R(t){return new Proxy(t,{construct:(t,e,n)=>S(new t(...e))})}function j(t,e){if(!Number.isSafeInteger(t)||t<0||t>=e)throw new B}class B extends Error{}class q extends e{static{this.type="array"}constructor(t,e,n=null){super(),this.elementType=t,this.size=e,this.writeNode=n,this.type="array"}get children(){return this.writeNode?[this.writeNode]:[this.elementType]}clone(){const t=this.writeNode?n(this.writeNode):null,e=new q(n(this.elementType),this.size,t);return super.cloneInto(e),e}set(t,e){return"number"==typeof t&&j(t,this.size),new q(n(this.elementType),this.size,new s(this,t,e))}get(t,e){"number"==typeof t&&j(t,this.size);const n=null!=e?new W(e):null;if(null!=n){const e=F(this.elementType.constructor);return yt(this,new W(t),n,e)}return wt(this,t,this.elementType.constructor)}last(){return this.get(this.size-1)}first(){return this.get(0)}findIndex(t,e,n){return $t(this,t,e,n)}glslFindIndex(t,e,n){return zt(this,t,e,n)}static ofType(t,e){const n=t;return class extends q{static{this.elementType=t}static{this.size=e}constructor(){super(new n,e)}}}}class U extends e{static{this.type="array-2d"}constructor(t,e,n,r=!1){super(),this.elementType=t,this.xSize=e,this.ySize=n,this.isRowMajor=r,this.type="array-2d",this.children=Array(e*n).fill(t)}clone(){const t=new U(n(this.elementType),this.xSize,this.ySize,this.isRowMajor);return t.children=this.children.map(n),super.cloneInto(t),t}get size(){return this.xSize*this.ySize}get(t,e){return this.isRowMajor?this._getRowMajor(t,e):this._getColumnMajor(t,e)}_getColumnMajor(t,e){const n=new W(t);return dt(this,new W(e).add(n.multiply(this.xSize)),this.elementType.constructor)}_getRowMajor(t,e){const n=new W(t),r=new W(e);return dt(this,n.add(r.multiply(this.ySize)),this.elementType.constructor)}static ofType(t,e,n,r=!1){return new Proxy(q,{construct:(i,c)=>new U(new t,e,n,r)})}}class P extends e{constructor(){super(...arguments),this.type="sampler2D",this.children=[]}static{this.type="sampler2D"}clone(){const t=new P;return t.children=this.children.map(n),super.cloneInto(t),t}}class C extends e{static{this.type="float"}constructor(t){super(),this.type="float",this.children=[t]}clone(){const t=new C(n(this.children[0]));return super.cloneInto(t),t}multiply(t){return Ft(this,"number"==typeof t?O(t,C):t)}divide(t){return kt(this,"number"==typeof t?O(t,C):t)}add(t){return Mt(this,"number"==typeof t?O(t,C):t)}subtract(t){return St(this,"number"==typeof t?O(t,C):t)}}let X=class extends e{static{a=this}static{this.type="vec2"}constructor(t,e){super(),this.type="vec2",this.children=[t,e].filter(t=>null!=t)}clone(){const t=new a(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",C)}get 1(){return dt(this,"[1]",C)}get 2(){throw new B}get 3(){throw new B}multiply(t){return Ft(this,"number"==typeof t?O(t,C):t)}divide(t){return kt(this,"number"==typeof t?O(t,C):t)}add(t){return Mt(this,"number"==typeof t?O(t,C):t)}subtract(t){return St(this,"number"==typeof t?O(t,C):t)}};X=a=t([R],X);let Y=class extends e{static{f=this}static{this.type="vec3"}constructor(t,e,n){super(),this.type="vec3",this.children=[t,e,n].filter(t=>null!=t)}get 0(){return dt(this,"[0]",C)}get 1(){return dt(this,"[1]",C)}get 2(){return dt(this,"[2]",C)}get 3(){throw new B}clone(){const t=new f(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}multiply(t){return Ft(this,"number"==typeof t?O(t,C):t)}divide(t){return kt(this,"number"==typeof t?O(t,C):t)}add(t){return Mt(this,"number"==typeof t?O(t,C):t)}subtract(t){return St(this,"number"==typeof t?O(t,C):t)}};Y=f=t([R],Y);let _=class extends e{static{p=this}static{this.type="vec4"}constructor(t,e,n,r){super(),this.type="vec4",this.children=[t,e,n,r].filter(t=>null!=t)}clone(){const t=new p(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",C)}get 1(){return dt(this,"[1]",C)}get 2(){return dt(this,"[2]",C)}get 3(){return dt(this,"[3]",C)}multiply(t){return Ft(this,"number"==typeof t?O(t,C):t)}divide(t){return kt(this,"number"==typeof t?O(t,C):t)}add(t){return Mt(this,"number"==typeof t?O(t,C):t)}subtract(t){return St(this,"number"==typeof t?O(t,C):t)}};_=p=t([R],_);let A=class extends e{static{d=this}static{this.type="uint"}constructor(t){super(),this.type="uint",this.children=[t]}clone(){const t=new d(n(this.children[0]));return super.cloneInto(t),t}multiply(t){return Ft(this,O(t,d))}add(t){return Mt(this,O(t,d))}subtract(t){return St(this,O(t,d))}divide(t){return kt(this,O(t,d))}};A=d=t([R],A);let G=class extends e{static{y=this}static{this.type="uvec2"}constructor(t,e){super(),this.type="uvec2",this.children=[t,e].filter(t=>null!=t)}clone(){const t=new y(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",W)}get 1(){return dt(this,"[1]",W)}get 2(){throw new B}get 3(){throw new B}multiply(t){return Ft(this,"number"==typeof t?O(t,A):t)}divide(t){return kt(this,"number"==typeof t?O(t,A):t)}add(t){return Mt(this,"number"==typeof t?O(t,A):t)}subtract(t){return St(this,"number"==typeof t?O(t,A):t)}};G=y=t([R],G);let H=class extends e{static{w=this}static{this.type="uvec3"}constructor(t,e,n){super(),this.type="uvec3",this.children=[t,e,n].filter(t=>null!=t)}clone(){const t=new w(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",A)}get 1(){return dt(this,"[1]",A)}get 2(){return dt(this,"[2]",A)}get 3(){throw new B}multiply(t){return Ft(this,"number"==typeof t?O(t,A):t)}divide(t){return kt(this,"number"==typeof t?O(t,A):t)}add(t){return Mt(this,"number"==typeof t?O(t,A):t)}subtract(t){return St(this,"number"==typeof t?O(t,A):t)}};H=w=t([R],H);let V=class extends e{static{m=this}static{this.type="uvec4"}constructor(t,e,n,r){super(),this.type="uvec4",this.children=[t,e,n,r].filter(t=>null!=t)}clone(){const t=new m(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",A)}get 1(){return dt(this,"[1]",A)}get 2(){return dt(this,"[2]",A)}get 3(){return dt(this,"[3]",A)}multiply(t){return Ft(this,"number"==typeof t?O(t,A):t)}divide(t){return kt(this,"number"==typeof t?O(t,A):t)}add(t){return Mt(this,"number"==typeof t?O(t,A):t)}subtract(t){return St(this,"number"==typeof t?O(t,A):t)}};V=m=t([R],V);class J extends e{static{this.type="bool"}constructor(t){super(),this.type="bool",this.children=[t]}and(t){return Ot(this,t)}or(t){return Vt(this,t)}xor(t){return Kt(this,t)}clone(){const t=new J(n(this.children[0]));return super.cloneInto(t),t}}let K=class extends e{static{v=this}static{this.type="bvec2"}constructor(t,e){super(),this.type="bvec2",this.children=[t,e].filter(t=>null!=t)}all(){return ee(this)}any(){return ne(this)}clone(){const t=new v(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}};K=v=t([R],K);let L=class extends e{static{b=this}static{this.type="bvec3"}constructor(t,e,n){super(),this.type="bvec3",this.children=[t,e,n].filter(t=>null!=t)}all(){return ee(this)}any(){return ne(this)}clone(){const t=new b(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}};function O(t,e){if("number"==typeof t){return new e(t)}return t}L=b=t([R],L);let Q=class extends e{static{g=this}static{this.type="bvec4"}constructor(t,e,n,r){super(),this.type="bvec4",this.children=[t,e,n,r].filter(t=>null!=t)}all(){return ee(this)}any(){return ne(this)}clone(){const t=new g(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}};Q=g=t([R],Q);class W extends e{static{this.type="int"}constructor(t){super(),this.type="int",this.children=[t]}multiply(t){return Ft(this,O(t,W))}add(t){return Mt(this,O(t,W))}subtract(t){return St(this,O(t,W))}divide(t){return kt(this,O(t,W))}clone(){const t=new W(n(this.children[0]));return super.cloneInto(t),t}}let Z=class extends e{static{x=this}static{this.type="ivec2"}constructor(t,e){super(),this.type="ivec2",this.children=[t,e].filter(t=>null!=t)}clone(){const t=new x(n(this.children[0]),n(this.children[1]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",W)}get 1(){return dt(this,"[1]",W)}get 2(){throw new B}get 3(){throw new B}multiply(t){return Ft(this,"number"==typeof t?O(t,W):t)}divide(t){return kt(this,"number"==typeof t?O(t,W):t)}add(t){return Mt(this,"number"==typeof t?O(t,W):t)}subtract(t){return St(this,"number"==typeof t?O(t,W):t)}};Z=x=t([R],Z);let tt=class extends e{static{I=this}static{this.type="ivec3"}constructor(t,e,n){super(),this.type="ivec3",this.children=[t,e,n].filter(t=>null!=t)}clone(){const t=new I(n(this.children[0]),n(this.children[1]),n(this.children[2]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",W)}get 1(){return dt(this,"[1]",W)}get 2(){return dt(this,"[2]",W)}get 3(){throw new B}multiply(t){return Ft(this,"number"==typeof t?O(t,W):t)}divide(t){return kt(this,"number"==typeof t?O(t,W):t)}add(t){return Mt(this,"number"==typeof t?O(t,W):t)}subtract(t){return St(this,"number"==typeof t?O(t,W):t)}};tt=I=t([R],tt);let et=class extends e{static{E=this}static{this.type="ivec4"}constructor(t,e,n,r){super(),this.type="ivec4",this.children=[t,e,n,r].filter(t=>null!=t)}clone(){const t=new E(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get 0(){return dt(this,"[0]",W)}get 1(){return dt(this,"[1]",W)}get 2(){return dt(this,"[2]",W)}get 3(){return dt(this,"[3]",W)}multiply(t){return Ft(this,"number"==typeof t?O(t,W):t)}divide(t){return kt(this,"number"==typeof t?O(t,W):t)}add(t){return Mt(this,"number"==typeof t?O(t,W):t)}subtract(t){return St(this,"number"==typeof t?O(t,W):t)}};et=E=t([R],et);class nt extends e{static{this.type="mat2"}constructor(t,e,n,r){super(),this.type="mat2",this.children=[t,e,n,r]}clone(){const t=new nt(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]));return super.cloneInto(t),t}get(t,e){return yt(this,new W(t),new W(e),C)}multiply(t){return Ft(this,t)}}class rt extends e{static{this.type="mat3"}static identity(){return new rt(1,0,0,0,1,0,0,0,1)}static fromRotation(t){const e=un(t),n=he(t);return new rt(n,e,0,xt(e),n,0,0,0,1)}constructor(t,e,n,r,i,c,s,u,o){super(),this.type="mat3",this.children=[t,e,n,r,i,c,s,u,o]}add(t){return Mt(this,t)}multiply(t){return Ft(this,t)}get(t,e){return yt(this,new W(t),new W(e),C)}clone(){const t=new rt(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]),n(this.children[4]),n(this.children[5]),n(this.children[6]),n(this.children[7]),n(this.children[8]));return super.cloneInto(t),t}}class it extends e{static{this.type="mat4"}static identity(){return new it(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)}constructor(t,e,n,r,i,c,s,u,o,h,l,a,f,p,d,y){super(),this.type="mat4",this.children=[t,e,n,r,i,c,s,u,o,h,l,a,f,p,d,y]}static fromColumns(t,e,n,r){return new it(t.x,t.y,t.z,t.w,e.x,e.y,e.z,e.w,n.x,n.y,n.z,n.w,r.x,r.y,r.z,r.w)}multiply(t){return Ft(this,t)}get(t,e){return yt(this,new W(t),new W(e),C)}clone(){const t=new it(n(this.children[0]),n(this.children[1]),n(this.children[2]),n(this.children[3]),n(this.children[4]),n(this.children[5]),n(this.children[6]),n(this.children[7]),n(this.children[8]),n(this.children[9]),n(this.children[10]),n(this.children[11]),n(this.children[12]),n(this.children[13]),n(this.children[14]),n(this.children[15]));return super.cloneInto(t),t}}const ct={float:C,vec2:X,vec3:Y,vec4:_,int:W,ivec2:Z,ivec3:tt,ivec4:et,uint:A,uvec2:G,uvec3:H,uvec4:V,bool:J,bvec2:K,bvec3:L,bvec4:Q},st=(...t)=>new W(...t),ut=(...t)=>new C(...t),ot=(...t)=>new X(...t),ht=(...t)=>new Y(...t),lt=(...t)=>new _(...t),at=(...t)=>new nt(...t),ft=(...t)=>new rt(...t),pt=(...t)=>new it(...t);function dt(t,e,n){const r=new n(new i(e,t,n));return r.isImplicit=!0,r}function yt(t,e,n,r){const i=new r(new o(e,n,t,r));return i.isImplicit=!0,i}function wt(t,e,n){const r=new n(new h(t,e,n));return r.isImplicit=!0,r}function mt(t,e,n,r=null){if(r){const i=new r,s=new r(new c(t,[e,n],!0,!1,i));return s.isImplicit=!0,s}if("float"===e.type||"int"===e.type){const r=new n.constructor(new c(t,[e,n],!0,!1,n.constructor));return r.isImplicit=!0,r}if(("mat2"===e.type||"mat3"===e.type||"mat4"===e.type)&&"float"!==n.type){const r=new n.constructor(new c(t,[e,n],!0,!1,n.constructor));return r.isImplicit=!0,r}const i=new e.constructor(new c(t,[e,n],!0,!1,e.constructor));return i.isImplicit=!0,i}function vt(t,e,n=e.constructor){const r=new n(new c(t,[e],!1,!1,n));return r.isImplicit=!0,r}function bt(t,e,n,r=e.constructor){const i=new r(new c(t,[e,n],!1,!1,r));return i.isImplicit=!0,i}function gt(t,e,n,r,i=e.constructor){const s=new i(new c(t,[e,n,r],!1,!1,i));return s.isImplicit=!0,s}function xt(t){return Ft(t,ut(-1))}function It(t,e,n,r){return new e(new u(t,e,n,r))}function Et(t,e){const n="function"==typeof t?t():t,r=new n.constructor(new l(n).setDebugName(e));return r.isImplicit=!0,r}function $t(t,e,n=0,r=t.size){const i=new W(n).setMutable().setDebugName("FindIndexIterator"),c=e(t.get(i)).setDebugName("FindIndexPredicate"),s=It({iter:i},W,c,({out:t,iter:e,subgraph:n})=>`\n${t} = -1;\n\nfor (; ${e} < ${r}; ${e}++) {\n\n${n.body}\n\n if (${n.varName}) {\n ${t} = ${e};\n break;\n }\n\n}\n`).setDebugName("FindIndexBlock");return s}function zt(t,e,n=0,r=t.size){const i=It({array:t},W,null,({out:t,array:i})=>`\n${t} = -1;\nfor (int i = ${n}; i < ${r}; i++) {\n bool condition;\n ${e({array:i,i:"i",out:"condition"})}\n if (condition) {\n ${t} = i;\n break;\n }\n}\n`).setDebugName("GlslFindIndexBlock");return i}function Tt(t,e,n){const i="function"==typeof e?e():e,c="function"==typeof n?n():n,s=new i.constructor(new r(t,i,c));return s.isImplicit=!0,s}function Nt(...t){const e=t.map(([t,e])=>"function"==typeof e?[t,e()]:[t,e]),n=e[0][1].constructor,r=e.findIndex(t=>!0===t[0]);if(-1===r)throw new Error("A cond must have a fallthrough case with `true`/; ");const i=e.slice(0,r),c=e[r][1],s=new n(i.reduceRight((t,e)=>Tt(e[0],e[1],t),c));return s.isImplicit=!0,s}function Dt(t,e){const n=new e.constructor(new r(t,e,null));return n.isImplicit=!0,n}function Ft(t,e){return mt("*",t,e)}function kt(t,e){return mt("/",t,e)}function Mt(t,e){return mt("+",t,e)}function St(t,e){return mt("-",t,e)}function Rt(t,e){return mt("%",t,e)}function jt(t,e){return mt("<<",t,e)}function Bt(t,e){return mt(">>",t,e)}function qt(t,e){return mt("&",t,e)}function Ut(t,e){return mt("|",t,e)}function Pt(t,e){return mt("^",t,e)}function Ct(t){return vt("~",t)}function Xt(t,e){return mt("==",t,e,J)}function Yt(t,e){return mt("!=",t,e,J)}function _t(t,e){return mt("<",t,e,J)}function At(t,e){return mt("<=",t,e,J)}function Gt(t,e){return mt(">",t,e,J)}function Ht(t,e){return mt(">=",t,e,J)}function Vt(...t){return t.length<=1?t[0]:t.slice(1).reduce((t,e)=>Jt(t,e),t[0])}function Jt(t,e){return mt("||",t,e,J)}function Kt(...t){return t.length<=1?t[0]:t.slice(1).reduce((t,e)=>Lt(t,e),t[0])}function Lt(t,e){return mt("^^",t,e,J)}function Ot(...t){return t.length<=1?t[0]:t.slice(1).reduce((t,e)=>Qt(t,e),t[0])}function Qt(t,e){return mt("&&",t,e,J)}function Wt(t){return vt("abs",t)}function Zt(t){return vt("acos",t)}function te(t){return vt("acosh",t)}function ee(t){return vt("all",t,J)}function ne(t){return vt("any",t,J)}function re(t){return vt("asin",t)}function ie(t){return vt("asinh",t)}function ce(t,e){return null==e?vt("atan",t):bt("atan",t,e,t.constructor)}function se(t){return vt("atanh",t)}function ue(t){return vt("ceil",t)}function oe(t,e,n){return gt("clamp",t,e,n,t.constructor)}function he(t){return vt("cos",t)}function le(t){return vt("cosh",t)}function ae(t,e){return bt("cross",t,e,t.constructor)}function fe(t){return vt("dFdX",t)}function pe(t){return vt("dFdY",t)}function de(t){return vt("degrees",t)}function ye(t){return vt("determinant",t,C)}function we(t,e){return bt("distance",t,e,C)}function me(t,e){return bt("dot",t,e,C)}function ve(t,e){return bt("equal",t,e,D(t))}function be(t,e){return bt("greaterThan",t,e,D(t))}function ge(t,e){return bt("greaterThanEqual",t,e,D(t))}function xe(t){return vt("exp",t)}function Ie(t){return vt("exp2",t)}function Ee(t,e,n){return gt("faceforward",t,e,n)}function $e(t){return vt("floatBitsToInt",t,N(t))}function ze(t){return vt("floatBitsToUint",t,z(t))}function Te(t){return vt("floor",t)}function Ne(t){return vt("fract",t)}function De(t){return vt("fwidth",t)}function Fe(t){return vt("intBitsToFloat",t,T(t))}function ke(t){return vt("uintBitsToFloat",t,$(t))}function Me(t){return vt("inverse",t,C)}function Se(t){return vt("inversesqrt",t)}function Re(t){return vt("isinf",t,D(t))}function je(t){return vt("isnan",t,D(t))}function Be(t){return vt("length",t,C)}function qe(t,e){return bt("lessThan",t,e,D(t))}function Ue(t,e){return bt("lessThanEqual",t,e,D(t))}function Pe(t){return vt("log",t)}function Ce(t){return vt("log2",t)}function Xe(t,e){return bt("matrixCompMult",t,e)}function Ye(t,e){return bt("max",t,e)}function _e(t,e){return bt("min",t,e)}function Ae(t,e,n){return gt("mix",t,e,n)}function Ge(t,e){return bt("mod",t,e)}function He(t,e){throw new Error("modf not implemented")}function Ve(t){return vt("normalize",t)}function Je(t){return"bool"===t.type?vt("!",t):vt("not",t)}function Ke(t,e){return bt("notEqual",t,e,D(t))}function Le(t,e){throw new Error("Impl type?")}function Oe(t){return vt("packHalf2x16",t,A)}function Qe(t){return vt("packUnorm2x16",t,A)}function We(t){return vt("packSnorm2x16",t,A)}function Ze(t,e){return bt("pow",t,e)}function tn(t){return vt("radians",t)}function en(t,e){return bt("reflect",t,e)}function nn(t,e,n){return gt("refract",t,e,n)}function rn(t){return vt("round",t)}function cn(t){return vt("roundEven",t)}function sn(t){return vt("sign",t)}function un(t){return vt("sin",t)}function on(t){return vt("sinh",t)}function hn(t,e,n){return gt("smoothstep",t,e,n)}function ln(t){return vt("sqrt",t)}function an(t,e){return bt("step",t,e,e.constructor)}function fn(t){return vt("tan",t)}function pn(t){return vt("tanh",t)}function dn(t,e,n){return gt("texelFetch",t,e,n,_)}function yn(t,e,n,r){throw new Error("Impl type")}function wn(t,e,n){throw new Error("Impl type")}function mn(t,e){return bt("texture",t,e,_)}function vn(t,e,n,r){throw new Error("Impl type")}function bn(t,e,n,r,i){throw new Error("Impl type")}function gn(t,e,n){throw new Error("Impl type")}function xn(t,e,n,r){throw new Error("Impl type")}function In(t,e,n,r){throw new Error("Impl type")}function En(t,e,n){throw new Error("Impl type")}function $n(t,e,n,r){throw new Error("Impl type")}function zn(t,e,n,r,i){throw new Error("Impl type")}function Tn(t,e,n){throw new Error("Impl type")}function Nn(t,e,n,r){throw new Error("Impl type")}function Dn(t,e,n,r){throw new Error("Impl type")}function Fn(t,e){throw new Error("Impl type")}function kn(t){return vt("transpose",t)}function Mn(t){return vt("trunc",t)}function Sn(t){return vt("unpackHalf2x16",t,X)}function Rn(t){return vt("unpackUnorm2x16",t,X)}function jn(t){return vt("unpackSnorm2x16",t,X)}function Bn(t,e){const n=Ze(new C(2),new C(e));return[new _(Ge(t.x,n),Te(t.x.divide(n)),Ge(t.y,n),Te(t.y.divide(n))),new _(Ge(t.z,n),Te(t.z.divide(n)),Ge(t.w,n),Te(t.w.divide(n)))]}function qn(t,e){const{initialValue:n,xRange:r,yRange:i,callback:c}=e,[s,u]=r,[o,h]=i,l=new W(0).setMutable().setDebugName("iterX"),a=new W(0).setMutable().setDebugName("iterY"),f=n.setMutable().setDebugName("accumulator"),p=c(f,t.get(l,a),l,a).setDebugName("callback"),d=It({iterX:l,iterY:a,accumulator:f},n.constructor,p,({out:t,iterX:e,iterY:n,accumulator:r,subgraph:i})=>`\nfor (${n} = ${o}; ${n} < ${h}; ${n}++) {\n for (${e} = ${s}; ${e} < ${u}; ${e}++) {\n\n ${i.body}\n\n ${r} = ${i.varName};\n }\n}\n${t} = ${r};\n`).setDebugName("reduce2DBody");return d}export{K as BVec2,L as BVec3,Q as BVec4,J as Bool,q as FixedArray,U as FixedArray2D,C as Float,Z as IVec2,tt as IVec3,et as IVec4,W as Int,nt as Mat2,rt as Mat3,it as Mat4,P as Sampler2D,A as UInt,G as UVec2,H as UVec3,V as UVec4,X as Vec2,Y as Vec3,_ as Vec4,Jt as _or,Lt as _xor,Wt as abs,Zt as acos,te as acosh,Mt as add,ee as all,Ot as and,ne as any,re as asin,ie as asinh,ce as atan,se as atanh,qt as bitAnd,Ct as bitNot,Ut as bitOr,Bt as bitRShift,jt as bitShift,Pt as bitXor,It as block,ue as ceil,oe as clamp,Nt as cond,he as cos,le as cosh,ae as cross,fe as dFdx,pe as dFdy,wt as defineArrayRead,dt as definePropertyAccess,yt as definePropertyAccess2D,de as degrees,ye as determinant,we as distance,kt as divide,me as dot,Xt as equal,ve as equalComponent,xe as exp,Ie as exp2,Ee as faceforward,$t as findIndex,ut as float,$e as floatBitsToInt,ze as floatBitsToUint,Te as floor,Ne as fract,De as fwidth,k as getTypeElementLengthForType,zt as glslFindIndex,Gt as greaterThan,be as greaterThanComponent,Ht as greaterThanEqual,ge as greaterThanEqualComponent,Tt as ifElse,st as int,Fe as intBitsToFloat,Rt as intMod,Me as inverse,Se as inversesqrt,Re as isinf,je as isnan,Be as length,_t as lessThan,qe as lessThanComponent,At as lessThanEqual,Ue as lessThanEqualComponent,Pe as log,Ce as log2,at as mat2,ft as mat3,pt as mat4,Xe as matrixCompMult,Ye as max,_e as min,Ae as mix,Ge as mod,He as modf,Ft as multiply,Et as namedScope,xt as negate,Ve as normalize,Je as not,Yt as notEqual,Ke as notEqualComponent,Vt as or,Le as outerProduct,Oe as packHalf2x16,We as packSnorm2x16,Qe as packUnorm2x16,Ze as pow,tn as radians,qn as reduce2D,en as reflect,nn as refract,rn as round,cn as roundEven,sn as sign,un as sin,on as sinh,hn as smoothstep,ln as sqrt,an as step,St as subtract,fn as tan,pn as tanh,dn as texelFetch,yn as texelFetchOffset,wn as texture,mn as texture2D,vn as textureGrad,bn as textureGradOffset,gn as textureLod,xn as textureLodOffset,In as textureOffset,En as textureProj,$n as textureProjGrad,zn as textureProjGradOffset,Tn as textureProjLod,Nn as textureProjLodOffset,Dn as textureProjOffset,Fn as textureSize,N as transformFloatToInt,z as transformFloatToUInt,T as transformIntToFloat,D as transformTypeToBooleanType,$ as transformUIntToFloat,kn as transpose,Mn as trunc,ke as uintBitsToFloat,Sn as unpackHalf2x16,jn as unpackSnorm2x16,Rn as unpackUnorm2x16,Bn as unpackVec4,ot as vec2,ht as vec3,lt as vec4,Dt as when,Kt as xor};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t,__param as e}from"tslib";import{tileSize as o}from"../../../definitions.js";import{FragmentOutput as s,location as i,uniform as r,texture as d,define as l,input as n,UniformGroup as a,TextureGroup as p}from"../../GraphShaderModule.js";import{Mat3 as h,Vec3 as u,Vec4 as c,texture2D as m,Mat4 as y,step as v,Float as x,dot as w,max as f,FixedArray as g,Sampler2D as T}from"../../graph/glsl.js";import{AFeatureShader as A,FeatureFragmentInput as D,FeatureVertexInput as b}from"../shaders/AFeatureShader.js";import{failHittest as C}from"../shaders/hittestUtils.js";import{max4 as j}from"../shaders/utils.js";class V extends b{}t([i(3,x)],V.prototype,"inverseArea",void 0);class F extends D{}class O extends a{}t([r(g.ofType(c,2))],O.prototype,"isActive",void 0),t([r(g.ofType(c,8))],O.prototype,"colors",void 0),t([r(x)],O.prototype,"dotValue",void 0);class R extends a{}t([r(x)],R.prototype,"tileZoomFactor",void 0),t([r(x)],R.prototype,"pixelRatio",void 0),t([r(x)],R.prototype,"tileDotsOverArea",void 0);class S extends p{}t([d(T)],S.prototype,"dotTexture0",void 0),t([d(T)],S.prototype,"dotTexture1",void 0);class _ extends A{constructor(){super(...arguments),this.type="DotDensityPolygonShader"}_dotThreshold(t,e,o){return t.divide(e).divide(o)}vertex(t){const e=new h(2/o,0,0,0,-2/o,0,-1,1,1).multiply(new u(t.pos,1)),s=this.clip(t.id),i=new c(e.xy,s,1),r=this.getVVData(t.id).multiply(this.instance.isActive.get(0)).multiply(t.inverseArea),d=this.storageTextures.getDataDrivenData0(this.getAttributeDataCoords(t.id)).multiply(this.instance.isActive.get(1)).multiply(t.inverseArea),l=this.draw.tileZoomFactor.multiply(o).divide(this.draw.pixelRatio),n=this._dotThreshold(r,this.instance.dotValue,this.draw.tileDotsOverArea),a=this._dotThreshold(d,this.instance.dotValue,this.draw.tileDotsOverArea),p=t.pos.add(.5).divide(l);return{glPosition:i,color:new c(0,0,0,0),textureCoords:p,thresholds0:n,thresholds1:a}}fragment(t){const e=new s,o=m(this.drawTextures.dotTexture0,t.textureCoords),i=m(this.drawTextures.dotTexture1,t.textureCoords),r=t.thresholds0.subtract(o),d=t.thresholds1.subtract(i);let l;const n=y.fromColumns(this.instance.colors[0],this.instance.colors[1],this.instance.colors[2],this.instance.colors[3]),a=y.fromColumns(this.instance.colors[4],this.instance.colors[5],this.instance.colors[6],this.instance.colors[7]);if(this.blending){const t=v(new x(0),r),e=v(new x(0),d),o=w(t,r).add(w(e,d)),s=v(o,new x(0)),i=new x(1).subtract(s),p=o.add(s),h=r.multiply(t).divide(p),u=d.multiply(e).divide(p),c=n.multiply(h).add(a.multiply(u));l=i.multiply(c)}else{const t=f(j(r),j(d)),e=v(t,new x(0)),o=new x(1).subtract(e),s=v(t,r),i=v(t,d),p=n.multiply(s).add(a.multiply(i));l=o.multiply(p)}return e.fragColor=l,e}hittest(t){return C(this.hittestRequest)}}t([l],_.prototype,"blending",void 0),t([r(O)],_.prototype,"instance",void 0),t([r(R)],_.prototype,"draw",void 0),t([d(S)],_.prototype,"drawTextures",void 0),t([e(0,n(V))],_.prototype,"vertex",null),t([e(0,n(D))],_.prototype,"fragment",null);export{S as DotDensityPolygonDrawTextures,R as DotDensityPolygonDrawUniforms,F as DotDensityPolygonFragmentInput,O as DotDensityPolygonInstanceUniforms,_ as DotDensityPolygonShader,V as DotDensityPolygonVertexInput};
2
+ import{__decorate as t,__param as e}from"tslib";import{tileSize as o}from"../../../definitions.js";import{FragmentOutput as s,location as i,uniform as r,texture as d,define as l,input as n,UniformGroup as a,TextureGroup as p}from"../../GraphShaderModule.js";import{Mat3 as h,Vec3 as u,Vec4 as c,texture2D as m,Mat4 as y,step as v,Float as g,dot as x,max as w,FixedArray as f,Sampler2D as T}from"../../graph/glsl.js";import{AFeatureShader as A,FeatureFragmentInput as D,FeatureVertexInput as b}from"../shaders/AFeatureShader.js";import{failHittest as C}from"../shaders/hittestUtils.js";import{max4 as j}from"../shaders/utils.js";class V extends b{}t([i(3,g)],V.prototype,"inverseArea",void 0);class F extends D{}class O extends a{}t([r(f.ofType(c,2))],O.prototype,"isActive",void 0),t([r(f.ofType(c,8))],O.prototype,"colors",void 0),t([r(g)],O.prototype,"dotValue",void 0);class R extends a{}t([r(g)],R.prototype,"tileZoomFactor",void 0),t([r(g)],R.prototype,"pixelRatio",void 0),t([r(g)],R.prototype,"tileDotsOverArea",void 0);class S extends p{}t([d(T)],S.prototype,"dotTexture0",void 0),t([d(T)],S.prototype,"dotTexture1",void 0);class _ extends A{constructor(){super(...arguments),this.type="DotDensityPolygonShader"}_dotThreshold(t,e,o){return t.divide(e).divide(o)}vertex(t){const e=new h(2/o,0,0,0,-2/o,0,-1,1,1).multiply(new u(t.pos,1)),s=this.clip(t.id),i=new c(e.xy,s,1),r=this.getVVData(t.id).multiply(this.instance.isActive.get(0)).multiply(t.inverseArea),d=this.storageTextures.getDataDrivenData0(this.getAttributeDataCoords(t.id)).multiply(this.instance.isActive.get(1)).multiply(t.inverseArea),l=this.draw.tileZoomFactor.multiply(o).divide(this.draw.pixelRatio),n=this._dotThreshold(r,this.instance.dotValue,this.draw.tileDotsOverArea),a=this._dotThreshold(d,this.instance.dotValue,this.draw.tileDotsOverArea),p=t.pos.add(.5).divide(l);return{glPosition:i,color:new c(0,0,0,0),textureCoords:p,thresholds0:n,thresholds1:a}}fragment(t){const e=new s,o=m(this.drawTextures.dotTexture0,t.textureCoords),i=m(this.drawTextures.dotTexture1,t.textureCoords),r=t.thresholds0.subtract(o),d=t.thresholds1.subtract(i);let l;const n=y.fromColumns(this.instance.colors.get(0),this.instance.colors.get(1),this.instance.colors.get(2),this.instance.colors.get(3)),a=y.fromColumns(this.instance.colors.get(4),this.instance.colors.get(5),this.instance.colors.get(6),this.instance.colors.get(7));if(this.blending){const t=v(new g(0),r),e=v(new g(0),d),o=x(t,r).add(x(e,d)),s=v(o,new g(0)),i=new g(1).subtract(s),p=o.add(s),h=r.multiply(t).divide(p),u=d.multiply(e).divide(p),c=n.multiply(h).add(a.multiply(u));l=i.multiply(c)}else{const t=w(j(r),j(d)),e=v(t,new g(0)),o=new g(1).subtract(e),s=v(t,r),i=v(t,d),p=n.multiply(s).add(a.multiply(i));l=o.multiply(p)}return e.fragColor=l,e}hittest(t){return C(this.hittestRequest)}}t([l],_.prototype,"blending",void 0),t([r(O)],_.prototype,"instance",void 0),t([r(R)],_.prototype,"draw",void 0),t([d(S)],_.prototype,"drawTextures",void 0),t([e(0,n(V))],_.prototype,"vertex",null),t([e(0,n(D))],_.prototype,"fragment",null);export{S as DotDensityPolygonDrawTextures,R as DotDensityPolygonDrawUniforms,F as DotDensityPolygonFragmentInput,O as DotDensityPolygonInstanceUniforms,_ as DotDensityPolygonShader,V as DotDensityPolygonVertexInput};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import has from"../../../../../../../core/has.js";import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{Technique as t}from"../Technique.js";import{TextureStatisticsTechnique as i}from"../TextureStatisticsTechnique.js";import{getInterpolationDefines as r}from"./processor/textureUtils.js";import{RasterColorizerLUTShader as s}from"../shaders/raster/RasterColorizerLUTShader.js";import{RasterColorizerShadedReliefShader as o}from"../shaders/raster/RasterColorizerShadedReliefShader.js";import{RasterColorizerStretchShader as n}from"../shaders/raster/RasterColorizerStretchShader.js";import{SizedPixelFormat as a,PixelType as u}from"../../../../../../webgl/enums.js";import{DisposableFramebufferObject as c}from"../../../../../../webgl/FramebufferObject.js";import m from"../../../../../../webgl/Texture.js";import{TextureDescriptor as l}from"../../../../../../webgl/TextureDescriptor.js";const p=160,h=new Set(["f32","f64","u16","s16","u32","s32"]);class d extends t{constructor(){super(...arguments),this.name="BrushRasterColorizer",this.type=0,this.shaders={lut:new s,stretch:new n,shadedRelief:new o},this._mosaicFbo=null,this._statisticsTechnique=null,this._draTimer=0}shutdown(t){super.shutdown(t),this._mosaicFbo=e(this._mosaicFbo),this._statisticsTechnique=e(this._statisticsTechnique)}render(t,i){const r=i.bitmaps.some(f);r||(this._mosaicFbo=e(this._mosaicFbo),this._statisticsTechnique=e(this._statisticsTechnique));const s=r?this._computeStatisticsTextures(t,i):void 0;for(const e of i.bitmaps){if(!e.source||e.suspended)continue;t.timeline.begin(this.name);const{painter:i}=t;i.setPipelineState({depth:!1,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1},color:{write:[!0,!0,!0,!0],blendMode:"composite"}}),e.updateTexture(t),e.updateProcessedTexture();const{type:r}=e.symbolizerParameters,o="stretch"===r?this._getStretchOptions(e,s):"lut"===r?this._getLutOptions(e):this._getShadedReliefOptions(e);"bilinear"!==e.interpolation||t.context.capabilities.textureFloatLinear||(o.defines.bilinear=!0),i.submitDrawMesh(t.context,o,i.quadMesh,e),t.timeline.end(this.name)}}_computeStatisticsTextures(e,t){this._statisticsTechnique??=new i;const r=this._statisticsTechnique;let s=has("esri-2d-dra-delay");if(null==s){const e=t.bitmaps.find(f),{stretchType:i,bandCount:r}=e.symbolizerParameters,{pixelType:o}=e.source;"minMax"===i&&r>=3&&h.has(o)&&(s=p)}if(s){const i=performance.now();(i-this._draTimer>=s||e.stationary||!r.minValuesTexture)&&(this._mosaic(e,t),r.render(e,{fbo:this._mosaicFbo}),this._draTimer=i)}else this._mosaic(e,t),r.render(e,{fbo:this._mosaicFbo});return{minTexture:r.minValuesTexture,maxTexture:r.maxValuesTexture,meanTexture:r.meanValuesTexture,stddevTexture:r.stdDevValuesTexture}}_mosaic(e,t){const{context:i,painter:r}=e,s=i.boundFramebuffer;if(null==s)return;if(this._mosaicFbo)this._mosaicFbo.resize(s.width,s.height);else{const e=x(i,s.width,s.height);this._mosaicFbo=new c(i,e)}i.bindFramebuffer(this._mosaicFbo);const o="RasterColorizerMosaic";for(const n of t.bitmaps){if(!f(n))continue;e.timeline.begin(o),r.setPipelineState({depth:!1,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1},color:{write:[!0,!0,!0,!0],blendMode:"composite"}});const t=n.interpolation;n.interpolation="nearest",n.updateTexture(e),n.updateProcessedTexture();const i=this._getStretchOptions(n);i.defines.noOp=!0,r.submitDrawMesh(e.context,i,r.quadMesh,n),n.interpolation=t,e.timeline.end(o)}i.bindFramebuffer(s)}_getLutOptions(e){const{config:t,projectionConfig:i,projectionTextures:s,colormapConfig:o,colormapTextures:n,textures:a,projectionDefines:u}=this._getCommonConfig(e),c=r(e);return{shader:this.shaders.lut,uniforms:{projectionConfig:i,config:t,colormapConfig:o},textures:{...a,projectionTextures:s,colormapTextures:n},defines:{...u,...c,applyPixelMask:!!a.pixelMaskTexture,applyPixelHighlights:!!a.highlightTexture},optionalAttributes:null,useComputeBuffer:!1}}_getStretchOptions(e,t){const i=e.symbolizerParameters,{config:s,projectionConfig:o,projectionTextures:n,colormapConfig:a,colormapTextures:u,textures:c,projectionDefines:m,textureUnit:l}=this._getCommonConfig(e),p=r(e),h=t?{numberOfStandardDeviations:i.numberOfStandardDeviations||2}:void 0,d=t?{minTexture:{texture:t.minTexture,unit:l},maxTexture:{texture:t.maxTexture,unit:l+1},meanTexture:{texture:t.meanTexture,unit:l+2},stddevTexture:{texture:t.stddevTexture,unit:l+3}}:void 0,x=t?"standardDeviation"===i.stretchType?2:1:0;return{shader:this.shaders.stretch,uniforms:{projectionConfig:o,config:s,stretchConfig:i,colormapConfig:a,statisticsConfig:h},textures:{...c,projectionTextures:n,colormapTextures:u,statisticsTextures:d},defines:{...m,...p,isMultiband:i.bandCount>1,applyColormap:!!a,useGamma:i.useGamma,noOp:e.isRenderedSource&&!e.processed,applyPixelMask:!!c.pixelMaskTexture,applyPixelHighlights:!!c.highlightTexture,draStretchType:x},optionalAttributes:null,useComputeBuffer:!1}}_getShadedReliefOptions(e){const t=e.symbolizerParameters,{config:i,projectionConfig:s,projectionTextures:o,colormapConfig:n,colormapTextures:a,textures:u,projectionDefines:c}=this._getCommonConfig(e),m=r(e);return{shader:this.shaders.shadedRelief,uniforms:{projectionConfig:s,config:i,hillshadeConfig:t,colormapConfig:n},textures:{...u,projectionTextures:o,colormapTextures:a},defines:{...c,...m,isMultidirectional:t.hillshadeType>0,applyColormap:!!n,applyPixelMask:!!u.pixelMaskTexture,applyPixelHighlights:!!u.highlightTexture},optionalAttributes:null,useComputeBuffer:!1}}_getCommonConfig(e){const{coordScale:t,computedOpacity:i,transforms:r}=e,{names:s,textures:o}=e.getTextures({useProcessedTexture:e.processed}),n=o[s.indexOf("u_image")],a=e.getRasterTextureSize();let u=0;const c={dvsMat3:r.displayViewScreenMat3,coordScale:t,srcImageSize:a,opacity:i},m={texture:{texture:n,unit:u++},pixelMaskTexture:null,highlightTexture:null},l=o[s.indexOf("u_transformGrid")],{transformGrid:p}=e,h=!(!l||!p),d=h?{targetImageSize:[e.width,e.height],transformSpacing:p.spacing,transformGridSize:p.size}:void 0,x=h?{transformTexture:{texture:l,unit:u++}}:void 0,f=o[s.indexOf("u_colormap")],{colormap:g,colormapOffset:T}=e.symbolizerParameters,b=f&&g?{colormapOffset:T??0,colormapMaxIndex:g.length/4-1}:void 0,_=f&&g?{colormapTexture:{texture:f,unit:u++}}:void 0,C=o[s.indexOf("u_mask")];C&&(m.pixelMaskTexture={texture:C,unit:u++});const{highlightTexture:j}=e;j&&(m.highlightTexture={texture:j,unit:u++});return{config:c,projectionConfig:d,projectionTextures:x,colormapConfig:b,colormapTextures:_,textures:m,projectionDefines:{applyProjection:h,lookupProjection:h&&1===p.spacing[0]},textureUnit:u}}}function x(e,t,i){const r=new l(t,i);return r.internalFormat=a.RGBA32F,r.samplingMode=9728,r.dataType=u.FLOAT,r.wrapMode=33071,new m(e,r)}function f(e){return!e.suspended&&null!=e.source&&!e.isRenderedSource&&"stretch"===e.symbolizerParameters.type&&!!e.symbolizerParameters.dynamicRangeAdjustment}export{d as RasterColorizerTechnique};
2
+ import has from"../../../../../../../core/has.js";import{disposeMaybe as e}from"../../../../../../../core/maybe.js";import{Technique as t}from"../Technique.js";import{TextureStatisticsTechnique as i}from"../TextureStatisticsTechnique.js";import{getInterpolationDefines as r}from"./processor/textureUtils.js";import{RasterColorizerLUTShader as s}from"../shaders/raster/RasterColorizerLUTShader.js";import{RasterColorizerShadedReliefShader as o}from"../shaders/raster/RasterColorizerShadedReliefShader.js";import{RasterColorizerStretchShader as n}from"../shaders/raster/RasterColorizerStretchShader.js";import{SizedPixelFormat as a,PixelType as u}from"../../../../../../webgl/enums.js";import{DisposableFramebufferObject as c}from"../../../../../../webgl/FramebufferObject.js";import m from"../../../../../../webgl/Texture.js";import{TextureDescriptor as l}from"../../../../../../webgl/TextureDescriptor.js";const p=160,h=new Set(["f32","f64","u16","s16","u32","s32"]);class d extends t{constructor(){super(...arguments),this.name="BrushRasterColorizer",this.type=0,this.shaders={lut:new s,stretch:new n,shadedRelief:new o},this._mosaicFbo=null,this._statisticsTechnique=null,this._draTimer=0}shutdown(t){super.shutdown(t),this._mosaicFbo=e(this._mosaicFbo),this._statisticsTechnique=e(this._statisticsTechnique)}render(t,i){const r=i.bitmaps.some(f);r||(this._mosaicFbo=e(this._mosaicFbo),this._statisticsTechnique=e(this._statisticsTechnique));const s=r?this._computeStatisticsTextures(t,i):void 0;for(const e of i.bitmaps){if(!e.source||e.suspended)continue;t.timeline.begin(this.name);const{painter:i}=t;i.setPipelineState({depth:!1,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1},color:{write:[!0,!0,!0,!0],blendMode:"composite"}}),e.updateTexture(t),e.updateProcessedTexture();const{type:r}=e.symbolizerParameters,o="stretch"===r?this._getStretchOptions(e,s):"lut"===r?this._getLutOptions(e):this._getShadedReliefOptions(e);"bilinear"!==e.interpolation||t.context.capabilities.textureFloatLinear||(o.defines.bilinear=!0),i.submitDrawMesh(t.context,o,i.quadMesh,e),t.timeline.end(this.name)}}_computeStatisticsTextures(e,t){this._statisticsTechnique??=new i;const r=this._statisticsTechnique;let s=has("esri-2d-dra-delay");if(null==s){const e=t.bitmaps.find(f),{stretchType:i,bandCount:r}=e.symbolizerParameters,{pixelType:o}=e.source;"minMax"===i&&r>=3&&h.has(o)&&(s=p)}if(s){const i=performance.now();(i-this._draTimer>=s||e.stationary||!r.minValuesTexture)&&(this._mosaic(e,t),r.render(e,{fbo:this._mosaicFbo}),this._draTimer=i)}else this._mosaic(e,t),r.render(e,{fbo:this._mosaicFbo});return{minTexture:r.minValuesTexture,maxTexture:r.maxValuesTexture,meanTexture:r.meanValuesTexture,stddevTexture:r.stdDevValuesTexture}}_mosaic(e,t){const{context:i,painter:r}=e,s=i.boundFramebuffer;if(null==s)return;if(this._mosaicFbo)this._mosaicFbo.resize(s.width,s.height);else{const e=x(i,s.width,s.height);this._mosaicFbo=new c(i,e)}i.bindFramebuffer(this._mosaicFbo);const o="RasterColorizerMosaic";for(const n of t.bitmaps){if(!f(n))continue;e.timeline.begin(o),r.setPipelineState({depth:!1,stencil:{test:{mask:255,compare:514,op:{fail:7680,zFail:7680,zPass:7680}},write:!1},color:{write:[!0,!0,!0,!0],blendMode:"composite"}});const t=n.interpolation;n.interpolation="nearest",n.updateTexture(e),n.updateProcessedTexture();const i=this._getStretchOptions(n,void 0,!0);i.defines.noOp=!0,r.submitDrawMesh(e.context,i,r.quadMesh,n),n.interpolation=t,e.timeline.end(o)}i.bindFramebuffer(s)}_getLutOptions(e){const{config:t,projectionConfig:i,projectionTextures:s,colormapConfig:o,colormapTextures:n,textures:a,projectionDefines:u}=this._getCommonConfig(e),c=r(e);return{shader:this.shaders.lut,uniforms:{projectionConfig:i,config:t,colormapConfig:o},textures:{...a,projectionTextures:s,colormapTextures:n},defines:{...u,...c,applyPixelMask:!!a.pixelMaskTexture,applyPixelHighlights:!!a.highlightTexture},optionalAttributes:null,useComputeBuffer:!1}}_getStretchOptions(e,t,i=!1){const s=e.symbolizerParameters,{config:o,projectionConfig:n,projectionTextures:a,colormapConfig:u,colormapTextures:c,textures:m,projectionDefines:l,textureUnit:p}=this._getCommonConfig(e),h=r(e),d=t?{numberOfStandardDeviations:s.numberOfStandardDeviations||2}:void 0,x=t?{minTexture:{texture:t.minTexture,unit:p},maxTexture:{texture:t.maxTexture,unit:p+1},meanTexture:{texture:t.meanTexture,unit:p+2},stddevTexture:{texture:t.stddevTexture,unit:p+3}}:void 0,f=t?"standardDeviation"===s.stretchType?2:1:0;return{shader:this.shaders.stretch,uniforms:{projectionConfig:n,config:o,stretchConfig:s,colormapConfig:u,statisticsConfig:d},textures:{...m,projectionTextures:a,colormapTextures:c,statisticsTextures:x},defines:{...l,...h,isMultiband:s.bandCount>1,applyColormap:!!u,useGamma:s.useGamma,noOp:e.isRenderedSource&&!e.processed,applyPixelMask:!!m.pixelMaskTexture,applyPixelHighlights:!i&&!!m.highlightTexture,draStretchType:f},optionalAttributes:null,useComputeBuffer:!1}}_getShadedReliefOptions(e){const t=e.symbolizerParameters,{config:i,projectionConfig:s,projectionTextures:o,colormapConfig:n,colormapTextures:a,textures:u,projectionDefines:c}=this._getCommonConfig(e),m=r(e);return{shader:this.shaders.shadedRelief,uniforms:{projectionConfig:s,config:i,hillshadeConfig:t,colormapConfig:n},textures:{...u,projectionTextures:o,colormapTextures:a},defines:{...c,...m,isMultidirectional:t.hillshadeType>0,applyColormap:!!n,applyPixelMask:!!u.pixelMaskTexture,applyPixelHighlights:!!u.highlightTexture},optionalAttributes:null,useComputeBuffer:!1}}_getCommonConfig(e){const{coordScale:t,computedOpacity:i,transforms:r}=e,{names:s,textures:o}=e.getTextures({useProcessedTexture:e.processed}),n=o[s.indexOf("u_image")],a=e.getRasterTextureSize();let u=0;const c={dvsMat3:r.displayViewScreenMat3,coordScale:t,srcImageSize:a,opacity:i},m={texture:{texture:n,unit:u++},pixelMaskTexture:null,highlightTexture:null},l=o[s.indexOf("u_transformGrid")],{transformGrid:p}=e,h=!(!l||!p),d=h?{targetImageSize:[e.width,e.height],transformSpacing:p.spacing,transformGridSize:p.size}:void 0,x=h?{transformTexture:{texture:l,unit:u++}}:void 0,f=o[s.indexOf("u_colormap")],{colormap:g,colormapOffset:T}=e.symbolizerParameters,b=f&&g?{colormapOffset:T??0,colormapMaxIndex:g.length/4-1}:void 0,_=f&&g?{colormapTexture:{texture:f,unit:u++}}:void 0,C=o[s.indexOf("u_mask")];C&&(m.pixelMaskTexture={texture:C,unit:u++});const{highlightTexture:j}=e;j&&(m.highlightTexture={texture:j,unit:u++});return{config:c,projectionConfig:d,projectionTextures:x,colormapConfig:b,colormapTextures:_,textures:m,projectionDefines:{applyProjection:h,lookupProjection:h&&1===p.spacing[0]},textureUnit:u}}}function x(e,t,i){const r=new l(t,i);return r.internalFormat=a.RGBA32F,r.samplingMode=9728,r.dataType=u.FLOAT,r.wrapMode=33071,new m(e,r)}function f(e){return!e.suspended&&null!=e.source&&!e.isRenderedSource&&"stretch"===e.symbolizerParameters.type&&!!e.symbolizerParameters.dynamicRangeAdjustment}export{d as RasterColorizerTechnique};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as o,__param as t}from"tslib";import{FragmentOutput as e,uniform as i,texture as r,input as s,define as l,UniformGroup as p,TextureGroup as u}from"../../GraphShaderModule.js";import{clamp as m,Float as n,Vec4 as d,texture2D as y,mix as a,Vec3 as h,dot as g,smoothstep as c,Sampler2D as v,FixedArray as f}from"../../graph/glsl.js";import{PostProcessingShader as b,PostProcessingFragmentInput as x}from"./PostProcessingShader.js";class T extends p{}o([i(h)],T.prototype,"defaultColor",void 0),o([i(n)],T.prototype,"defaultOpacity",void 0),o([i(n)],T.prototype,"luminosityThreshold",void 0),o([i(n)],T.prototype,"smoothWidth",void 0);class C extends b{constructor(){super(...arguments),this.type="LuminosityHighPassShader"}fragment(o){const t=new e,i=y(this.luminosityHighPassTexture,o.uv),r=new h(.299,.587,.114),s=g(i.xyz,r),l=new d(this.luminosityHighPassConfig.defaultColor.rgb,this.luminosityHighPassConfig.defaultOpacity),p=c(this.luminosityHighPassConfig.luminosityThreshold,this.luminosityHighPassConfig.luminosityThreshold.add(this.luminosityHighPassConfig.smoothWidth),s);return t.fragColor=a(l,i,p),t}}o([i(T)],C.prototype,"luminosityHighPassConfig",void 0),o([r(v)],C.prototype,"luminosityHighPassTexture",void 0),o([t(0,s(x))],C.prototype,"fragment",null);class w extends p{}o([i(n)],w.prototype,"bloomStrength",void 0),o([i(n)],w.prototype,"bloomRadius",void 0),o([i(f.ofType(n,5))],w.prototype,"bloomFactors",void 0),o([i(h)],w.prototype,"bloomTintColor",void 0);class P extends u{}o([r(v)],P.prototype,"blurTexture1",void 0),o([r(v)],P.prototype,"blurTexture2",void 0),o([r(v)],P.prototype,"blurTexture3",void 0),o([r(v)],P.prototype,"blurTexture4",void 0),o([r(v)],P.prototype,"blurTexture5",void 0);class H extends b{constructor(){super(...arguments),this.type="CompositeShader"}fragment(o){const t=new e,{blurTexture1:i,blurTexture2:r,blurTexture3:s,blurTexture4:l,blurTexture5:p}=this.compositeTextures,{bloomStrength:u,bloomFactors:a,bloomTintColor:h,bloomRadius:g}=this.compositeConfig,c=m(g,new n(0),new n(1)),v=this._lerpBloomFactor(a[0],c).multiply(new d(h,1).multiply(y(i,o.uv))),f=this._lerpBloomFactor(a[1],c).multiply(new d(h,1).multiply(y(r,o.uv))),b=this._lerpBloomFactor(a[2],c).multiply(new d(h,1).multiply(y(s,o.uv))),x=this._lerpBloomFactor(a[3],c).multiply(new d(h,1).multiply(y(l,o.uv))),T=this._lerpBloomFactor(a[4],c).multiply(new d(h,1).multiply(y(p,o.uv))),C=u.multiply(v.add(f.add(b.add(x.add(T)))));return t.fragColor=C,t}_lerpBloomFactor(o,t){const e=new n(1.2).subtract(o);return a(o,e,t)}}o([l],H.prototype,"numMips",void 0),o([i(w)],H.prototype,"compositeConfig",void 0),o([r(P)],H.prototype,"compositeTextures",void 0),o([t(0,s(x))],H.prototype,"fragment",null);export{H as BloomCompositeShader,C as LuminosityHighPassShader};
2
+ import{__decorate as o,__param as t}from"tslib";import{FragmentOutput as e,uniform as i,texture as r,input as s,define as l,UniformGroup as p,TextureGroup as u}from"../../GraphShaderModule.js";import{clamp as m,Float as n,Vec4 as d,texture2D as y,mix as a,Vec3 as h,dot as g,smoothstep as c,Sampler2D as v,FixedArray as f}from"../../graph/glsl.js";import{PostProcessingShader as b,PostProcessingFragmentInput as x}from"./PostProcessingShader.js";class T extends p{}o([i(h)],T.prototype,"defaultColor",void 0),o([i(n)],T.prototype,"defaultOpacity",void 0),o([i(n)],T.prototype,"luminosityThreshold",void 0),o([i(n)],T.prototype,"smoothWidth",void 0);class C extends b{constructor(){super(...arguments),this.type="LuminosityHighPassShader"}fragment(o){const t=new e,i=y(this.luminosityHighPassTexture,o.uv),r=new h(.299,.587,.114),s=g(i.xyz,r),l=new d(this.luminosityHighPassConfig.defaultColor.rgb,this.luminosityHighPassConfig.defaultOpacity),p=c(this.luminosityHighPassConfig.luminosityThreshold,this.luminosityHighPassConfig.luminosityThreshold.add(this.luminosityHighPassConfig.smoothWidth),s);return t.fragColor=a(l,i,p),t}}o([i(T)],C.prototype,"luminosityHighPassConfig",void 0),o([r(v)],C.prototype,"luminosityHighPassTexture",void 0),o([t(0,s(x))],C.prototype,"fragment",null);class w extends p{}o([i(n)],w.prototype,"bloomStrength",void 0),o([i(n)],w.prototype,"bloomRadius",void 0),o([i(f.ofType(n,5))],w.prototype,"bloomFactors",void 0),o([i(h)],w.prototype,"bloomTintColor",void 0);class P extends u{}o([r(v)],P.prototype,"blurTexture1",void 0),o([r(v)],P.prototype,"blurTexture2",void 0),o([r(v)],P.prototype,"blurTexture3",void 0),o([r(v)],P.prototype,"blurTexture4",void 0),o([r(v)],P.prototype,"blurTexture5",void 0);class H extends b{constructor(){super(...arguments),this.type="CompositeShader"}fragment(o){const t=new e,{blurTexture1:i,blurTexture2:r,blurTexture3:s,blurTexture4:l,blurTexture5:p}=this.compositeTextures,{bloomStrength:u,bloomFactors:a,bloomTintColor:h,bloomRadius:g}=this.compositeConfig,c=m(g,new n(0),new n(1)),v=this._lerpBloomFactor(a.get(0),c).multiply(new d(h,1).multiply(y(i,o.uv))),f=this._lerpBloomFactor(a.get(1),c).multiply(new d(h,1).multiply(y(r,o.uv))),b=this._lerpBloomFactor(a.get(2),c).multiply(new d(h,1).multiply(y(s,o.uv))),x=this._lerpBloomFactor(a.get(3),c).multiply(new d(h,1).multiply(y(l,o.uv))),T=this._lerpBloomFactor(a.get(4),c).multiply(new d(h,1).multiply(y(p,o.uv))),C=u.multiply(v.add(f.add(b.add(x.add(T)))));return t.fragColor=C,t}_lerpBloomFactor(o,t){const e=new n(1.2).subtract(o);return a(o,e,t)}}o([l],H.prototype,"numMips",void 0),o([i(w)],H.prototype,"compositeConfig",void 0),o([r(P)],H.prototype,"compositeTextures",void 0),o([t(0,s(x))],H.prototype,"fragment",null);export{H as BloomCompositeShader,C as LuminosityHighPassShader};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{uniform as t,UniformGroup as i}from"../../../../GraphShaderModule.js";import{Vec2 as r,negate as s,sign as l,abs as o,Float as p,step as m,mod as d,atan as a,mix as c,Vec4 as u}from"../../../../graph/glsl.js";import{getSurfaceValues as n,computeDeltaZ as y}from"../surface.js";import{BaseRasterProcessorShader as f}from"./BaseRasterProcessorShader.js";class h extends i{}e([t(r)],h.prototype,"cellSize",void 0);class g extends f{constructor(){super(...arguments),this.type="AspectShader"}_process(e){const t=n(this.texture,e,this.config.srcImageSize),i=new r(1).divide(this.aspectConfig.cellSize.multiply(8)),{x:f,y:h}=y(t,i),g=s(h),w=t[9].multiply(l(o(f).add(o(g)))),S=o(l(f)),x=new p(3.14159265359),j=new p(0),v=m(j,g).multiply(.5).multiply(x).add(m(g,j).multiply(1.5).multiply(x)),z=d(new p(2.5).multiply(x).add(a(g,s(f))),new p(2).multiply(x)),C=c(v,z,S).multiply(180).divide(x);return new u(C,C,C,w)}}e([t(h)],g.prototype,"aspectConfig",void 0);export{g as AspectShader};
2
+ import{__decorate as e}from"tslib";import{uniform as t,UniformGroup as i}from"../../../../GraphShaderModule.js";import{Vec2 as r,negate as s,sign as l,abs as o,Float as p,step as m,mod as d,atan as a,mix as c,Vec4 as u}from"../../../../graph/glsl.js";import{getSurfaceValues as n,computeDeltaZ as y}from"../surface.js";import{BaseRasterProcessorShader as f}from"./BaseRasterProcessorShader.js";class h extends i{}e([t(r)],h.prototype,"cellSize",void 0);class g extends f{constructor(){super(...arguments),this.type="AspectShader"}_process(e){const t=n(this.texture,e,this.config.srcImageSize),i=new r(1).divide(this.aspectConfig.cellSize.multiply(8)),{x:f,y:h}=y(t,i),g=s(h),w=t.get(9).multiply(l(o(f).add(o(g)))),S=o(l(f)),x=new p(3.14159265359),j=new p(0),v=m(j,g).multiply(.5).multiply(x).add(m(g,j).multiply(1.5).multiply(x)),z=d(new p(2.5).multiply(x).add(a(g,s(f))),new p(2).multiply(x)),C=c(v,z,S).multiply(180).divide(x);return new u(C,C,C,w)}}e([t(h)],g.prototype,"aspectConfig",void 0);export{g as AspectShader};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{uniform as r,define as e,UniformGroup as s}from"../../../../GraphShaderModule.js";import{negate as i,dot as o,Vec3 as a,Vec4 as u,Float as d}from"../../../../graph/glsl.js";import{getSurfaceValues as p}from"../surface.js";import{BaseRasterProcessorShader as l}from"./BaseRasterProcessorShader.js";class c extends s{}t([r(d)],c.prototype,"zlFactor",void 0);class m extends l{constructor(){super(...arguments),this.type="CurvatureShader"}_process(t){const r=p(this.texture,t,this.config.srcImageSize),e=r[3].add(r[5]).multiply(.5).subtract(r[4]),s=r[1].add(r[7]).multiply(.5).subtract(r[4]),{zlFactor:d}=this.curvatureConfig,{curvatureType:l}=this;let c;if("standard"===l)c=i(d).multiply(e.add(s));else{const t=r[2].subtract(r[0]).add(r[6]).subtract(r[8]).divide(4),u=r[5].subtract(r[3]).divide(2),p=r[1].subtract(r[7]).divide(2),m=u.multiply(u),n=p.multiply(p),y=u.multiply(p),v=d.divide(m.add(n));c="profile"===l?o(new a(e,s,t),new a(m,n,y)).multiply(v):o(new a(e,s,i(t)),new a(n,m,y)).multiply(i(v))}return new u(c,c,c,r[9])}}t([e],m.prototype,"curvatureType",void 0),t([r(c)],m.prototype,"curvatureConfig",void 0);export{m as CurvatureShader};
2
+ import{__decorate as t}from"tslib";import{uniform as e,define as r,UniformGroup as s}from"../../../../GraphShaderModule.js";import{negate as i,dot as o,Vec3 as a,Vec4 as u,Float as d}from"../../../../graph/glsl.js";import{getSurfaceValues as p}from"../surface.js";import{BaseRasterProcessorShader as l}from"./BaseRasterProcessorShader.js";class c extends s{}t([e(d)],c.prototype,"zlFactor",void 0);class g extends l{constructor(){super(...arguments),this.type="CurvatureShader"}_process(t){const e=p(this.texture,t,this.config.srcImageSize),r=e.get(3).add(e.get(5)).multiply(.5).subtract(e.get(4)),s=e.get(1).add(e.get(7)).multiply(.5).subtract(e.get(4)),{zlFactor:d}=this.curvatureConfig,{curvatureType:l}=this;let c;if("standard"===l)c=i(d).multiply(r.add(s));else{const t=e.get(2).subtract(e.get(0)).add(e.get(6)).subtract(e.get(8)).divide(4),u=e.get(5).subtract(e.get(3)).divide(2),p=e.get(1).subtract(e.get(7)).divide(2),g=u.multiply(u),m=p.multiply(p),n=u.multiply(p),y=d.divide(g.add(m));c="profile"===l?o(new a(r,s,t),new a(g,m,n)).multiply(y):o(new a(r,s,i(t)),new a(m,g,n)).multiply(i(y))}return new u(c,c,c,e.get(9))}}t([r],g.prototype,"curvatureType",void 0),t([e(c)],g.prototype,"curvatureConfig",void 0);export{g as CurvatureShader};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as t}from"tslib";import{maxMapSizeGpu as o}from"../../../../../../../../../layers/raster/functions/pixelUtils.js";import{uniform as e,define as s,UniformGroup as r}from"../../../../GraphShaderModule.js";import{Vec3 as i,abs as a,sign as l,step as p,FixedArray as n,Float as u}from"../../../../graph/glsl.js";import{BaseRasterProcessorShader as m}from"./BaseRasterProcessorShader.js";class c extends r{}t([e(n.ofType(u,6))],c.prototype,"includedRanges",void 0),t([e(n.ofType(u,o))],c.prototype,"noDataValues",void 0);class y extends m{constructor(){super(...arguments),this.type="MaskShader",this.isMultiband=!0}_process(t){const o=this._getPixel(t),e=this._computeNoDataFactor(o.r),s=this._computeRangeFactor(o.rgb);let r;if(this.isMultiband){const t=this._computeNoDataFactor(o.g),a=this._computeNoDataFactor(o.b),l=new i(e,t,a).multiply(s);r=l.x.multiply(l.y).multiply(l.z)}else r=e.multiply(s.x);return o.multiply(r)}_computeNoDataFactor(t){const{noDataValues:e}=this.maskConfig;let s=new i(1);for(let r=0;r<o/3;r++){const o=3*r,p=new i(e[o+0],e[o+1],e[o+2]),n=a(l(p.subtract(t)));s=s.multiply(n)}return s.x.multiply(s.y).multiply(s.z)}_computeRangeFactor(t){const{includedRanges:o}=this.maskConfig,e=new i(o[0],o[2],o[4]),s=new i(o[1],o[3],o[5]);return p(e,t).multiply(p(t,s))}}t([s],y.prototype,"isMultiband",void 0),t([e(c)],y.prototype,"maskConfig",void 0);export{y as MaskShader};
2
+ import{__decorate as t}from"tslib";import{maxMapSizeGpu as e}from"../../../../../../../../../layers/raster/functions/pixelUtils.js";import{uniform as o,define as s,UniformGroup as r}from"../../../../GraphShaderModule.js";import{Vec3 as i,abs as a,sign as l,step as p,FixedArray as n,Float as u}from"../../../../graph/glsl.js";import{BaseRasterProcessorShader as m}from"./BaseRasterProcessorShader.js";class c extends r{}t([o(n.ofType(u,6))],c.prototype,"includedRanges",void 0),t([o(n.ofType(u,e))],c.prototype,"noDataValues",void 0);class g extends m{constructor(){super(...arguments),this.type="MaskShader",this.isMultiband=!0}_process(t){const e=this._getPixel(t),o=this._computeNoDataFactor(e.r),s=this._computeRangeFactor(e.rgb);let r;if(this.isMultiband){const t=this._computeNoDataFactor(e.g),a=this._computeNoDataFactor(e.b),l=new i(o,t,a).multiply(s);r=l.x.multiply(l.y).multiply(l.z)}else r=o.multiply(s.x);return e.multiply(r)}_computeNoDataFactor(t){const{noDataValues:o}=this.maskConfig;let s=new i(1);for(let r=0;r<e/3;r++){const e=3*r,p=new i(o.get(e+0),o.get(e+1),o.get(e+2)),n=a(l(p.subtract(t)));s=s.multiply(n)}return s.x.multiply(s.y).multiply(s.z)}_computeRangeFactor(t){const{includedRanges:e}=this.maskConfig,o=new i(e.get(0),e.get(2),e.get(4)),s=new i(e.get(1),e.get(3),e.get(5));return p(o,t).multiply(p(t,s))}}t([s],g.prototype,"isMultiband",void 0),t([o(c)],g.prototype,"maskConfig",void 0);export{g as MaskShader};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{maxMapSizeGpu as t}from"../../../../../../../../../layers/raster/functions/pixelUtils.js";import{uniform as o,define as r,UniformGroup as a}from"../../../../GraphShaderModule.js";import{mix as p,clamp as s,max as i,Vec4 as m,Vec3 as n,step as l,sign as c,dot as u,FixedArray as d,Float as h,Vec2 as y}from"../../../../graph/glsl.js";import{oneMinus as f}from"../../utils.js";import{BaseRasterProcessorShader as g}from"./BaseRasterProcessorShader.js";import{computeMapValue as v}from"./math.js";class j extends a{}e([o(d.ofType(h,3*t))],j.prototype,"rangeMaps",void 0),e([o(d.ofType(h,2*t))],j.prototype,"noDataRanges",void 0),e([o(h)],j.prototype,"unmatchMask",void 0),e([o(h)],j.prototype,"replacementValue",void 0),e([o(y)],j.prototype,"clampRange",void 0);class x extends g{constructor(){super(...arguments),this.type="RemapShader"}_process(e){const o=this._getPixel(e),{rangeMaps:r,unmatchMask:a,clampRange:n,replacementValue:l}=this.remapConfig,{mapValue:c,includeMask:u}=v(o.r,r,t),d=this.replaceUnmatched?l:a.multiply(o.r),h=p(d,c,u),y=s(h,n.x,n.y),f=this._computeNoDataFactor(o.rrr).multiply(i(a,u));return new m(y,y,y,o.a).multiply(f)}_computeNoDataFactor(e){const{noDataRanges:o}=this.remapConfig;let r=new n(0,0,0);for(let a=0;a<t/3;a++){const t=6*a,p=new n(o[t],o[t+2],o[t+4]),s=new n(o[t+1],o[t+3],o[t+5]);r=r.add(l(p,e).multiply(l(e,s)))}return f(c(u(r,new n(1,1,1))))}}e([o(j)],x.prototype,"remapConfig",void 0),e([r],x.prototype,"replaceUnmatched",void 0);export{x as RemapShader};
2
+ import{__decorate as e}from"tslib";import{maxMapSizeGpu as t}from"../../../../../../../../../layers/raster/functions/pixelUtils.js";import{uniform as o,define as r,UniformGroup as a}from"../../../../GraphShaderModule.js";import{mix as p,clamp as s,max as i,Vec4 as m,Vec3 as n,step as l,sign as c,dot as u,FixedArray as d,Float as g,Vec2 as h}from"../../../../graph/glsl.js";import{oneMinus as y}from"../../utils.js";import{BaseRasterProcessorShader as f}from"./BaseRasterProcessorShader.js";import{computeMapValue as v}from"./math.js";class j extends a{}e([o(d.ofType(g,3*t))],j.prototype,"rangeMaps",void 0),e([o(d.ofType(g,2*t))],j.prototype,"noDataRanges",void 0),e([o(g)],j.prototype,"unmatchMask",void 0),e([o(g)],j.prototype,"replacementValue",void 0),e([o(h)],j.prototype,"clampRange",void 0);class x extends f{constructor(){super(...arguments),this.type="RemapShader"}_process(e){const o=this._getPixel(e),{rangeMaps:r,unmatchMask:a,clampRange:n,replacementValue:l}=this.remapConfig,{mapValue:c,includeMask:u}=v(o.r,r,t),d=this.replaceUnmatched?l:a.multiply(o.r),g=p(d,c,u),h=s(g,n.x,n.y),y=this._computeNoDataFactor(o.rrr).multiply(i(a,u));return new m(h,h,h,o.a).multiply(y)}_computeNoDataFactor(e){const{noDataRanges:o}=this.remapConfig;let r=new n(0,0,0);for(let a=0;a<t/3;a++){const t=6*a,p=new n(o.get(t),o.get(t+2),o.get(t+4)),s=new n(o.get(t+1),o.get(t+3),o.get(t+5));r=r.add(l(p,e).multiply(l(e,s)))}return y(c(u(r,new n(1,1,1))))}}e([o(j)],x.prototype,"remapConfig",void 0),e([r],x.prototype,"replaceUnmatched",void 0);export{x as RemapShader};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{uniform as t,define as o,UniformGroup as i}from"../../../../GraphShaderModule.js";import{pow as r,Vec2 as p,sqrt as s,atan as l,Vec4 as d,Float as u}from"../../../../graph/glsl.js";import{getSurfaceValues as m,computeDeltaZ as c}from"../surface.js";import{BaseRasterProcessorShader as a}from"./BaseRasterProcessorShader.js";import{roundOutput as n}from"./math.js";class y extends i{}e([t(u)],y.prototype,"pixelSizePower",void 0),e([t(u)],y.prototype,"pixelSizeFactor",void 0),e([t(u)],y.prototype,"zFactor",void 0),e([t(p)],y.prototype,"cellSize",void 0);class h extends a{constructor(){super(...arguments),this.type="SlopeShader",this.isOutputRounded=!1,this.percentRise=!1}_process(e){const{cellSize:t,pixelSizePower:o,pixelSizeFactor:i,zFactor:u}=this.slopeConfig,a=r(t,new p(o)).multiply(i).add(u).divide(t.multiply(8)),y=m(this.texture,e,this.config.srcImageSize),{x:h,y:S}=c(y,a),f=s(h.multiply(h).add(S.multiply(S))),x=this.percentRise?f.multiply(100):l(f).multiply(57.2957795),z=new d(x,x,x,y[9]);return this.isOutputRounded?n(z):z}}e([o],h.prototype,"isOutputRounded",void 0),e([o],h.prototype,"percentRise",void 0),e([t(y)],h.prototype,"slopeConfig",void 0);export{h as SlopeShader};
2
+ import{__decorate as e}from"tslib";import{uniform as t,define as o,UniformGroup as i}from"../../../../GraphShaderModule.js";import{pow as r,Vec2 as p,sqrt as s,atan as l,Vec4 as d,Float as u}from"../../../../graph/glsl.js";import{getSurfaceValues as m,computeDeltaZ as c}from"../surface.js";import{BaseRasterProcessorShader as a}from"./BaseRasterProcessorShader.js";import{roundOutput as n}from"./math.js";class y extends i{}e([t(u)],y.prototype,"pixelSizePower",void 0),e([t(u)],y.prototype,"pixelSizeFactor",void 0),e([t(u)],y.prototype,"zFactor",void 0),e([t(p)],y.prototype,"cellSize",void 0);class h extends a{constructor(){super(...arguments),this.type="SlopeShader",this.isOutputRounded=!1,this.percentRise=!1}_process(e){const{cellSize:t,pixelSizePower:o,pixelSizeFactor:i,zFactor:u}=this.slopeConfig,a=r(t,new p(o)).multiply(i).add(u).divide(t.multiply(8)),y=m(this.texture,e,this.config.srcImageSize),{x:h,y:S}=c(y,a),f=s(h.multiply(h).add(S.multiply(S))),x=this.percentRise?f.multiply(100):l(f).multiply(57.2957795),z=new d(x,x,x,y.get(9));return this.isOutputRounded?n(z):z}}e([o],h.prototype,"isOutputRounded",void 0),e([o],h.prototype,"percentRise",void 0),e([t(y)],h.prototype,"slopeConfig",void 0);export{h as SlopeShader};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{maxMapSizeGpu as n}from"../../../../../../../../../layers/raster/functions/pixelUtils.js";import{step as t,Vec3 as e,sign as r,dot as l,abs as o,Vec4 as u,floor as i,Float as s,mix as c}from"../../../../graph/glsl.js";function w(n){const t=r(n),e=n.add(o(t).subtract(1));return t.multiply(t).divide(e)}function a(n){return new u(i(n.rgb.add(.5)),n.a)}function d(n,e){return t(e.x,n).multiply(t(n,e.y))}function f(o,u){let i=new e(0,0,0);const s=new e(o);for(let r=0;r<n/3;r++){const n=6*r,l=new e(u[n],u[n+2],u[n+4]),o=new e(u[n+1],u[n+3],u[n+5]);i=i.add(t(l,s).multiply(t(s,o)))}return r(l(i,new e(1,1,1)))}function p(n,o,u){const i=new e(n);let w=new e(0,0,0),a=new s(0);for(let r=0;r<u/3;r++){const n=9*r,l=new e(o[n],o[n+3],o[n+6]),u=new e(o[n+1],o[n+4],o[n+7]),s=t(l,i).multiply(t(i,u)),d=new e(o[n+2],o[n+5],o[n+8]);a=c(a,d.x,s.x),a=c(a,d.y,s.y),a=c(a,d.z,s.z),w=w.add(s)}return{mapValue:a,includeMask:r(l(w,new e(1,1,1)))}}export{p as computeMapValue,f as computeSingleBandRangeFactor,d as getRangeClipFactor,w as invertValue,a as roundOutput};
2
+ import{maxMapSizeGpu as t}from"../../../../../../../../../layers/raster/functions/pixelUtils.js";import{step as e,Vec3 as n,sign as r,dot as l,abs as g,Vec4 as o,floor as u,Float as i,mix as s}from"../../../../graph/glsl.js";function c(t){const e=r(t),n=t.add(g(e).subtract(1));return e.multiply(e).divide(n)}function w(t){return new o(u(t.rgb.add(.5)),t.a)}function a(t,n){return e(n.x,t).multiply(e(t,n.y))}function d(g,o){let u=new n(0,0,0);const i=new n(g);for(let r=0;r<t/3;r++){const t=6*r,l=new n(o.get(t),o.get(t+2),o.get(t+4)),g=new n(o.get(t+1),o.get(t+3),o.get(t+5));u=u.add(e(l,i).multiply(e(i,g)))}return r(l(u,new n(1,1,1)))}function f(t,g,o){const u=new n(t);let c=new n(0,0,0),w=new i(0);for(let r=0;r<o/3;r++){const t=9*r,l=new n(g.get(t),g.get(t+3),g.get(t+6)),o=new n(g.get(t+1),g.get(t+4),g.get(t+7)),i=e(l,u).multiply(e(u,o)),a=new n(g.get(t+2),g.get(t+5),g.get(t+8));w=s(w,a.x,i.x),w=s(w,a.y,i.y),w=s(w,a.z,i.z),c=c.add(i)}return{mapValue:w,includeMask:r(l(c,new n(1,1,1)))}}export{f as computeMapValue,d as computeSingleBandRangeFactor,a as getRangeClipFactor,c as invertValue,w as roundOutput};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as n}from"tslib";import{uniform as t,UniformGroup as e}from"../../../GraphShaderModule.js";import{Float as i,texture2D as o,Vec2 as s,Vec4 as r,FixedArray as d,sqrt as l,dot as p,Vec3 as w,abs as c,step as u}from"../../../graph/glsl.js";class a extends e{}function y(n){const t=c(n),e=u(t,new s(1,1)).multiply(t),o=new i(2).subtract(t),r=u(new i(1),t).multiply(o);return e.add(r)}function m(n,t,e){const l=new i(1).divide(e),p=o(n,y(l.multiply(new s(-1,-1)).add(t))),w=o(n,y(l.multiply(new s(0,-1)).add(t))),c=o(n,y(l.multiply(new s(1,-1)).add(t))),u=o(n,y(l.multiply(new s(-1,0)).add(t))),a=o(n,y(t)),m=o(n,y(l.multiply(new s(1,0)).add(t))),f=o(n,y(l.multiply(new s(-1,1)).add(t))),Z=o(n,y(l.multiply(new s(0,1)).add(t))),x=o(n,y(l.multiply(new s(1,1)).add(t))),z=new r(p.a,w.a,c.a,u.a),A=new r(m.a,f.a,Z.a,x.a),g=z.multiply(A),h=g.xy.multiply(g.zw),v=h.x.multiply(h.y).multiply(a.a),b=new d(new i(0),10);return b[0]=p.r,b[1]=w.r,b[2]=c.r,b[3]=u.r,b[4]=a.r,b[5]=m.r,b[6]=f.r,b[7]=Z.r,b[8]=x.r,b[9]=v,b}function f(n,t){const e=new r(n[5],n[3],n[7],n[1]).multiply(2),i=new w(n[2],e[0],n[8]),o=new w(n[0],e[1],n[6]),d=p(i.subtract(o),new w(1)),l=new w(n[6],e[2],n[8]),c=new w(n[0],e[3],n[2]),u=p(l.subtract(c),new w(1));return new s(d,u).multiply(t)}function Z(n,t,e){const{factor:o}=t,s=f(n,o),d=l(p(s,s).add(1)),c=n[9],{sinZsinAs:u,sinZcosAs:a,cosZs:y,weights:m}=t;if(!e){const n=x({sinZsinA:u[0],sinZcosA:a[0],cosZ:y[0],weights:new i(1),dzxy:s,dzd:d});return new r(n,n,n,c)}const Z=x({sinZsinA:new w(u[0],u[1],u[2]),sinZcosA:new w(a[0],a[1],a[2]),cosZ:new w(y[0],y[1],y[2]),weights:new w(m[0],m[1],m[2]),dzxy:s,dzd:d}),z=x({sinZsinA:new w(u[3],u[4],u[5]),sinZcosA:new w(a[3],a[5],a[5]),cosZ:new w(y[3],y[4],y[5]),weights:new w(m[3],m[4],m[5]),dzxy:s,dzd:d}),A=p(Z.add(z),new w(1));return new r(A,A,A,c)}function x(n){const t=n.sinZsinA.multiply(n.dzxy.y),e=n.sinZcosA.multiply(n.dzxy.x),o=t.subtract(e),s=n.cosZ.add(o).divide(n.dzd);return s.multiply(u(new i(0),s)).multiply(n.weights)}function z(n,t){const{pixelSizeFactor:e}=n,i=[n.factor[0]/t[0],n.factor[1]/t[1]];if(e>0){const{zFactor:o,pixelSizePower:s,gcsFactor:r}=n,d=t[0]*r,l=t[1]*r;i[0]=(o+d**s*e)/(8*d),i[1]=(o+l**s*e)/(8*l)}return i}n([t(d.ofType(i,6))],a.prototype,"sinZcosAs",void 0),n([t(d.ofType(i,6))],a.prototype,"sinZsinAs",void 0),n([t(d.ofType(i,6))],a.prototype,"cosZs",void 0),n([t(d.ofType(i,6))],a.prototype,"weights",void 0),n([t(i)],a.prototype,"minValue",void 0),n([t(i)],a.prototype,"maxValue",void 0),n([t(s)],a.prototype,"factor",void 0);export{a as HillshadeConfig,f as computeDeltaZ,z as computeZFactor,m as getSurfaceValues,Z as hillshade,y as mirror};
2
+ import{__decorate as t}from"tslib";import{uniform as e,UniformGroup as n}from"../../../GraphShaderModule.js";import{Float as s,texture2D as i,Vec2 as o,Vec4 as r,FixedArray as d,sqrt as l,dot as g,Vec3 as p,abs as w,step as c}from"../../../graph/glsl.js";class u extends n{}function a(t){const e=w(t),n=c(e,new o(1,1)).multiply(e),i=new s(2).subtract(e),r=c(new s(1),e).multiply(i);return n.add(r)}function y(t,e,n){const l=new s(1).divide(n),g=i(t,a(l.multiply(new o(-1,-1)).add(e))),p=i(t,a(l.multiply(new o(0,-1)).add(e))),w=i(t,a(l.multiply(new o(1,-1)).add(e))),c=i(t,a(l.multiply(new o(-1,0)).add(e))),u=i(t,a(e)),y=i(t,a(l.multiply(new o(1,0)).add(e))),m=i(t,a(l.multiply(new o(-1,1)).add(e))),f=i(t,a(l.multiply(new o(0,1)).add(e))),Z=i(t,a(l.multiply(new o(1,1)).add(e))),x=new r(g.a,p.a,w.a,c.a),z=new r(y.a,m.a,f.a,Z.a),A=x.multiply(z),h=A.xy.multiply(A.zw),v=h.x.multiply(h.y).multiply(u.a);let b=new d(new s(0),10);return b=b.set(0,g.r),b=b.set(1,p.r),b=b.set(2,w.r),b=b.set(3,c.r),b=b.set(4,u.r),b=b.set(5,y.r),b=b.set(6,m.r),b=b.set(7,f.r),b=b.set(8,Z.r),b=b.set(9,v),b}function m(t,e){const n=new r(t.get(5),t.get(3),t.get(7),t.get(1)).multiply(2),s=new p(t.get(2),n[0],t.get(8)),i=new p(t.get(0),n[1],t.get(6)),d=g(s.subtract(i),new p(1)),l=new p(t.get(6),n[2],t.get(8)),w=new p(t.get(0),n[3],t.get(2)),c=g(l.subtract(w),new p(1));return new o(d,c).multiply(e)}function f(t,e,n){const{factor:i}=e,o=m(t,i),d=l(g(o,o).add(1)),w=t.get(9),{sinZsinAs:c,sinZcosAs:u,cosZs:a,weights:y}=e;if(!n){const t=Z({sinZsinA:c.get(0),sinZcosA:u.get(0),cosZ:a.get(0),weights:new s(1),dzxy:o,dzd:d});return new r(t,t,t,w)}const f=Z({sinZsinA:new p(c.get(0),c.get(1),c.get(2)),sinZcosA:new p(u.get(0),u.get(1),u.get(2)),cosZ:new p(a.get(0),a.get(1),a.get(2)),weights:new p(y.get(0),y.get(1),y.get(2)),dzxy:o,dzd:d}),x=Z({sinZsinA:new p(c.get(3),c.get(4),c.get(5)),sinZcosA:new p(u.get(3),u.get(5),u.get(5)),cosZ:new p(a.get(3),a.get(4),a.get(5)),weights:new p(y.get(3),y.get(4),y.get(5)),dzxy:o,dzd:d}),z=g(f.add(x),new p(1));return new r(z,z,z,w)}function Z(t){const e=t.sinZsinA.multiply(t.dzxy.y),n=t.sinZcosA.multiply(t.dzxy.x),i=e.subtract(n),o=t.cosZ.add(i).divide(t.dzd);return o.multiply(c(new s(0),o)).multiply(t.weights)}function x(t,e){const{pixelSizeFactor:n}=t,s=[t.factor[0]/e[0],t.factor[1]/e[1]];if(n>0){const{zFactor:i,pixelSizePower:o,gcsFactor:r}=t,d=e[0]*r,l=e[1]*r;s[0]=(i+d**o*n)/(8*d),s[1]=(i+l**o*n)/(8*l)}return s}t([e(d.ofType(s,6))],u.prototype,"sinZcosAs",void 0),t([e(d.ofType(s,6))],u.prototype,"sinZsinAs",void 0),t([e(d.ofType(s,6))],u.prototype,"cosZs",void 0),t([e(d.ofType(s,6))],u.prototype,"weights",void 0),t([e(s)],u.prototype,"minValue",void 0),t([e(s)],u.prototype,"maxValue",void 0),t([e(o)],u.prototype,"factor",void 0);export{u as HillshadeConfig,m as computeDeltaZ,x as computeZFactor,y as getSurfaceValues,f as hillshade,a as mirror};