@arcgis/core 4.33.0-next.20250401 → 4.33.0-next.20250403
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/applications/SceneViewer/sceneViewerUtils.d.ts +1 -0
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/arcade/functions/knowledgegraph.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0cd5f15b8558b23e5fcd.js +1 -0
- package/assets/esri/core/workers/chunks/0cec53e6f1464c69448d.js +1 -0
- package/assets/esri/core/workers/chunks/48fbf887da6d19838bf0.js +1 -0
- package/assets/esri/core/workers/chunks/{ba4d91816f6a0bf0d812.js → 4dc135e0133d58a06d67.js} +1 -1
- package/assets/esri/core/workers/chunks/{322cb1b1871d03b69f0a.js → 5beb525b4adde1d98532.js} +33 -33
- package/assets/esri/core/workers/chunks/{3577909b8e84959d415b.js → 6a8cf1f51cc4adc268d3.js} +1 -1
- package/assets/esri/core/workers/chunks/6b0a6469673417563616.js +1 -0
- package/assets/esri/core/workers/chunks/{bdeac9196f28aff93e68.js → 93d06a1a0b700ddb3807.js} +1 -1
- package/assets/esri/core/workers/chunks/b28b699de6deb7e9fa53.js +1 -0
- package/assets/esri/core/workers/chunks/{1a5f96b1b892ecceb36a.js → b4a1f3f3a036226d6810.js} +1 -1
- package/assets/esri/core/workers/chunks/{738e4f46feb3758456e0.js → baa9fd23414f03ef90bc.js} +1 -1
- package/assets/esri/core/workers/chunks/c977a47cabc419610277.js +1 -0
- package/assets/esri/core/workers/chunks/{7e00122014d0a55363a8.js → ccb289911e7445b17763.js} +1 -1
- package/assets/esri/core/workers/chunks/{e2029267cddb8e2effab.js → d58fae2fc9d148e015ae.js} +1 -1
- package/core/sql/WhereClause.js +1 -1
- package/core/typedArrayUtil.js +1 -1
- package/editing/sharedTemplates/SharedTemplateProvider.js +1 -1
- package/geometry/Polygon.js +1 -1
- package/geometry/support/buffer/BufferView.js +1 -1
- package/geometry/support/buffer/internals/Vec2.js +1 -1
- package/interfaces.d.ts +112 -27
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/support/VideoElement.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/ElevationInfo.js +1 -1
- package/undoredo/support/Services.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/CollisionJob.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolDeclutterer.js +1 -1
- package/views/2d/engine/vectorTiles/decluttering/SymbolFader.js +1 -1
- package/views/2d/layers/StreamLayerView2D.js +1 -1
- package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
- package/views/3d/environment/NoiseTextureAtlasTechnique.js +1 -1
- package/views/3d/environment/PrecipitationTechnique.js +1 -1
- package/views/3d/environment/SimpleAtmosphereTechnique.js +1 -1
- package/views/3d/layers/DrapedSubView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/i3s/I3SBinaryReader.js +1 -1
- package/views/3d/layers/i3s/I3SQueryFeatureAdapter.js +1 -1
- package/views/3d/layers/i3s/I3SQueryFeatureStore.js +1 -1
- package/views/3d/layers/i3s/I3SUtil.js +1 -1
- package/views/3d/layers/support/TemporalSceneLayerView.js +1 -1
- package/views/3d/support/buffer/InterleavedLayout.js +1 -1
- package/views/3d/terrain/PatchGeometry.js +1 -1
- package/views/3d/terrain/PatchGeometryFactory.js +1 -1
- package/views/3d/terrain/TerrainAttributes.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexPosition.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
- package/views/3d/webgl-engine/effects/haze/HazeTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/HighlightApplyTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlightTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/magnifier/MagnifierTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/stars/StarsTechnique.js +1 -1
- package/views/3d/webgl-engine/effects/transparency/OITBlendTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/ChangeSet.js +1 -1
- package/views/3d/webgl-engine/lib/GLMaterials.js +1 -1
- package/views/3d/webgl-engine/lib/ITexture.js +1 -1
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
- package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Texture.js +1 -1
- package/views/3d/webgl-engine/lib/TextureRepository.js +1 -1
- package/views/3d/webgl-engine/lib/TextureTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/TextureUpdater.js +5 -0
- package/views/3d/webgl-engine/lib/rendererUtils.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ViewshedTechnique.js +1 -1
- package/views/interactive/snapping/FeatureSnappingSourceInfo.js +1 -1
- package/views/layers/PointCloudLayerView.d.ts +1 -1
- package/views/layers/PointCloudLayerView.js +5 -0
- package/views/webgl/renderState.js +1 -1
- package/views/webgl/testFloatBufferBlend.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
- package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationSettings.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
- package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
- package/widgets/support/GridControls.js +1 -1
- package/assets/esri/core/workers/chunks/093421648cc61afdeb3c.js +0 -1
- package/assets/esri/core/workers/chunks/4816cf647eca2f4cecc2.js +0 -1
- package/assets/esri/core/workers/chunks/8725580f6d2a495051b5.js +0 -1
- package/assets/esri/core/workers/chunks/a56da688088404259481.js +0 -1
- package/assets/esri/core/workers/chunks/e6469173c65531d6524a.js +0 -1
- package/assets/esri/core/workers/chunks/e9e517a2141e504eec64.js +0 -1
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../request.js";import o from"../../core/Error.js";import{once as r}from"../../core/events.js";import s from"../../core/Logger.js";import{clamp as i}from"../../core/mathUtils.js";import{isAbsolute as n,makeAbsolute as a,getProxyRule as c,addProxy as d,isBlobProtocol as p,isDataProtocol as l}from"../../core/urlUtils.js";import{property as u}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as m}from"../../core/accessorSupport/decorators/subclass.js";import{writer as h}from"../../core/accessorSupport/decorators/writer.js";import
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../request.js";import o from"../../core/Error.js";import{once as r}from"../../core/events.js";import s from"../../core/Logger.js";import{clamp as i}from"../../core/mathUtils.js";import{isAbsolute as n,makeAbsolute as a,getProxyRule as c,addProxy as d,isBlobProtocol as p,isDataProtocol as l}from"../../core/urlUtils.js";import{property as u}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as m}from"../../core/accessorSupport/decorators/subclass.js";import{writer as h}from"../../core/accessorSupport/decorators/writer.js";import y from"./MediaElementBase.js";import{mediaElementUrlProperty as v,mediaTypeProperty as g}from"./mediaUtils.js";import{VideoElementSymbol as f}from"../../support/mediaLayerUtils.js";import{i as j}from"../../chunks/persistableUrlUtils.js";var b;let U=class extends y{static{b=f}constructor(e){super(e),this.autoplay=!0,this.content=null,this.type="video",this[b]=!0}load(){const e=this.video;return"string"==typeof e?this.addResolvingPromise(this._preProcessVideoUrl(e).then((async e=>{const t=document.createElement("video");return t.src=e,t.crossOrigin="anonymous",t.autoplay=this.autoplay,t.muted=!0,t.loop=!0,t.playsInline=!0,this._loadVideo(t).then((()=>{this._set("content",t)}))}))):e instanceof HTMLVideoElement?this.addResolvingPromise(this._loadVideo(e).then((()=>{this._set("content",e)}))):this.addResolvingPromise(Promise.reject(new o("video-element:invalid-video-type","Invalid video type",{video:e}))),Promise.resolve(this)}get contentWidth(){return this.content?.videoWidth??0}get contentHeight(){return this.content?.videoHeight??0}get currentTime(){return this.content?.currentTime}set currentTime(e){if(!this.content)return;const t=i(e,0,this.content.duration);"fastSeek"in this.content?this.content.fastSeek(t):this.content.currentTime=t,this.content.play().then((()=>{this.content?.pause()})).catch((()=>{}))}get duration(){return this.content?.duration}set video(e){"not-loaded"===this.loadStatus?this._set("video",e):s.getLogger(this).error("#video","video cannot be changed after the element is loaded.")}writeVideo(e,t,r,s){if(!e)return void(s?.messages&&s.messages.push(new o("video-element:unsupported-video","video source is missing")));const i=V(e)?e:null;if(!i)return void(s?.messages&&s.messages.push(new o("video-element:unsupported-video","video source must be an absolute url")));!n(i)&&s?.blockedRelativeUrls&&s.blockedRelativeUrls.push(i);const c=a(i);!j(c)?t[r]=c:s?.messages&&s.messages.push(new o("video-element:unsupported-video","video source cannot be an item resource"))}async _preProcessVideoUrl(e){if(c(e))return d(e);try{return await t(e,{method:"head"}),e}catch{try{return d(e,!0)}catch{return e}}}_loadVideo(e){return new Promise(((t,o)=>{const s=r(e,"canplay",(()=>{this.removeHandles("canplay"),this.autoplay?e.play().then(t,o):t()}));this.addHandles(s,"canplay"),"anonymous"!==e.crossOrigin&&(e.crossOrigin="anonymous",p(e.src)||(e.src=e.src))}))}};e([u()],U.prototype,"autoplay",void 0),e([u({readOnly:!0})],U.prototype,"content",void 0),e([u({readOnly:!0})],U.prototype,"contentWidth",null),e([u({readOnly:!0})],U.prototype,"contentHeight",null),e([u({type:Number})],U.prototype,"currentTime",null),e([u({type:Number})],U.prototype,"duration",null),e([u(v)],U.prototype,"video",null),e([h("video")],U.prototype,"writeVideo",null),e([u(g)],U.prototype,"type",void 0),U=e([m("esri.layers.support.VideoElement")],U);const w=U;function V(e){return"string"==typeof e&&!l(e)&&!p(e)}export{w as default};
|
package/package.json
CHANGED
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.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
const
|
|
5
|
+
const c="20250403",f="378291f9d13234dc2483cf348050c8f6de4c332f";export{c as buildDate,f as commitHash};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import{strict as o,JSONMap as r}from"../../core/jsonMap.js";import t from"../../core/JSONSupport.js";import{equalsMaybe as s}from"../../core/maybe.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{reader as n}from"../../core/accessorSupport/decorators/reader.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{writer as u}from"../../core/accessorSupport/decorators/writer.js";import f from"./FeatureExpressionInfo.js";import{supportedUnits as a}from"./unitConversionUtils.js";var l;const m=o()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),d=new r({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let c=class extends t{static{l=this}constructor(e){super(e),this.featureExpressionInfo=void 0,this.offset=null}readFeatureExpressionInfo(e,o){return null!=e?e:o.featureExpression&&0===o.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,o,r,t){o[r]=e.write({},t),"0"===e.expression&&(o.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:o}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||o?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,o){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,o):null}clone(){return new l({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&s(this.featureExpressionInfo,e.featureExpressionInfo)}};e([i({type:f,json:{write:!0}})],c.prototype,"featureExpressionInfo",void 0),e([n("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],c.prototype,"readFeatureExpressionInfo",null),e([u("featureExpressionInfo",{featureExpressionInfo:{type:f},"featureExpression.value":{type:[0]}})],c.prototype,"writeFeatureExpressionInfo",null),e([i({type:m.apiValues,nonNullable:!0,json:{type:m.jsonValues,read:m.read,write:{writer:m.write,isRequired:!0}}})],c.prototype,"mode",null),e([i({type:Number,json:{write:!0}})],c.prototype,"offset",void 0),e([i({type:a,json:{type:String,read:d.read,write:d.write}})],c.prototype,"unit",null),c=l=e([p("esri.symbols.support.ElevationInfo")],c);const h=c;export{h as default};
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import{strict as o,JSONMap as r}from"../../core/jsonMap.js";import t from"../../core/JSONSupport.js";import{equalsMaybe as s}from"../../core/maybe.js";import{property as i}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{reader as n}from"../../core/accessorSupport/decorators/reader.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{writer as u}from"../../core/accessorSupport/decorators/writer.js";import f from"./FeatureExpressionInfo.js";import{supportedUnits as a}from"./unitConversionUtils.js";var l;const m=o()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),d=new r({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let c=class extends t{static{l=this}constructor(e){super(e),this.featureExpressionInfo=void 0,this.offset=null}readFeatureExpressionInfo(e,o){return null!=e?e.expression?e:void 0:o.featureExpression&&0===o.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,o,r,t){o[r]=e.write({},t),"0"===e.expression&&(o.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:o}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||o?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,o){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,o):null}clone(){return new l({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&s(this.featureExpressionInfo,e.featureExpressionInfo)}};e([i({type:f,json:{write:!0}})],c.prototype,"featureExpressionInfo",void 0),e([n("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],c.prototype,"readFeatureExpressionInfo",null),e([u("featureExpressionInfo",{featureExpressionInfo:{type:f},"featureExpression.value":{type:[0]}})],c.prototype,"writeFeatureExpressionInfo",null),e([i({type:m.apiValues,nonNullable:!0,json:{type:m.jsonValues,read:m.read,write:{writer:m.write,isRequired:!0}}})],c.prototype,"mode",null),e([i({type:Number,json:{write:!0}})],c.prototype,"offset",void 0),e([i({type:a,json:{type:String,read:d.read,write:d.write}})],c.prototype,"unit",null),c=l=e([p("esri.symbols.support.ElevationInfo")],c);const h=c;export{h 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.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import{id as i}from"../../kernel.js";import r from"../../core/Collection.js";import n from"../../core/Error.js";import s from"../../core/Evented.js";import t from"../../core/Loadable.js";import o from"../../core/Logger.js";import{getOrCreateMapValue as a}from"../../core/MapUtils.js";import d from"../../core/Promise.js";import{debounce as c,throwIfAborted as v}from"../../core/promiseUtils.js";import l from"../../core/ReactiveMap.js";import{watch as p,whenOnce as m}from"../../core/reactiveUtils.js";import{normalize as u}from"../../core/urlUtils.js";import{property as f}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as h}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as g}from"../../core/support/UpdatingHandles.js";import{parse as w}from"../../layers/support/arcgisLayerUrl.js";import{isSubtypeGroupLayer as y,isFeatureLayer as S}from"../../layers/support/layerUtils.js";import I from"../../portal/Portal.js";import{hasUserTypeExtension as _}from"../../portal/support/utils.js";import b from"../../rest/featureService/FeatureService.js";import{ServiceVersionInfo as L}from"./ServiceVersionInfo.js";import V from"../../versionManagement/VersionManagementService.js";function A(e){return!e||0===e.trim().length}const U=new Map;function T(e){return a(U,e,(()=>{const i=new j({view:e});return e.addHandles({remove(){U.delete(e),i.destroy()}}),i.load().catch((e=>{o.getLogger("esri.views.Services").error("Failed to load service metadata",e)})),i}))}let j=class extends(t.LoadableMixin(d.EsriPromiseMixin(s.EventedAccessor))){constructor(e){super(e),this._updatingHandles=new g,this.items=new r,this.tablesAndLayersLookup=new l,this.additionalLayers=new r,this._debouncedCheckAndUpdateServiceInfos=c((async()=>{const e=[];for(const i of this.items){if(0===i.layersAndTables.length)continue;const r=i.layersAndTables.getItemAt(0);r?.gdbVersion!==i.versionInfo?.versionIdentifier.name&&e.push(i)}0!==e.length&&(await m((()=>!this.updating)),await this._updateVersionInfos(e))})),this._debouncedLayersChanged=c((async()=>{const e=this._detectNewLayersAndTables();0!==e.length&&(await m((()=>!this._updatingHandles.updating)),await this._updatingHandles.addPromise((async()=>{const i=new Set;for(const n of e)if("feature"===n.type||"subtype-group"===n.type){if(!n.url)continue;const e=w(n.url).url.path,s=this._findServiceInfo(e);if(s)this.tablesAndLayersLookup.set(n,s),n.isTable?s.tables.push(n):s.layers.push(n);else if(!i.has(e))try{await this._addServiceInfo(e,n)}catch(r){o.getLogger(this).error(`Failed to load feature service: ${e}`,r)}finally{i.add(e)}}})()))})),this._processed=new Set}destroy(){this._set("view",null),this.items.removeAll(),this.tablesAndLayersLookup.clear()}async load(e){return v(e),this.addHandles([p((()=>this._allLayersAndTables),(()=>{this._debouncedLayersChanged().catch((e=>{o.getLogger(this).warn("Failed to update service info",e)}))})),p((()=>this.items.map((e=>e.layersAndTables.map((e=>e.gdbVersion??"")).join(",")))),(()=>{this.checkAndUpdateServiceInfos().catch((e=>{o.getLogger(this).warn("Failed to update service info",e)}))}))]),this.addResolvingPromise(this._debouncedLayersChanged()),this}get updating(){return"loading"===this.loadStatus||this._updatingHandles.updating}checkAndUpdateServiceInfos(){return this._debouncedCheckAndUpdateServiceInfos()}changeVersion(e,i,r){return this._updatingHandles.addPromise((async()=>{await this._changeVersionInternal(e,i,r)})())}createVersion(e){return this._updatingHandles.addPromise((async()=>{const i=e.featureServerUrl,r=this._findServiceInfo(i);if(!r?.versionService)throw new n("services:no-version-management-service","No version management service");const s=r.hasAdvancedEditingUserTypeExtension,t=r.loggedInServiceUser.toUpperCase(),o=A(e.ownerName)?t:e.ownerName?.trim().toUpperCase();if(o!==t){if(r.featureServiceVersion<=11.1)throw new n("services:versioning-api-error","Version management API too old");if(!s)throw new n("services:no-advanced-editing-user-type-extension","No advanced editing extension on service")}if("SDE"===o?.toUpperCase()&&"DEFAULT"===e.versionName.toUpperCase())throw new n("services:no-valid-version-name","No valid version name");{const i=await r.versionService.getVersionInfos();if(i?.find((i=>i.versionIdentifier.name.toUpperCase()===(o+"."+e.versionName).toUpperCase()||i.versionIdentifier.name.toUpperCase()===(t+"."+e.versionName).toUpperCase())))throw new n("services:no-valid-version-name","No valid version name")}const a=await r.versionService.createVersion({versionName:e.versionName,access:o!==t?"public":e.access,description:e.description});if(o!==t){const{guid:i,name:n}=a.versionIdentifier;await r.versionService.alterVersion({guid:i,name:n},{ownerName:o,access:e.access})}e.switchToVersion&&await this._changeVersionInternal(i,a.versionIdentifier.name,a.versionIdentifier.guid),this.emit("version-created",{versionIdentifier:a.versionIdentifier,versionManagementService:r.versionService})})())}deleteVersion(e,i,r){return this._updatingHandles.addPromise((async()=>{const s=this._findServiceInfo(e);if(!s?.versionService)throw new n("services:no-version-management-service","No version management service");if(s.featureServiceVersion<=11.1)throw new n("services:versioning-api-error","Version management API too old");if(!s.hasAdvancedEditingUserTypeExtension)throw new n("services:no-advanced-editing-user-type-extension","No advanced editing extension on service");const t={name:i,guid:r};await s.versionService.deleteVersion(t)&&(await this._updateVersionInfo(s),this.emit("version-deleted",{versionIdentifier:t,versionManagementService:s.versionService}))})())}startEditing(e){return this._updatingHandles.addPromise((async()=>{const i=this._findServiceInfo(e);if(!i?.versionService)throw new n("services:no-version-management-service","No version management service");if(!i.hasAdvancedEditingUserTypeExtension)throw new n("services:no-advanced-editing-user-type-extension","No advanced editing extension on service");const r=i.versionInfo?.versionIdentifier??{name:i.versionService.defaultVersionIdentifier.name,guid:i.versionService.defaultVersionIdentifier.guid};let s=!0;("none"!==i.versionService.getLockType(r)||(s=await i.versionService.startReading(r),s))&&(s=await i.versionService.startEditing(r),i.updateLockType())})())}finishEditing(e,i){return this._updatingHandles.addPromise((async()=>{const r=this._findServiceInfo(e);if(!r?.versionService)throw new n("services:no-version-management-service","No version management service");if(!r.hasAdvancedEditingUserTypeExtension)throw new n("services:no-advanced-editing-user-type-extension","No advanced editing extension on service");const s=r.versionInfo?.versionIdentifier??{name:r.versionService.defaultVersionIdentifier.name,guid:r.versionService.defaultVersionIdentifier.guid},t=r.versionService.getLockType(s);if("none"!==t)return"read"===t?(await r.versionService.stopReading(s),void r.updateLockType()):"edit"===t?(await r.versionService.stopEditing(s,i),await r.versionService.stopReading(s),void r.updateLockType()):void 0})())}async _changeVersionInternal(e,i,r){const s=this._findServiceInfo(e);if(!s?.versionService)throw new n("services:no-version-management-service","No version management service");const t=s.versionInfo?.versionIdentifier??{name:s.versionService.defaultVersionIdentifier.name,guid:s.versionService.defaultVersionIdentifier.guid},o={name:i,guid:r};await s.versionService.changeVersion(this.view?.map,t,o)&&await this._updateVersionInfo(s)}async _updateVersionInfo(e){const i=e.versionService;if(!i)return;if(0===e.layersAndTables.length)return;const r=e.layersAndTables.getItemAt(0)?.gdbVersion,n=r?await i.getVersionIdentifierFromName(r):i.defaultVersionIdentifier;e.versionInfo=await i.getVersionInfoExtended(n)}_findServiceInfo(e){return this.items.find((i=>i.featureService.url===e))??null}_removeFeatureService(e){this.items.remove(e)}async _findPortal(e){const r=i?.findServerInfo(e??"");if(!r?.owningSystemUrl)return null;const n=`${r.owningSystemUrl}/sharing/rest`,s=I.getDefault();if(s?.loaded&&u(s.restUrl)===u(n))return s;return new I({authMode:"immediate",url:r.owningSystemUrl}).load()}_updateVersionInfos(e){return this._updatingHandles.addPromise((async()=>{for(const i of e)await this._updateVersionInfo(i).catch((e=>{o.getLogger(this).error("Failed to update version details",e)}))})())}async _addServiceInfo(e,i){const n=new b({url:e});await n.load();const s=await this._findPortal(e),t=s?.user?.username;let o=!1;t&&(o=await _(s,t,"advediting"));let a=null;n.versionManagementServiceUrl&&(a=new V({url:n.versionManagementServiceUrl}),await a.load());const d=i.isTable?[]:[i],c=i.isTable?[i]:[],v=new L({loggedInServiceUser:t??"",hasAdvancedEditingUserTypeExtension:o,versionInfo:null,lockType:"none",canEditVersionedData:!0,canCreateVersion:!0,featureService:n,versionService:a,layers:new r(d),tables:new r(c)});return a&&await this._updateVersionInfo(v),this.items.push(v),this.tablesAndLayersLookup.set(i,v),i.isTable?v.tables.push(i):v.layers.push(i),v}get _allLayersAndTables(){return[...this.view.map.allLayers,...this.view.map.allTables,...this.additionalLayers]}_detectNewLayersAndTables(){const e=new Set(this._allLayersAndTables),i=[];for(const r of e)"feature"!==r.type&&"subtype-group"!==r.type||this._processed.has(r)||i.push(r);for(const r of this._processed)if(!e.has(r)&&(y(r)||S(r))){const e=this.tablesAndLayersLookup.get(r);if(!e)continue;this.tablesAndLayersLookup.delete(r),r.isTable?e.tables.remove(r):e.layers.remove(r),0===e.layersAndTables.length&&this._removeFeatureService(e)}return this._processed=e,i}};e([f({constructOnly:!0})],j.prototype,"view",void 0),e([f()],j.prototype,"items",void 0),e([f()],j.prototype,"tablesAndLayersLookup",void 0),e([f()],j.prototype,"additionalLayers",void 0),e([f()],j.prototype,"updating",null),e([f()],j.prototype,"_allLayersAndTables",null),j=e([h("esri.undoredo.support.Services")],j);export{j as Services,T as getServices};
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import{id as i}from"../../kernel.js";import r from"../../core/Collection.js";import n from"../../core/Error.js";import s from"../../core/Evented.js";import t from"../../core/Loadable.js";import o from"../../core/Logger.js";import{getOrCreateMapValue as a}from"../../core/MapUtils.js";import d from"../../core/Promise.js";import{debounce as c,throwIfAborted as v}from"../../core/promiseUtils.js";import l from"../../core/ReactiveMap.js";import{watch as p,whenOnce as m}from"../../core/reactiveUtils.js";import{normalize as u}from"../../core/urlUtils.js";import{property as f}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as h}from"../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as g}from"../../core/support/UpdatingHandles.js";import{parse as w}from"../../layers/support/arcgisLayerUrl.js";import{isSubtypeGroupLayer as y,isFeatureLayer as S}from"../../layers/support/layerUtils.js";import I from"../../portal/Portal.js";import{hasUserTypeExtension as _}from"../../portal/support/utils.js";import b from"../../rest/featureService/FeatureService.js";import{ServiceVersionInfo as L}from"./ServiceVersionInfo.js";function V(e){return!e||0===e.trim().length}const A=new Map;function U(e){return a(A,e,(()=>{const i=new T({view:e});return e.addHandles({remove(){A.delete(e),i.destroy()}}),i.load().catch((e=>{o.getLogger("esri.views.Services").error("Failed to load service metadata",e)})),i}))}let T=class extends(t.LoadableMixin(d.EsriPromiseMixin(s.EventedAccessor))){constructor(e){super(e),this._updatingHandles=new g,this.items=new r,this.tablesAndLayersLookup=new l,this.additionalLayers=new r,this._debouncedCheckAndUpdateServiceInfos=c((async()=>{const e=[];for(const i of this.items){if(0===i.layersAndTables.length)continue;const r=i.layersAndTables.getItemAt(0);r?.gdbVersion!==i.versionInfo?.versionIdentifier.name&&e.push(i)}0!==e.length&&(await m((()=>!this.updating)),await this._updateVersionInfos(e))})),this._debouncedLayersChanged=c((async()=>{const e=this._detectNewLayersAndTables();0!==e.length&&(await m((()=>!this._updatingHandles.updating)),await this._updatingHandles.addPromise((async()=>{const i=new Set;for(const n of e)if("feature"===n.type||"subtype-group"===n.type){if(!n.url)continue;const e=w(n.url).url.path,s=this._findServiceInfo(e);if(s)this.tablesAndLayersLookup.set(n,s),n.isTable?s.tables.push(n):s.layers.push(n);else if(!i.has(e))try{await this._addServiceInfo(e,n)}catch(r){o.getLogger(this).error(`Failed to load feature service: ${e}`,r)}finally{i.add(e)}}})()))})),this._processed=new Set}destroy(){this._set("view",null),this.items.removeAll(),this.tablesAndLayersLookup.clear()}async load(e){return v(e),this.addHandles([p((()=>this._allLayersAndTables),(()=>{this._debouncedLayersChanged().catch((e=>{o.getLogger(this).warn("Failed to update service info",e)}))})),p((()=>this.items.map((e=>e.layersAndTables.map((e=>e.gdbVersion??"")).join(",")))),(()=>{this.checkAndUpdateServiceInfos().catch((e=>{o.getLogger(this).warn("Failed to update service info",e)}))}))]),this.addResolvingPromise(this._debouncedLayersChanged()),this}get updating(){return"loading"===this.loadStatus||this._updatingHandles.updating}checkAndUpdateServiceInfos(){return this._debouncedCheckAndUpdateServiceInfos()}changeVersion(e,i,r){return this._updatingHandles.addPromise((async()=>{await this._changeVersionInternal(e,i,r)})())}createVersion(e){return this._updatingHandles.addPromise((async()=>{const i=e.featureServerUrl,r=this._findServiceInfo(i);if(!r?.versionService)throw new n("services:no-version-management-service","No version management service");const s=r.hasAdvancedEditingUserTypeExtension,t=r.loggedInServiceUser.toUpperCase(),o=V(e.ownerName)?t:e.ownerName?.trim().toUpperCase();if(o!==t){if(r.featureServiceVersion<=11.1)throw new n("services:versioning-api-error","Version management API too old");if(!s)throw new n("services:no-advanced-editing-user-type-extension","No advanced editing extension on service")}if("SDE"===o?.toUpperCase()&&"DEFAULT"===e.versionName.toUpperCase())throw new n("services:no-valid-version-name","No valid version name");{const i=await r.versionService.getVersionInfos();if(i?.find((i=>i.versionIdentifier.name.toUpperCase()===(o+"."+e.versionName).toUpperCase()||i.versionIdentifier.name.toUpperCase()===(t+"."+e.versionName).toUpperCase())))throw new n("services:no-valid-version-name","No valid version name")}const a=await r.versionService.createVersion({versionName:e.versionName,access:o!==t?"public":e.access,description:e.description});if(o!==t){const{guid:i,name:n}=a.versionIdentifier;await r.versionService.alterVersion({guid:i,name:n},{ownerName:o,access:e.access})}e.switchToVersion&&await this._changeVersionInternal(i,a.versionIdentifier.name,a.versionIdentifier.guid),this.emit("version-created",{versionIdentifier:a.versionIdentifier,versionManagementService:r.versionService})})())}deleteVersion(e,i,r){return this._updatingHandles.addPromise((async()=>{const s=this._findServiceInfo(e);if(!s?.versionService)throw new n("services:no-version-management-service","No version management service");if(s.featureServiceVersion<=11.1)throw new n("services:versioning-api-error","Version management API too old");if(!s.hasAdvancedEditingUserTypeExtension)throw new n("services:no-advanced-editing-user-type-extension","No advanced editing extension on service");const t={name:i,guid:r};await s.versionService.deleteVersion(t)&&(await this._updateVersionInfo(s),this.emit("version-deleted",{versionIdentifier:t,versionManagementService:s.versionService}))})())}startEditing(e){return this._updatingHandles.addPromise((async()=>{const i=this._findServiceInfo(e);if(!i?.versionService)throw new n("services:no-version-management-service","No version management service");if(!i.hasAdvancedEditingUserTypeExtension)throw new n("services:no-advanced-editing-user-type-extension","No advanced editing extension on service");const r=i.versionInfo?.versionIdentifier??{name:i.versionService.defaultVersionIdentifier.name,guid:i.versionService.defaultVersionIdentifier.guid};let s=!0;("none"!==i.versionService.getLockType(r)||(s=await i.versionService.startReading(r),s))&&(s=await i.versionService.startEditing(r),i.updateLockType())})())}finishEditing(e,i){return this._updatingHandles.addPromise((async()=>{const r=this._findServiceInfo(e);if(!r?.versionService)throw new n("services:no-version-management-service","No version management service");if(!r.hasAdvancedEditingUserTypeExtension)throw new n("services:no-advanced-editing-user-type-extension","No advanced editing extension on service");const s=r.versionInfo?.versionIdentifier??{name:r.versionService.defaultVersionIdentifier.name,guid:r.versionService.defaultVersionIdentifier.guid},t=r.versionService.getLockType(s);if("none"!==t)return"read"===t?(await r.versionService.stopReading(s),void r.updateLockType()):"edit"===t?(await r.versionService.stopEditing(s,i),await r.versionService.stopReading(s),void r.updateLockType()):void 0})())}async _changeVersionInternal(e,i,r){const s=this._findServiceInfo(e);if(!s?.versionService)throw new n("services:no-version-management-service","No version management service");const t=s.versionInfo?.versionIdentifier??{name:s.versionService.defaultVersionIdentifier.name,guid:s.versionService.defaultVersionIdentifier.guid},o={name:i,guid:r};await s.versionService.changeVersion(this.view?.map,t,o)&&await this._updateVersionInfo(s)}async _updateVersionInfo(e){const i=e.versionService;if(!i)return;if(0===e.layersAndTables.length)return;const r=e.layersAndTables.getItemAt(0)?.gdbVersion,n=r?await i.getVersionIdentifierFromName(r):i.defaultVersionIdentifier;e.versionInfo=await i.getVersionInfoExtended(n)}_findServiceInfo(e){return this.items.find((i=>i.featureService.url===e))??null}_removeFeatureService(e){this.items.remove(e)}async _findPortal(e){const r=i?.findServerInfo(e??"");if(!r?.owningSystemUrl)return null;const n=`${r.owningSystemUrl}/sharing/rest`,s=I.getDefault();if(s?.loaded&&u(s.restUrl)===u(n))return s;return new I({authMode:"immediate",url:r.owningSystemUrl}).load()}_updateVersionInfos(e){return this._updatingHandles.addPromise((async()=>{for(const i of e)await this._updateVersionInfo(i).catch((e=>{o.getLogger(this).error("Failed to update version details",e)}))})())}async _addServiceInfo(e,i){const n=new b({url:e});await n.load();const s=await this._findPortal(e),t=s?.user?.username;let o=!1;t&&(o=await _(s,t,"advediting"));let a=null;if(n.versionManagementServiceUrl){a=new(0,(await import("../../versionManagement/VersionManagementService.js")).default)({url:n.versionManagementServiceUrl}),await a.load()}const d=i.isTable?[]:[i],c=i.isTable?[i]:[],v=new L({loggedInServiceUser:t??"",hasAdvancedEditingUserTypeExtension:o,versionInfo:null,lockType:"none",canEditVersionedData:!0,canCreateVersion:!0,featureService:n,versionService:a,layers:new r(d),tables:new r(c)});return a&&await this._updateVersionInfo(v),this.items.push(v),this.tablesAndLayersLookup.set(i,v),i.isTable?v.tables.push(i):v.layers.push(i),v}get _allLayersAndTables(){return[...this.view.map.allLayers,...this.view.map.allTables,...this.additionalLayers]}_detectNewLayersAndTables(){const e=new Set(this._allLayersAndTables),i=[];for(const r of e)"feature"!==r.type&&"subtype-group"!==r.type||this._processed.has(r)||i.push(r);for(const r of this._processed)if(!e.has(r)&&(y(r)||S(r))){const e=this.tablesAndLayersLookup.get(r);if(!e)continue;this.tablesAndLayersLookup.delete(r),r.isTable?e.tables.remove(r):e.layers.remove(r),0===e.layersAndTables.length&&this._removeFeatureService(e)}return this._processed=e,i}};e([f({constructOnly:!0})],T.prototype,"view",void 0),e([f()],T.prototype,"items",void 0),e([f()],T.prototype,"tablesAndLayersLookup",void 0),e([f()],T.prototype,"additionalLayers",void 0),e([f()],T.prototype,"updating",null),e([f()],T.prototype,"_allLayersAndTables",null),T=e([h("esri.undoredo.support.Services")],T);export{T as Services,U as getServices};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{clone as e}from"../../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{collisionGridCellSize as t}from"./config.js";import{GridIndex as
|
|
5
|
+
import{clone as e}from"../../../../../core/libs/gl-matrix-2/factories/mat3f32.js";import{collisionGridCellSize as t}from"./config.js";import{GridIndex as r}from"./util.js";import{TranslateAnchor as s,RotationAlignment as o}from"../style/StyleDefinition.js";class n{constructor(s,o,n,i,l,c){this._symbols=s,this._styleRepository=i,this._zoom=l,this._currentLayerCursor=0,this._currentSymbolCursor=0,this._styleProps=new Map,this._allNeededMatrices=new Map,this._gridIndex=new r(o,n,t),this._si=Math.sin(Math.PI*c/180),this._co=Math.cos(Math.PI*c/180),i.cachedStyles&&(this._styleProps=i.cachedStyles);for(const t of s)for(const r of t.symbols)this._allNeededMatrices.has(r.tile)||this._allNeededMatrices.set(r.tile,e(r.tile.transforms.tileUnitsToPixels))}work(e){const t=performance.now();for(;this._currentLayerCursor<this._symbols.length;this._currentLayerCursor++,this._currentSymbolCursor=0){const r=this._symbols[this._currentLayerCursor],s=this._getProperties(r.styleLayerUID),o=this._styleRepository.layerContexts?.get(r.styleLayerUID);for(;this._currentSymbolCursor<r.symbols.length;this._currentSymbolCursor++){if(this._currentSymbolCursor%100==99&&performance.now()-t>e)return!1;const n=r.symbols[this._currentSymbolCursor];if(!n.uniqueSymbol?.show)continue;const i=this._computeCoordinates(n,s,o),l=n.uniqueSymbol;if(!l.show)continue;const{iconAllowOverlap:c,textAllowOverlap:h}=s;for(const e of i){if(!e.enabled)continue;const t=l.parts[e.partIndex];if(!t.show)continue;!(e.partIndex?h:c)&&this._doesCollide(e)&&(e.hard?l.show=!1:t.show=!1)}l.show&&this._insertColliders(l.parts,i,s)}}return!0}_insertColliders(e,t,r){const{iconIgnorePlacement:s,textIgnorePlacement:o}=r;for(const n of t){if(!n.enabled)continue;if(n.partIndex?o:s)continue;if(!e[n.partIndex].show)continue;const t=n.xScreen+n.dxScreen,r=n.yScreen+n.dyScreen,i=t+n.width,l=r+n.height,[c,h,a,d]=this._gridIndex.getCellSpan(t,r,i,l);for(let e=h;e<=d;e++)for(let t=c;t<=a;t++){this._gridIndex.cells[e][t].push(n)}}}_computeCoordinates(e,t,r){const{iconRotationAlignment:n,textRotationAlignment:i,iconTranslate:l,iconTranslateAnchor:c,textTranslate:h,textTranslateAnchor:a}=t,d=this._si,y=this._co,u=this._zoom,x=this._allNeededMatrices.get(e.tile),_=e.uniqueSymbol,f=e.colliders(r);let m=0;for(const S of f){const[e,t]=0===S.partIndex?l:h,r=0===S.partIndex?c:a,_=S.minLod<=u&&u<=S.maxLod;m+=_?0:1,S.enabled=_,S.xScreen=S.xTile*x[0]+S.yTile*x[3]+x[6],S.yScreen=S.xTile*x[1]+S.yTile*x[4]+x[7],r===s.MAP?(S.xScreen+=y*e-d*t,S.yScreen+=d*e+y*t):(S.xScreen+=e,S.yScreen+=t),o.VIEWPORT===(0===S.partIndex?n:i)?(S.dxScreen=S.dxPixels,S.dyScreen=S.dyPixels):(S.dxScreen=y*(S.dxPixels+S.width/2)-d*(S.dyPixels+S.height/2)-S.width/2,S.dyScreen=d*(S.dxPixels+S.width/2)+y*(S.dyPixels+S.height/2)-S.height/2)}return f.length>0&&m===f.length&&_&&(_.show=!1),f}_getProperties(e){const t=this._styleProps.get(e);if(t)return t;const r=this._styleRepository.getLayerStyleProperties?.(e,this._zoom);return this._styleProps.set(e,r),r}_doesCollide(e){const t=e.xScreen+e.dxScreen,r=e.yScreen+e.dyScreen,s=t+e.width,o=r+e.height,[n,i,l,c]=this._gridIndex.getCellSpan(t,r,s,o);for(let h=i;h<=c;h++)for(let e=n;e<=l;e++){const n=this._gridIndex.cells[h][e];for(const e of n){const n=e.xScreen+e.dxScreen,i=e.yScreen+e.dyScreen,l=n+e.width,c=i+e.height;if(!(s<n||t>l||o<i||r>c))return!0}}return!1}}export{n as CollisionJob};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{VectorTile as e}from"../VectorTile.js";import{fadeDuration as t}from"./config.js";import{effectFlag0 as o,filterFlag0 as i}from"../../webgl/definitions.js";function s(e){return(e.uniqueSymbol?.show&&e.uniqueSymbol?.lastShow)??!1}function r(e,t){if(e.priority-t.priority)return e.priority-t.priority;if(s(e)&&!s(t))return-1;if(s(t)&&!s(e))return 1;const o=e.tile.key,i=t.tile.key;return o.world-i.world?o.world-i.world:o.level-i.level?o.level-i.level:o.row-i.row?o.row-i.row:o.col-i.col?o.col-i.col:e.xTile-t.xTile?e.xTile-t.xTile:e.yTile-t.yTile}class n{get running(){return this._running}constructor(e,t,o,i,s,r,n,l){this.selectionMode=e,this._visibleTiles=t,this._symbolRepository=o,this._styleRepository=i,this._createCollisionJob=s,this._assignTileSymbolsOpacity=r,this._symbolLayerSorter=n,this._isLayerVisible=l,this._selectionJob=null,this._selectionJobCompleted=!1,this._collisionJob=null,this._collisionJobCompleted=!1,this._opacityJob=null,this._opacityJobCompleted=!1,this._running=!0}setScreenSize(e,t){this._screenWidth===e&&this._screenHeight===t||this.restart(),this._screenWidth=e,this._screenHeight=t}restart(){this._selectionJob=null,this._selectionJobCompleted=!1,this._collisionJob=null,this._collisionJobCompleted=!1,this._opacityJob=null,this._opacityJobCompleted=!1,this._running=!0}continue(e){if(this._selectionJob||(this._selectionJob=this._createSelectionJob()),!this._selectionJobCompleted){const t=performance.now();if(!this._selectionJob.work(e))return!1;if(this._selectionJobCompleted=!0,0===(e=Math.max(0,e-(performance.now()-t))))return!1}if(this._collisionJob||(this._collisionJob=this._createCollisionJob(this._selectionJob.sortedSymbols,this._screenWidth,this._screenHeight
|
|
5
|
+
import{VectorTile as e}from"../VectorTile.js";import{fadeDuration as t}from"./config.js";import{effectFlag0 as o,filterFlag0 as i}from"../../webgl/definitions.js";function s(e){return(e.uniqueSymbol?.show&&e.uniqueSymbol?.lastShow)??!1}function r(e,t){if(e.priority-t.priority)return e.priority-t.priority;if(s(e)&&!s(t))return-1;if(s(t)&&!s(e))return 1;const o=e.tile.key,i=t.tile.key;return o.world-i.world?o.world-i.world:o.level-i.level?o.level-i.level:o.row-i.row?o.row-i.row:o.col-i.col?o.col-i.col:e.xTile-t.xTile?e.xTile-t.xTile:e.yTile-t.yTile}class n{get running(){return this._running}constructor(e,t,o,i,s,r,n,l){this.selectionMode=e,this._visibleTiles=t,this._symbolRepository=o,this._styleRepository=i,this._createCollisionJob=s,this._assignTileSymbolsOpacity=r,this._symbolLayerSorter=n,this._isLayerVisible=l,this._selectionJob=null,this._selectionJobCompleted=!1,this._collisionJob=null,this._collisionJobCompleted=!1,this._opacityJob=null,this._opacityJobCompleted=!1,this._running=!0}setScreenSize(e,t){this._screenWidth===e&&this._screenHeight===t||this.restart(),this._screenWidth=e,this._screenHeight=t}restart(){this._selectionJob=null,this._selectionJobCompleted=!1,this._collisionJob=null,this._collisionJobCompleted=!1,this._opacityJob=null,this._opacityJobCompleted=!1,this._running=!0}continue(e){if(this._selectionJob||(this._selectionJob=this._createSelectionJob()),!this._selectionJobCompleted){const t=performance.now();if(!this._selectionJob.work(e))return!1;if(this._selectionJobCompleted=!0,0===(e=Math.max(0,e-(performance.now()-t))))return!1}if(this._collisionJob||(this._collisionJob=this._createCollisionJob(this._selectionJob.sortedSymbols,this._screenWidth,this._screenHeight)),!this._collisionJobCompleted){const t=performance.now();if(!this._collisionJob.work(e))return!1;if(this._collisionJobCompleted=!0,0===(e=Math.max(0,e-(performance.now()-t))))return!1}if(this._opacityJob||(this._opacityJob=this._createOpacityJob()),!this._opacityJobCompleted){const t=performance.now();if(!this._opacityJob.work(e))return!1;if(this._opacityJobCompleted=!0,0===(e=Math.max(0,e-(performance.now()-t))))return!1}return this._running=!1,!0}_isFeatureFiltered(e,t,s){const r=t.getFilterFlags(e),n=r&i,l=null==s.featureEffect||s.featureEffect.excludedLabelsVisible||r&o;return!(n&&l)}_getFiltered(){let e;if(this._styleRepository?.layerContexts)for(const t of this._symbolRepository.uniqueSymbols){const o=this._styleRepository.layerContexts?.get(t.styleLayerUID);if(o?.attributeView)for(const i of t.uniqueSymbols){e??=new Set;const t=o.attributeView,s=o.layerView;this._isFeatureFiltered(i.featureID,t,s)&&e.add(i.featureID)}}return e}_resetSelection(){for(let e=0;e<this._symbolRepository.uniqueSymbols.length;e++){const t=this._symbolRepository.uniqueSymbols[e];for(let e=0;e<t.uniqueSymbols.length;e++){const o=t.uniqueSymbols[e];for(const e of o.tileSymbols)e.selectedForRendering=!1}}}_createSelectionJob(){const e="feature-tile"===this.selectionMode?c:a,t=this._symbolRepository.uniqueSymbols;this._resetSelection();const o=[];let i=0,s=0;const n=this._isLayerVisible,l=this._getFiltered(),h=this._styleRepository?.layerContexts;function y(c){let a;const y=performance.now();for(;s<t.length;s++,i=0){const r=t[s],u=r.styleLayerUID;let f=0;if(h){const e=h.get(u).layerView;f=e.view.allLayerViews.items.indexOf(e)}if(!n(u)){o[s]||(o[s]={styleLayerUID:u,layerOrder:f,symbols:[]});continue}o[s]||={styleLayerUID:u,symbols:[],layerOrder:f};const b=o[s];for(;i<r.uniqueSymbols.length;i++){if(a=r.uniqueSymbols[i],i%100==99&&performance.now()-y>c)return!1;if(a.lastShow=a.show,a.featureID&&l?.has(a.featureID)){a.show=!1,a.parts[0].show=!1,a.parts[1].show=!1;continue}const t=e(a);if(t){t.selectedForRendering=!0,b.symbols.push(t),a.show=!0;for(const e of a.parts)e.show=!0}else a.show=!1}}for(const e of o)e.symbols.sort(r);return o.sort(((e,t)=>t.layerOrder-e.layerOrder)),!0}const u=this._symbolLayerSorter;return{work:y,get sortedSymbols(){return o.sort(u)}}}_createOpacityJob(){const t=this._assignTileSymbolsOpacity,o=this._visibleTiles;let i=0;function s(e,o){for(const t of e.symbols.values())l(t,o);t(e,o);for(const t of e.childrenTiles)s(t,o)}return{work(r){const n=performance.now();for(;i<o.length;i++){if(performance.now()-n>r)return!1;const l=o[i];if(null!=l.parentTile)continue;const c=performance.now();l instanceof e?s(l,c):t(l,c)}return!0}}}}function l(e,o){for(const i of e){const e=i.uniqueSymbol;for(const i of e.parts){const s=i.targetOpacity>.5?1:-1;i.startOpacity+=s*((o-i.startTime)/t),i.startOpacity=Math.min(Math.max(i.startOpacity,0),1),i.startTime=o,i.targetOpacity=e.show&&i.show?1:0}}}function c(e){let t=null,o=null,i=null;for(const s of e.tileSymbols){const e=s.tile;e.isReady&&e.isCoverage?t=s:e.isReady?o=s:e.rendering&&(i=s)}return t??o??i}function a(e){let t=null,o=!1,i=!1;for(const s of e.tileSymbols)if(!i||!o){const e=s.tile;(!t||e.isCoverage||e.neededForCoverage&&!o)&&(t=s,(e.neededForCoverage||e.isCoverage)&&(i=!0),e.isCoverage&&(o=!0))}return i?t:null}export{n as SymbolDeclutterer};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{signal as t}from"../../../../../core/signal.js";import{CollisionJob as e}from"./CollisionJob.js";import{declutterBudget as i,fadeDuration as s}from"./config.js";import{SymbolDeclutterer as r}from"./SymbolDeclutterer.js";import{SymbolRepository as o}from"./SymbolRepository.js";import{Visibility as l}from"../style/StyleDefinition.js";const a=.5,n=1e-6;class c{constructor(e,s,a,c,h,y=i){this.styleRepository=s,this._declutterBudget=y,this._tileToHandle=new Map,this._viewState={scale:0,rotation:0,center:[0,0],size:[0,0]},this._declutterViewState={scale:0,rotation:0,center:[0,0],size:[0,0]},this._offsetFromScreenCenter=[0,0],this._completed=!1,this._fading=t(!1);const _=(t,e,i
|
|
5
|
+
import{signal as t}from"../../../../../core/signal.js";import{CollisionJob as e}from"./CollisionJob.js";import{declutterBudget as i,fadeDuration as s}from"./config.js";import{SymbolDeclutterer as r}from"./SymbolDeclutterer.js";import{SymbolRepository as o}from"./SymbolRepository.js";import{Visibility as l}from"../style/StyleDefinition.js";const a=.5,n=1e-6;class c{constructor(e,s,a,c,h,y=i){this.styleRepository=s,this._declutterBudget=y,this._tileToHandle=new Map,this._viewState={scale:0,rotation:0,center:[0,0],size:[0,0]},this._declutterViewState={scale:0,rotation:0,center:[0,0],size:[0,0]},this._offsetFromScreenCenter=[0,0],this._completed=!1,this._fading=t(!1);const _=(t,e,i)=>this._createCollisionJob(t,e,i),u=t=>{const e=this.styleRepository.getStyleLayerByUID?.(t);if(e){if(this._zoom+n<e.minzoom||this._zoom-n>=e.maxzoom)return!1;const t=e.getLayoutProperty?.("visibility");if(t&&t.getValue()===l.NONE)return!1}return!0},m=(t,e)=>(this.styleRepository.getStyleLayerByUID?.(t.styleLayerUID)?.z??0)-(this.styleRepository.getStyleLayerByUID?.(e.styleLayerUID)?.z??0);this._symbolRepository=new o(h,c),this._symbolDeclutterer=new r(e,c,this._symbolRepository,this.styleRepository,_,a,m,u)}get symbolRepository(){return this._symbolRepository}_createCollisionJob(t,i,s){return this.updateDecluttererViewState(),new e(t,i,s,this.styleRepository,this._zoom,this._viewState.rotation)}get fading(){return this._fading.value}get decluttererOffset(){return this._offsetFromScreenCenter}registerFeatureTile(t){this.symbolRepository?(this.symbolRepository.registerFeatureTile(t),this.restartDeclutter()):console.error("InternalError: Symbol repository not yet initialized")}unregisterFeatureTile(t){this.symbolRepository?(this._symbolRepository.unregisterFeatureTile(t),this.restartDeclutter()):console.error("InternalError: Symbol repository not yet initialized")}insertFeatureTileMetrics(t,e){this.symbolRepository?(this.symbolRepository.insertFeatureTileMetrics(t,e),this.restartDeclutter()):console.error("InternalError: Symbol repository not yet initialized")}removeFeatureTileMetrics(t,e){this.symbolRepository?(this.symbolRepository.removeFeatureTileMetrics(t,e),this.restartDeclutter()):console.error("InternalError: Symbol repository not yet initialized")}addTile(t){t.decluttered=!1,this._tileToHandle.set(t,t.on("symbols-changed",(()=>{this._symbolRepository.registerVectorTile(t),this.restartDeclutter()}))),this._symbolRepository.registerVectorTile(t),this.restartDeclutter()}removeTile(t){const e=this._tileToHandle.get(t);e&&(this._symbolRepository.unregisterVectorTile(t),this.restartDeclutter(),e.remove(),this._tileToHandle.delete(t))}update(t,e){this._zoom=t,this._viewState={scale:e.scale,rotation:e.rotation,center:[e.center[0],e.center[1]],size:[e.size[0],e.size[1]]};const i=[0,0];e.toScreen(i,e.center);const s=[0,0];return e.toScreen(s,this._declutterViewState.center),this._offsetFromScreenCenter[0]=i[0]-s[0],this._offsetFromScreenCenter[1]=i[1]-s[1],this._continueDeclutter(),this._completed}restartDeclutter(){this._completed=!1,this._symbolDeclutterer.restart(),this._notifyUnstable()}clear(){this._completed=!1,this._symbolRepository=null,this._symbolDeclutterer.restart(),this._tileToHandle.forEach((t=>t.remove())),this._tileToHandle.clear()}get stale(){return this._zoom!==this._declutterZoom||this._viewState.size[0]!==this._declutterViewState.size[0]||this._viewState.size[1]!==this._declutterViewState.size[1]||this._viewState.scale!==this._declutterViewState.scale||this._viewState.rotation!==this._declutterViewState.rotation}deleteStyleLayers(t){this._symbolRepository.deleteStyleLayers(t)}_continueDeclutter(){this._completed&&!this.stale||(this._symbolDeclutterer.running||(this.updateDecluttererViewState(),this._symbolDeclutterer.restart()),this._symbolDeclutterer.setScreenSize(this._viewState.size[0],this._viewState.size[1]),this._completed=this._symbolDeclutterer.continue(this._declutterBudget),this._completed&&this._scheduleNotifyStable())}_scheduleNotifyStable(){null!=this._stableNotificationHandle&&clearTimeout(this._stableNotificationHandle),this._stableNotificationHandle=setTimeout((()=>{this._stableNotificationHandle=null,this._fading.value=!1}),(1+a)*s)}_notifyUnstable(){null!=this._stableNotificationHandle&&(clearTimeout(this._stableNotificationHandle),this._stableNotificationHandle=null),this._fading.value=!0}updateDecluttererViewState(){this._declutterZoom=this._zoom,this._declutterViewState.center[0]=this._viewState.center[0],this._declutterViewState.center[1]=this._viewState.center[1],this._declutterViewState.rotation=this._viewState.rotation,this._declutterViewState.scale=this._viewState.scale,this._declutterViewState.size[0]=this._viewState.size[0],this._declutterViewState.size[1]=this._viewState.size[1],this._offsetFromScreenCenter[0]=0,this._offsetFromScreenCenter[1]=0}}export{c as SymbolFader};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Error.js";import{handlesGroup as t,makeHandle as s}from"../../../core/handleUtils.js";import{watch as n}from"../../../core/reactiveUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import a from"../../../rest/support/FeatureSet.js";import{isNumber as c}from"../../../support/guards.js";import l from"./FeatureLayerView2D.js";import{handleNoEngineError as h}from"./support/handleNoEngineError.js";import u from"../../layers/StreamLayerView.js";let p=class extends(u(l)){constructor(){super(...arguments),this.pipelineConnectionStatus="disconnected",this.pipelineErrorString=null}initialize(){this.addHandles([n((()=>this.layer.customParameters),(async e=>{(await this.getWorker()).streamMessenger.updateCustomParameters(e)})),this.layer.on("send-message-to-socket",(async e=>{(await this.getWorker()).streamMessenger.sendMessageToSocket(e)})),this.layer.on("send-message-to-client",(async e=>{(await this.getWorker()).streamMessenger.sendMessageToClient(e),this._isUserPaused&&"type"in e&&"clear"===e.type&&this.incrementSourceRefreshVersion()})),n((()=>this.layer.purgeOptions),(()=>this._update())),n((()=>this.suspended),this._onSuspendedChange.bind(this))],"constructor"),this._doResume()}destroy(){this._doPause()}get connectionError(){return this.pipelineErrorString?new r("stream-controller",this.pipelineErrorString):null}on(e,r){if(Array.isArray(e))return t(e.map((e=>this.on(e,r))));const n=["data-received","message-received"].includes(e);n&&this.getWorker().then((r=>r.streamMessenger.enableEvent(e,!0)));const o=super.on(e,r),i=this;return s((()=>{o.remove(),n&&(i._workerProxy.closed||i.hasEventListener(e)||i.getWorker().then((r=>r.streamMessenger.enableEvent(e,!1))))}))}async queryLatestObservations(e,t){if(!(this.layer.timeInfo?.endField||this.layer.timeInfo?.startField||this.layer.timeInfo?.trackIdField))throw new r("streamlayer-no-timeField","queryLatestObservation can only be used with services that define a TrackIdField");const s=await this.getWorker();return h(s.features.executeQueryForLatestObservations(this._cleanUpQuery(e),t).then((e=>{const r=a.fromJSON(e);return r.features.forEach((e=>{e.layer=this.layer,e.sourceLayer=this.layer})),r})),new a({features:[]}))}detach(){super.detach(),this.pipelineConnectionStatus="disconnected"}async queryObjectIds(e,r){return(await super.queryObjectIds(e,r)).filter(c)}get _streamConnectionStatus(){return this.pipelineConnectionStatus}_doPause(){null!=this._refreshInterval&&(clearInterval(this._refreshInterval),this._refreshInterval=null)}_doResume(){this._refreshInterval=setInterval((()=>this.incrementSourceRefreshVersion()),this.layer.updateInterval)}_doDisconnect(){this.getWorker().then((e=>e.streamMessenger.disconnect())),this._doPause()}_doConnect(){this.getWorker().then((e=>e.streamMessenger.connect())),this.resume()}_doClear(){this.getWorker().then((e=>e.streamMessenger.clear())),null==this._refreshInterval&&this.incrementSourceRefreshVersion()}_createClientOptions(){const e=super._createClientOptions(),r=this;return{...e,get container(){return r.featureContainer},setProperty:e=>{this.set(e.propertyName,e.value)}}}};e([o()],p.prototype,"pipelineConnectionStatus",void 0),e([o()],p.prototype,"pipelineErrorString",void 0),e([o({readOnly:!0})],p.prototype,"connectionError",null),e([o({readOnly:!0})],p.prototype,"_streamConnectionStatus",null),p=e([i("esri.views.2d.layers.StreamLayerView2D")],p);const d=p;export{d as default};
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import r from"../../../core/Error.js";import{handlesGroup as t,makeHandle as s}from"../../../core/handleUtils.js";import{watch as n}from"../../../core/reactiveUtils.js";import{property as o}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import a from"../../../rest/support/FeatureSet.js";import{isNumber as c}from"../../../support/guards.js";import l from"./FeatureLayerView2D.js";import{handleNoEngineError as h}from"./support/handleNoEngineError.js";import u from"../../layers/StreamLayerView.js";let p=class extends(u(l)){constructor(){super(...arguments),this.pipelineConnectionStatus="disconnected",this.pipelineErrorString=null}initialize(){this.addHandles([n((()=>this.layer.customParameters),(async e=>{(await this.getWorker()).streamMessenger.updateCustomParameters(e)})),this.layer.on("send-message-to-socket",(async e=>{(await this.getWorker()).streamMessenger.sendMessageToSocket(e)})),this.layer.on("send-message-to-client",(async e=>{(await this.getWorker()).streamMessenger.sendMessageToClient(e),this._isUserPaused&&"type"in e&&"clear"===e.type&&this.incrementSourceRefreshVersion()})),n((()=>this.layer.purgeOptions),(()=>this._update())),n((()=>this.suspended),this._onSuspendedChange.bind(this))],"constructor"),this._doResume()}destroy(){this._doPause()}get connectionError(){return this.pipelineErrorString?new r("stream-controller",this.pipelineErrorString):null}on(e,r){if(Array.isArray(e))return t(e.map((e=>this.on(e,r))));const n=["data-received","message-received"].includes(e);n&&this.getWorker().then((r=>r.streamMessenger.enableEvent(e,!0)));const o=super.on(e,r),i=this;return s((()=>{o.remove(),n&&(i._workerProxy.closed||i.hasEventListener(e)||i.getWorker().then((r=>r.streamMessenger.enableEvent(e,!1))))}))}async queryLatestObservations(e,t){if(!(this.layer.timeInfo?.endField||this.layer.timeInfo?.startField||this.layer.timeInfo?.trackIdField))throw new r("streamlayer-no-timeField","queryLatestObservation can only be used with services that define a TrackIdField");const s=await this.getWorker();return h(s.features.executeQueryForLatestObservations(this._cleanUpQuery(e),t).then((e=>{const r=a.fromJSON(e);return r.features.forEach((e=>{e.layer=this.layer,e.sourceLayer=this.layer})),r})),new a({features:[]}))}detach(){super.detach(),this.pipelineConnectionStatus="disconnected"}async queryObjectIds(e,r){return(await super.queryObjectIds(e,r)).filter(c)}get _streamConnectionStatus(){return this.pipelineConnectionStatus}_doPause(){null!=this._refreshInterval&&(clearInterval(this._refreshInterval),this._refreshInterval=null)}_doResume(){null==this._refreshInterval&&(this._refreshInterval=setInterval((()=>this.incrementSourceRefreshVersion()),this.layer.updateInterval))}_doDisconnect(){this.getWorker().then((e=>e.streamMessenger.disconnect())),this._doPause()}_doConnect(){this.getWorker().then((e=>e.streamMessenger.connect())),this.resume()}_doClear(){this.getWorker().then((e=>e.streamMessenger.clear())),null==this._refreshInterval&&this.incrementSourceRefreshVersion()}_createClientOptions(){const e=super._createClientOptions(),r=this;return{...e,get container(){return r.featureContainer},setProperty:e=>{this.set(e.propertyName,e.value)}}}};e([o()],p.prototype,"pipelineConnectionStatus",void 0),e([o()],p.prototype,"pipelineErrorString",void 0),e([o({readOnly:!0})],p.prototype,"connectionError",null),e([o({readOnly:!0})],p.prototype,"_streamConnectionStatus",null),p=e([i("esri.views.2d.layers.StreamLayerView2D")],p);const d=p;export{d 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.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{create as e}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ChapmanApproximationParameters as r}from"./ChapmanApproximation.glsl.js";import{C as o}from"../../../chunks/ChapmanAtmosphere.glsl.js";import{ReloadableShaderModule as s}from"../webgl-engine/core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as t}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{BlendFactor as i,CompareFunction as n}from"../../webgl/enums.js";import{makePipelineState as a,
|
|
5
|
+
import{create as e}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{ChapmanApproximationParameters as r}from"./ChapmanApproximation.glsl.js";import{C as o}from"../../../chunks/ChapmanAtmosphere.glsl.js";import{ReloadableShaderModule as s}from"../webgl-engine/core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as t}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{BlendFactor as i,CompareFunction as n}from"../../webgl/enums.js";import{makePipelineState as a,copySource as l,simpleBlendingParams as m,defaultColorWrite as c}from"../../webgl/renderState.js";class p extends r{constructor(){super(...arguments),this.innerFadeDistance=0,this.altitudeFade=0,this.backgroundColor=e()}}class d extends t{constructor(e,r){super(e,r,new s(o,(()=>import("./ChapmanAtmosphere.glsl.js"))))}initializePipeline(e){return a({blending:e.reduced?l:m(i.SRC_ALPHA,i.ONE_MINUS_SRC_ALPHA),depthTest:{func:e.reduced?n.ALWAYS:n.LEQUAL},colorWrite:c})}}export{p as ChapmanAtmospherePassParameters,d as ChapmanAtmosphereTechnique};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{a as e}from"../../../chunks/NoiseTextureAtlas.glsl.js";import{NoiseTextureRenderMode as r}from"./NoiseTextureAtlasConfiguration.js";import{ReloadableShaderModule as o}from"../webgl-engine/core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as s}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{BlendFactor as i,CompareFunction as t}from"../../webgl/enums.js";import{makePipelineState as l,
|
|
5
|
+
import{a as e}from"../../../chunks/NoiseTextureAtlas.glsl.js";import{NoiseTextureRenderMode as r}from"./NoiseTextureAtlasConfiguration.js";import{ReloadableShaderModule as o}from"../webgl-engine/core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as s}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{BlendFactor as i,CompareFunction as t}from"../../webgl/enums.js";import{makePipelineState as l,copySource as n,separateBlendingParams as a,defaultColorWrite as m}from"../../webgl/renderState.js";class u extends s{constructor(r,s){super(r,s,new o(e,(()=>import("./NoiseTextureAtlas.glsl.js"))))}initializePipeline(e){return l({blending:e.mode===r.Full?n:a(i.ZERO,i.ONE,i.ONE,i.ZERO),depthTest:{func:t.ALWAYS},colorWrite:m})}}export{u as NoiseTextureAtlasTechnique};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{P as e}from"../../../chunks/Precipitation.glsl.js";import{ReloadableShaderModule as r}from"../webgl-engine/core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as i}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{VertexAttribute as t}from"../webgl-engine/lib/VertexAttribute.js";import{CompareFunction as s}from"../../webgl/enums.js";import{NoParameters as o}from"../../webgl/NoParameters.js";import{makePipelineState as n,
|
|
5
|
+
import{P as e}from"../../../chunks/Precipitation.glsl.js";import{ReloadableShaderModule as r}from"../webgl-engine/core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as i}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{VertexAttribute as t}from"../webgl-engine/lib/VertexAttribute.js";import{CompareFunction as s}from"../../webgl/enums.js";import{NoParameters as o}from"../../webgl/NoParameters.js";import{makePipelineState as n,premultipliedAlpha as l,defaultColorWrite as a}from"../../webgl/renderState.js";class m extends o{constructor(){super(...arguments),this.time=0,this.radius=1,this.width=500,this.opacity=0}}class c extends i{constructor(i,s){super(i,s,new r(e,(()=>import("./Precipitation.glsl.js"))),new Map([[t.POSITION,0],[t.INSTANCEFEATUREATTRIBUTE,1]]))}initializePipeline(){return n({blending:l,depthTest:{func:s.LEQUAL},colorWrite:a})}}export{m as PrecipitationPassParameters,c as PrecipitationTechnique};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{a as e}from"../../../chunks/SimpleAtmosphere.glsl.js";import{SimpleAtmosphereGeometry as r}from"./SimpleAtmosphereTechniqueConfiguration.js";import{ReloadableShaderModule as o}from"../webgl-engine/core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as i}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{CompareFunction as n}from"../../webgl/enums.js";import{makePipelineState as s,
|
|
5
|
+
import{a as e}from"../../../chunks/SimpleAtmosphere.glsl.js";import{SimpleAtmosphereGeometry as r}from"./SimpleAtmosphereTechniqueConfiguration.js";import{ReloadableShaderModule as o}from"../webgl-engine/core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as i}from"../webgl-engine/core/shaderTechnique/ShaderTechnique.js";import{CompareFunction as n}from"../../webgl/enums.js";import{makePipelineState as s,unpremultipliedAlphaToPremultipliedAlpha as t,backFaceCullingParams as l,defaultColorWrite as m}from"../../webgl/renderState.js";class p extends i{constructor(r,i){super(r,i,new o(e,(()=>import("./SimpleAtmosphere.glsl.js"))))}initializePipeline(e){const o=e.geometry===r.Cylinder;return s({blending:t,culling:o?l:void 0,depthTest:{func:n.LEQUAL},colorWrite:m})}}export{p as SimpleAtmosphereTechnique};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import{forEach as t,result as r}from"../../../core/asyncUtils.js";import{makeHandle as i}from"../../../core/handleUtils.js";import a from"../../../core/Logger.js";import{abortMaybe as s}from"../../../core/maybe.js";import{isAbortError as o,onAbort as n,
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import{forEach as t,result as r}from"../../../core/asyncUtils.js";import{makeHandle as i}from"../../../core/handleUtils.js";import a from"../../../core/Logger.js";import{abortMaybe as s}from"../../../core/maybe.js";import{isAbortError as o,onAbort as n,throwIfAborted as l,isAborted as m,createAbortError as h}from"../../../core/promiseUtils.js";import{whenOnce as g}from"../../../core/reactiveUtils.js";import"../../../core/has.js";import"../../../core/RandomLCG.js";import"../../../core/Error.js";import{subclass as d}from"../../../core/accessorSupport/decorators/subclass.js";import c from"../../../geometry/Extent.js";import{create as u,equals as p,width as f,height as w,copy as x,intersection as y}from"../../../geometry/support/aaBoundingRect.js";import{DrapeSourceType as _}from"./interfaces.js";import b from"./SubView3D.js";import{computeImageExportSize as E,createGeometryForExtent as R,createOuterImageGeometry as v}from"./support/overlayImageUtils.js";import{debugFlags as j}from"../support/debugFlags.js";import{OverlayIndex as S}from"../terrain/interfaces.js";import{DirtyOperation as A}from"../webgl-engine/lib/ModelDirtyTypes.js";import{RenderGeometry as I}from"../webgl-engine/lib/RenderGeometry.js";import{Texture as M}from"../webgl-engine/lib/Texture.js";import{UpdatePolicy as D}from"../webgl-engine/lib/UpdatePolicy.js";import{ImageMaterial as G}from"../webgl-engine/materials/ImageMaterial.js";import{TextureWrapMode as T}from"../../webgl/enums.js";let P=class extends b{constructor(e){super(e),this.drapeSourceType=_.RasterImage,this.updatePolicy=D.SYNC,this.maximumDataResolution=null,this._images=new Array,this._extents=new Array,this._overlays=new Array,this._drapeSourceRenderer=null}initialize(){this._drapeSourceRenderer=this.view.basemapTerrain.overlayManager.registerGeometryDrapeSource(this),this.addHandles(i((()=>this.view.basemapTerrain.overlayManager.unregisterDrapeSource(this))))}setDrapingExtent(e,t){this._spatialReference=t,e.forEach(((e,t)=>{this._overlays[t]=e,this._updateImageExtent(e,t)}))}destroy(){this.clear()}get spatialReference(){return this._spatialReference}_updateImageExtent(e,t){const r=this._clippedExtent(e.extent,O);if(null==r)return;const i=E(e.extent,r,e.resolution);let s=e.pixelRatio*this.view.state.pixelRatio;const{layer:n}=this;if("imageMaxWidth"in n&&null!=n.imageMaxWidth||"imageMaxHeight"in n&&null!=n.imageMaxHeight){const e=n.imageMaxWidth,t=n.imageMaxHeight;if(i.width>e){const t=e/i.width;i.height=Math.floor(i.height*t),i.width=e,s*=t}if(i.height>t){const e=t/i.height;i.width=Math.floor(i.width*e),i.height=t,s*=e}}const l=this._extents[t];l&&p(l.extent,r)&&this._imageSizeEquals(r,l.imageSize,i)||(this._extents[t]={extent:u(r),imageSize:i,pixelRatio:s},this.suspended||this._fetch(t).catch((e=>{o(e)||a.getLogger(this).error(e)})))}clear(){for(let e=0;e<this._images.length;e++)this._clearImage(e)}async doRefresh(e){const t=[];for(let r=0;r<this._extents.length;r++)this._extents[r]&&t.push(this._fetch(r,e));await Promise.allSettled(t)}async processResult(e,t,r){(t instanceof HTMLImageElement||t instanceof HTMLCanvasElement)&&(e.image=t)}findExtentInfoAt(e){for(const t of this._extents){const r=t.extent;if(new c(r[0],r[1],r[2],r[3],this._spatialReference).contains(e))return t}return null}async redraw(e,r){await t(this._images,(async(t,i)=>{t&&(await e(t,r),await this._createStageObjects(i,t.image,r))}))}_imageSizeEquals(e,t,r){if(!this.maximumDataResolution)return!1;const i=f(e)/this.maximumDataResolution.x,a=w(e)/this.maximumDataResolution.y,s=i/t.width,o=a/t.height,n=i/r.width,l=a/r.height,m=Math.abs(s-n),h=Math.abs(o-l),g=j.TESTS_DISABLE_OPTIMIZATIONS?0:1.5;return m<=g&&h<=g}async _fetch(e,t){if(this.suspended)return;const r=this._extents[e],i=r.extent;this._images[e]||(this._images[e]={texture:null,material:null,renderGeometry:null,loadingPromise:null,loadingAbortController:null,image:null,pixelData:null,renderExtent:u(i)});const g=this._images[e];g.loadingAbortController=s(g.loadingAbortController);const d=new c(i[0],i[1],i[2],i[3],this._spatialReference);if(0===d.width||0===d.height)return void this._clearImage(e);const p=new AbortController;g.loadingAbortController=p,n(t,(()=>p.abort()));const f=p.signal,w=this._waitFetchReady(f).then((async()=>{l(f);const t={requestAsImageElement:!0,pixelRatio:this._overlays[e].pixelRatio,...this.layerView.getFetchOptions(),signal:f},{height:i,width:a}=r.imageSize;return this.layer?"imagery"===this.layer.type?this.layer.internalFetchImage(d,a,i,t):this.layer.fetchImage(d,a,i,t):null})).then((e=>{if(m(f))throw a.getLogger(this).warnOnce("A call to fetchImage resolved even though the request was aborted. fetchImage should not resolve if options.signal.aborted is true."),h();return this.processResult(g,e)})).then((()=>{x(g.renderExtent,i)}));g.loadingPromise=w,await this.updatingHandles.addPromise(w.then((async()=>{l(f),await this._createStageObjects(e,g.image,f)})).catch((e=>{throw e&&!o(e)&&a.getLogger(this).error(e),e})).finally((()=>{w===g.loadingPromise&&(g.loadingPromise=null,g.loadingAbortController=null)})))}_clearImage(e){const t=this._images[e];if(t){null!=t.renderGeometry&&(this._drapeSourceRenderer.removeGeometries([t.renderGeometry],A.UPDATE),t.renderGeometry=null);const e=this.view.stage,r=t.texture;r?.unload(),e.remove(r),t.texture=null,e.remove(t.material),t.material=null,t.loadingAbortController=s(t.loadingAbortController),t.loadingPromise=null,t.image=null,t.pixelData=null}}async _createStageObjects(e,t,i){const a=this.view.stage,s=this._images[e],o=()=>{s.texture?.unload(),a.remove(s.texture),s.texture=null,s.renderGeometry&&(this._drapeSourceRenderer.removeGeometries([s.renderGeometry],A.UPDATE),s.renderGeometry=null)};if(t){const n=new M(t,{width:t.width,height:t.height,preMultiplyAlpha:!0,wrap:{s:T.CLAMP_TO_EDGE,t:T.CLAMP_TO_EDGE}});if(await r(this._images[e===S.INNER?S.OUTER:S.INNER].loadingPromise),l(i),o(),await a.schedule((()=>n.load(a.renderView.renderingContext)),i),!n.loaded)return void o();let m;if(a.add(n),s.texture=n,s.material??=new G({draped:!0,texture:n}),s.material.setParameters({texture:n}),e===S.INNER)m=R(s.material,s.renderExtent);else{const e=this._images[0].renderExtent;if(!e)return void o();m=v(s.material,e,s.renderExtent)}s.renderGeometry=new I(m),s.renderGeometry.localOrigin=this._overlays[e].renderLocalOrigin,this._drapeSourceRenderer.addGeometries([s.renderGeometry],A.UPDATE)}else o(),a.remove(s.material),s.material=null}_clippedExtent(e,t){if("local"!==this.view.viewingMode)return x(t,e);const r=this.view.basemapTerrain;return r.ready?y(e,r.extent,t):x(t,e)}async _waitFetchReady(e){await g((()=>this.view.stationary),e),l(e)}};P=e([d("esri.views.3d.layers.DrapedSubView3D")],P);const C=P,O=u();export{C as default};
|