@arcgis/core 5.0.0-next.5 → 5.0.0-next.7

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 (137) hide show
  1. package/analysis/VolumeMeasurement/volumeMeasurementConfiguration.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/020c8913d8e35d63080b.js +1 -0
  4. package/assets/esri/core/workers/chunks/{c2b47a7dc961863d283f.js → 02e69f0c63d97661da60.js} +1 -1
  5. package/assets/esri/core/workers/chunks/087973e7c4fea5fcfa5e.js +1 -0
  6. package/assets/esri/core/workers/chunks/{929ece362604dc301229.js → 17acde0245ecd956306c.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{8cea114168d849c38b1b.js → 20278683bddc8c2d8136.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{dc4982b0ac007bd70213.js → 22d6b8102e75bdef204c.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{3271614322ba4b44fb5a.js → 279366e6b743f9680603.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{f7c99e9c8d19352af38d.js → 3ac7562ea90f91a9f30c.js} +1 -1
  11. package/assets/esri/core/workers/chunks/3f3d492f1093b7832aab.js +1 -0
  12. package/assets/esri/core/workers/chunks/464d42bebb365287808d.js +1 -0
  13. package/assets/esri/core/workers/chunks/{d570c75a425aa29672c8.js → 4d599008e1ea42321b37.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{0686243904381ef863dc.js → 53bd8996e8812f1ad7b2.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{762fe93015b705546188.js → 5bd36dbf46c25bd961c8.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{b7a17927e14f502006b4.js → 5ea0c62016d56990787b.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{2ea6985da4eb0107bb9d.js → 5fc7b61f467f1d60a284.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{a87521ebe632bf783ef4.js → 62a49cfd9a2508950e9f.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{ec13053af1999701464a.js → 6826fe54562dcdc054d7.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{309c5f69ea06f3081d83.js → 73487b9d85e726e9c012.js} +1 -1
  21. package/assets/esri/core/workers/chunks/7413e582bc2b16af6a0f.js +1 -0
  22. package/assets/esri/core/workers/chunks/{88d942cd25bef74fd50a.js → 7461124454bfb4fb6474.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{147ad5fdd02f46b6da24.js → 7544316a75dbd981aea6.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{0f8847f9ae3068833fa4.js → 75bf27271a31e26e1b21.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{630efe10c871425b6a95.js → 76ae1702fecc7ad7017c.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{de1f75c907152df7e788.js → 794748fd1edc29a621cd.js} +1 -1
  27. package/assets/esri/core/workers/chunks/{e1258b6a404e58878c7a.js → 7aaaebbabee27690283c.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{6a69dafeb7c9ca8a3d84.js → 7c4a63aeead2505d6f02.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{d84373a6ec94dcfec8c2.js → 88074189fa10c335370b.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{a8c4fd779e454e4075c4.js → 8833c3d168951be4bf20.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{85622fe99f4d08afe875.js → 8a314b3790313e6dc5db.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{b0b2670596d6d8c32b5e.js → 8c056eac35d05d9524b7.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{1a713dcc9971e1935401.js → 8f56f298e7c1a283f407.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{dabc5a38a472c9719df9.js → 8ffd4710d168c2fcfd96.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{1da74aa308ded5748ef5.js → 90250e9239c173aace88.js} +1 -1
  36. package/assets/esri/core/workers/chunks/90b2b43b8b54c9a1ec35.js +1 -0
  37. package/assets/esri/core/workers/chunks/90f8b4bda28af43ea019.js +1 -0
  38. package/assets/esri/core/workers/chunks/{89027f6800e17fab8973.js → 9486032af3e934d85582.js} +1 -1
  39. package/assets/esri/core/workers/chunks/95c594a87b732f5c4979.js +1 -0
  40. package/assets/esri/core/workers/chunks/{239377336a2009caea01.js → 99859dce1925b406ccd0.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{a137c27ce078bea44f89.js → 9e8dceef4c961f56940d.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{f5b7e7f2860a825ed373.js → 9fac5a12e878cd745354.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{f779034623980bf9a37c.js → a06bac9b8f9e18874de8.js} +2 -2
  44. package/assets/esri/core/workers/chunks/{01642fe19e81bfa33eb5.js → a395373e3173e6458a56.js} +1 -1
  45. package/assets/esri/core/workers/chunks/a3991ae8caa713d4ddcd.js +1 -0
  46. package/assets/esri/core/workers/chunks/{a6ac1ff89c40f3a4797a.js → a712cdff78fc826acd8c.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{af3fc2562bb6d217adf6.js → aa54b6f2aba6952af149.js} +1 -1
  48. package/assets/esri/core/workers/chunks/ac26e3e77df4302f47a2.js +1 -0
  49. package/assets/esri/core/workers/chunks/af5fc5d6c1d072a27df1.js +1 -0
  50. package/assets/esri/core/workers/chunks/{bc3bcf88b252760e2574.js → b3028b1ff75eafd0c358.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{5875a51b97ee9bd438a0.js → bc241c7735e4efba734a.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{56916e56c20465428dd4.js → be3b874f86f627f4fa98.js} +1 -1
  53. package/assets/esri/core/workers/chunks/c4e4da69969499a89a2c.js +1 -0
  54. package/assets/esri/core/workers/chunks/c8733cd621105afab2ac.js +1 -0
  55. package/assets/esri/core/workers/chunks/ccc0da0e01f023c8aa1f.js +1 -0
  56. package/assets/esri/core/workers/chunks/{c0b7e86860838638537f.js → cd1930f08e1fc8b30b14.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{551c6c89b51b99f4864b.js → d1fe816b6990918c13c7.js} +1 -1
  58. package/assets/esri/core/workers/chunks/{8605ec4678eb4511c715.js → d305a21666b1ed5bf33d.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{037b2548bf85e2d7c6ac.js → d40f57f9fc47f9a9f97c.js} +1 -1
  60. package/assets/esri/core/workers/chunks/{a29d7205394cb8b2a847.js → d97fadbc69e055d183a0.js} +1 -1
  61. package/assets/esri/core/workers/chunks/dedc4583b5f32a278124.js +1 -0
  62. package/assets/esri/core/workers/chunks/{e5bcc44f3dc6fc90835a.js → e5a06ce0ef6a9a90e100.js} +1 -1
  63. package/assets/esri/core/workers/chunks/f0e0a63962784acb4ba1.js +1 -0
  64. package/assets/esri/core/workers/chunks/f4d0ae6be1b3984228d0.js +1 -0
  65. package/assets/esri/core/workers/chunks/{7c5c272612198db83851.js → f5e47eea8720ba84665b.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{fa4411e0a5ac3fcba365.js → f65c0102af17390a50ac.js} +1 -1
  67. package/assets/esri/core/workers/chunks/f6c11c8ac687de3ef1ab.js +1 -0
  68. package/assets/esri/core/workers/chunks/{7596d005a4dc3964b140.js → f6c8beb60f6d29945a2e.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{a2a284d4dd5caaecbc2e.js → f746e3f7ebff2bbdf333.js} +1 -1
  70. package/assets/esri/core/workers/chunks/f9324e88c359c03f35aa.js +1 -0
  71. package/assets/esri/core/workers/chunks/{cfa3164e7fa1884dc2b9.js → facb3886714222772ab2.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{aa6eb55e4fb57c4e8eeb.js → fd2efd1d1cf9d95a87e6.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{fe3f95fda29e4844b153.js → fe77ae6cf232a7a3298e.js} +1 -1
  74. package/assets/esri/core/workers/chunks/{2ce4a0fe4fae63c43a81.js → ff35a077ac6776469805.js} +1 -1
  75. package/assets/esri/themes/base/widgets/_UtilityNetworkTrace.scss +14 -4
  76. package/assets/esri/themes/dark/main.css +1 -1
  77. package/assets/esri/themes/light/main.css +1 -1
  78. package/assets/esri/themes/light/view.css +1 -1
  79. package/config.js +1 -1
  80. package/core/Identifiable.js +1 -1
  81. package/core/MultiOriginJSONSupport.js +1 -1
  82. package/core/NumericIdentifiable.js +5 -0
  83. package/core/WriteableMultiOriginJSONMixin.js +5 -0
  84. package/core/performance.js +5 -0
  85. package/core/scheduling.js +1 -1
  86. package/editing/sharedTemplates/executor/support/createFeatureServiceEdit.js +1 -1
  87. package/interfaces.d.ts +18 -2
  88. package/kernel.js +1 -1
  89. package/layers/support/MediaElementBase.js +1 -1
  90. package/layers/support/fieldUtils.js +1 -1
  91. package/package.json +3 -3
  92. package/support/basemapDefinitions.js +1 -1
  93. package/support/revision.js +1 -1
  94. package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
  95. package/undoredo/support/Services.js +1 -1
  96. package/views/2d/constraints/GeometryConstraint.js +1 -1
  97. package/views/2d/constraints/RotationConstraint.js +1 -1
  98. package/views/2d/constraints/ZoomConstraint.js +1 -1
  99. package/views/2d/engine/vectorTiles/decluttering/SymbolFader.js +1 -1
  100. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  101. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +1 -1
  102. package/views/3d/layers/FlowSubView3D.js +1 -1
  103. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  104. package/views/3d/layers/graphics/Graphics3DFeatureStore.js +1 -1
  105. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  106. package/views/3d/layers/support/ImageHighlightHelper3D.js +1 -1
  107. package/views/3d/layers/support/lyr3dTypeConversions.js +1 -1
  108. package/views/3d/support/flow/FlowSubViewExtent3D.js +1 -1
  109. package/views/3d/support/flow/StreamlineResources3DOverlay.js +1 -1
  110. package/views/3d/support/flow/StreamlineResources3DShape.js +1 -1
  111. package/views/3d/terrain/OverlayRenderer.js +1 -1
  112. package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
  113. package/views/analysis/ElevationProfile/constants.js +1 -1
  114. package/views/support/Scheduler.js +1 -1
  115. package/widgets/Attachments/AttachmentsViewModel.js +1 -1
  116. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  117. package/widgets/Search/LayerSearchSource.js +1 -1
  118. package/widgets/UtilityNetworkTrace.js +1 -1
  119. package/assets/esri/core/workers/chunks/0366b78b0ccf4ed5f6ac.js +0 -1
  120. package/assets/esri/core/workers/chunks/0429c1a3690f20647c9f.js +0 -1
  121. package/assets/esri/core/workers/chunks/0f100e163e1847e04155.js +0 -1
  122. package/assets/esri/core/workers/chunks/1eedac33c9fcd7681427.js +0 -1
  123. package/assets/esri/core/workers/chunks/2f03d33f4ca8a48461fc.js +0 -1
  124. package/assets/esri/core/workers/chunks/50864c1924030e62497d.js +0 -1
  125. package/assets/esri/core/workers/chunks/655360995c1cbc78a5a3.js +0 -1
  126. package/assets/esri/core/workers/chunks/71762199aef5d3107da2.js +0 -1
  127. package/assets/esri/core/workers/chunks/72c851c400752094b162.js +0 -1
  128. package/assets/esri/core/workers/chunks/7558919912f7fdc4837b.js +0 -1
  129. package/assets/esri/core/workers/chunks/829bc5dbda2f51561446.js +0 -1
  130. package/assets/esri/core/workers/chunks/98311fec6c16a1b23586.js +0 -1
  131. package/assets/esri/core/workers/chunks/a61cb4f1ca282bf8b75d.js +0 -1
  132. package/assets/esri/core/workers/chunks/bc6619307f312f9241bf.js +0 -1
  133. package/assets/esri/core/workers/chunks/bfc1e8aec7aace3ff30e.js +0 -1
  134. package/assets/esri/core/workers/chunks/c134ebbaeac514cbd657.js +0 -1
  135. package/assets/esri/core/workers/chunks/c368a8e8d2f1535af446.js +0 -1
  136. package/assets/esri/core/workers/chunks/d886fb97bdb348a16f25.js +0 -1
  137. package/assets/esri/core/workers/chunks/e6a86cad44056735ed26.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5369],{159:(e,t,n)=>{n.d(t,{A:()=>u});var i,s=n(31635),r=n(69622),o=n(10107),a=(n(44208),n(53966),n(87811),n(64108)),l=n(99157);let u=i=class extends r.A{constructor(e){super(e),this.steps=[]}getInverse(){const e=new i;for(let t=this.steps.length-1;t>=0;t--){const n=this.steps[t];e.steps.push(n.getInverse())}return e}};(0,s.Cg)([(0,o.MZ)({type:[l.A],nonNullable:!0})],u.prototype,"steps",void 0),u=i=(0,s.Cg)([(0,a.$)("esri.geometry.operators.support.GeographicTransformation")],u)},9762:(e,t,n)=>{n.r(t),n.d(t,{projectBuffer:()=>s});var i=n(37539);function s(e,t,n,s,r,o,a=Math.floor(e.length/3)){const l=(0,i.jd)(t,r);if(null==l)return!1;if(l===i.pO){if(e===s&&n===o)return!0;const t=n+3*a;for(let i=n,r=o;i<t;i++,r++)s[r]=e[i];return!0}const u=n+3*a;for(let t=n,i=o;t<u;t+=3,i+=3)l(e,t,s,i);return!0}},37539:(e,t,n)=>{n.d(t,{pO:()=>h,jd:()=>d,Tp:()=>f,w5:()=>p});var i=n(34727),s=n(83047),r=n(73941),o=n(79258);Math.PI;const a=o.$O.radius,l=o.$O.eccentricitySquared,u={a1:a*l,a2:a*l*a*l,a3:a*l*l/2,a4:a*l*a*l*2.5,a5:a*l+a*l*l/2,a6:1-l};o.$O.radius,o.$O.flattening,o.Sw.radius,o.Sw.flattening,o.sH.radius,o.sH.flattening,o.sH.radius;var c=n(21325);const p={2:{5:h,7:null,9:null,10:h,1:I,6:null,8:null,0:null,3:v,11:y,2:h,4:D},5:{5:h,7:null,9:null,10:h,1:I,6:null,8:null,0:null,3:v,11:y,2:h,4:D},7:{5:null,7:h,9:null,10:h,1:null,6:C,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:h,10:h,1:null,6:null,8:b,0:null,3:null,11:null,2:null,4:null},3:{5:g,7:null,9:null,10:g,1:function(e,t,n,i){const s=e[t]/V,r=N-2*Math.atan(Math.exp(-e[t+1]/V)),o=V+e[t+2],a=Math.cos(r)*o;n[i]=Math.cos(s)*a,n[i+1]=Math.sin(s)*a,n[i+2]=Math.sin(r)*o},6:null,8:null,0:null,3:h,11:function(e,t,n,i){g(e,t,n,i),y(n,i,n,i)},2:g,4:function(e,t,n,i){g(e,t,n,i),D(n,i,n,i)}},4:{5:T,7:null,9:null,10:T,1:function(e,t,n,i){T(e,t,n,i),I(n,i,n,i)},6:null,8:null,0:null,3:function(e,t,n,i){T(e,t,n,i),v(n,i,n,i)},11:function(e,t,n,i){T(e,t,n,i),y(n,i,n,i)},2:T,4:h},1:{5:R,7:null,9:null,10:R,1:h,6:null,8:null,0:null,3:function(e,t,n,i){R(e,t,n,i),v(n,i,n,i)},11:function(e,t,n,i){R(e,t,n,i),y(n,i,n,i)},2:R,4:function(e,t,n,i){R(e,t,n,i),D(n,i,n,i)}},6:{5:null,7:M,9:null,10:M,1:null,6:h,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:A,10:A,1:null,6:null,8:h,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:h,3:null,11:null,2:null,4:null},10:{5:h,7:h,9:h,10:h,1:I,6:C,8:b,0:null,3:v,11:y,2:h,4:D},11:{5:w,7:null,9:null,10:w,1:function(e,t,n,i){w(e,t,n,i),I(n,i,n,i)},6:null,8:null,0:null,3:function(e,t,n,i){w(e,t,n,i),v(n,i,n,i)},11:h,2:w,4:function(e,t,n,i){w(e,t,n,i),D(n,i,n,i)}}};function d(e,t){return f(e,t)?.projector}function f(e,t){if(null==e||null==t)return null;if(P.source.spatialReference===e&&P.dest.spatialReference===t)return P;const n=m(e,P.source),i=m(t,P.dest);return 0===n&&0===i?(0,c.aI)(e,t)?P.projector=h:P.projector=null:P.projector=p[n][i],P}function m(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,s.GA)(e,1)),(0,r.jA)(e)?t.spatialReferenceId=1:(0,c.oT)(e)?t.spatialReferenceId=2:(0,c.K8)(e)?t.spatialReferenceId=3:(0,c.r1)(e)?t.spatialReferenceId=11:e.wkt===r.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===r.FY.wkt?t.spatialReferenceId=6:e.wkt===r.LJ.wkt?t.spatialReferenceId=8:(0,c.q8)(e)?t.spatialReferenceId=7:(0,c.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function h(e,t,n,i){e!==n&&(n[i++]=e[t++],n[i++]=e[t++],n[i]=e[t])}function g(e,t,n,i){n[i]=O*(e[t]/V),n[i+1]=O*(N-2*Math.atan(Math.exp(-e[t+1]/V))),n[i+2]=e[t+2]}function v(e,t,n,s){!function(e,t,n,s,r){const o=.4999999*Math.PI,a=(0,i.qE)(L*e[t+1],-o,o),l=Math.sin(a);n[s++]=L*e[t]*r.radius,n[s++]=r.halfSemiMajorAxis*Math.log((1+l)/(1-l)),n[s]=e[t+2]}(e,t,n,s,o.$O)}function y(e,t,n,i){n[i]=e[t]*$,n[i+1]=e[t+1]*$,n[i+2]=e[t+2]}function w(e,t,n,i){n[i]=e[t]*E,n[i+1]=e[t+1]*E,n[i+2]=e[t+2]}function x(e,t,n,i,s){const r=s+e[t+2],o=L*e[t+1],a=L*e[t],l=Math.cos(o)*r;n[i]=Math.cos(a)*l,n[i+1]=Math.sin(a)*l,n[i+2]=Math.sin(o)*r}function b(e,t,n,i){x(e,t,n,i,o.Sw.radius)}function C(e,t,n,i){x(e,t,n,i,o.sH.radius)}function I(e,t,n,i){x(e,t,n,i,o.$O.radius)}function S(e,t,n,s,r){const o=e[t],a=e[t+1],l=e[t+2],u=Math.sqrt(o*o+a*a+l*l),c=(0,i.YN)(l/(0===u?1:u)),p=Math.atan2(a,o);n[s++]=O*p,n[s++]=O*c,n[s]=u-r}function A(e,t,n,i){S(e,t,n,i,o.Sw.radius)}function M(e,t,n,i){S(e,t,n,i,o.sH.radius)}function R(e,t,n,i){S(e,t,n,i,o.$O.radius)}function D(e,t,n,i){!function(e,t,n,i,s){const r=L*e[t],o=L*e[t+1],a=e[t+2],l=Math.sin(o),u=Math.cos(o),c=s.radius/Math.sqrt(1-s.eccentricitySquared*l*l);n[i++]=(c+a)*u*Math.cos(r),n[i++]=(c+a)*u*Math.sin(r),n[i++]=(c*(1-s.eccentricitySquared)+a)*l}(e,t,n,i,o.$O)}function T(e,t,n,i){const s=u,r=e[t],a=e[t+1],l=e[t+2];let c,p,d,f,m,h,g,v,y,w,x,b,C,I,S,A,M,R,D,T,P;c=Math.abs(l),p=r*r+a*a,d=Math.sqrt(p),f=p+l*l,m=Math.sqrt(f),T=Math.atan2(a,r),h=l*l/f,g=p/f,I=s.a2/m,S=s.a3-s.a4/m,g>.3?(v=c/m*(1+g*(s.a1+I+h*S)/m),D=Math.asin(v),w=v*v,y=Math.sqrt(1-w)):(y=d/m*(1-h*(s.a5-I-g*S)/m),D=Math.acos(y),w=1-y*y,v=Math.sqrt(w)),x=1-o.$O.eccentricitySquared*w,b=o.$O.radius/Math.sqrt(x),C=s.a6*b,I=d-b*y,S=c-C*v,M=y*I+v*S,A=y*S-v*I,R=A/(C/x+M),D+=R,P=M+A*R/2,l<0&&(D=-D),n[i++]=O*T,n[i++]=O*D,n[i]=P}const P={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:h},L=(0,i.kU)(1),O=(0,i.KJ)(1),N=.5*Math.PI,V=o.$O.radius,$=V*Math.PI/180,E=180/(V*Math.PI)},38458:(e,t,n)=>{n.d(t,{m:()=>s});const i=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function s(e){return null!=e&&i.some(([t,n])=>e>=t&&e<=n)}},62815:(e,t,n)=>{n.d(t,{N:()=>o});var i=n(83047),s=n(73941),r=n(21325);function o(e,t,n){if(null==t||null==n||n.vcsWkid||(0,r.aI)(t,n)||(0,s.xP)(t)||(0,s.xP)(n))return null;const o=(0,i.G9)(t)/(0,i.G9)(n);if(1===o)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const n of e.paths)for(const e of n)e.length>2&&(e[2]*=t)}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const n of e.rings)for(const e of n)e.length>2&&(e[2]*=t)}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const n of e.points)n.length>2&&(n[2]*=t)}(e,o);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return null}}},88854:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Ae});var i=n(31635),s=n(37838),r=n(69540),o=n(49186),a=n(92071),l=n(74887),u=n(36708),c=n(10107),p=(n(44208),n(53966)),d=(n(87811),n(64108)),f=n(89808),m=n(99959);const h=Symbol("isWCSGraphicOrigin");var g;class v extends m.A{get[(g=h,f.Q)](){return this.layer}constructor(e){super(),this[g]=!0,this.type="wcs",this.layer=e}get id(){return this.layer.id}}var y=n(4146),w=n(63074),x=n(69208),b=n(89015),C=n(16131),I=n(8303),S=n(63660),A=n(54310),M=n(25036),R=n(82935),D=n(10873),T=n(20437),P=n(74797),L=n(5443),O=n(38458),N=n(78888),V=n(50103);function $(e){return e.endsWith("?")?e.slice(0,-1):e}function E(e){return e.filter(({coverageSubType:e})=>null==e||""===e||/^rectified(grid|dataset)/i.test(e))}function k(e){const t={};for(let n=0;n<e.childNodes.length;n++){const i=e.childNodes[n];if(1!==i.nodeType)continue;const s=(0,V.vv)(i).toLowerCase();switch(s){case"title":case"abstract":t[s]=(0,V.mX)(i);break;case"identifier":t.id=(0,V.mX)(i);break;case"wgs84boundingbox":{const e=(0,V.pN)(i,"LowerCorner"),n=(0,V.pN)(i,"UpperCorner");t.lonLatEnvelope=new L.A({xmin:e[0],ymin:e[1],xmax:n[0],ymax:n[1],spatialReference:{wkid:4326}})}break;case"coveragesummary":t.coverageSummaries=t.coverageSummaries||[],t.coverageSummaries.push(k(i))}}return t}function j(e,t){if(e.coverageSummaries)for(let n=0;n<e.coverageSummaries.length;n++)e.coverageSummaries[n].abstract=e.coverageSummaries[n].abstract||e.abstract,e.coverageSummaries[n].lonLatEnvelope=e.coverageSummaries[n].lonLatEnvelope||e.lonLatEnvelope,e.coverageSummaries[n].title=e.coverageSummaries[n].title||e.title,j(e.coverageSummaries[n],t);null!=e.id&&t.push(e)}function G(e){const t=(0,V.V6)(e.querySelector("Operation[name=GetCapabilities]"),"Get")?.getAttribute("xlink:href")||"",n=(0,V.V6)(e.querySelector("Operation[name=DescribeCoverage]"),"Get")?.getAttribute("xlink:href")||"",i=(0,V.V6)(e.querySelector("Operation[name=GetCoverage]"),"Get")?.getAttribute("xlink:href")||"";return{getCapabilities:$(t),describeCoverage:$(n),getCoverage:$(i)}}function X(e,t=null){let n=null;n="string"==typeof e?(new DOMParser).parseFromString(e,"text/xml"):e;let i=n.documentElement.getAttribute("version");"1.0"===i?i="1.0.0":"1.1"===i&&(i="1.1.0");const s=i||t||"1.0.0",r=s.slice(0,3);let a;if("2.0"===r)a=function(e){const t=(0,V.V6)(e,"ServiceIdentification"),n=(0,V.mX)(t,"Title"),i=(0,V.Dy)(t,"ServiceTypeVersion"),s=(0,V.Dy)(t,"Profile"),r=G((0,V.V6)(e,"OperationsMetadata")),o=(0,V.IC)(e,"Contents/CoverageSummary"),a=[];for(let e=0;e<o.length;e++){const t=o[e],n=(0,V.mX)(t,"CoverageId"),i=(0,V.V6)(t,"WGS84BoundingBox");let s;if(i){const e=(0,V.pN)(i,"LowerCorner"),t=(0,V.pN)(i,"UpperCorner");s=new L.A({xmin:e[0],ymin:e[1],xmax:t[0],ymax:t[1],spatialReference:{wkid:4326}})}const r=(0,V.mX)(t,"CoverageSubtype")||"RectifiedGridCoverage";a.push({id:n,lonLatEnvelope:s,coverageSubType:r})}const l=(0,V.V6)(e,"ServiceMetadata");return{name:n,supportedVersions:i,supportedFormats:(0,V.Dy)(l,"formatSupported"),supportedInterpolations:(0,V.Dy)(l,"interpolationSupported").concat((0,V.Dy)(l,"InterpolationSupported")),onlineResources:r,profiles:s,coverages:a,gridCoverages:E(a),version:"2.0.1"}}(n);else if("1.1"===r)a=function(e){const t=(0,V.mX)(e,"ServiceIdentification/Title"),n=(0,V.Dy)(e,"ServiceIdentification/ServiceTypeVersion"),i=G((0,V.V6)(e,"OperationsMetadata")),s=[],r=(0,V.V6)(e,"Contents");for(let e=0;e<r.childNodes.length;e++){const t=r.childNodes[e];1===t.nodeType&&(0,V.g7)(t,"CoverageSummary")&&j(k(t),s)}const o=(0,V.Dy)(r,"SupportedFormat");return{name:t,onlineResources:i,coverages:s,gridCoverages:E(s),supportedVersions:n,supportedFormats:o,version:"1.1.0"}}(n);else{if("1.0"!==r)throw new o.A("wcsraster:parsecapabilities","the capabilities version is not supported");a=function(e){const t=(0,V.mX)(e,"Service/name"),n=(0,V.V6)(e,"Capability"),i=(0,V.V6)(n,"GetCapabilities/Get/OnlineResource")?.getAttribute("xlink:href")??"",s=(0,V.V6)(n,"DescribeCoverage/Get/OnlineResource")?.getAttribute("xlink:href")??"",r=(0,V.V6)(n,"GetCoverage/Get/OnlineResource")?.getAttribute("xlink:href")??"",o={getCapabilities:$(i),describeCoverage:$(s),getCoverage:$(r)},a=(0,V.IC)(e,"CoverageOfferingBrief"),l=[];for(let e=0;e<a.length;e++){const t=a[e],n=(0,V.mX)(t,"name"),i=(0,V.IC)(t,"pos"),s=(0,V.pN)(i[0]),r=(0,V.pN)(i[1]),o=new L.A({xmin:s[0],ymin:s[1],xmax:r[0],ymax:r[1],spatialReference:{wkid:4326}});l.push({id:n,lonLatEnvelope:o})}return{name:t,onlineResources:o,coverages:l,gridCoverages:E(l),supportedVersions:["1.0.0"],version:"1.0.0"}}(n)}return a.version=s,a}var F=n(39829),W=n(87186),q=n(77301);function Z(e){e.variables.forEach(e=>e.dimensions.forEach(e=>e.values??=(0,q.Xg)(e)))}function B(e){return{requestResponseCRSs:(0,V.Dy)(e,"requestResponseCRSs").map(e=>e.split(":")[1]),nativeCRSs:(0,V.Dy)(e,"nativeCRSs").map(e=>e.split(":")[1])}}function _(e,t){const n=(0,V.Dy)(e,"1.0.0"===t?"interpolationMethod":"InterpolationMethod"),i="1.0.0"===t?e.getAttribute("default"):(0,V.mX)(e,"InterpolationMethods/Default");return null!=i?[i].concat(n.filter(e=>e.toLowerCase()!==i.toLowerCase())):n}function z(e){return null==e?["nearest"]:e.map(e=>{const t=e.toLowerCase();return t.includes("nearest")?"nearest":t.includes("linear")?"bilinear":t.includes("cubic")?"cubic":null}).filter(e=>!!e)}function U(e){const t=(0,V.IC)(e,"pos"),n=(0,V.pN)(t[0]),i=(0,V.pN)(t[1]);return new L.A({xmin:n[0],ymin:n[1],xmax:i[0],ymax:i[1],spatialReference:{wkid:4326}})}function H(e,t){const n=(0,V.Dy)(e,t);return n?.length&&""!==n[0]&&!isNaN(Number(n[0]))?n.map(e=>Number(e)):null}function K(e){const t=(0,V.pN)(e,"MinimumValue"),n=(0,V.pN)(e,"MaximumValue");return t.length&&n.length?t.map((e,t)=>({min:e,max:n[t],avg:-1,stddev:-1})):null}function Y(e){return null==e?null:e.every(t=>t===e[0])?e[0]:e}function Q(e){const t=[],n=(0,V.IC)(e,"RangeSet");let i=[];for(let e=0;e<n.length;e++){const s=(0,V.mX)(n[e],"name"),r=(0,V.mX)(n[e],"label"),o=[],a=H(n[e],"nullValues/singleValue"),l=(0,V.IC)(n[e],"AxisDescription");for(let e=0;e<l.length;e++){const t=(0,V.mX)(l[e],"name"),n=(0,V.mX)(l[e],"label"),s=(0,V.Dy)(l[e],"singleValue");if(0===s.length){const t=(0,V.mX)(l[e],"min"),n=(0,V.mX)(l[e],"max"),i=Number((0,V.mX)(l[e],"res"))||1;if(null!==t&&null!==n)for(let e=parseInt(t,10);e<=parseInt(n,10);e+=i)s.push(e.toString())}"band"===t.toLowerCase()&&(i=s),o.push({name:t,label:n,values:s})}t.push({name:s,label:r,nullValues:a,axis:o})}return{rangeSet:t,bandNames:i}}function J(e=null){if(!e)return{resolution:null,units:null};let t=e.toUpperCase();const n=["Years","Months","Days","Hours","Minutes","Seconds"];let i,s,r;return t.includes("PT")?(t=t.slice(2),r=["H","M","S"].findIndex(e=>t.includes(e)),i=n[3+r],s=parseFloat(t.slice(0,-1))):(t=t.slice(1),r=["Y","M","D"].findIndex(e=>t.includes(e)),r>-1&&(i=n[r]),s=parseFloat(t.slice(0,-1))),{resolution:s,units:i}}function ee(e){const t=(0,V.IC)(e,"timeposition");if(t.length>0){const e=[];for(let n=0;n<t.length;n++)e.push(new Date((0,V.mX)(t[n])));return{begin:e[0],end:e[e.length-1],values:e}}const n=(0,V.V6)(e,"timePeriod")||(0,V.V6)(e,"TimePeriod");return n?{begin:new Date((0,V.mX)(n,"beginPosition")||(0,V.mX)(n,"BeginPosition")),end:new Date((0,V.mX)(n,"endPosition")||(0,V.mX)(n,"EndPosition")),...J((0,V.mX)(n,"timeResolution")||(0,V.mX)(n,"TimeResolution"))}:null}function te(e){const t=(0,V.V6)(e,"spatialDomain"),n=(0,V.V6)(t,"Envelope")||(0,V.V6)(t,"EnvelopeWithTimePeriod"),i=n.getAttribute("srsName").split(":"),s=i[i.length-1],r=(0,V.IC)(n,"pos"),o=(0,V.pN)(r[0]),a=(0,V.pN)(r[1]),l=parseInt(s,10),u=isNaN(l)?null:{wkid:l},c=new L.A({xmin:o[0],ymin:o[1],xmax:a[0],ymax:a[1],spatialReference:u}),p=(0,V.V6)(t,"RectifiedGrid"),d=(0,V.mX)(p,"low").split(" "),f=(0,V.mX)(p,"high").split(" "),m=parseInt(f[0],10)-parseInt(d[0],10)+1,h=parseInt(f[1],10)-parseInt(d[1],10)+1,g=(0,V.pN)(t,"origin/pos"),v=(0,V.IC)(t,"offsetVector"),y={envelope:c,columns:m,rows:h,offset:{x:parseFloat((0,V.mX)(v[0]).split(" ")[0]),y:parseFloat((0,V.mX)(v[1]).split(" ")[1])},origin:{x:g[0],y:g[1]}},w=(0,V.V6)(e,"temporalDomain")||(0,V.V6)(e,"TemporalDomain");return{spatialDomain:y,temporalDomain:w?ee(w):null}}function ne(e,t){const n=[],i=(0,V.IC)(e,"Field");let s,r=[];for(let e=0;e<i.length;e++){const o=(0,V.mX)(i[e],"Identifier"),a=(0,V.mX)(i[e],"Description"),l=(0,V.mX)(i[e],"Definition"),u=(0,V.mX)(i[e],"Abstract"),c=(0,V.mX)(i[e],"Title"),p=H(i[e],"NullValue"),d=(0,V.V6)(i[e],"AllowedValues"),f=d?K(d):null,m=_(i[e],"1.1.0"),h=[],g=(0,V.IC)(i[e],"Axis");for(let e=0;e<g.length;e++){const n=g[e].getAttribute("identifier"),i=(0,V.mX)(g[e],"UOM"),o=(0,V.mX)(g[e],"DataType"),a=(0,V.Dy)(g[e],"Key");t&&!n.toLowerCase().includes("band")||(r=a,s=p),h.push({identifier:n,uom:i,dataType:o,values:a,bandNoDataValues:s})}n.push({identifier:o,description:a,definition:l,abstract:u,title:c,supportedInterpolations:m,axis:h,nullValues:p,statistics:f})}return{rangeSet:n,bandNames:r,bandNoDataValues:s,statistics:n[0].statistics}}function ie(e){const t=(0,V.V6)(e,"SpatialDomain"),n=(0,V.V6)(t,"GridCRS"),i=(0,V.mX)(n,"GridBaseCRS"),s=(0,V.mX)(n,"GridOrigin"),r=s?.split(" ").map(e=>parseFloat(e))??[0,0],o=(0,V.pN)(n,"GridOffsets"),a=(0,V.IC)(t,"BoundingBox");let l,u,c,p;for(let e=0;e<a.length;e++){const t=a[e].getAttribute("crs")?.toLowerCase();if(null!=t)if(t.includes("imagecrs")){const t=(0,V.pN)(a[e],"LowerCorner"),n=(0,V.pN)(a[e],"UpperCorner");l=n[0]-t[0]+1,u=n[1]-t[1]+1}else if(t.indexOf("epsg")>0){const n=t.split(":");c=parseInt(n[n.length-1],10);const i=(0,V.pN)(a[e],"LowerCorner"),s=(0,V.pN)(a[e],"UpperCorner");p=new L.A({xmin:i[0],ymin:i[1],xmax:s[0],ymax:s[1],spatialReference:{wkid:c}})}}const d=l>u,f=p.xmax-p.xmin>p.ymax-p.ymin;let m=!1;(0,O.m)(c)&&(d===f?m=!1:(m=!0,p=new L.A({xmin:p.ymin,ymin:p.xmin,xmax:p.ymax,ymax:p.xmax,spatialReference:{wkid:c}})));const h={columns:l,rows:u,origin:{x:r[0],y:r[1]},offset:{x:o[0],y:o[o.length-1]},gridBaseCRS:i,envelope:p,useEPSGAxis:m},g=(0,V.V6)(e,"temporalDomain")||(0,V.V6)(e,"TemporalDomain");return{spatialDomain:h,temporalDomain:g?ee(g):null}}function se(e){const t=(0,V.V6)(e,"Envelope")||(0,V.V6)(e,"EnvelopeWithTimePeriod"),n=t.getAttribute("srsName"),i=n.slice(n.lastIndexOf("/")+1),s=t.getAttribute("axisLabels").split(" ").map(e=>e.trim()).filter(e=>""!==e.trim()),r=(0,V.pN)(t,"lowerCorner"),o=(0,V.pN)(t,"upperCorner"),a=!["y","lat","latitude","north","nor","n","b"].includes(s[0].toLowerCase());let l;const u=parseInt(i,10),c=isNaN(u)?null:{wkid:u};l=new L.A(a?{xmin:r[0],ymin:r[1],xmax:o[0],ymax:o[1],spatialReference:c}:{xmin:r[1],ymin:r[0],xmax:o[1],ymax:o[0],spatialReference:c});const p={mins:r,maxs:o},d=t.getAttribute("uomLabels").trim().split(" ");let f,m;if((0,V.g7)(t,"EnvelopeWithTimePeriod")){f=new Date((0,V.mX)(e,"beginPosition")||(0,V.mX)(e,"BeginPosition")),m=new Date((0,V.mX)(e,"endPosition")||(0,V.mX)(e,"EndPosition"));const t=d?.findIndex(e=>"oledatetime"===e?.toLowerCase());t>-1&&(d[t]="ISO8601")}return{envelope:l,axisLabels:s,uomLabels:d.length?d:null,envelopeAllDims:p,beginPosition:f,endPosition:m,isEastFirst:a}}function re(e,t){const n=[],i=(0,V.IC)(e,"DataRecord"),s=[];let r,o=[];for(let e=0;e<i.length;e++){const a=(0,V.IC)(i[e],"field"),l=[];for(let e=0;e<a.length;e++){const n=a[e].getAttribute("name"),i=(0,V.mX)(a[e],"description")||"",u=(0,V.V6)(a[e],"uom")?.getAttribute("code")||"",c=(0,V.pN)(a[e],"interval"),p=H(a[e],"nilValue")?.[0];t&&!n.toLowerCase().includes("band")||(s.push(n),c?.length&&(r=r||[],r.push({min:c[0],max:c[1],avg:-1,stddev:-1})),o.push(p)),l.push({name:n,description:i,uom:u,allowedValues:c,nilValue:p})}n.push(l)}return o.some(e=>null!=e)||(o=null),{rangeType:n,bandNames:s,bandStats:r,bandNoDataValues:o}}function oe(e){let t=1,n="";const i=.01;return Math.abs(e-1/24)<1/24*i?n="Hours":Math.abs(e-1)<1*i?n="Days":e<1?(t=Math.round(24*e),n="Hours"):e>28-i&&e<31+i||Math.round(e/30)<12?n="Months":e>365-i&&e<366+i&&(n="Years"),{interval:t,intervalUnit:n}}function ae(e,t){const n=(0,V.V6)(e,"RectifiedGrid"),i=(0,V.pN)(n,"low"),s=(0,V.pN)(n,"high"),r=[];for(let e=0;e<i.length;e++)r.push(s[e]-i[e]+1);const o=(0,V.mX)(n,"axisLabels").split(" "),a=(0,V.pN)(n,"origin/pos"),l=(0,V.IC)(n,"offsetVector"),u=[];for(let e=0;e<l.length;e++){const t=(0,V.pN)(l[e]),n=t.findIndex(e=>0!==e);u[n]=t[n]}let c,p,d,f=!1;return t?.length&&o?.length&&(f=[...t].sort((e,t)=>e<t?-1:1).join(",")===[...o].sort((e,t)=>e<t?-1:1).join(",")),["y","lat","latitude","north","nor","n","b"].includes((f?o:t)[0].toLowerCase())?(c=r[1],p=r[0],d={y:Math.abs(u[0]),x:Math.abs(u[1])}):(c=r[0],p=r[1],d={x:Math.abs(u[0]),y:Math.abs(u[1])}),{columns:c,rows:p,origin:a,offset:u,resolution:d,gridSamples:r,axisLabels:o,hasSameAxisLabelsAsBoundedBy:f}}function le(e){const t=(0,V.V6)(e,"EarthObservation");if(!t)return null;const n=(0,V.V6)(t,"phenomenonTime"),i=n?ee(n):null,s=(0,V.V6)(t,"phenomenonTime"),r=s?ee(s):null,o=(0,V.mX)(t,"featureOfInterest/Footprint/multiExtentOf/MultiSurface/surfaceMembers/Polygon/exterior/LinearRing/posList");let a=null;if(o){const e=o.split(" ").map(e=>e.trim()).filter(e=>null!=e&&""!==e).map(Number);if(e.length){const t=[];for(let n=0;n<e.length/2;n+=2)t.push(e[n],e[n+1]);a=new F.A({rings:[[t]]})}}return{observation:{phenomenonTime:i,resultTime:r,footprint:a,identifier:(0,V.mX)(e,"metaDataProperty/EarthObservationMetaData/identifier"),acquisitionType:(0,V.mX)(e,"metaDataProperty/EarthObservationMetaData/acquisitionType"),status:(0,V.mX)(e,"metaDataProperty/EarthObservationMetaData/status")}}}async function ue(e,t){const{coverageIds:n,version:i,customParameters:s,signal:r}=t,a=i.slice(0,3),u="1.0"===a?"coverage":"1.1"===a?"identifiers":"coverageId",c={service:"WCS",request:"DescribeCoverage",version:i,[u]:n.join(","),...s};try{const{data:t}=await(0,N.A)(e,{query:c,responseType:"xml",signal:r});return function(e,t){let n=null;if(n="string"==typeof e?(new DOMParser).parseFromString(e,"text/xml"):e,"1.0.0"===t)return(0,V.IC)(n,"CoverageOffering").map(e=>function(e){const t={version:"1.0"};let n,i=[];for(let s=0;s<e.childNodes.length;s++){const r=e.childNodes[s];if(1===r.nodeType)if((0,V.g7)(r,"description"))t.description=(0,V.mX)(r);else if((0,V.g7)(r,"name"))t.name=(0,V.mX)(r);else if((0,V.g7)(r,"label"))t.label=(0,V.mX)(r);else if((0,V.g7)(r,"supportedFormats"))t.supportedFormats=(0,V.Dy)(r,"formats");else if((0,V.g7)(r,"supportedCRSs"))t.supportedCRSs=B(r);else if((0,V.g7)(r,"supportedInterpolations"))t.supportedInterpolations=_(r,"1.0.0");else if((0,V.g7)(r,"lonLatEnvelope"))t.lonLatEnvelope=U(r);else if((0,V.g7)(r,"rangeSet")){const e=Q(r);t.rangeSet=e.rangeSet,i=e.bandNames;const s=e.rangeSet[0].nullValues;s?.length&&(n=Y(s))}else(0,V.g7)(r,"domainSet")&&(t.domainSet=te(r))}const s=z(t.supportedInterpolations),{name:r,description:o,label:a,lonLatEnvelope:l,supportedFormats:u}=t,{spatialDomain:c}=t.domainSet,p={x:Math.abs(c.offset.x),y:Math.abs(c.offset.y)},d=function(e){if(!e.temporalDomain)return null;const{begin:t,end:n,values:i,units:s,resolution:r}=e.temporalDomain,o={variables:[{name:"default",description:"",dimensions:[{name:"StdTime",description:"",unit:"ISO8601",values:i?.map(e=>e.getTime()),hasRegularIntervals:!i,interval:r,intervalUnit:s,extent:[t.getTime(),n.getTime()]}]}]};return Z(o),o}(t.domainSet),f=new W.A({width:c.columns,height:c.rows,pixelSize:p,pixelType:"unknown",extent:c.envelope,spatialReference:c.envelope.spatialReference,bandCount:i.length||1,noDataValue:n,multidimensionalInfo:d});return{id:r,title:t.name,description:o||a,lonLatEnvelope:l,rasterInfo:f,bandNames:i,supportedFormats:u,supportedInterpolations:s,coverageDescription:t,version:"1.0.0",useEPSGAxis:!1}}(e));const i=(0,V.IC)(n,"CoverageDescription");return"1.1.0"===t||"1.1.1"===t||"1.1.2"===t?i.map(e=>function(e,t){const n=[],i=[],s={supportedFormats:n,supportedCRSs:i,version:"1.1"};let r,o,a=[];for(let t=0;t<e.childNodes.length;t++){const l=e.childNodes[t];if(1!==l.nodeType)continue;const u=(0,V.vv)(l).toLowerCase();switch(u){case"title":case"abstract":case"identifier":s[u]=(0,V.mX)(l);break;case"supportedformat":{const e=(0,V.mX)(l);n.includes(e)||n.push(e)}break;case"supportedcrs":{const e=(0,V.mX)(l);i.includes(e)||i.push(e)}break;case"range":{const e=ne(l,!!s.domain?.temporalDomain);s.range=e.rangeSet,a=e.bandNames;const{bandNoDataValues:t}=e;t?.length&&(r=Y(t)),o=e.statistics}break;case"domain":s.domain=ie(l)}}const l=z(s.range[0].supportedInterpolations),{identifier:u,abstract:c,title:p,domain:d,range:f}=s,m={x:Math.abs(d.spatialDomain.offset.x),y:Math.abs(d.spatialDomain.offset.y)},h=function(e,t){if(!t.temporalDomain)return null;const n=e.filter(e=>!e.identifier.toLowerCase().includes("field_1")&&!e.axis.some(e=>e.identifier.includes("band"))),i=[];if(n.length&&n.forEach(e=>{const t=e.axis.map(e=>{const t=e.values.map(t=>"ISO8601"===e.uom?(t=t.trim()).toLowerCase().includes("z")?new Date(t).getTime():new Date(t+"Z").getTime():parseFloat(t.trim())),n=[Math.min.apply(null,t),Math.max.apply(null,t)];return{name:e.identifier.trim(),description:"",field:e.identifier.trim(),unit:e.uom?e.uom.trim():"",hasRegularIntervals:!1,values:t,extent:n}});i.push({name:e.identifier.trim(),description:e.description?.trim()??"",unit:"",dimensions:t,statistics:e.statistics})}),t.temporalDomain){const{begin:e,end:n,values:s,units:r,resolution:o}=t.temporalDomain;i.some(e=>e.dimensions.some(e=>"stdtime"===e.name.toLowerCase()))||i.forEach(t=>{t.dimensions.push({name:"StdTime",description:"",unit:"ISO8601",values:s?.map(e=>e.getTime()),hasRegularIntervals:!s,interval:o,intervalUnit:r,extent:[e.getTime(),n.getTime()]})})}if(i.length){const e={variables:i};return Z(e),e}return null}(f,d);h&&(r=f[0].nullValues,1===r?.length&&(r=r[0]));const g=new W.A({width:d.spatialDomain.columns,height:d.spatialDomain.rows,pixelSize:m,pixelType:"unknown",extent:d.spatialDomain.envelope,spatialReference:d.spatialDomain.envelope.spatialReference,bandCount:a.length||1,noDataValue:r,statistics:o,multidimensionalInfo:h});return{id:u,title:s.title,description:c||p,bandNames:a,rasterInfo:g,supportedFormats:n,supportedInterpolations:l,coverageDescription:s,version:t,useEPSGAxis:d.spatialDomain.useEPSGAxis}}(e,t)):i.map(e=>function(e){const t={version:"2.0"};let n,i,s=[];for(let r=0;r<e.childNodes.length;r++){const o=e.childNodes[r];if(1===o.nodeType)if((0,V.g7)(o,"coverageId"))t.coverageId=(0,V.mX)(o);else if((0,V.g7)(o,"ServiceParameters"))t.serviceParameters={supportedFormats:(0,V.Dy)(o,"nativeFormat")};else if((0,V.g7)(o,"boundedBy"))t.boundedBy=se(o);else if((0,V.g7)(o,"rangeType")){const e=re(o,t.boundedBy?.axisLabels.length>2||t.domainSet?.axisLabels.length>2);t.rangeType=e.rangeType,s=e.bandNames,n=e.bandStats;const{bandNoDataValues:r}=e;r?.length&&(i=Y(r))}else if((0,V.g7)(o,"domainSet"))t.domainSet=ae(o,t.boundedBy?.axisLabels);else if((0,V.g7)(o,"metadata")){const e=(0,V.V6)(o,"EOMetadata");t.eoMetadata=e?le(e):null}}const{coverageId:r,boundedBy:o,domainSet:a,rangeType:l,serviceParameters:u}=t,c=function(e,t,n){if(n.axisLabels.length<=2)return null;const i=[];for(let t=0;t<e.length;t++){const n=e[t];for(let e=0;e<n.length;e++)n[e].name.toLowerCase().includes("band")||i.push(n[e])}const s=[];if(i.length){const e=[];for(let i=2;i<n.axisLabels.length;i++){const s=t.uomLabels?.[i]?.trim()??"",r=n.axisLabels[i].toLowerCase().includes("time")||"iso8601"===s.toLowerCase()||"oledatetime"===s.toLowerCase();let o,a;if(r){const e=oe(n.offset[i]);o=e.interval,a=e.intervalUnit}else o=n.offset[i],a=s;const l=[];r?(l.push((0,q.$E)(t.envelopeAllDims.mins[i])),l.push((0,q.$E)(t.envelopeAllDims.maxs[i]))):(l.push(t.envelopeAllDims.mins[i]),l.push(t.envelopeAllDims.maxs[i])),e.push({name:n.axisLabels[i].trim(),description:n.axisLabels[i].trim(),unit:r?"ISO8601":s,hasRegularIntervals:!0,extent:l,interval:o,intervalUnit:a})}if(i.forEach(t=>{const{allowedValues:n}=t,i=2===n?.length?[{min:n[0],max:n[1],avg:-1,stddev:-1}]:null;s.push({name:t.name.trim(),description:t.description?.trim()??"",unit:t.uom.trim(),statistics:i,dimensions:[...e]})}),s.length){const e={variables:s};return Z(e),e}}return null}(l,o,a);return!n&&c&&(n=c?.variables[0].statistics),null!=c&&(i=l[0][0].nilValue),{id:r,title:r,description:r,bandNames:s,rasterInfo:new W.A({width:a.columns,height:a.rows,pixelSize:a.resolution,pixelType:"unknown",extent:o.envelope,spatialReference:o.envelope.spatialReference,bandCount:s.length||1,statistics:n,noDataValue:i,multidimensionalInfo:c}),supportedFormats:u.supportedFormats,coverageDescription:t,version:"2.0.1",useEPSGAxis:!1}}(e))}(t,i)}catch(e){if(!(0,l.zf)(e))throw new o.A("wcslayer:open","wcs coverage description is not valid or supported");throw e}}var ce=n(45617),pe=n(4916);function de(e,t,n=0){const i="--"+t.boundary,s=[];for(let e=0;e<i.length;e++)s.push(i.charCodeAt(e));const r=[],o="\n--"+t.boundary+"--";for(let e=0;e<o.length;e++)r.push(o.charCodeAt(e));const a=[10],l=[13,10],u=[],c=s.length,p=new Uint8Array(e,n),d=p.length-c;let f=0,m=0;for(let e=0;e<d;e++){for(m=0;m<c&&p[e+m]===s[m];m++);if(m!==c)continue;let n=!1;if(f){const i=fe(p.subarray(f,e),t);u.push(i),n=!!i.isValidImage}if(e+=c-1,p[e+1]===a[0]?e+=1:p[e+1]===l[0]&&p[e+2]===l[1]&&(e+=2),f=e+1,n)break}const h=r.length;for(let e=p.length-h-10;e<p.length-h;e++){for(m=0;m<h&&p[e+m]===r[m];m++);if(m===h){u.push(fe(p.subarray(f,e),t));break}}return u}function fe(e,t){const n=String.fromCharCode.apply(null,e.subarray(0,Math.min(300,e.length))).split("\n"),i=Math.min(n.length,7),s={contentDisposition:"inline"};let r=0;for(let o=0;o<i;o++)if(n[o].length<4)r=r+n[o].length+1;else if("content"===n[o].slice(0,7).toLowerCase()){r=r+n[o].length+1;const e=n[o].indexOf(":");if(-1===e)continue;const t=n[o].slice(0,e).trim(),i=n[o].slice(e+1).trim();switch(t.toLowerCase()){case"content-type":s.contentType=i;break;case"content-description":s.contentDescription=i;break;case"content-transfer-encoding":s.contentTransferEncoding=i;break;case"content-id":s.contentID=i;break;case"content-disposition":s.contentDisposition=i;break;case"content-location":s.contentLocation=i}}else{if(s.contentDisposition.toLowerCase().includes("inline")&&n[o].length>=4&&s.contentType?.toLowerCase().includes("image")){let t=!0,n=e.subarray(r,e.length);if(s.contentType.toLowerCase().indexOf("tif")>0){if("base64"===s.contentTransferEncoding){let e="";const t=n;for(let n=0;n<t.length;n+=65535){const i=t.subarray(n,n+65535>t.length-1?t.length-1:n+65535);e+=String.fromCharCode.apply(null,i)}const i=atob(e);n=new Uint8Array(i.length);for(let e=0;e<n.length;e++)n[e]=i.charCodeAt(e)}t=73===n[0]&&73===n[1]||77===n[0]&&77===n[1]}if(t){let t=n.buffer;"base64"!==s.contentTransferEncoding&&(t=new ArrayBuffer(e.length-r),n=new Uint8Array(t),n.set(e.subarray(r,e.length))),s.contentData=t,s.isValidImage=!0}break}if((""===t.start||s.contentID===t.start)&&s.contentType){if(s.contentType.includes("text")||s.contentType.includes("xml")){s.contentData=String.fromCharCode.apply(null,e.subarray(r,e.length));break}s.contentData=e.subarray(r,e.length)}}return s}var me=n(77649),he=n(28435);const ge=["nearest neighbor","bilinear","bicubic"],ve=["nearest","linear","cubic"],ye="response is not a supported multipart/related mediaType with inline tiff, switching to compatibility mode",we=new Set(["1.0.0","1.1.0","1.1.1","1.1.2","2.0.1"]);let xe=class extends pe.A{constructor(){super(...arguments),this.datasetFormat="WCSServer",this.tileType="Raster"}get rasterId(){return`${this.url}-${this.coverageId}-${this.version}`}async fetchRawTile(e,t,n,i={}){if(this.isBlockOutside(e,t,n))return null;const{nativePixelSize:s,spatialReference:r}=this.rasterInfo,a=2**e,l=s.x*a,u=s.y*a,{blockWidth:c,blockHeight:p}=this.getBlockWidthHeight(e),{origin:d}=this.rasterInfo.storageInfo.tileInfo,f=this.getTileExtent({x:l,y:u},t,n,d,r,[c,p]),m=this.rasterInfo.extent,h=f.xmax>m.xmax,g=f.ymin<m.ymin,v=h||g;let y=f,w=c,x=p;if(v&&(y=f.clone().intersection(m),null!=y&&(h&&(w=Math.floor((y.xmax-y.xmin)/l),y.xmax=y.xmin+l*w),g&&(x=Math.floor((y.ymax-y.ymin)/u),y.ymin=y.ymax-u*x))),null==y||w<=1||x<=1)return null;const b=await this._getCoverage(y,w,x,a,i);if(!b)return null;const{coverageDescription:C}=this.coverageInfo,{noDataValue:I,multidimensionalInfo:S}=this.rasterInfo,{multidimensionalDefinition:A}=i;let M;if(null!=S&&null!=A&&A.length){const e=A[0].variableName;if("2.0"===C.version){const t=C.rangeType[0].find(t=>t.name===e);M=t?.nilValue}else if("1.1"===C.version){const t=C.range.find(t=>t.identifier===e);M=t?.nullValues}}const R=M??I,D=await this.decodePixelBlock(b,{width:w,height:x,planes:null,pixelType:null,tiffNoDataValue:Array.isArray(R)?R[0]:R,matchAllNoData:!0});if(null==D)return null;if(D&&(D.width!==w||D.height!==x))throw new o.A("wcsraster-fetch",`the response has unexpected dimension width: ${D.width}, height: {pixelBlock.height}`);return v?(0,he.$Q)(D,{x:0,y:0},{width:p,height:p}):D}async _open(e){const{customFetchParameters:t}=this.ioConfig,n=e?.signal,i=await async function(e,t){const{version:n,customParameters:i,signal:s}=t??{},r=n?.startsWith("1.0")?"version":"acceptVersions",a={service:"WCS",request:"GetCapabilities",[r]:n,...i};try{let{data:n}=await(0,N.A)(e,{query:a,responseType:"xml",signal:s});return t?.version||function(e){let t=null;t="string"==typeof e?(new DOMParser).parseFromString(e,"text/xml"):e;const n=t.documentElement.getAttribute("version"),i=n?.slice(0,3);return null!=i&&i<"2.1"}(n)||(a[r]="2.0.1",({data:n}=await(0,N.A)(e,{query:a,responseType:"xml",signal:s}))),X(n)}catch(e){if(!(0,l.zf)(e))throw new o.A("wcslayer:open","wcs capabilities is not valid or supported");throw e}}(this.url,{version:t?.version??this.version,customParameters:t,signal:n});if(this.capabilities=i,!this.version){let e=i.version.slice(0,3);"2.0"===e||"1.1"===e||"1.0"===e?this.version=i.version:(e=i.supportedVersions.find(e=>"2.0.1"===e)||i.supportedVersions.find(e=>e.startsWith("2.0"))||i.supportedVersions.find(e=>e.startsWith("1.1"))||i.supportedVersions.find(e=>e.startsWith("1.0"))||"1.0.0",this.version=e)}const{version:s}=this;if(!we.has(s))throw new o.A("wcsraster-open",`unsupported WCS version ${s}`);const{gridCoverages:r}=i;if(!r.length)throw new o.A("wcsraster-open","cannot find rectified grid coverages");this.coverageId??=r[0].id;const{coverageId:a}=this,u=r.find(e=>e.id===a);if(null==u)throw new o.A("wcsraster-open",`the coverageId ${a} does not exist in capabilities`);const c=await ue(this.url,{coverageIds:[a],version:s,customParameters:t,signal:n});if(this.coverageInfo=c[0],s.startsWith("2.0")){const{coverageInfo:e}=this;e.lonLatEnvelope=u.lonLatEnvelope,e.supportedInterpolations=z(i.supportedInterpolations),this._patchDimensionValues201(a,n)}this.datasetName=this.coverageInfo.title;const{rasterInfo:p}=this.coverageInfo;if(this.createRemoteDatasetStorageInfo(p,512,512),this._set("rasterInfo",p),null==p.spatialReference)throw new o.A("wcsraster-open",`coverage without spatial reference is not supported: ${a}`);const{pixelType:d,bandCount:f}=await this._getPixelTypeAndBandCount(n);p.pixelType=d,1===p.bandCount&&f>1&&(p.bandCount=f),this.updateTileInfo()}async _patchDimensionValues201(e,t){const{coverageInfo:n}=this,i=n.rasterInfo.multidimensionalInfo?.variables,s=we.has("1.1.2")?"1.1.2":we.has("1.1.1")?"1.1.1":we.has("1.1.0")?"1.1.0":null,{customFetchParameters:r}=this.ioConfig;if(i&&s)try{const n=this.url.includes("/ImageServer/"),o=e.length>8&&e.startsWith("Coverage")&&n?e.slice(8):e,a=await ue(this.url,{coverageIds:[o??e],version:s,customParameters:r,signal:t}).catch(()=>{if(o)return ue(this.url,{coverageIds:[e],version:s,customParameters:r,signal:t})}),l=a?.[0].rasterInfo.multidimensionalInfo?.variables;if(l)for(const e of i){const t=l.find(({name:t})=>t===e.name);if(t?.dimensions?.length)for(let i=e.dimensions.length-1;i>=0;i--){const s=e.dimensions[i],r=t.dimensions.find(({name:e})=>e===s.name);r?r.values&&r.extent?.join(",")===s.extent?.join(",")&&(e.dimensions[i]={...s,values:r.values}):n&&e.dimensions.splice(i,1)}}}catch{}}async _getPixelTypeAndBandCount(e){const{pixelSize:t,extent:n,multidimensionalInfo:i}=this.rasterInfo,s=n.center,r=new L.A({xmin:s.x-t.x,xmax:s.x+t.x,ymin:s.y-t.y,ymax:s.y+t.y,spatialReference:n.spatialReference});let a=[];if(null!=i){const e=i.variables[0];a=[],e.dimensions.forEach(t=>{a.push(new ce.A({variableName:e.name,dimensionName:t.name,values:t.hasRegularIntervals?t.extent?.[0]:t.values?.[0],isSlice:!0}))})}const{coverageDescription:l}=this.coverageInfo,u={interpolation:"nearest",multidimensionalDefinition:a,signal:e},{version:c}=l,{ioConfig:d}=this,f="2.0"===c&&null==d.allowAnyMediaType||"1.1"===c&&null==d.use2GridOffsets;let m;try{m=await this._getCoverage(r,2,2,1,u,!0)}catch(e){if(!f)throw e;if("1.1"===c){if(!e.details?.isResolutionMismatch)throw e;d.use2GridOffsets=!0}}if(!m&&f&&("2.0"===c&&(d.allowAnyMediaType=!0),m=await this._getCoverage(r,2,2,1,u),m&&p.A.getLogger(this).warn("wcsraster:getcoverage",ye)),!m)throw new o.A("wcsraster-open","unable to determine pixel type");const h=await this.decodePixelBlock(m,{width:2,height:2,planes:null,pixelType:null});if(null==h)throw new o.A("wcsraster-open","unable to determine pixel type");return{pixelType:h.pixelType,bandCount:h.getPlaneCount()??0}}async _getCoverage(e,t,n,i,s,r=!1){const{coverageDescription:a}=this.coverageInfo,{version:l}=a,u="2.0"===l?this._getCoverage201Parameters(e,t,n,i,s,a):"1.1"===l?this._getCoverage110Parameters(e,t,n,s,a):this._getCoverage100Parameters(e,t,n,s),c="2.0"===l?await this.request(this._constructWCS201Url(u),{signal:s.signal,responseType:"array-buffer"}):await this.request(this.url,{query:u,signal:s.signal,responseType:"array-buffer"});if("1.0"===l)return c.data;if("2.0"===l&&!1!==this.ioConfig.allowAnyMediaType&&"tiff"===(0,me.g)(c.data))return r&&(this.ioConfig.allowAnyMediaType=!0,p.A.getLogger(this).warn("wcsraster:getcoverage",ye)),c.data;const d=function(e){const t=function(e){const t=e.getHeader?.("Content-Type")?.split(";");if(!t)return null;if(!(t[0].trim()??"").startsWith("multipart/"))return null;const n={boundary:"",start:"",type:""};for(let e=1;e<t.length;e++){const i=t[e].indexOf("=");if(i>0){const s=t[e].slice(0,i).trim(),r=t[e].slice(i+1).trim();n[s]=r.startsWith('"')?r.slice(1,-1):r}}return n}(e);return t?{isMultipart:!0,data:t.boundary?de(e.data,t,0):null}:{isMultipart:!1,data:null}}(c);if(d.isMultipart&&d.data){const e=d.data.find(e=>e.isValidImage);return r&&"base64"===e?.contentTransferEncoding&&p.A.getLogger(this).warn("wcsraster:getcoverage","response is base64 encoded which may impact layer display performance"),e?.contentData}const f=new Uint8Array(c.data,0,Math.min(c.data.byteLength,2e3)),m=String.fromCharCode.apply(null,f).toLowerCase().includes("exception"),h=m&&String.fromCharCode.apply(null,f).includes("A non-zero RESX/RESY or WIDTH/HEIGHT is required but neither was provided");if(m)throw new o.A("wcsraster:getcoverage","server returns an exception",{isResolutionMismatch:h});throw new o.A("wcsraster:getcoverage","response is not a supported multipart mediaType with inline tiff")}_getInterpolationIndex(e){return e&&this.coverageInfo.supportedInterpolations?.includes(e)?"nearest"===e?0:"bilinear"===e?1:"cubic"===e?2:0:0}_getCoverage100Parameters(e,t,n,i){const s=`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`,r=e.spatialReference.wkid,o=(this.coverageInfo.supportedFormats||[]).find(e=>e.toLowerCase().includes("tiff"))||"GEOTIFF",{bandIds:a,interpolation:l}=i,u=this._getInterpolationIndex(l),c=a?a.map(e=>this.coverageInfo.bandNames[e]):null,p=ge[u],{multidimensionalDefinition:d}=i;let f;if(null!=d&&null!=this.rasterInfo.multidimensionalInfo){const e=d.find(e=>"StdTime"===e.dimensionName);let t=e?.values;t&&t.length>0&&(Array.isArray(t[0])&&(t=t[0]),f=t.map(e=>be(e)).join(","))}return{service:"WCS",request:"GetCoverage",version:this.version,coverage:this.coverageId,format:o,crs:`EPSG:${r}`,bbox:s,width:t,height:n,time:f,interpolation:p,band:c?.join(",")}}_getCoverage110Parameters(e,t,n,i,s){const{multidimensionalDefinition:r,bandIds:o,interpolation:a}=i,l=e.spatialReference.wkid,u=`urn:ogc:def:crs:EPSG::${l}`,c=(this.coverageInfo.supportedFormats||[]).find(e=>e.toLowerCase().includes("tiff"))||"image/tiff",p=this._getInterpolationIndex(a),d=ve[p],f=null==a||0===this.coverageInfo.supportedInterpolations?.indexOf(a),m=s.domain.spatialDomain,h=m.origin.x<=m.envelope.xmin&&m.origin.y<=m.envelope.ymin,g=e.width/t,v=e.height/n*(h?1:-1),y=h?[e.xmin,e.ymin]:[e.xmin,e.ymax],w=m.useEPSGAxis&&(0,O.m)(l),x=w?`${y[1]},${y[0]}`:`${y[0]},${y[1]}`,b=this.ioConfig.use2GridOffsets,C=w?b?`${v},${g}`:`${v},0,0,${g}`:b?`${g},${v}`:`${g},0,0,${v}`,I=g/2,S=e.xmin+I,A=e.xmax-I,M=Math.abs(v)/2,R=e.ymin+M,D=e.ymax-M,T=w?`${R},${S},${D},${A},${u}`:`${S},${R},${A},${D},${u}`,P=s.range.find(e=>e.axis.some(e=>e.identifier.toLowerCase().includes("band")));let L,N=P&&d&&o?f?`${P.identifier}[${P.axis[0].identifier}[${o.join(",")}]]`:`${P.identifier}:${d}[${P.axis[0].identifier}[${o.join(",")}]]`:null;if(null!=r&&r.length)for(let e=0;e<r.length;e++){let t=r[e].values;const n=r[e].dimensionName?.toLowerCase(),i=r[e].variableName?.toLowerCase(),o=s.range.find(e=>e.identifier.toLowerCase()===i);if(t.length>0)if(Array.isArray(t[0])&&(t=t[0]),"stdtime"===n)L=t.map(e=>be(e)).join(",");else if(o){const e=o.axis.find(e=>e.identifier.toLowerCase()===n);e&&(N=f?o.identifier+"["+e.identifier+"["+t.join(",")+"]]":o.identifier+":"+d+"["+e.identifier+"["+t.join(",")+"]]")}e===r.length-1&&o&&!N&&(N=f?o.identifier:o.identifier+":"+d)}return{service:"WCS",request:"GetCoverage",version:this.version,identifier:this.coverageId,format:c,crs:`EPSG:${l}`,boundingbox:T,gridCS:"urn:ogc:def:cs:OGC:0.0:Grid2dSquareCS",gridType:"urn:ogc:def:method:WCS:1.1:2dGridIn2dCrs",gridOrigin:x,gridOffsets:C,gridBaseCRS:u,timeSequence:L,rangeSubset:N}}_getCoverage201Parameters(e,t,n,i,s,r){const{multidimensionalDefinition:o,interpolation:a}=s,l=this._getInterpolationIndex(a);let u=null;const{supportedInterpolations:c}=this.capabilities;if(c?.length)switch(l){case 0:u=c.find(e=>e.toLowerCase().includes("nearest"));break;case 1:u=c.find(e=>e.toLowerCase().includes("linear"));break;case 2:u=c.find(e=>e.toLowerCase().includes("cubic")||e.toLowerCase().includes("quadratic"))}const p=(this.coverageInfo.supportedFormats||[]).find(e=>e.toLowerCase().includes("tiff"))||"image/tiff",{bandNames:d}=this.coverageInfo,{boundedBy:f,domainSet:m,rangeType:h}=r,g=f.isEastFirst?0:1,v=1-g,{axisLabels:y}=f,w=y[g],x=y[v],b=`http://www.opengis.net/def/crs/EPSG/0/${e.spatialReference.wkid}`,C=b,I=[];I.push(`${w}(${e.xmin},${e.xmax})`),I.push(`${x}(${e.ymin},${e.ymax})`);const S=[];if(y.length>2)for(let e=2;e<y.length;e++){const t=m.origin[e];if(y[e].toLowerCase().includes("time")){let n=t.toString();f.uomLabels?.[e].toLowerCase().includes("ole")&&(S.push(y[e]),n=be(t,!0)),I.push(y[e]+",http://www.opengis.net("+n+")")}else I.push(y[e]+",http://www.opengis.net("+t+")")}let A=null;if(null!=o&&o.length){const e=[];h.forEach(t=>t.forEach(t=>e.push(t.name)));const t=[];for(let n=0;n<o.length;n++){const i=y.find(e=>e===o[n].dimensionName),s=e.find(e=>e===o[n].variableName);if(t.includes(s)||t.push(s),i){let e=o[n].values;if(e.length>0){Array.isArray(e[0])&&(e=e[0]);let t="";t=i.toLowerCase().includes("time")?e.map(e=>be(e)).join(","):e.join(",");const n=I.findIndex(e=>e.startsWith(i+",http://www.opengis.net"));-1===n&&I.push(i+",http://www.opengis.net("+t+")"),-1===n||I[n].includes("("+t+")")||I.splice(n,1,i+",http://www.opengis.net("+t+")")}}}t.length&&(A=t.join(","))}else d?.length>=2&&(A=(s.bandIds?s.bandIds.map(e=>d[e]):d).join(","));const M=I.join("&subset="),R=!r.domainSet.hasSameAxisLabelsAsBoundedBy&&!1!==this.ioConfig.allowScaleFactor,D=R?null:`${w}(${t}),${x}(${n})`,T=R?1/i:null;return{service:"WCS",request:"GetCoverage",version:this.version,coverageId:this.coverageId,rangesubset:A,interpolation:u,scaleSize:D,scaleFactor:T,subset:M,format:p,mediaType:this.ioConfig.allowAnyMediaType?null:"multipart/related",outputcrs:b,subsettingcrs:C}}_constructWCS201Url(e){const t={...this.ioConfig.customFetchParameters,...e},n=[];return Object.keys(t).forEach(e=>{const i=t[e];null!=i&&("subset"===e?"string"==typeof i&&i.split("&subset=").forEach(e=>{e&&n.push(`subset=${encodeURIComponent(e)}`)}):n.push(`${e}=${encodeURIComponent(i)}`))}),`${encodeURI(this.url)}?${n.join("&")}`}};function be(e,t=!1){return(t?new Date((0,q.$E)(e)):new Date(e)).toISOString()}(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],xe.prototype,"datasetFormat",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],xe.prototype,"tileType",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],xe.prototype,"version",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],xe.prototype,"coverageId",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],xe.prototype,"rasterId",null),xe=(0,i.Cg)([(0,d.$)("esri.layers.support.rasterDatasets.WCSRaster")],xe);var Ce=n(30291);const Ie=new Set(["milliseconds","seconds","minutes","hours","days","weeks","months","years","decades","centuries"]);let Se=class extends((0,w.dM)((0,M.j)((0,C.q)((0,I.A)((0,x.d)((0,b.o)((0,S.G)((0,R.e)((0,A.J)((0,a.P)((0,r.OU)(y.A)))))))))))){constructor(...e){super(...e),this.coverageId=null,this.version=null,this.isReference=null,this.graphicOrigin=new v(this),this.legendEnabled=!0,this.noData=0,this.operationalLayerType="WCS",this.type="wcs",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null,this._debouncedSaveOperations=(0,l.sg)(async(e,t,i)=>{const{save:s,saveAs:r}=await n.e(9838).then(n.bind(n,59838));switch(e){case 0:return s(this,t);case 1:return r(this,i,t)}})}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WCS"]},e).catch(l.QP).then(()=>this._openRaster(t))),Promise.resolve(this)}get renderer(){return super.renderer}set renderer(e){super.renderer=e}get coverageInfo(){return this.raster.coverageInfo}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[(0,P.rZ)("Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,n=t?.multidimensionalInfo;if(n){const t=(0,P.AL)(n);e.push(...t)}return e}createPopupTemplate(e){return(0,Ce.tn)({fields:this.rasterFields,title:this.title},e)}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}async _openRaster(e){const t=new xe({url:this.url,version:this.version,coverageId:this.coverageId,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters}});if(await t.open({signal:e}),!t.rasterInfo)throw t.destroy(),new o.A("wcs-layer:load","cannot load resources on "+this.url);const{rasterInfo:n}=t;null==n.noDataValue&&(n.noDataValue=this.noData),this._set("serviceRasterInfo",n),this._set("spatialReference",n.spatialReference),null==this.title&&this.setAtOrigin("title",t.datasetName,"service"),null==this.coverageId&&this.setAtOrigin("coverageId",t.coverageInfo.id,"service"),null==this.version&&t.version&&this.setAtOrigin("version",t.version,"service"),this.setAtOrigin("tileInfo",t.rasterInfo.storageInfo.tileInfo,"service");const{multidimensionalInfo:i}=n;if(null!=i){const e=i.variables[0].dimensions.find(({name:e})=>"StdTime"===e);if(e){let t=e.extent?.[0]??e.values[0];Array.isArray(t)&&(t=t[0]);let n=e.extent?.[1]??e.values[e.values.length-1];Array.isArray(n)&&(n=n[1]);const i=Ie.has(e.intervalUnit?.toLowerCase())?e.intervalUnit?.toLowerCase():null;this.set("timeInfo",{startField:"StdTime",fullTimeExtent:{start:t,end:n},timeZone:null,interval:i?{value:e.interval,unit:i}:null})}}this.raster=t,this._configDefaultSettings(),this.addHandles((0,u.wB)(()=>this.customParameters,e=>this.raster.ioConfig.customFetchParameters=e))}};(0,i.Cg)([(0,c.MZ)({type:String,nonNullable:!0,json:{name:"wcsInfo.coverageId",write:{isRequired:!0,ignoreOrigin:!0}}})],Se.prototype,"coverageId",void 0),(0,i.Cg)([(0,c.MZ)()],Se.prototype,"coverageInfo",null),(0,i.Cg)([(0,c.MZ)({type:["1.0.0","1.1.0","1.1.1","1.1.2","2.0.1"],nonNullable:!0,json:{name:"wcsInfo.version",write:{isRequired:!0,ignoreOrigin:!0}}})],Se.prototype,"version",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Se.prototype,"isReference",void 0),(0,i.Cg)([(0,c.MZ)({json:{read:!0,write:!0}})],Se.prototype,"blendMode",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,clonable:!1})],Se.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,c.MZ)(D.fV)],Se.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:["show","hide"]})],Se.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)()],Se.prototype,"noData",void 0),(0,i.Cg)([(0,c.MZ)({type:["WCS"]})],Se.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,c.MZ)()],Se.prototype,"raster",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],Se.prototype,"type",void 0),(0,i.Cg)([(0,c.MZ)(D.M6)],Se.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:s.A,json:{name:"popupInfo",write:!0}})],Se.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],Se.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0,type:[T.A]})],Se.prototype,"fields",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,type:[T.A]})],Se.prototype,"rasterFields",null),Se=(0,i.Cg)([(0,d.$)("esri.layers.WCSLayer")],Se);const Ae=Se},91218:(e,t,n)=>{n.r(t),n.d(t,{canProjectWithoutEngine:()=>Z,initializeProjection:()=>_,isEqualBaseGCS:()=>B,isLoaded:()=>P,isLoadedOrLoad:()=>L,isLoadedOrLoadFor:()=>O,load:()=>V,project:()=>$,projectExtent:()=>ne,projectMany:()=>E,projectMultipoint:()=>K,projectOrLoad:()=>k,projectOrLoadMany:()=>j,projectPoint:()=>U,projectPolygon:()=>ee,projectPolyline:()=>Q,projectWithZConversion:()=>q,projectWithoutEngine:()=>z,requiresLoad:()=>N,test:()=>F,tryProjectWithZConversion:()=>W,unload:()=>X});var i=n(49186),s=n(74887),r=n(62788),o=n(95488),a=n(51850),l=n(21276),u=n(73941),c=n(5443),p=n(91075),d=n(48526),f=n(86738),m=n(39829),h=n(82799),g=n(16930),v=n(159),y=n(9762),w=n(37539);function x(e,t,n,i,s,r){return b[0]=e,b[1]=t,b[2]=n,(0,y.projectBuffer)(b,i,0,s,r,0)}const b=(0,a.vt)();var C=n(21325),I=n(62815);let S=null,A=null,M=null,R=null,D={};const T=new o.I;function P(){return!!(A?.isLoaded()&&M?.isLoaded()&&R?.isLoaded())}function L(){return!!P()||((0,r.gc)(T),V(),!1)}function O(e,t){return!e||!t||Z(e,t)||L()}function N(e,t){return!Z(e,t)&&!P()}async function V(e){null==S&&(S=Promise.all([n.e(3276).then(n.bind(n,83276)).then(e=>(A=e,A.load())),n.e(8377).then(n.bind(n,8377)).then(e=>(M=e,M.load())),n.e(2158).then(n.bind(n,12158)).then(e=>(R=e,R.load()))])),await S,(0,s.Te)(e),T.notify()}function $(e,t,n){return Array.isArray(e)?0===e.length?[]:((0,l.H)(e),E(e,e[0].spatialReference,t,n)):((0,l.f)(e),E([e],e.spatialReference,t,n)[0])}function E(e,t,n,i){if(null==t||null==n)return e;if(Z(t,n,i))return e.map(e=>z(e,t,n));if(null==i?.geographicTransformation&&(0,u.jA)(t))return e.map(e=>z(e,t,g.A.WGS84)).map(e=>W(e,n));if(null==i?.geographicTransformation&&(0,u.jA)(n))return e.map(e=>W(e,g.A.WGS84)).map(e=>z(e,g.A.WGS84,n));if(!P())throw new G;if(!i?.geographicTransformation)if(i?.extendedParams)i={...i,geographicTransformation:R.getTransformation(t,n,i.areaOfInterestExtent)||new v.A};else if(!i?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,n);let s=D[e];s||(s=R.getTransformation(t,n)||new v.A,D[e]=s),i={geographicTransformation:s}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof p.A?A.executeMany(e,n,i):M.executeMany(e,n,i)}function k(e,t){const n=j([e],t);return null!=n.pending?{pending:n.pending,geometry:null}:null!=n.geometries?{pending:null,geometry:n.geometries[0]}:{pending:null,geometry:null}}function j(e,t){if(!P())for(const n of e)if(null!=n&&!(0,C.aI)(n.spatialReference,t)&&(0,C.fn)(n.spatialReference)&&(0,C.fn)(t)&&!Z(n.spatialReference,t))return(0,r.gc)(T),{pending:V(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,C.aI)(e.spatialReference,t)?e:(0,C.fn)(e.spatialReference)&&(0,C.fn)(t)?W(e,t):null)}}class G extends i.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function X(){S=null,A=null,M=null,R=null,D={}}const F={get loadPromise(){return S}};function W(e,t){try{const n=$(e,t);if(null==n)return null;"xmin"in e&&"xmin"in n&&(n.zmin=e.zmin,n.zmax=e.zmax);const i=(0,I.N)(n.type,e.spatialReference,t);return null!=i&&i(n),n}catch(e){if(!(e instanceof G))throw e;return null}}async function q(e,t,n){const i=e.spatialReference;return null!=i&&null!=t&&await _(i,t,null,n),W(e,t)}function Z(e,t,n){return!(n?.areaOfInterestExtent||n?.extendedParams||n?.geographicTransformation)&&(!!(0,C.aI)(e,t)||(0,C.fn)(e)&&(0,C.fn)(t)&&!!(0,w.jd)(e,t))}function B(e,t){if((0,C.aI)(e,t))return!0;if(!(0,C.fn)(e)||!(0,C.fn)(t))return!1;const n=(0,C.oT)(e)||(0,C.K8)(e)||(0,C.x1)(e),i=(0,C.oT)(t)||(0,C.K8)(t)||(0,C.x1)(t);return n&&i}async function _(e,t,n,i){if(P())return(0,s.NO)(i);if(Array.isArray(e)){for(const{source:t,dest:n,options:s}of e)if(t&&n&&!Z(t,n,s))return V(i)}else if(e&&t&&!Z(e,t,n))return V(i);return(0,s.NO)(i)}function z(e,t,n){return e?"x"in e?H(e,t,new f.A,n,0):"xmin"in e?ie(e,t,new c.A,n,0):"rings"in e?te(e,t,new m.A,n,0):"paths"in e?J(e,t,new h.A,n,0):"points"in e?Y(e,t,new d.A,n,0):null:null}function U(e,t,n=t.spatialReference,i=0){return null!=n&&null!=e.spatialReference&&null!=H(e,e.spatialReference,t,n,i)}function H(e,t,n,i,s){re[0]=e.x,re[1]=e.y;const r=e.z;return re[2]=void 0!==r?r:s,(0,y.projectBuffer)(re,t,0,re,i,0)?(n.x=re[0],n.y=re[1],n.spatialReference=i,void 0!==r||(0,u.xP)(i)?(n.z=re[2],n.hasZ=!0):(n.z=void 0,n.hasZ=!1),void 0===e.m?(n.m=void 0,n.hasM=!1):(n.m=e.m,n.hasM=!0),n):null}function K(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=Y(e,e.spatialReference,t,n,i)}function Y(e,t,n,i,s){const{points:r,hasZ:o,hasM:a}=e,l=[],c=r.length,p=[];for(const e of r)p.push(e[0],e[1],o?e[2]:s);if(!(0,y.projectBuffer)(p,t,0,p,i,0,c))return null;const d=o||(0,u.xP)(i);for(let e=0;e<c;++e){const t=3*e,n=p[t],i=p[t+1];d&&a?l.push([n,i,p[t+2],r[e][3]]):d?l.push([n,i,p[t+2]]):a?l.push([n,i,r[e][2]]):l.push([n,i])}return n.points=l,n.spatialReference=i,n.hasZ=o,n.hasM=a,n}function Q(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=J(e,e.spatialReference,t,n,i)}function J(e,t,n,i,s){const{paths:r,hasZ:o,hasM:a}=e,l=[];if(!se(r,o??!1,a??!1,t,l,i,s))return null;const c=o||(0,u.xP)(i);return n.paths=l,n.spatialReference=i,n.hasZ=c,n.hasM=a,n}function ee(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=te(e,e.spatialReference,t,n,i)}function te(e,t,n,i,s){const{rings:r,hasZ:o,hasM:a}=e,l=[];if(!se(r,o??!1,a??!1,t,l,i,s))return null;const c=o||(0,u.xP)(i);return n.rings=l,n.spatialReference=i,n.hasZ=c,n.hasM=a,n}function ne(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=ie(e,e.spatialReference,t,n,i)}function ie(e,t,n,i,s){const{xmin:r,ymin:o,xmax:a,ymax:l,hasZ:c,hasM:p}=e;if(!x(r,o,c?e.zmin:s,t,re,i))return null;const d=c||(0,u.xP)(i);return n.xmin=re[0],n.ymin=re[1],d&&(n.zmin=re[2]),x(a,l,c?e.zmax:s,t,re,i)?(n.xmax=re[0],n.ymax=re[1],d&&(n.zmax=re[2]),p&&(n.mmin=e.mmin,n.mmax=e.mmax),n.spatialReference=i,n):null}function se(e,t,n,i,s,r,o=0){const a=new Array;for(const n of e)for(const e of n)a.push(e[0],e[1],t?e[2]:o);if(!(0,y.projectBuffer)(a,i,0,a,r,0))return!1;let l=0;s.length=0;const c=t||(0,u.xP)(r);for(const t of e){const e=new Array;for(const i of t)c&&n?e.push([a[l++],a[l++],a[l++],i[3]]):c?e.push([a[l++],a[l++],a[l++]]):n?(e.push([a[l++],a[l++],i[2]]),l++):(e.push([a[l++],a[l++]]),l++);s.push(e)}return!0}const re=(0,a.vt)()},99157:(e,t,n)=>{n.d(t,{A:()=>l});var i,s=n(31635),r=n(69622),o=n(10107),a=(n(44208),n(53966),n(87811),n(64108));let l=i=class extends r.A{constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new i({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,s.Cg)([(0,o.MZ)()],l.prototype,"isInverse",void 0),(0,s.Cg)([(0,o.MZ)()],l.prototype,"wkt",void 0),(0,s.Cg)([(0,o.MZ)()],l.prototype,"wkid",void 0),l=i=(0,s.Cg)([(0,a.$)("esri.geometry.operators.support.GeographicTransformationStep")],l)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5369],{159:(e,t,n)=>{n.d(t,{A:()=>u});var i,s=n(31635),r=n(69622),o=n(10107),a=(n(44208),n(53966),n(87811),n(64108)),l=n(99157);let u=i=class extends r.A{constructor(e){super(e),this.steps=[]}getInverse(){const e=new i;for(let t=this.steps.length-1;t>=0;t--){const n=this.steps[t];e.steps.push(n.getInverse())}return e}};(0,s.Cg)([(0,o.MZ)({type:[l.A],nonNullable:!0})],u.prototype,"steps",void 0),u=i=(0,s.Cg)([(0,a.$)("esri.geometry.operators.support.GeographicTransformation")],u)},9762:(e,t,n)=>{n.r(t),n.d(t,{projectBuffer:()=>s});var i=n(37539);function s(e,t,n,s,r,o,a=Math.floor(e.length/3)){const l=(0,i.jd)(t,r);if(null==l)return!1;if(l===i.pO){if(e===s&&n===o)return!0;const t=n+3*a;for(let i=n,r=o;i<t;i++,r++)s[r]=e[i];return!0}const u=n+3*a;for(let t=n,i=o;t<u;t+=3,i+=3)l(e,t,s,i);return!0}},37539:(e,t,n)=>{n.d(t,{pO:()=>h,jd:()=>d,Tp:()=>f,w5:()=>p});var i=n(34727),s=n(83047),r=n(73941),o=n(79258);Math.PI;const a=o.$O.radius,l=o.$O.eccentricitySquared,u={a1:a*l,a2:a*l*a*l,a3:a*l*l/2,a4:a*l*a*l*2.5,a5:a*l+a*l*l/2,a6:1-l};o.$O.radius,o.$O.flattening,o.Sw.radius,o.Sw.flattening,o.sH.radius,o.sH.flattening,o.sH.radius;var c=n(21325);const p={2:{5:h,7:null,9:null,10:h,1:I,6:null,8:null,0:null,3:v,11:y,2:h,4:D},5:{5:h,7:null,9:null,10:h,1:I,6:null,8:null,0:null,3:v,11:y,2:h,4:D},7:{5:null,7:h,9:null,10:h,1:null,6:C,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:h,10:h,1:null,6:null,8:b,0:null,3:null,11:null,2:null,4:null},3:{5:g,7:null,9:null,10:g,1:function(e,t,n,i){const s=e[t]/V,r=N-2*Math.atan(Math.exp(-e[t+1]/V)),o=V+e[t+2],a=Math.cos(r)*o;n[i]=Math.cos(s)*a,n[i+1]=Math.sin(s)*a,n[i+2]=Math.sin(r)*o},6:null,8:null,0:null,3:h,11:function(e,t,n,i){g(e,t,n,i),y(n,i,n,i)},2:g,4:function(e,t,n,i){g(e,t,n,i),D(n,i,n,i)}},4:{5:T,7:null,9:null,10:T,1:function(e,t,n,i){T(e,t,n,i),I(n,i,n,i)},6:null,8:null,0:null,3:function(e,t,n,i){T(e,t,n,i),v(n,i,n,i)},11:function(e,t,n,i){T(e,t,n,i),y(n,i,n,i)},2:T,4:h},1:{5:R,7:null,9:null,10:R,1:h,6:null,8:null,0:null,3:function(e,t,n,i){R(e,t,n,i),v(n,i,n,i)},11:function(e,t,n,i){R(e,t,n,i),y(n,i,n,i)},2:R,4:function(e,t,n,i){R(e,t,n,i),D(n,i,n,i)}},6:{5:null,7:M,9:null,10:M,1:null,6:h,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:A,10:A,1:null,6:null,8:h,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:h,3:null,11:null,2:null,4:null},10:{5:h,7:h,9:h,10:h,1:I,6:C,8:b,0:null,3:v,11:y,2:h,4:D},11:{5:w,7:null,9:null,10:w,1:function(e,t,n,i){w(e,t,n,i),I(n,i,n,i)},6:null,8:null,0:null,3:function(e,t,n,i){w(e,t,n,i),v(n,i,n,i)},11:h,2:w,4:function(e,t,n,i){w(e,t,n,i),D(n,i,n,i)}}};function d(e,t){return f(e,t)?.projector}function f(e,t){if(null==e||null==t)return null;if(P.source.spatialReference===e&&P.dest.spatialReference===t)return P;const n=m(e,P.source),i=m(t,P.dest);return 0===n&&0===i?(0,c.aI)(e,t)?P.projector=h:P.projector=null:P.projector=p[n][i],P}function m(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,s.GA)(e,1)),(0,r.jA)(e)?t.spatialReferenceId=1:(0,c.oT)(e)?t.spatialReferenceId=2:(0,c.K8)(e)?t.spatialReferenceId=3:(0,c.r1)(e)?t.spatialReferenceId=11:e.wkt===r.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===r.FY.wkt?t.spatialReferenceId=6:e.wkt===r.LJ.wkt?t.spatialReferenceId=8:(0,c.q8)(e)?t.spatialReferenceId=7:(0,c.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function h(e,t,n,i){e!==n&&(n[i++]=e[t++],n[i++]=e[t++],n[i]=e[t])}function g(e,t,n,i){n[i]=O*(e[t]/V),n[i+1]=O*(N-2*Math.atan(Math.exp(-e[t+1]/V))),n[i+2]=e[t+2]}function v(e,t,n,s){!function(e,t,n,s,r){const o=.4999999*Math.PI,a=(0,i.qE)(L*e[t+1],-o,o),l=Math.sin(a);n[s++]=L*e[t]*r.radius,n[s++]=r.halfSemiMajorAxis*Math.log((1+l)/(1-l)),n[s]=e[t+2]}(e,t,n,s,o.$O)}function y(e,t,n,i){n[i]=e[t]*$,n[i+1]=e[t+1]*$,n[i+2]=e[t+2]}function w(e,t,n,i){n[i]=e[t]*E,n[i+1]=e[t+1]*E,n[i+2]=e[t+2]}function x(e,t,n,i,s){const r=s+e[t+2],o=L*e[t+1],a=L*e[t],l=Math.cos(o)*r;n[i]=Math.cos(a)*l,n[i+1]=Math.sin(a)*l,n[i+2]=Math.sin(o)*r}function b(e,t,n,i){x(e,t,n,i,o.Sw.radius)}function C(e,t,n,i){x(e,t,n,i,o.sH.radius)}function I(e,t,n,i){x(e,t,n,i,o.$O.radius)}function S(e,t,n,s,r){const o=e[t],a=e[t+1],l=e[t+2],u=Math.sqrt(o*o+a*a+l*l),c=(0,i.YN)(l/(0===u?1:u)),p=Math.atan2(a,o);n[s++]=O*p,n[s++]=O*c,n[s]=u-r}function A(e,t,n,i){S(e,t,n,i,o.Sw.radius)}function M(e,t,n,i){S(e,t,n,i,o.sH.radius)}function R(e,t,n,i){S(e,t,n,i,o.$O.radius)}function D(e,t,n,i){!function(e,t,n,i,s){const r=L*e[t],o=L*e[t+1],a=e[t+2],l=Math.sin(o),u=Math.cos(o),c=s.radius/Math.sqrt(1-s.eccentricitySquared*l*l);n[i++]=(c+a)*u*Math.cos(r),n[i++]=(c+a)*u*Math.sin(r),n[i++]=(c*(1-s.eccentricitySquared)+a)*l}(e,t,n,i,o.$O)}function T(e,t,n,i){const s=u,r=e[t],a=e[t+1],l=e[t+2];let c,p,d,f,m,h,g,v,y,w,x,b,C,I,S,A,M,R,D,T,P;c=Math.abs(l),p=r*r+a*a,d=Math.sqrt(p),f=p+l*l,m=Math.sqrt(f),T=Math.atan2(a,r),h=l*l/f,g=p/f,I=s.a2/m,S=s.a3-s.a4/m,g>.3?(v=c/m*(1+g*(s.a1+I+h*S)/m),D=Math.asin(v),w=v*v,y=Math.sqrt(1-w)):(y=d/m*(1-h*(s.a5-I-g*S)/m),D=Math.acos(y),w=1-y*y,v=Math.sqrt(w)),x=1-o.$O.eccentricitySquared*w,b=o.$O.radius/Math.sqrt(x),C=s.a6*b,I=d-b*y,S=c-C*v,M=y*I+v*S,A=y*S-v*I,R=A/(C/x+M),D+=R,P=M+A*R/2,l<0&&(D=-D),n[i++]=O*T,n[i++]=O*D,n[i]=P}const P={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:h},L=(0,i.kU)(1),O=(0,i.KJ)(1),N=.5*Math.PI,V=o.$O.radius,$=V*Math.PI/180,E=180/(V*Math.PI)},38458:(e,t,n)=>{n.d(t,{m:()=>s});const i=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function s(e){return null!=e&&i.some(([t,n])=>e>=t&&e<=n)}},62815:(e,t,n)=>{n.d(t,{N:()=>o});var i=n(83047),s=n(73941),r=n(21325);function o(e,t,n){if(null==t||null==n||n.vcsWkid||(0,r.aI)(t,n)||(0,s.xP)(t)||(0,s.xP)(n))return null;const o=(0,i.G9)(t)/(0,i.G9)(n);if(1===o)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const n of e.paths)for(const e of n)e.length>2&&(e[2]*=t)}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const n of e.rings)for(const e of n)e.length>2&&(e[2]*=t)}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const n of e.points)n.length>2&&(n[2]*=t)}(e,o);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return null}}},88854:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Ae});var i=n(31635),s=n(37838),r=n(69540),o=n(49186),a=n(25728),l=n(74887),u=n(36708),c=n(10107),p=(n(44208),n(53966)),d=(n(87811),n(64108)),f=n(89808),m=n(99959);const h=Symbol("isWCSGraphicOrigin");var g;class v extends m.A{get[(g=h,f.Q)](){return this.layer}constructor(e){super(),this[g]=!0,this.type="wcs",this.layer=e}get id(){return this.layer.id}}var y=n(4146),w=n(63074),x=n(69208),b=n(89015),C=n(16131),I=n(8303),S=n(63660),A=n(54310),M=n(25036),R=n(82935),D=n(10873),T=n(20437),P=n(74797),L=n(5443),O=n(38458),N=n(78888),V=n(50103);function $(e){return e.endsWith("?")?e.slice(0,-1):e}function E(e){return e.filter(({coverageSubType:e})=>null==e||""===e||/^rectified(grid|dataset)/i.test(e))}function k(e){const t={};for(let n=0;n<e.childNodes.length;n++){const i=e.childNodes[n];if(1!==i.nodeType)continue;const s=(0,V.vv)(i).toLowerCase();switch(s){case"title":case"abstract":t[s]=(0,V.mX)(i);break;case"identifier":t.id=(0,V.mX)(i);break;case"wgs84boundingbox":{const e=(0,V.pN)(i,"LowerCorner"),n=(0,V.pN)(i,"UpperCorner");t.lonLatEnvelope=new L.A({xmin:e[0],ymin:e[1],xmax:n[0],ymax:n[1],spatialReference:{wkid:4326}})}break;case"coveragesummary":t.coverageSummaries=t.coverageSummaries||[],t.coverageSummaries.push(k(i))}}return t}function j(e,t){if(e.coverageSummaries)for(let n=0;n<e.coverageSummaries.length;n++)e.coverageSummaries[n].abstract=e.coverageSummaries[n].abstract||e.abstract,e.coverageSummaries[n].lonLatEnvelope=e.coverageSummaries[n].lonLatEnvelope||e.lonLatEnvelope,e.coverageSummaries[n].title=e.coverageSummaries[n].title||e.title,j(e.coverageSummaries[n],t);null!=e.id&&t.push(e)}function G(e){const t=(0,V.V6)(e.querySelector("Operation[name=GetCapabilities]"),"Get")?.getAttribute("xlink:href")||"",n=(0,V.V6)(e.querySelector("Operation[name=DescribeCoverage]"),"Get")?.getAttribute("xlink:href")||"",i=(0,V.V6)(e.querySelector("Operation[name=GetCoverage]"),"Get")?.getAttribute("xlink:href")||"";return{getCapabilities:$(t),describeCoverage:$(n),getCoverage:$(i)}}function X(e,t=null){let n=null;n="string"==typeof e?(new DOMParser).parseFromString(e,"text/xml"):e;let i=n.documentElement.getAttribute("version");"1.0"===i?i="1.0.0":"1.1"===i&&(i="1.1.0");const s=i||t||"1.0.0",r=s.slice(0,3);let a;if("2.0"===r)a=function(e){const t=(0,V.V6)(e,"ServiceIdentification"),n=(0,V.mX)(t,"Title"),i=(0,V.Dy)(t,"ServiceTypeVersion"),s=(0,V.Dy)(t,"Profile"),r=G((0,V.V6)(e,"OperationsMetadata")),o=(0,V.IC)(e,"Contents/CoverageSummary"),a=[];for(let e=0;e<o.length;e++){const t=o[e],n=(0,V.mX)(t,"CoverageId"),i=(0,V.V6)(t,"WGS84BoundingBox");let s;if(i){const e=(0,V.pN)(i,"LowerCorner"),t=(0,V.pN)(i,"UpperCorner");s=new L.A({xmin:e[0],ymin:e[1],xmax:t[0],ymax:t[1],spatialReference:{wkid:4326}})}const r=(0,V.mX)(t,"CoverageSubtype")||"RectifiedGridCoverage";a.push({id:n,lonLatEnvelope:s,coverageSubType:r})}const l=(0,V.V6)(e,"ServiceMetadata");return{name:n,supportedVersions:i,supportedFormats:(0,V.Dy)(l,"formatSupported"),supportedInterpolations:(0,V.Dy)(l,"interpolationSupported").concat((0,V.Dy)(l,"InterpolationSupported")),onlineResources:r,profiles:s,coverages:a,gridCoverages:E(a),version:"2.0.1"}}(n);else if("1.1"===r)a=function(e){const t=(0,V.mX)(e,"ServiceIdentification/Title"),n=(0,V.Dy)(e,"ServiceIdentification/ServiceTypeVersion"),i=G((0,V.V6)(e,"OperationsMetadata")),s=[],r=(0,V.V6)(e,"Contents");for(let e=0;e<r.childNodes.length;e++){const t=r.childNodes[e];1===t.nodeType&&(0,V.g7)(t,"CoverageSummary")&&j(k(t),s)}const o=(0,V.Dy)(r,"SupportedFormat");return{name:t,onlineResources:i,coverages:s,gridCoverages:E(s),supportedVersions:n,supportedFormats:o,version:"1.1.0"}}(n);else{if("1.0"!==r)throw new o.A("wcsraster:parsecapabilities","the capabilities version is not supported");a=function(e){const t=(0,V.mX)(e,"Service/name"),n=(0,V.V6)(e,"Capability"),i=(0,V.V6)(n,"GetCapabilities/Get/OnlineResource")?.getAttribute("xlink:href")??"",s=(0,V.V6)(n,"DescribeCoverage/Get/OnlineResource")?.getAttribute("xlink:href")??"",r=(0,V.V6)(n,"GetCoverage/Get/OnlineResource")?.getAttribute("xlink:href")??"",o={getCapabilities:$(i),describeCoverage:$(s),getCoverage:$(r)},a=(0,V.IC)(e,"CoverageOfferingBrief"),l=[];for(let e=0;e<a.length;e++){const t=a[e],n=(0,V.mX)(t,"name"),i=(0,V.IC)(t,"pos"),s=(0,V.pN)(i[0]),r=(0,V.pN)(i[1]),o=new L.A({xmin:s[0],ymin:s[1],xmax:r[0],ymax:r[1],spatialReference:{wkid:4326}});l.push({id:n,lonLatEnvelope:o})}return{name:t,onlineResources:o,coverages:l,gridCoverages:E(l),supportedVersions:["1.0.0"],version:"1.0.0"}}(n)}return a.version=s,a}var F=n(39829),W=n(87186),q=n(77301);function Z(e){e.variables.forEach(e=>e.dimensions.forEach(e=>e.values??=(0,q.Xg)(e)))}function B(e){return{requestResponseCRSs:(0,V.Dy)(e,"requestResponseCRSs").map(e=>e.split(":")[1]),nativeCRSs:(0,V.Dy)(e,"nativeCRSs").map(e=>e.split(":")[1])}}function _(e,t){const n=(0,V.Dy)(e,"1.0.0"===t?"interpolationMethod":"InterpolationMethod"),i="1.0.0"===t?e.getAttribute("default"):(0,V.mX)(e,"InterpolationMethods/Default");return null!=i?[i].concat(n.filter(e=>e.toLowerCase()!==i.toLowerCase())):n}function z(e){return null==e?["nearest"]:e.map(e=>{const t=e.toLowerCase();return t.includes("nearest")?"nearest":t.includes("linear")?"bilinear":t.includes("cubic")?"cubic":null}).filter(e=>!!e)}function U(e){const t=(0,V.IC)(e,"pos"),n=(0,V.pN)(t[0]),i=(0,V.pN)(t[1]);return new L.A({xmin:n[0],ymin:n[1],xmax:i[0],ymax:i[1],spatialReference:{wkid:4326}})}function H(e,t){const n=(0,V.Dy)(e,t);return n?.length&&""!==n[0]&&!isNaN(Number(n[0]))?n.map(e=>Number(e)):null}function K(e){const t=(0,V.pN)(e,"MinimumValue"),n=(0,V.pN)(e,"MaximumValue");return t.length&&n.length?t.map((e,t)=>({min:e,max:n[t],avg:-1,stddev:-1})):null}function Y(e){return null==e?null:e.every(t=>t===e[0])?e[0]:e}function Q(e){const t=[],n=(0,V.IC)(e,"RangeSet");let i=[];for(let e=0;e<n.length;e++){const s=(0,V.mX)(n[e],"name"),r=(0,V.mX)(n[e],"label"),o=[],a=H(n[e],"nullValues/singleValue"),l=(0,V.IC)(n[e],"AxisDescription");for(let e=0;e<l.length;e++){const t=(0,V.mX)(l[e],"name"),n=(0,V.mX)(l[e],"label"),s=(0,V.Dy)(l[e],"singleValue");if(0===s.length){const t=(0,V.mX)(l[e],"min"),n=(0,V.mX)(l[e],"max"),i=Number((0,V.mX)(l[e],"res"))||1;if(null!==t&&null!==n)for(let e=parseInt(t,10);e<=parseInt(n,10);e+=i)s.push(e.toString())}"band"===t.toLowerCase()&&(i=s),o.push({name:t,label:n,values:s})}t.push({name:s,label:r,nullValues:a,axis:o})}return{rangeSet:t,bandNames:i}}function J(e=null){if(!e)return{resolution:null,units:null};let t=e.toUpperCase();const n=["Years","Months","Days","Hours","Minutes","Seconds"];let i,s,r;return t.includes("PT")?(t=t.slice(2),r=["H","M","S"].findIndex(e=>t.includes(e)),i=n[3+r],s=parseFloat(t.slice(0,-1))):(t=t.slice(1),r=["Y","M","D"].findIndex(e=>t.includes(e)),r>-1&&(i=n[r]),s=parseFloat(t.slice(0,-1))),{resolution:s,units:i}}function ee(e){const t=(0,V.IC)(e,"timeposition");if(t.length>0){const e=[];for(let n=0;n<t.length;n++)e.push(new Date((0,V.mX)(t[n])));return{begin:e[0],end:e[e.length-1],values:e}}const n=(0,V.V6)(e,"timePeriod")||(0,V.V6)(e,"TimePeriod");return n?{begin:new Date((0,V.mX)(n,"beginPosition")||(0,V.mX)(n,"BeginPosition")),end:new Date((0,V.mX)(n,"endPosition")||(0,V.mX)(n,"EndPosition")),...J((0,V.mX)(n,"timeResolution")||(0,V.mX)(n,"TimeResolution"))}:null}function te(e){const t=(0,V.V6)(e,"spatialDomain"),n=(0,V.V6)(t,"Envelope")||(0,V.V6)(t,"EnvelopeWithTimePeriod"),i=n.getAttribute("srsName").split(":"),s=i[i.length-1],r=(0,V.IC)(n,"pos"),o=(0,V.pN)(r[0]),a=(0,V.pN)(r[1]),l=parseInt(s,10),u=isNaN(l)?null:{wkid:l},c=new L.A({xmin:o[0],ymin:o[1],xmax:a[0],ymax:a[1],spatialReference:u}),p=(0,V.V6)(t,"RectifiedGrid"),d=(0,V.mX)(p,"low").split(" "),f=(0,V.mX)(p,"high").split(" "),m=parseInt(f[0],10)-parseInt(d[0],10)+1,h=parseInt(f[1],10)-parseInt(d[1],10)+1,g=(0,V.pN)(t,"origin/pos"),v=(0,V.IC)(t,"offsetVector"),y={envelope:c,columns:m,rows:h,offset:{x:parseFloat((0,V.mX)(v[0]).split(" ")[0]),y:parseFloat((0,V.mX)(v[1]).split(" ")[1])},origin:{x:g[0],y:g[1]}},w=(0,V.V6)(e,"temporalDomain")||(0,V.V6)(e,"TemporalDomain");return{spatialDomain:y,temporalDomain:w?ee(w):null}}function ne(e,t){const n=[],i=(0,V.IC)(e,"Field");let s,r=[];for(let e=0;e<i.length;e++){const o=(0,V.mX)(i[e],"Identifier"),a=(0,V.mX)(i[e],"Description"),l=(0,V.mX)(i[e],"Definition"),u=(0,V.mX)(i[e],"Abstract"),c=(0,V.mX)(i[e],"Title"),p=H(i[e],"NullValue"),d=(0,V.V6)(i[e],"AllowedValues"),f=d?K(d):null,m=_(i[e],"1.1.0"),h=[],g=(0,V.IC)(i[e],"Axis");for(let e=0;e<g.length;e++){const n=g[e].getAttribute("identifier"),i=(0,V.mX)(g[e],"UOM"),o=(0,V.mX)(g[e],"DataType"),a=(0,V.Dy)(g[e],"Key");t&&!n.toLowerCase().includes("band")||(r=a,s=p),h.push({identifier:n,uom:i,dataType:o,values:a,bandNoDataValues:s})}n.push({identifier:o,description:a,definition:l,abstract:u,title:c,supportedInterpolations:m,axis:h,nullValues:p,statistics:f})}return{rangeSet:n,bandNames:r,bandNoDataValues:s,statistics:n[0].statistics}}function ie(e){const t=(0,V.V6)(e,"SpatialDomain"),n=(0,V.V6)(t,"GridCRS"),i=(0,V.mX)(n,"GridBaseCRS"),s=(0,V.mX)(n,"GridOrigin"),r=s?.split(" ").map(e=>parseFloat(e))??[0,0],o=(0,V.pN)(n,"GridOffsets"),a=(0,V.IC)(t,"BoundingBox");let l,u,c,p;for(let e=0;e<a.length;e++){const t=a[e].getAttribute("crs")?.toLowerCase();if(null!=t)if(t.includes("imagecrs")){const t=(0,V.pN)(a[e],"LowerCorner"),n=(0,V.pN)(a[e],"UpperCorner");l=n[0]-t[0]+1,u=n[1]-t[1]+1}else if(t.indexOf("epsg")>0){const n=t.split(":");c=parseInt(n[n.length-1],10);const i=(0,V.pN)(a[e],"LowerCorner"),s=(0,V.pN)(a[e],"UpperCorner");p=new L.A({xmin:i[0],ymin:i[1],xmax:s[0],ymax:s[1],spatialReference:{wkid:c}})}}const d=l>u,f=p.xmax-p.xmin>p.ymax-p.ymin;let m=!1;(0,O.m)(c)&&(d===f?m=!1:(m=!0,p=new L.A({xmin:p.ymin,ymin:p.xmin,xmax:p.ymax,ymax:p.xmax,spatialReference:{wkid:c}})));const h={columns:l,rows:u,origin:{x:r[0],y:r[1]},offset:{x:o[0],y:o[o.length-1]},gridBaseCRS:i,envelope:p,useEPSGAxis:m},g=(0,V.V6)(e,"temporalDomain")||(0,V.V6)(e,"TemporalDomain");return{spatialDomain:h,temporalDomain:g?ee(g):null}}function se(e){const t=(0,V.V6)(e,"Envelope")||(0,V.V6)(e,"EnvelopeWithTimePeriod"),n=t.getAttribute("srsName"),i=n.slice(n.lastIndexOf("/")+1),s=t.getAttribute("axisLabels").split(" ").map(e=>e.trim()).filter(e=>""!==e.trim()),r=(0,V.pN)(t,"lowerCorner"),o=(0,V.pN)(t,"upperCorner"),a=!["y","lat","latitude","north","nor","n","b"].includes(s[0].toLowerCase());let l;const u=parseInt(i,10),c=isNaN(u)?null:{wkid:u};l=new L.A(a?{xmin:r[0],ymin:r[1],xmax:o[0],ymax:o[1],spatialReference:c}:{xmin:r[1],ymin:r[0],xmax:o[1],ymax:o[0],spatialReference:c});const p={mins:r,maxs:o},d=t.getAttribute("uomLabels").trim().split(" ");let f,m;if((0,V.g7)(t,"EnvelopeWithTimePeriod")){f=new Date((0,V.mX)(e,"beginPosition")||(0,V.mX)(e,"BeginPosition")),m=new Date((0,V.mX)(e,"endPosition")||(0,V.mX)(e,"EndPosition"));const t=d?.findIndex(e=>"oledatetime"===e?.toLowerCase());t>-1&&(d[t]="ISO8601")}return{envelope:l,axisLabels:s,uomLabels:d.length?d:null,envelopeAllDims:p,beginPosition:f,endPosition:m,isEastFirst:a}}function re(e,t){const n=[],i=(0,V.IC)(e,"DataRecord"),s=[];let r,o=[];for(let e=0;e<i.length;e++){const a=(0,V.IC)(i[e],"field"),l=[];for(let e=0;e<a.length;e++){const n=a[e].getAttribute("name"),i=(0,V.mX)(a[e],"description")||"",u=(0,V.V6)(a[e],"uom")?.getAttribute("code")||"",c=(0,V.pN)(a[e],"interval"),p=H(a[e],"nilValue")?.[0];t&&!n.toLowerCase().includes("band")||(s.push(n),c?.length&&(r=r||[],r.push({min:c[0],max:c[1],avg:-1,stddev:-1})),o.push(p)),l.push({name:n,description:i,uom:u,allowedValues:c,nilValue:p})}n.push(l)}return o.some(e=>null!=e)||(o=null),{rangeType:n,bandNames:s,bandStats:r,bandNoDataValues:o}}function oe(e){let t=1,n="";const i=.01;return Math.abs(e-1/24)<1/24*i?n="Hours":Math.abs(e-1)<1*i?n="Days":e<1?(t=Math.round(24*e),n="Hours"):e>28-i&&e<31+i||Math.round(e/30)<12?n="Months":e>365-i&&e<366+i&&(n="Years"),{interval:t,intervalUnit:n}}function ae(e,t){const n=(0,V.V6)(e,"RectifiedGrid"),i=(0,V.pN)(n,"low"),s=(0,V.pN)(n,"high"),r=[];for(let e=0;e<i.length;e++)r.push(s[e]-i[e]+1);const o=(0,V.mX)(n,"axisLabels").split(" "),a=(0,V.pN)(n,"origin/pos"),l=(0,V.IC)(n,"offsetVector"),u=[];for(let e=0;e<l.length;e++){const t=(0,V.pN)(l[e]),n=t.findIndex(e=>0!==e);u[n]=t[n]}let c,p,d,f=!1;return t?.length&&o?.length&&(f=[...t].sort((e,t)=>e<t?-1:1).join(",")===[...o].sort((e,t)=>e<t?-1:1).join(",")),["y","lat","latitude","north","nor","n","b"].includes((f?o:t)[0].toLowerCase())?(c=r[1],p=r[0],d={y:Math.abs(u[0]),x:Math.abs(u[1])}):(c=r[0],p=r[1],d={x:Math.abs(u[0]),y:Math.abs(u[1])}),{columns:c,rows:p,origin:a,offset:u,resolution:d,gridSamples:r,axisLabels:o,hasSameAxisLabelsAsBoundedBy:f}}function le(e){const t=(0,V.V6)(e,"EarthObservation");if(!t)return null;const n=(0,V.V6)(t,"phenomenonTime"),i=n?ee(n):null,s=(0,V.V6)(t,"phenomenonTime"),r=s?ee(s):null,o=(0,V.mX)(t,"featureOfInterest/Footprint/multiExtentOf/MultiSurface/surfaceMembers/Polygon/exterior/LinearRing/posList");let a=null;if(o){const e=o.split(" ").map(e=>e.trim()).filter(e=>null!=e&&""!==e).map(Number);if(e.length){const t=[];for(let n=0;n<e.length/2;n+=2)t.push(e[n],e[n+1]);a=new F.A({rings:[[t]]})}}return{observation:{phenomenonTime:i,resultTime:r,footprint:a,identifier:(0,V.mX)(e,"metaDataProperty/EarthObservationMetaData/identifier"),acquisitionType:(0,V.mX)(e,"metaDataProperty/EarthObservationMetaData/acquisitionType"),status:(0,V.mX)(e,"metaDataProperty/EarthObservationMetaData/status")}}}async function ue(e,t){const{coverageIds:n,version:i,customParameters:s,signal:r}=t,a=i.slice(0,3),u="1.0"===a?"coverage":"1.1"===a?"identifiers":"coverageId",c={service:"WCS",request:"DescribeCoverage",version:i,[u]:n.join(","),...s};try{const{data:t}=await(0,N.A)(e,{query:c,responseType:"xml",signal:r});return function(e,t){let n=null;if(n="string"==typeof e?(new DOMParser).parseFromString(e,"text/xml"):e,"1.0.0"===t)return(0,V.IC)(n,"CoverageOffering").map(e=>function(e){const t={version:"1.0"};let n,i=[];for(let s=0;s<e.childNodes.length;s++){const r=e.childNodes[s];if(1===r.nodeType)if((0,V.g7)(r,"description"))t.description=(0,V.mX)(r);else if((0,V.g7)(r,"name"))t.name=(0,V.mX)(r);else if((0,V.g7)(r,"label"))t.label=(0,V.mX)(r);else if((0,V.g7)(r,"supportedFormats"))t.supportedFormats=(0,V.Dy)(r,"formats");else if((0,V.g7)(r,"supportedCRSs"))t.supportedCRSs=B(r);else if((0,V.g7)(r,"supportedInterpolations"))t.supportedInterpolations=_(r,"1.0.0");else if((0,V.g7)(r,"lonLatEnvelope"))t.lonLatEnvelope=U(r);else if((0,V.g7)(r,"rangeSet")){const e=Q(r);t.rangeSet=e.rangeSet,i=e.bandNames;const s=e.rangeSet[0].nullValues;s?.length&&(n=Y(s))}else(0,V.g7)(r,"domainSet")&&(t.domainSet=te(r))}const s=z(t.supportedInterpolations),{name:r,description:o,label:a,lonLatEnvelope:l,supportedFormats:u}=t,{spatialDomain:c}=t.domainSet,p={x:Math.abs(c.offset.x),y:Math.abs(c.offset.y)},d=function(e){if(!e.temporalDomain)return null;const{begin:t,end:n,values:i,units:s,resolution:r}=e.temporalDomain,o={variables:[{name:"default",description:"",dimensions:[{name:"StdTime",description:"",unit:"ISO8601",values:i?.map(e=>e.getTime()),hasRegularIntervals:!i,interval:r,intervalUnit:s,extent:[t.getTime(),n.getTime()]}]}]};return Z(o),o}(t.domainSet),f=new W.A({width:c.columns,height:c.rows,pixelSize:p,pixelType:"unknown",extent:c.envelope,spatialReference:c.envelope.spatialReference,bandCount:i.length||1,noDataValue:n,multidimensionalInfo:d});return{id:r,title:t.name,description:o||a,lonLatEnvelope:l,rasterInfo:f,bandNames:i,supportedFormats:u,supportedInterpolations:s,coverageDescription:t,version:"1.0.0",useEPSGAxis:!1}}(e));const i=(0,V.IC)(n,"CoverageDescription");return"1.1.0"===t||"1.1.1"===t||"1.1.2"===t?i.map(e=>function(e,t){const n=[],i=[],s={supportedFormats:n,supportedCRSs:i,version:"1.1"};let r,o,a=[];for(let t=0;t<e.childNodes.length;t++){const l=e.childNodes[t];if(1!==l.nodeType)continue;const u=(0,V.vv)(l).toLowerCase();switch(u){case"title":case"abstract":case"identifier":s[u]=(0,V.mX)(l);break;case"supportedformat":{const e=(0,V.mX)(l);n.includes(e)||n.push(e)}break;case"supportedcrs":{const e=(0,V.mX)(l);i.includes(e)||i.push(e)}break;case"range":{const e=ne(l,!!s.domain?.temporalDomain);s.range=e.rangeSet,a=e.bandNames;const{bandNoDataValues:t}=e;t?.length&&(r=Y(t)),o=e.statistics}break;case"domain":s.domain=ie(l)}}const l=z(s.range[0].supportedInterpolations),{identifier:u,abstract:c,title:p,domain:d,range:f}=s,m={x:Math.abs(d.spatialDomain.offset.x),y:Math.abs(d.spatialDomain.offset.y)},h=function(e,t){if(!t.temporalDomain)return null;const n=e.filter(e=>!e.identifier.toLowerCase().includes("field_1")&&!e.axis.some(e=>e.identifier.includes("band"))),i=[];if(n.length&&n.forEach(e=>{const t=e.axis.map(e=>{const t=e.values.map(t=>"ISO8601"===e.uom?(t=t.trim()).toLowerCase().includes("z")?new Date(t).getTime():new Date(t+"Z").getTime():parseFloat(t.trim())),n=[Math.min.apply(null,t),Math.max.apply(null,t)];return{name:e.identifier.trim(),description:"",field:e.identifier.trim(),unit:e.uom?e.uom.trim():"",hasRegularIntervals:!1,values:t,extent:n}});i.push({name:e.identifier.trim(),description:e.description?.trim()??"",unit:"",dimensions:t,statistics:e.statistics})}),t.temporalDomain){const{begin:e,end:n,values:s,units:r,resolution:o}=t.temporalDomain;i.some(e=>e.dimensions.some(e=>"stdtime"===e.name.toLowerCase()))||i.forEach(t=>{t.dimensions.push({name:"StdTime",description:"",unit:"ISO8601",values:s?.map(e=>e.getTime()),hasRegularIntervals:!s,interval:o,intervalUnit:r,extent:[e.getTime(),n.getTime()]})})}if(i.length){const e={variables:i};return Z(e),e}return null}(f,d);h&&(r=f[0].nullValues,1===r?.length&&(r=r[0]));const g=new W.A({width:d.spatialDomain.columns,height:d.spatialDomain.rows,pixelSize:m,pixelType:"unknown",extent:d.spatialDomain.envelope,spatialReference:d.spatialDomain.envelope.spatialReference,bandCount:a.length||1,noDataValue:r,statistics:o,multidimensionalInfo:h});return{id:u,title:s.title,description:c||p,bandNames:a,rasterInfo:g,supportedFormats:n,supportedInterpolations:l,coverageDescription:s,version:t,useEPSGAxis:d.spatialDomain.useEPSGAxis}}(e,t)):i.map(e=>function(e){const t={version:"2.0"};let n,i,s=[];for(let r=0;r<e.childNodes.length;r++){const o=e.childNodes[r];if(1===o.nodeType)if((0,V.g7)(o,"coverageId"))t.coverageId=(0,V.mX)(o);else if((0,V.g7)(o,"ServiceParameters"))t.serviceParameters={supportedFormats:(0,V.Dy)(o,"nativeFormat")};else if((0,V.g7)(o,"boundedBy"))t.boundedBy=se(o);else if((0,V.g7)(o,"rangeType")){const e=re(o,t.boundedBy?.axisLabels.length>2||t.domainSet?.axisLabels.length>2);t.rangeType=e.rangeType,s=e.bandNames,n=e.bandStats;const{bandNoDataValues:r}=e;r?.length&&(i=Y(r))}else if((0,V.g7)(o,"domainSet"))t.domainSet=ae(o,t.boundedBy?.axisLabels);else if((0,V.g7)(o,"metadata")){const e=(0,V.V6)(o,"EOMetadata");t.eoMetadata=e?le(e):null}}const{coverageId:r,boundedBy:o,domainSet:a,rangeType:l,serviceParameters:u}=t,c=function(e,t,n){if(n.axisLabels.length<=2)return null;const i=[];for(let t=0;t<e.length;t++){const n=e[t];for(let e=0;e<n.length;e++)n[e].name.toLowerCase().includes("band")||i.push(n[e])}const s=[];if(i.length){const e=[];for(let i=2;i<n.axisLabels.length;i++){const s=t.uomLabels?.[i]?.trim()??"",r=n.axisLabels[i].toLowerCase().includes("time")||"iso8601"===s.toLowerCase()||"oledatetime"===s.toLowerCase();let o,a;if(r){const e=oe(n.offset[i]);o=e.interval,a=e.intervalUnit}else o=n.offset[i],a=s;const l=[];r?(l.push((0,q.$E)(t.envelopeAllDims.mins[i])),l.push((0,q.$E)(t.envelopeAllDims.maxs[i]))):(l.push(t.envelopeAllDims.mins[i]),l.push(t.envelopeAllDims.maxs[i])),e.push({name:n.axisLabels[i].trim(),description:n.axisLabels[i].trim(),unit:r?"ISO8601":s,hasRegularIntervals:!0,extent:l,interval:o,intervalUnit:a})}if(i.forEach(t=>{const{allowedValues:n}=t,i=2===n?.length?[{min:n[0],max:n[1],avg:-1,stddev:-1}]:null;s.push({name:t.name.trim(),description:t.description?.trim()??"",unit:t.uom.trim(),statistics:i,dimensions:[...e]})}),s.length){const e={variables:s};return Z(e),e}}return null}(l,o,a);return!n&&c&&(n=c?.variables[0].statistics),null!=c&&(i=l[0][0].nilValue),{id:r,title:r,description:r,bandNames:s,rasterInfo:new W.A({width:a.columns,height:a.rows,pixelSize:a.resolution,pixelType:"unknown",extent:o.envelope,spatialReference:o.envelope.spatialReference,bandCount:s.length||1,statistics:n,noDataValue:i,multidimensionalInfo:c}),supportedFormats:u.supportedFormats,coverageDescription:t,version:"2.0.1",useEPSGAxis:!1}}(e))}(t,i)}catch(e){if(!(0,l.zf)(e))throw new o.A("wcslayer:open","wcs coverage description is not valid or supported");throw e}}var ce=n(45617),pe=n(4916);function de(e,t,n=0){const i="--"+t.boundary,s=[];for(let e=0;e<i.length;e++)s.push(i.charCodeAt(e));const r=[],o="\n--"+t.boundary+"--";for(let e=0;e<o.length;e++)r.push(o.charCodeAt(e));const a=[10],l=[13,10],u=[],c=s.length,p=new Uint8Array(e,n),d=p.length-c;let f=0,m=0;for(let e=0;e<d;e++){for(m=0;m<c&&p[e+m]===s[m];m++);if(m!==c)continue;let n=!1;if(f){const i=fe(p.subarray(f,e),t);u.push(i),n=!!i.isValidImage}if(e+=c-1,p[e+1]===a[0]?e+=1:p[e+1]===l[0]&&p[e+2]===l[1]&&(e+=2),f=e+1,n)break}const h=r.length;for(let e=p.length-h-10;e<p.length-h;e++){for(m=0;m<h&&p[e+m]===r[m];m++);if(m===h){u.push(fe(p.subarray(f,e),t));break}}return u}function fe(e,t){const n=String.fromCharCode.apply(null,e.subarray(0,Math.min(300,e.length))).split("\n"),i=Math.min(n.length,7),s={contentDisposition:"inline"};let r=0;for(let o=0;o<i;o++)if(n[o].length<4)r=r+n[o].length+1;else if("content"===n[o].slice(0,7).toLowerCase()){r=r+n[o].length+1;const e=n[o].indexOf(":");if(-1===e)continue;const t=n[o].slice(0,e).trim(),i=n[o].slice(e+1).trim();switch(t.toLowerCase()){case"content-type":s.contentType=i;break;case"content-description":s.contentDescription=i;break;case"content-transfer-encoding":s.contentTransferEncoding=i;break;case"content-id":s.contentID=i;break;case"content-disposition":s.contentDisposition=i;break;case"content-location":s.contentLocation=i}}else{if(s.contentDisposition.toLowerCase().includes("inline")&&n[o].length>=4&&s.contentType?.toLowerCase().includes("image")){let t=!0,n=e.subarray(r,e.length);if(s.contentType.toLowerCase().indexOf("tif")>0){if("base64"===s.contentTransferEncoding){let e="";const t=n;for(let n=0;n<t.length;n+=65535){const i=t.subarray(n,n+65535>t.length-1?t.length-1:n+65535);e+=String.fromCharCode.apply(null,i)}const i=atob(e);n=new Uint8Array(i.length);for(let e=0;e<n.length;e++)n[e]=i.charCodeAt(e)}t=73===n[0]&&73===n[1]||77===n[0]&&77===n[1]}if(t){let t=n.buffer;"base64"!==s.contentTransferEncoding&&(t=new ArrayBuffer(e.length-r),n=new Uint8Array(t),n.set(e.subarray(r,e.length))),s.contentData=t,s.isValidImage=!0}break}if((""===t.start||s.contentID===t.start)&&s.contentType){if(s.contentType.includes("text")||s.contentType.includes("xml")){s.contentData=String.fromCharCode.apply(null,e.subarray(r,e.length));break}s.contentData=e.subarray(r,e.length)}}return s}var me=n(77649),he=n(28435);const ge=["nearest neighbor","bilinear","bicubic"],ve=["nearest","linear","cubic"],ye="response is not a supported multipart/related mediaType with inline tiff, switching to compatibility mode",we=new Set(["1.0.0","1.1.0","1.1.1","1.1.2","2.0.1"]);let xe=class extends pe.A{constructor(){super(...arguments),this.datasetFormat="WCSServer",this.tileType="Raster"}get rasterId(){return`${this.url}-${this.coverageId}-${this.version}`}async fetchRawTile(e,t,n,i={}){if(this.isBlockOutside(e,t,n))return null;const{nativePixelSize:s,spatialReference:r}=this.rasterInfo,a=2**e,l=s.x*a,u=s.y*a,{blockWidth:c,blockHeight:p}=this.getBlockWidthHeight(e),{origin:d}=this.rasterInfo.storageInfo.tileInfo,f=this.getTileExtent({x:l,y:u},t,n,d,r,[c,p]),m=this.rasterInfo.extent,h=f.xmax>m.xmax,g=f.ymin<m.ymin,v=h||g;let y=f,w=c,x=p;if(v&&(y=f.clone().intersection(m),null!=y&&(h&&(w=Math.floor((y.xmax-y.xmin)/l),y.xmax=y.xmin+l*w),g&&(x=Math.floor((y.ymax-y.ymin)/u),y.ymin=y.ymax-u*x))),null==y||w<=1||x<=1)return null;const b=await this._getCoverage(y,w,x,a,i);if(!b)return null;const{coverageDescription:C}=this.coverageInfo,{noDataValue:I,multidimensionalInfo:S}=this.rasterInfo,{multidimensionalDefinition:A}=i;let M;if(null!=S&&null!=A&&A.length){const e=A[0].variableName;if("2.0"===C.version){const t=C.rangeType[0].find(t=>t.name===e);M=t?.nilValue}else if("1.1"===C.version){const t=C.range.find(t=>t.identifier===e);M=t?.nullValues}}const R=M??I,D=await this.decodePixelBlock(b,{width:w,height:x,planes:null,pixelType:null,tiffNoDataValue:Array.isArray(R)?R[0]:R,matchAllNoData:!0});if(null==D)return null;if(D&&(D.width!==w||D.height!==x))throw new o.A("wcsraster-fetch",`the response has unexpected dimension width: ${D.width}, height: {pixelBlock.height}`);return v?(0,he.$Q)(D,{x:0,y:0},{width:p,height:p}):D}async _open(e){const{customFetchParameters:t}=this.ioConfig,n=e?.signal,i=await async function(e,t){const{version:n,customParameters:i,signal:s}=t??{},r=n?.startsWith("1.0")?"version":"acceptVersions",a={service:"WCS",request:"GetCapabilities",[r]:n,...i};try{let{data:n}=await(0,N.A)(e,{query:a,responseType:"xml",signal:s});return t?.version||function(e){let t=null;t="string"==typeof e?(new DOMParser).parseFromString(e,"text/xml"):e;const n=t.documentElement.getAttribute("version"),i=n?.slice(0,3);return null!=i&&i<"2.1"}(n)||(a[r]="2.0.1",({data:n}=await(0,N.A)(e,{query:a,responseType:"xml",signal:s}))),X(n)}catch(e){if(!(0,l.zf)(e))throw new o.A("wcslayer:open","wcs capabilities is not valid or supported");throw e}}(this.url,{version:t?.version??this.version,customParameters:t,signal:n});if(this.capabilities=i,!this.version){let e=i.version.slice(0,3);"2.0"===e||"1.1"===e||"1.0"===e?this.version=i.version:(e=i.supportedVersions.find(e=>"2.0.1"===e)||i.supportedVersions.find(e=>e.startsWith("2.0"))||i.supportedVersions.find(e=>e.startsWith("1.1"))||i.supportedVersions.find(e=>e.startsWith("1.0"))||"1.0.0",this.version=e)}const{version:s}=this;if(!we.has(s))throw new o.A("wcsraster-open",`unsupported WCS version ${s}`);const{gridCoverages:r}=i;if(!r.length)throw new o.A("wcsraster-open","cannot find rectified grid coverages");this.coverageId??=r[0].id;const{coverageId:a}=this,u=r.find(e=>e.id===a);if(null==u)throw new o.A("wcsraster-open",`the coverageId ${a} does not exist in capabilities`);const c=await ue(this.url,{coverageIds:[a],version:s,customParameters:t,signal:n});if(this.coverageInfo=c[0],s.startsWith("2.0")){const{coverageInfo:e}=this;e.lonLatEnvelope=u.lonLatEnvelope,e.supportedInterpolations=z(i.supportedInterpolations),this._patchDimensionValues201(a,n)}this.datasetName=this.coverageInfo.title;const{rasterInfo:p}=this.coverageInfo;if(this.createRemoteDatasetStorageInfo(p,512,512),this._set("rasterInfo",p),null==p.spatialReference)throw new o.A("wcsraster-open",`coverage without spatial reference is not supported: ${a}`);const{pixelType:d,bandCount:f}=await this._getPixelTypeAndBandCount(n);p.pixelType=d,1===p.bandCount&&f>1&&(p.bandCount=f),this.updateTileInfo()}async _patchDimensionValues201(e,t){const{coverageInfo:n}=this,i=n.rasterInfo.multidimensionalInfo?.variables,s=we.has("1.1.2")?"1.1.2":we.has("1.1.1")?"1.1.1":we.has("1.1.0")?"1.1.0":null,{customFetchParameters:r}=this.ioConfig;if(i&&s)try{const n=this.url.includes("/ImageServer/"),o=e.length>8&&e.startsWith("Coverage")&&n?e.slice(8):e,a=await ue(this.url,{coverageIds:[o??e],version:s,customParameters:r,signal:t}).catch(()=>{if(o)return ue(this.url,{coverageIds:[e],version:s,customParameters:r,signal:t})}),l=a?.[0].rasterInfo.multidimensionalInfo?.variables;if(l)for(const e of i){const t=l.find(({name:t})=>t===e.name);if(t?.dimensions?.length)for(let i=e.dimensions.length-1;i>=0;i--){const s=e.dimensions[i],r=t.dimensions.find(({name:e})=>e===s.name);r?r.values&&r.extent?.join(",")===s.extent?.join(",")&&(e.dimensions[i]={...s,values:r.values}):n&&e.dimensions.splice(i,1)}}}catch{}}async _getPixelTypeAndBandCount(e){const{pixelSize:t,extent:n,multidimensionalInfo:i}=this.rasterInfo,s=n.center,r=new L.A({xmin:s.x-t.x,xmax:s.x+t.x,ymin:s.y-t.y,ymax:s.y+t.y,spatialReference:n.spatialReference});let a=[];if(null!=i){const e=i.variables[0];a=[],e.dimensions.forEach(t=>{a.push(new ce.A({variableName:e.name,dimensionName:t.name,values:t.hasRegularIntervals?t.extent?.[0]:t.values?.[0],isSlice:!0}))})}const{coverageDescription:l}=this.coverageInfo,u={interpolation:"nearest",multidimensionalDefinition:a,signal:e},{version:c}=l,{ioConfig:d}=this,f="2.0"===c&&null==d.allowAnyMediaType||"1.1"===c&&null==d.use2GridOffsets;let m;try{m=await this._getCoverage(r,2,2,1,u,!0)}catch(e){if(!f)throw e;if("1.1"===c){if(!e.details?.isResolutionMismatch)throw e;d.use2GridOffsets=!0}}if(!m&&f&&("2.0"===c&&(d.allowAnyMediaType=!0),m=await this._getCoverage(r,2,2,1,u),m&&p.A.getLogger(this).warn("wcsraster:getcoverage",ye)),!m)throw new o.A("wcsraster-open","unable to determine pixel type");const h=await this.decodePixelBlock(m,{width:2,height:2,planes:null,pixelType:null});if(null==h)throw new o.A("wcsraster-open","unable to determine pixel type");return{pixelType:h.pixelType,bandCount:h.getPlaneCount()??0}}async _getCoverage(e,t,n,i,s,r=!1){const{coverageDescription:a}=this.coverageInfo,{version:l}=a,u="2.0"===l?this._getCoverage201Parameters(e,t,n,i,s,a):"1.1"===l?this._getCoverage110Parameters(e,t,n,s,a):this._getCoverage100Parameters(e,t,n,s),c="2.0"===l?await this.request(this._constructWCS201Url(u),{signal:s.signal,responseType:"array-buffer"}):await this.request(this.url,{query:u,signal:s.signal,responseType:"array-buffer"});if("1.0"===l)return c.data;if("2.0"===l&&!1!==this.ioConfig.allowAnyMediaType&&"tiff"===(0,me.g)(c.data))return r&&(this.ioConfig.allowAnyMediaType=!0,p.A.getLogger(this).warn("wcsraster:getcoverage",ye)),c.data;const d=function(e){const t=function(e){const t=e.getHeader?.("Content-Type")?.split(";");if(!t)return null;if(!(t[0].trim()??"").startsWith("multipart/"))return null;const n={boundary:"",start:"",type:""};for(let e=1;e<t.length;e++){const i=t[e].indexOf("=");if(i>0){const s=t[e].slice(0,i).trim(),r=t[e].slice(i+1).trim();n[s]=r.startsWith('"')?r.slice(1,-1):r}}return n}(e);return t?{isMultipart:!0,data:t.boundary?de(e.data,t,0):null}:{isMultipart:!1,data:null}}(c);if(d.isMultipart&&d.data){const e=d.data.find(e=>e.isValidImage);return r&&"base64"===e?.contentTransferEncoding&&p.A.getLogger(this).warn("wcsraster:getcoverage","response is base64 encoded which may impact layer display performance"),e?.contentData}const f=new Uint8Array(c.data,0,Math.min(c.data.byteLength,2e3)),m=String.fromCharCode.apply(null,f).toLowerCase().includes("exception"),h=m&&String.fromCharCode.apply(null,f).includes("A non-zero RESX/RESY or WIDTH/HEIGHT is required but neither was provided");if(m)throw new o.A("wcsraster:getcoverage","server returns an exception",{isResolutionMismatch:h});throw new o.A("wcsraster:getcoverage","response is not a supported multipart mediaType with inline tiff")}_getInterpolationIndex(e){return e&&this.coverageInfo.supportedInterpolations?.includes(e)?"nearest"===e?0:"bilinear"===e?1:"cubic"===e?2:0:0}_getCoverage100Parameters(e,t,n,i){const s=`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`,r=e.spatialReference.wkid,o=(this.coverageInfo.supportedFormats||[]).find(e=>e.toLowerCase().includes("tiff"))||"GEOTIFF",{bandIds:a,interpolation:l}=i,u=this._getInterpolationIndex(l),c=a?a.map(e=>this.coverageInfo.bandNames[e]):null,p=ge[u],{multidimensionalDefinition:d}=i;let f;if(null!=d&&null!=this.rasterInfo.multidimensionalInfo){const e=d.find(e=>"StdTime"===e.dimensionName);let t=e?.values;t&&t.length>0&&(Array.isArray(t[0])&&(t=t[0]),f=t.map(e=>be(e)).join(","))}return{service:"WCS",request:"GetCoverage",version:this.version,coverage:this.coverageId,format:o,crs:`EPSG:${r}`,bbox:s,width:t,height:n,time:f,interpolation:p,band:c?.join(",")}}_getCoverage110Parameters(e,t,n,i,s){const{multidimensionalDefinition:r,bandIds:o,interpolation:a}=i,l=e.spatialReference.wkid,u=`urn:ogc:def:crs:EPSG::${l}`,c=(this.coverageInfo.supportedFormats||[]).find(e=>e.toLowerCase().includes("tiff"))||"image/tiff",p=this._getInterpolationIndex(a),d=ve[p],f=null==a||0===this.coverageInfo.supportedInterpolations?.indexOf(a),m=s.domain.spatialDomain,h=m.origin.x<=m.envelope.xmin&&m.origin.y<=m.envelope.ymin,g=e.width/t,v=e.height/n*(h?1:-1),y=h?[e.xmin,e.ymin]:[e.xmin,e.ymax],w=m.useEPSGAxis&&(0,O.m)(l),x=w?`${y[1]},${y[0]}`:`${y[0]},${y[1]}`,b=this.ioConfig.use2GridOffsets,C=w?b?`${v},${g}`:`${v},0,0,${g}`:b?`${g},${v}`:`${g},0,0,${v}`,I=g/2,S=e.xmin+I,A=e.xmax-I,M=Math.abs(v)/2,R=e.ymin+M,D=e.ymax-M,T=w?`${R},${S},${D},${A},${u}`:`${S},${R},${A},${D},${u}`,P=s.range.find(e=>e.axis.some(e=>e.identifier.toLowerCase().includes("band")));let L,N=P&&d&&o?f?`${P.identifier}[${P.axis[0].identifier}[${o.join(",")}]]`:`${P.identifier}:${d}[${P.axis[0].identifier}[${o.join(",")}]]`:null;if(null!=r&&r.length)for(let e=0;e<r.length;e++){let t=r[e].values;const n=r[e].dimensionName?.toLowerCase(),i=r[e].variableName?.toLowerCase(),o=s.range.find(e=>e.identifier.toLowerCase()===i);if(t.length>0)if(Array.isArray(t[0])&&(t=t[0]),"stdtime"===n)L=t.map(e=>be(e)).join(",");else if(o){const e=o.axis.find(e=>e.identifier.toLowerCase()===n);e&&(N=f?o.identifier+"["+e.identifier+"["+t.join(",")+"]]":o.identifier+":"+d+"["+e.identifier+"["+t.join(",")+"]]")}e===r.length-1&&o&&!N&&(N=f?o.identifier:o.identifier+":"+d)}return{service:"WCS",request:"GetCoverage",version:this.version,identifier:this.coverageId,format:c,crs:`EPSG:${l}`,boundingbox:T,gridCS:"urn:ogc:def:cs:OGC:0.0:Grid2dSquareCS",gridType:"urn:ogc:def:method:WCS:1.1:2dGridIn2dCrs",gridOrigin:x,gridOffsets:C,gridBaseCRS:u,timeSequence:L,rangeSubset:N}}_getCoverage201Parameters(e,t,n,i,s,r){const{multidimensionalDefinition:o,interpolation:a}=s,l=this._getInterpolationIndex(a);let u=null;const{supportedInterpolations:c}=this.capabilities;if(c?.length)switch(l){case 0:u=c.find(e=>e.toLowerCase().includes("nearest"));break;case 1:u=c.find(e=>e.toLowerCase().includes("linear"));break;case 2:u=c.find(e=>e.toLowerCase().includes("cubic")||e.toLowerCase().includes("quadratic"))}const p=(this.coverageInfo.supportedFormats||[]).find(e=>e.toLowerCase().includes("tiff"))||"image/tiff",{bandNames:d}=this.coverageInfo,{boundedBy:f,domainSet:m,rangeType:h}=r,g=f.isEastFirst?0:1,v=1-g,{axisLabels:y}=f,w=y[g],x=y[v],b=`http://www.opengis.net/def/crs/EPSG/0/${e.spatialReference.wkid}`,C=b,I=[];I.push(`${w}(${e.xmin},${e.xmax})`),I.push(`${x}(${e.ymin},${e.ymax})`);const S=[];if(y.length>2)for(let e=2;e<y.length;e++){const t=m.origin[e];if(y[e].toLowerCase().includes("time")){let n=t.toString();f.uomLabels?.[e].toLowerCase().includes("ole")&&(S.push(y[e]),n=be(t,!0)),I.push(y[e]+",http://www.opengis.net("+n+")")}else I.push(y[e]+",http://www.opengis.net("+t+")")}let A=null;if(null!=o&&o.length){const e=[];h.forEach(t=>t.forEach(t=>e.push(t.name)));const t=[];for(let n=0;n<o.length;n++){const i=y.find(e=>e===o[n].dimensionName),s=e.find(e=>e===o[n].variableName);if(t.includes(s)||t.push(s),i){let e=o[n].values;if(e.length>0){Array.isArray(e[0])&&(e=e[0]);let t="";t=i.toLowerCase().includes("time")?e.map(e=>be(e)).join(","):e.join(",");const n=I.findIndex(e=>e.startsWith(i+",http://www.opengis.net"));-1===n&&I.push(i+",http://www.opengis.net("+t+")"),-1===n||I[n].includes("("+t+")")||I.splice(n,1,i+",http://www.opengis.net("+t+")")}}}t.length&&(A=t.join(","))}else d?.length>=2&&(A=(s.bandIds?s.bandIds.map(e=>d[e]):d).join(","));const M=I.join("&subset="),R=!r.domainSet.hasSameAxisLabelsAsBoundedBy&&!1!==this.ioConfig.allowScaleFactor,D=R?null:`${w}(${t}),${x}(${n})`,T=R?1/i:null;return{service:"WCS",request:"GetCoverage",version:this.version,coverageId:this.coverageId,rangesubset:A,interpolation:u,scaleSize:D,scaleFactor:T,subset:M,format:p,mediaType:this.ioConfig.allowAnyMediaType?null:"multipart/related",outputcrs:b,subsettingcrs:C}}_constructWCS201Url(e){const t={...this.ioConfig.customFetchParameters,...e},n=[];return Object.keys(t).forEach(e=>{const i=t[e];null!=i&&("subset"===e?"string"==typeof i&&i.split("&subset=").forEach(e=>{e&&n.push(`subset=${encodeURIComponent(e)}`)}):n.push(`${e}=${encodeURIComponent(i)}`))}),`${encodeURI(this.url)}?${n.join("&")}`}};function be(e,t=!1){return(t?new Date((0,q.$E)(e)):new Date(e)).toISOString()}(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],xe.prototype,"datasetFormat",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],xe.prototype,"tileType",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],xe.prototype,"version",void 0),(0,i.Cg)([(0,c.MZ)({type:String,json:{write:!0}})],xe.prototype,"coverageId",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],xe.prototype,"rasterId",null),xe=(0,i.Cg)([(0,d.$)("esri.layers.support.rasterDatasets.WCSRaster")],xe);var Ce=n(30291);const Ie=new Set(["milliseconds","seconds","minutes","hours","days","weeks","months","years","decades","centuries"]);let Se=class extends((0,w.dM)((0,M.j)((0,C.q)((0,I.A)((0,x.d)((0,b.o)((0,S.G)((0,R.e)((0,A.J)((0,a.P)((0,r.OU)(y.A)))))))))))){constructor(...e){super(...e),this.coverageId=null,this.version=null,this.isReference=null,this.graphicOrigin=new v(this),this.legendEnabled=!0,this.noData=0,this.operationalLayerType="WCS",this.type="wcs",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null,this._debouncedSaveOperations=(0,l.sg)(async(e,t,i)=>{const{save:s,saveAs:r}=await n.e(9838).then(n.bind(n,59838));switch(e){case 0:return s(this,t);case 1:return r(this,i,t)}})}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WCS"]},e).catch(l.QP).then(()=>this._openRaster(t))),Promise.resolve(this)}get renderer(){return super.renderer}set renderer(e){super.renderer=e}get coverageInfo(){return this.raster.coverageInfo}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[(0,P.rZ)("Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,n=t?.multidimensionalInfo;if(n){const t=(0,P.AL)(n);e.push(...t)}return e}createPopupTemplate(e){return(0,Ce.tn)({fields:this.rasterFields,title:this.title},e)}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}async _openRaster(e){const t=new xe({url:this.url,version:this.version,coverageId:this.coverageId,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters}});if(await t.open({signal:e}),!t.rasterInfo)throw t.destroy(),new o.A("wcs-layer:load","cannot load resources on "+this.url);const{rasterInfo:n}=t;null==n.noDataValue&&(n.noDataValue=this.noData),this._set("serviceRasterInfo",n),this._set("spatialReference",n.spatialReference),null==this.title&&this.setAtOrigin("title",t.datasetName,"service"),null==this.coverageId&&this.setAtOrigin("coverageId",t.coverageInfo.id,"service"),null==this.version&&t.version&&this.setAtOrigin("version",t.version,"service"),this.setAtOrigin("tileInfo",t.rasterInfo.storageInfo.tileInfo,"service");const{multidimensionalInfo:i}=n;if(null!=i){const e=i.variables[0].dimensions.find(({name:e})=>"StdTime"===e);if(e){let t=e.extent?.[0]??e.values[0];Array.isArray(t)&&(t=t[0]);let n=e.extent?.[1]??e.values[e.values.length-1];Array.isArray(n)&&(n=n[1]);const i=Ie.has(e.intervalUnit?.toLowerCase())?e.intervalUnit?.toLowerCase():null;this.set("timeInfo",{startField:"StdTime",fullTimeExtent:{start:t,end:n},timeZone:null,interval:i?{value:e.interval,unit:i}:null})}}this.raster=t,this._configDefaultSettings(),this.addHandles((0,u.wB)(()=>this.customParameters,e=>this.raster.ioConfig.customFetchParameters=e))}};(0,i.Cg)([(0,c.MZ)({type:String,nonNullable:!0,json:{name:"wcsInfo.coverageId",write:{isRequired:!0,ignoreOrigin:!0}}})],Se.prototype,"coverageId",void 0),(0,i.Cg)([(0,c.MZ)()],Se.prototype,"coverageInfo",null),(0,i.Cg)([(0,c.MZ)({type:["1.0.0","1.1.0","1.1.1","1.1.2","2.0.1"],nonNullable:!0,json:{name:"wcsInfo.version",write:{isRequired:!0,ignoreOrigin:!0}}})],Se.prototype,"version",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Se.prototype,"isReference",void 0),(0,i.Cg)([(0,c.MZ)({json:{read:!0,write:!0}})],Se.prototype,"blendMode",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,clonable:!1})],Se.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,c.MZ)(D.fV)],Se.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:["show","hide"]})],Se.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)()],Se.prototype,"noData",void 0),(0,i.Cg)([(0,c.MZ)({type:["WCS"]})],Se.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,c.MZ)()],Se.prototype,"raster",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],Se.prototype,"type",void 0),(0,i.Cg)([(0,c.MZ)(D.M6)],Se.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:s.A,json:{name:"popupInfo",write:!0}})],Se.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],Se.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,c.MZ)({readOnly:!0,type:[T.A]})],Se.prototype,"fields",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,type:[T.A]})],Se.prototype,"rasterFields",null),Se=(0,i.Cg)([(0,d.$)("esri.layers.WCSLayer")],Se);const Ae=Se},91218:(e,t,n)=>{n.r(t),n.d(t,{canProjectWithoutEngine:()=>Z,initializeProjection:()=>_,isEqualBaseGCS:()=>B,isLoaded:()=>P,isLoadedOrLoad:()=>L,isLoadedOrLoadFor:()=>O,load:()=>V,project:()=>$,projectExtent:()=>ne,projectMany:()=>E,projectMultipoint:()=>K,projectOrLoad:()=>k,projectOrLoadMany:()=>j,projectPoint:()=>U,projectPolygon:()=>ee,projectPolyline:()=>Q,projectWithZConversion:()=>q,projectWithoutEngine:()=>z,requiresLoad:()=>N,test:()=>F,tryProjectWithZConversion:()=>W,unload:()=>X});var i=n(49186),s=n(74887),r=n(62788),o=n(95488),a=n(51850),l=n(21276),u=n(73941),c=n(5443),p=n(91075),d=n(48526),f=n(86738),m=n(39829),h=n(82799),g=n(16930),v=n(159),y=n(9762),w=n(37539);function x(e,t,n,i,s,r){return b[0]=e,b[1]=t,b[2]=n,(0,y.projectBuffer)(b,i,0,s,r,0)}const b=(0,a.vt)();var C=n(21325),I=n(62815);let S=null,A=null,M=null,R=null,D={};const T=new o.I;function P(){return!!(A?.isLoaded()&&M?.isLoaded()&&R?.isLoaded())}function L(){return!!P()||((0,r.gc)(T),V(),!1)}function O(e,t){return!e||!t||Z(e,t)||L()}function N(e,t){return!Z(e,t)&&!P()}async function V(e){null==S&&(S=Promise.all([n.e(3276).then(n.bind(n,83276)).then(e=>(A=e,A.load())),n.e(8377).then(n.bind(n,8377)).then(e=>(M=e,M.load())),n.e(2158).then(n.bind(n,12158)).then(e=>(R=e,R.load()))])),await S,(0,s.Te)(e),T.notify()}function $(e,t,n){return Array.isArray(e)?0===e.length?[]:((0,l.H)(e),E(e,e[0].spatialReference,t,n)):((0,l.f)(e),E([e],e.spatialReference,t,n)[0])}function E(e,t,n,i){if(null==t||null==n)return e;if(Z(t,n,i))return e.map(e=>z(e,t,n));if(null==i?.geographicTransformation&&(0,u.jA)(t))return e.map(e=>z(e,t,g.A.WGS84)).map(e=>W(e,n));if(null==i?.geographicTransformation&&(0,u.jA)(n))return e.map(e=>W(e,g.A.WGS84)).map(e=>z(e,g.A.WGS84,n));if(!P())throw new G;if(!i?.geographicTransformation)if(i?.extendedParams)i={...i,geographicTransformation:R.getTransformation(t,n,i.areaOfInterestExtent)||new v.A};else if(!i?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,n);let s=D[e];s||(s=R.getTransformation(t,n)||new v.A,D[e]=s),i={geographicTransformation:s}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof p.A?A.executeMany(e,n,i):M.executeMany(e,n,i)}function k(e,t){const n=j([e],t);return null!=n.pending?{pending:n.pending,geometry:null}:null!=n.geometries?{pending:null,geometry:n.geometries[0]}:{pending:null,geometry:null}}function j(e,t){if(!P())for(const n of e)if(null!=n&&!(0,C.aI)(n.spatialReference,t)&&(0,C.fn)(n.spatialReference)&&(0,C.fn)(t)&&!Z(n.spatialReference,t))return(0,r.gc)(T),{pending:V(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,C.aI)(e.spatialReference,t)?e:(0,C.fn)(e.spatialReference)&&(0,C.fn)(t)?W(e,t):null)}}class G extends i.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function X(){S=null,A=null,M=null,R=null,D={}}const F={get loadPromise(){return S}};function W(e,t){try{const n=$(e,t);if(null==n)return null;"xmin"in e&&"xmin"in n&&(n.zmin=e.zmin,n.zmax=e.zmax);const i=(0,I.N)(n.type,e.spatialReference,t);return null!=i&&i(n),n}catch(e){if(!(e instanceof G))throw e;return null}}async function q(e,t,n){const i=e.spatialReference;return null!=i&&null!=t&&await _(i,t,null,n),W(e,t)}function Z(e,t,n){return!(n?.areaOfInterestExtent||n?.extendedParams||n?.geographicTransformation)&&(!!(0,C.aI)(e,t)||(0,C.fn)(e)&&(0,C.fn)(t)&&!!(0,w.jd)(e,t))}function B(e,t){if((0,C.aI)(e,t))return!0;if(!(0,C.fn)(e)||!(0,C.fn)(t))return!1;const n=(0,C.oT)(e)||(0,C.K8)(e)||(0,C.x1)(e),i=(0,C.oT)(t)||(0,C.K8)(t)||(0,C.x1)(t);return n&&i}async function _(e,t,n,i){if(P())return(0,s.NO)(i);if(Array.isArray(e)){for(const{source:t,dest:n,options:s}of e)if(t&&n&&!Z(t,n,s))return V(i)}else if(e&&t&&!Z(e,t,n))return V(i);return(0,s.NO)(i)}function z(e,t,n){return e?"x"in e?H(e,t,new f.A,n,0):"xmin"in e?ie(e,t,new c.A,n,0):"rings"in e?te(e,t,new m.A,n,0):"paths"in e?J(e,t,new h.A,n,0):"points"in e?Y(e,t,new d.A,n,0):null:null}function U(e,t,n=t.spatialReference,i=0){return null!=n&&null!=e.spatialReference&&null!=H(e,e.spatialReference,t,n,i)}function H(e,t,n,i,s){re[0]=e.x,re[1]=e.y;const r=e.z;return re[2]=void 0!==r?r:s,(0,y.projectBuffer)(re,t,0,re,i,0)?(n.x=re[0],n.y=re[1],n.spatialReference=i,void 0!==r||(0,u.xP)(i)?(n.z=re[2],n.hasZ=!0):(n.z=void 0,n.hasZ=!1),void 0===e.m?(n.m=void 0,n.hasM=!1):(n.m=e.m,n.hasM=!0),n):null}function K(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=Y(e,e.spatialReference,t,n,i)}function Y(e,t,n,i,s){const{points:r,hasZ:o,hasM:a}=e,l=[],c=r.length,p=[];for(const e of r)p.push(e[0],e[1],o?e[2]:s);if(!(0,y.projectBuffer)(p,t,0,p,i,0,c))return null;const d=o||(0,u.xP)(i);for(let e=0;e<c;++e){const t=3*e,n=p[t],i=p[t+1];d&&a?l.push([n,i,p[t+2],r[e][3]]):d?l.push([n,i,p[t+2]]):a?l.push([n,i,r[e][2]]):l.push([n,i])}return n.points=l,n.spatialReference=i,n.hasZ=o,n.hasM=a,n}function Q(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=J(e,e.spatialReference,t,n,i)}function J(e,t,n,i,s){const{paths:r,hasZ:o,hasM:a}=e,l=[];if(!se(r,o??!1,a??!1,t,l,i,s))return null;const c=o||(0,u.xP)(i);return n.paths=l,n.spatialReference=i,n.hasZ=c,n.hasM=a,n}function ee(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=te(e,e.spatialReference,t,n,i)}function te(e,t,n,i,s){const{rings:r,hasZ:o,hasM:a}=e,l=[];if(!se(r,o??!1,a??!1,t,l,i,s))return null;const c=o||(0,u.xP)(i);return n.rings=l,n.spatialReference=i,n.hasZ=c,n.hasM=a,n}function ne(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=ie(e,e.spatialReference,t,n,i)}function ie(e,t,n,i,s){const{xmin:r,ymin:o,xmax:a,ymax:l,hasZ:c,hasM:p}=e;if(!x(r,o,c?e.zmin:s,t,re,i))return null;const d=c||(0,u.xP)(i);return n.xmin=re[0],n.ymin=re[1],d&&(n.zmin=re[2]),x(a,l,c?e.zmax:s,t,re,i)?(n.xmax=re[0],n.ymax=re[1],d&&(n.zmax=re[2]),p&&(n.mmin=e.mmin,n.mmax=e.mmax),n.spatialReference=i,n):null}function se(e,t,n,i,s,r,o=0){const a=new Array;for(const n of e)for(const e of n)a.push(e[0],e[1],t?e[2]:o);if(!(0,y.projectBuffer)(a,i,0,a,r,0))return!1;let l=0;s.length=0;const c=t||(0,u.xP)(r);for(const t of e){const e=new Array;for(const i of t)c&&n?e.push([a[l++],a[l++],a[l++],i[3]]):c?e.push([a[l++],a[l++],a[l++]]):n?(e.push([a[l++],a[l++],i[2]]),l++):(e.push([a[l++],a[l++]]),l++);s.push(e)}return!0}const re=(0,a.vt)()},99157:(e,t,n)=>{n.d(t,{A:()=>l});var i,s=n(31635),r=n(69622),o=n(10107),a=(n(44208),n(53966),n(87811),n(64108));let l=i=class extends r.A{constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new i({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,s.Cg)([(0,o.MZ)()],l.prototype,"isInverse",void 0),(0,s.Cg)([(0,o.MZ)()],l.prototype,"wkt",void 0),(0,s.Cg)([(0,o.MZ)()],l.prototype,"wkid",void 0),l=i=(0,s.Cg)([(0,a.$)("esri.geometry.operators.support.GeographicTransformationStep")],l)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[563],{563:(t,e,s)=>{s.d(e,{QueueProcessor:()=>o});var r=s(97768),i=s(74887),n=s(9775),h=s(32587),l=s(96211),a=s(44794);class o{constructor(t){this._schedule=null,this._deferreds=new h.A,this._controllers=new h.A,this._processingItems=new h.A,this._pausedSignal=(0,a.v)(!1),this.concurrency=1,this.process=t.process,this.concurrency=t.concurrency,this._queue=new n.A(t.peeker)}destroy(){this.clear(),this._schedule=(0,r.xt)(this._schedule)}get updating(){return this.running}get length(){return this._processingItems.size+this._queue.length}get running(){return!this._pausedSignal.value&&this._queue.length>0&&this._processingItems.size<this.concurrency}abort(t){const e=this._controllers.get(t);e?.abort()}clear(){this._queue.clear();const t=Array.from(this._controllers.values());this._controllers.clear(),t.forEach(t=>t.abort()),this._processingItems.clear(),this._cancelNext()}forEach(t){this._deferreds.forEach((e,s)=>t(s))}_get(t){const e=this._deferreds.get(t);return e?.promise}pause(){this._pausedSignal.value||(this._pausedSignal.value=!0,this._cancelNext())}push(t,e){const s=this._get(t);if(s)return s;const r=new AbortController,n=(0,i.Tw)(),h=e?(0,i.u7)(e,()=>r.abort()):null,l=(0,i.NY)(r.signal,()=>{const e=this._processingItems.get(t);e&&e.controller.abort(),a(),n.reject((0,i.NK)())}),a=()=>{l.remove(),h?.remove(),this._removeItem(t),this._queue.remove(t),this._scheduleNext()};return this._deferreds.set(t,n),this._controllers.set(t,r),n.promise.then(a,a),this._queue.push(t),this._scheduleNext(),n.promise}last(){return this._queue.last()}reset(){const t=Array.from(this._processingItems.values());this._processingItems.clear();for(const e of t)this._queue.push(e.item),e.controller.abort();this._scheduleNext()}resume(){this._pausedSignal.value&&(this._pausedSignal.value=!1,this._scheduleNext())}takeAll(){const t=[];for(;this._queue.length;)t.push(this._queue.pop());return this.clear(),t}_removeItem(t){this._deferreds.delete(t),this._controllers.delete(t),this._processingItems.delete(t)}_scheduleNext(){this._pausedSignal.value||this._schedule||(this._schedule=(0,l._)(()=>{this._schedule=null,this._next()}))}_next(){for(;this._queue.length>0&&this._processingItems.size<this.concurrency;)this._process(this._queue.pop())}_cancelNext(){this._schedule&&(this._schedule.remove(),this._schedule=null)}_processResult(t,e){this._canProcessFulfillment(t)&&(this._scheduleNext(),this._deferreds.get(t.item).resolve(e))}_processError(t,e){this._canProcessFulfillment(t)&&(this._scheduleNext(),this._deferreds.get(t.item).reject(e))}_canProcessFulfillment(t){return!!this._deferreds.get(t.item)&&this._processingItems.get(t.item)===t}_process(t){if(null==t)return;let e;const s=new AbortController,r=new c(t,s);this._processingItems.set(t,r);try{e=this.process(t,s.signal)}catch(t){this._processError(r,t)}(0,i.$X)(e)?(r.promise=e,e.then(t=>this._processResult(r,t),t=>this._processError(r,t))):this._processResult(r,e)}}class c{constructor(t,e){this.item=t,this.controller=e,this.promise=null}}},9775:(t,e,s)=>{s.d(e,{A:()=>n});var r=s(62788),i=s(95488);class n{constructor(t=t=>t.values().next().value){this._peeker=t,this._observable=new i.I,this._items=new Set}get length(){return(0,r.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let t;for(t of this._items);return t}peek(){if(0!==this.length)return this._peeker(this._items)}push(t){this.contains(t)||(this._items.add(t),this._observable.notify())}contains(t){return(0,r.gc)(this._observable),this._items.has(t)}pop(){if(0===this.length)return;const t=this.peek();return this._items.delete(t),this._observable.notify(),t}popLast(){if(0===this.length)return;const t=this.last();return this._items.delete(t),this._observable.notify(),t}remove(t){this.contains(t)&&(this._items.delete(t),this._observable.notify())}filter(t){const e=this.length;return this._items.forEach(e=>{t(e)||this._items.delete(e)}),e!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,r.gc)(this._observable),yield*this._items}}},11406:(t,e,s)=>{s.d(e,{T:()=>h});var r=s(36563),i=s(4576);class n{constructor(t,e){this._observers=t,this._observer=e}remove(){(0,i.TF)(this._observers,this._observer)}}class h{constructor(){this._observers=null,this.destroyed=!1}observe(t){if(this.destroyed||t.destroyed)return l;null==this._observers&&(this._observers=[]);const e=this._observers;let s=!1,r=!1;const i=e.length;for(let n=0;n<i;++n){const i=e[n];if(i.destroyed)r=!0;else if(i===t){s=!0;break}}return s||(e.push(t),r&&this._removeDestroyedObservers()),new n(e,t)}_removeDestroyedObservers(){const t=this._observers;if(!t||0===t.length)return;const e=t.length;let s=0;for(let r=0;r<e;++r){for(;r+s<e&&t[r+s].destroyed;)++s;if(s>0){if(!(r+s<e))break;t[r]=t[r+s]}}t.length=e-s}destroy(){if(this.destroyed)return;this.destroyed=!0;const t=this._observers;if(null!=t){for(const e of t)e.onCommitted();this._observers=null}}}const l=(0,r.hA)()},15142:(t,e,s)=>{s.d(e,{A:()=>o});var r=s(4576),i=s(21818);const n=(t,e,s,r)=>{let i=e,n=e;const h=s>>>1,l=t[i-1];for(;n<=h;){n=i<<1,n<s&&r(t[n-1],t[n])<0&&++n;const e=t[n-1];if(r(e,l)<=0)break;t[i-1]=e,i=n}t[i-1]=l},h=(t,e)=>t<e?-1:t>e?1:0;function l(t,e,s,r){void 0===e&&(e=0),void 0===s&&(s=t.length),void 0===r&&(r=h);for(let i=s>>>1;i>e;i--)n(t,i,s,r);const i=e+1;for(let h=s-1;h>e;h--){const s=t[e];t[e]=t[h],t[h]=s,n(t,i,h,r)}}function*a(t,e,s,r){void 0===e&&(e=0),void 0===s&&(s=t.length),void 0===r&&(r=h);for(let i=s>>>1;i>e;i--)n(t,i,s,r),yield;const i=e+1;for(let h=s-1;h>e;h--){const s=t[e];t[e]=t[h],t[h]=s,n(t,i,h,r),yield}}class o{constructor(t){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new r.vW,t&&(t.initialSize&&(this.data=new Array(t.initialSize)),t.allocator&&(this._allocator=t.allocator),void 0!==t.deallocator&&(this._deallocator=t.deallocator),t.shrink&&(this._shrink=()=>c(this)))}toArray(){return this.data.slice(0,this.length)}filter(t){const e=new Array;for(let s=0;s<this._length;s++){const r=this.data[s];t(r)&&e.push(r)}return e}at(t){if((t=Math.trunc(t)||0)<0&&(t+=this._length),!(t<0||t>=this._length))return this.data[t]}includes(t,e){const s=this.data.indexOf(t,e);return-1!==s&&s<this.length}get length(){return this._length}set length(t){if(t>this._length){if(this._allocator){for(;this._length<t;)this.data[this._length++]=this._allocator(this.data[this._length]);return}this._length=t}else{if(this._deallocator)for(let e=t;e<this._length;++e)this.data[e]=this._deallocator(this.data[e]);this._length=t,this._shrink()}}clear(){this.length=0}prune(){this.clear(),this.data=[]}push(t){this.data[this._length++]=t}pushArray(t,e=t.length){for(let s=0;s<e;s++)this.data[this._length++]=t[s]}fill(t,e){for(let s=0;s<e;s++)this.data[this._length++]=t}pushNew(){this._allocator&&(this.data[this.length]=this._allocator(this.data[this.length]));const t=this.data[this._length];return++this._length,t}unshift(t){this.data.unshift(t),this._length++,c(this)}pop(){if(0===this.length)return;const t=this.data[this.length-1];return this.length=this.length-1,this._shrink(),t}remove(t){const e=(0,r.qh)(this.data,(0,i.zI)(t),this.length,this._hint);if(-1!==e)return this.data.splice(e,1),this.length=this.length-1,t}removeUnordered(t){return this.removeUnorderedIndex((0,r.qh)(this.data,(0,i.zI)(t),this.length,this._hint))}removeUnorderedIndex(t){if(!(t>=this.length||t<0))return this.swapElements(t,this.length-1),this.pop()}removeUnorderedMany(t,e=t.length,s){this.length=(0,r.mW)(this.data,t,this.length,e,this._hint,s),this._shrink()}front(){if(0!==this.length)return this.data[0]}back(){if(0!==this.length)return this.data[this.length-1]}swapElements(t,e){if(t>=this.length||e>=this.length||t===e)return;const s=this.data[t];this.data[t]=this.data[e],this.data[e]=s}sort(t){l(this.data,0,this.length,t)}iterableSort(t){return a(this.data,0,this.length,t)}some(t,e){for(let s=0;s<this.length;++s)if(t.call(e,this.data[s],s,this.data))return!0;return!1}find(t,e){const{data:s,length:r}=this;for(let i=0;i<r;++i)if(t.call(e,s[i]))return s[i]}filterInPlace(t,e){let s=0;for(let r=0;r<this._length;++r){const i=this.data[r];t.call(e,i,r,this.data)&&(this.data[r]=this.data[s],this.data[s]=i,s++)}if(this._deallocator)for(let t=s;t<this._length;t++)this.data[t]=this._deallocator(this.data[t]);return this._length=s,this._shrink(),this}forAll(t,e){const{data:s,length:r}=this;for(let i=0;i<r;++i)t.call(e,s[i],i,s)}forEach(t,e){this.data.slice(0,this.length).forEach(t,e)}map(t,e){const s=new Array(this.length);for(let r=0;r<this.length;++r)s[r]=t.call(e,this.data[r],r,this.data);return s}reduce(t,e){let s=e;for(let e=0;e<this.length;++e)s=t(s,this.data[e],e,this.data);return s}has(t){const e=this.length,s=this.data;for(let r=0;r<e;++r)if(s[r]===t)return!0;return!1}*[Symbol.iterator](){for(let t=0;t<this.length;t++)yield this.data[t]}}function c(t){t.data.length>1.5*t.length&&(t.data.length=Math.floor(1.1*t.length))}},26390:(t,e,s)=>{s.d(e,{d:()=>i});const r=[];function i(t){r.push(t),1===r.length&&queueMicrotask(()=>{const t=r.slice();r.length=0;for(const e of t)e()})}},32587:(t,e,s)=>{s.d(e,{A:()=>n});var r=s(62788),i=s(95488);class n{constructor(t){this._observable=new i.I,this._map=new Map(t)}get size(){return(0,r.gc)(this._observable),this._map.size}clear(){this._map.size>0&&(this._map.clear(),this._observable.notify())}delete(t){const e=this._map.delete(t);return e&&this._observable.notify(),e}entries(){return(0,r.gc)(this._observable),this._map.entries()}forEach(t,e){(0,r.gc)(this._observable),this._map.forEach((s,r)=>t.call(e,s,r,this),e)}get(t){return(0,r.gc)(this._observable),this._map.get(t)}has(t){return(0,r.gc)(this._observable),this._map.has(t)}keys(){return(0,r.gc)(this._observable),this._map.keys()}set(t,e){return this._map.set(t,e),this._observable.notify(),this}values(){return(0,r.gc)(this._observable),this._map.values()}[Symbol.iterator](){return(0,r.gc)(this._observable),this._map[Symbol.iterator]()}[Symbol.dispose](){this._observable.destroy()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}}},44794:(t,e,s)=>{s.d(e,{v:()=>l});var r=s(4718),i=s(62788),n=s(95488);class h{constructor(t,e){this._observable=new n.I,this._value=t,this._equalityFunction=e}get value(){return(0,i.gc)(this._observable),this._value}set value(t){this._equalityFunction(t,this._value)||(this._value=t,this._observable.notify())}mutate(t){t(this._value),this._observable.notify()}}function l(t,e=r.gh){return new h(t,e)}},47328:(t,e,s)=>{s.d(e,{i:()=>r});const r={Dirty:1,Overridden:2,Computing:4,NonNullable:8,HasDefaultValue:16,DepTrackingInitialized:32,AutoTracked:64,ExplicitlyTracking:128}},62788:(t,e,s)=>{s.d(e,{F_:()=>_,Xr:()=>b,a:()=>d,fE:()=>m,gc:()=>o}),s(44208);var r=s(53966),i=s(88620),n=s(47328);const h=new(s(67867).R),l=[];let a=h;function o(t){a.onAccessed(t)}let c=!1,u=!1;function d(t,e,s){if(c)return f(t,e,s);let r=null;return g(t),r=e.call(s),p(),r}function _(t,e){return d(h,t,e)}function f(t,e,s){const i=c;c=!0,g(t);let n=null;try{n=e.call(s)}catch(t){u&&r.A.getLogger("esri.core.accessorSupport.tracking").error(t)}return p(),c=i,n}function g(t){a=t,l.push(t)}function p(){const t=l.length;if(t>1){const e=l.pop();a=l[t-2],e.onTrackingEnd()}else if(1===t){const t=l.pop();a=h,t.onTrackingEnd()}else a=h}function m(t,e){if(e.flags&n.i.DepTrackingInitialized)return;e.flags|=n.i.DepTrackingInitialized;const s=u;u=!1,e.flags&n.i.AutoTracked?f(e.trackingTarget,e.metadata.get,t):b(t,e),u=s}const v=[];function b(t,e){e.flags&n.i.ExplicitlyTracking||(e.flags|=n.i.ExplicitlyTracking,f(e.trackingTarget,()=>{const s=e.metadata.dependsOn||v;for(const e of s)if("string"!=typeof e||e.includes(".")){const s=(0,i.AH)(e);for(let e=0,r=t;e<s.length&&null!=r&&"object"==typeof r;++e)r=y(r,s[e],e!==s.length-1)}else y(t,e,!1)}),e.flags&=~n.i.ExplicitlyTracking)}function y(t,e,s){const r=e.endsWith("?")?e.slice(0,-1):e;if(null!=t.getItemAt||Array.isArray(t)){const e=parseInt(r,10);if(!isNaN(e))return Array.isArray(t)?t[e]:t.at(e)}const n=(0,i.oY)(t);if(n){const e=n.propertiesByName.get(r);e&&(o(e),m(t,e))}return s?t[r]:void 0}},67867:(t,e,s)=>{s.d(e,{R:()=>r});class r{constructor(t){this.accessed=void 0,this._handles=void 0,this._observer=t}destroy(){this.accessed?.clear(),this.clear()}onAccessed(t){null!=this._observer&&t!==this._observer&&(null==this.accessed&&(this.accessed=new Set),this.accessed.add(t))}onTrackingEnd(){null!=this._observer&&(this.clear(),null!=this.accessed&&(null==this._handles&&(this._handles=[]),this.accessed.forEach(t=>{this._handles.push(t.observe(this._observer))}),this.accessed.clear()))}clear(){if(null!=this._handles){for(let t=0;t<this._handles.length;++t)this._handles[t].remove();this._handles.length=0}}}},78659:(t,e,s)=>{function r(t){return t}function i(t){return 1e3*t}function n(t){return t}s.d(e,{Kp:()=>n,gr:()=>i,l5:()=>r})},88620:(t,e,s)=>{s.d(e,{AH:()=>o,h1:()=>l,oY:()=>n,qg:()=>u,yh:()=>h});var r=s(36563),i=s(4718);function n(t){return t.__accessor__??null}function h(t,e){return null!=t?.metadata?.[e]}function l(t,e,s){return a(t,e,s?{policy:s,path:""}:null)}function a(t,e,s){return e?Object.keys(e).reduce((t,r)=>{const n=r;if("__proto__"===n)return t;let h=null,l="merge";if(s&&(h=s.path?`${s.path}.${r}`:r,l=s.policy(h)),"replace"===l)return t[n]=e[n],t;if("replace-arrays"===l&&Array.isArray(t[n]))return t[n]=e[n],t;if(void 0===t[n])return t[n]=(0,i.o8)(e[n]),t;let o=t[n],c=e[n];if(o===c)return t;if(Array.isArray(c)||Array.isArray(t))o=o?Array.isArray(o)?t[n]=o.slice():t[n]=[o]:t[n]=[],c&&(Array.isArray(c)||(c=[c]),c.forEach(t=>{o.includes(t)||o.push(t)}));else if(c&&"object"==typeof c)if(s){const e=s.path;s.path=h,t[n]=a(o,c,s),s.path=e}else t[n]=a(o,c,null);else t.hasOwnProperty(r)&&!e.hasOwnProperty(r)||(t[n]=c);return t},t||{}):t}function o(t){return Array.isArray(t)?t:t.split(".")}function c(t){return t.includes(",")?t.split(",").map(t=>t.trim()):[t.trim()]}function u(t,e,s,i){const n=function(t){if(Array.isArray(t)){const e=[];for(const s of t)e.push(...c(s));return e}return c(t)}(e);if(1!==n.length){const e=n.map(e=>i(t,e,s));return(0,r.vE)(e)}return i(t,n[0],s)}},95488:(t,e,s)=>{s.d(e,{I:()=>i});var r=s(11406);class i extends r.T{notify(){const t=this._observers;if(t&&t.length>0){const e=t.slice();for(const t of e)t.onInvalidated(),t.onCommitted()}}}},96211:(t,e,s)=>{s.d(e,{_:()=>g,$m:()=>w,NO:()=>k,md:()=>A});var r=s(26390);class i{constructor(t,e=30){this.name=t,this._counter=0,this._samples=new Array(e)}push(t){null!=t&&(this._samples[++this._counter%this._samples.length]=t)}set(t){null!=t&&(this._samples[this._counter%this._samples.length]=t)}get median(){return this._samples.slice().sort((t,e)=>t-e)[Math.floor(this._samples.length/2)]}get average(){return this._samples.reduce((t,e)=>t+e,0)/this._samples.length}get last(){return this._samples[this._counter%this._samples.length]}}var n=s(15142),h=s(74887),l=s(78659);class a{constructor(t){this.callback=t,this.isActive=!0}remove(){this.isActive=!1}}let o=0;const c={time:(0,l.l5)(0),deltaTime:(0,l.l5)(0),elapsedFrameTime:(0,l.l5)(0),frameDuration:(0,l.l5)(0)},u=["prepare","preRender","render","postRender","update","finish"],d=[],_=new n.A,f={frameTasks:_,willDispatch:!1,clearFrameTasks:function(t=!1){_.forAll(t=>{t.removed=!0}),t&&b()},dispatch:y,executeFrameTasks:function(t){const e=(0,l.l5)(t-o);o=t;const s=1e3/60,r=Math.max(0,e-s);c.time=t,c.frameDuration=(0,l.l5)(s-r);for(let s=0;s<u.length;s++){const r=performance.now(),i=u[s];_.forAll(r=>{r.paused||r.removed||(0===s&&r.ticks++,r.phases[i]&&(c.elapsedFrameTime=(0,l.l5)(performance.now()-t),c.deltaTime=0===r.ticks?(0,l.l5)(0):e,r.phases[i]?.call(r,c)))}),T[s].push(performance.now()-r)}b(),I.push(performance.now()-t)},reschedule:function(){null!=p&&(cancelAnimationFrame(p),p=requestAnimationFrame(m))}};function g(t){const e=new a(t);return d.push(e),f.willDispatch||(f.willDispatch=!0,(0,r.d)(y)),e}let p=null;function m(){const t=performance.now();p=null;const e=_.some(t=>!t.paused&&!t.removed);p=e?requestAnimationFrame(m):null,f.executeFrameTasks(t)}const v=new n.A;function b(){_.forAll(t=>{t.removed&&v.push(t)}),_.removeUnorderedMany(v.data,v.length),v.clear()}function y(){for(;d.length;){const t=d.shift();t.isActive&&t.callback()}f.willDispatch=!1}function A(t=1,e){const s=(0,h.Tw)(),i=()=>{(0,h.G4)(e)?s.reject((0,h.NK)()):0===t?s():(--t,(0,r.d)(()=>i()))};return i(),s.promise}function k(t){return A(1,t)}async function w(t){await k(t),await new Promise(e=>requestAnimationFrame(()=>{t?.aborted||e()}))}const T=u.map(t=>new i(t)),I=new i("total")}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[563],{563:(t,e,s)=>{s.d(e,{QueueProcessor:()=>o});var r=s(97768),i=s(74887),n=s(9775),h=s(32587),l=s(76030),a=s(44794);class o{constructor(t){this._schedule=null,this._deferreds=new h.A,this._controllers=new h.A,this._processingItems=new h.A,this._pausedSignal=(0,a.v)(!1),this.concurrency=1,this.process=t.process,this.concurrency=t.concurrency,this._queue=new n.A(t.peeker)}destroy(){this.clear(),this._schedule=(0,r.xt)(this._schedule)}get updating(){return this.running}get length(){return this._processingItems.size+this._queue.length}get running(){return!this._pausedSignal.value&&this._queue.length>0&&this._processingItems.size<this.concurrency}abort(t){const e=this._controllers.get(t);e?.abort()}clear(){this._queue.clear();const t=Array.from(this._controllers.values());this._controllers.clear(),t.forEach(t=>t.abort()),this._processingItems.clear(),this._cancelNext()}forEach(t){this._deferreds.forEach((e,s)=>t(s))}_get(t){const e=this._deferreds.get(t);return e?.promise}pause(){this._pausedSignal.value||(this._pausedSignal.value=!0,this._cancelNext())}push(t,e){const s=this._get(t);if(s)return s;const r=new AbortController,n=(0,i.Tw)(),h=e?(0,i.u7)(e,()=>r.abort()):null,l=(0,i.NY)(r.signal,()=>{const e=this._processingItems.get(t);e&&e.controller.abort(),a(),n.reject((0,i.NK)())}),a=()=>{l.remove(),h?.remove(),this._removeItem(t),this._queue.remove(t),this._scheduleNext()};return this._deferreds.set(t,n),this._controllers.set(t,r),n.promise.then(a,a),this._queue.push(t),this._scheduleNext(),n.promise}last(){return this._queue.last()}reset(){const t=Array.from(this._processingItems.values());this._processingItems.clear();for(const e of t)this._queue.push(e.item),e.controller.abort();this._scheduleNext()}resume(){this._pausedSignal.value&&(this._pausedSignal.value=!1,this._scheduleNext())}takeAll(){const t=[];for(;this._queue.length;)t.push(this._queue.pop());return this.clear(),t}_removeItem(t){this._deferreds.delete(t),this._controllers.delete(t),this._processingItems.delete(t)}_scheduleNext(){this._pausedSignal.value||this._schedule||(this._schedule=(0,l._)(()=>{this._schedule=null,this._next()}))}_next(){for(;this._queue.length>0&&this._processingItems.size<this.concurrency;)this._process(this._queue.pop())}_cancelNext(){this._schedule&&(this._schedule.remove(),this._schedule=null)}_processResult(t,e){this._canProcessFulfillment(t)&&(this._scheduleNext(),this._deferreds.get(t.item).resolve(e))}_processError(t,e){this._canProcessFulfillment(t)&&(this._scheduleNext(),this._deferreds.get(t.item).reject(e))}_canProcessFulfillment(t){return!!this._deferreds.get(t.item)&&this._processingItems.get(t.item)===t}_process(t){if(null==t)return;let e;const s=new AbortController,r=new c(t,s);this._processingItems.set(t,r);try{e=this.process(t,s.signal)}catch(t){this._processError(r,t)}(0,i.$X)(e)?(r.promise=e,e.then(t=>this._processResult(r,t),t=>this._processError(r,t))):this._processResult(r,e)}}class c{constructor(t,e){this.item=t,this.controller=e,this.promise=null}}},9775:(t,e,s)=>{s.d(e,{A:()=>n});var r=s(62788),i=s(95488);class n{constructor(t=t=>t.values().next().value){this._peeker=t,this._observable=new i.I,this._items=new Set}get length(){return(0,r.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let t;for(t of this._items);return t}peek(){if(0!==this.length)return this._peeker(this._items)}push(t){this.contains(t)||(this._items.add(t),this._observable.notify())}contains(t){return(0,r.gc)(this._observable),this._items.has(t)}pop(){if(0===this.length)return;const t=this.peek();return this._items.delete(t),this._observable.notify(),t}popLast(){if(0===this.length)return;const t=this.last();return this._items.delete(t),this._observable.notify(),t}remove(t){this.contains(t)&&(this._items.delete(t),this._observable.notify())}filter(t){const e=this.length;return this._items.forEach(e=>{t(e)||this._items.delete(e)}),e!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,r.gc)(this._observable),yield*this._items}}},11406:(t,e,s)=>{s.d(e,{T:()=>h});var r=s(36563),i=s(4576);class n{constructor(t,e){this._observers=t,this._observer=e}remove(){(0,i.TF)(this._observers,this._observer)}}class h{constructor(){this._observers=null,this.destroyed=!1}observe(t){if(this.destroyed||t.destroyed)return l;null==this._observers&&(this._observers=[]);const e=this._observers;let s=!1,r=!1;const i=e.length;for(let n=0;n<i;++n){const i=e[n];if(i.destroyed)r=!0;else if(i===t){s=!0;break}}return s||(e.push(t),r&&this._removeDestroyedObservers()),new n(e,t)}_removeDestroyedObservers(){const t=this._observers;if(!t||0===t.length)return;const e=t.length;let s=0;for(let r=0;r<e;++r){for(;r+s<e&&t[r+s].destroyed;)++s;if(s>0){if(!(r+s<e))break;t[r]=t[r+s]}}t.length=e-s}destroy(){if(this.destroyed)return;this.destroyed=!0;const t=this._observers;if(null!=t){for(const e of t)e.onCommitted();this._observers=null}}}const l=(0,r.hA)()},15142:(t,e,s)=>{s.d(e,{A:()=>o});var r=s(4576),i=s(21818);const n=(t,e,s,r)=>{let i=e,n=e;const h=s>>>1,l=t[i-1];for(;n<=h;){n=i<<1,n<s&&r(t[n-1],t[n])<0&&++n;const e=t[n-1];if(r(e,l)<=0)break;t[i-1]=e,i=n}t[i-1]=l},h=(t,e)=>t<e?-1:t>e?1:0;function l(t,e,s,r){void 0===e&&(e=0),void 0===s&&(s=t.length),void 0===r&&(r=h);for(let i=s>>>1;i>e;i--)n(t,i,s,r);const i=e+1;for(let h=s-1;h>e;h--){const s=t[e];t[e]=t[h],t[h]=s,n(t,i,h,r)}}function*a(t,e,s,r){void 0===e&&(e=0),void 0===s&&(s=t.length),void 0===r&&(r=h);for(let i=s>>>1;i>e;i--)n(t,i,s,r),yield;const i=e+1;for(let h=s-1;h>e;h--){const s=t[e];t[e]=t[h],t[h]=s,n(t,i,h,r),yield}}class o{constructor(t){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new r.vW,t&&(t.initialSize&&(this.data=new Array(t.initialSize)),t.allocator&&(this._allocator=t.allocator),void 0!==t.deallocator&&(this._deallocator=t.deallocator),t.shrink&&(this._shrink=()=>c(this)))}toArray(){return this.data.slice(0,this.length)}filter(t){const e=new Array;for(let s=0;s<this._length;s++){const r=this.data[s];t(r)&&e.push(r)}return e}at(t){if((t=Math.trunc(t)||0)<0&&(t+=this._length),!(t<0||t>=this._length))return this.data[t]}includes(t,e){const s=this.data.indexOf(t,e);return-1!==s&&s<this.length}get length(){return this._length}set length(t){if(t>this._length){if(this._allocator){for(;this._length<t;)this.data[this._length++]=this._allocator(this.data[this._length]);return}this._length=t}else{if(this._deallocator)for(let e=t;e<this._length;++e)this.data[e]=this._deallocator(this.data[e]);this._length=t,this._shrink()}}clear(){this.length=0}prune(){this.clear(),this.data=[]}push(t){this.data[this._length++]=t}pushArray(t,e=t.length){for(let s=0;s<e;s++)this.data[this._length++]=t[s]}fill(t,e){for(let s=0;s<e;s++)this.data[this._length++]=t}pushNew(){this._allocator&&(this.data[this.length]=this._allocator(this.data[this.length]));const t=this.data[this._length];return++this._length,t}unshift(t){this.data.unshift(t),this._length++,c(this)}pop(){if(0===this.length)return;const t=this.data[this.length-1];return this.length=this.length-1,this._shrink(),t}remove(t){const e=(0,r.qh)(this.data,(0,i.zI)(t),this.length,this._hint);if(-1!==e)return this.data.splice(e,1),this.length=this.length-1,t}removeUnordered(t){return this.removeUnorderedIndex((0,r.qh)(this.data,(0,i.zI)(t),this.length,this._hint))}removeUnorderedIndex(t){if(!(t>=this.length||t<0))return this.swapElements(t,this.length-1),this.pop()}removeUnorderedMany(t,e=t.length,s){this.length=(0,r.mW)(this.data,t,this.length,e,this._hint,s),this._shrink()}front(){if(0!==this.length)return this.data[0]}back(){if(0!==this.length)return this.data[this.length-1]}swapElements(t,e){if(t>=this.length||e>=this.length||t===e)return;const s=this.data[t];this.data[t]=this.data[e],this.data[e]=s}sort(t){l(this.data,0,this.length,t)}iterableSort(t){return a(this.data,0,this.length,t)}some(t,e){for(let s=0;s<this.length;++s)if(t.call(e,this.data[s],s,this.data))return!0;return!1}find(t,e){const{data:s,length:r}=this;for(let i=0;i<r;++i)if(t.call(e,s[i]))return s[i]}filterInPlace(t,e){let s=0;for(let r=0;r<this._length;++r){const i=this.data[r];t.call(e,i,r,this.data)&&(this.data[r]=this.data[s],this.data[s]=i,s++)}if(this._deallocator)for(let t=s;t<this._length;t++)this.data[t]=this._deallocator(this.data[t]);return this._length=s,this._shrink(),this}forAll(t,e){const{data:s,length:r}=this;for(let i=0;i<r;++i)t.call(e,s[i],i,s)}forEach(t,e){this.data.slice(0,this.length).forEach(t,e)}map(t,e){const s=new Array(this.length);for(let r=0;r<this.length;++r)s[r]=t.call(e,this.data[r],r,this.data);return s}reduce(t,e){let s=e;for(let e=0;e<this.length;++e)s=t(s,this.data[e],e,this.data);return s}has(t){const e=this.length,s=this.data;for(let r=0;r<e;++r)if(s[r]===t)return!0;return!1}*[Symbol.iterator](){for(let t=0;t<this.length;t++)yield this.data[t]}}function c(t){t.data.length>1.5*t.length&&(t.data.length=Math.floor(1.1*t.length))}},26390:(t,e,s)=>{s.d(e,{d:()=>i});const r=[];function i(t){r.push(t),1===r.length&&queueMicrotask(()=>{const t=r.slice();r.length=0;for(const e of t)e()})}},32587:(t,e,s)=>{s.d(e,{A:()=>n});var r=s(62788),i=s(95488);class n{constructor(t){this._observable=new i.I,this._map=new Map(t)}get size(){return(0,r.gc)(this._observable),this._map.size}clear(){this._map.size>0&&(this._map.clear(),this._observable.notify())}delete(t){const e=this._map.delete(t);return e&&this._observable.notify(),e}entries(){return(0,r.gc)(this._observable),this._map.entries()}forEach(t,e){(0,r.gc)(this._observable),this._map.forEach((s,r)=>t.call(e,s,r,this),e)}get(t){return(0,r.gc)(this._observable),this._map.get(t)}has(t){return(0,r.gc)(this._observable),this._map.has(t)}keys(){return(0,r.gc)(this._observable),this._map.keys()}set(t,e){return this._map.set(t,e),this._observable.notify(),this}values(){return(0,r.gc)(this._observable),this._map.values()}[Symbol.iterator](){return(0,r.gc)(this._observable),this._map[Symbol.iterator]()}[Symbol.dispose](){this._observable.destroy()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}}},44794:(t,e,s)=>{s.d(e,{v:()=>l});var r=s(4718),i=s(62788),n=s(95488);class h{constructor(t,e){this._observable=new n.I,this._value=t,this._equalityFunction=e}get value(){return(0,i.gc)(this._observable),this._value}set value(t){this._equalityFunction(t,this._value)||(this._value=t,this._observable.notify())}mutate(t){t(this._value),this._observable.notify()}}function l(t,e=r.gh){return new h(t,e)}},47328:(t,e,s)=>{s.d(e,{i:()=>r});const r={Dirty:1,Overridden:2,Computing:4,NonNullable:8,HasDefaultValue:16,DepTrackingInitialized:32,AutoTracked:64,ExplicitlyTracking:128}},62788:(t,e,s)=>{s.d(e,{F_:()=>_,Xr:()=>b,a:()=>d,fE:()=>m,gc:()=>o}),s(44208);var r=s(53966),i=s(88620),n=s(47328);const h=new(s(67867).R),l=[];let a=h;function o(t){a.onAccessed(t)}let c=!1,u=!1;function d(t,e,s){if(c)return f(t,e,s);let r=null;return g(t),r=e.call(s),p(),r}function _(t,e){return d(h,t,e)}function f(t,e,s){const i=c;c=!0,g(t);let n=null;try{n=e.call(s)}catch(t){u&&r.A.getLogger("esri.core.accessorSupport.tracking").error(t)}return p(),c=i,n}function g(t){a=t,l.push(t)}function p(){const t=l.length;if(t>1){const e=l.pop();a=l[t-2],e.onTrackingEnd()}else if(1===t){const t=l.pop();a=h,t.onTrackingEnd()}else a=h}function m(t,e){if(e.flags&n.i.DepTrackingInitialized)return;e.flags|=n.i.DepTrackingInitialized;const s=u;u=!1,e.flags&n.i.AutoTracked?f(e.trackingTarget,e.metadata.get,t):b(t,e),u=s}const v=[];function b(t,e){e.flags&n.i.ExplicitlyTracking||(e.flags|=n.i.ExplicitlyTracking,f(e.trackingTarget,()=>{const s=e.metadata.dependsOn||v;for(const e of s)if("string"!=typeof e||e.includes(".")){const s=(0,i.AH)(e);for(let e=0,r=t;e<s.length&&null!=r&&"object"==typeof r;++e)r=y(r,s[e],e!==s.length-1)}else y(t,e,!1)}),e.flags&=~n.i.ExplicitlyTracking)}function y(t,e,s){const r=e.endsWith("?")?e.slice(0,-1):e;if(null!=t.getItemAt||Array.isArray(t)){const e=parseInt(r,10);if(!isNaN(e))return Array.isArray(t)?t[e]:t.at(e)}const n=(0,i.oY)(t);if(n){const e=n.propertiesByName.get(r);e&&(o(e),m(t,e))}return s?t[r]:void 0}},67867:(t,e,s)=>{s.d(e,{R:()=>r});class r{constructor(t){this.accessed=void 0,this._handles=void 0,this._observer=t}destroy(){this.accessed?.clear(),this.clear()}onAccessed(t){null!=this._observer&&t!==this._observer&&(null==this.accessed&&(this.accessed=new Set),this.accessed.add(t))}onTrackingEnd(){null!=this._observer&&(this.clear(),null!=this.accessed&&(null==this._handles&&(this._handles=[]),this.accessed.forEach(t=>{this._handles.push(t.observe(this._observer))}),this.accessed.clear()))}clear(){if(null!=this._handles){for(let t=0;t<this._handles.length;++t)this._handles[t].remove();this._handles.length=0}}}},76030:(t,e,s)=>{s.d(e,{_:()=>p,$m:()=>T,NO:()=>w,md:()=>k});var r=s(26390);function i(t,e,s,r,i){console.timeStamp(t,e,s,i,r)}class n{constructor(t,e=30){this.name=t,this._counter=0,this._samples=new Array(e)}push(t){null!=t&&(this._samples[++this._counter%this._samples.length]=t)}set(t){null!=t&&(this._samples[this._counter%this._samples.length]=t)}get median(){return this._samples.slice().sort((t,e)=>t-e)[Math.floor(this._samples.length/2)]}get average(){return this._samples.reduce((t,e)=>t+e,0)/this._samples.length}get last(){return this._samples[this._counter%this._samples.length]}}var h=s(15142),l=s(74887),a=s(78659);class o{constructor(t){this.callback=t,this.isActive=!0}remove(){this.isActive=!1}}let c=0;const u={time:(0,a.l5)(0),deltaTime:(0,a.l5)(0),elapsedFrameTime:(0,a.l5)(0),frameDuration:(0,a.l5)(0)},d=["prepare","preRender","render","postRender","update","finish"],_=[],f=new h.A,g={frameTasks:f,willDispatch:!1,clearFrameTasks:function(t=!1){f.forAll(t=>{t.removed=!0}),t&&y()},dispatch:A,executeFrameTasks:function(t){const e=(0,a.l5)(t-c);c=t;const s=1e3/60,r=Math.max(0,e-s);u.time=t,u.frameDuration=(0,a.l5)(s-r);for(let s=0;s<d.length;s++){const r=performance.now(),n=d[s];f.forAll(r=>{r.paused||r.removed||(0===s&&r.ticks++,r.phases[n]&&(u.elapsedFrameTime=(0,a.l5)(performance.now()-t),u.deltaTime=0===r.ticks?(0,a.l5)(0):e,r.phases[n]?.call(r,u)))});const h=performance.now();I[s].push(h-r),i(n,r,h,"Maps SDK","Scheduling")}y();const n=performance.now();S.push(n-t),i("Animation Frame",t,n,"Maps SDK","Scheduling")},reschedule:function(){null!=m&&(cancelAnimationFrame(m),m=requestAnimationFrame(v))}};function p(t){const e=new o(t);return _.push(e),g.willDispatch||(g.willDispatch=!0,(0,r.d)(A)),e}let m=null;function v(){const t=performance.now();m=null;const e=f.some(t=>!t.paused&&!t.removed);m=e?requestAnimationFrame(v):null,g.executeFrameTasks(t)}const b=new h.A;function y(){f.forAll(t=>{t.removed&&b.push(t)}),f.removeUnorderedMany(b.data,b.length),b.clear()}function A(){for(;_.length;){const t=_.shift();t.isActive&&t.callback()}g.willDispatch=!1}function k(t=1,e){const s=(0,l.Tw)(),i=()=>{(0,l.G4)(e)?s.reject((0,l.NK)()):0===t?s():(--t,(0,r.d)(()=>i()))};return i(),s.promise}function w(t){return k(1,t)}async function T(t){await w(t),await new Promise(e=>requestAnimationFrame(()=>{t?.aborted||e()}))}const I=d.map(t=>new n(t)),S=new n("total")},78659:(t,e,s)=>{function r(t){return t}function i(t){return 1e3*t}function n(t){return t}s.d(e,{Kp:()=>n,gr:()=>i,l5:()=>r})},88620:(t,e,s)=>{s.d(e,{AH:()=>o,h1:()=>l,oY:()=>n,qg:()=>u,yh:()=>h});var r=s(36563),i=s(4718);function n(t){return t.__accessor__??null}function h(t,e){return null!=t?.metadata?.[e]}function l(t,e,s){return a(t,e,s?{policy:s,path:""}:null)}function a(t,e,s){return e?Object.keys(e).reduce((t,r)=>{const n=r;if("__proto__"===n)return t;let h=null,l="merge";if(s&&(h=s.path?`${s.path}.${r}`:r,l=s.policy(h)),"replace"===l)return t[n]=e[n],t;if("replace-arrays"===l&&Array.isArray(t[n]))return t[n]=e[n],t;if(void 0===t[n])return t[n]=(0,i.o8)(e[n]),t;let o=t[n],c=e[n];if(o===c)return t;if(Array.isArray(c)||Array.isArray(t))o=o?Array.isArray(o)?t[n]=o.slice():t[n]=[o]:t[n]=[],c&&(Array.isArray(c)||(c=[c]),c.forEach(t=>{o.includes(t)||o.push(t)}));else if(c&&"object"==typeof c)if(s){const e=s.path;s.path=h,t[n]=a(o,c,s),s.path=e}else t[n]=a(o,c,null);else t.hasOwnProperty(r)&&!e.hasOwnProperty(r)||(t[n]=c);return t},t||{}):t}function o(t){return Array.isArray(t)?t:t.split(".")}function c(t){return t.includes(",")?t.split(",").map(t=>t.trim()):[t.trim()]}function u(t,e,s,i){const n=function(t){if(Array.isArray(t)){const e=[];for(const s of t)e.push(...c(s));return e}return c(t)}(e);if(1!==n.length){const e=n.map(e=>i(t,e,s));return(0,r.vE)(e)}return i(t,n[0],s)}},95488:(t,e,s)=>{s.d(e,{I:()=>i});var r=s(11406);class i extends r.T{notify(){const t=this._observers;if(t&&t.length>0){const e=t.slice();for(const t of e)t.onInvalidated(),t.onCommitted()}}}}}]);