@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
1 lines • 24.2 kB
JavaScript
;(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8846],{73354:(t,n,e)=>{e.d(n,{a:()=>f,b:()=>l,c:()=>i,d:()=>o,e:()=>p,f:()=>c,l:()=>s,n:()=>g,t:()=>a});var r=e(40876);function o(t,n,e){a(t.typedBuffer,n.typedBuffer,e,t.typedBufferStride,n.typedBufferStride)}function a(t,n,e,r=3,o=r){if(t.length/r!==Math.ceil(n.length/o))return t;const a=t.length/r,i=e[0],l=e[1],u=e[2],s=e[4],c=e[5],f=e[6],p=e[8],g=e[9],d=e[10],h=e[12],y=e[13],m=e[14];let A=0,M=0;for(let e=0;e<a;e++){const e=n[A],a=n[A+1],T=n[A+2];t[M]=i*e+s*a+p*T+h,t[M+1]=l*e+c*a+g*T+y,t[M+2]=u*e+f*a+d*T+m,A+=o,M+=r}return t}function i(t,n,e){l(t.typedBuffer,n.typedBuffer,e,t.typedBufferStride,n.typedBufferStride)}function l(t,n,e,r=3,o=r){if(t.length/r!==Math.ceil(n.length/o))return;const a=t.length/r,i=e[0],l=e[1],u=e[2],s=e[3],c=e[4],f=e[5],p=e[6],g=e[7],d=e[8];let h=0,y=0;for(let e=0;e<a;e++){const e=n[h],a=n[h+1],m=n[h+2];t[y]=i*e+s*a+p*m,t[y+1]=l*e+c*a+g*m,t[y+2]=u*e+f*a+d*m,h+=o,y+=r}}function u(t,n,e,r=3,o=r){const a=Math.min(t.length/r,n.length/o);let i=0,l=0;for(let u=0;u<a;u++)t[l]=e*n[i],t[l+1]=e*n[i+1],t[l+2]=e*n[i+2],i+=o,l+=r;return t}function s(t,n,e,r){c(t.typedBuffer,n.typedBuffer,e,r,t.typedBufferStride,n.typedBufferStride)}function c(t,n,e,o,a=3,i=a){const l=Math.min(t.length/a,n.length/i);let u=0,s=0;const c=1/r.Tf;for(let r=0;r<l;r++)t[s]=o*(e*n[u])**c,t[s+1]=o*(e*n[u+1])**c,t[s+2]=o*(e*n[u+2])**c,u+=i,s+=a}function f(t,n,e,r=3,o=r){const a=t.length/r;if(a!==Math.ceil(n.length/o))return t;let i=0,l=0;for(let u=0;u<a;u++)t[l]=n[i]+e[0],t[l+1]=n[i+1]+e[1],t[l+2]=n[i+2]+e[2],i+=o,l+=r;return t}function p(t,n){g(t.typedBuffer,n.typedBuffer,t.typedBufferStride,n.typedBufferStride)}function g(t,n,e=3,r=e){const o=Math.min(t.length/e,n.length/r);let a=0,i=0;for(let l=0;l<o;l++){const o=n[a],l=n[a+1],u=n[a+2],s=o*o+l*l+u*u;if(s>0){const n=1/Math.sqrt(s);t[i]=n*o,t[i+1]=n*l,t[i+2]=n*u}a+=r,i+=e}}e(44208),e(53966),Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:s,normalize:g,normalizeView:p,scale:u,scaleView:function(t,n,e){u(t.typedBuffer,n.typedBuffer,e,t.typedBufferStride,n.typedBufferStride)},shiftRight:function(t,n,e){const r=Math.min(t.count,n.count),o=t.typedBuffer,a=t.typedBufferStride,i=n.typedBuffer,l=n.typedBufferStride;let u=0,s=0;for(let t=0;t<r;t++)o[s]=i[u]>>e,o[s+1]=i[u+1]>>e,o[s+2]=i[u+2]>>e,u+=l,s+=a},transformMat3:l,transformMat3View:i,transformMat4:a,transformMat4View:o,translate:f},Symbol.toStringTag,{value:"Module"}))},65686:(t,n,e)=>{e.d(n,{a:()=>a,b:()=>c,l:()=>s,n:()=>l,t:()=>i});var r=e(40876),o=(e(44208),e(53966));function a(t,n,e){i(t.typedBuffer,n.typedBuffer,e,t.typedBufferStride,n.typedBufferStride)}function i(t,n,e,r=4,o=r){if(t.length/r!=n.length/o)return;const a=t.length/r,i=e[0],l=e[1],u=e[2],s=e[3],c=e[4],f=e[5],p=e[6],g=e[7],d=e[8];let h=0,y=0;for(let e=0;e<a;e++){const e=n[h],a=n[h+1],m=n[h+2],A=n[h+3];t[y]=i*e+s*a+p*m,t[y+1]=l*e+c*a+g*m,t[y+2]=u*e+f*a+d*m,t[y+3]=A,h+=o,y+=r}}function l(t,n){const e=Math.min(t.count,n.count),r=t.typedBuffer,o=t.typedBufferStride,a=n.typedBuffer,i=n.typedBufferStride;for(let t=0;t<e;t++){const n=t*o,e=t*i,l=a[e],u=a[e+1],s=a[e+2],c=l*l+u*u+s*s;if(c>0){const t=1/Math.sqrt(c);r[n]=t*l,r[n+1]=t*u,r[n+2]=t*s}}}function u(t,n,e,r=4){const o=Math.min(t.length/r,n.count),a=n.typedBuffer,i=n.typedBufferStride;let l=0,u=0;for(let n=0;n<o;n++)t[u]=e*a[l],t[u+1]=e*a[l+1],t[u+2]=e*a[l+2],t[u+3]=e*a[l+3],l+=i,u+=r}function s(t,n,e,r){c(t.typedBuffer,n,e,r,t.typedBufferStride)}function c(t,n,e,o,a=4){const i=Math.min(t.length/a,n.count),l=n.typedBuffer,u=n.typedBufferStride;let s=0,c=0;const f=1/r.Tf;for(let n=0;n<i;n++)t[c]=o*(e*l[s])**f,t[c+1]=o*(e*l[s+1])**f,t[c+2]=o*(e*l[s+2])**f,t[c+3]=o*e*l[s+3],s+=u,c+=a}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:s,normalize:l,scale:u,scaleView:function(t,n,e){u(t.typedBuffer,n,e,t.typedBufferStride)},transformMat3:i,transformMat3View:a,transformMat4:function(t,n,e,r=4,a=r){if(t.length/r!=n.length/a)return void o.A.getLogger("esri.views.3d.support.buffer.math").error("source and destination buffers need to have the same number of elements");const i=t.length/r,l=e[0],u=e[1],s=e[2],c=e[3],f=e[4],p=e[5],g=e[6],d=e[7],h=e[8],y=e[9],m=e[10],A=e[11],M=e[12],T=e[13],v=e[14],b=e[15];let w=0,B=0;for(let e=0;e<i;e++){const e=n[w],o=n[w+1],i=n[w+2],S=n[w+3];t[B]=l*e+f*o+h*i+M*S,t[B+1]=u*e+p*o+y*i+T*S,t[B+2]=s*e+g*o+m*i+v*S,t[B+3]=c*e+d*o+A*i+b*S,w+=a,B+=r}},transformMat4View:function(t,n,e){if(t.count!==n.count)return;const r=t.count,o=e[0],a=e[1],i=e[2],l=e[3],u=e[4],s=e[5],c=e[6],f=e[7],p=e[8],g=e[9],d=e[10],h=e[11],y=e[12],m=e[13],A=e[14],M=e[15],T=t.typedBuffer,v=t.typedBufferStride,b=n.typedBuffer,w=n.typedBufferStride;for(let t=0;t<r;t++){const n=t*v,e=t*w,r=b[e],B=b[e+1],S=b[e+2],R=b[e+3];T[n]=o*r+u*B+p*S+y*R,T[n+1]=a*r+s*B+g*S+m*R,T[n+2]=i*r+c*B+d*S+A*R,T[n+3]=l*r+f*B+h*S+M*R}}},Symbol.toStringTag,{value:"Module"}))},77690:(t,n,e)=>{e.d(n,{B8:()=>l,Ge:()=>p,I0:()=>f,KC:()=>u,hZ:()=>a,hs:()=>c,lw:()=>s,mg:()=>i,z0:()=>o});var r=e(34304);function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function a(t,n,e,r,o,a,i,l,u,s){return t[0]=n,t[1]=e,t[2]=r,t[3]=o,t[4]=a,t[5]=i,t[6]=l,t[7]=u,t[8]=s,t}function i(t,n){if(t===n){const e=n[1],r=n[2],o=n[5];t[1]=n[3],t[2]=n[6],t[3]=e,t[5]=n[7],t[6]=r,t[7]=o}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function l(t,n){const e=n[0],r=n[1],o=n[2],a=n[3],i=n[4],l=n[5],u=n[6],s=n[7],c=n[8],f=c*i-l*s,p=-c*a+l*u,g=s*a-i*u;let d=e*f+r*p+o*g;return d?(d=1/d,t[0]=f*d,t[1]=(-c*r+o*s)*d,t[2]=(l*r-o*i)*d,t[3]=p*d,t[4]=(c*e-o*u)*d,t[5]=(-l*e+o*a)*d,t[6]=g*d,t[7]=(-s*e+r*u)*d,t[8]=(i*e-r*a)*d,t):null}function u(t,n){const e=n[0],r=n[1],o=n[2],a=n[3],i=n[4],l=n[5],u=n[6],s=n[7],c=n[8];return t[0]=i*c-l*s,t[1]=o*s-r*c,t[2]=r*l-o*i,t[3]=l*u-a*c,t[4]=e*c-o*u,t[5]=o*a-e*l,t[6]=a*s-i*u,t[7]=r*u-e*s,t[8]=e*i-r*a,t}function s(t,n,e){const r=n[0],o=n[1],a=n[2],i=n[3],l=n[4],u=n[5],s=n[6],c=n[7],f=n[8],p=e[0],g=e[1],d=e[2],h=e[3],y=e[4],m=e[5],A=e[6],M=e[7],T=e[8];return t[0]=p*r+g*i+d*s,t[1]=p*o+g*l+d*c,t[2]=p*a+g*u+d*f,t[3]=h*r+y*i+m*s,t[4]=h*o+y*l+m*c,t[5]=h*a+y*u+m*f,t[6]=A*r+M*i+T*s,t[7]=A*o+M*l+T*c,t[8]=A*a+M*u+T*f,t}function c(t,n,e){const r=e[0],o=e[1],a=e[2];return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t[6]=a*n[6],t[7]=a*n[7],t[8]=a*n[8],t}function f(t,n){const e=n[0],r=n[1],o=n[2],a=n[3],i=e+e,l=r+r,u=o+o,s=e*i,c=r*i,f=r*l,p=o*i,g=o*l,d=o*u,h=a*i,y=a*l,m=a*u;return t[0]=1-f-d,t[3]=c-m,t[6]=p+y,t[1]=c+m,t[4]=1-s-d,t[7]=g-h,t[2]=p-y,t[5]=g+h,t[8]=1-s-f,t}function p(t,n){const e=n[0],r=n[1],o=n[2],a=n[3],i=n[4],l=n[5],u=n[6],s=n[7],c=n[8],f=n[9],p=n[10],g=n[11],d=n[12],h=n[13],y=n[14],m=n[15],A=e*l-r*i,M=e*u-o*i,T=e*s-a*i,v=r*u-o*l,b=r*s-a*l,w=o*s-a*u,B=c*h-f*d,S=c*y-p*d,R=c*m-g*d,_=f*y-p*h,C=f*m-g*h,E=p*m-g*y;let F=A*E-M*C+T*_+v*R-b*S+w*B;return F?(F=1/F,t[0]=(l*E-u*C+s*_)*F,t[1]=(u*R-i*E-s*S)*F,t[2]=(i*C-l*R+s*B)*F,t[3]=(o*C-r*E-a*_)*F,t[4]=(e*E-o*R+a*S)*F,t[5]=(r*R-e*C-a*B)*F,t[6]=(h*w-y*b+m*v)*F,t[7]=(y*T-d*w-m*M)*F,t[8]=(d*b-h*T+m*A)*F,t):null}function g(t,n,e){return t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2],t[3]=n[3]-e[3],t[4]=n[4]-e[4],t[5]=n[5]-e[5],t[6]=n[6]-e[6],t[7]=n[7]-e[7],t[8]=n[8]-e[8],t}const d=s,h=g;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,e){return t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2],t[3]=n[3]+e[3],t[4]=n[4]+e[4],t[5]=n[5]+e[5],t[6]=n[6]+e[6],t[7]=n[7]+e[7],t[8]=n[8]+e[8],t},adjoint:u,copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},determinant:function(t){const n=t[0],e=t[1],r=t[2],o=t[3],a=t[4],i=t[5],l=t[6],u=t[7],s=t[8];return n*(s*a-i*u)+e*(-s*o+i*l)+r*(u*o-a*l)},equals:function(t,n){const e=t[0],o=t[1],a=t[2],i=t[3],l=t[4],u=t[5],s=t[6],c=t[7],f=t[8],p=n[0],g=n[1],d=n[2],h=n[3],y=n[4],m=n[5],A=n[6],M=n[7],T=n[8],v=(0,r.FD)();return Math.abs(e-p)<=v*Math.max(1,Math.abs(e),Math.abs(p))&&Math.abs(o-g)<=v*Math.max(1,Math.abs(o),Math.abs(g))&&Math.abs(a-d)<=v*Math.max(1,Math.abs(a),Math.abs(d))&&Math.abs(i-h)<=v*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(l-y)<=v*Math.max(1,Math.abs(l),Math.abs(y))&&Math.abs(u-m)<=v*Math.max(1,Math.abs(u),Math.abs(m))&&Math.abs(s-A)<=v*Math.max(1,Math.abs(s),Math.abs(A))&&Math.abs(c-M)<=v*Math.max(1,Math.abs(c),Math.abs(M))&&Math.abs(f-T)<=v*Math.max(1,Math.abs(f),Math.abs(T))},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromMat4:o,fromQuat:f,fromRotation:function(t,n){const e=Math.sin(n),r=Math.cos(n);return t[0]=r,t[1]=e,t[2]=0,t[3]=-e,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:l,isOrthoNormal:function(t){const n=(0,r.FD)(),e=t[0],o=t[1],a=t[2],i=t[3],l=t[4],u=t[5],s=t[6],c=t[7],f=t[8];return Math.abs(1-(e*e+i*i+s*s))<=n&&Math.abs(1-(o*o+l*l+c*c))<=n&&Math.abs(1-(a*a+u*u+f*f))<=n},mul:d,multiply:s,multiplyScalar:function(t,n,e){return t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e,t[3]=n[3]*e,t[4]=n[4]*e,t[5]=n[5]*e,t[6]=n[6]*e,t[7]=n[7]*e,t[8]=n[8]*e,t},multiplyScalarAndAdd:function(t,n,e,r){return t[0]=n[0]+e[0]*r,t[1]=n[1]+e[1]*r,t[2]=n[2]+e[2]*r,t[3]=n[3]+e[3]*r,t[4]=n[4]+e[4]*r,t[5]=n[5]+e[5]*r,t[6]=n[6]+e[6]*r,t[7]=n[7]+e[7]*r,t[8]=n[8]+e[8]*r,t},normalFromMat4:p,normalFromMat4Legacy:function(t,n){const e=n[0],r=n[1],o=n[2],a=n[4],i=n[5],l=n[6],u=n[8],s=n[9],c=n[10],f=c*i-l*s,p=-c*a+l*u,g=s*a-i*u,d=e*f+r*p+o*g;if(!d)return null;const h=1/d;return t[0]=f*h,t[1]=(-c*r+o*s)*h,t[2]=(l*r-o*i)*h,t[3]=p*h,t[4]=(c*e-o*u)*h,t[5]=(-l*e+o*a)*h,t[6]=g*h,t[7]=(-s*e+r*u)*h,t[8]=(i*e-r*a)*h,t},projection:function(t,n,e){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/e,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,n,e){const r=n[0],o=n[1],a=n[2],i=n[3],l=n[4],u=n[5],s=n[6],c=n[7],f=n[8],p=Math.sin(e),g=Math.cos(e);return t[0]=g*r+p*i,t[1]=g*o+p*l,t[2]=g*a+p*u,t[3]=g*i-p*r,t[4]=g*l-p*o,t[5]=g*u-p*a,t[6]=s,t[7]=c,t[8]=f,t},scale:c,scaleByVec2:function(t,n,e){const r=e[0],o=e[1];return t[0]=r*n[0],t[1]=r*n[1],t[2]=r*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t},set:a,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:h,subtract:g,translate:function(t,n,e){const r=n[0],o=n[1],a=n[2],i=n[3],l=n[4],u=n[5],s=n[6],c=n[7],f=n[8],p=e[0],g=e[1];return t[0]=r,t[1]=o,t[2]=a,t[3]=i,t[4]=l,t[5]=u,t[6]=p*r+g*i+s,t[7]=p*o+g*l+c,t[8]=p*a+g*u+f,t},transpose:i},Symbol.toStringTag,{value:"Module"}))},48353:(t,n,e)=>{e.d(n,{l:()=>s});var r=e(34727),o=e(58083),a=e(51850);function i(t,n,e){const r=Math.sin(t),o=Math.cos(t),a=Math.sin(n),i=Math.cos(n),l=e;return l[0]=-r,l[4]=-a*o,l[8]=i*o,l[12]=0,l[1]=o,l[5]=-a*r,l[9]=i*r,l[13]=0,l[2]=0,l[6]=i,l[10]=a,l[14]=0,l[3]=0,l[7]=0,l[11]=0,l[15]=1,l}var l=e(37539),u=e(21325);function s(t,n,e,r){const a=(0,l.Tp)(t,r);if(null==a)return!1;const s=a.source.spatialReferenceId,d=a.dest.spatialReferenceId;if(s===d&&!c(d)&&(s!==l.rz.UNKNOWN||(0,u.aI)(t,r)))return(0,o.kN)(e,n),!0;if(c(d)){const t=l.w5[s][l.rz.LON_LAT],r=l.w5[l.rz.LON_LAT][d];return null!=t&&null!=r&&(t(n,0,p,0),r(p,0,g,0),i(f*p[0],f*p[1],e),e[12]=g[0],e[13]=g[1],e[14]=g[2],!0)}const h=c(s);if((d===l.rz.WEB_MERCATOR||d===l.rz.PLATE_CARREE||d===l.rz.WGS84||d===l.rz.CGCS2000)&&(s===l.rz.WGS84||h||s===l.rz.WEB_MERCATOR||s===l.rz.CGCS2000)){const t=l.w5[s][l.rz.LON_LAT],r=l.w5[l.rz.LON_LAT][d];return null!=t&&null!=r&&(t(n,0,p,0),r(p,0,g,0),h?function(t,n,e){i(t,n,e),(0,o.mg)(e,e)}(f*p[0],f*p[1],e):(0,o.D_)(e),e[12]=g[0],e[13]=g[1],e[14]=g[2],!0)}return!1}function c(t){return t===l.rz.SPHERICAL_ECEF||t===l.rz.SPHERICAL_MARS_PCPF||t===l.rz.SPHERICAL_MOON_PCPF||t===l.rz.WGS84_ECEF}const f=(0,r.kU)(1),p=(0,a.vt)(),g=(0,a.vt)()},65806:(t,n,e)=>{e.d(n,{g:()=>i});var r=e(51850),o=e(57251),a=e(9762);function i(t,n,e,r){if((0,o.canProjectWithoutEngine)(t.spatialReference,e)){l[0]=t.x,l[1]=t.y;const o=t.z;return l[2]=o??r??0,(0,a.projectBuffer)(l,t.spatialReference,0,n,e,0)}const i=(0,o.tryProjectWithZConversion)(t,e);return!!i&&(n[0]=i?.x,n[1]=i?.y,n[2]=i?.z??r??0,!0)}const l=(0,r.vt)()},98764:(t,n,e)=>{e.d(n,{Y0:()=>s,lO:()=>c});var r=e(73941),o=e(16930),a=e(21325);const i=new o.A(r.fv),l=new o.A(r.FY),u=new o.A(r.LJ),s=new o.A(r.Ro);function c(t){const n=f.get(t);if(n)return n;let e=i;if(t)if(t===l)e=l;else if(t===u)e=u;else{const n=t.wkid,r=t.latestWkid;if(null!=n||null!=r)(0,a.tl)(n)||(0,a.tl)(r)?e=l:((0,a.ZL)(n)||(0,a.ZL)(r))&&(e=u);else{const n=t.wkt2??t.wkt;if(n){const t=n.toUpperCase();t===p?e=l:t===g&&(e=u)}}}return f.set(t,e),e}const f=new Map,p=l.wkt.toUpperCase(),g=u.wkt.toUpperCase()},1193:(t,n,e)=>{e.d(n,{H:()=>p});var r,o=e(90237),a=e(25482),i=e(4718),l=e(53966),u=e(10107),s=e(79901),c=e(40608),f=e(31199);let p=r=class extends a.A{constructor(t){super(t),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(t){return(0,f.b)(t,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},l.A.getLogger(this))}castPosition(t){return t&&t instanceof Float32Array&&l.A.getLogger(this).warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),(0,f.b)(t,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},l.A.getLogger(this))}castUv(t){return(0,f.b)(t,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},l.A.getLogger(this))}castNormal(t){return(0,f.b)(t,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},l.A.getLogger(this))}castTangent(t){return(0,f.b)(t,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},l.A.getLogger(this))}clone(){const t={position:(0,i.o8)(this.position),uv:(0,i.o8)(this.uv),normal:(0,i.o8)(this.normal),tangent:(0,i.o8)(this.tangent),color:(0,i.o8)(this.color)};return new r(t)}clonePositional(){const t={position:(0,i.o8)(this.position),normal:(0,i.o8)(this.normal),tangent:(0,i.o8)(this.tangent),uv:this.uv,color:this.color};return new r(t)}get usedMemory(){return this.position.byteLength+(this.uv?.byteLength??0)+(this.normal?.byteLength??0)+(this.tangent?.byteLength??0)+(this.color?.byteLength??0)}};(0,o._)([(0,u.MZ)({json:{write:f.B}})],p.prototype,"color",void 0),(0,o._)([(0,s.w)("color")],p.prototype,"castColor",null),(0,o._)([(0,u.MZ)({nonNullable:!0,json:{write:f.B}})],p.prototype,"position",void 0),(0,o._)([(0,s.w)("position")],p.prototype,"castPosition",null),(0,o._)([(0,u.MZ)({json:{write:f.B}})],p.prototype,"uv",void 0),(0,o._)([(0,s.w)("uv")],p.prototype,"castUv",null),(0,o._)([(0,u.MZ)({json:{write:f.B}})],p.prototype,"normal",void 0),(0,o._)([(0,s.w)("normal")],p.prototype,"castNormal",null),(0,o._)([(0,u.MZ)({json:{write:f.B}})],p.prototype,"tangent",void 0),(0,o._)([(0,s.w)("tangent")],p.prototype,"castTangent",null),p=r=(0,o._)([(0,c.$)("esri.geometry.support.MeshVertexAttributes")],p)},31199:(t,n,e)=>{function r(t,n,e,r){const{loggerTag:o,stride:a}=n;return t.length%a!=0?(r.error(o,`Invalid array length, expected a multiple of ${a}`),new e([])):t}function o(t,n,e,o,a){if(!t)return t;if(t instanceof n)return r(t,o,n,a);for(const i of e)if(t instanceof i)return r(new n(t),o,n,a);if(Array.isArray(t))return r(new n(t),o,n,a);{const r=e.map((t=>`'${t.name}'`));return a.error(`Failed to set property, expected one of ${r}, but got ${t.constructor.name}`),new n([])}}function a(t,n,e){n[e]=function(t){const n=new Array(t.length);for(let e=0;e<t.length;e++)n[e]=t[e];return n}(t)}e.d(n,{B:()=>a,b:()=>o})},28846:(t,n,e)=>{e.d(n,{convertMeshVertexSpace:()=>u});var r=e(49186),o=e(4718),a=e(74887),i=e(1193),l=e(72258);async function u(t,n,e){await Promise.resolve(),(0,a.Te)(e);const u=(0,l.UR)(t,n,{useEllipsoid:e?.useEllipsoid});if(!u)throw new r.A("meshUtils:convertVertexSpace()","Failed to convert to provided vertex space due to projection errors");const s=t.cloneAndModifyVertexAttributes(new i.H({...u,uv:(0,o.o8)(t.vertexAttributes.uv),color:(0,o.o8)(t.vertexAttributes.color)}),n);return s.transform=null,s}},22141:(t,n,e)=>{e.d(n,{$5:()=>b,CN:()=>A,JP:()=>m,KM:()=>B,Mv:()=>R,X4:()=>M,gr:()=>v,qs:()=>w,si:()=>T,xA:()=>S});var r=e(34727),o=e(77690),a=e(29242),i=e(58083),l=e(9093),u=e(38954),s=e(51850),c=e(48353),f=e(9762),p=(e(79258),e(21325)),g=e(28735),d=e(13030),h=e(73354),y=e(65686);const m="Projection may be possible after calling projection.load().";function A(t,n,e,r){t.error(`Failed to project from (wkid:${n.wkid}) to (wkid:${e.wkid}).${r?" ":""}${r}`)}function M(t,n,e,r,o,a){return N(C.TO_PCPF,d.xs.fromTypedArray(t),_.NORMAL,d.Xm.fromTypedArray(n),e,d.Xm.fromTypedArray(r),o,d.xs.fromTypedArray(a))?a:null}function T(t,n,e,r,o,a){return N(C.FROM_PCPF,d.xs.fromTypedArray(t),_.NORMAL,d.Xm.fromTypedArray(n),e,d.Xm.fromTypedArray(r),o,d.xs.fromTypedArray(a))?a:null}function v(t,n,e,r){return(0,f.projectBuffer)(t,n,0,e,r,0)?e:null}function b(t,n,e,r){return(0,f.projectBuffer)(t,n,0,e,r,0)?e:null}function w(t,n,e){return(0,o.Ge)(L,e),(0,h.b)(n,t,L),(0,r.or)(L)&&(0,h.n)(n,n),n}function B(t,n,e){return(0,o.z0)(L,e),(0,y.t)(n,t,L),(0,r.or)(L)&&(0,h.n)(n,n,4),n}function S(t,n,e,r,o,a){if(!N(C.TO_PCPF,d.xs.fromTypedArray(t,4*Float32Array.BYTES_PER_ELEMENT),_.TANGENT,d.Xm.fromTypedArray(n),e,d.Xm.fromTypedArray(r),o,d.xs.fromTypedArray(a,4*Float32Array.BYTES_PER_ELEMENT)))return null;for(let n=3;n<t.length;n+=4)a[n]=t[n];return a}function R(t,n,e,r,o,a){if(!N(C.FROM_PCPF,d.xs.fromTypedArray(t,16),_.TANGENT,d.Xm.fromTypedArray(n),e,d.Xm.fromTypedArray(r),o,d.xs.fromTypedArray(a,16)))return null;for(let n=3;n<t.length;n+=4)a[n]=t[n];return a}var _,C,E;function F(t,n,e,r,a){switch((0,c.l)(r,e,P,r),t===C.FROM_PCPF&&(0,i.B8)(P,P),n){case _.NORMAL:return(0,o.Ge)(a,P);case _.TANGENT:return(0,o.z0)(a,P)}}function N(t,n,e,r,o,a,i,l){if(!n)return;const s=r.count;if(function(t){return t.isWGS84||(0,p.x1)(t)||(0,p.q8)(t)||(0,p.KQ)(t)}(o))for(let r=0;r<s;r++)a.getVec(r,x),n.getVec(r,O),(0,u.q)(O,O,F(t,e,x,i,L)),l.setVec(r,O);else for(let o=0;o<s;o++){a.getVec(o,x),n.getVec(o,O);const s=(0,g.jg)(r.get(o,1));let c=Math.cos(s);e===_.TANGENT!=(t===C.TO_PCPF)&&(c=1/c),F(t,e,x,i,L),t===C.TO_PCPF?(L[0]*=c,L[1]*=c,L[2]*=c,L[3]*=c,L[4]*=c,L[5]*=c):(L[0]*=c,L[3]*=c,L[6]*=c,L[1]*=c,L[4]*=c,L[7]*=c),(0,u.q)(O,O,L),(0,u.n)(O,O),l.setVec(o,O)}return l}(E=_||(_={}))[E.NORMAL=0]="NORMAL",E[E.TANGENT=1]="TANGENT",function(t){t[t.TO_PCPF=0]="TO_PCPF",t[t.FROM_PCPF=1]="FROM_PCPF"}(C||(C={}));const x=(0,s.vt)(),O=(0,s.vt)(),P=(0,l.vt)(),L=(0,a.vt)()},72258:(t,n,e)=>{e.d(n,{UR:()=>v,p5:()=>T,xK:()=>_});var r=e(53966),o=e(34727),a=e(83047),i=e(77690),l=e(29242),u=e(58083),s=e(9093),c=e(38954),f=e(51850),p=e(98764),g=e(48353),d=e(65806),h=e(27615),y=e(21325),m=e(73354),A=e(22141);const M=()=>r.A.getLogger("esri.geometry.support.meshUtils.vertexSpaceConversion");function T(t,n,{vertexSpace:e,spatialReference:r}){if("georeferenced"===e.type){const o=t;if(!(0,d.g)(n,o,r))return!1;const{origin:a}=e;return(0,c.d)(t,o,a),!0}const o=(0,p.lO)(r),a=t;if(!(0,d.g)(n,a,o))return!1;const{origin:i}=e,l=x;if(!(0,g.l)(r,i,l,o))return!1;const s=(0,u.B8)(x,l);return null!=s&&((0,c.t)(t,a,s),!0)}function v(t,n,e){const{vertexSpace:r,transform:o,vertexAttributes:a}=t,l=(0,h.Hq)(r)?o:null,f=S(t.spatialReference,e,O.SOURCE_AND_TARGET);if((0,h.yJ)(r,n)&&(!l||(0,u.t2)(l.localMatrix,s.zK))&&R(f)){const{position:t,normal:n,tangent:r}=a,o=e?.allowBufferReuse;return{position:o?t:t.slice(),normal:o?n:n?.slice(),tangent:o?r:r?.slice()}}switch(t.vertexSpace.type){case"local":return"local"===n.type?function({vertexAttributes:t,spatialReference:n,transform:e},{origin:r},o,a){const i=b(n,a);if(!(0,g.l)(n,r,C,i))return(0,A.CN)(M(),n,i),null;if(e&&(0,u.lw)(C,C,e.localMatrix),!(0,g.l)(n,o,E,i))return(0,A.CN)(M(),i,n),null;(0,u.B8)(E,E);const l=(0,u.lw)(C,E,C);return B(l,n,a,O.SOURCE_AND_TARGET),w(t,l)}(t,t.vertexSpace,n.origin,e):function({spatialReference:t,vertexAttributes:n,transform:e},{origin:r},o,a){const i=b(t,a);if(!(0,g.l)(t,r,C,i))return(0,A.CN)(M(),t,i),null;e&&(0,u.lw)(C,C,e.localMatrix),B(C,t,a,O.SOURCE);const l=new Float64Array(n.position.length),s=function(t,n,e,r,o){(0,m.t)(r,t,n);const a=new Float64Array(t.length);return(0,A.$5)(r,o,a,e)?a:((0,A.CN)(M(),o,e),null)}(n.position,C,t,l,i);if(!s)return null;const f=function(t,n,e,r,o,a){if(null==o)return null;const i=new Float32Array(o.length);return(0,A.qs)(o,i,a),(0,A.si)(i,t,n,e,r,i)?i:((0,A.CN)(M(),r,n),null)}(s,t,l,i,n.normal,C);if(n.normal&&!f)return null;const p=function(t,n,e,r,o,a){if(null==o)return null;const i=new Float32Array(o.length);return(0,A.KM)(o,i,a),(0,A.Mv)(i,t,n,e,r,i)?i:((0,A.CN)(M(),r,n),null)}(s,t,l,i,n.tangent,C);if(n.tangent&&!p)return null;if(o){const t=(0,c.v)(N,o);(0,m.a)(s,s,t)}return{position:s,normal:f,tangent:p}}(t,t.vertexSpace,n.origin,e);case"georeferenced":return"local"===n.type?function({vertexAttributes:t,spatialReference:n,transform:e},{origin:r},o,a){const l=b(n,a);if(!(0,g.l)(n,o,C,l))return(0,A.CN)(M(),n,l),null;const s=1/S(n,a,O.TARGET);(0,u.hs)(C,C,[s,s,s]);const c=(0,u.B8)(E,C),{position:f,normal:p,tangent:d}=function(t,n,e){if(!n)return t;if(!e){const{position:e,normal:r,tangent:o}=t;return{position:(0,m.a)(new Float64Array(e.length),e,n),tangent:o,normal:r}}const r=w(t,e.localMatrix);return(0,m.a)(r.position,r.position,n),r}(t,r,e),h=new Float64Array(f.length),y=function(t,n,e,r,o){const a=(0,A.gr)(t,n,r,o);if(!a)return(0,A.CN)(M(),n,o),null;const i=new Float64Array(a.length);return(0,m.t)(i,a,e),i}(f,n,c,h,l);if(!y)return null;const T=(0,i.Ge)(F,c),v=function(t,n,e,r,o,a,i){if(null==t)return null;const l=i??new Float32Array(t.length);return(0,A.X4)(t,n,e,r,o,l)?((0,m.b)(l,l,a),l):((0,A.CN)(M(),e,o),null)}(p,f,n,h,l,T,p!==t.normal?p:void 0);if(!v&&p)return null;const B=function(t,n,e,r,o,a,i){if(null==t)return null;const l=i??new Float32Array(t.length);return(0,A.xA)(t,n,e,r,o,l)?((0,m.b)(l,l,a,4),l):((0,A.CN)(M(),e,o),null)}(d,f,n,h,l,T,d!==t.tangent?d:void 0);return!B&&d?null:{position:y,normal:v,tangent:B}}(t,t.vertexSpace,n.origin,e):function({vertexAttributes:t,transform:n,spatialReference:e},{origin:r},o,a){const i=S(e,a,O.SOURCE_AND_TARGET),l=r||!R(i)?(0,u.C)(C,n?.localMatrix??s.zK):null;l&&B(l,e,a,O.SOURCE_AND_TARGET);const{position:f,normal:p,tangent:g}=l?w(t,l):t,d=a?.allowBufferReuse,h=d?f:new Float64Array(f.length);let y=f;if(r&&(y=(0,m.a)(h,y,r)),o){const t=(0,c.v)(N,o);y=(0,m.a)(h,y,t)}return{position:y!==t.position||d?y:y.slice(),normal:p!==t.normal||d?p:p?.slice(),tangent:g!==t.tangent||d?g:g?.slice()}}(t,t.vertexSpace,n.origin,e)}}function b(t,n){return n?.useEllipsoid&&(0,y.B3)(t)?p.Y0:(0,p.lO)(t)}function w(t,n){const e=new Float64Array(t.position.length);(0,m.t)(e,t.position,n);const r=t.normal?new Float32Array(t.normal.length):null,o=t.tangent?new Float32Array(t.tangent.length):null;return r&&t.normal&&(0,A.qs)(t.normal,r,n),o&&t.tangent&&(0,A.KM)(t.tangent,o,n),{position:e,normal:r,tangent:o}}function B(t,n,e,r){const o=S(n,e,r);R(o)||(0,u.hs)(t,t,[o,o,o])}function S(t,n,e){const r=!!(e&O.SOURCE),o=!!(e&O.TARGET),a=n?.sourceUnit,i=n?.targetUnit;if(!a&&!i)return 1;let l=_(a,t);r||!a||R(l)||(M().warn("source unit conversion not supported"),l=1);let u=1/_(i,t);return o||!i||R(u)||(M().warn("target unit conversion not supported"),u=1),l*u}function R(t){return(0,o.Io)(t,1)}function _(t,n){if(null==t)return 1;const e=(0,a.KX)(n);return 1/(0,a.oU)(e,"meters",t)}const C=(0,s.vt)(),E=(0,s.vt)(),F=(0,l.vt)(),N=(0,f.vt)(),x=(0,s.vt)();var O,P;(P=O||(O={}))[P.NONE=0]="NONE",P[P.SOURCE=1]="SOURCE",P[P.TARGET=2]="TARGET",P[P.SOURCE_AND_TARGET=3]="SOURCE_AND_TARGET"}}]);