@arcgis/core 4.34.0-next.21 → 4.34.0-next.22

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 (94) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{bcaf6edf887e4afbbdd2.js → 02dc6e31b1244e5bb785.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{871fae52d2fddc9e7794.js → 04c17957c15234ca0321.js} +1 -1
  4. package/assets/esri/core/workers/chunks/084236ca316aad980192.js +1 -0
  5. package/assets/esri/core/workers/chunks/0b484224a92b52c34330.js +1 -0
  6. package/assets/esri/core/workers/chunks/{822b32aaeec05a347c84.js → 0ba6177ba118a0f032e2.js} +1 -1
  7. package/assets/esri/core/workers/chunks/12723e79b996969e304e.js +1 -0
  8. package/assets/esri/core/workers/chunks/{bd7b985f7962b1cc7b8a.js → 146520d263b910b5bdc7.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{445ddf57d2f503a0b98b.js → 15064c3b21b325d5c2f6.js} +1 -1
  10. package/assets/esri/core/workers/chunks/19ae76283a0cb0fe4dee.js +346 -0
  11. package/assets/esri/core/workers/chunks/{82a5000296134834d1ac.js → 1d75cb1747ffb7b8b050.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{55ce214a10fb6fc2e901.js → 24fe862b607ec927e07f.js} +1 -1
  13. package/assets/esri/core/workers/chunks/30fae1f066dc3cd781f1.js +1 -0
  14. package/assets/esri/core/workers/chunks/{7ec73f63929b1623de72.js → 3793f282ddaccd3465f2.js} +1 -1
  15. package/assets/esri/core/workers/chunks/3fcd73ba832cb53d3a07.js +1 -0
  16. package/assets/esri/core/workers/chunks/{5e7f35bf1aab93cb1c52.js → 4cea5170939c8d363ef7.js} +1 -1
  17. package/assets/esri/core/workers/chunks/5253cca467fe9bc0a210.js +1 -0
  18. package/assets/esri/core/workers/chunks/{735d96d2b951cc1df3a3.js → 576e408fb0834f3948e8.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{2a784da5fa3f502d1803.js → 58e74681ddef30ba9cb6.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{27c9d3f6cebca087a123.js → 6136bf09950adc46bc33.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{dfd9ac2e28c96900c53e.js → 6c33ecffbc783cb8f944.js} +1 -1
  22. package/assets/esri/core/workers/chunks/6ca764b4baadef5c1515.js +1 -0
  23. package/assets/esri/core/workers/chunks/{fcdf714339060731fe1c.js → 7051bcc178eb512819f6.js} +1 -1
  24. package/assets/esri/core/workers/chunks/7cfba5cec425221962e8.js +1 -0
  25. package/assets/esri/core/workers/chunks/{3a753ce4de2e6ad40f7b.js → 86d6007c45f2aa643ac8.js} +1 -1
  26. package/assets/esri/core/workers/chunks/92ad9098006568358550.js +1 -0
  27. package/assets/esri/core/workers/chunks/{2ed698579befe73caafd.js → 94d75f3b215e3bd1b4d7.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{15d1ab71aaf6bcf3145b.js → a7a5b89c2bb69f3af59c.js} +1 -1
  29. package/assets/esri/core/workers/chunks/b4512d62b6cb26fc6b25.js +1 -0
  30. package/assets/esri/core/workers/chunks/{63e984a65ee670449a4a.js → b4bb461955a4c2bce072.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{abc75c945f3cfb1629b0.js → ba5b24beebeb703b5919.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{51afd0e71df1825d7593.js → c64fa94cba71ba2794e2.js} +1 -1
  33. package/assets/esri/core/workers/chunks/c94cc026c4ed330408fb.js +1 -0
  34. package/assets/esri/core/workers/chunks/cab1a1067f44ce374673.js +1 -0
  35. package/assets/esri/core/workers/chunks/{3f4a8c874c022dace9be.js → d1b363c418a67b087306.js} +1 -1
  36. package/assets/esri/core/workers/chunks/d45383d76ba99718b6d9.js +1 -0
  37. package/assets/esri/core/workers/chunks/{f806e9221dff7fcfc2f9.js → e2cb295104ed2f8cd2ff.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{273ff53a68714e4daad5.js → e49a135a2933306a6105.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{d31fa648497b0af97dc1.js → e9a9174c4d1a0a9effb6.js} +1 -1
  40. package/assets/esri/core/workers/chunks/f3d5d92e0aefc2593208.js +1 -0
  41. package/assets/esri/core/workers/chunks/{fc8bbc571216edd9ef5a.js → f3e3c2340452c1d60c95.js} +1 -1
  42. package/assets/esri/core/workers/chunks/{85b0e2a898251d048dda.js → f42155b7a4e6c5e80757.js} +1 -1
  43. package/assets/esri/core/workers/chunks/f43110391f124b8a179c.js +1009 -0
  44. package/assets/esri/core/workers/chunks/{080a8a1c6fe2d215142d.js → fb5e2b1ced03eef28e96.js} +1 -1
  45. package/assets/esri/core/workers/chunks/fe73e74e3e4278aedcc3.js +1 -0
  46. package/config.js +1 -1
  47. package/core/Clonable.js +1 -1
  48. package/core/lang.js +1 -1
  49. package/geometry/Mesh.js +1 -1
  50. package/geometry/support/MeshComponent.js +1 -1
  51. package/geometry/support/MeshMaterial.js +1 -1
  52. package/geometry/support/MeshMaterialMetallicRoughness.js +1 -1
  53. package/geometry/support/MeshTexture.js +1 -1
  54. package/geometry/support/MeshTransform.js +1 -1
  55. package/geometry/support/MeshVertexAttributes.js +1 -1
  56. package/geometry/support/meshUtils/convertMeshVertexSpace.js +1 -1
  57. package/geometry/support/meshUtils/merge.js +1 -1
  58. package/geometry/support/meshUtils/meshCloneUtils.js +5 -0
  59. package/interfaces.d.ts +94 -10
  60. package/kernel.js +1 -1
  61. package/package.json +1 -1
  62. package/support/revision.js +1 -1
  63. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  64. package/views/3d/state/GoToOperation.js +1 -1
  65. package/views/3d/state/ViewStateManager.js +1 -1
  66. package/views/3d/support/cameraUtils.js +1 -1
  67. package/views/3d/support/viewingModeUtils.js +5 -0
  68. package/views/3d/support/viewpointUtils.js +1 -1
  69. package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
  70. package/views/3d/terrain/OverlayManager.js +1 -1
  71. package/views/3d/terrain/OverlayRenderTargets.js +1 -1
  72. package/views/3d/terrain/OverlayRenderer.js +1 -1
  73. package/views/3d/webgl/ManagedFBOResource.js +1 -1
  74. package/views/3d/webgl.d.ts +2 -0
  75. package/views/3d/webgl.js +1 -1
  76. package/views/support/layerViewUtils.js +1 -1
  77. package/widgets/Editor/Edits.js +1 -1
  78. package/assets/esri/core/workers/chunks/06c3725d6cc21e7e4bcf.js +0 -1
  79. package/assets/esri/core/workers/chunks/0f5643d5437f48c63225.js +0 -1
  80. package/assets/esri/core/workers/chunks/1c7393bcd6e85ba25e1b.js +0 -1
  81. package/assets/esri/core/workers/chunks/2e3f620c79ec04033a6e.js +0 -1
  82. package/assets/esri/core/workers/chunks/48953ddf0bbcf3d77e04.js +0 -1
  83. package/assets/esri/core/workers/chunks/5b7464137aacf1c5fd78.js +0 -1
  84. package/assets/esri/core/workers/chunks/7925e8ffa8027b59410e.js +0 -1
  85. package/assets/esri/core/workers/chunks/8235a997acb45ab43173.js +0 -1
  86. package/assets/esri/core/workers/chunks/9d2cb559dd9af4e1727c.js +0 -1
  87. package/assets/esri/core/workers/chunks/9eb1a171f5ef1fef42ed.js +0 -346
  88. package/assets/esri/core/workers/chunks/bac5e1d50b69f0d94694.js +0 -1
  89. package/assets/esri/core/workers/chunks/bcefb413d03d59506b5a.js +0 -1009
  90. package/assets/esri/core/workers/chunks/c317819ab0544c50c078.js +0 -1
  91. package/assets/esri/core/workers/chunks/c96fed4889712f5a9135.js +0 -1
  92. package/assets/esri/core/workers/chunks/cb4c49d5b70f9563bc46.js +0 -1
  93. package/assets/esri/core/workers/chunks/e9aa1d9ded8a52a40c57.js +0 -1
  94. package/assets/esri/core/workers/chunks/f65ad6a41c0c69bf1b21.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2944],{24151:(t,n,e)=>{var a;e.d(n,{RT:()=>a}),function(t){t[t.Global=1]="Global",t[t.Local=2]="Local"}(a||(a={}))},27921:(t,n,e)=>{e.d(n,{$Q:()=>R,C:()=>h,Cr:()=>d,LV:()=>c,Nj:()=>L,O_:()=>l,Qj:()=>u,T7:()=>O,Tj:()=>P,Ui:()=>m,_I:()=>C,fA:()=>f,gv:()=>g,lU:()=>I,mN:()=>b,mP:()=>A,mR:()=>S,v1:()=>z,vE:()=>D,vt:()=>o});var a=e(34727),r=e(38954),i=e(51850),s=(e(87317),e(44280),e(32114));function o(t=F){return[t[0],t[1],t[2],t[3]]}function c(t=F[0],n=F[1],e=F[2],a=F[3]){return f(t,n,e,a,s.Km.get())}function h(t,n){return f(n[0],n[1],n[2],n[3],t)}function u(t){return t}function f(t,n,e,a,r=o()){return r[0]=t,r[1]=n,r[2]=e,r[3]=a,r}function l(t,n,e){const a=n[0]*n[0]+n[1]*n[1]+n[2]*n[2],r=Math.abs(a-1)>1e-5&&a>1e-12?1/Math.sqrt(a):1;return e[0]=n[0]*r,e[1]=n[1]*r,e[2]=n[2]*r,e[3]=-(e[0]*t[0]+e[1]*t[1]+e[2]*t[2]),e}function d(t,n,e,a=o()){const r=e[0]-n[0],i=e[1]-n[1],s=e[2]-n[2],c=t[0]-n[0],h=t[1]-n[1],u=t[2]-n[2],f=i*u-s*h,l=s*c-r*u,d=r*h-i*c,I=f*f+l*l+d*d,E=Math.abs(I-1)>1e-5&&I>1e-12?1/Math.sqrt(I):1;return a[0]=f*E,a[1]=l*E,a[2]=d*E,a[3]=-(a[0]*t[0]+a[1]*t[1]+a[2]*t[2]),a}function I(t,n,e,a=0,i=Math.floor(e*(1/3)),s=Math.floor(e*(2/3))){if(e<3)return!1;n(M,a);let o=i,c=!1;for(;o<e-1&&!c;)n(_,o),o++,c=!(0,r.q)(M,_);if(!c)return!1;for(o=Math.max(o,s),c=!1;o<e&&!c;)n(N,o),o++,(0,r.d)(T,M,_),(0,r.n)(T,T),(0,r.d)(v,_,N),(0,r.n)(v,v),c=!(0,r.q)(M,N)&&!(0,r.q)(_,N)&&Math.abs((0,r.e)(T,v))<E;return c?(d(M,_,N,t),!0):(0!==a||1!==i||2!==s)&&I(t,n,e,0,1,2)}e(32728);const E=.99619469809,M=(0,i.vt)(),_=(0,i.vt)(),N=(0,i.vt)(),T=(0,i.vt)(),v=(0,i.vt)();function A(t,n,e){return n!==t&&h(t,n),t[3]=-(0,r.e)(t,e),t}function S(t,n,e,a){return(0,r.h)(N,n,t),l(e,N,a)}function m(t,n,e){return null!=n&&p(D(t,n.origin,n.direction,x,e))}function O(t,n,e){return p(D(t,n.origin,n.vector,z.NONE,e))}function g(t,n,e){return p(D(t,n.origin,n.vector,z.CLAMP,e))}function P(t,n){return b(t,n)>=0}function R(t,n){const e=(0,r.e)(t,n.ray.direction),a=-b(t,n.ray.origin);if(a<0&&e>=0)return!1;if(e>-1e-6&&e<1e-6)return a>0;if((a<0||e<0)&&!(a<0&&e<0))return!0;const i=a/e;return e>0?i<n.c1&&(n.c1=i):i>n.c0&&(n.c0=i),n.c0<=n.c1}function C(t,n,e){const a=(0,r.g)(s.rq.get(),t,-t[3]),i=function(t,n,e){const a=(0,r.g)(s.rq.get(),t,(0,r.e)(t,n));return(0,r.d)(e,n,a),e}(t,(0,r.d)(s.rq.get(),n,a),s.rq.get());return(0,r.f)(e,i,a),e}function b(t,n){return(0,r.e)(t,n)+t[3]}var L,j;function p(t){return t===L.INTERSECTS_INSIDE_OUT||t===L.INTERSECTS_OUTSIDE_IN}function D(t,n,e,i,s){const o=(0,r.e)(t,e),c=b(t,n);if(0===o)return c>=0?L.INSIDE:L.OUTSIDE;let h=-c/o;return i&z.CLAMP&&(h=(0,a.qE)(h,0,1)),!(i&z.INFINITE_MIN)&&h<0||!(i&z.INFINITE_MAX)&&h>1?c>=0?L.INSIDE:L.OUTSIDE:((0,r.f)(s,n,(0,r.g)(s,e,h)),c>=0?L.INTERSECTS_INSIDE_OUT:L.INTERSECTS_OUTSIDE_IN)}(j=L||(L={}))[j.INTERSECTS_INSIDE_OUT=0]="INTERSECTS_INSIDE_OUT",j[j.INTERSECTS_OUTSIDE_IN=1]="INTERSECTS_OUTSIDE_IN",j[j.INSIDE=2]="INSIDE",j[j.OUTSIDE=3]="OUTSIDE";const F=[0,0,1,0];var z;!function(t){t[t.NONE=0]="NONE",t[t.CLAMP=1]="CLAMP",t[t.INFINITE_MIN=4]="INFINITE_MIN",t[t.INFINITE_MAX=8]="INFINITE_MAX"}(z||(z={})),z.INFINITE_MIN,z.INFINITE_MAX;const x=z.INFINITE_MAX},32728:(t,n,e)=>{e.d(n,{nu:()=>i}),e(34727);var a=e(38954),r=e(51850);function i(t,n,e,i=(0,r.vt)()){const c=(0,a.l)(t),h=(0,a.l)(n),u=(0,a.e)(t,n)/(c*h);if(u<.9999999999999999){const r=Math.acos(u),f=((1-e)*c+e*h)/Math.sin(r),l=f/c*Math.sin((1-e)*r),d=f/h*Math.sin(e*r);return(0,a.g)(s,t,l),(0,a.g)(o,n,d),(0,a.f)(i,s,o)}return(0,a.m)(i,t,n,e)}(0,r.vt)(),(0,r.vt)(),(0,r.vt)();const s=(0,r.vt)(),o=(0,r.vt)()},46540:(t,n,e)=>{var a;e.d(n,{r:()=>a}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.UVI="uvi",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.ROTATION="rotation",t.TANGENT="tangent",t.OFFSET="offset",t.PERSPECTIVEDIVIDE="perspectiveDivide",t.CENTEROFFSETANDDISTANCE="centerOffsetAndDistance",t.LENGTH="length",t.NEXTDELTA="nextDelta",t.PREVIOUSDELTA="previousDelta",t.U0="u0",t.LINEPARAMETERS="lineParameters",t.COLORFEATUREATTRIBUTE="colorFeatureAttribute",t.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",t.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",t.DISTANCETOSTART="distanceToStart",t.UVMAPSPACE="uvMapSpace",t.BOUNDINGRECT="boundingRect",t.UVREGION="uvRegion",t.PROFILERIGHT="profileRight",t.PROFILEUP="profileUp",t.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",t.PROFILEAUXDATA="profileAuxData",t.INSTANCEMODELORIGINHI="instanceModelOriginHi",t.INSTANCEMODELORIGINLO="instanceModelOriginLo",t.INSTANCEMODEL="instanceModel",t.INSTANCEMODELNORMAL="instanceModelNormal",t.INSTANCECOLOR="instanceColor",t.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",t.LOCALTRANSFORM="localTransform",t.GLOBALTRANSFORM="globalTransform",t.BOUNDINGSPHERE="boundingSphere",t.MODELORIGIN="modelOrigin",t.MODELSCALEFACTORS="modelScaleFactors",t.FEATUREATTRIBUTE="featureAttribute",t.STATE="state",t.LODLEVEL="lodLevel",t.POSITION0="position0",t.POSITION1="position1",t.NORMAL2COMPRESSED="normal2Compressed",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.START_UP="startUp",t.END_UP="endUp",t.EXTRUDE="extrude",t.OLIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(a||(a={}))},46610:(t,n,e)=>{e.d(n,{K:()=>a,n:()=>r});class a{constructor(t,n,e=n){this.data=t,this.size=n,this.stride=e}}class r extends a{constructor(t,n,e,a=!1,r=e){super(t,e,r),this.indices=n,this.exclusive=a}}},48353:(t,n,e)=>{e.d(n,{l:()=>h});var a=e(34727),r=e(58083),i=e(51850);function s(t,n,e){const a=Math.sin(t),r=Math.cos(t),i=Math.sin(n),s=Math.cos(n),o=e;return o[0]=-a,o[4]=-i*r,o[8]=s*r,o[12]=0,o[1]=r,o[5]=-i*a,o[9]=s*a,o[13]=0,o[2]=0,o[6]=s,o[10]=i,o[14]=0,o[3]=0,o[7]=0,o[11]=0,o[15]=1,o}var o=e(37539),c=e(21325);function h(t,n,e,a){const i=(0,o.Tp)(t,a);if(null==i)return!1;const h=i.source.spatialReferenceId,I=i.dest.spatialReferenceId;if(h===I&&!u(I)&&(h!==o.rz.UNKNOWN||(0,c.aI)(t,a)))return(0,r.kN)(e,n),!0;if(u(I)){const t=o.w5[h][o.rz.LON_LAT],a=o.w5[o.rz.LON_LAT][I];return null!=t&&null!=a&&(t(n,0,l,0),a(l,0,d,0),s(f*l[0],f*l[1],e),e[12]=d[0],e[13]=d[1],e[14]=d[2],!0)}const E=u(h);if((I===o.rz.WEB_MERCATOR||I===o.rz.PLATE_CARREE||I===o.rz.WGS84||I===o.rz.CGCS2000)&&(h===o.rz.WGS84||E||h===o.rz.WEB_MERCATOR||h===o.rz.CGCS2000)){const t=o.w5[h][o.rz.LON_LAT],a=o.w5[o.rz.LON_LAT][I];return null!=t&&null!=a&&(t(n,0,l,0),a(l,0,d,0),E?function(t,n,e){s(t,n,e),(0,r.mg)(e,e)}(f*l[0],f*l[1],e):(0,r.D_)(e),e[12]=d[0],e[13]=d[1],e[14]=d[2],!0)}return!1}function u(t){return t===o.rz.SPHERICAL_ECEF||t===o.rz.SPHERICAL_MARS_PCPF||t===o.rz.SPHERICAL_MOON_PCPF||t===o.rz.WGS84_ECEF}const f=(0,a.kU)(1),l=(0,i.vt)(),d=(0,i.vt)()},57005:(t,n,e)=>{e.d(n,{ab:()=>vt,gm:()=>Lt});var a=e(77690),r=e(29242),i=e(9093),s=e(67026),o=e(82534),c=e(38954),h=e(51850),u=e(87317),f=e(91829),l=e(73941),d=e(98764),I=e(48353),E=e(9762),M=e(37539),_=e(27921),N=e(21325),T=e(32114),v=e(24151),A=e(48163),S=e(46610);const m=1e-6,O=(0,h.vt)(),g=(0,h.vt)();function P(t,n,e,a,r,i,s,o,c,h){return function(t,n,e){let a=Nt(t.maxVert[0],t.minVert[0]),r=0;for(let n=1;n<7;++n){const e=Nt(t.maxVert[n],t.minVert[n]);e>a&&(a=e,r=n)}It(n,t.minVert[r]),It(e,t.maxVert[r])}(t,a,r),Nt(a,r)<m?1:(lt(s,a,r),Mt(s,s),function(t,n,e,a){const{data:r,size:i}=t;let s=Number.NEGATIVE_INFINITY,o=0;for(let t=0;t<r.length;t+=i){x[0]=r[t]-n[0],x[1]=r[t+1]-n[1],x[2]=r[t+2]-n[2];const a=e[0]*x[0]+e[1]*x[1]+e[2]*x[2],i=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],c=x[0]*x[0]+x[1]*x[1]+x[2]*x[2]-a*a/i;c>s&&(s=c,o=t)}return It(a,r,o),s}(n,a,s,i)<m?2:(lt(o,r,i),Mt(o,o),lt(c,i,a),Mt(c,c),Et(e,o,s),Mt(e,e),B(n,e,s,o,c,h),0))}const R=(0,h.vt)(),C=(0,h.vt)(),b=(0,h.vt)(),L=(0,h.vt)(),j=(0,h.vt)(),p=(0,h.vt)(),D=(0,h.vt)(),F=(0,h.vt)();function z(t,n,e,a,r,i,s,o,c){(function(t,n,e,a,r){!function(t,n,e,a,r){const{data:i,size:s}=t;It(a,i),It(r,a),e[0]=Tt(H,n),e[1]=e[0];for(let t=s;t<i.length;t+=s){const s=i[t]*n[0]+i[t+1]*n[1]+i[t+2]*n[2];s<e[0]&&(e[0]=s,It(a,i,t)),s>e[1]&&(e[1]=s,It(r,i,t))}}(t,n,U,r,a);const i=Tt(e,n);U[1]-m<=i&&(a[0]=void 0),U[0]+m>=i&&(r[0]=void 0)})(t,n,e,R,C),void 0!==R[0]&&(lt(b,R,e),Mt(b,b),lt(L,R,a),Mt(L,L),lt(j,R,r),Mt(j,j),Et(p,L,i),Mt(p,p),Et(D,j,s),Mt(D,D),Et(F,b,o),Mt(F,F),B(t,p,i,L,b,c),B(t,D,s,j,L,c),B(t,F,o,b,j,c)),void 0!==C[0]&&(lt(b,C,e),Mt(b,b),lt(L,C,a),Mt(L,L),lt(j,C,r),Mt(j,j),Et(p,L,i),Mt(p,p),Et(D,j,s),Mt(D,D),Et(F,b,o),Mt(F,F),B(t,p,i,L,b,c),B(t,D,s,j,L,c),B(t,F,o,b,j,c))}const x=[0,0,0],U=(0,A.vt)(),w=(0,h.vt)(),q=(0,h.vt)(),y=(0,h.vt)(),V=(0,h.vt)(),G=(0,h.vt)(),X=(0,h.vt)();function B(t,n,e,a,r,i){if(_t(n)<m)return;Et(w,e,n),Et(q,a,n),Et(y,r,n),Q(t,n,U),G[1]=U[0],V[1]=U[1],X[1]=V[1]-G[1];const s=[e,a,r],o=[w,q,y];for(let e=0;e<3;++e){Q(t,s[e],U),G[0]=U[0],V[0]=U[1],Q(t,o[e],U),G[2]=U[0],V[2]=U[1],X[0]=V[0]-G[0],X[2]=V[2]-G[2];const a=ut(X);a<i.quality&&(It(i.b0,s[e]),It(i.b1,n),It(i.b2,o[e]),i.quality=a)}}const H=(0,h.vt)();function Q(t,n,e){const{data:a,size:r}=t;e[0]=Number.POSITIVE_INFINITY,e[1]=Number.NEGATIVE_INFINITY;for(let t=0;t<a.length;t+=r){const r=a[t]*n[0]+a[t+1]*n[1]+a[t+2]*n[2];e[0]=Math.min(e[0],r),e[1]=Math.max(e[1],r)}}function Y(t,n,e){e.center=t,e.halfSize=(0,c.g)(n,n,.5),e.quaternion=o.zK}const k=(0,h.vt)(),W=(0,h.vt)(),Z=(0,h.vt)(),K=(0,h.vt)(),J=(0,h.vt)(),$=(0,h.vt)();function tt(t,n,e){It(k,n),Math.abs(n[0])>Math.abs(n[1])&&Math.abs(n[0])>Math.abs(n[2])?k[0]=0:Math.abs(n[1])>Math.abs(n[2])?k[1]=0:k[2]=0,_t(k)<m&&(k[0]=k[1]=k[2]=1),Et(W,n,k),Mt(W,W),Et(Z,n,W),Mt(Z,Z),nt(t,n,W,Z,K,J),lt($,J,K),ot(n,W,Z,K,J,$,e)}function nt(t,n,e,a,r,i){Q(t,n,U),r[0]=U[0],i[0]=U[1],Q(t,e,U),r[1]=U[0],i[1]=U[1],Q(t,a,U),r[2]=U[0],i[2]=U[1]}const et=(0,h.vt)(),at=(0,h.vt)(),rt=(0,h.vt)(),it=(0,r.fA)(1,0,0,0,1,0,0,0,1),st=(0,o.vt)();function ot(t,n,e,a,r,i,s){it[0]=t[0],it[1]=t[1],it[2]=t[2],it[3]=n[0],it[4]=n[1],it[5]=n[2],it[6]=e[0],it[7]=e[1],it[8]=e[2],s.quaternion=function(t,n){const e=n[0]+n[4]+n[8];if(e>0){let a=Math.sqrt(e+1);t[3]=.5*a,a=.5/a,t[0]=(n[5]-n[7])*a,t[1]=(n[6]-n[2])*a,t[2]=(n[1]-n[3])*a}else{let e=0;n[4]>n[0]&&(e=1),n[8]>n[3*e+e]&&(e=2);const a=(e+1)%3,r=(e+2)%3;let i=Math.sqrt(n[3*e+e]-n[3*a+a]-n[3*r+r]+1);t[e]=.5*i,i=.5/i,t[3]=(n[3*a+r]-n[3*r+a])*i,t[a]=(n[3*a+e]+n[3*e+a])*i,t[r]=(n[3*r+e]+n[3*e+r])*i}return t}(st,it),ft(et,a,r),dt(et,et,.5),dt(at,t,et[0]),dt(rt,n,et[1]),ft(at,at,rt),dt(rt,e,et[2]),s.center=(0,c.f)(at,at,rt),s.halfSize=(0,c.g)(et,i,.5)}class ct{constructor(t){this.minVert=new Array(7),this.maxVert=new Array(7),this.buffer=new ArrayBuffer(448);let n=0;this.minProj=new Float64Array(this.buffer,n,7),n+=56,this.maxProj=new Float64Array(this.buffer,n,7),n+=56;for(let t=0;t<7;++t)this.minVert[t]=new Float64Array(this.buffer,n,3),n+=24;for(let t=0;t<7;++t)this.maxVert[t]=new Float64Array(this.buffer,n,3),n+=24;for(let t=0;t<7;++t)this.minProj[t]=Number.POSITIVE_INFINITY,this.maxProj[t]=Number.NEGATIVE_INFINITY;const e=new Array(7),a=new Array(7),{data:r,size:i}=t;for(let t=0;t<r.length;t+=i){let n=r[t];n<this.minProj[0]&&(this.minProj[0]=n,e[0]=t),n>this.maxProj[0]&&(this.maxProj[0]=n,a[0]=t),n=r[t+1],n<this.minProj[1]&&(this.minProj[1]=n,e[1]=t),n>this.maxProj[1]&&(this.maxProj[1]=n,a[1]=t),n=r[t+2],n<this.minProj[2]&&(this.minProj[2]=n,e[2]=t),n>this.maxProj[2]&&(this.maxProj[2]=n,a[2]=t),n=r[t]+r[t+1]+r[t+2],n<this.minProj[3]&&(this.minProj[3]=n,e[3]=t),n>this.maxProj[3]&&(this.maxProj[3]=n,a[3]=t),n=r[t]+r[t+1]-r[t+2],n<this.minProj[4]&&(this.minProj[4]=n,e[4]=t),n>this.maxProj[4]&&(this.maxProj[4]=n,a[4]=t),n=r[t]-r[t+1]+r[t+2],n<this.minProj[5]&&(this.minProj[5]=n,e[5]=t),n>this.maxProj[5]&&(this.maxProj[5]=n,a[5]=t),n=r[t]-r[t+1]-r[t+2],n<this.minProj[6]&&(this.minProj[6]=n,e[6]=t),n>this.maxProj[6]&&(this.maxProj[6]=n,a[6]=t)}for(let t=0;t<7;++t){let n=e[t];It(this.minVert[t],r,n),n=a[t],It(this.maxVert[t],r,n)}}}class ht{constructor(){this.b0=(0,h.fA)(1,0,0),this.b1=(0,h.fA)(0,1,0),this.b2=(0,h.fA)(0,0,1),this.quality=0}}function ut(t){return t[0]*t[1]+t[0]*t[2]+t[1]*t[2]}function ft(t,n,e){t[0]=n[0]+e[0],t[1]=n[1]+e[1],t[2]=n[2]+e[2]}function lt(t,n,e){t[0]=n[0]-e[0],t[1]=n[1]-e[1],t[2]=n[2]-e[2]}function dt(t,n,e){t[0]=n[0]*e,t[1]=n[1]*e,t[2]=n[2]*e}function It(t,n,e=0){t[0]=n[e],t[1]=n[e+1],t[2]=n[e+2]}function Et(t,n,e){const a=n[0],r=n[1],i=n[2],s=e[0],o=e[1],c=e[2];t[0]=r*c-i*o,t[1]=i*s-a*c,t[2]=a*o-r*s}function Mt(t,n){const e=n[0]*n[0]+n[1]*n[1]+n[2]*n[2];if(e>0){const a=1/Math.sqrt(e);t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a}}function _t(t){return t[0]*t[0]+t[1]*t[1]+t[2]*t[2]}function Nt(t,n){const e=n[0]-t[0],a=n[1]-t[1],r=n[2]-t[2];return e*e+a*a+r*r}function Tt(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}class vt{constructor(t=h.uY,n=Bt,e=o.zK){this._data=[t[0],t[1],t[2],n[0],n[1],n[2],e[0],e[1],e[2],e[3]]}clone(){const t=new vt;return t._data=this._data.slice(),t}invalidate(){this._data[3]=-1}get isValid(){return this._data[3]>=0}static fromData(t){const n=new vt;return n._data=t.slice(),n}static fromJSON(t){return new vt(t.center,t.halfSize,t.quaternion)}copy(t){this._data=t.data.slice()}get center(){return(0,c.i)(T.rq.get(),this._data[0],this._data[1],this._data[2])}get centerX(){return this._data[0]}get centerY(){return this._data[1]}get centerZ(){return this._data[2]}getCenter(t){return t[0]=this._data[0],t[1]=this._data[1],t[2]=this._data[2],t}set center(t){this._data[0]=t[0],this._data[1]=t[1],this._data[2]=t[2]}setCenter(t,n,e){this._data[0]=t,this._data[1]=n,this._data[2]=e}get halfSize(){return(0,c.i)(T.rq.get(),this._data[3],this._data[4],this._data[5])}get halfSizeX(){return this._data[3]}get halfSizeY(){return this._data[4]}get halfSizeZ(){return this._data[5]}getHalfSize(t){return t[0]=this._data[3],t[1]=this._data[4],t[2]=this._data[5],t}set halfSize(t){this._data[3]=t[0],this._data[4]=t[1],this._data[5]=t[2]}get quaternion(){return(0,s.hZ)(T.J8.get(),this._data[6],this._data[7],this._data[8],this._data[9])}getQuaternion(t){return t[0]=this._data[6],t[1]=this._data[7],t[2]=this._data[8],t[3]=this._data[9],t}set quaternion(t){this._data[6]=t[0],this._data[7]=t[1],this._data[8]=t[2],this._data[9]=t[3]}get data(){return this._data}getCorners(t){const n=At,e=this._data;n[0]=e[6],n[1]=e[7],n[2]=e[8],n[3]=e[9];for(let a=0;a<8;++a){const r=t[a];r[0]=(1&a?-1:1)*e[3],r[1]=(2&a?-1:1)*e[4],r[2]=(4&a?-1:1)*e[5],(0,c.v)(r,r,n),r[0]+=e[0],r[1]+=e[1],r[2]+=e[2]}}doesIntersectFrustumConservativeApproximation(t){return this.intersectPlane(t[0])<=0&&this.intersectPlane(t[1])<=0&&this.intersectPlane(t[2])<=0&&this.intersectPlane(t[3])<=0&&this.intersectPlane(t[4])<=0&&this.intersectPlane(t[5])<=0}get radius(){const t=this._data[3],n=this._data[4],e=this._data[5];return Math.sqrt(t*t+n*n+e*e)}intersectSphere(t){Ot[0]=this._data[0]-t[0],Ot[1]=this._data[1]-t[1],Ot[2]=this._data[2]-t[2];const n=this.getQuaternion(St);return(0,s.Xr)(At,n),(0,c.v)(Ot,Ot,At),(0,c.w)(Ot,Ot),gt[0]=Math.min(Ot[0],this._data[3]),gt[1]=Math.min(Ot[1],this._data[4]),gt[2]=Math.min(Ot[2],this._data[5]),(0,c.x)(gt,Ot)<t[3]*t[3]}intersectSphereWithMBS(t,n=this.radius){const e=this._data;Ot[0]=e[0]-t[0],Ot[1]=e[1]-t[1],Ot[2]=e[2]-t[2];const a=t[3],r=a+n;return!((0,c.y)(Ot)>r*r)&&(At[0]=-e[6],At[1]=-e[7],At[2]=-e[8],At[3]=e[9],(0,c.v)(Ot,Ot,At),(0,c.w)(Ot,Ot),gt[0]=Math.min(Ot[0],e[3]),gt[1]=Math.min(Ot[1],e[4]),gt[2]=Math.min(Ot[2],e[5]),(0,c.x)(gt,Ot)<a*a)}intersectPlane(t){const n=t[0]*this._data[0]+t[1]*this._data[1]+t[2]*this._data[2]+t[3],e=this.projectedRadius((0,_.Qj)(t));return n>e?1:n<-e?-1:0}intersectRay(t,n,e=0){const a=this._data,r=At;r[0]=-a[6],r[1]=-a[7],r[2]=-a[8],r[3]=a[9],Ot[0]=t[0]-a[0],Ot[1]=t[1]-a[1],Ot[2]=t[2]-a[2];const i=(0,c.v)(Ot,Ot,At),s=(0,c.v)(gt,n,At);let o=-1/0,h=1/0;const u=this.getHalfSize(Ut);for(let t=0;t<3;t++){const n=i[t],a=s[t],r=u[t]+e;if(Math.abs(a)>1e-6){const t=(r-n)/a,e=(-r-n)/a;o=Math.max(o,Math.min(t,e)),h=Math.min(h,Math.max(t,e))}else if(n>r||n<-r)return!1}return o<=h}projectedArea(t,n,e,r){const i=this.getQuaternion(St);(0,s.Xr)(At,i),Ot[0]=t[0]-this._data[0],Ot[1]=t[1]-this._data[1],Ot[2]=t[2]-this._data[2],(0,c.v)(Ot,Ot,At);const o=this.getHalfSize(Ut),h=Ot[0]<-o[0]?-1:Ot[0]>o[0]?1:0,f=Ot[1]<-o[1]?-1:Ot[1]>o[1]?1:0,l=Ot[2]<-o[2]?-1:Ot[2]>o[2]?1:0,d=Math.abs(h)+Math.abs(f)+Math.abs(l);if(0===d)return 1/0;const I=1===d?4:6,E=6*(h+3*f+9*l+13);(0,a.I0)(wt,i),(0,a.hs)(wt,wt,o);const M=this.getCenter(zt);for(let t=0;t<I;t++){const e=bt[E+t];(0,c.i)(Ot,((1&e)<<1)-1,(2&e)-1,((4&e)>>1)-1),(0,c.o)(Ot,Ot,wt),(0,c.f)(Pt,M,Ot),Pt[3]=1,(0,u.t)(Pt,Pt,n);const a=1/Math.max(1e-6,Pt[3]);Ct[2*t]=Pt[0]*a,Ct[2*t+1]=Pt[1]*a}const _=2*I-2;let N=Ct[0]*(Ct[3]-Ct[_+1])+Ct[_]*(Ct[1]-Ct[_-1]);for(let t=2;t<_;t+=2)N+=Ct[t]*(Ct[t+3]-Ct[t-1]);return Math.abs(N)*e*r*.125}projectedRadius(t){const n=this.getQuaternion(St);return(0,s.Xr)(At,n),(0,c.v)(Ot,t,At),Math.abs(Ot[0]*this._data[3])+Math.abs(Ot[1]*this._data[4])+Math.abs(Ot[2]*this._data[5])}minimumDistancePlane(t){return t[0]*this._data[0]+t[1]*this._data[1]+t[2]*this._data[2]+t[3]-this.projectedRadius((0,_.Qj)(t))}maximumDistancePlane(t){return t[0]*this._data[0]+t[1]*this._data[1]+t[2]*this._data[2]+t[3]+this.projectedRadius((0,_.Qj)(t))}toAaBoundingBox(t){const n=this.getQuaternion(St),e=(0,a.I0)(wt,n),r=this._data[3]*Math.abs(e[0])+this._data[4]*Math.abs(e[3])+this._data[5]*Math.abs(e[6]),i=this._data[3]*Math.abs(e[1])+this._data[4]*Math.abs(e[4])+this._data[5]*Math.abs(e[7]),s=this._data[3]*Math.abs(e[2])+this._data[4]*Math.abs(e[5])+this._data[5]*Math.abs(e[8]);t[0]=this._data[0]-r,t[1]=this._data[1]-i,t[2]=this._data[2]-s,t[3]=this._data[0]+r,t[4]=this._data[1]+i,t[5]=this._data[2]+s}transform(t,n,e,a=0,r=(0,d.lO)(e),i=(0,d.lO)(n),o=(0,M.jd)(n,i)){if(e===r)n.isGeographic?function(t,n,e,a,r=(0,d.lO)(e)){const i=(0,l.tO)(e),o=1+Math.max(0,a)/(i.radius+t.centerZ);t.getCenter(Ft),Ft[2]+=a,(0,E.projectBuffer)(Ft,e,0,Ft,r,0),n.center=Ft;const h=t.getQuaternion(St);n.quaternion=h,(0,s.Xr)(At,h),(0,c.i)(Vt,0,0,1),(0,c.v)(Vt,Vt,At);const u=t.getHalfSize(Ut);(0,c.i)(Vt,u[0]*Math.abs(Vt[0]),u[1]*Math.abs(Vt[1]),u[2]*Math.abs(Vt[2])),(0,c.g)(Vt,Vt,i.inverseFlattening),(0,c.f)(Vt,u,Vt),n.halfSize=(0,c.g)(Vt,Vt,o)}(this,t,n,a,i):function(t,n,e,a,r=(0,d.lO)(e),i=(0,M.jd)(e,r)){t.getCorners(yt),t.getCenter(Ft),Ft[2]+=a,(0,I.l)(e,Ft,qt,r),n.setCenter(qt[12],qt[13],qt[14]);const o=2*Math.sqrt(1+qt[0]+qt[5]+qt[10]);At[0]=(qt[6]-qt[9])/o,At[1]=(qt[8]-qt[2])/o,At[2]=(qt[1]-qt[4])/o,At[3]=.25*o;const h=t.getQuaternion(St);n.quaternion=(0,s.lw)(At,At,h),(0,s.Xr)(At,At),(0,c.i)(Gt,0,0,0);const u=n.getCenter(xt);for(const t of yt)t[2]+=a,i(t,0,t,0),(0,c.a)(Vt,t,u),(0,c.v)(Vt,Vt,At),(0,c.w)(Vt,Vt),(0,c.z)(Gt,Gt,Vt);n.halfSize=Gt}(this,t,n,a,i,o);else if(n.isWGS84&&(e.isWebMercator||(0,N.r1)(e)))!function(t,n,e,a,r){n.getCenter(zt),zt[2]+=r;const i=(0,d.lO)(e);(0,E.projectBuffer)(zt,t,0,zt,i,0),jt(i,n,zt,e,a)}(n,this,e,t,a);else if(n.isWebMercator&&(0,N.r1)(e))!function(t,n,e,a,r){n.getCenter(zt),zt[2]+=r,jt(t,n,zt,e,a)}(n,this,e,t,a);else{const r=this.getCenter(zt);r[2]+=a,(0,E.projectBuffer)(r,n,0,r,e,0),t.center=r,this!==t&&(t.quaternion=this.getQuaternion(St),t.halfSize=this.getHalfSize(Ut))}}}const At=(0,o.vt)(),St=(0,o.vt)(),mt=(0,o.vt)(),Ot=(0,h.vt)(),gt=(0,h.vt)(),Pt=(0,f.vt)();function Rt(t,n=new vt){return function(t,n){const{data:e,size:a}=t,r=e.length/a;if(r<=0)return;const i=new ct(t);ft(O,i.minProj,i.maxProj),dt(O,O,.5),lt(g,i.maxProj,i.minProj);const s=ut(g),o=new ht;o.quality=s,r<14&&(t=new S.K(new Float64Array(i.buffer,112,42),3));const c=(0,h.vt)(),u=(0,h.vt)(),f=(0,h.vt)(),l=(0,h.vt)(),d=(0,h.vt)(),I=(0,h.vt)(),E=(0,h.vt)();switch(P(i,t,E,c,u,f,l,d,I,o)){case 1:return void Y(O,g,n);case 2:return void tt(t,l,n)}z(t,E,c,u,f,l,d,I,o),nt(t,o.b0,o.b1,o.b2,K,J);const M=(0,h.vt)();lt(M,J,K),o.quality=ut(M),o.quality<s?ot(o.b0,o.b1,o.b2,K,J,M,n):Y(O,g,n)}(t,n),n}const Ct=[.1,.2,.3,.4,.5,.6,.7,.8,.9,1,1.1,1.2],bt=(()=>{const t=new Int8Array(162);let n=0;const e=e=>{for(let a=0;a<e.length;a++)t[n+a]=e[a];n+=6};return e([6,2,3,1,5,4]),e([0,2,3,1,5,4]),e([0,2,3,7,5,4]),e([0,1,3,2,6,4]),e([0,1,3,2,0,0]),e([0,1,5,7,3,2]),e([0,1,3,7,6,4]),e([0,1,3,7,6,2]),e([0,1,5,7,6,2]),e([0,1,5,4,6,2]),e([0,1,5,4,0,0]),e([0,1,3,7,5,4]),e([0,2,6,4,0,0]),e([0,0,0,0,0,0]),e([1,3,7,5,0,0]),e([2,3,7,6,4,0]),e([2,3,7,6,0,0]),e([2,3,1,5,7,6]),e([0,1,5,7,6,2]),e([0,1,5,7,6,4]),e([0,1,3,7,6,4]),e([4,5,7,6,2,0]),e([4,5,7,6,0,0]),e([4,5,1,3,7,6]),e([0,2,3,7,5,4]),e([6,2,3,7,5,4]),e([6,2,3,1,5,4]),t})();function Lt(t,n,e,a,r){const i=t.getQuaternion(St);r.quaternion=i,(0,s.Xr)(At,i);const o=t.getCenter(zt),u=t.getHalfSize(Ut);if(a===v.RT.Global){(0,c.v)(Vt,o,At),(0,c.w)(Gt,Vt),(0,c.A)(Xt,Gt,u),(0,c.a)(Xt,Gt,Xt);const a=(0,c.l)(Xt);(0,c.f)(Xt,Gt,u);const i=(0,c.l)(Xt);if(a<e)r.center=o,(0,c.i)(Vt,e,e,e),r.halfSize=(0,c.f)(Vt,u,Vt);else{const s=i>0?1+n/i:1,o=a>0?1+e/a:1,h=(o+s)/2,f=(o-s)/2;(0,c.g)(Xt,Gt,f),r.halfSize=(0,c.b)(Xt,Xt,u,h),(0,c.g)(Xt,Gt,h),(0,c.b)(Xt,Xt,u,f),(0,c.B)(Vt,Vt),(0,c.C)(Vt,Xt,Vt);const l=t.getQuaternion(mt);r.center=(0,c.v)(Vt,Vt,l)}}else{r.center=(0,c.b)(Vt,o,h.Cb,(e+n)/2);const t=(0,c.v)(Vt,h.Cb,At);(0,c.w)(t,t),r.halfSize=(0,c.b)(Gt,u,t,(e-n)/2)}return r}function jt(t,n,e,r,i){const s=n.getQuaternion(St),o=(0,a.I0)(wt,s),c=n.getHalfSize(Ut);for(let t=0;t<8;++t){for(let n=0;n<3;++n)Ft[n]=c[n]*(t&1<<n?-1:1);for(let n=0;n<3;++n){let a=e[n];for(let t=0;t<3;++t)a+=Ft[t]*o[3*t+n];pt[3*t+n]=a}}(0,E.projectBuffer)(pt,t,0,pt,r,0,8),Rt(Dt,i)}const pt=new Array(24),Dt=new S.K(pt,3),Ft=(0,h.vt)(),zt=(0,h.vt)(),xt=(0,h.vt)(),Ut=(0,h.vt)(),wt=(0,r.vt)(),qt=(0,i.vt)(),yt=[[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0],[0,0,0]],Vt=(0,h.vt)(),Gt=(0,h.vt)(),Xt=(0,h.vt)(),Bt=(0,h.CN)(-1,-1,-1)},67026:(t,n,e)=>{e.d(n,{A6:()=>E,Xd:()=>u,Xr:()=>d,hZ:()=>_,lw:()=>f,t2:()=>C,x8:()=>h});var a=e(29242),r=e(82534),i=e(51850),s=e(34304),o=e(38954),c=e(87317);function h(t,n,e){e*=.5;const a=Math.sin(e);return t[0]=a*n[0],t[1]=a*n[1],t[2]=a*n[2],t[3]=Math.cos(e),t}function u(t,n){const e=2*Math.acos(n[3]),a=Math.sin(e/2);return a>(0,s.FD)()?(t[0]=n[0]/a,t[1]=n[1]/a,t[2]=n[2]/a):(t[0]=1,t[1]=0,t[2]=0),e}function f(t,n,e){const a=n[0],r=n[1],i=n[2],s=n[3],o=e[0],c=e[1],h=e[2],u=e[3];return t[0]=a*u+s*o+r*h-i*c,t[1]=r*u+s*c+i*o-a*h,t[2]=i*u+s*h+a*c-r*o,t[3]=s*u-a*o-r*c-i*h,t}function l(t,n,e,a){const r=n[0],i=n[1],o=n[2],c=n[3];let h,u,f,l,d,I=e[0],E=e[1],M=e[2],_=e[3];return u=r*I+i*E+o*M+c*_,u<0&&(u=-u,I=-I,E=-E,M=-M,_=-_),1-u>(0,s.FD)()?(h=Math.acos(u),f=Math.sin(h),l=Math.sin((1-a)*h)/f,d=Math.sin(a*h)/f):(l=1-a,d=a),t[0]=l*r+d*I,t[1]=l*i+d*E,t[2]=l*o+d*M,t[3]=l*c+d*_,t}function d(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t}function I(t,n){const e=n[0]+n[4]+n[8];let a;if(e>0)a=Math.sqrt(e+1),t[3]=.5*a,a=.5/a,t[0]=(n[5]-n[7])*a,t[1]=(n[6]-n[2])*a,t[2]=(n[1]-n[3])*a;else{let e=0;n[4]>n[0]&&(e=1),n[8]>n[3*e+e]&&(e=2);const r=(e+1)%3,i=(e+2)%3;a=Math.sqrt(n[3*e+e]-n[3*r+r]-n[3*i+i]+1),t[e]=.5*a,a=.5/a,t[3]=(n[3*r+i]-n[3*i+r])*a,t[r]=(n[3*r+e]+n[3*e+r])*a,t[i]=(n[3*i+e]+n[3*e+i])*a}return t}function E(t,n,e,a){const r=.5*Math.PI/180;n*=r,e*=r,a*=r;const i=Math.sin(n),s=Math.cos(n),o=Math.sin(e),c=Math.cos(e),h=Math.sin(a),u=Math.cos(a);return t[0]=i*c*u-s*o*h,t[1]=s*o*u+i*c*h,t[2]=s*c*h-i*o*u,t[3]=s*c*u+i*o*h,t}const M=c.c,_=c.s,N=c.g,T=f,v=c.d,A=c.h,S=c.l,m=c.j,O=m,g=c.b,P=g,R=c.n,C=c.a,b=c.e,L=(0,i.vt)(),j=(0,i.fA)(1,0,0),p=(0,i.fA)(0,1,0),D=(0,r.vt)(),F=(0,r.vt)(),z=(0,a.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:N,calculateW:function(t,n){const e=n[0],a=n[1],r=n[2];return t[0]=e,t[1]=a,t[2]=r,t[3]=Math.sqrt(Math.abs(1-e*e-a*a-r*r)),t},conjugate:d,copy:M,dot:A,equals:b,exactEquals:C,fromEuler:E,fromMat3:I,getAxisAngle:u,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,n){const e=n[0],a=n[1],r=n[2],i=n[3],s=e*e+a*a+r*r+i*i,o=s?1/s:0;return t[0]=-e*o,t[1]=-a*o,t[2]=-r*o,t[3]=i*o,t},len:O,length:m,lerp:S,mul:T,multiply:f,normalize:R,random:function(t){const n=s.Ov,e=n(),a=n(),r=n(),i=Math.sqrt(1-e),o=Math.sqrt(e);return t[0]=i*Math.sin(2*Math.PI*a),t[1]=i*Math.cos(2*Math.PI*a),t[2]=o*Math.sin(2*Math.PI*r),t[3]=o*Math.cos(2*Math.PI*r),t},rotateX:function(t,n,e){e*=.5;const a=n[0],r=n[1],i=n[2],s=n[3],o=Math.sin(e),c=Math.cos(e);return t[0]=a*c+s*o,t[1]=r*c+i*o,t[2]=i*c-r*o,t[3]=s*c-a*o,t},rotateY:function(t,n,e){e*=.5;const a=n[0],r=n[1],i=n[2],s=n[3],o=Math.sin(e),c=Math.cos(e);return t[0]=a*c-i*o,t[1]=r*c+s*o,t[2]=i*c+a*o,t[3]=s*c-r*o,t},rotateZ:function(t,n,e){e*=.5;const a=n[0],r=n[1],i=n[2],s=n[3],o=Math.sin(e),c=Math.cos(e);return t[0]=a*c+r*o,t[1]=r*c-a*o,t[2]=i*c+s*o,t[3]=s*c-i*o,t},rotationTo:function(t,n,e){const a=(0,o.e)(n,e);return a<-.999999?((0,o.h)(L,j,n),(0,o.H)(L)<1e-6&&(0,o.h)(L,p,n),(0,o.n)(L,L),h(t,L,Math.PI),t):a>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,o.h)(L,n,e),t[0]=L[0],t[1]=L[1],t[2]=L[2],t[3]=1+a,R(t,t))},scale:v,set:_,setAxes:function(t,n,e,a){const r=z;return r[0]=e[0],r[3]=e[1],r[6]=e[2],r[1]=a[0],r[4]=a[1],r[7]=a[2],r[2]=-n[0],r[5]=-n[1],r[8]=-n[2],R(t,I(t,r))},setAxisAngle:h,slerp:l,sqlerp:function(t,n,e,a,r,i){return l(D,n,r,i),l(F,e,a,i),l(t,D,F,2*i*(1-i)),t},sqrLen:P,squaredLength:g,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},98764:(t,n,e)=>{e.d(n,{Y0:()=>h,lO:()=>u});var a=e(73941),r=e(16930),i=e(21325);const s=new r.A(a.fv),o=new r.A(a.FY),c=new r.A(a.LJ),h=new r.A(a.Ro);function u(t){const n=f.get(t);if(n)return n;let e=s;if(t)if(t===o)e=o;else if(t===c)e=c;else{const n=t.wkid,a=t.latestWkid;if(null!=n||null!=a)(0,i.tl)(n)||(0,i.tl)(a)?e=o:((0,i.ZL)(n)||(0,i.ZL)(a))&&(e=c);else{const n=t.wkt2??t.wkt;if(n){const t=n.toUpperCase();t===l?e=o:t===d&&(e=c)}}}return f.set(t,e),e}const f=new Map,l=o.wkt.toUpperCase(),d=c.wkt.toUpperCase()}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5404],{95404:(e,r,t)=>{t.d(r,{computeObjectLayerResourceSize:()=>u}),t(78888);var i=t(49186),o=t(66344),n=t(51850),s=t(70328),l=t(8887);let c=new o.q(50);async function u(e,r=null){if(!e.isPrimitive){const r=e.resource?.href;if(!r)throw new i.A("symbol:invalid-resource","The symbol does not have a valid resource");const o=c.get(r);if(void 0!==o)return o;const{fetch:l}=await Promise.all([t.e(3030),t.e(7937),t.e(2944),t.e(9899),t.e(3100),t.e(4304)]).then(t.bind(t,64304)),u=await l(r,{disableTextures:!0,spherical:!0}),a=(0,s.Ej)(u.referenceBoundingBox,(0,n.vt)());return c.put(r,a),a}if(!e.resource?.primitive)throw new i.A("symbol:invalid-resource","The symbol does not have a valid resource");const o=(0,s.vt)((0,l.Fq)(e.resource.primitive));if(null!=r)for(let e=0;e<o.length;e++)o[e]*=r;return(0,s.Ej)(o,(0,n.vt)())}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5404],{95404:(e,r,t)=>{t.d(r,{computeObjectLayerResourceSize:()=>u}),t(78888);var i=t(49186),o=t(66344),n=t(51850),s=t(70328),l=t(8887);let c=new o.q(50);async function u(e,r=null){if(!e.isPrimitive){const r=e.resource?.href;if(!r)throw new i.A("symbol:invalid-resource","The symbol does not have a valid resource");const o=c.get(r);if(void 0!==o)return o;const{fetch:l}=await Promise.all([t.e(3030),t.e(7937),t.e(2944),t.e(9899),t.e(432),t.e(4304)]).then(t.bind(t,64304)),u=await l(r,{disableTextures:!0,spherical:!0}),a=(0,s.Ej)(u.referenceBoundingBox,(0,n.vt)());return c.put(r,a),a}if(!e.resource?.primitive)throw new i.A("symbol:invalid-resource","The symbol does not have a valid resource");const o=(0,s.vt)((0,l.Fq)(e.resource.primitive));if(null!=r)for(let e=0;e<o.length;e++)o[e]*=r;return(0,s.Ej)(o,(0,n.vt)())}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4496],{1193:(t,n,e)=>{e.d(n,{H:()=>d});var r,o=e(90237),i=e(69540),a=e(25482),u=e(4718),l=e(53966),s=e(10107),c=e(79901),f=e(40608),p=e(31199);let d=r=class extends(i.A.ClonableMixin(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,p.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,p.b)(t,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},l.A.getLogger(this))}castUv(t){return(0,p.b)(t,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},l.A.getLogger(this))}castNormal(t){return(0,p.b)(t,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},l.A.getLogger(this))}castTangent(t){return(0,p.b)(t,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},l.A.getLogger(this))}clonePositional(){const t={position:(0,u.o8)(this.position),normal:(0,u.o8)(this.normal),tangent:(0,u.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,s.MZ)({json:{write:p.B}})],d.prototype,"color",void 0),(0,o._)([(0,c.w)("color")],d.prototype,"castColor",null),(0,o._)([(0,s.MZ)({nonNullable:!0,json:{write:p.B}})],d.prototype,"position",void 0),(0,o._)([(0,c.w)("position")],d.prototype,"castPosition",null),(0,o._)([(0,s.MZ)({json:{write:p.B}})],d.prototype,"uv",void 0),(0,o._)([(0,c.w)("uv")],d.prototype,"castUv",null),(0,o._)([(0,s.MZ)({json:{write:p.B}})],d.prototype,"normal",void 0),(0,o._)([(0,c.w)("normal")],d.prototype,"castNormal",null),(0,o._)([(0,s.MZ)({json:{write:p.B}})],d.prototype,"tangent",void 0),(0,o._)([(0,c.w)("tangent")],d.prototype,"castTangent",null),d=r=(0,o._)([(0,f.$)("esri.geometry.support.MeshVertexAttributes")],d)},22141:(t,n,e)=>{e.d(n,{$5:()=>v,CN:()=>M,JP:()=>m,KM:()=>S,Mv:()=>_,X4:()=>A,gr:()=>T,qs:()=>w,si:()=>b,xA:()=>B});var r=e(34727),o=e(77690),i=e(29242),a=e(58083),u=e(9093),l=e(38954),s=e(51850),c=e(48353),f=e(9762),p=(e(79258),e(21325)),d=e(28735),g=e(13030),y=e(73354),h=e(65686);const m="Projection may be possible after calling projection.load().";function M(t,n,e,r){t.error(`Failed to project from (wkid:${n.wkid}) to (wkid:${e.wkid}).${r?" ":""}${r}`)}function A(t,n,e,r,o,i){return N(C.TO_PCPF,g.xs.fromTypedArray(t),R.NORMAL,g.Xm.fromTypedArray(n),e,g.Xm.fromTypedArray(r),o,g.xs.fromTypedArray(i))?i:null}function b(t,n,e,r,o,i){return N(C.FROM_PCPF,g.xs.fromTypedArray(t),R.NORMAL,g.Xm.fromTypedArray(n),e,g.Xm.fromTypedArray(r),o,g.xs.fromTypedArray(i))?i:null}function T(t,n,e,r){return(0,f.projectBuffer)(t,n,0,e,r,0)?e:null}function v(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,y.b)(n,t,L),(0,r.or)(L)&&(0,y.n)(n,n),n}function S(t,n,e){return(0,o.z0)(L,e),(0,h.t)(n,t,L),(0,r.or)(L)&&(0,y.n)(n,n,4),n}function B(t,n,e,r,o,i){if(!N(C.TO_PCPF,g.xs.fromTypedArray(t,4*Float32Array.BYTES_PER_ELEMENT),R.TANGENT,g.Xm.fromTypedArray(n),e,g.Xm.fromTypedArray(r),o,g.xs.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT)))return null;for(let n=3;n<t.length;n+=4)i[n]=t[n];return i}function _(t,n,e,r,o,i){if(!N(C.FROM_PCPF,g.xs.fromTypedArray(t,16),R.TANGENT,g.Xm.fromTypedArray(n),e,g.Xm.fromTypedArray(r),o,g.xs.fromTypedArray(i,16)))return null;for(let n=3;n<t.length;n+=4)i[n]=t[n];return i}var R,C,x;function E(t,n,e,r,i){switch((0,c.l)(r,e,P,r),t===C.FROM_PCPF&&(0,a.B8)(P,P),n){case R.NORMAL:return(0,o.Ge)(i,P);case R.TANGENT:return(0,o.z0)(i,P)}}function N(t,n,e,r,o,i,a,u){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++)i.getVec(r,F),n.getVec(r,O),(0,l.o)(O,O,E(t,e,F,a,L)),u.setVec(r,O);else for(let o=0;o<s;o++){i.getVec(o,F),n.getVec(o,O);const s=(0,d.jg)(r.get(o,1));let c=Math.cos(s);e===R.TANGENT!=(t===C.TO_PCPF)&&(c=1/c),E(t,e,F,a,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,l.o)(O,O,L),(0,l.n)(O,O),u.setVec(o,O)}return u}(x=R||(R={}))[x.NORMAL=0]="NORMAL",x[x.TANGENT=1]="TANGENT",function(t){t[t.TO_PCPF=0]="TO_PCPF",t[t.FROM_PCPF=1]="FROM_PCPF"}(C||(C={}));const F=(0,s.vt)(),O=(0,s.vt)(),P=(0,u.vt)(),L=(0,i.vt)()},28846:(t,n,e)=>{e.d(n,{convertMeshVertexSpace:()=>s});var r=e(49186),o=e(4718),i=e(74887),a=e(1193),u=e(66895),l=e(72258);async function s(t,n,e){await Promise.resolve(),(0,i.Te)(e);const s=(0,l.UR)(t,n,{useEllipsoid:e?.useEllipsoid});if(!s)throw new r.A("meshUtils:convertVertexSpace()","Failed to convert to provided vertex space due to projection errors");return t.clone((0,u.Lz)(void 0,{vertexAttributes:new a.H({...s,uv:(0,o.o8)(t.vertexAttributes.uv),color:(0,o.o8)(t.vertexAttributes.color)}),vertexSpace:n,transform:null}))}},31199:(t,n,e)=>{function r(t,n,e,r){const{loggerTag:o,stride:i}=n;return t.length%i!==0?(r.error(o,`Invalid array length, expected a multiple of ${i}`),new e([])):t}function o(t,n,e,o,i){if(!t)return t;if(t instanceof n)return r(t,o,n,i);for(const a of e)if(t instanceof a)return r(new n(t),o,n,i);if(Array.isArray(t))return r(new n(t),o,n,i);{const r=e.map(t=>`'${t.name}'`);return i.error(`Failed to set property, expected one of ${r}, but got ${t.constructor.name}`),new n([])}}function i(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:()=>i,b:()=>o})},48163:(t,n,e)=>{function r(){return[0,0]}function o(t){return[t[0],t[1]]}function i(t,n){return[t,n]}function a(){return i(1,1)}function u(){return i(1,0)}function l(){return i(0,1)}e.d(n,{Un:()=>s,fA:()=>i,o8:()=>o,vt:()=>r});const s=a(),c=u(),f=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:s,UNIT_X:c,UNIT_Y:f,ZEROS:[0,0],clone:o,create:r,freeze:function(t,n){return[t,n]},fromArray:function(t,n=[0,0]){const e=Math.min(2,t.length);for(let r=0;r<e;++r)n[r]=t[r];return n},fromValues:i,ones:a,unitX:u,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},48353:(t,n,e)=>{e.d(n,{l:()=>s});var r=e(34727),o=e(58083),i=e(51850);function a(t,n,e){const r=Math.sin(t),o=Math.cos(t),i=Math.sin(n),a=Math.cos(n),u=e;return u[0]=-r,u[4]=-i*o,u[8]=a*o,u[12]=0,u[1]=o,u[5]=-i*r,u[9]=a*r,u[13]=0,u[2]=0,u[6]=a,u[10]=i,u[14]=0,u[3]=0,u[7]=0,u[11]=0,u[15]=1,u}var u=e(37539),l=e(21325);function s(t,n,e,r){const i=(0,u.Tp)(t,r);if(null==i)return!1;const s=i.source.spatialReferenceId,g=i.dest.spatialReferenceId;if(s===g&&!c(g)&&(s!==u.rz.UNKNOWN||(0,l.aI)(t,r)))return(0,o.kN)(e,n),!0;if(c(g)){const t=u.w5[s][u.rz.LON_LAT],r=u.w5[u.rz.LON_LAT][g];return null!=t&&null!=r&&(t(n,0,p,0),r(p,0,d,0),a(f*p[0],f*p[1],e),e[12]=d[0],e[13]=d[1],e[14]=d[2],!0)}const y=c(s);if((g===u.rz.WEB_MERCATOR||g===u.rz.PLATE_CARREE||g===u.rz.WGS84||g===u.rz.CGCS2000)&&(s===u.rz.WGS84||y||s===u.rz.WEB_MERCATOR||s===u.rz.CGCS2000)){const t=u.w5[s][u.rz.LON_LAT],r=u.w5[u.rz.LON_LAT][g];return null!=t&&null!=r&&(t(n,0,p,0),r(p,0,d,0),y?function(t,n,e){a(t,n,e),(0,o.mg)(e,e)}(f*p[0],f*p[1],e):(0,o.D_)(e),e[12]=d[0],e[13]=d[1],e[14]=d[2],!0)}return!1}function c(t){return t===u.rz.SPHERICAL_ECEF||t===u.rz.SPHERICAL_MARS_PCPF||t===u.rz.SPHERICAL_MOON_PCPF||t===u.rz.WGS84_ECEF}const f=(0,r.kU)(1),p=(0,i.vt)(),d=(0,i.vt)()},65686:(t,n,e)=>{e.d(n,{a:()=>i,b:()=>c,l:()=>s,n:()=>u,t:()=>a});var r=e(40876),o=(e(44208),e(53966));function i(t,n,e){a(t.typedBuffer,n.typedBuffer,e,t.typedBufferStride,n.typedBufferStride)}function a(t,n,e,r=4,o=r){if(t.length/r!==n.length/o)return;const i=t.length/r,a=e[0],u=e[1],l=e[2],s=e[3],c=e[4],f=e[5],p=e[6],d=e[7],g=e[8];let y=0,h=0;for(let e=0;e<i;e++){const e=n[y],i=n[y+1],m=n[y+2],M=n[y+3];t[h]=a*e+s*i+p*m,t[h+1]=u*e+c*i+d*m,t[h+2]=l*e+f*i+g*m,t[h+3]=M,y+=o,h+=r}}function u(t,n){const e=Math.min(t.count,n.count),r=t.typedBuffer,o=t.typedBufferStride,i=n.typedBuffer,a=n.typedBufferStride;for(let t=0;t<e;t++){const n=t*o,e=t*a,u=i[e],l=i[e+1],s=i[e+2],c=u*u+l*l+s*s;if(c>0){const t=1/Math.sqrt(c);r[n]=t*u,r[n+1]=t*l,r[n+2]=t*s}}}function l(t,n,e,r=4){const o=Math.min(t.length/r,n.count),i=n.typedBuffer,a=n.typedBufferStride;let u=0,l=0;for(let n=0;n<o;n++)t[l]=e*i[u],t[l+1]=e*i[u+1],t[l+2]=e*i[u+2],t[l+3]=e*i[u+3],u+=a,l+=r}function s(t,n,e,r){c(t.typedBuffer,n,e,r,t.typedBufferStride)}function c(t,n,e,o,i=4){const a=Math.min(t.length/i,n.count),u=n.typedBuffer,l=n.typedBufferStride;let s=0,c=0;const f=1/r.Tf;for(let n=0;n<a;n++)t[c]=o*(e*u[s])**f,t[c+1]=o*(e*u[s+1])**f,t[c+2]=o*(e*u[s+2])**f,t[c+3]=o*e*u[s+3],s+=l,c+=i}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:s,normalize:u,scale:l,scaleView:function(t,n,e){l(t.typedBuffer,n,e,t.typedBufferStride)},transformMat3:a,transformMat3View:i,transformMat4:function(t,n,e,r=4,i=r){if(t.length/r!==n.length/i)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 a=t.length/r,u=e[0],l=e[1],s=e[2],c=e[3],f=e[4],p=e[5],d=e[6],g=e[7],y=e[8],h=e[9],m=e[10],M=e[11],A=e[12],b=e[13],T=e[14],v=e[15];let w=0,S=0;for(let e=0;e<a;e++){const e=n[w],o=n[w+1],a=n[w+2],B=n[w+3];t[S]=u*e+f*o+y*a+A*B,t[S+1]=l*e+p*o+h*a+b*B,t[S+2]=s*e+d*o+m*a+T*B,t[S+3]=c*e+g*o+M*a+v*B,w+=i,S+=r}},transformMat4View:function(t,n,e){if(t.count!==n.count)return;const r=t.count,o=e[0],i=e[1],a=e[2],u=e[3],l=e[4],s=e[5],c=e[6],f=e[7],p=e[8],d=e[9],g=e[10],y=e[11],h=e[12],m=e[13],M=e[14],A=e[15],b=t.typedBuffer,T=t.typedBufferStride,v=n.typedBuffer,w=n.typedBufferStride;for(let t=0;t<r;t++){const n=t*T,e=t*w,r=v[e],S=v[e+1],B=v[e+2],_=v[e+3];b[n]=o*r+l*S+p*B+h*_,b[n+1]=i*r+s*S+d*B+m*_,b[n+2]=a*r+c*S+g*B+M*_,b[n+3]=u*r+f*S+y*B+A*_}}},Symbol.toStringTag,{value:"Module"}))},65806:(t,n,e)=>{e.d(n,{g:()=>a});var r=e(51850),o=e(98988),i=e(9762);function a(t,n,e,r){if((0,o.canProjectWithoutEngine)(t.spatialReference,e)){u[0]=t.x,u[1]=t.y;const o=t.z;return u[2]=o??r??0,(0,i.projectBuffer)(u,t.spatialReference,0,n,e,0)}const a=(0,o.tryProjectWithZConversion)(t,e);return!!a&&(n[0]=a?.x,n[1]=a?.y,n[2]=a?.z??r??0,!0)}const u=(0,r.vt)()},66895:(t,n,e)=>{e.d(n,{$N:()=>c,Lz:()=>i,QN:()=>f,WO:()=>l,hz:()=>u,o2:()=>o});const r=Symbol("meshContext");function o(t){return t&&"object"==typeof t&&r in t?t[r]:void 0}function i(t,n){const e=o(t);return{...t,[r]:{...e,...n}}}const a=Symbol("meshMaterialContext");function u(t){return t&&"object"==typeof t&&a in t?t[a]:void 0}function l(t){const n=u(t);if(n?.materialMap)return t;const e={materialMap:new Map};return{...t,[a]:e}}const s=Symbol("meshTextureContext");function c(t){return t&&"object"==typeof t&&s in t?t[s]:void 0}function f(t){const n=c(t);if(n?.textureMap)return t;const e={textureMap:new Map};return{...t,[s]:e}}},72258:(t,n,e)=>{e.d(n,{UR:()=>T,p5:()=>b,xK:()=>R});var r=e(53966),o=e(34727),i=e(83047),a=e(77690),u=e(29242),l=e(58083),s=e(9093),c=e(38954),f=e(51850),p=e(98764),d=e(48353),g=e(65806),y=e(27615),h=e(21325),m=e(73354),M=e(22141);const A=()=>r.A.getLogger("esri.geometry.support.meshUtils.vertexSpaceConversion");function b(t,n,{vertexSpace:e,spatialReference:r}){if("georeferenced"===e.type){const o=t;if(!(0,g.g)(n,o,r))return!1;const{origin:i}=e;return(0,c.d)(t,o,i),!0}const o=(0,p.lO)(r),i=t;if(!(0,g.g)(n,i,o))return!1;const{origin:a}=e,u=F;if(!(0,d.l)(r,a,u,o))return!1;const s=(0,l.B8)(F,u);return null!=s&&((0,c.t)(t,i,s),!0)}function T(t,n,e){const{vertexSpace:r,transform:o,vertexAttributes:i}=t,u=(0,y.Hq)(r)?o:null,f=B(t.spatialReference,e,O.SOURCE_AND_TARGET);if((0,y.yJ)(r,n)&&(!u||(0,l.t2)(u.localMatrix,s.zK))&&_(f)){const{position:t,normal:n,tangent:r}=i,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,i){const a=v(n,i);if(!(0,d.l)(n,r,C,a))return(0,M.CN)(A(),n,a),null;if(e&&(0,l.lw)(C,C,e.localMatrix),!(0,d.l)(n,o,x,a))return(0,M.CN)(A(),a,n),null;(0,l.B8)(x,x);const u=(0,l.lw)(C,x,C);return S(u,n,i,O.SOURCE_AND_TARGET),w(t,u)}(t,t.vertexSpace,n.origin,e):function({spatialReference:t,vertexAttributes:n,transform:e},{origin:r},o,i){const a=v(t,i);if(!(0,d.l)(t,r,C,a))return(0,M.CN)(A(),t,a),null;e&&(0,l.lw)(C,C,e.localMatrix),S(C,t,i,O.SOURCE);const u=new Float64Array(n.position.length),s=function(t,n,e,r,o){(0,m.t)(r,t,n);const i=new Float64Array(t.length);return(0,M.$5)(r,o,i,e)?i:((0,M.CN)(A(),o,e),null)}(n.position,C,t,u,a);if(!s)return null;const f=function(t,n,e,r,o,i){if(null==o)return null;const a=new Float32Array(o.length);return(0,M.qs)(o,a,i),(0,M.si)(a,t,n,e,r,a)?a:((0,M.CN)(A(),r,n),null)}(s,t,u,a,n.normal,C);if(n.normal&&!f)return null;const p=function(t,n,e,r,o,i){if(null==o)return null;const a=new Float32Array(o.length);return(0,M.KM)(o,a,i),(0,M.Mv)(a,t,n,e,r,a)?a:((0,M.CN)(A(),r,n),null)}(s,t,u,a,n.tangent,C);if(n.tangent&&!p)return null;if(o){const t=(0,c.u)(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,i){const u=v(n,i);if(!(0,d.l)(n,o,C,u))return(0,M.CN)(A(),n,u),null;const s=1/B(n,i,O.TARGET);(0,l.hs)(C,C,[s,s,s]);const c=(0,l.B8)(x,C),{position:f,normal:p,tangent:g}=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),y=new Float64Array(f.length),h=function(t,n,e,r,o){const i=(0,M.gr)(t,n,r,o);if(!i)return(0,M.CN)(A(),n,o),null;const a=new Float64Array(i.length);return(0,m.t)(a,i,e),a}(f,n,c,y,u);if(!h)return null;const b=(0,a.Ge)(E,c),T=function(t,n,e,r,o,i,a){if(null==t)return null;const u=a??new Float32Array(t.length);return(0,M.X4)(t,n,e,r,o,u)?((0,m.b)(u,u,i),u):((0,M.CN)(A(),e,o),null)}(p,f,n,y,u,b,p!==t.normal?p:void 0);if(!T&&p)return null;const S=function(t,n,e,r,o,i,a){if(null==t)return null;const u=a??new Float32Array(t.length);return(0,M.xA)(t,n,e,r,o,u)?((0,m.b)(u,u,i,4),u):((0,M.CN)(A(),e,o),null)}(g,f,n,y,u,b,g!==t.tangent?g:void 0);return!S&&g?null:{position:h,normal:T,tangent:S}}(t,t.vertexSpace,n.origin,e):function({vertexAttributes:t,transform:n,spatialReference:e},{origin:r},o,i){const a=B(e,i,O.SOURCE_AND_TARGET),u=r||!_(a)?(0,l.C)(C,n?.localMatrix??s.zK):null;u&&S(u,e,i,O.SOURCE_AND_TARGET);const{position:f,normal:p,tangent:d}=u?w(t,u):t,g=i?.allowBufferReuse,y=g?f:new Float64Array(f.length);let h=f;if(r&&(h=(0,m.a)(y,h,r)),o){const t=(0,c.u)(N,o);h=(0,m.a)(y,h,t)}return{position:h!==t.position||g?h:h.slice(),normal:p!==t.normal||g?p:p?.slice(),tangent:d!==t.tangent||g?d:d?.slice()}}(t,t.vertexSpace,n.origin,e)}}function v(t,n){return n?.useEllipsoid&&(0,h.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,M.qs)(t.normal,r,n),o&&t.tangent&&(0,M.KM)(t.tangent,o,n),{position:e,normal:r,tangent:o}}function S(t,n,e,r){const o=B(n,e,r);_(o)||(0,l.hs)(t,t,[o,o,o])}function B(t,n,e){const r=!!(e&O.SOURCE),o=!!(e&O.TARGET),i=n?.sourceUnit,a=n?.targetUnit;if(!i&&!a)return 1;let u=R(i,t);r||!i||_(u)||(A().warn("source unit conversion not supported"),u=1);let l=1/R(a,t);return o||!a||_(l)||(A().warn("target unit conversion not supported"),l=1),u*l}function _(t){return(0,o.Io)(t,1)}function R(t,n){if(null==t)return 1;const e=(0,i.KX)(n);return 1/(0,i.oU)(e,"meters",t)}const C=(0,s.vt)(),x=(0,s.vt)(),E=(0,u.vt)(),N=(0,f.vt)(),F=(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"},73354:(t,n,e)=>{e.d(n,{a:()=>f,b:()=>u,c:()=>a,d:()=>o,e:()=>p,f:()=>c,l:()=>s,n:()=>d,t:()=>i});var r=e(40876);function o(t,n,e){i(t.typedBuffer,n.typedBuffer,e,t.typedBufferStride,n.typedBufferStride)}function i(t,n,e,r=3,o=r){if(t.length/r!==Math.ceil(n.length/o))return t;const i=t.length/r,a=e[0],u=e[1],l=e[2],s=e[4],c=e[5],f=e[6],p=e[8],d=e[9],g=e[10],y=e[12],h=e[13],m=e[14];let M=0,A=0;for(let e=0;e<i;e++){const e=n[M],i=n[M+1],b=n[M+2];t[A]=a*e+s*i+p*b+y,t[A+1]=u*e+c*i+d*b+h,t[A+2]=l*e+f*i+g*b+m,M+=o,A+=r}return t}function a(t,n,e){u(t.typedBuffer,n.typedBuffer,e,t.typedBufferStride,n.typedBufferStride)}function u(t,n,e,r=3,o=r){if(t.length/r!==Math.ceil(n.length/o))return;const i=t.length/r,a=e[0],u=e[1],l=e[2],s=e[3],c=e[4],f=e[5],p=e[6],d=e[7],g=e[8];let y=0,h=0;for(let e=0;e<i;e++){const e=n[y],i=n[y+1],m=n[y+2];t[h]=a*e+s*i+p*m,t[h+1]=u*e+c*i+d*m,t[h+2]=l*e+f*i+g*m,y+=o,h+=r}}function l(t,n,e,r=3,o=r){const i=Math.min(t.length/r,n.length/o);let a=0,u=0;for(let l=0;l<i;l++)t[u]=e*n[a],t[u+1]=e*n[a+1],t[u+2]=e*n[a+2],a+=o,u+=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,i=3,a=i){const u=Math.min(t.length/i,n.length/a);let l=0,s=0;const c=1/r.Tf;for(let r=0;r<u;r++)t[s]=o*(e*n[l])**c,t[s+1]=o*(e*n[l+1])**c,t[s+2]=o*(e*n[l+2])**c,l+=a,s+=i}function f(t,n,e,r=3,o=r){const i=t.length/r;if(i!==Math.ceil(n.length/o))return t;let a=0,u=0;for(let l=0;l<i;l++)t[u]=n[a]+e[0],t[u+1]=n[a+1]+e[1],t[u+2]=n[a+2]+e[2],a+=o,u+=r;return t}function p(t,n){d(t.typedBuffer,n.typedBuffer,t.typedBufferStride,n.typedBufferStride)}function d(t,n,e=3,r=e){const o=Math.min(t.length/e,n.length/r);let i=0,a=0;for(let u=0;u<o;u++){const o=n[i],u=n[i+1],l=n[i+2],s=o*o+u*u+l*l;if(s>0){const n=1/Math.sqrt(s);t[a]=n*o,t[a+1]=n*u,t[a+2]=n*l}i+=r,a+=e}}e(44208),e(53966),Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:s,normalize:d,normalizeView:p,scale:l,scaleView:function(t,n,e){l(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,i=t.typedBufferStride,a=n.typedBuffer,u=n.typedBufferStride;let l=0,s=0;for(let t=0;t<r;t++)o[s]=a[l]>>e,o[s+1]=a[l+1]>>e,o[s+2]=a[l+2]>>e,l+=u,s+=i},transformMat3:u,transformMat3View:a,transformMat4:i,transformMat4View:o,translate:f},Symbol.toStringTag,{value:"Module"}))},77690:(t,n,e)=>{e.d(n,{B8:()=>u,Ge:()=>p,I0:()=>f,KC:()=>l,hZ:()=>i,hs:()=>c,lw:()=>s,mg:()=>a,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 i(t,n,e,r,o,i,a,u,l,s){return t[0]=n,t[1]=e,t[2]=r,t[3]=o,t[4]=i,t[5]=a,t[6]=u,t[7]=l,t[8]=s,t}function a(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 u(t,n){const e=n[0],r=n[1],o=n[2],i=n[3],a=n[4],u=n[5],l=n[6],s=n[7],c=n[8],f=c*a-u*s,p=-c*i+u*l,d=s*i-a*l;let g=e*f+r*p+o*d;return g?(g=1/g,t[0]=f*g,t[1]=(-c*r+o*s)*g,t[2]=(u*r-o*a)*g,t[3]=p*g,t[4]=(c*e-o*l)*g,t[5]=(-u*e+o*i)*g,t[6]=d*g,t[7]=(-s*e+r*l)*g,t[8]=(a*e-r*i)*g,t):null}function l(t,n){const e=n[0],r=n[1],o=n[2],i=n[3],a=n[4],u=n[5],l=n[6],s=n[7],c=n[8];return t[0]=a*c-u*s,t[1]=o*s-r*c,t[2]=r*u-o*a,t[3]=u*l-i*c,t[4]=e*c-o*l,t[5]=o*i-e*u,t[6]=i*s-a*l,t[7]=r*l-e*s,t[8]=e*a-r*i,t}function s(t,n,e){const r=n[0],o=n[1],i=n[2],a=n[3],u=n[4],l=n[5],s=n[6],c=n[7],f=n[8],p=e[0],d=e[1],g=e[2],y=e[3],h=e[4],m=e[5],M=e[6],A=e[7],b=e[8];return t[0]=p*r+d*a+g*s,t[1]=p*o+d*u+g*c,t[2]=p*i+d*l+g*f,t[3]=y*r+h*a+m*s,t[4]=y*o+h*u+m*c,t[5]=y*i+h*l+m*f,t[6]=M*r+A*a+b*s,t[7]=M*o+A*u+b*c,t[8]=M*i+A*l+b*f,t}function c(t,n,e){const r=e[0],o=e[1],i=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]=i*n[6],t[7]=i*n[7],t[8]=i*n[8],t}function f(t,n){const e=n[0],r=n[1],o=n[2],i=n[3],a=e+e,u=r+r,l=o+o,s=e*a,c=r*a,f=r*u,p=o*a,d=o*u,g=o*l,y=i*a,h=i*u,m=i*l;return t[0]=1-f-g,t[3]=c-m,t[6]=p+h,t[1]=c+m,t[4]=1-s-g,t[7]=d-y,t[2]=p-h,t[5]=d+y,t[8]=1-s-f,t}function p(t,n){const e=n[0],r=n[1],o=n[2],i=n[3],a=n[4],u=n[5],l=n[6],s=n[7],c=n[8],f=n[9],p=n[10],d=n[11],g=n[12],y=n[13],h=n[14],m=n[15],M=e*u-r*a,A=e*l-o*a,b=e*s-i*a,T=r*l-o*u,v=r*s-i*u,w=o*s-i*l,S=c*y-f*g,B=c*h-p*g,_=c*m-d*g,R=f*h-p*y,C=f*m-d*y,x=p*m-d*h;let E=M*x-A*C+b*R+T*_-v*B+w*S;return E?(E=1/E,t[0]=(u*x-l*C+s*R)*E,t[1]=(l*_-a*x-s*B)*E,t[2]=(a*C-u*_+s*S)*E,t[3]=(o*C-r*x-i*R)*E,t[4]=(e*x-o*_+i*B)*E,t[5]=(r*_-e*C-i*S)*E,t[6]=(y*w-h*v+m*T)*E,t[7]=(h*b-g*w-m*A)*E,t[8]=(g*v-y*b+m*M)*E,t):null}function d(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 g=s,y=d;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:l,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],i=t[4],a=t[5],u=t[6],l=t[7],s=t[8];return n*(s*i-a*l)+e*(-s*o+a*u)+r*(l*o-i*u)},equals:function(t,n){const e=t[0],o=t[1],i=t[2],a=t[3],u=t[4],l=t[5],s=t[6],c=t[7],f=t[8],p=n[0],d=n[1],g=n[2],y=n[3],h=n[4],m=n[5],M=n[6],A=n[7],b=n[8],T=(0,r.FD)();return Math.abs(e-p)<=T*Math.max(1,Math.abs(e),Math.abs(p))&&Math.abs(o-d)<=T*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(i-g)<=T*Math.max(1,Math.abs(i),Math.abs(g))&&Math.abs(a-y)<=T*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(u-h)<=T*Math.max(1,Math.abs(u),Math.abs(h))&&Math.abs(l-m)<=T*Math.max(1,Math.abs(l),Math.abs(m))&&Math.abs(s-M)<=T*Math.max(1,Math.abs(s),Math.abs(M))&&Math.abs(c-A)<=T*Math.max(1,Math.abs(c),Math.abs(A))&&Math.abs(f-b)<=T*Math.max(1,Math.abs(f),Math.abs(b))},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:u,isOrthoNormal:function(t){const n=(0,r.FD)(),e=t[0],o=t[1],i=t[2],a=t[3],u=t[4],l=t[5],s=t[6],c=t[7],f=t[8];return Math.abs(1-(e*e+a*a+s*s))<=n&&Math.abs(1-(o*o+u*u+c*c))<=n&&Math.abs(1-(i*i+l*l+f*f))<=n},mul:g,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],i=n[4],a=n[5],u=n[6],l=n[8],s=n[9],c=n[10],f=c*a-u*s,p=-c*i+u*l,d=s*i-a*l,g=e*f+r*p+o*d;if(!g)return null;const y=1/g;return t[0]=f*y,t[1]=(-c*r+o*s)*y,t[2]=(u*r-o*a)*y,t[3]=p*y,t[4]=(c*e-o*l)*y,t[5]=(-u*e+o*i)*y,t[6]=d*y,t[7]=(-s*e+r*l)*y,t[8]=(a*e-r*i)*y,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],i=n[2],a=n[3],u=n[4],l=n[5],s=n[6],c=n[7],f=n[8],p=Math.sin(e),d=Math.cos(e);return t[0]=d*r+p*a,t[1]=d*o+p*u,t[2]=d*i+p*l,t[3]=d*a-p*r,t[4]=d*u-p*o,t[5]=d*l-p*i,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:i,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:y,subtract:d,translate:function(t,n,e){const r=n[0],o=n[1],i=n[2],a=n[3],u=n[4],l=n[5],s=n[6],c=n[7],f=n[8],p=e[0],d=e[1];return t[0]=r,t[1]=o,t[2]=i,t[3]=a,t[4]=u,t[5]=l,t[6]=p*r+d*a+s,t[7]=p*o+d*u+c,t[8]=p*i+d*l+f,t},transpose:a},Symbol.toStringTag,{value:"Module"}))},98764:(t,n,e)=>{e.d(n,{Y0:()=>s,lO:()=>c});var r=e(73941),o=e(16930),i=e(21325);const a=new o.A(r.fv),u=new o.A(r.FY),l=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=a;if(t)if(t===u)e=u;else if(t===l)e=l;else{const n=t.wkid,r=t.latestWkid;if(null!=n||null!=r)(0,i.tl)(n)||(0,i.tl)(r)?e=u:((0,i.ZL)(n)||(0,i.ZL)(r))&&(e=l);else{const n=t.wkt2??t.wkt;if(n){const t=n.toUpperCase();t===p?e=u:t===d&&(e=l)}}}return f.set(t,e),e}const f=new Map,p=u.wkt.toUpperCase(),d=l.wkt.toUpperCase()}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5751,8256],{4146:(e,t,i)=>{i.d(t,{A:()=>v});var r=i(90237),s=i(78888),n=i(49186),o=i(65529),a=i(4902),l=i(92474),h=i(53966),u=i(74887),d=i(84952),c=i(10107),p=(i(44208),i(87811),i(40608)),y=i(5443),g=i(16930),_=i(92602),f=i(64272);let m=0,v=class extends(o.A.EventedMixin(a.A.IdentifiableMixin(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+m++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await i.e(7982).then(i.bind(i,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await i.e(5613).then(i.bind(i,45613));try{return await r(t)}catch(e){const i=t?.portalItem,r=i?.id||"unset",s=i?.portal?.url||_.A.portalUrl;throw h.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,u.zf)(e)||h.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(e,t){return Promise.reject(new n.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,c.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,r._)([(0,c.MZ)({type:y.A})],v.prototype,"fullExtent",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,r._)([(0,c.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,r._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,r._)([(0,c.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,r._)([(0,c.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,r._)([(0,c.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,r._)([(0,c.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,r._)([(0,c.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,r._)([(0,c.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,r._)([(0,c.MZ)({type:g.A})],v.prototype,"spatialReference",void 0),(0,r._)([(0,c.MZ)({type:String})],v.prototype,"title",void 0),(0,r._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,r._)([(0,c.MZ)()],v.prototype,"url",void 0),(0,r._)([(0,c.MZ)({type:f.T})],v.prototype,"visibilityTimeExtent",void 0),(0,r._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,r._)([(0,p.$)("esri.layers.Layer")],v)},4902:(e,t,i)=>{i.d(t,{A:()=>h});var r=i(90237),s=i(40608);let n=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,r._)([(0,s.$)("esri.core.Identifiable")],t),t};let a=class extends(o(class{})){};var l;a=(0,r._)([(0,s.$)("esri.core.Identifiable")],a),(l=a||(a={})).IdentifiableMixin=o,l.NumericIdentifiableMixin=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return t=(0,r._)([(0,s.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};const h=a},8303:(e,t,i)=>{i.d(t,{A:()=>S});var r=i(90237),s=i(92602),n=i(70333),o=i(78888),a=i(60999),l=i(49186),h=i(53966),u=i(97768),d=i(74887),c=i(84952),p=i(10107),y=(i(44208),i(87811),i(36005)),g=i(40608),_=i(43937),f=i(77548),m=i(20655),v=i(80812),w=i(41318),b=i(10407);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new v.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await i.e(1204).then(i.bind(i,41204));return(0,d.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||h.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,d.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=!n.id?.findCredential(this.url),s=e===i.id;if(s&&i.portal.user)return this._getUserPrivileges(i,r);let o,a;if(s)o=i.portal.url;else try{o=await(0,f.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!o||!(0,c.b8)(o,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(n.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const l=!0,h=!1,u=!1;if(!a)return{features:{edit:l,fullEdit:h},content:{updateItem:u}};try{if(s?await i.reload():(i=new v.default({id:e,portal:{url:o}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,r)}catch(e){(0,d.QP)(e)}return{features:{edit:l,fullEdit:h},content:{updateItem:u}}}_getUserPrivileges(e,t){const i=(0,b.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const i=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=n.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=m.A.getDefault();if(s&&s.loaded&&(0,c.S8)(s.restUrl)===(0,c.S8)(r))return s.user;const l=`${r}/community/self`,h=null!=e?e.signal:null,u=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?w.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||m.A.getDefault());return i&&r&&!(0,c.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,p.MZ)({type:v.default})],t.prototype,"portalItem",null),(0,r._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,_.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,p.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,p.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,p.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,p.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,g.$)("esri.layers.mixins.PortalLayer")],t),t},M={credential:null,user:null}},18768:(e,t,i)=>{i.d(t,{b:()=>l});var r=i(90237),s=i(53966),n=i(10107),o=(i(44208),i(87811),i(40608)),a=i(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,r._)([(0,n.MZ)()],t.prototype,"title",null),(0,r._)([(0,n.MZ)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,o.$)("esri.layers.mixins.ArcGISService")],t),t}},35982:(e,t,i)=>{i.d(t,{B:()=>l});var r=i(4576),s=i(36563),n=i(53966),o=i(74887),a=i(29953);class l{constructor(e,t,i,r,s={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._promise=(0,a.ho)(e,{...s,schedule:r}).then(e=>{if(void 0===this._thread){this._thread=e,this._promise=null,s.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()}),this._promise.catch(t=>n.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){const i={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(i),this._connectListener(i),(0,s.hA)(()=>{i.removed=!0,(0,r.TF)(this._listeners,i),this._thread&&null!=i.threadHandle&&i.threadHandle.remove()})}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t,i){return this.invokeMethod(this._mainMethod,e,t,i)}invokeMethod(e,t,i,r){if(this._thread){const s=this._transferLists[e],n=s?s(t):[];return this._thread.invoke(e,t,{transferList:n,signal:i,priority:r})}return this._promise?this._promise.then(()=>((0,o.Te)(i),this.invokeMethod(e,t,i))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(h):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then(t=>{e.removed||(e.threadHandle=t)})}}function h(){}},54239:(e,t,i)=>{i.d(t,{A:()=>f});var r,s=i(90237),n=i(4576),o=i(66552),a=i(25482),l=i(83047),h=i(67076),u=i(10107),d=(i(44208),i(53966),i(36005)),c=i(40608),p=i(43937);const y=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),g=y.jsonValues.slice();(0,n.Xy)(g,"orthometric");const _=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let f=r=class extends a.A{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return y.write(e,t,i)}readHeightModel(e,t,i){return y.read(e)||(i?.messages&&i.messages.push(function(e,t){return new h.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return _.read(e)||(i?.messages&&i.messages.push(m(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,l.LA)(e)||_.read(e)||(i?.messages&&i.messages.push(m(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,l.k1)(t);return new r({heightModel:e.heightModel,heightUnit:i??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new r;return t.read(e,{origin:"web-scene"}),t}};function m(e,t){return new h.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,u.MZ)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g,default:"ellipsoidal",write:{isRequired:!0}}}}})],f.prototype,"heightModel",void 0),(0,s._)([(0,p.K)("web-scene","heightModel")],f.prototype,"writeHeightModel",null),(0,s._)([(0,d.w)(["web-scene","service"],"heightModel")],f.prototype,"readHeightModel",null),(0,s._)([(0,u.MZ)({type:_.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:_.jsonValues,write:{writer:_.write,isRequired:!0}}}}})],f.prototype,"heightUnit",void 0),(0,s._)([(0,d.w)("web-scene","heightUnit")],f.prototype,"readHeightUnit",null),(0,s._)([(0,d.w)("service","heightUnit")],f.prototype,"readHeightUnitService",null),(0,s._)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,"vertCRS",void 0),(0,s._)([(0,d.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null),f=r=(0,s._)([(0,c.$)("esri.geometry.HeightModelInfo")],f)},64272:(e,t,i)=>{i.d(t,{T:()=>c});var r,s=i(90237),n=i(25482),o=i(88930),a=i(10107),l=(i(44208),i(53966),i(87811),i(36005)),h=i(40608),u=i(43937),d=i(98623);let c=class extends n.A{static{r=this}static get allTime(){return p}static get empty(){return y}static fromArray(e){return new r({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===r&&i===s}expandTo(e,t=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,o.lL)(i,e,t));let s=this.end;if(s){const i=(0,o.lL)(s,e,t);s=s.getTime()===i.getTime()?i:(0,o.S1)(i,1,e,t)}return new r({start:i,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;return s>=t&&s<=i?o=s:t>=s&&t<=n&&(o=t),i>=s&&i<=n?a=i:n>=t&&n<=i&&(a=n),null==o||null==a||isNaN(o)||isNaN(a)?r.empty:new r({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,i=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const s=new r,{start:n,end:a}=this;return null!=n&&(s.start=(0,o.S1)(n,e,t,i)),null!=a&&(s.end=(0,o.S1)(a,e,t,i)),s}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:i})}};(0,s._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,s._)([(0,l.w)("end")],c.prototype,"readEnd",null),(0,s._)([(0,u.K)("end")],c.prototype,"writeEnd",null),(0,s._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,s._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,s._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,s._)([(0,l.w)("start")],c.prototype,"readStart",null),(0,s._)([(0,u.K)("start")],c.prototype,"writeStart",null),c=r=(0,s._)([(0,h.$)("esri.time.TimeExtent")],c);const p=new c,y=new c({start:void 0,end:void 0})},66344:(e,t,i)=>{var r,s;i.d(t,{q:()=>l}),(s=r||(r={}))[s.ALL=0]="ALL",s[s.SOME=1]="SOME",Symbol.iterator;class n{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db=null}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,s,n){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==i&&this._notifyRemove(t,a.entry,a.size,r.ALL)),s>this._maxSize)return void this._notifyRemove(t,i,s,r.ALL);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,0,r.ALL);const l=1+Math.max(n,-4)- -3;this._db.set(t,new o(i,s,l)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t,i,s){t=e.id+t;const n=this._db.get(t);if(n&&n.entry===i){for(this._size-=n.size,e.size-=n.size;s>this._maxSize;){const e=this._notifyRemove(t,i,s,r.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}n.size=s,this._size+=s,e.size+=s,this._checkSize()}}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach((e,r)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._users.forEach(i=>{const{id:s,name:n}=i;if(r.startsWith(s)){const i=t[n]||0;t[n]=i+e.size}})});const r={};this._users.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"});const s=Object.keys(t);s.sort((e,i)=>t[i]-t[e]),s.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]);for(let t=i.length-1;t>=0;--t){const r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,r.ALL))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,r.ALL)),this._users.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,r){const s=this._users.get(e.split(a)[0])?.removeFunc,n=s?.(t,r,i);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const r=t?.id;let s=!0;for(;s;){s=!1;for(const[n,o]of this._db)if(0===o.lifetime&&(!r||n.startsWith(r))){const r=t??this._users.get(n.split(a)[0]);if(this._purgeItem(n,o,r),i.size<=.9*e)return;s||=this._db.has(n)}}for(const[s,n]of this._db)if(!r||s.startsWith(r)){const r=t??this._users.get(s.split(a)[0]);if(this._purgeItem(s,n,r),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const s=this._notifyRemove(e,t.entry,t.size,r.SOME);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class o{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const a=":";class l{constructor(e,t){this.removeFunc=t,this._storage=new n,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},68611:(e,t,i)=>{i.r(t),i.d(t,{default:()=>E});var r=i(90237),s=i(78888),n=i(49186),o=i(97768),a=i(92071),l=i(74887),h=i(84952),u=i(10107),d=(i(44208),i(53966),i(87811),i(36005)),c=i(40608),p=i(54239),y=i(4146),g=i(89186),_=i(18768),f=i(16131),m=i(8303),v=i(10873);class w{constructor(e,t,i,r){this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,"pixelData"in e?(this.values=e.pixelData,this.width=e.width,this.height=e.height,this.noDataValue=e.noDataValue):(this.values=e,this.width=t,this.height=i,this.noDataValue=r)}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get cachedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let i=1/0,r=-1/0,s=!0;for(const n of t)n===e?this._hasNoDataValues=!0:(i=n<i?n:i,r=n>r?n:r,s=!1);s?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=r>-3e38?r:0)}}var b=i(35982);class S extends b.B{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(M.forEach((e,t)=>{e===this&&M.delete(t)}),this.destroy())}}const M=new Map;let A=class extends((0,g.f)((0,_.b)((0,f.q)((0,m.A)((0,a.P)(y.A)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=M.get(e);return t||(null!=e?(t=new S(t=>e.immediate.schedule(t)),M.set(e,t)):(t=new S,M.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.Gz)(this._lercDecoder)}readCapabilities(e,t){const i=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());return i?{operations:{supportsTileMap:i.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let i=t.currentVersion;return i||(i=9.3),i}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new n.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(l.QP).then(()=>this._fetchImageService(t))),Promise.resolve(this)}fetchTile(e,t,i,r){const n=r?.signal,o={responseType:"array-buffer",signal:n},a={noDataValue:r?.noDataValue,returnFileInfo:!0};return this.load().then(()=>this._fetchTileAvailability(e,t,i,r)).then(()=>(0,s.A)(this.getTileUrl(e,t,i),o)).then(e=>this._lercDecoder.decode(e.data,a,n)).then(e=>new w(e))}getTileUrl(e,t,i){const r=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,s=(0,h.x0)({...this.parsedUrl.query,blankTile:!r&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${s?"?"+s:""}`}async queryElevation(e,t){const{ElevationQuery:r}=await i.e(3492).then(i.bind(i,63492));return(0,l.Te)(t),(new r).query(this,e,t)}async createElevationSampler(e,t){const{ElevationQuery:r}=await i.e(3492).then(i.bind(i,63492));return(0,l.Te)(t),(new r).createSampler(this,e,t)}_fetchTileAvailability(e,t,i,r){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,r):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await(0,s.A)(this.parsedUrl.path,t);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[z]}};(0,r._)([(0,u.MZ)({readOnly:!0})],A.prototype,"capabilities",void 0),(0,r._)([(0,d.w)("service","capabilities",["capabilities"])],A.prototype,"readCapabilities",null),(0,r._)([(0,u.MZ)({json:{read:{source:"copyrightText"}}})],A.prototype,"copyright",void 0),(0,r._)([(0,u.MZ)({readOnly:!0,type:p.A})],A.prototype,"heightModelInfo",void 0),(0,r._)([(0,u.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],A.prototype,"path",void 0),(0,r._)([(0,u.MZ)({type:["show","hide"]})],A.prototype,"listMode",void 0),(0,r._)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],A.prototype,"minScale",void 0),(0,r._)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],A.prototype,"maxScale",void 0),(0,r._)([(0,u.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],A.prototype,"opacity",void 0),(0,r._)([(0,u.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],A.prototype,"operationalLayerType",void 0),(0,r._)([(0,u.MZ)()],A.prototype,"sourceJSON",void 0),(0,r._)([(0,u.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],A.prototype,"type",void 0),(0,r._)([(0,u.MZ)(v.OZ)],A.prototype,"url",void 0),(0,r._)([(0,u.MZ)()],A.prototype,"version",void 0),(0,r._)([(0,d.w)("version",["currentVersion"])],A.prototype,"readVersion",null),A=(0,r._)([(0,c.$)("esri.layers.ElevationLayer")],A);const z=Symbol("default-fetch-tile");A.prototype.fetchTile[z]=!0;const E=A},69397:(e,t,i)=>{i.d(t,{$B:()=>s,Qf:()=>h,Qh:()=>a,RS:()=>n,ez:()=>c,lM:()=>o,qK:()=>d});var r=i(34275);function s(e){return 32+e.length}const n=16;function o(e){if(!e)return 0;let t=d;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return h(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let i=c;for(let r=0;r<t;r++)i+=l(e[r]);return i}(e);let t=d;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i]));return t}function l(e,t=!0){switch(typeof e){case"object":return t?a(e):d;case"string":return s(e);case"number":return n;case"boolean":return 4;default:return 8}}function h(...e){return e.reduce((e,t)=>e+(t?(0,r.iu)(t)?t.byteLength+p:Array.isArray(t)?u(t,n):0:0),0)}function u(e,t){return c+e.length*t}const d=32,c=16,p=145},69540:(e,t,i)=>{i.d(t,{A:()=>c});var r=i(90237),s=i(69622),n=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(35666),l=i(88620),h=i(40608);const u=e=>{let t=class extends e{clone(){const e=(0,l.oY)(this);(0,o.Lw)(e,"unable to clone instance of non-accessor class");const t=e.metadata,i=e.store,r={},s=new Map;for(const e in t){const o=t[e],l=i?.originOf(e),h=o.clonable;if(o.readOnly||!1===h||l!==a.Gr.USER&&l!==a.Gr.DEFAULTS&&l!==a.Gr.WEB_MAP&&l!==a.Gr.WEB_SCENE)continue;const u=this[e];let d=null;d="function"==typeof h?h(u):"reference"===h?u:(0,n.TU)(u),null!=u&&null==d||(l===a.Gr.DEFAULTS?s.set(e,d):r[e]=d)}const h=new(0,Object.getPrototypeOf(this).constructor)(r);if(s.size){const e=(0,l.oY)(h)?.store;if(e)for(const[t,i]of s)e.set(t,i,a.Gr.DEFAULTS)}return h}};return t=(0,r._)([(0,h.$)("esri.core.Clonable")],t),t};let d=class extends(u(s.A)){};d=(0,r._)([(0,h.$)("esri.core.Clonable")],d),(d||(d={})).ClonableMixin=u;const c=d},78553:(e,t,i)=>{i.d(t,{D:()=>n,p:()=>s});var r=i(56507);function s(e){const t=(0,r.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function n(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}},92071:(e,t,i)=>{i.d(t,{P:()=>v,L:()=>w});var r=i(90237),s=i(69622),n=i(76953),o=i(4718),a=i(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,i=this._originStores[a.Gr.DEFAULTS];i&&i.forEach((e,i)=>{t.set(i,(0,o.o8)(e),a.Gr.DEFAULTS)});for(let i=a.Gr.SERVICE;i<a.AU;i++){const r=this._originStores[i];r&&r.forEach((r,s)=>{e&&e.has(s)||t.set(s,(0,o.o8)(r),i)})}return t}get(e,t){const i=void 0===t?this._values:this._originStores[t];return i?i.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,i=a.Gr.USER){let r=this._originStores[i];if(r||(r=new Map,this._originStores[i]=r),r.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=i){const r=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,i),r!==t}return!1}delete(e,t=a.Gr.USER){const i=this._originStores[t];if(!i)return;const r=i.get(e);if(i.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let i=t-1;i>=0;i--){const t=this._originStores[i];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,i);break}}}return r}has(e,t){const i=void 0===t?this._values:this._originStores[t];return!!i&&i.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const i=this._originStores[t],r=i?.get(e),s=this._values.get(e);return this._values.set(e,r),this._propertyOriginMap.set(e,t),s!==r}originOf(e){return this._propertyOriginMap.get(e)||a.Gr.DEFAULTS}isAtOrigin(e,t){return this.has(e,t)&&this.originOf(e)===t}isBelowOrigin(e,t){return!this.has(e)||this.originOf(e)<t}forEach(e){this._values.forEach(e)}}var h=i(45917),u=i(88620),d=i(40608);const c=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,u.oY)(this),i=t.store,r=new l;t.store=r,(0,n.k)(t,i,r)}read(e,t){(0,h.L)(this,e,t)}getAtOrigin(e,t){const i=p(this),r=(0,a.aB)(t);if("string"==typeof e)return i.get(e,r);const s={};return e.forEach(e=>{s[e]=i.get(e,r)}),s}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return p(this).originOf(e)}revert(e,t){const i=p(this),r=(0,a.aB)(t),s=(0,u.oY)(this);let n;n="string"==typeof e?"*"===e?i.keys(r):[e]:e,n.forEach(e=>{s.invalidate(e),i.revert(e,r),s.commit(e)})}};return t=(0,r._)([(0,d.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function p(e){return(0,u.oY)(e).store}let y=class extends(c(s.A)){};y=(0,r._)([(0,d.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],y);var g=i(16649),_=i(49422);const f=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){(0,u.oY)(this).clearOrigin(e,(0,a.aB)(t))}write(e,t){return(0,_.M)(this,e=e||{},t),e}setAtOrigin(e,t,i){(0,u.oY)(this).setAtOrigin(e,t,(0,a.aB)(i))}removeOrigin(e){const t=m(this),i=(0,a.aB)(e),r=t.keys(i);for(const e of r)t.originOf(e)===i&&t.set(e,t.get(e,i),a.Gr.USER)}updateOrigin(e,t){const i=m(this),r=(0,a.aB)(t),s=(0,g.Jt)(this,e);for(let t=r+1;t<a.AU;++t)i.delete(e,t);i.set(e,s,r)}toJSON(e){return this.write({},e)}};return t=(0,r._)([(0,d.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function m(e){return(0,u.oY)(e).store}const v=e=>{let t=class extends(f(c(e))){constructor(...e){super(...e)}};return t=(0,r._)([(0,d.$)("esri.core.MultiOriginJSONSupport")],t),t};let w=class extends(v(s.A)){};w=(0,r._)([(0,d.$)("esri.core.MultiOriginJSONSupport")],w)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5751,8256],{4146:(e,t,i)=>{i.d(t,{A:()=>v});var r=i(90237),s=i(78888),n=i(49186),o=i(65529),a=i(4902),l=i(92474),h=i(53966),u=i(74887),d=i(84952),c=i(10107),p=(i(44208),i(87811),i(40608)),y=i(5443),g=i(16930),_=i(92602),f=i(64272);let m=0,v=class extends(o.A.EventedMixin(a.A.IdentifiableMixin(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+m++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await i.e(7982).then(i.bind(i,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await i.e(5613).then(i.bind(i,45613));try{return await r(t)}catch(e){const i=t?.portalItem,r=i?.id||"unset",s=i?.portal?.url||_.A.portalUrl;throw h.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,u.zf)(e)||h.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(e,t){return Promise.reject(new n.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,c.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,r._)([(0,c.MZ)({type:y.A})],v.prototype,"fullExtent",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,r._)([(0,c.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,r._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,r._)([(0,c.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,r._)([(0,c.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,r._)([(0,c.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,r._)([(0,c.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,r._)([(0,c.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,r._)([(0,c.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,r._)([(0,c.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,r._)([(0,c.MZ)({type:g.A})],v.prototype,"spatialReference",void 0),(0,r._)([(0,c.MZ)({type:String})],v.prototype,"title",void 0),(0,r._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,r._)([(0,c.MZ)()],v.prototype,"url",void 0),(0,r._)([(0,c.MZ)({type:f.T})],v.prototype,"visibilityTimeExtent",void 0),(0,r._)([(0,c.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,r._)([(0,p.$)("esri.layers.Layer")],v)},4902:(e,t,i)=>{i.d(t,{A:()=>h});var r=i(90237),s=i(40608);let n=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,r._)([(0,s.$)("esri.core.Identifiable")],t),t};let a=class extends(o(class{})){};var l;a=(0,r._)([(0,s.$)("esri.core.Identifiable")],a),(l=a||(a={})).IdentifiableMixin=o,l.NumericIdentifiableMixin=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return t=(0,r._)([(0,s.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};const h=a},8303:(e,t,i)=>{i.d(t,{A:()=>S});var r=i(90237),s=i(92602),n=i(70333),o=i(78888),a=i(60999),l=i(49186),h=i(53966),u=i(97768),d=i(74887),c=i(84952),p=i(10107),y=(i(44208),i(87811),i(36005)),g=i(40608),_=i(43937),f=i(77548),m=i(20655),v=i(80812),w=i(41318),b=i(10407);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new v.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await i.e(1204).then(i.bind(i,41204));return(0,d.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||h.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,d.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=!n.id?.findCredential(this.url),s=e===i.id;if(s&&i.portal.user)return this._getUserPrivileges(i,r);let o,a;if(s)o=i.portal.url;else try{o=await(0,f.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!o||!(0,c.b8)(o,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(n.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const l=!0,h=!1,u=!1;if(!a)return{features:{edit:l,fullEdit:h},content:{updateItem:u}};try{if(s?await i.reload():(i=new v.default({id:e,portal:{url:o}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,r)}catch(e){(0,d.QP)(e)}return{features:{edit:l,fullEdit:h},content:{updateItem:u}}}_getUserPrivileges(e,t){const i=(0,b.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const i=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=n.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,s=m.A.getDefault();if(s&&s.loaded&&(0,c.S8)(s.restUrl)===(0,c.S8)(r))return s.user;const l=`${r}/community/self`,h=null!=e?e.signal:null,u=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?w.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||m.A.getDefault());return i&&r&&!(0,c.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,p.MZ)({type:v.default})],t.prototype,"portalItem",null),(0,r._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,_.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,p.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,p.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,p.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,p.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,g.$)("esri.layers.mixins.PortalLayer")],t),t},M={credential:null,user:null}},18768:(e,t,i)=>{i.d(t,{b:()=>l});var r=i(90237),s=i(53966),n=i(10107),o=(i(44208),i(87811),i(40608)),a=i(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,r._)([(0,n.MZ)()],t.prototype,"title",null),(0,r._)([(0,n.MZ)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,o.$)("esri.layers.mixins.ArcGISService")],t),t}},35982:(e,t,i)=>{i.d(t,{B:()=>l});var r=i(4576),s=i(36563),n=i(53966),o=i(74887),a=i(29953);class l{constructor(e,t,i,r,s={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._promise=(0,a.ho)(e,{...s,schedule:r}).then(e=>{if(void 0===this._thread){this._thread=e,this._promise=null,s.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()}),this._promise.catch(t=>n.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){const i={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(i),this._connectListener(i),(0,s.hA)(()=>{i.removed=!0,(0,r.TF)(this._listeners,i),this._thread&&null!=i.threadHandle&&i.threadHandle.remove()})}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t,i){return this.invokeMethod(this._mainMethod,e,t,i)}invokeMethod(e,t,i,r){if(this._thread){const s=this._transferLists[e],n=s?s(t):[];return this._thread.invoke(e,t,{transferList:n,signal:i,priority:r})}return this._promise?this._promise.then(()=>((0,o.Te)(i),this.invokeMethod(e,t,i))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(h):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then(t=>{e.removed||(e.threadHandle=t)})}}function h(){}},54239:(e,t,i)=>{i.d(t,{A:()=>f});var r,s=i(90237),n=i(4576),o=i(66552),a=i(25482),l=i(83047),h=i(67076),u=i(10107),d=(i(44208),i(53966),i(36005)),c=i(40608),p=i(43937);const y=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),g=y.jsonValues.slice();(0,n.Xy)(g,"orthometric");const _=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let f=r=class extends a.A{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return y.write(e,t,i)}readHeightModel(e,t,i){return y.read(e)||(i?.messages&&i.messages.push(function(e,t){return new h.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return _.read(e)||(i?.messages&&i.messages.push(m(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,l.LA)(e)||_.read(e)||(i?.messages&&i.messages.push(m(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,l.k1)(t);return new r({heightModel:e.heightModel,heightUnit:i??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new r;return t.read(e,{origin:"web-scene"}),t}};function m(e,t){return new h.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,u.MZ)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g,default:"ellipsoidal",write:{isRequired:!0}}}}})],f.prototype,"heightModel",void 0),(0,s._)([(0,p.K)("web-scene","heightModel")],f.prototype,"writeHeightModel",null),(0,s._)([(0,d.w)(["web-scene","service"],"heightModel")],f.prototype,"readHeightModel",null),(0,s._)([(0,u.MZ)({type:_.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:_.jsonValues,write:{writer:_.write,isRequired:!0}}}}})],f.prototype,"heightUnit",void 0),(0,s._)([(0,d.w)("web-scene","heightUnit")],f.prototype,"readHeightUnit",null),(0,s._)([(0,d.w)("service","heightUnit")],f.prototype,"readHeightUnitService",null),(0,s._)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,"vertCRS",void 0),(0,s._)([(0,d.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null),f=r=(0,s._)([(0,c.$)("esri.geometry.HeightModelInfo")],f)},64272:(e,t,i)=>{i.d(t,{T:()=>c});var r,s=i(90237),n=i(25482),o=i(88930),a=i(10107),l=(i(44208),i(53966),i(87811),i(36005)),h=i(40608),u=i(43937),d=i(98623);let c=class extends n.A{static{r=this}static get allTime(){return p}static get empty(){return y}static fromArray(e){return new r({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===r&&i===s}expandTo(e,t=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,o.lL)(i,e,t));let s=this.end;if(s){const i=(0,o.lL)(s,e,t);s=s.getTime()===i.getTime()?i:(0,o.S1)(i,1,e,t)}return new r({start:i,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;return s>=t&&s<=i?o=s:t>=s&&t<=n&&(o=t),i>=s&&i<=n?a=i:n>=t&&n<=i&&(a=n),null==o||null==a||isNaN(o)||isNaN(a)?r.empty:new r({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,i=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const s=new r,{start:n,end:a}=this;return null!=n&&(s.start=(0,o.S1)(n,e,t,i)),null!=a&&(s.end=(0,o.S1)(a,e,t,i)),s}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:i})}};(0,s._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,s._)([(0,l.w)("end")],c.prototype,"readEnd",null),(0,s._)([(0,u.K)("end")],c.prototype,"writeEnd",null),(0,s._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,s._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,s._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,s._)([(0,l.w)("start")],c.prototype,"readStart",null),(0,s._)([(0,u.K)("start")],c.prototype,"writeStart",null),c=r=(0,s._)([(0,h.$)("esri.time.TimeExtent")],c);const p=new c,y=new c({start:void 0,end:void 0})},66344:(e,t,i)=>{var r,s;i.d(t,{q:()=>l}),(s=r||(r={}))[s.ALL=0]="ALL",s[s.SOME=1]="SOME",Symbol.iterator;class n{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._users=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._users.clear(),this._db=null}register(e){this._users.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._users.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,s,n){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==i&&this._notifyRemove(t,a.entry,a.size,r.ALL)),s>this._maxSize)return void this._notifyRemove(t,i,s,r.ALL);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,0,r.ALL);const l=1+Math.max(n,-4)- -3;this._db.set(t,new o(i,s,l)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t,i,s){t=e.id+t;const n=this._db.get(t);if(n&&n.entry===i){for(this._size-=n.size,e.size-=n.size;s>this._maxSize;){const e=this._notifyRemove(t,i,s,r.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}n.size=s,this._size+=s,e.size+=s,this._checkSize()}}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach((e,r)=>{const s=e.lifetime;i[s]=(i[s]||0)+e.size,this._users.forEach(i=>{const{id:s,name:n}=i;if(r.startsWith(s)){const i=t[n]||0;t[n]=i+e.size}})});const r={};this._users.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"});const s=Object.keys(t);s.sort((e,i)=>t[i]-t[e]),s.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]);for(let t=i.length-1;t>=0;--t){const r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,r.ALL))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,r.ALL)),this._users.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,r){const s=this._users.get(e.split(a)[0])?.removeFunc,n=s?.(t,r,i);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._checkSizeLimits(this.maxSize)}setMaxSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const r=t?.id;let s=!0;for(;s;){s=!1;for(const[n,o]of this._db)if(0===o.lifetime&&(!r||n.startsWith(r))){const r=t??this._users.get(n.split(a)[0]);if(this._purgeItem(n,o,r),i.size<=.9*e)return;s||=this._db.has(n)}}for(const[s,n]of this._db)if(!r||s.startsWith(r)){const r=t??this._users.get(s.split(a)[0]);if(this._purgeItem(s,n,r),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const s=this._notifyRemove(e,t.entry,t.size,r.SOME);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class o{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const a=":";class l{constructor(e,t){this.removeFunc=t,this._storage=new n,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy(),this._storage=null}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},68611:(e,t,i)=>{i.r(t),i.d(t,{default:()=>E});var r=i(90237),s=i(78888),n=i(49186),o=i(97768),a=i(92071),l=i(74887),h=i(84952),u=i(10107),d=(i(44208),i(53966),i(87811),i(36005)),c=i(40608),p=i(54239),y=i(4146),g=i(89186),_=i(18768),f=i(16131),m=i(8303),v=i(10873);class w{constructor(e,t,i,r){this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,"pixelData"in e?(this.values=e.pixelData,this.width=e.width,this.height=e.height,this.noDataValue=e.noDataValue):(this.values=e,this.width=t,this.height=i,this.noDataValue=r)}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get cachedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let i=1/0,r=-1/0,s=!0;for(const n of t)n===e?this._hasNoDataValues=!0:(i=n<i?n:i,r=n>r?n:r,s=!1);s?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=r>-3e38?r:0)}}var b=i(35982);class S extends b.B{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(M.forEach((e,t)=>{e===this&&M.delete(t)}),this.destroy())}}const M=new Map;let A=class extends((0,g.f)((0,_.b)((0,f.q)((0,m.A)((0,a.P)(y.A)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=M.get(e);return t||(null!=e?(t=new S(t=>e.immediate.schedule(t)),M.set(e,t)):(t=new S,M.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.Gz)(this._lercDecoder)}readCapabilities(e,t){const i=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());return i?{operations:{supportsTileMap:i.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let i=t.currentVersion;return i||(i=9.3),i}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new n.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(l.QP).then(()=>this._fetchImageService(t))),Promise.resolve(this)}fetchTile(e,t,i,r){const n=r?.signal,o={responseType:"array-buffer",signal:n},a={noDataValue:r?.noDataValue,returnFileInfo:!0};return this.load().then(()=>this._fetchTileAvailability(e,t,i,r)).then(()=>(0,s.A)(this.getTileUrl(e,t,i),o)).then(e=>this._lercDecoder.decode(e.data,a,n)).then(e=>new w(e))}getTileUrl(e,t,i){const r=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,s=(0,h.x0)({...this.parsedUrl.query,blankTile:!r&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${s?"?"+s:""}`}async queryElevation(e,t){const{ElevationQuery:r}=await i.e(3492).then(i.bind(i,63492));return(0,l.Te)(t),(new r).query(this,e,t)}async createElevationSampler(e,t){const{ElevationQuery:r}=await i.e(3492).then(i.bind(i,63492));return(0,l.Te)(t),(new r).createSampler(this,e,t)}_fetchTileAvailability(e,t,i,r){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,r):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await(0,s.A)(this.parsedUrl.path,t);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[z]}};(0,r._)([(0,u.MZ)({readOnly:!0})],A.prototype,"capabilities",void 0),(0,r._)([(0,d.w)("service","capabilities",["capabilities"])],A.prototype,"readCapabilities",null),(0,r._)([(0,u.MZ)({json:{read:{source:"copyrightText"}}})],A.prototype,"copyright",void 0),(0,r._)([(0,u.MZ)({readOnly:!0,type:p.A})],A.prototype,"heightModelInfo",void 0),(0,r._)([(0,u.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],A.prototype,"path",void 0),(0,r._)([(0,u.MZ)({type:["show","hide"]})],A.prototype,"listMode",void 0),(0,r._)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],A.prototype,"minScale",void 0),(0,r._)([(0,u.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],A.prototype,"maxScale",void 0),(0,r._)([(0,u.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],A.prototype,"opacity",void 0),(0,r._)([(0,u.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],A.prototype,"operationalLayerType",void 0),(0,r._)([(0,u.MZ)()],A.prototype,"sourceJSON",void 0),(0,r._)([(0,u.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],A.prototype,"type",void 0),(0,r._)([(0,u.MZ)(v.OZ)],A.prototype,"url",void 0),(0,r._)([(0,u.MZ)()],A.prototype,"version",void 0),(0,r._)([(0,d.w)("version",["currentVersion"])],A.prototype,"readVersion",null),A=(0,r._)([(0,c.$)("esri.layers.ElevationLayer")],A);const z=Symbol("default-fetch-tile");A.prototype.fetchTile[z]=!0;const E=A},69397:(e,t,i)=>{i.d(t,{$B:()=>s,Qf:()=>h,Qh:()=>a,RS:()=>n,ez:()=>c,lM:()=>o,qK:()=>d});var r=i(34275);function s(e){return 32+e.length}const n=16;function o(e){if(!e)return 0;let t=d;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return h(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let i=c;for(let r=0;r<t;r++)i+=l(e[r]);return i}(e);let t=d;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i]));return t}function l(e,t=!0){switch(typeof e){case"object":return t?a(e):d;case"string":return s(e);case"number":return n;case"boolean":return 4;default:return 8}}function h(...e){return e.reduce((e,t)=>e+(t?(0,r.iu)(t)?t.byteLength+p:Array.isArray(t)?u(t,n):0:0),0)}function u(e,t){return c+e.length*t}const d=32,c=16,p=145},69540:(e,t,i)=>{i.d(t,{A:()=>c});var r=i(90237),s=i(69622),n=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(35666),l=i(88620),h=i(40608);const u=e=>{let t=class extends e{clone(e){const t=(0,l.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,r=t.store,s={},h=new Map;for(const t in i){const o=i[t],l=r?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||l!==a.Gr.USER&&l!==a.Gr.DEFAULTS&&l!==a.Gr.WEB_MAP&&l!==a.Gr.WEB_SCENE)continue;const d=this[t];let c=null;c="function"==typeof u?u(d,e):"reference"===u?d:(0,n.TU)(d,e),null!=d&&null==c||(l===a.Gr.DEFAULTS?h.set(t,c):s[t]=c)}const u=new(0,Object.getPrototypeOf(this).constructor)(s);if(h.size){const e=(0,l.oY)(u)?.store;if(e)for(const[t,i]of h)e.set(t,i,a.Gr.DEFAULTS)}return u}};return t=(0,r._)([(0,h.$)("esri.core.Clonable")],t),t};let d=class extends(u(s.A)){};d=(0,r._)([(0,h.$)("esri.core.Clonable")],d),(d||(d={})).ClonableMixin=u;const c=d},78553:(e,t,i)=>{i.d(t,{D:()=>n,p:()=>s});var r=i(56507);function s(e){const t=(0,r.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function n(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}},92071:(e,t,i)=>{i.d(t,{P:()=>v,L:()=>w});var r=i(90237),s=i(69622),n=i(76953),o=i(4718),a=i(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,i=this._originStores[a.Gr.DEFAULTS];i&&i.forEach((e,i)=>{t.set(i,(0,o.o8)(e),a.Gr.DEFAULTS)});for(let i=a.Gr.SERVICE;i<a.AU;i++){const r=this._originStores[i];r&&r.forEach((r,s)=>{e&&e.has(s)||t.set(s,(0,o.o8)(r),i)})}return t}get(e,t){const i=void 0===t?this._values:this._originStores[t];return i?i.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,i=a.Gr.USER){let r=this._originStores[i];if(r||(r=new Map,this._originStores[i]=r),r.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=i){const r=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,i),r!==t}return!1}delete(e,t=a.Gr.USER){const i=this._originStores[t];if(!i)return;const r=i.get(e);if(i.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let i=t-1;i>=0;i--){const t=this._originStores[i];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,i);break}}}return r}has(e,t){const i=void 0===t?this._values:this._originStores[t];return!!i&&i.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const i=this._originStores[t],r=i?.get(e),s=this._values.get(e);return this._values.set(e,r),this._propertyOriginMap.set(e,t),s!==r}originOf(e){return this._propertyOriginMap.get(e)||a.Gr.DEFAULTS}isAtOrigin(e,t){return this.has(e,t)&&this.originOf(e)===t}isBelowOrigin(e,t){return!this.has(e)||this.originOf(e)<t}forEach(e){this._values.forEach(e)}}var h=i(45917),u=i(88620),d=i(40608);const c=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,u.oY)(this),i=t.store,r=new l;t.store=r,(0,n.k)(t,i,r)}read(e,t){(0,h.L)(this,e,t)}getAtOrigin(e,t){const i=p(this),r=(0,a.aB)(t);if("string"==typeof e)return i.get(e,r);const s={};return e.forEach(e=>{s[e]=i.get(e,r)}),s}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return p(this).originOf(e)}revert(e,t){const i=p(this),r=(0,a.aB)(t),s=(0,u.oY)(this);let n;n="string"==typeof e?"*"===e?i.keys(r):[e]:e,n.forEach(e=>{s.invalidate(e),i.revert(e,r),s.commit(e)})}};return t=(0,r._)([(0,d.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function p(e){return(0,u.oY)(e).store}let y=class extends(c(s.A)){};y=(0,r._)([(0,d.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],y);var g=i(16649),_=i(49422);const f=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){(0,u.oY)(this).clearOrigin(e,(0,a.aB)(t))}write(e,t){return(0,_.M)(this,e=e||{},t),e}setAtOrigin(e,t,i){(0,u.oY)(this).setAtOrigin(e,t,(0,a.aB)(i))}removeOrigin(e){const t=m(this),i=(0,a.aB)(e),r=t.keys(i);for(const e of r)t.originOf(e)===i&&t.set(e,t.get(e,i),a.Gr.USER)}updateOrigin(e,t){const i=m(this),r=(0,a.aB)(t),s=(0,g.Jt)(this,e);for(let t=r+1;t<a.AU;++t)i.delete(e,t);i.set(e,s,r)}toJSON(e){return this.write({},e)}};return t=(0,r._)([(0,d.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function m(e){return(0,u.oY)(e).store}const v=e=>{let t=class extends(f(c(e))){constructor(...e){super(...e)}};return t=(0,r._)([(0,d.$)("esri.core.MultiOriginJSONSupport")],t),t};let w=class extends(v(s.A)){};w=(0,r._)([(0,d.$)("esri.core.MultiOriginJSONSupport")],w)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5335,8256],{4146:(e,t,r)=>{r.d(t,{A:()=>_});var i=r(90237),s=r(78888),n=r(49186),o=r(65529),a=r(4902),l=r(92474),u=r(53966),c=r(74887),p=r(84952),d=r(10107),h=(r(44208),r(87811),r(40608)),y=r(5443),f=r(16930),g=r(92602),m=r(64272);let v=0,_=class extends(o.A.EventedMixin(a.A.IdentifiableMixin(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,f.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",s=r?.portal?.url||g.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,c.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,p.An)(this.url)}createLayerView(e,t){return Promise.reject(new n.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,d.MZ)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],_.prototype,"effectiveVisible",null),(0,i._)([(0,d.MZ)({type:y.A})],_.prototype,"fullExtent",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,i._)([(0,d.MZ)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,i._)([(0,d.MZ)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,i._)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,i._)([(0,d.MZ)({clonable:!1})],_.prototype,"parent",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],_.prototype,"persistenceEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,i._)([(0,d.MZ)({type:f.A})],_.prototype,"spatialReference",void 0),(0,i._)([(0,d.MZ)({type:String})],_.prototype,"title",void 0),(0,i._)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,i._)([(0,d.MZ)()],_.prototype,"url",void 0),(0,i._)([(0,d.MZ)({type:m.T})],_.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,i._)([(0,h.$)("esri.layers.Layer")],_)},4902:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(90237),s=r(40608);let n=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,i._)([(0,s.$)("esri.core.Identifiable")],t),t};let a=class extends(o(class{})){};var l;a=(0,i._)([(0,s.$)("esri.core.Identifiable")],a),(l=a||(a={})).IdentifiableMixin=o,l.NumericIdentifiableMixin=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return t=(0,i._)([(0,s.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};const u=a},8303:(e,t,r)=>{r.d(t,{A:()=>b});var i=r(90237),s=r(92602),n=r(70333),o=r(78888),a=r(60999),l=r(49186),u=r(53966),c=r(97768),p=r(74887),d=r(84952),h=r(10107),y=(r(44208),r(87811),r(36005)),f=r(40608),g=r(43937),m=r(77548),v=r(20655),_=r(80812),S=r(41318),w=r(10407);const b=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new _.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,p.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,p.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,p.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!n.id?.findCredential(this.url),s=e===r.id;if(s&&r.portal.user)return this._getUserPrivileges(r,i);let o,a;if(s)o=r.portal.url;else try{o=await(0,m.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!o||!(0,d.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(n.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const l=!0,u=!1,c=!1;if(!a)return{features:{edit:l,fullEdit:u},content:{updateItem:c}};try{if(s?await r.reload():(r=new _.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,p.QP)(e)}return{features:{edit:l,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=A.credential===t?A.user:await this._fetchEditingUser(e);return A.credential=t,A.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=v.A.getDefault();if(s&&s.loaded&&(0,d.S8)(s.restUrl)===(0,d.S8)(i))return s.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?S.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,h.MZ)({type:_.default})],t.prototype,"portalItem",null),(0,i._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,g.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,h.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},A={credential:null,user:null}},13069:(e,t,r)=>{r.d(t,{AG:()=>a,lk:()=>s,vD:()=>o,yS:()=>n});const i="randomUUID"in crypto;function s(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${s().toUpperCase()}}`}function o(){return`{${s()}}`}function a(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},18768:(e,t,r)=>{r.d(t,{b:()=>l});var i=r(90237),s=r(53966),n=r(10107),o=(r(44208),r(87811),r(40608)),a=r(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,i._)([(0,n.MZ)()],t.prototype,"title",null),(0,i._)([(0,n.MZ)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,o.$)("esri.layers.mixins.ArcGISService")],t),t}},25036:(e,t,r)=>{r.d(t,{j:()=>o});var i=r(90237),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,s.MZ)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,n.$)("esri.layers.mixins.ScaleRangeLayer")],t),t}},52136:(e,t,r)=>{r.d(t,{p:()=>o});var i=r(90237),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const o=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,s.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,n.$)("esri.layers.mixins.APIKeyMixin")],t),t}},58325:(e,t,r)=>{r.d(t,{A:()=>_});var i,s=r(90237),n=r(78888),o=r(5503),a=r(25482),l=r(84952),u=r(10107),c=(r(44208),r(53966),r(87811),r(40608)),p=r(4718),d=r(67076),h=r(43937),y=r(87024),f=r(39829),g=r(98988);let m=i=class extends a.A{constructor(e){super(e),this.geometry=null,this.type="clip"}writeGeometry(e,t,r,i){if(i.layer?.spatialReference&&!i.layer.spatialReference.equals(this.geometry.spatialReference)){if(!(0,g.canProjectWithoutEngine)(e.spatialReference,i.layer.spatialReference))return void(i?.messages&&i.messages.push(new d.A("scenemodification:unsupported","Scene modifications with incompatible spatial references are not supported",{modification:this,spatialReference:i.layer.spatialReference,context:i})));const s=new f.A;(0,g.projectPolygon)(e,s,i.layer.spatialReference),t[r]=s.toJSON(i)}else t[r]=e.toJSON(i);delete t[r].spatialReference}clone(){return new i({geometry:(0,p.o8)(this.geometry),type:this.type})}};var v;(0,s._)([(0,u.MZ)({type:f.A}),(0,y.P)()],m.prototype,"geometry",void 0),(0,s._)([(0,h.K)(["web-scene","portal-item"],"geometry")],m.prototype,"writeGeometry",null),(0,s._)([(0,u.MZ)({type:["clip","mask","replace"],nonNullable:!0}),(0,y.P)()],m.prototype,"type",void 0),m=i=(0,s._)([(0,c.$)("esri.layers.support.SceneModification")],m);let _=v=class extends(a.A.JSONSupportMixin(o.A.ofType(m))){constructor(e){super(e),this.url=null}clone(){return new v({url:this.url,items:this.items.map(e=>e.clone())})}toJSON(e){return this.toArray().map(t=>t.toJSON(e)).filter(e=>!!e.geometry)}static fromJSON(e,t){const r=new v;for(const i of e)r.add(m.fromJSON(i,t));return r}static async fromUrl(e,t,r){const i={url:(0,l.An)(e),origin:"service"},s=await(0,n.A)(e,{responseType:"json",signal:r?.signal}),o=t.toJSON(),a=[];for(const e of s.data)a.push(m.fromJSON({...e,geometry:{...e.geometry,spatialReference:o}},i));return new v({url:e,items:a})}};(0,s._)([(0,u.MZ)({type:String})],_.prototype,"url",void 0),_=v=(0,s._)([(0,c.$)("esri.layers.support.SceneModifications")],_)},64272:(e,t,r)=>{r.d(t,{T:()=>d});var i,s=r(90237),n=r(25482),o=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),c=r(43937),p=r(98623);let d=class extends n.A{static{i=this}static get allTime(){return h}static get empty(){return y}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===i&&r===s}expandTo(e,t=p.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.lL)(r,e,t));let s=this.end;if(s){const r=(0,o.lL)(s,e,t);s=s.getTime()===r.getTime()?r:(0,o.S1)(r,1,e,t)}return new i({start:r,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;return s>=t&&s<=r?o=s:t>=s&&t<=n&&(o=t),r>=s&&r<=n?a=r:n>=t&&n<=r&&(a=n),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,r=p.qU){if(this.isEmpty||this.isAllTime)return this.clone();const s=new i,{start:n,end:a}=this;return null!=n&&(s.start=(0,o.S1)(n,e,t,r)),null!=a&&(s.end=(0,o.S1)(a,e,t,r)),s}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,s._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,s._)([(0,l.w)("end")],d.prototype,"readEnd",null),(0,s._)([(0,c.K)("end")],d.prototype,"writeEnd",null),(0,s._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,s._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,s._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,s._)([(0,l.w)("start")],d.prototype,"readStart",null),(0,s._)([(0,c.K)("start")],d.prototype,"writeStart",null),d=i=(0,s._)([(0,u.$)("esri.time.TimeExtent")],d);const h=new d,y=new d({start:void 0,end:void 0})},69208:(e,t,r)=>{r.d(t,{d:()=>o});var i=r(90237),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,n.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},69540:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(90237),s=r(69622),n=(r(44208),r(4718)),o=(r(53966),r(97768)),a=r(35666),l=r(88620),u=r(40608);const c=e=>{let t=class extends e{clone(){const e=(0,l.oY)(this);(0,o.Lw)(e,"unable to clone instance of non-accessor class");const t=e.metadata,r=e.store,i={},s=new Map;for(const e in t){const o=t[e],l=r?.originOf(e),u=o.clonable;if(o.readOnly||!1===u||l!==a.Gr.USER&&l!==a.Gr.DEFAULTS&&l!==a.Gr.WEB_MAP&&l!==a.Gr.WEB_SCENE)continue;const c=this[e];let p=null;p="function"==typeof u?u(c):"reference"===u?c:(0,n.TU)(c),null!=c&&null==p||(l===a.Gr.DEFAULTS?s.set(e,p):i[e]=p)}const u=new(0,Object.getPrototypeOf(this).constructor)(i);if(s.size){const e=(0,l.oY)(u)?.store;if(e)for(const[t,r]of s)e.set(t,r,a.Gr.DEFAULTS)}return u}};return t=(0,i._)([(0,u.$)("esri.core.Clonable")],t),t};let p=class extends(c(s.A)){};p=(0,i._)([(0,u.$)("esri.core.Clonable")],p),(p||(p={})).ClonableMixin=c;const d=p},78553:(e,t,r)=>{r.d(t,{D:()=>n,p:()=>s});var i=r(56507);function s(e){const t=(0,i.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function n(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}},80200:(e,t,r)=>{r.d(t,{T:()=>i,d:()=>f});const i={Base64:0,Hex:1,String:2,Raw:3},s=8,n=(1<<s)-1;function o(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function a(e){const t=[];for(let r=0,i=e.length*s;r<i;r+=s)t[r>>5]|=(e.charCodeAt(r/s)&n)<<r%32;return t}function l(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=s)t.push(String.fromCharCode(e[r>>5]>>>r%32&n));return t.join("")}function u(e,t,r,i,s,n){return o(function(e,t){return e<<t|e>>>32-t}(o(o(t,e),o(i,n)),s),r)}function c(e,t,r,i,s,n,o){return u(t&r|~t&i,e,t,s,n,o)}function p(e,t,r,i,s,n,o){return u(t&i|r&~i,e,t,s,n,o)}function d(e,t,r,i,s,n,o){return u(t^r^i,e,t,s,n,o)}function h(e,t,r,i,s,n,o){return u(r^(t|~i),e,t,s,n,o)}function y(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,s=-1732584194,n=271733878;for(let t=0;t<e.length;t+=16){const a=r,l=i,u=s,y=n;r=c(r,i,s,n,e[t],7,-680876936),n=c(n,r,i,s,e[t+1],12,-389564586),s=c(s,n,r,i,e[t+2],17,606105819),i=c(i,s,n,r,e[t+3],22,-1044525330),r=c(r,i,s,n,e[t+4],7,-176418897),n=c(n,r,i,s,e[t+5],12,1200080426),s=c(s,n,r,i,e[t+6],17,-1473231341),i=c(i,s,n,r,e[t+7],22,-45705983),r=c(r,i,s,n,e[t+8],7,1770035416),n=c(n,r,i,s,e[t+9],12,-1958414417),s=c(s,n,r,i,e[t+10],17,-42063),i=c(i,s,n,r,e[t+11],22,-1990404162),r=c(r,i,s,n,e[t+12],7,1804603682),n=c(n,r,i,s,e[t+13],12,-40341101),s=c(s,n,r,i,e[t+14],17,-1502002290),i=c(i,s,n,r,e[t+15],22,1236535329),r=p(r,i,s,n,e[t+1],5,-165796510),n=p(n,r,i,s,e[t+6],9,-1069501632),s=p(s,n,r,i,e[t+11],14,643717713),i=p(i,s,n,r,e[t],20,-373897302),r=p(r,i,s,n,e[t+5],5,-701558691),n=p(n,r,i,s,e[t+10],9,38016083),s=p(s,n,r,i,e[t+15],14,-660478335),i=p(i,s,n,r,e[t+4],20,-405537848),r=p(r,i,s,n,e[t+9],5,568446438),n=p(n,r,i,s,e[t+14],9,-1019803690),s=p(s,n,r,i,e[t+3],14,-187363961),i=p(i,s,n,r,e[t+8],20,1163531501),r=p(r,i,s,n,e[t+13],5,-1444681467),n=p(n,r,i,s,e[t+2],9,-51403784),s=p(s,n,r,i,e[t+7],14,1735328473),i=p(i,s,n,r,e[t+12],20,-1926607734),r=d(r,i,s,n,e[t+5],4,-378558),n=d(n,r,i,s,e[t+8],11,-2022574463),s=d(s,n,r,i,e[t+11],16,1839030562),i=d(i,s,n,r,e[t+14],23,-35309556),r=d(r,i,s,n,e[t+1],4,-1530992060),n=d(n,r,i,s,e[t+4],11,1272893353),s=d(s,n,r,i,e[t+7],16,-155497632),i=d(i,s,n,r,e[t+10],23,-1094730640),r=d(r,i,s,n,e[t+13],4,681279174),n=d(n,r,i,s,e[t],11,-358537222),s=d(s,n,r,i,e[t+3],16,-722521979),i=d(i,s,n,r,e[t+6],23,76029189),r=d(r,i,s,n,e[t+9],4,-640364487),n=d(n,r,i,s,e[t+12],11,-421815835),s=d(s,n,r,i,e[t+15],16,530742520),i=d(i,s,n,r,e[t+2],23,-995338651),r=h(r,i,s,n,e[t],6,-198630844),n=h(n,r,i,s,e[t+7],10,1126891415),s=h(s,n,r,i,e[t+14],15,-1416354905),i=h(i,s,n,r,e[t+5],21,-57434055),r=h(r,i,s,n,e[t+12],6,1700485571),n=h(n,r,i,s,e[t+3],10,-1894986606),s=h(s,n,r,i,e[t+10],15,-1051523),i=h(i,s,n,r,e[t+1],21,-2054922799),r=h(r,i,s,n,e[t+8],6,1873313359),n=h(n,r,i,s,e[t+15],10,-30611744),s=h(s,n,r,i,e[t+6],15,-1560198380),i=h(i,s,n,r,e[t+13],21,1309151649),r=h(r,i,s,n,e[t+4],6,-145523070),n=h(n,r,i,s,e[t+11],10,-1120210379),s=h(s,n,r,i,e[t+2],15,718787259),i=h(i,s,n,r,e[t+9],21,-343485551),r=o(r,a),i=o(i,l),s=o(s,u),n=o(n,y)}return[r,i,s,n]}function f(e,t=i.Hex){const r=t||i.Base64,n=y(a(e),e.length*s);switch(r){case i.Raw:return n;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,s=4*e.length;i<s;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(n);case i.String:return l(n);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let s=0;s<4;s++)8*r+6*s>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-s)&63))}return t.join("")}(n)}}},85648:(e,t,r)=>{r.d(t,{n:()=>s});var i=r(84952);function s(e){return n[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.Zo)(e);return l[t]||o}(e.url)}(e)]||a}const n={},o="text/plain",a=n[o],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)n[l[e]]=e},87024:(e,t,r)=>{r.d(t,{P:()=>h});var i=r(49186),s=r(80200),n=r(76553),o=r(84952),a=r(13069),l=r(96156),u=r(35666),c=r(10107),p=r(85648),d=r(97159);function h(e){const t=e?.origins??[void 0];return(r,i)=>{const s=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const i=(0,l.z4)(t,r);return{type:String,read:(e,t,r)=>{const s=(0,d.r)(e,t,r);return i.type===String?s:"function"==typeof i.type?new i.type({url:s}):void 0},write:{isRequired:i.json?.write?.isRequired,writer(t,s,a,l){if(!l?.resources)return"string"==typeof t?void(s[a]=(0,d.t)(t,l)):void(s[a]=t.write({},l));const c=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),h=(0,d.t)(c,{...l,verifyItemRelativeUrls:l?.verifyItemRelativeUrls?{writtenUrls:l.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},d.M.NO),m=i.type!==String&&(!(0,n.H)(this)||l?.origin&&this.originIdOf(r)>(0,u.aB)(l.origin)),v={object:this,propertyName:r,value:t,targetUrl:h,dest:s,targetPropertyName:a,context:l,params:e};l?.portalItem&&h&&!(0,o.oP)(h)?m&&e?.contentAddressed?y(v):m?function(e){const{context:t,targetUrl:r,params:i,value:s,dest:n,targetPropertyName:a}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),u=g(s,r,t),c=(0,p.n)(u),d=(0,o.Zo)(l.path),h=i?.compress??!1;c===d?(t.resources&&f({...e,resource:l,content:u,compress:h,updates:t.resources.toUpdate}),n[a]=r):y(e)}(v):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(v):l?.portalItem&&(null==h||null!=(0,d.i)(h)||(0,o.w8)(h)||m)?y(v):s[a]=h}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=d.b;return{read:e,write:t}}}}(e,r,i);for(const e of t){const t=(0,c.rM)(r,e,i);for(const e in s)t[e]=s[e]}}}function y(e){const{targetUrl:t,params:r,value:n,context:l,dest:u,targetPropertyName:c}=e;if(!l.portalItem)return;const h=(0,d.p)(t),y=g(n,t,l);if(r?.contentAddressed&&"json"!==y.type)return void l.messages?.push(new i.A("persistable:contentAddressingUnsupported",`Property "${c}" is trying to serializing a resource with content of type ${y.type} with content addressing. Content addressing is only supported for json resources.`,{content:y}));const m=r?.contentAddressed&&"json"===y.type?(0,s.d)(y.jsonString):h?.filename??(0,a.lk)(),v=(0,o.fj)(r?.prefix??h?.prefix,m),_=`${v}.${(0,p.n)(y)}`;if(r?.contentAddressed&&l.resources&&"json"===y.type){const e=l.resources.toKeep.find(({resource:e})=>e.path===_)??l.resources.toAdd.find(({resource:e})=>e.path===_);if(e)return void(u[c]=e.resource.itemRelativeUrl)}const S=l.portalItem.resourceFromPath(_);(0,o.w8)(t)&&l.resources&&l.resources.pendingOperations.push((0,o.tk)(t).then(e=>{S.path=`${v}.${(0,p.n)({type:"blob",blob:e})}`,u[c]=S.itemRelativeUrl}).catch(()=>{}));const w=r?.compress??!1;l.resources&&f({...e,resource:S,content:y,compress:w,updates:l.resources.toAdd}),u[c]=S.itemRelativeUrl}function f({object:e,propertyName:t,updates:r,resource:i,content:s,compress:n}){r.push({resource:i,content:s,compress:n,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function g(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},92071:(e,t,r)=>{r.d(t,{P:()=>_,L:()=>S});var i=r(90237),s=r(69622),n=r(76953),o=r(4718),a=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[a.Gr.DEFAULTS];r&&r.forEach((e,r)=>{t.set(r,(0,o.o8)(e),a.Gr.DEFAULTS)});for(let r=a.Gr.SERVICE;r<a.AU;r++){const i=this._originStores[r];i&&i.forEach((i,s)=>{e&&e.has(s)||t.set(s,(0,o.o8)(i),r)})}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=a.Gr.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=a.Gr.USER){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r?.get(e),s=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),s!==i}originOf(e){return this._propertyOriginMap.get(e)||a.Gr.DEFAULTS}isAtOrigin(e,t){return this.has(e,t)&&this.originOf(e)===t}isBelowOrigin(e,t){return!this.has(e)||this.originOf(e)<t}forEach(e){this._values.forEach(e)}}var u=r(45917),c=r(88620),p=r(40608);const d=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,c.oY)(this),r=t.store,i=new l;t.store=i,(0,n.k)(t,r,i)}read(e,t){(0,u.L)(this,e,t)}getAtOrigin(e,t){const r=h(this),i=(0,a.aB)(t);if("string"==typeof e)return r.get(e,i);const s={};return e.forEach(e=>{s[e]=r.get(e,i)}),s}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return h(this).originOf(e)}revert(e,t){const r=h(this),i=(0,a.aB)(t),s=(0,c.oY)(this);let n;n="string"==typeof e?"*"===e?r.keys(i):[e]:e,n.forEach(e=>{s.invalidate(e),r.revert(e,i),s.commit(e)})}};return t=(0,i._)([(0,p.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function h(e){return(0,c.oY)(e).store}let y=class extends(d(s.A)){};y=(0,i._)([(0,p.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],y);var f=r(16649),g=r(49422);const m=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){(0,c.oY)(this).clearOrigin(e,(0,a.aB)(t))}write(e,t){return(0,g.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,c.oY)(this).setAtOrigin(e,t,(0,a.aB)(r))}removeOrigin(e){const t=v(this),r=(0,a.aB)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),a.Gr.USER)}updateOrigin(e,t){const r=v(this),i=(0,a.aB)(t),s=(0,f.Jt)(this,e);for(let t=i+1;t<a.AU;++t)r.delete(e,t);r.set(e,s,i)}toJSON(e){return this.write({},e)}};return t=(0,i._)([(0,p.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,c.oY)(e).store}const _=e=>{let t=class extends(m(d(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,p.$)("esri.core.MultiOriginJSONSupport")],t),t};let S=class extends(_(s.A)){};S=(0,i._)([(0,p.$)("esri.core.MultiOriginJSONSupport")],S)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5335,8256],{4146:(e,t,r)=>{r.d(t,{A:()=>_});var i=r(90237),s=r(78888),n=r(49186),o=r(65529),a=r(4902),l=r(92474),u=r(53966),c=r(74887),p=r(84952),d=r(10107),h=(r(44208),r(87811),r(40608)),y=r(5443),f=r(16930),g=r(92602),m=r(64272);let v=0,_=class extends(o.A.EventedMixin(a.A.IdentifiableMixin(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,f.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",s=r?.portal?.url||g.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,c.zf)(e)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,p.An)(this.url)}createLayerView(e,t){return Promise.reject(new n.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,d.MZ)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],_.prototype,"effectiveVisible",null),(0,i._)([(0,d.MZ)({type:y.A})],_.prototype,"fullExtent",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,i._)([(0,d.MZ)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,i._)([(0,d.MZ)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,i._)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,i._)([(0,d.MZ)({clonable:!1})],_.prototype,"parent",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],_.prototype,"persistenceEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,i._)([(0,d.MZ)({type:f.A})],_.prototype,"spatialReference",void 0),(0,i._)([(0,d.MZ)({type:String})],_.prototype,"title",void 0),(0,i._)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,i._)([(0,d.MZ)()],_.prototype,"url",void 0),(0,i._)([(0,d.MZ)({type:m.T})],_.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,i._)([(0,h.$)("esri.layers.Layer")],_)},4902:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(90237),s=r(40608);let n=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,i._)([(0,s.$)("esri.core.Identifiable")],t),t};let a=class extends(o(class{})){};var l;a=(0,i._)([(0,s.$)("esri.core.Identifiable")],a),(l=a||(a={})).IdentifiableMixin=o,l.NumericIdentifiableMixin=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return t=(0,i._)([(0,s.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};const u=a},8303:(e,t,r)=>{r.d(t,{A:()=>b});var i=r(90237),s=r(92602),n=r(70333),o=r(78888),a=r(60999),l=r(49186),u=r(53966),c=r(97768),p=r(74887),d=r(84952),h=r(10107),y=(r(44208),r(87811),r(36005)),f=r(40608),g=r(43937),m=r(77548),v=r(20655),_=r(80812),S=r(41318),w=r(10407);const b=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new _.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,p.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,p.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,p.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!n.id?.findCredential(this.url),s=e===r.id;if(s&&r.portal.user)return this._getUserPrivileges(r,i);let o,a;if(s)o=r.portal.url;else try{o=await(0,m.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!o||!(0,d.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(n.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const l=!0,u=!1,c=!1;if(!a)return{features:{edit:l,fullEdit:u},content:{updateItem:c}};try{if(s?await r.reload():(r=new _.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,p.QP)(e)}return{features:{edit:l,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=A.credential===t?A.user:await this._fetchEditingUser(e);return A.credential=t,A.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=v.A.getDefault();if(s&&s.loaded&&(0,d.S8)(s.restUrl)===(0,d.S8)(i))return s.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?S.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,h.MZ)({type:_.default})],t.prototype,"portalItem",null),(0,i._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,g.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,h.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},A={credential:null,user:null}},13069:(e,t,r)=>{r.d(t,{AG:()=>a,lk:()=>s,vD:()=>o,yS:()=>n});const i="randomUUID"in crypto;function s(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${s().toUpperCase()}}`}function o(){return`{${s()}}`}function a(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},18768:(e,t,r)=>{r.d(t,{b:()=>l});var i=r(90237),s=r(53966),n=r(10107),o=(r(44208),r(87811),r(40608)),a=r(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,i._)([(0,n.MZ)()],t.prototype,"title",null),(0,i._)([(0,n.MZ)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,o.$)("esri.layers.mixins.ArcGISService")],t),t}},25036:(e,t,r)=>{r.d(t,{j:()=>o});var i=r(90237),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,s.MZ)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,n.$)("esri.layers.mixins.ScaleRangeLayer")],t),t}},52136:(e,t,r)=>{r.d(t,{p:()=>o});var i=r(90237),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const o=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,s.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,n.$)("esri.layers.mixins.APIKeyMixin")],t),t}},58325:(e,t,r)=>{r.d(t,{A:()=>_});var i,s=r(90237),n=r(78888),o=r(5503),a=r(25482),l=r(84952),u=r(10107),c=(r(44208),r(53966),r(87811),r(40608)),p=r(4718),d=r(67076),h=r(43937),y=r(87024),f=r(39829),g=r(98988);let m=i=class extends a.A{constructor(e){super(e),this.geometry=null,this.type="clip"}writeGeometry(e,t,r,i){if(i.layer?.spatialReference&&!i.layer.spatialReference.equals(this.geometry.spatialReference)){if(!(0,g.canProjectWithoutEngine)(e.spatialReference,i.layer.spatialReference))return void(i?.messages&&i.messages.push(new d.A("scenemodification:unsupported","Scene modifications with incompatible spatial references are not supported",{modification:this,spatialReference:i.layer.spatialReference,context:i})));const s=new f.A;(0,g.projectPolygon)(e,s,i.layer.spatialReference),t[r]=s.toJSON(i)}else t[r]=e.toJSON(i);delete t[r].spatialReference}clone(){return new i({geometry:(0,p.o8)(this.geometry),type:this.type})}};var v;(0,s._)([(0,u.MZ)({type:f.A}),(0,y.P)()],m.prototype,"geometry",void 0),(0,s._)([(0,h.K)(["web-scene","portal-item"],"geometry")],m.prototype,"writeGeometry",null),(0,s._)([(0,u.MZ)({type:["clip","mask","replace"],nonNullable:!0}),(0,y.P)()],m.prototype,"type",void 0),m=i=(0,s._)([(0,c.$)("esri.layers.support.SceneModification")],m);let _=v=class extends(a.A.JSONSupportMixin(o.A.ofType(m))){constructor(e){super(e),this.url=null}clone(){return new v({url:this.url,items:this.items.map(e=>e.clone())})}toJSON(e){return this.toArray().map(t=>t.toJSON(e)).filter(e=>!!e.geometry)}static fromJSON(e,t){const r=new v;for(const i of e)r.add(m.fromJSON(i,t));return r}static async fromUrl(e,t,r){const i={url:(0,l.An)(e),origin:"service"},s=await(0,n.A)(e,{responseType:"json",signal:r?.signal}),o=t.toJSON(),a=[];for(const e of s.data)a.push(m.fromJSON({...e,geometry:{...e.geometry,spatialReference:o}},i));return new v({url:e,items:a})}};(0,s._)([(0,u.MZ)({type:String})],_.prototype,"url",void 0),_=v=(0,s._)([(0,c.$)("esri.layers.support.SceneModifications")],_)},64272:(e,t,r)=>{r.d(t,{T:()=>d});var i,s=r(90237),n=r(25482),o=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),c=r(43937),p=r(98623);let d=class extends n.A{static{i=this}static get allTime(){return h}static get empty(){return y}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===i&&r===s}expandTo(e,t=p.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.lL)(r,e,t));let s=this.end;if(s){const r=(0,o.lL)(s,e,t);s=s.getTime()===r.getTime()?r:(0,o.S1)(r,1,e,t)}return new i({start:r,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;return s>=t&&s<=r?o=s:t>=s&&t<=n&&(o=t),r>=s&&r<=n?a=r:n>=t&&n<=r&&(a=n),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,r=p.qU){if(this.isEmpty||this.isAllTime)return this.clone();const s=new i,{start:n,end:a}=this;return null!=n&&(s.start=(0,o.S1)(n,e,t,r)),null!=a&&(s.end=(0,o.S1)(a,e,t,r)),s}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,s._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,s._)([(0,l.w)("end")],d.prototype,"readEnd",null),(0,s._)([(0,c.K)("end")],d.prototype,"writeEnd",null),(0,s._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,s._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,s._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,s._)([(0,l.w)("start")],d.prototype,"readStart",null),(0,s._)([(0,c.K)("start")],d.prototype,"writeStart",null),d=i=(0,s._)([(0,u.$)("esri.time.TimeExtent")],d);const h=new d,y=new d({start:void 0,end:void 0})},69208:(e,t,r)=>{r.d(t,{d:()=>o});var i=r(90237),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,n.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},69540:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(90237),s=r(69622),n=(r(44208),r(4718)),o=(r(53966),r(97768)),a=r(35666),l=r(88620),u=r(40608);const c=e=>{let t=class extends e{clone(e){const t=(0,l.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const r=t.metadata,i=t.store,s={},u=new Map;for(const t in r){const o=r[t],l=i?.originOf(t),c=o.clonable;if(o.readOnly||!1===c||l!==a.Gr.USER&&l!==a.Gr.DEFAULTS&&l!==a.Gr.WEB_MAP&&l!==a.Gr.WEB_SCENE)continue;const p=this[t];let d=null;d="function"==typeof c?c(p,e):"reference"===c?p:(0,n.TU)(p,e),null!=p&&null==d||(l===a.Gr.DEFAULTS?u.set(t,d):s[t]=d)}const c=new(0,Object.getPrototypeOf(this).constructor)(s);if(u.size){const e=(0,l.oY)(c)?.store;if(e)for(const[t,r]of u)e.set(t,r,a.Gr.DEFAULTS)}return c}};return t=(0,i._)([(0,u.$)("esri.core.Clonable")],t),t};let p=class extends(c(s.A)){};p=(0,i._)([(0,u.$)("esri.core.Clonable")],p),(p||(p={})).ClonableMixin=c;const d=p},78553:(e,t,r)=>{r.d(t,{D:()=>n,p:()=>s});var i=r(56507);function s(e){const t=(0,i.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function n(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}},80200:(e,t,r)=>{r.d(t,{T:()=>i,d:()=>f});const i={Base64:0,Hex:1,String:2,Raw:3},s=8,n=(1<<s)-1;function o(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function a(e){const t=[];for(let r=0,i=e.length*s;r<i;r+=s)t[r>>5]|=(e.charCodeAt(r/s)&n)<<r%32;return t}function l(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=s)t.push(String.fromCharCode(e[r>>5]>>>r%32&n));return t.join("")}function u(e,t,r,i,s,n){return o(function(e,t){return e<<t|e>>>32-t}(o(o(t,e),o(i,n)),s),r)}function c(e,t,r,i,s,n,o){return u(t&r|~t&i,e,t,s,n,o)}function p(e,t,r,i,s,n,o){return u(t&i|r&~i,e,t,s,n,o)}function d(e,t,r,i,s,n,o){return u(t^r^i,e,t,s,n,o)}function h(e,t,r,i,s,n,o){return u(r^(t|~i),e,t,s,n,o)}function y(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,s=-1732584194,n=271733878;for(let t=0;t<e.length;t+=16){const a=r,l=i,u=s,y=n;r=c(r,i,s,n,e[t],7,-680876936),n=c(n,r,i,s,e[t+1],12,-389564586),s=c(s,n,r,i,e[t+2],17,606105819),i=c(i,s,n,r,e[t+3],22,-1044525330),r=c(r,i,s,n,e[t+4],7,-176418897),n=c(n,r,i,s,e[t+5],12,1200080426),s=c(s,n,r,i,e[t+6],17,-1473231341),i=c(i,s,n,r,e[t+7],22,-45705983),r=c(r,i,s,n,e[t+8],7,1770035416),n=c(n,r,i,s,e[t+9],12,-1958414417),s=c(s,n,r,i,e[t+10],17,-42063),i=c(i,s,n,r,e[t+11],22,-1990404162),r=c(r,i,s,n,e[t+12],7,1804603682),n=c(n,r,i,s,e[t+13],12,-40341101),s=c(s,n,r,i,e[t+14],17,-1502002290),i=c(i,s,n,r,e[t+15],22,1236535329),r=p(r,i,s,n,e[t+1],5,-165796510),n=p(n,r,i,s,e[t+6],9,-1069501632),s=p(s,n,r,i,e[t+11],14,643717713),i=p(i,s,n,r,e[t],20,-373897302),r=p(r,i,s,n,e[t+5],5,-701558691),n=p(n,r,i,s,e[t+10],9,38016083),s=p(s,n,r,i,e[t+15],14,-660478335),i=p(i,s,n,r,e[t+4],20,-405537848),r=p(r,i,s,n,e[t+9],5,568446438),n=p(n,r,i,s,e[t+14],9,-1019803690),s=p(s,n,r,i,e[t+3],14,-187363961),i=p(i,s,n,r,e[t+8],20,1163531501),r=p(r,i,s,n,e[t+13],5,-1444681467),n=p(n,r,i,s,e[t+2],9,-51403784),s=p(s,n,r,i,e[t+7],14,1735328473),i=p(i,s,n,r,e[t+12],20,-1926607734),r=d(r,i,s,n,e[t+5],4,-378558),n=d(n,r,i,s,e[t+8],11,-2022574463),s=d(s,n,r,i,e[t+11],16,1839030562),i=d(i,s,n,r,e[t+14],23,-35309556),r=d(r,i,s,n,e[t+1],4,-1530992060),n=d(n,r,i,s,e[t+4],11,1272893353),s=d(s,n,r,i,e[t+7],16,-155497632),i=d(i,s,n,r,e[t+10],23,-1094730640),r=d(r,i,s,n,e[t+13],4,681279174),n=d(n,r,i,s,e[t],11,-358537222),s=d(s,n,r,i,e[t+3],16,-722521979),i=d(i,s,n,r,e[t+6],23,76029189),r=d(r,i,s,n,e[t+9],4,-640364487),n=d(n,r,i,s,e[t+12],11,-421815835),s=d(s,n,r,i,e[t+15],16,530742520),i=d(i,s,n,r,e[t+2],23,-995338651),r=h(r,i,s,n,e[t],6,-198630844),n=h(n,r,i,s,e[t+7],10,1126891415),s=h(s,n,r,i,e[t+14],15,-1416354905),i=h(i,s,n,r,e[t+5],21,-57434055),r=h(r,i,s,n,e[t+12],6,1700485571),n=h(n,r,i,s,e[t+3],10,-1894986606),s=h(s,n,r,i,e[t+10],15,-1051523),i=h(i,s,n,r,e[t+1],21,-2054922799),r=h(r,i,s,n,e[t+8],6,1873313359),n=h(n,r,i,s,e[t+15],10,-30611744),s=h(s,n,r,i,e[t+6],15,-1560198380),i=h(i,s,n,r,e[t+13],21,1309151649),r=h(r,i,s,n,e[t+4],6,-145523070),n=h(n,r,i,s,e[t+11],10,-1120210379),s=h(s,n,r,i,e[t+2],15,718787259),i=h(i,s,n,r,e[t+9],21,-343485551),r=o(r,a),i=o(i,l),s=o(s,u),n=o(n,y)}return[r,i,s,n]}function f(e,t=i.Hex){const r=t||i.Base64,n=y(a(e),e.length*s);switch(r){case i.Raw:return n;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,s=4*e.length;i<s;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(n);case i.String:return l(n);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let s=0;s<4;s++)8*r+6*s>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-s)&63))}return t.join("")}(n)}}},85648:(e,t,r)=>{r.d(t,{n:()=>s});var i=r(84952);function s(e){return n[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.Zo)(e);return l[t]||o}(e.url)}(e)]||a}const n={},o="text/plain",a=n[o],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)n[l[e]]=e},87024:(e,t,r)=>{r.d(t,{P:()=>h});var i=r(49186),s=r(80200),n=r(76553),o=r(84952),a=r(13069),l=r(96156),u=r(35666),c=r(10107),p=r(85648),d=r(97159);function h(e){const t=e?.origins??[void 0];return(r,i)=>{const s=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const i=(0,l.z4)(t,r);return{type:String,read:(e,t,r)=>{const s=(0,d.r)(e,t,r);return i.type===String?s:"function"==typeof i.type?new i.type({url:s}):void 0},write:{isRequired:i.json?.write?.isRequired,writer(t,s,a,l){if(!l?.resources)return"string"==typeof t?void(s[a]=(0,d.t)(t,l)):void(s[a]=t.write({},l));const c=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),h=(0,d.t)(c,{...l,verifyItemRelativeUrls:l?.verifyItemRelativeUrls?{writtenUrls:l.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},d.M.NO),m=i.type!==String&&(!(0,n.H)(this)||l?.origin&&this.originIdOf(r)>(0,u.aB)(l.origin)),v={object:this,propertyName:r,value:t,targetUrl:h,dest:s,targetPropertyName:a,context:l,params:e};l?.portalItem&&h&&!(0,o.oP)(h)?m&&e?.contentAddressed?y(v):m?function(e){const{context:t,targetUrl:r,params:i,value:s,dest:n,targetPropertyName:a}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),u=g(s,r,t),c=(0,p.n)(u),d=(0,o.Zo)(l.path),h=i?.compress??!1;c===d?(t.resources&&f({...e,resource:l,content:u,compress:h,updates:t.resources.toUpdate}),n[a]=r):y(e)}(v):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(v):l?.portalItem&&(null==h||null!=(0,d.i)(h)||(0,o.w8)(h)||m)?y(v):s[a]=h}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=d.b;return{read:e,write:t}}}}(e,r,i);for(const e of t){const t=(0,c.rM)(r,e,i);for(const e in s)t[e]=s[e]}}}function y(e){const{targetUrl:t,params:r,value:n,context:l,dest:u,targetPropertyName:c}=e;if(!l.portalItem)return;const h=(0,d.p)(t),y=g(n,t,l);if(r?.contentAddressed&&"json"!==y.type)return void l.messages?.push(new i.A("persistable:contentAddressingUnsupported",`Property "${c}" is trying to serializing a resource with content of type ${y.type} with content addressing. Content addressing is only supported for json resources.`,{content:y}));const m=r?.contentAddressed&&"json"===y.type?(0,s.d)(y.jsonString):h?.filename??(0,a.lk)(),v=(0,o.fj)(r?.prefix??h?.prefix,m),_=`${v}.${(0,p.n)(y)}`;if(r?.contentAddressed&&l.resources&&"json"===y.type){const e=l.resources.toKeep.find(({resource:e})=>e.path===_)??l.resources.toAdd.find(({resource:e})=>e.path===_);if(e)return void(u[c]=e.resource.itemRelativeUrl)}const S=l.portalItem.resourceFromPath(_);(0,o.w8)(t)&&l.resources&&l.resources.pendingOperations.push((0,o.tk)(t).then(e=>{S.path=`${v}.${(0,p.n)({type:"blob",blob:e})}`,u[c]=S.itemRelativeUrl}).catch(()=>{}));const w=r?.compress??!1;l.resources&&f({...e,resource:S,content:y,compress:w,updates:l.resources.toAdd}),u[c]=S.itemRelativeUrl}function f({object:e,propertyName:t,updates:r,resource:i,content:s,compress:n}){r.push({resource:i,content:s,compress:n,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function g(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},92071:(e,t,r)=>{r.d(t,{P:()=>_,L:()=>S});var i=r(90237),s=r(69622),n=r(76953),o=r(4718),a=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[a.Gr.DEFAULTS];r&&r.forEach((e,r)=>{t.set(r,(0,o.o8)(e),a.Gr.DEFAULTS)});for(let r=a.Gr.SERVICE;r<a.AU;r++){const i=this._originStores[r];i&&i.forEach((i,s)=>{e&&e.has(s)||t.set(s,(0,o.o8)(i),r)})}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=a.Gr.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=a.Gr.USER){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r?.get(e),s=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),s!==i}originOf(e){return this._propertyOriginMap.get(e)||a.Gr.DEFAULTS}isAtOrigin(e,t){return this.has(e,t)&&this.originOf(e)===t}isBelowOrigin(e,t){return!this.has(e)||this.originOf(e)<t}forEach(e){this._values.forEach(e)}}var u=r(45917),c=r(88620),p=r(40608);const d=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,c.oY)(this),r=t.store,i=new l;t.store=i,(0,n.k)(t,r,i)}read(e,t){(0,u.L)(this,e,t)}getAtOrigin(e,t){const r=h(this),i=(0,a.aB)(t);if("string"==typeof e)return r.get(e,i);const s={};return e.forEach(e=>{s[e]=r.get(e,i)}),s}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return h(this).originOf(e)}revert(e,t){const r=h(this),i=(0,a.aB)(t),s=(0,c.oY)(this);let n;n="string"==typeof e?"*"===e?r.keys(i):[e]:e,n.forEach(e=>{s.invalidate(e),r.revert(e,i),s.commit(e)})}};return t=(0,i._)([(0,p.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function h(e){return(0,c.oY)(e).store}let y=class extends(d(s.A)){};y=(0,i._)([(0,p.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],y);var f=r(16649),g=r(49422);const m=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){(0,c.oY)(this).clearOrigin(e,(0,a.aB)(t))}write(e,t){return(0,g.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,c.oY)(this).setAtOrigin(e,t,(0,a.aB)(r))}removeOrigin(e){const t=v(this),r=(0,a.aB)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),a.Gr.USER)}updateOrigin(e,t){const r=v(this),i=(0,a.aB)(t),s=(0,f.Jt)(this,e);for(let t=i+1;t<a.AU;++t)r.delete(e,t);r.set(e,s,i)}toJSON(e){return this.write({},e)}};return t=(0,i._)([(0,p.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,c.oY)(e).store}const _=e=>{let t=class extends(m(d(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,p.$)("esri.core.MultiOriginJSONSupport")],t),t};let S=class extends(_(s.A)){};S=(0,i._)([(0,p.$)("esri.core.MultiOriginJSONSupport")],S)}}]);