{"version":3,"sources":["webpack:///./node_modules/@arcgis/core/rest/support/DirectionsFeatureSet.js","webpack:///./node_modules/@arcgis/core/rest/support/GPMessage.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","esriJobMessageTypeInformative","esriJobMessageTypeProcessDefinition","esriJobMessageTypeProcessStart","esriJobMessageTypeProcessStop","esriJobMessageTypeWarning","esriJobMessageTypeError","esriJobMessageTypeEmpty","esriJobMessageTypeAbort","description","String","write","0","1","2","3","50","100","101","200","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","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,2BAA2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b22c.6c3af636.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 e}from\"../../chunks/tslib.es6.js\";import{JSONMap as r}from\"../../core/jsonMap.js\";import{JSONSupport as s}from\"../../core/JSONSupport.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 t}from\"../../core/accessorSupport/decorators/subclass.js\";const p=new r({esriJobMessageTypeInformative:\"informative\",esriJobMessageTypeProcessDefinition:\"process-definition\",esriJobMessageTypeProcessStart:\"process-start\",esriJobMessageTypeProcessStop:\"process-stop\",esriJobMessageTypeWarning:\"warning\",esriJobMessageTypeError:\"error\",esriJobMessageTypeEmpty:\"empty\",esriJobMessageTypeAbort:\"abort\"});let i=class extends s{constructor(e){super(e),this.description=null,this.type=null}};e([o({type:String,json:{write:!0}})],i.prototype,\"description\",void 0),e([o({type:String,json:{read:p.read,write:p.write}})],i.prototype,\"type\",void 0),i=e([t(\"esri.rest.support.GPMessage\")],i);var a=i;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*/\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":""}