@arcgis/core 6.0.0-next.7 → 6.0.0-next.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/06ab24a083c3229228dd.js +1 -0
- package/assets/esri/core/workers/chunks/09a63cc1987f8636c5b0.js +1 -0
- package/assets/esri/core/workers/chunks/{7165d6f6a5078768bebb.js → 15cc2c295682f48030f9.js} +1 -1
- package/assets/esri/core/workers/chunks/17b76e0d401c7e396d10.js +1 -0
- package/assets/esri/core/workers/chunks/{c18189710d6198516175.js → 19b9d393046a780e6c3f.js} +1 -1
- package/assets/esri/core/workers/chunks/1b35ec54968fbeec17ce.js +1 -0
- package/assets/esri/core/workers/chunks/1c0c5cb13c2590aae906.js +1 -0
- package/assets/esri/core/workers/chunks/1e0d2715d603f48a7e0b.js +1 -0
- package/assets/esri/core/workers/chunks/{9a7fc93cc693fd12b5d8.js → 2b6c74646ff475a6e302.js} +1 -1
- package/assets/esri/core/workers/chunks/2d9a1f23ec6ce90723ac.js +1 -0
- package/assets/esri/core/workers/chunks/340621182db9e8edbec2.js +1 -0
- package/assets/esri/core/workers/chunks/{71f739bb3f7350704af6.js → 384ae10053d35940de73.js} +1 -1
- package/assets/esri/core/workers/chunks/3b3e519f15ed52c83f0c.js +1 -0
- package/assets/esri/core/workers/chunks/{72019baeba520edb6bb0.js → 3b737dae6efed627406e.js} +1 -1
- package/assets/esri/core/workers/chunks/3c0ed15b544df6fb0903.js +1 -0
- package/assets/esri/core/workers/chunks/451d7d456df0f4466563.js +1 -0
- package/assets/esri/core/workers/chunks/4a6b92ecbb1f1c55cc43.js +1 -0
- package/assets/esri/core/workers/chunks/4e544de61f07ca660236.js +1 -0
- package/assets/esri/core/workers/chunks/{06e7400f5ebe0719b81c.js → 5a5d80c2519aa3ea8878.js} +1 -1
- package/assets/esri/core/workers/chunks/{fb4ff0ac2bc445fec413.js → 5b434e8c98e7119d4a3b.js} +1 -1
- package/assets/esri/core/workers/chunks/606ea251075fe81a1206.js +1 -0
- package/assets/esri/core/workers/chunks/{ac4cc49104d26c384e98.js → 658b2642ab6880770e4e.js} +1 -1
- package/assets/esri/core/workers/chunks/68be3fb88ca61f82fb90.js +1 -0
- package/assets/esri/core/workers/chunks/6c9266120d46e8c69dbf.js +1 -0
- package/assets/esri/core/workers/chunks/6ef647b7769d27529f9c.js +1 -0
- package/assets/esri/core/workers/chunks/709e019885822b1f6f3e.js +1 -0
- package/assets/esri/core/workers/chunks/8730e7e6e0296f43f10b.js +1 -0
- package/assets/esri/core/workers/chunks/8bea0d706ede6f84f8aa.js +1 -0
- package/assets/esri/core/workers/chunks/900181f68449d8f82eeb.js +1 -0
- package/assets/esri/core/workers/chunks/939942b00ba380e2957e.js +1 -0
- package/assets/esri/core/workers/chunks/{1ef39aef6b33c530cbe4.js → 966d0832a3c1f03668a0.js} +1 -1
- package/assets/esri/core/workers/chunks/9a28a66807a1e3557018.js +1 -0
- package/assets/esri/core/workers/chunks/{2f9033890c465acff698.js → 9bf48a907f91ea004648.js} +1 -1
- package/assets/esri/core/workers/chunks/9c7fa9d324fa0bf64d9c.js +1 -0
- package/assets/esri/core/workers/chunks/{1ba1f705b6ce5c8ea702.js → a655ebdb4bf0660615a2.js} +1 -1
- package/assets/esri/core/workers/chunks/af349c7bc8ef41a0e1bd.js +1 -0
- package/assets/esri/core/workers/chunks/c8ba0673d1b87216e619.js +1 -0
- package/assets/esri/core/workers/chunks/{4d3f97a48046021713a6.js → ceb112fe7aef354f8051.js} +1 -1
- package/assets/esri/core/workers/chunks/d6ad4390df576198e45b.js +1 -0
- package/assets/esri/core/workers/chunks/{801e9e66edb4961461eb.js → ded8b64a46992c3ae693.js} +1 -1
- package/assets/esri/core/workers/chunks/{0b36abcbf03037b4073d.js → e1af43e2a8f2ef1059e3.js} +1 -1
- package/assets/esri/core/workers/chunks/eaf6d587477399a83088.js +1 -0
- package/assets/esri/core/workers/chunks/f122c18af10e56f9ec2b.js +1 -0
- package/assets/esri/core/workers/chunks/f31b424a3667686af10c.js +1 -0
- package/assets/esri/core/workers/chunks/{711cfb84659cb4437679.js → f528ac5c648ca6a98582.js} +1 -1
- package/assets/esri/core/workers/chunks/f92364afaefbac7e8f77.js +1 -0
- package/config.js +1 -1
- package/form/elements/inputs/DynamicChoiceInput.d.ts +35 -5
- package/geometry/support/scaleUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/ParquetLayer.d.ts +3 -2
- package/layers/ParquetLayer.js +1 -1
- package/layers/mixins/ScaleRangeLayer.js +1 -1
- package/layers/mixins/SublayersOwner.js +1 -1
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/package.json +2 -2
- package/popup/FeaturesModel.d.ts +26 -5
- package/popup/FeaturesModel.js +1 -1
- package/rest/support/printTaskUtils.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/interactive/snapping/featureSources/featureServiceSource/FeatureServiceTiles2D.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
- package/views/2d/layers/features/sources/FeatureSource.js +1 -1
- package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
- package/views/3d/analysis/Viewshed/types.d.ts +3 -1
- package/views/3d/environment/Environment.d.ts +2 -2
- package/views/3d/environment/Environment.js +1 -1
- package/views/3d/environment/EnvironmentView.js +2 -0
- package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
- package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
- package/views/3d/layers/DynamicLayerView3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerViewBase3D.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/MediaLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/RouteLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/3d/layers/TiledLayerView3D.js +1 -1
- package/views/3d/layers/VoxelLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
- package/views/3d/layers/graphics/Labeler.js +1 -1
- package/views/3d/layers/support/FeatureTile.js +1 -1
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
- package/views/3d/layers/support/SampledGeometryMaxDistanceRatio.js +1 -1
- package/views/3d/support/popupHitTest.js +1 -1
- package/views/3d/webgl-engine/effects/WeatherFader.js +1 -1
- package/views/3d/webgl-engine/effects/clouds/CloudsComposition.js +1 -1
- package/views/3d/webgl-engine/effects/fog/Fog.js +1 -1
- package/views/3d/webgl-engine/lib/EmissionComposite.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/interactive/snapping/FeatureSnappingSourceInfo.js +1 -1
- package/views/layers/LayerView.js +1 -1
- package/views/layers/LineOfSightLayerView.d.ts +3 -4
- package/views/layers/ViewshedLayerView.d.ts +5 -6
- package/views/support/layerViewUtils.js +1 -1
- package/widgets/Editor.d.ts +10 -0
- package/widgets/FeatureForm.d.ts +2 -2
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/00a600c71ceebe7bfeee.js +0 -1
- package/assets/esri/core/workers/chunks/00d24415bdeb0adae3df.js +0 -1
- package/assets/esri/core/workers/chunks/0193df3f9fb23633da87.js +0 -1
- package/assets/esri/core/workers/chunks/07aa6d36f1006b6ab7ff.js +0 -1
- package/assets/esri/core/workers/chunks/25d6c674b1c4829f040f.js +0 -1
- package/assets/esri/core/workers/chunks/25e6013e2c095629b236.js +0 -1
- package/assets/esri/core/workers/chunks/2c90f7a6432cd716db8b.js +0 -1
- package/assets/esri/core/workers/chunks/2e6a2f4d686b71249c0e.js +0 -1
- package/assets/esri/core/workers/chunks/303fde8f3459dde16555.js +0 -1
- package/assets/esri/core/workers/chunks/350540770781b281c39a.js +0 -1
- package/assets/esri/core/workers/chunks/3b017b718ea2d4ed498f.js +0 -1
- package/assets/esri/core/workers/chunks/43fc42405167a5537039.js +0 -1
- package/assets/esri/core/workers/chunks/4d82db661365daa513a6.js +0 -1
- package/assets/esri/core/workers/chunks/518e8883b6ed613bf451.js +0 -1
- package/assets/esri/core/workers/chunks/633a9051580c5302d2f7.js +0 -1
- package/assets/esri/core/workers/chunks/6469c0d18d3663e7da4b.js +0 -1
- package/assets/esri/core/workers/chunks/669e39c3437d7273f0c7.js +0 -1
- package/assets/esri/core/workers/chunks/7038ead1fa1674416ab3.js +0 -1
- package/assets/esri/core/workers/chunks/798a63653f82c0e842c5.js +0 -1
- package/assets/esri/core/workers/chunks/84fcbf7a1d04f01685d1.js +0 -1
- package/assets/esri/core/workers/chunks/8e511079918e2fd9261f.js +0 -1
- package/assets/esri/core/workers/chunks/95b82cbbe355266c65d7.js +0 -1
- package/assets/esri/core/workers/chunks/9673a9efec86040b8c13.js +0 -1
- package/assets/esri/core/workers/chunks/a010d2e4e34eb7bc1fec.js +0 -1
- package/assets/esri/core/workers/chunks/b05a41a60e30935644be.js +0 -1
- package/assets/esri/core/workers/chunks/d21257d2e2a37266c0f7.js +0 -1
- package/assets/esri/core/workers/chunks/d270cc9807161033686e.js +0 -1
- package/assets/esri/core/workers/chunks/ec9a2425b4a498054a19.js +0 -1
- package/assets/esri/core/workers/chunks/f0a68d2900d24f56afa0.js +0 -1
- package/assets/esri/core/workers/chunks/f762f70e7d39634ce797.js +0 -1
- package/assets/esri/core/workers/chunks/fd0254c6fc6c03ec11ba.js +0 -1
- package/assets/esri/core/workers/chunks/fd0a5c243f3426f2a0b5.js +0 -1
- package/views/3d/environment/EnvironmentManager.js +0 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9385],{52106(e,t,r){r.d(t,{A:()=>A});var i,o,s=r(32198),a=r(37838),n=r(69540),l=r(51447),u=r(25482),p=r(53966),c=r(36708),d=r(24326),y=r(91429),m=r(12195),h=r(65864),g=r(50498),f=r(55156),b=r(60950),v=r(54339),T=r(94128),C=r(33910);const w=Symbol("meshGeometryHandles");function S(e){if(null==e)return null;let t={};for(let r in e){let i=e[r];i&&(t[r]=i.toJSON())}return 0===Object.keys(t).length?null:t}let A=class extends((0,n.OU)(u.o)){static{i=T.Z}static{o=this}constructor(e){super(e),this[i]=!0,this.distance=null,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this.statisticsAggregatedIds=void 0,this._version=0,Object.defineProperty(this,"uid",{value:(0,d.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(p.A.getLogger(this),"Graphic",{version:"4.30"})}set aggregateGeometries(e){let t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){let t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){let t=this._get("geometry");t!==e&&(this._set("geometry",e),this._watchMeshGeometryChanges(),this._notifyLayer("geometry",t,e))}set popupTemplate(e){let t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){let t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){let t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new o({aggregateGeometries:this.aggregateGeometries,statisticsAggregatedIds:this.statisticsAggregatedIds,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;let t=(0,b.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;let r=this.origin&&"layer"in this.origin?this.origin.layer:null;for(let t of[r,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){let r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){let e=(0,f.I)(this.origin);if(e)return(0,v.r)(this,e);let t=this.sourceLayer??this.layer;return t?(0,v.r)(this,t):null}getGlobalId(){let e=(0,f.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);let t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){let e={aggregateGeometries:S(this.aggregateGeometries),geometry:this.geometry?.toJSON()??null,symbol:this.symbol?.toJSON()??null,attributes:(0,m.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null};return this.statisticsAggregatedIds?.length&&(e.aggregateIds=[...this.statisticsAggregatedIds]),null!=this.distance&&(e.distance=this.distance),e}notifyMeshTransformChanged(e={}){let{geometry:t}=this;if("mesh"===t?.type){let r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;let o={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(o.action=i),"attributes"===e&&(o.attributeName=i),this.layer.graphicChanged(o)}_watchMeshGeometryChanges(){this.removeHandles(w);let e=this.geometry;"mesh"===e?.type&&this.addHandles([(0,c.z7)(()=>e.vertexSpace.origin?{localMatrix:e.transform?.localMatrix,origin:e.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{(this._lastMeshTransform.localMatrix!==e||this._lastMeshTransform.origin!==t)&&(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,c.z7)(()=>({vertexAttributes:e.vertexAttributes}),()=>{e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",e,e)},{equals:(e,t)=>e===t,sync:!0})],w)}};(0,s.Cg)([(0,y.MZ)({value:null,json:{read:function(e){if(!e)return null;let t={};for(let r in e){let i=(0,h.rS)(e[r]);i&&(t[r]=i)}return 0===Object.keys(t).length?null:t}}})],A.prototype,"aggregateGeometries",null),(0,s.Cg)([(0,y.MZ)({value:null})],A.prototype,"attributes",null),(0,s.Cg)([(0,y.MZ)({value:null,types:g.yR,json:{read:h.rS}})],A.prototype,"geometry",null),(0,s.Cg)([(0,y.MZ)()],A.prototype,"distance",void 0),(0,s.Cg)([(0,y.MZ)({type:Boolean})],A.prototype,"isAggregate",void 0),(0,s.Cg)([(0,y.MZ)({clonable:!1})],A.prototype,"layer",void 0),(0,s.Cg)([(0,y.MZ)({clonable:"reference"})],A.prototype,"origin",void 0),(0,s.Cg)([(0,y.MZ)({type:a.A,value:null})],A.prototype,"popupTemplate",null),(0,s.Cg)([(0,y.MZ)({clonable:"reference"})],A.prototype,"sourceLayer",void 0),(0,s.Cg)([(0,y.MZ)({json:{name:"aggregateIds",read:e=>e?.map(e=>Array.isArray(e)?JSON.stringify(e):e)}})],A.prototype,"statisticsAggregatedIds",void 0),(0,s.Cg)([(0,y.MZ)({value:null,types:C.Es})],A.prototype,"symbol",null),(0,s.Cg)([(0,y.MZ)({clonable:!1,json:{read:!1,write:!1}})],A.prototype,"_version",void 0),(0,s.Cg)([(0,y.MZ)({type:Boolean,value:!0})],A.prototype,"visible",null),A=o=(0,s.Cg)([(0,y.$K)("esri.Graphic")],A)},19334(e,t,r){r.d(t,{e:()=>a});var i=r(54639),o=r(14112);class s{constructor(e){this._geometry=e}toJsonGeometry(){return this._geometry.toJSON()}toAccessorGeometry(e){return this._geometry}toGxGeometry(e){return e.fromAccessorGeometry(this._geometry)}}function a(e){if(null==e)return null;switch(e.type){case"point":if((0,o.e6)(e))return null;break;case"polygon":if((0,o.Wq)(e))return null;break;case"polyline":if((0,o.IY)(e))return null;break;case"multipoint":if((0,o.DG)(e))return null;break;case"extent":if((0,o.As)(e))return null;break;default:return null}let t=i.R.of(e.type,e.spatialReference,e.hasZ,e.hasM,new s(e));return t.asAccessorGeometry(),t}},36983(e,t,r){r.d(t,{R:()=>u,p:()=>p});var i=r(54639),o=r(14112),s=r(16930),a=r(60408),n=r(65864);class l{constructor(e){this._geometry=e}toJsonGeometry(){return this._geometry}toAccessorGeometry(e){let t=(0,n.rS)(this._geometry);return t.spatialReference=e,t}toGxGeometry(e){return e.fromJsonGeometry(this._geometry)}}function u(e,t){if("object"!=typeof e||!e)return null;let r=t;if("spatialReference"in e&&(e.spatialReference instanceof s.A?r=e.spatialReference:"object"==typeof e.spatialReference&&null!=e.spatialReference&&(r=new s.A,r.read(e.spatialReference))),null==r)throw Error("Spatial reference required");return(0,a.fT)(e)?p("point",e,r):(0,a.Rg)(e)?p("polyline",e,r):(0,a.Bi)(e)?p("polygon",e,r):(0,a.U9)(e)?p("multipoint",e,r):(0,a.ZC)(e)?p("extent",e,r):null}function p(e,t,r){if(null==t)return null;let s=!1,a=!1;switch(e){case"point":if((0,o.e6)(t))return null;s=void 0!==t.z,a=void 0!==t.m;break;case"polygon":if((0,o.Wq)(t))return null;s=!0===t.hasZ,a=!0===t.hasM;break;case"polyline":if((0,o.IY)(t))return null;s=!0===t.hasZ,a=!0===t.hasM;break;case"multipoint":if((0,o.DG)(t))return null;s=!0===t.hasZ,a=!0===t.hasM;break;case"extent":if((0,o.As)(t))return null;s=null!=t.zmin&&null!=t.zmax,a=null!=t.mmin&&null!=t.mmax;break;default:throw Error("Unsupported geometry type: "+t.type)}return i.R.of(e,r,s,a,new l(t))}},14112(e,t,r){function i(e){return"NaN"===e.x||null===e.x||isNaN(e.x)}function o(e){if(0===(e.curveRings??e.rings).length)return!0;for(let t of e.curveRings??e.rings)if(t.length>0)return!1;return!0}function s(e){if(0===(e.curvePaths??e.paths).length)return!0;for(let t of e.curvePaths??e.paths)if(t.length>0)return!1;return!0}function a(e){return 0===e.points.length}function n(e){return"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)}r.d(t,{As:()=>n,DG:()=>a,IY:()=>s,Wq:()=>o,e6:()=>i})},69052(e,t,r){r.d(t,{hr:()=>o});var i=r(34727);class o{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return s(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+a(this.range,e-t,r)}minimalMonotonic(e,t,r){return s(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);let 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 s(e,t,r,i,o=0,s=!1){return(i-=o)<t?i+=a(e,t-i):i>r&&(i-=a(e,i-r)),s&&i===r&&(i=t),i+o}function a(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const n=new o(0,2*Math.PI),l=(new o(-Math.PI,Math.PI),new o(0,360));r.d(t,["ie",0,l,"uC",0,n])},46140(e,t,r){r.d(t,{A:()=>o});var i=r(49186);class o{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)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){let 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 o(this.major,this.minor,this._context)}static parse(e,t=""){let[r,s]=e.split("."),a=/^\s*\d+\s*$/;if(!r?.match||!a.test(r)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e})}if(!s?.match||!a.test(s)){let r=t&&t+":";throw new i.A(r+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e})}return new o(parseInt(r,10),parseInt(s,10),t)}}},6797(e,t,r){r.d(t,{Ui:()=>d});var i=r(69622),o=r(7762),s=r(88620);const a=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function n(e){return e instanceof i.A}function l(e){return e instanceof o.A?Object.keys(e.items):n(e)?(0,s.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof o.A?e.items[t]:e[t]}function p(e){return e?e.declaredClass:null}function c(e,t){let r=e.diff;if(r&&"function"==typeof r)return r(e,t);let i=l(e),o=l(t);if(0===i.length&&0===o.length)return;if(!i.length||!o.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};let s=o.filter(e=>!i.includes(e)),d=i.filter(e=>!o.includes(e)),y=i.filter(r=>o.includes(r)&&u(e,r)!==u(t,r)).concat(s,d).sort(),m=p(e);if(m&&a.has(m)&&y.length)return{type:"complete",oldValue:e,newValue:t};let h,g=n(e)&&n(t);for(let i of y){let o,s=u(e,i),a=u(t,i);if((g||"function"!=typeof s&&"function"!=typeof a)&&s!==a&&(null!=s||null!=a)){if(r&&r[i]&&"function"==typeof r[i])o=r[i]?.(s,a);else if(s instanceof Date&&a instanceof Date){if(s.getTime()===a.getTime())continue;o={type:"complete",oldValue:s,newValue:a}}else o="object"==typeof s&&"object"==typeof a&&p(s)===p(a)?c(s,a):{type:"complete",oldValue:s,newValue:a};null!=o&&(null==h?h={type:"partial",diff:{[i]:o}}:h.diff[i]=o)}}return h}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)}},46130(e,t,r){r.d(t,{v:()=>o});var i=r(76553);function o(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)})}},18370(e,t,r){r.d(t,{z:()=>o});class i{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function o(e){return new i(e)}},76553(e,t,r){function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>i})},52039(e,t,r){r.d(t,{O7:()=>d,el:()=>u});var i=r(69052),o=(r(49186),r(18370)),s=r(17676),a=(r(5443),r(39829)),n=(r(82799),r(16930)),l=(r(80754),r(21325));async function u(e,t,r){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(r=t);let i=null;for(let t of e)i??=t?.spatialReference;if(!i)return e;let o=(0,l.Vp)(i);if(!o)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(o);return["xmin"in t?t:new a.A(t)]}let[n,u]=o.valid,d=!1;for(let t of e){if(!t)continue;if("point"===t.type){d||=t.x>=u,d||=t.x<=n;continue}let{extent:e}=t;if(null==e){d=!0;break}d||=e.xmin>=u,d||=e.xmin<=n,d||=e.xmax>=u,d||=e.xmax<=n}if(!d)return e;let[{foldInto360Range:y},m]=await(0,s.qr)(Promise.all([p.getImportPromise(),c.getImportPromise()]),r),h=m.fromSpatialReference(i);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=m.fromGeometry(e),r=m.toGeometry(y(t,h),i);return"extent"===e.type&&1===r?.rings.length?r.extent:r})}const p=(0,o.z)(()=>r.e(4144).then(()=>r(4144)).then(e=>e.load().then(()=>e))),c=(0,o.z)(()=>Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(1550)]).then(()=>r(78125)));function d(e,t,r){let i=(0,l.Vp)(r);if(null==i)return e;let[o,s]=i.valid,a=2*s,n=0,u=0;t>s?n=Math.ceil(Math.abs(t-s)/a):t<o&&(n=-Math.ceil(Math.abs(t-o)/a)),e>s?u=Math.ceil(Math.abs(e-s)/a):e<o&&(u=-Math.ceil(Math.abs(e-o)/a));let p=e+(n-u)*a,c=p-t;return c>s?p-=a:c<o&&(p+=a),p}function y(e){let t=(0,l.Vp)(e);if(null==t)return null;let[r,o]=t.valid;return new i.hr(r,o)}const m=y(n.A.WGS84);y(n.A.WebMercator),r.d(t,["Y_",0,m])},80754(e,t,r){r.d(t,{kS:()=>u,kd:()=>l});var i=r(82799),o=r(16930),s=r(60408),a=r(52006);const n={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:o.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:o.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){if((0,a.Ed)(e))for(let r of function(e){return(0,s.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of r)if((0,a.aO)(e)){let[r,i]=e.c;r[0]+=t,i[0]+=t}else if((0,a.FG)(e)){let[r,i]=e.a;r[0]+=t,i[0]+=t}else if((0,a.n1)(e)){let[r,i,o]=e.b;r[0]+=t,i[0]+=t,o[0]+=t}else e[0]+=t;for(let r of function(e){return(0,s.Bi)(e)?e.rings:e.paths}(e))for(let e of r)e[0]+=t;return e}r.d(t,["j7",0,n])},55156(e,t,r){r.d(t,{I:()=>o});const i=Symbol("idFieldsProviderSymbol");function o(e){return(t=e)&&i in t?e[i]:void 0;var t}r.d(t,["e",0,i])},39622(e,t,r){r.r(t),r.d(t,{default:()=>Pt});var i=r(32198),o=r(92602),s=r(52106),a=r(37838),n=r(4576),l=r(7762),u=r(49186),p=r(53966),c=r(25728),d=r(93637),y=r(17676),m=r(36708),h=r(86211),g=r(84952),f=r(91429),b=r(46130),v=r(5443),T=r(48526),C=r(99917),w=r(16930),S=r(21325),A=r(4146),M=r(63074),I=r(34287),O=r(8303),N=r(25036),L=r(60694),D=r(25482),Z=r(53930),j=r(33910);let F=class extends D.o{constructor(e){super(e),this.break=new Z.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}}),this.first=new Z.A({color:[0,255,0],size:20,outline:{color:[255,255,255],width:4}}),this.unlocated=new Z.A({color:[255,0,0],size:12,outline:{color:[255,255,255],width:3}}),this.last=new Z.A({color:[255,0,0],size:20,outline:{color:[255,255,255],width:4}}),this.middle=new Z.A({color:[51,51,51],size:12,outline:{color:[0,122,194],width:3}}),this.waypoint=new Z.A({color:[255,255,255],size:12,outline:{color:[0,122,194],width:3}})}};(0,i.Cg)([(0,f.MZ)({types:j.wC})],F.prototype,"break",void 0),(0,i.Cg)([(0,f.MZ)({types:j.wC})],F.prototype,"first",void 0),(0,i.Cg)([(0,f.MZ)({types:j.wC})],F.prototype,"unlocated",void 0),(0,i.Cg)([(0,f.MZ)({types:j.wC})],F.prototype,"last",void 0),(0,i.Cg)([(0,f.MZ)({types:j.wC})],F.prototype,"middle",void 0),(0,i.Cg)([(0,f.MZ)({types:j.wC})],F.prototype,"waypoint",void 0),F=(0,i.Cg)([(0,f.$K)("esri.layers.support.RouteStopSymbols")],F);var B=r(94985),P=r(31593);let x=class extends D.o{constructor(e){super(e),this.directionLines=new P.A({color:[0,122,194],width:6}),this.directionPoints=new Z.A({color:[255,255,255],size:6,outline:{color:[0,122,194],width:2}}),this.pointBarriers=new Z.A({style:"x",size:10,outline:{color:[255,0,0],width:3}}),this.polygonBarriers=new B.A({color:[255,170,0,.6],outline:{width:7.5,color:[255,0,0,.6]}}),this.polylineBarriers=new P.A({width:7.5,color:[255,85,0,.7]}),this.routeInfo=new P.A({width:8,color:[20,89,127]}),this.stops=new F}};(0,i.Cg)([(0,f.MZ)({types:j.Y7})],x.prototype,"directionLines",void 0),(0,i.Cg)([(0,f.MZ)({types:j.wC})],x.prototype,"directionPoints",void 0),(0,i.Cg)([(0,f.MZ)({types:j.wC})],x.prototype,"pointBarriers",void 0),(0,i.Cg)([(0,f.MZ)({types:j.Ac})],x.prototype,"polygonBarriers",void 0),(0,i.Cg)([(0,f.MZ)({types:j.Y7})],x.prototype,"polylineBarriers",void 0),(0,i.Cg)([(0,f.MZ)({types:j.Y7})],x.prototype,"routeInfo",void 0),(0,i.Cg)([(0,f.MZ)({type:F})],x.prototype,"stops",void 0),x=(0,i.Cg)([(0,f.$K)("esri.layers.support.RouteSymbols")],x);var E=r(20655),R=r(80812),_=r(10407),U=r(65494),J=r(56507),k=r(2272),G=r(2073),W=r(93223);let V=class extends D.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,f.MZ)({type:String})],V.prototype,"dataType",void 0),(0,i.Cg)([(0,W.e)(G.et,{ignoreUnknown:!1})],V.prototype,"name",void 0),(0,i.Cg)([(0,f.MZ)({type:[String]})],V.prototype,"parameterNames",void 0),(0,i.Cg)([(0,f.MZ)({type:String})],V.prototype,"restrictionUsageParameterName",void 0),(0,i.Cg)([(0,W.e)(G.Mm,{ignoreUnknown:!1})],V.prototype,"timeNeutralAttributeName",void 0),(0,i.Cg)([(0,f.MZ)({type:String})],V.prototype,"trafficSupport",void 0),(0,i.Cg)([(0,W.e)(G.dn)],V.prototype,"units",void 0),(0,i.Cg)([(0,W.e)(G.WU)],V.prototype,"usageType",void 0),V=(0,i.Cg)([(0,f.$K)("esri.rest.support.NetworkAttribute")],V);const q=V;let $=class extends D.o{constructor(e){super(e),this.buildTime=null,this.name=null,this.networkAttributes=null,this.networkSources=null,this.state=null}};(0,i.Cg)([(0,f.MZ)({type:Number})],$.prototype,"buildTime",void 0),(0,i.Cg)([(0,f.MZ)({type:String})],$.prototype,"name",void 0),(0,i.Cg)([(0,f.MZ)({type:[q]})],$.prototype,"networkAttributes",void 0),(0,i.Cg)([(0,f.MZ)()],$.prototype,"networkSources",void 0),(0,i.Cg)([(0,f.MZ)({type:String})],$.prototype,"state",void 0),$=(0,i.Cg)([(0,f.$K)("esri.rest.support.NetworkDataset")],$);const K=$;var z=r(69540),H=r(36005),Y=r(43937);let Q=class extends((0,z.OU)(D.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){let{restrictionAttributeNames:r}=t;return null==r?null:r.map(e=>G.OC.fromJSON(e))}writeRestrictionAttributes(e,t,r){null!=e&&(t[r]=e.map(e=>G.OC.toJSON(e)))}};(0,i.Cg)([(0,f.MZ)({type:[Object],json:{write:!0}})],Q.prototype,"attributeParameterValues",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],Q.prototype,"description",void 0),(0,i.Cg)([(0,W.e)(G.dd,{ignoreUnknown:!1})],Q.prototype,"distanceAttributeName",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],Q.prototype,"id",void 0),(0,i.Cg)([(0,H.w)("id",["id","itemId"])],Q.prototype,"readId",null),(0,i.Cg)([(0,W.e)(G.et,{ignoreUnknown:!1})],Q.prototype,"impedanceAttributeName",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],Q.prototype,"name",void 0),(0,i.Cg)([(0,f.MZ)({type:[String],json:{write:!0}})],Q.prototype,"restrictionAttributeNames",void 0),(0,i.Cg)([(0,H.w)("restrictionAttributeNames")],Q.prototype,"readRestrictionAttributes",null),(0,i.Cg)([(0,Y.K)("restrictionAttributeNames")],Q.prototype,"writeRestrictionAttributes",null),(0,i.Cg)([(0,f.MZ)({type:Number,json:{write:{allowNull:!0}}})],Q.prototype,"simplificationTolerance",void 0),(0,i.Cg)([(0,W.e)(G.hY)],Q.prototype,"simplificationToleranceUnits",void 0),(0,i.Cg)([(0,W.e)(G.Mm,{ignoreUnknown:!1})],Q.prototype,"timeAttributeName",void 0),(0,i.Cg)([(0,W.e)(G.ow)],Q.prototype,"type",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],Q.prototype,"useHierarchy",void 0),(0,i.Cg)([(0,W.e)(G.hE)],Q.prototype,"uturnAtJunctions",void 0),Q=(0,i.Cg)([(0,f.$K)("esri.rest.support.TravelMode")],Q);let X=class extends D.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=>G.et.fromJSON(e))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map(e=>G.et.toJSON(e)))}get capabilities(){return{supportsNow:(this.currentVersion??10)>=10.81}}readDefaultTravelMode(e,t){let r=t.supportedTravelModes?.find(({id:e})=>e===t.defaultTravelMode)??t.supportedTravelModes?.find(({itemId:e})=>e===t.defaultTravelMode);return r?Q.fromJSON(r):null}};function ee(e,t,r,i){i[r]=[t.length,t.length+e.length],e.forEach(e=>{t.push(e.geometry)})}async function te(e,t,r){if(!e)throw new u.A("network-service:missing-url","Url to Network service is missing");let i=(0,k.jV)({f:"json",token:t},r),{data:o}=await(0,J.A)(e,i),{defaultTravelMode:s,supportedTravelModes:a}=await(o.currentVersion>=10.4?async function(e,t,r){try{let i=(0,k.jV)({f:"json",token:t},r),o=(0,g.UC)(e)+"/retrieveTravelModes",{data:{supportedTravelModes:s,defaultTravelMode:a}}=await(0,J.A)(o,i);return{supportedTravelModes:s,defaultTravelMode:a}}catch(e){throw new u.A("network-service:retrieveTravelModes","Could not get to the NAServer's retrieveTravelModes.",{error:e})}}(e,t,r):async function(e,t){let r=(0,k.jV)({f:"json"},t),{data:i}=await(0,J.A)(e.replace(/\/rest\/.*$/i,"/info"),r);if(!i?.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};let{owningSystemUrl:o}=i,s=(0,g.UC)(o)+"/sharing/rest/portals/self",{data:a}=await(0,J.A)(s,r),n=(0,d.wc)("helperServices.routingUtilities.url",a);if(!n)return{supportedTravelModes:[],defaultTravelMode:null};let l=(0,k.Dl)(o),u={f:"json",serviceName:/\/solve$/i.test(l.path)?"Route":/\/solveclosestfacility$/i.test(l.path)?"ClosestFacility":"ServiceAreas"},p=(0,k.jV)(u,t),c=(0,g.UC)(n)+"/GetTravelModes/execute",y=await(0,J.A)(c,p),m=[],h=null;if(y?.data?.results?.length){let e=y.data.results;for(let t of e)if("supportedTravelModes"===t.paramName){if(t.value?.features)for(let{attributes:e}of t.value.features)if(e){let t=JSON.parse(e.TravelMode);m.push(t)}}else"defaultTravelMode"===t.paramName&&(h=t.value)}return{supportedTravelModes:m,defaultTravelMode:h}}(e,r));return o.defaultTravelMode=s,o.supportedTravelModes=a,X.fromJSON(o)}(0,i.Cg)([(0,f.MZ)()],X.prototype,"accumulateAttributeNames",void 0),(0,i.Cg)([(0,H.w)("accumulateAttributeNames")],X.prototype,"readAccumulateAttributes",null),(0,i.Cg)([(0,Y.K)("accumulateAttributeNames")],X.prototype,"writeAccumulateAttributes",null),(0,i.Cg)([(0,f.MZ)()],X.prototype,"attributeParameterValues",void 0),(0,i.Cg)([(0,f.MZ)()],X.prototype,"capabilities",null),(0,i.Cg)([(0,f.MZ)()],X.prototype,"currentVersion",void 0),(0,i.Cg)([(0,f.MZ)()],X.prototype,"defaultTravelMode",void 0),(0,i.Cg)([(0,H.w)("defaultTravelMode",["defaultTravelMode","supportedTravelModes"])],X.prototype,"readDefaultTravelMode",null),(0,i.Cg)([(0,f.MZ)()],X.prototype,"directionsLanguage",void 0),(0,i.Cg)([(0,W.e)(G.Z7)],X.prototype,"directionsLengthUnits",void 0),(0,i.Cg)([(0,f.MZ)()],X.prototype,"directionsSupportedLanguages",void 0),(0,i.Cg)([(0,W.e)(G.Mm,{ignoreUnknown:!1})],X.prototype,"directionsTimeAttribute",void 0),(0,i.Cg)([(0,f.MZ)()],X.prototype,"hasZ",void 0),(0,i.Cg)([(0,W.e)(G.et,{ignoreUnknown:!1})],X.prototype,"impedance",void 0),(0,i.Cg)([(0,f.MZ)({type:K})],X.prototype,"networkDataset",void 0),(0,i.Cg)([(0,f.MZ)({type:[Q]})],X.prototype,"supportedTravelModes",void 0),X=(0,i.Cg)([(0,f.$K)("esri.rest.support.NetworkServiceDescription")],X);var re=r(16649),ie=r(52039);function oe(e,t){if(null==e)return null;let r={},i=RegExp(`^${t}`,"i");for(let o of Object.keys(e))if(i.test(o)){let i=o.slice(t.length);r[G.et.fromJSON(i)]=e[o]}return r}function se(e,t,r){if(null!=e){t.attributes||={};for(let i in e){let o=G.et.toJSON(i);t.attributes[`${r}${o}`]=e[i]}}}function ae(e){let t={};for(let r of Object.keys(e)){let i=r;t[G.et.fromJSON(i)]=e[r]}return t}function ne(e){let t={};for(let r of Object.keys(e)){let i=r;t[G.et.toJSON(i)]=e[r]}return t}function le(e,t){return null==e||null==t?null:Math.round((e-t)/6e4)}function ue(e){let 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 pe=r(22671),ce=r(66552),de=r(37807);const ye=new ce.J({0:"informative",1:"process-definition",2:"process-start",3:"process-stop",50:"warning",100:"error",101:"empty",200:"abort"});let me=class extends de.A{constructor(e){super(e),this.type=null}};(0,i.Cg)([(0,f.MZ)({type:String,json:{read:ye.read,write:ye.write}})],me.prototype,"type",void 0),me=(0,i.Cg)([(0,f.$K)("esri.rest.support.NAMessage")],me);const he=me;var ge=r(82799),fe=r(86738);let be=class extends D.o{constructor(e){super(e)}};(0,i.Cg)([(0,f.MZ)({json:{read:{source:"string"}}})],be.prototype,"text",void 0),(0,i.Cg)([(0,W.e)(G.Ec,{name:"stringType"})],be.prototype,"type",void 0),be=(0,i.Cg)([(0,f.$K)("esri.rest.support.DirectionsString")],be);const ve=be;let Te=class extends D.o{constructor(e){super(e),this.arriveTime=null,this.arriveTimeOffset=null,this.geometry=null,this.strings=null}readArriveTimeOffset(e,t){return le(t.ETA,t.arriveTimeUTC)}readGeometry(e,t){return fe.A.fromJSON(t.point)}};(0,i.Cg)([(0,f.MZ)({type:Date,json:{read:{source:"arriveTimeUTC"}}})],Te.prototype,"arriveTime",void 0),(0,i.Cg)([(0,f.MZ)()],Te.prototype,"arriveTimeOffset",void 0),(0,i.Cg)([(0,H.w)("arriveTimeOffset",["arriveTimeUTC","ETA"])],Te.prototype,"readArriveTimeOffset",null),(0,i.Cg)([(0,f.MZ)({type:fe.A})],Te.prototype,"geometry",void 0),(0,i.Cg)([(0,H.w)("geometry",["point"])],Te.prototype,"readGeometry",null),(0,i.Cg)([(0,f.MZ)({type:[ve]})],Te.prototype,"strings",void 0),Te=(0,i.Cg)([(0,f.$K)("esri.rest.support.DirectionsEvent")],Te);const Ce=Te;let we=class extends s.A{constructor(e){super(e),this.events=null,this.geometry=null,this.strings=null}set attributes(e){super.attributes=e}readGeometry(e,t){let r=function(e){if(null==e||""===e)return null;let t,r,i,o,s,a,n,l,u=0,p=0,c=0,d=0,y=[],m=0,h=0,g=0;if(s=e.match(/((\+|-)[^+\-|]+|\|)/g),s||=[],0===parseInt(s[m],32)){m=2;let e=parseInt(s[m],32);m++,a=parseInt(s[m],32),m++,1&e&&(h=s.indexOf("|")+1,n=parseInt(s[h],32),h++),2&e&&(g=s.indexOf("|",h)+1,l=parseInt(s[g],32),g++)}else a=parseInt(s[m],32),m++;for(;m<s.length&&"|"!==s[m];){t=parseInt(s[m],32)+u,m++,u=t,r=parseInt(s[m],32)+p,m++,p=r;let e=[t/a,r/a];h&&(o=parseInt(s[h],32)+c,h++,c=o,e.push(o/n)),g&&(i=parseInt(s[g],32)+d,g++,d=i,e.push(i/l)),y.push(e)}return{paths:[y],hasZ:h>0,hasM:g>0}}(t.compressedGeometry);return null==r?null:ge.A.fromJSON(r)}};(0,i.Cg)([(0,f.MZ)({type:[Ce]})],we.prototype,"events",void 0),(0,i.Cg)([(0,f.MZ)({types:{base:null,key:"type",typeMap:{polygon:ge.A},defaultKeyValue:"polygon"}})],we.prototype,"geometry",void 0),(0,i.Cg)([(0,H.w)("geometry",["compressedGeometry"])],we.prototype,"readGeometry",null),(0,i.Cg)([(0,f.MZ)({type:[ve]})],we.prototype,"strings",void 0),we=(0,i.Cg)([(0,f.$K)("esri.rest.support.DirectionsFeature")],we);const Se=we;let Ae=class extends pe.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[];let r=t.summary.envelope.spatialReference??t.spatialReference,i=r&&w.A.fromJSON(r);return e.map(e=>{let t=Se.fromJSON(e);if(null!=t.geometry&&(t.geometry.spatialReference=i),null!=t.events)for(let 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 ge.A({spatialReference:t});let r=[];for(let t of e)for(let e of t.paths)r.push(...e);let i=[];r.forEach((e,t)=>{(0===t||e[0]!==r[t-1][0]||e[1]!==r[t-1][1])&&i.push(e)});let{hasM:o,hasZ:s}=e[0];return new ge.A({hasM:o,hasZ:s,paths:[i],spatialReference:t})}(this.features.map(({geometry:e})=>e),this.extent.spatialReference):null}get strings(){return this.features.flatMap(({strings:e})=>e).filter(n.Ru)}};(0,i.Cg)([(0,f.MZ)({type:v.A,json:{read:{source:"summary.envelope"}}})],Ae.prototype,"extent",void 0),(0,i.Cg)([(0,f.MZ)({nonNullable:!0})],Ae.prototype,"features",void 0),(0,i.Cg)([(0,H.w)("features")],Ae.prototype,"readFeatures",null),(0,i.Cg)([(0,f.MZ)()],Ae.prototype,"geometryType",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],Ae.prototype,"mergedGeometry",null),(0,i.Cg)([(0,f.MZ)()],Ae.prototype,"routeId",void 0),(0,i.Cg)([(0,f.MZ)()],Ae.prototype,"routeName",void 0),(0,i.Cg)([(0,f.MZ)({value:null,readOnly:!0})],Ae.prototype,"strings",null),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"summary.totalDriveTime"}}})],Ae.prototype,"totalDriveTime",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"summary.totalLength"}}})],Ae.prototype,"totalLength",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"summary.totalTime"}}})],Ae.prototype,"totalTime",void 0),Ae=(0,i.Cg)([(0,f.$K)("esri.rest.support.DirectionsFeatureSet")],Ae);const Me=Ae;let Ie=class extends D.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,f.MZ)({type:pe.A,json:{write:!0}})],Ie.prototype,"directionLines",void 0),(0,i.Cg)([(0,f.MZ)({type:pe.A,json:{write:!0}})],Ie.prototype,"directionPoints",void 0),(0,i.Cg)([(0,f.MZ)({type:Me,json:{write:!0}})],Ie.prototype,"directions",void 0),(0,i.Cg)([(0,f.MZ)({type:s.A,json:{write:!0}})],Ie.prototype,"route",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],Ie.prototype,"routeName",void 0),(0,i.Cg)([(0,f.MZ)({type:[s.A],json:{write:!0}})],Ie.prototype,"stops",void 0),(0,i.Cg)([(0,f.MZ)({type:pe.A,json:{write:!0}})],Ie.prototype,"traversedEdges",void 0),(0,i.Cg)([(0,f.MZ)({type:pe.A,json:{write:!0}})],Ie.prototype,"traversedJunctions",void 0),(0,i.Cg)([(0,f.MZ)({type:pe.A,json:{write:!0}})],Ie.prototype,"traversedTurns",void 0),Ie=(0,i.Cg)([(0,f.$K)("esri.rest.support.RouteResult")],Ie);const Oe=Ie;function Ne(e){return e?pe.A.fromJSON(e).features.filter(n.Ru):[]}let Le=class extends D.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 De(e){return e instanceof pe.A}async function Ze(e,t,r){let i=[],o=[],s={},a={},n=(0,k.Dl)(e),{path:l}=n;De(t.stops)&&ee(t.stops.features,o,"stops.features",s),De(t.pointBarriers)&&ee(t.pointBarriers.features,o,"pointBarriers.features",s),De(t.polylineBarriers)&&ee(t.polylineBarriers.features,o,"polylineBarriers.features",s),De(t.polygonBarriers)&&ee(t.polygonBarriers.features,o,"polygonBarriers.features",s);let u=await(0,ie.el)(o);for(let e in s){let t=s[e];i.push(e),a[e]=u.slice(t[0],t[1])}if(function(e,t){for(let r=0;r<t.length;r++){let i=e[t[r]];if(i&&i.length)for(let e of i)if(null!=e&&e.hasZ)return!0}return!1}(a,i)){let e=null;try{e=await te(l,t.apiKey,r)}catch{}e&&!e.hasZ&&function(e,t){for(let r=0;r<t.length;r++){let i=e[t[r]];if(i&&i.length)for(let e of i)e.z=void 0}p.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.")}(a,i)}for(let e in a)a[e].forEach((r,i)=>{(0,re.Jt)(t,e)[i].geometry=r});let c={...r,query:{...n.query,...ue(t),f:"json"}},d=l.endsWith("/solve")?l:`${l}/solve`,{data:y}=await(0,J.A)(d,c);return function(e){let{barriers:t,checksum:r,directionLines:i,directionPoints:o,directions:s,messages:a,polygonBarriers:n,polylineBarriers:l,routes:u,stops:p,traversedEdges:c,traversedJunctions:d,traversedTurns:y}=e,m=e=>{let t=g.find(t=>t.routeName===e);if(null!=t)return t;let r={routeId:g.length+1,routeName:e};return g.push(r),r},h=e=>{let t=g.find(t=>t.routeId===e);if(null!=t)return t;let r={routeId:e,routeName:null};return g.push(r),r},g=[];u?.features.forEach((e,t)=>{e.geometry.spatialReference=u.spatialReference??void 0;let r=e.attributes.Name,i=t+1;g.push({routeId:i,routeName:r,route:e})}),s?.forEach(e=>{let{routeName:t}=e;m(t).directions=e});let f=p?.features.every(e=>null==e.attributes.RouteName)&&g.length>0?g[0].routeName:null;return p?.features.forEach(e=>{e.geometry&&(e.geometry.spatialReference??=p.spatialReference??void 0);let t=f??e.attributes.RouteName,r=m(t);r.stops??=[],r.stops.push(e)}),i?.features.forEach(e=>{let t=e.attributes.RouteID,r=h(t),{geometryType:o,spatialReference:s}=i;r.directionLines??={features:[],geometryType:o,spatialReference:s},r.directionLines.features.push(e)}),o?.features.forEach(e=>{let t=e.attributes.RouteID,r=h(t),{geometryType:i,spatialReference:s}=o;r.directionPoints??={features:[],geometryType:i,spatialReference:s},r.directionPoints.features.push(e)}),c?.features.forEach(e=>{let t=e.attributes.RouteID,r=h(t),{geometryType:i,spatialReference:o}=c;r.traversedEdges??={features:[],geometryType:i,spatialReference:o},r.traversedEdges.features.push(e)}),d?.features.forEach(e=>{let t=e.attributes.RouteID,r=h(t),{geometryType:i,spatialReference:o}=d;r.traversedJunctions??={features:[],geometryType:i,spatialReference:o},r.traversedJunctions.features.push(e)}),y?.features.forEach(e=>{let t=e.attributes.RouteID,r=h(t);r.traversedTurns??={features:[]},r.traversedTurns.features.push(e)}),Le.fromJSON({barriers:t,checksum:r,messages:a,polygonBarriers:n,polylineBarriers:l,routeResults:g})}(y)}var je;(0,i.Cg)([(0,f.MZ)({type:String})],Le.prototype,"checksum",void 0),(0,i.Cg)([(0,f.MZ)({type:[he]})],Le.prototype,"messages",void 0),(0,i.Cg)([(0,f.MZ)({type:[s.A]})],Le.prototype,"pointBarriers",void 0),(0,i.Cg)([(0,H.w)("pointBarriers",["barriers"])],Le.prototype,"readPointBarriers",null),(0,i.Cg)([(0,f.MZ)({type:[s.A]})],Le.prototype,"polylineBarriers",void 0),(0,i.Cg)([(0,H.w)("polylineBarriers")],Le.prototype,"readPolylineBarriers",null),(0,i.Cg)([(0,f.MZ)({type:[s.A]})],Le.prototype,"polygonBarriers",void 0),(0,i.Cg)([(0,H.w)("polygonBarriers")],Le.prototype,"readPolygonBarriers",null),(0,i.Cg)([(0,f.MZ)({type:[Oe]})],Le.prototype,"routeResults",void 0),Le=(0,i.Cg)([(0,f.$K)("esri.rest.support.RouteSolveResult")],Le);let Fe=class extends((0,z.OU)(D.o)){static{je=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",editable:!1,nullable:!1},{name:"DirectionLineType",alias:"Line Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"DirectionPointID",alias:"Direction Point ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"FromLevel",alias:"From Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Meters",alias:"Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"Minutes",alias:"Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"ToLevel",alias:"To Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0}]}static fromGraphic(e){return new je({directionLineType:G.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(){let e={ObjectID:this.objectId,DirectionLineType:this.directionLineType?G.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 s.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};var Be;(0,i.Cg)([(0,f.MZ)({type:G.gD.apiValues,json:{read:{source:"attributes.DirectionLineType",reader:G.gD.read}}})],Fe.prototype,"directionLineType",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.DirectionPointID"}}})],Fe.prototype,"directionPointId",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.Meters"}}})],Fe.prototype,"distance",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.Minutes"}}})],Fe.prototype,"duration",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.FromLevel"}}})],Fe.prototype,"fromLevel",void 0),(0,i.Cg)([(0,f.MZ)({type:ge.A})],Fe.prototype,"geometry",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.ObjectID"}}})],Fe.prototype,"objectId",void 0),(0,i.Cg)([(0,f.MZ)({type:a.A})],Fe.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,f.MZ)({types:j.Es})],Fe.prototype,"symbol",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.ToLevel"}}})],Fe.prototype,"toLevel",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Fe.prototype,"type",void 0),Fe=je=(0,i.Cg)([(0,f.$K)("esri.rest.support.DirectionLine")],Fe);let Pe=class extends((0,z.OU)(D.o)){static{Be=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?null:new Date(t.attributes.ArrivalTime)}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1},{name:"AlternateName",alias:"Alternate Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate",editable:!0,nullable:!0,length:36},{name:"ArrivalUTCOffset",alias:"Arrival Time Offset",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Azimuth",alias:"Azimuth",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"BranchName",alias:"Branch Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048},{name:"DirectionPointType",alias:"Directions Point Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"DisplayText",alias:"Display Text",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048},{name:"ExitName",alias:"Exit Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048},{name:"IntersectingName",alias:"Intersecting Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048},{name:"Level",alias:"Level",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Name",alias:"Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"ShortVoiceInstruction",alias:"Short Voice Instruction",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048},{name:"StopID",alias:"Stop ID",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"TowardName",alias:"Toward Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048},{name:"VoiceInstruction",alias:"Voice Instruction",type:"esriFieldTypeString",editable:!0,nullable:!0,length:2048}]}static fromGraphic(e){return new Be({alternateName:e.attributes.AlternateName??null,arrivalTime:null==e.attributes.ArrivalTime?null:new Date(e.attributes.ArrivalTime),arrivalTimeOffset:e.attributes.ArrivalUTCOffset??null,azimuth:e.attributes.Azimuth??null,branchName:e.attributes.BranchName??null,directionPointType:G._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(){let e={ObjectID:this.objectId,DirectionPointType:this.directionPointType?G._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 s.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};var xe;(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.AlternateName"}}})],Pe.prototype,"alternateName",void 0),(0,i.Cg)([(0,f.MZ)({type:Date})],Pe.prototype,"arrivalTime",void 0),(0,i.Cg)([(0,H.w)("arrivalTime",["attributes.ArrivalTime"])],Pe.prototype,"readArrivalTime",null),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.ArrivalUTCOffset"}}})],Pe.prototype,"arrivalTimeOffset",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.Azimuth"}}})],Pe.prototype,"azimuth",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.BranchName"}}})],Pe.prototype,"branchName",void 0),(0,i.Cg)([(0,f.MZ)({type:G._6.apiValues,json:{read:{source:"attributes.DirectionPointType",reader:G._6.read}}})],Pe.prototype,"directionPointType",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.DisplayText"}}})],Pe.prototype,"displayText",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.ExitName"}}})],Pe.prototype,"exitName",void 0),(0,i.Cg)([(0,f.MZ)({type:fe.A})],Pe.prototype,"geometry",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.IntersectingName"}}})],Pe.prototype,"intersectingName",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.Level"}}})],Pe.prototype,"level",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.Name"}}})],Pe.prototype,"name",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.ObjectID"}}})],Pe.prototype,"objectId",void 0),(0,i.Cg)([(0,f.MZ)({type:a.A})],Pe.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.Sequence"}}})],Pe.prototype,"sequence",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.ShortVoiceInstruction"}}})],Pe.prototype,"shortVoiceInstruction",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.StopID"}}})],Pe.prototype,"stopId",void 0),(0,i.Cg)([(0,f.MZ)({types:j.Es})],Pe.prototype,"symbol",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.TowardName"}}})],Pe.prototype,"towardName",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Pe.prototype,"type",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.VoiceInstruction"}}})],Pe.prototype,"voiceInstruction",void 0),Pe=Be=(0,i.Cg)([(0,f.$K)("esri.rest.support.DirectionPoint")],Pe);let Ee=class extends((0,z.OU)(D.o)){static{xe=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 oe(t.attributes,"Attr_")}writeCosts(e,t){se(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",editable:!1,nullable:!1},{name:"AddedCost",alias:"Added Cost",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1048576},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"FullEdge",alias:"Full Edge",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Name",alias:"Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:255},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0}]}static fromGraphic(e){return new xe({addedCost:e.attributes.AddedCost??null,barrierType:null==e.attributes.BarrierType?null:G.iM.fromJSON(e.attributes.BarrierType),costs:null==e.attributes.Costs?null:ae(JSON.parse(e.attributes.Costs)),curbApproach:null==e.attributes.CurbApproach?null:G.JJ.fromJSON(e.attributes.CurbApproach),fullEdge:null==e.attributes.FullEdge?null:G.fe.fromJSON(e.attributes.FullEdge),geometry:e.geometry,name:e.attributes.Name??null,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,status:null==e.attributes.Status?null:G.$r.fromJSON(e.attributes.Status),symbol:e.symbol})}toGraphic(){let e={ObjectID:this.objectId,AddedCost:this.addedCost,BarrierType:this.barrierType?G.iM.toJSON(this.barrierType):null,Costs:this.costs?JSON.stringify(ne(this.costs)):null,CurbApproach:this.curbApproach?G.JJ.toJSON(this.curbApproach):null,FullEdge:this.fullEdge?G.fe.toJSON(this.fullEdge):null,Name:this.name,Status:this.status?G.$r.toJSON(this.status):null};return new s.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i.Cg)([(0,f.MZ)()],Ee.prototype,"addedCost",void 0),(0,i.Cg)([(0,f.MZ)({type:G.iM.apiValues,json:{name:"attributes.BarrierType",read:{reader:G.iM.read},write:{writer:G.iM.write}}})],Ee.prototype,"barrierType",void 0),(0,i.Cg)([(0,f.MZ)()],Ee.prototype,"costs",void 0),(0,i.Cg)([(0,H.w)("costs",["attributes"])],Ee.prototype,"readCosts",null),(0,i.Cg)([(0,Y.K)("costs")],Ee.prototype,"writeCosts",null),(0,i.Cg)([(0,f.MZ)({type:G.JJ.apiValues,json:{read:{source:"attributes.CurbApproach",reader:G.JJ.read}}})],Ee.prototype,"curbApproach",void 0),(0,i.Cg)([(0,f.MZ)({type:G.fe.apiValues,json:{name:"attributes.FullEdge",read:{reader:G.fe.read},write:{writer:G.fe.write}}})],Ee.prototype,"fullEdge",void 0),(0,i.Cg)([(0,f.MZ)({type:fe.A,json:{write:!0},value:null})],Ee.prototype,"geometry",null),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.Name"}})],Ee.prototype,"name",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.ObjectID"}})],Ee.prototype,"objectId",void 0),(0,i.Cg)([(0,f.MZ)({type:a.A})],Ee.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.PosAlong"}})],Ee.prototype,"positionAlong",void 0),(0,i.Cg)([(0,f.MZ)({type:G.mt.apiValues,json:{name:"attributes.SideOfEdge",read:{reader:G.mt.read},write:{writer:G.mt.write}}})],Ee.prototype,"sideOfEdge",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.SourceID"}})],Ee.prototype,"sourceId",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.SourceOID"}})],Ee.prototype,"sourceOid",void 0),(0,i.Cg)([(0,f.MZ)({type:G.$r.apiValues,json:{read:{source:"attributes.Status",reader:G.$r.read}}})],Ee.prototype,"status",void 0),(0,i.Cg)([(0,f.MZ)({types:j.Es})],Ee.prototype,"symbol",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Ee.prototype,"type",void 0),Ee=xe=(0,i.Cg)([(0,f.$K)("esri.rest.support.PointBarrier")],Ee);var Re,_e=r(39829);let Ue=class extends((0,z.OU)(D.o)){static{Re=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 oe(t.attributes,"Attr_")}writeCosts(e,t){se(e,t,"Attr_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1048576},{name:"Name",alias:"Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:255},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble",editable:!0,nullable:!0}]}static fromGraphic(e){return new Re({barrierType:null==e.attributes.BarrierType?null:G.iM.fromJSON(e.attributes.BarrierType),costs:null==e.attributes.Costs?null:ae(JSON.parse(e.attributes.Costs)),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(){let e={ObjectID:this.objectId,BarrierType:this.barrierType?G.iM.toJSON(this.barrierType):null,Costs:this.costs?JSON.stringify(ne(this.costs)):null,Name:this.name??null,ScaleFactor:this.scaleFactor??null};return new s.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};var Je;(0,i.Cg)([(0,f.MZ)({type:G.iM.apiValues,json:{name:"attributes.BarrierType",read:{reader:G.iM.read},write:{writer:G.iM.write}}})],Ue.prototype,"barrierType",void 0),(0,i.Cg)([(0,f.MZ)()],Ue.prototype,"costs",void 0),(0,i.Cg)([(0,H.w)("costs",["attributes"])],Ue.prototype,"readCosts",null),(0,i.Cg)([(0,Y.K)("costs")],Ue.prototype,"writeCosts",null),(0,i.Cg)([(0,f.MZ)({type:_e.A,json:{write:!0}})],Ue.prototype,"geometry",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.Name"}})],Ue.prototype,"name",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.ObjectID"}})],Ue.prototype,"objectId",void 0),(0,i.Cg)([(0,f.MZ)({type:a.A})],Ue.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,f.MZ)()],Ue.prototype,"scaleFactor",void 0),(0,i.Cg)([(0,f.MZ)({types:j.Es})],Ue.prototype,"symbol",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Ue.prototype,"type",void 0),Ue=Re=(0,i.Cg)([(0,f.$K)("esri.rest.support.PolygonBarrier")],Ue);let ke=class extends((0,z.OU)(D.o)){static{Je=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 oe(t.attributes,"Attr_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1},{name:"BarrierType",alias:"Barrier Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Costs",alias:"Costs",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1048576},{name:"Name",alias:"Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:255},{name:"ScaleFactor",alias:"Scale Factor",type:"esriFieldTypeDouble",editable:!0,nullable:!0}]}static fromGraphic(e){return new Je({barrierType:null==e.attributes.BarrierType?null:G.iM.fromJSON(e.attributes.BarrierType),costs:null==e.attributes.Costs?null:ae(JSON.parse(e.attributes.Costs)),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(){let e={ObjectID:this.objectId,BarrierType:this.barrierType?G.iM.toJSON(this.barrierType):null,Costs:this.costs?JSON.stringify(ne(this.costs)):null,Name:this.name,ScaleFactor:this.scaleFactor};return new s.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i.Cg)([(0,f.MZ)({type:G.iM.apiValues,json:{read:{source:"attributes.BarrierType",reader:G.iM.read}}})],ke.prototype,"barrierType",void 0),(0,i.Cg)([(0,f.MZ)()],ke.prototype,"costs",void 0),(0,i.Cg)([(0,H.w)("costs",["attributes"])],ke.prototype,"readCosts",null),(0,i.Cg)([(0,f.MZ)({type:ge.A,json:{write:!0}})],ke.prototype,"geometry",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.Name"}})],ke.prototype,"name",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.ObjectID"}})],ke.prototype,"objectId",void 0),(0,i.Cg)([(0,f.MZ)({type:a.A})],ke.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,f.MZ)()],ke.prototype,"scaleFactor",void 0),(0,i.Cg)([(0,f.MZ)({types:j.Es})],ke.prototype,"symbol",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],ke.prototype,"type",void 0),ke=Je=(0,i.Cg)([(0,f.$K)("esri.rest.support.PolylineBarrier")],ke);let Ge=class extends D.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=>G.et.fromJSON(e))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map(e=>G.et.toJSON(e)))}};var We;(0,i.Cg)([(0,f.MZ)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],Ge.prototype,"accumulateAttributes",void 0),(0,i.Cg)([(0,H.w)("accumulateAttributes")],Ge.prototype,"readAccumulateAttributes",null),(0,i.Cg)([(0,Y.K)("accumulateAttributes")],Ge.prototype,"writeAccumulateAttributes",null),(0,i.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],Ge.prototype,"directionsLanguage",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],Ge.prototype,"findBestSequence",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],Ge.prototype,"preserveFirstStop",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],Ge.prototype,"preserveLastStop",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],Ge.prototype,"startTimeIsUTC",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],Ge.prototype,"timeWindowsAreUTC",void 0),(0,i.Cg)([(0,f.MZ)({type:Q,json:{write:!0}})],Ge.prototype,"travelMode",void 0),Ge=(0,i.Cg)([(0,f.$K)("esri.rest.support.RouteSettings")],Ge);let Ve=class extends((0,z.OU)(D.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?null:new Date(t.attributes.EndTimeUTC)}readEndTimeOffset(e,t){return le(t.attributes.EndTime,t.attributes.EndTimeUTC)}readStartTime(e,t){return null==t.attributes.StartTimeUTC?null:new Date(t.attributes.StartTimeUTC)}readStartTimeOffset(e,t){return le(t.attributes.StartTime,t.attributes.StartTimeUTC)}readTotalCosts(e,t){return oe(t.attributes,"Total_")}readTotalViolations(e,t){return oe(t.attributes,"TotalViolation_")}readTotalWait(e,t){return oe(t.attributes,"TotalWait_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1},{name:"AnalysisSettings",alias:"Analysis Settings",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1048576},{name:"EndTime",alias:"End Time",type:"esriFieldTypeDate",editable:!0,nullable:!0,length:36},{name:"EndUTCOffset",alias:"End Time Offset",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Messages",alias:"Messages",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1048576},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1024},{name:"StartTime",alias:"Start Time",type:"esriFieldTypeDate",editable:!0,nullable:!0,length:36},{name:"StartUTCOffset",alias:"Start Time Offset",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"TotalCosts",alias:"Total Costs",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1048576},{name:"TotalLateMinutes",alias:"Total Late Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"TotalMeters",alias:"Total Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"TotalMinutes",alias:"Total Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"TotalWaitMinutes",alias:"Total Wait Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"Version",alias:"Version",type:"esriFieldTypeString",editable:!0,nullable:!0,length:16}]}static fromGraphic(e){return new We({analysisSettings:null==e.attributes.AnalysisSettings?null:Ge.fromJSON(JSON.parse(e.attributes.AnalysisSettings)),endTime:null==e.attributes.EndTime?null:new Date(e.attributes.EndTime),endTimeOffset:e.attributes.EndUTCOffset??null,geometry:e.geometry,messages:null==e.attributes.Messages?null:JSON.parse(e.attributes.Messages),name:e.attributes.RouteName,objectId:e.attributes.ObjectID??e.attributes.__OBJECTID,popupTemplate:e.popupTemplate,startTime:null==e.attributes.StartTime?null:new Date(e.attributes.StartTime),startTimeOffset:e.attributes.StartUTCOffset??null,symbol:e.symbol,totalCosts:null==e.attributes.TotalCosts?null:ae(JSON.parse(e.attributes.TotalCosts)),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(){let 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(ne(this.totalCosts)):null,TotalLateMinutes:this.totalLateDuration,TotalMeters:this.totalDistance,TotalMinutes:this.totalDuration,TotalWaitMinutes:this.totalWaitDuration,Version:this.version};return new s.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};(0,i.Cg)([(0,f.MZ)()],Ve.prototype,"analysisSettings",void 0),(0,i.Cg)([(0,f.MZ)({type:Date})],Ve.prototype,"endTime",void 0),(0,i.Cg)([(0,H.w)("endTime",["attributes.EndTimeUTC"])],Ve.prototype,"readEndTime",null),(0,i.Cg)([(0,f.MZ)()],Ve.prototype,"endTimeOffset",void 0),(0,i.Cg)([(0,H.w)("endTimeOffset",["attributes.EndTime","attributes.EndTimeUTC"])],Ve.prototype,"readEndTimeOffset",null),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.FirstStopID"}}})],Ve.prototype,"firstStopId",void 0),(0,i.Cg)([(0,f.MZ)({type:ge.A})],Ve.prototype,"geometry",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.LastStopID"}}})],Ve.prototype,"lastStopId",void 0),(0,i.Cg)([(0,f.MZ)()],Ve.prototype,"messages",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.Name"}}})],Ve.prototype,"name",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.ObjectID"}}})],Ve.prototype,"objectId",void 0),(0,i.Cg)([(0,f.MZ)({type:a.A})],Ve.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,f.MZ)({type:Date})],Ve.prototype,"startTime",void 0),(0,i.Cg)([(0,H.w)("startTime",["attributes.StartTimeUTC"])],Ve.prototype,"readStartTime",null),(0,i.Cg)([(0,f.MZ)()],Ve.prototype,"startTimeOffset",void 0),(0,i.Cg)([(0,H.w)("startTimeOffset",["attributes.StartTime","attributes.StartTimeUTC"])],Ve.prototype,"readStartTimeOffset",null),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.StopCount"}}})],Ve.prototype,"stopCount",void 0),(0,i.Cg)([(0,f.MZ)({types:j.Es})],Ve.prototype,"symbol",void 0),(0,i.Cg)([(0,f.MZ)()],Ve.prototype,"totalCosts",void 0),(0,i.Cg)([(0,H.w)("totalCosts",["attributes"])],Ve.prototype,"readTotalCosts",null),(0,i.Cg)([(0,f.MZ)()],Ve.prototype,"totalDistance",void 0),(0,i.Cg)([(0,f.MZ)()],Ve.prototype,"totalDuration",void 0),(0,i.Cg)([(0,f.MZ)()],Ve.prototype,"totalLateDuration",void 0),(0,i.Cg)([(0,f.MZ)()],Ve.prototype,"totalViolations",void 0),(0,i.Cg)([(0,H.w)("totalViolations",["attributes"])],Ve.prototype,"readTotalViolations",null),(0,i.Cg)([(0,f.MZ)()],Ve.prototype,"totalWait",void 0),(0,i.Cg)([(0,H.w)("totalWait",["attributes"])],Ve.prototype,"readTotalWait",null),(0,i.Cg)([(0,f.MZ)()],Ve.prototype,"totalWaitDuration",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Ve.prototype,"type",void 0),(0,i.Cg)([(0,f.MZ)()],Ve.prototype,"version",void 0),Ve=We=(0,i.Cg)([(0,f.$K)("esri.rest.support.RouteInfo")],Ve);var qe=r(78888);const $e={type:String,json:{read:{source:"token"},write:{target:"token"}}};var Ke=r(65864),ze=r(50498);let He=class extends((0,z.OU)(D.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,f.MZ)({type:Boolean,json:{write:!0}})],He.prototype,"doNotLocateOnRestrictedElements",void 0),(0,i.Cg)([(0,f.MZ)({types:ze.yR,json:{read:Ke.rS,write:!0}})],He.prototype,"geometry",void 0),(0,i.Cg)([(0,W.e)(G.Vj)],He.prototype,"geometryType",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{name:"layerName",write:!0}})],He.prototype,"name",void 0),(0,i.Cg)([(0,W.e)(G.vS,{name:"spatialRel"})],He.prototype,"spatialRelationship",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],He.prototype,"type",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],He.prototype,"where",void 0),He=(0,i.Cg)([(0,f.$K)("esri.rest.support.DataLayer")],He);var Ye=r(10107),Qe=r(64108);let Xe=class extends((0,z.OU)(D.o)){constructor(e){super(e),this.name=null,this.where=null}};(0,i.Cg)([(0,Ye.MZ)({json:{write:!0}})],Xe.prototype,"name",void 0),(0,i.Cg)([(0,Ye.MZ)({json:{write:!0}})],Xe.prototype,"where",void 0),Xe=(0,i.Cg)([(0,Qe.$)("esri.rest.support.LocateSettingSource")],Xe);const et=Xe;let tt=class extends((0,z.OU)(D.o)){constructor(e){super(e),this.allowAutoRelocate=null,this.sources=null}};(0,i.Cg)([(0,Ye.MZ)({type:Boolean,json:{write:!0}})],tt.prototype,"allowAutoRelocate",void 0),(0,i.Cg)([(0,Ye.MZ)({type:[et],json:{write:!0}})],tt.prototype,"sources",void 0),tt=(0,i.Cg)([(0,Qe.$)("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,Ye.MZ)({type:Number,json:{write:!0}})],it.prototype,"tolerance",void 0),(0,i.Cg)([(0,W.e)(G.Y8)],it.prototype,"toleranceUnits",void 0),it=(0,i.Cg)([(0,Qe.$)("esri.rest.support.LocateSetting")],it);const ot=it;let st=class extends((0,z.OU)(D.o)){constructor(e){super(e),this.stops=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null}};(0,i.Cg)([(0,Ye.MZ)({type:ot,json:{write:!0}})],st.prototype,"stops",void 0),(0,i.Cg)([(0,Ye.MZ)({type:ot,json:{name:"barriers",write:!0}})],st.prototype,"pointBarriers",void 0),(0,i.Cg)([(0,Ye.MZ)({type:rt,json:{write:!0}})],st.prototype,"polylineBarriers",void 0),(0,i.Cg)([(0,Ye.MZ)({type:rt,json:{write:!0}})],st.prototype,"polygonBarriers",void 0),st=(0,i.Cg)([(0,Qe.$)("esri.rest.support.LocateSettingsOverrides")],st);const at=st;let nt=class extends((0,z.OU)(D.o)){constructor(e){super(e),this.default=null,this.overrides=null}};(0,i.Cg)([(0,Ye.MZ)({type:ot,json:{write:!0}})],nt.prototype,"default",void 0),(0,i.Cg)([(0,Ye.MZ)({type:at,json:{write:!0}})],nt.prototype,"overrides",void 0),nt=(0,i.Cg)([(0,Qe.$)("esri.rest.support.LocateSettings")],nt);const lt=nt;var ut;let pt=class extends pe.A{static{ut=this}constructor(e){super(e),this.doNotLocateOnRestrictedElements=null}clone(){return new ut({doNotLocateOnRestrictedElements:this.doNotLocateOnRestrictedElements,...this.cloneProperties()})}};(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],pt.prototype,"doNotLocateOnRestrictedElements",void 0),pt=ut=(0,i.Cg)([(0,f.$K)("esri.rest.support.NetworkFeatureSet")],pt);let ct=class extends((0,z.OU)(D.o)){constructor(e){super(e),this.doNotLocateOnRestrictedElements=null,this.url=null}};var dt;(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],ct.prototype,"doNotLocateOnRestrictedElements",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],ct.prototype,"url",void 0),ct=(0,i.Cg)([(0,f.$K)("esri.rest.support.NetworkUrl")],ct);let yt=class extends((0,z.OU)(D.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,qe.PZ)(dt,e)}readAccumulateAttributes(e){return null==e?null:e.map(e=>G.et.fromJSON(e))}writeAccumulateAttributes(e,t,r){e?.length&&(t[r]=e.map(e=>G.et.toJSON(e)))}writePointBarriers(e,t,r){mt(e,t,r)}writePolygonBarrier(e,t,r){mt(e,t,r)}writePolylineBarrier(e,t,r){mt(e,t,r)}readRestrictionAttributes(e){return null==e?null:e.map(e=>G.OC.fromJSON(e))}writeRestrictionAttributes(e,t,r){e?.length&&(t[r]=e.map(e=>G.OC.toJSON(e)))}readStartTime(e,t){let{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)?He.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)?pe.A.fromJSON(e):null}(t.stops)}writeStops(e,t,r){mt(e,t,r)}};function mt(e,t,r){null!=e&&(t[r]=l.A.isCollection(e)?{features:e.toArray().map(e=>e.toJSON())}:e.toJSON())}var ht;(0,i.Cg)([(0,f.MZ)({type:[String],json:{name:"accumulateAttributeNames",write:!0}})],yt.prototype,"accumulateAttributes",void 0),(0,i.Cg)([(0,H.w)("accumulateAttributes")],yt.prototype,"readAccumulateAttributes",null),(0,i.Cg)([(0,Y.K)("accumulateAttributes")],yt.prototype,"writeAccumulateAttributes",null),(0,i.Cg)([(0,f.MZ)($e)],yt.prototype,"apiKey",void 0),(0,i.Cg)([(0,f.MZ)({json:{write:!0}})],yt.prototype,"attributeParameterValues",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],yt.prototype,"checksum",void 0),(0,i.Cg)([(0,f.MZ)({type:String,json:{write:!0}})],yt.prototype,"directionsLanguage",void 0),(0,i.Cg)([(0,W.e)(G.Z7)],yt.prototype,"directionsLengthUnits",void 0),(0,i.Cg)([(0,W.e)(G.aJ)],yt.prototype,"directionsOutputType",void 0),(0,i.Cg)([(0,W.e)(G.$n)],yt.prototype,"directionsStyleName",void 0),(0,i.Cg)([(0,W.e)(G.Mm,{name:"directionsTimeAttributeName",ignoreUnknown:!1})],yt.prototype,"directionsTimeAttribute",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"findBestSequence",void 0),(0,i.Cg)([(0,f.MZ)({type:Number,json:{write:!0}})],yt.prototype,"geometryPrecision",void 0),(0,i.Cg)([(0,f.MZ)({type:Number,json:{write:!0}})],yt.prototype,"geometryPrecisionM",void 0),(0,i.Cg)([(0,f.MZ)({type:Number,json:{write:!0}})],yt.prototype,"geometryPrecisionZ",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"ignoreInvalidLocations",void 0),(0,i.Cg)([(0,W.e)(G.et,{name:"impedanceAttributeName",ignoreUnknown:!1})],yt.prototype,"impedanceAttribute",void 0),(0,i.Cg)([(0,f.MZ)({type:lt,json:{write:!0}})],yt.prototype,"locateSettings",void 0),(0,i.Cg)([(0,f.MZ)({type:Number,json:{write:!0}})],yt.prototype,"outputGeometryPrecision",void 0),(0,i.Cg)([(0,W.e)(G.hY)],yt.prototype,"outputGeometryPrecisionUnits",void 0),(0,i.Cg)([(0,W.e)(G.Sr)],yt.prototype,"outputLines",void 0),(0,i.Cg)([(0,f.MZ)({type:w.A,json:{name:"outSR",write:!0}})],yt.prototype,"outSpatialReference",void 0),(0,i.Cg)([(0,f.MZ)({json:{write:!0}})],yt.prototype,"overrides",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"barriers",write:!0}})],yt.prototype,"pointBarriers",void 0),(0,i.Cg)([(0,Y.K)("pointBarriers")],yt.prototype,"writePointBarriers",null),(0,i.Cg)([(0,f.MZ)({json:{write:!0}})],yt.prototype,"polygonBarriers",void 0),(0,i.Cg)([(0,Y.K)("polygonBarriers")],yt.prototype,"writePolygonBarrier",null),(0,i.Cg)([(0,f.MZ)({json:{write:!0}})],yt.prototype,"polylineBarriers",void 0),(0,i.Cg)([(0,Y.K)("polylineBarriers")],yt.prototype,"writePolylineBarrier",null),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"preserveFirstStop",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"preserveLastStop",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"preserveObjectID",void 0),(0,i.Cg)([(0,f.MZ)({type:[String],json:{name:"restrictionAttributeNames",write:!0}})],yt.prototype,"restrictionAttributes",void 0),(0,i.Cg)([(0,H.w)("restrictionAttributes")],yt.prototype,"readRestrictionAttributes",null),(0,i.Cg)([(0,Y.K)("restrictionAttributes")],yt.prototype,"writeRestrictionAttributes",null),(0,i.Cg)([(0,W.e)(G.hE)],yt.prototype,"restrictUTurns",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"returnBarriers",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"returnDirections",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"returnEmptyResults",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"returnPolygonBarriers",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"returnPolylineBarriers",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"returnRoutes",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"returnStops",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"returnTraversedEdges",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"returnTraversedJunctions",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"returnTraversedTurns",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"returnZ",void 0),(0,i.Cg)([(0,f.MZ)({json:{write:!0}})],yt.prototype,"startTime",void 0),(0,i.Cg)([(0,H.w)("startTime")],yt.prototype,"readStartTime",null),(0,i.Cg)([(0,Y.K)("startTime")],yt.prototype,"writeStartTime",null),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"startTimeIsUTC",void 0),(0,i.Cg)([(0,f.MZ)({json:{write:!0}})],yt.prototype,"stops",void 0),(0,i.Cg)([(0,H.w)("stops")],yt.prototype,"readStops",null),(0,i.Cg)([(0,Y.K)("stops")],yt.prototype,"writeStops",null),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"timeWindowsAreUTC",void 0),(0,i.Cg)([(0,f.MZ)({type:Q,json:{write:!0}})],yt.prototype,"travelMode",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"useHierarchy",void 0),(0,i.Cg)([(0,f.MZ)({type:Boolean,json:{write:!0}})],yt.prototype,"useTimeWindows",void 0),yt=dt=(0,i.Cg)([(0,f.$K)("esri.rest.support.RouteParameters")],yt);let gt=class extends((0,z.OU)(D.o)){static{ht=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 le(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return oe(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return le(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 oe(t.attributes,"Attr_")}writeServiceCosts(e,t){se(e,t,"Attr_")}writeTimeWindowEnd(e,t){null!=e&&(t.attributes||={},t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){null!=e&&(t.attributes||={},t.attributes.TimeWindowStart=e.getTime())}readViolations(e,t){return oe(t.attributes,"Violation_")}readWait(e,t){return oe(t.attributes,"Wait_")}static{this.fields=[{name:"ObjectID",alias:"ObjectID",type:"esriFieldTypeOID",editable:!1,nullable:!1},{name:"ArrivalCurbApproach",alias:"Arrival Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate",editable:!0,nullable:!0,length:36},{name:"ArrivalUTCOffset",alias:"Arrival Time Offset",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"CumulativeCosts",alias:"Cumulative Costs",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1048576},{name:"CumulativeMeters",alias:"Cumulative Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"CumulativeMinutes",alias:"Cumulative Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"DepartureCurbApproach",alias:"Departure Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"DepartureTime",alias:"Departure Time",type:"esriFieldTypeDate",editable:!0,nullable:!0,length:36},{name:"DepartureUTCOffset",alias:"Departure Time Offset",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"LateMinutes",alias:"Minutes Late",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"LocationType",alias:"Location Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"Name",alias:"Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:255},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",editable:!0,nullable:!0,length:255},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"ServiceCosts",alias:"Service Costs",type:"esriFieldTypeString",editable:!0,nullable:!0,length:1048576},{name:"ServiceMeters",alias:"Service Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"ServiceMinutes",alias:"Service Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"TimeWindowEnd",alias:"Time Window End",type:"esriFieldTypeDate",editable:!0,nullable:!0,length:36},{name:"TimeWindowEndUTCOffset",alias:"Time Window End Offset",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"TimeWindowStart",alias:"Time Window Start",type:"esriFieldTypeDate",editable:!0,nullable:!0,length:36},{name:"TimeWindowStartUTCOffset",alias:"Time Window Start Offset",type:"esriFieldTypeInteger",editable:!0,nullable:!0},{name:"WaitMinutes",alias:"Minutes Wait",type:"esriFieldTypeDouble",editable:!0,nullable:!0}]}static fromGraphic(e){return new ht({arriveCurbApproach:null==e.attributes.ArrivalCurbApproach?null:G.JJ.fromJSON(e.attributes.ArrivalCurbApproach),arriveTime:null==e.attributes.ArrivalTime?null:new Date(e.attributes.ArrivalTime),arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:null==e.attributes.CumulativeCosts?null:ae(JSON.parse(e.attributes.CumulativeCosts)),cumulativeDistance:e.attributes.CumulativeMeters??null,cumulativeDuration:e.attributes.CumulativeMinutes??null,curbApproach:null==e.attributes.CurbApproach?null:G.JJ.fromJSON(e.attributes.CurbApproach),departCurbApproach:null==e.attributes.DepartureCurbApproach?null:G.JJ.fromJSON(e.attributes.DepartureCurbApproach),departTime:null==e.attributes.DepartureTime?null:new Date(e.attributes.DepartureTime),departTimeOffset:e.attributes.DepartureUTCOffset??null,geometry:e.geometry,lateDuration:e.attributes.LateMinutes??null,locationType:null==e.attributes.LocationType?null:G.EM.fromJSON(e.attributes.LocationType),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?null:ae(JSON.parse(e.attributes.ServiceCosts)),serviceDistance:e.attributes.ServiceMeters??null,serviceDuration:e.attributes.ServiceMinutes??null,status:null==e.attributes.Status?null:G.$r.fromJSON(e.attributes.Status),symbol:e.symbol,timeWindowEnd:null==e.attributes.TimeWindowEnd?null:new Date(e.attributes.TimeWindowEnd),timeWindowEndOffset:e.attributes.TimeWindowEndUTCOffset??null,timeWindowStart:null==e.attributes.TimeWindowStart?null:new Date(e.attributes.TimeWindowStart),timeWindowStartOffset:e.attributes.TimeWindowStartUTCOffset??null,waitDuration:e.attributes.WaitMinutes??null})}toGraphic(){let e={ObjectID:this.objectId,ArrivalCurbApproach:this.arriveCurbApproach?G.JJ.toJSON(this.arriveCurbApproach):null,ArrivalTime:this.arriveTime?.getTime()??null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:this.cumulativeCosts?JSON.stringify(ne(this.cumulativeCosts)):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:this.curbApproach?G.JJ.toJSON(this.curbApproach):null,DepartureCurbApproach:this.departCurbApproach?G.JJ.toJSON(this.departCurbApproach):null,DepartureTime:this.departTime?.getTime()??null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:this.locationType?G.EM.toJSON(this.locationType):null,Name:this.name,RouteName:this.routeName,Sequence:this.sequence,ServiceCosts:this.serviceCosts?JSON.stringify(ne(this.serviceCosts)):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:this.status?G.$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 s.A({geometry:this.geometry,attributes:e,symbol:this.symbol,popupTemplate:this.popupTemplate})}};function ft(e){if(!e.length)return;let t=e.toArray(),r=t.map(({objectId:e})=>e).filter(e=>null!=e),i=Math.max(...r,0);for(let e of t)e.objectId??=++i}function bt(e,t){return e.length===t.length&&vt(e)&&vt(t)}function vt(e){return e.every(({objectId:e})=>null!=e)}function Tt(e,t){return!!e.length||!!t.length}function Ct(e){return e.length?e:null}function wt(e){switch(e){case"esriGeometryPoint":return{type:"esriSMS",style:"esriSMSCircle",size:12,color:[0,0,0,0],outline:wt("esriGeometryPolyline")};case"esriGeometryPolyline":return{type:"esriSLS",style:"esriSLSSolid",width:1,color:[0,0,0,0]};case"esriGeometryPolygon":return{type:"esriSFS",style:"esriSFSNull",outline:wt("esriGeometryPolyline")}}}function St(e){return"layers"in e}async function At(e){let t=w.A.WGS84;return await(0,C.initializeProjection)(e.spatialReference,t),(0,C.project)(e,t)}function Mt(e,t){if(t&&e?.length&&!e.every(({symbol:e})=>!!e))for(let 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,h.oU)(e,t,"meters")}(0,i.Cg)([(0,f.MZ)({type:G.JJ.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:G.JJ.read}}})],gt.prototype,"arriveCurbApproach",void 0),(0,i.Cg)([(0,f.MZ)({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],gt.prototype,"arriveTime",void 0),(0,i.Cg)([(0,f.MZ)()],gt.prototype,"arriveTimeOffset",void 0),(0,i.Cg)([(0,H.w)("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],gt.prototype,"readArriveTimeOffset",null),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.Bearing",read:!1,write:!0}})],gt.prototype,"bearing",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.BearingTol",read:!1,write:!0}})],gt.prototype,"bearingTol",void 0),(0,i.Cg)([(0,f.MZ)()],gt.prototype,"cumulativeCosts",void 0),(0,i.Cg)([(0,H.w)("cumulativeCosts",["attributes"])],gt.prototype,"readCumulativeCosts",null),(0,i.Cg)([(0,f.MZ)()],gt.prototype,"cumulativeDistance",void 0),(0,i.Cg)([(0,f.MZ)()],gt.prototype,"cumulativeDuration",void 0),(0,i.Cg)([(0,f.MZ)({type:G.JJ.apiValues,json:{name:"attributes.CurbApproach",read:{reader:G.JJ.read},write:{writer:G.JJ.write}}})],gt.prototype,"curbApproach",void 0),(0,i.Cg)([(0,f.MZ)({type:G.JJ.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:G.JJ.read}}})],gt.prototype,"departCurbApproach",void 0),(0,i.Cg)([(0,f.MZ)({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],gt.prototype,"departTime",void 0),(0,i.Cg)([(0,f.MZ)()],gt.prototype,"departTimeOffset",void 0),(0,i.Cg)([(0,H.w)("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],gt.prototype,"readDepartTimeOffset",null),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],gt.prototype,"distanceToNetworkInMeters",void 0),(0,i.Cg)([(0,f.MZ)({type:fe.A,json:{write:!0},value:null})],gt.prototype,"geometry",null),(0,i.Cg)([(0,f.MZ)()],gt.prototype,"lateDuration",void 0),(0,i.Cg)([(0,f.MZ)({type:G.EM.apiValues,json:{name:"attributes.LocationType",read:{reader:G.EM.read},write:{writer:G.EM.write}}})],gt.prototype,"locationType",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.Name"}})],gt.prototype,"name",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.NavLatency",read:!1,write:!0}})],gt.prototype,"navLatency",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.ObjectID"}})],gt.prototype,"objectId",void 0),(0,i.Cg)([(0,f.MZ)({type:a.A})],gt.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.PosAlong"}})],gt.prototype,"positionAlong",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.RouteName"}})],gt.prototype,"routeName",void 0),(0,i.Cg)([(0,f.MZ)()],gt.prototype,"serviceCosts",void 0),(0,i.Cg)([(0,H.w)("serviceCosts",["attributes"])],gt.prototype,"readServiceCosts",null),(0,i.Cg)([(0,Y.K)("serviceCosts")],gt.prototype,"writeServiceCosts",null),(0,i.Cg)([(0,f.MZ)()],gt.prototype,"serviceDistance",void 0),(0,i.Cg)([(0,f.MZ)()],gt.prototype,"serviceDuration",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.Sequence"}})],gt.prototype,"sequence",void 0),(0,i.Cg)([(0,f.MZ)({type:G.mt.apiValues,json:{name:"attributes.SideOfEdge",read:{reader:G.mt.read},write:{writer:G.mt.write}}})],gt.prototype,"sideOfEdge",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.SnapX"}}})],gt.prototype,"snapX",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.SnapY"}}})],gt.prototype,"snapY",void 0),(0,i.Cg)([(0,f.MZ)({json:{read:{source:"attributes.SnapZ"}}})],gt.prototype,"snapZ",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.SourceID"}})],gt.prototype,"sourceId",void 0),(0,i.Cg)([(0,f.MZ)({json:{name:"attributes.SourceOID"}})],gt.prototype,"sourceOid",void 0),(0,i.Cg)([(0,f.MZ)({type:G.$r.apiValues,json:{name:"attributes.Status",read:{reader:G.$r.read},write:{writer:G.$r.write}}})],gt.prototype,"status",void 0),(0,i.Cg)([(0,f.MZ)({types:j.Es})],gt.prototype,"symbol",void 0),(0,i.Cg)([(0,f.MZ)({type:Date,json:{name:"attributes.TimeWindowEnd"}})],gt.prototype,"timeWindowEnd",void 0),(0,i.Cg)([(0,Y.K)("timeWindowEnd")],gt.prototype,"writeTimeWindowEnd",null),(0,i.Cg)([(0,f.MZ)()],gt.prototype,"timeWindowEndOffset",void 0),(0,i.Cg)([(0,f.MZ)({type:Date,json:{name:"attributes.TimeWindowStart"}})],gt.prototype,"timeWindowStart",void 0),(0,i.Cg)([(0,Y.K)("timeWindowStart")],gt.prototype,"writeTimeWindowStart",null),(0,i.Cg)([(0,f.MZ)()],gt.prototype,"timeWindowStartOffset",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],gt.prototype,"type",void 0),(0,i.Cg)([(0,f.MZ)()],gt.prototype,"violations",void 0),(0,i.Cg)([(0,H.w)("violations",["attributes"])],gt.prototype,"readViolations",null),(0,i.Cg)([(0,f.MZ)()],gt.prototype,"waitDuration",void 0),(0,i.Cg)([(0,f.MZ)()],gt.prototype,"wait",void 0),(0,i.Cg)([(0,H.w)("wait",["attributes"])],gt.prototype,"readWait",null),gt=ht=(0,i.Cg)([(0,f.$K)("esri.rest.support.Stop")],gt);const Nt=l.A.ofType(Fe),Lt=l.A.ofType(Pe),Dt=l.A.ofType(Ee),Zt=l.A.ofType(Ue),jt=l.A.ofType(ke),Ft=l.A.ofType(gt);let Bt=class extends((0,M.dM)((0,N.j)((0,I.q)((0,O.A)((0,c.M)(A.A)))))){constructor(e){super(e),this._cachedServiceDescription=null,this._featureCollection=null,this._type="Feature Collection",this.checksum=null,this.defaultSymbols=new x,this.directionLines=null,this.directionPoints=null,this.featureCollectionType="route",this.legendEnabled=!1,this.maxScale=0,this.minScale=0,this.pointBarriers=new Dt,this.polygonBarriers=new Zt,this.polylineBarriers=new jt,this.routeInfo=null,this.spatialReference=w.A.WGS84,this.stops=new Ft,this.type="route"}initialize(){let e=()=>{this._setStopSymbol(this.stops)},t=()=>{Mt(this.pointBarriers,this.defaultSymbols.pointBarriers)},r=()=>{Mt(this.polylineBarriers,this.defaultSymbols.polylineBarriers)},i=()=>{Mt(this.polygonBarriers,this.defaultSymbols.polygonBarriers)};this.addHandles([(0,m.on)(()=>this.stops,"change",e,{sync:!0,onListenerAdd:e}),(0,m.on)(()=>this.pointBarriers,"change",t,{sync:!0,onListenerAdd:t}),(0,m.on)(()=>this.polylineBarriers,"change",r,{sync:!0,onListenerAdd:r}),(0,m.on)(()=>this.polygonBarriers,"change",i,{sync:!0,onListenerAdd:i})])}writeFeatureCollectionWebmap(e,t,r,i){let o=[this._writePolygonBarriers(),this._writePolylineBarriers(),this._writePointBarriers(),this._writeRouteInfo(),this._writeDirectionLines(),this._writeDirectionPoints(),this._writeStops()].filter(e=>!!e),s=o.map((e,t)=>t),a="web-map"===i.origin?"featureCollection.layers":"layers";(0,d.sM)(a,o,t),t.opacity=this.opacity,t.visibility=this.visible,t.visibleLayers=s}readDirectionLines(e,t){return this._getNetworkFeatures(t,"DirectionLines",e=>Fe.fromGraphic(e))}readDirectionPoints(e,t){return this._getNetworkFeatures(t,"DirectionPoints",e=>Pe.fromGraphic(e))}get fullExtent(){let e=new v.A({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:w.A.WGS84});if(null!=this.routeInfo?.geometry)return this.routeInfo.geometry.extent??e;if(null==this.stops)return e;let t=this.stops.filter(e=>null!=e.geometry);if(t.length<2)return e;let{spatialReference:r}=t.at(0).geometry;if(null==r)return e;let i=t.toArray().map(e=>{let t=e.geometry;return[t.x,t.y]});return new T.A({points:i,spatialReference:r}).extent}readMaxScale(e,t){return((St(t)?t.layers:t.featureCollection?.layers)?.find(e=>null!=e.layerDefinition.maxScale))?.layerDefinition.maxScale??0}readMinScale(e,t){return((St(t)?t.layers:t.featureCollection?.layers)?.find(e=>null!=e.layerDefinition.minScale))?.layerDefinition.minScale??0}readPointBarriers(e,t){return this._getNetworkFeatures(t,"Barriers",e=>Ee.fromGraphic(e))}readPolygonBarriers(e,t){return this._getNetworkFeatures(t,"PolygonBarriers",e=>Ue.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){let r=St(t)?t.layers:t.featureCollection?.layers;if(!r?.length)return w.A.WGS84;let{layerDefinition:i,featureSet:o}=r[0],s=o.features[0]?.geometry?.spatialReference??o.spatialReference??i.spatialReference??i.extent.spatialReference??S.KK;return w.A.fromJSON(s)}readStops(e,t){return this._getNetworkFeatures(t,"Stops",e=>gt.fromGraphic(e),e=>this._setStopSymbol(e))}get title(){return this.routeInfo?.name??"Route"}set title(e){this._overrideIfSome("title",e)}get url(){return o.A.routeServiceUrl}set url(e){null==e?this._set("url",o.A.routeServiceUrl):this._set("url",(0,L.Jf)(e,p.A.getLogger(this)))}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();let{fullExtent:e,portalItem:t}=this;if(!t)throw new u.A("routelayer:portal-item-not-set","save() requires to the layer to have a portal item");if(!t.id)throw new u.A("routelayer:portal-item-not-saved","Please use saveAs() first to save the routelayer");if("Feature Collection"!==t.type)throw new u.A("routelayer:portal-item-wrong-type",'Portal item needs to have type "Feature Collection"');if(!this.routeInfo)throw new u.A("routelayer:route-unsolved","save() requires a solved route");let{portal:r}=t;await r.signIn(),r.user||await t.reload();let{itemUrl:i,itemControl:o}=t;if("admin"!==o&&"update"!==o)throw new u.A("routelayer:insufficient-permissions","To save this layer, you need to be the owner or an administrator of your organization");let s={messages:[],origin:"portal-item",portal:r,url:i?(0,g.An)(i):void 0,writtenProperties:[]},a=this.write(void 0,s);return t.extent=await At(e),t.title=this.title,await t.update({data:a}),t}async saveAs(e,t={}){if(await this.load(),null==this.routeInfo)throw new u.A("routelayer:route-unsolved","saveAs() requires a solved route");let r=R.default.from(e).clone();r.extent??=await At(this.fullExtent),r.id=null,r.portal??=E.A.getDefault(),r.title??=this.title,r.type="Feature Collection",r.typeKeywords=["Data","Feature Collection",_.mm.MULTI_LAYER,"Route Layer"];let{portal:i}=r,o={messages:[],origin:"portal-item",portal:i,url:null,writtenProperties:[]};await i.signIn();let s=t?.folder,a=this.write(void 0,o);return await i.user.addItem({item:r,folder:s,data:a}),this.portalItem=r,(0,b.v)(o),o.portalItem=r,r}async solve(e,t){ft(this.stops),ft(this.pointBarriers),ft(this.polylineBarriers),ft(this.polygonBarriers);let r=e?.stops??this.stops,i=e?.pointBarriers??Ct(this.pointBarriers),o=e?.polylineBarriers??Ct(this.polylineBarriers),s=e?.polygonBarriers??Ct(this.polygonBarriers);if(null==r)throw new u.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||l.A.isCollection(r)&&r.length<2)throw new u.A("routelayer:insufficent-stops","the route layer must have two or more stops to solve a route.");if(l.A.isCollection(r))for(let e of r)e.routeName=null;let a=e?.apiKey,{checksum:n,url:p}=this,c=await this._getServiceDescription(p,a,t),d=e?.travelMode??c.defaultTravelMode,m=e?.accumulateAttributes??[];d&&(m.push(d.distanceAttributeName),d.timeAttributeName&&m.push(d.timeAttributeName));let h,g={accumulateAttributes:m,checksum:n,directionsOutputType:"featuresets",ignoreInvalidLocations:!0,pointBarriers:i,polylineBarriers:o,polygonBarriers:s,preserveObjectID:!0,returnBarriers:!!i,returnDirections:!0,returnPolygonBarriers:!!s,returnPolylineBarriers:!!o,returnRoutes:!0,returnStops:!0,stops:r},f=yt.from(e??{});f.set(g);try{h=await Ze(p,f,t)}catch(e){throw(0,y.zf)(e)?e:new u.A("routelayer:failed-route-request","the routing request failed",{error:e})}let b=this._toRouteLayerSolution(h);return this._isOverridden("title")||(this.title=b.routeInfo.name??"Route"),this._populatePortalFields(b,c,f),b}update(e){let{checksum:t,directionLines:r,directionPoints:i,pointBarriers:o,polygonBarriers:s,polylineBarriers:a,routeInfo:n,stops:l}=e;bt(l,this.stops)?function(e,t){for(let r of e){let 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}),Tt(o,this.pointBarriers)&&(bt(o,this.pointBarriers)?function(e,t){for(let r of e){let 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)}}(o,this.pointBarriers):this.set({pointBarriers:o})),Tt(a,this.polylineBarriers)&&(bt(a,this.polylineBarriers)?function(e,t){for(let r of e){let 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)}}(a,this.polylineBarriers):this.set({polylineBarriers:a})),Tt(s,this.polygonBarriers)&&(bt(s,this.polygonBarriers)?function(e,t){for(let r of e){let 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.polygonBarriers):this.set({polygonBarriers:s})),this.set({checksum:t}),this._set("directionLines",r),this._set("directionPoints",i),this._set("routeInfo",n),n.geometry&&(this.spatialReference=n.geometry.spatialReference)}_getNetworkFeatures(e,t,r,i){let o=(St(e)?e.layers:e.featureCollection?.layers)?.find(e=>e.layerDefinition.name===t);if(null==o)return new l.A;let{layerDefinition:n,popupInfo:u,featureSet:p}=o,c=n.drawingInfo.renderer,{features:d}=p,y=p.spatialReference??n.spatialReference??n.extent.spatialReference??S.KK,m=c&&(0,U.L)(c),h=w.A.fromJSON(y),g=d.map(e=>{let i=s.A.fromJSON(e);i.geometry&&e.geometry&&null==e.geometry.spatialReference&&(i.geometry.spatialReference=h);let o=r(i);return o.symbol??=m?.getSymbol(i)??this._getNetworkSymbol(t),o.popupTemplate??=u&&a.A.fromJSON(u),o});return i&&g.some(({symbol:e})=>!e)&&i(g),new l.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;let i=await te(e,t,r);return this._cachedServiceDescription={serviceDescription:i,url:e},i}_setStopSymbol(e){let t=l.A.isCollection(e)?e.toArray():e;if(!t||!t.length||!this.defaultSymbols.stops||t.every(({symbol:e})=>!!e))return;let{first:r,last:i,middle:o,unlocated:s,waypoint:a,break:u}=this.defaultSymbols.stops,p=t.map(({sequence:e})=>e).filter(n.Ru),c=t.length===p.length;if(!this.routeInfo&&!c||1===t.length)return void t.forEach((e,s)=>{switch(s){case 0:e.symbol=r;break;case t.length-1:e.symbol=i;break;default:e.symbol=o}});let d=Math.min(...p),y=Math.max(...p);for(let e of t)e.symbol=e.sequence===d?r:e.sequence===y?i:this.routeInfo&&"ok"!==e.status&&"not-located-on-closest"!==e.status?s:"waypoint"===e.locationType?a:"break"===e.locationType?u:o}_toRouteLayerSolution(e){let{checksum:t,routeResults:r}=e,i=r[0].stops?.map(e=>gt.fromJSON(e.toJSON()));this._setStopSymbol(i);let o=new Ft(i),s=new Zt(e.polygonBarriers?.map(e=>Ue.fromJSON(e.toJSON())));Mt(s,this.defaultSymbols.polygonBarriers);let a=new jt(e.polylineBarriers?.map(e=>ke.fromJSON(e.toJSON())));Mt(a,this.defaultSymbols.polylineBarriers);let n=new Dt(e.pointBarriers?.map(e=>Ee.fromJSON(e.toJSON())));Mt(n,this.defaultSymbols.pointBarriers);let l=r[0].route?.toJSON(),u=Ve.fromJSON(l);u.symbol=this.defaultSymbols.routeInfo;let p=new Lt(r[0].directionPoints?.features.map(e=>Pe.fromJSON(e.toJSON())));Mt(p,this.defaultSymbols.directionPoints);let c=new Nt(r[0].directionLines?.features.map(e=>Fe.fromJSON(e.toJSON())));return Mt(c,this.defaultSymbols.directionLines),{checksum:t,directionLines:c,directionPoints:p,pointBarriers:n,polygonBarriers:s,polylineBarriers:a,routeInfo:u,stops:o}}_writeDirectionLines(){return this._writeNetworkFeatures(this.directionLines,this.defaultSymbols.directionLines,"esriGeometryPolyline",Fe.fields,"DirectionLines","Direction Lines")}_writeDirectionPoints(){return this._writeNetworkFeatures(this.directionPoints,this.defaultSymbols.directionPoints,"esriGeometryPoint",Pe.fields,"DirectionPoints","Direction Points")}_writeNetworkFeatures(e,t,r,i,o,s){if(!e?.length)return null;let a=this.spatialReference.toJSON(),{fullExtent:n,maxScale:l,minScale:u}=this;return{featureSet:{features:e.toArray().map(e=>function(e){let{attributes:t,geometry:r,popupTemplate:i,symbol:o}=e.toGraphic().toJSON();return{attributes:t,geometry:r,popupInfo:i,symbol:o}}(e)),geometryType:r,spatialReference:a},layerDefinition:{capabilities:"Query,Update,Editing",drawingInfo:{renderer:{type:"simple",symbol:t?.toJSON()??wt(r)}},extent:n.toJSON(),fields:i,geometryType:r,hasM:!1,hasZ:!1,maxScale:l,minScale:u,name:o,objectIdField:"ObjectID",spatialReference:a,title:s,type:"Feature Layer",typeIdField:""}}}_writePointBarriers(){return this._writeNetworkFeatures(this.pointBarriers,this.defaultSymbols.pointBarriers,"esriGeometryPoint",Ee.fields,"Barriers","Point Barriers")}_writePolygonBarriers(){return this._writeNetworkFeatures(this.polygonBarriers,this.defaultSymbols.polygonBarriers,"esriGeometryPolygon",Ue.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?null:new l.A([this.routeInfo]),this.defaultSymbols.routeInfo,"esriGeometryPolyline",Ve.fields,"RouteInfo","Route Details")}_writeStops(){let e=this._writeNetworkFeatures(this.stops,null,"esriGeometryPoint",gt.fields,"Stops","Stops");if(null==e)return null;let{stops:t}=this.defaultSymbols,r=t?.first?.toJSON(),i=t?.middle?.toJSON(),o=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:o,label:"Last Stop"}]},e}_populatePortalFields(e,t,r){let i=(t.networkDataset?.networkAttributes)?.filter(({usageType:e})=>"cost"===e)??[],o=r.travelMode??t.defaultTravelMode;if(null==o)return void p.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.");let{timeAttributeName:s,distanceAttributeName:a}=o,n=i.find(({name:e})=>e===s),l=i.find(({name:e})=>e===a),c=r.travelMode?.impedanceAttributeName??r.impedanceAttribute??t.impedance,d=n?.units,y=l?.units;if(!d||!y)throw new u.A("routelayer:unknown-impedance-units","the units of either the distance or time impedance are unknown");let m=r.directionsLanguage??t.directionsLanguage,h=r.accumulateAttributes??t.accumulateAttributeNames??[],g=new Set(i.filter(({name:e})=>e===s||e===a||e===c||null!=e&&h.includes(e)).map(({name:e})=>e)),f=e=>{for(let t in e)g.has(t)||delete e[t]};for(let t of e.pointBarriers)null!=t.costs&&(t.addedCost=t.costs[c]??0,f(t.costs));for(let t of e.polygonBarriers)null!=t.costs&&(t.scaleFactor=t.costs[c]??1,f(t.costs));for(let t of e.polylineBarriers)null!=t.costs&&(t.scaleFactor=t.costs[c]??1,f(t.costs));let{routeInfo:b}=e,{findBestSequence:v,preserveFirstStop:T,preserveLastStop:C,startTimeIsUTC:w,timeWindowsAreUTC:S}=r;b.analysisSettings=new Ge({accumulateAttributes:h,directionsLanguage:m,findBestSequence:v,preserveFirstStop:T,preserveLastStop:C,startTimeIsUTC:w,timeWindowsAreUTC:S,travelMode:o}),b.totalDuration=It(b.totalCosts?.[s]??0,d),b.totalDistance=Ot(b.totalCosts?.[a]??0,y),b.totalLateDuration=It(b.totalViolations?.[s]??0,d),b.totalWaitDuration=It(b.totalWait?.[s]??0,d),null!=b.totalCosts&&f(b.totalCosts),null!=b.totalViolations&&f(b.totalViolations),null!=b.totalWait&&f(b.totalWait);for(let t of e.stops)null!=t.serviceCosts&&(t.serviceDuration=It(t.serviceCosts[s]??0,d),t.serviceDistance=Ot(t.serviceCosts[a]??0,y),f(t.serviceCosts)),null!=t.cumulativeCosts&&(t.cumulativeDuration=It(t.cumulativeCosts[s]??0,d),t.cumulativeDistance=Ot(t.cumulativeCosts[a]??0,y),f(t.cumulativeCosts)),null!=t.violations&&(t.lateDuration=It(t.violations[s]??0,d),f(t.violations)),null!=t.wait&&(t.waitDuration=It(t.wait[s]??0,d),f(t.wait))}};(0,i.Cg)([(0,f.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}}}}}}})],Bt.prototype,"_featureCollection",void 0),(0,i.Cg)([(0,Y.K)(["web-map","portal-item"],"_featureCollection")],Bt.prototype,"writeFeatureCollectionWebmap",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{target:"type",overridePolicy(){return{ignoreOrigin:null!=this.portalItem}}}}}}})],Bt.prototype,"_type",void 0),(0,i.Cg)([(0,f.MZ)({type:String})],Bt.prototype,"checksum",void 0),(0,i.Cg)([(0,f.MZ)({nonNullable:!0,type:x})],Bt.prototype,"defaultSymbols",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],Bt.prototype,"directionLines",void 0),(0,i.Cg)([(0,H.w)(["web-map","portal-item"],"directionLines",["layers","featureCollection.layers"])],Bt.prototype,"readDirectionLines",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],Bt.prototype,"directionPoints",void 0),(0,i.Cg)([(0,H.w)(["web-map","portal-item"],"directionPoints",["layers","featureCollection.layers"])],Bt.prototype,"readDirectionPoints",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1,origins:{"web-map":{write:{ignoreOrigin:!0}}}}})],Bt.prototype,"featureCollectionType",void 0),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],Bt.prototype,"fullExtent",null),(0,i.Cg)([(0,f.MZ)({json:{origins:{"web-map":{name:"featureCollection.showLegend"}},write:!0}})],Bt.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,f.MZ)({type:["show","hide"]})],Bt.prototype,"listMode",void 0),(0,i.Cg)([(0,f.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],Bt.prototype,"maxScale",void 0),(0,i.Cg)([(0,H.w)(["web-map","portal-item"],"maxScale",["layers","featureCollection.layers"])],Bt.prototype,"readMaxScale",null),(0,i.Cg)([(0,f.MZ)({type:Number,nonNullable:!0,json:{write:!1}})],Bt.prototype,"minScale",void 0),(0,i.Cg)([(0,H.w)(["web-map","portal-item"],"minScale",["layers","featureCollection.layers"])],Bt.prototype,"readMinScale",null),(0,i.Cg)([(0,f.MZ)({type:["ArcGISFeatureLayer"],value:"ArcGISFeatureLayer"})],Bt.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,f.MZ)({nonNullable:!0,type:l.A.ofType(Ee)})],Bt.prototype,"pointBarriers",void 0),(0,i.Cg)([(0,H.w)(["web-map","portal-item"],"pointBarriers",["layers","featureCollection.layers"])],Bt.prototype,"readPointBarriers",null),(0,i.Cg)([(0,f.MZ)({nonNullable:!0,type:l.A.ofType(Ue)})],Bt.prototype,"polygonBarriers",void 0),(0,i.Cg)([(0,H.w)(["web-map","portal-item"],"polygonBarriers",["layers","featureCollection.layers"])],Bt.prototype,"readPolygonBarriers",null),(0,i.Cg)([(0,f.MZ)({nonNullable:!0,type:l.A.ofType(ke)})],Bt.prototype,"polylineBarriers",void 0),(0,i.Cg)([(0,H.w)(["web-map","portal-item"],"polylineBarriers",["layers","featureCollection.layers"])],Bt.prototype,"readPolylineBarriers",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0})],Bt.prototype,"routeInfo",void 0),(0,i.Cg)([(0,H.w)(["web-map","portal-item"],"routeInfo",["layers","featureCollection.layers"])],Bt.prototype,"readRouteInfo",null),(0,i.Cg)([(0,f.MZ)({type:w.A})],Bt.prototype,"spatialReference",void 0),(0,i.Cg)([(0,H.w)(["web-map","portal-item"],"spatialReference",["layers","featureCollection.layers"])],Bt.prototype,"readSpatialReference",null),(0,i.Cg)([(0,f.MZ)({nonNullable:!0,type:l.A.ofType(gt)})],Bt.prototype,"stops",void 0),(0,i.Cg)([(0,H.w)(["web-map","portal-item"],"stops",["layers","featureCollection.layers"])],Bt.prototype,"readStops",null),(0,i.Cg)([(0,f.MZ)()],Bt.prototype,"title",null),(0,i.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Bt.prototype,"type",void 0),(0,i.Cg)([(0,f.MZ)()],Bt.prototype,"url",null),Bt=(0,i.Cg)([(0,f.$K)("esri.layers.RouteLayer")],Bt);const Pt=Bt},76369(e,t,r){r.d(t,{LF:()=>w,M9:()=>S});var i=r(49186),o=r(93637),s=r(40876),a=r(59247),n=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,i=e.find(e=>e.source===this.location.source);i&&(r=i.text.split(/\r\n|\n|\r/g));let o=this.location.start,s=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,a=this.location.source+":"+s.line+":"+s.column;if(r){let e=this.location.end,i="".padEnd(s.line.toString().length," "),n=r[o.line-1],l=(o.line===e.line?e.column:n.length+1)-o.column||1;t+="\n --\x3e "+a+"\n"+i+" |\n"+s.line+" | "+n+"\n"+i+" | "+"".padEnd(o.column-1," ")+"".padEnd(l,"^")}else t+="\n at "+a}return t}static buildMessage(e,t){function r(e){return e.codePointAt(0).toString(16).toUpperCase()}let i=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function o(e){return i?e.replace(i,e=>"\\u{"+r(e)+"}"):e}function s(e){return o(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 a(e){return o(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)))}let n={literal:e=>'"'+s(e.text)+'"',class(e){let t=e.parts.map(e=>Array.isArray(e)?a(e[0])+"-"+a(e[1]):a(e));return"["+(e.inverted?"^":"")+t.join("")+"]"+(e.unicode?"u":"")},any:()=>"any character",end:()=>"end of input",other:e=>e.description};function l(e){return n[e.type](e)}return"Expected "+function(e){let 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?'"'+s(e)+'"':"end of input"}(t)+" found."}}function u(e){if(!e||0===e.length)return null;if("string"==typeof e){let t=p(e);return t&&0!==t.length?t:null}let 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,n.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,n.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){let r,i={},o=(t=void 0===t?{}:t).grammarSource,s={start:ae},a=ae,n="none",u="grad",p="turn",c=/^[ \t\n\r]/,d=/^[a-z\-]/,y=/^[0-9a-fA-F]/,m=/^[+\-]/,h=/^[0-9]/,g=re("none"),f=ee("none",!1),b=ee(")",!1),v=ee(",",!1),T=te([" ","\t","\n","\r"],!1,!1,!1),C=re("function"),w=ee("(",!1),S=re("identifier"),A=te([["a","z"],"-"],!1,!1,!1),M=re("percentage"),I=ee("%",!1),O=re("length"),N=ee("px",!1),L=ee("cm",!1),D=ee("mm",!1),Z=ee("in",!1),j=ee("pt",!1),F=ee("pc",!1),B=re("angle"),P=ee("deg",!1),x=ee("rad",!1),E=ee("grad",!1),R=ee("turn",!1),_=re("number"),U=re("color"),J=ee("#",!1),k=te([["0","9"],["a","f"],["A","F"]],!1,!1,!1),G=te(["+","-"],!1,!1,!1),W=te([["0","9"]],!1,!1,!1),V=ee(".",!1),q=ee("e",!1),$=0|t.peg$currPos,K=$,z=[{line:1,column:1}],H=$,Y=t.peg$maxFailExpected||[],Q=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in s))throw Error("Can't start parsing from rule \""+t.startRule+'".');a=s[t.startRule]}function X(){return e.substring(K,$)}function ee(e,t){return{type:"literal",text:e,ignoreCase:t}}function te(e,t,r,i){return{type:"class",parts:e,inverted:t,ignoreCase:r,unicode:i}}function re(e){return{type:"other",description:e}}function ie(t){let r,i=z[t];if(i)return i;if(t>=z.length)r=z.length-1;else for(r=t;!z[--r];);for(i=z[r],i={line:i.line,column:i.column};r<t;)10===e.charCodeAt(r)?(i.line++,i.column=1):i.column++,r++;return z[t]=i,i}function oe(e,t,r){let i=ie(e),s=ie(t);return{source:o,start:{offset:e,line:i.line,column:i.column},end:{offset:t,line:s.line,column:s.column}}}function se(e){$<H||($>H&&(H=$,Y=[]),Y.push(e))}function ae(){let e;return e=ne(),e===i&&(e=function(){let e,t;if(e=[],t=le(),t!==i)for(;t!==i;)e.push(t),t=le();else e=i;return e}()),e}function ne(){let t,r;return Q++,t=$,pe(),e.substr($,4)===n?(r=n,$+=4):(r=i,0===Q&&se(f)),r===i?($=t,t=i):(pe(),K=t,t=[]),Q--,t===i&&0===Q&&se(g),t}function le(){let t,r,o,s;return t=$,pe(),r=function(){let t,r,o;return Q++,t=$,r=ce(),r===i?($=t,t=i):(40===e.charCodeAt($)?(o="(",$++):(o=i,0===Q&&se(w)),o===i?($=t,t=i):(K=t,t=r)),Q--,t===i&&(r=i,0===Q&&se(C)),t}(),r===i?($=t,t=i):(pe(),o=function(){let t,r,o,s,a,n,l,u;if(t=$,r=ue(),r!==i){for(o=[],s=$,a=pe(),44===e.charCodeAt($)?(n=",",$++):(n=i,0===Q&&se(v)),n===i&&(n=null),l=pe(),u=ue(),u===i?($=s,s=i):(a=[a,n,l,u],s=a);s!==i;)o.push(s),s=$,a=pe(),44===e.charCodeAt($)?(n=",",$++):(n=i,0===Q&&se(v)),n===i&&(n=null),l=pe(),u=ue(),u===i?($=s,s=i):(a=[a,n,l,u],s=a);K=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]}(r,o)}else $=t,t=i;return t}(),o===i&&(o=null),pe(),41===e.charCodeAt($)?(s=")",$++):(s=i,0===Q&&se(b)),s===i?($=t,t=i):(pe(),K=t,t=function(e,t){return{type:"function",name:e,parameters:t||[]}}(r,o))),t}function ue(){let e,t;return e=$,t=de(),t===i&&(t=ye(),t===i&&(t=me(),t===i&&(t=function(){let e,t;return Q++,e=$,pe(),t=ge(),t===i?($=e,e=i):(K=e,e=function(e){return{value:e,unit:null}}(t)),Q--,e===i&&0===Q&&se(_),e}()))),t!==i&&(K=e,t=function(e){return{type:"quantity",value:e.value,unit:e.unit}}(t)),e=t,e===i&&(e=$,t=he(),t!==i&&(K=e,t=function(e){return{type:"color",colorType:e.type,value:e.value}}(t)),e=t),e}function pe(){let t,r;for(Q++,t=[],r=e.charAt($),c.test(r)?$++:(r=i,0===Q&&se(T));r!==i;)t.push(r),r=e.charAt($),c.test(r)?$++:(r=i,0===Q&&se(T));return Q--,t}function ce(){let t,r,o;if(Q++,t=$,r=[],o=e.charAt($),d.test(o)?$++:(o=i,0===Q&&se(A)),o!==i)for(;o!==i;)r.push(o),o=e.charAt($),d.test(o)?$++:(o=i,0===Q&&se(A));else r=i;return r!==i&&(K=t,r=X()),t=r,Q--,t===i&&(r=i,0===Q&&se(S)),t}function de(){let t,r,o;return Q++,t=$,pe(),r=ge(),r===i?($=t,t=i):(37===e.charCodeAt($)?(o="%",$++):(o=i,0===Q&&se(I)),o===i?($=t,t=i):(K=t,t=function(e){return{value:e,unit:"%"}}(r))),Q--,t===i&&0===Q&&se(M),t}function ye(){let t,r,o;return Q++,t=$,pe(),r=ge(),r===i?($=t,t=i):("px"===e.substr($,2)?(o="px",$+=2):(o=i,0===Q&&se(N)),o===i?($=t,t=i):(K=t,t=function(e){return{value:e,unit:"px"}}(r))),t===i&&(t=$,pe(),r=ge(),r===i?($=t,t=i):("cm"===e.substr($,2)?(o="cm",$+=2):(o=i,0===Q&&se(L)),o===i?($=t,t=i):(K=t,t=function(e){return{value:e,unit:"cm"}}(r))),t===i&&(t=$,pe(),r=ge(),r===i?($=t,t=i):("mm"===e.substr($,2)?(o="mm",$+=2):(o=i,0===Q&&se(D)),o===i?($=t,t=i):(K=t,t=function(e){return{value:e,unit:"mm"}}(r))),t===i&&(t=$,pe(),r=ge(),r===i?($=t,t=i):("in"===e.substr($,2)?(o="in",$+=2):(o=i,0===Q&&se(Z)),o===i?($=t,t=i):(K=t,t=function(e){return{value:e,unit:"in"}}(r))),t===i&&(t=$,pe(),r=ge(),r===i?($=t,t=i):("pt"===e.substr($,2)?(o="pt",$+=2):(o=i,0===Q&&se(j)),o===i?($=t,t=i):(K=t,t=function(e){return{value:e,unit:"pt"}}(r))),t===i&&(t=$,pe(),r=ge(),r===i?($=t,t=i):("pc"===e.substr($,2)?(o="pc",$+=2):(o=i,0===Q&&se(F)),o===i?($=t,t=i):(K=t,t=function(e){return{value:e,unit:"pc"}}(r)))))))),Q--,t===i&&0===Q&&se(O),t}function me(){let t,r,o;return Q++,t=$,r=ge(),r===i?($=t,t=i):("deg"===e.substr($,3)?(o="deg",$+=3):(o=i,0===Q&&se(P)),o===i?($=t,t=i):(K=t,t=function(e){return{value:e,unit:"deg"}}(r))),t===i&&(t=$,r=ge(),r===i?($=t,t=i):("rad"===e.substr($,3)?(o="rad",$+=3):(o=i,0===Q&&se(x)),o===i?($=t,t=i):(K=t,t=function(e){return{value:e,unit:"rad"}}(r))),t===i&&(t=$,r=ge(),r===i?($=t,t=i):(e.substr($,4)===u?(o=u,$+=4):(o=i,0===Q&&se(E)),o===i?($=t,t=i):(K=t,t=function(e){return{value:e,unit:"grad"}}(r))),t===i&&(t=$,r=ge(),r===i?($=t,t=i):(e.substr($,4)===p?(o=p,$+=4):(o=i,0===Q&&se(R)),o===i?($=t,t=i):(K=t,t=function(e){return{value:e,unit:"turn"}}(r)))))),Q--,t===i&&(r=i,0===Q&&se(B)),t}function he(){let t,r,o,s;if(Q++,t=$,35===e.charCodeAt($)?(r="#",$++):(r=i,0===Q&&se(J)),r!==i){if(o=[],s=e.charAt($),y.test(s)?$++:(s=i,0===Q&&se(k)),s!==i)for(;s!==i;)o.push(s),s=e.charAt($),y.test(s)?$++:(s=i,0===Q&&se(k));else o=i;o===i?($=t,t=i):(K=t,t={type:"hex",value:X()})}else $=t,t=i;return t===i&&(t=$,r=le(),r!==i&&(K=t,r=function(e){return{type:"function",value:e}}(r)),t=r,t===i&&(t=$,r=ce(),r!==i&&(K=t,r={type:"named",value:X()}),t=r)),Q--,t===i&&(r=i,0===Q&&se(U)),t}function ge(){let t,r,o,s,a,n,l,u;for(t=$,r=e.charAt($),m.test(r)?$++:(r=i,0===Q&&se(G)),r===i&&(r=null),o=$,s=[],a=e.charAt($),h.test(a)?$++:(a=i,0===Q&&se(W));a!==i;)s.push(a),a=e.charAt($),h.test(a)?$++:(a=i,0===Q&&se(W));if(46===e.charCodeAt($)?(a=".",$++):(a=i,0===Q&&se(V)),a!==i){if(n=[],l=e.charAt($),h.test(l)?$++:(l=i,0===Q&&se(W)),l!==i)for(;l!==i;)n.push(l),l=e.charAt($),h.test(l)?$++:(l=i,0===Q&&se(W));else n=i;n===i?($=o,o=i):(s=[s,a,n],o=s)}else $=o,o=i;if(o===i)if(o=[],s=e.charAt($),h.test(s)?$++:(s=i,0===Q&&se(W)),s!==i)for(;s!==i;)o.push(s),s=e.charAt($),h.test(s)?$++:(s=i,0===Q&&se(W));else o=i;if(o!==i){if(s=$,101===e.charCodeAt($)?(a="e",$++):(a=i,0===Q&&se(q)),a!==i){if(n=e.charAt($),m.test(n)?$++:(n=i,0===Q&&se(G)),n===i&&(n=null),l=[],u=e.charAt($),h.test(u)?$++:(u=i,0===Q&&se(W)),u!==i)for(;u!==i;)l.push(u),u=e.charAt($),h.test(u)?$++:(u=i,0===Q&&se(W));else l=i;l===i?($=s,s=i):(a=[a,n,l],s=a)}else $=s,s=i;s===i&&(s=null),K=t,t=parseFloat(X())}else $=t,t=i;return t}r=a();let fe=r!==i&&$===e.length;function be(){throw r!==i&&$<e.length&&se({type:"end"}),function(e,t,r){return new l(l.buildMessage(e,t),e,t,r)}(Y,H<e.length?function(t=$){let r=e.codePointAt(t);return void 0===r?"":String.fromCodePoint(r)}(H):null,H<e.length?oe(H,H+1):oe(H,H))}return t.peg$library?{peg$result:r,peg$currPos:$,peg$FAILED:i,peg$maxFailExpected:Y,peg$maxFailPos:H,peg$success:fe,peg$throw:fe?void 0:be}:fe?r:void be()}(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=g(e.parameters[0])),new a.yG(e.name,t)}(e);case"opacity":return function(e){let t=1;return c(e.parameters,1),1===e.parameters.length&&(t=g(e.parameters[0])),new a.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!=m[e.unit]))throw new i.A("effect:type-error",`Expected <angle>, Actual: ${d(e)}`,{term:e})}(e),e.value*m[e.unit]||0}(e.parameters[0])),new a.Nd(t)}(e);case"blur":return function(e){let t=0;return c(e.parameters,1),1===e.parameters.length&&(t=f(e.parameters[0]),y(t,e.parameters[0])),new a.Fk(t)}(e);case"drop-shadow":return function(e){let t=[],r=null;for(let o of e.parameters)if("color"===o.type){if(t.length&&Object.freeze(t),r)throw new i.A("effect:type-error","Accepts only one color",{});r=b(o)}else{let e=f(o);if(Object.isFrozen(t))throw new i.A("effect:type-error","<length> parameters not consecutive",{lengths:t});t.push(e),3===t.length&&y(e,o)}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 a.$b(t[0],t[1],t[2]||0,r||v("black"))}(e);case"bloom":return function(e){let t=1,r=0,i=0;return c(e.parameters,3),e.parameters[0]&&(t=g(e.parameters[0])),e.parameters[1]&&(r=f(e.parameters[1]),y(r,e.parameters[1])),e.parameters[2]&&(i=g(e.parameters[2])),new a.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 h)return"<length>";if(e.unit in m)return"<angle>";if("%"===e.unit)return"<percentage>"}return"<double>"}function y(e,t){if(e<0)throw new i.A("effect:type-error",`Negative values are not allowed, Actual: ${e}`,{term:t})}const m={deg:1,grad:.9,rad:180/Math.PI,turn:360},h={px:1,cm:96/2.54,mm:96/2.54/10,in:96,pc:16,pt:96/72};function g(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);let t=e.value;return y(t,e),"%"===e.unit?.01*t:t}function f(e){return function(e){if("quantity"!==e.type||!(0===e.value&&null===e.unit||e.unit&&null!=h[e.unit]))throw new i.A("effect:type-error",`Expected <length>, Actual: ${d(e)}`,{term:e})}(e),e.value*h[e.unit]||0}function b(e){switch(e.colorType){case"hex":return(0,s.j5)(e.value);case"named":return v(e.value);case"function":return function(e){if(c(e.parameters,4),T.test(e.name))return[g(e.parameters[0]),g(e.parameters[1]),g(e.parameters[2]),e.parameters[3]?g(e.parameters[3]):1];if(C.test(e.name))return(0,s.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),y(e.value,e),e.value}(e.parameters[0]),g(e.parameters[1]),g(e.parameters[2]),e.parameters[3]?g(e.parameters[3]):1);throw new i.A("effect:syntax-error",`Invalid color function '${e.name}'`,{colorFunction:e})}(e.value)}}function v(e){if(!(0,s.V6)(e))throw new i.A("effect:unknown-color",`color '${e}' isn't valid`,{namedColor:e});return(0,s.c4)(e)}const T=/^rgba?/i,C=/^hsla?/i;function w(e,t,r){try{return function(e){if(!e||0===e.length)return null;if(function(e){let t=e[0];return!!t&&"scale"in t}(e)){let t=[];for(let r of e)t.push({scale:r.scale,value:A(r.value)});return t}return A(e)}(e)}catch(e){r?.messages?.push(e)}return null}function S(e,t,r,i){try{let i=function(e){let t=u(e);return t?(0,n.dw)(t)?t.map(e=>e.toJSON()):t.map(({scale:e,effects:t})=>({scale:e,value:t.map(e=>e.toJSON())})):null}(e);(0,o.sM)(r,i,t)}catch(e){i.messages&&i.messages.push(e)}}function A(e){if(!e?.length)return"";let t=[];for(let r of e){let e=[];switch(r.type){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":case"opacity":e=[M(r,"amount")];break;case"blur":e=[M(r,"radius","pt")];break;case"hue-rotate":e=[M(r,"angle","deg")];break;case"drop-shadow":e=[M(r,"xoffset","pt"),M(r,"yoffset","pt"),M(r,"blurRadius","pt"),I(r,"color")];break;case"bloom":e=[M(r,"strength"),M(r,"radius","pt"),M(r,"threshold")]}let i=`${r.type}(${e.filter(Boolean).join(" ")})`;u(i),t.push(i)}return t.join(" ")}function M(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});let r=e[t];return`rgba(${r[0]||0}, ${r[1]||0}, ${r[2]||0}, ${r[3]/255||0})`}},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":{let r=[];for(let i of t.fieldNames)r.push(e.attributes[i]??null);return JSON.stringify(r)}}}function o(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];let 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:()=>o})},63074(e,t,r){var i=r(32198),o=r(91429),s=r(89317),a=r(76369);const n={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".split("."),nonNullable:!0,json:{read:!1,write:!1,origins:{"web-map":{read:!0,write:{layerContainerTypes:s.K}},"portal-item":{read:!0,write:{layerContainerTypes:s.K}}}}},l={read:{reader:a.LF},write:{allowNull:!0,writer:a.M9,layerContainerTypes:s.K}},u={json:{read:!1,write:!1,origins:{"web-map":l,"portal-item":l}}};r.d(t,["LF",0,u,"dM",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.blendMode="normal",this.effect=null}};return(0,i.Cg)([(0,o.MZ)(n)],r.prototype,"blendMode",void 0),(0,i.Cg)([(0,o.MZ)(u)],r.prototype,"effect",void 0),r=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.BlendLayer")],r),r},"sU",0,n])},34287(e,t,r){var i=r(32198),o=r(49186),s=r(84952),a=r(91429),n=r(78888),l=r(89317),u=r(45917),p=r(49422),c=r(10873),d=r(6345),y=r(79677),m=r(59923),h=r(36005),g=r(43937);r.d(t,["q",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,t,r){return"Group Layer"===r?.portalItem?.type?void 0:e}writeListMode(e,t,r,i){(i&&"ground"===i.layerContainerType||e&&(0,p.R)(this,r,{},i))&&(t[r]=e)}writeOperationalLayerType(e,t,r){e&&(t[r]=e)}writeTitle(e,t){t.title=e??"Layer"}readVisibilityTimeExtent(e){return e?y.A.fromArray(e):null}writeVisibilityTimeExtent(e,t,r,i){e&&"tables"!==i.layerContainerType&&(e.isEmpty?i?.messages&&i.messages.push(new o.A("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):t[r]=e.toArray())}read(e,t){t&&(t.layer=this),(0,u.t)(this,e,t=>super.read(e,t),t)}write(e,t){if(!this.persistenceEnabled&&!t?.ignorePersistenceEnabled)return null;if(t?.origin&&!(0,d.Bu)(t,this.operationalLayerType,this.type))return(0,m.U4)(t,this),null;let r=super.write(e,{...t,layer:this}),i=!!t&&!!t.messages&&!!t.messages.filter(e=>e instanceof o.A&&"web-document-write:property-required"===e.name).length;return(0,s.w8)(r?.url)?(t?.messages?.push(new o.A("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&i?null:r}beforeSave(){}};return(0,i.Cg)([(0,a.MZ)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],r.prototype,"id",void 0),(0,i.Cg)([(0,h.w)("id",["id"])],r.prototype,"readId",null),(0,i.Cg)([(0,a.MZ)(c.C1)],r.prototype,"listMode",void 0),(0,i.Cg)([(0,g.K)("listMode")],r.prototype,"writeListMode",null),(0,i.Cg)([(0,a.MZ)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:l.K,isRequired:!0}}}}})],r.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,g.K)("operationalLayerType")],r.prototype,"writeOperationalLayerType",null),(0,i.Cg)([(0,a.MZ)(c.ke)],r.prototype,"opacity",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,readOnly:!1})],r.prototype,"persistenceEnabled",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],r.prototype,"title",void 0),(0,i.Cg)([(0,g.K)("title"),(0,g.K)(["web-scene"],"title")],r.prototype,"writeTitle",null),(0,i.Cg)([(0,a.MZ)({type:y.A,json:{origins:{"web-scene":{write:{layerContainerTypes:l.K}}}}})],r.prototype,"visibilityTimeExtent",void 0),(0,i.Cg)([(0,h.w)("visibilityTimeExtent")],r.prototype,"readVisibilityTimeExtent",null),(0,i.Cg)([(0,g.K)(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[n.jz,n.Uv]]}})],r.prototype,"writeVisibilityTimeExtent",null),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{name:"visibility",write:{layerContainerTypes:l.K}}})],r.prototype,"visible",void 0),r=(0,i.Cg)([(0,a.$K)("esri.layers.mixins.OperationalLayer")],r),r}])},8303(e,t,r){var i=r(32198),o=r(92602),s=r(70333),a=r(56507),n=r(60999),l=r(49186),u=r(36563),p=r(53966),c=r(97768),d=r(17676),y=r(84952),m=r(91429),h=r(77548),g=r(20655),f=r(80812),b=r(41318),v=r(10407),T=r(36005),C=r(43937);const w={credential:null,user:null};r.d(t,["A",0,e=>{let t=e,S=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.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,r){if(t.itemId)return new f.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{let{load:i}=await r.e(1204).then(()=>r(41204));return(0,d.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,d.zf)(e)||p.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e,t){if(!this.loaded||!this.portalItem?.id)return!1;let i=t?.signal?null:new AbortController;try{let{reload:o}=await r.e(1204).then(()=>r(41204));return i&&this.addHandles((0,u.rE)(i),"reloadFromPortal"),await o({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t?.signal?t:{signal:i.signal})}catch(e){throw(0,d.zf)(e)||p.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{i&&this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,d.QP)(e),!0)))}async setUserPrivileges(e,t){if(!o.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{let{features:{edit:r,fullEdit:i},content:{updateItem:o}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",o)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);let i,o,a=!s.id?.findCredential(this.url),n=e===r.id;if(n&&r.portal.user)return this._getUserPrivileges(r,a);if(n)i=r.portal.url;else try{i=await(0,h.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!i||!(0,y.b8)(i,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{let e=null==t?null:t.signal;o=await(s.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(n?await r.reload():(r=new f.default({id:e,portal:{url:i}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,a)}catch(e){(0,d.QP)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}_getUserPrivileges(e,t){let 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,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){let t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;let r=w.credential===t?w.user:await this._fetchEditingUser(e);return w.credential=t,w.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){let t=this.portalItem?.portal?.user;if(t)return t;let r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;let i=`${r.owningSystemUrl}/sharing/rest`,o=g.A.getDefault();if(o&&o.loaded&&(0,y.S8)(o.restUrl)===(0,y.S8)(i))return o.user;let l=`${i}/community/self`,u=null==e?null:e.signal,p=await(0,n.Ke)((0,a.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?b.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){let r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||g.A.getDefault());return r&&i&&!(0,y.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:f.default})],S.prototype,"portalItem",null),(0,i.Cg)([(0,T.w)("web-document","portalItem",["itemId"])],S.prototype,"readPortalItem",null),(0,i.Cg)([(0,C.K)("web-document","portalItem",{itemId:{type:String}})],S.prototype,"writePortalItem",null),(0,i.Cg)([(0,m.MZ)({clonable:!1})],S.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],S.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],S.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],S.prototype,"userHasUpdateItemPrivileges",void 0),S=(0,i.Cg)([(0,m.$K)("esri.layers.mixins.PortalLayer")],S),S}])},25036(e,t,r){var i=r(32198),o=r(91429),s=r(83960);r.d(t,["j",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){let e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;void 0!==t?.effectiveScaleRange&&(0,s.RH)(e,t.effectiveScaleRange);let r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,o.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.ScaleRangeLayer")],r),r}])},6345(e,t,r){r.d(t,{Bu:()=>v,VH:()=>b});var i=r(44208);const o={ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},s={ArcGISAnnotationLayer:"AnnotationFeatureLayer",ArcGISDimensionLayer:"DimensionFeatureLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISImageServiceVectorLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",ArcGISVideoLayer:"VideoLayer",BingMapsAerial:"BingMapsLayer",BingMapsHybrid:"BingMapsLayer",BingMapsRoad:"BingMapsLayer",CatalogLayer:"CatalogLayer",CSV:"CSVLayer",GeoJSON:"GeoJSONLayer",GeoRSS:"GeoRSSLayer",GroupLayer:"GroupLayer",KML:"KMLLayer",KnowledgeGraphLayer:"KnowledgeGraphLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",OrientedImageryLayer:"OrientedImageryLayer",get ParquetLayer(){return(0,i.A)("parquetlayer-persistence-enabled")?"ParquetLayer":"UnsupportedLayer"},SubtypeGroupLayer:"SubtypeGroupLayer",VectorTileLayer:"VectorTileLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},a={ArcGISFeatureLayer:"FeatureLayer",SubtypeGroupTable:"SubtypeGroupLayer"},n={ArcGISImageServiceLayer:"UnsupportedLayer",ArcGISMapServiceLayer:"UnsupportedLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",OpenStreetMap:"OpenStreetMapLayer",VectorTileLayer:"VectorTileLayer",WCS:"UnsupportedLayer",WMS:"UnsupportedLayer",WebTiledLayer:"WebTileLayer"},l={IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer"},u={ArcGISTiledElevationServiceLayer:"ElevationLayer",RasterDataElevationLayer:"UnsupportedLayer"},p={ArcGISDimensionLayer:"DimensionLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISTiledElevationServiceLayer:"ElevationLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",ArcGISTiledMapServiceLayer:"TileLayer",BuildingSceneLayer:"BuildingSceneLayer",CSV:"CSVLayer",CatalogLayer:"CatalogLayer",GaussianSplatLayer:"GaussianSplatLayer",GeoJSON:"GeoJSONLayer",GroupLayer:"GroupLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",IntegratedMeshLayer:"IntegratedMeshLayer",KML:"KMLLayer",LineOfSightLayer:"LineOfSightLayer",MediaLayer:"MediaLayer",OGCFeatureLayer:"OGCFeatureLayer",Object3DTilesLayer:"UnsupportedLayer",OrientedImageryLayer:"OrientedImageryLayer",PointCloudLayer:"PointCloudLayer",RasterDataLayer:"UnsupportedLayer",VectorTileLayer:"VectorTileLayer",ViewshedLayer:"ViewshedLayer",Voxel:"VoxelLayer",WCS:"WCSLayer",WFS:"WFSLayer",WMS:"WMSLayer",WebTiledLayer:"WebTileLayer"},c={ArcGISFeatureLayer:"FeatureLayer"},d={...s,LinkChartLayer:"LinkChartLayer"},y=o,m=a,h={ArcGISAnnotationLayer:"AnnotationFeatureLayer",ArcGISDimensionLayer:"DimensionFeatureLayer",ArcGISFeatureLayer:"FeatureLayer",ArcGISImageServiceLayer:"ImageryLayer",ArcGISMapServiceLayer:"MapImageLayer",ArcGISSceneServiceLayer:"SceneLayer",ArcGISStreamLayer:"StreamLayer",ArcGISTiledImageServiceLayer:"ImageryTileLayer",BuildingSceneLayer:"BuildingSceneLayer",IntegratedMesh3DTilesLayer:"IntegratedMesh3DTilesLayer",IntegratedMeshLayer:"IntegratedMeshLayer",MediaLayer:"MediaLayer",OrientedImageryLayer:"OrientedImageryLayer",PointCloudLayer:"PointCloudLayer",SubtypeGroupLayer:"SubtypeGroupLayer",WCS:"WCSLayer"},g=a;function f(e){switch(e.origin){case"web-scene":switch(e.layerContainerType){case"basemap-base-layers":return n;case"basemap-ground-layers":return l;case"ground":return u;case"tables":return c;default:return p}case"link-chart":switch(e.layerContainerType){case"basemap-base-layers":return y;case"tables":return m;default:return d}default:switch(e.layerContainerType){case"basemap-base-layers":return o;case"tables":return a;case"ground":case"basemap-ground-layers":return;default:return s}}}function b(e,t){if(!t)return"UnknownLayer";if("DefaultTileLayer"===t){let t="UnknownLayer";if("web-scene"===e.origin)switch(e.layerContainerType){case"operational-layers":case"basemap-base-layers":t="TileLayer";break;case"ground":t="ElevationLayer"}else switch(e.layerContainerType){case"basemap-base-layers":case"operational-layers":t="TileLayer"}return t}return f(e)?.[t]??"UnknownLayer"}function v(e,t,r){if(!e?.origin)return!1;switch(e.origin){case"web-map":case"link-chart":if("operational-layers"===e.layerContainerType&&"ArcGISDimensionLayer"===t&&"dimension-feature"!==r)return!1;break;case"web-scene":if("operational-layers"===e.layerContainerType)switch(t){case"ArcGISDimensionLayer":if("dimension"!==r)return!1;break;case"ArcGISTiledElevationServiceLayer":return!1}break;case"portal-item":if("ArcGISDimensionLayer"===t&&"dimension-feature"!==r)return!1}let i=function(e){if("portal-item"===e.origin)switch(e.layerContainerType){case"basemap-base-layers":case"ground":case"basemap-ground-layers":return;case"tables":return g;default:return h}return f(e)}(e)?.[t];return null!=i&&"UnknownLayer"!==i&&"UnsupportedLayer"!==i}},10407(e,t,r){r.d(t,{It:()=>y,LG:()=>a,OM:()=>u,Sm:()=>p,Y:()=>n,bK:()=>l,sQ:()=>c});var i=r(99917),o=r(16930),s=r(28735);function a(e,t){if(!n(e,t)){let r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function n(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return n(e,d.HOSTED_SERVICE)}function u(e,t){let r=e.typeKeywords;if(r){let e=r.indexOf(t);e>-1&&r.splice(e,1)}}function p(e,t,r){r?a(e,t):u(e,t)}async function c(e){let t,r=e.clone().normalize();if(r.length>1)for(let e of r)t?e.width>t.width&&(t=e):t=e;else t=r[0];return async function(e){let t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.ci)(e);let r=o.A.WGS84;return await(0,i.initializeProjection)(t,r),(0,i.project)(e,r)}(t)}const d={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",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",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function y(e){let{portal:t,isOrgItem:r,itemControl:i}=e,o=t.user?.privileges,s=!o||o.includes("features:user:edit"),a=!!r&&!!o?.includes("features:user:fullEdit"),n="update"===i||"admin"===i;return n?a=s=!0:a&&(s=!0),{features:{edit:s,fullEdit:a},content:{updateItem:n}}}r.d(t,["mm",0,d])},96576(e,t,r){r.d(t,{A:()=>c});var i,o=r(32198),s=r(4718),a=r(91429),n=r(92438),l=r(63988),u=r(49849),p=r(93223);let c=i=class extends((0,l.h)(n.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]:[]}get arcadeRequired(){return this.arcadeRequiredForVisualVariables}clone(){return new i({description:this.description,label:this.label,symbol:(0,s.o8)(this.symbol),visualVariables:(0,s.o8)(this.visualVariables),authoringInfo:(0,s.o8)(this.authoringInfo)})}};(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"description",void 0),(0,o.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"label",void 0),(0,o.Cg)([(0,a.MZ)(u.Wp)],c.prototype,"symbol",void 0),(0,o.Cg)([(0,p.e)({simple:"simple"})],c.prototype,"type",void 0),c=i=(0,o.Cg)([(0,a.$K)("esri.renderers.SimpleRenderer")],c)},73681(e,t,r){r.d(t,{n:()=>l});var i=r(49186),o=r(53966),s=r(46140),a=r(95466),n=r(55674);class l{static async from(e,t,r){let a=e.dictionary_version?s.A.parse(e.dictionary_version):null,p=new Set(e.itemsNames),c={};if(t)for(let e in t)c[e]=t[e];if(e.authoringInfo.configuration)for(let t of e.authoringInfo.configuration)c.hasOwnProperty(t.name)||(c[t.name]=t.value);let d=new Set(e.authoringInfo.symbol);for(let e of Object.keys(r))d.delete(e);d.size&&o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:d});let y=await(0,n.xR)(e.expression,null,c);if(!y)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");let m=!a||!a.greaterEqual(4,0);m&&o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:a});let h=new u(r,m);return new l(m,p,y,h)}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){o.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new a.A(e);let t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new a.A(t)}}class u extends n.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){let t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);let t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},65494(e,t,r){r.d(t,{L:()=>l,r:()=>a});var i=r(90360),o=r(41214),s=r(59923);function a(e,t){return l(e,null,t)}const n=(0,i.C)({types:o.Hg});function l(e,t,r){return e?e&&(e.styleName||e.styleUrl)&&"uniqueValue"!==e.type?((0,s.Yc)(r,"warning","renderer",`Only UniqueValueRenderer can be referenced from a web style, but found '${e.type}'`,{definition:e}),null):n(e,t,r):null}},22671(e,t,r){r.d(t,{A:()=>b});var i,o=r(32198),s=r(52106),a=r(66552),n=r(25482),l=r(4718),u=r(91429),p=r(16930),c=r(60408),d=r(65864),y=r(50498),m=r(20437),h=r(36005),g=r(43937);const f=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=i=class extends n.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,s.A)}writeGeometryType(e,t,r,i){if(e)return void f.write(e,t,r,i);let{features:o}=this;if(o)for(let e of o)if(null!=e?.geometry)return void f.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;let r=!!e.spatialReference,i=(0,d.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=p.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());let{features:r}=this;if(r)for(let e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,l.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){let t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){let i=t.features[r];i.geometry&&=(e?.[r])?.toJSON()||i.geometry}return t}quantize(e){let{scale:[t,r],translate:[i,o]}=e,s=this.features,a=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((o-e)/r));for(let e=0,t=s.length;e<t;e++)a?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){let{geometryType:e,features:t,transform:r}=this;if(!r)return this;let{translate:[i,o],scale:[s,a]}=r,n=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){let{translate:[,,e],scale:[,,t]}=r;n=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){let{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}let u=this._getHydrationFunction(e,e=>e*s+i,e=>o-e*a,n,l);for(let{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){let i=p.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){let s=e[t],a=r.fromJSON(s),n=s.geometry?.spatialReference;null!=a.geometry&&!n&&(a.geometry.spatialReference=i);let l=s.aggregateGeometries,u=a.aggregateGeometries;if(l&&null!=u)for(let e in u){let t=u[e],r=l[e]?.spatialReference;null!=t&&!r&&(t.spatialReference=i)}o.push(a)}return o}_quantizePoints(e,t,r){let i,o,s=[];for(let a=0,n=e.length;a<n;a++){let n=e[a];if(a>0){let e=t(n[0]),a=r(n[1]);(e!==i||a!==o)&&(s.push([e-i,a-o]),i=e,o=a)}else i=t(n[0]),o=r(n[1]),s.push([i,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{let i=(0,c.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,s=i.length;e<s;e++){let s=i[e],a=this._quantizePoints(s,t,r);a&&o.push(a)}return o.length>0?((0,c.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{let i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{let s,a,n=(0,c.Bi)(e)?e.rings:e.paths;for(let e=0,i=n.length;e<i;e++){let i=n[e];for(let e=0,o=i.length;e<o;e++){let o=i[e];e>0?(s+=o[0],a+=o[1]):(s=o[0],a=o[1]),o[0]=t(s),o[1]=r(a)}}if(i&&o)for(let e=0,t=n.length;e<t;e++){let t=n[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2]),r[3]=o(r[3])}}else if(i)for(let e=0,t=n.length;e<t;e++){let t=n[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=i(r[2])}}else if(o)for(let e=0,t=n.length;e<t;e++){let t=n[e];for(let e=0,r=t.length;e<r;e++){let r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{let s,a,n=e.points;for(let e=0,i=n.length;e<i;e++){let i=n[e];e>0?(s+=i[0],a+=i[1]):(s=i[0],a=i[1]),i[0]=t(s),i[1]=r(a)}if(i&&o)for(let e=0,t=n.length;e<t;e++){let t=n[e];t[2]=i(t[2]),t[3]=o(t[3])}else if(i)for(let e=0,t=n.length;e<t;e++){let t=n[e];t[2]=i(t[2])}else if(o)for(let e=0,t=n.length;e<t;e++){let t=n[e];t[2]=o(t[2])}}:null}};(0,o.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,o.Cg)([(0,u.MZ)({type:[s.A],json:{write:!0}})],b.prototype,"features",void 0),(0,o.Cg)([(0,h.w)("features")],b.prototype,"readFeatures",null),(0,o.Cg)([(0,u.MZ)({type:[m.A],json:{write:!0}})],b.prototype,"fields",void 0),(0,o.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:f.read}}})],b.prototype,"geometryType",void 0),(0,o.Cg)([(0,g.K)("geometryType")],b.prototype,"writeGeometryType",null),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,o.Cg)([(0,u.MZ)({types:y.yR,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,o.Cg)([(0,h.w)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,o.Cg)([(0,u.MZ)({type:p.A,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,o.Cg)([(0,g.K)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,o.Cg)([(0,u.MZ)({json:{write:!0}})],b.prototype,"transform",void 0),b=i=(0,o.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0},37807(e,t,r){var i=r(32198),o=r(66552),s=r(25482),a=r(91429);const n=new o.J({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let l=class extends s.o{constructor(e){super(e),this.description=null,this.type=null}};(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],l.prototype,"description",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{read:n.read,write:n.write}})],l.prototype,"type",void 0),l=(0,i.Cg)([(0,a.$K)("esri.rest.support.GPMessage")],l);const u=l;r.d(t,["A",0,u])},2073(e,t,r){var i=r(66552);const o={esriCentimeters:"centimeters",esriDecimalDegrees:"decimal-degrees",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriPoints:"points",esriUnknownUnits:"unknown",esriYards:"yards"},s=(0,i.O)()(o),a=(0,i.O)()({...o,esriIntFeet:"international-feet",esriIntInches:"international-inches",esriIntMiles:"international-miles",esriIntNauticalMiles:"international-nautical-miles",esriIntYards:"international-yards"}),n=(0,i.O)()({esriAcres:"international-acres",esriAcresUS:"us-acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-international-feet",esriSquareFeetUS:"square-us-feet",esriSquareInches:"square-international-inches",esriSquareInchesUS:"square-us-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-international-miles",esriSquareMilesUS:"square-us-miles",esriSquareMillimeters:"square-millimeters",esriSquareYards:"square-international-yards",esriSquareYardsUS:"square-us-yards",esriUnknownAreaUnits:"unknown"}),l=(0,i.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards"}),u=(0,i.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards",esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds",esriNAUKilometersPerHour:"kilometers-per-hour",esriNAUMilesPerHour:"miles-per-hour",esriNAUUnknown:"unknown"}),p=(0,i.O)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),c=(0,i.O)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),d=((0,i.O)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,i.O)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),y=((0,i.O)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,i.O)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,i.O)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),m=(0,i.O)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),h=(0,i.O)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),g=(0,i.O)()({0:"ok",1:"not-located",2:"network-element-not-located",3:"element-not-traversable",4:"invalid-field-values",5:"not-reached",6:"time-window-violation",7:"not-located-on-closest"},{useNumericKeys:!0}),f=(0,i.O)()({1:"right",2:"left"},{useNumericKeys:!0}),b=(0,i.O)()({0:"restriction",1:"scaled-cost",2:"added-cost"},{useNumericKeys:!0}),v=(0,i.O)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),T=(0,i.O)()({1:"header",50:"arrive",51:"depart",52:"straight",100:"on-ferry",101:"off-ferry",102:"central-fork",103:"roundabout",104:"u-turn",150:"door",151:"stairs",152:"elevator",153:"escalator",154:"pedestrian-ramp",200:"left-fork",201:"left-ramp",202:"clockwise-roundabout",203:"left-handed-u-turn",204:"bear-left",205:"left-turn",206:"sharp-left",207:"left-turn-and-immediate-left-turn",208:"left-turn-and-immediate-right-turn",300:"right-fork",301:"right-ramp",302:"counter-clockwise-roundabout",303:"right-handed-u-turn",304:"bear-right",305:"right-turn",306:"sharp-right",307:"right-turn-and-immediate-left-turn",308:"right-turn-and-immediate-right-turn",400:"up-elevator",401:"up-escalator",402:"up-stairs",500:"down-elevator",501:"down-escalator",502:"down-stairs",1e3:"general-event",1001:"landmark",1002:"time-zone-change",1003:"traffic-event",1004:"scaled-cost-barrier-event",1005:"boundary-crossing",1006:"restriction-violation",1007:"lane"},{useNumericKeys:!0}),C=(0,i.O)()({0:"unknown",1:"segment",2:"maneuver-segment",3:"restriction-violation",4:"scaled-cost-barrier",5:"heavy-traffic",6:"slow-traffic",7:"moderate-traffic"},{useNumericKeys:!0}),w=(0,i.O)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),S=(0,i.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),A=(0,i.O)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),M=(0,i.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),I=(0,i.O)()({"Any Hazmat Prohibited":"any-hazmat-prohibited","Avoid Carpool Roads":"avoid-carpool-roads","Avoid Express Lanes":"avoid-express-lanes","Avoid Ferries":"avoid-ferries","Avoid Gates":"avoid-gates","Avoid Limited Access Roads":"avoid-limited-access-roads","Avoid Private Roads":"avoid-private-roads","Avoid Roads Unsuitable for Pedestrians":"avoid-roads-unsuitable-for-pedestrians","Avoid Stairways":"avoid-stairways","Avoid Toll Roads":"avoid-toll-roads","Avoid Toll Roads for Trucks":"avoid-toll-roads-for-trucks","Avoid Truck Restricted Roads":"avoid-truck-restricted-roads","Avoid Unpaved Roads":"avoid-unpaved-roads","Axle Count Restriction":"axle-count-restriction","Driving a Bus":"driving-a-bus","Driving a Taxi":"driving-a-taxi","Driving a Truck":"driving-a-truck","Driving an Automobile":"driving-an-automobile","Driving an Emergency Vehicle":"driving-an-emergency-vehicle","Height Restriction":"height-restriction","Kingpin to Rear Axle Length Restriction":"kingpin-to-rear-axle-length-restriction","Length Restriction":"length-restriction","Preferred for Pedestrians":"preferred-for-pedestrians","Riding a Motorcycle":"riding-a-motorcycle","Roads Under Construction Prohibited":"roads-under-construction-prohibited","Semi or Tractor with One or More Trailers Prohibited":"semi-or-tractor-with-one-or-more-trailers-prohibited","Single Axle Vehicles Prohibited":"single-axle-vehicles-prohibited","Tandem Axle Vehicles Prohibited":"tandem-axle-vehicles-prohibited","Through Traffic Prohibited":"through-traffic-prohibited","Truck with Trailers Restriction":"truck-with-trailers-restriction","Use Preferred Hazmat Routes":"use-preferred-hazmat-routes","Use Preferred Truck Routes":"use-preferred-truck-routes",Walking:"walking","Weight Restriction":"weight-restriction"},{ignoreUnknown:!1}),O=(0,i.O)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),N=(0,i.O)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),L=(0,i.O)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),D=(0,i.O)()({esriDSTAltName:"alt-name",esriDSTArrive:"arrive",esriDSTBranch:"branch",esriDSTCrossStreet:"cross-street",esriDSTCumulativeLength:"cumulative-length",esriDSTDepart:"depart",esriDSTEstimatedArrivalTime:"estimated-arrival-time",esriDSTExit:"exit",esriDSTGeneral:"general",esriDSTLength:"length",esriDSTServiceTime:"service-time",esriDSTStreetName:"street-name",esriDSTSummary:"summary",esriDSTTime:"time",esriDSTTimeWindow:"time-window",esriDSTToward:"toward",esriDSTViolationTime:"violation-time",esriDSTWaitTime:"wait-time"});r.d(t,["$n",0,w,"$r",0,g,"EM",0,h,"Ec",0,D,"JJ",0,m,"Mm",0,A,"OC",0,I,"Sr",0,c,"UO",0,n,"Vj",0,N,"WU",0,L,"Y8",0,a,"Z7",0,l,"_6",0,T,"aJ",0,p,"dd",0,S,"dn",0,u,"et",0,M,"fe",0,v,"gD",0,C,"hE",0,d,"hY",0,s,"iM",0,b,"mt",0,f,"ow",0,y,"vS",0,O])},2272(e,t,r){r.d(t,{Dl:()=>u,gf:()=>c,jV:()=>l,lF:()=>p});var i=r(92602),o=r(70333),s=r(4718),a=r(84952),n=r(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,a.An)(e):(0,s.o8)(e)}function p(e,t,r){let i={};for(let o in e){if("declaredClass"===o)continue;let s=e[o];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))i[o]=s.map(e=>p(e));else if("object"==typeof s)if(s.toJSON){let e=s.toJSON(r?.[o]);i[o]=t?e:JSON.stringify(e)}else i[o]=t?s:JSON.stringify(s);else i[o]=s}return i}async function c(e,t,s){return function(e,t){return e?t&&(0,n.Qc)(e)?t:(0,n.getApiKey)(e)??o.id?.findCredential(e)?.token:null}(e,t)||(!o.id&&i.A.request.useIdentity&&await Promise.all([r.e(6361),r.e(7644),r.e(7715)]).then(()=>r(50148)),(await o.id.getCredential(e,s))?.token)}},93470(e,t,r){const i=[252,146,31,255],o={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},s={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i};r.d(t,["Cb",0,o,"HW",0,{type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},"JR",0,[153,153,153,255],"JZ",0,{type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},"WR",0,{type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},"b6",0,{type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null},"fT",0,i,"nC",0,{type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},"yM",0,s])}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8247],{78247(e,t,i){i.d(t,{A:()=>pe});var n,o=i(32198),s=i(69540),r=i(25482),p=i(3483),l=i(91429),a=i(36005);let u=n=class extends r.o{constructor(e){super(e),this.expression=null,this.name=null,this.returnType="boolean",this.title=null}clone(){return new n({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}};(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"expression",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,o.Cg)([(0,l.MZ)({type:["boolean","date","dictionary","number","string"],json:{write:!0}})],u.prototype,"returnType",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"title",void 0),u=n=(0,o.Cg)([(0,l.$K)("esri.form.ExpressionInfo")],u);const y=u;var m=i(4718),d=i(79901),c=i(43937),h=i(28787),g=i(78888);let w=class extends((0,s.OU)(r.o)){constructor(){super(...arguments),this.type=null}};(0,o.Cg)([(0,l.MZ)()],w.prototype,"type",void 0),w=(0,o.Cg)([(0,l.$K)("esri.form.elements.inputs.attachments.Input")],w);const C=w,x=["any","capture","upload"];let M=class extends C{constructor(e){super(e),this.type="audio",this.inputMethod="any",this.maxDuration=null}};(0,o.Cg)([(0,l.MZ)({type:["audio"],readOnly:!0,json:{write:!0}})],M.prototype,"type",void 0),(0,o.Cg)([(0,l.MZ)({type:x,json:{write:!0}})],M.prototype,"inputMethod",void 0),(0,o.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],M.prototype,"maxDuration",void 0),M=(0,o.Cg)([(0,l.$K)("esri.form.elements.inputs.attachments.AudioInput")],M);const v=M;let f=class extends C{constructor(e){super(e),this.type="document",this.maxFileSize=null}};(0,o.Cg)([(0,l.MZ)({type:["document"],readOnly:!0,json:{write:!0}})],f.prototype,"type",void 0),(0,o.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],f.prototype,"maxFileSize",void 0),f=(0,o.Cg)([(0,l.$K)("esri.form.elements.inputs.attachments.DocumentInput")],f);const b=f;let Z=class extends C{constructor(e){super(e),this.type="image",this.inputMethod="any",this.maxImageSize=null}};(0,o.Cg)([(0,l.MZ)({type:["image"],readOnly:!0,json:{write:!0}})],Z.prototype,"type",void 0),(0,o.Cg)([(0,l.MZ)({type:x,json:{write:!0}})],Z.prototype,"inputMethod",void 0),(0,o.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],Z.prototype,"maxImageSize",void 0),Z=(0,o.Cg)([(0,l.$K)("esri.form.elements.inputs.attachments.ImageInput")],Z);const j=Z;let E=class extends C{constructor(e){super(e),this.type="video",this.inputMethod="any",this.maxDuration=null}};(0,o.Cg)([(0,l.MZ)({type:["video"],readOnly:!0,json:{write:!0}})],E.prototype,"type",void 0),(0,o.Cg)([(0,l.MZ)({type:x,json:{write:!0}})],E.prototype,"inputMethod",void 0),(0,o.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],E.prototype,"maxDuration",void 0),E=(0,o.Cg)([(0,l.$K)("esri.form.elements.inputs.attachments.VideoInput")],E);const S=E;let T=class extends C{constructor(e){super(e),this.type="signature",this.inputMethod="any"}};(0,o.Cg)([(0,l.MZ)({type:["signature"],readOnly:!0,json:{write:!0}})],T.prototype,"type",void 0),(0,o.Cg)([(0,l.MZ)({type:x,json:{write:!0}})],T.prototype,"inputMethod",void 0),T=(0,o.Cg)([(0,l.$K)("esri.form.elements.inputs.attachments.SignatureInput")],T);const K=T;function N(e){return{nestableTypes:{base:C,key:"type",typeMap:{audio:v,document:b,image:j,signature:K,video:S}},allTypes:{base:C,key:"type",typeMap:{attachment:e,audio:v,document:b,image:j,signature:K,video:S}}}}let A=class extends C{constructor(e){super(e),this.type="attachment",this.attachmentAssociationType="exact"}get inputTypes(){return this._get("inputTypes")??null}set inputTypes(e){this._set("inputTypes",e)}castInputs(e){return i=I,(t=e)?t.map(e=>(0,g.aq)(i.nestableTypes,e)):null;var t,i}readInputs(e,t){let i=function(e,t){if(!e)return null;let i=t.nestableTypes.typeMap;return e.filter(e=>i[e.type]).map(e=>i[e.type].fromJSON(e))}(t.inputTypes,I);return null==i||Array.isArray(i)&&i.length<1?[new j,new b,new S,new v]:i}writeInputs(e,t){(null==e||Array.isArray(e)&&e.length<1)&&(e=[new j,new b,new S,new v]),t.inputTypes=function(e,t){if(!e)return null;let i=t.nestableTypes.typeMap;return e.filter(e=>i[e.type]).map(e=>e.toJSON())}(e,I)}};(0,o.Cg)([(0,l.MZ)({type:["attachment"],readOnly:!0,json:{write:!0}})],A.prototype,"type",void 0),(0,o.Cg)([(0,l.MZ)({type:["any","exact","exactOrNone"],json:{write:!0}})],A.prototype,"attachmentAssociationType",void 0),(0,o.Cg)([(0,l.MZ)({json:{write:{isRequired:!0,writerEnsuresNonNull:!0}}})],A.prototype,"inputTypes",null),(0,o.Cg)([(0,l.wg)("inputTypes")],A.prototype,"castInputs",null),(0,o.Cg)([(0,a.w)("inputTypes")],A.prototype,"readInputs",null),(0,o.Cg)([(0,c.K)("inputTypes")],A.prototype,"writeInputs",null),A=(0,o.Cg)([(0,l.$K)("esri.form.elements.inputs.attachments.AttachmentInput")],A);const I=N(A);var O;const k=N(A);let R=O=class extends h.A{constructor(e){super(e),this.allowUserRename=!0,this.attachmentKeyword=null,this.displayFilename=!1,this.editableExpression=null,this.filenameExpression='StandardizeFilename(`${$formElement.attachmentKeyword}_${Text(Now(), "YMMDDHHmmss")}`)',this.input=null,this.maxAttachmentCount=null,this.minAttachmentCount=null,this.type="attachment",this.useOriginalFilename=!0}clone(){return new O({allowUserRename:this.allowUserRename,attachmentKeyword:this.attachmentKeyword,description:this.description,displayFilename:this.displayFilename,editableExpression:this.editableExpression,filenameExpression:this.filenameExpression,input:this.input?.clone(),label:this.label,maxAttachmentCount:this.maxAttachmentCount,minAttachmentCount:this.minAttachmentCount,useOriginalFilename:this.useOriginalFilename,visibilityExpression:this.visibilityExpression})}};(0,o.Cg)([(0,l.MZ)({type:Boolean,json:{write:!0}})],R.prototype,"allowUserRename",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:{isRequired:!0}}})],R.prototype,"attachmentKeyword",void 0),(0,o.Cg)([(0,l.MZ)({type:Boolean,json:{write:!0}})],R.prototype,"displayFilename",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],R.prototype,"editableExpression",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],R.prototype,"filenameExpression",void 0),(0,o.Cg)([(0,l.MZ)({types:k.allTypes,json:{read:{source:"inputType"},write:{target:"inputType",isRequired:!0}}})],R.prototype,"input",void 0),(0,o.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],R.prototype,"maxAttachmentCount",void 0),(0,o.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],R.prototype,"minAttachmentCount",void 0),(0,o.Cg)([(0,l.MZ)({type:["attachment"],readOnly:!0,json:{read:!1,write:!0}})],R.prototype,"type",void 0),(0,o.Cg)([(0,l.MZ)({type:Boolean,json:{write:!0}})],R.prototype,"useOriginalFilename",void 0),R=O=(0,o.Cg)([(0,l.$K)("esri.form.elements.AttachmentElement")],R);const $=R;var F,V=i(89909),L=i(49852);let B=F=class extends h.A{constructor(e){super(e),this.displayCount=null,this.displayType="list",this.editableExpression=null,this.orderByFields=null,this.relationshipId=null,this.type="relationship"}clone(){return new F({description:this.description,displayCount:this.displayCount,displayType:this.displayType,editableExpression:this.editableExpression,label:this.label,orderByFields:(0,m.o8)(this.orderByFields),relationshipId:this.relationshipId,visibilityExpression:this.visibilityExpression})}};(0,o.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],B.prototype,"displayCount",void 0),(0,o.Cg)([(0,l.MZ)({type:["list"],json:{write:!0}})],B.prototype,"displayType",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],B.prototype,"editableExpression",void 0),(0,o.Cg)([(0,l.MZ)({type:[L.A],json:{write:!0}})],B.prototype,"orderByFields",void 0),(0,o.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],B.prototype,"relationshipId",void 0),(0,o.Cg)([(0,l.MZ)({type:["relationship"],json:{read:!1,write:!0}})],B.prototype,"type",void 0),B=F=(0,o.Cg)([(0,l.$K)("esri.form.elements.RelationshipElement")],B);const D=B;var q;let W=q=class extends h.A{constructor(e){super(e),this.text=null,this.textFormat="plain-text",this.type="text"}clone(){return new q({text:this.text,textFormat:this.textFormat,visibilityExpression:this.visibilityExpression})}};(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],W.prototype,"text",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],W.prototype,"textFormat",void 0),(0,o.Cg)([(0,l.MZ)({type:["text"],readOnly:!0,json:{read:!1,write:!0}})],W.prototype,"type",void 0),W=q=(0,o.Cg)([(0,l.$K)("esri.form.elements.TextElement")],W);const G=W;var U=i(83342);let _=class extends((0,s.OU)(h.A)){constructor(e){super(e),this.associationTypes=null,this.editableExpression=null,this.type="utilityNetworkAssociations"}};(0,o.Cg)([(0,l.MZ)({type:[U.A],json:{write:{isRequired:!0}}})],_.prototype,"associationTypes",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],_.prototype,"editableExpression",void 0),(0,o.Cg)([(0,l.MZ)({type:["utilityNetworkAssociations"],json:{read:!1,write:!0}})],_.prototype,"type",void 0),_=(0,o.Cg)([(0,l.$K)("esri.form.elements.UtilityNetworkAssociationsElement")],_);const z=_,P=e=>"field"===e.type,H=e=>"group"===e.type,J=e=>"text"===e.type;function Y(e){return{typesWithGroup:{base:h.A,key:"type",typeMap:{attachment:$,field:V.A,group:e,relationship:D,text:G,utilityNetworkAssociations:z}},typesWithoutGroup:{base:h.A,key:"type",typeMap:{attachment:$,field:V.A,relationship:D,text:G,utilityNetworkAssociations:z}}}}function Q(e,t,i=!0){if(!e)return null;let n=i?t.typesWithGroup.typeMap:t.typesWithoutGroup.typeMap;return e.filter(e=>n[e.type]).map(e=>n[e.type].fromJSON(e))}function X(e,t,i=!0){if(!e)return null;let n=i?t.typesWithGroup.typeMap:t.typesWithoutGroup.typeMap;return e.filter(e=>n[e.type]).map(e=>e.toJSON())}function ee(e,t,i=!0){return e?e.map(e=>(0,g.aq)(i?t.typesWithGroup:t.typesWithoutGroup,e)):null}var te;let ie=te=class extends h.A{constructor(e){super(e),this.initialState="expanded",this.type="group"}get elements(){return this._get("elements")??null}set elements(e){this._set("elements",e)}castElements(e){return ee(e,ne,!1)}readElements(e,t){return Q(t.formElements,ne,!1)}writeElements(e,t){t.formElements=X(e,ne,!1)}clone(){return new te({description:this.description,elements:(0,m.o8)(this.elements),initialState:this.initialState,label:this.label,visibilityExpression:this.visibilityExpression})}};(0,o.Cg)([(0,l.MZ)({json:{write:!0}})],ie.prototype,"elements",null),(0,o.Cg)([(0,d.w)("elements")],ie.prototype,"castElements",null),(0,o.Cg)([(0,a.w)("elements",["formElements"])],ie.prototype,"readElements",null),(0,o.Cg)([(0,c.K)("elements")],ie.prototype,"writeElements",null),(0,o.Cg)([(0,l.MZ)({type:["collapsed","expanded"],json:{write:!0}})],ie.prototype,"initialState",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{read:!1,write:!0}})],ie.prototype,"type",void 0),ie=te=(0,o.Cg)([(0,l.$K)("esri.form.elements.GroupElement")],ie);const ne=Y(ie),oe=ie;var se=i(30524);const re=Y(oe);let pe=class extends((0,s.OU)(r.o)){constructor(e){super(e),this.description=null,this.expressionInfos=null,this.preserveFieldValuesWhenHidden=!1,this.supportsAttachmentElements=!1,this.title=null}get elements(){return this._get("elements")??null}set elements(e){this._set("elements",e)}castElements(e){return ee(e,re)}readElements(e,t){return Q(t.formElements,re)}writeElements(e,t){t.formElements=X(e,re)}async getFieldsUsed(e,t){let i=new Set,{description:n,elements:o,expressionInfos:s,title:r}=this;if(ue(i,e,n),ue(i,e,r),!o)return[];let p=function(e,t){if(!t||0===t.length)return[];let i=ae(e),n=[];for(let e of t)i.has(e.name)&&n.push(e.expression);return n}(o,s).map(t=>(0,se.Dx)(i,e,null,t));await Promise.all(p);for(let n of o)le(i,{fieldsIndex:e,relationships:t},n);return Array.from(i).sort()}};function le(e,t,i){let{fieldsIndex:n}=t;if(n?.fields.length!==e.size)switch(ue(e,n,i.label),ue(e,n,i.description),i.type){case"field":(0,se.rq)(e,n,i.fieldName);break;case"group":i.elements.forEach(i=>le(e,t,i));break;case"relationship":if(t.relationships){let o=t.relationships.find(e=>e.id===i.relationshipId);o&&(0,se.rq)(e,n,o.keyField)}(0,se._w)(e,n,i.orderByFields?.map(e=>e.field));break;case"text":ue(e,n,i.text)}}function ae(e){let t=new Set;for(let i of e)if((0,p.kb)(t,i.visibilityExpression),!J(i))if(H(i))(0,p.FB)(t,ae(i.elements));else if((0,p.kb)(t,i.editableExpression),P(i)){let{requiredExpression:e,valueExpression:n}=i;(0,p.FB)(t,[e,n])}return t}function ue(e,t,i){(0,se._w)(e,t,(0,se.nw)(i))}(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],pe.prototype,"description",void 0),(0,o.Cg)([(0,l.MZ)({json:{write:!0}})],pe.prototype,"elements",null),(0,o.Cg)([(0,l.wg)("elements")],pe.prototype,"castElements",null),(0,o.Cg)([(0,a.w)("elements",["formElements"])],pe.prototype,"readElements",null),(0,o.Cg)([(0,c.K)("elements")],pe.prototype,"writeElements",null),(0,o.Cg)([(0,l.MZ)({type:[y],json:{write:!0}})],pe.prototype,"expressionInfos",void 0),(0,o.Cg)([(0,l.MZ)({type:Boolean,json:{default:!1,write:!0}})],pe.prototype,"preserveFieldValuesWhenHidden",void 0),(0,o.Cg)([(0,l.MZ)({type:Boolean,json:{default:!1,write:!0}})],pe.prototype,"supportsAttachmentElements",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],pe.prototype,"title",void 0),pe=(0,o.Cg)([(0,l.$K)("esri.form.FormTemplate")],pe)},28787(e,t,i){i.d(t,{A:()=>p});var n=i(32198),o=i(25482),s=i(10107),r=i(64108);let p=class extends o.o{constructor(e){super(e),this.description=null,this.label=null,this.type=null,this.visibilityExpression=null}};(0,n.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],p.prototype,"description",void 0),(0,n.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],p.prototype,"label",void 0),(0,n.Cg)([(0,s.MZ)()],p.prototype,"type",void 0),(0,n.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],p.prototype,"visibilityExpression",void 0),p=(0,n.Cg)([(0,r.$)("esri.form.elements.Element")],p)},89909(e,t,i){i.d(t,{A:()=>de});var n=i(32198),o=i(91429),s=i(28787),r=i(25482);let p=class extends r.o{constructor(e){super(e),this.type=null}};(0,n.Cg)([(0,o.MZ)()],p.prototype,"type",void 0),p=(0,n.Cg)([(0,o.$K)("esri.form.elements.inputs.Input")],p);const l=p;let a=class extends l{constructor(e){super(e),this.maxLength=null,this.minLength=0}};(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],a.prototype,"maxLength",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],a.prototype,"minLength",void 0),a=(0,n.Cg)([(0,o.$K)("esri.form.elements.inputs.TextInput")],a);const u=a;var y;let m=y=class extends u{constructor(e){super(e),this.type="barcode-scanner"}clone(){return new y({maxLength:this.maxLength,minLength:this.minLength})}};(0,n.Cg)([(0,o.MZ)({type:["barcode-scanner"],json:{read:!1,write:!0}})],m.prototype,"type",void 0),m=y=(0,n.Cg)([(0,o.$K)("esri.form.elements.inputs.BarcodeScannerInput")],m);const d=m;let c=class extends l{constructor(){super(...arguments),this.noValueOptionLabel=null,this.showNoValueOption=!0}};(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],c.prototype,"noValueOptionLabel",void 0),(0,n.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],c.prototype,"showNoValueOption",void 0),c=(0,n.Cg)([(0,o.$K)("esri.form.elements.inputs.SingleChoiceInput")],c);const h=c;var g;let w=g=class extends h{constructor(e){super(e),this.type="combo-box"}clone(){return new g({showNoValueOption:this.showNoValueOption,noValueOptionLabel:this.noValueOptionLabel})}};(0,n.Cg)([(0,o.MZ)({type:["combo-box"],json:{read:!1,write:!0}})],w.prototype,"type",void 0),w=g=(0,n.Cg)([(0,o.$K)("esri.form.elements.inputs.ComboBoxInput")],w);const C=w;var x,M=i(36005),v=i(43937);function f(e){return e??null}function b(e){return e??null}let Z=x=class extends l{constructor(e){super(e),this.max=null,this.min=null,this.type="date-picker"}readMax(e,t){return f(t.max)}writeMax(e,t){t.max=b(e)}readMin(e,t){return f(t.min)}writeMin(e,t){t.min=b(e)}clone(){return new x({max:this.max,min:this.min})}};(0,n.Cg)([(0,o.MZ)({type:String,json:{type:String,write:!0}})],Z.prototype,"max",void 0),(0,n.Cg)([(0,M.w)("max")],Z.prototype,"readMax",null),(0,n.Cg)([(0,v.K)("max")],Z.prototype,"writeMax",null),(0,n.Cg)([(0,o.MZ)({type:String,json:{type:String,write:!0}})],Z.prototype,"min",void 0),(0,n.Cg)([(0,M.w)("min")],Z.prototype,"readMin",null),(0,n.Cg)([(0,v.K)("min")],Z.prototype,"writeMin",null),(0,n.Cg)([(0,o.MZ)({type:["date-picker"],json:{read:!1,write:!0}})],Z.prototype,"type",void 0),Z=x=(0,n.Cg)([(0,o.$K)("esri.form.elements.inputs.DatePickerInput")],Z);const j=Z;var E;function S(e){return e??null}function T(e){return e??null}let K=E=class extends l{constructor(e){super(e),this.includeTimeOffset=!0,this.max=null,this.min=null,this.timeResolution="minutes",this.type="timestampoffset-picker"}readMax(e,t){return S(t.max)}writeMax(e,t){t.max=T(e)}readMin(e,t){return S(t.min)}writeMin(e,t){t.min=T(e)}readTimeResolution(e,t){return S(t.timeResolution)}writeTimeResolution(e,t){t.timeResolution=T(e)}clone(){return new E({includeTimeOffset:this.includeTimeOffset,max:this.max,min:this.min,timeResolution:this.timeResolution})}};(0,n.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],K.prototype,"includeTimeOffset",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{type:String,write:!0}})],K.prototype,"max",void 0),(0,n.Cg)([(0,M.w)("max")],K.prototype,"readMax",null),(0,n.Cg)([(0,v.K)("max")],K.prototype,"writeMax",null),(0,n.Cg)([(0,o.MZ)({type:String,json:{type:String,write:!0}})],K.prototype,"min",void 0),(0,n.Cg)([(0,M.w)("min")],K.prototype,"readMin",null),(0,n.Cg)([(0,v.K)("min")],K.prototype,"writeMin",null),(0,n.Cg)([(0,o.MZ)({type:String,json:{type:String,write:!0}})],K.prototype,"timeResolution",void 0),(0,n.Cg)([(0,M.w)("timeResolution")],K.prototype,"readTimeResolution",null),(0,n.Cg)([(0,v.K)("timeResolution")],K.prototype,"writeTimeResolution",null),(0,n.Cg)([(0,o.MZ)({type:["timestampoffset-picker"],json:{read:!1,write:!0}})],K.prototype,"type",void 0),K=E=(0,n.Cg)([(0,o.$K)("esri.form.elements.inputs.DateTimeOffsetPickerInput")],K);const N=K;var A;function I(e){return null==e?null:new Date(e)}function O(e){return e?e.getTime():null}let k=A=class extends l{constructor(e){super(e),this.includeTime=!1,this.max=null,this.min=null,this.type="datetime-picker"}readMax(e,t){return I(t.max)}writeMax(e,t){t.max=O(e)}readMin(e,t){return I(t.min)}writeMin(e,t){t.min=O(e)}clone(){return new A({includeTime:this.includeTime,max:this.max,min:this.min})}};(0,n.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],k.prototype,"includeTime",void 0),(0,n.Cg)([(0,o.MZ)({type:Date,json:{type:Number,write:!0}})],k.prototype,"max",void 0),(0,n.Cg)([(0,M.w)("max")],k.prototype,"readMax",null),(0,n.Cg)([(0,v.K)("max")],k.prototype,"writeMax",null),(0,n.Cg)([(0,o.MZ)({type:Date,json:{type:Number,write:!0}})],k.prototype,"min",void 0),(0,n.Cg)([(0,M.w)("min")],k.prototype,"readMin",null),(0,n.Cg)([(0,v.K)("min")],k.prototype,"writeMin",null),(0,n.Cg)([(0,o.MZ)({type:["datetime-picker"],json:{read:!1,write:!0}})],k.prototype,"type",void 0),k=A=(0,n.Cg)([(0,o.$K)("esri.form.elements.inputs.DateTimePickerInput")],k);const R=k;var $;let F=$=class extends h{constructor(e){super(e),this.choiceExpression=null,this.type="dynamic-choice"}clone(){return new $({choiceExpression:this.choiceExpression,showNoValueOption:this.showNoValueOption,noValueOptionLabel:this.noValueOptionLabel})}};(0,n.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],F.prototype,"choiceExpression",void 0),(0,n.Cg)([(0,o.MZ)({type:["dynamic-choice"],json:{read:!1,write:!0}})],F.prototype,"type",void 0),F=$=(0,n.Cg)([(0,o.$K)("esri.form.elements.inputs.DynamicChoiceInput")],F);const V=F;var L;let B=L=class extends r.o{constructor(e){super(e),this.label="",this.value=""}clone(){return new L({label:this.label,value:this.value})}};(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],B.prototype,"label",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],B.prototype,"value",void 0),B=L=(0,n.Cg)([(0,o.$K)("esri.form.elements.inputs.multipleChoice.Choice")],B);const D=B;var q;let W=q=class extends r.o{constructor(e){super(e),this.fieldName="",this.hint=null,this.label=null}clone(){return new q({fieldName:this.fieldName,hint:this.hint,label:this.label})}};(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],W.prototype,"fieldName",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],W.prototype,"hint",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],W.prototype,"label",void 0),W=q=(0,n.Cg)([(0,o.$K)("esri.form.elements.inputs.multipleChoice.OtherChoice")],W);const G=W;var U;let _=U=class extends l{constructor(e){super(e),this.choiceDelimiter=",",this.choices=[],this.includeSelectAllChoices=null,this.maximumChoices=null,this.minimumChoices=null,this.otherChoice=null,this.type="multiple-choice"}clone(){return new U({choiceDelimiter:this.choiceDelimiter,choices:this.choices.map(e=>e.clone()),includeSelectAllChoices:this.includeSelectAllChoices,maximumChoices:this.maximumChoices,minimumChoices:this.minimumChoices,otherChoice:this.otherChoice?.clone()??null})}};(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],_.prototype,"choiceDelimiter",void 0),(0,n.Cg)([(0,o.MZ)({type:[D],json:{write:!0}})],_.prototype,"choices",void 0),(0,n.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],_.prototype,"includeSelectAllChoices",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],_.prototype,"maximumChoices",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],_.prototype,"minimumChoices",void 0),(0,n.Cg)([(0,o.MZ)({type:G,json:{write:!0}})],_.prototype,"otherChoice",void 0),(0,n.Cg)([(0,o.MZ)({type:["multiple-choice"],json:{read:!1,write:!0}})],_.prototype,"type",void 0),_=U=(0,n.Cg)([(0,o.$K)("esri.form.elements.inputs.MultipleChoiceInput")],_);const z=_;var P;let H=P=class extends h{constructor(e){super(e),this.type="radio-buttons"}clone(){return new P({noValueOptionLabel:this.noValueOptionLabel,showNoValueOption:this.showNoValueOption})}};(0,n.Cg)([(0,o.MZ)({type:["radio-buttons"],json:{read:!1,write:!0}})],H.prototype,"type",void 0),H=P=(0,n.Cg)([(0,o.$K)("esri.form.elements.inputs.RadioButtonsInput")],H);const J=H;var Y;let Q=Y=class extends l{constructor(e){super(e),this.offValue=null,this.onValue=null,this.type="switch"}clone(){return new Y({offValue:this.offValue,onValue:this.onValue})}};(0,n.Cg)([(0,o.MZ)({type:[String,Number],json:{write:!0}})],Q.prototype,"offValue",void 0),(0,n.Cg)([(0,o.MZ)({type:[String,Number],json:{write:!0}})],Q.prototype,"onValue",void 0),(0,n.Cg)([(0,o.MZ)({type:["switch"],json:{read:!1,write:!0}})],Q.prototype,"type",void 0),Q=Y=(0,n.Cg)([(0,o.$K)("esri.form.elements.inputs.SwitchInput")],Q);const X=Q;var ee;let te=ee=class extends u{constructor(e){super(e),this.type="text-area"}clone(){return new ee({maxLength:this.maxLength,minLength:this.minLength})}};(0,n.Cg)([(0,o.MZ)({type:["text-area"],json:{read:!1,write:!0}})],te.prototype,"type",void 0),te=ee=(0,n.Cg)([(0,o.$K)("esri.form.elements.inputs.TextAreaInput")],te);const ie=te;var ne;let oe=ne=class extends u{constructor(e){super(e),this.type="text-box"}clone(){return new ne({maxLength:this.maxLength,minLength:this.minLength})}};(0,n.Cg)([(0,o.MZ)({type:["text-box"],json:{read:!1,write:!0}})],oe.prototype,"type",void 0),oe=ne=(0,n.Cg)([(0,o.$K)("esri.form.elements.inputs.TextBoxInput")],oe);const se=oe;var re;function pe(e){return e??null}function le(e){return e??null}let ae=re=class extends l{constructor(e){super(e),this.max=null,this.min=null,this.timeResolution="minutes",this.type="time-picker"}readMax(e,t){return pe(t.max)}writeMax(e,t){t.max=le(e)}readMin(e,t){return pe(t.min)}writeMin(e,t){t.min=le(e)}readTimeResolution(e,t){return pe(t.timeResolution)}writeTimeResolution(e,t){t.timeResolution=le(e)}clone(){return new re({max:this.max,min:this.min,timeResolution:this.timeResolution})}};(0,n.Cg)([(0,o.MZ)({type:String,json:{type:String,write:!0}})],ae.prototype,"max",void 0),(0,n.Cg)([(0,M.w)("max")],ae.prototype,"readMax",null),(0,n.Cg)([(0,v.K)("max")],ae.prototype,"writeMax",null),(0,n.Cg)([(0,o.MZ)({type:String,json:{type:String,write:!0}})],ae.prototype,"min",void 0),(0,n.Cg)([(0,M.w)("min")],ae.prototype,"readMin",null),(0,n.Cg)([(0,v.K)("min")],ae.prototype,"writeMin",null),(0,n.Cg)([(0,o.MZ)({type:String,json:{type:String,write:!0}})],ae.prototype,"timeResolution",void 0),(0,n.Cg)([(0,M.w)("timeResolution")],ae.prototype,"readTimeResolution",null),(0,n.Cg)([(0,v.K)("timeResolution")],ae.prototype,"writeTimeResolution",null),(0,n.Cg)([(0,o.MZ)({type:["time-picker"],json:{read:!1,write:!0}})],ae.prototype,"type",void 0),ae=re=(0,n.Cg)([(0,o.$K)("esri.form.elements.inputs.TimePickerInput")],ae);const ue={base:l,key:"type",typeMap:{"barcode-scanner":d,"combo-box":C,"date-picker":j,"datetime-picker":R,"dynamic-choice":V,"multiple-choice":z,"timestampoffset-picker":N,"datetimeoffset-picker":N,"radio-buttons":J,switch:X,"text-area":ie,"text-box":se,"time-picker":ae}};var ye,me=i(8631);let de=ye=class extends s.A{constructor(e){super(e),this.domain=null,this.editable=null,this.editableExpression=null,this.fieldName=null,this.hint=null,this.input=null,this.requiredExpression=null,this.type="field",this.valueExpression=null}clone(){return new ye({description:this.description,domain:this.domain?.clone()??null,editable:this.editable,editableExpression:this.editableExpression,fieldName:this.fieldName,hint:this.hint,input:this.input?.clone(),label:this.label,requiredExpression:this.requiredExpression,valueExpression:this.valueExpression,visibilityExpression:this.visibilityExpression})}};(0,n.Cg)([(0,o.MZ)({types:me.g,json:{read:{reader:me.r},write:!0}})],de.prototype,"domain",void 0),(0,n.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],de.prototype,"editable",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],de.prototype,"editableExpression",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],de.prototype,"fieldName",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],de.prototype,"hint",void 0),(0,n.Cg)([(0,o.MZ)({types:ue,json:{read:{source:"inputType"},write:{target:"inputType"}}})],de.prototype,"input",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],de.prototype,"requiredExpression",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{read:!1,write:!0}})],de.prototype,"type",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],de.prototype,"valueExpression",void 0),de=ye=(0,n.Cg)([(0,o.$K)("esri.form.elements.FieldElement")],de)}}]);
|