@arcgis/core 4.31.0-next.20240620 → 4.31.0-next.20240621
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/{3a74d3fc690177a703f5.js → 019ce38b02e3bf517125.js} +1 -1
- package/assets/esri/core/workers/chunks/{222807cfaa2e17d0efea.js → 6745cedf6f82c8917904.js} +1 -1
- package/assets/esri/core/workers/chunks/7b6cd976367a0dd297d6.js +1 -0
- package/assets/esri/core/workers/chunks/{8a948d46d0377a6adb86.js → 9d677af08238d9e09e72.js} +2 -2
- package/assets/esri/core/workers/chunks/bedf60888f07b78b314d.js +1 -0
- package/assets/esri/core/workers/chunks/c39237c00c1d588dc107.js +1 -0
- package/assets/esri/core/workers/chunks/de7fa31d86a65ccdffc1.js +1 -0
- package/assets/esri/core/workers/chunks/{8ee8f3c54b2cce217845.js → f13fb6b712e364bbf48c.js} +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ar.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_bg.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_bs.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ca.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_cs.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_da.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_de.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_el.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_es.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_et.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_fi.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_fr.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_he.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_hr.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_hu.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_id.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_it.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ja.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ko.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_lt.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_lv.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_nb.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_nl.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_pl.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_pt-BR.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_pt-PT.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ro.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ru.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sk.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sl.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sr.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sv.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_th.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_tr.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_uk.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_vi.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_zh-CN.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_zh-HK.json +1 -1
- package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_zh-TW.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nb.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
- package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
- package/chunks/CheckerBoard.glsl.js +9 -6
- package/chunks/ComponentShader.glsl.js +4 -4
- package/chunks/ImageMaterial.glsl.js +1 -2
- package/interfaces.d.ts +50 -14
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/mixins/EditBusLayer.js +1 -1
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/package.json +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/layers/support/ExportStrategy.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObject3DGraphicLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentData.glsl.js +1 -2
- package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/interfaces.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/util.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
- package/views/SelectionManager.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/adapters/OrientedImageryViewerViewModelAdapter2D.js +1 -1
- package/widgets/OrientedImageryViewer/utils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/PanoramicViewer/constants.js +1 -1
- package/widgets/PanoramicViewer/utils.js +1 -1
- package/widgets/Print.js +1 -1
- package/assets/esri/core/workers/chunks/4f2be9fd4ff5b3ad3110.js +0 -1
- package/assets/esri/core/workers/chunks/88c7d84a1fde246ca71f.js +0 -1
- package/assets/esri/core/workers/chunks/986520dd0de64105dbff.js +0 -1
- package/assets/esri/core/workers/chunks/ad0a87dba95785ad6171.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.31/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Collection.js";import{clone as r}from"../../core/lang.js";import i from"../../core/Logger.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import{reader as s}from"../../core/accessorSupport/decorators/reader.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{writer as n}from"../../core/accessorSupport/decorators/writer.js";import{excludeTables as l}from"../../core/accessorSupport/layerContainerType.js";import a from"../../geometry/Extent.js";import d from"../../geometry/HeightModelInfo.js";import u from"../../geometry/SpatialReference.js";import{sanitizeUrlWithLayerId as c,writeUrlWithLayerId as y}from"../support/arcgisLayerUrl.js";import{elevationInfo as m,maxScale as h,minScale as f,url as v}from"../support/commonProperties.js";import g from"../support/EditFieldsInfo.js";import{FeatureIndex as I}from"../support/FeatureIndex.js";import{geometryTypeKebabDict as F,isLayerCacheStale as S,readGlobalIdField as b,readObjectIdField as j,readVersion as x}from"../support/featureLayerUtils.js";import E from"../support/GeometryFieldsInfo.js";import O from"../support/LayerFloorInfo.js";import U from"../support/Relationship.js";import{getFeatureLayerCapabilities as w}from"../support/serviceCapabilitiesUtils.js";import T from"../support/Subtype.js";import{timeZoneProperty as M}from"../../time/timeZoneUtils.js";const D=D=>{let R=class extends D{constructor(){super(...arguments),this.copyright=null,this.capabilities=null,this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.definitionExpression=null,this.displayField=null,this.editFieldsInfo=null,this.editingInfo=null,this.elevationInfo=null,this.floorInfo=null,this.fullExtent=null,this.gdbVersion=null,this.geometryFieldsInfo=null,this.geometryType=null,this.globalIdField=null,this.hasM=void 0,this.hasZ=void 0,this.heightModelInfo=null,this.historicMoment=null,this.indexes=new(t.ofType(I)),this.isTable=!1,this.layerId=void 0,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.preferredTimeZone=null,this.relationships=null,this.returnM=void 0,this.returnZ=void 0,this.serviceDefinitionExpression=null,this.serviceItemId=null,this.sourceJSON=null,this.spatialReference=u.WGS84,this.subtypeField=null,this.subtypes=null,this.trackIdField=null,this.version=void 0}get authenticationTriggerEvent(){if(!this.url)return null;const{capabilities:e}=this;if(e){const{query:t,operations:r,editing:i}=e;if(!t.supportsQueryByOthers||!t.supportsQueryByAnonymous)return"load";if(r.supportsEditing&&!(i.supportsUpdateByOthers&&i.supportsUpdateByAnonymous&&i.supportsDeleteByOthers&&i.supportsDeleteByAnonymous))return"load"}if(this.userHasUpdateItemPrivileges){if(S(this))return"load";if(this.hasUpdateItemRestrictions)return e.operations.supportsQuery?"editing":"load"}if(this.userHasFullEditingPrivileges&&this.hasFullEditingRestrictions)return"editing";const t=this.editFieldsInfo;return(t?.creatorField||t?.editorField)&&e?.operations.supportsEditing?"editing":null}readCapabilitiesFromService(e,t){return w(t,this.url)}readEditingInfo(e,t){const{editingInfo:r}=t;return r?{lastEditDate:null!=r.lastEditDate?new Date(r.lastEditDate):null}:null}get effectiveCapabilities(){const e=this.capabilities;if(!e)return null;const t=r(e),{operations:i,editing:o}=t;return this.sourceJSON?.isMultiServicesView?(this.userHasUpdateItemPrivileges&&(i.supportsQuery=!0),t):this.userHasUpdateItemPrivileges?(i.supportsAdd=i.supportsDelete=i.supportsEditing=i.supportsQuery=i.supportsUpdate=o.supportsDeleteByOthers=o.supportsGeometryUpdate=o.supportsUpdateByOthers=!0,t):(this.userHasFullEditingPrivileges&&i.supportsEditing&&(i.supportsAdd=i.supportsDelete=i.supportsUpdate=o.supportsGeometryUpdate=!0),t)}readGlobalIdFieldFromService(e,t){return b(t)}get hasFullEditingRestrictions(){const e=this.capabilities;if(!e||this.sourceJSON?.isMultiServicesView)return!1;const{operations:t,editing:r}=e;return t.supportsEditing&&!(t.supportsAdd&&t.supportsDelete&&t.supportsUpdate&&r.supportsGeometryUpdate)}get hasUpdateItemRestrictions(){const e=this.capabilities;if(!e)return!1;const{operations:t,editing:r}=e;return this.sourceJSON?.isMultiServicesView?!t.supportsQuery:!(t.supportsAdd&&t.supportsDelete&&t.supportsEditing&&t.supportsQuery&&t.supportsUpdate&&r.supportsDeleteByOthers&&r.supportsGeometryUpdate&&r.supportsUpdateByOthers)}readIsTableFromService(e,t){return"Table"===t.type}readMaxScale(e,t){return t.effectiveMaxScale||e||0}readMinScale(e,t){return t.effectiveMinScale||e||0}readObjectIdFieldFromService(e,t){return j(t)}readServiceDefinitionExpression(e,t){return t.definitionQuery||t.definitionExpression}set url(e){if(null==e)return void this._set("url",e);const t=c({layer:this,url:e,nonStandardUrlAllowed:!0,logger:i.getLogger(this)});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,i){y(this,e,null,t,i)}readVersion(e,t){return x(t)}};return e([o({readOnly:!0})],R.prototype,"authenticationTriggerEvent",null),e([o({type:String,json:{origins:{service:{read:{source:"copyrightText"}}}}})],R.prototype,"copyright",void 0),e([o({readOnly:!0,json:{read:!1,origins:{service:{read:{source:["advancedQueryCapabilities","allowGeometryUpdates","allowUpdateWithoutMValues","archivingInfo","capabilities","datesInUnknownTimezone","hasAttachments","hasM","hasZ","maxRecordCount","maxRecordCountFactor","ownershipBasedAccessControlForFeatures","standardMaxRecordCount","supportedQueryFormats","supportsAdvancedQueries","supportsApplyEditsWithGlobalIds","supportsAttachmentsByUploadId","supportsAttachmentsResizing","supportsCalculate","supportsCoordinatesQuantization","supportsExceedsLimitStatistics","supportsFieldDescriptionProperty","supportsQuantizationEditMode","supportsRollbackOnFailureParameter","supportsStatistics","supportsTruncate","supportsValidateSql","tileMaxRecordCount","useStandardizedQueries"]}}}}})],R.prototype,"capabilities",void 0),e([s("service","capabilities")],R.prototype,"readCapabilitiesFromService",null),e([o(M("dateFieldsTimeReference"))],R.prototype,"dateFieldsTimeZone",void 0),e([o({type:Boolean})],R.prototype,"datesInUnknownTimezone",void 0),e([o({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],R.prototype,"definitionExpression",void 0),e([o({type:String,json:{origins:{service:{read:{source:"displayField"}}}}})],R.prototype,"displayField",void 0),e([o({readOnly:!0,type:g})],R.prototype,"editFieldsInfo",void 0),e([o({readOnly:!0})],R.prototype,"editingInfo",void 0),e([s("editingInfo")],R.prototype,"readEditingInfo",null),e([o({readOnly:!0})],R.prototype,"effectiveCapabilities",null),e([o((()=>{const e=r(m),t=e.json.origins;return t["web-map"]={read:!1,write:!1},t["portal-item"]={read:!1,write:!1},e})())],R.prototype,"elevationInfo",void 0),e([o({type:O,json:{name:"layerDefinition.floorInfo",write:!0,origins:{"web-scene":{name:"layerDefinition.floorInfo",write:{enabled:!0,layerContainerTypes:l}}}}})],R.prototype,"floorInfo",void 0),e([o({type:a,json:{origins:{service:{read:{source:"extent"}}}}})],R.prototype,"fullExtent",void 0),e([o()],R.prototype,"gdbVersion",void 0),e([o({readOnly:!0,type:E,json:{read:{source:"geometryProperties"}}})],R.prototype,"geometryFieldsInfo",void 0),e([o({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:F.read}}}})],R.prototype,"geometryType",void 0),e([o({type:String})],R.prototype,"globalIdField",void 0),e([s("service","globalIdField",["globalIdField","fields"])],R.prototype,"readGlobalIdFieldFromService",null),e([o({readOnly:!0})],R.prototype,"hasFullEditingRestrictions",null),e([o({type:Boolean,json:{origins:{service:{read:!0}}}})],R.prototype,"hasM",void 0),e([o({readOnly:!0})],R.prototype,"hasUpdateItemRestrictions",null),e([o({type:Boolean,json:{origins:{service:{read:!0}}}})],R.prototype,"hasZ",void 0),e([o({readOnly:!0,type:d})],R.prototype,"heightModelInfo",void 0),e([o({type:Date})],R.prototype,"historicMoment",void 0),e([o({type:t.ofType(I),readOnly:!0})],R.prototype,"indexes",void 0),e([o({readOnly:!0})],R.prototype,"isTable",void 0),e([s("service","isTable",["type"])],R.prototype,"readIsTableFromService",null),e([o({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{read:!1,write:{target:"id"}}},read:!1}})],R.prototype,"layerId",void 0),e([o(h)],R.prototype,"maxScale",void 0),e([s("service","maxScale",["maxScale","effectiveMaxScale"])],R.prototype,"readMaxScale",null),e([o(f)],R.prototype,"minScale",void 0),e([s("service","minScale",["minScale","effectiveMinScale"])],R.prototype,"readMinScale",null),e([o({type:String})],R.prototype,"objectIdField",void 0),e([s("service","objectIdField",["objectIdField","fields"])],R.prototype,"readObjectIdFieldFromService",null),e([o(M("preferredTimeReference"))],R.prototype,"preferredTimeZone",void 0),e([o({type:[U],readOnly:!0})],R.prototype,"relationships",void 0),e([o({type:Boolean})],R.prototype,"returnM",void 0),e([o({type:Boolean})],R.prototype,"returnZ",void 0),e([o({readOnly:!0,json:{write:!1}})],R.prototype,"serverGens",void 0),e([o({readOnly:!0})],R.prototype,"serviceDefinitionExpression",void 0),e([s("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],R.prototype,"readServiceDefinitionExpression",null),e([o({type:String,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],R.prototype,"serviceItemId",void 0),e([o()],R.prototype,"sourceJSON",void 0),e([o({type:u,json:{origins:{service:{read:{source:"extent.spatialReference"}}}}})],R.prototype,"spatialReference",void 0),e([o({type:String,readOnly:!0,json:{origins:{service:{read:!0}}}})],R.prototype,"subtypeField",void 0),e([o({type:[T],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],R.prototype,"subtypes",void 0),e([o({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],R.prototype,"trackIdField",void 0),e([o(v)],R.prototype,"url",null),e([n("url")],R.prototype,"writeUrl",null),e([o({json:{origins:{service:{read:!0}},read:!1}})],R.prototype,"version",void 0),e([s("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],R.prototype,"readVersion",null),R=e([p("esri.layers.mixins.FeatureLayerBase")],R),R};export{D as FeatureLayerBase};
|
|
5
|
+
import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Collection.js";import{clone as r}from"../../core/lang.js";import i from"../../core/Logger.js";import{property as o}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import{reader as s}from"../../core/accessorSupport/decorators/reader.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{writer as n}from"../../core/accessorSupport/decorators/writer.js";import{excludeTables as l}from"../../core/accessorSupport/layerContainerType.js";import a from"../../geometry/Extent.js";import d from"../../geometry/HeightModelInfo.js";import u from"../../geometry/SpatialReference.js";import{sanitizeUrlWithLayerId as y,writeUrlWithLayerId as c}from"../support/arcgisLayerUrl.js";import{elevationInfo as m,maxScale as h,minScale as f,url as v}from"../support/commonProperties.js";import g from"../support/EditFieldsInfo.js";import{FeatureIndex as I}from"../support/FeatureIndex.js";import{geometryTypeKebabDict as F,isLayerCacheStale as b,supportsQueryOnly as j,readGlobalIdField as S,readObjectIdField as x,readVersion as E}from"../support/featureLayerUtils.js";import U from"../support/GeometryFieldsInfo.js";import O from"../support/LayerFloorInfo.js";import T from"../support/Relationship.js";import{getFeatureLayerCapabilities as w}from"../support/serviceCapabilitiesUtils.js";import D from"../support/Subtype.js";import{timeZoneProperty as M}from"../../time/timeZoneUtils.js";const R=R=>{let B=class extends R{constructor(){super(...arguments),this.copyright=null,this.capabilities=null,this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.definitionExpression=null,this.displayField=null,this.editFieldsInfo=null,this.editingInfo=null,this.elevationInfo=null,this.floorInfo=null,this.fullExtent=null,this.gdbVersion=null,this.geometryFieldsInfo=null,this.geometryType=null,this.globalIdField=null,this.hasM=void 0,this.hasZ=void 0,this.heightModelInfo=null,this.historicMoment=null,this.indexes=new(t.ofType(I)),this.isTable=!1,this.layerId=void 0,this.maxScale=0,this.minScale=0,this.objectIdField=null,this.preferredTimeZone=null,this.relationships=null,this.returnM=void 0,this.returnZ=void 0,this.serviceDefinitionExpression=null,this.serviceItemId=null,this.sourceJSON=null,this.spatialReference=u.WGS84,this.subtypeField=null,this.subtypes=null,this.trackIdField=null,this.version=void 0}get authenticationTriggerEvent(){if(!this.url)return null;const{capabilities:e}=this;if(e){const{query:t,operations:r,editing:i}=e;if(!t.supportsQueryByOthers||!t.supportsQueryByAnonymous)return"load";if(r.supportsEditing&&!(i.supportsUpdateByOthers&&i.supportsUpdateByAnonymous&&i.supportsDeleteByOthers&&i.supportsDeleteByAnonymous))return"load"}if(this.userHasUpdateItemPrivileges){if(b(this))return"load";if(this.hasUpdateItemRestrictions)return e.operations.supportsQuery?"editing":"load"}if(this.userHasFullEditingPrivileges&&this.hasFullEditingRestrictions)return"editing";const t=this.editFieldsInfo;return(t?.creatorField||t?.editorField)&&e?.operations.supportsEditing?"editing":null}readCapabilitiesFromService(e,t){return w(t,this.url)}readEditingInfo(e,t){const{editingInfo:r}=t;return r?{lastEditDate:null!=r.lastEditDate?new Date(r.lastEditDate):null}:null}get effectiveCapabilities(){const e=this.capabilities;if(!e)return null;const t=r(e),{operations:i,editing:o}=t;return j(this)?(this.userHasUpdateItemPrivileges&&(i.supportsQuery=!0),t):this.userHasUpdateItemPrivileges?(i.supportsAdd=i.supportsDelete=i.supportsEditing=i.supportsQuery=i.supportsUpdate=o.supportsDeleteByOthers=o.supportsGeometryUpdate=o.supportsUpdateByOthers=!0,t):(this.userHasFullEditingPrivileges&&i.supportsEditing&&(i.supportsAdd=i.supportsDelete=i.supportsUpdate=o.supportsGeometryUpdate=!0),t)}readGlobalIdFieldFromService(e,t){return S(t)}get hasFullEditingRestrictions(){const e=this.capabilities;if(!e||j(this))return!1;const{operations:t,editing:r}=e;return t.supportsEditing&&!(t.supportsAdd&&t.supportsDelete&&t.supportsUpdate&&r.supportsGeometryUpdate)}get hasUpdateItemRestrictions(){const e=this.capabilities;if(!e)return!1;const{operations:t,editing:r}=e;return j(this)?!t.supportsQuery:!(t.supportsAdd&&t.supportsDelete&&t.supportsEditing&&t.supportsQuery&&t.supportsUpdate&&r.supportsDeleteByOthers&&r.supportsGeometryUpdate&&r.supportsUpdateByOthers)}readIsTableFromService(e,t){return"Table"===t.type}readMaxScale(e,t){return t.effectiveMaxScale||e||0}readMinScale(e,t){return t.effectiveMinScale||e||0}readObjectIdFieldFromService(e,t){return x(t)}readServiceDefinitionExpression(e,t){return t.definitionQuery||t.definitionExpression}set url(e){if(null==e)return void this._set("url",e);const t=y({layer:this,url:e,nonStandardUrlAllowed:!0,logger:i.getLogger(this)});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,i){c(this,e,null,t,i)}readVersion(e,t){return E(t)}};return e([o({readOnly:!0})],B.prototype,"authenticationTriggerEvent",null),e([o({type:String,json:{origins:{service:{read:{source:"copyrightText"}}}}})],B.prototype,"copyright",void 0),e([o({readOnly:!0,json:{read:!1,origins:{service:{read:{source:["advancedQueryCapabilities","allowGeometryUpdates","allowUpdateWithoutMValues","archivingInfo","capabilities","datesInUnknownTimezone","hasAttachments","hasM","hasZ","maxRecordCount","maxRecordCountFactor","ownershipBasedAccessControlForFeatures","standardMaxRecordCount","supportedQueryFormats","supportsAdvancedQueries","supportsApplyEditsWithGlobalIds","supportsAttachmentsByUploadId","supportsAttachmentsResizing","supportsCalculate","supportsCoordinatesQuantization","supportsExceedsLimitStatistics","supportsFieldDescriptionProperty","supportsQuantizationEditMode","supportsRollbackOnFailureParameter","supportsStatistics","supportsTruncate","supportsValidateSql","tileMaxRecordCount","useStandardizedQueries"]}}}}})],B.prototype,"capabilities",void 0),e([s("service","capabilities")],B.prototype,"readCapabilitiesFromService",null),e([o(M("dateFieldsTimeReference"))],B.prototype,"dateFieldsTimeZone",void 0),e([o({type:Boolean})],B.prototype,"datesInUnknownTimezone",void 0),e([o({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],B.prototype,"definitionExpression",void 0),e([o({type:String,json:{origins:{service:{read:{source:"displayField"}}}}})],B.prototype,"displayField",void 0),e([o({readOnly:!0,type:g})],B.prototype,"editFieldsInfo",void 0),e([o({readOnly:!0})],B.prototype,"editingInfo",void 0),e([s("editingInfo")],B.prototype,"readEditingInfo",null),e([o({readOnly:!0})],B.prototype,"effectiveCapabilities",null),e([o((()=>{const e=r(m),t=e.json.origins;return t["web-map"]={read:!1,write:!1},t["portal-item"]={read:!1,write:!1},e})())],B.prototype,"elevationInfo",void 0),e([o({type:O,json:{name:"layerDefinition.floorInfo",write:!0,origins:{"web-scene":{name:"layerDefinition.floorInfo",write:{enabled:!0,layerContainerTypes:l}}}}})],B.prototype,"floorInfo",void 0),e([o({type:a,json:{origins:{service:{read:{source:"extent"}}}}})],B.prototype,"fullExtent",void 0),e([o()],B.prototype,"gdbVersion",void 0),e([o({readOnly:!0,type:U,json:{read:{source:"geometryProperties"}}})],B.prototype,"geometryFieldsInfo",void 0),e([o({type:["point","polygon","polyline","multipoint","multipatch","mesh"],json:{origins:{service:{read:F.read}}}})],B.prototype,"geometryType",void 0),e([o({type:String})],B.prototype,"globalIdField",void 0),e([s("service","globalIdField",["globalIdField","fields"])],B.prototype,"readGlobalIdFieldFromService",null),e([o({readOnly:!0})],B.prototype,"hasFullEditingRestrictions",null),e([o({type:Boolean,json:{origins:{service:{read:!0}}}})],B.prototype,"hasM",void 0),e([o({readOnly:!0})],B.prototype,"hasUpdateItemRestrictions",null),e([o({type:Boolean,json:{origins:{service:{read:!0}}}})],B.prototype,"hasZ",void 0),e([o({readOnly:!0,type:d})],B.prototype,"heightModelInfo",void 0),e([o({type:Date})],B.prototype,"historicMoment",void 0),e([o({type:t.ofType(I),readOnly:!0})],B.prototype,"indexes",void 0),e([o({readOnly:!0})],B.prototype,"isTable",void 0),e([s("service","isTable",["type"])],B.prototype,"readIsTableFromService",null),e([o({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{read:!1,write:{target:"id"}}},read:!1}})],B.prototype,"layerId",void 0),e([o(h)],B.prototype,"maxScale",void 0),e([s("service","maxScale",["maxScale","effectiveMaxScale"])],B.prototype,"readMaxScale",null),e([o(f)],B.prototype,"minScale",void 0),e([s("service","minScale",["minScale","effectiveMinScale"])],B.prototype,"readMinScale",null),e([o({type:String})],B.prototype,"objectIdField",void 0),e([s("service","objectIdField",["objectIdField","fields"])],B.prototype,"readObjectIdFieldFromService",null),e([o(M("preferredTimeReference"))],B.prototype,"preferredTimeZone",void 0),e([o({type:[T],readOnly:!0})],B.prototype,"relationships",void 0),e([o({type:Boolean})],B.prototype,"returnM",void 0),e([o({type:Boolean})],B.prototype,"returnZ",void 0),e([o({readOnly:!0,json:{write:!1}})],B.prototype,"serverGens",void 0),e([o({readOnly:!0})],B.prototype,"serviceDefinitionExpression",void 0),e([s("service","serviceDefinitionExpression",["definitionQuery","definitionExpression"])],B.prototype,"readServiceDefinitionExpression",null),e([o({type:String,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],B.prototype,"serviceItemId",void 0),e([o()],B.prototype,"sourceJSON",void 0),e([o({type:u,json:{origins:{service:{read:{source:"extent.spatialReference"}}}}})],B.prototype,"spatialReference",void 0),e([o({type:String,readOnly:!0,json:{origins:{service:{read:!0}}}})],B.prototype,"subtypeField",void 0),e([o({type:[D],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],B.prototype,"subtypes",void 0),e([o({type:String,json:{read:{source:"timeInfo.trackIdField"}}})],B.prototype,"trackIdField",void 0),e([o(v)],B.prototype,"url",null),e([n("url")],B.prototype,"writeUrl",null),e([o({json:{origins:{service:{read:!0}},read:!1}})],B.prototype,"version",void 0),e([s("service","version",["currentVersion","capabilities","drawingInfo","hasAttachments","htmlPopupType","relationships","timeInfo","typeIdField","types"])],B.prototype,"readVersion",null),B=e([p("esri.layers.mixins.FeatureLayerBase")],B),B};export{R as FeatureLayerBase};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{_ as e}from"../../../chunks/tslib.es6.js";import"../../../geometry.js";import{ClonableMixin as r}from"../../../core/Clonable.js";import t from"../../../core/Error.js";import{JSONSupport as o}from"../../../core/JSONSupport.js";import a from"../../../core/Logger.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import{cast as n}from"../../../core/accessorSupport/decorators/cast.js";import{enumeration as c}from"../../../core/accessorSupport/decorators/enumeration.js";import{reader as p}from"../../../core/accessorSupport/decorators/reader.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{writer as l}from"../../../core/accessorSupport/decorators/writer.js";import m from"./CameraOrientation.js";import u from"./cameraOrientationFactory.js";import{appendPrefixAndSuffix as y,getEffectiveElevationSource as d,orientedImageryTypeMap as f}from"./utils.js";import{CameraOrientationType as g}from"../enums/CameraOrientationType.js";import h from"../../../geometry/Point.js";function v(e){throw new t("exposure-point:missing-default-value",`a value for ${e} is missing in default properties`)}function w(e,r){throw new t("exposure-point:missing-attribute-value",`a value for ${e} is missing in attribute table`,{exposurePoint:r})}let O=class extends(r(o)){constructor(e){super(e),this.cameraOrientation=null,this.elevation=null,this.elevationSource=null,this.name=null,this.sourceMap=null}read(e,r){const t={},{attributes:o,layer:a,geometry:i}=e,n={};for(const c in o)t[c.toLowerCase()]=o[c],n[c.toLowerCase()]=c;super.read({geometry:i,layer:a??{},sourceMap:n,...t},r)}write(e,r){const t=super.write(e,r),{sourceMap:o}=this;if(!o||!t)return t;const a={};for(const i in t){const e=o[i.toLowerCase()];e&&(a[e]=t[i])}return a}readCameraHeading(e,r){const{cameraheading:t,camheading:o,layer:a}=r;return t??o??a.cameraHeading}readCameraHeight(e,r){const{cameraheight:t,avghtag:o,layer:a}=r;return t??o??a.cameraHeight}readCamOffset(e,r){const{cameraoffset:t,camoffset:o}=r;return t?.split(";").map(Number)??o?.split(";").map(Number)??null}writeCameraOffset(e,r){e&&(r.cameraOffset=e.join(";"))}readCameraOrientation(e,r){const{cameraorientation:t,camori:o}=r;return t??o}readCameraPitch(e,r){const{camerapitch:t,campitch:o,layer:a}=r;return t??o??a.cameraPitch}readCameraRoll(e,r){const{cameraroll:t,camroll:o,layer:a}=r;return t??o??a.cameraRoll}readDepthImage(e,r){const{depthimage:t,depthimg:o,layer:a}=r,i=t??o??null,{depthImagePathPrefix:n,depthImagePathSuffix:c}=a??{};return y(i,n,c)}readElevationSource(e,r){const{elevationsource:t,layer:o}=r,{demPathSuffix:a,demPathPrefix:i}=o;if(t){const e=this._parseIfJSON(t);return d(e,i,a)}return o.effectiveElevationSource}readFarDistance(e,r){const{fardistance:t,fardist:o,layer:a}=r;return t??o??a.farDistance}readHFOV(e,r){const{horizontalfieldofview:t,hfov:o,layer:a}=r;return t??o??a.horizontalFieldOfView}readImageURL(e,r){const{imagepath:t,layer:o}=r;t||w("imagePath",this);const{imagePathPrefix:a,imagePathSuffix:i}=o;return y(t,a,i)}readImageRotation(e,r){const{imagerotation:t,imgrot:o,layer:a}=r;return t??o??a.imageRotation}get isHorizontal(){return"horizontal"===this.orientedImageryType}get isInspection(){return"inspection"===this.orientedImageryType}get isNadir(){return"nadir"===this.orientedImageryType}get isOblique(){return"oblique"===this.orientedImageryType}get isSpherical(){return"360"===this.orientedImageryType}get location(){const{cameraOrientation:e,cameraHeight:r,elevation:t}=this;if(e){const{type:r,x:t,y:o,z:a,horizontalWKID:i}=e;return new h({x:t,y:o,z:a,spatialReference:{wkid:r===g.LTP?4326:i}})}if("number"!=typeof r)throw v("cameraHeight");const o=this.geometry.clone();return o.z=o.hasZ?o.z:(t??0)+r,o}readNearDistance(e,r){const{neardistance:t,neardist:o,layer:a}=r;return t??o??a.nearDistance}readOrientationAccuracy(e,r){const{accuracy:t,orientationaccuracy:o}=r;return o?.split(";").map(Number)??t?.split(";").map(Number)??null}writeOrientationAccuracy(e,r){e&&(r.orientationAccuracy=e.join(";"))}readOIType(e,r){const{orientedimagerytype:t,oitype:o,camerapitch:a,campitch:i,layer:n}=r,c=f.read(t??o??n.orientedImageryType),p=a??i??n.cameraPitch;return"oblique"===c?p<10?"nadir":"oblique":c}readVFOV(e,r){const{verticalfieldofview:t,vfov:o,layer:a}=r;return t??o??a.verticalFieldOfView}_parseIfJSON(e){let r=null;try{r=JSON.parse(e)}catch(t){a.getLogger(this).error("couldn't parse the given elevation source JSON",e,t)}return r}};e([i({type:Date,json:{write:{enabled:!0,target:"aquisitionDate"},name:"acquisitiondate"}})],O.prototype,"acquisitionDate",void 0),e([i({type:Number,json:{write:!0,read:{source:["cameraheading","camheading","layer.cameraHeading"]}}})],O.prototype,"cameraHeading",void 0),e([p("cameraHeading")],O.prototype,"readCameraHeading",null),e([i({type:Number,json:{write:!0}})],O.prototype,"cameraHeight",void 0),e([p("cameraHeight",["cameraheight","avghtag","layer.cameraHeight"])],O.prototype,"readCameraHeight",null),e([i()],O.prototype,"cameraOffset",void 0),e([p("cameraOffset",["cameraoffset","camoffset"])],O.prototype,"readCamOffset",null),e([l("cameraOffset")],O.prototype,"writeCameraOffset",null),e([i({json:{write:{writer:(e,r,t)=>{r[t]=e.toString()}}},type:m}),n((e=>e?u.getCameraOrientation(e):null))],O.prototype,"cameraOrientation",void 0),e([p("cameraOrientation",["cameraorientation","camori"])],O.prototype,"readCameraOrientation",null),e([i({type:Number,json:{write:!0}})],O.prototype,"cameraPitch",void 0),e([p("cameraPitch",["camerapitch","campitch","layer.cameraPitch"])],O.prototype,"readCameraPitch",null),e([i({type:Number,json:{write:!0}})],O.prototype,"cameraRoll",void 0),e([p("cameraRoll",["cameraroll","camroll","layer.cameraRoll"])],O.prototype,"readCameraRoll",null),e([i({json:{write:!0},type:String})],O.prototype,"depthImage",void 0),e([p("depthImage",["depthimage","depthimg"])],O.prototype,"readDepthImage",null),e([i({type:Number,json:{write:!0}})],O.prototype,"elevation",void 0),e([i({json:{write:!0}})],O.prototype,"elevationSource",void 0),e([p("elevationSource",["elevationsource","layer.effectiveElevationSource"])],O.prototype,"readElevationSource",null),e([i({json:{name:"exposurestationid",write:{target:"exposureStationId"}},type:String})],O.prototype,"exposureStationId",void 0),e([i({type:Number,json:{write:!0}})],O.prototype,"farDistance",void 0),e([p("farDistance",["fardistance","fardist","layer.farDistance"])],O.prototype,"readFarDistance",null),e([i({type:h,json:{name:"geometry"}})],O.prototype,"geometry",void 0),e([i({type:Number,json:{write:!0}})],O.prototype,"horizontalFieldOfView",void 0),e([p("horizontalFieldOfView",["horizontalfieldofview","hfov","layer.horizontalFieldOfView"])],O.prototype,"readHFOV",null),e([i({json:{write:!0},type:String})],O.prototype,"imagePath",void 0),e([p("imagePath",["imagepath"])],O.prototype,"readImageURL",null),e([i({type:Number,json:{write:!0}})],O.prototype,"imageRotation",void 0),e([p("imageRotation",["imagerotation","imgrot","layer.imageRotation"])],O.prototype,"readImageRotation",null),e([i()],O.prototype,"isHorizontal",null),e([i()],O.prototype,"isInspection",null),e([i()],O.prototype,"isNadir",null),e([i()],O.prototype,"isOblique",null),e([i()],O.prototype,"isSpherical",null),e([i()],O.prototype,"location",null),e([i({json:{write:!0},type:String})],O.prototype,"name",void 0),e([i({type:Number,json:{write:!0}})],O.prototype,"nearDistance",void 0),e([p("nearDistance",["neardistance","neardist","layer.nearDistance"])],O.prototype,"readNearDistance",null),e([i({json:{write:!0,name:"objectid"},type:Number})],O.prototype,"objectId",void 0),e([i()],O.prototype,"orientationAccuracy",void 0),e([p("orientationAccuracy",["accuracy","orientationaccuracy"])],O.prototype,"readOrientationAccuracy",null),e([l("orientationAccuracy")],O.prototype,"writeOrientationAccuracy",null),e([c(f)],O.prototype,"orientedImageryType",void 0),e([p("orientedImageryType",["orientedimagerytype","oitype","layer.orientedImageryType"])],O.prototype,"readOIType",null),e([i({type:Number,json:{name:"sortorder",write:{target:"sortOrder"}}})],O.prototype,"sortOrder",void 0),e([i({type:Object})],O.prototype,"sourceMap",void 0),e([i({type:Number,json:{write:!0}})],O.prototype,"verticalFieldOfView",void 0),e([p("verticalFieldOfView",["verticalfieldofview","vfov","layer.verticalFieldOfView"])],O.prototype,"readVFOV",null),O=e([s("esri.layers.orientedImagery.core.ExposurePoint")],O);const j=O;export{j as default};
|
|
5
|
+
import{_ as e}from"../../../chunks/tslib.es6.js";import"../../../geometry.js";import{ClonableMixin as r}from"../../../core/Clonable.js";import t from"../../../core/Error.js";import{JSONSupport as o}from"../../../core/JSONSupport.js";import a from"../../../core/Logger.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import{cast as n}from"../../../core/accessorSupport/decorators/cast.js";import{enumeration as c}from"../../../core/accessorSupport/decorators/enumeration.js";import{reader as p}from"../../../core/accessorSupport/decorators/reader.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import{writer as l}from"../../../core/accessorSupport/decorators/writer.js";import m from"./CameraOrientation.js";import u from"./cameraOrientationFactory.js";import{appendPrefixAndSuffix as y,getEffectiveElevationSource as d,orientedImageryTypeMap as f}from"./utils.js";import{CameraOrientationType as g}from"../enums/CameraOrientationType.js";import h from"../../../geometry/Point.js";function v(e){throw new t("exposure-point:missing-default-value",`a value for ${e} is missing in default properties`)}function w(e,r){throw new t("exposure-point:missing-attribute-value",`a value for ${e} is missing in attribute table`,{exposurePoint:r})}let O=class extends(r(o)){constructor(e){super(e),this.cameraOrientation=null,this.elevation=null,this.elevationSource=null,this.name=null,this.sourceMap=null}read(e,r){const t={},{attributes:o,layer:a,geometry:i}=e,n={};for(const c in o)t[c.toLowerCase()]=o[c],n[c.toLowerCase()]=c;super.read({geometry:i,layer:a??{},sourceMap:n,...t},r)}write(e,r){const t=super.write(e,r),{sourceMap:o}=this;if(!o||!t)return t;const a={};for(const i in t){const e=o[i.toLowerCase()];e&&(a[e]=t[i])}return a}readCameraHeading(e,r){const{cameraheading:t,camheading:o,layer:a}=r;return t??o??a.cameraHeading}readCameraHeight(e,r){const{cameraheight:t,avghtag:o,layer:a}=r;return t??o??a.cameraHeight}readCamOffset(e,r){const{cameraoffset:t,camoffset:o}=r;return t?.split(";").map(Number)??o?.split(";").map(Number)??null}writeCameraOffset(e,r){e&&(r.cameraOffset=e.join(";"))}readCameraOrientation(e,r){const{cameraorientation:t,camori:o}=r;return t??o}readCameraPitch(e,r){const{camerapitch:t,campitch:o,layer:a}=r;return t??o??a.cameraPitch}readCameraRoll(e,r){const{cameraroll:t,camroll:o,layer:a}=r;return t??o??a.cameraRoll}readDepthImage(e,r){const{depthimage:t,depthimg:o,layer:a}=r,i=t??o??null,{depthImagePathPrefix:n,depthImagePathSuffix:c}=a??{};return y(i,n,c)}readElevationSource(e,r){const{elevationsource:t,layer:o}=r,{demPathSuffix:a,demPathPrefix:i}=o;if(t){const e=this._parseIfJSON(t);return d(e,i,a)}return o.effectiveElevationSource}readFarDistance(e,r){const{fardistance:t,fardist:o,layer:a}=r;return t??o??a.farDistance}readHFOV(e,r){const{horizontalfieldofview:t,hfov:o,layer:a}=r;return t??o??a.horizontalFieldOfView}readImageURL(e,r){const{imagepath:t,layer:o}=r;t||w("imagePath",this);const{imagePathPrefix:a,imagePathSuffix:i}=o;return y(t,a,i)}readImageRotation(e,r){const{imagerotation:t,imgrot:o,layer:a}=r;return t??o??a.imageRotation}get isHorizontal(){return"horizontal"===this.orientedImageryType}get isInspection(){return"inspection"===this.orientedImageryType}get isNadir(){return"nadir"===this.orientedImageryType}get isOblique(){return"oblique"===this.orientedImageryType}get isSpherical(){return"360"===this.orientedImageryType}get location(){const{cameraOrientation:e,cameraHeight:r,elevation:t}=this;if(e){const{type:r,x:t,y:o,z:a,horizontalWKID:i}=e;return new h({x:t,y:o,z:a,spatialReference:{wkid:r===g.LTP?4326:i}})}if("number"!=typeof r)throw v("cameraHeight");const o=this.geometry.clone();return o.z=o.hasZ?o.z:(t??0)+r,o}readNearDistance(e,r){const{neardistance:t,neardist:o,layer:a}=r;return t??o??a.nearDistance}readOrientationAccuracy(e,r){const{accuracy:t,orientationaccuracy:o}=r;return o?.split(";").map(Number)??t?.split(";").map(Number)??null}writeOrientationAccuracy(e,r){e&&(r.orientationAccuracy=e.join(";"))}readOIType(e,r){const{orientedimagerytype:t,oitype:o,camerapitch:a,campitch:i,layer:n}=r,c=f.read(t??o??n.orientedImageryType),p=a??i??n.cameraPitch;return"oblique"===c?p<10?"nadir":"oblique":c}readVFOV(e,r){const{verticalfieldofview:t,vfov:o,layer:a}=r;return t??o??a.verticalFieldOfView}_parseIfJSON(e){let r=null;try{r=JSON.parse(e)}catch(t){a.getLogger(this).error("couldn't parse the given elevation source JSON",e,t)}return r}};e([i({type:Date,json:{write:{enabled:!0,target:"aquisitionDate"},name:"acquisitiondate"}})],O.prototype,"acquisitionDate",void 0),e([i({type:Number,json:{write:!0,read:{source:["cameraheading","camheading","layer.cameraHeading"]}}})],O.prototype,"cameraHeading",void 0),e([p("cameraHeading")],O.prototype,"readCameraHeading",null),e([i({type:Number,json:{write:!0}})],O.prototype,"cameraHeight",void 0),e([p("cameraHeight",["cameraheight","avghtag","layer.cameraHeight"])],O.prototype,"readCameraHeight",null),e([i()],O.prototype,"cameraOffset",void 0),e([p("cameraOffset",["cameraoffset","camoffset"])],O.prototype,"readCamOffset",null),e([l("cameraOffset")],O.prototype,"writeCameraOffset",null),e([i({json:{write:{writer:(e,r,t)=>{r[t]=e.toString()}}},type:m}),n((e=>e?u.getCameraOrientation(e):null))],O.prototype,"cameraOrientation",void 0),e([p("cameraOrientation",["cameraorientation","camori"])],O.prototype,"readCameraOrientation",null),e([i({type:Number,json:{write:!0}})],O.prototype,"cameraPitch",void 0),e([p("cameraPitch",["camerapitch","campitch","layer.cameraPitch"])],O.prototype,"readCameraPitch",null),e([i({type:Number,json:{write:!0}})],O.prototype,"cameraRoll",void 0),e([p("cameraRoll",["cameraroll","camroll","layer.cameraRoll"])],O.prototype,"readCameraRoll",null),e([i({json:{write:!0},type:String})],O.prototype,"depthImage",void 0),e([p("depthImage",["depthimage","depthimg"])],O.prototype,"readDepthImage",null),e([i({type:Number,json:{write:!0}})],O.prototype,"elevation",void 0),e([i({json:{write:!0},clonable:"reference"})],O.prototype,"elevationSource",void 0),e([p("elevationSource",["elevationsource","layer.effectiveElevationSource"])],O.prototype,"readElevationSource",null),e([i({json:{name:"exposurestationid",write:{target:"exposureStationId"}},type:String})],O.prototype,"exposureStationId",void 0),e([i({type:Number,json:{write:!0}})],O.prototype,"farDistance",void 0),e([p("farDistance",["fardistance","fardist","layer.farDistance"])],O.prototype,"readFarDistance",null),e([i({type:h,json:{name:"geometry"}})],O.prototype,"geometry",void 0),e([i({type:Number,json:{write:!0}})],O.prototype,"horizontalFieldOfView",void 0),e([p("horizontalFieldOfView",["horizontalfieldofview","hfov","layer.horizontalFieldOfView"])],O.prototype,"readHFOV",null),e([i({json:{write:!0},type:String})],O.prototype,"imagePath",void 0),e([p("imagePath",["imagepath"])],O.prototype,"readImageURL",null),e([i({type:Number,json:{write:!0}})],O.prototype,"imageRotation",void 0),e([p("imageRotation",["imagerotation","imgrot","layer.imageRotation"])],O.prototype,"readImageRotation",null),e([i()],O.prototype,"isHorizontal",null),e([i()],O.prototype,"isInspection",null),e([i()],O.prototype,"isNadir",null),e([i()],O.prototype,"isOblique",null),e([i()],O.prototype,"isSpherical",null),e([i()],O.prototype,"location",null),e([i({json:{write:!0},type:String})],O.prototype,"name",void 0),e([i({type:Number,json:{write:!0}})],O.prototype,"nearDistance",void 0),e([p("nearDistance",["neardistance","neardist","layer.nearDistance"])],O.prototype,"readNearDistance",null),e([i({json:{write:!0,name:"objectid"},type:Number})],O.prototype,"objectId",void 0),e([i()],O.prototype,"orientationAccuracy",void 0),e([p("orientationAccuracy",["accuracy","orientationaccuracy"])],O.prototype,"readOrientationAccuracy",null),e([l("orientationAccuracy")],O.prototype,"writeOrientationAccuracy",null),e([c(f)],O.prototype,"orientedImageryType",void 0),e([p("orientedImageryType",["orientedimagerytype","oitype","layer.orientedImageryType"])],O.prototype,"readOIType",null),e([i({type:Number,json:{name:"sortorder",write:{target:"sortOrder"}}})],O.prototype,"sortOrder",void 0),e([i({type:Object})],O.prototype,"sourceMap",void 0),e([i({type:Number,json:{write:!0}})],O.prototype,"verticalFieldOfView",void 0),e([p("verticalFieldOfView",["verticalfieldofview","vfov","layer.verticalFieldOfView"])],O.prototype,"readVFOV",null),O=e([s("esri.layers.orientedImagery.core.ExposurePoint")],O);const j=O;export{j 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.31/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../../../geometry.js";import"../../../core/has.js";import"../../../core/Logger.js";import{deg2rad as e}from"../../../core/mathUtils.js";import{zeros as t,create as r}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{m as a,z as n,g as i}from"../../../chunks/vec32.js";import o from"../../../geometry/Point.js";import{projectWithZConversion as s,initializeProjection as c,project as f}from"../../../geometry/projection.js";import{fromPoints as
|
|
5
|
+
import"../../../geometry.js";import"../../../core/has.js";import"../../../core/Logger.js";import{deg2rad as e}from"../../../core/mathUtils.js";import{zeros as t,create as r}from"../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{m as a,z as n,g as i}from"../../../chunks/vec32.js";import o from"../../../geometry/Point.js";import{projectWithZConversion as s,initializeProjection as c,project as f}from"../../../geometry/projection.js";import{fromPoints as p,fromValues as m}from"../../../geometry/support/ray.js";import{k as l,i as y}from"../../../chunks/sphere.js";import{geographicToWebMercator as u,webMercatorToGeographic as g}from"../../../geometry/support/webMercatorUtils.js";import{createCoveragePolygon as w,limitZToGround as x}from"../core/coverageUtils.js";import z from"../core/ExposurePoint.js";import{transformPoints as h,updateElevation as d}from"./groundToImageUtils.js";import{getWebMercatorScalingFactor as R,convertPixelToHeadingPitch as j,convertHeadingPitchToSphereVertex as b,scaleAndAddWithFactor as P,hasCameraOrientationLTP as v,computeHFOVAndVFOV as M,ltpToGeographic as O,projectiveTransform2 as S,scaleWithFactor as F,calculateRotationMatrix as L,transformMat3 as H,projectiveTransform as V,getPlaneLineIntersectionPoint as A}from"./utils.js";import{defaultImageSphereCenter as T}from"../../../widgets/PanoramicViewer/constants.js";import{isNumber as U}from"../../../widgets/support/dataUtils.js";import C from"../../../geometry/Polygon.js";import D from"../../../geometry/SpatialReference.js";function E(e,t){if(!e)return Promise.resolve([]);const r=t.feature;let a=r.attributes;return a instanceof z||(a=z.fromJSON(r),a&&(r.attributes=a)),G(e,t)}function G(e,t){const{attributes:r}=t.feature;if(r.isSpherical||360===r.horizontalFieldOfView){const{location:a,cameraOrientation:n,farDistance:i,cameraHeading:o,cameraHeight:s}=r;return W(e,a,i,[t.imageProperties.width,t.imageProperties.height],o,s,n)}return k(e,t)}async function W(e,t,a,n,i,s,c){let f=new o(t);f.spatialReference.isGeographic&&f.spatialReference.isWGS84&&4!==c?.type&&(f=u(f));const g=R(f),w=new Array,[x,z,h]=f.toArray(),d=l([x,z,h??0],a*g),v=T.toArray();for(const l of e){let e,t;if(U(l.heading)&&U(l.pitch))e=l.heading,t=l.pitch;else{const r=j({x:l.x,y:l.y},n[0],n[1]);e=r.heading,t=r.pitch}e=(e+i)%360;const a=p([v[0],v[1],v[2]],b(e,t)),c=m([x,z,h??0],a.direction),u=r();y(d,c,u);const R=(f.z??0)-s;if(u[2]<R){const e=Math.abs((f.z-R)/-a.direction[2])*g;P([f.x,f.y,f.z],a.direction,e,g,u)}else u[2]=R;w.push(new o(u,f.spatialReference))}return w}async function k(e,t){const{feature:r,footprintExtent:a,options:n}=t,{attributes:{cameraHeight:i,cameraOrientation:c,cameraPitch:f,cameraRoll:p,elevationSource:m,horizontalFieldOfView:l,location:y,verticalFieldOfView:x},elevationSample:z}=r,d=v(c),{vfov:j}=M(l,x,p??0);let b=new o(y),P=!1;d&&(b=new o(O(b,[c.latitude,c.longitude,c.ellipsoidRadius,c.squaredEccentricity]))),b.spatialReference.isWGS84&&(P=!0,b=u(b));const F=R(b),L=I(t,b,F),H=d?L.map((e=>g(new o(e)))):L,V=await h(H,t,!0).then((e=>e.map((e=>({x:e.x,y:e.y,z:1}))))),A=new Array;for(const u of e){const e={...u,z:1},c={...S(e,V,H),spatialReference:b.spatialReference},[p]=await h([d?g(new o(c)):new o(c)],t,!0);await B(e,p,V,H,b,c,d,t);const l=r.attributes.clone();l.geometry=b.clone();const{polygon:y}=w(l),x=y.rings[0].map((e=>new o(e,y.spatialReference))),R=await s(m||z?await q({cameraLocation:b,groundFootPrint:x,projectedPoint:c,webMercatorScalingFactor:F,vfov:j,shouldConvertToLatLong:P,isCameraOrientationLTP:d,imgPoint:e},t):new o(N(c,b,F,b.z-i,f,j,P)),a.spatialReference,n);A.push(R)}return A}async function q(e,t){const{cameraLocation:r,groundFootPrint:a,projectedPoint:n,webMercatorScalingFactor:i,vfov:s,shouldConvertToLatLong:f,isCameraOrientationLTP:p,imgPoint:m}=e,{cameraHeight:l,cameraPitch:y}=t.feature.attributes;await c(r.spatialReference,t.footprintExtent.spatialReference,null,t.options);let u=await Z(a,t),w=0,x=(r.z??0)-l,z=0;for(;z<10;){const e=K(u,r,n);if(!e||!J([r.x,r.y,r.z],[e.x,e.y,e.z],[n.x,n.y,n.z]))return new o(N(n,r,i,x,y,s,f));const a=new o({x:e.x,y:e.y,z:e.z,spatialReference:r.spatialReference}),c=await h([p?g(a):a],t);if(w=Math.abs(m.x-c[0].x)+Math.abs(m.y-c[0].y),x=e.z,w<=1)return new o(N(n,r,i,x,y,s,f));z+=1;const{extent:l}=u,R=(l?.width??0)/10,j=(l?.height??0)/10;if(R<1||j<1)return new o(N(n,r,i,x,y,s,f));const{x:b,y:P}=e,v=await d(Q(R,j).map((([e,t])=>new o({x:b+e,y:P+t,spatialReference:r.spatialReference}))),t,!1);v.push(v[0]),u=new C({rings:[v.map((e=>e.toArray()))],spatialReference:r.spatialReference})}return new o(N(n,r,i,x,y,s,f))}const J=(e,r,i)=>a(n(t(),r,e),n(t(),i,e))>0;function N(e,r,a,i,s,c,f){const p=Math.sqrt((e.z-r.z)**2+(Math.sqrt((e.x-r.x)**2+(e.y-r.y)**2)/a)**2)*a,m=F(n(t(),[e.x,e.y,e.z],[r.x,r.y,r.z]),1/p,1/a);if(e.z<i||s+c/2<90){const t=Math.abs((r.z-i)/-m[2])*a,n=P([r.x,r.y,r.z],m,t,a);e.x=n[0],e.y=n[1],e.z=n[2]}else e.z=i;return f?g(new o(e)).toJSON():e}function I(r,a,s){const{feature:c}=r,{attributes:f}=c,p=2*Math.tan(e(f.verticalFieldOfView)/2)*f.farDistance*s,m=2*Math.tan(e(f.horizontalFieldOfView)/2)*f.farDistance*s,l=L("HPR",[f.cameraHeading,f.cameraPitch,f.cameraRoll??0]),y=H([0,0,-1],l),u=P([a.x,a.y,a.z],y,f.farDistance*s,s),g=H([0,1,0],l),w=H([1,0,0],l),x=F(g,p/2,s),z=F(w,m/2,s),h=n(t(),x,z),d=i(t(),x,z);return[i(t(),u,h),i(t(),u,d),n(t(),u,h),n(t(),u,d)].map((e=>{const[t,r,n]=e;return new o({x:t,y:r,z:n,spatialReference:a.spatialReference})}))}async function Z(e,t){const r=e[0].spatialReference.isWGS84?D.WebMercator:e[0].spatialReference,{cameraHeight:a,location:n,elevation:i}=t.feature.attributes,s="number"==typeof n.z&&"number"==typeof i?n.z-i:a,c=x(e.map((({x:e,y:t,z:r})=>[e,t,r])),s,n,R(n)),p=(await d(c.map((e=>new o(e,n.spatialReference))),t,!1)).map((e=>f(e,r)));return new C({hasZ:!0,rings:[p.map((e=>[e.x,e.y,e.z]))],spatialReference:r})}async function B(e,t,r,a,n,i,s,c){let f=0;const p=8;for(let m=0;m<=p;m+=1){if(f=Math.abs(e.x-t.x)+Math.abs(e.y-t.y),f<=1)return;const[p,m,l,y]=Q(f,f).map((([t,i])=>({...V({x:e.x+t,y:e.y+i,z:1},r[0],r[1],r[2],r[3],{x:a[0].x,y:a[0].y,z:a[0].z},{x:a[1].x,y:a[1].y,z:a[1].z},{x:a[2].x,y:a[2].y,z:a[2].z},{x:a[3].x,y:a[3].y,z:a[3].z}),spatialReference:n.spatialReference}))),[u,w,x,z]=await h(s?[g(new o(p)),g(new o(m)),g(new o(l)),g(new o(y))]:[new o(p),new o(m),new o(l),new o(y)],c,!0).then((e=>e.map((e=>({...e,z:0}))))),{x:d,y:R,z:j}=V(e,u,w,x,z,p,m,l,y);i.x=d,i.y=R,i.z=j,[t]=await h([s?g(new o(i)):new o(i)],c,!0)}}function K(e,t,r){const a={x:e.rings[0][0][0],y:e.rings[0][0][1],z:e.rings[0][0][2]},n={x:e.rings[0][1][0],y:e.rings[0][1][1],z:e.rings[0][1][2]},i={x:e.rings[0][1][0],y:e.rings[0][1][1],z:e.rings[0][1][2]},o={x:e.rings[0][2][0],y:e.rings[0][2][1],z:e.rings[0][2][2]},s=(o.z-i.z)*(n.y-a.y)-(o.y-i.y)*(n.z-a.z),c=-((o.z-i.z)*(n.x-a.x)-(n.z-a.z)*(o.x-i.x)),f=(o.y-i.y)*(n.x-a.x)-(n.y-a.y)*(o.x-i.x),p=-(s*a.x+c*a.y+f*a.z);return A(t.toJSON(),r,s,c,f,p)}const Q=(e,t)=>[[-e,-t],[e,-t],[e,t],[-e,t]];export{E as transformPoints};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{id as t}from"../../kernel.js";import{symbolTypesRenderer as e}from"../../symbols.js";import{resultOrAbort as r}from"../../core/asyncUtils.js";import n from"../../core/Error.js";import{JSONMap as o}from"../../core/jsonMap.js";import{parseWhereClause as a}from"../../core/sql.js";import{createTypeReader as
|
|
5
|
+
import{id as t}from"../../kernel.js";import{symbolTypesRenderer as e}from"../../symbols.js";import{resultOrAbort as r}from"../../core/asyncUtils.js";import n from"../../core/Error.js";import{JSONMap as o}from"../../core/jsonMap.js";import{parseWhereClause as a}from"../../core/sql.js";import{createTypeReader as i}from"../../core/accessorSupport/extensions/serializableProperty/reader.js";import{queryAllJSON as s}from"./featureQueryAll.js";import{getOwningPortalUrl as u}from"./layerUtils.js";import l from"../../renderers/SimpleRenderer.js";import c from"../../renderers/UniqueValueRenderer.js";import p from"../../rest/support/AttachmentQuery.js";import d from"../../rest/support/Query.js";import f from"../../rest/support/RelationshipQuery.js";const y=new o({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function m(t,e,r,o){const a=await G(t);if(await h(t,e,o),!a.addAttachment)throw new n(o,"Layer source does not support addAttachment capability");return a.addAttachment(e,r)}function h(t,e,r){const{attributes:o}=e,{objectIdField:a}=t;return t.capabilities?.data?.supportsAttachment?e?o?a&&o[a]?Promise.resolve():Promise.reject(new n(r,`feature is missing the identifying attribute ${a}`)):Promise.reject(new n(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new n(r,"A feature is required to add/delete/update attachments")):Promise.reject(new n(r,"this layer doesn't support attachments"))}async function w(t,e,r,o,a){const i=await G(t);if(await h(t,e,a),!i.updateAttachment)throw new n(a,"Layer source does not support updateAttachment capability");return i.updateAttachment(e,r,o)}async function b(t,e,r){const{applyEdits:n}=await import("../graphics/editingSupport.js"),o=await t.load();let a=r;return"feature"===o.type&&o.infoFor3D&&null!=e.deleteFeatures&&null!=o.globalIdField&&(a={...a,globalIdToObjectId:await J(o,e.deleteFeatures,o.globalIdField)}),n(o,o.source,e,r)}async function g(t,e,r){const{uploadAssets:n}=await import("../graphics/editingSupport.js"),o=await t.load();return n(o,o.source,e,r)}async function j(t,e,r,o){const a=await G(t);if(await h(t,e,o),!a.deleteAttachments)throw new n(o,"Layer source does not support deleteAttachments capability");return a.deleteAttachments(e,r)}async function I(t,e,r){const o=(await t.load({signal:e?.signal})).source;if(!o.fetchRecomputedExtents)throw new n(r,"Layer source does not support fetchUpdates capability");return o.fetchRecomputedExtents(e)}async function q(t,e,r,o){e=p.from(e),await t.load();const a=t.source,i=t.capabilities;if(!i?.data?.supportsAttachment)throw new n(o,"this layer doesn't support attachments");const{attachmentTypes:s,objectIds:u,globalIds:l,num:c,size:d,start:f,where:y}=e;if(!i?.operations?.supportsQueryAttachments){if(s?.length>0||l?.length>0||d?.length>0||c||f||y)throw new n(o,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",e)}if(!(u?.length||l?.length||y))throw new n(o,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",e);if(!a.queryAttachments)throw new n(o,"Layer source does not support queryAttachments capability",e);return a.queryAttachments(e)}async function F(t,e,r,o){const a=await G(t);if(!a.queryObjectIds)throw new n(o,"Layer source does not support queryObjectIds capability");return a.queryObjectIds(d.from(e)??t.createQuery(),r)}async function A(t,e,r,o){const a=await G(t);if(!a.queryFeatureCount)throw new n(o,"Layer source does not support queryFeatureCount capability");return a.queryFeatureCount(d.from(e)??t.createQuery(),r)}async function O(t,e,r,o){const a=await G(t);if(!a.queryExtent)throw new n(o,"Layer source does not support queryExtent capability");return a.queryExtent(d.from(e)??t.createQuery(),r)}async function P(t,e,r,o){const a=await G(t);if(!a.queryRelatedFeatures)throw new n(o,"Layer source does not support queryRelatedFeatures capability");return a.queryRelatedFeatures(f.from(e),r)}async function S(t,e,r,o){const a=await G(t);if(!a.queryRelatedFeaturesCount)throw new n(o,"Layer source does not support queryRelatedFeaturesCount capability");return a.queryRelatedFeaturesCount(f.from(e),r)}async function E(t){const e=t.source;if(e?.refresh)try{const{dataChanged:r,updates:n}=await e.refresh();if(null!=n&&(t.sourceJSON={...t.sourceJSON,...n},t.read(n,{origin:"service",url:t.parsedUrl})),r)return!0}catch{}if(t.definitionExpression)try{return(await a(t.definitionExpression,t.fieldsIndex)).hasDateFunctions}catch{}return!1}function x(t){const e=new d,r=t.capabilities?.data,n=t.capabilities?.query;e.historicMoment=t.historicMoment,e.gdbVersion=t.gdbVersion,e.returnGeometry=!0,n&&(e.compactGeometryEnabled=n.supportsCompactGeometry,e.defaultSpatialReferenceEnabled=n.supportsDefaultSpatialReference),r&&(r.supportsZ&&null!=t.returnZ&&(e.returnZ=t.returnZ),r.supportsM&&null!=t.returnM&&(e.returnM=t.returnM)),e.outFields=["*"];const{timeOffset:o,timeExtent:a}=t;return e.timeExtent=null!=o&&null!=a?a.offset(-o.value,o.unit):a||null,e.multipatchOption="multipatch"===t.geometryType?"xyFootprint":null,e}function R(t){const{globalIdField:e,fields:r}=t;if(e)return e;if(r)for(const n of r)if("esriFieldTypeGlobalID"===n.type)return n.name}function M(t){const{objectIdField:e,fields:r}=t;if(e)return e;if(r)for(const n of r)if("esriFieldTypeOID"===n.type)return n.name}function C(t){return t.currentVersion?t.currentVersion:t.hasOwnProperty("capabilities")||t.hasOwnProperty("drawingInfo")||t.hasOwnProperty("hasAttachments")||t.hasOwnProperty("htmlPopupType")||t.hasOwnProperty("relationships")||t.hasOwnProperty("timeInfo")||t.hasOwnProperty("typeIdField")||t.hasOwnProperty("types")?10:9.3}function L(t,e){const{subtypes:r,subtypeField:n}=t;if(!e||!r?.length||!n)return null;const o=e.attributes[n];return null==o?null:r.find((t=>t.code===o))}async function G(t){return(await t.load()).source}async function Q(e,r){if(!t)return;if(t.findCredential(e))return;let n;try{const o=await u(e,r);o&&(n=await t.checkSignInStatus(`${o}/sharing`))}catch(o){}if(n)try{const n=null!=r?r.signal:null;await t.getCredential(e,{signal:n})}catch(o){}}async function T(t,e,r){const n=t.parsedUrl?.path;n&&t.authenticationTriggerEvent===e&&await Q(n,r)}function v(t){return!Z(t)&&(t.userHasUpdateItemPrivileges||t.editingEnabled)}const D=i({types:e});function U(t,e){if(t.defaultSymbol)return t.types?.length?new c({defaultSymbol:D(t.defaultSymbol,t,e),field:t.typeIdField,uniqueValueInfos:t.types.map((t=>({id:t.id,symbol:D(t.symbol,t,e)})))}):new l({symbol:D(t.defaultSymbol,t,e)})}function V(t){let e=t.sourceJSON?.cacheMaxAge;if(!e)return!1;const r=t.editingInfo?.lastEditDate?.getTime();return null==r||(e*=1e3,Date.now()-r<e)}async function J(t,e,n){if(null==e)return null;const o=[],{objectIdField:a}=t;if(e.forEach((t=>{let e=null;if("attributes"in t){const{attributes:r}=t;e={globalId:r[n],objectId:null!=r[a]&&-1!==r[a]?r[a]:null}}else e={globalId:t.globalId,objectId:null!=t.objectId&&-1!==t.objectId?t.objectId:null};null!=e.globalId&&(null!=e.objectId&&-1!==e.objectId||o.push(e.globalId))})),0===o.length)return null;const i=t.createQuery();i.where=o.map((t=>`${n}='${t}'`)).join(" OR "),i.returnGeometry=!1,i.outFields=[a,n],i.cacheHint=!1;const u=await r(s(t,i));if(!u.ok)return null;const l=new Map,c=u.value.features;for(const r of c){const t=r.attributes[n],e=r.attributes[a];null!=t&&null!=e&&-1!==e&&l.set(t,e)}return l}function N(t,e,r){if(!e||!r||!t)return null;const n=r.getAttribute(e);return null==n?null:t.find((t=>{const{id:e}=t;return null!=e&&e.toString()===n.toString()}))??null}function Z(t){return t.sourceJSON?.isMultiServicesView||$(t)}function $(t){return!!t.sourceJSON?.capabilities?.toLowerCase().split(",").map((t=>t.trim())).includes("map")}export{m as addAttachment,b as applyEdits,v as computeEffectiveEditingEnabled,U as createDefaultRenderer,x as createQuery,j as deleteAttachments,Q as ensureCredentialIfSignedIn,T as ensureLayerCredential,I as fetchRecomputedExtents,y as geometryTypeKebabDict,L as getFeatureSubtype,N as getFeatureType,J as getGlobalIdToObjectIdMap,E as hasDataChanged,V as isLayerCacheStale,q as queryAttachments,O as queryExtent,A as queryFeatureCount,F as queryObjectIds,P as queryRelatedFeatures,S as queryRelatedFeaturesCount,R as readGlobalIdField,M as readObjectIdField,C as readVersion,Z as supportsQueryOnly,w as updateAttachment,g as uploadAssets};
|
package/package.json
CHANGED