@arcgis/core 4.27.0-next.20230420 → 4.27.0-next.20230421

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 (152) hide show
  1. package/WebMap.js +1 -1
  2. package/WebScene.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/{f64f95623d9296a91f95.js → 059ec6fd9b971de4b4c1.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{1fe31a412479815e5e2d.js → 10770939900946feb20d.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{5252f3cc244204edc299.js → 1216e939d363f96b6cc6.js} +1 -1
  7. package/assets/esri/core/workers/chunks/156dad2b7fed6749bae7.js +1 -0
  8. package/assets/esri/core/workers/chunks/15a97d3e42b00ac42984.js +1 -0
  9. package/assets/esri/core/workers/chunks/{d72c0c97cc4e30f1e4f2.js → 18704903814b9d73c708.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{852b4a6c0f3feb57cf54.js → 1db5e4c8244dbc21590c.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{f0953e41d1653e66ba57.js → 2a1a5a1969e80a10dcca.js} +1 -1
  12. package/assets/esri/core/workers/chunks/33b735faa582e6f39e9a.js +1 -0
  13. package/assets/esri/core/workers/chunks/34025ac04ca02531923a.js +1 -0
  14. package/assets/esri/core/workers/chunks/3e9f3479fd8558d9e3e3.js +1 -0
  15. package/assets/esri/core/workers/chunks/{d59274ac695dfcff1143.js → 46090b69e9161bc05141.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{1b647446a6a27798c5cf.js → 47bf38d910e71ac39bb8.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{3978f4f68ada540ee3a3.js → 4f8a09b61267e5e26712.js} +1 -1
  18. package/assets/esri/core/workers/chunks/5183ecab7eddae7b70e8.js +1 -0
  19. package/assets/esri/core/workers/chunks/{a5c33b24b7ee042cb473.js → 51a0d1dabe7415515c77.js} +2 -2
  20. package/assets/esri/core/workers/chunks/541e6efc3b491e507410.js +1 -0
  21. package/assets/esri/core/workers/chunks/5c64fd3bf057a1a5527f.js +1 -0
  22. package/assets/esri/core/workers/chunks/6047bdaf4855506f8fdb.js +1 -0
  23. package/assets/esri/core/workers/chunks/{b2358c2e27be7a5709cf.js → 6adb58f1bffc5d1c03bd.js} +1 -1
  24. package/assets/esri/core/workers/chunks/770940417e6ddbdbb9d6.js +1 -0
  25. package/assets/esri/core/workers/chunks/{1c1d8be85297c483a606.js → 77c98121223a144170e3.js} +1 -1
  26. package/assets/esri/core/workers/chunks/80117007d86be4eb3bc3.js +1 -0
  27. package/assets/esri/core/workers/chunks/838849b751805615833a.js +1 -0
  28. package/assets/esri/core/workers/chunks/{9ca395f7bc8d397b5240.js → 88197520501fcc20b6e8.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{89e8ba4fc325838bf1a9.js → 88f9dededcf60fd011ef.js} +1 -1
  30. package/assets/esri/core/workers/chunks/88fdd288ef799a7ac48a.js +1 -0
  31. package/assets/esri/core/workers/chunks/{f11ec68ceb7c973cde74.js → 8ae7fea9f7fda38dd207.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{0d080dd1ca6a71597409.js → 9265d4e9cfab2c7bbce5.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{8d41305509fedb3603ac.js → 94041a9ced04aa281d40.js} +1 -1
  34. package/assets/esri/core/workers/chunks/98540791fcef86069e44.js +1 -0
  35. package/assets/esri/core/workers/chunks/9c1b2f82877ff79969f5.js +1 -0
  36. package/assets/esri/core/workers/chunks/a7b3cd537c9127b5e65e.js +1 -0
  37. package/assets/esri/core/workers/chunks/{3d1c697182237807ab49.js → abea316f2eac0f3086ab.js} +1 -1
  38. package/assets/esri/core/workers/chunks/ad85ade6a2cfb56cf328.js +1 -0
  39. package/assets/esri/core/workers/chunks/{25862269952c1bda910f.js → b833b4ea2973bb16792e.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{e50d1afdc878258c437e.js → be4aa835a7abfc809126.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{4fed7c08b5f4de23bb75.js → c2ec6e904f96173a7b83.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{c25aa08b869f2777dc26.js → c4488a8d857c765da30e.js} +1 -1
  43. package/assets/esri/core/workers/chunks/c5c56b6d99db96a6755a.js +2 -0
  44. package/assets/esri/core/workers/chunks/{b28883e2a13f360310b3.js → c727d38f71e52bee17e1.js} +1 -1
  45. package/assets/esri/core/workers/chunks/cf315d255f0dc8d50f21.js +1 -0
  46. package/assets/esri/core/workers/chunks/cf7676fdc09ad4835680.js +1 -0
  47. package/assets/esri/core/workers/chunks/cfad34c949cbe8a31ef8.js +1 -0
  48. package/assets/esri/core/workers/chunks/{a2c9cb23f3e35e88da1d.js → d399b1b9cbf0737d1735.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{df7dcd035997881cf2ef.js → d5c8119d6d34628d3126.js} +1 -1
  50. package/assets/esri/core/workers/chunks/d6b6bb8aecc85d2a3f6b.js +1 -0
  51. package/assets/esri/core/workers/chunks/{8dfa32cc8453f85faab0.js → dd1f8bade9c5c3b7929b.js} +1 -1
  52. package/assets/esri/core/workers/chunks/e11e60759821746259c6.js +1 -0
  53. package/assets/esri/core/workers/chunks/{e4b65c5a4575a5c1c49f.js → e356c576f9a7521a49b3.js} +1 -1
  54. package/assets/esri/core/workers/chunks/f02edf71645eb33bf92f.js +1 -0
  55. package/assets/esri/core/workers/chunks/{3dff550c29115dd625fa.js → f1a4165c2710ca90e5ea.js} +1 -1
  56. package/assets/esri/core/workers/chunks/f57a3ee17869ced3dd33.js +1 -0
  57. package/assets/esri/core/workers/chunks/fc07f6e103d7f69a9909.js +1 -0
  58. package/chunks/WaterSurface.glsl.js +35 -20
  59. package/chunks/index.js +1 -1
  60. package/core/Loadable.js +1 -1
  61. package/core/Promise.js +1 -1
  62. package/core/accessorSupport/ensureType.js +1 -1
  63. package/core/accessorSupport/watch.js +1 -1
  64. package/core/accessorSupport/write.js +1 -1
  65. package/core/promiseUtils.js +1 -1
  66. package/core/watchUtils.js +1 -1
  67. package/core/workers/Connection.js +1 -1
  68. package/core/workers/RemoteClient.js +1 -1
  69. package/geometry/support/geodesicUtils.js +1 -1
  70. package/intl/messages.js +1 -1
  71. package/layers/graphics/data/attributeSupport.js +1 -1
  72. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  73. package/layers/mixins/ArcGISMapService.js +1 -1
  74. package/layers/support/PromiseQueue.js +1 -1
  75. package/layers/support/Sublayer.js +1 -1
  76. package/layers/support/TileKey.js +1 -1
  77. package/layers/support/rasterFormats/TiffDecoder.js +1 -1
  78. package/networks/Network.js +1 -1
  79. package/package.json +1 -1
  80. package/portal/schemas/definitions.js +1 -1
  81. package/request.js +1 -1
  82. package/support/revision.js +1 -1
  83. package/symbols/support/previewSymbol3D.js +1 -1
  84. package/symbols/support/styleUtils.js +1 -1
  85. package/symbols/support/symbolLayerUtils.js +1 -1
  86. package/symbols/support/utils.js +1 -1
  87. package/symbols/support/webStyleSymbolUtils.js +1 -1
  88. package/views/2d/engine/webgl/TextureManager.js +1 -1
  89. package/views/2d/layers/support/webStyleUtils.js +1 -1
  90. package/views/3d/input/SceneInputManager.js +1 -1
  91. package/views/3d/interactive/manipulatorUtils.js +1 -1
  92. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  93. package/views/3d/layers/graphics/ElevationQuery.js +1 -1
  94. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  95. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  96. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  97. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  98. package/views/3d/layers/graphics/symbolComplexity.js +1 -1
  99. package/views/3d/layers/graphics/webStyleUtils.js +5 -0
  100. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  101. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  102. package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
  103. package/views/LayerViewManager.js +1 -1
  104. package/views/PopupView.js +1 -1
  105. package/views/SceneView.js +1 -1
  106. package/views/ViewAnimation.js +1 -1
  107. package/views/input/BrowserEventSource.js +1 -1
  108. package/views/input/InputManager.js +1 -1
  109. package/views/interactive/coordinateHelper.js +1 -1
  110. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  111. package/views/support/QueueProcessor.js +1 -1
  112. package/views/ui/DefaultUI.js +1 -1
  113. package/views/ui/UI.js +1 -1
  114. package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
  115. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  116. package/widgets/Editor/Upload.js +1 -1
  117. package/widgets/Editor/deprecationUtils.js +1 -1
  118. package/widgets/Editor/modelUploadUtils.js +1 -1
  119. package/widgets/Editor.js +1 -1
  120. package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
  121. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  122. package/widgets/Feature/FeatureViewModel.js +1 -1
  123. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  124. package/widgets/Popup.js +1 -1
  125. package/assets/esri/core/workers/chunks/0cec1c16b25406858ae6.js +0 -1
  126. package/assets/esri/core/workers/chunks/27353056c3e4e8d8b8d3.js +0 -1
  127. package/assets/esri/core/workers/chunks/337d59d624ef8a89aae5.js +0 -1
  128. package/assets/esri/core/workers/chunks/4b6a903d4aeeb4eeb615.js +0 -1
  129. package/assets/esri/core/workers/chunks/4bf9bc8b52d618f395c5.js +0 -1
  130. package/assets/esri/core/workers/chunks/5ec4fedbbcbb0053cf74.js +0 -2
  131. package/assets/esri/core/workers/chunks/60e29d172a2dcf45e8d0.js +0 -1
  132. package/assets/esri/core/workers/chunks/68a15cc7c51645d31572.js +0 -1
  133. package/assets/esri/core/workers/chunks/778ecf61f07dafc51bbc.js +0 -1
  134. package/assets/esri/core/workers/chunks/7e67e071789c6d264280.js +0 -1
  135. package/assets/esri/core/workers/chunks/80d335bec34d60b7bbdc.js +0 -1
  136. package/assets/esri/core/workers/chunks/810da30f13151b72a293.js +0 -1
  137. package/assets/esri/core/workers/chunks/81485a5056aed94b3d8d.js +0 -1
  138. package/assets/esri/core/workers/chunks/8ebda132068f6b962dd9.js +0 -1
  139. package/assets/esri/core/workers/chunks/914a0c78c80aa897b1a1.js +0 -1
  140. package/assets/esri/core/workers/chunks/979ea2e3b1b164334634.js +0 -1
  141. package/assets/esri/core/workers/chunks/a0e92dd27c8f6b642dbf.js +0 -1
  142. package/assets/esri/core/workers/chunks/a6240bf258b3886a6661.js +0 -1
  143. package/assets/esri/core/workers/chunks/b1a8024bf8cdd0cd3884.js +0 -1
  144. package/assets/esri/core/workers/chunks/b366e0db9b5f27dd53a3.js +0 -1
  145. package/assets/esri/core/workers/chunks/c564055cb906857c8641.js +0 -1
  146. package/assets/esri/core/workers/chunks/c646dc9da08b509e39d6.js +0 -1
  147. package/assets/esri/core/workers/chunks/db5598944b691e43f13e.js +0 -1
  148. package/assets/esri/core/workers/chunks/eb163a2ddeb27c690308.js +0 -1
  149. package/assets/esri/core/workers/chunks/f05634909c9449533193.js +0 -1
  150. package/assets/esri/core/workers/chunks/fcebd70b089dea833c75.js +0 -1
  151. /package/assets/esri/core/workers/chunks/{a5c33b24b7ee042cb473.js.LICENSE.txt → 51a0d1dabe7415515c77.js.LICENSE.txt} +0 -0
  152. /package/assets/esri/core/workers/chunks/{5ec4fedbbcbb0053cf74.js.LICENSE.txt → c5c56b6d99db96a6755a.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6610],{97575:(e,t,r)=>{r.d(t,{J:()=>l});var n,o,i,s=r(5732),a={exports:{}};n=a,o=function(){var e=function(){function e(e){this.message="JPEG error: "+e}return e.prototype=new Error,e.prototype.name="JpegError",e.constructor=e,e}();return function(){if(!self||!self.Uint8ClampedArray)return null;var t=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),r=4017,n=799,o=3406,i=2276,s=1567,a=3784,l=5793,u=2896;function c(){this.decodeTransform=null,this.colorTransform=-1}function h(e,t){for(var r,n,o=0,i=[],s=16;s>0&&!e[s-1];)s--;i.push({children:[],index:0});var a,l=i[0];for(r=0;r<s;r++){for(n=0;n<e[r];n++){for((l=i.pop()).children[l.index]=t[o];l.index>0;)l=i.pop();for(l.index++,i.push(l);i.length<=r;)i.push(a={children:[],index:0}),l.children[l.index]=a.children,l=a;o++}r+1<s&&(i.push(a={children:[],index:0}),l.children[l.index]=a.children,l=a)}return i[0].children}function f(e,t,r){return 64*((e.blocksPerLine+1)*t+r)}function d(r,n,o,i,s,a,l,u,c){var h=o.mcusPerLine,d=o.progressive,p=n,g=0,y=0;function w(){if(y>0)return y--,g>>y&1;if(255===(g=r[n++])){var t=r[n++];if(t)throw new e("unexpected marker "+(g<<8|t).toString(16))}return y=7,g>>>7}function C(t){for(var r=t;;){if("number"==typeof(r=r[w()]))return r;if("object"!=typeof r)throw new e("invalid huffman sequence")}}function b(e){for(var t=0;e>0;)t=t<<1|w(),e--;return t}function v(e){if(1===e)return 1===w()?1:-1;var t=b(e);return t>=1<<e-1?t:t+(-1<<e)+1}var x,k=0,T=0;function A(e,t,r,n,o){var i=r%h;t(e,f(e,(r/h|0)*e.v+n,i*e.h+o))}function S(e,t,r){t(e,f(e,r/e.blocksPerLine|0,r%e.blocksPerLine))}var I,M,P,D,E,R,_=i.length;R=d?0===a?0===u?function(e,t){var r=C(e.huffmanTableDC),n=0===r?0:v(r)<<c;e.blockData[t]=e.pred+=n}:function(e,t){e.blockData[t]|=w()<<c}:0===u?function(e,r){if(k>0)k--;else for(var n=a,o=l;n<=o;){var i=C(e.huffmanTableAC),s=15&i,u=i>>4;if(0!==s){var h=t[n+=u];e.blockData[r+h]=v(s)*(1<<c),n++}else{if(u<15){k=b(u)+(1<<u)-1;break}n+=16}}}:function(r,n){for(var o,i,s=a,u=l,h=0;s<=u;){var f=t[s];switch(T){case 0:if(h=(i=C(r.huffmanTableAC))>>4,0==(o=15&i))h<15?(k=b(h)+(1<<h),T=4):(h=16,T=1);else{if(1!==o)throw new e("invalid ACn encoding");x=v(o),T=h?2:3}continue;case 1:case 2:r.blockData[n+f]?r.blockData[n+f]+=w()<<c:0==--h&&(T=2===T?3:0);break;case 3:r.blockData[n+f]?r.blockData[n+f]+=w()<<c:(r.blockData[n+f]=x<<c,T=0);break;case 4:r.blockData[n+f]&&(r.blockData[n+f]+=w()<<c)}s++}4===T&&0==--k&&(T=0)}:function(e,r){var n=C(e.huffmanTableDC),o=0===n?0:v(n);e.blockData[r]=e.pred+=o;for(var i=1;i<64;){var s=C(e.huffmanTableAC),a=15&s,l=s>>4;if(0!==a){var u=t[i+=l];e.blockData[r+u]=v(a),i++}else{if(l<15)break;i+=16}}};var L,B,U,G,O=0;for(B=1===_?i[0].blocksPerLine*i[0].blocksPerColumn:h*o.mcusPerColumn;O<B;){var N=s?Math.min(B-O,s):B;for(M=0;M<_;M++)i[M].pred=0;if(k=0,1===_)for(I=i[0],E=0;E<N;E++)S(I,R,O),O++;else for(E=0;E<N;E++){for(M=0;M<_;M++)for(U=(I=i[M]).h,G=I.v,P=0;P<G;P++)for(D=0;D<U;D++)A(I,R,O,P,D);O++}y=0,(L=m(r,n))&&L.invalid&&(console.log("decodeScan - unexpected MCU data, next marker is: "+L.invalid),n=L.offset);var F=L&&L.marker;if(!F||F<=65280)throw new e("marker was not found");if(!(F>=65488&&F<=65495))break;n+=2}return(L=m(r,n))&&L.invalid&&(console.log("decodeScan - unexpected Scan data, next marker is: "+L.invalid),n=L.offset),n-p}function p(t,c,h){var f,d,p,g,m,y,w,C,b,v,x,k,T,A,S,I,M,P=t.quantizationTable,D=t.blockData;if(!P)throw new e("missing required Quantization Table.");for(var E=0;E<64;E+=8)b=D[c+E],v=D[c+E+1],x=D[c+E+2],k=D[c+E+3],T=D[c+E+4],A=D[c+E+5],S=D[c+E+6],I=D[c+E+7],b*=P[E],0!=(v|x|k|T|A|S|I)?(v*=P[E+1],x*=P[E+2],k*=P[E+3],T*=P[E+4],A*=P[E+5],S*=P[E+6],I*=P[E+7],d=(f=(f=l*b+128>>8)+(d=l*T+128>>8)+1>>1)-d,M=(p=x)*a+(g=S)*s+128>>8,p=p*s-g*a+128>>8,w=(m=(m=u*(v-I)+128>>8)+(w=A<<4)+1>>1)-w,y=(C=(C=u*(v+I)+128>>8)+(y=k<<4)+1>>1)-y,g=(f=f+(g=M)+1>>1)-g,p=(d=d+p+1>>1)-p,M=m*i+C*o+2048>>12,m=m*o-C*i+2048>>12,C=M,M=y*n+w*r+2048>>12,y=y*r-w*n+2048>>12,w=M,h[E]=f+C,h[E+7]=f-C,h[E+1]=d+w,h[E+6]=d-w,h[E+2]=p+y,h[E+5]=p-y,h[E+3]=g+m,h[E+4]=g-m):(M=l*b+512>>10,h[E]=M,h[E+1]=M,h[E+2]=M,h[E+3]=M,h[E+4]=M,h[E+5]=M,h[E+6]=M,h[E+7]=M);for(var R=0;R<8;++R)b=h[R],0!=((v=h[R+8])|(x=h[R+16])|(k=h[R+24])|(T=h[R+32])|(A=h[R+40])|(S=h[R+48])|(I=h[R+56]))?(d=(f=4112+((f=l*b+2048>>12)+(d=l*T+2048>>12)+1>>1))-d,M=(p=x)*a+(g=S)*s+2048>>12,p=p*s-g*a+2048>>12,g=M,w=(m=(m=u*(v-I)+2048>>12)+(w=A)+1>>1)-w,y=(C=(C=u*(v+I)+2048>>12)+(y=k)+1>>1)-y,M=m*i+C*o+2048>>12,m=m*o-C*i+2048>>12,C=M,M=y*n+w*r+2048>>12,y=y*r-w*n+2048>>12,b=(b=(f=f+g+1>>1)+C)<16?0:b>=4080?255:b>>4,v=(v=(d=d+p+1>>1)+(w=M))<16?0:v>=4080?255:v>>4,x=(x=(p=d-p)+y)<16?0:x>=4080?255:x>>4,k=(k=(g=f-g)+m)<16?0:k>=4080?255:k>>4,T=(T=g-m)<16?0:T>=4080?255:T>>4,A=(A=p-y)<16?0:A>=4080?255:A>>4,S=(S=d-w)<16?0:S>=4080?255:S>>4,I=(I=f-C)<16?0:I>=4080?255:I>>4,D[c+R]=b,D[c+R+8]=v,D[c+R+16]=x,D[c+R+24]=k,D[c+R+32]=T,D[c+R+40]=A,D[c+R+48]=S,D[c+R+56]=I):(M=(M=l*b+8192>>14)<-2040?0:M>=2024?255:M+2056>>4,D[c+R]=M,D[c+R+8]=M,D[c+R+16]=M,D[c+R+24]=M,D[c+R+32]=M,D[c+R+40]=M,D[c+R+48]=M,D[c+R+56]=M)}function g(e,t){for(var r=t.blocksPerLine,n=t.blocksPerColumn,o=new Int16Array(64),i=0;i<n;i++)for(var s=0;s<r;s++)p(t,f(t,i,s),o);return t.blockData}function m(e,t,r){function n(t){return e[t]<<8|e[t+1]}var o=e.length-1,i=r<t?r:t;if(t>=o)return null;var s=n(t);if(s>=65472&&s<=65534)return{invalid:null,marker:s,offset:t};for(var a=n(i);!(a>=65472&&a<=65534);){if(++i>=o)return null;a=n(i)}return{invalid:s.toString(16),marker:a,offset:i}}return c.prototype={parse:function(r){function n(){var e=r[l]<<8|r[l+1];return l+=2,e}function o(){var e=n(),t=l+e-2,o=m(r,t,l);o&&o.invalid&&(console.log("readDataBlock - incorrect length, next marker is: "+o.invalid),t=o.offset);var i=r.subarray(l,t);return l+=i.length,i}function i(e){for(var t=Math.ceil(e.samplesPerLine/8/e.maxH),r=Math.ceil(e.scanLines/8/e.maxV),n=0;n<e.components.length;n++){O=e.components[n];var o=Math.ceil(Math.ceil(e.samplesPerLine/8)*O.h/e.maxH),i=Math.ceil(Math.ceil(e.scanLines/8)*O.v/e.maxV),s=t*O.h,a=r*O.v*64*(s+1);O.blockData=new Int16Array(a),O.blocksPerLine=o,O.blocksPerColumn=i}e.mcusPerLine=t,e.mcusPerColumn=r}var s,a,l=0,u=null,c=null,f=[],p=[],y=[],w=n();if(65496!==w)throw new e("SOI not found");for(w=n();65497!==w;){var C,b,v;switch(w){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var x=o();65504===w&&74===x[0]&&70===x[1]&&73===x[2]&&70===x[3]&&0===x[4]&&(u={version:{major:x[5],minor:x[6]},densityUnits:x[7],xDensity:x[8]<<8|x[9],yDensity:x[10]<<8|x[11],thumbWidth:x[12],thumbHeight:x[13],thumbData:x.subarray(14,14+3*x[12]*x[13])}),65518===w&&65===x[0]&&100===x[1]&&111===x[2]&&98===x[3]&&101===x[4]&&(c={version:x[5]<<8|x[6],flags0:x[7]<<8|x[8],flags1:x[9]<<8|x[10],transformCode:x[11]});break;case 65499:for(var k=n()+l-2;l<k;){var T=r[l++],A=new Uint16Array(64);if(T>>4==0)for(b=0;b<64;b++)A[t[b]]=r[l++];else{if(T>>4!=1)throw new e("DQT - invalid table spec");for(b=0;b<64;b++)A[t[b]]=n()}f[15&T]=A}break;case 65472:case 65473:case 65474:if(s)throw new e("Only single frame JPEGs supported");n(),(s={}).extended=65473===w,s.progressive=65474===w,s.precision=r[l++],s.scanLines=n(),s.samplesPerLine=n(),s.components=[],s.componentIds={};var S,I=r[l++],M=0,P=0;for(C=0;C<I;C++){S=r[l];var D=r[l+1]>>4,E=15&r[l+1];M<D&&(M=D),P<E&&(P=E);var R=r[l+2];v=s.components.push({h:D,v:E,quantizationId:R,quantizationTable:null}),s.componentIds[S]=v-1,l+=3}s.maxH=M,s.maxV=P,i(s);break;case 65476:var _=n();for(C=2;C<_;){var L=r[l++],B=new Uint8Array(16),U=0;for(b=0;b<16;b++,l++)U+=B[b]=r[l];var G=new Uint8Array(U);for(b=0;b<U;b++,l++)G[b]=r[l];C+=17+U,(L>>4==0?y:p)[15&L]=h(B,G)}break;case 65501:n(),a=n();break;case 65498:n();var O,N=r[l++],F=[];for(C=0;C<N;C++){var V=s.componentIds[r[l++]];O=s.components[V];var z=r[l++];O.huffmanTableDC=y[z>>4],O.huffmanTableAC=p[15&z],F.push(O)}var j=r[l++],Z=r[l++],W=r[l++],J=d(r,l,s,F,a,j,Z,W>>4,15&W);l+=J;break;case 65535:255!==r[l]&&l--;break;default:if(255===r[l-3]&&r[l-2]>=192&&r[l-2]<=254){l-=3;break}throw new e("unknown marker "+w.toString(16))}w=n()}for(this.width=s.samplesPerLine,this.height=s.scanLines,this.jfif=u,this.eof=l,this.adobe=c,this.components=[],C=0;C<s.components.length;C++){var H=f[(O=s.components[C]).quantizationId];H&&(O.quantizationTable=H),this.components.push({output:g(0,O),scaleX:O.h/s.maxH,scaleY:O.v/s.maxV,blocksPerLine:O.blocksPerLine,blocksPerColumn:O.blocksPerColumn})}this.numComponents=this.components.length},_getLinearizedBlockData:function(e,t){var r,n,o,i,s,a,l,u,c,h,f,d=this.width/e,p=this.height/t,g=0,m=this.components.length,y=e*t*m,w=new Uint8ClampedArray(y),C=new Uint32Array(e),b=4294967288;for(l=0;l<m;l++){for(n=(r=this.components[l]).scaleX*d,o=r.scaleY*p,g=l,f=r.output,i=r.blocksPerLine+1<<3,s=0;s<e;s++)u=0|s*n,C[s]=(u&b)<<3|7&u;for(a=0;a<t;a++)for(h=i*((u=0|a*o)&b)|(7&u)<<3,s=0;s<e;s++)w[g]=f[h+C[s]],g+=m}var v=this.decodeTransform;if(v)for(l=0;l<y;)for(u=0,c=0;u<m;u++,l++,c+=2)w[l]=(w[l]*v[c]>>8)+v[c+1];return w},_isColorConversionNeeded:function(){return this.adobe?!!this.adobe.transformCode:3===this.numComponents?0!==this.colorTransform:1===this.colorTransform},_convertYccToRgb:function(e){for(var t,r,n,o=0,i=e.length;o<i;o+=3)t=e[o],r=e[o+1],n=e[o+2],e[o]=t-179.456+1.402*n,e[o+1]=t+135.459-.344*r-.714*n,e[o+2]=t-226.816+1.772*r;return e},_convertYcckToRgb:function(e){for(var t,r,n,o,i=0,s=0,a=e.length;s<a;s+=4)t=e[s],r=e[s+1],n=e[s+2],o=e[s+3],e[i++]=r*(-660635669420364e-19*r+.000437130475926232*n-54080610064599e-18*t+.00048449797120281*o-.154362151871126)-122.67195406894+n*(-.000957964378445773*n+.000817076911346625*t-.00477271405408747*o+1.53380253221734)+t*(.000961250184130688*t-.00266257332283933*o+.48357088451265)+o*(-.000336197177618394*o+.484791561490776),e[i++]=107.268039397724+r*(219927104525741e-19*r-.000640992018297945*n+.000659397001245577*t+.000426105652938837*o-.176491792462875)+n*(-.000778269941513683*n+.00130872261408275*t+.000770482631801132*o-.151051492775562)+t*(.00126935368114843*t-.00265090189010898*o+.25802910206845)+o*(-.000318913117588328*o-.213742400323665),e[i++]=r*(-.000570115196973677*r-263409051004589e-19*n+.0020741088115012*t-.00288260236853442*o+.814272968359295)-20.810012546947+n*(-153496057440975e-19*n-.000132689043961446*t+.000560833691242812*o-.195152027534049)+t*(.00174418132927582*t-.00255243321439347*o+.116935020465145)+o*(-.000343531996510555*o+.24165260232407);return e},_convertYcckToCmyk:function(e){for(var t,r,n,o=0,i=e.length;o<i;o+=4)t=e[o],r=e[o+1],n=e[o+2],e[o]=434.456-t-1.402*n,e[o+1]=119.541-t+.344*r+.714*n,e[o+2]=481.816-t-1.772*r;return e},_convertCmykToRgb:function(e){for(var t,r,n,o,i=0,s=1/255,a=0,l=e.length;a<l;a+=4)t=e[a]*s,r=e[a+1]*s,n=e[a+2]*s,o=e[a+3]*s,e[i++]=255+t*(-4.387332384609988*t+54.48615194189176*r+18.82290502165302*n+212.25662451639585*o-285.2331026137004)+r*(1.7149763477362134*r-5.6096736904047315*n-17.873870861415444*o-5.497006427196366)+n*(-2.5217340131683033*n-21.248923337353073*o+17.5119270841813)-o*(21.86122147463605*o+189.48180835922747),e[i++]=255+t*(8.841041422036149*t+60.118027045597366*r+6.871425592049007*n+31.159100130055922*o-79.2970844816548)+r*(-15.310361306967817*r+17.575251261109482*n+131.35250912493976*o-190.9453302588951)+n*(4.444339102852739*n+9.8632861493405*o-24.86741582555878)-o*(20.737325471181034*o+187.80453709719578),e[i++]=255+t*(.8842522430003296*t+8.078677503112928*r+30.89978309703729*n-.23883238689178934*o-14.183576799673286)+r*(10.49593273432072*r+63.02378494754052*n+50.606957656360734*o-112.23884253719248)+n*(.03296041114873217*n+115.60384449646641*o-193.58209356861505)-o*(22.33816807309886*o+180.12613974708367);return e},getData:function(t,r,n){if(this.numComponents>4)throw new e("Unsupported color mode");var o=this._getLinearizedBlockData(t,r);if(1===this.numComponents&&n){for(var i=o.length,s=new Uint8ClampedArray(3*i),a=0,l=0;l<i;l++){var u=o[l];s[a++]=u,s[a++]=u,s[a++]=u}return s}if(3===this.numComponents&&this._isColorConversionNeeded())return this._convertYccToRgb(o);if(4===this.numComponents){if(this._isColorConversionNeeded())return n?this._convertYcckToRgb(o):this._convertYcckToCmyk(o);if(n)return this._convertCmykToRgb(o)}return o}},c}()},void 0!==(i=o())&&(n.exports=i);const l=(0,s.g)(a.exports)},80899:(e,t,r)=>{r.d(t,{Z:()=>l});var n,o,i,s=r(5732),a={exports:{}};o=a,void 0!==(n=function(){function e(){this.pos=0,this.bufferLength=0,this.eof=!1,this.buffer=null}return e.prototype={ensureBuffer:function(e){var t=this.buffer,r=t?t.byteLength:0;if(e<r)return t;for(var n=512;n<e;)n<<=1;for(var o=new Uint8Array(n),i=0;i<r;++i)o[i]=t[i];return this.buffer=o},getByte:function(){for(var e=this.pos;this.bufferLength<=e;){if(this.eof)return null;this.readBlock()}return this.buffer[this.pos++]},getBytes:function(e){var t=this.pos;if(e){this.ensureBuffer(t+e);for(var r=t+e;!this.eof&&this.bufferLength<r;)this.readBlock();var n=this.bufferLength;r>n&&(r=n)}else{for(;!this.eof;)this.readBlock();r=this.bufferLength}return this.pos=r,this.buffer.subarray(t,r)},lookChar:function(){for(var e=this.pos;this.bufferLength<=e;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos])},getChar:function(){for(var e=this.pos;this.bufferLength<=e;){if(this.eof)return null;this.readBlock()}return String.fromCharCode(this.buffer[this.pos++])},makeSubStream:function(e,t,r){for(var n=e+t;this.bufferLength<=n&&!this.eof;)this.readBlock();return new Stream(this.buffer,e,t,r)},skip:function(e){e||(e=1),this.pos+=e},reset:function(){this.pos=0}},e}(),i=function(){if(!self||!self.Uint32Array)return null;var e=new Uint32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),t=new Uint32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),r=new Uint32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,798721,868353,876545]),o=[new Uint32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,524370,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,524385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,459013,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,524359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],i=[new Uint32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];function s(e){throw new Error(e)}function a(e){var t=0,r=e[t++],o=e[t++];-1!=r&&-1!=o||s("Invalid header in flate stream"),8!=(15&r)&&s("Unknown compression method in flate stream"),((r<<8)+o)%31!=0&&s("Bad FCHECK in flate stream"),32&o&&s("FDICT bit set in flate stream"),this.bytes=e,this.bytesPos=2,this.codeSize=0,this.codeBuf=0,n.call(this)}return a.prototype=Object.create(n.prototype),a.prototype.getBits=function(e){for(var t,r=this.codeSize,n=this.codeBuf,o=this.bytes,i=this.bytesPos;r<e;)void 0===(t=o[i++])&&s("Bad encoding in flate stream"),n|=t<<r,r+=8;return t=n&(1<<e)-1,this.codeBuf=n>>e,this.codeSize=r-=e,this.bytesPos=i,t},a.prototype.getCode=function(e){for(var t=e[0],r=e[1],n=this.codeSize,o=this.codeBuf,i=this.bytes,a=this.bytesPos;n<r;){var l;void 0===(l=i[a++])&&s("Bad encoding in flate stream"),o|=l<<n,n+=8}var u=t[o&(1<<r)-1],c=u>>16,h=65535&u;return(0==n||n<c||0==c)&&s("Bad encoding in flate stream"),this.codeBuf=o>>c,this.codeSize=n-c,this.bytesPos=a,h},a.prototype.generateHuffmanTable=function(e){for(var t=e.length,r=0,n=0;n<t;++n)e[n]>r&&(r=e[n]);for(var o=1<<r,i=new Uint32Array(o),s=1,a=0,l=2;s<=r;++s,a<<=1,l<<=1)for(var u=0;u<t;++u)if(e[u]==s){var c=0,h=a;for(n=0;n<s;++n)c=c<<1|1&h,h>>=1;for(n=c;n<o;n+=l)i[n]=s<<16|u;++a}return[i,r]},a.prototype.readBlock=function(){function n(e,t,r,n,o){for(var i=e.getBits(r)+n;i-- >0;)t[p++]=o}var a=this.getBits(3);if(1&a&&(this.eof=!0),0!=(a>>=1)){var l,u;if(1==a)l=o,u=i;else if(2==a){for(var c=this.getBits(5)+257,h=this.getBits(5)+1,f=this.getBits(4)+4,d=Array(e.length),p=0;p<f;)d[e[p++]]=this.getBits(3);for(var g=this.generateHuffmanTable(d),m=0,y=(p=0,c+h),w=new Array(y);p<y;){var C=this.getCode(g);16==C?n(this,w,2,3,m):17==C?n(this,w,3,3,m=0):18==C?n(this,w,7,11,m=0):w[p++]=m=C}l=this.generateHuffmanTable(w.slice(0,c)),u=this.generateHuffmanTable(w.slice(c,y))}else s("Unknown block type in flate stream");for(var b=(R=this.buffer)?R.length:0,v=this.bufferLength;;){var x=this.getCode(l);if(x<256)v+1>=b&&(b=(R=this.ensureBuffer(v+1)).length),R[v++]=x;else{if(256==x)return void(this.bufferLength=v);var k=(x=t[x-=257])>>16;k>0&&(k=this.getBits(k)),m=(65535&x)+k,x=this.getCode(u),(k=(x=r[x])>>16)>0&&(k=this.getBits(k));var T=(65535&x)+k;v+m>=b&&(b=(R=this.ensureBuffer(v+m)).length);for(var A=0;A<m;++A,++v)R[v]=R[v-T]}}}else{var S,I=this.bytes,M=this.bytesPos;void 0===(S=I[M++])&&s("Bad block header in flate stream");var P=S;void 0===(S=I[M++])&&s("Bad block header in flate stream"),P|=S<<8,void 0===(S=I[M++])&&s("Bad block header in flate stream");var D=S;void 0===(S=I[M++])&&s("Bad block header in flate stream"),(D|=S<<8)!=(65535&~P)&&s("Bad uncompressed block length in flate stream"),this.codeBuf=0,this.codeSize=0;var E=this.bufferLength,R=this.ensureBuffer(E+P),_=E+P;this.bufferLength=_;for(var L=E;L<_;++L){if(void 0===(S=I[M++])){this.eof=!0;break}R[L]=S}this.bytesPos=M}},a}())&&(o.exports=i);const l=(0,s.g)(a.exports)},3892:(e,t,r)=>{function n(e){return"h"in e&&"s"in e&&"v"in e}function o(e){return"l"in e&&"a"in e&&"b"in e}function i(e){return"l"in e&&"c"in e&&"h"in e}r.d(t,{Y3:()=>g,_Y:()=>p,sJ:()=>m,xr:()=>d});const s=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],a=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function l(e,t){const r=[];let n,o;if(e[0].length!==t.length)throw new Error("dimensions do not match");const i=e.length,s=e[0].length;let a=0;for(n=0;n<i;n++){for(a=0,o=0;o<s;o++)a+=e[n][o]*t[o];r.push(a)}return r}function u(e){const t=[e.r/255,e.g/255,e.b/255].map((e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4)),r=l(s,t);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function c(e){const t=l(a,[e.x/100,e.y/100,e.z/100]).map((e=>{const t=e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055;return Math.min(1,Math.max(t,0))}));return{r:Math.round(255*t[0]),g:Math.round(255*t[1]),b:Math.round(255*t[2])}}function h(e){const t=[e.x/95.047,e.y/100,e.z/108.883].map((e=>e>(6/29)**3?e**(1/3):1/3*(29/6)**2*e+4/29));return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2])}}function f(e){const t=e.l,r=[(t+16)/116+e.a/500,(t+16)/116,(t+16)/116-e.b/200].map((e=>e>6/29?e**3:3*(6/29)**2*(e-4/29)));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function d(e){return"r"in(t=e)&&"g"in t&&"b"in t?e:i(e)?function(e){return c(f(function(e){const t=e.l,r=e.c,n=e.h;return{l:t,a:r*Math.cos(n),b:r*Math.sin(n)}}(e)))}(e):o(e)?function(e){return c(f(e))}(e):function(e){return"x"in e&&"y"in e&&"z"in e}(e)?c(e):n(e)?function(e){const t=(e.h+360)%360/60,r=e.s/100,n=e.v/100*255,o=n*r,i=o*(1-Math.abs(t%2-1));let s;switch(Math.floor(t)){case 0:s={r:o,g:i,b:0};break;case 1:s={r:i,g:o,b:0};break;case 2:s={r:0,g:o,b:i};break;case 3:s={r:0,g:i,b:o};break;case 4:s={r:i,g:0,b:o};break;case 5:case 6:s={r:o,g:0,b:i};break;default:s={r:0,g:0,b:0}}return s.r=Math.round(s.r+n-o),s.g=Math.round(s.g+n-o),s.b=Math.round(s.b+n-o),s}(e):e;var t}function p(e){return n(e)?e:function(e){const t=e.r,r=e.g,n=e.b,o=Math.max(t,r,n),i=o-Math.min(t,r,n);let s=o,a=0===i?0:o===t?(r-n)/i%6:o===r?(n-t)/i+2:(t-r)/i+4,l=0===i?0:i/s;return a<0&&(a+=6),a*=60,l*=100,s*=100/255,{h:a,s:l,v:s}}(d(e))}function g(e){return o(e)?e:function(e){return h(u(e))}(d(e))}function m(e){return i(e)?e:function(e){return function(e){const t=e.l,r=e.a,n=e.b,o=Math.sqrt(r*r+n*n);let i=Math.atan2(n,r);return i=i>0?i:i+2*Math.PI,{l:t,c:o,h:i}}(h(u(e)))}(d(e))}},5847:(e,t,r)=>{r.d(t,{Z:()=>g});var n=r(43697),o=r(20102),i=r(96674),s=r(22974),a=r(92604),l=r(5600),u=r(90578),c=r(52011);class h{constructor(e=null,t=null,r=null){this.minValue=e,this.maxValue=t,this.noDataValue=r}}var f,d=r(81578);let p=f=class extends i.wq{static createEmptyBand(e,t){return new(f.getPixelArrayConstructor(e))(t)}static getPixelArrayConstructor(e){let t;switch(e){case"u1":case"u2":case"u4":case"u8":t=Uint8Array;break;case"u16":t=Uint16Array;break;case"u32":t=Uint32Array;break;case"s8":t=Int8Array;break;case"s16":t=Int16Array;break;case"s32":t=Int32Array;break;case"f32":case"c64":case"c128":case"unknown":t=Float32Array;break;case"f64":t=Float64Array}return t}constructor(e){super(e),this.width=null,this.height=null,this.pixelType="f32",this.validPixelCount=null,this.mask=null,this.maskIsAlpha=!1,this.premultiplyAlpha=!1,this.statistics=null,this.depthCount=1}castPixelType(e){if(!e)return"f32";let t=e.toLowerCase();return["u1","u2","u4"].includes(t)?t="u8":["unknown","u8","s8","u16","s16","u32","s32","f32","f64"].includes(t)||(t="f32"),t}getPlaneCount(){return this.pixels?.length}addData(e){if(!e.pixels||e.pixels.length!==this.width*this.height)throw new o.Z("pixelblock:invalid-or-missing-pixels","add data requires valid pixels array that has same length defined by pixel block width * height");this.pixels||(this.pixels=[]),this.statistics||(this.statistics=[]),this.pixels.push(e.pixels),this.statistics.push(e.statistics??new h)}getAsRGBA(){const e=new ArrayBuffer(this.width*this.height*4);switch(this.pixelType){case"s8":case"s16":case"u16":case"s32":case"u32":case"f32":case"f64":this._fillFromNon8Bit(e);break;default:this._fillFrom8Bit(e)}return new Uint8ClampedArray(e)}getAsRGBAFloat(){const e=new Float32Array(this.width*this.height*4);return this._fillFrom32Bit(e),e}updateStatistics(){if(!this.pixels)return;this.statistics=this.pixels.map((e=>this._calculateBandStatistics(e,this.mask)));const e=this.mask;let t=0;if(null!=e)for(let r=0;r<e.length;r++)e[r]&&t++;else t=this.width*this.height;this.validPixelCount=t}clamp(e){if(!e||"f64"===e||"f32"===e||!this.pixels)return;const[t,r]=(0,d.r)(e),n=this.pixels,o=this.width*this.height,i=n.length;let s,a,l;const u=[];for(let c=0;c<i;c++){l=f.createEmptyBand(e,o),s=n[c];for(let e=0;e<o;e++)a=s[e],l[e]=a>r?r:a<t?t:a;u.push(l)}this.pixels=u,this.pixelType=e}extractBands(e){const{pixels:t,statistics:r}=this;if(null==e||0===e.length||!t||0===t.length)return this;const n=t.length,o=e.some((e=>e>=t.length)),i=n===e.length&&!e.some(((e,t)=>e!==t));if(o||i)return this;const s=this.bandMasks?.length===n?e.map((e=>this.bandMasks[e])):void 0;let{mask:a,validPixelCount:l}=this;const{width:u,height:c}=this;if(s){if(1===s.length)a=s[0];else{const e=u*c;a=new Uint8Array(e).fill(255);for(let t=0;t<s.length;t++){const r=s[t];for(let t=0;t<e;t++)r[t]||(a[t]=0)}}l=a.filter((e=>!!e)).length}return new f({pixelType:this.pixelType,width:u,height:c,mask:a,bandMasks:s,validPixelCount:l,maskIsAlpha:this.maskIsAlpha,pixels:e.map((e=>t[e])),statistics:r&&e.map((e=>r[e]))})}clone(){const e=new f({width:this.width,height:this.height,pixelType:this.pixelType,maskIsAlpha:this.maskIsAlpha,validPixelCount:this.validPixelCount});let t;null!=this.mask&&(this.mask instanceof Uint8Array?e.mask=new Uint8Array(this.mask):e.mask=this.mask.slice(0));const r=f.getPixelArrayConstructor(this.pixelType);if(this.pixels&&this.pixels.length>0){e.pixels=[];const n=!!this.pixels[0].slice;for(t=0;t<this.pixels.length;t++)e.pixels[t]=n?this.pixels[t].slice(0,this.pixels[t].length):new r(this.pixels[t])}if(this.statistics)for(e.statistics=[],t=0;t<this.statistics.length;t++)e.statistics[t]=(0,s.d9)(this.statistics[t]);return e.premultiplyAlpha=this.premultiplyAlpha,e}_fillFrom8Bit(e){const{mask:t,maskIsAlpha:r,premultiplyAlpha:n,pixels:o}=this;if(!e||!o||!o.length)return void a.Z.getLogger(this.declaredClass).error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");let i,s,l,u;i=s=l=o[0],o.length>=3?(s=o[1],l=o[2]):2===o.length&&(s=o[1]);const c=new Uint32Array(e),h=this.width*this.height;if(i.length===h)if(null!=t&&t.length===h)if(r)for(u=0;u<h;u++){const e=t[u];if(e){const t=e/255;c[u]=n?e<<24|l[u]*t<<16|s[u]*t<<8|i[u]*t:e<<24|l[u]<<16|s[u]<<8|i[u]}}else for(u=0;u<h;u++)t[u]&&(c[u]=255<<24|l[u]<<16|s[u]<<8|i[u]);else for(u=0;u<h;u++)c[u]=255<<24|l[u]<<16|s[u]<<8|i[u];else a.Z.getLogger(this.declaredClass).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.")}_fillFromNon8Bit(e){const{pixels:t,mask:r,statistics:n}=this;if(!e||!t||!t.length)return void a.Z.getLogger(this.declaredClass).error("getAsRGBA()","Unable to convert to RGBA. The input pixel block is empty.");const o=this.pixelType;let i=1,s=0,l=1;if(n&&n.length>0){for(const e of n)if(null!=e.minValue&&(s=Math.min(s,e.minValue)),null!=e.maxValue&&null!=e.minValue){const t=e.maxValue-e.minValue;l=Math.max(l,t)}i=255/l}else{let e=255;"s8"===o?(s=-128,e=127):"u16"===o?e=65535:"s16"===o?(s=-32768,e=32767):"u32"===o?e=4294967295:"s32"===o?(s=-2147483648,e=2147483647):"f32"===o?(s=-34e38,e=34e38):"f64"===o&&(s=-Number.MAX_VALUE,e=Number.MAX_VALUE),i=255/(e-s)}const u=new Uint32Array(e),c=this.width*this.height;let h,f,d,p,g;if(h=f=d=t[0],h.length!==c)return a.Z.getLogger(this.declaredClass).error("getAsRGBA()","Unable to convert to RGBA. The pixelblock is invalid.");if(t.length>=2)if(f=t[1],t.length>=3&&(d=t[2]),null!=r&&r.length===c)for(p=0;p<c;p++)r[p]&&(u[p]=255<<24|(d[p]-s)*i<<16|(f[p]-s)*i<<8|(h[p]-s)*i);else for(p=0;p<c;p++)u[p]=255<<24|(d[p]-s)*i<<16|(f[p]-s)*i<<8|(h[p]-s)*i;else if(null!=r&&r.length===c)for(p=0;p<c;p++)g=(h[p]-s)*i,r[p]&&(u[p]=255<<24|g<<16|g<<8|g);else for(p=0;p<c;p++)g=(h[p]-s)*i,u[p]=255<<24|g<<16|g<<8|g}_fillFrom32Bit(e){const{pixels:t,mask:r}=this;if(!e||!t||!t.length)return a.Z.getLogger(this.declaredClass).error("getAsRGBAFloat()","Unable to convert to RGBA. The input pixel block is empty.");let n,o,i,s;n=o=i=t[0],t.length>=3?(o=t[1],i=t[2]):2===t.length&&(o=t[1]);const l=this.width*this.height;if(n.length!==l)return a.Z.getLogger(this.declaredClass).error("getAsRGBAFloat()","Unable to convert to RGBA. The pixelblock is invalid.");let u=0;if(null!=r&&r.length===l)for(s=0;s<l;s++)e[u++]=n[s],e[u++]=o[s],e[u++]=i[s],e[u++]=1&r[s];else for(s=0;s<l;s++)e[u++]=n[s],e[u++]=o[s],e[u++]=i[s],e[u++]=1}_calculateBandStatistics(e,t){let r=1/0,n=-1/0;const o=e.length;let i,s=0;if(null!=t)for(i=0;i<o;i++)t[i]&&(s=e[i],r=s<r?s:r,n=s>n?s:n);else for(i=0;i<o;i++)s=e[i],r=s<r?s:r,n=s>n?s:n;return new h(r,n)}};(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"width",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"height",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"pixelType",void 0),(0,n._)([(0,u.p)("pixelType")],p.prototype,"castPixelType",null),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"validPixelCount",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"mask",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"maskIsAlpha",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"pixels",void 0),(0,n._)([(0,l.Cb)()],p.prototype,"premultiplyAlpha",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"statistics",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"depthCount",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"noDataValues",void 0),(0,n._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"bandMasks",void 0),p=f=(0,n._)([(0,c.j)("esri.layers.support.PixelBlock")],p);const g=p},25972:(e,t,r)=>{r.d(t,{Z:()=>k});var n,o=r(43697),i=r(96674),s=r(22974),a=r(5600),l=(r(75215),r(52011)),u=r(6570),c=r(82971);function h(e){return e=Number(e),isNaN(e)?void 0:e}r(67676),r(80442);let f=n=class extends i.wq{constructor(){super(...arguments),this.name=null,this.minWavelength=void 0,this.maxWavelength=void 0,this.radianceBias=void 0,this.radianceGain=void 0,this.reflectanceBias=void 0,this.reflectanceGain=void 0,this.solarIrradiance=void 0}clone(){return new n({name:this.name,minWavelength:this.minWavelength,maxWavelength:this.maxWavelength,radianceBias:this.radianceBias,radianceGain:this.radianceGain,reflectanceBias:this.reflectanceBias,reflectanceGain:this.reflectanceGain,solarIrradiance:this.solarIrradiance})}};(0,o._)([(0,a.Cb)({json:{name:"BandName",write:!0}})],f.prototype,"name",void 0),(0,o._)([(0,a.Cb)({json:{name:"WavelengthMin",read:{reader:h},write:!0}})],f.prototype,"minWavelength",void 0),(0,o._)([(0,a.Cb)({json:{name:"WavelengthMax",read:{reader:h},write:!0}})],f.prototype,"maxWavelength",void 0),(0,o._)([(0,a.Cb)({json:{name:"RadianceBias",read:{reader:h},write:!0}})],f.prototype,"radianceBias",void 0),(0,o._)([(0,a.Cb)({json:{name:"RadianceGain",read:{reader:h},write:!0}})],f.prototype,"radianceGain",void 0),(0,o._)([(0,a.Cb)({json:{name:"ReflectanceBias",read:{reader:h},write:!0}})],f.prototype,"reflectanceBias",void 0),(0,o._)([(0,a.Cb)({json:{name:"ReflectanceGain",read:{reader:h},write:!0}})],f.prototype,"reflectanceGain",void 0),(0,o._)([(0,a.Cb)({json:{name:"SolarIrradiance",read:{reader:h},write:!0}})],f.prototype,"solarIrradiance",void 0),f=n=(0,o._)([(0,l.j)("esri.layers.support.RasterBandInfo")],f);const d=f;var p,g=r(71715),m=r(30556);function y(e){return e=Number(e),isNaN(e)?void 0:e}let w=p=class extends i.wq{constructor(){super(...arguments),this.acquisitionDate=void 0,this.cloudCover=void 0,this.productName=void 0,this.sensorName=null,this.sensorAzimuth=void 0,this.sensorElevation=void 0,this.sunAzimuth=void 0,this.sunElevation=void 0}readAcquisitionDate(e){return new Date(e)}writeAcquisitionDate(e,t){t.AcquisitionDate=e.getTime()}clone(){return new p({acquisitionDate:this.acquisitionDate,cloudCover:this.cloudCover,productName:this.productName,sensorName:this.sensorName,sensorAzimuth:this.sensorAzimuth,sensorElevation:this.sensorElevation,sunAzimuth:this.sunAzimuth,sunElevation:this.sunElevation})}};(0,o._)([(0,a.Cb)({json:{name:"AcquisitionDate",write:!0}})],w.prototype,"acquisitionDate",void 0),(0,o._)([(0,g.r)("acquisitionDate")],w.prototype,"readAcquisitionDate",null),(0,o._)([(0,m.c)("acquisitionDate")],w.prototype,"writeAcquisitionDate",null),(0,o._)([(0,a.Cb)({json:{name:"CloudCover",read:{reader:y},write:!0}})],w.prototype,"cloudCover",void 0),(0,o._)([(0,a.Cb)({json:{name:"ProductName",write:!0}})],w.prototype,"productName",void 0),(0,o._)([(0,a.Cb)({json:{name:"SensorName",write:!0}})],w.prototype,"sensorName",void 0),(0,o._)([(0,a.Cb)({json:{name:"SensorAzimuth",read:{reader:y},write:!0}})],w.prototype,"sensorAzimuth",void 0),(0,o._)([(0,a.Cb)({json:{name:"SensorElevation",read:{reader:y},write:!0}})],w.prototype,"sensorElevation",void 0),(0,o._)([(0,a.Cb)({json:{name:"SunAzimuth",read:{reader:y},write:!0}})],w.prototype,"sunAzimuth",void 0),(0,o._)([(0,a.Cb)({json:{name:"SunElevation",read:{reader:y},write:!0}})],w.prototype,"sunElevation",void 0),w=p=(0,o._)([(0,l.j)("esri.layers.support.RasterSensorInfo")],w);const C=w;var b,v=r(36679);let x=b=class extends i.wq{constructor(e){super(e),this.attributeTable=null,this.bandCount=null,this.colormap=null,this.extent=null,this.format=void 0,this.height=null,this.width=null,this.histograms=null,this.keyProperties={},this.multidimensionalInfo=null,this.noDataValue=null,this.pixelSize=null,this.pixelType=null,this.isPseudoSpatialReference=!1,this.spatialReference=null,this.statistics=null,this.storageInfo=null,this.transform=null}get bandInfos(){const e=this.keyProperties.BandProperties;if(!e?.length){const e=[];for(let t=1;t<=this.bandCount;t++)e.push(new d({name:"band_"+t}));return e}const t=e.map((e=>d.fromJSON(e)));for(let e=0;e<t.length;e++)t[e].name=t[e].name??"band_"+(e+1);return t}get dataType(){const e=this.keyProperties?.DataType?.toLowerCase()??"generic";return"stdtime"===e?"standard-time":e}get nativeExtent(){return this._get("nativeExtent")||this.extent}set nativeExtent(e){e&&this._set("nativeExtent",e)}get nativePixelSize(){if(null==this.transform||!this.transform.affectsPixelSize)return this.pixelSize;const e=this.nativeExtent;return{x:e.width/this.width,y:e.height/this.height}}get hasMultidimensionalTranspose(){return!!this.storageInfo?.transposeInfo}get sensorInfo(){if(this.keyProperties?.SensorName)return C.fromJSON(this.keyProperties)}clone(){return new b({attributeTable:(0,s.d9)(this.attributeTable),bandCount:this.bandCount,colormap:(0,s.d9)(this.colormap),extent:(0,s.d9)(this.extent),nativePixelSize:(0,s.d9)(this.nativePixelSize),format:this.format,height:this.height,width:this.width,histograms:(0,s.d9)(this.histograms),keyProperties:(0,s.d9)(this.keyProperties),multidimensionalInfo:(0,s.d9)(this.multidimensionalInfo),noDataValue:this.noDataValue,pixelSize:(0,s.d9)(this.pixelSize),pixelType:this.pixelType,isPseudoSpatialReference:this.isPseudoSpatialReference,spatialReference:(0,s.d9)(this.spatialReference),statistics:(0,s.d9)(this.statistics),storageInfo:(0,s.d9)(this.storageInfo),transform:(0,s.d9)(this.transform)})}};(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"attributeTable",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"bandCount",void 0),(0,o._)([(0,a.Cb)({readOnly:!0})],x.prototype,"bandInfos",null),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"colormap",void 0),(0,o._)([(0,a.Cb)({type:String,readOnly:!0})],x.prototype,"dataType",null),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],x.prototype,"extent",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],x.prototype,"nativeExtent",null),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"nativePixelSize",null),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"format",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"height",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"width",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"hasMultidimensionalTranspose",null),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"histograms",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"keyProperties",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"multidimensionalInfo",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"noDataValue",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"pixelSize",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"pixelType",void 0),(0,o._)([(0,a.Cb)()],x.prototype,"isPseudoSpatialReference",void 0),(0,o._)([(0,a.Cb)({readOnly:!0})],x.prototype,"sensorInfo",null),(0,o._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],x.prototype,"spatialReference",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"statistics",void 0),(0,o._)([(0,a.Cb)({type:v.Z,json:{write:!0}})],x.prototype,"storageInfo",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],x.prototype,"transform",void 0),x=b=(0,o._)([(0,l.j)("esri.layers.support.RasterInfo")],x);const k=x},36679:(e,t,r)=>{r.d(t,{Z:()=>h});var n,o=r(43697),i=r(96674),s=r(22974),a=r(5600),l=(r(75215),r(52011)),u=r(94139);let c=n=class extends i.wq{constructor(){super(...arguments),this.blockWidth=void 0,this.blockHeight=void 0,this.compression=null,this.origin=null,this.firstPyramidLevel=null,this.maximumPyramidLevel=null,this.pyramidScalingFactor=2,this.pyramidBlockWidth=null,this.pyramidBlockHeight=null,this.isVirtualTileInfo=!1,this.tileInfo=null,this.transposeInfo=null,this.blockBoundary=null}clone(){return new n({blockWidth:this.blockWidth,blockHeight:this.blockHeight,compression:this.compression,origin:(0,s.d9)(this.origin),firstPyramidLevel:this.firstPyramidLevel,maximumPyramidLevel:this.maximumPyramidLevel,pyramidResolutions:(0,s.d9)(this.pyramidResolutions),pyramidScalingFactor:this.pyramidScalingFactor,pyramidBlockWidth:this.pyramidBlockWidth,pyramidBlockHeight:this.pyramidBlockHeight,isVirtualTileInfo:this.isVirtualTileInfo,tileInfo:(0,s.d9)(this.tileInfo),transposeInfo:(0,s.d9)(this.transposeInfo),blockBoundary:(0,s.d9)(this.blockBoundary)})}};(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"blockWidth",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"blockHeight",void 0),(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],c.prototype,"compression",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],c.prototype,"origin",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"firstPyramidLevel",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"maximumPyramidLevel",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],c.prototype,"pyramidResolutions",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"pyramidScalingFactor",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"pyramidBlockWidth",void 0),(0,o._)([(0,a.Cb)({type:Number,json:{write:!0}})],c.prototype,"pyramidBlockHeight",void 0),(0,o._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"isVirtualTileInfo",void 0),(0,o._)([(0,a.Cb)({json:{write:!0}})],c.prototype,"tileInfo",void 0),(0,o._)([(0,a.Cb)()],c.prototype,"transposeInfo",void 0),(0,o._)([(0,a.Cb)()],c.prototype,"blockBoundary",void 0),c=n=(0,o._)([(0,l.j)("esri.layers.support.RasterStorageInfo")],c);const h=c},20095:(e,t,r)=>{function n(e,t){let r=0,n="",o=0,i=0;const s=e.length;for(;r<s;)i=e[r++],o=i>>4,o<8?o=1:15===o?(o=4,i=(7&i)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++]):14===o?(o=3,i=(15&i)<<12|(63&e[r++])<<6|63&e[r++]):(o=2,i=(31&i)<<6|63&e[r++]),(0!==i||t)&&(n+=String.fromCharCode(i));return n}r.d(t,{f:()=>n})},72955:(e,t,r)=>{r.d(t,{Jx:()=>h,zD:()=>a});var n=r(99880);const o=[{pixelType:"S8",size:1,ctor:Int8Array,range:[-128,127]},{pixelType:"U8",size:1,ctor:Uint8Array,range:[0,255]},{pixelType:"S16",size:2,ctor:Int16Array,range:[-32768,32767]},{pixelType:"U16",size:2,ctor:Uint16Array,range:[0,65536]},{pixelType:"S32",size:4,ctor:Int32Array,range:[-2147483648,2147483647]},{pixelType:"U32",size:4,ctor:Uint32Array,range:[0,4294967296]},{pixelType:"F32",size:4,ctor:Float32Array,range:[-34027999387901484e22,34027999387901484e22]},{pixelType:"F64",size:8,ctor:Float64Array,range:[-17976931348623157e292,17976931348623157e292]}];let i=null,s=null;function a(){return i||(i=r.e(6233).then(r.bind(r,26233)).then((e=>e.l)).then((({default:e})=>e({locateFile:e=>(0,n.V)(`esri/layers/support/rasterFormats/${e}`)}))).then((e=>{(function(e){const{_malloc:t,_free:r,_lerc_getBlobInfo:n,_lerc_getDataRanges:i,_lerc_decode_4D:s,asm:a}=e;let c;const h=Object.values(a).find((t=>t&&"buffer"in t&&t.buffer===e.HEAPU8.buffer)),f=e=>{const r=e.map((e=>function(e){return 16+(e>>3<<3)}(e))),n=r.reduce(((e,t)=>e+t)),o=t(n);c=new Uint8Array(h.buffer);let i=r[0];r[0]=o;for(let e=1;e<r.length;e++){const t=r[e];r[e]=r[e-1]+i,i=t}return r};l.getBlobInfo=e=>{const t=new Uint8Array(48),o=new Uint8Array(24),[s,a,l]=f([e.length,t.length,o.length]);c.set(e,s),c.set(t,a),c.set(o,l);let d=n(s,e.length,a,l,12,3);if(d)throw r(s),new Error(`lerc-getBlobInfo: error code is ${d}`);c=new Uint8Array(h.buffer),u(c,a,t),u(c,l,o);const p=new Uint32Array(t.buffer),g=new Float64Array(o.buffer),[m,y,,w,C,b,v,x,k,T,A]=p,S={version:m,depthCount:T,width:w,height:C,validPixelCount:v,bandCount:b,blobSize:x,maskCount:k,dataType:y,minValue:g[0],maxValue:g[1],maxZerror:g[2],statistics:[],bandCountWithNoData:A};if(A)return S;if(1===T&&1===b)return r(s),S.statistics.push({minValue:g[0],maxValue:g[1]}),S;const I=T*b*8,M=new Uint8Array(I),P=new Uint8Array(I);let D=s,E=0,R=0,_=!1;if(c.byteLength<s+2*I?(r(s),_=!0,[D,E,R]=f([e.length,I,I]),c.set(e,D)):[E,R]=f([I,I]),c.set(M,E),c.set(P,R),d=i(D,e.length,T,b,E,R),d)throw r(D),_||r(E),new Error(`lerc-getDataRanges: error code is ${d}`);c=new Uint8Array(h.buffer),u(c,E,M),u(c,R,P);const L=new Float64Array(M.buffer),B=new Float64Array(P.buffer),U=S.statistics;for(let e=0;e<b;e++)if(T>1){const t=L.slice(e*T,(e+1)*T),r=B.slice(e*T,(e+1)*T),n=Math.min.apply(null,t),o=Math.max.apply(null,r);U.push({minValue:n,maxValue:o,depthStats:{minValues:t,maxValues:r}})}else U.push({minValue:L[e],maxValue:B[e]});return r(D),_||r(E),S},l.decode=(e,t)=>{const{maskCount:n,depthCount:i,bandCount:a,width:l,height:d,dataType:p,bandCountWithNoData:g}=t,m=o[p],y=l*d,w=new Uint8Array(y*a),C=y*i*a*m.size,b=new Uint8Array(C),v=new Uint8Array(a),x=new Uint8Array(8*a),[k,T,A,S,I]=f([e.length,w.length,b.length,v.length,x.length]);c.set(e,k),c.set(w,T),c.set(b,A),c.set(v,S),c.set(x,I);const M=s(k,e.length,n,T,i,l,d,a,p,A,S,I);if(M)throw r(k),new Error(`lerc-decode: error code is ${M}`);c=new Uint8Array(h.buffer),u(c,A,b),u(c,T,w);let P=null;if(g){u(c,S,v),u(c,I,x),P=[];const e=new Float64Array(x.buffer);for(let t=0;t<v.length;t++)P.push(v[t]?e[t]:null)}return r(k),{data:b,maskData:w,noDataValues:P}}})(e),s=!0})),i)}const l={getBlobInfo:null,decode:null};function u(e,t,r){r.set(e.slice(t,t+r.length))}function c(e,t,r,n,o){if(r<2)return e;const i=new n(t*r);if(o)for(let n=0,o=0;n<t;n++)for(let s=0,a=n;s<r;s++,a+=t)i[a]=e[o++];else for(let n=0,o=0;n<t;n++)for(let s=0,a=n;s<r;s++,a+=t)i[o++]=e[a];return i}function h(e,t={}){const r=t.inputOffset??0,n=e instanceof Uint8Array?e.subarray(r):new Uint8Array(e,r),i=l.getBlobInfo(n),{data:s,maskData:a,noDataValues:u}=l.decode(n,i),{width:h,height:f,bandCount:d,depthCount:p,dataType:g,maskCount:m,statistics:y}=i,w=o[g],C=new w.ctor(s.buffer),b=[],v=[],x=h*f,k=x*p;for(let e=0;e<d;e++){const r=C.subarray(e*k,(e+1)*k);if(t.returnInterleaved)b.push(r);else{const e=c(r,x,p,w.ctor,!0);b.push(e)}v.push(a.subarray(e*k,(e+1)*k))}const T=0===m?null:1===m?v[0]:new Uint8Array(x);if(m>1){T.set(v[0]);for(let e=1;e<v.length;e++){const t=v[e];for(let e=0;e<x;e++)T[e]=T[e]&t[e]}}const{noDataValue:A}=t,S=null!=A&&w.range[0]<=A&&w.range[1]>=A;if(m>0&&S)for(let e=0;e<d;e++){const t=b[e],r=v[e]||T;for(let e=0;e<x;e++)0===r[e]&&(t[e]=A)}const I=m===d&&d>1?v:null,{pixelType:M}=w;return{width:h,height:f,bandCount:d,pixelType:M,depthCount:p,statistics:y,pixels:b,mask:T,bandMasks:I,noDataValues:u}}},88781:(e,t,r)=>{function n(){const e=[];for(let t=0;t<=257;t++)e[t]=[t];return e}function o(e,t){for(let r=0;r<t.length;r++)e.push(t[r])}r.d(t,{J:()=>s});const i=new Set;function s(e,t,r,s=!0){const a=function(e,t,r,n=!0){if(t%4!=0||r%4!=0){const o=new ArrayBuffer(4*Math.ceil(r/4)),i=new Uint8Array(o),s=new Uint8Array(e,t,r);if(n)for(let e=0;e<i.length;e+=4)i[e]=s[e+3],i[e+1]=s[e+2],i[e+2]=s[e+1],i[e+3]=s[e];else i.set(s);return new Uint32Array(i.buffer)}if(n){const n=new Uint8Array(e,t,r),o=new Uint8Array(n.length);for(let e=0;e<o.length;e+=4)o[e]=n[e+3],o[e+1]=n[e+2],o[e+2]=n[e+1],o[e+3]=n[e];return new Uint32Array(o.buffer)}return new Uint32Array(e,t,r/4)}(e,t,r,s);let l=9,u=n(),c=32,h=u.length,f=[],d=1,p=a[0],g=0;const m=a.length,y=8*(4*m-r),w=[];for(;null!=p;){if(c>=l)c-=l,g=p>>>32-l,p<<=l;else{g=p>>>32-c,p=a[d++];const e=l-c;c=32-e,g=(g<<e)+(p>>>c),p<<=e}if(257===g)break;if(256===g){l=9,u=n(),h=u.length,f=[];continue}const e=u[g];if(null==e){if(g>u.length)throw new Error("data integrity issue: code does not exist on code page");f.push(f[0]),u[h++]=f.slice(),o(w,f)}else o(w,e),f.push(e[0]),f.length>1&&(u[h++]=f.slice()),f=e.slice();if(i.has(h)&&l++,0===c&&(p=a[d++],c=32),d>m||d===m&&c<=y)break}return new Uint8Array(w)}i.add(511),i.add(1023),i.add(2047),i.add(4095),i.add(8191)},75993:(e,t,r)=>{r.d(t,{J:()=>R,y:()=>E});var n=r(20102),o=r(70586),i=r(5847),s=r(95330),a=r(80899);class l{constructor(e){this._canvas=null,this._ctx=null,e&&(this._canvas=e.canvas,this._ctx=e.ctx||e.canvas&&e.canvas.getContext("2d"))}decode(e,t,r){if(!e||e.byteLength<10)throw new n.Z("imagecanvasdecoder: decode","required a valid encoded data as input.");let{width:o=0,height:i=0,format:a}=t;const{applyJpegMask:u}=t;if(u&&(!o||!i))throw new n.Z("imagecanvasdecoder: decode","image width and height are needed to apply jpeg mask directly to canvas");return new Promise(((n,c)=>{let h=null;"jpg"===a&&u&&(h=l._getMask(e,{width:o,height:i}));const f=new Blob([new Uint8Array(e)],{type:"image/"+a=="jpg"?"jpeg":a}),d=URL.createObjectURL(f),p=new Image;let g;p.src=d,p.onload=()=>{if(URL.revokeObjectURL(d),(0,s.Hc)(r))return void c((0,s.zE)());o=p.width,i=p.height,this._canvas&&this._ctx?(this._canvas.width===o&&this._canvas.height===i||(this._canvas.width=o,this._canvas.height=i),this._ctx.clearRect(0,0,o,i)):(this._canvas=document.createElement("canvas"),this._canvas.width=o,this._canvas.height=i,this._ctx=this._canvas.getContext("2d")),this._ctx.drawImage(p,0,0);const e=this._ctx.getImageData(0,0,o,i);let a;if(g=e.data,t.renderOnCanvas){if(h)for(a=0;a<h.length;a++)h[a]?g[4*a+3]=255:g[4*a+3]=0;return this._ctx.putImageData(e,0,0),void n(null)}const l=o*i,u=new Uint8Array(l),f=new Uint8Array(l),m=new Uint8Array(l);if(h)for(a=0;a<l;a++)u[a]=g[4*a],f[a]=g[4*a+1],m[a]=g[4*a+2];else for(h=new Uint8Array(l),a=0;a<l;a++)u[a]=g[4*a],f[a]=g[4*a+1],m[a]=g[4*a+2],h[a]=g[4*a+3];n({width:o,height:i,pixels:[u,f,m],mask:h,pixelType:"u8"})},p.onerror=()=>{URL.revokeObjectURL(d),c("cannot load image")}}))}static _getMask(e,t){let r=null;try{const n=new Uint8Array(e),o=Math.ceil(n.length/2);let i=0;const s=n.length-2;for(i=o;i<s&&(255!==n[i]||217!==n[i+1]);i++);if(i+=2,i<n.length-1){const e=new a.Z(n.subarray(i)).getBytes();r=new Uint8Array(t.width*t.height);let o=0;for(let t=0;t<e.length;t++)for(let n=7;n>=0;n--)r[o++]=e[t]>>n&1}}catch(e){}return r}}var u=r(97575);class c{static decode(e,t=!1){const r=new Uint8Array(e),n=new u.J;n.parse(r);const{width:o,height:i,numComponents:s,eof:l}=n,c=n.getData(o,i,!0),h=o*i;let f,d=null,p=0,g=0,m=0;if(!t&&l<r.length-1)try{const e=new a.Z(r.subarray(l)).getBytes();d=new Uint8Array(h);let t=0;for(p=0;p<e.length;p++)for(m=7;m>=0;m--)d[t++]=e[p]>>m&1}catch{}if(1===s&&c.length===o*i){const e=new Uint8Array(c.buffer);f=[e,e,e]}else{for(f=[],p=0;p<3;p++)f.push(new Uint8Array(h));for(m=0,g=0;g<h;g++)for(p=0;p<3;p++)f[p][g]=c[m++]}return{width:o,height:i,pixels:f,mask:d}}}var h=r(72955),f=r(88781),d=r(81578);const p=(e,t)=>{const r=t.width*t.height,n=t.pixelType;return Math.floor(e.byteLength/(r*g(n)))},g=e=>{let t=1;switch(e){case Uint8Array:case Int8Array:t=1;break;case Uint16Array:case Int16Array:t=2;break;case Uint32Array:case Int32Array:case Float32Array:t=4;break;case Float64Array:t=8}return t};class m{static decode(e,t){const r=t.pixelType,n=[],o=t.width*t.height,i=p(e,t),{bandIds:s,format:a}=t,l=s&&s.length||p(e,t),u=e.byteLength-e.byteLength%(o*g(r)),c=new r(e,0,o*i);let h,f,d,m,y=null;if("bip"===a)for(h=0;h<l;h++){for(d=new r(o),m=s?s[h]:h,f=0;f<o;f++)d[f]=c[f*i+m];n.push(d)}else if("bsq"===a)for(h=0;h<l;h++)m=s?s[h]:h,n.push(c.subarray(m*o,(m+1)*o));return u<e.byteLength-1&&(y=((e,t)=>{if(8*e.byteLength<t)return null;const r=new Uint8Array(e,0,Math.ceil(t/8)),n=new Uint8Array(t);let o=0,i=0,s=0,a=0;for(s=0;s<r.length-1;s++)for(i=r[s],a=7;a>=0;a--)n[o++]=i>>a&1;for(a=7;o<t-1;)i=r[r.length-1],n[o++]=i>>a&1,a--;return n})(e.slice(u),o)),{pixels:n,mask:y}}}var y=r(94793),w=r(48279),C=function(e){var t,r,n;function o(e){var t,r,n,o,i,s,a,l,u,c,h,f,d;for(this.data=e,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},i=null;;){switch(t=this.readUInt32(),l=function(){var e,t;for(t=[],e=0;e<4;++e)t.push(String.fromCharCode(this.data[this.pos++]));return t}.call(this).join(""),l){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(t);break;case"fcTL":i&&this.animation.frames.push(i),this.pos+=4,i={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},o=this.readUInt16(),n=this.readUInt16()||100,i.delay=1e3*o/n,i.disposeOp=this.data[this.pos++],i.blendOp=this.data[this.pos++],i.data=[];break;case"IDAT":case"fdAT":for("fdAT"===l&&(this.pos+=4,t-=4),e=(null!=i?i.data:void 0)||this.imgData,h=0;0<=t?h<t:h>t;0<=t?++h:--h)e.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(t),(u=255-this.transparency.indexed.length)>0)for(f=0;0<=u?f<u:f>u;0<=u?++f:--f)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(t)[0];break;case 2:this.transparency.rgb=this.read(t)}break;case"tEXt":s=(c=this.read(t)).indexOf(0),a=String.fromCharCode.apply(String,c.slice(0,s)),this.text[a]=String.fromCharCode.apply(String,c.slice(s+1));break;case"IEND":return i&&this.animation.frames.push(i),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(d=this.colorType)||6===d,r=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*r,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=t}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}return o.load=function(e,t,r){var n;return"function"==typeof t&&(r=t),(n=new XMLHttpRequest).open("GET",e,!0),n.responseType="arraybuffer",n.onload=function(){var e;return e=new o(new Uint8Array(n.response||n.mozResponseArrayBuffer)),"function"==typeof(null!=t?t.getContext:void 0)&&e.render(t),"function"==typeof r?r(e):void 0},n.send(null)},o.prototype.read=function(e){var t,r;for(r=[],t=0;0<=e?t<e:t>e;0<=e?++t:--t)r.push(this.data[this.pos++]);return r},o.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},o.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},o.prototype.decodePixels=function(e){var t,r,n,o,i,s,l,u,c,h,f,d,p,g,m,y,w,C,b,v,x,k,T;if(null==e&&(e=this.imgData),0===e.length)return new Uint8Array(0);for(e=(e=new a.Z(e)).getBytes(),y=(d=this.pixelBitlength/8)*this.width,p=new Uint8Array(y*this.height),s=e.length,m=0,g=0,r=0;g<s;){switch(e[g++]){case 0:for(o=b=0;b<y;o=b+=1)p[r++]=e[g++];break;case 1:for(o=v=0;v<y;o=v+=1)t=e[g++],i=o<d?0:p[r-d],p[r++]=(t+i)%256;break;case 2:for(o=x=0;x<y;o=x+=1)t=e[g++],n=(o-o%d)/d,w=m&&p[(m-1)*y+n*d+o%d],p[r++]=(w+t)%256;break;case 3:for(o=k=0;k<y;o=k+=1)t=e[g++],n=(o-o%d)/d,i=o<d?0:p[r-d],w=m&&p[(m-1)*y+n*d+o%d],p[r++]=(t+Math.floor((i+w)/2))%256;break;case 4:for(o=T=0;T<y;o=T+=1)t=e[g++],n=(o-o%d)/d,i=o<d?0:p[r-d],0===m?w=C=0:(w=p[(m-1)*y+n*d+o%d],C=n&&p[(m-1)*y+(n-1)*d+o%d]),l=i+w-C,u=Math.abs(l-i),h=Math.abs(l-w),f=Math.abs(l-C),c=u<=h&&u<=f?i:h<=f?w:C,p[r++]=(t+c)%256;break;default:throw new Error("Invalid filter algorithm: "+e[g-1])}m++}return p},o.prototype.decodePalette=function(){var e,t,r,n,o,i,s,a,l;for(r=this.palette,i=this.transparency.indexed||[],o=new Uint8Array((i.length||0)+r.length),n=0,r.length,e=0,t=s=0,a=r.length;s<a;t=s+=3)o[n++]=r[t],o[n++]=r[t+1],o[n++]=r[t+2],o[n++]=null!=(l=i[e++])?l:255;return o},o.prototype.copyToImageData=function(e,t){var r,n,o,i,s,a,l,u,c,h,f;if(n=this.colors,c=null,r=this.hasAlphaChannel,this.palette.length&&(c=null!=(f=this._decodedPalette)?f:this._decodedPalette=this.decodePalette(),n=4,r=!0),u=(o=e.data||e).length,s=c||t,i=a=0,1===n)for(;i<u;)l=c?4*t[i/4]:a,h=s[l++],o[i++]=h,o[i++]=h,o[i++]=h,o[i++]=r?s[l++]:this.transparency.grayscale&&this.transparency.grayscale===h?0:255,a=l;else for(;i<u;)l=c?4*t[i/4]:a,o[i++]=s[l++],o[i++]=s[l++],o[i++]=s[l++],o[i++]=r?s[l++]:this.transparency.rgb&&this.transparency.rgb[1]===s[l-3]&&this.transparency.rgb[3]===s[l-2]&&this.transparency.rgb[5]===s[l-1]?0:255,a=l},o.prototype.decode=function(){var e;return e=new Uint8Array(this.width*this.height*4),this.copyToImageData(e,this.decodePixels()),e},r=e.document&&e.document.createElement("canvas"),n=r&&r.getContext("2d"),t=function(e){var t;return n.width=e.width,n.height=e.height,n.clearRect(0,0,e.width,e.height),n.putImageData(e,0,0),(t=new Image).src=r.toDataURL(),t},o.prototype.decodeFrames=function(e){var r,n,o,i,s,a,l,u;if(this.animation){for(u=[],n=s=0,a=(l=this.animation.frames).length;s<a;n=++s)r=l[n],o=e.createImageData(r.width,r.height),i=this.decodePixels(new Uint8Array(r.data)),this.copyToImageData(o,i),r.imageData=o,u.push(r.image=t(o));return u}},o.prototype.renderFrame=function(e,t){var r,n,o;return r=(n=this.animation.frames)[t],o=n[t-1],0===t&&e.clearRect(0,0,this.width,this.height),1===(null!=o?o.disposeOp:void 0)?e.clearRect(o.xOffset,o.yOffset,o.width,o.height):2===(null!=o?o.disposeOp:void 0)&&e.putImageData(o.imageData,o.xOffset,o.yOffset),0===r.blendOp&&e.clearRect(r.xOffset,r.yOffset,r.width,r.height),e.drawImage(r.image,r.xOffset,r.yOffset)},o.prototype.animate=function(e){var t,r,n,o,i,s,a=this;return r=0,s=this.animation,o=s.numFrames,n=s.frames,i=s.numPlays,(t=function(){var s,l;if(s=r++%o,l=n[s],a.renderFrame(e,s),o>1&&r/o<i)return a.animation._timeout=setTimeout(t,l.delay)})()},o.prototype.stopAnimation=function(){var e;return clearTimeout(null!=(e=this.animation)?e._timeout:void 0)},o.prototype.render=function(e){var t,r;return e._png&&e._png.stopAnimation(),e._png=this,e.width=this.width,e.height=this.height,t=e.getContext("2d"),this.animation?(this.decodeFrames(t),this.animate(t)):(r=t.createImageData(this.width,this.height),this.copyToImageData(r,this.decodePixels()),t.putImageData(r,0,0))},o}(self);const b=new Set(["jpg","png","bmp","gif"]);async function v(e,t){if(!w.f)throw new n.Z("rasterCoded:decode","lerc decoder is not supported on big endian platform");await(0,h.zD)();const{offset:r}=t,{width:o,height:s,pixelType:a,statistics:l,depthCount:u,noDataValues:c,bandMasks:f,pixels:d,mask:p}=(0,h.Jx)(e,{inputOffset:r,returnInterleaved:t.returnInterleaved});return new i.Z({width:o,height:s,pixelType:a.toLowerCase(),pixels:d,mask:p,statistics:l,bandMasks:f,depthCount:u,noDataValues:c})}async function x(e,t){const r=await(0,y.Jx)(e,{...t,noDataValue:null});(0,o.O3)(r);const n=new i.Z({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,statistics:null});return n.updateStatistics(),n}function k(e,t){const r=t.pixelType||"u8",n=i.Z.getPixelArrayConstructor(r),o="u8"===r?e:new n(e.buffer),s=[],a=t.planes||1;if(1===a)s.push(o);else for(let r=0;r<a;r++){const i=(t.width||1)*(t.height||e.length),l=new n(i);for(let e=0;e<i;e++)l[e]=o[e*a+r];s.push(l)}const l=new i.Z({width:t.width||1,height:t.height||e.length,pixels:s,pixelType:r,statistics:null});return l.updateStatistics(),l}function T(e,t){return k(new a.Z(new Uint8Array(e)).getBytes(),t)}function A(e,t){return k((0,f.J)(e,t.offset,t.eof,!t.isInputBigEndian),t)}function S(e,t,r){const{pixelTypeCtor:n}=function(e){let t=null,r=null;switch(e?e.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":r=255,t=Uint8Array;break;case"u16":r=r||65535,t=Uint16Array;break;case"u32":r=r||2**32-1,t=Uint32Array;break;case"s8":r=r||-128,t=Int8Array;break;case"s16":r=r||-32768,t=Int16Array;break;case"s32":r=r||0-2**31,t=Int32Array;break;default:t=Float32Array}return{pixelTypeCtor:t,noDataValue:r}}(t.pixelType),o=(0,m.decode)(e,{width:t.width,height:t.height,pixelType:n,format:r}),s=new i.Z({width:t.width,height:t.height,pixels:o.pixels,pixelType:t.pixelType,mask:o.mask,statistics:null});return s.updateStatistics(),s}function I(e,t){const r=c.decode(e,t.hasNoZlibMask??void 0),n=new i.Z({width:r.width,height:r.height,pixels:r.pixels,pixelType:"U8",mask:r.mask,statistics:null});return n.updateStatistics(),n}function M(e,t){const r=new Uint8Array(e),n=new C(r),{width:o,height:s}=t,a=o*s,l=n.decode();let u,c=0,h=0;const f=new Uint8Array(a);for(c=0;c<a;c++)f[c]=l[4*c+3];const d=new i.Z({width:o,height:s,pixels:[],pixelType:"U8",mask:f,statistics:[]});for(c=0;c<3;c++){for(u=new Uint8Array(a),h=0;h<a;h++)u[h]=l[4*h+c];d.addData({pixels:u})}return d.updateStatistics(),d}async function P(e,t,r,n){const o=new l,s={applyJpegMask:!1,format:t,...r},a=await o.decode(e,s,n),u=new i.Z(a);return u.updateStatistics(),u}function D(e){if(null==e)throw new n.Z("rasterCodec:decode","parameter encodeddata is required.");const t=new Uint8Array(e,0,10);let r="";return 255===t[0]&&216===t[1]?r="jpg":137===t[0]&&80===t[1]&&78===t[2]&&71===t[3]?r="png":67===t[0]&&110===t[1]&&116===t[2]&&90===t[3]&&73===t[4]&&109===t[5]&&97===t[6]&&103===t[7]&&101===t[8]&&32===t[9]?r="lerc":76===t[0]&&101===t[1]&&114===t[2]&&99===t[3]&&50===t[4]&&32===t[5]?r="lerc2":73===t[0]&&73===t[1]&&42===t[2]&&0===t[3]||77===t[0]&&77===t[1]&&0===t[2]&&42===t[3]||73===t[0]&&73===t[1]&&43===t[2]&&0===t[3]||77===t[0]&&77===t[1]&&0===t[2]&&43===t[3]?r="tiff":71===t[0]&&73===t[1]&&70===t[2]?r="gif":66===t[0]&&77===t[1]?r="bmp":String.fromCharCode.apply(null,t).toLowerCase().includes("error")&&(r="error"),r}function E(e){let t=D(e);return"lerc2"===t?t="lerc":"error"===t&&(t=""),t}async function R(e,t={},r){if(null==e)throw new n.Z("rasterCodec:decode","missing encodeddata parameter.");let o=t.format&&t.format.toLowerCase();if(!("bsq"!==o&&"bip"!==o||null!=t.width&&null!=t.height))throw new n.Z("rasterCodec:decode","requires width and height in options parameter.");if("tiff"===o&&t.customOptions)return async function(e,t){const r=await(0,y.Uw)(e,t.customOptions),n=new i.Z({width:r.width,height:r.height,pixels:r.pixels,pixelType:r.pixelType.toLowerCase(),mask:r.mask,statistics:null});return n.updateStatistics(),n}(e,t);if((!o||"bsq"!==o&&"bip"!==o&&"deflate"!==o&&"lzw"!==o)&&(o=D(e)),t.useCanvas&&b.has(o))return P(e,o,t,r);const s=function(e){let t=null;switch(e){case"lerc":case"lerc2":t=v;break;case"jpg":t=I;break;case"png":t=M;break;case"bsq":case"bip":t=(t,r)=>S(t,r,e);break;case"tiff":t=x;break;case"deflate":t=T;break;case"lzw":t=A;break;case"error":t=()=>{throw new n.Z("rasterCodec:decode","input data contains error")};break;default:t=()=>{throw new n.Z("rasterCodec:decode","unsupported raster format")}}return t}(o);t.isPoint&&(null!=(t={...t}).width&&t.width++,null!=t.height&&t.height++);const a=await s(e,t);return a?("jpg"!==o&&null!=t.noDataValue&&1===a.depthCount&&(0,d.A)(a,t.noDataValue,{customFloatTolerance:t.tolerance}),t.isPoint&&function(e,t=1){if(!e)return;const{pixels:r,width:n,height:o,mask:s}=e;if(!r||0===r.length)return;const a=r.length,l=n-1,u=o-1,c=[];let h,f,d,p,g,m,y=null;const w=i.Z.getPixelArrayConstructor(e.pixelType);if(0===t){for(h=0;h<a;h++){for(g=r[h],m=new w(l*u),f=0;f<u;f++)for(p=f*n,d=0;d<l;d++)m[f*l+d]=g[p+d];c.push(m)}if(null!=s)for(y=new Uint8Array(l*u),f=0;f<u;f++)for(p=f*n,d=0;d<l;d++)y[f*l+d]=s[p+d]}else{for(h=0;h<a;h++){for(g=r[h],m=new w(l*u),f=0;f<u;f++)for(p=f*n,d=0;d<l;d++)m[f*l+d]=(g[p+d]+g[p+d+1]+g[p+n+d]+g[p+n+d+1])/4;c.push(m)}if(s)for(y=new Uint8Array(l*u),f=0;f<u;f++)for(p=f*n,d=0;d<l;d++)y[f*l+d]=Math.min.apply(null,[s[p+d],s[p+d+1],s[p+n+d],s[p+n+d+1]])}e.width=l,e.height=u,e.mask=y,e.pixels=c}(a),a):a}},94793:(e,t,r)=>{r.d(t,{Dq:()=>D,FI:()=>E,I7:()=>L,If:()=>R,Jx:()=>z,Uw:()=>V,cK:()=>O,ee:()=>_,vr:()=>N});var n=r(20095),o=r(97575),i=r(72955),s=r(88781),a=r(81578),l=r(9832),u=r(48279),c=r(80899);const h=[0,1,1,2,4,8,1,1,2,4,8,4,8,-1,-1,-1,8,8,8],f=4294967296,d=new Set([1,5,6,7,8,34712,34887]);function p(e,t){let r="unknown";return 3===e?r=64===t?"f64":"f32":1===e?1===t?r="u1":2===t?r="u2":4===t?r="u4":t<=8?r="u8":t<=16?r="u16":t<=32&&(r="u32"):2===e&&(t<=8?r="s8":t<=16?r="s16":t<=32&&(r="s32")),r}function g(e){let t=null;switch(e?e.toLowerCase():"f32"){case"u1":case"u2":case"u4":case"u8":t=Uint8Array;break;case"u16":t=Uint16Array;break;case"u32":t=Uint32Array;break;case"s8":t=Int8Array;break;case"s16":t=Int16Array;break;case"s32":t=Int32Array;break;case"f64":t=Float64Array;break;default:t=Float32Array}return t}function m(e,t){return{x:t[0]*e.x+t[1]*e.y+t[2],y:t[3]*e.x+t[4]*e.y+t[5]}}function y(e,t){return e.get(t)?.values}function w(e,t){return e.get(t)?.values}function C(e,t){return e.get(t)?.values?.[0]}function b(e,t){return e.get(t)?.values?.[0]}function v(e,t,r,n=0,o=l.Z.TIFF_TAGS,i=4){const s=8===i,a=s?B(new DataView(e,r,8),0,t):new DataView(e,r,2).getUint16(0,t),u=4+2*i,c=s?8:2,h=c+a*u;if(r+h>e.byteLength)return{success:!1,ifd:null,nextIFD:null,requiredBufferSize:h};const f=r+h+4<=e.byteLength?G(new DataView(e,r+h,8===i?8:4),0,t,8===i):null,d=r+c,p=new Map;let g,m,y,w,C,b=0,v=0;for(let r=0;r<a;r++){m=new DataView(e,d+u*r,u),y=m.getUint16(0,t),C=m.getUint16(2,t),w=l.Z.getTagName(y,o);const s=[];2===i?(b=m.getUint16(4,t),v=m.getUint16(6,t)):4===i?(b=m.getUint32(4,t),v=m.getUint32(8,t)):8===i&&(b=G(m,4,t,!0),v=G(m,12,t,!0),s.push(m.getUint32(12,t)),s.push(m.getUint32(16,t))),g={id:y,type:C,valueCount:b,valueOffset:v,valueOffsets:s,values:null},D(e,t,g,n,!1,i),p.set(w,g)}return{success:!0,ifd:p,nextIFD:f,requiredBufferSize:h}}const x=(e,t)=>(0,i.Jx)(e,{inputOffset:t}).pixels[0];function k(e,t){if(1!==t&&2!==t&&4!==t)return e;const r=new Uint8Array(e),n=8/t,o=new Uint8Array(e.byteLength*n);let i=0;const s=2**t-1;for(let e=0;e<r.length;e++){const a=r[e];for(let e=0;e<n;e++)o[i++]=a<<t*e>>>8-t&s}return o.buffer}function T(e,t,r){const n=new o.J;n.parse(e),n.colorTransform=6===r?-1:0;const i=n.getData(n.width,n.height,1!==t);return new Uint8Array(i.buffer)}function A(e){const t=new c.Z(e).getBytes(),r=new ArrayBuffer(t.length),n=new Uint8Array(r);return n.set(t),n}async function S(e,t,r,n,o){const a=u.f===t,l=b(r,"BITSPERSAMPLE"),c=b(r,"SAMPLESPERPIXEL"),h=b(r,"PHOTOMETRICINTERPRETATION"),f=p(b(r,"SAMPLEFORMAT")??1,l),d=b(r,"COMPRESSION")??1,m=g(f);let y,w,C;if(34887===d)return await(0,i.zD)(),x(e,n);if(1===d)y=e.slice(n,n+o),w=new Uint8Array(y);else if(8===d||32946===d)w=new Uint8Array(e,n,o),w=A(w),y=w.buffer;else if(6===d)w=new Uint8Array(e,n,o),w=T(w,c,h),y=w.buffer;else if(7===d){const t=r.get("JPEGTABLES").values,i=t.length-2;w=new Uint8Array(i+o-2);for(let e=0;e<i;e++)w[e]=t[e];const s=new Uint8Array(e,n+2,o-2);for(let e=0;e<s.length;e++)w[i+e]=s[e];w=T(w,c,h),y=w.buffer}else{if(5!==d)throw new Error("tiff-decode: unsupport compression "+d);w=(0,s.J)(e,n,o,t),y=w.buffer}if(y=k(y,l),"u8"===f||"s8"===f||a)C=new m(y);else{y=new ArrayBuffer(w.length);const e=new Uint8Array(y);switch(f){case"u16":case"s16":for(let t=0;t<w.length;t+=2)e[t]=w[t+1],e[t+1]=w[t];break;case"u32":case"s32":case"f32":for(let t=0;t<w.length;t+=4)e[t]=w[t+3],e[t+1]=w[t+2],e[t+2]=w[t+1],e[t+3]=w[t]}C=new m(y)}return C}const I=(e,t,r)=>{const n=u.f===t.littleEndian,o=w(r,"STRIPOFFSETS");if(void 0===o)return null;const{width:i,height:a,pixelType:l}=E([r]),c=b(r,"SAMPLESPERPIXEL")||t.planes,h=b(r,"PHOTOMETRICINTERPRETATION"),f=i*a,d=b(r,"BITSPERSAMPLE"),p=g(l),m=new p(f*c),y=w(r,"STRIPBYTECOUNTS"),C=b(r,"ROWSPERSTRIP"),v=b(r,"COMPRESSION")??1;let x,S,I,M,P,D,R,_,L,B=C;if(d%8==0)for(x=0;x<o.length;x++){if(P=x*(C*i)*c,B=(x+1)*C>a?a-x*C:C,"u8"===l||"s8"===l||n)8===v||32946===v?(R=new Uint8Array(e,o[x],y[x]),R=A(R),D=R.buffer):6===v?(R=new Uint8Array(e,o[x],y[x]),R=T(R,c,h),D=R.buffer):5===v?(R=(0,s.J)(e,o[x],y[x],t.littleEndian),D=R.buffer):(y[x]!==B*i*c*d/8&&console.log("strip byte counts is different than expected"),D=e.slice(o[x],o[x]+y[x])),D=k(D,d),M=new p(D);else{switch(6===v||8===v||32946===v?(R=new Uint8Array(e,o[x],y[x]),_=A(R),D=_.buffer):(y[x]!==B*i*c*d/8&&console.log("strip byte counts is different than expected"),D=new ArrayBuffer(y[x]),R=new Uint8Array(e,o[x],y[x]),_=new Uint8Array(D)),l){case"u16":case"s16":for(I=0;I<R.length;I+=2)_[I]=R[I+1],_[I+1]=R[I];break;case"u32":case"s32":case"f32":for(I=0;I<R.length;I+=4)_[I]=R[I+3],_[I+1]=R[I+2],_[I+2]=R[I+1],_[I+3]=R[I]}D=k(D,d),M=new p(D)}m.set(M,P)}const U=[];if(1===c)U.push(m);else for(x=0;x<c;x++){for(L=new p(f),S=0;S<f;S++)L[S]=m[S*c+x];U.push(L)}return{width:i,height:a,pixelType:l,pixels:U}},M=(e,t,r)=>{if(!(e&&e.length>0&&t&&r))return null;let n,o,i;const s=e[0].length,a=e.length,l=new Uint8Array(s);for(let u=0;u<a;u++)if(n=e[u],o=t[u],i=r[u],0===u)for(let e=0;e<s;e++)l[e]=n[e]<o||n[e]>i?0:1;else for(let e=0;e<s;e++)l[e]&&(l[e]=n[e]<o||n[e]>i?0:1);return l},P=e=>{if(!e)return null;const t=e.match(/<Item(.*?)Item>/gi);if(!t||0===t.length)return null;const r=new Map;let n,o,i,s,a;for(let e=0;e<t.length;e++)n=t[e],o=n.slice("<Item ".length,n.indexOf(">")),s=n.indexOf("sample="),s>-1&&(a=n.slice(s+'sample="'.length,n.indexOf('"',s+'sample="'.length))),s=n.indexOf("name="),s>-1&&(o=n.slice(s+'name="'.length,n.indexOf('"',s+'name="'.length))),o&&(i=n.slice(n.indexOf(">")+1,n.indexOf("</Item>")).trim(),null!=a?r.has(o)?r.get(o)[a]=i:r.set(o,[i]):r.set(o,i)),a=null;const l=r.get("STATISTICS_MINIMUM"),u=r.get("STATISTICS_MAXIMUM"),c=r.get("STATISTICS_MEAN"),h=r.get("STATISTICS_STDDEV");let f=null;if(l&&u){f=[];for(let e=0;e<l.length;e++)f.push({min:parseFloat(l[e]),max:parseFloat(u[e]),avg:c&&parseFloat(c[e]),stddev:h&&parseFloat(h[e])})}const d=r.get("BandName"),p=r.get("WavelengthMin"),g=r.get("WavelengthMax");let m=null;if(d){m=[];for(let e=0;e<d.length;e++)m.push({BandName:d[e],WavelengthMin:p&&parseFloat(p[e]),WavelengthMax:g&&parseFloat(g[e])})}return{statistics:f,bandProperties:m,dataType:r.get("DataType"),rawMetadata:r}};function D(e,t,r,n=0,o=!1,i=4){if(r.values)return!0;const s=r.type,a=r.valueCount;let l=r.valueOffset,u=[];const c=h[s],d=8*c,p=a*c,g=a*h[s]*8;let m,y;const w=8===i?64:32,C=r.valueOffsets;if(g>w&&p>(o?e.byteLength:e?e.byteLength-l+n:0))return r.offlineOffsetSize=[l,p],r.values=null,!1;if(g<=w){if(!t)if(w<=32)l>>>=32-g;else{const e=C?.length?C[0]:l>>>0,t=C?.length?C[1]:Math.round((l-e)/f);g<=32?(l=e>>>32-g,C[0]=l):(l=e*2**(32-g)+(t>>>32-g),C[0]=e,C[1]=t>>>32-g)}if(1===a&&d===w)u=[l];else if(64===w){const e=C?.length?C[0]:l>>>0,t=C?.length?C[1]:Math.round((l-e)/f);let r=e,n=32;for(y=1;y<=a;y++){const e=32-d*y%32;if(n<d){const o=r<<e>>>32-n,i=t<<32-n>>>32-n;r=t,u.push(o+i*2**(d-n)),n-=32-(d-n)}else u.push(r<<e>>>32-d),n-=d;0===n&&(n=32,r=t)}}else for(y=1;y<=a;y++){const e=32-d*y;u.push(l<<e>>>32-d)}}else{l-=n,o&&(l=0);for(let r=l;r<l+p;r+=c){switch(s){case 1:case 2:case 7:m=new DataView(e,r,1).getUint8(0);break;case 3:m=new DataView(e,r,2).getUint16(0,t);break;case 4:case 13:m=new DataView(e,r,4).getUint32(0,t);break;case 5:m=new DataView(e,r,4).getUint32(0,t)/new DataView(e,r+4,4).getUint32(0,t);break;case 6:m=new DataView(e,r,1).getInt8(0);break;case 8:m=new DataView(e,r,2).getInt16(0,t);break;case 9:m=new DataView(e,r,4).getInt32(0,t);break;case 10:m=new DataView(e,r,4).getInt32(0,t)/new DataView(e,r+4,4).getInt32(0,t);break;case 11:m=new DataView(e,r,4).getFloat32(0,t);break;case 12:m=new DataView(e,r,8).getFloat64(0,t);break;case 16:case 18:m=B(new DataView(e,r,8),0,t);break;case 17:m=U(new DataView(e,r,8),0,t);break;default:m=null}u.push(m)}}if(2===s){let e="";const t=u;for(u=[],y=0;y<t.length;y++)0===t[y]&&""!==e?(u.push(e),e=""):e+=String.fromCharCode(t[y]);""===e&&0!==u.length||u.push(e)}return r.values=u,!0}function E(e){const t=e[0],r=b(t,"TILEWIDTH"),n=b(t,"TILELENGTH"),o=b(t,"IMAGEWIDTH"),i=b(t,"IMAGELENGTH"),s=b(t,"BITSPERSAMPLE"),a=b(t,"SAMPLESPERPIXEL"),l=b(t,"SAMPLEFORMAT")??1,u=p(l,s),c=R(t),h=y(t,"GDAL_NODATA");let f=null;h?.length&&(f=h.map((e=>parseFloat(e))),f.some((e=>isNaN(e)))&&(f=null));const g=b(t,"COMPRESSION")??1;let v;switch(g){case 1:v="NONE";break;case 2:case 3:case 4:case 32771:v="CCITT";break;case 5:v="LZW";break;case 6:case 7:v="JPEG";break;case 32773:v="PACKBITS";break;case 8:case 32946:v="DEFLATE";break;case 34712:v="JPEG2000";break;case 34887:v="LERC";break;default:v=String(g)}let x=!0,k="";d.has(g)||(x=!1,k+="unsupported tag compression "+g),l>3&&(x=!1,k+="unsupported tag sampleFormat "+l),1!==s&&2!==s&&4!==s&&s%8!=0&&(x=!1,k+="unsupported tag bitsPerSample "+s);const T=C(t,"GEOASCIIPARAMS");let A;if(T){const e=T.split("|").find((e=>e.includes("ESRI PE String = "))),t=e?e.replace("ESRI PE String = ",""):"";A=t.startsWith("COMPD_CS")||t.startsWith("PROJCS")||t.startsWith("GEOGCS")?{wkid:null,wkt:t}:null}const S=w(t,"GEOTIEPOINTS"),I=w(t,"GEOPIXELSCALE"),M=w(t,"GEOTRANSMATRIX"),D=t.has("GEOKEYDIRECTORY")?t.get("GEOKEYDIRECTORY").data:null;let E,B,U=!1,G=!1;if(D){U=2===b(D,"GTRasterTypeGeoKey");const e=b(D,"GTModelTypeGeoKey");if(2===e){const e=b(D,"GeographicTypeGeoKey");e>=1024&&e<=32766&&(A={wkid:e}),A||32767!==e||(G=!0,A={wkid:4326})}else if(1===e){const e=b(D,"ProjectedCSTypeGeoKey");e>=1024&&e<=32766&&(A={wkid:e})}}if(I&&S&&S.length>=6?(E=[I[0],0,S[3]-S[0]*I[0],0,-Math.abs(I[1]),S[4]-S[1]*I[1]],U&&(E[2]-=.5*E[0]+.5*E[1],E[5]-=.5*E[3]+.5*E[4])):M&&16===M.length&&(E=U?[M[0],M[1],M[3]-.5*M[0],M[4],M[5],M[7]-.5*M[5]]:[M[0],M[1],M[3],M[4],M[5],M[7]]),E){const e=[{x:0,y:i},{x:0,y:0},{x:o,y:i},{x:o,y:0}];let t,r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY;for(let o=0;o<e.length;o++)t=m(e[o],E),r=t.x>r?r:t.x,s=t.x<s?s:t.x,n=t.y>n?n:t.y,a=t.y<a?a:t.y;B={xmin:r,xmax:s,ymin:n,ymax:a,spatialReference:A}}else B={xmin:-.5,ymin:.5-i,xmax:o-.5,ymax:.5,spatialReference:A};G&&(B.xmax-B.xmin>400||Math.max(Math.abs(B.xmin),Math.abs(B.xmax))>361)&&(A=null,B.spatialReference=null);const O=_(e);let N,V,z,j,Z;if(O.length>0){z=Math.round(Math.log(o/b(O[0],"IMAGEWIDTH"))/Math.LN2);const e=O[O.length-1];j=Math.round(Math.log(o/b(e,"IMAGEWIDTH"))/Math.LN2),N=b(e,"TILEWIDTH"),V=b(e,"TILELENGTH")}N=null!=j&&j>0?N||r:null,V=null!=j&&j>0?V||n:null,r&&(Z=[{maxCol:Math.ceil(o/r)-1,maxRow:Math.ceil(i/n)-1,minRow:0,minCol:0}],O.forEach((e=>{Z.push({maxCol:Math.ceil(b(e,"IMAGEWIDTH")/b(e,"TILEWIDTH"))-1,maxRow:Math.ceil(b(e,"IMAGELENGTH")/b(e,"TILELENGTH"))-1,minRow:0,minCol:0})})));const W=C(e[0],"GDAL_METADATA"),J=P(W);return k+=" "+F({width:o,height:i,tileWidth:r,tileHeight:n,planes:a,ifds:e}),{width:o,height:i,tileWidth:r,tileHeight:n,planes:a,isBSQ:c,pixelType:u,compression:v,noData:f,hasMaskBand:L(e).length===O.length+1,isSupported:x,message:k,extent:B,isPseudoGeographic:G,affine:I?null:E,firstPyramidLevel:z,maximumPyramidLevel:j,pyramidBlockWidth:N,pyramidBlockHeight:V,tileBoundary:Z,metadata:J}}function R(e,t){const r=y(e,"PLANARCONFIGURATION");return r?2===r[0]:!!t&&t.isBSQ}function _(e){return e.filter((e=>1===b(e,"NEWSUBFILETYPE")))}function L(e){return e.filter((e=>{const t=4==(4&(b(e,"NEWSUBFILETYPE")??0)),r=4===b(e,"PHOTOMETRICINTERPRETATION");return t&&r}))}function B(e,t,r){const n=e.getUint32(t,r),o=e.getUint32(t+4,r);return r?o*f+n:n*f+o}function U(e,t,r){let n=r?e.getInt32(t,r):e.getUint32(t,r),o=r?e.getUint32(t+4,r):e.getInt32(t+4,r);const i=(r?n:o)>=0?1:-1;return r?n*=i:o*=i,i*(r?o*f+n:n*f+o)}function G(e,t,r,n){return n?B(e,t,r):e.getUint32(t,r)}function O(e){const t=new DataView(e,0,16),r=t.getUint16(0,!1);let n=null;if(18761===r)n=!0;else{if(19789!==r)throw new Error("unexpected endianess byte");n=!1}const o=t.getUint16(2,n);if(42!==o&&43!==o)throw new Error("unexpected tiff identifier");let i=4;const s=43===o;if(s){const e=t.getUint16(i,n);if(i+=2,8!==e)throw new Error("unsupported bigtiff version");if(0!==t.getUint16(i,n))throw new Error("unsupported bigtiff version");i+=2}return{littleEndian:n,isBigTiff:s,firstIFDPos:G(t,i,n,s)}}function N(e,t,r,o=0,i=l.Z.TIFF_TAGS,s=4){const a=v(e,t,r,o,i,s);let u;const c=a.ifd;if(c){if(l.Z.ifdTags.forEach(((r,n)=>{c.has(n)&&(u=c.get(n),u.data=v(e,t,u.valueOffset-o,o,r).ifd)})),c.has("GEOKEYDIRECTORY")){u=c.get("GEOKEYDIRECTORY");const r=u.values;if(r&&r.length>4){const n=r[0]+"."+r[1]+"."+r[2];u.data=v(e,t,u.valueOffset+6-o,o,l.Z.GEO_KEYS,2).ifd,u.data&&u.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[n]})}}if(c.has("XMP")){u=c.get("XMP");const e=u.values;"number"==typeof e[0]&&7===u.type&&(u.values=[(0,n.f)(new Uint8Array(e))])}}return a}function F(e){const{width:t,height:r,tileHeight:n,tileWidth:o}=e,i=e.planes,s=o?o*n:t*r,a=b(e.ifds[0],"BITSPERSAMPLE");let l="";return s*i>2**30/(a>8?a/8:1)&&(l=o?"tiled tiff exceeding 1 gigabits per tile is not supported":"scanline tiff exceeding 1 gigabits is not supported"),l}async function V(e,t){const{headerInfo:r,ifd:n,offsets:o,sizes:i}=t,s=[];for(let t=0;t<o.length;t++){const a=await S(e,r.littleEndian,n,o[t],i[t]||e.byteLength);s.push(a)}const l=R(n,r),u=b(n,"BITSPERSAMPLE"),c=p(b(n,"SAMPLEFORMAT")??1,u),h=b(n,"SAMPLESPERPIXEL")||r.planes,f=g(c),d=b(n,"TILEWIDTH"),m=b(n,"TILELENGTH"),y=b(n,"COMPRESSION")??1,w=d*m;let C;const v=[];let x=s[0];const k=34887===y;for(let e=0;e<h;e++){if(C=new f(w),l&&k){if(x=s[e],x.length)for(let t=0;t<w;t++)C[t]=x[t+e]}else if(x.length)if(l||k&&!l)C=x.slice(w*e,w*(e+1));else for(let t=0;t<w;t++)C[t]=x[t*h+e];v.push(C)}const T=r.noData?r.noData[0]:t.noDataValue,A=r.metadata?r.metadata.statistics:null,I=A?A.map((e=>e.min)):null,P=A?A.map((e=>e.max)):null,D={pixelType:c,width:d,height:m,pixels:v,noDataValue:T};return null!=T?(0,a.A)(D,T):I&&P&&t.applyMinMaxConstraint&&(D.mask=M(v,I,P)),D}async function z(e,t={}){const r=t.pyramidLevel||0,n=t.headerInfo||function(e){const{littleEndian:t,isBigTiff:r,firstIFDPos:n}=O(e);let o=n;const i=[];do{const n=N(e,t,o,0,l.Z.TIFF_TAGS,r?8:4);if(!n.success)break;i.push(n.ifd),o=n.nextIFD}while(o>0);return{...E(i),littleEndian:t,isBigTiff:r,ifds:i,pyramidIFDs:_(i),maskIFDs:L(i)}}(e),{ifds:o,noData:i}=n;if(0===o.length)throw new Error("no valid image file directory");const s=F(n);if(s)throw s;let u=null;const c=-1===r?o[o.length-1]:o[r],h=i??t.noDataValue;return u=n.tileWidth?await async function(e,t,r){const n=w(r,"TILEOFFSETS");if(void 0===n)return null;const o=w(r,"TILEBYTECOUNTS"),{width:i,height:s,pixelType:a,tileWidth:l,tileHeight:u}=E([r]),c=R(r,t),h=b(r,"SAMPLESPERPIXEL")||t.planes,f=i*s,d=b(r,"BITSPERSAMPLE"),p=34887===(b(r,"COMPRESSION")??1),m=g(a),y=[];for(let e=0;e<h;e++)y.push(new m(f));let C,v,x,k,T,A,I,M,P,D,_,L,B;const U=Math.ceil(i/l);if(d%8==0)if(p&&c&&h>1){const a=Math.round(n.length/h);for(C=0;C<a;C++){A=Math.floor(C/U)*u,I=C%U*l,M=A*i+I;for(let a=0;a<h;a++){const c=C*h+a;if(0!==o[c])for(x=await S(e,t.littleEndian,r,n[c],o[c]),D=0,P=M,L=Math.min(l,i-I),_=Math.min(u,s-A),B=y[a],k=0;k<_;k++)for(P=M+k*i,D=k*l,T=0;T<L;T++,P++,D++)B[P]=x[D]}}}else for(C=0;C<n.length;C++)if(0!==o[C])for(A=Math.floor(C/U)*u,I=C%U*l,M=A*i+I,x=await S(e,t.littleEndian,r,n[C],o[C]),D=0,P=M,L=Math.min(l,i-I),_=Math.min(u,s-A),v=0;v<h;v++)if(B=y[v],c||p)for(k=0;k<_;k++)for(P=M+k*i,D=l*u*v+k*l,T=0;T<L;T++,P++,D++)B[P]=x[D];else for(k=0;k<_;k++)for(P=M+k*i,D=k*l*h+v,T=0;T<L;T++,P++,D+=h)B[P]=x[D];return{width:i,height:s,pixelType:a,pixels:y}}(e,n,c):await I(e,n,c),u?(null!=h&&(0,a.A)(u,h),u):u}},9832:(e,t,r)=>{r.d(t,{Z:()=>a});const n=(()=>{const e=[];return e[254]="NEWSUBFILETYPE",e[255]="SUBFILETYPE",e[256]="IMAGEWIDTH",e[257]="IMAGELENGTH",e[258]="BITSPERSAMPLE",e[259]="COMPRESSION",e[262]="PHOTOMETRICINTERPRETATION",e[263]="THRESHHOLDING",e[264]="CELLWIDTH",e[265]="CELLLENGTH",e[266]="FILLORDER",e[269]="DOCUMENTNAME",e[270]="IMAGEDESCRIPTION",e[271]="MAKE",e[272]="MODEL",e[273]="STRIPOFFSETS",e[274]="ORIENTATION",e[277]="SAMPLESPERPIXEL",e[278]="ROWSPERSTRIP",e[279]="STRIPBYTECOUNTS",e[280]="MINSAMPLEVALUE",e[281]="MAXSAMPLEVALUE",e[282]="XRESOLUTION",e[283]="YRESOLUTION",e[284]="PLANARCONFIGURATION",e[285]="PAGENAME",e[286]="XPOSITION",e[287]="YPOSITION",e[288]="FREEOFFSETS",e[289]="FREEBYTECOUNTS",e[290]="GRAYRESPONSEUNIT",e[291]="GRAYRESPONSECURVE",e[292]="T4OPTIONS",e[293]="T6OPTIONS",e[296]="RESOLUTIONUNIT",e[297]="PAGENUMBER",e[300]="COLORRESPONSEUNIT",e[301]="TRANSFERFUNCTION",e[305]="SOFTWARE",e[306]="DATETIME",e[315]="ARTIST",e[316]="HOSTCOMPUTER",e[317]="PREDICTOR",e[318]="WHITEPOINT",e[319]="PRIMARYCHROMATICITIES",e[320]="COLORMAP",e[321]="HALFTONEHINTS",e[322]="TILEWIDTH",e[323]="TILELENGTH",e[324]="TILEOFFSETS",e[325]="TILEBYTECOUNTS",e[326]="BADFAXLINES",e[327]="CLEANFAXDATA",e[328]="CONSECUTIVEBADFAXLINES",e[330]="SUBIFD",e[332]="INKSET",e[333]="INKNAMES",e[334]="NUMBEROFINKS",e[336]="DOTRANGE",e[337]="TARGETPRINTER",e[338]="EXTRASAMPLES",e[339]="SAMPLEFORMAT",e[340]="SMINSAMPLEVALUE",e[341]="SMAXSAMPLEVALUE",e[342]="TRANSFERRANGE",e[347]="JPEGTABLES",e[512]="JPEGPROC",e[513]="JPEGIFOFFSET",e[514]="JPEGIFBYTECOUNT",e[515]="JPEGRESTARTINTERVAL",e[517]="JPEGLOSSLESSPREDICTORS",e[518]="JPEGPOINTTRANSFORM",e[519]="JPEGQTABLES",e[520]="JPEGDCTABLES",e[521]="JPEGACTABLES",e[529]="YCBCRCOEFFICIENTS",e[530]="YCBCRSUBSAMPLING",e[531]="YCBCRPOSITIONING",e[532]="REFERENCEBLACKWHITE",e[700]="XMP",e[33550]="GEOPIXELSCALE",e[33922]="GEOTIEPOINTS",e[33432]="COPYRIGHT",e[42112]="GDAL_METADATA",e[42113]="GDAL_NODATA",e[50844]="RPCCOEFFICIENT",e[34264]="GEOTRANSMATRIX",e[34735]="GEOKEYDIRECTORY",e[34736]="GEODOUBLEPARAMS",e[34737]="GEOASCIIPARAMS",e[34665]="EXIFIFD",e[34853]="GPSIFD",e[40965]="INTEROPERABILITYIFD",e})(),o=(()=>{const e=n.slice();return e[36864]="ExifVersion",e[40960]="FlashpixVersion",e[40961]="ColorSpace",e[42240]="Gamma",e[37121]="ComponentsConfiguration",e[37122]="CompressedBitsPerPixel",e[40962]="PixelXDimension",e[40963]="PixelYDimension",e[37500]="MakerNote",e[37510]="UserComment",e[40964]="RelatedSoundFile",e[36867]="DateTimeOriginal",e[36868]="DateTimeDigitized",e[36880]="OffsetTime",e[36881]="OffsetTimeOriginal",e[36882]="OffsetTimeDigitized",e[37520]="SubSecTime",e[37521]="SubSecTimeOriginal",e[37522]="SubSecTimeDigitized",e[37888]="Temperature",e[37889]="Humidity",e[37890]="Pressure",e[37891]="WaterDepth",e[37892]="Acceleration",e[37893]="CameraElevationAngle",e[42016]="ImageUniqueID",e[42032]="CameraOwnerName",e[42033]="BodySerialNumber",e[42034]="LensSpecification",e[42035]="LensMake",e[42036]="LensModel",e[42037]="LensSerialNumber",e[33434]="ExposureTime",e[33437]="FNumber",e[34850]="ExposureProgram",e[34852]="SpectralSensitivity",e[34855]="PhotographicSensitivity",e[34856]="OECF",e[34864]="SensitivityType",e[34865]="StandardOutputSensitivity",e[34866]="RecommendedExposureIndex",e[34867]="ISOSpeed",e[34868]="ISOSpeedLatitudeyyy",e[34869]="ISOSpeedLatitudezzz",e[37377]="ShutterSpeedValue",e[37378]="ApertureValue",e[37379]="BrightnessValue",e[37380]="ExposureBiasValue",e[37381]="MaxApertureValue",e[37382]="SubjectDistance",e[37383]="MeteringMode",e[37384]="LightSource",e[37385]="Flash",e[37386]="FocalLength",e[37396]="SubjectArea",e[41483]="FlashEnergy",e[41484]="SpatialFrequencyResponse",e[41486]="FocalPlaneXResolution",e[41487]="FocalPlaneYResolution",e[41488]="FocalPlaneResolutionUnit",e[41492]="SubjectLocation",e[41493]="ExposureIndex",e[41495]="SensingMethod",e[41728]="FileSource",e[41729]="SceneType",e[41730]="CFAPattern",e[41985]="CustomRendered",e[41986]="ExposureMode",e[41987]="WhiteBalance",e[41988]="DigitalZoomRatio",e[41989]="FocalLengthIn35mmFilm",e[41990]="SceneCaptureType",e[41991]="GainControl",e[41992]="Contrast",e[41993]="Saturation",e[41994]="Sharpness",e[41995]="DeviceSettingDescription",e[41996]="SubjectDistanceRange",e})(),i=(()=>{const e=[];return e[1024]="GTModelTypeGeoKey",e[1025]="GTRasterTypeGeoKey",e[1026]="GTCitationGeoKey",e[2048]="GeographicTypeGeoKey",e[2049]="GeogCitationGeoKey",e[2050]="GeogGeodeticDatumGeoKey",e[2051]="GeogPrimeMeridianGeoKey",e[2052]="GeogLinearUnitsGeoKey",e[2053]="GeogLinearUnitSizeGeoKey",e[2054]="GeogAngularUnitsGeoKey",e[2055]="GeogAngularUnitSizeGeoKey",e[2056]="GeogEllipsoidGeoKey",e[2057]="GeogSemiMajorAxisGeoKey",e[2058]="GeogSemiMinorAxisGeoKey",e[2059]="GeogInvFlatteningGeoKey",e[2061]="GeogPrimeMeridianLongGeoKey",e[2060]="GeogAzimuthUnitsGeoKey",e[3072]="ProjectedCSTypeGeoKey",e[3073]="PCSCitationGeoKey",e[3074]="ProjectionGeoKey",e[3075]="ProjCoordTransGeoKey",e[3076]="ProjLinearUnitsGeoKey",e[3077]="ProjLinearUnitSizeGeoKey",e[3078]="ProjStdParallel1GeoKey",e[3079]="ProjStdParallel2GeoKey",e[3080]="ProjNatOriginLongGeoKey",e[3081]="ProjNatOriginLatGeoKey",e[3082]="ProjFalseEastingGeoKey",e[3083]="ProjFalseNorthingGeoKey",e[3084]="ProjFalseOriginLongGeoKey",e[3085]="ProjFalseOriginLatGeoKey",e[3086]="ProjFalseOriginEastingGeoKey",e[3087]="ProjFalseOriginNorthingGeoKey",e[3088]="ProjCenterLongGeoKey",e[3090]="ProjCenterEastingGeoKey",e[3091]="ProjCenterNorthingGeoKey",e[3092]="ProjScaleAtNatOriginGeoKey",e[3093]="ProjScaleAtCenterGeoKey",e[3094]="ProjAzimuthAngleGeoKey",e[3095]="ProjStraightVertPoleLongGeoKey",e[4096]="VerticalCSTypeGeoKey",e[4097]="VerticalCitationGeoKey",e[4098]="VerticalDatumGeoKey",e[4099]="VerticalUnitsGeoKey",e})(),s=new Map;s.set("EXIFIFD",o),s.set("GPSIFD",["GPSVersionID","GPSLatitudeRef","GPSLatitude","GPSLongitudeRef","GPSLongitude","GPSAltitudeRef","GPSAltitude","GPSTimeStamp","GPSSatellites","GPSStatus","GPSMeasureMode","GPSDOP","GPSSpeedRef","GPSSpeed","GPSTrackRef","GPSTrack","GPSImgDirectionRef","GPSImgDirection","GPSMapDatum","GPSDestLatitudeRef","GPSDestLatitude","GPSDestLongitudeRef","GPSDestLongitude","GPSDestBearingRef","GPSDestBearing","GPSDestDistanceRef","GPSDestDistance","GPSProcessingMethod","GPSAreaInformation","GPSDateStamp","GPSDifferential","GPSHPositioningError"]);const a={TIFF_TAGS:n,ifdTags:s,GEO_KEYS:i,getTagName:(e,t)=>{let r=(t||n)[e];return void 0===r&&(r="unknown"+String(e)),r}}},81578:(e,t,r)=>{r.d(t,{A:()=>a,r:()=>s});const n=9999999e31,o=2e-7,i={u1:[0,1],u2:[0,3],u4:[0,15],u8:[0,255],s8:[-128,127],u16:[0,65535],s16:[-32768,32767],u32:[0,4294967295],s32:[-2147483648,2147483647],f32:[-34028234663852886e22,34028234663852886e22],f64:[-Number.MAX_VALUE,Number.MAX_VALUE],unknown:void 0,c64:void 0,c128:void 0};function s(e){return i[e]??[-34028234663852886e22,34028234663852886e22]}function a(e,t,r){if(e.depthCount&&e.depthCount>1)return;const{pixels:i,statistics:a,pixelType:l}=e,u=i[0].length,c=e.bandMasks??[],h=e.mask??new Uint8Array(u).fill(255),f="f32"===l||"f64"===l,d=s(l);let p=!1;for(let e=0;e<i.length;e++){const s="number"==typeof t?t:t[e];if(null==s)continue;const g=a?.[e].minValue??d[0],m=a?.[e].maxValue??d[1];if(g>s+Number.EPSILON||m<s-Number.EPSILON)continue;const y=c[e]||new Uint8Array(u).fill(255),w=i[e],C=r?.customFloatTolerance;if(f&&0!==C){let e=C;e||(e=Math.abs(s)>=n?o*Math.abs(s):"f32"===l?2**-23:Number.EPSILON);for(let t=0;t<w.length;t++)y[t]&&Math.abs(w[t]-s)<e&&(w[t]=0,y[t]=0,h[t]=0,p=!0)}else for(let e=0;e<w.length;e++)y[e]&&w[e]===s&&(w[e]=0,y[e]=0,h[e]=0,p=!0);c[e]=y}p&&(e.bandMasks=c,e.mask=h),p&&"updateStatistics"in e&&e.updateStatistics()}},48279:(e,t,r)=>{r.d(t,{f:()=>n});const n=(()=>{const e=new ArrayBuffer(4),t=new Uint8Array(e);return new Uint32Array(e)[0]=1,1===t[0]})()},55914:(e,t,r)=>{r.d(t,{CD:()=>o,DX:()=>n,Gd:()=>c,Pz:()=>h,Qh:()=>L,SJ:()=>f,Uk:()=>B,Vl:()=>R,XV:()=>d,a2:()=>m,hd:()=>l,nA:()=>x,nk:()=>u,oB:()=>v,pW:()=>A,sS:()=>b,us:()=>T,wV:()=>p,zp:()=>g});var n,o,i,s=r(5847),a=r(81578);(i=n||(n={}))[i.matchAny=0]="matchAny",i[i.matchAll=1]="matchAll",function(e){e[e.bestMatch=0]="bestMatch",e[e.fail=1]="fail"}(o||(o={}));const l=6;function u(e){return null!=e&&"esri.layers.support.PixelBlock"===e.declaredClass&&e.pixels&&e.pixels.length>0}function c(e){if(!e?.length||e.some((e=>!u(e))))return null;if(1===e.length)return e[0]?.clone()??null;const t=e,{width:r,height:n,pixelType:o}=t[0];if(t.some((e=>e.width!==r||e.height!==n)))return null;const i=t.map((({mask:e})=>e)).filter((e=>null!=e));let a=null;i.length&&(a=new Uint8Array(r*n),a.set(i[0]),i.length>1&&C(i.slice(1),a));const l=[];t.forEach((({pixels:e})=>l.push(...e)));const c=t.map((({statistics:e})=>e)).filter((e=>e?.length)),h=[];return c.forEach((e=>h.push(...e))),new s.Z({pixelType:o,width:r,height:n,mask:a,pixels:l,statistics:h.length?h:null})}function h(e){if(!e)return;const t=e.colormap;if(!t||0===t.length)return;const r=t.sort(((e,t)=>e[0]-t[0]));let n=0;r[0][0]<0&&(n=r[0][0]);const o=Math.max(256,r[r.length-1][0]-n+1),i=new Uint8Array(4*o),s=[];let a,l=0,u=0;const c=5===r[0].length;if(o>65536)return r.forEach((e=>{s[e[0]-n]=c?e.slice(1):e.slice(1).concat([255])})),{indexed2DColormap:s,offset:n,alphaSpecified:c};if(e.fillUnspecified)for(a=r[u],l=a[0]-n;l<o;l++)i[4*l]=a[1],i[4*l+1]=a[2],i[4*l+2]=a[3],i[4*l+3]=c?a[4]:255,l===a[0]-n&&(a=u===r.length-1?a:r[++u]);else for(l=0;l<r.length;l++)a=r[l],u=4*(a[0]-n),i[u]=a[1],i[u+1]=a[2],i[u+2]=a[3],i[u+3]=c?a[4]:255;return{indexedColormap:i,offset:n,alphaSpecified:c}}function f(e,t){if(!u(e))return e;if(!t||!t.indexedColormap&&!t.indexed2DColormap)return e;const r=e.clone(),n=r.pixels;let o=r.mask;const i=r.width*r.height;if(1!==n.length)return e;const{indexedColormap:s,indexed2DColormap:a,offset:l,alphaSpecified:c}=t;let h=0;const f=n[0],d=new Uint8Array(f.length),p=new Uint8Array(f.length),g=new Uint8Array(f.length);let m,y=0;if(s){const e=s.length-1;if(null!=o)for(h=0;h<i;h++)o[h]&&(y=4*(f[h]-l),y<l||y>e?o[h]=0:(d[h]=s[y],p[h]=s[y+1],g[h]=s[y+2],o[h]=s[y+3]));else{for(o=new Uint8Array(i),h=0;h<i;h++)y=4*(f[h]-l),y<l||y>e?o[h]=0:(d[h]=s[y],p[h]=s[y+1],g[h]=s[y+2],o[h]=s[y+3]);r.mask=o}}else if(a)if(null!=o)for(h=0;h<i;h++)o[h]&&(m=a[f[h]],d[h]=m[0],p[h]=m[1],g[h]=m[2],o[h]=m[3]);else{for(o=new Uint8Array(i),h=0;h<i;h++)m=a[f[h]],d[h]=m[0],p[h]=m[1],g[h]=m[2],o[h]=m[3];r.mask=o}return r.pixels=[d,p,g],r.statistics=null,r.pixelType="u8",r.maskIsAlpha=c,r}function d(e,t){if(!u(e))return null;const{pixels:r,mask:n}=e,o=r.length;let i=t.lut;const{offset:a}=t;i&&1===i[0].length&&(i=r.map((()=>i)));const l=[],c=t.outputPixelType||"u8";for(let e=0;e<o;e++){const t=p(r[e],n,i[e],a||0,c);l.push(t)}const h=new s.Z({width:e.width,height:e.height,pixels:l,mask:n,pixelType:c});return h.updateStatistics(),h}function p(e,t,r,n,o){const i=e.length,a=s.Z.createEmptyBand(o,i);if(t)for(let o=0;o<i;o++)t[o]&&(a[o]=r[e[o]-n]);else for(let t=0;t<i;t++)a[t]=r[e[t]-n];return a}function g(e,t){if(!u(e))return null;const r=e.clone(),{pixels:n}=r,o=r.width*r.height,i=t.length,s=Math.floor(i/2),a=t[Math.floor(s)],l=n[0];let c,h,f,d,p,g,m=!1;const y=new Uint8Array(o),w=new Uint8Array(o),C=new Uint8Array(o);let b=r.mask;const v=4===t[0].mappedColor.length;for(b||(b=new Uint8Array(o),b.fill(v?255:1),r.mask=b),p=0;p<o;p++)if(b[p]){for(c=l[p],m=!1,g=s,h=a,f=0,d=i-1;d-f>1;){if(c===h.value){m=!0;break}c>h.value?f=g:d=g,g=Math.floor((f+d)/2),h=t[Math.floor(g)]}m||(c===t[f].value?(h=t[f],m=!0):c===t[d].value?(h=t[d],m=!0):c<t[f].value?(m=!1,h=null):c>t[f].value&&(c<t[d].value?(h=t[f],m=!0):d===i-1?(m=!1,h=null):(h=t[d],m=!0))),m?(y[p]=h.mappedColor[0],w[p]=h.mappedColor[1],C[p]=h.mappedColor[2],b[p]=h.mappedColor[3]):y[p]=w[p]=C[p]=b[p]=0}return r.pixels=[y,w,C],r.mask=b,r.pixelType="u8",r.maskIsAlpha=v,r}function m(e,t){if(!u(e))return null;const{width:r,height:n}=e,{inputRanges:o,outputValues:i,outputPixelType:l,noDataRanges:c,allowUnmatched:h,isLastInputRangeInclusive:f}=t,d=e.pixels[0],p=s.Z.createEmptyBand(l,d.length),g=e.mask,m=new Uint8Array(r*n);g?m.set(g):m.fill(255);const y=e.pixelType.startsWith("f")?1e-6:0,w=o.map((e=>e-y));w[0]=o[0],w[w.length-1]=o[o.length-1]+(f?1e-6:0);const C=o.length/2,[b,v]=(0,a.r)(l);for(let e=0;e<n;e++)for(let t=0;t<r;t++){const n=e*r+t;if(m[n]){const e=d[n];let t=!1;for(let r=C-1;r>=0;r--)if(e===w[2*r]||e>w[2*r]&&e<w[2*r+1]){p[n]=i[r],t=!0;break}t||(h?p[n]=e>v?v:e<b?b:e:m[n]=0)}}const x=c?.length;if(x)for(let e=0;e<n;e++)for(let t=0;t<r;t++){const n=e*r+t;if(!g||g[n]){const e=d[n];for(let t=0;t<x;t+=2)if(e>=c[t]&&e<=c[t+1]){p[n]=0,m[n]=0;break}}}return new s.Z({width:r,height:n,pixelType:l,pixels:[p],mask:m})}function y(e,t,r,n){const o=null!=r&&r.length>=2?new Set(r):null,i=1===r?.length?r[0]:null,s=!!t?.length;for(let r=0;r<e.length;r++)if(n[r]){const a=e[r];if(s){let e=!1;for(let r=0;r<t.length;r+=2)if(a>=t[r]&&a<=t[r+1]){e=!0;break}e||(n[r]=0)}n[r]&&(a===i||o?.has(a))&&(n[r]=0)}}function w(e,t){const r=e[0].length;for(let n=0;n<r;n++)if(t[n]){let r=!1;for(let t=0;t<e.length;t++)if(e[t][n]){r=!0;break}r||(t[n]=0)}}function C(e,t){const r=e[0].length;for(let n=0;n<r;n++)if(t[n]){let r=!1;for(let t=0;t<e.length;t++)if(0===e[t][n]){r=!0;break}r&&(t[n]=0)}}function b(e,t){if(!u(e))return null;const{width:r,height:n,pixels:o}=e,i=r*n,a=new Uint8Array(i);e.mask?a.set(e.mask):a.fill(255);const l=o.length,{includedRanges:c,noDataValues:h,outputPixelType:f,matchAll:d,lookups:g}=t;if(g){const e=[];for(let t=0;t<l;t++){const r=g[t],n=p(o[t],a,r.lut,r.offset||0,"u8");e.push(n)}1===e.length?a.set(e[0]):d?w(e,a):C(e,a)}else if(d){const e=[];for(let t=0;t<l;t++){const r=new Uint8Array(i);r.set(a),y(o[t],c?.slice(2*t,2*t+2),h?.[t],r),e.push(r)}1===e.length?a.set(e[0]):w(e,a)}else for(let e=0;e<l;e++)y(o[e],c?.slice(2*e,2*e+2),h?.[e],a);return new s.Z({width:r,height:n,pixelType:f,pixels:o,mask:a})}function v(e){const{srcPixelType:t,inputRanges:r,outputValues:n,allowUnmatched:o,noDataRanges:i,isLastInputRangeInclusive:l,outputPixelType:u}=e;if("u8"!==t&&"s8"!==t&&"u16"!==t&&"s16"!==t)return null;const c=t.includes("16")?65536:256,h=t.includes("s")?-c/2:0,f=s.Z.createEmptyBand(u,c),d=new Uint8Array(c);o&&d.fill(255);const[p,g]=(0,a.r)(u);if(r?.length&&n?.length){const e=1e-6,t=r.map((t=>t-e));t[0]=r[0],l&&(t[t.length-1]=r[r.length-1]);for(let e=0;e<t.length;e++){const r=n[e]>g?g:n[e]<p?p:n[e],o=Math.ceil(t[2*e]-h),i=Math.floor(t[2*e+1]-h);for(let e=o;e<=i;e++)f[e]=r,d[e]=255}}if(i?.length)for(let e=0;e<i.length;e++){const t=Math.ceil(i[2*e]-h),r=Math.floor(i[2*e+1]-h);for(let e=t;e<=r;e++)d[e]=0}return{lut:f,offset:h,mask:d}}function x(e,t,r){if("u8"!==e&&"s8"!==e&&"u16"!==e&&"s16"!==e)return null;const n=e.includes("16")?65536:256,o=e.includes("s")?-n/2:0,i=new Uint8Array(n);if(t)for(let e=0;e<t.length;e++){const r=Math.ceil(t[2*e]-o),n=Math.floor(t[2*e+1]-o);for(let e=r;e<=n;e++)i[e]=255}else i.fill(255);if(r)for(let e=0;e<r.length;e++)i[r[e]-o]=0;return{lut:i,offset:o}}function k(e,t,r,n,o,i){const{width:s,height:a}=r.block,{x:l,y:u}=r.offset,{width:c,height:h}=r.mosaic,f=function(e,t,r,n,o,i,s,a){return{xmin:o<=r*e?0:o<r*e+e?o-r*e:e,ymin:i<=n*t?0:i<n*t+t?i-n*t:t,xmax:o+s<=r*e?0:o+s<r*e+e?o+s-r*e:e,ymax:i+a<=n*t?0:i+a<n*t+t?i+a-n*t:t}}(s,a,n,o,l,u,c,h);let d=0,p=0;if(i){const e=i.hasGCSSShiftTransform?360:i.halfWorldWidth??0,t=s*i.resolutionX,r=i.startX+n*t;r<e&&r+t>e?p=i.rightPadding:r>=e&&(d=i.leftMargin-i.rightPadding,p=0)}if(f.xmax-=p,"number"!=typeof t)for(let r=f.ymin;r<f.ymax;r++){const i=(o*a+r-u)*c+(n*s-l)+d,h=r*s;for(let r=f.xmin;r<f.xmax;r++)e[i+r]=t[h+r]}else for(let r=f.ymin;r<f.ymax;r++){const i=(o*a+r-u)*c+(n*s-l)+d;for(let r=f.xmin;r<f.xmax;r++)e[i+r]=t}}function T(e,t,r={}){const{clipOffset:n,clipSize:o,alignmentInfo:i,blockWidths:a}=r;if(a)return function(e,t,r){const n=e.find((e=>null!=e));if(null==n)return null;const o=e.some((e=>null==e||!!e.mask)),{width:i,height:a}=t,l=o?new Uint8Array(i*a):null,{blockWidths:c}=r,h=[],f=n.getPlaneCount(),d=s.Z.getPixelArrayConstructor(n.pixelType);if(o)for(let t=0,r=0;t<e.length;r+=c[t],t++){const n=e[t];if(!u(n))continue;const o=n.mask;for(let e=0;e<a;e++)for(let s=0;s<c[t];s++)l[e*i+s+r]=null==o?255:o[e*n.width+s]}const p=e.some((e=>null!=e&&e.bandMasks&&e.bandMasks.length>1)),g=p?[]:void 0,m=i*a;for(let t=0;t<f;t++){const r=new d(m),n=p?new Uint8Array(m):void 0;for(let o=0,s=0;o<e.length;s+=c[o],o++){const l=e[o];if(!u(l))continue;const h=l.pixels[t];if(null!=h){for(let e=0;e<a;e++)for(let t=0;t<c[o];t++)r[e*i+t+s]=h[e*l.width+t];if(n){const e=l.bandMasks?.[t]??l.mask;for(let t=0;t<a;t++)for(let r=0;r<c[o];r++)n[t*i+r+s]=e?e[t*l.width+r]:255}}}h.push(r),g&&n&&g.push(n)}const y=new s.Z({width:i,height:a,mask:l,bandMasks:g,pixels:h,pixelType:n.pixelType});return y.updateStatistics(),y}(e,t,{blockWidths:a});const l=e.find((e=>u(e)));if(null==l)return null;const c=o?o.width:t.width,h=o?o.height:t.height,f=l.width,d=l.height,p=t.width/f,g=t.height/d,m={offset:n||{x:0,y:0},mosaic:o||t,block:{width:f,height:d}},y=l.pixelType,w=s.Z.getPixelArrayConstructor(y),C=l.pixels.length,b=[];let v,x;for(let t=0;t<C;t++){x=new w(c*h);for(let r=0;r<g;r++)for(let n=0;n<p;n++){const o=e[r*p+n];u(o)&&(v=o.pixels[t],k(x,v,m,n,r,i))}b.push(x)}const T=e.some((e=>null==e||null!=e.mask&&e.mask.length>0)),A=e.some((e=>null!=e&&e.bandMasks&&e.bandMasks.length>1)),S=T?new Uint8Array(c*h):void 0,I=A?[]:void 0;if(S){for(let t=0;t<g;t++)for(let r=0;r<p;r++){const n=e[t*p+r],o=null!=n?n.mask:null;k(S,null!=o?o:n?255:0,m,r,t,i)}if(I)for(let t=0;t<C;t++){const r=new Uint8Array(c*h);for(let n=0;n<g;n++)for(let o=0;o<p;o++){const s=e[n*p+o],a=s?.bandMasks?.[t]??s?.mask;k(r,null!=a?a:s?255:0,m,o,n,i)}I.push(r)}}const M=new s.Z({width:c,height:h,pixels:b,pixelType:y,bandMasks:I,mask:S});return M.updateStatistics(),M}function A(e,t,r){if(!u(e))return null;const{width:n,height:o}=e,i=t.x,s=t.y,a=r.width+i,l=r.height+s;if(i<0||s<0||a>n||l>o)return e;if(0===i&&0===s&&a===n&&l===o)return e;e.mask||(e.mask=new Uint8Array(n*o));const c=e.mask;for(let e=0;e<o;e++){const t=e*n;for(let r=0;r<n;r++)c[t+r]=e<s||e>=l||r<i||r>=a?0:1}return e.updateStatistics(),e}function S(e){if(!u(e))return null;const t=e.clone(),{width:r,height:n,pixels:o}=e,i=o[0],s=t.pixels[0],a=e.mask;for(let e=2;e<n-1;e++){const t=new Map;for(let n=e-2;n<e+2;n++)for(let e=0;e<4;e++){const o=n*r+e;P(t,i[o],a?a[o]:1)}s[e*r]=I(t),s[e*r+1]=s[e*r+2]=s[e*r];let n=3;for(;n<r-1;n++){let o=(e-2)*r+n+1;P(t,i[o],a?a[o]:1),o=(e-1)*r+n+1,P(t,i[o],a?a[o]:1),o=e*r+n+1,P(t,i[o],a?a[o]:1),o=(e+1)*r+n+1,P(t,i[o],a?a[o]:1),o=(e-2)*r+n-3,M(t,i[o],a?a[o]:1),o=(e-1)*r+n-3,M(t,i[o],a?a[o]:1),o=e*r+n-3,M(t,i[o],a?a[o]:1),o=(e+1)*r+n-3,M(t,i[o],a?a[o]:1),s[e*r+n]=I(t)}s[e*r+n+1]=s[e*r+n]}for(let e=0;e<r;e++)s[e]=s[r+e]=s[2*r+e],s[(n-1)*r+e]=s[(n-2)*r+e];return t.updateStatistics(),t}function I(e){if(0===e.size)return 0;let t=0,r=-1,n=0;const o=e.keys();let i=o.next();for(;!i.done;)n=e.get(i.value),n>t&&(r=i.value,t=n),i=o.next();return r}function M(e,t,r){if(0===r)return;const n=e.get(t);1===n?e.delete(t):e.set(t,n-1)}function P(e,t,r){0!==r&&e.set(t,e.has(t)?e.get(t)+1:1)}function D(e,t,r){let{x:n,y:o}=t;const{width:i,height:a}=r;if(0===n&&0===o&&a===e.height&&i===e.width)return e;const{width:l,height:c}=e,h=Math.max(0,o),f=Math.max(0,n),d=Math.min(n+i,l),p=Math.min(o+a,c);if(d<0||p<0||!u(e))return null;n=Math.max(0,-n),o=Math.max(0,-o);const{pixels:g}=e,m=i*a,y=g.length,w=[];for(let t=0;t<y;t++){const r=g[t],a=s.Z.createEmptyBand(e.pixelType,m);for(let e=h;e<p;e++){const t=e*l;let s=(e+o-h)*i+n;for(let e=f;e<d;e++)a[s++]=r[t+e]}w.push(a)}const C=new Uint8Array(m),b=e.mask;for(let e=h;e<p;e++){const t=e*l;let r=(e+o-h)*i+n;for(let e=f;e<d;e++)C[r++]=b?b[t+e]:1}const v=new s.Z({width:r.width,height:r.height,pixelType:e.pixelType,pixels:w,mask:C});return v.updateStatistics(),v}function E(e,t=!0){if(!u(e))return null;const{pixels:r,width:n,height:o,mask:i,pixelType:a}=e,l=[],c=Math.round(n/2),h=Math.round(o/2),f=o-1,d=n-1;for(let e=0;e<r.length;e++){const i=r[e],u=s.Z.createEmptyBand(a,c*h);let p=0;for(let e=0;e<o;e+=2)for(let r=0;r<n;r+=2){const o=i[e*n+r];if(t){const t=r===d?o:i[e*n+r+1],s=e===f?o:i[e*n+r+n],a=r===d?s:e===f?t:i[e*n+r+n+1];u[p++]=(o+t+s+a)/4}else u[p++]=o}l.push(u)}let p=null;if(null!=i){p=new Uint8Array(c*h);let e=0;for(let r=0;r<o;r+=2)for(let o=0;o<n;o+=2){const s=i[r*n+o];if(t){const t=o===d?s:i[r*n+o+1],a=r===f?s:i[r*n+o+n],l=o===d?a:r===f?t:i[r*n+o+n+1];p[e++]=s*t*a*l?1:0}else p[e++]=s}}return new s.Z({width:c,height:h,pixelType:a,pixels:l,mask:p})}function R(e,t,r){if(!u(e))return null;const{width:n,height:o}=t;let{width:i,height:s}=e;const a=new Map,l={x:0,y:0},c=null==r?1:1+r;let h=e;for(let e=0;e<c;e++){const r=Math.ceil(i/n),u=Math.ceil(s/o);for(let i=0;i<u;i++){l.y=i*o;for(let o=0;o<r;o++){l.x=o*n;const r=D(h,l,t);a.set(`${e}/${i}/${o}`,r)}}e<c-1&&(h=E(h)),i=Math.round(i/2),s=Math.round(s/2)}return a}function _(e,t,r,n,o=0){const{width:i,height:s}=e,{width:a,height:l}=t,u=n.cols,c=n.rows,h=Math.ceil(a/u-.1/u),f=Math.ceil(l/c-.1/c);let d,p,g,m,y,w,C;const b=h*u,v=b*f*c,x=new Float32Array(v),k=new Float32Array(v),T=new Uint32Array(v),A=new Uint32Array(v);let S,I,M=0;for(let e=0;e<f;e++)for(let t=0;t<h;t++){d=12*(e*h+t),p=r[d],g=r[d+1],m=r[d+2],y=r[d+3],w=r[d+4],C=r[d+5];for(let r=0;r<c;r++){M=(e*c+r)*b+t*u,I=(r+.5)/c;for(let e=0;e<r;e++)S=(e+.5)/u,x[M+e]=(p*S+g*I+m)*i+o,k[M+e]=(y*S+w*I+C)*s+o,T[M+e]=Math.floor(x[M+e]),A[M+e]=Math.floor(k[M+e])}d+=6,p=r[d],g=r[d+1],m=r[d+2],y=r[d+3],w=r[d+4],C=r[d+5];for(let r=0;r<c;r++){M=(e*c+r)*b+t*u,I=(r+.5)/c;for(let e=r;e<u;e++)S=(e+.5)/u,x[M+e]=(p*S+g*I+m)*i+o,k[M+e]=(y*S+w*I+C)*s+o,T[M+e]=Math.floor(x[M+e]),A[M+e]=Math.floor(k[M+e])}}return{offsets_x:x,offsets_y:k,offsets_xi:T,offsets_yi:A,gridWidth:b}}function L(e,t){const{coefficients:r,spacing:n}=t,{offsets_x:o,offsets_y:i,gridWidth:s}=_(e,e,r,{rows:n[0],cols:n[1]}),{width:a,height:l}=e,u=new Float32Array(a*l),c=180/Math.PI;for(let e=0;e<l;e++)for(let t=0;t<a;t++){const r=e*s+t,n=0===e?r:r-s,h=e===l-1?r:r+s,f=o[n]-o[h],d=i[h]-i[n];if(isNaN(f)||isNaN(d))u[e*a+t]=90;else{let r=Math.atan2(d,f)*c;r=(360+r)%360,u[e*a+t]=r}}return u}function B(e,t,r,n,o="nearest"){if(!u(e))return null;"majority"===o&&(e=S(e));const{pixels:i,mask:a,pixelType:l}=e,c=e.width,h=e.height,f=s.Z.getPixelArrayConstructor(l),d=i.length,{width:p,height:g}=t;let m=!1;for(let e=0;e<r.length;e+=3)-1===r[e]&&-1===r[e+1]&&-1===r[e+2]&&(m=!0);const{offsets_x:y,offsets_y:w,offsets_xi:C,offsets_yi:b,gridWidth:v}=_({width:c,height:h},t,r,n,"majority"===o?.5:0);let x;const k=(e,t,r)=>{const n=e instanceof Float32Array||e instanceof Float64Array?0:.5;for(let o=0;o<g;o++){x=o*v;for(let i=0;i<p;i++){if(y[x]<0||w[x]<0)e[o*p+i]=0;else if(r)e[o*p+i]=t[C[x]+b[x]*c];else{const r=Math.floor(y[x]),s=Math.floor(w[x]),l=Math.ceil(y[x]),u=Math.ceil(w[x]),h=y[x]-r,f=w[x]-s;if(!a||a[r+s*c]&&a[l+s*c]&&a[r+u*c]&&a[l+u*c]){const a=(1-h)*t[r+s*c]+h*t[l+s*c],d=(1-h)*t[r+u*c]+h*t[l+u*c];e[o*p+i]=(1-f)*a+f*d+n}else e[o*p+i]=t[C[x]+b[x]*c]}x++}}},T=[];let A;for(let e=0;e<d;e++)A=new f(p*g),k(A,i[e],"nearest"===o||"majority"===o),T.push(A);const I=new s.Z({width:p,height:g,pixelType:l,pixels:T});if(null!=a)I.mask=new Uint8Array(p*g),k(I.mask,a,!0);else if(m){I.mask=new Uint8Array(p*g);for(let e=0;e<p*g;e++)I.mask[e]=y[e]<0||w[e]<0?0:1}return I.updateStatistics(),I}},15612:(e,t,r)=>{r.d(t,{AV:()=>m,Hv:()=>p,Oh:()=>g,ZF:()=>h,dy:()=>w,hE:()=>c,js:()=>d,oc:()=>u,um:()=>y});var n=r(70586),o=r(5847),i=r(81578),s=r(75509);const a=1,l=[.299,.587,.114];function u(e,t=256){t=Math.min(t,256);const{size:r,counts:n}=e,o=new Uint8Array(r),i=n.reduce(((e,r)=>e+r/t),0);let s=0,a=0,l=0,u=i;for(let e=0;e<r;e++)if(l+=n[e],!(e<r-1&&l+n[e+1]<u)){for(;s<t-1&&u<l;)s++,u+=i;for(let t=a;t<=e;t++)o[t]=s;a=e+1}for(let e=a;e<r;e++)o[e]=t-1;return o}function c(e){const{minCutOff:t,maxCutOff:r,gamma:n,pixelType:o,rounding:i}=e,s=e.outMin||0,a=e.outMax||255;if(!["u8","u16","s8","s16"].includes(o))return null;const l=t.length;let u,c,h=0;"s8"===o?h=-127:"s16"===o&&(h=-32767);let f=256;["u16","s16"].includes(o)&&(f=65536);const d=[],p=[],g=a-s;for(u=0;u<l;u++)p[u]=r[u]-t[u],d[u]=0===p[u]?0:g/p[u];let m;const w=[];let C,b,v;if(n&&n.length>=l){const e=y(l,n);for(u=0;u<l;u++){for(v=[],c=0;c<f;c++)if(0!==p[u])if(C=c+h,m=(C-t[u])/p[u],b=1,n[u]>1&&(b-=(1/g)**(m*e[u])),C<r[u]&&C>t[u]){const e=b*g*m**(1/n[u])+s;v[c]="floor"===i?Math.floor(e):"round"===i?Math.round(e):e}else C>=r[u]?v[c]=a:v[c]=s;else v[c]=s;w[u]=v}}else for(u=0;u<l;u++){for(v=[],c=0;c<f;c++)if(C=c+h,C<=t[u])v[c]=s;else if(C>=r[u])v[c]=a;else{const e=(C-t[u])*d[u]+s;v[c]="floor"===i?Math.floor(e):"round"===i?Math.round(e):e}w[u]=v}if(null!=e.contrastOffset){const t=function(e,t){const r=Math.min(Math.max(e,-100),100),n=Math.min(Math.max(t??0,-100),100),o=255;let i=0,s=0;const a=new Uint8Array(256);for(i=0;i<256;i++)r>0&&r<100?s=(200*i-25500+510*n)/(2*(100-r))+128:r<=0&&r>-100?s=(200*i-25500+510*n)*(100+r)/2e4+128:100===r?(s=200*i-25500+256*(100-r)+510*n,s=s>0?o:0):-100===r&&(s=128),a[i]=s>o?o:s<0?0:s;return a}(e.contrastOffset,e.brightnessOffset);for(u=0;u<l;u++)for(v=w[u],c=0;c<f;c++)v[c]=t[v[c]]}return{lut:w,offset:h}}function h(e,t,r){const n=[];for(let o=0;o<t.length;o++){let i=0,s=0,a=0;"min"in t[o]?({min:i,max:s,avg:a}=t[o]):[i,s,a]=t[o];let u=a??0;"u8"!==e&&(u=255*(u-i)/(s-i)),r&&(u*=l[o]),n.push(f(u))}return n}function f(e){if(e<=0||e>=255)return a;let t=0;150!==e&&(t=e<=150?45*Math.cos(.01047*e):17*Math.sin(.021*e));const r=e+t,n=Math.log(e/255),o=Math.log(r/255);if(0===o)return a;const i=n/o;return isNaN(i)?a:Math.min(9.9,Math.max(.01,i))}function d(e){const{pixels:t,mask:r,pixelType:n}=e,o=t.map((e=>function(e,t,r,n){let o=1/0,i=-1/0,s=0,a=0;const l=e.length;for(let r=0;r<l;r++){const n=e[r];t&&!t[r]||(o=n<o?n:o,i=n>i?n:i,s+=n,a++)}if(0===a)return{statistics:{min:0,max:0,avg:0,stddev:0},histogram:null};const u=s/a;let c=0;for(let r=0;r<l;r++)t&&!t[r]||(c+=(e[r]-u)**2);const h=t?t.filter((e=>e)).length:l,f={min:o,max:i,avg:u,stddev:h<=1?0:Math.sqrt(c/(h-1))};if(["u8","s8","u4","u2","u1"].includes(r)){const r=i-o+1,n=new Uint32Array(r);for(let r=0;r<l;r++)t&&!t[r]||n[e[r]-o]++;return{statistics:f,histogram:{min:o-.5,max:i+.5,size:r,counts:n}}}const d=256,p=new Uint32Array(d),g=(i-o)/d;if(0===g)return{statistics:f,histogram:{min:o,max:i,size:1,counts:new Uint32Array(1).fill(a)}};const m=new Uint32Array(257);for(let r=0;r<l;r++)t&&!t[r]||m[Math.floor((e[r]-o)/g)]++;for(let e=0;e<255;e++)p[e]=m[e];return p[255]=m[255]+m[d],{statistics:f,histogram:{min:o,max:i,size:d,counts:p}}}(e,r,n)));return{statistics:o.map((({statistics:e})=>e)),histograms:o.map((({histogram:e})=>e))}}function p(e){if(null==e||!e.pixels?.length)return null;const{pixels:t,mask:r,pixelType:n}=e,o=e.width*e.height,i=t.length;let s,a,l,u,c;const h=[],f=[];let d,p,g,m,y,w,C,b,v,x;const k=256;for(u=0;u<i;u++){if(d=new Uint32Array(k),g=t[u],"u8"===n)if(s=-.5,a=255.5,r)for(c=0;c<o;c++)r[c]&&d[g[c]]++;else for(c=0;c<o;c++)d[g[c]]++;else{let t=!1;e.statistics||(e.updateStatistics(),t=!0);const n=e.statistics;if(s=n[u].minValue,a=n[u].maxValue,l=(a-s)/k,0===l){!n||e.validPixelCount||t||e.updateStatistics();const r=(e.validPixelCount||e.width*e.height)/k;for(let e=0;e<k;e++)d[e]=Math.round(r*(e+1))-Math.round(r*e)}else{for(p=new Uint32Array(257),c=0;c<o;c++)r&&!r[c]||p[Math.floor((g[c]-s)/l)]++;for(c=0;c<255;c++)d[c]=p[c];d[255]=p[255]+p[k]}}for(h.push({min:s,max:a,size:k,counts:d}),m=0,y=0,b=0,c=0;c<k;c++)m+=d[c],y+=c*d[c];for(v=y/m,c=0;c<k;c++)b+=d[c]*(c-v)**2;x=Math.sqrt(b/(m-1)),l=(a-s)/k,w=(v+.5)*l+s,C=x*l,f.push({min:s,max:a,avg:w,stddev:C})}return{statistics:f,histograms:h}}function g(e){const t=[];for(let r=0;r<e.length;r++){const{min:n,max:o,size:i,counts:s}=e[r];let a=0,l=0;for(let e=0;e<i;e++)a+=s[e],l+=e*s[e];const u=l/a;let c=0;for(let e=0;e<i;e++)c+=s[e]*(e-u)**2;const h=(o-n)/i,f=(u+.5)*h+n,d=Math.sqrt(c/(a-1))*h;t.push({min:n,max:o,avg:f,stddev:d})}return t}function m(e,t){const{pixelBlock:r,bandIds:o,returnHistogramLut:a,rasterInfo:l}=t;let c=null,h=null,f=e.stretchType;if("number"==typeof f&&(f=s.J[f]),e.dra)if("minMax"===f&&null!=r&&r.statistics)c=r.statistics.map((e=>[e.minValue,e.maxValue,0,0]));else{const e=p(r);c=null!=e?e.statistics:null,h=null!=e?e.histograms:null}else c=e.statistics?.length>0?e.statistics:l.statistics,h="histograms"in e?e.histograms:void 0,h||(h=l.histograms);"percentClip"!==f&&"histogramEqualization"!==f||h?.length||(f="minMax");const d=c?.length||h?.length||l.bandCount,g=[],m=[];let y,w,C,b,v,x,k,T,A;c&&!Array.isArray(c[0])&&(c=c.map((e=>[e.min,e.max,e.avg,e.stddev])));const[S,I]=(0,i.r)(l.pixelType);if(!c?.length){for(c=[],T=0;T<d;T++)c.push([S,I,1,1]);"standardDeviation"===f&&(f="minMax")}switch(f){case"none":for(T=0;T<d;T++)g[T]=S,m[T]=I;break;case"minMax":for(T=0;T<d;T++){const e=c[T];g[T]=e[0],m[T]=e[1]}break;case"standardDeviation":for(T=0;T<d;T++){const t=c[T];g[T]=t[2]-e.numberOfStandardDeviations*t[3],m[T]=t[2]+e.numberOfStandardDeviations*t[3],g[T]<t[0]&&(g[T]=t[0]),m[T]>t[1]&&(m[T]=t[1])}break;case"histogramEqualization":for((0,n.O3)(h),T=0;T<d;T++)g[T]=h[T].min,m[T]=h[T].max;break;case"percentClip":for((0,n.O3)(h),T=0;T<h.length;T++){for(y=h[T],v=new Uint32Array(y.size),b=[...y.counts],b.length>=20&&(b[0]=b[1]=b[2]=b[b.length-1]=b[b.length-2]=0),C=0,w=(y.max-y.min)/y.size,k=-.5===y.min&&1===w?.5:0,A=0;A<y.size;A++)C+=b[A],v[A]=C;for(x=(e.minPercent||0)*C/100,g[T]=y.min+k,A=0;A<y.size;A++)if(v[A]>x){g[T]=y.min+w*(A+k);break}for(x=(1-(e.maxPercent||0)/100)*C,m[T]=y.max+k,A=y.size-2;A>=0;A--)if(v[A]<x){m[T]=y.min+w*(A+2-k);break}if(m[T]<g[T]){const e=g[T];g[T]=m[T],m[T]=e}}break;default:for(T=0;T<d;T++){const e=c[T];g[T]=e[0],m[T]=e[1]}}let M,P,D;return"histogramEqualization"===f?((0,n.O3)(h),P=h[0].size||256,M=0,a&&(D=h.map((e=>u(e))))):(P=e.max||255,M=e.min||0),function(e,t){if(null==t||0===t.length)return e;const r=Math.max.apply(null,t),{minCutOff:n,maxCutOff:o,outMin:i,outMax:s,histogramLut:a}=e;return n.length===t.length||n.length<=r?e:{minCutOff:t.map((e=>n[e])),maxCutOff:t.map((e=>o[e])),histogramLut:a?t.map((e=>a[e])):null,outMin:i,outMax:s}}({minCutOff:g,maxCutOff:m,outMax:P,outMin:M,histogramLut:D},o)}function y(e,t){const r=new Float32Array(e);for(let n=0;n<e;n++)t[n]>1?t[n]>2?r[n]=6.5+(t[n]-2)**2.5:r[n]=6.5+100*(2-t[n])**4:r[n]=1;return r}function w(e,t){if(null==e||!e.pixels?.length)return e;const{mask:r,width:n,height:i,pixels:s}=e,{minCutOff:a,maxCutOff:l,gamma:u}=t,c=t.outMin||0,h=t.outMax||255,f=n*i,d=t.outputPixelType||"u8",p=e.pixels.map((()=>o.Z.createEmptyBand(d,f))),g=p.length;let m,w,C,b,v;const x=h-c,k=[],T=[];for(m=0;m<g;m++)T[m]=l[m]-a[m],k[m]=0===T[m]?0:x/T[m];const A=d.startsWith("u")||d.startsWith("s"),S=u&&u.length>=g,I=!!t.isRenderer;if(S){const e=y(g,u);for(w=0;w<f;w++)if(null==r||r[w])for(m=0;m<g;m++)if(0!==T[m])if(C=s[m][w],v=(C-a[m])/T[m],b=1,u[m]>1&&(b-=(1/x)**(v*e[m])),C<l[m]&&C>a[m]){const e=b*x*v**(1/u[m])+c;p[m][w]=I?Math.floor(e):A?Math.round(e):e}else C>=l[m]?p[m][w]=h:p[m][w]=c;else p[m][w]=c}else for(w=0;w<f;w++)if(null==r||r[w])for(m=0;m<g;m++)if(C=s[m][w],C<l[m]&&C>a[m]){const e=(C-a[m])*k[m]+c;p[m][w]=I?Math.floor(e):A?Math.round(e):e}else C>=l[m]?p[m][w]=h:p[m][w]=c;const M=new o.Z({width:n,height:i,mask:r,pixels:p,pixelType:d});return M.updateStatistics(),M}},63342:(e,t,r)=>{r.d(t,{CX:()=>s,M_:()=>d,Ne:()=>p,TK:()=>a,Ub:()=>h,vC:()=>c,yg:()=>f});var n=r(5847),o=r(55914);const i=1,s=1/111e3;function a(e){let{altitude:t,azimuth:r}=e;const{hillshadeType:n,pixelSizePower:o=1,pixelSizeFactor:i=1,scalingType:a,isGCS:l,resolution:u}=e,c="multi-directional"===n?2*e.zFactor:e.zFactor,{x:h,y:f}=u;let d=c/(8*h),p=c/(8*f);if(l&&c>.001&&(d/=s,p/=s),"adjusted"===a)if(l){const e=h*s,t=f*s;d=(c+e**o*i)/(8*e),p=(c+t**o*i)/(8*t)}else d=(c+h**o*i)/(8*h),p=(c+f**o*i)/(8*f);let g=(90-t)*Math.PI/180,m=Math.cos(g),y=(360-r+90)*Math.PI/180,w=Math.sin(g)*Math.cos(y),C=Math.sin(g)*Math.sin(y);const b=[315,270,225,360,180,0],v=[60,60,60,60,60,90],x=new Float32Array([3,5,3,2,1,4]),k=x.reduce(((e,t)=>e+t)),T=x.map((e=>e/k)),A="multi-directional"===n?b.length:1,S=new Float32Array(6),I=new Float32Array(6),M=new Float32Array(6);if("multi-directional"===n)for(let e=0;e<A;e++)t=v[e],r=b[e],g=(90-t)*Math.PI/180,m=Math.cos(g),y=(360-r+90)*Math.PI/180,w=Math.sin(g)*Math.cos(y),C=Math.sin(g)*Math.sin(y),S[e]=m,I[e]=w,M[e]=C;else S.fill(m),I.fill(w),M.fill(C);return{resolution:u,factor:[d,p],sinZcosA:w,sinZsinA:C,cosZ:m,sinZcosAs:I,sinZsinAs:M,cosZs:S,weights:T,hillshadeType:["traditional","multi-directional"].indexOf(n)}}function l(e,t){const{width:r,height:n}=e,o=r*n,s=new Uint8Array(o),a=null!=e.mask;let l;if(a){l=new Uint8Array(e.mask);for(let e=0;e<l.length;e++)l[e]&&(s[e]=1,l[e]=1)}const u=e.pixels[0],c=new Float32Array(o),h=new Float32Array(o);let f,d=0;if(t){const{resolution:e}=t,r=e?(e.x+e.y)/2:1;d=200*t.zFactor/(r*r),f=new Float32Array(o)}const p=t?.curvatureType;let g,m,y,w,C,b,v,x;for(let e=i;e<n-i;e++){const t=e*r;for(let e=i;e<r-i;e++){const n=t+e;if(!l||0!==l[n]){if(l){if(l[n-r-1]+l[n-r]+l[n-r+1]+l[n-1]+l[n+1]+l[n+r-1]+l[n+r]+l[n+r+1]<7){s[n]=0;continue}g=l[n-r-1]?u[n-r-1]:u[n],m=l[n-r]?u[n-r]:u[n],y=l[n-r+1]?u[n-r+1]:u[n],w=l[n-1]?u[n-1]:u[n],C=l[n+1]?u[n+1]:u[n],b=l[n+r-1]?u[n+r-1]:u[n],v=l[n+r]?u[n+r]:u[n],x=l[n+r+1]?u[n+r+1]:u[n]}else g=u[n-r-1],m=u[n-r],y=u[n-r+1],w=u[n-1],C=u[n+1],b=u[n+r-1],v=u[n+r],x=u[n+r+1];if(c[n]=y+C+C+x-(g+w+w+b),h[n]=b+v+v+x-(g+m+m+y),null!=f){const e=u[n],t=.5*(w+C)-e,r=.5*(m+v)-e;if("standard"===p)f[n]=-d*(t+r);else{const e=(-g+y+b-x)/4,o=(-w+C)/2,i=(m-v)/2,s=o*o,a=i*i,l=s+a;l&&(f[n]="profile"===p?d*(t*s+r*a+e*o*i)/l:-d*(t*a+r*s-e*o*i)/l)}}}}}return{outMask:a?s:null,dzxs:c,dzys:h,curvatures:f}}function u(e,t,r){for(let n=0;n<r;n++)e[n*t]=e[n*t+1],e[(n+1)*t-1]=e[(n+1)*t-2];for(let n=1;n<t-1;n++)e[n]=e[n+t],e[n+(r-1)*t]=e[n+(r-2)*t]}function c(e,t){if(!(0,o.nk)(e))return e;const{factor:r,sinZcosA:s,sinZsinA:c,cosZ:h,sinZcosAs:f,sinZsinAs:d,cosZs:p,weights:g}=a(t),[m,y]=r,w="traditional"===t.hillshadeType,{width:C,height:b}=e,v=new Uint8Array(C*b),{dzxs:x,dzys:k,outMask:T}=l(e);for(let e=i;e<b-i;e++){const t=e*C;for(let e=i;e<C-i;e++){const r=t+e;if(!T||T[r]){const e=x[r]*m,t=k[r]*y,n=Math.sqrt(1+e*e+t*t);let o=0;if(w){let r=255*(h+c*t-s*e)/n;r<0&&(r=0),o=r}else{const r=d.length;for(let i=0;i<r;i++){let r=255*(p[i]+d[i]*t-f[i]*e)/n;r<0&&(r=0),o+=r*g[i]}}v[r]=255&o}}}return u(v,C,b),new n.Z({width:C,height:b,pixels:[v],mask:T,pixelType:"u8",validPixelCount:e.validPixelCount,statistics:[{minValue:0,maxValue:255}]})}function h(e,t,r,n){if(!(0,o.nk)(e)||!(0,o.nk)(t))return;const{min:i,max:s}=n,a=e.pixels[0],{pixels:l,mask:u}=t,c=l[0],h=255.00001/(s-i),f=new Uint8ClampedArray(c.length),d=new Uint8ClampedArray(c.length),p=new Uint8ClampedArray(c.length),g=r.length-1;for(let e=0;e<c.length;e++){if(u&&0===u[e])continue;const t=Math.floor((c[e]-i)*h),[n,o]=r[t<0?0:t>g?g:t],s=a[e],l=s*o,m=l*(1-Math.abs(n%2-1)),y=s-l;switch(Math.floor(n)){case 0:f[e]=l+y,d[e]=m+y,p[e]=y;break;case 1:f[e]=m+y,d[e]=l+y,p[e]=y;break;case 2:f[e]=y,d[e]=l+y,p[e]=m+y;break;case 3:f[e]=y,d[e]=m+y,p[e]=l+y;break;case 4:f[e]=m+y,d[e]=y,p[e]=l+y;break;case 5:case 6:f[e]=l+y,d[e]=y,p[e]=m+y}}e.pixels=[f,d,p],e.updateStatistics()}function f(e,t){if(!(0,o.nk)(e))return e;const r=t.zFactor,a=t.pixelSizePower??1,c=t.pixelSizeFactor??1,h=t.slopeType,f=t.isGCS,{x:d,y:p}=t.resolution;let g=r/(8*d),m=r/(8*p);f&&Math.abs(r-1)<1e-4&&(g/=s,m/=s),"adjusted"===h&&(g=(r+d**a*c)/(8*d),m=(r+p**a*c)/(8*p));const{dzxs:y,dzys:w,outMask:C}=l(e),{width:b,height:v}=e,x=new Float32Array(b*v);for(let e=i;e<v-i;e++){const t=e*b;for(let e=i;e<b-i;e++){const r=t+e;if(!C||C[r]){const n=y[r]*g,o=w[r]*m,i=Math.sqrt(n*n+o*o);x[t+e]="percent-rise"===h?100*i:57.2957795*Math.atan(i)}}}u(x,b,v);const k=new n.Z({width:b,height:v,pixels:[x],mask:C,pixelType:"f32",validPixelCount:e.validPixelCount});return k.updateStatistics(),k}function d(e,t={}){if(!(0,o.nk)(e))return e;const{resolution:r}=t,s=r?1/r.x:1,a=r?1/r.y:1,{dzxs:c,dzys:h,outMask:f}=l(e),{width:d,height:p}=e,g=new Float32Array(d*p);for(let e=i;e<p-i;e++){const t=e*d;for(let e=i;e<d-i;e++){const r=t+e;if(!f||f[r]){const n=c[r]*s,o=h[r]*a;let i=-1;0===n&&0===o||(i=90-57.29578*Math.atan2(o,-n),i<0&&(i+=360),360===i?i=0:i>360&&(i%=360)),g[t+e]=i}}}return u(g,d,p),new n.Z({width:d,height:p,pixels:[g],mask:f,pixelType:"f32",validPixelCount:e.validPixelCount,statistics:[{minValue:-1,maxValue:360}]})}function p(e,t){if(!(0,o.nk)(e))return e;const{curvatures:r,outMask:i}=l(e,t),{width:s,height:a}=e;u(r,s,a);const c=new n.Z({width:s,height:a,pixels:[r],mask:i,pixelType:"f32",validPixelCount:e.validPixelCount});return c.updateStatistics(),c}},80676:(e,t,r)=>{r.d(t,{KC:()=>p,NL:()=>l,QI:()=>g,Tg:()=>h,Yx:()=>u,xQ:()=>d});var n=r(35454),o=r(5847),i=r(55914);const s=new Map;s.set("meter-per-second",1),s.set("kilometer-per-hour",.277778),s.set("knots",.514444),s.set("feet-per-second",.3048),s.set("mile-per-hour",.44704);const a=180/Math.PI,l=new n.X({esriMetersPerSecond:"meter-per-second",esriKilometersPerHour:"kilometer-per-hour",esriKnots:"knots",esriFeetPerSecond:"feet-per-second",esriMilesPerHour:"mile-per-hour"});function u(e,t){return s.get(e)/s.get(t)||1}function c(e){return(450-e)%360}function h(e,t="geographic"){const[r,n]=e,o=Math.sqrt(r*r+n*n);let i=Math.atan2(n,r)*a;return i=(360+i)%360,"geographic"===t&&(i=c(i)),[o,i]}function f(e,t="geographic"){let r=e[1];"geographic"===t&&(r=c(r)),r%=360;const n=e[0];return[n*Math.cos(r/a),n*Math.sin(r/a)]}function d(e,t,r,n="geographic"){if(!(0,i.nk)(e)||null==r)return e;const o="vector-magdir"===t?e.clone():p(e,t),s=o.pixels[1];for(let e=0;e<s.length;e++)s[e]="geographic"===n?(s[e]+r[e]+270)%360:(s[e]+360-r[e])%360;return"vector-magdir"===t?o:p(o,"vector-magdir")}function p(e,t,r="geographic",n=1){if(!(0,i.nk)(e))return e;const{pixels:s,width:a,height:l}=e,u=a*l,c=s[0],d=s[1],p=e.pixelType.startsWith("f")?e.pixelType:"f32",g=o.Z.createEmptyBand(p,u),m=o.Z.createEmptyBand(p,u);let y=0;for(let e=0;e<l;e++)for(let e=0;e<a;e++)"vector-uv"===t?([g[y],m[y]]=h([c[y],d[y]],r),g[y]*=n):([g[y],m[y]]=f([c[y],d[y]],r),g[y]*=n,m[y]*=n),y++;const w=new o.Z({pixelType:p,width:e.width,height:e.height,mask:e.mask,validPixelCount:e.validPixelCount,maskIsAlpha:e.maskIsAlpha,pixels:[g,m]});return w.updateStatistics(),w}function g(e,t,r=1){if(1===r||!(0,i.nk)(e))return e;const n=e.clone(),{pixels:o,width:s,height:a}=n,l=o[0],u=o[1];let c=0;for(let e=0;e<a;e++)for(let e=0;e<s;e++)"vector-uv"===t?(l[c]*=r,u[c]*=r):l[c]*=r,c++;return n.updateStatistics(),n}function m(e,t,r,n=1){const o=Math.sqrt(e*e+t*t)/n,i=(2*Math.PI+Math.atan2(t,e))%(2*Math.PI);return[o,(2*Math.PI+i-r)%(2*Math.PI)]}!function(e=0,t=0,r=Math.PI,n=!0){n&&(r=(2*Math.PI-r)%(2*Math.PI));const o=n?-1:1,i=13*o,s=-7*o,a=-2*o,l=-16*o,u=21.75,[c,h]=m(0,t+i,r,u),[f,d]=m(e-5.5,t+s,r,u),[p,g]=m(e+5.5,t+s,r,u),[y,w]=m(e-1.5,t+a,r,u),[C,b]=m(e+1.5,t+a,r,u),[v,x]=m(e-1.5,t+l,r,u),[k,T]=m(e+1.5,t+l,r,u)}(0,0,0)},72758:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(43697),o=r(3892),i=r(96674),s=r(92604),a=r(5600),l=(r(75215),r(67676),r(80442),r(52011)),u=r(25972),c=r(55914),h=r(15612),f=r(63342),d=r(93010),p=r(12163);let g=class extends i.wq{constructor(e){super(e)}bind(){const{rendererJSON:e}=this;if(!e)return{success:!1};let t;switch(this.lookup={rendererJSON:{}},e.type){case"uniqueValue":t=this._updateUVRenderer(e);break;case"rasterColormap":t=this._updateColormapRenderer(e);break;case"rasterStretch":t=this._updateStretchRenderer(e);break;case"classBreaks":t=this._updateClassBreaksRenderer(e);break;case"rasterShadedRelief":t=this._updateShadedReliefRenderer(e);break;case"vectorField":t=this._updateVectorFieldRenderer();break;case"flowRenderer":t=this._updateFlowRenderer()}return t}symbolize(e){let t=e&&e.pixelBlock;if(!m(t))return t;if(e.simpleStretchParams&&"rasterStretch"===this.rendererJSON.type)return this.simpleStretch(t,e.simpleStretchParams);try{let r;switch(t.pixels.length>3&&(t=t.extractBands([0,1,2])),this.rendererJSON.type){case"uniqueValue":case"rasterColormap":r=this._symbolizeColormap(t);break;case"classBreaks":r=this._symbolizeClassBreaks(t);break;case"rasterStretch":r=this._symbolizeStretch(t,e.bandIds);break;case"rasterShadedRelief":{const n=e.extent,o=n.spatialReference.isGeographic,i={x:(n.xmax-n.xmin)/t.width,y:(n.ymax-n.ymin)/t.height};r=this._symbolizeShadedRelief(t,{isGCS:o,resolution:i});break}}return r}catch(e){return s.Z.getLogger(this.declaredClass).error("symbolize",e.message),t}}simpleStretch(e,t){if(!m(e))return e;try{return e.pixels.length>3&&(e=e.extractBands([0,1,2])),(0,h.dy)(e,{...t,isRenderer:!0})}catch(t){return s.Z.getLogger(this.declaredClass).error("symbolize",t.message),e}}generateWebGLParameters(e){if(["uniqueValue","rasterColormap","classBreaks"].includes(this.rendererJSON.type)){const{indexedColormap:e,offset:t}=this.lookup.colormapLut||{};return{colormap:e,colormapOffset:t,type:"lut"}}const{pixelBlock:t,isGCS:r,resolution:n,bandIds:o}=e,{rendererJSON:i}=this;return"rasterStretch"===i.type?this._generateStretchWebGLParams(t,i,o):"rasterShadedRelief"===i.type?this._generateShadedReliefWebGLParams(i,r,n??void 0):"vectorField"===i.type?this._generateVectorFieldWebGLParams(i):null}_isLUTChanged(e){if(!this.lookup||!this.lookup.rendererJSON)return!0;if("colorRamp"in this.rendererJSON){const t=this.rendererJSON.colorRamp;return e?JSON.stringify(t)!==JSON.stringify(this.lookup.rendererJSON.colorRamp):(this.rendererJSON,this.lookup.rendererJSON,JSON.stringify(this.rendererJSON)!==JSON.stringify(this.lookup.rendererJSON))}return JSON.stringify(this.rendererJSON)!==JSON.stringify(this.lookup.rendererJSON)}_symbolizeColormap(e){return this._isLUTChanged()&&!this.bind().success?e:(0,c.SJ)(e,this.lookup.colormapLut)}_symbolizeClassBreaks(e){const{canUseIndexedLUT:t}=this._analyzeClassBreaks(this.rendererJSON);return this._isLUTChanged()&&!this.bind().success?e:t?(0,c.SJ)(e,this.lookup.colormapLut):(0,c.zp)(e,this.lookup.remapLut??[])}_symbolizeStretch(e,t){const{rasterInfo:r}=this,{pixelType:n,bandCount:o}=r,i=this.rendererJSON,s=["u8","u16","s8","s16"].includes(n);let a,l;const{dra:u}=i,{gamma:f}=this.lookup;if("histogramEqualization"===i.stretchType){const n=u?null:this.lookup?.histogramLut,o=(0,h.AV)(i,{rasterInfo:r,pixelBlock:e,bandIds:t,returnHistogramLut:!n}),s=(0,h.dy)(e,{...o,gamma:f,isRenderer:!0});l=(0,c.XV)(s,{lut:u?o.histogramLut:n,offset:0})}else if(s){if(u){const o=(0,h.AV)(i,{rasterInfo:r,pixelBlock:e,bandIds:t});a=(0,h.hE)({pixelType:n,...o,gamma:f,rounding:"floor"})}else if(this._isLUTChanged()){if(!this.bind().success)return e;a=this.lookup?this.lookup.stretchLut:null}else a=this.lookup?this.lookup.stretchLut:null;if(!a)return e;o>1&&null!=t&&t.length===e?.pixels.length&&a?.lut.length===o&&(a={lut:t.map((e=>a.lut[e])),offset:a.offset}),l=(0,c.XV)(e,a)}else{const n=(0,h.AV)(i,{rasterInfo:r,pixelBlock:e,bandIds:t});l=(0,h.dy)(e,{...n,gamma:f,isRenderer:!0})}if(i.colorRamp){if(this._isLUTChanged(!0)&&!this.bind().success)return e;l=(0,c.SJ)(l,this.lookup?.colormapLut)}return l}_symbolizeShadedRelief(e,t){const r=this.rendererJSON,n={...r,...t},o=(0,f.vC)(e,n);if(!r.colorRamp)return o;let i;if(this._isLUTChanged(!0)){if(!this.bind().success)return o;i=this.lookup?this.lookup.hsvMap:null}else i=this.lookup?this.lookup.hsvMap:null;if(!i)return o;const s=this.rasterInfo.statistics?.[0]??{min:0,max:8e3};return(0,f.Ub)(o,e,i,s),o}_isVectorFieldData(){const{bandCount:e,dataType:t}=this.rasterInfo;return 2===e&&("vector-magdir"===t||"vector-uv"===t)}_updateVectorFieldRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; VectorFieldRenderer only supports "vector-magdir" and "vector-uv".`}}_updateFlowRenderer(){return this._isVectorFieldData()?{success:!0}:{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; FlowRenderer only supports "vector-magdir" and "vector-uv".`}}_updateUVRenderer(e){const{bandCount:t,attributeTable:r,pixelType:n}=this.rasterInfo,o=e.field1;if(!o)return{success:!1,error:"Unsupported renderer; missing UniqueValueRenderer.field."};const i=e.defaultSymbol,s=1===t&&["u8","s8"].includes(n);if(!(0,p.MG)(this.rasterInfo,o)&&!s)return{success:!1,error:"Unsupported data; UniqueValueRenderer is only supported on single band data with a valid raster attribute table."};const a=[];if(null!=r){const t=r.fields.find((e=>"value"===e.name.toLowerCase()));if(!t)return{success:!1,error:"Unsupported data; the data's raster attribute table does not have a value field."};r.features.forEach((r=>{const n=e.uniqueValueInfos?.find((e=>String(e.value)===String(r.attributes[o]))),s=n?.symbol?.color;s?a.push([r.attributes[t.name]].concat(s)):i&&a.push([r.attributes[t.name]].concat(i.color))}))}else{if("value"!==o.toLowerCase())return{success:!1,error:'Unsupported renderer; UniqueValueRenderer.field must be "Value" when raster attribute table is not availalbe.'};e.uniqueValueInfos?.forEach((e=>{const t=e?.symbol?.color;t?a.push([parseInt(""+e.value,10)].concat(t)):i&&a.push([parseInt(""+e.value,10)].concat(i?.color))}))}if(0===a.length)return{success:!1,error:"Invalid UniqueValueRenderer. Cannot find matching records in the raster attribute table."};const l=(0,c.Pz)({colormap:a});return this.lookup={rendererJSON:e,colormapLut:l},this.canRenderInWebGL=!0,{success:!0}}_updateColormapRenderer(e){if(!(0,p.mO)(this.rasterInfo))return{success:!1,error:"Unsupported data; the data source does not have a colormap."};const t=e.colormapInfos.map((e=>[e.value].concat(e.color))).sort(((e,t)=>e[0]-t[0]));if(!t||0===t.length)return{success:!1,error:"Unsupported renderer; ColormapRenderer must have meaningful colormapInfos."};const r=(0,c.Pz)({colormap:t});return this.lookup={rendererJSON:e,colormapLut:r},this.canRenderInWebGL=!0,{success:!0}}_updateShadedReliefRenderer(e){if(!(0,p.jX)(this.rasterInfo))return{success:!1,error:`Unsupported data type "${this.rasterInfo.dataType}"; ShadedReliefRenderer only supports "elevation", or single band float/s16 data.`};if(e.colorRamp){const t=(0,d.Jw)(e.colorRamp,{interpolateAlpha:!0}),r=(0,c.Pz)({colormap:t}),n=[],i=r.indexedColormap;for(let e=0;e<i.length;e+=4){const t=(0,o._Y)({r:i[e],g:i[e+1],b:i[e+2]});n.push([t.h/60,t.s/100,255*t.v/100])}this.lookup={rendererJSON:e,colormapLut:r,hsvMap:n}}else this.lookup=null;return this.canRenderInWebGL=!0,{success:!0}}_analyzeClassBreaks(e){const{attributeTable:t,pixelType:r}=this.rasterInfo,n=null!=t?t.fields.find((e=>"value"===e.name.toLowerCase())):null,o=null!=t?t.fields.find((t=>t.name.toLowerCase()===e.field.toLowerCase())):null,i=null!=n&&null!==o;return{canUseIndexedLUT:["u8","u16","s8","s16"].includes(r)||i,tableValueField:n,tableBreakField:o}}_updateClassBreaksRenderer(e){const{attributeTable:t}=this.rasterInfo,{canUseIndexedLUT:r,tableValueField:n,tableBreakField:o}=this._analyzeClassBreaks(e),i=e.classBreakInfos;if(!i?.length)return{success:!1,error:"Unsupported renderer; missing or invalid ClassBreaksRenderer.classBreakInfos."};const s=i.sort(((e,t)=>e.classMaxValue-t.classMaxValue)),a=s[s.length-1];let l=e.minValue;if(!r){const t=[];for(let e=0;e<s.length;e++)t.push({value:s[e].classMinValue??l,mappedColor:s[e].symbol.color}),l=s[e].classMaxValue;return t.push({value:a.classMaxValue,mappedColor:a.symbol.color}),this.lookup={rendererJSON:e,remapLut:t},this.canRenderInWebGL=!1,{success:!0}}const u=[];if(null!=t&&null!=n&&null!==o&&n!==o){const r=n.name,i=o.name,a=s[s.length-1],{classMaxValue:c}=a;l=e.minValue;for(const e of t.features){const t=e.attributes[r],n=e.attributes[i],o=n===c?a:n<l?null:s.find((({classMaxValue:e})=>e>n));o&&u.push([t].concat(o.symbol.color))}}else{l=Math.floor(e.minValue);for(let e=0;e<s.length;e++){const t=s[e];for(let e=l;e<t.classMaxValue;e++)u.push([e].concat(t.symbol.color));l=Math.ceil(t.classMaxValue)}a.classMaxValue===l&&u.push([a.classMaxValue].concat(a.symbol.color))}const h=(0,c.Pz)({colormap:u,fillUnspecified:!1});return this.lookup={rendererJSON:e,colormapLut:h},this.canRenderInWebGL=!0,{success:!0}}_isHistogramRequired(e){return"percentClip"===e||"histogramEqualization"===e}_isValidRasterStatistics(e){return null!=e&&e.length>0&&null!=e[0].min&&null!=e[0].max}_updateStretchRenderer(e){let{stretchType:t,dra:r}=e;if(!("none"===t||e.statistics?.length||this._isValidRasterStatistics(this.rasterInfo.statistics)||r))return{success:!1,error:"Unsupported renderer; StretchRenderer.statistics is required when dynamic range adjustment is not used."};const n=e.histograms||this.rasterInfo.histograms;!this._isHistogramRequired(e.stretchType)||n?.length||r||(t="minMax");const{computeGamma:o,useGamma:i,colorRamp:s}=e;let{gamma:a}=e;if(i&&o&&!a?.length){const t=e.statistics?.length?e.statistics:this.rasterInfo.statistics;a=(0,h.ZF)(this.rasterInfo.pixelType,t)}const l=this.rasterInfo.pixelType,u=!r&&["u8","u16","s8","s16"].includes(l);if("histogramEqualization"===t){const t=n.map((e=>(0,h.oc)(e)));this.lookup={rendererJSON:e,histogramLut:t}}else if(u){const t=(0,h.AV)(e,{rasterInfo:this.rasterInfo}),r=(0,h.hE)({pixelType:l,...t,gamma:i?a:null,rounding:"floor"});this.lookup={rendererJSON:e,stretchLut:r}}if(s){const t=(0,d.Jw)(s,{interpolateAlpha:!0});this.lookup||(this.lookup={rendererJSON:e}),this.lookup.colormapLut=(0,c.Pz)({colormap:t}),this.lookup.rendererJSON=e}return this.lookup.gamma=i&&a?.length?a:null,this.canRenderInWebGL=!0,{success:!0}}_generateStretchWebGLParams(e,t,r){let n=null,o=null;const i=this.lookup&&this.lookup.colormapLut;t.colorRamp&&i&&(n=i.indexedColormap,o=i.offset),"histogramEqualization"===t.stretchType&&(t={...t,stretchType:"minMax"});const{gamma:s}=this.lookup,a=!!(t.useGamma&&s&&s.some((e=>1!==e))),{minCutOff:l,maxCutOff:u,outMin:c,outMax:f}=(0,h.AV)(t,{rasterInfo:this.rasterInfo,pixelBlock:e,bandIds:r});let d=0;null!=e&&(d=e.getPlaneCount(),2===d&&((e=e.clone()).statistics=[e.statistics[0]],e.pixels=[e.pixels[0]]));const{bandCount:p}=this.rasterInfo,g=Math.min(3,r?.length||d||p,p),m=new Float32Array(g),y=n||a?1:255;let w;for(w=0;w<l.length;w++)m[w]=u[w]===l[w]?0:(f-c)/(u[w]-l[w])/y;const C=new Float32Array(g);if(a&&s)for(w=0;w<g;w++)s[w]>1?s[w]>2?C[w]=6.5+(s[w]-2)**2.5:C[w]=6.5+100*(2-s[w])**4:C[w]=1;return{bandCount:g,outMin:c/y,outMax:f/y,minCutOff:l,maxCutOff:u,factor:m,useGamma:a,gamma:a?s:[1,1,1],gammaCorrection:a?C:[1,1,1],colormap:n,colormapOffset:o,stretchType:t.stretchType,type:"stretch"}}_generateShadedReliefWebGLParams(e,t=!1,r={x:0,y:0}){let n=null,o=null;const i=this.lookup&&this.lookup.colormapLut;e.colorRamp&&i&&(n=i.indexedColormap,o=i.offset);const s={...e,isGCS:t,resolution:r},a=(0,f.TK)(s),l=this.rasterInfo.statistics?.[0];return{...a,minValue:l?.min??0,maxValue:l?.max??8e3,hillshadeType:"traditional"===e.hillshadeType?0:1,type:"hillshade",colormap:n,colormapOffset:o}}_generateVectorFieldWebGLParams(e){const{style:t,inputUnit:r,outputUnit:n,visualVariables:o,symbolTileSize:i,flowRepresentation:s}=e;let a;const l=this.rasterInfo.statistics?.[0].min??0,u=this.rasterInfo.statistics?.[0].max??50,c=o?.find((e=>"sizeInfo"===e.type))??{type:"sizeInfo",field:"Magnitude",maxDataValue:u,maxSize:.8*i,minDataValue:l,minSize:.2*i},h=c.minDataValue??l,f=c.maxDataValue??u,d=null!=c.maxSize&&null!=c.minSize?[c.minSize/i,c.maxSize/i]:[.2,.8];if("wind_speed"===t){const e=(d[0]+d[1])/2;d[0]=d[1]=e}const p=null!=h&&null!=f?[h,f]:null;if("classified_arrow"===t)if(null!=h&&null!=f&&null!=c){a=[];const e=(c.maxDataValue-c.minDataValue)/5;for(let t=0;t<6;t++)a.push(c.minDataValue+e*t)}else a=[0,1e-6,3.5,7,10.5,14];const g="flow_to"===s==("ocean_current_kn"===t||"ocean_current_m"===t)?0:Math.PI,m=o?.find((e=>"rotationInfo"===e.type));return{breakValues:a,dataRange:p,inputUnit:r,outputUnit:n,symbolTileSize:i,symbolPercentRange:d,style:t||"single_arrow",rotation:g,rotationType:this.rasterInfo.storageInfo?.tileInfo&&"vector-uv"===this.rasterInfo.dataType?"geographic":m?.rotationType||e.rotationType,type:"vectorField"}}};function m(e){return(0,c.nk)(e)&&0!==e.validPixelCount}(0,n._)([(0,a.Cb)({json:{write:!0}})],g.prototype,"rendererJSON",void 0),(0,n._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],g.prototype,"rasterInfo",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],g.prototype,"lookup",void 0),(0,n._)([(0,a.Cb)()],g.prototype,"canRenderInWebGL",void 0),g=(0,n._)([(0,l.j)("esri.renderers.support.RasterSymbolizer")],g);const y=g},93010:(e,t,r)=>{r.d(t,{B4:()=>f,H0:()=>u,Jw:()=>m,Ms:()=>a,Oi:()=>s,Uh:()=>h,XL:()=>g,io:()=>b,pM:()=>y});var n=r(22303),o=r(3892),i=r(35454);const s=["random","ndvi","ndvi2","ndvi3","elevation","gray","hillshade"],a=[{id:"aspect_predefined",type:"multipart",colorRamps:[{fromColor:[190,190,190],toColor:[255,45,8]},{fromColor:[255,45,8],toColor:[255,181,61]},{fromColor:[255,181,61],toColor:[255,254,52]},{fromColor:[255,254,52],toColor:[0,251,50]},{fromColor:[0,251,50],toColor:[255,254,52]},{fromColor:[0,253,255],toColor:[0,181,255]},{fromColor:[0,181,255],toColor:[26,35,253]},{fromColor:[26,35,253],toColor:[255,57,251]},{fromColor:[255,57,251],toColor:[255,45,8]}]},{id:"blackToWhite_predefined",fromColor:[0,0,0],toColor:[255,255,255]},{id:"blueBright_predefined",fromColor:[204,204,255],toColor:[0,0,224]},{id:"blueLightToDark_predefined",fromColor:[211,229,232],toColor:[46,100,140]},{id:"blueGreenBright_predefined",fromColor:[203,245,234],toColor:[48,207,146]},{id:"blueGreenLightToDark_predefined",fromColor:[216,242,237],toColor:[21,79,74]},{id:"brownLightToDark_predefined",fromColor:[240,236,170],toColor:[102,72,48]},{id:"brownToBlueGreenDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[156,85,31],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[33,130,145]}]},{id:"brownToBlueGreenDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[110,70,45],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[48,100,102]}]},{id:"coefficientBias_predefined",fromColor:[214,214,255],toColor:[0,57,148]},{id:"coldToHotDiverging_predefined",type:"multipart",colorRamps:[{fromColor:[69,117,181],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[214,47,39]}]},{id:"conditionNumber_predefined",type:"multipart",colorRamps:[{fromColor:[0,97,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,34,0]}]},{id:"cyanToPurple_predefined",type:"multipart",colorRamps:[{fromColor:[0,245,245],toColor:[0,0,245]},{fromColor:[0,0,245],toColor:[245,0,245]}]},{id:"cyanLightToBlueDark_predefined",type:"multipart",colorRamps:[{fromColor:[182,237,240],toColor:[31,131,224]},{fromColor:[31,131,224],toColor:[9,9,145]}]},{id:"distance_predefined",fromColor:[255,200,0],toColor:[0,0,255]},{id:"elevation1_predefined",type:"multipart",colorRamps:[{fromColor:[175,240,233],toColor:[255,255,179]},{fromColor:[255,255,179],toColor:[0,128,64]},{fromColor:[0,128,64],toColor:[252,186,3]},{fromColor:[252,186,3],toColor:[128,0,0]},{fromColor:[120,0,0],toColor:[105,48,13]},{fromColor:[105,48,13],toColor:[171,171,171]},{fromColor:[171,171,171],toColor:[255,252,255]}]},{id:"elevation2_predefined",type:"multipart",colorRamps:[{fromColor:[118,219,211],toColor:[255,255,199]},{fromColor:[255,255,199],toColor:[255,255,128]},{fromColor:[255,255,128],toColor:[217,194,121]},{fromColor:[217,194,121],toColor:[135,96,38]},{fromColor:[135,96,38],toColor:[150,150,181]},{fromColor:[150,150,181],toColor:[181,150,181]},{fromColor:[181,150,181],toColor:[255,252,255]}]},{id:"errors_predefined",fromColor:[255,235,214],toColor:[196,10,10]},{id:"grayLightToDark_predefined",fromColor:[219,219,219],toColor:[69,69,69]},{id:"greenBright_predefined",fromColor:[204,255,204],toColor:[14,204,14]},{id:"greenLightToDark_predefined",fromColor:[220,245,233],toColor:[34,102,51]},{id:"greenToBlue_predefined",type:"multipart",colorRamps:[{fromColor:[32,204,16],toColor:[0,242,242]},{fromColor:[0,242,242],toColor:[2,33,227]}]},{id:"orangeBright_predefined",fromColor:[255,235,204],toColor:[240,118,5]},{id:"orangeLightToDark_predefined",fromColor:[250,233,212],toColor:[171,65,36]},{id:"partialSpectrum_predefined",type:"multipart",colorRamps:[{fromColor:[242,241,162],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]},{fromColor:[252,3,69],toColor:[176,7,237]},{fromColor:[176,7,237],toColor:[2,29,173]}]},{id:"partialSpectrum1Diverging_predefined",type:"multipart",colorRamps:[{fromColor:[135,38,38],toColor:[240,149,12]},{fromColor:[240,149,12],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[74,80,181]},{fromColor:[74,80,181],toColor:[39,32,122]}]},{id:"partialSpectrum2Diverging_predefined",type:"multipart",colorRamps:[{fromColor:[115,77,42],toColor:[201,137,52]},{fromColor:[201,137,52],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[91,63,176]},{fromColor:[91,63,176],toColor:[81,13,97]}]},{id:"pinkToYellowGreenDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[158,30,113],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[99,110,45]}]},{id:"pinkToYellowGreenDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[97,47,73],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[22,59,15]}]},{id:"precipitation_predefined",type:"multipart",colorRamps:[{fromColor:[194,82,60],toColor:[237,161,19]},{fromColor:[237,161,19],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,219,0]},{fromColor:[0,219,0],toColor:[32,153,143]},{fromColor:[32,153,143],toColor:[11,44,122]}]},{id:"prediction_predefined",type:"multipart",colorRamps:[{fromColor:[40,146,199],toColor:[250,250,100]},{fromColor:[250,250,100],toColor:[232,16,20]}]},{id:"purpleBright_predefined",fromColor:[255,204,255],toColor:[199,0,199]},{id:"purpleToGreenDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[77,32,150],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[20,122,11]}]},{id:"purpleToGreenDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[67,14,89],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[24,79,15]}]},{id:"purpleBlueBright_predefined",fromColor:[223,184,230],toColor:[112,12,242]},{id:"purpleBlueLightToDark_predefined",fromColor:[229,213,242],toColor:[93,44,112]},{id:"purpleRedBright_predefined",fromColor:[255,204,225],toColor:[199,0,99]},{id:"purpleRedLightToDark_predefined",fromColor:[250,215,246],toColor:[143,17,57]},{id:"redBright_predefined",fromColor:[255,204,204],toColor:[219,0,0]},{id:"redLightToDark_predefined",fromColor:[255,224,224],toColor:[143,10,10]},{id:"redToBlueDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[196,69,57],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[48,95,207]}]},{id:"redToBlueDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[107,13,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[13,53,97]}]},{id:"redToGreen_predefined",type:"multipart",colorRamps:[{fromColor:[245,0,0],toColor:[245,245,0]},{fromColor:[245,245,0],toColor:[0,245,0]}]},{id:"redToGreenDivergingBright_predefined",type:"multipart",colorRamps:[{fromColor:[186,20,20],toColor:[255,255,191]},{fromColor:[255,255,191],toColor:[54,145,33]}]},{id:"redToGreenDivergingDark_predefined",type:"multipart",colorRamps:[{fromColor:[97,21,13],toColor:[204,204,102]},{fromColor:[204,204,102],toColor:[16,69,16]}]},{id:"slope_predefined",type:"multipart",colorRamps:[{fromColor:[56,168,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]},{id:"spectrumFullBright_predefined",type:"multipart",colorRamps:[{fromColor:[255,0,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,0,255]}]},{id:"spectrumFullDark_predefined",type:"multipart",colorRamps:[{fromColor:[153,0,0],toColor:[153,153,0]},{fromColor:[153,153,0],toColor:[0,153,153]},{fromColor:[0,153,153],toColor:[0,0,153]}]},{id:"spectrumFullLight_predefined",type:"multipart",colorRamps:[{fromColor:[255,153,153],toColor:[255,255,153]},{fromColor:[255,255,153],toColor:[153,255,255]},{fromColor:[153,255,255],toColor:[153,153,255]}]},{id:"surface_predefined",type:"multipart",colorRamps:[{fromColor:[112,153,89],toColor:[242,238,162]},{fromColor:[242,238,162],toColor:[242,206,133]},{fromColor:[242,206,133],toColor:[194,140,124]},{fromColor:[194,140,124],toColor:[255,242,255]}]},{id:"temperature_predefined",type:"multipart",colorRamps:[{fromColor:[255,252,255],toColor:[255,0,255]},{fromColor:[255,0,255],toColor:[0,0,255]},{fromColor:[0,0,255],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[0,255,0]},{fromColor:[0,255,0],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,128,0]},{fromColor:[255,128,0],toColor:[128,0,0]}]},{id:"whiteToBlack_predefined",fromColor:[255,255,255],toColor:[0,0,0]},{id:"yellowToDarkRed_predefined",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[242,167,46]},{fromColor:[242,167,46],toColor:[107,0,0]}]},{id:"yellowToGreenToDarkBlue_predefined",type:"multipart",colorRamps:[{fromColor:[255,255,128],toColor:[56,224,9]},{fromColor:[56,224,9],toColor:[26,147,171]},{fromColor:[26,147,171],toColor:[12,16,120]}]},{id:"yellowToRed_predefined",fromColor:[245,245,0],toColor:[255,0,0]},{id:"yellowGreenBright_predefined",fromColor:[236,252,204],toColor:[157,204,16]},{id:"yellowGreenLightToDark_predefined",fromColor:[215,240,175],toColor:[96,107,45]}],l={aspect_predefined:"Aspect",blackToWhite_predefined:"Black to White",blueBright_predefined:"Blue Bright",blueLightToDark_predefined:"Blue Light to Dark",blueGreenBright_predefined:"Blue-Green Bright",blueGreenLightToDark_predefined:"Blue-Green Light to Dark",brownLightToDark_predefined:"Brown Light to Dark",brownToBlueGreenDivergingBright_predefined:"Brown to Blue Green Diverging, Bright",brownToBlueGreenDivergingDark_predefined:"Brown to Blue Green Diverging, Dark",coefficientBias_predefined:"Coefficient Bias",coldToHotDiverging_predefined:"Cold to Hot Diverging",conditionNumber_predefined:"Condition Number",cyanToPurple_predefined:"Cyan to Purple",cyanLightToBlueDark_predefined:"Cyan-Light to Blue-Dark",distance_predefined:"Distance",elevation1_predefined:"Elevation #1",elevation2_predefined:"Elevation #2",errors_predefined:"Errors",grayLightToDark_predefined:"Gray Light to Dark",greenBright_predefined:"Green Bright",greenLightToDark_predefined:"Green Light to Dark",greenToBlue_predefined:"Green to Blue",orangeBright_predefined:"Orange Bright",orangeLightToDark_predefined:"Orange Light to Dark",partialSpectrum_predefined:"Partial Spectrum",partialSpectrum1Diverging_predefined:"Partial Spectrum 1 Diverging",partialSpectrum2Diverging_predefined:"Partial Spectrum 2 Diverging",pinkToYellowGreenDivergingBright_predefined:"Pink to YellowGreen Diverging, Bright",pinkToYellowGreenDivergingDark_predefined:"Pink to YellowGreen Diverging, Dark",precipitation_predefined:"Precipitation",prediction_predefined:"Prediction",purpleBright_predefined:"Purple Bright",purpleToGreenDivergingBright_predefined:"Purple to Green Diverging, Bright",purpleToGreenDivergingDark_predefined:"Purple to Green Diverging, Dark",purpleBlueBright_predefined:"Purple-Blue Bright",purpleBlueLightToDark_predefined:"Purple-Blue Light to Dark",purpleRedBright_predefined:"Purple-Red Bright",purpleRedLightToDark_predefined:"Purple-Red Light to Dark",redBright_predefined:"Red Bright",redLightToDark_predefined:"Red Light to Dark",redToBlueDivergingBright_predefined:"Red to Blue Diverging, Bright",redToBlueDivergingDark_predefined:"Red to Blue Diverging, Dark",redToGreen_predefined:"Red to Green",redToGreenDivergingBright_predefined:"Red to Green Diverging, Bright",redToGreenDivergingDark_predefined:"Red to Green Diverging, Dark",slope_predefined:"Slope",spectrumFullBright_predefined:"Spectrum-Full Bright",spectrumFullDark_predefined:"Spectrum-Full Dark",spectrumFullLight_predefined:"Spectrum-Full Light",surface_predefined:"Surface",temperature_predefined:"Temperature",whiteToBlack_predefined:"White to Black",yellowToDarkRed_predefined:"Yellow to Dark Red",yellowToGreenToDarkBlue_predefined:"Yellow to Green to Dark Blue",yellowToRed_predefined:"Yellow to Red",yellowGreenBright_predefined:"Yellow-Green Bright",yellowGreenLightToDark_predefined:"Yellow-Green Light to Dark"},u=new i.X({Aspect:"aspect","Black to White":"black-to-white","Blue Bright":"blue-bright","Blue Light to Dark":"blue-light-to-dark","Blue-Green Bright":"blue-green-bright","Blue-Green Light to Dark":"blue-green-light-to-dark","Brown Light to Dark":"brown-light-to-dark","Brown to Blue Green Diverging, Bright":"brown-to-blue-green-diverging-right","Brown to Blue Green Diverging, Dark":"brown-to-blue-green-diverging-dark","Coefficient Bias":"coefficient-bias","Cold to Hot Diverging":"cold-to-hot-diverging","Condition Number":"condition-number","Cyan to Purple":"cyan-to-purple","Cyan-Light to Blue-Dark":"cyan-light-to-blue-dark",Distance:"distance","Elevation #1":"elevation1","Elevation #2":"elevation2",Errors:"errors","Gray Light to Dark":"gray-light-to-dark","Green Bright":"green-bright","Green Light to Dark":"green-light-to-dark","Green to Blue":"green-to-blue","Orange Bright":"orange-bright","Orange Light to Dark":"orange-light-to-dark","Partial Spectrum":"partial-spectrum","Partial Spectrum 1 Diverging":"partial-spectrum-1-diverging","Partial Spectrum 2 Diverging":"partial-spectrum-2-diverging","Pink to YellowGreen Diverging, Bright":"pink-to-yellow-green-diverging-bright","Pink to YellowGreen Diverging, Dark":"pink-to-yellow-green-diverging-dark",Precipitation:"precipitation",Prediction:"prediction","urple Bright":"purple-bright","Purple to Green Diverging, Bright":"purple-to-green-diverging-bright","Purple to Green Diverging, Dark":"purple-to-green-diverging-dark","Purple-Blue Bright":"purple-blue-bright","Purple-Blue Light to Dark":"purple-blue-light-to-dark","Purple-Red Bright":"purple-red-bright","Purple-Red Light to Dark":"purple-red-light-to-dark","Red Bright":"red-bright","Red Light to Dark":"red-light-to-dark","Red to Blue Diverging, Bright":"red-to-blue-diverging-bright","Red to Blue Diverging, Dark":"red-to-blue-diverging-dark","Red to Green":"red-to-green","Red to Green Diverging, Bright":"red-to-green-diverging-bright","Red to Green Diverging, Dark":"red-to-green-diverging-dark",Slope:"slope","Spectrum-Full Bright":"spectrum-full-bright","Spectrum-Full Dark":"spectrum-full-dark","Spectrum-Full Light":"spectrum-full-light",Surface:"surface",Temperature:"temperature","White to Black":"white-to-black","Yellow to Dark Red":"yellow-to-dark-red","Yellow to Green to Dark Blue":"yellow-to-green-to-dark-blue","Yellow to Red":"yellow-to-red","Yellow-Green Bright":"yellow-green-bright","Yellow-Green Light to Dark":"yellow-green-light-to-dark"});function c(e,t){if(!e||!t||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]>t[r]+2||e[r]<t[r]-2)return!1;return!0}function h(e){const t=function(e,t){if(!e)return;const r=a;let o=null;return"algorithmic"===e.type?r.some((t=>{if(c(e.fromColor.toRgb(),t.fromColor)&&c(e.toColor.toRgb(),t.toColor))return o=t.id,!0})):"multipart"===e.type&&r.some((t=>{const r=e.colorRamps,i=t.colorRamps;if(r&&i&&r.length===i.length&&!i.some(((e,t)=>{if(!c(r[t].fromColor.toRgb(),new n.Z(e.fromColor).toRgb())||!c(r[t].toColor.toRgb(),new n.Z(e.toColor).toRgb()))return!0}))){if(o)return!0;o=t.id}})),o}(e);return t?l[t]:null}function f(e){const t=u.toJSON(e),r=Object.entries(l).find((e=>e[1]===t))?.[0],n=a.find((e=>e.id===r));return n?n.colorRamps?{type:"multipart",colorRamps:n.colorRamps.map((e=>({type:"algorithmic",algorithm:"esriCIELabAlgorithm",fromColor:e.fromColor,toColor:e.toColor})))}:{type:"algorithmic",algorithm:"esriCIELabAlgorithm",fromColor:n.fromColor,toColor:n.toColor}:null}function d(e){const t=(e=e||{}).numColors||256,r=e.distanceOffset||0,n=null!=e.isCustomInterval?e.isCustomInterval:null!==e.distanceInterval&&e.distanceInterval!==1/(t-1),o=e.distanceInterval||1/(t-1);return{...e,numColors:t,distanceOffset:r,interpolateAlpha:!!e.interpolateAlpha,distanceInterval:o,isCustomInterval:n,weights:e.weights}}function p(e,t){let{fromColor:r,toColor:n}=e;3===r.length&&(r=r.concat([255])),3===n.length&&(n=n.concat([255]));const i=e.algorithm||"esriCIELabAlgorithm",s=d(t),{numColors:a,distanceOffset:l,isCustomInterval:u,interpolateAlpha:c}=s;if(1===a&&0===l)return[r];if(2===a&&0===l&&!u)return[r,n];const h={r:r[0],g:r[1],b:r[2]},f={r:n[0],g:n[1],b:n[2]},p="esriCIELabAlgorithm"===i?function(e,t,r){const{numColors:n,distanceOffset:o,distanceInterval:i,isCustomInterval:s}=r;let{l:a,a:l,b:u}=e;const c=(t.l-a)*i,h=(t.a-l)*i,f=(t.b-u)*i,d=[];if(o){const e=o/i;a+=e*c,l+=e*h,u+=e*f}for(let e=0;e<n-1;e++)d.push({l:a,a:l,b:u}),a+=c,l+=h,u+=f;return d.push(s?{l:a,a:l,b:u}:t),d}((0,o.Y3)(h),(0,o.Y3)(f),s):"esriHSVAlgorithm"===i?function(e,t,r){const{numColors:n,distanceOffset:o,distanceInterval:i,isCustomInterval:s}=r,a=0===e.s,l=0===t.s;let u=e.h,c=t.h;a&&!l?u=c:l&&!a&&(t={...t,h:u},c=u);let h,f=Math.abs(c-u);const d=360;f<180?h=(c-u)*i:(f=d-f,h=u>c?f*i:-f*i);const p=(t.s-e.s)*i,g=(t.v-e.v)*i;let{s:m,v:y}=e,w=u;if(o){const e=o/i;w=(w+e*h+d)%d,m+=e*p,y+=e*g}const C=[];for(let e=0;e<n-1;e++)C.push({h:w,s:m,v:y}),w=(w+h+d)%d,m+=p,y+=g;return C.push(s?{h:w,s:m,v:y}:t),C}((0,o._Y)(h),(0,o._Y)(f),s):function(e,t,r){const{numColors:n,distanceOffset:o,distanceInterval:i,isCustomInterval:s}=r,a=e.h,l=t.h,u=2*Math.PI;let c;if(a<=l){const e=l-a,t=l-a-u;c=Math.abs(t)<Math.abs(e)?t:e}else{const e=l+u-a,t=l-a;c=Math.abs(t)<Math.abs(e)?t:e}const h=c*i,f=(t.l-e.l)*i,d=(t.c-e.c)*i;let{l:p,c:g,h:m}=e;if(o){const e=o/i;p+=e*f,g+=e*d,m=(m+e*h+u)%u}const y=[];for(let e=0;e<n-1;e++)y.push({l:p,c:g,h:m}),p+=f,g+=d,m=(m+h+u)%u;return y.push(s?{l:p,c:g,h:m}:t),y}((0,o.sJ)(h),(0,o.sJ)(f),s),g=[],m=r[3]??255,y=((n[3]??255)-m)/(a-1);for(let e=0;e<a;e++){const{r:t,g:r,b:n}=(0,o.xr)(p[e]),i=c?Math.round(m+y*e):255;g.push([t,r,n,i])}return g}function g(e,t){const r="toJSON"in e?e.toJSON():e;return"multipart"===r.type?function(e,t){const{numColors:r,interpolateAlpha:n}=d(t);let o=t?.weights;const{colorRamps:i}=e;if(o){const e=o.reduce(((e,t)=>e+t));o=o.map((t=>t/e))}else{o=[];for(let e=0;e<i.length;e++)o[e]=1/i.length}const s=[];let a=0,l=0;const u=1/(r-1);let c=!1;for(let e=0;e<i.length;e++){let t=c?0:a*u-l,h=e===i.length-1?r-1-a:(o[e]-t)/u;if(c=Math.ceil(h)===h,h=Math.ceil(h),0===h)continue;t/=o[e];const f=p(i[e],{numColors:h,interpolateAlpha:n,distanceOffset:t,distanceInterval:u/o[e]});a+=f.length,s.push(...f),l+=o[e]}const h=[...i[i.length-1].toColor];return 3===h.length&&h.push(255),s.push(h),s}(r,t):p(r,t)}function m(e,t){const r=g(e,t),n=t?.interpolateAlpha;return r.forEach(((e,t)=>{e.unshift(t),n||e.pop()})),r}function y(e){const t=h(e);if(e){if("algorithmic"===e.type)return{...w(e),Name:t};if(e.colorRamps){const r=e.colorRamps.map(w);return{type:"MultiPartColorRamp",NumColorRamps:r.length,ArrayOfColorRamp:r,Name:t}}}}function w(e){if(!e)return;const t=e.toJSON();return{Algorithm:t?.Algorithm||"esriHSVAlgorithm",type:"AlgorithmicColorRamp",FromColor:C(e.fromColor),ToColor:C(e.toColor)}}function C(e){const t=(0,o._Y)(e);return{type:"HsvColor",Hue:t.h,Saturation:t.s,Value:t.v,AlphaValue:255}}function b(e){const t=e.reverse().map((e=>{const t=e.toString(16);return t.length<2?"0"+t:t}));return 4294967295&Number.parseInt(t.join(""),16)}},12163:(e,t,r)=>{function n(e,t){const{attributeTable:r,bandCount:n}=e;return!((null!=r||(o=e,!["u8","s8"].includes(o.pixelType)||null==o.statistics?.[0]?.min||null==o.statistics[0]?.max||1!==o.bandCount))&&(null==r||n>1||t&&null==r.fields.find((e=>e.name.toLowerCase()===t.toLowerCase()))));var o}function o(e){const{bandCount:t,dataType:r,pixelType:n}=e;return"elevation"===r||"generic"===r&&1===t&&("s16"===n||"s32"===n||"f32"===n||"f64"===n)}function i(e,t=!1){const{bandCount:r,colormap:n,pixelType:o}=e;return 1===r&&(!!n?.length||!t&&"u8"===o)}function s(e,t=!1){const{attributeTable:r,bandCount:n}=e;return 1===n&&(!t||null!=r||null!=e.histograms)}function a(e){const{dataType:t}=e;return"vector-uv"===t||"vector-magdir"===t}function l(e){const{dataType:t}=e;return"vector-uv"===t||"vector-magdir"===t}r.d(t,{LV:()=>a,MG:()=>n,aG:()=>l,fI:()=>s,jX:()=>o,mO:()=>i})},75509:(e,t,r)=>{r.d(t,{J:()=>o,v:()=>n});const n=new(r(35454).X)({none:"none",standardDeviation:"standard-deviation",histogramEqualization:"histogram-equalization",minMax:"min-max",percentClip:"percent-clip",sigmoid:"sigmoid"}),o={0:"none",3:"standardDeviation",4:"histogramEqualization",5:"minMax",6:"percentClip",9:"sigmoid"}},23808:(e,t,r)=>{r.d(t,{GE:()=>u}),r(66577);var n=r(80442),o=r(92604),i=(r(22021),r(95330)),s=r(77734);r(8744),r(6570);const a=o.Z.getLogger("esri.views.2d.engine.flow.dataUtils"),l=10;async function u(e,t,r,o){const u=performance.now(),c=function(e,t){const r=function(e,t,r,n){if(0===n)return e;const o=Math.round(3*n),i=new Array(2*o+1);let s=0;for(let e=-o;e<=o;e++){const t=Math.exp(-e*e/(n*n));i[e+o]=t,s+=t}for(let e=-o;e<=o;e++)i[e+o]/=s;const a=new Float32Array(e.length);for(let n=0;n<r;n++)for(let r=0;r<t;r++){let s=0,l=0;for(let a=-o;a<=o;a++){if(r+a<0||r+a>=t)continue;const u=i[a+o];s+=u*e[2*(n*t+(r+a))],l+=u*e[2*(n*t+(r+a))+1]}a[2*(n*t+r)]=s,a[2*(n*t+r)+1]=l}const l=new Float32Array(e.length);for(let e=0;e<t;e++)for(let n=0;n<r;n++){let s=0,u=0;for(let l=-o;l<=o;l++){if(n+l<0||n+l>=r)continue;const c=i[l+o];s+=c*a[2*((n+l)*t+e)],u+=c*a[2*((n+l)*t+e)+1]}l[2*(n*t+e)]=s,l[2*(n*t+e)+1]=u}return l}(t.data,t.width,t.height,e.smoothing);return e.interpolate?(e,n)=>{const o=Math.floor(e),i=Math.floor(n);if(o<0||o>=t.width)return[0,0];if(i<0||i>=t.height)return[0,0];const s=e-o,a=n-i,l=o,u=i,c=o<t.width-1?o+1:o,h=i<t.height-1?i+1:i,f=r[2*(u*t.width+l)],d=r[2*(u*t.width+c)],p=r[2*(h*t.width+l)],g=r[2*(h*t.width+c)],m=r[2*(u*t.width+l)+1],y=r[2*(u*t.width+c)+1];return[(f*(1-a)+p*a)*(1-s)+(d*(1-a)+g*a)*s,(m*(1-a)+r[2*(h*t.width+l)+1]*a)*(1-s)+(y*(1-a)+r[2*(h*t.width+c)+1]*a)*s]}:(e,n)=>{const o=Math.round(e),i=Math.round(n);return o<0||o>=t.width||i<0||i>=t.height?[0,0]:[r[2*(i*t.width+o)],r[2*(i*t.width+o)+1]]}}(t,r),f=performance.now(),d=h(t,c,r.width,r.height),p=performance.now(),g=function(e,t){const r=new s.Z,n=e.reduce(((e,t)=>e+t.length),0),o=new Float32Array(4*n),i=new Array(e.length);let a=0,l=0;for(const t of e){const e=a;for(const e of t)o[4*a]=e.x,o[4*a+1]=e.y,o[4*a+2]=e.t,o[4*a+3]=e.speed,a++;i[l++]={startVertex:e,numberOfVertices:t.length,totalTime:t[t.length-1].t,timeSeed:r.getFloat()}}return{lineVertices:o,lineDescriptors:i}}(d),m=performance.now(),y="Streamlines"===e?function(e,t){const{lineVertices:r,lineDescriptors:n}=e;let o=0,i=0;for(const e of n)o+=2*e.numberOfVertices,i+=6*(e.numberOfVertices-1);const s=new Float32Array(9*o),a=new Uint32Array(i);let l=0,u=0;function c(){a[u++]=l-2,a[u++]=l,a[u++]=l-1,a[u++]=l,a[u++]=l+1,a[u++]=l-1}function h(e,t,r,n,o,i,a,u){const c=9*l;let h=0;s[c+h++]=e,s[c+h++]=t,s[c+h++]=1,s[c+h++]=r,s[c+h++]=i,s[c+h++]=a,s[c+h++]=n/2,s[c+h++]=o/2,s[c+h++]=u,l++,s[c+h++]=e,s[c+h++]=t,s[c+h++]=-1,s[c+h++]=r,s[c+h++]=i,s[c+h++]=a,s[c+h++]=-n/2,s[c+h++]=-o/2,s[c+h++]=u,l++}for(const e of n){const{totalTime:n,timeSeed:o}=e;let i=null,s=null,a=null,l=null,u=null,f=null;for(let d=0;d<e.numberOfVertices;d++){const p=r[4*(e.startVertex+d)],g=r[4*(e.startVertex+d)+1],m=r[4*(e.startVertex+d)+2],y=r[4*(e.startVertex+d)+3];let w=null,C=null,b=null,v=null;if(d>0){w=p-i,C=g-s;const e=Math.sqrt(w*w+C*C);if(w/=e,C/=e,d>1){let e=w+u,r=C+f;const n=Math.sqrt(e*e+r*r);e/=n,r/=n;const o=Math.min(1/(e*w+r*C),t);e*=o,r*=o,b=-r,v=e}else b=-C,v=w;null!==b&&null!==v&&(h(i,s,a,b,v,n,o,y),c())}i=p,s=g,a=m,u=w,f=C,l=y}h(i,s,a,-f,u,n,o,l)}return{vertexData:s,indexData:a}}(g,l):function(e){const t=16,r=1,n=2,{lineVertices:o,lineDescriptors:i}=e;let s=0,a=0;for(const e of i){const t=e.numberOfVertices-1;s+=4*t*2,a+=6*t*2}const l=new Float32Array(s*t),u=new Uint32Array(a);let c,h,f,d,p,g,m,y,w,C,b,v,x,k,T=0,A=0;function S(){u[A++]=T-8,u[A++]=T-7,u[A++]=T-6,u[A++]=T-7,u[A++]=T-5,u[A++]=T-6,u[A++]=T-4,u[A++]=T-3,u[A++]=T-2,u[A++]=T-3,u[A++]=T-1,u[A++]=T-2}function I(e,o,i,s,a,u,c,h,f,d,p,g,m,y){const w=T*t;let C=0;for(const t of[r,n])for(const r of[1,2,3,4])l[w+C++]=e,l[w+C++]=o,l[w+C++]=i,l[w+C++]=s,l[w+C++]=c,l[w+C++]=h,l[w+C++]=f,l[w+C++]=d,l[w+C++]=t,l[w+C++]=r,l[w+C++]=m,l[w+C++]=y,l[w+C++]=a/2,l[w+C++]=u/2,l[w+C++]=p/2,l[w+C++]=g/2,T++}function M(e,t){let r=w+b,n=C+v;const o=Math.sqrt(r*r+n*n);r/=o,n/=o;const i=w*r+C*n;r/=i,n/=i;let s=b+x,a=v+k;const l=Math.sqrt(s*s+a*a);s/=l,a/=l;const u=b*s+v*a;s/=u,a/=u,I(c,h,f,d,-n,r,p,g,m,y,-a,s,e,t),S()}function P(e,t,r,n,o,i){if(w=b,C=v,b=x,v=k,null==w&&null==C&&(w=b,C=v),null!=p&&null!=g){x=e-p,k=t-g;const r=Math.sqrt(x*x+k*k);x/=r,k/=r}null!=w&&null!=C&&M(o,i),c=p,h=g,f=m,d=y,p=e,g=t,m=r,y=n}function D(e,t){w=b,C=v,b=x,v=k,null==w&&null==C&&(w=b,C=v),null!=w&&null!=C&&M(e,t)}for(const e of i){c=null,h=null,f=null,d=null,p=null,g=null,m=null,y=null,w=null,C=null,b=null,v=null,x=null,k=null;const{totalTime:t,timeSeed:r}=e;for(let n=0;n<e.numberOfVertices;n++)P(o[4*(e.startVertex+n)],o[4*(e.startVertex+n)+1],o[4*(e.startVertex+n)+2],o[4*(e.startVertex+n)+3],t,r);D(t,r)}return{vertexData:l,indexData:u}}(g),w=performance.now();return(0,n.Z)("esri-2d-profiler")&&(a.info("I.1","_createFlowFieldFromData (ms)",Math.round(f-u)),a.info("I.2","_getStreamlines (ms)",Math.round(p-f)),a.info("I.3","createAnimatedLinesData (ms)",Math.round(m-p)),a.info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(w-m)),a.info("I.5","createFlowMesh (ms)",Math.round(w-u)),a.info("I.6","Mesh size (bytes)",y.vertexData.buffer.byteLength+y.indexData.buffer.byteLength)),await Promise.resolve(),(0,i.k_)(o),y}function c(e,t,r,n,o,i,s,a,l){const u=[];let c=r,h=n,f=0,[d,p]=t(c,h);d*=e.velocityScale,p*=e.velocityScale;const g=Math.sqrt(d*d+p*p);let m,y;u.push({x:c,y:h,t:f,speed:g});for(let r=0;r<e.verticesPerLine;r++){let[r,n]=t(c,h);r*=e.velocityScale,n*=e.velocityScale;const d=Math.sqrt(r*r+n*n);if(d<e.minSpeedThreshold)return u;const p=r/d,g=n/d;if(c+=p*e.segmentLength,h+=g*e.segmentLength,f+=e.segmentLength/d,Math.acos(p*m+g*y)>e.maxTurnAngle)return u;if(e.collisions){const e=Math.round(c*l),t=Math.round(h*l);if(e<0||e>s-1||t<0||t>a-1)return u;const r=i[t*s+e];if(-1!==r&&r!==o)return u;i[t*s+e]=o}u.push({x:c,y:h,t:f,speed:d}),m=p,y=g}return u}function h(e,t,r,n){const o=[],i=new s.Z,a=1/Math.max(e.lineCollisionWidth,1),l=Math.round(r*a),u=Math.round(n*a),h=new Int32Array(l*u);for(let e=0;e<h.length;e++)h[e]=-1;const f=[];for(let t=0;t<n;t+=e.lineSpacing)for(let n=0;n<r;n+=e.lineSpacing)f.push({x:n,y:t,sort:i.getFloat()});f.sort(((e,t)=>e.sort-t.sort));for(const{x:r,y:n}of f)if(i.getFloat()<e.density){const i=c(e,t,r,n,o.length,h,l,u,a);if(i.length<2)continue;o.push(i)}return o}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1423],{88669:(e,t,i)=>{function s(){return[0,0,0,0]}function r(e,t,i,s){return[e,t,i,s]}function o(e,t){return new Float64Array(e,t,4)}function n(){return r(1,1,1,1)}function l(){return r(1,0,0,0)}function a(){return r(0,1,0,0)}function u(){return r(0,0,1,0)}function p(){return r(0,0,0,1)}i.d(t,{a:()=>o,c:()=>s,f:()=>r});const c=n(),d=l(),y=a(),h=u(),b=p();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_W:b,UNIT_X:d,UNIT_Y:y,UNIT_Z:h,ZEROS:[0,0,0,0],clone:function(e){return[e[0],e[1],e[2],e[3]]},create:s,createView:o,fromArray:function(e){const t=[0,0,0,0],i=Math.min(4,e.length);for(let s=0;s<i;++s)t[s]=e[s];return t},fromValues:r,ones:n,unitW:p,unitX:l,unitY:a,unitZ:u,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},13867:(e,t,i)=>{i.d(t,{Z:()=>r});var s=i(69801);class r{constructor(e,t){this._storage=new s.WJ,this._storage.maxSize=e,t&&this._storage.registerRemoveFunc("",t)}put(e,t,i){this._storage.put(e,t,i,1)}pop(e){return this._storage.pop(e)}get(e){return this._storage.get(e)}clear(){this._storage.clearAll()}destroy(){this._storage.destroy()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}}},60235:(e,t,i)=>{i.d(t,{Mr:()=>n,x9:()=>l});var s=i(80442);const r=new Set;function o(e,t,i=!1){i&&r.has(t)||(i&&r.add(t),e.warn(`🛑 DEPRECATED - ${t}`))}function n(e,t,i={}){if((0,s.Z)("esri-deprecation-warnings")){const{moduleName:s}=i;l(e,"Property: "+(s?s+"::":"")+t,i)}}function l(e,t,i={}){if((0,s.Z)("esri-deprecation-warnings")){const{replacement:s,version:r,see:n,warnOnce:l}=i;let a=t;s&&(a+=`\n\t🛠️ Replacement: ${s}`),r&&(a+=`\n\t⚙️ Version: ${r}`),n&&(a+=`\n\t🔗 See ${n} for more details.`),o(e,a,l)}}},12501:(e,t,i)=>{i.d(t,{Z:()=>h});var s,r=i(43697),o=i(22974),n=i(5600),l=(i(75215),i(52011)),a=i(30556),u=i(35671),p=i(5499),c=i(41733),d=i(84475);let y=s=class extends((0,c.W)(p.Z)){constructor(e){super(e),this.config=null,this.fieldMap=null,this.scaleExpression=null,this.scaleExpressionTitle=null,this.url=null,this.type="dictionary"}get _loader(){return new d.DictionaryLoader(this.url,this.config,this.fieldMap)}writeData(e,t){e&&(t.scalingExpressionInfo={expression:e,returnType:"number"})}writeVisualVariables(e,t,i,s){s?.origin||super.writeVisualVariables(e,t,i,s)}clone(){return new s({config:(0,o.d9)(this.config),scaleExpression:this.scaleExpression,scaleExpressionTitle:this.scaleExpressionTitle,fieldMap:(0,o.d9)(this.fieldMap),url:(0,o.d9)(this.url),visualVariables:(0,o.d9)(this.visualVariables)})}async getSymbolAsync(e,t){return this._loader.getSymbolAsync(e,t)}async collectRequiredFields(e,t){await this.collectVVRequiredFields(e,t),this.scaleExpression&&await(0,u.io)(e,t,this.scaleExpression);for(const i in this.fieldMap){const s=this.fieldMap[i];t.has(s)&&e.add(s)}}get arcadeRequired(){return!0}getSymbol(){return null}getSymbols(){return[]}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce(((e,t)=>e+t.getAttributeHash()),"")}getMeshHash(){return`${this.url}-${JSON.stringify(this.fieldMap)}`}getSymbolFields(){return this._loader.getSymbolFields()}};(0,r._)([(0,n.Cb)({type:d.DictionaryLoader})],y.prototype,"_loader",null),(0,r._)([(0,n.Cb)({type:Object,json:{read:{source:"configuration"},write:{target:"configuration"}}})],y.prototype,"config",void 0),(0,r._)([(0,n.Cb)({type:Object,json:{write:!0}})],y.prototype,"fieldMap",void 0),(0,r._)([(0,n.Cb)({type:String,json:{read:{source:"scalingExpressionInfo.expression"},write:!0}})],y.prototype,"scaleExpression",void 0),(0,r._)([(0,a.c)("scaleExpression")],y.prototype,"writeData",null),(0,r._)([(0,n.Cb)({type:String,json:{read:{source:"scalingExpressionInfo.title"},write:{target:"scalingExpressionInfo.title",overridePolicy(e){return{enabled:!!e&&!!this.scaleExpression}}}}})],y.prototype,"scaleExpressionTitle",void 0),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],y.prototype,"url",void 0),(0,r._)([(0,a.c)("visualVariables")],y.prototype,"writeVisualVariables",null),y=s=(0,r._)([(0,l.j)("esri.renderers.DictionaryRenderer")],y);const h=y},28756:(e,t,i)=>{i.d(t,{Z:()=>v});var s,r=i(43697),o=i(22303),n=i(22974),l=i(5600),a=(i(75215),i(36030)),u=i(52011),p=i(35671),c=i(5499),d=i(41733),y=i(79887),h=i(96674);i(67676),i(80442);let b=s=class extends h.wq{constructor(){super(...arguments),this.unit=null}clone(){return new s({unit:this.unit})}};(0,r._)([(0,l.Cb)({type:String,json:{write:!0}})],b.prototype,"unit",void 0),b=s=(0,r._)([(0,u.j)("esri.renderers.support.DotDensityLegendOptions")],b);const m=b;var f,g=i(20256),_=i(4095);let w=f=class extends((0,d.W)(c.Z)){constructor(e){super(e),this.attributes=null,this.backgroundColor=new o.Z([0,0,0,0]),this.dotBlendingEnabled=!0,this.dotShape="square",this.dotSize=1,this.legendOptions=null,this.outline=new _.Z,this.dotValue=null,this.referenceScale=null,this.seed=1,this.type="dot-density"}calculateDotValue(e){if(null==this.referenceScale)return this.dotValue;const t=e/this.referenceScale*this.dotValue;return t<1?1:t}getSymbol(){return new g.Z({outline:this.outline})}async getSymbolAsync(){return this.getSymbol()}getSymbols(){return[this.getSymbol()]}getAttributeHash(){return this.attributes?.reduce(((e,t)=>e+t.getAttributeHash()),"")??""}getMeshHash(){return JSON.stringify(this.outline)}clone(){return new f({attributes:(0,n.d9)(this.attributes),backgroundColor:(0,n.d9)(this.backgroundColor),dotBlendingEnabled:(0,n.d9)(this.dotBlendingEnabled),dotShape:(0,n.d9)(this.dotShape),dotSize:(0,n.d9)(this.dotSize),dotValue:(0,n.d9)(this.dotValue),legendOptions:(0,n.d9)(this.legendOptions),outline:(0,n.d9)(this.outline),referenceScale:(0,n.d9)(this.referenceScale),visualVariables:(0,n.d9)(this.visualVariables),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})}getControllerHash(){const e=this.attributes?.map((e=>e.field||e.valueExpression||""));return`${e}-${this.outline&&JSON.stringify(this.outline.toJSON())||""}`}async collectRequiredFields(e,t){await this.collectVVRequiredFields(e,t);for(const i of this.attributes??[])i.valueExpression&&await(0,p.io)(e,t,i.valueExpression),i.field&&e.add(i.field)}};(0,r._)([(0,l.Cb)({type:[y.Z],json:{write:!0}})],w.prototype,"attributes",void 0),(0,r._)([(0,l.Cb)({type:o.Z,json:{write:!0}})],w.prototype,"backgroundColor",void 0),(0,r._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],w.prototype,"dotBlendingEnabled",void 0),(0,r._)([(0,l.Cb)({type:String,json:{write:!1}})],w.prototype,"dotShape",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],w.prototype,"dotSize",void 0),(0,r._)([(0,l.Cb)({type:m,json:{write:!0}})],w.prototype,"legendOptions",void 0),(0,r._)([(0,l.Cb)({type:_.Z,json:{default:null,write:!0}})],w.prototype,"outline",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],w.prototype,"dotValue",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],w.prototype,"referenceScale",void 0),(0,r._)([(0,l.Cb)({type:Number,json:{write:!0}})],w.prototype,"seed",void 0),(0,r._)([(0,a.J)({dotDensity:"dot-density"})],w.prototype,"type",void 0),w=f=(0,r._)([(0,u.j)("esri.renderers.DotDensityRenderer")],w);const v=w},92271:(e,t,i)=>{i.d(t,{Z:()=>D});var s,r=i(43697),o=i(22303),n=(i(9790),i(60235)),l=i(22974),a=i(92604),u=i(1654),p=i(62357),c=i(5600),d=i(75215),y=i(1153),h=i(36030),b=i(52011),m=i(35671),f=i(5499),g=i(69237),_=i(96674);i(67676),i(80442);let w=s=class extends _.wq{constructor(e){super(e),this.color=null,this.ratio=null}clone(){return new s({color:this.color,ratio:this.ratio})}};(0,r._)([(0,c.Cb)({type:o.Z,json:{type:[d.z8],default:null,write:!0}})],w.prototype,"color",void 0),(0,r._)([(0,c.Cb)({type:Number,json:{write:!0}})],w.prototype,"ratio",void 0),w=s=(0,r._)([(0,b.j)("esri.renderers.support.HeatmapColorStop")],w);const v=w;var x=i(2368);let S=class extends((0,x.J)(_.wq)){constructor(){super(...arguments),this.minLabel=null,this.maxLabel=null,this.title=null}};(0,r._)([(0,c.Cb)({type:String,json:{write:!0}})],S.prototype,"minLabel",void 0),(0,r._)([(0,c.Cb)({type:String,json:{write:!0}})],S.prototype,"maxLabel",void 0),(0,r._)([(0,c.Cb)({type:String,json:{write:!0}})],S.prototype,"title",void 0),S=(0,r._)([(0,b.j)("esri.renderers.support.HeatmapLegendOptions")],S);var C,j=i(73572),I=i(77987);const Z="esri.renderers.HeatmapRenderer",P=a.Z.getLogger(Z);function M(e){if(null!=e){const{maxDensity:t,minDensity:i,radius:s}=e;if(null!=t||null!=i||null!=s){const{blurRadius:t,maxPixelIntensity:i,minPixelIntensity:s,...r}=e;return r}}return e}let E=C=class extends f.Z{constructor(e){super(e),this.authoringInfo=null,this.colorStops=[new v({ratio:0,color:new o.Z("rgba(255, 140, 0, 0)")}),new v({ratio:.75,color:new o.Z("rgba(255, 140, 0, 1)")}),new v({ratio:.9,color:new o.Z("rgba(255, 0, 0, 1)")})],this.field=null,this.fieldOffset=0,this.legendOptions=null,this.maxDensity=.04,this.minDensity=0,this.radius=18,this.referenceScale=0,this.type="heatmap",this.valueExpression=null,this.valueExpressionTitle=null,this._warnedProps={blurRadius:!1,maxPixelIntensity:!1,minPixelIntensity:!1}}normalizeCtorArgs(e){return M(e)}get blurRadius(){return(0,j.AJ)(this.radius)}set blurRadius(e){const t=this.maxPixelIntensity,i=this.minPixelIntensity;this._set("radius",(0,j.k0)(e)),this._warnAboutDeprecatedGaussianBlurProp("blurRadius","radius"),this._set("maxDensity",t*this._pixelIntensityToDensity),this._set("minDensity",i*this._pixelIntensityToDensity)}get maxPixelIntensity(){return this.maxDensity/this._pixelIntensityToDensity}set maxPixelIntensity(e){this._set("maxDensity",e*this._pixelIntensityToDensity),this._warnAboutDeprecatedGaussianBlurProp("maxPixelIntensity","maxDensity")}get minPixelIntensity(){return this.minDensity/this._pixelIntensityToDensity}set minPixelIntensity(e){this._set("minDensity",e*this._pixelIntensityToDensity),this._warnAboutDeprecatedGaussianBlurProp("minPixelIntensity","minDensity")}get _pixelIntensityToDensity(){return 24/(j.nu**2*this.blurRadius**4)}_warnAboutDeprecatedGaussianBlurProp(e,t){this._warnedProps[e]||"user"===(0,y.vw)(this).getDefaultOrigin()&&(this._warnedProps[e]=!0,(0,u.Os)((()=>{(0,n.Mr)(P,e,{replacement:`${String(t)} (suggested value: ${this._get(t)})`,version:"4.24"})})))}read(e,t){e=M(e),super.read(e,t)}getSymbol(){return new I.Z}async getSymbolAsync(){return this.getSymbol()}getSymbols(){return[this.getSymbol()]}async collectRequiredFields(e,t){const i=this.field,s=this.valueExpression;i&&"string"==typeof i&&await(0,m.AB)(e,t,i),s&&"string"==typeof s&&await(0,m.io)(e,t,s)}getAttributeHash(){return null}getMeshHash(){return`${JSON.stringify(this.colorStops)}.${this.blurRadius}.${this.field}`}clone(){return new C({authoringInfo:this.authoringInfo&&this.authoringInfo.clone(),colorStops:(0,l.d9)(this.colorStops),field:this.field,legendOptions:(0,l.d9)(this.legendOptions),maxDensity:this.maxDensity,minDensity:this.minDensity,radius:this.radius,referenceScale:this.referenceScale,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle})}};(0,r._)([(0,c.Cb)({type:g.Z,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],E.prototype,"authoringInfo",void 0),(0,r._)([(0,c.Cb)({type:Number,json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],E.prototype,"blurRadius",null),(0,r._)([(0,c.Cb)({type:[v],json:{write:!0}})],E.prototype,"colorStops",void 0),(0,r._)([(0,c.Cb)({type:String,json:{write:!0}})],E.prototype,"field",void 0),(0,r._)([(0,c.Cb)({type:Number,json:{write:{overridePolicy:(e,t,i)=>({enabled:null==i})},origins:{"web-scene":{write:!1}}}})],E.prototype,"fieldOffset",void 0),(0,r._)([(0,c.Cb)({type:S,json:{write:!0}})],E.prototype,"legendOptions",void 0),(0,r._)([(0,c.Cb)({type:Number,json:{write:!0}})],E.prototype,"maxDensity",void 0),(0,r._)([(0,c.Cb)({type:Number,json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],E.prototype,"maxPixelIntensity",null),(0,r._)([(0,c.Cb)({type:Number,json:{write:!0}})],E.prototype,"minDensity",void 0),(0,r._)([(0,c.Cb)({type:Number,json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],E.prototype,"minPixelIntensity",null),(0,r._)([(0,c.Cb)({type:Number,cast:p.t_,json:{write:!0}})],E.prototype,"radius",void 0),(0,r._)([(0,c.Cb)({type:Number,range:{min:0},json:{default:0,write:!0}})],E.prototype,"referenceScale",void 0),(0,r._)([(0,h.J)({heatmap:"heatmap"})],E.prototype,"type",void 0),(0,r._)([(0,c.Cb)({type:String,json:{write:!0,origins:{"web-document":{write:!1},"portal-item":{write:!1}}}})],E.prototype,"valueExpression",void 0),(0,r._)([(0,c.Cb)({type:String})],E.prototype,"valueExpressionTitle",void 0),(0,r._)([(0,c.Cb)({readOnly:!0})],E.prototype,"_pixelIntensityToDensity",null),E=C=(0,r._)([(0,b.j)(Z)],E);const D=E},72529:(e,t,i)=>{i.d(t,{Z:()=>x});var s=i(43697),r=i(22303),o=(i(9790),i(67676)),n=i(2368),l=i(62357),a=i(5600),u=(i(75215),i(80442),i(36030)),p=i(52011),c=i(35671),d=i(5499),y=i(41733),h=i(79887),b=i(96674);let m=class extends((0,n.J)(b.wq)){constructor(){super(...arguments),this.color=new r.Z([0,0,0,0]),this.label=null,this.threshold=0}};(0,s._)([(0,a.Cb)({type:r.Z,json:{write:!0}})],m.prototype,"color",void 0),(0,s._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"label",void 0),(0,s._)([(0,a.Cb)({type:Number,range:{min:0,max:1},json:{write:!0}})],m.prototype,"threshold",void 0),m=(0,s._)([(0,p.j)("esri.renderers.support.OthersCategory")],m);let f=class extends((0,n.J)(b.wq)){constructor(){super(...arguments),this.title=null}};(0,s._)([(0,a.Cb)({type:String,json:{write:!0}})],f.prototype,"title",void 0),f=(0,s._)([(0,p.j)("esri.renderers.support.PieChartLegendOptions")],f);var g=i(77987),_=i(20256),w=i(4095);let v=class extends((0,y.W)((0,n.J)(d.Z))){constructor(e){super(e),this.attributes=null,this.backgroundFillSymbol=null,this.defaultColor=new r.Z([0,0,0,0]),this.defaultLabel=null,this.holePercentage=0,this.othersCategory=new m,this.legendOptions=null,this.outline=null,this.size=12,this.type="pie-chart"}getSymbol(){return new g.Z({size:this.size?this.size/2+(this.outline?.width||0):0})}async getSymbolAsync(){return this.getSymbol()}getSymbols(){return[this.getSymbol(),this.backgroundFillSymbol].filter(o.pC)}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce(((e,t)=>e+t.getAttributeHash()),"")}getMeshHash(){return this.getSymbols().reduce(((e,t)=>e+JSON.stringify(t)),"")}async collectRequiredFields(e,t){await this.collectVVRequiredFields(e,t);for(const i of this.attributes)i.valueExpression&&await(0,c.io)(e,t,i.valueExpression),i.field&&e.add(i.field)}};(0,s._)([(0,a.Cb)({type:[h.Z],json:{write:!0}})],v.prototype,"attributes",void 0),(0,s._)([(0,a.Cb)({type:_.Z,json:{default:null,write:!0}})],v.prototype,"backgroundFillSymbol",void 0),(0,s._)([(0,a.Cb)({type:r.Z,json:{write:!0}})],v.prototype,"defaultColor",void 0),(0,s._)([(0,a.Cb)({type:String,json:{write:!0}})],v.prototype,"defaultLabel",void 0),(0,s._)([(0,a.Cb)({type:Number,range:{min:0,max:1},json:{write:!0}})],v.prototype,"holePercentage",void 0),(0,s._)([(0,a.Cb)({type:m,json:{write:!0}})],v.prototype,"othersCategory",void 0),(0,s._)([(0,a.Cb)({type:f,json:{write:!0}})],v.prototype,"legendOptions",void 0),(0,s._)([(0,a.Cb)({type:w.Z,json:{default:null,write:!0}})],v.prototype,"outline",void 0),(0,s._)([(0,a.Cb)({type:Number,cast:l.t_,json:{write:!0}})],v.prototype,"size",void 0),(0,s._)([(0,u.J)({pieChart:"pie-chart"})],v.prototype,"type",void 0),v=(0,s._)([(0,p.j)("esri.renderers.PieChartRenderer")],v);const x=v},84382:(e,t,i)=>{i.d(t,{Z:()=>y});var s,r=i(43697),o=i(22974),n=i(5600),l=(i(75215),i(36030)),a=i(52011),u=i(5499),p=i(41733),c=i(9833);let d=s=class extends((0,p.W)(u.Z)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,t){await Promise.all([this.collectSymbolFields(e,t),this.collectVVRequiredFields(e,t)])}async collectSymbolFields(e,t){await Promise.all(this.getSymbols().map((i=>i.collectRequiredFields(e,t))))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}getSymbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables&&this.visualVariables.reduce(((e,t)=>e+t.getAttributeHash()),"")}getMeshHash(){return this.getSymbols().reduce(((e,t)=>e+JSON.stringify(t)),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new s({description:this.description,label:this.label,symbol:this.symbol&&this.symbol.clone(),visualVariables:(0,o.d9)(this.visualVariables),authoringInfo:this.authoringInfo&&this.authoringInfo.clone()})}};(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],d.prototype,"description",void 0),(0,r._)([(0,n.Cb)({type:String,json:{write:!0}})],d.prototype,"label",void 0),(0,r._)([(0,n.Cb)(c.Gn)],d.prototype,"symbol",void 0),(0,r._)([(0,l.J)({simple:"simple"})],d.prototype,"type",void 0),d=s=(0,r._)([(0,a.j)("esri.renderers.SimpleRenderer")],d);const y=d},79887:(e,t,i)=>{i.d(t,{Z:()=>y});var s,r=i(43697),o=i(22303),n=i(96674),l=i(92604),a=i(5600),u=i(90578),p=(i(67676),i(80442),i(52011)),c=i(75215);let d=s=class extends n.wq{constructor(e){super(e),this.color=null,this.field=null,this.label=null,this.valueExpression=null,this.valueExpressionTitle=null}castField(e){return null==e?e:"function"==typeof e?(l.Z.getLogger(this.declaredClass).error(".field: field must be a string value"),null):(0,c.Zs)(e)}getAttributeHash(){return`${this.field}-${this.valueExpression}`}clone(){return new s({color:this.color&&this.color.clone(),field:this.field,label:this.label,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle})}};(0,r._)([(0,a.Cb)({type:o.Z,json:{type:[Number],write:!0}})],d.prototype,"color",void 0),(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],d.prototype,"field",void 0),(0,r._)([(0,u.p)("field")],d.prototype,"castField",null),(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],d.prototype,"label",void 0),(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],d.prototype,"valueExpression",void 0),(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],d.prototype,"valueExpressionTitle",void 0),d=s=(0,r._)([(0,p.j)("esri.renderers.support.AttributeColorInfo")],d);const y=d},84475:(e,t,i)=>{i.r(t),i.d(t,{DictionaryLoader:()=>b});var s=i(22303),r=i(3172),o=i(20102),n=(i(80442),i(92604)),l=i(13867),a=i(95330),u=i(19153),p=i(99514),c=i(59266),d=i(17386);const y="esri.renderers.support.DictionaryLoader",h={type:"CIMSimpleLineCallout",lineSymbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",width:.5,color:[0,0,0,255]}]}};class b{constructor(e,t,i){this.config=null,this.fieldMap=null,this.url=null,this._ongoingRequests=new Map,this._symbolCache=new l.Z(100),this._fieldIndex=null,this._dictionaryPromise=null,this.url=e,this.config=t,this.fieldMap=i}getSymbolFields(){return this._symbolFields}async getSymbolAsync(e,t){let i;this._dictionaryPromise||(this._dictionaryPromise=this.fetchResources(t));try{i=await this._dictionaryPromise}catch(e){if((0,a.D_)(e))return this._dictionaryPromise=null,null}const r={};if(this.fieldMap)for(const t of this._symbolFields){const i=this._getFieldName(this.fieldMap[t]);r[t]=i?""+e.attributes[i]:""}let o=null;try{o=i?.(r,t)}catch(e){return null}if(!o||"string"!=typeof o)return null;const n=(0,u.hP)(o).toString(),l=this._symbolCache.get(n);if(l)return l.catch((()=>{this._symbolCache.pop(n)})),l;const p=o.split(";"),c=[],d=[];for(const e of p)if(e)if(e.includes("po:")){const t=e.substr(3).split("|");if(3===t.length){const e=t[0],i=t[1];let r=t[2];if("DashTemplate"===i)r=r.split(" ").map((e=>Number(e)));else if("Color"===i){const e=new s.Z(r).toRgba();r=[e[0],e[1],e[2],255*e[3]]}else r=Number(r);d.push({primitiveName:e,propertyName:i,value:r})}}else if(e.includes("|")){for(const t of e.split("|"))if(this._itemNames.has(t)){c.push(t);break}}else this._itemNames.has(e)&&c.push(e);const y=null==e.geometry||!e.geometry.hasZ&&"point"===e.geometry.type,h=this._cimPartsToCIMSymbol(c,d,y,t);return this._symbolCache.put(n,h,1),h}async fetchResources(e){if(this._dictionaryPromise)return this._dictionaryPromise;if(!this.url)return void n.Z.getLogger(y).error("no valid URL!");const t=(0,r.default)(this.url+"/resources/styles/dictionary-info.json",{responseType:"json",query:{f:"json"},signal:null!=e?e.signal:null}),[{data:i}]=await Promise.all([t,(0,c.LC)()]);if(!i)throw this._dictionaryPromise=null,new o.Z("esri.renderers.DictionaryRenderer","Bad dictionary data!");const s=i.expression,l=i.authoringInfo;this._refSymbolUrlTemplate=this.url+"/"+i.cimRefTemplateUrl,this._itemNames=new Set(i.itemsNames),this._symbolFields=l.symbol;const a={};if(this.config){const e=this.config;for(const t in e)a[t]=e[t]}if(l.configuration)for(const e of l.configuration)a.hasOwnProperty(e.name)||(a[e.name]=e.value);const u=[];if(null!=e&&e.fields&&this.fieldMap)for(const t of this._symbolFields){const i=this.fieldMap[t],s=e.fields.filter((e=>e.name.toLowerCase()===i?.toLowerCase()));s.length>0&&u.push({...s[0],type:"esriFieldTypeString"})}u.length>0&&(this._fieldIndex=new p.Z(u));const d=(0,c.pp)(s,null!=e?e.spatialReference:null,u,a).then((e=>{const t={scale:0};return(i,s)=>{if(null==e)return null;const r=e.repurposeFeature({geometry:null,attributes:i});return t.scale=null!=s?s.scale??void 0:void 0,e.evaluate({$feature:r,$view:t})}})).catch((e=>(n.Z.getLogger(y).error("Creating dictinoary expression failed:",e),null)));return this._dictionaryPromise=d,d}async _cimPartsToCIMSymbol(e,t,i,s){const r=new Array(e.length);for(let t=0;t<e.length;t++)r[t]=this._getSymbolPart(e[t],s);const o=await Promise.all(r),n=this.fieldMap;if(n)for(const e of o)m(e,n);return new d.Z({data:this._combineSymbolParts(o,t,i)})}async _getSymbolPart(e,t){if(this._ongoingRequests.has(e))return this._ongoingRequests.get(e).then((e=>e.data));const i=this._refSymbolUrlTemplate.replace(/\{itemName\}/gi,e),s=(0,r.default)(i,{responseType:"json",query:{f:"json"},...t});this._ongoingRequests.set(e,s);try{return(await s).data}catch(t){throw this._ongoingRequests.delete(e),t}}_combineSymbolParts(e,t,i){if(!e||0===e.length)return null;const s={...e[0]};if(e.length>1){s.symbolLayers=[];for(const t of e){const e=t;s.symbolLayers.unshift(...e.symbolLayers)}}return i&&(s.callout=h),{type:"CIMSymbolReference",symbol:s,primitiveOverrides:t}}_getFieldName(e){if(null!==this._fieldIndex){const t=this._fieldIndex.get(e);return t?t.name:e}return e}}function m(e,t){if(!e)return;const i=e.symbolLayers;if(!i)return;let s=i.length;for(;s--;){const e=i[s];e&&!1!==e.enable&&"CIMVectorMarker"===e.type&&f(e,t)}}function f(e,t){const i=e.markerGraphics;if(i)for(const e of i){if(!e)continue;const i=e.symbol;if(i)switch(i.type){case"CIMPointSymbol":case"CIMLineSymbol":case"CIMPolygonSymbol":m(i,t);break;case"CIMTextSymbol":i.fieldMap=t}}}},73572:(e,t,i)=>{i.d(t,{AJ:()=>n,If:()=>a,QM:()=>l,k0:()=>o,nu:()=>r,wx:()=>u}),i(22021);var s=i(62357);i(98766),i(88669);const r=2.4;function o(e){return(0,s.Wz)(e*r)}function n(e){return(0,s.F2)(e)/r}function l(e,t,i,r){const{radius:o,fieldOffset:n,field:l}=t,u=Math.round((0,s.F2)(o)),p=new Float64Array(i*r);let c,d=Number.NEGATIVE_INFINITY;const y=function(e,t){return null!=e?"string"==typeof t?t=>-1*+t.readAttribute(e):i=>+i.readAttribute(e)+t:e=>1}(l,n),h=new Set;for(const t of e){const e=t.getCursor();for(;e.next();){const t=e.getObjectId();if(h.has(t))continue;h.add(t);const s=e.readLegacyPointGeometry(),o=128;if(s.x<-o||s.x>=i+o||s.y<-o||s.y>r+o)continue;const n=+y(e),l=Math.max(0,Math.round(s.x)-u),b=Math.max(0,Math.round(s.y)-u),m=Math.min(r,Math.round(s.y)+u),f=Math.min(i,Math.round(s.x)+u);for(let e=b;e<m;e++)for(let t=l;t<f;t++){const r=e*i+t,o=a(s.x-t,s.y-e,u);c=p[r]+=o*n,c>d&&(d=c)}}}return{matrix:p.buffer,max:d}}function a(e,t,i){const s=Math.sqrt(e**2+t**2)/i;return s>1?0:3/(Math.PI*i**2)*(1-s**2)**2}function u(e,t){return"function"==typeof e?e:e?"string"==typeof t?t=>-1*+t[e]:i=>+i[e]+t:()=>1}},91423:(e,t,i)=>{i.d(t,{a:()=>l});var s=i(20941),r=i(63213),o=i(32400);const n=(0,r.d)({types:o.A});function l(e,t,i){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?(i&&i.messages&&i.messages.push(new s.Z("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+e.type+"'",{definition:e,context:i})),null):n(e,t,i):null}},32400:(e,t,i)=>{i.d(t,{A:()=>c,o:()=>d});var s=i(16050),r=i(12501),o=i(28756),n=i(92271),l=i(72529),a=i(5499),u=i(84382),p=i(81571);const c={key:"type",base:a.Z,typeMap:{heatmap:n.Z,simple:u.Z,"unique-value":p.Z,"class-breaks":s.Z,"dot-density":o.Z,dictionary:r.Z,"pie-chart":l.Z},errorContext:"renderer"},d={key:"type",base:a.Z,typeMap:{simple:u.Z,"unique-value":p.Z,"class-breaks":s.Z,heatmap:n.Z},errorContext:"renderer"}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9771,6502],{41123:(e,t,r)=>{r.d(t,{D:()=>a,z:()=>n});const s="randomUUID"in crypto;function a(){if(s)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${a()}}`}},84470:(e,t,r)=>{r.d(t,{JG:()=>l,NZ:()=>a,fV:()=>c,vj:()=>h});var s=r(2981);function a(e){const t=e?.source;return!!t&&(Array.isArray(t)?t.some((e=>u(e))):u(t))}function n(e){return Array.isArray(e)?0!==e.length&&n(e[0]):!(e instanceof File)}const o=/^(model\/gltf\+json)|(model\/gltf-binary)$/,i=/\.(gltf|glb)/i;function u(e){if(e instanceof File){const{type:t,name:r}=e;return o.test(t)||i.test(r)}return o.test(e.assetMimeType)||i.test(e.assetName)||i.test(e.assetUrl)}function l(e,t){if(!e)return!1;const{source:r}=e;return Array.isArray(r)?function(e,t){return e.every((e=>p(e,t)))}(r,t):p(r,t)}function c(e,t){if(e===t)return!0;const{source:r}=e,{source:s}=t;if(r===s)return!0;if(n(r)&&n(s)){if(Array.isArray(r)&&Array.isArray(s)){if(r.length!==s.length)return!1;const e=(e,t)=>e.assetHash<t.assetHash?-1:e.assetHash>t.assetHash?1:0,t=[...r].sort(e),a=[...s].sort(e);for(let e=0;e<t.length;++e)if(!d(t[e],a[e]))return!1;return!0}if(!Array.isArray(r)&&!Array.isArray(s))return d(r,s)}return!1}function d(e,t){return e.assetUrl===t.assetUrl}function p(e,t){return!(e instanceof File)&&e.assetUrl.startsWith(`${t.path}/assets/`)}function h(e,t){return e instanceof File?(0,s.Es)(e.name,t)??(0,s.PM)(e.type,t):(0,s.PM)(e.assetMimeType,t)??(0,s.Es)(e.assetName,t)}},61159:(e,t,r)=>{r.d(t,{g:()=>s});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},6502:(e,t,r)=>{r.r(t),r.d(t,{default:()=>P});var s=r(43697),a=(r(66577),r(38171)),n=r(40330),o=r(3172),i=r(92835),u=r(67676),l=r(20102),c=r(80442),d=r(35454),p=r(83379),h=r(92604),y=r(78286),f=r(95330),m=r(17452),g=r(41123),_=r(5600),b=(r(75215),r(52011)),F=r(6570),R=r(33955),S=r(84470),w=r(25278),q=r(74654),x=r(66677),C=r(59431),A=r(82971);const O=new d.X({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),I=new Set(["Feature Layer","Table"]),v=new d.X({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let T=class extends p.Z{constructor(){super(...arguments),this.type="feature-layer",this.refresh=(0,f.Ds)((async()=>{await this.load();const e=this.sourceJSON.editingInfo?.lastEditDate;if(null==e)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}})),this._ongoingAssetUploads=new Map}load(e){const t=null!=e?e.signal:null,r=this.layer.sourceJSON;return this.addResolvingPromise(this._fetchService(r,t)),Promise.resolve(this)}get queryTask(){const{capabilities:e,parsedUrl:t,dynamicDataSource:r,infoFor3D:s,gdbVersion:a,spatialReference:n,fieldsIndex:o}=this.layer,i=(0,c.Z)("featurelayer-pbf")&&e?.query.supportsFormatPBF&&null==s,u=e?.operations?.supportsQueryAttachments??!1;return new q.Z({url:t.path,pbfSupported:i,fieldsIndex:o,infoFor3D:s,dynamicDataSource:r,gdbVersion:a,sourceSpatialReference:n,queryAttachmentsSupported:u})}async addAttachment(e,t){await this.load();const r=e.attributes[this.layer.objectIdField],s=this.layer.parsedUrl.path+"/"+r+"/addAttachment",a=this._getLayerRequestOptions(),n=this._getFormDataForAttachment(t,a.query);try{const e=await(0,o.default)(s,{body:n});return this._createFeatureEditResult(e.data.addAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(r,e)}}async updateAttachment(e,t,r){await this.load();const s=e.attributes[this.layer.objectIdField],a=this.layer.parsedUrl.path+"/"+s+"/updateAttachment",n=this._getLayerRequestOptions({query:{attachmentId:t}}),i=this._getFormDataForAttachment(r,n.query);try{const e=await(0,o.default)(a,{body:i});return this._createFeatureEditResult(e.data.updateAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(s,e)}}async applyEdits(e,t){await this.load();const r=this.layer.infoFor3D,s=null!=r,a=s||(t?.globalIdUsed??!1),i=e.addFeatures?.map((e=>this._serializeFeature(e,r))).filter(u.pC)??[],l=e.updateFeatures?.map((e=>this._serializeFeature(e,r))).filter(u.pC)??[],c=this._getFeatureIds(e.deleteFeatures,a),d=s&&this.layer.capabilities.editing.supportsAsyncApplyEdits;(0,C.P)(i,l,this.layer.spatialReference);const p=[],h=[],y=[...e.deleteAttachments??[]];for(const t of e.addAttachments??[])p.push(await this._serializeAttachment(t));for(const t of e.updateAttachments??[])h.push(await this._serializeAttachment(t));const f=p.length||h.length||y.length?{adds:p,updates:h,deletes:y}:null;let m;if(s&&e.addAssetFeatures?.length){const{addAssetFeatures:t}=e,r=t.map((e=>e.geometry));await this.uploadAssets(r),m={adds:this._createAssetMapEdits(t),updates:[],deletes:[]}}const g={gdbVersion:t?.gdbVersion||this.layer.gdbVersion,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:a,returnEditMoment:t?.returnEditMoment,usePreviousEditMoment:t?.usePreviousEditMoment,sessionId:t?.sessionId,async:d};t?.returnServiceEditsOption?(g.edits=JSON.stringify([{id:this.layer.layerId,adds:i,updates:l,deletes:c,attachments:f,assetMaps:m}]),g.returnServiceEditsOption=O.toJSON(t?.returnServiceEditsOption),g.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(g.adds=i.length?JSON.stringify(i):null,g.updates=l.length?JSON.stringify(l):null,g.deletes=c.length?a?JSON.stringify(c):c.join(","):null,g.attachments=f&&JSON.stringify(f),g.assetMaps=null!=m?JSON.stringify(m):void 0);const _=this._getLayerRequestOptions({method:"post",query:g}),b=t?.returnServiceEditsOption?this.layer.url:this.layer.parsedUrl.path,F=d?await this._asyncApplyEdits(b+"/applyEdits",_):await(0,o.default)(b+"/applyEdits",_);if(!this.layer.capabilities.operations?.supportsEditing&&this.layer.effectiveCapabilities?.operations?.supportsEditing){const e=n.id?.findCredential(this.layer.url);await(e?.refreshToken())}return this._createEditsResult(F)}async deleteAttachments(e,t){await this.load();const r=e.attributes[this.layer.objectIdField],s=this.layer.parsedUrl.path+"/"+r+"/deleteAttachments";try{return(await(0,o.default)(s,this._getLayerRequestOptions({query:{attachmentIds:t.join(",")},method:"post"}))).data.deleteAttachmentResults.map(this._createFeatureEditResult)}catch(e){throw this._createAttachmentErrorResult(r,e)}}fetchRecomputedExtents(e={}){const t=e.signal;return this.load({signal:t}).then((async()=>{const t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:r,url:s}=this.layer,{data:a}=await(0,o.default)(`${s}/${r}`,t),{id:n,extent:u,fullExtent:l,timeExtent:c}=a,d=u||l;return{id:n,fullExtent:d&&F.Z.fromJSON(d),timeExtent:c&&i.Z.fromJSON({start:c[0],end:c[1]})}}))}async queryAttachments(e,t={}){await this.load();const r=this._getLayerRequestOptions(t);return this.queryTask.executeAttachmentQuery(e,r)}async queryFeatures(e,t){return await this.load(),this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!(0,x.M8)(this.layer.url))return"unavailable";const e=(0,m.v_)(this.layer.url,"status"),t=await(0,o.default)(e,{query:{f:"json"}});return v.fromJSON(t.data.status)}async uploadAssets(e,t){const{uploadAssets:s}=await r.e(8510).then(r.bind(r,58510));return s(e,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},t)}async _asyncApplyEdits(e,t){const r=(await(0,o.default)(e,t)).data.statusUrl;for(;;){const e=(await(0,o.default)(r,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return(0,o.default)(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new l.Z("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new l.Z("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,f.e4)(E)}}_createRequestQueryOptions(e){const t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){const{data:r}=await(0,o.default)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:(0,c.Z)("featurelayer-advanced-symbols")?{returnAdvancedSymbols:!0}:{},signal:t}));e=r}this.sourceJSON=this._patchServiceJSON(e);const r=e.type;if(!I.has(r))throw new l.Z("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}_patchServiceJSON(e){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){const t=(0,w.bU)(e.geometryType).renderer;(0,y.RB)("drawingInfo.renderer",t,e)}return"esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),e}_serializeFeature(e,t){const{geometry:r,attributes:s}=e;if(null!=t&&null!=e.geometry&&"mesh"===e.geometry.type){const r={...s},a=e.geometry,n=a.origin,o=a.transform;if(r[t.transformFieldRoles.originX]=n.x,r[t.transformFieldRoles.originY]=n.y,r[t.transformFieldRoles.originZ]=n.z,null!=o){const e=o.translation,s=o.scale,a=o.rotation;r[t.transformFieldRoles.translationX]=e[0],r[t.transformFieldRoles.translationY]=-e[2],r[t.transformFieldRoles.translationZ]=e[1],r[t.transformFieldRoles.scaleX]=s[0],r[t.transformFieldRoles.scaleY]=s[1],r[t.transformFieldRoles.scaleZ]=s[2],r[t.transformFieldRoles.rotationX]=a[0],r[t.transformFieldRoles.rotationY]=a[2],r[t.transformFieldRoles.rotationZ]=a[1],r[t.transformFieldRoles.rotationDeg]=a[3]}return{geometry:null,attributes:r}}return null==r?{attributes:s}:"mesh"===r.type||"extent"===r.type?null:{geometry:r.toJSON(),attributes:s}}async _serializeAttachment(e){const{feature:t,attachment:r}=e,{globalId:s,name:a,contentType:n,data:o,uploadId:i}=r,u={globalId:s,parentGlobalId:null,contentType:null,name:null,uploadId:null,data:null};if(t&&(u.parentGlobalId="attributes"in t?t.attributes&&t.attributes[this.layer.globalIdField]:t.globalId),i)u.uploadId=i;else if(o){const e=await(0,m.IR)(o);e&&(u.contentType=e.mediaType,u.data=e.data),o instanceof File&&(u.name=o.name)}return a&&(u.name=a),n&&(u.contentType=n),u}_createAssetMapEdits(e){const t=new Array,r=this.layer.globalIdField,s=this.layer.parsedUrl,a=(e,r,s)=>{t.push({globalId:(0,g.z)(),parentGlobalId:r,assetName:e.assetName,assetHash:e.assetHash,flags:s})};for(const t of e){const e=t.geometry,{externalSources:n}=e.metadata,o=n.items.filter((e=>(0,S.JG)(e,s))),i=t.getAttribute(r),u=t.geometry.transform?.geographic,l=u?["PROJECT_VERTICES"]:[],c=e=>a(e,i,l);for(const e of o){const{source:t}=e;Array.isArray(t)?t.map(c):c(t)}}return t}_getFeatureIds(e,t){const r=e?.[0];return r?this._canUseGlobalIds(t,e)?this._getGlobalIdsFromFeatureIdentifier(e):"objectId"in r?this._getObjectIdsFromFeatureIdentifier(e):this._getIdsFromFeatures(e):[]}_getIdsFromFeatures(e){const t=this.layer.objectIdField;return e.map((e=>e.attributes&&e.attributes[t]))}_canUseGlobalIds(e,t){return e&&"globalId"in t[0]}_getObjectIdsFromFeatureIdentifier(e){return e.map((e=>e.objectId))}_getGlobalIdsFromFeatureIdentifier(e){return e.map((e=>e.globalId))}_createEditsResult(e){const t=e.data,{layerId:r}=this.layer,s=[];let a=null;if(Array.isArray(t))for(const e of t)s.push({id:e.id,editedFeatures:e.editedFeatures}),e.id===r&&(a={addResults:e.addResults??[],updateResults:e.updateResults??[],deleteResults:e.deleteResults??[],attachments:e.attachments,editMoment:e.editMoment});else a=t;const n=a?.assetMaps;if(n){for(const e of n.addResults)e.success||h.Z.getLogger(this.declaredClass).error(`Failed to map asset to feature with globalId ${e.globalId}.`);for(const e of n.updateResults)e.success||h.Z.getLogger(this.declaredClass).error(`Failed to map asset to feature with globalId ${e.globalId}.`)}const o=a?.attachments,i={addFeatureResults:a?.addResults?.map(this._createFeatureEditResult,this)??[],updateFeatureResults:a?.updateResults?.map(this._createFeatureEditResult,this)??[],deleteFeatureResults:a?.deleteResults?.map(this._createFeatureEditResult,this)??[],addAttachmentResults:o&&o.addResults?o.addResults.map(this._createFeatureEditResult,this):[],updateAttachmentResults:o&&o.updateResults?o.updateResults.map(this._createFeatureEditResult,this):[],deleteAttachmentResults:o&&o.deleteResults?o.deleteResults.map(this._createFeatureEditResult,this):[]};if(a?.editMoment&&(i.editMoment=a.editMoment),s.length>0){i.editedFeatureResults=[];for(const e of s){const{editedFeatures:t}=e,r=t?.spatialReference?new A.Z(t.spatialReference):null;i.editedFeatureResults.push({layerId:e.id,editedFeatures:{adds:t?.adds?.map((e=>this._createEditedFeature(e,r)))||[],updates:t?.updates?.map((e=>({original:this._createEditedFeature(e[0],r),current:this._createEditedFeature(e[1],r)})))||[],deletes:t?.deletes?.map((e=>this._createEditedFeature(e,r)))||[],spatialReference:r}})}}return i}_createEditedFeature(e,t){return new a.Z({attributes:e.attributes,geometry:(0,R.im)({...e.geometry,spatialReference:t})})}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new l.Z("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_createAttachmentErrorResult(e,t){const r=t.details.messages&&t.details.messages[0]||t.message,s=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new l.Z("feature-layer-source:attachment-failure",r,{code:s})}}_getFormDataForAttachment(e,t){const r=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(r)for(const e in t){const s=t[e];null!=s&&(r.set?r.set(e,s):r.append(e,s))}return r}_getLayerRequestOptions(e={}){const{parsedUrl:t,gdbVersion:r,dynamicDataSource:s}=this.layer;return{...e,query:{gdbVersion:r,layer:s?JSON.stringify({source:s}):void 0,...t.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}};(0,s._)([(0,_.Cb)()],T.prototype,"type",void 0),(0,s._)([(0,_.Cb)({constructOnly:!0})],T.prototype,"layer",void 0),(0,s._)([(0,_.Cb)({readOnly:!0})],T.prototype,"queryTask",null),T=(0,s._)([(0,b.j)("esri.layers.graphics.sources.FeatureLayerSource")],T);const E=1e3,P=T},74654:(e,t,r)=>{r.d(t,{Z:()=>E});var s=r(43697),a=r(15923),n=r(20102),o=r(80442),i=r(95330),u=r(17452),l=r(5600),c=(r(75215),r(67676),r(52011)),d=r(2981),p=r(10158),h=r(11282),y=r(41818),f=(r(66577),r(34599)),m=r(14165),g=r(6570),_=r(5396),b=r(4967),F=r(70586),R=r(69285),S=r(98732);function w(e,t){return t}function q(e,t,r,s){switch(r){case 0:return O(e,t+s,0);case 1:return"lowerLeft"===e.originPosition?O(e,t+s,1):function({translate:e,scale:t},r,s){return e[s]-r*t[s]}(e,t+s,1)}}function x(e,t,r,s){return 2===r?O(e,t,2):q(e,t,r,s)}function C(e,t,r,s){return 2===r?O(e,t,3):q(e,t,r,s)}function A(e,t,r,s){return 3===r?O(e,t,3):x(e,t,r,s)}function O({translate:e,scale:t},r,s){return e[s]+r*t[s]}class I{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=w,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,R.k)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(null!=t)for(const r of e.features)t(r.geometry)}createSpatialReference(){return{}}addField(e,t){const r=e.fields;(0,F.O3)(r),r.push(t);const s=r.map((e=>e.name));this._attributesConstructor=function(){for(const e of s)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this._transform=e.transform,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++,e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,r){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:r,queryGeometryType:s}=t,a=(0,S.$g)(r.clone(),r,!1,!1,this._transform),n=(0,S.di)(a,s,!1,!1);e.queryGeometryType=s,e.queryGeometry={...n}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){const s=(0,F.s3)(this._transform,"transform");switch(t=this._applyTransform(s,t,r,0),r){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let r=0;t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const s=(0,F.s3)(this._transform,"transform");return this._applyTransform(s,e,t,r)}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const s=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(s)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,r){0===r&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const s=this._transformPathLikeValue(t,r),a=e[e.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),a.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=s}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?A:t?x:r?C:q}}var v=r(74889);let T=class extends a.Z{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.queryAttachmentsSupported=!1,this.sourceSpatialReference=null,this.url=null}get parsedUrl(){return(0,u.mN)(this.url)}async execute(e,t){const r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){const r=this._normalizeQuery(e),s=null!=e.outStatistics?.[0],a=(0,o.Z)("featurelayer-pbf-statistics"),n=!s||a;let i;if(this.pbfSupported&&n)try{i=await async function(e,t,r){const s=(0,h.en)(e),a={...r},n=m.Z.from(t),o=!n.quantizationParameters,{data:i}=await(0,f.qp)(s,n,new I({sourceSpatialReference:n.sourceSpatialReference,applyTransform:o}),a);return i}(this.url,r,t)}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.pbfSupported=!1}return this.pbfSupported&&n||(i=await(0,b.F)(this.url,r,t)),this._normalizeFields(i.fields),i}async featureSetFromJSON(e,t,s){if(!this._queryIs3DObjectFormat(e)||null==this.infoFor3D||!t.features)return v.Z.fromJSON(t);const{meshFeatureSetFromJSON:a}=await(0,i.Hl)(Promise.all([r.e(6481),r.e(6459),r.e(7697)]).then(r.bind(r,87697)),s);return a(e,this.infoFor3D,t)}executeForCount(e,t){return(0,y.P)(this.url,this._normalizeQuery(e),t)}executeForExtent(e,t){return async function(e,t,r){const s=(0,h.en)(e);return(0,f.Vr)(s,m.Z.from(t),{...r}).then((e=>({count:e.data.count,extent:g.Z.fromJSON(e.data.extent)})))}(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return(0,_.G)(this.url,this._normalizeQuery(e),t)}async executeRelationshipQuery(e,t){const[{default:s},{executeRelationshipQuery:a}]=await(0,i.Hl)(Promise.all([r.e(5935).then(r.bind(r,75935)),r.e(1073).then(r.bind(r,81073))]),t);return e=s.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),a(this.url,e,t)}async executeRelationshipQueryForCount(e,t){const[{default:s},{executeRelationshipQueryForCount:a}]=await(0,i.Hl)(Promise.all([r.e(5935).then(r.bind(r,75935)),r.e(1073).then(r.bind(r,81073))]),t);return e=s.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),a(this.url,e,t)}async executeAttachmentQuery(e,t){const{executeAttachmentQuery:s,fetchAttachments:a,processAttachmentQueryResult:n}=await(0,i.Hl)(r.e(540).then(r.bind(r,30540)),t),o=(0,h.en)(this.url);return n(o,await(this.queryAttachmentsSupported?s(o,e,t):a(o,e,t)))}async executeTopFeaturesQuery(e,t){const{executeTopFeaturesQuery:s}=await(0,i.Hl)(r.e(1158).then(r.bind(r,71158)),t);return s(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){const{executeForTopIds:s}=await(0,i.Hl)(r.e(3992).then(r.bind(r,33992)),t);return s(this.parsedUrl,e,t)}async executeForTopExtents(e,t){const{executeForTopExtents:s}=await(0,i.Hl)(r.e(1790).then(r.bind(r,21790)),t);return s(this.parsedUrl,e,t)}async executeForTopCount(e,t){const{executeForTopCount:s}=await(0,i.Hl)(r.e(4371).then(r.bind(r,14371)),t);return s(this.parsedUrl,e,t)}_normalizeQuery(e){let t=m.Z.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?p.n.from(e.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this;if(null!=r&&this._queryIs3DObjectFormat(e)){t=t===e?t.clone():t,t.formatOf3DObjects=null;const{supportedFormats:s,queryFormats:a}=r,o=(0,d.PM)("model/gltf-binary",s)??(0,d.Es)("glb",s),i=(0,d.PM)("model/gltf+json",s)??(0,d.Es)("gtlf",s);for(const e of a){if(e===o){t.formatOf3DObjects=e;break}e!==i||t.formatOf3DObjects||(t.formatOf3DObjects=e)}if(!t.formatOf3DObjects)throw new n.Z("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(null==t.outFields||!t.outFields.includes("*")){t=t===e?t.clone():t,null==t.outFields&&(t.outFields=[]);const{originX:s,originY:a,originZ:n,translationX:o,translationY:i,translationZ:u,scaleX:l,scaleY:c,scaleZ:d,rotationX:p,rotationY:h,rotationZ:y,rotationDeg:f}=r.transformFieldRoles;t.outFields.push(s,a,n,o,i,u,l,c,d,p,h,y,f)}}return t}_normalizeFields(e){if(null!=this.fieldsIndex&&null!=e)for(const t of e){const e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryIs3DObjectFormat(e){return null!=this.infoFor3D&&!0===e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}};(0,s._)([(0,l.Cb)({type:p.n})],T.prototype,"dynamicDataSource",void 0),(0,s._)([(0,l.Cb)()],T.prototype,"fieldsIndex",void 0),(0,s._)([(0,l.Cb)()],T.prototype,"gdbVersion",void 0),(0,s._)([(0,l.Cb)()],T.prototype,"infoFor3D",void 0),(0,s._)([(0,l.Cb)({readOnly:!0})],T.prototype,"parsedUrl",null),(0,s._)([(0,l.Cb)()],T.prototype,"pbfSupported",void 0),(0,s._)([(0,l.Cb)()],T.prototype,"queryAttachmentsSupported",void 0),(0,s._)([(0,l.Cb)()],T.prototype,"sourceSpatialReference",void 0),(0,s._)([(0,l.Cb)({type:String})],T.prototype,"url",void 0),T=(0,s._)([(0,c.j)("esri.tasks.QueryTask")],T);const E=T},25278:(e,t,r)=>{r.d(t,{Dm:()=>c,Hq:()=>d,MS:()=>p,bU:()=>i});var s=r(80442),a=r(22974),n=r(61159),o=r(58333);function i(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.I4:"esriGeometryPolyline"===e?o.ET:o.lF}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function c(e,t){if((0,s.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${u.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,a.d9)(e)}}]}function p(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0},query:n.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1}}}},2981:(e,t,r)=>{r.d(t,{Es:()=>u,PM:()=>i,rm:()=>l});const s=[["binary","application/octet-stream","bin",""]];function a(e,t){return[...s,...t].find((t=>t[0]===e))}function n(e,t){return[...s,...t].find((t=>t[1]===e))}function o(e,t){const r=e.toLowerCase();return[...s,...t].find((e=>e[2].split(",").some((e=>r.endsWith(e)))))}function i(e,t){const r=n(e,t);return r?.[0]}function u(e,t){const r=o(e,t);return r?.[0]}function l(e,t){const r=a(e,t);return r?.[1]}},41818:(e,t,r)=>{r.d(t,{P:()=>o});var s=r(11282),a=r(34599),n=r(14165);async function o(e,t,r){const o=(0,s.en)(e);return(0,a.hH)(o,n.Z.from(t),{...r}).then((e=>e.data.count))}},5396:(e,t,r)=>{r.d(t,{G:()=>o});var s=r(11282),a=r(34599),n=r(14165);async function o(e,t,r){const o=(0,s.en)(e);return(0,a.Ev)(o,n.Z.from(t),{...r}).then((e=>e.data.objectIds))}},4967:(e,t,r)=>{r.d(t,{F:()=>u,e:()=>i});var s=r(11282),a=r(34599),n=r(74889),o=r(14165);async function i(e,t,r){const s=await u(e,t,r);return n.Z.fromJSON(s)}async function u(e,t,r){const n=(0,s.en)(e),i={...r},u=o.Z.from(t),{data:l}=await(0,a.JT)(n,u,u.sourceSpatialReference,i);return l}},59431:(e,t,r)=>{r.d(t,{P:()=>o});var s=r(67900),a=r(8744);function n(e,t,r){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=r)}function o(e,t,r){if(!e&&!t||!r)return;const a=(0,s._R)(r);i(e,r,a),i(t,r,a)}function i(e,t,r){if(e)for(const s of e)u(s.geometry,t,r)}function u(e,t,r){if(null==e||!e.spatialReference||(0,a.fS)(e.spatialReference,t))return;const o=(0,s._R)(e.spatialReference)/r;if(1!==o)if("x"in e)null!=e.z&&(e.z*=o);else if("rings"in e)n(e,e.rings,o);else if("paths"in e)n(e,e.paths,o);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=o)}},28694:(e,t,r)=>{r.d(t,{p:()=>a});var s=r(69285);function a(e,t,r){if(!r||!r.features||!r.hasZ)return;const a=(0,s.k)(r.geometryType,t,e.outSpatialReference);if(null!=a)for(const e of r.features)a(e.geometry)}},74889:(e,t,r)=>{r.d(t,{Z:()=>b});var s,a=r(43697),n=r(66577),o=r(38171),i=r(35454),u=r(96674),l=r(22974),c=r(5600),d=(r(75215),r(71715)),p=r(52011),h=r(30556),y=r(82971),f=r(33955),m=r(1231);const g=new i.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=s=class extends u.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=y.Z.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const a=e[t],n=o.Z.fromJSON(a),i=a.geometry&&a.geometry.spatialReference;null==n.geometry||i||(n.geometry.spatialReference=r);const u=a.aggregateGeometries,l=n.aggregateGeometries;if(u&&null!=l)for(const e in l){const t=l[e],s=u[e],a=s?.spatialReference;null==t||a||(t.spatialReference=r)}s.push(n)}return s}writeGeometryType(e,t,r,s){if(e)return void g.write(e,t,r,s);const{features:a}=this;if(a)for(const e of a)if(e&&null!=e.geometry)return void g.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,f.im)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=y.Z.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,l.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const s=t.features[r];if(s.geometry){const t=e&&e[r];s.geometry=t&&t.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,a]}=e,n=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((a-e)/r)));for(let e=0,t=n.length;e<t;e++)o?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[s,a],scale:[n,o]}=r,i=this._getHydrationFunction(e,(e=>e*n+s),(e=>a-e*o));for(const{geometry:e}of t)null!=e&&i&&i(e);return this.transform=null,this}_quantizePoints(e,t,r){let s,a;const n=[];for(let o=0,i=e.length;o<i;o++){const i=e[o];if(o>0){const e=t(i[0]),o=r(i[1]);e===s&&o===a||(n.push([e-s,o-a]),s=e,a=o)}else s=t(i[0]),a=r(i[1]),n.push([s,a])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,f.oU)(e)?e.rings:e.paths,a=[];for(let e=0,n=s.length;e<n;e++){const n=s[e],o=this._quantizePoints(n,t,r);o&&a.push(o)}return a.length>0?((0,f.oU)(e)?e.rings=a:e.paths=a,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y)}:"polyline"===e||"polygon"===e?e=>{const s=(0,f.oU)(e)?e.rings:e.paths;let a,n;for(let e=0,o=s.length;e<o;e++){const o=s[e];for(let e=0,s=o.length;e<s;e++){const s=o[e];e>0?(a+=s[0],n+=s[1]):(a=s[0],n=s[1]),s[0]=t(a),s[1]=r(n)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax)}:"multipoint"===e?e=>{const s=e.points;let a,n;for(let e=0,o=s.length;e<o;e++){const o=s[e];e>0?(a+=o[0],n+=o[1]):(a=o[0],n=o[1]),o[0]=t(a),o[1]=r(n)}}:null}};(0,a._)([(0,c.Cb)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,a._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,a._)([(0,c.Cb)({type:[o.Z],json:{write:!0}})],_.prototype,"features",void 0),(0,a._)([(0,d.r)("features")],_.prototype,"readFeatures",null),(0,a._)([(0,c.Cb)({type:[m.Z],json:{write:!0}})],_.prototype,"fields",void 0),(0,a._)([(0,c.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,a._)([(0,h.c)("geometryType")],_.prototype,"writeGeometryType",null),(0,a._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,a._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,a._)([(0,c.Cb)({types:n.qM,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,a._)([(0,d.r)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,a._)([(0,c.Cb)({type:y.Z,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,a._)([(0,h.c)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,a._)([(0,c.Cb)({json:{write:!0}})],_.prototype,"transform",void 0),_=s=(0,a._)([(0,p.j)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0;const b=_}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9169],{29169:(e,t,i)=>{i.r(t),i.d(t,{default:()=>m});var s=i(20102),r=i(92604),o=i(24470),a=i(20322),n=i(10402),h=i(17590),l=i(11490),d=i(14165),u=i(74259);const c=r.Z.getLogger("esri.views.2d.layers.features.support.whereUtils"),_={getAttribute:(e,t)=>e.field(t)};async function y(e,t){const r=await Promise.resolve().then(i.bind(i,41534));try{const i=r.WhereClause.create(e,t);if(!i.isStandardized){const e=new s.Z("mapview - bad input","Unable to apply filter's definition expression, as expression is not standardized.",i);c.error(e)}return e=>{const t=e.readArcadeFeature();return i.testFeature(t,_)}}catch(t){return c.warn("mapview-bad-where-clause","Encountered an error when evaluating where clause",e),e=>!0}}class m{constructor(e){this._geometryBounds=(0,o.Ue)(),this._idToVisibility=new Map,this._serviceInfo=e}get hash(){return this._hash}check(e){return this._applyFilter(e)}clear(){const e=this._resetAllHiddenIds();return this.update(),{show:e,hide:[]}}invalidate(){this._idToVisibility.forEach(((e,t)=>{this._idToVisibility.set(t,0)}))}setKnownIds(e){for(const t of e)this._idToVisibility.set(t,1)}setTrue(e){const t=[],i=[],s=new Set(e);return this._idToVisibility.forEach(((e,r)=>{const o=!!(1&this._idToVisibility.get(r)),a=s.has(r);!o&&a?t.push(r):o&&!a&&i.push(r),this._idToVisibility.set(r,a?3:0)})),{show:t,hide:i}}createQuery(){const{geometry:e,spatialRel:t,where:i,timeExtent:s,objectIds:r}=this;return d.Z.fromJSON({geometry:e,spatialRel:t,where:i,timeExtent:s,objectIds:r})}async update(e,t){this._hash=JSON.stringify(e);const i=await(0,l.j6)(e,null,t);await Promise.all([this._setGeometryFilter(i),this._setIdFilter(i),this._setAttributeFilter(i),this._setTimeFilter(i)])}async _setAttributeFilter(e){if(!e||!e.where)return this._clause=null,void(this.where=null);this._clause=await y(e.where,this._serviceInfo.fieldsIndex),this.where=e.where}_setIdFilter(e){this._idsToShow=e&&e.objectIds&&new Set(e.objectIds),this._idsToHide=e&&e.hiddenIds&&new Set(e.hiddenIds),this.objectIds=e&&e.objectIds}async _setGeometryFilter(e){if(!e||!e.geometry)return this._spatialQueryOperator=null,this.geometry=null,void(this.spatialRel=null);const t=e.geometry,i=e.spatialRel||"esriSpatialRelIntersects",s=await(0,n.cW)(i,t,this._serviceInfo.geometryType,this._serviceInfo.hasZ,this._serviceInfo.hasM);(0,a.$P)(this._geometryBounds,t),this._spatialQueryOperator=s,this.geometry=t,this.spatialRel=i}_setTimeFilter(e){if(this.timeExtent=this._timeOperator=null,e&&e.timeExtent)if(this._serviceInfo.timeInfo)this.timeExtent=e.timeExtent,this._timeOperator=(0,h.y)(this._serviceInfo.timeInfo,e.timeExtent,u.k);else{const t=new s.Z("feature-layer-view:time-filter-not-available","Unable to apply time filter, as layer doesn't have time metadata.",e.timeExtent);r.Z.getLogger("esri.views.2d.layers.features.controllers.FeatureFilter").error(t)}}_applyFilter(e){return this._filterByGeometry(e)&&this._filterById(e)&&this._filterByTime(e)&&this._filterByExpression(e)}_filterByExpression(e){return!this.where||this._clause(e)}_filterById(e){return(!this._idsToHide||!this._idsToHide.size||!this._idsToHide.has(e.getObjectId()))&&(!this._idsToShow||!this._idsToShow.size||this._idsToShow.has(e.getObjectId()))}_filterByGeometry(e){if(!this.geometry)return!0;const t=e.readHydratedGeometry();return!!t&&this._spatialQueryOperator(t)}_filterByTime(e){return null==this._timeOperator||this._timeOperator(e)}_resetAllHiddenIds(){const e=[];return this._idToVisibility.forEach(((t,i)=>{1&t||(this._idToVisibility.set(i,1),e.push(i))})),e}}}}]);