@arcgis/core 6.0.0-next.32 → 6.0.0-next.34

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 (142) hide show
  1. package/README.md +2 -2
  2. package/applications/Urban/meshUtils.d.ts +1 -0
  3. package/applications/Urban/meshUtils.js +1 -1
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/{f3dc0bc0e00635855a7a.js → 03daf6f235c6edef6268.js} +1 -1
  6. package/assets/esri/core/workers/chunks/04a1d08c3b5b1dc7628f.js +1 -0
  7. package/assets/esri/core/workers/chunks/{1eaf8bfdd3765a90ccc2.js → 0523f893870a1546d7d9.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{72d20d3957d612f86431.js → 0a508e25ec05363e1f04.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{84038dd85005fea413eb.js → 139e753d95cfc9470e74.js} +1 -1
  10. package/assets/esri/core/workers/chunks/15950c2fb173b62ee0ec.js +1 -0
  11. package/assets/esri/core/workers/chunks/{418addce122dbb8897b4.js → 1a614bac5db42c6263f8.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{58c3ae6030def2ed5f31.js → 1b17f5f720f6cf3f6d73.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{f9dc38761b314d33890f.js → 1f51567f47c2e2fc8a23.js} +1 -1
  14. package/assets/esri/core/workers/chunks/2211ff0a1f1ae8100231.js +1 -0
  15. package/assets/esri/core/workers/chunks/24ada9511b074dc5ae27.js +1 -0
  16. package/assets/esri/core/workers/chunks/29c610ce1c81ebb84a6b.js +1 -0
  17. package/assets/esri/core/workers/chunks/2b4dd42920d37b1ff0a9.js +2 -0
  18. package/assets/esri/core/workers/chunks/2c8ca43563c4f3e94535.js +1 -0
  19. package/assets/esri/core/workers/chunks/{55a9eaeb152a3abada67.js → 311e4969f19df63451dd.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{8da2a10318f49d0dc73a.js → 31ef7b7074b3e3829763.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{360c944c610efa2051fc.js → 379db67f78161ebd5468.js} +2 -2
  22. package/assets/esri/core/workers/chunks/{b8fd7c3b36981261378b.js → 38df7b1d58c4bcf693d0.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{be55771758e4bcef0976.js → 3e406043a374ee17475b.js} +1 -1
  24. package/assets/esri/core/workers/chunks/46c290108a90518ef695.js +1 -0
  25. package/assets/esri/core/workers/chunks/{a596779eaeec7310671d.js → 478a89317a12e9b4d146.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{fcc3902d6d9eda6f09f5.js → 48b8b57f559a53c6c513.js} +1 -1
  27. package/assets/esri/core/workers/chunks/4f3e0d583cfa9d1d6727.js +2 -0
  28. package/assets/esri/core/workers/chunks/507ecc3692e6d0700958.js +1 -0
  29. package/assets/esri/core/workers/chunks/{bd46a04a9ee4ea9e6ef1.js → 5864bce1498a13ee5b7e.js} +2 -2
  30. package/assets/esri/core/workers/chunks/{f4d91d470ca5fea0bd26.js → 5bd1414220e42cb8ebcf.js} +1 -1
  31. package/assets/esri/core/workers/chunks/5c3aa8386705c5e40358.js +1 -0
  32. package/assets/esri/core/workers/chunks/{176d75e76318bfc25a53.js → 60c8eedd06080edab3e3.js} +1 -1
  33. package/assets/esri/core/workers/chunks/661847f1b7044f21600f.js +1 -0
  34. package/assets/esri/core/workers/chunks/{1a8d8274df292d65f82e.js → 676c8c0329d68f9f3ac4.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{29cc6b1705418b1be5d7.js → 687deb918eb48a963c8f.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{0694c7bcfe71692e2ccf.js → 723df53cfa0189837d01.js} +1 -1
  37. package/assets/esri/core/workers/chunks/7582654a0fc70910731c.js +1 -0
  38. package/assets/esri/core/workers/chunks/{1ee4df0fd61440cb5f02.js → 7810586c35dfe1437516.js} +1 -1
  39. package/assets/esri/core/workers/chunks/8517d96fc8ba7b21d845.js +2 -0
  40. package/assets/esri/core/workers/chunks/90360c0bd053d3e3fd77.js +1 -0
  41. package/assets/esri/core/workers/chunks/9c3de54513bf8619271c.js +1 -0
  42. package/assets/esri/core/workers/chunks/{0e445ec3523de9f2dfa2.js → a107f16cd004626b5018.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{e3b212f8af448ec29eef.js → a1e8209d00809c9520a0.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{46453ebfee17b5421d9d.js → bf62be00f3040f91aaee.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{89dc49e784f7ba3b93ea.js → c034c30e577d620b8e28.js} +1 -1
  46. package/assets/esri/core/workers/chunks/c5bf19da62a3d31009fe.js +2 -0
  47. package/assets/esri/core/workers/chunks/{2226c20c38e20713bcb5.js.LICENSE.txt → c5bf19da62a3d31009fe.js.LICENSE.txt} +1 -1
  48. package/assets/esri/core/workers/chunks/{6bb191b19ce43a27f205.js → caad4f475d6eb01c2850.js} +1 -1
  49. package/assets/esri/core/workers/chunks/cd55cad81accf51d2989.js +1 -0
  50. package/assets/esri/core/workers/chunks/db1f7b2562de495b3401.js +2 -0
  51. package/assets/esri/core/workers/chunks/e0a37d3bcb9a944e53dd.js +1 -0
  52. package/assets/esri/core/workers/chunks/{fe6dcb21570395e46ce8.js → e0a7a75709121a26f255.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{096b2bf1c0d69d27f20c.js → e8e54faf947a582b4cf7.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{636e9c4ac1f9ae98f9d1.js → ea81f9d71b0842a4be26.js} +1 -1
  55. package/assets/esri/core/workers/chunks/{164c8eeefa8232b2b191.js → eaa0e906b46ae4c84d72.js} +2 -2
  56. package/assets/esri/core/workers/chunks/{a504a5e06cb89a620799.js → ec8b7476eac4718eb0ac.js} +1 -1
  57. package/chunks/GlobalIllumination.glsl.js +55 -46
  58. package/chunks/GlobalIlluminationBlur.glsl.js +13 -9
  59. package/chunks/RibbonLine.glsl.js +90 -88
  60. package/config.js +1 -1
  61. package/core/has.js +1 -1
  62. package/core/workers.d.ts +1 -0
  63. package/geometry/support/MeshLocalVertexSpace.d.ts +3 -3
  64. package/geometry/support/aaBoundingRect.js +1 -1
  65. package/geometry/support/meshUtils/convertMeshVertexSpace.js +1 -1
  66. package/geometry/support/meshUtils/vertexSpaceConversion.js +1 -1
  67. package/identity/IdentityManagerBase.js +1 -1
  68. package/kernel.d.ts +3 -3
  69. package/kernel.js +1 -1
  70. package/layers/VoxelWasmPerSceneView.js +1 -1
  71. package/layers/WFSLayer.d.ts +8 -4
  72. package/layers/graphics/sources/WFSSource.js +1 -1
  73. package/layers/graphics/sources/geojson/geojson.js +1 -1
  74. package/layers/mixins/ArcGISMapService.d.ts +17 -0
  75. package/layers/mixins/ArcGISMapService.js +1 -1
  76. package/layers/ogc/wfsUtils.d.ts +7 -2
  77. package/layers/ogc/wfsUtils.js +1 -1
  78. package/layers/ogc/xmlUtils.js +1 -1
  79. package/package.json +4 -4
  80. package/rest/route.d.ts +1 -1
  81. package/rest/support/AreasAndLengthsParameters.d.ts +1 -1
  82. package/rest/support/LengthsParameters.d.ts +1 -1
  83. package/symbols/TextSymbol.d.ts +0 -1
  84. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  85. package/views/3d/FocusAreasView.js +1 -1
  86. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  87. package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
  88. package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
  89. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  90. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  91. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  92. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  93. package/views/3d/layers/graphics/Graphics3DMeshObject3DGraphicLayer.js +1 -1
  94. package/views/3d/layers/graphics/Graphics3DSymbol.js +1 -1
  95. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  96. package/views/3d/layers/graphics/Graphics3DWebStyleSymbol.js +1 -1
  97. package/views/3d/layers/graphics/MeshFastUpdateProcessor.js +1 -1
  98. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  99. package/views/3d/state/ScreenSizePerspective.js +1 -1
  100. package/views/3d/state/ViewStateManager.js +1 -1
  101. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  102. package/views/3d/support/RenderCoordsHelper.js +1 -1
  103. package/views/3d/terrain/TerrainRenderer.js +1 -1
  104. package/views/3d/terrain/TerrainSurface.js +1 -1
  105. package/views/3d/terrain/TileRenderer.js +1 -1
  106. package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
  107. package/views/3d/webgl-engine/lib/NavigationDepthCache.js +1 -1
  108. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  109. package/views/3d/webgl-engine/lib/RibbonLineVertexInfo.js +1 -1
  110. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  111. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  112. package/views/SceneView.js +1 -1
  113. package/views/webgl/BufferObject.js +1 -1
  114. package/views/webgl/FramebufferObject.js +1 -1
  115. package/widgets/ElevationProfile/ElevationProfileLineView.js +1 -1
  116. package/widgets/HistogramRangeSlider.d.ts +1 -1
  117. package/assets/esri/core/workers/chunks/0cc7fba402a93e6d2455.js +0 -2
  118. package/assets/esri/core/workers/chunks/131185d26343a997495e.js +0 -1
  119. package/assets/esri/core/workers/chunks/1a3f71c4d97c36050030.js +0 -1
  120. package/assets/esri/core/workers/chunks/2226c20c38e20713bcb5.js +0 -2
  121. package/assets/esri/core/workers/chunks/2981e904ab62f3ed80d0.js +0 -2
  122. package/assets/esri/core/workers/chunks/32cc59e126df8c96a0cf.js +0 -2
  123. package/assets/esri/core/workers/chunks/5bb6c255bdc8aa9ba23e.js +0 -1
  124. package/assets/esri/core/workers/chunks/654f5441227579d2b6b4.js +0 -1
  125. package/assets/esri/core/workers/chunks/7084dd6e10c6c1393e92.js +0 -1
  126. package/assets/esri/core/workers/chunks/7566321c6a2913f2852b.js +0 -1
  127. package/assets/esri/core/workers/chunks/7b5cd150a4d0139850be.js +0 -1
  128. package/assets/esri/core/workers/chunks/7cc9d7a88b64e25fce14.js +0 -1
  129. package/assets/esri/core/workers/chunks/844eedda8f749972f707.js +0 -2
  130. package/assets/esri/core/workers/chunks/87177e0f82e8a6ae3189.js +0 -1
  131. package/assets/esri/core/workers/chunks/9976eaa81085c0d17e14.js +0 -1
  132. package/assets/esri/core/workers/chunks/a2196a49f89d57a0a1c7.js +0 -1
  133. package/assets/esri/core/workers/chunks/aba259a70bee68d2edb7.js +0 -1
  134. package/assets/esri/core/workers/chunks/b9cb92858a576eb6aa06.js +0 -1
  135. package/assets/esri/core/workers/chunks/c33a9635c294c8774977.js +0 -1
  136. package/assets/esri/core/workers/chunks/f39c700f3db7db52b522.js +0 -1
  137. /package/assets/esri/core/workers/chunks/{844eedda8f749972f707.js.LICENSE.txt → 2b4dd42920d37b1ff0a9.js.LICENSE.txt} +0 -0
  138. /package/assets/esri/core/workers/chunks/{32cc59e126df8c96a0cf.js.LICENSE.txt → 4f3e0d583cfa9d1d6727.js.LICENSE.txt} +0 -0
  139. /package/assets/esri/core/workers/chunks/{bd46a04a9ee4ea9e6ef1.js.LICENSE.txt → 5864bce1498a13ee5b7e.js.LICENSE.txt} +0 -0
  140. /package/assets/esri/core/workers/chunks/{0cc7fba402a93e6d2455.js.LICENSE.txt → 8517d96fc8ba7b21d845.js.LICENSE.txt} +0 -0
  141. /package/assets/esri/core/workers/chunks/{2981e904ab62f3ed80d0.js.LICENSE.txt → db1f7b2562de495b3401.js.LICENSE.txt} +0 -0
  142. /package/assets/esri/core/workers/chunks/{164c8eeefa8232b2b191.js.LICENSE.txt → eaa0e906b46ae4c84d72.js.LICENSE.txt} +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9315],{69540(e,t,i){var r=i(32198),n=i(69622),s=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(88620),l=i(64108);const u=Symbol("ClonableMixin"),h=e=>{var t;let i=e,n=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){let t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");let i=t.metadata,r=t.store,n={},l=new Map;for(let t in i){let o=i[t],a=r?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)continue;let h=this[t],c=null;if("function"==typeof u)c=u(h,e);else if("reference"===u)c=h;else if(c=(0,s.TU)(h,e),null!=h&&null==c)continue;0===a?l.set(t,c):n[t]=c}let u=new(0,Object.getPrototypeOf(this).constructor)(n);if(l.size){let e=(0,a.oY)(u)?.store;if(e)for(let[t,i]of l)e.set(t,i,0)}return u}};return n=(0,r.Cg)([(0,l.$)("esri.core.Clonable")],n),n},c=h(n.A);i.d(t,["OU",0,h,"Pw",0,c])},66344(e,t,i){i.d(t,{q:()=>a});const r=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class n{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){return this._db.get(e.id+t)?.size??0}put(e,t,i,n,o){t=e.id+t;let a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==i&&this._notifyRemove(t,a.entry,a.size,0)),n>this._maxSize)return void this._notifyRemove(t,i,n,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return r||console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,i,0,0);let l=1+Math.max(o,-4)- -3;this._db.set(t,new s(i,n,l)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t){t=e.id+t;let i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let r=i.entry.usedMemory;for(;r>this._maxSize;){let e=this._notifyRemove(t,i.entry,r,1);if(!(null!=e&&e>0))return void this._db.delete(t);r=e}i.size=r,this._size+=r,e.size+=r,this._checkSize()}pop(e,t){t=e.id+t;let i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;let i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){let i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){let e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=[];this._db.forEach((e,r)=>{let n=e.lifetime;i[n]=(i[n]||0)+e.size,this._clients.forEach(i=>{let{id:n,name:s}=i;if(r.startsWith(n)){let i=t[s]||0;t[s]=i+e.size}})});let r={};this._clients.forEach(e=>{let i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){let n=t[i]||0;t[i]=n,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"});let n=Object.keys(t);n.sort((e,i)=>t[i]-t[e]),n.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]);for(let t=i.length-1;t>=0;--t){let r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){let t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(let[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,r){let n=this._clients.get(e.split(o)[0])?.removeFunc,s=n?.(t,r,i);return"number"==typeof s?s:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){let i=t??this;if(i.size<=e)return;let r=t?.id,n=!0;for(;n;){n=!1;for(let[s,a]of this._db)if(0===a.lifetime&&(!r||s.startsWith(r))){let r=t??this._clients.get(s.split(o)[0]);if(this._purgeItem(s,a,r),i.size<=.9*e)return;n||=this._db.has(s)}}for(let[n,s]of this._db)if(!r||n.startsWith(r)){let r=t??this._clients.get(n.split(o)[0]);if(this._purgeItem(n,s,r),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);let r=this._notifyRemove(e,t.entry,t.size,1);null!=r&&r>0&&(this._size+=r,i&&(i.size+=r),t.lives=t.lifetime,t.size=r,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new n(0);class s{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class a{constructor(e,t){this.removeFunc=t,this.id="",this.name="",this.size=0,this._storage=new n(e,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},60999(e,t,i){i.d(t,{DZ:()=>m,Ke:()=>p,QA:()=>f,Tj:()=>h,UT:()=>y,aD:()=>_,jJ:()=>u});var r=i(32198),n=i(69622),s=i(97768),o=i(17676),a=i(10107),l=i(64108);function u(e,t,i){return(0,o.Lx)(e.map((e,r)=>t.apply(i,[e,r])))}async function h(e,t,i){return(await(0,o.Lx)(e.map((e,r)=>t.apply(i,[e,r])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function m(e){try{return c(await e)}catch(e){return(0,o.QP)(e),d(e)}}function f(e){if(!0===e.ok)return e.value;throw e.error}function y(e,t){return new g(e,t)}let g=class extends n.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,s.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;let{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=c(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,s.xt)(this._abortHandle),this._abortController=null}};(0,r.Cg)([(0,a.MZ)()],g.prototype,"value",null),(0,r.Cg)([(0,a.MZ)()],g.prototype,"error",null),(0,r.Cg)([(0,a.MZ)()],g.prototype,"finished",null),(0,r.Cg)([(0,a.MZ)()],g.prototype,"promise",void 0),(0,r.Cg)([(0,a.MZ)()],g.prototype,"_result",void 0),g=(0,r.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],g);class _{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});let t=await e;return{[Symbol.dispose]:t}}async run(e){let t={stack:[],error:void 0,hasError:!1};try{return(0,r.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,r.hk)(t)}}}},67482(e,t,i){function r(e){return null!==n(e)}function n(e){return function(e){let t=s.exec(e);if(!t?.groups)return null;let i=t.groups,r=+i.year,n=i.month-1,o=+i.day,a=+(i.hours??"0"),l=+(i.minutes??"0"),u=+(i.seconds??"0");if(a>23||l>59||u>59)return null;let h,c=i.ms??"0",d=c?+c.padEnd(3,"0").slice(0,3):0;if(i.isUTC||!i.offsetSign)h=Date.UTC(r,n,o,a,l,u,d);else{let e=+i.offsetHours,t=+i.offsetMinutes;h=6e4*("+"===i.offsetSign?-1:1)*(60*e+t)+Date.UTC(r,n,o,a,l,u,d)}return Number.isNaN(h)?null:h}(e)??function(e){let t=new Date(e),i=t.getTime();return Number.isNaN(i)?null:e.toLowerCase()===t.toUTCString().toLowerCase()?i:null}(e)??function(e){if(!o.test(e))return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset()}(e)}i.d(t,{C:()=>r,_:()=>n});const s=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,o=/^((\d{1,2}[/-]\d{1,2}[/-]\d{4})|(\d{4}[/-]\d{1,2}[/-]\d{1,2}))( \d{1,2}:\d{1,2}:\d{1,2}( ((AM)|(PM)))?)?$/i},9093(e,t,i){function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function n(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}i.d(t,{o8:()=>n,vt:()=>r});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:n,create:r,fromValues:function(e,t,i,r,n,s,o,a,l,u,h,c,d,p,m,f){return[e,t,i,r,n,s,o,a,l,u,h,c,d,p,m,f]}},Symbol.toStringTag,{value:"Module"})),i.d(t,["zK",0,s])},35522(e,t,i){i.d(t,{$A:()=>C,Bw:()=>s,C:()=>o,Cc:()=>T,DI:()=>M,Io:()=>_,Ln:()=>g,Om:()=>S,Qr:()=>c,Re:()=>u,S8:()=>v,T9:()=>f,WQ:()=>l,Z0:()=>F,_S:()=>p,aI:()=>N,ei:()=>A,fw:()=>I,gL:()=>R,hG:()=>w,hZ:()=>a,hs:()=>y,jk:()=>m,lw:()=>h,m3:()=>b,oW:()=>B,t2:()=>E,tn:()=>d,ze:()=>x});var r=i(51850),n=i(34304);function s(e){let t=e[0],i=e[1],r=e[2];return Math.sqrt(t*t+i*i+r*r)}function o(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function a(e,t,i,r){return e[0]=t,e[1]=i,e[2]=r,e}function l(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e}function u(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e}function h(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e[2]=t[2]*i[2],e}function c(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e[2]=t[2]/i[2],e}function d(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function p(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function m(e,t,i){return e[0]=Math.min(t[0],i[0]),e[1]=Math.min(t[1],i[1]),e[2]=Math.min(t[2],i[2]),e}function f(e,t,i){return e[0]=Math.max(t[0],i[0]),e[1]=Math.max(t[1],i[1]),e[2]=Math.max(t[2],i[2]),e}function y(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e}function g(e,t,i,r){return e[0]=t[0]+i[0]*r,e[1]=t[1]+i[1]*r,e[2]=t[2]+i[2]*r,e}function _(e,t){let i=t[0]-e[0],r=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(i*i+r*r+n*n)}function w(e,t){let i=t[0]-e[0],r=t[1]-e[1],n=t[2]-e[2];return i*i+r*r+n*n}function b(e){let t=e[0],i=e[1],r=e[2];return t*t+i*i+r*r}function x(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function M(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function v(e,t=e){let i=t[0],r=t[1],n=t[2],s=i*i+r*r+n*n;return s>0&&(s=1/Math.sqrt(s),e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s),e}function S(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function C(e,t,i){let r=t[0],n=t[1],s=t[2],o=i[0],a=i[1],l=i[2];return e[0]=n*l-s*a,e[1]=s*o-r*l,e[2]=r*a-n*o,e}function T(e,t,i,r){let n=t[0],s=t[1],o=t[2];return e[0]=n+r*(i[0]-n),e[1]=s+r*(i[1]-s),e[2]=o+r*(i[2]-o),e}function F(e,t,i){let r=t[0],n=t[1],s=t[2];return e[0]=i[0]*r+i[4]*n+i[8]*s+i[12],e[1]=i[1]*r+i[5]*n+i[9]*s+i[13],e[2]=i[2]*r+i[6]*n+i[10]*s+i[14],e}function A(e,t,i){let r=t[0],n=t[1],s=t[2];return e[0]=r*i[0]+n*i[3]+s*i[6],e[1]=r*i[1]+n*i[4]+s*i[7],e[2]=r*i[2]+n*i[5]+s*i[8],e}function R(e,t,i){return I(e,t,i[0],i[1],i[2],i[3])}function I(e,t,i,r,n,s){let o=t[0],a=t[1],l=t[2],u=r*l-n*a,h=n*o-i*l,c=i*a-r*o,d=r*c-n*h,p=n*u-i*c,m=i*h-r*u,f=2*s;return e[0]=o+u*f+2*d,e[1]=a+h*f+2*p,e[2]=l+c*f+2*m,e}const P=(0,r.vt)(),z=(0,r.vt)();function E(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function N(e,t){if(e===t)return!0;let i=e[0],r=e[1],s=e[2],o=t[0],a=t[1],l=t[2],u=(0,n.FD)();return Math.abs(i-o)<=u*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(r-a)<=u*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(s-l)<=u*Math.max(1,Math.abs(s),Math.abs(l))}function B(e,t,i){let r=i[0]-t[0],n=i[1]-t[1],s=i[2]-t[2],o=r*r+n*n+s*s;return o>0?(o=1/Math.sqrt(o),e[0]=r*o,e[1]=n*o,e[2]=s*o,e):(e[0]=0,e[1]=0,e[2]=0,e)}const O=u,D=h,k=c,j=_,L=w,Z=s,q=b;Object.freeze(Object.defineProperty({__proto__:null,abs:d,add:l,angle:function(e,t){v(P,e),v(z,t);let i=S(P,z);return i>1?0:i<-1?Math.PI:Math.acos(i)},bezier:function(e,t,i,r,n,s){let o=1-s,a=o*o,l=s*s,u=a*o,h=3*s*a,c=3*l*o,d=l*s;return e[0]=t[0]*u+i[0]*h+r[0]*c+n[0]*d,e[1]=t[1]*u+i[1]*h+r[1]*c+n[1]*d,e[2]=t[2]*u+i[2]*h+r[2]*c+n[2]*d,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},clamp:function(e,t=0,i=1){return e[0]=Math.min(Math.max(e[0],t),i),e[1]=Math.min(Math.max(e[1],t),i),e[2]=Math.min(Math.max(e[2],t),i),e},copy:o,cross:C,crossAndNormalize:function(e,t,i){let r=t[0],n=t[1],s=t[2],o=i[0],a=i[1],l=i[2],u=n*l-s*a,h=s*o-r*l,c=r*a-n*o,d=Math.sqrt(u*u+h*h+c*c);return e[0]=u/d,e[1]=h/d,e[2]=c/d,e},direction:B,dist:j,distance:_,div:k,divide:c,dot:S,equals:N,exactEquals:E,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,i,r,n,s){let o=s*s,a=o*(2*s-3)+1,l=o*(s-2)+s,u=o*(s-1),h=o*(3-2*s);return e[0]=t[0]*a+i[0]*l+r[0]*u+n[0]*h,e[1]=t[1]*a+i[1]*l+r[1]*u+n[1]*h,e[2]=t[2]*a+i[2]*l+r[2]*u+n[2]*h,e},inverse:M,len:Z,length:s,lerp:T,max:f,min:m,mul:D,multiply:h,negate:x,normalize:v,random:function(e,t=1){let i=n.Ov,r=2*i()*Math.PI,s=2*i()-1,o=Math.sqrt(1-s*s)*t;return e[0]=Math.cos(r)*o,e[1]=Math.sin(r)*o,e[2]=s*t,e},rotateX:function(e,t,i,r){let n=[],s=[];return n[0]=t[0]-i[0],n[1]=t[1]-i[1],n[2]=t[2]-i[2],s[0]=n[0],s[1]=n[1]*Math.cos(r)-n[2]*Math.sin(r),s[2]=n[1]*Math.sin(r)+n[2]*Math.cos(r),e[0]=s[0]+i[0],e[1]=s[1]+i[1],e[2]=s[2]+i[2],e},rotateY:function(e,t,i,r){let n=[],s=[];return n[0]=t[0]-i[0],n[1]=t[1]-i[1],n[2]=t[2]-i[2],s[0]=n[2]*Math.sin(r)+n[0]*Math.cos(r),s[1]=n[1],s[2]=n[2]*Math.cos(r)-n[0]*Math.sin(r),e[0]=s[0]+i[0],e[1]=s[1]+i[1],e[2]=s[2]+i[2],e},rotateZ:function(e,t,i,r){let n=[],s=[];return n[0]=t[0]-i[0],n[1]=t[1]-i[1],n[2]=t[2]-i[2],s[0]=n[0]*Math.cos(r)-n[1]*Math.sin(r),s[1]=n[0]*Math.sin(r)+n[1]*Math.cos(r),s[2]=n[2],e[0]=s[0]+i[0],e[1]=s[1]+i[1],e[2]=s[2]+i[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:y,scaleAndAdd:g,scaleTo:function(e,t){return y(e,e,t/Z(e))},set:a,sign:p,sqrDist:L,sqrLen:q,squaredDistance:w,squaredLength:b,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:O,subtract:u,transformMat3:A,transformMat4:F,transformMat4Z:function(e,t){return t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]},transformQuat:R,transformQuatValues:I},Symbol.toStringTag,{value:"Module"})),i.d(t,["Il",0,Z,"jb",0,O,"lo",0,L,"uE",0,q])},75503(e,t,i){i.d(t,{wq:()=>a});var r=i(4576),n=i(21818),s=(i(44208),i(15142)),o=i(11006);class a{constructor(e=9,t){this._compareMinX=d,this._compareMinY=p,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),x.prune(),M.prune(),v.prune(),S.prune()}all(e){l(this._data,e)}search(e,t){let i=this._data,r=this._toBBox;if(w(e,i))for(x.clear();i;){for(let n=0,s=i.children.length;n<s;n++){let s=i.children[n],o=i.leaf?r(s):s;w(e,o)&&(i.leaf?t(s):_(e,o)?l(s,t):x.push(s))}i=x.pop()}}collides(e){let t=this._data,i=this._toBBox;if(!w(e,t))return!1;for(x.clear();t;){for(let r=0,n=t.children.length;r<n;r++){let n=t.children[r],s=t.leaf?i(n):n;if(w(e,s)){if(t.leaf||_(e,s))return!0;x.push(n)}}t=x.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){let e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new F([]),this}remove(e){if(!e)return this;let t,i=this._data,s=null,o=0,a=!1,l=this._toBBox(e);for(v.clear(),S.clear();i||v.length>0;){if(i||(i=v.pop(),s=v.data[v.length-1],o=S.pop()??0,a=!0),i.leaf&&(t=(0,r.qh)(i.children,(0,n.z)(e),i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),v.push(i),this._condense(v),this;a||i.leaf||!_(i,l)?s?(o++,i=s.children[o],a=!1):i=null:(v.push(i),S.push(o),o=0,s=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,i,r){let n=i-t+1,s=this._maxEntries;if(n<=s){let r=new F(e.slice(t,i+1));return u(r,this._toBBox),r}r||(r=Math.ceil(Math.log(n)/Math.log(s)),s=Math.ceil(n/s**(r-1)));let o=new A([]);o.height=r;let a=Math.ceil(n/s),l=a*Math.ceil(Math.sqrt(s));b(e,t,i,l,this._compareMinX);for(let n=t;n<=i;n+=l){let t=Math.min(n+l-1,i);b(e,n,t,a,this._compareMinY);for(let i=n;i<=t;i+=a){let n=Math.min(i+a-1,t);o.children.push(this._build(e,i,n,r-1))}}return u(o,this._toBBox),o}_insert(e,t,i){let r=this._toBBox,n=i?e:r(e);v.clear();let s=function(e,t,i,r){for(;r.push(t),!0!==t.leaf&&r.length-1!==i;){let i,r=1/0,n=1/0;for(let s=0,o=t.children.length;s<o;s++){let o=t.children[s],a=m(o),l=y(e,o)-a;l<n?(n=l,r=a<r?a:r,i=o):l===n&&a<r&&(r=a,i=o)}t=i||t.children[0]}return t}(n,this._data,t,v);for(s.children.push(e),c(s,n);t>=0&&v.data[t].children.length>this._maxEntries;)this._split(v,t),t--;!function(e,t,i){for(let r=i;r>=0;r--)c(t.data[r],e)}(n,v,t)}_split(e,t){let i=e.data[t],r=i.children.length,n=this._minEntries;this._chooseSplitAxis(i,n,r);let s=this._chooseSplitIndex(i,n,r);if(!s)return;let o=i.children.splice(s,i.children.length-s),a=i.leaf?new F(o):new A(o);a.height=i.height,u(i,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this._data=new A([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let r,n,s;r=n=1/0;for(let o=t;o<=i-t;o++){let t=h(e,0,o,this._toBBox),a=h(e,o,i,this._toBBox),l=g(t,a),u=m(t)+m(a);l<r?(r=l,s=o,n=u<n?u:n):l===r&&u<n&&(n=u,s=o)}return s}_chooseSplitAxis(e,t,i){let r=e.leaf?this._compareMinX:d,n=e.leaf?this._compareMinY:p;this._allDistMargin(e,t,i,r)<this._allDistMargin(e,t,i,n)&&e.children.sort(r)}_allDistMargin(e,t,i,r){e.children.sort(r);let n=this._toBBox,s=h(e,0,t,n),o=h(e,i-t,i,n),a=f(s)+f(o);for(let r=t;r<i-t;r++){let t=e.children[r];c(s,e.leaf?n(t):t),a+=f(s)}for(let r=i-t-1;r>=t;r--){let t=e.children[r];c(o,e.leaf?n(t):t),a+=f(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){let i=e.data[t];if(0===i.children.length)if(t>0){let n=e.data[t-1],s=n.children;s.splice((0,r.qh)(s,i,s.length,n.indexHint),1)}else this.clear();else u(i,this._toBBox)}}_initFormat(e){let t=["return a"," - b",";"];this._compareMinX=Function("a","b",t.join(e[0])),this._compareMinY=Function("a","b",t.join(e[1])),this._toBBox=Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let i=e;for(M.clear();i;){if(!0===i.leaf)for(let e of i.children)t((0,n.z)(e));else M.pushArray(i.children);i=M.pop()??null}}function u(e,t){h(e,0,e.children.length,t,e)}function h(e,t,i,r,n){n||=new F([]),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let s,o=t;o<i;o++)s=e.children[o],c(n,e.leaf?r(s):s);return n}function c(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function m(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function y(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){let i=Math.max(e.minX,t.minX),r=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,n-i)*Math.max(0,s-r)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function w(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function b(e,t,i,r,n){let s=[t,i];for(;s.length;){let t=s.pop(),i=s.pop();if(t-i<=r)continue;let a=i+Math.ceil((t-i)/r/2)*r;(0,o.q)(e,a,i,t,n),s.push(i,a,a,t)}}const x=new s.A,M=new s.A,v=new s.A,S=new s.A({deallocator:void 0});class C{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class T extends C{constructor(){super(...arguments),this.height=1,this.indexHint=new r.vW}}class F extends T{constructor(e){super(),this.children=e,this.leaf=!0}}class A extends T{constructor(e){super(),this.children=e,this.leaf=!1}}},69397(e,t,i){i.d(t,{Qf:()=>l,Qh:()=>o,lM:()=>s,ro:()=>u,rq:()=>h});var r=i(44208),n=i(34275);function s(e){if(!e)return 0;let t=c;for(let i in e)e.hasOwnProperty(i)&&(t+=a(e[i],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return h(e,8);let i=d;for(let r=0;r<t;r++)i+=a(e[r]);return i}(e);let t=c;for(let i in e)e.hasOwnProperty(i)&&(t+=a(e[i]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?o(e):c;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+u(t),0)}function u(e,t=16){return e?(0,n.iu)(e)?e.byteLength+m:Array.isArray(e)?h(e,t):0:0}function h(e,t){return d+e.length*t}const c=32,d=16,p=(0,r.A)("ios")||!(0,r.A)("chrome")&&!(0,r.A)("opr")?8:4,m=145;i.d(t,["JY",0,p])},36708(e,t,i){i.d(t,{C_:()=>d,on:()=>c,wB:()=>l,z7:()=>u});var r=i(37955),n=i(36563),s=i(97768),o=i(17676),a=i(14012);function l(e,t,i={}){return h(e,t,i,p)}function u(e,t,i={}){return h(e,t,i,m)}function h(e,t,i={},r){let n=null,o=i.once?(e,i)=>{r(e)&&((0,s.xt)(n),t(e,i))}:(e,i)=>{r(e)&&t(e,i)};if(n=(0,a.Cn)(e,o,i.sync,i.equals),i.initial){let t=e();o(t,t)}return n}function c(e,t,i,o={}){let a=null,u=null,h=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,s.xt)(h),i(e)}let p=l(e,(e,i)=>{c(),(0,r.wb)(e)&&(a=e,u=(0,r.on)(e,t,d),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return h=(0,n.hA)(()=>{p.remove(),c()}),h}function d(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());let r=e();if(t?.(r))return Promise.resolve(r);let a=null;function l(){a=(0,s.xt)(a)}return new Promise((r,s)=>{a=(0,n.vE)([(0,o.u7)(i,()=>{l(),s((0,o.NK)())}),h(e,e=>{l(),r(e)},{sync:!1,once:!0},t??p)])})}(e,m,t)}function p(e){return!0}function m(e){return!!e}i(80559),i.d(t,["OH",0,{sync:!0},"Vh",0,{initial:!0},"pc",0,{sync:!0,initial:!0}])},44794(e,t,i){i.d(t,{v:()=>a});var r=i(4718),n=i(62788),s=i(95488);class o{constructor(e,t){this._observable=new s.I,this._value=e,this._equalityFunction=t}get value(){return(0,n.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function a(e,t=r.gh){return new o(e,t)}},88930(e,t,i){i.d(t,{S1:()=>a,VW:()=>l,lL:()=>u,rb:()=>h,t:()=>c});var r=i(97770),n=(i(98623),i(34747));const s=/^(?<hh>([01][0-9])|(2[0-3])):(?<mm>[0-5][0-9])(:(?<ss>[0-5][0-9]))?(\.(?<ms>\d+))?$/,o={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8,unknown:NaN};function a(e,t,i,s="system"){if("unknown"===i)return e;let o=new n.oh((0,r.wj)(s)),a=n.c9.fromJSDate(e,{zone:o}),l="decades"===i||"centuries"===i?"year":function(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}(i);return"decades"===i&&(t*=10),"centuries"===i&&(t*=100),a.plus({[l]:t}).toJSDate()}function l(e,t,i="milliseconds"){let r=e.getTime(),n=c(t,i,"milliseconds");return new Date(r+n)}function u(e,t,i="system"){let{unit:s}=t,o=Math.max(1,Math.trunc(t.value)),a=new n.oh((0,r.wj)(i)),l=n.c9.fromJSDate(e,{zone:a}),u=e=>e-e%o;switch(s){case"milliseconds":return l.startOf("second").plus({millisecond:u(l.millisecond)}).toJSDate();case"seconds":return l.startOf("minute").plus({second:u(l.second)}).toJSDate();case"minutes":return l.startOf("hour").plus({minute:u(l.minute)}).toJSDate();case"hours":return l.startOf("day").plus({hour:u(l.hour)}).toJSDate();case"days":return l.startOf("month").plus({day:u(l.day-1)}).toJSDate();case"weeks":{let e=l.startOf("year").startOf("week"),t=Math.floor(l.diff(e,"weeks").weeks);return e.plus({week:u(t)}).toJSDate()}case"months":return l.startOf("year").plus({month:u(l.month-1)}).toJSDate();case"years":case"decades":case"centuries":{let e=l.startOf("year"),t=("decades"===s?10:"centuries"===s?100:1)*o,i=e.year-e.year%t;return e.set({year:i}).toJSDate()}case"unknown":return e}}function h(e){let t=s.exec(e);if(!t)return null;let{hh:i,mm:r,ss:n,ms:a}=t.groups;return Number(i)*o.hours+Number(r)*o.minutes+Number(n||0)*o.seconds+Number(a||0)}function c(e,t,i){return 0===e?0:e*o[t]/o[i]}},48526(e,t,i){i.d(t,{A:()=>y});var r,n=i(32198),s=i(4576),o=i(4718),a=i(91429),l=i(5443),u=i(91075),h=i(86738),c=i(16930),d=i(90634),p=i(47610),m=i(56993),f=i(43937);let y=r=class extends u.A{constructor(e){super(function(e){if(!e)return;let{points:t,hasM:i,hasZ:r,spatialReference:n}=e;switch(t??=[],t?.at(0)?.length){case 4:r??=!0,i??=!0;break;case 3:r??=!0!==i,i??=!r;break;default:r??=!1,i??=!1}return n??=c.A.WGS84,{...e,hasM:i,hasZ:r,points:t,spatialReference:n}}(e)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){let e=(0,d.ge)(this);return e?new l.A({...e,spatialReference:this.spatialReference}):null}writePoints(e,t){t.points=(0,o.o8)(this.points)}clone(){let{points:e,spatialReference:t,hasM:i,hasZ:n}=this;return new r({points:(0,o.o8)(e),spatialReference:t.clone(),hasM:i,hasZ:n})}equals(e){if(this===e)return!0;if(null==e)return!1;let t=this.spatialReference,i=e.spatialReference;return!(null!=t!=(null!=i)||null!=t&&null!=i&&!t.equals(i))&&(0,s.aI)(this.points,e.points,p.v6)}addPoint(e){return(0,m.h)(this,e),Array.isArray(e)?this.points.push(e):this.points.push(e.toArray()),this.notifyChange("points"),this}getPoint(e){if(!this._validateInputs(e))return null;let t=this.points[e],i={x:t[0],y:t[1],spatialReference:this.spatialReference},r=2;return this.hasZ&&(i.z=t[2],r=3),this.hasM&&(i.m=t[r]),new h.A(i)}removePoint(e){if(!this._validateInputs(e))return null;let t=new h.A(this.points.splice(e,1)[0],this.spatialReference);return this.notifyChange("points"),t}setPoint(e,t){return this._validateInputs(e)&&((0,m.h)(this,t),Array.isArray(t)||(t=t.toArray()),this.points[e]=t,this.notifyChange("points")),this}toJSON(e){return this.write({},e)}_validateInputs(e){return null!=e&&e>=0&&e<this.points.length}};(0,n.Cg)([(0,a.MZ)({readOnly:!0})],y.prototype,"cache",null),(0,n.Cg)([(0,a.MZ)({readOnly:!0})],y.prototype,"extent",null),(0,n.Cg)([(0,a.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],y.prototype,"points",void 0),(0,n.Cg)([(0,f.K)("points")],y.prototype,"writePoints",null),y=r=(0,n.Cg)([(0,a.$K)("esri.geometry.Multipoint")],y),y.prototype.toJSON.isDefaultToJSON=!0},82799(e,t,i){i.d(t,{A:()=>m});var r,n=i(32198),s=i(4718),o=i(91429),a=i(5443),l=i(91075),u=i(86738),h=i(16930),c=i(90634),d=i(56993),p=i(43937);let m=r=class extends l.A{constructor(e){super(function(e){if(!e)return;let{paths:t,hasM:i,hasZ:r,spatialReference:n}=e;switch(t??=[],function(e){return"number"==typeof e[0]?.[0]}(t)&&(t=[t]),t[0]?.[0]?.length){case 4:r??=!0,i??=!0;break;case 3:r??=!0!==i,i??=!r;break;default:r??=!1,i??=!1}return n??=h.A.WGS84,{...e,hasM:i,hasZ:r,paths:t,spatialReference:n}}(e)),this.curvePaths=void 0,this.paths=[],this.type="polyline"}get cache(){return this.commitProperty("curvePaths"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("paths"),this.commitProperty("spatialReference"),{}}writeCurvePaths(e,t){t.curvePaths=(0,s.o8)(e)}get extent(){let e=(0,c.Z3)(this),{spatialReference:t}=this;return e?new a.A({...e,spatialReference:t}):null}writePaths(e,t){t.paths=(0,s.o8)(this.paths)}addPath(e){if(!e)return;let t=this.paths,i=t.length;if(function(e){return!Array.isArray(e[0])}(e)){let r=[];for(let t=0,i=e.length;t<i;t++)r[t]=e[t].toArray();t[i]=r}else t[i]=e.slice();return this.notifyChange("paths"),this}clone(){let e=new r;return e.spatialReference=this.spatialReference,e.paths=(0,s.o8)(this.paths),e.curvePaths=(0,s.o8)(this.curvePaths),e.hasZ=this.hasZ,e.hasM=this.hasM,e}getPoint(e,t){if(!this._validateInputs(e,t))return null;let i=this.paths[e][t],r=this.hasZ,n=this.hasM;return r&&!n?new u.A(i[0],i[1],i[2],void 0,this.spatialReference):n&&!r?new u.A(i[0],i[1],void 0,i[2],this.spatialReference):r&&n?new u.A(i[0],i[1],i[2],i[3],this.spatialReference):new u.A(i[0],i[1],this.spatialReference)}insertPoint(e,t,i){return this._validateInputs(e,t,!0)&&((0,d.h)(this,i),Array.isArray(i)||(i=i.toArray()),this.paths[e].splice(t,0,i),this.notifyChange("paths")),this}removePath(e){if(!this._validateInputs(e,null))return null;let t=this.paths.splice(e,1)[0],i=this.spatialReference,r=t.map(e=>new u.A(e,i));return this.notifyChange("paths"),r}removePoint(e,t){if(!this._validateInputs(e,t))return null;let i=new u.A(this.paths[e].splice(t,1)[0],this.spatialReference);return this.notifyChange("paths"),i}setPoint(e,t,i){return this._validateInputs(e,t)&&((0,d.h)(this,i),Array.isArray(i)||(i=i.toArray()),this.paths[e][t]=i,this.notifyChange("paths")),this}_validateInputs(e,t,i=!1){if(null==e||e<0||e>=this.paths.length)return!1;if(null!=t){let r=this.paths[e];if(i&&(t<0||t>r.length)||!i&&(t<0||t>=r.length))return!1}return!0}toJSON(e){return this.write({},e)}};(0,n.Cg)([(0,o.MZ)({readOnly:!0})],m.prototype,"cache",null),(0,n.Cg)([(0,o.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],m.prototype,"curvePaths",void 0),(0,n.Cg)([(0,p.K)("curvePaths")],m.prototype,"writeCurvePaths",null),(0,n.Cg)([(0,o.MZ)({readOnly:!0})],m.prototype,"extent",null),(0,n.Cg)([(0,o.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],m.prototype,"paths",void 0),(0,n.Cg)([(0,p.K)("paths")],m.prototype,"writePaths",null),m=r=(0,n.Cg)([(0,o.$K)("esri.geometry.Polyline")],m),m.prototype.toJSON.isDefaultToJSON=!0},4197(e,t,i){i.d(t,{Vj:()=>o,cj:()=>s,jh:()=>n});var r=i(9093);function n(e){return e<=1024?Array(e).fill(0):new Float64Array(e)}function s(e){return[...e]}function o(e){let t=(0,r.vt)();for(let i=0;i<16;++i)t[i]=e[i];return t}},70328(e,t,i){i.d(t,{BI:()=>F,C:()=>o,DC:()=>d,Ej:()=>w,Ie:()=>C,Jt:()=>T,Lu:()=>x,Ne:()=>M,RF:()=>c,TF:()=>g,VL:()=>m,aI:()=>R,fA:()=>a,gE:()=>u,gX:()=>_,hZ:()=>S,iT:()=>p,is:()=>A,pg:()=>b,uJ:()=>y,vI:()=>v,vY:()=>l,vt:()=>s,w1:()=>h,yr:()=>f}),i(35522);var r=i(5443),n=(i(19419),i(4197));function s(e=P){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t){for(let i=0;i<6;i++)e[i]=t[i];return e}function a(e,t,i,r,n,o,a=s()){return a[0]=e,a[1]=t,a[2]=i,a[3]=r,a[4]=n,a[5]=o,a}function l(e,t=s()){return function(e,t,i,r=s()){return S(r,I),function(e,t,i=0,r=t.length/3){let n=e[0],s=e[1],o=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<r;e++)n=Math.min(n,t[i+3*e]),s=Math.min(s,t[i+3*e+1]),o=Math.min(o,t[i+3*e+2]),a=Math.max(a,t[i+3*e]),l=Math.max(l,t[i+3*e+1]),u=Math.max(u,t[i+3*e+2]);e[0]=n,e[1]=s,e[2]=o,e[3]=a,e[4]=l,e[5]=u}(r,e,t,i),r}(e,0,e.length/3,t)}function u(e,t=(0,n.jh)(24)){let[i,r,s,o,a,l]=e;return t[0]=i,t[1]=r,t[2]=s,t[3]=i,t[4]=r,t[5]=l,t[6]=i,t[7]=a,t[8]=s,t[9]=i,t[10]=a,t[11]=l,t[12]=o,t[13]=r,t[14]=s,t[15]=o,t[16]=r,t[17]=l,t[18]=o,t[19]=a,t[20]=s,t[21]=o,t[22]=a,t[23]=l,t}function h(e,t){return isFinite(e[2])||isFinite(e[5])?new r.A({xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}):new r.A({xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t,i=e){i[0]=Math.min(e[0],t[0]),i[1]=Math.min(e[1],t[1]),i[2]=Math.min(e[2],t[2]),i[3]=Math.max(e[3],t[3]),i[4]=Math.max(e[4],t[4]),i[5]=Math.max(e[5],t[5])}function d(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function p(e,[t,i,r]){!function(e,t,i,r){e[0]=Math.min(e[0],t),e[1]=Math.min(e[1],i),e[2]=Math.min(e[2],r),e[3]=Math.max(e[3],t),e[4]=Math.max(e[4],i),e[5]=Math.max(e[5],r)}(e,t,i,r)}function m(e){return e[0]>=e[3]?0:e[3]-e[0]}function f(e){return e[1]>=e[4]?0:e[4]-e[1]}function y(e){return e[2]>=e[5]?0:e[5]-e[2]}function g(e){let t=m(e),i=y(e),r=f(e);return t*t+i*i+r*r}function _(e,t=[0,0,0]){return t[0]=e[0]+m(e)/2,t[1]=e[1]+f(e)/2,t[2]=e[2]+y(e)/2,t}function w(e,t=[0,0,0]){return t[0]=m(e),t[1]=f(e),t[2]=y(e),t}function b(e,t){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function x(e,t){return t[0]=e[3],t[1]=e[4],t[2]=e[5],t}function M(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function v(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function S(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function C(e){return e?S(e,I):s(I)}function T(e,t){return e[0]=t[0],e[1]=t[1],e[2]=-1/0,e[3]=t[2],e[4]=t[3],e[5]=1/0,e}function F(e,t,i,r,n){return e[0]=t,e[1]=i,e[2]=-1/0,e[3]=r,e[4]=n,e[5]=1/0,e}function A(e){return 6===e.length}function R(e,t,i){if(null==e||null==t)return e===t;if(!A(e)||!A(t))return!1;if(i){for(let r=0;r<e.length;r++)if(!i(e[r],t[r]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}const I=[1/0,1/0,1/0,-1/0,-1/0,-1/0],P=[0,0,0,0,0,0];s(),i.d(t,["qv",0,I,"v_",0,P])},46329(e,t,i){i.d(t,{y:()=>c});var r=i(49186),n=i(4305),s=i(513),o=i(50954),a=i(52006),l=i(49663),u=i(46068),h=i(59803);function c(e,t,i){if((0,a.Xq)(t))return(0,h.T)(e,t,i);if((0,a.n1)(t)){let s=(0,n.m_)(e,t,i)[0];if(null==s)throw new r.A("closestPointOnCurve:unexpected-error","Failed to find close point on bezier curve");return s}if((0,a.aO)(t)){let r=(0,o.pM)(e,t);return(0,s.fM)(r,i)}if((0,a.DA)(t)){let r=(0,l.io)(e,t);return(0,s.fM)(r,i)}let c=(0,u.SW)(e,t);return(0,u.pb)(c,i)}},60408(e,t,i){function r(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function n(e){return void 0!==e.points}function s(e){return void 0!==e.x&&void 0!==e.y}function o(e){return void 0!==e.paths||void 0!==e.curvePaths}function a(e){return void 0!==e.rings||void 0!==e.curveRings}function l(e){return"object"==typeof e&&"vertexAttributes"in e}function u(e){return e?s(e)?"esriGeometryPoint":o(e)?"esriGeometryPolyline":a(e)?"esriGeometryPolygon":r(e)?"esriGeometryEnvelope":n(e)?"esriGeometryMultipoint":null:null}function h(e){return null!=e&&("hasZ"in e&&e.hasZ||"z"in e&&null!=e.z)}function c(e){return null!=e&&("hasM"in e&&e.hasM||"m"in e&&null!=e.m)}i.d(t,{$B:()=>u,Bi:()=>a,Pv:()=>h,Rg:()=>o,U9:()=>n,W0:()=>c,ZC:()=>r,fT:()=>s,uW:()=>l})},65864(e,t,i){i.d(t,{rS:()=>h,xD:()=>d});var r=i(5443),n=i(91075),s=i(48526),o=i(86738),a=i(39829),l=i(82799),u=i(60408);function h(e){return null==e?null:e instanceof n.A?e:(0,u.fT)(e)?o.A.fromJSON(e):(0,u.Rg)(e)?l.A.fromJSON(e):(0,u.Bi)(e)?a.A.fromJSON(e):(0,u.U9)(e)?s.A.fromJSON(e):(0,u.ZC)(e)?r.A.fromJSON(e):null}const c={esriGeometryPoint:o.A,esriGeometryPolyline:l.A,esriGeometryPolygon:a.A,esriGeometryEnvelope:r.A,esriGeometryMultipoint:s.A,esriGeometryMultiPatch:a.A};function d(e){return e&&c[e]||null}},50498(e,t,i){var r=i(66552),n=i(5443),s=i(91075),o=i(48526),a=i(86738),l=i(39829),u=i(82799);const h=(0,r.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),c=(0,r.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),d={base:s.A,key:"type",typeMap:{extent:n.A,multipoint:o.A,point:a.A,polyline:u.A,polygon:l.A}},p=new r.J({esriGeometryBezier3Curve:"cubic-bezier",esriGeometryCircularArc:"circular-arc",esriGeometryEllipticArc:"elliptic-arc"},{ignoreUnknown:!0});i.d(t,["Ye",0,c,"gy",0,h,"iI",0,p,"yR",0,d])},97770(e,t,i){i.d(t,{Ey:()=>I,F8:()=>R,J2:()=>C,Yq:()=>F,_m:()=>T,iS:()=>A,wj:()=>P});var r=i(66552),n=i(73444),s=i(98623),o=i(34747);const a={dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0},l={timeStyle:void 0,hour12:void 0,hourCycle:void 0,hour:void 0,minute:void 0,second:void 0},u={timeZone:"UTC"},h={year:"numeric",month:"numeric",day:"numeric"},c={year:"numeric",month:"long",day:"numeric"},d={year:"numeric",month:"short",day:"numeric"},p={year:"numeric",month:"long",weekday:"long",day:"numeric"},m={hour:"numeric",minute:"numeric"},f={...m,second:"numeric"},y={hourCycle:"h23"},g={...m,...y},_={...f,...y},w={"short-date":h,"short-date-short-time":{...h,...m},"short-date-short-time-24":{...h,...g},"short-date-long-time":{...h,...f},"short-date-long-time-24":{...h,..._},"short-date-le":h,"short-date-le-short-time":{...h,...m},"short-date-le-short-time-24":{...h,...g},"short-date-le-long-time":{...h,...f},"short-date-le-long-time-24":{...h,..._},"long-month-day-year":c,"long-month-day-year-short-time":{...c,...m},"long-month-day-year-short-time-24":{...c,...g},"long-month-day-year-long-time":{...c,...f},"long-month-day-year-long-time-24":{...c,..._},"day-short-month-year":d,"day-short-month-year-short-time":{...d,...m},"day-short-month-year-short-time-24":{...d,...g},"day-short-month-year-long-time":{...d,...f},"day-short-month-year-long-time-24":{...d,..._},"long-date":p,"long-date-short-time":{...p,...m},"long-date-short-time-24":{...p,...g},"long-date-long-time":{...p,...f},"long-date-long-time-24":{...p,..._},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":m,"long-time":f},b=(0,r.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),x={ar:"ar-u-nu-latn-ca-gregory",nn:"no-NN"};function M(){let e=(0,n.lR)();return(e&&x[e])??(0,n.QC)()}"mart"!==new Intl.DateTimeFormat("bs",{month:"long"}).formatToParts(new Date(2025,2)).find(({type:e})=>"month"===e)?.value.toLowerCase()&&(x.bs="sr-Latn-CS");let v=new WeakMap;const S=w["short-date-short-time"];function C(e){return w[e]}function T(e){let{dateStyle:t,timeStyle:i,hour12:r,year:n,month:s}=e,o={};return t?o.dateStyle=t:n&&(o.year=n,o.month=s||void 0),i&&!o.year&&(o.timeStyle=i,o.hour12="auto"===r?void 0:"always"===r),o}function F(e,t=S){return function(e){let t=v.get(e);if(!t){let i=M(),r=P(e.timeZone??"system"),n={...e,timeZone:r};t=new Intl.DateTimeFormat(i,n),v.set(e,t)}return t}(t).format(e)}function A(e,t=S){return F(new Date(e),{...t,...u,...l})}function R(e,t=S){return F(new Date(`1970-01-01T${e}Z`),{...t,...u,...a})}function I(e,t=S){let i=o.c9.fromISO(e,{setZone:!0});if(!i.isValid)return e;if(t.timeZone)return F(i.toJSDate(),t);let r=0===i.offset?"UTC":t.timeZone,n={...t,timeZone:r};return i.toLocaleString(n,{locale:M()})}function P(e){switch(e){case"system":return s.N;case s.L:return"UTC";default:return e}}(0,n.Ml)(()=>{v=new WeakMap}),i.d(t,["_v",0,b])},73444(e,t,i){i.d(t,{JK:()=>l,Ml:()=>y,QC:()=>c,lR:()=>h,oQ:()=>m});var r=i(36563);let n;i(44208);const s=globalThis.esriConfig?.locale,o=globalThis.document?.documentElement;function a(){let e=o?.getAttribute("lang"),t=globalThis.navigator?.language;return s??e??t??"en"}function l(){return void 0===n&&(n=a()),n}const u=/^(?<language>[a-z]{2,3})(?:-(?<extlang>[a-z]{3}))?(?:-[A-Z][a-z]{3})?(?:-(?<region>[A-Z]{2}|\d{3}))?(?:-.*)?$/;function h(e=l()){return d(e)?.language}function c(e=l()){let t=d(e);return t?.language&&t?.extlang?e.replace(`${t.language}-`,""):e}function d(e=l()){return u.exec(e)?.groups}const p=[];function m(e){return p.push(e),(0,r.hA)(()=>{p.splice(p.indexOf(e),1)})}new Map;const f=[];function y(e){return f.push(e),(0,r.hA)(()=>f.splice(f.indexOf(e),1))}function g(){let e=a();n!==e&&([...f].forEach(t=>t(e)),n=e,[...p].forEach(t=>t(e)))}globalThis.addEventListener?.("languagechange",g),o&&new MutationObserver(()=>{g()}).observe(o,{attributeFilter:["lang"]})},6518(e,t,i){i.d(t,{F:()=>a});var r=i(44208),n=i(75503),s=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.wq(9,(0,r.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){let e=Array(this._idByBounds.size),t=0;this._idByBounds.forEach((i,r)=>{e[t++]=r}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;let e=(0,s.Ie)();for(let t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){let t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,i)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){let t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221(e,t,i){i.d(t,{A:()=>p});var r=i(4576),n=i(49186),s=i(65529),o=i(53966),a=i(70328),l=i(19419),u=i(90708),h=i(6518),c=i(37730);const d=(0,a.vt)();class p{constructor(e){this.geometryInfo=e,this._boundsStore=new h.F,this._featuresById=new Map,this._usedMemory=0,this.events=new s.bk,this.featureAdapter=c.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;let[t,i,r,n]=this.fullBounds;return{xmin:t,ymin:i,xmax:r,ymax:n,spatialReference:e}}add(e){this._add(e),this._emitChanged()}addMany(e){for(let t of e)this._add(t);this._emitChanged()}upsertMany(e){let t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(r.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){let t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(let t of e){let e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(let i of e){let e=this._boundsStore.get(i.objectId);e&&t((0,a.Jt)(d,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;let t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));let i,r=this._featuresById.get(t);r?(e.displayId=r.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(r)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),e.geometry?.coords?.length?(i=(0,u.jQ)(i??(0,l.vt)(),e.geometry),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0):(this._boundsStore.set(t,null),this._featuresById.set(t,e))}_upsert(e){let t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;let i=this._featuresById.get(t);if(!i)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;let{geometry:r,attributes:s}=e;for(let e in s)i.attributes[e]=s[e];return r&&(i.geometry=r,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),r)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);let t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}},37730(e,t,i){var r=i(43334);const n={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,i)=>new r.Om(t,e.attributes,null,e.objectId,e.displayId,e.distance,e.vertexCount),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)};i.d(t,["T",0,n])},33771(e,t,i){i.r(t),i.d(t,{default:()=>b});var r=i(60999),n=i(49186),s=i(53966),o=i(34727),a=i(17676),l=i(67076),u=i(21325),h=i(90708),c=i(83221),d=i(31464),p=i(75752),m=i(85113),f=i(82832),y=i(34322),g=i(95466),_=i(54218);i(98623);const w="esri.layers.WFSLayer";class b{constructor(){this._customParameters=null,this._queryEngine=null,this._supportsPagination=!0}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){let{getFeatureUrl:i,getFeatureOutputFormat:r,fields:s,geometryType:o,featureType:l,maxRecordCount:u,maxTotalRecordCount:h,maxPageCount:m,objectIdField:f,customParameters:_}=e,{spatialReference:w,getFeatureSpatialReference:b}=(0,y.UH)(i,l,e.spatialReference);try{await(0,d.Nk)(b,w)}catch{throw new n.A("unsupported-projection","Projection not supported",{inSpatialReference:b,outSpatialReference:w})}(0,a.Te)(t),this._customParameters=_,this._featureType=l,this._fieldsIndex=g.A.fromLayerJSON({fields:s,dateFieldsTimeReference:s.some(e=>"esriFieldTypeDate"===e.type)?{timeZoneIANA:"UTC"}:null}),this._geometryType=o,this._getFeatureUrl=i,this._getFeatureOutputFormat=r,this._getFeatureSpatialReference=b,this._maxRecordCount=u,this._maxTotalRecordCount=h,this._maxPageCount=m,this._objectIdField=f,this._spatialReference=w;let M=await this._snapshotFeatures(t);if(M.errors.length>0&&(this._supportsPagination=!1,M=await this._snapshotFeatures(t),M.errors.length>0))throw M.errors[0];let v={type:"object-id",fieldName:f};return this._queryEngine=new p.do({fieldsIndex:this._fieldsIndex,geometryType:o,hasM:!1,hasZ:!1,featureIdInfo:v,spatialReference:w,timeInfo:null,featureStore:new c.A({geometryType:o,hasM:!1,hasZ:!1})}),this._queryEngine.featureStore.addMany(M.features),{warnings:x(M),extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async applyEdits(){throw new n.A("wfs-source:editing-not-supported","applyEdits() is not supported on WFSLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),(await this._queryEngine.executeQueryForIds(e,t.signal)).filter(_.Et)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),await this._queryEngine.executeQueryForSnapping(e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){return this._customParameters=e.customParameters,this._maxRecordCount=e.maxRecordCount,this._maxTotalRecordCount=e.maxTotalRecordCount,this._maxPageCount=e.maxPageCount,this._snapshotTask?.abort(),this._snapshotTask=(0,r.UT)(e=>this._snapshotFeatures({signal:e})),this._snapshotTask.promise.then(e=>{this._queryEngine.featureStore.clear(),this._queryEngine.featureStore.addMany(e.features);for(let t of x(e))s.A.getLogger(w).warn(new l.A("wfs-layer:refresh-warning",t.message,t.details));e.errors?.length&&s.A.getLogger(w).warn(new l.A("wfs-layer:refresh-error","Refresh completed with errors",{errors:e.errors}))},()=>{this._queryEngine.featureStore.clear()}),await this._waitSnapshotComplete(),{extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _snapshotFeatures(e){let t=e?.signal,i=this._maxTotalRecordCount,r=this._maxPageCount,n=this._supportsPagination&&r>1?await(0,y.E)(this._getFeatureUrl,this._featureType.typeName,{customParameters:this._customParameters,signal:t}):void 0,s=[],l=[];if(null==n)try{s=await this._singleQuery(t)}catch(e){(0,a.zf)(e)||l.push(e)}else{let e=function*(e,t,i){for(let r=0;r<t;r++)yield e._pageQuery(r,i)}(this,(0,o.qE)(Math.ceil(Math.min(n,i)/this._maxRecordCount),1,r),t);await Promise.allSettled(Array.from({length:10}).map(()=>async function(e,t,i){let r=e.next();for(;!r.done;){try{let e=await r.value;t.push(...e)}catch(e){(0,a.zf)(e)||i.push(e)}r=e.next()}}(e,s,l)))}return(0,a.Te)(t),{features:s,totalRecordCount:n,maxTotalRecordCount:i,maxPageCount:r,errors:l}}async _singleQuery(e){let t=Number.isFinite(this._maxRecordCount)&&this._maxRecordCount>0?this._maxRecordCount:void 0,i=await(0,y.x$)(this._getFeatureUrl,this._featureType.typeName,this._getFeatureSpatialReference,this._getFeatureOutputFormat,{customParameters:this._customParameters,count:t,signal:e});return this._processGeoJSON(i,{signal:e})}async _pageQuery(e,t){let i=e*this._maxRecordCount,r=await(0,y.x$)(this._getFeatureUrl,this._featureType.typeName,this._getFeatureSpatialReference,this._getFeatureOutputFormat,{customParameters:this._customParameters,startIndex:i,count:this._maxRecordCount,signal:t});return this._processGeoJSON(r,{startIndex:i,signal:t})}_processGeoJSON(e,t){(0,m.sO)(e,this._getFeatureSpatialReference.wkid);let{startIndex:i,signal:r}=t;(0,a.Te)(r);let n=(0,m.bd)(e,{geometryType:this._geometryType,hasZ:!1,objectIdField:this._objectIdField});if(!(0,u.aI)(this._spatialReference,this._getFeatureSpatialReference))for(let e of n)null!=e.geometry&&(e.geometry=(0,h.Ux)((0,d.Cv)((0,h.zv)(e.geometry,this._geometryType,!1,!1),this._getFeatureSpatialReference,this._spatialReference)));let s=i??1;for(let e of n){let t={};(0,f.MB)(this._fieldsIndex,t,e.attributes,!0),e.attributes=t,t[this._objectIdField]??(e.objectId=t[this._objectIdField]=s++)}return n}}function x(e){let t=[];return null!=e.totalRecordCount&&(e.features.length<e.totalRecordCount&&t.push({name:"wfs-layer:maxRecordCount-too-low",message:`Could only fetch ${e.features.length} of ${e.totalRecordCount} in ${e.maxPageCount} queries. Try increasing the value of WFSLayer.maxRecordCount.`,details:{recordCount:e.features.length,totalRecordCount:e.totalRecordCount}}),e.totalRecordCount>e.maxTotalRecordCount&&t.push({name:"wfs-layer:large-dataset",message:`The number of ${e.totalRecordCount} features exceeds the maximum allowed of ${e.maxTotalRecordCount}.`,details:{recordCount:e.features.length,totalRecordCount:e.totalRecordCount,maxTotalRecordCount:e.maxTotalRecordCount}})),t}},85113(e,t,i){i.d(t,{BM:()=>C,bd:()=>T,sO:()=>S,xD:()=>c});var r=i(67482),n=i(49186),s=i(21325),o=i(90708),a=i(43334),l=i(92722),u=i(30524);const h={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function c(e){return h[e]}function*d(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(let t of e.features)t&&(yield t)}}function*p(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(let t of e.coordinates)yield*t;break;case"MultiPolygon":for(let t of e.coordinates)for(let e of t)yield*e}}function m(e){for(let t of e)if(t.length>2)return!0;return!1}function f(e){let t=0;for(let i=0;i<e.length;i++){let r=e[i],n=e[(i+1)%e.length];t+=r[0]*n[1]-n[0]*r[1]}return t<=0}function y(e){let t=e[0],i=e[e.length-1];(t[0]!==i[0]||t[1]!==i[1]||t[2]!==i[2])&&e.push(t)}function g(e,t){let{coordinates:i,type:r}=e,n=t.hasZ??!1;switch(r){case"Point":return new l.A([],[...i],n,!1);case"LineString":return(0,o.Ap)({paths:[i],hasZ:!0},n,!1);case"MultiLineString":return(0,o.Ap)({paths:i,hasZ:!0},n,!1);case"MultiPoint":return(0,o.PR)({points:i,hasZ:!0},n,!1);case"Polygon":case"MultiPolygon":{let e=new l.A([],[],n,!1);for(let t of"Polygon"===r?[i]:i){_(e,t[0],n);for(let i=1;i<t.length;i++)w(e,t[i],n)}return e}}}function _(e,t,i){y(t),function(e){return!f(e)}(t)?x(e,t,i):b(e,t,i)}function w(e,t,i){y(t),function(e){return f(e)}(t)?x(e,t,i):b(e,t,i)}function b(e,t,i){for(let r of t)M(e,r,i);e.lengths.push(t.length)}function x(e,t,i){for(let r=t.length-1;r>=0;r--)M(e,t[r],i);e.lengths.push(t.length)}function M(e,[t,i,r],n){e.coords.push(t,i),n&&e.coords.push(r||0)}function v(e){switch(typeof e){case"string":return(0,r.C)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function S(e,t=4326){if(!e)throw new n.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new n.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});let{crs:i}=e;if(!i)return;let r="string"==typeof i?i:"name"===i.type?i.properties.name:"EPSG"===i.type?i.properties.code:null,o=(0,s.oT)({wkid:t})?RegExp(".*(CRS84H?|4326)$","i"):RegExp(`.*(${t})$`,"i");if(!r||!o.test(r))throw new n.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:i})}function C(e,t={}){let i,r=[],n=new Set,s=new Set,o=!1,a=null,l=!1,{geometryType:h=null}=t;for(let t of d(e)){let{geometry:e,properties:d,id:f}=t;if((!e||(h||=c(e.type),c(e.type)===h))&&(o||=m(p(e)),l||(l=null!=f,l&&(i=typeof f,d&&(a=Object.keys(d).filter(e=>d[e]===f)))),d&&a&&l&&null!=f&&(a.length>1?a=a.filter(e=>d[e]===f):1===a.length&&(a=d[a[0]]===f?a:[])),d))for(let e in d){if(n.has(e))continue;let t=v(d[e]);if("unknown"===t){s.add(e);continue}s.delete(e),n.add(e);let i=(0,u.rS)(e);i&&r.push({name:i,alias:e,type:t})}}let f=(0,u.rS)(1===a?.length&&a[0]||null)??void 0;if(f)for(let e of r)if(e.name===f&&(0,u.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:r,geometryType:h,hasZ:o,objectIdFieldName:f,objectIdFieldType:i,unknownFields:Array.from(s)}}function T(e,t){return Array.from(function*(e,t={}){let{geometryType:i,objectIdField:r}=t;for(let n of e){let{geometry:e,properties:s,id:o}=n;if(e&&c(e.type)!==i)continue;let l,u=s||{};r&&(l=u[r],null!=o&&!l&&(u[r]=l=o)),yield new a.Om(e&&g(e,t),u,null,l)}}(d(e),t))}},82832(e,t,i){i.d(t,{$1:()=>_,CR:()=>g,MB:()=>m,Yx:()=>h,bP:()=>d});var r=i(67482),n=i(18370),s=i(60408),o=i(21325),a=i(30524);class l{constructor(e){this.description=e,this.code=null}}class u{constructor(e){this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error=new l(e)}}function h(e){return new u(e)}class c{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function d(e){return new c(e)}const p=new Set;function m(e,t,i,r=!1){p.clear();for(let n in i){let s=e.get(n);if(!s)continue;let o=f(s,i[n]);if(p.add(s.name),s&&(r||s.editable)){let e=(0,a.CJ)(s,o);if(e)return h((0,a.uo)(e,s,o));t[s.name]=o}}for(let t of e.requiredFields??[])if(!p.has(t.name))return h(`missing required field "${t.name}"`);return null}function f(e,t){let i=t;return(0,a.WA)(e)&&"string"==typeof t?i=(0,a.XT)(t):(0,a.yM)(e)&&null!=t&&"string"!=typeof t?i=String(t):(0,a.vE)(e)&&"string"==typeof t&&(i=(0,r._)(t)),(0,a.WX)(i)}const y=(0,n.z)(()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(3456)]).then(()=>i(3637)));function g(e,t){if(!(0,s.Bi)(e)&&!(0,s.Rg)(e)||!(0,o.fn)(t))return e;let i=y.module;if(null==i)throw TypeError("simplify operator not loaded");return i.simplifyExecute({...e,spatialReference:t})??e}async function _(e,t){(0,o.fn)(e)&&("esriGeometryPolygon"===t||"esriGeometryPolyline"===t)&&await y.getImportPromise()}const w={supportsAutoIntervalBin:!0,supportsFixedIntervalBin:!0,supportsFixedBoundariesBin:!0,supportsDateBin:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsNormalization:!0,supportedStatisticTypes:["COUNT","SUM","AVG","VAR","STDDEV","MIN","MAX","PERCENTILE_CONT","PERCENTILE_DISC","CentroidAggregate","EnvelopeAggregate","ConvexHullAggregate"],supportedNormalizationTypes:["field","log","naturalLog","percentOfTotal","squareRoot"]},b={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsQueryAttachmentsCountOnly:!1,supportsQueryAttachmentOrderByFields:!1,supportsQueryAttachmentWithTypeWildcard:!1,supportsQueryBins:!0,supportsQueryPivot:!1,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:["EnvelopeAggregate","CentroidAggregate","ConvexHullAggregate"],supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsQueryWithDistance:!0,supportsOutDistance:!1,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQueryWithResultType:!0,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0,supportsQueryWithCacheHint:!0},queryBinsCapabilities:w},x={...b,supportsCoordinatesQuantization:!1,supportsReturningQueryGeometry:!1,advancedQueryCapabilities:{...b.advancedQueryCapabilities,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:[],supportsReturningGeometryCentroid:!1,supportsQueryWithDistance:!1,supportsReturningQueryExtent:!1,supportsDisjointSpatialRel:!1},queryBinsCapabilities:{...w,supportedStatisticTypes:w.supportedStatisticTypes.filter(e=>"EnvelopeAggregate"!==e&&"CentroidAggregate"!==e&&"ConvexHullAggregate"!==e)}};i.d(t,["CI",0,b,"Xn",0,x])},34322(e,t,i){i.d(t,{E:()=>B,Fu:()=>M,O8:()=>A,UH:()=>j,YW:()=>R,mG:()=>F,x$:()=>E});var r=i(56507),n=i(49186),s=i(5479),o=i(84952),a=i(5443),l=i(99917),u=i(16930),h=i(21325),c=i(50498),d=i(85113),p=i(13043),m=i(60694),f=i(20437),y=i(30524);const g="xlink:href",_="2.0.0",w="__esri_wfs_id__",b="wfs-layer:feature-type-not-found",x="wfs-layer:unknown-geometry-type";async function M(e,t){let i=function(e){let t=O(e);(function(e){let t=e.firstElementChild?.getAttribute("version");if(t&&t!==_)throw new n.A("wfs-layer:unsupported-wfs-version",`Unsupported WFS version ${t}. Supported version: ${_}`)})(t),k(t);let i=t.firstElementChild,r=(0,s.PP)(function(e){return(0,p.i)(e,{FeatureTypeList:{FeatureType:e=>{let t={typeName:"undefined:undefined",name:"",title:"",description:"",extent:null,namespacePrefix:"",namespaceUri:"",defaultSpatialReference:4326,supportedSpatialReferences:[]},i=new Set;return(0,p.p)(e,{Name:e=>{let{name:i,prefix:r}=D(e.textContent);t.typeName=`${r}:${i}`,t.name=i,t.namespacePrefix=r,t.namespaceUri=e.lookupNamespaceURI(r)},Abstract:e=>{t.description=e.textContent},Title:e=>{t.title=e.textContent},WGS84BoundingBox:e=>{t.extent=a.A.fromJSON(function(e){let t,i,r,n;for(let s of e.children)switch(s.localName){case"LowerCorner":[t,i]=s.textContent.split(" ").map(e=>Number.parseFloat(e));break;case"UpperCorner":[r,n]=s.textContent.split(" ").map(e=>Number.parseFloat(e))}return{xmin:t,ymin:i,xmax:r,ymax:n,spatialReference:h.KK}}(e))},DefaultCRS:e=>{let r=T(e);r&&(t.defaultSpatialReference=r,i.add(r))},OtherCRS:e=>{let t=T(e);t&&i.add(t)}}),t.title||=t.name,i.add(4326),t.supportedSpatialReferences.push(...i),t}}})}(i));return{operations:C(i),get featureTypes(){return Array.from(r())},readFeatureTypes:r}}((await(0,r.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetCapabilities",VERSION:_,...t?.customParameters},signal:t?.signal})).data);return function(e,t){(0,o.m3)(e)&&((0,o.FX)(e,t.operations.DescribeFeatureType.url,!0)&&(t.operations.DescribeFeatureType.url=(0,o.lM)(t.operations.DescribeFeatureType.url)),(0,o.FX)(e,t.operations.GetFeature.url,!0)&&(t.operations.GetFeature.url=(0,o.lM)(t.operations.GetFeature.url)))}(e,i),i}const v=["json","application/json; subtype=geojson; charset=utf-8","application/json; subtype=geojson","application/json","geojson","application/geo+json"];function S(e){for(let t of v){let i=e.findIndex(e=>e.toLowerCase()===t);if(i>=0)return e[i]}return null}function C(e){let t=!0,i={GetCapabilities:{url:""},DescribeFeatureType:{url:""},GetFeature:{url:"",outputFormat:null,supportsPagination:!1}},r=[],s=[];if((0,p.p)(e,{OperationsMetadata:{Parameter:e=>{if("outputformat"===e.getAttribute("name")?.toLowerCase())return{AllowedValues:{Value:({textContent:e})=>{e&&r.push(e)}}}},Operation:e=>{switch(e.getAttribute("name")){case"GetCapabilities":return{DCP:{HTTP:{Get:e=>{i.GetCapabilities.url=e.getAttribute(g)}}}};case"DescribeFeatureType":return{DCP:{HTTP:{Get:e=>{i.DescribeFeatureType.url=e.getAttribute(g)}}}};case"GetFeature":return{DCP:{HTTP:{Get:e=>{i.GetFeature.url=e.getAttribute(g)}}},Parameter:e=>{if("outputformat"===e.getAttribute("name")?.toLowerCase())return{AllowedValues:{Value:({textContent:e})=>{e&&s.push(e)}}}}}}},Constraint:e=>{switch(e.getAttribute("name")){case"KVPEncoding":return{DefaultValue:e=>{t="true"===e.textContent.toLowerCase()}};case"ImplementsResultPaging":return{DefaultValue:e=>{i.GetFeature.supportsPagination="true"===e.textContent.toLowerCase()}}}}}}),i.GetFeature.outputFormat=S(s)??S(r),!t)throw new n.A("wfs-layer:kvp-encoding-not-supported","WFS service doesn't support key/value pair (KVP) encoding");if(null==i.GetFeature.outputFormat)throw new n.A("wfs-layer:geojson-not-supported","WFS service doesn't support GeoJSON output format");return i}function T(e){let t=parseInt(e.textContent?.match(/(?<wkid>\d+$)/i)?.groups?.wkid??"",10);if(!Number.isNaN(t))return t}function F(e,t,i){return(0,s.I6)(e,e=>i?e.name===t&&e.namespaceUri===i:e.typeName===t||e.name===t)}async function A(e,t,i,r={}){let{featureType:s,extent:o}=await async function(e,t,i,r={}){let s=e.readFeatureTypes(),o=t?F(s,t,i):s.next().value,{spatialReference:a=new u.A({wkid:o?.defaultSpatialReference})}=r;if(null==o)throw t?new n.A(b,`The type '${t}' could not be found in the service`):new n.A("wfs-layer:empty-service","The service is empty");let c=o.extent;if(c&&!(0,h.aI)(c.spatialReference,a))try{await(0,l.initializeProjection)(c.spatialReference,a,void 0,r),c=(0,l.project)(c,a)}catch{throw new n.A("wfs-layer:unsupported-spatial-reference","Projection not supported")}return{extent:c,spatialReference:a,featureType:o}}(e,t,i,r),{spatialReference:a}=j(e.operations.GetFeature.url,s,r.spatialReference),{fields:c,geometryType:d,swapXY:p,objectIdField:m,geometryField:f}=await async function(e,t,i,r={}){let{typeName:s}=t,[o,a]=await Promise.allSettled([P(e.operations.DescribeFeatureType.url,s,r),I(e,s,i,r)]),l=e=>{let t=`An error occurred while getting info about the feature type '${s}'`;return new n.A("wfs-layer:getWFSLayerTypeInfo-error",t,{error:e})};if("rejected"===o.status)throw l(o.reason);if("rejected"===a.status)throw l(a.reason);let{fields:u,errors:h}=o.value??{},c=o.value?.geometryType||a.value?.geometryType,d=a.value?.swapXY??!1;if(null==c)throw new n.A(x,`The geometry type could not be determined for type '${s}`,{typeName:s,geometryType:c,fields:u,errors:h});return{...R(u??[]),geometryType:c,swapXY:d}}(e,s,a,r);return{url:e.operations.GetCapabilities.url,name:s.name,namespaceUri:s.namespaceUri,fields:c,geometryField:f,geometryType:d,objectIdField:m,spatialReference:r.spatialReference??new u.A({wkid:s.defaultSpatialReference}),extent:o,swapXY:p,wfsCapabilities:e,customParameters:r.customParameters}}function R(e){let t=e.find(e=>"geometry"===e.type),i=e.find(e=>"oid"===e.type);return e=e.filter(e=>"geometry"!==e.type),i||(i=new f.A({name:w,type:"oid",alias:w}),e.unshift(i)),{geometryField:t?.name??null,objectIdField:i.name,fields:e}}async function I(e,t,i,n={}){let s,o=!1,[a,l]=await Promise.all([E(e.operations.GetFeature.url,t,i,e.operations.GetFeature.outputFormat,{...n,count:1}),(0,r.A)(e.operations.GetFeature.url,{responseType:"text",query:N(t,i,void 0,{...n,count:1}),signal:n?.signal})]),u="FeatureCollection"===a.type&&a.features[0]?.geometry;if(u){let e;switch(s=c.gy.fromJSON((0,d.xD)(u.type)),u.type){case"Point":e=u.coordinates;break;case"LineString":case"MultiPoint":e=u.coordinates[0];break;case"MultiLineString":case"Polygon":e=u.coordinates[0][0];break;case"MultiPolygon":e=u.coordinates[0][0][0]}let t=/<[^>]*pos[^>]*> *(-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)/.exec(l.data);if(t){let i=e[0].toFixed(3),r=e[1].toFixed(3),n=parseFloat(t[1]).toFixed(3);i===parseFloat(t[2]).toFixed(3)&&r===n&&(o=!0)}}return{geometryType:s,swapXY:o}}async function P(e,t,i){return function(e,t){let{name:i}=D(e),r=O(t);k(r);let o=(0,s.I6)((0,p.i)(r.firstElementChild,{element:e=>e}),e=>e.getAttribute("name")===i);if(null!=o){let e=o.getAttribute("type"),t=e?(0,s.I6)((0,p.i)(r.firstElementChild,{complexType:e=>e}),t=>t.getAttribute("name")===D(e).name):(0,s.I6)((0,p.i)(o,{complexType:e=>e}),()=>!0);if(t)return function(e){let t,i=[],r=[],s=(0,p.i)(e,{complexContent:{extension:{sequence:{element:e=>e}}}});for(let o of s){let s,a,l=o.getAttribute("name");if(!l)continue;if(o.hasAttribute("type")?s=D(o.getAttribute("type")).name:(0,p.p)(o,{simpleType:{restriction:e=>(s=D(e.getAttribute("base")).name,{maxLength:e=>{a=+e.getAttribute("value")}})}}),!s)continue;let u="true"===o.getAttribute("nillable"),h=!1;switch(s.toLowerCase()){case"integer":case"nonpositiveinteger":case"negativeinteger":case"long":case"int":case"short":case"byte":case"nonnegativeinteger":case"unsignedlong":case"unsignedint":case"unsignedshort":case"unsignedbyte":case"positiveinteger":r.push(new f.A({name:l,alias:l,type:"integer",nullable:u,length:(0,y._b)("integer")}));break;case"float":case"double":case"decimal":r.push(new f.A({name:l,alias:l,type:"double",nullable:u,length:(0,y._b)("double")}));break;case"boolean":case"string":case"gyearmonth":case"gyear":case"gmonthday":case"gday":case"gmonth":case"anyuri":case"qname":case"notation":case"normalizedstring":case"token":case"language":case"idrefs":case"entities":case"nmtoken":case"nmtokens":case"name":case"ncname":case"id":case"idref":case"entity":case"duration":case"time":r.push(new f.A({name:l,alias:l,type:"string",nullable:u,length:a??(0,y._b)("string")}));break;case"datetime":case"date":r.push(new f.A({name:l,alias:l,type:"date",nullable:u,length:a??(0,y._b)("date")}));break;case"pointpropertytype":t="point",h=!0;break;case"multipointpropertytype":t="multipoint",h=!0;break;case"curvepropertytype":case"multicurvepropertytype":case"multilinestringpropertytype":t="polyline",h=!0;break;case"surfacepropertytype":case"multisurfacepropertytype":case"multipolygonpropertytype":t="polygon",h=!0;break;case"geometrypropertytype":case"multigeometrypropertytype":h=!0,i.push(new n.A(x,`geometry type '${s}' is not supported`,{type:(new XMLSerializer).serializeToString(e)}));break;default:i.push(new n.A("wfs-layer:unknown-field-type",`Unknown field type '${s}'`,{type:(new XMLSerializer).serializeToString(e)}))}h&&r.push(new f.A({name:l,alias:l,type:"geometry",nullable:u}))}for(let e of r)if("integer"===e.type&&!e.nullable&&z.has(e.name.toLowerCase())){e.type="oid";break}return{geometryType:t,fields:r,errors:i}}(t)}throw new n.A(b,`Type '${e}' not found in document`,{document:(new XMLSerializer).serializeToString(r)})}(t,(await(0,r.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"DescribeFeatureType",VERSION:_,TYPENAME:t,TYPENAMES:t,...i?.customParameters},signal:i?.signal})).data)}const z=new Set(["objectid","fid"]);async function E(e,t,i,s,o){let{data:a}=await(0,r.A)(e,{responseType:"text",query:N(t,i,s,o),signal:o?.signal});a=a.replaceAll(/": +(-?\d+),(\d+)(,)?/g,'": $1.$2$3');try{return JSON.parse(a)}catch(e){throw new n.A("wfs-layer:malformed-json","Error while parsing the response",{response:a,error:e})}}function N(e,t,i,r){let n="number"==typeof t?t:t.wkid;return{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:_,TYPENAMES:e,OUTPUTFORMAT:i,SRSNAME:"EPSG:"+n,STARTINDEX:r?.startIndex,COUNT:r?.count,...r?.customParameters}}async function B(e,t,i){let n=await(0,r.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:_,TYPENAMES:t,RESULTTYPE:"hits",...i?.customParameters},signal:i?.signal}),s=/numberMatched=["'](?<numberMatched>\d+)["']/gi.exec(n.data);if(s?.groups)return+s.groups.numberMatched}function O(e){return(new DOMParser).parseFromString(e.trim(),"text/xml")}function D(e){let[t,i]=e.split(":");return{prefix:i?t:"",name:i??t}}function k(e){let t="",i="";if((0,p.p)(e.firstElementChild,{Exception:e=>(t=e.getAttribute("exceptionCode"),{ExceptionText:e=>{i=e.textContent}})}),t)throw new n.A(`wfs-layer:${t}`,i)}function j(e,t,i){let r={wkid:t.defaultSpatialReference},n=null==i?.wkid?r:{wkid:i.wkid};return{spatialReference:n,getFeatureSpatialReference:(0,m.Fi)(e)||n.wkid&&t.supportedSpatialReferences.includes(n.wkid)?{wkid:n.wkid}:{wkid:t.defaultSpatialReference}}}i.d(t,["i5",0,w])},13043(e,t,i){function r(e,t){if(e&&t)for(let i of e.children)if(i.localName in t){let e=t[i.localName];if("function"==typeof e){let t=e(i);t&&r(i,t)}else r(i,e)}}function*n(e,t){for(let i of e.children)if(i.localName in t){let e=t[i.localName];"function"==typeof e?yield e(i):yield*n(i,e)}}i.d(t,{i:()=>n,p:()=>r})},39357(e,t,i){i.d(t,{A:()=>a});var r,n=i(32198),s=i(25482),o=i(91429);let a=r=class extends s.o{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,n.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"name",void 0),(0,n.Cg)([(0,o.MZ)({type:[String,Number],json:{write:{isRequired:!0}}})],a.prototype,"code",void 0),a=r=(0,n.Cg)([(0,o.$K)("esri.layers.support.CodedValue")],a)},53177(e,t,i){i.d(t,{A:()=>h});var r,n=i(32198),s=i(4718),o=i(91429),a=i(39357),l=i(76357),u=i(93223);let h=class extends l.A{static{r=this}constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){let i=String(e);this.codedValues.some(e=>(String(e.code)===i&&(t=e.name),!!t))}return t}clone(){return new r({codedValues:(0,s.o8)(this.codedValues),name:this.name})}};(0,n.Cg)([(0,o.MZ)({type:[a.A],json:{write:{isRequired:!0}}})],h.prototype,"codedValues",void 0),(0,n.Cg)([(0,u.e)({codedValue:"coded-value"})],h.prototype,"type",void 0),h=r=(0,n.Cg)([(0,o.$K)("esri.layers.support.CodedValueDomain")],h)},76357(e,t,i){i.d(t,{A:()=>u});var r=i(32198),n=i(66552),s=i(25482),o=i(91429),a=i(93223);const l=new n.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let u=class extends s.o{constructor(e){super(e),this.name=null,this.type=null}};(0,r.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,r.Cg)([(0,a.e)(l),(0,o.MZ)({json:{write:{isRequired:!0}}})],u.prototype,"type",void 0),u=(0,r.Cg)([(0,o.$K)("esri.layers.support.Domain")],u)},20437(e,t,i){i.d(t,{A:()=>m});var r,n=i(32198),s=i(66552),o=i(25482),a=i(91429),l=i(78888),u=i(8631),h=i(98453),c=i(36005),d=i(93223);const p=new s.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",currency:"currency",dateAndTime:"date-and-time",description:"description",emailAddress:"email-address",locationOrPlaceName:"location-or-place-name",marginOfError:"margin-of-error",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",phoneNumber:"phone-number",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier",url:"url"});let m=class extends o.o{static{r=this}constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch{}return i?.value??null}readValueType(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch{}return i?p.fromJSON(i.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,n.Cg)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,n.Cg)([(0,a.MZ)()],m.prototype,"description",void 0),(0,n.Cg)([(0,c.w)("description")],m.prototype,"readDescription",null),(0,n.Cg)([(0,a.MZ)({types:u.g,json:{read:{reader:u.r},write:!0}})],m.prototype,"domain",void 0),(0,n.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,n.Cg)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,n.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,n.Cg)([(0,d.e)(h.m)],m.prototype,"type",void 0),(0,n.Cg)([(0,a.MZ)()],m.prototype,"valueType",void 0),(0,n.Cg)([(0,c.w)("valueType",["description"])],m.prototype,"readValueType",null),(0,n.Cg)([(0,a.MZ)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=r=(0,n.Cg)([(0,a.$K)("esri.layers.support.Field")],m)},95466(e,t,i){i.d(t,{A:()=>u});var r=i(49186),n=i(53966),s=i(12195),o=i(30524),a=i(98623),l=i(56400);class u{static fromJSON(e){return new u(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new u(e.fields??[],c(e))}static fromLayerJSON(e){return new u(e.fields??[],c(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;let i=[];for(let e of this.fields){let t=e?.name,r=(0,o.GZ)(t);if(t&&r){let n=(0,o.NF)(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(r,e),i.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,o.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,o.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),!(0,o.te)(e)&&!(0,o.Xz)(e)&&(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(let e of this.fields)(0,o.te)(e)||(0,o.Xz)(e)||e.nullable||void 0!==(0,o.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){return(0,o.Vb)({fieldName:e,fieldsMap:this._fieldsMap,normalizedFieldsMap:this._normalizedFieldsMap})}getTimeZone(e){let t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new r.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),"UTC"):h.has(t.type)?a.L:null:null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,o.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,s.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}const h=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function c(e){let t=new Map;if(!e.fields)return t;let i=!0===e.datesInUnknownTimezone,{timeInfo:r,editFieldsInfo:n}=e,s=(r?"startField"in r?r.startField:r.startTimeField:"")??"",u=(r?"endField"in r?r.endField:r.endTimeField:"")??"",c=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,l.ZS)(e.dateFieldsTimeReference):null,d=n?function(e){return"timeZone"in e}(n)?n.timeZone??c:n.dateFieldsTimeReference?(0,l.ZS)(n.dateFieldsTimeReference):c??"UTC":null,p=r?function(e){return"timeZone"in e}(r)?r.timeZone??c:r.timeReference?(0,l.ZS)(r.timeReference):c:null,m=new Map([[(0,o.NF)(n?.creationDateField??""),d],[(0,o.NF)(n?.editDateField??""),d],[(0,o.NF)(s),p],[(0,o.NF)(u),p]]);for(let{name:r,type:n}of e.fields)if(h.has(n))t.set(r,a.L);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(r,null);else if(i)t.set(r,a.L);else{let e=m.get((0,o.NF)(r??""))??c;t.set(r,e)}return t}},41628(e,t,i){i.d(t,{A:()=>l});var r,n=i(32198),s=i(91429),o=i(76357),a=i(93223);let l=class extends o.A{static{r=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new r({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n.Cg)([(0,s.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,i){t[i]=[this.minValue||0,e]},isRequired:!0}}})],l.prototype,"maxValue",void 0),(0,n.Cg)([(0,s.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,i){t[i]=[e,this.maxValue||0]},isRequired:!0}}})],l.prototype,"minValue",void 0),(0,n.Cg)([(0,a.e)({range:"range"})],l.prototype,"type",void 0),l=r=(0,n.Cg)([(0,s.$K)("esri.layers.support.RangeDomain")],l)},8631(e,t,i){i.d(t,{r:()=>d,g:()=>c});var r,n=i(53177),s=i(76357),o=i(32198),a=i(91429),l=i(93223);let u=class extends s.A{static{r=this}constructor(e){super(e),this.type="inherited"}clone(){return new r}};(0,o.Cg)([(0,l.e)({inherited:"inherited"})],u.prototype,"type",void 0),u=r=(0,o.Cg)([(0,a.$K)("esri.layers.support.InheritedDomain")],u);var h=i(41628);const c={key:"type",base:s.A,typeMap:{range:h.A,"coded-value":n.A,inherited:u}};function d(e){if(!e?.type)return null;switch(e.type){case"range":return h.A.fromJSON(e);case"codedValue":return n.A.fromJSON(e);case"inherited":return u.fromJSON(e)}return null}},98453(e,t,i){const r=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"});i.d(t,["m",0,r])}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[309],{20309(e,t,r){r.r(t),r.d(t,{default:()=>me});var i,l=r(32198),s=r(56507),a=r(4576),o=r(7762),n=r(49186),u=r(4718),p=r(25728),d=r(17676),c=r(36708),m=r(84952),h=r(91429),y=r(5443),f=r(4146),g=r(47314),w=r(63074),x=r(34287),v=r(8303),M=r(54310),C=r(25036),I=r(33446),S=r(87045),T=r(65509),L=r(83703),A=r(25482);let E=i=class extends A.o{constructor(e){super(e),this.fullExtent=null,this.id=null,this.tileInfo=null}clone(){let e=new i;return this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent?.clone()??null),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("tileInfo")&&(e.tileInfo=this.tileInfo?.clone()??null),e}};(0,l.Cg)([(0,h.MZ)({type:y.A,json:{read:{source:"fullExtent"}}})],E.prototype,"fullExtent",void 0),(0,l.Cg)([(0,h.MZ)({type:String,json:{read:{source:"id"}}})],E.prototype,"id",void 0),(0,l.Cg)([(0,h.MZ)({type:S.A,json:{read:{source:"tileInfo"}}})],E.prototype,"tileInfo",void 0),E=i=(0,l.Cg)([(0,h.$K)("esri.layers.support.TileMatrixSet")],E);const b=E;var P;let O=P=class extends A.o{constructor(e){super(e),this.id=null,this.title=null,this.description=null,this.legendUrl=null}clone(){let e=new P;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("isDefault")&&(e.isDefault=this.isDefault),this.hasOwnProperty("keywords")&&(e.keywords=this.keywords&&this.keywords.slice()),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("title")&&(e.title=this.title),e}};(0,l.Cg)([(0,h.MZ)({json:{read:{source:"id"}}})],O.prototype,"id",void 0),(0,l.Cg)([(0,h.MZ)({json:{read:{source:"title"}}})],O.prototype,"title",void 0),(0,l.Cg)([(0,h.MZ)({json:{read:{source:"abstract"}}})],O.prototype,"description",void 0),(0,l.Cg)([(0,h.MZ)({json:{read:{source:"legendUrl"}}})],O.prototype,"legendUrl",void 0),(0,l.Cg)([(0,h.MZ)({json:{read:{source:"isDefault"}}})],O.prototype,"isDefault",void 0),(0,l.Cg)([(0,h.MZ)({json:{read:{source:"keywords"}}})],O.prototype,"keywords",void 0),O=P=(0,l.Cg)([(0,h.$K)("esri.layers.support.WMTSStyle")],O);const R=O;var F,Z=r(36005);let V=F=class extends A.o{constructor(e){super(e),this.description=null,this.fullExtent=null,this.fullExtents=null,this.id=null,this.imageFormats=null,this.layer=null,this.parent=null,this.styles=null,this.title=null,this.tileMatrixSetId=null,this.tileMatrixSets=null}readFullExtent(e,t){return(e=t.fullExtent)?y.A.fromJSON(e):null}readFullExtents(e,t){return t.fullExtents?.length?t.fullExtents.map(e=>y.A.fromJSON(e)):t.tileMatrixSets?.map(e=>y.A.fromJSON(e.fullExtent)).filter(e=>e)??[]}get imageFormat(){let e=this._get("imageFormat");return e||=this.imageFormats?.length?this.imageFormats[0]:"",e}set imageFormat(e){let t=this.imageFormats;e&&(e.includes("image/")||t&&!t.includes(e))&&(e.includes("image/")||(e="image/"+e),t&&!t.includes(e))?console.error("The layer doesn't support the format of "+e):this._set("imageFormat",e)}get styleId(){let e=this._get("styleId");return e||=this.styles?.at(0)?.id??"",e}set styleId(e){this._set("styleId",e)}get tileMatrixSet(){return this.tileMatrixSets?.find(({id:e})=>e===this.tileMatrixSetId)??null}clone(){let e=new F;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("imageFormats")&&(e.imageFormats=this.imageFormats?.slice()??null),this.hasOwnProperty("imageFormat")&&(e.imageFormat=this.imageFormat),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent?.clone()),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("styleId")&&(e.styleId=this.styleId),this.hasOwnProperty("styles")&&(e.styles=this.styles?.clone()),this.hasOwnProperty("tileMatrixSetId")&&(e.tileMatrixSetId=this.tileMatrixSetId),this.hasOwnProperty("tileMatrixSets")&&(e.tileMatrixSets=this.tileMatrixSets?.clone()),this.hasOwnProperty("title")&&(e.title=this.title),e}};(0,l.Cg)([(0,h.MZ)()],V.prototype,"description",void 0),(0,l.Cg)([(0,h.MZ)({type:y.A})],V.prototype,"fullExtent",void 0),(0,l.Cg)([(0,Z.w)("fullExtent",["fullExtent"])],V.prototype,"readFullExtent",null),(0,l.Cg)([(0,h.MZ)({readOnly:!0})],V.prototype,"fullExtents",void 0),(0,l.Cg)([(0,Z.w)("fullExtents",["fullExtents","tileMatrixSets"])],V.prototype,"readFullExtents",null),(0,l.Cg)([(0,h.MZ)()],V.prototype,"id",void 0),(0,l.Cg)([(0,h.MZ)()],V.prototype,"imageFormat",null),(0,l.Cg)([(0,h.MZ)({json:{read:{source:"formats"}}})],V.prototype,"imageFormats",void 0),(0,l.Cg)([(0,h.MZ)()],V.prototype,"layer",void 0),(0,l.Cg)([(0,h.MZ)()],V.prototype,"parent",void 0),(0,l.Cg)([(0,h.MZ)()],V.prototype,"styleId",null),(0,l.Cg)([(0,h.MZ)({type:o.A.ofType(R),json:{read:{source:"styles"}}})],V.prototype,"styles",void 0),(0,l.Cg)([(0,h.MZ)({json:{write:{ignoreOrigin:!0}}})],V.prototype,"title",void 0),(0,l.Cg)([(0,h.MZ)()],V.prototype,"tileMatrixSetId",void 0),(0,l.Cg)([(0,h.MZ)({readOnly:!0})],V.prototype,"tileMatrixSet",null),(0,l.Cg)([(0,h.MZ)({type:o.A.ofType(b),json:{read:{source:"tileMatrixSets"}}})],V.prototype,"tileMatrixSets",void 0),V=F=(0,l.Cg)([(0,h.$K)("esri.layers.support.WMTSSublayer")],V);var U=r(73941),_=r(86738),j=r(22530),N=r(38458),k=r(13043),D=r(91806);const W=90.71428571428571;function K(e){let t=e.replaceAll(/ows:/gi,"");return(new DOMParser).parseFromString(t,"text/xml")}function B(e){if(!H("Contents",e.documentElement))throw new n.A("wmtslayer:wmts-capabilities-xml-is-not-valid","the wmts get capabilities response is not compliant")}function $(e){return e.nodeType===Node.ELEMENT_NODE}function H(e,t){for(let r=0;r<t.childNodes.length;r++){let i=t.childNodes[r];if($(i)&&i.nodeName===e)return i}return null}function J(e,t){let r=[];for(let i=0;i<t.childNodes.length;i++){let l=t.childNodes[i];$(l)&&l.nodeName===e&&r.push(l)}return r}function q(e,t){let r=[];for(let i=0;i<t.childNodes.length;i++){let l=t.childNodes[i];$(l)&&l.nodeName===e&&r.push(l)}return r.map(e=>e.textContent).filter(a.Ru)}function G(e,t){return e.split(">").forEach(e=>{t&&=H(e,t)}),t&&t.textContent}function z(e,t,r,i){let l;return Array.prototype.slice.call(i.childNodes).some(i=>{if(i.nodeName.includes(e)){let e=H(t,i)?.textContent;if(e===r||r.split(":")&&r.split(":")[1]===e)return l=i,!0}return!1}),l}function Q(e,t,r,i,l){let s=G("Abstract",t),a=q("Format",t);return{id:e,fullExtent:Y(t),fullExtents:ee(t),description:s,formats:a,styles:te(t,i),title:G("Title",t),tileMatrixSets:re(l,t,r)}}function X(e,t){let r=[],i=e.layerMap?.get(t);if(!i)return null;let l,s,a,o,n=J("ResourceURL",i),u=J("Dimension",i);return u.length&&(l=G("Identifier",u[0]),s=q("Default",u[0])||q("Value",u[0])),u.length>1&&(a=G("Identifier",u[1]),o=q("Default",u[1])||q("Value",u[1])),e.dimensionMap.set(t,{dimensions:s,dimensions2:o}),n.forEach(e=>{let t=e.getAttribute("template");if("tile"===e.getAttribute("resourceType")){if(l&&s.length)if(t.includes("{"+l+"}"))t=t.replace("{"+l+"}","{dimensionValue}");else{let e=t.toLowerCase().indexOf("{"+l.toLowerCase()+"}");e>-1&&(t=t.slice(0,e)+"{dimensionValue}"+t.slice(e+l.length+2))}if(a&&o.length)if(t.includes("{"+a+"}"))t=t.replace("{"+a+"}","{dimensionValue2}");else{let e=t.toLowerCase().indexOf("{"+a.toLowerCase()+"}");e>-1&&(t=t.slice(0,e)+"{dimensionValue2}"+t.slice(e+a.length+2))}r.push({template:t,format:e.getAttribute("format"),resourceType:"tile"})}}),r}function Y(e){let t=H("WGS84BoundingBox",e),r=t?G("LowerCorner",t).split(" "):["-180","-90"],i=t?G("UpperCorner",t).split(" "):["180","90"];return{xmin:parseFloat(r[0]),ymin:parseFloat(r[1]),xmax:parseFloat(i[0]),ymax:parseFloat(i[1]),spatialReference:{wkid:4326}}}function ee(e){let t=[];return(0,k.p)(e,{BoundingBox:e=>{if(!e.getAttribute("crs"))return;let r,i,l,s,a=e.getAttribute("crs").toLowerCase(),o=ie(a),n=a.includes("epsg")&&(0,N.m)(o.wkid);(0,k.p)(e,{LowerCorner:e=>{[r,i]=e.textContent.split(" ").map(e=>Number.parseFloat(e)),n&&([r,i]=[i,r])},UpperCorner:e=>{[l,s]=e.textContent.split(" ").map(e=>Number.parseFloat(e)),n&&([l,s]=[s,l])}}),t.push({xmin:r,ymin:i,xmax:l,ymax:s,spatialReference:o})}}),t}function te(e,t){return J("Style",e).map(e=>{let r=H("LegendURL",e),i=H("Keywords",e),l=i?q("Keyword",i):[],s=r?.getAttribute("xlink:href");return t&&(s=s?.replace(/^http:/i,"https:")),{abstract:G("Abstract",e),id:G("Identifier",e),isDefault:"true"===e.getAttribute("isDefault"),keywords:l,legendUrl:s,title:G("Title",e)}})}function re(e,t,r){return J("TileMatrixSetLink",t).map(t=>function(e,t,r){let i=H("TileMatrixSet",t).textContent,l=q("TileMatrix",t),s=r.find(e=>{let t=H("Identifier",e)?.textContent;return!!(t===i||i.split(":")&&i.split(":")[1]===t)}),a=H("TileMatrixSetLimits",t),o=a&&J("TileMatrixLimits",a),n=new Map;if(o?.length)for(let e of o){let t=H("TileMatrix",e).textContent,r=+H("MinTileRow",e).textContent,i=+H("MaxTileRow",e).textContent,l=+H("MinTileCol",e).textContent,s=+H("MaxTileCol",e).textContent;n.set(t,{minCol:l,maxCol:s,minRow:r,maxRow:i})}let u=G("SupportedCRS",s).toLowerCase(),p=function(e,t){return le(H("TileMatrix",e),t)}(s,u),d=p.spatialReference,c=H("TileMatrix",s),m=[parseInt(G("TileWidth",c),10),parseInt(G("TileHeight",c),10)],h=[];return l.length?l.forEach((e,t)=>{let r=z("TileMatrix","Identifier",e,s);h.push(ae(r,u,t,i,n))}):J("TileMatrix",s).forEach((e,t)=>{h.push(ae(e,u,t,i,n))}),{id:i,fullExtent:se(e,s,p,m,h[0]).toJSON(),tileInfo:new S.A({dpi:96,spatialReference:d,size:m,origin:p,lods:h}).toJSON()}}(e,t,r))}function ie(e){e=e.toLowerCase();let t=parseInt(e.split(":").pop(),10);(900913===t||3857===t)&&(t=102100);let r=function(e){return e.includes("crs84")||e.includes("crs:84")?4326:e.includes("crs83")||e.includes("crs:83")?4269:e.includes("crs27")||e.includes("crs:27")?4267:null}(e);return null!=r&&(t=r),{wkid:t}}function le(e,t){let r=ie(t),[i,l]=G("TopLeftCorner",e).split(" ").map(e=>parseFloat(e));return t.includes("epsg")&&(0,N.m)(r.wkid)?new _.A({x:l,y:i,spatialReference:r}):new _.A({x:i,y:l,spatialReference:r})}function se(e,t,r,i,l){let s,a,o,n,u,p,d=H("BoundingBox",t);if(d&&(s=G("LowerCorner",d).split(" "),a=G("UpperCorner",d).split(" ")),s&&s.length>1&&a&&a.length>1)o=parseFloat(s[0]),u=parseFloat(s[1]),n=parseFloat(a[0]),p=parseFloat(a[1]);else{let e=H("TileMatrix",t),s=parseInt(G("MatrixWidth",e),10),a=parseInt(G("MatrixHeight",e),10);o=r.x,p=r.y,n=o+s*i[0]*l.resolution,u=p-a*i[1]*l.resolution}return function(e,t,r){return"1.0.0"===e&&(0,N.m)(t.wkid)&&!(r.spatialReference.isGeographic&&r.x<-90&&r.y>=-90)}(e,r.spatialReference,r)?new y.A(u,o,p,n,r.spatialReference):new y.A(o,u,n,p,r.spatialReference)}function ae(e,t,r,i,l){let s=ie(t),a=G("Identifier",e),o=parseFloat(G("ScaleDenominator",e)),n=oe(s.wkid,o,i);o*=96/W;let u=+G("MatrixWidth",e),p=+G("MatrixHeight",e),{maxCol:d=u-1,maxRow:c=p-1,minCol:m=0,minRow:h=0}=l.get(a)??{},{x:y,y:f}=le(e,t);return new D.A({cols:[m,d],level:r,levelValue:a,origin:[y,f],scale:o,resolution:n,rows:[h,c]})}function oe(e,t,r){let i;return i=j.A.hasOwnProperty(""+e)?j.A.values[j.A[e]]:"default028mm"===r?6370997*Math.PI/180:(0,U.y7)(e).metersPerDegree,7*t/25e3/i}var ne,ue=r(43937);const pe={"image/png":".png","image/png8":".png","image/png24":".png","image/png32":".png","image/jpg":".jpg","image/jpeg":".jpeg","image/gif":".gif","image/bmp":".bmp","image/tiff":".tif","image/jpgpng":"","image/jpegpng":"","image/unknown":""},de=new Set(["version","service","request","layer","style","format","tilematrixset","tilematrix","tilerow","tilecol"]);let ce=ne=class extends((0,w.dM)((0,M.J)((0,C.j)((0,x.q)((0,v.A)((0,p.M)(f.A))))))){constructor(...e){super(...e),this.activeLayer=null,this.copyright="",this.customParameters=null,this.customLayerParameters=null,this.operationalLayerType="WebTiledLayer",this.resourceInfo=null,this.serviceMode="RESTful",this.sublayers=null,this.type="wmts",this.version="1.0.0",this.addHandles([(0,c.wB)(()=>this.activeLayer,(e,t)=>{t&&!this.sublayers?.includes(t)&&(t.layer=null,t.parent=null),e&&(e.layer=this,e.parent=this)},c.OH),(0,c.on)(()=>this.sublayers,"after-add",({item:e})=>{e.layer=this,e.parent=this},c.OH),(0,c.on)(()=>this.sublayers,"after-remove",({item:e})=>{e.layer=null,e.parent=null},c.OH),(0,c.wB)(()=>this.sublayers,(e,t)=>{if(t)for(let e of t)e.layer=null,e.parent=null;if(e)for(let t of e)t.layer=this,t.parent=this},c.OH)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMTS"]},e).catch(d.QP).then(()=>this._fetchService(e)).catch(e=>{throw(0,d.QP)(e),new n.A("wmtslayer:unsupported-service-data","Invalid response from the WMTS service.",{error:e})})),Promise.resolve(this)}readActiveLayerFromService(e,t,r){this.activeLayer||=new V;let i=t.layers.find(e=>e.id===this.activeLayer.id);return i||=t.layers[0],this.activeLayer.read(i,r),this.activeLayer}readActiveLayerFromItemOrWebDoc(e,t){let{templateUrl:r,wmtsInfo:i}=t,l=r?this._getLowerCasedUrlParams(r):null,s=i?.layerIdentifier,a=null,o=i?.tileMatrixSet;o&&(Array.isArray(o)?o.length&&(a=o[0]):a=o);let n=l?.format,u=l?.style;return new V({id:s,imageFormat:n,styleId:u,tileMatrixSetId:a})}writeActiveLayer(e,t,r,i){let{activeLayer:l,loaded:s}=this,{id:a,tileMatrixSet:o,tileMatrixSetId:n,imageFormat:u,styleId:p}=l;t.templateUrl=s?this.getUrlTemplate(a,n,u,p):void 0,t.tileInfo=s?o?.tileInfo?.toJSON(i)??null:void 0,t.wmtsInfo={...t.wmtsInfo,layerIdentifier:a,tileMatrixSet:n}}readCustomParameters(e,t){let r=t.wmtsInfo;return r?this._mergeParams(r.customParameters,r.url):null}get fullExtent(){return this.fullExtents?.[0]}set fullExtent(e){this._override("fullExtent",e)}get fullExtents(){return this.activeLayer?.fullExtents}readServiceMode(e,t){return t.templateUrl.includes("?")?"KVP":"RESTful"}readSublayersFromService(e,t,r){return function(e,t){return e.map(e=>{let r=new V;return r.read(e,t),r})}(t.layers,r)}get supportedSpatialReferences(){return this.activeLayer.tileMatrixSets?.map(e=>e.tileInfo?.spatialReference).toArray().filter(a.Ru)??[]}get tilemapCache(){let e=this.activeLayer?.tileMatrixSet?.tileInfo;return e?new T.A(e):void 0}get title(){return this.activeLayer?.title??"Layer"}set title(e){this._overrideIfSome("title",e)}get url(){return this._get("url")}set url(e){e&&e.endsWith("/")?this._set("url",e.slice(0,-1)):this._set("url",e)}createWebTileLayer(e){let t=this.getUrlTemplate(this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId),r=this._getTileMatrixSetById(e.tileMatrixSetId)?.tileInfo,i=e.fullExtent,l=new L.x({layerIdentifier:e.id,tileMatrixSet:e.tileMatrixSetId,url:this.url});return this.customLayerParameters&&(l.customLayerParameters=this.customLayerParameters),this.customParameters&&(l.customParameters=this.customParameters),new g.default({fullExtent:i,urlTemplate:t,tileInfo:r,wmtsInfo:l})}async fetchTile(e,t,r,i={}){let{signal:l}=i,a=this.getTileUrl(e,t,r,i.tileMatrixSetId),{data:o}=await(0,s.A)(a,{responseType:"image",signal:l});return o}async fetchImageBitmapTile(e,t,r,i={}){let{signal:l}=i;if(this.fetchTile!==ne.prototype.fetchTile){let l=await this.fetchTile(e,t,r,i);return(0,I.Cp)(l,e,t,r,i)}let a=this.getTileUrl(e,t,r,i.tileMatrixSetId),{data:o}=await(0,s.A)(a,{responseType:"blob",signal:l});return(0,I.Cp)(o,e,t,r,i)}findSublayerById(e){return this.sublayers?.find(t=>t.id===e)}getTileUrl(e,t,r,i=this.activeLayer.tileMatrixSetId){let l=this._getTileMatrixSetById(i)?.tileInfo?.lods[e],s=l?l.levelValue||`${l.level}`:`${e}`,a=this.resourceInfo?"":function(e,t,r,i,l,s,a,o){let n=function(e,t,r){let i=X(e,t),l=i?.filter(e=>e.format===r);return(l?.length?l:i)??[]}(e,t,i);if(!(n?.length>0))return"";let{dimensionMap:u}=e,p=u.get(t).dimensions?.[0],d=u.get(t).dimensions2?.[0];return n[a%n.length].template.replaceAll(/\{Style\}/gi,l??"").replaceAll(/\{TileMatrixSet\}/gi,r??"").replaceAll(/\{TileMatrix\}/gi,s).replaceAll(/\{TileRow\}/gi,""+a).replaceAll(/\{TileCol\}/gi,""+o).replaceAll(/\{dimensionValue\}/gi,p).replaceAll(/\{dimensionValue2\}/gi,d)}({dimensionMap:this.dimensionMap,layerMap:this.layerMap},this.activeLayer.id,i,this.activeLayer.imageFormat,this.activeLayer.styleId,s,t,r);return a||=this.getUrlTemplate(this.activeLayer.id,i,this.activeLayer.imageFormat,this.activeLayer.styleId).replaceAll(/\{level\}/gi,s).replaceAll(/\{row\}/gi,`${t}`).replaceAll(/\{col\}/gi,`${r}`),a=this._appendCustomLayerParameters(a),a}updateFrom(e){let{tileMatrixSet:t}=e;t&&(this.activeLayer.tileMatrixSetId=t.id,this.fullExtent=t.fullExtent?.clone()??null)}getUrlTemplate(e,t,r,i){if(!this.resourceInfo){let r=function(e,t,r,i){let{dimensionMap:l}=e,s=X(e,t),a="";if(s&&s.length>0){let e=l.get(t).dimensions?.[0],o=l.get(t).dimensions2?.[0];a=s[0].template,a.endsWith(".xxx")&&(a=a.slice(0,-4)),a=a.replaceAll(/\{Style\}/gi,i),a=a.replaceAll(/\{TileMatrixSet\}/gi,r),a=a.replaceAll(/\{TileMatrix\}/gi,"{level}"),a=a.replaceAll(/\{TileRow\}/gi,"{row}"),a=a.replaceAll(/\{TileCol\}/gi,"{col}"),a=a.replaceAll(/\{dimensionValue\}/gi,e),a=a.replaceAll(/\{dimensionValue2\}/gi,o)}return a}({dimensionMap:this.dimensionMap,layerMap:this.layerMap},e,t,i);if(r)return r}if("KVP"===this.serviceMode)return this.url+"?SERVICE=WMTS&VERSION="+this.version+"&REQUEST=GetTile&LAYER="+e+"&STYLE="+i+"&FORMAT="+r+"&TILEMATRIXSET="+t+"&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}";if("RESTful"===this.serviceMode){let l="",s=r.toLowerCase();return pe[s]&&(l=pe[s]),this.url+e+"/"+i+"/"+t+"/{level}/{row}/{col}"+l}return""}async _fetchService(e){if(this.resourceInfo)return"KVP"===this.resourceInfo.serviceMode&&!this.url.includes("?")&&(this.url+="?"),function(e){for(let t of e.layers)for(let e of t.tileMatrixSets??[]){let{tileInfo:t}=e;if(t&&96!==t.dpi){for(let r of t.lods??[])r.scale=96*r.scale/t.dpi,r.resolution=oe(t.spatialReference?.wkid,r.scale*W/96,e.id);t.dpi=96}}}(this.resourceInfo),void this.read(this.resourceInfo,{origin:"service"});let t=null;try{let{data:r}=await this._getCapabilities(this.serviceMode,e);t=K(r),B(t)}catch{let r="KVP"===this.serviceMode?"RESTful":"KVP";try{let{data:i}=await this._getCapabilities(r,e);t=K(i),B(t),this.serviceMode=r}catch(e){throw new n.A("wmtslayer:unsupported-service-data","Services does not support RESTful or KVP service modes.",{error:e})}}let{serviceMode:r,url:i}=this,l=function(e,t){let r=e.documentElement,i=new Map,l=new Map,s=H("Contents",r);if(!s)throw new n.A("wmtslayer:wmts-capabilities-xml-is-not-valid","Can't retrieve xml capabilities element");let a,o,u=(H("OperationsMetadata",r)?.querySelector("[name='GetTile']"))?.getElementsByTagName("Get"),p=u&&Array.prototype.slice.call(u),d=t.url?.indexOf("https"),c=void 0!==d&&d>-1,m=t.serviceMode,h=t?.url;p?.length&&p.some(e=>{let t=H("Constraint",e);return!t||z("AllowedValues","Value",m,t)?(h=e.attributes[0].nodeValue,!0):(!t||z("AllowedValues","Value","RESTful",t)||z("AllowedValues","Value","REST",t)?o=e.attributes[0].nodeValue:(!t||z("AllowedValues","Value","KVP",t))&&(a=e.attributes[0].nodeValue),!1)}),h||(o?(h=o,m="RESTful"):a?(h=a,m="KVP"):h=H("ServiceMetadataURL",r)?.getAttribute("xlink:href"));let y=h.indexOf("1.0.0/");-1===y&&"RESTful"===m?h+="/":y>-1&&(h=h.slice(0,y)),"KVP"===m&&(h+=y>-1?"":"?"),c&&(h=h.replace(/^http:/i,"https:"));let f=G("ServiceIdentification>ServiceTypeVersion",r),g=G("ServiceIdentification>AccessConstraints",r),w=g&&/^none$/i.test(g)?null:g,x=J("Layer",s),v=J("TileMatrixSet",s);return{copyright:w,dimensionMap:l,layerMap:i,layers:x.map(e=>{let t=G("Identifier",e);return i.set(t,e),Q(t,e,v,c,f)}),serviceMode:m,tileUrl:h}}(t,{serviceMode:r,url:i});this.read(l,{origin:"service"})}async _getCapabilities(e,t){let r=this._getCapabilitiesUrl(e);return await(0,s.A)(r,{...t,responseType:"text"})}_getTileMatrixSetById(e){return this.findSublayerById(this.activeLayer.id)?.tileMatrixSets?.find(({id:t})=>t===e)}_appendCustomParameters(e){return this._appendParameters(e,this.customParameters)}_appendCustomLayerParameters(e){return this._appendParameters(e,{...(0,u.o8)(this.customParameters),...this.customLayerParameters})}_appendParameters(e,t){let r=(0,m.An)(e),i={...r.query,...t},l=(0,m.x0)(i);return""===l?r.path:`${r.path}?${l}`}_getCapabilitiesUrl(e){this.url=(0,m.An)(this.url).path;let t=this.url;switch(e){case"KVP":t+=`?request=GetCapabilities&service=WMTS&version=${this.version}`;break;case"RESTful":{let e=`/${this.version}/WMTSCapabilities.xml`,r=new RegExp(e,"i");t=t.replace(r,""),t+=e;break}}return this._appendCustomParameters(t)}_getLowerCasedUrlParams(e){if(!e)return null;let t=(0,m.An)(e).query;if(!t)return null;let r={};return Object.keys(t).forEach(e=>{r[e.toLowerCase()]=t[e]}),r}_mergeParams(e,t){let r=this._getLowerCasedUrlParams(t);if(r){let t=Object.keys(r);t.length&&(e=e?(0,u.o8)(e):{},t.forEach(t=>{!e.hasOwnProperty(t)&&!de.has(t)&&(e[t]=r[t])}))}return e}};(0,l.Cg)([(0,h.MZ)()],ce.prototype,"dimensionMap",void 0),(0,l.Cg)([(0,h.MZ)()],ce.prototype,"layerMap",void 0),(0,l.Cg)([(0,h.MZ)({type:V,json:{origins:{"web-document":{write:{ignoreOrigin:!0}}}}})],ce.prototype,"activeLayer",void 0),(0,l.Cg)([(0,Z.w)("service","activeLayer",["layers"])],ce.prototype,"readActiveLayerFromService",null),(0,l.Cg)([(0,Z.w)(["web-document","portal-item"],"activeLayer",["wmtsInfo"])],ce.prototype,"readActiveLayerFromItemOrWebDoc",null),(0,l.Cg)([(0,ue.K)(["web-document","portal-item"],"activeLayer",{templateUrl:{type:String},tileInfo:{type:S.A},"wmtsInfo.layerIdentifier":{type:String},"wmtsInfo.tileMatrixSet":{type:String}})],ce.prototype,"writeActiveLayer",null),(0,l.Cg)([(0,h.MZ)({type:String,value:"",json:{write:!0}})],ce.prototype,"copyright",void 0),(0,l.Cg)([(0,h.MZ)({type:["show","hide"]})],ce.prototype,"listMode",void 0),(0,l.Cg)([(0,h.MZ)({json:{read:!0,write:!0}})],ce.prototype,"blendMode",void 0),(0,l.Cg)([(0,h.MZ)({json:{origins:{"web-document":{read:{source:["wmtsInfo.customParameters","wmtsInfo.url"]},write:{target:"wmtsInfo.customParameters"}},"portal-item":{read:{source:["wmtsInfo.customParameters","wmtsInfo.url"]},write:{target:"wmtsInfo.customParameters"}}}}})],ce.prototype,"customParameters",void 0),(0,l.Cg)([(0,Z.w)(["portal-item","web-document"],"customParameters")],ce.prototype,"readCustomParameters",null),(0,l.Cg)([(0,h.MZ)({json:{origins:{"web-document":{read:{source:"wmtsInfo.customLayerParameters"},write:{target:"wmtsInfo.customLayerParameters"}},"portal-item":{read:{source:"wmtsInfo.customLayerParameters"},write:{target:"wmtsInfo.customLayerParameters"}}}}})],ce.prototype,"customLayerParameters",void 0),(0,l.Cg)([(0,h.MZ)({type:y.A,json:{write:{ignoreOrigin:!0},origins:{"web-document":{read:{source:"fullExtent"}},"portal-item":{read:{source:"fullExtent"}}}}})],ce.prototype,"fullExtent",null),(0,l.Cg)([(0,h.MZ)({readOnly:!0})],ce.prototype,"fullExtents",null),(0,l.Cg)([(0,h.MZ)({type:["WebTiledLayer"]})],ce.prototype,"operationalLayerType",void 0),(0,l.Cg)([(0,h.MZ)()],ce.prototype,"resourceInfo",void 0),(0,l.Cg)([(0,h.MZ)()],ce.prototype,"serviceMode",void 0),(0,l.Cg)([(0,Z.w)(["portal-item","web-document"],"serviceMode",["templateUrl"])],ce.prototype,"readServiceMode",null),(0,l.Cg)([(0,h.MZ)({type:o.A.ofType(V)})],ce.prototype,"sublayers",void 0),(0,l.Cg)([(0,Z.w)("service","sublayers",["layers"])],ce.prototype,"readSublayersFromService",null),(0,l.Cg)([(0,h.MZ)({readOnly:!0})],ce.prototype,"supportedSpatialReferences",null),(0,l.Cg)([(0,h.MZ)({readOnly:!0})],ce.prototype,"tilemapCache",null),(0,l.Cg)([(0,h.MZ)({json:{read:{source:"title"}}})],ce.prototype,"title",null),(0,l.Cg)([(0,h.MZ)({json:{read:!1},readOnly:!0,value:"wmts"})],ce.prototype,"type",void 0),(0,l.Cg)([(0,h.MZ)({json:{origins:{service:{read:{source:"tileUrl"}},"web-document":{read:{source:"wmtsInfo.url"},write:{target:"wmtsInfo.url"}},"portal-item":{read:{source:"wmtsInfo.url"},write:{target:"wmtsInfo.url"}}}}})],ce.prototype,"url",null),(0,l.Cg)([(0,h.MZ)()],ce.prototype,"version",void 0),ce=ne=(0,l.Cg)([(0,h.$K)("esri.layers.WMTSLayer")],ce);const me=ce},38458(e,t,r){r.d(t,{m:()=>l});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 l(e){return null!=e&&i.some(([t,r])=>e>=t&&e<=r)}},13043(e,t,r){function i(e,t){if(e&&t)for(let r of e.children)if(r.localName in t){let e=t[r.localName];if("function"==typeof e){let t=e(r);t&&i(r,t)}else i(r,e)}}function*l(e,t){for(let r of e.children)if(r.localName in t){let e=t[r.localName];"function"==typeof e?yield e(r):yield*l(r,e)}}r.d(t,{i:()=>l,p:()=>i})},65509(e,t,r){r.d(t,{A:()=>s});var i=r(49186),l=r(17676);class s{constructor(e,t=0,r=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=r,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(r)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,r){let i=this.tileInfo?.lodAt(e);return!i||e<this.minLOD||e>this.maxLOD?"unavailable":i.cols&&i.rows?r>=i.cols[0]&&r<=i.cols[1]&&t>=i.rows[0]&&t<=i.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,r,s){await(0,l.NO)(s);let a=this.getAvailability(e,t,r);if("unavailable"===a)throw new i.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:r});return a}async fetchAvailabilityUpsample(e,t,r,i,s){await(0,l.NO)(s),i.level=e,i.row=t,i.col=r;let a=this.tileInfo;return a.updateTileInfo(i),this.fetchAvailability(e,t,r,s).catch(e=>{if((0,l.zf)(e))throw e;if(a.upsampleTile(i))return this.fetchAvailabilityUpsample(i.level,i.row,i.col,i,s);throw e})}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2491],{11006(e,t,n){function i(e,t,n,i,o){r(e,t,n||0,i||e.length-1,o||s)}function r(e,t,n,i,s){for(;i>n;){if(i-n>600){var l=i-n+1,a=t-n+1,u=Math.log(l),h=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*h*(l-h)/l)*(a-l/2<0?-1:1);r(e,t,Math.max(n,Math.floor(t-a*h/l+c)),Math.min(i,Math.floor(t+(l-a)*h/l+c)),s)}var d=e[t],p=n,m=i;for(o(e,n,t),s(e[i],d)>0&&o(e,n,i);p<m;){for(o(e,p,m),p++,m--;s(e[p],d)<0;)p++;for(;s(e[m],d)>0;)m--}0===s(e[n],d)?o(e,n,m):o(e,++m,i),m<=t&&(n=m+1),t<=m&&(i=m-1)}}function o(e,t,n){var i=e[t];e[t]=e[n],e[n]=i}function s(e,t){return e<t?-1:+(e>t)}n.d(t,{q:()=>i})},40876(e,t,n){n.d(t,{Eq:()=>p,G1:()=>f,Q6:()=>_,TS:()=>o,V6:()=>r,Vm:()=>m,ay:()=>a,c1:()=>g,c4:()=>s,j5:()=>u,lT:()=>c,oW:()=>h,xV:()=>v});const i={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function r(e){return!!i[e]||!!i[e.toLowerCase()]}function o(e){return i[e]??i[e.toLowerCase()]}function s(e){return[...o(e)]}function l(e,t,n){n<0&&++n,n>1&&--n;let i=6*n;return i<1?e+(t-e)*i:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function a(e,t,n,i=1){let r=(e%360+360)%360/360,o=n<=.5?n*(t+1):n+t-n*t,s=2*n-o;return[Math.round(255*l(s,o,r+1/3)),Math.round(255*l(s,o,r)),Math.round(255*l(s,o,r-1/3)),i]}function u(e){let t=e.length>5,n=t?8:4,i=(1<<n)-1,r=t?1:17,o=t?9===e.length:5===e.length,s=Number("0x"+e.slice(1));if(isNaN(s))return null;let l,a=[0,0,0,1];return o&&(l=s&i,s>>=n,a[3]=r*l/255),l=s&i,s>>=n,a[2]=r*l,l=s&i,s>>=n,a[1]=r*l,l=s&i,s>>=n,a[0]=r*l,a}function h(e){if(!e.startsWith("#")||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{let t=parseInt(e.slice(1,2),16),n=parseInt(e.slice(2,3),16),i=parseInt(e.slice(3,4),16),r=4===e.length?15:parseInt(e.slice(4),16);return[t+16*t,n+16*n,i+16*i,(r+16*r)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function c(e){let t=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){let e=t[2].split(/\s*,\s*/),n=t[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){if(e[0].endsWith("%")){let t=e.map(e=>2.56*parseFloat(e));return 4===e.length&&(t[3]=parseFloat(e[3])),d(t)}return d(e.map(e=>parseFloat(e)))}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return a(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]??"1"))}return null}function d(e){return e[0]=g(e[0]),e[1]=g(e[1]),e[2]=g(e[2]),e[3]=4===e.length?f(e[3]):1,e}function p(e){let t=r(e)?o(e):null;return t??=c(e),t??=h(e),t}function m(e){let t=p(e);return null==t?null:[t[0]/255,t[1]/255,t[2]/255,t[3]]}function f(e){return y(e,0,1)}function g(e){return Math.round(y(e,0,255))}function y(e,t,n){return e=Number(e),isNaN(e)?n:e<t?t:e>n?n:e}const x=1/2.2;function _(e){return e**2.2}function v(e){return e**x}n.d(t,["iw",0,x])},62885(e,t,n){n.d(t,{H:()=>o,V:()=>r});var i=n(7762);function r(e,t,n=i.A){return t||=new n,t===e||t.destroyed||(t.removeAll(),(r=e)&&(Array.isArray(r)||"items"in r&&Array.isArray(r.items))?t.addMany(e):e&&t.add(e)),t;var r}function o(e){return e}},21287(e,t,n){n.d(t,{M5:()=>c,eV:()=>h});var i=n(56507),r=n(49186),o=n(17676),s=n(84952),l=n(26306);let a=null,u=!0;function h(e,t,n,i){if(!t||!n)throw Error("Cannot construct image data without dimensions");if(u)try{return new ImageData(e,t,n)}catch{u=!1}let r=function(e,t,n){return n||=(a||(a=document.createElement("canvas"),a.width=1,a.height=1),a),n.getContext("2d").createImageData(e,t)}(t,n,i);return r.data.set(e,0),r}async function c(e,t){let{arrayBuffer:a,mediaType:u}=await async function(e,t){let n=(0,s.r$)(e);if(n?.isBase64)return{arrayBuffer:(0,l.M)(n.data),mediaType:n.mediaType};let r=await(0,i.A)(e,{responseType:"array-buffer",...t});return{arrayBuffer:r.data,mediaType:r.getHeader?.("Content-Type")??""}}(e,t),h="image/png"===u;if("image/gif"===u){let{isAnimatedGIF:e,parseGif:i}=await n.e(820).then(()=>n(10820));if(e(a))return i(a,t)}if(h){let{isAnimatedPNG:e,parseApng:i}=await n.e(2390).then(()=>n(22390));if(e(a))return i(a,t)}return async function(e,t){let n=window.URL.createObjectURL(e);try{let{data:e}=await(0,i.A)(n,{...t,responseType:"image"});return e}catch(e){throw(0,o.zf)(e)?e:new r.A("invalid-image",`Could not fetch requested image at ${n}`)}finally{window.URL.revokeObjectURL(n)}}(new Blob([a],{type:u}),t)}},48163(e,t,n){function i(){return[0,0]}function r(e){return[e[0],e[1]]}function o(e,t){return[e,t]}function s(){return o(1,1)}function l(){return o(-1,-1)}function a(){return o(1,0)}function u(){return o(0,1)}n.d(t,{fA:()=>o,o8:()=>r,vt:()=>i});const h=s(),c=l(),d=a(),p=u();Object.freeze(Object.defineProperty({__proto__:null,NEGATIVE_ONES:c,ONES:h,UNIT_X:d,UNIT_Y:p,ZEROS:[0,0],clone:r,create:i,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){let n=Math.min(2,e.length);for(let i=0;i<n;++i)t[i]=e[i];return t},fromValues:o,negativeOnes:l,ones:s,unitX:a,unitY:u,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"})),n.d(t,["IA",0,c,"Un",0,h])},35522(e,t,n){n.d(t,{$A:()=>I,Bw:()=>o,C:()=>s,Cc:()=>C,DI:()=>M,Io:()=>x,Ln:()=>y,Om:()=>P,Qr:()=>c,Re:()=>u,S8:()=>b,T9:()=>f,WQ:()=>a,Z0:()=>A,_S:()=>p,aI:()=>E,ei:()=>R,fw:()=>O,gL:()=>S,hG:()=>_,hZ:()=>l,hs:()=>g,jk:()=>m,lw:()=>h,m3:()=>v,oW:()=>Z,t2:()=>T,tn:()=>d,ze:()=>w});var i=n(51850),r=n(34304);function o(e){let t=e[0],n=e[1],i=e[2];return Math.sqrt(t*t+n*n+i*i)}function s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function l(e,t,n,i){return e[0]=t,e[1]=n,e[2]=i,e}function a(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function u(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function h(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}function c(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}function d(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function p(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function m(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e}function f(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e}function g(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function y(e,t,n,i){return e[0]=t[0]+n[0]*i,e[1]=t[1]+n[1]*i,e[2]=t[2]+n[2]*i,e}function x(e,t){let n=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2];return Math.sqrt(n*n+i*i+r*r)}function _(e,t){let n=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2];return n*n+i*i+r*r}function v(e){let t=e[0],n=e[1],i=e[2];return t*t+n*n+i*i}function w(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function M(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function b(e,t=e){let n=t[0],i=t[1],r=t[2],o=n*n+i*i+r*r;return o>0&&(o=1/Math.sqrt(o),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o),e}function P(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function I(e,t,n){let i=t[0],r=t[1],o=t[2],s=n[0],l=n[1],a=n[2];return e[0]=r*a-o*l,e[1]=o*s-i*a,e[2]=i*l-r*s,e}function C(e,t,n,i){let r=t[0],o=t[1],s=t[2];return e[0]=r+i*(n[0]-r),e[1]=o+i*(n[1]-o),e[2]=s+i*(n[2]-s),e}function A(e,t,n){let i=t[0],r=t[1],o=t[2];return e[0]=n[0]*i+n[4]*r+n[8]*o+n[12],e[1]=n[1]*i+n[5]*r+n[9]*o+n[13],e[2]=n[2]*i+n[6]*r+n[10]*o+n[14],e}function R(e,t,n){let i=t[0],r=t[1],o=t[2];return e[0]=i*n[0]+r*n[3]+o*n[6],e[1]=i*n[1]+r*n[4]+o*n[7],e[2]=i*n[2]+r*n[5]+o*n[8],e}function S(e,t,n){return O(e,t,n[0],n[1],n[2],n[3])}function O(e,t,n,i,r,o){let s=t[0],l=t[1],a=t[2],u=i*a-r*l,h=r*s-n*a,c=n*l-i*s,d=i*c-r*h,p=r*u-n*c,m=n*h-i*u,f=2*o;return e[0]=s+u*f+2*d,e[1]=l+h*f+2*p,e[2]=a+c*f+2*m,e}const L=(0,i.vt)(),B=(0,i.vt)();function T(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function E(e,t){if(e===t)return!0;let n=e[0],i=e[1],o=e[2],s=t[0],l=t[1],a=t[2],u=(0,r.FD)();return Math.abs(n-s)<=u*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-l)<=u*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(o-a)<=u*Math.max(1,Math.abs(o),Math.abs(a))}function Z(e,t,n){let i=n[0]-t[0],r=n[1]-t[1],o=n[2]-t[2],s=i*i+r*r+o*o;return s>0?(s=1/Math.sqrt(s),e[0]=i*s,e[1]=r*s,e[2]=o*s,e):(e[0]=0,e[1]=0,e[2]=0,e)}const k=u,j=h,N=c,X=x,Y=_,H=o,U=v;Object.freeze(Object.defineProperty({__proto__:null,abs:d,add:a,angle:function(e,t){b(L,e),b(B,t);let n=P(L,B);return n>1?0:n<-1?Math.PI:Math.acos(n)},bezier:function(e,t,n,i,r,o){let s=1-o,l=s*s,a=o*o,u=l*s,h=3*o*l,c=3*a*s,d=a*o;return e[0]=t[0]*u+n[0]*h+i[0]*c+r[0]*d,e[1]=t[1]*u+n[1]*h+i[1]*c+r[1]*d,e[2]=t[2]*u+n[2]*h+i[2]*c+r[2]*d,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},clamp:function(e,t=0,n=1){return e[0]=Math.min(Math.max(e[0],t),n),e[1]=Math.min(Math.max(e[1],t),n),e[2]=Math.min(Math.max(e[2],t),n),e},copy:s,cross:I,crossAndNormalize:function(e,t,n){let i=t[0],r=t[1],o=t[2],s=n[0],l=n[1],a=n[2],u=r*a-o*l,h=o*s-i*a,c=i*l-r*s,d=Math.sqrt(u*u+h*h+c*c);return e[0]=u/d,e[1]=h/d,e[2]=c/d,e},direction:Z,dist:X,distance:x,div:N,divide:c,dot:P,equals:E,exactEquals:T,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,n,i,r,o){let s=o*o,l=s*(2*o-3)+1,a=s*(o-2)+o,u=s*(o-1),h=s*(3-2*o);return e[0]=t[0]*l+n[0]*a+i[0]*u+r[0]*h,e[1]=t[1]*l+n[1]*a+i[1]*u+r[1]*h,e[2]=t[2]*l+n[2]*a+i[2]*u+r[2]*h,e},inverse:M,len:H,length:o,lerp:C,max:f,min:m,mul:j,multiply:h,negate:w,normalize:b,random:function(e,t=1){let n=r.Ov,i=2*n()*Math.PI,o=2*n()-1,s=Math.sqrt(1-o*o)*t;return e[0]=Math.cos(i)*s,e[1]=Math.sin(i)*s,e[2]=o*t,e},rotateX:function(e,t,n,i){let r=[],o=[];return r[0]=t[0]-n[0],r[1]=t[1]-n[1],r[2]=t[2]-n[2],o[0]=r[0],o[1]=r[1]*Math.cos(i)-r[2]*Math.sin(i),o[2]=r[1]*Math.sin(i)+r[2]*Math.cos(i),e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e},rotateY:function(e,t,n,i){let r=[],o=[];return r[0]=t[0]-n[0],r[1]=t[1]-n[1],r[2]=t[2]-n[2],o[0]=r[2]*Math.sin(i)+r[0]*Math.cos(i),o[1]=r[1],o[2]=r[2]*Math.cos(i)-r[0]*Math.sin(i),e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e},rotateZ:function(e,t,n,i){let r=[],o=[];return r[0]=t[0]-n[0],r[1]=t[1]-n[1],r[2]=t[2]-n[2],o[0]=r[0]*Math.cos(i)-r[1]*Math.sin(i),o[1]=r[0]*Math.sin(i)+r[1]*Math.cos(i),o[2]=r[2],e[0]=o[0]+n[0],e[1]=o[1]+n[1],e[2]=o[2]+n[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:g,scaleAndAdd:y,scaleTo:function(e,t){return g(e,e,t/H(e))},set:l,sign:p,sqrDist:Y,sqrLen:U,squaredDistance:_,squaredLength:v,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:k,subtract:u,transformMat3:R,transformMat4:A,transformMat4Z:function(e,t){return t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]},transformQuat:S,transformQuatValues:O},Symbol.toStringTag,{value:"Module"})),n.d(t,["Il",0,H,"jb",0,k,"lo",0,Y,"uE",0,U])},75503(e,t,n){n.d(t,{wq:()=>l});var i=n(4576),r=n(21818),o=(n(44208),n(15142)),s=n(11006);class l{constructor(e=9,t){this._compareMinX=d,this._compareMinY=p,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),w.prune(),M.prune(),b.prune(),P.prune()}all(e){a(this._data,e)}search(e,t){let n=this._data,i=this._toBBox;if(_(e,n))for(w.clear();n;){for(let r=0,o=n.children.length;r<o;r++){let o=n.children[r],s=n.leaf?i(o):o;_(e,s)&&(n.leaf?t(o):x(e,s)?a(o,t):w.push(o))}n=w.pop()}}collides(e){let t=this._data,n=this._toBBox;if(!_(e,t))return!1;for(w.clear();t;){for(let i=0,r=t.children.length;i<r;i++){let r=t.children[i],o=t.leaf?n(r):r;if(_(e,o)){if(t.leaf||x(e,o))return!0;w.push(r)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){let e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new A([]),this}remove(e){if(!e)return this;let t,n=this._data,o=null,s=0,l=!1,a=this._toBBox(e);for(b.clear(),P.clear();n||b.length>0;){if(n||(n=b.pop(),o=b.data[b.length-1],s=P.pop()??0,l=!0),n.leaf&&(t=(0,i.qh)(n.children,(0,r.z)(e),n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),b.push(n),this._condense(b),this;l||n.leaf||!x(n,a)?o?(s++,n=o.children[s],l=!1):n=null:(b.push(n),P.push(s),s=0,o=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,i){let r=n-t+1,o=this._maxEntries;if(r<=o){let i=new A(e.slice(t,n+1));return u(i,this._toBBox),i}i||(i=Math.ceil(Math.log(r)/Math.log(o)),o=Math.ceil(r/o**(i-1)));let s=new R([]);s.height=i;let l=Math.ceil(r/o),a=l*Math.ceil(Math.sqrt(o));v(e,t,n,a,this._compareMinX);for(let r=t;r<=n;r+=a){let t=Math.min(r+a-1,n);v(e,r,t,l,this._compareMinY);for(let n=r;n<=t;n+=l){let r=Math.min(n+l-1,t);s.children.push(this._build(e,n,r,i-1))}}return u(s,this._toBBox),s}_insert(e,t,n){let i=this._toBBox,r=n?e:i(e);b.clear();let o=function(e,t,n,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==n;){let n,i=1/0,r=1/0;for(let o=0,s=t.children.length;o<s;o++){let s=t.children[o],l=m(s),a=g(e,s)-l;a<r?(r=a,i=l<i?l:i,n=s):a===r&&l<i&&(i=l,n=s)}t=n||t.children[0]}return t}(r,this._data,t,b);for(o.children.push(e),c(o,r);t>=0&&b.data[t].children.length>this._maxEntries;)this._split(b,t),t--;!function(e,t,n){for(let i=n;i>=0;i--)c(t.data[i],e)}(r,b,t)}_split(e,t){let n=e.data[t],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);let o=this._chooseSplitIndex(n,r,i);if(!o)return;let s=n.children.splice(o,n.children.length-o),l=n.leaf?new A(s):new R(s);l.height=n.height,u(n,this._toBBox),u(l,this._toBBox),t?e.data[t-1].children.push(l):this._splitRoot(n,l)}_splitRoot(e,t){this._data=new R([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let i,r,o;i=r=1/0;for(let s=t;s<=n-t;s++){let t=h(e,0,s,this._toBBox),l=h(e,s,n,this._toBBox),a=y(t,l),u=m(t)+m(l);a<i?(i=a,o=s,r=u<r?u:r):a===i&&u<r&&(r=u,o=s)}return o}_chooseSplitAxis(e,t,n){let i=e.leaf?this._compareMinX:d,r=e.leaf?this._compareMinY:p;this._allDistMargin(e,t,n,i)<this._allDistMargin(e,t,n,r)&&e.children.sort(i)}_allDistMargin(e,t,n,i){e.children.sort(i);let r=this._toBBox,o=h(e,0,t,r),s=h(e,n-t,n,r),l=f(o)+f(s);for(let i=t;i<n-t;i++){let t=e.children[i];c(o,e.leaf?r(t):t),l+=f(o)}for(let i=n-t-1;i>=t;i--){let t=e.children[i];c(s,e.leaf?r(t):t),l+=f(s)}return l}_condense(e){for(let t=e.length-1;t>=0;t--){let n=e.data[t];if(0===n.children.length)if(t>0){let r=e.data[t-1],o=r.children;o.splice((0,i.qh)(o,n,o.length,r.indexHint),1)}else this.clear();else u(n,this._toBBox)}}_initFormat(e){let t=["return a"," - b",";"];this._compareMinX=Function("a","b",t.join(e[0])),this._compareMinY=Function("a","b",t.join(e[1])),this._toBBox=Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){let n=e;for(M.clear();n;){if(!0===n.leaf)for(let e of n.children)t((0,r.z)(e));else M.pushArray(n.children);n=M.pop()??null}}function u(e,t){h(e,0,e.children.length,t,e)}function h(e,t,n,i,r){r||=new A([]),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let o,s=t;s<n;s++)o=e.children[s],c(r,e.leaf?i(o):o);return r}function c(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function p(e,t){return e.minY-t.minY}function m(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function g(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){let n=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,r-n)*Math.max(0,o-i)}function x(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,n,i,r){let o=[t,n];for(;o.length;){let t=o.pop(),n=o.pop();if(t-n<=i)continue;let l=n+Math.ceil((t-n)/i/2)*i;(0,s.q)(e,l,n,t,r),o.push(n,l,l,t)}}const w=new o.A,M=new o.A,b=new o.A,P=new o.A({deallocator:void 0});class I{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class C extends I{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class A extends C{constructor(e){super(),this.children=e,this.leaf=!0}}class R extends C{constructor(e){super(),this.children=e,this.leaf=!1}}},16494(e,t,n){var i=n(76361);const r=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup",..."animate.animatetransform.circle.clippath.defs.ellipse.g.image.line.lineargradient.marker.mask.path.pattern.polygon.polyline.radialgradient.rect.stop.svg.switch.symbol.text.textpath.tspan.use".split(".")].reduce((e,t)=>(e[t]=[],e),{}),o="align.alink.alt.bgcolor.border.cellpadding.cellspacing.class.color.cols.colspan.coords.d.dir.face.height.hspace.ismap.lang.marginheight.marginwidth.multiple.nohref.noresize.noshade.nowrap.ref.rel.rev.rows.rowspan.scrolling.shape.span.summary.tabindex.title.usemap.valign.value.vlink.vspace.width".split("."),s=new i.I({whiteList:r,onTagAttr:(e,t,n)=>{let i=`${t}="${n}"`;if(o.includes(t))return i},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),l=new i.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1);n.d(t,["Nd",0,l,"W5",0,s])},90629(e,t,n){n.d(t,{Lz:()=>s,PN:()=>l,cr:()=>a,gs:()=>h,r_:()=>c,tc:()=>u}),n(39829);const i=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,r=l(1),o=s(1);function s(e){return e?e/72*96:0}function l(e){return e?72*e/96:0}function a(e){if("string"==typeof e){let t=e.match(i);if(t){let n=Number(t[1]),i=t[3]&&t[3].toLowerCase(),r=e.startsWith("-"),o="px"===i?l(n):n;return r?-o:o}return console.warn("screenUtils.toPt: input not recognized!"),null}return e}function u(e=0,t=0){return{x:e,y:t}}function h(e=0,t=0){return[e,t]}function c(e=0,t=0,n=0){return[e,t,n]}n.d(t,["L7",0,o,"ps",0,r])},80754(e,t,n){n.d(t,{kS:()=>u,kd:()=>a});var i=n(82799),r=n(16930),o=n(60408),s=n(52006);const l={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){if((0,s.Ed)(e))for(let n of function(e){return(0,o.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of n)if((0,s.aO)(e)){let[n,i]=e.c;n[0]+=t,i[0]+=t}else if((0,s.FG)(e)){let[n,i]=e.a;n[0]+=t,i[0]+=t}else if((0,s.n1)(e)){let[n,i,r]=e.b;n[0]+=t,i[0]+=t,r[0]+=t}else e[0]+=t;for(let n of function(e){return(0,o.Bi)(e)?e.rings:e.paths}(e))for(let e of n)e[0]+=t;return e}n.d(t,["j7",0,l])},89056(e,t,n){n.d(t,{b3:()=>c,jZ:()=>h});var i=n(12195),r=n(19419),o=n(537),s=n(95108),l=n(60408),a=n(80754),u=n(21325);function h(e){return d(e,!0)}function c(e){return d(e,!1)}function d(e,t){if(null==e)return null;let n=e.spatialReference,r=(0,u.Vp)(n),s=(0,i.W)(e)?e.toJSON():e;if(!r)return s;let h=(0,u.K8)(n)?102100:4326,c=a.j7[h].maxX,d=a.j7[h].minX;if((0,l.fT)(s))return m(s,c,d);if((0,l.U9)(s))return s.points=s.points.map(e=>m(e,c,d)),s;if((0,l.ZC)(s))return p(s,r);if((0,l.Bi)(s)||(0,l.Rg)(s)){let e=(0,o.Rg)(v,s),n={xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3]},i=(0,a.kd)(n.xmin,d),r=2*c*i,l=0===r?s:(0,a.kS)(s,r);return n.xmin+=r,n.xmax+=r,n.xmax>c?x(l,c,t):n.xmin<d?x(l,d,t):l}return s}function p(e,t){if(!t)return e;let n=function(e,t){let n=[],{ymin:i,ymax:r,xmin:o,xmax:s}=e,l=e.xmax-e.xmin,[a,u]=t.valid,{x:h,frameId:c}=f(e.xmin,t),{x:d,frameId:p}=f(e.xmax,t),m=h===d&&l>0;if(l>2*u){let e={xmin:o<s?h:d,ymin:i,xmax:u,ymax:r},t={xmin:a,ymin:i,xmax:o<s?d:h,ymax:r},l={xmin:0,ymin:i,xmax:u,ymax:r},m={xmin:a,ymin:i,xmax:0,ymax:r},f=[],y=[];g(e,l)&&f.push(c),g(e,m)&&y.push(c),g(t,l)&&f.push(p),g(t,m)&&y.push(p);for(let e=c+1;e<p;e++)f.push(e),y.push(e);n.push(new _(e,[c]),new _(t,[p]),new _(l,f),new _(m,y))}else h>d||m?n.push(new _({xmin:h,ymin:i,xmax:u,ymax:r},[c]),new _({xmin:a,ymin:i,xmax:d,ymax:r},[p])):n.push(new _({xmin:h,ymin:i,xmax:d,ymax:r},[c]));return n}(e,t).map(e=>e.extent);return n.length<2?n[0]||e:n.length>2?(e.xmin=t.valid[0],e.xmax=t.valid[1],e):{rings:n.map(e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]])}}function m(e,t,n){if(Array.isArray(e)){let i=e[0];if(i>t){let n=(0,a.kd)(i,t);e[0]=i+-2*t*n}else if(i<n){let t=(0,a.kd)(i,n);e[0]=i+-2*n*t}}else{let i=e.x;if(i>t){let n=(0,a.kd)(i,t);e.x+=-2*t*n}else if(i<n){let t=(0,a.kd)(i,n);e.x+=-2*n*t}}return e}function f(e,t){let n,[i,r]=t.valid,o=2*r,s=0;return e>r?(n=Math.ceil(Math.abs(e-r)/o),e-=n*o,s=n):e<i&&(n=Math.ceil(Math.abs(e-i)/o),e+=n*o,s=-n),{x:e,frameId:s}}function g(e,t){let{xmin:n,ymin:i,xmax:r,ymax:o}=t;return y(e,n,i)&&y(e,n,o)&&y(e,r,o)&&y(e,r,i)}function y(e,t,n){return t>=e.xmin&&t<=e.xmax&&n>=e.ymin&&n<=e.ymax}function x(e,t,n=!0){let i=!(0,l.Rg)(e);if(i&&(0,s.m3)(e),n)return(new w).cut(e,t);let r=i?e.rings:e.paths,o=i?4:2,a=r.length,u=-2*t;for(let e=0;e<a;e++){let t=r[e];if(t&&t.length>=o){let e=[];for(let[n,...i]of t)e.push([n+u,...i]);r.push(e)}}return i?e.rings=r:e.paths=r,e}class _{constructor(e,t){this.extent=e,this.frameIds=t}}const v=(0,r.vt)();class w{constructor(){this._linesIn=[],this._linesOut=[]}cut(e,t){let n;if(this._xCut=t,e.rings)this._closed=!0,n=e.rings,this._minPts=4;else{if(!e.paths)return null;this._closed=!1,n=e.paths,this._minPts=2}for(let e of n){if(!e||e.length<this._minPts)continue;let t=!0;for(let n of e)t?(this.moveTo(n),t=!1):this.lineTo(n);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),n=[];for(let e of this._linesIn)e&&e.length>=this._minPts&&n.push(e);let i=-2*this._xCut;for(let e of this._linesOut)if(e&&e.length>=this._minPts){for(let t of e)t[0]+=i;n.push(e)}return this._closed?e.rings=n:e.paths=n,e}moveTo(e){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(e[0]),this._moveTo(e,this._prevSide),this._prevPt=e,this._firstPt=e}lineTo(e){let t=this._side(e[0]);if(t*this._prevSide===-1){let n=this._intersect(this._prevPt,e);this._lineTo(n,0),this._prevSide=0,this._lineTo(e,t)}else this._lineTo(e,t);this._prevSide=t,this._prevPt=e}close(){let e=this._firstPt,t=this._prevPt;(e[0]!==t[0]||e[1]!==t[1])&&this.lineTo(e),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(e,t){this._closed?(this._lineIn.push(M(e,t<=0?e[0]:this._xCut)),this._lineOut.push(M(e,t>=0?e[0]:this._xCut))):(t<=0&&this._lineIn.push(e.slice()),t>=0&&this._lineOut.push(e.slice()))}_lineTo(e,t){this._closed?(b(this._lineIn,e,t<=0?e[0]:this._xCut),b(this._lineOut,e,t>=0?e[0]:this._xCut)):t<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push(e.slice())):t>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push(e.slice())):this._prevSide<0?(this._lineIn.push(e.slice()),this._lineOut.push(e.slice())):this._prevSide>0&&(this._lineOut.push(e.slice()),this._lineIn.push(e.slice()))}_checkClosingPt(e){let t=e.length;t>3&&e[0][0]===this._xCut&&e[t-2][0]===this._xCut&&e[1][0]===this._xCut&&(e[0]=e[t-2].slice(),e.pop())}_side(e){return e<this._xCut?-1:+(e>this._xCut)}_intersect(e,t){let n=(this._xCut-e[0])/(t[0]-e[0]),i=[this._xCut,e[1]+n*(t[1]-e[1])],r=Math.min(e.length,t.length);for(let o=2;o<r;o++)i.push(e[o]+n*(t[o]-e[o]));return i}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}function M(e,t){let n=e.slice();return n[0]=t,n}function b(e,t,n){let i=e.length;i>1&&e[i-1][0]===n&&e[i-2][0]===n?e[i-1]=M(t,n):e.push(M(t,n))}},90182(e,t,n){n.r(t),n.d(t,{default:()=>nt});var i=n(32198),r=n(7762),o=n(49186),s=n(53966),l=n(25728),a=n(17676),u=n(91429),h=n(16930),c=n(4146),d=n(63074),p=n(34287),m=n(8303),f=n(25036),g=n(69540),y=n(25482),x=n(77690),_=n(29242),v=n(37585),w=n(35522);const M=(0,n(51850).vt)(),b=(0,_.vt)(),P=(0,_.vt)(),I=(0,_.vt)();function C(e,t,n){return(0,w.hZ)(M,t[0],t[1],1),(0,w.ei)(M,M,(0,x.mg)(b,n)),0===M[2]?(0,v.hZ)(e,M[0],M[1]):(0,v.hZ)(e,M[0]/M[2],M[1]/M[2])}function A(e,t,n){return R(P,t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]),R(I,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),(0,x.lw)(e,(0,x.KC)(P,P),I),0!==e[8]&&(e[0]/=e[8],e[1]/=e[8],e[2]/=e[8],e[3]/=e[8],e[4]/=e[8],e[5]/=e[8],e[6]/=e[8],e[7]/=e[8],e[8]/=e[8]),e}function R(e,t,n,i,r,o,s,l,a){(0,x.hZ)(e,t,i,o,n,r,s,1,1,1),(0,w.hZ)(M,l,a,1),(0,x.KC)(b,e);let[u,h,c]=(0,w.ei)(M,M,(0,x.mg)(b,b));return(0,x.hZ)(b,u,0,0,0,h,0,0,0,c),(0,x.lw)(e,b,e)}var S=n(90629),O=n(48163),L=n(86738),B=n(39829),T=n(99917),E=n(56560);const Z=e=>{let t=e;return class extends t{projectOrWarn(e,t){if(null==e)return e;let{geometry:n,pending:i}=(0,T.projectOrLoad)(e,t);return i?null:i||n?n:(s.A.getLogger(this).warn("geometry could not be projected to the spatial reference",{georeference:this,geometry:e,sourceSpatialReference:e.spatialReference,targetSpatialReference:t}),null)}}};var k=n(36005),j=n(43937);const N=(0,_.vt)(),X=(0,O.vt)();let Y=class extends y.o{};(0,i.Cg)([(0,u.MZ)({type:Number,json:{write:{isRequired:!0}}})],Y.prototype,"x",void 0),(0,i.Cg)([(0,u.MZ)({type:Number,json:{write:{isRequired:!0}}})],Y.prototype,"y",void 0),Y=(0,i.Cg)([(0,u.$K)("esri.layers.support.ControlPointsGeoreference.ControlPointJSONType")],Y);let H=class extends((0,y.T)(Z(g.Pw))){constructor(e){super(e),this.height=0,this.type="control-points",this.width=0}get controlPoints(){return this._get("controlPoints")??null}set controlPoints(e){this._set("controlPoints",e)}readControlPoints(e,t){let n=h.A.fromJSON(t.spatialReference),i=(0,_.fA)(...t.coefficients,1);return e.map(e=>((0,v.hZ)(X,e.x,e.y),C(X,X,i),{sourcePoint:e,mapPoint:new L.A({x:X[0],y:X[1],spatialReference:n})}))}writeControlPoints(e,t,n,i){if(null==this.transform){let e=new o.A("web-document-write:invalid-georeference","Invalid 'controlPoints', 'width', 'height' configuration. Make sure the parent media element is loaded i.e. the ImageElement or VideoElement set as 'MediaLayer.source'.",{layer:i?.layer,georeference:this});i?.messages?i.messages.push(e):s.A.getLogger(this).error(e.name,e.message)}else null!=e&&U(e[0])&&(t.controlPoints=e.map(e=>{let t=e.sourcePoint;return{x:t.x,y:t.y}}),t.spatialReference=e[0].mapPoint.spatialReference.toJSON(),t.coefficients=this.transform.slice(0,8))}get coords(){if(null==this.controlPoints)return null;let e=this._updateTransform(N);if(null==e||!U(this.controlPoints[0]))return null;let t=this.controlPoints[0].mapPoint.spatialReference;return function(e,t,n,i){let r=(0,O.fA)(0,n),o=(0,O.fA)(0,0),s=(0,O.fA)(t,0),l=(0,O.fA)(t,n);return C(r,r,e),C(o,o,e),C(s,s,e),C(l,l,e),new B.A({rings:[[r,o,s,l,r]],spatialReference:i})}(e,this.width,this.height,t)}set coords(e){if(null==this.controlPoints||!U(this.controlPoints[0]))return;let t=this.controlPoints[0].mapPoint.spatialReference;if(null==(e=this.projectOrWarn(e,t)))return;let{width:n,height:i}=this,{rings:[[r,o,s,l]]}=e,a=new E.A({sourcePoint:(0,S.tc)(0,i),mapPoint:new L.A({x:r[0],y:r[1],spatialReference:t})}),u=new E.A({sourcePoint:(0,S.tc)(0,0),mapPoint:new L.A({x:o[0],y:o[1],spatialReference:t})}),h=new E.A({sourcePoint:(0,S.tc)(n,0),mapPoint:new L.A({x:s[0],y:s[1],spatialReference:t})}),c=new E.A({sourcePoint:(0,S.tc)(n,i),mapPoint:new L.A({x:l[0],y:l[1],spatialReference:t})});U(a)&&U(u)&&U(h)&&U(c)&&(Q(N,a,u,h,c),this.controlPoints=this.controlPoints.map(({sourcePoint:e})=>((0,v.hZ)(X,e.x,e.y),C(X,X,N),{sourcePoint:e,mapPoint:new L.A({x:X[0],y:X[1],spatialReference:t})})))}get inverseTransform(){return null==this.transform?null:(0,x.B8)((0,_.vt)(),this.transform)}get transform(){return this._updateTransform()}toMap(e){if(null==e||null==this.transform||null==this.controlPoints||!U(this.controlPoints[0]))return null;(0,v.hZ)(X,e.x,e.y);let t=this.controlPoints[0].mapPoint.spatialReference;return C(X,X,this.transform),new L.A({x:X[0],y:X[1],spatialReference:t})}toSource(e){if(null==e||null==this.inverseTransform||null==this.controlPoints||!U(this.controlPoints[0]))return null;let t=this.controlPoints[0].mapPoint.spatialReference;return e=e.normalize(),null==(e=(0,T.projectOrLoad)(e,t).geometry)?null:((0,v.hZ)(X,e.x,e.y),C(X,X,this.inverseTransform),(0,S.tc)(X[0],X[1]))}toSourceNormalized(e){let t=this.toSource(e);return null!=t&&(t.x/=this.width,t.y/=this.height),t}_updateTransform(e){let{controlPoints:t,width:n,height:i}=this;if(!(null!=t&&n>0&&i>0))return null;let[r,o,s,l]=t;if(!U(r))return null;let a=r.mapPoint.spatialReference,u=this._projectControlPoint(o,a),h=this._projectControlPoint(s,a),c=this._projectControlPoint(l,a);if(!(u.valid&&h.valid&&c.valid&&U(u.controlPoint)))return null;e??=(0,_.vt)();let d=null;return d=U(h.controlPoint)&&U(c.controlPoint)?Q(e,r,u.controlPoint,h.controlPoint,c.controlPoint):U(h.controlPoint)?function(e,t,n,i){return J(q,V,t),J(z,W,n),J($,G,i),(0,v.Cc)(F,q,z,.5),(0,v.e$)(F,$,F,Math.PI),(0,v.Cc)(K,V,W,.5),(0,v.e$)(K,G,K,Math.PI),ie(e,q,z,$,F,V,W,G,K)}(e,r,u.controlPoint,h.controlPoint):function(e,t,n){return J(q,V,t),J(z,W,n),(0,v.e$)($,z,q,D),(0,v.e$)(F,q,z,D),(0,v.e$)(G,W,V,-D),(0,v.e$)(K,V,W,-D),ie(e,q,z,$,F,V,W,G,K)}(e,r,u.controlPoint),d.every(e=>0===e)?null:d}_projectControlPoint(e,t){if(!U(e))return{valid:!0,controlPoint:e};let{sourcePoint:n,mapPoint:i}=e,{geometry:r,pending:o}=(0,T.projectOrLoad)(i,t);return o?{valid:!1,controlPoint:null}:o||r?{valid:!0,controlPoint:new E.A({sourcePoint:n,mapPoint:r})}:(s.A.getLogger(this).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:e,sourceSpatialReference:i.spatialReference,targetSpatialReference:t}),{valid:!1,controlPoint:null})}};function U(e){return null!=e?.sourcePoint&&null!=e.mapPoint}(0,i.Cg)([(0,u.MZ)({type:[E.A],json:{write:{allowNull:!1,isRequired:!0,target:{controlPoints:{type:[Y],isRequired:!0},coefficients:{type:[Number],isRequired:!0},spatialReference:{type:h.A,isRequired:!0}}}}})],H.prototype,"controlPoints",null),(0,i.Cg)([(0,k.w)("controlPoints")],H.prototype,"readControlPoints",null),(0,i.Cg)([(0,j.K)("controlPoints")],H.prototype,"writeControlPoints",null),(0,i.Cg)([(0,u.MZ)({clonable:!1})],H.prototype,"coords",null),(0,i.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],H.prototype,"height",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],H.prototype,"inverseTransform",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],H.prototype,"transform",null),(0,i.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],H.prototype,"width",void 0),H=(0,i.Cg)([(0,u.$K)("esri.layers.support.ControlPointsGeoreference")],H);const q=(0,O.vt)(),z=(0,O.vt)(),$=(0,O.vt)(),F=(0,O.vt)(),V=(0,O.vt)(),W=(0,O.vt)(),G=(0,O.vt)(),K=(0,O.vt)(),D=Math.PI/2;function J(e,t,n){(0,v.hZ)(e,n.sourcePoint.x,n.sourcePoint.y),(0,v.hZ)(t,n.mapPoint.x,n.mapPoint.y)}function Q(e,t,n,i,r){return J(q,V,t),J(z,W,n),J($,G,i),J(F,K,r),ie(e,q,z,$,F,V,W,G,K)}const ee=Array(8).fill(0),te=Array(8).fill(0);function ne(e,t,n,i,r){return e[0]=t[0],e[1]=t[1],e[2]=n[0],e[3]=n[1],e[4]=i[0],e[5]=i[1],e[6]=r[0],e[7]=r[1],e}function ie(e,t,n,i,r,o,s,l,a){return A(e,ne(ee,t,n,i,r),ne(te,o,s,l,a))}var re=n(56507),oe=n(21287),se=n(84952),le=n(13069),ae=n(92474),ue=n(64108);let he=0;const ce=e=>{let t=e,n=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:he++})}};return n=(0,i.Cg)([(0,ue.$)("esri.core.NumericIdentifiable")],n),n};var de=n(35666),pe=n(5443),me=n(21325);const fe=(0,O.vt)();let ge=class extends(Z(g.Pw)){constructor(e){super(e),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:e,topRight:t,bottomLeft:n,bottomRight:i}=this;if(null==e||null==t||null==n||null==i)return null;let r=e.spatialReference;return t=this.projectOrWarn(t,r),n=this.projectOrWarn(n,r),i=this.projectOrWarn(i,r),null==t||null==n||null==i?null:new B.A({rings:[[[n.x,n.y],[e.x,e.y],[t.x,t.y],[i.x,i.y],[n.x,n.y]]],spatialReference:r})}set coords(e){let{topLeft:t}=this;if(null==t)return;let n=t.spatialReference;if(null==(e=this.projectOrWarn(e,n)))return;let{rings:[[i,r,o,s]]}=e;this.bottomLeft=new L.A({x:i[0],y:i[1],spatialReference:n}),this.topLeft=new L.A({x:r[0],y:r[1],spatialReference:n}),this.topRight=new L.A({x:o[0],y:o[1],spatialReference:n}),this.bottomRight=new L.A({x:s[0],y:s[1],spatialReference:n})}toSourceNormalized(e){let{topLeft:t,topRight:n,bottomRight:i,bottomLeft:r}=this;if(null==e||null==t||null==n||null==i||null==r)return null;let o=t.spatialReference;e=e.normalize();let s=(0,T.projectOrLoad)(e,o).geometry;if(null==s)return null;(0,v.hZ)(fe,s.x,s.y);let l=A((0,_.vt)(),[t.x,t.y,r.x,r.y,n.x,n.y,i.x,i.y],[0,0,0,1,1,0,1,1]);return C(fe,fe,l),(0,S.tc)(fe[0],fe[1])}};(0,i.Cg)([(0,u.MZ)({clonable:!1})],ge.prototype,"coords",null),(0,i.Cg)([(0,u.MZ)({type:L.A})],ge.prototype,"bottomLeft",void 0),(0,i.Cg)([(0,u.MZ)({type:L.A})],ge.prototype,"bottomRight",void 0),(0,i.Cg)([(0,u.MZ)({type:L.A})],ge.prototype,"topLeft",void 0),(0,i.Cg)([(0,u.MZ)({type:L.A})],ge.prototype,"topRight",void 0),ge=(0,i.Cg)([(0,u.$K)("esri.layers.support.CornersGeoreference")],ge);const ye=ge;var xe=n(34727),_e=n(34304);let ve=class extends(Z(g.Pw)){constructor(e){super(e),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if(null==this.extent)return null;let e,{xmin:t,ymin:n,xmax:i,ymax:r,spatialReference:o}=this.extent;if(this.rotation){let{x:o,y:s}=this.extent.center,l=we(o,s,this.rotation);e=[l(t,n),l(t,r),l(i,r),l(i,n)],e.push(e[0])}else e=[[t,n],[t,r],[i,r],[i,n],[t,n]];return new B.A({rings:[e],spatialReference:o})}set coords(e){if(null==e||null==this.extent)return;let t=this.extent.spatialReference;if(e=this.projectOrWarn(e,t),null==e?.extent)return;let{rings:[[n,i,r]],extent:{center:{x:o,y:s}}}=e,l=(0,xe.KJ)(Math.PI/2-Math.atan2(i[1]-n[1],i[0]-n[0])),a=we(o,s,-l),[u,h]=a(n[0],n[1]),[c,d]=a(r[0],r[1]);this.extent=new pe.A({xmin:u,ymin:h,xmax:c,ymax:d,spatialReference:t}),this.rotation=l}toSourceNormalized(e){let{extent:t,rotation:n}=this;if(null==e||null==t)return null;let{xmin:i,ymin:r,xmax:o,ymax:s,center:l,spatialReference:a}=t;e=e.normalize();let u=(0,T.projectOrLoad)(e,a).geometry;if(null==u)return null;let h=u.x,c=u.y;return n&&([h,c]=we(l.x,l.y,-n)(h,c)),(0,S.tc)((0,xe.hs)(h,i,o,0,1),(0,xe.hs)(c,s,r,0,1))}};function we(e,t,n){let i=(0,_e.DF)(n),r=Math.cos(i),o=Math.sin(i);return(n,i)=>[r*(n-e)+o*(i-t)+e,r*(i-t)-o*(n-e)+t]}function Me(e,t){let n=(0,de.aB)(t);return function(e){return"media"===e?.type}(e)&&!!e.portalItem&&null!=n&&n>3}function be(e,t,n){return{enabled:!Me(n?.layer,n?.origin),ignoreOrigin:!0}}(0,i.Cg)([(0,u.MZ)({clonable:!1})],ve.prototype,"coords",null),(0,i.Cg)([(0,u.MZ)({type:pe.A})],ve.prototype,"extent",void 0),(0,i.Cg)([(0,u.MZ)({type:Number})],ve.prototype,"rotation",void 0),ve=(0,i.Cg)([(0,u.$K)("esri.layers.support.ExtentAndRotationGeoreference")],ve);const Pe={json:{name:"url",type:String,write:{overridePolicy:be}}},Ie={readOnly:!0,json:{read:!1,write:{target:"mediaType",overridePolicy:be}}},Ce={types:{key:"type",base:null,typeMap:{"control-points":H,corners:ye,"extent-and-rotation":ve}},json:{types:{key:"type",base:null,typeMap:{"control-points":H}},write:{overridePolicy:()=>({enabled:!0,ignoreOrigin:!0})}}};var Ae=n(59923);let Re=class extends(ce((0,l.M)(ae.x_))){constructor(e){super(e),this.georeference=null,this.opacity=1}readGeoreference(e){return H.fromJSON(e)}writeGeoreference(e,t,n,i){let r=i?.resources?.pendingOperations,o=()=>{let r=function(e,t,n){if(!e||"control-points"===e.type)return e;let{coords:i}=e;if(5!==i?.rings[0]?.length)return null;let[r,o,s,l]=i.rings[0],{spatialReference:a}=i;return new H({controlPoints:[new E.A({mapPoint:new L.A({x:r[0],y:r[1],spatialReference:a}),sourcePoint:(0,S.tc)(0,n)}),new E.A({mapPoint:new L.A({x:o[0],y:o[1],spatialReference:a}),sourcePoint:(0,S.tc)(0,0)}),new E.A({mapPoint:new L.A({x:s[0],y:s[1],spatialReference:a}),sourcePoint:(0,S.tc)(t,0)}),new E.A({mapPoint:new L.A({x:l[0],y:l[1],spatialReference:a}),sourcePoint:(0,S.tc)(t,n)})],width:t,height:n})}(this.georeference,this.contentWidth,this.contentHeight);if(r){if("control-points"!==e.type&&s.A.getLogger(this).warn(`only georeference of type 'control-points' may be persisted. The georeference of type '${e.type}' has been automatically converted.`),4!==r.controlPoints?.length)return void(0,Ae.qt)(i,"ControlPointsGeoreference.controlPoints","only 'control-points' georeference with 4 control points may be persisted.");t[n]=r.write({},i)}};"control-points"!==e.type&&!this.loaded&&r?(t[n]={},r.push(this.load().then(o))):o()}get contentWidth(){return 0}get contentHeight(){return 0}toSource(e){let{georeference:t,contentWidth:n,contentHeight:i}=this;if(null==e||null==t||0===n||0===i)return null;let r=t.toSourceNormalized(e);return null==r?null:(r.x*=n,r.y*=i,r)}};(0,i.Cg)([(0,u.MZ)(Ce)],Re.prototype,"georeference",void 0),(0,i.Cg)([(0,k.w)("georeference")],Re.prototype,"readGeoreference",null),(0,i.Cg)([(0,j.K)("georeference")],Re.prototype,"writeGeoreference",null),(0,i.Cg)([(0,u.MZ)({json:{read:!1,write:!1}})],Re.prototype,"opacity",void 0),Re=(0,i.Cg)([(0,u.$K)("esri.layers.support.MediaElementBase")],Re);var Se=n(85648);const Oe=Symbol("ImageElementInstance"),Le=Symbol("VideoElementInstance");function Be(e){return"object"==typeof e&&!!e&&Oe in e}function Te(e){return Be(e)||function(e){return"object"==typeof e&&!!e&&Le in e}(e)}var Ee,Ze=n(97159);let ke=class extends Re{static{Ee=Oe}constructor(e){super(e),this.animationOptions=null,this.content=null,this.image=null,this.type="image",this[Ee]=!0,this.image=null}load(){let e=this.image;if("string"==typeof e){let t=(0,oe.M5)(e).then(e=>{this._set("content",e)});this.addResolvingPromise(t)}else if(e instanceof HTMLImageElement){let t=e.decode().then(()=>{this._set("content",e)});this.addResolvingPromise(t)}else e?this._set("content",e):this.addResolvingPromise(Promise.reject(new o.A("image-element:invalid-image-type","Invalid image type",{image:e})));return Promise.resolve(this)}get contentWidth(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalWidth:this.content.width}get contentHeight(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalHeight:this.content.height}readImage(e,t,n){return(0,Ze.f)(t.url,n)}writeImage(e,t,n,i){if(null==e)return;let r=i?.portalItem,o=i?.resources;if(!r||!o)return void("string"==typeof e&&(t[n]=(0,Ze.t)(e,i)));let s=function(e){return"string"==typeof e&&!(0,se.DB)(e)&&!(0,se.w8)(e)}(e)?e:null;if(s){if(null==(0,Ze.i)(s))return void(t[n]=s);let e=(0,Ze.t)(s,{...i,verifyItemRelativeUrls:i?.verifyItemRelativeUrls?{writtenUrls:i.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},1);if(r&&e&&!(0,se.oP)(e))return o.toKeep.push({resource:r.resourceFromPath(e),compress:!1}),void(t[n]=e)}t[n]="<pending>",o.pendingOperations.push(async function(e){return"string"==typeof e?(0,se.DB)(e)?(0,se.N9)(e):(await(0,re.A)(e,{responseType:"blob"})).data:new Promise(t=>function(e){if(e instanceof HTMLCanvasElement)return e;let t=e instanceof HTMLImageElement?e.naturalWidth:e.width,n=e instanceof HTMLImageElement?e.naturalHeight:e.height,i=document.createElement("canvas"),r=i.getContext("2d");return i.width=t,i.height=n,e instanceof HTMLImageElement?r.drawImage(e,0,0,e.width,e.height):e instanceof ImageData&&r.putImageData(e,0,0),i}(e).toBlob(t))}(e).then(e=>{let i=function(e,t){let n=(0,le.lk)(),i=`${(0,se.fj)("media",n)}.${(0,Se.n)({type:"blob",blob:e})}`;return t.resourceFromPath(i)}(e,r);t[n]=i.itemRelativeUrl,o.toAdd.push({resource:i,content:{type:"blob",blob:e},compress:!1,finish:e=>{this.image=e.url}})}))}};(0,i.Cg)([(0,u.MZ)()],ke.prototype,"animationOptions",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ke.prototype,"content",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ke.prototype,"contentWidth",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],ke.prototype,"contentHeight",null),(0,i.Cg)([(0,u.MZ)(Pe)],ke.prototype,"image",void 0),(0,i.Cg)([(0,k.w)("image",["url"])],ke.prototype,"readImage",null),(0,i.Cg)([(0,j.K)("image")],ke.prototype,"writeImage",null),(0,i.Cg)([(0,u.MZ)(Ie)],ke.prototype,"type",void 0),ke=(0,i.Cg)([(0,u.$K)("esri.layers.support.ImageElement")],ke);var je=n(62885),Ne=n(65529),Xe=n(61893),Ye=n(36708),He=n(19419),Ue=n(12176),qe=n(6518),ze=n(69622),$e=n(89056);let Fe=class extends ze.A{constructor(e){super(e)}get bounds(){let e=this.coords;return null==e?.extent?null:(0,He.VY)(e.extent)}get coords(){let e=this.element.georeference?.coords;return(0,T.projectOrLoad)(e,this.spatialReference).geometry}get normalizedCoords(){return B.A.fromJSON((0,$e.jZ)(this.coords))}get normalizedBounds(){let e=null==this.normalizedCoords?null:this.normalizedCoords.extent;return null==e?null:(0,He.VY)(e)}};(0,i.Cg)([(0,u.MZ)()],Fe.prototype,"spatialReference",void 0),(0,i.Cg)([(0,u.MZ)()],Fe.prototype,"element",void 0),(0,i.Cg)([(0,u.MZ)()],Fe.prototype,"bounds",null),(0,i.Cg)([(0,u.MZ)()],Fe.prototype,"coords",null),(0,i.Cg)([(0,u.MZ)()],Fe.prototype,"normalizedCoords",null),(0,i.Cg)([(0,u.MZ)()],Fe.prototype,"normalizedBounds",null),Fe=(0,i.Cg)([(0,u.$K)("esri.layers.support.MediaElementView")],Fe);var Ve,We=n(16494),Ge=n(38969);const Ke=Symbol("canplay");let De=class extends Re{static{Ve=Le}constructor(e){super(e),this.autoplay=!0,this.content=null,this.type="video",this[Ve]=!0}load(){let e=this.video;return"string"==typeof e?this.addResolvingPromise(this._preProcessVideoUrl(e).then(async e=>{let t=document.createElement("video");return t.src=We.W5.sanitizeUrl((0,se.s2)(e)),t.crossOrigin="anonymous",t.autoplay=this.autoplay,t.muted=!0,t.loop=!0,t.playsInline=!0,this._loadVideo(t).then(()=>{this._set("content",t)})})):e instanceof HTMLVideoElement?this.addResolvingPromise(this._loadVideo(e).then(()=>{this._set("content",e)})):this.addResolvingPromise(Promise.reject(new o.A("video-element:invalid-video-type","Invalid video type",{video:e}))),Promise.resolve(this)}get contentWidth(){return this.content?.videoWidth??0}get contentHeight(){return this.content?.videoHeight??0}get currentTime(){return this.content?.currentTime}set currentTime(e){if(!this.content)return;let t=(0,xe.qE)(e,0,this.content.duration);"fastSeek"in this.content?this.content.fastSeek(t):this.content.currentTime=t,this.content.play().then(()=>{this.content?.pause()}).catch(()=>{})}get duration(){return this.content?.duration}set video(e){"not-loaded"===this.loadStatus?this._set("video",e):s.A.getLogger(this).error("#video","video cannot be changed after the element is loaded.")}writeVideo(e,t,n,i){if(!e)return void(i?.messages&&i.messages.push(new o.A("video-element:unsupported-video","video source is missing")));let r=function(e){return"string"==typeof e&&!(0,se.DB)(e)&&!(0,se.w8)(e)}(e)?e:null;if(!r)return void(i?.messages&&i.messages.push(new o.A("video-element:unsupported-video","video source must be an absolute url")));!(0,se.oP)(r)&&i?.blockedRelativeUrls&&i.blockedRelativeUrls.push(r);let s=(0,se.s2)(r);(0,Ze.i)(s)?i?.messages&&i.messages.push(new o.A("video-element:unsupported-video","video source cannot be an item resource")):t[n]=s}async _preProcessVideoUrl(e){if((0,se.zs)(e))return(0,se.yM)(e);try{return await(0,re.A)(e,{method:"head"}),e}catch{try{return(0,se.yM)(e,!0)}catch{return e}}}async _loadVideo(e){"anonymous"!==e.crossOrigin&&(e.crossOrigin="anonymous",(0,se.w8)(e.src)||(e.src=e.src));try{await(0,Ge.i)(e,e=>this.addHandles(e,Ke)),this.autoplay&&await e.play().catch(e=>{throw console.error(e),e})}finally{this.removeHandles(Ke)}}};(0,i.Cg)([(0,u.MZ)()],De.prototype,"autoplay",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],De.prototype,"content",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],De.prototype,"contentWidth",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],De.prototype,"contentHeight",null),(0,i.Cg)([(0,u.MZ)({type:Number})],De.prototype,"currentTime",null),(0,i.Cg)([(0,u.MZ)({type:Number})],De.prototype,"duration",null),(0,i.Cg)([(0,u.MZ)(Pe)],De.prototype,"video",null),(0,i.Cg)([(0,j.K)("video")],De.prototype,"writeVideo",null),(0,i.Cg)([(0,u.MZ)(Ie)],De.prototype,"type",void 0),De=(0,i.Cg)([(0,u.$K)("esri.layers.support.VideoElement")],De);const Je={key:"type",defaultKeyValue:"image",base:Re,typeMap:{image:ke,video:De}},Qe=r.A.ofType(Je);let et=class extends((0,ae.WV)((0,Xe.g)(Ne.nJ))){constructor(e){super(e),this._index=new qe.F,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=e=>{for(let t of e.removed){let e=this._elementViewsMap.get(t);this._elementViewsMap.delete(t),this._index.delete(e),this.removeHandles(e),e.destroy(),this.notifyChange("fullExtent")}let{spatialReference:t}=this;for(let n of e.added){if(this._elementViewsMap.get(n))continue;let e=new Fe({spatialReference:t,element:n});this._elementViewsMap.set(n,e);let i=(0,Ye.wB)(()=>e.coords,()=>this._updateIndexForElement(e,!1));this._updateIndexForElement(e,!0),this.addHandles(i,e)}this._elementsIndexes.clear(),this.elements.forEach((e,t)=>this._elementsIndexes.set(e,t)),this.emit("refresh")},this.elements=new Qe}async load(e){if((0,a.Te)(e),!this.spatialReference){let e=this.elements.find(e=>null!=e.georeference?.coords);this._set("spatialReference",e?e.georeference.coords.spatialReference:h.A.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.addHandles(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}get elements(){return this._get("elements")}set elements(e){this._set("elements",(0,je.V)(e,this._get("elements"),Qe))}get fullExtent(){if("not-loaded"===this.loadStatus)return null;let e=this._index.fullBounds;return null==e?null:new pe.A({xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3],spatialReference:this.spatialReference})}set spatialReference(e){"not-loaded"===this.loadStatus?this._set("spatialReference",e):s.A.getLogger(this).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(e,t){await this.load(),await(0,T.initializeProjection)(e.spatialReference,this.spatialReference,null,t);let n=(0,me.aI)(e.spatialReference,this.spatialReference)?e:(0,T.project)(e,this.spatialReference);if(!n)return[];let i=n.normalize(),r=[];for(let e of i)this._index.forEachInBounds((0,He.VY)(e),({normalizedCoords:t,element:n})=>{null!=t&&(0,Ue.fA)(e,t)&&r.push(n)});return r.sort((e,t)=>this._elementsIndexes.get(e)-this._elementsIndexes.get(t)),r}hasElement(e){return this.elements.includes(e)}_updateIndexForElement(e,t){let n=e.normalizedBounds,i=this._index.has(e),r=null!=n;this._index.delete(e),r&&this._index.set(e,n),this.notifyChange("fullExtent"),t||(i===r?this.emit("change",{element:e.element}):this.emit("refresh"))}};(0,i.Cg)([(0,u.MZ)()],et.prototype,"elements",null),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],et.prototype,"fullExtent",null),(0,i.Cg)([(0,u.MZ)()],et.prototype,"spatialReference",null),et=(0,i.Cg)([(0,u.$K)("esri.layers.support.LocalMediaElementSource")],et);let tt=class extends((0,d.dM)((0,f.j)((0,p.q)((0,m.A)((0,l.M)(c.A)))))){constructor(e){super(e),this.effectiveSource=null,this.georeference=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this._debouncedSaveOperations=(0,a.sg)(async(e,t,i)=>{let{save:r,saveAs:o}=await n.e(3561).then(()=>n(63561));switch(e){case 0:return r(this,t);case 1:return o(this,i,t)}}),this.source=new et}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){await this.loadFromPortal({supportedTypes:["Media Layer"]},e);let t=this.source;if(!t)throw new o.A("media-layer:source-missing","Set 'MediaLayer.source' before loading the layer.");let n=this._getSourceOverride(t,this.georeference);n&&(this.setAtOrigin("source",n,"web-map"),this.setAtOrigin("source",n,"web-scene"),t=n);let i=Te(t)?new et({elements:new r.A([t])}):t;this._set("effectiveSource",i),this.spatialReference&&(i.spatialReference=this.spatialReference),await i.load(e),this.spatialReference=i.spatialReference}destroy(){this.effectiveSource?.destroy(),this.effectiveSource!==this.source&&this.source?.destroy()}readGeoreference(e,t){return e&&"itemId"in t&&t.itemId?e:void 0}get fullExtent(){return this.loaded?this.effectiveSource.fullExtent:null}get loaded(){return super.loaded}get source(){return this._get("source")}set source(e){"loaded"===this.loadStatus||"failed"===this.loadStatus?s.A.getLogger(this).error("#source","source cannot be changed after the layer is loaded."):this._set("source",e)}castSource(e){return e?Array.isArray(e)?new et({elements:new r.A(e)}):e instanceof r.A?new et({elements:e}):e:null}readSource(e,t,n){if("itemId"in t&&t.itemId)return;let i=this._createSource(t);return i?.read(t,n),i}writeSource(e,t,n,i){if(e&&e instanceof et){let t=e.elements.length;if(1!==t)return void(i?.messages&&i.messages.push(new o.A("media-layer:unsupported-source",`local media element source can only be persisted if it contains exactly one ImageElement, but it has ${t}.`)));e=e.elements.at(0)}Te(e)?e.write(t,i):i?.messages&&(e?i.messages.push(new o.A("media-layer:unsupported-source","only media elements of type 'ImageElement' or 'VideoElement' can be persisted")):i.messages.push(new o.A("media-layer:unsupported-source","the media layer is missing a source")))}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}_createSource(e){if("mediaType"in e)switch(e.mediaType){case"image":return new ke;case"video":return new De}return null}_getSourceOverride(e,t){if(Te(e)&&3===this.originIdOf("source")&&t&&(5===this.originIdOf("georeference")||4===this.originIdOf("georeference"))){let n=e.toJSON(),i=this._createSource(n);return i.read({...n},{origin:"portal-item"}),i.read({georeference:t},{origin:"web-map"}),i.read({georeference:t},{origin:"web-scene"}),i}return null}};(0,i.Cg)([(0,u.MZ)({readOnly:!0})],tt.prototype,"effectiveSource",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{"web-document":{read:!0}}}})],tt.prototype,"georeference",void 0),(0,i.Cg)([(0,k.w)("web-document","georeference")],tt.prototype,"readGeoreference",null),(0,i.Cg)([(0,u.MZ)({type:String})],tt.prototype,"copyright",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],tt.prototype,"fullExtent",null),(0,i.Cg)([(0,u.MZ)({type:["MediaLayer"]})],tt.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,u.MZ)({type:["show","hide"]})],tt.prototype,"listMode",void 0),(0,i.Cg)([(0,u.MZ)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1,target:{url:{type:String},mediaType:{type:["image","video"]},georeference:{type:H}},overridePolicy(e,t,n){return{enabled:!0,allowNull:!1,ignoreOrigin:Me(this,n?.origin)&&Te(e)&&!!e.georeference&&e.originIdOf("georeference")>3}}}}})],tt.prototype,"source",null),(0,i.Cg)([(0,u.wg)("source")],tt.prototype,"castSource",null),(0,i.Cg)([(0,k.w)("source",["url"])],tt.prototype,"readSource",null),(0,i.Cg)([(0,j.K)("source")],tt.prototype,"writeSource",null),(0,i.Cg)([(0,u.MZ)({type:h.A})],tt.prototype,"spatialReference",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],tt.prototype,"type",void 0),tt=(0,i.Cg)([(0,u.$K)("esri.layers.MediaLayer")],tt);const nt=tt},6518(e,t,n){n.d(t,{F:()=>l});var i=n(44208),r=n(75503),o=n(19419);const s={minX:0,minY:0,maxX:0,maxY:0};class l{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.wq(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){let e=Array(this._idByBounds.size),t=0;this._idByBounds.forEach((n,i)=>{e[t++]=i}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;let e=(0,o.Ie)();for(let t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){let t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,n){(function(e){s.minX=e[0],s.minY=e[1],s.maxX=e[2],s.maxY=e[3]})(t),e.search(s,n)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){let t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},8303(e,t,n){var i=n(32198),r=n(92602),o=n(70333),s=n(56507),l=n(60999),a=n(49186),u=n(36563),h=n(53966),c=n(97768),d=n(17676),p=n(84952),m=n(91429),f=n(77548),g=n(20655),y=n(80812),x=n(41318),_=n(10407),v=n(26121),w=n(36005),M=n(43937);const b={credential:null,user:null};n.d(t,["A",0,e=>{let t=e,P=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,n){if(t.itemId)return new y.default({id:t.itemId,portal:n?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{let{load:i}=await n.e(1204).then(()=>n(41204));return(0,d.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||h.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e,t){if(!this.loaded||!this.portalItem?.id)return!1;let i=t?.signal?null:new AbortController;try{let{reload:r}=await n.e(1204).then(()=>n(41204));return i&&this.addHandles((0,u.rE)(i),"reloadFromPortal"),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t?.signal?t:{signal:i.signal})}catch(e){throw(0,d.zf)(e)||h.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{i&&this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,d.QP)(e),!0)))}async setUserPrivileges(e,t){if(!r.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{let{features:{edit:n,fullEdit:i},content:{updateItem:r}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",n),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",r)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let n=this.portalItem;if(!e||!n||!n.loaded||n.sourceUrl)return this._fetchFallbackUserPrivileges(t);let i,r,s=!o.id?.findCredential(this.url),l=e===n.id;if(l&&n.portal.user)return this._getUserPrivileges(n,s);if(l)i=n.portal.url;else try{i=await(0,f.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!i||!(0,p.b8)(i,n.portal.url))return this._fetchFallbackUserPrivileges(t);try{let e=null==t?null:t.signal;r=await(o.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}if(!r)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(l?await n.reload():(n=new y.default({id:e,portal:{url:i}}),await n.load(t)),n.portal.user)return this._getUserPrivileges(n,s)}catch(e){(0,d.QP)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}_getUserPrivileges(e,t){let n=(0,_.It)(e);return t&&(n.features.edit=!0),n}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){let t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;let n=b.credential===t?b.user:await this._fetchEditingUser(e);return b.credential=t,b.user=n,null==n?.privileges||n.privileges.includes("features:user:edit")}async _fetchEditingUser(e){let t=this.portalItem?.portal?.user;if(t)return t;let n=o.id?.findServerInfo(this.url??"");if(!n?.owningSystemUrl)return null;let i=`${n.owningSystemUrl}/sharing/rest`,r=g.A.getDefault();if(r&&r.loaded&&(0,p.S8)(r.restUrl)===(0,p.S8)(i))return r.user;let a=`${i}/community/self`,u=null==e?null:e.signal,h=await(0,l.Ke)((0,s.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return h.ok?x.A.fromJSON(h.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){return(0,v.wN)(this.portalItem,t)?(t?.messages?.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,m.MZ)({type:y.default})],P.prototype,"portalItem",null),(0,i.Cg)([(0,w.w)("web-document","portalItem",["itemId"])],P.prototype,"readPortalItem",null),(0,i.Cg)([(0,M.K)("web-document","portalItem",{itemId:{type:String}})],P.prototype,"writePortalItem",null),(0,i.Cg)([(0,m.MZ)({clonable:!1})],P.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],P.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],P.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],P.prototype,"userHasUpdateItemPrivileges",void 0),P=(0,i.Cg)([(0,m.$K)("esri.layers.mixins.PortalLayer")],P),P}])},38969(e,t,n){n.d(t,{i:()=>r});var i=n(37955);function r(e,t){return new Promise((n,r)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?n():(t((0,i.Oo)(e,"canplay",n)),t((0,i.Oo)(e,"error",r)))})}},85648(e,t,n){n.d(t,{n:()=>r});var i=n(84952);function r(e){return o[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){let t=(0,i.Zo)(e);return a[t]||s}(e.url)}(e)]||l}const o={},s="text/plain",l=o[s],a={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(let e in a)o[a[e]]=e},26121(e,t,n){n.d(t,{I6:()=>h,ci:()=>u,dL:()=>a,wN:()=>c});var i=n(49186),r=n(84952),o=n(77548),s=n(20655),l=n(59923);async function a(e){let t=[];for(let n of e.allLayers)if("beforeSave"in n&&"function"==typeof n.beforeSave){let e=n.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}function u(e,t,n){let r=(e.messages??[]).filter(({type:e})=>"error"===e).map(({name:e,message:t,details:n})=>new i.A(e,t,n));if(e.blockedRelativeUrls&&(r=r.concat(e.blockedRelativeUrls.map(e=>(0,l.GL)("url",`Relative url '${e}' is not supported`)))),n){let{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:i}=n;e&&(r=r.filter(({name:e})=>!(l.MG.has(e)||t.includes(e)))),i&&(r=r.filter(e=>"web-document-write:property-required"!==e.name))}if(r.length>0)throw new i.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:r})}function h(e){return(0,o.qd)(e).some(e=>!!e.charts?.length)}function c(e,t){let n=t?.portal,i=e?.id&&(e.portal||s.A.getDefault());return!!n&&!!i&&!(0,r.ut)(i.restUrl,n.restUrl)}}}]);