@arcgis/core 5.1.0-next.88 → 5.1.0-next.89

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 (82) hide show
  1. package/arcade/validation/arcadeValidator.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/0840e7dd62643c56ae9e.js +1 -0
  4. package/assets/esri/core/workers/chunks/{500be1fb7cc9efec875c.js → 0e3dcf99382478181366.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{aae40d70eb01249c1bab.js → 1e4e7111d43f01c149b3.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{2549a07f403447482f4e.js → 2dcfc4d7e76c922bcbf9.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{4dc91c2208201ba34c90.js → 3397eae416622c64e628.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{b9e163f4a898e50cc854.js → 39d6032d79720935910d.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{d05a7ce6c1d4b883ed4c.js → 41cbde4738ae4adf973d.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{a401d44a5b45c05072c2.js → 4b9b9e6136c11d5d7901.js} +1 -1
  11. package/assets/esri/core/workers/chunks/5409369d0d637cb30257.js +1 -0
  12. package/assets/esri/core/workers/chunks/{defac06f9e2b43090677.js → 73af4c947e8151d411c1.js} +2 -2
  13. package/assets/esri/core/workers/chunks/{01bd1b86ba899c6aa4c0.js → 75c09a2fa4c34b4844c5.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{b2983f521d8c96becd8a.js → 7ed5b669010db58845f8.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{8178e9ba3c568d406a87.js → 81d761c837b7456ec99f.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{7185486c6dc28fc367a1.js → 90a8dfb03a437fe8a6e7.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{c9065cee85eb8dde6a42.js → a2159df718a7f2f59271.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{7f34fa9f154f5101cb13.js → a232d05c0a055f398c6e.js} +1 -1
  19. package/assets/esri/core/workers/chunks/a508104179e08f0f268c.js +2 -0
  20. package/assets/esri/core/workers/chunks/{4baf66314f82cfa76beb.js → adfa5c136c72c1e65770.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{004af103a94d21cb4889.js → aefeb5a17bb481c95da3.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{164ee62f2211987ad850.js → bb8d596f15fd3a0d783a.js} +1 -1
  23. package/assets/esri/core/workers/chunks/bea2fd831d7a864e5995.js +596 -0
  24. package/assets/esri/core/workers/chunks/{3cf77b7a61f78f9bcd62.js → ceff78c9e31e3572a082.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{5cc38ac051d3d0557920.js → cfaa6e205bfc0c94a1b1.js} +1 -1
  26. package/assets/esri/core/workers/chunks/d5ad036d282df54b9ddc.js +1 -0
  27. package/assets/esri/core/workers/chunks/{475394218caaa4cd3e86.js → d7e7f3efd1d28617b808.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{f37e4ae0e9be80210db0.js → f2c11f54255fd506655e.js} +1 -1
  29. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  30. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  31. package/chunks/ComponentShader.glsl.js +3 -3
  32. package/chunks/index.js +1 -1
  33. package/config.js +1 -1
  34. package/interfaces.d.ts +7 -0
  35. package/kernel.js +1 -1
  36. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  37. package/package.json +2 -2
  38. package/support/revision.js +1 -1
  39. package/views/3d/input/handlers/KeyboardNavigation.js +1 -1
  40. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  41. package/views/3d/layers/support/IntegratedMesh3DTilesVertexProcessing.js +1 -1
  42. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  43. package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +3 -3
  44. package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +22 -16
  45. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizer.js +1 -1
  46. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  47. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  48. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
  49. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBuffer.js +1 -1
  50. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  51. package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
  52. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  53. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  54. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  55. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  56. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  57. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  58. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  59. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  60. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  61. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  62. package/views/3d/webgl-engine/materials/renderers/TextureBufferCache.js +1 -1
  63. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  64. package/views/3d/webgl-engine/shaders/RibbonLineLayouts.js +2 -0
  65. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  66. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  67. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  68. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +64 -0
  69. package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +2 -0
  70. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.d.ts +3 -0
  71. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
  72. package/widgets/BatchAttributeForm/inputs/GroupInput.d.ts +2 -1
  73. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  74. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  75. package/widgets/BatchAttributeForm/inputs/types.d.ts +4 -2
  76. package/assets/esri/core/workers/chunks/3e72bd6dbfc52d956c06.js +0 -1
  77. package/assets/esri/core/workers/chunks/a429355534bf6cbd8304.js +0 -1
  78. package/assets/esri/core/workers/chunks/d00dddc3881fa29446e1.js +0 -1
  79. package/assets/esri/core/workers/chunks/f9fe3c9867b0bdb2aec6.js +0 -596
  80. package/assets/esri/core/workers/chunks/fe30e61652716fcccf16.js +0 -2
  81. /package/assets/esri/core/workers/chunks/{defac06f9e2b43090677.js.LICENSE.txt → 73af4c947e8151d411c1.js.LICENSE.txt} +0 -0
  82. /package/assets/esri/core/workers/chunks/{fe30e61652716fcccf16.js.LICENSE.txt → a508104179e08f0f268c.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[91,895,1775,1948,3931,6061,8125],{61691(e,t,i){i.d(t,{G:()=>n});class n{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}},76061(e,t,i){i.d(t,{S:()=>r});var n=i(61691);class r extends n.G{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},65708(e,t,i){i.d(t,{a:()=>o,e:()=>s});var n=i(86211),r=i(78125);function s(e,t={}){const{unit:i}=t;let s=(0,r.fromGeometry)(e).calculateArea2D();if(s&&i){const t=(0,r.getSpatialReference)(e);if(t.isGeographic)throw new Error("Unable to convert from an angular area unit to a linear area unit.");const o=(0,n.B5)(t);o!==i&&(o?s=(0,n.oU)(s,o,i):(s=Math.sqrt(s),s*=(0,n.GA)(t),s**=2,s=(0,n.oU)(s,"square-meters",i)))}return s}const o=Object.freeze(Object.defineProperty({__proto__:null,execute:s,supportsCurves:!0},Symbol.toStringTag,{value:"Module"}))},49590(e,t,i){i.d(t,{e:()=>p,g:()=>f,l:()=>u});var n=i(86211),r=i(86742),s=i(5808);let o,a,l,c;function h(){return!!o&&(0,r.s1)()}async function u(){if(!h()){const[e]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(1550)]).then(i.bind(i,78125)),(0,r.Hh)()]);o=e.fromGeometry,a=e.fromSpatialReference,l=e.getSpatialReference,c=(0,r.fz)()}}function p(e,t={}){const{curveType:i="geodesic",unit:c}=t,h=l(e);let u=(0,r.g7)(o(e),a(h),s.O[i]);return u&&c&&(u=(0,n.oU)(u,"square-meters",c)),u}const f=Object.freeze(Object.defineProperty({__proto__:null,execute:p,isLoaded:h,load:u,get supportsCurves(){return c}},Symbol.toStringTag,{value:"Module"}))},27749(e,t,i){i.d(t,{e:()=>f,g:()=>d,l:()=>p});var n=i(86211),r=i(77085),s=i(5808);let o,a,l,c,h;function u(){return!!o&&(0,r.s1)()}async function p(){if(!u()){const[e]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(1666)]).then(i.bind(i,78125)),(0,r.Hh)()]);o=e.fromGeometry,a=e.fromSpatialReference,l=e.getSpatialReference,c=e.toGeometry,h=(0,r.fz)()}}function f(e,t,i={}){const{curveType:h="geodesic",unit:u}=i;u&&(t=(0,n.oU)(t,u,"meters"));const p=l(e);return c((0,r.g7)(o(e),t,a(p),s.O[h]),p)}const d=Object.freeze(Object.defineProperty({__proto__:null,execute:f,executeMany:function(e,t,i={}){const{curveType:h="geodesic",unit:u}=i;u&&(t=(0,n.oU)(t,u,"meters"));const p=e.map(o),f=l(e);return(0,r.zo)(p,t,a(f),s.O[h]).map(e=>c(e,f))},isLoaded:u,load:p,get supportsCurves(){return h}},Symbol.toStringTag,{value:"Module"}))},39663(e,t,i){i.d(t,{e:()=>p,g:()=>f,l:()=>u});var n=i(86211),r=i(35223),s=i(5808);let o,a,l,c;function h(){return!!o&&(0,r.s1)()}async function u(){if(!h()){const[e]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(1550)]).then(i.bind(i,78125)),(0,r.Hh)()]);o=e.fromGeometry,a=e.fromSpatialReference,l=e.getSpatialReference,c=(0,r.fz)()}}function p(e,t={}){const{curveType:i="geodesic",unit:c}=t,h=l(e);let u=(0,r.g7)(o(e),a(h),s.O[i]);return u&&c&&(u=(0,n.oU)(u,"meters",c)),u}const f=Object.freeze(Object.defineProperty({__proto__:null,execute:p,isLoaded:h,load:u,get supportsCurves(){return c}},Symbol.toStringTag,{value:"Module"}))},7817(e,t,i){i.d(t,{e:()=>s,l:()=>a,s:()=>o});var n=i(86211),r=i(78125);function s(e,t={}){const{unit:i}=t;let s=(0,r.fromGeometry)(e).calculateLength2D();if(s&&i){const t=(0,r.getSpatialReference)(e);s=(0,n.PQ)(s,t,i)}return s}const o=!0,a=Object.freeze(Object.defineProperty({__proto__:null,execute:s,supportsCurves:o},Symbol.toStringTag,{value:"Module"}))},10222(e,t,i){i.d(t,{e:()=>s,s:()=>a});var n=i(81150),r=i(78125);function s(e){const t=(0,r.getSpatialReference)(e);return(0,r.toGeometry)((0,n.g7)((0,r.fromGeometry)(e),(0,r.fromSpatialReference)(t),!1),t)}const o=(0,n.fz)(),a=Object.freeze(Object.defineProperty({__proto__:null,execute:s,executeMany:function(e){const t=e.map(r.fromGeometry),i=(0,r.getSpatialReference)(e);return(0,n.zo)(t,(0,r.fromSpatialReference)(i),!1).map(e=>(0,r.toGeometry)(e,i))},isSimple:function(e){return(0,n.Pg)((0,r.fromGeometry)(e),(0,r.fromSpatialReference)((0,r.getSpatialReference)(e)),!1)},supportsCurves:o},Symbol.toStringTag,{value:"Module"}))},73354(e,t,i){i.d(t,{a:()=>p,b:()=>l,c:()=>a,d:()=>s,e:()=>f,f:()=>u,l:()=>h,n:()=>d,t:()=>o});var n=i(40876),r=(i(44208),i(72727));function s(e,t,i){o(e.typedBuffer,t.typedBuffer,i,e.typedBufferStride,t.typedBufferStride)}function o(e,t,i,n=3,s=n){const o=(0,r.k)(e.length,n,3),a=(0,r.k)(t.length,s,3),l=Math.min(o,a),c=i[0],h=i[1],u=i[2],p=i[4],f=i[5],d=i[6],m=i[8],g=i[9],y=i[10],v=i[12],w=i[13],_=i[14];let C=0,x=0;for(let i=0;i<l;i++){const i=t[C],r=t[C+1],o=t[C+2];e[x]=c*i+p*r+m*o+v,e[x+1]=h*i+f*r+g*o+w,e[x+2]=u*i+d*r+y*o+_,C+=s,x+=n}return e}function a(e,t,i){l(e.typedBuffer,t.typedBuffer,i,e.typedBufferStride,t.typedBufferStride)}function l(e,t,i,n=3,s=n){const o=(0,r.k)(e.length,n,3),a=(0,r.k)(t.length,s,3),l=Math.min(o,a),c=i[0],h=i[1],u=i[2],p=i[3],f=i[4],d=i[5],m=i[6],g=i[7],y=i[8];let v=0,w=0;for(let i=0;i<l;i++){const i=t[v],r=t[v+1],o=t[v+2];e[w]=c*i+p*r+m*o,e[w+1]=h*i+f*r+g*o,e[w+2]=u*i+d*r+y*o,v+=s,w+=n}}function c(e,t,i,n=3,r=n){const s=Math.min(e.length/n,t.length/r);let o=0,a=0;for(let l=0;l<s;l++)e[a]=i*t[o],e[a+1]=i*t[o+1],e[a+2]=i*t[o+2],o+=r,a+=n;return e}function h(e,t,i,n){u(e.typedBuffer,t.typedBuffer,i,n,e.typedBufferStride,t.typedBufferStride)}function u(e,t,i,r,s=3,o=s){const a=Math.min(e.length/s,t.length/o);let l=0,c=0;const h=1/n.Tf;for(let n=0;n<a;n++)e[c]=r*(i*t[l])**h,e[c+1]=r*(i*t[l+1])**h,e[c+2]=r*(i*t[l+2])**h,l+=o,c+=s}function p(e,t,i,n=3,s=n){const o=(0,r.k)(e.length,n,3),a=(0,r.k)(t.length,s,3),l=Math.min(o,a);let c=0,h=0;for(let r=0;r<l;r++)e[h]=t[c]+i[0],e[h+1]=t[c+1]+i[1],e[h+2]=t[c+2]+i[2],c+=s,h+=n;return e}function f(e,t){d(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function d(e,t,i=3,n=i){const r=Math.min(e.length/i,t.length/n);let s=0,o=0;for(let a=0;a<r;a++){const r=t[s],a=t[s+1],l=t[s+2],c=r*r+a*a+l*l;if(c>0){const t=1/Math.sqrt(c);e[o]=t*r,e[o+1]=t*a,e[o+2]=t*l}s+=n,o+=i}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:u,linearToSRGBView:h,normalize:d,normalizeView:f,scale:c,scaleView:function(e,t,i){c(e.typedBuffer,t.typedBuffer,i,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,i){const n=Math.min(e.count,t.count),r=e.typedBuffer,s=e.typedBufferStride,o=t.typedBuffer,a=t.typedBufferStride;let l=0,c=0;for(let e=0;e<n;e++)r[c]=o[l]>>i,r[c+1]=o[l+1]>>i,r[c+2]=o[l+2]>>i,l+=a,c+=s},transformMat3:l,transformMat3View:a,transformMat4:o,transformMat4View:s,translate:p},Symbol.toStringTag,{value:"Module"}))},69540(e,t,i){i.d(t,{OU:()=>h,Pw:()=>u});var n=i(5482),r=i(69622),s=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(88620),l=i(64108);const c=Symbol("ClonableMixin"),h=e=>{var t;const i=e;let r=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=c}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,n=t.store,r={},l=new Map;for(const t in i){const o=i[t],a=n?.originOf(t),c=o.clonable;if(o.readOnly||!1===c||7!==a&&0!==a&&5!==a&&4!==a)continue;const h=this[t];let u=null;if("function"==typeof c)u=c(h,e);else if("reference"===c)u=h;else if(u=(0,s.TU)(h,e),null!=h&&null==u)continue;0===a?l.set(t,u):r[t]=u}const c=new(0,Object.getPrototypeOf(this).constructor)(r);if(l.size){const e=(0,a.oY)(c)?.store;if(e)for(const[t,i]of l)e.set(t,i,0)}return c}};return r=(0,n.Cg)([(0,l.$)("esri.core.Clonable")],r),r},u=h(r.A)},7762(e,t,i){i.d(t,{A:()=>I});var n,r=i(5482),s=i(98291),o=i(4576),a=i(65529),l=i(36563),c=i(4718),h=i(53966),u=i(93687),p=i(76030),f=i(56507),d=i(62788),m=i(10107),g=i(7695),y=i(64108),v=i(95488),w=i(12195);class _{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}}class C{constructor(e,t,i,n,r){this.target=e,this.added=t,this.removed=i,this.start=n,this.deleteCount=r}}const x=new u.A(()=>new _,void 0,e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1});function b(e){e&&"object"==typeof e&&"destroy"in e&&"function"==typeof e.destroy&&e.destroy()}function M(e){return e?e instanceof E?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function A(e){if(e?.length)return e[0]}function T(e,t,i,n){const r=Math.min(e.length-i,t.length-n);let s=0;for(;s<r&&e[i+s]===t[n+s];)s++;return s}function S(e,t,i,n){t&&t.forEach((t,r,s)=>{e.push(t),S(e,i.call(n,t,r,s),i,n)})}const R=new Set,O=new Set,P=new Set,Z=new Map;let z=0,E=n=class extends a.nJ{static ofType(e){if(!e)return n;if(Z.has(e))return Z.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const i in e.typeMap){const n=e.typeMap[i].prototype.declaredClass;t?t+=` | ${n}`:t=n}let i=class extends n{};return(0,r.Cg)([(0,g.u)({Type:e,ensureType:"function"==typeof e?(0,f.dp)(e):(0,f.aq)(e)})],i.prototype,"itemType",void 0),i=(0,r.Cg)([(0,y.$)(`esri.core.Collection<${t}>`)],i),Z.set(e,i),i}static isCollection(e){return null!=e&&e instanceof n}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new v.I,this._length=0,this._items=[],Object.defineProperty(this,"uid",{value:z++})}normalizeCtorArgs(e){return e?(0,o.yc)(e)||e instanceof n?{items:e}:e:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove(),super.destroy(),this._notifications=null}*[Symbol.iterator](){yield*this.items}get length(){return this._length}set length(e){e>this._length?h.A.getLogger(this).error("#length=","Cannot increase the length of the collection by assigning to the length property."):this.splice(e,Math.max(0,this._length-e))}get items(){return(0,d.gc)(this._observable),this._items}set items(e){this._emitBeforeChanges(1)||(this._splice(0,this.length,M(e)),this._emitAfterChanges(1))}hasEventListener(e){return!this.destroyed&&("change"===e?this._chgListeners.length>0:super.hasEventListener(e))}on(e,t){if(this.destroyed)return(0,l.hA)();if("change"===e){const e=this._chgListeners,i={removed:!1,callback:t};return e.push(i),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),(0,l.hA)(()=>{i.removed=!0,e.splice(e.indexOf(i),1)})}return super.on(e,t)}once(e,t){const i="deref"in t?()=>t.deref():()=>t,n=this.on(e,e=>{i()?.call(null,e),n.remove()});return n}add(e,t){if((0,d.gc)(this._observable),this._emitBeforeChanges(1))return this;const i=this.getNextIndex(t??null);return this._splice(i,0,[e]),this._emitAfterChanges(1),this}addMany(e,t=this._items.length){if((0,d.gc)(this._observable),!e?.length)return this;if(this._emitBeforeChanges(1))return this;const i=this.getNextIndex(t);return this._splice(i,0,M(e)),this._emitAfterChanges(1),this}at(e){if((0,d.gc)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,d.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return[];const e=this._removeAllRaw();return this._emitAfterChanges(2),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,d.gc)(this._observable),this._createNewInstance({items:this._items.map(c.o8)})}concat(...e){(0,d.gc)(this._observable);const t=e.map(M);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,d.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const i=this._splice(0,this.length),n=i.length;for(let r=0;r<n;r++)e.call(t,i[r],r,i);this._emitAfterChanges(2)}destroyAll(){this.drain(b)}destroyMany(e){const t=this.removeMany(e);return t.forEach(b),t}every(e,t){return(0,d.gc)(this._observable),this._items.every(e,t)}filter(e,t){(0,d.gc)(this._observable);const i=2===arguments.length?this._items.filter(e,t):this._items.filter(e);return this._createNewInstance({items:i})}find(e,t){return(0,d.gc)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,d.gc)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,d.gc)(this._observable);const i=[];return S(i,this,e,t),new n(i)}forEach(e,t){return(0,d.gc)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,d.gc)(this._observable),this._items[e]}getNextIndex(e){(0,d.gc)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,d.gc)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,d.gc)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,d.gc)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,d.gc)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,d.gc)(this._observable);const i=this._items.map(e,t);return new n({items:i})}reorder(e,t=this.length-1){(0,d.gc)(this._observable);const i=this.indexOf(e);if(-1!==i){if(t<0?t=0:t>=this.length&&(t=this.length-1),i!==t){if(this._emitBeforeChanges(4))return e;this._splice(i,1),this._splice(t,0,[e]),this._emitAfterChanges(4)}return e}}pop(){if((0,d.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const e=A(this._splice(this.length-1,1));return this._emitAfterChanges(2),e}push(...e){return(0,d.gc)(this._observable),this._emitBeforeChanges(1)||(this._splice(this.length,0,e),this._emitAfterChanges(1)),this.length}reduce(e,t){(0,d.gc)(this._observable);const i=this._items;return 2===arguments.length?i.reduce(e,t):i.reduce(e)}reduceRight(e,t){(0,d.gc)(this._observable);const i=this._items;return 2===arguments.length?i.reduceRight(e,t):i.reduceRight(e)}remove(e){return(0,d.gc)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,d.gc)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(2))return;const t=A(this._splice(e,1));return this._emitAfterChanges(2),t}removeMany(e){if((0,d.gc)(this._observable),!e?.length||this._emitBeforeChanges(2))return[];const t=e instanceof n?e.toArray():e,i=this._items,r=[],s=t.length;for(let e=0;e<s;e++){const n=t[e],s=i.indexOf(n);if(s>-1){const n=1+T(t,i,e+1,s+1),o=this._splice(s,n);o&&o.length>0&&r.push.apply(r,o),e+=n-1}}return this._emitAfterChanges(2),r}reverse(){if((0,d.gc)(this._observable),this._emitBeforeChanges(4))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(4),this}shift(){if((0,d.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const e=A(this._splice(0,1));return this._emitAfterChanges(2),e}slice(e=0,t=this.length){return(0,d.gc)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,d.gc)(this._observable),this._items.some(e,t)}sort(e){if((0,d.gc)(this._observable),!this.length||this._emitBeforeChanges(4)||!this._requiresSort(e))return this;const t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(4),this}_requiresSort(e=(e,t)=>e===t?0:e<t?-1:1){const t=this.length-1;for(let i=0;i<t;i++)if(e(this.items[i],this.items[i+1])>0)return!0;return!1}splice(e,t,...i){(0,d.gc)(this._observable),1===arguments.length&&(t=this.length),t??=0;const n=(t?2:0)|(i.length?1:0);if(this._emitBeforeChanges(n))return[];const r=this._splice(e,t,i)||[];return this._emitAfterChanges(n),r}toArray(){return(0,d.gc)(this._observable),this._items.slice()}toJSON(e){return(0,d.gc)(this._observable),this.toArray().map(t=>(0,w.W)(t)?t.toJSON(e):t)}toLocaleString(){return(0,d.gc)(this._observable),this._items.toLocaleString()}toString(){return(0,d.gc)(this._observable),this._items.toString()}unshift(...e){return(0,d.gc)(this._observable),!e.length||this._emitBeforeChanges(1)||(this._splice(0,0,e),this._emitAfterChanges(1)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,i){const n=this._items,r=this.itemType;let s,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=(0,p._)(()=>this._dispatchChange())),e<0&&(e+=this.length),t){if(o=n.splice(e,t),this.hasEventListener("before-remove")){const t=x.acquire();t.target=this,t.cancellable=!0;for(let i=0,r=o.length;i<r;i++)s=o[i],t.reset(s),this.emit("before-remove",t),t.defaultPrevented&&(o.splice(i,1),n.splice(e,0,s),e+=1,i-=1,r-=1);x.release(t)}if(this._length=this._items.length,this.hasEventListener("after-remove")){const e=x.acquire();e.target=this,e.cancellable=!1;const t=o.length;for(let i=0;i<t;i++)e.reset(o[i]),this.emit("after-remove",e);x.release(e)}}if(i?.length){if(r){const e=[];for(const t of i){const i=r.ensureType(t);null==i&&null!=t||e.push(i)}i=e}const t=this.hasEventListener("before-add"),s=this.hasEventListener("after-add"),o=e===this.length;if(t||s){const r=x.acquire();r.target=this,r.cancellable=!0;const a=x.acquire();a.target=this,a.cancellable=!1;for(const l of i)t?(r.reset(l),this.emit("before-add",r),r.defaultPrevented||(o?n.push(l):n.splice(e++,0,l),this._length=n.length,s&&(a.reset(l),this.emit("after-add",a)))):(o?n.push(l):n.splice(e++,0,l),this._length=n.length,a.reset(l),this.emit("after-add",a));x.release(a),x.release(r)}else{if(o)for(const e of i)n.push(e);else n.splice(e,0,...i);this._length=n.length}}if((i?.length||o?.length)&&this._notifyChangeEvent(i,o),this.hasEventListener("after-splice")){const n=new C(this,i,o,e,t);this.emit("after-splice",n)}return o}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const i=x.acquire();i.target=this,i.cancellable=!0,i.type=e,this.emit("before-changes",i),t=i.defaultPrevented,x.release(i)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=x.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),x.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}get updating(){return this._updating}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),this._updating=!1,!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;R.clear(),O.clear(),P.clear();for(const{added:t,removed:i}of e){if(t)if(0===P.size&&0===O.size)for(const e of t)R.add(e);else for(const e of t)O.has(e)?(P.add(e),O.delete(e)):P.has(e)||R.add(e);if(i)if(0===P.size&&0===R.size)for(const e of i)O.add(e);else for(const e of i)R.has(e)?R.delete(e):(P.delete(e),O.add(e))}const i=s.A.acquire();R.forEach(e=>{i.push(e)});const n=s.A.acquire();O.forEach(e=>{n.push(e)});const r=this._items,o=t.items,a=s.A.acquire();if(P.forEach(e=>{o.indexOf(e)!==r.indexOf(e)&&a.push(e)}),t.listeners&&(i.length||n.length||a.length)){const e={target:this,added:i,removed:n,moved:a},r=t.listeners.length;for(let i=0;i<r;i++){const n=t.listeners[i];n.removed||n.callback.call(this,e)}}s.A.release(i),s.A.release(n),s.A.release(a)}R.clear(),O.clear(),P.clear()}};(0,r.Cg)([(0,m.MZ)()],E.prototype,"_updating",void 0),(0,r.Cg)([(0,m.MZ)()],E.prototype,"_length",void 0),(0,r.Cg)([(0,m.MZ)()],E.prototype,"length",null),(0,r.Cg)([(0,m.MZ)()],E.prototype,"items",null),(0,r.Cg)([(0,m.MZ)({readOnly:!0})],E.prototype,"updating",null),E=n=(0,r.Cg)([(0,y.$)("esri.core.Collection")],E);const I=E},4902(e,t,i){i.d(t,{s:()=>o});var n=i(5482),r=i(64108);let s=0;const o=e=>{const t=e;let i=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return i=(0,n.Cg)([(0,r.$)("esri.core.Identifiable")],i),i};o(class{})},7695(e,t,i){function n(e){return(t,i)=>{t[i]=e}}i.d(t,{u:()=>n})},82534(e,t,i){function n(){return[0,0,0,1]}function r(e){return[e[0],e[1],e[2],e[3]]}i.d(t,{o8:()=>r,vt:()=>n,zK:()=>s});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:r,create:n,fromValues:function(e,t,i,n){return[e,t,i,n]}},Symbol.toStringTag,{value:"Module"}))},48163(e,t,i){function n(){return[0,0]}function r(e){return[e[0],e[1]]}function s(e,t){return[e,t]}function o(){return s(1,1)}function a(){return s(1,0)}function l(){return s(0,1)}i.d(t,{Un:()=>c,fA:()=>s,o8:()=>r,vt:()=>n});const c=o(),h=a(),u=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:h,UNIT_Y:u,ZEROS:[0,0],clone:r,create:n,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){const i=Math.min(2,e.length);for(let n=0;n<i;++n)t[n]=e[n];return t},fromValues:s,ones:o,unitX:a,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},17799(e,t,i){i.d(t,{T9:()=>a,d_:()=>r,gT:()=>s});var n=i(86211);function r(e,t){return{type:(0,n.t$)(t),value:e,unit:t}}function s(e,t){return{type:(0,n.t$)(t),value:e,unit:t}}function o(e,t,i="arithmetic"){return{type:(0,n.t$)(t),value:e,unit:t,rotationType:i}}function a(e,t){return null==e?t:null==t||e.value>(0,n.oU)(t.value,t.unit,e.unit)?e:t}r(0,"meters"),s(0,"square-meters"),o(0,"radians"),o(0,"degrees"),o(0,"degrees","geographic")},36708(e,t,i){i.d(t,{C_:()=>p,OH:()=>m,Vh:()=>g,on:()=>u,pc:()=>y,wB:()=>l,z7:()=>c});var n=i(37955),r=i(36563),s=i(97768),o=i(17676),a=i(14012);function l(e,t,i={}){return h(e,t,i,f)}function c(e,t,i={}){return h(e,t,i,d)}function h(e,t,i={},n){let r=null;const o=i.once?(e,i)=>{n(e)&&((0,s.xt)(r),t(e,i))}:(e,i)=>{n(e)&&t(e,i)};if(r=(0,a.Cn)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return r}function u(e,t,i,o={}){let a=null,c=null,h=null;function u(){a&&c&&(c.remove(),o.onListenerRemove?.(a),a=null,c=null)}function p(e){o.once&&o.once&&(0,s.xt)(h),i(e)}const f=l(e,(e,i)=>{u(),(0,n.wb)(e)&&(a=e,c=(0,n.on)(e,t,p),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return h=(0,r.hA)(()=>{f.remove(),u()}),h}function p(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const n=e();if(t?.(n))return Promise.resolve(n);let a=null;function l(){a=(0,s.xt)(a)}return new Promise((n,s)=>{a=(0,r.vE)([(0,o.u7)(i,()=>{l(),s((0,o.NK)())}),h(e,e=>{l(),n(e)},{sync:!1,once:!0},t??f)])})}(e,d,t)}function f(e){return!0}function d(e){return!!e}i(80559);const m={sync:!0},g={initial:!0},y={sync:!0,initial:!0}},35982(e,t,i){i.d(t,{B:()=>h});var n=i(4576),r=i(71511),s=i(36563),o=i(53966),a=i(97768),l=i(17676),c=i(83027);class h{constructor(e,t,i,n,r={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._onClientConnectedHandle=null,this._destroyed=!1,this._promise=(0,c.h)(e,{...r,schedule:n}).then(e=>{null!=this._thread||this._destroyed?e.close():(this._thread=e,this._promise=null,this._onClientConnectedHandle=this._thread.onClientConnected(e=>{r.hasInitialize&&e.invoke("initialize",{});for(const t of this._listeners)this._connectListenerToClient(t,e);this._onClientConnected(e)}))}),this._promise.catch(t=>o.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){const i=new u(e,t);return this._listeners.push(i),this._connectListener(i),(0,s.hA)(()=>{(0,n.TF)(this._listeners,i),i.destroy()})}[Symbol.dispose](){this.destroy()}destroy(){this._onClientConnectedHandle=(0,a.xt)(this._onClientConnectedHandle),this._thread&&(this._thread.close(),this._thread=null),this._promise=null;for(const e of this._listeners)e.destroy();this._listeners.length=0,this._transferLists={},this._destroyed=!0}invoke(e,t,i){return this.invokeMethod(this._mainMethod,e,t,i)}invokeMethod(e,t,i,n){if(this._thread){const r=this._transferLists[e],s=r?r(t):[];return this._thread.invoke(e,t,{transferList:s,signal:i,jobPriority:n})}return this._promise?this._promise.then(()=>((0,l.Te)(i),this.invokeMethod(e,t,i))):Promise.reject((0,l.NK)())}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(p):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject((0,l.NK)())}get promise(){return this._promise}_onClientConnected(e){}_connectListener(e){this._thread&&e.add(this._thread.on(e.eventName,e.callback))}_connectListenerToClient(e,t){e.add(t.on(e.eventName,e.callback))}}class u{constructor(e,t){this.eventName=e,this.callback=t,this._handles=new r.A}add(e){this._handles.add(e)}destroy(){this._handles.destroy()}}function p(){}},87992(e,t,i){i.d(t,{JR:()=>A,ME:()=>x,MY:()=>T,NO:()=>C,Nh:()=>M,V2:()=>Z,_s:()=>z,e6:()=>I,gh:()=>b,tr:()=>L,uX:()=>g});var n=i(5482),r=i(69397),s=i(16930),o=(i(70328),i(19419)),a=i(60408),l=i(21325),c=i(513),h=i(50954),u=i(79567),p=i(52006),f=i(49663),d=i(46068),m=i(92722);class g{constructor({type:e,spatialReference:t,vertexCount:i,vertexXY:n,vertexZ:r,vertexM:s,partCount:o,partOffsets:a,partFlags:l,segmentFlags:c,segmentIndices:h,segmentParams:u,segmentCountArc:p,segmentCountBezier:f}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=e,this.spatialReference=t,this.vertexCount=i,this.vertexXY=n,this.vertexZ=r,this.vertexM=s,this.partCount=o,this.partOffsets=a,this.partFlags=l,this.segmentFlags=c,this.segmentIndices=h,this.segmentParams=u,this.segmentCountArc=p,this.segmentCountBezier=f}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){const{segmentCount:e,segmentCountArc:t,segmentCountBezier:i}=this;return e&&e-t-i}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return this.segmentCountArc+this.segmentCountBezier>0}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function e(e){return e?r.Ul+e.byteLength:0}return e(this.vertexXY)+e(this.vertexZ)+e(this.vertexM)+e(this.partOffsets)+e(this.partFlags)+e(this.segmentFlags)+e(this.segmentIndices)+e(this.segmentParams)}clone(){const{type:e,vertexCount:t,partCount:i,hasZ:n,hasM:r,segmentCountArc:s,segmentCountBezier:o}=this,a=Z(e,t,i,n,r,this.hasCurves(),s,o);a.spatialReference=this.spatialReference;const{vertexXY:l,vertexZ:c,vertexM:h}=this;if(a.vertexXY.set(l.subarray(0,2*t),0),a.vertexZ?.set(c.subarray(0,t),0),a.vertexM?.set(h.subarray(0,t),0),this.isMultipart()){const{partOffsets:e,partFlags:t}=this;a.partFlags.set(t.subarray(0,i+1)),a.partOffsets.set(e.subarray(0,i+1))}if(this.hasCurves()){const{segmentFlags:e,segmentIndices:i,segmentParams:n,segmentParamCount:r}=this;a.segmentFlags.set(e.subarray(0,t),0),a.segmentIndices.set(i.subarray(0,t),0),a.segmentParams.set(n.subarray(0,r),0)}return a}equals(e){return this.equalsWithinTolerance(e,0)}equalsWithinTolerance(e,t){if(null==e)return!1;if(this===e)return!0;if(!(0,l.aI)(this.spatialReference,e.spatialReference))return!1;if(this.vertexCount!==e.vertexCount||this.partCount!==e.partCount)return!1;if(this.hasZ!==e.hasZ||this.hasM!==e.hasM)return!1;if(this.hasCurves()!==e.hasCurves()||this.segmentCountArc!==e.segmentCountArc||this.segmentCountBezier!==e.segmentCountBezier)return!1;const i=0===t?(e,t)=>e!==t||isNaN(e)!==isNaN(t):(e,i)=>Math.abs(e-i)>t||isNaN(e)!==isNaN(i);for(let t=0;t<this.vertexCount;++t)if(i(this.vertexXY[2*t],e.vertexXY[2*t])||i(this.vertexXY[2*t+1],e.vertexXY[2*t+1]))return!1;if(this.hasZ)for(let t=0;t<this.vertexCount;++t)if(i(this.vertexZ[t],e.vertexZ[t]))return!1;if(this.hasM)for(let t=0;t<this.vertexCount;++t)if(i(this.vertexM[t],e.vertexM[t]))return!1;for(let t=0;t<this.partCount;++t)if(this.partFlags[t]!==e.partFlags[t]||this.partOffsets[t]!==e.partOffsets[t])return!1;if(this.hasCurves()){for(let t=0;t<this.vertexCount;++t)if(this.segmentFlags[t]!==e.segmentFlags[t]||this.segmentIndices[t]!==e.segmentIndices[t])return!1;for(let t=0;t<this.segmentParamCount;++t)if(i(this.segmentParams[t],e.segmentParams[t]))return!1}return!0}get parts(){return this.isMultipart()?new y(this):[][Symbol.iterator]()}}class y{constructor(e){this.geometry=e,this.value=new v(e)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class v{constructor(e){this.geometry=e,this.index=-1,this._readVertex=O(e),this._segments=new w(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){const e=this.geometry.partOffsets;return e[this.index+1]-e[this.index]}}class w{constructor(e){this._part=e,this._partStart=0,this._partEnd=0,this._isPolygon="polygon"===e.geometry.type,this.value=new _(e.geometry)}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;const e=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=e&&this._isPolygon?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){const{index:e}=this._part,t=this._part.geometry.partOffsets;this._partStart=t[e],this._partEnd=t[e+1]-(this._isPolygon?1:2),this.value.indexOfStartVertex=this._partStart-1}}class _{constructor(e){this.geometry=e,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=O(e)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){const e=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===e)return this.end;const t=this.geometry.segmentParams;let i=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===e){const e=t[i++],n=t[i++],r=t[i++],s=t[i++];return{b:[this.end,[e,n],[r,s]]}}const n=t[i++],r=t[i++],s=t[i++],o=t[i++],a=t[i++],l=t[i++];i++,i++;const c=t[i++],h=t[i++];if(!Boolean(4&n)&&1===s)return{c:[this.end,[c,h]]};const u=2&n?0:1,p=1&n?0:1;return{a:[this.end,[a,l],u,p,o,r,s]}}}function C(e,t){const i={stack:[],error:void 0,hasError:!1};try{return t??=(0,o.Ie)(),(0,n.mS)(i,new S(e,["vertexZ","vertexM","spatialReference"]),!1),(0,o.bx)(t,function(e){let t;const{vertexCount:i,vertexXY:r,vertexZ:s,vertexM:a}=e,l=R(e);if(e.hasCurves()){const i={stack:[],error:void 0,hasError:!1};try{(0,n.mS)(i,new S(e,["vertexZ","vertexM"]),!1);const r=(0,o.Ie)();for(const t of e.parts){let e=t.startVertex;for(const{curve:i}of t.segments)(0,u.e)(r,e,i),e=(0,p.yP)(i)}const[s,a,c,h]=r;t={xmin:s,ymin:a,xmax:c,ymax:h,spatialReference:l}}catch(e){i.error=e,i.hasError=!0}finally{(0,n.hk)(i)}}else{let e,n,s,o;e=n=1/0,s=o=-1/0;for(let t=0;t<i;++t){const i=r[2*t],a=r[2*t+1];e=Math.min(e,i),s=Math.max(s,i),n=Math.min(n,a),o=Math.max(o,a)}t={xmin:e,ymin:n,xmax:s,ymax:o,spatialReference:l}}if(s){let e=1/0,i=-1/0;for(const t of s)e=Math.min(e,t),i=Math.max(i,t);t.zmin=e,t.zmax=i}if(a){let e=1/0,i=-1/0;for(const t of a)e=Math.min(e,t),i=Math.max(i,t);t.mmin=e,t.mmax=i}return t}(e)),t}catch(e){i.error=e,i.hasError=!0}finally{(0,n.hk)(i)}}function x(e){let t,i,n;if((0,a.fT)(e)){n="point";const{x:r,y:s,z:o,m:a}=e,l=[r,s];null!=o&&l.push(o),null!=a&&l.push(a),i=[[l]],t=1}else(0,a.U9)(e)?(n="multipoint",i=[e.points],t=e.points.length):(0,a.Rg)(e)?(n="polyline",i=e.curvePaths??e.paths,t=i.reduce((e,t)=>e+t.length,0)):(n="polygon",i=e.curveRings??e.rings,t=i.reduce((e,t)=>(0===t.length||(e+=t.length,P(t[0],(0,p.yP)(t.at(-1)))&&--e),e),0));const r=Z(n,t,n.includes("point")?0:i.length,(0,a.Pv)(e),(0,a.W0)(e),(0,p.Ed)(e)),{hasZ:s,hasM:o,vertexXY:l,vertexZ:c,vertexM:h}=r;function u(e){l[2*d]=e[0],l[2*d+1]=e[1],s&&(c[d]=e[2]),o&&(h[d]=e[f]),++d}r.spatialReference=e.spatialReference??void 0;const f=r.hasZ?3:2;let d=0;if(!r.isMultipart()){if(!s&&!o){for(const[e,t]of i[0])l[2*d]=e,l[2*d+1]=t,++d;return r}for(const e of i[0])u(e);return r}const m="polygon"===n,{partOffsets:g}=r;let y=0;if(!(0,p.Ed)(e)){for(const e of i){if(g[y++]=d,0===e.length)continue;let t=e.length;if(m&&P(e[0],e.at(-1))&&--t,s||o)for(let i=0;i<t;++i)u(e[i]);else for(let i=0;i<t;++i){const[t,n]=e[i];l[2*d]=t,l[2*d+1]=n,++d}}return g[y]=d,r}function v(e){const t=w+e;if(t<=(r.segmentParams?.length??0))return;let i=t*j;i=20*Math.ceil(i/20);const n=r.segmentParams;r.segmentParams=new Float64Array(i),null!=n&&r.segmentParams.set(n)}let w=0;for(const e of i){if(r.partOffsets[y++]=d,0===e.length)continue;const t=e[0];let i=t;for(let t=1;t<e.length;++t){const n=e[t];u(i);const s=d-1;(0,p.wY)(n)?(v(10),++r.segmentCountArc,w=z(i,n,r,s,w),i=n.a[0]):(0,p.DA)(n)?(v(10),++r.segmentCountArc,w=E(i,n,r,s,w),i=n.a[0]):(0,p.aO)(n)?(v(10),++r.segmentCountArc,w=I(i,n,r,s,w),i=n.c[0]):(0,p.n1)(n)?(v(4),++r.segmentCountBezier,w=L(0,n,r,s,w),i=n.b[0]):i=n}m&&P(t,i)||u(i)}return r.partOffsets[y]=d,r}function b(e){const t=O(e),{vertexCount:i,partCount:n,hasZ:r,hasM:s}=e,o=R(e);if("point"===e.type){const[t,i]=e.vertexXY,n=e.vertexZ?.[0],r=e.vertexM?.[0];return{x:t,y:i,z:n,m:r,spatialReference:o}}let a=0;if("multipoint"===e.type){const e=[];for(;a<i;)e.push(t(a++));return{points:e,spatialReference:o,hasZ:r,hasM:s}}const l="polygon"===e.type;if(!e.hasCurves()){const i=new Array;for(let r=0;r<n;++r){const n=e.partOffsets[r+1],s=new Array;for(;a<n;)s.push(t(a++));l&&s.length>0&&s.push(s[0]),i.push(s)}return l?{rings:i,hasZ:r,hasM:s,spatialReference:o}:{paths:i,hasZ:r,hasM:s,spatialReference:o}}const c=new Array;for(const{segments:t,startVertex:i}of e.parts){const e=[i];for(const{curve:i}of t)e.push(i);c.push(e)}return l?{rings:[],curveRings:c,hasZ:r,hasM:s,spatialReference:o}:{paths:[],curvePaths:c,hasZ:r,hasM:s,spatialReference:o}}function M(e,{lengths:t,coords:i,hasZ:n,hasM:r},s){const o=e.includes("point")?0:t.length,a="polygon"===e,l="point"===e?1:t.reduce((e,t)=>e+t,0)-(a?o:0);n??=!1,r??=!1;const c=Z(e,l,o,n,r,!1,0,0);if(c.spatialReference=s??void 0,!c.isMultipart()){for(let e=0,t=0;e<l;++e)c.vertexXY[2*e]=i[t++],c.vertexXY[2*e+1]=i[t++],n&&(c.vertexZ[e]=i[t++]),r&&(c.vertexM[e]=i[t++]);return c}const h=2+Number(n)+Number(r);let u=0,p=0;c.partOffsets[0]=0;for(const e of t){const t=c.partOffsets[p],s=t+e-Number(a);c.partOffsets[++p]=s;for(let e=t;e<s;++e)c.vertexXY[2*e]=i[u++],c.vertexXY[2*e+1]=i[u++],n&&(c.vertexZ[e]=i[u++]),r&&(c.vertexM[e]=i[u++]);a&&(u+=h)}return c}function A({type:e,vertexCount:t,vertexXY:i,vertexZ:n,vertexM:r,partCount:s,partOffsets:o,hasZ:a,hasM:l}){const c=new m.A([],[],a,l);s=Math.max(s,1);const h="polygon"===e;let u=0;for(let e=0;e<s;++e){const s=o?.[e+1]??t,p=c.coords.length;for(let e=u;e<s;++e)c.coords.push(i[2*e],i[2*e+1]),a&&c.coords.push(n[e]),l&&c.coords.push(r[e]);if(h){const e=u;c.coords.push(i[2*e],i[2*e+1]),a&&c.coords.push(n[e]),l&&c.coords.push(r[e])}c.lengths.push((c.coords.length-p)/c.stride),u=s}return"point"===e&&(c.lengths.length=0),c}function T(e,t){return"getSpatialReference"in e&&(t=function(e){if(null==e)return;const t=e.getText()||void 0,i=e.isCustomWkid()?0:e.getOldID();if(i<=0)return{wkt:t};let n=e.getLatestID();(n<=0||n===i)&&(n=void 0);const r=e.getVCS();if(null==r)return{wkid:i,latestWkid:n,wkt:t};const s=r.isCustomWkid()?0:r.getOldID();if(s<=0)return{wkt:t};let o=e.getLatestVerticalID();return(o<=0||o===s)&&(o=void 0),{wkid:i,wkt:t,latestWkid:n,vcsWkid:s,latestVcsWkid:o}}(e.getSpatialReference()),e=e.getGeometry()),new g({...e.toFlatGeometry(),spatialReference:t})}class S{constructor(e,t){this.target=e,this.keys=t,this.oldValues=t.map(t=>e[t]);for(const i of t)e[i]=void 0}[Symbol.dispose](){this.keys.map((e,t)=>{this.target[e]=this.oldValues[t]})}}function R({spatialReference:e}){return e instanceof s.A?e.toJSON():e}function O({vertexXY:e,vertexZ:t,vertexM:i}){return t?i?n=>[e[2*n],e[2*n+1],t[n],i[n]]:i=>[e[2*i],e[2*i+1],t[i]]:i?t=>[e[2*t],e[2*t+1],i[t]]:t=>[e[2*t],e[2*t+1]]}function P(e,t){return e.every((e,i)=>e===t[i])}function Z(e,t,i,n,r,s,o,a){o??=0,a??=0;const l=new g({type:e,vertexCount:t,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:i,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:o,segmentCountBezier:a});let c=2*Float64Array.BYTES_PER_ELEMENT*t;n&&(c+=Float64Array.BYTES_PER_ELEMENT*t),r&&(c+=Float64Array.BYTES_PER_ELEMENT*t),l.isMultipart()&&(c+=(i+1)*Int32Array.BYTES_PER_ELEMENT,c+=(i+1)*Int8Array.BYTES_PER_ELEMENT),s&&(c+=t*Int8Array.BYTES_PER_ELEMENT,c+=t*Int32Array.BYTES_PER_ELEMENT,c+=l.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);const h=new ArrayBuffer(c);let u=0;return l.vertexXY=new Float64Array(h,u,2*t),u+=l.vertexXY.byteLength,n&&(l.vertexZ=new Float64Array(h,u,t),u+=l.vertexZ.byteLength),r&&(l.vertexM=new Float64Array(h,u,t),u+=l.vertexM.byteLength),s&&(l.segmentParams=new Float64Array(h,u,l.segmentParamCount),u+=l.segmentParams.byteLength,l.segmentIndices=new Int32Array(h,u,t),l.segmentIndices.fill(V),u+=l.segmentIndices.byteLength),l.isMultipart()&&(l.partOffsets=new Int32Array(h,u,i+1),u+=l.partOffsets.byteLength,l.partFlags=new Int8Array(h,u,i+1),u+=l.partFlags.byteLength,"polygon"===l.type&&l.partFlags.subarray(0,i).fill(1)),s&&(l.segmentFlags=new Int8Array(h,u,t),l.segmentFlags.fill(1),u+=l.segmentFlags.byteLength),l}function z(e,t,{segmentFlags:i,segmentIndices:n,segmentParams:r},s,o){i[s]=4,n[s]=o;const[a,[l,c],h,u,p,f,m]=t.a;let g=4;u||(g|=1),h||(g|=2);const y=(0,d.SW)(e,t),[v,w]=(0,d.Uk)(y,.5);return r[o++]=g,r[o++]=f,r[o++]=m,r[o++]=p,r[o++]=l,r[o++]=c,r[o++]=y.u2-y.u1,r[o++]=y.u1,r[o++]=v,r[o++]=w,o}function E(e,t,{segmentFlags:i,segmentIndices:n,segmentParams:r},s,o){i[s]=4,n[s]=o;const a=(0,f.io)(e,t);return D(a,4,...(0,c.mq)(a,.5),r,o)}function I(e,t,{segmentFlags:i,segmentIndices:n,segmentParams:r},s,o){return i[s]=4,n[s]=o,D((0,h.pM)(e,t),0,...t.c[1],r,o)}function D(e,t,i,n,r,s){const{cx:o,cy:a,thetaStart:l,thetaEnd:c,radius:h}=e;return l>c||(t|=1),Math.abs(c-l)<=Math.PI||(t|=2),r[s++]=t,r[s++]=h,r[s++]=1,r[s++]=0,r[s++]=o,r[s++]=a,r[s++]=c-l,r[s++]=l,r[s++]=i,r[s++]=n,s}function L(e,{b:[t,[i,n],[r,s]]},{segmentFlags:o,segmentIndices:a,segmentParams:l},c,h){return o[c]=2,a[c]=h,l[h++]=i,l[h++]=n,l[h++]=r,l[h++]=s,h}const j=1.61803,V=-1},54239(e,t,i){i.d(t,{A:()=>g});var n,r=i(5482),s=i(4576),o=i(66552),a=i(25482),l=i(86211),c=i(67076),h=i(91429),u=i(43937),p=i(36005);const f=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),d=f.jsonValues.slice();(0,s.Xy)(d,"orthometric");const m=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let g=n=class extends a.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return f.write(e,t,i)}readHeightModel(e,t,i){return f.read(e)||(i?.messages&&i.messages.push(function(e,t){return new c.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return m.read(e)||(i?.messages&&i.messages.push(y(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,l.LA)(e)||m.read(e)||(i?.messages&&i.messages.push(y(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new n({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,l.k1)(t);return new n({heightModel:e.heightModel,heightUnit:i??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new n;return t.read(e,{origin:"web-scene"}),t}};function y(e,t){return new c.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,r.Cg)([(0,h.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:d,default:"ellipsoidal",write:{isRequired:!0}}}}})],g.prototype,"heightModel",void 0),(0,r.Cg)([(0,u.K)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,r.Cg)([(0,p.w)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,r.Cg)([(0,h.MZ)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:{writer:m.write,isRequired:!0}}}}})],g.prototype,"heightUnit",void 0),(0,r.Cg)([(0,p.w)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,r.Cg)([(0,p.w)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,r.Cg)([(0,h.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,r.Cg)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=n=(0,r.Cg)([(0,h.$K)("esri.geometry.HeightModelInfo")],g)},86742(e,t,i){i.d(t,{Hh:()=>o,fz:()=>l,g7:()=>a,s1:()=>s});var n=i(83290);let r;function s(){return!!r&&(0,n.i)()}async function o(){if(!s()){const[e,t]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(6859),i.e(6558)]).then(i.bind(i,6558)),Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(6061)]).then(i.bind(i,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,n.l)()]);r=new e.OperatorGeodeticArea,t(n.p)}}function a(e,t,i){return r.execute(e,t,i,null)}function l(){return r.supportsCurves()}},77085(e,t,i){i.d(t,{Hh:()=>a,fz:()=>h,g7:()=>l,s1:()=>o,zo:()=>c});var n=i(76061),r=i(83290);let s;function o(){return!!s&&(0,r.i)()}async function a(){if(!o()){const[e,t]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(1088)]).then(i.bind(i,31088)),Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756)]).then(i.bind(i,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,r.l)()]);s=new e.OperatorGeodeticDensifyByLength,t(r.p)}}function l(e,t,i,n){return s.execute(e,t,i,n,null)}function c(e,t,i,r){const o=s.executeMany(new n.S(e),t,i,r,null);return Array.from(o)}function h(){return s.supportsCurves()}},35223(e,t,i){i.d(t,{Hh:()=>o,fz:()=>l,g7:()=>a,s1:()=>s});var n=i(83290);let r;function s(){return!!r&&(0,n.i)()}async function o(){if(!s()){const[e,t]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(4167)]).then(i.bind(i,28879)),Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(6061)]).then(i.bind(i,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,n.l)()]);r=new e.OperatorGeodeticLength,t(n.p)}}function a(e,t,i){return r.execute(e,t,i,null)}function l(){return r.supportsCurves()}},4144(e,t,i){i.d(t,{Hh:()=>a,fz:()=>h,g7:()=>l,s1:()=>o,zo:()=>c});var n=i(76061),r=i(83290);let s;function o(){return!!s&&(0,r.i)()}async function a(){if(!o()){const[e,t]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(9192)]).then(i.bind(i,9192)),Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756)]).then(i.bind(i,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,r.l)()]);s=new e.OperatorProject,t(r.p)}}function l(e,t){return s.execute(e,t,null)}function c(e,t){const i=s.executeMany(new n.S(e),t,null);return Array.from(i)}function h(){return s.supportsCurves()}},81150(e,t,i){i.d(t,{Pg:()=>l,fz:()=>c,g7:()=>o,zo:()=>a});var n=i(76061),r=(i(55537),i(88885),i(15756));i(95213);const s=new r.f;function o(e,t,i){return s.execute(e,t,i,null)}function a(e,t,i){const r=s.executeMany(new n.S(e),t,i,null);return Array.from(r)}function l(e,t,i){return s.isSimpleAsFeature(e,t,i,null,null)}function c(){return s.supportsCurves()}},83276(e,t,i){i.r(t),i.d(t,{execute:()=>f,executeMany:()=>d,isLoaded:()=>u,load:()=>p,supportsCurves:()=>h});var n=i(4144),r=i(17499);let s,o,a,l,c,h;function u(){return!!s&&(0,n.s1)()}async function p(){if(!u()){const[e,t]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(9285)]).then(i.bind(i,78125)),Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(6129)]).then(i.bind(i,86129)),(0,n.Hh)()]);s=e.fromGeometry,o=e.fromSpatialReference,a=e.getSpatialReference,l=e.toGeometry,c=t.createProjectionTransformation,h=(0,n.fz)()}}function f(e,t,i){const h=a(e),u=c(o(h),o(t),i),p=l((0,n.g7)(s(e),u),t);return!i?.zConversionDisabled&&p?.hasZ&&(0,r.gw)([p],h,t),p}function d(e,t,i){const h=e.map(s),u=a(e),p=c(o(u),o(t),i),f=(0,n.zo)(h,p).map(e=>l(e,t));return!i?.zConversionDisabled&&f&&(0,r.gw)(f,u,t),f}},78125(e,t,i){i.r(t),i.d(t,{fromExtent:()=>g,fromGeometry:()=>m,fromMultipoint:()=>y,fromPoint:()=>v,fromPolygon:()=>w,fromPolyline:()=>_,fromPolylineUsingImportOperator:()=>C,fromSpatialReference:()=>x,getSpatialReference:()=>d,toExtent:()=>M,toGeometry:()=>b,toMultipoint:()=>A,toPoint:()=>T,toPolygon:()=>S,toPolyline:()=>R});var n=i(83661),r=(i(79187),i(55537)),s=i(95213),o=i(88885),a=i(5443),l=i(48526),c=i(86738),h=i(39829),u=i(82799),p=(i(90293),i(83299));const f="_gxVersion";function d(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function m(e){switch(e.type){case"point":return v(e);case"multipoint":return y(e);case"polyline":return _(e);case"polygon":return w(e);case"extent":return g(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function g(e){if(!e.getCacheValue(f)){const t=new s.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(2,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(1,0,e.zmin,e.zmax),e.setCacheValue(f,t)}return e.getCacheValue(f)}function y(e){if(!e.getCacheValue(f)){const t=new o.M,i=new s.P,n=e.points,r=e.hasM,a=e.hasZ,l=a?3:2;for(let e=0,s=n.length;e<s;e++){const s=n[e];i.setXYCoords(s[0],s[1]),a&&i.setZ(s[2]??0),r&&i.setM(s[l]??NaN),t.add(i)}e.setCacheValue(f,t)}return e.getCacheValue(f)}function v(e){if(!e.getCacheValue(f)){const t=new s.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(f,t)}return e.getCacheValue(f)}function w(e){if(!e.getCacheValue(f)){const{curveRings:t,hasM:i,hasZ:n,rings:r}=e,s=(0,p.fromGeometryToGXGeometry)({curveRings:t,hasM:i,hasZ:n,rings:r});e.setCacheValue(f,s)}return e.getCacheValue(f)}function _(e){if(!e.getCacheValue(f)){const{curvePaths:t,hasM:i,hasZ:n,paths:r}=e,s=(0,p.fromGeometryToGXGeometry)({curvePaths:t,hasM:i,hasZ:n,paths:r});e.setCacheValue(f,s)}return e.getCacheValue(f)}function C(e){if(!e.getCacheValue(f)){const{curvePaths:t,hasM:i,hasZ:n,paths:r}=e,s=(0,p.fromGeometryToGXGeometryUsingImportOperator)({curvePaths:t,hasM:i,hasZ:n,paths:r});e.setCacheValue(f,s)}return e.getCacheValue(f)}function x(e){return e.cache?(e.cache[f]??=(0,p.fromSpatialReference)(e),e.cache[f]):(0,p.fromSpatialReference)(e)}function b(e,t){if(e)switch(e.getGeometryType()){case r.G.enumPoint:return T(e,t);case r.G.enumEnvelope:return M(e,t);case r.G.enumMultiPoint:return A(e,t);case r.G.enumPolyline:return R(e,t);case r.G.enumPolygon:return S(e,t)}return null}function M(e,t){if(e.isEmpty())return null;const i=new a.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),n=e.getDescription();if(n.hasM()){const t=e.queryInterval(2,0);i.mmin=t.vmin,i.mmax=t.vmax}if(n.hasZ()){const t=e.queryInterval(1,0);i.zmin=t.vmin,i.zmax=t.vmax}return i.setCacheValue(f,e),i}function A(e,t){if(e.isEmpty())return null;const i=e.getDescription(),n=i.hasM(),r=i.hasZ(),o=[],a=new s.P;for(let t=0,i=e.getPointCount();t<i;t++){e.getPointByVal(t,a);const i=[a.getX(),a.getY()];r&&i.push(a.getZ()),n&&i.push(a.getM()),o.push(i)}const c=new l.A({hasM:n,hasZ:r,points:o,spatialReference:t});return c.setCacheValue(f,e),c}function T(e,t){if(e instanceof n.P)return new c.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const i=new c.A({x:e.getX(),y:e.getY(),spatialReference:t}),r=e.getDescription();return r.hasM()&&(i.m=e.getM()),r.hasZ()&&(i.z=e.getZ()),i.setCacheValue(f,e),i}function S(e,t){if(e.isEmpty())return null;const i=h.A.fromJSON({...(0,p.toGeometry)(e,null),spatialReference:t});return i.setCacheValue(f,e),i}function R(e,t){if(e.isEmpty())return null;const i=u.A.fromJSON({...(0,p.toGeometry)(e,null),spatialReference:t});return i.setCacheValue(f,e),i}},5808(e,t,i){i.d(t,{O:()=>n});const n={geodesic:0,loxodrome:1,"great-elliptic":2,"normal-section":3,"shape-preserving":4}},17499(e,t,i){i.d(t,{gw:()=>o});var n=i(49186),r=i(60408),s=i(62815);function o(e,t,i){let n;for(const o of e)if(o&&(0,r.Pv)(o)&&!("vertexAttributes"in o)){if(!n){null==t.vcsWkid&&null==i.vcsWkid||l(t,i);const e="type"in o?o.type:(0,r.$B)(o);if(n=(0,s.N)(e,t,i),!n)return}n(o)}}class a extends n.A{constructor(){super("projection:z-unsupported","projection of z values is unsupported between different vertical coordinate systems")}}function l({vcsWkid:e},{vcsWkid:t}){if((e??null)!==(t??null))throw new a}},72727(e,t,i){function n(e,t,i){if(t<=0)return 0;const n=e-i;return n<0?0:Math.floor(n/t)+1}i.d(t,{k:()=>n}),i(53966)},27921(e,t,i){i.d(t,{$Q:()=>_,C:()=>a,Cr:()=>h,O_:()=>c,Qj:()=>l,T7:()=>v,Tj:()=>w,lU:()=>u,mN:()=>C,vE:()=>x,vt:()=>o});var n=i(34727),r=i(35522),s=i(51850);function o(e=b){return[e[0],e[1],e[2],e[3]]}function a(e,t){return function(e,t,i,n,r=o()){return r[0]=e,r[1]=t,r[2]=i,r[3]=n,r}(t[0],t[1],t[2],t[3],e)}function l(e){return e}function c(e,t,i){const n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=Math.abs(n-1)>1e-5&&n>1e-12?1/Math.sqrt(n):1;return i[0]=t[0]*r,i[1]=t[1]*r,i[2]=t[2]*r,i[3]=-(i[0]*e[0]+i[1]*e[1]+i[2]*e[2]),i}function h(e,t,i,n=o()){const r=i[0]-t[0],s=i[1]-t[1],a=i[2]-t[2],l=e[0]-t[0],c=e[1]-t[1],h=e[2]-t[2],u=s*h-a*c,p=a*l-r*h,f=r*c-s*l,d=u*u+p*p+f*f,m=Math.abs(d-1)>1e-5&&d>1e-12?1/Math.sqrt(d):1;return n[0]=u*m,n[1]=p*m,n[2]=f*m,n[3]=-(n[0]*e[0]+n[1]*e[1]+n[2]*e[2]),n}function u(e,t,i,n=0,s=Math.floor(i*(1/3)),o=Math.floor(i*(2/3))){if(i<3)return!1;t(f,n);let a=s,l=!1;for(;a<i-1&&!l;)t(d,a),a++,l=!(0,r.t2)(f,d);if(!l)return!1;for(a=Math.max(a,o),l=!1;a<i&&!l;)t(m,a),a++,(0,r.Re)(g,f,d),(0,r.S8)(g,g),(0,r.Re)(y,d,m),(0,r.S8)(y,y),l=!(0,r.t2)(f,m)&&!(0,r.t2)(d,m)&&Math.abs((0,r.Om)(g,y))<p;return l?(h(f,d,m,e),!0):(0!==n||1!==s||2!==o)&&u(e,t,i,0,1,2)}i(78955),i(44280),i(32114),i(32728);const p=.99619469809,f=(0,s.vt)(),d=(0,s.vt)(),m=(0,s.vt)(),g=(0,s.vt)(),y=(0,s.vt)();function v(e,t,i){return function(e){return 0===e||1===e}(x(e,t.origin,t.vector,0,i))}function w(e,t){return C(e,t)>=0}function _(e,t){const i=(0,r.Om)(e,t.ray.direction),n=-C(e,t.ray.origin);if(n<0&&i>=0)return!1;if(i>-1e-6&&i<1e-6)return n>0;if((n<0||i<0)&&!(n<0&&i<0))return!0;const s=n/i;return i>0?s<t.c1&&(t.c1=s):s>t.c0&&(t.c0=s),t.c0<=t.c1}function C(e,t){return(0,r.Om)(e,t)+e[3]}function x(e,t,i,s,o){const a=(0,r.Om)(e,i),l=C(e,t);if(0===a)return l>=0?2:3;let c=-l/a;return 1&s&&(c=(0,n.qE)(c,0,1)),!(4&s)&&c<0||!(8&s)&&c>1?l>=0?2:3:((0,r.WQ)(o,t,(0,r.hs)(o,i,c)),l>=0?0:1)}const b=[0,0,1,0]},44280(e,t,i){i.d(t,{g7:()=>a,gr:()=>o});var n=i(34727),r=i(35522),s=i(51850);function o(e,t){return(0,r.Om)(e,t)/(0,r.Bw)(e)}function a(e,t){const i=(0,r.Om)(e,t)/((0,r.Bw)(e)*(0,r.Bw)(t));return-(0,n.XM)(i)}(0,s.vt)(),(0,s.vt)()},32114(e,t,i){i.d(t,{Rc:()=>f,J8:()=>d,rq:()=>u,Km:()=>p}),i(44208);var n=i(26390),r=i(29242),s=i(9093),o=i(82534),a=i(48163),l=i(51850),c=i(91829);class h{constructor(e){this._create=e,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,n.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const e=2*this._itemsPtr;this._items.length>e&&(this._items.length=e),this._itemsPtr=0}static createVec2f64(){return new h(a.vt)}static createVec3f64(){return new h(l.vt)}static createVec4f64(){return new h(c.vt)}static createMat3f64(){return new h(r.vt)}static createMat4f64(){return new h(s.vt)}static createQuatf64(){return new h(o.vt)}get test(){}}h.createVec2f64();const u=h.createVec3f64(),p=h.createVec4f64(),f=(h.createMat3f64(),h.createMat4f64()),d=h.createQuatf64()},38732(e,t,i){i.r(t),i.d(t,{default:()=>A});var n=i(5482),r=i(11254),s=i(49186),o=i(97768),a=i(25728),l=i(17676),c=i(84952),h=i(91429),u=i(54239),p=i(4146),f=i(89186),d=i(18768),m=i(34287),g=i(8303),y=i(10873),v=i(87378),w=i(35982);class _ extends w.B{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(C.forEach((e,t)=>{e===this&&C.delete(t)}),this.destroy())}}const C=new Map;var x=i(36005);let b=class extends((0,f.f)((0,d.b)((0,m.q)((0,g.A)((0,a.M)(p.A)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=C.get(e);return t||(null!=e?(t=new _(t=>e.immediate.schedule(t)),C.set(e,t)):(t=new _,C.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.Gz)(this._lercDecoder)}readCapabilities(e,t){const i=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());return i?{operations:{supportsTileMap:i.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let i=t.currentVersion;return i||(i=9.3),i}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new s.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(l.QP).then(()=>this._fetchImageService(t))),Promise.resolve(this)}async fetchTile(e,t,i,n){const o=n?.signal,a={responseType:"array-buffer",signal:o,useQueue:n?.useQueue,priority:n?.priority},l={noDataValue:n?.noDataValue,returnFileInfo:!0};await this.load(),await this._fetchTileAvailability(e,t,i,n);const c=await(0,r.A)(this.getTileUrl(e,t,i),a),h=await this._lercDecoder.decode(c.data,l,o);if(!h)throw new s.A("elevation-layer:tile-decode-failed","Failed to decode elevation tile data.");return new v.A({values:h.pixelData,width:h.width,height:h.height,noDataValue:h.noDataValue})}getTileUrl(e,t,i){const n=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,r=(0,c.x0)({...this.parsedUrl.query,blankTile:!n&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${r?"?"+r:""}`}async queryElevation(e,t){const{query:n}=await i.e(91).then(i.bind(i,90091));return(0,l.Te)(t),n(this,e,t)}async createElevationSampler(e,t){const{createSampler:n}=await i.e(91).then(i.bind(i,90091));return(0,l.Te)(t),n(this,e,t)}_fetchTileAvailability(e,t,i,n){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,n):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await(0,r.A)(this.parsedUrl.path,t);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[M]}};(0,n.Cg)([(0,h.MZ)({readOnly:!0})],b.prototype,"capabilities",void 0),(0,n.Cg)([(0,x.w)("service","capabilities",["capabilities"])],b.prototype,"readCapabilities",null),(0,n.Cg)([(0,h.MZ)({json:{read:{source:"copyrightText"}}})],b.prototype,"copyright",void 0),(0,n.Cg)([(0,h.MZ)({readOnly:!0,type:u.A})],b.prototype,"heightModelInfo",void 0),(0,n.Cg)([(0,h.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],b.prototype,"path",void 0),(0,n.Cg)([(0,h.MZ)({type:["show","hide"]})],b.prototype,"listMode",void 0),(0,n.Cg)([(0,h.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],b.prototype,"minScale",void 0),(0,n.Cg)([(0,h.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],b.prototype,"maxScale",void 0),(0,n.Cg)([(0,h.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],b.prototype,"opacity",void 0),(0,n.Cg)([(0,h.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],b.prototype,"operationalLayerType",void 0),(0,n.Cg)([(0,h.MZ)()],b.prototype,"sourceJSON",void 0),(0,n.Cg)([(0,h.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],b.prototype,"type",void 0),(0,n.Cg)([(0,h.MZ)(y.OZ)],b.prototype,"url",void 0),(0,n.Cg)([(0,h.MZ)()],b.prototype,"version",void 0),(0,n.Cg)([(0,x.w)("version",["currentVersion"])],b.prototype,"readVersion",null),b=(0,n.Cg)([(0,h.$K)("esri.layers.ElevationLayer")],b);const M=Symbol("default-fetch-tile");b.prototype.fetchTile[M]=!0;const A=b},4146(e,t,i){i.d(t,{A:()=>v});var n=i(5482),r=i(11254),s=i(49186),o=i(65529),a=i(4902),l=i(92474),c=i(53966),h=i(17676),u=i(84952),p=i(91429),f=i(5443),d=i(16930),m=i(92602),g=i(79677);let y=0,v=class extends((0,o.Zt)((0,a.s)(l.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.A(-180,-90,180,90,d.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+y++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=d.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([i.e(812),i.e(7982)]).then(i.bind(i,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:n}=await Promise.all([i.e(812),i.e(5613),i.e(909)]).then(i.bind(i,45613));try{return await n(t)}catch(e){const i=t?.portalItem,n=i?.id||"unset",r=i?.portal?.url||m.A.portalUrl;throw c.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+r+"', id: '"+n+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,h.zf)(e)||c.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,u.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,r.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,n.Cg)([(0,p.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,n.Cg)([(0,p.MZ)({type:f.A})],v.prototype,"fullExtent",void 0),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,n.Cg)([(0,p.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,n.Cg)([(0,p.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,n.Cg)([(0,p.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,n.Cg)([(0,p.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,n.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,n.Cg)([(0,p.MZ)({type:d.A})],v.prototype,"spatialReference",void 0),(0,n.Cg)([(0,p.MZ)({type:String})],v.prototype,"title",void 0),(0,n.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,n.Cg)([(0,p.MZ)()],v.prototype,"url",void 0),(0,n.Cg)([(0,p.MZ)({type:g.A})],v.prototype,"visibilityTimeExtent",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,n.Cg)([(0,p.$K)("esri.layers.Layer")],v)},92722(e,t,i){i.d(t,{A:()=>r});var n=i(69397);class r{constructor(e=[],t=[],i=!1,n=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=i,this.hasM=n}static fromJSON({lengths:e,coords:t,hasZ:i,hasM:n}){return new r(e,t,i||!1,n||!1)}static fromRect([e,t,i,n]){const s=i-e,o=n-t;return new r([5],[e,t,s,0,0,o,-s,0,0,-o])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,n.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let e=0,t=0;for(const i of this.lengths){if(i<3)continue;const{stride:n}=this;let r=this.coords[n*t],s=this.coords[n*t+1];for(let o=1;o<i;o+=1){const i=n*(t+o),a=this.coords[i],l=this.coords[i+1];e+=-.5*(a-r)*(l+s),r=a,s=l}t+=i}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);const{stride:i}=this;for(const n of this.lengths){for(let r=0;r<n;r++){const n=i*(t+r);e(this.coords[n],this.coords[n+1])}t+=n}}deltaDecode(){const e=this.clone(),{coords:t,lengths:i}=e;let n=0;const{stride:r}=this;for(const e of i){for(let i=1;i<e;i++){const e=r*(n+i);t[e]+=t[e-r],t[e+1]+=t[e+1-r]}n+=e}return e}clone(e){if(this.isPoint)return new r([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const t=Array.from(this.lengths),{stride:i,size:n}=this,s=this.coords.slice(0,n*i);return e?(e.set(s),new r(t,e,this.hasZ,this.hasM)):new r(t,Array.from(s),this.hasZ,this.hasM)}justXY(){const{stride:e,size:t}=this;if(2===e)return this;const i=new Array(t*e);for(let t=0,n=0;t<i.length;t+=e)i[n++]=this.coords[t],i[n++]=this.coords[t+1];return new r(this.lengths,i,!1,!1)}}},89186(e,t,i){i.d(t,{f:()=>h});var n=i(5482),r=i(91429),s=i(16930),o=i(87045),a=i(65509),l=i(25943),c=i(36005);const h=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,i){const n=t.capabilities?.toLowerCase().includes("tilemap");let{minLOD:r,maxLOD:s,minScale:c,maxScale:h}=t;if(null==r&&null==s&&(0!==c||0!==h)){const e=e=>Math.round(1e4*e)/1e4;c=e(c||t.tileInfo.lods[0].scale),h=e(h||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(const i of t.tileInfo.lods){const t=e(i.scale);r=t>=c?i.level:r,s=t>=h?i.level:s}}if(n)return new l.d({layer:this,minLOD:r,maxLOD:s});if(t.tileInfo){const e=new o.A;return e.read(t.tileInfo,i),new a.A(e,r,s)}return null}};return(0,n.Cg)([(0,r.MZ)({json:{read:{source:"copyrightText"}}})],i.prototype,"copyright",void 0),(0,n.Cg)([(0,r.MZ)()],i.prototype,"minScale",void 0),(0,n.Cg)([(0,c.w)("service","minScale")],i.prototype,"readMinScale",null),(0,n.Cg)([(0,r.MZ)()],i.prototype,"maxScale",void 0),(0,n.Cg)([(0,c.w)("service","maxScale")],i.prototype,"readMaxScale",null),(0,n.Cg)([(0,r.MZ)({type:s.A})],i.prototype,"spatialReference",void 0),(0,n.Cg)([(0,r.MZ)({readOnly:!0})],i.prototype,"supportsBlankTile",null),(0,n.Cg)([(0,r.MZ)({type:o.A})],i.prototype,"tileInfo",void 0),(0,n.Cg)([(0,r.MZ)()],i.prototype,"tilemapCache",void 0),(0,n.Cg)([(0,c.w)("service","tilemapCache",["capabilities","tileInfo"])],i.prototype,"readTilemapCache",null),(0,n.Cg)([(0,r.MZ)()],i.prototype,"version",void 0),i=(0,n.Cg)([(0,r.$K)("esri.layers.mixins.ArcGISCachedService")],i),i}},63490(e,t,i){i.d(t,{E1:()=>c,Mr:()=>l,TH:()=>a});var n=i(5482),r=i(69540),s=i(25482),o=i(91429);let a=class extends((0,r.OU)(s.o)){constructor(){super(...arguments),this.url=null}};(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],a.prototype,"lod",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],a.prototype,"rasterFunction",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],a.prototype,"url",void 0),a=(0,n.Cg)([(0,o.$K)("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ElevationSource")],a);let l=class extends((0,r.OU)(s.o)){constructor(e){super(e),this.constantElevation=null}};(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],l.prototype,"constantElevation",void 0),l=(0,n.Cg)([(0,o.$K)("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ConstantElevation")],l);const c=e=>null!=e&&"number"==typeof e.constantElevation},23281(e,t,i){i.d(t,{eR:()=>x,Qv:()=>O,fs:()=>A,Yp:()=>P,o:()=>z,RR:()=>b,l6:()=>M});var n=i(66552),r=(i(86211),i(28735),i(5482)),s=i(69540),o=i(25482),a=i(91429),l=i(69622),c=i(21325);let h=class extends l.A{set horizontalWKID(e){e?(0,c.fn)({wkid:+e})?this._set("horizontalWKID",+e):this._set("horizontalWKID",e):this._set("horizontalWKID",null)}set verticalWKID(e){e?this._set("verticalWKID",isFinite(e)&&(0,c.fn)({wkid:+e})?+e:null):this._set("verticalWKID",null)}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:i,radialDistortionCoefficients:n,tangentialDistortionCoefficients:r}=this;return e?.length>1&&!Number.isNaN(t)&&i?.length>1&&n?.length>1&&r?.length>1}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"affineTransformations",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"focalLength",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"principalOffsetPoint",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"radialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"tangentialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"horizontalWKID",null),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"verticalWKID",null),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"x",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"y",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"z",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"type",void 0),h=(0,r.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientation")],h);const u=h;let p=class extends((0,s.OU)((0,o.T)(u))){constructor(){super(...arguments),this.type=1}toString(){const{type:e,horizontalWKID:t,verticalWKID:i,x:n,y:r,z:s,heading:o,pitch:a,roll:l,affineTransformations:c,focalLength:h,principalOffsetPoint:u,radialDistortionCoefficients:p,tangentialDistortionCoefficients:f}=this,d=[e,t,i,n,r,s,o,a,l];return this.isAdvanced&&(c?.forEach(e=>d.push(e)),d.push(h),u?.forEach(e=>d.push(e)),p?.forEach(e=>d.push(e)),f?.forEach(e=>d.push(e))),d.map(e=>Number.isNaN(e)?"":e).join("|")}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"affineTransformations",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"focalLength",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"principalOffsetPoint",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"radialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"tangentialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"heading",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"pitch",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"roll",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"x",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"y",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"z",void 0),p=(0,r.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientationHPR")],p);const f=p;let d=class extends((0,s.OU)((0,o.T)(u))){constructor(){super(...arguments),this.type=4}toString(){const{type:e,latitude:t,longitude:i,ellipsoidRadius:n,squaredEccentricity:r,properties:s}=this,o=`${s}`.split("|");return o.splice(1,1),`${e}|${t}|${i}|${n}|${r}|${o.join("|")}`}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0},type:Number})],d.prototype,"latitude",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0},type:Number})],d.prototype,"longitude",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0},type:Number})],d.prototype,"ellipsoidRadius",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0},type:Number})],d.prototype,"squaredEccentricity",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"properties",void 0),d=(0,r.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientationLTP")],d);const m=d;let g=class extends((0,s.OU)((0,o.T)(u))){constructor(){super(...arguments),this.type=2}toString(){const{type:e,horizontalWKID:t,verticalWKID:i,x:n,y:r,z:s,omega:o,phi:a,kappa:l,affineTransformations:c,focalLength:h,principalOffsetPoint:u,radialDistortionCoefficients:p,tangentialDistortionCoefficients:f}=this,d=[e,t,i,n,r,s,o,a,l];return this.isAdvanced&&(c?.forEach(e=>d.push(e)),d.push(h),u?.forEach(e=>d.push(e)),p?.forEach(e=>d.push(e)),f?.forEach(e=>d.push(e))),d.map(e=>isNaN(e)?"":e).join("|")}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],g.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"affineTransformations",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"focalLength",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"principalOffsetPoint",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"radialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"tangentialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"omega",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"phi",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"kappa",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"x",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"y",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"z",void 0),g=(0,r.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientationOPK")],g);const y=g;let v=class extends((0,s.OU)((0,o.T)(u))){constructor(){super(...arguments),this.type=3}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:i,radialDistortionCoefficients:n,tangentialDistortionCoefficients:r}=this;return e?.length>1||!Number.isNaN(t)||i?.length>1||n?.length>1||r?.length>1}toString(){const{type:e,horizontalWKID:t,verticalWKID:i,x:n,y:r,z:s,yaw:o,pitch:a,roll:l,affineTransformations:c,focalLength:h,principalOffsetPoint:u,radialDistortionCoefficients:p,tangentialDistortionCoefficients:f}=this,d=[e,t,i,n,r,s,o,a,l];return this.isAdvanced&&(c?.forEach(e=>d.push(e)),d.push(h),u?.forEach(e=>d.push(e)),u?.forEach(e=>d.push(e)),p?.forEach(e=>d.push(e)),f?.forEach(e=>d.push(e))),d.map(e=>Number.isNaN(e)?"":e).join("|")}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],v.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"affineTransformations",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"focalLength",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"principalOffsetPoint",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"radialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"tangentialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"yaw",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"pitch",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"roll",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"x",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"y",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"z",void 0),v=(0,r.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientationYPR")],v);const w=v,_=new Map;_.set("2",{desc:"Using Omega Phi Kappa",constructor:y}),_.set("1",{desc:"Using Heading, Pitch and Roll",constructor:f}),_.set("3",{desc:"Using Yaw, Pitch and Roll",constructor:w}),_.set("4",{desc:"Using Local Tangent Plane",constructor:m});var C=i(63490);function x(e,t,i){return e?(0,C.E1)(e)?new C.Mr(e):function(e,t,i){let{url:n}=e;return n?(n=function(e,t,i){return t&&(e=`${t}${e}`),i&&(e+=`${i}`),e}(n,t,i),new C.TH({...e,url:n})):null}(e,t,i):e}const b=new n.J({Minutes:"minutes",Hours:"hours",Days:"days",Weeks:"weeks",Months:"months",Years:"years"}),M=new n.J({Feet:"feet",Meter:"meter"}),A=new n.J({360:"360",Horizontal:"horizontal",Inspection:"inspection",Nadir:"nadir",Oblique:"oblique",Terrestrial360Video:"terrestrial-360-video",TerrestrialFrameVideo:"terrestrial-frame-video",Aerial360Video:"aerial-360-video",AerialFrameVideo:"aerial-frame-video","":null}),T=new Map;T.set("1",function(e){const[t,i,n,r,s,o,a,l,c,h,u,p,f,d,m,g,y,v,w,_,C,x]=e.slice(1);return{horizontalWKID:t,verticalWKID:i,x:n,y:r,z:s,heading:o,pitch:a,roll:l,...R([c,h,u,p,f,d],[g,y],[v,w,_],[C,x],m)}}),T.set("3",function(e){const[t,i,n,r,s,o,a,l,c,h,u,p,f,d,m,g,y,v,w,_,C,x]=e.slice(1);return{horizontalWKID:t,verticalWKID:i,x:n,y:r,z:s,yaw:o,pitch:a,roll:l,...R([c,h,u,p,f,d],[g,y],[v,w,_],[C,x],m)}}),T.set("2",function(e){const[t,i,n,r,s,o,a,l,c,h,u,p,f,d,m,g,y,v,w,_,C,x]=e.slice(1);return{horizontalWKID:t,verticalWKID:i,x:n,y:r,z:s,omega:o,phi:a,kappa:l,...R([c,h,u,p,f,d],[g,y],[v,w,_],[C,x],m)}}),T.set("4",function(e){const[t,i,n,r,s,...o]=e.slice(1),a=T.get(s),l=_.get(s)?.constructor;return a&&l?{latitude:t,longitude:i,ellipsoidRadius:n,squaredEccentricity:r,properties:new l(a([s,"",...o]))}:null});const S=e=>{const t=e.map(e=>parseFloat(e)).filter(e=>!isNaN(e));if(t.length===e.length)return t};function R(e,t,i,n,r){const s=S(e),o=S(t),a=S(i),l=S(n);return{affineTransformations:6===s?.length?s:void 0,focalLength:6===s?.length?parseFloat(r):void 0,principalOffsetPoint:2!==o?.length?[0,0]:o,radialDistortionCoefficients:3!==a?.length?[0,0,0]:a,tangentialDistortionCoefficients:2!==l?.length?[0,0]:l}}function O(e){return Array.isArray(e)&&e?.length>5&&!e.some(isNaN)}function P(e){for(e=e.slice(0,8);e.length<8;)e.push(0);return e}const Z="sequenceorder";function z(e,t){if(!e){const e=t.find(e=>e.name.toLocaleLowerCase()===Z.toLocaleLowerCase());return e?[{fieldName:e.name,sortOrder:"asc"}]:null}return e.split(";").map(e=>{const[i,n]=e.split(/\s+/).map(e=>e.trim()),r=t.find(e=>e.name.toLowerCase()===i.toLowerCase());return r?{fieldName:r?r.name:Z,sortOrder:"desc"===n?"desc":"asc"}:null}).filter(e=>null!=e)}},90091(e,t,i){i.d(t,{createSampler:()=>O,query:()=>R});var n=i(60999),r=i(49186),s=i(97768),o=i(17676),a=i(86211),l=i(91218),c=i(19419),h=i(4576),u=i(72802);class p{constructor(e,t){this.layer=e,this.parameters=t}}class f extends p{constructor(e,t,i){super(e,i),this.outSpatialReference=t,this.type="geometry"}selectTilesAtLOD(e){if(e<0)this.geometry.coordinates.forEach(e=>e.tile=null);else{const{tileInfo:t,tilemapCache:i}=this.layer,n=g(t,i)[e].level;this.geometry.coordinates.forEach(e=>e.tile=t.tileAt(n,e.x,e.y))}}allElevationTilesFetched(){return!this.geometry.coordinates.some(e=>!e.elevationTile)}clearElevationTiles(){for(const e of this.geometry.coordinates)e.elevationTile!==this.outsideExtentTile&&(e.elevationTile=null)}populateElevationTiles(e){for(const t of this.geometry.coordinates)!t.elevationTile&&t.tile?.id&&(t.elevationTile=e[t.tile.id])}remapTiles(e){for(const t of this.geometry.coordinates){const i=t.tile?.id;t.tile=i?e[i]:null}}getTilesToFetch(){return(0,h.Am)(this.geometry.coordinates.filter(({tile:e,elevationTile:t})=>e?.id&&!t),(e,t)=>e.tile?.id===t.tile?.id).map(({tile:e})=>e)}forEachTileToFetch(e){for(const t of this.geometry.coordinates)t.tile&&!t.elevationTile&&e(t.tile,()=>t.tile=null)}}class d extends p{constructor(e,t,i,n){super(e,i),this.maskExtents=n,this.type="extent",this.elevationTiles=[],this._candidateTiles=[],this._fetchedCandidates=new Set,this.extent=t.clone().intersection(e.fullExtent)}selectTilesAtLOD(e,t){const i=this._maximumLodForRequests(t),n=Math.min(i,e);n<0?this._candidateTiles.length=0:this._selectCandidateTilesCoveringExtentAt(n)}_maximumLodForRequests(e){const{tileInfo:t,tilemapCache:i}=this.layer,n=g(t,i);if(!e)return n.length-1;const r=this.extent;if(null==r)return-1;for(let i=n.length-1;i>=0;i--){const s=n[i],o=s.resolution*t.size[0],a=s.resolution*t.size[1];if(Math.ceil(r.width/o)*Math.ceil(r.height/a)<=e)return i}return-1}allElevationTilesFetched(){return this._candidateTiles.length===this.elevationTiles.length}clearElevationTiles(){this.elevationTiles.length=0,this._fetchedCandidates.clear()}populateElevationTiles(e){for(const t of this._candidateTiles){const i=t.id&&e[t.id];i&&(this._fetchedCandidates.add(t),this.elevationTiles.push(i))}}remapTiles(e){this._candidateTiles=y(this._candidateTiles.map(t=>e[t.id]))}getTilesToFetch(){return this._candidateTiles}forEachTileToFetch(e,t){const i=this._candidateTiles;this._candidateTiles=[],i.forEach(i=>{if(this._fetchedCandidates.has(i))return void t?.(i);let n=!1;e(i,()=>n=!0),n?t?.(i):this._candidateTiles.push(i)}),this._candidateTiles=y(this._candidateTiles,t)}_selectCandidateTilesCoveringExtentAt(e){this._candidateTiles.length=0;const t=this.extent;if(null==t)return;const{tileInfo:i,tilemapCache:n}=this.layer,r=g(i,n)[e],s=i.tileAt(r.level,t.xmin,t.ymin),o=s.extent,a=r.resolution*i.size[0],l=r.resolution*i.size[1],c=Math.ceil((t.xmax-o[0])/a),h=Math.ceil((t.ymax-o[1])/l);for(let e=0;e<h;e++)for(let t=0;t<c;t++){const n=new u.U(s.level,s.row-e,s.col+t);i.updateTileInfo(n),this._tileIsMasked(n)||this._candidateTiles.push(n)}}_tileIsMasked(e){return this.maskExtents?.some(t=>(0,c.gR)(t,e.extent))??!1}}function m(e){return null!=e?.tileInfo}function g(e,t){const i=e.lods;if(m(t)){const{effectiveMinLOD:e,effectiveMaxLOD:n}=t;return i.filter(t=>t.level>=e&&t.level<=n)}return i}function y(e,t){const i={},n=[];for(const r of e){const e=r.id;e&&!i[e]?(i[e]=r,n.push(r)):t?.(r)}const r=n.sort((e,t)=>e.level-t.level);return r.filter((e,i)=>{for(let n=0;n<i;n++){const i=r[n].extent;if(i&&(0,c.gR)(i,e.extent))return t?.(e),!1}return!0})}class v{constructor(e,t){this.data=e,this.safeWidth=.99999999*(e.width-1),this.dx=(e.width-1)/(t[2]-t[0]),this.dy=(e.width-1)/(t[3]-t[1]),this.x0=t[0],this.y1=t[3]}}class w{constructor(e,t=null){if(this.key=e,null!=t){const i=e.extent;this._samplerData=new v(t,i)}}get zmin(){return null!=this._samplerData?this._samplerData.data.minValue:0}get zmax(){return null!=this._samplerData?this._samplerData.data.maxValue:0}get hasNoDataValues(){return!!this._samplerData?.data.hasNoDataValues}sample(e,t){if(null==this._samplerData)return;const{safeWidth:i,data:n,dx:r,dy:s,y1:o,x0:a}=this._samplerData,{width:l,values:c,noDataValue:h}=n,u=_(s*(o-t),0,i),p=_(r*(e-a),0,i),f=Math.floor(u),d=Math.floor(p),m=f*l+d,g=m+l,y=c[m],v=c[g],w=c[m+1],C=c[g+1];if(y!==h&&v!==h&&w!==h&&C!==h){const e=p-d,t=y+(w-y)*e;return t+(v+(C-v)*e-t)*(u-f)}}}function _(e,t,i){return e<t?t:e>i?i:e}var C=i(87378),x=i(48526),b=i(86738),M=i(82799);class A{constructor(e){this.geometry=e,this.spatialReference=e.spatialReference}export(){return this._exporter(this.coordinates,this.spatialReference)}clone(e){const t=new A(this.geometry);return t.spatialReference=this.spatialReference,t.coordinates=e??this.coordinates.map(e=>e.clone()),t._exporter=this._exporter,t}async project(e,t){if(this.spatialReference.equals(e))return this.clone();await(0,l.initializeProjection)([{source:this.spatialReference,dest:e}],{signal:t});const i=new x.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),n=(0,l.project)(i,e);if(!n)return null;const r=this.coordinates.map((e,t)=>{const i=e.clone(),r=n.points[t];return i.x=r[0],i.y=r[1],i}),s=this.clone(r);return s.spatialReference=e,s}projectSync(e){if(this.spatialReference.equals(e))return this.clone();const t=new x.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),i=(0,l.project)(t,e);if(!i)return null;const n=this.coordinates.map((e,t)=>{const n=e.clone(),r=i.points[t];return n.x=r[0],n.y=r[1],n}),r=this.clone(n);return r.spatialReference=e,r}static fromGeometry(e){const t=new A(e);if(e instanceof A)return t.coordinates=e.coordinates.map(e=>e.clone()),t._exporter=(t,i)=>{const n=e.clone(t);return n.spatialReference=i,n},t;switch(e.type){case"point":{const i=e,{hasZ:n,hasM:r}=i;return t.coordinates=n&&r?[new T(i.x,i.y,i.z,i.m)]:n?[new T(i.x,i.y,i.z)]:r?[new T(i.x,i.y,null,i.m)]:[new T(i.x,i.y)],t._exporter=(t,i)=>e.hasM?new b.A(t[0].x,t[0].y,t[0].z,t[0].m,i):new b.A(t[0].x,t[0].y,t[0].z,i),t}case"multipoint":{const i=e,{hasZ:n,hasM:r}=i;return t.coordinates=n&&r?i.points.map(e=>new T(e[0],e[1],e[2],e[3])):n?i.points.map(e=>new T(e[0],e[1],e[2])):r?i.points.map(e=>new T(e[0],e[1],null,e[2])):i.points.map(e=>new T(e[0],e[1])),t._exporter=(t,i)=>e.hasM?new x.A({points:t.map(e=>[e.x,e.y,e.z??0,e.m??0]),hasZ:!0,hasM:!0,spatialReference:i}):new x.A({points:t.map(e=>[e.x,e.y,e.z??0]),spatialReference:i}),t}case"polyline":{const i=e,n=[],r=[],{hasZ:s,hasM:o}=e;let a=0;for(const e of i.paths)if(r.push([a,a+e.length]),a+=e.length,s&&o)for(const t of e)n.push(new T(t[0],t[1],t[2],t[3]));else if(s)for(const t of e)n.push(new T(t[0],t[1],t[2]));else if(o)for(const t of e)n.push(new T(t[0],t[1],null,t[2]));else for(const t of e)n.push(new T(t[0],t[1]));return t.coordinates=n,t._exporter=(t,i)=>{const n=e.hasM?t.map(e=>[e.x,e.y,e.z??0,e.m??0]):t.map(e=>[e.x,e.y,e.z??0]),s=r.map(e=>n.slice(e[0],e[1]));return new M.A({paths:s,hasM:e.hasM,hasZ:!0,spatialReference:i})},t}}}}class T{constructor(e,t,i=null,n=null,r=null,s=null){this.x=e,this.y=t,this.z=i,this.m=n,this.tile=r,this.elevationTile=s}clone(){return new T(this.x,this.y,this.z,this.m)}}var S=i(1555);async function R(e,t,i){if(!e)throw new r.A(V,"Elevation queries require an elevation layer to fetch tiles from");if(!t||!(t instanceof A)&&"point"!==t.type&&"multipoint"!==t.type&&"polyline"!==t.type)throw new r.A("elevation-query:invalid-geometry","Only point, polyline and multipoint geometries can be used to query elevation");const n={...L,...i},o=n.signal;if("integrated-mesh-3dtiles"===e.type){const r=A.fromGeometry(t);if(e.queryElevationCallback&&e.replacesTerrain){const s=12.9*(i?.minDemResolution||0)+.71,a=await e.queryElevationCallback(r,{signal:o,maxGeometricError:s}),l=r.coordinates.map(()=>({demResolution:1,source:e})),c=await a.project(t.spatialReference,o);if(c){if(void 0!==n.noDataValue&&n.noDataValue!==Number.MAX_VALUE)for(const e of c.coordinates)e.z===Number.MAX_VALUE&&(e.z=n.noDataValue);return{geometry:c.export(),noDataValue:n.noDataValue??Number.MAX_VALUE,sampleInfo:l}}}const s=r.coordinates.map(()=>({demResolution:-1,source:e}));return{geometry:r.export(),noDataValue:Number.MAX_VALUE,sampleInfo:s}}const c=new f(e,t.spatialReference,n);return await e.load({signal:o}),await async function(e,t,i){let n;const s=e.layer.tileInfo.spatialReference;if(t instanceof A?n=await t.project(s,i):(await(0,l.initializeProjection)([{source:t.spatialReference,dest:s}],{signal:i}),n=(0,l.project)(t,s)),!n)throw new r.A("elevation-query:spatial-reference-mismatch",`Cannot query elevation in '${t.spatialReference.wkid}' on an elevation service in '${s.wkid}'`);e.geometry=A.fromGeometry(n)}(c,t,o),await z(c,o),await j(c,o),function(e){e.geometry.coordinates.forEach(t=>{const i=t.elevationTile;let n=e.parameters.noDataValue;if(i){const e=i.sample(t.x,t.y);null==e?t.elevationTile=null:n=e}t.z=n})}(c),async function(e,t){const i=await e.geometry.project(e.outSpatialReference,t);(0,s.Lw)(i);const n={geometry:i.export(),noDataValue:e.parameters.noDataValue};return e.parameters.returnSampleInfo&&(n.sampleInfo=function(e){const t=e.layer.tileInfo,i=(0,a.GA)(t.spatialReference);return e.geometry.coordinates.map(n=>{let r=-1;return n.elevationTile&&n.elevationTile!==e.outsideExtentTile&&(r=t.lodAt(n.elevationTile.key.level).resolution*i),{demResolution:r,source:-1===r?void 0:e.layer}})}(e)),e.geometry.coordinates.forEach(e=>{e.tile=null,e.elevationTile=null}),n}(c,o)}async function O(e,t,i){if(e=Array.isArray(e)?e:[e],0===(e=i?.ignoreInvisibleLayers?e.filter(e=>e.visible):e.slice()).length)throw new r.A(V,"Elevation queries require at least one elevation layer to fetch tiles from");if(!t||"extent"!==t.type)throw new r.A("elevation-query:invalid-extent","Invalid or undefined extent");const n={...L,...i,returnSampleInfo:!0},s=P(e[e.length-1],t,n);return 1===e.length?s:Z(e,t,await s,n)}async function P(e,t,i,n){const r=i.signal;await e.load({signal:r});const s=t.spatialReference,o=e.tileInfo.spatialReference;s.equals(o)||(await(0,l.initializeProjection)([{source:s,dest:o}],{signal:r}),t=(0,l.project)(t,o));const a=new d(e,t,i,n);await z(a,r),await j(a,r);const c=a.elevationTiles,h=a.layer.tileInfo,u=a.parameters.noDataValue;return new S.C({noDataValue:u,tiles:c,tileInfo:h})}async function Z(e,t,i,n){if(e.pop(),!e.length)return i;const r=i.samplers.filter(e=>!e.tile.hasNoDataValues).map(e=>(0,c.VY)(e.extent)),s=await P(e[e.length-1],t,n,r);if(0===s.samplers.length)return i;const o=i.samplers.concat(s.samplers),a=n.noDataValue;return Z(e,t,new S.C({samplers:o,noDataValue:a}),n)}async function z(e,t){"geometry"===e.type&&function(e){if(null==e.layer.fullExtent)return;const t=new w(new u.U(-1,-1,-1));t.sample=()=>e.parameters.noDataValue,e.outsideExtentTile=t;const i=e.layer.fullExtent;e.geometry.coordinates.forEach(e=>{const n=e.x,r=e.y;(n<i.xmin||n>i.xmax||r<i.ymin||r>i.ymax)&&(e.elevationTile=t)})}(e);const i=e.parameters.demResolution;if("number"==typeof i)!function(e,t){const i=function(e,t){const{tileInfo:i,tilemapCache:n}=e.layer,r=t/(0,a.GA)(i.spatialReference),s=g(i,n);let o=s[0],l=0;for(let e=1;e<s.length;e++){const t=s[e];Math.abs(t.resolution-r)<Math.abs(o.resolution-r)&&(o=t,l=e)}return l}(e,t);e.selectTilesAtLOD(i)}(e,i);else if("finest-contiguous"===i)await async function(e,t){const{tileInfo:i,tilemapCache:n}=e.layer,r=D(i,n,e.parameters.minDemResolution);await E(e,r,t)}(e,t);else{if("auto"!==i)throw new r.A("elevation-query:invalid-dem-resolution",`Invalid dem resolution value '${i}', expected a number, "finest-contiguous" or "auto"`);await async function(e,t){(function(e){const{tileInfo:t,tilemapCache:i}=e.layer,n=D(t,i,e.parameters.minDemResolution);e.selectTilesAtLOD(n,e.parameters.maximumAutoTileRequests)})(e),function(e){const t=e.layer.tileInfo;let i=0;const n={},r=e=>{null!=e.id&&(e.id in n?n[e.id]++:(n[e.id]=1,i++))},s=e=>{if(null==e.id)return;const t=n[e.id];1===t?(delete n[e.id],i--):n[e.id]=t-1};e.forEachTileToFetch(r,s);let o=!0;for(;o&&(o=!1,e.forEachTileToFetch(n=>{i<=e.parameters.maximumAutoTileRequests||(s(n),t.upsampleTile(n)&&(o=!0),r(n))},s),o););}(e);const i=e.layer.tilemapCache;if(!i||m(i))return I(e,t);const r=e.getTilesToFetch(),s={},a=r.map(async e=>{const r=new u.U(0,0,0),a=await(0,n.Ke)(i.fetchAvailabilityUpsample(e.level,e.row,e.col,r,{signal:t}));!1!==a.ok?null!=e.id&&(s[e.id]=r):(0,o.QP)(a.error)});await(0,o.qr)(Promise.all(a),t),e.remapTiles(s)}(e,t)}}async function E(e,t,i){const n=e.layer;if(e.selectTilesAtLOD(t),t<0)return;const s=n.tilemapCache,a=e.getTilesToFetch();try{if(s&&!m(s))await(0,o.qr)(Promise.all(a.map(e=>s.fetchAvailability(e.level,e.row,e.col,{signal:i}))),i);else if(await j(e,i),!e.allElevationTilesFetched())throw e.clearElevationTiles(),new r.A("elevation-query:has-unavailable-tiles","Some elevation tiles are unavailable")}catch(n){(0,o.QP)(n),await E(e,t-1,i)}}async function I(e,t){const i=e.layer.tileInfo;await j(e,t);let n=!1;e.forEachTileToFetch((e,t)=>{i.upsampleTile(e)?n=!0:t()}),n&&await I(e,t)}function D(e,t,i=0){const n=g(e,t);let r=n.length-1;if(i>0){const t=i/(0,a.GA)(e.spatialReference),s=n.findIndex(e=>e.resolution<t);0===s?r=0:s>0&&(r=s-1)}return r}const L={maximumAutoTileRequests:20,noDataValue:0,returnSampleInfo:!1,demResolution:"auto",minDemResolution:0,signal:null};async function j(e,t){const i=e.getTilesToFetch(),n={},r=e.parameters.cache,s=e.parameters.noDataValue,a={noDataValue:s,signal:t},l=i.map(async t=>{if(null==t.id)return;const i=`${e.layer.uid}:${t.id}:${s}`,o=r?.get(i),l=o??C.A.from(await e.layer.fetchTile(t.level,t.row,t.col,a));r?.put(i,l),n[t.id]=new w(t,l)});await(0,o.qr)(Promise.allSettled(l),t),e.populateElevationTiles(n)}const V="elevation-query:invalid-layer"},87378(e,t,i){i.d(t,{A:()=>a});var n,r=i(34275),s=i(56507);const o=Symbol("ElevationTileDataClass");class a{static{n=o}constructor({values:e,width:t,height:i,noDataValue:s}){this[n]=!0,this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,this.values=(0,r.vZ)(e)?e:new Float32Array(e),this.width=t,this.height=i,this.noDataValue=s}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get usedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let i=1/0,n=-1/0,r=!0;for(const s of t)s===e?this._hasNoDataValues=!0:(i=s<i?s:i,n=s>n?s:n,r=!1);r?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=n>-3e38?n:0)}static{this.from=(0,s.qf)(a)}}},91806(e,t,i){i.d(t,{A:()=>l});var n,r=i(5482),s=i(25482),o=i(91429),a=i(56507);let l=class extends s.o{static{n=this}constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new n({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"cols",void 0),(0,r.Cg)([(0,o.MZ)({type:a.jz,json:{write:!0}})],l.prototype,"level",void 0),(0,r.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],l.prototype,"levelValue",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"origin",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],l.prototype,"resolution",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"rows",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],l.prototype,"scale",void 0),l=n=(0,r.Cg)([(0,o.$K)("esri.layers.support.LOD")],l)},1555(e,t,i){i.d(t,{C:()=>d});var n=i(5482),r=i(53966),s=i(86211),o=i(91429),a=i(16930),l=i(19419),c=i(65529),h=i(86738),u=i(28735);let p=class extends c.nJ{queryElevation(e){const t=this.projectIfRequired(e,this.spatialReference);if(!t)return null;switch(e.type){case"point":return function(e,t,i){return e.hasZ=!0,e.z=i.elevationAt(t.x,t.y),e}(e,t,this);case"polyline":return function(e,t,i){f.spatialReference=t.spatialReference;const n=e.hasM&&!e.hasZ;for(let r=0;r<e.paths.length;r++){const s=e.paths[r],o=t.paths[r];for(let e=0;e<s.length;e++){const t=s[e],r=o[e];f.x=r[0],f.y=r[1],n&&(t[3]=t[2]),t[2]=i.elevationAt(f.x,f.y)}}return e.hasZ=!0,e}(e,t,this);case"multipoint":return function(e,t,i){f.spatialReference=t.spatialReference;const n=e.hasM&&!e.hasZ;for(let r=0;r<e.points.length;r++){const s=e.points[r],o=t.points[r];f.x=o[0],f.y=o[1],n&&(s[3]=s[2]),s[2]=i.elevationAt(f.x,f.y)}return e.hasZ=!0,e}(e,t,this);default:return null}}projectIfRequired(e,t){if(null==e)return null;const i=e.spatialReference;if(i.equals(t))return e;const n=(0,u.Cv)(e,t);return n||r.A.getLogger(this).error(`Cannot project geometry spatial reference (wkid:${i.wkid}) to elevation sampler spatial reference (wkid:${t.wkid})`),n}};p=(0,n.Cg)([(0,o.$K)("esri.layers.support.ElevationSampler")],p);const f=new h.A;let d=class extends p{get spatialReference(){return this.extent.spatialReference}constructor(e){const t=e.noDataValue,i="tiles"in e?e.tiles.map(i=>new m({tile:i,tileInfo:e.tileInfo,noDataValue:t})):e.samplers;super({noDataValue:t,samplers:i});const n=i[0];if(n){this.extent=n.extent.clone();const{min:e,max:t}=n.demResolution;this.demResolution={min:e,max:t};for(let e=1;e<i.length;e++){const t=i[e];this.extent.union(t.extent),this.demResolution.min=Math.min(this.demResolution.min,t.demResolution.min),this.demResolution.max=Math.max(this.demResolution.max,t.demResolution.max)}}else{const t="tileInfo"in e?e.tileInfo:null;this.extent=(0,l.w1)((0,l.vt)(),t?.spatialReference??a.A.WGS84),this.demResolution={min:0,max:0}}}elevationAt(e,t){let i;for(const n of this.samplers)if(n.containsAt(e,t)&&(i=n.elevationAt(e,t),i!==n.noDataValue))return i;return null!=i?i:(r.A.getLogger(this).warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler`),this.noDataValue)}};(0,n.Cg)([(0,o.MZ)({constructOnly:!0})],d.prototype,"noDataValue",void 0),(0,n.Cg)([(0,o.MZ)({constructOnly:!0})],d.prototype,"samplers",void 0),d=(0,n.Cg)([(0,o.$K)("esri.layers.support.TileElevationSampler")],d);let m=class extends p{get spatialReference(){return this.extent.spatialReference}constructor(e){super(e);const t=e.tile.key.extent;this.extent=(0,l.w1)(t,e.tileInfo.spatialReference),this.extent.zmin=e.tile.zmin,this.extent.zmax=e.tile.zmax;const i=(0,s.GA)(e.tileInfo.spatialReference),n=e.tileInfo.lodAt(e.tile.key.level).resolution*i;this.demResolution={min:n,max:n}}contains(e){const t=this.projectIfRequired(e,this.spatialReference);return null!=t&&this.containsAt(t.x,t.y)}containsAt(e,t){return(0,l.Rj)(this.tile.key.extent,e,t)}elevationAt(e,t){return this.containsAt(e,t)?this.tile.sample(e,t)??this.noDataValue:this.noDataValue}};(0,n.Cg)([(0,o.MZ)({constructOnly:!0})],m.prototype,"tile",void 0),(0,n.Cg)([(0,o.MZ)({constructOnly:!0})],m.prototype,"noDataValue",void 0),(0,n.Cg)([(0,o.MZ)({constructOnly:!0})],m.prototype,"tileInfo",void 0),m=(0,n.Cg)([(0,o.$K)("esri.layers.support.TileElevationSampler.SingleTileElevationSampler")],m)},87045(e,t,i){i.d(t,{A:()=>w});var n,r=i(5482),s=i(66552),o=i(25482),a=i(86211),l=i(91429),c=i(56507),h=i(86738),u=i(16930),p=i(21325),f=i(28735),d=i(91806),m=i(72802),g=i(36005),y=i(43937);const v=new s.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let w=class extends o.o{static{n=this}static create(e={}){const{resolutionFactor:t=1,scales:i,size:r=256,spatialReference:s=u.A.WebMercator,numLODs:o=24}=e;if(!(0,p.fn)(s)){const e=[];if(i)for(let t=0;t<i.length;t++){const n=i[t];e.push(new d.A({level:t,scale:n,resolution:n}))}else{let t=5e-4;for(let i=o-1;i>=0;i--)e.unshift(new d.A({level:i,scale:t,resolution:t})),t*=2}return new n({dpi:96,lods:e,origin:new h.A(0,0,s),size:[r,r],spatialReference:s})}const l=(0,p.Vp)(s),c=e.origin?new h.A({x:e.origin.x,y:e.origin.y,spatialReference:s}):new h.A(l?{x:l.origin[0],y:l.origin[1],spatialReference:s}:{x:0,y:0,spatialReference:s}),f=1/(39.37*(0,a.GA)(s)*96),m=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],n=t*f;m.push(new d.A({level:e,scale:t,resolution:n}))}else{let e=(0,p.EA)(s)?512/r*591657527.5917094:256/r*591657527.591555;const i=Math.ceil(o/t);m.push(new d.A({level:0,scale:e,resolution:e*f}));for(let n=1;n<i;n++){const i=e/2**t,r=i*f;m.push(new d.A({level:n,scale:i,resolution:r})),e=i}}return new n({dpi:96,lods:m,origin:c,size:[r,r],spatialReference:s})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,p.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return h.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const n=[],r=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach(e=>{n.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,r[e.level]=e})),this._set("scales",n),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const i=Math.floor(e),n=i+1;return t[i]/(t[i]/t[n])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let n=0;for(;n<i;n++){const i=t[n],r=t[n+1];if(i<=e)return n;if(r===e)return n+1;if(i>e&&r<e)return n+Math.log(i/e)/Math.log(i/r)}return n}tileAt(e,t,i,n){const r=this.lodAt(e);if(!r)return null;let s,o;if("number"==typeof t)s=t,o=i;else if((0,p.aI)(t.spatialReference,this.spatialReference))s=t.x,o=t.y,n=i;else{const e=(0,f.Cv)(t,this.spatialReference);if(null==e)return null;s=e.x,o=e.y,n=i}const a=r.resolution*this.size[0],l=r.resolution*this.size[1];return n??=new m.U(0,0,0),n.level=e,n.row=Math.floor((this.origin.y-o)/l+.001),n.col=Math.floor((s-this.origin.x)/a+.001),this.updateTileInfo(n),n}updateTileInfo(e,t=0){if(!("extent"in e))return!1;let i=this.lodAt(e.level);if(!i&&1===t){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return!1;const n=e.level-i.level,r=i.resolution*this.size[0]/2**n,s=i.resolution*this.size[1]/2**n;return e.extent[0]=this.origin.x+e.col*r,e.extent[1]=this.origin.y-(e.row+1)*s,e.extent[2]=e.extent[0]+r,e.extent[3]=e.extent[1]+s,!0}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const i=this.lodAt(t.level);if(null==i)return null;const{resolution:n}=i,r=n*this.size[0],s=n*this.size[1];return e[0]=this.origin.x+t.col*r,e[1]=this.origin.y-(t.row+1)*s,e[2]=e[0]+r,e[3]=e[1]+s,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return n.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const i=[],r=this.lods.length-t;for(let e=0;e<r;e++){const n=e+t,{scale:r,resolution:s}=n>=0?this.lods[n]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new d.A({level:e,scale:r,resolution:s}))}return new n({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const n=e[i];this._upsampleLevels[n.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/n.resolution:0},t=n}}};(0,r.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],w.prototype,"compressionQuality",void 0),(0,r.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],w.prototype,"dpi",void 0),(0,r.Cg)([(0,l.MZ)({type:String,json:{read:v.read,write:v.write,origins:{"web-scene":{read:!1,write:!1}}}})],w.prototype,"format",void 0),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],w.prototype,"isWrappable",null),(0,r.Cg)([(0,l.MZ)({type:h.A,json:{write:!0}})],w.prototype,"origin",void 0),(0,r.Cg)([(0,g.w)("origin")],w.prototype,"readOrigin",null),(0,r.Cg)([(0,l.MZ)({type:[d.A],value:null,json:{write:!0}})],w.prototype,"lods",null),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],w.prototype,"scales",void 0),(0,r.Cg)([(0,l.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],w.prototype,"size",void 0),(0,r.Cg)([(0,g.w)("size",["rows","cols"])],w.prototype,"readSize",null),(0,r.Cg)([(0,y.K)("size",{cols:{type:c.jz},rows:{type:c.jz}})],w.prototype,"writeSize",null),(0,r.Cg)([(0,l.MZ)({type:u.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),w=n=(0,r.Cg)([(0,l.$K)("esri.layers.support.TileInfo")],w)},65509(e,t,i){i.d(t,{A:()=>s});var n=i(49186),r=i(17676);class s{constructor(e,t=0,i=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=i,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(i)||(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,i){const n=this.tileInfo?.lodAt(e);return!n||e<this.minLOD||e>this.maxLOD?"unavailable":n.cols&&n.rows?i>=n.cols[0]&&i<=n.cols[1]&&t>=n.rows[0]&&t<=n.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,i,s){await(0,r.NO)(s);const o=this.getAvailability(e,t,i);if("unavailable"===o)throw new n.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return o}async fetchAvailabilityUpsample(e,t,i,n,s){await(0,r.NO)(s),n.level=e,n.row=t,n.col=i;const o=this.tileInfo;return o.updateTileInfo(n),this.fetchAvailability(e,t,i,s).catch(e=>{if((0,r.zf)(e))throw e;if(o.upsampleTile(n))return this.fetchAvailabilityUpsample(n.level,n.row,n.col,n,s);throw e})}}},72802(e,t,i){i.d(t,{U:()=>r});var n=i(19419);class r{constructor(e,t,i,r=(0,n.vt)()){this._level=e,this._row=t,this._col=i,this.extent=r}get id(){return this._id??=`${this.level}/${this.row}/${this.col}`,this._id}get level(){return this._level}set level(e){this._level=e,this._id=null}get row(){return this._row}set row(e){this._row=e,this._id=null}get col(){return this._col}set col(e){this._col=e,this._id=null}toJSON(){return{level:this._level,row:this._row,col:this._col,extent:this.extent}}static fromJSON(e){return new r(e.level,e.row,e.col,e.extent)}}},25943(e,t,i){i.d(t,{d:()=>b});var n,r=i(5482),s=i(11254),o=i(69622),a=i(49186),l=i(36563),c=(i(44208),i(66344)),h=i(15142),u=i(17676),p=i(36708),f=i(76030),d=i(84952),m=i(91429),g=i(72802),y=i(4718),v=i(69397),w=i(34275);class _{constructor(e){!function(e){if(!e?.location)throw new a.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new a.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new a.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new a.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new a.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,y.o8)(t));const n=this.location.width,r=this.location.height;let s=!0,o=!0;const l=function(e,t=!1){return e<=w.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(n*r/32));let c=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(o=!1,l[c]|=1<<t):s=!1,31===t&&++c}o?(this._availability="unavailable",this.byteSize=40):s?(this._availability="available",this.byteSize=40):(this._availability=l,this.byteSize=40+(0,v.Qf)(l))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),n=i%32,r=i>>5,s=this._availability;return r<0||r>s.length?"unknown":s[r]&1<<n?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||s.A,{row:n,col:r,width:o,height:l}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then(e=>e.data).catch(e=>{if(422===e?.details?.httpStatus)return{location:{top:n,left:r,width:o,height:l},valid:!0,data:new Array(o*l).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==n||e.location.left!==r||e.location.width!==o||e.location.height!==l))throw new a.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:n,left:r,width:o,height:l}});return _.fromJSON(e)})}static fromJSON(e){return Object.freeze(new _(e))}}function C(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function x(e,t,i){return new a.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let b=class extends o.A{static{n=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=s.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new c.q(2097152),this.addHandles((0,p.wB)(()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),p.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const n=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return n?n.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,n){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(x(e,t,i)):this._fetchTilemap(e,t,i,n).catch(e=>e).then(n=>{if(n instanceof _){const r=n.getAvailability(t,i);if("unavailable"===r)throw x(e,t,i);return r}if((0,u.zf)(n))throw n;return"unknown"})}fetchAvailabilityUpsample(e,t,i,n,r){n.level=e,n.row=t,n.col=i;const s=this.layer.tileInfo;s.updateTileInfo(n);const o=this.fetchAvailability(e,t,i,r).catch(e=>{if((0,u.zf)(e))throw e;if(s.upsampleTile(n))return this.fetchAvailabilityUpsample(n.level,n.row,n.col,n,r);throw e});return this._fetchAvailabilityUpsamplePrefetch(e,t,i,r,o),o}async _fetchAvailabilityUpsamplePrefetch(e,t,i,r,s){if(!this._prefetchingEnabled)return;const o=`prefetch-${e}-${t}-${i}`;if(this.hasHandles(o))return;const a=new AbortController;s.then(()=>a.abort(),()=>a.abort());let c=!1;const h=(0,l.hA)(()=>{c||(c=!0,a.abort())});if(this.addHandles(h,o),await(0,f.md)(10,a.signal).catch(()=>{}),c||(c=!0,this.removeHandles(o)),(0,u.G4)(a))return;const p=new g.U(e,t,i),d={...r,signal:a.signal},m=this.layer.tileInfo;for(let e=0;n._prefetches.length<n._maxPrefetch&&m.upsampleTile(p);++e){const e=this.fetchAvailability(p.level,p.row,p.col,d);n._prefetches.push(e);const t=()=>{n._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new h.A({initialSize:n._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,n){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new a.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const r=this._tmpTilemapDefinition,s=this._tilemapFromCache(e,t,i,r);if(s)return Promise.resolve(s);const o=n?.signal;return n={...n,signal:null},new Promise((e,t)=>{(0,u.u7)(o,()=>t((0,u.NK)()));const i=C(r);let s=this._pendingTilemapRequests[i];if(!s){s=_.fromDefinition(r,n).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=s,s.then(e,e)}s.then(e,t)})}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,d.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,n){n.level=e,n.row=t-t%this.size,n.col=i-i%this.size;const r=C(n);return this._tilemapCache.get(r)}get test(){}};(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],b.prototype,"layer",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],b.prototype,"minLOD",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],b.prototype,"maxLOD",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],b.prototype,"request",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],b.prototype,"size",void 0),b=n=(0,r.Cg)([(0,m.$K)("esri.layers.support.TilemapCache")],b)},77548(e,t,i){i.d(t,{Gh:()=>Z,tk:()=>T,BR:()=>A,p2:()=>b,qd:()=>S,wI:()=>M,G$:()=>O,$x:()=>R,Ov:()=>w,cM:()=>p,UC:()=>f,W_:()=>_,Qz:()=>d,OP:()=>P,TU:()=>v,F2:()=>m,XX:()=>y,jy:()=>C});var n=i(70333),r=i(11254),s=i(7762),o=(i(84952),i(36563)),a=i(36708),l=i(4146);const c=new WeakMap;function h(e){return!e.destroyed&&(c.has(e)||e.addHandles([(0,a.wB)(()=>{const{parent:t}=e;return!!(t&&t instanceof l.A)&&("catalog-dynamic-group"===t.type||h(t))},t=>c.set(e,t),a.pc),(0,o.hA)(()=>c.delete(e))]),c.get(e))}function u(e,t){return null!=e&&"object"==typeof e&&"type"in e&&e.type===t}function p(e){return u(e,"knowledge-graph")&&"layers"in e}function f(e){return u(e,"knowledge-graph-sublayer")}function d(e){return u(e,"link-chart")&&"layers"in e}function m(e){return u(e,"subtype-group")&&"sublayers"in e}function g(e){const t=e.parent;return function(e){return"group"===e?.type}(t)&&t.tables.includes(e)}i(16215);const y={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function v(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function w(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function _(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function C(e){return function(e){return"subtype-sublayer"===e?.type}(e)||function(e){return null!=e&&"object"==typeof e&&"type"in e&&"oriented-imagery"===e.type}(e)||function(e){return u(e,"feature")}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}function x(e){const t=e?.type;return"binning"===t||"cluster"===t}function b(e,t){if(!C(e))return;const i=t?.graphic,n="featureReduction"in e?e.featureReduction:null;if(i){if(i.isAggregate){const e=i.origin;return e&&"featureReductionProvider"in e&&n?x(n)?n:null:void 0}return e}return t?.checkFeatureReduction&&n?x(n)?n:null:e}async function M(e,t){const i=n.id?.findServerInfo(e);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const o=`${e.slice(0,s)}/rest/info`,a=null!=t?t.signal:null,{data:l}=await(0,r.A)(o,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function A(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function T(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function S(e){const t=new s.A;for(const i of e.allLayers.concat(e.allTables))h(i)||g(i)||("charts"in i&&t.push(i),"subtype-group"===i.type&&t.push(...i.sublayers));return t}function R(e,t){return null}function O(e){return null}function P(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function Z(e,t){if(!t||!P(e))return;const i=(e.url,null);i&&(e.url=i)}},38969(e,t,i){i.d(t,{i:()=>r});var n=i(37955);function r(e,t){return new Promise((i,r)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?i():(t((0,n.Oo)(e,"canplay",i)),t((0,n.Oo)(e,"error",r)))})}},73133(e,t,i){i.d(t,{j:()=>n});const n=(0,i(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:"unknown"})},7861(e,t,i){i.d(t,{L:()=>r});var n=i(11254);async function r(e,t){return(await(0,n.A)(e,{responseType:"json",query:{f:"json",...t?.customParameters,token:t?.apiKey}})).data}},16215(e,t,i){i.d(t,{S:()=>r,Y:()=>n});const n=Symbol("BasemapInstance");function r(e){return null!=e&&"object"==typeof e&&n in e}},79677(e,t,i){i.d(t,{A:()=>p});var n,r=i(5482),s=i(25482),o=i(88930),a=i(91429),l=i(98623),c=i(10184),h=i(36005),u=i(43937);let p=class extends s.o{static{n=this}static get allTime(){return f}static get empty(){return d}static fromArray(e){return new n({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(n.allTime)}get isEmpty(){return this.equals(n.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new n({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,n=e.start?.getTime()??e.start,r=e.end?.getTime()??e.end;return t===n&&i===r}expandTo(e,t=l.qU){if(this.isEmpty||this.isAllTime||"unknown"===e)return this.clone();let i=this.start;i&&(i=(0,o.lL)(i,new c.A({value:1,unit:e}),t));let r=this.end;if(r){const i=(0,o.lL)(r,new c.A({value:1,unit:e}),t);r=r.getTime()===i.getTime()?i:(0,o.S1)(i,1,e,t)}return new n({start:i,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return n.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,r=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let o,a;return r>=t&&r<=i?o=r:t>=r&&t<=s&&(o=t),i>=r&&i<=s?a=i:s>=t&&s<=i&&(a=s),null==o||null==a||isNaN(o)||isNaN(a)?n.empty:new n({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,i=l.qU){if(this.isEmpty||this.isAllTime||"unknown"===t)return this.clone();const r=new n,{start:s,end:a}=this;return null!=s&&(r.start=(0,o.S1)(s,e,t,i)),null!=a&&(r.end=(0,o.S1)(a,e,t,i)),r}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return f.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new n({start:t,end:i})}};(0,r.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,r.Cg)([(0,h.w)("end")],p.prototype,"readEnd",null),(0,r.Cg)([(0,u.K)("end")],p.prototype,"writeEnd",null),(0,r.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,r.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,r.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,r.Cg)([(0,h.w)("start")],p.prototype,"readStart",null),(0,r.Cg)([(0,u.K)("start")],p.prototype,"writeStart",null),p=n=(0,r.Cg)([(0,a.$K)("esri.time.TimeExtent")],p);const f=new p,d=new p({start:void 0,end:void 0})},10184(e,t,i){i.d(t,{A:()=>h});var n=i(5482),r=i(69540),s=i(25482),o=i(88930),a=i(91429),l=i(73133),c=i(93223);let h=class extends((0,r.OU)(s.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,n.Cg)([(0,c.e)(l.j,{nonNullable:!0})],h.prototype,"unit",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],h.prototype,"value",void 0),h=(0,n.Cg)([(0,a.$K)("esri.time.TimeInterval")],h)},32728(e,t,i){i.d(t,{YH:()=>a,hG:()=>s,nu:()=>l,wp:()=>o}),i(34727);var n=i(35522),r=i(51850);function s(e){const t=e[0]*e[0]+e[4]*e[4]+e[8]*e[8],i=e[1]*e[1]+e[5]*e[5]+e[9]*e[9],n=e[2]*e[2]+e[6]*e[6]+e[10]*e[10];return Math.sqrt(Math.max(t,i,n))}function o(e,t){const i=Math.sqrt(t[0]*t[0]+t[4]*t[4]+t[8]*t[8]),r=Math.sqrt(t[1]*t[1]+t[5]*t[5]+t[9]*t[9]),s=Math.sqrt(t[2]*t[2]+t[6]*t[6]+t[10]*t[10]);return(0,n.hZ)(e,i,r,s),e}function a(e,t,i){i=i||e;const r=(0,n.Om)(e,t);(0,n.hZ)(i,e[0]-r*t[0],e[1]-r*t[1],e[2]-r*t[2]),(0,n.S8)(i,i)}function l(e,t,i,s=(0,r.vt)()){const o=(0,n.Bw)(e),a=(0,n.Bw)(t),l=(0,n.Om)(e,t)/(o*a);if(l<.9999999999999999){const r=Math.acos(l),u=((1-i)*o+i*a)/Math.sin(r),p=u/o*Math.sin((1-i)*r),f=u/a*Math.sin(i*r);return(0,n.hs)(c,e,p),(0,n.hs)(h,t,f),(0,n.WQ)(s,c,h)}return(0,n.Cc)(s,e,t,i)}(0,r.vt)(),(0,r.vt)(),(0,r.vt)();const c=(0,r.vt)(),h=(0,r.vt)()},68747(e,t,i){i.r(t),i.d(t,{generateCombinationsPanoramicWorker:()=>M,generateCombinationsWorker:()=>b});var n=i(34727),r=i(17676);i(17799),i(69052),i(799),i(86211),i(18047),new Map,i(77690),i(29242),i(51850),i(37585),i(35522);var s=i(49186);i(56507),i(86738),i(39829),i(82799),i(16930),i(34403),i(21325),i(91218),i(65708),i(49590),i(27749),i(39663),i(7817),i(10222),i(4576),i(63490),i(6800),i(87811);var o=i(53966),a=(i(44208),i(27921),i(5443));i(83276),i(19419),i(38732),i(87772),i(23281),i(90091),i(87378),i(22796),i(1555),i(87045),i(72802),i(7861);const l=[1920,1080],c={xmin:-150,ymin:1,xmax:20,ymax:80,spatialReference:{wkid:4326}},h=.001;new a.A({xmin:c.xmin+h,ymin:c.ymin+h,xmax:c.xmax-h,ymax:c.ymax-h,spatialReference:c.spatialReference}),(0,n.KJ)(Math.acos(.05));var u=i(5482),p=i(97768),f=i(61893),d=i(10107),m=i(64108);let g=class extends f.Z{constructor(e){super(e),this.autoLoad=!1,this.customParameters=null,this.datasetFormat=null,this.url=null,this.rotation=null}destroy(){this._cache=(0,p.pR)(this._cache)}get layer(){return this._cache}get size(){if(!this._cache?.loaded||!this._cache.serviceRasterInfo)return;const{serviceRasterInfo:e}=this._cache;return[e.width,e.height]}async load(e){if(this._cache?.loaded)return await this._cache.load(e),{layer:this._cache,size:this.size};const{url:t,customParameters:n}=this;let s=this.datasetFormat;if(!t)throw new Error("URL is required to load NonPanoramicMedia.");const a=await i.e(7835).then(i.bind(i,97835));if((0,r.Te)(e),s||(s=a.guessExtensionFromURI(t)),!s){try{s=await a.getDatasetFormat(t)}catch(e){o.A.getLogger(this).warn("non-panoramic-media:dataset-format",e)}(0,r.Te)(e)}s??="UNKNOWN FORMAT",this.datasetFormat=s;const l=(await Promise.all([i.e(7373),i.e(9235),i.e(3500),i.e(1003),i.e(233),i.e(561)]).then(i.bind(i,90561))).default;(0,r.Te)(e),this._cache=new l({url:t,ioConfig:{skipExtensions:["aux.xml","jgw"],skipMapInfo:!0,datasetFormat:s},customParameters:n??void 0});const c=this._cache.load(e);return this.addResolvingPromise(c),await c,(0,r.Te)(e),{layer:this._cache,size:this.size}}};(0,u.Cg)([(0,d.MZ)()],g.prototype,"_cache",void 0),(0,u.Cg)([(0,d.MZ)()],g.prototype,"autoLoad",void 0),(0,u.Cg)([(0,d.MZ)()],g.prototype,"customParameters",void 0),(0,u.Cg)([(0,d.MZ)()],g.prototype,"datasetFormat",void 0),(0,u.Cg)([(0,d.MZ)()],g.prototype,"url",void 0),(0,u.Cg)([(0,d.MZ)()],g.prototype,"layer",null),(0,u.Cg)([(0,d.MZ)()],g.prototype,"rotation",void 0),(0,u.Cg)([(0,d.MZ)()],g.prototype,"size",null),g=(0,u.Cg)([(0,m.$)("esri.widgets.OrientedImageryViewer.support.NonPanoramicMedia")],g);var y=i(37955),v=i(38969);class w extends s.A{constructor(e,t,i){super(e,t,i),this.name="unknown",this.name=e}}const _=new Set(["JPG","JPEG","TIFF","TIF","MRF"]),C=new Set(["MRF","TIFF","TIF"]);let x=class extends f.Z{constructor(e){super(e),this._size=[0,0],this._cache=null,this.autoLoad=!1,this.cameraHeading=null,this.extension=null,this.imagePyramid=null,this.type="image",this.uiStrings={}}destroy(){this._cache=null}get horizonPitch(){const{matrix:e}=this;return e?(0,n.KJ)(Math.asin(-e[6])):0}get horizonRoll(){const{matrix:e}=this;return e?(0,n.KJ)(Math.atan(e[7]/e[8])):0}get horizonYaw(){const{matrix:e,cameraHeading:t}=this;return e?(0,n.KJ)(Math.atan2(e[3],e[0])):t?-t:0}get size(){return this._size}async load(e){const{guessExtensionFromURI:t}=await i.e(7835).then(i.bind(i,97835));if((0,r.Te)(e),"video"===this.type)return this.loadVideoMesh(e);let n=this.extension;if(n||(n=t(this.url)),!n||!_.has(n))throw new w("unsupported-format",this.uiStrings["unsupported-format"]??"Unsupported image format: {extension}",{datasetFormat:n??"UNKNOWN FORMAT"});return C.has(n)?this.loadOptimizedImageMesh(e):this.loadImageMesh(e)}async loadOptimizedImageMesh(e){const{loadMeshes:t,loadPyramid:n,loadRaster:s}=await Promise.all([i.e(1843),i.e(7005),i.e(5408),i.e(7634),i.e(8449)]).then(i.bind(i,21060)),o=await s(this.url,e);(0,r.Te)(e),this.imagePyramid=await n(o,{pitch:this.horizonPitch,yaw:this.horizonYaw,roll:this.horizonRoll},e),(0,r.Te)(e);const a=this.imagePyramid.getLowResolutionTiles(),l=await t(a,e);return(0,r.Te)(e),this._size=this.imagePyramid.imageSize,{meshOrMeshes:l,size:this._size,tileKeys:a?.map(e=>e.key)}}async loadVideoMesh(e){const{createImageSphere:t}=await Promise.all([i.e(1843),i.e(7005),i.e(5408),i.e(7634),i.e(8449)]).then(i.bind(i,21060));if((0,r.Te)(e),this._cache){const i=await t({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return(0,r.Te)(e),{meshOrMeshes:i,size:this._size}}const n=await this._resolveMedia(e);(0,r.Te)(e),this._cache=n.media,this._size=[...l];const s=await t({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return(0,r.Te)(e),{meshOrMeshes:s,size:this._size}}async loadImageMesh(e){const{createImageSphere:t}=await Promise.all([i.e(1843),i.e(7005),i.e(5408),i.e(7634),i.e(8449)]).then(i.bind(i,21060));if((0,r.Te)(e),this._cache){const i=await t({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return(0,r.Te)(e),{meshOrMeshes:i,size:this._size}}const n=await this._resolveMedia(e);(0,r.Te)(e),this._cache=n.media;const s=n.mesh;return this._size=[n.media.width,n.media.height],{meshOrMeshes:s,size:this._size}}async _resolveMedia(e){const t=Promise.withResolvers(),n=(0,r.u7)(e?.signal,t.resolve),s="video"===this.type?document.createElement("video"):document.createElement("img");s.crossOrigin="anonymous",s.src=this.url;let o=null;const a="video"===this.type?(0,v.i)(s,this.addHandles):await new Promise((e,t)=>{o=[(0,y.on)(s,"error",e=>{t(e)}),(0,y.on)(s,"load",e)]}).finally(()=>{o?.forEach(e=>e.remove()),o=null}),l=Promise.race([a,t.promise]);this.addResolvingPromise(l);try{await l}finally{n?.remove()}(0,r.Te)(e);const c=s;if(!c)throw new w("unknown","Could not load media",{url:this.url});const{createImageSphere:h}=await Promise.all([i.e(1843),i.e(7005),i.e(5408),i.e(7634),i.e(8449)]).then(i.bind(i,21060));(0,r.Te)(e);const u=await h({data:s,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return(0,r.Te)(e),{media:c,mesh:u}}};function b(e){return function(e,t){const{cameraPitch:i,cameraRoll:n,cameraLocation:r}=e,{x:s,y:o,z:a,spatialReference:l}=r;if(t.every(e=>0===e)||!t||!t.length||!l)throw new Error("Invalid parameters");const[c,h,,u,p]=t,f=[-u,0,u],d=[-p,0,p],m=[-c,0,c],g=[-h,0,h],y=[];for(const t of f)for(const r of d)for(const c of m)for(const h of m)for(const u of g){const p={...e};p.cameraPitch=i+t,p.cameraRoll=n+r,p.cameraLocation={x:s+c,y:o+h,z:a?a+u:0,spatialReference:{wkid:l.wkid}},y.push(p)}return y}(e.imageToWorldProps,e.accuracyParameters)}function M(e){return function(e,t){const{cameraHeading:i,cameraLocation:n}=e,{x:r,y:s,z:o,spatialReference:a}=n;if(!t||t.every(e=>0===e)||!t.length||!a)throw new Error("Invalid parameters");const[l,c,h]=t,u=h>0?[-h,0,h]:[],p=l>0?[-l,0,l]:[],f=c>0?[-c,0,c]:[],d=[];for(const t of u)for(const n of p)for(const l of p)for(const c of f){const h={...e};h.cameraHeading=i+t,h.cameraLocation={x:r+n,y:s+l,z:o?o+c:0,spatialReference:{wkid:a.wkid}},d.push(h)}return d}(e.imageToWorldProps,e.accuracyParameters)}(0,u.Cg)([(0,d.MZ)()],x.prototype,"_size",void 0),(0,u.Cg)([(0,d.MZ)()],x.prototype,"autoLoad",void 0),(0,u.Cg)([(0,d.MZ)()],x.prototype,"cameraHeading",void 0),(0,u.Cg)([(0,d.MZ)()],x.prototype,"extension",void 0),(0,u.Cg)([(0,d.MZ)()],x.prototype,"horizonPitch",null),(0,u.Cg)([(0,d.MZ)()],x.prototype,"horizonRoll",null),(0,u.Cg)([(0,d.MZ)()],x.prototype,"horizonYaw",null),(0,u.Cg)([(0,d.MZ)()],x.prototype,"id",void 0),(0,u.Cg)([(0,d.MZ)()],x.prototype,"imagePyramid",void 0),(0,u.Cg)([(0,d.MZ)()],x.prototype,"matrix",void 0),(0,u.Cg)([(0,d.MZ)()],x.prototype,"size",null),(0,u.Cg)([(0,d.MZ)()],x.prototype,"type",void 0),(0,u.Cg)([(0,d.MZ)()],x.prototype,"uiStrings",void 0),(0,u.Cg)([(0,d.MZ)()],x.prototype,"url",void 0),x=(0,u.Cg)([(0,m.$)("esri.widgets.PanoramicViewer.support.PanoramicMedia")],x),i(9093),i(91829),i(58083),i(79258),i(73354),i(28208),i(28735)},28208(e,t,i){i.d(t,{NU:()=>a,ZH:()=>s,vK:()=>o});var n=i(86738),r=i(16930);const s=new n.A({x:0,y:0,z:0,spatialReference:r.A.WebMercator}),o=1e3,a=.3515625}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[91,895,1775,1948,3931,6061,8125],{61691(e,t,i){i.d(t,{G:()=>n});class n{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}},76061(e,t,i){i.d(t,{S:()=>r});var n=i(61691);class r extends n.G{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},65708(e,t,i){i.d(t,{a:()=>o,e:()=>s});var n=i(86211),r=i(78125);function s(e,t={}){const{unit:i}=t;let s=(0,r.fromGeometry)(e).calculateArea2D();if(s&&i){const t=(0,r.getSpatialReference)(e);if(t.isGeographic)throw new Error("Unable to convert from an angular area unit to a linear area unit.");const o=(0,n.B5)(t);o!==i&&(o?s=(0,n.oU)(s,o,i):(s=Math.sqrt(s),s*=(0,n.GA)(t),s**=2,s=(0,n.oU)(s,"square-meters",i)))}return s}const o=Object.freeze(Object.defineProperty({__proto__:null,execute:s,supportsCurves:!0},Symbol.toStringTag,{value:"Module"}))},49590(e,t,i){i.d(t,{e:()=>p,g:()=>f,l:()=>u});var n=i(86211),r=i(86742),s=i(5808);let o,a,l,c;function h(){return!!o&&(0,r.s1)()}async function u(){if(!h()){const[e]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(1550)]).then(i.bind(i,78125)),(0,r.Hh)()]);o=e.fromGeometry,a=e.fromSpatialReference,l=e.getSpatialReference,c=(0,r.fz)()}}function p(e,t={}){const{curveType:i="geodesic",unit:c}=t,h=l(e);let u=(0,r.g7)(o(e),a(h),s.O[i]);return u&&c&&(u=(0,n.oU)(u,"square-meters",c)),u}const f=Object.freeze(Object.defineProperty({__proto__:null,execute:p,isLoaded:h,load:u,get supportsCurves(){return c}},Symbol.toStringTag,{value:"Module"}))},27749(e,t,i){i.d(t,{e:()=>f,g:()=>d,l:()=>p});var n=i(86211),r=i(77085),s=i(5808);let o,a,l,c,h;function u(){return!!o&&(0,r.s1)()}async function p(){if(!u()){const[e]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(1666)]).then(i.bind(i,78125)),(0,r.Hh)()]);o=e.fromGeometry,a=e.fromSpatialReference,l=e.getSpatialReference,c=e.toGeometry,h=(0,r.fz)()}}function f(e,t,i={}){const{curveType:h="geodesic",unit:u}=i;u&&(t=(0,n.oU)(t,u,"meters"));const p=l(e);return c((0,r.g7)(o(e),t,a(p),s.O[h]),p)}const d=Object.freeze(Object.defineProperty({__proto__:null,execute:f,executeMany:function(e,t,i={}){const{curveType:h="geodesic",unit:u}=i;u&&(t=(0,n.oU)(t,u,"meters"));const p=e.map(o),f=l(e);return(0,r.zo)(p,t,a(f),s.O[h]).map(e=>c(e,f))},isLoaded:u,load:p,get supportsCurves(){return h}},Symbol.toStringTag,{value:"Module"}))},39663(e,t,i){i.d(t,{e:()=>p,g:()=>f,l:()=>u});var n=i(86211),r=i(35223),s=i(5808);let o,a,l,c;function h(){return!!o&&(0,r.s1)()}async function u(){if(!h()){const[e]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(1550)]).then(i.bind(i,78125)),(0,r.Hh)()]);o=e.fromGeometry,a=e.fromSpatialReference,l=e.getSpatialReference,c=(0,r.fz)()}}function p(e,t={}){const{curveType:i="geodesic",unit:c}=t,h=l(e);let u=(0,r.g7)(o(e),a(h),s.O[i]);return u&&c&&(u=(0,n.oU)(u,"meters",c)),u}const f=Object.freeze(Object.defineProperty({__proto__:null,execute:p,isLoaded:h,load:u,get supportsCurves(){return c}},Symbol.toStringTag,{value:"Module"}))},7817(e,t,i){i.d(t,{e:()=>s,l:()=>a,s:()=>o});var n=i(86211),r=i(78125);function s(e,t={}){const{unit:i}=t;let s=(0,r.fromGeometry)(e).calculateLength2D();if(s&&i){const t=(0,r.getSpatialReference)(e);s=(0,n.PQ)(s,t,i)}return s}const o=!0,a=Object.freeze(Object.defineProperty({__proto__:null,execute:s,supportsCurves:o},Symbol.toStringTag,{value:"Module"}))},10222(e,t,i){i.d(t,{e:()=>s,s:()=>a});var n=i(81150),r=i(78125);function s(e){const t=(0,r.getSpatialReference)(e);return(0,r.toGeometry)((0,n.g7)((0,r.fromGeometry)(e),(0,r.fromSpatialReference)(t),!1),t)}const o=(0,n.fz)(),a=Object.freeze(Object.defineProperty({__proto__:null,execute:s,executeMany:function(e){const t=e.map(r.fromGeometry),i=(0,r.getSpatialReference)(e);return(0,n.zo)(t,(0,r.fromSpatialReference)(i),!1).map(e=>(0,r.toGeometry)(e,i))},isSimple:function(e){return(0,n.Pg)((0,r.fromGeometry)(e),(0,r.fromSpatialReference)((0,r.getSpatialReference)(e)),!1)},supportsCurves:o},Symbol.toStringTag,{value:"Module"}))},73354(e,t,i){i.d(t,{a:()=>p,b:()=>l,c:()=>a,d:()=>s,e:()=>f,f:()=>u,l:()=>h,n:()=>d,t:()=>o});var n=i(40876),r=(i(44208),i(72727));function s(e,t,i){o(e.typedBuffer,t.typedBuffer,i,e.typedBufferStride,t.typedBufferStride)}function o(e,t,i,n=3,s=n){const o=(0,r.k)(e.length,n,3),a=(0,r.k)(t.length,s,3),l=Math.min(o,a),c=i[0],h=i[1],u=i[2],p=i[4],f=i[5],d=i[6],m=i[8],g=i[9],y=i[10],v=i[12],w=i[13],_=i[14];let C=0,x=0;for(let i=0;i<l;i++){const i=t[C],r=t[C+1],o=t[C+2];e[x]=c*i+p*r+m*o+v,e[x+1]=h*i+f*r+g*o+w,e[x+2]=u*i+d*r+y*o+_,C+=s,x+=n}return e}function a(e,t,i){l(e.typedBuffer,t.typedBuffer,i,e.typedBufferStride,t.typedBufferStride)}function l(e,t,i,n=3,s=n){const o=(0,r.k)(e.length,n,3),a=(0,r.k)(t.length,s,3),l=Math.min(o,a),c=i[0],h=i[1],u=i[2],p=i[3],f=i[4],d=i[5],m=i[6],g=i[7],y=i[8];let v=0,w=0;for(let i=0;i<l;i++){const i=t[v],r=t[v+1],o=t[v+2];e[w]=c*i+p*r+m*o,e[w+1]=h*i+f*r+g*o,e[w+2]=u*i+d*r+y*o,v+=s,w+=n}}function c(e,t,i,n=3,r=n){const s=Math.min(e.length/n,t.length/r);let o=0,a=0;for(let l=0;l<s;l++)e[a]=i*t[o],e[a+1]=i*t[o+1],e[a+2]=i*t[o+2],o+=r,a+=n;return e}function h(e,t,i,n){u(e.typedBuffer,t.typedBuffer,i,n,e.typedBufferStride,t.typedBufferStride)}function u(e,t,i,r,s=3,o=s){const a=Math.min(e.length/s,t.length/o);let l=0,c=0;const h=1/n.Tf;for(let n=0;n<a;n++)e[c]=r*(i*t[l])**h,e[c+1]=r*(i*t[l+1])**h,e[c+2]=r*(i*t[l+2])**h,l+=o,c+=s}function p(e,t,i,n=3,s=n){const o=(0,r.k)(e.length,n,3),a=(0,r.k)(t.length,s,3),l=Math.min(o,a);let c=0,h=0;for(let r=0;r<l;r++)e[h]=t[c]+i[0],e[h+1]=t[c+1]+i[1],e[h+2]=t[c+2]+i[2],c+=s,h+=n;return e}function f(e,t){d(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function d(e,t,i=3,n=i){const r=Math.min(e.length/i,t.length/n);let s=0,o=0;for(let a=0;a<r;a++){const r=t[s],a=t[s+1],l=t[s+2],c=r*r+a*a+l*l;if(c>0){const t=1/Math.sqrt(c);e[o]=t*r,e[o+1]=t*a,e[o+2]=t*l}s+=n,o+=i}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:u,linearToSRGBView:h,normalize:d,normalizeView:f,scale:c,scaleView:function(e,t,i){c(e.typedBuffer,t.typedBuffer,i,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,i){const n=Math.min(e.count,t.count),r=e.typedBuffer,s=e.typedBufferStride,o=t.typedBuffer,a=t.typedBufferStride;let l=0,c=0;for(let e=0;e<n;e++)r[c]=o[l]>>i,r[c+1]=o[l+1]>>i,r[c+2]=o[l+2]>>i,l+=a,c+=s},transformMat3:l,transformMat3View:a,transformMat4:o,transformMat4View:s,translate:p},Symbol.toStringTag,{value:"Module"}))},69540(e,t,i){i.d(t,{OU:()=>h,Pw:()=>u});var n=i(5482),r=i(69622),s=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(88620),l=i(64108);const c=Symbol("ClonableMixin"),h=e=>{var t;const i=e;let r=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=c}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,n=t.store,r={},l=new Map;for(const t in i){const o=i[t],a=n?.originOf(t),c=o.clonable;if(o.readOnly||!1===c||7!==a&&0!==a&&5!==a&&4!==a)continue;const h=this[t];let u=null;if("function"==typeof c)u=c(h,e);else if("reference"===c)u=h;else if(u=(0,s.TU)(h,e),null!=h&&null==u)continue;0===a?l.set(t,u):r[t]=u}const c=new(0,Object.getPrototypeOf(this).constructor)(r);if(l.size){const e=(0,a.oY)(c)?.store;if(e)for(const[t,i]of l)e.set(t,i,0)}return c}};return r=(0,n.Cg)([(0,l.$)("esri.core.Clonable")],r),r},u=h(r.A)},7762(e,t,i){i.d(t,{A:()=>I});var n,r=i(5482),s=i(98291),o=i(4576),a=i(65529),l=i(36563),c=i(4718),h=i(53966),u=i(93687),p=i(76030),f=i(56507),d=i(62788),m=i(10107),g=i(7695),y=i(64108),v=i(95488),w=i(12195);class _{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}}class C{constructor(e,t,i,n,r){this.target=e,this.added=t,this.removed=i,this.start=n,this.deleteCount=r}}const x=new u.A(()=>new _,void 0,e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1});function b(e){e&&"object"==typeof e&&"destroy"in e&&"function"==typeof e.destroy&&e.destroy()}function M(e){return e?e instanceof E?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function A(e){if(e?.length)return e[0]}function T(e,t,i,n){const r=Math.min(e.length-i,t.length-n);let s=0;for(;s<r&&e[i+s]===t[n+s];)s++;return s}function S(e,t,i,n){t&&t.forEach((t,r,s)=>{e.push(t),S(e,i.call(n,t,r,s),i,n)})}const R=new Set,O=new Set,P=new Set,Z=new Map;let z=0,E=n=class extends a.nJ{static ofType(e){if(!e)return n;if(Z.has(e))return Z.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const i in e.typeMap){const n=e.typeMap[i].prototype.declaredClass;t?t+=` | ${n}`:t=n}let i=class extends n{};return(0,r.Cg)([(0,g.u)({Type:e,ensureType:"function"==typeof e?(0,f.dp)(e):(0,f.aq)(e)})],i.prototype,"itemType",void 0),i=(0,r.Cg)([(0,y.$)(`esri.core.Collection<${t}>`)],i),Z.set(e,i),i}static isCollection(e){return null!=e&&e instanceof n}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new v.I,this._length=0,this._items=[],Object.defineProperty(this,"uid",{value:z++})}normalizeCtorArgs(e){return e?(0,o.yc)(e)||e instanceof n?{items:e}:e:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove(),super.destroy(),this._notifications=null}*[Symbol.iterator](){yield*this.items}get length(){return this._length}set length(e){e>this._length?h.A.getLogger(this).error("#length=","Cannot increase the length of the collection by assigning to the length property."):this.splice(e,Math.max(0,this._length-e))}get items(){return(0,d.gc)(this._observable),this._items}set items(e){this._emitBeforeChanges(1)||(this._splice(0,this.length,M(e)),this._emitAfterChanges(1))}hasEventListener(e){return!this.destroyed&&("change"===e?this._chgListeners.length>0:super.hasEventListener(e))}on(e,t){if(this.destroyed)return(0,l.hA)();if("change"===e){const e=this._chgListeners,i={removed:!1,callback:t};return e.push(i),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),(0,l.hA)(()=>{i.removed=!0,e.splice(e.indexOf(i),1)})}return super.on(e,t)}once(e,t){const i="deref"in t?()=>t.deref():()=>t,n=this.on(e,e=>{i()?.call(null,e),n.remove()});return n}add(e,t){if((0,d.gc)(this._observable),this._emitBeforeChanges(1))return this;const i=this.getNextIndex(t??null);return this._splice(i,0,[e]),this._emitAfterChanges(1),this}addMany(e,t=this._items.length){if((0,d.gc)(this._observable),!e?.length)return this;if(this._emitBeforeChanges(1))return this;const i=this.getNextIndex(t);return this._splice(i,0,M(e)),this._emitAfterChanges(1),this}at(e){if((0,d.gc)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,d.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return[];const e=this._removeAllRaw();return this._emitAfterChanges(2),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,d.gc)(this._observable),this._createNewInstance({items:this._items.map(c.o8)})}concat(...e){(0,d.gc)(this._observable);const t=e.map(M);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,d.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const i=this._splice(0,this.length),n=i.length;for(let r=0;r<n;r++)e.call(t,i[r],r,i);this._emitAfterChanges(2)}destroyAll(){this.drain(b)}destroyMany(e){const t=this.removeMany(e);return t.forEach(b),t}every(e,t){return(0,d.gc)(this._observable),this._items.every(e,t)}filter(e,t){(0,d.gc)(this._observable);const i=2===arguments.length?this._items.filter(e,t):this._items.filter(e);return this._createNewInstance({items:i})}find(e,t){return(0,d.gc)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,d.gc)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,d.gc)(this._observable);const i=[];return S(i,this,e,t),new n(i)}forEach(e,t){return(0,d.gc)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,d.gc)(this._observable),this._items[e]}getNextIndex(e){(0,d.gc)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,d.gc)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,d.gc)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,d.gc)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,d.gc)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,d.gc)(this._observable);const i=this._items.map(e,t);return new n({items:i})}reorder(e,t=this.length-1){(0,d.gc)(this._observable);const i=this.indexOf(e);if(-1!==i){if(t<0?t=0:t>=this.length&&(t=this.length-1),i!==t){if(this._emitBeforeChanges(4))return e;this._splice(i,1),this._splice(t,0,[e]),this._emitAfterChanges(4)}return e}}pop(){if((0,d.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const e=A(this._splice(this.length-1,1));return this._emitAfterChanges(2),e}push(...e){return(0,d.gc)(this._observable),this._emitBeforeChanges(1)||(this._splice(this.length,0,e),this._emitAfterChanges(1)),this.length}reduce(e,t){(0,d.gc)(this._observable);const i=this._items;return 2===arguments.length?i.reduce(e,t):i.reduce(e)}reduceRight(e,t){(0,d.gc)(this._observable);const i=this._items;return 2===arguments.length?i.reduceRight(e,t):i.reduceRight(e)}remove(e){return(0,d.gc)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,d.gc)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(2))return;const t=A(this._splice(e,1));return this._emitAfterChanges(2),t}removeMany(e){if((0,d.gc)(this._observable),!e?.length||this._emitBeforeChanges(2))return[];const t=e instanceof n?e.toArray():e,i=this._items,r=[],s=t.length;for(let e=0;e<s;e++){const n=t[e],s=i.indexOf(n);if(s>-1){const n=1+T(t,i,e+1,s+1),o=this._splice(s,n);o&&o.length>0&&r.push.apply(r,o),e+=n-1}}return this._emitAfterChanges(2),r}reverse(){if((0,d.gc)(this._observable),this._emitBeforeChanges(4))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(4),this}shift(){if((0,d.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const e=A(this._splice(0,1));return this._emitAfterChanges(2),e}slice(e=0,t=this.length){return(0,d.gc)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,d.gc)(this._observable),this._items.some(e,t)}sort(e){if((0,d.gc)(this._observable),!this.length||this._emitBeforeChanges(4)||!this._requiresSort(e))return this;const t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(4),this}_requiresSort(e=(e,t)=>e===t?0:e<t?-1:1){const t=this.length-1;for(let i=0;i<t;i++)if(e(this.items[i],this.items[i+1])>0)return!0;return!1}splice(e,t,...i){(0,d.gc)(this._observable),1===arguments.length&&(t=this.length),t??=0;const n=(t?2:0)|(i.length?1:0);if(this._emitBeforeChanges(n))return[];const r=this._splice(e,t,i)||[];return this._emitAfterChanges(n),r}toArray(){return(0,d.gc)(this._observable),this._items.slice()}toJSON(e){return(0,d.gc)(this._observable),this.toArray().map(t=>(0,w.W)(t)?t.toJSON(e):t)}toLocaleString(){return(0,d.gc)(this._observable),this._items.toLocaleString()}toString(){return(0,d.gc)(this._observable),this._items.toString()}unshift(...e){return(0,d.gc)(this._observable),!e.length||this._emitBeforeChanges(1)||(this._splice(0,0,e),this._emitAfterChanges(1)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,i){const n=this._items,r=this.itemType;let s,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=(0,p._)(()=>this._dispatchChange())),e<0&&(e+=this.length),t){if(o=n.splice(e,t),this.hasEventListener("before-remove")){const t=x.acquire();t.target=this,t.cancellable=!0;for(let i=0,r=o.length;i<r;i++)s=o[i],t.reset(s),this.emit("before-remove",t),t.defaultPrevented&&(o.splice(i,1),n.splice(e,0,s),e+=1,i-=1,r-=1);x.release(t)}if(this._length=this._items.length,this.hasEventListener("after-remove")){const e=x.acquire();e.target=this,e.cancellable=!1;const t=o.length;for(let i=0;i<t;i++)e.reset(o[i]),this.emit("after-remove",e);x.release(e)}}if(i?.length){if(r){const e=[];for(const t of i){const i=r.ensureType(t);null==i&&null!=t||e.push(i)}i=e}const t=this.hasEventListener("before-add"),s=this.hasEventListener("after-add"),o=e===this.length;if(t||s){const r=x.acquire();r.target=this,r.cancellable=!0;const a=x.acquire();a.target=this,a.cancellable=!1;for(const l of i)t?(r.reset(l),this.emit("before-add",r),r.defaultPrevented||(o?n.push(l):n.splice(e++,0,l),this._length=n.length,s&&(a.reset(l),this.emit("after-add",a)))):(o?n.push(l):n.splice(e++,0,l),this._length=n.length,a.reset(l),this.emit("after-add",a));x.release(a),x.release(r)}else{if(o)for(const e of i)n.push(e);else n.splice(e,0,...i);this._length=n.length}}if((i?.length||o?.length)&&this._notifyChangeEvent(i,o),this.hasEventListener("after-splice")){const n=new C(this,i,o,e,t);this.emit("after-splice",n)}return o}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const i=x.acquire();i.target=this,i.cancellable=!0,i.type=e,this.emit("before-changes",i),t=i.defaultPrevented,x.release(i)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=x.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),x.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}get updating(){return this._updating}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),this._updating=!1,!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;R.clear(),O.clear(),P.clear();for(const{added:t,removed:i}of e){if(t)if(0===P.size&&0===O.size)for(const e of t)R.add(e);else for(const e of t)O.has(e)?(P.add(e),O.delete(e)):P.has(e)||R.add(e);if(i)if(0===P.size&&0===R.size)for(const e of i)O.add(e);else for(const e of i)R.has(e)?R.delete(e):(P.delete(e),O.add(e))}const i=s.A.acquire();R.forEach(e=>{i.push(e)});const n=s.A.acquire();O.forEach(e=>{n.push(e)});const r=this._items,o=t.items,a=s.A.acquire();if(P.forEach(e=>{o.indexOf(e)!==r.indexOf(e)&&a.push(e)}),t.listeners&&(i.length||n.length||a.length)){const e={target:this,added:i,removed:n,moved:a},r=t.listeners.length;for(let i=0;i<r;i++){const n=t.listeners[i];n.removed||n.callback.call(this,e)}}s.A.release(i),s.A.release(n),s.A.release(a)}R.clear(),O.clear(),P.clear()}};(0,r.Cg)([(0,m.MZ)()],E.prototype,"_updating",void 0),(0,r.Cg)([(0,m.MZ)()],E.prototype,"_length",void 0),(0,r.Cg)([(0,m.MZ)()],E.prototype,"length",null),(0,r.Cg)([(0,m.MZ)()],E.prototype,"items",null),(0,r.Cg)([(0,m.MZ)({readOnly:!0})],E.prototype,"updating",null),E=n=(0,r.Cg)([(0,y.$)("esri.core.Collection")],E);const I=E},4902(e,t,i){i.d(t,{s:()=>o});var n=i(5482),r=i(64108);let s=0;const o=e=>{const t=e;let i=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return i=(0,n.Cg)([(0,r.$)("esri.core.Identifiable")],i),i};o(class{})},7695(e,t,i){function n(e){return(t,i)=>{t[i]=e}}i.d(t,{u:()=>n})},82534(e,t,i){function n(){return[0,0,0,1]}function r(e){return[e[0],e[1],e[2],e[3]]}i.d(t,{o8:()=>r,vt:()=>n,zK:()=>s});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:r,create:n,fromValues:function(e,t,i,n){return[e,t,i,n]}},Symbol.toStringTag,{value:"Module"}))},48163(e,t,i){function n(){return[0,0]}function r(e){return[e[0],e[1]]}function s(e,t){return[e,t]}function o(){return s(1,1)}function a(){return s(1,0)}function l(){return s(0,1)}i.d(t,{Un:()=>c,fA:()=>s,o8:()=>r,vt:()=>n});const c=o(),h=a(),u=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:h,UNIT_Y:u,ZEROS:[0,0],clone:r,create:n,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){const i=Math.min(2,e.length);for(let n=0;n<i;++n)t[n]=e[n];return t},fromValues:s,ones:o,unitX:a,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},17799(e,t,i){i.d(t,{T9:()=>a,d_:()=>r,gT:()=>s});var n=i(86211);function r(e,t){return{type:(0,n.t$)(t),value:e,unit:t}}function s(e,t){return{type:(0,n.t$)(t),value:e,unit:t}}function o(e,t,i="arithmetic"){return{type:(0,n.t$)(t),value:e,unit:t,rotationType:i}}function a(e,t){return null==e?t:null==t||e.value>(0,n.oU)(t.value,t.unit,e.unit)?e:t}r(0,"meters"),s(0,"square-meters"),o(0,"radians"),o(0,"degrees"),o(0,"degrees","geographic")},36708(e,t,i){i.d(t,{C_:()=>p,OH:()=>m,Vh:()=>g,on:()=>u,pc:()=>y,wB:()=>l,z7:()=>c});var n=i(37955),r=i(36563),s=i(97768),o=i(17676),a=i(14012);function l(e,t,i={}){return h(e,t,i,f)}function c(e,t,i={}){return h(e,t,i,d)}function h(e,t,i={},n){let r=null;const o=i.once?(e,i)=>{n(e)&&((0,s.xt)(r),t(e,i))}:(e,i)=>{n(e)&&t(e,i)};if(r=(0,a.Cn)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return r}function u(e,t,i,o={}){let a=null,c=null,h=null;function u(){a&&c&&(c.remove(),o.onListenerRemove?.(a),a=null,c=null)}function p(e){o.once&&o.once&&(0,s.xt)(h),i(e)}const f=l(e,(e,i)=>{u(),(0,n.wb)(e)&&(a=e,c=(0,n.on)(e,t,p),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return h=(0,r.hA)(()=>{f.remove(),u()}),h}function p(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const n=e();if(t?.(n))return Promise.resolve(n);let a=null;function l(){a=(0,s.xt)(a)}return new Promise((n,s)=>{a=(0,r.vE)([(0,o.u7)(i,()=>{l(),s((0,o.NK)())}),h(e,e=>{l(),n(e)},{sync:!1,once:!0},t??f)])})}(e,d,t)}function f(e){return!0}function d(e){return!!e}i(80559);const m={sync:!0},g={initial:!0},y={sync:!0,initial:!0}},35982(e,t,i){i.d(t,{B:()=>h});var n=i(4576),r=i(71511),s=i(36563),o=i(53966),a=i(97768),l=i(17676),c=i(83027);class h{constructor(e,t,i,n,r={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._onClientConnectedHandle=null,this._destroyed=!1,this._promise=(0,c.h)(e,{...r,schedule:n}).then(e=>{null!=this._thread||this._destroyed?e.close():(this._thread=e,this._promise=null,this._onClientConnectedHandle=this._thread.onClientConnected(e=>{r.hasInitialize&&e.invoke("initialize",{});for(const t of this._listeners)this._connectListenerToClient(t,e);this._onClientConnected(e)}))}),this._promise.catch(t=>o.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){const i=new u(e,t);return this._listeners.push(i),this._connectListener(i),(0,s.hA)(()=>{(0,n.TF)(this._listeners,i),i.destroy()})}[Symbol.dispose](){this.destroy()}destroy(){this._onClientConnectedHandle=(0,a.xt)(this._onClientConnectedHandle),this._thread&&(this._thread.close(),this._thread=null),this._promise=null;for(const e of this._listeners)e.destroy();this._listeners.length=0,this._transferLists={},this._destroyed=!0}invoke(e,t,i){return this.invokeMethod(this._mainMethod,e,t,i)}invokeMethod(e,t,i,n){if(this._thread){const r=this._transferLists[e],s=r?r(t):[];return this._thread.invoke(e,t,{transferList:s,signal:i,jobPriority:n})}return this._promise?this._promise.then(()=>((0,l.Te)(i),this.invokeMethod(e,t,i))):Promise.reject((0,l.NK)())}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(p):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject((0,l.NK)())}get promise(){return this._promise}_onClientConnected(e){}_connectListener(e){this._thread&&e.add(this._thread.on(e.eventName,e.callback))}_connectListenerToClient(e,t){e.add(t.on(e.eventName,e.callback))}}class u{constructor(e,t){this.eventName=e,this.callback=t,this._handles=new r.A}add(e){this._handles.add(e)}destroy(){this._handles.destroy()}}function p(){}},87992(e,t,i){i.d(t,{JR:()=>A,ME:()=>x,MY:()=>T,NO:()=>C,Nh:()=>M,V2:()=>Z,_s:()=>z,e6:()=>I,gh:()=>b,tr:()=>L,uX:()=>g});var n=i(5482),r=i(69397),s=i(16930),o=(i(70328),i(19419)),a=i(60408),l=i(21325),c=i(513),h=i(50954),u=i(79567),p=i(52006),f=i(49663),d=i(46068),m=i(92722);class g{constructor({type:e,spatialReference:t,vertexCount:i,vertexXY:n,vertexZ:r,vertexM:s,partCount:o,partOffsets:a,partFlags:l,segmentFlags:c,segmentIndices:h,segmentParams:u,segmentCountArc:p,segmentCountBezier:f}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=e,this.spatialReference=t,this.vertexCount=i,this.vertexXY=n,this.vertexZ=r,this.vertexM=s,this.partCount=o,this.partOffsets=a,this.partFlags=l,this.segmentFlags=c,this.segmentIndices=h,this.segmentParams=u,this.segmentCountArc=p,this.segmentCountBezier=f}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){const{segmentCount:e,segmentCountArc:t,segmentCountBezier:i}=this;return e&&e-t-i}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return this.segmentCountArc+this.segmentCountBezier>0}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function e(e){return e?r.Ul+e.byteLength:0}return e(this.vertexXY)+e(this.vertexZ)+e(this.vertexM)+e(this.partOffsets)+e(this.partFlags)+e(this.segmentFlags)+e(this.segmentIndices)+e(this.segmentParams)}clone(){const{type:e,vertexCount:t,partCount:i,hasZ:n,hasM:r,segmentCountArc:s,segmentCountBezier:o}=this,a=Z(e,t,i,n,r,this.hasCurves(),s,o);a.spatialReference=this.spatialReference;const{vertexXY:l,vertexZ:c,vertexM:h}=this;if(a.vertexXY.set(l.subarray(0,2*t),0),a.vertexZ?.set(c.subarray(0,t),0),a.vertexM?.set(h.subarray(0,t),0),this.isMultipart()){const{partOffsets:e,partFlags:t}=this;a.partFlags.set(t.subarray(0,i+1)),a.partOffsets.set(e.subarray(0,i+1))}if(this.hasCurves()){const{segmentFlags:e,segmentIndices:i,segmentParams:n,segmentParamCount:r}=this;a.segmentFlags.set(e.subarray(0,t),0),a.segmentIndices.set(i.subarray(0,t),0),a.segmentParams.set(n.subarray(0,r),0)}return a}equals(e){return this.equalsWithinTolerance(e,0)}equalsWithinTolerance(e,t){if(null==e)return!1;if(this===e)return!0;if(!(0,l.aI)(this.spatialReference,e.spatialReference))return!1;if(this.vertexCount!==e.vertexCount||this.partCount!==e.partCount)return!1;if(this.hasZ!==e.hasZ||this.hasM!==e.hasM)return!1;if(this.hasCurves()!==e.hasCurves()||this.segmentCountArc!==e.segmentCountArc||this.segmentCountBezier!==e.segmentCountBezier)return!1;const i=0===t?(e,t)=>e!==t||isNaN(e)!==isNaN(t):(e,i)=>Math.abs(e-i)>t||isNaN(e)!==isNaN(i);for(let t=0;t<this.vertexCount;++t)if(i(this.vertexXY[2*t],e.vertexXY[2*t])||i(this.vertexXY[2*t+1],e.vertexXY[2*t+1]))return!1;if(this.hasZ)for(let t=0;t<this.vertexCount;++t)if(i(this.vertexZ[t],e.vertexZ[t]))return!1;if(this.hasM)for(let t=0;t<this.vertexCount;++t)if(i(this.vertexM[t],e.vertexM[t]))return!1;for(let t=0;t<this.partCount;++t)if(this.partFlags[t]!==e.partFlags[t]||this.partOffsets[t]!==e.partOffsets[t])return!1;if(this.hasCurves()){for(let t=0;t<this.vertexCount;++t)if(this.segmentFlags[t]!==e.segmentFlags[t]||this.segmentIndices[t]!==e.segmentIndices[t])return!1;for(let t=0;t<this.segmentParamCount;++t)if(i(this.segmentParams[t],e.segmentParams[t]))return!1}return!0}get parts(){return this.isMultipart()?new y(this):[][Symbol.iterator]()}}class y{constructor(e){this.geometry=e,this.value=new v(e)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class v{constructor(e){this.geometry=e,this.index=-1,this._readVertex=O(e),this._segments=new w(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){const e=this.geometry.partOffsets;return e[this.index+1]-e[this.index]}}class w{constructor(e){this._part=e,this._partStart=0,this._partEnd=0,this._isPolygon="polygon"===e.geometry.type,this.value=new _(e.geometry)}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;const e=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=e&&this._isPolygon?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){const{index:e}=this._part,t=this._part.geometry.partOffsets;this._partStart=t[e],this._partEnd=t[e+1]-(this._isPolygon?1:2),this.value.indexOfStartVertex=this._partStart-1}}class _{constructor(e){this.geometry=e,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=O(e)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){const e=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===e)return this.end;const t=this.geometry.segmentParams;let i=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===e){const e=t[i++],n=t[i++],r=t[i++],s=t[i++];return{b:[this.end,[e,n],[r,s]]}}const n=t[i++],r=t[i++],s=t[i++],o=t[i++],a=t[i++],l=t[i++];i++,i++;const c=t[i++],h=t[i++];if(!Boolean(4&n)&&1===s)return{c:[this.end,[c,h]]};const u=2&n?0:1,p=1&n?0:1;return{a:[this.end,[a,l],u,p,o,r,s]}}}function C(e,t){const i={stack:[],error:void 0,hasError:!1};try{return t??=(0,o.Ie)(),(0,n.mS)(i,new S(e,["vertexZ","vertexM","spatialReference"]),!1),(0,o.bx)(t,function(e){let t;const{vertexCount:i,vertexXY:r,vertexZ:s,vertexM:a}=e,l=R(e);if(e.hasCurves()){const i={stack:[],error:void 0,hasError:!1};try{(0,n.mS)(i,new S(e,["vertexZ","vertexM"]),!1);const r=(0,o.Ie)();for(const t of e.parts){let e=t.startVertex;for(const{curve:i}of t.segments)(0,u.e)(r,e,i),e=(0,p.yP)(i)}const[s,a,c,h]=r;t={xmin:s,ymin:a,xmax:c,ymax:h,spatialReference:l}}catch(e){i.error=e,i.hasError=!0}finally{(0,n.hk)(i)}}else{let e,n,s,o;e=n=1/0,s=o=-1/0;for(let t=0;t<i;++t){const i=r[2*t],a=r[2*t+1];e=Math.min(e,i),s=Math.max(s,i),n=Math.min(n,a),o=Math.max(o,a)}t={xmin:e,ymin:n,xmax:s,ymax:o,spatialReference:l}}if(s){let e=1/0,i=-1/0;for(const t of s)e=Math.min(e,t),i=Math.max(i,t);t.zmin=e,t.zmax=i}if(a){let e=1/0,i=-1/0;for(const t of a)e=Math.min(e,t),i=Math.max(i,t);t.mmin=e,t.mmax=i}return t}(e)),t}catch(e){i.error=e,i.hasError=!0}finally{(0,n.hk)(i)}}function x(e){let t,i,n;if((0,a.fT)(e)){n="point";const{x:r,y:s,z:o,m:a}=e,l=[r,s];null!=o&&l.push(o),null!=a&&l.push(a),i=[[l]],t=1}else(0,a.U9)(e)?(n="multipoint",i=[e.points],t=e.points.length):(0,a.Rg)(e)?(n="polyline",i=e.curvePaths??e.paths,t=i.reduce((e,t)=>e+t.length,0)):(n="polygon",i=e.curveRings??e.rings,t=i.reduce((e,t)=>(0===t.length||(e+=t.length,P(t[0],(0,p.yP)(t.at(-1)))&&--e),e),0));const r=Z(n,t,n.includes("point")?0:i.length,(0,a.Pv)(e),(0,a.W0)(e),(0,p.Ed)(e)),{hasZ:s,hasM:o,vertexXY:l,vertexZ:c,vertexM:h}=r;function u(e){l[2*d]=e[0],l[2*d+1]=e[1],s&&(c[d]=e[2]),o&&(h[d]=e[f]),++d}r.spatialReference=e.spatialReference??void 0;const f=r.hasZ?3:2;let d=0;if(!r.isMultipart()){if(!s&&!o){for(const[e,t]of i[0])l[2*d]=e,l[2*d+1]=t,++d;return r}for(const e of i[0])u(e);return r}const m="polygon"===n,{partOffsets:g}=r;let y=0;if(!(0,p.Ed)(e)){for(const e of i){if(g[y++]=d,0===e.length)continue;let t=e.length;if(m&&P(e[0],e.at(-1))&&--t,s||o)for(let i=0;i<t;++i)u(e[i]);else for(let i=0;i<t;++i){const[t,n]=e[i];l[2*d]=t,l[2*d+1]=n,++d}}return g[y]=d,r}function v(e){const t=w+e;if(t<=(r.segmentParams?.length??0))return;let i=t*j;i=20*Math.ceil(i/20);const n=r.segmentParams;r.segmentParams=new Float64Array(i),null!=n&&r.segmentParams.set(n)}let w=0;for(const e of i){if(r.partOffsets[y++]=d,0===e.length)continue;const t=e[0];let i=t;for(let t=1;t<e.length;++t){const n=e[t];u(i);const s=d-1;(0,p.wY)(n)?(v(10),++r.segmentCountArc,w=z(i,n,r,s,w),i=n.a[0]):(0,p.DA)(n)?(v(10),++r.segmentCountArc,w=E(i,n,r,s,w),i=n.a[0]):(0,p.aO)(n)?(v(10),++r.segmentCountArc,w=I(i,n,r,s,w),i=n.c[0]):(0,p.n1)(n)?(v(4),++r.segmentCountBezier,w=L(0,n,r,s,w),i=n.b[0]):i=n}m&&P(t,i)||u(i)}return r.partOffsets[y]=d,r}function b(e){const t=O(e),{vertexCount:i,partCount:n,hasZ:r,hasM:s}=e,o=R(e);if("point"===e.type){const[t,i]=e.vertexXY,n=e.vertexZ?.[0],r=e.vertexM?.[0];return{x:t,y:i,z:n,m:r,spatialReference:o}}let a=0;if("multipoint"===e.type){const e=[];for(;a<i;)e.push(t(a++));return{points:e,spatialReference:o,hasZ:r,hasM:s}}const l="polygon"===e.type;if(!e.hasCurves()){const i=new Array;for(let r=0;r<n;++r){const n=e.partOffsets[r+1],s=new Array;for(;a<n;)s.push(t(a++));l&&s.length>0&&s.push(s[0]),i.push(s)}return l?{rings:i,hasZ:r,hasM:s,spatialReference:o}:{paths:i,hasZ:r,hasM:s,spatialReference:o}}const c=new Array;for(const{segments:t,startVertex:i}of e.parts){const e=[i];for(const{curve:i}of t)e.push(i);c.push(e)}return l?{rings:[],curveRings:c,hasZ:r,hasM:s,spatialReference:o}:{paths:[],curvePaths:c,hasZ:r,hasM:s,spatialReference:o}}function M(e,{lengths:t,coords:i,hasZ:n,hasM:r},s){const o=e.includes("point")?0:t.length,a="polygon"===e,l="point"===e?1:t.reduce((e,t)=>e+t,0)-(a?o:0);n??=!1,r??=!1;const c=Z(e,l,o,n,r,!1,0,0);if(c.spatialReference=s??void 0,!c.isMultipart()){for(let e=0,t=0;e<l;++e)c.vertexXY[2*e]=i[t++],c.vertexXY[2*e+1]=i[t++],n&&(c.vertexZ[e]=i[t++]),r&&(c.vertexM[e]=i[t++]);return c}const h=2+Number(n)+Number(r);let u=0,p=0;c.partOffsets[0]=0;for(const e of t){const t=c.partOffsets[p],s=t+e-Number(a);c.partOffsets[++p]=s;for(let e=t;e<s;++e)c.vertexXY[2*e]=i[u++],c.vertexXY[2*e+1]=i[u++],n&&(c.vertexZ[e]=i[u++]),r&&(c.vertexM[e]=i[u++]);a&&(u+=h)}return c}function A({type:e,vertexCount:t,vertexXY:i,vertexZ:n,vertexM:r,partCount:s,partOffsets:o,hasZ:a,hasM:l}){const c=new m.A([],[],a,l);s=Math.max(s,1);const h="polygon"===e;let u=0;for(let e=0;e<s;++e){const s=o?.[e+1]??t,p=c.coords.length;for(let e=u;e<s;++e)c.coords.push(i[2*e],i[2*e+1]),a&&c.coords.push(n[e]),l&&c.coords.push(r[e]);if(h){const e=u;c.coords.push(i[2*e],i[2*e+1]),a&&c.coords.push(n[e]),l&&c.coords.push(r[e])}c.lengths.push((c.coords.length-p)/c.stride),u=s}return"point"===e&&(c.lengths.length=0),c}function T(e,t){return"getSpatialReference"in e&&(t=function(e){if(null==e)return;const t=e.getText()||void 0,i=e.isCustomWkid()?0:e.getOldID();if(i<=0)return{wkt:t};let n=e.getLatestID();(n<=0||n===i)&&(n=void 0);const r=e.getVCS();if(null==r)return{wkid:i,latestWkid:n,wkt:t};const s=r.isCustomWkid()?0:r.getOldID();if(s<=0)return{wkt:t};let o=e.getLatestVerticalID();return(o<=0||o===s)&&(o=void 0),{wkid:i,wkt:t,latestWkid:n,vcsWkid:s,latestVcsWkid:o}}(e.getSpatialReference()),e=e.getGeometry()),new g({...e.toFlatGeometry(),spatialReference:t})}class S{constructor(e,t){this.target=e,this.keys=t,this.oldValues=t.map(t=>e[t]);for(const i of t)e[i]=void 0}[Symbol.dispose](){this.keys.map((e,t)=>{this.target[e]=this.oldValues[t]})}}function R({spatialReference:e}){return e instanceof s.A?e.toJSON():e}function O({vertexXY:e,vertexZ:t,vertexM:i}){return t?i?n=>[e[2*n],e[2*n+1],t[n],i[n]]:i=>[e[2*i],e[2*i+1],t[i]]:i?t=>[e[2*t],e[2*t+1],i[t]]:t=>[e[2*t],e[2*t+1]]}function P(e,t){return e.every((e,i)=>e===t[i])}function Z(e,t,i,n,r,s,o,a){o??=0,a??=0;const l=new g({type:e,vertexCount:t,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:i,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:o,segmentCountBezier:a});let c=2*Float64Array.BYTES_PER_ELEMENT*t;n&&(c+=Float64Array.BYTES_PER_ELEMENT*t),r&&(c+=Float64Array.BYTES_PER_ELEMENT*t),l.isMultipart()&&(c+=(i+1)*Int32Array.BYTES_PER_ELEMENT,c+=(i+1)*Int8Array.BYTES_PER_ELEMENT),s&&(c+=t*Int8Array.BYTES_PER_ELEMENT,c+=t*Int32Array.BYTES_PER_ELEMENT,c+=l.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);const h=new ArrayBuffer(c);let u=0;return l.vertexXY=new Float64Array(h,u,2*t),u+=l.vertexXY.byteLength,n&&(l.vertexZ=new Float64Array(h,u,t),u+=l.vertexZ.byteLength),r&&(l.vertexM=new Float64Array(h,u,t),u+=l.vertexM.byteLength),s&&(l.segmentParams=new Float64Array(h,u,l.segmentParamCount),u+=l.segmentParams.byteLength,l.segmentIndices=new Int32Array(h,u,t),l.segmentIndices.fill(V),u+=l.segmentIndices.byteLength),l.isMultipart()&&(l.partOffsets=new Int32Array(h,u,i+1),u+=l.partOffsets.byteLength,l.partFlags=new Int8Array(h,u,i+1),u+=l.partFlags.byteLength,"polygon"===l.type&&l.partFlags.subarray(0,i).fill(1)),s&&(l.segmentFlags=new Int8Array(h,u,t),l.segmentFlags.fill(1),u+=l.segmentFlags.byteLength),l}function z(e,t,{segmentFlags:i,segmentIndices:n,segmentParams:r},s,o){i[s]=4,n[s]=o;const[a,[l,c],h,u,p,f,m]=t.a;let g=4;u||(g|=1),h||(g|=2);const y=(0,d.SW)(e,t),[v,w]=(0,d.Uk)(y,.5);return r[o++]=g,r[o++]=f,r[o++]=m,r[o++]=p,r[o++]=l,r[o++]=c,r[o++]=y.u2-y.u1,r[o++]=y.u1,r[o++]=v,r[o++]=w,o}function E(e,t,{segmentFlags:i,segmentIndices:n,segmentParams:r},s,o){i[s]=4,n[s]=o;const a=(0,f.io)(e,t);return D(a,4,...(0,c.mq)(a,.5),r,o)}function I(e,t,{segmentFlags:i,segmentIndices:n,segmentParams:r},s,o){return i[s]=4,n[s]=o,D((0,h.pM)(e,t),0,...t.c[1],r,o)}function D(e,t,i,n,r,s){const{cx:o,cy:a,thetaStart:l,thetaEnd:c,radius:h}=e;return l>c||(t|=1),Math.abs(c-l)<=Math.PI||(t|=2),r[s++]=t,r[s++]=h,r[s++]=1,r[s++]=0,r[s++]=o,r[s++]=a,r[s++]=c-l,r[s++]=l,r[s++]=i,r[s++]=n,s}function L(e,{b:[t,[i,n],[r,s]]},{segmentFlags:o,segmentIndices:a,segmentParams:l},c,h){return o[c]=2,a[c]=h,l[h++]=i,l[h++]=n,l[h++]=r,l[h++]=s,h}const j=1.61803,V=-1},54239(e,t,i){i.d(t,{A:()=>g});var n,r=i(5482),s=i(4576),o=i(66552),a=i(25482),l=i(86211),c=i(67076),h=i(91429),u=i(43937),p=i(36005);const f=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),d=f.jsonValues.slice();(0,s.Xy)(d,"orthometric");const m=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let g=n=class extends a.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return f.write(e,t,i)}readHeightModel(e,t,i){return f.read(e)||(i?.messages&&i.messages.push(function(e,t){return new c.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return m.read(e)||(i?.messages&&i.messages.push(y(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,l.LA)(e)||m.read(e)||(i?.messages&&i.messages.push(y(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new n({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,l.k1)(t);return new n({heightModel:e.heightModel,heightUnit:i??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new n;return t.read(e,{origin:"web-scene"}),t}};function y(e,t){return new c.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,r.Cg)([(0,h.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:d,default:"ellipsoidal",write:{isRequired:!0}}}}})],g.prototype,"heightModel",void 0),(0,r.Cg)([(0,u.K)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,r.Cg)([(0,p.w)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,r.Cg)([(0,h.MZ)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:{writer:m.write,isRequired:!0}}}}})],g.prototype,"heightUnit",void 0),(0,r.Cg)([(0,p.w)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,r.Cg)([(0,p.w)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,r.Cg)([(0,h.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,r.Cg)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=n=(0,r.Cg)([(0,h.$K)("esri.geometry.HeightModelInfo")],g)},86742(e,t,i){i.d(t,{Hh:()=>o,fz:()=>l,g7:()=>a,s1:()=>s});var n=i(83290);let r;function s(){return!!r&&(0,n.i)()}async function o(){if(!s()){const[e,t]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(6859),i.e(6558)]).then(i.bind(i,6558)),Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(6061)]).then(i.bind(i,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,n.l)()]);r=new e.OperatorGeodeticArea,t(n.p)}}function a(e,t,i){return r.execute(e,t,i,null)}function l(){return r.supportsCurves()}},77085(e,t,i){i.d(t,{Hh:()=>a,fz:()=>h,g7:()=>l,s1:()=>o,zo:()=>c});var n=i(76061),r=i(83290);let s;function o(){return!!s&&(0,r.i)()}async function a(){if(!o()){const[e,t]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(1088)]).then(i.bind(i,31088)),Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756)]).then(i.bind(i,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,r.l)()]);s=new e.OperatorGeodeticDensifyByLength,t(r.p)}}function l(e,t,i,n){return s.execute(e,t,i,n,null)}function c(e,t,i,r){const o=s.executeMany(new n.S(e),t,i,r,null);return Array.from(o)}function h(){return s.supportsCurves()}},35223(e,t,i){i.d(t,{Hh:()=>o,fz:()=>l,g7:()=>a,s1:()=>s});var n=i(83290);let r;function s(){return!!r&&(0,n.i)()}async function o(){if(!s()){const[e,t]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(4167)]).then(i.bind(i,28879)),Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(6061)]).then(i.bind(i,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,n.l)()]);r=new e.OperatorGeodeticLength,t(n.p)}}function a(e,t,i){return r.execute(e,t,i,null)}function l(){return r.supportsCurves()}},4144(e,t,i){i.d(t,{Hh:()=>a,fz:()=>h,g7:()=>l,s1:()=>o,zo:()=>c});var n=i(76061),r=i(83290);let s;function o(){return!!s&&(0,r.i)()}async function a(){if(!o()){const[e,t]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(9192)]).then(i.bind(i,9192)),Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756)]).then(i.bind(i,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,r.l)()]);s=new e.OperatorProject,t(r.p)}}function l(e,t){return s.execute(e,t,null)}function c(e,t){const i=s.executeMany(new n.S(e),t,null);return Array.from(i)}function h(){return s.supportsCurves()}},81150(e,t,i){i.d(t,{Pg:()=>l,fz:()=>c,g7:()=>o,zo:()=>a});var n=i(76061),r=(i(55537),i(88885),i(15756));i(95213);const s=new r.f;function o(e,t,i){return s.execute(e,t,i,null)}function a(e,t,i){const r=s.executeMany(new n.S(e),t,i,null);return Array.from(r)}function l(e,t,i){return s.isSimpleAsFeature(e,t,i,null,null)}function c(){return s.supportsCurves()}},83276(e,t,i){i.r(t),i.d(t,{execute:()=>f,executeMany:()=>d,isLoaded:()=>u,load:()=>p,supportsCurves:()=>h});var n=i(4144),r=i(17499);let s,o,a,l,c,h;function u(){return!!s&&(0,n.s1)()}async function p(){if(!u()){const[e,t]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(9285)]).then(i.bind(i,78125)),Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(6129)]).then(i.bind(i,86129)),(0,n.Hh)()]);s=e.fromGeometry,o=e.fromSpatialReference,a=e.getSpatialReference,l=e.toGeometry,c=t.createProjectionTransformation,h=(0,n.fz)()}}function f(e,t,i){const h=a(e),u=c(o(h),o(t),i),p=l((0,n.g7)(s(e),u),t);return!i?.zConversionDisabled&&p?.hasZ&&(0,r.gw)([p],h,t),p}function d(e,t,i){const h=e.map(s),u=a(e),p=c(o(u),o(t),i),f=(0,n.zo)(h,p).map(e=>l(e,t));return!i?.zConversionDisabled&&f&&(0,r.gw)(f,u,t),f}},78125(e,t,i){i.r(t),i.d(t,{fromExtent:()=>g,fromGeometry:()=>m,fromMultipoint:()=>y,fromPoint:()=>v,fromPolygon:()=>w,fromPolyline:()=>_,fromPolylineUsingImportOperator:()=>C,fromSpatialReference:()=>x,getSpatialReference:()=>d,toExtent:()=>M,toGeometry:()=>b,toMultipoint:()=>A,toPoint:()=>T,toPolygon:()=>S,toPolyline:()=>R});var n=i(83661),r=(i(79187),i(55537)),s=i(95213),o=i(88885),a=i(5443),l=i(48526),c=i(86738),h=i(39829),u=i(82799),p=(i(90293),i(83299));const f="_gxVersion";function d(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function m(e){switch(e.type){case"point":return v(e);case"multipoint":return y(e);case"polyline":return _(e);case"polygon":return w(e);case"extent":return g(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function g(e){if(!e.getCacheValue(f)){const t=new s.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(2,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(1,0,e.zmin,e.zmax),e.setCacheValue(f,t)}return e.getCacheValue(f)}function y(e){if(!e.getCacheValue(f)){const t=new o.M,i=new s.P,n=e.points,r=e.hasM,a=e.hasZ,l=a?3:2;for(let e=0,s=n.length;e<s;e++){const s=n[e];i.setXYCoords(s[0],s[1]),a&&i.setZ(s[2]??0),r&&i.setM(s[l]??NaN),t.add(i)}e.setCacheValue(f,t)}return e.getCacheValue(f)}function v(e){if(!e.getCacheValue(f)){const t=new s.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(f,t)}return e.getCacheValue(f)}function w(e){if(!e.getCacheValue(f)){const{curveRings:t,hasM:i,hasZ:n,rings:r}=e,s=(0,p.fromGeometryToGXGeometry)({curveRings:t,hasM:i,hasZ:n,rings:r});e.setCacheValue(f,s)}return e.getCacheValue(f)}function _(e){if(!e.getCacheValue(f)){const{curvePaths:t,hasM:i,hasZ:n,paths:r}=e,s=(0,p.fromGeometryToGXGeometry)({curvePaths:t,hasM:i,hasZ:n,paths:r});e.setCacheValue(f,s)}return e.getCacheValue(f)}function C(e){if(!e.getCacheValue(f)){const{curvePaths:t,hasM:i,hasZ:n,paths:r}=e,s=(0,p.fromGeometryToGXGeometryUsingImportOperator)({curvePaths:t,hasM:i,hasZ:n,paths:r});e.setCacheValue(f,s)}return e.getCacheValue(f)}function x(e){return e.cache?(e.cache[f]??=(0,p.fromSpatialReference)(e),e.cache[f]):(0,p.fromSpatialReference)(e)}function b(e,t){if(e)switch(e.getGeometryType()){case r.G.enumPoint:return T(e,t);case r.G.enumEnvelope:return M(e,t);case r.G.enumMultiPoint:return A(e,t);case r.G.enumPolyline:return R(e,t);case r.G.enumPolygon:return S(e,t)}return null}function M(e,t){if(e.isEmpty())return null;const i=new a.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),n=e.getDescription();if(n.hasM()){const t=e.queryInterval(2,0);i.mmin=t.vmin,i.mmax=t.vmax}if(n.hasZ()){const t=e.queryInterval(1,0);i.zmin=t.vmin,i.zmax=t.vmax}return i.setCacheValue(f,e),i}function A(e,t){if(e.isEmpty())return null;const i=e.getDescription(),n=i.hasM(),r=i.hasZ(),o=[],a=new s.P;for(let t=0,i=e.getPointCount();t<i;t++){e.getPointByVal(t,a);const i=[a.getX(),a.getY()];r&&i.push(a.getZ()),n&&i.push(a.getM()),o.push(i)}const c=new l.A({hasM:n,hasZ:r,points:o,spatialReference:t});return c.setCacheValue(f,e),c}function T(e,t){if(e instanceof n.P)return new c.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const i=new c.A({x:e.getX(),y:e.getY(),spatialReference:t}),r=e.getDescription();return r.hasM()&&(i.m=e.getM()),r.hasZ()&&(i.z=e.getZ()),i.setCacheValue(f,e),i}function S(e,t){if(e.isEmpty())return null;const i=h.A.fromJSON({...(0,p.toGeometry)(e,null),spatialReference:t});return i.setCacheValue(f,e),i}function R(e,t){if(e.isEmpty())return null;const i=u.A.fromJSON({...(0,p.toGeometry)(e,null),spatialReference:t});return i.setCacheValue(f,e),i}},5808(e,t,i){i.d(t,{O:()=>n});const n={geodesic:0,loxodrome:1,"great-elliptic":2,"normal-section":3,"shape-preserving":4}},17499(e,t,i){i.d(t,{gw:()=>o});var n=i(49186),r=i(60408),s=i(62815);function o(e,t,i){let n;for(const o of e)if(o&&(0,r.Pv)(o)&&!("vertexAttributes"in o)){if(!n){null==t.vcsWkid&&null==i.vcsWkid||l(t,i);const e="type"in o?o.type:(0,r.$B)(o);if(n=(0,s.N)(e,t,i),!n)return}n(o)}}class a extends n.A{constructor(){super("projection:z-unsupported","projection of z values is unsupported between different vertical coordinate systems")}}function l({vcsWkid:e},{vcsWkid:t}){if((e??null)!==(t??null))throw new a}},72727(e,t,i){function n(e,t,i){if(t<=0)return 0;const n=e-i;return n<0?0:Math.floor(n/t)+1}i.d(t,{k:()=>n}),i(53966)},27921(e,t,i){i.d(t,{$Q:()=>_,C:()=>a,Cr:()=>h,O_:()=>c,Qj:()=>l,T7:()=>v,Tj:()=>w,lU:()=>u,mN:()=>C,vE:()=>x,vt:()=>o});var n=i(34727),r=i(35522),s=i(51850);function o(e=b){return[e[0],e[1],e[2],e[3]]}function a(e,t){return function(e,t,i,n,r=o()){return r[0]=e,r[1]=t,r[2]=i,r[3]=n,r}(t[0],t[1],t[2],t[3],e)}function l(e){return e}function c(e,t,i){const n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=Math.abs(n-1)>1e-5&&n>1e-12?1/Math.sqrt(n):1;return i[0]=t[0]*r,i[1]=t[1]*r,i[2]=t[2]*r,i[3]=-(i[0]*e[0]+i[1]*e[1]+i[2]*e[2]),i}function h(e,t,i,n=o()){const r=i[0]-t[0],s=i[1]-t[1],a=i[2]-t[2],l=e[0]-t[0],c=e[1]-t[1],h=e[2]-t[2],u=s*h-a*c,p=a*l-r*h,f=r*c-s*l,d=u*u+p*p+f*f,m=Math.abs(d-1)>1e-5&&d>1e-12?1/Math.sqrt(d):1;return n[0]=u*m,n[1]=p*m,n[2]=f*m,n[3]=-(n[0]*e[0]+n[1]*e[1]+n[2]*e[2]),n}function u(e,t,i,n=0,s=Math.floor(i*(1/3)),o=Math.floor(i*(2/3))){if(i<3)return!1;t(f,n);let a=s,l=!1;for(;a<i-1&&!l;)t(d,a),a++,l=!(0,r.t2)(f,d);if(!l)return!1;for(a=Math.max(a,o),l=!1;a<i&&!l;)t(m,a),a++,(0,r.Re)(g,f,d),(0,r.S8)(g,g),(0,r.Re)(y,d,m),(0,r.S8)(y,y),l=!(0,r.t2)(f,m)&&!(0,r.t2)(d,m)&&Math.abs((0,r.Om)(g,y))<p;return l?(h(f,d,m,e),!0):(0!==n||1!==s||2!==o)&&u(e,t,i,0,1,2)}i(78955),i(44280),i(32114),i(32728);const p=.99619469809,f=(0,s.vt)(),d=(0,s.vt)(),m=(0,s.vt)(),g=(0,s.vt)(),y=(0,s.vt)();function v(e,t,i){return function(e){return 0===e||1===e}(x(e,t.origin,t.vector,0,i))}function w(e,t){return C(e,t)>=0}function _(e,t){const i=(0,r.Om)(e,t.ray.direction),n=-C(e,t.ray.origin);if(n<0&&i>=0)return!1;if(i>-1e-6&&i<1e-6)return n>0;if((n<0||i<0)&&!(n<0&&i<0))return!0;const s=n/i;return i>0?s<t.c1&&(t.c1=s):s>t.c0&&(t.c0=s),t.c0<=t.c1}function C(e,t){return(0,r.Om)(e,t)+e[3]}function x(e,t,i,s,o){const a=(0,r.Om)(e,i),l=C(e,t);if(0===a)return l>=0?2:3;let c=-l/a;return 1&s&&(c=(0,n.qE)(c,0,1)),!(4&s)&&c<0||!(8&s)&&c>1?l>=0?2:3:((0,r.WQ)(o,t,(0,r.hs)(o,i,c)),l>=0?0:1)}const b=[0,0,1,0]},44280(e,t,i){i.d(t,{g7:()=>a,gr:()=>o});var n=i(34727),r=i(35522),s=i(51850);function o(e,t){return(0,r.Om)(e,t)/(0,r.Bw)(e)}function a(e,t){const i=(0,r.Om)(e,t)/((0,r.Bw)(e)*(0,r.Bw)(t));return-(0,n.XM)(i)}(0,s.vt)(),(0,s.vt)()},32114(e,t,i){i.d(t,{Rc:()=>f,J8:()=>d,rq:()=>u,Km:()=>p}),i(44208);var n=i(26390),r=i(29242),s=i(9093),o=i(82534),a=i(48163),l=i(51850),c=i(91829);class h{constructor(e){this._create=e,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,n.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const e=2*this._itemsPtr;this._items.length>e&&(this._items.length=e),this._itemsPtr=0}static createVec2f64(){return new h(a.vt)}static createVec3f64(){return new h(l.vt)}static createVec4f64(){return new h(c.vt)}static createMat3f64(){return new h(r.vt)}static createMat4f64(){return new h(s.vt)}static createQuatf64(){return new h(o.vt)}get test(){}}h.createVec2f64();const u=h.createVec3f64(),p=h.createVec4f64(),f=(h.createMat3f64(),h.createMat4f64()),d=h.createQuatf64()},38732(e,t,i){i.r(t),i.d(t,{default:()=>A});var n=i(5482),r=i(11254),s=i(49186),o=i(97768),a=i(25728),l=i(17676),c=i(84952),h=i(91429),u=i(54239),p=i(4146),f=i(89186),d=i(18768),m=i(34287),g=i(8303),y=i(10873),v=i(87378),w=i(35982);class _ extends w.B{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(C.forEach((e,t)=>{e===this&&C.delete(t)}),this.destroy())}}const C=new Map;var x=i(36005);let b=class extends((0,f.f)((0,d.b)((0,m.q)((0,g.A)((0,a.M)(p.A)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=C.get(e);return t||(null!=e?(t=new _(t=>e.immediate.schedule(t)),C.set(e,t)):(t=new _,C.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.Gz)(this._lercDecoder)}readCapabilities(e,t){const i=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());return i?{operations:{supportsTileMap:i.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let i=t.currentVersion;return i||(i=9.3),i}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new s.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(l.QP).then(()=>this._fetchImageService(t))),Promise.resolve(this)}async fetchTile(e,t,i,n){const o=n?.signal,a={responseType:"array-buffer",signal:o,useQueue:n?.useQueue,priority:n?.priority},l={noDataValue:n?.noDataValue,returnFileInfo:!0};await this.load(),await this._fetchTileAvailability(e,t,i,n);const c=await(0,r.A)(this.getTileUrl(e,t,i),a),h=await this._lercDecoder.decode(c.data,l,o);if(!h)throw new s.A("elevation-layer:tile-decode-failed","Failed to decode elevation tile data.");return new v.A({values:h.pixelData,width:h.width,height:h.height,noDataValue:h.noDataValue})}getTileUrl(e,t,i){const n=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,r=(0,c.x0)({...this.parsedUrl.query,blankTile:!n&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${r?"?"+r:""}`}async queryElevation(e,t){const{query:n}=await i.e(91).then(i.bind(i,90091));return(0,l.Te)(t),n(this,e,t)}async createElevationSampler(e,t){const{createSampler:n}=await i.e(91).then(i.bind(i,90091));return(0,l.Te)(t),n(this,e,t)}_fetchTileAvailability(e,t,i,n){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,n):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await(0,r.A)(this.parsedUrl.path,t);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[M]}};(0,n.Cg)([(0,h.MZ)({readOnly:!0})],b.prototype,"capabilities",void 0),(0,n.Cg)([(0,x.w)("service","capabilities",["capabilities"])],b.prototype,"readCapabilities",null),(0,n.Cg)([(0,h.MZ)({json:{read:{source:"copyrightText"}}})],b.prototype,"copyright",void 0),(0,n.Cg)([(0,h.MZ)({readOnly:!0,type:u.A})],b.prototype,"heightModelInfo",void 0),(0,n.Cg)([(0,h.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],b.prototype,"path",void 0),(0,n.Cg)([(0,h.MZ)({type:["show","hide"]})],b.prototype,"listMode",void 0),(0,n.Cg)([(0,h.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],b.prototype,"minScale",void 0),(0,n.Cg)([(0,h.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],b.prototype,"maxScale",void 0),(0,n.Cg)([(0,h.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],b.prototype,"opacity",void 0),(0,n.Cg)([(0,h.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],b.prototype,"operationalLayerType",void 0),(0,n.Cg)([(0,h.MZ)()],b.prototype,"sourceJSON",void 0),(0,n.Cg)([(0,h.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],b.prototype,"type",void 0),(0,n.Cg)([(0,h.MZ)(y.OZ)],b.prototype,"url",void 0),(0,n.Cg)([(0,h.MZ)()],b.prototype,"version",void 0),(0,n.Cg)([(0,x.w)("version",["currentVersion"])],b.prototype,"readVersion",null),b=(0,n.Cg)([(0,h.$K)("esri.layers.ElevationLayer")],b);const M=Symbol("default-fetch-tile");b.prototype.fetchTile[M]=!0;const A=b},4146(e,t,i){i.d(t,{A:()=>v});var n=i(5482),r=i(11254),s=i(49186),o=i(65529),a=i(4902),l=i(92474),c=i(53966),h=i(17676),u=i(84952),p=i(91429),f=i(5443),d=i(16930),m=i(92602),g=i(79677);let y=0,v=class extends((0,o.Zt)((0,a.s)(l.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.A(-180,-90,180,90,d.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+y++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=d.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([i.e(812),i.e(7982)]).then(i.bind(i,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:n}=await Promise.all([i.e(812),i.e(5613),i.e(909)]).then(i.bind(i,45613));try{return await n(t)}catch(e){const i=t?.portalItem,n=i?.id||"unset",r=i?.portal?.url||m.A.portalUrl;throw c.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+r+"', id: '"+n+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,h.zf)(e)||c.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,u.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,r.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,n.Cg)([(0,p.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,n.Cg)([(0,p.MZ)({type:f.A})],v.prototype,"fullExtent",void 0),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,n.Cg)([(0,p.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,n.Cg)([(0,p.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,n.Cg)([(0,p.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,n.Cg)([(0,p.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,n.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,n.Cg)([(0,p.MZ)({type:d.A})],v.prototype,"spatialReference",void 0),(0,n.Cg)([(0,p.MZ)({type:String})],v.prototype,"title",void 0),(0,n.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,n.Cg)([(0,p.MZ)()],v.prototype,"url",void 0),(0,n.Cg)([(0,p.MZ)({type:g.A})],v.prototype,"visibilityTimeExtent",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,n.Cg)([(0,p.$K)("esri.layers.Layer")],v)},92722(e,t,i){i.d(t,{A:()=>r});var n=i(69397);class r{constructor(e=[],t=[],i=!1,n=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=i,this.hasM=n}static fromJSON({lengths:e,coords:t,hasZ:i,hasM:n}){return new r(e,t,i||!1,n||!1)}static fromRect([e,t,i,n]){const s=i-e,o=n-t;return new r([5],[e,t,s,0,0,o,-s,0,0,-o])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,n.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let e=0,t=0;for(const i of this.lengths){if(i<3)continue;const{stride:n}=this;let r=this.coords[n*t],s=this.coords[n*t+1];for(let o=1;o<i;o+=1){const i=n*(t+o),a=this.coords[i],l=this.coords[i+1];e+=-.5*(a-r)*(l+s),r=a,s=l}t+=i}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);const{stride:i}=this;for(const n of this.lengths){for(let r=0;r<n;r++){const n=i*(t+r);e(this.coords[n],this.coords[n+1])}t+=n}}deltaDecode(){const e=this.clone(),{coords:t,lengths:i}=e;let n=0;const{stride:r}=this;for(const e of i){for(let i=1;i<e;i++){const e=r*(n+i);t[e]+=t[e-r],t[e+1]+=t[e+1-r]}n+=e}return e}clone(e){if(this.isPoint)return new r([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const t=Array.from(this.lengths),{stride:i,size:n}=this,s=this.coords.slice(0,n*i);return e?(e.set(s),new r(t,e,this.hasZ,this.hasM)):new r(t,Array.from(s),this.hasZ,this.hasM)}justXY(){const{stride:e,size:t}=this;if(2===e)return this;const i=new Array(t*e);for(let t=0,n=0;t<i.length;t+=e)i[n++]=this.coords[t],i[n++]=this.coords[t+1];return new r(this.lengths,i,!1,!1)}}},89186(e,t,i){i.d(t,{f:()=>h});var n=i(5482),r=i(91429),s=i(16930),o=i(87045),a=i(65509),l=i(25943),c=i(36005);const h=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,i){const n=t.capabilities?.toLowerCase().includes("tilemap");let{minLOD:r,maxLOD:s,minScale:c,maxScale:h}=t;if(null==r&&null==s&&(0!==c||0!==h)){const e=e=>Math.round(1e4*e)/1e4;c=e(c||t.tileInfo.lods[0].scale),h=e(h||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(const i of t.tileInfo.lods){const t=e(i.scale);r=t>=c?i.level:r,s=t>=h?i.level:s}}if(n)return new l.d({layer:this,minLOD:r,maxLOD:s});if(t.tileInfo){const e=new o.A;return e.read(t.tileInfo,i),new a.A(e,r,s)}return null}};return(0,n.Cg)([(0,r.MZ)({json:{read:{source:"copyrightText"}}})],i.prototype,"copyright",void 0),(0,n.Cg)([(0,r.MZ)()],i.prototype,"minScale",void 0),(0,n.Cg)([(0,c.w)("service","minScale")],i.prototype,"readMinScale",null),(0,n.Cg)([(0,r.MZ)()],i.prototype,"maxScale",void 0),(0,n.Cg)([(0,c.w)("service","maxScale")],i.prototype,"readMaxScale",null),(0,n.Cg)([(0,r.MZ)({type:s.A})],i.prototype,"spatialReference",void 0),(0,n.Cg)([(0,r.MZ)({readOnly:!0})],i.prototype,"supportsBlankTile",null),(0,n.Cg)([(0,r.MZ)({type:o.A})],i.prototype,"tileInfo",void 0),(0,n.Cg)([(0,r.MZ)()],i.prototype,"tilemapCache",void 0),(0,n.Cg)([(0,c.w)("service","tilemapCache",["capabilities","tileInfo"])],i.prototype,"readTilemapCache",null),(0,n.Cg)([(0,r.MZ)()],i.prototype,"version",void 0),i=(0,n.Cg)([(0,r.$K)("esri.layers.mixins.ArcGISCachedService")],i),i}},63490(e,t,i){i.d(t,{E1:()=>c,Mr:()=>l,TH:()=>a});var n=i(5482),r=i(69540),s=i(25482),o=i(91429);let a=class extends((0,r.OU)(s.o)){constructor(){super(...arguments),this.url=null}};(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],a.prototype,"lod",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],a.prototype,"rasterFunction",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],a.prototype,"url",void 0),a=(0,n.Cg)([(0,o.$K)("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ElevationSource")],a);let l=class extends((0,r.OU)(s.o)){constructor(e){super(e),this.constantElevation=null}};(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],l.prototype,"constantElevation",void 0),l=(0,n.Cg)([(0,o.$K)("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ConstantElevation")],l);const c=e=>null!=e&&"number"==typeof e.constantElevation},23281(e,t,i){i.d(t,{eR:()=>x,Qv:()=>O,fs:()=>A,Yp:()=>P,o:()=>z,RR:()=>b,l6:()=>M});var n=i(66552),r=(i(86211),i(28735),i(5482)),s=i(69540),o=i(25482),a=i(91429),l=i(69622),c=i(21325);let h=class extends l.A{set horizontalWKID(e){e?(0,c.fn)({wkid:+e})?this._set("horizontalWKID",+e):this._set("horizontalWKID",e):this._set("horizontalWKID",null)}set verticalWKID(e){e?this._set("verticalWKID",isFinite(e)&&(0,c.fn)({wkid:+e})?+e:null):this._set("verticalWKID",null)}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:i,radialDistortionCoefficients:n,tangentialDistortionCoefficients:r}=this;return e?.length>1&&!Number.isNaN(t)&&i?.length>1&&n?.length>1&&r?.length>1}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"affineTransformations",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"focalLength",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"principalOffsetPoint",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"radialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"tangentialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"horizontalWKID",null),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"verticalWKID",null),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"x",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"y",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"z",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"type",void 0),h=(0,r.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientation")],h);const u=h;let p=class extends((0,s.OU)((0,o.T)(u))){constructor(){super(...arguments),this.type=1}toString(){const{type:e,horizontalWKID:t,verticalWKID:i,x:n,y:r,z:s,heading:o,pitch:a,roll:l,affineTransformations:c,focalLength:h,principalOffsetPoint:u,radialDistortionCoefficients:p,tangentialDistortionCoefficients:f}=this,d=[e,t,i,n,r,s,o,a,l];return this.isAdvanced&&(c?.forEach(e=>d.push(e)),d.push(h),u?.forEach(e=>d.push(e)),p?.forEach(e=>d.push(e)),f?.forEach(e=>d.push(e))),d.map(e=>Number.isNaN(e)?"":e).join("|")}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"affineTransformations",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"focalLength",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"principalOffsetPoint",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"radialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"tangentialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"heading",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"pitch",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"roll",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"x",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"y",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"z",void 0),p=(0,r.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientationHPR")],p);const f=p;let d=class extends((0,s.OU)((0,o.T)(u))){constructor(){super(...arguments),this.type=4}toString(){const{type:e,latitude:t,longitude:i,ellipsoidRadius:n,squaredEccentricity:r,properties:s}=this,o=`${s}`.split("|");return o.splice(1,1),`${e}|${t}|${i}|${n}|${r}|${o.join("|")}`}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0},type:Number})],d.prototype,"latitude",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0},type:Number})],d.prototype,"longitude",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0},type:Number})],d.prototype,"ellipsoidRadius",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0},type:Number})],d.prototype,"squaredEccentricity",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"properties",void 0),d=(0,r.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientationLTP")],d);const m=d;let g=class extends((0,s.OU)((0,o.T)(u))){constructor(){super(...arguments),this.type=2}toString(){const{type:e,horizontalWKID:t,verticalWKID:i,x:n,y:r,z:s,omega:o,phi:a,kappa:l,affineTransformations:c,focalLength:h,principalOffsetPoint:u,radialDistortionCoefficients:p,tangentialDistortionCoefficients:f}=this,d=[e,t,i,n,r,s,o,a,l];return this.isAdvanced&&(c?.forEach(e=>d.push(e)),d.push(h),u?.forEach(e=>d.push(e)),p?.forEach(e=>d.push(e)),f?.forEach(e=>d.push(e))),d.map(e=>isNaN(e)?"":e).join("|")}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],g.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"affineTransformations",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"focalLength",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"principalOffsetPoint",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"radialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"tangentialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"omega",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"phi",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"kappa",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"x",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"y",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"z",void 0),g=(0,r.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientationOPK")],g);const y=g;let v=class extends((0,s.OU)((0,o.T)(u))){constructor(){super(...arguments),this.type=3}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:i,radialDistortionCoefficients:n,tangentialDistortionCoefficients:r}=this;return e?.length>1||!Number.isNaN(t)||i?.length>1||n?.length>1||r?.length>1}toString(){const{type:e,horizontalWKID:t,verticalWKID:i,x:n,y:r,z:s,yaw:o,pitch:a,roll:l,affineTransformations:c,focalLength:h,principalOffsetPoint:u,radialDistortionCoefficients:p,tangentialDistortionCoefficients:f}=this,d=[e,t,i,n,r,s,o,a,l];return this.isAdvanced&&(c?.forEach(e=>d.push(e)),d.push(h),u?.forEach(e=>d.push(e)),u?.forEach(e=>d.push(e)),p?.forEach(e=>d.push(e)),f?.forEach(e=>d.push(e))),d.map(e=>Number.isNaN(e)?"":e).join("|")}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],v.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"affineTransformations",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"focalLength",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"principalOffsetPoint",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"radialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"tangentialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"yaw",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"pitch",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"roll",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"x",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"y",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"z",void 0),v=(0,r.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientationYPR")],v);const w=v,_=new Map;_.set("2",{desc:"Using Omega Phi Kappa",constructor:y}),_.set("1",{desc:"Using Heading, Pitch and Roll",constructor:f}),_.set("3",{desc:"Using Yaw, Pitch and Roll",constructor:w}),_.set("4",{desc:"Using Local Tangent Plane",constructor:m});var C=i(63490);function x(e,t,i){return e?(0,C.E1)(e)?new C.Mr(e):function(e,t,i){let{url:n}=e;return n?(n=function(e,t,i){return t&&(e=`${t}${e}`),i&&(e+=`${i}`),e}(n,t,i),new C.TH({...e,url:n})):null}(e,t,i):e}const b=new n.J({Minutes:"minutes",Hours:"hours",Days:"days",Weeks:"weeks",Months:"months",Years:"years"}),M=new n.J({Feet:"feet",Meter:"meter"}),A=new n.J({360:"360",Horizontal:"horizontal",Inspection:"inspection",Nadir:"nadir",Oblique:"oblique",Terrestrial360Video:"terrestrial-360-video",TerrestrialFrameVideo:"terrestrial-frame-video",Aerial360Video:"aerial-360-video",AerialFrameVideo:"aerial-frame-video","":null}),T=new Map;T.set("1",function(e){const[t,i,n,r,s,o,a,l,c,h,u,p,f,d,m,g,y,v,w,_,C,x]=e.slice(1);return{horizontalWKID:t,verticalWKID:i,x:n,y:r,z:s,heading:o,pitch:a,roll:l,...R([c,h,u,p,f,d],[g,y],[v,w,_],[C,x],m)}}),T.set("3",function(e){const[t,i,n,r,s,o,a,l,c,h,u,p,f,d,m,g,y,v,w,_,C,x]=e.slice(1);return{horizontalWKID:t,verticalWKID:i,x:n,y:r,z:s,yaw:o,pitch:a,roll:l,...R([c,h,u,p,f,d],[g,y],[v,w,_],[C,x],m)}}),T.set("2",function(e){const[t,i,n,r,s,o,a,l,c,h,u,p,f,d,m,g,y,v,w,_,C,x]=e.slice(1);return{horizontalWKID:t,verticalWKID:i,x:n,y:r,z:s,omega:o,phi:a,kappa:l,...R([c,h,u,p,f,d],[g,y],[v,w,_],[C,x],m)}}),T.set("4",function(e){const[t,i,n,r,s,...o]=e.slice(1),a=T.get(s),l=_.get(s)?.constructor;return a&&l?{latitude:t,longitude:i,ellipsoidRadius:n,squaredEccentricity:r,properties:new l(a([s,"",...o]))}:null});const S=e=>{const t=e.map(e=>parseFloat(e)).filter(e=>!isNaN(e));if(t.length===e.length)return t};function R(e,t,i,n,r){const s=S(e),o=S(t),a=S(i),l=S(n);return{affineTransformations:6===s?.length?s:void 0,focalLength:6===s?.length?parseFloat(r):void 0,principalOffsetPoint:2!==o?.length?[0,0]:o,radialDistortionCoefficients:3!==a?.length?[0,0,0]:a,tangentialDistortionCoefficients:2!==l?.length?[0,0]:l}}function O(e){return Array.isArray(e)&&e?.length>5&&!e.some(isNaN)}function P(e){for(e=e.slice(0,8);e.length<8;)e.push(0);return e}const Z="sequenceorder";function z(e,t){if(!e){const e=t.find(e=>e.name.toLocaleLowerCase()===Z.toLocaleLowerCase());return e?[{fieldName:e.name,sortOrder:"asc"}]:null}return e.split(";").map(e=>{const[i,n]=e.split(/\s+/).map(e=>e.trim()),r=t.find(e=>e.name.toLowerCase()===i.toLowerCase());return r?{fieldName:r?r.name:Z,sortOrder:"desc"===n?"desc":"asc"}:null}).filter(e=>null!=e)}},90091(e,t,i){i.d(t,{createSampler:()=>O,query:()=>R});var n=i(60999),r=i(49186),s=i(97768),o=i(17676),a=i(86211),l=i(91218),c=i(19419),h=i(4576),u=i(72802);class p{constructor(e,t){this.layer=e,this.parameters=t}}class f extends p{constructor(e,t,i){super(e,i),this.outSpatialReference=t,this.type="geometry"}selectTilesAtLOD(e){if(e<0)this.geometry.coordinates.forEach(e=>e.tile=null);else{const{tileInfo:t,tilemapCache:i}=this.layer,n=g(t,i)[e].level;this.geometry.coordinates.forEach(e=>e.tile=t.tileAt(n,e.x,e.y))}}allElevationTilesFetched(){return!this.geometry.coordinates.some(e=>!e.elevationTile)}clearElevationTiles(){for(const e of this.geometry.coordinates)e.elevationTile!==this.outsideExtentTile&&(e.elevationTile=null)}populateElevationTiles(e){for(const t of this.geometry.coordinates)!t.elevationTile&&t.tile?.id&&(t.elevationTile=e[t.tile.id])}remapTiles(e){for(const t of this.geometry.coordinates){const i=t.tile?.id;t.tile=i?e[i]:null}}getTilesToFetch(){return(0,h.Am)(this.geometry.coordinates.filter(({tile:e,elevationTile:t})=>e?.id&&!t),(e,t)=>e.tile?.id===t.tile?.id).map(({tile:e})=>e)}forEachTileToFetch(e){for(const t of this.geometry.coordinates)t.tile&&!t.elevationTile&&e(t.tile,()=>t.tile=null)}}class d extends p{constructor(e,t,i,n){super(e,i),this.maskExtents=n,this.type="extent",this.elevationTiles=[],this._candidateTiles=[],this._fetchedCandidates=new Set,this.extent=t.clone().intersection(e.fullExtent)}selectTilesAtLOD(e,t){const i=this._maximumLodForRequests(t),n=Math.min(i,e);n<0?this._candidateTiles.length=0:this._selectCandidateTilesCoveringExtentAt(n)}_maximumLodForRequests(e){const{tileInfo:t,tilemapCache:i}=this.layer,n=g(t,i);if(!e)return n.length-1;const r=this.extent;if(null==r)return-1;for(let i=n.length-1;i>=0;i--){const s=n[i],o=s.resolution*t.size[0],a=s.resolution*t.size[1];if(Math.ceil(r.width/o)*Math.ceil(r.height/a)<=e)return i}return-1}allElevationTilesFetched(){return this._candidateTiles.length===this.elevationTiles.length}clearElevationTiles(){this.elevationTiles.length=0,this._fetchedCandidates.clear()}populateElevationTiles(e){for(const t of this._candidateTiles){const i=t.id&&e[t.id];i&&(this._fetchedCandidates.add(t),this.elevationTiles.push(i))}}remapTiles(e){this._candidateTiles=y(this._candidateTiles.map(t=>e[t.id]))}getTilesToFetch(){return this._candidateTiles}forEachTileToFetch(e,t){const i=this._candidateTiles;this._candidateTiles=[],i.forEach(i=>{if(this._fetchedCandidates.has(i))return void t?.(i);let n=!1;e(i,()=>n=!0),n?t?.(i):this._candidateTiles.push(i)}),this._candidateTiles=y(this._candidateTiles,t)}_selectCandidateTilesCoveringExtentAt(e){this._candidateTiles.length=0;const t=this.extent;if(null==t)return;const{tileInfo:i,tilemapCache:n}=this.layer,r=g(i,n)[e],s=i.tileAt(r.level,t.xmin,t.ymin),o=s.extent,a=r.resolution*i.size[0],l=r.resolution*i.size[1],c=Math.ceil((t.xmax-o[0])/a),h=Math.ceil((t.ymax-o[1])/l);for(let e=0;e<h;e++)for(let t=0;t<c;t++){const n=new u.U(s.level,s.row-e,s.col+t);i.updateTileInfo(n),this._tileIsMasked(n)||this._candidateTiles.push(n)}}_tileIsMasked(e){return this.maskExtents?.some(t=>(0,c.gR)(t,e.extent))??!1}}function m(e){return null!=e?.tileInfo}function g(e,t){const i=e.lods;if(m(t)){const{effectiveMinLOD:e,effectiveMaxLOD:n}=t;return i.filter(t=>t.level>=e&&t.level<=n)}return i}function y(e,t){const i={},n=[];for(const r of e){const e=r.id;e&&!i[e]?(i[e]=r,n.push(r)):t?.(r)}const r=n.sort((e,t)=>e.level-t.level);return r.filter((e,i)=>{for(let n=0;n<i;n++){const i=r[n].extent;if(i&&(0,c.gR)(i,e.extent))return t?.(e),!1}return!0})}class v{constructor(e,t){this.data=e,this.safeWidth=.99999999*(e.width-1),this.dx=(e.width-1)/(t[2]-t[0]),this.dy=(e.width-1)/(t[3]-t[1]),this.x0=t[0],this.y1=t[3]}}class w{constructor(e,t=null){if(this.key=e,null!=t){const i=e.extent;this._samplerData=new v(t,i)}}get zmin(){return null!=this._samplerData?this._samplerData.data.minValue:0}get zmax(){return null!=this._samplerData?this._samplerData.data.maxValue:0}get hasNoDataValues(){return!!this._samplerData?.data.hasNoDataValues}sample(e,t){if(null==this._samplerData)return;const{safeWidth:i,data:n,dx:r,dy:s,y1:o,x0:a}=this._samplerData,{width:l,values:c,noDataValue:h}=n,u=_(s*(o-t),0,i),p=_(r*(e-a),0,i),f=Math.floor(u),d=Math.floor(p),m=f*l+d,g=m+l,y=c[m],v=c[g],w=c[m+1],C=c[g+1];if(y!==h&&v!==h&&w!==h&&C!==h){const e=p-d,t=y+(w-y)*e;return t+(v+(C-v)*e-t)*(u-f)}}}function _(e,t,i){return e<t?t:e>i?i:e}var C=i(87378),x=i(48526),b=i(86738),M=i(82799);class A{constructor(e){this.geometry=e,this.spatialReference=e.spatialReference}export(){return this._exporter(this.coordinates,this.spatialReference)}clone(e){const t=new A(this.geometry);return t.spatialReference=this.spatialReference,t.coordinates=e??this.coordinates.map(e=>e.clone()),t._exporter=this._exporter,t}async project(e,t){if(this.spatialReference.equals(e))return this.clone();await(0,l.initializeProjection)([{source:this.spatialReference,dest:e}],{signal:t});const i=new x.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),n=(0,l.project)(i,e);if(!n)return null;const r=this.coordinates.map((e,t)=>{const i=e.clone(),r=n.points[t];return i.x=r[0],i.y=r[1],i}),s=this.clone(r);return s.spatialReference=e,s}projectSync(e){if(this.spatialReference.equals(e))return this.clone();const t=new x.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),i=(0,l.project)(t,e);if(!i)return null;const n=this.coordinates.map((e,t)=>{const n=e.clone(),r=i.points[t];return n.x=r[0],n.y=r[1],n}),r=this.clone(n);return r.spatialReference=e,r}static fromGeometry(e){const t=new A(e);if(e instanceof A)return t.coordinates=e.coordinates.map(e=>e.clone()),t._exporter=(t,i)=>{const n=e.clone(t);return n.spatialReference=i,n},t;switch(e.type){case"point":{const i=e,{hasZ:n,hasM:r}=i;return t.coordinates=n&&r?[new T(i.x,i.y,i.z,i.m)]:n?[new T(i.x,i.y,i.z)]:r?[new T(i.x,i.y,null,i.m)]:[new T(i.x,i.y)],t._exporter=(t,i)=>e.hasM?new b.A(t[0].x,t[0].y,t[0].z,t[0].m,i):new b.A(t[0].x,t[0].y,t[0].z,i),t}case"multipoint":{const i=e,{hasZ:n,hasM:r}=i;return t.coordinates=n&&r?i.points.map(e=>new T(e[0],e[1],e[2],e[3])):n?i.points.map(e=>new T(e[0],e[1],e[2])):r?i.points.map(e=>new T(e[0],e[1],null,e[2])):i.points.map(e=>new T(e[0],e[1])),t._exporter=(t,i)=>e.hasM?new x.A({points:t.map(e=>[e.x,e.y,e.z??0,e.m??0]),hasZ:!0,hasM:!0,spatialReference:i}):new x.A({points:t.map(e=>[e.x,e.y,e.z??0]),spatialReference:i}),t}case"polyline":{const i=e,n=[],r=[],{hasZ:s,hasM:o}=e;let a=0;for(const e of i.paths)if(r.push([a,a+e.length]),a+=e.length,s&&o)for(const t of e)n.push(new T(t[0],t[1],t[2],t[3]));else if(s)for(const t of e)n.push(new T(t[0],t[1],t[2]));else if(o)for(const t of e)n.push(new T(t[0],t[1],null,t[2]));else for(const t of e)n.push(new T(t[0],t[1]));return t.coordinates=n,t._exporter=(t,i)=>{const n=e.hasM?t.map(e=>[e.x,e.y,e.z??0,e.m??0]):t.map(e=>[e.x,e.y,e.z??0]),s=r.map(e=>n.slice(e[0],e[1]));return new M.A({paths:s,hasM:e.hasM,hasZ:!0,spatialReference:i})},t}}}}class T{constructor(e,t,i=null,n=null,r=null,s=null){this.x=e,this.y=t,this.z=i,this.m=n,this.tile=r,this.elevationTile=s}clone(){return new T(this.x,this.y,this.z,this.m)}}var S=i(1555);async function R(e,t,i){if(!e)throw new r.A(V,"Elevation queries require an elevation layer to fetch tiles from");if(!t||!(t instanceof A)&&"point"!==t.type&&"multipoint"!==t.type&&"polyline"!==t.type)throw new r.A("elevation-query:invalid-geometry","Only point, polyline and multipoint geometries can be used to query elevation");const n={...L,...i},o=n.signal;if("integrated-mesh-3dtiles"===e.type){const r=A.fromGeometry(t);if(e.queryElevationCallback&&e.replacesTerrain){const s=12.9*(i?.minDemResolution||0)+.71,a=await e.queryElevationCallback(r,{signal:o,maxGeometricError:s}),l=r.coordinates.map(()=>({demResolution:1,source:e})),c=await a.project(t.spatialReference,o);if(c){if(void 0!==n.noDataValue&&n.noDataValue!==Number.MAX_VALUE)for(const e of c.coordinates)e.z===Number.MAX_VALUE&&(e.z=n.noDataValue);return{geometry:c.export(),noDataValue:n.noDataValue??Number.MAX_VALUE,sampleInfo:l}}}const s=r.coordinates.map(()=>({demResolution:-1,source:e}));return{geometry:r.export(),noDataValue:Number.MAX_VALUE,sampleInfo:s}}const c=new f(e,t.spatialReference,n);return await e.load({signal:o}),await async function(e,t,i){let n;const s=e.layer.tileInfo.spatialReference;if(t instanceof A?n=await t.project(s,i):(await(0,l.initializeProjection)([{source:t.spatialReference,dest:s}],{signal:i}),n=(0,l.project)(t,s)),!n)throw new r.A("elevation-query:spatial-reference-mismatch",`Cannot query elevation in '${t.spatialReference.wkid}' on an elevation service in '${s.wkid}'`);e.geometry=A.fromGeometry(n)}(c,t,o),await z(c,o),await j(c,o),function(e){e.geometry.coordinates.forEach(t=>{const i=t.elevationTile;let n=e.parameters.noDataValue;if(i){const e=i.sample(t.x,t.y);null==e?t.elevationTile=null:n=e}t.z=n})}(c),async function(e,t){const i=await e.geometry.project(e.outSpatialReference,t);(0,s.Lw)(i);const n={geometry:i.export(),noDataValue:e.parameters.noDataValue};return e.parameters.returnSampleInfo&&(n.sampleInfo=function(e){const t=e.layer.tileInfo,i=(0,a.GA)(t.spatialReference);return e.geometry.coordinates.map(n=>{let r=-1;return n.elevationTile&&n.elevationTile!==e.outsideExtentTile&&(r=t.lodAt(n.elevationTile.key.level).resolution*i),{demResolution:r,source:-1===r?void 0:e.layer}})}(e)),e.geometry.coordinates.forEach(e=>{e.tile=null,e.elevationTile=null}),n}(c,o)}async function O(e,t,i){if(e=Array.isArray(e)?e:[e],0===(e=i?.ignoreInvisibleLayers?e.filter(e=>e.visible):e.slice()).length)throw new r.A(V,"Elevation queries require at least one elevation layer to fetch tiles from");if(!t||"extent"!==t.type)throw new r.A("elevation-query:invalid-extent","Invalid or undefined extent");const n={...L,...i,returnSampleInfo:!0},s=P(e[e.length-1],t,n);return 1===e.length?s:Z(e,t,await s,n)}async function P(e,t,i,n){const r=i.signal;await e.load({signal:r});const s=t.spatialReference,o=e.tileInfo.spatialReference;s.equals(o)||(await(0,l.initializeProjection)([{source:s,dest:o}],{signal:r}),t=(0,l.project)(t,o));const a=new d(e,t,i,n);await z(a,r),await j(a,r);const c=a.elevationTiles,h=a.layer.tileInfo,u=a.parameters.noDataValue;return new S.C({noDataValue:u,tiles:c,tileInfo:h})}async function Z(e,t,i,n){if(e.pop(),!e.length)return i;const r=i.samplers.filter(e=>!e.tile.hasNoDataValues).map(e=>(0,c.VY)(e.extent)),s=await P(e[e.length-1],t,n,r);if(0===s.samplers.length)return i;const o=i.samplers.concat(s.samplers),a=n.noDataValue;return Z(e,t,new S.C({samplers:o,noDataValue:a}),n)}async function z(e,t){"geometry"===e.type&&function(e){if(null==e.layer.fullExtent)return;const t=new w(new u.U(-1,-1,-1));t.sample=()=>e.parameters.noDataValue,e.outsideExtentTile=t;const i=e.layer.fullExtent;e.geometry.coordinates.forEach(e=>{const n=e.x,r=e.y;(n<i.xmin||n>i.xmax||r<i.ymin||r>i.ymax)&&(e.elevationTile=t)})}(e);const i=e.parameters.demResolution;if("number"==typeof i)!function(e,t){const i=function(e,t){const{tileInfo:i,tilemapCache:n}=e.layer,r=t/(0,a.GA)(i.spatialReference),s=g(i,n);let o=s[0],l=0;for(let e=1;e<s.length;e++){const t=s[e];Math.abs(t.resolution-r)<Math.abs(o.resolution-r)&&(o=t,l=e)}return l}(e,t);e.selectTilesAtLOD(i)}(e,i);else if("finest-contiguous"===i)await async function(e,t){const{tileInfo:i,tilemapCache:n}=e.layer,r=D(i,n,e.parameters.minDemResolution);await E(e,r,t)}(e,t);else{if("auto"!==i)throw new r.A("elevation-query:invalid-dem-resolution",`Invalid dem resolution value '${i}', expected a number, "finest-contiguous" or "auto"`);await async function(e,t){(function(e){const{tileInfo:t,tilemapCache:i}=e.layer,n=D(t,i,e.parameters.minDemResolution);e.selectTilesAtLOD(n,e.parameters.maximumAutoTileRequests)})(e),function(e){const t=e.layer.tileInfo;let i=0;const n={},r=e=>{null!=e.id&&(e.id in n?n[e.id]++:(n[e.id]=1,i++))},s=e=>{if(null==e.id)return;const t=n[e.id];1===t?(delete n[e.id],i--):n[e.id]=t-1};e.forEachTileToFetch(r,s);let o=!0;for(;o&&(o=!1,e.forEachTileToFetch(n=>{i<=e.parameters.maximumAutoTileRequests||(s(n),t.upsampleTile(n)&&(o=!0),r(n))},s),o););}(e);const i=e.layer.tilemapCache;if(!i||m(i))return I(e,t);const r=e.getTilesToFetch(),s={},a=r.map(async e=>{const r=new u.U(0,0,0),a=await(0,n.Ke)(i.fetchAvailabilityUpsample(e.level,e.row,e.col,r,{signal:t}));!1!==a.ok?null!=e.id&&(s[e.id]=r):(0,o.QP)(a.error)});await(0,o.qr)(Promise.all(a),t),e.remapTiles(s)}(e,t)}}async function E(e,t,i){const n=e.layer;if(e.selectTilesAtLOD(t),t<0)return;const s=n.tilemapCache,a=e.getTilesToFetch();try{if(s&&!m(s))await(0,o.qr)(Promise.all(a.map(e=>s.fetchAvailability(e.level,e.row,e.col,{signal:i}))),i);else if(await j(e,i),!e.allElevationTilesFetched())throw e.clearElevationTiles(),new r.A("elevation-query:has-unavailable-tiles","Some elevation tiles are unavailable")}catch(n){(0,o.QP)(n),await E(e,t-1,i)}}async function I(e,t){const i=e.layer.tileInfo;await j(e,t);let n=!1;e.forEachTileToFetch((e,t)=>{i.upsampleTile(e)?n=!0:t()}),n&&await I(e,t)}function D(e,t,i=0){const n=g(e,t);let r=n.length-1;if(i>0){const t=i/(0,a.GA)(e.spatialReference),s=n.findIndex(e=>e.resolution<t);0===s?r=0:s>0&&(r=s-1)}return r}const L={maximumAutoTileRequests:20,noDataValue:0,returnSampleInfo:!1,demResolution:"auto",minDemResolution:0,signal:null};async function j(e,t){const i=e.getTilesToFetch(),n={},r=e.parameters.cache,s=e.parameters.noDataValue,a={noDataValue:s,signal:t},l=i.map(async t=>{if(null==t.id)return;const i=`${e.layer.uid}:${t.id}:${s}`,o=r?.get(i),l=o??C.A.from(await e.layer.fetchTile(t.level,t.row,t.col,a));r?.put(i,l),n[t.id]=new w(t,l)});await(0,o.qr)(Promise.allSettled(l),t),e.populateElevationTiles(n)}const V="elevation-query:invalid-layer"},87378(e,t,i){i.d(t,{A:()=>a});var n,r=i(34275),s=i(56507);const o=Symbol("ElevationTileDataClass");class a{static{n=o}constructor({values:e,width:t,height:i,noDataValue:s}){this[n]=!0,this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,this.values=(0,r.vZ)(e)?e:new Float32Array(e),this.width=t,this.height=i,this.noDataValue=s}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get usedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let i=1/0,n=-1/0,r=!0;for(const s of t)s===e?this._hasNoDataValues=!0:(i=s<i?s:i,n=s>n?s:n,r=!1);r?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=n>-3e38?n:0)}static{this.from=(0,s.qf)(a)}}},91806(e,t,i){i.d(t,{A:()=>l});var n,r=i(5482),s=i(25482),o=i(91429),a=i(56507);let l=class extends s.o{static{n=this}constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new n({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"cols",void 0),(0,r.Cg)([(0,o.MZ)({type:a.jz,json:{write:!0}})],l.prototype,"level",void 0),(0,r.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],l.prototype,"levelValue",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"origin",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],l.prototype,"resolution",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"rows",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],l.prototype,"scale",void 0),l=n=(0,r.Cg)([(0,o.$K)("esri.layers.support.LOD")],l)},1555(e,t,i){i.d(t,{C:()=>d});var n=i(5482),r=i(53966),s=i(86211),o=i(91429),a=i(16930),l=i(19419),c=i(65529),h=i(86738),u=i(28735);let p=class extends c.nJ{queryElevation(e){const t=this.projectIfRequired(e,this.spatialReference);if(!t)return null;switch(e.type){case"point":return function(e,t,i){return e.hasZ=!0,e.z=i.elevationAt(t.x,t.y),e}(e,t,this);case"polyline":return function(e,t,i){f.spatialReference=t.spatialReference;const n=e.hasM&&!e.hasZ;for(let r=0;r<e.paths.length;r++){const s=e.paths[r],o=t.paths[r];for(let e=0;e<s.length;e++){const t=s[e],r=o[e];f.x=r[0],f.y=r[1],n&&(t[3]=t[2]),t[2]=i.elevationAt(f.x,f.y)}}return e.hasZ=!0,e}(e,t,this);case"multipoint":return function(e,t,i){f.spatialReference=t.spatialReference;const n=e.hasM&&!e.hasZ;for(let r=0;r<e.points.length;r++){const s=e.points[r],o=t.points[r];f.x=o[0],f.y=o[1],n&&(s[3]=s[2]),s[2]=i.elevationAt(f.x,f.y)}return e.hasZ=!0,e}(e,t,this);default:return null}}projectIfRequired(e,t){if(null==e)return null;const i=e.spatialReference;if(i.equals(t))return e;const n=(0,u.Cv)(e,t);return n||r.A.getLogger(this).error(`Cannot project geometry spatial reference (wkid:${i.wkid}) to elevation sampler spatial reference (wkid:${t.wkid})`),n}};p=(0,n.Cg)([(0,o.$K)("esri.layers.support.ElevationSampler")],p);const f=new h.A;let d=class extends p{get spatialReference(){return this.extent.spatialReference}constructor(e){const t=e.noDataValue,i="tiles"in e?e.tiles.map(i=>new m({tile:i,tileInfo:e.tileInfo,noDataValue:t})):e.samplers;super({noDataValue:t,samplers:i});const n=i[0];if(n){this.extent=n.extent.clone();const{min:e,max:t}=n.demResolution;this.demResolution={min:e,max:t};for(let e=1;e<i.length;e++){const t=i[e];this.extent.union(t.extent),this.demResolution.min=Math.min(this.demResolution.min,t.demResolution.min),this.demResolution.max=Math.max(this.demResolution.max,t.demResolution.max)}}else{const t="tileInfo"in e?e.tileInfo:null;this.extent=(0,l.w1)((0,l.vt)(),t?.spatialReference??a.A.WGS84),this.demResolution={min:0,max:0}}}elevationAt(e,t){let i;for(const n of this.samplers)if(n.containsAt(e,t)&&(i=n.elevationAt(e,t),i!==n.noDataValue))return i;return null!=i?i:(r.A.getLogger(this).warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler`),this.noDataValue)}};(0,n.Cg)([(0,o.MZ)({constructOnly:!0})],d.prototype,"noDataValue",void 0),(0,n.Cg)([(0,o.MZ)({constructOnly:!0})],d.prototype,"samplers",void 0),d=(0,n.Cg)([(0,o.$K)("esri.layers.support.TileElevationSampler")],d);let m=class extends p{get spatialReference(){return this.extent.spatialReference}constructor(e){super(e);const t=e.tile.key.extent;this.extent=(0,l.w1)(t,e.tileInfo.spatialReference),this.extent.zmin=e.tile.zmin,this.extent.zmax=e.tile.zmax;const i=(0,s.GA)(e.tileInfo.spatialReference),n=e.tileInfo.lodAt(e.tile.key.level).resolution*i;this.demResolution={min:n,max:n}}contains(e){const t=this.projectIfRequired(e,this.spatialReference);return null!=t&&this.containsAt(t.x,t.y)}containsAt(e,t){return(0,l.Rj)(this.tile.key.extent,e,t)}elevationAt(e,t){return this.containsAt(e,t)?this.tile.sample(e,t)??this.noDataValue:this.noDataValue}};(0,n.Cg)([(0,o.MZ)({constructOnly:!0})],m.prototype,"tile",void 0),(0,n.Cg)([(0,o.MZ)({constructOnly:!0})],m.prototype,"noDataValue",void 0),(0,n.Cg)([(0,o.MZ)({constructOnly:!0})],m.prototype,"tileInfo",void 0),m=(0,n.Cg)([(0,o.$K)("esri.layers.support.TileElevationSampler.SingleTileElevationSampler")],m)},87045(e,t,i){i.d(t,{A:()=>w});var n,r=i(5482),s=i(66552),o=i(25482),a=i(86211),l=i(91429),c=i(56507),h=i(86738),u=i(16930),p=i(21325),f=i(28735),d=i(91806),m=i(72802),g=i(36005),y=i(43937);const v=new s.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let w=class extends o.o{static{n=this}static create(e={}){const{resolutionFactor:t=1,scales:i,size:r=256,spatialReference:s=u.A.WebMercator,numLODs:o=24}=e;if(!(0,p.fn)(s)){const e=[];if(i)for(let t=0;t<i.length;t++){const n=i[t];e.push(new d.A({level:t,scale:n,resolution:n}))}else{let t=5e-4;for(let i=o-1;i>=0;i--)e.unshift(new d.A({level:i,scale:t,resolution:t})),t*=2}return new n({dpi:96,lods:e,origin:new h.A(0,0,s),size:[r,r],spatialReference:s})}const l=(0,p.Vp)(s),c=e.origin?new h.A({x:e.origin.x,y:e.origin.y,spatialReference:s}):new h.A(l?{x:l.origin[0],y:l.origin[1],spatialReference:s}:{x:0,y:0,spatialReference:s}),f=1/(39.37*(0,a.GA)(s)*96),m=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],n=t*f;m.push(new d.A({level:e,scale:t,resolution:n}))}else{let e=(0,p.EA)(s)?512/r*591657527.5917094:256/r*591657527.591555;const i=Math.ceil(o/t);m.push(new d.A({level:0,scale:e,resolution:e*f}));for(let n=1;n<i;n++){const i=e/2**t,r=i*f;m.push(new d.A({level:n,scale:i,resolution:r})),e=i}}return new n({dpi:96,lods:m,origin:c,size:[r,r],spatialReference:s})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,p.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return h.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const n=[],r=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach(e=>{n.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,r[e.level]=e})),this._set("scales",n),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const i=Math.floor(e),n=i+1;return t[i]/(t[i]/t[n])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let n=0;for(;n<i;n++){const i=t[n],r=t[n+1];if(i<=e)return n;if(r===e)return n+1;if(i>e&&r<e)return n+Math.log(i/e)/Math.log(i/r)}return n}tileAt(e,t,i,n){const r=this.lodAt(e);if(!r)return null;let s,o;if("number"==typeof t)s=t,o=i;else if((0,p.aI)(t.spatialReference,this.spatialReference))s=t.x,o=t.y,n=i;else{const e=(0,f.Cv)(t,this.spatialReference);if(null==e)return null;s=e.x,o=e.y,n=i}const a=r.resolution*this.size[0],l=r.resolution*this.size[1];return n??=new m.U(0,0,0),n.level=e,n.row=Math.floor((this.origin.y-o)/l+.001),n.col=Math.floor((s-this.origin.x)/a+.001),this.updateTileInfo(n),n}updateTileInfo(e,t=0){if(!("extent"in e))return!1;let i=this.lodAt(e.level);if(!i&&1===t){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return!1;const n=e.level-i.level,r=i.resolution*this.size[0]/2**n,s=i.resolution*this.size[1]/2**n;return e.extent[0]=this.origin.x+e.col*r,e.extent[1]=this.origin.y-(e.row+1)*s,e.extent[2]=e.extent[0]+r,e.extent[3]=e.extent[1]+s,!0}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const i=this.lodAt(t.level);if(null==i)return null;const{resolution:n}=i,r=n*this.size[0],s=n*this.size[1];return e[0]=this.origin.x+t.col*r,e[1]=this.origin.y-(t.row+1)*s,e[2]=e[0]+r,e[3]=e[1]+s,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return n.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const i=[],r=this.lods.length-t;for(let e=0;e<r;e++){const n=e+t,{scale:r,resolution:s}=n>=0?this.lods[n]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new d.A({level:e,scale:r,resolution:s}))}return new n({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const n=e[i];this._upsampleLevels[n.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/n.resolution:0},t=n}}};(0,r.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],w.prototype,"compressionQuality",void 0),(0,r.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],w.prototype,"dpi",void 0),(0,r.Cg)([(0,l.MZ)({type:String,json:{read:v.read,write:v.write,origins:{"web-scene":{read:!1,write:!1}}}})],w.prototype,"format",void 0),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],w.prototype,"isWrappable",null),(0,r.Cg)([(0,l.MZ)({type:h.A,json:{write:!0}})],w.prototype,"origin",void 0),(0,r.Cg)([(0,g.w)("origin")],w.prototype,"readOrigin",null),(0,r.Cg)([(0,l.MZ)({type:[d.A],value:null,json:{write:!0}})],w.prototype,"lods",null),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],w.prototype,"scales",void 0),(0,r.Cg)([(0,l.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],w.prototype,"size",void 0),(0,r.Cg)([(0,g.w)("size",["rows","cols"])],w.prototype,"readSize",null),(0,r.Cg)([(0,y.K)("size",{cols:{type:c.jz},rows:{type:c.jz}})],w.prototype,"writeSize",null),(0,r.Cg)([(0,l.MZ)({type:u.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),w=n=(0,r.Cg)([(0,l.$K)("esri.layers.support.TileInfo")],w)},65509(e,t,i){i.d(t,{A:()=>s});var n=i(49186),r=i(17676);class s{constructor(e,t=0,i=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=i,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(i)||(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,i){const n=this.tileInfo?.lodAt(e);return!n||e<this.minLOD||e>this.maxLOD?"unavailable":n.cols&&n.rows?i>=n.cols[0]&&i<=n.cols[1]&&t>=n.rows[0]&&t<=n.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,i,s){await(0,r.NO)(s);const o=this.getAvailability(e,t,i);if("unavailable"===o)throw new n.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return o}async fetchAvailabilityUpsample(e,t,i,n,s){await(0,r.NO)(s),n.level=e,n.row=t,n.col=i;const o=this.tileInfo;return o.updateTileInfo(n),this.fetchAvailability(e,t,i,s).catch(e=>{if((0,r.zf)(e))throw e;if(o.upsampleTile(n))return this.fetchAvailabilityUpsample(n.level,n.row,n.col,n,s);throw e})}}},72802(e,t,i){i.d(t,{U:()=>r});var n=i(19419);class r{constructor(e,t,i,r=(0,n.vt)()){this._level=e,this._row=t,this._col=i,this.extent=r}get id(){return this._id??=`${this.level}/${this.row}/${this.col}`,this._id}get level(){return this._level}set level(e){this._level=e,this._id=null}get row(){return this._row}set row(e){this._row=e,this._id=null}get col(){return this._col}set col(e){this._col=e,this._id=null}toJSON(){return{level:this._level,row:this._row,col:this._col,extent:this.extent}}static fromJSON(e){return new r(e.level,e.row,e.col,e.extent)}}},25943(e,t,i){i.d(t,{d:()=>b});var n,r=i(5482),s=i(11254),o=i(69622),a=i(49186),l=i(36563),c=(i(44208),i(66344)),h=i(15142),u=i(17676),p=i(36708),f=i(76030),d=i(84952),m=i(91429),g=i(72802),y=i(4718),v=i(69397),w=i(34275);class _{constructor(e){!function(e){if(!e?.location)throw new a.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new a.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new a.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new a.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new a.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,y.o8)(t));const n=this.location.width,r=this.location.height;let s=!0,o=!0;const l=function(e,t=!1){return e<=w.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(n*r/32));let c=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(o=!1,l[c]|=1<<t):s=!1,31===t&&++c}o?(this._availability="unavailable",this.byteSize=40):s?(this._availability="available",this.byteSize=40):(this._availability=l,this.byteSize=40+(0,v.Qf)(l))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),n=i%32,r=i>>5,s=this._availability;return r<0||r>s.length?"unknown":s[r]&1<<n?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||s.A,{row:n,col:r,width:o,height:l}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then(e=>e.data).catch(e=>{if(422===e?.details?.httpStatus)return{location:{top:n,left:r,width:o,height:l},valid:!0,data:new Array(o*l).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==n||e.location.left!==r||e.location.width!==o||e.location.height!==l))throw new a.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:n,left:r,width:o,height:l}});return _.fromJSON(e)})}static fromJSON(e){return Object.freeze(new _(e))}}function C(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function x(e,t,i){return new a.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let b=class extends o.A{static{n=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=s.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new c.q(2097152),this.addHandles((0,p.wB)(()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),p.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const n=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return n?n.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,n){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(x(e,t,i)):this._fetchTilemap(e,t,i,n).catch(e=>e).then(n=>{if(n instanceof _){const r=n.getAvailability(t,i);if("unavailable"===r)throw x(e,t,i);return r}if((0,u.zf)(n))throw n;return"unknown"})}fetchAvailabilityUpsample(e,t,i,n,r){n.level=e,n.row=t,n.col=i;const s=this.layer.tileInfo;s.updateTileInfo(n);const o=this.fetchAvailability(e,t,i,r).catch(e=>{if((0,u.zf)(e))throw e;if(s.upsampleTile(n))return this.fetchAvailabilityUpsample(n.level,n.row,n.col,n,r);throw e});return this._fetchAvailabilityUpsamplePrefetch(e,t,i,r,o),o}async _fetchAvailabilityUpsamplePrefetch(e,t,i,r,s){if(!this._prefetchingEnabled)return;const o=`prefetch-${e}-${t}-${i}`;if(this.hasHandles(o))return;const a=new AbortController;s.then(()=>a.abort(),()=>a.abort());let c=!1;const h=(0,l.hA)(()=>{c||(c=!0,a.abort())});if(this.addHandles(h,o),await(0,f.md)(10,a.signal).catch(()=>{}),c||(c=!0,this.removeHandles(o)),(0,u.G4)(a))return;const p=new g.U(e,t,i),d={...r,signal:a.signal},m=this.layer.tileInfo;for(let e=0;n._prefetches.length<n._maxPrefetch&&m.upsampleTile(p);++e){const e=this.fetchAvailability(p.level,p.row,p.col,d);n._prefetches.push(e);const t=()=>{n._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new h.A({initialSize:n._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,n){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new a.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const r=this._tmpTilemapDefinition,s=this._tilemapFromCache(e,t,i,r);if(s)return Promise.resolve(s);const o=n?.signal;return n={...n,signal:null},new Promise((e,t)=>{(0,u.u7)(o,()=>t((0,u.NK)()));const i=C(r);let s=this._pendingTilemapRequests[i];if(!s){s=_.fromDefinition(r,n).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=s,s.then(e,e)}s.then(e,t)})}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,d.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,n){n.level=e,n.row=t-t%this.size,n.col=i-i%this.size;const r=C(n);return this._tilemapCache.get(r)}get test(){}};(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],b.prototype,"layer",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],b.prototype,"minLOD",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],b.prototype,"maxLOD",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],b.prototype,"request",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],b.prototype,"size",void 0),b=n=(0,r.Cg)([(0,m.$K)("esri.layers.support.TilemapCache")],b)},77548(e,t,i){i.d(t,{Gh:()=>Z,tk:()=>T,BR:()=>A,p2:()=>b,qd:()=>S,wI:()=>M,G$:()=>O,$x:()=>R,Ov:()=>w,cM:()=>p,UC:()=>f,W_:()=>_,Qz:()=>d,OP:()=>P,TU:()=>v,F2:()=>m,XX:()=>y,jy:()=>C});var n=i(70333),r=i(11254),s=i(7762),o=(i(84952),i(36563)),a=i(36708),l=i(4146);const c=new WeakMap;function h(e){return!e.destroyed&&(c.has(e)||e.addHandles([(0,a.wB)(()=>{const{parent:t}=e;return!!(t&&t instanceof l.A)&&("catalog-dynamic-group"===t.type||h(t))},t=>c.set(e,t),a.pc),(0,o.hA)(()=>c.delete(e))]),c.get(e))}function u(e,t){return null!=e&&"object"==typeof e&&"type"in e&&e.type===t}function p(e){return u(e,"knowledge-graph")&&"layers"in e}function f(e){return u(e,"knowledge-graph-sublayer")}function d(e){return u(e,"link-chart")&&"layers"in e}function m(e){return u(e,"subtype-group")&&"sublayers"in e}function g(e){const t=e.parent;return function(e){return"group"===e?.type}(t)&&t.tables.includes(e)}i(16215);const y={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function v(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function w(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function _(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function C(e){return function(e){return"subtype-sublayer"===e?.type}(e)||function(e){return null!=e&&"object"==typeof e&&"type"in e&&"oriented-imagery"===e.type}(e)||function(e){return u(e,"feature")}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}function x(e){const t=e?.type;return"binning"===t||"cluster"===t}function b(e,t){if(!C(e))return;const i=t?.graphic,n="featureReduction"in e?e.featureReduction:null;if(i){if(i.isAggregate){const e=i.origin;return e&&"featureReductionProvider"in e&&n?x(n)?n:null:void 0}return e}return t?.checkFeatureReduction&&n?x(n)?n:null:e}async function M(e,t){const i=n.id?.findServerInfo(e);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const o=`${e.slice(0,s)}/rest/info`,a=null!=t?t.signal:null,{data:l}=await(0,r.A)(o,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function A(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function T(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function S(e){const t=new s.A;for(const i of e.allLayers.concat(e.allTables))h(i)||g(i)||("charts"in i&&t.push(i),"subtype-group"===i.type&&t.push(...i.sublayers));return t}function R(e,t){return null}function O(e){return null}function P(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function Z(e,t){if(!t||!P(e))return;const i=(e.url,null);i&&(e.url=i)}},38969(e,t,i){i.d(t,{i:()=>r});var n=i(37955);function r(e,t){return new Promise((i,r)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?i():(t((0,n.Oo)(e,"canplay",i)),t((0,n.Oo)(e,"error",r)))})}},73133(e,t,i){i.d(t,{j:()=>n});const n=(0,i(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:"unknown"})},7861(e,t,i){i.d(t,{L:()=>r});var n=i(11254);async function r(e,t){return(await(0,n.A)(e,{responseType:"json",query:{f:"json",...t?.customParameters,token:t?.apiKey}})).data}},16215(e,t,i){i.d(t,{S:()=>r,Y:()=>n});const n=Symbol("BasemapInstance");function r(e){return null!=e&&"object"==typeof e&&n in e}},79677(e,t,i){i.d(t,{A:()=>p});var n,r=i(5482),s=i(25482),o=i(88930),a=i(91429),l=i(98623),c=i(10184),h=i(36005),u=i(43937);let p=class extends s.o{static{n=this}static get allTime(){return f}static get empty(){return d}static fromArray(e){return new n({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(n.allTime)}get isEmpty(){return this.equals(n.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new n({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,n=e.start?.getTime()??e.start,r=e.end?.getTime()??e.end;return t===n&&i===r}expandTo(e,t=l.qU){if(this.isEmpty||this.isAllTime||"unknown"===e)return this.clone();let i=this.start;i&&(i=(0,o.lL)(i,new c.A({value:1,unit:e}),t));let r=this.end;if(r){const i=(0,o.lL)(r,new c.A({value:1,unit:e}),t);r=r.getTime()===i.getTime()?i:(0,o.S1)(i,1,e,t)}return new n({start:i,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return n.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,r=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let o,a;return r>=t&&r<=i?o=r:t>=r&&t<=s&&(o=t),i>=r&&i<=s?a=i:s>=t&&s<=i&&(a=s),null==o||null==a||isNaN(o)||isNaN(a)?n.empty:new n({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,i=l.qU){if(this.isEmpty||this.isAllTime||"unknown"===t)return this.clone();const r=new n,{start:s,end:a}=this;return null!=s&&(r.start=(0,o.S1)(s,e,t,i)),null!=a&&(r.end=(0,o.S1)(a,e,t,i)),r}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return f.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new n({start:t,end:i})}};(0,r.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,r.Cg)([(0,h.w)("end")],p.prototype,"readEnd",null),(0,r.Cg)([(0,u.K)("end")],p.prototype,"writeEnd",null),(0,r.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,r.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,r.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,r.Cg)([(0,h.w)("start")],p.prototype,"readStart",null),(0,r.Cg)([(0,u.K)("start")],p.prototype,"writeStart",null),p=n=(0,r.Cg)([(0,a.$K)("esri.time.TimeExtent")],p);const f=new p,d=new p({start:void 0,end:void 0})},10184(e,t,i){i.d(t,{A:()=>h});var n=i(5482),r=i(69540),s=i(25482),o=i(88930),a=i(91429),l=i(73133),c=i(93223);let h=class extends((0,r.OU)(s.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,n.Cg)([(0,c.e)(l.j,{nonNullable:!0})],h.prototype,"unit",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],h.prototype,"value",void 0),h=(0,n.Cg)([(0,a.$K)("esri.time.TimeInterval")],h)},32728(e,t,i){i.d(t,{YH:()=>a,hG:()=>s,nu:()=>l,wp:()=>o}),i(34727);var n=i(35522),r=i(51850);function s(e){const t=e[0]*e[0]+e[4]*e[4]+e[8]*e[8],i=e[1]*e[1]+e[5]*e[5]+e[9]*e[9],n=e[2]*e[2]+e[6]*e[6]+e[10]*e[10];return Math.sqrt(Math.max(t,i,n))}function o(e,t){const i=Math.sqrt(t[0]*t[0]+t[4]*t[4]+t[8]*t[8]),r=Math.sqrt(t[1]*t[1]+t[5]*t[5]+t[9]*t[9]),s=Math.sqrt(t[2]*t[2]+t[6]*t[6]+t[10]*t[10]);return(0,n.hZ)(e,i,r,s),e}function a(e,t,i){i=i||e;const r=(0,n.Om)(e,t);(0,n.hZ)(i,e[0]-r*t[0],e[1]-r*t[1],e[2]-r*t[2]),(0,n.S8)(i,i)}function l(e,t,i,s=(0,r.vt)()){const o=(0,n.Bw)(e),a=(0,n.Bw)(t),l=(0,n.Om)(e,t)/(o*a);if(l<.9999999999999999){const r=Math.acos(l),u=((1-i)*o+i*a)/Math.sin(r),p=u/o*Math.sin((1-i)*r),f=u/a*Math.sin(i*r);return(0,n.hs)(c,e,p),(0,n.hs)(h,t,f),(0,n.WQ)(s,c,h)}return(0,n.Cc)(s,e,t,i)}(0,r.vt)(),(0,r.vt)(),(0,r.vt)();const c=(0,r.vt)(),h=(0,r.vt)()},68747(e,t,i){i.r(t),i.d(t,{generateCombinationsPanoramicWorker:()=>M,generateCombinationsWorker:()=>b});var n=i(34727),r=i(17676);i(17799),i(69052),i(799),i(86211),i(18047),new Map,i(77690),i(29242),i(51850),i(37585),i(35522);var s=i(49186);i(56507),i(86738),i(39829),i(82799),i(16930),i(34403),i(21325),i(91218),i(65708),i(49590),i(27749),i(39663),i(7817),i(10222),i(4576),i(63490),i(6800),i(87811);var o=i(53966),a=(i(44208),i(27921),i(5443));i(83276),i(19419),i(38732),i(87772),i(23281),i(90091),i(87378),i(22796),i(1555),i(87045),i(72802),i(7861);const l=[1920,1080],c={xmin:-150,ymin:1,xmax:20,ymax:80,spatialReference:{wkid:4326}},h=.001;new a.A({xmin:c.xmin+h,ymin:c.ymin+h,xmax:c.xmax-h,ymax:c.ymax-h,spatialReference:c.spatialReference}),(0,n.KJ)(Math.acos(.05));var u=i(5482),p=i(97768),f=i(61893),d=i(10107),m=i(64108);let g=class extends f.Z{constructor(e){super(e),this.autoLoad=!1,this.customParameters=null,this.datasetFormat=null,this.url=null,this.rotation=null}destroy(){this._cache=(0,p.pR)(this._cache)}get layer(){return this._cache}get size(){if(!this._cache?.loaded||!this._cache.serviceRasterInfo)return;const{serviceRasterInfo:e}=this._cache;return[e.width,e.height]}async load(e){if(this._cache?.loaded)return await this._cache.load(e),{layer:this._cache,size:this.size};const{url:t,customParameters:n}=this;let s=this.datasetFormat;if(!t)throw new Error("URL is required to load NonPanoramicMedia.");const a=await i.e(7835).then(i.bind(i,97835));if((0,r.Te)(e),s||(s=a.guessExtensionFromURI(t)),!s){try{s=await a.getDatasetFormat(t)}catch(e){o.A.getLogger(this).warn("non-panoramic-media:dataset-format",e)}(0,r.Te)(e)}s??="UNKNOWN FORMAT",this.datasetFormat=s;const l=(await Promise.all([i.e(7373),i.e(9235),i.e(3500),i.e(1003),i.e(233),i.e(561)]).then(i.bind(i,90561))).default;(0,r.Te)(e),this._cache=new l({url:t,ioConfig:{skipExtensions:["aux.xml","jgw"],skipMapInfo:!0,datasetFormat:s},customParameters:n??void 0});const c=this._cache.load(e);return this.addResolvingPromise(c),await c,(0,r.Te)(e),{layer:this._cache,size:this.size}}};(0,u.Cg)([(0,d.MZ)()],g.prototype,"_cache",void 0),(0,u.Cg)([(0,d.MZ)()],g.prototype,"autoLoad",void 0),(0,u.Cg)([(0,d.MZ)()],g.prototype,"customParameters",void 0),(0,u.Cg)([(0,d.MZ)()],g.prototype,"datasetFormat",void 0),(0,u.Cg)([(0,d.MZ)()],g.prototype,"url",void 0),(0,u.Cg)([(0,d.MZ)()],g.prototype,"layer",null),(0,u.Cg)([(0,d.MZ)()],g.prototype,"rotation",void 0),(0,u.Cg)([(0,d.MZ)()],g.prototype,"size",null),g=(0,u.Cg)([(0,m.$)("esri.widgets.OrientedImageryViewer.support.NonPanoramicMedia")],g);var y=i(37955),v=i(38969);class w extends s.A{constructor(e,t,i){super(e,t,i),this.name="unknown",this.name=e}}const _=new Set(["JPG","JPEG","TIFF","TIF","MRF"]),C=new Set(["MRF","TIFF","TIF"]);let x=class extends f.Z{constructor(e){super(e),this._size=[0,0],this._cache=null,this.autoLoad=!1,this.cameraHeading=null,this.extension=null,this.imagePyramid=null,this.type="image",this.uiStrings={}}destroy(){this._cache=null}get horizonPitch(){const{matrix:e}=this;return e?(0,n.KJ)(Math.asin(-e[6])):0}get horizonRoll(){const{matrix:e}=this;return e?(0,n.KJ)(Math.atan(e[7]/e[8])):0}get horizonYaw(){const{matrix:e,cameraHeading:t}=this;return e?(0,n.KJ)(Math.atan2(e[3],e[0])):t?-t:0}get size(){return this._size}async load(e){const{guessExtensionFromURI:t}=await i.e(7835).then(i.bind(i,97835));if((0,r.Te)(e),"video"===this.type)return this.loadVideoMesh(e);let n=this.extension;if(n||(n=t(this.url)),!n||!_.has(n))throw new w("unsupported-format",this.uiStrings["unsupported-format"]??"Unsupported image format: {extension}",{datasetFormat:n??"UNKNOWN FORMAT"});return C.has(n)?this.loadOptimizedImageMesh(e):this.loadImageMesh(e)}async loadOptimizedImageMesh(e){const{loadMeshes:t,loadPyramid:n,loadRaster:s}=await Promise.all([i.e(1843),i.e(7005),i.e(5408),i.e(7925),i.e(8449)]).then(i.bind(i,21060)),o=await s(this.url,e);(0,r.Te)(e),this.imagePyramid=await n(o,{pitch:this.horizonPitch,yaw:this.horizonYaw,roll:this.horizonRoll},e),(0,r.Te)(e);const a=this.imagePyramid.getLowResolutionTiles(),l=await t(a,e);return(0,r.Te)(e),this._size=this.imagePyramid.imageSize,{meshOrMeshes:l,size:this._size,tileKeys:a?.map(e=>e.key)}}async loadVideoMesh(e){const{createImageSphere:t}=await Promise.all([i.e(1843),i.e(7005),i.e(5408),i.e(7925),i.e(8449)]).then(i.bind(i,21060));if((0,r.Te)(e),this._cache){const i=await t({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return(0,r.Te)(e),{meshOrMeshes:i,size:this._size}}const n=await this._resolveMedia(e);(0,r.Te)(e),this._cache=n.media,this._size=[...l];const s=await t({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return(0,r.Te)(e),{meshOrMeshes:s,size:this._size}}async loadImageMesh(e){const{createImageSphere:t}=await Promise.all([i.e(1843),i.e(7005),i.e(5408),i.e(7925),i.e(8449)]).then(i.bind(i,21060));if((0,r.Te)(e),this._cache){const i=await t({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return(0,r.Te)(e),{meshOrMeshes:i,size:this._size}}const n=await this._resolveMedia(e);(0,r.Te)(e),this._cache=n.media;const s=n.mesh;return this._size=[n.media.width,n.media.height],{meshOrMeshes:s,size:this._size}}async _resolveMedia(e){const t=Promise.withResolvers(),n=(0,r.u7)(e?.signal,t.resolve),s="video"===this.type?document.createElement("video"):document.createElement("img");s.crossOrigin="anonymous",s.src=this.url;let o=null;const a="video"===this.type?(0,v.i)(s,this.addHandles):await new Promise((e,t)=>{o=[(0,y.on)(s,"error",e=>{t(e)}),(0,y.on)(s,"load",e)]}).finally(()=>{o?.forEach(e=>e.remove()),o=null}),l=Promise.race([a,t.promise]);this.addResolvingPromise(l);try{await l}finally{n?.remove()}(0,r.Te)(e);const c=s;if(!c)throw new w("unknown","Could not load media",{url:this.url});const{createImageSphere:h}=await Promise.all([i.e(1843),i.e(7005),i.e(5408),i.e(7925),i.e(8449)]).then(i.bind(i,21060));(0,r.Te)(e);const u=await h({data:s,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return(0,r.Te)(e),{media:c,mesh:u}}};function b(e){return function(e,t){const{cameraPitch:i,cameraRoll:n,cameraLocation:r}=e,{x:s,y:o,z:a,spatialReference:l}=r;if(t.every(e=>0===e)||!t||!t.length||!l)throw new Error("Invalid parameters");const[c,h,,u,p]=t,f=[-u,0,u],d=[-p,0,p],m=[-c,0,c],g=[-h,0,h],y=[];for(const t of f)for(const r of d)for(const c of m)for(const h of m)for(const u of g){const p={...e};p.cameraPitch=i+t,p.cameraRoll=n+r,p.cameraLocation={x:s+c,y:o+h,z:a?a+u:0,spatialReference:{wkid:l.wkid}},y.push(p)}return y}(e.imageToWorldProps,e.accuracyParameters)}function M(e){return function(e,t){const{cameraHeading:i,cameraLocation:n}=e,{x:r,y:s,z:o,spatialReference:a}=n;if(!t||t.every(e=>0===e)||!t.length||!a)throw new Error("Invalid parameters");const[l,c,h]=t,u=h>0?[-h,0,h]:[],p=l>0?[-l,0,l]:[],f=c>0?[-c,0,c]:[],d=[];for(const t of u)for(const n of p)for(const l of p)for(const c of f){const h={...e};h.cameraHeading=i+t,h.cameraLocation={x:r+n,y:s+l,z:o?o+c:0,spatialReference:{wkid:a.wkid}},d.push(h)}return d}(e.imageToWorldProps,e.accuracyParameters)}(0,u.Cg)([(0,d.MZ)()],x.prototype,"_size",void 0),(0,u.Cg)([(0,d.MZ)()],x.prototype,"autoLoad",void 0),(0,u.Cg)([(0,d.MZ)()],x.prototype,"cameraHeading",void 0),(0,u.Cg)([(0,d.MZ)()],x.prototype,"extension",void 0),(0,u.Cg)([(0,d.MZ)()],x.prototype,"horizonPitch",null),(0,u.Cg)([(0,d.MZ)()],x.prototype,"horizonRoll",null),(0,u.Cg)([(0,d.MZ)()],x.prototype,"horizonYaw",null),(0,u.Cg)([(0,d.MZ)()],x.prototype,"id",void 0),(0,u.Cg)([(0,d.MZ)()],x.prototype,"imagePyramid",void 0),(0,u.Cg)([(0,d.MZ)()],x.prototype,"matrix",void 0),(0,u.Cg)([(0,d.MZ)()],x.prototype,"size",null),(0,u.Cg)([(0,d.MZ)()],x.prototype,"type",void 0),(0,u.Cg)([(0,d.MZ)()],x.prototype,"uiStrings",void 0),(0,u.Cg)([(0,d.MZ)()],x.prototype,"url",void 0),x=(0,u.Cg)([(0,m.$)("esri.widgets.PanoramicViewer.support.PanoramicMedia")],x),i(9093),i(91829),i(58083),i(79258),i(73354),i(28208),i(28735)},28208(e,t,i){i.d(t,{NU:()=>a,ZH:()=>s,vK:()=>o});var n=i(86738),r=i(16930);const s=new n.A({x:0,y:0,z:0,spatialReference:r.A.WebMercator}),o=1e3,a=.3515625}}]);