@arcgis/core 4.23.0-next.20220119 → 4.23.0-next.20220123
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/0bf079e752ab79468478.js +1 -0
- package/assets/esri/core/workers/chunks/199670a3a564ebe3bd79.js +1 -0
- package/assets/esri/core/workers/chunks/1e4d37c2b9dc83d20a11.js +1 -0
- package/assets/esri/core/workers/chunks/{99f0d896c17dd09cd285.js → 2629adf79e7fd9f25f07.js} +1 -1
- package/assets/esri/core/workers/chunks/{8a250ec51097f16feb66.js → 40a1e713f63ec77110c0.js} +1 -1
- package/assets/esri/core/workers/chunks/{4b69129c0557852d9b3d.js → 4c9084a04948b6924749.js} +1 -1
- package/assets/esri/core/workers/chunks/{1b28042fdf3f4dbc8ea5.js → 5383a8f3e4ec1a8a4fcd.js} +1 -1
- package/assets/esri/core/workers/chunks/{9d9dffc8884d66a258e4.js → 5538639a49c7cc2eca63.js} +1 -1
- package/assets/esri/core/workers/chunks/5a4a5585ec8027079f32.js +1 -0
- package/assets/esri/core/workers/chunks/663ad15b86936eb06b69.js +1 -0
- package/assets/esri/core/workers/chunks/68a59ce98177d8513337.js +1 -0
- package/assets/esri/core/workers/chunks/739e579150bf466d43ae.js +1 -0
- package/assets/esri/core/workers/chunks/74df1f3e1e2e524a89d2.js +1 -0
- package/assets/esri/core/workers/chunks/7baf6b1f3f050aa67ae4.js +1 -0
- package/assets/esri/core/workers/chunks/{47395d225229d237f0ac.js → 7bc5cc5dbf1b7b70ddac.js} +1 -1
- package/assets/esri/core/workers/chunks/8fa0a14165d43ffe87a5.js +1 -0
- package/assets/esri/core/workers/chunks/94b8dbf859df71858d1c.js +1 -0
- package/assets/esri/core/workers/chunks/{e2d68bcd2f99a65387bf.js → 9cb2ae42a8e328b1d98d.js} +1 -1
- package/assets/esri/core/workers/chunks/9d3c58a0ef634d95b7bd.js +1 -0
- package/assets/esri/core/workers/chunks/a78757b9c7e8cbea08fa.js +1 -0
- package/assets/esri/core/workers/chunks/a96afc176041f698c7a1.js +1 -0
- package/assets/esri/core/workers/chunks/{b10fcbe1393c812fc219.js → aa861b8eae6c85f3dad4.js} +1 -1
- package/assets/esri/core/workers/chunks/{a960074644c3722be71e.js → afa6912454f2a5ffadce.js} +1 -1
- package/assets/esri/core/workers/chunks/b0b036ad3ad3cd956747.js +1 -0
- package/assets/esri/core/workers/chunks/b2beb6e1fd2ee6503830.js +1 -0
- package/assets/esri/core/workers/chunks/bab1cfd0a901181622af.js +1 -0
- package/assets/esri/core/workers/chunks/bf6dda4a2af14c4b7716.js +1 -0
- package/assets/esri/core/workers/chunks/{ed0297fc61014e848c18.js → c080114a69fa95b88d22.js} +1 -1
- package/assets/esri/core/workers/chunks/{573dc3064e84ca86844d.js → c959e0d1cf7dce0421b9.js} +1 -1
- package/assets/esri/core/workers/chunks/{1fd48459afb58a6cf14f.js → ca2f5faa01d99c21ec14.js} +1 -1
- package/assets/esri/core/workers/chunks/{7aa543a97f055cddea99.js → cc146c57bbdac8029fd8.js} +1 -1
- package/assets/esri/core/workers/chunks/{631c5b514bb73782c570.js → cd7d83d127e085d52584.js} +1 -1
- package/assets/esri/core/workers/chunks/{7e596478507466953e65.js → cef4af64860ebbfc1c47.js} +1 -1
- package/assets/esri/core/workers/chunks/d72488db62fcf39447b6.js +1 -0
- package/assets/esri/core/workers/chunks/de6cff7b6cbbf99b20d1.js +981 -0
- package/assets/esri/core/workers/chunks/e079cb1d53aca15b7df2.js +1 -0
- package/assets/esri/core/workers/chunks/{f7fc4c993536e62f7f3e.js → e97e986120aaadad7d4c.js} +1 -1
- package/assets/esri/core/workers/chunks/f8e7755240a94b499e1f.js +1 -0
- package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
- package/chunks/CloudsComposition.glsl.js +4 -4
- package/chunks/vxlLayer.js +1 -1
- package/core/has.js +1 -1
- package/core/workers/workerFactory.js +1 -1
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/interfaces.d.ts +279 -76
- package/layers/RouteLayer.js +1 -1
- package/layers/VoxelLayer.js +1 -1
- package/layers/VoxelWasmPerScene.js +1 -1
- package/layers/support/RasterWorker.js +1 -1
- package/layers/support/rasterDatasets/BaseRaster.js +1 -1
- package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
- package/libs/vxl/enums.js +1 -1
- package/package.json +1 -1
- package/portal/schemas/buildingSceneLayerItem.js +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/portal/schemas/integratedMeshLayerItem.js +1 -1
- package/portal/schemas/pointCloudLayerItem.js +1 -1
- package/portal/schemas/sceneLayerItem.js +1 -1
- package/portal/schemas/webScene.js +1 -1
- package/rest/find.js +1 -1
- package/rest/geometryService/generalize.js +1 -1
- package/rest/geometryService/lengths.js +1 -1
- package/rest/geometryService/offset.js +1 -1
- package/rest/geometryService/relation.js +1 -1
- package/rest/geometryService/trimExtend.js +1 -1
- package/rest/identify.js +1 -1
- package/{tasks → rest}/operations/find.js +0 -0
- package/{tasks → rest}/operations/generalize.js +0 -0
- package/rest/operations/identify.js +5 -0
- package/{tasks → rest}/operations/lengths.js +0 -0
- package/{tasks → rest}/operations/offset.js +0 -0
- package/{tasks → rest}/operations/relation.js +0 -0
- package/{tasks → rest}/operations/trimExtend.js +0 -0
- package/{tasks → rest}/operations/urlUtils.js +0 -0
- package/rest/print.js +1 -1
- package/rest/query/operations/query.js +1 -1
- package/rest/query/operations/queryAttachments.js +1 -1
- package/rest/query/operations/queryRelatedRecords.js +1 -1
- package/rest/query/operations/queryTopFeatures.js +1 -1
- package/rest/route/utils.js +1 -1
- package/rest/support/NetworkServiceDescription.js +1 -1
- package/rest/support/RouteInfo.js +1 -1
- package/rest/support/RouteParameters.js +1 -1
- package/rest/support/RouteSettings.js +5 -0
- package/rest/support/Stop.js +1 -1
- package/rest/support/networkEnums.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/Font.js +1 -1
- package/symbols/TextSymbol.js +1 -1
- package/symbols/TextSymbol3DLayer.js +1 -1
- package/symbols/cim/placements/PlacementAlongLineSameSize.js +1 -1
- package/symbols/support/cimSymbolUtils.js +1 -1
- package/symbols/support/textUtils.js +5 -0
- package/views/2d/layers/features/sources/BaseFeatureSource.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/support/engineHelpers.js +1 -1
- package/views/3d/environment/CloudsComposition.glsl.js +1 -1
- package/views/3d/environment/CloudsComposition.js +1 -1
- package/views/3d/environment/CloudsGenerator.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/GraphicsView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/VoxelLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DDrapedGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
- package/views/3d/layers/graphics/{Graphics3DFeatureLikeLayerView.js → Graphics3DFeatureProcessor.js} +1 -1
- package/views/3d/layers/graphics/Graphics3DFrustumVisibility.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DScaleVisibility.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/{Graphics3DGraphicLikeLayerView.js → GraphicsProcessor.js} +1 -1
- package/views/3d/layers/graphics/IGraphics3DFeatureProcessor.js +4 -0
- package/views/3d/layers/graphics/QueryEngine.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +12 -14
- package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
- package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/webgl/ContextState.js +1 -1
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/Program.js +1 -1
- package/views/webgl/Renderbuffer.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/Util.js +1 -1
- package/views/webgl/enums.js +1 -1
- package/views/webgl/rasterUtils.js +1 -1
- package/views/webgl/testFloatBufferBlend.js +1 -1
- package/widgets/Feature/FeatureExpression.js +1 -1
- package/widgets/Feature/FeatureMedia/FeatureMediaViewModel.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/LayerList/LayerListViewModel.js +1 -1
- package/widgets/support/geolocationUtils.js +1 -1
- package/assets/esri/core/workers/chunks/01ef8de7f76a8c61b464.js +0 -1
- package/assets/esri/core/workers/chunks/05db312a0ca6bd3f014a.js +0 -1
- package/assets/esri/core/workers/chunks/0f254c3e91e8fee55f28.js +0 -1
- package/assets/esri/core/workers/chunks/21a77eed1a4ef5b0ff08.js +0 -1
- package/assets/esri/core/workers/chunks/3564e14010953def6df9.js +0 -1
- package/assets/esri/core/workers/chunks/403c7d64f12f00330d88.js +0 -1
- package/assets/esri/core/workers/chunks/4409d77c9734de4e82a7.js +0 -1
- package/assets/esri/core/workers/chunks/615aa2d3ecafe30c80c0.js +0 -1
- package/assets/esri/core/workers/chunks/618076e6de605873e433.js +0 -1
- package/assets/esri/core/workers/chunks/6c1e92ff4c732dfda756.js +0 -1
- package/assets/esri/core/workers/chunks/722a10c65456844d72b9.js +0 -1
- package/assets/esri/core/workers/chunks/75d53b28afe732c459b2.js +0 -1
- package/assets/esri/core/workers/chunks/8fdd5bca3716816d359b.js +0 -1
- package/assets/esri/core/workers/chunks/a28b53c61bddefb6616e.js +0 -1
- package/assets/esri/core/workers/chunks/b9de831ac379cf1d2969.js +0 -1
- package/assets/esri/core/workers/chunks/c3eca92d02958732e141.js +0 -1
- package/assets/esri/core/workers/chunks/c8f976e53e232e8da9cc.js +0 -981
- package/assets/esri/core/workers/chunks/cb68db7169b9dfd1c3ff.js +0 -1
- package/assets/esri/core/workers/chunks/cc96608b2802fbfe7a08.js +0 -1
- package/assets/esri/core/workers/chunks/cd02fe27eb07681cb366.js +0 -1
- package/assets/esri/core/workers/chunks/dd433c160f7a0c120b82.js +0 -1
- package/assets/esri/core/workers/chunks/ef8b75b92cf549e0507e.js +0 -1
- package/symbols/support/constants.js +0 -5
- package/tasks/operations/identify.js +0 -5
package/rest/support/Stop.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../PopupTemplate.js";import{symbolTypes as i}from"../../symbols.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{clone as a}from"../../core/lang.js";import{isNone as s,isSome as o,unwrap as l}from"../../core/maybe.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import{reader as u}from"../../core/accessorSupport/decorators/reader.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{writer as d}from"../../core/accessorSupport/decorators/writer.js";import m from"../../geometry/Point.js";import{getTimezoneOffset as b,getPrefixedProperties as c}from"../route/utils.js";import{curbApproachJsonMap as v,locationTypeJsonMap as T,sideOfEdgeJsonMap as f,statusJsonMap as h}from"./networkEnums.js";import{fromJSON as y}from"../../symbols/support/jsonUtils.js";var C;let S=C=class extends r{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.geometry=null,this.lateMinutes=null,this.locationType=null,this.name=null,this.navLatency=null,this.objectId=null,this.popupTemplate=null,this.posAlong=null,this.routeName=null,this.serviceCosts=null,this.serviceDistance=null,this.serviceTime=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.waitTime=null}readArriveTimeOffset(e,t){return b(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return c(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return b(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return c(t.attributes,"Attr_")}writeServiceCosts(e,t){if(!s(e)){t.attributes||(t.attributes={});for(const i in e)t.attributes[`Attr_${i}`]=e[i]}}writeTimeWindowEnd(e,t){s(e)||(t.attributes||(t.attributes={}),t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){s(e)||(t.attributes||(t.attributes={}),t.attributes.TimeWindowStart=e.getTime())}static fromPortalJSON(e){var i,r,a,s,l,n,u,p,d,b;return new C({arriveCurbApproach:o(e.attributes.ArrivalCurbApproach)?v.fromJSON(e.attributes.ArrivalCurbApproach):null,arriveTime:o(e.attributes.ArrivalTime)?new Date(e.attributes.ArrivalTime):null,arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:o(e.attributes.CumulativeCosts)?JSON.parse(e.attributes.CumulativeCosts):null,cumulativeDistance:null!=(i=e.attributes.CumulativeMeters)?i:null,cumulativeDuration:null!=(r=e.attributes.CumulativeMinutes)?r:null,curbApproach:o(e.attributes.CurbApproach)?v.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:o(e.attributes.DepartureCurbApproach)?v.fromJSON(e.attributes.DepartureCurbApproach):null,departTime:o(e.attributes.DepartureTime)?new Date(e.attributes.DepartureTime):null,departTimeOffset:null!=(a=e.attributes.DepartureUTCOffset)?a:null,geometry:m.fromJSON(e.geometry),lateMinutes:null!=(s=e.attributes.LateMinutes)?s:null,locationType:o(e.attributes.LocationType)?T.fromJSON(e.attributes.LocationType):null,name:e.attributes.Name,objectId:e.attributes.__OBJECTID,popupTemplate:o(e.popupInfo)?t.fromJSON(e.popupInfo):null,routeName:e.attributes.RouteName,sequence:null!=(l=e.attributes.Sequence)?l:null,serviceCosts:o(e.attributes.ServiceCosts)?JSON.parse(e.attributes.ServiceCosts):null,serviceDistance:null!=(n=e.attributes.ServiceMeters)?n:null,serviceTime:null!=(u=e.attributes.ServiceMinutes)?u:null,status:o(e.attributes.Status)?h.fromJSON(e.attributes.Status):null,symbol:o(e.symbol)?y(e.symbol):null,timeWindowEnd:o(e.attributes.TimeWindowEnd)?new Date(e.attributes.TimeWindowEnd):null,timeWindowEndOffset:null!=(p=e.attributes.TimeWindowEndUTCOffset)?p:null,timeWindowStart:o(e.attributes.TimeWindowStart)?new Date(e.attributes.TimeWindowStart):null,timeWindowStartOffset:null!=(d=e.attributes.TimeWindowStartUTCOffset)?d:null,waitTime:null!=(b=e.attributes.WaitMinutes)?b:null})}clone(){return new C(a({arriveCurbApproach:this.arriveCurbApproach,arriveTime:this.arriveTime,arriveTimeOffset:this.arriveTimeOffset,bearing:this.bearing,bearingTol:this.bearingTol,cumulativeCosts:this.cumulativeCosts,cumulativeDistance:this.cumulativeDistance,cumulativeTime:this.cumulativeDuration,curbApproach:this.curbApproach,departCurbApproach:this.departCurbApproach,departTime:this.departTime,departTimeOffset:this.departTimeOffset,distanceToNetworkInMeters:this.distanceToNetworkInMeters,geometry:this.geometry,lateMinutes:this.lateMinutes,locationType:this.locationType,name:this.name,navLatency:this.navLatency,objectId:this.objectId,popupTemplate:this.popupTemplate,posAlong:this.posAlong,routeName:this.routeName,serviceCosts:this.serviceCosts,serviceDistance:this.serviceDistance,serviceTime:this.serviceTime,sequence:this.sequence,sideOfEdge:this.sideOfEdge,snapX:this.snapX,snapY:this.snapY,snapZ:this.snapZ,sourceId:this.sourceId,sourceOid:this.sourceOid,status:this.status,symbol:this.symbol,timeWindowEnd:this.timeWindowEnd,timeWindowEndOffset:this.timeWindowEndOffset,timeWindowStart:this.timeWindowStart,timeWindowStartOffset:this.timeWindowStartOffset,waitTime:this.waitTime}))}toPortalJSON(){var e,t;return{geometry:o(this.geometry)?this.geometry.toJSON():null,attributes:{__OBJECTID:l(this.objectId),ArrivalCurbApproach:o(this.arriveCurbApproach)?v.toJSON(this.arriveCurbApproach):null,ArrivalTime:o(this.arriveTime)?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:o(this.cumulativeCosts)?JSON.stringify(this.cumulativeCosts):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:o(this.curbApproach)?v.toJSON(this.curbApproach):null,DepartureCurbApproach:o(this.departCurbApproach)?v.toJSON(this.departCurbApproach):null,DepartureTime:o(this.departTime)?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateMinutes,LocationType:o(this.locationType)?T.toJSON(this.locationType):null,Name:l(this.name),RouteName:l(this.routeName),Sequence:this.sequence,ServiceCosts:o(this.serviceCosts)?JSON.stringify(this.serviceCosts):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceTime,Status:o(this.status)?h.toJSON(this.status):null,TimeWindowEnd:o(this.timeWindowEnd)?this.timeWindowEnd.getTime():null,TimeWindowEndUTCOffset:null!=(e=this.timeWindowEndOffset)?e:this.arriveTimeOffset,TimeWindowStart:o(this.timeWindowStart)?this.timeWindowStart.getTime():null,TimeWindowStartUTCOffset:null!=(t=this.timeWindowEndOffset)?t:this.arriveTimeOffset,WaitMinutes:this.waitTime},symbol:o(this.symbol)?this.symbol.toJSON():null,popupInfo:o(this.popupTemplate)?this.popupTemplate.toJSON():null}}};S.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"ArrivalCurbApproach",alias:"Arrival Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"ArrivalUTCOffset",alias:"Arrival Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"CumulativeCosts",alias:"Cumulative Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"CumulativeMeters",alias:"Cumulative Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"CumulativeMinutes",alias:"Cumulative Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"DepartureCurbApproach",alias:"Departure Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"DepartureTime",alias:"Departure Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"DepartureUTCOffset",alias:"Departure Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"LateMinutes",alias:"Minutes Late",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"LocationType",alias:"Location Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNALocationType",codedValues:[{name:"Stop",code:0},{name:"Waypoint",code:1}]}},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"ServiceCosts",alias:"Service Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"ServiceMeters",alias:"Service Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"ServiceMinutes",alias:"Service Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAObjectStatus",codedValues:[{name:"OK",code:0},{name:"Not Located on Network",code:1},{name:"Network Unbuilt",code:2},{name:"Prohibited Street",code:3},{name:"Invalid Field Values",code:4},{name:"Cannot Reach",code:5},{name:"Time Window Violation",code:6}]}},{name:"TimeWindowEnd",alias:"Time Window End",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!1},{name:"TimeWindowEndUTCOffset",alias:"Time Window End: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TimeWindowStart",alias:"Time Window Start",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!1},{name:"TimeWindowStartUTCOffset",alias:"Time Window Start: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"WaitMinutes",alias:"Minutes Early",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1}],S.popupInfo={title:"{Name}",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"RouteName",label:"Route Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Sequence",label:"Sequence",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalTime",label:"Arrival Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"ArrivalUTCOffset",label:"Arrival Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureTime",label:"Departure Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"DepartureUTCOffset",label:"Departure Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CurbApproach",label:"Curb Approach",isEditable:!0,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalCurbApproach",label:"Arrival Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureCurbApproach",label:"Departure Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Status",label:"Status",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"LocationType",label:"Location Type",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowStart",label:"Time Window Start",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowStartUTCOffset",label:"Time Window Start: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowEnd",label:"Time Window End",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowEndUTCOffset",label:"Time Window End: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMinutes",label:"Service Minutes",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMeters",label:"Service Meters",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceCosts",label:"Service Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"CumulativeMinutes",label:"Cumulative Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeMeters",label:"Cumulative Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeCosts",label:"Cumulative Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"LateMinutes",label:"Minutes Late",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"WaitMinutes",label:"Minutes Early",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},e([n({type:v.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:v.read}}})],S.prototype,"arriveCurbApproach",void 0),e([n({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],S.prototype,"arriveTime",void 0),e([n()],S.prototype,"arriveTimeOffset",void 0),e([u("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],S.prototype,"readArriveTimeOffset",null),e([n({json:{name:"attributes.Bearing",read:!1,write:!0}})],S.prototype,"bearing",void 0),e([n({json:{name:"attributes.BearingTol",read:!1,write:!0}})],S.prototype,"bearingTol",void 0),e([n()],S.prototype,"cumulativeCosts",void 0),e([u("cumulativeCosts",["attributes"])],S.prototype,"readCumulativeCosts",null),e([n({json:{read:!1}})],S.prototype,"cumulativeDistance",void 0),e([n({json:{read:!1}})],S.prototype,"cumulativeDuration",void 0),e([n({type:v.apiValues,json:{name:"attributes.CurbApproach",read:{reader:v.read},write:{writer:v.write}}})],S.prototype,"curbApproach",void 0),e([n({type:v.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:v.read}}})],S.prototype,"departCurbApproach",void 0),e([n({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],S.prototype,"departTime",void 0),e([n()],S.prototype,"departTimeOffset",void 0),e([u("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],S.prototype,"readDepartTimeOffset",null),e([n({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],S.prototype,"distanceToNetworkInMeters",void 0),e([n({type:m,json:{write:!0}})],S.prototype,"geometry",void 0),e([n({json:{name:"attributes.LateMinutes",read:!1}})],S.prototype,"lateMinutes",void 0),e([n({type:T.apiValues,json:{name:"attributes.LocationType",read:{reader:T.read},write:{writer:T.write}}})],S.prototype,"locationType",void 0),e([n({json:{name:"attributes.Name",write:!0}})],S.prototype,"name",void 0),e([n({json:{read:{source:"attributes.NavLatency"}}})],S.prototype,"navLatency",void 0),e([n({json:{name:"attributes.ObjectID",write:!0}})],S.prototype,"objectId",void 0),e([n({type:t,json:{read:!1}})],S.prototype,"popupTemplate",void 0),e([n({json:{read:{source:"attributes.PosAlong"}}})],S.prototype,"posAlong",void 0),e([n({json:{name:"attributes.RouteName",write:!0}})],S.prototype,"routeName",void 0),e([n()],S.prototype,"serviceCosts",void 0),e([u("serviceCosts",["attributes"])],S.prototype,"readServiceCosts",null),e([d("serviceCosts")],S.prototype,"writeServiceCosts",null),e([n({json:{read:!1}})],S.prototype,"serviceDistance",void 0),e([n({json:{read:!1}})],S.prototype,"serviceTime",void 0),e([n({json:{name:"attributes.Sequence",write:!0}})],S.prototype,"sequence",void 0),e([n({type:f.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:f.read}}})],S.prototype,"sideOfEdge",void 0),e([n({json:{read:{source:"attributes.SnapX"}}})],S.prototype,"snapX",void 0),e([n({json:{read:{source:"attributes.SnapY"}}})],S.prototype,"snapY",void 0),e([n({json:{read:{source:"attributes.SnapZ"}}})],S.prototype,"snapZ",void 0),e([n({json:{read:{source:"attributes.SourceID"}}})],S.prototype,"sourceId",void 0),e([n({json:{read:{source:"attributes.SourceOID"}}})],S.prototype,"sourceOid",void 0),e([n({type:h.apiValues,json:{read:{source:"attributes.Status",reader:h.read}}})],S.prototype,"status",void 0),e([n({types:i,json:{read:!1}})],S.prototype,"symbol",void 0),e([n({type:Date,json:{name:"attributes.TimeWindowEnd"}})],S.prototype,"timeWindowEnd",void 0),e([d("timeWindowEnd")],S.prototype,"writeTimeWindowEnd",null),e([n({json:{read:!1}})],S.prototype,"timeWindowEndOffset",void 0),e([n({type:Date,json:{name:"attributes.TimeWindowStart"}})],S.prototype,"timeWindowStart",void 0),e([d("timeWindowStart")],S.prototype,"writeTimeWindowStart",null),e([n({json:{read:!1}})],S.prototype,"timeWindowStartOffset",void 0),e([n({json:{read:!1}})],S.prototype,"waitTime",void 0),S=C=e([p("esri.layers.support.Stop")],S);const O=S;export{O as default};
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../PopupTemplate.js";import{symbolTypes as i}from"../../symbols.js";import{JSONSupport as r}from"../../core/JSONSupport.js";import{clone as a}from"../../core/lang.js";import{isNone as s,isSome as o,unwrap as l}from"../../core/maybe.js";import{property as n}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import{reader as u}from"../../core/accessorSupport/decorators/reader.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{writer as d}from"../../core/accessorSupport/decorators/writer.js";import m from"../../geometry/Point.js";import{getTimezoneOffset as b,getPrefixedProperties as c}from"../route/utils.js";import{curbApproachJsonMap as v,locationTypeJsonMap as h,sideOfEdgeJsonMap as f,statusJsonMap as T}from"./networkEnums.js";import{fromJSON as y}from"../../symbols/support/jsonUtils.js";var C;let S=C=class extends r{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.geometry=null,this.lateDuration=null,this.locationType=null,this.name=null,this.navLatency=null,this.objectId=null,this.popupTemplate=null,this.posAlong=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.violations=null,this.waitDuration=null,this.wait=null}readArriveTimeOffset(e,t){return b(t.attributes.ArriveTime,t.attributes.ArriveTimeUTC)}readCumulativeCosts(e,t){return c(t.attributes,"Cumul_")}readDepartTimeOffset(e,t){return b(t.attributes.DepartTime,t.attributes.DepartTimeUTC)}readServiceCosts(e,t){return c(t.attributes,"Attr_")}writeServiceCosts(e,t){if(!s(e)){t.attributes||(t.attributes={});for(const i in e)t.attributes[`Attr_${i}`]=e[i]}}writeTimeWindowEnd(e,t){s(e)||(t.attributes||(t.attributes={}),t.attributes.TimeWindowEnd=e.getTime())}writeTimeWindowStart(e,t){s(e)||(t.attributes||(t.attributes={}),t.attributes.TimeWindowStart=e.getTime())}readViolations(e,t){return c(t.attributes,"Violation_")}readWait(e,t){return c(t.attributes,"Wait_")}static fromPortalJSON(e){var i,r,a,s,l,n,u,p,d,b;return new C({arriveCurbApproach:o(e.attributes.ArrivalCurbApproach)?v.fromJSON(e.attributes.ArrivalCurbApproach):null,arriveTime:o(e.attributes.ArrivalTime)?new Date(e.attributes.ArrivalTime):null,arriveTimeOffset:e.attributes.ArrivalUTCOffset,cumulativeCosts:o(e.attributes.CumulativeCosts)?JSON.parse(e.attributes.CumulativeCosts):null,cumulativeDistance:null!=(i=e.attributes.CumulativeMeters)?i:null,cumulativeDuration:null!=(r=e.attributes.CumulativeMinutes)?r:null,curbApproach:o(e.attributes.CurbApproach)?v.fromJSON(e.attributes.CurbApproach):null,departCurbApproach:o(e.attributes.DepartureCurbApproach)?v.fromJSON(e.attributes.DepartureCurbApproach):null,departTime:o(e.attributes.DepartureTime)?new Date(e.attributes.DepartureTime):null,departTimeOffset:null!=(a=e.attributes.DepartureUTCOffset)?a:null,geometry:m.fromJSON(e.geometry),lateDuration:null!=(s=e.attributes.LateMinutes)?s:null,locationType:o(e.attributes.LocationType)?h.fromJSON(e.attributes.LocationType):null,name:e.attributes.Name,objectId:e.attributes.__OBJECTID,popupTemplate:o(e.popupInfo)?t.fromJSON(e.popupInfo):null,routeName:e.attributes.RouteName,sequence:null!=(l=e.attributes.Sequence)?l:null,serviceCosts:o(e.attributes.ServiceCosts)?JSON.parse(e.attributes.ServiceCosts):null,serviceDistance:null!=(n=e.attributes.ServiceMeters)?n:null,serviceDuration:null!=(u=e.attributes.ServiceMinutes)?u:null,status:o(e.attributes.Status)?T.fromJSON(e.attributes.Status):null,symbol:o(e.symbol)?y(e.symbol):null,timeWindowEnd:o(e.attributes.TimeWindowEnd)?new Date(e.attributes.TimeWindowEnd):null,timeWindowEndOffset:null!=(p=e.attributes.TimeWindowEndUTCOffset)?p:null,timeWindowStart:o(e.attributes.TimeWindowStart)?new Date(e.attributes.TimeWindowStart):null,timeWindowStartOffset:null!=(d=e.attributes.TimeWindowStartUTCOffset)?d:null,waitDuration:null!=(b=e.attributes.WaitMinutes)?b:null})}clone(){return new C(a({arriveCurbApproach:this.arriveCurbApproach,arriveTime:this.arriveTime,arriveTimeOffset:this.arriveTimeOffset,bearing:this.bearing,bearingTol:this.bearingTol,cumulativeCosts:this.cumulativeCosts,cumulativeDistance:this.cumulativeDistance,cumulativeTime:this.cumulativeDuration,curbApproach:this.curbApproach,departCurbApproach:this.departCurbApproach,departTime:this.departTime,departTimeOffset:this.departTimeOffset,distanceToNetworkInMeters:this.distanceToNetworkInMeters,geometry:this.geometry,lateDuration:this.lateDuration,locationType:this.locationType,name:this.name,navLatency:this.navLatency,objectId:this.objectId,popupTemplate:this.popupTemplate,posAlong:this.posAlong,routeName:this.routeName,serviceCosts:this.serviceCosts,serviceDistance:this.serviceDistance,serviceDuration:this.serviceDuration,sequence:this.sequence,sideOfEdge:this.sideOfEdge,snapX:this.snapX,snapY:this.snapY,snapZ:this.snapZ,sourceId:this.sourceId,sourceOid:this.sourceOid,status:this.status,symbol:this.symbol,timeWindowEnd:this.timeWindowEnd,timeWindowEndOffset:this.timeWindowEndOffset,timeWindowStart:this.timeWindowStart,timeWindowStartOffset:this.timeWindowStartOffset,waitDuration:this.waitDuration}))}toPortalJSON(){var e,t;return{geometry:o(this.geometry)?this.geometry.toJSON():null,attributes:{__OBJECTID:l(this.objectId),ArrivalCurbApproach:o(this.arriveCurbApproach)?v.toJSON(this.arriveCurbApproach):null,ArrivalTime:o(this.arriveTime)?this.arriveTime.getTime():null,ArrivalUTCOffset:this.arriveTimeOffset,CumulativeCosts:o(this.cumulativeCosts)?JSON.stringify(this.cumulativeCosts):null,CumulativeMeters:this.cumulativeDistance,CumulativeMinutes:this.cumulativeDuration,CurbApproach:o(this.curbApproach)?v.toJSON(this.curbApproach):null,DepartureCurbApproach:o(this.departCurbApproach)?v.toJSON(this.departCurbApproach):null,DepartureTime:o(this.departTime)?this.departTime.getTime():null,DepartureUTCOffset:this.departTimeOffset,LateMinutes:this.lateDuration,LocationType:o(this.locationType)?h.toJSON(this.locationType):null,Name:l(this.name),RouteName:l(this.routeName),Sequence:this.sequence,ServiceCosts:o(this.serviceCosts)?JSON.stringify(this.serviceCosts):null,ServiceMeters:this.serviceDistance,ServiceMinutes:this.serviceDuration,Status:o(this.status)?T.toJSON(this.status):null,TimeWindowEnd:o(this.timeWindowEnd)?this.timeWindowEnd.getTime():null,TimeWindowEndUTCOffset:null!=(e=this.timeWindowEndOffset)?e:this.arriveTimeOffset,TimeWindowStart:o(this.timeWindowStart)?this.timeWindowStart.getTime():null,TimeWindowStartUTCOffset:null!=(t=this.timeWindowEndOffset)?t:this.arriveTimeOffset,WaitMinutes:this.waitDuration},symbol:o(this.symbol)?this.symbol.toJSON():null,popupInfo:o(this.popupTemplate)?this.popupTemplate.toJSON():null}}};S.fields=[{name:"__OBJECTID",alias:"OBJECTID",type:"esriFieldTypeOID",editable:!1,nullable:!1,domain:null},{name:"ArrivalCurbApproach",alias:"Arrival Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"ArrivalTime",alias:"Arrival Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"ArrivalUTCOffset",alias:"Arrival Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"CumulativeCosts",alias:"Cumulative Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"CumulativeMeters",alias:"Cumulative Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"CumulativeMinutes",alias:"Cumulative Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!0},{name:"CurbApproach",alias:"Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!1,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"DepartureCurbApproach",alias:"Departure Curb Approach",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNACurbApproachType",codedValues:[{name:"Either side",code:0},{name:"From the right",code:1},{name:"From the left",code:2},{name:"Depart in the same direction",code:3}]}},{name:"DepartureTime",alias:"Departure Time",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!0},{name:"DepartureUTCOffset",alias:"Departure Time: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"LateMinutes",alias:"Minutes Late",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"LocationType",alias:"Location Type",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNALocationType",codedValues:[{name:"Stop",code:0},{name:"Waypoint",code:1}]}},{name:"Name",alias:"Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"RouteName",alias:"Route Name",type:"esriFieldTypeString",length:255,editable:!0,nullable:!0,visible:!0},{name:"Sequence",alias:"Sequence",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"ServiceCosts",alias:"Service Costs",type:"esriFieldTypeString",length:1048576,editable:!0,nullable:!0,visible:!1,domain:null},{name:"ServiceMeters",alias:"Service Meters",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"ServiceMinutes",alias:"Service Minutes",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1},{name:"Status",alias:"Status",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0,domain:{type:"codedValue",name:"esriNAObjectStatus",codedValues:[{name:"OK",code:0},{name:"Not Located on Network",code:1},{name:"Network Unbuilt",code:2},{name:"Prohibited Street",code:3},{name:"Invalid Field Values",code:4},{name:"Cannot Reach",code:5},{name:"Time Window Violation",code:6}]}},{name:"TimeWindowEnd",alias:"Time Window End",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!1},{name:"TimeWindowEndUTCOffset",alias:"Time Window End: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"TimeWindowStart",alias:"Time Window Start",type:"esriFieldTypeDate",length:36,editable:!0,nullable:!0,visible:!1},{name:"TimeWindowStartUTCOffset",alias:"Time Window Start: Offset from UTC in Minutes",type:"esriFieldTypeInteger",editable:!0,nullable:!0,visible:!0},{name:"WaitMinutes",alias:"Minutes Early",type:"esriFieldTypeDouble",editable:!0,nullable:!0,visible:!1}],S.popupInfo={title:"{Name}",fieldInfos:[{fieldName:"Name",label:"Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"RouteName",label:"Route Name",isEditable:!0,tooltip:"",visible:!0,stringFieldOption:"textbox"},{fieldName:"Sequence",label:"Sequence",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalTime",label:"Arrival Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"ArrivalUTCOffset",label:"Arrival Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureTime",label:"Departure Time",isEditable:!0,tooltip:"",visible:!0,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"DepartureUTCOffset",label:"Departure Time: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CurbApproach",label:"Curb Approach",isEditable:!0,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ArrivalCurbApproach",label:"Arrival Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"DepartureCurbApproach",label:"Departure Curb Approach",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"Status",label:"Status",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"LocationType",label:"Location Type",isEditable:!1,tooltip:"",visible:!0,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowStart",label:"Time Window Start",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowStartUTCOffset",label:"Time Window Start: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"TimeWindowEnd",label:"Time Window End",isEditable:!0,tooltip:"",visible:!1,format:{dateFormat:"shortDateShortTime24"},stringFieldOption:"textbox"},{fieldName:"TimeWindowEndUTCOffset",label:"Time Window End: Offset from UTC in Minutes",isEditable:!1,tooltip:"",visible:!1,format:{places:0,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMinutes",label:"Service Minutes",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceMeters",label:"Service Meters",isEditable:!0,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"ServiceCosts",label:"Service Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"CumulativeMinutes",label:"Cumulative Minutes",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeMeters",label:"Cumulative Meters",isEditable:!1,tooltip:"",visible:!0,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"CumulativeCosts",label:"Cumulative Costs",isEditable:!0,tooltip:"",visible:!1,stringFieldOption:"textbox"},{fieldName:"LateMinutes",label:"Minutes Late",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"},{fieldName:"WaitMinutes",label:"Minutes Early",isEditable:!1,tooltip:"",visible:!1,format:{places:2,digitSeparator:!0},stringFieldOption:"textbox"}],description:null,showAttachments:!1,mediaInfos:[]},e([n({type:v.apiValues,json:{read:{source:"attributes.ArrivalCurbApproach",reader:v.read}}})],S.prototype,"arriveCurbApproach",void 0),e([n({type:Date,json:{read:{source:"attributes.ArriveTimeUTC"}}})],S.prototype,"arriveTime",void 0),e([n()],S.prototype,"arriveTimeOffset",void 0),e([u("arriveTimeOffset",["attributes.ArriveTime","attributes.ArriveTimeUTC"])],S.prototype,"readArriveTimeOffset",null),e([n({json:{name:"attributes.Bearing",read:!1,write:!0}})],S.prototype,"bearing",void 0),e([n({json:{name:"attributes.BearingTol",read:!1,write:!0}})],S.prototype,"bearingTol",void 0),e([n()],S.prototype,"cumulativeCosts",void 0),e([u("cumulativeCosts",["attributes"])],S.prototype,"readCumulativeCosts",null),e([n({json:{read:!1}})],S.prototype,"cumulativeDistance",void 0),e([n({json:{read:!1}})],S.prototype,"cumulativeDuration",void 0),e([n({type:v.apiValues,json:{name:"attributes.CurbApproach",read:{reader:v.read},write:{writer:v.write}}})],S.prototype,"curbApproach",void 0),e([n({type:v.apiValues,json:{read:{source:"attributes.DepartCurbApproach",reader:v.read}}})],S.prototype,"departCurbApproach",void 0),e([n({type:Date,json:{read:{source:"attributes.DepartTimeUTC"}}})],S.prototype,"departTime",void 0),e([n()],S.prototype,"departTimeOffset",void 0),e([u("departTimeOffset",["attributes.DepartTime","attributes.DepartTimeUTC"])],S.prototype,"readDepartTimeOffset",null),e([n({json:{read:{source:"attributes.DistanceToNetworkInMeters"}}})],S.prototype,"distanceToNetworkInMeters",void 0),e([n({type:m,json:{write:!0}})],S.prototype,"geometry",void 0),e([n({json:{name:"attributes.LateMinutes",read:!1}})],S.prototype,"lateDuration",void 0),e([n({type:h.apiValues,json:{name:"attributes.LocationType",read:{reader:h.read},write:{writer:h.write}}})],S.prototype,"locationType",void 0),e([n({json:{name:"attributes.Name",write:!0}})],S.prototype,"name",void 0),e([n({json:{read:{source:"attributes.NavLatency"}}})],S.prototype,"navLatency",void 0),e([n({json:{name:"attributes.ObjectID",write:!0}})],S.prototype,"objectId",void 0),e([n({type:t,json:{read:!1}})],S.prototype,"popupTemplate",void 0),e([n({json:{read:{source:"attributes.PosAlong"}}})],S.prototype,"posAlong",void 0),e([n({json:{name:"attributes.RouteName",write:!0}})],S.prototype,"routeName",void 0),e([n()],S.prototype,"serviceCosts",void 0),e([u("serviceCosts",["attributes"])],S.prototype,"readServiceCosts",null),e([d("serviceCosts")],S.prototype,"writeServiceCosts",null),e([n({json:{read:!1}})],S.prototype,"serviceDistance",void 0),e([n({json:{read:!1}})],S.prototype,"serviceDuration",void 0),e([n({json:{name:"attributes.Sequence",write:!0}})],S.prototype,"sequence",void 0),e([n({type:f.apiValues,json:{read:{source:"attributes.SideOfEdge",reader:f.read}}})],S.prototype,"sideOfEdge",void 0),e([n({json:{read:{source:"attributes.SnapX"}}})],S.prototype,"snapX",void 0),e([n({json:{read:{source:"attributes.SnapY"}}})],S.prototype,"snapY",void 0),e([n({json:{read:{source:"attributes.SnapZ"}}})],S.prototype,"snapZ",void 0),e([n({json:{read:{source:"attributes.SourceID"}}})],S.prototype,"sourceId",void 0),e([n({json:{read:{source:"attributes.SourceOID"}}})],S.prototype,"sourceOid",void 0),e([n({type:T.apiValues,json:{read:{source:"attributes.Status",reader:T.read}}})],S.prototype,"status",void 0),e([n({types:i,json:{read:!1}})],S.prototype,"symbol",void 0),e([n({type:Date,json:{name:"attributes.TimeWindowEnd"}})],S.prototype,"timeWindowEnd",void 0),e([d("timeWindowEnd")],S.prototype,"writeTimeWindowEnd",null),e([n({json:{read:!1}})],S.prototype,"timeWindowEndOffset",void 0),e([n({type:Date,json:{name:"attributes.TimeWindowStart"}})],S.prototype,"timeWindowStart",void 0),e([d("timeWindowStart")],S.prototype,"writeTimeWindowStart",null),e([n({json:{read:!1}})],S.prototype,"timeWindowStartOffset",void 0),e([n()],S.prototype,"violations",void 0),e([u("violations",["attributes"])],S.prototype,"readViolations",null),e([n({json:{read:!1}})],S.prototype,"waitDuration",void 0),e([n()],S.prototype,"wait",void 0),e([u("wait",["attributes"])],S.prototype,"readWait",null),S=C=e([p("esri.layers.support.Stop")],S);const O=S;export{O as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{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",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()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),
|
|
5
|
+
import{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",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"}),a=e()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),n=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,a as outputLineJsonMap,n as outputPolygonJsonMap,o as restrictUTurnJsonMap,f as sideOfEdgeJsonMap,N as statusJsonMap,u as timeOfDayUsageJsonMap,l as travelDirectionJsonMap,c as travelModeTypeJsonMap};
|
package/support/revision.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
const
|
|
5
|
+
const b="20220123",f="b559b44999b4f71651f90e9877fb96f5236d3c50";export{b as buildDate,f as commitHash};
|
package/symbols/Font.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../chunks/tslib.es6.js";import{JSONSupport as o}from"../core/JSONSupport.js";import{toPt as e}from"../core/screenUtils.js";import{property as
|
|
5
|
+
import{_ as t}from"../chunks/tslib.es6.js";import{JSONSupport as o}from"../core/JSONSupport.js";import{toPt as e}from"../core/screenUtils.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import"../core/has.js";import{cast as s}from"../core/accessorSupport/decorators/cast.js";import{subclass as i}from"../core/accessorSupport/decorators/subclass.js";import{FONT_DECORATIONS as p,FONT_STYLES as a,FONT_WEIGHTS as c}from"./support/textUtils.js";var n;let l=n=class extends o{constructor(t){super(t),this.decoration="none",this.family="sans-serif",this.size=9,this.style="normal",this.weight="normal"}castSize(t){return e(t)}clone(){return new n({decoration:this.decoration,family:this.family,size:this.size,style:this.style,weight:this.weight})}hash(){return`${this.decoration}.${this.family}.${this.size}.${this.style}.${this.weight}`}};t([r({type:p,json:{default:"none",write:!0}})],l.prototype,"decoration",void 0),t([r({type:String,json:{write:!0}})],l.prototype,"family",void 0),t([r({type:Number,json:{write:{overridePolicy:(t,o,e)=>({enabled:!e||!e.textSymbol3D})}}})],l.prototype,"size",void 0),t([s("size")],l.prototype,"castSize",null),t([r({type:a,json:{default:"normal",write:!0}})],l.prototype,"style",void 0),t([r({type:c,json:{default:"normal",write:!0}})],l.prototype,"weight",void 0),l=n=t([i("esri.symbols.Font")],l);const m=l;export{m as default};
|
package/symbols/TextSymbol.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../chunks/tslib.es6.js";import o from"../Color.js";import{clone as e}from"../core/lang.js";import{toPt as i}from"../core/screenUtils.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import{cast as s}from"../core/accessorSupport/decorators/cast.js";import{enumeration as n}from"../core/accessorSupport/decorators/enumeration.js";import{subclass as h}from"../core/accessorSupport/decorators/subclass.js";import{writer as l}from"../core/accessorSupport/decorators/writer.js";import p from"./Font.js";import a from"./Symbol.js";
|
|
5
|
+
import{_ as t}from"../chunks/tslib.es6.js";import o from"../Color.js";import{clone as e}from"../core/lang.js";import{toPt as i}from"../core/screenUtils.js";import{property as r}from"../core/accessorSupport/decorators/property.js";import{cast as s}from"../core/accessorSupport/decorators/cast.js";import{enumeration as n}from"../core/accessorSupport/decorators/enumeration.js";import{subclass as h}from"../core/accessorSupport/decorators/subclass.js";import{writer as l}from"../core/accessorSupport/decorators/writer.js";import p from"./Font.js";import a from"./Symbol.js";import{lineHeightProperty as d}from"./support/textUtils.js";var c;let y=c=class extends a{constructor(...t){super(...t),this.backgroundColor=null,this.borderLineColor=null,this.borderLineSize=null,this.font=new p,this.horizontalAlignment="center",this.kerning=!0,this.haloColor=null,this.haloSize=null,this.rightToLeft=null,this.rotated=!1,this.text="",this.type="text",this.verticalAlignment="baseline",this.xoffset=0,this.yoffset=0,this.angle=0,this.width=null,this.lineWidth=192,this.lineHeight=1}normalizeCtorArgs(t,o,e){if(t&&"string"!=typeof t)return t;const i={};return t&&(i.text=t),o&&(i.font=o),e&&(i.color=e),i}writeLineWidth(t,o,e,i){i&&"string"!=typeof i?i.origin:o[e]=t}castLineWidth(t){return i(t)}writeLineHeight(t,o,e,i){i&&"string"!=typeof i?i.origin:o[e]=t}clone(){return new c({angle:this.angle,backgroundColor:e(this.backgroundColor),borderLineColor:e(this.borderLineColor),borderLineSize:this.borderLineSize,color:e(this.color),font:this.font&&this.font.clone(),haloColor:e(this.haloColor),haloSize:this.haloSize,horizontalAlignment:this.horizontalAlignment,kerning:this.kerning,lineHeight:this.lineHeight,lineWidth:this.lineWidth,rightToLeft:this.rightToLeft,rotated:this.rotated,text:this.text,verticalAlignment:this.verticalAlignment,width:this.width,xoffset:this.xoffset,yoffset:this.yoffset})}hash(){return`${this.backgroundColor&&this.backgroundColor.hash()}.${this.borderLineColor}.${this.borderLineSize}.${this.color.hash()}.${this.font&&this.font.hash()}.${this.haloColor&&this.haloColor.hash()}.${this.haloSize}.${this.horizontalAlignment}.${this.kerning}.${this.rightToLeft}.${this.rotated}.${this.text}.${this.verticalAlignment}.${this.width}.${this.xoffset}.${this.yoffset}.${this.lineHeight}.${this.lineWidth}.${this.angle}`}};t([r({type:o,json:{write:!0}})],y.prototype,"backgroundColor",void 0),t([r({type:o,json:{write:!0}})],y.prototype,"borderLineColor",void 0),t([r({type:Number,json:{write:!0}})],y.prototype,"borderLineSize",void 0),t([r({type:p,json:{write:!0}})],y.prototype,"font",void 0),t([r({type:["left","right","center","justify"],json:{write:!0}})],y.prototype,"horizontalAlignment",void 0),t([r({type:Boolean,json:{write:!0}})],y.prototype,"kerning",void 0),t([r({type:o,json:{write:!0}})],y.prototype,"haloColor",void 0),t([r({type:Number,cast:i,json:{write:!0}})],y.prototype,"haloSize",void 0),t([r({type:Boolean,json:{write:!0}})],y.prototype,"rightToLeft",void 0),t([r({type:Boolean,json:{write:!0}})],y.prototype,"rotated",void 0),t([r({type:String,json:{write:!0}})],y.prototype,"text",void 0),t([n({esriTS:"text"},{readOnly:!0})],y.prototype,"type",void 0),t([r({type:["baseline","top","middle","bottom"],json:{write:!0}})],y.prototype,"verticalAlignment",void 0),t([r({type:Number,cast:i,json:{write:!0}})],y.prototype,"xoffset",void 0),t([r({type:Number,cast:i,json:{write:!0}})],y.prototype,"yoffset",void 0),t([r({type:Number,json:{read:t=>t&&-1*t,write:(t,o)=>o.angle=t&&-1*t}})],y.prototype,"angle",void 0),t([r({type:Number,json:{write:!0}})],y.prototype,"width",void 0),t([r({type:Number})],y.prototype,"lineWidth",void 0),t([l("lineWidth")],y.prototype,"writeLineWidth",null),t([s("lineWidth")],y.prototype,"castLineWidth",null),t([r(d)],y.prototype,"lineHeight",void 0),t([l("lineHeight")],y.prototype,"writeLineHeight",null),y=c=t([h("esri.symbols.TextSymbol")],y);const f=y;export{f as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../chunks/tslib.es6.js";import{clone as
|
|
5
|
+
import{_ as t}from"../chunks/tslib.es6.js";import{clone as e}from"../core/lang.js";import{isSome as o}from"../core/maybe.js";import{property as i}from"../core/accessorSupport/decorators/property.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{writer as n}from"../core/accessorSupport/decorators/writer.js";import l from"./Font.js";import p from"./Symbol3DLayer.js";import{screenSizeProperty as a}from"./support/materialUtils.js";import{Symbol3DHalo as m}from"./support/Symbol3DHalo.js";import{Symbol3DMaterial as h}from"./support/Symbol3DMaterial.js";import{lineHeightProperty as c}from"./support/textUtils.js";var u;let f=u=class extends p{constructor(t){super(t),this._userSize=void 0,this.halo=null,this.horizontalAlignment="center",this.lineHeight=1,this.material=null,this.text=null,this.type="text",this.verticalAlignment="middle"}get font(){return this._get("font")||null}set font(t){o(t)&&o(this._userSize)&&(t.size=this._userSize),this._set("font",t)}writeFont(t,e,o,i){const r={...i,textSymbol3D:!0};e.font=t.write({},r),delete e.font.size}get size(){return o(this._userSize)?this._userSize:o(this.font)&&null!=this.font.size?this.font.size:9}set size(t){this._userSize=t,o(this.font)&&(this.font.size=this._userSize),this.notifyChange("size")}clone(){return new u({enabled:this.enabled,font:this.font&&e(this.font),halo:this.halo&&e(this.halo),horizontalAlignment:this.horizontalAlignment,lineHeight:this.lineHeight,material:o(this.material)?this.material.clone():null,size:this.size,text:this.text,verticalAlignment:this.verticalAlignment})}static fromTextSymbol(t){return new u({font:o(t.font)?t.font.clone():new l,halo:y(t.haloColor,t.haloSize),horizontalAlignment:t.horizontalAlignment,lineHeight:t.lineHeight,material:t.color?{color:t.color.clone()}:null,text:t.text,verticalAlignment:t.verticalAlignment})}};function y(t,o){return t&&o>0?{color:e(t),size:o}:null}t([i({type:l,json:{write:!0}})],f.prototype,"font",null),t([n("font")],f.prototype,"writeFont",null),t([i({type:m,json:{write:!0}})],f.prototype,"halo",void 0),t([i()],f.prototype,"horizontalAlignment",void 0),t([i(c)],f.prototype,"lineHeight",void 0),t([i({type:h,json:{write:!0}})],f.prototype,"material",void 0),t([i(a)],f.prototype,"size",null),t([i({type:String,json:{write:!0}})],f.prototype,"text",void 0),t([r({Text:"text"},{readOnly:!0})],f.prototype,"type",void 0),t([i()],f.prototype,"verticalAlignment",void 0),f=u=t([s("esri.symbols.TextSymbol3DLayer")],f);const z=f;export{z as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{PathTransformationCursor as t}from"../CIMCursor.js";import{PlacementEndings as e}from"../enums.js";import{GeometryWalker as s,DashPattern as i}from"../GeometryWalker.js";class n{static local(){return null===n.instance&&(n.instance=new n),n.instance}execute(t,e,s,i){return new a(t,e,s)}}n.instance=null;class a extends t{constructor(t,e,n){var a
|
|
5
|
+
import{PathTransformationCursor as t}from"../CIMCursor.js";import{PlacementEndings as e}from"../enums.js";import{GeometryWalker as s,DashPattern as i}from"../GeometryWalker.js";class n{static local(){return null===n.instance&&(n.instance=new n),n.instance}execute(t,e,s,i){return new a(t,e,s)}}n.instance=null;class a extends t{constructor(t,e,n){var a;super(t,!0,!0),this._geometryWalker=new s,this._geometryWalker.updateTolerance(n),this._angleToLine=null==(a=e.angleToLine)||a,this._offset=(e.offset?e.offset:0)*n,this._originalEndings=e.endings,this._offsetAtEnd=(e.customEndingOffset?e.customEndingOffset:0)*n,this._position=-(e.offsetAlongLine?e.offsetAlongLine:0)*n,this._pattern=new i,this._pattern.init(e.placementTemplate,!1),this._pattern.scale(n),this._endings=this._originalEndings}processPath(t){if(this._pattern.isEmpty())return null;let s;if(this.iteratePath)s=this._pattern.nextValue();else{this._originalEndings===e.WithFullGap&&this.isClosed?this._endings=e.WithMarkers:this._endings=this._originalEndings,this._pattern.extPtGap=0;let i,n=!0;switch(this._endings){case e.NoConstraint:i=-this._position,i=this._adjustPosition(i),n=!1;break;case e.WithHalfGap:default:i=-this._pattern.lastValue()/2;break;case e.WithFullGap:i=-this._pattern.lastValue(),this._pattern.extPtGap=this._pattern.lastValue();break;case e.WithMarkers:i=0;break;case e.Custom:i=-this._position,i=this._adjustPosition(i),this._pattern.extPtGap=.5*this._offsetAtEnd}if(!this._geometryWalker.init(t,this._pattern,n))return null;this._pattern.reset();let a=0;for(;i>a;)i-=a,a=this._pattern.nextValue();a-=i,s=a,this.iteratePath=!0}const i={};return this._geometryWalker.nextPointAndAngle(s,i)?this._endings===e.WithFullGap&&this._geometryWalker.isPathEnd()?(this.iteratePath=!1,null):this._endings===e.WithMarkers&&this._geometryWalker.isPathEnd()&&(this.iteratePath=!1,this.isClosed)?null:(this.internalPlacement.setTranslate(i.pt[0]-this._offset*i.sa,i.pt[1]+this._offset*i.ca),this._angleToLine&&this.internalPlacement.setRotateCS(i.ca,i.sa),this.internalPlacement):(this.iteratePath=!1,null)}_adjustPosition(t){let e=t/this._pattern.length();return e-=Math.floor(e),e*this._pattern.length()}}export{n as PlacementAlongLineSameSize};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../Color.js";import{toCIMSymbolJSON as t,isCIMMarker as o,isCIMStroke as
|
|
5
|
+
import e from"../../Color.js";import{toCIMSymbolJSON as t,isCIMMarker as o,isCIMStroke as a,isCIMFill as r,isCIMMarkerStrokePlacement as s,fromCIMColor as n}from"../cim/utils.js";function i(e){const s=t(e);if("CIMTextSymbol"===s.type)return s.height;let n=0;if(s.symbolLayers)for(const t of s.symbolLayers)o(t)&&t.size>n?n=t.size:a(t)&&t.width>n?n=t.width:r(t);return n}function c(e,o,a){const r=t(e),s=i(e);if(0===s)return void f(r,o);l(r,o/s,!1,a)}function f(e,t){if("CIMTextSymbol"!==e.type){if(e.symbolLayers)for(const o of e.symbolLayers)switch(o.type){case"CIMPictureMarker":case"CIMVectorMarker":o.size=t;break;case"CIMPictureStroke":case"CIMSolidStroke":o.width=t}}else e.height=t}function l(e,t,o,a){if("CIMTextSymbol"!==e.type){if(o&&e.effects)for(const o of e.effects)C(o,t);if(e.symbolLayers)for(const o of e.symbolLayers)switch(o.type){case"CIMPictureMarker":case"CIMVectorMarker":m(o,t,a);break;case"CIMPictureStroke":case"CIMSolidStroke":null!=a&&a.preserveOutlineWidth||!o.width||(o.width*=t);break;case"CIMPictureFill":o.height&&(o.height*=t),o.offsetX&&(o.offsetX*=t),o.offsetY&&(o.offsetY*=t);break;case"CIMHatchFill":l(o.lineSymbol,t,!0,{...a,preserveOutlineWidth:!1}),o.offsetX&&(o.offsetX*=t),o.offsetY&&(o.offsetY*=t),o.separation&&(o.separation*=t)}}else e.height*=t}function m(e,t,o){if(e.markerPlacement&&M(e.markerPlacement,t),e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t),e.anchorPoint&&"Absolute"===e.anchorPointUnits&&(e.anchorPoint={x:e.anchorPoint.x*t,y:e.anchorPoint.y*t}),e.size*=t,"CIMVectorMarker"===e.type&&e.markerGraphics)for(const a of e.markerGraphics)e.scaleSymbolsProportionally||l(a.symbol,t,!0,o)}function M(e,t){switch(s(e)&&e.offset&&(e.offset*=t),e.type){case"CIMMarkerPlacementAlongLineRandomSize":case"CIMMarkerPlacementAlongLineSameSize":if(e.customEndingOffset&&(e.customEndingOffset*=t),e.offsetAlongLine&&(e.offsetAlongLine*=t),e.placementTemplate&&e.placementTemplate.length){const o=e.placementTemplate.map((e=>e*t));e.placementTemplate=o}break;case"CIMMarkerPlacementAlongLineVariableSize":if(e.maxRandomOffset&&(e.maxRandomOffset*=t),e.placementTemplate&&e.placementTemplate.length){const o=e.placementTemplate.map((e=>e*t));e.placementTemplate=o}break;case"CIMMarkerPlacementOnLine":e.startPointOffset&&(e.startPointOffset*=t);break;case"CIMMarkerPlacementAtExtremities":e.offsetAlongLine&&(e.offsetAlongLine*=t);break;case"CIMMarkerPlacementAtMeasuredUnits":case"CIMMarkerPlacementOnVertices":break;case"CIMMarkerPlacementAtRatioPositions":e.beginPosition&&(e.beginPosition*=t),e.endPosition&&(e.endPosition*=t);break;case"CIMMarkerPlacementPolygonCenter":e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t);break;case"CIMMarkerPlacementInsidePolygon":e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t),e.stepX&&(e.stepX*=t),e.stepY&&(e.stepY*=t)}}function C(e,t){switch(e.type){case"CIMGeometricEffectArrow":case"CIMGeometricEffectDonut":e.width&&(e.width*=t);break;case"CIMGeometricEffectBuffer":e.size&&(e.size*=t);break;case"CIMGeometricEffectCut":e.beginCut&&(e.beginCut*=t),e.endCut&&(e.endCut*=t),e.middleCut&&(e.middleCut*=t);break;case"CIMGeometricEffectDashes":if(e.customEndingOffset&&(e.customEndingOffset*=t),e.offsetAlongLine&&(e.offsetAlongLine*=t),e.dashTemplate&&e.dashTemplate.length){const o=e.dashTemplate.map((e=>e*t));e.dashTemplate=o}break;case"CIMGeometricEffectExtension":case"CIMGeometricEffectJog":case"CIMGeometricEffectRadial":e.length&&(e.length*=t);break;case"CIMGeometricEffectMove":e.offsetX&&(e.offsetX*=t),e.offsetY&&(e.offsetY*=t);break;case"CIMGeometricEffectOffset":case"CIMGeometricEffectOffsetTangent":e.offset&&(e.offset*=t);break;case"CIMGeometricEffectRegularPolygon":e.radius&&(e.radius*=t);break;case"CIMGeometricEffectTaperedPolygon":e.fromWidth&&(e.fromWidth*=t),e.length&&(e.length*=t),e.toWidth&&(e.toWidth*=t);break;case"CIMGeometricEffectWave":e.amplitude&&(e.amplitude*=t),e.period&&(e.period*=t)}}function y(o){const a=[];return k(t(o),a),a.length?new e(n(a[0])):null}function k(e,t){let r;r="CIMTextSymbol"===e.type?e.symbol:e;const n="CIMPolygonSymbol"===e.type;if(r.symbolLayers)for(const i of r.symbolLayers)if(!(i.colorLocked||n&&(a(i)||o(i)&&i.markerPlacement&&s(i.markerPlacement))))switch(i.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":i.tintColor&&b(t,i.tintColor);break;case"CIMVectorMarker":i.markerGraphics.forEach((e=>{k(e.symbol,t)}));break;case"CIMSolidStroke":case"CIMSolidFill":b(t,i.color);break;case"CIMHatchFill":k(i.lineSymbol,t)}}function b(e,t){for(const o of e)if(o.join(".")===t.join("."))return;e.push(t)}function p(o,a,r){a instanceof e||(a=new e(a));const s=t(o);s&&u(s,a,r)}function u(e,t,n){let i;i="CIMTextSymbol"===e.type?e.symbol:e;const c="CIMPolygonSymbol"===i.type;if(i.symbolLayers)for(const f of i.symbolLayers){if(f.colorLocked)continue;if(c)if(n){const{layersToColor:e}=n;if((a(f)||o(f)&&f.markerPlacement&&s(f.markerPlacement))&&"fill"===e||r(f)&&"outline"===e)continue}else if(a(f)||o(f)&&f.markerPlacement&&s(f.markerPlacement))continue;const e=t.toArray();switch(f.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":f.tintColor=e;break;case"CIMVectorMarker":f.markerGraphics.forEach((e=>{u(e.symbol,t,n)}));break;case"CIMSolidStroke":case"CIMSolidFill":f.color=e;break;case"CIMHatchFill":u(f.lineSymbol,t,n)}}}function I(e,o=!1){const a=t(e);return"CIMTextSymbol"===a.type||"CIMPointSymbol"===a.type?o&&0!==a.angle?360-a.angle:a.angle||0:0}function h(e,a,r=!1){const s=t(e);if(r&&0!==a&&(a=360-a),"CIMTextSymbol"!==s.type){if("CIMPointSymbol"===s.type&&s.symbolLayers){const e=a-(s.angle||0);for(const t of s.symbolLayers)if(o(t)){let o=t.rotation||0;t.rotateClockwise?o-=e:o+=e,t.rotation=o}s.angle=a}}else s.angle=a}export{p as applyCIMSymbolColor,h as applyCIMSymbolRotation,y as getCIMSymbolColor,I as getCIMSymbolRotation,i as getCIMSymbolSize,m as scaleCIMMarker,c as scaleCIMSymbolTo};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import{clamp as o}from"../../core/mathUtils.js";import{ensureNumber as r}from"../../core/accessorSupport/ensureType.js";const e=["none","underline","line-through"],t=["normal","italic","oblique"],l=["normal","lighter","bold","bolder"],n={type:Number,cast:e=>{const t=r(e);return 0===t?1:o(t,.1,4)},nonNullable:!0};export{e as FONT_DECORATIONS,t as FONT_STYLES,l as FONT_WEIGHTS,n as lineHeightProperty};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../../../request.js";import t from"../../../../../core/Error.js";import r from"../../../../../core/has.js";import s from"../../../../../core/Logger.js";import{isSome as i,unwrapOr as a,isNone as o}from"../../../../../core/maybe.js";import{throwIfAborted as n,isAbortError as u}from"../../../../../core/promiseUtils.js";import{createSourceAdapter as c}from"../controllers/support/sourceAdapters.js";import{DataTileSource as d}from"./DataTileSource.js";import{QueueProcessor as l}from"../../../../support/QueueProcessor.js";const p=s.getLogger("esri.views.2d.layers.features.sources.BaseFeatureSource"),h=4;class y extends d{constructor(e){super(e),this.type="feature",this.mode="on-demand",this._adapter=c(e.serviceInfo),this._queue=new l({concurrency:8,process:async e=>{if(n(e),i(e.tile)){const t=e.tile.key.id,{signal:s}=e,i=r("esri-tiles-debug")?{tile:t.replace(/\//g,"."),depth:e.depth}:void 0,a=await this._adapter.executeQuery(e.query,{signal:s,query:{...i,...this._schema.customParameters}});return a.level=e.tile.key.level,a}return this._adapter.executeQuery(e.query,{...e,query:this._schema.customParameters})}}),this._patchQueue=new l({concurrency:8,process:async e=>{if(n(e),i(e.tile)){const t=e.tile.key.id,{signal:s}=e,i=r("esri-tiles-debug")?{tile:t.replace(/\//g,"."),depth:e.depth}:void 0,a=await this._adapter.executeQuery(e.query,{signal:s,query:{...i,...this._schema.customParameters}});return a.level=e.tile.key.level,a}return this._adapter.executeQuery(e.query,{...e,query:this._schema.customParameters})}})}destroy(){super.destroy(),this._adapter.destroy(),this._queue.destroy(),this._patchQueue.destroy()}get updating(){return!!this._queue.length||Array.from(this._subscriptions.values()).some((e=>!e.done))}get maxRecordCountFactor(){const{query:e}=this._serviceInfo.capabilities;return e.supportsMaxRecordCountFactor?h:null}get maxPageSize(){var e;const{query:t}=this._serviceInfo.capabilities;return(null!=(e=t.maxRecordCount)?e:8e3)*a(this.maxRecordCountFactor,1)}get pageSize(){return Math.min(8e3,this.maxPageSize)}enableEvent(e,t){}subscribe(e){super.subscribe(e);const r=this._subscriptions.get(e.id);this._fetchDataTile(e).catch((r=>{u(r)||p.error(new t("mapview-query-error","Encountered error when fetching tile",{tile:e,error:r}))})).then((()=>r.end()))}unsubscribe(e){super.unsubscribe(e)}readers(e){return this._subscriptions.get(e).readers()}async query(e){return this._adapter.executeQuery(e,{query:this._schema.customParameters})}async queryLastEditDate(){const t=this._serviceInfo.source,r={...t.query,f:"json"};return(await e(t.path,{query:r,responseType:"json"})).data.editingInfo.lastEditDate}createTileQuery(e,t={}){var
|
|
5
|
+
import e from"../../../../../request.js";import t from"../../../../../core/Error.js";import r from"../../../../../core/has.js";import s from"../../../../../core/Logger.js";import{isSome as i,unwrapOr as a,isNone as o}from"../../../../../core/maybe.js";import{throwIfAborted as n,isAbortError as u}from"../../../../../core/promiseUtils.js";import{createSourceAdapter as c}from"../controllers/support/sourceAdapters.js";import{DataTileSource as d}from"./DataTileSource.js";import{QueueProcessor as l}from"../../../../support/QueueProcessor.js";const p=s.getLogger("esri.views.2d.layers.features.sources.BaseFeatureSource"),h=4;class y extends d{constructor(e){super(e),this.type="feature",this.mode="on-demand",this._adapter=c(e.serviceInfo),this._queue=new l({concurrency:8,process:async e=>{if(n(e),i(e.tile)){const t=e.tile.key.id,{signal:s}=e,i=r("esri-tiles-debug")?{tile:t.replace(/\//g,"."),depth:e.depth}:void 0,a=await this._adapter.executeQuery(e.query,{signal:s,query:{...i,...this._schema.customParameters}});return a.level=e.tile.key.level,a}return this._adapter.executeQuery(e.query,{...e,query:this._schema.customParameters})}}),this._patchQueue=new l({concurrency:8,process:async e=>{if(n(e),i(e.tile)){const t=e.tile.key.id,{signal:s}=e,i=r("esri-tiles-debug")?{tile:t.replace(/\//g,"."),depth:e.depth}:void 0,a=await this._adapter.executeQuery(e.query,{signal:s,query:{...i,...this._schema.customParameters}});return a.level=e.tile.key.level,a}return this._adapter.executeQuery(e.query,{...e,query:this._schema.customParameters})}})}destroy(){super.destroy(),this._adapter.destroy(),this._queue.destroy(),this._patchQueue.destroy()}get updating(){return!!this._queue.length||Array.from(this._subscriptions.values()).some((e=>!e.done))}get maxRecordCountFactor(){const{query:e}=this._serviceInfo.capabilities;return e.supportsMaxRecordCountFactor?h:null}get maxPageSize(){var e;const{query:t}=this._serviceInfo.capabilities;return(null!=(e=t.maxRecordCount)?e:8e3)*a(this.maxRecordCountFactor,1)}get pageSize(){return Math.min(8e3,this.maxPageSize)}enableEvent(e,t){}subscribe(e){super.subscribe(e);const r=this._subscriptions.get(e.id);this._fetchDataTile(e).catch((r=>{u(r)||p.error(new t("mapview-query-error","Encountered error when fetching tile",{tile:e,error:r}))})).then((()=>r.end()))}unsubscribe(e){super.unsubscribe(e)}readers(e){return this._subscriptions.get(e).readers()}async query(e){return this._adapter.executeQuery(e,{query:this._schema.customParameters})}async queryLastEditDate(){const t=this._serviceInfo.source,r={...t.query,f:"json"};return(await e(t.path,{query:r,responseType:"json"})).data.editingInfo.lastEditDate}createTileQuery(e,t={}){var s;const i=this.createQuery(t);return i.quantizationParameters=null!=(s=t.quantizationParameters)?s:e.getQuantizationParameters(),i.resultType="tile",i.geometry=e.extent,i.quantizationParameters&&"esriGeometryPolyline"===this._serviceInfo.geometryType&&(i.maxAllowableOffset=e.resolution*r("feature-polyline-generalization-factor")),i}async _executePatchQuery(e,t,r,s){const a=t.clone();a.outFields=[this._serviceInfo.objectIdField,...r],a.returnCentroid=!1,a.returnGeometry=!1;const o=i(a.start)?a.start/8e3:0,n=s.signal;return this._patchQueue.push({tile:e,query:a,signal:n,depth:o})}async _resend(e,t){const{query:r,message:s}=e,a=i(r.outFields)?r.outFields:[],u=this._queryInfo.outFields,c=u.filter((e=>-1===a.indexOf(e)));if(o(s.addOrUpdate))this._onMessage({...s,type:"append"});else if(c.length)try{const e=this._subscriptions.get(s.id).tile,i=await this._executePatchQuery(e,r,c,t);n(t),r.outFields=u,s.addOrUpdate.joinAttributes(i),this._onMessage({...s,end:s.end,type:"append"})}catch(d){}else this._onMessage({...s,type:"append"})}async _resendSubscription(e){if(e.empty)return this._onMessage({id:e.tile.id,addOrUpdate:null,end:!1,type:"append"});const t=e.signal;for(const r of e.requests.done)await this._resend(r,{signal:t});return i(e.edits)?this._onMessage(e.edits):void 0}async resend(){const e=Array.from(this._subscriptions.values());await Promise.all(e.map((e=>this._resendSubscription(e))))}}export{y as BaseFeatureSource};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import{HandleOwner as t}from"../../../../core/HandleOwner.js";import i from"../../../../core/Logger.js";import{isSome as s,isNone as r,unwrap as l}from"../../../../core/maybe.js";import{debounce as a,isAbortError as o,eachAlways as n}from"../../../../core/promiseUtils.js";import{property as h}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import u from"../../../../geometry/Point.js";import y from"../../../../layers/support/PixelBlock.js";import p from"../../../../layers/support/TileInfo.js";import{update as d,unregister as g,register as m,getRasterId as _}from"../../../../layers/support/rasterDatasets/RawBlockCache.js";import{extractBands as f}from"../../../../layers/support/rasterFunctions/pixelUtils.js";import{computeProjectedScales as w}from"../../../../layers/support/rasterFunctions/rasterProjectionHelper.js";import"../../tiling/PagedTileQueue.js";import b from"../../tiling/TileInfoView.js";import"../../tiling/TileKey.js";import P from"../../tiling/TileQueue.js";import C from"../../tiling/TileStrategy.js";import{getWebGL1Capabilities as I}from"../../../webgl/capabilities.js";import V from"../../../../geometry/Extent.js";const v=[0,0],R=i.getLogger("esri.views.2d.layers.ImageryTileLayerView2D");let T=class extends t{constructor(){super(...arguments),this._emptyTilePixelBlock=null,this._tileStrategy=null,this._tileInfoView=null,this._fetchQueue=null,this._blockCacheRegistryUrl=null,this._blockCacheRegistryId=null,this._srcResolutions=null,this.previousLOD=null,this._needBlockCacheUpdate=!1,this._globalSymbolizerParams=null,this._symbolizerParams=null,this._abortController=null,this._isCustomTilingScheme=!1,this._globalUpdateRequested=!1,this.container=null,this.layer=null,this.redrawOrRefetch=a(((e,t)=>!this.previousLOD||this.layerView.suspended?Promise.resolve():e?this.doRefresh():this._redrawImage(t)))}get useWebGLForProcessing(){var e;return null==(e=this._get("useWebGLForProcessing"))||e}set useWebGLForProcessing(e){this._set("useWebGLForProcessing",e)}get useProgressiveUpdate(){return null==this._get("useProgressiveUpdate")||this._get("useProgressiveUpdate")}set useProgressiveUpdate(e){if(this._tileStrategy&&this.useProgressiveUpdate!==e){this._tileStrategy.destroy(),this.container.removeAllChildren();const t=this._getCacheSize(e);this._tileStrategy=new C({cachePolicy:"purge",acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),cacheSize:t,tileInfoView:this._tileInfoView}),this._set("useProgressiveUpdate",e),this.layerView.requestUpdate()}}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume();const{extent:t,resolution:i,scale:s}=e.state,r=this._tileInfoView.getClosestInfoForScale(s);if(this.layer.raster){var l;if(!this.useProgressiveUpdate||this._needBlockCacheUpdate){const e=this._srcResolutions[r.level],s=t.toJSON?t:V.fromJSON(t);d(this._blockCacheRegistryUrl,this._blockCacheRegistryId,s,i,e,this.layer.raster.ioConfig.sampling)}this._needBlockCacheUpdate=!1,(null==(l=this.previousLOD)?void 0:l.level)!==r.level&&(this.previousLOD=r,null==this._symbolizerParams||this.layerView.hasTilingEffects||this._updateSymbolizerParams(),this._tileStrategy.updateCacheSize(0))}}moveEnd(){!this.layerView.hasTilingEffects&&this.useProgressiveUpdate||(this._abortController&&this._abortController.abort(),this._abortController=new AbortController,0===this._fetchQueue.length&&this._redrawImage(this._abortController.signal).then((()=>{this._globalUpdateRequested=!1,this.layerView.requestUpdate()})));const e=this._getCacheSize(this.useProgressiveUpdate);this._tileStrategy.updateCacheSize(e),this.layerView.requestUpdate()}get updating(){return this._fetchQueue.length>0||this._globalUpdateRequested||!(!this.updatingHandles||!this.updatingHandles.updating)}attach(){I().supportsTextureFloat||(this.useWebGLForProcessing=!1),this._initializeTileInfo(),this._tileInfoView=new b(this.layerView.tileInfo,this.layerView.fullExtent);const e=this._computeFetchConcurrency();this._fetchQueue=new P({tileInfoView:this._tileInfoView,concurrency:e,process:(e,t)=>this._fetchTile1(e,t)});const t=this._getCacheSize(this.useProgressiveUpdate);this._tileStrategy=new C({cachePolicy:"purge",acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),cacheSize:t,tileInfoView:this._tileInfoView}),this._updateBlockCacheRegistry()}acquireTile(e){const t=this.container.createTile(e);return this._enqueueTileFetch(t),this.layerView.requestUpdate(),this._needBlockCacheUpdate=!0,this._globalUpdateRequested=this.layerView.hasTilingEffects||!this.useProgressiveUpdate,t}releaseTile(e){this._fetchQueue.abort(e.key.id),this.container.removeChild(e),e.once("detach",(()=>{e.destroy(),this.layerView.requestUpdate()})),this.layerView.requestUpdate()}uninstall(){this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._fetchQueue=this._tileStrategy=this._tileInfoView=null,this.notifyChange("updating"),g(this._blockCacheRegistryUrl,this._blockCacheRegistryId)}createEmptyTilePixelBlock(e=null){const t=null==e||e.join(",")===this._tileInfoView.tileInfo.size.join(",");if(t&&s(this._emptyTilePixelBlock))return this._emptyTilePixelBlock;e=e||this._tileInfoView.tileInfo.size;const[i,r]=e,l=new y({width:i,height:r,pixels:[new Uint8Array(i*r)],mask:new Uint8Array(i*r),pixelType:"u8"});return t&&(this._emptyTilePixelBlock=l),l}_fetchTile1(e,t){const i=!r(t)&&t.signal,s=this.canUseWebGLForProcessing(),a={allowPartialFill:!0,datumTransformation:this.layerView.datumTransformation,interpolation:s?"nearest":this.layer.interpolation,registryId:this._blockCacheRegistryId,requestRawData:s,signal:l(i),srcResolution:this._srcResolutions[e.level],timeExtent:this.layerView.timeExtent,tileInfo:this.layerView.tileInfo};return this.fetchTile(e,a)}_getCacheSize(e){return e?40:0}_initializeTileInfo(){const e=this.layerView.view.spatialReference,t=new u({x:this.layerView.fullExtent.xmin,y:this.layerView.fullExtent.ymax,spatialReference:e}),{scales:i,srcResolutions:s,isCustomTilingScheme:r}=w(this.layer.rasterInfo,e),l=p.create({spatialReference:e,size:512,scales:i});(0===l.origin.x||l.origin.x>t.x)&&(l.origin=t),this._isCustomTilingScheme=r,this.layerView.set("tileInfo",l),this._srcResolutions=null!=s?s:[]}_computeFetchConcurrency(){const{blockBoundary:e}=this.layer.rasterInfo.storageInfo,t=e[e.length-1];return(t.maxCol-t.minCol+1)*(t.maxRow-t.minRow+1)>64?2:10}async _enqueueTileFetch(e,t){if(!this._fetchQueue.has(e.key.id)){try{const t=await this._fetchQueue.push(e.key);this.notifyChange("updating");const{bandIds:s}=this.layer;let r=!this.useProgressiveUpdate||this.layerView.hasTilingEffects&&!this._globalSymbolizerParams;if(this._globalUpdateRequested&&!this.layerView.moving&&0===this._fetchQueue.length){r=!1;try{await this._redrawImage(this._abortController&&this._abortController.signal)}catch(i){o(i)&&R.error(i)}this._globalUpdateRequested=!1}!this.canUseWebGLForProcessing()&&"rasterVF"!==this.type||this.layerView.hasTilingEffects||null!=this._symbolizerParams||this._updateSymbolizerParams();const l=this._tileInfoView.getTileCoords(v,e.key),a=this._tileInfoView.getTileResolution(e.key);await this.updateTileSource(e,{source:t,symbolizerParams:this._symbolizerParams,globalSymbolizerParams:this._globalSymbolizerParams,suspended:r,bandIds:s,coords:l,resolution:a}),e.once("attach",(()=>this.layerView.requestUpdate())),this.container.addChild(e)}catch(i){o(i)||R.error(i)}this.layerView.requestUpdate()}}async _redrawImage(e){if(0===this.container.children.length)return;await this.updatingHandles.addPromise(this.layer.updateRenderer()),this.layerView.hasTilingEffects?await this._updateGlobalSymbolizerParams(e):(this._updateSymbolizerParams(),this._globalSymbolizerParams=null);const t=this.container.children.map((async e=>this.updateTileSymbolizerParameters(e,{local:this._symbolizerParams,global:this._globalSymbolizerParams})));await n(t),this.container.requestRender()}async _updateGlobalSymbolizerParams(e){const t={srcResolution:this._srcResolutions[this.previousLOD.level],registryId:this._blockCacheRegistryId,signal:e},i=await this.layer.fetchPixels(this.layerView.view.extent,this.layerView.view.width,this.layerView.view.height,t);if(!i||!i.pixelBlock)return;const s=this.layer.symbolizer.generateWebGLParameters({pixelBlock:f(i.pixelBlock,this.layer.bandIds),isGCS:this.layerView.view.spatialReference.isGeographic,resolution:{x:this.previousLOD.resolution,y:this.previousLOD.resolution},bandIds:this.layer.bandIds});!this.canUseWebGLForProcessing()&&s&&"stretch"===s.type&&this.layer.renderer&&"raster-stretch"===this.layer.renderer.type&&(s.factor=s.factor.map((e=>255*e)),s.outMin=Math.round(255*s.outMin),s.outMax=Math.round(255*s.outMax)),this._globalSymbolizerParams=s}_updateSymbolizerParams(){this._symbolizerParams=this.layer.symbolizer.generateWebGLParameters({pixelBlock:null,isGCS:this.layerView.view.spatialReference.isGeographic,resolution:{x:this.previousLOD.resolution,y:this.previousLOD.resolution},bandIds:this.layer.bandIds})}_updateBlockCacheRegistry(e=!1){const{url:t,rasterInfo:i,raster:s}=this.layer,{multidimensionalDefinition:r}=this.layer.normalizeRasterFetchOptions({multidimensionalDefinition:this.layer.multidimensionalDefinition,timeExtent:this.layerView.timeExtent}),l=null!=i&&i.multidimensionalInfo?s.getSliceIndex(r):null,a=_(t,l);if(a!==this._blockCacheRegistryUrl){if(null!=this._blockCacheRegistryUrl&&g(this._blockCacheRegistryUrl,this._blockCacheRegistryId),this._blockCacheRegistryId=m(a,this.layer.raster.rasterInfo),e){const e=this._tileInfoView.getClosestInfoForScale(this.layerView.view.scale),t=this._srcResolutions[e.level];d(a,this._blockCacheRegistryId,this.layerView.view.extent,this.layerView.view.resolution,t,this.layer.raster.ioConfig.sampling)}this._blockCacheRegistryUrl=a}}async doRefresh(){await this.updatingHandles.addPromise(this.layer.updateRenderer()),this.layerView.hasTilingEffects||this._updateSymbolizerParams(),this._updateBlockCacheRegistry(!0),this._fetchQueue.reset(),this.notifyChange("updating");const e=[];this._tileStrategy.tiles.forEach((t=>e.push(this._enqueueTileFetch(t)))),await n(e)}};e([h()],T.prototype,"_globalUpdateRequested",void 0),e([h()],T.prototype,"container",void 0),e([h()],T.prototype,"layer",void 0),e([h()],T.prototype,"layerView",void 0),e([h()],T.prototype,"type",void 0),e([h()],T.prototype,"useWebGLForProcessing",null),e([h()],T.prototype,"useProgressiveUpdate",null),e([h()],T.prototype,"updating",null),T=e([c("esri.views.2d.layers.imagery.BaseImageryTileSubView2D")],T);export{T as BaseImageryTileSubView2D};
|
|
5
|
+
import{_ as e}from"../../../../chunks/tslib.es6.js";import"../../../../geometry.js";import{HandleOwner as t}from"../../../../core/HandleOwner.js";import i from"../../../../core/Logger.js";import{isSome as s,isNone as r,unwrap as l}from"../../../../core/maybe.js";import{debounce as a,isAbortError as o,eachAlways as n}from"../../../../core/promiseUtils.js";import{property as h}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/arrayUtils.js";import"../../../../core/has.js";import"../../../../core/accessorSupport/ensureType.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import u from"../../../../geometry/Point.js";import y from"../../../../layers/support/PixelBlock.js";import p from"../../../../layers/support/TileInfo.js";import{update as d,unregister as g,register as m,getRasterId as _}from"../../../../layers/support/rasterDatasets/RawBlockCache.js";import{extractBands as f}from"../../../../layers/support/rasterFunctions/pixelUtils.js";import{computeProjectedScales as w}from"../../../../layers/support/rasterFunctions/rasterProjectionHelper.js";import"../../tiling/PagedTileQueue.js";import b from"../../tiling/TileInfoView.js";import"../../tiling/TileKey.js";import P from"../../tiling/TileQueue.js";import C from"../../tiling/TileStrategy.js";import{getWebGL1Capabilities as I}from"../../../webgl/capabilities.js";import V from"../../../../geometry/Extent.js";const v=[0,0],R=i.getLogger("esri.views.2d.layers.ImageryTileLayerView2D");let T=class extends t{constructor(){super(...arguments),this._emptyTilePixelBlock=null,this._tileStrategy=null,this._tileInfoView=null,this._fetchQueue=null,this._blockCacheRegistryUrl=null,this._blockCacheRegistryId=null,this._srcResolutions=null,this.previousLOD=null,this._needBlockCacheUpdate=!1,this._globalSymbolizerParams=null,this._symbolizerParams=null,this._abortController=null,this._isCustomTilingScheme=!1,this._globalUpdateRequested=!1,this.container=null,this.layer=null,this.redrawOrRefetch=a(((e,t)=>!this.previousLOD||this.layerView.suspended?Promise.resolve():e?this.doRefresh():this._redrawImage(t)))}get useWebGLForProcessing(){var e;return null==(e=this._get("useWebGLForProcessing"))||e}set useWebGLForProcessing(e){this._set("useWebGLForProcessing",e)}get useProgressiveUpdate(){return null==this._get("useProgressiveUpdate")||this._get("useProgressiveUpdate")}set useProgressiveUpdate(e){if(this._tileStrategy&&this.useProgressiveUpdate!==e){this._tileStrategy.destroy(),this.container.removeAllChildren();const t=this._getCacheSize(e);this._tileStrategy=new C({cachePolicy:"purge",acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),cacheSize:t,tileInfoView:this._tileInfoView}),this._set("useProgressiveUpdate",e),this.layerView.requestUpdate()}}update(e){this._fetchQueue.pause(),this._fetchQueue.state=e.state,this._tileStrategy.update(e),this._fetchQueue.resume();const{extent:t,resolution:i,scale:s}=e.state,r=this._tileInfoView.getClosestInfoForScale(s);if(this.layer.raster){var l;if(!this.useProgressiveUpdate||this._needBlockCacheUpdate){const e=this._srcResolutions[r.level],s=t.toJSON?t:V.fromJSON(t);d(this._blockCacheRegistryUrl,this._blockCacheRegistryId,s,i,e,this.layer.raster.ioConfig.sampling)}this._needBlockCacheUpdate=!1,(null==(l=this.previousLOD)?void 0:l.level)!==r.level&&(this.previousLOD=r,null==this._symbolizerParams||this.layerView.hasTilingEffects||this._updateSymbolizerParams(),this._tileStrategy.updateCacheSize(0))}}moveEnd(){!this.layerView.hasTilingEffects&&this.useProgressiveUpdate||(this._abortController&&this._abortController.abort(),this._abortController=new AbortController,0===this._fetchQueue.length&&this._redrawImage(this._abortController.signal).then((()=>{this._globalUpdateRequested=!1,this.layerView.requestUpdate()})));const e=this._getCacheSize(this.useProgressiveUpdate);this._tileStrategy.updateCacheSize(e),this.layerView.requestUpdate()}get updating(){return this._fetchQueue.length>0||this._globalUpdateRequested||!(!this.updatingHandles||!this.updatingHandles.updating)}attach(){I().supportsTextureFloat||(this.useWebGLForProcessing=!1),this._initializeTileInfo(),this._tileInfoView=new b(this.layerView.tileInfo,this.layerView.fullExtent);const e=this._computeFetchConcurrency();this._fetchQueue=new P({tileInfoView:this._tileInfoView,concurrency:e,process:(e,t)=>this._fetchTile1(e,t)});const t=this._getCacheSize(this.useProgressiveUpdate);this._tileStrategy=new C({cachePolicy:"purge",acquireTile:e=>this.acquireTile(e),releaseTile:e=>this.releaseTile(e),cacheSize:t,tileInfoView:this._tileInfoView}),this._updateBlockCacheRegistry()}acquireTile(e){const t=this.container.createTile(e);return this._enqueueTileFetch(t),this.layerView.requestUpdate(),this._needBlockCacheUpdate=!0,this._globalUpdateRequested=this.layerView.hasTilingEffects||!this.useProgressiveUpdate,t}releaseTile(e){this._fetchQueue.abort(e.key.id),this.container.removeChild(e),e.once("detach",(()=>{e.destroy(),this.layerView.requestUpdate()})),this.layerView.requestUpdate()}uninstall(){this._tileStrategy.destroy(),this._fetchQueue.clear(),this.container.removeAllChildren(),this._fetchQueue=this._tileStrategy=this._tileInfoView=null,this.notifyChange("updating"),g(this._blockCacheRegistryUrl,this._blockCacheRegistryId)}createEmptyTilePixelBlock(e=null){const t=null==e||e.join(",")===this._tileInfoView.tileInfo.size.join(",");if(t&&s(this._emptyTilePixelBlock))return this._emptyTilePixelBlock;e=e||this._tileInfoView.tileInfo.size;const[i,r]=e,l=new y({width:i,height:r,pixels:[new Uint8Array(i*r)],mask:new Uint8Array(i*r),pixelType:"u8"});return t&&(this._emptyTilePixelBlock=l),l}_fetchTile1(e,t){const i=!r(t)&&t.signal,s=this.canUseWebGLForProcessing(),a={allowPartialFill:!0,datumTransformation:this.layerView.datumTransformation,interpolation:s?"nearest":this.layer.interpolation,registryId:this._blockCacheRegistryId,requestRawData:s,signal:l(i),srcResolution:this._srcResolutions[e.level],timeExtent:this.layerView.timeExtent,tileInfo:this.layerView.tileInfo,disableWrapAround:!this.layerView.tileInfo.isWrappable};return this.fetchTile(e,a)}_getCacheSize(e){return e?40:0}_initializeTileInfo(){const e=this.layerView.view.spatialReference,t=new u({x:this.layerView.fullExtent.xmin,y:this.layerView.fullExtent.ymax,spatialReference:e}),{scales:i,srcResolutions:s,isCustomTilingScheme:r}=w(this.layer.rasterInfo,e),l=p.create({spatialReference:e,size:512,scales:i});(0===l.origin.x||l.origin.x>t.x)&&(l.origin=t),this._isCustomTilingScheme=r,this.layerView.set("tileInfo",l),this._srcResolutions=null!=s?s:[]}_computeFetchConcurrency(){const{blockBoundary:e}=this.layer.rasterInfo.storageInfo,t=e[e.length-1];return(t.maxCol-t.minCol+1)*(t.maxRow-t.minRow+1)>64?2:10}async _enqueueTileFetch(e,t){if(!this._fetchQueue.has(e.key.id)){try{const t=await this._fetchQueue.push(e.key);this.notifyChange("updating");const{bandIds:s}=this.layer;let r=!this.useProgressiveUpdate||this.layerView.hasTilingEffects&&!this._globalSymbolizerParams;if(this._globalUpdateRequested&&!this.layerView.moving&&0===this._fetchQueue.length){r=!1;try{await this._redrawImage(this._abortController&&this._abortController.signal)}catch(i){o(i)&&R.error(i)}this._globalUpdateRequested=!1}!this.canUseWebGLForProcessing()&&"rasterVF"!==this.type||this.layerView.hasTilingEffects||null!=this._symbolizerParams||this._updateSymbolizerParams();const l=this._tileInfoView.getTileCoords(v,e.key),a=this._tileInfoView.getTileResolution(e.key);await this.updateTileSource(e,{source:t,symbolizerParams:this._symbolizerParams,globalSymbolizerParams:this._globalSymbolizerParams,suspended:r,bandIds:s,coords:l,resolution:a}),e.once("attach",(()=>this.layerView.requestUpdate())),this.container.addChild(e)}catch(i){o(i)||R.error(i)}this.layerView.requestUpdate()}}async _redrawImage(e){if(0===this.container.children.length)return;await this.updatingHandles.addPromise(this.layer.updateRenderer()),this.layerView.hasTilingEffects?await this._updateGlobalSymbolizerParams(e):(this._updateSymbolizerParams(),this._globalSymbolizerParams=null);const t=this.container.children.map((async e=>this.updateTileSymbolizerParameters(e,{local:this._symbolizerParams,global:this._globalSymbolizerParams})));await n(t),this.container.requestRender()}async _updateGlobalSymbolizerParams(e){const t={srcResolution:this._srcResolutions[this.previousLOD.level],registryId:this._blockCacheRegistryId,signal:e},i=await this.layer.fetchPixels(this.layerView.view.extent,this.layerView.view.width,this.layerView.view.height,t);if(!i||!i.pixelBlock)return;const s=this.layer.symbolizer.generateWebGLParameters({pixelBlock:f(i.pixelBlock,this.layer.bandIds),isGCS:this.layerView.view.spatialReference.isGeographic,resolution:{x:this.previousLOD.resolution,y:this.previousLOD.resolution},bandIds:this.layer.bandIds});!this.canUseWebGLForProcessing()&&s&&"stretch"===s.type&&this.layer.renderer&&"raster-stretch"===this.layer.renderer.type&&(s.factor=s.factor.map((e=>255*e)),s.outMin=Math.round(255*s.outMin),s.outMax=Math.round(255*s.outMax)),this._globalSymbolizerParams=s}_updateSymbolizerParams(){this._symbolizerParams=this.layer.symbolizer.generateWebGLParameters({pixelBlock:null,isGCS:this.layerView.view.spatialReference.isGeographic,resolution:{x:this.previousLOD.resolution,y:this.previousLOD.resolution},bandIds:this.layer.bandIds})}_updateBlockCacheRegistry(e=!1){const{url:t,rasterInfo:i,raster:s}=this.layer,{multidimensionalDefinition:r}=this.layer.normalizeRasterFetchOptions({multidimensionalDefinition:this.layer.multidimensionalDefinition,timeExtent:this.layerView.timeExtent}),l=null!=i&&i.multidimensionalInfo?s.getSliceIndex(r):null,a=_(t,l);if(a!==this._blockCacheRegistryUrl){if(null!=this._blockCacheRegistryUrl&&g(this._blockCacheRegistryUrl,this._blockCacheRegistryId),this._blockCacheRegistryId=m(a,this.layer.raster.rasterInfo),e){const e=this._tileInfoView.getClosestInfoForScale(this.layerView.view.scale),t=this._srcResolutions[e.level];d(a,this._blockCacheRegistryId,this.layerView.view.extent,this.layerView.view.resolution,t,this.layer.raster.ioConfig.sampling)}this._blockCacheRegistryUrl=a}}async doRefresh(){await this.updatingHandles.addPromise(this.layer.updateRenderer()),this.layerView.hasTilingEffects||this._updateSymbolizerParams(),this._updateBlockCacheRegistry(!0),this._fetchQueue.reset(),this.notifyChange("updating");const e=[];this._tileStrategy.tiles.forEach((t=>e.push(this._enqueueTileFetch(t)))),await n(e)}};e([h()],T.prototype,"_globalUpdateRequested",void 0),e([h()],T.prototype,"container",void 0),e([h()],T.prototype,"layer",void 0),e([h()],T.prototype,"layerView",void 0),e([h()],T.prototype,"type",void 0),e([h()],T.prototype,"useWebGLForProcessing",null),e([h()],T.prototype,"useProgressiveUpdate",null),e([h()],T.prototype,"updating",null),T=e([c("esri.views.2d.layers.imagery.BaseImageryTileSubView2D")],T);export{T as BaseImageryTileSubView2D};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{bidiText as e}from"../../../core/BidiText.js";import{pt2px as t}from"../../../core/screenUtils.js";import{getXAnchorDirection as n,getYAnchorDirection as i}from"../engine/webgl/alignmentUtils.js";import{MAGIC_LABEL_LINE_HEIGHT as o,GLYPH_SIZE as s}from"../engine/webgl/definitions.js";import{shapeGlyphs as r}from"../engine/webgl/mesh/templates/shapingUtils.js";async function l(l,a,m){var f,g,c;const d=n("center"),
|
|
5
|
+
import{bidiText as e}from"../../../core/BidiText.js";import{pt2px as t}from"../../../core/screenUtils.js";import{getXAnchorDirection as n,getYAnchorDirection as i}from"../engine/webgl/alignmentUtils.js";import{MAGIC_LABEL_LINE_HEIGHT as o,GLYPH_SIZE as s}from"../engine/webgl/definitions.js";import{shapeGlyphs as r}from"../engine/webgl/mesh/templates/shapingUtils.js";async function l(l,a,m){var f,g,c;const d=n("center"),u=i("middle"),h=a.textureManager.rasterizeItem(l.toJSON(),window.devicePixelRatio||1,null,m),[,x]=e(l.text),p=(await h).glyphMosaicItems;return r(p,x,{angle:null!=(f=l.angle)?f:0,xOffset:t(null!=(g=l.xoffset)?g:0),yOffset:t(null!=(c=l.yoffset)?c:0),lineHeight:o*Math.max(.25,l.lineHeight),maxLineWidth:Math.max(32,Math.min(t(l.lineWidth),512)),decoration:l.font.decoration,scale:Math.min(Math.round(t(l.font.size)),127)/s,hAlign:d,vAlign:u,isCIM:!1}).boundsT}let a=l;async function m(e,t,n){return a(e,t,n)}const f={stubGetTextBounds:e=>a=e,restoreGetTextBounds:()=>a=l};export{m as getTextBounds,f as test};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/EvaluateMainLighting.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import"../webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js";import"../webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import"../webgl-engine/core/shaderLibrary/util/RgbaFloatEncoding.glsl.js";import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";import"../webgl-engine/lib/basicInterfaces.js";export{b as build}from"../../../chunks/CloudsComposition.glsl.js";
|
|
5
|
+
import"../webgl-engine/core/shaderLibrary/shading/EvaluateAmbientLighting.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/EvaluateMainLighting.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import"../webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js";import"../webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js";import"../webgl-engine/core/shaderLibrary/util/ColorConversion.glsl.js";import"../webgl-engine/core/shaderLibrary/util/RgbaFloatEncoding.glsl.js";import"../webgl-engine/core/shaderModules/interfaces.js";import"../webgl-engine/core/shaderModules/ShaderBuilder.js";import"../webgl-engine/lib/basicInterfaces.js";export{b as build}from"../../../chunks/CloudsComposition.glsl.js";
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{clamp as a}from"../../../core/mathUtils.js";import{releaseMaybe as t,disposeMaybe as
|
|
5
|
+
import{clamp as a}from"../../../core/mathUtils.js";import{releaseMaybe as t,disposeMaybe as e,isNone as r}from"../../../core/maybe.js";import{a as s,e as i}from"../../../chunks/mat4.js";import{c as o}from"../../../chunks/mat4f64.js";import{z as h,g as n,n as m,a as p,l as c,f as _}from"../../../chunks/vec3.js";import{c as d,f}from"../../../chunks/vec3f64.js";import{create as l,fromPoints as I,axis as u}from"../../../geometry/support/axisAngle.js";import{CloudsCompositionTechnique as F}from"./CloudsCompositionTechnique.js";import{createQuadVAO as g}from"../webgl-engine/lib/glUtil3D.js";import{PrimitiveType as H}from"../../webgl/enums.js";class O{constructor(a,t,e,r){this._viewingMode=t,this._inverseProjectionMatrix=o(),this._inverseViewMatrix=o(),this._technique=new F({rctx:a,viewingMode:this._viewingMode},null),this._vao=g(a),this._setDefaultParallax(e,r)}destroy(){this._technique=t(this._technique),this._vao=e(this._vao)}render(a,t,e){this._parameters.clouds=t;const i=a.camera;if(r(this._vao)||r(i))return;const o=a.rctx,h=this._technique.program;o.useProgram(h),this._technique.bindPipelineState(o),a.scenelightingData.setLightDirectionUniform(h),a.scenelightingData.setUniforms(h),s(this._inverseProjectionMatrix,i.projectionMatrix),s(this._inverseViewMatrix,i.viewMatrix),h.setUniformMatrix4fv("inverseProjectionMatrix",this._inverseProjectionMatrix),h.setUniformMatrix4fv("inverseViewMatrix",this._inverseViewMatrix),h.setUniform2f("cloudVariables",this._parameters.clouds.coverage,this._parameters.clouds.absorption),this._setParallaxParams(i.eye,e),C(h,a.camera,this._parameters),o.bindVAO(this._vao),h.assertCompatibleVertexAttributeLocations(this._vao),o.drawArrays(H.TRIANGLE_STRIP,0,4)}get isFading(){return this._parameters.crossFade.stage!==D.FINISHED||this._parameters.fadeInOut.stage!==E.FINISHED||this._parameters.fadeIn.stage!==x.FINISHED||this._parameters.fadeInOutHeight.stage!==N.FINISHED}_setDefaultParallax(a,t){this._parameters={parallax:{anchorPointClouds:d(),radius:a,cloudsHeight:1e5,radiusCurvatureCorrectionFactor:0,transform:o()},parallaxNew:{anchorPointClouds:d(),radius:a,cloudsHeight:1e5,radiusCurvatureCorrectionFactor:0,transform:o()},crossFade:{stage:D.FINISHED,factor:0,distanceThresholdFactor:.3},fadeInOut:{stage:E.FINISHED,factor:0,distanceThresholdFactor:.6},fadeIn:{stage:x.FINISHED,factor:0,distanceThresholdFactor:2},fadeInOutHeight:{stage:N.FINISHED,factor:t>1e4?1:0,heightThresholdFactor:1e4},cameraPositionLastFrame:d(),startTime:0,startTimeHeightFade:0,clouds:null}}_isCameraPositionFinal(a){return h(this._parameters.cameraPositionLastFrame,a)}_setFadeInStage(a){const t=this._isCameraPositionFinal(a);this._parameters.fadeIn.stage===x.FINISHED&&(this._parameters.fadeIn.factor=1,n(this._parameters.parallax.anchorPointClouds,P),this._parameters.fadeIn.stage=x.CHANGE_ANCHOR,this._parameters.crossFade.stage=D.FINISHED,this._parameters.fadeInOut.stage=E.FINISHED),this._parameters.fadeIn.stage===x.CHANGE_ANCHOR&&t&&(n(this._parameters.parallax.anchorPointClouds,P),this._parameters.fadeIn.stage=x.FADE_IN,this._parameters.startTime=performance.now()),this._parameters.fadeIn.factor>0&&this._parameters.fadeIn.stage===x.FADE_IN&&(this._parameters.fadeIn.factor=1-(performance.now()-this._parameters.startTime)/500),this._parameters.fadeIn.factor<=0&&this._parameters.fadeIn.stage===x.FADE_IN&&(this._parameters.fadeIn.stage=x.FINISHED,this._parameters.fadeIn.factor=0)}_setCrossFadingStage(){this._parameters.crossFade.stage===D.FINISHED&&(n(this._parameters.parallaxNew.anchorPointClouds,P),this._parameters.startTime=performance.now(),this._parameters.crossFade.factor=0,this._parameters.crossFade.stage=D.CROSS_FADE),this._parameters.crossFade.factor<1&&this._parameters.crossFade.stage===D.CROSS_FADE&&(this._parameters.crossFade.factor=(performance.now()-this._parameters.startTime)/500),this._parameters.crossFade.factor>=1&&this._parameters.crossFade.stage===D.CROSS_FADE&&(this._parameters.crossFade.stage=D.FINISHED,this._parameters.crossFade.factor=1,n(this._parameters.parallax.anchorPointClouds,this._parameters.parallaxNew.anchorPointClouds))}_setFadeInOutStage(a){this._parameters.fadeInOut.stage===E.FINISHED&&(this._parameters.startTime=performance.now(),this._parameters.fadeInOut.factor=0,this._parameters.fadeInOut.stage=E.FADE_OUT),this._parameters.fadeInOut.factor<1&&this._parameters.fadeInOut.stage===E.FADE_OUT&&(this._parameters.fadeInOut.factor=(performance.now()-this._parameters.startTime)/250),this._parameters.fadeInOut.factor>=1&&this._parameters.fadeInOut.stage===E.FADE_OUT&&(this._parameters.fadeInOut.factor=1,n(this._parameters.parallax.anchorPointClouds,P)),this._parameters.fadeInOut.factor>=1&&this._parameters.fadeInOut.stage===E.FADE_OUT&&this._isCameraPositionFinal(a)&&(this._parameters.startTime=performance.now(),this._parameters.fadeInOut.factor=1,this._parameters.fadeInOut.stage=E.FADE_IN,this._parameters.crossFade.stage=D.FINISHED,this._parameters.crossFade.factor=0),this._parameters.fadeInOut.factor>0&&this._parameters.fadeInOut.stage===E.FADE_IN&&(this._parameters.fadeInOut.factor=1-(performance.now()-this._parameters.startTime)/500),this._parameters.fadeInOut.factor<=0&&this._parameters.fadeInOut.stage===E.FADE_IN&&(this._parameters.fadeInOut.stage=E.FINISHED,this._parameters.fadeInOut.factor=0)}_setFadeInOutHeight(t){const e=performance.now();this._parameters.startTimeHeightFade=this._parameters.fadeInOutHeight.stage===N.FINISHED?e:this._parameters.startTimeHeightFade,t?this._parameters.fadeInOutHeight.factor+=(e-this._parameters.startTimeHeightFade)/500:this._parameters.fadeInOutHeight.factor-=(e-this._parameters.startTimeHeightFade)/500,this._parameters.startTimeHeightFade=e,this._parameters.fadeInOutHeight.factor=a(this._parameters.fadeInOutHeight.factor,0,1),this._parameters.fadeInOutHeight.stage=N.HEIGHT_FADE}_setParallaxParams(a,t){m(P,a),p(P,P,this._parameters.parallax.radius),0===this._parameters.parallax.anchorPointClouds[0]&&0===this._parameters.parallax.anchorPointClouds[1]&&0===this._parameters.parallax.anchorPointClouds[2]&&n(this._parameters.parallax.anchorPointClouds,P);const e=c(_(A,this._parameters.parallax.anchorPointClouds,P));let r=!0;e>this._parameters.fadeIn.distanceThresholdFactor*this._parameters.parallax.cloudsHeight||this._parameters.fadeIn.stage!==x.FINISHED?this._setFadeInStage(a):e>this._parameters.fadeInOut.distanceThresholdFactor*this._parameters.parallax.cloudsHeight||this._parameters.fadeInOut.stage!==E.FINISHED?this._setFadeInOutStage(a):e>this._parameters.crossFade.distanceThresholdFactor*this._parameters.parallax.cloudsHeight&&!t||this._parameters.crossFade.stage!==D.FINISHED?this._setCrossFadingStage():r=!1;const s=c(a),h=s-this._parameters.parallax.radius;(h>1.7*this._parameters.fadeInOutHeight.heightThresholdFactor||h<-1*this._parameters.fadeInOutHeight.heightThresholdFactor)&&this._parameters.fadeInOutHeight.factor<1?this._parameters.fadeInOutHeight.factor=1:(h>this._parameters.fadeInOutHeight.heightThresholdFactor||h<-.35*this._parameters.fadeInOutHeight.heightThresholdFactor)&&this._parameters.fadeInOutHeight.factor<1?this._setFadeInOutHeight(!0):h<this._parameters.fadeInOutHeight.heightThresholdFactor&&h>-.35*this._parameters.fadeInOutHeight.heightThresholdFactor&&this._parameters.fadeInOutHeight.factor>0?this._setFadeInOutHeight(!1):this._parameters.fadeInOutHeight.stage=N.FINISHED,this._parameters.parallax.radiusCurvatureCorrectionFactor=.84*Math.sqrt(Math.max(s*s-this._parameters.parallax.radius*this._parameters.parallax.radius,0))/s,I(S,this._parameters.parallax.anchorPointClouds,T),this._parameters.parallax.transform=o(),i(this._parameters.parallax.transform,this._parameters.parallax.transform,T[3],u(T)),r&&(I(S,this._parameters.parallaxNew.anchorPointClouds,T),this._parameters.parallaxNew.transform=o(),i(this._parameters.parallaxNew.transform,this._parameters.parallaxNew.transform,T[3],u(T))),n(this._parameters.cameraPositionLastFrame,a)}}var x,E,D,N;function C(t,e,r){t.bindTexture(r.clouds.cubeMap.colorTexture,"cubeMap"),t.setUniform1f("cloudsHeight",r.parallax.cloudsHeight),t.setUniformMatrix4fv("rotationMatrixClouds",r.parallax.transform),t.setUniformMatrix4fv("rotationMatrixCloudsCrossFade",r.parallaxNew.transform),t.setUniform3fv("anchorPosition",r.parallax.anchorPointClouds),t.setUniform3fv("anchorPositionCrossFade",r.parallaxNew.anchorPointClouds),r.fadeInOut.stage!==E.FINISHED?t.setUniform1f("totalFadeInOut",r.fadeInOutHeight.factor+Math.max(a(r.fadeInOut.factor,0,1))):t.setUniform1f("totalFadeInOut",r.fadeInOutHeight.factor+Math.max(a(r.fadeIn.factor,0,1))),t.setUniform1f("radiusCurvatureCorrectionFactor",r.parallax.radiusCurvatureCorrectionFactor),t.setUniform1i("crossFade",r.crossFade.stage),t.setUniform1f("crossFadeAnchorFactor",a(r.crossFade.factor,0,1)),t.setUniform1f("radius",r.parallax.radius),t.setUniform3fv("cameraPosition",e.eye)}!function(a){a[a.FINISHED=0]="FINISHED",a[a.CHANGE_ANCHOR=1]="CHANGE_ANCHOR",a[a.FADE_IN=2]="FADE_IN"}(x||(x={})),function(a){a[a.FINISHED=0]="FINISHED",a[a.FADE_OUT=1]="FADE_OUT",a[a.FADE_IN=2]="FADE_IN"}(E||(E={})),function(a){a[a.FINISHED=0]="FINISHED",a[a.CROSS_FADE=1]="CROSS_FADE"}(D||(D={})),function(a){a[a.FINISHED=0]="FINISHED",a[a.HEIGHT_FADE=1]="HEIGHT_FADE"}(N||(N={}));const S=f(0,0,1),T=l(),P=d(),A=d();export{O as CloudsComposition,C as bindCloudsComposition};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as t}from"../../../chunks/tslib.es6.js";import e from"../../../core/Accessor.js";import i from"../../../core/Handles.js";import s from"../../../core/has.js";import{lerp as r}from"../../../core/mathUtils.js";import{releaseMaybe as o,disposeMaybe as h,destroyMaybe as a,isNone as n}from"../../../core/maybe.js";import{init as c}from"../../../core/watchUtils.js";import{property as u}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{f as m}from"../../../chunks/mat3.js";import{c as d}from"../../../chunks/mat3f64.js";import{x as f}from"../../../chunks/mat4.js";import{c as l}from"../../../chunks/mat4f64.js";import{f as _,z as g}from"../../../chunks/vec3f32.js";import{getReferenceEllipsoid as y}from"../../../geometry/projectionEllipsoid.js";import{cloudPresets as v}from"./CloudsPresets.js";import{CloudsTechniqueConfiguration as
|
|
5
|
+
import{_ as t}from"../../../chunks/tslib.es6.js";import e from"../../../core/Accessor.js";import i from"../../../core/Handles.js";import s from"../../../core/has.js";import{lerp as r}from"../../../core/mathUtils.js";import{releaseMaybe as o,disposeMaybe as h,destroyMaybe as a,isNone as n}from"../../../core/maybe.js";import{init as c}from"../../../core/watchUtils.js";import{property as u}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../../core/accessorSupport/decorators/subclass.js";import{f as m}from"../../../chunks/mat3.js";import{c as d}from"../../../chunks/mat3f64.js";import{x as f}from"../../../chunks/mat4.js";import{c as l}from"../../../chunks/mat4f64.js";import{f as _,z as g}from"../../../chunks/vec3f32.js";import{getReferenceEllipsoid as y}from"../../../geometry/projectionEllipsoid.js";import{cloudPresets as v}from"./CloudsPresets.js";import{CloudsTechniqueConfiguration as x,CloudsTechnique as b}from"./CloudsTechnique.js";import{NoiseTextureAtlas as S}from"./NoiseTextureAtlas.js";import{createQuadVAO as T}from"../webgl-engine/lib/glUtil3D.js";import{TaskPriority as w}from"../../support/Scheduler.js";import{TextureType as z,PixelFormat as M,PixelType as j,TextureWrapMode as C,TextureSamplingMode as U,TargetType as E}from"../../webgl/enums.js";import{FramebufferObject as R}from"../../webgl/FramebufferObject.js";let q=class extends e{constructor(t){super(t),this._frameTask=null,this._handles=new i,this._cubeMapSize=s("esri-mobile")?1024:2048,this._techniques=[],this._techniqueConfiguration=new x,this.coverage=r(P.coverage[0],P.coverage[1],.5),this.density=r(P.density[0],P.density[1],.5),this.absorption=r(P.absorption[0],P.absorption[1],.5),this.cloudSize=r(P.cloudSize[0],P.cloudSize[1],.5),this.detailSize=r(P.detailSize[0],P.detailSize[1],.5),this.smoothness=r(P.smoothness[0],P.smoothness[1],.5),this.cloudHeight=r(P.cloudHeight[0],P.cloudHeight[1],.5),this.raymarchingStepType=P.raymarchingStepType,this._cloudRadius=0,this._viewMatrix=l(),this._viewMatrix3=d(),this.running=!1}_getTechnique(t){const e=this._techniques[t];return e||(this._techniqueConfiguration.steps=t,this._techniques[t]=new b({rctx:this.rctx,viewingMode:this.view.state.viewingMode},this._techniqueConfiguration),this._techniques[t])}initialize(){this._vao=T(this.rctx);const t=y(this.view.spatialReference);this._cloudRadius=.5*t.radius,this.setDirty(),this._frameTask=this.view.resourceController.scheduler.registerTask(w.CLOUDS_GENERATOR,this),this._handles.add(this._frameTask),this._handles.add(c(this,"coverage",(()=>this.setDirty())));["coverage","density","absorption","cloudSize","detailSize","smoothness","cloudHeight","raymarchingStepType"].forEach((t=>this._handles.add(c(this,t,(()=>this.setDirty())))))}destroy(){this._handles.destroy(),this._techniques.forEach((t=>o(t))),this._techniques=null,this._frameBufferCube=h(this._frameBufferCube),this._vao=h(this._vao),this._noiseTexture=a(this._noiseTexture)}_ensureNoiseTexture(){return n(this._noiseTexture)&&(this._noiseTexture=new S(this.rctx,this.view),this._noiseTexture.render(this.rctx)),this._noiseTexture}get frameBufferCube(){if(n(this._frameBufferCube)){const t={target:z.TEXTURE_CUBE_MAP,pixelFormat:M.RGBA,dataType:j.UNSIGNED_BYTE,wrapMode:C.CLAMP_TO_EDGE,samplingMode:U.LINEAR,hasMipmap:!1,width:this._cubeMapSize,height:this._cubeMapSize};this._frameBufferCube=new R(this.rctx,{colorTarget:E.CUBEMAP,width:this._cubeMapSize,height:this._cubeMapSize},t)}return this._frameBufferCube}get cubeMap(){return this._frameBufferCube}applyPreset(t,e){const i=t.median,s=t=>{const s=r(t[0],t[1],i);return e<.5?r(t[0],s,2*e):r(s,t[1],2*(e-.5))};this.coverage=s(t.coverage),this.density=s(t.density),this.absorption=s(t.absorption),this.cloudSize=s(t.cloudSize),this.detailSize=s(t.detailSize),this.smoothness=s(t.smoothness),this.cloudHeight=s(t.cloudHeight),this.raymarchingStepType=t.raymarchingStepType}setDirty(){this.running=!0}runTask(t){if(0===this.coverage||n(this._vao))return void(this.running=!1);const e=this._ensureNoiseTexture().textureAtlas;if(n(e))return void(this.running=!1);const i=this.rctx.getViewport();this.rctx.setViewport(0,0,this._cubeMapSize,this._cubeMapSize),this.rctx.bindFramebuffer(this.frameBufferCube);const s=this._getTechnique(this.raymarchingStepType),o=s.program;this.rctx.useProgram(o);const h=1+this.absorption,a=r(35,120,this.absorption);o.bindTexture(e,"cloudShapeTexture"),o.setUniform1f("cloudRadius",this._cloudRadius),o.setUniform1f("halfCubeMapSize",.5*this._cubeMapSize),o.setUniform1f("power",a),o.setUniform1f("sigmaE",h),o.setUniform1f("density",r(0,.3,this.density)),o.setUniform1f("cloudSize",r(0,.02,Math.max(.01,1-this.cloudSize))),o.setUniform1f("detailSize",r(0,.2,Math.max(.01,1-this.detailSize))),o.setUniform1f("smoothness",r(0,.5,1-this.smoothness)),o.setUniform1f("cloudHeight",r(0,1500,this.cloudHeight)),o.setUniform1f("coverage",this.coverage),this.rctx.bindVAO(this._vao),o.assertCompatibleVertexAttributeLocations(this._vao),s.bindPipelineState(this.rctx);for(let r=0;r<5;r++){const t=A[r],e=B[r];f(this._viewMatrix,k,t,e),m(this._viewMatrix3,this._viewMatrix),o.setUniformMatrix3fv("viewMatrix",this._viewMatrix3);const i=z.TEXTURE_CUBE_MAP_POSITIVE_X+r;this.frameBufferCube.setColorTextureTarget(i),this.rctx.gl.drawArrays(this.rctx.gl.TRIANGLE_STRIP,0,4),this.rctx.gl.flush()}this.running=!1,this.rctx.setViewport(i.x,i.y,i.width,i.height),this.requestRender(),t.madeProgress()}};t([u({constructOnly:!0})],q.prototype,"rctx",void 0),t([u({constructOnly:!0})],q.prototype,"view",void 0),t([u({constructOnly:!0})],q.prototype,"requestRender",void 0),t([u()],q.prototype,"_frameTask",void 0),t([u()],q.prototype,"coverage",void 0),t([u()],q.prototype,"density",void 0),t([u()],q.prototype,"absorption",void 0),t([u()],q.prototype,"cloudSize",void 0),t([u()],q.prototype,"detailSize",void 0),t([u()],q.prototype,"smoothness",void 0),t([u()],q.prototype,"cloudHeight",void 0),t([u()],q.prototype,"raymarchingStepType",void 0),t([u()],q.prototype,"running",void 0),q=t([p("esri.views.3d.environment.CloudsGenerator")],q);const A=[_(1,0,0),_(-1,0,0),_(0,1,0),_(0,-1,0),_(0,0,1)],B=[_(0,1,0),_(0,1,0),_(0,0,-1),_(0,0,1),_(0,1,0)],k=g(),P=v.sunny;export{q as CloudsGenerator};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.23/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Error.js";import{isSome as t}from"../../../core/maybe.js";import{initial as s,watch as o,when as i,syncAndInitial as a}from"../../../core/reactiveUtils.js";import{property as l}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/arrayUtils.js";import"../../../core/has.js";import"../../../core/accessorSupport/ensureType.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import{hydrateGeometry as u}from"../../../layers/graphics/hydratedFeatures.js";import{FeatureTileController3D as c}from"../../../layers/graphics/controllers/FeatureTileController3D.js";import{FeatureLikeLayerView3D as p}from"./FeatureLikeLayerView3D.js";import{LayerView3D as m}from"./LayerView3D.js";import{FeatureTileFetcher3DLayerViewContext as h}from"./support/FeatureTileFetcher3DLayerViewContext.js";import{EventedSet as d}from"../support/EventedSet.js";import{updatingProgress as y}from"../support/updatingProperties.js";import{UpdatePolicy as f}from"../webgl-engine/lib/basicInterfaces.js";import{FeatureLayerView as g}from"../../layers/FeatureLayerView.js";import F from"../../layers/LayerView.js";import{RefreshableLayerView as b}from"../../layers/RefreshableLayerView.js";let x=class extends(b(p(g(m(F))))){constructor(e){super(e),this._controllerTotal=0,this._graphicsCoreTotal=0,this.suspendResumeExtentMode="data"}initialize(){this.updatingHandles.add((()=>this.view.floors),(()=>this.processor.filterVisibility.filterChanged()))}destroy(){this.fetcherContext&&(this.fetcherContext.destroy(),this.fetcherContext=null)}get maximumNumberOfFeatures(){var e,r;return null!=(e=null==(r=this.controller)?void 0:r.maximumNumberOfFeatures)?e:this._get("maximumNumberOfFeatures")}set maximumNumberOfFeatures(e){this._set("maximumNumberOfFeatures",e),this.controller&&(this.controller.maximumNumberOfFeatures=e)}get maximumNumberOfFeaturesExceeded(){return!!this.controller&&!(this.suspended||!this.controller.maximumNumberOfFeaturesExceeded)}get updatingProgressValue(){var e,r,t;let s=0;if(null!=(e=this.controller)&&e.updating){const e=this.controller.updatingRemaining,r=Math.max(this.controller.updatingTotal,this._controllerTotal);r>0&&(s=(r-e)/r,this._controllerTotal=r)}let o=0;if(null!=(r=this.processor)&&null!=(t=r.graphicsCore)&&t.updating){const e=this.processor.graphicsCore.updatingRemaining,r=Math.max(e,this._graphicsCoreTotal);r>0&&(o=(r-e)/r,this._graphicsCoreTotal=r)}return.5*(s+o)}get updatePolicy(){if(!this.controller)return f.ASYNC;switch(this.controller.mode){case"snapshot":{const e=C[this.layer.geometryType];return null==e||this.controller.serviceDataCount>e?f.ASYNC:f.SYNC}case"tiles":return f.ASYNC}}get hasZ(){const e=this.layer,r=e.capabilities&&e.capabilities.data;return!(!r||!r.supportsZ)&&("returnZ"in e&&null!=e.returnZ?e.returnZ:r.supportsZ)}get hasM(){const e=this.layer,r=e.capabilities&&e.capabilities.data;return!(!r||!r.supportsM)&&("returnM"in e&&null!=e.returnM&&e.returnM)}setVisibility(e,r){this.processor&&this.processor.graphicsCore.setObjectIdVisibility(e,r)}createQuery(){return super.createQuery()}queryFeatures(e,r){const t=()=>super.queryFeatures(e,r);return"mesh"===this.layer.geometryType?this._queryFeaturesMesh(this._ensureQuery(e),t):t()}beforeSetController(e){e.maximumNumberOfFeatures=this.maximumNumberOfFeatures}createController(){this.fetcherContext=new h({layerView:this,returnZ:this.hasZ,returnM:this.hasM});const e=new c({layerView:this,context:this.fetcherContext,graphics:new d,extent:this.clippingExtent});return this.updatingHandles.add((()=>e.serviceDataExtent),(e=>{this.processor&&(this.processor.dataExtent=e)}),s),this.handles.add(o((()=>this.suspended),(r=>{r?e.suspend():e.resume()}),a)),this.updatingHandles.add((()=>{var e,r;return null==(e=this.processor)||null==(r=e.graphicsCore)?void 0:r.displayFeatureLimit}),(()=>this._updateDisplayFeatureLimit(e)),s),this.handles.add([this.view.resourceController.memoryController.events.on("quality-changed",(()=>this._updateDisplayFeatureLimit())),i((()=>!this.updating),(()=>{this._controllerTotal=0,this._graphicsCoreTotal=0,this.notifyChange("updatingProgressValue")}))]),e}async doRefresh(e){e&&!this.suspended&&this.controller&&this.controller.refetch(),this.processor.filterVisibility.dirty=!0}getUsedMemory(){const e=this.processor&&this.processor.graphicsCore;return(e?e.usedMemory:0)+(this.controller?this.controller.memoryForUnusedFeatures:0)}getUnloadedMemory(){const e=this.processor&&this.processor.graphicsCore;return(e?e.unprocessedMemoryEstimate:0)+(this.controller?this.controller.expectedFeatureDiff*e.usedMemoryPerGraphic:0)}ignoresMemoryFactor(){return this.controller&&this.controller.hasMaximumNumberOfFeaturesOverride}_updateDisplayFeatureLimit(e=this.controller){if(!e||!this.processor||!this.processor.graphicsCore)return;const r=this.processor.graphicsCore.displayFeatureLimit,t=this.view.resourceController.memoryController.memoryFactor;if(1===t)e.displayFeatureLimit=r;else{const s=Math.ceil(r.maximumNumberOfFeatures*t),o=Math.ceil(r.maximumTotalNumberOfFeatures*t),i=Math.ceil(r.minimumTotalNumberOfFeatures*t);e.displayFeatureLimit={...r,maximumNumberOfFeatures:s,maximumTotalNumberOfFeatures:o,minimumTotalNumberOfFeatures:i}}}async _queryFeaturesMesh(e,r){await this._validateQueryFeaturesMesh(e);const t=await r();if(e&&e.outStatistics)return t;const s=this.layer.objectIdField,o=this.processor.graphicsCore.graphics3DGraphicsByObjectID,i=[];for(const a of t.features)if(a.geometry){const e=o.get(a.attributes[s]);e&&(a.geometry=u(e.graphic.geometry),i.push(a))}else i.push(a);return t.features=i,t}async _validateQueryFeaturesMesh(e){if(!e)return;const s=e=>{throw new r("feature-layer-view:unsupported-query",`Queries on Mesh feature collection layers do not support '${e}'`)},o=["quantizationParameters","geometryPrecision","maxAllowableOffset"];for(const r of o)null!=e[r]&&s(r);"returnM"in e&&e.returnM&&s("returnM"),"returnCentroid"in e&&e.returnCentroid&&s("returnCentroid"),t(e.outSpatialReference)&&!e.outSpatialReference.equals(this.view.spatialReference)&&s("outSpatialReference")}get performanceInfo(){const e=this.controller&&this.controller.displayFeatureLimit,r=t(e)&&e.averageSymbolComplexity,s=t(r)?`f:${r.primitivesPerFeature},v:${r.primitivesPerCoordinate}`:"n/a",o={...this._getResourceInfo(),storedFeatures:0,totalVertices:0,partial:this.maximumNumberOfFeaturesExceeded,mode:this.controller?this.controller.mode:"n/a",symbolComplexity:s,nodes:this.controller?this.controller.tileDescriptors.length:0};if(this.controller&&o.displayedNumberOfFeatures){const e=this.controller.debug;o.storedFeatures=e.storedFeatures,o.totalVertices=e.totalVertices}return o}get test(){return{updatePolicy:this.updatePolicy,controller:this.controller}}};e([l()],x.prototype,"layer",void 0),e([l()],x.prototype,"controller",void 0),e([l()],x.prototype,"maximumNumberOfFeatures",null),e([l()],x.prototype,"maximumNumberOfFeaturesExceeded",null),e([l(y)],x.prototype,"updatingProgress",void 0),e([l({readOnly:!0,dependsOn:["controller.updatingRemaining","controller.updatingTotal","processor.graphicsCore.updatingRemaining"]})],x.prototype,"updatingProgressValue",null),e([l({readOnly:!0})],x.prototype,"updatePolicy",null),e([l({readOnly:!0})],x.prototype,"hasZ",null),e([l({readOnly:!0})],x.prototype,"hasM",null),e([l()],x.prototype,"suspendResumeExtentMode",void 0),x=e([n("esri.views.3d.layers.FeatureLayerViewBase3D")],x);const C={point:5e3,polygon:500,polyline:1e3},M=x;export{M as default};
|