@arcgis/core 5.0.0-next.39 → 5.0.0-next.40

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 (174) hide show
  1. package/Basemap.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/02d1c48e874dfd985bc4.js +1 -0
  4. package/assets/esri/core/workers/chunks/0429ca6ba562ae29897e.js +1 -0
  5. package/assets/esri/core/workers/chunks/{a6324f5f560ffadc6e5d.js → 061def9163a09c804b5c.js} +1 -1
  6. package/assets/esri/core/workers/chunks/0e4d0213d568f50c231f.js +1 -0
  7. package/assets/esri/core/workers/chunks/{1de216d9850c39c1735d.js → 1357cc637524cd254974.js} +1 -1
  8. package/assets/esri/core/workers/chunks/13839d220e5c62404923.js +1 -0
  9. package/assets/esri/core/workers/chunks/1c0fb4795a52204882a8.js +1 -0
  10. package/assets/esri/core/workers/chunks/1e286fb7bb833f00dd88.js +1 -0
  11. package/assets/esri/core/workers/chunks/{52ecbaa2d32692d6d8df.js → 1f6ead46b723630db897.js} +1 -1
  12. package/assets/esri/core/workers/chunks/218b2b767b40d85fb713.js +1 -0
  13. package/assets/esri/core/workers/chunks/2c9865e34f32fb5683e5.js +1 -0
  14. package/assets/esri/core/workers/chunks/{48d1a443b324753921de.js → 2db7a7607657f1d669f7.js} +1 -1
  15. package/assets/esri/core/workers/chunks/2f8cf7d9ff1f4de19a4c.js +1 -0
  16. package/assets/esri/core/workers/chunks/{6330d8767ba1d5329daa.js → 31b074ae2162a3508d2a.js} +1 -1
  17. package/assets/esri/core/workers/chunks/338570424337be05cef5.js +1 -0
  18. package/assets/esri/core/workers/chunks/{a59433c78ed01febca6d.js → 3767617c0dfc7d801441.js} +1 -1
  19. package/assets/esri/core/workers/chunks/3a16347e17312556e02c.js +1 -0
  20. package/assets/esri/core/workers/chunks/3ac8de121a07c70bae0f.js +1 -0
  21. package/assets/esri/core/workers/chunks/3f33708eb39c7169a226.js +1 -0
  22. package/assets/esri/core/workers/chunks/4278b35fb6fd578c403e.js +1 -0
  23. package/assets/esri/core/workers/chunks/{3f8849c49f0e3ce7eb6b.js → 44f036cc21e3a2308f69.js} +1 -1
  24. package/assets/esri/core/workers/chunks/46daa1ff5b412a97edc9.js +1 -0
  25. package/assets/esri/core/workers/chunks/{a5d25c71aa4dfaa878cf.js → 4c4a55be41ba105c091c.js} +1 -1
  26. package/assets/esri/core/workers/chunks/537de53ef1e9101468f5.js +1 -0
  27. package/assets/esri/core/workers/chunks/679088064420a906aa7f.js +1 -0
  28. package/assets/esri/core/workers/chunks/6e8c20ff1d28ef2fe72c.js +1 -0
  29. package/assets/esri/core/workers/chunks/75643711d9585ee26a15.js +1 -0
  30. package/assets/esri/core/workers/chunks/7ba13b52fce1060fbb2a.js +1 -0
  31. package/assets/esri/core/workers/chunks/800c91302eaad7f00877.js +1 -0
  32. package/assets/esri/core/workers/chunks/804958f3f4ff47a4eff5.js +1 -0
  33. package/assets/esri/core/workers/chunks/816227de5bd42b437df4.js +1 -0
  34. package/assets/esri/core/workers/chunks/926c2a0e21b7aa1a86e4.js +1 -0
  35. package/assets/esri/core/workers/chunks/933dce4d4ff8b90219c8.js +1 -0
  36. package/assets/esri/core/workers/chunks/93d11075f65a5b6625ea.js +1 -0
  37. package/assets/esri/core/workers/chunks/9c0efd06c9000ccbd62d.js +1 -0
  38. package/assets/esri/core/workers/chunks/9f1d3c0b53bef07e39bf.js +1 -0
  39. package/assets/esri/core/workers/chunks/9f2a8445a5848502c7e7.js +1 -0
  40. package/assets/esri/core/workers/chunks/9f6c63a580b28ab715bd.js +1 -0
  41. package/assets/esri/core/workers/chunks/a96742e678a506c461ab.js +1 -0
  42. package/assets/esri/core/workers/chunks/b7bcff9a64f41a0a0b6a.js +1 -0
  43. package/assets/esri/core/workers/chunks/c0b15510a8cab98df77f.js +1 -0
  44. package/assets/esri/core/workers/chunks/c367c7e553be3682f2db.js +1 -0
  45. package/assets/esri/core/workers/chunks/cfd2839e218610a222e5.js +1 -0
  46. package/assets/esri/core/workers/chunks/{014dbe6fa93a277b08f7.js → d0014b4a8c013f59b113.js} +1 -1
  47. package/assets/esri/core/workers/chunks/d08ee45c501102deea20.js +1 -0
  48. package/assets/esri/core/workers/chunks/d42273394f575e71dd55.js +1 -0
  49. package/assets/esri/core/workers/chunks/d723619579cc8f5ef2cd.js +1 -0
  50. package/assets/esri/core/workers/chunks/da1e61f355fb943085dc.js +1 -0
  51. package/assets/esri/core/workers/chunks/dddb6cb44cbe4dc1af97.js +1 -0
  52. package/assets/esri/core/workers/chunks/efc293c8bbc12156096d.js +1 -0
  53. package/assets/esri/core/workers/chunks/f65f1798f398bc549463.js +1 -0
  54. package/assets/esri/core/workers/chunks/f93f0586ce10cb5d98b3.js +1 -0
  55. package/assets/esri/core/workers/chunks/{06462b267ff8d5984882.js → fb9643b74cf35221ff98.js} +1 -1
  56. package/chunks/Envelope.js +1 -1
  57. package/chunks/GaussianSplat.glsl.js +2 -2
  58. package/chunks/MultiPathImpl.js +1 -1
  59. package/chunks/Point2D.js +1 -1
  60. package/chunks/UnitFactory.js +1 -1
  61. package/config.js +1 -1
  62. package/core/has.js +1 -1
  63. package/form/FormTemplate.js +1 -1
  64. package/form/elements/GroupElement.js +1 -1
  65. package/form/elements/inputs/attachments/AttachmentInput.js +1 -1
  66. package/geometry/FlatGeometry.js +5 -0
  67. package/geometry/operators/gx/operatorShapePreservingProject.js +1 -1
  68. package/geometry/operators/support/jsonConverter.js +1 -1
  69. package/geometry/support/aaBoundingBox.js +1 -1
  70. package/geometry/support/aaBoundingRect.js +1 -1
  71. package/geometry/support/boundsUtils.js +1 -1
  72. package/interfaces.d.ts +259 -7
  73. package/kernel.js +1 -1
  74. package/layers/BaseElevationLayer.js +1 -1
  75. package/layers/BaseTileLayer.js +1 -1
  76. package/layers/CSVLayer.js +1 -1
  77. package/layers/FeatureLayer.js +1 -1
  78. package/layers/GeoJSONLayer.js +1 -1
  79. package/layers/GroupLayer.js +1 -1
  80. package/layers/MapImageLayer.js +1 -1
  81. package/layers/MediaLayer.js +1 -1
  82. package/layers/OrientedImageryLayer.js +1 -1
  83. package/layers/ParquetLayer.js +1 -1
  84. package/layers/VectorTileLayer.js +1 -1
  85. package/layers/VideoLayer.js +1 -1
  86. package/layers/WMSLayer.js +1 -1
  87. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  88. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  89. package/layers/mixins/ArcGISImageService.js +1 -1
  90. package/layers/mixins/ImageryTileMixin.js +1 -1
  91. package/layers/mixins/PortalLayer.js +1 -1
  92. package/layers/mixins/TemporalLayer.js +1 -1
  93. package/layers/mixins/operationalLayerModuleMap.js +1 -1
  94. package/layers/mixins/operationalLayers.js +1 -1
  95. package/layers/support/LocalMediaElementSource.js +1 -1
  96. package/layers/support/ParquetEncodingBase.js +1 -1
  97. package/layers/support/ParquetEncodingLocation.js +1 -1
  98. package/layers/support/ParquetEncodingWkb.js +1 -1
  99. package/layers/support/Sublayer.js +1 -1
  100. package/layers/support/WMSSublayer.js +1 -1
  101. package/layers/support/layersCreator.js +1 -1
  102. package/layers/support/lazyLayerLoader.js +1 -1
  103. package/layers/support/parquetUtils.js +1 -1
  104. package/libs/parquet/parquet.js +1 -1
  105. package/package.json +2 -2
  106. package/renderers/FlowRenderer.js +1 -1
  107. package/renderers/VectorFieldRenderer.js +1 -1
  108. package/renderers/visualVariables/support/ColorSizeStop.js +1 -1
  109. package/renderers/visualVariables/support/SizeStop.js +1 -1
  110. package/support/LayersMixin.js +1 -1
  111. package/support/TablesMixin.js +1 -1
  112. package/support/revision.js +1 -1
  113. package/symbols/edges/Edges3D.js +1 -1
  114. package/versionManagement/VersionManager.d.ts +4 -0
  115. package/versionManagement/VersionManager.js +5 -0
  116. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  117. package/views/2d/layers/LayerView2D.js +1 -1
  118. package/views/3d/GroundView3D.js +1 -1
  119. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  120. package/views/3d/support/gaussianSplatting/GaussianSplatAtlasPages.js +1 -1
  121. package/views/3d/support/gaussianSplatting/GaussianSplatFadeTexture.js +1 -1
  122. package/views/3d/support/gaussianSplatting/GaussianSplatOrderTexture.js +1 -1
  123. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  124. package/views/3d/webgl-engine/shaders/GaussianSplatTechnique.js +1 -1
  125. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  126. package/views/input/gamepad/GamepadInputDevice.js +1 -1
  127. package/views/layers/support/{Geometry.js → GeometryClipArea.js} +1 -1
  128. package/views/webgl/capabilities/Capabilities.js +1 -1
  129. package/views/webgl/capabilities/load.js +1 -1
  130. package/webdoc/support/writeUtils.js +1 -1
  131. package/widgets/FeatureTable/FieldColumn.js +1 -1
  132. package/widgets/VersionManagement/VersionManagementViewModel.js +1 -1
  133. package/assets/esri/core/workers/chunks/09ac2bbc7327e6e6b5a2.js +0 -1
  134. package/assets/esri/core/workers/chunks/1432e789aa4cba627337.js +0 -1
  135. package/assets/esri/core/workers/chunks/1a9ed3c59a9a8bafb251.js +0 -1
  136. package/assets/esri/core/workers/chunks/1c857191e5898aba50fe.js +0 -1
  137. package/assets/esri/core/workers/chunks/234ffd08c2be03a0b9fe.js +0 -1
  138. package/assets/esri/core/workers/chunks/2d0d8243ed0c21f8a498.js +0 -1
  139. package/assets/esri/core/workers/chunks/31675811cacdb6fd96cf.js +0 -1
  140. package/assets/esri/core/workers/chunks/39d2b540738431adec98.js +0 -1
  141. package/assets/esri/core/workers/chunks/48820e12d94eb49c0a65.js +0 -1
  142. package/assets/esri/core/workers/chunks/4c278fb2d51ca6226050.js +0 -1
  143. package/assets/esri/core/workers/chunks/4d6706d6dbe578653c28.js +0 -1
  144. package/assets/esri/core/workers/chunks/4ff40eea70d19c934504.js +0 -1
  145. package/assets/esri/core/workers/chunks/59ce992d3a5e7c32b9fb.js +0 -1
  146. package/assets/esri/core/workers/chunks/5e30acfda04f7fc2b676.js +0 -1
  147. package/assets/esri/core/workers/chunks/6052eccb9395c8efb295.js +0 -1
  148. package/assets/esri/core/workers/chunks/61369838aa337d0156c5.js +0 -1
  149. package/assets/esri/core/workers/chunks/690a40d2eef52bfc149f.js +0 -1
  150. package/assets/esri/core/workers/chunks/6b820f14c110d9da118e.js +0 -1
  151. package/assets/esri/core/workers/chunks/7fd2366ee1fc81fa8c56.js +0 -1
  152. package/assets/esri/core/workers/chunks/8d9e622cec13f5cea726.js +0 -1
  153. package/assets/esri/core/workers/chunks/9110287f272141f60c35.js +0 -1
  154. package/assets/esri/core/workers/chunks/98997841ec3955287ba2.js +0 -1
  155. package/assets/esri/core/workers/chunks/a716b8fdeda4e16f03ab.js +0 -1
  156. package/assets/esri/core/workers/chunks/a9577a700b6a7b69d6aa.js +0 -1
  157. package/assets/esri/core/workers/chunks/ad4fcb73cfe9a1e4b710.js +0 -1
  158. package/assets/esri/core/workers/chunks/aead7c9830fa310e5b53.js +0 -1
  159. package/assets/esri/core/workers/chunks/b48aceaeefa07214e430.js +0 -1
  160. package/assets/esri/core/workers/chunks/bcfa98b6866a96c194cb.js +0 -1
  161. package/assets/esri/core/workers/chunks/c052fb8c952cda0b5d13.js +0 -1
  162. package/assets/esri/core/workers/chunks/c0d6f8e55349f4f5cd58.js +0 -1
  163. package/assets/esri/core/workers/chunks/c1a4d1ec0125617374b4.js +0 -1
  164. package/assets/esri/core/workers/chunks/c582fb447c89d732cfff.js +0 -1
  165. package/assets/esri/core/workers/chunks/cb500d673ca7ec1ef945.js +0 -1
  166. package/assets/esri/core/workers/chunks/ce99abfdcd71ff9e4e36.js +0 -1
  167. package/assets/esri/core/workers/chunks/cf0e2c91b330b1d0ef77.js +0 -1
  168. package/assets/esri/core/workers/chunks/d764b6273974f4bca31b.js +0 -1
  169. package/assets/esri/core/workers/chunks/d87dc2eeffabd3507143.js +0 -1
  170. package/assets/esri/core/workers/chunks/dca6a61fd239cf1ff90c.js +0 -1
  171. package/assets/esri/core/workers/chunks/edc3d98f33d7bf959154.js +0 -1
  172. package/assets/esri/core/workers/chunks/f1381c5a2a1de1ef9139.js +0 -1
  173. package/assets/esri/core/workers/chunks/f6148611d883a59f8fb8.js +0 -1
  174. package/views/3d/webgl-engine/shaders/GaussianSplatDepthTechnique.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9785],{159:(e,t,r)=>{r.d(t,{A:()=>l});var i,n=r(31635),o=r(69622),s=r(91429),a=r(99157);let l=i=class extends o.A{constructor(e){super(e),this.steps=[]}getInverse(){const e=new i;for(let t=this.steps.length-1;t>=0;t--){const r=this.steps[t];e.steps.push(r.getInverse())}return e}};(0,n.Cg)([(0,s.MZ)({type:[a.A],nonNullable:!0})],l.prototype,"steps",void 0),l=i=(0,n.Cg)([(0,s.$K)("esri.geometry.operators.support.GeographicTransformation")],l)},4197:(e,t,r)=>{r.d(t,{Vj:()=>u,cj:()=>l,jh:()=>o,l5:()=>a,xm:()=>s});var i=r(34275),n=r(9093);function o(e){return e<=i.y9?new Array(e).fill(0):new Float64Array(e)}function s(e){return((0,i.iu)(e)?e.byteLength/8:e.length)<=i.y9?Array.from(e):new Float64Array(e)}function a(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}function l(e){return[...e]}function u(e){const t=(0,n.vt)();for(let r=0;r<16;++r)t[r]=e[r];return t}},6797:(e,t,r)=>{r.d(t,{Ui:()=>d});var i=r(69622),n=r(7762),o=r(88620);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof i.A}function l(e){return e instanceof n.A?Object.keys(e.items):a(e)?(0,o.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof n.A?e.items[t]:e[t]}function p(e){return e?e.declaredClass:null}function c(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=l(e),n=l(t);if(0===i.length&&0===n.length)return;if(!i.length||!n.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const o=n.filter(e=>!i.includes(e)),d=i.filter(e=>!n.includes(e)),m=i.filter(r=>n.includes(r)&&u(e,r)!==u(t,r)).concat(o,d).sort(),y=p(e);if(y&&s.has(y)&&m.length)return{type:"complete",oldValue:e,newValue:t};let f;const h=a(e)&&a(t);for(const i of m){const n=u(e,i),o=u(t,i);let s;if((h||"function"!=typeof n&&"function"!=typeof o)&&n!==o&&(null!=n||null!=o)){if(r&&r[i]&&"function"==typeof r[i])s=r[i]?.(n,o);else if(n instanceof Date&&o instanceof Date){if(n.getTime()===o.getTime())continue;s={type:"complete",oldValue:n,newValue:o}}else s="object"==typeof n&&"object"==typeof o&&p(n)===p(o)?c(n,o):{type:"complete",oldValue:n,newValue:o};null!=s&&(null!=f?f.diff[i]=s:f={type:"partial",diff:{[i]:s}})}}return f}function d(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&p(e)!==p(t)?{type:"complete",oldValue:e,newValue:t}:c(e,t)}},8303:(e,t,r)=>{r.d(t,{A:()=>T});var i=r(31635),n=r(92602),o=r(70333),s=r(11254),a=r(60999),l=r(49186),u=r(53966),p=r(97768),c=r(74887),d=r(84952),m=r(91429),y=r(77548),f=r(20655),h=r(80812),g=r(41318),v=r(10407),b=r(36005),w=r(43937);const T=e=>{const t=e;let T=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new h.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,c.QP)(e),!0)))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!o.id?.findCredential(this.url),n=e===r.id;if(n&&r.portal.user)return this._getUserPrivileges(r,i);let s,a;if(n)s=r.portal.url;else try{s=await(0,y.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!s||!(0,d.b8)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(o.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const l=!0,u=!1,p=!1;if(!a)return{features:{edit:l,fullEdit:u},content:{updateItem:p}};try{if(n?await r.reload():(r=new h.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,c.QP)(e)}return{features:{edit:l,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,v.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=C.credential===t?C.user:await this._fetchEditingUser(e);return C.credential=t,C.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=f.A.getDefault();if(n&&n.loaded&&(0,d.S8)(n.restUrl)===(0,d.S8)(i))return n.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,a.Ke)((0,s.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?g.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||f.A.getDefault());return r&&i&&!(0,d.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,m.MZ)({type:h.default})],T.prototype,"portalItem",null),(0,i.Cg)([(0,b.w)("web-document","portalItem",["itemId"])],T.prototype,"readPortalItem",null),(0,i.Cg)([(0,w.K)("web-document","portalItem",{itemId:{type:String}})],T.prototype,"writePortalItem",null),(0,i.Cg)([(0,m.MZ)({clonable:!1})],T.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],T.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],T.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],T.prototype,"userHasUpdateItemPrivileges",void 0),T=(0,i.Cg)([(0,m.$K)("esri.layers.mixins.PortalLayer")],T),T},C={credential:null,user:null}},9093:(e,t,r)=>{function i(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function n(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}r.d(t,{o8:()=>n,vt:()=>i,zK:()=>o});const o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:n,create:i,fromValues:function(e,t,r,i,n,o,s,a,l,u,p,c,d,m,y,f){return[e,t,r,i,n,o,s,a,l,u,p,c,d,m,y,f]}},Symbol.toStringTag,{value:"Module"}))},9762:(e,t,r)=>{r.r(t),r.d(t,{projectBuffer:()=>n});var i=r(37539);function n(e,t,r,n,o,s,a=Math.floor(e.length/3)){const l=(0,i.jd)(t,o);if(null==l)return!1;if(l===i.pO){if(e===n&&r===s)return!0;const t=r+3*a;for(let i=r,o=s;i<t;i++,o++)n[o]=e[i]??0;return!0}const u=r+3*a;for(let t=r,i=s;t<u;t+=3,i+=3)l(e,t,n,i);return!0}},10407:(e,t,r)=>{r.d(t,{It:()=>m,LG:()=>s,OM:()=>u,Sm:()=>p,Y:()=>a,bK:()=>l,mm:()=>d,sQ:()=>c});var i=r(91218),n=r(16930),o=r(28735);function s(e,t){if(!a(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return a(e,d.HOSTED_SERVICE)}function u(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function p(e,t,r){r?s(e,t):u(e,t)}async function c(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,o.ci)(e);const r=n.A.WGS84;return await(0,i.initializeProjection)(t,r),(0,i.project)(e,r)}(r)}const d={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function m(e){const{portal:t,isOrgItem:r,itemControl:i}=e,n=t.user?.privileges;let o=!n||n.includes("features:user:edit"),s=!!r&&!!n?.includes("features:user:fullEdit");const a="update"===i||"admin"===i;return a?s=o=!0:s&&(o=!0),{features:{edit:o,fullEdit:s},content:{updateItem:a}}}},17136:(e,t,r)=>{r.d(t,{Y_:()=>O,O7:()=>A,el:()=>M});var i=r(92602),n=r(69052),o=r(49186),s=r(53966),a=r(39829),l=r(82799),u=r(16930),p=r(80754),c=r(21325),d=r(28735),m=r(11254),y=r(65864),f=r(2272),h=r(84952),g=r(92300);const v=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function b(e){return"polygon"===e[0].type}function w(e){return"polyline"===e[0].type}function T(e,t,r){if(t){const t=function(e,t){if(!(e instanceof l.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw v().error(e),new o.A("internal:geometry",e)}const r=(0,p.r8)(e),i=[];for(const e of r){const r=[];i.push(r),r.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],o=e[i][1],s=e[i+1][0],a=e[i+1][1],l=Math.sqrt((s-n)*(s-n)+(a-o)*(a-o)),u=(a-o)/l,p=(s-n)/l,c=l/t;if(c>1){for(let e=1;e<=c-1;e++){const i=e*t,s=p*i+n,a=u*i+o;r.push([s,a])}const e=(l+Math.floor(c-1)*t)/2,i=p*e+n,s=u*e+o;r.push([i,s])}r.push([s,a])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:i,spatialReference:e.spatialReference}):new l.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.ci)(t,!0)}return r&&(e=(0,p.kS)(e,r)),e}function C(e,t,r){if(Array.isArray(e)){const i=e[0];if(i>t){const r=(0,p.kd)(i,t);e[0]=i+r*(-2*t)}else if(i<r){const t=(0,p.kd)(i,r);e[0]=i+t*(-2*r)}}else{const i=e.x;if(i>t){const r=(0,p.kd)(i,t);e=e.clone().offset(r*(-2*t),0)}else if(i<r){const t=(0,p.kd)(i,r);e=e.clone().offset(t*(-2*r),0)}}return e}function S(e,t){let r=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],o=t.geometries[i],s=(0,p.r8)(o);for(let e=0;e<s.length;e++){const t=s[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const i=t[e][0];r=i>r?i:r}r=Number(r.toFixed(9));const i=-360*(0,p.kd)(r,180);for(let r=0;r<t.length;r++){const t=o.getPoint(e,r);o.setPoint(e,r,t.clone().offset(i,0))}return!0}})}if(n===r){if(b(e))for(const t of(0,p.r8)(o))e[n]=e[n].addRing(t);else if(w(e))for(const t of(0,p.r8)(o))e[n]=e[n].addPath(t)}else r=n,e[n]=o}return e}async function M(e,t,r){if(!Array.isArray(e))return M([e],t);t&&"string"!=typeof t&&v().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let o,s,u,b,w,A,I,O,N=0;const Z=[],j=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,s=(0,c.Vp)(o),u=o.isWebMercator,A=u?102100:4326,b=p.j7[A].maxX,w=p.j7[A].minX,I=p.j7[A].plus180Line,O=p.j7[A].minus180Line),s)if("mesh"===t.type)j.push(t);else if("point"===t.type)j.push(C(t.clone(),b,w));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>C(e,b,w)),j.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,s);j.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,r=(0,p.kd)(e.xmin,w)*(2*b);let i=0===r?t.clone():(0,p.kS)(t.clone(),r);e.offset(r,0);let{xmin:n,xmax:o}=e;n=Number(n.toFixed(9)),o=Number(o.toFixed(9)),e.intersects(I)&&o!==b?(N=o>N?o:N,i=T(i,u),Z.push(i),j.push("cut")):e.intersects(O)&&n!==w?(N=o*(2*b)>N?o*(2*b):N,i=T(i,u,360),Z.push(i),j.push("cut")):j.push(i)}else j.push(t.clone());else j.push(t);else j.push(t);let D=(0,p.kd)(N,b),F=-90;const x=D,R=new l.A;for(;D>0;){const e=360*D-180;R.addPath([[e,F],[e,-1*F]]),F*=-1,D--}if(Z.length>0&&x>0){const t=S(Z,await async function(e,t,r,i){const n=(0,f.Dl)(e),o=t[0].spatialReference,s={...i,responseType:"json",query:{...n.query,f:"json",sr:(0,c.YX)(o),target:JSON.stringify({geometryType:(0,y.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},a=await(0,m.A)(n.path+"/cut",s),{cutIndexes:l,geometries:u=[]}=a.data;return{cutIndexes:l,geometries:u.map(e=>{const t=(0,y.rS)(e);return t.spatialReference=o,t})}}(n,Z,R,r)),i=[],o=[];for(let r=0;r<j.length;r++){const n=j[r];if("cut"!==n)o.push(n);else{const n=t.shift(),s=e[r];null!=s&&"polygon"===s.type&&s.rings&&s.rings.length>1&&n.rings.length>=s.rings.length?(i.push(n),o.push("simplify")):o.push(u?(0,d.Gh)(n):n)}}if(!i.length)return o;const s=await async function(e,t,r){const i="string"==typeof e?(0,h.An)(e):e,n=t[0].spatialReference,o=(0,y.$B)(t[0]),s={...r,query:{...i.query,f:"json",sr:(0,c.YX)(n),geometries:JSON.stringify((0,g.X)(t))}},{data:a}=await(0,m.A)(i.path+"/simplify",s);return(0,g.V)(a.geometries,o,n)}(n,i,r),a=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?a.push(t):a.push(u?(0,d.Gh)(s.shift()):s.shift())}return a}const B=[];for(let e=0;e<j.length;e++){const t=j[e];if("cut"!==t)B.push(t);else{const e=Z.shift();B.push(!0===u?(0,d.Gh)(e):e)}}return B}function A(e,t,r){const i=(0,c.Vp)(r);if(null==i)return e;const[n,o]=i.valid,s=2*o;let a=0,l=0;t>o?a=Math.ceil(Math.abs(t-o)/s):t<n&&(a=-Math.ceil(Math.abs(t-n)/s)),e>o?l=Math.ceil(Math.abs(e-o)/s):e<n&&(l=-Math.ceil(Math.abs(e-n)/s));let u=e+(a-l)*s;const p=u-t;return p>o?u-=s:p<n&&(u+=s),u}function I(e){const t=(0,c.Vp)(e);if(null==t)return null;const[r,i]=t.valid;return new n.hr(r,i)}const O=I(u.A.WGS84);I(u.A.WebMercator)},24097:(e,t,r)=>{r.d(t,{K:()=>i});const i={type:String,json:{read:{source:"token"},write:{target:"token"}}}},25036:(e,t,r)=>{r.d(t,{j:()=>o});var i=r(31635),n=r(91429);const o=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;void 0!==t?.effectiveScaleRange&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i.Cg)([(0,n.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,n.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.ScaleRangeLayer")],r),r}},34507:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Bt});var i=r(31635),n=r(92602),o=r(52106),s=r(37838),a=r(7762),l=r(49186),u=r(53966),p=r(25728),c=r(93637),d=r(74887),m=r(36708),y=r(86211),f=r(84952),h=r(91429),g=r(46130),v=r(5443),b=r(48526),w=r(91218),T=r(16930),C=r(21325),S=r(4146),M=r(63074),A=r(16131),I=r(8303),O=r(25036),N=r(60694),Z=r(25482),j=r(53930),D=r(33910);let F=class extends Z.o{constructor(e){super(e),this.break=new j.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new j.A({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new j.A({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new j.A({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new j.A({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new j.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,i.Cg)([(0,h.MZ)({types:D.wC})],F.prototype,"break",void 0),(0,i.Cg)([(0,h.MZ)({types:D.wC})],F.prototype,"first",void 0),(0,i.Cg)([(0,h.MZ)({types:D.wC})],F.prototype,"unlocated",void 0),(0,i.Cg)([(0,h.MZ)({types:D.wC})],F.prototype,"last",void 0),(0,i.Cg)([(0,h.MZ)({types:D.wC})],F.prototype,"middle",void 0),(0,i.Cg)([(0,h.MZ)({types:D.wC})],F.prototype,"waypoint",void 0),F=(0,i.Cg)([(0,h.$K)("esri.layers.support.RouteStopSymbols")],F);var x=r(94985),R=r(31593);let B=class extends Z.o{constructor(e){super(e),this.directionLines=new R.A({color:[0,122,194],width:6}),this.directionPoints=new j.A({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new j.A({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new x.A({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new R.A({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new R.A({width:8,color:[20,89,127]}),this.stops=new F}};(0,i.Cg)([(0,h.MZ)({types:D.Y7})],B.prototype,"directionLines",void 0),(0,i.Cg)([(0,h.MZ)({types:D.wC})],B.prototype,"directionPoints",void 0),(0,i.Cg)([(0,h.MZ)({types:D.wC})],B.prototype,"pointBarriers",void 0),(0,i.Cg)([(0,h.MZ)({types:D.Ac})],B.prototype,"polygonBarriers",void 0),(0,i.Cg)([(0,h.MZ)({types:D.Y7})],B.prototype,"polylineBarriers",void 0),(0,i.Cg)([(0,h.MZ)({types:D.Y7})],B.prototype,"routeInfo",void 0),(0,i.Cg)([(0,h.MZ)({type:F})],B.prototype,"stops",void 0),B=(0,i.Cg)([(0,h.$K)("esri.layers.support.RouteSymbols")],B);var _=r(20655),P=r(80812),E=r(10407),L=r(65494),J=r(11254),U=r(2272),k=r(2073),$=r(93223);let W=class extends Z.o{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,i.Cg)([(0,h.MZ)({type:String})],W.prototype,"dataType",void 0),(0,i.Cg)([(0,$.e)(k.et,{ignoreUnknown:!1})],W.prototype,"name",void 0),(0,i.Cg)([(0,h.MZ)({type:[String]})],W.prototype,"parameterNames",void 0),(0,i.Cg)([(0,h.MZ)({type:String})],W.prototype,"restrictionUsageParameterName",void 0),(0,i.Cg)([(0,$.e)(k.Mm,{ignoreUnknown:!1})],W.prototype,"timeNeutralAttributeName",void 0),(0,i.Cg)([(0,h.MZ)({type:String})],W.prototype,"trafficSupport",void 0),(0,i.Cg)([(0,$.e)(k.dn)],W.prototype,"units",void 0),(0,i.Cg)([(0,$.e)(k.WU)],W.prototype,"usageType",void 0),W=(0,i.Cg)([(0,h.$K)("esri.rest.support.NetworkAttribute")],W);const V=W;let G=class extends Z.o{constructor(e){super(e),this.buildTime=null,this.name=null,this.networkAttributes=null,this.networkSources=null,this.state=null}};(0,i.Cg)([(0,h.MZ)({type:Number})],G.prototype,"buildTime",void 0),(0,i.Cg)([(0,h.MZ)({type:String})],G.prototype,"name",void 0),(0,i.Cg)([(0,h.MZ)({type:[V]})],G.prototype,"networkAttributes",void 0),(0,i.Cg)([(0,h.MZ)()],G.prototype,"networkSources",void 0),(0,i.Cg)([(0,h.MZ)({type:String})],G.prototype,"state",void 0),G=(0,i.Cg)([(0,h.$K)("esri.rest.support.NetworkDataset")],G);const q=G;var K=r(69540),z=r(36005),Y=r(43937);let H=class extends((0,K.OU)(Z.o)){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:r}=t;return null==r?null:r.map(e=>k.OC.fromJSON(e))}writeRestrictionAttributes(e,t,r){null!=e&&(t[r]=e.map(e=>k.OC.toJSON(e)))}};(0,i.Cg)([(0,h.MZ)({type:[Object],json:{write:!0}})],H.prototype,"attributeParameterValues",void 0),(0,i.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],H.prototype,"description",void 0),(0,i.Cg)([(0,$.e)(k.dd,{ignoreUnknown:!1})],H.prototype,"distanceAttributeName",void 0),(0,i.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],H.prototype,"id",void 0),(0,i.Cg)([(0,z.w)("id",["id","itemId"])],H.prototype,"readId",null),(0,i.Cg)([(0,$.e)(k.et,{ignoreUnknown:!1})],H.prototype,"impedanceAttributeName",void 0),(0,i.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],H.prototype,"name",void 0),(0,i.Cg)([(0,h.MZ)({type:[String],json:{write:!0}})],H.prototype,"restrictionAttributeNames",void 0),(0,i.Cg)([(0,z.w)("restrictionAttributeNames")],H.prototype,"readRestrictionAttributes",null),(0,i.Cg)([(0,Y.K)("restrictionAttributeNames")],H.prototype,"writeRestrictionAttributes",null),(0,i.Cg)([(0,h.MZ)({type:Number,json:{write:{allowNull:!0}}})],H.prototype,"simplificationTolerance",void 0),(0,i.Cg)([(0,$.e)(k.hY)],H.prototype,"simplificationToleranceUnits",void 0),(0,i.Cg)([(0,$.e)(k.Mm,{ignoreUnknown:!1})],H.prototype,"timeAttributeName",void 0),(0,i.Cg)([(0,$.e)(k.ow)],H.prototype,"type",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],H.prototype,"useHierarchy",void 0),(0,i.Cg)([(0,$.e)(k.hE)],H.prototype,"uturnAtJunctions",void 0),H=(0,i.Cg)([(0,h.$K)("esri.rest.support.TravelMode")],H);let X=class extends Z.o{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=>k.et.fromJSON(e))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map(e=>k.et.toJSON(e)))}get capabilities(){return{supportsNow:(this.currentVersion??10)>=10.81}}readDefaultTravelMode(e,t){const r=t.supportedTravelModes?.find(({id:e})=>e===t.defaultTravelMode)??t.supportedTravelModes?.find(({itemId:e})=>e===t.defaultTravelMode);return r?H.fromJSON(r):null}};function Q(e,t,r,i){i[r]=[t.length,t.length+e.length],e.forEach(e=>{t.push(e.geometry)})}async function ee(e,t,r){if(!e)throw new l.A("network-service:missing-url","Url to Network service is missing");const i=(0,U.jV)({f:"json",token:t},r),{data:n}=await(0,J.A)(e,i),o=n.currentVersion>=10.4?async function(e,t,r){try{const i=(0,U.jV)({f:"json",token:t},r),n=(0,f.UC)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:o,defaultTravelMode:s}}=await(0,J.A)(n,i);return{supportedTravelModes:o,defaultTravelMode:s}}catch(e){throw new l.A("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:e})}}(e,t,r):async function(e,t){const r=(0,U.jV)({f:"json"},t),{data:i}=await(0,J.A)(e.replace(/\/rest\/.*$/i,"/info"),r);if(!i?.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:n}=i,o=(0,f.UC)(n)+"/sharing/rest/portals/self",{data:s}=await(0,J.A)(o,r),a=(0,c.wc)("helperServices.routingUtilities.url",s);if(!a)return{supportedTravelModes:[],defaultTravelMode:null};const l=(0,U.Dl)(n),u=/\/solve$/i.test(l.path)?"Route":/\/solveclosestfacility$/i.test(l.path)?"ClosestFacility":"ServiceAreas",p=(0,U.jV)({f:"json",serviceName:u},t),d=(0,f.UC)(a)+"/GetTravelModes/execute",m=await(0,J.A)(d,p),y=[];let h=null;if(m?.data?.results?.length){const e=m.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&&(h=t.value)}return{supportedTravelModes:y,defaultTravelMode:h}}(e,r),{defaultTravelMode:s,supportedTravelModes:a}=await o;return n.defaultTravelMode=s,n.supportedTravelModes=a,X.fromJSON(n)}(0,i.Cg)([(0,h.MZ)()],X.prototype,"accumulateAttributeNames",void 0),(0,i.Cg)([(0,z.w)("accumulateAttributeNames")],X.prototype,"readAccumulateAttributes",null),(0,i.Cg)([(0,Y.K)("accumulateAttributeNames")],X.prototype,"writeAccumulateAttributes",null),(0,i.Cg)([(0,h.MZ)()],X.prototype,"attributeParameterValues",void 0),(0,i.Cg)([(0,h.MZ)()],X.prototype,"capabilities",null),(0,i.Cg)([(0,h.MZ)()],X.prototype,"currentVersion",void 0),(0,i.Cg)([(0,h.MZ)()],X.prototype,"defaultTravelMode",void 0),(0,i.Cg)([(0,z.w)("defaultTravelMode",["defaultTravelMode","supportedTravelModes"])],X.prototype,"readDefaultTravelMode",null),(0,i.Cg)([(0,h.MZ)()],X.prototype,"directionsLanguage",void 0),(0,i.Cg)([(0,$.e)(k.Z7)],X.prototype,"directionsLengthUnits",void 0),(0,i.Cg)([(0,h.MZ)()],X.prototype,"directionsSupportedLanguages",void 0),(0,i.Cg)([(0,$.e)(k.Mm,{ignoreUnknown:!1})],X.prototype,"directionsTimeAttribute",void 0),(0,i.Cg)([(0,h.MZ)()],X.prototype,"hasZ",void 0),(0,i.Cg)([(0,$.e)(k.et,{ignoreUnknown:!1})],X.prototype,"impedance",void 0),(0,i.Cg)([(0,h.MZ)({type:q})],X.prototype,"networkDataset",void 0),(0,i.Cg)([(0,h.MZ)({type:[H]})],X.prototype,"supportedTravelModes",void 0),X=(0,i.Cg)([(0,h.$K)("esri.rest.support.NetworkServiceDescription")],X);var te=r(16649),re=r(17136);function ie(e,t){if(null==e)return null;const r={},i=new RegExp(`^${t}`,"i");for(const n of Object.keys(e))if(i.test(n)){const i=n.slice(t.length);r[k.et.fromJSON(i)]=e[n]}return r}function ne(e,t,r){if(null!=e){t.attributes||(t.attributes={});for(const i in e){const n=k.et.toJSON(i);t.attributes[`${r}${n}`]=e[i]}}}function oe(e){const t={};for(const r of Object.keys(e)){const i=r;t[k.et.fromJSON(i)]=e[r]}return t}function se(e){const t={};for(const r of Object.keys(e)){const i=r;t[k.et.toJSON(i)]=e[r]}return t}function ae(e,t){return null==e||null==t?null:Math.round((e-t)/6e4)}function le(e){const t=e.toJSON(),r=t;return r.accumulateAttributeNames&&=t.accumulateAttributeNames?.join(),r.attributeParameterValues&&=JSON.stringify(t.attributeParameterValues),r.barriers&&=JSON.stringify(t.barriers),r.locateSettings&&=JSON.stringify(t.locateSettings),r.outSR&&=t.outSR?.wkid,r.overrides&&=JSON.stringify(t.overrides),r.polygonBarriers&&=JSON.stringify(t.polygonBarriers),r.polylineBarriers&&=JSON.stringify(t.polylineBarriers),r.restrictionAttributeNames&&=t.restrictionAttributeNames?.join(),r.stops&&=JSON.stringify(t.stops),r.travelMode&&=JSON.stringify(t.travelMode),r}var ue=r(22671),pe=r(4576),ce=r(66552),de=r(37807);const me=new ce.J({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let ye=class extends de.A{constructor(e){super(e),this.type=null}};(0,i.Cg)([(0,h.MZ)({type:String,json:{read:me.read,write:me.write}})],ye.prototype,"type",void 0),ye=(0,i.Cg)([(0,h.$K)("esri.rest.support.NAMessage")],ye);const fe=ye;var he=r(82799),ge=r(86738);let ve=class extends Z.o{constructor(e){super(e)}};(0,i.Cg)([(0,h.MZ)({json:{read:{source:"string"}}})],ve.prototype,"text",void 0),(0,i.Cg)([(0,$.e)(k.Ec,{name:"stringType"})],ve.prototype,"type",void 0),ve=(0,i.Cg)([(0,h.$K)("esri.rest.support.DirectionsString")],ve);const be=ve;let we=class extends Z.o{constructor(e){super(e),this.arriveTime=null,this.arriveTimeOffset=null,this.geometry=null,this.strings=null}readArriveTimeOffset(e,t){return ae(t.ETA,t.arriveTimeUTC)}readGeometry(e,t){return ge.A.fromJSON(t.point)}};(0,i.Cg)([(0,h.MZ)({type:Date,json:{read:{source:"arriveTimeUTC"}}})],we.prototype,"arriveTime",void 0),(0,i.Cg)([(0,h.MZ)()],we.prototype,"arriveTimeOffset",void 0),(0,i.Cg)([(0,z.w)("arriveTimeOffset",["arriveTimeUTC","ETA"])],we.prototype,"readArriveTimeOffset",null),(0,i.Cg)([(0,h.MZ)({type:ge.A})],we.prototype,"geometry",void 0),(0,i.Cg)([(0,z.w)("geometry",["point"])],we.prototype,"readGeometry",null),(0,i.Cg)([(0,h.MZ)({type:[be]})],we.prototype,"strings",void 0),we=(0,i.Cg)([(0,h.$K)("esri.rest.support.DirectionsEvent")],we);const Te=we;let Ce=class extends o.A{constructor(e){super(e),this.events=null,this.geometry=null,this.strings=null}set attributes(e){super.attributes=e}readGeometry(e,t){const r=function(e){if(null==e||""===e)return null;let t=0,r=0,i=0,n=0;const o=[];let s,a,l,u,p,c,d,m,y=0,f=0,h=0;if(p=e.match(/((\+|-)[^+\-|]+|\|)/g),p||(p=[]),0===parseInt(p[y],32)){y=2;const e=parseInt(p[y],32);y++,c=parseInt(p[y],32),y++,1&e&&(f=p.indexOf("|")+1,d=parseInt(p[f],32),f++),2&e&&(h=p.indexOf("|",f)+1,m=parseInt(p[h],32),h++)}else c=parseInt(p[y],32),y++;for(;y<p.length&&"|"!==p[y];){s=parseInt(p[y],32)+t,y++,t=s,a=parseInt(p[y],32)+r,y++,r=a;const e=[s/c,a/c];f&&(u=parseInt(p[f],32)+i,f++,i=u,e.push(u/d)),h&&(l=parseInt(p[h],32)+n,h++,n=l,e.push(l/m)),o.push(e)}return{paths:[o],hasZ:f>0,hasM:h>0}}(t.compressedGeometry);return null!=r?he.A.fromJSON(r):null}};(0,i.Cg)([(0,h.MZ)({type:[Te]})],Ce.prototype,"events",void 0),(0,i.Cg)([(0,h.MZ)({type:he.A})],Ce.prototype,"geometry",void 0),(0,i.Cg)([(0,z.w)("geometry",["compressedGeometry"])],Ce.prototype,"readGeometry",null),(0,i.Cg)([(0,h.MZ)({type:[be]})],Ce.prototype,"strings",void 0),Ce=(0,i.Cg)([(0,h.$K)("esri.rest.support.DirectionsFeature")],Ce);const Se=Ce;let Me=class extends ue.A{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 r=t.summary.envelope.spatialReference??t.spatialReference,i=r&&T.A.fromJSON(r);return e.map(e=>{const t=Se.fromJSON(e);if(null!=t.geometry&&(t.geometry.spatialReference=i),null!=t.events)for(const e of t.events)null!=e.geometry&&(e.geometry.spatialReference=i);return t})}get mergedGeometry(){return this.features?function(e,t){if(0===e.length)return new he.A({spatialReference:t});const r=[];for(const t of e)for(const e of t.paths)r.push(...e);const i=[];r.forEach((e,t)=>{0!==t&&e[0]===r[t-1][0]&&e[1]===r[t-1][1]||i.push(e)});const{hasM:n,hasZ:o}=e[0];return new he.A({hasM:n,hasZ:o,paths:[i],spatialReference:t})}(this.features.map(({geometry:e})=>e),this.extent.spatialReference):null}get strings(){return this.features.flatMap(({strings:e})=>e).filter(pe.Ru)}};(0,i.Cg)([(0,h.MZ)({type:v.A,json:{read:{source:"summary.envelope"}}})],Me.prototype,"extent",void 0),(0,i.Cg)([(0,h.MZ)({nonNullable:!0})],Me.prototype,"features",void 0),(0,i.Cg)([(0,z.w)("features")],Me.prototype,"readFeatures",null),(0,i.Cg)([(0,h.MZ)()],Me.prototype,"geometryType",void 0),(0,i.Cg)([(0,h.MZ)({readOnly:!0})],Me.prototype,"mergedGeometry",null),(0,i.Cg)([(0,h.MZ)()],Me.prototype,"routeId",void 0),(0,i.Cg)([(0,h.MZ)()],Me.prototype,"routeName",void 0),(0,i.Cg)([(0,h.MZ)({value:null,readOnly:!0})],Me.prototype,"strings",null),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"summary.totalDriveTime"}}})],Me.prototype,"totalDriveTime",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"summary.totalLength"}}})],Me.prototype,"totalLength",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"summary.totalTime"}}})],Me.prototype,"totalTime",void 0),Me=(0,i.Cg)([(0,h.$K)("esri.rest.support.DirectionsFeatureSet")],Me);const Ae=Me;let Ie=class extends Z.o{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,i.Cg)([(0,h.MZ)({type:ue.A,json:{write:!0}})],Ie.prototype,"directionLines",void 0),(0,i.Cg)([(0,h.MZ)({type:ue.A,json:{write:!0}})],Ie.prototype,"directionPoints",void 0),(0,i.Cg)([(0,h.MZ)({type:Ae,json:{write:!0}})],Ie.prototype,"directions",void 0),(0,i.Cg)([(0,h.MZ)({type:o.A,json:{write:!0}})],Ie.prototype,"route",void 0),(0,i.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Ie.prototype,"routeName",void 0),(0,i.Cg)([(0,h.MZ)({type:[o.A],json:{write:!0}})],Ie.prototype,"stops",void 0),(0,i.Cg)([(0,h.MZ)({type:ue.A,json:{write:!0}})],Ie.prototype,"traversedEdges",void 0),(0,i.Cg)([(0,h.MZ)({type:ue.A,json:{write:!0}})],Ie.prototype,"traversedJunctions",void 0),(0,i.Cg)([(0,h.MZ)({type:ue.A,json:{write:!0}})],Ie.prototype,"traversedTurns",void 0),Ie=(0,i.Cg)([(0,h.$K)("esri.rest.support.RouteResult")],Ie);const Oe=Ie;function Ne(e){return e?ue.A.fromJSON(e).features.filter(pe.Ru):[]}let Ze=class extends Z.o{constructor(e){super(e),this.checksum=null,this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(e,t){return Ne(t.barriers)}readPolylineBarriers(e){return Ne(e)}readPolygonBarriers(e){return Ne(e)}};function je(e){return e instanceof ue.A}async function De(e,t,r){const i=[],n=[],o={},s={},a=(0,U.Dl)(e),{path:l}=a;je(t.stops)&&Q(t.stops.features,n,"stops.features",o),je(t.pointBarriers)&&Q(t.pointBarriers.features,n,"pointBarriers.features",o),je(t.polylineBarriers)&&Q(t.polylineBarriers.features,n,"polylineBarriers.features",o),je(t.polygonBarriers)&&Q(t.polygonBarriers.features,n,"polygonBarriers.features",o);const p=await(0,re.el)(n);for(const e in o){const t=o[e];i.push(e),s[e]=p.slice(t[0],t[1])}if(function(e,t){for(let r=0;r<t.length;r++){const i=e[t[r]];if(i&&i.length)for(const e of i)if(null!=e&&e.hasZ)return!0}return!1}(s,i)){let e=null;try{e=await ee(l,t.apiKey,r)}catch{}e&&!e.hasZ&&function(e,t){for(let r=0;r<t.length;r++){const i=e[t[r]];if(i&&i.length)for(const e of i)e.z=void 0}u.A.getLogger("esri.rest.networkService").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.")}(s,i)}for(const e in s)s[e].forEach((r,i)=>{(0,te.Jt)(t,e)[i].geometry=r});const c={...r,query:{...a.query,...le(t),f:"json"}},d=l.endsWith("/solve")?l:`${l}/solve`,{data:m}=await(0,J.A)(d,c);return function(e){const{barriers:t,checksum:r,directionLines:i,directionPoints:n,directions:o,messages:s,polygonBarriers:a,polylineBarriers:l,routes:u,stops:p,traversedEdges:c,traversedJunctions:d,traversedTurns:m}=e,y=e=>{const t=h.find(t=>t.routeName===e);if(null!=t)return t;const r={routeId:h.length+1,routeName:e};return h.push(r),r},f=e=>{const t=h.find(t=>t.routeId===e);if(null!=t)return t;const r={routeId:e,routeName:null};return h.push(r),r},h=[];u?.features.forEach((e,t)=>{e.geometry.spatialReference=u.spatialReference??void 0;const r=e.attributes.Name,i=t+1;h.push({routeId:i,routeName:r,route:e})}),o?.forEach(e=>{const{routeName:t}=e;y(t).directions=e});const g=p?.features.every(e=>null==e.attributes.RouteName)&&h.length>0?h[0].routeName:null;return p?.features.forEach(e=>{e.geometry&&(e.geometry.spatialReference??=p.spatialReference??void 0);const t=g??e.attributes.RouteName,r=y(t);r.stops??=[],r.stops.push(e)}),i?.features.forEach(e=>{const t=e.attributes.RouteID,r=f(t),{geometryType:n,spatialReference:o}=i;r.directionLines??={features:[],geometryType:n,spatialReference:o},r.directionLines.features.push(e)}),n?.features.forEach(e=>{const t=e.attributes.RouteID,r=f(t),{geometryType:i,spatialReference:o}=n;r.directionPoints??={features:[],geometryType:i,spatialReference:o},r.directionPoints.features.push(e)}),c?.features.forEach(e=>{const t=e.attributes.RouteID,r=f(t),{geometryType:i,spatialReference:n}=c;r.traversedEdges??={features:[],geometryType:i,spatialReference:n},r.traversedEdges.features.push(e)}),d?.features.forEach(e=>{const t=e.attributes.RouteID,r=f(t),{geometryType:i,spatialReference:n}=d;r.traversedJunctions??={features:[],geometryType:i,spatialReference:n},r.traversedJunctions.features.push(e)}),m?.features.forEach(e=>{const t=e.attributes.RouteID,r=f(t);r.traversedTurns??={features:[]},r.traversedTurns.features.push(e)}),Ze.fromJSON({barriers:t,checksum:r,messages:s,polygonBarriers:a,polylineBarriers:l,routeResults:h})}(m)}var Fe;(0,i.Cg)([(0,h.MZ)({type:String})],Ze.prototype,"checksum",void 0),(0,i.Cg)([(0,h.MZ)({type:[fe]})],Ze.prototype,"messages",void 0),(0,i.Cg)([(0,h.MZ)({type:[o.A]})],Ze.prototype,"pointBarriers",void 0),(0,i.Cg)([(0,z.w)("pointBarriers",["barriers"])],Ze.prototype,"readPointBarriers",null),(0,i.Cg)([(0,h.MZ)({type:[o.A]})],Ze.prototype,"polylineBarriers",void 0),(0,i.Cg)([(0,z.w)("polylineBarriers")],Ze.prototype,"readPolylineBarriers",null),(0,i.Cg)([(0,h.MZ)({type:[o.A]})],Ze.prototype,"polygonBarriers",void 0),(0,i.Cg)([(0,z.w)("polygonBarriers")],Ze.prototype,"readPolygonBarriers",null),(0,i.Cg)([(0,h.MZ)({type:[Oe]})],Ze.prototype,"routeResults",void 0),Ze=(0,i.Cg)([(0,h.$K)("esri.rest.support.RouteSolveResult")],Ze);let xe=class extends((0,K.OU)(Z.o)){static{Fe=this}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{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"DirectionLineType",alias:"Line Type",type:"esriFieldTypeInteger"},{name:"DirectionPointID",alias:"Direction Point ID",type:"esriFieldTypeInteger"},{name:"FromLevel",alias:"From Level",type:"esriFieldTypeInteger"},{name:"Meters",alias:"Meters",type:"esriFieldTypeDouble"},{name:"Minutes",alias:"Minutes",type:"esriFieldTypeDouble"},{name:"ToLevel",alias:"To Level",type:"esriFieldTypeInteger"}]}static fromGraphic(e){return new Fe({directionLineType:k.gD.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:this.directionLineType?k.gD.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 o.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};var Re;(0,i.Cg)([(0,h.MZ)({type:k.gD.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:k.gD.read}}})],xe.prototype,"directionLineType",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.DirectionPointID"}}})],xe.prototype,"directionPointId",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.Meters"}}})],xe.prototype,"distance",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.Minutes"}}})],xe.prototype,"duration",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.FromLevel"}}})],xe.prototype,"fromLevel",void 0),(0,i.Cg)([(0,h.MZ)({type:he.A})],xe.prototype,"geometry",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.ObjectID"}}})],xe.prototype,"objectId",void 0),(0,i.Cg)([(0,h.MZ)({type:s.A})],xe.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,h.MZ)({types:D.Es})],xe.prototype,"symbol",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.ToLevel"}}})],xe.prototype,"toLevel",void 0),(0,i.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],xe.prototype,"type",void 0),xe=Fe=(0,i.Cg)([(0,h.$K)("esri.rest.support.DirectionLine")],xe);let Be=class extends((0,K.OU)(Z.o)){static{Re=this}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{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AlternateName",alias:"Alternative Name",type:"esriFieldTypeString"},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate"},{name:"ArrivalUTCOffset",alias:"Arrival Time Offset",type:"esriFieldTypeInteger"},{name:"Azimuth",alias:"Azimuth",type:"esriFieldTypeDouble"},{name:"BranchName",alias:"Branch Name",type:"esriFieldTypeString"},{name:"DirectionPointType",alias:"Directions Point Type",type:"esriFieldTypeInteger"},{name:"DisplayText",alias:"Display Text",type:"esriFieldTypeString"},{name:"ExitName",alias:"Exit Name",type:"esriFieldTypeString"},{name:"IntersectingName",alias:"Intersecting Name",type:"esriFieldTypeString"},{name:"Level",alias:"Level",type:"esriFieldTypeInteger"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger"},{name:"ShortVoiceInstruction",alias:"Short Voice Instruction",type:"esriFieldTypeString"},{name:"StopID",alias:"Stop ID",type:"esriFieldTypeInteger"},{name:"TowardName",alias:"Toward Name",type:"esriFieldTypeString"},{name:"VoiceInstruction",alias:"Voice Instruction",type:"esriFieldTypeString"}]}static fromGraphic(e){return new Re({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:k._6.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:this.directionPointType?k._6.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 o.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};var _e;(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.AlternateName"}}})],Be.prototype,"alternateName",void 0),(0,i.Cg)([(0,h.MZ)({type:Date})],Be.prototype,"arrivalTime",void 0),(0,i.Cg)([(0,z.w)("arrivalTime",["attributes.ArrivalTime"])],Be.prototype,"readArrivalTime",null),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],Be.prototype,"arrivalTimeOffset",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.Azimuth"}}})],Be.prototype,"azimuth",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.BranchName"}}})],Be.prototype,"branchName",void 0),(0,i.Cg)([(0,h.MZ)({type:k._6.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:k._6.read}}})],Be.prototype,"directionPointType",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.DisplayText"}}})],Be.prototype,"displayText",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.ExitName"}}})],Be.prototype,"exitName",void 0),(0,i.Cg)([(0,h.MZ)({type:ge.A})],Be.prototype,"geometry",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.IntersectingName"}}})],Be.prototype,"intersectingName",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.Level"}}})],Be.prototype,"level",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.Name"}}})],Be.prototype,"name",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.ObjectID"}}})],Be.prototype,"objectId",void 0),(0,i.Cg)([(0,h.MZ)({type:s.A})],Be.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.Sequence"}}})],Be.prototype,"sequence",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.ShortVoiceInstruction"}}})],Be.prototype,"shortVoiceInstruction",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.StopID"}}})],Be.prototype,"stopId",void 0),(0,i.Cg)([(0,h.MZ)({types:D.Es})],Be.prototype,"symbol",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.TowardName"}}})],Be.prototype,"towardName",void 0),(0,i.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],Be.prototype,"type",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.VoiceInstruction"}}})],Be.prototype,"voiceInstruction",void 0),Be=Re=(0,i.Cg)([(0,h.$K)("esri.rest.support.DirectionPoint")],Be);let Pe=class extends((0,K.OU)(Z.o)){static{_e=this}constructor(e){super(e),this.addedCost=null,this.barrierType=null,this.costs=null,this.curbApproach=null,this.fullEdge=null,this.name=null,this.objectId=null,this.popupTemplate=null,this.positionAlong=null,this.sideOfEdge=null,this.sourceId=null,this.sourceOid=null,this.status=null,this.symbol=null,this.type="point-barrier"}readCosts(e,t){return ie(t.attributes,"Attr_")}writeCosts(e,t){ne(e,t,"Attr_")}set geometry(e){this._get("geometry")&&(this._set("positionAlong",null),this._set("sideOfEdge",null),this._set("sourceId",null),this._set("sourceOid",null),this._set("status",null)),this._set("geometry",e)}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AddedCost",alias:"Added Cost",type:"esriFieldTypeDouble"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger"},{name:"FullEdge",alias:"Full Edge",type:"esriFieldTypeInteger"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"Status",alias:"Status",type:"esriFieldTypeInteger"}]}static fromGraphic(e){return new _e({addedCost:e.attributes.AddedCost??null,barrierType:null!=e.attributes.BarrierType?k.iM.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?oe(JSON.parse(e.attributes.Costs)):null,curbApproach:null!=e.attributes.CurbApproach?k.JJ.fromJSON(e.attributes.CurbApproach):null,fullEdge:null!=e.attributes.FullEdge?k.fe.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?k.$r.fromJSON(e.attributes.Status):null,symbol:e.symbol})}toGraphic(){const e={ObjectID:this.objectId,AddedCost:this.addedCost,BarrierType:this.barrierType?k.iM.toJSON(this.barrierType):null,Costs:this.costs?JSON.stringify(se(this.costs)):null,CurbApproach:this.curbApproach?k.JJ.toJSON(this.curbApproach):null,FullEdge:this.fullEdge?k.fe.toJSON(this.fullEdge):null,Name:this.name,Status:this.status?k.$r.toJSON(this.status):null};return new o.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i.Cg)([(0,h.MZ)()],Pe.prototype,"addedCost",void 0),(0,i.Cg)([(0,h.MZ)({type:k.iM.apiValues,json:{name:"attributes.BarrierType",read:{reader:k.iM.read},write:{writer:k.iM.write}}})],Pe.prototype,"barrierType",void 0),(0,i.Cg)([(0,h.MZ)()],Pe.prototype,"costs",void 0),(0,i.Cg)([(0,z.w)("costs",["attributes"])],Pe.prototype,"readCosts",null),(0,i.Cg)([(0,Y.K)("costs")],Pe.prototype,"writeCosts",null),(0,i.Cg)([(0,h.MZ)({type:k.JJ.apiValues,json:{read:{source:"attributes.CurbApproach",reader:k.JJ.read}}})],Pe.prototype,"curbApproach",void 0),(0,i.Cg)([(0,h.MZ)({type:k.fe.apiValues,json:{name:"attributes.FullEdge",read:{reader:k.fe.read},write:{writer:k.fe.write}}})],Pe.prototype,"fullEdge",void 0),(0,i.Cg)([(0,h.MZ)({type:ge.A,json:{write:!0},value:null})],Pe.prototype,"geometry",null),(0,i.Cg)([(0,h.MZ)({json:{name:"attributes.Name"}})],Pe.prototype,"name",void 0),(0,i.Cg)([(0,h.MZ)({json:{name:"attributes.ObjectID"}})],Pe.prototype,"objectId",void 0),(0,i.Cg)([(0,h.MZ)({type:s.A})],Pe.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,h.MZ)({json:{name:"attributes.PosAlong"}})],Pe.prototype,"positionAlong",void 0),(0,i.Cg)([(0,h.MZ)({type:k.mt.apiValues,json:{name:"attributes.SideOfEdge",read:{reader:k.mt.read},write:{writer:k.mt.write}}})],Pe.prototype,"sideOfEdge",void 0),(0,i.Cg)([(0,h.MZ)({json:{name:"attributes.SourceID"}})],Pe.prototype,"sourceId",void 0),(0,i.Cg)([(0,h.MZ)({json:{name:"attributes.SourceOID"}})],Pe.prototype,"sourceOid",void 0),(0,i.Cg)([(0,h.MZ)({type:k.$r.apiValues,json:{read:{source:"attributes.Status",reader:k.$r.read}}})],Pe.prototype,"status",void 0),(0,i.Cg)([(0,h.MZ)({types:D.Es})],Pe.prototype,"symbol",void 0),(0,i.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],Pe.prototype,"type",void 0),Pe=_e=(0,i.Cg)([(0,h.$K)("esri.rest.support.PointBarrier")],Pe);var Ee,Le=r(39829);let Je=class extends((0,K.OU)(Z.o)){static{Ee=this}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 ie(t.attributes,"Attr_")}writeCosts(e,t){ne(e,t,"Attr_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble"}]}static fromGraphic(e){return new Ee({barrierType:null!=e.attributes.BarrierType?k.iM.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?oe(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:this.barrierType?k.iM.toJSON(this.barrierType):null,Costs:this.costs?JSON.stringify(se(this.costs)):null,Name:this.name??null,ScaleFactor:this.scaleFactor??null};return new o.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};var Ue;(0,i.Cg)([(0,h.MZ)({type:k.iM.apiValues,json:{name:"attributes.BarrierType",read:{reader:k.iM.read},write:{writer:k.iM.write}}})],Je.prototype,"barrierType",void 0),(0,i.Cg)([(0,h.MZ)()],Je.prototype,"costs",void 0),(0,i.Cg)([(0,z.w)("costs",["attributes"])],Je.prototype,"readCosts",null),(0,i.Cg)([(0,Y.K)("costs")],Je.prototype,"writeCosts",null),(0,i.Cg)([(0,h.MZ)({type:Le.A,json:{write:!0}})],Je.prototype,"geometry",void 0),(0,i.Cg)([(0,h.MZ)({json:{name:"attributes.Name"}})],Je.prototype,"name",void 0),(0,i.Cg)([(0,h.MZ)({json:{name:"attributes.ObjectID"}})],Je.prototype,"objectId",void 0),(0,i.Cg)([(0,h.MZ)({type:s.A})],Je.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,h.MZ)()],Je.prototype,"scaleFactor",void 0),(0,i.Cg)([(0,h.MZ)({types:D.Es})],Je.prototype,"symbol",void 0),(0,i.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],Je.prototype,"type",void 0),Je=Ee=(0,i.Cg)([(0,h.$K)("esri.rest.support.PolygonBarrier")],Je);let ke=class extends((0,K.OU)(Z.o)){static{Ue=this}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 ie(t.attributes,"Attr_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger"},{name:"Costs",alias:"Costs",type:"esriFieldTypeString"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble"}]}static fromGraphic(e){return new Ue({barrierType:null!=e.attributes.BarrierType?k.iM.fromJSON(e.attributes.BarrierType):null,costs:null!=e.attributes.Costs?oe(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:this.barrierType?k.iM.toJSON(this.barrierType):null,Costs:this.costs?JSON.stringify(se(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new o.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i.Cg)([(0,h.MZ)({type:k.iM.apiValues,json:{read:{source:"attributes.BarrierType",reader:k.iM.read}}})],ke.prototype,"barrierType",void 0),(0,i.Cg)([(0,h.MZ)()],ke.prototype,"costs",void 0),(0,i.Cg)([(0,z.w)("costs",["attributes"])],ke.prototype,"readCosts",null),(0,i.Cg)([(0,h.MZ)({type:he.A,json:{write:!0}})],ke.prototype,"geometry",void 0),(0,i.Cg)([(0,h.MZ)({json:{name:"attributes.Name"}})],ke.prototype,"name",void 0),(0,i.Cg)([(0,h.MZ)({json:{name:"attributes.ObjectID"}})],ke.prototype,"objectId",void 0),(0,i.Cg)([(0,h.MZ)({type:s.A})],ke.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,h.MZ)()],ke.prototype,"scaleFactor",void 0),(0,i.Cg)([(0,h.MZ)({types:D.Es})],ke.prototype,"symbol",void 0),(0,i.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],ke.prototype,"type",void 0),ke=Ue=(0,i.Cg)([(0,h.$K)("esri.rest.support.PolylineBarrier")],ke);let $e=class extends Z.o{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=>k.et.fromJSON(e))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map(e=>k.et.toJSON(e)))}};var We;(0,i.Cg)([(0,h.MZ)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],$e.prototype,"accumulateAttributes",void 0),(0,i.Cg)([(0,z.w)("accumulateAttributes")],$e.prototype,"readAccumulateAttributes",null),(0,i.Cg)([(0,Y.K)("accumulateAttributes")],$e.prototype,"writeAccumulateAttributes",null),(0,i.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],$e.prototype,"directionsLanguage",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],$e.prototype,"findBestSequence",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],$e.prototype,"preserveFirstStop",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],$e.prototype,"preserveLastStop",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],$e.prototype,"startTimeIsUTC",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],$e.prototype,"timeWindowsAreUTC",void 0),(0,i.Cg)([(0,h.MZ)({type:H,json:{write:!0}})],$e.prototype,"travelMode",void 0),$e=(0,i.Cg)([(0,h.$K)("esri.rest.support.RouteSettings")],$e);let Ve=class extends((0,K.OU)(Z.o)){static{We=this}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 ae(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return null!=t.attributes.StartTimeUTC?new Date(t.attributes.StartTimeUTC):null}readStartTimeOffset(e,t){return ae(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return ie(t.attributes,"Total_")}readTotalViolations(e,t){return ie(t.attributes,"TotalViolation_")}readTotalWait(e,t){return ie(t.attributes,"TotalWait_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"AnalysisSettings",alias:"Analysis Settings",type:"esriFieldTypeString"},{name:"EndTime",alias:"End Time",type:"esriFieldTypeDate"},{name:"EndUTCOffset",alias:"End Time Offset",type:"esriFieldTypeInteger"},{name:"Messages",alias:"Messages",type:"esriFieldTypeString"},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString"},{name:"StartTime",alias:"Start Time",type:"esriFieldTypeDate"},{name:"StartUTCOffset",alias:"Start Time Offset",type:"esriFieldTypeInteger"},{name:"TotalCosts",alias:"Total Costs",type:"esriFieldTypeString"},{name:"TotalLateMinutes",alias:"Total Late Minutes",type:"esriFieldTypeDouble"},{name:"TotalMeters",alias:"Total Meters",type:"esriFieldTypeDouble"},{name:"TotalMinutes",alias:"Total Minutes",type:"esriFieldTypeDouble"},{name:"TotalWaitMinutes",alias:"Total Wait Minutes",type:"esriFieldTypeDouble"},{name:"Version",alias:"Version",type:"esriFieldTypeString"}]}static fromGraphic(e){return new We({analysisSettings:null!=e.attributes.AnalysisSettings?$e.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?oe(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:this.analysisSettings?JSON.stringify(this.analysisSettings.toJSON()):null,EndTime:this.endTime?.getTime()??null,EndUTCOffset:this.endTimeOffset,Messages:this.messages?JSON.stringify(this.messages):null,RouteName:this.name,StartTime:this.startTime?.getTime()??null,StartUTCOffset:this.startTimeOffset,TotalCosts:this.totalCosts?JSON.stringify(se(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:this.version};return new o.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i.Cg)([(0,h.MZ)()],Ve.prototype,"analysisSettings",void 0),(0,i.Cg)([(0,h.MZ)({type:Date})],Ve.prototype,"endTime",void 0),(0,i.Cg)([(0,z.w)("endTime",["attributes.EndTimeUTC"])],Ve.prototype,"readEndTime",null),(0,i.Cg)([(0,h.MZ)()],Ve.prototype,"endTimeOffset",void 0),(0,i.Cg)([(0,z.w)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],Ve.prototype,"readEndTimeOffset",null),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.FirstStopID"}}})],Ve.prototype,"firstStopId",void 0),(0,i.Cg)([(0,h.MZ)({type:he.A})],Ve.prototype,"geometry",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.LastStopID"}}})],Ve.prototype,"lastStopId",void 0),(0,i.Cg)([(0,h.MZ)()],Ve.prototype,"messages",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.Name"}}})],Ve.prototype,"name",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.ObjectID"}}})],Ve.prototype,"objectId",void 0),(0,i.Cg)([(0,h.MZ)({type:s.A})],Ve.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,h.MZ)({type:Date})],Ve.prototype,"startTime",void 0),(0,i.Cg)([(0,z.w)("startTime",["attributes.StartTimeUTC"])],Ve.prototype,"readStartTime",null),(0,i.Cg)([(0,h.MZ)()],Ve.prototype,"startTimeOffset",void 0),(0,i.Cg)([(0,z.w)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],Ve.prototype,"readStartTimeOffset",null),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.StopCount"}}})],Ve.prototype,"stopCount",void 0),(0,i.Cg)([(0,h.MZ)({types:D.Es})],Ve.prototype,"symbol",void 0),(0,i.Cg)([(0,h.MZ)()],Ve.prototype,"totalCosts",void 0),(0,i.Cg)([(0,z.w)("totalCosts",["attributes"])],Ve.prototype,"readTotalCosts",null),(0,i.Cg)([(0,h.MZ)()],Ve.prototype,"totalDistance",void 0),(0,i.Cg)([(0,h.MZ)()],Ve.prototype,"totalDuration",void 0),(0,i.Cg)([(0,h.MZ)()],Ve.prototype,"totalLateDuration",void 0),(0,i.Cg)([(0,h.MZ)()],Ve.prototype,"totalViolations",void 0),(0,i.Cg)([(0,z.w)("totalViolations",["attributes"])],Ve.prototype,"readTotalViolations",null),(0,i.Cg)([(0,h.MZ)()],Ve.prototype,"totalWait",void 0),(0,i.Cg)([(0,z.w)("totalWait",["attributes"])],Ve.prototype,"readTotalWait",null),(0,i.Cg)([(0,h.MZ)()],Ve.prototype,"totalWaitDuration",void 0),(0,i.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],Ve.prototype,"type",void 0),(0,i.Cg)([(0,h.MZ)()],Ve.prototype,"version",void 0),Ve=We=(0,i.Cg)([(0,h.$K)("esri.rest.support.RouteInfo")],Ve);var Ge=r(56507),qe=r(24097),Ke=r(65864),ze=r(50498);let Ye=class extends((0,K.OU)(Z.o)){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,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],Ye.prototype,"doNotLocateOnRestrictedElements",void 0),(0,i.Cg)([(0,h.MZ)({types:ze.yR,json:{read:Ke.rS,write:!0}})],Ye.prototype,"geometry",void 0),(0,i.Cg)([(0,$.e)(k.Vj)],Ye.prototype,"geometryType",void 0),(0,i.Cg)([(0,h.MZ)({type:String,json:{name:"layerName",write:!0}})],Ye.prototype,"name",void 0),(0,i.Cg)([(0,$.e)(k.vS,{name:"spatialRel"})],Ye.prototype,"spatialRelationship",void 0),(0,i.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Ye.prototype,"type",void 0),(0,i.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Ye.prototype,"where",void 0),Ye=(0,i.Cg)([(0,h.$K)("esri.rest.support.DataLayer")],Ye);var He=r(10107),Xe=r(64108);let Qe=class extends((0,K.OU)(Z.o)){constructor(e){super(e),this.name=null,this.where=null}};(0,i.Cg)([(0,He.MZ)({json:{write:!0}})],Qe.prototype,"name",void 0),(0,i.Cg)([(0,He.MZ)({json:{write:!0}})],Qe.prototype,"where",void 0),Qe=(0,i.Cg)([(0,Xe.$)("esri.rest.support.LocateSettingSource")],Qe);const et=Qe;let tt=class extends((0,K.OU)(Z.o)){constructor(e){super(e),this.allowAutoRelocate=null,this.sources=null}};(0,i.Cg)([(0,He.MZ)({type:Boolean,json:{write:!0}})],tt.prototype,"allowAutoRelocate",void 0),(0,i.Cg)([(0,He.MZ)({type:[et],json:{write:!0}})],tt.prototype,"sources",void 0),tt=(0,i.Cg)([(0,Xe.$)("esri.rest.support.LocateSettingBase")],tt);const rt=tt;let it=class extends rt{constructor(e){super(e),this.tolerance=null,this.toleranceUnits=null}};(0,i.Cg)([(0,He.MZ)({type:Number,json:{write:!0}})],it.prototype,"tolerance",void 0),(0,i.Cg)([(0,$.e)(k.Y8)],it.prototype,"toleranceUnits",void 0),it=(0,i.Cg)([(0,Xe.$)("esri.rest.support.LocateSetting")],it);const nt=it;let ot=class extends((0,K.OU)(Z.o)){constructor(e){super(e),this.stops=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null}};(0,i.Cg)([(0,He.MZ)({type:nt,json:{write:!0}})],ot.prototype,"stops",void 0),(0,i.Cg)([(0,He.MZ)({type:nt,json:{name:"barriers",write:!0}})],ot.prototype,"pointBarriers",void 0),(0,i.Cg)([(0,He.MZ)({type:rt,json:{write:!0}})],ot.prototype,"polylineBarriers",void 0),(0,i.Cg)([(0,He.MZ)({type:rt,json:{write:!0}})],ot.prototype,"polygonBarriers",void 0),ot=(0,i.Cg)([(0,Xe.$)("esri.rest.support.LocateSettingsOverrides")],ot);const st=ot;let at=class extends((0,K.OU)(Z.o)){constructor(e){super(e),this.default=null,this.overrides=null}};(0,i.Cg)([(0,He.MZ)({type:nt,json:{write:!0}})],at.prototype,"default",void 0),(0,i.Cg)([(0,He.MZ)({type:st,json:{write:!0}})],at.prototype,"overrides",void 0),at=(0,i.Cg)([(0,Xe.$)("esri.rest.support.LocateSettings")],at);const lt=at;var ut;let pt=class extends ue.A{static{ut=this}constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new ut({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"doNotLocateOnRestrictedElements",void 0),pt=ut=(0,i.Cg)([(0,h.$K)("esri.rest.support.NetworkFeatureSet")],pt);let ct=class extends((0,K.OU)(Z.o)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};var dt;(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],ct.prototype,"doNotLocateOnRestrictedElements",void 0),(0,i.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],ct.prototype,"url",void 0),ct=(0,i.Cg)([(0,h.$K)("esri.rest.support.NetworkUrl")],ct);let mt=class extends((0,K.OU)(Z.o)){static{dt=this}constructor(e){super(e),this.accumulateAttributes=null,this.apiKey=null,this.attributeParameterValues=null,this.checksum=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.locateSettings=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.returnEmptyResults=null,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,Ge.PZ)(dt,e)}readAccumulateAttributes(e){return null==e?null:e.map(e=>k.et.fromJSON(e))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map(e=>k.et.toJSON(e)))}writePointBarriers(e,t,r){yt(e,t,r)}writePolygonBarrier(e,t,r){yt(e,t,r)}writePolylineBarrier(e,t,r){yt(e,t,r)}readRestrictionAttributes(e){return null==e?null:e.map(e=>k.OC.fromJSON(e))}writeRestrictionAttributes(e,t,r){e?.length&&(t[r]=e.map(e=>k.OC.toJSON(e)))}readStartTime(e,t){const{startTime:r}=t;return null==r?null:"now"===r?"now":new Date(r)}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)?Ye.fromJSON(e):function(e){return e&&"url"in e}(e)?ct.fromJSON(e):function(e){return e&&"features"in e&&"doNotLocateOnRestrictedElements"in e}(e)?pt.fromJSON(e):function(e){return e&&"features"in e}(e)?ue.A.fromJSON(e):null}(t.stops)}writeStops(e,t,r){yt(e,t,r)}};function yt(e,t,r){null!=e&&(t[r]=a.A.isCollection(e)?{features:e.toArray().map(e=>e.toJSON())}:e.toJSON())}var ft;(0,i.Cg)([(0,h.MZ)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],mt.prototype,"accumulateAttributes",void 0),(0,i.Cg)([(0,z.w)("accumulateAttributes")],mt.prototype,"readAccumulateAttributes",null),(0,i.Cg)([(0,Y.K)("accumulateAttributes")],mt.prototype,"writeAccumulateAttributes",null),(0,i.Cg)([(0,h.MZ)(qe.K)],mt.prototype,"apiKey",void 0),(0,i.Cg)([(0,h.MZ)({json:{write:!0}})],mt.prototype,"attributeParameterValues",void 0),(0,i.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],mt.prototype,"checksum",void 0),(0,i.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],mt.prototype,"directionsLanguage",void 0),(0,i.Cg)([(0,$.e)(k.Z7)],mt.prototype,"directionsLengthUnits",void 0),(0,i.Cg)([(0,$.e)(k.aJ)],mt.prototype,"directionsOutputType",void 0),(0,i.Cg)([(0,$.e)(k.$n)],mt.prototype,"directionsStyleName",void 0),(0,i.Cg)([(0,$.e)(k.Mm,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],mt.prototype,"directionsTimeAttribute",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],mt.prototype,"findBestSequence",void 0),(0,i.Cg)([(0,h.MZ)({type:Number,json:{write:!0}})],mt.prototype,"geometryPrecision",void 0),(0,i.Cg)([(0,h.MZ)({type:Number,json:{write:!0}})],mt.prototype,"geometryPrecisionM",void 0),(0,i.Cg)([(0,h.MZ)({type:Number,json:{write:!0}})],mt.prototype,"geometryPrecisionZ",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],mt.prototype,"ignoreInvalidLocations",void 0),(0,i.Cg)([(0,$.e)(k.et,{name:"impedanceAttributeName",ignoreUnknown:!1})],mt.prototype,"impedanceAttribute",void 0),(0,i.Cg)([(0,h.MZ)({type:lt,json:{write:!0}})],mt.prototype,"locateSettings",void 0),(0,i.Cg)([(0,h.MZ)({type:Number,json:{write:!0}})],mt.prototype,"outputGeometryPrecision",void 0),(0,i.Cg)([(0,$.e)(k.hY)],mt.prototype,"outputGeometryPrecisionUnits",void 0),(0,i.Cg)([(0,$.e)(k.Sr)],mt.prototype,"outputLines",void 0),(0,i.Cg)([(0,h.MZ)({type:T.A,json:{name:"outSR",write:!0}})],mt.prototype,"outSpatialReference",void 0),(0,i.Cg)([(0,h.MZ)({json:{write:!0}})],mt.prototype,"overrides",void 0),(0,i.Cg)([(0,h.MZ)({json:{name:"barriers",write:!0}})],mt.prototype,"pointBarriers",void 0),(0,i.Cg)([(0,Y.K)("pointBarriers")],mt.prototype,"writePointBarriers",null),(0,i.Cg)([(0,h.MZ)({json:{write:!0}})],mt.prototype,"polygonBarriers",void 0),(0,i.Cg)([(0,Y.K)("polygonBarriers")],mt.prototype,"writePolygonBarrier",null),(0,i.Cg)([(0,h.MZ)({json:{write:!0}})],mt.prototype,"polylineBarriers",void 0),(0,i.Cg)([(0,Y.K)("polylineBarriers")],mt.prototype,"writePolylineBarrier",null),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],mt.prototype,"preserveFirstStop",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],mt.prototype,"preserveLastStop",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],mt.prototype,"preserveObjectID",void 0),(0,i.Cg)([(0,h.MZ)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],mt.prototype,"restrictionAttributes",void 0),(0,i.Cg)([(0,z.w)("restrictionAttributes")],mt.prototype,"readRestrictionAttributes",null),(0,i.Cg)([(0,Y.K)("restrictionAttributes")],mt.prototype,"writeRestrictionAttributes",null),(0,i.Cg)([(0,$.e)(k.hE)],mt.prototype,"restrictUTurns",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],mt.prototype,"returnBarriers",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],mt.prototype,"returnDirections",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],mt.prototype,"returnEmptyResults",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],mt.prototype,"returnPolygonBarriers",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],mt.prototype,"returnPolylineBarriers",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],mt.prototype,"returnRoutes",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],mt.prototype,"returnStops",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],mt.prototype,"returnTraversedEdges",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],mt.prototype,"returnTraversedJunctions",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],mt.prototype,"returnTraversedTurns",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],mt.prototype,"returnZ",void 0),(0,i.Cg)([(0,h.MZ)({json:{write:!0}})],mt.prototype,"startTime",void 0),(0,i.Cg)([(0,z.w)("startTime")],mt.prototype,"readStartTime",null),(0,i.Cg)([(0,Y.K)("startTime")],mt.prototype,"writeStartTime",null),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],mt.prototype,"startTimeIsUTC",void 0),(0,i.Cg)([(0,h.MZ)({json:{write:!0}})],mt.prototype,"stops",void 0),(0,i.Cg)([(0,z.w)("stops")],mt.prototype,"readStops",null),(0,i.Cg)([(0,Y.K)("stops")],mt.prototype,"writeStops",null),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],mt.prototype,"timeWindowsAreUTC",void 0),(0,i.Cg)([(0,h.MZ)({type:H,json:{write:!0}})],mt.prototype,"travelMode",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],mt.prototype,"useHierarchy",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,json:{write:!0}})],mt.prototype,"useTimeWindows",void 0),mt=dt=(0,i.Cg)([(0,h.$K)("esri.rest.support.RouteParameters")],mt);let ht=class extends((0,K.OU)(Z.o)){static{ft=this}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.lateDuration=null,this.locationType=null,this.name=null,this.navLatency=null,this.objectId=null,this.popupTemplate=null,this.positionAlong=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 ae(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return ie(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return ae(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}set geometry(e){this._get("geometry")&&(this._set("positionAlong",null),this._set("sideOfEdge",null),this._set("sourceId",null),this._set("sourceOid",null),this._set("status",null)),this._set("geometry",e)}readServiceCosts(e,t){return ie(t.attributes,"Attr_")}writeServiceCosts(e,t){ne(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 ie(t.attributes,"Violation_")}readWait(e,t){return ie(t.attributes,"Wait_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID"},{name:"ArrivalCurbApproach",alias:"Arrival Curb Approach",type:"esriFieldTypeInteger"},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate"},{name:"ArrivalUTCOffset",alias:"Arrival Time",type:"esriFieldTypeInteger"},{name:"CumulativeCosts",alias:"Cumulative Costs",type:"esriFieldTypeString"},{name:"CumulativeMeters",alias:"Cumulative Meters",type:"esriFieldTypeDouble"},{name:"CumulativeMinutes",alias:"Cumulative Minutes",type:"esriFieldTypeDouble"},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger"},{name:"DepartureCurbApproach",alias:"Departure Curb Approach",type:"esriFieldTypeInteger"},{name:"DepartureTime",alias:"Departure Time",type:"esriFieldTypeDate"},{name:"DepartureUTCOffset",alias:"Departure Time",type:"esriFieldTypeInteger"},{name:"LateMinutes",alias:"Minutes Late",type:"esriFieldTypeDouble"},{name:"LocationType",alias:"Location Type",type:"esriFieldTypeInteger"},{name:"Name",alias:"Name",type:"esriFieldTypeString"},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString"},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger"},{name:"ServiceCosts",alias:"Service Costs",type:"esriFieldTypeString"},{name:"ServiceMeters",alias:"Service Meters",type:"esriFieldTypeDouble"},{name:"ServiceMinutes",alias:"Service Minutes",type:"esriFieldTypeDouble"},{name:"Status",alias:"Status",type:"esriFieldTypeInteger"},{name:"TimeWindowEnd",alias:"Time Window End",type:"esriFieldTypeDate"},{name:"TimeWindowEndUTCOffset",alias:"Time Window End Offset",type:"esriFieldTypeInteger"},{name:"TimeWindowStart",alias:"Time Window Start",type:"esriFieldTypeDate"},{name:"TimeWindowStartUTCOffset",alias:"Time Window Start Offset",type:"esriFieldTypeInteger"},{name:"WaitMinutes",alias:"Minutes Wait",type:"esriFieldTypeDouble"}]}static fromGraphic(e){return new ft({arriveCurbApproach:null!=e.attributes.ArrivalCurbApproach?k.JJ.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?oe(JSON.parse(e.attributes.CumulativeCosts)):null,cumulativeDistance:e.attributes.CumulativeMeters??null,cumulativeDuration:e.attributes.CumulativeMinutes??null,curbApproach:null!=e.attributes.CurbApproach?k.JJ.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:null!=e.attributes.DepartureCurbApproach?k.JJ.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?k.EM.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?oe(JSON.parse(e.attributes.ServiceCosts)):null,serviceDistance:e.attributes.ServiceMeters??null,serviceDuration:e.attributes.ServiceMinutes??null,status:null!=e.attributes.Status?k.$r.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:this.arriveCurbApproach?k.JJ.toJSON(this.arriveCurbApproach):null,ArrivalTime:this.arriveTime?.getTime()??null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:this.cumulativeCosts?JSON.stringify(se(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:this.curbApproach?k.JJ.toJSON(this.curbApproach):null,DepartureCurbApproach:this.departCurbApproach?k.JJ.toJSON(this.departCurbApproach):null,DepartureTime:this.departTime?.getTime()??null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:this.locationType?k.EM.toJSON(this.locationType):null,Name:this.name,RouteName:this.routeName,Sequence:this.sequence,ServiceCosts:this.serviceCosts?JSON.stringify(se(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:this.status?k.$r.toJSON(this.status):null,TimeWindowEnd:this.timeWindowEnd?.getTime()??null,TimeWindowEndUTCOffset:this.timeWindowEndOffset??this.arriveTimeOffset,TimeWindowStart:this.timeWindowStart?.getTime()??null,TimeWindowStartUTCOffset:this.timeWindowStartOffset??this.arriveTimeOffset,WaitMinutes:this.waitDuration};return new o.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};function gt(e){if(!e.length)return;const t=e.toArray(),r=t.map(({objectId:e})=>e).filter(e=>null!=e);let i=Math.max(...r,0);for(const e of t)e.objectId??=++i}function vt(e,t){return e.length===t.length&&bt(e)&&bt(t)}function bt(e){return e.every(({objectId:e})=>null!=e)}function wt(e,t){return!!e.length||!!t.length}function Tt(e){return e.length?e:null}function Ct(e){switch(e){case"esriGeometryPoint":return{type:"esriSMS",style:"esriSMSCircle",size:12,color:[0,0,0,0],outline:Ct("esriGeometryPolyline")};case"esriGeometryPolyline":return{type:"esriSLS",style:"esriSLSSolid",width:1,color:[0,0,0,0]};case"esriGeometryPolygon":return{type:"esriSFS",style:"esriSFSNull",outline:Ct("esriGeometryPolyline")}}}function St(e){return"layers"in e}async function Mt(e){const t=T.A.WGS84;return await(0,w.initializeProjection)(e.spatialReference,t),(0,w.project)(e,t)}function At(e,t){if(t&&e?.length&&!e.every(({symbol:e})=>!!e))for(const r of e)r.symbol=t}function It(e,t){switch(t){case"seconds":return e/60;case"hours":return 60*e;case"days":return 60*e*24;default:return e}}function Ot(e,t){return"decimal-degrees"===t||"points"===t||"unknown"===t?e:(0,y.oU)(e,t,"meters")}(0,i.Cg)([(0,h.MZ)({type:k.JJ.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:k.JJ.read}}})],ht.prototype,"arriveCurbApproach",void 0),(0,i.Cg)([(0,h.MZ)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],ht.prototype,"arriveTime",void 0),(0,i.Cg)([(0,h.MZ)()],ht.prototype,"arriveTimeOffset",void 0),(0,i.Cg)([(0,z.w)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],ht.prototype,"readArriveTimeOffset",null),(0,i.Cg)([(0,h.MZ)({json:{name:"attributes.Bearing",read:!1,write:!0}})],ht.prototype,"bearing",void 0),(0,i.Cg)([(0,h.MZ)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],ht.prototype,"bearingTol",void 0),(0,i.Cg)([(0,h.MZ)()],ht.prototype,"cumulativeCosts",void 0),(0,i.Cg)([(0,z.w)("cumulativeCosts",["attributes"])],ht.prototype,"readCumulativeCosts",null),(0,i.Cg)([(0,h.MZ)()],ht.prototype,"cumulativeDistance",void 0),(0,i.Cg)([(0,h.MZ)()],ht.prototype,"cumulativeDuration",void 0),(0,i.Cg)([(0,h.MZ)({type:k.JJ.apiValues,json:{name:"attributes.CurbApproach",read:{reader:k.JJ.read},write:{writer:k.JJ.write}}})],ht.prototype,"curbApproach",void 0),(0,i.Cg)([(0,h.MZ)({type:k.JJ.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:k.JJ.read}}})],ht.prototype,"departCurbApproach",void 0),(0,i.Cg)([(0,h.MZ)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],ht.prototype,"departTime",void 0),(0,i.Cg)([(0,h.MZ)()],ht.prototype,"departTimeOffset",void 0),(0,i.Cg)([(0,z.w)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],ht.prototype,"readDepartTimeOffset",null),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],ht.prototype,"distanceToNetworkInMeters",void 0),(0,i.Cg)([(0,h.MZ)({type:ge.A,json:{write:!0},value:null})],ht.prototype,"geometry",null),(0,i.Cg)([(0,h.MZ)()],ht.prototype,"lateDuration",void 0),(0,i.Cg)([(0,h.MZ)({type:k.EM.apiValues,json:{name:"attributes.LocationType",read:{reader:k.EM.read},write:{writer:k.EM.write}}})],ht.prototype,"locationType",void 0),(0,i.Cg)([(0,h.MZ)({json:{name:"attributes.Name"}})],ht.prototype,"name",void 0),(0,i.Cg)([(0,h.MZ)({json:{name:"attributes.NavLatency",read:!1,write:!0}})],ht.prototype,"navLatency",void 0),(0,i.Cg)([(0,h.MZ)({json:{name:"attributes.ObjectID"}})],ht.prototype,"objectId",void 0),(0,i.Cg)([(0,h.MZ)({type:s.A})],ht.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,h.MZ)({json:{name:"attributes.PosAlong"}})],ht.prototype,"positionAlong",void 0),(0,i.Cg)([(0,h.MZ)({json:{name:"attributes.RouteName"}})],ht.prototype,"routeName",void 0),(0,i.Cg)([(0,h.MZ)()],ht.prototype,"serviceCosts",void 0),(0,i.Cg)([(0,z.w)("serviceCosts",["attributes"])],ht.prototype,"readServiceCosts",null),(0,i.Cg)([(0,Y.K)("serviceCosts")],ht.prototype,"writeServiceCosts",null),(0,i.Cg)([(0,h.MZ)()],ht.prototype,"serviceDistance",void 0),(0,i.Cg)([(0,h.MZ)()],ht.prototype,"serviceDuration",void 0),(0,i.Cg)([(0,h.MZ)({json:{name:"attributes.Sequence"}})],ht.prototype,"sequence",void 0),(0,i.Cg)([(0,h.MZ)({type:k.mt.apiValues,json:{name:"attributes.SideOfEdge",read:{reader:k.mt.read},write:{writer:k.mt.write}}})],ht.prototype,"sideOfEdge",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.SnapX"}}})],ht.prototype,"snapX",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.SnapY"}}})],ht.prototype,"snapY",void 0),(0,i.Cg)([(0,h.MZ)({json:{read:{source:"attributes.SnapZ"}}})],ht.prototype,"snapZ",void 0),(0,i.Cg)([(0,h.MZ)({json:{name:"attributes.SourceID"}})],ht.prototype,"sourceId",void 0),(0,i.Cg)([(0,h.MZ)({json:{name:"attributes.SourceOID"}})],ht.prototype,"sourceOid",void 0),(0,i.Cg)([(0,h.MZ)({type:k.$r.apiValues,json:{name:"attributes.Status",read:{reader:k.$r.read},write:{writer:k.$r.write}}})],ht.prototype,"status",void 0),(0,i.Cg)([(0,h.MZ)({types:D.Es})],ht.prototype,"symbol",void 0),(0,i.Cg)([(0,h.MZ)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],ht.prototype,"timeWindowEnd",void 0),(0,i.Cg)([(0,Y.K)("timeWindowEnd")],ht.prototype,"writeTimeWindowEnd",null),(0,i.Cg)([(0,h.MZ)()],ht.prototype,"timeWindowEndOffset",void 0),(0,i.Cg)([(0,h.MZ)({type:Date,json:{name:"attributes.TimeWindowStart"}})],ht.prototype,"timeWindowStart",void 0),(0,i.Cg)([(0,Y.K)("timeWindowStart")],ht.prototype,"writeTimeWindowStart",null),(0,i.Cg)([(0,h.MZ)()],ht.prototype,"timeWindowStartOffset",void 0),(0,i.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],ht.prototype,"type",void 0),(0,i.Cg)([(0,h.MZ)()],ht.prototype,"violations",void 0),(0,i.Cg)([(0,z.w)("violations",["attributes"])],ht.prototype,"readViolations",null),(0,i.Cg)([(0,h.MZ)()],ht.prototype,"waitDuration",void 0),(0,i.Cg)([(0,h.MZ)()],ht.prototype,"wait",void 0),(0,i.Cg)([(0,z.w)("wait",["attributes"])],ht.prototype,"readWait",null),ht=ft=(0,i.Cg)([(0,h.$K)("esri.rest.support.Stop")],ht);const Nt=a.A.ofType(xe),Zt=a.A.ofType(Be),jt=a.A.ofType(Pe),Dt=a.A.ofType(Je),Ft=a.A.ofType(ke),xt=a.A.ofType(ht);let Rt=class extends((0,M.dM)((0,O.j)((0,A.q)((0,I.A)((0,p.P)(S.A)))))){constructor(e){super(e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.checksum=null,this.defaultSymbols=new B,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new jt,this.polygonBarriers=new Dt,this.polylineBarriers=new Ft,this.routeInfo=null,this.spatialReference=T.A.WGS84,this.stops=new xt,this.type="route";const t=()=>{this._setStopSymbol(this.stops)},r=()=>{At(this.pointBarriers,this.defaultSymbols.pointBarriers)},i=()=>{At(this.polylineBarriers,this.defaultSymbols.polylineBarriers)},n=()=>{At(this.polygonBarriers,this.defaultSymbols.polygonBarriers)};this.addHandles([(0,m.on)(()=>this.stops,"change",t,{sync:!0,onListenerAdd:t}),(0,m.on)(()=>this.pointBarriers,"change",r,{sync:!0,onListenerAdd:r}),(0,m.on)(()=>this.polylineBarriers,"change",i,{sync:!0,onListenerAdd:i}),(0,m.on)(()=>this.polygonBarriers,"change",n,{sync:!0,onListenerAdd:n})])}writeFeatureCollectionWebmap(e,t,r,i){const n=[this._writePolygonBarriers(),this._writePolylineBarriers(),this._writePointBarriers(),this._writeRouteInfo(),this._writeDirectionLines(),this._writeDirectionPoints(),this._writeStops()].filter(e=>!!e),o=n.map((e,t)=>t),s="web-map"===i.origin?"featureCollection.layers":"layers";(0,c.sM)(s,n,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=o}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",e=>xe.fromGraphic(e))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",e=>Be.fromGraphic(e))}get fullExtent(){const e=new v.A({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:T.A.WGS84});if(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:r}=t.at(0).geometry;if(null==r)return e;const i=t.toArray().map(e=>{const t=e.geometry;return[t.x,t.y]});return new b.A({points:i,spatialReference:r}).extent}readMaxScale(e,t){const r=St(t)?t.layers:t.featureCollection?.layers,i=r?.find(e=>null!=e.layerDefinition.maxScale);return i?.layerDefinition.maxScale??0}readMinScale(e,t){const r=St(t)?t.layers:t.featureCollection?.layers,i=r?.find(e=>null!=e.layerDefinition.minScale);return i?.layerDefinition.minScale??0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",e=>Pe.fromGraphic(e))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",e=>Je.fromGraphic(e))}readPolylineBarriers(e,t){return this._getNetworkFeatures(t,"PolylineBarriers",e=>ke.fromGraphic(e))}readRouteInfo(e,t){return this._getNetworkFeatures(t,"RouteInfo",e=>Ve.fromGraphic(e)).at(0)??null}readSpatialReference(e,t){const r=St(t)?t.layers:t.featureCollection?.layers;if(!r?.length)return T.A.WGS84;const{layerDefinition:i,featureSet:n}=r[0],o=n.features[0],s=o?.geometry?.spatialReference??n.spatialReference??i.spatialReference??i.extent.spatialReference??C.KK;return T.A.fromJSON(s)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",e=>ht.fromGraphic(e),e=>this._setStopSymbol(e))}get title(){return this.routeInfo?.name??"Route"}set title(e){this._overrideIfSome("title",e)}get url(){return n.A.routeServiceUrl}set url(e){null!=e?this._set("url",(0,N.Jf)(e,u.A.getLogger(this))):this._set("url",n.A.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 l.A("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new l.A("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new l.A("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if(!this.routeInfo)throw new l.A("routelayer:route-unsolved","save() requires a solved route");const{portal:r}=t;await r.signIn(),r.user||await t.reload();const{itemUrl:i,itemControl:n}=t;if("admin"!==n&&"update"!==n)throw new l.A("routelayer:insufficient-permissions","To save this layer, you need to be the owner or an administrator of your organization");const o={messages:[],origin:"portal-item",portal:r,url:i?(0,f.An)(i):void 0,writtenProperties:[]},s=this.write(void 0,o);return t.extent=await Mt(e),t.title=this.title,await t.update({data:s}),t}async saveAs(e,t={}){if(await this.load(),null==this.routeInfo)throw new l.A("routelayer:route-unsolved","saveAs() requires a solved route");const r=P.default.from(e).clone();r.extent??=await Mt(this.fullExtent),r.id=null,r.portal??=_.A.getDefault(),r.title??=this.title,r.type="Feature Collection",r.typeKeywords=["Data","Feature Collection",E.mm.MULTI_LAYER,"Route Layer"];const{portal:i}=r,n={messages:[],origin:"portal-item",portal:i,url:null,writtenProperties:[]};await i.signIn();const o=t?.folder,s=this.write(void 0,n);return await i.user.addItem({item:r,folder:o,data:s}),this.portalItem=r,(0,g.v)(n),n.portalItem=r,r}async solve(e,t){gt(this.stops),gt(this.pointBarriers),gt(this.polylineBarriers),gt(this.polygonBarriers);const r=e?.stops??this.stops,i=e?.pointBarriers??Tt(this.pointBarriers),n=e?.polylineBarriers??Tt(this.polylineBarriers),o=e?.polygonBarriers??Tt(this.polygonBarriers);if(null==r)throw new l.A("routelayer:undefined-stops","the route layer must have stops defined in the route parameters.");if((function(e){return"esri.rest.support.FeatureSet"===e.declaredClass}(r)||function(e){return"esri.rest.support.NetworkFeatureSet"===e.declaredClass}(r))&&r.features.length<2||a.A.isCollection(r)&&r.length<2)throw new l.A("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");if(a.A.isCollection(r))for(const e of r)e.routeName=null;const s=e?.apiKey,{checksum:u,url:p}=this,c=await this._getServiceDescription(p,s,t),m=e?.travelMode??c.defaultTravelMode,y=e?.accumulateAttributes??[];m&&(y.push(m.distanceAttributeName),m.timeAttributeName&&y.push(m.timeAttributeName));const f={accumulateAttributes:y,checksum:u,directionsOutputType:"featuresets",ignoreInvalidLocations:!0,pointBarriers:i,polylineBarriers:n,polygonBarriers:o,preserveObjectID:!0,returnBarriers:!!i,returnDirections:!0,returnPolygonBarriers:!!o,returnPolylineBarriers:!!n,returnRoutes:!0,returnStops:!0,stops:r},h=mt.from(e??{});let g;h.set(f);try{g=await De(p,h,t)}catch(e){throw(0,d.zf)(e)?e:new l.A("routelayer:failed-route-request","the routing request failed",{error:e})}const v=this._toRouteLayerSolution(g);return this._isOverridden("title")||(this.title=v.routeInfo.name??"Route"),this._populatePortalFields(v,c,h),v}update(e){const{checksum:t,directionLines:r,directionPoints:i,pointBarriers:n,polygonBarriers:o,polylineBarriers:s,routeInfo:a,stops:l}=e;vt(l,this.stops)?function(e,t){for(const r of e){const e=t.find(e=>e.objectId===r.objectId);e&&(e.arriveCurbApproach=r.arriveCurbApproach,e.arriveTime=r.arriveTime,e.arriveTimeOffset=r.arriveTimeOffset,e.cumulativeCosts=r.cumulativeCosts,e.cumulativeDistance=r.cumulativeDistance,e.cumulativeDuration=r.cumulativeDuration,e.curbApproach=r.curbApproach,e.departCurbApproach=r.departCurbApproach,e.departTime=r.departTime,e.departTimeOffset=r.departTimeOffset,e.distanceToNetworkInMeters=r.distanceToNetworkInMeters,e.geometry=r.geometry,e.lateDuration=r.lateDuration,e.name=r.name,e.navLatency=r.navLatency,e.positionAlong=r.positionAlong,e.routeName=r.routeName,e.serviceCosts=r.serviceCosts,e.serviceDistance=r.serviceDistance,e.serviceDuration=r.serviceDuration,e.sequence=r.sequence,e.sideOfEdge=r.sideOfEdge,e.snapX=r.snapX,e.snapY=r.snapY,e.snapZ=r.snapZ,e.sourceId=r.sourceId,e.sourceOid=r.sourceOid,e.status=r.status,e.symbol=r.symbol,e.timeWindowEnd=r.timeWindowEnd,e.timeWindowStart=r.timeWindowStart,e.violations=r.violations,e.waitDuration=r.waitDuration,e.wait=r.wait)}}(l,this.stops):this.set({stops:l}),wt(n,this.pointBarriers)&&(vt(n,this.pointBarriers)?function(e,t){for(const r of e){const e=t.find(e=>e.objectId===r.objectId);e&&(e.addedCost=r.addedCost,e.barrierType=r.barrierType,e.costs=r.costs,e.curbApproach=r.curbApproach,e.fullEdge=r.fullEdge,e.geometry=r.geometry,e.name=r.name,e.sideOfEdge=r.sideOfEdge,e.sourceId=r.sourceId,e.sourceOid=r.sourceOid,e.status=r.status,e.symbol=r.symbol)}}(n,this.pointBarriers):this.set({pointBarriers:n})),wt(s,this.polylineBarriers)&&(vt(s,this.polylineBarriers)?function(e,t){for(const r of e){const e=t.find(e=>e.objectId===r.objectId);e&&(e.barrierType=r.barrierType,e.costs=r.costs,e.geometry=r.geometry,e.name=r.name,e.scaleFactor=r.scaleFactor,e.symbol=r.symbol)}}(s,this.polylineBarriers):this.set({polylineBarriers:s})),wt(o,this.polygonBarriers)&&(vt(o,this.polygonBarriers)?function(e,t){for(const r of e){const e=t.find(e=>e.objectId===r.objectId);e&&(e.barrierType=r.barrierType,e.costs=r.costs,e.geometry=r.geometry,e.name=r.name,e.scaleFactor=r.scaleFactor,e.symbol=r.symbol)}}(o,this.polygonBarriers):this.set({polygonBarriers:o})),this.set({checksum:t}),this._set("directionLines",r),this._set("directionPoints",i),this._set("routeInfo",a),a.geometry&&(this.spatialReference=a.geometry.spatialReference)}_getNetworkFeatures(e,t,r,i){const n=St(e)?e.layers:e.featureCollection?.layers,l=n?.find(e=>e.layerDefinition.name===t);if(null==l)return new a.A;const{layerDefinition:u,popupInfo:p,featureSet:c}=l,d=u.drawingInfo.renderer,{features:m}=c,y=c.spatialReference??u.spatialReference??u.extent.spatialReference??C.KK,f=d&&(0,L.L)(d),h=T.A.fromJSON(y),g=m.map(e=>{const i=o.A.fromJSON(e);i.geometry&&e.geometry&&null==e.geometry.spatialReference&&(i.geometry.spatialReference=h);const n=r(i);return n.symbol??=f?.getSymbol(i)??this._getNetworkSymbol(t),n.popupTemplate??=p&&s.A.fromJSON(p),n});return i&&g.some(({symbol:e})=>!e)&&i(g),new a.A(g)}_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,r){if(null!=this._cachedServiceDescription&&this._cachedServiceDescription.url===e)return this._cachedServiceDescription.serviceDescription;const i=await ee(e,t,r);return this._cachedServiceDescription={serviceDescription:i,url:e},i}_setStopSymbol(e){if(!e||!e.length||!this.defaultSymbols.stops||e.every(({symbol:e})=>!!e))return;const{first:t,last:r,middle:i,unlocated:n,waypoint:o,break:s}=this.defaultSymbols.stops,a=e.map(({sequence:e})=>e).filter(e=>null!=e),l=e.length===a.length;if(!this.routeInfo&&!l||1===e.length)return void e.forEach((n,o)=>{switch(o){case 0:n.symbol=t;break;case e.length-1:n.symbol=r;break;default:n.symbol=i}});const u=Math.min(...a),p=Math.max(...a);for(const a of e)a.sequence!==u?a.sequence!==p?this.routeInfo&&"ok"!==a.status&&"not-located-on-closest"!==a.status?a.symbol=n:"waypoint"!==a.locationType?"break"!==a.locationType?a.symbol=i:a.symbol=s:a.symbol=o:a.symbol=r:a.symbol=t}_toRouteLayerSolution(e){const{checksum:t,routeResults:r}=e,i=r[0].stops?.map(e=>ht.fromJSON(e.toJSON()));this._setStopSymbol(i);const n=new xt(i),o=new Dt(e.polygonBarriers?.map(e=>Je.fromJSON(e.toJSON())));At(o,this.defaultSymbols.polygonBarriers);const s=new Ft(e.polylineBarriers?.map(e=>ke.fromJSON(e.toJSON())));At(s,this.defaultSymbols.polylineBarriers);const a=new jt(e.pointBarriers?.map(e=>Pe.fromJSON(e.toJSON())));At(a,this.defaultSymbols.pointBarriers);const l=r[0].route?.toJSON(),u=Ve.fromJSON(l);u.symbol=this.defaultSymbols.routeInfo;const p=new Zt(r[0].directionPoints?.features.map(e=>Be.fromJSON(e.toJSON())));At(p,this.defaultSymbols.directionPoints);const c=new Nt(r[0].directionLines?.features.map(e=>xe.fromJSON(e.toJSON())));return At(c,this.defaultSymbols.directionLines),{checksum:t,directionLines:c,directionPoints:p,pointBarriers:a,polygonBarriers:o,polylineBarriers:s,routeInfo:u,stops:n}}_writeDirectionLines(){return this._writeNetworkFeatures(this.directionLines,this.defaultSymbols.directionLines,"esriGeometryPolyline",xe.fields,"DirectionLines","Direction Lines")}_writeDirectionPoints(){return this._writeNetworkFeatures(this.directionPoints,this.defaultSymbols.directionPoints,"esriGeometryPoint",Be.fields,"DirectionPoints","Direction Points")}_writeNetworkFeatures(e,t,r,i,n,o){if(!e?.length)return null;const s=this.spatialReference.toJSON(),{fullExtent:a,maxScale:l,minScale:u}=this;return{featureSet:{features:e.toArray().map(e=>function(e){const{attributes:t,geometry:r,popupTemplate:i,symbol:n}=e.toGraphic().toJSON();return{attributes:t,geometry:r,popupInfo:i,symbol:n}}(e)),geometryType:r,spatialReference:s},layerDefinition:{capabilities:"Query,Update,Editing",drawingInfo:{renderer:{type:"simple",symbol:t?.toJSON()??Ct(r)}},extent:a.toJSON(),fields:i,geometryType:r,hasM:!1,hasZ:!1,maxScale:l,minScale:u,name:n,objectIdField:"ObjectID",spatialReference:s,title:o,type:"Feature Layer",typeIdField:""}}}_writePointBarriers(){return this._writeNetworkFeatures(this.pointBarriers,this.defaultSymbols.pointBarriers,"esriGeometryPoint",Pe.fields,"Barriers","Point Barriers")}_writePolygonBarriers(){return this._writeNetworkFeatures(this.polygonBarriers,this.defaultSymbols.polygonBarriers,"esriGeometryPolygon",Je.fields,"PolygonBarriers","Polygon Barriers")}_writePolylineBarriers(){return this._writeNetworkFeatures(this.polylineBarriers,this.defaultSymbols.polylineBarriers,"esriGeometryPolyline",ke.fields,"PolylineBarriers","Line Barriers")}_writeRouteInfo(){return this._writeNetworkFeatures(null!=this.routeInfo?new a.A([this.routeInfo]):null,this.defaultSymbols.routeInfo,"esriGeometryPolyline",Ve.fields,"RouteInfo","Route Details")}_writeStops(){const e=this._writeNetworkFeatures(this.stops,null,"esriGeometryPoint",ht.fields,"Stops","Stops");if(null==e)return null;const{stops:t}=this.defaultSymbols,r=t?.first?.toJSON(),i=t?.middle?.toJSON(),n=t?.last?.toJSON();return e.layerDefinition.drawingInfo.renderer={type:"uniqueValue",field1:"Sequence",defaultSymbol:i,uniqueValueInfos:[{value:"1",symbol:r,label:"First Stop"},{value:`${this.stops.length}`,symbol:n,label:"Last Stop"}]},e}_populatePortalFields(e,t,r){const i=t.networkDataset?.networkAttributes,n=i?.filter(({usageType:e})=>"cost"===e)??[],o=r.travelMode??t.defaultTravelMode;if(null==o)return void u.A.getLogger(this).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:s,distanceAttributeName:a}=o,p=n.find(({name:e})=>e===s),c=n.find(({name:e})=>e===a),d=r.travelMode?.impedanceAttributeName??r.impedanceAttribute??t.impedance,m=p?.units,y=c?.units;if(!m||!y)throw new l.A("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");const f=r.directionsLanguage??t.directionsLanguage,h=r.accumulateAttributes??t.accumulateAttributeNames??[],g=new Set(n.filter(({name:e})=>e===s||e===a||e===d||null!=e&&h.includes(e)).map(({name:e})=>e)),v=e=>{for(const t in e)g.has(t)||delete e[t]};for(const t of e.pointBarriers)null!=t.costs&&(t.addedCost=t.costs[d]??0,v(t.costs));for(const t of e.polygonBarriers)null!=t.costs&&(t.scaleFactor=t.costs[d]??1,v(t.costs));for(const t of e.polylineBarriers)null!=t.costs&&(t.scaleFactor=t.costs[d]??1,v(t.costs));const{routeInfo:b}=e,{findBestSequence:w,preserveFirstStop:T,preserveLastStop:C,startTimeIsUTC:S,timeWindowsAreUTC:M}=r;b.analysisSettings=new $e({accumulateAttributes:h,directionsLanguage:f,findBestSequence:w,preserveFirstStop:T,preserveLastStop:C,startTimeIsUTC:S,timeWindowsAreUTC:M,travelMode:o}),b.totalDuration=It(b.totalCosts?.[s]??0,m),b.totalDistance=Ot(b.totalCosts?.[a]??0,y),b.totalLateDuration=It(b.totalViolations?.[s]??0,m),b.totalWaitDuration=It(b.totalWait?.[s]??0,m),null!=b.totalCosts&&v(b.totalCosts),null!=b.totalViolations&&v(b.totalViolations),null!=b.totalWait&&v(b.totalWait);for(const t of e.stops)null!=t.serviceCosts&&(t.serviceDuration=It(t.serviceCosts[s]??0,m),t.serviceDistance=Ot(t.serviceCosts[a]??0,y),v(t.serviceCosts)),null!=t.cumulativeCosts&&(t.cumulativeDuration=It(t.cumulativeCosts[s]??0,m),t.cumulativeDistance=Ot(t.cumulativeCosts[a]??0,y),v(t.cumulativeCosts)),null!=t.violations&&(t.lateDuration=It(t.violations[s]??0,m),v(t.violations)),null!=t.wait&&(t.waitDuration=It(t.wait[s]??0,m),v(t.wait))}};(0,i.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1,origins:{"portal-item":{write:{allowNull:!0,ignoreOrigin:!0}},"web-map":{write:{overridePolicy(){return{allowNull:!0,ignoreOrigin:null==this.portalItem}}}}}}})],Rt.prototype,"_featureCollection",void 0),(0,i.Cg)([(0,Y.K)(["web-map","portal-item"],"_featureCollection")],Rt.prototype,"writeFeatureCollectionWebmap",null),(0,i.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],Rt.prototype,"_type",void 0),(0,i.Cg)([(0,h.MZ)({type:String})],Rt.prototype,"checksum",void 0),(0,i.Cg)([(0,h.MZ)({nonNullable:!0,type:B})],Rt.prototype,"defaultSymbols",void 0),(0,i.Cg)([(0,h.MZ)({readOnly:!0})],Rt.prototype,"directionLines",void 0),(0,i.Cg)([(0,z.w)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],Rt.prototype,"readDirectionLines",null),(0,i.Cg)([(0,h.MZ)({readOnly:!0})],Rt.prototype,"directionPoints",void 0),(0,i.Cg)([(0,z.w)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],Rt.prototype,"readDirectionPoints",null),(0,i.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],Rt.prototype,"featureCollectionType",void 0),(0,i.Cg)([(0,h.MZ)({readOnly:!0})],Rt.prototype,"fullExtent",null),(0,i.Cg)([(0,h.MZ)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],Rt.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,h.MZ)({type:["show","hide"]})],Rt.prototype,"listMode",void 0),(0,i.Cg)([(0,h.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],Rt.prototype,"maxScale",void 0),(0,i.Cg)([(0,z.w)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],Rt.prototype,"readMaxScale",null),(0,i.Cg)([(0,h.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],Rt.prototype,"minScale",void 0),(0,i.Cg)([(0,z.w)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],Rt.prototype,"readMinScale",null),(0,i.Cg)([(0,h.MZ)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],Rt.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,h.MZ)({nonNullable:!0,type:a.A.ofType(Pe)})],Rt.prototype,"pointBarriers",void 0),(0,i.Cg)([(0,z.w)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],Rt.prototype,"readPointBarriers",null),(0,i.Cg)([(0,h.MZ)({nonNullable:!0,type:a.A.ofType(Je)})],Rt.prototype,"polygonBarriers",void 0),(0,i.Cg)([(0,z.w)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],Rt.prototype,"readPolygonBarriers",null),(0,i.Cg)([(0,h.MZ)({nonNullable:!0,type:a.A.ofType(ke)})],Rt.prototype,"polylineBarriers",void 0),(0,i.Cg)([(0,z.w)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],Rt.prototype,"readPolylineBarriers",null),(0,i.Cg)([(0,h.MZ)({readOnly:!0})],Rt.prototype,"routeInfo",void 0),(0,i.Cg)([(0,z.w)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],Rt.prototype,"readRouteInfo",null),(0,i.Cg)([(0,h.MZ)({type:T.A})],Rt.prototype,"spatialReference",void 0),(0,i.Cg)([(0,z.w)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],Rt.prototype,"readSpatialReference",null),(0,i.Cg)([(0,h.MZ)({nonNullable:!0,type:a.A.ofType(ht)})],Rt.prototype,"stops",void 0),(0,i.Cg)([(0,z.w)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],Rt.prototype,"readStops",null),(0,i.Cg)([(0,h.MZ)()],Rt.prototype,"title",null),(0,i.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],Rt.prototype,"type",void 0),(0,i.Cg)([(0,h.MZ)()],Rt.prototype,"url",null),Rt=(0,i.Cg)([(0,h.$K)("esri.layers.RouteLayer")],Rt);const Bt=Rt},37539:(e,t,r)=>{r.d(t,{pO:()=>f,jd:()=>d,Tp:()=>m,w5:()=>c});var i=r(34727),n=r(86211),o=r(73941),s=r(79258);Math.PI;const a=s.$O.radius,l=s.$O.eccentricitySquared,u={a1:a*l,a2:a*l*a*l,a3:a*l*l/2,a4:a*l*a*l*2.5,a5:a*l+a*l*l/2,a6:1-l};s.$O.radius,s.$O.flattening,s.Sw.radius,s.Sw.flattening,s.sH.radius,s.sH.flattening,s.sH.radius;var p=r(21325);const c={2:{5:f,7:null,9:null,10:f,1:S,6:null,8:null,0:null,3:g,11:v,2:f,4:N},5:{5:f,7:null,9:null,10:f,1:S,6:null,8:null,0:null,3:g,11:v,2:f,4:N},7:{5:null,7:f,9:null,10:f,1:null,6:C,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:f,10:f,1:null,6:null,8:T,0:null,3:null,11:null,2:null,4:null},3:{5:h,7:null,9:null,10:h,1:function(e,t,r,i){const n=e[t]/R,o=x-2*Math.atan(Math.exp(-e[t+1]/R)),s=R+(e[t+2]??0),a=Math.cos(o)*s;r[i]=Math.cos(n)*a,r[i+1]=Math.sin(n)*a,r[i+2]=Math.sin(o)*s},6:null,8:null,0:null,3:f,11:function(e,t,r,i){h(e,t,r,i),v(r,i,r,i)},2:h,4:function(e,t,r,i){h(e,t,r,i),N(r,i,r,i)}},4:{5:Z,7:null,9:null,10:Z,1:function(e,t,r,i){Z(e,t,r,i),S(r,i,r,i)},6:null,8:null,0:null,3:function(e,t,r,i){Z(e,t,r,i),g(r,i,r,i)},11:function(e,t,r,i){Z(e,t,r,i),v(r,i,r,i)},2:Z,4:f},1:{5:O,7:null,9:null,10:O,1:f,6:null,8:null,0:null,3:function(e,t,r,i){O(e,t,r,i),g(r,i,r,i)},11:function(e,t,r,i){O(e,t,r,i),v(r,i,r,i)},2:O,4:function(e,t,r,i){O(e,t,r,i),N(r,i,r,i)}},6:{5:null,7:I,9:null,10:I,1:null,6:f,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:A,10:A,1:null,6:null,8:f,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:f,3:null,11:null,2:null,4:null},10:{5:f,7:f,9:f,10:f,1:S,6:C,8:T,0:null,3:g,11:v,2:f,4:N},11:{5:b,7:null,9:null,10:b,1:function(e,t,r,i){b(e,t,r,i),S(r,i,r,i)},6:null,8:null,0:null,3:function(e,t,r,i){b(e,t,r,i),g(r,i,r,i)},11:f,2:b,4:function(e,t,r,i){b(e,t,r,i),N(r,i,r,i)}}};function d(e,t){return m(e,t)?.projector}function m(e,t){if(null==e||null==t)return null;if(j.source.spatialReference===e&&j.dest.spatialReference===t)return j;const r=y(e,j.source),i=y(t,j.dest);return 0===r&&0===i?(0,p.aI)(e,t)?j.projector=f:j.projector=null:j.projector=c[r][i],j}function y(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,n.GA)(e,1)),(0,o.jA)(e)?t.spatialReferenceId=1:(0,p.oT)(e)?t.spatialReferenceId=2:(0,p.K8)(e)?t.spatialReferenceId=3:(0,p.r1)(e)?t.spatialReferenceId=11:e.wkt===o.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===o.FY.wkt?t.spatialReferenceId=6:e.wkt===o.LJ.wkt?t.spatialReferenceId=8:(0,p.q8)(e)?t.spatialReferenceId=7:(0,p.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function f(e,t,r,i){e!==r&&(r[i++]=e[t++],r[i++]=e[t++],r[i]=e[t]??0)}function h(e,t,r,i){r[i]=F*(e[t]/R),r[i+1]=F*(x-2*Math.atan(Math.exp(-e[t+1]/R))),r[i+2]=e[t+2]??0}function g(e,t,r,n){!function(e,t,r,n,o){const s=.4999999*Math.PI,a=(0,i.qE)(D*e[t+1],-s,s),l=Math.sin(a);r[n++]=D*e[t]*o.radius,r[n++]=o.halfSemiMajorAxis*Math.log((1+l)/(1-l)),r[n]=e[t+2]??0}(e,t,r,n,s.$O)}function v(e,t,r,i){r[i]=e[t]*B,r[i+1]=e[t+1]*B,r[i+2]=e[t+2]??0}function b(e,t,r,i){r[i]=e[t]*_,r[i+1]=e[t+1]*_,r[i+2]=e[t+2]??0}function w(e,t,r,i,n){const o=n+(e[t+2]??0),s=D*e[t],a=D*e[t+1],l=Math.cos(a)*o;r[i]=Math.cos(s)*l,r[i+1]=Math.sin(s)*l,r[i+2]=Math.sin(a)*o}function T(e,t,r,i){w(e,t,r,i,s.Sw.radius)}function C(e,t,r,i){w(e,t,r,i,s.sH.radius)}function S(e,t,r,i){w(e,t,r,i,s.$O.radius)}function M(e,t,r,n,o){const s=e[t],a=e[t+1],l=e[t+2]??0,u=Math.sqrt(s*s+a*a+l*l),p=(0,i.YN)(l/(0===u?1:u)),c=Math.atan2(a,s);r[n++]=F*c,r[n++]=F*p,r[n]=u-o}function A(e,t,r,i){M(e,t,r,i,s.Sw.radius)}function I(e,t,r,i){M(e,t,r,i,s.sH.radius)}function O(e,t,r,i){M(e,t,r,i,s.$O.radius)}function N(e,t,r,i){!function(e,t,r,i,n){const o=D*e[t],s=D*e[t+1],a=e[t+2]??0,l=Math.sin(s),u=Math.cos(s),p=n.radius/Math.sqrt(1-n.eccentricitySquared*l*l);r[i++]=(p+a)*u*Math.cos(o),r[i++]=(p+a)*u*Math.sin(o),r[i++]=(p*(1-n.eccentricitySquared)+a)*l}(e,t,r,i,s.$O)}function Z(e,t,r,i){const n=u,o=e[t],a=e[t+1],l=e[t+2]??0;let p,c,d,m,y,f,h,g,v,b,w,T,C,S,M,A,I,O,N,Z,j;p=Math.abs(l),c=o*o+a*a,d=Math.sqrt(c),m=c+l*l,y=Math.sqrt(m),Z=Math.atan2(a,o),f=l*l/m,h=c/m,S=n.a2/y,M=n.a3-n.a4/y,h>.3?(g=p/y*(1+h*(n.a1+S+f*M)/y),N=Math.asin(g),b=g*g,v=Math.sqrt(1-b)):(v=d/y*(1-f*(n.a5-S-h*M)/y),N=Math.acos(v),b=1-v*v,g=Math.sqrt(b)),w=1-s.$O.eccentricitySquared*b,T=s.$O.radius/Math.sqrt(w),C=n.a6*T,S=d-T*v,M=p-C*g,I=v*S+g*M,A=v*M-g*S,O=A/(C/w+I),N+=O,j=I+A*O/2,l<0&&(N=-N),r[i++]=F*Z,r[i++]=F*N,r[i]=j}const j={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:f},D=(0,i.kU)(1),F=(0,i.KJ)(1),x=.5*Math.PI,R=s.$O.radius,B=R*Math.PI/180,_=180/(R*Math.PI)},46130:(e,t,r)=>{r.d(t,{v:()=>n});var i=r(76553);function n(e){e?.writtenProperties&&e.writtenProperties.forEach(({target:e,propName:t,newOrigin:r})=>{(0,i.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)})}},46140:(e,t,r)=>{r.d(t,{R:()=>n});var i=r(49186);let n=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[n,o]=t.split("."),s=/^\s*\d+\s*$/;if(!n?.match||!s.test(n))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!o?.match||!s.test(o))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const a=parseInt(n,10),l=parseInt(o,10);return new e(a,l,r)}}},54339:(e,t,r)=>{function i(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const r=[];for(const i of t.fieldNames)r.push(e.attributes[i]??null);return JSON.stringify(r)}}}function n(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const r=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>i,r:()=>n})},55674:(e,t,r)=>{r.d(t,{Ad:()=>m,Gj:()=>h,QY:()=>d,lL:()=>g,xR:()=>y});var i=r(66131),n=r(49186),o=(r(44208),r(44729)),s=r(15032),a=r(65864),l=r(95466),u=r(43668),p=r(98623);const c=["geometry","scale","timeProperties"];function d(e,t){if(null!=t)for(const r of c)t.hasArcadeDependency(r)&&e.add(r);return e}function m(e,t){return f.create(e,t,null,["$feature","$view"])}function y(e,t,r){return f.create(e,t,r,["$feature","$view","$config"])}class f{static async create(e,t,r,i){const{arcade:o,Dictionary:s}=await(0,u.l)();let a;try{a=o.parseScript(e)}catch(t){throw new n.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=o.scriptUsesGeometryEngine(a);l&&await o.enableGeometrySupport(),await o.loadDependentModules(new Set,a,null,!1,l);const p={vars:i.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},c=o.compileScript(a,p);let d=null;null!=r&&(d=new s(r),d.immutable=!0);const m=new s;return m.immutable=!1,m.setField("scale",0),new f(e,o,a,c,t,m,d,s)}constructor(e,t,r,i,n,o,s,a){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=n,this._viewDict=o,this._configDict=s,this._dictionaryCtor=a,this._dependencies=new Map,this._featureReader=new h,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:n,currentEnd:o}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=n?null!=r?i.lY.epochToArcadeDate(n,r):i.lY.unknownEpochToArcadeDate(n):void 0,currentEnd:null!=o?null!=r?i.lY.epochToArcadeDate(o,r):i.lY.unknownEpochToArcadeDate(o):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class h{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new l.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,a.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}_hasGeometry(){return null!=this._boundTarget.geometry}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===p.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return o.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return s.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??p.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}isEmpty(){return this._boundSchema.fields.length<=0&&!this._hasGeometry()}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},62815:(e,t,r)=>{r.d(t,{N:()=>s});var i=r(86211),n=r(73941),o=r(21325);function s(e,t,r){if(null==t||null==r||r.vcsWkid||(0,o.aI)(t,r)||(0,n.xP)(t)||(0,n.xP)(r))return null;const s=(0,i.G9)(t)/(0,i.G9)(r);if(1===s)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,s);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const r of e.paths)for(const e of r)e.length>2&&(e[2]*=t)}(e,s);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const r of e.rings)for(const e of r)e.length>2&&(e[2]*=t)}(e,s);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const r of e.points)r.length>2&&(r[2]*=t)}(e,s);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,s);default:return null}}},63074:(e,t,r)=>{r.d(t,{LF:()=>u,dM:()=>p,sU:()=>a});var i=r(31635),n=r(91429),o=r(89317),s=r(76369);const a={type:["average","color-burn","color-dodge","color","darken","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","invert","lighten","lighter","luminosity","minus","multiply","normal","overlay","plus","reflect","saturation","screen","soft-light","source-atop","source-in","source-out","vivid-light","xor"],nonNullable:!0,json:{read:!1,write:!1,origins:{"web-map":{read:!0,write:{layerContainerTypes:o.K}},"portal-item":{read:!0,write:{layerContainerTypes:o.K}}}}},l={read:{reader:s.LF},write:{allowNull:!0,writer:s.M9,layerContainerTypes:o.K}},u={json:{read:!1,write:!1,origins:{"web-map":l,"portal-item":l}}},p=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.blendMode="normal",this.effect=null}};return(0,i.Cg)([(0,n.MZ)(a)],r.prototype,"blendMode",void 0),(0,i.Cg)([(0,n.MZ)(u)],r.prototype,"effect",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.BlendLayer")],r),r}},65494:(e,t,r)=>{r.d(t,{L:()=>l,r:()=>s});var i=r(67076),n=r(90360),o=r(41214);function s(e,t){return l(e,null,t)}const a=(0,n.C)({types:o.Hg});function l(e,t,r){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?(r?.messages&&r.messages.push(new i.A("renderer:unsupported","Only UniqueValueRenderer can be referenced from a web style, but found '"+e.type+"'",{definition:e,context:r})),null):a(e,t,r):null}},69052:(e,t,r)=>{r.d(t,{hr:()=>n,ie:()=>l,uC:()=>a});var i=r(34727);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return o(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+s(this.range,e-t,r)}minimalMonotonic(e,t,r){return o(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function o(e,t,r,i,n=0,o=!1){return(i-=n)<t?i+=s(e,t-i):i>r&&(i-=s(e,i-r)),o&&i===r&&(i=t),i+n}function s(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const a=new n(0,2*Math.PI),l=(new n(-Math.PI,Math.PI),new n(0,360))},70328:(e,t,r)=>{r.d(t,{BI:()=>b,DC:()=>c,Ej:()=>m,Ie:()=>g,Jt:()=>v,Ne:()=>y,RF:()=>p,aI:()=>T,fA:()=>s,gE:()=>l,hZ:()=>h,iT:()=>d,is:()=>w,qv:()=>C,vI:()=>f,vY:()=>a,v_:()=>S,vt:()=>o,w1:()=>u});var i=r(5443),n=(r(19419),r(4197));function o(e=S){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,i,n,s,a=o()){return a[0]=e,a[1]=t,a[2]=r,a[3]=i,a[4]=n,a[5]=s,a}function a(e,t=o()){return function(e,t,r,i=o()){return h(i,C),function(e,t,r=0,i=t.length/3){let n=e[0],o=e[1],s=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),o=Math.min(o,t[r+3*e+1]),s=Math.min(s,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=n,e[1]=o,e[2]=s,e[3]=a,e[4]=l,e[5]=u}(i,e,t,r),i}(e,0,e.length/3,t)}function l(e,t=(0,n.jh)(24)){const[r,i,o,s,a,l]=e;return t[0]=r,t[1]=i,t[2]=o,t[3]=r,t[4]=i,t[5]=l,t[6]=r,t[7]=a,t[8]=o,t[9]=r,t[10]=a,t[11]=l,t[12]=s,t[13]=i,t[14]=o,t[15]=s,t[16]=i,t[17]=l,t[18]=s,t[19]=a,t[20]=o,t[21]=s,t[22]=a,t[23]=l,t}function u(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function d(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function m(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function y(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function f(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function h(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function g(e){return e?h(e,C):o(C)}function v(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function b(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function w(e){return 6===e.length}function T(e,t,r){if(null==e||null==t)return e===t;if(!w(e)||!w(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const C=[1/0,1/0,1/0,-1/0,-1/0,-1/0],S=[0,0,0,0,0,0];o()},73681:(e,t,r)=>{r.d(t,{n:()=>l});var i=r(49186),n=r(53966),o=r(46140),s=r(95466),a=r(55674);class l{static async from(e,t,r){const s=e.dictionary_version?o.R.parse(e.dictionary_version):null,p=new Set(e.itemsNames),c={};if(t)for(const e in t)c[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)c.hasOwnProperty(t.name)||(c[t.name]=t.value);const d=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))d.delete(e);d.size&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:d});const m=await(0,a.xR)(e.expression,null,c);if(!m)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const y=!s||!s.greaterEqual(4,0);y&&n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:s});const f=new u(r,y);return new l(y,p,m,f)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){n.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new s.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new s.A(t)}}class u extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},76369:(e,t,r)=>{r.d(t,{LF:()=>C,M9:()=>S});var i=r(49186),n=r(93637),o=r(40876),s=r(59247),a=r(27865);class l extends SyntaxError{constructor(e,t,r,i){super(e),this.expected=t,this.found=r,this.location=i,this.name="SyntaxError"}format(e){let t="Error: "+this.message;if(this.location){let r=null;const i=e.find(e=>e.source===this.location.source);i&&(r=i.text.split(/\r\n|\n|\r/g));const n=this.location.start,o=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(n):n,s=this.location.source+":"+o.line+":"+o.column;if(r){const e=this.location.end,i="".padEnd(o.line.toString().length," "),a=r[n.line-1],l=(n.line===e.line?e.column:a.length+1)-n.column||1;t+="\n --\x3e "+s+"\n"+i+" |\n"+o.line+" | "+a+"\n"+i+" | "+"".padEnd(n.column-1," ")+"".padEnd(l,"^")}else t+="\n at "+s}return t}static buildMessage(e,t){function r(e){return e.codePointAt(0).toString(16).toUpperCase()}const i=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function n(e){return i?e.replace(i,e=>"\\u{"+r(e)+"}"):e}function o(e){return n(e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}function s(e){return n(e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,e=>"\\x0"+r(e)).replace(/[\x10-\x1F\x7F-\x9F]/g,e=>"\\x"+r(e)))}const a={literal:e=>'"'+o(e.text)+'"',class(e){const t=e.parts.map(e=>Array.isArray(e)?s(e[0])+"-"+s(e[1]):s(e));return"["+(e.inverted?"^":"")+t.join("")+"]"+(e.unicode?"u":"")},any:()=>"any character",end:()=>"end of input",other:e=>e.description};function l(e){return a[e.type](e)}return"Expected "+function(e){const t=e.map(l);if(t.sort(),t.length>0){let e=1;for(let r=1;r<t.length;r++)t[r-1]!==t[r]&&(t[e]=t[r],e++);t.length=e}switch(t.length){case 1:return t[0];case 2:return t[0]+" or "+t[1];default:return t.slice(0,-1).join(", ")+", or "+t[t.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."}}function u(e){if(!e||0===e.length)return null;if("string"==typeof e){const t=p(e);return t&&0!==t.length?t:null}const t=e.map(e=>{if(!Number.isFinite(e.scale)||e.scale<=0)throw new i.A("effect:invalid-scale","scale must be finite and greater than 0",{stop:e});return{scale:e.scale,effects:p(e.value)}});t.sort((e,t)=>t.effects.length-e.effects.length);for(let e=0;e<t.length-1;e++){if(!(0,a.mj)(t[e].effects,t[e+1].effects))throw new i.A("effect:interpolation-impossible","Cannot interpolate by scale between 2 lists of mixed effects",{a:t[e].effects,b:t[e+1].effects});(0,a.O9)(t[e].effects,t[e+1].effects)}return t.sort((e,t)=>t.scale-e.scale),t}function p(e){let t;if(!e)return[];try{t=function(e,t){const r={},i=(t=void 0!==t?t:{}).grammarSource,n={start:Te};let o=Te;const s="none",a=")",u=",",p="(",c="%",d="px",m="cm",y="mm",f="in",h="pt",g="pc",v="deg",b="rad",w="grad",T="turn",C="#",S=".",M="e",A=/^[ \t\n\r]/,I=/^[a-z\-]/,O=/^[0-9a-fA-F]/,N=/^[+\-]/,Z=/^[0-9]/,j=ge("none"),D=fe("none",!1),F=fe(")",!1),x=fe(",",!1),R=he([" ","\t","\n","\r"],!1,!1,!1),B=ge("function"),_=fe("(",!1),P=ge("identifier"),E=he([["a","z"],"-"],!1,!1,!1),L=ge("percentage"),J=fe("%",!1),U=ge("length"),k=fe("px",!1),$=fe("cm",!1),W=fe("mm",!1),V=fe("in",!1),G=fe("pt",!1),q=fe("pc",!1),K=ge("angle"),z=fe("deg",!1),Y=fe("rad",!1),H=fe("grad",!1),X=fe("turn",!1),Q=ge("number"),ee=ge("color"),te=fe("#",!1),re=he([["0","9"],["a","f"],["A","F"]],!1,!1,!1),ie=he(["+","-"],!1,!1,!1),ne=he([["0","9"]],!1,!1,!1),oe=fe(".",!1),se=fe("e",!1);let ae=0|t.peg$currPos,le=ae;const ue=[{line:1,column:1}];let pe,ce=ae,de=t.peg$maxFailExpected||[],me=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in n))throw new Error("Can't start parsing from rule \""+t.startRule+'".');o=n[t.startRule]}function ye(){return e.substring(le,ae)}function fe(e,t){return{type:"literal",text:e,ignoreCase:t}}function he(e,t,r,i){return{type:"class",parts:e,inverted:t,ignoreCase:r,unicode:i}}function ge(e){return{type:"other",description:e}}function ve(t){let r,i=ue[t];if(i)return i;if(t>=ue.length)r=ue.length-1;else for(r=t;!ue[--r];);for(i=ue[r],i={line:i.line,column:i.column};r<t;)10===e.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return ue[t]=i,i}function be(e,t,r){const n=ve(e),o=ve(t);return{source:i,start:{offset:e,line:n.line,column:n.column},end:{offset:t,line:o.line,column:o.column}}}function we(e){ae<ce||(ae>ce&&(ce=ae,de=[]),de.push(e))}function Te(){let e;return e=Ce(),e===r&&(e=function(){let e,t;if(e=[],t=Se(),t!==r)for(;t!==r;)e.push(t),t=Se();else e=r;return e}()),e}function Ce(){let t,i;return me++,t=ae,Ae(),e.substr(ae,4)===s?(i=s,ae+=4):(i=r,0===me&&we(D)),i!==r?(Ae(),le=t,t=[]):(ae=t,t=r),me--,t===r&&0===me&&we(j),t}function Se(){let t,i,n,o;return t=ae,Ae(),i=function(){let t,i,n;return me++,t=ae,i=Ie(),i!==r?(40===e.charCodeAt(ae)?(n=p,ae++):(n=r,0===me&&we(_)),n!==r?(le=t,t=i):(ae=t,t=r)):(ae=t,t=r),me--,t===r&&(i=r,0===me&&we(B)),t}(),i!==r?(Ae(),n=function(){let t,i,n,o,s,a,l,p;if(t=ae,i=Me(),i!==r){for(n=[],o=ae,s=Ae(),44===e.charCodeAt(ae)?(a=u,ae++):(a=r,0===me&&we(x)),a===r&&(a=null),l=Ae(),p=Me(),p!==r?(s=[s,a,l,p],o=s):(ae=o,o=r);o!==r;)n.push(o),o=ae,s=Ae(),44===e.charCodeAt(ae)?(a=u,ae++):(a=r,0===me&&we(x)),a===r&&(a=null),l=Ae(),p=Me(),p!==r?(s=[s,a,l,p],o=s):(ae=o,o=r);le=t,t=function(e,t){return t.length>0?function(e,t){return[e].concat(function(e){return e.map(function(e){return e[3]})}(t))}(e,t):[e]}(i,n)}else ae=t,t=r;return t}(),n===r&&(n=null),Ae(),41===e.charCodeAt(ae)?(o=a,ae++):(o=r,0===me&&we(F)),o!==r?(Ae(),le=t,t=function(e,t){return{type:"function",name:e,parameters:t||[]}}(i,n)):(ae=t,t=r)):(ae=t,t=r),t}function Me(){let e,t;return e=ae,t=Oe(),t===r&&(t=Ne(),t===r&&(t=Ze(),t===r&&(t=function(){let e,t;return me++,e=ae,Ae(),t=De(),t!==r?(le=e,e=function(e){return{value:e,unit:null}}(t)):(ae=e,e=r),me--,e===r&&0===me&&we(Q),e}()))),t!==r&&(le=e,t=function(e){return{type:"quantity",value:e.value,unit:e.unit}}(t)),e=t,e===r&&(e=ae,t=je(),t!==r&&(le=e,t=function(e){return{type:"color",colorType:e.type,value:e.value}}(t)),e=t),e}function Ae(){let t,i;for(me++,t=[],i=e.charAt(ae),A.test(i)?ae++:(i=r,0===me&&we(R));i!==r;)t.push(i),i=e.charAt(ae),A.test(i)?ae++:(i=r,0===me&&we(R));return me--,t}function Ie(){let t,i,n;if(me++,t=ae,i=[],n=e.charAt(ae),I.test(n)?ae++:(n=r,0===me&&we(E)),n!==r)for(;n!==r;)i.push(n),n=e.charAt(ae),I.test(n)?ae++:(n=r,0===me&&we(E));else i=r;return i!==r&&(le=t,i=ye()),t=i,me--,t===r&&(i=r,0===me&&we(P)),t}function Oe(){let t,i,n;return me++,t=ae,Ae(),i=De(),i!==r?(37===e.charCodeAt(ae)?(n=c,ae++):(n=r,0===me&&we(J)),n!==r?(le=t,t=function(e){return{value:e,unit:"%"}}(i)):(ae=t,t=r)):(ae=t,t=r),me--,t===r&&0===me&&we(L),t}function Ne(){let t,i,n;return me++,t=ae,Ae(),i=De(),i!==r?(e.substr(ae,2)===d?(n=d,ae+=2):(n=r,0===me&&we(k)),n!==r?(le=t,t=function(e){return{value:e,unit:"px"}}(i)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,Ae(),i=De(),i!==r?(e.substr(ae,2)===m?(n=m,ae+=2):(n=r,0===me&&we($)),n!==r?(le=t,t=function(e){return{value:e,unit:"cm"}}(i)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,Ae(),i=De(),i!==r?(e.substr(ae,2)===y?(n=y,ae+=2):(n=r,0===me&&we(W)),n!==r?(le=t,t=function(e){return{value:e,unit:"mm"}}(i)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,Ae(),i=De(),i!==r?(e.substr(ae,2)===f?(n=f,ae+=2):(n=r,0===me&&we(V)),n!==r?(le=t,t=function(e){return{value:e,unit:"in"}}(i)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,Ae(),i=De(),i!==r?(e.substr(ae,2)===h?(n=h,ae+=2):(n=r,0===me&&we(G)),n!==r?(le=t,t=function(e){return{value:e,unit:"pt"}}(i)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,Ae(),i=De(),i!==r?(e.substr(ae,2)===g?(n=g,ae+=2):(n=r,0===me&&we(q)),n!==r?(le=t,t=function(e){return{value:e,unit:"pc"}}(i)):(ae=t,t=r)):(ae=t,t=r)))))),me--,t===r&&0===me&&we(U),t}function Ze(){let t,i,n;return me++,t=ae,i=De(),i!==r?(e.substr(ae,3)===v?(n=v,ae+=3):(n=r,0===me&&we(z)),n!==r?(le=t,t=function(e){return{value:e,unit:"deg"}}(i)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,i=De(),i!==r?(e.substr(ae,3)===b?(n=b,ae+=3):(n=r,0===me&&we(Y)),n!==r?(le=t,t=function(e){return{value:e,unit:"rad"}}(i)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,i=De(),i!==r?(e.substr(ae,4)===w?(n=w,ae+=4):(n=r,0===me&&we(H)),n!==r?(le=t,t=function(e){return{value:e,unit:"grad"}}(i)):(ae=t,t=r)):(ae=t,t=r),t===r&&(t=ae,i=De(),i!==r?(e.substr(ae,4)===T?(n=T,ae+=4):(n=r,0===me&&we(X)),n!==r?(le=t,t=function(e){return{value:e,unit:"turn"}}(i)):(ae=t,t=r)):(ae=t,t=r)))),me--,t===r&&(i=r,0===me&&we(K)),t}function je(){let t,i,n,o;if(me++,t=ae,35===e.charCodeAt(ae)?(i=C,ae++):(i=r,0===me&&we(te)),i!==r){if(n=[],o=e.charAt(ae),O.test(o)?ae++:(o=r,0===me&&we(re)),o!==r)for(;o!==r;)n.push(o),o=e.charAt(ae),O.test(o)?ae++:(o=r,0===me&&we(re));else n=r;n!==r?(le=t,t={type:"hex",value:ye()}):(ae=t,t=r)}else ae=t,t=r;return t===r&&(t=ae,i=Se(),i!==r&&(le=t,i=function(e){return{type:"function",value:e}}(i)),t=i,t===r&&(t=ae,i=Ie(),i!==r&&(le=t,i={type:"named",value:ye()}),t=i)),me--,t===r&&(i=r,0===me&&we(ee)),t}function De(){let t,i,n,o,s,a,l,u;for(t=ae,i=e.charAt(ae),N.test(i)?ae++:(i=r,0===me&&we(ie)),i===r&&(i=null),n=ae,o=[],s=e.charAt(ae),Z.test(s)?ae++:(s=r,0===me&&we(ne));s!==r;)o.push(s),s=e.charAt(ae),Z.test(s)?ae++:(s=r,0===me&&we(ne));if(46===e.charCodeAt(ae)?(s=S,ae++):(s=r,0===me&&we(oe)),s!==r){if(a=[],l=e.charAt(ae),Z.test(l)?ae++:(l=r,0===me&&we(ne)),l!==r)for(;l!==r;)a.push(l),l=e.charAt(ae),Z.test(l)?ae++:(l=r,0===me&&we(ne));else a=r;a!==r?(o=[o,s,a],n=o):(ae=n,n=r)}else ae=n,n=r;if(n===r)if(n=[],o=e.charAt(ae),Z.test(o)?ae++:(o=r,0===me&&we(ne)),o!==r)for(;o!==r;)n.push(o),o=e.charAt(ae),Z.test(o)?ae++:(o=r,0===me&&we(ne));else n=r;if(n!==r){if(o=ae,101===e.charCodeAt(ae)?(s=M,ae++):(s=r,0===me&&we(se)),s!==r){if(a=e.charAt(ae),N.test(a)?ae++:(a=r,0===me&&we(ie)),a===r&&(a=null),l=[],u=e.charAt(ae),Z.test(u)?ae++:(u=r,0===me&&we(ne)),u!==r)for(;u!==r;)l.push(u),u=e.charAt(ae),Z.test(u)?ae++:(u=r,0===me&&we(ne));else l=r;l!==r?(s=[s,a,l],o=s):(ae=o,o=r)}else ae=o,o=r;o===r&&(o=null),le=t,t=parseFloat(ye())}else ae=t,t=r;return t}pe=o();const Fe=pe!==r&&ae===e.length;function xe(){throw pe!==r&&ae<e.length&&we({type:"end"}),function(e,t,r){return new l(l.buildMessage(e,t),e,t,r)}(de,ce<e.length?function(t=ae){const r=e.codePointAt(t);return void 0===r?"":String.fromCodePoint(r)}(ce):null,ce<e.length?be(ce,ce+1):be(ce,ce))}return t.peg$library?{peg$result:pe,peg$currPos:ae,peg$FAILED:r,peg$maxFailExpected:de,peg$maxFailPos:ce,peg$success:Fe,peg$throw:Fe?void 0:xe}:Fe?pe:void xe()}(e)}catch(t){throw new i.A("effect:invalid-syntax","Invalid effect syntax",{value:e,error:t})}return t.map(e=>function(e){try{switch(e.name){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":return function(e){let t=1;return c(e.parameters,1),1===e.parameters.length&&(t=h(e.parameters[0])),new s.yG(e.name,t)}(e);case"opacity":return function(e){let t=1;return c(e.parameters,1),1===e.parameters.length&&(t=h(e.parameters[0])),new s.jm(t)}(e);case"hue-rotate":return function(e){let t=0;return c(e.parameters,1),1===e.parameters.length&&(t=function(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=y[e.unit]))throw new i.A("effect:type-error",`Expected <angle>, Actual: ${d(e)}`,{term:e})}(e),e.value*y[e.unit]||0}(e.parameters[0])),new s.Nd(t)}(e);case"blur":return function(e){let t=0;return c(e.parameters,1),1===e.parameters.length&&(t=g(e.parameters[0]),m(t,e.parameters[0])),new s.Fk(t)}(e);case"drop-shadow":return function(e){const t=[];let r=null;for(const n of e.parameters)if("color"===n.type){if(t.length&&Object.freeze(t),r)throw new i.A("effect:type-error","Accepts only one color",{});r=v(n)}else{const e=g(n);if(Object.isFrozen(t))throw new i.A("effect:type-error","<length> parameters not consecutive",{lengths:t});t.push(e),3===t.length&&m(e,n)}if(t.length<2||t.length>3)throw new i.A("effect:type-error",`Expected <length>{2,3}, Actual: <length>{${t.length}}`,{lengths:t});return new s.$b(t[0],t[1],t[2]||0,r||b("black"))}(e);case"bloom":return function(e){let t=1,r=0,i=0;return c(e.parameters,3),e.parameters[0]&&(t=h(e.parameters[0])),e.parameters[1]&&(r=g(e.parameters[1]),m(r,e.parameters[1])),e.parameters[2]&&(i=h(e.parameters[2])),new s.bv(t,r,i)}(e)}}catch(t){throw t.details.filter=e,t}throw new i.A("effect:unknown-effect",`Effect '${e.name}' is not supported`,{effect:e})}(e))}function c(e,t){if(e.length>t)throw new i.A("effect:type-error",`Function supports up to ${t} parameters, Actual: ${e.length}`,{parameters:e})}function d(e){if("color"===e.type)return"<color>";if(e.unit){if(e.unit in f)return"<length>";if(e.unit in y)return"<angle>";if("%"===e.unit)return"<percentage>"}return"<double>"}function m(e,t){if(e<0)throw new i.A("effect:type-error",`Negative values are not allowed, Actual: ${e}`,{term:t})}const y={deg:1,grad:.9,rad:180/Math.PI,turn:360},f={px:1,cm:96/2.54,mm:96/2.54/10,in:96,pc:16,pt:96/72};function h(e){!function(e){if("quantity"!==e.type||null!==e.unit&&"%"!==e.unit)throw new i.A("effect:type-error",`Expected <double> or <percentage>, Actual: ${d(e)}`,{term:e})}(e);const t=e.value;return m(t,e),"%"===e.unit?.01*t:t}function g(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=f[e.unit]))throw new i.A("effect:type-error",`Expected <length>, Actual: ${d(e)}`,{term:e})}(e),e.value*f[e.unit]||0}function v(e){switch(e.colorType){case"hex":return(0,o.j5)(e.value);case"named":return b(e.value);case"function":return function(e){if(c(e.parameters,4),w.test(e.name))return[h(e.parameters[0]),h(e.parameters[1]),h(e.parameters[2]),e.parameters[3]?h(e.parameters[3]):1];if(T.test(e.name))return(0,o.ay)(function(e){return function(e){if("quantity"!==e.type||null!==e.unit)throw new i.A("effect:type-error",`Expected <double>, Actual: ${d(e)}`,{term:e})}(e),m(e.value,e),e.value}(e.parameters[0]),h(e.parameters[1]),h(e.parameters[2]),e.parameters[3]?h(e.parameters[3]):1);throw new i.A("effect:syntax-error",`Invalid color function '${e.name}'`,{colorFunction:e})}(e.value)}}function b(e){if(!(0,o.V6)(e))throw new i.A("effect:unknown-color",`color '${e}' isn't valid`,{namedColor:e});return(0,o.c4)(e)}const w=/^rgba?/i,T=/^hsla?/i;function C(e,t,r){try{return function(e){if(!e||0===e.length)return null;if(function(e){const t=e[0];return!!t&&"scale"in t}(e)){const t=[];for(const r of e)t.push({scale:r.scale,value:M(r.value)});return t}return M(e)}(e)}catch(e){r?.messages?.push(e)}return null}function S(e,t,r,i){try{const i=function(e){const t=u(e);return t?(0,a.dw)(t)?t.map(e=>e.toJSON()):t.map(({scale:e,effects:t})=>({scale:e,value:t.map(e=>e.toJSON())})):null}(e);(0,n.sM)(r,i,t)}catch(e){i.messages&&i.messages.push(e)}}function M(e){if(!e?.length)return"";const t=[];for(const r of e){let e=[];switch(r.type){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":case"opacity":e=[A(r,"amount")];break;case"blur":e=[A(r,"radius","pt")];break;case"hue-rotate":e=[A(r,"angle","deg")];break;case"drop-shadow":e=[A(r,"xoffset","pt"),A(r,"yoffset","pt"),A(r,"blurRadius","pt"),I(r,"color")];break;case"bloom":e=[A(r,"strength"),A(r,"radius","pt"),A(r,"threshold")]}const i=`${r.type}(${e.filter(Boolean).join(" ")})`;u(i),t.push(i)}return t.join(" ")}function A(e,t,r){if(null==e[t])throw new i.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});return r?e[t]+r:""+e[t]}function I(e,t){if(null==e[t])throw new i.A("effect:missing-parameter",`Missing parameter '${t}' in ${e.type} effect`,{effect:e});const r=e[t];return`rgba(${r[0]||0}, ${r[1]||0}, ${r[2]||0}, ${r[3]/255||0})`}},76553:(e,t,r)=>{function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>i})},80754:(e,t,r)=>{r.d(t,{j7:()=>s,kS:()=>l,kd:()=>a,r8:()=>u});var i=r(82799),n=r(16930),o=r(65864);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function a(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,o.Bi)(e)?e.rings:e.paths}},91218:(e,t,r)=>{r.r(t),r.d(t,{canProjectWithoutEngine:()=>W,initializeProjection:()=>G,isEqualBaseGCS:()=>V,isLoaded:()=>j,isLoadedOrLoad:()=>D,isLoadedOrLoadFor:()=>F,load:()=>R,project:()=>B,projectExtent:()=>re,projectMany:()=>_,projectMultipoint:()=>Y,projectOrLoad:()=>P,projectOrLoadMany:()=>E,projectPoint:()=>K,projectPolygon:()=>ee,projectPolyline:()=>X,projectWithZConversion:()=>$,projectWithoutEngine:()=>q,requiresLoad:()=>x,test:()=>U,tryProjectWithZConversion:()=>k,unload:()=>J});var i=r(49186),n=r(74887),o=r(62788),s=r(95488),a=r(51850),l=r(21276),u=r(73941),p=r(5443),c=r(91075),d=r(48526),m=r(86738),y=r(39829),f=r(82799),h=r(16930),g=r(159),v=r(9762),b=r(37539);function w(e,t,r,i,n,o){return T[0]=e,T[1]=t,T[2]=r,(0,v.projectBuffer)(T,i,0,n,o,0)}const T=(0,a.vt)();var C=r(21325),S=r(62815);let M=null,A=null,I=null,O=null,N={};const Z=new s.I;function j(){return!!(A?.isLoaded()&&I?.isLoaded()&&O?.isLoaded())}function D(){return!!j()||((0,o.gc)(Z),R(),!1)}function F(e,t){return!e||!t||W(e,t)||D()}function x(e,t){return!W(e,t)&&!j()}async function R(e){null==M&&(M=Promise.all([r.e(3276).then(r.bind(r,83276)).then(e=>(A=e,A.load())),r.e(8377).then(r.bind(r,8377)).then(e=>(I=e,I.load())),r.e(2158).then(r.bind(r,12158)).then(e=>(O=e,O.load()))])),await M,(0,n.Te)(e),Z.notify()}function B(e,t,r){return Array.isArray(e)?0===e.length?[]:((0,l.H)(e),_(e,e[0].spatialReference,t,r)):((0,l.f)(e),_([e],e.spatialReference,t,r)[0])}function _(e,t,r,i){if(null==t||null==r)return e;if(W(t,r,i))return e.map(e=>q(e,t,r));if(null==i?.geographicTransformation&&(0,u.jA)(t))return e.map(e=>q(e,t,h.A.WGS84)).map(e=>k(e,r));if(null==i?.geographicTransformation&&(0,u.jA)(r))return e.map(e=>k(e,h.A.WGS84)).map(e=>q(e,h.A.WGS84,r));if(!j())throw new L;if(!i?.geographicTransformation)if(i?.extendedParams)i={...i,geographicTransformation:O.getTransformation(t,r,i.areaOfInterestExtent)||new g.A};else if(!i?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,r);let n=N[e];n||(n=O.getTransformation(t,r)||new g.A,N[e]=n),i={geographicTransformation:n}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof c.A?A.executeMany(e,r,i):I.executeMany(e,r,i)}function P(e,t){const r=E([e],t);return null!=r.pending?{pending:r.pending,geometry:null}:null!=r.geometries?{pending:null,geometry:r.geometries[0]}:{pending:null,geometry:null}}function E(e,t){if(!j())for(const r of e)if(null!=r&&!(0,C.aI)(r.spatialReference,t)&&(0,C.fn)(r.spatialReference)&&(0,C.fn)(t)&&!W(r.spatialReference,t))return(0,o.gc)(Z),{pending:R(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,C.aI)(e.spatialReference,t)?e:(0,C.fn)(e.spatialReference)&&(0,C.fn)(t)?k(e,t):null)}}class L extends i.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function J(){M=null,A=null,I=null,O=null,N={}}const U={get loadPromise(){return M}};function k(e,t){try{const r=B(e,t);if(null==r)return null;"xmin"in e&&"xmin"in r&&(r.zmin=e.zmin,r.zmax=e.zmax);const i=(0,S.N)(r.type,e.spatialReference,t);return null!=i&&i(r),r}catch(e){if(!(e instanceof L))throw e;return null}}async function $(e,t,r){const i=e.spatialReference;return null!=i&&null!=t&&await G(i,t,null,r),k(e,t)}function W(e,t,r){return!(r?.areaOfInterestExtent||r?.extendedParams||r?.geographicTransformation)&&(!!(0,C.aI)(e,t)||(0,C.fn)(e)&&(0,C.fn)(t)&&!!(0,b.jd)(e,t))}function V(e,t){if((0,C.aI)(e,t))return!0;if(!(0,C.fn)(e)||!(0,C.fn)(t))return!1;const r=(0,C.oT)(e)||(0,C.K8)(e)||(0,C.x1)(e),i=(0,C.oT)(t)||(0,C.K8)(t)||(0,C.x1)(t);return r&&i}async function G(e,t,r,i){if(j())return(0,n.NO)(i);if(Array.isArray(e)){for(const{source:t,dest:r,options:n}of e)if(t&&r&&!W(t,r,n))return R(i)}else if(e&&t&&!W(e,t,r))return R(i);return(0,n.NO)(i)}function q(e,t,r){return e?"x"in e?z(e,t,new m.A,r,0):"xmin"in e?ie(e,t,new p.A,r,0):"rings"in e?te(e,t,new y.A,r,0):"paths"in e?Q(e,t,new f.A,r,0):"points"in e?H(e,t,new d.A,r,0):null:null}function K(e,t,r=t.spatialReference,i=0){return null!=r&&null!=e.spatialReference&&null!=z(e,e.spatialReference,t,r,i)}function z(e,t,r,i,n){oe[0]=e.x,oe[1]=e.y;const o=e.z;return oe[2]=void 0!==o?o:n,(0,v.projectBuffer)(oe,t,0,oe,i,0)?(r.x=oe[0],r.y=oe[1],r.spatialReference=i,void 0!==o||(0,u.xP)(i)?(r.z=oe[2],r.hasZ=!0):(r.z=void 0,r.hasZ=!1),void 0===e.m?(r.m=void 0,r.hasM=!1):(r.m=e.m,r.hasM=!0),r):null}function Y(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=H(e,e.spatialReference,t,r,i)}function H(e,t,r,i,n){const{points:o,hasZ:s,hasM:a}=e,l=[],p=o.length,c=[];for(const e of o)c.push(e[0],e[1],s?e[2]:n);if(!(0,v.projectBuffer)(c,t,0,c,i,0,p))return null;const d=s||(0,u.xP)(i);for(let e=0;e<p;++e){const t=3*e,r=c[t],i=c[t+1];d&&a?l.push([r,i,c[t+2],o[e][3]]):d?l.push([r,i,c[t+2]]):a?l.push([r,i,o[e][2]]):l.push([r,i])}return r.points=l,r.spatialReference=i,r.hasZ=s,r.hasM=a,r}function X(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=Q(e,e.spatialReference,t,r,i)}function Q(e,t,r,i,n){const{paths:o,hasZ:s,hasM:a}=e,l=[];if(!ne(o,s??!1,a??!1,t,l,i,n))return null;const p=s||(0,u.xP)(i);return r.paths=l,r.spatialReference=i,r.hasZ=p,r.hasM=a,r}function ee(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=te(e,e.spatialReference,t,r,i)}function te(e,t,r,i,n){const{rings:o,hasZ:s,hasM:a}=e,l=[];if(!ne(o,s??!1,a??!1,t,l,i,n))return null;const p=s||(0,u.xP)(i);return r.rings=l,r.spatialReference=i,r.hasZ=p,r.hasM=a,r}function re(e,t,r=t.spatialReference,i=0){return null!=e.spatialReference&&null!=r&&null!=ie(e,e.spatialReference,t,r,i)}function ie(e,t,r,i,n){const{xmin:o,ymin:s,xmax:a,ymax:l,hasZ:p,hasM:c}=e;if(!w(o,s,p?e.zmin:n,t,oe,i))return null;const d=p||(0,u.xP)(i);return r.xmin=oe[0],r.ymin=oe[1],d&&(r.zmin=oe[2]),w(a,l,p?e.zmax:n,t,oe,i)?(r.xmax=oe[0],r.ymax=oe[1],d&&(r.zmax=oe[2]),c&&(r.mmin=e.mmin,r.mmax=e.mmax),r.spatialReference=i,r):null}function ne(e,t,r,i,n,o,s=0){const a=new Array;for(const r of e)for(const e of r)a.push(e[0],e[1],t?e[2]:s);if(!(0,v.projectBuffer)(a,i,0,a,o,0))return!1;let l=0;n.length=0;const p=t||(0,u.xP)(o);for(const t of e){const e=new Array;for(const i of t)p&&r?e.push([a[l++],a[l++],a[l++],i[3]]):p?e.push([a[l++],a[l++],a[l++]]):r?(e.push([a[l++],a[l++],i[2]]),l++):(e.push([a[l++],a[l++]]),l++);n.push(e)}return!0}const oe=(0,a.vt)()},92300:(e,t,r)=>{r.d(t,{V:()=>o,X:()=>n});var i=r(65864);function n(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function o(e,t,r){const n=(0,i.xD)(t);return e.map(e=>{const t=n.fromJSON(e);return t.spatialReference=r,t})}},95466:(e,t,r)=>{r.d(t,{A:()=>m});var i=r(49186),n=r(53966),o=r(91869),s=r(3330),a=r(12195),l=r(30524),u=r(98623),p=r(56400),c=r(28097);const d=new Map;class m{static fromJSON(e){return new m(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new m(e.fields??[],g(e))}static fromLayerJSON(e){return new m(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=f(t);if(t&&i){const n=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(i,e),r.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(f(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):h.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?s.GB.instance:t===u.n$?c.mQ.utcInstance:(0,o.tE)(d,t,()=>c.oh.create(t)):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,a.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function f(e){return(0,l.rS)(e)?.toLowerCase()??""}const h=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:n}=e,o=(i?"startField"in i?i.startField:i.startTimeField:"")??"",s=(i?"endField"in i?i.endField:i.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,p.ZS)(e.dateFieldsTimeReference):null,l=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.dateFieldsTimeReference?(0,p.ZS)(n.dateFieldsTimeReference):a??u.n$:null,c=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.timeReference?(0,p.ZS)(i.timeReference):a:null,d=new Map([[y(n?.creationDateField??""),l],[y(n?.editDateField??""),l],[y(o),c],[y(s),c]]);for(const{name:i,type:n}of e.fields)if(h.has(n))t.set(i,u.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=d.get(y(i??""))??a;t.set(i,e)}return t}},96576:(e,t,r)=>{r.d(t,{A:()=>c});var i,n=r(31635),o=r(4718),s=r(91429),a=r(92438),l=r(63988),u=r(49849),p=r(93223);let c=i=class extends((0,l.h)(a.A)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.type="simple"}async collectRequiredFields(e,t){await Promise.all([this.collectSymbolFields(e,t),this.collectVVRequiredFields(e,t)])}async collectSymbolFields(e,t){await Promise.all(this.symbols.map(r=>r.collectRequiredFields(e,t)))}getSymbol(e,t){return this.symbol}async getSymbolAsync(e,t){return this.symbol}get symbols(){return this.symbol?[this.symbol]:[]}getAttributeHash(){return this.visualVariables?.reduce((e,t)=>e+t.getAttributeHash(),"")??""}getMeshHash(){return this.symbols.reduce((e,t)=>e+JSON.stringify(t),"")}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new i({description:this.description,label:this.label,symbol:(0,o.o8)(this.symbol),visualVariables:(0,o.o8)(this.visualVariables),authoringInfo:(0,o.o8)(this.authoringInfo)})}};(0,n.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],c.prototype,"description",void 0),(0,n.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],c.prototype,"label",void 0),(0,n.Cg)([(0,s.MZ)(u.Wp)],c.prototype,"symbol",void 0),(0,n.Cg)([(0,p.e)({simple:"simple"})],c.prototype,"type",void 0),c=i=(0,n.Cg)([(0,s.$K)("esri.renderers.SimpleRenderer")],c)},99157:(e,t,r)=>{r.d(t,{A:()=>a});var i,n=r(31635),o=r(69622),s=r(91429);let a=i=class extends o.A{constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new i({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,n.Cg)([(0,s.MZ)()],a.prototype,"isInverse",void 0),(0,n.Cg)([(0,s.MZ)()],a.prototype,"wkt",void 0),(0,n.Cg)([(0,s.MZ)()],a.prototype,"wkid",void 0),a=i=(0,n.Cg)([(0,s.$K)("esri.geometry.operators.support.GeographicTransformationStep")],a)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5710,7982],{4513:(e,a,r)=>{r.d(a,{S:()=>t});const t={BingMapsLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(9036)]).then(r.bind(r,17029))).default,BuildingSceneLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(9708),r.e(8654),r.e(6647),r.e(6673),r.e(7005),r.e(8570),r.e(6011),r.e(8993),r.e(1437)]).then(r.bind(r,82411))).default,CSVLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(9708),r.e(8654),r.e(6647),r.e(1197)]).then(r.bind(r,68695))).default,CatalogLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(708),r.e(957),r.e(9708),r.e(6647),r.e(893),r.e(8628),r.e(2593),r.e(9279),r.e(1874)]).then(r.bind(r,83508))).default,DimensionLayer:async()=>(await Promise.all([r.e(3508),r.e(3813)]).then(r.bind(r,71493))).default,ElevationLayer:async()=>(await Promise.all([r.e(3508),r.e(9953),r.e(4802),r.e(8207)]).then(r.bind(r,68611))).default,FeatureLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(9708),r.e(8654),r.e(6647),r.e(9247)]).then(r.bind(r,68654))).default,GaussianSplatLayer:async()=>(await Promise.all([r.e(3508),r.e(6673),r.e(6730)]).then(r.bind(r,36475))).default,GeoJSONLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(8766)]).then(r.bind(r,15481))).default,GeoRSSLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(5890)]).then(r.bind(r,85582))).default,GroupLayer:async()=>(await Promise.all([r.e(3508),r.e(5613),r.e(3562)]).then(r.bind(r,85989))).default,ImageryLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(9953),r.e(1956),r.e(893),r.e(6673),r.e(3356),r.e(6699),r.e(4971)]).then(r.bind(r,84123))).default,ImageryTileLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(9953),r.e(6673),r.e(3356),r.e(6049),r.e(6699),r.e(7677),r.e(9718)]).then(r.bind(r,19718))).default,IntegratedMesh3DTilesLayer:async()=>(await Promise.all([r.e(3508),r.e(6673),r.e(5942),r.e(1312)]).then(r.bind(r,61528))).default,IntegratedMeshLayer:async()=>(await Promise.all([r.e(3508),r.e(6673),r.e(6011),r.e(5942),r.e(7464)]).then(r.bind(r,74660))).default,KMLLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1863)]).then(r.bind(r,162))).default,KnowledgeGraphLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(708),r.e(1017),r.e(9708),r.e(8368),r.e(4649),r.e(217),r.e(8441),r.e(3463),r.e(8948),r.e(8692)]).then(r.bind(r,28692))).default,LineOfSightLayer:async()=>(await Promise.all([r.e(3508),r.e(6673),r.e(1224),r.e(9695)]).then(r.bind(r,49695))).default,LinkChartLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(708),r.e(1017),r.e(9708),r.e(8368),r.e(4649),r.e(217),r.e(8441),r.e(3463),r.e(8948),r.e(1728)]).then(r.bind(r,71728))).default,MapImageLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(708),r.e(957),r.e(893),r.e(7048),r.e(7656),r.e(8999)]).then(r.bind(r,7656))).default,MapNotesLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(9708),r.e(8654),r.e(6647),r.e(3463),r.e(744)]).then(r.bind(r,96299))).default,MediaLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(3444),r.e(9203)]).then(r.bind(r,29203))).default,OGCFeatureLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(708),r.e(1017),r.e(8570),r.e(5977)]).then(r.bind(r,65977))).default,OpenStreetMapLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(9573),r.e(2712)]).then(r.bind(r,40349))).default,OrientedImageryLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(957),r.e(9708),r.e(8654),r.e(6647),r.e(9361),r.e(9644)]).then(r.bind(r,9352))).default,ParquetLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(1017),r.e(581),r.e(940)]).then(r.bind(r,99680))).default,PointCloudLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6673),r.e(7885)]).then(r.bind(r,77885))).default,RouteLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(217),r.e(9785)]).then(r.bind(r,34507))).default,SceneLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(6673),r.e(7005),r.e(8570),r.e(6011),r.e(8993),r.e(1713)]).then(r.bind(r,36969))).default,StreamLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(1017),r.e(73)]).then(r.bind(r,79457))).default,SubtypeGroupLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1956),r.e(8399),r.e(957),r.e(9708),r.e(6647),r.e(9645)]).then(r.bind(r,97483))).default,TileLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(1956),r.e(8399),r.e(708),r.e(957),r.e(893),r.e(4802),r.e(7048),r.e(573)]).then(r.bind(r,71756))).default,UnknownLayer:async()=>(await r.e(146).then(r.bind(r,146))).default,UnsupportedLayer:async()=>(await r.e(5165).then(r.bind(r,45165))).default,VectorTileLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(4802),r.e(5897),r.e(1776)]).then(r.bind(r,48757))).default,VideoLayer:async()=>(await Promise.all([r.e(3508),r.e(3910),r.e(5323),r.e(8303),r.e(957),r.e(3444),r.e(2274)]).then(r.bind(r,86875))).default,ViewshedLayer:async()=>(await Promise.all([r.e(3508),r.e(1224),r.e(6650)]).then(r.bind(r,96650))).default,VoxelLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(1005)]).then(r.bind(r,21005))).default,WCSLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(9953),r.e(3356),r.e(6049),r.e(6699),r.e(7677),r.e(5369)]).then(r.bind(r,88854))).default,WFSLayer:async()=>(await Promise.all([r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(5323),r.e(8303),r.e(4903),r.e(1214),r.e(9953),r.e(1956),r.e(8399),r.e(708),r.e(1017),r.e(9110)]).then(r.bind(r,21901))).default,WMSLayer:async()=>(await Promise.all([r.e(7330),r.e(3508),r.e(2869),r.e(6554),r.e(3910),r.e(5323),r.e(5181)]).then(r.bind(r,51904))).default,WMTSLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(4802),r.e(9573),r.e(309)]).then(r.bind(r,20309))).default,WebTileLayer:async()=>(await Promise.all([r.e(3508),r.e(6554),r.e(9573),r.e(2848)]).then(r.bind(r,47314))).default}},7861:(e,a,r)=>{r.d(a,{L:()=>n});var t=r(11254);async function n(e,a){return(await(0,t.A)(e,{responseType:"json",query:{f:"json",...a?.customParameters,token:a?.apiKey}})).data}},23154:(e,a,r)=>{r.d(a,{K:()=>f,Q:()=>s});var t=r(77548),n=r(7861);const l=new Set(["Catalog Layer","Feature Layer","Oriented Imagery Layer"]);async function s(e,a){const{loadContext:r,...l}=a||{},s=r?await r.fetchServiceMetadata(e,l):await(0,n.L)(e,l),i=(0,t.G$)();d(s),c(s);const o={serviceJSON:s,preferredHost:i};if((s.currentVersion??0)<10.5)return o;const u=`${(0,t.$x)()??e}/layers`,y=r?await r.fetchServiceMetadata(u,l):await(0,n.L)(u,l);return d(y),c(y),o.layersJSON={layers:y.layers,tables:y.tables},o}function i(e){const{type:a}=e;return!!a&&l.has(a)}function o(e){return"Table"===e.type}function c(e){e.layers=e.layers?.filter(i),e.tables=e.tables?.filter(o)}function u(e){e.type||="Feature Layer"}function y(e){e.type||="Table"}function d(e){e.layers?.forEach(u),e.tables?.forEach(y)}function f(e){switch(e){case"Feature Layer":case"Table":return"FeatureLayer";case"Oriented Imagery Layer":return"OrientedImageryLayer";case"Catalog Layer":return"CatalogLayer"}return"FeatureLayer"}},27982:(e,a,r)=>{r.r(a),r.d(a,{fromUrl:()=>d});var t=r(49186),n=r(84952),l=r(60694),s=r(92009),i=r(23154),o=r(77548),c=r(4513),u=r(7861);const y={FeatureLayer:!0,SceneLayer:!0,VideoLayer:!0};async function d(e){const{properties:a,url:c}=e,d={...a,url:c},p=await async function(e,a){let r=(0,l.qg)(e);if(null==r&&(r=await async function(e,a){const r=await(0,u.L)(e,{customParameters:a});let t=null,s=null;const i=r.type;if("Feature Layer"===i||"Table"===i?(t="FeatureServer",s=r.id??null):"indexedVector"===i?t="VectorTileServer":r.hasOwnProperty("mapName")?t="MapServer":r.hasOwnProperty("bandCount")&&r.hasOwnProperty("pixelSizeX")?t="ImageServer":r.hasOwnProperty("maxRecordCount")&&r.hasOwnProperty("allowGeometryUpdates")?t="FeatureServer":r.hasOwnProperty("streamUrls")?t="StreamServer":m(r)?(t="SceneServer",s=r.id):r.hasOwnProperty("layers")&&m(r.layers?.[0])&&(t="SceneServer"),!t)return null;const o=null!=s?(0,l.iz)(e):null;return{title:null!=o&&r.name||(0,n.e7)(e),serverType:t,sublayer:s,url:{path:null!=o?o.serviceUrl:(0,n.An)(e).path}}}(e,a)),null==r)throw new t.A("arcgis-layers:url-mismatch","The url '${url}' is not a valid arcgis resource",{url:e});const{serverType:c,sublayer:d}=r;let f;const w={FeatureServer:"FeatureLayer",KnowledgeGraphServer:"KnowledgeGraphLayer",StreamServer:"StreamLayer",VectorTileServer:"VectorTileLayer",VideoServer:"VideoLayer"},p="FeatureServer"===c,L="SceneServer"===c,b={parsedUrl:r,Constructor:null,layerId:p||L?d??void 0:void 0,layers:[],tables:[]};switch(c){case"MapServer":if(null!=d){const{type:r}=await(0,u.L)(e,{customParameters:a});switch(f="FeatureLayer",r){case"Catalog Layer":f="CatalogLayer";break;case"Catalog Dynamic Group Layer":throw new t.A("arcgis-layers:unsupported",`fromUrl() not supported for "${r}" layers`)}}else f=await async function(e,a){return(await(0,u.L)(e,{customParameters:a})).tileInfo}(e,a)?"TileLayer":"MapImageLayer";break;case"ImageServer":{const r=await(0,u.L)(e,{customParameters:a}),{tileInfo:t,cacheType:n}=r;f=t?"LERC"!==t?.format?.toUpperCase()||n&&"elevation"!==n.toLowerCase()?"ImageryTileLayer":"ElevationLayer":"ImageryLayer";break}case"SceneServer":{const e=await(0,u.L)(r.url.path,{customParameters:a});if(f="SceneLayer",e){const a=e?.layers;if("Voxel"===e?.layerType)f="VoxelLayer";else if(a?.length){const e=a[0]?.layerType;null!=e&&null!=o.XX[e]&&(f=o.XX[e])}}break}case"3DTilesServer":throw new t.A("arcgis-layers:unsupported","fromUrl() not supported for 3DTiles layers");case"FeatureServer":if(f="FeatureLayer",null!=d){const r=await(0,u.L)(e,{customParameters:a});b.sourceJSON=r,b.preferredUrl=(0,o.$x)(),f=(0,i.K)(r.type)}break;default:f=w[c]}if(y[f]&&null==d){const r=await async function(e,a,r){let t,n,l,c=!1;switch(a){case"FeatureServer":{const a=await(0,i.Q)(e,{customParameters:r});l=(0,o.$x)(e,{preferredHost:a.preferredHost}),c=!!a.layersJSON,t=a.layersJSON||a.serviceJSON;break}case"SceneServer":{const a=await async function(e,a){const r=await(0,u.L)(e,{customParameters:a}),t=r.layers?.[0];if(!t)return{serviceInfo:r};try{const{serverUrl:t}=await(0,s.L)(e),n=await(0,u.L)(t,{customParameters:a}).catch(()=>null);return n&&(r.tables=n.tables),{serviceInfo:r,tableServerUrl:t}}catch{return{serviceInfo:r}}}(e,r);t=a.serviceInfo,n=a.tableServerUrl;break}default:t=await(0,u.L)(e,{customParameters:r})}const y=t?.layers,d=t?.tables;return{preferredUrl:l,layers:y?.map(e=>({id:e.id})).reverse()||[],tables:d?.map(e=>({serverUrl:n,id:e.id})).reverse()||[],layerInfos:c?y:[],tableInfos:c?d:[]}}(e,c,a);if(p&&(b.preferredUrl=r.preferredUrl,b.sublayerInfos=r.layerInfos,b.tableInfos=r.tableInfos),1!==r.layers.length+r.tables.length)b.layers=r.layers,b.tables=r.tables,p&&r.layerInfos?.length&&(b.sublayerConstructorProvider=await async function(e){if(!e.length)return;const a=new Set,r=[];for(const{type:t}of e)a.has(t)||(a.add(t),r.push(h((0,i.K)(t))));const t=await Promise.all(r),n=new Map;return Array.from(a).forEach((e,a)=>{n.set(e,t[a])}),e=>n.get(e.type)}(r.layerInfos));else if(p||L){const e=r.layerInfos?.[0]??r.tableInfos?.[0];if(b.layerId=r.layers[0]?.id??r.tables[0]?.id,b.sourceJSON=e,p){const a=e?.type;f=(0,i.K)(a)}}}return b.Constructor=await h(f),b}(c,a?.customParameters),{Constructor:L,layerId:b,sourceJSON:S,parsedUrl:v,layers:P,tables:g}=p;if(P.length+g.length===0)return null!=b&&(d.layerId=b),null!=S&&(d.sourceJSON=S),new L(d);const I=new(0,(await Promise.all([r.e(3508),r.e(5613),r.e(3562)]).then(r.bind(r,85989))).default)({title:v.title});return await async function(e,a,r){const t=a.sublayerConstructorProvider;for(const{id:n,serverUrl:l}of a.layers){const s=f(a.sublayerInfos,n),i=w(l,n,s,(s&&t?.(s))??a.Constructor,r);e.add(i)}if(a.tables.length){const t=await h("FeatureLayer");a.tables.forEach(({id:n,serverUrl:l})=>{const s=w(l,n,f(a.tableInfos,n),t,r);e.tables.add(s)})}}(I,p,d),I}function f(e,a){return e?e.find(({id:e})=>e===a):null}function w(e,a,r,t,n){const l={...n,layerId:a};return null!=e&&(l.url=e),null!=r&&(l.sourceJSON=r),"sublayerTitleMode"in t.prototype&&(l.sublayerTitleMode="service-name"),new t(l)}function m(e){return null!=e&&e.hasOwnProperty("store")&&e.hasOwnProperty("id")&&"number"==typeof e.id}async function h(e){return(0,c.S[e])()}},92009:(e,a,r)=>{r.d(a,{L:()=>u});var t=r(70333),n=r(11254),l=r(49186),s=r(74887),i=r(60694),o=r(20655),c=r(80812);async function u(e,a){const r=(0,i.qg)(e);if(!r)throw new l.A("invalid-url","Invalid scene service url");const u={...a,sceneServerUrl:r.url.path,layerId:r.sublayer??void 0};if(u.sceneLayerItem??=await async function(e){const a=(await y(e)).serviceItemId;if(!a)return null;const r=new c.default({id:a,apiKey:e.apiKey}),l=await async function(e){const a=t.id?.findServerInfo(e.sceneServerUrl);if(a?.owningSystemUrl)return a.owningSystemUrl;const r=e.sceneServerUrl.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const a=(await(0,n.A)(r,{query:{f:"json"},responseType:"json",signal:e.signal})).data.owningSystemUrl;if(a)return a}catch(e){(0,s.QP)(e)}return null}(e);null!=l&&(r.portal=new o.A({url:l}));try{return await r.load({signal:e.signal})}catch(e){return(0,s.QP)(e),null}}(u),null==u.sceneLayerItem)return d(u.sceneServerUrl.replace("/SceneServer","/FeatureServer"),u);const f=await async function({sceneLayerItem:e,signal:a}){if(!e)return null;try{const r=(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:a})).find(e=>"Feature Service"===e.type)||null;if(!r)return null;const t=new c.default({portal:r.portal,id:r.id});return await t.load(),t}catch(e){return(0,s.QP)(e),null}}(u);if(!f?.url)throw new l.A("related-service-not-found","Could not find feature service through portal item relationship");u.featureServiceItem=f;const w=await d(f.url,u);return w.portalItem=f,w}async function y(e){if(e.rootDocument)return e.rootDocument;const a={query:{f:"json",...e.customParameters,token:e.apiKey},responseType:"json",signal:e.signal};try{const r=await(0,n.A)(e.sceneServerUrl,a);e.rootDocument=r.data}catch{e.rootDocument={}}return e.rootDocument}async function d(e,a){const r=(0,i.qg)(e);if(!r)throw new l.A("invalid-feature-service-url","Invalid feature service url");const t=r.url.path,s=a.layerId;if(null==s)return{serverUrl:t};const o=y(a),c=a.featureServiceItem?await a.featureServiceItem.fetchData("json"):null,u=(c?.layers?.[0]||c?.tables?.[0])?.customParameters,d=e=>{const r={query:{f:"json",...u},responseType:"json",authMode:e,signal:a.signal};return(0,n.A)(t,r)},f=d("anonymous").catch(()=>d("no-prompt")),[w,m]=await Promise.all([f,o]),h=m?.layers,p=w.data&&w.data.layers;if(!Array.isArray(p))throw new Error("expected layers array");if(Array.isArray(h)){for(let e=0;e<Math.min(h.length,p.length);e++)if(h[e].id===s)return{serverUrl:t,layerId:p[e].id}}else if(null!=s&&s<p.length)return{serverUrl:t,layerId:p[s].id};throw new Error("could not find matching associated sublayer")}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[581],{563:(e,t,r)=>{r.d(t,{QueueProcessor:()=>c,SharedConcurrency:()=>l});var n=r(97768),_=r(74887),i=r(9775),s=r(32587),o=r(76030),a=r(44794);class c{constructor(e){this._schedule=null,this._deferreds=new s.A,this._controllers=new s.A,this._processingItems=new s.A,this._pausedSignal=(0,a.v)(!1),this.process=e.process,this.concurrency=e.concurrency,this.sharedConcurrency=e.sharedConcurrency??g,this._queue=new i.A(e.peeker)}destroy(){this.clear(),this._schedule=(0,n.xt)(this._schedule)}get updating(){return this.running}get length(){return this._processingItems.size+this._queue.length}get running(){return!this._pausedSignal.value&&this._queue.length>0&&!this.full}get full(){return this._processingItems.size>=this.concurrency||this.sharedConcurrency.full}abort(e){const t=this._controllers.get(e);t?.abort()}clear(){this._queue.clear();const e=Array.from(this._controllers.values());this._controllers.clear(),e.forEach(e=>e.abort()),this.sharedConcurrency.current.value-=this._processingItems.size,this._processingItems.clear(),this._cancelNext()}forEach(e){this._deferreds.forEach((t,r)=>e(r))}_get(e){const t=this._deferreds.get(e);return t?.promise}pause(){this._pausedSignal.value||(this._pausedSignal.value=!0,this._cancelNext())}push(e,t){const r=this._get(e);if(r)return r;const n=new AbortController,i=(0,_.Tw)(),s=t?(0,_.u7)(t,()=>n.abort()):null,o=(0,_.NY)(n.signal,()=>{const t=this._processingItems.get(e);t&&t.controller.abort(),a(),i.reject((0,_.NK)())}),a=()=>{o.remove(),s?.remove(),this._removeItem(e),this._queue.remove(e),this._scheduleNext()};return this._deferreds.set(e,i),this._controllers.set(e,n),i.promise.then(a,a),this._queue.push(e),this._scheduleNext(),i.promise}last(){return this._queue.last()}reset(){const e=Array.from(this._processingItems.values());this.sharedConcurrency.current.value-=this._processingItems.size,this._processingItems.clear();for(const t of e)this._queue.push(t.item),t.controller.abort();this._scheduleNext()}resume(){this._pausedSignal.value&&(this._pausedSignal.value=!1,this._scheduleNext())}takeAll(){const e=[];for(;this._queue.length;)e.push(this._queue.pop());return this.clear(),e}_removeItem(e){this._deferreds.delete(e),this._controllers.delete(e),this._processingItems.has(e)&&(this._processingItems.delete(e),this.sharedConcurrency.current.value-=1)}_scheduleNext(){this._pausedSignal.value||this._schedule||(this._schedule=(0,o._)(()=>{this._schedule=null,this._next()}))}_next(){for(;this._queue.length>0&&this._processingItems.size<this.concurrency&&!this.sharedConcurrency.full;)this._process(this._queue.pop())}_cancelNext(){this._schedule&&(this._schedule.remove(),this._schedule=null)}_processResult(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).resolve(t))}_processError(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).reject(t))}_canProcessFulfillment(e){return!!this._deferreds.get(e.item)&&this._processingItems.get(e.item)===e}_process(e){if(null==e)return;let t;const r=new AbortController,n=new u(e,r);this._processingItems.set(e,n),this.sharedConcurrency.current.value+=1;try{t=this.process(e,r.signal)}catch(e){this._processError(n,e)}(0,_.$X)(t)?(n.promise=t,t.then(e=>this._processResult(n,e),e=>this._processError(n,e))):this._processResult(n,t)}}class u{constructor(e,t){this.item=e,this.controller=t,this.promise=null}}class l{constructor(e){this.limit=e,this.current=(0,a.v)(0)}get full(){return this.current.value>=this.limit}}const g=new l(1/0)},32587:(e,t,r)=>{r.d(t,{A:()=>i});var n=r(62788),_=r(95488);class i{constructor(e){this._observable=new _.I,this._notifyPending=!1,this._batchDepth=0,this._map=new Map(e)}get size(){return(0,n.gc)(this._observable),this._map.size}batch(e){try{this._batchDepth++,e()}finally{this._batchDepth--,this._notifyPending&&0===this._batchDepth&&(this._notifyPending=!1,this._notify())}}clear(){this._map.size>0&&(this._map.clear(),this._notify())}delete(e){const t=this._map.delete(e);return t&&this._notify(),t}entries(){return(0,n.gc)(this._observable),this._map.entries()}forEach(e,t){(0,n.gc)(this._observable),this._map.forEach((r,n)=>e.call(t,r,n,this),t)}get(e){return(0,n.gc)(this._observable),this._map.get(e)}has(e){return(0,n.gc)(this._observable),this._map.has(e)}keys(){return(0,n.gc)(this._observable),this._map.keys()}set(e,t){return this._map.set(e,t),this._notify(),this}transformValues(e,t=this._map.keys()){this.batch(()=>{for(const r of t){if(!this._map.has(r))continue;const t=this._map.get(r),n=e(t,r);n!==t&&this.set(r,n)}})}values(){return(0,n.gc)(this._observable),this._map.values()}[Symbol.iterator](){return(0,n.gc)(this._observable),this._map[Symbol.iterator]()}[Symbol.dispose](){this._observable.destroy()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}_notify(){this._batchDepth>0?this._notifyPending=!0:this._observable.notify()}}},57733:(e,t,r)=>{let n;function _(e){const t=n.__externref_table_alloc();return n.__wbindgen_export_2.set(t,e),t}function i(e,t){try{return e.apply(this,t)}catch(e){const t=_(e);n.__wbindgen_exn_store(t)}}r.r(t),r.d(t,{ColumnDescriptor:()=>E,FieldMetadata:()=>U,GeometryInfo:()=>B,GeometryType:()=>j,MultiscaleGeometryField:()=>X,PageEncodingDescriptor:()=>$,ParquetChunk:()=>J,ParquetFile:()=>H,PrimaryGeometryField:()=>ee,QuantizedGeometryBuffer:()=>re,RangeProviderJs:()=>_e,RowGroup:()=>se,default:()=>le,enableTracing:()=>T,initSync:()=>ue});let s=null;function o(){return null!==s&&0!==s.byteLength||(s=new Uint8Array(n.memory.buffer)),s}let a=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});a.decode();const c=2146435072;let u=0;function l(e,t){return function(e,t){return u+=t,u>=c&&(a=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),a.decode(),u=t),a.decode(o().subarray(e,e+t))}(e>>>=0,t)}function g(e,t){return e>>>=0,o().subarray(e/1,e/1+t)}let p=null;function b(){return null!==p&&0!==p.byteLength||(p=new Uint32Array(n.memory.buffer)),p}function d(e,t){return e>>>=0,b().subarray(e/4,e/4+t)}let w=0;const f=new TextEncoder;function h(e,t,r){if(void 0===r){const r=f.encode(e),n=t(r.length,1)>>>0;return o().subarray(n,n+r.length).set(r),w=r.length,n}let n=e.length,_=t(n,1)>>>0;const i=o();let s=0;for(;s<n;s++){const t=e.charCodeAt(s);if(t>127)break;i[_+s]=t}if(s!==n){0!==s&&(e=e.slice(s)),_=r(_,n,n=s+3*e.length,1)>>>0;const t=o().subarray(_+s,_+n);s+=f.encodeInto(e,t).written,_=r(_,n,s,1)>>>0}return w=s,_}"encodeInto"in f||(f.encodeInto=function(e,t){const r=f.encode(e);return t.set(r),{read:e.length,written:r.length}});let y=null;function m(){return(null===y||!0===y.buffer.detached||void 0===y.buffer.detached&&y.buffer!==n.memory.buffer)&&(y=new DataView(n.memory.buffer)),y}function v(e){return null==e}const F="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>{n.__wbindgen_export_6.get(e.dtor)(e.a,e.b)});function q(e,t,r,_){const i={a:e,b:t,cnt:1,dtor:r},s=(...e)=>{i.cnt++;const t=i.a;i.a=0;try{return _(t,i.b,...e)}finally{0===--i.cnt?(n.__wbindgen_export_6.get(i.dtor)(t,i.b),F.unregister(i)):i.a=t}};return s.original=i,F.register(s,i,i),s}function k(e,t){e>>>=0;const r=m(),_=[];for(let i=e;i<e+4*t;i+=4)_.push(n.__wbindgen_export_2.get(r.getUint32(i,!0)));return n.__externref_drop_slice(e,t),_}let S=null;function z(){return null!==S&&0!==S.byteLength||(S=new Int16Array(n.memory.buffer)),S}function T(){n.enableTracing()}let R=null;function I(){return null!==R&&0!==R.byteLength||(R=new Float64Array(n.memory.buffer)),R}function A(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`)}function C(e,t){const r=t(8*e.length,8)>>>0;return I().set(e,r/8),w=e.length,r}function x(e,t){const r=t(4*e.length,4)>>>0;for(let t=0;t<e.length;t++){const n=_(e[t]);m().setUint32(r+4*t,n,!0)}return w=e.length,r}function P(e,t){const r=t(1*e.length,1)>>>0;return o().set(e,r/1),w=e.length,r}function O(e,t){const r=t(4*e.length,4)>>>0;return b().set(e,r/4),w=e.length,r}function M(e,t,r){n.closure86_externref_shim(e,t,r)}function G(e,t,r,_){n.closure12_externref_shim(e,t,r,_)}const j=Object.freeze({Point:0,0:"Point",Polygon:1,1:"Polygon",Polyline:2,2:"Polyline",Multipoint:3,3:"Multipoint"}),L=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeBigInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],D="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>n.__wbg_columndescriptor_free(e>>>0,1));class E{static __wrap(e){e>>>=0;const t=Object.create(E.prototype);return t.__wbg_ptr=e,D.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,D.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_columndescriptor_free(e,0)}name(){let e,t;try{const r=n.columndescriptor_name(this.__wbg_ptr);return e=r[0],t=r[1],l(r[0],r[1])}finally{n.__wbindgen_free(e,t,1)}}physicalType(){let e,t;try{const r=n.columndescriptor_physicalType(this.__wbg_ptr);return e=r[0],t=r[1],l(r[0],r[1])}finally{n.__wbindgen_free(e,t,1)}}logicalType(){const e=n.columndescriptor_logicalType(this.__wbg_ptr);let t;return 0!==e[0]&&(t=l(e[0],e[1]).slice(),n.__wbindgen_free(e[0],1*e[1],1)),t}encodings(){const e=n.columndescriptor_encodings(this.__wbg_ptr);var t=k(e[0],e[1]).slice();return n.__wbindgen_free(e[0],4*e[1],4),t}pageEncodings(){const e=n.columndescriptor_pageEncodings(this.__wbg_ptr);let t;return 0!==e[0]&&(t=k(e[0],e[1]).slice(),n.__wbindgen_free(e[0],4*e[1],4)),t}numValues(){return n.columndescriptor_numValues(this.__wbg_ptr)}compression(){let e,t;try{const r=n.columndescriptor_compression(this.__wbg_ptr);return e=r[0],t=r[1],l(r[0],r[1])}finally{n.__wbindgen_free(e,t,1)}}compressedSize(){return n.columndescriptor_compressedSize(this.__wbg_ptr)}uncompressedSize(){return n.columndescriptor_uncompressedSize(this.__wbg_ptr)}nullCount(){const e=n.columndescriptor_nullCount(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}distinctCount(){const e=n.columndescriptor_distinctCount(this.__wbg_ptr);return 0===e[0]?void 0:e[1]}minValue(){return n.columndescriptor_minValue(this.__wbg_ptr)}maxValue(){return n.columndescriptor_maxValue(this.__wbg_ptr)}}Symbol.dispose&&(E.prototype[Symbol.dispose]=E.prototype.free);const N="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>n.__wbg_fieldmetadata_free(e>>>0,1));class U{static __wrap(e){e>>>=0;const t=Object.create(U.prototype);return t.__wbg_ptr=e,N.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,N.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_fieldmetadata_free(e,0)}get column(){return n.__wbg_get_fieldmetadata_column(this.__wbg_ptr)>>>0}set column(e){n.__wbg_set_fieldmetadata_column(this.__wbg_ptr,e)}get name(){let e,t;try{const r=n.fieldmetadata_name(this.__wbg_ptr);return e=r[0],t=r[1],l(r[0],r[1])}finally{n.__wbindgen_free(e,t,1)}}get type(){const e=n.fieldmetadata_esri_type(this.__wbg_ptr);return L[e]}get physicalType(){const e=n.fieldmetadata_physical_type(this.__wbg_ptr);let t;return 0!==e[0]&&(t=l(e[0],e[1]).slice(),n.__wbindgen_free(e[0],1*e[1],1)),t}get logicalType(){const e=n.fieldmetadata_logical_type(this.__wbg_ptr);let t;return 0!==e[0]&&(t=l(e[0],e[1]).slice(),n.__wbindgen_free(e[0],1*e[1],1)),t}}Symbol.dispose&&(U.prototype[Symbol.dispose]=U.prototype.free);const W="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>n.__wbg_geometryinfo_free(e>>>0,1));class B{static __wrap(e){e>>>=0;const t=Object.create(B.prototype);return t.__wbg_ptr=e,W.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,W.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_geometryinfo_free(e,0)}static new(e,t,r,_,i){A(_,ee);var s=_.__destroy_into_raw();const o=x(i,n.__wbindgen_malloc),a=w,c=n.geometryinfo_new(e,t,r,s,o,a);return B.__wrap(c)}}Symbol.dispose&&(B.prototype[Symbol.dispose]=B.prototype.free);const V="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>n.__wbg_multiscalegeometryfield_free(e>>>0,1));class X{static __wrap(e){e>>>=0;const t=Object.create(X.prototype);return t.__wbg_ptr=e,V.register(t,t.__wbg_ptr,t),t}static __unwrap(e){return e instanceof X?e.__destroy_into_raw():0}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,V.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_multiscalegeometryfield_free(e,0)}get level(){return n.__wbg_get_multiscalegeometryfield_level(this.__wbg_ptr)}set level(e){n.__wbg_set_multiscalegeometryfield_level(this.__wbg_ptr,e)}static new(e,t,r,_){const i=h(t,n.__wbindgen_malloc,n.__wbindgen_realloc),s=w,o=C(r,n.__wbindgen_malloc),a=w,c=C(_,n.__wbindgen_malloc),u=w,l=n.multiscalegeometryfield_new(e,i,s,o,a,c,u);return X.__wrap(l)}has_field(e){const t=h(e,n.__wbindgen_malloc,n.__wbindgen_realloc),r=w;return 0!==n.multiscalegeometryfield_has_field(this.__wbg_ptr,t,r)}}Symbol.dispose&&(X.prototype[Symbol.dispose]=X.prototype.free);const Y="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>n.__wbg_pageencodingdescriptor_free(e>>>0,1));class ${static __wrap(e){e>>>=0;const t=Object.create($.prototype);return t.__wbg_ptr=e,Y.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Y.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_pageencodingdescriptor_free(e,0)}pageType(){let e,t;try{const r=n.pageencodingdescriptor_pageType(this.__wbg_ptr);return e=r[0],t=r[1],l(r[0],r[1])}finally{n.__wbindgen_free(e,t,1)}}encoding(){let e,t;try{const r=n.pageencodingdescriptor_encoding(this.__wbg_ptr);return e=r[0],t=r[1],l(r[0],r[1])}finally{n.__wbindgen_free(e,t,1)}}count(){return n.pageencodingdescriptor_count(this.__wbg_ptr)}}Symbol.dispose&&($.prototype[Symbol.dispose]=$.prototype.free);const Z="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>n.__wbg_parquetchunk_free(e>>>0,1));class J{static __wrap(e){e>>>=0;const t=Object.create(J.prototype);return t.__wbg_ptr=e,Z.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Z.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_parquetchunk_free(e,0)}size(){return n.parquetchunk_size(this.__wbg_ptr)>>>0}isEmpty(e){return 0!==n.parquetchunk_isEmpty(this.__wbg_ptr,e)}rowId(e){return n.parquetchunk_rowId(this.__wbg_ptr,e)}readX(e){const t=n.parquetchunk_readX(this.__wbg_ptr,e);return 0===t[0]?void 0:t[1]}readY(e){const t=n.parquetchunk_readY(this.__wbg_ptr,e);return 0===t[0]?void 0:t[1]}readCoords(e){const t=n.parquetchunk_readCoords(this.__wbg_ptr,e);let r;return 0!==t[0]&&(r=function(e,t){return e>>>=0,I().subarray(e/8,e/8+t)}(t[0],t[1]).slice(),n.__wbindgen_free(t[0],8*t[1],8)),r}readLengths(e){const t=n.parquetchunk_readLengths(this.__wbg_ptr,e);let r;return 0!==t[0]&&(r=d(t[0],t[1]).slice(),n.__wbindgen_free(t[0],4*t[1],4)),r}transformGeometry(e,t,r,_,i,s){A(e,re);const o=n.parquetchunk_transformGeometry(this.__wbg_ptr,e.__wbg_ptr,t,r,_,i,s);return 16777215===o?void 0:0!==o}boundsXMin(e){const t=n.parquetchunk_boundsXMin(this.__wbg_ptr,e);return 0===t[0]?void 0:t[1]}boundsYMin(e){const t=n.parquetchunk_boundsYMin(this.__wbg_ptr,e);return 0===t[0]?void 0:t[1]}boundsXMax(e){const t=n.parquetchunk_boundsXMax(this.__wbg_ptr,e);return 0===t[0]?void 0:t[1]}boundsYMax(e){const t=n.parquetchunk_boundsYMax(this.__wbg_ptr,e);return 0===t[0]?void 0:t[1]}readAttribute(e,t){return n.parquetchunk_readAttribute(this.__wbg_ptr,e,t)}}Symbol.dispose&&(J.prototype[Symbol.dispose]=J.prototype.free);const Q="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>n.__wbg_parquetfile_free(e>>>0,1));class H{static __wrap(e){e>>>=0;const t=Object.create(H.prototype);return t.__wbg_ptr=e,Q.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,Q.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_parquetfile_free(e,0)}static fromUrl(e,t,r,_){const i=h(e,n.__wbindgen_malloc,n.__wbindgen_realloc),s=w;let o=0;return v(_)||(A(_,B),o=_.__destroy_into_raw()),n.parquetfile_fromUrl(i,s,t,r,o)}static fromBinary(e,t){const r=P(e,n.__wbindgen_malloc),_=w;let i=0;return v(t)||(A(t,B),i=t.__destroy_into_raw()),n.parquetfile_fromBinary(r,_,i)}version(){return n.parquetfile_version(this.__wbg_ptr)}byteLength(){return n.parquetfile_byteLength(this.__wbg_ptr)}numRows(){return n.parquetfile_numRows(this.__wbg_ptr)>>>0}numFields(){return n.parquetfile_numFields(this.__wbg_ptr)>>>0}numColumns(){return n.parquetfile_numColumns(this.__wbg_ptr)>>>0}createdBy(){const e=n.parquetfile_createdBy(this.__wbg_ptr);let t;return 0!==e[0]&&(t=l(e[0],e[1]).slice(),n.__wbindgen_free(e[0],1*e[1],1)),t}keyValueMetadata(e){const t=h(e,n.__wbindgen_malloc,n.__wbindgen_realloc),r=w,_=n.parquetfile_keyValueMetadata(this.__wbg_ptr,t,r);let i;return 0!==_[0]&&(i=l(_[0],_[1]).slice(),n.__wbindgen_free(_[0],1*_[1],1)),i}keys(){const e=n.parquetfile_keys(this.__wbg_ptr);let t;return 0!==e[0]&&(t=k(e[0],e[1]).slice(),n.__wbindgen_free(e[0],4*e[1],4)),t}columnForFieldName(e){const t=h(e,n.__wbindgen_malloc,n.__wbindgen_realloc),r=w,_=n.parquetfile_columnForFieldName(this.__wbg_ptr,t,r);return 4294967297===_?void 0:_}fields(){const e=n.parquetfile_fields(this.__wbg_ptr);var t=k(e[0],e[1]).slice();return n.__wbindgen_free(e[0],4*e[1],4),t}rowGroups(){const e=n.parquetfile_rowGroups(this.__wbg_ptr);var t=k(e[0],e[1]).slice();return n.__wbindgen_free(e[0],4*e[1],4),t}ensureFields(e){const t=O(e,n.__wbindgen_malloc),r=w;return n.parquetfile_ensureFields(this.__wbg_ptr,t,r)}readFirstChunk(e){const t=O(e,n.__wbindgen_malloc),r=w;return n.parquetfile_readFirstChunk(this.__wbg_ptr,t,r)}readChunk(e,t,r,_,i){const s=O(r,n.__wbindgen_malloc),o=w;return n.parquetfile_readChunk(this.__wbg_ptr,e,t,s,o,_,i)}readChunksByRowId(e,t,r,_){const i=O(e,n.__wbindgen_malloc),s=w,o=O(t,n.__wbindgen_malloc),a=w;return n.parquetfile_readChunksByRowId(this.__wbg_ptr,i,s,o,a,r,_)}readAllChunks(e,t,r){const _=O(e,n.__wbindgen_malloc),i=w;return n.parquetfile_readAllChunks(this.__wbg_ptr,_,i,t,r)}queryZChunks(e,t,r,_){const i=O(t,n.__wbindgen_malloc),s=w;return n.parquetfile_queryZChunks(this.__wbg_ptr,e,i,s,r,_)}queryXZChunks(e,t,r){return n.parquetfile_queryXZChunks(this.__wbg_ptr,e,t,r)}}Symbol.dispose&&(H.prototype[Symbol.dispose]=H.prototype.free);const K="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>n.__wbg_primarygeometryfield_free(e>>>0,1));class ee{static __wrap(e){e>>>=0;const t=Object.create(ee.prototype);return t.__wbg_ptr=e,K.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,K.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_primarygeometryfield_free(e,0)}static fromNative(e){const t=h(e,n.__wbindgen_malloc,n.__wbindgen_realloc),r=w,_=n.primarygeometryfield_fromNative(t,r);return ee.__wrap(_)}static fromWkb(e){const t=h(e,n.__wbindgen_malloc,n.__wbindgen_realloc),r=w,_=n.primarygeometryfield_fromWkb(t,r);return ee.__wrap(_)}static fromLocation(e,t){const r=h(e,n.__wbindgen_malloc,n.__wbindgen_realloc),_=w,i=h(t,n.__wbindgen_malloc,n.__wbindgen_realloc),s=w,o=n.primarygeometryfield_fromLocation(r,_,i,s);return ee.__wrap(o)}}Symbol.dispose&&(ee.prototype[Symbol.dispose]=ee.prototype.free);const te="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>n.__wbg_quantizedgeometrybuffer_free(e>>>0,1));class re{static __wrap(e){e>>>=0;const t=Object.create(re.prototype);return t.__wbg_ptr=e,te.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,te.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_quantizedgeometrybuffer_free(e,0)}static new(){const e=n.quantizedgeometrybuffer_new();return re.__wrap(e)}readCoordsUnsafe(){return n.quantizedgeometrybuffer_readCoordsUnsafe(this.__wbg_ptr)}readLengthsUnsafe(){return n.quantizedgeometrybuffer_readLengthsUnsafe(this.__wbg_ptr)}}Symbol.dispose&&(re.prototype[Symbol.dispose]=re.prototype.free);const ne="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>n.__wbg_rangeproviderjs_free(e>>>0,1));class _e{static __wrap(e){e>>>=0;const t=Object.create(_e.prototype);return t.__wbg_ptr=e,ne.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ne.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_rangeproviderjs_free(e,0)}static new(e,t){const r=n.rangeproviderjs_new(e,t);return _e.__wrap(r)}static withFetch(){const e=n.rangeproviderjs_withFetch();return _e.__wrap(e)}}Symbol.dispose&&(_e.prototype[Symbol.dispose]=_e.prototype.free);const ie="undefined"==typeof FinalizationRegistry?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>n.__wbg_rowgroup_free(e>>>0,1));class se{static __wrap(e){e>>>=0;const t=Object.create(se.prototype);return t.__wbg_ptr=e,ie.register(t,t.__wbg_ptr,t),t}__destroy_into_raw(){const e=this.__wbg_ptr;return this.__wbg_ptr=0,ie.unregister(this),e}free(){const e=this.__destroy_into_raw();n.__wbg_rowgroup_free(e,0)}columnDescriptorForAttribute(e){const t=n.rowgroup_columnDescriptorForAttribute(this.__wbg_ptr,e);return E.__wrap(t)}}Symbol.dispose&&(se.prototype[Symbol.dispose]=se.prototype.free);const oe=new Set(["basic","cors","default"]);function ae(){const e={wbg:{}};return e.wbg.__wbg_aborted_bbd6fc8f83561eda=function(e){return e.aborted},e.wbg.__wbg_apply_dc50eb58583d2a57=function(){return i(function(e,t,r){return e.apply(t,r)},arguments)},e.wbg.__wbg_call_13410aac570ffff7=function(){return i(function(e,t){return e.call(t)},arguments)},e.wbg.__wbg_call_a5400b25a865cfd8=function(){return i(function(e,t,r){return e.call(t,r)},arguments)},e.wbg.__wbg_error_7534b8e9a36f1ab4=function(e,t){let r,_;try{r=e,_=t,console.error(l(e,t))}finally{n.__wbindgen_free(r,_,1)}},e.wbg.__wbg_fieldmetadata_new=function(e){return U.__wrap(e)},e.wbg.__wbg_get_458e874b43b18b25=function(){return i(function(e,t){return Reflect.get(e,t)},arguments)},e.wbg.__wbg_length_555ae304a7c78975=function(e){return e.length},e.wbg.__wbg_length_6bb7e81f9d7713e4=function(e){return e.length},e.wbg.__wbg_multiscalegeometryfield_unwrap=function(e){return X.__unwrap(e)},e.wbg.__wbg_new_2e3c58a15f39f5f9=function(e,t){try{var r={a:e,b:t};return new Promise((e,t)=>{const n=r.a;r.a=0;try{return G(n,r.b,e,t)}finally{r.a=n}})}finally{r.a=r.b=0}},e.wbg.__wbg_new_638ebfaedbf32a5e=function(e){return new Uint8Array(e)},e.wbg.__wbg_new_8a6f238a6ece86ea=function(){return new Error},e.wbg.__wbg_newnoargs_254190557c45b4ec=function(e,t){return new Function(l(e,t))},e.wbg.__wbg_newwithlength_c2868113efe93526=function(e){return new Array(e>>>0)},e.wbg.__wbg_pageencodingdescriptor_new=function(e){return $.__wrap(e)},e.wbg.__wbg_parquetchunk_new=function(e){return J.__wrap(e)},e.wbg.__wbg_parquetfile_new=function(e){return H.__wrap(e)},e.wbg.__wbg_prototypesetcall_3d4a26c1ed734349=function(e,t,r){Uint8Array.prototype.set.call(g(e,t),r)},e.wbg.__wbg_prototypesetcall_c805289d23423a87=function(e,t,r){Uint32Array.prototype.set.call(d(e,t),r)},e.wbg.__wbg_queueMicrotask_25d0739ac89e8c88=function(e){queueMicrotask(e)},e.wbg.__wbg_queueMicrotask_4488407636f5bf24=function(e){return e.queueMicrotask},e.wbg.__wbg_resolve_4055c623acdd6a1b=function(e){return Promise.resolve(e)},e.wbg.__wbg_rowgroup_new=function(e){return se.__wrap(e)},e.wbg.__wbg_set_90f6c0f7bd8c0415=function(e,t,r){e[t>>>0]=r},e.wbg.__wbg_stack_0ed75d68575b0f3c=function(e,t){const r=h(t.stack,n.__wbindgen_malloc,n.__wbindgen_realloc),_=w;m().setInt32(e+4,_,!0),m().setInt32(e+0,r,!0)},e.wbg.__wbg_static_accessor_GLOBAL_8921f820c2ce3f12=function(){const e="undefined"==typeof global?null:global;return v(e)?0:_(e)},e.wbg.__wbg_static_accessor_GLOBAL_THIS_f0a4409105898184=function(){const e="undefined"==typeof globalThis?null:globalThis;return v(e)?0:_(e)},e.wbg.__wbg_static_accessor_SELF_995b214ae681ff99=function(){const e="undefined"==typeof self?null:self;return v(e)?0:_(e)},e.wbg.__wbg_static_accessor_WINDOW_cde3890479c675ea=function(){const e="undefined"==typeof window?null:window;return v(e)?0:_(e)},e.wbg.__wbg_then_b33a773d723afa3e=function(e,t,r){return e.then(t,r)},e.wbg.__wbg_then_e22500defe16819f=function(e,t){return e.then(t)},e.wbg.__wbg_valueOf_f1ef20623c7bdd1c=function(e){return e.valueOf()},e.wbg.__wbg_wbindgencbdrop_eb10308566512b88=function(e){const t=e.original;return 1==t.cnt--&&(t.a=0,!0)},e.wbg.__wbg_wbindgenisfunction_8cee7dce3725ae74=function(e){return"function"==typeof e},e.wbg.__wbg_wbindgenisundefined_c4b71d073b92f3c5=function(e){return void 0===e},e.wbg.__wbg_wbindgennumberget_f74b4c7525ac05cb=function(e,t){const r="number"==typeof t?t:void 0;m().setFloat64(e+8,v(r)?0:r,!0),m().setInt32(e+0,!v(r),!0)},e.wbg.__wbg_wbindgenthrow_451ec1a8469d7eb6=function(e,t){throw new Error(l(e,t))},e.wbg.__wbindgen_cast_2241b6af4c4b2941=function(e,t){return l(e,t)},e.wbg.__wbindgen_cast_59b536ec5375efa9=function(e,t){return q(e,t,85,M)},e.wbg.__wbindgen_cast_77bc3e92745e9a35=function(e,t){var r=g(e,t).slice();return n.__wbindgen_free(e,1*t,1),r},e.wbg.__wbindgen_cast_7c316abdc43840a3=function(e,t){return d(e,t)},e.wbg.__wbindgen_cast_9ae0607507abb057=function(e){return e},e.wbg.__wbindgen_cast_b4c60c1010b00353=function(e,t){var r=k(e,t).slice();return n.__wbindgen_free(e,4*t,4),r},e.wbg.__wbindgen_cast_d6cd19b81560fd6e=function(e){return e},e.wbg.__wbindgen_cast_e47ceb6027f5c92c=function(e,t){return function(e,t){return e>>>=0,z().subarray(e/2,e/2+t)}(e,t)},e.wbg.__wbindgen_init_externref_table=function(){const e=n.__wbindgen_export_2,t=e.grow(4);e.set(0,void 0),e.set(t+0,void 0),e.set(t+1,null),e.set(t+2,!0),e.set(t+3,!1)},e}function ce(e,t){return n=e.exports,le.__wbindgen_wasm_module=t,y=null,R=null,S=null,p=null,s=null,n.__wbindgen_start(),n}function ue(e){if(void 0!==n)return n;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({module:e}=e):console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));const t=ae();return e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e)),ce(new WebAssembly.Instance(e,t),e)}async function le(e){if(void 0!==n)return n;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({module_or_path:e}=e):console.warn("using deprecated parameters for the initialization function; pass a single object instead"));const t=ae();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:r,module:_}=await async function(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(!e.ok||!oe.has(e.type)||"application/wasm"===e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}{const r=await WebAssembly.instantiate(e,t);return r instanceof WebAssembly.Instance?{instance:r,module:e}:r}}(await e,t);return ce(r,_)}},70581:(e,t,r)=>{r.d(t,{DV:()=>b,Hj:()=>w,hD:()=>d});var n=r(11254),_=r(49186),i=(r(44208),r(563)),s=r(84952),o=r(2741);let a=null;async function c(){return a||(a=async function(){const e=await Promise.resolve().then(r.bind(r,57733));return await e.default({module_or_path:(0,o.s)("esri/libs/parquet/pkg/bundle_bg.wasm")}),e}()),a}var u=r(57733);const l=new i.QueueProcessor({concurrency:8,process:async e=>{const{data:t}=await(0,n.A)(e.url,e.options);return t}}),g=e=>async function(t,r,n,_){const i=e?.(),s=i??{};return await l.push({url:t,options:{responseType:"array-buffer",query:s,headers:{range:`bytes=${r}-${n}`}}})},p=e=>async function(t){if((0,s.w8)(t)){const{data:e}=await(0,n.A)(t,{responseType:"blob"});return e.size}const{data:r}=await(0,n.A)(t,{responseType:"native",method:"head",query:e?.()}),_=r.headers.get("Content-Length");if(null==_)throw new Error("Unable to parse content length");return parseInt(_,10)};async function b(e,t={}){const{ParquetFile:r}=await c(),n=g(t.getCustomParameters),i=p(t.getCustomParameters),s=t.geometryInfo?function(e,t){const r=e.spatialReference.wkid,n=t.wkid;if(!r||!n)throw new _.A("parquet","Unable to create ParquetFile, in and out wkid must be specified");const i=function(e){switch(e){case"esriGeometryPoint":return u.GeometryType.Point;case"esriGeometryPolygon":return u.GeometryType.Polygon;case"esriGeometryPolyline":return u.GeometryType.Polyline;case"esriGeometryMultipoint":return u.GeometryType.Multipoint;default:throw new _.A("parquet",`Found unexpected GeometryType: ${e}`)}}(e.geometryType),s=function(e){switch(e.encoding.type){case"wkb":return u.PrimaryGeometryField.fromWkb(e.encoding.field);case"location":{const{yField:t,xField:r}=e.encoding;return u.PrimaryGeometryField.fromLocation(t,r)}}}(e),o=[];if("xz"===e.displayOptimization?.mode){const t=e.displayOptimization.multiscale;for(const e of t.levels??[]){const[t,r]=e.transform.translate,[n,_]=e.transform.scale,i=new Float64Array([t,r]),s=new Float64Array([n,_]);o.push(u.MultiscaleGeometryField.new(e.level,e.column,i,s))}}return u.GeometryInfo.new(i,r,n,s,o)}(t.geometryInfo,t.outSpatialReference??t.geometryInfo.spatialReference):null;return r.fromUrl(e,n,i,s)}function d(e){const t=e.keyValueMetadata("geo");return null!=t?JSON.parse(t):null}function w(e){const t=e.keyValueMetadata("esri");return null!=t?JSON.parse(t):null}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5165,7546],{159:(e,t,n)=>{n.d(t,{A:()=>a});var r,i=n(31635),s=n(69622),l=n(91429),o=n(99157);let a=r=class extends s.A{constructor(e){super(e),this.steps=[]}getInverse(){const e=new r;for(let t=this.steps.length-1;t>=0;t--){const n=this.steps[t];e.steps.push(n.getInverse())}return e}};(0,i.Cg)([(0,l.MZ)({type:[o.A],nonNullable:!0})],a.prototype,"steps",void 0),a=r=(0,i.Cg)([(0,l.$K)("esri.geometry.operators.support.GeographicTransformation")],a)},8303:(e,t,n)=>{n.d(t,{A:()=>I});var r=n(31635),i=n(92602),s=n(70333),l=n(11254),o=n(60999),a=n(49186),u=n(53966),c=n(97768),p=n(74887),f=n(84952),h=n(91429),d=n(77548),g=n(20655),y=n(80812),m=n(41318),v=n(10407),w=n(36005),M=n(43937);const I=e=>{const t=e;let I=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,n){if(t.itemId)return new y.default({id:t.itemId,portal:n?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await n.e(1204).then(n.bind(n,41204));return(0,p.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,p.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,p.QP)(e),!0)))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:n,fullEdit:r},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",n),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let n=this.portalItem;if(!e||!n||!n.loaded||n.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=!s.id?.findCredential(this.url),i=e===n.id;if(i&&n.portal.user)return this._getUserPrivileges(n,r);let l,o;if(i)l=n.portal.url;else try{l=await(0,d.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!l||!(0,f.b8)(l,n.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(s.id?.getCredential(`${l}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const a=!0,u=!1,c=!1;if(!o)return{features:{edit:a,fullEdit:u},content:{updateItem:c}};try{if(i?await n.reload():(n=new y.default({id:e,portal:{url:l}}),await n.load(t)),n.portal.user)return this._getUserPrivileges(n,r)}catch(e){(0,p.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const n=(0,v.It)(e);return t&&(n.features.edit=!0),n}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const n=_.credential===t?_.user:await this._fetchEditingUser(e);return _.credential=t,_.user=n,null==n?.privileges||n.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const n=s.id?.findServerInfo(this.url??"");if(!n?.owningSystemUrl)return null;const r=`${n.owningSystemUrl}/sharing/rest`,i=g.A.getDefault();if(i&&i.loaded&&(0,f.S8)(i.restUrl)===(0,f.S8)(r))return i.user;const a=`${r}/community/self`,u=null!=e?e.signal:null,c=await(0,o.Ke)((0,l.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?m.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const n=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||g.A.getDefault());return n&&r&&!(0,f.ut)(r.restUrl,n.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r.Cg)([(0,h.MZ)({type:y.default})],I.prototype,"portalItem",null),(0,r.Cg)([(0,w.w)("web-document","portalItem",["itemId"])],I.prototype,"readPortalItem",null),(0,r.Cg)([(0,M.K)("web-document","portalItem",{itemId:{type:String}})],I.prototype,"writePortalItem",null),(0,r.Cg)([(0,h.MZ)({clonable:!1})],I.prototype,"resourceReferences",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasEditingPrivileges",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasFullEditingPrivileges",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasUpdateItemPrivileges",void 0),I=(0,r.Cg)([(0,h.$K)("esri.layers.mixins.PortalLayer")],I),I},_={credential:null,user:null}},9762:(e,t,n)=>{n.r(t),n.d(t,{projectBuffer:()=>i});var r=n(37539);function i(e,t,n,i,s,l,o=Math.floor(e.length/3)){const a=(0,r.jd)(t,s);if(null==a)return!1;if(a===r.pO){if(e===i&&n===l)return!0;const t=n+3*o;for(let r=n,s=l;r<t;r++,s++)i[s]=e[r]??0;return!0}const u=n+3*o;for(let t=n,r=l;t<u;t+=3,r+=3)a(e,t,i,r);return!0}},10407:(e,t,n)=>{n.d(t,{It:()=>h,LG:()=>l,OM:()=>u,Sm:()=>c,Y:()=>o,bK:()=>a,mm:()=>f,sQ:()=>p});var r=n(91218),i=n(16930),s=n(28735);function l(e,t){if(!o(e,t)){const n=e.typeKeywords;n?n.push(t):e.typeKeywords=[t]}}function o(e,t){return!!e.typeKeywords?.includes(t)}function a(e){return o(e,f.HOSTED_SERVICE)}function u(e,t){const n=e.typeKeywords;if(n){const e=n.indexOf(t);e>-1&&n.splice(e,1)}}function c(e,t,n){n?l(e,t):u(e,t)}async function p(e){const t=e.clone().normalize();let n;if(t.length>1)for(const e of t)n?e.width>n.width&&(n=e):n=e;else n=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.ci)(e);const n=i.A.WGS84;return await(0,r.initializeProjection)(t,n),(0,r.project)(e,n)}(n)}const f={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function h(e){const{portal:t,isOrgItem:n,itemControl:r}=e,i=t.user?.privileges;let s=!i||i.includes("features:user:edit"),l=!!n&&!!i?.includes("features:user:fullEdit");const o="update"===r||"admin"===r;return o?l=s=!0:l&&(s=!0),{features:{edit:s,fullEdit:l},content:{updateItem:o}}}},25728:(e,t,n)=>{n.d(t,{P:()=>w,L:()=>M});var r=n(31635),i=n(69622),s=n(76953),l=n(4718),o=n(35666);class a{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(o.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new a,n=this._originStores[0];n&&n.forEach((e,n)=>{t.set(n,(0,l.o8)(e),0)});for(let n=2;n<o.AU;n++){const r=this._originStores[n];r&&r.forEach((r,i)=>{e&&e.has(i)||t.set(i,(0,l.o8)(r),n)})}return t}get(e,t){const n=void 0===t?this._values:this._originStores[t];return n?n.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,n=7){let r=this._originStores[n];if(r||(r=new Map,this._originStores[n]=r),r.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=n){const r=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,n),r!==t}return!1}delete(e,t=7){const n=this._originStores[t];if(!n)return;const r=n.get(e);if(n.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let n=t-1;n>=0;n--){const t=this._originStores[n];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,n);break}}}return r}has(e,t){const n=void 0===t?this._values:this._originStores[t];return!!n&&n.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const n=this._originStores[t],r=n?.get(e),i=this._values.get(e);return this._values.set(e,r),this._propertyOriginMap.set(e,t),i!==r}originOf(e){return this._propertyOriginMap.get(e)||0}isAtOrigin(e,t){return this.has(e,t)&&this.originOf(e)===t}isBelowOrigin(e,t){return!this.has(e)||this.originOf(e)<t}forEach(e){this._values.forEach(e)}}var u=n(45917),c=n(88620),p=n(64108);const f=e=>{const t=e;let n=class extends t{constructor(...e){super(...e);const t=(0,c.oY)(this),n=t.store,r=new a;t.store=r,(0,s.k)(t,n,r)}read(e,t){(0,u.L)(this,e,t)}getAtOrigin(e,t){const n=h(this),r=(0,o.aB)(t);if("string"==typeof e)return n.get(e,r);const i={};return e.forEach(e=>{i[e]=n.get(e,r)}),i}originOf(e){return(0,o.OL)(this.originIdOf(e))}originIdOf(e){return h(this).originOf(e)}revert(e,t){const n=h(this),r=(0,o.aB)(t),i=(0,c.oY)(this);let s;s="string"==typeof e?"*"===e?n.keys(r):[e]:e,s.forEach(e=>{i.invalidate(e),n.revert(e,r),i.commit(e)})}};return n=(0,r.Cg)([(0,p.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],n),n};function h(e){return(0,c.oY)(e).store}f(i.A);var d=n(91429),g=n(16649),y=n(49422);const m=e=>{const t=e;let n=class extends t{constructor(...e){super(...e)}clear(e,t="user"){(0,c.oY)(this).clearOrigin(e,(0,o.aB)(t))}write(e,t){return(0,y.M)(this,e=e||{},t),e}setAtOrigin(e,t,n){(0,c.oY)(this).setAtOrigin(e,t,(0,o.aB)(n))}removeOrigin(e){const t=v(this),n=(0,o.aB)(e),r=t.keys(n);for(const e of r)t.originOf(e)===n&&t.set(e,t.get(e,n),7)}updateOrigin(e,t){const n=v(this),r=(0,o.aB)(t),i=(0,g.Jt)(this,e);for(let t=r+1;t<o.AU;++t)n.delete(e,t);n.set(e,i,r)}toJSON(e){return this.write({},e)}};return n=(0,r.Cg)([(0,d.$K)("esri.core.WriteableMultiOriginJSONMixin")],n),n.prototype.toJSON.isDefaultToJSON=!0,n};function v(e){return(0,c.oY)(e).store}const w=e=>{const t=m(f(e));let n=class extends t{};return n=(0,r.Cg)([(0,p.$)("esri.core.MultiOriginJSONSupport")],n),n},M=w(i.A)},37539:(e,t,n)=>{n.d(t,{pO:()=>g,jd:()=>f,Tp:()=>h,w5:()=>p});var r=n(34727),i=n(86211),s=n(73941),l=n(79258);Math.PI;const o=l.$O.radius,a=l.$O.eccentricitySquared,u={a1:o*a,a2:o*a*o*a,a3:o*a*a/2,a4:o*a*o*a*2.5,a5:o*a+o*a*a/2,a6:1-a};l.$O.radius,l.$O.flattening,l.Sw.radius,l.Sw.flattening,l.sH.radius,l.sH.flattening,l.sH.radius;var c=n(21325);const p={2:{5:g,7:null,9:null,10:g,1:P,6:null,8:null,0:null,3:m,11:v,2:g,4:E},5:{5:g,7:null,9:null,10:g,1:P,6:null,8:null,0:null,3:m,11:v,2:g,4:E},7:{5:null,7:g,9:null,10:g,1:null,6:_,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:g,10:g,1:null,6:null,8:I,0:null,3:null,11:null,2:null,4:null},3:{5:y,7:null,9:null,10:y,1:function(e,t,n,r){const i=e[t]/T,s=L-2*Math.atan(Math.exp(-e[t+1]/T)),l=T+(e[t+2]??0),o=Math.cos(s)*l;n[r]=Math.cos(i)*o,n[r+1]=Math.sin(i)*o,n[r+2]=Math.sin(s)*l},6:null,8:null,0:null,3:g,11:function(e,t,n,r){y(e,t,n,r),v(n,r,n,r)},2:y,4:function(e,t,n,r){y(e,t,n,r),E(n,r,n,r)}},4:{5:x,7:null,9:null,10:x,1:function(e,t,n,r){x(e,t,n,r),P(n,r,n,r)},6:null,8:null,0:null,3:function(e,t,n,r){x(e,t,n,r),m(n,r,n,r)},11:function(e,t,n,r){x(e,t,n,r),v(n,r,n,r)},2:x,4:g},1:{5:S,7:null,9:null,10:S,1:g,6:null,8:null,0:null,3:function(e,t,n,r){S(e,t,n,r),m(n,r,n,r)},11:function(e,t,n,r){S(e,t,n,r),v(n,r,n,r)},2:S,4:function(e,t,n,r){S(e,t,n,r),E(n,r,n,r)}},6:{5:null,7:A,9:null,10:A,1:null,6:g,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:R,10:R,1:null,6:null,8:g,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:g,3:null,11:null,2:null,4:null},10:{5:g,7:g,9:g,10:g,1:P,6:_,8:I,0:null,3:m,11:v,2:g,4:E},11:{5:w,7:null,9:null,10:w,1:function(e,t,n,r){w(e,t,n,r),P(n,r,n,r)},6:null,8:null,0:null,3:function(e,t,n,r){w(e,t,n,r),m(n,r,n,r)},11:g,2:w,4:function(e,t,n,r){w(e,t,n,r),E(n,r,n,r)}}};function f(e,t){return h(e,t)?.projector}function h(e,t){if(null==e||null==t)return null;if(C.source.spatialReference===e&&C.dest.spatialReference===t)return C;const n=d(e,C.source),r=d(t,C.dest);return 0===n&&0===r?(0,c.aI)(e,t)?C.projector=g:C.projector=null:C.projector=p[n][r],C}function d(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,i.GA)(e,1)),(0,s.jA)(e)?t.spatialReferenceId=1:(0,c.oT)(e)?t.spatialReferenceId=2:(0,c.K8)(e)?t.spatialReferenceId=3:(0,c.r1)(e)?t.spatialReferenceId=11:e.wkt===s.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===s.FY.wkt?t.spatialReferenceId=6:e.wkt===s.LJ.wkt?t.spatialReferenceId=8:(0,c.q8)(e)?t.spatialReferenceId=7:(0,c.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function g(e,t,n,r){e!==n&&(n[r++]=e[t++],n[r++]=e[t++],n[r]=e[t]??0)}function y(e,t,n,r){n[r]=k*(e[t]/T),n[r+1]=k*(L-2*Math.atan(Math.exp(-e[t+1]/T))),n[r+2]=e[t+2]??0}function m(e,t,n,i){!function(e,t,n,i,s){const l=.4999999*Math.PI,o=(0,r.qE)(b*e[t+1],-l,l),a=Math.sin(o);n[i++]=b*e[t]*s.radius,n[i++]=s.halfSemiMajorAxis*Math.log((1+a)/(1-a)),n[i]=e[t+2]??0}(e,t,n,i,l.$O)}function v(e,t,n,r){n[r]=e[t]*j,n[r+1]=e[t+1]*j,n[r+2]=e[t+2]??0}function w(e,t,n,r){n[r]=e[t]*U,n[r+1]=e[t+1]*U,n[r+2]=e[t+2]??0}function M(e,t,n,r,i){const s=i+(e[t+2]??0),l=b*e[t],o=b*e[t+1],a=Math.cos(o)*s;n[r]=Math.cos(l)*a,n[r+1]=Math.sin(l)*a,n[r+2]=Math.sin(o)*s}function I(e,t,n,r){M(e,t,n,r,l.Sw.radius)}function _(e,t,n,r){M(e,t,n,r,l.sH.radius)}function P(e,t,n,r){M(e,t,n,r,l.$O.radius)}function O(e,t,n,i,s){const l=e[t],o=e[t+1],a=e[t+2]??0,u=Math.sqrt(l*l+o*o+a*a),c=(0,r.YN)(a/(0===u?1:u)),p=Math.atan2(o,l);n[i++]=k*p,n[i++]=k*c,n[i]=u-s}function R(e,t,n,r){O(e,t,n,r,l.Sw.radius)}function A(e,t,n,r){O(e,t,n,r,l.sH.radius)}function S(e,t,n,r){O(e,t,n,r,l.$O.radius)}function E(e,t,n,r){!function(e,t,n,r,i){const s=b*e[t],l=b*e[t+1],o=e[t+2]??0,a=Math.sin(l),u=Math.cos(l),c=i.radius/Math.sqrt(1-i.eccentricitySquared*a*a);n[r++]=(c+o)*u*Math.cos(s),n[r++]=(c+o)*u*Math.sin(s),n[r++]=(c*(1-i.eccentricitySquared)+o)*a}(e,t,n,r,l.$O)}function x(e,t,n,r){const i=u,s=e[t],o=e[t+1],a=e[t+2]??0;let c,p,f,h,d,g,y,m,v,w,M,I,_,P,O,R,A,S,E,x,C;c=Math.abs(a),p=s*s+o*o,f=Math.sqrt(p),h=p+a*a,d=Math.sqrt(h),x=Math.atan2(o,s),g=a*a/h,y=p/h,P=i.a2/d,O=i.a3-i.a4/d,y>.3?(m=c/d*(1+y*(i.a1+P+g*O)/d),E=Math.asin(m),w=m*m,v=Math.sqrt(1-w)):(v=f/d*(1-g*(i.a5-P-y*O)/d),E=Math.acos(v),w=1-v*v,m=Math.sqrt(w)),M=1-l.$O.eccentricitySquared*w,I=l.$O.radius/Math.sqrt(M),_=i.a6*I,P=f-I*v,O=c-_*m,A=v*P+m*O,R=v*O-m*P,S=R/(_/M+A),E+=S,C=A+R*S/2,a<0&&(E=-E),n[r++]=k*x,n[r++]=k*E,n[r]=C}const C={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:g},b=(0,r.kU)(1),k=(0,r.KJ)(1),L=.5*Math.PI,T=l.$O.radius,j=T*Math.PI/180,U=180/(T*Math.PI)},45165:(e,t,n)=>{n.r(t),n.d(t,{default:()=>p});var r=n(31635),i=n(49186),s=n(25728),l=n(76030),o=n(91429),a=n(4146),u=n(8303);let c=class extends((0,u.A)((0,s.P)(a.A))){constructor(e){super(e),this.resourceInfo=null,this.persistenceEnabled=!0,this.type="unsupported"}initialize(){this.addResolvingPromise(new Promise((e,t)=>{(0,l._)(()=>{const e=this.resourceInfo&&(this.resourceInfo.layerType||this.resourceInfo.type);let n="Unsupported layer type";e&&(n+=" "+e),t(new i.A("layer:unsupported-layer-type",n,{layerType:e}))})}))}read(e,t){const n={resourceInfo:e};null!=e.id&&(n.id=e.id),null!=e.title&&(n.title=e.title),super.read(n,t)}write(e,t){return Object.assign(e||{},this.resourceInfo,{id:this.id})}};(0,r.Cg)([(0,o.MZ)({readOnly:!0})],c.prototype,"resourceInfo",void 0),(0,r.Cg)([(0,o.MZ)({type:["show","hide"]})],c.prototype,"listMode",void 0),(0,r.Cg)([(0,o.MZ)({type:Boolean,readOnly:!1})],c.prototype,"persistenceEnabled",void 0),(0,r.Cg)([(0,o.MZ)({json:{read:!1},readOnly:!0,value:"unsupported"})],c.prototype,"type",void 0),c=(0,r.Cg)([(0,o.$K)("esri.layers.UnsupportedLayer")],c);const p=c},60999:(e,t,n)=>{n.d(t,{DZ:()=>d,Ke:()=>h,Tj:()=>c,UT:()=>g,aD:()=>m,jJ:()=>u});var r=n(31635),i=n(69622),s=n(97768),l=n(74887),o=n(10107),a=n(64108);function u(e,t,n){return(0,l.Lx)(e.map((e,r)=>t.apply(n,[e,r])))}async function c(e,t,n){return(await(0,l.Lx)(e.map((e,r)=>t.apply(n,[e,r])))).map(e=>e.value)}function p(e){return{ok:!0,value:e}}function f(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 f(e)}}async function d(e){try{return p(await e)}catch(e){return(0,l.QP)(e),f(e)}}function g(e,t){return new y(e,t)}let y=class extends i.A{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.DC)(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=f(e),this._cleanup()}),this._abortHandle=(0,l.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,s.xt)(this._abortHandle),this._abortController=null}};(0,r.Cg)([(0,o.MZ)()],y.prototype,"value",null),(0,r.Cg)([(0,o.MZ)()],y.prototype,"error",null),(0,r.Cg)([(0,o.MZ)()],y.prototype,"finished",null),(0,r.Cg)([(0,o.MZ)()],y.prototype,"promise",void 0),(0,r.Cg)([(0,o.MZ)()],y.prototype,"_result",void 0),y=(0,r.Cg)([(0,a.$)("esri.core.asyncUtils.ReactiveTask")],y);class m{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,r.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,r.hk)(t)}}}},62815:(e,t,n)=>{n.d(t,{N:()=>l});var r=n(86211),i=n(73941),s=n(21325);function l(e,t,n){if(null==t||null==n||n.vcsWkid||(0,s.aI)(t,n)||(0,i.xP)(t)||(0,i.xP)(n))return null;const l=(0,r.G9)(t)/(0,r.G9)(n);if(1===l)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,l);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const n of e.paths)for(const e of n)e.length>2&&(e[2]*=t)}(e,l);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const n of e.rings)for(const e of n)e.length>2&&(e[2]*=t)}(e,l);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const n of e.points)n.length>2&&(n[2]*=t)}(e,l);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,l);default:return null}}},91218:(e,t,n)=>{n.r(t),n.d(t,{canProjectWithoutEngine:()=>Y,initializeProjection:()=>D,isEqualBaseGCS:()=>K,isLoaded:()=>C,isLoadedOrLoad:()=>b,isLoadedOrLoadFor:()=>k,load:()=>T,project:()=>j,projectExtent:()=>ne,projectMany:()=>U,projectMultipoint:()=>F,projectOrLoad:()=>Z,projectOrLoadMany:()=>G,projectPoint:()=>J,projectPolygon:()=>ee,projectPolyline:()=>V,projectWithZConversion:()=>q,projectWithoutEngine:()=>N,requiresLoad:()=>L,test:()=>z,tryProjectWithZConversion:()=>B,unload:()=>H});var r=n(49186),i=n(74887),s=n(62788),l=n(95488),o=n(51850),a=n(21276),u=n(73941),c=n(5443),p=n(91075),f=n(48526),h=n(86738),d=n(39829),g=n(82799),y=n(16930),m=n(159),v=n(9762),w=n(37539);function M(e,t,n,r,i,s){return I[0]=e,I[1]=t,I[2]=n,(0,v.projectBuffer)(I,r,0,i,s,0)}const I=(0,o.vt)();var _=n(21325),P=n(62815);let O=null,R=null,A=null,S=null,E={};const x=new l.I;function C(){return!!(R?.isLoaded()&&A?.isLoaded()&&S?.isLoaded())}function b(){return!!C()||((0,s.gc)(x),T(),!1)}function k(e,t){return!e||!t||Y(e,t)||b()}function L(e,t){return!Y(e,t)&&!C()}async function T(e){null==O&&(O=Promise.all([n.e(3276).then(n.bind(n,83276)).then(e=>(R=e,R.load())),n.e(8377).then(n.bind(n,8377)).then(e=>(A=e,A.load())),n.e(2158).then(n.bind(n,12158)).then(e=>(S=e,S.load()))])),await O,(0,i.Te)(e),x.notify()}function j(e,t,n){return Array.isArray(e)?0===e.length?[]:((0,a.H)(e),U(e,e[0].spatialReference,t,n)):((0,a.f)(e),U([e],e.spatialReference,t,n)[0])}function U(e,t,n,r){if(null==t||null==n)return e;if(Y(t,n,r))return e.map(e=>N(e,t,n));if(null==r?.geographicTransformation&&(0,u.jA)(t))return e.map(e=>N(e,t,y.A.WGS84)).map(e=>B(e,n));if(null==r?.geographicTransformation&&(0,u.jA)(n))return e.map(e=>B(e,y.A.WGS84)).map(e=>N(e,y.A.WGS84,n));if(!C())throw new $;if(!r?.geographicTransformation)if(r?.extendedParams)r={...r,geographicTransformation:S.getTransformation(t,n,r.areaOfInterestExtent)||new m.A};else if(!r?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,n);let i=E[e];i||(i=S.getTransformation(t,n)||new m.A,E[e]=i),r={geographicTransformation:i}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof p.A?R.executeMany(e,n,r):A.executeMany(e,n,r)}function Z(e,t){const n=G([e],t);return null!=n.pending?{pending:n.pending,geometry:null}:null!=n.geometries?{pending:null,geometry:n.geometries[0]}:{pending:null,geometry:null}}function G(e,t){if(!C())for(const n of e)if(null!=n&&!(0,_.aI)(n.spatialReference,t)&&(0,_.fn)(n.spatialReference)&&(0,_.fn)(t)&&!Y(n.spatialReference,t))return(0,s.gc)(x),{pending:T(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,_.aI)(e.spatialReference,t)?e:(0,_.fn)(e.spatialReference)&&(0,_.fn)(t)?B(e,t):null)}}class $ extends r.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function H(){O=null,R=null,A=null,S=null,E={}}const z={get loadPromise(){return O}};function B(e,t){try{const n=j(e,t);if(null==n)return null;"xmin"in e&&"xmin"in n&&(n.zmin=e.zmin,n.zmax=e.zmax);const r=(0,P.N)(n.type,e.spatialReference,t);return null!=r&&r(n),n}catch(e){if(!(e instanceof $))throw e;return null}}async function q(e,t,n){const r=e.spatialReference;return null!=r&&null!=t&&await D(r,t,null,n),B(e,t)}function Y(e,t,n){return!(n?.areaOfInterestExtent||n?.extendedParams||n?.geographicTransformation)&&(!!(0,_.aI)(e,t)||(0,_.fn)(e)&&(0,_.fn)(t)&&!!(0,w.jd)(e,t))}function K(e,t){if((0,_.aI)(e,t))return!0;if(!(0,_.fn)(e)||!(0,_.fn)(t))return!1;const n=(0,_.oT)(e)||(0,_.K8)(e)||(0,_.x1)(e),r=(0,_.oT)(t)||(0,_.K8)(t)||(0,_.x1)(t);return n&&r}async function D(e,t,n,r){if(C())return(0,i.NO)(r);if(Array.isArray(e)){for(const{source:t,dest:n,options:i}of e)if(t&&n&&!Y(t,n,i))return T(r)}else if(e&&t&&!Y(e,t,n))return T(r);return(0,i.NO)(r)}function N(e,t,n){return e?"x"in e?W(e,t,new h.A,n,0):"xmin"in e?re(e,t,new c.A,n,0):"rings"in e?te(e,t,new d.A,n,0):"paths"in e?X(e,t,new g.A,n,0):"points"in e?Q(e,t,new f.A,n,0):null:null}function J(e,t,n=t.spatialReference,r=0){return null!=n&&null!=e.spatialReference&&null!=W(e,e.spatialReference,t,n,r)}function W(e,t,n,r,i){se[0]=e.x,se[1]=e.y;const s=e.z;return se[2]=void 0!==s?s:i,(0,v.projectBuffer)(se,t,0,se,r,0)?(n.x=se[0],n.y=se[1],n.spatialReference=r,void 0!==s||(0,u.xP)(r)?(n.z=se[2],n.hasZ=!0):(n.z=void 0,n.hasZ=!1),void 0===e.m?(n.m=void 0,n.hasM=!1):(n.m=e.m,n.hasM=!0),n):null}function F(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=Q(e,e.spatialReference,t,n,r)}function Q(e,t,n,r,i){const{points:s,hasZ:l,hasM:o}=e,a=[],c=s.length,p=[];for(const e of s)p.push(e[0],e[1],l?e[2]:i);if(!(0,v.projectBuffer)(p,t,0,p,r,0,c))return null;const f=l||(0,u.xP)(r);for(let e=0;e<c;++e){const t=3*e,n=p[t],r=p[t+1];f&&o?a.push([n,r,p[t+2],s[e][3]]):f?a.push([n,r,p[t+2]]):o?a.push([n,r,s[e][2]]):a.push([n,r])}return n.points=a,n.spatialReference=r,n.hasZ=l,n.hasM=o,n}function V(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=X(e,e.spatialReference,t,n,r)}function X(e,t,n,r,i){const{paths:s,hasZ:l,hasM:o}=e,a=[];if(!ie(s,l??!1,o??!1,t,a,r,i))return null;const c=l||(0,u.xP)(r);return n.paths=a,n.spatialReference=r,n.hasZ=c,n.hasM=o,n}function ee(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=te(e,e.spatialReference,t,n,r)}function te(e,t,n,r,i){const{rings:s,hasZ:l,hasM:o}=e,a=[];if(!ie(s,l??!1,o??!1,t,a,r,i))return null;const c=l||(0,u.xP)(r);return n.rings=a,n.spatialReference=r,n.hasZ=c,n.hasM=o,n}function ne(e,t,n=t.spatialReference,r=0){return null!=e.spatialReference&&null!=n&&null!=re(e,e.spatialReference,t,n,r)}function re(e,t,n,r,i){const{xmin:s,ymin:l,xmax:o,ymax:a,hasZ:c,hasM:p}=e;if(!M(s,l,c?e.zmin:i,t,se,r))return null;const f=c||(0,u.xP)(r);return n.xmin=se[0],n.ymin=se[1],f&&(n.zmin=se[2]),M(o,a,c?e.zmax:i,t,se,r)?(n.xmax=se[0],n.ymax=se[1],f&&(n.zmax=se[2]),p&&(n.mmin=e.mmin,n.mmax=e.mmax),n.spatialReference=r,n):null}function ie(e,t,n,r,i,s,l=0){const o=new Array;for(const n of e)for(const e of n)o.push(e[0],e[1],t?e[2]:l);if(!(0,v.projectBuffer)(o,r,0,o,s,0))return!1;let a=0;i.length=0;const c=t||(0,u.xP)(s);for(const t of e){const e=new Array;for(const r of t)c&&n?e.push([o[a++],o[a++],o[a++],r[3]]):c?e.push([o[a++],o[a++],o[a++]]):n?(e.push([o[a++],o[a++],r[2]]),a++):(e.push([o[a++],o[a++]]),a++);i.push(e)}return!0}const se=(0,o.vt)()},99157:(e,t,n)=>{n.d(t,{A:()=>o});var r,i=n(31635),s=n(69622),l=n(91429);let o=r=class extends s.A{constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new r({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,i.Cg)([(0,l.MZ)()],o.prototype,"isInverse",void 0),(0,i.Cg)([(0,l.MZ)()],o.prototype,"wkt",void 0),(0,i.Cg)([(0,l.MZ)()],o.prototype,"wkid",void 0),o=r=(0,i.Cg)([(0,l.$K)("esri.geometry.operators.support.GeographicTransformationStep")],o)}}]);