@arcgis/core 4.28.0-next.20230920 → 4.28.0-next.20230921

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 (146) hide show
  1. package/WebScene.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/1cbaba30f55f00f7498b.js +1 -0
  4. package/assets/esri/core/workers/chunks/21a9c8aa2a9e9990df41.js +1 -0
  5. package/assets/esri/core/workers/chunks/24629402c647ef6b5f6b.js +1 -0
  6. package/assets/esri/core/workers/chunks/{b428fcb53ecc82b49e66.js → 332689bf60d246485993.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{b558a402e2ce2616cf37.js → 3ca759f72d3bb29e9ea9.js} +22 -22
  8. package/assets/esri/core/workers/chunks/4339ce8aaf87fabb80cc.js +1 -0
  9. package/assets/esri/core/workers/chunks/4369a6c1e0a82ab4db6a.js +1 -0
  10. package/assets/esri/core/workers/chunks/43ba2bacd0f7d19915f7.js +1 -0
  11. package/assets/esri/core/workers/chunks/44b8e75593b7df1843e1.js +1 -0
  12. package/assets/esri/core/workers/chunks/53097659f31750c03a6d.js +1 -0
  13. package/assets/esri/core/workers/chunks/{7c72d5368bb2d7484b9b.js → 580039dd491854ca325c.js} +1 -1
  14. package/assets/esri/core/workers/chunks/59c00d6fba0fd1c03d01.js +1 -0
  15. package/assets/esri/core/workers/chunks/5edb99b58549cd66b394.js +1 -0
  16. package/assets/esri/core/workers/chunks/6203ddf6caad3d356327.js +1 -0
  17. package/assets/esri/core/workers/chunks/652749dc847fcb887234.js +1 -0
  18. package/assets/esri/core/workers/chunks/74d3ecb1a06d9f81e2c5.js +1 -0
  19. package/assets/esri/core/workers/chunks/7ea33aa455c5143affb1.js +1 -0
  20. package/assets/esri/core/workers/chunks/90771b0de3e520a1df9a.js +1 -0
  21. package/assets/esri/core/workers/chunks/a277c980ba8704939688.js +1 -0
  22. package/assets/esri/core/workers/chunks/bbc0dcd316c5598bc9ad.js +1 -0
  23. package/assets/esri/core/workers/chunks/bc1dc6383e60e7e61d50.js +1 -0
  24. package/assets/esri/core/workers/chunks/c4bb67150ccd01ea6014.js +1 -0
  25. package/assets/esri/core/workers/chunks/{aa021bc97b4a18a749dd.js → cad260881653567bc8f9.js} +1 -1
  26. package/assets/esri/core/workers/chunks/cec607d0138351a4952e.js +1 -0
  27. package/assets/esri/core/workers/chunks/{f147269d85adfb4588ed.js → d9061beaa43065316062.js} +1 -1
  28. package/assets/esri/core/workers/chunks/e55f7fc7eff0074ce0fc.js +1 -0
  29. package/assets/esri/core/workers/chunks/{9c40e7ed387071544f8c.js → ed1fbc1bc8d50453e2f5.js} +1 -1
  30. package/assets/esri/core/workers/chunks/eef27d305023034084a4.js +1 -0
  31. package/assets/esri/images/portal/onlinemedialayer16.png +0 -0
  32. package/chunks/LaserlinePath.glsl.js +5 -1
  33. package/core/sql.js +1 -1
  34. package/interfaces.d.ts +1 -17
  35. package/layers/graphics/sources/WFSSourceWorker.js +1 -1
  36. package/layers/mixins/SceneService.js +1 -1
  37. package/layers/save/utils.js +1 -1
  38. package/layers/support/editableLayers.js +1 -1
  39. package/package.json +1 -1
  40. package/portal/PortalItem.js +1 -1
  41. package/rest/geometryService/cut.js +1 -1
  42. package/rest/query/operations/query.js +1 -1
  43. package/rest/versionManagement/deleteVersion.js +1 -1
  44. package/rest/versionManagement/gdbVersion/alterVersion.js +1 -1
  45. package/rest/versionManagement/gdbVersion/post.js +1 -1
  46. package/rest/versionManagement/gdbVersion/reconcile.js +1 -1
  47. package/rest/versionManagement/gdbVersion/serverVersionUtils.js +5 -0
  48. package/support/revision.js +1 -1
  49. package/views/2d/engine/Stage.js +1 -1
  50. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  51. package/views/3d/analysis/Dimension/lengthDimensionConstraintUtils.js +1 -1
  52. package/views/3d/analysis/Slice/RotateManipulator.js +1 -1
  53. package/views/3d/environment/LocalAtmosphere.js +1 -1
  54. package/views/3d/interactive/manipulatorUtils.js +1 -1
  55. package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
  56. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  57. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  58. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  59. package/views/3d/layers/MediaLayerView3D.js +1 -1
  60. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  61. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  62. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  63. package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
  64. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  65. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  66. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  67. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  68. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  69. package/views/3d/layers/graphics/wosrLoader.js +1 -1
  70. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  71. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  72. package/views/3d/layers/support/overlayImageUtils.js +1 -1
  73. package/views/3d/layers/support/patternUtils.js +1 -1
  74. package/views/3d/support/dito.js +1 -1
  75. package/views/3d/support/engineContent/line.js +1 -1
  76. package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
  77. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  78. package/views/3d/terrain/TerrainRenderer.js +1 -1
  79. package/views/3d/webgl-engine/collections/Component/ComponentIntersectionData.js +1 -1
  80. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  81. package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +6 -6
  82. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  83. package/views/3d/webgl-engine/lib/Attribute.js +1 -1
  84. package/views/3d/webgl-engine/lib/BoundingInfo.js +1 -1
  85. package/views/3d/webgl-engine/lib/Camera.js +1 -1
  86. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  87. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  88. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  89. package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
  90. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  91. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  92. package/views/3d/webgl-engine/lib/geometryDataUtils.js +1 -1
  93. package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
  94. package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
  95. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  96. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  97. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  98. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  99. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  100. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  101. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  102. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  103. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  104. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  105. package/views/3d/webgl-engine/materials/internal/MaterialUtil.js +1 -1
  106. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  107. package/views/draw/DrawGraphicTool.js +1 -1
  108. package/views/interactive/keybindings.js +1 -1
  109. package/views/interactive/tooltip/SketchTooltipInfo.js +1 -1
  110. package/views/interactive/tooltip/TooltipEditableField.js +1 -1
  111. package/views/interactive/tooltip/content/Fields.js +5 -0
  112. package/views/interactive/tooltip/content/TooltipContentDrawPoint.js +1 -1
  113. package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
  114. package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
  115. package/webdoc/saveAPIKeyUtils.js +5 -0
  116. package/webdoc/webdocSaveUtils.js +1 -1
  117. package/widgets/BasemapGallery.js +1 -1
  118. package/widgets/BasemapLayerList.js +1 -1
  119. package/widgets/Expand.js +1 -1
  120. package/widgets/Feature/FeatureRelationship.js +1 -1
  121. package/widgets/Fullscreen.js +1 -1
  122. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  123. package/widgets/Swipe.js +1 -1
  124. package/widgets/support/globalCss.js +1 -1
  125. package/assets/esri/core/workers/chunks/034accc7cab6c88a3b31.js +0 -1
  126. package/assets/esri/core/workers/chunks/084a85e2e31b4d5fa924.js +0 -1
  127. package/assets/esri/core/workers/chunks/1a449168d30a688e6128.js +0 -1
  128. package/assets/esri/core/workers/chunks/21f0fafafcd754f5fb88.js +0 -1
  129. package/assets/esri/core/workers/chunks/273167b2dd46e58b8739.js +0 -1
  130. package/assets/esri/core/workers/chunks/2bf58296a6ea4eee960b.js +0 -1
  131. package/assets/esri/core/workers/chunks/3c2c64832fb498bbaa83.js +0 -1
  132. package/assets/esri/core/workers/chunks/4b3a5cc435435c81e6a5.js +0 -1
  133. package/assets/esri/core/workers/chunks/56afd89d08c874f620a1.js +0 -1
  134. package/assets/esri/core/workers/chunks/6108d72faf48a592c8ba.js +0 -1
  135. package/assets/esri/core/workers/chunks/74ddc14e4b576ddbb582.js +0 -1
  136. package/assets/esri/core/workers/chunks/7f680cf24dd97d61bcd2.js +0 -1
  137. package/assets/esri/core/workers/chunks/9b54b5bdb6367c36f6e9.js +0 -1
  138. package/assets/esri/core/workers/chunks/a838dc6653ec29503053.js +0 -1
  139. package/assets/esri/core/workers/chunks/b10a91cae610aba62bf8.js +0 -1
  140. package/assets/esri/core/workers/chunks/b8eb842ea98a9734e161.js +0 -1
  141. package/assets/esri/core/workers/chunks/bbb63392485ed57703e0.js +0 -1
  142. package/assets/esri/core/workers/chunks/bdf13091bd0e1ab0db7e.js +0 -1
  143. package/assets/esri/core/workers/chunks/c88869d2a647c22dc3e6.js +0 -1
  144. package/assets/esri/core/workers/chunks/e54ae2a4281dd58e0707.js +0 -1
  145. package/assets/esri/core/workers/chunks/e5fcfd41f0ec12dcb7f2.js +0 -1
  146. package/assets/esri/core/workers/chunks/f07a0ea10428adecea1a.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6060,6030,661,5234],{25929:(e,t,n)=>{n.d(t,{M:()=>y,a:()=>m,e:()=>d,f:()=>i,i:()=>c,p:()=>p,r:()=>o,t:()=>s,w:()=>a});var r=n(17452);function i(e,t){const n=t&&t.url&&t.url.path;if(e&&n&&(e=(0,r.hF)(e,n,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const n=(0,r.PF)(e,t.portalItem.itemUrl);null!=n&&u.test(n)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(n).path)}return h(e,t&&t.portal)}function s(e,t,n=y.YES){if(null==e)return e;!(0,r.YP)(e)&&t&&t.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let i=(0,r.hF)(e);if(t){const n=t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.rootPath||t.url&&t.url.path;if(n){const s=h(n,t.portal),o=h(i,t.portal);i=(0,r.PF)(o,s,s),null!=i&&i!==o&&i!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(i)}}return i=d(i,t?.portal),(0,r.YP)(i)&&(i=(0,r.Fv)(i)),t?.resources&&t?.portalItem&&!(0,r.YP)(i)&&!(0,r.HK)(i)&&n===y.YES&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(i),compress:!1}),i}function o(e,t,n){return i(e,n)}function a(e,t,n,r){const i=s(e,r);void 0!==i&&(t[n]=i)}const l=/\/items\/([^\/]+)\/resources\/(.*)/,u=/^\.\/resources\//;function c(e){const t=e?.match(l)??null;return t?.[1]??null}function p(e){const t=e?.match(l)??null;if(null==t)return null;const n=t[2],i=n.lastIndexOf("/");if(-1===i){const{path:e,extension:t}=(0,r.fZ)(n);return{prefix:null,filename:e,extension:t}}const{path:s,extension:o}=(0,r.fZ)(n.slice(i+1));return{prefix:n.slice(0,i),filename:s,extension:o}}function d(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,r.Ie)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function h(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const n=`${t.urlKey}.${t.customBaseUrl}`,i=(0,r.TI)();return(0,r.D6)(i,`${i.scheme}://${n}`)?(0,r.Ie)(e,t.portalHostname,n):(0,r.Ie)(e,n,t.portalHostname)}var y,f;(f=y||(y={}))[f.YES=0]="YES",f[f.NO=1]="NO";const m=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return y},ensureMainOnlineDomain:d,fromJSON:i,itemIdFromResourceUrl:c,prefixAndFilenameFromResourceUrl:p,read:o,toJSON:s,write:a},Symbol.toStringTag,{value:"Module"}))},36030:(e,t,n)=>{n.d(t,{J:()=>s});var r=n(35454),i=n(5600);function s(e,t={}){const n=e instanceof r.X?e:new r.X(e,t),s={type:t?.ignoreUnknown??1?n.apiValues:String,json:{type:n.jsonValues,read:!t?.readOnly&&{reader:n.read},write:{writer:n.write}}};return void 0!==t?.readOnly&&(s.readOnly=!!t.readOnly),void 0!==t?.default&&(s.json.default=t.default),void 0!==t?.name&&(s.json.name=t.name),void 0!==t?.nonNullable&&(s.nonNullable=t.nonNullable),(0,i.Cb)(s)}},10661:(e,t,n)=>{n.d(t,{s:()=>i});var r=n(42100);class i extends r.s{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},66643:(e,t,n)=>{n.d(t,{Ed:()=>u,UI:()=>c,mt:()=>y,q6:()=>h,vr:()=>f});var r=n(43697),i=n(92036),s=n(70586),o=n(95330),a=n(5600),l=n(52011);function u(e,t,n){return(0,o.as)(e.map(((e,r)=>t.apply(n,[e,r]))))}async function c(e,t,n){return(await(0,o.as)(e.map(((e,r)=>t.apply(n,[e,r]))))).map((e=>e.value))}function p(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function h(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return p(await e)}catch(e){return d(e)}}async function y(e){try{return p(await e)}catch(e){return(0,o.r9)(e),d(e)}}function f(e,t){return new m(e,t)}let m=class extends i.Z{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,s.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:n}=this._abortController;this.promise=e(n),this.promise.then((e=>{this._result=p(e),this._cleanup()}),(e=>{this._result=d(e),this._cleanup()})),this._abortHandle=(0,o.fu)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,s.hw)(this._abortHandle),this._abortController=null}};(0,r._)([(0,a.Cb)()],m.prototype,"value",null),(0,r._)([(0,a.Cb)()],m.prototype,"error",null),(0,r._)([(0,a.Cb)()],m.prototype,"finished",null),(0,r._)([(0,a.Cb)()],m.prototype,"promise",void 0),(0,r._)([(0,a.Cb)()],m.prototype,"_result",void 0),m=(0,r._)([(0,l.j)("esri.core.asyncUtils.ReactiveTask")],m)},20188:(e,t,n)=>{function r(e){return null!=o(e)||null!=s(e)}function i(e){return o(e)??s(e)}function s(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let n=!0;if(u&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,r=0;for(;!t&&r<=e.length;)t=!l.test(e[r]),r++;n=!t}}return n}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function o(e){const t=a.exec(e);if(!t?.groups)return null;const n=t.groups,r=+n.year,i=+n.month-1,s=+n.day,o=+(n.hours??"0"),l=+(n.minutes??"0"),u=+(n.seconds??"0");if(o>23)return null;if(l>59)return null;if(u>59)return null;const c=n.ms??"0",p=c?+c.padEnd(3,"0").substring(0,3):0;let d;if(n.isUTC||!n.offsetSign)d=Date.UTC(r,i,s,o,l,u,p);else{const e=+n.offsetHours,t=+n.offsetMinutes;d=6e4*("+"===n.offsetSign?-1:1)*(60*e+t)+Date.UTC(r,i,s,o,l,u,p)}return Number.isNaN(d)?null:d}n.d(t,{o:()=>r,s:()=>i});const a=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,l=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,u=!Number.isNaN(new Date("technology 10").getTime())},37455:(e,t,n)=>{n.d(t,{N:()=>r});const r={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,n){const r=new i(e.getPointX(t),e.getPointY(t),n),s=e.hasZ(t),o=e.hasM(t);return s&&(r.z=e.getPointZ(t)),o&&(r.m=e.getPointM(t)),r},exportPolygon:function(e,t,n){return new s(e.exportPaths(t),n,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,n){return new o(e.exportPaths(t),n,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,n){return new a(e.exportPoints(t),n,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,n){const r=e.hasZ(t),i=e.hasM(t),s=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),n);if(r){const n=e.getZExtent(t);s.zmin=n.vmin,s.zmax=n.vmax}if(i){const n=e.getMExtent(t);s.mmin=n.vmin,s.mmax=n.vmax}return s}};class i{constructor(e,t,n){this.x=e,this.y=t,this.spatialReference=n,this.z=void 0,this.m=void 0}}class s{constructor(e,t,n,r){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,n&&(this.hasZ=n),r&&(this.hasM=r)}}class o{constructor(e,t,n,r){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,n&&(this.hasZ=n),r&&(this.hasM=r)}}class a{constructor(e,t,n,r){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,n&&(this.hasZ=n),r&&(this.hasM=r)}}class l{constructor(e,t,n,r,i){this.xmin=e,this.ymin=t,this.xmax=n,this.ymax=r,this.spatialReference=i,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},70272:(e,t,n)=>{n.d(t,{S6:()=>i,nd:()=>s,u_:()=>r});class r{constructor(e=null,t={},n,r){this.geometry=e,this.attributes=t,this.centroid=n,this.objectId=r,this.displayId=0,this.geohashX=0,this.geohashY=0}weakClone(){const e=new r(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}}function i(e){return!(null==e.geometry||!e.geometry.coords||!e.geometry.coords.length)}class s extends r{}},5428:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(e=[],t=[],n=!1){this.lengths=e??[],this.coords=t??[],this.hasIndeterminateRingOrder=n}static fromRect(e){const[t,n,i,s]=e,o=i-t,a=s-n;return new r([5],[t,n,o,0,0,a,-o,0,0,-a])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let n=0;n<this.lengths.length;n++){const r=this.lengths[n];for(let n=0;n<r;n++)e(this.coords[2*(n+t)],this.coords[2*(n+t)+1]);t+=r}}clone(e){return e?(e.set(this.coords),new r(this.lengths.slice(),e,this.hasIndeterminateRingOrder)):new r(this.lengths.slice(),this.coords.slice(),this.hasIndeterminateRingOrder)}}},37427:(e,t,n)=>{n.d(t,{_W:()=>h,iV:()=>m,oj:()=>w});var r=n(67676),i=n(95330),s=n(73615),o=n(37455),a=n(8744),l=n(40488);const u=[0,0];function c(e,t){if(!t)return null;if("x"in t){const n={x:0,y:0};return[n.x,n.y]=e(t.x,t.y,u),null!=t.z&&(n.z=t.z),null!=t.m&&(n.m=t.m),n}if("xmin"in t){const n={xmin:0,ymin:0,xmax:0,ymax:0};return[n.xmin,n.ymin]=e(t.xmin,t.ymin,u),[n.xmax,n.ymax]=e(t.xmax,t.ymax,u),t.hasZ&&(n.zmin=t.zmin,n.zmax=t.zmax,n.hasZ=!0),t.hasM&&(n.mmin=t.mmin,n.mmax=t.mmax,n.hasM=!0),n}return"rings"in t?{rings:p(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:p(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:d(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function p(e,t){const n=[];for(const r of e)n.push(d(r,t));return n}function d(e,t){const n=[];for(const r of e){const e=t(r[0],r[1],[0,0]);n.push(e),r.length>2&&e.push(r[2]),r.length>3&&e.push(r[3])}return n}async function h(e,t){if(!e||!t)return;const n=Array.isArray(e)?e.map((e=>null!=e.geometry?e.geometry.spatialReference:null)).filter(r.pC):[e];await(0,s.initializeProjection)(n.map((e=>({source:e,dest:t}))))}const y=c.bind(null,l.hG),f=c.bind(null,l.R6);function m(e,t,n,r){if(!e)return e;if(n||(n=t,t=e.spatialReference),!(0,a.JY)(t)||!(0,a.JY)(n)||(0,a.fS)(t,n))return e;if((0,l.Q8)(t,n)){const t=(0,a.sS)(n)?y(e):f(e);return t.spatialReference=n,t}return(0,s.projectMany)(o.N,[e],t,n,null,r)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,n,r){if(!e||!e.length||!t||!n||(0,a.fS)(t,n))return e;const s={geometries:e,inSpatialReference:t,outSpatialReference:n,geographicTransformation:r,resolve:(0,i.hh)()};return this._jobs.push(s),this._timer??=setTimeout(this._process,10),s.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:n,outSpatialReference:r,resolve:i,geographicTransformation:u}=e;(0,l.Q8)(n,r)?(0,a.sS)(r)?i(t.map(y)):i(t.map(f)):i((0,s.projectMany)(o.N,t,n,r,u,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function w(e,t,n,r){return g.push(e,t,n,r)}},43230:(e,t,n)=>{n.r(t),n.d(t,{default:()=>y});var r=n(66643),i=n(20102),s=n(92604),o=n(95330),a=n(8744),l=n(98732),u=n(37427),c=n(92722),p=n(23095),d=n(78089),h=n(99514);class y{constructor(){this._queryEngine=null,this._customParameters=null}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t){const{getFeatureUrl:r,getFeatureOutputFormat:s,fields:a,geometryType:l,featureType:c,objectIdField:p,customParameters:y}=e,{spatialReference:f,getFeatureSpatialReference:m}=(0,d.fU)(r,c,e.spatialReference);this._featureType=c,this._customParameters=y,this._getFeatureUrl=r,this._getFeatureOutputFormat=s,this._getFeatureSpatialReference=m,this._fieldsIndex=new h.Z(a);try{await(0,u._W)(m,f)}catch{throw new i.Z("unsupported-projection","Projection not supported",{inSpatialReference:m,outSpatialReference:f})}(0,o.k_)(t);const[g,{QueryEngine:w,FeatureStore:b}]=await Promise.all([this._snapshotFeatures({fieldsIndex:this._fieldsIndex,geometryType:l,objectIdField:p,spatialReference:f},t.signal),Promise.all([n.e(7126),n.e(8968),n.e(5286),n.e(8767),n.e(6148)]).then(n.bind(n,3922))]);return this._queryEngine=new w({fields:a,geometryType:l,hasM:!1,hasZ:!1,objectIdField:p,spatialReference:f,timeInfo:null,featureStore:new b({geometryType:l,hasM:!1,hasZ:!1})}),this._queryEngine.featureStore.addMany(g),{extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async applyEdits(){throw new i.Z("wfs-source:editing-not-supported","applyEdits() is not supported on WFSLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(e,t.signal)}async refresh(e){return this._customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,r.vr)((e=>this._snapshotFeatures(this._queryEngine,e))),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),e&&this._queryEngine.featureStore.addMany(e)}),(e=>{this._queryEngine.featureStore.clear(),(0,o.D_)(e)||s.Z.getLogger("esri.layers.WFSLayer").error(new i.Z("wfs-layer:getfeature-error","An error occurred during the GetFeature request",{error:e}))})),await this._waitSnapshotComplete(),{extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _snapshotFeatures({objectIdField:e,geometryType:t,spatialReference:n,fieldsIndex:r},i){const s=await(0,d.Bm)(this._getFeatureUrl??"",this._featureType.typeName,this._getFeatureSpatialReference,this._getFeatureOutputFormat,{customParameters:this._customParameters,signal:i});await(0,c.O3)(s),(0,o.k_)(i);const h=(0,c.lG)(s,{geometryType:t,hasZ:!1,objectIdField:e});if(!(0,a.fS)(n,this._getFeatureSpatialReference))for(const e of h)null!=e.geometry&&(e.geometry=(0,l.GH)((0,u.iV)((0,l.di)(e.geometry,t,!1,!1),this._getFeatureSpatialReference,n)));let y=1;const f=r.dateFields;for(const t of h){const n={};(0,p.O0)(r,n,t.attributes,!0),(0,p.n2)(f,n),t.attributes=n,null==n[e]&&(t.objectId=n[e]=y++)}return h}}},92722:(e,t,n)=>{n.d(t,{O3:()=>S,lG:()=>T,my:()=>x,q9:()=>c});var r=n(20188),i=n(20102),s=n(8744),o=n(70272),a=n(5428),l=n(35671);const u={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function c(e){return u[e]}function*p(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*d(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function h(e){for(const t of e)if(t.length>2)return!0;return!1}function y(e){let t=0;for(let n=0;n<e.length;n++){const r=e[n],i=e[(n+1)%e.length];t+=r[0]*i[1]-i[0]*r[1]}return t<=0}function f(e){const t=e[0],n=e[e.length-1];return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]||e.push(t),e}function m(e,t,n){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,n){return b(e,t.coordinates,n),e}(e,t,n);case"MultiLineString":return function(e,t,n){for(const r of t.coordinates)b(e,r,n);return e}(e,t,n);case"MultiPolygon":return function(e,t,n){for(const r of t.coordinates){g(e,r[0],n);for(let t=1;t<r.length;t++)w(e,r[t],n)}return e}(e,t,n);case"Point":return function(e,t,n){return F(e,t.coordinates,n),e}(e,t,n);case"Polygon":return function(e,t,n){const r=t.coordinates;g(e,r[0],n);for(let t=1;t<r.length;t++)w(e,r[t],n);return e}(e,t,n)}}function g(e,t,n){const r=f(t);!function(e){return!y(e)}(r)?b(e,r,n):v(e,r,n)}function w(e,t,n){const r=f(t);!function(e){return y(e)}(r)?b(e,r,n):v(e,r,n)}function b(e,t,n){for(const r of t)F(e,r,n);e.lengths.push(t.length)}function v(e,t,n){for(let r=t.length-1;r>=0;r--)F(e,t[r],n);e.lengths.push(t.length)}function F(e,t,n){const[r,i,s]=t;e.coords.push(r,i),n.hasZ&&e.coords.push(s||0)}function _(e){switch(typeof e){case"string":return(0,r.o)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function S(e,t=4326){if(!e)throw new i.Z("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new i.Z("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:n}=e;if(!n)return;const r="string"==typeof n?n:"name"===n.type?n.properties.name:"EPSG"===n.type?n.properties.code:null,o=(0,s.oR)({wkid:t})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${t})$`,"i");if(!r||!o.test(r))throw new i.Z("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:n})}function x(e,t={}){const n=[],r=new Set,i=new Set;let s,o=!1,a=null,u=!1,{geometryType:y=null}=t,f=!1;for(const t of p(e)){const{geometry:e,properties:p,id:m}=t;if((!e||(y||(y=c(e.type)),c(e.type)===y))&&(o||(o=h(d(e))),u||(u=null!=m,u&&(s=typeof m,p&&(a=Object.keys(p).filter((e=>p[e]===m))))),p&&a&&u&&null!=m&&(a.length>1?a=a.filter((e=>p[e]===m)):1===a.length&&(a=p[a[0]]===m?a:[])),!f&&p)){let e=!0;for(const t in p){if(r.has(t))continue;const s=p[t];if(null==s){e=!1,i.add(t);continue}const o=_(s);if("unknown"===o){i.add(t);continue}i.delete(t),r.add(t);const a=(0,l.q6)(t);a&&n.push({name:a,alias:t,type:o})}f=e}}const m=(0,l.q6)(1===a?.length&&a[0]||null)??void 0;if(m)for(const e of n)if(e.name===m&&(0,l.H7)(e)){e.type="esriFieldTypeOID";break}return{fields:n,geometryType:y,hasZ:o,objectIdFieldName:m,objectIdFieldType:s,unknownFields:Array.from(i)}}function T(e,t){return Array.from(function*(e,t={}){const{geometryType:n,objectIdField:r}=t;for(const i of e){const{geometry:e,properties:s,id:l}=i;if(e&&c(e.type)!==n)continue;const u=s||{};let p;r&&(p=u[r],null==l||p||(u[r]=p=l));const d=new o.u_(e?m(new a.Z,e,t):null,u,null,p??void 0);yield d}}(p(e),t))}},23095:(e,t,n)=>{n.d(t,{O0:()=>d,av:()=>l,b:()=>g,d1:()=>c,n2:()=>h,og:()=>m});var r=n(20188),i=n(8744),s=n(35671);class o{constructor(){this.code=null,this.description=null}}class a{constructor(e){this.error=new o,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=e}}function l(e){return new a(e)}class u{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function c(e){return new u(e)}const p=new Set;function d(e,t,n,r=!1,i){p.clear();for(const o in n){const a=e.get(o);if(!a)continue;const u=n[o],c=y(a,u);if(c!==u&&i&&i.push({name:"invalid-value-type",message:"attribute value was converted to match the field type",details:{field:a,originalValue:u,sanitizedValue:c}}),p.add(a.name),a&&(r||a.editable)){const e=(0,s.Qc)(a,c);if(e)return l((0,s.vP)(e,a,c));t[a.name]=c}}for(const t of e?.requiredFields??[])if(!p.has(t.name))return l(`missing required field "${t.name}"`);return null}function h(e,t){if(e?.length)for(const{name:n}of e)"string"==typeof t[n]&&(t[n]=(0,r.s)(t[n]))}function y(e,t){let n=t;return"string"==typeof t&&(0,s.H7)(e)?n=parseFloat(t):null!=t&&(0,s.qN)(e)&&"string"!=typeof t&&(n=String(t)),(0,s.Pz)(n)}let f;function m(e,t){if(!e||!(0,i.JY)(t))return e;if("rings"in e||"paths"in e){if(null==f)throw new TypeError("geometry engine not loaded");return f.simplify(t,e)}return e}async function g(e,t){!(0,i.JY)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==f&&(f=await Promise.all([n.e(5837),n.e(6753)]).then(n.bind(n,30247))),f}()}},78089:(e,t,n)=>{n.d(t,{Bm:()=>q,FU:()=>j,be:()=>k,eB:()=>Z,fU:()=>z,ft:()=>E,u2:()=>w}),n(66577);var r=n(3172),i=n(20102),s=n(66374),o=n(17452),a=n(73615),l=n(8744),u=n(86973),c=n(92722),p=n(88724),d=n(66677),h=n(1231),y=n(82971),f=n(6570);const m="xlink:href",g="2.0.0",w="__esri_wfs_id__",b="wfs-layer:getWFSLayerTypeInfo-error",v="wfs-layer:empty-service",F="wfs-layer:feature-type-not-found",_="wfs-layer:geojson-not-supported",S="wfs-layer:kvp-encoding-not-supported",x="wfs-layer:malformed-json",T="wfs-layer:unknown-geometry-type",C="wfs-layer:unknown-field-type",R="wfs-layer:unsupported-spatial-reference",P="wfs-layer:unsupported-wfs-version";async function j(e,t){const n=function(e){const t=D(e);(function(e){const t=e.firstElementChild?.getAttribute("version");if(t&&t!==g)throw new i.Z(P,`Unsupported WFS version ${t}. Supported version: ${g}`)})(t),L(t);const n=t.firstElementChild,r=(0,s.Fs)(function(e){return(0,p.H)(e,{FeatureTypeList:{FeatureType:e=>{const t={typeName:"undefined:undefined",name:"",title:"",description:"",extent:null,namespacePrefix:"",namespaceUri:"",defaultSpatialReference:4326,supportedSpatialReferences:[]},n=new Set;return(0,p.h)(e,{Name:e=>{const{name:n,prefix:r}=A(e.textContent);t.typeName=`${r}:${n}`,t.name=n,t.namespacePrefix=r,t.namespaceUri=e.lookupNamespaceURI(r)},Abstract:e=>{t.description=e.textContent},Title:e=>{t.title=e.textContent},WGS84BoundingBox:e=>{t.extent=function(e){let t,n,r,i;for(const s of e.children)switch(s.localName){case"LowerCorner":[t,n]=s.textContent.split(" ").map((e=>Number.parseFloat(e)));break;case"UpperCorner":[r,i]=s.textContent.split(" ").map((e=>Number.parseFloat(e)))}return{xmin:t,ymin:n,xmax:r,ymax:i,spatialReference:l.Zn}}(e)},DefaultCRS:e=>{const r=M(e);r&&(t.defaultSpatialReference=r,n.add(r))},OtherCRS:e=>{const t=M(e);t&&n.add(t)}}),t.title||(t.title=t.name),n.add(4326),t.supportedSpatialReferences.push(...n),t}}})}(n));return{operations:N(n),get featureTypes(){return Array.from(r())},readFeatureTypes:r}}((await(0,r.Z)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetCapabilities",VERSION:g,...t?.customParameters},signal:t?.signal})).data);return function(e,t){(0,o.$U)(e)&&((0,o.D6)(e,t.operations.DescribeFeatureType.url,!0)&&(t.operations.DescribeFeatureType.url=(0,o.hO)(t.operations.DescribeFeatureType.url)),(0,o.D6)(e,t.operations.GetFeature.url,!0)&&(t.operations.GetFeature.url=(0,o.hO)(t.operations.GetFeature.url)))}(e,n),n}const I=new Set(["json","application/json","geojson","application/json; subtype=geojson"]);function N(e){let t=!1;const n={GetCapabilities:{url:""},DescribeFeatureType:{url:""},GetFeature:{url:"",outputFormat:null,supportsPagination:!1}};if((0,p.h)(e,{OperationsMetadata:{Operation:e=>{switch(e.getAttribute("name")){case"GetCapabilities":return{DCP:{HTTP:{Get:e=>{n.GetCapabilities.url=e.getAttribute(m)}}}};case"DescribeFeatureType":return{DCP:{HTTP:{Get:e=>{n.DescribeFeatureType.url=e.getAttribute(m)}}}};case"GetFeature":return{DCP:{HTTP:{Get:e=>{n.GetFeature.url=e.getAttribute(m)}}},Parameter:e=>{if("outputFormat"===e.getAttribute("name"))return{AllowedValues:{Value:e=>{const t=e.textContent;t&&I.has(t.toLowerCase())&&(n.GetFeature.outputFormat=t)}}}}}}},Constraint:e=>{switch(e.getAttribute("name")){case"KVPEncoding":return{DefaultValue:e=>{t="true"===e.textContent.toLowerCase()}};case"ImplementsResultPaging":return{DefaultValue:e=>{n.GetFeature.supportsPagination="true"===e.textContent.toLowerCase()}}}}}}),!t)throw new i.Z(S,"WFS service doesn't support key/value pair (KVP) encoding");if(null==n.GetFeature.outputFormat)throw new i.Z(_,"WFS service doesn't support GeoJSON output format");return n}function M(e){const t=parseInt(e.textContent?.match(/(?<wkid>\d+$)/i)?.groups?.wkid??"",10);if(!Number.isNaN(t))return t}function E(e,t,n){return(0,s.sE)(e,(e=>n?e.name===t&&e.namespaceUri===n:e.typeName===t||e.name===t))}async function k(e,t,n,r={}){const{featureType:s,extent:o}=await async function(e,t,n,r={}){const s=e.readFeatureTypes(),o=t?E(s,t,n):s.next().value,{spatialReference:u=new y.Z({wkid:o?.defaultSpatialReference})}=r;if(null==o)throw t?new i.Z(F,`The type '${t}' could not be found in the service`):new i.Z(v,"The service is empty");let c=new f.Z({...o.extent,spatialReference:y.Z.WGS84});if(!(0,l.fS)(c.spatialReference,u))try{await(0,a.initializeProjection)(c.spatialReference,u,void 0,r),c=(0,a.project)(c,u)}catch{throw new i.Z(R,"Projection not supported")}return{extent:c,spatialReference:u,featureType:o}}(e,t,n,r),{spatialReference:u}=z(e.operations.GetFeature.url,s,r.spatialReference),{fields:c,geometryType:p,swapXY:d,objectIdField:h,geometryField:m}=await async function(e,t,n,r={}){const{typeName:s}=t,[o,a]=await Promise.allSettled([G(e.operations.DescribeFeatureType.url,s,r),O(e,s,n,r)]),l=e=>new i.Z(b,`An error occurred while getting info about the feature type '${s}'`,{error:e});if("rejected"===o.status)throw l(o.reason);if("rejected"===a.status)throw l(a.reason);const{fields:u,errors:c}=o.value??{},p=o.value?.geometryType||a.value?.geometryType,d=a.value?.swapXY??!1;if(null==p)throw new i.Z(T,`The geometry type could not be determined for type '${s}`,{typeName:s,geometryType:p,fields:u,errors:c});return{...Z(u??[]),geometryType:p,swapXY:d}}(e,s,u,r);return{url:e.operations.GetCapabilities.url,name:s.name,namespaceUri:s.namespaceUri,fields:c,geometryField:m,geometryType:p,objectIdField:h,spatialReference:r.spatialReference??new y.Z({wkid:s.defaultSpatialReference}),extent:o,swapXY:d,wfsCapabilities:e,customParameters:r.customParameters}}function Z(e){const t=e.find((e=>"geometry"===e.type));let n=e.find((e=>"oid"===e.type));return e=e.filter((e=>"geometry"!==e.type)),n||(n=new h.Z({name:w,type:"oid",alias:w}),e.unshift(n)),{geometryField:t?.name??null,objectIdField:n.name,fields:e}}async function O(e,t,n,i={}){let s,o=!1;const[a,l]=await Promise.all([q(e.operations.GetFeature.url,t,n,e.operations.GetFeature.outputFormat,{...i,count:1}),(0,r.Z)(e.operations.GetFeature.url,{responseType:"text",query:U(t,n,void 0,{...i,count:1}),signal:i?.signal})]),p="FeatureCollection"===a.type&&a.features[0]?.geometry;if(p){let e;switch(s=u.M.fromJSON((0,c.q9)(p.type)),p.type){case"Point":e=p.coordinates;break;case"LineString":case"MultiPoint":e=p.coordinates[0];break;case"MultiLineString":case"Polygon":e=p.coordinates[0][0];break;case"MultiPolygon":e=p.coordinates[0][0][0]}const t=/<[^>]*pos[^>]*> *(-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)/.exec(l.data);if(t){const n=e[0].toFixed(3),r=e[1].toFixed(3),i=parseFloat(t[1]).toFixed(3);n===parseFloat(t[2]).toFixed(3)&&r===i&&(o=!0)}}return{geometryType:s,swapXY:o}}async function G(e,t,n){return function(e,t){const{name:n}=A(e),r=D(t);L(r);const o=(0,s.sE)((0,p.H)(r.firstElementChild,{element:e=>({name:e.getAttribute("name"),typeName:A(e.getAttribute("type")).name})}),(({name:e})=>e===n));if(null!=o){const e=(0,s.sE)((0,p.H)(r.firstElementChild,{complexType:e=>e}),(e=>e.getAttribute("name")===o.typeName));if(null!=e)return function(e){const t=[],n=[];let r;const s=(0,p.H)(e,{complexContent:{extension:{sequence:{element:e=>e}}}});for(const o of s){const s=o.getAttribute("name");if(!s)continue;let a,l;if(o.hasAttribute("type")?a=A(o.getAttribute("type")).name:(0,p.h)(o,{simpleType:{restriction:e=>(a=A(e.getAttribute("base")).name,{maxLength:e=>{l=+e.getAttribute("value")}})}}),!a)continue;const u="true"===o.getAttribute("nillable");let c=!1;switch(a.toLowerCase()){case"integer":case"nonpositiveinteger":case"negativeinteger":case"long":case"int":case"short":case"byte":case"nonnegativeinteger":case"unsignedlong":case"unsignedint":case"unsignedshort":case"unsignedbyte":case"positiveinteger":n.push(new h.Z({name:s,alias:s,type:"integer",nullable:u}));break;case"float":case"double":case"decimal":n.push(new h.Z({name:s,alias:s,type:"double",nullable:u}));break;case"boolean":case"string":case"gyearmonth":case"gyear":case"gmonthday":case"gday":case"gmonth":case"anyuri":case"qname":case"notation":case"normalizedstring":case"token":case"language":case"idrefs":case"entities":case"nmtoken":case"nmtokens":case"name":case"ncname":case"id":case"idref":case"entity":case"duration":case"time":n.push(new h.Z({name:s,alias:s,type:"string",nullable:u,length:l??255}));break;case"datetime":case"date":n.push(new h.Z({name:s,alias:s,type:"date",nullable:u,length:l??36}));break;case"pointpropertytype":r="point",c=!0;break;case"multipointpropertytype":r="multipoint",c=!0;break;case"curvepropertytype":case"multicurvepropertytype":case"multilinestringpropertytype":r="polyline",c=!0;break;case"surfacepropertytype":case"multisurfacepropertytype":case"multipolygonpropertytype":r="polygon",c=!0;break;case"geometrypropertytype":case"multigeometrypropertytype":c=!0,t.push(new i.Z(T,`geometry type '${a}' is not supported`,{type:(new XMLSerializer).serializeToString(e)}));break;default:t.push(new i.Z(C,`Unknown field type '${a}'`,{type:(new XMLSerializer).serializeToString(e)}))}c&&n.push(new h.Z({name:s,alias:s,type:"geometry",nullable:u}))}for(const e of n)if("integer"===e.type&&!e.nullable&&V.has(e.name.toLowerCase())){e.type="oid";break}return{geometryType:r,fields:n,errors:t}}(e)}throw new i.Z(F,`Type '${e}' not found in document`,{document:(new XMLSerializer).serializeToString(r)})}(t,(await(0,r.Z)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"DescribeFeatureType",VERSION:g,TYPENAME:t,...n?.customParameters},signal:n?.signal})).data)}const V=new Set(["objectid","fid"]);async function q(e,t,n,s,o){let{data:a}=await(0,r.Z)(e,{responseType:"text",query:U(t,n,s,o),signal:o?.signal});a=a.replaceAll(/": +(-?\d+),(\d+)(,)?/g,'": $1.$2$3');try{return JSON.parse(a)}catch(e){throw new i.Z(x,"Error while parsing the response",{response:a,error:e})}}function U(e,t,n,r){const i="number"==typeof t?t:t.wkid;return{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:g,TYPENAMES:e,OUTPUTFORMAT:n,SRSNAME:"EPSG:"+i,STARTINDEX:r?.startIndex,COUNT:r?.count,...r?.customParameters}}function D(e){return(new DOMParser).parseFromString(e.trim(),"text/xml")}function A(e){const[t,n]=e.split(":");return{prefix:n?t:"",name:n??t}}function L(e){let t="",n="";if((0,p.h)(e.firstElementChild,{Exception:e=>(t=e.getAttribute("exceptionCode"),{ExceptionText:e=>{n=e.textContent}})}),t)throw new i.Z(`wfs-layer:${t}`,n)}function z(e,t,n){const r={wkid:t.defaultSpatialReference},i=null!=n?.wkid?{wkid:n.wkid}:r;return{spatialReference:i,getFeatureSpatialReference:(0,d.B5)(e)||i.wkid&&t.supportedSpatialReferences.includes(i.wkid)?{wkid:i.wkid}:{wkid:t.defaultSpatialReference}}}},88724:(e,t,n)=>{function r(e,t){if(e&&t)for(const n of e.children)if(n.localName in t){const e=t[n.localName];if("function"==typeof e){const t=e(n);t&&r(n,t)}else r(n,e)}}function*i(e,t){for(const n of e.children)if(n.localName in t){const e=t[n.localName];"function"==typeof e?yield e(n):yield*i(n,e)}}n.d(t,{H:()=>i,h:()=>r})},1231:(e,t,n)=>{n.d(t,{Z:()=>m});var r,i=n(43697),s=n(35454),o=n(96674),a=n(5600),l=n(75215),u=(n(67676),n(80442),n(36030)),c=n(71715),p=n(52011),d=n(72729),h=n(86719);const y=new s.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=r=class extends o.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=-1,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?.value??null}readValueType(e,{description:t}){let n=null;try{n=t?JSON.parse(t):null}catch(e){}return n?y.fromJSON(n.fieldValueType):null}clone(){return new r({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,i._)([(0,a.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,i._)([(0,a.Cb)()],f.prototype,"description",void 0),(0,i._)([(0,c.r)("description")],f.prototype,"readDescription",null),(0,i._)([(0,a.Cb)({types:d.V5,json:{read:{reader:d.im},write:!0}})],f.prototype,"domain",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,i._)([(0,a.Cb)({type:l.z8,json:{write:!0}})],f.prototype,"length",void 0),(0,i._)([(0,a.Cb)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,i._)([(0,u.J)(h.v)],f.prototype,"type",void 0),(0,i._)([(0,a.Cb)()],f.prototype,"valueType",void 0),(0,i._)([(0,c.r)("valueType",["description"])],f.prototype,"readValueType",null),(0,i._)([(0,a.Cb)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=r=(0,i._)([(0,p.j)("esri.layers.support.Field")],f);const m=f},99514:(e,t,n)=>{n.d(t,{Z:()=>o});var r=n(35671);function i(e){return"oid"===e.type||"esriFieldTypeOID"===e.type}function s(e){return"global-id"===e.type||"esriFieldTypeGlobalID"===e.type}class o{constructor(e=[]){if(this.fields=[],this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this.dateFields=[],this.numericFields=[],this._requiredFields=null,!e)return;this.fields=e;const t=[];for(const o of e){const e=o?.name,u=l(o?.name);if(e&&u){const l=a(e);this._fieldsMap.set(e,o),this._fieldsMap.set(l,o),this._normalizedFieldsMap.set(u,o),t.push(l),"date"===(n=o).type||"esriFieldTypeDate"===n.type||"date-only"===n.type||"esriFieldTypeDateOnly"===n.type||"timestamp-offset"===n.type||"esriFieldTypeTimestampOffset"===n.type?(this.dateFields.push(o),this._dateFieldsSet.add(o)):(0,r.H7)(o)&&(this._numericFieldsSet.add(o),this.numericFields.push(o)),i(o)||s(o)||(o.editable=null==o.editable||!!o.editable,o.nullable=null==o.nullable||!!o.nullable)}}var n;t.sort(),this.uid=t.join(",")}destroy(){this._fieldsMap.clear()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)i(e)||s(e)||e.nullable||void 0!==(0,r.os)(e)||this._requiredFields.push(e)}return this._requiredFields}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(a(e))??this._normalizedFieldsMap.get(l(e)),t&&this._fieldsMap.set(e,t),t)}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){const t=this.get(e);return"time-only"===t?.type||"esriFieldTypeTimeOnly"===t?.type}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}}function a(e){return e.trim().toLowerCase()}function l(e){return(0,r.q6)(e)?.toLowerCase()??""}},66677:(e,t,n)=>{n.d(t,{B5:()=>c,DR:()=>d,G:()=>b,M8:()=>f,Nm:()=>m,Qc:()=>p,XG:()=>g,a7:()=>y,ld:()=>h,wH:()=>w});var r=n(17452),i=n(25929);const s={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},o=Object.values(s),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function c(e){return!!a.test(e)}function p(e){if(null==e)return null;const t=(0,r.mN)(e),n=t?.path.match(a)||t?.path.match(l);if(!n)return null;const[,i,o,u,c]=n,p=o.indexOf("/");return{title:h(-1!==p?o.slice(p+1):o),serverType:s[u.toLowerCase()],sublayer:null!=c&&""!==c?parseInt(c,10):null,url:{path:i}}}function d(e){const t=(0,r.mN)(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function h(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function y(e,t){const n=[];if(e){const t=p(e);null!=t&&t.title&&n.push(t.title)}if(t){const e=h(t);n.push(e)}if(2===n.length){if(n[0].toLowerCase().includes(n[1].toLowerCase()))return n[0];if(n[1].toLowerCase().includes(n[0].toLowerCase()))return n[1]}return n.join(" - ")}function f(e){if(!e)return!1;const t=(e=e.toLowerCase()).includes(".arcgis.com/"),n=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return t&&n}function m(e,t){return e?(0,r.Qj)((0,r.Hu)(e,t)):e}function g(e){let{url:t}=e;if(!t)return{url:t};t=(0,r.Hu)(t,e.logger);const n=(0,r.mN)(t),i=p(n.path);let s;if(null!=i)null!=i.sublayer&&null==e.layer.layerId&&(s=i.sublayer),t=i.url.path;else if(e.nonStandardUrlAllowed){const e=d(n.path);null!=e&&(t=e.serviceUrl,s=e.sublayerId)}return{url:(0,r.Qj)(t),layerId:s}}function w(e,t,n,s,o){(0,i.w)(t,s,"url",o),s.url&&null!=e.layerId&&(s.url=(0,r.v_)(s.url,n,e.layerId.toString()))}function b(e){if(!e)return!1;const t=e.toLowerCase(),n=t.includes("/services/"),r=t.includes("/mapserver/wmsserver"),i=t.includes("/imageserver/wmsserver"),s=t.includes("/wmsserver");return n&&(r||i||s)}},72729:(e,t,n)=>{n.d(t,{im:()=>x,V5:()=>S}),n(80442);var r,i=n(43697),s=n(22974),o=n(5600),a=(n(75215),n(36030)),l=n(52011),u=n(96674);n(67676);let c=r=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new r({name:this.name,code:this.code})}};(0,i._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,i._)([(0,o.Cb)({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=r=(0,i._)([(0,l.j)("esri.layers.support.CodedValue")],c);const p=new(n(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,i._)([(0,o.Cb)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,a.J)(p)],d.prototype,"type",void 0),d=(0,i._)([(0,l.j)("esri.layers.support.Domain")],d);const h=d;var y;let f=y=class extends h{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const n=String(e);this.codedValues.some((e=>(String(e.code)===n&&(t=e.name),!!t)))}return t}clone(){return new y({codedValues:(0,s.d9)(this.codedValues),name:this.name})}};(0,i._)([(0,o.Cb)({type:[c],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,i._)([(0,a.J)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=y=(0,i._)([(0,l.j)("esri.layers.support.CodedValueDomain")],f);const m=f;var g;n(92604),n(20102);let w=g=class extends h{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,i._)([(0,a.J)({inherited:"inherited"})],w.prototype,"type",void 0),w=g=(0,i._)([(0,l.j)("esri.layers.support.InheritedDomain")],w);const b=w;var v;let F=v=class extends h{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new v({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,i._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,n){t[n]=[this.minValue||0,e]}}}})],F.prototype,"maxValue",void 0),(0,i._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[0]},write:{target:"range",writer(e,t,n){t[n]=[e,this.maxValue||0]}}}})],F.prototype,"minValue",void 0),(0,i._)([(0,a.J)({range:"range"})],F.prototype,"type",void 0),F=v=(0,i._)([(0,l.j)("esri.layers.support.RangeDomain")],F);const _=F,S={key:"type",base:h,typeMap:{range:F,"coded-value":m,inherited:b}};function x(e){if(!e||!e.type)return null;switch(e.type){case"range":return _.fromJSON(e);case"codedValue":return m.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},86719:(e,t,n)=>{n.d(t,{v:()=>r});const r=new(n(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1444],{16306:(e,t,r)=>{r.d(t,{aX:()=>A});var n=r(68773),a=r(20102),s=r(92604),o=r(38913),i=r(58901),l=r(73913),u=r(8744),d=r(40488),p=(r(66577),r(3172)),c=r(33955),f=r(11282),h=r(17452);async function y(e,t,r){const n="string"==typeof e?(0,h.mN)(e):e,a=t[0].spatialReference,s=(0,c.Ji)(t[0]),o={...r,query:{...n.query,f:"json",sr:(0,u.B9)(a),geometries:JSON.stringify((l=t,{geometryType:(0,c.Ji)(l[0]),geometries:l.map((e=>e.toJSON()))}))}},{data:i}=await(0,p.Z)(n.path+"/simplify",o);var l;return function(e,t,r){const n=(0,c.q9)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=r,t}))}(i.geometries,s,a)}const m=s.Z.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function w(e){return"polyline"===e[0].type}function b(e,t,r){if(t){const t=function(e,t){if(!(e instanceof i.Z||e instanceof o.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m.error(e),new a.Z(e)}const r=(0,l.x3)(e),n=[];for(const e of r){const r=[];n.push(r),r.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const a=e[n][0],s=e[n][1],o=e[n+1][0],i=e[n+1][1],l=Math.sqrt((o-a)*(o-a)+(i-s)*(i-s)),u=(i-s)/l,d=(o-a)/l,p=l/t;if(p>1){for(let e=1;e<=p-1;e++){const n=e*t,o=d*n+a,i=u*n+s;r.push([o,i])}const e=(l+Math.floor(p-1)*t)/2,n=d*e+a,o=u*e+s;r.push([n,o])}r.push([o,i])}}return function(e){return"polygon"===e.type}(e)?new o.Z({rings:n,spatialReference:e.spatialReference}):new i.Z({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.Sx)(t,!0)}return r&&(e=(0,l.Sy)(e,r)),e}function F(e,t,r){if(Array.isArray(e)){const n=e[0];if(n>t){const r=(0,l.XZ)(n,t);e[0]=n+r*(-2*t)}else if(n<r){const t=(0,l.XZ)(n,r);e[0]=n+t*(-2*r)}}else{const n=e.x;if(n>t){const r=(0,l.XZ)(n,t);e=e.clone().offset(r*(-2*t),0)}else if(n<r){const t=(0,l.XZ)(n,r);e=e.clone().offset(t*(-2*r),0)}}return e}function Z(e,t){let r=-1;for(let n=0;n<t.cutIndexes.length;n++){const a=t.cutIndexes[n],s=t.geometries[n],o=(0,l.x3)(s);for(let e=0;e<o.length;e++){const t=o[e];t.some((r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const n=t[e][0];r=n>r?n:r}r=Number(r.toFixed(9));const n=-360*(0,l.XZ)(r,180);for(let r=0;r<t.length;r++){const t=s.getPoint(e,r);s.setPoint(e,r,t.clone().offset(n,0))}return!0}}))}if(a===r){if(g(e))for(const t of(0,l.x3)(s))e[a]=e[a].addRing(t);else if(w(e))for(const t of(0,l.x3)(s))e[a]=e[a].addPath(t)}else r=a,e[a]=s}return e}async function A(e,t,r){if(!Array.isArray(e))return A([e],t);t&&"string"!=typeof t&&m.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const a="string"==typeof t?t:t?.url??n.default.geometryServiceUrl;let s,h,g,w,v,S,I,R,$=0;const E=[],x=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,h=(0,u.C5)(s),g=s.isWebMercator,S=g?102100:4326,w=l.UZ[S].maxX,v=l.UZ[S].minX,I=l.UZ[S].plus180Line,R=l.UZ[S].minus180Line),h)if("mesh"===t.type)x.push(t);else if("point"===t.type)x.push(F(t.clone(),w,v));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>F(e,w,v))),x.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,h);x.push(e.rings?new o.Z(e):e)}else if(t.extent){const e=t.extent,r=(0,l.XZ)(e.xmin,v)*(2*w);let n=0===r?t.clone():(0,l.Sy)(t.clone(),r);e.offset(r,0),e.intersects(I)&&e.xmax!==w?($=e.xmax>$?e.xmax:$,n=b(n,g),E.push(n),x.push("cut")):e.intersects(R)&&e.xmin!==v?($=e.xmax*(2*w)>$?e.xmax*(2*w):$,n=b(n,g,360),E.push(n),x.push("cut")):x.push(n)}else x.push(t.clone());else x.push(t);else x.push(t);let O=(0,l.XZ)($,w),L=-90;const U=O,k=new i.Z;for(;O>0;){const e=360*O-180;k.addPath([[e,L],[e,-1*L]]),L*=-1,O--}if(E.length>0&&U>0){const t=Z(E,await async function(e,t,r,n){const a=(0,f.en)(e),s=t[0].spatialReference,o={...n,query:{...a.query,f:"json",sr:(0,u.B9)(s),target:JSON.stringify({geometryType:(0,c.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},i=await(0,p.Z)(a.path+"/cut",o),{cutIndexes:l,geometries:d=[]}=i.data;return{cutIndexes:l,geometries:d.map((e=>{const t=(0,c.im)(e);return t.spatialReference=s,t}))}}(a,E,k,r)),n=[],s=[];for(let r=0;r<x.length;r++){const a=x[r];if("cut"!==a)s.push(a);else{const a=t.shift(),o=e[r];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&a.rings.length>=o.rings.length?(n.push(a),s.push("simplify")):s.push(g?(0,d.$)(a):a)}}if(!n.length)return s;const o=await y(a,n,r),i=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?i.push(t):i.push(g?(0,d.$)(o.shift()):o.shift())}return i}const X=[];for(let e=0;e<x.length;e++){const t=x[e];if("cut"!==t)X.push(t);else{const e=E.shift();X.push(!0===g?(0,d.$)(e):e)}}return X}},73913:(e,t,r)=>{r.d(t,{Sy:()=>l,UZ:()=>o,XZ:()=>i,x3:()=>u});var n=r(58901),a=r(82971),s=r(33955);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.Z.WebMercator}),minus180Line:new n.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.Z({paths:[[[180,-180],[180,180]]],spatialReference:a.Z.WGS84}),minus180Line:new n.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:a.Z.WGS84})}};function i(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=u(e);for(const e of r)for(const r of e)r[0]+=t;return e}function u(e){return(0,s.oU)(e)?e.rings:e.paths}},14720:(e,t,r)=>{r.d(t,{Ey:()=>b,applyEdits:()=>F,aw:()=>g,uploadAssets:()=>$});var n=r(38171),a=r(46791),s=r(20102),o=r(22974),i=r(92604),l=r(95330),u=r(17452),d=r(41123),p=r(16306),c=r(54253),f=r(2981),h=r(84230);function y(e){return e&&null!=e.applyEdits}function m(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function g(e){return e.every(m)}function w(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function b(e){return e.every(w)}async function F(e,t,r,n={}){let u;if((0,c.lQ)(e)&&e.url)u=(0,c.jF)(e.url,e.layerId,n.gdbVersion,"original-and-current-features"===n.returnServiceEditsOption);else{u=(0,l.hh)(),u.promise.then((t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)}));const t={result:u.promise};e.emit("apply-edits",t)}try{const{results:l,edits:p}=await async function(e,t,r,n){if(await e.load(),!y(t))throw new s.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,h.ln)(e))throw new s.Z(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:o,options:l}=await async function(e,t,r){const n=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),o=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),l=null!=e.infoFor3D;if(!t||!n&&!o)throw new s.Z(`${e.type}-layer:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");const u=(0,h.S1)(e);if(!u.data.isVersioned&&r?.gdbVersion)throw new s.Z(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!u.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new s.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");if(!u.editing.supportsGlobalId&&r?.globalIdUsed)throw new s.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!u.editing.supportsGlobalId&&o)throw new s.Z(`${e.type}-layer:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!r?.globalIdUsed&&o)throw new s.Z(`${e.type}-layer:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true");const p={...r};if(null!=p.rollbackOnFailureEnabled||u.editing.supportsRollbackOnFailure||(p.rollbackOnFailureEnabled=!0),p.rollbackOnFailureEnabled||"original-and-current-features"!==p.returnServiceEditsOption||(!1===p.rollbackOnFailureEnabled&&i.Z.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwrritten and set to true."),p.rollbackOnFailureEnabled=!0),!u.editing.supportsReturnServiceEditsInSourceSpatialReference&&p.returnServiceEditsInSourceSR)throw new s.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(p.returnServiceEditsInSourceSR&&"original-and-current-features"!==p.returnServiceEditsOption)throw new s.Z(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const c={...t};if(c.addFeatures=t&&a.Z.isCollection(t.addFeatures)?t.addFeatures.toArray():c.addFeatures||[],c.updateFeatures=t&&a.Z.isCollection(t.updateFeatures)?t.updateFeatures.toArray():c.updateFeatures||[],c.deleteFeatures=t&&a.Z.isCollection(t.deleteFeatures)?t.deleteFeatures.toArray():c.deleteFeatures||[],c.addFeatures.length&&!u.operations.supportsAdd)throw new s.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support adding features.");if(c.updateFeatures.length&&!u.operations.supportsUpdate)throw new s.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support updating features.");if(c.deleteFeatures.length&&!u.operations.supportsDelete)throw new s.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support deleting features.");c.addAttachments=c.addAttachments||[],c.updateAttachments=c.updateAttachments||[],c.deleteAttachments=c.deleteAttachments||[],c.addFeatures=c.addFeatures.map(I),c.updateFeatures=c.updateFeatures.map(I),c.addAssetFeatures=[];const y=r?.globalIdUsed||l;if(y){const{globalIdField:t}=e;if(null==t)throw new s.Z(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");c.addFeatures.forEach((e=>function(e,t){const{attributes:r}=e;null==r[t]&&(r[t]=(0,d.z)())}(e,t)))}return c.addFeatures.forEach((t=>function(e,t,r){Z(e,t,r),A(e,t)}(t,e,y))),c.updateFeatures.forEach((t=>function(e,t,r){Z(e,t,r),A(e,t);const n=(0,h.S1)(t);if("geometry"in e&&null!=e.geometry&&!n?.editing.supportsGeometryUpdate)throw new s.Z(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,y))),c.deleteFeatures.forEach((t=>function(e,t,r){Z(e,t,r)}(t,e,y))),c.addAttachments.forEach((t=>v(t,e))),c.updateAttachments.forEach((t=>v(t,e))),l&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,n=(0,f.S0)("model/gltf-binary",r.supportedFormats)??(0,f.Ow)("glb",r.supportedFormats);if(!n||!r.editFormats.includes(n))throw new s.Z(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:a}=e;for(const t of e.addFeatures??[])R(t)&&a.push(t);for(const t of e.updateFeatures??[])R(t)&&a.push(t)}(c,e),{edits:await S(c),options:p}}(e,r,n);return o.addFeatures?.length||o.updateFeatures?.length||o.deleteFeatures?.length||o.addAttachments?.length||o.updateAttachments?.length||o.deleteAttachments?.length?{edits:o,results:await t.applyEdits(o,l)}:{edits:o,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,r,n),c=e=>e.filter((e=>!e.error)).map(o.d9),m={edits:p,addedFeatures:c(l.addFeatureResults),updatedFeatures:c(l.updateFeatureResults),deletedFeatures:c(l.deleteFeatureResults),addedAttachments:c(l.addAttachmentResults),updatedAttachments:c(l.updateAttachmentResults),deletedAttachments:c(l.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:l.editMoment?new Date(l.editMoment):null};return l.editedFeatureResults?.length&&(m.editedFeatures=l.editedFeatureResults),u.resolve(m),l}catch(e){throw u.reject(e),e}}function Z(e,t,r){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new s.Z(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new s.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 s.Z(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function A(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D){const{geometry:r}=e;if(r.vertexSpace.isGeoreferenced)throw new s.Z(`${t.type}-layer:georeferenced-mesh-unsupported`,"Uploading georeferenced meshes to a layer is not supported.")}}function v(e,t){const{feature:r,attachment:n}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!n.globalId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!n.data&&!n.uploadId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(n.data instanceof File&&n.data.name||n.name))throw new s.Z(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&n.uploadId)throw new s.Z(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof n.data){const e=(0,u.sJ)(n.data);if(e&&!e.isBase64)throw new s.Z(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function S(e){const t=e.addFeatures??[],r=e.updateFeatures??[],n=t.concat(r).map((e=>e.geometry)),a=await(0,p.aX)(n),s=t.length,o=r.length;return a.slice(0,s).forEach(((e,r)=>t[r].geometry=e)),a.slice(s,s+o).forEach(((e,t)=>r[t].geometry=e)),e}function I(e){const t=new n.Z;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function R(e){return"mesh"===e?.geometry?.type}function $(e,t,r,n){if(!y(t))throw new s.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new s.Z(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,n)}},2981:(e,t,r)=>{r.d(t,{$6:()=>h,$z:()=>s,F7:()=>a,Ow:()=>i,S0:()=>o,d1:()=>l,dm:()=>u});const n=[["binary","application/octet-stream","bin",""]];function a(e,t){return null!=p(t.name,e?.supportedFormats??[])}function s(e,t){if(!e)return!1;const r=u(t,e.supportedFormats??[]);return null!=r&&e.editFormats.includes(r)}function o(e,t){return c(function(e,t){const r=e.toLowerCase();return d(t).find((e=>f(e)===r))}(e,t))}function i(e,t){return c(p(e,t))}function l(e,t){return f(function(e,t){return d(t).find((t=>c(t)===e))}(e,t))}function u(e,t){return i(e.name,t)??o(e.type,t)}function d(e){return[...n,...e]}function p(e,t){const r=e.toLowerCase();return d(t).find((e=>function(e){return e?.[2].split(",").map((e=>e.toLowerCase()))??[]}(e).some((e=>r.endsWith(e)))))}function c(e){return e?.[0]}function f(e){return e?.[1].toLowerCase()}function h(e){return e.tables?.find((e=>"assetMaps"===e.role))}},11282:(e,t,r)=>{r.d(t,{cv:()=>i,en:()=>o,lA:()=>s}),r(68773),r(40330);var n=r(22974),a=r(17452);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,a.mN)(e):(0,n.d9)(e)}function i(e,t,r){const n={};for(const a in e){if("declaredClass"===a)continue;const s=e[a];if(null!=s&&"function"!=typeof s)if(Array.isArray(s)){n[a]=[];for(let e=0;e<s.length;e++)n[a][e]=i(s[e])}else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(r&&r[a]);n[a]=t?e:JSON.stringify(e)}else n[a]=t?s:JSON.stringify(s);else n[a]=s}return n}r(71058)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8217],{21787:(t,e,n)=>{n.d(e,{a:()=>u,d:()=>a,f:()=>o,i:()=>p,m:()=>c,n:()=>l,s:()=>s,t:()=>i});var r=n(46851);function o(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function s(t,e,n,r,o,s,i,a,u,c){return t[0]=e,t[1]=n,t[2]=r,t[3]=o,t[4]=s,t[5]=i,t[6]=a,t[7]=u,t[8]=c,t}function i(t,e){if(t===e){const n=e[1],r=e[2],o=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=o}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function a(t,e){const n=e[0],r=e[1],o=e[2],s=e[3],i=e[4],a=e[5],u=e[6],c=e[7],l=e[8],f=l*i-a*c,p=-l*s+a*u,d=c*s-i*u;let h=n*f+r*p+o*d;return h?(h=1/h,t[0]=f*h,t[1]=(-l*r+o*c)*h,t[2]=(a*r-o*i)*h,t[3]=p*h,t[4]=(l*n-o*u)*h,t[5]=(-a*n+o*s)*h,t[6]=d*h,t[7]=(-c*n+r*u)*h,t[8]=(i*n-r*s)*h,t):null}function u(t,e){const n=e[0],r=e[1],o=e[2],s=e[3],i=e[4],a=e[5],u=e[6],c=e[7],l=e[8];return t[0]=i*l-a*c,t[1]=o*c-r*l,t[2]=r*a-o*i,t[3]=a*u-s*l,t[4]=n*l-o*u,t[5]=o*s-n*a,t[6]=s*c-i*u,t[7]=r*u-n*c,t[8]=n*i-r*s,t}function c(t,e,n){const r=e[0],o=e[1],s=e[2],i=e[3],a=e[4],u=e[5],c=e[6],l=e[7],f=e[8],p=n[0],d=n[1],h=n[2],y=n[3],g=n[4],b=n[5],M=n[6],w=n[7],m=n[8];return t[0]=p*r+d*i+h*c,t[1]=p*o+d*a+h*l,t[2]=p*s+d*u+h*f,t[3]=y*r+g*i+b*c,t[4]=y*o+g*a+b*l,t[5]=y*s+g*u+b*f,t[6]=M*r+w*i+m*c,t[7]=M*o+w*a+m*l,t[8]=M*s+w*u+m*f,t}function l(t,e){const n=e[0],r=e[1],o=e[2],s=e[3],i=e[4],a=e[5],u=e[6],c=e[7],l=e[8],f=e[9],p=e[10],d=e[11],h=e[12],y=e[13],g=e[14],b=e[15],M=n*a-r*i,w=n*u-o*i,m=n*c-s*i,S=r*u-o*a,C=r*c-s*a,E=o*c-s*u,I=l*y-f*h,A=l*g-p*h,v=l*b-d*h,T=f*g-p*y,U=f*b-d*y,L=p*b-d*g;let z=M*L-w*U+m*T+S*v-C*A+E*I;return z?(z=1/z,t[0]=(a*L-u*U+c*T)*z,t[1]=(u*v-i*L-c*A)*z,t[2]=(i*U-a*v+c*I)*z,t[3]=(o*U-r*L-s*T)*z,t[4]=(n*L-o*v+s*A)*z,t[5]=(r*v-n*U-s*I)*z,t[6]=(y*E-g*C+b*S)*z,t[7]=(g*m-h*E-b*w)*z,t[8]=(h*C-y*m+b*M)*z,t):null}function f(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}function p(t){const e=(0,r.g)(),n=t[0],o=t[1],s=t[2],i=t[3],a=t[4],u=t[5],c=t[6],l=t[7],f=t[8];return Math.abs(1-(n*n+i*i+c*c))<=e&&Math.abs(1-(o*o+a*a+l*l))<=e&&Math.abs(1-(s*s+u*u+f*f))<=e}const d=c,h=f;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},adjoint:u,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},determinant:function(t){const e=t[0],n=t[1],r=t[2],o=t[3],s=t[4],i=t[5],a=t[6],u=t[7],c=t[8];return e*(c*s-i*u)+n*(-c*o+i*a)+r*(u*o-s*a)},equals:function(t,e){const n=t[0],o=t[1],s=t[2],i=t[3],a=t[4],u=t[5],c=t[6],l=t[7],f=t[8],p=e[0],d=e[1],h=e[2],y=e[3],g=e[4],b=e[5],M=e[6],w=e[7],m=e[8],S=(0,r.g)();return Math.abs(n-p)<=S*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(o-d)<=S*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(s-h)<=S*Math.max(1,Math.abs(s),Math.abs(h))&&Math.abs(i-y)<=S*Math.max(1,Math.abs(i),Math.abs(y))&&Math.abs(a-g)<=S*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(u-b)<=S*Math.max(1,Math.abs(u),Math.abs(b))&&Math.abs(c-M)<=S*Math.max(1,Math.abs(c),Math.abs(M))&&Math.abs(l-w)<=S*Math.max(1,Math.abs(l),Math.abs(w))&&Math.abs(f-m)<=S*Math.max(1,Math.abs(f),Math.abs(m))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},fromMat4:o,fromQuat:function(t,e){const n=e[0],r=e[1],o=e[2],s=e[3],i=n+n,a=r+r,u=o+o,c=n*i,l=r*i,f=r*a,p=o*i,d=o*a,h=o*u,y=s*i,g=s*a,b=s*u;return t[0]=1-f-h,t[3]=l-b,t[6]=p+g,t[1]=l+b,t[4]=1-c-h,t[7]=d-y,t[2]=p-g,t[5]=d+y,t[8]=1-c-f,t},fromRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:a,isOrthoNormal:p,mul:d,multiply:c,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t},normalFromMat4:l,normalFromMat4Legacy:function(t,e){const n=e[0],r=e[1],o=e[2],s=e[4],i=e[5],a=e[6],u=e[8],c=e[9],l=e[10],f=l*i-a*c,p=-l*s+a*u,d=c*s-i*u,h=n*f+r*p+o*d;if(!h)return null;const y=1/h;return t[0]=f*y,t[1]=(-l*r+o*c)*y,t[2]=(a*r-o*i)*y,t[3]=p*y,t[4]=(l*n-o*u)*y,t[5]=(-a*n+o*s)*y,t[6]=d*y,t[7]=(-c*n+r*u)*y,t[8]=(i*n-r*s)*y,t},projection:function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,e,n){const r=e[0],o=e[1],s=e[2],i=e[3],a=e[4],u=e[5],c=e[6],l=e[7],f=e[8],p=Math.sin(n),d=Math.cos(n);return t[0]=d*r+p*i,t[1]=d*o+p*a,t[2]=d*s+p*u,t[3]=d*i-p*r,t[4]=d*a-p*o,t[5]=d*u-p*s,t[6]=c,t[7]=l,t[8]=f,t},scale:function(t,e,n){const r=n[0],o=n[1],s=n[2];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=o*e[3],t[4]=o*e[4],t[5]=o*e[5],t[6]=s*e[6],t[7]=s*e[7],t[8]=s*e[8],t},scaleByVec2:function(t,e,n){const r=n[0],o=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=o*e[3],t[4]=o*e[4],t[5]=o*e[5],t},set:s,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:h,subtract:f,translate:function(t,e,n){const r=e[0],o=e[1],s=e[2],i=e[3],a=e[4],u=e[5],c=e[6],l=e[7],f=e[8],p=n[0],d=n[1];return t[0]=r,t[1]=o,t[2]=s,t[3]=i,t[4]=a,t[5]=u,t[6]=p*r+d*i+c,t[7]=p*o+d*a+l,t[8]=p*s+d*u+f,t},transpose:i},Symbol.toStringTag,{value:"Module"}))},51305:(t,e,n)=>{n.d(e,{a:()=>d,c:()=>g,g:()=>l,j:()=>U,k:()=>y,m:()=>f,s:()=>c});var r=n(46521),o=n(94961),s=n(65617),i=n(46851),a=n(17896),u=n(98766);function c(t,e,n){n*=.5;const r=Math.sin(n);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(n),t}function l(t,e){const n=2*Math.acos(e[3]),r=Math.sin(n/2);return r>(0,i.g)()?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),n}function f(t,e,n){const r=e[0],o=e[1],s=e[2],i=e[3],a=n[0],u=n[1],c=n[2],l=n[3];return t[0]=r*l+i*a+o*c-s*u,t[1]=o*l+i*u+s*a-r*c,t[2]=s*l+i*c+r*u-o*a,t[3]=i*l-r*a-o*u-s*c,t}function p(t,e,n,r){const o=e[0],s=e[1],a=e[2],u=e[3];let c,l,f,p,d,h=n[0],y=n[1],g=n[2],b=n[3];return l=o*h+s*y+a*g+u*b,l<0&&(l=-l,h=-h,y=-y,g=-g,b=-b),1-l>(0,i.g)()?(c=Math.acos(l),f=Math.sin(c),p=Math.sin((1-r)*c)/f,d=Math.sin(r*c)/f):(p=1-r,d=r),t[0]=p*o+d*h,t[1]=p*s+d*y,t[2]=p*a+d*g,t[3]=p*u+d*b,t}function d(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function h(t,e){const n=e[0]+e[4]+e[8];let r;if(n>0)r=Math.sqrt(n+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{let n=0;e[4]>e[0]&&(n=1),e[8]>e[3*n+n]&&(n=2);const o=(n+1)%3,s=(n+2)%3;r=Math.sqrt(e[3*n+n]-e[3*o+o]-e[3*s+s]+1),t[n]=.5*r,r=.5/r,t[3]=(e[3*o+s]-e[3*s+o])*r,t[o]=(e[3*o+n]+e[3*n+o])*r,t[s]=(e[3*s+n]+e[3*n+s])*r}return t}function y(t,e,n,r){const o=.5*Math.PI/180;e*=o,n*=o,r*=o;const s=Math.sin(e),i=Math.cos(e),a=Math.sin(n),u=Math.cos(n),c=Math.sin(r),l=Math.cos(r);return t[0]=s*u*l-i*a*c,t[1]=i*a*l+s*u*c,t[2]=i*u*c-s*a*l,t[3]=i*u*l+s*a*c,t}const g=u.c,b=u.s,M=u.a,w=f,m=u.b,S=u.d,C=u.l,E=u.f,I=E,A=u.g,v=A,T=u.n,U=u.h,L=u.e,z=(0,s.c)(),O=(0,s.f)(1,0,0),F=(0,s.f)(0,1,0),x=(0,o.a)(),P=(0,o.a)(),Z=(0,r.a)();Object.freeze(Object.defineProperty({__proto__:null,add:M,calculateW:function(t,e){const n=e[0],r=e[1],o=e[2];return t[0]=n,t[1]=r,t[2]=o,t[3]=Math.sqrt(Math.abs(1-n*n-r*r-o*o)),t},conjugate:d,copy:g,dot:S,equals:L,exactEquals:U,fromEuler:y,fromMat3:h,getAxisAngle:l,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){const n=e[0],r=e[1],o=e[2],s=e[3],i=n*n+r*r+o*o+s*s,a=i?1/i:0;return t[0]=-n*a,t[1]=-r*a,t[2]=-o*a,t[3]=s*a,t},len:I,length:E,lerp:C,mul:w,multiply:f,normalize:T,random:function(t){const e=i.R,n=e(),r=e(),o=e(),s=Math.sqrt(1-n),a=Math.sqrt(n);return t[0]=s*Math.sin(2*Math.PI*r),t[1]=s*Math.cos(2*Math.PI*r),t[2]=a*Math.sin(2*Math.PI*o),t[3]=a*Math.cos(2*Math.PI*o),t},rotateX:function(t,e,n){n*=.5;const r=e[0],o=e[1],s=e[2],i=e[3],a=Math.sin(n),u=Math.cos(n);return t[0]=r*u+i*a,t[1]=o*u+s*a,t[2]=s*u-o*a,t[3]=i*u-r*a,t},rotateY:function(t,e,n){n*=.5;const r=e[0],o=e[1],s=e[2],i=e[3],a=Math.sin(n),u=Math.cos(n);return t[0]=r*u-s*a,t[1]=o*u+i*a,t[2]=s*u+r*a,t[3]=i*u-o*a,t},rotateZ:function(t,e,n){n*=.5;const r=e[0],o=e[1],s=e[2],i=e[3],a=Math.sin(n),u=Math.cos(n);return t[0]=r*u+o*a,t[1]=o*u-r*a,t[2]=s*u+i*a,t[3]=i*u-s*a,t},rotationTo:function(t,e,n){const r=(0,a.j)(e,n);return r<-.999999?((0,a.b)(z,O,e),(0,a.k)(z)<1e-6&&(0,a.b)(z,F,e),(0,a.n)(z,z),c(t,z,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,a.b)(z,e,n),t[0]=z[0],t[1]=z[1],t[2]=z[2],t[3]=1+r,T(t,t))},scale:m,set:b,setAxes:function(t,e,n,r){const o=Z;return o[0]=n[0],o[3]=n[1],o[6]=n[2],o[1]=r[0],o[4]=r[1],o[7]=r[2],o[2]=-e[0],o[5]=-e[1],o[8]=-e[2],T(t,h(t,o))},setAxisAngle:c,slerp:p,sqlerp:function(t,e,n,r,o,s){return p(x,e,o,s),p(P,n,r,s),p(t,x,P,2*s*(1-s)),t},sqrLen:v,squaredLength:A,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},83932:(t,e,n)=>{n.d(e,{B:()=>c});var r=n(22021),o=n(52138),s=n(65617);function i(t,e,n){const r=Math.sin(t),o=Math.cos(t),s=Math.sin(e),i=Math.cos(e),a=n;return a[0]=-r,a[4]=-s*o,a[8]=i*o,a[12]=0,a[1]=o,a[5]=-s*r,a[9]=i*r,a[13]=0,a[2]=0,a[6]=i,a[10]=s,a[14]=0,a[3]=0,a[7]=0,a[11]=0,a[15]=1,a}var a=n(29166),u=n(8744);function c(t,e,n,r){if(null==t||null==r)return!1;const s=(0,a.eT)(t,a.Jz),c=(0,a.eT)(r,a.sp);if(s===c&&!l(c)&&(s!==a.Ej.UNKNOWN||(0,u.fS)(t,r)))return(0,o.d)(n,e),!0;if(l(c)){const t=a.rf[s][a.Ej.LON_LAT],r=a.rf[a.Ej.LON_LAT][c];return null!=t&&null!=r&&(t(e,0,p,0),r(p,0,d,0),i(f*p[0],f*p[1],n),n[12]=d[0],n[13]=d[1],n[14]=d[2],!0)}if((c===a.Ej.WEB_MERCATOR||c===a.Ej.PLATE_CARREE)&&(s===a.Ej.WGS84||s===a.Ej.CGCS2000&&c===a.Ej.PLATE_CARREE||s===a.Ej.SPHERICAL_ECEF||s===a.Ej.WEB_MERCATOR)){const t=a.rf[s][a.Ej.LON_LAT],r=a.rf[a.Ej.LON_LAT][c];return null!=t&&null!=r&&(t(e,0,p,0),r(p,0,d,0),s===a.Ej.SPHERICAL_ECEF?function(t,e,n){i(t,e,n),(0,o.t)(n,n)}(f*p[0],f*p[1],n):(0,o.g)(n),n[12]=d[0],n[13]=d[1],n[14]=d[2],!0)}return!1}function l(t){return t===a.Ej.SPHERICAL_ECEF||t===a.Ej.SPHERICAL_MARS_PCPF||t===a.Ej.SPHERICAL_MOON_PCPF}const f=(0,r.Vl)(1),p=(0,s.c)(),d=(0,s.c)()},58995:(t,e,n)=>{n.d(e,{rS:()=>c});var r=n(2109),o=n(82971),s=n(8744);const i=new o.Z(r.kU),a=new o.Z(r.JL),u=new o.Z(r.mM);function c(t){return t&&((0,s.BZ)(t)||(0,s.fS)(t,a))?a:t&&((0,s.V2)(t)||(0,s.fS)(t,u))?u:i}new o.Z(r.pn)},56765:(t,e,n)=>{n.d(e,{Z:()=>l});var r,o=n(43697),s=n(46791),i=n(96674),a=n(5600),u=(n(75215),n(67676),n(80442),n(52011));let c=r=class extends i.wq{constructor(t){super(t),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new s.Z}clone(){return new r({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,o._)([(0,a.Cb)({type:String,json:{write:!0}})],c.prototype,"floorField",void 0),(0,o._)([(0,a.Cb)({json:{read:!1,write:!1}})],c.prototype,"viewAllMode",void 0),(0,o._)([(0,a.Cb)({json:{read:!1,write:!1}})],c.prototype,"viewAllLevelIds",void 0),c=r=(0,o._)([(0,u.j)("esri.layers.support.LayerFloorInfo")],c);const l=c},15506:(t,e,n)=>{n.d(e,{C:()=>r});const r={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},58333:(t,e,n)=>{n.d(e,{ET:()=>s,I4:()=>o,eG:()=>u,lF:()=>i,lj:()=>l,qP:()=>a,wW:()=>c});const r=[252,146,31,255],o={type:"esriSMS",style:"esriSMSCircle",size:6,color:r,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},s={type:"esriSLS",style:"esriSLSSolid",width:.75,color:r},i={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},u={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},c={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},l={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}},91891:(t,e,n)=>{n.d(e,{I_:()=>p,W7:()=>y,qM:()=>b});var r=n(20102),o=n(22974),s=n(92604),i=n(25683),a=n(35065);const u=s.Z.getLogger("esri.views.3d.layers.i3s.I3SBinaryReader");function c(t,e,n){let o="",s=0;for(;s<n;){const i=t[e+s];if(i<128)o+=String.fromCharCode(i),s++;else if(i>=192&&i<224){if(s+1>=n)throw new r.Z("utf8-decode-error","UTF-8 Decode failed. Two byte character was truncated.");const a=(31&i)<<6|63&t[e+s+1];o+=String.fromCharCode(a),s+=2}else if(i>=224&&i<240){if(s+2>=n)throw new r.Z("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const a=(15&i)<<12|(63&t[e+s+1])<<6|63&t[e+s+2];o+=String.fromCharCode(a),s+=3}else{if(!(i>=240&&i<248))throw new r.Z("utf8-decode-error","UTF-8 Decode failed. Invalid multi byte sequence.");{if(s+3>=n)throw new r.Z("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const a=(7&i)<<18|(63&t[e+s+1])<<12|(63&t[e+s+2])<<6|63&t[e+s+3];if(a>=65536){const t=55296+(a-65536>>10),e=56320+(1023&a);o+=String.fromCharCode(t,e)}else o+=String.fromCharCode(a);s+=4}}}return o}function l(t,e){const n={byteOffset:0,byteCount:0,fields:Object.create(null)};let r=0;for(let o=0;o<e.length;o++){const s=e[o],i=s.valueType||s.type,a=w[i];n.fields[s.property]=a(t,r),r+=M[i].BYTES_PER_ELEMENT}return n.byteCount=r,n}function f(t,e,n){const o=[];let s,i,a=0;for(i=0;i<t;i+=1){if(s=e[i],s>0){if(o.push(c(n,a,s-1)),0!==n[a+s-1])throw new r.Z("string-array-error","Invalid string array: missing null termination.")}else o.push(null);a+=s}return o}function p(t,e){return new(0,M[e.valueType])(t,e.byteOffset,e.count*e.valuesPerElement)}function d(t,e,n){const s=null!=e.header?l(t,e.header):{byteOffset:0,byteCount:0,fields:{count:n}},i={header:s,byteOffset:s.byteCount,byteCount:0,entries:Object.create(null)};let a=s.byteCount;for(let t=0;t<e.ordering.length;t++){const n=e.ordering[t],u=(0,o.d9)(e[n]);if(u.count=s.fields.count??0,"String"===u.valueType){if(u.byteOffset=a,u.byteCount=s.fields[n+"ByteCount"],"UTF-8"!==u.encoding)throw new r.Z("unsupported-encoding","Unsupported String encoding.",{encoding:u.encoding});if(u.timeEncoding&&"ECMA_ISO8601"!==u.timeEncoding)throw new r.Z("unsupported-time-encoding","Unsupported time encoding.",{timeEncoding:u.timeEncoding})}else{if(!m(u.valueType))throw new r.Z("unsupported-value-type","Unsupported binary valueType",{valueType:u.valueType});{const t=S(u.valueType);a+=a%t!=0?t-a%t:0,u.byteOffset=a,u.byteCount=t*u.valuesPerElement*u.count}}a+=u.byteCount??0,i.entries[n]=u}return i.byteCount=a-i.byteOffset,i}function h(t,e,n){if(e!==t&&u.error(`Invalid ${n} buffer size\n expected: ${t}, actual: ${e})`),e<t)throw new r.Z("buffer-too-small","Binary buffer is too small",{expectedSize:t,actualSize:e})}function y(t,e){const n=l(t,e&&e.header);let r=n.byteCount;const o={isDraco:!1,header:n,byteOffset:n.byteCount,byteCount:0,vertexAttributes:{}},s=n.fields,i=null!=s.vertexCount?s.vertexCount:s.count;for(const t of e.ordering){if(!e.vertexAttributes[t])continue;const n={...e.vertexAttributes[t],byteOffset:r,count:i},s=g[t]||"_"+t;o.vertexAttributes[s]=n,r+=S(n.valueType)*n.valuesPerElement*i}const a=s.faceCount;if(e.faces&&a){o.faces={};for(const t of e.ordering){if(!e.faces[t])continue;const n={...e.faces[t],byteOffset:r,count:a};o.faces[t]=n,r+=S(n.valueType)*n.valuesPerElement*a}}const u=s.featureCount;if(e.featureAttributes&&e.featureAttributeOrder&&u){o.featureAttributes={};for(const t of e.featureAttributeOrder){if(!e.featureAttributes[t])continue;const n={...e.featureAttributes[t],byteOffset:r,count:u};o.featureAttributes[t]=n,r+=("UInt64"===n.valueType?8:S(n.valueType))*n.valuesPerElement*u}}return h(r,t.byteLength,"geometry"),o.byteCount=r-o.byteOffset,o}const g={position:a.T.POSITION,normal:a.T.NORMAL,color:a.T.COLOR,uv0:a.T.UV0,region:a.T.UVREGION};function b(t,e,n){if("lepcc-rgb"===t.encoding)return(0,i.IT)(e);if("lepcc-intensity"===t.encoding)return(0,i.ti)(e);if(null!=t.encoding&&""!==t.encoding)throw new r.Z("unknown-attribute-storage-info-encoding","Unknown Attribute Storage Info Encoding");t["attributeByteCounts "]&&!t.attributeByteCounts&&(u.warn("Warning: Trailing space in 'attributeByteCounts '."),t.attributeByteCounts=t["attributeByteCounts "]),"ObjectIds"===t.ordering[0]&&t.hasOwnProperty("objectIds")&&(u.warn("Warning: Case error in objectIds"),t.ordering[0]="objectIds");const o=d(e,t,n);h(o.byteOffset+o.byteCount,e.byteLength,"attribute");const s=o.entries.attributeValues||o.entries.objectIds;if(s){if("String"===s.valueType){const t=o.entries.attributeByteCounts,n=p(e,t),r=function(t,e){return new Uint8Array(t,e.byteOffset,e.byteCount)}(e,s);return s.timeEncoding?function(t,e,n){return f(t,e,n).map((t=>{const e=t?Date.parse(t):null;return e&&!Number.isNaN(e)?e:null}))}(t.count,n,r):f(t.count,n,r)}return p(e,s)}throw new r.Z("bad-attribute-storage-info","Bad attributeStorageInfo specification.")}const M={Float32:Float32Array,Float64:Float64Array,UInt8:Uint8Array,Int8:Int8Array,UInt16:Uint16Array,Int16:Int16Array,UInt32:Uint32Array,Int32:Int32Array},w={Float32:(t,e)=>new DataView(t,0).getFloat32(e,!0),Float64:(t,e)=>new DataView(t,0).getFloat64(e,!0),UInt8:(t,e)=>new DataView(t,0).getUint8(e),Int8:(t,e)=>new DataView(t,0).getInt8(e),UInt16:(t,e)=>new DataView(t,0).getUint16(e,!0),Int16:(t,e)=>new DataView(t,0).getInt16(e,!0),UInt32:(t,e)=>new DataView(t,0).getUint32(e,!0),Int32:(t,e)=>new DataView(t,0).getInt32(e,!0)};function m(t){return M.hasOwnProperty(t)}function S(t){return m(t)?M[t].BYTES_PER_ELEMENT:0}},2358:(t,e,n)=>{n.d(e,{xe:()=>M});var r=n(3172),o=(n(67676),n(20102),n(80442),n(1533)),s=(n(21787),n(46521)),i=(n(52138),n(13598)),a=(n(51305),n(94961)),u=(n(17896),n(65617));n(2109),n(73615),n(82971),n(58995),n(83932),n(87360),(0,u.c)();var c=n(24470),l=(n(8744),n(14165),n(91891));n(22303);var f,p,d=n(88669);(p=f||(f={}))[p.INVISIBLE=0]="INVISIBLE",p[p.TRANSPARENT=1]="TRANSPARENT",p[p.OPAQUE=2]="OPAQUE";(0,d.f)(0,0,0,.2),f.OPAQUE;(0,d.f)(0,0,0,.2),f.OPAQUE,n(6206);var h,y,g=n(87951),b=n(51417);async function M(t,e,n,o,s){const i=[];for(const r of e)if(r&&s.includes(r.name)){const e=`${t}/nodes/${n}/attributes/${r.key}/0`;i.push({url:e,storageInfo:r})}const a=await Promise.allSettled(i.map((t=>(0,r.Z)(t.url,{responseType:"array-buffer"}).then((e=>(0,l.qM)(t.storageInfo,e.data)))))),u=[];for(const t of o){const e={};for(let n=0;n<a.length;n++){const r=a[n];if("fulfilled"===r.status){const o=r.value;e[i[n].storageInfo.name]=S(o,t)}}u.push(e)}return u}(0,c.Ue)(),(y=h||(h={}))[y.OUTSIDE=0]="OUTSIDE",y[y.INTERSECTS_CENTER_OUTSIDE=1]="INTERSECTS_CENTER_OUTSIDE",y[y.INTERSECTS_CENTER_INSIDE=2]="INTERSECTS_CENTER_INSIDE",y[y.INSIDE=3]="INSIDE";const w=-32768,m=-(2**31);function S(t,e){if(!t)return null;const n=t[e];return(0,o.z3)(t)?n===w?null:n:(0,o.Hx)(t)?n===m?null:n:n!=n?null:n}const C=new Array(24);new b.a(C,3,!0),(0,u.c)(),(0,u.c)(),(0,s.a)(),(0,i.a)(),(0,a.a)(),(0,c.Ue)(),(0,c.Ue)(),(0,g.Ue)(),(0,u.c)(),new Array(72),(0,i.a)()},25683:(t,e,n)=>{n.d(e,{Gi:()=>c,IT:()=>h,ti:()=>b});var r=n(20102);const o=!0,s={identifierOffset:0,identifierLength:10,versionOffset:10,checksumOffset:12,byteCount:16};function i(t,e,n){return{identifier:String.fromCharCode.apply(null,new Uint8Array(t,n+s.identifierOffset,s.identifierLength)),version:e.getUint16(n+s.versionOffset,o),checksum:e.getUint32(n+s.checksumOffset,o)}}const a={sizeLo:0,sizeHi:4,minX:8,minY:16,minZ:24,maxX:32,maxY:40,maxZ:48,errorX:56,errorY:64,errorZ:72,count:80,reserved:84,byteCount:88};function u(t,e){return{sizeLo:t.getUint32(e+a.sizeLo,o),sizeHi:t.getUint32(e+a.sizeHi,o),minX:t.getFloat64(e+a.minX,o),minY:t.getFloat64(e+a.minY,o),minZ:t.getFloat64(e+a.minZ,o),maxX:t.getFloat64(e+a.maxX,o),maxY:t.getFloat64(e+a.maxY,o),maxZ:t.getFloat64(e+a.maxZ,o),errorX:t.getFloat64(e+a.errorX,o),errorY:t.getFloat64(e+a.errorY,o),errorZ:t.getFloat64(e+a.errorZ,o),count:t.getUint32(e+a.count,o),reserved:t.getUint32(e+a.reserved,o)}}function c(t){const e=new DataView(t,0);let n=0;const{identifier:o,version:c}=i(t,e,n);if(n+=s.byteCount,"LEPCC "!==o)throw new r.Z("lepcc-decode-error","Bad identifier");if(c>1)throw new r.Z("lepcc-decode-error","Unknown version");const f=u(e,n);if(n+=a.byteCount,f.sizeHi*2**32+f.sizeLo!==t.byteLength)throw new r.Z("lepcc-decode-error","Bad size");const p=new Float64Array(3*f.count),d=[],h=[],y=[],g=[];if(n=l(t,n,d),n=l(t,n,h),n=l(t,n,y),n=l(t,n,g),n!==t.byteLength)throw new r.Z("lepcc-decode-error","Bad length");let b=0,M=0;for(let t=0;t<d.length;t++){M+=d[t];let e=0;for(let n=0;n<h[t];n++){e+=y[b];const t=g[b];p[3*b]=Math.min(f.maxX,f.minX+2*f.errorX*e),p[3*b+1]=Math.min(f.maxY,f.minY+2*f.errorY*M),p[3*b+2]=Math.min(f.maxZ,f.minZ+2*f.errorZ*t),b++}}return{errorX:f.errorX,errorY:f.errorY,errorZ:f.errorZ,result:p}}function l(t,e,n){const r=[];e=f(t,e,r);const o=[];for(let s=0;s<r.length;s++){o.length=0,e=f(t,e,o);for(let t=0;t<o.length;t++)n.push(o[t]+r[s])}return e}function f(t,e,n){const s=new DataView(t,e),i=s.getUint8(0),a=31&i,u=!!(32&i),c=(192&i)>>6;let l=0;if(0===c)l=s.getUint32(1,o),e+=5;else if(1===c)l=s.getUint16(1,o),e+=3;else{if(2!==c)throw new r.Z("lepcc-decode-error","Bad count type");l=s.getUint8(1),e+=2}if(u)throw new r.Z("lepcc-decode-error","LUT not implemented");const f=Math.ceil(l*a/8),p=new Uint8Array(t,e,f);let d=0,h=0,y=0;const g=-1>>>32-a;for(let t=0;t<l;t++){for(;h<a;)d|=p[y]<<h,h+=8,y+=1;n[t]=d&g,d>>>=a,h-=a,h+a>32&&(d|=p[y-1]>>8-h)}return e+y}const p={sizeLo:0,sizeHi:4,count:8,colorMapCount:12,lookupMethod:14,compressionMethod:15,byteCount:16};function d(t,e){return{sizeLo:t.getUint32(e+p.sizeLo,o),sizeHi:t.getUint32(e+p.sizeHi,o),count:t.getUint32(e+p.count,o),colorMapCount:t.getUint16(e+p.colorMapCount,o),lookupMethod:t.getUint8(e+p.lookupMethod),compressionMethod:t.getUint8(e+p.compressionMethod)}}function h(t){const e=new DataView(t,0);let n=0;const{identifier:o,version:a}=i(t,e,n);if(n+=s.byteCount,"ClusterRGB"!==o)throw new r.Z("lepcc-decode-error","Bad identifier");if(a>1)throw new r.Z("lepcc-decode-error","Unknown version");const u=d(e,n);if(n+=p.byteCount,u.sizeHi*2**32+u.sizeLo!==t.byteLength)throw new r.Z("lepcc-decode-error","Bad size");if((2===u.lookupMethod||1===u.lookupMethod)&&0===u.compressionMethod){if(3*u.colorMapCount+u.count+n!==t.byteLength||u.colorMapCount>256)throw new r.Z("lepcc-decode-error","Bad count");const e=new Uint8Array(t,n,3*u.colorMapCount),o=new Uint8Array(t,n+3*u.colorMapCount,u.count),s=new Uint8Array(3*u.count);for(let t=0;t<u.count;t++){const n=o[t];s[3*t]=e[3*n],s[3*t+1]=e[3*n+1],s[3*t+2]=e[3*n+2]}return s}if(0===u.lookupMethod&&0===u.compressionMethod){if(3*u.count+n!==t.byteLength||0!==u.colorMapCount)throw new r.Z("lepcc-decode-error","Bad count");return new Uint8Array(t,n).slice()}if(u.lookupMethod<=2&&1===u.compressionMethod){if(n+3!==t.byteLength||1!==u.colorMapCount)throw new r.Z("lepcc-decode-error","Bad count");const o=e.getUint8(n),s=e.getUint8(n+1),i=e.getUint8(n+2),a=new Uint8Array(3*u.count);for(let t=0;t<u.count;t++)a[3*t]=o,a[3*t+1]=s,a[3*t+2]=i;return a}throw new r.Z("lepcc-decode-error","Bad method "+u.lookupMethod+","+u.compressionMethod)}const y={sizeLo:0,sizeHi:4,count:8,scaleFactor:12,bitsPerPoint:14,reserved:15,byteCount:16};function g(t,e){return{sizeLo:t.getUint32(e+y.sizeLo,o),sizeHi:t.getUint32(e+y.sizeHi,o),count:t.getUint32(e+y.count,o),scaleFactor:t.getUint16(e+y.scaleFactor,o),bitsPerPoint:t.getUint8(e+y.bitsPerPoint),reserved:t.getUint8(e+y.reserved)}}function b(t){const e=new DataView(t,0);let n=0;const{identifier:o,version:a}=i(t,e,n);if(n+=s.byteCount,"Intensity "!==o)throw new r.Z("lepcc-decode-error","Bad identifier");if(a>1)throw new r.Z("lepcc-decode-error","Unknown version");const u=g(e,n);if(n+=y.byteCount,u.sizeHi*2**32+u.sizeLo!==t.byteLength)throw new r.Z("lepcc-decode-error","Bad size");const c=new Uint16Array(u.count);if(8===u.bitsPerPoint){if(u.count+n!==t.byteLength)throw new r.Z("lepcc-decode-error","Bad size");const e=new Uint8Array(t,n,u.count);for(let t=0;t<u.count;t++)c[t]=e[t]*u.scaleFactor}else if(16===u.bitsPerPoint){if(2*u.count+n!==t.byteLength)throw new r.Z("lepcc-decode-error","Bad size");const e=new Uint16Array(t,n,u.count);for(let t=0;t<u.count;t++)c[t]=e[t]*u.scaleFactor}else{const e=[];if(f(t,n,e)!==t.byteLength)throw new r.Z("lepcc-decode-error","Bad size");for(let t=0;t<u.count;t++)c[t]=e[t]*u.scaleFactor}return c}},6206:(t,e,n)=>{var r,o;n.d(e,{a9:()=>r}),n(22021),(o=r||(r={}))[o.Multiply=1]="Multiply",o[o.Ignore=2]="Ignore",o[o.Replace=3]="Replace",o[o.Tint=4]="Tint"},87951:(t,e,n)=>{n.d(e,{Ue:()=>l,gI:()=>f}),n(21787);var r=n(46521),o=n(51305),s=n(94961),i=n(17896),a=n(65617),u=(n(98766),n(88669)),c=(n(60437),n(62073),n(64822));function l(t=[0,0,0],e=[-1,-1,-1],n=(0,s.a)()){return{center:(0,a.g)(t),halfSize:(0,a.g)(e),quaternion:(0,s.b)(n)}}function f(t,e,n,r,s){if((0,o.c)(s.quaternion,t.quaternion),r===c.JY.Global){(0,o.a)(y,t.quaternion),(0,i.v)(p,t.center,y),(0,i.w)(d,p),(0,i.x)(h,d,t.halfSize),(0,i.u)(h,d,h);const r=(0,i.l)(h);(0,i.g)(h,d,t.halfSize);const a=(0,i.l)(h);if(r<n)(0,i.c)(s.center,t.center),(0,i.s)(p,n,n,n),(0,i.g)(s.halfSize,t.halfSize,p);else{const o=a>0?1+e/a:1,u=r>0?1+n/r:1,c=(u+o)/2,l=(u-o)/2;(0,i.i)(s.halfSize,d,l),(0,i.q)(s.halfSize,s.halfSize,t.halfSize,c),(0,i.i)(s.center,d,c),(0,i.q)(s.center,s.center,t.halfSize,l),(0,i.z)(p,p),(0,i.A)(s.center,s.center,p),(0,i.v)(s.center,s.center,s.quaternion)}}else{const r=(0,i.s)(p,0,0,1);(0,i.q)(s.center,t.center,r,(n+e)/2),(0,o.a)(y,t.quaternion),(0,i.v)(r,r,y),(0,i.w)(r,r),(0,i.q)(s.halfSize,t.halfSize,r,(n-e)/2)}return s}(0,s.a)(),(0,a.c)(),(0,a.c)(),(0,u.c)(),(0,r.a)(),(()=>{const t=new Int8Array(162);let e=0;const n=n=>{for(let r=0;r<n.length;r++)t[e+r]=n[r];e+=6};n([6,2,3,1,5,4]),n([0,2,3,1,5,4]),n([0,2,3,7,5,4]),n([0,1,3,2,6,4]),n([0,1,3,2,0,0]),n([0,1,5,7,3,2]),n([0,1,3,7,6,4]),n([0,1,3,7,6,2]),n([0,1,5,7,6,2]),n([0,1,5,4,6,2]),n([0,1,5,4,0,0]),n([0,1,3,7,5,4]),n([0,2,6,4,0,0]),n([0,0,0,0,0,0]),n([1,3,7,5,0,0]),n([2,3,7,6,4,0]),n([2,3,7,6,0,0]),n([2,3,1,5,7,6]),n([0,1,5,7,6,2]),n([0,1,5,7,6,4]),n([0,1,3,7,6,4]),n([4,5,7,6,2,0]),n([4,5,7,6,0,0]),n([4,5,1,3,7,6]),n([0,2,3,7,5,4]),n([6,2,3,7,5,4]),n([6,2,3,1,5,4])})();const p=(0,a.c)(),d=(0,a.c)(),h=(0,a.c)(),y=(0,s.a)()},51417:(t,e,n)=>{n.d(e,{a:()=>r});class r{constructor(t,e,n=!1,r=e){this.data=t,this.size=e,this.exclusive=n,this.stride=r}}},64822:(t,e,n)=>{var r;n.d(e,{JY:()=>r}),function(t){t[t.Global=1]="Global",t[t.Local=2]="Local"}(r||(r={}))},19833:(t,e,n)=>{n.d(e,{V5:()=>s,e7:()=>o});var r=n(35671);async function o(t,e=t.popupTemplate){if(null==e)return[];const n=await e.getRequiredFields(t.fieldsIndex),{lastEditInfoEnabled:o}=e,{objectIdField:s,typeIdField:i,globalIdField:a,relationships:u}=t;if(n.includes("*"))return["*"];const c=o?await(0,r.CH)(t):[],l=(0,r.Q0)(t.fieldsIndex,[...n,...c]);return i&&l.push(i),l&&s&&t.fieldsIndex?.has(s)&&!l.includes(s)&&l.push(s),l&&a&&t.fieldsIndex?.has(a)&&!l.includes(a)&&l.push(a),u&&u.forEach((e=>{const{keyField:n}=e;l&&n&&t.fieldsIndex?.has(n)&&!l.includes(n)&&l.push(n)})),l}function s(t,e){return t.popupTemplate?t.popupTemplate:null!=e&&e.defaultPopupTemplateEnabled&&null!=t.defaultPopupTemplate?t.defaultPopupTemplate:null}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[261,5732,2596],{5732:(e,t,i)=>{i.d(t,{c:()=>r,g:()=>o});var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},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})},16306:(e,t,i)=>{i.d(t,{aX:()=>S});var r=i(68773),o=i(20102),s=i(92604),a=i(38913),l=i(58901),n=i(73913),u=i(8744),p=i(40488),d=(i(66577),i(3172)),c=i(33955),m=i(11282),y=i(17452);async function b(e,t,i){const r="string"==typeof e?(0,y.mN)(e):e,o=t[0].spatialReference,s=(0,c.Ji)(t[0]),a={...i,query:{...r.query,f:"json",sr:(0,u.B9)(o),geometries:JSON.stringify((n=t,{geometryType:(0,c.Ji)(n[0]),geometries:n.map((e=>e.toJSON()))}))}},{data:l}=await(0,d.Z)(r.path+"/simplify",a);var n;return function(e,t,i){const r=(0,c.q9)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=i,t}))}(l.geometries,s,o)}const h=s.Z.getLogger("esri.geometry.support.normalizeUtils");function f(e){return"polygon"===e[0].type}function v(e){return"polyline"===e[0].type}function g(e,t,i){if(t){const t=function(e,t){if(!(e instanceof l.Z||e instanceof a.Z)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw h.error(e),new o.Z(e)}const i=(0,n.x3)(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],l=e[r+1][1],n=Math.sqrt((a-o)*(a-o)+(l-s)*(l-s)),u=(l-s)/n,p=(a-o)/n,d=n/t;if(d>1){for(let e=1;e<=d-1;e++){const r=e*t,a=p*r+o,l=u*r+s;i.push([a,l])}const e=(n+Math.floor(d-1)*t)/2,r=p*e+o,a=u*e+s;i.push([r,a])}i.push([a,l])}}return function(e){return"polygon"===e.type}(e)?new a.Z({rings:r,spatialReference:e.spatialReference}):new l.Z({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.Sx)(t,!0)}return i&&(e=(0,n.Sy)(e,i)),e}function T(e,t,i){if(Array.isArray(e)){const r=e[0];if(r>t){const i=(0,n.XZ)(r,t);e[0]=r+i*(-2*t)}else if(r<i){const t=(0,n.XZ)(r,i);e[0]=r+t*(-2*i)}}else{const r=e.x;if(r>t){const i=(0,n.XZ)(r,t);e=e.clone().offset(i*(-2*t),0)}else if(r<i){const t=(0,n.XZ)(r,i);e=e.clone().offset(t*(-2*i),0)}}return e}function w(e,t){let i=-1;for(let r=0;r<t.cutIndexes.length;r++){const o=t.cutIndexes[r],s=t.geometries[r],a=(0,n.x3)(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*(0,n.XZ)(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(f(e))for(const t of(0,n.x3)(s))e[o]=e[o].addRing(t);else if(v(e))for(const t of(0,n.x3)(s))e[o]=e[o].addPath(t)}else i=o,e[o]=s}return e}async function S(e,t,i){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&h.warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const o="string"==typeof t?t:t?.url??r.default.geometryServiceUrl;let s,y,f,v,C,N,_,O,A=0;const D=[],I=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,y=(0,u.C5)(s),f=s.isWebMercator,N=f?102100:4326,v=n.UZ[N].maxX,C=n.UZ[N].minX,_=n.UZ[N].plus180Line,O=n.UZ[N].minus180Line),y)if("mesh"===t.type)I.push(t);else if("point"===t.type)I.push(T(t.clone(),v,C));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>T(e,v,C))),I.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,y);I.push(e.rings?new a.Z(e):e)}else if(t.extent){const e=t.extent,i=(0,n.XZ)(e.xmin,C)*(2*v);let r=0===i?t.clone():(0,n.Sy)(t.clone(),i);e.offset(i,0),e.intersects(_)&&e.xmax!==v?(A=e.xmax>A?e.xmax:A,r=g(r,f),D.push(r),I.push("cut")):e.intersects(O)&&e.xmin!==C?(A=e.xmax*(2*v)>A?e.xmax*(2*v):A,r=g(r,f,360),D.push(r),I.push("cut")):I.push(r)}else I.push(t.clone());else I.push(t);else I.push(t);let x=(0,n.XZ)(A,v),F=-90;const j=x,B=new l.Z;for(;x>0;){const e=360*x-180;B.addPath([[e,F],[e,-1*F]]),F*=-1,x--}if(D.length>0&&j>0){const t=w(D,await async function(e,t,i,r){const o=(0,m.en)(e),s=t[0].spatialReference,a={...r,query:{...o.query,f:"json",sr:(0,u.B9)(s),target:JSON.stringify({geometryType:(0,c.Ji)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},l=await(0,d.Z)(o.path+"/cut",a),{cutIndexes:n,geometries:p=[]}=l.data;return{cutIndexes:n,geometries:p.map((e=>{const t=(0,c.im)(e);return t.spatialReference=s,t}))}}(o,D,B,i)),r=[],s=[];for(let i=0;i<I.length;i++){const o=I[i];if("cut"!==o)s.push(o);else{const o=t.shift(),a=e[i];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&o.rings.length>=a.rings.length?(r.push(o),s.push("simplify")):s.push(f?(0,p.$)(o):o)}}if(!r.length)return s;const a=await b(o,r,i),l=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?l.push(t):l.push(f?(0,p.$)(a.shift()):a.shift())}return l}const E=[];for(let e=0;e<I.length;e++){const t=I[e];if("cut"!==t)E.push(t);else{const e=D.shift();E.push(!0===f?(0,p.$)(e):e)}}return E}},73913:(e,t,i)=>{i.d(t,{Sy:()=>n,UZ:()=>a,XZ:()=>l,x3:()=>u});var r=i(58901),o=i(82971),s=i(33955);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.Z({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.Z.WebMercator}),minus180Line:new r.Z({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.Z.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.Z({paths:[[[180,-180],[180,180]]],spatialReference:o.Z.WGS84}),minus180Line:new r.Z({paths:[[[-180,-180],[-180,180]]],spatialReference:o.Z.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function n(e,t){const i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,s.oU)(e)?e.rings:e.paths}},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),l=i(51773),n=(i(16050),i(12501),i(28756),i(92271),i(72529),i(5499),i(84382),i(81571),i(91423)),u=i(92604),p=i(46791),d=i(20102),c=i(16453),m=i(78286),y=i(95330),b=i(17445),h=i(67900),f=i(17452),v=i(5600),g=i(75215),T=i(67676),w=(i(80442),i(71715)),S=i(52011),C=i(30556),N=i(65845),_=i(6570),O=i(73615),A=i(8744),D=i(87085),I=i(71612),x=i(38009),F=i(16859),j=i(72965),B=i(66677),E=i(9790),M=i(96674),P=i(77987);let L=class extends M.wq{constructor(e){super(e),this.break=new P.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new P.Z({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new P.Z({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new P.Z({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new P.Z({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new P.Z({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,r._)([(0,v.Cb)({types:E.LB})],L.prototype,"break",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],L.prototype,"first",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],L.prototype,"unlocated",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],L.prototype,"last",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],L.prototype,"middle",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],L.prototype,"waypoint",void 0),L=(0,r._)([(0,S.j)("esri.layers.support.RouteStopSymbols")],L);const R=L;var U=i(4095),J=i(20256);let Z=class extends M.wq{constructor(e){super(e),this.directionLines=new U.Z({color:[0,122,194],width:6}),this.directionPoints=new P.Z({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new P.Z({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new J.Z({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new U.Z({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new U.Z({width:8,color:[20,89,127]}),this.stops=new R}};(0,r._)([(0,v.Cb)({types:E.LB})],Z.prototype,"directionLines",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],Z.prototype,"directionPoints",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],Z.prototype,"pointBarriers",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],Z.prototype,"polygonBarriers",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],Z.prototype,"polylineBarriers",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],Z.prototype,"routeInfo",void 0),(0,r._)([(0,v.Cb)({type:R})],Z.prototype,"stops",void 0),Z=(0,r._)([(0,S.j)("esri.layers.support.RouteSymbols")],Z);const k=Z;var W=i(48522),V=i(15235),q=i(14661),G=i(3172),z=i(11282),H=i(36030),K=i(35454);const X=(0,K.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,K.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"}),Y=((0,K.w)()({esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds"}),(0,K.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",esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds",esriNAUKilometersPerHour:"kilometers-per-hour",esriNAUMilesPerHour:"miles-per-hour",esriNAUUnknown:"unknown"})),Q=(0,K.w)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),ee=(0,K.w)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),te=((0,K.w)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,K.w)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),ie=((0,K.w)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,K.w)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,K.w)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),re=(0,K.w)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),oe=(0,K.w)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),se=(0,K.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}),ae=(0,K.w)()({1:"right",2:"left"},{useNumericKeys:!0}),le=(0,K.w)()({0:"restriction",1:"scaled-cost",2:"added-cost"},{useNumericKeys:!0}),ne=(0,K.w)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),ue=(0,K.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}),pe=(0,K.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}),de=(0,K.w)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),ce=(0,K.w)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),me=(0,K.w)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),ye=(0,K.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}),be=(0,K.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}),he=(0,K.w)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),fe=(0,K.w)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),ve=(0,K.w)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),ge=(0,K.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 Te=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,v.Cb)({type:String})],Te.prototype,"dataType",void 0),(0,r._)([(0,H.J)(ye,{ignoreUnknown:!1})],Te.prototype,"name",void 0),(0,r._)([(0,v.Cb)({type:[String]})],Te.prototype,"parameterNames",void 0),(0,r._)([(0,v.Cb)({type:String})],Te.prototype,"restrictionUsageParameterName",void 0),(0,r._)([(0,H.J)(me,{ignoreUnknown:!1})],Te.prototype,"timeNeutralAttributeName",void 0),(0,r._)([(0,v.Cb)({type:String})],Te.prototype,"trafficSupport",void 0),(0,r._)([(0,H.J)(Y)],Te.prototype,"units",void 0),(0,r._)([(0,H.J)(ve)],Te.prototype,"usageType",void 0),Te=(0,r._)([(0,S.j)("esri.rest.support.NetworkAttribute")],Te);const we=Te;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,v.Cb)({type:Number})],Se.prototype,"buildTime",void 0),(0,r._)([(0,v.Cb)({type:String})],Se.prototype,"name",void 0),(0,r._)([(0,v.Cb)({type:[we]})],Se.prototype,"networkAttributes",void 0),(0,r._)([(0,v.Cb)()],Se.prototype,"networkSources",void 0),(0,r._)([(0,v.Cb)({type:String})],Se.prototype,"state",void 0),Se=(0,r._)([(0,S.j)("esri.rest.support.NetworkDataset")],Se);const Ce=Se;var Ne=i(2368);let _e=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}readId(e,t){return t.id??t.itemId??null}readRestrictionAttributes(e,t){const{restrictionAttributeNames:i}=t;return null==i?null:i.map((e=>be.fromJSON(e)))}writeRestrictionAttributes(e,t,i){null!=e&&(t[i]=e.map((e=>be.toJSON(e))))}};(0,r._)([(0,v.Cb)({type:[Object],json:{write:!0}})],_e.prototype,"attributeParameterValues",void 0),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],_e.prototype,"description",void 0),(0,r._)([(0,H.J)(ce,{ignoreUnknown:!1})],_e.prototype,"distanceAttributeName",void 0),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],_e.prototype,"id",void 0),(0,r._)([(0,w.r)("id",["id","itemId"])],_e.prototype,"readId",null),(0,r._)([(0,H.J)(ye,{ignoreUnknown:!1})],_e.prototype,"impedanceAttributeName",void 0),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],_e.prototype,"name",void 0),(0,r._)([(0,v.Cb)({type:[String],json:{write:!0}})],_e.prototype,"restrictionAttributeNames",void 0),(0,r._)([(0,w.r)("restrictionAttributeNames")],_e.prototype,"readRestrictionAttributes",null),(0,r._)([(0,C.c)("restrictionAttributeNames")],_e.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,v.Cb)({type:Number,json:{write:{allowNull:!0}}})],_e.prototype,"simplificationTolerance",void 0),(0,r._)([(0,H.J)(X)],_e.prototype,"simplificationToleranceUnits",void 0),(0,r._)([(0,H.J)(me,{ignoreUnknown:!1})],_e.prototype,"timeAttributeName",void 0),(0,r._)([(0,H.J)(ie)],_e.prototype,"type",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],_e.prototype,"useHierarchy",void 0),(0,r._)([(0,H.J)(te)],_e.prototype,"uturnAtJunctions",void 0),_e=(0,r._)([(0,S.j)("esri.rest.support.TravelMode")],_e);const Oe=_e;let Ae=class extends M.wq{constructor(e){super(e),this.accumulateAttributeNames=null,this.attributeParameterValues=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 null==e?null:e.map((e=>ye.fromJSON(e)))}writeAccumulateAttributes(e,t,i){null!=e&&e.length&&(t[i]=e.map((e=>ye.toJSON(e))))}readDefaultTravelMode(e,t){const i=t.supportedTravelModes?.find((({id:e})=>e===t.defaultTravelMode))??t.supportedTravelModes?.find((({itemId:e})=>e===t.defaultTravelMode));return i?Oe.fromJSON(i):null}};(0,r._)([(0,v.Cb)()],Ae.prototype,"accumulateAttributeNames",void 0),(0,r._)([(0,w.r)("accumulateAttributeNames")],Ae.prototype,"readAccumulateAttributes",null),(0,r._)([(0,C.c)("accumulateAttributeNames")],Ae.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,v.Cb)()],Ae.prototype,"attributeParameterValues",void 0),(0,r._)([(0,v.Cb)()],Ae.prototype,"currentVersion",void 0),(0,r._)([(0,v.Cb)()],Ae.prototype,"defaultTravelMode",void 0),(0,r._)([(0,w.r)("defaultTravelMode",["defaultTravelMode","supportedTravelModes"])],Ae.prototype,"readDefaultTravelMode",null),(0,r._)([(0,v.Cb)()],Ae.prototype,"directionsLanguage",void 0),(0,r._)([(0,H.J)($)],Ae.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,v.Cb)()],Ae.prototype,"directionsSupportedLanguages",void 0),(0,r._)([(0,H.J)(me,{ignoreUnknown:!1})],Ae.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,v.Cb)()],Ae.prototype,"hasZ",void 0),(0,r._)([(0,H.J)(ye,{ignoreUnknown:!1})],Ae.prototype,"impedance",void 0),(0,r._)([(0,v.Cb)({type:Ce})],Ae.prototype,"networkDataset",void 0),(0,r._)([(0,v.Cb)({type:[Oe]})],Ae.prototype,"supportedTravelModes",void 0),Ae=(0,r._)([(0,S.j)("esri.rest.support.NetworkServiceDescription")],Ae);const De=Ae,Ie=u.Z.getLogger("esri.rest.networkService");function xe(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 d.Z("network-service:missing-url","Url to Network service is missing");const r=(0,z.lA)({f:"json",token:t},i),{data:o}=await(0,G.Z)(e,r),s=o.currentVersion>=10.4?async function(e,t,i){try{const r=(0,z.lA)({f:"json",token:t},i),o=(0,f.Qj)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:a}}=await(0,G.Z)(o,r);return{supportedTravelModes:s,defaultTravelMode:a}}catch(e){throw new d.Z("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:e})}}(e,t,i):async function(e,t){const i=(0,z.lA)({f:"json"},t),{data:r}=await(0,G.Z)(e.replace(/\/rest\/.*$/i,"/info"),i);if(!r||!r.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:o}=r,s=(0,f.Qj)(o)+"/sharing/rest/portals/self",{data:a}=await(0,G.Z)(s,i),l=(0,m.hS)("helperServices.routingUtilities.url",a);if(!l)return{supportedTravelModes:[],defaultTravelMode:null};const n=(0,z.en)(o),u=/\/solve$/i.test(n.path)?"Route":/\/solveclosestfacility$/i.test(n.path)?"ClosestFacility":"ServiceAreas",p=(0,z.lA)({f:"json",serviceName:u},t),d=(0,f.Qj)(l)+"/GetTravelModes/execute",c=await(0,G.Z)(d,p),y=[];let b=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);y.push(t)}}else"defaultTravelMode"===t.paramName&&(b=t.value)}return{supportedTravelModes:y,defaultTravelMode:b}}(e,i),{defaultTravelMode:a,supportedTravelModes:l}=await s;return o.defaultTravelMode=a,o.supportedTravelModes=l,De.fromJSON(o)}var je=i(67723),Be=i(16306);function Ee(e,t){if(null==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[ye.fromJSON(r)]=e[o]}return i}function Me(e,t,i){if(null!=e){t.attributes||(t.attributes={});for(const r in e){const o=ye.toJSON(r);t.attributes[`${i}${o}`]=e[r]}}}function Pe(e){const t={};for(const i of Object.keys(e)){const r=i;t[ye.fromJSON(r)]=e[i]}return t}function Le(e){const t={};for(const i of Object.keys(e)){const r=i;t[ye.toJSON(r)]=e[i]}return t}function Re(e,t){return null==e||null==t?null:Math.round((e-t)/6e4)}function Ue(e){const t=e.toJSON(),i=t;return i.accumulateAttributeNames&&=t.accumulateAttributeNames?.join(),i.attributeParameterValues&&=JSON.stringify(t.attributeParameterValues),i.barriers&&=JSON.stringify(t.barriers),i.outSR&&=t.outSR?.wkid,i.overrides&&=JSON.stringify(t.overrides),i.polygonBarriers&&=JSON.stringify(t.polygonBarriers),i.polylineBarriers&&=JSON.stringify(t.polylineBarriers),i.restrictionAttributeNames&&=t.restrictionAttributeNames?.join(),i.stops&&=JSON.stringify(t.stops),i.travelMode&&=JSON.stringify(t.travelMode),i}var Je=i(74889);const Ze=new K.X({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let ke=class extends M.wq{constructor(e){super(e),this.description=null,this.type=null}};(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],ke.prototype,"description",void 0),(0,r._)([(0,v.Cb)({type:String,json:{read:Ze.read,write:Ze.write}})],ke.prototype,"type",void 0),ke=(0,r._)([(0,S.j)("esri.rest.support.GPMessage")],ke);const We=ke,Ve=new K.X({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let qe=class extends We{constructor(e){super(e),this.type=null}};(0,r._)([(0,v.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,v.Cb)({json:{read:{source:"string"}}})],ze.prototype,"text",void 0),(0,r._)([(0,H.J)(ge,{name:"stringType"})],ze.prototype,"type",void 0),ze=(0,r._)([(0,S.j)("esri.rest.support.DirectionsString")],ze);const He=ze;var Ke=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 Re(t.ETA,t.arriveTimeUTC)}readGeometry(e,t){return Ke.Z.fromJSON(t.point)}};(0,r._)([(0,v.Cb)({type:Date,json:{read:{source:"arriveTimeUTC"}}})],Xe.prototype,"arriveTime",void 0),(0,r._)([(0,v.Cb)()],Xe.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,w.r)("arriveTimeOffset",["arriveTimeUTC","ETA"])],Xe.prototype,"readArriveTimeOffset",null),(0,r._)([(0,v.Cb)({type:Ke.Z})],Xe.prototype,"geometry",void 0),(0,r._)([(0,w.r)("geometry",["point"])],Xe.prototype,"readGeometry",null),(0,r._)([(0,v.Cb)({type:[He]})],Xe.prototype,"strings",void 0),Xe=(0,r._)([(0,S.j)("esri.rest.support.DirectionsEvent")],Xe);const $e=Xe;var Ye=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(null==e||""===e)return null;let t=0,i=0,r=0,o=0;const s=[];let a,l,n,u,p,d,c,m,y=0,b=0,h=0;if(p=e.match(/((\+|\-)[^\+\-\|]+|\|)/g),p||(p=[]),0===parseInt(p[y],32)){y=2;const e=parseInt(p[y],32);y++,d=parseInt(p[y],32),y++,1&e&&(b=p.indexOf("|")+1,c=parseInt(p[b],32),b++),2&e&&(h=p.indexOf("|",b)+1,m=parseInt(p[h],32),h++)}else d=parseInt(p[y],32),y++;for(;y<p.length&&"|"!==p[y];){a=parseInt(p[y],32)+t,y++,t=a,l=parseInt(p[y],32)+i,y++,i=l;const e=[a/d,l/d];b&&(u=parseInt(p[b],32)+r,b++,r=u,e.push(u/c)),h&&(n=parseInt(p[h],32)+o,h++,o=n,e.push(n/m)),s.push(e)}return{paths:[s],hasZ:b>0,hasM:h>0}}(t.compressedGeometry);return null!=i?Ye.Z.fromJSON(i):null}};(0,r._)([(0,v.Cb)({type:[$e]})],Qe.prototype,"events",void 0),(0,r._)([(0,w.r)("geometry",["compressedGeometry"])],Qe.prototype,"readGeometry",null),(0,r._)([(0,v.Cb)({type:[He]})],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 Je.Z{constructor(e){super(e),this.extent=null,this.features=[],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(null!=t.geometry&&(t.geometry.spatialReference=r),null!=t.events)for(const e of t.events)null!=e.geometry&&(e.geometry.spatialReference=r);return t}))}get mergedGeometry(){return this.features?function(e,t){if(0===e.length)return new Ye.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 Ye.Z({hasM:o,hasZ:s,paths:[r],spatialReference:t})}(this.features.map((({geometry:e})=>e)),this.extent.spatialReference):null}get strings(){return this.features.map((({strings:e})=>e)).flat().filter(T.pC)}};(0,r._)([(0,v.Cb)({type:_.Z,json:{read:{source:"summary.envelope"}}})],it.prototype,"extent",void 0),(0,r._)([(0,v.Cb)({nonNullable:!0})],it.prototype,"features",void 0),(0,r._)([(0,w.r)("features")],it.prototype,"readFeatures",null),(0,r._)([(0,v.Cb)()],it.prototype,"geometryType",void 0),(0,r._)([(0,v.Cb)({readOnly:!0})],it.prototype,"mergedGeometry",null),(0,r._)([(0,v.Cb)()],it.prototype,"routeId",void 0),(0,r._)([(0,v.Cb)()],it.prototype,"routeName",void 0),(0,r._)([(0,v.Cb)({value:null,readOnly:!0})],it.prototype,"strings",null),(0,r._)([(0,v.Cb)({json:{read:{source:"summary.totalDriveTime"}}})],it.prototype,"totalDriveTime",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"summary.totalLength"}}})],it.prototype,"totalLength",void 0),(0,r._)([(0,v.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,v.Cb)({type:Je.Z,json:{write:!0}})],ot.prototype,"directionLines",void 0),(0,r._)([(0,v.Cb)({type:Je.Z,json:{write:!0}})],ot.prototype,"directionPoints",void 0),(0,r._)([(0,v.Cb)({type:rt,json:{write:!0}})],ot.prototype,"directions",void 0),(0,r._)([(0,v.Cb)({type:a.Z,json:{write:!0}})],ot.prototype,"route",void 0),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],ot.prototype,"routeName",void 0),(0,r._)([(0,v.Cb)({type:[a.Z],json:{write:!0}})],ot.prototype,"stops",void 0),(0,r._)([(0,v.Cb)({type:Je.Z,json:{write:!0}})],ot.prototype,"traversedEdges",void 0),(0,r._)([(0,v.Cb)({type:Je.Z,json:{write:!0}})],ot.prototype,"traversedJunctions",void 0),(0,r._)([(0,v.Cb)({type:Je.Z,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?Je.Z.fromJSON(e).features.filter(T.pC):[]}let lt=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,v.Cb)({type:[Ge]})],lt.prototype,"messages",void 0),(0,r._)([(0,v.Cb)({type:[a.Z]})],lt.prototype,"pointBarriers",void 0),(0,r._)([(0,w.r)("pointBarriers",["barriers"])],lt.prototype,"readPointBarriers",null),(0,r._)([(0,v.Cb)({type:[a.Z]})],lt.prototype,"polylineBarriers",void 0),(0,r._)([(0,w.r)("polylineBarriers")],lt.prototype,"readPolylineBarriers",null),(0,r._)([(0,v.Cb)({type:[a.Z]})],lt.prototype,"polygonBarriers",void 0),(0,r._)([(0,w.r)("polygonBarriers")],lt.prototype,"readPolygonBarriers",null),(0,r._)([(0,v.Cb)({type:[st]})],lt.prototype,"routeResults",void 0),lt=(0,r._)([(0,S.j)("esri.rest.support.RouteSolveResult")],lt);const nt=lt;function ut(e){return e instanceof Je.Z}var pt;let dt=pt=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 pt({directionLineType:pe.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:this.objectId,DirectionLineType:null!=this.directionLineType?pe.toJSON(this.directionLineType):null,DirectionPointID:this.directionPointId,Meters:this.distance,Minutes:this.duration};return null!=this.fromLevel&&(e.FromLevel=this.fromLevel),null!=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,v.Cb)({type:pe.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:pe.read}}})],dt.prototype,"directionLineType",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.DirectionPointID"}}})],dt.prototype,"directionPointId",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.Meters"}}})],dt.prototype,"distance",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.Minutes"}}})],dt.prototype,"duration",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.FromLevel"}}})],dt.prototype,"fromLevel",void 0),(0,r._)([(0,v.Cb)({type:Ye.Z})],dt.prototype,"geometry",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.ObjectID"}}})],dt.prototype,"objectId",void 0),(0,r._)([(0,v.Cb)({type:l.Z})],dt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],dt.prototype,"symbol",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.ToLevel"}}})],dt.prototype,"toLevel",void 0),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1}})],dt.prototype,"type",void 0),dt=pt=(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 null!=t.attributes.ArrivalTime?new Date(t.attributes.ArrivalTime):null}static fromGraphic(e){return new mt({alternateName:e.attributes.AlternateName??null,arrivalTime:null!=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:this.objectId,DirectionPointType:null!=this.directionPointType?ue.toJSON(this.directionPointType):null,Sequence:this.sequence,StopID:this.stopId};return null!=this.alternateName&&(e.AlternateName=this.alternateName),null!=this.arrivalTime&&(e.ArrivalTime=this.arrivalTime.getTime()),null!=this.arrivalTimeOffset&&(e.ArrivalUTCOffset=this.arrivalTimeOffset),null!=this.azimuth&&(e.Azimuth=this.azimuth),null!=this.branchName&&(e.BranchName=this.branchName),null!=this.displayText&&(e.DisplayText=this.displayText),null!=this.exitName&&(e.ExitName=this.exitName),null!=this.intersectingName&&(e.IntersectingName=this.intersectingName),null!=this.level&&(e.Level=this.level),null!=this.name&&(e.Name=this.name),null!=this.shortVoiceInstruction&&(e.ShortVoiceInstruction=this.shortVoiceInstruction),null!=this.towardName&&(e.TowardName=this.towardName),null!=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,v.Cb)()],yt.prototype,"alternateName",void 0),(0,r._)([(0,v.Cb)()],yt.prototype,"arrivalTime",void 0),(0,r._)([(0,w.r)("arrivalTime",["attributes.ArrivalTime"])],yt.prototype,"readArrivalTime",null),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],yt.prototype,"arrivalTimeOffset",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.Azimuth"}}})],yt.prototype,"azimuth",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.BranchName"}}})],yt.prototype,"branchName",void 0),(0,r._)([(0,v.Cb)({type:ue.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:ue.read}}})],yt.prototype,"directionPointType",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.DisplayText"}}})],yt.prototype,"displayText",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.ExitName"}}})],yt.prototype,"exitName",void 0),(0,r._)([(0,v.Cb)({type:Ke.Z})],yt.prototype,"geometry",void 0),(0,r._)([(0,v.Cb)()],yt.prototype,"intersectingName",void 0),(0,r._)([(0,v.Cb)()],yt.prototype,"level",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.Name"}}})],yt.prototype,"name",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.ObjectID"}}})],yt.prototype,"objectId",void 0),(0,r._)([(0,v.Cb)({type:l.Z})],yt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.Sequence"}}})],yt.prototype,"sequence",void 0),(0,r._)([(0,v.Cb)()],yt.prototype,"shortVoiceInstruction",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.StopID"}}})],yt.prototype,"stopId",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],yt.prototype,"symbol",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.TowardName"}}})],yt.prototype,"towardName",void 0),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1}})],yt.prototype,"type",void 0),(0,r._)([(0,v.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){Me(e,t,"Attr_")}static fromGraphic(e){return new ht({addedCost:e.attributes.AddedCost??null,barrierType:null!=e.attributes.BarrierType?le.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Pe(JSON.parse(e.attributes.Costs)):null,curbApproach:null!=e.attributes.CurbApproach?re.fromJSON(e.attributes.CurbApproach):null,fullEdge:null!=e.attributes.FullEdge?ne.fromJSON(e.attributes.FullEdge):null,geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,status:null!=e.attributes.Status?se.fromJSON(e.attributes.Status):null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,AddedCost:this.addedCost,BarrierType:null!=this.barrierType?le.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(Le(this.costs)):null,CurbApproach:null!=this.curbApproach?re.toJSON(this.curbApproach):null,FullEdge:null!=this.fullEdge?ne.toJSON(this.fullEdge):null,Name:this.name,Status:null!=this.status?se.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,v.Cb)()],ft.prototype,"addedCost",void 0),(0,r._)([(0,v.Cb)({type:le.apiValues,json:{name:"attributes.BarrierType",read:{reader:le.read},write:{writer:le.write}}})],ft.prototype,"barrierType",void 0),(0,r._)([(0,v.Cb)()],ft.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],ft.prototype,"readCosts",null),(0,r._)([(0,C.c)("costs")],ft.prototype,"writeCosts",null),(0,r._)([(0,v.Cb)({constructOnly:!0,type:re.apiValues,json:{read:{source:"attributes.CurbApproach",reader:re.read}}})],ft.prototype,"curbApproach",void 0),(0,r._)([(0,v.Cb)({type:ne.apiValues,json:{name:"attributes.FullEdge",read:{reader:ne.read},write:{writer:ne.write}}})],ft.prototype,"fullEdge",void 0),(0,r._)([(0,v.Cb)({type:Ke.Z,json:{write:!0}})],ft.prototype,"geometry",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.Name"}})],ft.prototype,"name",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.ObjectID"}})],ft.prototype,"objectId",void 0),(0,r._)([(0,v.Cb)({type:l.Z})],ft.prototype,"popupTemplate",void 0),(0,r._)([(0,v.Cb)({type:ae.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:ae.read}}})],ft.prototype,"sideOfEdge",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.SourceID"}}})],ft.prototype,"sourceId",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.SourceOID"}}})],ft.prototype,"sourceOid",void 0),(0,r._)([(0,v.Cb)({type:se.apiValues,json:{read:{source:"attributes.Status",reader:se.read}}})],ft.prototype,"status",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],ft.prototype,"symbol",void 0),(0,r._)([(0,v.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 wt=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){Me(e,t,"Attr_")}static fromGraphic(e){return new gt({barrierType:null!=e.attributes.BarrierType?le.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Pe(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:this.objectId,BarrierType:null!=this.barrierType?le.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(Le(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})}};wt.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}],wt.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,v.Cb)({type:le.apiValues,json:{name:"attributes.BarrierType",read:{reader:le.read},write:{writer:le.write}}})],wt.prototype,"barrierType",void 0),(0,r._)([(0,v.Cb)()],wt.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],wt.prototype,"readCosts",null),(0,r._)([(0,C.c)("costs")],wt.prototype,"writeCosts",null),(0,r._)([(0,v.Cb)({type:Tt.Z,json:{write:!0}})],wt.prototype,"geometry",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.Name"}})],wt.prototype,"name",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.ObjectID"}})],wt.prototype,"objectId",void 0),(0,r._)([(0,v.Cb)({type:l.Z})],wt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.Cb)()],wt.prototype,"scaleFactor",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],wt.prototype,"symbol",void 0),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1}})],wt.prototype,"type",void 0),wt=gt=(0,r._)([(0,S.j)("esri.rest.support.PolygonBarrier")],wt);const St=wt;var Ct;let Nt=Ct=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 Ct({barrierType:null!=e.attributes.BarrierType?le.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?Pe(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:this.objectId,BarrierType:null!=this.barrierType?le.toJSON(this.barrierType):null,Costs:null!=this.costs?JSON.stringify(Le(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};Nt.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}],Nt.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,v.Cb)({type:le.apiValues,json:{read:{source:"attributes.BarrierType",reader:le.read}}})],Nt.prototype,"barrierType",void 0),(0,r._)([(0,v.Cb)()],Nt.prototype,"costs",void 0),(0,r._)([(0,w.r)("costs",["attributes"])],Nt.prototype,"readCosts",null),(0,r._)([(0,v.Cb)({type:Ye.Z,json:{write:!0}})],Nt.prototype,"geometry",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.Name"}})],Nt.prototype,"name",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.ObjectID"}})],Nt.prototype,"objectId",void 0),(0,r._)([(0,v.Cb)({type:l.Z})],Nt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.Cb)()],Nt.prototype,"scaleFactor",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],Nt.prototype,"symbol",void 0),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1}})],Nt.prototype,"type",void 0),Nt=Ct=(0,r._)([(0,S.j)("esri.rest.support.PolylineBarrier")],Nt);const _t=Nt;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 null==e?null:e.map((e=>ye.fromJSON(e)))}writeAccumulateAttributes(e,t,i){null!=e&&e.length&&(t[i]=e.map((e=>ye.toJSON(e))))}};(0,r._)([(0,v.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.c)("accumulateAttributes")],Ot.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],Ot.prototype,"directionsLanguage",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"findBestSequence",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"preserveFirstStop",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"preserveLastStop",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Ot.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,v.Cb)({type:Oe,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 null!=t.attributes.EndTimeUTC?new Date(t.attributes.EndTimeUTC):null}readEndTimeOffset(e,t){return Re(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return null!=t.attributes.StartTimeUTC?new Date(t.attributes.StartTimeUTC):null}readStartTimeOffset(e,t){return Re(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:null!=e.attributes.AnalysisSettings?At.fromJSON(JSON.parse(e.attributes.AnalysisSettings)):null,endTime:null!=e.attributes.EndTime?new Date(e.attributes.EndTime):null,endTimeOffset:e.attributes.EndUTCOffset??null,geometry:e.geometry,messages:null!=e.attributes.Messages?JSON.parse(e.attributes.Messages):null,name:e.attributes.RouteName,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,startTime:null!=e.attributes.StartTime?new Date(e.attributes.StartTime):null,startTimeOffset:e.attributes.StartUTCOffset??null,symbol:e.symbol,totalCosts:null!=e.attributes.TotalCosts?Pe(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:this.objectId,AnalysisSettings:null!=this.analysisSettings?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:null!=this.endTime?this.endTime.getTime():null,EndUTCOffset:this.endTimeOffset,Messages:null!=this.messages?JSON.stringify(this.messages):null,RouteName:this.name,StartTime:null!=this.startTime?this.startTime.getTime():null,StartUTCOffset:this.startTimeOffset,TotalCosts:null!=this.totalCosts?JSON.stringify(Le(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:this.version};return new a.Z({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate: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,v.Cb)()],It.prototype,"analysisSettings",void 0),(0,r._)([(0,v.Cb)()],It.prototype,"endTime",void 0),(0,r._)([(0,w.r)("endTime",["attributes.EndTimeUTC"])],It.prototype,"readEndTime",null),(0,r._)([(0,v.Cb)()],It.prototype,"endTimeOffset",void 0),(0,r._)([(0,w.r)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],It.prototype,"readEndTimeOffset",null),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.FirstStopID"}}})],It.prototype,"firstStopId",void 0),(0,r._)([(0,v.Cb)({type:Ye.Z})],It.prototype,"geometry",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.LastStopID"}}})],It.prototype,"lastStopId",void 0),(0,r._)([(0,v.Cb)()],It.prototype,"messages",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.Name"}}})],It.prototype,"name",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.ObjectID"}}})],It.prototype,"objectId",void 0),(0,r._)([(0,v.Cb)({type:l.Z})],It.prototype,"popupTemplate",void 0),(0,r._)([(0,v.Cb)()],It.prototype,"startTime",void 0),(0,r._)([(0,w.r)("startTime",["attributes.StartTimeUTC"])],It.prototype,"readStartTime",null),(0,r._)([(0,v.Cb)()],It.prototype,"startTimeOffset",void 0),(0,r._)([(0,w.r)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],It.prototype,"readStartTimeOffset",null),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.StopCount"}}})],It.prototype,"stopCount",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],It.prototype,"symbol",void 0),(0,r._)([(0,v.Cb)()],It.prototype,"totalCosts",void 0),(0,r._)([(0,w.r)("totalCosts",["attributes"])],It.prototype,"readTotalCosts",null),(0,r._)([(0,v.Cb)()],It.prototype,"totalDistance",void 0),(0,r._)([(0,v.Cb)()],It.prototype,"totalDuration",void 0),(0,r._)([(0,v.Cb)()],It.prototype,"totalLateDuration",void 0),(0,r._)([(0,v.Cb)()],It.prototype,"totalViolations",void 0),(0,r._)([(0,w.r)("totalViolations",["attributes"])],It.prototype,"readTotalViolations",null),(0,r._)([(0,v.Cb)()],It.prototype,"totalWait",void 0),(0,r._)([(0,w.r)("totalWait",["attributes"])],It.prototype,"readTotalWait",null),(0,r._)([(0,v.Cb)()],It.prototype,"totalWaitDuration",void 0),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1}})],It.prototype,"type",void 0),(0,r._)([(0,v.Cb)()],It.prototype,"version",void 0),It=Dt=(0,r._)([(0,S.j)("esri.rest.support.RouteInfo")],It);const xt=It,Ft={type:String,json:{read:{source:"token"},write:{target:"token"}}};var jt=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,v.Cb)({type:Boolean,json:{write:!0}})],Bt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,v.Cb)({types:s.qM,json:{read:jt.im,write:!0}})],Bt.prototype,"geometry",void 0),(0,r._)([(0,H.J)(fe)],Bt.prototype,"geometryType",void 0),(0,r._)([(0,v.Cb)({type:String,json:{name:"layerName",write:!0}})],Bt.prototype,"name",void 0),(0,r._)([(0,H.J)(he,{name:"spatialRel"})],Bt.prototype,"spatialRelationship",void 0),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],Bt.prototype,"type",void 0),(0,r._)([(0,v.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 Mt;let Pt=Mt=class extends Je.Z{constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new Mt({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Pt.prototype,"doNotLocateOnRestrictedElements",void 0),Pt=Mt=(0,r._)([(0,S.j)("esri.rest.support.NetworkFeatureSet")],Pt);const Lt=Pt;let Rt=class extends((0,Ne.J)(M.wq)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Rt.prototype,"doNotLocateOnRestrictedElements",void 0),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],Rt.prototype,"url",void 0),Rt=(0,r._)([(0,S.j)("esri.rest.support.NetworkUrl")],Rt);const Ut=Rt;var Jt;let Zt=Jt=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,g.TJ)(Jt,e)}readAccumulateAttributes(e){return null==e?null:e.map((e=>ye.fromJSON(e)))}writeAccumulateAttributes(e,t,i){null!=e&&e.length&&(t[i]=e.map((e=>ye.toJSON(e))))}writePointBarriers(e,t,i){Wt(e,t,i)}writePolygonBarrier(e,t,i){Wt(e,t,i)}writePolylineBarrier(e,t,i){Wt(e,t,i)}readRestrictionAttributes(e){return null==e?null:e.map((e=>be.fromJSON(e)))}writeRestrictionAttributes(e,t,i){null!=e&&e.length&&(t[i]=e.map((e=>be.toJSON(e))))}readStartTime(e,t){const{startTime:i}=t;return null==i?null:"now"===i?"now":new Date(i)}writeStartTime(e,t){null!=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)?Ut.fromJSON(e):function(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}(e)?Lt.fromJSON(e):function(e){return e&&"features"in e}(e)?Je.Z.fromJSON(e):null}(t.stops)}writeStops(e,t,i){Wt(e,t,i)}};(0,r._)([(0,v.Cb)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Zt.prototype,"accumulateAttributes",void 0),(0,r._)([(0,w.r)("accumulateAttributes")],Zt.prototype,"readAccumulateAttributes",null),(0,r._)([(0,C.c)("accumulateAttributes")],Zt.prototype,"writeAccumulateAttributes",null),(0,r._)([(0,v.Cb)(Ft)],Zt.prototype,"apiKey",void 0),(0,r._)([(0,v.Cb)({json:{write:!0}})],Zt.prototype,"attributeParameterValues",void 0),(0,r._)([(0,v.Cb)({type:String,json:{write:!0}})],Zt.prototype,"directionsLanguage",void 0),(0,r._)([(0,H.J)($)],Zt.prototype,"directionsLengthUnits",void 0),(0,r._)([(0,H.J)(Q)],Zt.prototype,"directionsOutputType",void 0),(0,r._)([(0,H.J)(de)],Zt.prototype,"directionsStyleName",void 0),(0,r._)([(0,H.J)(me,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],Zt.prototype,"directionsTimeAttribute",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"findBestSequence",void 0),(0,r._)([(0,v.Cb)({type:Number,json:{write:!0}})],Zt.prototype,"geometryPrecision",void 0),(0,r._)([(0,v.Cb)({type:Number,json:{write:!0}})],Zt.prototype,"geometryPrecisionM",void 0),(0,r._)([(0,v.Cb)({type:Number,json:{write:!0}})],Zt.prototype,"geometryPrecisionZ",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"ignoreInvalidLocations",void 0),(0,r._)([(0,H.J)(ye,{name:"impedanceAttributeName",ignoreUnknown:!1})],Zt.prototype,"impedanceAttribute",void 0),(0,r._)([(0,v.Cb)({type:Number,json:{write:!0}})],Zt.prototype,"outputGeometryPrecision",void 0),(0,r._)([(0,H.J)(X)],Zt.prototype,"outputGeometryPrecisionUnits",void 0),(0,r._)([(0,H.J)(ee)],Zt.prototype,"outputLines",void 0),(0,r._)([(0,v.Cb)({type:tt.Z,json:{name:"outSR",write:!0}})],Zt.prototype,"outSpatialReference",void 0),(0,r._)([(0,v.Cb)({json:{write:!0}})],Zt.prototype,"overrides",void 0),(0,r._)([(0,v.Cb)({json:{name:"barriers",write:!0}})],Zt.prototype,"pointBarriers",void 0),(0,r._)([(0,C.c)("pointBarriers")],Zt.prototype,"writePointBarriers",null),(0,r._)([(0,v.Cb)({json:{write:!0}})],Zt.prototype,"polygonBarriers",void 0),(0,r._)([(0,C.c)("polygonBarriers")],Zt.prototype,"writePolygonBarrier",null),(0,r._)([(0,v.Cb)({json:{write:!0}})],Zt.prototype,"polylineBarriers",void 0),(0,r._)([(0,C.c)("polylineBarriers")],Zt.prototype,"writePolylineBarrier",null),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"preserveFirstStop",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"preserveLastStop",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"preserveObjectID",void 0),(0,r._)([(0,v.Cb)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],Zt.prototype,"restrictionAttributes",void 0),(0,r._)([(0,w.r)("restrictionAttributes")],Zt.prototype,"readRestrictionAttributes",null),(0,r._)([(0,C.c)("restrictionAttributes")],Zt.prototype,"writeRestrictionAttributes",null),(0,r._)([(0,H.J)(te)],Zt.prototype,"restrictUTurns",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnBarriers",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnDirections",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnPolygonBarriers",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnPolylineBarriers",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnRoutes",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnStops",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnTraversedEdges",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnTraversedJunctions",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnTraversedTurns",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnZ",void 0),(0,r._)([(0,v.Cb)({type:Date,json:{type:Number,write:!0}})],Zt.prototype,"startTime",void 0),(0,r._)([(0,w.r)("startTime")],Zt.prototype,"readStartTime",null),(0,r._)([(0,C.c)("startTime")],Zt.prototype,"writeStartTime",null),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"startTimeIsUTC",void 0),(0,r._)([(0,v.Cb)({json:{write:!0}})],Zt.prototype,"stops",void 0),(0,r._)([(0,w.r)("stops")],Zt.prototype,"readStops",null),(0,r._)([(0,C.c)("stops")],Zt.prototype,"writeStops",null),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"timeWindowsAreUTC",void 0),(0,r._)([(0,v.Cb)({type:Oe,json:{write:!0}})],Zt.prototype,"travelMode",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"useHierarchy",void 0),(0,r._)([(0,v.Cb)({type:Boolean,json:{write:!0}})],Zt.prototype,"useTimeWindows",void 0),Zt=Jt=(0,r._)([(0,S.j)("esri.rest.support.RouteParameters")],Zt);const kt=Zt;function Wt(e,t,i){null!=e&&(t[i]=p.Z.isCollection(e)?{features:e.toArray().map((e=>e.toJSON()))}:e.toJSON())}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 Re(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return Ee(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return Re(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return Ee(t.attributes,"Attr_")}writeServiceCosts(e,t){Me(e,t,"Attr_")}writeTimeWindowEnd(e,t){null!=e&&(t.attributes||(t.attributes={}),t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){null!=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:null!=e.attributes.ArrivalCurbApproach?re.fromJSON(e.attributes.ArrivalCurbApproach):null,arriveTime:null!=e.attributes.ArrivalTime?new Date(e.attributes.ArrivalTime):null,arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:null!=e.attributes.CumulativeCosts?Pe(JSON.parse(e.attributes.CumulativeCosts)):null,cumulativeDistance:e.attributes.CumulativeMeters??null,cumulativeDuration:e.attributes.CumulativeMinutes??null,curbApproach:null!=e.attributes.CurbApproach?re.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:null!=e.attributes.DepartureCurbApproach?re.fromJSON(e.attributes.DepartureCurbApproach):null,departTime:null!=e.attributes.DepartureTime?new Date(e.attributes.DepartureTime):null,departTimeOffset:e.attributes.DepartureUTCOffset??null,geometry:e.geometry,lateDuration:e.attributes.LateMinutes??null,locationType:null!=e.attributes.LocationType?oe.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:null!=e.attributes.ServiceCosts?Pe(JSON.parse(e.attributes.ServiceCosts)):null,serviceDistance:e.attributes.ServiceMeters??null,serviceDuration:e.attributes.ServiceMinutes??null,status:null!=e.attributes.Status?se.fromJSON(e.attributes.Status):null,symbol:e.symbol,timeWindowEnd:null!=e.attributes.TimeWindowEnd?new Date(e.attributes.TimeWindowEnd):null,timeWindowEndOffset:e.attributes.TimeWindowEndUTCOffset??null,timeWindowStart:null!=e.attributes.TimeWindowStart?new Date(e.attributes.TimeWindowStart):null,timeWindowStartOffset:e.attributes.TimeWindowStartUTCOffset??null,waitDuration:e.attributes.WaitMinutes??null})}toGraphic(){const e={ObjectID:this.objectId,ArrivalCurbApproach:null!=this.arriveCurbApproach?re.toJSON(this.arriveCurbApproach):null,ArrivalTime:null!=this.arriveTime?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:null!=this.cumulativeCosts?JSON.stringify(Le(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:null!=this.curbApproach?re.toJSON(this.curbApproach):null,DepartureCurbApproach:null!=this.departCurbApproach?re.toJSON(this.departCurbApproach):null,DepartureTime:null!=this.departTime?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:null!=this.locationType?oe.toJSON(this.locationType):null,Name:this.name,RouteName:this.routeName,Sequence:this.sequence,ServiceCosts:null!=this.serviceCosts?JSON.stringify(Le(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:null!=this.status?se.toJSON(this.status):null,TimeWindowEnd:null!=this.timeWindowEnd?this.timeWindowEnd.getTime():null,TimeWindowEndUTCOffset:this.timeWindowEndOffset??this.arriveTimeOffset,TimeWindowStart:null!=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,v.Cb)({type:re.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:re.read}}})],qt.prototype,"arriveCurbApproach",void 0),(0,r._)([(0,v.Cb)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],qt.prototype,"arriveTime",void 0),(0,r._)([(0,v.Cb)()],qt.prototype,"arriveTimeOffset",void 0),(0,r._)([(0,w.r)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],qt.prototype,"readArriveTimeOffset",null),(0,r._)([(0,v.Cb)({json:{name:"attributes.Bearing",read:!1,write:!0}})],qt.prototype,"bearing",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],qt.prototype,"bearingTol",void 0),(0,r._)([(0,v.Cb)()],qt.prototype,"cumulativeCosts",void 0),(0,r._)([(0,w.r)("cumulativeCosts",["attributes"])],qt.prototype,"readCumulativeCosts",null),(0,r._)([(0,v.Cb)()],qt.prototype,"cumulativeDistance",void 0),(0,r._)([(0,v.Cb)()],qt.prototype,"cumulativeDuration",void 0),(0,r._)([(0,v.Cb)({type:re.apiValues,json:{name:"attributes.CurbApproach",read:{reader:re.read},write:{writer:re.write}}})],qt.prototype,"curbApproach",void 0),(0,r._)([(0,v.Cb)({type:re.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:re.read}}})],qt.prototype,"departCurbApproach",void 0),(0,r._)([(0,v.Cb)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],qt.prototype,"departTime",void 0),(0,r._)([(0,v.Cb)()],qt.prototype,"departTimeOffset",void 0),(0,r._)([(0,w.r)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],qt.prototype,"readDepartTimeOffset",null),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],qt.prototype,"distanceToNetworkInMeters",void 0),(0,r._)([(0,v.Cb)({type:Ke.Z,json:{write:!0}})],qt.prototype,"geometry",void 0),(0,r._)([(0,v.Cb)()],qt.prototype,"lateDuration",void 0),(0,r._)([(0,v.Cb)({type:oe.apiValues,json:{name:"attributes.LocationType",read:{reader:oe.read},write:{writer:oe.write}}})],qt.prototype,"locationType",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.Name"}})],qt.prototype,"name",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.NavLatency",read:!1,write:!0}})],qt.prototype,"navLatency",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.ObjectID"}})],qt.prototype,"objectId",void 0),(0,r._)([(0,v.Cb)({type:l.Z})],qt.prototype,"popupTemplate",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.PosAlong"}}})],qt.prototype,"posAlong",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.RouteName"}})],qt.prototype,"routeName",void 0),(0,r._)([(0,v.Cb)()],qt.prototype,"serviceCosts",void 0),(0,r._)([(0,w.r)("serviceCosts",["attributes"])],qt.prototype,"readServiceCosts",null),(0,r._)([(0,C.c)("serviceCosts")],qt.prototype,"writeServiceCosts",null),(0,r._)([(0,v.Cb)()],qt.prototype,"serviceDistance",void 0),(0,r._)([(0,v.Cb)()],qt.prototype,"serviceDuration",void 0),(0,r._)([(0,v.Cb)({json:{name:"attributes.Sequence"}})],qt.prototype,"sequence",void 0),(0,r._)([(0,v.Cb)({type:ae.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:ae.read}}})],qt.prototype,"sideOfEdge",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.SnapX"}}})],qt.prototype,"snapX",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.SnapY"}}})],qt.prototype,"snapY",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.SnapZ"}}})],qt.prototype,"snapZ",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.SourceID"}}})],qt.prototype,"sourceId",void 0),(0,r._)([(0,v.Cb)({json:{read:{source:"attributes.SourceOID"}}})],qt.prototype,"sourceOid",void 0),(0,r._)([(0,v.Cb)({type:se.apiValues,json:{read:{source:"attributes.Status",reader:se.read}}})],qt.prototype,"status",void 0),(0,r._)([(0,v.Cb)({types:E.LB})],qt.prototype,"symbol",void 0),(0,r._)([(0,v.Cb)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],qt.prototype,"timeWindowEnd",void 0),(0,r._)([(0,C.c)("timeWindowEnd")],qt.prototype,"writeTimeWindowEnd",null),(0,r._)([(0,v.Cb)()],qt.prototype,"timeWindowEndOffset",void 0),(0,r._)([(0,v.Cb)({type:Date,json:{name:"attributes.TimeWindowStart"}})],qt.prototype,"timeWindowStart",void 0),(0,r._)([(0,C.c)("timeWindowStart")],qt.prototype,"writeTimeWindowStart",null),(0,r._)([(0,v.Cb)()],qt.prototype,"timeWindowStartOffset",void 0),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1}})],qt.prototype,"type",void 0),(0,r._)([(0,v.Cb)()],qt.prototype,"violations",void 0),(0,r._)([(0,w.r)("violations",["attributes"])],qt.prototype,"readViolations",null),(0,r._)([(0,v.Cb)()],qt.prototype,"waitDuration",void 0),(0,r._)([(0,v.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 Ht(e){return e.length?e:null}function Kt(e){switch(e){case"esriGeometryPoint":return{type:"esriSMS",style:"esriSMSCircle",size:12,color:[0,0,0,0],outline:Kt("esriGeometryPolyline")};case"esriGeometryPolyline":return{type:"esriSLS",style:"esriSLSSolid",width:1,color:[0,0,0,0]};case"esriGeometryPolygon":return{type:"esriSFS",style:"esriSFSNull",outline:Kt("esriGeometryPolyline")}}}function Xt(e){return"layers"in e}async function $t(e){const t=tt.Z.WGS84;return await(0,O.initializeProjection)(e.spatialReference,t),(0,O.project)(e,t)}function Yt(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function Qt(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:(0,h.En)(e,t,"meters")}const ei=p.Z.ofType(ct),ti=p.Z.ofType(bt),ii=p.Z.ofType(vt),ri=p.Z.ofType(St),oi=p.Z.ofType(_t),si=p.Z.ofType(Gt),ai="esri.layers.RouteLayer",li=u.Z.getLogger(ai);let ni=class extends((0,I.h)((0,j.M)((0,x.q)((0,F.I)((0,c.R)(D.Z)))))){constructor(e){super(e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.defaultSymbols=new k,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new ii,this.polygonBarriers=new ri,this.polylineBarriers=new oi,this.routeInfo=null,this.spatialReference=tt.Z.WGS84,this.stops=new si,this.type="route";const t=()=>{this._setStopSymbol(this.stops)};this.addHandles((0,b.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,m.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 _.Z({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:tt.Z.WGS84});if(null!=this.routeInfo&&null!=this.routeInfo.geometry)return this.routeInfo.geometry.extent??e;if(null==this.stops)return e;const t=this.stops.filter((e=>null!=e.geometry));if(t.length<2)return e;const{spatialReference:i}=t.at(0).geometry;if(null==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){const i=Xt(t)?t.layers:t.featureCollection?.layers,r=i?.find((e=>null!=e.layerDefinition.maxScale));return r?.layerDefinition.maxScale??0}readMinScale(e,t){const i=Xt(t)?t.layers:t.featureCollection?.layers,r=i?.find((e=>null!=e.layerDefinition.minScale));return r?.layerDefinition.minScale??0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",(e=>vt.fromGraphic(e)))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",(e=>St.fromGraphic(e)))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",(e=>_t.fromGraphic(e)))}readRouteInfo(e,t){const i=this._getNetworkFeatures(t,"RouteInfo",(e=>xt.fromGraphic(e)));return i.length>0?i.at(0):null}readSpatialReference(e,t){const i=Xt(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=s?.geometry?.spatialReference??o.spatialReference??r.spatialReference??r.extent.spatialReference??A.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 null!=this.routeInfo&&null!=this.routeInfo.name?this.routeInfo.name:"Route"}set title(e){this._overrideIfSome("title",e)}get url(){return o.default.routeServiceUrl}set url(e){null!=e?this._set("url",(0,B.Nm)(e,li)):this._set("url",o.default.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(){null!=this.directionLines&&(this.directionLines.removeAll(),this._set("directionLines",null)),null!=this.directionPoints&&(this.directionPoints.removeAll(),this._set("directionPoints",null)),null!=this.routeInfo&&this._set("routeInfo",null)}async save(){await this.load();const{fullExtent:e,portalItem:t}=this;if(!t)throw new d.Z("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new d.Z("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new d.Z("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if(null==this.routeInfo)throw new d.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 d.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,f.mN)(r):void 0,writtenProperties:[]},a=this.write(void 0,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(),null==this.routeInfo)throw new d.Z("routelayer:route-unsolved","saveAs() requires a solved route");const i=V.default.from(e).clone();i.extent??=await $t(this.fullExtent),i.id=null,i.portal??=W.Z.getDefault(),i.title??=this.title,i.type="Feature Collection",i.typeKeywords=["Data","Feature Collection",q.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(void 0,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??Ht(this.pointBarriers),o=e?.polylineBarriers??Ht(this.polylineBarriers),s=e?.polygonBarriers??Ht(this.polygonBarriers);if(null==i)throw new d.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 d.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,l=this.url,n=await this._getServiceDescription(l,a,t),u=e?.travelMode??n.defaultTravelMode,c=e?.accumulateAttributes??[];null!=u&&(c.push(u.distanceAttributeName),u.timeAttributeName&&c.push(u.timeAttributeName));const m={startTime:new Date},b={accumulateAttributes:c,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},h=e?kt.from(e):new kt;for(const e in m)null==h[e]&&(h[e]=m[e]);let f;h.set(b);try{f=await async function(e,t,i){const r=[],o=[],s={},a={},l=(0,z.en)(e),{path:n}=l;ut(t.stops)&&xe(t.stops.features,o,"stops.features",s),ut(t.pointBarriers)&&xe(t.pointBarriers.features,o,"pointBarriers.features",s),ut(t.polylineBarriers)&&xe(t.polylineBarriers.features,o,"polylineBarriers.features",s),ut(t.polygonBarriers)&&xe(t.polygonBarriers.features,o,"polygonBarriers.features",s);const u=await(0,Be.aX)(o);for(const e in s){const t=s[e];r.push(e),a[e]=u.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(null!=e&&e.hasZ)return!0}return!1}(a,r)){let e=null;try{e=await Fe(n,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}Ie.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)=>{(0,je.U2)(t,e)[r].geometry=i}));const p={...i,query:{...l.query,...Ue(t),f:"json"}},d=n.endsWith("/solve")?n:`${n}/solve`,{data:c}=await(0,G.Z)(d,p);return function(e){const{barriers:t,directionLines:i,directionPoints:r,directions:o,messages:s,polygonBarriers:a,polylineBarriers:l,routes:n,stops:u,traversedEdges:p,traversedJunctions:d,traversedTurns:c}=e,m=e=>{const t=b.find((t=>t.routeName===e));if(null!=t)return t;const i={routeId:b.length+1,routeName:e};return b.push(i),i},y=e=>{const t=b.find((t=>t.routeId===e));if(null!=t)return t;const i={routeId:e,routeName:null};return b.push(i),i},b=[];n?.features.forEach(((e,t)=>{e.geometry.spatialReference=n.spatialReference??void 0;const i=e.attributes.Name,r=t+1;b.push({routeId:r,routeName:i,route:e})})),o?.forEach((e=>{const{routeName:t}=e;m(t).directions=e}));const h=u?.features.every((e=>null==e.attributes.RouteName))&&b.length>0?b[0].routeName:null;return u?.features.forEach((e=>{e.geometry&&(e.geometry.spatialReference??=u.spatialReference??void 0);const t=h??e.attributes.RouteName,i=m(t);i.stops??=[],i.stops.push(e)})),i?.features.forEach((e=>{const t=e.attributes.RouteID,r=y(t),{geometryType:o,spatialReference:s}=i;r.directionLines??={features:[],geometryType:o,spatialReference:s},r.directionLines.features.push(e)})),r?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t),{geometryType:o,spatialReference:s}=r;i.directionPoints??={features:[],geometryType:o,spatialReference:s},i.directionPoints.features.push(e)})),p?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t),{geometryType:r,spatialReference:o}=p;i.traversedEdges??={features:[],geometryType:r,spatialReference:o},i.traversedEdges.features.push(e)})),d?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t),{geometryType:r,spatialReference:o}=d;i.traversedJunctions??={features:[],geometryType:r,spatialReference:o},i.traversedJunctions.features.push(e)})),c?.features.forEach((e=>{const t=e.attributes.RouteID,i=y(t);i.traversedTurns??={features:[]},i.traversedTurns.features.push(e)})),nt.fromJSON({routeResults:b,barriers:t,polygonBarriers:a,polylineBarriers:l,messages:s})}(c)}(l,h,t)}catch(e){throw(0,y.D_)(e)?e:new d.Z("routelayer:failed-route-request","the routing request failed",{error:e})}const v=this._toRouteLayerSolution(f);return this._isOverridden("title")||(this.title=v.routeInfo.name??"Route"),function(e,t,i){const r=t.networkDataset?.networkAttributes,o=r?.filter((({usageType:e})=>"cost"===e))??[],s=i.travelMode??t.defaultTravelMode;if(null==s)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:a,distanceAttributeName:l}=s,n=o.find((({name:e})=>e===a)),u=o.find((({name:e})=>e===l)),p=i.travelMode?.impedanceAttributeName??i.impedanceAttribute??t.impedance,c=n?.units,m=u?.units;if(!c||!m)throw new d.Z("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const y=i.directionsLanguage??t.directionsLanguage,b=i.accumulateAttributes??t.accumulateAttributeNames??[],h=new Set(o.filter((({name:e})=>e===a||e===l||e===p||null!=e&&b.includes(e))).map((({name:e})=>e))),f=e=>{for(const t in e)h.has(t)||delete e[t]};for(const t of e.pointBarriers)null!=t.costs&&(t.addedCost=t.costs[p]??0,f(t.costs));for(const t of e.polygonBarriers)null!=t.costs&&(t.scaleFactor=t.costs[p]??1,f(t.costs));for(const t of e.polylineBarriers)null!=t.costs&&(t.scaleFactor=t.costs[p]??1,f(t.costs));const{routeInfo:v}=e,{findBestSequence:g,preserveFirstStop:T,preserveLastStop:w,startTimeIsUTC:S,timeWindowsAreUTC:C}=i;v.analysisSettings=new At({accumulateAttributes:b,directionsLanguage:y,findBestSequence:g,preserveFirstStop:T,preserveLastStop:w,startTimeIsUTC:S,timeWindowsAreUTC:C,travelMode:s}),v.totalDuration=Yt(v.totalCosts?.[a]??0,c),v.totalDistance=Qt(v.totalCosts?.[l]??0,m),v.totalLateDuration=Yt(v.totalViolations?.[a]??0,c),v.totalWaitDuration=Yt(v.totalWait?.[a]??0,c),null!=v.totalCosts&&f(v.totalCosts),null!=v.totalViolations&&f(v.totalViolations),null!=v.totalWait&&f(v.totalWait);for(const t of e.stops)null!=t.serviceCosts&&(t.serviceDuration=Yt(t.serviceCosts[a]??0,c),t.serviceDistance=Qt(t.serviceCosts[l]??0,m),f(t.serviceCosts)),null!=t.cumulativeCosts&&(t.cumulativeDuration=Yt(t.cumulativeCosts[a]??0,c),t.cumulativeDistance=Qt(t.cumulativeCosts[l]??0,m),f(t.cumulativeCosts)),null!=t.violations&&(t.lateDuration=Yt(t.violations[a]??0,c),f(t.violations)),null!=t.wait&&(t.waitDuration=Yt(t.wait[a]??0,c),f(t.wait))}(v,n,h),v}update(e){const{stops:t,directionLines:i,directionPoints:r,pointBarriers:o,polylineBarriers:s,polygonBarriers:a,routeInfo:l}=e;this.set({stops:t,pointBarriers:o,polylineBarriers:s,polygonBarriers:a}),this._set("directionLines",i),this._set("directionPoints",r),this._set("routeInfo",l),null!=l.geometry&&(this.spatialReference=l.geometry.spatialReference)}_getNetworkFeatures(e,t,i,r){const o=Xt(e)?e.layers:e.featureCollection?.layers,s=o?.find((e=>e.layerDefinition.name===t));if(null==s)return new p.Z;const{layerDefinition:u,popupInfo:d,featureSet:c}=s,m=u.drawingInfo.renderer,{features:y}=c,b=c.spatialReference??u.spatialReference??u.extent.spatialReference??A.Zn,h=m&&(0,n.a)(m),f=tt.Z.fromJSON(b),v=y.map((e=>{const r=a.Z.fromJSON(e);null!=r.geometry&&null!=e.geometry&&null==e.geometry.spatialReference&&(r.geometry.spatialReference=f);const o=i(r);return o.symbol??=h?.getSymbol(r)??this._getNetworkSymbol(t),o.popupTemplate??=d&&l.Z.fromJSON(d),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(null!=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(null==this.defaultSymbols.stops)return;if(e.every((({symbol:e})=>null!=e)))return;const{first:t,last:i,middle:r,unlocated:o,waypoint:s,break:a}=this.defaultSymbols.stops;if(null==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 l=e.map((({sequence:e})=>e)).filter((e=>null!=e)),n=Math.min(...l),u=Math.max(...l);for(const l of e)l.sequence!==n?l.sequence!==u?"ok"===l.status||"not-located-on-closest"===l.status?"waypoint"!==l.locationType?"break"!==l.locationType?l.symbol=r:l.symbol=a:l.symbol=s:l.symbol=o:l.symbol=i:l.symbol=t}_toRouteLayerSolution(e){const t=e.routeResults[0].stops?.map((e=>Gt.fromJSON(e.toJSON())));this._setStopSymbol(t);const i=new si(t),r=new ri(e.polygonBarriers?.map((e=>{const t=St.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polygonBarriers,t}))),o=new oi(e.polylineBarriers?.map((e=>{const t=_t.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.polylineBarriers,t}))),s=new ii(e.pointBarriers?.map((e=>{const t=vt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.pointBarriers,t}))),a=e.routeResults[0].route?.toJSON(),l=xt.fromJSON(a);l.symbol=this.defaultSymbols.routeInfo;const n=new ti(e.routeResults[0].directionPoints?.features.map((e=>{const t=bt.fromJSON(e.toJSON());return t.symbol=this.defaultSymbols.directionPoints,t})));return{directionLines:new ei(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:l,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(null==e||!e.length)return null;const l=this.spatialReference.toJSON(),{fullExtent:n,maxScale:u,minScale:p}=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:l},layerDefinition:{capabilities:"Query,Update,Editing",drawingInfo:{renderer:{type:"simple",symbol:null!=t?t.toJSON():Kt(i)}},extent:n.toJSON(),fields:r,geometryType:i,hasM:!1,hasZ:!1,maxScale:u,minScale:p,name:s,objectIdField:"ObjectID",spatialReference:l,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",St.fields,St.popupInfo,"PolygonBarriers","Polygon Barriers")}_writePolylineBarriers(){return this._writeNetworkFeatures(this.polylineBarriers,this.defaultSymbols.polylineBarriers,"esriGeometryPolyline",_t.fields,_t.popupInfo,"PolylineBarriers","Line Barriers")}_writeRouteInfo(){return this._writeNetworkFeatures(null!=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(null==e)return null;const{stops:t}=this.defaultSymbols,i=null!=t&&null!=t.first&&t.first.toJSON(),r=null!=t&&null!=t.middle&&t.middle.toJSON(),o=null!=t&&null!=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,v.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}}}}}}})],ni.prototype,"_featureCollection",void 0),(0,r._)([(0,C.c)(["web-map","portal-item"],"_featureCollection")],ni.prototype,"writeFeatureCollectionWebmap",null),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],ni.prototype,"_type",void 0),(0,r._)([(0,v.Cb)({nonNullable:!0,type:k})],ni.prototype,"defaultSymbols",void 0),(0,r._)([(0,v.Cb)({readOnly:!0})],ni.prototype,"directionLines",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],ni.prototype,"readDirectionLines",null),(0,r._)([(0,v.Cb)({readOnly:!0})],ni.prototype,"directionPoints",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],ni.prototype,"readDirectionPoints",null),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],ni.prototype,"featureCollectionType",void 0),(0,r._)([(0,v.Cb)({readOnly:!0})],ni.prototype,"fullExtent",null),(0,r._)([(0,v.Cb)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],ni.prototype,"legendEnabled",void 0),(0,r._)([(0,v.Cb)({type:["show","hide"]})],ni.prototype,"listMode",void 0),(0,r._)([(0,v.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],ni.prototype,"maxScale",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],ni.prototype,"readMaxScale",null),(0,r._)([(0,v.Cb)({type:Number,nonNullable:!0,json:{write:!1}})],ni.prototype,"minScale",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],ni.prototype,"readMinScale",null),(0,r._)([(0,v.Cb)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],ni.prototype,"operationalLayerType",void 0),(0,r._)([(0,v.Cb)({nonNullable:!0,type:p.Z.ofType(vt)})],ni.prototype,"pointBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],ni.prototype,"readPointBarriers",null),(0,r._)([(0,v.Cb)({nonNullable:!0,type:p.Z.ofType(St)})],ni.prototype,"polygonBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],ni.prototype,"readPolygonBarriers",null),(0,r._)([(0,v.Cb)({nonNullable:!0,type:p.Z.ofType(_t)})],ni.prototype,"polylineBarriers",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],ni.prototype,"readPolylineBarriers",null),(0,r._)([(0,v.Cb)({readOnly:!0})],ni.prototype,"routeInfo",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],ni.prototype,"readRouteInfo",null),(0,r._)([(0,v.Cb)({type:tt.Z})],ni.prototype,"spatialReference",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],ni.prototype,"readSpatialReference",null),(0,r._)([(0,v.Cb)({nonNullable:!0,type:p.Z.ofType(Gt)})],ni.prototype,"stops",void 0),(0,r._)([(0,w.r)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],ni.prototype,"readStops",null),(0,r._)([(0,v.Cb)()],ni.prototype,"title",null),(0,r._)([(0,v.Cb)({readOnly:!0,json:{read:!1}})],ni.prototype,"type",void 0),(0,r._)([(0,v.Cb)()],ni.prototype,"url",null),ni=(0,r._)([(0,S.j)(ai)],ni);const ui=ni},16859:(e,t,i)=>{i.d(t,{I:()=>S});var r=i(43697),o=i(68773),s=i(40330),a=i(3172),l=i(66643),n=i(20102),u=i(92604),p=i(70586),d=i(95330),c=i(17452),m=i(5600),y=(i(75215),i(67676),i(80442),i(71715)),b=i(52011),h=i(30556),f=i(84230),v=i(48522),g=i(15235),T=i(86082),w=i(14661);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new g.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:r}=await i.e(8062).then(i.bind(i,18062));return(0,d.k_)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,d.D_)(e)||u.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.r9)(e),!0))))}async setUserPrivileges(e,t){if(!o.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:o}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",o)}catch(e){(0,d.r9)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,w.Ss)(i);let o,a;if(r)o=i.portal.url;else try{o=await(0,f.oP)(this.url,t)}catch(e){(0,d.r9)(e)}if(!o||!(0,c.Zo)(o,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.r9)(e)}if(!a)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(r?await i.reload():(i=new g.default({id:e,portal:{url:o}}),await i.load(t)),i.portal.user)return(0,w.Ss)(i)}catch(e){(0,d.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const i=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.user=i,null==i||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=s.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,o=v.Z.getDefault();if(o&&o.loaded&&(0,c.Fv)(o.restUrl)===(0,c.Fv)(r))return o.user;const n=`${r}/community/self`,u=null!=e?e.signal:null,p=await(0,l.q6)((0,a.Z)(n,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?T.Z.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||v.Z.getDefault());return i&&r&&!(0,c.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new n.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,m.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,r._)([(0,y.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,h.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,m.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,b.j)("esri.layers.mixins.PortalLayer")],t),t},C={credential:null,user:null}},74889:(e,t,i)=>{i.d(t,{Z:()=>g});var r,o=i(43697),s=i(66577),a=i(38171),l=i(35454),n=i(96674),u=i(22974),p=i(5600),d=(i(75215),i(71715)),c=i(52011),m=i(30556),y=i(82971),b=i(33955),h=i(1231);const f=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=r=class extends n.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=y.Z.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const o=e[t],s=a.Z.fromJSON(o),l=o.geometry&&o.geometry.spatialReference;null==s.geometry||l||(s.geometry.spatialReference=i);const n=o.aggregateGeometries,u=s.aggregateGeometries;if(n&&null!=u)for(const e in u){const t=u[e],r=n[e],o=r?.spatialReference;null==t||o||(t.spatialReference=i)}r.push(s)}return r}writeGeometryType(e,t,i,r){if(e)return void f.write(e,t,i,r);const{features:o}=this;if(o)for(const e of o)if(e&&null!=e.geometry)return void f.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,b.im)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=y.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&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,u.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?.(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;let l=null,n=null;if(this.hasZ&&null!=i?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=i;l=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=i;n=i=>null==i?i:i*t+e}const u=this._getHydrationFunction(e,(e=>e*s+r),(e=>o-e*a),l,n);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,i){let r,o;const s=[];for(let a=0,l=e.length;a<l;a++){const l=e[a];if(a>0){const e=t(l[0]),a=i(l[1]);e===r&&a===o||(s.push([e-r,a-o]),r=e,o=a)}else r=t(l[0]),o=i(l[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,b.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,b.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,r,o){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,b.oU)(e)?e.rings:e.paths;let a,l;for(let e=0,r=s.length;e<r;e++){const r=s[e];for(let e=0,o=r.length;e<o;e++){const o=r[e];e>0?(a+=o[0],l+=o[1]):(a=o[0],l=o[1]),o[0]=t(a),o[1]=i(l)}}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2]),i[3]=o(i[3])}}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2])}}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=o(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let a,l;for(let e=0,r=s.length;e<r;e++){const r=s[e];e>0?(a+=r[0],l+=r[1]):(a=r[0],l=r[1]),r[0]=t(a),r[1]=i(l)}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2]),t[3]=o(t[3])}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2])}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,p.Cb)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,p.Cb)({type:[a.Z],json:{write:!0}})],v.prototype,"features",void 0),(0,o._)([(0,d.r)("features")],v.prototype,"readFeatures",null),(0,o._)([(0,p.Cb)({type:[h.Z],json:{write:!0}})],v.prototype,"fields",void 0),(0,o._)([(0,p.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:f.read}}})],v.prototype,"geometryType",void 0),(0,o._)([(0,m.c)("geometryType")],v.prototype,"writeGeometryType",null),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,o._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,o._)([(0,p.Cb)({types:s.qM,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,o._)([(0,d.r)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,o._)([(0,p.Cb)({type:y.Z,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o._)([(0,m.c)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,o._)([(0,p.Cb)({json:{write:!0}})],v.prototype,"transform",void 0),v=r=(0,o._)([(0,c.j)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const g=v},11282:(e,t,i)=>{i.d(t,{cv:()=>l,en:()=>a,lA:()=>s}),i(68773),i(40330);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 l(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]=l(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}i(71058)}}]);