@arcgis/core 4.33.0-next.20250212 → 4.33.0-next.20250213
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.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/15ad8036736a32652c9b.js +1 -0
- package/assets/esri/core/workers/chunks/211c32244e05164dcd38.js +314 -0
- package/assets/esri/core/workers/chunks/219b06cca6aa1e041f40.js +1 -0
- package/assets/esri/core/workers/chunks/282c2d52011b331d4704.js +1 -0
- package/assets/esri/core/workers/chunks/2dc35c1c5d83174a2c06.js +1 -0
- package/assets/esri/core/workers/chunks/{e4651d577d297386268e.js → 32035bc69ee18b19623d.js} +1 -1
- package/assets/esri/core/workers/chunks/39c595734a9e9cd67e41.js +1 -0
- package/assets/esri/core/workers/chunks/544ad8fa4777ba8ec177.js +1 -0
- package/assets/esri/core/workers/chunks/6c64ccf5f64b5025b239.js +1 -0
- package/assets/esri/core/workers/chunks/89960be0e525d42ccffe.js +1 -0
- package/assets/esri/core/workers/chunks/9be12d0df67e2c4c3787.js +1 -0
- package/assets/esri/core/workers/chunks/a80c3ada9e09b8832e9b.js +1 -0
- package/assets/esri/core/workers/chunks/a8457210711b663059f0.js +1 -0
- package/assets/esri/core/workers/chunks/cbba0b6bd41d16eacb5c.js +1 -0
- package/assets/esri/core/workers/chunks/ea4c7560e64335f155f9.js +1 -0
- package/assets/esri/core/workers/chunks/eac791e3a0bb056a28f3.js +1 -0
- package/assets/esri/core/workers/chunks/{08980b1ad3d5d67c6390.js → f419aaf3bab086060894.js} +1 -1
- package/chunks/ComponentShader.glsl.js +6 -6
- package/core/libs/gl-matrix-2/factories/mat2df32.js +1 -1
- package/core/libs/gl-matrix-2/factories/mat2df64.js +1 -1
- package/core/libs/gl-matrix-2/factories/mat2f32.js +1 -1
- package/core/libs/gl-matrix-2/factories/mat2f64.js +1 -1
- package/core/libs/gl-matrix-2/factories/mat3f32.js +1 -1
- package/core/libs/gl-matrix-2/factories/mat3f64.js +1 -1
- package/core/libs/gl-matrix-2/factories/mat4f32.js +1 -1
- package/core/libs/gl-matrix-2/factories/mat4f64.js +1 -1
- package/core/libs/gl-matrix-2/factories/quat2f64.js +1 -1
- package/core/libs/gl-matrix-2/factories/vec2f32.js +1 -1
- package/core/libs/gl-matrix-2/factories/vec2f64.js +1 -1
- package/core/libs/gl-matrix-2/factories/vec3f32.js +1 -1
- package/core/libs/gl-matrix-2/factories/vec3f64.js +1 -1
- package/core/libs/gl-matrix-2/factories/vec4f32.js +1 -1
- package/core/libs/gl-matrix-2/factories/vec4f64.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/3d/analysis/DirectLineMeasurement/DirectLineMeasurementVisualization.js +1 -1
- package/views/3d/environment/EnvironmentManager.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/webgl-engine/lib/AnimationTimer.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
- package/views/SceneView.js +1 -1
- package/assets/esri/core/workers/chunks/3ba85f1d660b8887f963.js +0 -314
- package/assets/esri/core/workers/chunks/3c8e5b5fb52611e30ed6.js +0 -1
- package/assets/esri/core/workers/chunks/5eceedac9b2b4d1ef133.js +0 -1
- package/assets/esri/core/workers/chunks/74e0116ae84def626c87.js +0 -1
- package/assets/esri/core/workers/chunks/7e3b374f906441cd7fb0.js +0 -1
- package/assets/esri/core/workers/chunks/84c1c3336011a1b79669.js +0 -1
- package/assets/esri/core/workers/chunks/9e7895e8201127ffe0a8.js +0 -1
- package/assets/esri/core/workers/chunks/a5e9ea13e844a62b2a7f.js +0 -1
- package/assets/esri/core/workers/chunks/a6ec3665bde2af8a96e6.js +0 -1
- package/assets/esri/core/workers/chunks/bf0bf2b912d668575a9b.js +0 -1
- package/assets/esri/core/workers/chunks/d7b260d6187f29e0c136.js +0 -1
- package/assets/esri/core/workers/chunks/debfb75a94b66b58cbbc.js +0 -1
- package/assets/esri/core/workers/chunks/e490f70f192780d7ad50.js +0 -1
- package/assets/esri/core/workers/chunks/e71b780d1e6a32f303b7.js +0 -1
- package/assets/esri/core/workers/chunks/f285ed5425b31123d2bc.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2015],{87317:(e,t,s)=>{s.d(t,{a:()=>_,b:()=>c,c:()=>r,d:()=>f,e:()=>I,f:()=>y,g:()=>a,h:()=>x,j:()=>d,l:()=>p,n:()=>g,s:()=>i,t:()=>m});var n=s(34304);function r(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function i(e,t,s,n,r){return e[0]=t,e[1]=s,e[2]=n,e[3]=r,e}function a(e,t,s){return e[0]=t[0]+s[0],e[1]=t[1]+s[1],e[2]=t[2]+s[2],e[3]=t[3]+s[3],e}function o(e,t,s){return e[0]=t[0]-s[0],e[1]=t[1]-s[1],e[2]=t[2]-s[2],e[3]=t[3]-s[3],e}function l(e,t,s){return e[0]=t[0]*s[0],e[1]=t[1]*s[1],e[2]=t[2]*s[2],e[3]=t[3]*s[3],e}function h(e,t,s){return e[0]=t[0]/s[0],e[1]=t[1]/s[1],e[2]=t[2]/s[2],e[3]=t[3]/s[3],e}function c(e,t,s){return e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s,e[3]=t[3]*s,e}function u(e,t){const s=t[0]-e[0],n=t[1]-e[1],r=t[2]-e[2],i=t[3]-e[3];return Math.sqrt(s*s+n*n+r*r+i*i)}function f(e,t){const s=t[0]-e[0],n=t[1]-e[1],r=t[2]-e[2],i=t[3]-e[3];return s*s+n*n+r*r+i*i}function d(e){const t=e[0],s=e[1],n=e[2],r=e[3];return Math.sqrt(t*t+s*s+n*n+r*r)}function y(e){const t=e[0],s=e[1],n=e[2],r=e[3];return t*t+s*s+n*n+r*r}function g(e,t){const s=t[0],n=t[1],r=t[2],i=t[3];let a=s*s+n*n+r*r+i*i;return a>0&&(a=1/Math.sqrt(a),e[0]=s*a,e[1]=n*a,e[2]=r*a,e[3]=i*a),e}function x(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function p(e,t,s,n){const r=t[0],i=t[1],a=t[2],o=t[3];return e[0]=r+n*(s[0]-r),e[1]=i+n*(s[1]-i),e[2]=a+n*(s[2]-a),e[3]=o+n*(s[3]-o),e}function m(e,t,s){const n=t[0],r=t[1],i=t[2],a=t[3];return e[0]=s[0]*n+s[4]*r+s[8]*i+s[12]*a,e[1]=s[1]*n+s[5]*r+s[9]*i+s[13]*a,e[2]=s[2]*n+s[6]*r+s[10]*i+s[14]*a,e[3]=s[3]*n+s[7]*r+s[11]*i+s[15]*a,e}function _(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function I(e,t){const s=e[0],r=e[1],i=e[2],a=e[3],o=t[0],l=t[1],h=t[2],c=t[3],u=(0,n.FD)();return Math.abs(s-o)<=u*Math.max(1,Math.abs(s),Math.abs(o))&&Math.abs(r-l)<=u*Math.max(1,Math.abs(r),Math.abs(l))&&Math.abs(i-h)<=u*Math.max(1,Math.abs(i),Math.abs(h))&&Math.abs(a-c)<=u*Math.max(1,Math.abs(a),Math.abs(c))}const b=o,M=l,w=h,P=u,T=f,A=d,D=y;Object.freeze(Object.defineProperty({__proto__:null,add:a,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:r,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:P,distance:u,div:w,divide:h,dot:x,equals:I,exactEquals:_,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:A,length:d,lerp:p,max:function(e,t,s){return e[0]=Math.max(t[0],s[0]),e[1]=Math.max(t[1],s[1]),e[2]=Math.max(t[2],s[2]),e[3]=Math.max(t[3],s[3]),e},min:function(e,t,s){return e[0]=Math.min(t[0],s[0]),e[1]=Math.min(t[1],s[1]),e[2]=Math.min(t[2],s[2]),e[3]=Math.min(t[3],s[3]),e},mul:M,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:g,random:function(e,t=1){const s=n.Ov;let r,i,a,o,l,h;do{r=2*s()-1,i=2*s()-1,l=r*r+i*i}while(l>=1);do{a=2*s()-1,o=2*s()-1,h=a*a+o*o}while(h>=1);const c=Math.sqrt((1-l)/h);return e[0]=t*r,e[1]=t*i,e[2]=t*a*c,e[3]=t*o*c,e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e},scale:c,scaleAndAdd:function(e,t,s,n){return e[0]=t[0]+s[0]*n,e[1]=t[1]+s[1]*n,e[2]=t[2]+s[2]*n,e[3]=t[3]+s[3]*n,e},set:i,sqrDist:T,sqrLen:D,squaredDistance:f,squaredLength:y,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:b,subtract:o,transformMat4:m,transformQuat:function(e,t,s){const n=t[0],r=t[1],i=t[2],a=s[0],o=s[1],l=s[2],h=s[3],c=h*n+o*i-l*r,u=h*r+l*n-a*i,f=h*i+a*r-o*n,d=-a*n-o*r-l*i;return e[0]=c*h+d*-a+u*-l-f*-o,e[1]=u*h+d*-o+f*-a-c*-l,e[2]=f*h+d*-l+c*-o-u*-a,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},40876:(e,t,s)=>{s.d(t,{TS:()=>i,Tf:()=>c,V6:()=>r,c4:()=>a,qh:()=>h,z$:()=>l});const n={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function r(e){return!!n[e]||!!n[e.toLowerCase()]}function i(e){return n[e]??n[e.toLowerCase()]}function a(e){return[...i(e)]}function o(e,t,s){s<0&&++s,s>1&&--s;const n=6*s;return n<1?e+(t-e)*n:2*s<1?t:3*s<2?e+(t-e)*(2/3-s)*6:e}function l(e,t,s,n=1){const r=(e%360+360)%360/360,i=s<=.5?s*(t+1):s+t-s*t,a=2*s-i;return[Math.round(255*o(a,i,r+1/3)),Math.round(255*o(a,i,r)),Math.round(255*o(a,i,r-1/3)),n]}function h(e){const t=e.length>5,s=t?8:4,n=(1<<s)-1,r=t?1:17,i=t?9===e.length:5===e.length;let a=Number("0x"+e.slice(1));if(isNaN(a))return null;const o=[0,0,0,1];let l;return i&&(l=a&n,a>>=s,o[3]=r*l/255),l=a&n,a>>=s,o[2]=r*l,l=a&n,a>>=s,o[1]=r*l,l=a&n,a>>=s,o[0]=r*l,o}const c=2.2},91829:(e,t,s)=>{function n(){return[0,0,0,0]}function r(e,t,s,n){return[e,t,s,n]}function i(e,t,s,n){return[e,t,s,n]}function a(e,t=[0,0,0,0]){const s=Math.min(4,e.length);for(let n=0;n<s;++n)t[n]=e[n];return t}function o(){return r(1,1,1,1)}function l(){return r(1,0,0,0)}function h(){return r(0,1,0,0)}function c(){return r(0,0,1,0)}function u(){return r(0,0,0,1)}s.d(t,{CN:()=>i,Un:()=>d,ci:()=>a,fA:()=>r,uY:()=>f,vt:()=>n});const f=[0,0,0,0],d=o(),y=l(),g=h(),x=c(),p=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_W:p,UNIT_X:y,UNIT_Y:g,UNIT_Z:x,ZEROS:f,clone:function(e){return[e[0],e[1],e[2],e[3]]},create:n,createView:function(e,t){return new Float64Array(e,t,4)},freeze:i,fromArray:a,fromValues:r,ones:o,unitW:u,unitX:l,unitY:h,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},34304:(e,t,s)=>{s.d(t,{DF:()=>l,FD:()=>r,Ov:()=>i,ct:()=>h});let n=1e-6;function r(){return n}const i=Math.random,a=Math.PI/180,o=180/Math.PI;function l(e){return e*a}function h(e){return e*o}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:i,equals:function(e,t){return Math.abs(e-t)<=n*Math.max(1,Math.abs(e),Math.abs(t))},getEpsilon:r,setEpsilon:function(e){n=e},toDegree:h,toRadian:l},Symbol.toStringTag,{value:"Module"}))},69397:(e,t,s)=>{s.d(t,{Qf:()=>l,Qh:()=>a,RS:()=>r,ez:()=>u,i5:()=>f,lM:()=>i,qK:()=>c});var n=s(34275);const r=16;function i(e){if(!e)return 0;let t=c;for(const s in e)e.hasOwnProperty(s)&&(t+=o(e[s],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return h(e,8);let s=u;for(let n=0;n<t;n++)s+=o(e[n]);return s}(e);let t=c;for(const s in e)e.hasOwnProperty(s)&&(t+=o(e[s]));return t}function o(e,t=!0){switch(typeof e){case"object":return t?a(e):c;case"string":return function(e){return 32+e.length}(e);case"number":return r;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce(((e,t)=>e+(t?(0,n.iu)(t)?t.byteLength+f:Array.isArray(t)?h(t,r):0:0)),0)}function h(e,t){return u+e.length*t}const c=32,u=16,f=145},11764:(e,t,s)=>{s.r(t),s.d(t,{default:()=>X});var n=s(74887),r=s(89640),i=s(6774),a=s(13195);function o(e){return 746===e||747===e||!(e<4352)&&(e>=12704&&e<=12735||e>=12544&&e<=12591||e>=65072&&e<=65103&&!(e>=65097&&e<=65103)||e>=63744&&e<=64255||e>=13056&&e<=13311||e>=11904&&e<=12031||e>=12736&&e<=12783||e>=12288&&e<=12351&&!(e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||e>=13312&&e<=19903||e>=19968&&e<=40959||e>=12800&&e<=13055||e>=12592&&e<=12687||e>=43360&&e<=43391||e>=55216&&e<=55295||e>=4352&&e<=4607||e>=44032&&e<=55215||e>=12352&&e<=12447||e>=12272&&e<=12287||e>=12688&&e<=12703||e>=12032&&e<=12255||e>=12784&&e<=12799||e>=12448&&e<=12543&&12540!==e||e>=65280&&e<=65519&&!(65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||e>=65104&&e<=65135&&!(e>=65112&&e<=65118||e>=65123&&e<=65126)||e>=5120&&e<=5759||e>=6320&&e<=6399||e>=65040&&e<=65055||e>=19904&&e<=19967||e>=40960&&e<=42127||e>=42128&&e<=42191)}function l(e){return!(e<11904)&&(e>=12704&&e<=12735||e>=12544&&e<=12591||e>=65072&&e<=65103||e>=63744&&e<=64255||e>=13056&&e<=13311||e>=11904&&e<=12031||e>=12736&&e<=12783||e>=12288&&e<=12351||e>=13312&&e<=19903||e>=19968&&e<=40959||e>=12800&&e<=13055||e>=65280&&e<=65519||e>=12352&&e<=12447||e>=12272&&e<=12287||e>=12032&&e<=12255||e>=12784&&e<=12799||e>=12448&&e<=12543||e>=65040&&e<=65055||e>=42128&&e<=42191||e>=40960&&e<=42127)}function h(e){switch(e){case 10:case 32:case 38:case 40:case 41:case 43:case 45:case 47:case 173:case 183:case 8203:case 8208:case 8211:case 8231:return!0}return!1}function c(e){switch(e){case 9:case 10:case 11:case 12:case 13:case 32:return!0}return!1}var u=s(18989);const f=24;class d{constructor(e,t,s,n,r,i,a){this._glyphItems=e,this._maxWidth=t,this._lineHeight=s,this._letterSpacing=n,this._hAnchor=r,this._vAnchor=i,this._justify=a}getShaping(e,t,s){const n=this._letterSpacing,r=this._lineHeight,i=this._justify,a=this._maxWidth,u=[];let f=0,d=0;for(const t of e){const e=t.codePointAt(0);if(null==e)continue;const r=s&&o(e);let i;for(const t of this._glyphItems)if(i=t[e],i)break;u.push({codePoint:e,x:f,y:d,vertical:r,glyphMosaicItem:i}),i&&(f+=i.metrics.advance+n)}let y=f;a>0&&(y=f/Math.max(1,Math.ceil(f/a)));const g=e.includes(""),x=[],p=u.length;for(let e=0;e<p-1;e++){const t=u[e].codePoint,s=l(t);if(h(t)||s){let n=0;if(10===t)n-=1e4;else if(s&&g)n+=150;else{40!==t&&65288!==t||(n+=50);const s=u[e+1].codePoint;41!==s&&65289!==s||(n+=50)}x.push(this._buildBreak(e+1,u[e].x,y,x,n,!1))}}const m=this._optimalBreaks(this._buildBreak(p,f,y,x,0,!0));let _=0;const I=t?-r:r;let b=0;for(let e=0;e<m.length;e++){const t=m[e];let s=b;for(;s<t&&c(u[s].codePoint);)u[s].glyphMosaicItem=null,++s;let n=t-1;for(;n>s&&c(u[n].codePoint);)u[n].glyphMosaicItem=null,--n;if(s<=n){const e=u[s].x;for(let t=s;t<=n;t++)u[t].x-=e,u[t].y=d;let t=u[n].x;u[n].glyphMosaicItem&&(t+=u[n].glyphMosaicItem.metrics.advance),_=Math.max(t,_),i&&this._applyJustification(u,s,n)}b=t,d+=I}if(u.length>0){const e=m.length-1,s=(i-this._hAnchor)*_;let n=(-this._vAnchor*(e+1)+.5)*r;t&&e&&(n+=e*r);for(const e of u)e.x+=s,e.y+=n}return u.filter((e=>e.glyphMosaicItem))}static getTextBox(e,t){if(!e.length)return null;let s=1/0,n=1/0,r=0,i=0;for(const a of e){const e=a.glyphMosaicItem.metrics.advance,o=a.x,l=a.y-17,h=o+e,c=l+t;s=Math.min(s,o),r=Math.max(r,h),n=Math.min(n,l),i=Math.max(i,c)}return{x:s,y:n,width:r-s,height:i-n}}static getBox(e){if(!e.length)return null;let t=1/0,s=1/0,n=0,r=0;for(const i of e){const{height:e,left:a,top:o,width:l}=i.glyphMosaicItem.metrics,h=i.x,c=i.y-(e-Math.abs(o)),u=h+l+a,f=c+e;t=Math.min(t,h),n=Math.max(n,u),s=Math.min(s,c),r=Math.max(r,f)}return{x:t,y:s,width:n-t,height:r-s}}static addDecoration(e,t){const s=e.length;if(0===s)return;let n=e[0].x+e[0].glyphMosaicItem.metrics.left,r=e[0].y;for(let i=1;i<s;i++){const s=e[i];if(s.y!==r){const a=e[i-1].x+e[i-1].glyphMosaicItem.metrics.left+e[i-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:n,y:r+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new u.A(4,0,4,8),metrics:{width:a-n,height:8,left:0,top:0,advance:0},page:0,code:0}}),r=s.y,n=s.x+s.glyphMosaicItem.metrics.left}}const i=e[s-1].x+e[s-1].glyphMosaicItem.metrics.left+e[s-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:n,y:r+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new u.A(4,0,4,8),metrics:{width:i-n,height:8,left:0,top:0,advance:0},page:0,code:0}})}_breakScore(e,t,s,n){const r=(e-t)*(e-t);return n?e<t?r/2:2*r:r+Math.abs(s)*s}_buildBreak(e,t,s,n,r,i){let a=null,o=this._breakScore(t,s,r,i);for(const e of n){const n=t-e.x,l=this._breakScore(n,s,r,i)+e.score;l<=o&&(a=e,o=l)}return{index:e,x:t,score:o,previousBreak:a}}_optimalBreaks(e){return e?this._optimalBreaks(e.previousBreak).concat(e.index):[]}_applyJustification(e,t,s){const n=e[s],r=n.vertical?f:n.glyphMosaicItem?n.glyphMosaicItem.metrics.advance:0,i=(n.x+r)*this._justify;for(let n=t;n<=s;n++)e[n].x-=i}}var y=s(4272);const g=.5;class x{constructor(e,t,s=0,n=-1,r=g){this.x=e,this.y=t,this.angle=s,this.segment=n,this.minzoom=r}}class p{constructor(e,t,s,n,r,i=g,o=a.MG){this.anchor=e,this.labelAngle=t,this.glyphAngle=s,this.page=n,this.alternateVerticalGlyph=r,this.minzoom=i,this.maxzoom=o}}class m{constructor(e,t,s,n,r,i,a,o,l,h,c,u){this.tl=e,this.tr=t,this.bl=s,this.br=n,this.mosaicRect=r,this.labelAngle=i,this.minAngle=a,this.maxAngle=o,this.anchor=l,this.minzoom=h,this.maxzoom=c,this.page=u}}class _{constructor(e){this.shapes=e}}class I{getIconPlacement(e,t,s){const n=new i.bR(e.x,e.y),r=s.rotationAlignment===y.I5.MAP,o=s.keepUpright;let l=s.rotate*a.os;r&&(l+=e.angle);const h=new _([]);return s.allowOverlap&&s.ignorePlacement||(h.iconColliders=[]),this._addIconPlacement(h,n,t,s,l),r&&o&&this._addIconPlacement(h,n,t,s,l+a.Jo),h}_addIconPlacement(e,t,s,n,r){const o=s.rasterizationScale,l=s.width/o,h=s.height/o,c=n.offset;let u=c[0],f=c[1];switch(n.anchor){case y.KI.CENTER:u-=l/2,f-=h/2;break;case y.KI.LEFT:f-=h/2;break;case y.KI.RIGHT:u-=l,f-=h/2;break;case y.KI.TOP:u-=l/2;break;case y.KI.BOTTOM:u-=l/2,f-=h;break;case y.KI.TOP_LEFT:break;case y.KI.BOTTOM_LEFT:f-=h;break;case y.KI.TOP_RIGHT:u-=l;break;case y.KI.BOTTOM_RIGHT:u-=l,f-=h}const d=s.rect,x=2/o,p=u-x,_=f-x,I=p+d.width/o,b=_+d.height/o,M=new i.bR(p,_),w=new i.bR(I,b),P=new i.bR(p,b),T=new i.bR(I,_);if(0!==r){const e=Math.cos(r),t=Math.sin(r);M.rotate(e,t),w.rotate(e,t),P.rotate(e,t),T.rotate(e,t)}const A=new m(M,T,P,w,d,r,0,256,t,g,a.MG,0);if(e.shapes.push(A),!n.allowOverlap||!n.ignorePlacement){const s=n.size,i=n.padding,o={xTile:t.x,yTile:t.y,dxPixels:u*s-i,dyPixels:f*s-i,hard:!n.optional,partIndex:0,width:l*s+2*i,height:h*s+2*i,angle:r,minLod:g,maxLod:a.MG};e.iconColliders.push(o)}}getTextPlacement(e,t,s,n){const r=new i.bR(e.x,e.y),o=n.rotate*a.os,l=n.rotationAlignment===y.I5.MAP,h=n.keepUpright,c=n.padding;let u=g;const x=l?e.angle:0,I=e.segment>=0&&l,b=n.allowOverlap&&n.ignorePlacement?null:[],M=[],w=!I;let P=Number.POSITIVE_INFINITY,T=Number.NEGATIVE_INFINITY,A=P,D=T;const k=(I||l)&&h,L=n.size/f;let B=!1;for(const e of t)if(e.vertical){B=!0;break}let V,v=0,R=0;if(!I&&B){const e=d.getTextBox(t,n.lineHeight*f);switch(n.anchor){case y.KI.LEFT:v=e.height/2,R=-e.width/2;break;case y.KI.RIGHT:v=-e.height/2,R=e.width/2;break;case y.KI.TOP:v=e.height/2,R=e.width/2;break;case y.KI.BOTTOM:v=-e.height/2,R=-e.width/2;break;case y.KI.TOP_LEFT:v=e.height;break;case y.KI.BOTTOM_LEFT:R=-e.width;break;case y.KI.TOP_RIGHT:R=e.width;break;case y.KI.BOTTOM_RIGHT:v=-e.height}}v+=n.offset[0]*f,R+=n.offset[1]*f;for(const f of t){const t=f.glyphMosaicItem;if(!t||t.rect.isEmpty)continue;const d=t.rect,y=t.metrics,_=t.page;if(b&&w){if(void 0!==V&&V!==f.y){let t,s,r,i;B?(t=-D+v,s=P+R,r=D-A,i=T-P):(t=P+v,s=A+R,r=T-P,i=D-A);const l={xTile:e.x,yTile:e.y,dxPixels:t*L-c,dyPixels:s*L-c,hard:!n.optional,partIndex:1,width:r*L+2*c,height:i*L+2*c,angle:o,minLod:g,maxLod:a.MG};b.push(l),P=Number.POSITIVE_INFINITY,T=Number.NEGATIVE_INFINITY,A=P,D=T}V=f.y}const S=[];if(I){const n=.5*t.metrics.width,r=(f.x+y.left-4+n)*L*8;if(u=this._placeGlyph(e,u,r,s,e.segment,1,f.vertical,_,S),h&&(u=this._placeGlyph(e,u,r,s,e.segment,-1,f.vertical,_,S)),u>=2)break}else S.push(new p(r,x,x,_,!1)),l&&h&&S.push(new p(r,x+a.Jo,x+a.Jo,_,!1));const C=f.x+y.left,O=f.y-17-y.top,E=C+y.width,F=O+y.height;let z,N,U,G,K,q,H,W;if(!I&&B)if(f.vertical){const e=(C+E)/2-y.height/2,t=(O+F)/2+y.width/2;z=new i.bR(-t-4+v,e-4+R),N=new i.bR(z.x+d.width,z.y+d.height),U=new i.bR(z.x,N.y),G=new i.bR(N.x,z.y)}else z=new i.bR(4-O+v,C-4+R),N=new i.bR(z.x-d.height,z.y+d.width),U=new i.bR(N.x,z.y),G=new i.bR(z.x,N.y);else z=new i.bR(C-4+v,O-4+R),N=new i.bR(z.x+d.width,z.y+d.height),U=new i.bR(z.x,N.y),G=new i.bR(N.x,z.y);for(const t of S){let s,r,a,l;if(t.alternateVerticalGlyph){if(!K){const e=(O+F)/2+R;K=new i.bR((C+E)/2+v-y.height/2-4,e+y.width/2+4),q=new i.bR(K.x+d.height,K.y-d.width),H=new i.bR(q.x,K.y),W=new i.bR(K.x,q.y)}s=K,r=H,a=W,l=q}else s=z,r=U,a=G,l=N;const h=O,u=F,g=t.glyphAngle+o;if(0!==g){const e=Math.cos(g),t=Math.sin(g);s=s.clone(),r=r?.clone(),a=a?.clone(),l=l?.clone(),s.rotate(e,t),l?.rotate(e,t),r?.rotate(e,t),a?.rotate(e,t)}let x=0,p=256;if(I&&B?f.vertical?t.alternateVerticalGlyph?(x=32,p=96):(x=224,p=32):(x=224,p=96):(x=192,p=64),M.push(new m(s,a,r,l,d,t.labelAngle,x,p,t.anchor,t.minzoom,t.maxzoom,t.page)),b&&(!k||this._legible(t.labelAngle)))if(w)C<P&&(P=C),h<A&&(A=h),E>T&&(T=E),u>D&&(D=u);else if(t.minzoom<2){const s={xTile:e.x,yTile:e.y,dxPixels:(C+v)*L-c,dyPixels:(h+v)*L-c,hard:!n.optional,partIndex:1,width:(E-C)*L+2*c,height:(u-h)*L+2*c,angle:g,minLod:t.minzoom,maxLod:t.maxzoom};b.push(s)}}}if(u>=2)return null;if(b&&w){let t,s,r,i;B?(t=-D+v,s=P+R,r=D-A,i=T-P):(t=P+v,s=A+R,r=T-P,i=D-A);const l={xTile:e.x,yTile:e.y,dxPixels:t*L-c,dyPixels:s*L-c,hard:!n.optional,partIndex:1,width:r*L+2*c,height:i*L+2*c,angle:o,minLod:g,maxLod:a.MG};b.push(l)}const S=new _(M);return b&&b.length>0&&(S.textColliders=b),S}_legible(e){const t=(0,a.z0)(e);return t<65||t>=193}_placeGlyph(e,t,s,n,r,o,l,h,c){let u=o;const f=u<0?(0,a.Wh)(e.angle+a.Jo,a.pJ):e.angle;let d=0;s<0&&(u*=-1,s*=-1,d=a.Jo),u>0&&++r;let y=new i.bR(e.x,e.y),g=n[r],x=a.MG;if(n.length<=r)return x;for(;;){const e=g.x-y.x,i=g.y-y.y,o=Math.sqrt(e*e+i*i),m=Math.max(s/o,t),_=e/o,I=i/o,b=(0,a.Wh)(Math.atan2(I,_)+d,a.pJ);if(c.push(new p(y,f,b,h,!1,m,x)),l&&c.push(new p(y,f,b,h,!0,m,x)),m<=t)return m;y=g.clone();do{if(r+=u,n.length<=r||r<0)return m;g=n[r]}while(y.isEqual(g));let M=g.x-y.x,w=g.y-y.y;const P=Math.sqrt(M*M+w*w);M*=o/P,w*=o/P,y.x-=M,y.y-=w,x=m}}}var b,M,w=s(51624),P=s(15585);(M=b||(b={}))[M.moveTo=1]="moveTo",M[M.lineTo=2]="lineTo",M[M.close=7]="close";class T{constructor(e,t,s=0){this.values={},this._geometry=void 0,this._pbfGeometry=null,this.featureIndex=s;const n=t.keys,r=t.values,i=e.asUnsafe();for(;i.next();)switch(i.tag()){case 1:this.id=i.getUInt64();break;case 2:{const e=i.getMessage().asUnsafe(),t=this.values;for(;!e.empty();){const s=e.getUInt32(),i=e.getUInt32();t[n[s]]=r[i]}e.release();break}case 3:this.type=i.getUInt32();break;case 4:this._pbfGeometry=i.getMessage();break;default:i.skip()}}getGeometry(e){if(void 0!==this._geometry)return this._geometry;if(!this._pbfGeometry)return null;const t=this._pbfGeometry.asUnsafe();let s,n;this._pbfGeometry=null,e?e.reset(this.type):s=[];let r,a=b.moveTo,o=0,l=0,h=0;for(;!t.empty();){if(0===o){const e=t.getUInt32();a=7&e,o=e>>3}switch(o--,a){case b.moveTo:l+=t.getSInt32(),h+=t.getSInt32(),e?e.moveTo(l,h):s&&(n&&s.push(n),n=[],n.push(new i.bR(l,h)));break;case b.lineTo:l+=t.getSInt32(),h+=t.getSInt32(),e?e.lineTo(l,h):n&&n.push(new i.bR(l,h));break;case b.close:e?e.close():n&&!n[0].equals(l,h)&&n.push(n[0].clone());break;default:throw t.release(),new Error("Invalid path operation")}}return e?r=e.result():s&&(n&&s.push(n),r=s),t.release(),this._geometry=r,r}}var A=s(80081);class D extends A.A{constructor(){super(12)}add(e,t,s){const n=this.array;n.push(e),n.push(t),n.push(s)}}A.A;class k{constructor(e){this.extent=4096,this.keys=[],this.values=[],this._pbfLayer=e.clone();const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:this.name=t.getString();break;case 3:this.keys.push(t.getString());break;case 4:this.values.push(t.processMessage(k._parseValue));break;case 5:this.extent=t.getUInt32();break;default:t.skip()}}getData(){return this._pbfLayer}static _parseValue(e){for(;e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getInt64();case 5:return e.getUInt64();case 6:return e.getSInt64();case 7:return e.getBool();default:e.skip()}return null}}class L extends A.A{constructor(e){super(e)}add(e,t,s,n,r,i,a,o,l,h,c,u){const f=this.array;let d=A.A.i1616to32(e,t);f.push(d);const y=31;d=A.A.i8888to32(Math.round(y*s),Math.round(y*n),Math.round(y*r),Math.round(y*i)),f.push(d),d=A.A.i8888to32(Math.round(y*a),Math.round(y*o),Math.round(y*l),Math.round(y*h)),f.push(d),d=A.A.i1616to32(c,0),f.push(d),u&&f.push(...u)}}class B extends A.A{constructor(e){super(e)}add(e,t,s){const n=this.array;n.push(A.A.i1616to32(e,t)),s&&n.push(...s)}}class V extends A.A{constructor(e){super(e)}add(e,t,s,n,r,i,a){const o=this.array,l=this.index;let h=A.A.i1616to32(e,t);return o.push(h),h=A.A.i8888to32(Math.round(15*s),Math.round(15*n),r,i),o.push(h),a&&o.push(...a),l}}class v extends A.A{constructor(e){super(e)}add(e,t,s,n,r,i,o,l,h,c,u,f){const d=this.array;let y=A.A.i1616to32(e,t);d.push(y),y=A.A.i1616to32(Math.round(8*s),Math.round(8*n)),d.push(y),y=A.A.i8888to32(r/4,i/4,l,h),d.push(y),y=A.A.i8888to32(0,(0,a.z0)(o),10*c,Math.min(10*u,255)),d.push(y),f&&d.push(...f)}}class R extends A.A{constructor(e){super(e)}add(e,t,s,n,r){const i=this.array,a=A.A.i1616to32(2*e+s,2*t+n);i.push(a),r&&i.push(...r)}}class S{constructor(e,t,s){this.layerExtent=4096,this._features=[],this.layer=e,this.zoom=t,this._spriteInfo=s,this._filter=e.getFeatureFilter()}pushFeature(e){this._filter&&!this._filter.filter(e,this.zoom)||this._features.push(e)}hasFeatures(){return this._features.length>0}getResources(e,t,s){}}class C extends S{constructor(e,t,s,n,i){super(e,t,s),this.type=r.NP.CIRCLE,this._circleVertexBuffer=n,this._circleIndexBuffer=i}get circleIndexStart(){return this._circleIndexStart}get circleIndexCount(){return this._circleIndexCount}processFeatures(e){const t=this._circleVertexBuffer,s=this._circleIndexBuffer;this._circleIndexStart=3*s.index,this._circleIndexCount=0;const n=this.layer,r=this.zoom;e&&e.setExtent(this.layerExtent);for(const i of this._features){const a=i.getGeometry(e);if(!a)continue;const o=n.circleMaterial.encodeAttributes(i,r,n);for(const e of a)if(e)for(const n of e){const e=t.index;t.add(n.x,n.y,0,0,o),t.add(n.x,n.y,0,1,o),t.add(n.x,n.y,1,0,o),t.add(n.x,n.y,1,1,o),s.add(e,e+1,e+2),s.add(e+1,e+2,e+3),this._circleIndexCount+=6}}}serialize(){let e=6;e+=this.layerUIDs.length,e+=this._circleVertexBuffer.array.length,e+=this._circleIndexBuffer.array.length;const t=new Uint32Array(e),s=new Int32Array(t.buffer);let n=0;t[n++]=this.type,t[n++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[n++]=this.layerUIDs[e];t[n++]=this._circleIndexStart,t[n++]=this._circleIndexCount,t[n++]=this._circleVertexBuffer.array.length;for(let e=0;e<this._circleVertexBuffer.array.length;e++)s[n++]=this._circleVertexBuffer.array[e];t[n++]=this._circleIndexBuffer.array.length;for(let e=0;e<this._circleIndexBuffer.array.length;e++)t[n++]=this._circleIndexBuffer.array[e];return t.buffer}}var O=s(98291),E=s(83349);class F extends S{constructor(e,t,s,n,i,a,o){super(e,t,s),this.type=r.NP.FILL,this._patternMap=new Map,this._fillVertexBuffer=n,this._fillIndexBuffer=i,this._outlineVertexBuffer=a,this._outlineIndexBuffer=o}get fillIndexStart(){return this._fillIndexStart}get fillIndexCount(){return this._fillIndexCount}get outlineIndexStart(){return this._outlineIndexStart}get outlineIndexCount(){return this._outlineIndexCount}getResources(e,t,s){const n=this.layer,r=this.zoom,i=n.getPaintProperty("fill-pattern");if(i)if(i.isDataDriven)for(const e of this._features)t(i.getValue(r,e),!0);else t(i.getValue(r),!0)}processFeatures(e){this._fillIndexStart=3*this._fillIndexBuffer.index,this._fillIndexCount=0,this._outlineIndexStart=3*this._outlineIndexBuffer.index,this._outlineIndexCount=0;const t=this.layer,s=this.zoom,{fillMaterial:n,outlineMaterial:r,hasDataDrivenFill:i,hasDataDrivenOutline:a}=t;e&&e.setExtent(this.layerExtent);const o=t.getPaintProperty("fill-pattern"),l=o?.isDataDriven;let h=!o&&t.getPaintValue("fill-antialias",s);if(t.outlineUsesFillColor){if(h&&!t.hasDataDrivenOpacity){const e=t.getPaintValue("fill-opacity",s),n=t.getPaintValue("fill-opacity",s+1);e<1&&n<1&&(h=!1)}if(h&&!t.hasDataDrivenColor){const e=t.getPaintValue("fill-color",s),n=t.getPaintValue("fill-color",s+1);e[3]<1&&n[3]<1&&(h=!1)}}const c=this._features,u=e?.validateTessellation;if(l){const i=[];for(const l of c){const c=o.getValue(s,l),f=this._spriteInfo[c];if(!f?.rect)continue;const d=n.encodeAttributes(l,s,t,f),y=h&&a?r.encodeAttributes(l,s,t):[],g=l.getGeometry(e);i.push({ddFillAttributes:d,ddOutlineAttributes:y,page:f.page,geometry:g}),i.sort(((e,t)=>e.page-t.page));for(const{ddFillAttributes:e,ddOutlineAttributes:s,page:n,geometry:r}of i)this._processFeature(r,h,t.outlineUsesFillColor,e,s,u,n)}}else for(const o of c){const l=i?n.encodeAttributes(o,s,t):null,c=h&&a?r.encodeAttributes(o,s,t):null,f=o.getGeometry(e);this._processFeature(f,h,t.outlineUsesFillColor,l,c,u)}}serialize(){let e=10;e+=this.layerUIDs.length,e+=this._fillVertexBuffer.array.length,e+=this._fillIndexBuffer.array.length,e+=this._outlineVertexBuffer.array.length,e+=this._outlineIndexBuffer.array.length,e+=3*this._patternMap.size+1;const t=new Uint32Array(e),s=new Int32Array(t.buffer);let n=0;t[n++]=this.type,t[n++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[n++]=this.layerUIDs[e];t[n++]=this._fillIndexStart,t[n++]=this._fillIndexCount,t[n++]=this._outlineIndexStart,t[n++]=this._outlineIndexCount;const r=this._patternMap,i=r.size;if(t[n++]=i,i>0)for(const[e,[s,i]]of r)t[n++]=e,t[n++]=s,t[n++]=i;t[n++]=this._fillVertexBuffer.array.length;for(let e=0;e<this._fillVertexBuffer.array.length;e++)s[n++]=this._fillVertexBuffer.array[e];t[n++]=this._fillIndexBuffer.array.length;for(let e=0;e<this._fillIndexBuffer.array.length;e++)t[n++]=this._fillIndexBuffer.array[e];t[n++]=this._outlineVertexBuffer.array.length;for(let e=0;e<this._outlineVertexBuffer.array.length;e++)s[n++]=this._outlineVertexBuffer.array[e];t[n++]=this._outlineIndexBuffer.array.length;for(let e=0;e<this._outlineIndexBuffer.array.length;e++)t[n++]=this._outlineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,s,n,r,i,a){if(!e)return;const o=e.length,l=!r||0===r.length;if(t&&(!s||l))for(let t=0;t<o;t++)this._processOutline(e[t],r);let h;for(let t=0;t<o;t++){const s=F._area(e[t]);s>32?(void 0!==h&&this._processFill(e,h,n,i,a),h=[t]):s<-32&&void 0!==h&&h.push(t)}void 0!==h&&this._processFill(e,h,n,i,a)}_processOutline(e,t){const s=this._outlineVertexBuffer,n=this._outlineIndexBuffer,r=n.index;let a,o,l;const h=new i.bR(0,0),c=new i.bR(0,0),u=new i.bR(0,0);let f=-1,d=-1,y=-1,g=-1,x=-1,p=!1,m=e.length;if(m<2)return;const _=e[0];let I=e[m-1];for(;m&&I.isEqual(_);)--m,I=e[m-1];if(!(m-0<2)){for(let r=0;r<m;++r){0===r?(a=e[m-1],o=e[0],l=e[1],h.assignSub(o,a),h.normalize(),h.rightPerpendicular()):(a=o,o=l,l=r!==m-1?e[r+1]:e[0],h.assign(c));const i=this._isClipEdge(a,o);-1===g&&(p=i),c.assignSub(l,o),c.normalize(),c.rightPerpendicular();const _=h.x*c.y-h.y*c.x;u.assignAdd(h,c),u.normalize();const I=-u.x*-h.x+-u.y*-h.y;let b=Math.abs(0!==I?1/I:1);b>8&&(b=8),_>=0?(y=s.add(o.x,o.y,h.x,h.y,0,1,t),-1===g&&(g=y),f>=0&&d>=0&&y>=0&&!i&&n.add(f,d,y),d=s.add(o.x,o.y,b*-u.x,b*-u.y,0,-1,t),-1===x&&(x=d),f>=0&&d>=0&&y>=0&&!i&&n.add(f,d,y),f=d,d=y,y=s.add(o.x,o.y,u.x,u.y,0,1,t),f>=0&&d>=0&&y>=0&&!i&&n.add(f,d,y),d=s.add(o.x,o.y,c.x,c.y,0,1,t),f>=0&&d>=0&&y>=0&&!i&&n.add(f,d,y)):(y=s.add(o.x,o.y,b*u.x,b*u.y,0,1,t),-1===g&&(g=y),f>=0&&d>=0&&y>=0&&!i&&n.add(f,d,y),d=s.add(o.x,o.y,-h.x,-h.y,0,-1,t),-1===x&&(x=d),f>=0&&d>=0&&y>=0&&!i&&n.add(f,d,y),f=d,d=y,y=s.add(o.x,o.y,-u.x,-u.y,0,-1,t),f>=0&&d>=0&&y>=0&&!i&&n.add(f,d,y),f=s.add(o.x,o.y,-c.x,-c.y,0,-1,t),f>=0&&d>=0&&y>=0&&!i&&n.add(f,d,y))}f>=0&&d>=0&&g>=0&&!p&&n.add(f,d,g),f>=0&&g>=0&&x>=0&&!p&&n.add(f,x,g),this._outlineIndexCount+=3*(n.index-r)}}_processFill(e,t,s,n,r){let i;t.length>1&&(i=[]);let a=0;for(const s of t)0!==a&&i.push(a),a+=e[s].length;const o=2*a,l=O.A.acquire();for(const s of t){const t=e[s],n=t.length;for(let e=0;e<n;++e)l.push(t[e].x,t[e].y)}const h=(0,E.e)(l,i,2);if(E.e.deviation(l,i,2,h)>0){const n=t.map((t=>e[t].length)),{buffer:i,vertexCount:a}=(0,P.l)(l,n);if(a>0){const e=this._fillVertexBuffer.index;for(let e=0;e<a;e++)this._fillVertexBuffer.add(i[2*e],i[2*e+1],s);for(let t=0;t<a;t+=3){const s=e+t;this._fillIndexBuffer.add(s,s+1,s+2)}if(void 0!==r){const e=this._patternMap,t=e.get(r);t?t[1]+=a:e.set(r,[this._fillIndexStart+this._fillIndexCount,a])}this._fillIndexCount+=a}}else{const e=h.length;if(e>0){const t=this._fillVertexBuffer.index;let n=0;for(;n<o;)this._fillVertexBuffer.add(l[n++],l[n++],s);let i=0;for(;i<e;)this._fillIndexBuffer.add(t+h[i++],t+h[i++],t+h[i++]);if(void 0!==r){const t=this._patternMap,s=t.get(r);s?s[1]+=e:t.set(r,[this._fillIndexStart+this._fillIndexCount,e])}this._fillIndexCount+=e}}O.A.release(l)}_isClipEdge(e,t){return e.x===t.x?e.x<=-64||e.x>=4160:e.y===t.y&&(e.y<=-64||e.y>=4160)}static _area(e){let t=0;const s=e.length-1;for(let n=0;n<s;n++)t+=(e[n].x-e[n+1].x)*(e[n].y+e[n+1].y);return t+=(e[s].x-e[0].x)*(e[s].y+e[0].y),.5*t}}var z=s(83773);class N extends S{constructor(e,t,s,n,i){super(e,t,s),this.type=r.NP.LINE,this._tessellationOptions={pixelCoordRatio:8,halfWidth:0,offset:0},this._patternMap=new Map,this.tessellationProperties={_lineVertexBuffer:null,_lineIndexBuffer:null,_ddValues:null},this.tessellationProperties._lineVertexBuffer=n,this.tessellationProperties._lineIndexBuffer=i,this._lineTessellator=new z.i(U(this.tessellationProperties),G(this.tessellationProperties),e.canUseThinTessellation)}get lineIndexStart(){return this._lineIndexStart}get lineIndexCount(){return this._lineIndexCount}getResources(e,t,s){const n=this.layer,r=this.zoom,i=n.getPaintProperty("line-pattern"),a=n.getPaintProperty("line-dasharray"),o=n.getLayoutProperty("line-cap");if(!i&&!a)return;const l=o?.getValue(r)||0,h=o?.isDataDriven,c=i?.isDataDriven,u=a?.isDataDriven;if(c||u)for(const e of this._features)t(c?i.getValue(r,e):this._getDashArrayKey(e,r,n,a,h,o,l));else if(i)t(i.getValue(r));else if(a){const e=a.getValue(r);t(n.getDashKey(e,l))}}processFeatures(e){this._lineIndexStart=3*this.tessellationProperties._lineIndexBuffer.index,this._lineIndexCount=0;const t=this.layer,s=this.zoom,n=this._features,r=this._tessellationOptions,{hasDataDrivenLine:i,lineMaterial:a}=t;e&&e.setExtent(this.layerExtent);const o=t.getPaintProperty("line-pattern"),l=t.getPaintProperty("line-dasharray"),h=o?.isDataDriven,c=l?.isDataDriven;let u;u=t.getLayoutProperty("line-cap");const f=u?.isDataDriven?u:null,d=f?null:t.getLayoutValue("line-cap",s),y=d||0,g=!!f;u=t.getLayoutProperty("line-join");const x=u?.isDataDriven?u:null,p=x?null:t.getLayoutValue("line-join",s);u=t.getLayoutProperty("line-miter-limit");const m=u?.isDataDriven?u:null,_=m?null:t.getLayoutValue("line-miter-limit",s);u=t.getLayoutProperty("line-round-limit");const I=u?.isDataDriven?u:null,b=I?null:t.getLayoutValue("line-round-limit",s);u=t.getPaintProperty("line-width");const M=u?.isDataDriven?u:null,w=M?null:t.getPaintValue("line-width",s);u=t.getPaintProperty("line-offset");const P=u?.isDataDriven?u:null,T=P?null:t.getPaintValue("line-offset",s);if(h||c){const i=[];for(const r of n){const n=h?o.getValue(s,r):this._getDashArrayKey(r,s,t,l,g,f,y),c=this._spriteInfo[n];if(!c?.rect)continue;const u=a.encodeAttributes(r,s,t,c),A=r.getGeometry(e);i.push({ddAttributes:u,page:c.page,cap:f?f.getValue(s,r):d,join:x?x.getValue(s,r):p,miterLimit:m?m.getValue(s,r):_,roundLimit:I?I.getValue(s,r):b,halfWidth:.5*(M?M.getValue(s,r):w),offset:P?P.getValue(s,r):T,geometry:A})}i.sort(((e,t)=>e.page-t.page)),r.textured=!0;for(const{ddAttributes:e,page:t,cap:s,join:n,miterLimit:a,roundLimit:o,halfWidth:l,offset:h,geometry:c}of i)r.capType=s,r.joinType=n,r.miterLimit=a,r.roundLimit=o,r.halfWidth=l,r.offset=h,this._processFeature(c,e,t)}else{if(o){const e=o.getValue(s),t=this._spriteInfo[e];if(!t?.rect)return}r.textured=!(!o&&!l),r.capType=d,r.joinType=p,r.miterLimit=_,r.roundLimit=b,r.halfWidth=.5*w,r.offset=T;for(const o of n){const n=i?a.encodeAttributes(o,s,t):null;f&&(r.capType=f.getValue(s,o)),x&&(r.joinType=x.getValue(s,o)),m&&(r.miterLimit=m.getValue(s,o)),I&&(r.roundLimit=I.getValue(s,o)),M&&(r.halfWidth=.5*M.getValue(s,o)),P&&(r.offset=P.getValue(s,o));const l=o.getGeometry(e);this._processFeature(l,n)}}}serialize(){let e=6;e+=this.layerUIDs.length,e+=this.tessellationProperties._lineVertexBuffer.array.length,e+=this.tessellationProperties._lineIndexBuffer.array.length,e+=3*this._patternMap.size+1;const t=new Uint32Array(e),s=new Int32Array(t.buffer);let n=0;t[n++]=this.type,t[n++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[n++]=this.layerUIDs[e];t[n++]=this._lineIndexStart,t[n++]=this._lineIndexCount;const r=this._patternMap,i=r.size;if(t[n++]=i,i>0)for(const[e,[s,i]]of r)t[n++]=e,t[n++]=s,t[n++]=i;t[n++]=this.tessellationProperties._lineVertexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineVertexBuffer.array.length;e++)s[n++]=this.tessellationProperties._lineVertexBuffer.array[e];t[n++]=this.tessellationProperties._lineIndexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineIndexBuffer.array.length;e++)t[n++]=this.tessellationProperties._lineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,s){if(!e)return;const n=e.length;for(let r=0;r<n;r++)this._processGeometry(e[r],t,s)}_processGeometry(e,t,s){if(e.length<2)return;let n,r,i=e[0],a=1;for(;a<e.length;)n=e[a].x-i.x,r=e[a].y-i.y,n*n+r*r<1e-6?e.splice(a,1):(i=e[a],++a);if(e.length<2)return;const o=this.tessellationProperties._lineIndexBuffer,l=3*o.index;this._tessellationOptions.initialDistance=0,this._tessellationOptions.wrapDistance=65535,this.tessellationProperties._ddValues=t,this._lineTessellator.tessellate(e,this._tessellationOptions);const h=3*o.index-l;if(void 0!==s){const e=this._patternMap,t=e.get(s);t?t[1]+=h:e.set(s,[l+this._lineIndexCount,h])}this._lineIndexCount+=h}_getDashArrayKey(e,t,s,n,r,i,a){const o=r?i.getValue(t,e):a,l=n.getValue(t,e);return s.getDashKey(l,o)}}const U=e=>(t,s,n,r,i,a,o,l,h,c,u)=>(e._lineVertexBuffer.add(t,s,o,l,n,r,i,a,h,c,u,e._ddValues),e._lineVertexBuffer.index-1),G=e=>(t,s,n)=>{e._lineIndexBuffer.add(t,s,n)};var K,q=s(32488),H=s(97768),W=s(799),j=s(3057);function Y(e,t){return e.iconMosaicItem&&t.iconMosaicItem?e.iconMosaicItem.page===t.iconMosaicItem.page?0:e.iconMosaicItem.page-t.iconMosaicItem.page:e.iconMosaicItem&&!t.iconMosaicItem?1:!e.iconMosaicItem&&t.iconMosaicItem?-1:0}class J extends S{constructor(e,t,s,n,i,a,o,l,h){super(t,s,h.getSpriteItems()),this.type=r.NP.SYMBOL,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._sourceTileKey=e,this._iconVertexBuffer=n,this._iconIndexBuffer=i,this._textVertexBuffer=a,this._textIndexBuffer=o,this._placementEngine=l,this._workerTileHandler=h}get markerPageMap(){return this._markerMap}get glyphsPageMap(){return this._glyphMap}get symbolInstances(){return this._symbolInstances}static{this._bidiEngine=new q.A}getResources(e,t,s){const n=this.layer,r=this.zoom;e&&e.setExtent(this.layerExtent);const i=n.getLayoutProperty("icon-image"),a=n.getLayoutProperty("text-field");let o=n.getLayoutProperty("text-transform"),l=n.getLayoutProperty("text-font");const h=[];let c,u,f,d;i&&!i.isDataDriven&&(c=i.getValue(r)),a&&!a.isDataDriven&&(u=a.getValue(r)),o&&o.isDataDriven||(f=n.getLayoutValue("text-transform",r),o=null),l&&l.isDataDriven||(d=n.getLayoutValue("text-font",r),l=null);for(const g of this._features){const x=g.getGeometry(e);if(!x||0===x.length)continue;let p,m;i&&(p=i.isDataDriven?i.getValue(r,g):this._replaceKeys(c,g.values),p&&t(p));let _=!1;if(a&&(m=a.isDataDriven?a.getValue(r,g):this._replaceKeys(u,g.values),m)){switch(m=m.replaceAll("\\n","\n"),o&&(f=o.getValue(r,g)),f){case y.Ms.LOWERCASE:m=m.toLowerCase();break;case y.Ms.UPPERCASE:m=m.toUpperCase()}if(J._bidiEngine.hasBidiChar(m)){let e;e="rtl"===J._bidiEngine.checkContextual(m)?"IDNNN":"ICNNN",m=J._bidiEngine.bidiTransform(m,e,"VLYSN"),_=!0}if(m.length>0){l&&(d=l.getValue(r,g));for(const e of d){let t=s[e];t||(t=s[e]=new Set);for(const e of m){const s=e.codePointAt(0);null!=s&&t.add(s)}}}}if(!p&&!m)continue;const I=n.getLayoutValue("symbol-sort-key",r,g),b={feature:g,sprite:p,label:m,rtl:_,geometry:x,hash:(m?(0,W.Wm)(m):0)^(p?(0,W.Wm)(p):0),priority:I,textFont:d};h.push(b)}this._symbolFeatures=h}processFeatures(e){e&&e.setExtent(this.layerExtent);const t=this.layer,s=this.zoom,n=t.getLayoutValue("symbol-placement",s),r=n!==y.kt.POINT,o=8*t.getLayoutValue("symbol-spacing",s),l=t.getLayoutProperty("icon-image"),h=t.getLayoutProperty("text-field"),c=l?new j.aR(t,s,r):null,u=h?new j.uU(t,s,r):null,g=this._workerTileHandler;let p;l&&(p=g.getSpriteItems()),this._iconIndexStart=3*this._iconIndexBuffer.index,this._textIndexStart=3*this._textIndexBuffer.index,this._iconIndexCount=0,this._textIndexCount=0,this._markerMap.clear(),this._glyphMap.clear();const m=[];let _=1;u?.size&&(_=u.size/f);const I=u?u.maxAngle*a.os:0,b=u?8*u.size:0;for(const e of this._symbolFeatures){let t,a;c&&p&&e.sprite&&(t=p[e.sprite],t&&t.sdf&&(this._isIconSDF=!0)),t&&c.update(s,e.feature);let l=0;const h=e.label;if(h){(0,H.Lw)(u),u.update(s,e.feature);const t=r&&u.rotationAlignment===y.I5.MAP?u.keepUpright:u.writingMode&&u.writingMode.includes(y.v9.VERTICAL);let n=.5;switch(u.anchor){case y.KI.TOP_LEFT:case y.KI.LEFT:case y.KI.BOTTOM_LEFT:n=0;break;case y.KI.TOP_RIGHT:case y.KI.RIGHT:case y.KI.BOTTOM_RIGHT:n=1}let i=.5;switch(u.anchor){case y.KI.TOP_LEFT:case y.KI.TOP:case y.KI.TOP_RIGHT:i=0;break;case y.KI.BOTTOM_LEFT:case y.KI.BOTTOM:case y.KI.BOTTOM_RIGHT:i=1}let o=.5;switch(u.justify){case y.O6.AUTO:o=n;break;case y.O6.LEFT:o=0;break;case y.O6.RIGHT:o=1}const c=u.letterSpacing*f,x=r?0:u.maxWidth*f,p=u.lineHeight*f,m=e.textFont.map((e=>g.getGlyphItems(e)));if(a=new d(m,x,p,c,n,i,o).getShaping(h,e.rtl,t),a&&a.length>0){let e=1e30,t=-1e30;for(const s of a)e=Math.min(e,s.x),t=Math.max(t,s.x);l=(t-e+48)*_*8}}for(let s of e.geometry){const h=[];if(n===y.kt.LINE){if(a?.length&&u?.size){const e=8*u.size*(2+Math.min(2,4*Math.abs(u.offset[1])));s=J._smoothVertices(s,e)}J._pushAnchors(h,s,o,l)}else n===y.kt.LINE_CENTER?J._pushCenterAnchor(h,s):e.feature.type===i.dC.Polygon?J._pushCentroid(h,s):h.push(new x(s[0].x,s[0].y));for(const n of h){if(n.x<0||n.x>4096||n.y<0||n.y>4096)continue;if(r&&l>0&&u?.rotationAlignment===y.I5.MAP&&!J._honorsTextMaxAngle(s,n,l,I,b))continue;const i={shaping:a,line:s,iconMosaicItem:t,anchor:n,symbolFeature:e,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};m.push(i),this._processFeature(i,c,u)}}}m.sort(Y),this._addPlacedGlyphs(),this._symbolInstances=m}serialize(){let e=14;e+=this.layerUIDs.length,e+=3*this.markerPageMap.size,e+=3*this.glyphsPageMap.size,e+=J._symbolsSerializationLength(this._symbolInstances),e+=this._iconVertexBuffer.array.length,e+=this._iconIndexBuffer.array.length,e+=this._textVertexBuffer.array.length,e+=this._textIndexBuffer.array.length;const t=new Uint32Array(e),s=new Int32Array(t.buffer),n=new Float32Array(t.buffer),[r,i,a]=this._sourceTileKey.split("/");let o=0;t[o++]=this.type,t[o++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[o++]=this.layerUIDs[e];t[o++]=this._isIconSDF?1:0,t[o++]=parseFloat(r),t[o++]=parseFloat(i),t[o++]=parseFloat(a),t[o++]=this.markerPageMap.size;for(const[e,[s,n]]of this.markerPageMap)t[o++]=e,t[o++]=s,t[o++]=n;t[o++]=this.glyphsPageMap.size;for(const[e,[s,n]]of this.glyphsPageMap)t[o++]=e,t[o++]=s,t[o++]=n;t[o++]=this._iconVertexBuffer.index/4,t[o++]=this._textVertexBuffer.index/4,o=J.serializeSymbols(t,s,n,o,this._symbolInstances),t[o++]=this._iconVertexBuffer.array.length;for(let e=0;e<this._iconVertexBuffer.array.length;e++)s[o++]=this._iconVertexBuffer.array[e];t[o++]=this._iconIndexBuffer.array.length;for(let e=0;e<this._iconIndexBuffer.array.length;e++)t[o++]=this._iconIndexBuffer.array[e];t[o++]=this._textVertexBuffer.array.length;for(let e=0;e<this._textVertexBuffer.array.length;e++)s[o++]=this._textVertexBuffer.array[e];t[o++]=this._textIndexBuffer.array.length;for(let e=0;e<this._textIndexBuffer.array.length;e++)t[o++]=this._textIndexBuffer.array[e];return t.buffer}static _symbolsSerializationLength(e){let t=0;t+=1;for(const s of e||[]){t+=5,t+=1;for(const e of s.textColliders)t+=10;for(const e of s.iconColliders)t+=10;t+=1,t+=2*s.textVertexRanges.length,t+=1,t+=2*s.iconVertexRanges.length}return t}static serializeSymbols(e,t,s,n,r){r=r||[],t[n++]=r.length;for(const e of r){t[n++]=e.anchor.x,t[n++]=e.anchor.y,t[n++]=e.symbolFeature.hash,t[n++]=e.symbolFeature.priority,t[n++]=e.symbolFeature.feature.featureIndex,t[n++]=e.textColliders.length+e.iconColliders.length;for(const r of e.textColliders)t[n++]=r.xTile,t[n++]=r.yTile,t[n++]=r.dxPixels,t[n++]=r.dyPixels,t[n++]=r.hard?1:0,t[n++]=r.partIndex,s[n++]=r.minLod,s[n++]=r.maxLod,t[n++]=r.width,t[n++]=r.height;for(const r of e.iconColliders)t[n++]=r.xTile,t[n++]=r.yTile,t[n++]=r.dxPixels,t[n++]=r.dyPixels,t[n++]=r.hard?1:0,t[n++]=r.partIndex,s[n++]=r.minLod,s[n++]=r.maxLod,t[n++]=r.width,t[n++]=r.height;t[n++]=e.textVertexRanges.length;for(const[s,r]of e.textVertexRanges)t[n++]=s,t[n++]=r;t[n++]=e.iconVertexRanges.length;for(const[s,r]of e.iconVertexRanges)t[n++]=s,t[n++]=r}return n}_replaceKeys(e,t){return e.replaceAll(/{([^{}]+)}/g,((e,s)=>s in t?t[s]:""))}_processFeature(e,t,s){const{line:n,iconMosaicItem:r,shaping:i,anchor:o}=e,l=this.zoom,h=this.layer,c=!!r;let u=!0;c&&(u=t?.optional||!r);const f=i&&i.length>0,d=!f||s?.optional;let g,x;if(c&&(g=this._placementEngine.getIconPlacement(o,r,t)),(g||u)&&(f&&(x=this._placementEngine.getTextPlacement(o,i,n,s)),x||d)){if(g&&x||(d||u?d||x?u||g||(x=null):g=null:(g=null,x=null)),x){const t=h.hasDataDrivenText?h.textMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._storePlacedGlyphs(e,x.shapes,l,s.rotationAlignment,t),x.textColliders){e.textColliders=x.textColliders;for(const e of x.textColliders){e.minLod=Math.max(l+(0,a.p6)(e.minLod),0),e.maxLod=Math.min(l+(0,a.p6)(e.maxLod),25);const t=e.angle;if(t){const s=Math.cos(t),n=Math.sin(t),r=e.dxPixels*s-e.dyPixels*n,i=e.dxPixels*n+e.dyPixels*s,a=(e.dxPixels+e.width)*s-e.dyPixels*n,o=(e.dxPixels+e.width)*n+e.dyPixels*s,l=e.dxPixels*s-(e.dyPixels+e.height)*n,h=e.dxPixels*n+(e.dyPixels+e.height)*s,c=(e.dxPixels+e.width)*s-(e.dyPixels+e.height)*n,u=(e.dxPixels+e.width)*n+(e.dyPixels+e.height)*s,f=Math.min(r,a,l,c),d=Math.max(r,a,l,c),y=Math.min(i,o,h,u),g=Math.max(i,o,h,u);e.dxPixels=f,e.dyPixels=y,e.width=d-f,e.height=g-y}}}}if(g){const s=h.hasDataDrivenIcon?h.iconMaterial.encodeAttributes(e.symbolFeature.feature,l,h):null;if(this._addPlacedIcons(e,g.shapes,l,r.page,t.rotationAlignment===y.I5.VIEWPORT,s),g.iconColliders){e.iconColliders=g.iconColliders;for(const e of g.iconColliders){e.minLod=Math.max(l+(0,a.p6)(e.minLod),0),e.maxLod=Math.min(l+(0,a.p6)(e.maxLod),25);const t=e.angle;if(t){const s=Math.cos(t),n=Math.sin(t),r=e.dxPixels*s-e.dyPixels*n,i=e.dxPixels*n+e.dyPixels*s,a=(e.dxPixels+e.width)*s-e.dyPixels*n,o=(e.dxPixels+e.width)*n+e.dyPixels*s,l=e.dxPixels*s-(e.dyPixels+e.height)*n,h=e.dxPixels*n+(e.dyPixels+e.height)*s,c=(e.dxPixels+e.width)*s-(e.dyPixels+e.height)*n,u=(e.dxPixels+e.width)*n+(e.dyPixels+e.height)*s,f=Math.min(r,a,l,c),d=Math.max(r,a,l,c),y=Math.min(i,o,h,u),g=Math.max(i,o,h,u);e.dxPixels=f,e.dyPixels=y,e.width=d-f,e.height=g-y}}}}}}_addPlacedIcons(e,t,s,n,r,i){const o=Math.max(s-1,0),l=this._iconVertexBuffer,h=this._iconIndexBuffer,c=this._markerMap;for(const u of t){const t=r?0:Math.max(s+(0,a.p6)(u.minzoom),o),f=r?25:Math.min(s+(0,a.p6)(u.maxzoom),25);if(f<=t)continue;const d=u.tl,y=u.tr,g=u.bl,x=u.br,p=u.mosaicRect,m=u.labelAngle,_=u.minAngle,I=u.maxAngle,b=u.anchor,M=l.index,w=p.x,P=p.y,T=w+p.width,A=P+p.height,D=l.index;l.add(b.x,b.y,d.x,d.y,w,P,m,_,I,t,f,i),l.add(b.x,b.y,y.x,y.y,T,P,m,_,I,t,f,i),l.add(b.x,b.y,g.x,g.y,w,A,m,_,I,t,f,i),l.add(b.x,b.y,x.x,x.y,T,A,m,_,I,t,f,i),e.iconVertexRanges.length>0&&e.iconVertexRanges[0][0]+e.iconVertexRanges[0][1]===D?e.iconVertexRanges[0][1]+=4:e.iconVertexRanges.push([D,4]),h.add(M,M+1,M+2),h.add(M+1,M+2,M+3),c.has(n)?c.get(n)[1]+=6:c.set(n,[this._iconIndexStart+this._iconIndexCount,6]),this._iconIndexCount+=6}}_addPlacedGlyphs(){const e=this._textVertexBuffer,t=this._textIndexBuffer,s=this._glyphMap;for(const[n,r]of this._glyphBufferDataStorage)for(const i of r){const r=e.index,a=i.symbolInstance,o=i.ddAttributes,l=e.index;e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.tl[0],i.tl[1],i.xmin,i.ymin,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.tr[0],i.tr[1],i.xmax,i.ymin,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.bl[0],i.bl[1],i.xmin,i.ymax,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.br[0],i.br[1],i.xmax,i.ymax,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),a.textVertexRanges.length>0&&a.textVertexRanges[0][0]+a.textVertexRanges[0][1]===l?a.textVertexRanges[0][1]+=4:a.textVertexRanges.push([l,4]),t.add(r,r+1,r+2),t.add(r+1,r+2,r+3),s.has(n)?s.get(n)[1]+=6:s.set(n,[this._textIndexStart+this._textIndexCount,6]),this._textIndexCount+=6}this._glyphBufferDataStorage.clear()}_storePlacedGlyphs(e,t,s,n,r){const i=Math.max(s-1,0),o=n===y.I5.VIEWPORT;let l,h,c,u,f,d,g,x,p,m,_;for(const n of t)l=o?0:Math.max(s+(0,a.p6)(n.minzoom),i),h=o?25:Math.min(s+(0,a.p6)(n.maxzoom),25),h<=l||(c=n.tl,u=n.tr,f=n.bl,d=n.br,g=n.labelAngle,x=n.minAngle,p=n.maxAngle,m=n.anchor,_=n.mosaicRect,this._glyphBufferDataStorage.has(n.page)||this._glyphBufferDataStorage.set(n.page,[]),this._glyphBufferDataStorage.get(n.page).push({glyphAnchor:[m.x,m.y],tl:[c.x,c.y],tr:[u.x,u.y],bl:[f.x,f.y],br:[d.x,d.y],xmin:_.x,ymin:_.y,xmax:_.x+_.width,ymax:_.y+_.height,labelAngle:g,minAngle:x,maxAngle:p,minLod:l,maxLod:h,placementLod:i,symbolInstance:e,ddAttributes:r}))}static _pushAnchors(e,t,s,n){s+=n;let r=0;const o=t.length-1;for(let e=0;e<o;e++)r+=i.bR.distance(t[e],t[e+1]);let l=n||s;if(l*=.5,r<=l)return;const h=l/r;let c=0,u=-(s=r/Math.max(Math.round(r/s),1))/2;const f=t.length-1;for(let n=0;n<f;n++){const r=t[n],i=t[n+1],o=i.x-r.x,l=i.y-r.y,f=Math.sqrt(o*o+l*l);let d;for(;u+s<c+f;){u+=s;const t=(u-c)/f,y=(0,a.GW)(r.x,i.x,t),g=(0,a.GW)(r.y,i.y,t);void 0===d&&(d=Math.atan2(l,o)),e.push(new x(y,g,d,n,h))}c+=f}}static _pushCenterAnchor(e,t){let s=0;const n=t.length-1;for(let e=0;e<n;e++)s+=i.bR.distance(t[e],t[e+1]);const r=s/2;let o=0;const l=t.length-1;for(let s=0;s<l;s++){const n=t[s],i=t[s+1],l=i.x-n.x,h=i.y-n.y,c=Math.sqrt(l*l+h*h);if(r<o+c){const t=(r-o)/c,u=(0,a.GW)(n.x,i.x,t),f=(0,a.GW)(n.y,i.y,t),d=Math.atan2(h,l);return void e.push(new x(u,f,d,s,0))}o+=c}}static _deviation(e,t,s){const n=(t.x-e.x)*(s.x-t.x)+(t.y-e.y)*(s.y-t.y),r=(t.x-e.x)*(s.y-t.y)-(t.y-e.y)*(s.x-t.x);return Math.atan2(r,n)}static _honorsTextMaxAngle(e,t,s,n,r){let a=0;const o=s/2;let l=new i.bR(t.x,t.y),h=t.segment+1;for(;a>-o;){if(--h,h<0)return!1;a-=i.bR.distance(e[h],l),l=e[h]}a+=i.bR.distance(e[h],e[h+1]);const c=[];let u=0;const f=e.length;for(;a<o;){const t=e[h];let s,o=h;do{if(++o,o===f)return!1;s=e[o]}while(s.isEqual(t));let l,d=o;do{if(++d,d===f)return!1;l=e[d]}while(l.isEqual(s));const y=this._deviation(t,s,l);for(c.push({deviation:y,distToAnchor:a}),u+=y;a-c[0].distToAnchor>r;)u-=c.shift().deviation;if(Math.abs(u)>n)return!1;a+=i.bR.distance(s,l),h=o}return!0}static _smoothVertices(e,t){if(t<=0)return e;let s=e.length;if(s<3)return e;const n=[];let r=0,a=0;n.push(0);for(let t=1;t<s;t++){const s=i.bR.distance(e[t],e[t-1]);s>0&&(r+=s,n.push(r),a++,a!==t&&(e[a]=e[t]))}if(s=a+1,s<3)return e;t=Math.min(t,.2*r);const o=e[0].x,l=e[0].y,h=e[s-1].x,c=e[s-1].y,u=i.bR.sub(e[0],e[1]);u.normalize(),e[0].x+=t*u.x,e[0].y+=t*u.y,u.assignSub(e[s-1],e[s-2]),u.normalize(),e[s-1].x+=t*u.x,e[s-1].y+=t*u.y,n[0]-=t,n[s-1]+=t;const f=[];f.push(new i.bR(o,l));const d=1e-6,y=.5*t;for(let r=1;r<s-1;r++){let a=0,o=0,l=0;for(let s=r-1;s>=0;s--){const i=y+n[s+1]-n[r];if(i<0)break;const h=n[s+1]-n[s],c=n[r]-n[s]<y?1:i/h;if(c<d)break;const u=c*c,f=c*i-.5*u*h,g=c*h/t,x=e[s+1],p=e[s].x-x.x,m=e[s].y-x.y;a+=g/f*(x.x*c*i+.5*u*(i*p-h*x.x)-u*c*h*p/3),o+=g/f*(x.y*c*i+.5*u*(i*m-h*x.y)-u*c*h*m/3),l+=g}for(let i=r+1;i<s;i++){const s=y-n[i-1]+n[r];if(s<0)break;const h=n[i]-n[i-1],c=n[i]-n[r]<y?1:s/h;if(c<d)break;const u=c*c,f=c*s-.5*u*h,g=c*h/t,x=e[i-1],p=e[i].x-x.x,m=e[i].y-x.y;a+=g/f*(x.x*c*s+.5*u*(s*p-h*x.x)-u*c*h*p/3),o+=g/f*(x.y*c*s+.5*u*(s*m-h*x.y)-u*c*h*m/3),l+=g}f.push(new i.bR(a/l,o/l))}return f.push(new i.bR(h,c)),e[0].x=o,e[0].y=l,e[s-1].x=h,e[s-1].y=c,f}static _pushCentroid(e,t){const s=4096,n=4096,r=t.length-1;let i=0,a=0,o=0,l=t[0].x,h=t[0].y;l>s&&(l=s),l<0&&(l=0),h>n&&(h=n),h<0&&(h=0);for(let e=1;e<r;e++){let r=t[e].x,c=t[e].y,u=t[e+1].x,f=t[e+1].y;r>s&&(r=s),r<0&&(r=0),c>n&&(c=n),c<0&&(c=0),u>s&&(u=s),u<0&&(u=0),f>n&&(f=n),f<0&&(f=0);const d=(r-l)*(f-h)-(u-l)*(c-h);i+=d*(l+r+u),a+=d*(h+c+f),o+=d}i/=3*o,a/=3*o,isNaN(i)||isNaN(a)||e.push(new x(i,a))}}!function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.NO_DATA=1]="NO_DATA",e[e.READY=2]="READY",e[e.MODIFIED=3]="MODIFIED",e[e.INVALID=4]="INVALID"}(K||(K={}));class Z{constructor(e,t,s,n,r,o){if(this._pbfTiles={},this._tileClippers={},this._client=s,this._tile=t,this._sourceDataMaxLOD=n,o){this._styleLayerUIDs=new Set;for(const e of o)this._styleLayerUIDs.add(e)}this._styleRepository=r,this._layers=this._styleRepository?.layers??[];const[l,h,c]=t.tileKey.split("/").map(parseFloat);this._level=l;const u=(0,a.IU)(this._level);for(const t of Object.keys(e)){const s=e[t];if(this._pbfTiles[t]=new w.A(new Uint8Array(s.protobuff),new DataView(s.protobuff)),s.refKey){const[e]=s.refKey.split("/").map(parseFloat),n=l-e;if(n>0){const e=(1<<n)-1,s=h&e,r=c&e;this._tileClippers[t]=new i.O3(n,s,r,8,u)}}this._tileClippers[t]||(this._tileClippers[t]=new i.Ox)}}_canParseStyleLayer(e){return!this._styleLayerUIDs||this._styleLayerUIDs.has(e)}async parse(e){const t=(0,P.F)(),s=this._initialize(e),{returnedBuckets:n}=s;this._processLayers(s),this._linkReferences(s),this._filterFeatures(s);const r=[],i=new Set,a=(e,t)=>{i.has(e)||(r.push({name:e,repeat:t}),i.add(e))},o={};for(const e of n)e.getResources(e.tileClipper,a,o);if(this._tile.status===K.INVALID)return[];const l=this._fetchResources(r,o,e);return Promise.all([...l,t]).then((()=>this._processFeatures(s.returnedBuckets)))}_initialize(e){const t=e?.signal;return{signal:t,sourceNameToTileData:this._parseTileData(this._pbfTiles),layers:this._layers,zoom:this._level,sourceNameToTileClipper:this._tileClippers,sourceNameToUniqueSourceLayerBuckets:{},sourceNameToUniqueSourceLayers:{},returnedBuckets:[],layerIdToBucket:{},referencerUIDToReferencedId:new Map}}_processLayers(e){const{sourceNameToTileData:t,zoom:s,layers:n,sourceNameToTileClipper:r,sourceNameToUniqueSourceLayerBuckets:i,sourceNameToUniqueSourceLayers:a,returnedBuckets:o,layerIdToBucket:l,referencerUIDToReferencedId:h}=e,c=this._sourceDataMaxLOD;for(let e=n.length-1;e>=0;e--){const u=n[e];if(s<c){if(u.minzoom&&s<Math.floor(u.minzoom)||u.maxzoom&&s>=u.maxzoom)continue}else if(u.maxzoom&&s>=u.maxzoom)continue;if(u.type===y.Dc.BACKGROUND||!this._canParseStyleLayer(u.uid)||!t[u.source]||!r[u.source])continue;const f=t[u.source],d=r[u.source],g=u.sourceLayer,x=f[g];if(x){let e=a[u.source];if(e||(e=a[u.source]=new Set),e.add(u.sourceLayer),u.refLayerId)h.set(u.uid,u.refLayerId);else{const e=this._createBucket(u);if(e){e.layerUIDs=[u.uid],e.layerExtent=x.extent,e.tileClipper=d;let t=i[u.source];t||(t=i[u.source]={});let s=t[g];s||(s=t[g]=[]),s.push(e),o.push(e),l[u.id]=e}}}}}_linkReferences(e){const{layerIdToBucket:t,referencerUIDToReferencedId:s}=e;s.forEach(((e,s)=>{t[e]&&t[e].layerUIDs.push(s)}))}_filterFeatures(e){const{signal:t,sourceNameToTileData:s,sourceNameToUniqueSourceLayerBuckets:r,sourceNameToUniqueSourceLayers:i}=e,a=10*this._level,o=10*(this._level+1),l=[],h=[];for(const e of Object.keys(i))i[e].forEach((t=>{l.push(t),h.push(e)}));for(let e=0;e<l.length;e++){const i=h[e],c=l[e];if(!s[i]||!r[i])continue;const u=s[i][c],f=r[i][c];if(!f||0===f.length)continue;if((0,n.G4)(t))return;let d=0;const y=u.getData();for(;y.nextTag(2);){const e=y.getMessage(),t=new T(e,u,d++);e.release();const s=t.values;if(s){const e=s._minzoom;if(e&&e>=o)continue;const t=s._maxzoom;if(t&&t<=a)continue}for(const e of f)e.pushFeature(t)}}}_fetchResources(e,t,s){const n=[],r=this._tile.getWorkerTileHandler();let i,a;e.length>0&&(i=r.fetchSprites(e,this._client,s),n.push(i));for(const e in t){const i=t[e];i.size>0&&(a=r.fetchGlyphs(this._tile.tileKey,e,i,this._client,s),n.push(a))}return n}_processFeatures(e){const t=e.filter((e=>e.hasFeatures()||this._canParseStyleLayer(e.layer.uid)));for(const e of t)e.processFeatures(e.tileClipper);return t}_parseTileData(e){const t={};for(const s of Object.keys(e)){const n=e[s],r={};for(;n.next();)switch(n.tag()){case 3:{const e=n.getMessage(),t=new k(e);e.release(),r[t.name]=t;break}default:n.skip()}t[s]=r}return t}_createBucket(e){switch(e.type){case y.Dc.BACKGROUND:return null;case y.Dc.FILL:return this._createFillBucket(e);case y.Dc.LINE:return this._createLineBucket(e);case y.Dc.CIRCLE:return this._createCircleBucket(e);case y.Dc.SYMBOL:return this._createSymbolBucket(e)}}_createFillBucket(e){return new F(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new B(e.fillMaterial.getStride()),new D,new V(e.outlineMaterial.getStride()),new D)}_createLineBucket(e){return new N(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new L(e.lineMaterial.getStride()),new D)}_createCircleBucket(e){return new C(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new R(e.circleMaterial.getStride()),new D)}_createSymbolBucket(e){const t=this._tile;return new J(t.tileKey,e,this._level,new v(e.iconMaterial.getStride()),new D,new v(e.textMaterial.getStride()),new D,t.placementEngine,t.getWorkerTileHandler())}}class ${constructor(e,t,s,n){this.status=K.INITIALIZED,this.placementEngine=new I,this.tileKey=e,this.refKeys=t,this._workerTileHandler=s,this._styleRepository=n}release(){this.tileKey="",this.refKeys=null,this.status=K.INITIALIZED,this._workerTileHandler=null}async parse(e,t){const s=t?.signal;if(null!=s){const e=()=>{s.removeEventListener("abort",e),this.status=K.INVALID};s.addEventListener("abort",e)}let r;const i={bucketsWithData:[],emptyBuckets:null};try{r=await this._parse(e,t)}catch(e){if((0,n.zf)(e))throw e;return{result:i,transferList:[]}}this.status=K.READY;const a=i.bucketsWithData,o=[];for(const e of r)if(e.hasFeatures()){const t=e.serialize();a.push(t)}else o.push(e.layer.uid);const l=[...a];let h=null;return o.length>0&&(h=Uint32Array.from(o),l.push(h.buffer)),i.emptyBuckets=h,{result:i,transferList:l}}setObsolete(){this.status=K.INVALID}getLayers(){return this._workerTileHandler.getLayers()}getWorkerTileHandler(){return this._workerTileHandler}async _parse(e,t){const s=e.sourceName2DataAndRefKey;return 0===Object.keys(s).length?[]:(this.status=K.MODIFIED,new Z(s,this,t.client,e.sourceDataMaxLOD,this._styleRepository,e.styleLayerUIDs).parse(t))}}var Q=s(45013);class X{constructor(){this._spriteInfo={},this._glyphInfo={},this._sourceDataMaxLOD=25}reset(){return this._spriteInfo={},this._glyphInfo={},Promise.resolve()}getLayers(){return this._styleRepository?.layers??[]}async createTileAndParse(e,t){const{key:s}=e,r={};for(const t of Object.keys(e.sourceName2DataAndRefKey)){const s=e.sourceName2DataAndRefKey[t];r[t]=s.refKey}const i=new $(s,r,this,this._styleRepository);try{return await i.parse({...e,sourceDataMaxLOD:this._sourceDataMaxLOD},t)}catch(e){if(i.setObsolete(),i.release(),!(0,n.zf)(e))throw e;return null}}updateStyle(e){if(!e||0===e.length||!this._styleRepository)return;const t=this._styleRepository;for(const s of e){const e=s.type,n=s.data;switch(e){case r.$q.PAINTER_CHANGED:t.setPaintProperties(n.layer,n.paint);break;case r.$q.LAYOUT_CHANGED:t.setLayoutProperties(n.layer,n.layout);break;case r.$q.LAYER_REMOVED:t.deleteStyleLayer(n.layer);break;case r.$q.LAYER_CHANGED:t.setStyleLayer(n.layer,n.index);break;case r.$q.SPRITES_CHANGED:this._spriteInfo={}}}}setStyle(e){const{style:t,sourceDataMaxLOD:s}=e;this._styleRepository=new Q.A(t),this._sourceDataMaxLOD=s,this._spriteInfo={},this._glyphInfo={}}fetchSprites(e,t,s){const n=[],r=this._spriteInfo;for(const t of e)void 0===r[t.name]&&n.push(t);return 0===n.length?Promise.resolve():t.invoke("getSprites",n,{signal:s?.signal}).then((e=>{for(const t in e){const s=e[t];r[t]=s}}))}getSpriteItems(){return this._spriteInfo}fetchGlyphs(e,t,s,n,r){const i=[];let a=this._glyphInfo[t];return a?s.forEach((e=>{a[e]||i.push(e)})):(a=this._glyphInfo[t]=[],s.forEach((e=>i.push(e)))),0===i.length?Promise.resolve():n.invoke("getGlyphs",{tileID:e,font:t,codePoints:i},r).then((e=>{for(let t=0;t<e.length;t++)e[t]&&(a[t]=e[t])}))}getGlyphItems(e){return this._glyphInfo[e]}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6575],{91829:(t,e,n)=>{function r(){return[0,0,0,0]}function o(t,e,n,r){return[t,e,n,r]}function i(t,e,n,r){return[t,e,n,r]}function s(t,e=[0,0,0,0]){const n=Math.min(4,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e}function a(){return o(1,1,1,1)}function c(){return o(1,0,0,0)}function u(){return o(0,1,0,0)}function l(){return o(0,0,1,0)}function f(){return o(0,0,0,1)}n.d(e,{CN:()=>i,Un:()=>E,ci:()=>s,fA:()=>o,uY:()=>N,vt:()=>r});const N=[0,0,0,0],E=a(),I=c(),O=u(),A=l(),T=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:E,UNIT_W:T,UNIT_X:I,UNIT_Y:O,UNIT_Z:A,ZEROS:N,clone:function(t){return[t[0],t[1],t[2],t[3]]},create:r,createView:function(t,e){return new Float64Array(t,e,4)},freeze:i,fromArray:s,fromValues:o,ones:a,unitW:f,unitX:c,unitY:u,unitZ:l,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},34727:(t,e,n)=>{n.d(e,{$8:()=>g,Cc:()=>s,Hx:()=>O,Io:()=>S,KJ:()=>u,Sp:()=>N,XM:()=>l,YN:()=>f,ZH:()=>I,cU:()=>o,gg:()=>E,hs:()=>a,kU:()=>c,or:()=>m,pF:()=>v,pq:()=>M,qE:()=>i});const r=new Float32Array(1);function o(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function i(t,e,n){return Math.min(Math.max(t,e),n)}function s(t,e,n){return t+(e-t)*n}function a(t,e,n,r,o){return s(r,o,(t-e)/(n-e))}function c(t){return t*Math.PI/180}function u(t){return 180*t/Math.PI}function l(t){return Math.acos(i(t,-1,1))}function f(t){return Math.asin(i(t,-1,1))}function N(t,e,n=1e-6){return t===e||!(!Number.isFinite(t)||!Number.isFinite(e))&&(t>e?t-e:e-t)<=n}function E(t,e,n=1e-6){return!N(t,e,n)&&t>e}function I(t,e,n=1e-6){return!N(t,e,n)&&t<e}function O(t,e,n=1e-6){return N(t,e,n)||t>e}const A=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function T(t){return A.setFloat64(0,t),A.getBigInt64(0)}const h=BigInt("1000000"),d=p(1);function p(t){const e=T(t=Math.abs(t)),n=function(t){return A.setBigInt64(0,t),A.getFloat64(0)}(e<=h?h:e-h);return Math.abs(t-n)}function S(t,e,n=d){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;if(null!=n&&p(Math.min(Math.abs(t),Math.abs(e)))<n)return Math.abs(t-e)<=n;const r=T(t),o=T(e);return r<0==o<0&&!((r<o?o-r:r-o)>h)}function g(t){return R(Math.max(-M,Math.min(t,M)))}function R(t){return r[0]=t,r[0]}function m(t){const e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],r=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(N(e,1)&&N(n,1)&&N(r,1))}const M=R(34028234663852886e22);function v(t,e,n){if(void 0===n||0==+n)return Math[t](e);if(e=+e,n=+n,isNaN(e)||"number"!=typeof n||n%1!=0)return NaN;let r=e.toString().split("e");return r=(e=Math[t](+(r[0]+"e"+(r[1]?+r[1]-n:-n)))).toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+n:n))}},9318:(t,e,n)=>{n.d(e,{b:()=>i});var r=n(34727),o=n(97146);function i(t,e,n){const i=Array.isArray(t),l=i?t.length/e:t.byteLength/(4*e),f=i?t:new Uint32Array(t,0,l*e),N=n?.minReduction??0,E=n?.originalIndices||null,I=E?E.length:0,O=n?.componentOffsets||null;let A=0;if(O)for(let t=0;t<O.length-1;t++){const e=O[t+1]-O[t];e>A&&(A=e)}else A=l;const T=Math.floor(1.1*A)+1;(null==u||u.length<2*T)&&(u=new Uint32Array((0,r.cU)(2*T)));for(let t=0;t<2*T;t++)u[t]=0;let h=0;const d=!!O&&!!E,p=d?I:l;let S=(0,o.my)(l);const g=new Uint32Array(I),R=1.96;let m=0!==N?Math.ceil(4*R*R/(N*N)*N*(1-N)):p,M=1,v=O?O[1]:p;for(let t=0;t<p;t++){if(t===m){const e=1-h/t;if(e+R*Math.sqrt(e*(1-e)/t)<N)return null;m*=2}if(t===v){for(let t=0;t<2*T;t++)u[t]=0;if(E)for(let t=O[M-1];t<O[M];t++)g[t]=S[E[t]];v=O[++M]}const n=d?E[t]:t,r=n*e,o=c(f,r,e);let i=o%T,a=h;for(;0!==u[2*i+1];){if(u[2*i]===o){const t=u[2*i+1]-1;if(s(f,r,t*e,e)){a=S[t];break}}i++,i>=T&&(i-=T)}a===h&&(u[2*i]=o,u[2*i+1]=n+1,h++),S[n]=a}if(0!==N&&1-h/l<N)return null;if(d){for(let t=O[M-1];t<g.length;t++)g[t]=S[E[t]];S=(0,o.uW)(g)}const C=i?new Array(h):new Uint32Array(h*e);h=0;for(let t=0;t<p;t++)S[t]===h&&(a(f,(d?E[t]:t)*e,C,h*e,e),h++);if(E&&!d){const t=new Uint32Array(I);for(let e=0;e<t.length;e++)t[e]=S[E[e]];S=(0,o.uW)(t)}return{buffer:Array.isArray(C)?C:C.buffer,indices:S,uniqueCount:h}}function s(t,e,n,r){for(let o=0;o<r;o++)if(t[e+o]!==t[n+o])return!1;return!0}function a(t,e,n,r,o){for(let i=0;i<o;i++)n[r+i]=t[e+i]}function c(t,e,n){let r=0;for(let o=0;o<n;o++)r=t[e+o]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let u=null},4431:(t,e,n)=>{n.d(e,{U:()=>i});var r=n(63907),o=n(74038);function i(t,e=0){const n=t.stride;return Array.from(t.fields.keys()).map((r=>{const i=t.fields.get(r),a=i.constructor.ElementCount,c=s(i.constructor.ElementType),u=i.offset,l=i.optional?.glNormalized??!1;return new o._(r,a,c,u,n,l,e)}))}function s(t){const e=a[t];if(e)return e;throw new Error("BufferType not supported in WebGL")}const a={u8:r.pe.UNSIGNED_BYTE,u16:r.pe.UNSIGNED_SHORT,u32:r.pe.UNSIGNED_INT,i8:r.pe.BYTE,i16:r.pe.SHORT,i32:r.pe.INT,f32:r.pe.FLOAT}},46540:(t,e,n)=>{var r;function o(t){return t===r.POSITION}n.d(e,{b:()=>o,r:()=>r}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",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.PREVPOSITION="prevPosition",t.NEXTPOSITION="nextPosition",t.SUBDIVISIONFACTOR="subdivisionFactor",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.FEATUREVALUE="featureValue",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.OBJECTANDLAYERIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(r||(r={}))},3055:(t,e,n)=>{n.d(e,{I$:()=>s,In:()=>u,gr:()=>c});var r=n(4431),o=n(1843),i=n(46540);const s=(0,o.BP)().vec3f(i.r.POSITION).u16(i.r.COMPONENTINDEX).freeze(),a=(0,o.BP)().vec2u8(i.r.SIDENESS).freeze(),c=((0,r.U)(a),(0,o.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze()),u=(0,o.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).vec2i16(i.r.NORMAL2COMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze();new Map([[i.r.POSITION0,0],[i.r.POSITION1,1],[i.r.COMPONENTINDEX,2],[i.r.VARIANTOFFSET,3],[i.r.VARIANTSTROKE,4],[i.r.VARIANTEXTENSION,5],[i.r.NORMALCOMPRESSED,6],[i.r.NORMAL2COMPRESSED,7],[i.r.SIDENESS,8]])},93406:(t,e,n)=>{n.d(e,{K:()=>c});var r=n(34727),o=n(3694),i=n(38954),s=n(51850);const a=-1;function c(t,e,n){const r=t.vertices.position,o=t.vertices.componentIndex,s=O.position0,c=O.position1,f=O.faceNormal0,E=O.faceNormal1,{edges:I,normals:A}=l(t),T=I.length/4,h=e.allocate(T);let d=0;const p=T,R=n?.allocate(p);let M=0,v=0,C=0;N.length=0;for(let t=0;t<T;++t){const e=4*t;r.getVec(I.data[e],s),r.getVec(I.data[e+1],c);const n=N.pushNew();n.index=4*t,n.length=(0,i.j)(s,c)}N.sort(((t,e)=>e.length-t.length));const P=new Array,L=new Array;N.forAll((({length:t,index:l})=>{const N=I.data[l],T=I.data[l+1],p=I.data[l+2],U=I.data[l+3],w=U===a;if(r.getVec(N,s),r.getVec(T,c),w){const t=3*p;(0,i.i)(f,A.data[t],A.data[t+1],A.data[t+2]),(0,i.c)(E,f),O.componentIndex=o.get(N),O.cosAngle=(0,i.f)(f,E)}else{let t=3*p;if((0,i.i)(f,A.data[t],A.data[t+1],A.data[t+2]),t=3*U,(0,i.i)(E,A.data[t],A.data[t+1],A.data[t+2]),O.componentIndex=o.get(N),O.cosAngle=(0,i.f)(f,E),function(t,e){return t.cosAngle>e}(O,g))return;O.cosAngle<-.9999&&(0,i.c)(E,f)}v+=t,C++,w||function(t,e){return t.cosAngle<e}(O,m)?(e.write(h,d++,O),P.push(t)):u(O,S)&&(R&&n&&n.write(R,M++,O),L.push(t))}));const U=new Float32Array(P.reverse()),w=new Float32Array(L.reverse()),y=R&&n?{instancesData:R.slice(0,M),lodInfo:{lengths:w}}:void 0;return{regular:{instancesData:h.slice(0,d),lodInfo:{lengths:U}},silhouette:y,averageEdgeLength:v/C}}function u(t,e){const n=(0,r.XM)(t.cosAngle);return(0,i.o)(T,t.position1,t.position0),n*((0,i.f)((0,i.e)(A,t.faceNormal0,t.faceNormal1),T)>0?-1:1)>e}function l(t){const e=t.faces.length/3,n=t.faces,r=t.neighbors,o=t.vertices.position;E.length=I.length=0;for(let t=0;t<e;t++){const e=3*t,s=r[e],c=r[e+1],u=r[e+2],l=n[e],f=n[e+1],N=n[e+2];o.getVec(l,h),o.getVec(f,d),o.getVec(N,p),(0,i.d)(d,d,h),(0,i.d)(p,p,h),(0,i.e)(h,d,p),(0,i.n)(h,h),I.pushArray(h),(s===a||l<f)&&(E.push(l),E.push(f),E.push(t),E.push(s)),(c===a||f<N)&&(E.push(f),E.push(N),E.push(t),E.push(c)),(u===a||N<l)&&(E.push(N),E.push(l),E.push(t),E.push(u))}return{edges:E,normals:I}}class f{constructor(){this.index=0,this.length=0}}const N=new o.A({allocator:t=>t||new f,deallocator:null}),E=new o.A({deallocator:null}),I=new o.A({deallocator:null}),O=new class{constructor(){this.position0=(0,s.vt)(),this.position1=(0,s.vt)(),this.faceNormal0=(0,s.vt)(),this.faceNormal1=(0,s.vt)(),this.componentIndex=0,this.cosAngle=0}},A=(0,s.vt)(),T=(0,s.vt)(),h=(0,s.vt)(),d=(0,s.vt)(),p=(0,s.vt)(),S=(0,r.kU)(4),g=Math.cos(S),R=(0,r.kU)(35),m=Math.cos(R)},53099:(t,e,n)=>{n.d(e,{o6:()=>P,HY:()=>D,hx:()=>L,Jb:()=>b});var r=n(9318);function o(t,e,n){const r=e/3,o=new Uint32Array(n+1),i=new Uint32Array(n+1),s=(t,e)=>{t<e?o[t+1]++:i[e+1]++};for(let e=0;e<r;e++){const n=t[3*e],r=t[3*e+1],o=t[3*e+2];s(n,r),s(r,o),s(o,n)}let a=0,c=0;for(let t=0;t<n;t++){const e=o[t+1],n=i[t+1];o[t+1]=a,i[t+1]=c,a+=e,c+=n}const u=new Uint32Array(6*r),l=o[n],f=(t,e,n)=>{if(t<e){const r=o[t+1]++;u[2*r]=e,u[2*r+1]=n}else{const r=i[e+1]++;u[2*l+2*r]=t,u[2*l+2*r+1]=n}};for(let e=0;e<r;e++){const n=t[3*e],r=t[3*e+1],o=t[3*e+2];f(n,r,e),f(r,o,e),f(o,n,e)}const N=(t,e)=>{const n=2*t,r=e-t;for(let t=1;t<r;t++){const e=u[n+2*t],r=u[n+2*t+1];let o=t-1;for(;o>=0&&u[n+2*o]>e;o--)u[n+2*o+2]=u[n+2*o],u[n+2*o+3]=u[n+2*o+1];u[n+2*o+2]=e,u[n+2*o+3]=r}};for(let t=0;t<n;t++)N(o[t],o[t+1]),N(l+i[t],l+i[t+1]);const E=new Int32Array(3*r),I=(e,n)=>e===t[3*n]?0:e===t[3*n+1]?1:e===t[3*n+2]?2:-1,O=(t,e)=>{const n=I(t,e);E[3*e+n]=-1},A=(t,e,n,r)=>{const o=I(t,e);E[3*e+o]=r;const i=I(n,r);E[3*r+i]=e};for(let t=0;t<n;t++){let e=o[t];const n=o[t+1];let r=i[t];const s=i[t+1];for(;e<n&&r<s;){const n=u[2*e],o=u[2*l+2*r];n===o?(A(t,u[2*e+1],o,u[2*l+2*r+1]),e++,r++):n<o?(O(t,u[2*e+1]),e++):(O(o,u[2*l+2*r+1]),r++)}for(;e<n;)O(t,u[2*e+1]),e++;for(;r<s;)O(u[2*l+2*r],u[2*l+2*r+1]),r++}return E}var i=n(1843),s=n(46540),a=n(3055),c=n(87811),u=n(38954),l=n(51850),f=n(4431),N=n(34727);function E(t,e,n,r,o,i=2){const s=1/(Math.abs(n)+Math.abs(r)+Math.abs(o)),a=n*s,c=r*s,u=o<=0?(a>=0?1:-1)*(1-Math.abs(c)):a,l=o<=0?(c>=0?1:-1)*(1-Math.abs(a)):c,f=e*i;t[f]=I(u),t[f+1]=I(l)}function I(t){return(0,N.qE)(Math.round(32767*t),-32767,32767)}n(11868);class O{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?p:d}write(t,e,n){v.seed=this._edgeHashFunction(n);const r=v.getIntRange(0,255),o=v.getIntRange(0,this.settings.variants-1),i=v.getFloat(),s=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(e,n.position0),t.position1.setVec(e,n.position1),t.componentIndex.set(e,n.componentIndex),t.variantOffset.set(e,r),t.variantStroke.set(e,o),t.variantExtension.set(e,s)}}const A=new Float32Array(6),T=new Uint32Array(A.buffer),h=new Uint32Array(1);function d(t){return A[0]=t.position0[0],A[1]=t.position0[1],A[2]=t.position0[2],A[3]=t.position1[0],A[4]=t.position1[1],A[5]=t.position1[2],h[0]=31*(31*(31*(31*(31*(166811+T[0])+T[1])+T[2])+T[3])+T[4])+T[5],h[0]}function p(t){const e=A;e[0]=g(t.position0[0]),e[1]=g(t.position0[1]),e[2]=g(t.position0[2]),e[3]=g(t.position1[0]),e[4]=g(t.position1[1]),e[5]=g(t.position1[2]),h[0]=5381;for(let t=0;t<T.length;t++)h[0]=31*h[0]+T[t];return h[0]}const S=1e4;function g(t){return Math.round(t*S)/S}class R{constructor(){this._commonWriter=new O}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return a.gr.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n),(0,u.g)(M,n.faceNormal0,n.faceNormal1),(0,u.n)(M,M);const{typedBuffer:r,typedBufferStride:o}=t.normalCompressed;E(r,e,M[0],M[1],M[2],o)}static{this.Layout=a.gr}static{this.glLayout=(0,f.U)(a.gr,1)}}class m{constructor(){this._commonWriter=new O}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return a.In.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n);{const{typedBuffer:r,typedBufferStride:o}=t.normalCompressed;E(r,e,n.faceNormal0[0],n.faceNormal0[1],n.faceNormal0[2],o)}{const{typedBuffer:r,typedBufferStride:o}=t.normal2Compressed;E(r,e,n.faceNormal1[0],n.faceNormal1[1],n.faceNormal1[2],o)}}static{this.Layout=a.In}static{this.glLayout=(0,f.U)(a.In,1)}}const M=(0,l.vt)(),v=new c.A;var C=n(93406);function P(t){const e=L(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return w.updateSettings(t.writerSettings),y.updateSettings(t.writerSettings),(0,C.K)(e,w,y)}function L(t,e,n,i){if(e){const e=o(n,i,t.count);return new U(n,i,e,t)}const s=(0,r.b)(t.buffer,t.stride/4,{originalIndices:n,originalIndicesLength:i}),c=o(s.indices,i,s.uniqueCount);return{faces:s.indices,facesLength:s.indices.length,neighbors:c,vertices:a.I$.createView(s.buffer)}}class U{constructor(t,e,n,r){this.faces=t,this.facesLength=e,this.neighbors=n,this.vertices=r}}const w=new R,y=new m,b=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1),D=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1).u16(s.r.COMPONENTINDEX)},74038:(t,e,n)=>{n.d(e,{_:()=>r});class r{constructor(t,e,n,r,o,i=!1,s=0){this.name=t,this.count=e,this.type=n,this.offset=r,this.stride=o,this.normalized=i,this.divisor=s}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8417],{40876:(e,t,r)=>{r.d(t,{TS:()=>n,Tf:()=>u,V6:()=>a,c4:()=>o,qh:()=>d,z$:()=>l});const i={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function a(e){return!!i[e]||!!i[e.toLowerCase()]}function n(e){return i[e]??i[e.toLowerCase()]}function o(e){return[...n(e)]}function s(e,t,r){r<0&&++r,r>1&&--r;const i=6*r;return i<1?e+(t-e)*i:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function l(e,t,r,i=1){const a=(e%360+360)%360/360,n=r<=.5?r*(t+1):r+t-r*t,o=2*r-n;return[Math.round(255*s(o,n,a+1/3)),Math.round(255*s(o,n,a)),Math.round(255*s(o,n,a-1/3)),i]}function d(e){const t=e.length>5,r=t?8:4,i=(1<<r)-1,a=t?1:17,n=t?9===e.length:5===e.length;let o=Number("0x"+e.slice(1));if(isNaN(o))return null;const s=[0,0,0,1];let l;return n&&(l=o&i,o>>=r,s[3]=a*l/255),l=o&i,o>>=r,s[2]=a*l,l=o&i,o>>=r,s[1]=a*l,l=o&i,o>>=r,s[0]=a*l,s}const u=2.2},69540:(e,t,r)=>{r.d(t,{A:()=>m});var i=r(90237),a=r(69622),n=(r(44208),r(4718)),o=(r(53966),r(97768)),s=r(35666),l=r(88620),d=r(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,r=e.store,i={},a=new Map;for(const e in t){const o=t[e],l=r?.originOf(e),d=o.clonable;if(o.readOnly||!1===d||l!==s.Gr.USER&&l!==s.Gr.DEFAULTS&&l!==s.Gr.WEB_MAP&&l!==s.Gr.WEB_SCENE)continue;const u=this[e];let c=null;c="function"==typeof d?d(u):"reference"===d?u:(0,n.TU)(u),null!=u&&null==c||(l===s.Gr.DEFAULTS?a.set(e,c):i[e]=c)}const d=new(0,Object.getPrototypeOf(this).constructor)(i);if(a.size){const e=(0,l.oY)(d)?.store;if(e)for(const[t,r]of a)e.set(t,r,s.Gr.DEFAULTS)}return d}};return t=(0,i._)([(0,d.$)("esri.core.Clonable")],t),t};let c=class extends(u(a.A)){};c=(0,i._)([(0,d.$)("esri.core.Clonable")],c),(c||(c={})).ClonableMixin=u;const m=c},93223:(e,t,r)=>{r.d(t,{e:()=>n});var i=r(66552),a=r(10107);function n(e,t={}){const r=e instanceof i.J?e:new i.J(e,t),{alwaysWriteDefaults:n,default:o,ignoreUnknown:s=!0,name:l,nonNullable:d,readOnly:u=!1}=t;return(0,a.MZ)({type:s?r.apiValues:String,json:{type:r.jsonValues,default:o,name:l,read:!u&&{reader:r.read},write:{writer:r.write,alwaysWriteDefaults:n}},nonNullable:d,readOnly:u})}},95488:(e,t,r)=>{r.d(t,{I:()=>a});var i=r(11406);class a extends i.T{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},91829:(e,t,r)=>{function i(){return[0,0,0,0]}function a(e,t,r,i){return[e,t,r,i]}function n(e,t,r,i){return[e,t,r,i]}function o(e,t=[0,0,0,0]){const r=Math.min(4,e.length);for(let i=0;i<r;++i)t[i]=e[i];return t}function s(){return a(1,1,1,1)}function l(){return a(1,0,0,0)}function d(){return a(0,1,0,0)}function u(){return a(0,0,1,0)}function c(){return a(0,0,0,1)}r.d(t,{CN:()=>n,Un:()=>p,ci:()=>o,fA:()=>a,uY:()=>m,vt:()=>i});const m=[0,0,0,0],p=s(),y=l(),h=d(),g=u(),T=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:p,UNIT_W:T,UNIT_X:y,UNIT_Y:h,UNIT_Z:g,ZEROS:m,clone:function(e){return[e[0],e[1],e[2],e[3]]},create:i,createView:function(e,t){return new Float64Array(e,t,4)},freeze:n,fromArray:o,fromValues:a,ones:s,unitW:c,unitX:l,unitY:d,unitZ:u,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},88930:(e,t,r)=>{r.d(t,{S1:()=>s,lL:()=>d,mi:()=>l,t:()=>u,vf:()=>o});var i=r(97770),a=r(56400),n=r(96285);const o={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8};function s(e,t,r,o=a.qU){const s=new n.oh((0,i.wj)(o)),l=n.c9.fromJSDate(e,{zone:s}),d="decades"===r||"centuries"===r?"year":c(r);return"decades"===r&&(t*=10),"centuries"===r&&(t*=100),l.plus({[d]:t}).toJSDate()}function l(e,t,r="milliseconds"){const i=e.getTime(),a=u(t,r,"milliseconds");return new Date(i+a)}function d(e,t,r=a.qU){const o=new n.oh((0,i.wj)(r)),s=n.c9.fromJSDate(e,{zone:o});if("decades"===t||"centuries"===t){const e=s.startOf("year"),{year:r}=e,i=r-r%("decades"===t?10:100);return e.set({year:i}).toJSDate()}const l=c(t);return s.startOf(l).toJSDate()}function u(e,t,r){return 0===e?0:e*o[t]/o[r]}function c(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}},65864:(e,t,r)=>{r.d(t,{$B:()=>h,Bi:()=>p,Rg:()=>m,U9:()=>u,ZC:()=>d,fT:()=>c,rS:()=>y,xD:()=>T});var i=r(5443),a=r(91075),n=r(48526),o=r(86738),s=r(39829),l=r(82799);function d(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function u(e){return void 0!==e.points}function c(e){return void 0!==e.x&&void 0!==e.y}function m(e){return void 0!==e.paths||void 0!==e.curvePaths}function p(e){return void 0!==e.rings||void 0!==e.curveRings}function y(e){return null==e?null:e instanceof a.A?e:c(e)?o.A.fromJSON(e):m(e)?l.A.fromJSON(e):p(e)?s.A.fromJSON(e):u(e)?n.A.fromJSON(e):d(e)?i.A.fromJSON(e):null}function h(e){return e?c(e)?"esriGeometryPoint":m(e)?"esriGeometryPolyline":p(e)?"esriGeometryPolygon":d(e)?"esriGeometryEnvelope":u(e)?"esriGeometryMultipoint":null:null}const g={esriGeometryPoint:o.A,esriGeometryPolyline:l.A,esriGeometryPolygon:s.A,esriGeometryEnvelope:i.A,esriGeometryMultipoint:n.A,esriGeometryMultiPatch:s.A};function T(e){return e&&g[e]||null}},50498:(e,t,r)=>{r.d(t,{Ye:()=>c,gy:()=>u,yR:()=>m});var i=r(66552),a=r(5443),n=r(91075),o=r(48526),s=r(86738),l=r(39829),d=r(82799);const u=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),c=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),m={base:n.A,key:"type",typeMap:{extent:a.A,multipoint:o.A,point:s.A,polyline:d.A,polygon:l.A}}},97770:(e,t,r)=>{r.d(t,{J2:()=>w,Yq:()=>v,_v:()=>g,wj:()=>A});var i=r(66552),a=r(73444),n=r(56400);r(96285),n.n$;const o={year:"numeric",month:"numeric",day:"numeric"},s={year:"numeric",month:"long",day:"numeric"},l={year:"numeric",month:"short",day:"numeric"},d={year:"numeric",month:"long",weekday:"long",day:"numeric"},u={hour:"numeric",minute:"numeric"},c={...u,second:"numeric"},m={hourCycle:"h23"},p={...u,...m},y={...c,...m},h={"short-date":o,"short-date-short-time":{...o,...u},"short-date-short-time-24":{...o,...p},"short-date-long-time":{...o,...c},"short-date-long-time-24":{...o,...y},"short-date-le":o,"short-date-le-short-time":{...o,...u},"short-date-le-short-time-24":{...o,...p},"short-date-le-long-time":{...o,...c},"short-date-le-long-time-24":{...o,...y},"long-month-day-year":s,"long-month-day-year-short-time":{...s,...u},"long-month-day-year-short-time-24":{...s,...p},"long-month-day-year-long-time":{...s,...c},"long-month-day-year-long-time-24":{...s,...y},"day-short-month-year":l,"day-short-month-year-short-time":{...l,...u},"day-short-month-year-short-time-24":{...l,...p},"day-short-month-year-long-time":{...l,...c},"day-short-month-year-long-time-24":{...l,...y},"long-date":d,"long-date-short-time":{...d,...u},"long-date-short-time-24":{...d,...p},"long-date-long-time":{...d,...c},"long-date-long-time-24":{...d,...y},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":u,"long-time":c},g=(0,i.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),T={ar:"ar-u-nu-latn-ca-gregory"};let S=new WeakMap;const f=h["short-date-short-time"];function w(e){return h[e]}function v(e,t=f){return function(e){let t=S.get(e);if(!t){const r=(0,a.JK)(),i=T[r]||r,o=A(e.timeZone??n.qU),s={...e,timeZone:o};t=new Intl.DateTimeFormat(i,s),S.set(e,t)}return t}(t).format(e)}function A(e){switch(e){case n.qU:return n.N5;case n.L5:return n.n$;default:return e}}(0,a.Ml)((()=>{S=new WeakMap}))},73444:(e,t,r)=>{r.d(t,{JK:()=>l,Ml:()=>p,Z0:()=>d,oQ:()=>c});var i=r(36563);let a;const n=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale,o=globalThis.document?.documentElement;function s(){const e=o?.getAttribute("lang"),t=globalThis.navigator?.language;return n??e??t??"en"}function l(){return void 0===a&&(a=s()),a}function d(e=l()){const t=/^([a-zA-Z]{2,3})(?:[_-][a-zA-Z0-9]+)*$/.exec(e);return t?.[1].toLowerCase()}const u=[];function c(e){return u.push(e),(0,i.hA)((()=>u.splice(u.indexOf(e),1)))}const m=[];function p(e){return m.push(e),(0,i.hA)((()=>m.splice(m.indexOf(e),1)))}function y(){const e=s();a!==e&&([...m].forEach((t=>t(e))),a=e,[...u].forEach((t=>t(e))))}globalThis.addEventListener?.("languagechange",y),o&&new MutationObserver((()=>{y()})).observe(o,{attributeFilter:["lang"]})},10838:(e,t,r)=>{r.d(t,{ao:()=>p,ud:()=>y,xO:()=>h});var i=r(49186),a=r(36563),n=r(74887),o=r(73444);const s=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,l={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:"no",nl:!0,no:!0,pl:!0,pt:"pt-BR","pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,zh:"zh-CN","zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function d(e){if(function(e){return e in l}(e)){const t=l[e];return!0===t?e:t}return null}const u=[],c=new Map;function m(e){for(const t of c.keys())g(e.pattern,t)&&c.delete(t)}function p(e){return u.includes(e)||(m(e),u.unshift(e)),(0,a.hA)((()=>{const t=u.indexOf(e);t>-1&&(u.splice(t,1),m(e))}))}async function y(e){const t=(0,o.JK)();c.has(e)||c.set(e,async function(e,t){const r=[];for(const i of u)if(g(i.pattern,e))try{return await i.fetchMessageBundle(e,t)}catch(e){r.push(e)}if(r.length)throw new i.A("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:r});throw new i.A("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const r=c.get(e);return r&&await T.add(r),r}function h(e){if(!s.test(e))return null;const t=s.exec(e);if(null===t)return null;const[,r,i]=t;return d(r+(i?"-"+i.toUpperCase():""))??d(r)}function g(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,o.Ml)((()=>{c.clear()}));const T=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,n.Tw)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},39357:(e,t,r)=>{r.d(t,{H:()=>l});var i,a=r(90237),n=r(25482),o=r(10107),s=(r(44208),r(53966),r(87811),r(40608));let l=i=class extends n.A{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,a._)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],l.prototype,"name",void 0),(0,a._)([(0,o.MZ)({type:[String,Number],json:{write:{isRequired:!0}}})],l.prototype,"code",void 0),l=i=(0,a._)([(0,s.$)("esri.layers.support.CodedValue")],l)},53177:(e,t,r)=>{r.d(t,{A:()=>m});var i,a=r(90237),n=r(4718),o=r(10107),s=(r(44208),r(53966),r(93223)),l=r(40608),d=r(39357),u=r(76357);let c=class extends u.A{static{i=this}constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new i({codedValues:(0,n.o8)(this.codedValues),name:this.name})}};(0,a._)([(0,o.MZ)({type:[d.H],json:{write:{isRequired:!0}}})],c.prototype,"codedValues",void 0),(0,a._)([(0,s.e)({codedValue:"coded-value"})],c.prototype,"type",void 0),c=i=(0,a._)([(0,l.$)("esri.layers.support.CodedValueDomain")],c);const m=c},76357:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(90237),a=r(66552),n=r(25482),o=r(10107),s=(r(44208),r(53966),r(87811),r(93223)),l=r(40608);const d=new a.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let u=class extends n.A{constructor(e){super(e),this.name=null,this.type=null}};(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,i._)([(0,s.e)(d),(0,o.MZ)({json:{write:{isRequired:!0}}})],u.prototype,"type",void 0),u=(0,i._)([(0,l.$)("esri.layers.support.Domain")],u);const c=u},20437:(e,t,r)=>{r.d(t,{A:()=>g});var i,a=r(90237),n=r(66552),o=r(25482),s=r(10107),l=r(56507),d=(r(44208),r(87811),r(93223)),u=r(36005),c=r(40608),m=r(80451),p=r(98453);const y=new n.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let h=class extends o.A{static{i=this}constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?y.fromJSON(r.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],h.prototype,"alias",void 0),(0,a._)([(0,s.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],h.prototype,"defaultValue",void 0),(0,a._)([(0,s.MZ)()],h.prototype,"description",void 0),(0,a._)([(0,u.w)("description")],h.prototype,"readDescription",null),(0,a._)([(0,s.MZ)({types:m.gK,json:{read:{reader:m.rS},write:!0}})],h.prototype,"domain",void 0),(0,a._)([(0,s.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"editable",void 0),(0,a._)([(0,s.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],h.prototype,"length",void 0),(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,a._)([(0,s.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"nullable",void 0),(0,a._)([(0,d.e)(p.m)],h.prototype,"type",void 0),(0,a._)([(0,s.MZ)()],h.prototype,"valueType",void 0),(0,a._)([(0,u.w)("valueType",["description"])],h.prototype,"readValueType",null),(0,a._)([(0,s.MZ)({type:Boolean,json:{read:!1}})],h.prototype,"visible",void 0),h=i=(0,a._)([(0,c.$)("esri.layers.support.Field")],h);const g=h},80451:(e,t,r)=>{r.d(t,{rS:()=>g,gK:()=>h}),r(44208);var i,a=r(53177),n=r(76357),o=r(90237),s=(r(53966),r(87811),r(49186),r(93223)),l=r(40608);let d=class extends n.A{static{i=this}constructor(e){super(e),this.type="inherited"}clone(){return new i}};(0,o._)([(0,s.e)({inherited:"inherited"})],d.prototype,"type",void 0),d=i=(0,o._)([(0,l.$)("esri.layers.support.InheritedDomain")],d);const u=d;var c,m=r(10107);let p=class extends n.A{static{c=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new c({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,o._)([(0,m.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]},isRequired:!0}}})],p.prototype,"maxValue",void 0),(0,o._)([(0,m.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]},isRequired:!0}}})],p.prototype,"minValue",void 0),(0,o._)([(0,s.e)({range:"range"})],p.prototype,"type",void 0),p=c=(0,o._)([(0,l.$)("esri.layers.support.RangeDomain")],p);const y=p,h={key:"type",base:n.A,typeMap:{range:y,"coded-value":a.A,inherited:u}};function g(e){if(!e?.type)return null;switch(e.type){case"range":return y.fromJSON(e);case"codedValue":return a.A.fromJSON(e);case"inherited":return u.fromJSON(e)}return null}},98453:(e,t,r)=>{r.d(t,{m:()=>i});const i=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},27733:(e,t,r)=>{r.d(t,{L:()=>R});var i,a=r(90237),n=r(66552),o=r(25482),s=r(10107),l=r(79901),d=r(93223),u=r(36005),c=r(40608),m=r(56507),p=r(90360),y=r(20437),h=r(49053),g=(r(44208),r(53966),r(87811),r(16930)),T=r(50498);let S=i=class extends o.A{constructor(e){super(e),this.type="query-table"}clone(){const{workspaceId:e,query:t,oidFields:r,spatialReference:a,geometryType:n}=this,o={workspaceId:e,query:t,oidFields:r,spatialReference:a?.clone()??void 0,geometryType:n};return new i(o)}};var f;(0,a._)([(0,d.e)({queryTable:"query-table"}),(0,s.MZ)({json:{write:{isRequired:!0}}})],S.prototype,"type",void 0),(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],S.prototype,"workspaceId",void 0),(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],S.prototype,"query",void 0),(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],S.prototype,"oidFields",void 0),(0,a._)([(0,s.MZ)({type:g.A,json:{write:!0}})],S.prototype,"spatialReference",void 0),(0,a._)([(0,d.e)(T.gy)],S.prototype,"geometryType",void 0),S=i=(0,a._)([(0,c.$)("esri.layers.support.source.QueryTableDataSource")],S);let w=f=class extends o.A{constructor(e){super(e),this.type="raster"}clone(){const{workspaceId:e,dataSourceName:t}=this;return new f({workspaceId:e,dataSourceName:t})}};var v;(0,a._)([(0,d.e)({raster:"raster"}),(0,s.MZ)({json:{write:{isRequired:!0}}})],w.prototype,"type",void 0),(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],w.prototype,"dataSourceName",void 0),(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],w.prototype,"workspaceId",void 0),w=f=(0,a._)([(0,c.$)("esri.layers.support.source.RasterDataSource")],w);let A=v=class extends o.A{constructor(e){super(e),this.type="table"}clone(){const{workspaceId:e,gdbVersion:t,dataSourceName:r}=this;return new v({workspaceId:e,gdbVersion:t,dataSourceName:r})}};var M,b;(0,a._)([(0,d.e)({table:"table"}),(0,s.MZ)({json:{write:{isRequired:!0}}})],A.prototype,"type",void 0),(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],A.prototype,"workspaceId",void 0),(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],A.prototype,"gdbVersion",void 0),(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],A.prototype,"dataSourceName",void 0),A=v=(0,a._)([(0,c.$)("esri.layers.support.source.TableDataSource")],A);const _=(0,n.O)()({esriLeftInnerJoin:"left-inner-join",esriLeftOuterJoin:"left-outer-join"});let j=M=class extends o.A{constructor(e){super(e),this.type="join-table"}readLeftTableSource(e,t,r){return Z()(e,t,r)}castLeftTableSource(e){return(0,m.aq)(k(),e)}readRightTableSource(e,t,r){return Z()(e,t,r)}castRightTableSource(e){return(0,m.aq)(k(),e)}clone(){const{leftTableKey:e,rightTableKey:t,leftTableSource:r,rightTableSource:i,joinType:a}=this,n={leftTableKey:e,rightTableKey:t,leftTableSource:r?.clone()??void 0,rightTableSource:i?.clone()??void 0,joinType:a};return new M(n)}};(0,a._)([(0,d.e)({joinTable:"join-table"}),(0,s.MZ)({json:{write:{isRequired:!0}}})],j.prototype,"type",void 0),(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],j.prototype,"leftTableKey",void 0),(0,a._)([(0,s.MZ)({type:String,json:{write:!0}})],j.prototype,"rightTableKey",void 0),(0,a._)([(0,s.MZ)({json:{write:!0}})],j.prototype,"leftTableSource",void 0),(0,a._)([(0,u.w)("leftTableSource")],j.prototype,"readLeftTableSource",null),(0,a._)([(0,l.w)("leftTableSource")],j.prototype,"castLeftTableSource",null),(0,a._)([(0,s.MZ)({json:{write:!0}})],j.prototype,"rightTableSource",void 0),(0,a._)([(0,u.w)("rightTableSource")],j.prototype,"readRightTableSource",null),(0,a._)([(0,l.w)("rightTableSource")],j.prototype,"castRightTableSource",null),(0,a._)([(0,d.e)(_)],j.prototype,"joinType",void 0),j=M=(0,a._)([(0,c.$)("esri.layers.support.source.JoinTableDataSource")],j);let C=null;function Z(){return C||(C=(0,p.C)({types:k()})),C}let E=null;function k(){return E||(E={key:"type",base:null,typeMap:{"data-layer":R,"map-layer":h.f}}),E}const x={key:"type",base:null,typeMap:{"join-table":j,"query-table":S,raster:w,table:A}};let R=class extends o.A{static{b=this}constructor(e){super(e),this.type="data-layer"}clone(){const{fields:e,dataSource:t}=this;return new b({fields:e,dataSource:t})}};(0,a._)([(0,d.e)({dataLayer:"data-layer"}),(0,s.MZ)({json:{write:{isRequired:!0}}})],R.prototype,"type",void 0),(0,a._)([(0,s.MZ)({type:[y.A],json:{write:!0}})],R.prototype,"fields",void 0),(0,a._)([(0,s.MZ)({types:x,json:{write:!0}})],R.prototype,"dataSource",void 0),R=b=(0,a._)([(0,c.$)("esri.layers.support.source.DataLayerSource")],R),R.from=(0,m.dp)(R)},49053:(e,t,r)=>{r.d(t,{f:()=>u});var i,a=r(90237),n=r(25482),o=r(10107),s=r(56507),l=(r(44208),r(87811),r(93223)),d=r(40608);let u=i=class extends n.A{constructor(e){super(e),this.type="map-layer"}clone(){const{mapLayerId:e,gdbVersion:t}=this;return new i({mapLayerId:e,gdbVersion:t})}};(0,a._)([(0,l.e)({mapLayer:"map-layer"}),(0,o.MZ)({json:{write:{isRequired:!0}}})],u.prototype,"type",void 0),(0,a._)([(0,o.MZ)({type:s.jz,json:{write:{isRequired:!0}}})],u.prototype,"mapLayerId",void 0),(0,a._)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"gdbVersion",void 0),u=i=(0,a._)([(0,d.$)("esri.layers.support.source.MapLayerSource")],u)},27348:(e,t,r)=>{r.d(t,{A:()=>p});var i,a=r(90237),n=r(66552),o=r(25482),s=r(4718),l=r(10107),d=(r(44208),r(53966),r(40608)),u=r(5443);const c=new n.J({upperLeft:"upper-left",lowerLeft:"lower-left"});let m=i=class extends o.A{constructor(e){super(e),this.extent=null,this.mode="view",this.originPosition="upper-left",this.tolerance=1}clone(){return new i((0,s.o8)({extent:this.extent,mode:this.mode,originPosition:this.originPosition,tolerance:this.tolerance}))}};(0,a._)([(0,l.MZ)({type:u.A,json:{write:{overridePolicy(){return{enabled:"view"===this.mode}}}}})],m.prototype,"extent",void 0),(0,a._)([(0,l.MZ)({type:["view","edit"],json:{write:!0}})],m.prototype,"mode",void 0),(0,a._)([(0,l.MZ)({type:String,json:{read:c.read,write:c.write}})],m.prototype,"originPosition",void 0),(0,a._)([(0,l.MZ)({type:Number,json:{write:{overridePolicy(){return{enabled:"view"===this.mode}}}}})],m.prototype,"tolerance",void 0),m=i=(0,a._)([(0,d.$)("esri.rest.support.QuantizationParameters")],m);const p=m},61956:(e,t,r)=>{r.d(t,{A:()=>Z});var i=r(90237),a=r(66552),n=r(25482),o=r(4718),s=r(10107),l=r(79901),d=r(93223),u=r(40608),c=r(43937),m=r(56507),p=r(86738),y=r(16930),h=r(65864),g=r(50498),T=r(27733),S=r(69540);r(44208),r(53966),r(87811);let f=class extends(S.A.ClonableMixin(n.A)){constructor(e){super(e),this.onFields=null,this.operator=null,this.searchTerm=null,this.searchType=null}};(0,i._)([(0,s.MZ)({type:[String],json:{write:{enabled:!0,overridePolicy(){return{enabled:null!=this.onFields&&this.onFields.length>0}}}}})],f.prototype,"onFields",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],f.prototype,"operator",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],f.prototype,"searchTerm",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],f.prototype,"searchType",void 0),f=(0,i._)([(0,u.$)("esri.rest.support.FullTextSearch")],f);const w=f;var v,A=r(27348),M=r(58174),b=r(7562),_=r(79677);const j=new a.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let C=class extends n.A{static{v=this}static from(e){return(0,m.PZ)(v,e)}constructor(e){super(e),this.aggregateIds=null,this.cacheHint=void 0,this.compactGeometryEnabled=!1,this.datumTransformation=null,this.defaultSpatialReferenceEnabled=!1,this.distance=void 0,this.dynamicDataSource=void 0,this.formatOf3DObjects=null,this.fullText=null,this.gdbVersion=null,this.geometry=null,this.geometryPrecision=void 0,this.groupByFieldsForStatistics=null,this.having=null,this.historicMoment=null,this.maxAllowableOffset=void 0,this.maxRecordCountFactor=1,this.multipatchOption=null,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.outStatistics=null,this.parameterValues=null,this.pixelSize=null,this.quantizationParameters=null,this.rangeValues=null,this.relationParameter=null,this.resultType=null,this.returnCentroid=!1,this.returnDistinctValues=!1,this.returnExceededLimitFeatures=!0,this.returnGeometry=!1,this.returnQueryGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.returnTrueCurves=void 0,this.sourceSpatialReference=null,this.spatialRelationship="intersects",this.start=void 0,this.sqlFormat=null,this.text=null,this.timeExtent=null,this.timeReferenceUnknownClient=!1,this.units=null,this.where=null}castDatumTransformation(e){return"number"==typeof e||"object"==typeof e?e:null}writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeParameterValues(e,t){if(e){const r={};for(const t in e){const i=e[t];Array.isArray(i)?r[t]=i.map((e=>e instanceof Date?e.getTime():e)):i instanceof Date?r[t]=i.getTime():r[t]=i}t.parameterValues=r}}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,t.where="1=1"}writeWhere(e,t){t.where=e||"1=1"}clone(){return new v((0,o.o8)({aggregateIds:this.aggregateIds,cacheHint:this.cacheHint,compactGeometryEnabled:this.compactGeometryEnabled,datumTransformation:this.datumTransformation,defaultSpatialReferenceEnabled:this.defaultSpatialReferenceEnabled,distance:this.distance,fullText:this.fullText,formatOf3DObjects:this.formatOf3DObjects,gdbVersion:this.gdbVersion,geometry:this.geometry,geometryPrecision:this.geometryPrecision,groupByFieldsForStatistics:this.groupByFieldsForStatistics,having:this.having,historicMoment:null!=this.historicMoment?new Date(this.historicMoment.getTime()):null,maxAllowableOffset:this.maxAllowableOffset,maxRecordCountFactor:this.maxRecordCountFactor,multipatchOption:this.multipatchOption,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,outStatistics:this.outStatistics,parameterValues:this.parameterValues,pixelSize:this.pixelSize,quantizationParameters:this.quantizationParameters,rangeValues:this.rangeValues,relationParameter:this.relationParameter,resultType:this.resultType,returnDistinctValues:this.returnDistinctValues,returnGeometry:this.returnGeometry,returnCentroid:this.returnCentroid,returnExceededLimitFeatures:this.returnExceededLimitFeatures,returnQueryGeometry:this.returnQueryGeometry,returnM:this.returnM,returnZ:this.returnZ,returnTrueCurves:this.returnTrueCurves,dynamicDataSource:this.dynamicDataSource,sourceSpatialReference:this.sourceSpatialReference,spatialRelationship:this.spatialRelationship,start:this.start,sqlFormat:this.sqlFormat,text:this.text,timeExtent:this.timeExtent,timeReferenceUnknownClient:this.timeReferenceUnknownClient,units:this.units,where:this.where}))}static{this.MAX_MAX_RECORD_COUNT_FACTOR=5}};(0,i._)([(0,s.MZ)({json:{write:!0}})],C.prototype,"aggregateIds",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{write:!0}})],C.prototype,"cacheHint",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{default:!1,write:!0}})],C.prototype,"compactGeometryEnabled",void 0),(0,i._)([(0,s.MZ)({json:{write:!0}})],C.prototype,"datumTransformation",void 0),(0,i._)([(0,l.w)("datumTransformation")],C.prototype,"castDatumTransformation",null),(0,i._)([(0,s.MZ)({type:Boolean,json:{default:!1,write:!0}})],C.prototype,"defaultSpatialReferenceEnabled",void 0),(0,i._)([(0,s.MZ)({type:Number,json:{write:!0}})],C.prototype,"distance",void 0),(0,i._)([(0,s.MZ)({type:T.L,json:{write:!0}})],C.prototype,"dynamicDataSource",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],C.prototype,"formatOf3DObjects",void 0),(0,i._)([(0,s.MZ)({type:[w],json:{write:{enabled:!0,overridePolicy(){return{enabled:null!=this.fullText&&this.fullText.length>0}}}}})],C.prototype,"fullText",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],C.prototype,"gdbVersion",void 0),(0,i._)([(0,s.MZ)({types:g.yR,json:{read:h.rS,write:!0}})],C.prototype,"geometry",void 0),(0,i._)([(0,s.MZ)({type:Number,json:{write:!0}})],C.prototype,"geometryPrecision",void 0),(0,i._)([(0,s.MZ)({type:[String],json:{write:!0}})],C.prototype,"groupByFieldsForStatistics",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],C.prototype,"having",void 0),(0,i._)([(0,s.MZ)({type:Date})],C.prototype,"historicMoment",void 0),(0,i._)([(0,c.K)("historicMoment")],C.prototype,"writeHistoricMoment",null),(0,i._)([(0,s.MZ)({type:Number,json:{write:!0}})],C.prototype,"maxAllowableOffset",void 0),(0,i._)([(0,s.MZ)({type:Number,cast:e=>e<1?1:e>C.MAX_MAX_RECORD_COUNT_FACTOR?C.MAX_MAX_RECORD_COUNT_FACTOR:e,json:{write:{overridePolicy:e=>({enabled:e>1})}}})],C.prototype,"maxRecordCountFactor",void 0),(0,i._)([(0,s.MZ)({type:["xyFootprint"],json:{write:!0}})],C.prototype,"multipatchOption",void 0),(0,i._)([(0,s.MZ)({type:Number,json:{read:{source:"resultRecordCount"}}})],C.prototype,"num",void 0),(0,i._)([(0,s.MZ)({json:{write:!0}})],C.prototype,"objectIds",void 0),(0,i._)([(0,s.MZ)({type:[String],json:{write:!0}})],C.prototype,"orderByFields",void 0),(0,i._)([(0,s.MZ)({type:[String],json:{write:!0}})],C.prototype,"outFields",void 0),(0,i._)([(0,s.MZ)({type:y.A,json:{name:"outSR",write:!0}})],C.prototype,"outSpatialReference",void 0),(0,i._)([(0,s.MZ)({type:[b.A],json:{write:{enabled:!0,overridePolicy(){return{enabled:null!=this.outStatistics&&this.outStatistics.length>0}}}}})],C.prototype,"outStatistics",void 0),(0,i._)([(0,s.MZ)({json:{write:!0}})],C.prototype,"parameterValues",void 0),(0,i._)([(0,c.K)("parameterValues")],C.prototype,"writeParameterValues",null),(0,i._)([(0,s.MZ)({type:p.A,json:{write:!0}})],C.prototype,"pixelSize",void 0),(0,i._)([(0,s.MZ)({type:A.A,json:{write:!0}})],C.prototype,"quantizationParameters",void 0),(0,i._)([(0,s.MZ)({type:[Object],json:{write:!0}})],C.prototype,"rangeValues",void 0),(0,i._)([(0,s.MZ)({type:String,json:{read:{source:"relationParam"},write:{target:"relationParam",overridePolicy(){return{enabled:"relation"===this.spatialRelationship}}}}})],C.prototype,"relationParameter",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],C.prototype,"resultType",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{default:!1,write:!0}})],C.prototype,"returnCentroid",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{default:!1,write:!0}})],C.prototype,"returnDistinctValues",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{default:!0,write:!0}})],C.prototype,"returnExceededLimitFeatures",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{write:!0}})],C.prototype,"returnGeometry",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{default:!1,write:!0}})],C.prototype,"returnQueryGeometry",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{default:!1,write:!0}})],C.prototype,"returnM",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],C.prototype,"returnZ",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{write:!0}})],C.prototype,"returnTrueCurves",void 0),(0,i._)([(0,s.MZ)({type:y.A,json:{write:!0}})],C.prototype,"sourceSpatialReference",void 0),(0,i._)([(0,d.e)(M.x,{ignoreUnknown:!1,name:"spatialRel"})],C.prototype,"spatialRelationship",void 0),(0,i._)([(0,s.MZ)({type:Number,json:{read:{source:"resultOffset"}}})],C.prototype,"start",void 0),(0,i._)([(0,c.K)("start"),(0,c.K)("num")],C.prototype,"writeStart",null),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],C.prototype,"sqlFormat",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],C.prototype,"text",void 0),(0,i._)([(0,s.MZ)({type:_.A,json:{write:!0}})],C.prototype,"timeExtent",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{default:!1,write:!0}})],C.prototype,"timeReferenceUnknownClient",void 0),(0,i._)([(0,d.e)(j,{ignoreUnknown:!1}),(0,s.MZ)({json:{write:{overridePolicy(e){return{enabled:!!e&&null!=this.distance}}}}})],C.prototype,"units",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:{overridePolicy(e){return{enabled:null!=e||null!=this.start&&this.start>0}}}}})],C.prototype,"where",void 0),(0,i._)([(0,c.K)("where")],C.prototype,"writeWhere",null),C=v=(0,i._)([(0,u.$)("esri.rest.support.Query")],C);const Z=C},7562:(e,t,r)=>{r.d(t,{A:()=>p});var i,a=r(90237),n=r(66552),o=r(25482),s=r(4718),l=r(10107),d=(r(44208),r(53966),r(40608)),u=r(43937);const c=new n.J({count:"count",sum:"sum",min:"min",max:"max",avg:"avg",stddev:"stddev",var:"var",exceedslimit:"exceedslimit",percentile_cont:"percentile-continuous",percentile_disc:"percentile-discrete",EnvelopeAggregate:"envelope-aggregate",CentroidAggregate:"centroid-aggregate",ConvexHullAggregate:"convex-hull-aggregate"});let m=i=class extends o.A{constructor(e){super(e),this.maxPointCount=void 0,this.maxRecordCount=void 0,this.maxVertexCount=void 0,this.onStatisticField=null,this.outStatisticFieldName=null,this.statisticType=null,this.statisticParameters=null}writeStatisticParameters(e,t){"percentile-continuous"!==this.statisticType&&"percentile-discrete"!==this.statisticType||(t.statisticParameters=(0,s.o8)(e))}clone(){return new i({maxPointCount:this.maxPointCount,maxRecordCount:this.maxRecordCount,maxVertexCount:this.maxVertexCount,onStatisticField:this.onStatisticField,outStatisticFieldName:this.outStatisticFieldName,statisticType:this.statisticType,statisticParameters:(0,s.o8)(this.statisticParameters)})}};(0,a._)([(0,l.MZ)({type:Number,json:{write:!0}})],m.prototype,"maxPointCount",void 0),(0,a._)([(0,l.MZ)({type:Number,json:{write:!0}})],m.prototype,"maxRecordCount",void 0),(0,a._)([(0,l.MZ)({type:Number,json:{write:!0}})],m.prototype,"maxVertexCount",void 0),(0,a._)([(0,l.MZ)({type:String,json:{write:!0}})],m.prototype,"onStatisticField",void 0),(0,a._)([(0,l.MZ)({type:String,json:{write:!0}})],m.prototype,"outStatisticFieldName",void 0),(0,a._)([(0,l.MZ)({type:String,json:{read:{source:"statisticType",reader:c.read},write:{target:"statisticType",writer:c.write}}})],m.prototype,"statisticType",void 0),(0,a._)([(0,l.MZ)({type:Object})],m.prototype,"statisticParameters",void 0),(0,a._)([(0,u.K)("statisticParameters")],m.prototype,"writeStatisticParameters",null),m=i=(0,a._)([(0,d.$)("esri.rest.support.StatisticDefinition")],m);const p=m},58174:(e,t,r)=>{r.d(t,{x:()=>i});const i=new(r(66552).J)({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"})},79677:(e,t,r)=>{r.d(t,{A:()=>p});var i,a=r(90237),n=r(25482),o=r(88930),s=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),d=r(40608),u=r(43937),c=r(56400);let m=class extends n.A{static{i=this}static get allTime(){return y}static get empty(){return h}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,a=e.end?.getTime()??e.end;return t===i&&r===a}expandTo(e,t=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.lL)(r,e,t));let a=this.end;if(a){const r=(0,o.lL)(a,e,t);a=a.getTime()===r.getTime()?r:(0,o.S1)(r,1,e,t)}return new i({start:r,end:a})}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,a=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,s;return a>=t&&a<=r?o=a:t>=a&&t<=n&&(o=t),r>=a&&r<=n?s=r:n>=t&&n<=r&&(s=n),null==o||null==s||isNaN(o)||isNaN(s)?i.empty:new i({start:o===-1/0?null:new Date(o),end:s===1/0?null:new Date(s)})}offset(e,t,r=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const a=new i,{start:n,end:s}=this;return null!=n&&(a.start=(0,o.S1)(n,e,t,r)),null!=s&&(a.end=(0,o.S1)(s,e,t,r)),a}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 y.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,a._)([(0,s.MZ)({type:Date,json:{write:{allowNull:!0}}})],m.prototype,"end",void 0),(0,a._)([(0,l.w)("end")],m.prototype,"readEnd",null),(0,a._)([(0,u.K)("end")],m.prototype,"writeEnd",null),(0,a._)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],m.prototype,"isAllTime",null),(0,a._)([(0,s.MZ)({readOnly:!0,json:{read:!1}})],m.prototype,"isEmpty",null),(0,a._)([(0,s.MZ)({type:Date,json:{write:{allowNull:!0}}})],m.prototype,"start",void 0),(0,a._)([(0,l.w)("start")],m.prototype,"readStart",null),(0,a._)([(0,u.K)("start")],m.prototype,"writeStart",null),m=i=(0,a._)([(0,d.$)("esri.time.TimeExtent")],m);const p=m,y=new m,h=new m({start:void 0,end:void 0})},56400:(e,t,r)=>{r.d(t,{ZS:()=>u,wr:()=>c,qU:()=>n,N5:()=>l,P6:()=>d,L5:()=>o,n$:()=>s});const i=new Map([["AUS Central Standard Time","Australia/Darwin"],["AUS Eastern Standard Time","Australia/Sydney"],["Afghanistan Standard Time","Asia/Kabul"],["Alaskan Standard Time","America/Anchorage"],["Aleutian Standard Time","America/Adak"],["Altai Standard Time","Asia/Barnaul"],["Arab Standard Time","Asia/Riyadh"],["Arabian Standard Time","Asia/Dubai"],["Arabic Standard Time","Asia/Baghdad"],["Argentina Standard Time","America/Buenos_Aires"],["Astrakhan Standard Time","Europe/Astrakhan"],["Atlantic Standard Time","America/Halifax"],["Aus Central W. Standard Time","Australia/Eucla"],["Azerbaijan Standard Time","Asia/Baku"],["Azores Standard Time","Atlantic/Azores"],["Bahia Standard Time","America/Bahia"],["Bangladesh Standard Time","Asia/Dhaka"],["Belarus Standard Time","Europe/Minsk"],["Bougainville Standard Time","Pacific/Bougainville"],["Canada Central Standard Time","America/Regina"],["Cape Verde Standard Time","Atlantic/Cape_Verde"],["Caucasus Standard Time","Asia/Yerevan"],["Cen. Australia Standard Time","Australia/Adelaide"],["Central America Standard Time","America/Guatemala"],["Central Asia Standard Time","Asia/Bishkek"],["Central Brazilian Standard Time","America/Cuiaba"],["Central Europe Standard Time","Europe/Budapest"],["Central European Standard Time","Europe/Warsaw"],["Central Pacific Standard Time","Pacific/Guadalcanal"],["Central Standard Time","America/Chicago"],["Central Standard Time (Mexico)","America/Mexico_City"],["Chatham Islands Standard Time","Pacific/Chatham"],["China Standard Time","Asia/Shanghai"],["Cuba Standard Time","America/Havana"],["Dateline Standard Time","Etc/GMT+12"],["E. Africa Standard Time","Africa/Nairobi"],["E. Australia Standard Time","Australia/Brisbane"],["E. Europe Standard Time","Europe/Chisinau"],["E. South America Standard Time","America/Sao_Paulo"],["Easter Island Standard Time","Pacific/Easter"],["Eastern Standard Time","America/New_York"],["Eastern Standard Time (Mexico)","America/Cancun"],["Egypt Standard Time","Africa/Cairo"],["Ekaterinburg Standard Time","Asia/Yekaterinburg"],["FLE Standard Time","Europe/Kiev"],["Fiji Standard Time","Pacific/Fiji"],["GMT Standard Time","Europe/London"],["GTB Standard Time","Europe/Bucharest"],["Georgian Standard Time","Asia/Tbilisi"],["Greenland Standard Time","America/Godthab"],["Greenwich Standard Time","Atlantic/Reykjavik"],["Haiti Standard Time","America/Port-au-Prince"],["Hawaiian Standard Time","Pacific/Honolulu"],["India Standard Time","Asia/Calcutta"],["Iran Standard Time","Asia/Tehran"],["Israel Standard Time","Asia/Jerusalem"],["Jordan Standard Time","Asia/Amman"],["Kaliningrad Standard Time","Europe/Kaliningrad"],["Korea Standard Time","Asia/Seoul"],["Libya Standard Time","Africa/Tripoli"],["Line Islands Standard Time","Pacific/Kiritimati"],["Lord Howe Standard Time","Australia/Lord_Howe"],["Magadan Standard Time","Asia/Magadan"],["Magallanes Standard Time","America/Punta_Arenas"],["Marquesas Standard Time","Pacific/Marquesas"],["Mauritius Standard Time","Indian/Mauritius"],["Middle East Standard Time","Asia/Beirut"],["Montevideo Standard Time","America/Montevideo"],["Morocco Standard Time","Africa/Casablanca"],["Mountain Standard Time","America/Denver"],["Mountain Standard Time (Mexico)","America/Mazatlan"],["Myanmar Standard Time","Asia/Rangoon"],["N. Central Asia Standard Time","Asia/Novosibirsk"],["Namibia Standard Time","Africa/Windhoek"],["Nepal Standard Time","Asia/Katmandu"],["New Zealand Standard Time","Pacific/Auckland"],["Newfoundland Standard Time","America/St_Johns"],["Norfolk Standard Time","Pacific/Norfolk"],["North Asia East Standard Time","Asia/Irkutsk"],["North Asia Standard Time","Asia/Krasnoyarsk"],["North Korea Standard Time","Asia/Pyongyang"],["Omsk Standard Time","Asia/Omsk"],["Pacific SA Standard Time","America/Santiago"],["Pacific Standard Time","America/Los_Angeles"],["Pacific Standard Time (Mexico)","America/Tijuana"],["Pakistan Standard Time","Asia/Karachi"],["Paraguay Standard Time","America/Asuncion"],["Qyzylorda Standard Time","Asia/Qyzylorda"],["Romance Standard Time","Europe/Paris"],["Russia Time Zone 10","Asia/Srednekolymsk"],["Russia Time Zone 11","Asia/Kamchatka"],["Russia Time Zone 3","Europe/Samara"],["Russian Standard Time","Europe/Moscow"],["SA Eastern Standard Time","America/Cayenne"],["SA Pacific Standard Time","America/Bogota"],["SA Western Standard Time","America/La_Paz"],["SE Asia Standard Time","Asia/Bangkok"],["Saint Pierre Standard Time","America/Miquelon"],["Sakhalin Standard Time","Asia/Sakhalin"],["Samoa Standard Time","Pacific/Apia"],["Sao Tome Standard Time","Africa/Sao_Tome"],["Saratov Standard Time","Europe/Saratov"],["Singapore Standard Time","Asia/Singapore"],["South Africa Standard Time","Africa/Johannesburg"],["South Sudan Standard Time","Africa/Juba"],["Sri Lanka Standard Time","Asia/Colombo"],["Sudan Standard Time","Africa/Khartoum"],["Syria Standard Time","Asia/Damascus"],["Taipei Standard Time","Asia/Taipei"],["Tasmania Standard Time","Australia/Hobart"],["Tocantins Standard Time","America/Araguaina"],["Tokyo Standard Time","Asia/Tokyo"],["Tomsk Standard Time","Asia/Tomsk"],["Tonga Standard Time","Pacific/Tongatapu"],["Transbaikal Standard Time","Asia/Chita"],["Turkey Standard Time","Europe/Istanbul"],["Turks And Caicos Standard Time","America/Grand_Turk"],["US Eastern Standard Time","America/Indianapolis"],["US Mountain Standard Time","America/Phoenix"],["UTC","Etc/GMT"],["UTC+01","Etc/GMT-1"],["UTC+02","Etc/GMT-2"],["UTC+03","Etc/GMT-3"],["UTC+04","Etc/GMT-4"],["UTC+05","Etc/GMT-5"],["UTC+06","Etc/GMT-6"],["UTC+07","Etc/GMT-7"],["UTC+08","Etc/GMT-8"],["UTC+09","Etc/GMT-9"],["UTC+10","Etc/GMT-10"],["UTC+11","Etc/GMT-11"],["UTC+12","Etc/GMT-12"],["UTC+13","Etc/GMT-13"],["UTC+14","Etc/GMT-14"],["UTC-01","Etc/GMT+1"],["UTC-02","Etc/GMT+2"],["UTC-03","Etc/GMT+3"],["UTC-04","Etc/GMT+4"],["UTC-05","Etc/GMT+5"],["UTC-06","Etc/GMT+6"],["UTC-07","Etc/GMT+7"],["UTC-08","Etc/GMT+8"],["UTC-09","Etc/GMT+9"],["UTC-10","Etc/GMT+10"],["UTC-11","Etc/GMT+11"],["UTC-12","Etc/GMT+12"],["Ulaanbaatar Standard Time","Asia/Ulaanbaatar"],["Venezuela Standard Time","America/Caracas"],["Vladivostok Standard Time","Asia/Vladivostok"],["Volgograd Standard Time","Europe/Volgograd"],["W. Australia Standard Time","Australia/Perth"],["W. Central Africa Standard Time","Africa/Lagos"],["W. Europe Standard Time","Europe/Berlin"],["W. Mongolia Standard Time","Asia/Hovd"],["West Asia Standard Time","Asia/Tashkent"],["West Bank Standard Time","Asia/Hebron"],["West Pacific Standard Time","Pacific/Port_Moresby"],["Yakutsk Standard Time","Asia/Yakutsk"],["Yukon Standard Time","America/Whitehorse"]]);var a=r(96285);const n="system",o="unknown",s="UTC",l=Intl.DateTimeFormat().resolvedOptions().timeZone;function d(e,t=!1){return{json:{read:{source:e,reader:(t,r)=>r[e]?u(r[e]):null},write:!!t&&{allowNull:!0,writer(t,r){r[e]=t?function(e){return{timeZoneIANA:e}}(t):null}}}}}function u(e,t=n){return e?function(e){return"timeZoneIANA"in e}(e)?e.timeZoneIANA:function(e,t=n){if(!e||!i.has(e.timeZone))return t;const r=i.get(e.timeZone);return function(e){return e.startsWith("UTC")}(e.timeZone)||e.respectsDaylightSaving?r:function(e){const t=a.c9.local().setZone(e),r=Math.min(t.set({month:1,day:1}).offset,t.set({month:5}).offset);return 0===r?"Etc/UTC":`Etc/GMT${a.mQ.instance(-r).formatOffset(0,"narrow")}`}(r)}(e,t):t}function c(e){const t=new Set(["etc/utc","etc/gmt","gmt"]),r=new Set(Intl.supportedValuesOf("timeZone").map((e=>e.toLowerCase())));return e===n||e===o||t.has(e.toLowerCase())||r.has(e.toLowerCase())}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5804,6183],{68197:(e,t,r)=>{r.d(t,{A:()=>p});var i,n,o=r(40876),s=r(34727),a=r(56507);function l(e){return(0,s.qE)((0,a.Vr)(e),0,255)}function u(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}function c(e,t){const r=e.toString(16).padStart(2,"0");return t?r.slice(0,1):r}class p{static blendColors(e,t,r,i=new p){return i.r=Math.round(e.r+(t.r-e.r)*r),i.g=Math.round(e.g+(t.g-e.g)*r),i.b=Math.round(e.b+(t.b-e.b)*r),i.a=e.a+(t.a-e.a)*r,i._sanitize()}static fromRgb(e,t){const r=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(r){const e=r[2].split(/\s*,\s*/),i=r[1];if("rgb"===i&&3===e.length||"rgba"===i&&4===e.length){const r=e[0];if("%"===r.charAt(r.length-1)){const r=e.map((e=>2.56*parseFloat(e)));return 4===e.length&&(r[3]=parseFloat(e[3])),p.fromArray(r,t)}return p.fromArray(e.map((e=>parseFloat(e))),t)}if("hsl"===i&&3===e.length||"hsla"===i&&4===e.length)return p.fromArray((0,o.z$)(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3])),t)}return null}static fromHex(e,t=new p){if("#"!==e[0]||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{const r=parseInt(e.slice(1,2),16),i=parseInt(e.slice(2,3),16),n=parseInt(e.slice(3,4),16),o=5===e.length?15:parseInt(e.slice(4),16);return p.fromArray([r+16*r,i+16*i,n+16*n,(o+16*o)/255],t)}case 7:case 9:{const r=parseInt(e.slice(1,3),16),i=parseInt(e.slice(3,5),16),n=parseInt(e.slice(5,7),16),o=7===e.length?255:parseInt(e.slice(7),16);return p.fromArray([r,i,n,o/255],t)}default:return null}}static fromArray(e,t=new p){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const r=(0,o.V6)(e)?(0,o.TS)(e):null;return r&&p.fromArray(r,t)||p.fromRgb(e,t)||p.fromHex(e,t)}static fromJSON(e){return null!=e?new p([e[0],e[1],e[2],(e[3]??255)/255]):void 0}static toUnitRGB(e){return null!=e?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e){return null!=e?[e.r/255,e.g/255,e.b/255,null!=e.a?e.a:1]:null}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){return"string"==typeof e?p.fromString(e,this):Array.isArray(e)?p.fromArray(e,this):(this._set(e.r??0,e.g??0,e.b??0,e.a??1),e instanceof p||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(e){const t=e?.capitalize??!1,r=e?.digits??6,i=3===r||4===r,n=4===r||8===r,o=`#${c(this.r,i)}${c(this.g,i)}${c(this.b,i)}${n?c(Math.round(255*this.a),i):""}`;return t?o.toUpperCase():o}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=p.AlphaMode.ALWAYS){const t=l(this.r),r=l(this.g),i=l(this.b);return e===p.AlphaMode.ALWAYS||1!==this.a?[t,r,i,l(255*this.a)]:[t,r,i]}clone(){return new p(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=Math.round(u(this.r,0,255)),this.g=Math.round(u(this.g,0,255)),this.b=Math.round(u(this.b,0,255)),this.a=u(this.a,0,1),this}_set(e,t,r,i){this.r=e,this.g=t,this.b=r,this.a=i}}p.prototype.declaredClass="esri.Color",(n=(i=p).AlphaMode||(i.AlphaMode={}))[n.ALWAYS=0]="ALWAYS",n[n.UNLESS_OPAQUE=1]="UNLESS_OPAQUE"},38954:(e,t,r)=>{r.d(t,{A:()=>y,B:()=>h,C:()=>c,D:()=>m,E:()=>p,G:()=>E,H:()=>F,a:()=>U,b:()=>g,c:()=>s,d:()=>u,e:()=>A,f:()=>x,g:()=>l,h:()=>f,i:()=>a,j:()=>v,k:()=>S,l:()=>o,m:()=>I,n:()=>_,o:()=>T,p:()=>P,q:()=>Z,s:()=>b,t:()=>j,u:()=>M,v:()=>w,w:()=>N,x:()=>d,y:()=>L,z:()=>q});var i=r(51850),n=r(34304);function o(e){const t=e[0],r=e[1],i=e[2];return Math.sqrt(t*t+r*r+i*i)}function s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function a(e,t,r,i){return e[0]=t,e[1]=r,e[2]=i,e}function l(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function u(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}function c(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e}function p(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}function d(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function h(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function y(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e}function m(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e}function f(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function g(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e}function v(e,t){const r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+i*i+n*n)}function b(e,t){const r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return r*r+i*i+n*n}function S(e){const t=e[0],r=e[1],i=e[2];return t*t+r*r+i*i}function w(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function M(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function _(e,t){const r=t[0],i=t[1],n=t[2];let o=r*r+i*i+n*n;return o>0&&(o=1/Math.sqrt(o),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o),e}function x(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function A(e,t,r){const i=t[0],n=t[1],o=t[2],s=r[0],a=r[1],l=r[2];return e[0]=n*l-o*a,e[1]=o*s-i*l,e[2]=i*a-n*s,e}function I(e,t,r,i){const n=t[0],o=t[1],s=t[2];return e[0]=n+i*(r[0]-n),e[1]=o+i*(r[1]-o),e[2]=s+i*(r[2]-s),e}function j(e,t,r){const i=t[0],n=t[1],o=t[2];return e[0]=r[0]*i+r[4]*n+r[8]*o+r[12],e[1]=r[1]*i+r[5]*n+r[9]*o+r[13],e[2]=r[2]*i+r[6]*n+r[10]*o+r[14],e}function Z(e,t,r){const i=t[0],n=t[1],o=t[2];return e[0]=i*r[0]+n*r[3]+o*r[6],e[1]=i*r[1]+n*r[4]+o*r[7],e[2]=i*r[2]+n*r[5]+o*r[8],e}function N(e,t,r){const i=r[0],n=r[1],o=r[2],s=r[3],a=t[0],l=t[1],u=t[2],c=n*u-o*l,p=o*a-i*u,d=i*l-n*a,h=n*d-o*p,y=o*c-i*d,m=i*p-n*c,f=2*s;return e[0]=a+c*f+2*h,e[1]=l+p*f+2*y,e[2]=u+d*f+2*m,e}const V=(0,i.vt)(),R=(0,i.vt)();function P(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function T(e,t,r){const i=r[0]-t[0],n=r[1]-t[1],o=r[2]-t[2];let s=i*i+n*n+o*o;return s>0?(s=1/Math.sqrt(s),e[0]=i*s,e[1]=n*s,e[2]=o*s,e):(e[0]=0,e[1]=0,e[2]=0,e)}const U=u,O=c,z=p,E=v,L=b,F=o,q=S;Object.freeze(Object.defineProperty({__proto__:null,abs:d,add:l,angle:function(e,t){_(V,e),_(R,t);const r=x(V,R);return r>1?0:r<-1?Math.PI:Math.acos(r)},bezier:function(e,t,r,i,n,o){const s=1-o,a=s*s,l=o*o,u=a*s,c=3*o*a,p=3*l*s,d=l*o;return e[0]=t[0]*u+r[0]*c+i[0]*p+n[0]*d,e[1]=t[1]*u+r[1]*c+i[1]*p+n[1]*d,e[2]=t[2]*u+r[2]*c+i[2]*p+n[2]*d,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},clamp:function(e,t=0,r=1){return e[0]=Math.min(Math.max(e[0],t),r),e[1]=Math.min(Math.max(e[1],t),r),e[2]=Math.min(Math.max(e[2],t),r),e},copy:s,cross:A,crossAndNormalize:function(e,t,r){const i=t[0],n=t[1],o=t[2],s=r[0],a=r[1],l=r[2],u=n*l-o*a,c=o*s-i*l,p=i*a-n*s,d=Math.sqrt(u*u+c*c+p*p);return e[0]=u/d,e[1]=c/d,e[2]=p/d,e},direction:T,dist:E,distance:v,div:z,divide:p,dot:x,equals:function(e,t){if(e===t)return!0;const r=e[0],i=e[1],o=e[2],s=t[0],a=t[1],l=t[2],u=(0,n.FD)();return Math.abs(r-s)<=u*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-a)<=u*Math.max(1,Math.abs(i),Math.abs(a))&&Math.abs(o-l)<=u*Math.max(1,Math.abs(o),Math.abs(l))},exactEquals:P,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,r,i,n,o){const s=o*o,a=s*(2*o-3)+1,l=s*(o-2)+o,u=s*(o-1),c=s*(3-2*o);return e[0]=t[0]*a+r[0]*l+i[0]*u+n[0]*c,e[1]=t[1]*a+r[1]*l+i[1]*u+n[1]*c,e[2]=t[2]*a+r[2]*l+i[2]*u+n[2]*c,e},inverse:M,len:F,length:o,lerp:I,max:m,min:y,mul:O,multiply:c,negate:w,normalize:_,random:function(e,t=1){const r=n.Ov,i=2*r()*Math.PI,o=2*r()-1,s=Math.sqrt(1-o*o)*t;return e[0]=Math.cos(i)*s,e[1]=Math.sin(i)*s,e[2]=o*t,e},rotateX:function(e,t,r,i){const n=[],o=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],o[0]=n[0],o[1]=n[1]*Math.cos(i)-n[2]*Math.sin(i),o[2]=n[1]*Math.sin(i)+n[2]*Math.cos(i),e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},rotateY:function(e,t,r,i){const n=[],o=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],o[0]=n[2]*Math.sin(i)+n[0]*Math.cos(i),o[1]=n[1],o[2]=n[2]*Math.cos(i)-n[0]*Math.sin(i),e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},rotateZ:function(e,t,r,i){const n=[],o=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],o[0]=n[0]*Math.cos(i)-n[1]*Math.sin(i),o[1]=n[0]*Math.sin(i)+n[1]*Math.cos(i),o[2]=n[2],e[0]=o[0]+r[0],e[1]=o[1]+r[1],e[2]=o[2]+r[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:f,scaleAndAdd:g,set:a,sign:h,sqrDist:L,sqrLen:q,squaredDistance:b,squaredLength:S,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:U,subtract:u,transformMat3:Z,transformMat4:j,transformQuat:N},Symbol.toStringTag,{value:"Module"}))},69052:(e,t,r)=>{r.d(t,{ie:()=>a});var i=r(34727);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return o(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+s(this.range,e-t,r)}minimalMonotonic(e,t,r){return o(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function o(e,t,r,i,n=0,o=!1){return(i-=n)<t?i+=s(e,t-i):i>r&&(i-=s(e,i-r)),o&&i===r&&(i=t),i+n}function s(e,t,r=0){return Math.ceil((t-r)/e)*e+r}new n(0,2*Math.PI),new n(-Math.PI,Math.PI);const a=new n(0,360)},80200:(e,t,r)=>{r.d(t,{T:()=>i,d:()=>m});const i={Base64:0,Hex:1,String:2,Raw:3},n=8,o=(1<<n)-1;function s(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*n;r<i;r+=n)t[r>>5]|=(e.charCodeAt(r/n)&o)<<r%32;return t}function l(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=n)t.push(String.fromCharCode(e[r>>5]>>>r%32&o));return t.join("")}function u(e,t,r,i,n,o){return s(function(e,t){return e<<t|e>>>32-t}(s(s(t,e),s(i,o)),n),r)}function c(e,t,r,i,n,o,s){return u(t&r|~t&i,e,t,n,o,s)}function p(e,t,r,i,n,o,s){return u(t&i|r&~i,e,t,n,o,s)}function d(e,t,r,i,n,o,s){return u(t^r^i,e,t,n,o,s)}function h(e,t,r,i,n,o,s){return u(r^(t|~i),e,t,n,o,s)}function y(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,n=-1732584194,o=271733878;for(let t=0;t<e.length;t+=16){const a=r,l=i,u=n,y=o;r=c(r,i,n,o,e[t],7,-680876936),o=c(o,r,i,n,e[t+1],12,-389564586),n=c(n,o,r,i,e[t+2],17,606105819),i=c(i,n,o,r,e[t+3],22,-1044525330),r=c(r,i,n,o,e[t+4],7,-176418897),o=c(o,r,i,n,e[t+5],12,1200080426),n=c(n,o,r,i,e[t+6],17,-1473231341),i=c(i,n,o,r,e[t+7],22,-45705983),r=c(r,i,n,o,e[t+8],7,1770035416),o=c(o,r,i,n,e[t+9],12,-1958414417),n=c(n,o,r,i,e[t+10],17,-42063),i=c(i,n,o,r,e[t+11],22,-1990404162),r=c(r,i,n,o,e[t+12],7,1804603682),o=c(o,r,i,n,e[t+13],12,-40341101),n=c(n,o,r,i,e[t+14],17,-1502002290),i=c(i,n,o,r,e[t+15],22,1236535329),r=p(r,i,n,o,e[t+1],5,-165796510),o=p(o,r,i,n,e[t+6],9,-1069501632),n=p(n,o,r,i,e[t+11],14,643717713),i=p(i,n,o,r,e[t],20,-373897302),r=p(r,i,n,o,e[t+5],5,-701558691),o=p(o,r,i,n,e[t+10],9,38016083),n=p(n,o,r,i,e[t+15],14,-660478335),i=p(i,n,o,r,e[t+4],20,-405537848),r=p(r,i,n,o,e[t+9],5,568446438),o=p(o,r,i,n,e[t+14],9,-1019803690),n=p(n,o,r,i,e[t+3],14,-187363961),i=p(i,n,o,r,e[t+8],20,1163531501),r=p(r,i,n,o,e[t+13],5,-1444681467),o=p(o,r,i,n,e[t+2],9,-51403784),n=p(n,o,r,i,e[t+7],14,1735328473),i=p(i,n,o,r,e[t+12],20,-1926607734),r=d(r,i,n,o,e[t+5],4,-378558),o=d(o,r,i,n,e[t+8],11,-2022574463),n=d(n,o,r,i,e[t+11],16,1839030562),i=d(i,n,o,r,e[t+14],23,-35309556),r=d(r,i,n,o,e[t+1],4,-1530992060),o=d(o,r,i,n,e[t+4],11,1272893353),n=d(n,o,r,i,e[t+7],16,-155497632),i=d(i,n,o,r,e[t+10],23,-1094730640),r=d(r,i,n,o,e[t+13],4,681279174),o=d(o,r,i,n,e[t],11,-358537222),n=d(n,o,r,i,e[t+3],16,-722521979),i=d(i,n,o,r,e[t+6],23,76029189),r=d(r,i,n,o,e[t+9],4,-640364487),o=d(o,r,i,n,e[t+12],11,-421815835),n=d(n,o,r,i,e[t+15],16,530742520),i=d(i,n,o,r,e[t+2],23,-995338651),r=h(r,i,n,o,e[t],6,-198630844),o=h(o,r,i,n,e[t+7],10,1126891415),n=h(n,o,r,i,e[t+14],15,-1416354905),i=h(i,n,o,r,e[t+5],21,-57434055),r=h(r,i,n,o,e[t+12],6,1700485571),o=h(o,r,i,n,e[t+3],10,-1894986606),n=h(n,o,r,i,e[t+10],15,-1051523),i=h(i,n,o,r,e[t+1],21,-2054922799),r=h(r,i,n,o,e[t+8],6,1873313359),o=h(o,r,i,n,e[t+15],10,-30611744),n=h(n,o,r,i,e[t+6],15,-1560198380),i=h(i,n,o,r,e[t+13],21,1309151649),r=h(r,i,n,o,e[t+4],6,-145523070),o=h(o,r,i,n,e[t+11],10,-1120210379),n=h(n,o,r,i,e[t+2],15,718787259),i=h(i,n,o,r,e[t+9],21,-343485551),r=s(r,a),i=s(i,l),n=s(n,u),o=s(o,y)}return[r,i,n,o]}function m(e,t=i.Hex){const r=t||i.Base64,o=y(a(e),e.length*n);switch(r){case i.Raw:return o;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,n=4*e.length;i<n;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("")}(o);case i.String:return l(o);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 n=0;n<4;n++)8*r+6*n>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-n)&63))}return t.join("")}(o)}}},92071:(e,t,r)=>{r.d(t,{P:()=>b,L:()=>S});var i=r(90237),n=r(69622),o=r(76953),s=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,s.o8)(e),a.Gr.DEFAULTS)}));for(let r=a.Gr.SERVICE;r<a.AU;r++){const i=this._originStores[r];i&&i.forEach(((i,n)=>{e&&e.has(n)||t.set(n,(0,s.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),n=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),n!==i}originOf(e){return this._propertyOriginMap.get(e)||a.Gr.DEFAULTS}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,o.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 n={};return e.forEach((e=>{n[e]=r.get(e,i)})),n}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),n=(0,c.oY)(this);let o;o="string"==typeof e?"*"===e?r.keys(i):[e]:e,o.forEach((e=>{n.invalidate(e),r.revert(e,i),n.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(n.A)){};y=(0,i._)([(0,p.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],y);var m=r(16649),f=r(49422);const g=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return v(this).delete(e,(0,a.aB)(t))}write(e,t){return(0,f.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),n=(0,m.Jt)(this,e);for(let t=i+1;t<a.AU;++t)r.delete(e,t);r.set(e,n,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 b=e=>{let t=class extends(g(d(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,p.$)("esri.core.MultiOriginJSONSupport")],t),t};let S=class extends(b(n.A)){};S=(0,i._)([(0,p.$)("esri.core.MultiOriginJSONSupport")],S)},87024:(e,t,r)=>{r.d(t,{P:()=>h});var i=r(49186),n=r(80200),o=r(76553),s=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 n=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 n=(0,d.r)(e,t,r);return i.type===String?n:"function"==typeof i.type?new i.type({url:n}):void 0},write:{isRequired:i.json?.write?.isRequired,writer(t,n,a,l){if(!l?.resources)return"string"==typeof t?void(n[a]=(0,d.t)(t,l)):void(n[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),g=i.type!==String&&(!(0,o.H)(this)||l?.origin&&this.originIdOf(r)>(0,u.aB)(l.origin)),v={object:this,propertyName:r,value:t,targetUrl:h,dest:n,targetPropertyName:a,context:l,params:e};l?.portalItem&&h&&!(0,s.oP)(h)?g&&e?.contentAddressed?y(v):g?function(e){const{context:t,targetUrl:r,params:i,value:n,dest:o,targetPropertyName:a}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),u=f(n,r,t),c=(0,p.n)(u),d=(0,s.Zo)(l.path),h=i?.compress??!1;c===d?(t.resources&&m({...e,resource:l,content:u,compress:h,updates:t.resources.toUpdate}),o[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,s.w8)(h)||g)?y(v):n[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 n)t[e]=n[e]}}}function y(e){const{targetUrl:t,params:r,value:o,context:l,dest:u,targetPropertyName:c}=e;if(!l.portalItem)return;const h=(0,d.p)(t),y=f(o,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 g=r?.contentAddressed&&"json"===y.type?(0,n.d)(y.jsonString):h?.filename??(0,a.lk)(),v=(0,s.fj)(r?.prefix??h?.prefix,g),b=`${v}.${(0,p.n)(y)}`;if(r?.contentAddressed&&l.resources&&"json"===y.type){const e=l.resources.toKeep.find((({resource:e})=>e.path===b))??l.resources.toAdd.find((({resource:e})=>e.path===b));if(e)return void(u[c]=e.resource.itemRelativeUrl)}const S=l.portalItem.resourceFromPath(b);(0,s.w8)(t)&&l.resources&&l.resources.pendingOperations.push((0,s.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&&m({...e,resource:S,content:y,compress:w,updates:l.resources.toAdd}),u[c]=S.itemRelativeUrl}function m({object:e,propertyName:t,updates:r,resource:i,content:n,compress:o}){r.push({resource:i,content:n,compress:o,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function f(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},46130:(e,t,r)=>{r.d(t,{v:()=>n});var i=r(76553);function n(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,i.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},62885:(e,t,r)=>{r.d(t,{H:()=>o,V:()=>n});var i=r(5503);function n(e,t,r=i.A){return t||(t=new r),t===e||(t.removeAll(),(n=e)&&(Array.isArray(n)||"items"in n&&Array.isArray(n.items))?t.addMany(e):e&&t.add(e)),t;var n}function o(e){return e}},29242:(e,t,r)=>{function i(){return[1,0,0,0,1,0,0,0,1]}function n(e,t,r,i,n,o,s,a,l){return[e,t,r,i,n,o,s,a,l]}r.d(t,{fA:()=>n,vt:()=>i,zK:()=>o});const o=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:i,createView:function(e,t){return new Float64Array(e,t,9)},fromValues:n},Symbol.toStringTag,{value:"Module"}))},82534:(e,t,r)=>{function i(){return[0,0,0,1]}function n(e){return[e[0],e[1],e[2],e[3]]}r.d(t,{o8:()=>n,vt:()=>i,zK:()=>o});const o=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:n,create:i,fromValues:function(e,t,r,i){return[e,t,r,i]}},Symbol.toStringTag,{value:"Module"}))},67026:(e,t,r)=>{r.d(t,{A6:()=>m,Xd:()=>c,Xr:()=>h,hZ:()=>g,lw:()=>p,t2:()=>Z,x8:()=>u});var i=r(29242),n=r(82534),o=r(51850),s=r(34304),a=r(38954),l=r(87317);function u(e,t,r){r*=.5;const i=Math.sin(r);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(r),e}function c(e,t){const r=2*Math.acos(t[3]),i=Math.sin(r/2);return i>(0,s.FD)()?(e[0]=t[0]/i,e[1]=t[1]/i,e[2]=t[2]/i):(e[0]=1,e[1]=0,e[2]=0),r}function p(e,t,r){const i=t[0],n=t[1],o=t[2],s=t[3],a=r[0],l=r[1],u=r[2],c=r[3];return e[0]=i*c+s*a+n*u-o*l,e[1]=n*c+s*l+o*a-i*u,e[2]=o*c+s*u+i*l-n*a,e[3]=s*c-i*a-n*l-o*u,e}function d(e,t,r,i){const n=t[0],o=t[1],a=t[2],l=t[3];let u,c,p,d,h,y=r[0],m=r[1],f=r[2],g=r[3];return c=n*y+o*m+a*f+l*g,c<0&&(c=-c,y=-y,m=-m,f=-f,g=-g),1-c>(0,s.FD)()?(u=Math.acos(c),p=Math.sin(u),d=Math.sin((1-i)*u)/p,h=Math.sin(i*u)/p):(d=1-i,h=i),e[0]=d*n+h*y,e[1]=d*o+h*m,e[2]=d*a+h*f,e[3]=d*l+h*g,e}function h(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function y(e,t){const r=t[0]+t[4]+t[8];let i;if(r>0)i=Math.sqrt(r+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const n=(r+1)%3,o=(r+2)%3;i=Math.sqrt(t[3*r+r]-t[3*n+n]-t[3*o+o]+1),e[r]=.5*i,i=.5/i,e[3]=(t[3*n+o]-t[3*o+n])*i,e[n]=(t[3*n+r]+t[3*r+n])*i,e[o]=(t[3*o+r]+t[3*r+o])*i}return e}function m(e,t,r,i){const n=.5*Math.PI/180;t*=n,r*=n,i*=n;const o=Math.sin(t),s=Math.cos(t),a=Math.sin(r),l=Math.cos(r),u=Math.sin(i),c=Math.cos(i);return e[0]=o*l*c-s*a*u,e[1]=s*a*c+o*l*u,e[2]=s*l*u-o*a*c,e[3]=s*l*c+o*a*u,e}const f=l.c,g=l.s,v=l.g,b=p,S=l.b,w=l.h,M=l.l,_=l.j,x=_,A=l.f,I=A,j=l.n,Z=l.a,N=l.e,V=(0,o.vt)(),R=(0,o.fA)(1,0,0),P=(0,o.fA)(0,1,0),T=(0,n.vt)(),U=(0,n.vt)(),O=(0,i.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:v,calculateW:function(e,t){const r=t[0],i=t[1],n=t[2];return e[0]=r,e[1]=i,e[2]=n,e[3]=Math.sqrt(Math.abs(1-r*r-i*i-n*n)),e},conjugate:h,copy:f,dot:w,equals:N,exactEquals:Z,fromEuler:m,fromMat3:y,getAxisAngle:c,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},invert:function(e,t){const r=t[0],i=t[1],n=t[2],o=t[3],s=r*r+i*i+n*n+o*o,a=s?1/s:0;return e[0]=-r*a,e[1]=-i*a,e[2]=-n*a,e[3]=o*a,e},len:x,length:_,lerp:M,mul:b,multiply:p,normalize:j,random:function(e){const t=s.Ov,r=t(),i=t(),n=t(),o=Math.sqrt(1-r),a=Math.sqrt(r);return e[0]=o*Math.sin(2*Math.PI*i),e[1]=o*Math.cos(2*Math.PI*i),e[2]=a*Math.sin(2*Math.PI*n),e[3]=a*Math.cos(2*Math.PI*n),e},rotateX:function(e,t,r){r*=.5;const i=t[0],n=t[1],o=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=i*l+s*a,e[1]=n*l+o*a,e[2]=o*l-n*a,e[3]=s*l-i*a,e},rotateY:function(e,t,r){r*=.5;const i=t[0],n=t[1],o=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=i*l-o*a,e[1]=n*l+s*a,e[2]=o*l+i*a,e[3]=s*l-n*a,e},rotateZ:function(e,t,r){r*=.5;const i=t[0],n=t[1],o=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=i*l+n*a,e[1]=n*l-i*a,e[2]=o*l+s*a,e[3]=s*l-o*a,e},rotationTo:function(e,t,r){const i=(0,a.f)(t,r);return i<-.999999?((0,a.e)(V,R,t),(0,a.H)(V)<1e-6&&(0,a.e)(V,P,t),(0,a.n)(V,V),u(e,V,Math.PI),e):i>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,a.e)(V,t,r),e[0]=V[0],e[1]=V[1],e[2]=V[2],e[3]=1+i,j(e,e))},scale:S,set:g,setAxes:function(e,t,r,i){const n=O;return n[0]=r[0],n[3]=r[1],n[6]=r[2],n[1]=i[0],n[4]=i[1],n[7]=i[2],n[2]=-t[0],n[5]=-t[1],n[8]=-t[2],j(e,y(e,n))},setAxisAngle:u,slerp:d,sqlerp:function(e,t,r,i,n,o){return d(T,t,n,o),d(U,r,i,o),d(e,T,U,2*o*(1-o)),e},sqrLen:I,squaredLength:A,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}},Symbol.toStringTag,{value:"Module"}))},76553:(e,t,r)=>{function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>i})},13069:(e,t,r)=>{r.d(t,{AG:()=>a,lk:()=>n,vD:()=>s,yS:()=>o});const i="randomUUID"in crypto;function n(){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 o(){return`{${n().toUpperCase()}}`}function s(){return`{${n()}}`}function a(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},54239:(e,t,r)=>{r.d(t,{A:()=>b});var i,n=r(90237),o=r(4576),s=r(66552),a=r(25482),l=r(83047),u=r(67076),c=r(10107),p=(r(44208),r(53966),r(36005)),d=r(40608),h=r(43937);const y=(0,s.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=y.jsonValues.slice();(0,o.Xy)(m,"orthometric");const f=(0,s.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let g=i=class extends a.A{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r?.messages&&r.messages.push(function(e,t){return new u.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return f.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.LA)(e)||f.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({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 r=(0,l.k1)(t);return new i({heightModel:e.heightModel,heightUnit:r??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 i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new u.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,n._)([(0,c.MZ)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal",write:{isRequired:!0}}}}})],g.prototype,"heightModel",void 0),(0,n._)([(0,h.K)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,n._)([(0,p.w)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,n._)([(0,c.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f.jsonValues,write:{writer:f.write,isRequired:!0}}}}})],g.prototype,"heightUnit",void 0),(0,n._)([(0,p.w)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,n._)([(0,p.w)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,n._)([(0,c.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,n._)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=i=(0,n._)([(0,d.$)("esri.geometry.HeightModelInfo")],g);const b=g},4146:(e,t,r)=>{r.d(t,{A:()=>S});var i=r(90237),n=r(78888),o=r(49186),s=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),m=r(16930),f=r(92602),g=r(79677);let v=0,b=class extends(s.A.EventedMixin(a.A.IdentifiableMixin(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,m.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=m.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",n=r?.portal?.url||f.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', 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 o.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,n.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new o.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,d.MZ)({type:String})],b.prototype,"attributionDataUrl",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],b.prototype,"effectiveVisible",null),(0,i._)([(0,d.MZ)({type:y.A})],b.prototype,"fullExtent",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],b.prototype,"hasAttributionData",null),(0,i._)([(0,d.MZ)({type:String,clonable:!1})],b.prototype,"id",void 0),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),(0,i._)([(0,d.MZ)({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),(0,i._)([(0,d.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),(0,i._)([(0,d.MZ)({clonable:!1})],b.prototype,"parent",void 0),(0,i._)([(0,d.MZ)({readOnly:!0})],b.prototype,"parsedUrl",null),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],b.prototype,"persistenceEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean})],b.prototype,"popupEnabled",void 0),(0,i._)([(0,d.MZ)({type:Boolean})],b.prototype,"attributionVisible",void 0),(0,i._)([(0,d.MZ)({type:m.A})],b.prototype,"spatialReference",void 0),(0,i._)([(0,d.MZ)({type:String})],b.prototype,"title",void 0),(0,i._)([(0,d.MZ)({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),(0,i._)([(0,d.MZ)()],b.prototype,"url",void 0),(0,i._)([(0,d.MZ)({type:g.A})],b.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,d.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=(0,i._)([(0,h.$)("esri.layers.Layer")],b);const S=b},16183:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ye});var i=r(90237),n=r(13874),o=r(5503),s=r(49186),a=r(53966),l=r(92071),u=r(74887),c=r(10107),p=r(56507),d=(r(44208),r(87811),r(36005)),h=r(40608),y=r(38954),m=r(51850),f=r(5443),g=r(4146),v=r(52136),b=r(18768),S=r(69208),w=r(16131),M=r(8303),_=r(25036),x=r(58947),A=r(60694),I=r(10873),j=r(20437),Z=r(95466),N=r(96184),V=r(69540),R=r(69052),P=r(25482),T=r(87024),U=r(67026),O=r(82534),z=r(34304);const E=(0,m.vt)(),L=(0,O.vt)(),F=(0,O.vt)(),q=(0,O.vt)(),$=(0,m.fA)(0,0,1),D=(0,m.fA)(0,1,0),C=(0,m.fA)(1,0,0);function B(e){(0,y.c)(E,e),(0,y.n)(E,E);const t=Math.atan2(E[1],E[0]),r=(0,U.x8)((0,O.vt)(),$,-t);(0,y.w)(E,E,r);const i=-1*Math.atan2(E[2],E[0]);return[(0,z.ct)(t)+270,(0,z.ct)(i)+90]}function k(e,t){return(0,U.x8)(F,$,(0,z.DF)(e-270)),(0,U.x8)(q,D,(0,z.DF)(t-90)),(0,U.lw)(L,F,q),(0,y.c)(E,C),(0,y.w)(E,E,L),(0,y.n)(E,E),[E[0],E[1],E[2]]}var H=r(79901);let K=class extends(V.A.ClonableMixin(P.A)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=B(this.normal);return R.ie.normalize((0,p.GB)(e),0,!0)}set orientation(e){const t=k(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=B(this.normal);return R.ie.normalize((0,p.GB)(t),0,!0)}set tilt(e){const t=k(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,c.MZ)({type:Boolean,json:{write:!0}})],K.prototype,"enabled",void 0),(0,i._)([(0,c.MZ)({type:String,json:{write:!0}})],K.prototype,"label",void 0),(0,i._)([(0,c.MZ)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,H.w)((e=>R.ie.normalize((0,p.GB)(e),0,!0)))],K.prototype,"orientation",null),(0,i._)([(0,c.MZ)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,H.w)((e=>R.ie.normalize((0,p.GB)(e),0,!0)))],K.prototype,"tilt",null),(0,i._)([(0,c.MZ)({type:[Number],json:{write:{isRequired:!0}}})],K.prototype,"normal",void 0),(0,i._)([(0,c.MZ)({type:[Number],json:{write:{isRequired:!0}}})],K.prototype,"point",void 0),K=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelSlice")],K);const J=K;var G=r(97159);let W=class extends(V.A.ClonableMixin(P.A)){constructor(){super(...arguments),this.enabled=!0,this.href=null,this.id=null,this.label="",this.normal=null,this.point=null,this.sizeInPixel=null,this.slices=null,this.timeId=0,this.variableId=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=B(this.normal);return R.ie.normalize((0,p.GB)(e),0,!0)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=B(this.normal);return R.ie.normalize((0,p.GB)(t),0,!0)}};(0,i._)([(0,c.MZ)({type:Boolean,json:{default:!0,write:!0}})],W.prototype,"enabled",void 0),(0,i._)([(0,c.MZ)({type:String,json:{origins:{service:{read:G.r},"web-scene":{write:{isRequired:!0}}},write:!0}}),(0,T.P)({origins:["web-scene"],type:"resource",prefix:"sections",compress:!0})],W.prototype,"href",void 0),(0,i._)([(0,c.MZ)({type:p.jz,json:{write:{enabled:!0,isRequired:!0}}})],W.prototype,"id",void 0),(0,i._)([(0,c.MZ)({type:String,json:{write:!0}})],W.prototype,"label",void 0),(0,i._)([(0,c.MZ)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],W.prototype,"orientation",null),(0,i._)([(0,c.MZ)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],W.prototype,"tilt",null),(0,i._)([(0,c.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],W.prototype,"normal",void 0),(0,i._)([(0,c.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],W.prototype,"point",void 0),(0,i._)([(0,c.MZ)({type:[p.jz],json:{write:{enabled:!0,isRequired:!0}}})],W.prototype,"sizeInPixel",void 0),(0,i._)([(0,c.MZ)({type:[J],json:{write:!0}})],W.prototype,"slices",void 0),(0,i._)([(0,c.MZ)({type:p.jz,json:{default:0,write:!0}})],W.prototype,"timeId",void 0),(0,i._)([(0,c.MZ)({type:p.jz,json:{write:{enabled:!0,isRequired:!0}}})],W.prototype,"variableId",void 0),W=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelSection")],W);const Y=W;let Q=class extends P.A{constructor(){super(...arguments),this.diffuseFactor=.5,this.specularFactor=.5}};(0,i._)([(0,c.MZ)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],Q.prototype,"diffuseFactor",void 0),(0,i._)([(0,c.MZ)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],Q.prototype,"specularFactor",void 0),Q=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelSimpleShading")],Q);const X=Q;let ee=class extends P.A{constructor(){super(...arguments),this.continuity=null,this.hasNoData=!1,this.noData=0,this.offset=0,this.scale=1,this.type=null}};(0,i._)([(0,c.MZ)({type:["discrete","continuous"],json:{write:!0}})],ee.prototype,"continuity",void 0),(0,i._)([(0,c.MZ)({type:Boolean,json:{write:!0}})],ee.prototype,"hasNoData",void 0),(0,i._)([(0,c.MZ)({type:Number,json:{write:!0}})],ee.prototype,"noData",void 0),(0,i._)([(0,c.MZ)({type:Number,json:{write:!0}})],ee.prototype,"offset",void 0),(0,i._)([(0,c.MZ)({type:Number,json:{write:!0}})],ee.prototype,"scale",void 0),(0,i._)([(0,c.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],ee.prototype,"type",void 0),ee=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelFormat")],ee);const te=ee;let re=class extends P.A{constructor(){super(...arguments),this.id=null,this.description="",this.name=null,this.originalFormat=null,this.renderingFormat=null,this.unit="",this.volumeId=0,this.type=null}};(0,i._)([(0,c.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],re.prototype,"id",void 0),(0,i._)([(0,c.MZ)({type:String,json:{write:!0}})],re.prototype,"description",void 0),(0,i._)([(0,c.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],re.prototype,"name",void 0),(0,i._)([(0,c.MZ)({type:te,json:{write:!0}})],re.prototype,"originalFormat",void 0),(0,i._)([(0,c.MZ)({type:te,json:{write:{enabled:!0,isRequired:!0}}})],re.prototype,"renderingFormat",void 0),(0,i._)([(0,c.MZ)({type:String,json:{write:!0}})],re.prototype,"unit",void 0),(0,i._)([(0,c.MZ)({type:Number,json:{write:!0}})],re.prototype,"volumeId",void 0),(0,i._)([(0,c.MZ)({type:["stc-hot-spot-results","stc-cluster-outlier-results","stc-estimated-bin","generic-nearest-interpolated"],json:{write:!0}})],re.prototype,"type",void 0),re=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelVariable")],re);const ie=re;var ne=r(4718),oe=r(68197);let se=class extends(V.A.ClonableMixin(P.A)){constructor(){super(...arguments),this.color=oe.A.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label="",this.colorLocked=!1}};(0,i._)([(0,c.MZ)({type:oe.A,json:{type:[p.jz],write:{enabled:!0,isRequired:!0}}})],se.prototype,"color",void 0),(0,i._)([(0,c.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],se.prototype,"value",void 0),(0,i._)([(0,c.MZ)({type:Boolean,json:{default:!0,write:!0}})],se.prototype,"enabled",void 0),(0,i._)([(0,c.MZ)({type:String,json:{write:!0}})],se.prototype,"label",void 0),(0,i._)([(0,c.MZ)({type:Boolean,json:{default:!1,write:!0}})],se.prototype,"colorLocked",void 0),se=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelIsosurface")],se);const ae=se;var le=r(62885),ue=r(34727);let ce=class extends(V.A.ClonableMixin(P.A)){constructor(){super(...arguments),this.color=null,this.position=0}};(0,i._)([(0,c.MZ)({type:oe.A,json:{type:[p.jz],write:{enabled:!0,isRequired:!0}}})],ce.prototype,"color",void 0),(0,i._)([(0,c.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ce.prototype,"position",void 0),ce=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelColorStop")],ce);const pe=ce;let de=class extends(V.A.ClonableMixin(P.A)){constructor(){super(...arguments),this.opacity=1,this.position=0}};(0,i._)([(0,c.MZ)({type:Number,json:{name:"alpha",write:{enabled:!0,isRequired:!0}}})],de.prototype,"opacity",void 0),(0,i._)([(0,c.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],de.prototype,"position",void 0),de=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelOpacityStop")],de);const he=de;let ye=class extends(V.A.ClonableMixin(P.A)){constructor(){super(...arguments),this.enabled=!1,this.range=null}};(0,i._)([(0,c.MZ)({type:Boolean,json:{default:!1,write:!0}})],ye.prototype,"enabled",void 0),(0,i._)([(0,c.MZ)({type:[Number],json:{write:{isRequired:!0}}})],ye.prototype,"range",void 0),ye=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelRangeFilter")],ye);const me=ye;var fe,ge;(ge=fe||(fe={}))[ge.Color=1]="Color",ge[ge.Alpha=2]="Alpha",ge[ge.Both=3]="Both";let ve=class extends(V.A.ClonableMixin(P.A)){constructor(e){super(e),this.interpolation=null,this.stretchRange=null,this.rangeFilter=null,this._colorMapSize=256,this.colorStops=new(o.A.ofType(pe)),this.opacityStops=new(o.A.ofType(he))}set colorStops(e){this._set("colorStops",(0,le.V)(e,this._get("colorStops"),o.A.ofType(pe)))}set opacityStops(e){this._set("opacityStops",(0,le.V)(e,this._get("opacityStops"),o.A.ofType(he)))}getPreviousNext(e,t,r){let i=e;for(;--i>0&&t[i].type!==r&&t[i].type!==fe.Both;);let n=e;const o=t.length;for(;++n<o&&t[n].type!==r&&t[n].type!==fe.Both;);return[i,n]}get rasterizedTransferFunction(){const e=[];if(this.colorStops.length<2)return e;const t=[],r=[];for(const t of this.colorStops){if(!t.color)return e;r.push({color:{r:t.color.r,g:t.color.g,b:t.color.b,a:Math.round(255*(1-t.color.a))},position:t.position,type:fe.Color})}if(0===this.opacityStops.length)for(const e of r)t.push({color:e.color,position:e.position});else{for(const e of this.opacityStops){const t=(0,ue.qE)(e.position,0,1),i=Math.round(255*(0,ue.qE)(1-e.opacity,0,1));let n=!1;for(const e of r)if(e.type===fe.Color&&Math.abs(e.position-t)<1e-5){e.color.a=i,e.type=fe.Both,n=!0;break}n||r.push({color:{r:0,g:0,b:0,a:i},position:e.position,type:fe.Alpha})}r.sort(((e,t)=>e.position<t.position?-1:1));const e=r.length;for(let t=0;t<e;++t){const i=r[t];if(i.type!==fe.Both)if(i.type===fe.Color){const[n,o]=this.getPreviousNext(t,r,fe.Alpha);if(-1!==n&&o!==e){const e=(i.position-r[n].position)/(r[o].position-r[n].position);i.color.a=Math.round((0,ue.Cc)(r[n].color.a,r[o].color.a,e))}else i.color.a=-1!==n?r[n].color.a:r[o].color.a}else{const[n,o]=this.getPreviousNext(t,r,fe.Color);if(-1!==n&&o!==e){const e=(i.position-r[n].position)/(r[o].position-r[n].position),t=r[n].color,s=r[o].color;Se.forEach((r=>{i.color[r]=Math.round((0,ue.Cc)(t[r],s[r],e))}))}else-1!==n?Se.forEach((e=>{i.color[e]=r[n].color[e]})):Se.forEach((e=>{i.color[e]=r[o].color[e]}))}}for(const e of r)t.push({color:e.color,position:e.position})}t[0].position=0,t[t.length-1].position=1;let i=0,n=1;for(let r=0;r<this._colorMapSize;++r){const o=r/this._colorMapSize;for(;o>t[n].position;)i=n++;const s=(o-t[i].position)/(t[n].position-t[i].position),a=t[i].color,l=t[n].color,u=new oe.A;Se.forEach((e=>{u[e]=Math.round((0,ue.Cc)(a[e],l[e],s))})),u.a=(0,ue.qE)(1-(0,ue.Cc)(a.a,l.a,s)/255,0,1),e.push(u)}return e}getColorForContinuousDataValue(e,t){const r=this.rasterizedTransferFunction;if(this.colorStops.length<2||!Array.isArray(this.stretchRange)||this.stretchRange.length<2||r.length<256)return null;let i=this.stretchRange[0],n=this.stretchRange[1];if(i>n){const e=i;i=n,n=e}e=(0,ue.qE)(e,i,n);const o=r[Math.round((e-i)/(n-i)*(this._colorMapSize-1))].clone();return t||(o.a=1),o}};(0,i._)([(0,c.MZ)({type:["linear","nearest"],json:{write:!0}})],ve.prototype,"interpolation",void 0),(0,i._)([(0,c.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],ve.prototype,"stretchRange",void 0),(0,i._)([(0,c.MZ)({type:o.A.ofType(pe),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.colorStops&&this.colorStops.length>0}}}}})],ve.prototype,"colorStops",null),(0,i._)([(0,c.MZ)({type:o.A.ofType(he),json:{read:{source:"alphaStops"},write:{enabled:!0,target:"alphaStops",overridePolicy(){return{enabled:!!this.opacityStops&&this.opacityStops.length>0}}}}})],ve.prototype,"opacityStops",null),(0,i._)([(0,c.MZ)({type:me,json:{write:!0}})],ve.prototype,"rangeFilter",void 0),(0,i._)([(0,c.MZ)({type:[oe.A],clonable:!1,json:{read:!1}})],ve.prototype,"rasterizedTransferFunction",null),ve=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelTransferFunctionStyle")],ve);const be=ve,Se=["r","g","b"];let we=class extends(V.A.ClonableMixin(P.A)){constructor(){super(...arguments),this.color=oe.A.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label=""}};(0,i._)([(0,c.MZ)({type:oe.A,json:{type:[p.jz],write:{enabled:!0,isRequired:!0}}})],we.prototype,"color",void 0),(0,i._)([(0,c.MZ)({type:p.jz,json:{write:{enabled:!0,isRequired:!0}}})],we.prototype,"value",void 0),(0,i._)([(0,c.MZ)({type:Boolean,json:{default:!0,write:!0}})],we.prototype,"enabled",void 0),(0,i._)([(0,c.MZ)({type:String,json:{write:!0}})],we.prototype,"label",void 0),we=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelUniqueValue")],we);const Me=we;var _e;let xe=_e=class extends P.A{constructor(e){super(e),this.variableId=0,this.label="",this.transferFunction=null,this.uniqueValues=null,this.isosurfaces=null,this.uniqueValues=new(o.A.ofType(Me)),this.isosurfaces=new(o.A.ofType(ae))}clone(){return new _e({variableId:this.variableId,label:this.label,transferFunction:(0,ne.o8)(this.transferFunction),uniqueValues:(0,ne.o8)(this.uniqueValues),isosurfaces:(0,ne.o8)(this.isosurfaces)})}};(0,i._)([(0,c.MZ)({type:p.jz,json:{write:{enabled:!0,isRequired:!0}}})],xe.prototype,"variableId",void 0),(0,i._)([(0,c.MZ)({type:String,json:{write:!0}})],xe.prototype,"label",void 0),(0,i._)([(0,c.MZ)({type:be,json:{write:{enabled:!0,overridePolicy(){return{enabled:!this.uniqueValues||this.uniqueValues.length<1}}}}})],xe.prototype,"transferFunction",void 0),(0,i._)([(0,c.MZ)({type:o.A.ofType(Me),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.uniqueValues&&this.uniqueValues.length>0}}}}})],xe.prototype,"uniqueValues",void 0),(0,i._)([(0,c.MZ)({type:o.A.ofType(ae),json:{write:{enabled:!0,overridePolicy(){const e=!this.uniqueValues||this.uniqueValues.length<1,t=!!this.isosurfaces&&this.isosurfaces.length>0;return{enabled:e&&t}}}}})],xe.prototype,"isosurfaces",void 0),xe=_e=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelVariableStyle")],xe);const Ae=xe;var Ie=r(88930),je=r(86738),Ze=r(16930),Ne=r(21325);function Ve(e){const t=/^(days?|hours?|minutes?|seconds?|d|h|m|s) since (\d{1,4})-(\d{1,2})-(\d{1,2})[ |T](\d{1,2}):(\d{1,2}):(\d{1,2})(\.[0-9]+)?[\s|Z]?(([+|\-|\s?])(\d{1,2}):(\d{1,2}))?$/i.exec(e);if(null==t)return{didParse:!1};const[,r,i,n,o,s,a,l,u,c,p,d,h]=t;let y="seconds";const m=r.charAt(0).toLowerCase();"d"===m?y="days":"h"===m?y="hours":"m"===m&&(y="minutes");const f=parseInt(i,10);if(Number.isNaN(f))return{didParse:!1};const g=parseInt(n,10);if(Number.isNaN(g)||g<1||g>12)return{didParse:!1};const v=parseInt(o,10);if(Number.isNaN(v)||v<1||v>31)return{didParse:!1};if(2===g){const e=f%4==0&&(f%100!=0||f%400==0);if(e&&v>29||!e&&v>28)return{didParse:!1}}else if((4===g||6===g||9===g||11===g)&&v>30)return{didParse:!1};const b=parseInt(s,10);if(Number.isNaN(b)||b<0||b>23)return{didParse:!1};const S=parseInt(a,10);if(Number.isNaN(S)||S<0||S>59)return{didParse:!1};const w=parseInt(l,10);if(Number.isNaN(w)||w<0||w>59)return{didParse:!1};let M=1,_=0,x=0;if(p&&(M="-"===p?-1:1),d){if(_=parseInt(d,10),Number.isNaN(_)||_<0)return{didParse:!1};if(0!==_){const e=M*_;if(e<-12||e>14)return{didParse:!1}}}if(h&&(x=parseInt(h,10),Number.isNaN(x)||x<0||x>59))return{didParse:!1};const A=`${f}`.padStart(4,"0"),I=`${g}`.padStart(2,"0"),j=`${v}`.padStart(2,"0"),Z=`${b}`.padStart(2,"0"),N=`${S}`.padStart(2,"0"),V=`${w}`.padStart(2,"0");let R="Z";return 0===_&&0===x||(R=M>0?"+":"-",R+=`${_}`.padStart(2,"0"),R+=":",R+=`${x}`.padStart(2,"0")),{didParse:!0,unit:y,reference:new Date(`${A}-${I}-${j}T${Z}:${N}:${V}.000${R}`)}}let Re=class extends P.A{constructor(){super(...arguments),this.values=null}};(0,i._)([(0,c.MZ)({type:[Number],json:{write:!0}})],Re.prototype,"values",void 0),Re=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelIrregularSpacing")],Re);const Pe=Re;let Te=class extends P.A{constructor(){super(...arguments),this.scale=1,this.offset=0}};(0,i._)([(0,c.MZ)({type:Number,json:{write:!0}})],Te.prototype,"scale",void 0),(0,i._)([(0,c.MZ)({type:Number,json:{write:!0}})],Te.prototype,"offset",void 0),Te=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelRegularSpacing")],Te);const Ue=Te;let Oe=class extends P.A{constructor(){super(...arguments),this.irregularSpacing=null,this.isPositiveUp=!0,this.isWrappedDateLine=!1,this.label=null,this.name=null,this.quantity=null,this.regularSpacing=null,this.size=0,this.unit=null}get isRegular(){return(null==this.irregularSpacing||void 0===this.irregularSpacing)&&null!==this.regularSpacing}getRange(){return this.isRegular?[this.regularSpacing.offset,this.regularSpacing.offset+this.regularSpacing.scale*(this.size-1)]:Array.isArray(this.irregularSpacing?.values)&&this.irregularSpacing.values.length>1?[this.irregularSpacing.values[0],this.irregularSpacing.values[this.irregularSpacing.values.length-1]]:[0,0]}};(0,i._)([(0,c.MZ)({type:Pe,json:{write:!0}})],Oe.prototype,"irregularSpacing",void 0),(0,i._)([(0,c.MZ)({type:Boolean,json:{write:!0}})],Oe.prototype,"isPositiveUp",void 0),(0,i._)([(0,c.MZ)({type:Boolean,json:{write:!0}})],Oe.prototype,"isWrappedDateLine",void 0),(0,i._)([(0,c.MZ)({type:String,json:{write:!0}})],Oe.prototype,"label",void 0),(0,i._)([(0,c.MZ)({type:String,json:{write:!0}})],Oe.prototype,"name",void 0),(0,i._)([(0,c.MZ)({type:String,json:{write:!0}})],Oe.prototype,"quantity",void 0),(0,i._)([(0,c.MZ)({type:Ue,json:{write:!0}})],Oe.prototype,"regularSpacing",void 0),(0,i._)([(0,c.MZ)({type:Number,json:{write:!0}})],Oe.prototype,"size",void 0),(0,i._)([(0,c.MZ)({type:String,json:{write:!0}})],Oe.prototype,"unit",void 0),(0,i._)([(0,c.MZ)({type:Boolean,json:{read:!1}})],Oe.prototype,"isRegular",null),Oe=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelDimension")],Oe);const ze=Oe;let Ee=class extends P.A{constructor(e){super(e),this.id=0,this.dimensions=null,this.spatialReference=Ze.A.WGS84}get zDimension(){if(!this.dimensions)return-1;if(!Array.isArray(this.dimensions))return-1;if(4!==this.dimensions.length)return-1;for(let e=2;e<4;++e)if(this.dimensions[e].size>0)return e;return-1}get isValid(){return!(!this.dimensions||!Array.isArray(this.dimensions)||4!==this.dimensions.length||this.dimensions[0].size<1||this.dimensions[1].size<1||-1===this.zDimension||this.dimensions[this.zDimension].size<1)}get originInLayerSpace3D(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size];return[e[0],t[0],i[0]]}get voxelSizeInLayerSpaceSigned(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size],n=[this.sizeInVoxels[0],this.sizeInVoxels[1],this.sizeInVoxels[2]];for(let e=0;e<3;++e)n[e]<2?n[e]=1:n[e]-=1;return r.isRegular&&!r.isPositiveUp&&(n[2]*=-1),[(e[1]-e[0])/n[0],(t[1]-t[0])/n[1],(i[1]-i[0])/n[2]]}get volumeType(){if(this.isValid){const e=this.dimensions[2].size>0;let t=this.dimensions[3].size>0;if(t){const e=this.dimensions[3];t="time"===e.quantity,t&&null!==e.unit&&(t=Ve(e.unit).didParse)}if(!e&&t)return"xyt";if(e&&t)return"xyzt"}return"xyz"}get sizeInVoxels(){if(!this.isValid)return[0,0,0];const e=this.zDimension;return[this.dimensions[0].size,this.dimensions[1].size,this.dimensions[e].size]}get timeStops(){if("xyzt"!==this.volumeType)return[];const e=this.dimensions[3],t=[],r=Ve(e.unit);if(r.didParse)if(e.isRegular){const i=e.regularSpacing?.offset??0,n=e.regularSpacing?.scale||1;for(let o=0;o<e.size;++o){const e=i+n*o;t.push((0,Ie.mi)(r.reference,e,r.unit))}}else if(Array.isArray(e.irregularSpacing?.values)&&e.irregularSpacing.values.length>0)for(let i=0;i<e.irregularSpacing.values.length;++i){const n=e.irregularSpacing.values[i];t.push((0,Ie.mi)(r.reference,n,r.unit))}return t}computeVoxelSpaceLocation(e){if(!this.isValid)return[0,0,0];if("xyt"===this.volumeType)return a.A.getLogger(this).error("computeVoxelSpacePosition cannot be used with XYT volumes."),[0,0,0];if(!(0,Ne.aI)(this.spatialReference,e.spatialReference))return a.A.getLogger(this).error("pos argument should have the same spatial reference as the VoxelLayer."),[0,0,0];const t=(0,m.fA)(e.x,e.y,e.z??0);(0,y.d)(t,t,this.originInLayerSpace3D),(0,y.E)(t,t,this.voxelSizeInLayerSpaceSigned);const r=this.dimensions[this.zDimension];if(!r.isRegular&&Array.isArray(r.irregularSpacing?.values)&&r.irregularSpacing.values.length>1){const i=e.z??0,n=r.irregularSpacing.values,o=r.isPositiveUp?1:-1,s=n.reduce(((e,t)=>Math.abs(o*t-i)<Math.abs(o*e-i)?t:e));for(let e=0;e<n.length;++e)if(n[e]===s){t[2]=e;break}}return[t[0],t[1],t[2]]}computeLayerSpaceLocation(e){if(!this.isValid)return new je.A({x:0,y:0,spatialReference:this.spatialReference});const t=(0,m.ci)(e);if((0,y.C)(t,t,this.voxelSizeInLayerSpaceSigned),(0,y.g)(t,t,this.originInLayerSpace3D),"xyt"===this.volumeType)return new je.A({x:t[0],y:t[1],spatialReference:this.spatialReference});const r=this.dimensions[this.zDimension];return r.isRegular||Array.isArray(r.irregularSpacing?.values)&&(e[2]<0?t[2]=r.irregularSpacing.values[0]:e[2]<r.irregularSpacing.values.length?t[2]=r.irregularSpacing.values[e[2]]:t[2]=r.irregularSpacing.values[r.irregularSpacing.values.length-1],r.isPositiveUp||(t[2]*=-1)),new je.A({x:t[0],y:t[1],z:t[2],spatialReference:this.spatialReference})}};(0,i._)([(0,c.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Ee.prototype,"id",void 0),(0,i._)([(0,c.MZ)({type:[ze],json:{write:{enabled:!0,isRequired:!0}}})],Ee.prototype,"dimensions",void 0),(0,i._)([(0,c.MZ)({type:Ze.A,json:{read:{enabled:!1}}})],Ee.prototype,"spatialReference",void 0),(0,i._)([(0,c.MZ)({type:Number,json:{read:!1}})],Ee.prototype,"zDimension",null),(0,i._)([(0,c.MZ)({type:[Boolean],json:{read:!1}})],Ee.prototype,"isValid",null),(0,i._)([(0,c.MZ)({type:[Number],json:{read:!1}})],Ee.prototype,"originInLayerSpace3D",null),(0,i._)([(0,c.MZ)({type:[Number],json:{read:!1}})],Ee.prototype,"voxelSizeInLayerSpaceSigned",null),(0,i._)([(0,c.MZ)({type:["xyz","xyzt","xyt"],json:{read:{enabled:!1}}})],Ee.prototype,"volumeType",null),(0,i._)([(0,c.MZ)({type:[Number],json:{read:!1}})],Ee.prototype,"sizeInVoxels",null),(0,i._)([(0,c.MZ)({type:[Date],json:{read:!1,write:!1}})],Ee.prototype,"timeStops",null),Ee=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelVolume")],Ee);const Le=Ee;var Fe;let qe=Fe=class extends P.A{constructor(){super(...arguments),this.apronWidth=1,this.brickSize=[32,32,32],this.maxLodLevel=0,this.nodeSize=[4,4,4]}isValid(){const e=new Fe;return e.apronWidth===this.apronWidth&&e.maxLodLevel===this.maxLodLevel&&!!this.brickSize&&!!this.nodeSize&&!(!Array.isArray(this.brickSize)||!Array.isArray(this.nodeSize))&&3===this.brickSize.length&&3===this.nodeSize.length&&32===this.brickSize[0]&&32===this.brickSize[1]&&32===this.brickSize[2]&&4===this.nodeSize[0]&&4===this.nodeSize[1]&&4===this.nodeSize[2]}};(0,i._)([(0,c.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],qe.prototype,"apronWidth",void 0),(0,i._)([(0,c.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],qe.prototype,"brickSize",void 0),(0,i._)([(0,c.MZ)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],qe.prototype,"maxLodLevel",void 0),(0,i._)([(0,c.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],qe.prototype,"nodeSize",void 0),qe=Fe=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelVolumeIndex")],qe);const $e=qe;let De=class extends(V.A.ClonableMixin(P.A)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=B(this.normal);return R.ie.normalize((0,p.GB)(e),0,!0)}set orientation(e){const t=k(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=B(this.normal);return R.ie.normalize((0,p.GB)(t),0,!0)}set tilt(e){const t=k(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,c.MZ)({type:Boolean,json:{default:!0,write:!0}})],De.prototype,"enabled",void 0),(0,i._)([(0,c.MZ)({type:String,json:{write:!0}})],De.prototype,"label",void 0),(0,i._)([(0,c.MZ)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,H.w)((e=>R.ie.normalize((0,p.GB)(e),0,!0)))],De.prototype,"orientation",null),(0,i._)([(0,c.MZ)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,H.w)((e=>R.ie.normalize((0,p.GB)(e),0,!0)))],De.prototype,"tilt",null),(0,i._)([(0,c.MZ)({type:[Number],json:{write:{isRequired:!0}}})],De.prototype,"normal",void 0),(0,i._)([(0,c.MZ)({type:[Number],json:{write:{isRequired:!0}}})],De.prototype,"point",void 0),De=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelDynamicSection")],De);const Ce=De;var Be;let ke=Be=class extends P.A{constructor(e){super(e),this.volumeId=0,this.verticalExaggeration=1,this.exaggerationMode="scale-height",this.verticalOffset=0,this.slices=new(o.A.ofType(J)),this.dynamicSections=new(o.A.ofType(Ce))}set slices(e){this._set("slices",(0,le.V)(e,this._get("slices"),o.A.ofType(J)))}set dynamicSections(e){this._set("dynamicSections",(0,le.V)(e,this._get("dynamicSections"),o.A.ofType(Ce)))}clone(){return new Be({volumeId:this.volumeId,verticalExaggeration:this.verticalExaggeration,exaggerationMode:this.exaggerationMode,verticalOffset:this.verticalOffset,slices:(0,ne.o8)(this.slices),dynamicSections:(0,ne.o8)(this.dynamicSections)})}};(0,i._)([(0,c.MZ)({type:p.jz,json:{write:{enabled:!0,isRequired:!0}}})],ke.prototype,"volumeId",void 0),(0,i._)([(0,c.MZ)({type:Number,json:{default:1,write:!0}})],ke.prototype,"verticalExaggeration",void 0),(0,i._)([(0,c.MZ)({type:["scale-position","scale-height"],json:{default:"scale-height",write:!0}})],ke.prototype,"exaggerationMode",void 0),(0,i._)([(0,c.MZ)({type:Number,json:{default:0,write:!0}})],ke.prototype,"verticalOffset",void 0),(0,i._)([(0,c.MZ)({type:o.A.ofType(J),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.slices&&this.slices.length>0}}}}})],ke.prototype,"slices",null),(0,i._)([(0,c.MZ)({type:o.A.ofType(Ce),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.dynamicSections&&this.dynamicSections.length>0}}}}})],ke.prototype,"dynamicSections",null),ke=Be=(0,i._)([(0,h.$)("esri.layers.voxel.VoxelVolumeStyle")],ke);const He=ke;var Ke=r(30291),Je=r(79677),Ge=r(10184);let We=class extends((0,x.w6)((0,b.b)((0,w.q)((0,M.A)((0,_.j)((0,l.P)((0,S.d)((0,v.p)(g.A))))))))){constructor(e){super(e),this.serviceRoot="",this.operationalLayerType="Voxel",this.legendEnabled=!0,this.title=null,this.sections=null,this.currentVariableId=0,this.volumeStyles=null,this.renderMode="volume",this.variableStyles=null,this.enableSlices=!0,this.enableSections=!0,this.enableDynamicSections=!0,this.enableIsosurfaces=!0,this.shading=new X,this.opacity=1,this.variables=new o.A,this.volumes=new o.A,this.index=null,this.minScale=0,this.maxScale=0,this.type="voxel",this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.fullExtent=null,this.popupEnabled=!1,this.popupTemplate=null,this.test=null,this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0,this.volumeStyles=new(o.A.ofType(He)),this.variableStyles=new(o.A.ofType(Ae)),this.sections=new(o.A.ofType(Y))}normalizeCtorArgs(e){return e?.constantUpscaling&&(this.test={constantUpscaling:!0},delete e.constantUpscaling),e}set url(e){this._set("url",(0,A.Jf)(e,a.A.getLogger(this)))}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(u.QP).then((()=>this._fetchService(t))).then((()=>this.serviceRoot=this.url));return this.addResolvingPromise(r),Promise.resolve(this)}read(e,t){super.read(e,t),"service"===t?.origin&&this.version.major<=3&&this.version.minor<=0&&!this.getAtOrigin("popupTemplate","service")&&this.setAtOrigin("popupTemplate",this.createPopupTemplate(),"service");for(const e of this.volumes)e.spatialReference=this.spatialReference}readVersion(e,t){return super.parseVersionString(e)}validateLayer(e){if(e.layerType&&e.layerType!==this.operationalLayerType)throw new s.A("voxel-layer:layer-type-not-supported","VoxelLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor)||this.version.major<3)throw new s.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"});if(this.version.major>3)throw new s.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"})}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=f.A.fromJSON(e,r);if(0===i.zmin&&0===i.zmax&&Array.isArray(t.volumes)){const e=Le.fromJSON(t.volumes[0]);if(e.isValid&&"xyt"!==e.volumeType){const t=e.dimensions[2];if(t.isRegular){let e=t.regularSpacing.offset,r=t.regularSpacing.offset+t.regularSpacing.scale*(t.size-1);if(e>r){const t=e;e=r,r=t}i.zmin=e,i.zmax=r}}}return i}return null}get fields(){const e=[new j.A({name:"Voxel.Position",alias:"Voxel Position",domain:null,editable:!1,length:128,type:"string"}),new j.A({name:"Voxel.CurrentVariable",alias:"Current Variable",domain:null,editable:!1,length:128,type:"string"})];for(const t of this.variables){const r=new j.A({name:t.name,alias:t.description,domain:null,editable:!1,length:128,type:"discrete"===t.renderingFormat.continuity?"string":"double"});e.push(r)}const t=this.getVolume(null);if(null!=t){if("xyzt"===t.volumeType||"xyt"===t.volumeType){const t=new j.A({name:"Voxel.LocalTime",alias:"Local Time",domain:null,editable:!1,length:256,type:"date"});e.push(t);const r=new j.A({name:"Voxel.SourceTime",alias:"Source Time",domain:null,editable:!1,length:256,type:"string"});e.push(r)}if("xyt"!==t.volumeType){const t=new j.A({name:"Voxel.Depth",alias:"Depth",domain:null,editable:!1,length:128,type:"double"});e.push(t)}}return e}get fieldsIndex(){return this.loaded?new Z.A(this.fields):null}getField(e){return this.fieldsIndex?.get(e)}get defaultPopupTemplate(){return this.createPopupTemplate()}createPopupTemplate(e){const t=this.fields;return(0,Ke.tn)({fields:t,title:"{Voxel.Position}"},e)}getConfiguration(){const e={layerType:this.operationalLayerType,version:this.version.versionString,name:this.title,spatialReference:this.spatialReference,fullExtent:this.fullExtent,volumes:this.volumes.toJSON(),variables:this.variables.toJSON(),index:this.index?.toJSON(),sections:this.getSections(),style:{volumeStyles:this.getVolumeStyles(),currentVariableId:this.currentVariableId,renderMode:this.renderMode,variableStyles:this.getVariableStyles(),enableSections:this.enableSections,enableDynamicSections:this.enableDynamicSections,enableIsosurfaces:this.enableIsosurfaces,enableSlices:this.enableSlices,shading:this.shading}};return e.index&&this.index?.isValid()?JSON.stringify(e):""}getVariableStyle(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variableStyles||-1===t)return null;const r=this.variableStyles.findIndex((e=>e.variableId===t));return r<0?null:this.variableStyles.at(r)}getVariable(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variables||-1===t)return null;const r=this.variables.findIndex((e=>e.id===t));return r<0?null:this.variables.at(r)}getVolume(e){const t=this.getVariable(e);return null!=t?this.volumes.find((({id:e})=>e===t.volumeId)):null}get timeInfo(){const e=this.getVolume(null);if("xyzt"!==e?.volumeType)return null;const t=e.timeStops;if(!t?.length)return null;const r=new Je.A({start:t[0],end:t.at(-1)});return new N.A({fullTimeExtent:r,stops:t})}getVolumeStyle(e){const t=this.getVariable(e);return null!=t?this.volumeStyles.find((({volumeId:e})=>e===t.volumeId)):null}getColorForContinuousDataValue(e,t,r){const i=this.getVariable(e);if(null==i||"continuous"!==i.renderingFormat?.continuity)return null;if(!this.variableStyles)return null;const n=this.variableStyles.findIndex((t=>t.variableId===e));if(n<0)return null;const o=this.variableStyles.at(n);return o?.transferFunction?o.transferFunction.getColorForContinuousDataValue(t,r):null}getSections(){const e=[];for(const t of this.sections)e.push(new Y({enabled:t.enabled,href:t.href,id:t.id,label:t.label,normal:t.normal,point:t.point,sizeInPixel:t.sizeInPixel,slices:t.slices,timeId:t.timeId,variableId:t.variableId}));return e}getVariableStyles(){const e=[];for(const t of this.variableStyles){const r=this._getVariable(t);if(null!=r){const i=t.clone();i.isosurfaces.length>4&&(i.isosurfaces=i.isosurfaces.slice(0,3),a.A.getLogger(this).error("A maximum of 4 isosurfaces are supported for Voxel Layers."));for(const e of i.isosurfaces)if(!e.colorLocked){const t=this.getColorForContinuousDataValue(i.variableId,e.value,!1);null==t||t.equals(e.color)||(e.color=t)}if("continuous"===r.renderingFormat.continuity)(null===i.transferFunction||i.transferFunction.colorStops.length<2)&&a.A.getLogger(this).error(`VoxelVariableStyle for variable ${r.id} is invalid. At least 2 color stops are required in the transferFunction for continuous Voxel Layer variables.`),null!==i.transferFunction&&(Array.isArray(i.transferFunction.stretchRange)&&2===i.transferFunction.stretchRange.length||(a.A.getLogger(this).error(`VoxelVariableStyle for variable ${r.id} is invalid. The stretchRange of the transferFunction for continuous Voxel Layer variables must be of the form [minimumDataValue, maximumDataValue].`),i.transferFunction.stretchRange=[0,1],i.transferFunction.colorStops.removeAll()));else if("discrete"===r.renderingFormat.continuity)if(0===t.uniqueValues.length)a.A.getLogger(this).error(`VoxelVariableStyle for variable ${r.id} is invalid. Unique values are required for discrete Voxel Layer variables.`);else for(const e of t.uniqueValues)null!==e.label&&void 0!==e.label||null===e.value||void 0===e.value||(e.label=e.value.toString());e.push(i)}else a.A.getLogger(this).error(`VoxelVariable ID=${t.variableId} doesn't exist, VoxelVariableStyle for this VoxelVariable will be ignored.`)}return e}getVolumeStyles(){const e=[];for(const t of this.volumeStyles){const r=this._getVolumeFromVolumeId(t.volumeId);if(null!=r){const i=t.clone();for(const e of i.slices)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");for(const e of i.dynamicSections)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");e.push(i)}else a.A.getLogger(this).error(`VoxelVolume ID=${t.volumeId} doesn't exist, VoxelVolumeStyle for this VoxelVolume will be ignored.`)}return e}_getVariable(e){const t=e.variableId;for(const e of this.variables)if(e.id===t)return e;return null}_getVolumeFromVolumeId(e){for(const t of this.volumes)if(t.id===e)return t;return null}_isPlaneValid(e,t,r){if(!e.point)return!1;if(!Array.isArray(e.point)||3!==e.point.length)return!1;if(!e.normal)return!1;if(!Array.isArray(e.normal)||3!==e.normal.length)return!1;const i=(0,m.fA)(e.normal[0],e.normal[1],e.normal[2]);return(0,y.n)(i,i),!(Math.abs(i[0])+Math.abs(i[1])+Math.abs(i[2])<1e-6||(e.normal[0]=i[0],e.normal[1]=i[1],e.normal[2]=i[2],0))}};(0,i._)([(0,c.MZ)({type:["Voxel"]})],We.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.MZ)(I.fV)],We.prototype,"legendEnabled",void 0),(0,i._)([(0,c.MZ)({json:{write:!0}})],We.prototype,"title",void 0),(0,i._)([(0,c.MZ)(I.OZ)],We.prototype,"url",null),(0,i._)([(0,c.MZ)({type:o.A.ofType(Y),json:{origins:{"web-scene":{name:"layerDefinition.sections",write:!0}}}})],We.prototype,"sections",void 0),(0,i._)([(0,c.MZ)({type:p.jz,json:{origins:{"web-scene":{name:"layerDefinition.style.currentVariableId",write:{enabled:!0,isRequired:!0,ignoreOrigin:!0}},service:{name:"style.currentVariableId"}}}})],We.prototype,"currentVariableId",void 0),(0,i._)([(0,c.MZ)({type:o.A.ofType(He),json:{origins:{"web-scene":{name:"layerDefinition.style.volumeStyles",write:!0},service:{name:"style.volumeStyles"}}}})],We.prototype,"volumeStyles",void 0),(0,i._)([(0,c.MZ)({type:["volume","surfaces"],json:{origins:{"web-scene":{name:"layerDefinition.style.renderMode",write:!0},service:{name:"style.renderMode"}}}})],We.prototype,"renderMode",void 0),(0,i._)([(0,c.MZ)({type:o.A.ofType(Ae),json:{origins:{"web-scene":{name:"layerDefinition.style.variableStyles",write:!0},service:{name:"style.variableStyles"}}}})],We.prototype,"variableStyles",void 0),(0,i._)([(0,c.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSlices",write:!0},service:{name:"style.enableSlices"}}}})],We.prototype,"enableSlices",void 0),(0,i._)([(0,c.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSections",write:!0},service:{name:"style.enableSections"}}}})],We.prototype,"enableSections",void 0),(0,i._)([(0,c.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableDynamicSections",write:!0},service:{name:"style.enableDynamicSections"}}}})],We.prototype,"enableDynamicSections",void 0),(0,i._)([(0,c.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableIsosurfaces",write:!0},service:{name:"style.enableIsosurfaces"}}}})],We.prototype,"enableIsosurfaces",void 0),(0,i._)([(0,c.MZ)({type:X,json:{origins:{"web-scene":{name:"layerDefinition.style.shading",write:!0},service:{name:"style.shading"}}}})],We.prototype,"shading",void 0),(0,i._)([(0,c.MZ)({type:["show","hide"]})],We.prototype,"listMode",void 0),(0,i._)([(0,c.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{read:!1,write:!1,origins:{"web-scene":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],We.prototype,"opacity",void 0),(0,i._)([(0,c.MZ)({type:o.A.ofType(ie)})],We.prototype,"variables",void 0),(0,i._)([(0,c.MZ)({type:o.A.ofType(Le)})],We.prototype,"volumes",void 0),(0,i._)([(0,c.MZ)({type:$e})],We.prototype,"index",void 0),(0,i._)([(0,c.MZ)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],We.prototype,"minScale",void 0),(0,i._)([(0,c.MZ)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],We.prototype,"maxScale",void 0),(0,i._)([(0,c.MZ)({json:{read:!1},readOnly:!0})],We.prototype,"type",void 0),(0,i._)([(0,c.MZ)({readOnly:!0,json:{name:"serviceVersion"}})],We.prototype,"version",void 0),(0,i._)([(0,d.w)("service","version")],We.prototype,"readVersion",null),(0,i._)([(0,c.MZ)({type:f.A})],We.prototype,"fullExtent",void 0),(0,i._)([(0,d.w)("service","fullExtent",["fullExtent"])],We.prototype,"readFullExtent",null),(0,i._)([(0,c.MZ)({readOnly:!0,clonable:!1,json:{read:!1}})],We.prototype,"fields",null),(0,i._)([(0,c.MZ)({readOnly:!0})],We.prototype,"fieldsIndex",null),(0,i._)([(0,c.MZ)({type:Boolean,json:{name:"disablePopup",read:{reader:(e,t)=>!t.disablePopup},write:{enabled:!0,ignoreOrigin:!0,writer(e,t,r){t[r]=!e}},origins:{"portal-item":{default:!0},"web-scene":{default:!0}}}})],We.prototype,"popupEnabled",void 0),(0,i._)([(0,c.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],We.prototype,"popupTemplate",void 0),(0,i._)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],We.prototype,"defaultPopupTemplate",null),(0,i._)([(0,c.MZ)({type:N.A,readOnly:!0,json:{read:!1}})],We.prototype,"timeInfo",null),(0,i._)([(0,c.MZ)({type:Je.A,json:{read:!1}})],We.prototype,"timeExtent",void 0),(0,i._)([(0,c.MZ)({type:Ge.A,json:{read:!1}})],We.prototype,"timeOffset",void 0),(0,i._)([(0,c.MZ)({type:Boolean,nonNullable:!0,json:{origins:{"web-scene":{name:"timeAnimation",write:!0},service:{read:!1}}}})],We.prototype,"useViewTime",void 0),We=(0,i._)([(0,h.$)("esri.layers.VoxelLayer")],We);const Ye=We},52136:(e,t,r)=>{r.d(t,{p:()=>s});var i=r(90237),n=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const s=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,n.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,o.$)("esri.layers.mixins.APIKeyMixin")],t),t}},18768:(e,t,r)=>{r.d(t,{b:()=>l});var i=r(90237),n=r(53966),o=r(10107),s=(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,n.A.getLogger(this)))}};return(0,i._)([(0,o.MZ)()],t.prototype,"title",null),(0,i._)([(0,o.MZ)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,s.$)("esri.layers.mixins.ArcGISService")],t),t}},69208:(e,t,r)=>{r.d(t,{d:()=>s});var i=r(90237),n=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,n.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,o.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>M});var i=r(90237),n=r(92602),o=r(70333),s=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)),m=r(40608),f=r(43937),g=r(83531),v=r(20655),b=r(80812),S=r(41318),w=r(10407);const M=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 b.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(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}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=!o.id?.findCredential(this.url),n=e===r.id;if(n&&r.portal.user)return this._getUserPrivileges(r,i);let s,a;if(n)s=r.portal.url;else try{s=await(0,g.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!s||!(0,d.b8)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(o.id?.getCredential(`${s}/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(n?await r.reload():(r=new b.default({id:e,portal:{url:s}}),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?o.id?.findCredential(this.url):null;if(!t)return!0;const r=_.credential===t?_.user:await this._fetchEditingUser(e);return _.credential=t,_.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=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=v.A.getDefault();if(n&&n.loaded&&(0,d.S8)(n.restUrl)===(0,d.S8)(i))return n.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,a.Ke)((0,s.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:b.default})],t.prototype,"portalItem",null),(0,i._)([(0,y.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.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,m.$)("esri.layers.mixins.PortalLayer")],t),t},_={credential:null,user:null}},25036:(e,t,r)=>{r.d(t,{j:()=>s});var i=r(90237),n=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const s=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,n.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,n.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,n.MZ)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,o.$)("esri.layers.mixins.ScaleRangeLayer")],t),t}},58947:(e,t,r)=>{r.d(t,{Xh:()=>T,w6:()=>A});var i=r(90237),n=r(78888),o=r(49186),s=r(53966),a=r(74887),l=r(84952),u=r(10107),c=(r(44208),r(87811),r(36005)),p=r(40608),d=r(43937),h=r(46130),y=r(5443),m=r(54239),f=r(16930),g=r(60694),v=r(10873),b=r(83898);var S=r(20655),w=r(80812),M=r(88788),_=r(91682),x=r(26121);const A=e=>{let t=class extends e{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.indexInfo=null,this._debouncedSaveOperations=(0,a.sg)((async(e,t,r)=>{switch(e){case T.SAVE:return this._save(t);case T.SAVE_AS:return this._saveAs(r,t)}}))}readSpatialReference(e,t){return j(t)}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=null==e.spatialReference?{...e,spatialReference:j(t)}:e;return y.A.fromJSON(i,r)}const i=t.store,n=j(t);return null==n||null==i?.extent||!Array.isArray(i.extent)||i.extent.some((e=>e<I))?null:new y.A({xmin:i.extent[0],ymin:i.extent[1],xmax:i.extent[2],ymax:i.extent[3],spatialReference:n})}parseVersionString(e){const t={major:Number.NaN,minor:Number.NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,i=null!=r.version?r.version.toString():"";return this.parseVersionString(i)}readTitlePortalItem(e){return"item-title"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){const r=this.portalItem?.title;if("item-title"===this.sublayerTitleMode)return this.url?(0,g.yG)(this.url,t.name):t.name;let i=t.name;if(!i&&this.url){const e=(0,g.qg)(this.url);null!=e&&(i=e.title)}return"item-title-and-service-name"===this.sublayerTitleMode&&r&&(i=r+" - "+i),(0,g.cr)(i)}set url(e){if(null==e)return void this._set("url",e);const t=(0,g.HZ)({layer:this,url:e,nonStandardUrlAllowed:!1,logger:s.A.getLogger(this)});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,i){(0,g.LS)(this,e,"layers",t,i)}get parsedUrl(){const e=this._get("url"),t=(0,l.An)(e);return t&&null!=this.layerId&&(t.path=`${t.path}/layers/${this.layerId}`),t}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=(0,b.F)(this.parsedUrl?.path??"",this.rootNode,e,this.customParameters,this.apiKey,s.A.getLogger(this),t),null==this.fullExtent||this.fullExtent.hasZ||this._updateExtent(await this.indexInfo)}_updateExtent(e){if("page"===e?.type){const t=e.rootIndex%e.pageSize,r=e.rootPage?.nodes?.[t];if(null==r?.obb?.center||null==r.obb.halfSize)throw new o.A("sceneservice:invalid-node-page","Invalid node page.");if(r.obb.center[0]<I||null==this.fullExtent||this.fullExtent.hasZ)return;const i=r.obb.halfSize,n=r.obb.center[2],s=Math.sqrt(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]);this.fullExtent.zmin=n-s,this.fullExtent.zmax=n+s}else if("node"===e?.type){const t=e.rootNode?.mbs;if(!Array.isArray(t)||4!==t.length||t[0]<I)return;const r=t[2],i=t[3],{fullExtent:n}=this;n&&(n.zmin=r-i,n.zmax=r+i)}}async _fetchService(e){if(null==this.url)throw new o.A("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){const t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){const t=await(0,n.A)(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(t.data&&Array.isArray(t.data.layers)&&t.data.layers.length>0)return t.data.layers[0].id}async _fetchServiceLayer(e){const t=await(0,n.A)(this.parsedUrl?.path??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});t.ssl&&this.url&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();const i=t.data;this.read(i,this._getServiceContext()),this.validateLayer(i)}async _fetchVoxelServiceLayer(e){const t=(await(0,n.A)(this.parsedUrl?.path+"/layer",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,this._getServiceContext()),this.validateLayer(t)}_getServiceContext(){return{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}async _saveAs(e,t){const r={...P,...t};let i=w.default.from(e);if(!i)throw new o.A("sceneservice:portal-item-required","_saveAs() requires a portal item to save to");i.id&&(i=i.clone(),i.id=null);const n=i.portal||S.A.getDefault();await this._ensureLoadBeforeSave(),i.type=R,i.portal=n;const s=(0,M.m)(i,"portal-item",!0),a={layers:[this.write({},s)]};return await Promise.all(s.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(a,s,r),this.url&&(i.url=this.url),i.title||(i.title=this.title),Z(i,r,N.newItem),await n.signIn(),await n.user.addItem({item:i,folder:r?.folder,data:a}),await(0,_.r)(this.resourceReferences,s),this.portalItem=i,(0,h.v)(s),s.portalItem=i,i}async _save(e){const t={...P,...e};if(!this.portalItem)throw new o.A("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if(this.portalItem.type!==R)throw new o.A("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${R}"`);await this._ensureLoadBeforeSave();const r=(0,M.m)(this.portalItem,"portal-item",!0),i={layers:[this.write({},r)]};return await Promise.all(r.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(i,r,t),this.url&&(this.portalItem.url=this.url),this.portalItem.title||(this.portalItem.title=this.title),Z(this.portalItem,t,N.existingItem),await(0,_.S)(this.portalItem,i,this.resourceReferences,r),(0,h.v)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,r){const i=r?.validationOptions;(0,x.c)(t,{errorName:"sceneservice:save"},{ignoreUnsupported:i?.ignoreUnsupported,supplementalUnsupportedErrors:["scenemodification:unsupported"]});const n=i?.enabled,a=null;if(n&&a){const t=(await a()).validate(e,r.portalItemLayerType);if(!t.length)return;const n=`Layer item did not validate:\n${t.join("\n")}`;if(s.A.getLogger(this).error(`_validateAgainstJSONSchema(): ${n}`),"throw"===i.failPolicy){const e=t.map((e=>new o.A("sceneservice:schema-validation",e)));throw new o.A("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{validationErrors:e})}}}};return(0,i._)([(0,u.MZ)(v.id)],t.prototype,"id",void 0),(0,i._)([(0,u.MZ)({type:f.A})],t.prototype,"spatialReference",void 0),(0,i._)([(0,c.w)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readSpatialReference",null),(0,i._)([(0,u.MZ)({type:y.A})],t.prototype,"fullExtent",void 0),(0,i._)([(0,c.w)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readFullExtent",null),(0,i._)([(0,u.MZ)({readOnly:!0,type:m.A})],t.prototype,"heightModelInfo",void 0),(0,i._)([(0,u.MZ)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],t.prototype,"minScale",void 0),(0,i._)([(0,u.MZ)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],t.prototype,"maxScale",void 0),(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,c.w)("version",["store.version"])],t.prototype,"readVersion",null),(0,i._)([(0,u.MZ)({type:String,json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,u.MZ)({type:String,json:{read:!1}})],t.prototype,"sublayerTitleMode",void 0),(0,i._)([(0,u.MZ)({type:String})],t.prototype,"title",void 0),(0,i._)([(0,c.w)("portal-item","title")],t.prototype,"readTitlePortalItem",null),(0,i._)([(0,c.w)("service","title",["name"])],t.prototype,"readTitleService",null),(0,i._)([(0,u.MZ)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],t.prototype,"layerId",void 0),(0,i._)([(0,u.MZ)(v.OZ)],t.prototype,"url",null),(0,i._)([(0,d.K)("url")],t.prototype,"writeUrl",null),(0,i._)([(0,u.MZ)()],t.prototype,"parsedUrl",null),(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"store",void 0),(0,i._)([(0,u.MZ)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],t.prototype,"rootNode",void 0),t=(0,i._)([(0,p.$)("esri.layers.mixins.SceneService")],t),t},I=-1e38;function j(e){if(null!=e.spatialReference)return f.A.fromJSON(e.spatialReference);const t=e.store,r=t.indexCRS||t.geographicCRS,i=r&&parseInt(r.slice(r.lastIndexOf("/")+1),10);return null!=i?new f.A(i):null}function Z(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const i=t.getTypeKeywords();for(const t of i)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)),r===N.newItem&&(e.typeKeywords=e.typeKeywords.filter((e=>"Hosted Service"!==e))))}var N,V;(V=N||(N={}))[V.existingItem=0]="existingItem",V[V.newItem=1]="newItem";const R="Scene Service",P={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}};var T;!function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(T||(T={}))},83898:(e,t,r)=>{r.d(t,{F:()=>o});var i=r(78888),n=r(49186);async function o(e,t,r,o,s,a,l){let u=null;if(null!=r){const t=`${e}/nodepages/`,n=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,i.A)(n,{query:{f:"json",...o,token:s},responseType:"json",signal:l})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){null!=a&&a.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",n,e),u=e}}if(!t)return null;const c=t?.split("/").pop(),p=`${e}/nodes/`,d=p+c;try{return{type:"node",rootNode:(await(0,i.A)(d,{query:{f:"json",...o,token:s},responseType:"json",signal:l})).data,urlPrefix:p}}catch(e){throw new n.A("sceneservice:root-node-missing","Root node missing.",{pageError:u,nodeError:e,url:d})}}},96184:(e,t,r)=>{r.d(t,{A:()=>m});var i=r(90237),n=r(69540),o=r(25482),s=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),c=r(79677),p=r(10184),d=r(56400);function h(e,t){return p.A.fromJSON({value:e,unit:t})}let y=class extends(n.A.ClonableMixin(o.A)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?c.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?h(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?h(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,s.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],y.prototype,"cumulative",void 0),(0,i._)([(0,s.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"endField",void 0),(0,i._)([(0,s.MZ)({type:c.A,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"fullTimeExtent",void 0),(0,i._)([(0,a.w)("fullTimeExtent",["timeExtent"])],y.prototype,"readFullTimeExtent",null),(0,i._)([(0,u.K)("fullTimeExtent")],y.prototype,"writeFullTimeExtent",null),(0,i._)([(0,s.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"hasLiveData",void 0),(0,i._)([(0,s.MZ)({type:p.A,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"interval",void 0),(0,i._)([(0,a.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],y.prototype,"readInterval",null),(0,i._)([(0,u.K)("interval")],y.prototype,"writeInterval",null),(0,i._)([(0,s.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"startField",void 0),(0,i._)([(0,s.MZ)((0,d.P6)("timeReference",!0))],y.prototype,"timeZone",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"trackIdField",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],y.prototype,"useTime",void 0),(0,i._)([(0,s.MZ)({type:[Date],json:{read:!1}})],y.prototype,"stops",void 0),y=(0,i._)([(0,l.$)("esri.layers.support.TimeInfo")],y);const m=y},88788:(e,t,r)=>{r.d(t,{m:()=>s,v:()=>o});var i=r(84952),n=r(20655);function o(e,t){return{...a(e,t),readResourcePaths:[]}}function s(e,t,r){const n=(0,i.An)(e.itemUrl);return{...a(e,t),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:n?{rootPath:n.path,writtenUrls:[]}:null,resources:r?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function a(e,t){return{origin:t,url:(0,i.An)(e.itemUrl),portal:e.portal||n.A.getDefault(),portalItem:e}}},85648:(e,t,r)=>{r.d(t,{n:()=>n});var i=r(84952);function n(e){return o[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]||s}(e.url)}(e)]||a}const o={},s="text/plain",a=o[s],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)o[l[e]]=e},15804:(e,t,r)=>{r.d(t,{addOrUpdateResources:()=>a,bg:()=>d,cL:()=>p,fetchResources:()=>s,removeAllResources:()=>u,removeResource:()=>l});var i=r(78888),n=r(49186),o=r(84952);async function s(e,t={},r){await e.load(r);const i=(0,o.fj)(e.itemUrl,"resources"),{start:n=1,num:s=10,sortOrder:a="asc",sortField:l="resource"}=t,u={query:{start:n,num:s,sortOrder:a,sortField:l,token:e.apiKey},signal:r?.signal},c=await e.portal.request(i,u);return{total:c.total,nextStart:c.nextStart,resources:c.resources.map((({created:t,size:r,resource:i})=>({created:new Date(t),size:r,resource:e.resourceFromPath(i)})))}}async function a(e,t,r,i){const s=new Map;for(const{resource:e,content:i,compress:o,access:a}of t){if(!e.hasPath())throw new n.A(`portal-item-resource-${r}:invalid-path`,"Resource does not have a valid path");const[t,l]=c(e.path),u=`${t}/${o??""}/${a??""}`;s.has(u)||s.set(u,{prefix:t,compress:o,access:a,files:[]}),s.get(u).files.push({fileName:l,content:i})}await e.load(i);const a=(0,o.fj)(e.userItemUrl,"add"===r?"addResources":"updateResources");for(const{prefix:t,compress:r,access:n,files:o}of s.values()){const s=25;for(let l=0;l<o.length;l+=s){const u=o.slice(l,l+s),c=new FormData;t&&"."!==t&&c.append("resourcesPrefix",t),r&&c.append("compress","true"),n&&c.append("access",n);let p=0;for(const{fileName:e,content:t}of u)c.append("file"+ ++p,t,e);c.append("f","json"),await e.portal.request(a,{method:"post",body:c,signal:i?.signal})}}}async function l(e,t,r){if(!t.hasPath())throw new n.A("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const i=(0,o.fj)(e.userItemUrl,"removeResources");await e.portal.request(i,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function u(e,t){await e.load(t);const r=(0,o.fj)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function c(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}async function p(e){return"blob"===e.type?e.blob:"json"===e.type?new Blob([e.jsonString],{type:"application/json"}):(await(0,i.A)(e.url,{responseType:"blob"})).data}function d(e,t){if(!e.hasPath())return null;const[r,,i]=function(e){const[t,r]=function(e){const t=(0,o.Zo)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[i,n]=c(t);return[i,n,r]}(e.path);return e.portalItem.resourceFromPath((0,o.fj)(r,t+i))}},73133:(e,t,r)=>{r.d(t,{j:()=>i});const i=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},30291:(e,t,r)=>{r.d(t,{tn:()=>u});var i=r(13874),n=r(30524),o=r(89893),s=(r(84424),r(80737),r(96808),r(66159)),a=(r(67336),r(92094),r(23721),r(47582),r(41227)),l=r(68780);function u({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:u},h){if(!r)return null;const m=function(e,t){const r=t?.visibleFieldNames;return function({fields:e,ignoreFieldTypes:t,sortDisabled:r}){const i=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===i&&(e=e.slice()),!0!==r&&e.sort(p),e}({fields:e.fields??[],ignoreFieldTypes:t?.ignoreFieldTypes||y,sortDisabled:t?.sortDisabled}).map((t=>new a.A({fieldName:t.name,isEditable:(0,n.R$)(t,e),label:t.alias,format:d(t),visible:c(t,{...e,visibleFieldNames:r})})))}({editFieldsInfo:t,fields:r,objectIdField:l},h);if(!m.length)return null;const f=function(e){const t=(0,n.mB)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),g=[new s.A,new o.A];return new i.A({title:f,content:g,fieldInfos:m})}const c=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,n.Bz)(e,t);function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:h(e)?-1:h(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function d(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.A({digitSeparator:!0,places:0});case"double":return new l.A({digitSeparator:!0,places:2});case"string":return(0,n.JL)(e.name)?new l.A({digitSeparator:!0,places:0}):void 0;default:return}}function h(e){if("name"===(e.name&&e.name.toLowerCase()))return!0;const t=e.alias?.toLowerCase();return"name"===t}const y=["geometry","blob","raster","guid","xml"]},10184:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(90237),n=r(69540),o=r(25482),s=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),c=r(73133);let p=class extends(n.A.ClonableMixin(o.A)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,s.t)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,l.e)(c.j,{nonNullable:!0})],p.prototype,"unit",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,i._)([(0,u.$)("esri.time.TimeInterval")],p);const d=p},91682:(e,t,r)=>{r.d(t,{S:()=>l,r:()=>a});var i=r(49186),n=r(74887),o=r(13069),s=r(15804);async function a(e,t,r){const i=await u(e,t,r);await c(i,t,r)}async function l(e,t,r,i,n){const o=await u(r,i,n);await e.update({data:t}),await c(o,i,n)}async function u(e,t,a){if(!t?.resources)return;const l=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const u=new Set(t.resources.toKeep.map((e=>e.resource.path))),c=new Set,p=[];u.forEach((t=>{l.delete(t),e.paths.push(t)}));const d=[],h=[],y=[];for(const r of t.resources.toUpdate)if(l.delete(r.resource.path),u.has(r.resource.path)||c.has(r.resource.path)){const{resource:t,content:i,finish:n}=r,a=(0,s.bg)(t,(0,o.lk)());e.paths.push(a.path),d.push({resource:a,content:await(0,s.cL)(i),compress:r.compress}),n&&y.push((()=>n(a)))}else{e.paths.push(r.resource.path),h.push({resource:r.resource,content:await(0,s.cL)(r.content),compress:r.compress});const t=r.finish;t&&y.push((()=>t(r.resource))),c.add(r.resource.path)}for(const r of t.resources.toAdd)if(e.paths.push(r.resource.path),l.has(r.resource.path))l.delete(r.resource.path);else{d.push({resource:r.resource,content:await(0,s.cL)(r.content),compress:r.compress});const e=r.finish;e&&y.push((()=>e(r.resource)))}if(d.length||h.length){const{addOrUpdateResources:e}=await Promise.resolve().then(r.bind(r,15804));await e(t.portalItem,d,"add",a),await e(t.portalItem,h,"update",a)}if(y.forEach((e=>e())),0===p.length)return l;const m=await(0,n.Ol)(p);if((0,n.Te)(a),m.length>0)throw new i.A("save:resources","Failed to save one or more resources",{errors:m});return l}async function c(e,t,r){if(!e||!t.portalItem)return;const i=[];for(const n of e){const e=t.portalItem.resourceFromPath(n);i.push(e.portalItem.removeResource(e,r))}await(0,n.Lx)(i)}},26121:(e,t,r)=>{r.d(t,{c:()=>s,d:()=>n});var i=r(49186);async function n(e){const t=[];for(const r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){const e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}const o=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function s(e,t,r){let n=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:t,details:r})=>new i.A(e,t,r)));if(e.blockedRelativeUrls&&(n=n.concat(e.blockedRelativeUrls.map((e=>new i.A("url:unsupported",`Relative url '${e}' is not supported`))))),r){const{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:i}=r;e&&(n=n.filter((({name:e})=>!(o.has(e)||t.includes(e))))),i&&(n=n.filter((e=>"web-document-write:property-required"!==e.name)))}if(n.length>0)throw new i.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:n})}}}]);
|