{"version":3,"sources":["webpack:///./node_modules/@arcgis/core/rest/support/DirectionsFeature.js","webpack:///./node_modules/@arcgis/core/rest/support/DirectionsFeatureSet.js","webpack:///./node_modules/@arcgis/core/rest/support/TravelMode.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/NetworkServiceDescription.js","webpack:///./node_modules/@arcgis/core/rest/networkService.js","webpack:///./node_modules/@arcgis/core/rest/support/networkEnums.js"],"names":["prototype","u","e","super","this","extent","features","geometryType","routeId","routeName","totalDriveTime","totalLength","totalTime","t","r","o","summary","envelope","spatialReference","s","fromJSON","map","_decompressGeometry","compressedGeometry","n","p","events","arriveTimeUTC","ETA","point","x","y","z","strings","i","geometry","hasZ","attributes","get","_mergePolylinesToSinglePath","a","m","l","c","h","f","d","match","parseInt","indexOf","length","push","paths","hasM","forEach","type","json","read","source","readOnly","value","attributeParameterValues","description","distanceAttributeName","id","impedanceAttributeName","name","restrictionAttributeNames","simplificationTolerance","simplificationToleranceUnits","timeAttributeName","useHierarchy","uturnAtJunctions","Object","write","String","Number","allowNull","Boolean","0","1","2","3","50","100","101","200","Array","isArray","_options","toJSON","keys","getter","join","JSON","stringify","directions","facilities","incidents","messages","pointBarriers","polylineBarriers","polygonBarriers","routes","barriers","accumulateAttributes","directionsTimeAttribute","impedanceAttribute","outSpatialReference","wkid","restrictionAttributes","returnPointBarriers","returnRoutes","travelMode","async","B","path","b","g","slice","apiKey","A","query","toQueryParams","data","j","url","accumulateAttributeNames","currentVersion","defaultTravelMode","directionsLanguage","directionsLengthUnits","directionsSupportedLanguages","impedance","networkDataset","supportedTravelModes","console","log","token","itemId","replace","owningSystemUrl","v","T","test","M","serviceName","w","results","paramName","parse","TravelMode","error","esriCentimeters","esriDecimalDegrees","esriDecimeters","esriFeet","esriInches","esriKilometers","esriMeters","esriMiles","esriMillimeters","esriNauticalMiles","esriPoints","esriUnknownUnits","esriYards","esriNAUCentimeters","esriNAUDecimalDegrees","esriNAUDecimeters","esriNAUFeet","esriNAUInches","esriNAUKilometers","esriNAUMeters","esriNAUMiles","esriNAUMillimeters","esriNAUNauticalMiles","esriNAUPoints","esriNAUYards","esriNAUDays","esriNAUHours","esriNAUMinutes","esriNAUSeconds","esriDOTComplete","esriDOTCompleteNoEvents","esriDOTFeatureSets","esriDOTInstructionsOnly","esriDOTStandard","esriDOTSummaryOnly","esriNAOutputLineNone","esriNAOutputLineStraight","esriNAOutputLineTrueShape","esriNAOutputLineTrueShapeWithMeasure","esriNAOutputPolygonNone","esriNAOutputPolygonSimplified","esriNAOutputPolygonDetailed","esriNFSBAllowBacktrack","esriNFSBAtDeadEndsOnly","esriNFSBNoBacktrack","esriNFSBAtDeadEndsAndIntersections","esriNATravelDirectionFromFacility","esriNATravelDirectionToFacility","esriNATimeOfDayNotUsed","esriNATimeOfDayUseAsStartTime","esriNATimeOfDayUseAsEndTime","AUTOMOBILE","TRUCK","WALK","OTHER","useNumericKeys","N","4","5","6","7","51","52","102","103","104","150","151","152","153","154","201","202","203","204","205","206","207","208","300","301","302","303","304","305","306","307","308","400","401","402","500","501","502","1001","1002","1003","1004","1005","1006"],"mappings":"4QAIoV,IAAI,EAAE,cAAc,SAAI,eAAE,CAAC,kBAAK,EAAEA,UAAU,cAAS,GAAQ,eAAE,CAAC,kBAAK,EAAEA,UAAU,eAAU,GAAQ,EAAE,eAAE,CAAC,eAAE,wCAAwC,GAAG,MAAM,EAAE,E,gECAmM,IAAIC,EAAE,cAAc,aAAE,YAAYC,GAAGC,MAAMD,GAAGE,KAAKC,OAAO,KAAKD,KAAKE,SAAS,KAAKF,KAAKG,aAAa,WAAWH,KAAKI,QAAQ,KAAKJ,KAAKK,UAAU,KAAKL,KAAKM,e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aC,IAAI,SAASC,IAAI,OAAOC,IAAI,SAASC,IAAI,WAAWC,IAAI,YAAYC,IAAI,kBAAkBzI,IAAI,YAAY0I,IAAI,YAAYC,IAAI,uBAAuBC,IAAI,qBAAqBC,IAAI,YAAYC,IAAI,YAAYC,IAAI,aAAaC,IAAI,oCAAoCC,IAAI,qCAAqCC,IAAI,aAAaC,IAAI,aAAaC,IAAI,+BAA+BC,IAAI,sBAAsBC,IAAI,aAAaC,IAAI,aAAaC,IAAI,cAAcC,IAAI,qCAAqCC,IAAI,sCAAsCC,IAAI,cAAcC,IAAI,eAAeC,IAAI,YAAYC,IAAI,gBAAgBC,IAAI,iBAAiBC,IAAI,cAAc,IAAI,gBAAgBC,KAAK,WAAWC,KAAK,mBAAmBC,KAAK,gBAAgBC,KAAK,4BAA4BC,KAAK,oBAAoBC,KAAK,yBAAyB,CAAC5C,gBAAe,IAAKjL,EAAE,iBAAI,CAACgD,EAAE,UAAUC,EAAE,UAAUC,EAAE,mBAAmBC,EAAE,wBAAwBgI,EAAE,sBAAsBC,EAAE,gBAAgBC,EAAE,eAAeC,EAAE,oBAAoB,CAACL,gBAAe","file":"js/chunk-3cab561c.75b8f624.js","sourcesContent":["/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.23/esri/copyright.txt for details.\n*/\nimport{_ as r}from\"../../chunks/tslib.es6.js\";import o from\"../../Graphic.js\";import{property as s}from\"../../core/accessorSupport/decorators/property.js\";import\"../../core/arrayUtils.js\";import\"../../core/has.js\";import\"../../core/accessorSupport/ensureType.js\";import{subclass as t}from\"../../core/accessorSupport/decorators/subclass.js\";let e=class extends o{};r([s()],e.prototype,\"events\",void 0),r([s()],e.prototype,\"strings\",void 0),e=r([t(\"esri.rest.support.DirectionsFeature\")],e);const p=e;export{p as default};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.23/esri/copyright.txt for details.\n*/\nimport{_ as e}from\"../../chunks/tslib.es6.js\";import\"../../geometry.js\";import{unwrap as t}from\"../../core/maybe.js\";import{property as r}from\"../../core/accessorSupport/decorators/property.js\";import\"../../core/arrayUtils.js\";import\"../../core/has.js\";import\"../../core/accessorSupport/ensureType.js\";import{reader as o}from\"../../core/accessorSupport/decorators/reader.js\";import{subclass as s}from\"../../core/accessorSupport/decorators/subclass.js\";import a from\"./DirectionsFeature.js\";import n from\"./FeatureSet.js\";import p from\"../../geometry/Extent.js\";import i from\"../../geometry/SpatialReference.js\";import m from\"../../geometry/Polyline.js\";import l from\"../../geometry/Point.js\";let u=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,t){var r;if(!e)return[];const o=null!=(r=t.summary.envelope.spatialReference)?r:t.spatialReference,s=o&&i.fromJSON(o);return e.map((e=>{var t,r;const o=this._decompressGeometry(e.compressedGeometry),n=new m({...o,spatialReference:s}),p=null!=(t=null==(r=e.events)?void 0:r.map((e=>{const{arriveTimeUTC:t,ETA:r,point:{x:o,y:n,z:p},strings:i}=e;return new a({geometry:new l({x:o,y:n,z:p,hasZ:void 0!==p,spatialReference:s}),attributes:{ETA:r,arriveTimeUTC:t},strings:i})})))?t:[];return new a({attributes:e.attributes,events:p,geometry:n,strings:e.strings})}))}get mergedGeometry(){if(!this.features)return null;const e=this.features.map((({geometry:e})=>t(e))),r=this.get(\"extent.spatialReference\");return this._mergePolylinesToSinglePath(e,r)}get strings(){return this.features.map((({strings:e})=>e))}_decompressGeometry(e){let t=0,r=0,o=0,s=0;const a=[];let n,p,i,m,l,u,c,y,h=0,f=0,d=0;if(l=e.match(/((\\+|\\-)[^\\+\\-\\|]+|\\|)/g),l||(l=[]),0===parseInt(l[h],32)){h=2;const e=parseInt(l[h],32);h++,u=parseInt(l[h],32),h++,1&e&&(f=l.indexOf(\"|\")+1,c=parseInt(l[f],32),f++),2&e&&(d=l.indexOf(\"|\",f)+1,y=parseInt(l[d],32),d++)}else u=parseInt(l[h],32),h++;for(;h0,hasM:d>0}}_mergePolylinesToSinglePath(e,t){if(0===e.length)return new m({spatialReference:t});const r=[];for(const n of e)for(const e of n.paths)r.push(...e);const o=[];r.forEach(((e,t)=>{0!==t&&e[0]===r[t-1][0]&&e[1]===r[t-1][1]||o.push(e)}));const{hasM:s,hasZ:a}=e[0];return new m({hasM:s,hasZ:a,paths:[o],spatialReference:t})}};e([r({type:p,json:{read:{source:\"summary.envelope\"}}})],u.prototype,\"extent\",void 0),e([r()],u.prototype,\"features\",void 0),e([o(\"features\")],u.prototype,\"readFeatures\",null),e([r()],u.prototype,\"geometryType\",void 0),e([r({readOnly:!0})],u.prototype,\"mergedGeometry\",null),e([r()],u.prototype,\"routeId\",void 0),e([r()],u.prototype,\"routeName\",void 0),e([r({value:null,readOnly:!0})],u.prototype,\"strings\",null),e([r({json:{read:{source:\"summary.totalDriveTime\"}}})],u.prototype,\"totalDriveTime\",void 0),e([r({json:{read:{source:\"summary.totalLength\"}}})],u.prototype,\"totalLength\",void 0),e([r({json:{read:{source:\"summary.totalTime\"}}})],u.prototype,\"totalTime\",void 0),u=e([s(\"esri.rest.support.DirectionsFeatureSet\")],u);const c=u;export{c as default};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.23/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{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:{allowNull:!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);const l=c;export{l as default};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.23/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/arrayUtils.js\";import\"../../core/has.js\";import\"../../core/accessorSupport/ensureType.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);const a=c;export{a as default};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.23/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.23/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/arrayUtils.js\";import\"../../core/has.js\";import\"../../core/accessorSupport/ensureType.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 j=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]})],j.prototype,\"directions\",void 0),r([s({type:[u]})],j.prototype,\"facilities\",void 0),r([i(\"facilities\")],j.prototype,\"readFacilities\",null),r([s({type:[u]})],j.prototype,\"incidents\",void 0),r([i(\"incidents\")],j.prototype,\"readIncidents\",null),r([s({type:[m]})],j.prototype,\"messages\",void 0),r([s({type:[u]})],j.prototype,\"pointBarriers\",void 0),r([i(\"pointBarriers\",[\"barriers\"])],j.prototype,\"readPointBarriers\",null),r([s({type:[y]})],j.prototype,\"polylineBarriers\",void 0),r([i(\"polylineBarriers\")],j.prototype,\"readPolylineBarriers\",null),r([s({type:[c]})],j.prototype,\"polygonBarriers\",void 0),r([i(\"polygonBarriers\")],j.prototype,\"readPolygonBarriers\",null),r([s({type:[e]})],j.prototype,\"routes\",void 0),r([i(\"routes\")],j.prototype,\"readRoutes\",null),j=r([p(\"esri.rest.support.ClosestFacilitySolveResult\")],j);const g=j;export{g as default};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.23/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.23/esri/copyright.txt for details.\n*/\nimport{_ as s}from\"../chunks/tslib.es6.js\";import{property as r}from\"../core/accessorSupport/decorators/property.js\";import\"../core/arrayUtils.js\";import\"../core/has.js\";import\"../core/accessorSupport/ensureType.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(s){super(s),this.url=null}solve(s,r){return t(this.url,s,r)}};s([r()],c.prototype,\"url\",void 0),c=s([o(\"esri.tasks.ClosestFacilityTask\")],c);const p=c;export{p as default};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.23/esri/copyright.txt for details.\n*/\nimport{_ as t}from\"../../chunks/tslib.es6.js\";import{JSONSupport as o}from\"../../core/JSONSupport.js\";import{property as e}from\"../../core/accessorSupport/decorators/property.js\";import\"../../core/arrayUtils.js\";import\"../../core/has.js\";import\"../../core/accessorSupport/ensureType.js\";import{enumeration as r}from\"../../core/accessorSupport/decorators/enumeration.js\";import{subclass as s}from\"../../core/accessorSupport/decorators/subclass.js\";import{directionsLengthUnitJsonMap as i}from\"./networkEnums.js\";import p from\"./TravelMode.js\";let a=class extends o{constructor(t){super(t),this.accumulateAttributeNames=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}};t([e()],a.prototype,\"accumulateAttributeNames\",void 0),t([e()],a.prototype,\"currentVersion\",void 0),t([e()],a.prototype,\"defaultTravelMode\",void 0),t([e()],a.prototype,\"directionsLanguage\",void 0),t([r(i)],a.prototype,\"directionsLengthUnits\",void 0),t([e()],a.prototype,\"directionsSupportedLanguages\",void 0),t([e()],a.prototype,\"directionsTimeAttribute\",void 0),t([e()],a.prototype,\"hasZ\",void 0),t([e()],a.prototype,\"impedance\",void 0),t([e()],a.prototype,\"networkDataset\",void 0),t([e({type:[p]})],a.prototype,\"supportedTravelModes\",void 0),a=t([s(\"esri.rest.support.NetworkServiceDescription\")],a);const n=a;export{n as default};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.23/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\";function i(e,r,t,o){o[t]=[r.length,r.length+e.length],e.forEach((e=>{r.push(e.geometry)}))}function d(e,r){for(let t=0;t=10.4?c(t,o,s):p(t,s),{defaultTravelMode:u,supportedTravelModes:f}=await d;return i.defaultTravelMode=u,i.supportedTravelModes=f,n.fromJSON(i)}async function p(r,t){var n,i;const d=a({f:\"json\"},t),{data:u}=await e(r.replace(/\\/rest\\/.*$/i,\"/info\"),d);if(!u||!u.owningSystemUrl)return{supportedTravelModes:[],defaultTravelMode:null};const{owningSystemUrl:f}=u,p=s(f)+\"/sharing/rest/portals/self\",{data:c}=await e(p,d),v=o(\"helperServices.routingUtilities.url\",c);if(!v)return{supportedTravelModes:[],defaultTravelMode:null};const m=l(f),T=/\\/solve$/i.test(m.path)?\"Route\":/\\/solveclosestfacility$/i.test(m.path)?\"ClosestFacility\":\"ServiceAreas\",M=a({f:\"json\",serviceName:T},t),h=s(v)+\"/GetTravelModes/execute\",w=await e(h,M),g=[];let y=null;if(null!=w&&null!=(n=w.data)&&null!=(i=n.results)&&i.length){const e=w.data.results;for(const r of e){var j;if(\"supportedTravelModes\"===r.paramName){if(null!=(j=r.value)&&j.features)for(const{attributes:e}of r.value.features)if(e){const r=JSON.parse(e.TravelMode);g.push(r)}}else\"defaultTravelMode\"===r.paramName&&(y=r.value)}}return{supportedTravelModes:g,defaultTravelMode:y}}async function c(t,o,l){try{const r=a({f:\"json\",token:o},l),n=s(t)+\"/retrieveTravelModes\",{data:{supportedTravelModes:i,defaultTravelMode:d}}=await e(n,r);return{supportedTravelModes:i,defaultTravelMode:d}}catch(n){throw new r(\"network-service:retrieveTravelModes\",\"Could not get to the NAServer's retrieveTravelModes.\",{error:n})}}export{i as collectGeometries,d as dropZValuesOffInputGeometry,f as fetchServiceDescription,u as isInputGeometryZAware};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.23/esri/copyright.txt for details.\n*/\nimport{strict as e}from\"../../core/jsonMap.js\";const r=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\",esriUnknownUnits:\"unknown\",esriYards:\"yards\"}),t=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\"}),i=e()({esriNAUDays:\"days\",esriNAUHours:\"hours\",esriNAUMinutes:\"minutes\",esriNAUSeconds:\"seconds\"}),s=e()({esriDOTComplete:\"complete\",esriDOTCompleteNoEvents:\"complete-no-events\",esriDOTFeatureSets:\"featuresets\",esriDOTInstructionsOnly:\"instructions-only\",esriDOTStandard:\"standard\",esriDOTSummaryOnly:\"summary-only\"}),n=e()({esriNAOutputLineNone:\"none\",esriNAOutputLineStraight:\"straight\",esriNAOutputLineTrueShape:\"true-shape\",esriNAOutputLineTrueShapeWithMeasure:\"true-shape-with-measure\"}),a=e()({esriNAOutputPolygonNone:\"none\",esriNAOutputPolygonSimplified:\"simplified\",esriNAOutputPolygonDetailed:\"detailed\"}),o=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\"}),u=e()({esriNATimeOfDayNotUsed:\"not-used\",esriNATimeOfDayUseAsStartTime:\"start\",esriNATimeOfDayUseAsEndTime:\"end\"}),c=e()({AUTOMOBILE:\"automobile\",TRUCK:\"truck\",WALK:\"walk\",OTHER:\"other\"}),m=e()({0:\"either-side-of-vehicle\",1:\"right-side-of-vehicle\",2:\"left-side-of-vehicle\",3:\"no-u-turn\"},{useNumericKeys:!0}),d=e()({0:\"stop\",1:\"waypoint\",2:\"break\"},{useNumericKeys:!0}),N=e()({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=e()({1:\"right\",2:\"left\"},{useNumericKeys:!0}),h=e()({0:\"restriction\",1:\"added-cost\"},{useNumericKeys:!0}),A=e()({0:\"permit\",1:\"restrict\"},{useNumericKeys:!0}),p=e()({1:\"header\",50:\"arrive\",51:\"depart\",52:\"straight\",100:\"on-ferry\",101:\"off-ferry\",102:\"central-fork\",103:\"roundabout\",104:\"u-turn\",150:\"door\",151:\"stairs\",152:\"elevator\",153:\"escalator\",154:\"pedestrian-ramp\",200:\"left-fork\",201:\"left-ramp\",202:\"clockwise-roundabout\",203:\"left-handed-u-turn\",204:\"bear-left\",205:\"left-turn\",206:\"sharp-left\",207:\"left-turn-and-immediate-left-turn\",208:\"left-turn-and-immediate-right-turn\",300:\"right-fork\",301:\"right-ramp\",302:\"counter-clockwise-roundabout\",303:\"right-handed-u-turn\",304:\"bear-right\",305:\"right-turn\",306:\"sharp-right\",307:\"right-turn-and-immediate-left-turn\",308:\"right-turn-and-immediate-right-turn\",400:\"up-elevator\",401:\"up-escalator\",402:\"up-stairs\",500:\"down-elevator\",501:\"down-escalator\",502:\"down-stairs\",1e3:\"general-event\",1001:\"landmark\",1002:\"time-zone-change\",1003:\"traffic-event\",1004:\"scaled-cost-barrier-event\",1005:\"boundary-crossing\",1006:\"restriction-violation\"},{useNumericKeys:!0}),y=e()({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});export{h as barrierTypeJsonMap,m as curbApproachJsonMap,y as directionLineTypeJsonMap,p as directionPointTypeJsonMap,t as directionsLengthUnitJsonMap,s as directionsOutputTypeJsonMap,i as directionsTimeUnitJsonMap,A as fullEdgeJsonMap,r as lengthUnitJsonMap,d as locationTypeJsonMap,n as outputLineJsonMap,a as outputPolygonJsonMap,o as restrictUTurnJsonMap,f as sideOfEdgeJsonMap,N as statusJsonMap,u as timeOfDayUsageJsonMap,l as travelDirectionJsonMap,c as travelModeTypeJsonMap};\n"],"sourceRoot":""}