@arcgis/core 4.25.0-next.20221021 → 4.25.0-next.20221022

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/WebMap.js +1 -1
  2. package/arcade.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/{0b0f3e93f658a012d5f0.js → 00df1053d3a8761fc0a3.js} +1 -1
  5. package/assets/esri/core/workers/chunks/0de7eca7acf74947cf2e.js +1 -0
  6. package/assets/esri/core/workers/chunks/{2474f0e8b8abc1387106.js → 2600954826b42f2b70c4.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{af3f30f968363bb3930c.js → 353c4a51be72c4a77e1f.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{2d8201f0f33ba66bb96b.js → 5f46751fa500a9dfacf9.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{b9e93d9ea80361716f1d.js → 64190294f3dc9237b420.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{883cfe319b15ebabf71e.js → 73ad8f3d3feff5882988.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{177c8d5e2531c6f64581.js → 796504f93100aea7c6f5.js} +1 -1
  12. package/assets/esri/core/workers/chunks/8435ae4fe5a5332b1076.js +1 -0
  13. package/assets/esri/core/workers/chunks/{c8c0f091aab41e4effa5.js → 85690fabbfe60681f5e7.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{942da417257f8fd8e4cf.js → 858970a88406562a26cc.js} +1 -1
  15. package/assets/esri/core/workers/chunks/a17d20ffaa47d430d98c.js +1 -0
  16. package/assets/esri/core/workers/chunks/ac2903c5f1587dec2f80.js +1 -0
  17. package/assets/esri/core/workers/chunks/{7ba0cfe4d1c214f44fc7.js → b6d9750b16bbf8ce5307.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{7f40f4ac6e2af4b333f5.js → c4e5b929b152f8d36cc3.js} +1 -1
  19. package/assets/esri/core/workers/chunks/c7de993c0a85594a1969.js +1 -0
  20. package/assets/esri/core/workers/chunks/ca92022f53080fda75fe.js +1 -0
  21. package/assets/esri/core/workers/chunks/d7668e81467833a5a53d.js +1 -0
  22. package/assets/esri/core/workers/chunks/de83b062359c0459585f.js +1 -0
  23. package/assets/esri/core/workers/chunks/f57c3343f93d87423856.js +1 -0
  24. package/assets/esri/core/workers/chunks/f704ed07c514a0f436ec.js +1 -0
  25. package/assets/esri/themes/base/_color.scss +1 -0
  26. package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +58 -14
  27. package/assets/esri/themes/base/widgets/_LayerList.scss +57 -13
  28. package/assets/esri/themes/dark/main.css +1 -1
  29. package/assets/esri/themes/light/main.css +1 -1
  30. package/assets/esri/themes/light/view.css +1 -1
  31. package/geometry/support/normalizeUtils.js +1 -1
  32. package/interfaces.d.ts +109 -6
  33. package/package.json +1 -1
  34. package/support/revision.js +1 -1
  35. package/symbols/cim/CIMSymbolHelper.js +1 -1
  36. package/symbols/cim/Rasterizer.js +1 -1
  37. package/symbols/cim/rasterizingUtils.js +5 -0
  38. package/views/2d/engine/brushes.js +1 -1
  39. package/views/2d/engine/vectorTiles/SpriteMosaic.js +1 -1
  40. package/views/2d/engine/vectorTiles/VTLPainter3D.js +1 -1
  41. package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
  42. package/views/2d/engine/vtlBrushes.js +5 -0
  43. package/views/2d/engine/webgl/mesh/bufcut.js +1 -1
  44. package/views/2d/layers/features/schemaUtils.js +1 -1
  45. package/widgets/BasemapLayerList/BasemapLayerListViewModel.js +1 -1
  46. package/widgets/BasemapLayerList.js +1 -1
  47. package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
  48. package/widgets/FeatureForm/FormExpressionArcadeExecutor.js +1 -1
  49. package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
  50. package/widgets/FeatureForm.js +1 -1
  51. package/widgets/LayerList/LayerListViewModel.js +1 -1
  52. package/widgets/LayerList/ListItem.js +1 -1
  53. package/widgets/LayerList.js +1 -1
  54. package/widgets/UtilityNetworkTrace.js +1 -1
  55. package/assets/esri/core/workers/chunks/0cfb97b9f38c31b3b33a.js +0 -1
  56. package/assets/esri/core/workers/chunks/2a63949c3aad9ace1b44.js +0 -1
  57. package/assets/esri/core/workers/chunks/3b5be512567d9c1c6fe6.js +0 -1
  58. package/assets/esri/core/workers/chunks/4450f17444947fe2f27f.js +0 -1
  59. package/assets/esri/core/workers/chunks/5abda500f5d5607155ab.js +0 -1
  60. package/assets/esri/core/workers/chunks/81139c01e8016cbbe324.js +0 -1
  61. package/assets/esri/core/workers/chunks/94027976cfca4ad5789b.js +0 -1
  62. package/assets/esri/core/workers/chunks/9d410721f42259efe666.js +0 -1
  63. package/assets/esri/core/workers/chunks/b17ff3dfdc638f9f5705.js +0 -1
  64. package/assets/esri/core/workers/chunks/d6eb078d94171fb9d3d4.js +0 -1
  65. package/rest/geometry/cut.js +0 -5
  66. package/rest/geometry/simplify.js +0 -5
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1785],{3892:(t,e,r)=>{function n(t){return"h"in t&&"s"in t&&"v"in t}function i(t){return"l"in t&&"a"in t&&"b"in t}function a(t){return"l"in t&&"c"in t&&"h"in t}r.d(e,{Y3:()=>g,_Y:()=>f,sJ:()=>m,xr:()=>y});const s=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],o=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function l(t,e){const r=[];let n,i;if(t[0].length!==e.length)throw"dimensions do not match";const a=t.length,s=t[0].length;let o=0;for(n=0;n<a;n++){for(o=0,i=0;i<s;i++)o+=t[n][i]*e[i];r.push(o)}return r}function u(t){const e=[t.r/255,t.g/255,t.b/255].map((t=>t<=.04045?t/12.92:((t+.055)/1.055)**2.4)),r=l(s,e);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function c(t){const e=l(o,[t.x/100,t.y/100,t.z/100]).map((t=>{const e=t<=.0031308?12.92*t:1.055*t**(1/2.4)-.055;return Math.min(1,Math.max(e,0))}));return{r:Math.round(255*e[0]),g:Math.round(255*e[1]),b:Math.round(255*e[2])}}function h(t){const e=[t.x/95.047,t.y/100,t.z/108.883].map((t=>t>(6/29)**3?t**(1/3):1/3*(29/6)**2*t+4/29));return{l:116*e[1]-16,a:500*(e[0]-e[1]),b:200*(e[1]-e[2])}}function p(t){const e=t.l,r=[(e+16)/116+t.a/500,(e+16)/116,(e+16)/116-t.b/200].map((t=>t>6/29?t**3:3*(6/29)**2*(t-4/29)));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function y(t){return"r"in(e=t)&&"g"in e&&"b"in e?t:a(t)?function(t){return c(p(function(t){const e=t.l,r=t.c,n=t.h;return{l:e,a:r*Math.cos(n),b:r*Math.sin(n)}}(t)))}(t):i(t)?function(t){return c(p(t))}(t):function(t){return"x"in t&&"y"in t&&"z"in t}(t)?c(t):n(t)?function(t){const e=(t.h+360)%360/60,r=t.s/100,n=t.v/100*255,i=n*r,a=i*(1-Math.abs(e%2-1));let s;switch(Math.floor(e)){case 0:s={r:i,g:a,b:0};break;case 1:s={r:a,g:i,b:0};break;case 2:s={r:0,g:i,b:a};break;case 3:s={r:0,g:a,b:i};break;case 4:s={r:a,g:0,b:i};break;case 5:case 6:s={r:i,g:0,b:a};break;default:s={r:0,g:0,b:0}}return s.r=Math.round(s.r+n-i),s.g=Math.round(s.g+n-i),s.b=Math.round(s.b+n-i),s}(t):t;var e}function f(t){return n(t)?t:function(t){const e=t.r,r=t.g,n=t.b,i=Math.max(e,r,n),a=i-Math.min(e,r,n);let s=i,o=0===a?0:i===e?(r-n)/a%6:i===r?(n-e)/a+2:(e-r)/a+4,l=0===a?0:a/s;return o<0&&(o+=6),o*=60,l*=100,s*=100/255,{h:o,s:l,v:s}}(y(t))}function g(t){return i(t)?t:function(t){return h(u(t))}(y(t))}function m(t){return a(t)?t:function(t){return function(t){const e=t.l,r=t.a,n=t.b,i=Math.sqrt(r*r+n*n);let a=Math.atan2(n,r);return a=a>0?a:a+2*Math.PI,{l:e,c:i,h:a}}(h(u(t)))}(y(t))}},31363:(t,e,r)=>{r.d(e,{B1:()=>n,DQ:()=>u,DT:()=>o,JJ:()=>i,Or:()=>c,_U:()=>a,k3:()=>h,sX:()=>p});const n=Number.POSITIVE_INFINITY,i=Math.PI,a=2*i,s=128/i,o=i/180,l=1/Math.LN2;function u(t,e){return(t%=e)>=0?t:t+e}function c(t){return u(t*s,256)}function h(t){return Math.log(t)*l}function p(t,e,r){return t*(1-r)+e*r}},26084:(t,e,r)=>{r.d(e,{Z:()=>n});class n{constructor(t){this._array=[],t<=0&&console.error("strideInBytes must be positive!"),this._stride=t}get array(){return this._array}get index(){return 4*this._array.length/this._stride}get itemSize(){return this._stride}get sizeInBytes(){return 4*this._array.length}reset(){this.array.length=0}toBuffer(){return new Uint32Array(this._array).buffer}static i1616to32(t,e){return 65535&t|e<<16}static i8888to32(t,e,r,n){return 255&t|(255&e)<<8|(255&r)<<16|n<<24}static i8816to32(t,e,r){return 255&t|(255&e)<<8|r<<16}}},4215:(t,e,r)=>{var n,i,a,s,o;r.d(e,{Fr:()=>o,_K:()=>s,al:()=>i}),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.FILL_VERTEX=1]="FILL_VERTEX",t[t.FILL_DD_VERTEX=2]="FILL_DD_VERTEX",t[t.FILL_INDEX=3]="FILL_INDEX",t[t.OUTLINE_VERTEX=4]="OUTLINE_VERTEX",t[t.OUTLINE_DD_VERTEX=5]="OUTLINE_DD_VERTEX",t[t.OUTLINE_INDEX=6]="OUTLINE_INDEX",t[t.LINE_VERTEX=7]="LINE_VERTEX",t[t.LINE_DD_VERTEX=8]="LINE_DD_VERTEX",t[t.LINE_INDEX=9]="LINE_INDEX",t[t.ICON_VERTEX=10]="ICON_VERTEX",t[t.ICON_DD_VERTEX=11]="ICON_DD_VERTEX",t[t.ICON_INDEX=12]="ICON_INDEX",t[t.TEXT_VERTEX=13]="TEXT_VERTEX",t[t.TEXT_DD_VERTEX=14]="TEXT_DD_VERTEX",t[t.TEXT_INDEX=15]="TEXT_INDEX",t[t.CIRCLE_VERTEX=16]="CIRCLE_VERTEX",t[t.CIRCLE_INDEX=17]="CIRCLE_INDEX"}(n||(n={})),function(t){t[t.FILL=1]="FILL",t[t.LINE=2]="LINE",t[t.SYMBOL=3]="SYMBOL",t[t.CIRCLE=4]="CIRCLE"}(i||(i={})),function(t){t[t.BACKGROUND=0]="BACKGROUND",t[t.OPAQUE=1]="OPAQUE",t[t.TRANSLUCENT=2]="TRANSLUCENT",t[t.SYMBOLS=3]="SYMBOLS",t[t.HITTEST=4]="HITTEST"}(a||(a={})),function(t){t[t.BACKGROUND=0]="BACKGROUND",t[t.FILL=1]="FILL",t[t.OUTLINE=2]="OUTLINE",t[t.LINE=3]="LINE",t[t.ICON=4]="ICON",t[t.CIRCLE=5]="CIRCLE",t[t.TEXT=6]="TEXT",t[t.TILEINFO=7]="TILEINFO"}(s||(s={})),function(t){t[t.PAINTER_CHANGED=0]="PAINTER_CHANGED",t[t.LAYOUT_CHANGED=1]="LAYOUT_CHANGED",t[t.LAYER_CHANGED=2]="LAYER_CHANGED",t[t.LAYER_REMOVED=3]="LAYER_REMOVED",t[t.SPRITES_CHANGED=4]="SPRITES_CHANGED"}(o||(o={}))},21315:(t,e,r)=>{r.d(e,{R:()=>a,_5:()=>u,aF:()=>s,f2:()=>f,fR:()=>n,nR:()=>l,r1:()=>h,vL:()=>o});var n,i,a,s,o,l,u,c,h,p,y=r(95648);(p=n||(n={}))[p.BACKGROUND=0]="BACKGROUND",p[p.FILL=1]="FILL",p[p.LINE=2]="LINE",p[p.SYMBOL=3]="SYMBOL",p[p.CIRCLE=4]="CIRCLE",function(t){t[t.VISIBLE=0]="VISIBLE",t[t.NONE=1]="NONE"}(i||(i={})),function(t){t[t.POINT=0]="POINT",t[t.LINE=1]="LINE",t[t.LINE_CENTER=2]="LINE_CENTER"}(a||(a={})),function(t){t[t.MAP=0]="MAP",t[t.VIEWPORT=1]="VIEWPORT",t[t.AUTO=2]="AUTO"}(s||(s={})),function(t){t[t.AUTO=0]="AUTO",t[t.LEFT=1]="LEFT",t[t.CENTER=2]="CENTER",t[t.RIGHT=3]="RIGHT"}(o||(o={})),function(t){t[t.CENTER=0]="CENTER",t[t.LEFT=1]="LEFT",t[t.RIGHT=2]="RIGHT",t[t.TOP=3]="TOP",t[t.BOTTOM=4]="BOTTOM",t[t.TOP_LEFT=5]="TOP_LEFT",t[t.TOP_RIGHT=6]="TOP_RIGHT",t[t.BOTTOM_LEFT=7]="BOTTOM_LEFT",t[t.BOTTOM_RIGHT=8]="BOTTOM_RIGHT"}(l||(l={})),function(t){t[t.NONE=0]="NONE",t[t.UPPERCASE=1]="UPPERCASE",t[t.LOWERCASE=2]="LOWERCASE"}(u||(u={})),function(t){t[t.MAP=0]="MAP",t[t.VIEWPORT=1]="VIEWPORT"}(c||(c={})),function(t){t[t.HORIZONTAL=0]="HORIZONTAL",t[t.VERTICAL=1]="VERTICAL"}(h||(h={}));class f{}f.backgroundLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE}},f.fillLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE}},f.lineLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE},"line-cap":{type:"enum",values:["butt","round","square"],default:y.RL.BUTT},"line-join":{type:"enum",values:["bevel","round","miter"],default:y.AH.MITER},"line-miter-limit":{type:"number",default:2},"line-round-limit":{type:"number",default:1.05}},f.symbolLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE},"symbol-avoid-edges":{type:"boolean",default:!1},"symbol-placement":{type:"enum",values:["point","line","line-center"],default:a.POINT},"symbol-sort-key":{type:"number",default:-1},"symbol-spacing":{type:"number",minimum:1,default:250},"icon-allow-overlap":{type:"boolean",default:!1},"icon-anchor":{type:"enum",values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],default:l.CENTER},"icon-ignore-placement":{type:"boolean",default:!1},"icon-image":{type:"string"},"icon-keep-upright":{type:"boolean",default:!1},"icon-offset":{type:"array",value:"number",length:2,default:[0,0]},"icon-optional":{type:"boolean",default:!1},"icon-padding":{type:"number",minimum:0,default:2},"icon-rotate":{type:"number",default:0},"icon-rotation-alignment":{type:"enum",values:["map","viewport","auto"],default:s.AUTO},"icon-size":{type:"number",minimum:0,default:1},"text-allow-overlap":{type:"boolean",default:!1},"text-anchor":{type:"enum",values:["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"],default:l.CENTER},"text-field":{type:"string"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"]},"text-ignore-placement":{type:"boolean",default:!1},"text-justify":{type:"enum",values:["auto","left","center","right"],default:o.CENTER},"text-keep-upright":{type:"boolean",default:!0},"text-letter-spacing":{type:"number",default:0},"text-line-height":{type:"number",default:1.2},"text-max-angle":{type:"number",minimum:0,default:45},"text-max-width":{type:"number",minimum:0,default:10},"text-offset":{type:"array",value:"number",length:2,default:[0,0]},"text-optional":{type:"boolean",default:!1},"text-padding":{type:"number",minimum:0,default:2},"text-rotate":{type:"number",default:0},"text-rotation-alignment":{type:"enum",values:["map","viewport","auto"],default:s.AUTO},"text-size":{type:"number",minimum:0,default:16},"text-transform":{type:"enum",values:["none","uppercase","lowercase"],default:u.NONE},"text-writing-mode":{type:"array",value:"enum",values:["horizontal","vertical"],default:[h.HORIZONTAL]}},f.circleLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:i.VISIBLE}},f.backgroundPaintDefinition={"background-color":{type:"color",default:[0,0,0,1]},"background-opacity":{type:"number",minimum:0,maximum:1,default:1},"background-pattern":{type:"string"}},f.fillPaintDefinition={"fill-antialias":{type:"boolean",default:!0},"fill-color":{type:"color",default:[0,0,0,1]},"fill-opacity":{type:"number",minimum:0,maximum:1,default:1},"fill-outline-color":{type:"color",default:[0,0,0,0]},"fill-pattern":{type:"string"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0]},"fill-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP}},f.linePaintDefinition={"line-blur":{type:"number",minimum:0,default:0},"line-color":{type:"color",default:[0,0,0,1]},"line-dasharray":{type:"array",value:"number",default:[]},"line-gap-width":{type:"number",minimum:0,default:0},"line-offset":{type:"number",default:0},"line-opacity":{type:"number",minimum:0,maximum:1,default:1},"line-pattern":{type:"string"},"line-translate":{type:"array",value:"number",length:2,default:[0,0]},"line-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP},"line-width":{type:"number",minimum:0,default:1}},f.symbolPaintDefinition={"icon-color":{type:"color",default:[0,0,0,1]},"icon-halo-blur":{type:"number",minimum:0,default:0},"icon-halo-color":{type:"color",default:[0,0,0,0]},"icon-halo-width":{type:"number",minimum:0,default:0},"icon-opacity":{type:"number",minimum:0,maximum:1,default:1},"icon-translate":{type:"array",value:"number",length:2,default:[0,0]},"icon-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP},"text-color":{type:"color",default:[0,0,0,1]},"text-halo-blur":{type:"number",minimum:0,default:0},"text-halo-color":{type:"color",default:[0,0,0,0]},"text-halo-width":{type:"number",minimum:0,default:0},"text-opacity":{type:"number",minimum:0,maximum:1,default:1},"text-translate":{type:"array",value:"number",length:2,default:[0,0]},"text-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP}},f.rasterPaintDefinition={"raster-opacity":{type:"number",minimum:0,maximum:1,default:1},"raster-hue-rotate":{type:"number",default:0},"raster-brightness-min":{type:"number",minimum:0,maximum:1,default:0},"raster-brightness-max":{type:"number",minimum:0,maximum:1,default:1},"raster-saturation":{type:"number",minimum:-1,maximum:1,default:0},"raster-contrast":{type:"number",minimum:-1,maximum:1,default:0},"raster-fade-duration":{type:"number",minimum:0,default:300}},f.circlePaintDefinition={"circle-blur":{type:"number",minimum:0,default:0},"circle-color":{type:"color",default:[0,0,0,1]},"circle-opacity":{type:"number",minimum:0,maximum:1,default:1},"circle-radius":{type:"number",minimum:0,default:5},"circle-stroke-color":{type:"color",default:[0,0,0,1]},"circle-stroke-opacity":{type:"number",minimum:0,maximum:1,default:1},"circle-stroke-width":{type:"number",minimum:0,default:0},"circle-translate":{type:"array",value:"number",length:2,default:[0,0]},"circle-translate-anchor":{type:"enum",values:["map","viewport"],default:c.MAP}}},7333:(t,e,r)=>{r.d(e,{Et:()=>Pt,sj:()=>Gt,Le:()=>Ot,_L:()=>Bt,gf:()=>St,jG:()=>Ut,nj:()=>kt});var n,i,a=r(95648),s=r(4215),o=r(70586),l=r(26084);!function(t){t[t.R8_SIGNED=0]="R8_SIGNED",t[t.R8_UNSIGNED=1]="R8_UNSIGNED",t[t.R16_SIGNED=2]="R16_SIGNED",t[t.R16_UNSIGNED=3]="R16_UNSIGNED",t[t.R8G8_SIGNED=4]="R8G8_SIGNED",t[t.R8G8_UNSIGNED=5]="R8G8_UNSIGNED",t[t.R16G16_SIGNED=6]="R16G16_SIGNED",t[t.R16G16_UNSIGNED=7]="R16G16_UNSIGNED",t[t.R8G8B8A8_SIGNED=8]="R8G8B8A8_SIGNED",t[t.R8G8B8A8_UNSIGNED=9]="R8G8B8A8_UNSIGNED",t[t.R8G8B8A8_COLOR=10]="R8G8B8A8_COLOR",t[t.R16G16B16A16_DASHARRAY=11]="R16G16B16A16_DASHARRAY",t[t.R16G16B16A16_PATTERN=12]="R16G16B16A16_PATTERN"}(n||(n={})),function(t){t[t.UNIFORM=0]="UNIFORM",t[t.DATA_DRIVEN=1]="DATA_DRIVEN",t[t.INTERPOLATED_DATA_DRIVEN=2]="INTERPOLATED_DATA_DRIVEN",t[t.UNUSED=3]="UNUSED"}(i||(i={}));var u=r(35371),c=r(21968);class h{constructor(t){this._locations=new Map,this._key=t}get key(){return this._key}get type(){return 7&this._key}defines(){return[]}getStride(){return this._layoutInfo||this._buildAttributesInfo(),this._stride}getAttributeLocations(){return 0===this._locations.size&&this._buildAttributesInfo(),this._locations}getLayoutInfo(){return this._layoutInfo||this._buildAttributesInfo(),this._layoutInfo}getEncodingInfos(){return this._propertyEncodingInfo||this._buildAttributesInfo(),this._propertyEncodingInfo}getUniforms(){return this._uniforms||this._buildAttributesInfo(),this._uniforms}getShaderHeader(){return this._shaderHeader||this._buildAttributesInfo(),this._shaderHeader}getShaderMain(){return this._shaderMain||this._buildAttributesInfo(),this._shaderMain}setDataUniforms(t,e,r,n,i){const a=this.getUniforms();for(const s of a){const{name:a,type:o,getValue:l}=s,u=l(r,e,n,i);if(null!==u)switch(o){case"float":t.setUniform1f(a,u);break;case"vec2":t.setUniform2fv(a,u);break;case"vec4":t.setUniform4fv(a,u)}}}encodeAttributes(t,e,r,i){const a=this.attributesInfo(),s=this.getEncodingInfos(),o=[];let l=0,u=0;for(const c of Object.keys(s)){const h=s[c],{type:p,precisionFactor:y,isLayout:f}=a[c],g=f?r.getLayoutProperty(c):r.getPaintProperty(c),m=g.interpolator?.getInterpolationRange(e);let _=0;for(const r of h){const{offset:a,bufferElementsToAdd:s}=r;if(s>0){for(let t=0;t<s;t++)o.push(0);l+=u,u=r.bufferElementsToAdd}const c=i??g.getValue(m?m[_]:e,t);switch(p){case n.R8_SIGNED:case n.R8_UNSIGNED:o[l]|=this._encodeByte(c*(y||1),8*a);break;case n.R16_SIGNED:case n.R16_UNSIGNED:o[l]|=this._encodeShort(c*(y||1),8*a);break;case n.R8G8_SIGNED:case n.R8G8_UNSIGNED:o[l]|=this._encodeByte(c*(y||1),8*a),o[l]|=this._encodeByte(c*(y||1),8*a+8);break;case n.R16G16_SIGNED:case n.R16G16_UNSIGNED:o[l]|=this._encodeShort(c*(y||1),8*a),o[l]|=this._encodeShort(c*(y||1),8*a+16);break;case n.R8G8B8A8_SIGNED:case n.R8G8B8A8_UNSIGNED:o[l]|=this._encodeByte(c*(y||1),8*a),o[l]|=this._encodeByte(c*(y||1),8*a+8),o[l]|=this._encodeByte(c*(y||1),8*a+16),o[l]|=this._encodeByte(c*(y||1),8*a+24);break;case n.R8G8B8A8_COLOR:o[l]=this._encodeColor(c);break;case n.R16G16B16A16_DASHARRAY:case n.R16G16B16A16_PATTERN:this._encodePattern(l,o,c);break;default:throw new Error("Unsupported encoding type")}_++}}return o}getAtributeState(t){let e=0;const r=3+2*t;return e|=this._bit(r),e|=this._bit(r+1)<<1,e}_buildAttributesInfo(){const t=[],e={},r={};let n=-1;const a=this.attributesInfo(),s=this.attributes();let o=-1;for(const l of s){o++;const s=this.getAtributeState(o);if(s===i.UNIFORM||s===i.UNUSED)continue;const u=a[l],c=[];e[l]=c;const p=u.type;for(let e=0;e<s;e++){const{dataType:e,bytesPerElement:i,count:a,normalized:s}=h._encodingInfo[p],o=i*a,l=`${e}-${!0===s}`;let u=r[l],y=0;if(!u||u.count+a>4)n++,u={dataIndex:n,count:0,offset:0},4!==a&&(r[l]=u),t.push({location:-1,name:"a_data_"+n,count:a,type:e,normalized:s}),y=Math.ceil(Math.max(o/4,1));else{const e=t[u.dataIndex];e.count+=a,y=Math.ceil(Math.max(e.count*i/4,1))-Math.ceil(Math.max(u.offset/4,1))}c.push({dataIndex:u.dataIndex,offset:u.offset,bufferElementsToAdd:y}),u.offset+=o,u.count+=a}}for(const e of t)switch(e.type){case u.g.BYTE:case u.g.UNSIGNED_BYTE:e.count=4;break;case u.g.SHORT:case u.g.UNSIGNED_SHORT:e.count+=e.count%2}this._buildVertexBufferLayout(t);let l=0;const c=this._layoutInfo.geometry;for(const t of c)this._locations.set(t.name,l++);const p=this._layoutInfo.opacity;if(p)for(const t of p)this._locations.set(t.name,l++);this._buildShaderInfo(t,e),this._propertyEncodingInfo=e}_buildVertexBufferLayout(t){const e={},r=this.geometryInfo();let n=r[0].stride;if(0===t.length)e.geometry=r;else{const i=[];let a=n;for(const e of t)n+=p(e.type)*e.count;for(const t of r)i.push(new c.G(t.name,t.count,t.type,t.offset,n,t.normalized));for(const e of t)i.push(new c.G(e.name,e.count,e.type,a,n,e.normalized)),a+=p(e.type)*e.count;e.geometry=i}this.opacityInfo()&&(e.opacity=this.opacityInfo()),this._layoutInfo=e,this._stride=n}_buildShaderInfo(t,e){let r="\n",a="\n";const s=[];for(const e of t)r+=`attribute ${this._getType(e.count)} ${e.name};\n`;const l=this.attributes(),u=this.attributesInfo();let c=-1;for(const t of l){c++;const{name:l,type:p,precisionFactor:f,isLayout:g}=u[t],m=f&&1!==f?" * "+1/f:"",{bytesPerElement:_,count:d}=h._encodingInfo[p],E=t=>`a_data_${t.dataIndex}${y(d,t.offset,_)}`;switch(this.getAtributeState(c)){case i.UNIFORM:{const e=this._getType(d),i=`u_${l}`;s.push({name:i,type:e,getValue:(e,r,i,a)=>{const s=g?e.getLayoutValue(t,r):e.getPaintValue(t,r);if(p===n.R16G16B16A16_DASHARRAY){const t=e.getDashKey(s,e.getLayoutValue("line-cap",r)),n=a.getMosaicItemPosition(t,!1);if((0,o.Wi)(n))return null;const{tl:i,br:l}=n;return[i[0],l[1],l[0],i[1]]}if(p===n.R16G16B16A16_PATTERN){const e=a.getMosaicItemPosition(s,!t.includes("line-"));if((0,o.Wi)(e))return null;const{tl:r,br:n}=e;return[r[0],n[1],n[0],r[1]]}if(p===n.R8G8B8A8_COLOR){const t=s[3];return[t*s[0],t*s[1],t*s[2],t]}return s}}),r+=`uniform ${e} ${i};\n`,a+=`${e} ${l} = ${i};\n`}break;case i.DATA_DRIVEN:{const r=E(e[t][0]);a+=`${this._getType(d)} ${l} = ${r}${m};\n`}break;case i.INTERPOLATED_DATA_DRIVEN:{const n=`u_t_${l}`;s.push({name:n,type:"float",getValue:(e,r,n,i)=>(g?e.getLayoutProperty(t):e.getPaintProperty(t)).interpolator.interpolationUniformValue(n,r)}),r+=`uniform float ${n};\n`;const i=E(e[t][0]),o=E(e[t][1]);a+=`${this._getType(d)} ${l} = mix(${i}${m}, ${o}${m}, ${n});\n`}}}this._shaderHeader=r,this._shaderMain=a,this._uniforms=s}_bit(t){return(this._key&1<<t)>>t}_getType(t){switch(t){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4"}throw new Error("Invalid count")}_encodeColor(t){const e=255*t[3];return l.Z.i8888to32(t[0]*e,t[1]*e,t[2]*e,e)}_encodePattern(t,e,r){if(!r||!r.rect)return;const n=r.rect,i=r.width,a=r.height;e[t]=this._encodeShort(n.x+2,0),e[t]|=this._encodeShort(n.y+2+a,16),e[t+1]=this._encodeShort(n.x+2+i,0),e[t+1]|=this._encodeShort(n.y+2,16)}_encodeByte(t,e){return(255&t)<<e}_encodeShort(t,e){return(65535&t)<<e}}h._encodingInfo={[n.R8_SIGNED]:{dataType:u.g.BYTE,bytesPerElement:1,count:1,normalized:!1},[n.R8_UNSIGNED]:{dataType:u.g.UNSIGNED_BYTE,bytesPerElement:1,count:1,normalized:!1},[n.R16_SIGNED]:{dataType:u.g.SHORT,bytesPerElement:2,count:1,normalized:!1},[n.R16_UNSIGNED]:{dataType:u.g.UNSIGNED_SHORT,bytesPerElement:2,count:1,normalized:!1},[n.R8G8_SIGNED]:{dataType:u.g.BYTE,bytesPerElement:1,count:2,normalized:!1},[n.R8G8_UNSIGNED]:{dataType:u.g.UNSIGNED_BYTE,bytesPerElement:1,count:2,normalized:!1},[n.R16G16_SIGNED]:{dataType:u.g.SHORT,bytesPerElement:2,count:2,normalized:!1},[n.R16G16_UNSIGNED]:{dataType:u.g.UNSIGNED_SHORT,bytesPerElement:2,count:2,normalized:!1},[n.R8G8B8A8_SIGNED]:{dataType:u.g.BYTE,bytesPerElement:1,count:4,normalized:!1},[n.R8G8B8A8_UNSIGNED]:{dataType:u.g.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!1},[n.R8G8B8A8_COLOR]:{dataType:u.g.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!0},[n.R16G16B16A16_DASHARRAY]:{dataType:u.g.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1},[n.R16G16B16A16_PATTERN]:{dataType:u.g.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1}};const p=t=>{switch(t){case u.g.FLOAT:case u.g.INT:case u.g.UNSIGNED_INT:return 4;case u.g.SHORT:case u.g.UNSIGNED_SHORT:return 2;case u.g.BYTE:case u.g.UNSIGNED_BYTE:return 1}},y=(t,e,r)=>{const n=e/r;if(1===t)switch(n){case 0:return".x";case 1:return".y";case 2:return".z";case 3:return".w"}else if(2===t)switch(n){case 0:return".xy";case 1:return".yz";case 2:return".zw"}else if(3===t)switch(n){case 0:return".xyz";case 1:return".yzw"}return""};class f extends h{constructor(t){super(t)}geometryInfo(){return f.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return f.ATTRIBUTES}attributesInfo(){return f.ATTRIBUTES_INFO}}f.ATTRIBUTES=[],f.GEOMETRY_LAYOUT=[new c.G("a_pos",2,u.g.BYTE,0,2)],f.ATTRIBUTES_INFO={};class g extends h{constructor(t){super(t)}geometryInfo(){return g.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return g.ATTRIBUTES}attributesInfo(){return g.ATTRIBUTES_INFO}}g.ATTRIBUTES=["circle-radius","circle-color","circle-opacity","circle-stroke-width","circle-stroke-color","circle-stroke-opacity","circle-blur"],g.GEOMETRY_LAYOUT=[new c.G("a_pos",2,u.g.SHORT,0,4)],g.ATTRIBUTES_INFO={"circle-radius":{name:"radius",type:n.R8_UNSIGNED},"circle-color":{name:"color",type:n.R8G8B8A8_COLOR},"circle-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"circle-stroke-width":{name:"stroke_width",type:n.R8_UNSIGNED,precisionFactor:4},"circle-stroke-color":{name:"stroke_color",type:n.R8G8B8A8_COLOR},"circle-stroke-opacity":{name:"stroke_opacity",type:n.R8_UNSIGNED,precisionFactor:100},"circle-blur":{name:"blur",type:n.R8_UNSIGNED,precisionFactor:32}};class m extends h{constructor(t){super(t)}geometryInfo(){return m.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return m.ATTRIBUTES}attributesInfo(){return m.ATTRIBUTES_INFO}}m.ATTRIBUTES=["fill-color","fill-opacity","fill-pattern"],m.GEOMETRY_LAYOUT=[new c.G("a_pos",2,u.g.SHORT,0,4)],m.ATTRIBUTES_INFO={"fill-color":{name:"color",type:n.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"fill-pattern":{name:"tlbr",type:n.R16G16B16A16_PATTERN,isOptional:!0}};class _ extends h{constructor(t,e){super(t),this._usefillColor=e}geometryInfo(){return _.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return this._usefillColor?_.ATTRIBUTES_FILL:_.ATTRIBUTES_OUTLINE}attributesInfo(){return this._usefillColor?_.ATTRIBUTES_INFO_FILL:_.ATTRIBUTES_INFO_OUTLINE}}_.ATTRIBUTES_OUTLINE=["fill-outline-color","fill-opacity"],_.ATTRIBUTES_FILL=["fill-color","fill-opacity"],_.GEOMETRY_LAYOUT=[new c.G("a_pos",2,u.g.SHORT,0,8),new c.G("a_offset",2,u.g.BYTE,4,8),new c.G("a_xnormal",2,u.g.BYTE,6,8)],_.ATTRIBUTES_INFO_OUTLINE={"fill-outline-color":{name:"color",type:n.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100}},_.ATTRIBUTES_INFO_FILL={"fill-color":{name:"color",type:n.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100}};class d extends h{constructor(t){super(t)}geometryInfo(){return d.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return d.ATTRIBUTES}attributesInfo(){return d.ATTRIBUTES_INFO}}d.ATTRIBUTES=["line-blur","line-color","line-gap-width","line-offset","line-opacity","line-width","line-pattern","line-dasharray"],d.GEOMETRY_LAYOUT=[new c.G("a_pos",2,u.g.SHORT,0,16),new c.G("a_extrude_offset",4,u.g.BYTE,4,16),new c.G("a_dir_normal",4,u.g.BYTE,8,16),new c.G("a_accumulatedDistance",2,u.g.UNSIGNED_SHORT,12,16)],d.ATTRIBUTES_INFO={"line-width":{name:"width",type:n.R8_UNSIGNED,precisionFactor:2},"line-gap-width":{name:"gap_width",type:n.R8_UNSIGNED,precisionFactor:2},"line-offset":{name:"offset",type:n.R8_SIGNED,precisionFactor:2},"line-color":{name:"color",type:n.R8G8B8A8_COLOR},"line-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"line-blur":{name:"blur",type:n.R8_UNSIGNED,precisionFactor:4},"line-pattern":{name:"tlbr",type:n.R16G16B16A16_PATTERN,isOptional:!0},"line-dasharray":{name:"tlbr",type:n.R16G16B16A16_DASHARRAY,isOptional:!0}};const E=[new c.G("a_pos",2,u.g.SHORT,0,16),new c.G("a_vertexOffset",2,u.g.SHORT,4,16),new c.G("a_texAngleRange",4,u.g.UNSIGNED_BYTE,8,16),new c.G("a_levelInfo",4,u.g.UNSIGNED_BYTE,12,16)],b=[new c.G("a_opacityInfo",1,u.g.UNSIGNED_BYTE,0,1)];class T extends h{constructor(t){super(t)}geometryInfo(){return E}opacityInfo(){return b}attributes(){return T.ATTRIBUTES}attributesInfo(){return T.ATTRIBUTES_INFO}}T.ATTRIBUTES=["icon-color","icon-opacity","icon-halo-blur","icon-halo-color","icon-halo-width","icon-size"],T.ATTRIBUTES_INFO={"icon-color":{name:"color",type:n.R8G8B8A8_COLOR},"icon-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"icon-halo-color":{name:"halo_color",type:n.R8G8B8A8_COLOR},"icon-halo-width":{name:"halo_width",type:n.R8_UNSIGNED,precisionFactor:4},"icon-halo-blur":{name:"halo_blur",type:n.R8_UNSIGNED,precisionFactor:4},"icon-size":{name:"size",type:n.R8_UNSIGNED,precisionFactor:32,isLayout:!0}};class I extends h{constructor(t){super(t)}geometryInfo(){return E}opacityInfo(){return b}attributes(){return I.ATTRIBUTES}attributesInfo(){return I.ATTRIBUTES_INFO}}I.ATTRIBUTES=["text-color","text-opacity","text-halo-blur","text-halo-color","text-halo-width","text-size"],I.ATTRIBUTES_INFO={"text-color":{name:"color",type:n.R8G8B8A8_COLOR},"text-opacity":{name:"opacity",type:n.R8_UNSIGNED,precisionFactor:100},"text-halo-color":{name:"halo_color",type:n.R8G8B8A8_COLOR},"text-halo-width":{name:"halo_width",type:n.R8_UNSIGNED,precisionFactor:4},"text-halo-blur":{name:"halo_blur",type:n.R8_UNSIGNED,precisionFactor:4},"text-size":{name:"size",type:n.R8_UNSIGNED,isLayout:!0}};var w=r(22303),v=r(3892);function R(t,e,r,n){const i=3*t,a=3*(r-t)-i,s=1-i-a,o=3*e,l=3*(n-e)-o,u=1-o-l;function c(t){return((s*t+a)*t+i)*t}function h(t){return(3*s*t+2*a)*t+i}return function(t,e=1e-6){return function(t){return((u*t+l)*t+o)*t}(function(t,e){let r,n,i,a,s,o;for(i=t,o=0;o<8;o++){if(a=c(i)-t,Math.abs(a)<e)return i;if(s=h(i),Math.abs(s)<1e-6)break;i-=a/s}if(r=0,n=1,i=t,i<r)return r;if(i>n)return n;for(;r<n;){if(a=c(i),Math.abs(a-t)<e)return i;t>a?r=i:n=i,i=.5*(n-r)+r}return i}(t,e))}}const N={};N.ease=R(.25,.1,.25,1),N.linear=R(0,0,1,1),N.easeIn=N["ease-in"]=R(.42,0,1,1),N.easeOut=N["ease-out"]=R(0,0,.58,1),N.easeInOut=N["ease-in-out"]=R(.42,0,.58,1);var D=r(31363);const L={kind:"null"},x={kind:"number"},A={kind:"string"},P={kind:"boolean"},O={kind:"color"},S={kind:"object"},U={kind:"value"};function G(t,e){return{kind:"array",itemType:t,n:e}}const B=[L,x,A,P,O,S,G(U)];function k(t){if("array"===t.kind){const e=k(t.itemType);return"number"==typeof t.n?`array<${e}, ${t.n}>`:"value"===t.itemType.kind?"array":`array<${e}>`}return t.kind}function M(t){if(null===t)return L;if("string"==typeof t)return A;if("boolean"==typeof t)return P;if("number"==typeof t)return x;if(t instanceof w.Z)return O;if(Array.isArray(t)){let e;for(const r of t){const t=M(r);if(e){if(e!==t){e=U;break}}else e=t}return G(e||U,t.length)}return"object"==typeof t?S:U}function C(t,e){if("array"===e.kind)return"array"===t.kind&&(0===t.n&&"value"===t.itemType.kind||C(t.itemType,e.itemType))&&("number"!=typeof e.n||e.n===t.n);if("value"===e.kind)for(const e of B)if(C(t,e))return!0;return e.kind===t.kind}function V(t){if(null===t)return"";const e=typeof t;return"string"===e?t:"number"===e||"boolean"===e?String(t):t instanceof w.Z?t.toString():JSON.stringify(t)}var F=r(35362);class z{constructor(t){this._parent=t,this._vars={}}add(t,e){this._vars[t]=e}get(t){return this._vars[t]?this._vars[t]:this._parent?this._parent.get(t):null}}class ${constructor(){this.type=U}static parse(t){if(t.length>1)throw new Error('"id" does not expect arguments');return new $}evaluate(t,e){return t?.id}}class Y{constructor(){this.type=A}static parse(t){if(t.length>1)throw new Error('"geometry-type" does not expect arguments');return new Y}evaluate(t,e){if(!t)return null;switch(t.type){case F.V.Point:return"Point";case F.V.LineString:return"LineString";case F.V.Polygon:return"Polygon";default:return null}}}class X{constructor(){this.type=S}static parse(t){if(t.length>1)throw new Error('"properties" does not expect arguments');return new X}evaluate(t,e){return t?.values}}class H{constructor(){this.type=x}static parse(t){if(t.length>1)throw new Error('"zoom" does not expect arguments');return new H}evaluate(t,e){return e}}class Z{constructor(t,e,r){this._lhs=t,this._rhs=e,this._compare=r,this.type=P}static parse(t,e,r){if(3!==t.length&&4!==t.length)throw new Error(`"${t[0]}" expects 2 or 3 arguments`);if(4===t.length)throw new Error(`"${t[0]}" collator not supported`);return new Z(vt(t[1],e),vt(t[2],e),r)}evaluate(t,e){return this._compare(this._lhs.evaluate(t,e),this._rhs.evaluate(t,e))}}class K{constructor(t){this._arg=t,this.type=P}static parse(t,e){if(2!==t.length)throw new Error('"!" expects 1 argument');return new K(vt(t[1],e))}evaluate(t,e){return!this._arg.evaluate(t,e)}}class j{constructor(t){this._args=t,this.type=P}static parse(t,e){const r=[];for(let n=1;n<t.length;n++)r.push(vt(t[n],e));return new j(r)}evaluate(t,e){for(const r of this._args)if(!r.evaluate(t,e))return!1;return!0}}class q{constructor(t){this._args=t,this.type=P}static parse(t,e){const r=[];for(let n=1;n<t.length;n++)r.push(vt(t[n],e));return new q(r)}evaluate(t,e){for(const r of this._args)if(r.evaluate(t,e))return!0;return!1}}class W{constructor(t){this._args=t,this.type=P}static parse(t,e){const r=[];for(let n=1;n<t.length;n++)r.push(vt(t[n],e));return new W(r)}evaluate(t,e){for(const r of this._args)if(r.evaluate(t,e))return!1;return!0}}class J{constructor(t,e,r){this.type=t,this._args=e,this._fallback=r}static parse(t,e,r){if(t.length<4)throw new Error('"case" expects at least 3 arguments');if(t.length%2==1)throw new Error('"case" expects an odd number of arguments');let n;const i=[];for(let a=1;a<t.length-1;a+=2){const s=vt(t[a],e),o=vt(t[a+1],e,r);n||(n=o.type),i.push({condition:s,output:o})}const a=vt(t[t.length-1],e,r);return n||(n=a.type),new J(n,i,a)}evaluate(t,e){for(const r of this._args)if(r.condition.evaluate(t,e))return r.output.evaluate(t,e);return this._fallback.evaluate(t,e)}}class Q{constructor(t,e){this.type=t,this._args=e}static parse(t,e){if(t.length<2)throw new Error('"coalesce" expects at least 1 argument');let r;const n=[];for(let i=1;i<t.length;i++){const a=vt(t[i],e);r||(r=a.type),n.push(a)}return new Q(r,n)}evaluate(t,e){for(const r of this._args){const n=r.evaluate(t,e);if(null!==n)return n}return null}}class tt{constructor(t,e,r,n,i){this.type=t,this._input=e,this._labels=r,this._outputs=n,this._fallback=i}static parse(t,e){if(t.length<3)throw new Error('"match" expects at least 3 arguments');if(t.length%2==0)throw new Error('"case" expects an even number of arguments');let r;const n=vt(t[1],e),i=[],a={};let s;for(let n=2;n<t.length-1;n+=2){let o=t[n];Array.isArray(o)||(o=[o]);for(const t of o){const e=typeof t;if("string"!==e&&"number"!==e)throw new Error('"match" requires string or number literal as labels');if(s){if(e!==s)throw new Error('"match" requires labels to have the same type')}else s=e;a[t]=i.length}const l=vt(t[n+1],e);r||(r=l.type),i.push(l)}return new tt(r,n,a,i,vt(t[t.length-1],e))}evaluate(t,e){const r=this._input.evaluate(t,e);return(this._outputs[this._labels[r]]||this._fallback).evaluate(t,e)}}class et{constructor(t,e,r,n,i){this._operator=t,this.type=e,this.interpolation=r,this.input=n,this._stops=i}static parse(t,e,r){const n=t[0];if(t.length<5)throw new Error(`"${n}" expects at least 4 arguments`);const i=t[1];if(!Array.isArray(i)||0===i.length)throw new Error(`"${i}" is not a valid interpolation`);switch(i[0]){case"linear":if(1!==i.length)throw new Error("Linear interpolation cannot have parameters");break;case"exponential":if(2!==i.length||"number"!=typeof i[1])throw new Error("Exponential interpolation requires one numeric argument");break;case"cubic-bezier":if(5!==i.length)throw new Error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1");for(let t=1;t<5;t++){const e=i[t];if("number"!=typeof e||e<0||e>1)throw new Error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1")}break;default:throw new Error(`"${t[0]}" unknown interpolation type "${i[0]}"`)}if(t.length%2!=1)throw new Error(`"${n}" expects an even number of arguments`);const a=vt(t[2],e,x);let s;"interpolate-hcl"===n||"interpolate-lab"===n?s=O:r&&"value"!==r.kind&&(s=r);const o=[];for(let r=3;r<t.length;r+=2){const i=t[r];if("number"!=typeof i)throw new Error(`"${n}" requires stop inputs as literal numbers`);if(o.length&&o[o.length-1][0]>=i)throw new Error(`"${n}" requires strictly ascending stop inputs`);const a=vt(t[r+1],e,s);s||(s=a.type),o.push([i,a])}if(s&&s!==O&&s!==x&&("array"!==s.kind||s.itemType!==x))throw new Error(`"${n}" cannot interpolate type ${k(s)}`);return new et(n,s,i,a,o)}evaluate(t,e){const r=this._stops;if(1===r.length)return r[0][1].evaluate(t,e);const n=this.input.evaluate(t,e);if(n<=r[0][0])return r[0][1].evaluate(t,e);if(n>=r[r.length-1][0])return r[r.length-1][1].evaluate(t,e);let i=0;for(;++i<r.length&&!(n<r[i][0]););const a=r[i-1][0],s=r[i][0],o=et.interpolationRatio(this.interpolation,n,a,s),l=r[i-1][1].evaluate(t,e),u=r[i][1].evaluate(t,e);if("interpolate"===this._operator){if("array"===this.type.kind&&Array.isArray(l)&&Array.isArray(u))return l.map(((t,e)=>(0,D.sX)(t,u[e],o)));if("color"===this.type.kind&&l instanceof w.Z&&u instanceof w.Z){const t=new w.Z(l),e=new w.Z(u);return new w.Z([(0,D.sX)(t.r,e.r,o),(0,D.sX)(t.g,e.g,o),(0,D.sX)(t.b,e.b,o),(0,D.sX)(t.a,e.a,o)])}if("number"===this.type.kind&&"number"==typeof l&&"number"==typeof u)return(0,D.sX)(l,u,o);throw new Error(`"${this._operator}" cannot interpolate type ${k(this.type)}`)}if("interpolate-hcl"===this._operator){const t=(0,v.sJ)(l),e=(0,v.sJ)(u),r=e.h-t.h,n=(0,v.xr)({h:t.h+o*(r>180||r<-180?r-360*Math.round(r/360):r),c:(0,D.sX)(t.c,e.c,o),l:(0,D.sX)(t.l,e.l,o)});return new w.Z({a:(0,D.sX)(l.a,u.a,o),...n})}if("interpolate-lab"===this._operator){const t=(0,v.Y3)(l),e=(0,v.Y3)(u),r=(0,v.xr)({l:(0,D.sX)(t.l,e.l,o),a:(0,D.sX)(t.a,e.a,o),b:(0,D.sX)(t.b,e.b,o)});return new w.Z({a:(0,D.sX)(l.a,u.a,o),...r})}throw new Error(`Unexpected operator "${this._operator}"`)}interpolationUniformValue(t,e){const r=this._stops;if(1===r.length)return 0;if(t>=r[r.length-1][0])return 0;let n=0;for(;++n<r.length&&!(t<r[n][0]););const i=r[n-1][0],a=r[n][0];return et.interpolationRatio(this.interpolation,e,i,a)}getInterpolationRange(t){const e=this._stops;if(1===e.length){const t=e[0][0];return[t,t]}const r=e[e.length-1][0];if(t>=r)return[r,r];let n=0;for(;++n<e.length&&!(t<e[n][0]););return[e[n-1][0],e[n][0]]}static interpolationRatio(t,e,r,n){let i=0;return"linear"===t[0]?i=et._exponentialInterpolationRatio(e,1,r,n):"exponential"===t[0]?i=et._exponentialInterpolationRatio(e,t[1],r,n):"cubic-bezier"===t[0]&&(i=R(t[1],t[2],t[3],t[4])(et._exponentialInterpolationRatio(e,1,r,n),1e-5)),i<0?i=0:i>1&&(i=1),i}static _exponentialInterpolationRatio(t,e,r,n){const i=n-r;if(0===i)return 0;const a=t-r;return 1===e?a/i:(e**a-1)/(e**i-1)}}class rt{constructor(t,e,r){this.type=t,this._input=e,this._stops=r}static parse(t,e){if(t.length<5)throw new Error('"step" expects at least 4 arguments');if(t.length%2!=1)throw new Error('"step" expects an even number of arguments');const r=vt(t[1],e,x);let n;const i=[];i.push([-1/0,vt(t[2],e)]);for(let r=3;r<t.length;r+=2){const a=t[r];if("number"!=typeof a)throw new Error('"step" requires stop inputs as literal numbers');if(i.length&&i[i.length-1][0]>=a)throw new Error('"step" requires strictly ascending stop inputs');const s=vt(t[r+1],e);n||(n=s.type),i.push([a,s])}return new rt(n,r,i)}evaluate(t,e){const r=this._stops;if(1===r.length)return r[0][1].evaluate(t,e);const n=this._input.evaluate(t,e);let i=0;for(;++i<r.length&&!(n<r[i][0]););return this._stops[i-1][1].evaluate(t,e)}}class nt{constructor(t,e){this.type=t,this._output=e}static parse(t,e,r){if(t.length<4)throw new Error('"let" expects at least 3 arguments');if(t.length%2==1)throw new Error('"let" expects an odd number of arguments');const n=new z(e);for(let r=1;r<t.length-1;r+=2){const i=t[r];if("string"!=typeof i)throw new Error(`"let" requires a string to define variable names - found ${i}`);n.add(i,vt(t[r+1],e))}const i=vt(t[t.length-1],n,r);return new nt(i.type,i)}evaluate(t,e){return this._output.evaluate(t,e)}}class it{constructor(t,e){this.type=t,this.output=e}static parse(t,e,r){if(2!==t.length||"string"!=typeof t[1])throw new Error('"var" requires just one literal string argument');const n=e.get(t[1]);if(!n)throw new Error(`${t[1]} must be defined before being used in a "var" expression`);return new it(r||U,n)}evaluate(t,e){return this.output.evaluate(t,e)}}class at{constructor(t,e,r){this.type=t,this._index=e,this._array=r}static parse(t,e){if(3!==t.length)throw new Error('"at" expects 2 arguments');const r=vt(t[1],e,x),n=vt(t[2],e);return new at(n.type.itemType,r,n)}evaluate(t,e){const r=this._index.evaluate(t,e),n=this._array.evaluate(t,e);if(r<0||r>=n.length)throw new Error('"at" index out of bounds');if(r!==Math.floor(r))throw new Error('"at" index must be an integer');return n[r]}}class st{constructor(t,e){this._key=t,this._obj=e,this.type=U}static parse(t,e){let r,n;switch(t.length){case 2:return r=vt(t[1],e),new st(r);case 3:return r=vt(t[1],e),n=vt(t[2],e),new st(r,n);default:throw new Error('"get" expects 1 or 2 arguments')}}evaluate(t,e){const r=this._key.evaluate(t,e);return this._obj?this._obj.evaluate(t,e)[r]:t?.values[r]}}class ot{constructor(t,e){this._key=t,this._obj=e,this.type=P}static parse(t,e){let r,n;switch(t.length){case 2:return r=vt(t[1],e),new ot(r);case 3:return r=vt(t[1],e),n=vt(t[2],e),new ot(r,n);default:throw new Error('"has" expects 1 or 2 arguments')}}evaluate(t,e){const r=this._key.evaluate(t,e);return this._obj?r in this._obj.evaluate(t,e):!!t?.values[r]}}class lt{constructor(t,e){this._key=t,this._vals=e,this.type=P}static parse(t,e){if(3!==t.length)throw new Error('"in" expects 2 arguments');return new lt(vt(t[1],e),vt(t[2],e))}evaluate(t,e){const r=this._key.evaluate(t,e);return this._vals.evaluate(t,e).includes(r)}}class ut{constructor(t,e,r){this._item=t,this._array=e,this._from=r,this.type=x}static parse(t,e){if(t.length<3||t.length>4)throw new Error('"index-of" expects 3 or 4 arguments');const r=vt(t[1],e),n=vt(t[2],e);if(4===t.length){const i=vt(t[3],e,x);return new ut(r,n,i)}return new ut(r,n)}evaluate(t,e){const r=this._item.evaluate(t,e),n=this._array.evaluate(t,e);if(this._from){const i=this._from.evaluate(t,e);if(i!==Math.floor(i))throw new Error('"index-of" index must be an integer');return n.indexOf(r,i)}return n.indexOf(r)}}class ct{constructor(t){this._arg=t,this.type=x}static parse(t,e){if(2!==t.length)throw new Error('"length" expects 2 arguments');const r=vt(t[1],e);return new ct(r)}evaluate(t,e){const r=this._arg.evaluate(t,e);if("string"==typeof r)return r.length;if(Array.isArray(r))return r.length;throw new Error('"length" expects string or array')}}class ht{constructor(t,e,r,n){this.type=t,this._array=e,this._from=r,this._to=n}static parse(t,e){if(t.length<3||t.length>4)throw new Error('"slice" expects 2 or 3 arguments');const r=vt(t[1],e),n=vt(t[2],e,x);if(n.type!==x)throw new Error('"slice" index must return a number');if(4===t.length){const i=vt(t[3],e,x);if(i.type!==x)throw new Error('"slice" index must return a number');return new ht(r.type,r,n,i)}return new ht(r.type,r,n)}evaluate(t,e){const r=this._array.evaluate(t,e);if(!Array.isArray(r)&&"string"!=typeof r)throw new Error('"slice" input must be an array or a string');const n=this._from.evaluate(t,e);if(n<0||n>=r.length)throw new Error('"slice" index out of bounds');if(n!==Math.floor(n))throw new Error('"slice" index must be an integer');if(this._to){const i=this._to.evaluate(t,e);if(i<0||i>=r.length)throw new Error('"slice" index out of bounds');if(i!==Math.floor(i))throw new Error('"slice" index must be an integer');return r.slice(n,i)}return r.slice(n)}}class pt{constructor(){this.type=P}static parse(t){if(1!==t.length)throw new Error('"has-id" expects no arguments');return new pt}evaluate(t,e){return t&&void 0!==t.id}}class yt{constructor(t,e){this._args=t,this._calculate=e,this.type=x}static parse(t,e,r){const n=t.slice(1).map((t=>vt(t,e)));return new yt(n,r)}evaluate(t,e){let r;return this._args&&(r=this._args.map((r=>r.evaluate(t,e)))),this._calculate(r)}}class ft{constructor(t,e){this._args=t,this._calculate=e,this.type=x}static parse(t,e){const r=t.slice(1).map((t=>vt(t,e)));return new ft(r,ft.ops[t[0]])}evaluate(t,e){let r;return this._args&&(r=this._args.map((r=>r.evaluate(t,e)))),this._calculate(r)}}ft.ops={abs:t=>Math.abs(t[0]),acos:t=>Math.acos(t[0]),asin:t=>Math.asin(t[0]),atan:t=>Math.atan(t[0]),ceil:t=>Math.ceil(t[0]),cos:t=>Math.cos(t[0]),e:()=>Math.E,floor:t=>Math.floor(t[0]),ln:t=>Math.log(t[0]),ln2:()=>Math.LN2,log10:t=>Math.log(t[0])/Math.LN10,log2:t=>Math.log(t[0])/Math.LN2,max:t=>Math.max(...t),min:t=>Math.min(...t),pi:()=>Math.PI,round:t=>Math.round(t[0]),sin:t=>Math.sin(t[0]),sqrt:t=>Math.sqrt(t[0]),tan:t=>Math.tan(t[0])};class gt{constructor(t){this._args=t,this.type=A}static parse(t,e){return new gt(t.slice(1).map((t=>vt(t,e))))}evaluate(t,e){return this._args.map((r=>r.evaluate(t,e))).join("")}}class mt{constructor(t,e){this._arg=t,this._calculate=e,this.type=A}static parse(t,e){if(2!==t.length)throw new Error(`${t[0]} expects 1 argument`);const r=vt(t[1],e);return new mt(r,mt.ops[t[0]])}evaluate(t,e){return this._calculate(this._arg.evaluate(t,e))}}mt.ops={downcase:t=>t.toLowerCase(),upcase:t=>t.toUpperCase()};class _t{constructor(t){this._args=t,this.type=O}static parse(t,e){if(4!==t.length)throw new Error('"rgb" expects 3 arguments');const r=t.slice(1).map((t=>vt(t,e)));return new _t(r)}evaluate(t,e){const r=this._validate(this._args[0].evaluate(t,e)),n=this._validate(this._args[1].evaluate(t,e)),i=this._validate(this._args[2].evaluate(t,e));return new w.Z({r,g:n,b:i})}_validate(t){if("number"!=typeof t||t<0||t>255)throw new Error(`${t}: invalid color component`);return Math.round(t)}}class dt{constructor(t){this._args=t,this.type=O}static parse(t,e){if(5!==t.length)throw new Error('"rgba" expects 4 arguments');const r=t.slice(1).map((t=>vt(t,e)));return new dt(r)}evaluate(t,e){const r=this._validate(this._args[0].evaluate(t,e)),n=this._validate(this._args[1].evaluate(t,e)),i=this._validate(this._args[2].evaluate(t,e)),a=this._validateAlpha(this._args[3].evaluate(t,e));return new w.Z({r,g:n,b:i,a})}_validate(t){if("number"!=typeof t||t<0||t>255)throw new Error(`${t}: invalid color component`);return Math.round(t)}_validateAlpha(t){if("number"!=typeof t||t<0||t>1)throw new Error(`${t}: invalid alpha color component`);return t}}class Et{constructor(t){this._color=t,this.type=G(x,4)}static parse(t,e){if(2!==t.length)throw new Error('"to-rgba" expects 1 argument');const r=vt(t[1],e);return new Et(r)}evaluate(t,e){return new w.Z(this._color.evaluate(t,e)).toRgba()}}class bt{constructor(t,e){this.type=t,this._args=e}static parse(t,e){const r=t[0];if(t.length<2)throw new Error(`${r} expects at least one argument`);let n,i=1;if("array"===r){if(t.length>2){switch(t[1]){case"string":n=A;break;case"number":n=x;break;case"boolean":n=P;break;default:throw new Error('"array" type argument must be string, number or boolean')}i++}else n=U;let e;if(t.length>3){if(e=t[2],null!==e&&("number"!=typeof e||e<0||e!==Math.floor(e)))throw new Error('"array" length argument must be a positive integer literal');i++}n=G(n,e)}else switch(r){case"string":n=A;break;case"number":n=x;break;case"boolean":n=P;break;case"object":n=S}const a=[];for(;i<t.length;i++){const r=vt(t[i],e);a.push(r)}return new bt(n,a)}evaluate(t,e){let r;for(const n of this._args){const i=n.evaluate(t,e);if(r=M(i),C(r,this.type))return i}throw new Error(`Expected ${k(this.type)} but got ${k(r)}`)}}class Tt{constructor(t,e){this.type=t,this._args=e}static parse(t,e){const r=t[0],n=Tt.types[r];if(n===P||n===A){if(2!==t.length)throw new Error(`${r} expects one argument`)}else if(t.length<2)throw new Error(`${r} expects at least one argument`);const i=[];for(let r=1;r<t.length;r++){const n=vt(t[r],e);i.push(n)}return new Tt(n,i)}evaluate(t,e){if(this.type===P)return Boolean(this._args[0].evaluate(t,e));if(this.type===A)return V(this._args[0].evaluate(t,e));if(this.type===x){for(const r of this._args){const n=Number(r.evaluate(t,e));if(!isNaN(n))return n}return null}if(this.type===O){for(const r of this._args)try{const n=Tt.toColor(r.evaluate(t,e));if(n instanceof w.Z)return n}catch{}return null}}static toBoolean(t){return Boolean(t)}static toString(t){return V(t)}static toNumber(t){const e=Number(t);if(isNaN(e))throw new Error(`"${t}" is not a number`);return e}static toColor(t){if(t instanceof w.Z)return t;if("string"==typeof t){const e=w.Z.fromString(t);if(e)return e;throw new Error(`"${t}" is not a color`)}if(Array.isArray(t))return w.Z.fromArray(t);throw new Error(`"${t}" is not a color`)}}Tt.types={"to-boolean":P,"to-color":O,"to-number":x,"to-string":A};class It{constructor(t){this._val=t,this.type=M(t)}static parse(t){if(2!==t.length)throw new Error('"literal" expects 1 argument');return new It(t[1])}evaluate(t,e){return this._val}}class wt{constructor(t){this._arg=t,this.type=A}static parse(t,e){if(2!==t.length)throw new Error('"typeof" expects 1 argument');return new wt(vt(t[1],e))}evaluate(t,e){return k(M(this._arg.evaluate(t,e)))}}function vt(t,e,r){const n=typeof t;if("string"===n||"boolean"===n||"number"===n||null===t){if(r)switch(r.kind){case"string":"string"!==n&&(t=Tt.toString(t));break;case"number":"number"!==n&&(t=Tt.toNumber(t));break;case"color":t=Tt.toColor(t)}t=["literal",t]}if(!Array.isArray(t)||0===t.length)throw new Error("Expression must be a non empty array");const i=t[0];if("string"!=typeof i)throw new Error("First element of expression must be a string");const a=Rt[i];if(void 0===a)throw new Error(`Invalid expression operator "${i}"`);if(!a)throw new Error(`Unimplemented expression operator "${i}"`);return a.parse(t,e,r)}const Rt={array:bt,boolean:bt,collator:null,format:null,image:null,literal:It,number:bt,"number-format":null,object:bt,string:bt,"to-boolean":Tt,"to-color":Tt,"to-number":Tt,"to-string":Tt,typeof:wt,accumulated:null,"feature-state":null,"geometry-type":Y,id:$,"line-progress":null,properties:X,at,get:st,has:ot,in:lt,"index-of":ut,length:ct,slice:ht,"!":K,"!=":class extends Z{static parse(t,e){return Z.parse(t,e,((t,e)=>t!==e))}},"<":class extends Z{static parse(t,e){return Z.parse(t,e,((t,e)=>t<e))}},"<=":class extends Z{static parse(t,e){return Z.parse(t,e,((t,e)=>t<=e))}},"==":class extends Z{static parse(t,e){return Z.parse(t,e,((t,e)=>t===e))}},">":class extends Z{static parse(t,e){return Z.parse(t,e,((t,e)=>t>e))}},">=":class extends Z{static parse(t,e){return Z.parse(t,e,((t,e)=>t>=e))}},all:j,any:q,case:J,coalesce:Q,match:tt,within:null,interpolate:et,"interpolate-hcl":et,"interpolate-lab":et,step:rt,let:nt,var:it,concat:gt,downcase:mt,"is-supported-script":null,"resolved-locale":null,upcase:mt,rgb:_t,rgba:dt,"to-rgba":Et,"-":class extends yt{static parse(t,e){switch(t.length){case 2:return yt.parse(t,e,(t=>-t[0]));case 3:return yt.parse(t,e,(t=>t[0]-t[1]));default:throw new Error('"-" expects 1 or 2 arguments')}}},"*":class extends yt{static parse(t,e){return yt.parse(t,e,(t=>{let e=1;for(const r of t)e*=r;return e}))}},"/":class extends yt{static parse(t,e){if(3===t.length)return yt.parse(t,e,(t=>t[0]/t[1]));throw new Error('"/" expects 2 arguments')}},"%":class extends yt{static parse(t,e){if(3===t.length)return yt.parse(t,e,(t=>t[0]%t[1]));throw new Error('"%" expects 2 arguments')}},"^":class extends yt{static parse(t,e){if(3===t.length)return yt.parse(t,e,(t=>t[0]**t[1]));throw new Error('"^" expects 1 or 2 arguments')}},"+":class extends yt{static parse(t,e){return yt.parse(t,e,(t=>{let e=0;for(const r of t)e+=r;return e}))}},abs:ft,acos:ft,asin:ft,atan:ft,ceil:ft,cos:ft,e:ft,floor:ft,ln:ft,ln2:ft,log10:ft,log2:ft,max:ft,min:ft,pi:ft,round:ft,sin:ft,sqrt:ft,tan:ft,zoom:H,"heatmap-density":null,"has-id":pt,none:W};class Nt{constructor(t){this._expression=t}filter(t,e){if(!this._expression)return!0;try{return this._expression.evaluate(t,e)}catch(t){return console.log(t.message),!0}}static createFilter(t){if(!t)return null;this.isLegacyFilter(t)&&(t=this.convertLegacyFilter(t));try{const e=vt(t,null,P);return new Nt(e)}catch(t){return console.log(t.message),null}}static isLegacyFilter(t){if(!Array.isArray(t))return!0;if(0===t.length)return!0;switch(t[0]){case"==":case"!=":case">":case"<":case">=":case"<=":return 3===t.length&&"string"==typeof t[1]&&!Array.isArray(t[2]);case"in":return t.length>=3&&"string"==typeof t[1]&&!Array.isArray(t[2]);case"!in":case"none":case"!has":return!0;case"any":case"all":for(let e=1;e<t.length;e++)if(this.isLegacyFilter(t[e]))return!0;return!1;case"has":return 2===t.length&&("$id"===t[1]||"$type"===t[1]);default:return!1}}static convertLegacyFilter(t){if(!Array.isArray(t)||0===t.length)return!0;const e=t[0];if(1===t.length)return"any"!==e;switch(e){case"==":return Nt.convertComparison("==",t[1],t[2]);case"!=":return Nt.negate(Nt.convertComparison("==",t[1],t[2]));case">":case"<":case">=":case"<=":return Nt.convertComparison(e,t[1],t[2]);case"in":return Nt.convertIn(t[1],t.slice(2));case"!in":return Nt.negate(Nt.convertIn(t[1],t.slice(2)));case"any":case"all":case"none":return Nt.convertCombining(e,t.slice(1));case"has":return Nt.convertHas(t[1]);case"!has":return Nt.negate(Nt.convertHas(t[1]));default:throw new Error("Unexpected legacy filter.")}}static convertComparison(t,e,r){switch(e){case"$type":return[t,["geometry-type"],r];case"$id":return[t,["id"],r];default:return[t,["get",e],r]}}static convertIn(t,e){switch(t){case"$type":return["in",["geometry-type"],["literal",e]];case"$id":return["in",["id"],["literal",e]];default:return["in",["get",t],["literal",e]]}}static convertHas(t){switch(t){case"$type":return!0;case"$id":return["has-id"];default:return["has",t]}}static convertCombining(t,e){return[t].concat(e.map(this.convertLegacyFilter))}static negate(t){return["!",t]}}var Dt=r(21315);class Lt{constructor(t,e){let r;switch(this.isDataDriven=!1,this.interpolator=null,t.type){case"number":case"color":r=!0;break;case"array":r="number"===t.value;break;default:r=!1}if(null==e&&(e=t.default),Array.isArray(e)&&e.length>0&&Rt[e[0]]){const r={number:x,color:O,string:A,boolean:P,enum:A};try{const n=vt(e,null,"array"===t.type?G(r[t.value]||U,t.length):r[t.type]);this.getValue=this._buildExpression(n,t),this.isDataDriven=!0,n instanceof et&&n.input instanceof H&&(this.interpolator=n)}catch(e){console.log(e.message),this.getValue=this._buildSimple(t.default)}return}r&&"interval"===e.type&&(r=!1);const n=e&&e.stops&&e.stops.length>0;if(n)for(const r of e.stops)r[1]=this._validate(r[1],t);if(this.isDataDriven=!!e&&!!e.property,this.isDataDriven)if(void 0!==e.default&&(e.default=this._validate(e.default,t)),n)switch(e.type){case"identity":this.getValue=this._buildIdentity(e,t);break;case"categorical":this.getValue=this._buildCategorical(e,t);break;default:this.getValue=r?this._buildInterpolate(e,t):this._buildInterval(e,t)}else this.getValue=this._buildIdentity(e,t);else n?this.getValue=r?this._buildZoomInterpolate(e):this._buildZoomInterval(e):(e=this._validate(e,t),this.getValue=this._buildSimple(e))}_validate(t,e){if("number"===e.type){if(t<e.minimum)return e.minimum;if(t>e.maximum)return e.maximum}else"color"===e.type?t=Lt._parseColor(t):"enum"===e.type?"string"==typeof t&&(t=e.values.indexOf(t)):"array"===e.type&&"enum"===e.value?t=t.map((t=>"string"==typeof t?e.values.indexOf(t):t)):"string"===e.type&&(t=V(t));return t}_buildSimple(t){return()=>t}_buildExpression(t,e){return(r,n)=>{try{const i=t.evaluate(n,r);return void 0===i?e.default:this._validate(i,e)}catch(t){return console.log(t.message),e.default}}}_buildIdentity(t,e){return(r,n)=>{let i;return n&&(i=n.values[t.property]),void 0!==i&&(i=this._validate(i,e)),null!=i?i:void 0!==t.default?t.default:e.default}}_buildCategorical(t,e){return(r,n)=>{let i;return n&&(i=n.values[t.property]),i=this._categorical(i,t.stops),void 0!==i?i:void 0!==t.default?t.default:e.default}}_buildInterval(t,e){return(r,n)=>{let i;return n&&(i=n.values[t.property]),"number"==typeof i?this._interval(i,t.stops):void 0!==t.default?t.default:e.default}}_buildInterpolate(t,e){return(r,n)=>{let i;return n&&(i=n.values[t.property]),"number"==typeof i?this._interpolate(i,t.stops,t.base||1):void 0!==t.default?t.default:e.default}}_buildZoomInterpolate(t){return e=>this._interpolate(e,t.stops,t.base||1)}_buildZoomInterval(t){return e=>this._interval(e,t.stops)}_categorical(t,e){const r=e.length;for(let n=0;n<r;n++)if(e[n][0]===t)return e[n][1]}_interval(t,e){const r=e.length;let n=0;for(let i=0;i<r&&e[i][0]<=t;i++)n=i;return e[n][1]}_interpolate(t,e,r){let n,i;const a=e.length;for(let r=0;r<a;r++){const a=e[r];if(!(a[0]<=t)){i=a;break}n=a}if(n&&i){const e=i[0]-n[0],a=t-n[0],s=1===r?a/e:(r**a-1)/(r**e-1);if(Array.isArray(n[1])){const t=n[1],e=i[1],r=[];for(let n=0;n<t.length;n++)r.push((0,D.sX)(t[n],e[n],s));return r}return(0,D.sX)(n[1],i[1],s)}return n?n[1]:i?i[1]:void 0}static _isEmpty(t){for(const e in t)if(t.hasOwnProperty(e))return!1;return!0}static _parseColor(t){return Array.isArray(t)?t:("string"==typeof t&&(t=new w.Z(t)),t instanceof w.Z&&!this._isEmpty(t)?w.Z.toUnitRGBA(t):void 0)}}var xt=r(16534);class At{constructor(t,e,r,n){switch(this.type=t,this.typeName=e.type,this.id=e.id,this.source=e.source,this.sourceLayer=e["source-layer"],this.minzoom=e.minzoom,this.maxzoom=e.maxzoom,this.filter=e.filter,this.layout=e.layout,this.paint=e.paint,this.z=r,this.uid=n,t){case Dt.fR.BACKGROUND:this._layoutDefinition=Dt.f2.backgroundLayoutDefinition,this._paintDefinition=Dt.f2.backgroundPaintDefinition;break;case Dt.fR.FILL:this._layoutDefinition=Dt.f2.fillLayoutDefinition,this._paintDefinition=Dt.f2.fillPaintDefinition;break;case Dt.fR.LINE:this._layoutDefinition=Dt.f2.lineLayoutDefinition,this._paintDefinition=Dt.f2.linePaintDefinition;break;case Dt.fR.SYMBOL:this._layoutDefinition=Dt.f2.symbolLayoutDefinition,this._paintDefinition=Dt.f2.symbolPaintDefinition;break;case Dt.fR.CIRCLE:this._layoutDefinition=Dt.f2.circleLayoutDefinition,this._paintDefinition=Dt.f2.circlePaintDefinition}this._layoutProperties=this._parseLayout(this.layout),this._paintProperties=this._parsePaint(this.paint)}getFeatureFilter(){return void 0!==this._featureFilter?this._featureFilter:this._featureFilter=Nt.createFilter(this.filter)}getLayoutProperty(t){return this._layoutProperties[t]}getPaintProperty(t){return this._paintProperties[t]}getLayoutValue(t,e,r){let n;const i=this._layoutProperties[t];return i&&(n=i.getValue(e,r)),void 0===n&&(n=this._layoutDefinition[t].default),n}getPaintValue(t,e,r){let n;const i=this._paintProperties[t];return i&&(n=i.getValue(e,r)),void 0===n&&(n=this._paintDefinition[t].default),n}isPainterDataDriven(){const t=this._paintProperties;if(t)for(const e in t)if(t[e].isDataDriven)return!0;return!1}_parseLayout(t){const e={};for(const r in t){const n=this._layoutDefinition[r];n&&(e[r]=new Lt(n,t[r]))}return e}_parsePaint(t){const e={};for(const r in t){const n=this._paintDefinition[r];n&&(e[r]=new Lt(n,t[r]))}return e}computeAttributesKey(t,e,r,n){let i=0,a=0;for(const t of e){let e=3;if(!t||t!==n){const n=r[t],{isLayout:i,isOptional:a}=n,s=i?this.getLayoutProperty(t):this.getPaintProperty(t);e=s?.interpolator?2:s?.isDataDriven?1:a&&!s?3:0}a|=e<<i,i+=2}return a<<3|t}}class Pt extends At{constructor(t,e,r,n){super(t,e,r,n),this.backgroundMaterial=new f(this.computeAttributesKey(s._K.BACKGROUND,f.ATTRIBUTES,f.ATTRIBUTES_INFO))}}class Ot extends At{constructor(t,e,r,n){super(t,e,r,n);const i=this.getPaintProperty("fill-color"),a=this.getPaintProperty("fill-opacity"),o=this.getPaintProperty("fill-pattern");this.hasDataDrivenColor=i?.isDataDriven,this.hasDataDrivenOpacity=a?.isDataDriven,this.hasDataDrivenFill=this.hasDataDrivenColor||this.hasDataDrivenOpacity||o?.isDataDriven;const l=this.getPaintProperty("fill-outline-color");this.outlineUsesFillColor=!l,this.hasDataDrivenOutlineColor=l?.isDataDriven,this.hasDataDrivenOutline=l?l.isDataDriven:!!i&&i.isDataDriven,this.hasDataDrivenOutline=(l?this.hasDataDrivenOutlineColor:this.hasDataDrivenColor)||this.hasDataDrivenOpacity,this.fillMaterial=new m(this.computeAttributesKey(s._K.FILL,m.ATTRIBUTES,m.ATTRIBUTES_INFO)),this.outlineMaterial=new _(this.computeAttributesKey(s._K.OUTLINE,this.outlineUsesFillColor?_.ATTRIBUTES_FILL:_.ATTRIBUTES_OUTLINE,this.outlineUsesFillColor?_.ATTRIBUTES_INFO_FILL:_.ATTRIBUTES_INFO_OUTLINE),this.outlineUsesFillColor)}}class St extends At{constructor(t,e,r,n){super(t,e,r,n);const i=this.getPaintProperty("line-pattern");if(this.lineMaterial=new d(this.computeAttributesKey(s._K.LINE,d.ATTRIBUTES,d.ATTRIBUTES_INFO,i?"line-dasharray":"")),this.hasDataDrivenLine=this.getPaintProperty("line-blur")?.isDataDriven||this.getPaintProperty("line-color")?.isDataDriven||this.getPaintProperty("line-gap-width")?.isDataDriven||this.getPaintProperty("line-offset")?.isDataDriven||this.getPaintProperty("line-opacity")?.isDataDriven||this.getPaintProperty("line-pattern")?.isDataDriven||this.getPaintProperty("line-dasharray")?.isDataDriven||this.getLayoutProperty("line-cap")?.isDataDriven||this.getPaintProperty("line-width")?.isDataDriven,this.canUseThinTessellation=!1,!this.hasDataDrivenLine){const t=this.getPaintProperty("line-width");if(!t||"number"==typeof t&&.5*t<xt.tQ){const t=this.getPaintProperty("line-offset");(!t||"number"==typeof t&&0===t)&&(this.canUseThinTessellation=!0)}}}getDashKey(t,e){let r;switch(e){case a.RL.BUTT:r="Butt";break;case a.RL.ROUND:r="Round";break;case a.RL.SQUARE:r="Square";break;default:r="Butt"}return`dasharray-[${t.toString()}]-${r}`}}class Ut extends At{constructor(t,e,r,n){super(t,e,r,n),this.iconMaterial=new T(this.computeAttributesKey(s._K.ICON,T.ATTRIBUTES,T.ATTRIBUTES_INFO)),this.textMaterial=new I(this.computeAttributesKey(s._K.TEXT,I.ATTRIBUTES,I.ATTRIBUTES_INFO)),this.hasDataDrivenIcon=this.getPaintProperty("icon-color")?.isDataDriven||this.getPaintProperty("icon-halo-blur")?.isDataDriven||this.getPaintProperty("icon-halo-color")?.isDataDriven||this.getPaintProperty("icon-halo-width")?.isDataDriven||this.getPaintProperty("icon-opacity")?.isDataDriven||this.getLayoutProperty("icon-size")?.isDataDriven,this.hasDataDrivenText=this.getPaintProperty("text-color")?.isDataDriven||this.getPaintProperty("text-halo-blur")?.isDataDriven||this.getPaintProperty("text-halo-color")?.isDataDriven||this.getPaintProperty("text-halo-width")?.isDataDriven||this.getPaintProperty("text-opacity")?.isDataDriven||this.getLayoutProperty("text-size")?.isDataDriven}}class Gt extends At{constructor(t,e,r,n){super(t,e,r,n),this.circleMaterial=new g(this.computeAttributesKey(s._K.CIRCLE,g.ATTRIBUTES,g.ATTRIBUTES_INFO))}}class Bt{constructor(t,e,r){let n;this.allowOverlap=t.getLayoutValue("icon-allow-overlap",e),this.ignorePlacement=t.getLayoutValue("icon-ignore-placement",e),this.keepUpright=t.getLayoutValue("icon-keep-upright",e),this.optional=t.getLayoutValue("icon-optional",e),this.rotationAlignment=t.getLayoutValue("icon-rotation-alignment",e),this.rotationAlignment===Dt.aF.AUTO&&(this.rotationAlignment=r?Dt.aF.MAP:Dt.aF.VIEWPORT),n=t.getLayoutProperty("icon-anchor"),n?.isDataDriven?this._anchorProp=n:this.anchor=t.getLayoutValue("icon-anchor",e),n=t.getLayoutProperty("icon-offset"),n?.isDataDriven?this._offsetProp=n:this.offset=t.getLayoutValue("icon-offset",e),n=t.getLayoutProperty("icon-padding"),n?.isDataDriven?this._paddingProp=n:this.padding=t.getLayoutValue("icon-padding",e),n=t.getLayoutProperty("icon-rotate"),n?.isDataDriven?this._rotateProp=n:this.rotate=t.getLayoutValue("icon-rotate",e),n=t.getLayoutProperty("icon-size"),n?.isDataDriven?this._sizeProp=n:this.size=t.getLayoutValue("icon-size",e)}update(t,e){this._anchorProp&&(this.anchor=this._anchorProp.getValue(t,e)),this._offsetProp&&(this.offset=this._offsetProp.getValue(t,e)),this._paddingProp&&(this.padding=this._paddingProp.getValue(t,e)),this._rotateProp&&(this.rotate=this._rotateProp.getValue(t,e)),this._sizeProp&&(this.size=this._sizeProp.getValue(t,e))}}class kt{constructor(t,e,r){let n;this.allowOverlap=t.getLayoutValue("text-allow-overlap",e),this.ignorePlacement=t.getLayoutValue("text-ignore-placement",e),this.keepUpright=t.getLayoutValue("text-keep-upright",e),this.optional=t.getLayoutValue("text-optional",e),this.rotationAlignment=t.getLayoutValue("text-rotation-alignment",e),this.rotationAlignment===Dt.aF.AUTO&&(this.rotationAlignment=r?Dt.aF.MAP:Dt.aF.VIEWPORT),n=t.getLayoutProperty("text-anchor"),n?.isDataDriven?this._anchorProp=n:this.anchor=t.getLayoutValue("text-anchor",e),n=t.getLayoutProperty("text-justify"),n?.isDataDriven?this._justifyProp=n:this.justify=t.getLayoutValue("text-justify",e),n=t.getLayoutProperty("text-letter-spacing"),n?.isDataDriven?this._letterSpacingProp=n:this.letterSpacing=t.getLayoutValue("text-letter-spacing",e),n=t.getLayoutProperty("text-line-height"),n?.isDataDriven?this._lineHeightProp=n:this.lineHeight=t.getLayoutValue("text-line-height",e),n=t.getLayoutProperty("text-max-angle"),n?.isDataDriven?this._maxAngleProp=n:this.maxAngle=t.getLayoutValue("text-max-angle",e),n=t.getLayoutProperty("text-max-width"),n?.isDataDriven?this._maxWidthProp=n:this.maxWidth=t.getLayoutValue("text-max-width",e),n=t.getLayoutProperty("text-offset"),n?.isDataDriven?this._offsetProp=n:this.offset=t.getLayoutValue("text-offset",e),n=t.getLayoutProperty("text-padding"),n?.isDataDriven?this._paddingProp=n:this.padding=t.getLayoutValue("text-padding",e),n=t.getLayoutProperty("text-rotate"),n?.isDataDriven?this._rotateProp=n:this.rotate=t.getLayoutValue("text-rotate",e),n=t.getLayoutProperty("text-size"),n?.isDataDriven?this._sizeProp=n:this.size=t.getLayoutValue("text-size",e),n=t.getLayoutProperty("text-writing-mode"),n?.isDataDriven?this._writingModeProp=n:this.writingMode=t.getLayoutValue("text-writing-mode",e)}update(t,e){this._anchorProp&&(this.anchor=this._anchorProp.getValue(t,e)),this._justifyProp&&(this.justify=this._justifyProp.getValue(t,e)),this._letterSpacingProp&&(this.letterSpacing=this._letterSpacingProp.getValue(t,e)),this._lineHeightProp&&(this.lineHeight=this._lineHeightProp.getValue(t,e)),this._maxAngleProp&&(this.maxAngle=this._maxAngleProp.getValue(t,e)),this._maxWidthProp&&(this.maxWidth=this._maxWidthProp.getValue(t,e)),this._offsetProp&&(this.offset=this._offsetProp.getValue(t,e)),this._paddingProp&&(this.padding=this._paddingProp.getValue(t,e)),this._rotateProp&&(this.rotate=this._rotateProp.getValue(t,e)),this._sizeProp&&(this.size=this._sizeProp.getValue(t,e)),this._writingModeProp&&(this.writingMode=this._writingModeProp.getValue(t,e))}}},51785:(t,e,r)=>{r.d(e,{Z:()=>a});var n=r(21315),i=r(7333);class a{constructor(t){if(this._style=t,this.backgroundBucketIds=[],this._uidToLayer=new Map,this._layerByName={},this._runningId=0,t.layers||(t.layers=[]),this.version=parseFloat(t.version),this.layers=t.layers.map(((t,e,r)=>this._create(t,e,r))).filter((t=>!!t)),this.layers){let t;for(let e=0;e<this.layers.length;e++)t=this.layers[e],this._layerByName[t.id]=t,this._uidToLayer.set(t.uid,t),t.type===n.fR.BACKGROUND&&this.backgroundBucketIds.push(t.id)}this._identifyRefLayers()}isPainterDataDriven(t){const e=this._layerByName[t];return!!e&&e.isPainterDataDriven()}getStyleLayerId(t){return t>=this.layers.length?null:this.layers[t].id}getStyleLayerByUID(t){return this._uidToLayer.get(t)??null}getStyleLayerIndex(t){const e=this._layerByName[t];return e?this.layers.indexOf(e):-1}setStyleLayer(t,e){if(!t||!t.id)return;const r=this._style;null!=e&&e>=this.layers.length&&(e=this.layers.length-1);let n,i=!0;const s=this._layerByName[t.id];if(s){const o=this.layers.indexOf(s);e||(e=o),e===o?(i=!1,n=a._recreateLayer(t,s),this.layers[e]=n,r.layers[e]=t):(this.layers.splice(o,1),r.layers.splice(o,1),n=this._create(t,e,this.layers),this.layers.splice(e,0,n),r.layers.splice(e,0,t))}else n=this._create(t,e,this.layers),!e||e>=this.layers.length?(this.layers.push(n),r.layers.push(t)):(this.layers.splice(e,0,n),r.layers.splice(e,0,t));this._layerByName[t.id]=n,this._uidToLayer.set(n.uid,n),i&&this._recomputeZValues(),this._identifyRefLayers()}getStyleLayer(t){const e=this._layerByName[t];return e?{type:e.typeName,id:e.id,source:e.source,"source-layer":e.sourceLayer,minzoom:e.minzoom,maxzoom:e.maxzoom,filter:e.filter,layout:e.layout,paint:e.paint}:null}deleteStyleLayer(t){const e=this._layerByName[t];if(e){delete this._layerByName[t],this._uidToLayer.delete(e.uid);const r=this.layers.indexOf(e);this.layers.splice(r,1),this._style.layers.splice(r,1),this._recomputeZValues(),this._identifyRefLayers()}}getLayerById(t){return this._layerByName[t]}getLayoutProperties(t){const e=this._layerByName[t];return e?e.layout:null}getPaintProperties(t){const e=this._layerByName[t];return e?e.paint:null}setPaintProperties(t,e){const r=this._layerByName[t];if(!r)return;const n={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:r.layout,paint:e},i=a._recreateLayer(n,r),s=this.layers.indexOf(r);this.layers[s]=i,this._style.layers[s].paint=e,this._layerByName[r.id]=i,this._uidToLayer.set(r.uid,i)}setLayoutProperties(t,e){const r=this._layerByName[t];if(!r)return;const n={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:e,paint:r.paint},i=a._recreateLayer(n,r),s=this.layers.indexOf(r);this.layers[s]=i,this._style.layers[s].layout=e,this._layerByName[r.id]=i,this._uidToLayer.set(r.uid,i)}setStyleLayerVisibility(t,e){const r=this._layerByName[t];if(!r)return;const n=r.layout||{};n.visibility=e;const i={type:r.typeName,id:r.id,source:r.source,"source-layer":r.sourceLayer,minzoom:r.minzoom,maxzoom:r.maxzoom,filter:r.filter,layout:n,paint:r.paint},s=a._recreateLayer(i,r),o=this.layers.indexOf(r);this.layers[o]=s,this._style.layers[o].layout=n,this._layerByName[r.id]=s,this._uidToLayer.set(r.uid,s)}getStyleLayerVisibility(t){const e=this._layerByName[t];return e?e.layout?.visibility??"visible":"none"}_recomputeZValues(){const t=this.layers,e=1/(t.length+1);for(let r=0;r<t.length;r++)t[r].z=1-(1+r)*e}_identifyRefLayers(){const t=[],e=[];let r=0;for(const i of this.layers){const a=i.layout;if(i.type===n.fR.FILL){const e=i;let n=i.source+"|"+i.sourceLayer;n+="|"+(a?.visibility??""),n+="|"+i.minzoom,n+="|"+i.maxzoom,n+="|"+JSON.stringify(i.filter),(e.hasDataDrivenFill||e.hasDataDrivenOutline)&&(n+="|"+r),t.push({key:n,layer:i})}else if(i.type===n.fR.LINE){const t=i,n=i.paint,s=null!=n&&(null!=n["line-pattern"]||null!=n["line-dasharray"]);let o=i.source+"|"+i.sourceLayer;o+="|"+(a?.visibility??""),o+="|"+i.minzoom,o+="|"+i.maxzoom,o+="|"+JSON.stringify(i.filter),o+="|"+(void 0!==a?a["line-cap"]:""),o+="|"+(void 0!==a?a["line-join"]:""),(t.hasDataDrivenLine||s)&&(o+="|"+r),e.push({key:o,layer:i})}++r}this._assignRefLayers(t),this._assignRefLayers(e)}_assignRefLayers(t){let e,r;t.sort(((t,e)=>t.key<e.key?-1:t.key>e.key?1:0));const i=t.length;for(let a=0;a<i;a++){const s=t[a];if(s.key===e)s.layer.refLayerId=r;else if(e=s.key,r=s.layer.id,s.layer.type===n.fR.FILL){if(!s.layer.getPaintProperty("fill-outline-color"))for(let n=a+1;n<i;n++){const i=t[n];if(i.key!==e)break;if(i.layer.getPaintProperty("fill-outline-color")){t[a]=i,t[n]=s,r=i.layer.id;break}}}else if(s.layer.type===n.fR.LINE){let n=s.layer;for(let o=a+1;o<i;o++){const i=t[o];if(i.key!==e)break;const l=i.layer;(n.canUseThinTessellation&&!l.canUseThinTessellation||!n.canUseThinTessellation&&(l.getPaintProperty("line-pattern")||l.getPaintProperty("line-dasharray")))&&(n=l,t[a]=i,t[o]=s,r=i.layer.id)}}}}_create(t,e,r){const a=1-(1+e)*(1/(r.length+1)),s=this._runningId++;switch(t.type){case"background":return new i.Et(n.fR.BACKGROUND,t,a,s);case"fill":return new i.Le(n.fR.FILL,t,a,s);case"line":return new i.gf(n.fR.LINE,t,a,s);case"symbol":return new i.jG(n.fR.SYMBOL,t,a,s);case"raster":console.warn(`Unsupported vector tile raster layer ${t.id}`);case"circle":return new i.sj(n.fR.CIRCLE,t,a,s)}}static _recreateLayer(t,e){switch(t.type){case"background":return new i.Et(n.fR.BACKGROUND,t,e.z,e.uid);case"fill":return new i.Le(n.fR.FILL,t,e.z,e.uid);case"line":return new i.gf(n.fR.LINE,t,e.z,e.uid);case"symbol":return new i.jG(n.fR.SYMBOL,t,e.z,e.uid);case"raster":console.warn(`Unsupported vector tile raster layer ${t.id}`);case"circle":return new i.sj(n.fR.CIRCLE,t,e.z,e.uid)}}}},35362:(t,e,r)=>{r.d(e,{E:()=>n,V:()=>i});class n{constructor(t,e){this.x=t,this.y=e}clone(){return new n(this.x,this.y)}equals(t,e){return t===this.x&&e===this.y}isEqual(t){return t.x===this.x&&t.y===this.y}setCoords(t,e){this.x=t,this.y=e}normalize(){const t=this.x,e=this.y,r=Math.sqrt(t*t+e*e);this.x/=r,this.y/=r}rightPerpendicular(){const t=this.x;this.x=this.y,this.y=-t}move(t,e){this.x+=t,this.y+=e}assign(t){this.x=t.x,this.y=t.y}assignAdd(t,e){this.x=t.x+e.x,this.y=t.y+e.y}assignSub(t,e){this.x=t.x-e.x,this.y=t.y-e.y}rotate(t,e){const r=this.x,n=this.y;this.x=r*t-n*e,this.y=r*e+n*t}scale(t){this.x*=t,this.y*=t}length(){const t=this.x,e=this.y;return Math.sqrt(t*t+e*e)}static distance(t,e){const r=e.x-t.x,n=e.y-t.y;return Math.sqrt(r*r+n*n)}static add(t,e){return new n(t.x+e.x,t.y+e.y)}static sub(t,e){return new n(t.x-e.x,t.y-e.y)}}var i;!function(t){t[t.Unknown=0]="Unknown",t[t.Point=1]="Point",t[t.LineString=2]="LineString",t[t.Polygon=3]="Polygon"}(i||(i={}))},21968:(t,e,r)=>{r.d(e,{G:()=>n});class n{constructor(t,e,r,n,i,a=!1,s=0){this.name=t,this.count=e,this.type=r,this.offset=n,this.stride=i,this.normalized=a,this.divisor=s}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6925,4889],{3920:(e,t,i)=>{i.d(t,{p:()=>p,r:()=>u});var r=i(43697),o=i(15923),s=i(61247),a=i(5600),n=i(52011),l=i(72762);const p=e=>{let t=class extends e{destroy(){this.destroyed||(this._get("handles")?.destroy(),this._get("updatingHandles")?.destroy())}get handles(){return this._get("handles")||new s.Z}get updatingHandles(){return this._get("updatingHandles")||new l.t}};return(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,r._)([(0,n.j)("esri.core.HandleOwner")],t),t};let u=class extends(p(o.Z)){};u=(0,r._)([(0,n.j)("esri.core.HandleOwner")],u)},65845:(e,t,i)=>{i.d(t,{D:()=>o});var r=i(81153);function o(e){e&&e.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:i})=>{(0,r.l)(e)&&i&&e.originOf(t)!==i&&e.updateOrigin(t,i)}))}},81153:(e,t,i)=>{function r(e){return e&&"getAtOrigin"in e&&"originOf"in e}i.d(t,{l:()=>r})},17445:(e,t,i)=>{i.d(t,{N1:()=>c,YP:()=>l,Z_:()=>b,gx:()=>p,nn:()=>h,on:()=>d,tX:()=>f});var r=i(91460),o=i(50758),s=i(70586),a=i(95330),n=i(26258);function l(e,t,i={}){return u(e,t,i,m)}function p(e,t,i={}){return u(e,t,i,y)}function u(e,t,i={},r){let o=null;const a=i.once?(e,i)=>{r(e)&&((0,s.hw)(o),t(e,i))}:(e,i)=>{r(e)&&t(e,i)};if(o=(0,n.aQ)(e,a,i.sync,i.equals),i.initial){const t=e();a(t,t)}return o}function d(e,t,i,a={}){let n=null,p=null,u=null;function d(){n&&p&&(p.remove(),a.onListenerRemove?.(n),n=null,p=null)}function c(e){a.once&&a.once&&(0,s.hw)(u),i(e)}const m=l(e,((e,i)=>{d(),(0,r.vT)(e)&&(n=e,p=(0,r.on)(e,t,c),a.onListenerAdd?.(e))}),{sync:a.sync,initial:!0});return u=(0,o.kB)((()=>{m.remove(),d()})),u}function c(e,t){return function(e,t,i){if((0,a.Hc)(i))return Promise.reject((0,a.zE)());const r=e();if(t?.(r))return Promise.resolve(r);let n=null;function l(){n=(0,s.hw)(n)}return new Promise(((r,s)=>{n=(0,o.AL)([(0,a.fu)(i,(()=>{l(),s((0,a.zE)())})),u(e,(e=>{l(),r(e)}),{sync:!1,once:!0},t??m)])}))}(e,y,t)}function m(e){return!0}function y(e){return!!e}i(87538);const b={sync:!0},h={initial:!0},f={sync:!0,initial:!0}},72762:(e,t,i)=>{i.d(t,{t:()=>d});var r=i(43697),o=i(15923),s=i(61247),a=i(70586),n=i(17445),l=i(1654),p=i(5600),u=i(52011);let d=class extends o.Z{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._handles=new s.Z,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll(),this._handles.destroy()}add(e,t,i={}){return this._installWatch(e,t,i,n.YP)}addWhen(e,t,i={}){return this._installWatch(e,t,i,n.gx)}addOnCollectionChange(e,t,{initial:i=!1,final:r=!1}={}){const o=++this._handleId;return this._handles.add([(0,n.on)(e,"after-changes",this._createSyncUpdatingCallback(),n.Z_),(0,n.on)(e,"change",t,{onListenerAdd:i?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:r?e=>t({added:[],removed:e.toArray()}):void 0})],o),{remove:()=>this._handles.remove(o)}}addPromise(e){if((0,a.Wi)(e))return e;const t=++this._handleId;this._handles.add({remove:()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this._handles.has(c)||this._set("updating",!1))}},t),this._pendingPromises.add(e),this._set("updating",!0);const i=()=>this._handles.remove(t);return e.then(i,i),e}removeAll(){this._pendingPromises.clear(),this._handles.removeAll(),this._set("updating",!1)}_installWatch(e,t,i={},r){const o=++this._handleId;i.sync||this._installSyncUpdatingWatch(e,o);const s=r(e,t,i);return this._handles.add(s,o),{remove:()=>this._handles.remove(o)}}_installSyncUpdatingWatch(e,t){const i=this._createSyncUpdatingCallback(),r=(0,n.YP)(e,i,{sync:!0,equals:()=>!1});return this._handles.add(r,t),r}_createSyncUpdatingCallback(){return()=>{this._handles.remove(c),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this._handles.add((0,l.Os)((()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this._handles.remove(c))})),c)}}};(0,r._)([(0,p.Cb)({readOnly:!0})],d.prototype,"updating",void 0),d=(0,r._)([(0,u.j)("esri.core.support.WatchUpdatingTracking")],d);const c=-42},82526:(e,t,i)=>{i.d(t,{aX:()=>O});var r=i(68773),o=i(20102),s=i(92604),a=i(70586),n=i(38913),l=i(58901),p=i(82971),u=i(33955);const d={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new l.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:p.Z.WebMercator}),minus180Line:new l.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:p.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new l.Z({paths:[[[180,-180],[180,180]]],spatialReference:p.Z.WGS84}),minus180Line:new l.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:p.Z.WGS84})}};function c(e,t){return Math.ceil((e-t)/(2*t))}function m(e,t){const i=y(e);for(const e of i)for(const i of e)i[0]+=t;return e}function y(e){return(0,u.oU)(e)?e.rings:e.paths}var b=i(8744),h=i(40488),f=(i(66577),i(3172)),v=i(17452);function g(e){return{geometryType:(0,u.Ji)(e[0]),geometries:e.map((e=>e.toJSON()))}}const T=s.Z.getLogger("esri.geometry.support.normalizeUtils");function C(e){return"polygon"===e[0].type}function w(e){return"polyline"===e[0].type}function S(e,t,i){if(t){const t=function(e,t){if(!(e instanceof l.Z||e instanceof n.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw T.error(e),new o.Z(e)}const i=y(e),r=[];for(const e of i){const i=[];r.push(i),i.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const o=e[r][0],s=e[r][1],a=e[r+1][0],n=e[r+1][1],l=Math.sqrt((a-o)*(a-o)+(n-s)*(n-s)),p=(n-s)/l,u=(a-o)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const r=e*t,a=u*r+o,n=p*r+s;i.push([a,n])}const e=(l+Math.floor(d-1)*t)/2,r=u*e+o,a=p*e+s;i.push([r,a])}i.push([a,n])}}return function(e){return"polygon"===e.type}(e)?new n.Z({rings:r,spatialReference:e.spatialReference}):new l.Z({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,h.Sx)(t,!0)}return i&&(e=m(e,i)),e}function _(e,t,i){if(Array.isArray(e)){const r=e[0];if(r>t){const i=c(r,t);e[0]=r+i*(-2*t)}else if(r<i){const t=c(r,i);e[0]=r+t*(-2*i)}}else{const r=e.x;if(r>t){const i=c(r,t);e=e.clone().offset(i*(-2*t),0)}else if(r<i){const t=c(r,i);e=e.clone().offset(t*(-2*i),0)}}return e}function N(e,t){let i=-1;for(let r=0;r<t.cutIndexes.length;r++){const o=t.cutIndexes[r],s=t.geometries[r],a=y(s);for(let e=0;e<a.length;e++){const t=a[e];t.some((i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const r=t[e][0];i=r>i?r:i}i=Number(i.toFixed(9));const r=-360*c(i,180);for(let i=0;i<t.length;i++){const t=s.getPoint(e,i);s.setPoint(e,i,t.clone().offset(r,0))}return!0}}))}if(o===i){if(C(e))for(const t of y(s))e[o]=e[o].addRing(t);else if(w(e))for(const t of y(s))e[o]=e[o].addPath(t)}else i=o,e[o]=s}return e}async function O(e,t,i){if(!Array.isArray(e))return O([e],t);t&&"string"!=typeof t&&T.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const o="string"==typeof t?t:t?.url??r.Z.geometryServiceUrl;let s,p,y,C,w,A,D,I,x=0;const j=[],F=[];for(const t of e)if((0,a.Wi)(t))F.push(t);else if(s||(s=t.spatialReference,p=(0,b.C5)(s),y=s.isWebMercator,A=y?102100:4326,C=d[A].maxX,w=d[A].minX,D=d[A].plus180Line,I=d[A].minus180Line),p)if("mesh"===t.type)F.push(t);else if("point"===t.type)F.push(_(t.clone(),C,w));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>_(e,C,w))),F.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,p);F.push(e.rings?new n.Z(e):e)}else if(t.extent){const e=t.extent,i=c(e.xmin,w)*(2*C);let r=0===i?t.clone():m(t.clone(),i);e.offset(i,0),e.intersects(D)&&e.xmax!==C?(x=e.xmax>x?e.xmax:x,r=S(r,y),j.push(r),F.push("cut")):e.intersects(I)&&e.xmin!==w?(x=e.xmax*(2*C)>x?e.xmax*(2*C):x,r=S(r,y,360),j.push(r),F.push("cut")):F.push(r)}else F.push(t.clone());else F.push(t);let B=c(x,C),E=-90;const L=B,M=new l.Z;for(;B>0;){const e=360*B-180;M.addPath([[e,E],[e,-1*E]]),E*=-1,B--}if(j.length>0&&L>0){const t=N(j,await async function(e,t,i,r){const o="string"==typeof e?(0,v.mN)(e):e,s=t[0].spatialReference,a={...r,query:{...o.query,f:"json",sr:JSON.stringify(s),target:JSON.stringify({geometryType:(0,u.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},n=await(0,f.default)(o.path+"/cut",a),{cutIndexes:l,geometries:p=[]}=n.data;return{cutIndexes:l,geometries:p.map((e=>{const t=(0,u.im)(e);return t.spatialReference=s,t}))}}(o,j,M,i)),r=[],s=[];for(let i=0;i<F.length;i++){const o=F[i];if("cut"!==o)s.push(o);else{const o=t.shift(),n=e[i];(0,a.pC)(n)&&"polygon"===n.type&&n.rings&&n.rings.length>1&&o.rings.length>=n.rings.length?(r.push(o),s.push("simplify")):s.push(y?(0,h.$)(o):o)}}if(!r.length)return s;const n=await async function(e,t,i){const r="string"==typeof e?(0,v.mN)(e):e,o=t[0].spatialReference,s=(0,u.Ji)(t[0]),a={...i,query:{...r.query,f:"json",sr:o.wkid?o.wkid:JSON.stringify(o),geometries:JSON.stringify(g(t))}};return function(e,t,i){const r=(0,u.q9)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=i,t}))}((await(0,f.default)(r.path+"/simplify",a)).data,s,o)}(o,r,i),l=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?l.push(t):l.push(y?(0,h.$)(n.shift()):n.shift())}return l}const R=[];for(let e=0;e<F.length;e++){const t=F[e];if("cut"!==t)R.push(t);else{const e=j.shift();R.push(!0===y?(0,h.$)(e):e)}}return R}},69285:(e,t,i)=>{i.d(t,{k:()=>a});var r=i(70586),o=i(67900),s=i(8744);function a(e,t,i){if((0,r.Wi)(t)||(0,r.Wi)(i)||i.vcsWkid||(0,s.fS)(t,i))return null;const a=(0,o._R)(t)/(0,o._R)(i);if(1===a)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){e&&null!=e.z&&(e.z*=t)}(e,a);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const i of e.paths)for(const e of i)e.length>2&&(e[2]*=t)}(e,a);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const i of e.rings)for(const e of i)e.length>2&&(e[2]*=t)}(e,a);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const i of e.points)i.length>2&&(i[2]*=t)}(e,a);case"extent":case"esriGeometryExtent":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,a);default:return null}}},40153:(e,t,i)=>{i.r(t),i.d(t,{default:()=>ui});var r=i(43697),o=i(68773),s=i(66577),a=i(38171),n=i(51773),l=(i(16050),i(12501),i(28756),i(92271),i(72529),i(5499),i(84382),i(81571),i(91423)),p=i(46791),u=i(20102),d=i(3920),c=i(92604),m=i(70586),y=i(16453),b=i(78286),h=i(95330),f=i(17445),v=i(67900),g=i(17452),T=i(5600),C=(i(67676),i(75215)),w=i(71715),S=i(52011),_=i(30556),N=i(65845),O=i(6570),A=i(44547),D=i(8744),I=i(87085),x=i(71612),j=i(38009),F=i(16859),B=i(72965),E=i(66677),L=i(9790),M=i(96674),R=i(77987);let P=class extends M.wq{constructor(e){super(e),this.break=new R.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new R.Z({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new R.Z({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new R.Z({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new R.Z({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new R.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,r._)([(0,T.Cb)({types:L.LB})],P.prototype,"break",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],P.prototype,"first",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],P.prototype,"unlocated",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],P.prototype,"last",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],P.prototype,"middle",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],P.prototype,"waypoint",void 0),P=(0,r._)([(0,S.j)("esri.layers.support.RouteStopSymbols")],P);const J=P;var W=i(4095),k=i(20256);let U=class extends M.wq{constructor(e){super(e),this.directionLines=new W.Z({color:[0,122,194],width:6}),this.directionPoints=new R.Z({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new R.Z({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new k.Z({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new W.Z({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new W.Z({width:8,color:[20,89,127]}),this.stops=new J}};(0,r._)([(0,T.Cb)({types:L.LB})],U.prototype,"directionLines",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],U.prototype,"directionPoints",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],U.prototype,"pointBarriers",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],U.prototype,"polygonBarriers",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],U.prototype,"polylineBarriers",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],U.prototype,"routeInfo",void 0),(0,r._)([(0,T.Cb)({type:J})],U.prototype,"stops",void 0),U=(0,r._)([(0,S.j)("esri.layers.support.RouteSymbols")],U);const Z=U;var V=i(65587),q=i(15235),G=i(14661),z=i(3172),K=i(11282),H=i(36030),X=i(35454);const Y=(0,X.w)()({esriCentimeters:"centimeters",esriDecimalDegrees:"decimal-degrees",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriPoints:"points",esriUnknownUnits:"unknown",esriYards:"yards"}),$=(0,X.w)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards"}),Q=(0,X.w)()({esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds"}),ee=(0,X.w)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),te=(0,X.w)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),ie=((0,X.w)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,X.w)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),re=((0,X.w)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,X.w)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,X.w)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),oe=(0,X.w)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),se=(0,X.w)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),ae=(0,X.w)()({0:"ok",1:"not-located",2:"network-element-not-located",3:"element-not-traversable",4:"invalid-field-values",5:"not-reached",6:"time-window-violation",7:"not-located-on-closest"},{useNumericKeys:!0}),ne=(0,X.w)()({1:"right",2:"left"},{useNumericKeys:!0}),le=(0,X.w)()({0:"restriction",1:"added-cost"},{useNumericKeys:!0}),pe=(0,X.w)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),ue=(0,X.w)()({1:"header",50:"arrive",51:"depart",52:"straight",100:"on-ferry",101:"off-ferry",102:"central-fork",103:"roundabout",104:"u-turn",150:"door",151:"stairs",152:"elevator",153:"escalator",154:"pedestrian-ramp",200:"left-fork",201:"left-ramp",202:"clockwise-roundabout",203:"left-handed-u-turn",204:"bear-left",205:"left-turn",206:"sharp-left",207:"left-turn-and-immediate-left-turn",208:"left-turn-and-immediate-right-turn",300:"right-fork",301:"right-ramp",302:"counter-clockwise-roundabout",303:"right-handed-u-turn",304:"bear-right",305:"right-turn",306:"sharp-right",307:"right-turn-and-immediate-left-turn",308:"right-turn-and-immediate-right-turn",400:"up-elevator",401:"up-escalator",402:"up-stairs",500:"down-elevator",501:"down-escalator",502:"down-stairs",1e3:"general-event",1001:"landmark",1002:"time-zone-change",1003:"traffic-event",1004:"scaled-cost-barrier-event",1005:"boundary-crossing",1006:"restriction-violation"},{useNumericKeys:!0}),de=(0,X.w)()({0:"unknown",1:"segment",2:"maneuver-segment",3:"restriction-violation",4:"scaled-cost-barrier",5:"heavy-traffic",6:"slow-traffic",7:"moderate-traffic"},{useNumericKeys:!0}),ce=(0,X.w)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),me=(0,X.w)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),ye=(0,X.w)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),be=(0,X.w)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),he=(0,X.w)()({"Any Hazmat Prohibited":"any-hazmat-prohibited","Avoid Carpool Roads":"avoid-carpool-roads","Avoid Express Lanes":"avoid-express-lanes","Avoid Ferries":"avoid-ferries","Avoid Gates":"avoid-gates","Avoid Limited Access Roads":"avoid-limited-access-roads","Avoid Private Roads":"avoid-private-roads","Avoid Roads Unsuitable for Pedestrians":"avoid-roads-unsuitable-for-pedestrians","Avoid Stairways":"avoid-stairways","Avoid Toll Roads":"avoid-toll-roads","Avoid Toll Roads for Trucks":"avoid-toll-roads-for-trucks","Avoid Truck Restricted Roads":"avoid-truck-restricted-roads","Avoid Unpaved Roads":"avoid-unpaved-roads","Axle Count Restriction":"axle-count-restriction","Driving a Bus":"driving-a-bus","Driving a Taxi":"driving-a-taxi","Driving a Truck":"driving-a-truck","Driving an Automobile":"driving-an-automobile","Driving an Emergency Vehicle":"driving-an-emergency-vehicle","Height Restriction":"height-restriction","Kingpin to Rear Axle Length Restriction":"kingpin-to-rear-axle-length-restriction","Length Restriction":"length-restriction","Preferred for Pedestrians":"preferred-for-pedestrians","Riding a Motorcycle":"riding-a-motorcycle","Roads Under Construction Prohibited":"roads-under-construction-prohibited","Semi or Tractor with One or More Trailers Prohibited":"semi-or-tractor-with-one-or-more-trailers-prohibited","Single Axle Vehicles Prohibited":"single-axle-vehicles-prohibited","Tandem Axle Vehicles Prohibited":"tandem-axle-vehicles-prohibited","Through Traffic Prohibited":"through-traffic-prohibited","Truck with Trailers Restriction":"truck-with-trailers-restriction","Use Preferred Hazmat Routes":"use-preferred-hazmat-routes","Use Preferred Truck Routes":"use-preferred-truck-routes",Walking:"walking","Weight Restriction":"weight-restriction"},{ignoreUnknown:!1}),fe=(0,X.w)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),ve=(0,X.w)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),ge=(0,X.w)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),Te=(0,X.w)()({esriDSTAltName:"alt-name",esriDSTArrive:"arrive",esriDSTBranch:"branch",esriDSTCrossStreet:"cross-street",esriDSTCumulativeLength:"cumulative-length",esriDSTDepart:"depart",esriDSTEstimatedArrivalTime:"estimated-arrival-time",esriDSTExit:"exit",esriDSTGeneral:"general",esriDSTLength:"length",esriDSTServiceTime:"service-time",esriDSTStreetName:"street-name",esriDSTSummary:"summary",esriDSTTime:"time",esriDSTTimeWindow:"time-window",esriDSTToward:"toward",esriDSTViolationTime:"violation-time",esriDSTWaitTime:"wait-time"});let Ce=class extends M.wq{constructor(e){super(e),this.dataType=null,this.name=null,this.parameterNames=null,this.restrictionUsageParameterName=null,this.timeNeutralAttributeName=null,this.trafficSupport=null,this.units=null,this.usageType=null}};(0,r._)([(0,T.Cb)({type:String})],Ce.prototype,"dataType",void 0),(0,r._)([(0,H.J)(be,{ignoreUnknown:!1})],Ce.prototype,"name",void 0),(0,r._)([(0,T.Cb)({type:[String]})],Ce.prototype,"parameterNames",void 0),(0,r._)([(0,T.Cb)({type:String})],Ce.prototype,"restrictionUsageParameterName",void 0),(0,r._)([(0,H.J)(ye,{ignoreUnknown:!1})],Ce.prototype,"timeNeutralAttributeName",void 0),(0,r._)([(0,T.Cb)({type:String})],Ce.prototype,"trafficSupport",void 0),(0,r._)([(0,T.Cb)({type:String})],Ce.prototype,"units",void 0),(0,r._)([(0,H.J)(ge)],Ce.prototype,"usageType",void 0),Ce=(0,r._)([(0,S.j)("esri.rest.support.NetworkAttribute")],Ce);const we=Ce;let Se=class extends M.wq{constructor(e){super(e),this.buildTime=null,this.name=null,this.networkAttributes=null,this.networkSources=null,this.state=null}};(0,r._)([(0,T.Cb)({type:Number})],Se.prototype,"buildTime",void 0),(0,r._)([(0,T.Cb)({type:String})],Se.prototype,"name",void 0),(0,r._)([(0,T.Cb)({type:[we]})],Se.prototype,"networkAttributes",void 0),(0,r._)([(0,T.Cb)()],Se.prototype,"networkSources",void 0),(0,r._)([(0,T.Cb)({type:String})],Se.prototype,"state",void 0),Se=(0,r._)([(0,S.j)("esri.rest.support.NetworkDataset")],Se);const _e=Se;var Ne=i(2368);let Oe=class extends((0,Ne.J)(M.wq)){constructor(e){super(e),this.attributeParameterValues=null,this.description=null,this.distanceAttributeName=null,this.id=null,this.impedanceAttributeName=null,this.name=null,this.restrictionAttributeNames=null,this.simplificationTolerance=null,this.simplificationToleranceUnits=null,this.timeAttributeName=null,this.type=null,this.useHierarchy=null,this.uturnAtJunctions=null}readRestrictionAttributes(e,t){const{restrictionAttributeNames:i}=t;return(0,m.Wi)(i)?null:i.map((e=>he.fromJSON(e)))}writeRestrictionAttributes(e,t,i){(0,m.Wi)(e)||(t[i]=e.map((e=>he.toJSON(e))))}};(0,r._)([(0,T.Cb)({type:[Object],json:{write:!0}})],Oe.prototype,"attributeParameterValues",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Oe.prototype,"description",void 0),(0,r._)([(0,H.J)(me,{ignoreUnknown:!1})],Oe.prototype,"distanceAttributeName",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Oe.prototype,"id",void 0),(0,r._)([(0,H.J)(be,{ignoreUnknown:!1})],Oe.prototype,"impedanceAttributeName",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Oe.prototype,"name",void 0),(0,r._)([(0,T.Cb)({type:[String],json:{write:!0}})],Oe.prototype,"restrictionAttributeNames",void 0),(0,r._)([(0,w.r)("restrictionAttributeNames")],Oe.prototype,"readRestrictionAttributes",null),(0,r._)([(0,_.c)("restrictionAttributeNames")],Oe.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,T.Cb)({type:Number,json:{write:{allowNull:!0}}})],Oe.prototype,"simplificationTolerance",void 0),(0,r._)([(0,H.J)(Y)],Oe.prototype,"simplificationToleranceUnits",void 0),(0,r._)([(0,H.J)(ye,{ignoreUnknown:!1})],Oe.prototype,"timeAttributeName",void 0),(0,r._)([(0,H.J)(re)],Oe.prototype,"type",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Oe.prototype,"useHierarchy",void 0),(0,r._)([(0,H.J)(ie)],Oe.prototype,"uturnAtJunctions",void 0),Oe=(0,r._)([(0,S.j)("esri.rest.support.TravelMode")],Oe);const Ae=Oe;let De=class extends M.wq{constructor(e){super(e),this.accumulateAttributeNames=null,this.currentVersion=null,this.defaultTravelMode=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsSupportedLanguages=null,this.directionsTimeAttribute=null,this.hasZ=null,this.impedance=null,this.networkDataset=null,this.supportedTravelModes=null}readAccumulateAttributes(e){return(0,m.Wi)(e)?null:e.map((e=>be.fromJSON(e)))}writeAccumulateAttributes(e,t,i){!(0,m.Wi)(e)&&e.length&&(t[i]=e.map((e=>be.toJSON(e))))}};(0,r._)([(0,T.Cb)()],De.prototype,"accumulateAttributeNames",void 0),(0,r._)([(0,w.r)("accumulateAttributeNames")],De.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributeNames")],De.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,T.Cb)()],De.prototype,"currentVersion",void 0),(0,r._)([(0,T.Cb)()],De.prototype,"defaultTravelMode",void 0),(0,r._)([(0,T.Cb)()],De.prototype,"directionsLanguage",void 0),(0,r._)([(0,H.J)($)],De.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,T.Cb)()],De.prototype,"directionsSupportedLanguages",void 0),(0,r._)([(0,H.J)(ye,{ignoreUnknown:!1})],De.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,T.Cb)()],De.prototype,"hasZ",void 0),(0,r._)([(0,H.J)(be,{ignoreUnknown:!1})],De.prototype,"impedance",void 0),(0,r._)([(0,T.Cb)({type:_e})],De.prototype,"networkDataset",void 0),(0,r._)([(0,T.Cb)({type:[Ae]})],De.prototype,"supportedTravelModes",void 0),De=(0,r._)([(0,S.j)("esri.rest.support.NetworkServiceDescription")],De);const Ie=De,xe=c.Z.getLogger("esri.rest.networkService");function je(e,t,i,r){r[i]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry)}))}async function Fe(e,t,i){if(!e)throw new u.Z("network-service:missing-url","Url to Network service is missing");const r=(0,K.lA)({f:"json",token:t},i),{data:o}=await(0,z.default)(e,r);o.supportedTravelModes||(o.supportedTravelModes=[]);for(let e=0;e<o.supportedTravelModes.length;e++)o.supportedTravelModes[e].id||(o.supportedTravelModes[e].id=o.supportedTravelModes[e].itemId);const s=o.currentVersion>=10.4?async function(e,t,i){try{const r=(0,K.lA)({f:"json",token:t},i),o=(0,g.Qj)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:a}}=await(0,z.default)(o,r);return{supportedTravelModes:s,defaultTravelMode:a}}catch(e){throw new u.Z("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:e})}}(e,t,i):async function(e,t){const i=(0,K.lA)({f:"json"},t),{data:r}=await(0,z.default)(e.replace(/\/rest\/.*$/i,"/info"),i);if(!r||!r.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:o}=r,s=(0,g.Qj)(o)+"/sharing/rest/portals/self",{data:a}=await(0,z.default)(s,i),n=(0,b.hS)("helperServices.routingUtilities.url",a);if(!n)return{supportedTravelModes:[],defaultTravelMode:null};const l=(0,K.en)(o),p=/\/solve$/i.test(l.path)?"Route":/\/solveclosestfacility$/i.test(l.path)?"ClosestFacility":"ServiceAreas",u=(0,K.lA)({f:"json",serviceName:p},t),d=(0,g.Qj)(n)+"/GetTravelModes/execute",c=await(0,z.default)(d,u),m=[];let y=null;if(c?.data?.results?.length){const e=c.data.results;for(const t of e)if("supportedTravelModes"===t.paramName){if(t.value?.features)for(const{attributes:e}of t.value.features)if(e){const t=JSON.parse(e.TravelMode);m.push(t)}}else"defaultTravelMode"===t.paramName&&(y=t.value)}return{supportedTravelModes:m,defaultTravelMode:y}}(e,i),{defaultTravelMode:a,supportedTravelModes:n}=await s;return o.defaultTravelMode=a,o.supportedTravelModes=n,Ie.fromJSON(o)}var Be=i(82526);function Ee(e,t){if((0,m.Wi)(e))return null;const i={},r=new RegExp(`^${t}`,"i");for(const o of Object.keys(e))if(r.test(o)){const r=o.substring(t.length);i[be.fromJSON(r)]=e[o]}return i}function Le(e,t,i){if(!(0,m.Wi)(e)){t.attributes||(t.attributes={});for(const r in e){const o=be.toJSON(r);t.attributes[`${i}${o}`]=e[r]}}}function Me(e){const t={};for(const i of Object.keys(e)){const r=i;t[be.fromJSON(r)]=e[i]}return t}function Re(e){const t={};for(const i of Object.keys(e)){const r=i;t[be.toJSON(r)]=e[i]}return t}function Pe(e,t){return(0,m.Wi)(e)||(0,m.Wi)(t)?null:Math.round((e-t)/6e4)}function Je(e){const t=e.toJSON(),i=t;return i.accumulateAttributeNames&&(i.accumulateAttributeNames=t.accumulateAttributeNames.join()),i.attributeParameterValues&&(i.attributeParameterValues=JSON.stringify(t.attributeParameterValues)),i.barriers&&(i.barriers=JSON.stringify(t.barriers)),i.outSR&&(i.outSR=t.outSR.wkid),i.overrides&&(i.overrides=JSON.stringify(t.overrides)),i.polygonBarriers&&(i.polygonBarriers=JSON.stringify(t.polygonBarriers)),i.polylineBarriers&&(i.polylineBarriers=JSON.stringify(t.polylineBarriers)),i.restrictionAttributeNames&&(i.restrictionAttributeNames=t.restrictionAttributeNames.join()),i.stops&&(i.stops=JSON.stringify(t.stops)),i.travelMode&&(i.travelMode=JSON.stringify(t.travelMode)),i}var We=i(74889);const ke=new X.X({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let Ue=class extends M.wq{constructor(e){super(e),this.description=null,this.type=null}};(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Ue.prototype,"description",void 0),(0,r._)([(0,T.Cb)({type:String,json:{read:ke.read,write:ke.write}})],Ue.prototype,"type",void 0),Ue=(0,r._)([(0,S.j)("esri.rest.support.GPMessage")],Ue);const Ze=Ue,Ve=new X.X({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let qe=class extends Ze{constructor(e){super(e),this.type=null}};(0,r._)([(0,T.Cb)({type:String,json:{read:Ve.read,write:Ve.write}})],qe.prototype,"type",void 0),qe=(0,r._)([(0,S.j)("esri.rest.support.NAMessage")],qe);const Ge=qe;let ze=class extends M.wq{constructor(e){super(e)}};(0,r._)([(0,T.Cb)({json:{read:{source:"string"}}})],ze.prototype,"text",void 0),(0,r._)([(0,H.J)(Te,{name:"stringType"})],ze.prototype,"type",void 0),ze=(0,r._)([(0,S.j)("esri.rest.support.DirectionsString")],ze);const Ke=ze;var He=i(94139);let Xe=class extends M.wq{constructor(e){super(e),this.arriveTime=null,this.arriveTimeOffset=null,this.geometry=null,this.strings=null}readArriveTimeOffset(e,t){return Pe(t.ETA,t.arriveTimeUTC)}readGeometry(e,t){return He.Z.fromJSON(t.point)}};(0,r._)([(0,T.Cb)({type:Date,json:{read:{source:"arriveTimeUTC"}}})],Xe.prototype,"arriveTime",void 0),(0,r._)([(0,T.Cb)()],Xe.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,w.r)("arriveTimeOffset",["arriveTimeUTC","ETA"])],Xe.prototype,"readArriveTimeOffset",null),(0,r._)([(0,T.Cb)({type:He.Z})],Xe.prototype,"geometry",void 0),(0,r._)([(0,w.r)("geometry",["point"])],Xe.prototype,"readGeometry",null),(0,r._)([(0,T.Cb)({type:[Ke]})],Xe.prototype,"strings",void 0),Xe=(0,r._)([(0,S.j)("esri.rest.support.DirectionsEvent")],Xe);const Ye=Xe;var $e=i(58901);let Qe=class extends a.Z{constructor(e){super(e),this.events=null,this.strings=null}readGeometry(e,t){const i=function(e){if((0,m.Wi)(e)||""===e)return null;let t=0,i=0,r=0,o=0;const s=[];let a,n,l,p,u,d,c,y,b=0,h=0,f=0;if(u=e.match(/((\+|\-)[^\+\-\|]+|\|)/g),u||(u=[]),0===parseInt(u[b],32)){b=2;const e=parseInt(u[b],32);b++,d=parseInt(u[b],32),b++,1&e&&(h=u.indexOf("|")+1,c=parseInt(u[h],32),h++),2&e&&(f=u.indexOf("|",h)+1,y=parseInt(u[f],32),f++)}else d=parseInt(u[b],32),b++;for(;b<u.length&&"|"!==u[b];){a=parseInt(u[b],32)+t,b++,t=a,n=parseInt(u[b],32)+i,b++,i=n;const e=[a/d,n/d];h&&(p=parseInt(u[h],32)+r,h++,r=p,e.push(p/c)),f&&(l=parseInt(u[f],32)+o,f++,o=l,e.push(l/y)),s.push(e)}return{paths:[s],hasZ:h>0,hasM:f>0}}(t.compressedGeometry);return(0,m.pC)(i)?$e.Z.fromJSON(i):null}};(0,r._)([(0,T.Cb)({type:[Ye]})],Qe.prototype,"events",void 0),(0,r._)([(0,w.r)("geometry",["compressedGeometry"])],Qe.prototype,"readGeometry",null),(0,r._)([(0,T.Cb)({type:[Ke]})],Qe.prototype,"strings",void 0),Qe=(0,r._)([(0,S.j)("esri.rest.support.DirectionsFeature")],Qe);const et=Qe;var tt=i(82971);let it=class extends We.default{constructor(e){super(e),this.extent=null,this.features=null,this.geometryType="polyline",this.routeId=null,this.routeName=null,this.totalDriveTime=null,this.totalLength=null,this.totalTime=null}readFeatures(e,t){if(!e)return[];const i=t.summary.envelope.spatialReference??t.spatialReference,r=i&&tt.Z.fromJSON(i);return e.map((e=>{const t=et.fromJSON(e);if((0,m.pC)(t.geometry)&&(t.geometry.spatialReference=r),(0,m.pC)(t.events))for(const e of t.events)(0,m.pC)(e.geometry)&&(e.geometry.spatialReference=r);return t}))}get mergedGeometry(){return this.features?function(e,t){if(0===e.length)return new $e.Z({spatialReference:t});const i=[];for(const t of e)for(const e of t.paths)i.push(...e);const r=[];i.forEach(((e,t)=>{0!==t&&e[0]===i[t-1][0]&&e[1]===i[t-1][1]||r.push(e)}));const{hasM:o,hasZ:s}=e[0];return new $e.Z({hasM:o,hasZ:s,paths:[r],spatialReference:t})}(this.features.map((({geometry:e})=>(0,m.Wg)(e))),this.extent.spatialReference):null}get strings(){return this.features.map((({strings:e})=>e)).flat().filter(m.pC)}};(0,r._)([(0,T.Cb)({type:O.Z,json:{read:{source:"summary.envelope"}}})],it.prototype,"extent",void 0),(0,r._)([(0,T.Cb)()],it.prototype,"features",void 0),(0,r._)([(0,w.r)("features")],it.prototype,"readFeatures",null),(0,r._)([(0,T.Cb)()],it.prototype,"geometryType",void 0),(0,r._)([(0,T.Cb)({readOnly:!0})],it.prototype,"mergedGeometry",null),(0,r._)([(0,T.Cb)()],it.prototype,"routeId",void 0),(0,r._)([(0,T.Cb)()],it.prototype,"routeName",void 0),(0,r._)([(0,T.Cb)({value:null,readOnly:!0})],it.prototype,"strings",null),(0,r._)([(0,T.Cb)({json:{read:{source:"summary.totalDriveTime"}}})],it.prototype,"totalDriveTime",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"summary.totalLength"}}})],it.prototype,"totalLength",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"summary.totalTime"}}})],it.prototype,"totalTime",void 0),it=(0,r._)([(0,S.j)("esri.rest.support.DirectionsFeatureSet")],it);const rt=it;let ot=class extends M.wq{constructor(e){super(e),this.directionLines=null,this.directionPoints=null,this.directions=null,this.route=null,this.routeName=null,this.stops=null,this.traversedEdges=null,this.traversedJunctions=null,this.traversedTurns=null}};(0,r._)([(0,T.Cb)({type:We.default,json:{write:!0}})],ot.prototype,"directionLines",void 0),(0,r._)([(0,T.Cb)({type:We.default,json:{write:!0}})],ot.prototype,"directionPoints",void 0),(0,r._)([(0,T.Cb)({type:rt,json:{write:!0}})],ot.prototype,"directions",void 0),(0,r._)([(0,T.Cb)({type:a.Z,json:{write:!0}})],ot.prototype,"route",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],ot.prototype,"routeName",void 0),(0,r._)([(0,T.Cb)({type:[a.Z],json:{write:!0}})],ot.prototype,"stops",void 0),(0,r._)([(0,T.Cb)({type:We.default,json:{write:!0}})],ot.prototype,"traversedEdges",void 0),(0,r._)([(0,T.Cb)({type:We.default,json:{write:!0}})],ot.prototype,"traversedJunctions",void 0),(0,r._)([(0,T.Cb)({type:We.default,json:{write:!0}})],ot.prototype,"traversedTurns",void 0),ot=(0,r._)([(0,S.j)("esri.rest.support.RouteResult")],ot);const st=ot;function at(e){return e&&We.default.fromJSON(e).features.map((e=>e))}let nt=class extends M.wq{constructor(e){super(e),this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return at(t.barriers)}readPolylineBarriers(e){return at(e)}readPolygonBarriers(e){return at(e)}};(0,r._)([(0,T.Cb)({type:[Ge]})],nt.prototype,"messages",void 0),(0,r._)([(0,T.Cb)({type:[a.Z]})],nt.prototype,"pointBarriers",void 0),(0,r._)([(0,w.r)("pointBarriers",["barriers"])],nt.prototype,"readPointBarriers",null),(0,r._)([(0,T.Cb)({type:[a.Z]})],nt.prototype,"polylineBarriers",void 0),(0,r._)([(0,w.r)("polylineBarriers")],nt.prototype,"readPolylineBarriers",null),(0,r._)([(0,T.Cb)({type:[a.Z]})],nt.prototype,"polygonBarriers",void 0),(0,r._)([(0,w.r)("polygonBarriers")],nt.prototype,"readPolygonBarriers",null),(0,r._)([(0,T.Cb)({type:[st]})],nt.prototype,"routeResults",void 0),nt=(0,r._)([(0,S.j)("esri.rest.support.RouteSolveResult")],nt);const lt=nt;function pt(e){return e instanceof We.default}var ut;let dt=ut=class extends((0,Ne.J)(M.wq)){constructor(e){super(e),this.directionLineType=null,this.directionPointId=null,this.distance=null,this.duration=null,this.fromLevel=null,this.geometry=null,this.objectId=null,this.popupTemplate=null,this.symbol=null,this.toLevel=null,this.type="direction-line"}static fromGraphic(e){return new ut({directionLineType:de.fromJSON(e.attributes.DirectionLineType),directionPointId:e.attributes.DirectionPointID,distance:e.attributes.Meters,duration:e.attributes.Minutes,fromLevel:e.attributes.FromLevel??null,geometry:e.geometry,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,symbol:e.symbol,toLevel:e.attributes.ToLevel??null})}toGraphic(){const e={ObjectID:(0,m.Wg)(this.objectId),DirectionLineType:(0,m.pC)(this.directionLineType)?de.toJSON(this.directionLineType):null,DirectionPointID:(0,m.Wg)(this.directionPointId),Meters:(0,m.Wg)(this.distance),Minutes:(0,m.Wg)(this.duration)};return(0,m.pC)(this.fromLevel)&&(e.FromLevel=this.fromLevel),(0,m.pC)(this.toLevel)&&(e.ToLevel=this.toLevel),new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};dt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"DirectionLineType",alias:"Line Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriDirectionsLineType",codedValues:[{name:"Unknown",code:0},{name:"Segment",code:1},{name:"Maneuver Segment",code:2},{name:"Restriction violation",code:3},{name:"Scale cost barrier crossing",code:4},{name:"Heavy Traffic",code:5},{name:"Slow Traffic",code:6},{name:"Moderate Traffic",code:7}]}},{name:"DirectionPointID",alias:"Direction Point ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1},{name:"FromLevel",alias:"Start from 3D Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1},{name:"Meters",alias:"Length in Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"Minutes",alias:"Duration in Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"ToLevel",alias:"End at 3D Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1}],dt.popupInfo={title:"Direction Lines",fieldInfos:[{fieldName:"DirectionLineType",label:"Line Type",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Meters",label:"Length in Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Minutes",label:"Duration in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DirectionPointID",label:"Direction Point ID",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"FromLevel",label:"Start from 3D Level",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ToLevel",label:"End at 3D Level",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({type:de.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:de.read}}})],dt.prototype,"directionLineType",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.DirectionPointID"}}})],dt.prototype,"directionPointId",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Meters"}}})],dt.prototype,"distance",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Minutes"}}})],dt.prototype,"duration",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.FromLevel"}}})],dt.prototype,"fromLevel",void 0),(0,r._)([(0,T.Cb)({type:$e.Z})],dt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ObjectID"}}})],dt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z})],dt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],dt.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ToLevel"}}})],dt.prototype,"toLevel",void 0),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],dt.prototype,"type",void 0),dt=ut=(0,r._)([(0,S.j)("esri.rest.support.DirectionLine")],dt);const ct=dt;var mt;let yt=mt=class extends((0,Ne.J)(M.wq)){constructor(e){super(e),this.alternateName=null,this.arrivalTime=null,this.arrivalTimeOffset=null,this.azimuth=null,this.branchName=null,this.directionPointType=null,this.displayText=null,this.exitName=null,this.geometry=null,this.intersectingName=null,this.level=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sequence=null,this.shortVoiceInstruction=null,this.stopId=null,this.symbol=null,this.towardName=null,this.type="direction-point",this.voiceInstruction=null}readArrivalTime(e,t){return(0,m.pC)(t.attributes.ArrivalTime)?new Date(t.attributes.ArrivalTime):null}static fromGraphic(e){return new mt({alternateName:e.attributes.AlternateName??null,arrivalTime:(0,m.pC)(e.attributes.ArrivalTime)?new Date(e.attributes.ArrivalTime):null,arrivalTimeOffset:e.attributes.ArrivalUTCOffset??null,azimuth:e.attributes.Azimuth??null,branchName:e.attributes.BranchName??null,directionPointType:ue.fromJSON(e.attributes.DirectionPointType),displayText:e.attributes.DisplayText??null,exitName:e.attributes.ExitName??null,geometry:e.geometry,intersectingName:e.attributes.IntersectingName??null,level:e.attributes.Level??null,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,sequence:e.attributes.Sequence,shortVoiceInstruction:e.attributes.ShortVoiceInstruction??null,stopId:e.attributes.StopID??null,symbol:e.symbol,towardName:e.attributes.TowardName??null,voiceInstruction:e.attributes.VoiceInstruction??null})}toGraphic(){const e={ObjectID:(0,m.Wg)(this.objectId),DirectionPointType:(0,m.pC)(this.directionPointType)?ue.toJSON(this.directionPointType):null,Sequence:(0,m.Wg)(this.sequence),StopID:this.stopId};return(0,m.pC)(this.alternateName)&&(e.AlternateName=this.alternateName),(0,m.pC)(this.arrivalTime)&&(e.ArrivalTime=this.arrivalTime.getTime()),(0,m.pC)(this.arrivalTimeOffset)&&(e.ArrivalUTCOffset=this.arrivalTimeOffset),(0,m.pC)(this.azimuth)&&(e.Azimuth=this.azimuth),(0,m.pC)(this.branchName)&&(e.BranchName=this.branchName),(0,m.pC)(this.displayText)&&(e.DisplayText=this.displayText),(0,m.pC)(this.exitName)&&(e.ExitName=this.exitName),(0,m.pC)(this.intersectingName)&&(e.IntersectingName=this.intersectingName),(0,m.pC)(this.level)&&(e.Level=this.level),(0,m.pC)(this.name)&&(e.Name=this.name),(0,m.pC)(this.shortVoiceInstruction)&&(e.ShortVoiceInstruction=this.shortVoiceInstruction),(0,m.pC)(this.towardName)&&(e.TowardName=this.towardName),(0,m.pC)(this.voiceInstruction)&&(e.VoiceInstruction=this.voiceInstruction),new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};yt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AlternateName",alias:"Alternative Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"ArrivalTime",alias:"Maneuver Starts at",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"ArrivalUTCOffset",alias:"Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Azimuth",alias:"Azimuth",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"BranchName",alias:"Signpost Branch Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"DirectionPointType",alias:"Directions Item Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriDirectionPointType",codedValues:[{name:"Unknown",code:0},{name:"",code:1},{name:"Arrive at stop",code:50},{name:"Depart at stop",code:51},{name:"Go straight",code:52},{name:"Take ferry",code:100},{name:"Take off ferry",code:101},{name:"Keep center at fork",code:102},{name:"Take roundabout",code:103},{name:"Make U-Turn",code:104},{name:"Pass the door",code:150},{name:"Take stairs",code:151},{name:"",code:152},{name:"Take escalator",code:153},{name:"Take pedestrian ramp",code:154},{name:"Keep left at fork",code:200},{name:"Ramp left",code:201},{name:"Take left-handed roundabout",code:202},{name:"Make left-handed U-Turn",code:203},{name:"Bear left",code:204},{name:"Turn left",code:205},{name:"Make sharp left",code:206},{name:"Turn left, followed by turn left",code:207},{name:"Turn left, followed by turn right",code:208},{name:"Keep right at fork",code:300},{name:"Ramp right",code:301},{name:"Take right-handed roundabout",code:302},{name:"Make right-handed U-Turn",code:303},{name:"Bear right",code:304},{name:"Turn right",code:305},{name:"Make sharp right",code:306},{name:"Turn right, followed by turn left",code:307},{name:"Turn right, followed by turn right",code:308},{name:"Indicates up direction of elevator",code:400},{name:"Indicates up direction of escalator",code:401},{name:"Take up-stairs",code:402},{name:"Indicates down direction of elevator",code:500},{name:"Indicates down direction of escalator",code:501},{name:"Take down-stairs",code:502},{name:"General event",code:1e3},{name:"Landmark",code:1001},{name:"Time zone change",code:1002},{name:"Heavy traffic segment",code:1003},{name:"Scale cost barrier crossing",code:1004},{name:"Administrative Border crossing",code:1005},{name:"Restriction violation",code:1006}]}},{name:"DisplayText",alias:"Text to Display",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"ExitName",alias:"Highway Exit Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"IntersectingName",alias:"Intersecting Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"Level",alias:"3D Logical Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Name",alias:"Primary Feature Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"ShortVoiceInstruction",alias:"Voice Instruction",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"StopID",alias:"Stop ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TowardName",alias:"Signpost Toward Name",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null},{name:"VoiceInstruction",alias:"Voice Full Instruction",type:"esriFieldTypeString",length:2048,editable:!0,nullable:!0,visible:!0,domain:null}],yt.popupInfo={title:"{DisplayText}",fieldInfos:[{fieldName:"DirectionPointType",label:"Directions Item Type",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"DisplayText",label:"Text to Display",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Sequence",label:"Sequence",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"StopID",label:"Stop ID",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalTime",label:"Maneuver Starts at",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"ArrivalUTCOffset",label:"Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Azimuth",label:"Azimuth",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Name",label:"Primary Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"AlternateName",label:"Alternative Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ExitName",label:"Highway Exit Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"IntersectingName",label:"Intersecting Feature Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BranchName",label:"Signpost Branch Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"TowardName",label:"Signpost Toward Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ShortVoiceInstruction",label:"Voice Instruction",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"VoiceInstruction",label:"Voice Full Instruction",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)()],yt.prototype,"alternateName",void 0),(0,r._)([(0,T.Cb)()],yt.prototype,"arrivalTime",void 0),(0,r._)([(0,w.r)("arrivalTime",["attributes.ArrivalTime"])],yt.prototype,"readArrivalTime",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],yt.prototype,"arrivalTimeOffset",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Azimuth"}}})],yt.prototype,"azimuth",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.BranchName"}}})],yt.prototype,"branchName",void 0),(0,r._)([(0,T.Cb)({type:ue.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:ue.read}}})],yt.prototype,"directionPointType",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.DisplayText"}}})],yt.prototype,"displayText",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ExitName"}}})],yt.prototype,"exitName",void 0),(0,r._)([(0,T.Cb)({type:He.Z})],yt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)()],yt.prototype,"intersectingName",void 0),(0,r._)([(0,T.Cb)()],yt.prototype,"level",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Name"}}})],yt.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ObjectID"}}})],yt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z})],yt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Sequence"}}})],yt.prototype,"sequence",void 0),(0,r._)([(0,T.Cb)()],yt.prototype,"shortVoiceInstruction",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.StopID"}}})],yt.prototype,"stopId",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],yt.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.TowardName"}}})],yt.prototype,"towardName",void 0),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],yt.prototype,"type",void 0),(0,r._)([(0,T.Cb)()],yt.prototype,"voiceInstruction",void 0),yt=mt=(0,r._)([(0,S.j)("esri.rest.support.DirectionPoint")],yt);const bt=yt;var ht;let ft=ht=class extends((0,Ne.J)(M.wq)){constructor(e){super(e),this.addedCost=null,this.barrierType=null,this.costs=null,this.curbApproach=null,this.fullEdge=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.sideOfEdge=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.type="point-barrier"}readCosts(e,t){return Ee(t.attributes,"Attr_")}writeCosts(e,t){Le(e,t,"Attr_")}static fromGraphic(e){return new ht({addedCost:e.attributes.AddedCost??null,barrierType:(0,m.pC)(e.attributes.BarrierType)?le.fromJSON(e.attributes.BarrierType):null,costs:(0,m.pC)(e.attributes.Costs)?Me(JSON.parse(e.attributes.Costs)):null,curbApproach:(0,m.pC)(e.attributes.CurbApproach)?oe.fromJSON(e.attributes.CurbApproach):null,fullEdge:(0,m.pC)(e.attributes.FullEdge)?pe.fromJSON(e.attributes.FullEdge):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,status:(0,m.pC)(e.attributes.Status)?ae.fromJSON(e.attributes.Status):null,symbol:e.symbol})}toGraphic(){const e={ObjectID:(0,m.Wg)(this.objectId),AddedCost:this.addedCost,BarrierType:(0,m.pC)(this.barrierType)?le.toJSON(this.barrierType):null,Costs:(0,m.pC)(this.costs)?JSON.stringify(Re(this.costs)):null,CurbApproach:(0,m.pC)(this.curbApproach)?oe.toJSON(this.curbApproach):null,FullEdge:(0,m.pC)(this.fullEdge)?pe.toJSON(this.fullEdge):null,Name:this.name,Status:(0,m.pC)(this.status)?ae.toJSON(this.status):null};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};ft.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AddedCost",alias:"Added Cost",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"FullEdge",alias:"Full Edge",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAIntYesNo",codedValues:[{name:"No",code:0},{name:"Yes",code:1}]}},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAObjectStatus",codedValues:[{name:"OK",code:0},{name:"Not Located on Network",code:1},{name:"Network Unbuilt",code:2},{name:"Prohibited Street",code:3},{name:"Invalid Field Values",code:4},{name:"Cannot Reach",code:5},{name:"Time Window Violation",code:6}]}}],ft.popupInfo={title:"Point Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"AddedCost",label:"Added Cost",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)()],ft.prototype,"addedCost",void 0),(0,r._)([(0,T.Cb)({type:le.apiValues,json:{name:"attributes.BarrierType",read:{reader:le.read},write:{writer:le.write}}})],ft.prototype,"barrierType",void 0),(0,r._)([(0,T.Cb)()],ft.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],ft.prototype,"readCosts",null),(0,r._)([(0,_.c)("costs")],ft.prototype,"writeCosts",null),(0,r._)([(0,T.Cb)({type:oe.apiValues,json:{read:{source:"attributes.CurbApproach",reader:oe.read}}})],ft.prototype,"curbApproach",void 0),(0,r._)([(0,T.Cb)({type:pe.apiValues,json:{name:"attributes.FullEdge",read:{reader:pe.read},write:{writer:pe.write}}})],ft.prototype,"fullEdge",void 0),(0,r._)([(0,T.Cb)({type:He.Z,json:{write:!0}})],ft.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Name"}})],ft.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.ObjectID"}})],ft.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z})],ft.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({type:ne.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:ne.read}}})],ft.prototype,"sideOfEdge",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SourceID"}}})],ft.prototype,"sourceId",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SourceOID"}}})],ft.prototype,"sourceOid",void 0),(0,r._)([(0,T.Cb)({type:ae.apiValues,json:{read:{source:"attributes.Status",reader:ae.read}}})],ft.prototype,"status",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],ft.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],ft.prototype,"type",void 0),ft=ht=(0,r._)([(0,S.j)("esri.rest.support.PointBarrier")],ft);const vt=ft;var gt,Tt=i(38913);let Ct=gt=class extends((0,Ne.J)(M.wq)){constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null,this.type="polygon-barrier"}readCosts(e,t){return Ee(t.attributes,"Attr_")}writeCosts(e,t){Le(e,t,"Attr_")}static fromGraphic(e){return new gt({barrierType:(0,m.pC)(e.attributes.BarrierType)?le.fromJSON(e.attributes.BarrierType):null,costs:(0,m.pC)(e.attributes.Costs)?Me(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={ObjectID:(0,m.Wg)(this.objectId),BarrierType:(0,m.pC)(this.barrierType)?le.toJSON(this.barrierType):null,Costs:(0,m.pC)(this.costs)?JSON.stringify(Re(this.costs)):null,Name:this.name??null,ScaleFactor:this.scaleFactor??null};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};Ct.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0}],Ct.popupInfo={title:"Polygon Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ScaleFactor",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Costs",label:"Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({type:le.apiValues,json:{name:"attributes.BarrierType",read:{reader:le.read},write:{writer:le.write}}})],Ct.prototype,"barrierType",void 0),(0,r._)([(0,T.Cb)()],Ct.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],Ct.prototype,"readCosts",null),(0,r._)([(0,_.c)("costs")],Ct.prototype,"writeCosts",null),(0,r._)([(0,T.Cb)({type:Tt.Z,json:{write:!0}})],Ct.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Name"}})],Ct.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.ObjectID"}})],Ct.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z})],Ct.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)()],Ct.prototype,"scaleFactor",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],Ct.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],Ct.prototype,"type",void 0),Ct=gt=(0,r._)([(0,S.j)("esri.rest.support.PolygonBarrier")],Ct);const wt=Ct;var St;let _t=St=class extends((0,Ne.J)(M.wq)){constructor(e){super(e),this.barrierType=null,this.costs=null,this.geometry=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.scaleFactor=null,this.symbol=null,this.type="polyline-barrier"}readCosts(e,t){return Ee(t.attributes,"Attr_")}static fromGraphic(e){return new St({barrierType:(0,m.pC)(e.attributes.BarrierType)?le.fromJSON(e.attributes.BarrierType):null,costs:(0,m.pC)(e.attributes.Costs)?Me(JSON.parse(e.attributes.Costs)):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,scaleFactor:e.attributes.ScaleFactor??null,symbol:e.symbol})}toGraphic(){const e={ObjectID:(0,m.Wg)(this.objectId),BarrierType:(0,m.pC)(this.barrierType)?le.toJSON(this.barrierType):null,Costs:(0,m.pC)(this.costs)?JSON.stringify(Re(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};_t.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNABarrierType",codedValues:[{name:"Restriction",code:0},{name:"Scaled Cost",code:1},{name:"Added Cost",code:2}]}},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0}],_t.popupInfo={title:"Line Barriers",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"BarrierType",label:"Barrier Type",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"ScaleFactor",isEditable:!0,tooltip:"",visible:!0,format:{places:3,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Costs",label:"Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({type:le.apiValues,json:{read:{source:"attributes.BarrierType",reader:le.read}}})],_t.prototype,"barrierType",void 0),(0,r._)([(0,T.Cb)()],_t.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],_t.prototype,"readCosts",null),(0,r._)([(0,T.Cb)({type:$e.Z,json:{write:!0}})],_t.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Name"}})],_t.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.ObjectID"}})],_t.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z})],_t.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)()],_t.prototype,"scaleFactor",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],_t.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],_t.prototype,"type",void 0),_t=St=(0,r._)([(0,S.j)("esri.rest.support.PolylineBarrier")],_t);const Nt=_t;let Ot=class extends M.wq{constructor(e){super(e),this.accumulateAttributes=null,this.directionsLanguage=null,this.findBestSequence=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.startTimeIsUTC=null,this.timeWindowsAreUTC=null,this.travelMode=null}readAccumulateAttributes(e){return(0,m.Wi)(e)?null:e.map((e=>be.fromJSON(e)))}writeAccumulateAttributes(e,t,i){!(0,m.Wi)(e)&&e.length&&(t[i]=e.map((e=>be.toJSON(e))))}};(0,r._)([(0,T.Cb)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Ot.prototype,"accumulateAttributes",void 0),(0,r._)([(0,w.r)("accumulateAttributes")],Ot.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributes")],Ot.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Ot.prototype,"directionsLanguage",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"findBestSequence",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"preserveFirstStop",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"preserveLastStop",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,T.Cb)({type:Ae,json:{write:!0}})],Ot.prototype,"travelMode",void 0),Ot=(0,r._)([(0,S.j)("esri.layers.support.RouteSettings")],Ot);const At=Ot;var Dt;let It=Dt=class extends((0,Ne.J)(M.wq)){constructor(e){super(e),this.analysisSettings=null,this.endTime=null,this.endTimeOffset=null,this.firstStopId=null,this.geometry=null,this.lastStopId=null,this.messages=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.startTime=null,this.startTimeOffset=null,this.stopCount=null,this.symbol=null,this.totalCosts=null,this.totalDistance=null,this.totalDuration=null,this.totalLateDuration=null,this.totalViolations=null,this.totalWait=null,this.totalWaitDuration=null,this.type="route-info",this.version="1.0.0"}readEndTime(e,t){return(0,m.pC)(t.attributes.EndTimeUTC)?new Date(t.attributes.EndTimeUTC):null}readEndTimeOffset(e,t){return Pe(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return(0,m.pC)(t.attributes.StartTimeUTC)?new Date(t.attributes.StartTimeUTC):null}readStartTimeOffset(e,t){return Pe(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return Ee(t.attributes,"Total_")}readTotalViolations(e,t){return Ee(t.attributes,"TotalViolation_")}readTotalWait(e,t){return Ee(t.attributes,"TotalWait_")}static fromGraphic(e){return new Dt({analysisSettings:(0,m.pC)(e.attributes.AnalysisSettings)?At.fromJSON(JSON.parse(e.attributes.AnalysisSettings)):null,endTime:(0,m.pC)(e.attributes.EndTime)?new Date(e.attributes.EndTime):null,endTimeOffset:e.attributes.EndUTCOffset??null,geometry:e.geometry,messages:(0,m.pC)(e.attributes.Messages)?JSON.parse(e.attributes.Messages):null,name:e.attributes.RouteName,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,startTime:(0,m.pC)(e.attributes.StartTime)?new Date(e.attributes.StartTime):null,startTimeOffset:e.attributes.StartUTCOffset??null,symbol:e.symbol,totalCosts:(0,m.pC)(e.attributes.TotalCosts)?Me(JSON.parse(e.attributes.TotalCosts)):null,totalDistance:e.attributes.TotalMeters??null,totalDuration:e.attributes.TotalMinutes??null,totalLateDuration:e.attributes.TotalLateMinutes??null,totalWaitDuration:e.attributes.TotalWaitMinutes??null,version:e.attributes.Version})}toGraphic(){const e={ObjectID:(0,m.Wg)(this.objectId),AnalysisSettings:(0,m.pC)(this.analysisSettings)?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:(0,m.pC)(this.endTime)?this.endTime.getTime():null,EndUTCOffset:this.endTimeOffset,Messages:(0,m.pC)(this.messages)?JSON.stringify(this.messages):null,RouteName:(0,m.Wg)(this.name),StartTime:(0,m.pC)(this.startTime)?this.startTime.getTime():null,StartUTCOffset:this.startTimeOffset,TotalCosts:(0,m.pC)(this.totalCosts)?JSON.stringify(Re(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:(0,m.Wg)(this.version)};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:(0,m.Wg)(this.popupTemplate)})}};It.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"AnalysisSettings",alias:"Analysis Settings",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"EndTime",alias:"End Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"EndUTCOffset",alias:"End Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"Messages",alias:"Analysis Messages",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",length:1024,editable:!0,nullable:!0,visible:!0,domain:null},{name:"StartTime",alias:"Start Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"StartUTCOffset",alias:"Start Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TotalCosts",alias:"Total Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"TotalLateMinutes",alias:"Total Late Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"TotalMeters",alias:"Total Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"TotalMinutes",alias:"Total Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"TotalWaitMinutes",alias:"Total Wait Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"Version",alias:"Version",type:"esriFieldTypeString",length:16,editable:!0,nullable:!0,visible:!0,domain:null}],It.popupInfo={title:"Route Details",fieldInfos:[{fieldName:"RouteName",label:"Route Name",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"TotalMinutes",label:"Total Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalMeters",label:"Total Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalLateMinutes",label:"Total Late Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalWaitMinutes",label:"Total Wait Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TotalCosts",label:"Total Costs",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"StartTime",label:"Start Time",isEditable:!1,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"StartUTCOffset",label:"Start Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"EndTime",label:"End Time",isEditable:!1,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"EndUTCOffset",label:"End Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Messages",label:"Analysis Messages",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"AnalysisSettings",isEditable:!1,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"Version",label:"Version",isEditable:!1,tooltip:"",visible:!0,stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)()],It.prototype,"analysisSettings",void 0),(0,r._)([(0,T.Cb)()],It.prototype,"endTime",void 0),(0,r._)([(0,w.r)("endTime",["attributes.EndTimeUTC"])],It.prototype,"readEndTime",null),(0,r._)([(0,T.Cb)()],It.prototype,"endTimeOffset",void 0),(0,r._)([(0,w.r)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],It.prototype,"readEndTimeOffset",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.FirstStopID"}}})],It.prototype,"firstStopId",void 0),(0,r._)([(0,T.Cb)({type:$e.Z})],It.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.LastStopID"}}})],It.prototype,"lastStopId",void 0),(0,r._)([(0,T.Cb)()],It.prototype,"messages",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.Name"}}})],It.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.ObjectID"}}})],It.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z})],It.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)()],It.prototype,"startTime",void 0),(0,r._)([(0,w.r)("startTime",["attributes.StartTimeUTC"])],It.prototype,"readStartTime",null),(0,r._)([(0,T.Cb)()],It.prototype,"startTimeOffset",void 0),(0,r._)([(0,w.r)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],It.prototype,"readStartTimeOffset",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.StopCount"}}})],It.prototype,"stopCount",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],It.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)()],It.prototype,"totalCosts",void 0),(0,r._)([(0,w.r)("totalCosts",["attributes"])],It.prototype,"readTotalCosts",null),(0,r._)([(0,T.Cb)()],It.prototype,"totalDistance",void 0),(0,r._)([(0,T.Cb)()],It.prototype,"totalDuration",void 0),(0,r._)([(0,T.Cb)()],It.prototype,"totalLateDuration",void 0),(0,r._)([(0,T.Cb)()],It.prototype,"totalViolations",void 0),(0,r._)([(0,w.r)("totalViolations",["attributes"])],It.prototype,"readTotalViolations",null),(0,r._)([(0,T.Cb)()],It.prototype,"totalWait",void 0),(0,r._)([(0,w.r)("totalWait",["attributes"])],It.prototype,"readTotalWait",null),(0,r._)([(0,T.Cb)()],It.prototype,"totalWaitDuration",void 0),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],It.prototype,"type",void 0),(0,r._)([(0,T.Cb)()],It.prototype,"version",void 0),It=Dt=(0,r._)([(0,S.j)("esri.rest.support.RouteInfo")],It);const xt=It,jt={type:String,json:{read:{source:"token"},write:{target:"token"}}};var Ft=i(33955);let Bt=class extends((0,Ne.J)(M.wq)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.geometry=null,this.geometryType=null,this.name=null,this.spatialRelationship=null,this.type="layer",this.where=null}};(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Bt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,T.Cb)({types:s.qM,json:{read:Ft.im,write:!0}})],Bt.prototype,"geometry",void 0),(0,r._)([(0,H.J)(ve)],Bt.prototype,"geometryType",void 0),(0,r._)([(0,T.Cb)({type:String,json:{name:"layerName",write:!0}})],Bt.prototype,"name",void 0),(0,r._)([(0,H.J)(fe,{name:"spatialRel"})],Bt.prototype,"spatialRelationship",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Bt.prototype,"type",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Bt.prototype,"where",void 0),Bt=(0,r._)([(0,S.j)("esri.rest.support.DataLayer")],Bt);const Et=Bt;var Lt;let Mt=Lt=class extends We.default{constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new Lt({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Mt.prototype,"doNotLocateOnRestrictedElements",void 0),Mt=Lt=(0,r._)([(0,S.j)("esri.rest.support.NetworkFeatureSet")],Mt);const Rt=Mt;let Pt=class extends((0,Ne.J)(M.wq)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Pt.prototype,"url",void 0),Pt=(0,r._)([(0,S.j)("esri.rest.support.NetworkUrl")],Pt);const Jt=Pt;var Wt;function kt(e,t,i){(0,m.pC)(e)&&(t[i]=p.Z.isCollection(e)?{features:e.toArray().map((e=>e.toJSON()))}:e.toJSON())}let Ut=Wt=class extends((0,Ne.J)(M.wq)){constructor(e){super(e),this.accumulateAttributes=null,this.apiKey=null,this.attributeParameterValues=null,this.directionsLanguage=null,this.directionsLengthUnits=null,this.directionsOutputType=null,this.directionsStyleName=null,this.directionsTimeAttribute=null,this.findBestSequence=null,this.geometryPrecision=null,this.geometryPrecisionM=null,this.geometryPrecisionZ=null,this.ignoreInvalidLocations=null,this.impedanceAttribute=null,this.outputGeometryPrecision=null,this.outputGeometryPrecisionUnits=null,this.outputLines="true-shape",this.outSpatialReference=null,this.overrides=null,this.pointBarriers=null,this.polygonBarriers=null,this.polylineBarriers=null,this.preserveFirstStop=null,this.preserveLastStop=null,this.preserveObjectID=null,this.restrictionAttributes=null,this.restrictUTurns=null,this.returnBarriers=!1,this.returnDirections=!1,this.returnPolygonBarriers=!1,this.returnPolylineBarriers=!1,this.returnRoutes=!0,this.returnStops=!1,this.returnTraversedEdges=null,this.returnTraversedJunctions=null,this.returnTraversedTurns=null,this.returnZ=!0,this.startTime=null,this.startTimeIsUTC=!0,this.stops=null,this.timeWindowsAreUTC=null,this.travelMode=null,this.useHierarchy=null,this.useTimeWindows=null}static from(e){return(0,C.TJ)(Wt,e)}readAccumulateAttributes(e){return(0,m.Wi)(e)?null:e.map((e=>be.fromJSON(e)))}writeAccumulateAttributes(e,t,i){!(0,m.Wi)(e)&&e.length&&(t[i]=e.map((e=>be.toJSON(e))))}writePointBarriers(e,t,i){kt(e,t,i)}writePolygonBarrier(e,t,i){kt(e,t,i)}writePolylineBarrier(e,t,i){kt(e,t,i)}readRestrictionAttributes(e){return(0,m.Wi)(e)?null:e.map((e=>he.fromJSON(e)))}writeRestrictionAttributes(e,t,i){!(0,m.Wi)(e)&&e.length&&(t[i]=e.map((e=>he.toJSON(e))))}readStartTime(e,t){const{startTime:i}=t;return(0,m.Wi)(i)?null:"now"===i?"now":new Date(i)}writeStartTime(e,t){(0,m.Wi)(e)||(t.startTime="now"===e?"now":e.getTime())}readStops(e,t){return function(e){return function(e){return e&&"type"in e}(e)?Et.fromJSON(e):function(e){return e&&"url"in e}(e)?Jt.fromJSON(e):function(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}(e)?Rt.fromJSON(e):function(e){return e&&"features"in e}(e)?We.default.fromJSON(e):null}(t.stops)}writeStops(e,t,i){kt(e,t,i)}};(0,r._)([(0,T.Cb)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Ut.prototype,"accumulateAttributes",void 0),(0,r._)([(0,w.r)("accumulateAttributes")],Ut.prototype,"readAccumulateAttributes",null),(0,r._)([(0,_.c)("accumulateAttributes")],Ut.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,T.Cb)(jt)],Ut.prototype,"apiKey",void 0),(0,r._)([(0,T.Cb)({json:{write:!0}})],Ut.prototype,"attributeParameterValues",void 0),(0,r._)([(0,T.Cb)({type:String,json:{write:!0}})],Ut.prototype,"directionsLanguage",void 0),(0,r._)([(0,H.J)($)],Ut.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,H.J)(ee)],Ut.prototype,"directionsOutputType",void 0),(0,r._)([(0,H.J)(ce)],Ut.prototype,"directionsStyleName",void 0),(0,r._)([(0,H.J)(ye,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],Ut.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ut.prototype,"findBestSequence",void 0),(0,r._)([(0,T.Cb)({type:Number,json:{write:!0}})],Ut.prototype,"geometryPrecision",void 0),(0,r._)([(0,T.Cb)({type:Number,json:{write:!0}})],Ut.prototype,"geometryPrecisionM",void 0),(0,r._)([(0,T.Cb)({type:Number,json:{write:!0}})],Ut.prototype,"geometryPrecisionZ",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ut.prototype,"ignoreInvalidLocations",void 0),(0,r._)([(0,H.J)(be,{name:"impedanceAttributeName",ignoreUnknown:!1})],Ut.prototype,"impedanceAttribute",void 0),(0,r._)([(0,T.Cb)({type:Number,json:{write:!0}})],Ut.prototype,"outputGeometryPrecision",void 0),(0,r._)([(0,H.J)(Y)],Ut.prototype,"outputGeometryPrecisionUnits",void 0),(0,r._)([(0,H.J)(te)],Ut.prototype,"outputLines",void 0),(0,r._)([(0,T.Cb)({type:tt.Z,json:{name:"outSR",write:!0}})],Ut.prototype,"outSpatialReference",void 0),(0,r._)([(0,T.Cb)({json:{write:!0}})],Ut.prototype,"overrides",void 0),(0,r._)([(0,T.Cb)({json:{name:"barriers",write:!0}})],Ut.prototype,"pointBarriers",void 0),(0,r._)([(0,_.c)("pointBarriers")],Ut.prototype,"writePointBarriers",null),(0,r._)([(0,T.Cb)({json:{write:!0}})],Ut.prototype,"polygonBarriers",void 0),(0,r._)([(0,_.c)("polygonBarriers")],Ut.prototype,"writePolygonBarrier",null),(0,r._)([(0,T.Cb)({json:{write:!0}})],Ut.prototype,"polylineBarriers",void 0),(0,r._)([(0,_.c)("polylineBarriers")],Ut.prototype,"writePolylineBarrier",null),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ut.prototype,"preserveFirstStop",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ut.prototype,"preserveLastStop",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ut.prototype,"preserveObjectID",void 0),(0,r._)([(0,T.Cb)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],Ut.prototype,"restrictionAttributes",void 0),(0,r._)([(0,w.r)("restrictionAttributes")],Ut.prototype,"readRestrictionAttributes",null),(0,r._)([(0,_.c)("restrictionAttributes")],Ut.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,H.J)(ie)],Ut.prototype,"restrictUTurns",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ut.prototype,"returnBarriers",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ut.prototype,"returnDirections",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ut.prototype,"returnPolygonBarriers",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ut.prototype,"returnPolylineBarriers",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ut.prototype,"returnRoutes",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ut.prototype,"returnStops",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ut.prototype,"returnTraversedEdges",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ut.prototype,"returnTraversedJunctions",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ut.prototype,"returnTraversedTurns",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ut.prototype,"returnZ",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{type:Number,write:!0}})],Ut.prototype,"startTime",void 0),(0,r._)([(0,w.r)("startTime")],Ut.prototype,"readStartTime",null),(0,r._)([(0,_.c)("startTime")],Ut.prototype,"writeStartTime",null),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ut.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,T.Cb)({json:{write:!0}})],Ut.prototype,"stops",void 0),(0,r._)([(0,w.r)("stops")],Ut.prototype,"readStops",null),(0,r._)([(0,_.c)("stops")],Ut.prototype,"writeStops",null),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ut.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,T.Cb)({type:Ae,json:{write:!0}})],Ut.prototype,"travelMode",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ut.prototype,"useHierarchy",void 0),(0,r._)([(0,T.Cb)({type:Boolean,json:{write:!0}})],Ut.prototype,"useTimeWindows",void 0),Ut=Wt=(0,r._)([(0,S.j)("esri.rest.support.RouteParameters")],Ut);const Zt=Ut;var Vt;let qt=Vt=class extends((0,Ne.J)(M.wq)){constructor(e){super(e),this.arriveCurbApproach=null,this.arriveTime=null,this.arriveTimeOffset=null,this.bearing=null,this.bearingTol=null,this.cumulativeCosts=null,this.cumulativeDistance=null,this.cumulativeDuration=null,this.curbApproach=null,this.departCurbApproach=null,this.departTime=null,this.departTimeOffset=null,this.distanceToNetworkInMeters=null,this.geometry=null,this.lateDuration=null,this.locationType=null,this.name=null,this.navLatency=null,this.objectId=null,this.popupTemplate=null,this.posAlong=null,this.routeName=null,this.serviceCosts=null,this.serviceDistance=null,this.serviceDuration=null,this.sequence=null,this.sideOfEdge=null,this.snapX=null,this.snapY=null,this.snapZ=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.timeWindowEnd=null,this.timeWindowEndOffset=null,this.timeWindowStart=null,this.timeWindowStartOffset=null,this.type="stop",this.violations=null,this.waitDuration=null,this.wait=null}readArriveTimeOffset(e,t){return Pe(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return Ee(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return Pe(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return Ee(t.attributes,"Attr_")}writeServiceCosts(e,t){Le(e,t,"Attr_")}writeTimeWindowEnd(e,t){(0,m.Wi)(e)||(t.attributes||(t.attributes={}),t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){(0,m.Wi)(e)||(t.attributes||(t.attributes={}),t.attributes.TimeWindowStart=e.getTime())}readViolations(e,t){return Ee(t.attributes,"Violation_")}readWait(e,t){return Ee(t.attributes,"Wait_")}static fromGraphic(e){return new Vt({arriveCurbApproach:(0,m.pC)(e.attributes.ArrivalCurbApproach)?oe.fromJSON(e.attributes.ArrivalCurbApproach):null,arriveTime:(0,m.pC)(e.attributes.ArrivalTime)?new Date(e.attributes.ArrivalTime):null,arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:(0,m.pC)(e.attributes.CumulativeCosts)?Me(JSON.parse(e.attributes.CumulativeCosts)):null,cumulativeDistance:e.attributes.CumulativeMeters??null,cumulativeDuration:e.attributes.CumulativeMinutes??null,curbApproach:(0,m.pC)(e.attributes.CurbApproach)?oe.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:(0,m.pC)(e.attributes.DepartureCurbApproach)?oe.fromJSON(e.attributes.DepartureCurbApproach):null,departTime:(0,m.pC)(e.attributes.DepartureTime)?new Date(e.attributes.DepartureTime):null,departTimeOffset:e.attributes.DepartureUTCOffset??null,geometry:e.geometry,lateDuration:e.attributes.LateMinutes??null,locationType:(0,m.pC)(e.attributes.LocationType)?se.fromJSON(e.attributes.LocationType):null,name:e.attributes.Name,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,routeName:e.attributes.RouteName,sequence:e.attributes.Sequence??null,serviceCosts:(0,m.pC)(e.attributes.ServiceCosts)?Me(JSON.parse(e.attributes.ServiceCosts)):null,serviceDistance:e.attributes.ServiceMeters??null,serviceDuration:e.attributes.ServiceMinutes??null,status:(0,m.pC)(e.attributes.Status)?ae.fromJSON(e.attributes.Status):null,symbol:e.symbol,timeWindowEnd:(0,m.pC)(e.attributes.TimeWindowEnd)?new Date(e.attributes.TimeWindowEnd):null,timeWindowEndOffset:e.attributes.TimeWindowEndUTCOffset??null,timeWindowStart:(0,m.pC)(e.attributes.TimeWindowStart)?new Date(e.attributes.TimeWindowStart):null,timeWindowStartOffset:e.attributes.TimeWindowStartUTCOffset??null,waitDuration:e.attributes.WaitMinutes??null})}toGraphic(){const e={ObjectID:(0,m.Wg)(this.objectId),ArrivalCurbApproach:(0,m.pC)(this.arriveCurbApproach)?oe.toJSON(this.arriveCurbApproach):null,ArrivalTime:(0,m.pC)(this.arriveTime)?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:(0,m.pC)(this.cumulativeCosts)?JSON.stringify(Re(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:(0,m.pC)(this.curbApproach)?oe.toJSON(this.curbApproach):null,DepartureCurbApproach:(0,m.pC)(this.departCurbApproach)?oe.toJSON(this.departCurbApproach):null,DepartureTime:(0,m.pC)(this.departTime)?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:(0,m.pC)(this.locationType)?se.toJSON(this.locationType):null,Name:(0,m.Wg)(this.name),RouteName:(0,m.Wg)(this.routeName),Sequence:this.sequence,ServiceCosts:(0,m.pC)(this.serviceCosts)?JSON.stringify(Re(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:(0,m.pC)(this.status)?ae.toJSON(this.status):null,TimeWindowEnd:(0,m.pC)(this.timeWindowEnd)?this.timeWindowEnd.getTime():null,TimeWindowEndUTCOffset:this.timeWindowEndOffset??this.arriveTimeOffset,TimeWindowStart:(0,m.pC)(this.timeWindowStart)?this.timeWindowStart.getTime():null,TimeWindowStartUTCOffset:this.timeWindowStartOffset??this.arriveTimeOffset,WaitMinutes:this.waitDuration};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};qt.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"ArrivalCurbApproach",alias:"Arrival Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"ArrivalUTCOffset",alias:"Arrival Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"CumulativeCosts",alias:"Cumulative Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"CumulativeMeters",alias:"Cumulative Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"CumulativeMinutes",alias:"Cumulative Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"DepartureCurbApproach",alias:"Departure Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"DepartureTime",alias:"Departure Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"DepartureUTCOffset",alias:"Departure Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"LateMinutes",alias:"Minutes Late",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"LocationType",alias:"Location Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNALocationType",codedValues:[{name:"Stop",code:0},{name:"Waypoint",code:1}]}},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"ServiceCosts",alias:"Service Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"ServiceMeters",alias:"Service Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"ServiceMinutes",alias:"Service Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAObjectStatus",codedValues:[{name:"OK",code:0},{name:"Not Located on Network",code:1},{name:"Network Unbuilt",code:2},{name:"Prohibited Street",code:3},{name:"Invalid Field Values",code:4},{name:"Cannot Reach",code:5},{name:"Time Window Violation",code:6}]}},{name:"TimeWindowEnd",alias:"Time Window End",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!1},{name:"TimeWindowEndUTCOffset",alias:"Time Window End: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TimeWindowStart",alias:"Time Window Start",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!1},{name:"TimeWindowStartUTCOffset",alias:"Time Window Start: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"WaitMinutes",alias:"Minutes Early",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1}],qt.popupInfo={title:"{Name}",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"RouteName",label:"Route Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Sequence",label:"Sequence",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalTime",label:"Arrival Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"ArrivalUTCOffset",label:"Arrival Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureTime",label:"Departure Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"DepartureUTCOffset",label:"Departure Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CurbApproach",label:"Curb Approach",isEditable:!0,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalCurbApproach",label:"Arrival Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureCurbApproach",label:"Departure Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Status",label:"Status",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"LocationType",label:"Location Type",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowStart",label:"Time Window Start",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowStartUTCOffset",label:"Time Window Start: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowEnd",label:"Time Window End",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowEndUTCOffset",label:"Time Window End: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMinutes",label:"Service Minutes",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMeters",label:"Service Meters",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceCosts",label:"Service Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"CumulativeMinutes",label:"Cumulative Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeMeters",label:"Cumulative Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeCosts",label:"Cumulative Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"LateMinutes",label:"Minutes Late",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"WaitMinutes",label:"Minutes Early",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},(0,r._)([(0,T.Cb)({type:oe.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:oe.read}}})],qt.prototype,"arriveCurbApproach",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],qt.prototype,"arriveTime",void 0),(0,r._)([(0,T.Cb)()],qt.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,w.r)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],qt.prototype,"readArriveTimeOffset",null),(0,r._)([(0,T.Cb)({json:{name:"attributes.Bearing",read:!1,write:!0}})],qt.prototype,"bearing",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],qt.prototype,"bearingTol",void 0),(0,r._)([(0,T.Cb)()],qt.prototype,"cumulativeCosts",void 0),(0,r._)([(0,w.r)("cumulativeCosts",["attributes"])],qt.prototype,"readCumulativeCosts",null),(0,r._)([(0,T.Cb)()],qt.prototype,"cumulativeDistance",void 0),(0,r._)([(0,T.Cb)()],qt.prototype,"cumulativeDuration",void 0),(0,r._)([(0,T.Cb)({type:oe.apiValues,json:{name:"attributes.CurbApproach",read:{reader:oe.read},write:{writer:oe.write}}})],qt.prototype,"curbApproach",void 0),(0,r._)([(0,T.Cb)({type:oe.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:oe.read}}})],qt.prototype,"departCurbApproach",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],qt.prototype,"departTime",void 0),(0,r._)([(0,T.Cb)()],qt.prototype,"departTimeOffset",void 0),(0,r._)([(0,w.r)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],qt.prototype,"readDepartTimeOffset",null),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],qt.prototype,"distanceToNetworkInMeters",void 0),(0,r._)([(0,T.Cb)({type:He.Z,json:{write:!0}})],qt.prototype,"geometry",void 0),(0,r._)([(0,T.Cb)()],qt.prototype,"lateDuration",void 0),(0,r._)([(0,T.Cb)({type:se.apiValues,json:{name:"attributes.LocationType",read:{reader:se.read},write:{writer:se.write}}})],qt.prototype,"locationType",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Name"}})],qt.prototype,"name",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.NavLatency",read:!1,write:!0}})],qt.prototype,"navLatency",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.ObjectID"}})],qt.prototype,"objectId",void 0),(0,r._)([(0,T.Cb)({type:n.Z})],qt.prototype,"popupTemplate",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.PosAlong"}}})],qt.prototype,"posAlong",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.RouteName"}})],qt.prototype,"routeName",void 0),(0,r._)([(0,T.Cb)()],qt.prototype,"serviceCosts",void 0),(0,r._)([(0,w.r)("serviceCosts",["attributes"])],qt.prototype,"readServiceCosts",null),(0,r._)([(0,_.c)("serviceCosts")],qt.prototype,"writeServiceCosts",null),(0,r._)([(0,T.Cb)()],qt.prototype,"serviceDistance",void 0),(0,r._)([(0,T.Cb)()],qt.prototype,"serviceDuration",void 0),(0,r._)([(0,T.Cb)({json:{name:"attributes.Sequence"}})],qt.prototype,"sequence",void 0),(0,r._)([(0,T.Cb)({type:ne.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:ne.read}}})],qt.prototype,"sideOfEdge",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SnapX"}}})],qt.prototype,"snapX",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SnapY"}}})],qt.prototype,"snapY",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SnapZ"}}})],qt.prototype,"snapZ",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SourceID"}}})],qt.prototype,"sourceId",void 0),(0,r._)([(0,T.Cb)({json:{read:{source:"attributes.SourceOID"}}})],qt.prototype,"sourceOid",void 0),(0,r._)([(0,T.Cb)({type:ae.apiValues,json:{read:{source:"attributes.Status",reader:ae.read}}})],qt.prototype,"status",void 0),(0,r._)([(0,T.Cb)({types:L.LB})],qt.prototype,"symbol",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],qt.prototype,"timeWindowEnd",void 0),(0,r._)([(0,_.c)("timeWindowEnd")],qt.prototype,"writeTimeWindowEnd",null),(0,r._)([(0,T.Cb)()],qt.prototype,"timeWindowEndOffset",void 0),(0,r._)([(0,T.Cb)({type:Date,json:{name:"attributes.TimeWindowStart"}})],qt.prototype,"timeWindowStart",void 0),(0,r._)([(0,_.c)("timeWindowStart")],qt.prototype,"writeTimeWindowStart",null),(0,r._)([(0,T.Cb)()],qt.prototype,"timeWindowStartOffset",void 0),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],qt.prototype,"type",void 0),(0,r._)([(0,T.Cb)()],qt.prototype,"violations",void 0),(0,r._)([(0,w.r)("violations",["attributes"])],qt.prototype,"readViolations",null),(0,r._)([(0,T.Cb)()],qt.prototype,"waitDuration",void 0),(0,r._)([(0,T.Cb)()],qt.prototype,"wait",void 0),(0,r._)([(0,w.r)("wait",["attributes"])],qt.prototype,"readWait",null),qt=Vt=(0,r._)([(0,S.j)("esri.rest.support.Stop")],qt);const Gt=qt;var zt=i(65091);function Kt(e){return e.length?e:null}function Ht(e){const{defaultTravelMode:t,supportedTravelModes:i}=e;return i?.find((({id:e})=>e===t))}function Xt(e){switch(e){case"esriGeometryPoint":return{type:"esriSMS",style:"esriSMSCircle",size:12,color:[0,0,0,0],outline:Xt("esriGeometryPolyline")};case"esriGeometryPolyline":return{type:"esriSLS",style:"esriSLSSolid",width:1,color:[0,0,0,0]};case"esriGeometryPolygon":return{type:"esriSFS",style:"esriSFSNull",outline:Xt("esriGeometryPolyline")}}}function Yt(e){return"layers"in e}async function $t(e){const t=tt.Z.WGS84;return await(0,A.iQ)(e.spatialReference,t),(0,A.iV)(e,t)}function Qt(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function ei(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:(0,v.En)(e,t,"meters")}const ti=p.Z.ofType(ct),ii=p.Z.ofType(bt),ri=p.Z.ofType(vt),oi=p.Z.ofType(wt),si=p.Z.ofType(Nt),ai=p.Z.ofType(Gt),ni="esri.layers.RouteLayer",li=c.Z.getLogger(ni);let pi=class extends((0,x.h)((0,B.M)((0,j.q)((0,F.I)((0,y.R)((0,d.p)(I.Z))))))){constructor(e){super(e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.defaultSymbols=new Z,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new ri,this.polygonBarriers=new oi,this.polylineBarriers=new si,this.routeInfo=null,this.spatialReference=tt.Z.WGS84,this.stops=new ai,this.type="route";const t=()=>{this._setStopSymbol(this.stops)};this.addHandles((0,f.on)((()=>this.stops),"change",t,{sync:!0,onListenerAdd:t}))}writeFeatureCollectionWebmap(e,t,i,r){const o=[this._writePolygonBarriers(),this._writePolylineBarriers(),this._writePointBarriers(),this._writeRouteInfo(),this._writeDirectionLines(),this._writeDirectionPoints(),this._writeStops()].filter((e=>!!e)),s=o.map(((e,t)=>t)),a="web-map"===r.origin?"featureCollection.layers":"layers";(0,b.RB)(a,o,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",(e=>ct.fromGraphic(e)))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",(e=>bt.fromGraphic(e)))}get fullExtent(){const e=new O.Z({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:tt.Z.WGS84});if((0,m.pC)(this.routeInfo)&&(0,m.pC)(this.routeInfo.geometry))return this.routeInfo.geometry.extent??e;if((0,m.Wi)(this.stops))return e;const t=this.stops.filter((e=>(0,m.pC)(e.geometry)));if(t.length<2)return e;const{spatialReference:i}=t.getItemAt(0).geometry;if((0,m.Wi)(i))return e;const r=t.toArray().map((e=>{const t=e.geometry;return[t.x,t.y]}));return new zt.Z({points:r,spatialReference:i}).extent}readMaxScale(e,t){return(Yt(t)?t.layers:t.featureCollection.layers).find((e=>(0,m.pC)(e.layerDefinition.maxScale)))?.layerDefinition.maxScale??0}readMinScale(e,t){return(Yt(t)?t.layers:t.featureCollection.layers).find((e=>(0,m.pC)(e.layerDefinition.minScale)))?.layerDefinition.minScale??0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",(e=>vt.fromGraphic(e)))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",(e=>wt.fromGraphic(e)))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",(e=>Nt.fromGraphic(e)))}readRouteInfo(e,t){const i=this._getNetworkFeatures(t,"RouteInfo",(e=>xt.fromGraphic(e)));return i.length>0?i.getItemAt(0):null}readSpatialReference(e,t){const i=Yt(t)?t.layers:t.featureCollection.layers;if(!i.length)return tt.Z.WGS84;const{layerDefinition:r,featureSet:o}=i[0],s=o.features[0],a=(0,m.Wg)(s?.geometry)?.spatialReference??o.spatialReference??r.spatialReference??r.extent.spatialReference??D.Zn;return tt.Z.fromJSON(a)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",(e=>Gt.fromGraphic(e)),(e=>this._setStopSymbol(e)))}get title(){return(0,m.pC)(this.routeInfo)&&(0,m.pC)(this.routeInfo.name)?this.routeInfo.name:"Route"}set title(e){this._overrideIfSome("title",e)}get url(){return o.Z.routeServiceUrl}set url(e){null!=e?this._set("url",(0,E.Nm)(e,li)):this._set("url",o.Z.routeServiceUrl)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Collection"]},e)),Promise.resolve(this)}removeAll(){this.removeResult(),this.pointBarriers.removeAll(),this.polygonBarriers.removeAll(),this.polylineBarriers.removeAll(),this.stops.removeAll()}removeResult(){(0,m.pC)(this.directionLines)&&(this.directionLines.removeAll(),this._set("directionLines",null)),(0,m.pC)(this.directionPoints)&&(this.directionPoints.removeAll(),this._set("directionPoints",null)),(0,m.pC)(this.routeInfo)&&this._set("routeInfo",null)}async save(){await this.load();const{fullExtent:e,portalItem:t}=this;if(!t)throw new u.Z("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new u.Z("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new u.Z("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if((0,m.Wi)(this.routeInfo))throw new u.Z("routelayer:route-unsolved","save() requires a solved route");const{portal:i}=t;await i._signIn(),i.user||await t.reload();const{itemUrl:r,itemControl:o}=t;if("admin"!==o&&"update"!==o)throw new u.Z("routelayer:insufficient-permissions","To save this layer, you need to be the owner or an administrator of your organization");const s={messages:[],origin:"portal-item",portal:i,url:r&&(0,g.mN)(r),writtenProperties:[]},a=this.write(null,s);return t.extent=await $t(e),t.title=this.title,await t.update({data:a}),t}async saveAs(e,t={}){if(await this.load(),(0,m.Wi)(this.routeInfo))throw new u.Z("routelayer:route-unsolved","saveAs() requires a solved route");const i=q.default.from(e).clone();i.extent??(i.extent=await $t(this.fullExtent)),i.id=null,i.portal??(i.portal=V.Z.getDefault()),i.title??(i.title=this.title),i.type="Feature Collection",i.typeKeywords=["Data","Feature Collection",G.Kz.MULTI_LAYER,"Route Layer"];const{portal:r}=i,o={messages:[],origin:"portal-item",portal:r,url:null,writtenProperties:[]};await r._signIn();const s=t?.folder,a=this.write(null,o);return await r.user.addItem({item:i,folder:s,data:a}),this.portalItem=i,(0,N.D)(o),o.portalItem=i,i}async solve(e,t){const i=e?.stops??this.stops,r=e?.pointBarriers??Kt(this.pointBarriers),o=e?.polylineBarriers??Kt(this.polylineBarriers),s=e?.polygonBarriers??Kt(this.polygonBarriers);if((0,m.Wi)(i))throw new u.Z("routelayer:undefined-stops","the route layer must have stops defined in the route parameters.");if((function(e){return"esri.rest.support.FeatureSet"===e.declaredClass}(i)||function(e){return"esri.rest.support.NetworkFeatureSet"===e.declaredClass}(i))&&i.features.length<2||p.Z.isCollection(i)&&i.length<2)throw new u.Z("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");if(p.Z.isCollection(i))for(const e of i)e.routeName=null;const a=e?.apiKey,n=this.url,l=await this._getServiceDescription(n,a,t),d=Ht(l),c=e?.travelMode??d,y=(0,m.yl)(e?.accumulateAttributes,[]);(0,m.pC)(c)&&(y.push(c.distanceAttributeName),c.timeAttributeName&&y.push(c.timeAttributeName));const b={startTime:new Date},f={accumulateAttributes:y,directionsOutputType:"featuresets",ignoreInvalidLocations:!0,pointBarriers:r,polylineBarriers:o,polygonBarriers:s,preserveFirstStop:!0,preserveLastStop:!0,returnBarriers:!!r,returnDirections:!0,returnPolygonBarriers:!!s,returnPolylineBarriers:!!o,returnRoutes:!0,returnStops:!0,stops:i},v=e?Zt.from(e):new Zt;for(const e in b)null==v[e]&&(v[e]=b[e]);let g;v.set(f);try{g=await async function(e,t,i){const r=[],o=[],s={},a={},n=(0,K.en)(e),{path:l}=n;pt(t.stops)&&je(t.stops.features,o,"stops.features",s),pt(t.pointBarriers)&&je(t.pointBarriers.features,o,"pointBarriers.features",s),pt(t.polylineBarriers)&&je(t.polylineBarriers.features,o,"polylineBarriers.features",s),pt(t.polygonBarriers)&&je(t.polygonBarriers.features,o,"polygonBarriers.features",s);const p=await(0,Be.aX)(o);for(const e in s){const t=s[e];r.push(e),a[e]=p.slice(t[0],t[1])}if(function(e,t){for(let i=0;i<t.length;i++){const r=e[t[i]];if(r&&r.length)for(const e of r)if((0,m.pC)(e)&&e.hasZ)return!0}return!1}(a,r)){let e=null;try{e=await Fe(l,t.apiKey,i)}catch{}e&&!e.hasZ&&function(e,t){for(let i=0;i<t.length;i++){const r=e[t[i]];if(r&&r.length)for(const e of r)e.z=void 0}xe.warnOnce("The remote Network Analysis service is powered by a network dataset which is not Z-aware.\nZ-coordinates of the input geometry are ignored.")}(a,r)}for(const e in a)a[e].forEach(((i,r)=>{t.get(e)[r].geometry=i}));const u={...i,query:{...n.query,...Je(t),f:"json"}},d=l.endsWith("/solve")?l:`${l}/solve`,{data:c}=await(0,z.default)(d,u);return function(e){const{barriers:t,directionLines:i,directionPoints:r,directions:o,messages:s,polygonBarriers:a,polylineBarriers:n,routes:l,stops:p,traversedEdges:u,traversedJunctions:d,traversedTurns:c}=e,y=e=>{const t=h.find((t=>t.routeName===e));if((0,m.pC)(t))return t;const i={routeId:h.length+1,routeName:e};return h.push(i),i},b=e=>{const t=h.find((t=>t.routeId===e));if((0,m.pC)(t))return t;const i={routeId:e,routeName:null};return h.push(i),i},h=[];l?.features.forEach(((e,t)=>{e.geometry.spatialReference=l.spatialReference;const i=e.attributes.Name,r=t+1;h.push({routeId:r,routeName:i,route:e})})),o?.forEach((e=>{const{routeName:t}=e;y(t).directions=e}));const f=p?.features.every((e=>(0,m.Wi)(e.attributes.RouteName)))&&h.length>0?h[0].routeName:null;return p?.features.forEach((e=>{var t;e.geometry&&((t=e.geometry).spatialReference??(t.spatialReference=p.spatialReference));const i=f??e.attributes.RouteName,r=y(i);r.stops??(r.stops=[]),r.stops.push(e)})),i?.features.forEach((e=>{const t=e.attributes.RouteID,r=b(t),{geometryType:o,spatialReference:s}=i;r.directionLines??(r.directionLines={features:[],geometryType:o,spatialReference:s}),r.directionLines.features.push(e)})),r?.features.forEach((e=>{const t=e.attributes.RouteID,i=b(t),{geometryType:o,spatialReference:s}=r;i.directionPoints??(i.directionPoints={features:[],geometryType:o,spatialReference:s}),i.directionPoints.features.push(e)})),u?.features.forEach((e=>{const t=e.attributes.RouteID,i=b(t),{geometryType:r,spatialReference:o}=u;i.traversedEdges??(i.traversedEdges={features:[],geometryType:r,spatialReference:o}),i.traversedEdges.features.push(e)})),d?.features.forEach((e=>{const t=e.attributes.RouteID,i=b(t),{geometryType:r,spatialReference:o}=d;i.traversedJunctions??(i.traversedJunctions={features:[],geometryType:r,spatialReference:o}),i.traversedJunctions.features.push(e)})),c?.features.forEach((e=>{const t=e.attributes.RouteID,i=b(t);i.traversedTurns??(i.traversedTurns={features:[]}),i.traversedTurns.features.push(e)})),lt.fromJSON({routeResults:h,barriers:t,polygonBarriers:a,polylineBarriers:n,messages:s})}(c)}(n,v,t)}catch(e){throw(0,h.D_)(e)?e:new u.Z("routelayer:failed-route-request","the routing request failed",{error:e})}const T=this._toRouteLayerSolution(g);return this._isOverridden("title")||(this.title=(0,m.yl)(T.routeInfo.name,"Route")),function(e,t,i){const r=t.networkDataset?.networkAttributes,o=r?.filter((e=>"cost"===e.usageType))??[],s=Ht(t),a=i.travelMode??s;if((0,m.Wi)(a))return void li.warn("route-layer:missing-travel-mode","The routing service must have a default travel mode or one must be specified in the route parameter.");const{timeAttributeName:n,distanceAttributeName:l}=a,p=o.find((e=>e.name===n)),d=o.find((e=>e.name===l)),c=(0,m.Wg)(i.travelMode)?.impedanceAttributeName??(0,m.Wg)(i.impedanceAttribute)??t.impedance,y=Q.fromJSON(p?.units),b=$.fromJSON(d?.units);if(!y||!b)throw new u.Z("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const h=i.directionsLanguage??t.directionsLanguage,f=(0,m.Wg)(i.accumulateAttributes)??t.accumulateAttributeNames??[],v=new Set(o.filter((({name:e})=>e===n||e===l||e===c||null!=e&&f.includes(e))).map((({name:e})=>e))),g=e=>{for(const t in e)v.has(t)||delete e[t]};for(const t of e.pointBarriers)(0,m.pC)(t.costs)&&(t.addedCost=t.costs[c]??0,g(t.costs));for(const t of e.polygonBarriers)(0,m.pC)(t.costs)&&(t.scaleFactor=t.costs[c]??1,g(t.costs));for(const t of e.polylineBarriers)(0,m.pC)(t.costs)&&(t.scaleFactor=t.costs[c]??1,g(t.costs));const{routeInfo:T}=e,{findBestSequence:C,preserveFirstStop:w,preserveLastStop:S,startTimeIsUTC:_,timeWindowsAreUTC:N}=i;T.analysisSettings=new At({accumulateAttributes:f,directionsLanguage:h,findBestSequence:C,preserveFirstStop:w,preserveLastStop:S,startTimeIsUTC:_,timeWindowsAreUTC:N,travelMode:a}),T.totalDuration=Qt(T.totalCosts[n]??0,y),T.totalDistance=ei(T.totalCosts[l]??0,b),T.totalLateDuration=Qt(T.totalViolations[n]??0,y),T.totalWaitDuration=Qt(T.totalWait[n]??0,y),(0,m.pC)(T.totalCosts)&&g(T.totalCosts),(0,m.pC)(T.totalViolations)&&g(T.totalViolations),(0,m.pC)(T.totalWait)&&g(T.totalWait);for(const t of e.stops)(0,m.pC)(t.serviceCosts)&&(t.serviceDuration=Qt(t.serviceCosts[n]??0,y),t.serviceDistance=ei(t.serviceCosts[l]??0,b),g(t.serviceCosts)),(0,m.pC)(t.cumulativeCosts)&&(t.cumulativeDuration=Qt(t.cumulativeCosts[n]??0,y),t.cumulativeDistance=ei(t.cumulativeCosts[l]??0,b),g(t.cumulativeCosts)),(0,m.pC)(t.violations)&&(t.lateDuration=Qt(t.violations[n]??0,y),g(t.violations)),(0,m.pC)(t.wait)&&(t.waitDuration=Qt(t.wait[n]??0,y),g(t.wait))}(T,l,v),T}update(e){const{stops:t,directionLines:i,directionPoints:r,pointBarriers:o,polylineBarriers:s,polygonBarriers:a,routeInfo:n}=e;this.set({stops:t,pointBarriers:o,polylineBarriers:s,polygonBarriers:a}),this._set("directionLines",i),this._set("directionPoints",r),this._set("routeInfo",n),(0,m.pC)(n.geometry)&&(this.spatialReference=n.geometry.spatialReference)}_getNetworkFeatures(e,t,i,r){const o=(Yt(e)?e.layers:e.featureCollection.layers).find((e=>e.layerDefinition.name===t));if((0,m.Wi)(o))return new p.Z;const{layerDefinition:s,popupInfo:u,featureSet:d}=o,c=s.drawingInfo.renderer,{features:y}=d,b=d.spatialReference??s.spatialReference??s.extent.spatialReference??D.Zn,h=c&&(0,l.a)(c),f=tt.Z.fromJSON(b),v=y.map((e=>{const r=a.Z.fromJSON(e);(0,m.pC)(r.geometry)&&(0,m.pC)(e.geometry)&&(0,m.Wi)(e.geometry.spatialReference)&&(r.geometry.spatialReference=f);const o=i(r);return o.symbol??(o.symbol=h?.getSymbol(r)??this._getNetworkSymbol(t)),o.popupTemplate??(o.popupTemplate=u&&n.Z.fromJSON(u)),o}));return r&&v.some((e=>!e.symbol))&&r(v),new p.Z(v)}_getNetworkSymbol(e){switch(e){case"Barriers":return this.defaultSymbols.pointBarriers;case"DirectionPoints":return this.defaultSymbols.directionPoints;case"DirectionLines":return this.defaultSymbols.directionLines;case"PolylineBarriers":return this.defaultSymbols.polylineBarriers;case"PolygonBarriers":return this.defaultSymbols.polygonBarriers;case"RouteInfo":return this.defaultSymbols.routeInfo;case"Stops":return null}}async _getServiceDescription(e,t,i){if((0,m.pC)(this._cachedServiceDescription)&&this._cachedServiceDescription.url===e)return this._cachedServiceDescription.serviceDescription;const r=await Fe(e,t,i);return this._cachedServiceDescription={serviceDescription:r,url:e},r}_setStopSymbol(e){if(!e||0===e.length)return;if((0,m.Wi)(this.defaultSymbols.stops))return;if(e.every((e=>(0,m.pC)(e.symbol))))return;const{first:t,last:i,middle:r,unlocated:o,waypoint:s,break:a}=this.defaultSymbols.stops;if((0,m.Wi)(this.routeInfo)||1===e.length)return void e.forEach(((o,s)=>{switch(s){case 0:o.symbol=t;break;case e.length-1:o.symbol=i;break;default:o.symbol=r}}));const n=e.map((e=>e.sequence)).filter((e=>(0,m.pC)(e))),l=Math.min(...n),p=Math.max(...n);for(const n of e)n.sequence!==l?n.sequence!==p?"ok"===n.status||"not-located-on-closest"===n.status?"waypoint"!==n.locationType?"break"!==n.locationType?n.symbol=r:n.symbol=a:n.symbol=s:n.symbol=o:n.symbol=i:n.symbol=t}_toRouteLayerSolution(e){const t=e.routeResults[0].stops.map((e=>Gt.fromJSON(e.toJSON())));this._setStopSymbol(t);const i=new ai(t),r=new oi(e.polygonBarriers?.map((e=>{const t=wt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polygonBarriers,t}))),o=new si(e.polylineBarriers?.map((e=>{const t=Nt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polylineBarriers,t}))),s=new ri(e.pointBarriers?.map((e=>{const t=vt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.pointBarriers,t}))),a=xt.fromJSON(e.routeResults[0].route.toJSON());a.symbol=this.defaultSymbols.routeInfo;const n=new ii(e.routeResults[0].directionPoints?.features.map((e=>{const t=bt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionPoints,t})));return{directionLines:new ti(e.routeResults[0].directionLines?.features.map((e=>{const t=ct.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionLines,t}))),directionPoints:n,pointBarriers:s,polygonBarriers:r,polylineBarriers:o,routeInfo:a,stops:i}}_writeDirectionLines(){return this._writeNetworkFeatures(this.directionLines,this.defaultSymbols.directionLines,"esriGeometryPolyline",ct.fields,ct.popupInfo,"DirectionLines","Direction Lines")}_writeDirectionPoints(){return this._writeNetworkFeatures(this.directionPoints,this.defaultSymbols.directionPoints,"esriGeometryPoint",bt.fields,bt.popupInfo,"DirectionPoints","Direction Points")}_writeNetworkFeatures(e,t,i,r,o,s,a){if((0,m.Wi)(e)||!e.length)return null;const n=this.spatialReference.toJSON(),{fullExtent:l,maxScale:p,minScale:u}=this;return{featureSet:{features:e.toArray().map((e=>function(e){const{attributes:t,geometry:i,popupTemplate:r,symbol:o}=e.toGraphic().toJSON();return{attributes:t,geometry:i,popupInfo:r,symbol:o}}(e))),geometryType:i,spatialReference:n},layerDefinition:{capabilities:"Query,Update,Editing",drawingInfo:{renderer:{type:"simple",symbol:(0,m.pC)(t)?t.toJSON():Xt(i)}},extent:l.toJSON(),fields:r,geometryType:i,hasM:!1,hasZ:!1,maxScale:p,minScale:u,name:s,objectIdField:"ObjectID",spatialReference:n,title:a,type:"Feature Layer",typeIdField:""},popupInfo:o}}_writePointBarriers(){return this._writeNetworkFeatures(this.pointBarriers,this.defaultSymbols.pointBarriers,"esriGeometryPoint",vt.fields,vt.popupInfo,"Barriers","Point Barriers")}_writePolygonBarriers(){return this._writeNetworkFeatures(this.polygonBarriers,this.defaultSymbols.polygonBarriers,"esriGeometryPolygon",wt.fields,wt.popupInfo,"PolygonBarriers","Polygon Barriers")}_writePolylineBarriers(){return this._writeNetworkFeatures(this.polylineBarriers,this.defaultSymbols.polylineBarriers,"esriGeometryPolyline",Nt.fields,Nt.popupInfo,"PolylineBarriers","Line Barriers")}_writeRouteInfo(){return this._writeNetworkFeatures((0,m.pC)(this.routeInfo)?new p.Z([this.routeInfo]):null,this.defaultSymbols.routeInfo,"esriGeometryPolyline",xt.fields,xt.popupInfo,"RouteInfo","Route Details")}_writeStops(){const e=this._writeNetworkFeatures(this.stops,null,"esriGeometryPoint",Gt.fields,Gt.popupInfo,"Stops","Stops");if((0,m.Wi)(e))return null;const{stops:t}=this.defaultSymbols,i=(0,m.pC)(t)&&(0,m.pC)(t.first)&&t.first.toJSON(),r=(0,m.pC)(t)&&(0,m.pC)(t.middle)&&t.middle.toJSON(),o=(0,m.pC)(t)&&(0,m.pC)(t.last)&&t.last.toJSON();return e.layerDefinition.drawingInfo.renderer={type:"uniqueValue",field1:"Sequence",defaultSymbol:r,uniqueValueInfos:[{value:"1",symbol:i,label:"First Stop"},{value:`${this.stops.length}`,symbol:o,label:"Last Stop"}]},e}};(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1,origins:{"portal-item":{write:{allowNull:!0,ignoreOrigin:!0}},"web-map":{write:{overridePolicy(){return{allowNull:!0,ignoreOrigin:null==this.portalItem}}}}}}})],pi.prototype,"_featureCollection",void 0),(0,r._)([(0,_.c)(["web-map","portal-item"],"_featureCollection")],pi.prototype,"writeFeatureCollectionWebmap",null),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],pi.prototype,"_type",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,type:Z})],pi.prototype,"defaultSymbols",void 0),(0,r._)([(0,T.Cb)({readOnly:!0})],pi.prototype,"directionLines",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],pi.prototype,"readDirectionLines",null),(0,r._)([(0,T.Cb)({readOnly:!0})],pi.prototype,"directionPoints",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],pi.prototype,"readDirectionPoints",null),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],pi.prototype,"featureCollectionType",void 0),(0,r._)([(0,T.Cb)({readOnly:!0})],pi.prototype,"fullExtent",null),(0,r._)([(0,T.Cb)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],pi.prototype,"legendEnabled",void 0),(0,r._)([(0,T.Cb)({type:["show","hide"]})],pi.prototype,"listMode",void 0),(0,r._)([(0,T.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],pi.prototype,"maxScale",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],pi.prototype,"readMaxScale",null),(0,r._)([(0,T.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],pi.prototype,"minScale",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],pi.prototype,"readMinScale",null),(0,r._)([(0,T.Cb)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],pi.prototype,"operationalLayerType",void 0),(0,r._)([(0,T.Cb)({nonNullable:!0,type:p.Z.ofType(vt)})],pi.prototype,"pointBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],pi.prototype,"readPointBarriers",null),(0,r._)([(0,T.Cb)({nonNullable:!0,type:p.Z.ofType(wt)})],pi.prototype,"polygonBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],pi.prototype,"readPolygonBarriers",null),(0,r._)([(0,T.Cb)({nonNullable:!0,type:p.Z.ofType(Nt)})],pi.prototype,"polylineBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],pi.prototype,"readPolylineBarriers",null),(0,r._)([(0,T.Cb)({readOnly:!0})],pi.prototype,"routeInfo",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],pi.prototype,"readRouteInfo",null),(0,r._)([(0,T.Cb)({type:tt.Z})],pi.prototype,"spatialReference",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],pi.prototype,"readSpatialReference",null),(0,r._)([(0,T.Cb)({nonNullable:!0,type:p.Z.ofType(Gt)})],pi.prototype,"stops",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],pi.prototype,"readStops",null),(0,r._)([(0,T.Cb)()],pi.prototype,"title",null),(0,r._)([(0,T.Cb)({readOnly:!0,json:{read:!1}})],pi.prototype,"type",void 0),(0,r._)([(0,T.Cb)()],pi.prototype,"url",null),pi=(0,r._)([(0,S.j)(ni)],pi);const ui=pi},14661:(e,t,i)=>{i.d(t,{$o:()=>p,Kz:()=>u,_$:()=>n,ck:()=>l,qj:()=>a});var r=i(44547),o=i(82971),s=i(40488);function a(e,t){if(!n(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function n(e,t){return!!e.typeKeywords?.includes(t)}function l(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}async function p(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.Sx)(e);const i=o.Z.WGS84;return await(0,r.iQ)(t,i),(0,r.iV)(e,i)}(i)}const u={DEVELOPER_BASEMAP:"DeveloperBasemap",JSAPI:"ArcGIS API for JavaScript",METADATA:"Metadata",MULTI_LAYER:"Multilayer",SINGLE_LAYER:"Singlelayer",TABLE:"Table"}},51706:(e,t,i)=>{var r,o;function s(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function a(e){return null!=e&&!isNaN(e)&&isFinite(e)}function n(e){return e.valueExpression?r.Expression:e.field&&"string"==typeof e.field?r.Field:r.Unknown}function l(e,t){const i=t||n(e),s=e.valueUnit||"unknown";return i===r.Unknown?o.Constant:e.stops?o.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?o.ClampedLinear:"unknown"===s?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?o.Proportional:o.Additive:o.Identity:o.RealWorldSize}i.d(t,{PS:()=>n,QW:()=>l,RY:()=>r,hL:()=>o,iY:()=>s,qh:()=>a}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(r||(r={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(o||(o={}))},74889:(e,t,i)=>{i.r(t),i.d(t,{default:()=>T});var r,o=i(43697),s=i(66577),a=i(38171),n=i(35454),l=i(96674),p=i(22974),u=i(70586),d=i(5600),c=(i(75215),i(71715)),m=i(52011),y=i(30556),b=i(82971),h=i(33955),f=i(1231);const v=new n.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let g=r=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const i=b.Z.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const o=e[t],s=a.Z.fromJSON(o),n=o.geometry&&o.geometry.spatialReference;(0,u.pC)(s.geometry)&&!n&&(s.geometry.spatialReference=i);const l=o.aggregateGeometries,p=s.aggregateGeometries;if(l&&(0,u.pC)(p))for(const e in p){const t=p[e],r=l[e]?.spatialReference;(0,u.pC)(t)&&!r&&(t.spatialReference=i)}r.push(s)}return r}writeGeometryType(e,t,i,r){if(e)return void v.write(e,t,i,r);const{features:o}=this;if(o)for(const e of o)if(e&&(0,u.pC)(e.geometry))return void v.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,h.im)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=b.Z.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&(0,u.pC)(e.geometry)&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,p.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e&&e[i];r.geometry=t&&t.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,o]}=e,s=this.features,a=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((o-e)/i)));for(let e=0,t=s.length;e<t;e++)a?.((0,u.Wg)(s[e].geometry))||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,o],scale:[s,a]}=i,n=this._getHydrationFunction(e,(e=>e*s+r),(e=>o-e*a));for(const{geometry:e}of t)(0,u.pC)(e)&&n&&n(e);return this.transform=null,this}_quantizePoints(e,t,i){let r,o;const s=[];for(let a=0,n=e.length;a<n;a++){const n=e[a];if(a>0){const e=t(n[0]),a=i(n[1]);e===r&&a===o||(s.push([e-r,a-o]),r=e,o=a)}else r=t(n[0]),o=i(n[1]),s.push([r,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,h.oU)(e)?e.rings:e.paths,o=[];for(let e=0,s=r.length;e<s;e++){const s=r[e],a=this._quantizePoints(s,t,i);a&&o.push(a)}return o.length>0?((0,h.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y)}:"polyline"===e||"polygon"===e?e=>{const r=(0,h.oU)(e)?e.rings:e.paths;let o,s;for(let e=0,a=r.length;e<a;e++){const a=r[e];for(let e=0,r=a.length;e<r;e++){const r=a[e];e>0?(o+=r[0],s+=r[1]):(o=r[0],s=r[1]),r[0]=t(o),r[1]=i(s)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax)}:"multipoint"===e?e=>{const r=e.points;let o,s;for(let e=0,a=r.length;e<a;e++){const a=r[e];e>0?(o+=a[0],s+=a[1]):(o=a[0],s=a[1]),a[0]=t(o),a[1]=i(s)}}:null}};(0,o._)([(0,d.Cb)({type:String,json:{write:!0}})],g.prototype,"displayFieldName",void 0),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,d.Cb)({type:[a.Z],json:{write:!0}})],g.prototype,"features",void 0),(0,o._)([(0,c.r)("features")],g.prototype,"readFeatures",null),(0,o._)([(0,d.Cb)({type:[f.Z],json:{write:!0}})],g.prototype,"fields",void 0),(0,o._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:v.read}}})],g.prototype,"geometryType",void 0),(0,o._)([(0,y.c)("geometryType")],g.prototype,"writeGeometryType",null),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasM",void 0),(0,o._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasZ",void 0),(0,o._)([(0,d.Cb)({types:s.qM,json:{write:!0}})],g.prototype,"queryGeometry",void 0),(0,o._)([(0,c.r)("queryGeometry")],g.prototype,"readQueryGeometry",null),(0,o._)([(0,d.Cb)({type:b.Z,json:{write:!0}})],g.prototype,"spatialReference",void 0),(0,o._)([(0,y.c)("spatialReference")],g.prototype,"writeSpatialReference",null),(0,o._)([(0,d.Cb)({json:{write:!0}})],g.prototype,"transform",void 0),g=r=(0,o._)([(0,m.j)("esri.rest.support.FeatureSet")],g),g.prototype.toJSON.isDefaultToJSON=!0;const T=g},11282:(e,t,i)=>{i.d(t,{cv:()=>n,en:()=>a,lA:()=>s});var r=i(22974),o=i(17452);function s(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function a(e){return"string"==typeof e?(0,o.mN)(e):(0,r.d9)(e)}function n(e,t,i){const r={};for(const o in e){if("declaredClass"===o)continue;const s=e[o];if(null!=s&&"function"!=typeof s)if(Array.isArray(s)){r[o]=[];for(let e=0;e<s.length;e++)r[o][e]=n(s[e])}else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(i&&i[o]);r[o]=t?e:JSON.stringify(e)}else r[o]=t?s:JSON.stringify(s);else r[o]=s}return r}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7035,7541],{41123:(e,t,a)=>{a.d(t,{D:()=>s});const r="randomUUID"in crypto;function s(){if(r)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)}},82526:(e,t,a)=>{a.d(t,{aX:()=>S});var r=a(68773),s=a(20102),n=a(92604),i=a(70586),o=a(38913),l=a(58901),u=a(82971),d=a(33955);const p={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new l.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:u.Z.WebMercator}),minus180Line:new l.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:u.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new l.Z({paths:[[[180,-180],[180,180]]],spatialReference:u.Z.WGS84}),minus180Line:new l.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:u.Z.WGS84})}};function c(e,t){return Math.ceil((e-t)/(2*t))}function f(e,t){const a=h(e);for(const e of a)for(const a of e)a[0]+=t;return e}function h(e){return(0,d.oU)(e)?e.rings:e.paths}var y=a(8744),m=a(40488),g=(a(66577),a(3172)),w=a(17452);function b(e){return{geometryType:(0,d.Ji)(e[0]),geometries:e.map((e=>e.toJSON()))}}const F=n.Z.getLogger("esri.geometry.support.normalizeUtils");function A(e){return"polygon"===e[0].type}function Z(e){return"polyline"===e[0].type}function I(e,t,a){if(t){const t=function(e,t){if(!(e instanceof l.Z||e instanceof o.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw F.error(e),new s.Z(e)}const a=h(e),r=[];for(const e of a){const a=[];r.push(a),a.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const s=e[r][0],n=e[r][1],i=e[r+1][0],o=e[r+1][1],l=Math.sqrt((i-s)*(i-s)+(o-n)*(o-n)),u=(o-n)/l,d=(i-s)/l,p=l/t;if(p>1){for(let e=1;e<=p-1;e++){const r=e*t,i=d*r+s,o=u*r+n;a.push([i,o])}const e=(l+Math.floor(p-1)*t)/2,r=d*e+s,i=u*e+n;a.push([r,i])}a.push([i,o])}}return function(e){return"polygon"===e.type}(e)?new o.Z({rings:r,spatialReference:e.spatialReference}):new l.Z({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,m.Sx)(t,!0)}return a&&(e=f(e,a)),e}function R(e,t,a){if(Array.isArray(e)){const r=e[0];if(r>t){const a=c(r,t);e[0]=r+a*(-2*t)}else if(r<a){const t=c(r,a);e[0]=r+t*(-2*a)}}else{const r=e.x;if(r>t){const a=c(r,t);e=e.clone().offset(a*(-2*t),0)}else if(r<a){const t=c(r,a);e=e.clone().offset(t*(-2*a),0)}}return e}function v(e,t){let a=-1;for(let r=0;r<t.cutIndexes.length;r++){const s=t.cutIndexes[r],n=t.geometries[r],i=h(n);for(let e=0;e<i.length;e++){const t=i[e];t.some((a=>{if(a[0]<180)return!0;{let a=0;for(let e=0;e<t.length;e++){const r=t[e][0];a=r>a?r:a}a=Number(a.toFixed(9));const r=-360*c(a,180);for(let a=0;a<t.length;a++){const t=n.getPoint(e,a);n.setPoint(e,a,t.clone().offset(r,0))}return!0}}))}if(s===a){if(A(e))for(const t of h(n))e[s]=e[s].addRing(t);else if(Z(e))for(const t of h(n))e[s]=e[s].addPath(t)}else a=s,e[s]=n}return e}async function S(e,t,a){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&F.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const s="string"==typeof t?t:t?.url??r.Z.geometryServiceUrl;let n,u,h,A,Z,E,$,x,O=0;const U=[],L=[];for(const t of e)if((0,i.Wi)(t))L.push(t);else if(n||(n=t.spatialReference,u=(0,y.C5)(n),h=n.isWebMercator,E=h?102100:4326,A=p[E].maxX,Z=p[E].minX,$=p[E].plus180Line,x=p[E].minus180Line),u)if("mesh"===t.type)L.push(t);else if("point"===t.type)L.push(R(t.clone(),A,Z));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>R(e,A,Z))),L.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,u);L.push(e.rings?new o.Z(e):e)}else if(t.extent){const e=t.extent,a=c(e.xmin,Z)*(2*A);let r=0===a?t.clone():f(t.clone(),a);e.offset(a,0),e.intersects($)&&e.xmax!==A?(O=e.xmax>O?e.xmax:O,r=I(r,h),U.push(r),L.push("cut")):e.intersects(x)&&e.xmin!==Z?(O=e.xmax*(2*A)>O?e.xmax*(2*A):O,r=I(r,h,360),U.push(r),L.push("cut")):L.push(r)}else L.push(t.clone());else L.push(t);let C=c(O,A),T=-90;const k=C,N=new l.Z;for(;C>0;){const e=360*C-180;N.addPath([[e,T],[e,-1*T]]),T*=-1,C--}if(U.length>0&&k>0){const t=v(U,await async function(e,t,a,r){const s="string"==typeof e?(0,w.mN)(e):e,n=t[0].spatialReference,i={...r,query:{...s.query,f:"json",sr:JSON.stringify(n),target:JSON.stringify({geometryType:(0,d.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(a)}},o=await(0,g.default)(s.path+"/cut",i),{cutIndexes:l,geometries:u=[]}=o.data;return{cutIndexes:l,geometries:u.map((e=>{const t=(0,d.im)(e);return t.spatialReference=n,t}))}}(s,U,N,a)),r=[],n=[];for(let a=0;a<L.length;a++){const s=L[a];if("cut"!==s)n.push(s);else{const s=t.shift(),o=e[a];(0,i.pC)(o)&&"polygon"===o.type&&o.rings&&o.rings.length>1&&s.rings.length>=o.rings.length?(r.push(s),n.push("simplify")):n.push(h?(0,m.$)(s):s)}}if(!r.length)return n;const o=await async function(e,t,a){const r="string"==typeof e?(0,w.mN)(e):e,s=t[0].spatialReference,n=(0,d.Ji)(t[0]),i={...a,query:{...r.query,f:"json",sr:s.wkid?s.wkid:JSON.stringify(s),geometries:JSON.stringify(b(t))}};return function(e,t,a){const r=(0,d.q9)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=a,t}))}((await(0,g.default)(r.path+"/simplify",i)).data,n,s)}(s,r,a),l=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?l.push(t):l.push(h?(0,m.$)(o.shift()):o.shift())}return l}const G=[];for(let e=0;e<L.length;e++){const t=L[e];if("cut"!==t)G.push(t);else{const e=U.shift();G.push(!0===h?(0,m.$)(e):e)}}return G}},87269:(e,t,a)=>{a.r(t),a.d(t,{AssetMapEditFlags:()=>s,applyEdits:()=>y});var r,s,n,i=a(38171),o=a(46791),l=a(20102),u=a(22974),d=a(70586),p=a(17452),c=a(41123),f=a(82526),h=a(66361);async function y(e,t,a,s={}){let n,i;const p={edits:a,result:new Promise(((e,t)=>{n=e,i=t}))};e.emit("apply-edits",p);try{const{results:i,edits:p}=await async function(e,t,a,s){if(await e.load(),!function(e){return e&&null!=e.applyEdits}(t))throw new l.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!e.editingEnabled)throw new l.Z(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:n,options:i}=await async function(e,t,a){const s=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),n=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),i=(0,d.pC)(e.infoFor3D);if(!t||!s&&!n)throw new l.Z(`${e.type}-layer:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!e.capabilities.data.isVersioned&&a&&a.gdbVersion)throw new l.Z(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!e.capabilities.editing.supportsRollbackOnFailure&&a&&a.rollbackOnFailureEnabled)throw new l.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");if(!e.capabilities.editing.supportsGlobalId&&a&&a.globalIdUsed)throw new l.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!e.capabilities.editing.supportsGlobalId&&n)throw new l.Z(`${e.type}-layer:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if((!a||!a.globalIdUsed)&&n)throw new l.Z(`${e.type}-layer:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true");const u={...a};if(null!=u.rollbackOnFailureEnabled||e.capabilities.editing.supportsRollbackOnFailure||(u.rollbackOnFailureEnabled=!0),!1===u.rollbackOnFailureEnabled&&"original-and-current-features"===u.returnServiceEditsOption)throw new l.Z(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true.");if(!e.capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference&&u.returnServiceEditsInSourceSR)throw new l.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(u.returnServiceEditsInSourceSR&&"original-and-current-features"!==u.returnServiceEditsOption)throw new l.Z(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsOption' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const p={...t};if(p.addFeatures=t&&o.Z.isCollection(t.addFeatures)?t.addFeatures.toArray():p.addFeatures||[],p.updateFeatures=t&&o.Z.isCollection(t.updateFeatures)?t.updateFeatures.toArray():p.updateFeatures||[],p.deleteFeatures=t&&o.Z.isCollection(t.deleteFeatures)?t.deleteFeatures.toArray():p.deleteFeatures||[],p.addFeatures.length&&!e.capabilities.operations.supportsAdd)throw new l.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support adding features.");if(p.updateFeatures.length&&!e.capabilities.operations.supportsUpdate)throw new l.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support updating features.");if(p.deleteFeatures.length&&!e.capabilities.operations.supportsDelete)throw new l.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support deleting features.");p.addAttachments=p.addAttachments||[],p.updateAttachments=p.updateAttachments||[],p.deleteAttachments=p.deleteAttachments||[],p.addFeatures=p.addFeatures.map(b),p.updateFeatures=p.updateFeatures.map(b),p.addAssets=[];const c=a&&a.globalIdUsed||i;return p.addFeatures.forEach((t=>function(e,t,a){m(e,t,a)}(t,e,c))),p.updateFeatures.forEach((t=>function(e,t,a){if(m(e,t,a),"geometry"in e&&(0,d.pC)(e.geometry)&&!t.capabilities.editing.supportsGeometryUpdate)throw new l.Z(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,c))),p.deleteFeatures.forEach((t=>function(e,t,a){m(e,t,a)}(t,e,c))),p.addAttachments.forEach((t=>g(t,e))),p.updateAttachments.forEach((t=>g(t,e))),i&&await async function(e,t){if((0,d.Wi)(t.infoFor3D))return;const{infoFor3D:a}=t;let s=!1;for(const{id:e}of a.editFormats)if(e===r.GLTF_BINARY){s=!0;break}const n=[];for(const a of e.addFeatures)n.push(F(a,e,t,s));for(const a of e.updateFeatures)n.push(F(a,e,t,s));const i=await Promise.allSettled(n);for(const e of i)if("rejected"===e.status)throw e.reason}(p,e),{edits:await w(p),options:u}}(e,a,s);return n.addFeatures.length||n.updateFeatures.length||n.deleteFeatures.length||n.addAttachments.length||n.updateAttachments.length||n.deleteAttachments.length?{edits:n,results:await t.applyEdits(n,i)}:{edits:n,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,a,s),c=e=>e.filter((e=>!e.error)).map(u.d9),f={edits:p,addedFeatures:c(i.addFeatureResults),updatedFeatures:c(i.updateFeatureResults),deletedFeatures:c(i.deleteFeatureResults),addedAttachments:c(i.addAttachmentResults),updatedAttachments:c(i.updateAttachmentResults),deletedAttachments:c(i.deleteAttachmentResults)};return i.editedFeatureResults?.length&&(f.editedFeatures=i.editedFeatureResults),(f.addedFeatures.length||f.updatedFeatures.length||f.deletedFeatures.length||f.addedAttachments.length||f.updatedAttachments.length||f.deletedAttachments.length)&&(e.emit("edits",f),(0,h.lQ)(e)&&h.dU.emit("edits",{layer:e,event:f})),n(f),i}catch(e){throw i(e),e}}function m(e,t,a){if(a){if("attributes"in e&&!e.attributes[t.globalIdField])throw new l.Z(`${t.type}-layer:invalid-parameter`,"Feature should have 'globalId' when 'globalIdUsed' is true");if(!("attributes"in e)&&!e.globalId)throw new l.Z(`${t.type}-layer:invalid-parameter`,"'globalId' of the feature should be passed when 'globalIdUsed' is true")}if("geometry"in e&&(0,d.pC)(e.geometry)){if(e.geometry.hasZ&&!1===t.capabilities.data.supportsZ)throw new l.Z(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities.data.supportsM)throw new l.Z(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function g(e,t){const{feature:a,attachment:r}=e;if(!a||"attributes"in a&&!a.attributes[t.globalIdField])throw new l.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in a)&&!a.globalId)throw new l.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!r.globalId)throw new l.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!r.data&&!r.uploadId)throw new l.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(r.data instanceof File&&r.data.name||r.name))throw new l.Z(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities.editing.supportsUploadWithItemId&&r.uploadId)throw new l.Z(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof r.data){const e=(0,p.sJ)(r.data);if(e&&!e.isBase64)throw new l.Z(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function w(e){const t=e.addFeatures,a=e.updateFeatures,r=t.concat(a).map((e=>e.geometry)),s=await(0,f.aX)(r),n=t.length,i=a.length;return s.slice(0,n).forEach(((t,a)=>e.addFeatures[a].geometry=t)),s.slice(n,n+i).forEach(((t,a)=>e.updateFeatures[a].geometry=t)),e}function b(e){const t=new i.Z;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}async function F(e,t,a,s){if((0,d.Wi)(e.geometry)||"mesh"!==e.geometry.type)return;const n=e.geometry,i=a.globalIdField;if((0,d.pC)(a.parsedUrl)&&(0,d.pC)(n.external)&&"string"==typeof n.external.source&&n.external.source.startsWith(a.parsedUrl.path))return;if(!s)throw new l.Z(`${a.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");const o=await n.toBinaryGLTF(),u=await o.buffer(),p=`{${(0,c.D)()}}`,f=`${p}.glb`;t.addAssets.push({featureGlobalId:e.getAttribute(i),assetMapGlobalId:p,assetName:f,flags:0,data:u.data,mimeType:u.type,assetType:r.GLTF_BINARY,feature:e})}!function(e){e.GLTF_BINARY="3D_glb",e.GLTF_JSON="3D_gltf"}(r||(r={})),(n=s||(s={}))[n.PROJECT_VERTICES=1]="PROJECT_VERTICES"}}]);