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

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 (53) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{242a77066ac5cdb5b7d7.js → 14d81280807a3d3c1b7e.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{f21edbfdcab111d8a6cd.js → 1a8d8274df292d65f82e.js} +1 -1
  4. package/assets/esri/core/workers/chunks/29cc6b1705418b1be5d7.js +1 -0
  5. package/assets/esri/core/workers/chunks/2de077c7b971f2c215a6.js +1 -0
  6. package/assets/esri/core/workers/chunks/{4741fac6b6b4202a97c5.js → 360c944c610efa2051fc.js} +3 -3
  7. package/assets/esri/core/workers/chunks/{ffaaa388773e60869df0.js → 46453ebfee17b5421d9d.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{84940d8e14caf5a27e04.js → 487c46d5245cfb35c4bb.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{f7fb6cb7f08c16384443.js → 4d18b48d4a282a0f341c.js} +1 -1
  10. package/assets/esri/core/workers/chunks/52a0aa2d19a495e48ab1.js +1 -0
  11. package/assets/esri/core/workers/chunks/{8a485130781b49dbf608.js → 601e1d020b8115497944.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{d09d8cd43e846d467827.js → 6bb191b19ce43a27f205.js} +1 -1
  13. package/assets/esri/core/workers/chunks/6f6d1873753a9c6994aa.js +1 -0
  14. package/assets/esri/core/workers/chunks/7084dd6e10c6c1393e92.js +1 -0
  15. package/assets/esri/core/workers/chunks/853563c66ecf58d53d36.js +1 -0
  16. package/config.js +1 -1
  17. package/geometry/support/GlobalCoordinateSystem.js +2 -0
  18. package/geometry/support/LocalCoordinateSystem.js +2 -0
  19. package/geometry/support/boundedPlane.js +1 -1
  20. package/geometry/support/coordinateSystem.js +1 -1
  21. package/geometry/support/ray.js +1 -1
  22. package/geometry/support/sphere.js +1 -1
  23. package/kernel.js +1 -1
  24. package/package.json +2 -2
  25. package/views/2d/interactive/editingTools/TransformTool.js +1 -1
  26. package/views/2d/interactive/editingTools/manipulations/ScaleManipulation.js +1 -1
  27. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  28. package/views/3d/analysis/Slice/SliceController.js +1 -1
  29. package/views/3d/analysis/Slice/SliceTool.js +1 -1
  30. package/views/3d/analysis/Slice/sliceToolUtils.js +1 -1
  31. package/views/3d/analysis/Viewshed/ViewshedFieldOfViewManipulation.js +1 -1
  32. package/views/3d/analysis/Viewshed/ViewshedScaleOrientManipulation.js +1 -1
  33. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentRotate.js +1 -1
  34. package/views/3d/interactive/editingTools/transform/extentTransform/ExtentScale.js +1 -1
  35. package/views/3d/interactive/editingTools/transform/extentTransform/extentUtils.js +1 -1
  36. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  37. package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
  38. package/views/3d/state/ScreenSizePerspective.js +1 -1
  39. package/views/3d/support/RenderCoordsHelper.js +1 -1
  40. package/views/3d/support/ViewSlice.js +1 -1
  41. package/views/3d/support/hitTest.js +1 -1
  42. package/views/3d/webgl-engine/lib/SliceHelper.js +1 -1
  43. package/views/3d/webgl-engine/lib/intersectorUtils.js +1 -1
  44. package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
  45. package/views/interactive/snapping/featureSources/featureServiceSource/tileUtils.js +1 -1
  46. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  47. package/assets/esri/core/workers/chunks/00d1c99779bd91b1d10e.js +0 -1
  48. package/assets/esri/core/workers/chunks/8d13f11d0bcc8d3a4bdf.js +0 -1
  49. package/assets/esri/core/workers/chunks/90ba0af9690dc32b2958.js +0 -1
  50. package/assets/esri/core/workers/chunks/ceb2d5b0a23f0ab81f68.js +0 -1
  51. package/assets/esri/core/workers/chunks/e04fb83ab2634bc15cc7.js +0 -1
  52. package/assets/esri/core/workers/chunks/e30fdde253e5521473a2.js +0 -1
  53. package/chunks/boundedPlane.js +0 -2
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2810],{4341(e,t,r){r.d(t,{I:()=>a});var i=r(26390);class a{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){let e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*n);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,n));e++)this._items.push(this._allocator())}}const n=1024},11964(e,t,r){r.d(t,{Cr:()=>u,H6:()=>d,LV:()=>h,_I:()=>m,kb:()=>c,vt:()=>l});var i=r(34727),a=r(4341),n=r(35522),s=r(51850),o=r(32114);function l(e){return e?{origin:(0,s.o8)(e.origin),vector:(0,s.o8)(e.vector)}:{origin:(0,s.vt)(),vector:(0,s.vt)()}}function h(e,t){let r=p.get();return r.origin=e,r.vector=t,r}function u(e,t,r=l()){return(0,n.C)(r.origin,e),(0,n.Re)(r.vector,t,e),r}function c(e,t){let r=(0,n.Re)(o.rq.get(),t,e.origin),a=(0,n.Om)(e.vector,r),s=(0,n.Om)(e.vector,e.vector);if(Math.abs(s)<_)return(0,n.hG)(e.origin,t);let l=(0,i.qE)(a/s,0,1),h=(0,n.Re)(o.rq.get(),(0,n.hs)(o.rq.get(),e.vector,l),r);return(0,n.Om)(h,h)}function m(e,t,r){return d(e,t,0,1,r)}function d(e,t,r,a,s){let{vector:l,origin:h}=e,u=(0,n.Re)(o.rq.get(),t,h),c=(0,n.Om)(l,u)/(0,n.m3)(l);return(0,n.hs)(s,l,(0,i.qE)(c,r,a)),(0,n.WQ)(s,s,e.origin)}(0,s.vt)(),(0,s.vt)();const p=new a.I(()=>l()),_=1e-9},80754(e,t,r){r.d(t,{kS:()=>h,kd:()=>l});var i=r(82799),a=r(16930),n=r(60408),s=r(52006);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:a.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:a.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function h(e,t){if((0,s.Ed)(e))for(let r of function(e){return(0,n.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of r)if((0,s.aO)(e)){let[r,i]=e.c;r[0]+=t,i[0]+=t}else if((0,s.FG)(e)){let[r,i]=e.a;r[0]+=t,i[0]+=t}else if((0,s.n1)(e)){let[r,i,a]=e.b;r[0]+=t,i[0]+=t,a[0]+=t}else e[0]+=t;for(let r of function(e){return(0,n.Bi)(e)?e.rings:e.paths}(e))for(let e of r)e[0]+=t;return e}r.d(t,["j7",0,o])},71351(e,t,r){r.d(t,{C:()=>c,Cr:()=>m,LV:()=>u,fA:()=>d,kb:()=>p,vt:()=>l});var i=r(4341),a=(r(77690),r(29242)),n=r(35522),s=r(51850),o=r(32114);function l(e){return e?h((0,s.o8)(e.origin),(0,s.o8)(e.direction)):h((0,s.vt)(),(0,s.vt)())}function h(e,t){return{origin:e,direction:t}}function u(e,t){let r=_.get();return r.origin=e,r.direction=t,r}function c(e,t=l()){return d(e.origin,e.direction,t)}function m(e,t,r=l()){return(0,n.C)(r.origin,e),(0,n.Re)(r.direction,t,e),r}function d(e,t,r=l()){return(0,n.C)(r.origin,e),(0,n.C)(r.direction,t),r}function p(e,t){let r=(0,n.$A)(o.rq.get(),(0,n.S8)(o.rq.get(),e.direction),(0,n.Re)(o.rq.get(),t,e.origin));return(0,n.Om)(r,r)}const _=new i.I(()=>l());(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,a.vt)()},94008(e,t,r){r.d(t,{iy:()=>d}),r(44208),r(53966);var i=r(34727),a=r(34304),n=r(58083),s=r(35522),o=r(51850),l=r(91829),h=r(34275);var u=r(71351),c=r(44280),m=r(32114);class d{constructor(e=0,t=0,r=0,i=0){this.radius=i,"number"==typeof e?this._center=(0,o.fA)(e,t,r):function(e){return t=e,(0,h.vZ)(t)&&t.length>=3||function(e){return((0,h.aI)(e)||Array.isArray(e))&&e.length>=3}(e);var t}(e)||function(e){return(t=e)instanceof Float32Array&&t.length>=4||function(e){return Array.isArray(e)&&e.length>=4}(e);var t}(e)?(this._center=(0,o.ci)(e),this.radius=4===e.length?e[3]:t):(this._center=(0,o.o8)(e.center),this.radius=e.radius)}get isValid(){return this.radius>=0}invalidate(){this.radius=-1}get center(){return this._center}set center(e){(0,s.C)(this.center,e)}exactEquals(e){return(0,s.aI)(this._center,e.center)&&this.radius===e.radius}copyFrom(e){return e!==this&&((0,s.C)(this._center,e.center),this.radius=e.radius),this}clone(){return new d(this.center,this.radius)}toVec4(){return(0,l.fA)(this.center[0],this.center[1],this.center[2],this.radius)}contains(e){return(0,s.hG)(this.center,e)<=this.radius**2}intersects(e){let t=this.radius+e.radius;return(0,s.hG)(this.center,e.center)<=t*t}intersectRay(e,t){if(null==e||!this._intersect(e,p))return!1;let{t0:r,t1:i}=p;if((r<0||i<r&&i>0)&&(r=i),r<0)return!1;if(t){let{origin:i,direction:a}=e;t[0]=i[0]+a[0]*r,t[1]=i[1]+a[1]*r,t[2]=i[2]+a[2]*r}return!0}intersectLine(e,t){let r=(0,u.Cr)(e,t);if(!this._intersect(r,p))return[];let{origin:i,direction:n}=r,{t0:l,t1:h}=p,c=e=>{let t=(0,o.vt)();return(0,s.Ln)(t,i,n,e),this.projectPoint(t,t)};return Math.abs(l-h)<(0,a.FD)()?[c(l)]:[c(l),c(h)]}_intersect(e,t){let{origin:r,direction:i}=e,a=_;a[0]=r[0]-this.center[0],a[1]=r[1]-this.center[1],a[2]=r[2]-this.center[2];let n=i[0]*i[0]+i[1]*i[1]+i[2]*i[2];if(0===n)return!1;let s=2*(i[0]*a[0]+i[1]*a[1]+i[2]*a[2]),o=s*s-4*n*(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]-this.radius**2);if(o<0)return!1;let l=Math.sqrt(o);return t.t0=(-s-l)/(2*n),t.t1=(-s+l)/(2*n),!0}projectPoint(e,t){let r=(0,s.Re)(m.rq.get(),e,this.center),i=(0,s.hs)(m.rq.get(),r,this.radius/(0,s.Bw)(r));return(0,s.WQ)(t,i,this.center)}closestPointOnSilhouette(e,t){let r=m.rq.get(),i=m.Rc.get();(0,s.$A)(r,e.origin,e.direction),(0,s.$A)(t,r,e.origin),(0,s.hs)(t,t,1/(0,s.Bw)(t)*this.radius);let a=this._angleToSilhouette(e.origin),o=(0,c.g7)(e.origin,t);return(0,n.$0)(i,o+a,r),(0,s.Z0)(t,t,i),t}frustumCoverage(e,t,r){let i=this.radius,a=i*i,n=e+.5*Math.PI,s=t*t+a-2*Math.cos(n)*t*i,o=Math.sqrt(s),l=s-a;if(l<=0)return.5;let h=Math.acos(Math.sqrt(l)/o)-Math.asin(i/(o/Math.sin(n)));return Math.min(1,(h+.5*r)/r)}_angleToSilhouette(e){let t=(0,s.Re)(m.rq.get(),e,this.center),r=(0,s.Bw)(t),a=this.radius,n=a+Math.abs(a-r);return(0,i.XM)(a/n)}union(e){let t=(0,s.Io)(this._center,e.center),r=this.radius,i=e.radius;return t+i<r?this:t+r<i?(this.copyFrom(e),this):((0,s.Cc)(this._center,this._center,e.center,(t+i-r)/(2*t)),this.radius=(t+r+i)/2,this)}toJSON(){return{center:this.center,radius:this.radius}}signedDistanceToPlane(e){let{center:t,radius:r}=this,i=e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3];return i<0?Math.min(i+r,0):Math.max(i-r,0)}}new d;const p={t0:0,t1:0},_=(0,o.vt)();(0,o.vt)(),(0,o.vt)()},38969(e,t,r){r.d(t,{i:()=>a});var i=r(37955);function a(e,t){return new Promise((r,a)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,i.Oo)(e,"canplay",r)),t((0,i.Oo)(e,"error",a)))})}},31217(e,t,r){r.d(t,{D:()=>a});var i=r(56507);async function a(e,t){return(await(0,i.A)(e,{responseType:"image",...t})).data}},76200(e,t,r){r.d(t,{h:()=>K});var i=r(49186),a=r(65529),n=r(44208),s=r(97768),o=r(17676),l=r(34275),h=r(24326),u=r(84952),c=r(38969),m=r(31217),d=r(95117),p=r(53966),_=r(2741);let g;const f=[171,75,84,88,32,50,48,187,13,10,26,10];function T(e){return ArrayBuffer.isView(e)?new DataView(e.buffer,e.byteOffset,e.byteLength):new DataView(e)}function x(e,t){return e.getUint16(t,!0)+65536*e.getUint8(t+2)}function E(e,t,r){return t<=e.byteLength&&r<=e.byteLength-t}function A(e){return p.A.getLogger("esri.libs.basisu.textureMetadata").error(`Invalid or unsupported ${e} texture metadata`),null}var M=r(63907),R=r(21231),w=r(42293);const b=()=>p.A.getLogger("esri.views.3d.webgl-engine.lib.BasisUtil");let C=null,D=null;async function S(){return D??(g??=(async()=>{let e=await(await r.e(9321).then(()=>r(49321))).default({locateFile:e=>(0,_.s)(`esri/libs/basisu/${e}`)});return e.initializeBasis(),e})(),D=g,C=await D),D}function y(e,t){let r=function(e){let t=T(e);if(t.byteLength<77)return A("Basis");let r=t.getUint16(0,!0),i=t.getUint16(2,!0),a=t.getUint16(4,!0),n=t.getUint8(20);if(17011!==r||19!==i||77!==a||0!==n)return A("Basis");let s=t.getUint32(8,!0),o=x(t,14),l=x(t,17),h=t.getUint16(21,!0),u=!!(4&h),c=t.getUint32(65,!0);if(0===l||o<l||!(1&h)||u&&o%2!=0||!E(t,77,s)||c<77||!E(t,c,23*o))return A("Basis");let m=x(t,c),d=t.getUint8(c+3);if(0!==m||0!==d)return A("Basis");let p=t.getUint16(c+5,!0),_=t.getUint16(c+7,!0),g=1;for(let e=1;e<o;++e){let r=c+23*e;if(0!==x(t,r))break;let i=t.getUint8(r+3);g=Math.max(g,i+1)}return 0===p||0===_||g>16?A("Basis"):{width:p,height:_,levels:g,hasAlpha:u}}(e);return r?v(r,t):0}function F(e,t){let r=function(e){let t=T(e);if(t.byteLength<80||!f.every((e,r)=>t.getUint8(r)===e))return A("KTX2");let r=t.getUint32(12,!0),i=t.getUint32(16,!0),a=t.getUint32(20,!0),n=t.getUint32(24,!0),s=t.getUint32(28,!0),o=t.getUint32(36,!0),l=t.getUint32(40,!0),h=t.getUint32(44,!0),u=t.getUint32(48,!0),c=t.getUint32(52,!0);if(0!==r||1!==i||0===a||0===n||0!==s||1!==o&&6!==o||6===o&&a!==n||0===l||l>32||!E(t,80,24*l)||u<80||44!==c&&60!==c||!E(t,u,c))return A("KTX2");let m=t.getUint32(u,!0),d=t.getUint8(u+12),p=t.getUint8(u+14);if(m!==c||1!==p&&2!==p||163!==d&&166!==d||(163===d?1!==h:0!==h&&2!==h))return A("KTX2");for(let e=0;e<l;++e){let r=80+24*e,i=Number(t.getBigUint64(r,!0)),a=Number(t.getBigUint64(r+8,!0));if(i<80||0===a||!E(t,i,a))return A("KTX2")}let _=t.getUint32(56,!0),g=t.getUint32(60,!0),x=Number(t.getBigUint64(64,!0)),M=Number(t.getBigUint64(72,!0));if(g>0&&(_<80||!E(t,_,g))||1===h&&(x<80||!E(t,x,M)))return A("KTX2");let R=15&t.getUint8(u+31);return{width:a,height:n,levels:l,hasAlpha:163===d?60===c:3===R}}(e);return r?v(r,t):0}function v({levels:e,hasAlpha:t,width:r,height:i},a){let n=(0,w.MW)(t?M.CQ.COMPRESSED_RGBA8_ETC2_EAC:M.CQ.COMPRESSED_RGB8_ETC2),s=a&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*n*s)}function I(e,t,r,i,a,n,s,o,l=!1){let{compressedTextureETC:h,compressedTextureS3TC:u}=e.capabilities,{basisFormat:c,internalFormat:m}=function(e,t,r,i){return e?r?{basisFormat:1,internalFormat:i?M.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:M.CQ.COMPRESSED_RGBA8_ETC2_EAC}:{basisFormat:0,internalFormat:i?M.CQ.COMPRESSED_SRGB8_ETC2:M.CQ.COMPRESSED_RGB8_ETC2}:t?r?{basisFormat:3,internalFormat:M.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT}:{basisFormat:2,internalFormat:M.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT}:{basisFormat:13,internalFormat:i?M.H0.SRGB8_ALPHA8:6408}}(null!=h,null!=u,i,l),d=t.hasMipmap?r:Math.min(1,r),p=[];for(let e=0;e<d;e++)p.push(new Uint8Array(s(e,c))),o(e,c,p[e]);return t.internalFormat=m,t.hasMipmap=p.length>1,t.samplingMode=t.hasMipmap?9987:9729,t.width=a,t.height=n,new R.A(e,t,{type:"compressed",levels:p})}function U(e,t){let r=new Uint32Array(e.buffer,e.byteOffset,16);if(1481919403!==r[0]||3140563232!==r[1]||169478669!==r[2])return b().error("Invalid magic number in KTX1 header"),null;if(67305985!==r[3]||1!==r[5]||r[7]!==M.CQ.COMPRESSED_RGB8_ETC2||6407!==r[8])return b().error("Unsupported KTX1 image"),null;let i=r[7],a=1,n=r[9],s=r[10];if(3&n||3&s)return null;let o=n,l=s;!1!==t&&(a=Math.max(1,r[14]));let h,u,c=e.byteOffset+64,m=[];for(let t=0;t<a;++t)u=(e[c]|e[c+1]<<8|e[c+2]<<16|e[c+3]<<24)>>>0,c+=4,h=new Uint8Array(e.buffer,c,u),m.push(h),c+=u,n=Math.max(1,n>>1),s=Math.max(1,s>>1);return{textureData:{type:"compressed",levels:m},internalFormat:i,width:o,height:l}}const P=()=>p.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function H(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const O=H("DXT1"),B=H("DXT3"),G=H("DXT5");function N(e,t){let r=new Int32Array(e.buffer,e.byteOffset,31);if(542327876!==r[0])return P().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return P().error("Unsupported format, must contain a FourCC code"),null;let i,a,n=r[21];switch(n){case O:i=8,a=M.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case B:i=16,a=M.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case G:i=16,a=M.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return P().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(n)),null}let s=1,o=r[4],l=r[3];(3&o||3&l)&&(P().warn("Rounding up compressed texture size to nearest multiple of 4."),o=o+3&-4,l=l+3&-4);let h=o,u=l;131072&r[2]&&!1!==t&&(s=Math.max(1,r[7]));let c,m,d=e.byteOffset+r[1]+4,p=[];for(let t=0;t<s;++t)m=(o+3>>2)*(l+3>>2)*i,c=new Uint8Array(e.buffer,d,m),p.push(c),d+=m,o=Math.max(1,o>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:p},internalFormat:a,width:h,height:u}}function L(e,t){return t=16*Math.floor(t/16),Math.min(16*Math.round(e/16),t)}function X(e,t){let[r,i]=function({width:e,height:t},{maxPreferredTexturePixels:r,maxTextureSize:i}){let a=Math.max(e,t),n=e*t;if(a<=i&&n<=r)return[e,t];let s=Math.min(Math.sqrt(r/n),i/a);return[L(Math.round(e*s),i),L(Math.round(t*s),i)]}(e,t);return e.width===r&&e.height===i?e:Q(e,r,i)}function Q(e,t,r){if(e instanceof ImageData)return Q(function(e){let t=document.createElement("canvas");t.width=e.width,t.height=e.height;let r=t.getContext("2d");if(null==r)throw new i.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}(e),t,r);let a=document.createElement("canvas");return a.width=t,a.height=r,a.getContext("2d").drawImage(e,0,0,a.width,a.height),a}var W=r(620),V=r(67171),k=r(12541);const q=!!(0,n.A)("esri-tests-disable-gpu-memory-measurements");class K{constructor(e,t){this._data=e,this.id=(0,h.c)(),this.events=new a.bk,this._parameters={...Y,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(e){e instanceof HTMLVideoElement?(this.update=t=>this._update(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e)}_startPreloadVideoElement(e){if(!(0,u.w8)(e.src)&&("auto"!==e.preload||!e.crossOrigin)&&(e.preload="auto",e.crossOrigin="anonymous",e.src=e.src,e.paused&&e.autoplay)){let t=[];(0,c.i)(e,e=>t.push(e)).then(()=>{e.play()}).finally(()=>t.forEach(e=>e.remove()))}}_startPreloadImageElement(e){(0,u.DB)(e.src)||(0,u.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){let t=new V.R;return t.wrapMode=this._parameters.wrap??10497,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?9987:9729,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t.dataType=this._parameters.dataType??t.dataType,t.pixelFormat=this._parameters.pixelFormat??t.pixelFormat,t.internalFormat=this._parameters.internalFormat??t.internalFormat,t.isImmutable=!0===this._parameters.immutable&&function(e){return null!=e&&((0,k.tl)(e)||(0,k.tr)(e)||(0,k.CR)(e)||(0,k.QJ)(e))}(this._parameters.internalFormat),t}get texture(){return this._texture??this._emptyTexture}get loaded(){return null!=this._texture}get usedMemory(){return q?0:this._texture?.usedMemory??function(e,t){if(null==e)return 0;if((0,l.mw)(e)||(0,l.mg)(e))return"image/ktx2"===t.encoding?F(e,!!t.mipmap):"image/x.basis"===t.encoding?y(e,!!t.mipmap):e.byteLength;let{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?z(e):t,a=t.pixelFormat??6408,n=(0,w.wH)(a);return(t.mipmap?4/3:1)*r*i*n||0}(this._data,this._parameters)}load(e){if(this._loadingPromise)return this._loadingPromise;if(this._texture)return this._texture;let t=this._data;return null==t?(this._texture=new R.A(e,this._createDescriptor(e),null),this._texture):(this._emptyTexture=e.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):(0,l.mg)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,t):(0,l.mw)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,new Uint8Array(t)):(0,l.mg)(t)&&"image/ktx"===this._parameters.encoding?this._loadFromKTX1(e,t):(0,l.mw)(t)&&"image/ktx"===this._parameters.encoding?this._loadFromKTX1(e,new Uint8Array(t)):((0,l.mw)(t)||(0,l.mg)(t))&&"image/ktx2"===this._parameters.encoding?this._loadFromKTX2(e,t):((0,l.mw)(t)||(0,l.mg)(t))&&"image/x.basis"===this._parameters.encoding?this._loadFromBasis(e,t):(0,l.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):(0,l.iu)(t)?this._loadFromPixelData(e,t):null)}_update(e,t){return null==this._texture||e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._texture.setData(e),this._texture.descriptor.hasMipmap&&this._texture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._texture=function(e,t,r){let i=N(r,t.hasMipmap??!1);if(null==i)throw Error("DDS texture data is null");let{textureData:a,internalFormat:n,width:s,height:o}=i;return t.samplingMode=a.levels.length>1?9987:9729,t.hasMipmap=a.levels.length>1,t.internalFormat=n,t.width=s,t.height=o,new R.A(e,t,a)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._texture}_loadFromKTX1(e,t){return this._texture=function(e,t,r){let i=U(r,t.hasMipmap??!1);if(null==i)throw Error("KTX1 texture data is null");let{textureData:a,internalFormat:n,width:s,height:o}=i;return t.samplingMode=a.levels.length>1?9987:9729,t.hasMipmap=a.levels.length>1,t.internalFormat=n,t.width=s,t.height=o,new R.A(e,t,a)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._texture}_loadFromKTX2(e,t){return this._loadAsync(()=>async function(e,t,r,i=!1){C??=await S();let a=new C.KTX2File(new Uint8Array(r));if(!function(e){return e.getFaces()>=1&&(e.isETC1S()||e.isUASTC())}(a))return null;let n=i&&2===a.getDFDTransferFunc();a.startTranscoding();let s=I(e,t,a.getLevels(),a.getHasAlpha(),a.getWidth(),a.getHeight(),(e,t)=>a.getImageTranscodedSizeInBytes(e,0,0,t),(e,t,r)=>a.transcodeImage(r,e,0,0,t,0,-1,-1),n);return a.close(),a.delete(),s}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromBasis(e,t){return this._loadAsync(()=>async function(e,t,r){C??=await S();let i=new C.BasisFile(new Uint8Array(r));if(!function(e){return e.getNumImages()>=1&&!e.isUASTC()}(i))return null;i.startTranscoding();let a=I(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),(e,t)=>i.getImageTranscodedSizeInBytes(0,e,t),(e,t,r)=>i.transcodeImage(r,0,e,t,0,0));return i.close(),i.delete(),a}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromPixelData(e,t){(0,W.vA)(this._parameters.width>0&&this._parameters.height>0);let r=this._createDescriptor(e);return(6407===r.pixelFormat||6408===r.pixelFormat)&&(r.compress=this._parameters.compressionOptions),r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._texture=new R.A(e,r,t),this._texture}_loadFromURL(e,t){return this._loadAsync(async r=>{let i=await(0,m.D)(t,{signal:r});return(0,o.Te)(r),this._loadFromImage(e,i)})}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync(async r=>{let i=await(0,d.y)(t,t.src,!1,r);return(0,o.Te)(r),this._loadFromImage(e,i)})}_loadFromVideoElement(e,t){return t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync(r=>new Promise((a,n)=>{let l=()=>{t.removeEventListener("loadeddata",h),t.removeEventListener("error",u),(0,s.xt)(c)},h=()=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(l(),a(this._loadFromImage(e,t)))},u=e=>{l(),n(e||new i.A("texture:load-error","Failed to load video"))};t.addEventListener("loadeddata",h),t.addEventListener("error",u);let c=(0,o.u7)(r,()=>u((0,o.NK)()))}))}_loadFromImage(e,t){let r=t;r instanceof HTMLVideoElement||(r=X(r,e.parameters));let i=z(r);this._parameters.width=i.width,this._parameters.height=i.height;let a=this._createDescriptor(e);return a.width=i.width,a.height=i.height,a.compress=this._parameters.compressionOptions,this._texture=new R.A(e,a,r),this._emptyTexture=null,this.events.emit("loaded"),this._texture}_loadAsync(e){let t=new AbortController;this._loadingController=t;let r=e(t.signal);this._loadingPromise=r;let i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null),this._emptyTexture=null};return r.then(i,i),r}unload(){if(this._texture=(0,s.WD)(this._texture),this._emptyTexture=null,null!=this._loadingController){let e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function z(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}const Y={wrap:{s:10497,t:10497},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1}},58682(e,t,r){r.d(t,{Uy:()=>l,h7:()=>m});var i=r(35522),a=r(51850),n=r(70328);class s{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const o=(0,n.vt)();function l(e,t,r,a,n,o){if(!e.visible)return;let l=(0,i.jb)(M,a,r),{tolerance:h}=t,c=new s(h,!1,t.options.normalRequired);if(e.boundingInfo)u(e.readPrimitivePosition,e.boundingInfo,r,l,h,n,c,o);else{let t=e.readPrimitivePosition;!function(e,t,r,a,n,s,o,l){let h=t,u=R,c=Math.abs(h[0]),m=Math.abs(h[1]),d=Math.abs(h[2]),f=c>=m?c>=d?0:2:m>=d?1:2,x=f,E=h[x]<0?2:1,A=(f+E)%3,M=(f+(3-E))%3,w=h[A]/h[x],b=h[M]/h[x],C=1/h[x],D=p,S=_,y=g,{normalRequired:F}=o;for(let t=r;t<a;++t){let r=3*t;n(u[0],r),n(u[1],r+1),n(u[2],r+2),s&&(s.applyToVertex(u[0],u[0][0],u[0][1],u[0][2],t),s.applyToVertex(u[1],u[1][0],u[1][1],u[1][2],t),s.applyToVertex(u[2],u[2][0],u[2][1],u[2][2],t)),(0,i.jb)(D,u[0],e),(0,i.jb)(S,u[1],e),(0,i.jb)(y,u[2],e);let a=D[A]-w*D[x],o=D[M]-b*D[x],h=S[A]-w*S[x],c=S[M]-b*S[x],m=y[A]-w*y[x],d=y[M]-b*y[x],p=m*c-d*h,_=a*d-o*m,g=h*o-c*a;if((p<0||_<0||g<0)&&(p>0||_>0||g>0))continue;let f=p+_+g;if(0===f)continue;let E=p*(C*D[x])+_*(C*S[x])+g*(C*y[x]);if(E*Math.sign(f)<0)continue;let R=E/f;R>=0&&l(R,R,F?T(u):null,t)}}(r,l,0,e.faceCount,t,n,c,o)}}const h=(0,a.vt)();function u(e,t,r,a,s,l,c,m){if(null==t)return;let p=function(e,t){return(0,i.hZ)(t,1/e[0],1/e[1],1/e[2])}(a,h);if((0,n.C)(o,t.box),l?.applyToAabb(o),function(e,t,r,i){return function(e,t,r,i){let a=(e[0]-i-t[0])*r[0],n=(e[3]+i-t[0])*r[0],s=Math.min(a,n),o=Math.max(a,n),l=(e[1]-i-t[1])*r[1],h=(e[4]+i-t[1])*r[1];if(o=Math.min(o,Math.max(l,h)),o<0||(s=Math.max(s,Math.min(l,h)),s>o))return!1;let u=(e[2]-i-t[2])*r[2],c=(e[5]+i-t[2])*r[2];return o=Math.min(o,Math.max(u,c)),!(o<0||(s=Math.max(s,Math.min(u,c)),s>o))&&s<1/0}(e,t,r,i)}(o,r,p,s)){let{primitiveIndices:i}=t,n=i.length;if(n>1e3){let i=t.children;if(void 0!==i){for(let t of i)u(e,t,r,a,s,l,c,m);return}}d(r,a,0,n,e,i,l,c,m)}}const c=(0,a.vt)();function m(e,t,r,i,a,n,s,o,l,h=null,u=0){let m=e[0],d=e[1],p=e[2],_=t[0],g=t[1],T=t[2];for(let e=r;e<i;++e){let t=u+(h?.[e]??e),r=3*t,i=s*a[r],x=n[i],E=n[i+1],M=n[i+2],R=s*a[r+1],w=n[R],b=n[R+1],C=n[R+2],D=s*a[r+2],S=w-x,y=b-E,F=C-M,v=n[D]-x,I=n[D+1]-E,U=n[D+2]-M,P=g*U-I*T,H=T*v-U*_,O=_*I-v*g,B=S*P+y*H+F*O,G=B*B;if(G<=A)continue;let N=m-x,L=d-E,X=p-M,Q=(N*P+L*H+X*O)*B;if(Q<0||Q>G)continue;let W=L*F-y*X,V=X*S-F*N,k=N*y-S*L,q=(_*W+g*V+T*k)*B;if(q<0||Q+q>G)continue;let K=(v*W+I*V+U*k)/B;K>=0&&l(K,K,o?f(S,y,F,v,I,U,c):null,t)}}function d(e,t,r,i,a,n,s,o,l){let h=e[0],u=e[1],m=e[2],d=t[0],p=t[1],_=t[2],{normalRequired:g}=o;for(let e=r;e<i;++e){let t=n[e],r=3*t,[i,o,T]=a(b,r),[x,E,M]=a(b,r+1),[R,C,D]=a(b,r+2);null!=s&&([i,o,T]=s.applyToVertex(w,i,o,T,e),[x,E,M]=s.applyToVertex(w,x,E,M,e),[R,C,D]=s.applyToVertex(w,R,C,D,e));let S=x-i,y=E-o,F=M-T,v=R-i,I=C-o,U=D-T,P=p*U-I*_,H=_*v-U*d,O=d*I-v*p,B=S*P+y*H+F*O,G=B*B;if(G<=A)continue;let N=h-i,L=u-o,X=m-T,Q=(N*P+L*H+X*O)*B;if(Q<0||Q>G)continue;let W=L*F-y*X,V=X*S-F*N,k=N*y-S*L,q=(d*W+p*V+_*k)*B;if(q<0||Q+q>G)continue;let K=(v*W+I*V+U*k)/B;K>=0&&l(K,K,g?f(S,y,F,v,I,U,c):null,t)}}const p=(0,a.vt)(),_=(0,a.vt)(),g=(0,a.vt)();function f(e,t,r,a,n,s,o){return(0,i.hZ)(x,e,t,r),(0,i.hZ)(E,a,n,s),(0,i.$A)(o,x,E),(0,i.S8)(o,o),o}function T(e){return(0,i.jb)(x,e[1],e[0]),(0,i.jb)(E,e[2],e[0]),(0,i.$A)(c,x,E),(0,i.S8)(c,c),c}const x=(0,a.vt)(),E=(0,a.vt)(),A=1e-7*1e-7,M=(0,a.vt)(),R=[(0,a.vt)(),(0,a.vt)(),(0,a.vt)()],w=(0,a.vt)(),b=(0,a.vt)()},74810(e,t,r){r.d(t,{Jr:()=>n});var i=r(35522),a=r(51850);function n({normalTexture:e,metallicRoughnessTexture:t,metallicFactor:r,roughnessFactor:n,emissiveTexture:s,emissiveFactor:o,occlusionTexture:l}){return null==e&&null==t&&null==s&&(null==o||(0,i.t2)(o,a.uY))&&null==l&&(null==n||1===n)&&(null==r||1===r)}const s=(0,a.CN)(1,1,.5),o=(0,a.CN)(0,.6,.2),l=(0,a.CN)(0,1,.2);r.d(t,["Bt",0,o,"SY",0,l,"mb",0,s])},21231(e,t,r){r.d(t,{A:()=>g});var i=r(49186),a=r(44208),n=r(53966),s=r(97768),o=r(93637),l=r(17676),h=r(94656),u=r(63907),c=r(67171),m=r(12541);class d extends c.R{constructor(e,t){switch(super(),this.context=e,Object.assign(this,t),this.internalFormat){case u.H0.R16F:case u.H0.R32F:case u.H0.R8_SNORM:case u.H0.R8:this.pixelFormat=6403;break;case u.H0.R8I:case u.H0.R8UI:case u.H0.R16I:case u.H0.R16UI:case u.H0.R32I:case u.H0.R32UI:this.pixelFormat=36244}}static validate(e,t){return new d(e,t)}}const p=!!(0,a.A)("esri-tests-disable-gpu-memory-measurements"),_=()=>n.A.getLogger("esri/views/webgl/Texture");class g{static{this.TEXTURE_UNIT_FOR_UPDATES=0}static{this.compressionWorkerHandle=null}constructor(e,t=null,r=null){if(this.type=1,this._glName=null,this._samplingModeDirty=!1,this._wrapModeDirty=!1,this._shadowFilterDirty=!1,this._wasImmutablyAllocated=!1,"context"in e)this._descriptor=e,r=t;else{let r=d.validate(e,t);if(!r)throw new i.A("texture:invalid-descriptor","Texture descriptor invalid");this._descriptor=r}34067===this._descriptor.target?this._setDataCubeMap(r):this.setData(r)}get glName(){return this._glName}get descriptor(){return this._descriptor}get usedMemory(){return p?0:(0,c.e)(this._descriptor)}get isDirty(){return this._samplingModeDirty||this._wrapModeDirty||this._shadowFilterDirty}get hasWebGLTextureObject(){return!!this._glName}dispose(){this.abortCompression(),this.hasWebGLTextureObject&&this._descriptor.context?.gl&&(this._descriptor.context.instanceCounter.decrement(u.vt.Texture,this),this._descriptor.context.unbindTexture(this),this._descriptor.context.gl.deleteTexture(this._glName),this._glName=null)}release(){this.dispose()}[Symbol.dispose](){this.dispose()}resize(e,t){let r=this._descriptor;if(r.width!==e||r.height!==t){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-resize","Immutable textures can't be resized!");r.width=e,r.height=t,34067===this._descriptor.target?this._setDataCubeMap(null):this.setData(null)}}enableCompression(e){this._descriptor.compress=e}disableCompression(){this._descriptor.compress=void 0}setData(e){this.abortCompression(),!(0,m.Qp)(e)&&this._descriptor.internalFormat&&(0,o.a4)(u.CQ,this._descriptor.internalFormat)&&(this._descriptor.internalFormat=void 0),this._setData(e),!(0,m.Qp)(e)&&this._descriptor.compress&&this._compressOnWorker(e)}updateData(e,t,r,a,n,s,o=0){s||_().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||_().error("An attempt to update uninitialized texture!");let l=this._descriptor;l.internalFormat=(0,m.mq)(l);let{context:h,pixelFormat:u,dataType:c,target:d,isImmutable:p}=l;if(p&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");let f=h.bindTexture(this,g.TEXTURE_UNIT_FOR_UPDATES,!0);(t<0||r<0||t+a>l.width||r+n>l.height)&&_().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();let{gl:T}=h;o&&(a&&n||_().warn("Must pass width and height if `UNPACK_SKIP_ROWS` is used"),T.pixelStorei(T.UNPACK_SKIP_ROWS,o)),(0,m.Kv)(s)?T.texSubImage2D(d,e,t,r,a,n,u,c,s):(0,m.Qp)(s)?T.compressedTexSubImage2D(d,e,t,r,a,n,l.internalFormat,s.levels[e]):T.texSubImage2D(d,e,t,r,a,n,u,c,s),o&&T.pixelStorei(T.UNPACK_SKIP_ROWS,0),h.bindTexture(f,g.TEXTURE_UNIT_FOR_UPDATES)}updateData3D(e,t,r,a,n,s,o,l){l||_().error("An attempt to use uninitialized data!"),this.hasWebGLTextureObject||_().error("An attempt to update an uninitialized texture!");let h=this._descriptor;h.internalFormat=(0,m.mq)(h);let{context:u,pixelFormat:c,dataType:d,isImmutable:p,target:f}=h;if(p&&!this._wasImmutablyAllocated)throw new i.A("texture:uninitialized","Cannot update immutable texture before allocation!");(0,m.re)(f)||_().warn("Attempting to set 3D texture data on a non-3D texture");let T=u.bindTexture(this,g.TEXTURE_UNIT_FOR_UPDATES);u.setActiveTexture(g.TEXTURE_UNIT_FOR_UPDATES),(t<0||r<0||a<0||t+n>h.width||r+s>h.height||a+o>h.depth)&&_().error("An attempt to update out of bounds of the texture!"),this._configurePixelStorage();let{gl:x}=u;if((0,m.Qp)(l))l=l.levels[e],x.compressedTexSubImage3D(f,e,t,r,a,n,s,o,h.internalFormat,l);else{let i=l;x.texSubImage3D(f,e,t,r,a,n,s,o,c,d,i)}u.bindTexture(T,g.TEXTURE_UNIT_FOR_UPDATES)}generateMipmap(){let e=this._descriptor;if(0===e.width||0===e.height)return;if(!e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot add mipmaps to immutable texture after allocation");e.hasMipmap=!0,this._samplingModeDirty=!0,(0,m.QE)(e)}9729===e.samplingMode?(this._samplingModeDirty=!0,e.samplingMode=9985):9728===e.samplingMode&&(this._samplingModeDirty=!0,e.samplingMode=9984);let t=this._descriptor.context.bindTexture(this,g.TEXTURE_UNIT_FOR_UPDATES);this._descriptor.context.setActiveTexture(g.TEXTURE_UNIT_FOR_UPDATES),this._descriptor.context.gl.generateMipmap(e.target),this._descriptor.context.bindTexture(t,g.TEXTURE_UNIT_FOR_UPDATES)}clearMipmap(){let e=this._descriptor;if(e.hasMipmap){if(this._wasImmutablyAllocated)throw new i.A("texture:immutable-change","Cannot delete mipmaps to immutable texture after allocation");e.hasMipmap=!1,this._samplingModeDirty=!0,(0,m.QE)(e)}9985===e.samplingMode?(this._samplingModeDirty=!0,e.samplingMode=9729):9984===e.samplingMode&&(this._samplingModeDirty=!0,e.samplingMode=9728)}setSamplingMode(e){e!==this._descriptor.samplingMode&&(this._descriptor.samplingMode=e,this._samplingModeDirty=!0)}setWrapMode(e){e!==this._descriptor.wrapMode&&(this._descriptor.wrapMode=e,(0,m.QE)(this._descriptor),this._wrapModeDirty=!0)}setShadowFiltering(e){e!==this._descriptor.linearFilterDepth&&(this._descriptor.linearFilterDepth=this._descriptor.compareEnabled=e,this.setSamplingMode(e?9729:9728),(0,m.QE)(this._descriptor),this._shadowFilterDirty=!0)}applyChanges(){this._samplingModeDirty&&=(this._applySamplingMode(),!1),this._wrapModeDirty&&=(this._applyWrapMode(),!1),this._shadowFilterDirty&&=(this._applyShadowMode(),!1)}abortCompression(){this._compressionAbortController=(0,s.DC)(this._compressionAbortController)}_setData(e,t){let r=this._descriptor,a=r.context?.gl;if(!a)return;(0,h.Y2)(a),this.hasWebGLTextureObject||(this._glName=a.createTexture(),r.context.instanceCounter.increment(u.vt.Texture,this)),(0,m.QE)(r);let n=r.context.bindTexture(this,g.TEXTURE_UNIT_FOR_UPDATES);r.context.setActiveTexture(g.TEXTURE_UNIT_FOR_UPDATES),this._configurePixelStorage(),(0,h.Y2)(a);let s=t??r.target,o=(0,m.re)(s);if((0,m.Kv)(e))this._setDataFromTexImageSource(e,s);else{let{width:t,height:n,depth:l}=r;if(null==t||null==n)throw new i.A("texture:missing-size","Width and height must be specified!");if(o&&null==l)throw new i.A("texture:missing-depth","Depth must be specified!");if(r.internalFormat=(0,m.mq)(r),r.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(s,r.internalFormat,r.hasMipmap,t,n,l),(0,m.Qp)(e)){if(!(0,m.tl)(r.internalFormat))throw new i.A("texture:format-mismatch","Attempting to use compressed data with an uncompressed format!");this._setDataFromCompressedSource(e,r.internalFormat,s)}else this._texImage(s,0,r.internalFormat,t,n,l,e),(0,h.Y2)(a),r.hasMipmap&&this.generateMipmap()}this._applySamplingMode(),this._applyWrapMode(),this._applyAnisotropicFilteringParameters(),this._applyShadowMode(),(0,h.Y2)(a),r.context.bindTexture(n,g.TEXTURE_UNIT_FOR_UPDATES)}_setDataCubeMap(e=null){for(let t=34069;t<=34074;t++)this._setData(e,t)}_configurePixelStorage(){let e=this._descriptor.context.gl,{unpackAlignment:t,flipped:r,preMultiplyAlpha:i}=this._descriptor;e.pixelStorei(e.UNPACK_ALIGNMENT,t),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,+!!r),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,+!!i)}_setDataFromTexImageSource(e,t){let{gl:r}=this._descriptor.context,i=this._descriptor;i.internalFormat=(0,m.mq)(i);let a=(0,m.re)(t),{width:n,height:s,depth:o}=(0,m.Eo)(e);i.width&&i.height,i.width||=n,i.height||=s,a&&i.depth,a&&(i.depth=o),i.isImmutable&&!this._wasImmutablyAllocated&&this._texStorage(t,i.internalFormat,i.hasMipmap,n,s,o),this._texImage(t,0,i.internalFormat,n,s,o,e),(0,h.Y2)(r),i.hasMipmap&&(this.generateMipmap(),(0,h.Y2)(r))}_setDataFromCompressedSource(e,t,r){let i=this._descriptor,{width:a,height:n,depth:s}=i,o=e.levels,l=(0,m.FV)(r,a,n,s),h=Math.min(l,o.length)-1;this._descriptor.context.gl.texParameteri(i.target,33085,h),this._forEachMipmapLevel((e,i,a,n)=>{let s=o[Math.min(e,o.length-1)];this._compressedTexImage(r,e,t,i,a,n,s)},h)}_texStorage(e,t,r,a,n,s){let{gl:o}=this._descriptor.context;if(!(0,m.tr)(t)&&!(0,m.tl)(t))throw new i.A("texture:missing-format","Immutable textures must have a sized or compressed internal format");if(!this._descriptor.isImmutable)return;let l=r?(0,m.FV)(e,a,n,s):1;if((0,m.re)(e)){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");o.texStorage3D(e,l,t,a,n,s)}else o.texStorage2D(e,l,t,a,n);this._wasImmutablyAllocated=!0}_texImage(e,t,r,a,n,s,o){let l=this._descriptor.context.gl,h=(0,m.re)(e),{isImmutable:u,pixelFormat:c,dataType:d}=this._descriptor;if(u){if(null!=o){let r=o;if(h){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.texSubImage3D(e,t,0,0,0,a,n,s,c,d,r)}else l.texSubImage2D(e,t,0,0,a,n,c,d,r)}}else{let u=o;if(h){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.texImage3D(e,t,r,a,n,s,0,c,d,u)}else l.texImage2D(e,t,r,a,n,0,c,d,u)}}_compressedTexImage(e,t,r,a,n,s,o){let l=this._descriptor.context.gl,h=(0,m.re)(e);if(this._descriptor.isImmutable){if(null!=o)if(h){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.compressedTexSubImage3D(e,t,0,0,0,a,n,s,r,o)}else l.compressedTexSubImage2D(e,t,0,0,a,n,r,o)}else if(h){if(null==s)throw new i.A("texture:missing-depth","Missing depth dimension for 3D texture upload");l.compressedTexImage3D(e,t,r,a,n,s,0,o)}else l.compressedTexImage2D(e,t,r,a,n,0,o)}async _compressOnWorker(e){let{width:t,height:r,context:i,flipped:a,preMultiplyAlpha:n,hasMipmap:s,compress:o}=this._descriptor;if(!o)return;let{compressionTracker:h,compressionCallback:u,preserveSourceBitmap:c}=o,{compressedTextureETC:m,compressedTextureS3TC:d}=i.capabilities;if(!g.compressionWorkerHandle?.isCompressible(e,this._descriptor)||!m&&!d)return;this.abortCompression();let p=new AbortController;this._compressionAbortController=p,h?.increment();let f,T=!1,x=!1;try{e instanceof ImageBitmap?c?(f=await createImageBitmap(e),(0,l.Te)(p),x=!0):f=e:e instanceof Uint8Array?(f=e.buffer,T=this.descriptor.flipped):(f=await createImageBitmap(e,{imageOrientation:a?"flipY":"none"}),(0,l.Te)(p),x=!0);let i={data:f,width:t,height:r,needsFlip:T,components:6408===this._descriptor.pixelFormat?4:3,preMultiplyAlpha:n,isOpaque:this._descriptor.isOpaque,hasMipmap:s,hasETC:!!m,hasS3TC:!!d},o=await g.compressionWorkerHandle.invoke(i,p.signal,1);if((0,l.Te)(p),o.compressedTexture&&this.hasWebGLTextureObject){let e=this.usedMemory;this._descriptor.internalFormat=o.internalFormat,this._setData(o.compressedTexture),u?.(e-this.usedMemory)}}catch(e){(0,l.zf)(e)||_().error("Texture compression failed!")}finally{h?.decrement(),this._compressionAbortController?.signal.aborted&&(this._compressionAbortController=null),x&&f instanceof ImageBitmap&&f.close()}}_forEachMipmapLevel(e,t=1/0){let{width:r,height:a,depth:n,hasMipmap:s,target:o}=this._descriptor,l=32879===o;if(null==r||null==a||l&&null==n)throw new i.A("texture:missing-size","Missing texture dimensions for mipmap calculation");for(let i=0;e(i,r,a,n),s&&(1!==r||1!==a||l&&1!==n)&&!(i>=t);++i)r=Math.max(1,r>>1),a=Math.max(1,a>>1),l&&(n=Math.max(1,n>>1))}_applySamplingMode(){let e=this._descriptor,t=e.context?.gl,r=e.samplingMode,i=e.samplingMode;9985===r||9987===r?(r=9729,e.hasMipmap||(i=9729)):(9984===r||9986===r)&&(r=9728,e.hasMipmap||(i=9728)),t.texParameteri(e.target,t.TEXTURE_MAG_FILTER,r),t.texParameteri(e.target,t.TEXTURE_MIN_FILTER,i),null!=e.maxMipLevel&&t.texParameteri(e.target,t.TEXTURE_MAX_LEVEL,e.maxMipLevel)}_applyWrapMode(){let e=this._descriptor,t=e.context?.gl;"number"==typeof e.wrapMode?(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode)):(t.texParameteri(e.target,t.TEXTURE_WRAP_S,e.wrapMode.s),t.texParameteri(e.target,t.TEXTURE_WRAP_T,e.wrapMode.t))}_applyShadowMode(){let e=this._descriptor,t=e.context?.gl,r=e.compareEnabled?t.COMPARE_REF_TO_TEXTURE:t.NONE;t.texParameteri(e.target,t.TEXTURE_COMPARE_MODE,r),e.compareEnabled&&t.texParameteri(e.target,t.TEXTURE_COMPARE_FUNC,t.GREATER),(0,h.Y2)(t)}_applyAnisotropicFilteringParameters(){let e=this._descriptor,t=e.context.capabilities.textureFilterAnisotropic;t&&e.context.gl.texParameterf(e.target,t.TEXTURE_MAX_ANISOTROPY,e.maxAnisotropy??1)}}},67171(e,t,r){r.d(t,{R:()=>n,e:()=>s});var i=r(63907),a=r(42293);class n{constructor(e=0,t=e){this.width=e,this.height=t,this.type=0,this.target=3553,this.pixelFormat=6408,this.dataType=i.ld.UNSIGNED_BYTE,this.samplingMode=9729,this.wrapMode=10497,this.maxAnisotropy=1,this.flipped=!1,this.hasMipmap=!1,this.isOpaque=!1,this.unpackAlignment=4,this.preMultiplyAlpha=!1,this.compareEnabled=!1,this.linearFilterDepth=!1,this.depth=1,this.isImmutable=!1}}function s(e){return e.width<=0||e.height<=0||e.depth<=0?0:Math.round(e.width*e.height*e.depth*(e.hasMipmap?4/3:1)*(null==e.internalFormat?4:(0,a.MW)(e.internalFormat))*(34067===e.target?6:1))}},42293(e,t,r){r.d(t,{MW:()=>l,wH:()=>o,yu:()=>s});var i=r(94656),a=r(63907);const n=new Set([a.pe.BYTE,a.pe.SHORT,a.pe.INT,a.pe.UNSIGNED_BYTE,a.pe.UNSIGNED_SHORT,a.pe.UNSIGNED_INT]);function s(e,t,r,a=0){let s=e.gl;e.bindBuffer(r);for(let o of r.layout){let r=t.get(o.name);if(null==r){console.warn(`There is no location for vertex attribute '${o.name}' defined.`);continue}let l=a*o.stride;if(o.count<=4)o.integer&&n.has(o.type)?s.vertexAttribIPointer(r,o.count,o.type,o.stride,o.offset+l):s.vertexAttribPointer(r,o.count,o.type,o.normalized,o.stride,o.offset+l),s.enableVertexAttribArray(r),o.divisor>0&&s.vertexAttribDivisor(r,o.divisor);else if(9===o.count)for(let e=0;e<3;e++)s.vertexAttribPointer(r+e,3,o.type,o.normalized,o.stride,o.offset+12*e+l),s.enableVertexAttribArray(r+e),o.divisor>0&&s.vertexAttribDivisor(r+e,o.divisor);else if(16===o.count)for(let e=0;e<4;e++)s.vertexAttribPointer(r+e,4,o.type,o.normalized,o.stride,o.offset+16*e+l),s.enableVertexAttribArray(r+e),o.divisor>0&&s.vertexAttribDivisor(r+e,o.divisor);else console.error("Unsupported vertex attribute element count: "+o.count);if((0,i.en)()){let t=(0,i.u1)(e.gl);t&&console.error(`Unable to bind vertex attribute "${o.name}" with baseInstanceOffset ${l}:`,t,o)}}}function o(e){switch(e){case 6406:case 6409:case 6403:case 36244:case 6402:case 34041:return 1;case 6410:case 33319:case 33320:return 2;case 6407:case 36248:return 3;case 6408:case 36249:return 4}return 0}function l(e){switch(e){case 6406:case 6409:case 6403:case 36244:case a.H0.R8:case a.H0.R8I:case a.H0.R8UI:case a.H0.R8_SNORM:case 36168:return 1;case 6410:case 33319:case 33320:case a.H0.RGBA4:case a.H0.R16F:case a.H0.R16I:case a.H0.R16UI:case a.H0.RG8:case a.H0.RG8I:case a.H0.RG8UI:case a.H0.RG8_SNORM:case a.H0.RGB565:case a.H0.RGB5_A1:case a.SB.DEPTH_COMPONENT16:return 2;case 6407:case 36248:case a.H0.RGB8:case a.H0.RGB8I:case a.H0.RGB8UI:case a.H0.RGB8_SNORM:case a.H0.SRGB8:case a.SB.DEPTH_COMPONENT24:return 3;case 6408:case 36249:case a.H0.RGBA8:case a.H0.R32F:case a.H0.R11F_G11F_B10F:case a.H0.RG16F:case a.H0.R32I:case a.H0.R32UI:case a.H0.RG16I:case a.H0.RG16UI:case a.H0.RGBA8I:case a.H0.RGBA8UI:case a.H0.RGBA8_SNORM:case a.H0.SRGB8_ALPHA8:case a.H0.RGB9_E5:case a.H0.RGB10_A2UI:case a.H0.RGB10_A2:case a.SB.DEPTH_COMPONENT32F:case a.iE.DEPTH24_STENCIL8:return 4;case a.iE.DEPTH32F_STENCIL8:return 5;case a.H0.RGB16F:case a.H0.RGB16I:case a.H0.RGB16UI:return 6;case a.H0.RG32F:case a.H0.RG32I:case a.H0.RG32UI:case a.H0.RGBA16F:case a.H0.RGBA16I:case a.H0.RGBA16UI:return 8;case a.H0.RGB32F:case a.H0.RGB32I:case a.H0.RGB32UI:return 12;case a.H0.RGBA32F:case a.H0.RGBA32I:case a.H0.RGBA32UI:return 16;case a.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT:case a.CQ.COMPRESSED_RGBA_S3TC_DXT1_EXT:return.5;case a.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT:case a.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT:return 1;case a.CQ.COMPRESSED_R11_EAC:case a.CQ.COMPRESSED_SIGNED_R11_EAC:case a.CQ.COMPRESSED_RGB8_ETC2:case a.CQ.COMPRESSED_SRGB8_ETC2:case a.CQ.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:case a.CQ.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:return.5;case a.CQ.COMPRESSED_RG11_EAC:case a.CQ.COMPRESSED_SIGNED_RG11_EAC:case a.CQ.COMPRESSED_RGBA8_ETC2_EAC:case a.CQ.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:return 1}return 0}},94656(e,t,r){r.d(t,{Y2:()=>h,en:()=>l,u1:()=>s});var i=r(49186),a=r(44208),n=r(53966);function s(e){switch(e.getError()){case e.NO_ERROR:return null;case e.INVALID_ENUM:return"Invalid Enum. An unacceptable value has been specified for an enumerated argument.";case e.INVALID_VALUE:return"Invalid Value. A numeric argument is out of range.";case e.INVALID_OPERATION:return"Invalid Operation. The specified command is not allowed for the current state.";case e.INVALID_FRAMEBUFFER_OPERATION:return"Invalid Framebuffer operation. The currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.";case e.OUT_OF_MEMORY:return"Out of memory. Not enough memory is left to execute the command.";case e.CONTEXT_LOST_WEBGL:return"WebGL context has been lost";default:return"Unknown error"}}const o=!!(0,a.A)("enable-feature:webgl-debug");function l(){return o}function h(e,t=l()){if(t){let t=s(e);if(t){let e=Error().stack;n.A.getLogger("esri.views.webgl.checkWebGLError").error(new i.A("webgl-error","WebGL error occurred",{message:t,stack:e}))}}}},12541(e,t,r){r.d(t,{CR:()=>u,Eo:()=>T,FV:()=>g,Kv:()=>p,QE:()=>l,QJ:()=>c,Qp:()=>d,mq:()=>f,re:()=>_,tl:()=>m,tr:()=>h});var i=r(49186),a=r(53966),n=r(93637),s=r(63907);const o=()=>a.A.getLogger("esri/views/webgl/textureUtils");function l(e){let{width:t,height:r,depth:i}=e;(null!=t&&t<0||null!=r&&r<0||null!=i&&i<0)&&o().error("Negative dimension parameters are not allowed!");let{internalFormat:a}=e;if(a&&(u(a)||c(a))){let{linearFilterDepth:t,compareEnabled:r,samplingMode:i,hasMipmap:a}=e;a&&o().error("Depth textures cannot have mipmaps"),t?9729!==i&&9728!==i&&o().error("Depth textures cannot sample mipmaps"):(9728!==i&&o().error("Depth textures without filtering must use NEAREST filtering"),r&&o().error("Depth textures without filtering cannot use compare function"))}}function h(e){return function(e){return s.XN.includes(e)}(e)||u(e)||c(e)}function u(e){return(0,n.a4)(s.SB,e)}function c(e){return(0,n.a4)(s.iE,e)}function m(e){return null!=e&&(0,n.a4)(s.CQ,e)}function d(e){return null!=e&&"type"in e&&"compressed"===e.type}function p(e){return null!=e&&!d(e)&&!function(e){return null!=e&&"byteLength"in e}(e)}function _(e){return 32879===e||35866===e}function g(e,t,r,i=1){let a=Math.max(t,r);return 32879===e&&(a=Math.max(a,i)),Math.floor(Math.log2(a))+1}function f(e){if(null!=e.internalFormat)return e.internalFormat;switch(e.dataType){case s.ld.FLOAT:switch(e.pixelFormat){case 6408:return s.H0.RGBA32F;case 6407:return s.H0.RGB32F;default:throw new i.A("texture:unknown-format","Unable to derive format")}case s.ld.UNSIGNED_BYTE:switch(e.pixelFormat){case 6408:return s.H0.RGBA8;case 6407:return s.H0.RGB8}}let{pixelFormat:t}=e;return e.internalFormat=34041===t?s.iE.DEPTH24_STENCIL8:6402===t?s.SB.DEPTH_COMPONENT24:t,e.internalFormat}function T(e){let t="width"in e?e.width:e.codedWidth,r="height"in e?e.height:e.codedHeight;return e instanceof HTMLVideoElement&&(t=e.videoWidth,r=e.videoHeight),{width:t,height:r,depth:1}}},49788(e,t,r){r.d(t,["Q",0,1/255.5,"v",0,.9960861056751468])}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9855],{82534(t,e,n){function r(){return[0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3]]}n.d(e,{o8:()=>o,vt:()=>r});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:o,create:r,fromValues:function(t,e,n,r){return[t,e,n,r]}},Symbol.toStringTag,{value:"Module"})),n.d(e,["zK",0,i])},48163(t,e,n){function r(){return[0,0]}function o(t){return[t[0],t[1]]}function i(t,e){return[t,e]}function u(){return i(1,1)}function a(){return i(-1,-1)}function s(){return i(1,0)}function l(){return i(0,1)}n.d(e,{fA:()=>i,o8:()=>o,vt:()=>r});const c=u(),f=a(),h=s(),M=l();Object.freeze(Object.defineProperty({__proto__:null,NEGATIVE_ONES:f,ONES:c,UNIT_X:h,UNIT_Y:M,ZEROS:[0,0],clone:o,create:r,freeze:function(t,e){return[t,e]},fromArray:function(t,e=[0,0]){let n=Math.min(2,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e},fromValues:i,negativeOnes:a,ones:u,unitX:s,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"})),n.d(e,["IA",0,f,"Un",0,c])},91829(t,e,n){function r(){return[0,0,0,0]}function o(t,e,n,r){return[t,e,n,r]}function i(){return o(1,1,1,1)}function u(){return o(1,0,0,0)}function a(){return o(0,1,0,0)}function s(){return o(0,0,1,0)}function l(){return o(0,0,0,1)}n.d(e,{_Y:()=>l,fA:()=>o,vt:()=>r});const c=[0,0,0,0],f=i(),h=u(),M=a(),m=s(),g=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:f,UNIT_W:g,UNIT_X:h,UNIT_Y:M,UNIT_Z:m,ZEROS:c,clone:function(t){return[t[0],t[1],t[2],t[3]]},create:r,freeze:function(t,e,n,r){return[t,e,n,r]},fromArray:function(t,e=[0,0,0,0]){let n=Math.min(4,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e},fromValues:o,ones:i,unitW:l,unitX:u,unitY:a,unitZ:s,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"})),n.d(e,["Un",0,f,"uY",0,c])},67026(t,e,n){n.d(e,{A6:()=>g,Xd:()=>c,Xr:()=>M,lw:()=>f,x8:()=>l});var r=n(29242),o=n(82534),i=n(51850),u=n(34304),a=n(35522),s=n(78955);function l(t,e,n){n*=.5;let r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function c(t,e){let n=2*Math.acos(e[3]),r=Math.sin(n/2);return r>(0,u.FD)()?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),n}function f(t,e,n){let r=e[0],o=e[1],i=e[2],u=e[3],a=n[0],s=n[1],l=n[2],c=n[3];return t[0]=r*c+u*a+o*l-i*s,t[1]=o*c+u*s+i*a-r*l,t[2]=i*c+u*l+r*s-o*a,t[3]=u*c-r*a-o*s-i*l,t}function h(t,e,n,r){let o,i,a,s,l,c=e[0],f=e[1],h=e[2],M=e[3],m=n[0],g=n[1],p=n[2],v=n[3];return i=c*m+f*g+h*p+M*v,i<0&&(i=-i,m=-m,g=-g,p=-p,v=-v),1-i>(0,u.FD)()?(o=Math.acos(i),a=Math.sin(o),s=Math.sin((1-r)*o)/a,l=Math.sin(r*o)/a):(s=1-r,l=r),t[0]=s*c+l*m,t[1]=s*f+l*g,t[2]=s*h+l*p,t[3]=s*M+l*v,t}function M(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function m(t,e){let n,r=e[0]+e[4]+e[8];if(r>0)n=Math.sqrt(r+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{let r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);let o=(r+1)%3,i=(r+2)%3;n=Math.sqrt(e[3*r+r]-e[3*o+o]-e[3*i+i]+1),t[r]=.5*n,n=.5/n,t[3]=(e[3*o+i]-e[3*i+o])*n,t[o]=(e[3*o+r]+e[3*r+o])*n,t[i]=(e[3*i+r]+e[3*r+i])*n}return t}function g(t,e,n,r){let o=.5*Math.PI/180;e*=o,n*=o,r*=o;let i=Math.sin(e),u=Math.cos(e),a=Math.sin(n),s=Math.cos(n),l=Math.sin(r),c=Math.cos(r);return t[0]=i*s*c-u*a*l,t[1]=u*a*c+i*s*l,t[2]=u*s*l-i*a*c,t[3]=u*s*c+i*a*l,t}const p=s.C,v=s.hZ,d=s.WQ,y=f,_=s.hs,A=s.Om,w=s.Cc,b=s.Bw,O=b,S=s.m3,I=S,x=s.S8,N=s.t2,Z=s.aI,q=(0,i.vt)(),T=(0,i.fA)(1,0,0),C=(0,i.fA)(0,1,0),X=(0,o.vt)(),P=(0,o.vt)(),E=(0,r.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:d,calculateW:function(t,e){let n=e[0],r=e[1],o=e[2];return t[0]=n,t[1]=r,t[2]=o,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-o*o)),t},conjugate:M,copy:p,dot:A,equals:Z,exactEquals:N,fromEuler:g,fromMat3:m,getAxisAngle:c,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){let n=e[0],r=e[1],o=e[2],i=e[3],u=n*n+r*r+o*o+i*i,a=u?1/u:0;return t[0]=-n*a,t[1]=-r*a,t[2]=-o*a,t[3]=i*a,t},len:O,length:b,lerp:w,mul:y,multiply:f,normalize:x,random:function(t){let e=u.Ov,n=e(),r=e(),o=e(),i=Math.sqrt(1-n),a=Math.sqrt(n);return t[0]=i*Math.sin(2*Math.PI*r),t[1]=i*Math.cos(2*Math.PI*r),t[2]=a*Math.sin(2*Math.PI*o),t[3]=a*Math.cos(2*Math.PI*o),t},rotateX:function(t,e,n){n*=.5;let r=e[0],o=e[1],i=e[2],u=e[3],a=Math.sin(n),s=Math.cos(n);return t[0]=r*s+u*a,t[1]=o*s+i*a,t[2]=i*s-o*a,t[3]=u*s-r*a,t},rotateY:function(t,e,n){n*=.5;let r=e[0],o=e[1],i=e[2],u=e[3],a=Math.sin(n),s=Math.cos(n);return t[0]=r*s-i*a,t[1]=o*s+u*a,t[2]=i*s+r*a,t[3]=u*s-o*a,t},rotateZ:function(t,e,n){n*=.5;let r=e[0],o=e[1],i=e[2],u=e[3],a=Math.sin(n),s=Math.cos(n);return t[0]=r*s+o*a,t[1]=o*s-r*a,t[2]=i*s+u*a,t[3]=u*s-i*a,t},rotationTo:function(t,e,n){let r=(0,a.Om)(e,n);return r<-.999999?((0,a.$A)(q,T,e),(0,a.Il)(q)<1e-6&&(0,a.$A)(q,C,e),(0,a.S8)(q,q),l(t,q,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,a.$A)(q,e,n),t[0]=q[0],t[1]=q[1],t[2]=q[2],t[3]=1+r,x(t,t))},scale:_,set:v,setAxes:function(t,e,n,r){let o=E;return o[0]=n[0],o[3]=n[1],o[6]=n[2],o[1]=r[0],o[4]=r[1],o[7]=r[2],o[2]=-e[0],o[5]=-e[1],o[8]=-e[2],x(t,m(t,o))},setAxisAngle:l,slerp:h,sqlerp:function(t,e,n,r,o,i){return h(X,e,o,i),h(P,n,r,i),h(t,X,P,2*i*(1-i)),t},sqrLen:I,squaredLength:S,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"})),n.d(e,["hZ",0,v,"t2",0,N])},48353(t,e,n){n.d(e,{l:()=>l});var r=n(34727),o=n(58083),i=n(51850);function u(t,e,n){let r=Math.sin(t),o=Math.cos(t),i=Math.sin(e),u=Math.cos(e),a=n;return a[0]=-r,a[4]=-i*o,a[8]=u*o,a[12]=0,a[1]=o,a[5]=-i*r,a[9]=u*r,a[13]=0,a[2]=0,a[6]=u,a[10]=i,a[14]=0,a[3]=0,a[7]=0,a[11]=0,a[15]=1,a}var a=n(37539),s=n(21325);function l(t,e,n,r){let i=(0,a.Tp)(t,r);if(null==i)return!1;let l=i.source.spatialReferenceId,m=i.dest.spatialReferenceId;if(l===m&&!c(m)&&(0!==l||(0,s.aI)(t,r)))return(0,o.kN)(n,e),!0;if(c(m)){let t=a.w5[l][10],r=a.w5[10][m];return null!=t&&null!=r&&(t(e,0,h,0),r(h,0,M,0),u(f*h[0],f*h[1],n),n[12]=M[0],n[13]=M[1],n[14]=M[2],!0)}let g=c(l);if((3===m||11===m||2===m||5===m)&&(2===l||g||3===l||5===l)){let t=a.w5[l][10],r=a.w5[10][m];return null!=t&&null!=r&&(t(e,0,h,0),r(h,0,M,0),g?function(t,e,n){u(t,e,n),(0,o.mg)(n,n)}(f*h[0],f*h[1],n):(0,o.D_)(n),n[12]=M[0],n[13]=M[1],n[14]=M[2],!0)}return!1}function c(t){return 1===t||6===t||8===t||4===t}const f=(0,r.kU)(1),h=(0,i.vt)(),M=(0,i.vt)()},65806(t,e,n){n.d(e,{g:()=>u});var r=n(51850),o=n(99917),i=n(9762);function u(t,e,n,r){if((0,o.canProjectWithoutEngine)(t.spatialReference,n))return a[0]=t.x,a[1]=t.y,a[2]=t.z??0,(0,i.projectBuffer)(a,t.spatialReference,0,e,n,0);let u=(0,o.tryProject)(t,n,r);return!!u&&(e[0]=u.x,e[1]=u.y,e[2]=u.z??0,!0)}const a=(0,r.vt)()},73836(t,e,n){n.d(e,{A:()=>M});var r=n(32198),o=n(69540),i=n(25482),u=n(91429),a=n(58083),s=n(9093),l=n(67026),c=n(82534),f=n(51850),h=n(24770);let M=class extends((0,o.OU)(i.o)){constructor(t){super(t),this.translation=(0,f.vt)(),this.rotationAxis=(0,f.ci)(h.up),this.rotationAngle=0,this.scale=(0,f.fA)(1,1,1)}get rotation(){return(0,h.i4)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,f.o8)((0,h.yo)(t)),this.rotationAngle=(0,h.g7)(t)}get localMatrix(){let t=(0,s.vt)();return(0,l.x8)(m,(0,h.yo)(this.rotation),(0,h.$I)(this.rotation)),(0,a.o1)(t,m,this.translation,this.scale),t}get localMatrixInverse(){return(0,a.B8)((0,s.vt)(),this.localMatrix)}equals(t){return this===t||null!=t&&(0,a.t2)(this.localMatrix,t.localMatrix)}};(0,r.Cg)([(0,u.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],M.prototype,"translation",void 0),(0,r.Cg)([(0,u.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],M.prototype,"rotationAxis",void 0),(0,r.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],M.prototype,"rotationAngle",void 0),(0,r.Cg)([(0,u.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],M.prototype,"scale",void 0),(0,r.Cg)([(0,u.MZ)()],M.prototype,"rotation",null),(0,r.Cg)([(0,u.MZ)()],M.prototype,"localMatrix",null),(0,r.Cg)([(0,u.MZ)()],M.prototype,"localMatrixInverse",null),M=(0,r.Cg)([(0,u.$K)("esri.geometry.support.MeshTransform")],M);const m=(0,c.vt)()},24770(t,e,n){n.d(e,{$I:()=>p,AU:()=>M,g7:()=>g,i4:()=>c,ui:()=>f,vt:()=>l,yo:()=>m});var r=n(34727),o=n(58083),i=n(67026),u=n(82534),a=n(35522),s=n(51850);function l(t=d){return[t[0],t[1],t[2],t[3]]}function c(t,e,n=l()){return(0,a.C)(n,t),n[3]=e,n}function f(t,e=l()){let n=(0,o.l)(y,t);return v(e,(0,r.KJ)((0,i.Xd)(e,n))),e}function h(t,e,n=l()){return(0,i.x8)(y,t,p(t)),(0,i.x8)(_,e,p(e)),(0,i.lw)(y,_,y),v(n,(0,r.KJ)((0,i.Xd)(n,y)))}function M(t,e,n,r=l()){return c(s.Cw,t,A),c(s.JP,e,w),c(s.Cb,n,b),h(A,w,A),h(A,b,r),r}function m(t){return t}function g(t){return t[3]}function p(t){return(0,r.kU)(t[3])}function v(t,e){return t[3]=e,t}const d=[0,0,1,0],y=(0,u.vt)(),_=(0,u.vt)(),A=(l(),l()),w=l(),b=l();n.d(e,["up",0,d])},27921(t,e,n){n.d(e,{$Q:()=>w,BX:()=>A,C:()=>l,Cr:()=>M,H:()=>O,LV:()=>s,O_:()=>h,Qj:()=>c,T7:()=>d,Ui:()=>v,_I:()=>S,fA:()=>f,gv:()=>y,mN:()=>I,mP:()=>g,mR:()=>p,vE:()=>Z,vt:()=>a,wE:()=>x});var r=n(34727),o=n(35522),i=n(51850),u=(n(78955),n(44280),n(32114));function a(t=q){return[t[0],t[1],t[2],t[3]]}function s(t=q[0],e=q[1],n=q[2],r=q[3]){return f(t,e,n,r,u.Km.get())}function l(t,e){return f(e[0],e[1],e[2],e[3],t)}function c(t){return t}function f(t,e,n,r,o=a()){return o[0]=t,o[1]=e,o[2]=n,o[3]=r,o}function h(t,e,n){let r=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],o=Math.abs(r-1)>1e-5&&r>1e-12?1/Math.sqrt(r):1;return n[0]=e[0]*o,n[1]=e[1]*o,n[2]=e[2]*o,n[3]=-(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]),n}function M(t,e,n,r=a()){let o=n[0]-e[0],i=n[1]-e[1],u=n[2]-e[2],s=t[0]-e[0],l=t[1]-e[1],c=t[2]-e[2],f=i*c-u*l,h=u*s-o*c,M=o*l-i*s,m=f*f+h*h+M*M,g=Math.abs(m-1)>1e-5&&m>1e-12?1/Math.sqrt(m):1;return r[0]=f*g,r[1]=h*g,r[2]=M*g,r[3]=-(r[0]*t[0]+r[1]*t[1]+r[2]*t[2]),r}n(32728),(0,i.vt)(),(0,i.vt)();const m=(0,i.vt)();function g(t,e,n){return e!==t&&l(t,e),t[3]=-(0,o.Om)(t,n),t}function p(t,e,n,r){return(0,o.$A)(m,e,t),h(n,m,r)}function v(t,e,n){return null!=e&&N(Z(t,e.origin,e.direction,T,n))}function d(t,e,n){return N(Z(t,e.origin,e.vector,0,n))}function y(t,e,n){return N(Z(t,e.origin,e.vector,1,n))}function _(t,e){return I(t,e)<=0}function A(t,e){return I(t,e)>=0}function w(t,e){return function(t,e,n,r,i,u,a,s){let l=(0,o.Om)(t,n),c=I(t,e);if(l>=-s&&l<=s)return b(c,i,u);let f=-c/l,h=b(l,i,!1);return!(a&&!h&&!b(c,i,u))&&(h?f>r.c0&&(r.c0=f):f<r.c1&&(r.c1=f),r.c0<=r.c1)}(t,e.ray.origin,e.ray.direction,e,!1,!1,!0,1e-6)}function b(t,e,n){return n?e?t>=0:t<=0:e?t>0:t<0}function O(t,e,n,r=!1){let i=e.at(-1),u=I(t,i),a=r?u>0:u<=0;for(let s=0;s<e.length;s++){let l=e.at(s),c=I(t,l),f=r?c>0:c<=0;a!==f&&(0,o.Cc)(n(),i,l,u/(u-c)),f&&(0,o.C)(n(),l),i=l,u=c,a=f}}function S(t,e,n){let r=(0,o.hs)(u.rq.get(),t,-t[3]),i=function(t,e,n){let r=(0,o.hs)(u.rq.get(),t,(0,o.Om)(t,e));return(0,o.Re)(n,e,r),n}(t,(0,o.Re)(u.rq.get(),e,r),u.rq.get());return(0,o.WQ)(n,i,r),n}function I(t,e){return(0,o.Om)(t,e)+t[3]}function x(t,e,n){for(let r=0;r<n;++r)if(_(t,e[r]))return!1;return!0}function N(t){return 0===t||1===t}function Z(t,e,n,i,u){let a=(0,o.Om)(t,n),s=I(t,e);if(0===a)return s>=0?2:3;let l=-s/a;return 1&i&&(l=(0,r.qE)(l,0,1)),!(4&i)&&l<0||!(8&i)&&l>1?s>=0?2:3:((0,o.WQ)(u,e,(0,o.hs)(u,n,l)),s>=0?0:1)}(0,i.vt)(),(0,i.vt)();const q=[0,0,1,0],T=8;(0,i.vt)()},44280(t,e,n){n.d(e,{g7:()=>a,gr:()=>u});var r=n(34727),o=n(35522),i=n(51850);function u(t,e){return(0,o.Om)(t,e)/(0,o.Bw)(t)}function a(t,e){let n=(0,o.Om)(t,e)/((0,o.Bw)(t)*(0,o.Bw)(e));return-(0,r.XM)(n)}(0,i.vt)(),(0,i.vt)()},32114(t,e,n){n.d(e,{Rc:()=>M,rq:()=>f,Km:()=>h}),n(44208);var r=n(26390),o=n(29242),i=n(9093),u=n(82534),a=n(48163),s=n(51850),l=n(91829);class c{constructor(t){this._create=t,this._items=[],this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,r.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){let t=2*this._itemsPtr;this._items.length>t&&(this._items.length=t),this._itemsPtr=0}static createVec2f64(){return new c(a.vt)}static createVec3f64(){return new c(s.vt)}static createVec4f64(){return new c(l.vt)}static createMat3f64(){return new c(o.vt)}static createMat4f64(){return new c(i.vt)}static createQuatf64(){return new c(u.vt)}get test(){}}c.createVec2f64();const f=c.createVec3f64(),h=c.createVec4f64(),M=(c.createMat3f64(),c.createMat4f64());c.createQuatf64()},77793(t,e,n){n.d(e,{V:()=>i,f:()=>u});var r=n(86738),o=n(73836);function i(t,e,n=a){return new r.A({x:t[n.originX],y:t[n.originY],z:t[n.originZ],spatialReference:e})}function u(t,e=a){return new o.A({translation:[t[e.translationX],-t[e.translationZ],t[e.translationY]],rotationAxis:[t[e.rotationX],-t[e.rotationZ],t[e.rotationY]],rotationAngle:t[e.rotationDeg],scale:[t[e.scaleX],t[e.scaleZ],t[e.scaleY]]})}const a={originX:"originX",originY:"originY",originZ:"originZ",translationX:"translationX",translationY:"translationY",translationZ:"translationZ",scaleX:"scaleX",scaleY:"scaleY",scaleZ:"scaleZ",rotationX:"rotationX",rotationY:"rotationY",rotationZ:"rotationZ",rotationDeg:"rotationDeg"}},40050(t,e,n){n.r(e),n.d(e,{assetMapFromAssetMapsJSON:()=>p,extractMesh:()=>g,meshFeatureSetFromJSON:()=>m});var r=n(52106),o=n(53966),i=n(91869),u=n(5443),a=n(16930),s=n(98331),l=n(63579),c=n(20557),f=n(22671),h=n(77793);const M=()=>o.A.getLogger("esri.rest.support.meshFeatureSet");function m(t,e,n){let o=n.features;n.features=[],delete n.geometryType;let i=f.A.fromJSON(n);if(i.geometryType="mesh",!n.assetMaps)return i;let u=p(e,n.assetMaps),s=t.sourceSpatialReference??a.A.WGS84,l=n.globalIdFieldName,{outFields:c}=t,h=null!=c&&c.length>0?(M=c.includes("*")?null:new Set(c),({attributes:t})=>{if(!t)return{};if(!M)return t;for(let e in t)M.has(e)||delete t[e];return t}):()=>({});var M;for(let t of o){let n=g(t,l,s,e,u);i.features.push(new r.A({geometry:n,attributes:h(t)}))}return i}function g(t,e,n,r,o){let i=t.attributes[e],a=o.get(i);if(null==a||!t.geometry)return null;let c=(0,h.V)(t.attributes,n,r.transformFieldRoles),f=u.A.fromJSON(t.geometry);f.spatialReference=n;let M=(0,h.f)(t.attributes,r.transformFieldRoles),m=n.isGeographic?"local":"georeferenced",g=function(t){let e=Array.from(t.files.values()),n=[];for(let t of e){if(2!==t.status)return null;let e=[];for(let n of t.parts){if(!n)return null;e.push(new l.Bq(n.url,n.hash))}n.push(new l.Qp(t.name,t.mimeType,e))}return{type:"service",assets:n}}(a);return g?(0,s.createWithExternalSource)(c,g,{extent:f,transform:M,vertexSpace:m,unitConversionDisabled:!0}):(0,s.H5)(c,{transform:M,vertexSpace:m})}function p(t,e){let n=new Map;for(let r of e){let e=r.parentGlobalId;if(null==e)continue;let o=r.assetName,u=r.assetType,a=r.assetHash,s=r.assetURL,l=r.conversionStatus,f=r.seqNo,h=(0,c.Fm)(u,t.supportedFormats);if(!h){M().error("mesh-feature-set:unknown-format",`Service returned an asset of type ${u}, but it does not list it as a supported type`);continue}let m=(0,i.tE)(n,e,()=>({files:new Map}));(0,i.tE)(m.files,o,()=>({name:o,type:u,mimeType:h,status:v(l),parts:[]})).parts[f]={hash:a,url:s}}return n}function v(t){switch(t){case"COMPLETED":case"SUBMITTED":return 2;case"INPROGRESS":return 1;default:return 0}}},32728(t,e,n){n.d(e,{YH:()=>u,nu:()=>a,wp:()=>i}),n(34727);var r=n(35522),o=n(51850);function i(t,e){let n=Math.sqrt(e[0]*e[0]+e[4]*e[4]+e[8]*e[8]),o=Math.sqrt(e[1]*e[1]+e[5]*e[5]+e[9]*e[9]),i=Math.sqrt(e[2]*e[2]+e[6]*e[6]+e[10]*e[10]);return(0,r.hZ)(t,n,o,i),t}function u(t,e,n){n||=t;let o=(0,r.Om)(t,e);(0,r.hZ)(n,t[0]-o*e[0],t[1]-o*e[1],t[2]-o*e[2]),(0,r.S8)(n,n)}function a(t,e,n,i=(0,o.vt)()){let u=(0,r.Bw)(t),a=(0,r.Bw)(e),c=(0,r.Om)(t,e)/(u*a);if(c<.9999999999999999){let o=Math.acos(c),f=((1-n)*u+n*a)/Math.sin(o),h=f/u*Math.sin((1-n)*o),M=f/a*Math.sin(n*o);return(0,r.hs)(s,t,h),(0,r.hs)(l,e,M),(0,r.WQ)(i,s,l)}return(0,r.Cc)(i,t,e,n)}(0,o.vt)(),(0,o.vt)(),(0,o.vt)();const s=(0,o.vt)(),l=(0,o.vt)()}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[77],{11006(t,e,n){function i(t,e,n,i,a){r(t,e,n||0,i||t.length-1,a||o)}function r(t,e,n,i,o){for(;i>n;){if(i-n>600){var l=i-n+1,s=e-n+1,h=Math.log(l),c=.5*Math.exp(2*h/3),u=.5*Math.sqrt(h*c*(l-c)/l)*(s-l/2<0?-1:1);r(t,e,Math.max(n,Math.floor(e-s*c/l+u)),Math.min(i,Math.floor(e+(l-s)*c/l+u)),o)}var m=t[e],f=n,p=i;for(a(t,n,e),o(t[i],m)>0&&a(t,n,i);f<p;){for(a(t,f,p),f++,p--;o(t[f],m)<0;)f++;for(;o(t[p],m)>0;)p--}0===o(t[n],m)?a(t,n,p):a(t,++p,i),p<=e&&(n=p+1),e<=p&&(i=p-1)}}function a(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function o(t,e){return t<e?-1:+(t>e)}n.d(e,{q:()=>i})},4341(t,e,n){n.d(e,{I:()=>r});var i=n(26390);class r{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){let t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*a);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,a));t++)this._items.push(this._allocator())}}const a=1024},75503(t,e,n){n.d(e,{wq:()=>l});var i=n(4576),r=n(21818),a=(n(44208),n(15142)),o=n(11006);class l{constructor(t=9,e){this._compareMinX=m,this._compareMinY=f,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),X.prune(),Y.prune(),w.prune(),B.prune()}all(t){s(this._data,t)}search(t,e){let n=this._data,i=this._toBBox;if(v(t,n))for(X.clear();n;){for(let r=0,a=n.children.length;r<a;r++){let a=n.children[r],o=n.leaf?i(a):a;v(t,o)&&(n.leaf?e(a):g(t,o)?s(a,e):X.push(a))}n=X.pop()}}collides(t){let e=this._data,n=this._toBBox;if(!v(t,e))return!1;for(X.clear();e;){for(let i=0,r=e.children.length;i<r;i++){let r=e.children[i],a=e.leaf?n(r):r;if(v(t,a)){if(e.leaf||g(t,a))return!0;X.push(r)}}e=X.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,n=t.length;e<n;e++)this.insert(t[e]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){let t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new y([]),this}remove(t){if(!t)return this;let e,n=this._data,a=null,o=0,l=!1,s=this._toBBox(t);for(w.clear(),B.clear();n||w.length>0;){if(n||(n=w.pop(),a=w.data[w.length-1],o=B.pop()??0,l=!0),n.leaf&&(e=(0,i.qh)(n.children,(0,r.z)(t),n.children.length,n.indexHint),-1!==e))return n.children.splice(e,1),w.push(n),this._condense(w),this;l||n.leaf||!g(n,s)?a?(o++,n=a.children[o],l=!1):n=null:(w.push(n),B.push(o),o=0,a=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_build(t,e,n,i){let r=n-e+1,a=this._maxEntries;if(r<=a){let i=new y(t.slice(e,n+1));return h(i,this._toBBox),i}i||(i=Math.ceil(Math.log(r)/Math.log(a)),a=Math.ceil(r/a**(i-1)));let o=new b([]);o.height=i;let l=Math.ceil(r/a),s=l*Math.ceil(Math.sqrt(a));M(t,e,n,s,this._compareMinX);for(let r=e;r<=n;r+=s){let e=Math.min(r+s-1,n);M(t,r,e,l,this._compareMinY);for(let n=r;n<=e;n+=l){let r=Math.min(n+l-1,e);o.children.push(this._build(t,n,r,i-1))}}return h(o,this._toBBox),o}_insert(t,e,n){let i=this._toBBox,r=n?t:i(t);w.clear();let a=function(t,e,n,i){for(;i.push(e),!0!==e.leaf&&i.length-1!==n;){let n,i=1/0,r=1/0;for(let a=0,o=e.children.length;a<o;a++){let o=e.children[a],l=p(o),s=x(t,o)-l;s<r?(r=s,i=l<i?l:i,n=o):s===r&&l<i&&(i=l,n=o)}e=n||e.children[0]}return e}(r,this._data,e,w);for(a.children.push(t),u(a,r);e>=0&&w.data[e].children.length>this._maxEntries;)this._split(w,e),e--;!function(t,e,n){for(let i=n;i>=0;i--)u(e.data[i],t)}(r,w,e)}_split(t,e){let n=t.data[e],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);let a=this._chooseSplitIndex(n,r,i);if(!a)return;let o=n.children.splice(a,n.children.length-a),l=n.leaf?new y(o):new b(o);l.height=n.height,h(n,this._toBBox),h(l,this._toBBox),e?t.data[e-1].children.push(l):this._splitRoot(n,l)}_splitRoot(t,e){this._data=new b([t,e]),this._data.height=t.height+1,h(this._data,this._toBBox)}_chooseSplitIndex(t,e,n){let i,r,a;i=r=1/0;for(let o=e;o<=n-e;o++){let e=c(t,0,o,this._toBBox),l=c(t,o,n,this._toBBox),s=_(e,l),h=p(e)+p(l);s<i?(i=s,a=o,r=h<r?h:r):s===i&&h<r&&(r=h,a=o)}return a}_chooseSplitAxis(t,e,n){let i=t.leaf?this._compareMinX:m,r=t.leaf?this._compareMinY:f;this._allDistMargin(t,e,n,i)<this._allDistMargin(t,e,n,r)&&t.children.sort(i)}_allDistMargin(t,e,n,i){t.children.sort(i);let r=this._toBBox,a=c(t,0,e,r),o=c(t,n-e,n,r),l=d(a)+d(o);for(let i=e;i<n-e;i++){let e=t.children[i];u(a,t.leaf?r(e):e),l+=d(a)}for(let i=n-e-1;i>=e;i--){let e=t.children[i];u(o,t.leaf?r(e):e),l+=d(o)}return l}_condense(t){for(let e=t.length-1;e>=0;e--){let n=t.data[e];if(0===n.children.length)if(e>0){let r=t.data[e-1],a=r.children;a.splice((0,i.qh)(a,n,a.length,r.indexHint),1)}else this.clear();else h(n,this._toBBox)}}_initFormat(t){let e=["return a"," - b",";"];this._compareMinX=Function("a","b",e.join(t[0])),this._compareMinY=Function("a","b",e.join(t[1])),this._toBBox=Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function s(t,e){let n=t;for(Y.clear();n;){if(!0===n.leaf)for(let t of n.children)e((0,r.z)(t));else Y.pushArray(n.children);n=Y.pop()??null}}function h(t,e){c(t,0,t.children.length,e,t)}function c(t,e,n,i,r){r||=new y([]),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let a,o=e;o<n;o++)a=t.children[o],u(r,t.leaf?i(a):a);return r}function u(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function m(t,e){return t.minX-e.minX}function f(t,e){return t.minY-e.minY}function p(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function d(t){return t.maxX-t.minX+(t.maxY-t.minY)}function x(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function _(t,e){let n=Math.max(t.minX,e.minX),i=Math.max(t.minY,e.minY),r=Math.min(t.maxX,e.maxX),a=Math.min(t.maxY,e.maxY);return Math.max(0,r-n)*Math.max(0,a-i)}function g(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function v(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function M(t,e,n,i,r){let a=[e,n];for(;a.length;){let e=a.pop(),n=a.pop();if(e-n<=i)continue;let l=n+Math.ceil((e-n)/i/2)*i;(0,o.q)(t,l,n,e,r),a.push(n,l,l,e)}}const X=new a.A,Y=new a.A,w=new a.A,B=new a.A({deallocator:void 0});class A{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class R extends A{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class y extends R{constructor(t){super(),this.children=t,this.leaf=!0}}class b extends R{constructor(t){super(),this.children=t,this.leaf=!1}}},83027(t,e,n){const i=n(29953).ho;n.d(e,["h",0,i])},11964(t,e,n){n.d(e,{Cr:()=>c,H6:()=>f,LV:()=>h,_I:()=>m,kb:()=>u,vt:()=>s});var i=n(34727),r=n(4341),a=n(35522),o=n(51850),l=n(32114);function s(t){return t?{origin:(0,o.o8)(t.origin),vector:(0,o.o8)(t.vector)}:{origin:(0,o.vt)(),vector:(0,o.vt)()}}function h(t,e){let n=p.get();return n.origin=t,n.vector=e,n}function c(t,e,n=s()){return(0,a.C)(n.origin,t),(0,a.Re)(n.vector,e,t),n}function u(t,e){let n=(0,a.Re)(l.rq.get(),e,t.origin),r=(0,a.Om)(t.vector,n),o=(0,a.Om)(t.vector,t.vector);if(Math.abs(o)<d)return(0,a.hG)(t.origin,e);let s=(0,i.qE)(r/o,0,1),h=(0,a.Re)(l.rq.get(),(0,a.hs)(l.rq.get(),t.vector,s),n);return(0,a.Om)(h,h)}function m(t,e,n){return f(t,e,0,1,n)}function f(t,e,n,r,o){let{vector:s,origin:h}=t,c=(0,a.Re)(l.rq.get(),e,h),u=(0,a.Om)(s,c)/(0,a.m3)(s);return(0,a.hs)(o,s,(0,i.qE)(u,n,r)),(0,a.WQ)(o,o,t.origin)}(0,o.vt)(),(0,o.vt)();const p=new r.I(()=>s()),d=1e-9},38419(t,e,n){n.r(e),n.d(e,{default:()=>l});var i=n(44208),r=n(75503),a=n(95696),o=n(72258);class l{async createIndex(t,e){if(!t.vertexAttributes?.position)return new r.wq;let n=function(t){let{vertexAttributes:{position:e},vertexSpace:n,spatialReference:i,transform:r}=t,l=(0,o.UR)({vertexAttributes:{position:e},vertexSpace:n,spatialReference:i,transform:r},a.A.absolute,{allowBufferReuse:!0})?.position;return l?!t.components||t.components.some(t=>!t.faces)?{position:l.buffer}:{position:l.buffer,components:t.components.map(t=>t.faces)}:null}(t),i=null==e?this.createIndexThread(n).result:await e.invoke("createIndexThread",n,{transferList:[]});return s().fromJSON(i)}createIndexThread(t){let e=s();if(!t)return{result:e.toJSON()};let n=new Float64Array(t.position);return t.components?function(t,e,n){let i=0;for(let t of n)i+=t.length/3;let r=Array(i),a=0;for(let t of n)for(let n=0;n<t.length;n+=3)r[a++]=h(e,3*t[n],3*t[n+1],3*t[n+2]);return t.load(r),{result:t.toJSON()}}(e,n,t.components.map(t=>new Uint32Array(t))):function(t,e){let n=Array(e.length/9),i=0;for(let t=0;t<e.length;t+=9)n[i++]=h(e,t,t+3,t+6);return t.load(n),{result:t.toJSON()}}(e,n)}}function s(){return new r.wq(9,(0,i.A)("esri-csp-restrictions")?t=>t:[".minX",".minY",".maxX",".maxY"])}function h(t,e,n,i){return{minX:Math.min(t[e],t[n],t[i]),maxX:Math.max(t[e],t[n],t[i]),minY:Math.min(t[e+1],t[n+1],t[i+1]),maxY:Math.max(t[e+1],t[n+1],t[i+1]),p0:[t[e],t[e+1],t[e+2]],p1:[t[n],t[n+1],t[n+2]],p2:[t[i],t[i+1],t[i+2]]}}},60077(t,e,n){n.d(e,{create:()=>u});var i=n(32198),r=n(83027),a=n(91429),o=n(51850),l=n(71351),s=n(48295),h=n(38419),c=n(7236);async function u(t,e){let n=await(++p,x&&=(clearTimeout(x),0),d||(d=(0,r.h)("ElevationSamplerWorker").catch(()=>null),d)),i=await f.createIndex(t,n);!function(t){--p,null!=t&&0===p&&(x=setTimeout(()=>{t.close(),d=null,x=0},_))}(n);let a=t.spatialReference,o=t.extent.clone();return new m({spatialReference:a,extent:o,noDataValue:e?.noDataValue||0,rindex:i})}let m=class extends c.A{constructor(t){super(t),this.demResolution={min:0,max:0}}elevationAt(t,e){let n=-1/0;return(0,l.fA)([t,e,0],[0,0,-1],g),this.rindex.search({minX:t,maxX:t,minY:e,maxY:e},t=>{(0,s.Ui)(t,g,v)&&v[2]>n&&(n=v[2])}),n===-1/0?this.noDataValue:n}};(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],m.prototype,"spatialReference",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],m.prototype,"extent",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],m.prototype,"noDataValue",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],m.prototype,"rindex",void 0),m=(0,i.Cg)([(0,a.$K)("esri.geometry.support.meshUtils.elevationSampler")],m);const f=new h.default;let p=0,d=null,x=0;const _=1e4,g=(0,l.fA)([0,0,0],[0,0,-1]),v=(0,o.vt)()},71351(t,e,n){n.d(e,{C:()=>u,Cr:()=>m,LV:()=>c,fA:()=>f,kb:()=>p,vt:()=>s});var i=n(4341),r=(n(77690),n(29242)),a=n(35522),o=n(51850),l=n(32114);function s(t){return t?h((0,o.o8)(t.origin),(0,o.o8)(t.direction)):h((0,o.vt)(),(0,o.vt)())}function h(t,e){return{origin:t,direction:e}}function c(t,e){let n=d.get();return n.origin=t,n.direction=e,n}function u(t,e=s()){return f(t.origin,t.direction,e)}function m(t,e,n=s()){return(0,a.C)(n.origin,t),(0,a.Re)(n.direction,e,t),n}function f(t,e,n=s()){return(0,a.C)(n.origin,t),(0,a.C)(n.direction,e),n}function p(t,e){let n=(0,a.$A)(l.rq.get(),(0,a.S8)(l.rq.get(),t.direction),(0,a.Re)(l.rq.get(),e,t.origin));return(0,a.Om)(n,n)}const d=new i.I(()=>s());(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,r.vt)()},48295(t,e,n){n.d(e,{BU:()=>c,Ui:()=>l,cq:()=>h,k3:()=>u,rb:()=>m});var i=n(4341),r=n(35522),a=n(51850),o=n(11964);function l(t,e,n){let{direction:i,origin:a}=e,{p0:o,p1:l,p2:s}=t,h=l[0]-o[0],c=l[1]-o[1],u=l[2]-o[2],m=s[0]-o[0],f=s[1]-o[1],p=s[2]-o[2],d=i[1]*p-f*i[2],x=i[2]*m-p*i[0],_=i[0]*f-m*i[1],g=h*d+c*x+u*_;if(g>-1e-5&&g<1e-5)return!1;let v=1/g,M=a[0]-o[0],X=a[1]-o[1],Y=a[2]-o[2],w=v*(M*d+X*x+Y*_);if(w<0||w>1)return!1;let B=X*u-c*Y,A=Y*h-u*M,R=M*c-h*X,y=v*(i[0]*B+i[1]*A+i[2]*R);if(y<0||w+y>1)return!1;if(n){let t=v*(m*B+f*A+p*R);(0,r.hs)(n,i,t),(0,r.WQ)(n,a,n)}return!0}function s(t,e,n){let[i,r]=t,[a,o]=e,[l,s]=n;return.5*((a-i)*(s-r)-(o-r)*(l-i))}function h(t,e,n,i,r=0){let a=s(i,t,e),o=s(i,e,n),l=s(i,n,t);return!((a<-r||o<-r||l<-r)&&(a>r||o>r||l>r))}function c(t,e,n){return(0,r.Re)(f,e,t),(0,r.Re)(p,n,t),.5*(0,r.Bw)((0,r.$A)(f,f,p))}function u(t,e,n,i,a){(0,r.jb)(f,i,n),(0,r.jb)(d,a,n),(0,r.jb)(p,e,n);let o=(0,r.Om)(f,p),l=(0,r.Om)(d,p);if(o<=0&&l<=0)return void(0,r.C)(t,n);(0,r.jb)(p,e,i);let s=(0,r.Om)(f,p),h=(0,r.Om)(d,p);if(s>=0&&h<=s)return void(0,r.C)(t,i);let c=o*h-s*l;if(c<=0&&o>=0&&s<=0)return void(0,r.Ln)(t,n,f,o/(o-s));(0,r.jb)(p,e,a);let u=(0,r.Om)(f,p),m=(0,r.Om)(d,p);if(m>=0&&u<=m)return void(0,r.C)(t,a);let x=u*l-o*m;if(x<=0&&l>=0&&m<=0)return void(0,r.Ln)(t,n,d,l/(l-m));let _=s*m-u*h;if(_<=0&&h-s>=0&&u-m>=0)return(0,r.jb)(p,a,i),void(0,r.Ln)(t,i,p,(h-s)/(h-s+(u-m)));let g=1/(_+x+c);(0,r.C)(t,n),(0,r.Ln)(t,t,f,x*g),(0,r.Ln)(t,t,d,c*g)}function m(t,e,n,i){(0,r.jb)(f,n,e),(0,r.jb)(p,i,e),(0,r.$A)(t,f,p);let a=(0,r.Bw)(t);return 0!==a&&((0,r.hs)(t,t,1/a),!0)}n(32114),new i.I(o.vt),new i.I(()=>{return t?{p0:(0,a.o8)(t.p0),p1:(0,a.o8)(t.p1),p2:(0,a.o8)(t.p2)}:{p0:(0,a.vt)(),p1:(0,a.vt)(),p2:(0,a.vt)()};var t});const f=(0,a.vt)(),p=(0,a.vt)(),d=(0,a.vt)()},7236(t,e,n){n.d(e,{A:()=>h});var i=n(32198),r=n(65529),a=n(53966),o=n(91429),l=n(86738),s=n(28735);let h=class extends r.nJ{queryElevation(t){let e=this.projectIfRequired(t,this.spatialReference);if(!e)return null;switch(t.type){case"point":return function(t,e,n){return t.hasZ=!0,t.z=n.elevationAt(e.x,e.y),t}(t,e,this);case"polyline":return function(t,e,n){c.spatialReference=e.spatialReference;let i=t.hasM&&!t.hasZ;for(let r=0;r<t.paths.length;r++){let a=t.paths[r],o=e.paths[r];for(let t=0;t<a.length;t++){let e=a[t],r=o[t];c.x=r[0],c.y=r[1],i&&(e[3]=e[2]),e[2]=n.elevationAt(c.x,c.y)}}return t.hasZ=!0,t}(t,e,this);case"multipoint":return function(t,e,n){c.spatialReference=e.spatialReference;let i=t.hasM&&!t.hasZ;for(let r=0;r<t.points.length;r++){let a=t.points[r],o=e.points[r];c.x=o[0],c.y=o[1],i&&(a[3]=a[2]),a[2]=n.elevationAt(c.x,c.y)}return t.hasZ=!0,t}(t,e,this);default:return null}}projectIfRequired(t,e){if(null==t)return null;let n=t.spatialReference;if(n.equals(e))return t;let i=(0,s.Cv)(t,e);return i||a.A.getLogger(this).error(`Cannot project geometry spatial reference (wkid:${n.wkid}) to elevation sampler spatial reference (wkid:${e.wkid})`),i}};h=(0,i.Cg)([(0,o.$K)("esri.layers.support.ElevationSampler")],h);const c=new l.A}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3527],{68197(e,t,r){r.d(t,{A:()=>h});var n=r(40876),i=r(4576),a=r(34727),s=r(78888);function o(e){return(0,a.qE)((0,s.Vr)(e),0,255)}function l(e,t){let r=e.toString(16).padStart(2,"0");return t?r.slice(0,1):r}function u(e){return.2126*(0,n.Q6)(e.r)+.7152*(0,n.Q6)(e.g)+.0722*(0,n.Q6)(e.b)}class h{static blendColors(e,t,r,n=new h){return n.r=Math.round(e.r+(t.r-e.r)*r),n.g=Math.round(e.g+(t.g-e.g)*r),n.b=Math.round(e.b+(t.b-e.b)*r),n.a=e.a+(t.a-e.a)*r,n._sanitize()}static fromRgb(e,t){let r=(0,n.lT)(e);return r?h.fromArray(r,t):null}static fromHex(e,t=new h){let r=(0,n.oW)(e);return r?h.fromArray(r,t):null}static fromArray(e,t=new h){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){let r=(0,n.Eq)(e);return r?h.fromArray(r,t):null}static fromJSON(e){return null==e?void 0:new h([e[0],e[1],e[2],(e[3]??255)/255])}toUnitRGB(){return[this.r/255,this.g/255,this.b/255]}toUnitRGBA(e){return e??=[0,0,0,0],e[0]=this.r/255,e[1]=this.g/255,e[2]=this.b/255,e[3]=null==this.a?1:this.a,e}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return this.toYiq()>=127}isLowContrastBlend(e,t=3){let r=e instanceof h?e:new h(e),n=u(this),i=u(r);return(Math.max(n,i)+.05)/(Math.min(n,i)+.05)<t}setColor(e){if("string"==typeof e)h.fromString(e,this);else if((0,i.yc)(e))h.fromArray(e,this);else{let t=e;this._set(t.r??0,t.g??0,t.b??0,t.a??1),e instanceof h||this._sanitize()}return this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(e){let t=e?.capitalize??!1,r=e?.digits??6,n=3===r||4===r,i=4===r||8===r,a=`#${l(this.r,n)}${l(this.g,n)}${l(this.b,n)}${i?l(Math.round(255*this.a),n):""}`;return t?a.toUpperCase():a}toYiq(){return.299*this.r+.587*this.g+.114*this.b}toCss(e=!1){let t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=0){let t=o(this.r),r=o(this.g),n=o(this.b);return 0===e||1!==this.a?[t,r,n,o(255*this.a)]:[t,r,n]}clone(){return new h(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=(0,n.c1)(this.r),this.g=(0,n.c1)(this.g),this.b=(0,n.c1)(this.b),this.a=(0,n.G1)(this.a),this}_set(e,t,r,n){this.r=e,this.g=t,this.b=r,this.a=n}}h.prototype.declaredClass="esri.Color"},40876(e,t,r){r.d(t,{Eq:()=>f,G1:()=>m,Q6:()=>y,TS:()=>a,V6:()=>i,Vm:()=>g,ay:()=>l,c1:()=>p,c4:()=>s,j5:()=>u,lT:()=>c,oW:()=>h,xV:()=>v});const n={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function i(e){return!!n[e]||!!n[e.toLowerCase()]}function a(e){return n[e]??n[e.toLowerCase()]}function s(e){return[...a(e)]}function o(e,t,r){r<0&&++r,r>1&&--r;let n=6*r;return n<1?e+(t-e)*n:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function l(e,t,r,n=1){let i=(e%360+360)%360/360,a=r<=.5?r*(t+1):r+t-r*t,s=2*r-a;return[Math.round(255*o(s,a,i+1/3)),Math.round(255*o(s,a,i)),Math.round(255*o(s,a,i-1/3)),n]}function u(e){let t=e.length>5,r=t?8:4,n=(1<<r)-1,i=t?1:17,a=t?9===e.length:5===e.length,s=Number("0x"+e.slice(1));if(isNaN(s))return null;let o,l=[0,0,0,1];return a&&(o=s&n,s>>=r,l[3]=i*o/255),o=s&n,s>>=r,l[2]=i*o,o=s&n,s>>=r,l[1]=i*o,o=s&n,s>>=r,l[0]=i*o,l}function h(e){if(!e.startsWith("#")||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{let t=parseInt(e.slice(1,2),16),r=parseInt(e.slice(2,3),16),n=parseInt(e.slice(3,4),16),i=4===e.length?15:parseInt(e.slice(4),16);return[t+16*t,r+16*r,n+16*n,(i+16*i)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function c(e){let t=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){let e=t[2].split(/\s*,\s*/),r=t[1];if("rgb"===r&&3===e.length||"rgba"===r&&4===e.length){if(e[0].endsWith("%")){let t=e.map(e=>2.56*parseFloat(e));return 4===e.length&&(t[3]=parseFloat(e[3])),d(t)}return d(e.map(e=>parseFloat(e)))}if("hsl"===r&&3===e.length||"hsla"===r&&4===e.length)return l(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]??"1"))}return null}function d(e){return e[0]=p(e[0]),e[1]=p(e[1]),e[2]=p(e[2]),e[3]=4===e.length?m(e[3]):1,e}function f(e){let t=i(e)?a(e):null;return t??=c(e),t??=h(e),t}function g(e){let t=f(e);return null==t?null:[t[0]/255,t[1]/255,t[2]/255,t[3]]}function m(e){return _(e,0,1)}function p(e){return Math.round(_(e,0,255))}function _(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}const b=1/2.2;function y(e){return e**2.2}function v(e){return e**b}r.d(t,["iw",0,b])},85334(e,t,r){r.d(t,{$:()=>b,IB:()=>o,Iy:()=>S,KV:()=>R,N2:()=>y,RH:()=>E,ZD:()=>v,sn:()=>M});var n=r(68197),i=r(4576),a=r(4718),s=r(34727);function o(e){return"r"in e&&"g"in e&&"b"in e}function l(e){return"h"in e&&"s"in e&&"v"in e}function u(e){return"l"in e&&"a"in e&&"b"in e}function h(e){return"l"in e&&"c"in e&&"h"in e}r(78955),r(91829);const c=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],d=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function f(e,t){let r,n,i=[];if(e[0].length!==t.length)throw Error("dimensions do not match");let a=e.length,s=e[0].length,o=0;for(r=0;r<a;r++){for(o=0,n=0;n<s;n++)o+=e[r][n]*t[n];i.push(o)}return i}function g(e){let t=[e.r/255,e.g/255,e.b/255].map(e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4),r=f(c,t);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function m(e){let t=f(d,[e.x/100,e.y/100,e.z/100]).map(e=>{let t=e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055;return Math.min(1,Math.max(t,0))});return{r:Math.round(255*t[0]),g:Math.round(255*t[1]),b:Math.round(255*t[2])}}function p(e){let t=[e.x/95.047,e.y/100,e.z/108.883].map(e=>e>(6/29)**3?e**(1/3):1/3*(29/6)**2*e+4/29);return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2])}}function _(e){let t=e.l,r=[(t+16)/116+e.a/500,(t+16)/116,(t+16)/116-e.b/200].map(e=>e>6/29?e**3:3*(6/29)**2*(e-4/29));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function b(e){return o(e)?e:h(e)?function(e){return m(_(function(e){let t=e.l,r=e.c,n=e.h;return{l:t,a:r*Math.cos(n),b:r*Math.sin(n)}}(e)))}(e):u(e)?function(e){return m(_(e))}(e):function(e){return"x"in e&&"y"in e&&"z"in e}(e)?m(e):l(e)?function(e){let t,r=(e.h+360)%360/60,n=e.s/100,i=e.v/100*255,a=i*n,s=a*(1-Math.abs(r%2-1));switch(Math.floor(r)){case 0:t={r:a,g:s,b:0};break;case 1:t={r:s,g:a,b:0};break;case 2:t={r:0,g:a,b:s};break;case 3:t={r:0,g:s,b:a};break;case 4:t={r:s,g:0,b:a};break;case 5:case 6:t={r:a,g:0,b:s};break;default:t={r:0,g:0,b:0}}return t.r=Math.round(t.r+i-a),t.g=Math.round(t.g+i-a),t.b=Math.round(t.b+i-a),t}(e):e}function y(e){return l(e)?e:function(e){let{r:t,g:r,b:n}=e,i=Math.max(t,r,n),a=i-Math.min(t,r,n),s=i,o=0===a?0:i===t?(r-n)/a%6:i===r?(n-t)/a+2:(t-r)/a+4,l=0===a?0:a/s;return o<0&&(o+=6),o*=60,l*=100,s*=100/255,{h:o,s:l,v:s}}(b(e))}function v(e){return u(e)?e:function(e){return p(g(e))}(b(e))}function E(e){return h(e)?e:function(e){return function(e){let t=e.l,r=e.a,n=e.b,i=Math.sqrt(r*r+n*n),a=Math.atan2(n,r);return a=a>0?a:a+2*Math.PI,{l:t,c:i,h:a}}(p(g(e)))}(b(e))}function R(e){return e[0]??=0,e[1]??=0,e[2]??=0,e}function M(e){return e.length=4,R(e),e[3]??=1,(0,s.qE)(e[3],0,1),e}function S(e,t,r={}){if(0===e.length||t<=0)return[];if(1===(e=e.map(e=>"string"==typeof e?new n.A(e):e)).length||1===t){let r=[],n=e[0];for(let e=0;e<t;e++)r.push(n.clone());return r}if(r.shuffle&&(e=(0,i.k4)((0,a.o8)(e),r.seed)),e.length>=t){let r=[],n=(e.length-1)/(t-1);for(let i=0;i<t;i++){let t=Math.round(i*n);r.push(e[t].clone())}return r}return function(e,t,r={}){let n=[],a=e.length-1,s=Math.ceil((t-e.length)/a);e:for(let i=0;i<a;i++){let a=e[i],o=e[i+1];for(let i=1;i<=s;i++){let l=i/(s+1);if(n.push(x(a,o,l,r)),n.length+e.length===t)break e}}return[...e.map(e=>e.clone()),...(0,i.k4)(n,r.seed??1)]}(e,t,r)}const T=(e,t)=>{let r=Math.floor(10*t())-5;return Math.min(255,Math.max(0,e+r))};function x(e,t,r,a={}){let s=e.r,o=e.g,l=e.b,u=t.r,h=t.g,c=t.b,d=Math.round(s+(u-s)*r),f=Math.round(o+(h-o)*r),g=Math.round(l+(c-l)*r);if(!a.offset)return new n.A([d,f,g]);let m=(0,i.Mo)(a.seed);return new n.A([T(d,m),T(f,m),T(g,m)])}},9093(e,t,r){function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function i(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}r.d(t,{o8:()=>i,vt:()=>n});const a=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:i,create:n,fromValues:function(e,t,r,n,i,a,s,o,l,u,h,c,d,f,g,m){return[e,t,r,n,i,a,s,o,l,u,h,c,d,f,g,m]}},Symbol.toStringTag,{value:"Module"})),r.d(t,["zK",0,a])},58083(e,t,r){r.d(t,{$0:()=>_,$h:()=>I,B8:()=>h,C:()=>a,D_:()=>o,N9:()=>y,O7:()=>x,Qw:()=>u,Tl:()=>d,X_:()=>M,e$:()=>g,eL:()=>m,hM:()=>b,hZ:()=>s,hs:()=>f,kN:()=>p,l:()=>S,lw:()=>c,mg:()=>l,o1:()=>T,sC:()=>R,t2:()=>C,t5:()=>A,tZ:()=>O,ut:()=>N});var n=r(51850),i=r(34304);function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function s(e,t,r,n,i,a,s,o,l,u,h,c,d,f,g,m,p){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e[4]=a,e[5]=s,e[6]=o,e[7]=l,e[8]=u,e[9]=h,e[10]=c,e[11]=d,e[12]=f,e[13]=g,e[14]=m,e[15]=p,e}function o(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function l(e,t){if(e===t){let r=t[1],n=t[2],i=t[3],a=t[6],s=t[7],o=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=a,e[11]=t[14],e[12]=i,e[13]=s,e[14]=o}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}function u(e,t){return h(e,t)||o(e),e}function h(e,t){let r=t[0],n=t[1],i=t[2],a=t[3],s=t[4],o=t[5],l=t[6],u=t[7],h=t[8],c=t[9],d=t[10],f=t[11],g=t[12],m=t[13],p=t[14],_=t[15],b=r*o-n*s,y=r*l-i*s,v=r*u-a*s,E=n*l-i*o,R=n*u-a*o,M=i*u-a*l,S=h*m-c*g,T=h*p-d*g,x=h*_-f*g,I=c*p-d*m,A=c*_-f*m,w=d*_-f*p,C=b*w-y*A+v*I+E*x-R*T+M*S;return C?(C=1/C,e[0]=(o*w-l*A+u*I)*C,e[1]=(i*A-n*w-a*I)*C,e[2]=(m*M-p*R+_*E)*C,e[3]=(d*R-c*M-f*E)*C,e[4]=(l*x-s*w-u*T)*C,e[5]=(r*w-i*x+a*T)*C,e[6]=(p*v-g*M-_*y)*C,e[7]=(h*M-d*v+f*y)*C,e[8]=(s*A-o*x+u*S)*C,e[9]=(n*x-r*A-a*S)*C,e[10]=(g*R-m*v+_*b)*C,e[11]=(c*v-h*R-f*b)*C,e[12]=(o*T-s*I-l*S)*C,e[13]=(r*I-n*T+i*S)*C,e[14]=(m*y-g*E-p*b)*C,e[15]=(h*E-c*y+d*b)*C,e):null}function c(e,t,r){let n=t[0],i=t[1],a=t[2],s=t[3],o=t[4],l=t[5],u=t[6],h=t[7],c=t[8],d=t[9],f=t[10],g=t[11],m=t[12],p=t[13],_=t[14],b=t[15],y=r[0],v=r[1],E=r[2],R=r[3];return e[0]=y*n+v*o+E*c+R*m,e[1]=y*i+v*l+E*d+R*p,e[2]=y*a+v*u+E*f+R*_,e[3]=y*s+v*h+E*g+R*b,y=r[4],v=r[5],E=r[6],R=r[7],e[4]=y*n+v*o+E*c+R*m,e[5]=y*i+v*l+E*d+R*p,e[6]=y*a+v*u+E*f+R*_,e[7]=y*s+v*h+E*g+R*b,y=r[8],v=r[9],E=r[10],R=r[11],e[8]=y*n+v*o+E*c+R*m,e[9]=y*i+v*l+E*d+R*p,e[10]=y*a+v*u+E*f+R*_,e[11]=y*s+v*h+E*g+R*b,y=r[12],v=r[13],E=r[14],R=r[15],e[12]=y*n+v*o+E*c+R*m,e[13]=y*i+v*l+E*d+R*p,e[14]=y*a+v*u+E*f+R*_,e[15]=y*s+v*h+E*g+R*b,e}function d(e,t,r){let n=r[0],i=r[1],a=r[2];if(t===e)e[12]=t[0]*n+t[4]*i+t[8]*a+t[12],e[13]=t[1]*n+t[5]*i+t[9]*a+t[13],e[14]=t[2]*n+t[6]*i+t[10]*a+t[14],e[15]=t[3]*n+t[7]*i+t[11]*a+t[15];else{let r=t[0],s=t[1],o=t[2],l=t[3],u=t[4],h=t[5],c=t[6],d=t[7],f=t[8],g=t[9],m=t[10],p=t[11];e[0]=r,e[1]=s,e[2]=o,e[3]=l,e[4]=u,e[5]=h,e[6]=c,e[7]=d,e[8]=f,e[9]=g,e[10]=m,e[11]=p,e[12]=r*n+u*i+f*a+t[12],e[13]=s*n+h*i+g*a+t[13],e[14]=o*n+c*i+m*a+t[14],e[15]=l*n+d*i+p*a+t[15]}return e}function f(e,t,r){let n=r[0],i=r[1],a=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function g(e,t,r,n){let s=n[0],o=n[1],l=n[2],u=Math.sqrt(s*s+o*o+l*l);if(u<=(0,i.FD)())return void a(e,t);u=1/u,s*=u,o*=u,l*=u;let h=Math.sin(r),c=Math.cos(r),d=1-c,f=t[0],g=t[1],m=t[2],p=t[3],_=t[4],b=t[5],y=t[6],v=t[7],E=t[8],R=t[9],M=t[10],S=t[11],T=s*s*d+c,x=o*s*d+l*h,I=l*s*d-o*h,A=s*o*d-l*h,w=o*o*d+c,C=l*o*d+s*h,N=s*l*d+o*h,O=o*l*d-s*h,L=l*l*d+c;e[0]=f*T+_*x+E*I,e[1]=g*T+b*x+R*I,e[2]=m*T+y*x+M*I,e[3]=p*T+v*x+S*I,e[4]=f*A+_*w+E*C,e[5]=g*A+b*w+R*C,e[6]=m*A+y*w+M*C,e[7]=p*A+v*w+S*C,e[8]=f*N+_*O+E*L,e[9]=g*N+b*O+R*L,e[10]=m*N+y*O+M*L,e[11]=p*N+v*O+S*L,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15])}function m(e,t,r){let n=Math.sin(r),i=Math.cos(r),a=t[4],s=t[5],o=t[6],l=t[7],u=t[8],h=t[9],c=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+u*n,e[5]=s*i+h*n,e[6]=o*i+c*n,e[7]=l*i+d*n,e[8]=u*i-a*n,e[9]=h*i-s*n,e[10]=c*i-o*n,e[11]=d*i-l*n,e}function p(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}function _(e,t,r){if(0===t)return o(e);let n=r[0],a=r[1],s=r[2],l=Math.sqrt(n*n+a*a+s*s);if(l<=(0,i.FD)())return null;l=1/l,n*=l,a*=l,s*=l;let u=Math.sin(t),h=Math.cos(t),c=1-h;return e[0]=n*n*c+h,e[1]=a*n*c+s*u,e[2]=s*n*c-a*u,e[3]=0,e[4]=n*a*c-s*u,e[5]=a*a*c+h,e[6]=s*a*c+n*u,e[7]=0,e[8]=n*s*c+a*u,e[9]=a*s*c-n*u,e[10]=s*s*c+h,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function b(e,t){let r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function y(e,t){let r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function v(e,t,r){let n=t[0],i=t[1],a=t[2],s=t[3],o=n+n,l=i+i,u=a+a,h=n*o,c=n*l,d=n*u,f=i*l,g=i*u,m=a*u,p=s*o,_=s*l,b=s*u;return e[0]=1-(f+m),e[1]=c+b,e[2]=d-_,e[3]=0,e[4]=c-b,e[5]=1-(h+m),e[6]=g+p,e[7]=0,e[8]=d+_,e[9]=g-p,e[10]=1-(h+f),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}const E=(0,n.vt)();function R(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function M(e,t){let r=t[0],n=t[1],i=t[2],a=t[4],s=t[5],o=t[6],l=t[8],u=t[9],h=t[10];return e[0]=Math.sqrt(r*r+n*n+i*i),e[1]=Math.sqrt(a*a+s*s+o*o),e[2]=Math.sqrt(l*l+u*u+h*h),e}function S(e,t){let r=t[0]+t[5]+t[10],n=0;return r>0?(n=2*Math.sqrt(r+1),e[3]=.25*n,e[0]=(t[6]-t[9])/n,e[1]=(t[8]-t[2])/n,e[2]=(t[1]-t[4])/n):t[0]>t[5]&&t[0]>t[10]?(n=2*Math.sqrt(1+t[0]-t[5]-t[10]),e[3]=(t[6]-t[9])/n,e[0]=.25*n,e[1]=(t[1]+t[4])/n,e[2]=(t[8]+t[2])/n):t[5]>t[10]?(n=2*Math.sqrt(1+t[5]-t[0]-t[10]),e[3]=(t[8]-t[2])/n,e[0]=(t[1]+t[4])/n,e[1]=.25*n,e[2]=(t[6]+t[9])/n):(n=2*Math.sqrt(1+t[10]-t[0]-t[5]),e[3]=(t[1]-t[4])/n,e[0]=(t[8]+t[2])/n,e[1]=(t[6]+t[9])/n,e[2]=.25*n),e}function T(e,t,r,n){let i=t[0],a=t[1],s=t[2],o=t[3],l=i+i,u=a+a,h=s+s,c=i*l,d=i*u,f=i*h,g=a*u,m=a*h,p=s*h,_=o*l,b=o*u,y=o*h,v=n[0],E=n[1],R=n[2];return e[0]=(1-(g+p))*v,e[1]=(d+y)*v,e[2]=(f-b)*v,e[3]=0,e[4]=(d-y)*E,e[5]=(1-(c+p))*E,e[6]=(m+_)*E,e[7]=0,e[8]=(f+b)*R,e[9]=(m-_)*R,e[10]=(1-(c+g))*R,e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}function x(e,t,r,n,i){let a=t[0],s=t[1],o=t[2],l=t[3],u=a+a,h=s+s,c=o+o,d=a*u,f=a*h,g=a*c,m=s*h,p=s*c,_=o*c,b=l*u,y=l*h,v=l*c,E=n[0],R=n[1],M=n[2],S=i[0],T=i[1],x=i[2],I=(1-(m+_))*E,A=(f+v)*E,w=(g-y)*E,C=(f-v)*R,N=(1-(d+_))*R,O=(p+b)*R,L=(g+y)*M,P=(p-b)*M,D=(1-(d+m))*M;return e[0]=I,e[1]=A,e[2]=w,e[3]=0,e[4]=C,e[5]=N,e[6]=O,e[7]=0,e[8]=L,e[9]=P,e[10]=D,e[11]=0,e[12]=r[0]+S-(I*S+C*T+L*x),e[13]=r[1]+T-(A*S+N*T+P*x),e[14]=r[2]+x-(w*S+O*T+D*x),e[15]=1,e}function I(e,t,r,n,i,a,s){let o=1/(r-t),l=1/(i-n),u=1/(a-s);return e[0]=2*a*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*a*l,e[6]=0,e[7]=0,e[8]=(r+t)*o,e[9]=(i+n)*l,e[10]=(s+a)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=s*a*2*u,e[15]=0,e}function A(e,t,r,n){let a=t[0],s=t[1],l=t[2],u=a-r[0],h=s-r[1],c=l-r[2],d=(0,i.FD)();if(Math.abs(u)<d&&Math.abs(h)<d&&Math.abs(c)<d)return void o(e);let f=1/Math.sqrt(u*u+h*h+c*c);u*=f,h*=f,c*=f;let g=n[0],m=n[1],p=n[2],_=m*c-p*h,b=p*u-g*c,y=g*h-m*u;f=Math.sqrt(_*_+b*b+y*y),f?(f=1/f,_*=f,b*=f,y*=f):(_=0,b=0,y=0);let v=h*y-c*b,E=c*_-u*y,R=u*b-h*_;f=Math.sqrt(v*v+E*E+R*R),f?(f=1/f,v*=f,E*=f,R*=f):(v=0,E=0,R=0),e[0]=_,e[1]=v,e[2]=u,e[3]=0,e[4]=b,e[5]=E,e[6]=h,e[7]=0,e[8]=y,e[9]=R,e[10]=c,e[11]=0,e[12]=-(_*a+b*s+y*l),e[13]=-(v*a+E*s+R*l),e[14]=-(u*a+h*s+c*l),e[15]=1}function w(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e[4]=t[4]-r[4],e[5]=t[5]-r[5],e[6]=t[6]-r[6],e[7]=t[7]-r[7],e[8]=t[8]-r[8],e[9]=t[9]-r[9],e[10]=t[10]-r[10],e[11]=t[11]-r[11],e[12]=t[12]-r[12],e[13]=t[13]-r[13],e[14]=t[14]-r[14],e[15]=t[15]-r[15],e}function C(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]&&e[4]===t[4]&&e[5]===t[5]&&e[6]===t[6]&&e[7]===t[7]&&e[8]===t[8]&&e[9]===t[9]&&e[10]===t[10]&&e[11]===t[11]&&e[12]===t[12]&&e[13]===t[13]&&e[14]===t[14]&&e[15]===t[15]}function N(e){let t=(0,i.FD)(),r=e[0],n=e[1],a=e[2],s=e[4],o=e[5],l=e[6],u=e[8],h=e[9],c=e[10];return Math.abs(1-(r*r+s*s+u*u))<=t&&Math.abs(1-(n*n+o*o+h*h))<=t&&Math.abs(1-(a*a+l*l+c*c))<=t}function O(e){return 1===e[0]&&0===e[1]&&0===e[2]&&0===e[4]&&1===e[5]&&0===e[6]&&0===e[8]&&0===e[9]&&1===e[10]}const L=c,P=w;Object.freeze(Object.defineProperty({__proto__:null,add:function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e[4]=t[4]+r[4],e[5]=t[5]+r[5],e[6]=t[6]+r[6],e[7]=t[7]+r[7],e[8]=t[8]+r[8],e[9]=t[9]+r[9],e[10]=t[10]+r[10],e[11]=t[11]+r[11],e[12]=t[12]+r[12],e[13]=t[13]+r[13],e[14]=t[14]+r[14],e[15]=t[15]+r[15],e},adjoint:function(e,t){let r=t[0],n=t[1],i=t[2],a=t[3],s=t[4],o=t[5],l=t[6],u=t[7],h=t[8],c=t[9],d=t[10],f=t[11],g=t[12],m=t[13],p=t[14],_=t[15];return e[0]=o*(d*_-f*p)-c*(l*_-u*p)+m*(l*f-u*d),e[1]=-(n*(d*_-f*p)-c*(i*_-a*p)+m*(i*f-a*d)),e[2]=n*(l*_-u*p)-o*(i*_-a*p)+m*(i*u-a*l),e[3]=-(n*(l*f-u*d)-o*(i*f-a*d)+c*(i*u-a*l)),e[4]=-(s*(d*_-f*p)-h*(l*_-u*p)+g*(l*f-u*d)),e[5]=r*(d*_-f*p)-h*(i*_-a*p)+g*(i*f-a*d),e[6]=-(r*(l*_-u*p)-s*(i*_-a*p)+g*(i*u-a*l)),e[7]=r*(l*f-u*d)-s*(i*f-a*d)+h*(i*u-a*l),e[8]=s*(c*_-f*m)-h*(o*_-u*m)+g*(o*f-u*c),e[9]=-(r*(c*_-f*m)-h*(n*_-a*m)+g*(n*f-a*c)),e[10]=r*(o*_-u*m)-s*(n*_-a*m)+g*(n*u-a*o),e[11]=-(r*(o*f-u*c)-s*(n*f-a*c)+h*(n*u-a*o)),e[12]=-(s*(c*p-d*m)-h*(o*p-l*m)+g*(o*d-l*c)),e[13]=r*(c*p-d*m)-h*(n*p-i*m)+g*(n*d-i*c),e[14]=-(r*(o*p-l*m)-s*(n*p-i*m)+g*(n*l-i*o)),e[15]=r*(o*d-l*c)-s*(n*d-i*c)+h*(n*l-i*o),e},copy:a,determinant:function(e){let t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8],h=e[9],c=e[10],d=e[11],f=e[12],g=e[13],m=e[14],p=e[15];return(t*s-r*a)*(c*p-d*m)-(t*o-n*a)*(h*p-d*g)+(t*l-i*a)*(h*m-c*g)+(r*o-n*s)*(u*p-d*f)-(r*l-i*s)*(u*m-c*f)+(n*l-i*o)*(u*g-h*f)},equals:function(e,t){if(e===t)return!0;let r=e[0],n=e[1],a=e[2],s=e[3],o=e[4],l=e[5],u=e[6],h=e[7],c=e[8],d=e[9],f=e[10],g=e[11],m=e[12],p=e[13],_=e[14],b=e[15],y=t[0],v=t[1],E=t[2],R=t[3],M=t[4],S=t[5],T=t[6],x=t[7],I=t[8],A=t[9],w=t[10],C=t[11],N=t[12],O=t[13],L=t[14],P=t[15],D=(0,i.FD)();return Math.abs(r-y)<=D*Math.max(1,Math.abs(r),Math.abs(y))&&Math.abs(n-v)<=D*Math.max(1,Math.abs(n),Math.abs(v))&&Math.abs(a-E)<=D*Math.max(1,Math.abs(a),Math.abs(E))&&Math.abs(s-R)<=D*Math.max(1,Math.abs(s),Math.abs(R))&&Math.abs(o-M)<=D*Math.max(1,Math.abs(o),Math.abs(M))&&Math.abs(l-S)<=D*Math.max(1,Math.abs(l),Math.abs(S))&&Math.abs(u-T)<=D*Math.max(1,Math.abs(u),Math.abs(T))&&Math.abs(h-x)<=D*Math.max(1,Math.abs(h),Math.abs(x))&&Math.abs(c-I)<=D*Math.max(1,Math.abs(c),Math.abs(I))&&Math.abs(d-A)<=D*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(f-w)<=D*Math.max(1,Math.abs(f),Math.abs(w))&&Math.abs(g-C)<=D*Math.max(1,Math.abs(g),Math.abs(C))&&Math.abs(m-N)<=D*Math.max(1,Math.abs(m),Math.abs(N))&&Math.abs(p-O)<=D*Math.max(1,Math.abs(p),Math.abs(O))&&Math.abs(_-L)<=D*Math.max(1,Math.abs(_),Math.abs(L))&&Math.abs(b-P)<=D*Math.max(1,Math.abs(b),Math.abs(P))},exactEquals:C,frob:function(e){return Math.sqrt(e[0]**2+e[1]**2+e[2]**2+e[3]**2+e[4]**2+e[5]**2+e[6]**2+e[7]**2+e[8]**2+e[9]**2+e[10]**2+e[11]**2+e[12]**2+e[13]**2+e[14]**2+e[15]**2)},fromQuat:function(e,t){let r=t[0],n=t[1],i=t[2],a=t[3],s=r+r,o=n+n,l=i+i,u=r*s,h=n*s,c=n*o,d=i*s,f=i*o,g=i*l,m=a*s,p=a*o,_=a*l;return e[0]=1-c-g,e[1]=h+_,e[2]=d-p,e[3]=0,e[4]=h-_,e[5]=1-u-g,e[6]=f+m,e[7]=0,e[8]=d+p,e[9]=f-m,e[10]=1-u-c,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},fromQuat2:function(e,t){let r=E,n=-t[0],i=-t[1],a=-t[2],s=t[3],o=t[4],l=t[5],u=t[6],h=t[7],c=n*n+i*i+a*a+s*s;return c>0?(r[0]=2*(o*s+h*n+l*a-u*i)/c,r[1]=2*(l*s+h*i+u*n-o*a)/c,r[2]=2*(u*s+h*a+o*i-l*n)/c):(r[0]=2*(o*s+h*n+l*a-u*i),r[1]=2*(l*s+h*i+u*n-o*a),r[2]=2*(u*s+h*a+o*i-l*n)),v(e,t,r),e},fromRotation:_,fromRotationTranslation:v,fromRotationTranslationScale:T,fromRotationTranslationScaleOrigin:x,fromScaling:function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},fromTranslation:p,fromXRotation:b,fromYRotation:function(e,t){let r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},fromZRotation:y,frustum:I,getRotation:S,getScale:M,getTranslation:R,hasIdentityRotation:O,identity:o,invert:h,invertOrIdentity:u,isOrthoNormal:N,lookAt:A,mul:L,multiply:c,multiplyScalar:function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*r,e[9]=t[9]*r,e[10]=t[10]*r,e[11]=t[11]*r,e[12]=t[12]*r,e[13]=t[13]*r,e[14]=t[14]*r,e[15]=t[15]*r,e},multiplyScalarAndAdd:function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e[4]=t[4]+r[4]*n,e[5]=t[5]+r[5]*n,e[6]=t[6]+r[6]*n,e[7]=t[7]+r[7]*n,e[8]=t[8]+r[8]*n,e[9]=t[9]+r[9]*n,e[10]=t[10]+r[10]*n,e[11]=t[11]+r[11]*n,e[12]=t[12]+r[12]*n,e[13]=t[13]+r[13]*n,e[14]=t[14]+r[14]*n,e[15]=t[15]+r[15]*n,e},ortho:function(e,t,r,n,i,a,s){let o=1/(t-r),l=1/(n-i),u=1/(a-s);return e[0]=-2*o,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*o,e[13]=(i+n)*l,e[14]=(s+a)*u,e[15]=1,e},perspective:function(e,t,r,n,i){let a,s=1/Math.tan(t/2);return e[0]=s/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=s,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(a=1/(n-i),e[10]=(i+n)*a,e[14]=2*i*n*a):(e[10]=-1,e[14]=-2*n),e},perspectiveFromFieldOfView:function(e,t,r,n){let i=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),s=Math.tan(t.leftDegrees*Math.PI/180),o=Math.tan(t.rightDegrees*Math.PI/180),l=2/(s+o),u=2/(i+a);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-(s-o)*l*.5,e[9]=(i-a)*u*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e},rotate:g,rotateX:m,rotateY:function(e,t,r){let n=Math.sin(r),i=Math.cos(r),a=t[0],s=t[1],o=t[2],l=t[3],u=t[8],h=t[9],c=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i-u*n,e[1]=s*i-h*n,e[2]=o*i-c*n,e[3]=l*i-d*n,e[8]=a*n+u*i,e[9]=s*n+h*i,e[10]=o*n+c*i,e[11]=l*n+d*i,e},rotateZ:function(e,t,r){let n=Math.sin(r),i=Math.cos(r),a=t[0],s=t[1],o=t[2],l=t[3],u=t[4],h=t[5],c=t[6],d=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i+u*n,e[1]=s*i+h*n,e[2]=o*i+c*n,e[3]=l*i+d*n,e[4]=u*i-a*n,e[5]=h*i-s*n,e[6]=c*i-o*n,e[7]=d*i-l*n,e},scale:f,set:s,str:function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"},sub:P,subtract:w,targetTo:function(e,t,r,n){let i=t[0],a=t[1],s=t[2],o=n[0],l=n[1],u=n[2],h=i-r[0],c=a-r[1],d=s-r[2],f=h*h+c*c+d*d;f>0&&(f=1/Math.sqrt(f),h*=f,c*=f,d*=f);let g=l*d-u*c,m=u*h-o*d,p=o*c-l*h;return f=g*g+m*m+p*p,f>0&&(f=1/Math.sqrt(f),g*=f,m*=f,p*=f),e[0]=g,e[1]=m,e[2]=p,e[3]=0,e[4]=c*p-d*m,e[5]=d*g-h*p,e[6]=h*m-c*g,e[7]=0,e[8]=h,e[9]=c,e[10]=d,e[11]=0,e[12]=i,e[13]=a,e[14]=s,e[15]=1,e},translate:d,transpose:l},Symbol.toStringTag,{value:"Module"}))},90629(e,t,r){r.d(t,{Lz:()=>s,PN:()=>o,cr:()=>l,gs:()=>h,r_:()=>c,tc:()=>u}),r(39829);const n=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,i=o(1),a=s(1);function s(e){return e?e/72*96:0}function o(e){return e?72*e/96:0}function l(e){if("string"==typeof e){let t=e.match(n);if(t){let r=Number(t[1]),n=t[3]&&t[3].toLowerCase(),i=e.startsWith("-"),a="px"===n?o(r):r;return i?-a:a}return console.warn("screenUtils.toPt: input not recognized!"),null}return e}function u(e=0,t=0){return{x:e,y:t}}function h(e=0,t=0){return[e,t]}function c(e=0,t=0,r=0){return[e,t,r]}r.d(t,["L7",0,a,"ps",0,i])},4197(e,t,r){r.d(t,{Vj:()=>s,cj:()=>a,jh:()=>i});var n=r(9093);function i(e){return e<=1024?Array(e).fill(0):new Float64Array(e)}function a(e){return[...e]}function s(e){let t=(0,n.vt)();for(let r=0;r<16;++r)t[r]=e[r];return t}},70328(e,t,r){r.d(t,{BI:()=>I,C:()=>s,DC:()=>d,Ej:()=>y,Ie:()=>T,Jt:()=>x,Lu:()=>E,Ne:()=>R,RF:()=>c,TF:()=>_,VL:()=>g,aI:()=>w,fA:()=>o,gE:()=>u,gX:()=>b,hZ:()=>S,iT:()=>f,is:()=>A,pg:()=>v,uJ:()=>p,vI:()=>M,vY:()=>l,vt:()=>a,w1:()=>h,yr:()=>m}),r(35522);var n=r(5443),i=(r(19419),r(4197));function a(e=N){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t){for(let r=0;r<6;r++)e[r]=t[r];return e}function o(e,t,r,n,i,s,o=a()){return o[0]=e,o[1]=t,o[2]=r,o[3]=n,o[4]=i,o[5]=s,o}function l(e,t=a()){return function(e,t,r,n=a()){return S(n,C),function(e,t,r=0,n=t.length/3){let i=e[0],a=e[1],s=e[2],o=e[3],l=e[4],u=e[5];for(let e=0;e<n;e++)i=Math.min(i,t[r+3*e]),a=Math.min(a,t[r+3*e+1]),s=Math.min(s,t[r+3*e+2]),o=Math.max(o,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=i,e[1]=a,e[2]=s,e[3]=o,e[4]=l,e[5]=u}(n,e,t,r),n}(e,0,e.length/3,t)}function u(e,t=(0,i.jh)(24)){let[r,n,a,s,o,l]=e;return t[0]=r,t[1]=n,t[2]=a,t[3]=r,t[4]=n,t[5]=l,t[6]=r,t[7]=o,t[8]=a,t[9]=r,t[10]=o,t[11]=l,t[12]=s,t[13]=n,t[14]=a,t[15]=s,t[16]=n,t[17]=l,t[18]=s,t[19]=o,t[20]=a,t[21]=s,t[22]=o,t[23]=l,t}function h(e,t){return isFinite(e[2])||isFinite(e[5])?new n.A({xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}):new n.A({xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t,r=e){r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r[2]=Math.min(e[2],t[2]),r[3]=Math.max(e[3],t[3]),r[4]=Math.max(e[4],t[4]),r[5]=Math.max(e[5],t[5])}function d(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function f(e,[t,r,n]){!function(e,t,r,n){e[0]=Math.min(e[0],t),e[1]=Math.min(e[1],r),e[2]=Math.min(e[2],n),e[3]=Math.max(e[3],t),e[4]=Math.max(e[4],r),e[5]=Math.max(e[5],n)}(e,t,r,n)}function g(e){return e[0]>=e[3]?0:e[3]-e[0]}function m(e){return e[1]>=e[4]?0:e[4]-e[1]}function p(e){return e[2]>=e[5]?0:e[5]-e[2]}function _(e){let t=g(e),r=p(e),n=m(e);return t*t+r*r+n*n}function b(e,t=[0,0,0]){return t[0]=e[0]+g(e)/2,t[1]=e[1]+m(e)/2,t[2]=e[2]+p(e)/2,t}function y(e,t=[0,0,0]){return t[0]=g(e),t[1]=m(e),t[2]=p(e),t}function v(e,t){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function E(e,t){return t[0]=e[3],t[1]=e[4],t[2]=e[5],t}function R(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function M(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function S(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function T(e){return e?S(e,C):a(C)}function x(e,t){return e[0]=t[0],e[1]=t[1],e[2]=-1/0,e[3]=t[2],e[4]=t[3],e[5]=1/0,e}function I(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=-1/0,e[3]=n,e[4]=i,e[5]=1/0,e}function A(e){return 6===e.length}function w(e,t,r){if(null==e||null==t)return e===t;if(!A(e)||!A(t))return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const C=[1/0,1/0,1/0,-1/0,-1/0,-1/0],N=[0,0,0,0,0,0];a(),r.d(t,["qv",0,C,"v_",0,N])},50498(e,t,r){var n=r(66552),i=r(5443),a=r(91075),s=r(48526),o=r(86738),l=r(39829),u=r(82799);const h=(0,n.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),c=(0,n.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),d={base:a.A,key:"type",typeMap:{extent:i.A,multipoint:s.A,point:o.A,polyline:u.A,polygon:l.A}},f=new n.J({esriGeometryBezier3Curve:"cubic-bezier",esriGeometryCircularArc:"circular-arc",esriGeometryEllipticArc:"elliptic-arc"},{ignoreUnknown:!0});r.d(t,["Ye",0,c,"gy",0,h,"iI",0,f,"yR",0,d])},49013(e,t,r){r.r(t),r.d(t,{default:()=>pt});var n=r(32198),i=r(4576),a=r(60999),s=r(69540),o=r(49186),l=r(36563),u=r(44208),h=r(53966),c=r(25728),d=r(17676),f=r(36708),g=r(91429),m=r(87024),p=r(4146),_=r(52136),b=r(18768),y=r(69208),v=r(34287),E=r(8303),R=r(25036),M=r(58947),S=r(10873),T=r(10292),x=r(58083),I=r(9093),A=r(35522),w=r(51850),C=r(34727),N=r(37539),O=r(79258);function L(e,t,r,n){let i=n+t;if(i<n/2||r>i)return Number.MAX_VALUE;let a=Math.abs(D*e)+Math.asin(r/i);return a>=Math.PI/2?Number.MAX_VALUE:r/Math.cos(a)}const P=(0,w.vt)(),D=(0,C.kU)(1);var q=r(27993),U=(r(73941),r(16930)),F=r(98764),k=r(4341),Q=r(19419),G=r(11964),V=r(27921),j=r(71351),W=r(44280),Z=r(32114);const z=()=>h.A.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function B(e=ce){return{plane:(0,V.vt)(e.plane),origin:(0,w.o8)(e.origin),basis1:(0,w.o8)(e.basis1),basis2:(0,w.o8)(e.basis2)}}function $(e,t=B()){return H(e.origin,e.basis1,e.basis2,t)}function H(e,t,r,n=B()){return(0,A.C)(n.origin,e),(0,A.C)(n.basis1,t),(0,A.C)(n.basis2,r),Y(n),function(e,t){Math.abs((0,A.Om)(e.basis1,e.basis2)/((0,A.Bw)(e.basis1)*(0,A.Bw)(e.basis2)))>1e-6&&z().warn(t,"Provided basis vectors are not perpendicular"),Math.abs((0,A.Om)(e.basis1,se(e)))>1e-6&&z().warn(t,"Basis vectors and plane normal are not perpendicular"),Math.abs(-(0,A.Om)(se(e),e.origin)-e.plane[3])>1e-6&&z().warn(t,"Plane offset is not consistent with plane origin")}(n,"fromValues()"),n}function Y(e){(0,V.mR)(e.basis2,e.basis1,e.origin,e.plane)}function K(e,t,r){e!==r&&$(e,r);let n=(0,A.hs)(Z.rq.get(),se(e),t);return(0,A.WQ)(r.origin,r.origin,n),r.plane[3]-=t,r}function X(e,t=B()){let r=(e[2]-e[0])/2,n=(e[3]-e[1])/2;return(0,A.hZ)(t.origin,e[0]+r,e[1]+n,0),(0,A.hZ)(t.basis1,r,0,0),(0,A.hZ)(t.basis2,0,n,0),(0,V.fA)(0,0,1,0,t.plane),t}function J(e,t,r){return!!(0,V.Ui)(e.plane,t,r)&&oe(e,r)}function ee(e,t,r){let n=de.get();he(e,t,n,de.get());let i=1/0;for(let a of pe){let s=ue(e,a,fe.get()),o=Z.rq.get();if((0,V.T7)(n,s,o)){let e=(0,A.oW)(Z.rq.get(),t.origin,o),n=Math.abs((0,C.XM)((0,A.Om)(t.direction,e)));n<i&&(i=n,(0,A.C)(r,o))}}return i===1/0?te(e,t,r):r}function te(e,t,r){if(J(e,t,r))return r;let n=de.get(),i=de.get();he(e,t,n,i);let a=1/0;for(let s of pe){let o=ue(e,s,fe.get()),l=Z.rq.get();if((0,V.gv)(n,o,l)){let e=(0,j.kb)(t,l);if(!(0,V.BX)(i,l))continue;e<a&&(a=e,(0,A.C)(r,l))}}return ie(e,t.origin)<a&&re(e,t.origin,r),r}function re(e,t,r){let n=(0,V._I)(e.plane,t,Z.rq.get()),i=(0,G.H6)(le(e,e.basis1),n,-1,1,Z.rq.get()),a=(0,G.H6)(le(e,e.basis2),n,-1,1,Z.rq.get());return(0,A.Re)(r,(0,A.WQ)(Z.rq.get(),i,a),e.origin),r}function ne(e,t,r){let{origin:n,basis1:i,basis2:a}=e,s=(0,A.Re)(Z.rq.get(),t,n),o=(0,W.gr)(i,s),l=(0,W.gr)(a,s),u=(0,W.gr)(se(e),s);return(0,A.hZ)(r,o,l,u)}function ie(e,t){let r=ne(e,t,Z.rq.get()),{basis1:n,basis2:i}=e,a=(0,A.Bw)(n),s=(0,A.Bw)(i),o=Math.max(Math.abs(r[0])-a,0),l=Math.max(Math.abs(r[1])-s,0),u=r[2];return o*o+l*l+u*u}function ae(e,t){let r=-e.plane[3];return(0,W.gr)(se(e),t)-r}function se(e){return(0,V.Qj)(e.plane)}function oe(e,t){let r=(0,A.Re)(Z.rq.get(),t,e.origin),n=(0,A.m3)(e.basis1),i=(0,A.m3)(e.basis2),a=(0,A.Om)(e.basis1,r),s=(0,A.Om)(e.basis2,r);return-a-n<0&&a-n<0&&-s-i<0&&s-i<0}function le(e,t){let r=fe.get();return(0,A.C)(r.origin,e.origin),(0,A.C)(r.vector,t),r}function ue(e,t,r){let{basis1:n,basis2:i,origin:a}=e,s=(0,A.hs)(Z.rq.get(),n,t.origin[0]),o=(0,A.hs)(Z.rq.get(),i,t.origin[1]);(0,A.WQ)(r.origin,s,o),(0,A.WQ)(r.origin,r.origin,a);let l=(0,A.hs)(Z.rq.get(),n,t.direction[0]),u=(0,A.hs)(Z.rq.get(),i,t.direction[1]);return(0,A.hs)(r.vector,(0,A.WQ)(l,l,u),2),r}function he(e,t,r,n){let i=se(e);(0,V.mR)(i,t.direction,t.origin,r),(0,V.mR)((0,V.Qj)(r),i,t.origin,n)}const ce={plane:(0,V.vt)(),origin:(0,w.fA)(0,0,0),basis1:(0,w.fA)(1,0,0),basis2:(0,w.fA)(0,1,0)},de=new k.I(V.vt),fe=new k.I(G.vt),ge=(0,w.vt)(),me=new k.I(()=>B()),pe=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],_e=(0,I.vt)(),be=(0,I.vt)();Object.freeze(Object.defineProperty({__proto__:null,altitudeAt:ae,axisAt:function(e,t,r,n){return function(e,t,r){switch(t){case 0:(0,A.C)(r,e.basis1),(0,A.S8)(r,r);break;case 1:(0,A.C)(r,e.basis2),(0,A.S8)(r,r);break;case 2:(0,A.C)(r,se(e))}return r}(e,r,n)},cameraFrustumCoverage:function(e,t){return(t-e)/t},closestPoint:te,closestPointOnSilhouette:ee,copy:$,copyWithoutVerify:function(e,t){(0,A.C)(t.origin,e.origin),(0,A.C)(t.basis1,e.basis1),(0,A.C)(t.basis2,e.basis2),(0,V.C)(t.plane,e.plane)},create:B,distance:function(e,t){return Math.sqrt(ie(e,t))},distance2:ie,distanceToSilhouette:function(e,t){let r=-1/0;for(let n of pe){let i=ue(e,n,fe.get()),a=(0,G.kb)(i,t);a>r&&(r=a)}return Math.sqrt(r)},elevate:K,equals:function(e,t){return e===t||null==e&&null==t||null!=e&&null!=t&&(0,A.t2)(e.basis1,t.basis1)&&(0,A.t2)(e.basis2,t.basis2)&&(0,A.t2)(e.origin,t.origin)},extrusionContainsPoint:function(e,t){return(0,V.mN)(e.plane,t)>0&&oe(e,t)},fromAABoundingRect:X,fromValues:H,getExtent:function(e,t){let r=e.basis1[0],n=e.basis2[1],[i,a]=e.origin;return(0,Q.fA)(i-r,a-n,i+r,a+n,t)},intersectRay:J,intersectRayClosestSilhouette:function(e,t,r){if(J(e,t,r))return r;let n=ee(e,t,Z.rq.get());return(0,A.WQ)(r,t.origin,(0,A.hs)(Z.rq.get(),t.direction,(0,A.Io)(t.origin,n)/(0,A.Bw)(t.direction))),r},normal:se,projectPoint:re,projectPointLocal:ne,rotate:function(e,t,r,n){return e!==n&&$(e,n),(0,x.$0)(be,t,r),(0,A.Z0)(n.basis1,e.basis1,be),(0,A.Z0)(n.basis2,e.basis2,be),Y(n),n},setAltitudeAt:function(e,t,r,n){let i=ae(e,t),a=(0,A.hs)(ge,se(e),r-i);return(0,A.WQ)(n,t,a),n},setExtent:function(e,t,r){return X(t,r),K(r,ae(e,e.origin),r),r},transform:function(e,t,r){return e!==r&&$(e,r),(0,x.B8)(_e,t),(0,x.mg)(_e,_e),(0,A.Z0)(r.basis1,e.basis1,_e),(0,A.Z0)(r.basis2,e.basis2,_e),(0,A.Z0)((0,V.Qj)(r.plane),(0,V.Qj)(e.plane),_e),(0,A.Z0)(r.origin,e.origin,t),(0,V.mP)(r.plane,r.plane,r.origin),r},up:ce,updateUnboundedPlane:Y,wrap:function(e,t,r){let n=me.get();return n.origin=e,n.basis1=t,n.basis2=r,n.plane=(0,V.LV)(0,0,0,0),Y(n),n}},Symbol.toStringTag,{value:"Module"}));var ye=r(94008);(0,w.vt)(),(0,w.vt)();var ve=r(89707);class Ee extends ve.H{constructor(e,t){super(NaN,NaN),this.id=e,this.serviceMbsInIndexSR=t,this._serviceMbsInRenderSRElevationAdjusted=new ye.iy(0,0,0,-1),this._serviceMbsInRenderSR=new ye.iy(0,0,0,-1),this._serviceMbsElevationUpdateExtent=null,this._mbsConeInRenderSR=null}get serviceMbsInRenderSRElevationAdjusted(){return this._serviceMbsInRenderSRElevationAdjusted}updateServiceMbsInRenderSRElevationAdjusted(e){return this._serviceMbsInRenderSRElevationAdjusted.copyFrom(e),this._serviceMbsInRenderSRElevationAdjusted}get serviceMbsInRenderSR(){return this._serviceMbsInRenderSR}updateServiceMbsInRenderSR(e){return this._serviceMbsInRenderSR.copyFrom(e),null!=this._serviceMbsElevationUpdateExtent&&(0,Q.Ie)(this._serviceMbsElevationUpdateExtent),this._serviceMbsInRenderSR}get serviceMbsElevationUpdateExtent(){return this._serviceMbsElevationUpdateExtent??=(0,Q.Ie)()}get mbsConeInRenderSR(){return this._mbsConeInRenderSR}updateMbsConeInRenderSR(e){return this._mbsConeInRenderSR=e.clone(),this._mbsConeInRenderSR}invalidateServiceBVsInRenderSR(){this._serviceMbsInRenderSRElevationAdjusted.invalidate(),this._serviceMbsInRenderSR.invalidate(),null!=this._serviceMbsElevationUpdateExtent&&(0,Q.Ie)(this._serviceMbsElevationUpdateExtent),this._mbsConeInRenderSR=null,this.serviceObbInRenderSR?.invalidate()}shareServiceBVsInRenderSRWith(e){this.serviceObbInRenderSR=e.serviceObbInRenderSR,this._serviceMbsInRenderSRElevationAdjusted=e._serviceMbsInRenderSRElevationAdjusted,this._serviceMbsInRenderSR=e._serviceMbsInRenderSR,this._serviceMbsElevationUpdateExtent=e._serviceMbsElevationUpdateExtent??=(0,Q.Ie)(),this._mbsConeInRenderSR=e._mbsConeInRenderSR}}class Re extends Ee{constructor(e,t,r,n,i,a,s,o,l,u,h){super(e,r),this.index=t,this.childCount=n,this.level=i,this.resources=a,this.version=s,this.lodMetric=o,this.maxError=l,this.numFeatures=u,this.failed=!1,this.cacheState=0,this.vertexCount=0,this.memory=0,this.childrenLoaded=0,this.hasModifications=!1,this.imModificationImpact=4,this.elevationAgnosticBoundingVolume=new Me,this.serviceObbInIndexSR=h}invalidateServiceBVsInRenderSR(){super.invalidateServiceBVsInRenderSR(),this.elevationAgnosticBoundingVolume.invalidate()}}class Me{constructor(){this._data=[0,0,0,Me.invalidRadius]}static{this.invalidRadius=-2}invalidate(){this._data[3]=Me.invalidRadius}get valid(){return this._data[3]!==Me.invalidRadius}get radius(){return this._data[3]}getAxis(e){return e[0]=this._data[0],e[1]=this._data[1],e[2]=this._data[2],e}set(e,t){this._data[0]=e[0],this._data[1]=e[1],this._data[2]=e[2],this._data[3]=t}intersectsFrustumConservative(e,t,r){if(!this.valid)return!0;let n=this.getAxis(Se),{center:i,radius:a}=e.boundingSphere,s=a+r;return 1===t?this.radius>Te||function(e,t,r,n){let i=(0,A.Bw)(r);if(i<=n)return!0;let a=(0,A.Om)(e,r);if(a<=0)return-a<=n;let s=(0,C.qE)(a/i,-1,1),o=Math.sqrt(1-s*s),l=(0,C.qE)(n/i,0,1);return o*Math.sqrt(1-l*l)-l*s<=t}(n,this.radius,i,s):function(e,t,r,n){let i=r[0]-e[0],a=r[1]-e[1],s=t+n;return i*i+a*a<=s*s}(n,this.radius,i,s)&&function(e,t,r,n,i){for(let a of i){let i=a[0],s=a[1],o=a[2],l=o>0?r:n;if(i*e[0]+s*e[1]+o*l+a[3]-Math.hypot(i,s)*t>0)return!1}return!0}(n,this.radius,i[2]-s,i[2]+s,e.planes)}}const Se=(0,w.vt)(),Te=.9;var xe=r(25992),Ie=r(66480),Ae=r(57005),we=r(4431),Ce=r(62747),Ne=r(58682),Oe=r(92359);class Le{constructor(e,t,r){this._layer=e,this._descriptor=t,this._options=r,this._subtaskAbortController=new AbortController,this._highest=-1/0,this._signal=AbortSignal.any([r.signal,this._subtaskAbortController.signal]),this._indexSpatialReference=(0,Ie.Rm)(e),this._vertexSpatialReference=(0,Ie.Dd)(e),this._intersectionSpaceSpatialReference=function(e,t){return e?(0,F.lO)(t):t.isGeographic?U.A.PlateCarree:t}(this._indexSpatialReference.isGeographic,this._indexSpatialReference),this._indexToVertexProjector=(0,N.wy)(this._indexSpatialReference,this._vertexSpatialReference),this._vertexToIntersectionSpaceProjector=(0,N.wy)(this._vertexSpatialReference,this._intersectionSpaceSpatialReference),this.frameTask=r.scheduler.registerTask(Oe.W6.ELEVATION_QUERY),this.promise=this._run()}async _run(){let e={stack:[],error:void 0,hasError:!1};try{(0,n.mS)(e,this.frameTask,!1);try{let e=this._descriptor;if("point"!==e.geometry.type)throw new o.A("elevation-query:invalid-geometry","Only point geometries can be used to query elevation");if(null==this._indexToVertexProjector||null==this._vertexToIntersectionSpaceProjector)throw new o.A("integrated-mesh-elevation-query:projection","Failed to create projection for elevation query.");let t=await e.project(this._indexSpatialReference,this._signal);(0,d.Te)(this._signal),t??this._throwSpatialReferenceMismatchError();let r=t.coordinates[0],n=function(e,t,r,n,i){let a=(0,w.fA)(e,t,r),s=(0,w.fA)(e,t,r-1e3),o=(0,w.vt)(),l=(0,w.vt)();return(0,q.F)(a,n,o,i)&&(0,q.F)(s,n,l,i)?(0,j.Cr)(o,l):null}(r.x,r.y,this.getRootRayOriginZ(),this._indexSpatialReference,this._intersectionSpaceSpatialReference);return n??this._throwSpatialReferenceMismatchError(),this._queryRay=n,await this.visitRoot(),(0,d.Te)(this._signal),r.z=this._highest===-1/0?qe:this._highest,t}catch(e){throw this._subtaskAbortController.abort(),e}}catch(t){e.error=t,e.hasError=!0}finally{(0,n.hk)(e)}}_throwSpatialReferenceMismatchError(){throw new o.A("elevation-query:spatial-reference-mismatch",`Cannot query elevation in '${this._descriptor.spatialReference.wkid}' on an elevation service in '${this._indexSpatialReference.wkid}'`)}_intersectsQueryObb(e){let t=this._queryRay,r=new Ae.ab;return e.transform(r,this._indexSpatialReference,this._intersectionSpaceSpatialReference),r.intersectRay(t.origin,t.direction)}intersectsQueryBounds(e){if(null==e)return!0;let t=this._queryRay;if(null!=e.obb)return this._intersectsQueryObb(Ae.ab.fromJSON(e.obb));let r=new ye.iy;return!function(e,t,r,n){if(null==e||null==t||null==n)return!1;let i=(0,N.Tp)(t,n);if(null==i?.projector)return!1;if(i.projector===N.pO)return r.copyFrom(e),!0;let{source:a,dest:s,projector:o}=i;if(3===s.spatialReferenceId){let t=N.w5[a.spatialReferenceId][2];return null!=t&&(t(e.center,0,P,0),(0,N.s7)(P,0,r.center,0),r.radius=L(P[1],e.center[2],e.radius,O.$O.radius),!0)}if(2!==a.spatialReferenceId&&5!==a.spatialReferenceId||11!==s.spatialReferenceId){o(e.center,0,r.center,0);let t=a.metersPerUnit??1,n=s.metersPerUnit??1;r.radius=e.radius*t/n}else{let t=N.w5[a.spatialReferenceId][1],n=N.w5[1][11],i=e.radius;null!=t&&null!=n&&(i=L(e.center[1],e.center[2],e.radius,O.$O.radius)),o(e.center,0,r.center,0),r.radius=i}return!0}(new ye.iy(e.mbs),this._indexSpatialReference,r,this._intersectionSpaceSpatialReference)||r.intersectRay(t)}async _processLeafNode(e){let t=await this._layer.elevationQueryNodeLoader.loadNodeData(e,this._signal);if((0,d.Te)(this._signal),null==t.geometryBuffer||null==t.geometryDescriptor)return;let r=await this.transformNode(e,t);(0,d.Te)(this._signal),null!=r&&await this.frameTask.schedule(()=>{this._highest=this.intersectTransformedGeometry(r,this._highest,this._options.elevationOffset)},this._signal)}async transformNode(e,t){let r=e.serviceMbsInIndexSR;if(null==r)return null;let n=(0,xe.C)(r,0,Ue,this._indexSpatialReference,this._intersectionSpaceSpatialReference),i={context:`i3s-elevation-query-${this._layer.uid}`,geometryBuffer:t.geometryBuffer,geometryData:null,geometryDescriptor:t.geometryDescriptor,layouts:[Fe],globalTrafo:n,geometryElevationOffset:0,mbs:r.toJSON(),obbData:e.serviceObbInIndexSR?.data,elevationOffset:0,planetRadiusInGlobalMode:0,needNormals:!1,computeNormals:!1,normalReferenceFrame:Ue,indexToVertexProjector:this._indexToVertexProjector,vertexToRenderProjector:this._vertexToIntersectionSpaceProjector},a=await this._layer.processElevationQueryGeometry(i,this._signal);return(0,d.Te)(this._signal),a}intersectTransformedGeometry(e,t,r){let n=e.globalTrafo;if(null==(0,x.B8)(ke,n))return t;let i=this._queryRay,a=(0,A.Z0)(Qe,i.origin,ke),s=(0,A.WQ)(Ge,i.origin,i.direction),o=(0,A.Z0)(Ve,s,ke),l=(0,A.jb)(je,o,a),{data:u,indices:h}=e.transformedGeometry.positionData,c=h.length/3,d=t;return(0,Ne.h7)(a,l,0,c,h,u,3,!1,e=>{let t=(0,A.hs)(We,l,e);(0,A.WQ)(t,t,a);let i=(0,A.Z0)(Ze,t,n),s=ze;if((0,q.F)(i,this._intersectionSpaceSpatialReference,s,this._layer.spatialReference)){let e=s[2]+r;d=Math.max(d,e)}}),d}async requestJSON(e){let t=await this._layer.elevationQueryDataRequester.request(e,"json",this._signal);return(0,d.Te)(this._signal),t}}class Pe extends Le{constructor(e,t,r,n){super(e,t,r),this._pendingPages=new Map,this._loadedPages=new Map,this._pageSize=n.pageSize,this._rootIndex=n.rootIndex,this._urlPrefix=n.urlPrefix;let i=this._pageId(this._rootIndex),a=this._rootIndex-i*this._pageSize,s=Ae.ab.fromJSON(n.rootPage.nodes[a].obb);this._rootRayOriginZ=s.centerZ+s.radius+1,this._loadedPages.set(i,n.rootPage)}visitRoot(){return this._visitNode(this._rootIndex)}getRootRayOriginZ(){return this._rootRayOriginZ}_pageId(e){return Math.floor(e/this._pageSize)}getPage(e){let t=this._loadedPages.get(e);if(null!=t)return Promise.resolve(t);let r=this._pendingPages.get(e);if(null!=r)return r;let n=this.requestJSON(`${this._urlPrefix}${e}`);return this._pendingPages.set(e,n),n.then(t=>{this._loadedPages.set(e,t),this._pendingPages.delete(e)},()=>this._pendingPages.delete(e)),n}async _visitNode(e){let t=this._pageId(e),r=await this.getPage(t);(0,d.Te)(this._signal);let n=r.nodes[e-t*this._pageSize],i=Ae.ab.fromJSON(n.obb);if(!this._intersectsQueryObb(i))return;let{children:a}=n;if(null!=a&&a.length>0)return await Promise.all(a.map(e=>this._visitNode(e))),void(0,d.Te)(this._signal);let s=this._createNode(e,n,i);null!=s&&(await this._processLeafNode(s),(0,d.Te)(this._signal))}_createNode(e,t,r){let{mesh:n}=t;if(null==n?.geometry)return null;let i=new ye.iy(r.getCenter((0,w.vt)()),r.radius),{geometry:a,material:s}=n;return new Re(`${e}`,e,i,t.children?.length??0,0,{hasSharedResource:!1,isEmpty:!1,geometry:`${a.resource}`,geometryDefinition:a.definition,materialDefinition:s?.definition??-1},"",0,0,a.featureCount??null,r)}}class De extends Le{constructor(e,t,r,n){super(e,t,r),this._rootNode=n.rootNode,this._urlPrefix=n.urlPrefix}visitRoot(){return this.intersectsQueryBounds(this._rootNode)?this._visitNodeData(this._rootNode,null!=this._rootNode.obb):Promise.resolve()}getRootRayOriginZ(){return this._rootNode.mbs[2]+this._rootNode.mbs[3]+1}_visitNode(e){return this.intersectsQueryBounds(e)?this._visitNodeAsync(e):Promise.resolve()}async _visitNodeAsync(e){let t=await this.requestJSON(`${this._urlPrefix}${e.id}`);(0,d.Te)(this._signal),await this._visitNodeData(t,null!=e.obb),(0,d.Te)(this._signal)}async _visitNodeData(e,t){if(!t&&null!=e.obb&&!this._intersectsQueryObb(Ae.ab.fromJSON(e.obb)))return;let{children:r}=e;if(null!=r&&r.length>0)return await Promise.all(r.map(e=>this._visitNode(e))),void(0,d.Te)(this._signal);let n=this._createNode(e);null!=n&&(await this._processLeafNode(n),(0,d.Te)(this._signal))}_createNode(e){let{geometryData:t,id:r}=e;if(null==t||0===t.length)return null;let n=null==e.obb?null:Ae.ab.fromJSON(e.obb),i=new ye.iy(e.mbs);return new Re(r,0,i,e.children?.length??0,0,{hasSharedResource:null!=e.sharedResource,isEmpty:!1,geometry:r,geometryDefinition:0},e.version??"",0,0,null,n)}}const qe=Number.MAX_VALUE,Ue="none",Fe=(0,we.U)((0,Ce.hH)(new Ce.W7(!1,!1,0))),ke=(0,I.vt)(),Qe=(0,w.vt)(),Ge=(0,w.vt)(),Ve=(0,w.vt)(),je=(0,w.vt)(),We=(0,w.vt)(),Ze=(0,w.vt)(),ze=(0,w.vt)();var Be=r(50805),$e=r(58325),He=r(24212),Ye=r(80215),Ke=r(97159),Xe=r(16215),Je=r(98697),et=r(56507),tt=r(97768),rt=r(50075);class nt{constructor(e,t){this._customParameters=e,this._apiKey=t,this._activeRequests=new Set}isFull(e){return(0,rt._i)(e)}request(e,t,r){let n=new AbortController,i=(0,d.NY)(r,()=>n.abort()),a={...rt.Fz,signal:n.signal,responseType:t,query:{...this._customParameters,token:this._apiKey}},s=(0,et.A)(e,a),o={abortController:n,abortHandle:i};return this._activeRequests.add(o),s.then(({data:e})=>e).finally(()=>{o.abortController=null,o.abortHandle=(0,tt.xt)(o.abortHandle),this._activeRequests.delete(o)})}cancelAll(){this._activeRequests.forEach(e=>{e.abortController=(0,tt.DC)(e.abortController),e.abortHandle=(0,tt.xt)(e.abortHandle)}),this._activeRequests.clear()}}var it=r(4718),at=r(84952),st=r(59418),ot=r(85334);r(91829),r(76200);var lt=r(74810),ut=r(49788);function ht(e){return e.sort((e,t)=>e.encoding-t.encoding)}const ct={ktx2:1,basis:2,dds:4,png:8,jpg:16,"ktx-etc2":32},dt={"image/ktx2":2,"image/x.basis":2,"image/vnd-ms.dds":4,"image/png":8,"image/jpg":16,"image/jpeg":16,"image/ktx":32};class ft{constructor(e,t,r,n,i,a){if(this._requester=t,this._logger=r,this._defaultGeometrySchema=n,this._requiredAttributes=i,this._options=a,this._logLayer=e,this._layerUrl=e.parsedUrl.path,this._geometryDefinitions=e.geometryDefinitions,e.materialDefinitions){let t=e.textureSetDefinitions;this._materialAndTextures=e.materialDefinitions.map(r=>function(e,t,r){let n=new Map,i=(e,t)=>{if(null==e)return-1;let r=n.get(e.id);if(r)return r.usage|=t,r.id;let i=n.size;return n.set(e.id,{id:i,usage:t}),i},a=t.pbrMetallicRoughness,s=a?.baseColorFactor?(0,ot.sn)(a.baseColorFactor):null,o=t.emissiveFactor,l=r&&0===a?.metallicFactor||(0,lt.Jr)({normalTexture:t.normalTexture,emissiveTexture:t.emissiveTexture,emissiveFactor:t.emissiveFactor,occlusionTexture:t.occlusionTexture,metallicRoughnessTexture:a?.metallicRoughnessTexture,metallicFactor:a?.metallicFactor,roughnessFactor:a?.roughnessFactor}),u=l?lt.Bt[0]:a?.metallicFactor??lt.mb[0],h=l?lt.Bt[1]:a?.roughnessFactor??lt.mb[1],c="mask"===t.alphaMode?33:1,d={baseColorFactor:s?[s[0],s[1],s[2],s[3]]:[1,1,1,1],baseColorTextureId:i(a?.baseColorTexture,c),metallicRoughnessTextureId:i(a?.metallicRoughnessTexture,2),metallicFactor:u,roughnessFactor:h},f={alphaMode:t.alphaMode,alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,cullFace:"none"===t.cullFace?0:"back"===t.cullFace?2:+("front"===t.cullFace),normalTextureId:i(t.normalTexture,4),emissiveTextureId:i(t.emissiveTexture,16),occlusionTextureId:i(t.occlusionTexture,8),emissiveFactor:o?[o[0],o[1],o[2]]:[0,0,0],metallicRoughness:d,wrapTextures:!1,hasParametersFromSource:l},g=[];return n.forEach(({usage:t},r)=>{let n=null!=e&&e[r]&&e[r].formats,i=n?ht(n.map(({name:e,format:t})=>({name:e,encoding:ct[t]}))):[];g.push({id:r,usage:t,encodings:i})}),{material:f,textures:g}}(t,r,"integrated-mesh"===e.type))}}_loadAttribute(e,t,r){let n=`${this._layerUrl}/nodes/${e.resources.attributes}/attributes/${t.key}/0`;return this._requester.request(n,"array-buffer",r).then(e=>(0,st.m0)(t,e))}async loadAttributes(e,t,r){let n=await Promise.allSettled(t.map(t=>this._loadAttribute(e,t.attributeStorageInfo,r))),i={};for(let r=0;r<t.length;++r){let a=n[r],s=t[r];if("fulfilled"===a.status){let e=a.value;i[s.name]=e}else{let t=a.reason;(0,d.QP)(t),this._logger.error("#loadAttributes",this._logLayer,`Failed to load attributeData for '${s.name}' on node '${e.id}'`,t)}}return i}async loadNodeData(e,t){let r=null!=this._requiredAttributes&&e.resources.attributes?(0,a.Ke)(this.loadAttributes(e,this._requiredAttributes,t)):null,{bufferDefinition:n,bufferIndex:i}=function(e,t){let r={bufferDefinition:null,bufferIndex:0},n=t.resources.geometryDefinition;if(null==e||null==n||n<0)return r;let i=n>=0?e[n].geometryBuffers:null;if(null==i)return r;for(let e=0;e<i.length;e++){let t=i[e];if(null!=t.compressedAttributes){if("draco"===t.compressedAttributes.encoding&&!(0,u.A)("disable-feature:i3s-draco"))return r.bufferIndex=e,r.bufferDefinition=t,r}else r.bufferIndex=e,r.bufferDefinition=i[e]}return r}(this._geometryDefinitions,e),s=!!e.resources.geometry,o=s?(0,a.Ke)(this._loadGeometry(e.resources.geometry,i,t)):null,l=e.resources.hasSharedResource?await this._loadShared(e,t):null,h=e.resources.materialDefinition,c=this._materialAndTextures&&null!=h&&h>=0?this._materialAndTextures[h]:null==l?null:function(e){let t=e?.materialDefinitions?Object.keys(e.materialDefinitions)[0]:null,r=e?.textureDefinitions?Object.keys(e.textureDefinitions)[0]:null,n=t?e.materialDefinitions?.[t]:null,i=r?e.textureDefinitions?.[r]:null,a={alphaMode:"opaque",alphaCutoff:ut.Q,doubleSided:!0,cullFace:0,normalTextureId:-1,emissiveTextureId:-1,occlusionTextureId:-1,emissiveFactor:[0,0,0],metallicRoughness:{baseColorFactor:[.8,.8,.8,1],baseColorTextureId:-1,metallicRoughnessTextureId:-1,metallicFactor:0,roughnessFactor:.6},wrapTextures:!1,hasParametersFromSource:!0};if(null!=n){let e=n.params;e.diffuse&&((0,ot.KV)(e.diffuse),a.metallicRoughness.baseColorFactor=[e.diffuse[0],e.diffuse[1],e.diffuse[2],1]),null!=e.doubleSided&&(a.doubleSided=e.doubleSided,a.cullFace=e.doubleSided?0:2),("none"===e.cullFace||"front"===e.cullFace||"back"===e.cullFace)&&(a.cullFace="none"===e.cullFace?0:"back"===e.cullFace?2:1),e.transparency&&(a.metallicRoughness.baseColorFactor[3]=(0,C.qE)(1-e.transparency,0,1)),(e.useVertexColorAlpha||a.metallicRoughness.baseColorFactor[3]<1)&&(a.alphaMode="blend")}let s=[];if(null!=i){i.wrap&&("repeat"===i.wrap[0]||"repeat"===i.wrap[1])&&(a.wrapTextures=!0);let e=1;"rgba"===i.channels&&(a.alphaMode="blend",e|=32);let t=i.images.length-1,r=i.images[t],n=e=>e?.split("/").pop(),o=Array.isArray(i.encoding)?ht(i.encoding.map((e,t)=>({name:n(r.href[t]),encoding:dt[e]||0}))):[{name:n(r.href),encoding:dt[i.encoding]||0}];s.push({id:0,usage:e,encodings:o}),a.metallicRoughness.baseColorTextureId=0}return{material:a,textures:s}}(l),d=c?.material,f=c?.textures??[],g=`${e.id}`,m=!s&&this._options.loadFeatureData,p=m?await this._loadFeatureData(g,t):null,_=m?function(e){if(!e)return null;for(let t of e.featureData){let e=t.geometries;if(null!=e)for(let r of e)return{featureIds:[t.id],featureDataPosition:t.position,geometries:[r]}}return null}(p):{featureIds:[],geometries:[{type:"ArrayBufferView",params:{material:d}}],featureDataPosition:[0,0,0]},b=null==_?function(e){if(!e)return null;let t=[];for(let r of e.featureData)null!=r.position&&t.push({featureIds:[r.id],featureDataPosition:r.position,geometries:[]});return t}(p):null,y=f.length>0?(0,a.Ke)(this.loadTextures(e,f,t)):null,v=null,E=null;if(o){v=(0,a.QA)(await o);let e=function(e,t){if(!e||!t?.materialDefinitions)return e;let r=Object.keys(t.materialDefinitions)[0];return!t.materialDefinitions[r].params.vertexRegions&&e.vertexAttributes.region&&delete(e=(0,it.o8)(e)).vertexAttributes.region,e}(this._defaultGeometrySchema,l);E=(0,st.qs)(n,e)}let R=y?(0,a.QA)(await y):null,M=r?(0,a.QA)(await r):{},S=M?{attributeData:M,loadedAttributes:this._requiredAttributes}:null;if(null!=_)return{geometryData:_,attributeDataInfo:S,geometryBuffer:v,geometryDescriptor:E,requiredTextures:f,textureData:R};if(null!=b)return{pointData:b,attributeDataInfo:S,geometryBuffer:v,geometryDescriptor:E,requiredTextures:f,textureData:R};throw Error()}static _addAbsoluteHrefTexture(e,t){let r=e.textureDefinitions;if(null!=r)for(let e of Object.keys(r))for(let n of r[e].images)n.hrefConcat=Array.isArray(n.href)?n.href.map(e=>(0,at.s2)(e,t)):(0,at.s2)(n.href,t)}static _fixTextureEncodings(e){let t=e.textureDefinitions;if(null!=t)for(let e in t){let r=t[e];if(Array.isArray(r.encoding))for(let e=0;e<r.encoding.length;e++){let t=r.encoding[e];t.startsWith("data:")&&(r.encoding[e]=t.slice(5))}else{let e=r.encoding;e.startsWith("data:")&&(r.encoding=e.slice(5))}}}async _loadShared(e,t){if(null==e.resources.geometry)return{};let r=`${this._layerUrl}/nodes/${e.resources.geometry}/shared`,n=await this._requester.request(r,"json",t);return ft._fixTextureEncodings(n),ft._addAbsoluteHrefTexture(n,r),n}_loadTexture(e,t,r,n,i){return 4===n||1===n||2===n?this._requester.request(e,"array-buffer",i).then(e=>({id:t,usage:r,data:e,encoding:n})):this._requester.request(e,"image",i).then(e=>({id:t,usage:r,data:e,encoding:n}))}loadTextures(e,t,r){let n=this._options.textureUsageMask;return Promise.all(t.map(t=>{if(0===(t.usage&n))return null;let i=function(e,t){if(null!=t)return e.find(e=>0!==(e.encoding&t))}(t.encodings,this._options.textureEncodings);if(null==i)return this._logger.error("#loadTextures",this._logLayer,`No known encoding for texture found on node ${e.id}`),Promise.reject();let a=e.resources.texture||e.id,s=`${this._layerUrl}/nodes/${a}/textures/${i.name}`;return this._loadTexture(s,t.id,t.usage,i.encoding,r)}))}_loadFeatureData(e,t){let r=`${this._layerUrl}/nodes/${e}/features/0`;return this._requester.request(r,"json",t)}_loadGeometry(e,t,r){let n=`${this._layerUrl}/nodes/${e}/geometries/${t}`;return this._requester.request(n,"array-buffer",r)}}var gt=r(36005);let mt=class extends((0,M.w6)((0,b.b)((0,v.q)((0,E.A)((0,R.j)((0,c.M)((0,y.d)((0,_.p)((0,s.OU)(p.A)))))))))){constructor(...e){super(...e),this.geometryType="mesh",this.operationalLayerType="IntegratedMeshLayer",this.type="integrated-mesh",this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.profile="mesh-pyramids",this.modifications=null,this._modificationsSource=null,this.path=null,this.definitionExpression=null,this._elevationQueryAbortController=new AbortController,this._elevationQueryWorkerContext=`i3s-elevation-query-${this.uid}`,this._elevationQueryWorkerHandle=null,this._elevationQueryWorkerSetup=null,this._modificationsGeneration=0}destroy(){this._elevationQueryAbortController.abort();let e=this._elevationQueryWorkerHandle;this._elevationQueryWorkerHandle=null,this._elevationQueryWorkerSetup=null,e?.destroyContextAndSelf(this._elevationQueryWorkerContext),super.destroy()}initialize(){this.addHandles([(0,f.on)(()=>this.modifications,"after-changes",()=>{this.modifications=this.modifications,this._modificationsGeneration++},f.OH),(0,f.wB)(()=>this.modifications,()=>this._modificationsGeneration++,f.OH),(0,f.wB)(()=>this.memoizedElevationQueryDependencies,()=>this._abortElevationQueriesAfterDependencyChange(),f.OH)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readModifications(e,t,r){this._modificationsSource={url:(0,Ke.f)(e,r),context:r}}set elevationInfo(e){(null==e||"absolute-height"===e.mode)&&this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}get _elevationQueryWorker(){return this._elevationQueryWorkerHandle??=new Je.Cm((e,t)=>Oe.nu.schedule(e,t))}get memoizedElevationQueryDependencies(){return[this.elevationInfo?.offset,this._modificationsGeneration]}async queryElevation(e,t,r){let s={stack:[],error:void 0,hasError:!1};try{let u=r?.noDataValue??Number.MAX_VALUE,h=this._elevationQueryWorker,c=new AbortController;e.addHandles((0,l.rE)(c),c),(0,n.mS)(s,(0,l.Bf)((0,l.hA)(()=>e.removeHandles(c))),!1);let f=AbortSignal.any([r?.signal,this._elevationQueryAbortController.signal,c.signal].filter(i.Ru));await this.load({signal:f}),(0,d.Te)(f);let g=T.q.fromGeometry(t),m={signal:f,elevationOffset:this.elevationInfo?.offset??0,scheduler:e.resourceController.scheduler};if(null==this._elevationQueryWorkerSetup){let e=this.store?.defaultGeometrySchema;null!=e&&(this._elevationQueryWorkerSetup=(0,a.Ke)(h.setLegacySchema(this._elevationQueryWorkerContext,e)))}let p=await async function(e,t,r){let n=await e.indexInfo;if((0,d.Te)(r.signal),null==n)throw new o.A("integrated-mesh-elevation-query:index-missing","I3S index information is missing.");return"page"===n.type?new Pe(e,t,r,n).promise:new De(e,t,r,n).promise}(this,g,m);(0,d.Te)(f);let _=p.coordinates[0].z===qe;_&&(p.coordinates[0].z=u);let b=await p.project(t.spatialReference,f);(0,d.Te)(f);let y=b??g.clone(),v={geometry:y.export(),noDataValue:u};return r?.returnSampleInfo&&(v.sampleInfo=y.coordinates.map(()=>({demResolution:_?-1:1}))),v}catch(e){s.error=e,s.hasError=!0}finally{(0,n.hk)(s)}}_abortElevationQueriesAfterDependencyChange(){let e=this._elevationQueryAbortController;this._elevationQueryAbortController=new AbortController,e.abort()}async processElevationQueryGeometry(e,t){let r=await this._elevationQueryWorkerSetup;return null!=r&&(0,a.QA)(r),(0,d.Te)(t),this._elevationQueryWorker.invoke(e,t)}async _doLoad(e){let t=e?.signal;try{await this.loadFromPortal({supportedTypes:["Scene Service"]},e)}catch(e){(0,d.QP)(e)}if((0,d.Te)(t),await this._fetchService(t),(0,d.Te)(t),null!=this._modificationsSource){let r=await $e.A.fromUrl(this._modificationsSource.url,this.spatialReference,e);(0,d.Te)(t),this.setAtOrigin("modifications",r,this._modificationsSource.context.origin),this._modificationsSource=null}await this._fetchIndexAndUpdateExtent(this.nodePages,t),(0,d.Te)(t)}beforeSave(){if(null!=this._modificationsSource)return this.load().then(()=>{},()=>{})}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"},e)}async save(){return this._debouncedSaveOperations(0,{getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"})}get isUsedAsGroundLayer(){return!(0,u.A)("enable-feature:im-as-ground")||(0,Xe.S)(this.parent)||(0,Ye.Q)(this.parent)}get replacesTerrain(){return!1}validateLayer(e){if(e.layerType&&"IntegratedMesh"!==e.layerType)throw new o.A("integrated-mesh-layer:layer-type-not-supported","IntegratedMeshLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new o.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"});if(this.version.major>1)throw new o.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"})}_getTypeKeywords(){return["IntegratedMeshLayer"]}get elevationQueryDataRequester(){return new nt(this.customParameters,this.apiKey)}get elevationQueryNodeLoader(){return new ft(this,this.elevationQueryDataRequester,h.A.getLogger("esri.layers.IntegratedMeshLayer"),this.store?.defaultGeometrySchema,[],{loadFeatureData:!1,textureUsageMask:0})}_validateElevationInfo(e){let t="Integrated mesh layers";(0,He.XF)(h.A.getLogger(this),(0,He.B)(t,"absolute-height",e)),(0,He.XF)(h.A.getLogger(this),(0,He.tW)(t,e))}};(0,n.Cg)([(0,g.MZ)({type:String,readOnly:!0})],mt.prototype,"geometryType",void 0),(0,n.Cg)([(0,g.MZ)({type:["show","hide"]})],mt.prototype,"listMode",void 0),(0,n.Cg)([(0,g.MZ)({type:["IntegratedMeshLayer"]})],mt.prototype,"operationalLayerType",void 0),(0,n.Cg)([(0,g.MZ)({json:{read:!1},readOnly:!0})],mt.prototype,"type",void 0),(0,n.Cg)([(0,g.MZ)({type:Be.W4,readOnly:!0,clonable:!1})],mt.prototype,"nodePages",void 0),(0,n.Cg)([(0,g.MZ)({type:[Be.uV],readOnly:!0,clonable:!1})],mt.prototype,"materialDefinitions",void 0),(0,n.Cg)([(0,g.MZ)({type:[Be.Ot],readOnly:!0,clonable:!1})],mt.prototype,"textureSetDefinitions",void 0),(0,n.Cg)([(0,g.MZ)({type:[Be.L0],readOnly:!0,clonable:!1})],mt.prototype,"geometryDefinitions",void 0),(0,n.Cg)([(0,g.MZ)({readOnly:!0})],mt.prototype,"serviceUpdateTimeStamp",void 0),(0,n.Cg)([(0,g.MZ)({type:$e.A,clonable:e=>e?.clone()??e}),(0,m.P)({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],mt.prototype,"modifications",void 0),(0,n.Cg)([(0,g.MZ)({clonable:e=>e?{...e}:null})],mt.prototype,"_modificationsSource",void 0),(0,n.Cg)([(0,gt.w)(["web-scene","portal-item"],"modifications")],mt.prototype,"readModifications",null),(0,n.Cg)([(0,g.MZ)(S.Yj)],mt.prototype,"elevationInfo",null),(0,n.Cg)([(0,g.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],mt.prototype,"path",void 0),(0,n.Cg)([(0,g.MZ)({clonable:!1})],mt.prototype,"_elevationQueryWorker",null),(0,n.Cg)([(0,g.MZ)()],mt.prototype,"_modificationsGeneration",void 0),(0,n.Cg)([(0,g.MZ)()],mt.prototype,"memoizedElevationQueryDependencies",null),(0,n.Cg)([(0,g.MZ)()],mt.prototype,"isUsedAsGroundLayer",null),(0,n.Cg)([(0,g.MZ)()],mt.prototype,"replacesTerrain",null),(0,n.Cg)([(0,g.MZ)({clonable:!1})],mt.prototype,"elevationQueryDataRequester",null),(0,n.Cg)([(0,g.MZ)({clonable:!1})],mt.prototype,"elevationQueryNodeLoader",null),mt=(0,n.Cg)([(0,g.$K)("esri.layers.IntegratedMeshLayer")],mt);const pt=mt},85707(e,t,r){var n=r(32198),i=r(91429),a=r(54239);r.d(t,["a",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.heightModelInfo=null}read(e,t){super.read(e,t),"service"===t?.origin&&2===this.heightModelInfo?.origin&&(this.heightModelInfo.associatedSpatialReference=this.getAtOrigin("spatialReference","service"))}};return(0,n.Cg)([(0,i.MZ)({readOnly:!0,type:a.A})],r.prototype,"heightModelInfo",void 0),r=(0,n.Cg)([(0,i.$K)("esri.layers.mixins.HeightModelInfoMixin")],r),r}])},10292(e,t,r){r.d(t,{q:()=>o});var n=r(48526),i=r(86738),a=r(82799),s=r(99917);class o{constructor(e){this.geometry=e,this.spatialReference=e.spatialReference}export(){return this._exporter(this.coordinates,this.spatialReference)}clone(e){let t=new o(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,s.initializeProjection)([{source:this.spatialReference,dest:e}],{signal:t});let r=new n.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),i=(0,s.project)(r,e);if(!i)return null;let a=this.coordinates.map((e,t)=>{let r=e.clone(),n=i.points[t];return r.x=n[0],r.y=n[1],r}),o=this.clone(a);return o.spatialReference=e,o}projectSync(e){if(this.spatialReference.equals(e))return this.clone();let t=new n.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),r=(0,s.project)(t,e);if(!r)return null;let i=this.coordinates.map((e,t)=>{let n=e.clone(),i=r.points[t];return n.x=i[0],n.y=i[1],n}),a=this.clone(i);return a.spatialReference=e,a}static fromGeometry(e){let t=new o(e);if(e instanceof o)return t.coordinates=e.coordinates.map(e=>e.clone()),t._exporter=(t,r)=>{let n=e.clone(t);return n.spatialReference=r,n},t;switch(e.type){case"point":{let r=e,{hasZ:n,hasM:a}=r;return t.coordinates=n&&a?[new l(r.x,r.y,r.z,r.m)]:n?[new l(r.x,r.y,r.z)]:a?[new l(r.x,r.y,null,r.m)]:[new l(r.x,r.y)],t._exporter=(t,r)=>e.hasM?new i.A(t[0].x,t[0].y,t[0].z,t[0].m,r):new i.A(t[0].x,t[0].y,t[0].z,r),t}case"multipoint":{let r=e,{hasZ:i,hasM:a}=r;return t.coordinates=i&&a?r.points.map(e=>new l(e[0],e[1],e[2],e[3])):i?r.points.map(e=>new l(e[0],e[1],e[2])):a?r.points.map(e=>new l(e[0],e[1],null,e[2])):r.points.map(e=>new l(e[0],e[1])),t._exporter=(t,r)=>e.hasM?new n.A({points:t.map(e=>[e.x,e.y,e.z??0,e.m??0]),hasZ:!0,hasM:!0,spatialReference:r}):new n.A({points:t.map(e=>[e.x,e.y,e.z??0]),spatialReference:r}),t}case"polyline":{let r=e,n=[],i=[],{hasZ:s,hasM:o}=e,u=0;for(let e of r.paths)if(i.push([u,u+e.length]),u+=e.length,s&&o)for(let t of e)n.push(new l(t[0],t[1],t[2],t[3]));else if(s)for(let t of e)n.push(new l(t[0],t[1],t[2]));else if(o)for(let t of e)n.push(new l(t[0],t[1],null,t[2]));else for(let t of e)n.push(new l(t[0],t[1]));return t.coordinates=n,t._exporter=(t,r)=>{let 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=i.map(e=>n.slice(e[0],e[1]));return new a.A({paths:s,hasM:e.hasM,hasZ:!0,spatialReference:r})},t}}}}class l{constructor(e,t,r=null,n=null,i=null,a=null){this.x=e,this.y=t,this.z=r,this.m=n,this.tile=i,this.elevationTile=a}clone(){return new l(this.x,this.y,this.z,this.m)}}},73179(e,t,r){r.d(t,{b:()=>l,h:()=>u});var n=r(4718),i=r(53966),a=r(84952),s=r(60694),o=r(10873);function l(e){let{nonStandardUrlAllowed:t=!1,separator:r}=e??{},a=(0,n.o8)(o.OZ),l=a.json?.write;return"object"==typeof l&&l&&(l.writer=function(e,t,n,i){(0,s.LS)(this,e,r,t,i)}),{...a,set:function(e){if(null==e)return void this._set("url",e);let r=(0,s.HZ)({layer:this,url:e,nonStandardUrlAllowed:t,logger:i.A.getLogger(this)});this._set("url",r.url),null!=r.layerId&&this._set("layerId",r.layerId)}}}function u(e,t){let{separator:r}=t??{},n=(0,a.An)(e.url);return null!=n&&(null==e.dynamicDataSource?null!=e.layerId&&(n.path=(0,a.fj)(n.path,r??"",e.layerId.toString())):n.path=(0,a.fj)(n.path,"dynamicLayer")),n}},89707(e,t,r){r.d(t,{H:()=>n});class n{constructor(e=1/0,t=-1/0){this.minElevation=e,this.maxElevation=t}get elevationRangeValid(){return!Number.isNaN(this.minElevation)}get isEmpty(){return!(this.minElevation<=this.maxElevation)}contains(e){return this.minElevation<=e.minElevation&&this.maxElevation>=e.maxElevation}invalidateElevationRange(){this.minElevation=NaN}initializeEmpty(){this.minElevation=1/0,this.maxElevation=-1/0}expandElevationRange(e){let t=Math.min(this.minElevation,e.minElevation),r=Math.max(this.maxElevation,e.maxElevation),n=t!==this.minElevation||r!==this.maxElevation;return this.minElevation=t,this.maxElevation=r,n}expandElevationRangeValues(e,t){let r=Math.min(this.minElevation,e),n=Math.max(this.maxElevation,t),i=r!==this.minElevation||n!==this.maxElevation;return this.minElevation=r,this.maxElevation=n,i}setElevationRange(e){this.minElevation=e.minElevation,this.maxElevation=e.maxElevation}setElevationRangeValues(e,t){this.minElevation=e,this.maxElevation=t}equals(e){return this.minElevation===e.minElevation&&this.maxElevation===e.maxElevation}}},62747(e,t,r){r.d(t,{W7:()=>a,hH:()=>s});var n=r(1843),i=r(65786);i.Y;class a extends i.Y{constructor(e,t,r){super(),this.hasVertexColors=e,this.hasNormals=t,this.textureCoordinateType=r}}function s(e){let t=(0,n.BP)().vec3f("position");return e.hasNormals&&t.vec2i16("normalCompressed",{glNormalized:!0}),1===e.textureCoordinateType?t.vec2f("uv0"):2===e.textureCoordinateType&&(t.vec2f("uv0"),t.vec4u16("uvRegion",{glNormalized:!0})),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),t.freeze()}},92359(e,t,r){r.d(t,{nu:()=>d,W6:()=>u}),r(4576),r(71511),r(44208),r(53966);var n=r(17676),i=(r(36708),r(44794),r(78659)),a=r(32198),s=r(69622),o=r(91429);let l=class extends s.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,a.Cg)([(0,o.MZ)()],l.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,a.Cg)([(0,o.MZ)()],l.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),l=(0,a.Cg)([(0,o.$K)("esri.views.support.debugFlags")],l),new l,r(49186),Symbol("Yield");const u={RESOURCE_CONTROLLER_IMMEDIATE:"immediate",RESOURCE_CONTROLLER:"schedule",SLIDE:"slide",STREAM_DATA_LOADER:"stream loader",ELEVATION_QUERY:"elevation query",TERRAIN_SURFACE:"terrain",SURFACE_GEOMETRY_UPDATES:"surface geometry updates",LOD_RENDERER:"LoD renderer",GRAPHICS_CORE:"Graphics3D",I3S:"I3S",LYR3D:"Lyr3D",TILES3D:"3DTiles",POINT_CLOUD_LAYER:"point cloud",FEATURE_TILE_FETCHER:"feature fetcher",STREAM_CONTROLLER:"stream controller",SCREEN_POLYGON_INTERSECTION:"screen polygon intersection",OCCLUSION_QUERY:"occlusion query",OVERLAY:"overlay",OVERLAY_RENDERER:"overlay renderer",STAGE:"stage",GRAPHICS_DECONFLICTOR:"graphics deconflictor",FILTER_VISIBILITY:"graphics filter visibility",SCALE_VISIBILITY:"graphics scale visibility",FRUSTUM_VISIBILITY:"graphics frustum visibility",POINT_OF_INTEREST_FREQUENT:"POI frequent",POINT_OF_INTEREST_INFREQUENT:"POI infrequent",LABELER:"labeler",FEATURE_QUERY_ENGINE:"feature query",FEATURE_TILE_TREE:"feature tile tree",FEATURE_TILE_TREE_ACTIVE:"fast feature tile tree",ELEVATION_ALIGNMENT:"elevation alignment",ELEVATION_ALIGNMENT_SCENE:"elevation alignment scene",TEXT_TEXTURE_ATLAS:"text texture atlas",TEXTURE_UNLOAD:"texture unload",LINE_OF_SIGHT_TOOL:"line of sight tool",LINE_OF_SIGHT_TOOL_INTERACTIVE:"interactive line of sight tool",VOLUME_MEASUREMENT:"volume measurement",ELEVATION_PROFILE:"elevation profile",SNAPPING:"snapping",SHADOW_ACCUMULATOR:"shadow accumulator",CLOUDS_GENERATOR:"clouds generator",FLOW_GENERATOR:"flow generator",GAUSSIAN_SPLAT_SORTING:"gaussian splat sorting",GAUSSIAN_SPLAT_TEXTURE_ATLAS:"gaussian splat texture atlas",MAPVIEW_FETCH_QUEUE:"mapview fetch queue",MAPVIEW_LAYERVIEW_UPDATE:"mapview layerview update",MAPVIEW_VECTOR_TILE_PARSING_QUEUE:"mapview vector tile parsing queue",NONE:0,TEST_PRIO:1};new Map([[u.RESOURCE_CONTROLLER_IMMEDIATE,0],[u.RESOURCE_CONTROLLER,4],[u.SLIDE,0],[u.STREAM_DATA_LOADER,0],[u.ELEVATION_QUERY,0],[u.TERRAIN_SURFACE,1],[u.SURFACE_GEOMETRY_UPDATES,1],[u.LOD_RENDERER,2],[u.GRAPHICS_CORE,2],[u.I3S,2],[u.LYR3D,2],[u.TILES3D,3],[u.POINT_CLOUD_LAYER,2],[u.FEATURE_TILE_FETCHER,2],[u.STREAM_CONTROLLER,2],[u.SCREEN_POLYGON_INTERSECTION,0],[u.CLOUDS_GENERATOR,2],[u.OCCLUSION_QUERY,2],[u.OVERLAY,4],[u.OVERLAY_RENDERER,4],[u.STAGE,4],[u.GRAPHICS_DECONFLICTOR,4],[u.FILTER_VISIBILITY,4],[u.SCALE_VISIBILITY,4],[u.FRUSTUM_VISIBILITY,4],[u.POINT_OF_INTEREST_FREQUENT,6],[u.POINT_OF_INTEREST_INFREQUENT,30],[u.LABELER,8],[u.FEATURE_QUERY_ENGINE,8],[u.FEATURE_TILE_TREE,16],[u.FEATURE_TILE_TREE_ACTIVE,0],[u.ELEVATION_ALIGNMENT,12],[u.ELEVATION_ALIGNMENT_SCENE,14],[u.TEXT_TEXTURE_ATLAS,12],[u.TEXTURE_UNLOAD,12],[u.LINE_OF_SIGHT_TOOL,16],[u.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[u.VOLUME_MEASUREMENT,4],[u.SNAPPING,0],[u.SHADOW_ACCUMULATOR,30],[u.FLOW_GENERATOR,12],[u.GAUSSIAN_SPLAT_SORTING,2],[u.GAUSSIAN_SPLAT_TEXTURE_ATLAS,12],[u.MAPVIEW_FETCH_QUEUE,0],[u.MAPVIEW_LAYERVIEW_UPDATE,2],[u.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,0]]),(0,i.l5)(6.5),(0,i.l5)(1),(0,i.l5)(30),(0,i.l5)(1e3/30),(0,i.l5)(100),Symbol.dispose;const h=new class{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}};h.enabled=!1;class c{remove(){}[Symbol.dispose](){this.remove()}processQueue(){}schedule(e,t,r){try{if((0,n.G4)(t)){let e=(0,n.NK)();return r?Promise.resolve(r(e)):Promise.reject(e)}return(0,n.z7)(e(h))}catch(e){return Promise.reject(e)}}reschedule(e,t,r){return this.schedule(e,t,r)}async scheduleGenerator(e,t,r){if((0,n.G4)(t)){let e=(0,n.NK)();if(r)return r(e);throw e}let i=e(h);for(;;){let e=i.next(h),a=(0,n.$X)(e)?await e:e;if((0,n.G4)(t)){let e=(0,n.NK)();if(r){let t=r(e),a=i.return(null);return(0,n.$X)(a)&&await(0,n.QZ)(a),t}let t=i.throw(e);throw(0,n.$X)(t)&&await(0,n.QZ)(t),e}if(a.done)return a.value}}}const d=new c}}]);
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"../core/Logger.js";import{acosClamped as t}from"../core/mathUtils.js";import{ObjectStack as n}from"../core/ObjectStack.js";import{fromRotation as r,invert as i,transpose as a}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as o}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{copy as s,dot as c,length as l,set as u,subtract as d,exactEquals as f,transformMat4 as p,squaredLength as m,direction as ee,scale as h,add as g,distance as te,normalize as _}from"../core/libs/gl-matrix-2/math/vec3.js";import{clone as v,fromValues as y,create as ne}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as re}from"../geometry/support/aaBoundingRect.js";import{create as ie,distance2 as ae,projectPointClamp as b}from"../geometry/support/lineSegment.js";import{create as x,fromVectorsAndPoint as S,getNormal as C,fromValues as oe,intersectRay as se,signedDistance as ce,intersectLineSegmentClamp as le,isPointInClosedPositiveHalfspace as ue,intersectLineSegment as de,copy as fe,projectPoint as pe,setOffsetFromPoint as me,wrap as he}from"../geometry/support/plane.js";import{distance2 as ge}from"../geometry/support/ray.js";import{projectPointSignedLength as w}from"../geometry/support/vector.js";import{sv3d as T}from"../geometry/support/vectorStacks.js";const E=()=>e.getLogger(`esri.views.3d.support.geometryUtils.boundedPlane`);function D(e=J){return{plane:x(e.plane),origin:v(e.origin),basis1:v(e.basis1),basis2:v(e.basis2)}}function _e(e,t,n){let r=je.get();return r.origin=e,r.basis1=t,r.basis2=n,r.plane=he(0,0,0,0),j(r),r}function O(e,t=D()){return A(e.origin,e.basis1,e.basis2,t)}function k(e,t){s(t.origin,e.origin),s(t.basis1,e.basis1),s(t.basis2,e.basis2),fe(t.plane,e.plane)}function A(e,t,n,r=D()){return s(r.origin,e),s(r.basis1,t),s(r.basis2,n),j(r),Oe(r,`fromValues()`),r}function j(e){S(e.basis2,e.basis1,e.origin,e.plane)}function M(e,t,n){e!==n&&O(e,n);let r=h(T.get(),G(e),t);return g(n.origin,n.origin,r),n.plane[3]-=t,n}function N(e,t,n){return F(t,n),M(n,W(e,e.origin),n),n}function P(e,t){let n=e.basis1[0],r=e.basis2[1],[i,a]=e.origin;return re(i-n,a-r,i+n,a+r,t)}function F(e,t=D()){let n=(e[2]-e[0])/2,r=(e[3]-e[1])/2;return u(t.origin,e[0]+n,e[1]+r,0),u(t.basis1,n,0,0),u(t.basis2,0,r,0),oe(0,0,1,0,t.plane),t}function I(e,t,n){return se(e.plane,t,n)?De(e,n):!1}function L(e,t,n){if(I(e,t,n))return n;let r=R(e,t,T.get());return g(n,t.origin,h(T.get(),t.direction,te(t.origin,r)/l(t.direction))),n}function R(e,n,r){let i=Y.get();ke(e,n,i,Y.get());let a=1/0;for(let o of Z){let l=q(e,o,X.get()),u=T.get();if(de(i,l,u)){let e=ee(T.get(),n.origin,u),i=Math.abs(t(c(n.direction,e)));i<a&&(a=i,s(r,u))}}return a===1/0?B(e,n,r):r}function z(e,t){return(t-e)/t}function B(e,t,n){if(I(e,t,n))return n;let r=Y.get(),i=Y.get();ke(e,t,r,i);let a=1/0;for(let o of Z){let c=q(e,o,X.get()),l=T.get();if(le(r,c,l)){let e=ge(t,l);if(!ue(i,l))continue;e<a&&(a=e,s(n,l))}}return U(e,t.origin)<a&&V(e,t.origin,n),n}function V(e,t,n){let r=pe(e.plane,t,T.get()),i=b(K(e,e.basis1),r,-1,1,T.get()),a=b(K(e,e.basis2),r,-1,1,T.get());return d(n,g(T.get(),i,a),e.origin),n}function H(e,t,n){let{origin:r,basis1:i,basis2:a}=e,o=d(T.get(),t,r),s=w(i,o),c=w(a,o),l=w(G(e),o);return u(n,s,c,l)}function U(e,t){let n=H(e,t,T.get()),{basis1:r,basis2:i}=e,a=l(r),o=l(i),s=Math.max(Math.abs(n[0])-a,0),c=Math.max(Math.abs(n[1])-o,0),u=n[2];return s*s+c*c+u*u}function ve(e,t){return Math.sqrt(U(e,t))}function ye(e,t){let n=-1/0;for(let r of Z){let i=q(e,r,X.get()),a=ae(i,t);a>n&&(n=a)}return Math.sqrt(n)}function be(e,t){return ce(e.plane,t)>0&&De(e,t)}function xe(e,t,n,r){return Ee(e,n,r)}function W(e,t){let n=-e.plane[3];return w(G(e),t)-n}function Se(e,t,n,r){let i=W(e,t),a=h(Ae,G(e),n-i);return g(r,t,a),r}function Ce(e,t){return e===t||e==null&&t==null||e!=null&&t!=null&&f(e.basis1,t.basis1)&&f(e.basis2,t.basis2)&&f(e.origin,t.origin)}function we(e,t,n){return e!==n&&O(e,n),i(Q,t),a(Q,Q),p(n.basis1,e.basis1,Q),p(n.basis2,e.basis2,Q),p(C(n.plane),C(e.plane),Q),p(n.origin,e.origin,t),me(n.plane,n.plane,n.origin),n}function Te(e,t,n,i){return e!==i&&O(e,i),r($,t,n),p(i.basis1,e.basis1,$),p(i.basis2,e.basis2,$),j(i),i}function G(e){return C(e.plane)}function Ee(e,t,n){switch(t){case 0:s(n,e.basis1),_(n,n);break;case 1:s(n,e.basis2),_(n,n);break;case 2:s(n,G(e))}return n}function De(e,t){let n=d(T.get(),t,e.origin),r=m(e.basis1),i=m(e.basis2),a=c(e.basis1,n),o=c(e.basis2,n);return-a-r<0&&a-r<0&&-o-i<0&&o-i<0}function K(e,t){let n=X.get();return s(n.origin,e.origin),s(n.vector,t),n}function q(e,t,n){let{basis1:r,basis2:i,origin:a}=e,o=h(T.get(),r,t.origin[0]),s=h(T.get(),i,t.origin[1]);g(n.origin,o,s),g(n.origin,n.origin,a);let c=h(T.get(),r,t.direction[0]),l=h(T.get(),i,t.direction[1]);return h(n.vector,g(c,c,l),2),n}function Oe(e,t){Math.abs(c(e.basis1,e.basis2)/(l(e.basis1)*l(e.basis2)))>1e-6&&E().warn(t,`Provided basis vectors are not perpendicular`),Math.abs(c(e.basis1,G(e)))>1e-6&&E().warn(t,`Basis vectors and plane normal are not perpendicular`),Math.abs(-c(G(e),e.origin)-e.plane[3])>1e-6&&E().warn(t,`Plane offset is not consistent with plane origin`)}function ke(e,t,n,r){let i=G(e);S(i,t.direction,t.origin,n),S(C(n),i,t.origin,r)}const J={plane:x(),origin:y(0,0,0),basis1:y(1,0,0),basis2:y(0,1,0)},Y=new n(x),X=new n(ie),Ae=ne(),je=new n(()=>D()),Z=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],Q=o(),$=o(),Me=Object.freeze(Object.defineProperty({__proto__:null,altitudeAt:W,axisAt:xe,cameraFrustumCoverage:z,closestPoint:B,closestPointOnSilhouette:R,copy:O,copyWithoutVerify:k,create:D,distance:ve,distance2:U,distanceToSilhouette:ye,elevate:M,equals:Ce,extrusionContainsPoint:be,fromAABoundingRect:F,fromValues:A,getExtent:P,intersectRay:I,intersectRayClosestSilhouette:L,normal:G,projectPoint:V,projectPointLocal:H,rotate:Te,setAltitudeAt:Se,setExtent:N,transform:we,up:J,updateUnboundedPlane:j,wrap:_e},Symbol.toStringTag,{value:`Module`}));export{N as A,we as B,J as C,_e as D,O as a,Me as b,D as c,F as d,ve as e,A as f,Ce as g,be as h,I as i,z as j,W as k,xe as l,B as m,G as n,R as o,k as p,U as q,Te as r,ye as s,M as t,j as u,P as v,L as w,V as x,H as y,Se as z};