{"version":3,"sources":["webpack:///./node_modules/@arcgis/core/rest/support/DirectionsFeatureSet.js","webpack:///./node_modules/@arcgis/core/rest/support/NAMessage.js","webpack:///./node_modules/@arcgis/core/core/queryUtils.js","webpack:///./node_modules/@arcgis/core/rest/support/ClosestFacilitySolveResult.js","webpack:///./node_modules/@arcgis/core/rest/closestFacility.js","webpack:///./node_modules/@arcgis/core/tasks/ClosestFacilityTask.js","webpack:///./node_modules/@arcgis/core/rest/support/networkEnums.js","webpack:///./node_modules/@arcgis/core/rest/support/TravelMode.js","webpack:///./node_modules/@arcgis/core/rest/support/NetworkServiceDescription.js","webpack:///./node_modules/@arcgis/core/rest/support/RouteResult.js","webpack:///./node_modules/@arcgis/core/rest/support/RouteResultsContainer.js","webpack:///./node_modules/@arcgis/core/rest/networkService.js"],"names":["c","e","super","this","extent","features","geometryType","routeId","routeName","totalDriveTime","totalLength","totalTime","s","forEach","_decompressFeatureGeometry","summary","envelope","spatialReference","a","fromJSON","map","p","geometry","strings","events","o","x","point","y","z","hasZ","attributes","ETA","arriveTimeUTC","t","get","_mergePolylinesToSinglePath","_decompressGeometry","compressedGeometry","r","n","i","m","l","u","g","h","f","d","match","parseInt","indexOf","length","push","paths","hasM","concat","type","json","read","source","prototype","readOnly","value","0","1","2","3","50","100","101","200","String","write","Array","isArray","_options","toJSON","Object","keys","name","getter","join","JSON","stringify","directions","facilities","incidents","messages","pointBarriers","polylineBarriers","polygonBarriers","routes","barriers","accumulateAttributes","attributeParameterValues","directionsTimeAttribute","impedanceAttribute","outSpatialReference","wkid","restrictionAttributes","returnPointBarriers","returnRoutes","travelMode","async","B","path","b","slice","apiKey","A","query","toQueryParams","data","j","url","esriCentimeters","esriDecimalDegrees","esriDecimeters","esriFeet","esriInches","esriKilometers","esriMeters","esriMiles","esriMillimeters","esriNauticalMiles","esriPoints","esriYards","esriNAUCentimeters","esriNAUDecimalDegrees","esriNAUDecimeters","esriNAUFeet","esriNAUInches","esriNAUKilometers","esriNAUMeters","esriNAUMiles","esriNAUMillimeters","esriNAUNauticalMiles","esriNAUPoints","esriNAUYards","esriDOTComplete","esriDOTCompleteNoEvents","esriDOTInstructionsOnly","esriDOTStandard","esriDOTSummaryOnly","esriNAOutputLineNone","esriNAOutputLineStraight","esriNAOutputLineTrueShape","esriNAOutputLineTrueShapeWithMeasure","esriNAOutputPolygonNone","esriNAOutputPolygonSimplified","esriNAOutputPolygonDetailed","esriNFSBAllowBacktrack","esriNFSBAtDeadEndsOnly","esriNFSBNoBacktrack","esriNFSBAtDeadEndsAndIntersections","esriNATravelDirectionFromFacility","esriNATravelDirectionToFacility","esriNATimeOfDayNotUsed","esriNATimeOfDayUseAsStartTime","esriNATimeOfDayUseAsEndTime","AUTOMOBILE","TRUCK","WALK","OTHER","description","distanceAttributeName","id","impedanceAttributeName","restrictionAttributeNames","simplificationTolerance","simplificationToleranceUnits","timeAttributeName","useHierarchy","uturnAtJunctions","Number","Boolean","currentVersion","defaultTravelMode","directionsLanguage","directionsSupportedLanguages","impedance","networkDataset","supportedTravelModes","route","stops","routeResults","aliasOf","console","log","v","T","Name","RouteName","splice","M","token","itemId","replace","owningSystemUrl","test","serviceName","w","results","N","paramName","parse","TravelMode","error"],"mappings":"kHAAA,sNAIsrB,IAAIA,EAAE,cAAc,aAAE,YAAYC,GAAGC,MAAMD,GAAGE,KAAKC,OAAO,KAAKD,KAAKE,SAAS,KAAKF,KAAKG,aAAa,WAAWH,KAAKI,QAAQ,KAAKJ,KAAKK,UAAU,KAAKL,KAAKM,eAAe,KAAKN,KAAKO,YAAY,KAAKP,KAAKQ,UAAU,KAAK,aAAaV,EAAEW,IAAIX,GAAG,IAAIY,QAASZ,IAAIE,KAAKW,2BAA2Bb,EAAEW,EAAEG,QAAQC,SAASC,oBAAqB,MAAMC,EAAE,OAAEC,SAASP,EAAEK,kBAAkB,OAAOhB,EAAEmB,IAAKnB,IAAI,MAAMW,EAAE,OAAEO,SAASlB,GAAGoB,EAAE,eAAEpB,EAAEqB,WAAWrB,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AAKd,QAAQ,sBAAsBA,EAAEsK,YAAYjL,EAAEW,EAAEwB,QAAQ,MAAM,CAACwH,qBAAqBmB,EAAExB,kBAAkBtJ,GAAG4E,eAAe,EAAEtE,EAAET,EAAEkB,GAAG,IAAI,MAAMJ,EAAE,eAAE,CAACQ,EAAE,OAAOqJ,MAAM3K,GAAGkB,GAAGH,EAAE,eAAEN,GAAG,wBAAwB+E,MAAMsE,qBAAqB9I,EAAEyI,kBAAkBtI,UAAU,qBAAEJ,EAAED,GAAG,MAAM,CAACgJ,qBAAqB9I,EAAEyI,kBAAkBtI,GAAG,MAAMJ,GAAG,MAAM,IAAI,OAAE,sCAAsC,uDAAuD,CAACwK,MAAMxK","file":"js/chunk-9f03d140.b28787b2.js","sourcesContent":["/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.21/esri/copyright.txt for details.\n*/\nimport{_ as e}from\"../../chunks/tslib.es6.js\";import\"../../geometry.js\";import t from\"../../Graphic.js\";import{isSome as r,unwrap as o}from\"../../core/maybe.js\";import{property as s}from\"../../core/accessorSupport/decorators/property.js\";import\"../../core/has.js\";import\"../../core/accessorSupport/ensureType.js\";import\"../../core/Logger.js\";import{reader as a}from\"../../core/accessorSupport/decorators/reader.js\";import{subclass as p}from\"../../core/accessorSupport/decorators/subclass.js\";import n from\"./FeatureSet.js\";import i from\"../../geometry/Extent.js\";import m from\"../../geometry/SpatialReference.js\";import l from\"../../geometry/Point.js\";import u from\"../../geometry/Polyline.js\";let c=class extends n{constructor(e){super(e),this.extent=null,this.features=null,this.geometryType=\"polyline\",this.routeId=null,this.routeName=null,this.totalDriveTime=null,this.totalLength=null,this.totalTime=null}readFeatures(e,s){(e||[]).forEach((e=>{this._decompressFeatureGeometry(e,s.summary.envelope.spatialReference)}));const a=m.fromJSON(s.spatialReference);return e.map((e=>{const s=t.fromJSON(e),p=r(e.geometry)&&e.geometry.spatialReference;return s.geometry&&!p&&(o(s.geometry).spatialReference=a),s.strings=e.strings,s.events=(e.events||[]).map((o=>{const s=new t({geometry:new l({x:o.point.x,y:o.point.y,z:o.point.z,hasZ:void 0!==o.point.z,spatialReference:r(e.geometry)&&e.geometry.spatialReference}),attributes:{ETA:o.ETA,arriveTimeUTC:o.arriveTimeUTC}});return s.strings=o.strings,s})),s}))}get mergedGeometry(){if(!this.features)return null;const e=this.features.map((({geometry:e})=>o(e))),t=this.get(\"extent.spatialReference\");return this._mergePolylinesToSinglePath(e,t)}get strings(){return this.features.map((({strings:e})=>e))}_decompressFeatureGeometry(e,t){e.geometry=this._decompressGeometry(e.compressedGeometry,t)}_decompressGeometry(e,t){let r=0,o=0,s=0,a=0;const p=[];let n,i,m,l,u,c,y,g,h=0,f=0,d=0;if(u=e.match(/((\\+|\\-)[^\\+\\-\\|]+|\\|)/g),u||(u=[]),0===parseInt(u[h],32)){h=2;const e=parseInt(u[h],32);h++,c=parseInt(u[h],32),h++,1&e&&(f=u.indexOf(\"|\")+1,y=parseInt(u[f],32),f++),2&e&&(d=u.indexOf(\"|\",f)+1,g=parseInt(u[d],32),d++)}else c=parseInt(u[h],32),h++;for(;h0,hasM:d>0,spatialReference:t}}_mergePolylinesToSinglePath(e,t){let r=[];(e||[]).forEach((e=>{e.paths.forEach((e=>{r=r.concat(e)}))}));const o=[];let s=[0,0];return r.forEach((e=>{e[0]===s[0]&&e[1]===s[1]||(o.push(e),s=e)})),new u({paths:[o]},t)}};e([s({type:i,json:{read:{source:\"summary.envelope\"}}})],c.prototype,\"extent\",void 0),e([s()],c.prototype,\"features\",void 0),e([a(\"features\")],c.prototype,\"readFeatures\",null),e([s()],c.prototype,\"geometryType\",void 0),e([s({readOnly:!0})],c.prototype,\"mergedGeometry\",null),e([s()],c.prototype,\"routeId\",void 0),e([s()],c.prototype,\"routeName\",void 0),e([s({value:null,readOnly:!0})],c.prototype,\"strings\",null),e([s({json:{read:{source:\"summary.totalDriveTime\"}}})],c.prototype,\"totalDriveTime\",void 0),e([s({json:{read:{source:\"summary.totalLength\"}}})],c.prototype,\"totalLength\",void 0),e([s({json:{read:{source:\"summary.totalTime\"}}})],c.prototype,\"totalTime\",void 0),c=e([p(\"esri.rest.support.DirectionsFeatureSet\")],c);var y=c;export{y as default};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.21/esri/copyright.txt for details.\n*/\nimport{_ as r}from\"../../chunks/tslib.es6.js\";import{JSONMap as s}from\"../../core/jsonMap.js\";import{property as o}from\"../../core/accessorSupport/decorators/property.js\";import\"../../core/has.js\";import\"../../core/accessorSupport/ensureType.js\";import\"../../core/Logger.js\";import{subclass as e}from\"../../core/accessorSupport/decorators/subclass.js\";import t from\"./GPMessage.js\";const p=new s({0:\"informative\",1:\"process-definition\",2:\"process-start\",3:\"process-stop\",50:\"warning\",100:\"error\",101:\"empty\",200:\"abort\"});let c=class extends t{constructor(r){super(r),this.type=null}};r([o({type:String,json:{read:p.read,write:p.write}})],c.prototype,\"type\",void 0),c=r([e(\"esri.rest.support.NAMessage\")],c);var a=c;export{a as default};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.21/esri/copyright.txt for details.\n*/\nconst t=t=>{if(!Array.isArray(t))return!1;const[e]=t;return\"number\"==typeof e||\"string\"==typeof e};class e{constructor(t={}){this._options=t}toQueryParams(e){if(!e)return null;const o=e.toJSON(),n={};return Object.keys(o).forEach((e=>{const r=this._options[e];if(r){const s=\"boolean\"!=typeof r&&r.name?r.name:e,i=\"boolean\"!=typeof r&&r.getter?r.getter(o):o[e];null!=i&&(n[s]=t(i)?i.join(\",\"):\"object\"==typeof i?JSON.stringify(i):i)}else n[e]=o[e]}),this),n}}function o(t){return new e(t)}export{o as createQueryParamsHelper};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.21/esri/copyright.txt for details.\n*/\nimport{_ as r}from\"../../chunks/tslib.es6.js\";import\"../../geometry.js\";import e from\"../../Graphic.js\";import{JSONSupport as o}from\"../../core/JSONSupport.js\";import{isSome as t}from\"../../core/maybe.js\";import{property as s}from\"../../core/accessorSupport/decorators/property.js\";import\"../../core/has.js\";import\"../../core/accessorSupport/ensureType.js\";import\"../../core/Logger.js\";import{reader as i}from\"../../core/accessorSupport/decorators/reader.js\";import{subclass as p}from\"../../core/accessorSupport/decorators/subclass.js\";import a from\"../../geometry/SpatialReference.js\";import n from\"./DirectionsFeatureSet.js\";import l from\"./FeatureSet.js\";import m from\"./NAMessage.js\";import u from\"../../geometry/Point.js\";import y from\"../../geometry/Polyline.js\";import c from\"../../geometry/Polygon.js\";function d(r){return r.features.map((o=>{const s=a.fromJSON(r.spatialReference),i=e.fromJSON(o);return t(i.geometry)&&(i.geometry.spatialReference=s),i}))}function f(r){return l.fromJSON(r).features.map((r=>r.geometry))}let g=class extends o{constructor(r){super(r),this.directions=null,this.facilities=null,this.incidents=null,this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routes=null}readFacilities(r){return f(r)}readIncidents(r){return f(r)}readPointBarriers(r,e){return f(e.barriers)}readPolylineBarriers(r){return f(r)}readPolygonBarriers(r){return f(r)}readRoutes(r){return d(r)}};r([s({type:[n]})],g.prototype,\"directions\",void 0),r([s({type:[u]})],g.prototype,\"facilities\",void 0),r([i(\"facilities\")],g.prototype,\"readFacilities\",null),r([s({type:[u]})],g.prototype,\"incidents\",void 0),r([i(\"incidents\")],g.prototype,\"readIncidents\",null),r([s({type:[m]})],g.prototype,\"messages\",void 0),r([s({type:[u]})],g.prototype,\"pointBarriers\",void 0),r([i(\"pointBarriers\",[\"barriers\"])],g.prototype,\"readPointBarriers\",null),r([s({type:[y]})],g.prototype,\"polylineBarriers\",void 0),r([i(\"polylineBarriers\")],g.prototype,\"readPolylineBarriers\",null),r([s({type:[c]})],g.prototype,\"polygonBarriers\",void 0),r([i(\"polygonBarriers\")],g.prototype,\"readPolygonBarriers\",null),r([s({type:[e]})],g.prototype,\"routes\",void 0),r([i(\"routes\")],g.prototype,\"readRoutes\",null),g=r([p(\"esri.rest.support.ClosestFacilitySolveResult\")],g);var j=g;export{j as default};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.21/esri/copyright.txt for details.\n*/\nimport e from\"../request.js\";import{createQueryParamsHelper as r}from\"../core/queryUtils.js\";import{normalizeCentralMeridian as t}from\"../geometry/support/normalizeUtils.js\";import{collectGeometries as i,isInputGeometryZAware as s,fetchServiceDescription as a,dropZValuesOffInputGeometry as o}from\"./networkService.js\";import{parseUrl as n}from\"./utils.js\";import u from\"./support/ClosestFacilitySolveResult.js\";const l=r({accumulateAttributes:{name:\"accumulateAttributeNames\"},attributeParameterValues:!0,directionsTimeAttribute:{name:\"directionsTimeAttributeName\"},impedanceAttribute:{name:\"impedanceAttributeName\"},facilities:!0,incidents:!0,outSpatialReference:{name:\"outSR\",getter:e=>e.outSpatialReference.wkid},pointBarriers:{name:\"barriers\"},polylineBarriers:!0,polygonBarriers:!0,restrictionAttributes:{name:\"restrictionAttributeNames\"},returnPointBarriers:{name:\"returnBarriers\"},returnRoutes:{name:\"returnCFRoutes\"},travelMode:!0});async function c(r,c,m){const f=[],p=[],y={},B={},d=n(r),{path:b}=d;c.incidents&&c.incidents.features&&i(c.incidents.features,p,\"incidents.features\",y),c.facilities&&c.facilities.features&&i(c.facilities.features,p,\"facilities.features\",y),c.pointBarriers&&c.pointBarriers.features&&i(c.pointBarriers.features,p,\"pointBarriers.features\",y),c.polylineBarriers&&c.polylineBarriers.features&&i(c.polylineBarriers.features,p,\"polylineBarriers.features\",y),c.polygonBarriers&&c.polygonBarriers.features&&i(c.polygonBarriers.features,p,\"polygonBarriers.features\",y);const g=await t(p);for(const e in y){const r=y[e];f.push(e),B[e]=g.slice(r[0],r[1])}if(s(B,f)){let e=null;try{e=await a(b,c.apiKey,m)}catch{}e&&!e.hasZ&&o(B,f)}for(const e in B)B[e].forEach(((r,t)=>{c.get(e)[t].geometry=r}));const A={...m,query:{...d.query,...l.toQueryParams(c),f:\"json\"}},{data:j}=await e(`${b}/solveClosestFacility`,A);return u.fromJSON(j)}export{c as solve};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.21/esri/copyright.txt for details.\n*/\nimport{_ as r}from\"../chunks/tslib.es6.js\";import{property as s}from\"../core/accessorSupport/decorators/property.js\";import\"../core/has.js\";import\"../core/accessorSupport/ensureType.js\";import\"../core/Logger.js\";import{subclass as o}from\"../core/accessorSupport/decorators/subclass.js\";import{solve as t}from\"../rest/closestFacility.js\";import e from\"./Task.js\";let c=class extends e{constructor(r){super(r),this.url=null}solve(r,s){return t(this.url,r,s)}};r([s()],c.prototype,\"url\",void 0),c=r([o(\"esri.tasks.ClosestFacilityTask\")],c);var p=c;export{p as default};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.21/esri/copyright.txt for details.\n*/\nimport{strict as e}from\"../../core/jsonMap.js\";const i=e()({esriCentimeters:\"centimeters\",esriDecimalDegrees:\"decimal-degrees\",esriDecimeters:\"decimeters\",esriFeet:\"feet\",esriInches:\"inches\",esriKilometers:\"kilometers\",esriMeters:\"meters\",esriMiles:\"miles\",esriMillimeters:\"millimeters\",esriNauticalMiles:\"nautical-miles\",esriPoints:\"points\",esriYards:\"yards\"}),s=e()({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\"}),r=e()({esriDOTComplete:\"complete\",esriDOTCompleteNoEvents:\"complete-no-events\",esriDOTInstructionsOnly:\"instructions-only\",esriDOTStandard:\"standard\",esriDOTSummaryOnly:\"summary-only\"}),t=e()({esriNAOutputLineNone:\"none\",esriNAOutputLineStraight:\"straight\",esriNAOutputLineTrueShape:\"true-shape\",esriNAOutputLineTrueShapeWithMeasure:\"true-shape-with-measure\"}),a=e()({esriNAOutputPolygonNone:\"none\",esriNAOutputPolygonSimplified:\"simplified\",esriNAOutputPolygonDetailed:\"detailed\"}),n=e()({esriNFSBAllowBacktrack:\"allow-backtrack\",esriNFSBAtDeadEndsOnly:\"at-dead-ends-only\",esriNFSBNoBacktrack:\"no-backtrack\",esriNFSBAtDeadEndsAndIntersections:\"at-dead-ends-and-intersections\"}),l=e()({esriNATravelDirectionFromFacility:\"from-facility\",esriNATravelDirectionToFacility:\"to-facility\"}),o=e()({esriNATimeOfDayNotUsed:\"not-used\",esriNATimeOfDayUseAsStartTime:\"start\",esriNATimeOfDayUseAsEndTime:\"end\"}),m=e()({AUTOMOBILE:\"automobile\",TRUCK:\"truck\",WALK:\"walk\",OTHER:\"other\"});export{s as directionsLengthUnitJsonMap,r as directionsOutputTypeJsonMap,i as lengthUnitJsonMap,t as outputLineJsonMap,a as outputPolygonJsonMap,n as restrictUTurnJsonMap,o as timeOfDayUsageJsonMap,l as travelDirectionJsonMap,m as travelModeTypeJsonMap};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.21/esri/copyright.txt for details.\n*/\nimport{_ as t}from\"../../chunks/tslib.es6.js\";import{JSONSupport as e}from\"../../core/JSONSupport.js\";import{clone as i}from\"../../core/lang.js\";import{property as r}from\"../../core/accessorSupport/decorators/property.js\";import\"../../core/accessorSupport/ensureType.js\";import\"../../core/has.js\";import\"../../core/Logger.js\";import{enumeration as o}from\"../../core/accessorSupport/decorators/enumeration.js\";import{subclass as s}from\"../../core/accessorSupport/decorators/subclass.js\";import{lengthUnitJsonMap as n,travelModeTypeJsonMap as a,restrictUTurnJsonMap as p}from\"./networkEnums.js\";var u;let c=u=class extends e{constructor(t){super(t),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}clone(){return new u(i({attributeParameterValues:this.attributeParameterValues,description:this.description,distanceAttributeName:this.distanceAttributeName,id:this.id,impedanceAttributeName:this.impedanceAttributeName,name:this.name,restrictionAttributeNames:this.restrictionAttributeNames,simplificationTolerance:this.simplificationTolerance,simplificationToleranceUnits:this.simplificationToleranceUnits,timeAttributeName:this.timeAttributeName,type:this.type,useHierarchy:this.useHierarchy,uturnAtJunctions:this.uturnAtJunctions}))}};t([r({type:[Object],json:{write:!0}})],c.prototype,\"attributeParameterValues\",void 0),t([r({type:String,json:{write:!0}})],c.prototype,\"description\",void 0),t([r({type:String,json:{write:!0}})],c.prototype,\"distanceAttributeName\",void 0),t([r({type:String,json:{write:!0}})],c.prototype,\"id\",void 0),t([r({type:String,json:{write:!0}})],c.prototype,\"impedanceAttributeName\",void 0),t([r({type:String,json:{write:!0}})],c.prototype,\"name\",void 0),t([r({type:[String],json:{write:!0}})],c.prototype,\"restrictionAttributeNames\",void 0),t([r({type:Number,json:{write:!0}})],c.prototype,\"simplificationTolerance\",void 0),t([o(n)],c.prototype,\"simplificationToleranceUnits\",void 0),t([r({type:String,json:{write:!0}})],c.prototype,\"timeAttributeName\",void 0),t([o(a)],c.prototype,\"type\",void 0),t([r({type:Boolean,json:{write:!0}})],c.prototype,\"useHierarchy\",void 0),t([o(p)],c.prototype,\"uturnAtJunctions\",void 0),c=u=t([s(\"esri.rest.support.TravelMode\")],c);var m=c;export{m as default};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.21/esri/copyright.txt for details.\n*/\nimport{_ as o}from\"../../chunks/tslib.es6.js\";import{JSONSupport as e}from\"../../core/JSONSupport.js\";import{property as t}from\"../../core/accessorSupport/decorators/property.js\";import\"../../core/has.js\";import\"../../core/accessorSupport/ensureType.js\";import\"../../core/Logger.js\";import{subclass as r}from\"../../core/accessorSupport/decorators/subclass.js\";import s from\"./TravelMode.js\";let p=class extends e{constructor(o){super(o),this.currentVersion=null,this.defaultTravelMode=null,this.directionsLanguage=null,this.directionsSupportedLanguages=null,this.directionsTimeAttribute=null,this.hasZ=null,this.impedance=null,this.networkDataset=null,this.supportedTravelModes=null}};o([t()],p.prototype,\"currentVersion\",void 0),o([t()],p.prototype,\"defaultTravelMode\",void 0),o([t()],p.prototype,\"directionsLanguage\",void 0),o([t()],p.prototype,\"directionsSupportedLanguages\",void 0),o([t()],p.prototype,\"directionsTimeAttribute\",void 0),o([t()],p.prototype,\"hasZ\",void 0),o([t()],p.prototype,\"impedance\",void 0),o([t()],p.prototype,\"networkDataset\",void 0),o([t({type:[s]})],p.prototype,\"supportedTravelModes\",void 0),p=o([r(\"esri.rest.support.NetworkServiceDescription\")],p);var i=p;export{i as default};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.21/esri/copyright.txt for details.\n*/\nimport{_ as o}from\"../../chunks/tslib.es6.js\";import r from\"../../Graphic.js\";import{JSONSupport as t}from\"../../core/JSONSupport.js\";import{property as e}from\"../../core/accessorSupport/decorators/property.js\";import\"../../core/has.js\";import\"../../core/accessorSupport/ensureType.js\";import\"../../core/Logger.js\";import{subclass as s}from\"../../core/accessorSupport/decorators/subclass.js\";import p from\"./DirectionsFeatureSet.js\";let i=class extends t{constructor(o){super(o),this.directions=null,this.route=null,this.routeName=null,this.stops=null}};o([e({type:p,json:{write:!0}})],i.prototype,\"directions\",void 0),o([e({type:r,json:{write:!0}})],i.prototype,\"route\",void 0),o([e({type:String,json:{write:!0}})],i.prototype,\"routeName\",void 0),o([e({type:[r],json:{write:!0}})],i.prototype,\"stops\",void 0),i=o([s(\"esri.rest.support.RouteResult\")],i);var c=i;export{c as default};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.21/esri/copyright.txt for details.\n*/\nimport{_ as r}from\"../../chunks/tslib.es6.js\";import o from\"../../Graphic.js\";import{JSONSupport as e}from\"../../core/JSONSupport.js\";import{property as s}from\"../../core/accessorSupport/decorators/property.js\";import\"../../core/has.js\";import\"../../core/accessorSupport/ensureType.js\";import\"../../core/Logger.js\";import{reader as t}from\"../../core/accessorSupport/decorators/reader.js\";import{subclass as p}from\"../../core/accessorSupport/decorators/subclass.js\";import i from\"./FeatureSet.js\";import a from\"./NAMessage.js\";import l from\"./RouteResult.js\";function n(r){return r&&i.fromJSON(r).features.map((r=>r))}let u=class extends e{constructor(r){super(r),this.barriers=null,this.messages=null,this.pointBarriers=null,this.polylineBarriers=null,this.polygonBarriers=null,this.routeResults=null}readPointBarriers(r,o){return n(o.barriers||o.pointBarriers)}readPolylineBarriers(r){return n(r)}readPolygonBarriers(r){return n(r)}};r([s({aliasOf:\"pointBarriers\"})],u.prototype,\"barriers\",void 0),r([s({type:[a]})],u.prototype,\"messages\",void 0),r([s({type:[o]})],u.prototype,\"pointBarriers\",void 0),r([t(\"pointBarriers\",[\"barriers\",\"pointBarriers\"])],u.prototype,\"readPointBarriers\",null),r([s({type:[o]})],u.prototype,\"polylineBarriers\",void 0),r([t(\"polylineBarriers\")],u.prototype,\"readPolylineBarriers\",null),r([s({type:[o]})],u.prototype,\"polygonBarriers\",void 0),r([t(\"polygonBarriers\")],u.prototype,\"readPolygonBarriers\",null),r([s({type:[l]})],u.prototype,\"routeResults\",void 0),u=r([p(\"esri.rest.support.RouteResultsContainer\")],u);var y=u;export{y as default};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.21/esri/copyright.txt for details.\n*/\nimport e from\"../request.js\";import r from\"../core/Error.js\";import{isSome as t}from\"../core/maybe.js\";import{getDeepValue as o}from\"../core/object.js\";import{removeTrailingSlash as s}from\"../core/urlUtils.js\";import{asValidOptions as a,parseUrl as l}from\"./utils.js\";import n from\"./support/NetworkServiceDescription.js\";import i from\"./support/RouteResultsContainer.js\";function u(e,r,t,o){o[t]=[r.length,r.length+e.length],e.forEach((e=>{r.push(e.geometry)}))}function p(e,r){for(let t=0;t{r.push(m=e.routeName),o[m]={directions:e}})),a.forEach((e=>{-1===r.indexOf(m=e.attributes.Name)&&(r.push(m),o[m]={}),t(e.geometry)&&(e.geometry.spatialReference=g),o[m].route=e})),n.forEach((e=>{h=e.attributes,-1===r.indexOf(m=h.RouteName||v)&&(r.push(m),o[m]={}),m!==v&&(T=!1),t(e.geometry)&&(e.geometry.spatialReference=g),null==o[m].stops&&(o[m].stops=[]),o[m].stops.push(e)})),n.length>0&&!0===T&&(o[r[0]].stops=o[v].stops,delete o[v],r.splice(r.indexOf(v),1));const M=r.map((e=>(o[e].routeName=e===v?null:e,o[e])));return i.fromJSON({routeResults:M,pointBarriers:p,polygonBarriers:f,polylineBarriers:d,messages:c})}function d(e,r){for(let o=0;o=10.4?m(t,o,s):v(t,s),{defaultTravelMode:p,supportedTravelModes:f}=await u;return i.defaultTravelMode=p,i.supportedTravelModes=f,n.fromJSON(i)}async function v(r,t){var n,i;const u=a({f:\"json\"},t),{data:p}=await e(r.replace(/\\/rest\\/.*$/i,\"/info\"),u);if(!p||!p.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:f}=p,d=s(f)+\"/sharing/rest/portals/self\",{data:c}=await e(d,u),v=o(\"helperServices.routingUtilities.url\",c);if(!v)return{supportedTravelModes:[],defaultTravelMode:null};const m=l(f),h=/\\/solve$/i.test(m.path)?\"Route\":/\\/solveclosestfacility$/i.test(m.path)?\"ClosestFacility\":\"ServiceAreas\",T=a({f:\"json\",serviceName:h},t),g=s(v)+\"/GetTravelModes/execute\",M=await e(g,T),w=[];let y=null;if(null!=M&&null!=(n=M.data)&&null!=(i=n.results)&&i.length){const e=M.data.results;for(const r of e){var N;if(\"supportedTravelModes\"===r.paramName){if(null!=(N=r.value)&&N.features)for(const{attributes:e}of r.value.features)if(e){const r=JSON.parse(e.TravelMode);w.push(r)}}else\"defaultTravelMode\"===r.paramName&&(y=r.value)}}return{supportedTravelModes:w,defaultTravelMode:y}}async function m(t,o,l){try{const r=a({f:\"json\",token:o},l),n=s(t)+\"/retrieveTravelModes\",{data:{supportedTravelModes:i,defaultTravelMode:u}}=await e(n,r);return{supportedTravelModes:i,defaultTravelMode:u}}catch(n){throw new r(\"network-service:retrieveTravelModes\",\"Could not get to the NAServer's retrieveTravelModes.\",{error:n})}}export{u as collectGeometries,p as dropZValuesOffInputGeometry,c as fetchServiceDescription,f as handleSolveResponse,d as isInputGeometryZAware};\n"],"sourceRoot":""}