@arcgis/core 5.2.0-next.64 → 5.2.0-next.65
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/{bb95922cd4631d6f17fb.js → 04ac5ac6f592d8c34bbd.js} +1 -1
- package/assets/esri/core/workers/chunks/{0977f4d77c36175c2895.js → 3ddd717ea12d9823eee2.js} +1 -1
- package/assets/esri/core/workers/chunks/5adf16c034a590b5e9f5.js +1 -0
- package/assets/esri/core/workers/chunks/{57824ecc10b25e3ad794.js → 903e1cd8b76eff19ebdf.js} +1 -1
- package/assets/esri/core/workers/chunks/93c0a620a147cbf4a0ba.js +1 -0
- package/assets/esri/core/workers/chunks/9be6827e5756031a56c1.js +1 -0
- package/assets/esri/core/workers/chunks/a52c88e2d837b525ff6c.js +1 -0
- package/assets/esri/core/workers/chunks/{771ead806efbe9c91fdc.js → a5fdb02b1714e93fa69e.js} +1 -1
- package/assets/esri/core/workers/chunks/b4e5ee81b9eb171499a6.js +1 -0
- package/assets/esri/core/workers/chunks/bece22668622a9a6bfe2.js +1 -0
- package/assets/esri/core/workers/chunks/c02ae1d40c1fe95ae6c5.js +1 -0
- package/assets/esri/core/workers/chunks/d51c41c1944df0cbab3e.js +1 -0
- package/assets/esri/core/workers/chunks/d583bcea4d1a21da9147.js +1 -0
- package/assets/esri/core/workers/chunks/{ef27bf1d7941ae265ca4.js → d7267f429a051943187b.js} +1 -1
- package/assets/esri/core/workers/chunks/d9c78c2db04a06ee83ed.js +1 -0
- package/assets/esri/core/workers/chunks/{c1e45e24f5ef719a714c.js → dc7e4f7879debf557e46.js} +143 -95
- package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
- package/chunks/Component.glsl.js +60 -62
- package/chunks/DefaultMaterial.glsl.js +27 -28
- package/chunks/GaussianSplat.glsl.js +7 -7
- package/chunks/GaussianSplatShadow.glsl.js +9 -9
- package/chunks/GlobalIllumination.glsl.js +35 -15
- package/chunks/Path.glsl.js +7 -6
- package/chunks/RealisticTree.glsl.js +22 -24
- package/chunks/SSAO.glsl.js +1 -1
- package/chunks/Terrain.glsl.js +3 -2
- package/chunks/Water.glsl.js +20 -11
- package/chunks/_commonjsHelpers.js +1 -1
- package/chunks/bundle2.js +1 -1
- package/config.js +1 -1
- package/kernel.js +1 -1
- package/layers/graphics/sources/ParquetSource.js +1 -1
- package/layers/graphics/sources/parquet/FileProvider.js +1 -1
- package/layers/graphics/sources/parquet/ParquetFileInfo.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/raster/datasets/EphemeralBlockCache.js +1 -1
- package/layers/raster/datasets/RawBlockCache.js +1 -1
- package/layers/support/KMLSublayer.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/libs/parquet/parquet.js +1 -1
- package/package.json +1 -1
- package/rest/support/Query.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/LabelSymbol3D.js +1 -1
- package/symbols/LineSymbol3D.js +1 -1
- package/symbols/MeshSymbol3D.js +1 -1
- package/symbols/PointSymbol3D.js +1 -1
- package/symbols/PolygonSymbol3D.js +1 -1
- package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
- package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/state/controllers/RotateController.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatDataStore.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +24 -16
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialExternalColor.glsl.js +25 -0
- package/views/3d/webgl-engine/lib/GaussianSplatRenderUtils.js +2 -0
- package/views/3d/webgl-engine/lib/GaussianSplatRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatShadows.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatPassParameters.js +2 -0
- package/views/3d/webgl-engine/shaders/GaussianSplatShadow.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatShadowTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
- package/widgets/BatchAttributeForm/expressions/ExpressionsModel.js +1 -1
- package/widgets/LayerList/ListItem.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/services/SuperimposeService.js +1 -1
- package/widgets/OrientedImageryViewer/services/TransformationService.js +1 -1
- package/widgets/OrientedImageryViewer/support/superimposeUtils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/TableList/ListItem.js +1 -1
- package/assets/esri/core/workers/chunks/43b39abd49c4a8ce891f.js +0 -1
- package/assets/esri/core/workers/chunks/5dbd8ca7e7b8eb9a0bf7.js +0 -1
- package/assets/esri/core/workers/chunks/6123894e2ae9233cdf89.js +0 -1
- package/assets/esri/core/workers/chunks/6b536d03b4bef408035b.js +0 -1
- package/assets/esri/core/workers/chunks/6c98a64d92c9bca78203.js +0 -1
- package/assets/esri/core/workers/chunks/78b80da3bbc1b608fe83.js +0 -1
- package/assets/esri/core/workers/chunks/7d85048c6cd6ad84faf9.js +0 -1
- package/assets/esri/core/workers/chunks/9008090a5d8431ddfa22.js +0 -1
- package/assets/esri/core/workers/chunks/a2d8bc0efddd2e13b1ad.js +0 -1
- package/assets/esri/core/workers/chunks/c97451f75c23be979476.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{throwIfAborted as t}from"../../../core/promiseUtils.js";import{getMetersPerUnitForSR as a}from"../../../core/units.js";import n from"../../../geometry/Point.js";import r from"../../../geometry/Polygon.js";import
|
|
2
|
+
import{throwIfAborted as t}from"../../../core/promiseUtils.js";import{getMetersPerUnitForSR as a}from"../../../core/units.js";import n from"../../../geometry/Point.js";import r from"../../../geometry/Polygon.js";import i from"../../../geometry/SpatialReference.js";import{e}from"../../../chunks/intersectionOperator.js";import{computeFarplaneVertices as o,createRotationMatrixFromHPR as m}from"../../../layers/orientedImagery/transformations/utils.js";import{calculateUpdatedWmsf as h}from"../imageMeasurementUtils.js";const l=15,s=120,c=.9,M=1.1,x=1,f=179,u=3,y=2,g=1,p=150,d=16,w=32,I=8,b=.05,v=1,F=2,P=20,z=4096;function N(t,n){const{radiusOffset:r=0,minimumRadiusInMeters:i=0}=n;if(0===r)return;const e=a(t.spatialReference),o=e?r/e:r,{position:m}=t.vertexAttributes,h=Math.floor(m.length/3);let l=0,s=0,c=0;for(let a=0;a<h;a++)l+=m[3*a],s+=m[3*a+1],c+=m[3*a+2];l/=h,s/=h,c/=h;let M=0;for(let a=0;a<h;a++){const t=m[3*a]-l,n=m[3*a+1]-s,r=m[3*a+2]-c;M+=Math.sqrt(t*t+n*n+r*r)}M/=h;const x=e?i/e:i,f=Math.max(x,M+o),u=M>0?f/M:1;for(let a=0;a<h;a++){let t=m[3*a]-l,n=m[3*a+1]-s,r=m[3*a+2]-c;t*=u,n*=u,r*=u,m[3*a]=l+t,m[3*a+1]=s+n,m[3*a+2]=c+r}t.vertexAttributesChanged()}function R(t,a,n){const{columns:r,rows:i}=K(t,a,n),[e,o]=t,m=a?.xmin??0,h=a?.ymin??0,l=a?Math.max(1,a.xmax-a.xmin):e,s=a?Math.max(1,a.ymax-a.ymin):o,c=new Array;for(let M=0;M<=i;M+=1){const t=h+M/i*s;for(let a=0;a<=r;a+=1)c.push({x:m+a/r*l,y:t})}return c}function j(t,a,n,r){const{columns:i,rows:e}=K(a,n,r),o=i+1,m=new Float64Array(3*t.length),h=new Float32Array(2*t.length),l=new Array;t.forEach((t,a)=>{const n=3*a,r=2*a,l=a%o,s=Math.floor(a/o);m[n]=t.x,m[n+1]=t.y,m[n+2]=t.z??0,h[r]=l/i,h[r+1]=s/e});for(let s=0;s<e;s+=1)for(let t=0;t<i;t+=1){const a=s*o+t,n=a+1,r=a+o,i=r+1;l.push(a,n,i,a,i,r)}return{faces:l,position:m,uv:h}}function A(t,a,n,r=y){return{width:Math.ceil(t/r**n),height:Math.ceil(a/r**n)}}function S(t,a,n){const{width:r,height:i,storageInfo:e}=t.rasterInfo,{pyramidScalingFactor:o}=e,m=A(r,i,a,o??void 0);if(!n)return{offset:{x:0,y:0},size:m};const h=(o??y)**a,l={x:Math.max(0,Math.floor(n.xmin/h)),y:Math.max(0,Math.floor(n.ymin/h))},s=Math.min(m.width,Math.ceil(n.xmax/h)),c=Math.min(m.height,Math.ceil(n.ymax/h));return{offset:l,size:{width:Math.max(g,s-l.x),height:Math.max(g,c-l.y)}}}function L(t,a,n){const{maximumPyramidLevel:r,pyramidScalingFactor:i}=t.rasterInfo.storageInfo,e=i??y,o=Math.max(g,(n?.xmax??t.rasterInfo.width)-(n?.xmin??0)),m=Math.max(g,(n?.ymax??t.rasterInfo.height)-(n?.ymin??0)),h=Math.max(g,a.width),l=Math.max(g,a.height),s=Math.max(g,o/h,m/l),c=Math.ceil(Math.log(s)/Math.log(e));return Math.max(0,Math.min(r,Number.isFinite(c)?c:r))}function O(t,a,n){const{maximumPyramidLevel:r,pyramidScalingFactor:i}=t.rasterInfo.storageInfo,e=i??y,o=Math.max(g,(n?.xmax??t.rasterInfo.width)-(n?.xmin??0)),m=Math.max(g,(n?.ymax??t.rasterInfo.height)-(n?.ymin??0)),h=Math.max(g,a.width),l=Math.max(g,a.height);let s=r;for(let c=r;c>=0&&(s=c,!(0===c||o/e**c>h||m/e**c>l));c-=1);return s}function q(t,a,n=z){const{maximumPyramidLevel:r,pyramidScalingFactor:i}=t.rasterInfo.storageInfo,e=i??y;let o=Math.max(0,Math.min(r,a));for(;o<r;){const a=A(t.rasterInfo.width,t.rasterInfo.height,o,e);if(a.width<=n&&a.height<=n)break;o+=1}return o}function D(t){const{camera:a,width:n,height:r}=t;if(n<=0||r<=0)return{horizontal:a.fov,vertical:a.fov};const i=Math.sqrt(n*n+r*r);return{horizontal:2*Math.atan(Math.tan(a.fov*Math.PI/360)*n/i)*180/Math.PI,vertical:2*Math.atan(Math.tan(a.fov*Math.PI/360)*r/i)*180/Math.PI}}function W(t,a,n){if(null==t||null==a||!Number.isFinite(t)||!Number.isFinite(a))return{horizontal:t??null,vertical:a??null};const r=Math.sin(n*Math.PI/180),i=Math.cos(n*Math.PI/180),e=[[t,0],[t,a],[0,a]].map(([t,a])=>[i*t-r*a,r*t+i*a]),o=Math.min(0,...e.map(([t])=>t)),m=Math.max(0,...e.map(([t])=>t)),h=Math.min(0,...e.map(([,t])=>t)),l=Math.max(0,...e.map(([,t])=>t));return{horizontal:Math.min(Math.abs(m-o),p),vertical:Math.min(Math.abs(l-h),p)}}function k(t,a,n,r){const{width:i,height:e}=t,o=W(a,n,r),m=Math.sqrt(i*i+e*e);if(m<=0)return o.vertical??o.horizontal??null;if(i>=e){const t=o.vertical;return null==t||e<=0?null:2*Math.atan(Math.tan(t*Math.PI/360)*m/e)*180/Math.PI}const h=o.horizontal;return null==h||i<=0?null:2*Math.atan(Math.tan(h*Math.PI/360)*m/i)*180/Math.PI}function U(t,a,r=d,i=0){const e=t.camera.position,{horizontal:l,vertical:s}=D(t),c=e.spatialReference.isWebMercator?h(e.y):1,M=o({cameraLocation:e,farDistance:a,horizontalFieldOfView:l,rotationMatrix:m([t.camera.heading,t.camera.tilt,i]),scalingFactor:c,verticalFieldOfView:s}),x=[];for(let o=0;o<M.length;o+=1){const t=M[o],a=M[(o+1)%M.length];for(let i=0;i<r;i+=1){const o=i/r;x.push(new n({x:t[0]+(a[0]-t[0])*o,y:t[1]+(a[1]-t[1])*o,z:t[2]+(a[2]-t[2])*o,spatialReference:e.spatialReference}))}}return x}async function V(a,n,o,m,h){if("3d"!==n.type)return null;const{cameraRoll:l,farDistance:s}=a.attributes;if("number"!=typeof s||!Number.isFinite(s)||s<=0)return null;const c=U(n,s,w,l??0),M=await m(c,h);t(h);const x=M.filter(({x:t,y:a})=>Number.isFinite(t)&&Number.isFinite(a));if(x.length<4)return null;const[f,u]=o,y=new r({rings:[[[0,0],[f,0],[f,u],[0,u],[0,0]]],spatialReference:i.WebMercator}),g=new r({rings:[[...x.map(({x:t,y:a})=>[t,a]),[x[0].x,x[0].y]]],spatialReference:i.WebMercator}),p=e(g,y),d=p?p.rings.flatMap(t=>t.map(([t,a])=>({x:t,y:a}))):x;if(!d.length)return null;const I=d.map(({x:t})=>Math.max(0,Math.min(f,t))),b=d.map(({y:t})=>Math.max(0,Math.min(u,t)));return E({xmin:Math.floor(Math.max(0,Math.min(...I))),xmax:Math.ceil(Math.min(f,Math.max(...I))),ymin:Math.floor(Math.max(0,Math.min(...b))),ymax:Math.ceil(Math.min(u,Math.max(...b)))},f,u)}async function C(a,n,r,i,e){if("3d"!==n.type)return null;const{farDistance:o}=a.attributes;if("number"!=typeof o||!Number.isFinite(o)||o<=0)return null;const m=o,[h,l]=r,s=U(n,m),c=await i(s,e);t(e);const M=c.filter(({x:t,y:a})=>Number.isFinite(t)&&Number.isFinite(a));if(M.length<4)return null;const x=B(M,l);if(!x)return null;const f=H(M.map(({x:t})=>G(t,h)),h),u=h-f.gap;return u<=0?null:u>=h-v?[{xmin:0,xmax:h,ymin:x.ymin,ymax:x.ymax}]:J(f,h,x)}function E(t,a,n){const r=Math.max(g,t.xmax-t.xmin),i=Math.max(g,t.ymax-t.ymin),e=Math.max(I,Math.round(r*b)),o=Math.max(I,Math.round(i*b)),m=Math.floor(Math.max(0,t.xmin-e)),h=Math.ceil(Math.min(a,t.xmax+e)),l=Math.floor(Math.max(0,t.ymin-o)),s=Math.ceil(Math.min(n,t.ymax+o));return h>m&&s>l?{xmin:m,xmax:h,ymin:l,ymax:s}:null}function B(t,a){const n=t.map(({y:t})=>Math.max(0,Math.min(a,t))),r=Math.floor(Math.max(0,Math.min(...n))),i=Math.ceil(Math.min(a,Math.max(...n)));return i>r?{ymin:r,ymax:i}:null}function G(t,a){return(t%a+a)%a}function H(t,a){const n=t.slice().sort((t,a)=>t-a);let r=-1,i=0,e=0;for(let o=0;o<n.length;o+=1){const t=n[o],m=o===n.length-1?n[0]+a:n[o+1],h=m-t;h>r&&(r=h,i=t,e=m)}return{gap:r,start:i,end:e}}function J(t,a,n){const r=G(t.end,a),i=G(t.start,a);return r<=i?[{xmin:Math.floor(r),xmax:Math.ceil(i),...n}]:[{xmin:0,xmax:Math.ceil(i),...n},{xmin:Math.floor(r),xmax:a,...n}].filter(({xmin:t,xmax:a})=>a>t)}function K(t,a,n=P){const[r,i]=t,e=a?Math.max(g,a.xmax-a.xmin):r,o=a?Math.max(g,a.ymax-a.ymin):i;if(e<=0||o<=0)return{columns:F,rows:F};const m=e/o;return m>=1?{columns:n,rows:Math.max(F,Math.round(n/m))}:{columns:Math.max(F,Math.round(n*m)),rows:n}}export{N as applySphereMeshOffsetInMeters,q as clampRasterLevelForTextureSize,V as computeDefaultAreaOfInterest,C as computePanoramicAreasOfInterest,U as createFarplaneSamplePoints,j as createSuperimposeGridVertexAttributes,R as createSuperimposeSamplePixels,O as getBaseRasterLevel,k as getDefaultSuperimposeFov,W as getEffectiveImageFieldOfView,S as getRasterFetchParameters,A as getRasterLevelSize,D as getViewCameraFieldOfView,L as getViewDependentRasterLevel,u as panoramicSuperimposeKeyboardAngleStep,s as panoramicSuperimposeMaxFov,f as panoramicSuperimposeMaxTilt,l as panoramicSuperimposeMinFov,x as panoramicSuperimposeMinTilt,c as panoramicSuperimposeZoomInFactor,M as panoramicSuperimposeZoomOutFactor};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as e}from"tslib";import{prefersRTL as t,substitute as i}from"../intl.js";import{prefersReducedMotion as a}from"../core/a11yUtils.js";import{createTask as s}from"../core/asyncUtils.js";import o from"../core/Collection.js";import{deprecateWidget as n,deprecatedProperty as r}from"../core/deprecate.js";import l from"../core/Logger.js";import{isAbortError as d}from"../core/promiseUtils.js";import{watch as c,initial as g,syncAndInitial as h,on as m,sync as u}from"../core/reactiveUtils.js";import{throttle as p}from"../core/throttle.js";import{property as v,subclass as y}from"../core/accessorSupport/decorators.js";import{or as w}from"../layers/orientedImagery/transformations/utils.js";import _ from"./Expand.js";import M from"./PanoramicVideoViewer.js";import T from"./PanoramicViewer.js";import b from"./Widget.js";import{getAllArcPath as C}from"./OrientedImageryViewer/arcUtils.js";import{getDelegatedEvents as f,defaultImageGeometryField as I,defaultOIObjectIDField as S,segmentArcs as A,featureCircleRadius as k,navigationToolDimensionLength as V,sectorsRadii as L}from"./OrientedImageryViewer/constants.js";import{css as E,navigation as O,navigationToolRotationFrom as P,navigationToolRotationTo as F,root as x}from"./OrientedImageryViewer/css.js";import{isFeatureAttachment as G,loadImageForAttachment as N,getThumbnailPixelBlock as D,renderImageWithRotation as H}from"./OrientedImageryViewer/galleryUtils.js";import j from"./OrientedImageryViewer/OrientedImageryViewerViewModel.js";import B from"./OrientedImageryViewer/OrientedImageryViewerVisibleElements.js";import{loadAlertComponents as $,Alert as R}from"./OrientedImageryViewer/components/Alert.js";import W from"./OrientedImageryViewer/components/ImageLocationWidget.js";import q from"./OrientedImageryViewer/components/ImageViewer.js";import U from"./OrientedImageryViewer/components/NavigationUI.js";import Z from"./OrientedImageryViewer/components/NavigationUI360.js";import{loadSequentialNavigationUIComponents as z,SequentialNavigationUI as J}from"./OrientedImageryViewer/components/SequentialNavigationUI.js";import{loadVideoEnhancementComponents as K,renderEnhancementSlider as Q,VideoEnhancementTools as X}from"./OrientedImageryViewer/components/VideoEnhancementTools.js";import{NoImageLoadedError as Y}from"./OrientedImageryViewer/navigation/errors.js";import{loadCalciteComponents as ee}from"./support/componentsUtils.js";import{globalCss as te}from"./support/globalCss.js";import{iconByKind as ie}from"./support/iconUtils.js";import{vmEvent as ae,messageBundle as se,tsx as oe}from"./support/widget.js";const ne={overlayed:"overlayed"};let re=class extends b{constructor(e,t){super(e,t),this.dataCaptureEnabled=!1,this.galleryOpened=!1,this.imageEnhancementToolActive=!1,this.videoEnhancementToolActive=!1,this.imageOverlaysOpened=!1,this.navigationToolActive=!1,this.viewModel=new j,this.messagesCommon=null,this.messagesSketch=null,this.pixelMeasurementUnit="meters",this.pixelAreaMeasurementUnit="square-meters",this.selectedGroup=null,this.showCameraLocations=!1,this.showMapFeatures=!1,this.visibleElements=new B,this._defaultSuperimposeZOffsetPercentage=100,this._panoramicSuperimposeRadiusOffsetPercentage=100,this._imageOverlaysLoaderTask=null,this._imageMeasurementToolsLoaderTask=null,this._navigationSettingsLoaderTask=null,this._navigationTask=null,this._clearMeasurements=()=>{this.viewModel.measureType=null,this.viewModel.triangularMeasurementActive=!1,this.viewModel.displayNewMeasurementButton=!0,this.viewModel.clearPreviousMeasurements()},this._clearImageLocation=()=>{this.imageLocationToolActive=!1,this.triangularMeasurementActive=!1},this._createNavigationTask=async e=>(this._navigationTask?.abort(),this._navigationTask=s(async t=>await this.navigate({...e,signal:t})),this._navigationTask.promise),this._navigateNext=async()=>await this._createNavigationTask({step:1}),this._navigatePrevious=async()=>await this._createNavigationTask({step:-1}),this._navigationToolExpanded=!1,this._navigationTool=null,this._galleryController=new AbortController,this._galleryObserver=new IntersectionObserver(this._lazyLoadImage.bind(this)),this._overlayedLayers=new o,this._previousAction=null,this._closeImageSequenceAlert=()=>{this._set("noImageInSequenceError",!1)},this._handleDataCaptureLayerChange=async e=>{if(this.dataCaptureLayer&&await this.stopDataCapture(!0),this.dataCaptureLayer=this.dataCaptureLayer===e?null:e,this.dataCaptureLayer)return this.startDataCapture(this.dataCaptureLayer)},this._handleNavigationSettingsInputChange=(e,t)=>{this.set(`${e}Threshold`,t)},this._handleNavigationSettingsToggle=e=>{this.viewModel.preserveAngle=e},this._handleOverlayLayerDeselect=e=>{const t=e.layer;t===this.dataCaptureLayer&&(this.stopDataCapture(),this.dataCaptureLayer=null),this.removeOverlayedGraphicsOnImage(`${t.id}`)},this._handleOverlayLayerSelect=e=>{const t=e.layer;this.viewModel.overlayMapFeatures(t,this.showMapFeatures),this.addHandles(c(()=>t.visible,()=>{this.viewModel.toggleOverlayMapFeatures(t.id,t.visible,this.showMapFeatures)}),`${ne.overlayed}-${t.id}`)},this._highlight=e=>{const t=e.target?.dataset.objectid;t&&this.viewModel.highlight(t)},this._onAction=e=>{const{target:t}=e,{dataset:{action:i}}=t,{_previousAction:a}=this,s=a?.dataset.action,o=s?.includes("draw")??!1,n="select-feature"===s,r=s!==i;switch(i){case"draw-point":case"draw-polygon":case"draw-polyline":{a&&w(n,o&&r)&&(a.active=!1),t.active=!t.active;const e=i.replace("draw-","");this.viewModel.digitizeCreate(e),this._previousAction=t.active?t:null;break}case"save":this.viewModel.saveDrawing();break;case"select-feature":o&&(this._previousAction.active=!1),t.active=!t.active,this.viewModel.toggleSelection(t.active),this._previousAction=t.active?t:null;break;case"delete-feature":this.viewModel.digitizeDelete()}},this._onImageOverlayClosed=e=>{e.stopPropagation(),this.imageOverlaysOpened=!1},this._onShowCameraLocationsChanged=e=>{this.showCameraLocations=e},this._onShowMapFeaturesChanged=e=>{this.showMapFeatures=e},this._removeHighlight=()=>this.viewModel.removeHighlight(),this._restoreOverlays=async()=>Promise.all(this._overlayedLayers.map(e=>this.viewModel.overlayMapFeatures(e,this.showMapFeatures))),this._scaleNavigationTool=()=>{this._navigationToolExpanded=!this._navigationToolExpanded},this._sketchLoaderTask=null,this._settingsToggle=null,this._toggleImageNavigation=async e=>{const t=this.navigationMode;this._closeAllImageTools(),this.navigationMode=t!==e?e:null;const{activeViewer:i}=this.viewModel;if(!i)return;const{mode:a,preserveAngle:s}=this.viewModel;if("default"===a)if("directional"===this.navigationMode){const e=await this._loadNavigationSettings(),t="heading"===s||"both"===s,i="pitch"===s||"both"===s,{messages:a,messagesCommon:o}=this,n=new e({cameraHeadingThreshold:this.cameraHeadingThreshold,cameraPitchThreshold:this.cameraPitchThreshold,uiStrings:{configureNavigation:a.configureNavigation,preserveHeading:a.preserveHeading,preserveHeadingDescription:a.preserveHeadingDescription,preservePitch:a.preservePitch,preservePitchDescription:a.preservePitchDescription,settings:o.settings,thresholdLabel:a.thresholdLabel},onInputChange:this._handleNavigationSettingsInputChange,onToggle:this._handleNavigationSettingsToggle,preserveHeading:t,preservePitch:i});this._settingsToggle=new _({content:n,expandIcon:"configure"}),this.viewModel.activeViewer?.ui.add(this._settingsToggle,{position:"top-left"})}else this._settingsToggle&&(this._settingsToggle.expanded=!1,this.viewModel.activeViewer?.ui.remove(this._settingsToggle))},this._toggleImageAttributes=p(this.viewModel.toggleImageAttributes.bind(this.viewModel)),this.navigate=async e=>{let t=null;try{const{currentNode:i}=this.viewModel;if(!i)throw new Y;t=await this.viewModel.navigate(i,e)}catch(i){d(i)||l.getLogger(this).error("Error occurred while navigating",i),["NoImageInSequenceError","NoSequenceFoundError"].includes(i.name)&&this._set("noImageInSequenceError",!0)}return t},this.reset=()=>{this._closeAllImageTools(),this.viewModel.reset()},this._loadImageFromGallery=this._loadImageFromGallery.bind(this),this._registerGalleryItem=this._registerGalleryItem.bind(this),this._unregisterGalleryItem=this._unregisterGalleryItem.bind(this),this.loadImageFromSource=this.loadImageFromSource.bind(this),this.updateSuitabilities=this.updateSuitabilities.bind(this),this._handleVideoBrightnessChange=this._handleVideoBrightnessChange.bind(this),this._handleVideoContrastChange=this._handleVideoContrastChange.bind(this),this._handleBrightnessChange=this._handleBrightnessChange.bind(this),this._handleContrastChange=this._handleContrastChange.bind(this),this._handleSharpnessChange=this._handleSharpnessChange.bind(this),this._handleSuperimposeZOffsetChange=this._handleSuperimposeZOffsetChange.bind(this),this._toggleSuperimposeCameraLock=this._toggleSuperimposeCameraLock.bind(this),this._resetSuperimposeOffset=this._resetSuperimposeOffset.bind(this),this._resetVideoTools=this._resetVideoTools.bind(this),this._toggleEnhancementToolState=this._toggleEnhancementToolState.bind(this),this.announceDeprecation=()=>{n(l.getLogger(this),"Oriented Imagery Viewer","arcgis-oriented-imagery-viewer",{version:"5.0"})}}initialize(){this.addHandles([c(()=>[this.viewModel?.bestFeatureAngle,this._navigationTool],([e,t])=>{t&&this._updateNavigationTool(t)},g),c(()=>this.currentCoverageVisible,e=>this._onCurrentCoverageVisibilityChange(e)),c(()=>this.isAdditionalCoverageVisible,e=>this._onAdditionalCoverageVisibilityChange(e)),c(()=>this.isAdditionalPointSourcesVisible,e=>this._onAdditionalCameraLocationsVisibility(e)),c(()=>this.superimposeViewEnabled,e=>{e?(this._closeAllImageTools(),this.selectedGroup=null,this.shouldShowSelectedImage=!1,this.verticalFilterEnabled=!1):this._resetSuperimposeOffset()}),c(()=>({features:this.currentBestFeature,overlaysEnabled:this._imageOverlaysEnabled,showCameraLocations:this.showCameraLocations}),({overlaysEnabled:e,showCameraLocations:t})=>{e&&this.viewModel.overlayCameraLocations(t)},h),c(()=>({feature:this.currentBestFeature,overlaysEnabled:this._imageOverlaysEnabled,showMapFeatures:this.showMapFeatures}),async(e,t)=>{e.showMapFeatures!==t?.showMapFeatures&&await this.viewModel.toggleAllOverlayMapFeatures(e.showMapFeatures);const i=e.feature&&e.feature!==t?.feature,a=!e.overlaysEnabled&&!!t?.overlaysEnabled,s=e.overlaysEnabled&&!t?.overlaysEnabled,o="video"===this.viewModel.mode||"panoramic-video"===this.viewModel.mode;if(a&&o)return this.viewModel.removeAllOverlayMapFeatures(),void("video"===this.viewModel.mode&&this.viewModel.videoViewModel?.clearOverlayGraphics());(i||s)&&(i&&this.viewModel.removeAllOverlayMapFeatures(),e.overlaysEnabled&&(this.dataCaptureLayer&&this.stopDataCapture(),await this._restoreOverlays(),this.dataCaptureLayer&&(await this.startDataCapture(this.dataCaptureLayer),this._previousAction?.active&&(this._previousAction.active=!1,this._previousAction=null))))},g),m(()=>this.viewModel,"popup-open",async e=>{await(this.view?.openPopup(e))},u),m(()=>this.viewModel,"popup-close",()=>{this.view?.closePopup()},u),this._toggleImageAttributes])}loadDependencies(){return Promise.all([K(),z(),ee({"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group"),action:()=>import("@esri/calcite-components/dist/components/calcite-action"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),shell:()=>import("@esri/calcite-components/dist/components/calcite-shell"),dialog:()=>import("@esri/calcite-components/dist/components/calcite-dialog"),slider:()=>import("@esri/calcite-components/dist/components/calcite-slider"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice")}),$()])}destroy(){this._galleryController.abort(),this._galleryObserver.disconnect(),this.currentBestFeature=null}get accuracyParametersMissing(){return this.viewModel.accuracyParametersMissing}get activeLayer(){return r(l.getLogger(this),"activeLayer",{replacement:"layer"}),this.layer}set activeLayer(e){r(l.getLogger(this),"activeLayer",{replacement:"layer"}),this.layer=e}get activeVideoIcon(){const{videoElement:e,videoViewModel:t}=this.viewModel;return e?.loaded&&t?t.videoPaused?"play":"pause":"play"}get activeAudioIcon(){const{videoElement:e,videoViewModel:t}=this.viewModel;return e?.loaded&&t?.videoMuted?"sound-off":"sound"}get cameraHeadingThreshold(){return this.viewModel.cameraHeadingThreshold}set cameraHeadingThreshold(e){this.viewModel.cameraHeadingThreshold=e}get cameraPitchThreshold(){return this.viewModel.cameraPitchThreshold}set cameraPitchThreshold(e){this.viewModel.cameraPitchThreshold=e}get canNavigateSequentially(){return!!this.layer?.effectiveSequenceOrderField?.length}get currentBestFeature(){return this.viewModel.currentBestFeature}set currentBestFeature(e){this.viewModel.currentBestFeature=e}get currentCoverageVisible(){return this.viewModel.currentCoverageVisible}set currentCoverageVisible(e){this.viewModel.currentCoverageVisible=e}get dataCaptureLayer(){return this.viewModel.dataCaptureLayer}set dataCaptureLayer(e){this.viewModel.dataCaptureLayer=e}get depthImageNotSupported(){return this.viewModel.depthImageNotSupported}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get displayMessage(){return this.viewModel.displayMessage}get enhancementToolActive(){return"video"===this.viewModel.mode?this.videoEnhancementToolActive:this.imageEnhancementToolActive}set enhancementToolActive(e){"video"===this.viewModel.mode?this.videoEnhancementToolActive=e:this.imageEnhancementToolActive=e}get features(){return this.viewModel.features}get imagePointsInView(){return this.viewModel.imagePointsInView}get icon(){return"oriented-imagery-widget"}set icon(e){this._overrideIfSome("icon",e)}get imageGalleryEnabled(){return this.viewModel.imageGalleryEnabled}get imageLocationToolActive(){return this.viewModel.imageLocationToolState}set imageLocationToolActive(e){this.viewModel.imageLocationToolState=e}get invalidCameraHeading(){return this.viewModel.invalidCameraHeading}get isAdditionalCoverageVisible(){return this.viewModel.isAdditionalCoverageVisible}set isAdditionalCoverageVisible(e){this.viewModel.isAdditionalCoverageVisible=e}get isAdditionalPointSourcesVisible(){return this.viewModel.isAdditionalPointSourcesVisible}set isAdditionalPointSourcesVisible(e){this.viewModel.isAdditionalPointSourcesVisible=e}get mapImageConversionToolState(){return this.viewModel.mapImageConversionToolState}set mapImageConversionToolState(e){this.viewModel.setMapImageConversionToolState(e)}get measureType(){return this.viewModel.measureType}set measureType(e){this.viewModel.measureType=e}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get navigationMode(){return this.viewModel.navigationMode}set navigationMode(e){this.viewModel.navigationMode=e}get popupEnabled(){const{popupEnabled:e,state:t}=this.viewModel;return("image-loaded"===t||this.videoLoaded)&&e}get preloadMedia(){return this.viewModel.preloadMedia}set preloadMedia(e){this.viewModel.preloadMedia=e}get referencePoint(){return this.viewModel.referencePoint??null}get sketchViewModel(){return this.viewModel.sketch}get triangularMeasurementActive(){return this.viewModel.triangularMeasurementActive}set triangularMeasurementActive(e){this.viewModel.triangularMeasurementActive=e}get videoLoaded(){const{mode:e,videoElement:t,panoramicVideoLoaded:i}=this.viewModel;return("video"===e&&!0===t?.loaded||i)??!1}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}set determineWorkflowForFeature(e){this.viewModel.determineWorkflowForFeature=e}get determineWorkflowForFeature(){return this.viewModel.determineWorkflowForFeature}get shouldShowSelectedImage(){return this.viewModel.shouldShowSelectedImage}set shouldShowSelectedImage(e){this.viewModel.shouldShowSelectedImage=e}get superimposeViewEnabled(){return this.viewModel.superimposeViewEnabled}set superimposeViewEnabled(e){this.viewModel.superimposeViewEnabled=e}get defaultSuperimposeCameraLockEnabled(){return this.viewModel.defaultSuperimposeCameraLockEnabled}set defaultSuperimposeCameraLockEnabled(e){this.viewModel.defaultSuperimposeCameraLockEnabled=e}set updateFootprint(e){this.viewModel.updateFootprint=e}get updateFootprint(){return this.viewModel.updateFootprint}get verticalFilterEnabled(){return this.viewModel.verticalFilterEnabled}set verticalFilterEnabled(e){this.viewModel.verticalFilterEnabled=e}_renderActionBar(){const{selectedGroup:e,superimposeViewEnabled:i}=this;if(i)return oe("calcite-action-bar",{expandDisabled:!0,layout:"horizontal",slot:"action-bar"},oe("calcite-action-group",null,this._superimposeViewToggle()));const a=t();return oe("calcite-action-bar",{expandDisabled:!0,layout:"horizontal",slot:"action-bar"},!e&&oe("calcite-action-group",null,this._searchGroupToggle(),this._overlaysGroupToggle(),this._navigationGroupToggle(),this._measurementsGroupToggle(),this._utilitiesGroupToggle()),this._renderGroupBackAction(a),"overlays"===e&&oe("calcite-action-group",null,this._currentFootprintToggle(),this._additionalFootprintToggle(),this._additionalPointSourcesToggle(),this._mapImageConversionToggle(),this._imageOverlaysToggle()),"navigation"===e&&oe("calcite-action-group",null,this._directionToolsToggle(),this._navigationToolToggle(),this._imageGalleryToggle()),"measurements"===e&&oe("calcite-action-group",null,this._measurementToolToggle()),"utilities"===e&&oe("calcite-action-group",null,this._imageEnhancementsToggle(),this._videoEnhancementsToggle(),this._superimposeViewToggle(),this._openPopupAction()),"search"===e&&oe("calcite-action-group",null,this._exploreImagesToggle(),this._exploreImages3DToggle(),this._showSelectedImageToggle()))}_renderGroupBackAction(e){return this.selectedGroup?oe("calcite-action",{bind:this,icon:e?"arrow-right":"arrow-left",key:"back-arrow",text:this.messages.previous,title:this.messages.previous,onclick:()=>this._toggleGroupSelection(null)}):null}get _activeMeasurementHeading(){const{measureType:e,messages:t,triangularMeasurementActive:i}=this,{groundArea:a,heightAboveGround:s,groundDistance:o,triangulatedAreaHeading:n,triangulatedDistanceHeading:r}=t;if(i)return"area"===e?n:r;switch(e){case"area":return a;case"height":return s;default:return o}}_additionalFootprintToggle(){const{isAdditionalCoverageVisible:e,invalidCameraHeading:t,visibleElements:{additionalFootprintToggle:i}}=this;return i?oe("calcite-action",{active:e,bind:this,class:E.addCoverage,disabled:t,icon:"trapezoid-area",text:this.messages.additionalFootprints,title:this.messages.additionalFootprints,onclick:this._toggleAdditionalCoverage}):null}_additionalPointSourcesToggle(){const{isAdditionalPointSourcesVisible:e,invalidCameraHeading:t,visibleElements:{additionalCameraLocationsToggle:i}}=this;return i?oe("calcite-action",{active:e,bind:this,class:E.addExpPoints,disabled:t,icon:"circle-area",text:this.messages.additionalCameraLocations,title:this.messages.additionalCameraLocations,onclick:this._toggleAdditionalCameraLocations}):null}get _measurementToggle(){const{viewModel:{state:e,measureType:t,currentBestFeatureMeasurementImage:i},triangularMeasurementActive:a,id:s}=this;if("image-loaded"!==e||!t||a&&!i)return;this._imageMeasurementToolsLoaderTask||this._loadImageMeasurementResources();const o=this._imageMeasurementToolsLoaderTask?.value;return o?oe("calcite-dialog",{bind:this,dragEnabled:!0,escapeDisabled:!0,heading:this._activeMeasurementHeading,id:`${s}-${t}-measurement`,open:!0,placement:"bottom-start",resizable:!0,scale:"s",slot:"dialogs",width:"s",onCalciteDialogBeforeClose:this._clearMeasurements},oe(o,{measurementType:t,measurementUnitMessages:this.measurementUnitMessages,messages:this.messages,oiViewModel:this.viewModel})):null}get _renderRoot(){const{viewModel:{state:e},triangularMeasurementActive:t}=this;return oe("calcite-panel",{bind:this,class:t?E.viewerContainerMeasurement:E.viewerContainer,heading:this.visibleElements.header?this.messages.title:void 0,loading:e.includes("loading")&&!t},this.visibleElements.menu?this._renderActionBar():null,oe("calcite-shell",null,oe("calcite-panel",null,this._imageViewer,this._panoramicViewer,this._panoramicVideoViewer,this._videoViewer,this._messageBox,this.invalidCameraHeading?null:[this._imageGalleryPanel,this._renderNavigation,this._imageOverlaysPanel()],this._imageEnhancementTools,this._videoEnhancementTools,this._superimposeTools,this._renderSketch(),this._navigationUI),this._imageViewerTriangular,this._measurementToggle,this._locationToggle,this.invalidCameraHeading?this._renderWarning(this.messages.invalidCameraHeadingWarningTitle,this.messages.invalidCameraHeadingWarningDescription):null,this.depthImageNotSupported?this._renderWarning(this.messages.depthImageNotSupportedTitle,this.messages.depthImageNotSupportedDescription):null,this.noImageInSequenceError?this._renderWarning(this.messages.sequentialNavigationWarning,this.messages.sequentialNavigationWarning,this._closeImageSequenceAlert):null))}_currentFootprintToggle(){const{currentCoverageVisible:e,invalidCameraHeading:t}=this,{currentFootprintToggle:i}=this.visibleElements;return i?oe("calcite-action",{active:e,bind:this,class:E.currentCoverage,disabled:t,icon:"trapezoid-area",text:this.messages.currentFootprint,title:this.messages.currentFootprint,onclick:this._toggleCurrentCoverage}):null}_exploreImagesToggle(){const{exploreImages:e}=this.messages;return this.visibleElements.exploreImages?oe("calcite-action",{active:!this.disabled,bind:this,icon:"oriented-imagery-widget",text:e,title:e,onclick:this._toggleExploreImages}):null}get _imageEnhancementTools(){const{enhancementToolActive:e,viewModel:{brightness:t,contrast:i,sharpness:a,state:s}}=this;return e&&"image-loaded"===s?oe("calcite-panel",{bind:this,class:E.imageEnhancementWrapper,closable:!0,closed:!e,heading:this.messages.imageEnhancement,key:this.messages.imageEnhancement,onCalcitePanelClose:this._toggleEnhancementToolState},oe("div",{class:E.imageEnhancementTools},Q({title:this.messages.brightness,value:t,handleChange:this._handleBrightnessChange}),Q({title:this.messages.contrast,value:i,handleChange:this._handleContrastChange}),Q({title:this.messages.sharpness,value:a,max:1,min:0,ticks:.5,step:.1,handleChange:this._handleSharpnessChange})),oe("calcite-action",{bind:this,icon:"reset",slot:"header-actions-end",text:this.messagesCommon.reset,title:this.messagesCommon.reset,onclick:this._resetImageTools})):null}get _videoEnhancementTools(){const{enhancementToolActive:e,viewModel:{videoViewModel:t,mode:i},messages:{videoEnhancement:a,brightness:s,contrast:o},messagesCommon:{reset:n}}=this;return e&&"video"===i&&t?oe(X,{brightness:t.videoBrightness,constrast:t.videoContrast,handleBrightnessChange:this._handleVideoBrightnessChange,handleContrastChange:this._handleVideoContrastChange,resetTools:this._resetVideoTools,uiStrings:{videoEnhancement:a,brightness:s,contrast:o,reset:n},videoEnhancementToolActive:e,onClose:this._toggleEnhancementToolState}):null}get _superimposeTools(){const{superimposeViewEnabled:e,view:t,viewModel:{state:i,mode:a},messages:{superimposeSettings:s,superimposeSliderTitle:o,superimposeSliderTooltip:n}}=this,r="panoramic"===a;return e&&"3d"===t?.type&&"image-loaded"===i?oe("calcite-panel",{bind:this,class:this.classes(E.imageEnhancementWrapper,E.superimposeTools),heading:s,key:"superimpose-settings"},oe("div",{class:E.imageEnhancementTools},Q({title:o,tooltip:n,value:r?this._panoramicSuperimposeRadiusOffsetPercentage:this._defaultSuperimposeZOffsetPercentage,max:100,min:0,ticks:10,step:1,handleChange:this._handleSuperimposeZOffsetChange})),oe("calcite-action",{bind:this,icon:"reset",slot:"header-actions-end",text:this.messagesCommon.reset,title:this.messagesCommon.reset,onclick:this._resetSuperimposeOffset})):null}_imageEnhancementsToggle(){const{state:e,mode:t}=this.viewModel,{enhancementTool:i}=this.visibleElements;return i&&"video"!==t?oe("calcite-action",{active:this.enhancementToolActive,bind:this,disabled:"default"!==t||"image-loaded"!==e,icon:"sliders-horizontal",text:this.messages.imageEnhancement,title:this.messages.imageEnhancement,onclick:this._toggleEnhancementToolState}):null}_exploreImages3DToggle(){const{exploreImages3D:e}=this.messages,t="3d"!==this.view?.type||!this.layer?.verticalSearchRange;return this.visibleElements.exploreImages3D?oe("calcite-action",{active:this.verticalFilterEnabled,bind:this,disabled:t,icon:"i3DSearch",text:e,title:e,onclick:this._toggleVerticalSearchFilter}):null}_showSelectedImageToggle(){const{displayImages:e}=this.messages,t=this.viewModel.mode.includes("video");return this.visibleElements.showSelectedImage?oe("calcite-action",{active:this.shouldShowSelectedImage,bind:this,disabled:t,icon:"show-oriented-imagery",text:e,title:e,onclick:this._toggleShowSelectedImage}):null}_superimposeViewToggle(){const{superimposeView:e}=this.messages,{mode:t,accuracyParametersMissing:i}=this.viewModel,a=!this.superimposeViewEnabled&&("3d"!==this.view?.type||t.includes("video")||i);return this.visibleElements.superimpose?oe("calcite-action",{active:this.superimposeViewEnabled,bind:this,disabled:a,icon:"superimpose",text:e,title:e,onclick:this._toggleSuperimposeView}):null}_videoEnhancementsToggle(){const{mode:e}=this.viewModel,{videoEnhancement:t}=this.messages,{enhancementTool:i}=this.visibleElements;return i&&"video"===e?oe("calcite-action",{active:this.enhancementToolActive,bind:this,disabled:"video"!==e,icon:"sliders-horizontal",text:t,title:t,onclick:this._toggleEnhancementToolState}):null}get _imageGalleryPanel(){const{container:e,galleryOpened:t,imageGalleryEnabled:i}=this;return i&&t&&e?this._imageGalleryContext:null}get _imageGalleryContext(){const{galleryOpened:e,invalidCameraHeading:t}=this;return oe("calcite-panel",{bind:this,class:E.carousel,closable:!0,closed:!e,disabled:t,heading:this.messages.imageGallery,key:this.messages.imageGallery,onCalcitePanelClose:this._toggleImageGallery},oe("div",{class:E.carouselContainer},this._renderThumbnails))}_imageGalleryToggle(){const{imageGalleryEnabled:e,invalidCameraHeading:t,visibleElements:{imageGallery:i}}=this;return i?oe("calcite-action",{active:this.galleryOpened,bind:this,disabled:!e||t,icon:"images",text:this.messages.imageGallery,title:this.messages.imageGallery,onclick:this._toggleImageGallery}):null}get _imageOverlaysComponent(){const{_imageOverlayMessages:e,_imageOverlaysLoaderTask:t,_overlayedLayers:i,dataCaptureEnabled:a,dataCaptureLayer:o,imageOverlaysOpened:n,showCameraLocations:r,showMapFeatures:l,view:d,layer:c}=this,g=a&&!this.viewModel.mode.includes("video");if(!c)return null;const h=c.imageGeometryField?.length?c.imageGeometryField:I,m=c.imageReferenceField?.length?c.imageReferenceField:S;t||(this._imageOverlaysLoaderTask=s(async()=>(await import("./OrientedImageryViewer/components/ImageOverlays.js")).default));const u=this._imageOverlaysLoaderTask?.value;return u?oe(u,{closed:!n,dataCaptureEnabled:g,dataCaptureLayer:o,imageGeometryField:h,imageReferenceField:m,messages:e,overlayedLayers:i,showCameraLocations:r,showMapFeatures:l,view:d,onDataCaptureLayerChanged:this._handleDataCaptureLayerChange,onFilterCapturedFeatures:this.viewModel.filterCapturedFeatures,onImageOverlaysClosed:this._onImageOverlayClosed,onLayerDeselected:this._handleOverlayLayerDeselect,onLayerSelected:this._handleOverlayLayerSelect,onShowCameraLocationsChanged:this._onShowCameraLocationsChanged,onShowMapFeaturesChanged:this._onShowMapFeaturesChanged}):null}get _navigationUI(){const{navigationMode:e,viewModel:t}=this,{mode:i,state:a}=t;if(e&&("default"===i||"panoramic"===i)&&"image-loaded"===a)return"directional"===e?"default"===i?oe(U,{cameraHeadingThreshold:this.cameraHeadingThreshold,cameraPitchThreshold:this.cameraPitchThreshold,currentNode:this.viewModel.currentNode,navigate:this._createNavigationTask,nodes:this.viewModel.navigationNodes,preserveAngle:this.viewModel.preserveAngle}):oe(Z,{currentNode:this.viewModel.currentNode,navigate:this._createNavigationTask,nodes:this.viewModel.navigationNodes}):oe(J,{layout:"horizontal",uiStrings:{end:this.messages.end,next:this.messages.next,previous:this.messages.previous,start:this.messages.start},onNext:this._navigateNext,onPrev:this._navigatePrevious})}get _imageOverlayMessages(){return{...this.messages,...this.messagesSketch}}get _imageSketchToolsMessages(){return{...this.messagesCommon,...this.messagesSketch}}_imageOverlaysPanel(){const{imageOverlaysOpened:e}=this,t=this.classes({[E.imageOverlaysContainer]:!0,[te.hidden]:!e||!this._imageOverlaysEnabled});return oe("div",{class:t,key:this.messages.imageOverlays},this._imageOverlaysComponent)}_imageOverlaysToggle(){const{imageOverlaysOpened:e,invalidCameraHeading:t,visibleElements:{imageOverlays:i}}=this;return i?oe("calcite-action",{active:e,bind:this,disabled:!this._imageOverlaysEnabled||t,icon:"layers",text:this.messages.imageOverlays,title:this.messages.imageOverlays,onclick:this._toggleImageOverlays}):null}get _imageOverlaysEnabled(){return this.viewModel.overlayGraphicsEnabled}get _imageViewer(){const{displayMessage:e,loadImageViewer:t,mode:i,clickAction:a,state:s}=this.viewModel,o=null!=e||"default"!==i||s.includes("loading");return oe(q,{afterCreate:t,clickAction:a,visible:!o})}get _imageViewerTriangular(){const{messages:e,triangularMeasurementActive:t}=this,{displayMessage:i,storeImageMeasurementViewer:a,storePanoramicMeasurementViewer:s,mode:o,state:n,clickAction:r}=this.viewModel,l=null!=i||"none"===o||"video"===o,d=this.classes({[E.viewer]:!l,[E.viewerHidden]:l});return t?oe("calcite-panel",{class:E.viewerContainerMeasurement,heading:e.measurementViewerHeading,loading:n.includes("loading")},oe("calcite-panel",{bind:this,class:d},"default"===o?oe(q,{afterCreate:a,clickAction:r,uiStrings:e}):oe(T,{afterCreate:s,clickAction:r,uiStrings:e}))):null}_utilitiesGroupToggle(){const{utilityTools:e}=this.messages;return this.visibleElements.utilityTools?oe("calcite-action",{bind:this,icon:"tools",key:"utilities-group-toggle",text:e,title:e,onclick:()=>this._toggleGroupSelection("utilities")}):null}_searchGroupToggle(){const{searchTools:e}=this.messages;return this.visibleElements.searchTools?oe("calcite-action",{bind:this,icon:"search",key:"search-group-toggle",text:e,title:e,onclick:()=>this._toggleGroupSelection("search")}):null}get _videoViewer(){const{mode:e,loadVideoViewer:t,videoViewModel:i}=this.viewModel,{control:a,reset:s}=this.messagesCommon,{mute:o,unmute:n}=this.messages,r="video"!==e,l=this.classes({[E.viewer]:!r,[E.viewerHidden]:r}),d="esri-image-viewer",c=`${d}__slider-container`;return oe("calcite-panel",{bind:this,class:l},oe("calcite-panel",{afterCreate:t,class:this.classes(te.widget,d)}),oe("calcite-block",{class:c,expanded:!0},oe("calcite-slider",{bind:this,labelHandles:!0,labelTicks:!0,max:i?.videoDuration,minLabel:"0",value:i?.currentTime??0,onCalciteSliderChange:this._handleVideoSeek})),oe("calcite-action-bar",{expandDisabled:!0,layout:"horizontal"},oe("calcite-action-group",null,oe("calcite-action",{bind:this,icon:this.activeVideoIcon,text:"Play",title:i?.videoPaused?a.play:a.pause,onclick:()=>i?.playVideoHandler()})),oe("calcite-action-group",null,oe("calcite-action",{bind:this,icon:"refresh",text:"Rewind",title:s,onclick:()=>i?.rewindVideoHandler()})),oe("calcite-action-group",null,oe("calcite-action",{bind:this,icon:this.activeAudioIcon,text:"Audio",title:i?.videoMuted?o:n,onclick:()=>i?.toggleAudio()}))))}get _locationToggle(){const{viewModel:{state:e,groundCoordinates:t,groundCoordinatesAccuracy:i,triangulatedPoint:a},imageLocationToolActive:s,triangularMeasurementActive:o,messages:{groundLocation:n,triangulatedLocationHeading:r}}=this;if("image-loaded"!==e||!t||!s)return;let l=t;if(o){if(!a)return;l=a}return oe("calcite-dialog",{bind:this,dragEnabled:!0,escapeDisabled:!0,heading:o?r:n,id:n,open:!0,placement:"bottom-start",resizable:!0,scale:"s",slot:"dialogs",width:"s",onCalciteDialogBeforeClose:this._clearImageLocation},oe(W,{accuracy:i,groundCoordinates:l,messages:this.messages}))}_mapImageConversionToggle(){const{mapImageConversionToolState:e,viewModel:{state:t,disabled:i},videoLoaded:a,invalidCameraHeading:s,visibleElements:{mapImageConversionTool:o}}=this,n=!("video"!==this.viewModel.mode||!a||!this.viewModel.videoViewModel?.videoPaused),r="panoramic-video"===this.viewModel.mode&&this.viewModel.panoramicVideoLoaded&&this.viewModel.panoramicVideoPaused;return o?oe("calcite-action",{active:e,bind:this,disabled:"image-loaded"!==t&&!n&&!r||s||i,icon:"image-pin",text:this.messages.mapImageConversionTool,title:this.messages.mapImageConversionTool,onclick:this._toggleMapImageConversionToolState}):null}_measurementToolToggle(){const{measureType:e,viewModel:t,accuracyParametersMissing:i,messages:a,triangularMeasurementActive:s}=this,{state:o}=t,{groundDistance:n,groundArea:r,heightAboveGround:l,groundLocation:d,triangulatedDistanceHeading:c,triangulatedAreaHeading:g,triangulatedLocationHeading:h}=a,m="image-loaded"!==o||i;return oe("calcite-action-group",{key:"measurement-tools",scale:"m"},oe("calcite-action",{active:"distance"===e&&!s,bind:this,disabled:m,icon:"measure-line",key:"distance-measurement",text:n,title:n,onclick:e=>this._toggleMeasurementSketch(e,"distance")}),oe("calcite-action",{active:"area"===e&&!s,bind:this,disabled:m,icon:"measure-area",key:"area-measurement",text:r,title:r,onclick:e=>this._toggleMeasurementSketch(e,"area")}),oe("calcite-action",{active:"height"===e,bind:this,disabled:m,icon:"measure-building-height-top-base",key:"height-measurement",text:l,title:l,onclick:e=>this._toggleMeasurementSketch(e,"height")}),oe("calcite-action",{active:!!this.imageLocationToolActive&&!s,bind:this,disabled:m,icon:"pin-tear",key:"surface-location",text:d,title:d,onclick:this._toggleLocationTool}),oe("calcite-action",{active:!!s&&this.imageLocationToolActive,bind:this,disabled:m,icon:"dual-image-location",key:"triangular-location",text:h,title:h,onclick:this._toggleTriangularLocation}),oe("calcite-action",{active:!!s&&"distance"===this.measureType,bind:this,disabled:m,icon:"dual-image-distance",key:"triangular-distance",text:c,title:c,onclick:this._toggleTriangularDistanceMeasurements}),oe("calcite-action",{active:!!s&&"area"===this.measureType,bind:this,disabled:m,icon:"dual-image-area",key:"triangular-area",text:g,title:g,onclick:this._toggleTriangularAreaMeasurements}))}get _messageBox(){const{messages:e,viewModel:{displayMessage:t,mode:a}}=this;if(!t||"video"===a)return null;const{key:s,map:o,type:n}=t,r=`${o?i(e[s],o):e[s]}`,l="error"===n?"danger":"warn"===n?"warning":"info";return oe("calcite-notice",{appearance:"transparent",class:E.notice,icon:ie[l],kind:l,open:!0},oe("div",{slot:"message"},r))}async _loadNavigationSettings(){return this._navigationSettingsLoaderTask||(this._navigationSettingsLoaderTask=s(async()=>(await import("./OrientedImageryViewer/components/NavigationSettings.js")).default)),await this._navigationSettingsLoaderTask.promise}_measurementsGroupToggle(){const{measurementTools:e}=this.messages,{state:t,accuracyParametersMissing:i}=this.viewModel,a="image-loaded"!==t||i;return this.visibleElements.measurementTools?oe("calcite-action",{bind:this,disabled:a,icon:"measure-line",key:"measurements-group-toggle",text:e,title:e,onclick:()=>this._toggleGroupSelection("measurements")}):null}_navigationGroupToggle(){const{imageNavigation:e}=this.messages;return this.visibleElements.imageNavigationTools?oe("calcite-action",{bind:this,icon:"absolute-direction",key:"navigation-group-toggle",text:e,title:e,onclick:()=>this._toggleGroupSelection("navigation")}):null}_navigationToolToggle(){const{state:e}=this.viewModel,{visibleElements:{navigationTool:t},videoLoaded:i}=this;return t?oe("calcite-action",{active:this.navigationToolActive,bind:this,disabled:"image-loaded"!==e&&!i||this.invalidCameraHeading,icon:"explore",text:this.messages.navigationTool,title:this.messages.navigationTool,onclick:this._toggleNavigationTool}):null}_directionToolsToggle(){const{messages:e,viewModel:t,visibleElements:i}=this,{directionalNavigation:a,sequentialNavigation:s}=i,{state:o}=t,{directionalNavigation:n,directionalNavigationDescription:r,sequentialNavigation:l,sequentialNavigationDescription:d}=e;return oe("calcite-action-group",{key:"navigation-tools",scale:"m"},a?oe("calcite-action",{active:"directional"===this.navigationMode,bind:this,disabled:"image-loaded"!==o||this.invalidCameraHeading,icon:"directional-navigation",text:r,title:n,onclick:()=>{this._toggleImageNavigation("directional")}}):null,s?oe("calcite-action",{active:"sequential"===this.navigationMode,bind:this,disabled:"image-loaded"!==o||this.invalidCameraHeading||!this.canNavigateSequentially,icon:"sequential-navigation",text:d,title:l,onclick:()=>{this._toggleImageNavigation("sequential")}}):null)}_overlaysGroupToggle(){const{overlays:e}=this.messages;return this.visibleElements.overlays?oe("calcite-action",{bind:this,icon:"oriented-imagery-overlays",key:"overlays-group-toggle",text:e,title:e,onclick:()=>this._toggleGroupSelection("overlays")}):null}_openPopupAction(){const{showPopupsAction:e}=this.visibleElements;return e?oe("calcite-action",{bind:this,disabled:!this.popupEnabled,icon:"popup",text:this.messages.showPopups,title:this.messages.showPopups,onclick:this._toggleImageAttributes}):null}get _panoramicVideoViewer(){const{displayMessage:e,loadPanoramicVideoViewer:t,mode:i,clickAction:a,state:s,currentBestFeature:o}=this.viewModel,n=o?.attributes.imagePath,r=null!=e||"panoramic-video"!==i||s.includes("loading")||!n;return oe(M,{afterCreate:t,clickAction:a,oiViewModel:this.viewModel,videoSource:n,visible:!r})}get _panoramicViewer(){const{displayMessage:e,loadPanoramicViewer:t,mode:i,clickAction:a,state:s}=this.viewModel,o=null!=e||"panoramic"!==i||s.includes("loading");return oe(T,{afterCreate:t,clickAction:a,visible:!o})}get noImageInSequenceError(){return this._get("noImageInSequenceError")??!1}_activateTriangulatedImageLocationTool(){this.navigationToolActive=!0,this.imageLocationToolActive=!0}_activateTriangulatedImageLocationWorkflow(e,t){this._closeAllImageTools(),this.imageLocationToolActive=!0,this.triangularMeasurementActive=!e,this.navigationToolActive=!!t||!t}_closeImageToolsAndToggleNavigation(e,t){this._closeAllImageTools(),this.triangularMeasurementActive=!e,this.navigationToolActive=!t}_resetMeasureTypeAndActivateImageLocationTool(){this.measureType=null,this.imageLocationToolActive=!0}_closeAllImageTools(){this.enhancementToolActive=!1,this.navigationToolActive=!1,this.imageOverlaysOpened=!1,this.galleryOpened=!1,this.measureType=null,this.imageLocationToolActive=!1,this.navigationMode=null,this.triangularMeasurementActive=!1,this._settingsToggle&&(this._settingsToggle.expanded=!1,this.viewModel.activeViewer?.ui.remove(this._settingsToggle))}_handleBrightnessChange(e){this.viewModel.brightness=e.currentTarget.value??0}_handleVideoBrightnessChange(e){this.viewModel.videoViewModel?.handleVideoBrightnessChange(e.target.value)}_handleContrastChange(e){this.viewModel.contrast=e.currentTarget.value??0}_handleVideoContrastChange(e){this.viewModel.videoViewModel?.handleVideoContrastChange(e.target.value)}_handleVideoSeek(e){const t=this.viewModel?.videoElement?.content;t&&(t.currentTime=e.target.value,t.play())}_handleSharpnessChange(e){this.viewModel.sharpness=e.currentTarget.value??0}_handleSuperimposeZOffsetChange(e){const t=e.currentTarget.value??0;if("default"===this.viewModel.mode)return this._defaultSuperimposeZOffsetPercentage=t,void this.viewModel.setDefaultSuperimposeZOffsetPercentage(100-t);this._panoramicSuperimposeRadiusOffsetPercentage=t,this.viewModel.setPanoramicSuperimposeRadiusPercentage(100-t)}_lazyLoadImage(e,t){e.forEach(async e=>{if(e.isIntersecting){const a=e.target,s=a.getAttribute("data-src"),o=a.getAttribute("data-rotation"),n=a.getAttribute("data-objectid"),r=o?parseFloat(o)%360:0,{layer:c,_galleryController:{signal:g}}=this;if(!s||!n)return;let h;try{h=G(s)?await N(c,n,{signal:g}):await D(s,{signal:g})}catch(i){d(i)||l.getLogger("esri.widgets.OrientedImageryViewer").error("#lazyLoadImage()",i)}finally{t.unobserve(a)}if(!h)return;H(h,a,r)}})}_loadImageFromGallery(e){const{target:t}=e;if(!t)return;const i=t.getAttribute("data-objectid");i&&this.viewModel.currentBestFeature?.attributes.objectId!==Number(i)&&this.viewModel.selectBestFeature(i)}_loadImageMeasurementResources(){this._imageMeasurementToolsLoaderTask=s(async()=>{const{default:e}=await import("./OrientedImageryViewer/components/ImageMeasurementWidget.js");return e})}_loadSketchResources(){this._sketchLoaderTask=s(async()=>(await import("./OrientedImageryViewer/components/SketchTools.js")).default)}_onAdditionalCoverageVisibilityChange(e){this.viewModel.setAdditionalCoverageVisibility(e)}_onAdditionalCameraLocationsVisibility(e){this.viewModel.setAdditionalCameraLocationsVisibility(e)}_onCurrentCoverageVisibilityChange(e){this.viewModel.setCurrentCoverageVisibility(e)}_registerGalleryItem(e){this._galleryObserver.observe(e)}_renderWarning(e,t,i){const{viewModel:{state:a}}=this;return"image-loaded"===a?oe(R,{icon:"exclamation-mark-triangle-f",kind:"warning",message:t,open:!0,title:e,tooltip:t,topLayerDisabled:this.topLayerDisabled,onClose:i}):null}get _renderNavigation(){const{viewModel:{sectorData:e,navigatorCurrentBestFeature:t,currentBestFeature:i,state:s}}=this;if(!this.container||!i)return null;let o,n,r,l,d;if(t){const{x:e,y:i,direction:a}=t,[s,c,g,h]=A[a];o=`M ${e} ${i} L ${s} ${c} A ${L[2]} ${L[2]} 0 0 1 ${g} ${h} Z`,n=e,l=i,r=A[a][4],d=A[a][5]}const c=e=>{const t=e.target.dataset?.sector;t&&this.viewModel.handleSectorClick(+t)},g=e=>{const t=e.target.dataset;if(!t)return;const{featureIndexInSector:i,sector:a}=t;i&&a&&this.viewModel.handleFeatureClick({sector:a,featureIndexInSector:+i})},h=e=>{e.removeEventListener("click",g)},m=i.attributes.objectId,u=e?.map(e=>e?.items).filter(Boolean).flatMap(e=>e?.map(({x:e,y:t,objectID:i,featureIndexInSector:a,sector:s})=>oe("circle",{afterRemoved:h,class:this.classes(E.feature,{selected:m===i}),cx:e,cy:t,"data-feature-index-in-sector":a,"data-sector":s,key:`${E.feature}-${i}`,r:k,onclick:g}))),p=e=>{e.removeEventListener("click",c)},v=this.classes({[E.navigationWrapper]:!0,[E.navigationWrapperVideo]:this.viewModel.mode.includes("video"),[E.navigationZoomed]:this._navigationToolExpanded});return this.navigationToolActive&&("image-loaded"===s||this.videoLoaded)?oe("div",{bind:this,class:v,key:this.messages.navigationTool},oe("svg",{afterCreate:e=>this._storeNavigationToolReference(e),class:a()?O:E.rotateWithAnimation,focusable:"false",height:V,role:"img",width:V,xmlns:"http://www.w3.org/2000/svg"},oe("defs",null,oe("linearGradient",{gradientUnits:"userSpaceOnUse",id:`${this.id}-coverage-fill`,x1:n,x2:r,y1:l,y2:d},oe("stop",{class:E.navigationPathOffset0,offset:0}),oe("stop",{class:E.navigationPathOffset1,offset:1}))),oe("g",null,oe("circle",{class:this.classes(E.sector,E.outerSector),cx:L[3],cy:L[3],r:L[3],onclick:this._scaleNavigationTool}),oe("circle",{class:E.sector,cx:L[3],cy:L[3],r:L[2]}),oe("circle",{class:E.sector,cx:L[3],cy:L[3],r:L[1]}),oe("circle",{class:E.sector,cx:L[3],cy:L[3],r:L[0]}),oe("path",{class:E.pointer,d:"M 56.5 6.06217782649107 L 60 0 L 63.5 6.06217782649107 Z",key:`${E.pointer}-west`}),oe("path",{class:this.classes(E.pointer,E.north),d:"M 113.93782217350893 56.5 L 120 60 L 113.93782217350893 63.5 Z",key:`${E.pointer}-north`}),oe("path",{class:E.pointer,d:"M 56.5 113.93782217350893 L 60 120 L 63.5 113.93782217350893 Z",key:`${E.pointer}-east`}),oe("path",{class:E.pointer,d:"M 6.06217782649107 56.5 L 0 60 L 6.06217782649107 63.5 Z",key:`${E.pointer}-south`}),oe("path",{class:this.classes(E.sector,E.sectorSeparator),d:"M 23.937554159486076 23.937554159486076 L 96.06244584051393 96.06244584051393 M 23.937554159486076 96.06244584051393 L 96.06244584051393 23.937554159486076",key:E.sectorSeparator}),C([L[2],L[1],L[0]],L[3],L[3]).map((t,i)=>oe("path",{afterRemoved:p,class:this.classes(E.sector,e?.[i]?.length?E.sectorEnabled:E.sectorDisabled),d:t,"data-sector":`${i}`,key:`${E.sector}-${i}`,onclick:c})),oe("path",{class:this.classes(E.sector,E.sectorCross),d:"M 56.4 56.4 L 63.53 63.53 M 63.53 56.4 L 56.4 63.53",key:E.sectorCross}),u,i.attributes.cameraPitch>=5&&o?oe("path",{class:E.selectedFeaturePath,d:o,fill:`url(#${this.id}-coverage-fill)`,key:E.selectedFeaturePath}):null))):null}_renderSketch(){const{dataCaptureLayer:e,imageOverlaysOpened:t}=this;if(!e||t)return null;if(this._sketchLoaderTask||this._loadSketchResources(),!this._sketchLoaderTask?.value)return null;const{geometryType:i}=e,a="point"===i?"pin":"polyline"===i?"line":"polygon",s=this._sketchLoaderTask.value;return oe("div",{class:E.sketchTools},oe(s,{icon:a,messages:this._imageSketchToolsMessages,type:i,onAction:this._onAction}))}get _renderThumbnails(){const{currentBestFeature:e,thumbnails:t}=this.viewModel;return e?oe("div",{class:E.carouselContent},t?.items.map(({url:t,objectId:i,rotation:a},s)=>oe("div",{class:`${E.carouselItemWrapper}${e.attributes.objectId===i?"--selected":""}`,key:`${E.carouselItemWrapper}-${s}`},oe("canvas",{afterCreate:this._registerGalleryItem,afterRemoved:this._unregisterGalleryItem,alt:`thumbnail-${i}`,class:E.carouselItem,"data-objectid":`${i}`,"data-rotation":`${a}`,"data-src":t,onclick:this._loadImageFromGallery,onmouseenter:this._highlight,onmouseleave:this._removeHighlight})))):null}_resetImageTools(){this.viewModel.sharpness=this.viewModel.brightness=this.viewModel.contrast=0}_resetVideoTools(){this.viewModel.videoViewModel?.resetVideoEnhancementTools()}_storeNavigationToolReference(e){this._navigationTool=e}_toggleAdditionalCameraLocations(){this.isAdditionalPointSourcesVisible=!this.isAdditionalPointSourcesVisible}_toggleAdditionalCoverage(){this.isAdditionalCoverageVisible=!this.isAdditionalCoverageVisible}_toggleCurrentCoverage(){this.currentCoverageVisible=!this.currentCoverageVisible}_toggleShowSelectedImage(){this.shouldShowSelectedImage=!this.shouldShowSelectedImage,this._toggleDisabledViewer(this.shouldShowSelectedImage)}_resetSuperimposeOffset(){if("default"===this.viewModel.mode)return this._defaultSuperimposeZOffsetPercentage=100,void this.viewModel.setDefaultSuperimposeZOffsetPercentage(0);this._panoramicSuperimposeRadiusOffsetPercentage=100,this.viewModel.setPanoramicSuperimposeRadiusPercentage(0)}_toggleSuperimposeCameraLock(){this.viewModel.updateDefaultSuperimposeCameraLock(!this.defaultSuperimposeCameraLockEnabled)}_toggleSuperimposeView(){this.superimposeViewEnabled=!this.superimposeViewEnabled}_toggleVerticalSearchFilter(){this.verticalFilterEnabled=!this.verticalFilterEnabled,this._toggleDisabledViewer(this.verticalFilterEnabled)}_toggleDisabledViewer(e){e&&(this.disabled=!1)}_toggleEnhancementToolState(e){e.stopPropagation();const t=this.enhancementToolActive;this._closeAllImageTools(),this.enhancementToolActive=!t}_toggleExploreImages(){this.disabled=!this.disabled,this.disabled&&(this.shouldShowSelectedImage=!1,this.verticalFilterEnabled=!1)}_toggleGroupSelection(e){this.selectedGroup=e}_toggleImageOverlays(e){e.stopPropagation();const t=this.imageOverlaysOpened;this._closeAllImageTools(),this.imageOverlaysOpened=!t}_toggleImageGallery(e){e.stopPropagation();const t=this.galleryOpened;this._closeAllImageTools(),this.galleryOpened=!!this.imageGalleryEnabled&&!t}_toggleLocationTool(e){const t=this.imageLocationToolActive,i=this.triangularMeasurementActive&&t;this._closeAllImageTools(),this.imageLocationToolActive=i||!t,e.stopPropagation()}_toggleMeasurementSketch(e,t){e.stopPropagation();const i=this.measureType,a=this.triangularMeasurementActive;this._closeAllImageTools(),this.measureType=i!==t||a?t:null,this.measureType===t&&(this.viewModel.displayNewMeasurementButton=!0)}_toggleNavigationTool(){const e=this.navigationToolActive;this._closeAllImageTools(),this.navigationToolActive=!e}_toggleMapImageConversionToolState(){this.mapImageConversionToolState=!this.mapImageConversionToolState}_toggleTriangularAreaMeasurements(){this._toggleTriangularMeasurements("area")}_toggleTriangularDistanceMeasurements(){this._toggleTriangularMeasurements("distance")}_toggleTriangularLocation(){const e=this.triangularMeasurementActive,t=this.navigationToolActive;e?null===this.measureType?this.imageLocationToolActive?this._closeImageToolsAndToggleNavigation(e,t):this._activateTriangulatedImageLocationTool():this._resetMeasureTypeAndActivateImageLocationTool():this._activateTriangulatedImageLocationWorkflow(e,t)}_toggleTriangularMeasurements(e){const t=this.triangularMeasurementActive,i=this.viewModel.measureType,a=this.navigationToolActive;t?e===i?(this._closeAllImageTools(),this.triangularMeasurementActive=!t,this.navigationToolActive=!a):(this.imageLocationToolActive=!1,this.measureType=e,this.viewModel.displayNewMeasurementButton=!0):(this._closeAllImageTools(),this.measureType=e,this.triangularMeasurementActive=!t,this.navigationToolActive=!!a||!a,this.viewModel.displayNewMeasurementButton=!0)}_unregisterGalleryItem(e){this._galleryObserver.unobserve(e)}_updateNavigationTool(e){const{previousFeatureAngle:t,bestFeatureAngle:i}=this.viewModel,a=(i-t+540)%360-180;e.style.setProperty(P,`${t}deg`),e.style.setProperty(F,`${t+a}deg`)}async loadBestImage(e,t){return this.viewModel.loadBestImage(e,t)}loadImageFromSource(e,t,i){return"default"===e?this.viewModel.loadMediaSource(t,i):this.viewModel.loadPanoramicMediaSource(t,i)}async overlayMapFeatures(e,t){return this.removeHandles(`${ne.overlayed}-${e.id}`),this.addHandles(c(()=>e.visible,()=>{this.viewModel.toggleOverlayMapFeatures(e.id,e.visible,this.showMapFeatures)}),`${ne.overlayed}-${e.id}`),this._overlayedLayers.add(e),this.viewModel.overlayMapFeatures(e,t&&this.showMapFeatures)}async plotMapPoint(e){return this.viewModel.plotMapPoint(e)}plotReferencePointOnGround(e){this.viewModel.plotReferencePointOnGround(e)}plotReferencePointOnImage(e){this.viewModel.plotReferencePointOnImage(e)}removeOverlayedGraphicsOnImage(e){this.removeHandles(`${ne.overlayed}-${e}`),this._overlayedLayers.remove(this._overlayedLayers.find(t=>t.id===e)),this.viewModel.removeOverlayedGraphicsOnImage(e)}resetImage(){this.viewModel.resetImage()}render(){return oe("div",{class:this.classes(te.widget,x)},this._renderRoot)}async showImageByObjectId(e,t){return this.viewModel.showImageByObjectId(e,t)}async startDataCapture(e){return this.viewModel.startDataCapture(e)}async stopDataCapture(e){return this.viewModel.stopDataCapture(e)}updateSuitabilities(e){this.viewModel.updateSuitabilities(e)}};e([v({readOnly:!0})],re.prototype,"accuracyParametersMissing",null),e([v()],re.prototype,"activeLayer",null),e([v()],re.prototype,"activeVideoIcon",null),e([v()],re.prototype,"activeAudioIcon",null),e([v()],re.prototype,"cameraHeadingThreshold",null),e([v()],re.prototype,"cameraPitchThreshold",null),e([v()],re.prototype,"canNavigateSequentially",null),e([v()],re.prototype,"currentBestFeature",null),e([v()],re.prototype,"currentCoverageVisible",null),e([v()],re.prototype,"dataCaptureEnabled",void 0),e([v()],re.prototype,"dataCaptureLayer",null),e([v()],re.prototype,"depthImageNotSupported",null),e([v()],re.prototype,"disabled",null),e([v()],re.prototype,"enhancementToolActive",null),e([v()],re.prototype,"features",null),e([v()],re.prototype,"imagePointsInView",null),e([v()],re.prototype,"galleryOpened",void 0),e([v()],re.prototype,"icon",null),e([v()],re.prototype,"imageEnhancementToolActive",void 0),e([v()],re.prototype,"videoEnhancementToolActive",void 0),e([v({readOnly:!0})],re.prototype,"imageGalleryEnabled",null),e([v()],re.prototype,"imageLocationToolActive",null),e([v()],re.prototype,"imageOverlaysOpened",void 0),e([v({readOnly:!0})],re.prototype,"invalidCameraHeading",null),e([v()],re.prototype,"isAdditionalCoverageVisible",null),e([v()],re.prototype,"isAdditionalPointSourcesVisible",null),e([v()],re.prototype,"mapImageConversionToolState",null),e([v()],re.prototype,"measureType",null),e([v()],re.prototype,"layer",null),e([v()],re.prototype,"navigationToolActive",void 0),e([v()],re.prototype,"navigationMode",null),e([ae(f()),v({type:j})],re.prototype,"viewModel",void 0),e([v(),se("esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer")],re.prototype,"messages",void 0),e([v(),se("esri/core/t9n/Units")],re.prototype,"measurementUnitMessages",void 0),e([v(),se("esri/t9n/common")],re.prototype,"messagesCommon",void 0),e([v(),se("esri/widgets/Sketch/t9n/Sketch")],re.prototype,"messagesSketch",void 0),e([v()],re.prototype,"pixelMeasurementUnit",void 0),e([v()],re.prototype,"pixelAreaMeasurementUnit",void 0),e([v({readOnly:!0})],re.prototype,"popupEnabled",null),e([v()],re.prototype,"preloadMedia",null),e([v()],re.prototype,"referencePoint",null),e([v()],re.prototype,"selectedGroup",void 0),e([v()],re.prototype,"showCameraLocations",void 0),e([v()],re.prototype,"showMapFeatures",void 0),e([ae(["create","delete","redo","undo","update"]),v({readOnly:!0})],re.prototype,"sketchViewModel",null),e([v()],re.prototype,"triangularMeasurementActive",null),e([v()],re.prototype,"videoLoaded",null),e([v()],re.prototype,"view",null),e([v({type:B,nonNullable:!0})],re.prototype,"visibleElements",void 0),e([v()],re.prototype,"determineWorkflowForFeature",null),e([v()],re.prototype,"shouldShowSelectedImage",null),e([v()],re.prototype,"superimposeViewEnabled",null),e([v()],re.prototype,"defaultSuperimposeCameraLockEnabled",null),e([v()],re.prototype,"updateFootprint",null),e([v()],re.prototype,"verticalFilterEnabled",null),e([v()],re.prototype,"_defaultSuperimposeZOffsetPercentage",void 0),e([v()],re.prototype,"_panoramicSuperimposeRadiusOffsetPercentage",void 0),e([v()],re.prototype,"_activeMeasurementHeading",null),e([v()],re.prototype,"_imageOverlaysLoaderTask",void 0),e([v()],re.prototype,"_imageMeasurementToolsLoaderTask",void 0),e([v()],re.prototype,"_navigationSettingsLoaderTask",void 0),e([v()],re.prototype,"_navigationTask",void 0),e([v()],re.prototype,"_measurementToggle",null),e([v()],re.prototype,"_renderRoot",null),e([v()],re.prototype,"_imageEnhancementTools",null),e([v()],re.prototype,"_videoEnhancementTools",null),e([v()],re.prototype,"_superimposeTools",null),e([v()],re.prototype,"_imageGalleryPanel",null),e([v()],re.prototype,"_imageGalleryContext",null),e([v()],re.prototype,"_imageOverlaysComponent",null),e([v()],re.prototype,"_navigationUI",null),e([v()],re.prototype,"_imageOverlayMessages",null),e([v()],re.prototype,"_imageSketchToolsMessages",null),e([v()],re.prototype,"_imageOverlaysEnabled",null),e([v()],re.prototype,"_imageViewer",null),e([v()],re.prototype,"_imageViewerTriangular",null),e([v()],re.prototype,"_videoViewer",null),e([v()],re.prototype,"_locationToggle",null),e([v()],re.prototype,"_messageBox",null),e([v()],re.prototype,"_navigationToolExpanded",void 0),e([v()],re.prototype,"_navigationTool",void 0),e([v()],re.prototype,"_panoramicVideoViewer",null),e([v()],re.prototype,"_panoramicViewer",null),e([v({readOnly:!0})],re.prototype,"noImageInSequenceError",null),e([v()],re.prototype,"_renderNavigation",null),e([v()],re.prototype,"_renderThumbnails",null),e([v()],re.prototype,"_sketchLoaderTask",void 0),re=e([y("esri.widgets.OrientedImageryViewer")],re);const le=re;export{le as default};
|
|
2
|
+
import{__decorate as e}from"tslib";import{prefersRTL as t,substitute as i}from"../intl.js";import{prefersReducedMotion as a}from"../core/a11yUtils.js";import{createTask as s}from"../core/asyncUtils.js";import o from"../core/Collection.js";import{deprecateWidget as n,deprecatedProperty as r}from"../core/deprecate.js";import l from"../core/Logger.js";import{isAbortError as d}from"../core/promiseUtils.js";import{watch as c,initial as g,syncAndInitial as h,on as m,sync as u}from"../core/reactiveUtils.js";import{throttle as p}from"../core/throttle.js";import{property as v,subclass as y}from"../core/accessorSupport/decorators.js";import{or as w}from"../layers/orientedImagery/transformations/utils.js";import _ from"./Expand.js";import M from"./PanoramicVideoViewer.js";import T from"./PanoramicViewer.js";import b from"./Widget.js";import{getAllArcPath as C}from"./OrientedImageryViewer/arcUtils.js";import{getDelegatedEvents as f,defaultImageGeometryField as I,defaultOIObjectIDField as S,segmentArcs as A,featureCircleRadius as k,navigationToolDimensionLength as V,sectorsRadii as L}from"./OrientedImageryViewer/constants.js";import{css as E,navigation as O,navigationToolRotationFrom as P,navigationToolRotationTo as F,root as x}from"./OrientedImageryViewer/css.js";import{isFeatureAttachment as G,loadImageForAttachment as N,getThumbnailPixelBlock as D,renderImageWithRotation as H}from"./OrientedImageryViewer/galleryUtils.js";import j from"./OrientedImageryViewer/OrientedImageryViewerViewModel.js";import B from"./OrientedImageryViewer/OrientedImageryViewerVisibleElements.js";import{loadAlertComponents as $,Alert as R}from"./OrientedImageryViewer/components/Alert.js";import W from"./OrientedImageryViewer/components/ImageLocationWidget.js";import q from"./OrientedImageryViewer/components/ImageViewer.js";import U from"./OrientedImageryViewer/components/NavigationUI.js";import Z from"./OrientedImageryViewer/components/NavigationUI360.js";import{loadSequentialNavigationUIComponents as z,SequentialNavigationUI as J}from"./OrientedImageryViewer/components/SequentialNavigationUI.js";import{loadVideoEnhancementComponents as K,renderEnhancementSlider as Q,VideoEnhancementTools as X}from"./OrientedImageryViewer/components/VideoEnhancementTools.js";import{NoImageLoadedError as Y}from"./OrientedImageryViewer/navigation/errors.js";import{loadCalciteComponents as ee}from"./support/componentsUtils.js";import{globalCss as te}from"./support/globalCss.js";import{iconByKind as ie}from"./support/iconUtils.js";import{vmEvent as ae,messageBundle as se,tsx as oe}from"./support/widget.js";const ne={overlayed:"overlayed"};let re=class extends b{constructor(e,t){super(e,t),this.dataCaptureEnabled=!1,this.galleryOpened=!1,this.imageEnhancementToolActive=!1,this.videoEnhancementToolActive=!1,this.imageOverlaysOpened=!1,this.navigationToolActive=!1,this.viewModel=new j,this.messagesCommon=null,this.messagesSketch=null,this.pixelMeasurementUnit="meters",this.pixelAreaMeasurementUnit="square-meters",this.selectedGroup=null,this.showCameraLocations=!1,this.showMapFeatures=!1,this.visibleElements=new B,this._defaultSuperimposeZOffsetPercentage=100,this._panoramicSuperimposeRadiusOffsetPercentage=100,this._imageOverlaysLoaderTask=null,this._imageMeasurementToolsLoaderTask=null,this._navigationSettingsLoaderTask=null,this._navigationTask=null,this._clearMeasurements=()=>{this.viewModel.measureType=null,this.viewModel.triangularMeasurementActive=!1,this.viewModel.displayNewMeasurementButton=!0,this.viewModel.clearPreviousMeasurements()},this._clearImageLocation=()=>{this.imageLocationToolActive=!1,this.triangularMeasurementActive=!1},this._createNavigationTask=async e=>(this._navigationTask?.abort(),this._navigationTask=s(async t=>await this.navigate({...e,signal:t})),this._navigationTask.promise),this._navigateNext=async()=>await this._createNavigationTask({step:1}),this._navigatePrevious=async()=>await this._createNavigationTask({step:-1}),this._navigationToolExpanded=!1,this._navigationTool=null,this._galleryController=new AbortController,this._galleryObserver=new IntersectionObserver(this._lazyLoadImage.bind(this)),this._overlayedLayers=new o,this._previousAction=null,this._closeImageSequenceAlert=()=>{this._set("noImageInSequenceError",!1)},this._handleDataCaptureLayerChange=async e=>{if(this.dataCaptureLayer&&await this.stopDataCapture(!0),this.dataCaptureLayer=this.dataCaptureLayer===e?null:e,this.dataCaptureLayer)return this.startDataCapture(this.dataCaptureLayer)},this._handleNavigationSettingsInputChange=(e,t)=>{this.set(`${e}Threshold`,t)},this._handleNavigationSettingsToggle=e=>{this.viewModel.preserveAngle=e},this._handleOverlayLayerDeselect=e=>{const t=e.layer;t===this.dataCaptureLayer&&(this.stopDataCapture(),this.dataCaptureLayer=null),this.removeOverlayedGraphicsOnImage(`${t.id}`)},this._handleOverlayLayerSelect=e=>{const t=e.layer;this.viewModel.overlayMapFeatures(t,this.showMapFeatures),this.addHandles(c(()=>t.visible,()=>{this.viewModel.toggleOverlayMapFeatures(t.id,t.visible,this.showMapFeatures)}),`${ne.overlayed}-${t.id}`)},this._highlight=e=>{const t=e.target?.dataset.objectid;t&&this.viewModel.highlight(t)},this._onAction=e=>{const{target:t}=e,{dataset:{action:i}}=t,{_previousAction:a}=this,s=a?.dataset.action,o=s?.includes("draw")??!1,n="select-feature"===s,r=s!==i;switch(i){case"draw-point":case"draw-polygon":case"draw-polyline":{a&&w(n,o&&r)&&(a.active=!1),t.active=!t.active;const e=i.replace("draw-","");this.viewModel.digitizeCreate(e),this._previousAction=t.active?t:null;break}case"save":this.viewModel.saveDrawing();break;case"select-feature":o&&(this._previousAction.active=!1),t.active=!t.active,this.viewModel.toggleSelection(t.active),this._previousAction=t.active?t:null;break;case"delete-feature":this.viewModel.digitizeDelete()}},this._onImageOverlayClosed=e=>{e.stopPropagation(),this.imageOverlaysOpened=!1},this._onShowCameraLocationsChanged=e=>{this.showCameraLocations=e},this._onShowMapFeaturesChanged=e=>{this.showMapFeatures=e},this._removeHighlight=()=>this.viewModel.removeHighlight(),this._restoreOverlays=async()=>Promise.all(this._overlayedLayers.map(e=>this.viewModel.overlayMapFeatures(e,this.showMapFeatures))),this._scaleNavigationTool=()=>{this._navigationToolExpanded=!this._navigationToolExpanded},this._sketchLoaderTask=null,this._settingsToggle=null,this._toggleImageNavigation=async e=>{const t=this.navigationMode;this._closeAllImageTools(),this.navigationMode=t!==e?e:null;const{activeViewer:i}=this.viewModel;if(!i)return;const{mode:a,preserveAngle:s}=this.viewModel;if("default"===a)if("directional"===this.navigationMode){const e=await this._loadNavigationSettings(),t="heading"===s||"both"===s,i="pitch"===s||"both"===s,{messages:a,messagesCommon:o}=this,n=new e({cameraHeadingThreshold:this.cameraHeadingThreshold,cameraPitchThreshold:this.cameraPitchThreshold,uiStrings:{configureNavigation:a.configureNavigation,preserveHeading:a.preserveHeading,preserveHeadingDescription:a.preserveHeadingDescription,preservePitch:a.preservePitch,preservePitchDescription:a.preservePitchDescription,settings:o.settings,thresholdLabel:a.thresholdLabel},onInputChange:this._handleNavigationSettingsInputChange,onToggle:this._handleNavigationSettingsToggle,preserveHeading:t,preservePitch:i});this._settingsToggle=new _({content:n,expandIcon:"configure"}),this.viewModel.activeViewer?.ui.add(this._settingsToggle,{position:"top-left"})}else this._settingsToggle&&(this._settingsToggle.expanded=!1,this.viewModel.activeViewer?.ui.remove(this._settingsToggle))},this._toggleImageAttributes=p(this.viewModel.toggleImageAttributes.bind(this.viewModel)),this.navigate=async e=>{let t=null;try{const{currentNode:i}=this.viewModel;if(!i)throw new Y;t=await this.viewModel.navigate(i,e)}catch(i){d(i)||l.getLogger(this).error("Error occurred while navigating",i),["NoImageInSequenceError","NoSequenceFoundError"].includes(i.name)&&this._set("noImageInSequenceError",!0)}return t},this.reset=()=>{this._closeAllImageTools(),this.viewModel.reset()},this._loadImageFromGallery=this._loadImageFromGallery.bind(this),this._registerGalleryItem=this._registerGalleryItem.bind(this),this._unregisterGalleryItem=this._unregisterGalleryItem.bind(this),this.loadImageFromSource=this.loadImageFromSource.bind(this),this.updateSuitabilities=this.updateSuitabilities.bind(this),this._handleVideoBrightnessChange=this._handleVideoBrightnessChange.bind(this),this._handleVideoContrastChange=this._handleVideoContrastChange.bind(this),this._handleBrightnessChange=this._handleBrightnessChange.bind(this),this._handleContrastChange=this._handleContrastChange.bind(this),this._handleSharpnessChange=this._handleSharpnessChange.bind(this),this._handleSuperimposeZOffsetChange=this._handleSuperimposeZOffsetChange.bind(this),this._toggleSuperimposeCameraLock=this._toggleSuperimposeCameraLock.bind(this),this._resetSuperimposeOffset=this._resetSuperimposeOffset.bind(this),this._resetVideoTools=this._resetVideoTools.bind(this),this._toggleEnhancementToolState=this._toggleEnhancementToolState.bind(this),this.announceDeprecation=()=>{n(l.getLogger(this),"Oriented Imagery Viewer","arcgis-oriented-imagery-viewer",{version:"5.0"})}}initialize(){this.addHandles([c(()=>[this.viewModel?.bestFeatureAngle,this._navigationTool],([e,t])=>{t&&this._updateNavigationTool(t)},g),c(()=>this.currentCoverageVisible,e=>this._onCurrentCoverageVisibilityChange(e)),c(()=>this.isAdditionalCoverageVisible,e=>this._onAdditionalCoverageVisibilityChange(e)),c(()=>this.isAdditionalPointSourcesVisible,e=>this._onAdditionalCameraLocationsVisibility(e)),c(()=>this.superimposeViewEnabled,e=>{e?(this._closeAllImageTools(),this.selectedGroup=null,this.shouldShowSelectedImage=!1,this.verticalFilterEnabled=!1):this._resetSuperimposeOffset()}),c(()=>({features:this.currentBestFeature,overlaysEnabled:this._imageOverlaysEnabled,showCameraLocations:this.showCameraLocations}),({overlaysEnabled:e,showCameraLocations:t})=>{e&&this.viewModel.overlayCameraLocations(t)},h),c(()=>({feature:this.currentBestFeature,overlaysEnabled:this._imageOverlaysEnabled,showMapFeatures:this.showMapFeatures}),async(e,t)=>{e.showMapFeatures!==t?.showMapFeatures&&await this.viewModel.toggleAllOverlayMapFeatures(e.showMapFeatures);const i=e.feature&&e.feature!==t?.feature,a=!e.overlaysEnabled&&!!t?.overlaysEnabled,s=e.overlaysEnabled&&!t?.overlaysEnabled,o="video"===this.viewModel.mode||"panoramic-video"===this.viewModel.mode;if(a&&o)return this.viewModel.removeAllOverlayMapFeatures(),void("video"===this.viewModel.mode&&this.viewModel.videoViewModel?.clearOverlayGraphics());(i||s)&&(i&&(this._resetSuperimposeOffset(),this.viewModel.removeAllOverlayMapFeatures()),e.overlaysEnabled&&(this.dataCaptureLayer&&this.stopDataCapture(),await this._restoreOverlays(),this.dataCaptureLayer&&(await this.startDataCapture(this.dataCaptureLayer),this._previousAction?.active&&(this._previousAction.active=!1,this._previousAction=null))))},g),m(()=>this.viewModel,"popup-open",async e=>{await(this.view?.openPopup(e))},u),m(()=>this.viewModel,"popup-close",()=>{this.view?.closePopup()},u),this._toggleImageAttributes])}loadDependencies(){return Promise.all([K(),z(),ee({"action-bar":()=>import("@esri/calcite-components/dist/components/calcite-action-bar"),"action-group":()=>import("@esri/calcite-components/dist/components/calcite-action-group"),action:()=>import("@esri/calcite-components/dist/components/calcite-action"),block:()=>import("@esri/calcite-components/dist/components/calcite-block"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel"),shell:()=>import("@esri/calcite-components/dist/components/calcite-shell"),dialog:()=>import("@esri/calcite-components/dist/components/calcite-dialog"),slider:()=>import("@esri/calcite-components/dist/components/calcite-slider"),notice:()=>import("@esri/calcite-components/dist/components/calcite-notice")}),$()])}destroy(){this._galleryController.abort(),this._galleryObserver.disconnect(),this.currentBestFeature=null}get accuracyParametersMissing(){return this.viewModel.accuracyParametersMissing}get activeLayer(){return r(l.getLogger(this),"activeLayer",{replacement:"layer"}),this.layer}set activeLayer(e){r(l.getLogger(this),"activeLayer",{replacement:"layer"}),this.layer=e}get activeVideoIcon(){const{videoElement:e,videoViewModel:t}=this.viewModel;return e?.loaded&&t?t.videoPaused?"play":"pause":"play"}get activeAudioIcon(){const{videoElement:e,videoViewModel:t}=this.viewModel;return e?.loaded&&t?.videoMuted?"sound-off":"sound"}get cameraHeadingThreshold(){return this.viewModel.cameraHeadingThreshold}set cameraHeadingThreshold(e){this.viewModel.cameraHeadingThreshold=e}get cameraPitchThreshold(){return this.viewModel.cameraPitchThreshold}set cameraPitchThreshold(e){this.viewModel.cameraPitchThreshold=e}get canNavigateSequentially(){return!!this.layer?.effectiveSequenceOrderField?.length}get currentBestFeature(){return this.viewModel.currentBestFeature}set currentBestFeature(e){this.viewModel.currentBestFeature=e}get currentCoverageVisible(){return this.viewModel.currentCoverageVisible}set currentCoverageVisible(e){this.viewModel.currentCoverageVisible=e}get dataCaptureLayer(){return this.viewModel.dataCaptureLayer}set dataCaptureLayer(e){this.viewModel.dataCaptureLayer=e}get depthImageNotSupported(){return this.viewModel.depthImageNotSupported}get disabled(){return this.viewModel.disabled}set disabled(e){this.viewModel.disabled=e}get displayMessage(){return this.viewModel.displayMessage}get enhancementToolActive(){return"video"===this.viewModel.mode?this.videoEnhancementToolActive:this.imageEnhancementToolActive}set enhancementToolActive(e){"video"===this.viewModel.mode?this.videoEnhancementToolActive=e:this.imageEnhancementToolActive=e}get features(){return this.viewModel.features}get imagePointsInView(){return this.viewModel.imagePointsInView}get icon(){return"oriented-imagery-widget"}set icon(e){this._overrideIfSome("icon",e)}get imageGalleryEnabled(){return this.viewModel.imageGalleryEnabled}get imageLocationToolActive(){return this.viewModel.imageLocationToolState}set imageLocationToolActive(e){this.viewModel.imageLocationToolState=e}get invalidCameraHeading(){return this.viewModel.invalidCameraHeading}get isAdditionalCoverageVisible(){return this.viewModel.isAdditionalCoverageVisible}set isAdditionalCoverageVisible(e){this.viewModel.isAdditionalCoverageVisible=e}get isAdditionalPointSourcesVisible(){return this.viewModel.isAdditionalPointSourcesVisible}set isAdditionalPointSourcesVisible(e){this.viewModel.isAdditionalPointSourcesVisible=e}get mapImageConversionToolState(){return this.viewModel.mapImageConversionToolState}set mapImageConversionToolState(e){this.viewModel.setMapImageConversionToolState(e)}get measureType(){return this.viewModel.measureType}set measureType(e){this.viewModel.measureType=e}get layer(){return this.viewModel.layer}set layer(e){this.viewModel.layer=e}get navigationMode(){return this.viewModel.navigationMode}set navigationMode(e){this.viewModel.navigationMode=e}get popupEnabled(){const{popupEnabled:e,state:t}=this.viewModel;return("image-loaded"===t||this.videoLoaded)&&e}get preloadMedia(){return this.viewModel.preloadMedia}set preloadMedia(e){this.viewModel.preloadMedia=e}get referencePoint(){return this.viewModel.referencePoint??null}get sketchViewModel(){return this.viewModel.sketch}get triangularMeasurementActive(){return this.viewModel.triangularMeasurementActive}set triangularMeasurementActive(e){this.viewModel.triangularMeasurementActive=e}get videoLoaded(){const{mode:e,videoElement:t,panoramicVideoLoaded:i}=this.viewModel;return("video"===e&&!0===t?.loaded||i)??!1}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}set determineWorkflowForFeature(e){this.viewModel.determineWorkflowForFeature=e}get determineWorkflowForFeature(){return this.viewModel.determineWorkflowForFeature}get shouldShowSelectedImage(){return this.viewModel.shouldShowSelectedImage}set shouldShowSelectedImage(e){this.viewModel.shouldShowSelectedImage=e}get superimposeViewEnabled(){return this.viewModel.superimposeViewEnabled}set superimposeViewEnabled(e){this.viewModel.superimposeViewEnabled=e}get defaultSuperimposeCameraLockEnabled(){return this.viewModel.defaultSuperimposeCameraLockEnabled}set defaultSuperimposeCameraLockEnabled(e){this.viewModel.defaultSuperimposeCameraLockEnabled=e}set updateFootprint(e){this.viewModel.updateFootprint=e}get updateFootprint(){return this.viewModel.updateFootprint}get verticalFilterEnabled(){return this.viewModel.verticalFilterEnabled}set verticalFilterEnabled(e){this.viewModel.verticalFilterEnabled=e}_renderActionBar(){const{selectedGroup:e,superimposeViewEnabled:i}=this;if(i)return oe("calcite-action-bar",{expandDisabled:!0,layout:"horizontal",slot:"action-bar"},oe("calcite-action-group",null,this._superimposeViewToggle()));const a=t();return oe("calcite-action-bar",{expandDisabled:!0,layout:"horizontal",slot:"action-bar"},!e&&oe("calcite-action-group",null,this._searchGroupToggle(),this._overlaysGroupToggle(),this._navigationGroupToggle(),this._measurementsGroupToggle(),this._utilitiesGroupToggle()),this._renderGroupBackAction(a),"overlays"===e&&oe("calcite-action-group",null,this._currentFootprintToggle(),this._additionalFootprintToggle(),this._additionalPointSourcesToggle(),this._mapImageConversionToggle(),this._imageOverlaysToggle()),"navigation"===e&&oe("calcite-action-group",null,this._directionToolsToggle(),this._navigationToolToggle(),this._imageGalleryToggle()),"measurements"===e&&oe("calcite-action-group",null,this._measurementToolToggle()),"utilities"===e&&oe("calcite-action-group",null,this._imageEnhancementsToggle(),this._videoEnhancementsToggle(),this._superimposeViewToggle(),this._openPopupAction()),"search"===e&&oe("calcite-action-group",null,this._exploreImagesToggle(),this._exploreImages3DToggle(),this._showSelectedImageToggle()))}_renderGroupBackAction(e){return this.selectedGroup?oe("calcite-action",{bind:this,icon:e?"arrow-right":"arrow-left",key:"back-arrow",text:this.messages.previous,title:this.messages.previous,onclick:()=>this._toggleGroupSelection(null)}):null}get _activeMeasurementHeading(){const{measureType:e,messages:t,triangularMeasurementActive:i}=this,{groundArea:a,heightAboveGround:s,groundDistance:o,triangulatedAreaHeading:n,triangulatedDistanceHeading:r}=t;if(i)return"area"===e?n:r;switch(e){case"area":return a;case"height":return s;default:return o}}_additionalFootprintToggle(){const{isAdditionalCoverageVisible:e,invalidCameraHeading:t,visibleElements:{additionalFootprintToggle:i}}=this;return i?oe("calcite-action",{active:e,bind:this,class:E.addCoverage,disabled:t,icon:"trapezoid-area",text:this.messages.additionalFootprints,title:this.messages.additionalFootprints,onclick:this._toggleAdditionalCoverage}):null}_additionalPointSourcesToggle(){const{isAdditionalPointSourcesVisible:e,invalidCameraHeading:t,visibleElements:{additionalCameraLocationsToggle:i}}=this;return i?oe("calcite-action",{active:e,bind:this,class:E.addExpPoints,disabled:t,icon:"circle-area",text:this.messages.additionalCameraLocations,title:this.messages.additionalCameraLocations,onclick:this._toggleAdditionalCameraLocations}):null}get _measurementToggle(){const{viewModel:{state:e,measureType:t,currentBestFeatureMeasurementImage:i},triangularMeasurementActive:a,id:s}=this;if("image-loaded"!==e||!t||a&&!i)return;this._imageMeasurementToolsLoaderTask||this._loadImageMeasurementResources();const o=this._imageMeasurementToolsLoaderTask?.value;return o?oe("calcite-dialog",{bind:this,dragEnabled:!0,escapeDisabled:!0,heading:this._activeMeasurementHeading,id:`${s}-${t}-measurement`,open:!0,placement:"bottom-start",resizable:!0,scale:"s",slot:"dialogs",width:"s",onCalciteDialogBeforeClose:this._clearMeasurements},oe(o,{measurementType:t,measurementUnitMessages:this.measurementUnitMessages,messages:this.messages,oiViewModel:this.viewModel})):null}get _renderRoot(){const{viewModel:{state:e},triangularMeasurementActive:t}=this;return oe("calcite-panel",{bind:this,class:t?E.viewerContainerMeasurement:E.viewerContainer,heading:this.visibleElements.header?this.messages.title:void 0,loading:e.includes("loading")&&!t},this.visibleElements.menu?this._renderActionBar():null,oe("calcite-shell",null,oe("calcite-panel",null,this._imageViewer,this._panoramicViewer,this._panoramicVideoViewer,this._videoViewer,this._messageBox,this.invalidCameraHeading?null:[this._imageGalleryPanel,this._renderNavigation,this._imageOverlaysPanel()],this._imageEnhancementTools,this._videoEnhancementTools,this._superimposeTools,this._renderSketch(),this._navigationUI),this._imageViewerTriangular,this._measurementToggle,this._locationToggle,this.invalidCameraHeading?this._renderWarning(this.messages.invalidCameraHeadingWarningTitle,this.messages.invalidCameraHeadingWarningDescription):null,this.depthImageNotSupported?this._renderWarning(this.messages.depthImageNotSupportedTitle,this.messages.depthImageNotSupportedDescription):null,this.noImageInSequenceError?this._renderWarning(this.messages.sequentialNavigationWarning,this.messages.sequentialNavigationWarning,this._closeImageSequenceAlert):null))}_currentFootprintToggle(){const{currentCoverageVisible:e,invalidCameraHeading:t}=this,{currentFootprintToggle:i}=this.visibleElements;return i?oe("calcite-action",{active:e,bind:this,class:E.currentCoverage,disabled:t,icon:"trapezoid-area",text:this.messages.currentFootprint,title:this.messages.currentFootprint,onclick:this._toggleCurrentCoverage}):null}_exploreImagesToggle(){const{exploreImages:e}=this.messages;return this.visibleElements.exploreImages?oe("calcite-action",{active:!this.disabled,bind:this,icon:"oriented-imagery-widget",text:e,title:e,onclick:this._toggleExploreImages}):null}get _imageEnhancementTools(){const{enhancementToolActive:e,viewModel:{brightness:t,contrast:i,sharpness:a,state:s}}=this;return e&&"image-loaded"===s?oe("calcite-panel",{bind:this,class:E.imageEnhancementWrapper,closable:!0,closed:!e,heading:this.messages.imageEnhancement,key:this.messages.imageEnhancement,onCalcitePanelClose:this._toggleEnhancementToolState},oe("div",{class:E.imageEnhancementTools},Q({title:this.messages.brightness,value:t,handleChange:this._handleBrightnessChange}),Q({title:this.messages.contrast,value:i,handleChange:this._handleContrastChange}),Q({title:this.messages.sharpness,value:a,max:1,min:0,ticks:.5,step:.1,handleChange:this._handleSharpnessChange})),oe("calcite-action",{bind:this,icon:"reset",slot:"header-actions-end",text:this.messagesCommon.reset,title:this.messagesCommon.reset,onclick:this._resetImageTools})):null}get _videoEnhancementTools(){const{enhancementToolActive:e,viewModel:{videoViewModel:t,mode:i},messages:{videoEnhancement:a,brightness:s,contrast:o},messagesCommon:{reset:n}}=this;return e&&"video"===i&&t?oe(X,{brightness:t.videoBrightness,constrast:t.videoContrast,handleBrightnessChange:this._handleVideoBrightnessChange,handleContrastChange:this._handleVideoContrastChange,resetTools:this._resetVideoTools,uiStrings:{videoEnhancement:a,brightness:s,contrast:o,reset:n},videoEnhancementToolActive:e,onClose:this._toggleEnhancementToolState}):null}get _superimposeTools(){const{superimposeViewEnabled:e,view:t,viewModel:{state:i,mode:a},messages:{superimposeSettings:s,superimposeSliderTitle:o,superimposeSliderTooltip:n}}=this,r="panoramic"===a;return e&&"3d"===t?.type&&"image-loaded"===i?oe("calcite-panel",{bind:this,class:this.classes(E.imageEnhancementWrapper,E.superimposeTools),heading:s,key:"superimpose-settings"},oe("div",{class:E.imageEnhancementTools},Q({title:o,tooltip:n,value:r?this._panoramicSuperimposeRadiusOffsetPercentage:this._defaultSuperimposeZOffsetPercentage,max:100,min:0,ticks:10,step:1,handleChange:this._handleSuperimposeZOffsetChange})),oe("calcite-action",{bind:this,icon:"reset",slot:"header-actions-end",text:this.messagesCommon.reset,title:this.messagesCommon.reset,onclick:this._resetSuperimposeOffset})):null}_imageEnhancementsToggle(){const{state:e,mode:t}=this.viewModel,{enhancementTool:i}=this.visibleElements;return i&&"video"!==t?oe("calcite-action",{active:this.enhancementToolActive,bind:this,disabled:"default"!==t||"image-loaded"!==e,icon:"sliders-horizontal",text:this.messages.imageEnhancement,title:this.messages.imageEnhancement,onclick:this._toggleEnhancementToolState}):null}_exploreImages3DToggle(){const{exploreImages3D:e}=this.messages,t="3d"!==this.view?.type||!this.layer?.verticalSearchRange;return this.visibleElements.exploreImages3D?oe("calcite-action",{active:this.verticalFilterEnabled,bind:this,disabled:t,icon:"i3DSearch",text:e,title:e,onclick:this._toggleVerticalSearchFilter}):null}_showSelectedImageToggle(){const{displayImages:e}=this.messages,t=this.viewModel.mode.includes("video");return this.visibleElements.showSelectedImage?oe("calcite-action",{active:this.shouldShowSelectedImage,bind:this,disabled:t,icon:"show-oriented-imagery",text:e,title:e,onclick:this._toggleShowSelectedImage}):null}_superimposeViewToggle(){const{superimposeView:e}=this.messages,{mode:t,accuracyParametersMissing:i}=this.viewModel,a=!this.superimposeViewEnabled&&("3d"!==this.view?.type||t.includes("video")||i);return this.visibleElements.superimpose?oe("calcite-action",{active:this.superimposeViewEnabled,bind:this,disabled:a,icon:"superimpose",text:e,title:e,onclick:this._toggleSuperimposeView}):null}_videoEnhancementsToggle(){const{mode:e}=this.viewModel,{videoEnhancement:t}=this.messages,{enhancementTool:i}=this.visibleElements;return i&&"video"===e?oe("calcite-action",{active:this.enhancementToolActive,bind:this,disabled:"video"!==e,icon:"sliders-horizontal",text:t,title:t,onclick:this._toggleEnhancementToolState}):null}get _imageGalleryPanel(){const{container:e,galleryOpened:t,imageGalleryEnabled:i}=this;return i&&t&&e?this._imageGalleryContext:null}get _imageGalleryContext(){const{galleryOpened:e,invalidCameraHeading:t}=this;return oe("calcite-panel",{bind:this,class:E.carousel,closable:!0,closed:!e,disabled:t,heading:this.messages.imageGallery,key:this.messages.imageGallery,onCalcitePanelClose:this._toggleImageGallery},oe("div",{class:E.carouselContainer},this._renderThumbnails))}_imageGalleryToggle(){const{imageGalleryEnabled:e,invalidCameraHeading:t,visibleElements:{imageGallery:i}}=this;return i?oe("calcite-action",{active:this.galleryOpened,bind:this,disabled:!e||t,icon:"images",text:this.messages.imageGallery,title:this.messages.imageGallery,onclick:this._toggleImageGallery}):null}get _imageOverlaysComponent(){const{_imageOverlayMessages:e,_imageOverlaysLoaderTask:t,_overlayedLayers:i,dataCaptureEnabled:a,dataCaptureLayer:o,imageOverlaysOpened:n,showCameraLocations:r,showMapFeatures:l,view:d,layer:c}=this,g=a&&!this.viewModel.mode.includes("video");if(!c)return null;const h=c.imageGeometryField?.length?c.imageGeometryField:I,m=c.imageReferenceField?.length?c.imageReferenceField:S;t||(this._imageOverlaysLoaderTask=s(async()=>(await import("./OrientedImageryViewer/components/ImageOverlays.js")).default));const u=this._imageOverlaysLoaderTask?.value;return u?oe(u,{closed:!n,dataCaptureEnabled:g,dataCaptureLayer:o,imageGeometryField:h,imageReferenceField:m,messages:e,overlayedLayers:i,showCameraLocations:r,showMapFeatures:l,view:d,onDataCaptureLayerChanged:this._handleDataCaptureLayerChange,onFilterCapturedFeatures:this.viewModel.filterCapturedFeatures,onImageOverlaysClosed:this._onImageOverlayClosed,onLayerDeselected:this._handleOverlayLayerDeselect,onLayerSelected:this._handleOverlayLayerSelect,onShowCameraLocationsChanged:this._onShowCameraLocationsChanged,onShowMapFeaturesChanged:this._onShowMapFeaturesChanged}):null}get _navigationUI(){const{navigationMode:e,viewModel:t}=this,{mode:i,state:a}=t;if(e&&("default"===i||"panoramic"===i)&&"image-loaded"===a)return"directional"===e?"default"===i?oe(U,{cameraHeadingThreshold:this.cameraHeadingThreshold,cameraPitchThreshold:this.cameraPitchThreshold,currentNode:this.viewModel.currentNode,navigate:this._createNavigationTask,nodes:this.viewModel.navigationNodes,preserveAngle:this.viewModel.preserveAngle}):oe(Z,{currentNode:this.viewModel.currentNode,navigate:this._createNavigationTask,nodes:this.viewModel.navigationNodes}):oe(J,{layout:"horizontal",uiStrings:{end:this.messages.end,next:this.messages.next,previous:this.messages.previous,start:this.messages.start},onNext:this._navigateNext,onPrev:this._navigatePrevious})}get _imageOverlayMessages(){return{...this.messages,...this.messagesSketch}}get _imageSketchToolsMessages(){return{...this.messagesCommon,...this.messagesSketch}}_imageOverlaysPanel(){const{imageOverlaysOpened:e}=this,t=this.classes({[E.imageOverlaysContainer]:!0,[te.hidden]:!e||!this._imageOverlaysEnabled});return oe("div",{class:t,key:this.messages.imageOverlays},this._imageOverlaysComponent)}_imageOverlaysToggle(){const{imageOverlaysOpened:e,invalidCameraHeading:t,visibleElements:{imageOverlays:i}}=this;return i?oe("calcite-action",{active:e,bind:this,disabled:!this._imageOverlaysEnabled||t,icon:"layers",text:this.messages.imageOverlays,title:this.messages.imageOverlays,onclick:this._toggleImageOverlays}):null}get _imageOverlaysEnabled(){return this.viewModel.overlayGraphicsEnabled}get _imageViewer(){const{displayMessage:e,loadImageViewer:t,mode:i,clickAction:a,state:s}=this.viewModel,o=null!=e||"default"!==i||s.includes("loading");return oe(q,{afterCreate:t,clickAction:a,visible:!o})}get _imageViewerTriangular(){const{messages:e,triangularMeasurementActive:t}=this,{displayMessage:i,storeImageMeasurementViewer:a,storePanoramicMeasurementViewer:s,mode:o,state:n,clickAction:r}=this.viewModel,l=null!=i||"none"===o||"video"===o,d=this.classes({[E.viewer]:!l,[E.viewerHidden]:l});return t?oe("calcite-panel",{class:E.viewerContainerMeasurement,heading:e.measurementViewerHeading,loading:n.includes("loading")},oe("calcite-panel",{bind:this,class:d},"default"===o?oe(q,{afterCreate:a,clickAction:r,uiStrings:e}):oe(T,{afterCreate:s,clickAction:r,uiStrings:e}))):null}_utilitiesGroupToggle(){const{utilityTools:e}=this.messages;return this.visibleElements.utilityTools?oe("calcite-action",{bind:this,icon:"tools",key:"utilities-group-toggle",text:e,title:e,onclick:()=>this._toggleGroupSelection("utilities")}):null}_searchGroupToggle(){const{searchTools:e}=this.messages;return this.visibleElements.searchTools?oe("calcite-action",{bind:this,icon:"search",key:"search-group-toggle",text:e,title:e,onclick:()=>this._toggleGroupSelection("search")}):null}get _videoViewer(){const{mode:e,loadVideoViewer:t,videoViewModel:i}=this.viewModel,{control:a,reset:s}=this.messagesCommon,{mute:o,unmute:n}=this.messages,r="video"!==e,l=this.classes({[E.viewer]:!r,[E.viewerHidden]:r}),d="esri-image-viewer",c=`${d}__slider-container`;return oe("calcite-panel",{bind:this,class:l},oe("calcite-panel",{afterCreate:t,class:this.classes(te.widget,d)}),oe("calcite-block",{class:c,expanded:!0},oe("calcite-slider",{bind:this,labelHandles:!0,labelTicks:!0,max:i?.videoDuration,minLabel:"0",value:i?.currentTime??0,onCalciteSliderChange:this._handleVideoSeek})),oe("calcite-action-bar",{expandDisabled:!0,layout:"horizontal"},oe("calcite-action-group",null,oe("calcite-action",{bind:this,icon:this.activeVideoIcon,text:"Play",title:i?.videoPaused?a.play:a.pause,onclick:()=>i?.playVideoHandler()})),oe("calcite-action-group",null,oe("calcite-action",{bind:this,icon:"refresh",text:"Rewind",title:s,onclick:()=>i?.rewindVideoHandler()})),oe("calcite-action-group",null,oe("calcite-action",{bind:this,icon:this.activeAudioIcon,text:"Audio",title:i?.videoMuted?o:n,onclick:()=>i?.toggleAudio()}))))}get _locationToggle(){const{viewModel:{state:e,groundCoordinates:t,groundCoordinatesAccuracy:i,triangulatedPoint:a},imageLocationToolActive:s,triangularMeasurementActive:o,messages:{groundLocation:n,triangulatedLocationHeading:r}}=this;if("image-loaded"!==e||!t||!s)return;let l=t;if(o){if(!a)return;l=a}return oe("calcite-dialog",{bind:this,dragEnabled:!0,escapeDisabled:!0,heading:o?r:n,id:n,open:!0,placement:"bottom-start",resizable:!0,scale:"s",slot:"dialogs",width:"s",onCalciteDialogBeforeClose:this._clearImageLocation},oe(W,{accuracy:i,groundCoordinates:l,messages:this.messages}))}_mapImageConversionToggle(){const{mapImageConversionToolState:e,viewModel:{state:t,disabled:i},videoLoaded:a,invalidCameraHeading:s,visibleElements:{mapImageConversionTool:o}}=this,n=!("video"!==this.viewModel.mode||!a||!this.viewModel.videoViewModel?.videoPaused),r="panoramic-video"===this.viewModel.mode&&this.viewModel.panoramicVideoLoaded&&this.viewModel.panoramicVideoPaused;return o?oe("calcite-action",{active:e,bind:this,disabled:"image-loaded"!==t&&!n&&!r||s||i,icon:"image-pin",text:this.messages.mapImageConversionTool,title:this.messages.mapImageConversionTool,onclick:this._toggleMapImageConversionToolState}):null}_measurementToolToggle(){const{measureType:e,viewModel:t,accuracyParametersMissing:i,messages:a,triangularMeasurementActive:s}=this,{state:o}=t,{groundDistance:n,groundArea:r,heightAboveGround:l,groundLocation:d,triangulatedDistanceHeading:c,triangulatedAreaHeading:g,triangulatedLocationHeading:h}=a,m="image-loaded"!==o||i;return oe("calcite-action-group",{key:"measurement-tools",scale:"m"},oe("calcite-action",{active:"distance"===e&&!s,bind:this,disabled:m,icon:"measure-line",key:"distance-measurement",text:n,title:n,onclick:e=>this._toggleMeasurementSketch(e,"distance")}),oe("calcite-action",{active:"area"===e&&!s,bind:this,disabled:m,icon:"measure-area",key:"area-measurement",text:r,title:r,onclick:e=>this._toggleMeasurementSketch(e,"area")}),oe("calcite-action",{active:"height"===e,bind:this,disabled:m,icon:"measure-building-height-top-base",key:"height-measurement",text:l,title:l,onclick:e=>this._toggleMeasurementSketch(e,"height")}),oe("calcite-action",{active:!!this.imageLocationToolActive&&!s,bind:this,disabled:m,icon:"pin-tear",key:"surface-location",text:d,title:d,onclick:this._toggleLocationTool}),oe("calcite-action",{active:!!s&&this.imageLocationToolActive,bind:this,disabled:m,icon:"dual-image-location",key:"triangular-location",text:h,title:h,onclick:this._toggleTriangularLocation}),oe("calcite-action",{active:!!s&&"distance"===this.measureType,bind:this,disabled:m,icon:"dual-image-distance",key:"triangular-distance",text:c,title:c,onclick:this._toggleTriangularDistanceMeasurements}),oe("calcite-action",{active:!!s&&"area"===this.measureType,bind:this,disabled:m,icon:"dual-image-area",key:"triangular-area",text:g,title:g,onclick:this._toggleTriangularAreaMeasurements}))}get _messageBox(){const{messages:e,viewModel:{displayMessage:t,mode:a}}=this;if(!t||"video"===a)return null;const{key:s,map:o,type:n}=t,r=`${o?i(e[s],o):e[s]}`,l="error"===n?"danger":"warn"===n?"warning":"info";return oe("calcite-notice",{appearance:"transparent",class:E.notice,icon:ie[l],kind:l,open:!0},oe("div",{slot:"message"},r))}async _loadNavigationSettings(){return this._navigationSettingsLoaderTask||(this._navigationSettingsLoaderTask=s(async()=>(await import("./OrientedImageryViewer/components/NavigationSettings.js")).default)),await this._navigationSettingsLoaderTask.promise}_measurementsGroupToggle(){const{measurementTools:e}=this.messages,{state:t,accuracyParametersMissing:i}=this.viewModel,a="image-loaded"!==t||i;return this.visibleElements.measurementTools?oe("calcite-action",{bind:this,disabled:a,icon:"measure-line",key:"measurements-group-toggle",text:e,title:e,onclick:()=>this._toggleGroupSelection("measurements")}):null}_navigationGroupToggle(){const{imageNavigation:e}=this.messages;return this.visibleElements.imageNavigationTools?oe("calcite-action",{bind:this,icon:"absolute-direction",key:"navigation-group-toggle",text:e,title:e,onclick:()=>this._toggleGroupSelection("navigation")}):null}_navigationToolToggle(){const{state:e}=this.viewModel,{visibleElements:{navigationTool:t},videoLoaded:i}=this;return t?oe("calcite-action",{active:this.navigationToolActive,bind:this,disabled:"image-loaded"!==e&&!i||this.invalidCameraHeading,icon:"explore",text:this.messages.navigationTool,title:this.messages.navigationTool,onclick:this._toggleNavigationTool}):null}_directionToolsToggle(){const{messages:e,viewModel:t,visibleElements:i}=this,{directionalNavigation:a,sequentialNavigation:s}=i,{state:o}=t,{directionalNavigation:n,directionalNavigationDescription:r,sequentialNavigation:l,sequentialNavigationDescription:d}=e;return oe("calcite-action-group",{key:"navigation-tools",scale:"m"},a?oe("calcite-action",{active:"directional"===this.navigationMode,bind:this,disabled:"image-loaded"!==o||this.invalidCameraHeading,icon:"directional-navigation",text:r,title:n,onclick:()=>{this._toggleImageNavigation("directional")}}):null,s?oe("calcite-action",{active:"sequential"===this.navigationMode,bind:this,disabled:"image-loaded"!==o||this.invalidCameraHeading||!this.canNavigateSequentially,icon:"sequential-navigation",text:d,title:l,onclick:()=>{this._toggleImageNavigation("sequential")}}):null)}_overlaysGroupToggle(){const{overlays:e}=this.messages;return this.visibleElements.overlays?oe("calcite-action",{bind:this,icon:"oriented-imagery-overlays",key:"overlays-group-toggle",text:e,title:e,onclick:()=>this._toggleGroupSelection("overlays")}):null}_openPopupAction(){const{showPopupsAction:e}=this.visibleElements;return e?oe("calcite-action",{bind:this,disabled:!this.popupEnabled,icon:"popup",text:this.messages.showPopups,title:this.messages.showPopups,onclick:this._toggleImageAttributes}):null}get _panoramicVideoViewer(){const{displayMessage:e,loadPanoramicVideoViewer:t,mode:i,clickAction:a,state:s,currentBestFeature:o}=this.viewModel,n=o?.attributes.imagePath,r=null!=e||"panoramic-video"!==i||s.includes("loading")||!n;return oe(M,{afterCreate:t,clickAction:a,oiViewModel:this.viewModel,videoSource:n,visible:!r})}get _panoramicViewer(){const{displayMessage:e,loadPanoramicViewer:t,mode:i,clickAction:a,state:s}=this.viewModel,o=null!=e||"panoramic"!==i||s.includes("loading");return oe(T,{afterCreate:t,clickAction:a,visible:!o})}get noImageInSequenceError(){return this._get("noImageInSequenceError")??!1}_activateTriangulatedImageLocationTool(){this.navigationToolActive=!0,this.imageLocationToolActive=!0}_activateTriangulatedImageLocationWorkflow(e,t){this._closeAllImageTools(),this.imageLocationToolActive=!0,this.triangularMeasurementActive=!e,this.navigationToolActive=!!t||!t}_closeImageToolsAndToggleNavigation(e,t){this._closeAllImageTools(),this.triangularMeasurementActive=!e,this.navigationToolActive=!t}_resetMeasureTypeAndActivateImageLocationTool(){this.measureType=null,this.imageLocationToolActive=!0}_closeAllImageTools(){this.enhancementToolActive=!1,this.navigationToolActive=!1,this.imageOverlaysOpened=!1,this.galleryOpened=!1,this.measureType=null,this.imageLocationToolActive=!1,this.navigationMode=null,this.triangularMeasurementActive=!1,this._settingsToggle&&(this._settingsToggle.expanded=!1,this.viewModel.activeViewer?.ui.remove(this._settingsToggle))}_handleBrightnessChange(e){this.viewModel.brightness=e.currentTarget.value??0}_handleVideoBrightnessChange(e){this.viewModel.videoViewModel?.handleVideoBrightnessChange(e.target.value)}_handleContrastChange(e){this.viewModel.contrast=e.currentTarget.value??0}_handleVideoContrastChange(e){this.viewModel.videoViewModel?.handleVideoContrastChange(e.target.value)}_handleVideoSeek(e){const t=this.viewModel?.videoElement?.content;t&&(t.currentTime=e.target.value,t.play())}_handleSharpnessChange(e){this.viewModel.sharpness=e.currentTarget.value??0}_handleSuperimposeZOffsetChange(e){const t=e.currentTarget.value??0;if("default"===this.viewModel.mode)return this._defaultSuperimposeZOffsetPercentage=t,void this.viewModel.setDefaultSuperimposeZOffsetPercentage(100-t);this._panoramicSuperimposeRadiusOffsetPercentage=t,this.viewModel.setPanoramicSuperimposeRadiusPercentage(100-t)}_lazyLoadImage(e,t){e.forEach(async e=>{if(e.isIntersecting){const a=e.target,s=a.getAttribute("data-src"),o=a.getAttribute("data-rotation"),n=a.getAttribute("data-objectid"),r=o?parseFloat(o)%360:0,{layer:c,_galleryController:{signal:g}}=this;if(!s||!n)return;let h;try{h=G(s)?await N(c,n,{signal:g}):await D(s,{signal:g})}catch(i){d(i)||l.getLogger("esri.widgets.OrientedImageryViewer").error("#lazyLoadImage()",i)}finally{t.unobserve(a)}if(!h)return;H(h,a,r)}})}_loadImageFromGallery(e){const{target:t}=e;if(!t)return;const i=t.getAttribute("data-objectid");i&&this.viewModel.currentBestFeature?.attributes.objectId!==Number(i)&&this.viewModel.selectBestFeature(i)}_loadImageMeasurementResources(){this._imageMeasurementToolsLoaderTask=s(async()=>{const{default:e}=await import("./OrientedImageryViewer/components/ImageMeasurementWidget.js");return e})}_loadSketchResources(){this._sketchLoaderTask=s(async()=>(await import("./OrientedImageryViewer/components/SketchTools.js")).default)}_onAdditionalCoverageVisibilityChange(e){this.viewModel.setAdditionalCoverageVisibility(e)}_onAdditionalCameraLocationsVisibility(e){this.viewModel.setAdditionalCameraLocationsVisibility(e)}_onCurrentCoverageVisibilityChange(e){this.viewModel.setCurrentCoverageVisibility(e)}_registerGalleryItem(e){this._galleryObserver.observe(e)}_renderWarning(e,t,i){const{viewModel:{state:a}}=this;return"image-loaded"===a?oe(R,{icon:"exclamation-mark-triangle-f",kind:"warning",message:t,open:!0,title:e,tooltip:t,topLayerDisabled:this.topLayerDisabled,onClose:i}):null}get _renderNavigation(){const{viewModel:{sectorData:e,navigatorCurrentBestFeature:t,currentBestFeature:i,state:s}}=this;if(!this.container||!i)return null;let o,n,r,l,d;if(t){const{x:e,y:i,direction:a}=t,[s,c,g,h]=A[a];o=`M ${e} ${i} L ${s} ${c} A ${L[2]} ${L[2]} 0 0 1 ${g} ${h} Z`,n=e,l=i,r=A[a][4],d=A[a][5]}const c=e=>{const t=e.target.dataset?.sector;t&&this.viewModel.handleSectorClick(+t)},g=e=>{const t=e.target.dataset;if(!t)return;const{featureIndexInSector:i,sector:a}=t;i&&a&&this.viewModel.handleFeatureClick({sector:a,featureIndexInSector:+i})},h=e=>{e.removeEventListener("click",g)},m=i.attributes.objectId,u=e?.map(e=>e?.items).filter(Boolean).flatMap(e=>e?.map(({x:e,y:t,objectID:i,featureIndexInSector:a,sector:s})=>oe("circle",{afterRemoved:h,class:this.classes(E.feature,{selected:m===i}),cx:e,cy:t,"data-feature-index-in-sector":a,"data-sector":s,key:`${E.feature}-${i}`,r:k,onclick:g}))),p=e=>{e.removeEventListener("click",c)},v=this.classes({[E.navigationWrapper]:!0,[E.navigationWrapperVideo]:this.viewModel.mode.includes("video"),[E.navigationZoomed]:this._navigationToolExpanded});return this.navigationToolActive&&("image-loaded"===s||this.videoLoaded)?oe("div",{bind:this,class:v,key:this.messages.navigationTool},oe("svg",{afterCreate:e=>this._storeNavigationToolReference(e),class:a()?O:E.rotateWithAnimation,focusable:"false",height:V,role:"img",width:V,xmlns:"http://www.w3.org/2000/svg"},oe("defs",null,oe("linearGradient",{gradientUnits:"userSpaceOnUse",id:`${this.id}-coverage-fill`,x1:n,x2:r,y1:l,y2:d},oe("stop",{class:E.navigationPathOffset0,offset:0}),oe("stop",{class:E.navigationPathOffset1,offset:1}))),oe("g",null,oe("circle",{class:this.classes(E.sector,E.outerSector),cx:L[3],cy:L[3],r:L[3],onclick:this._scaleNavigationTool}),oe("circle",{class:E.sector,cx:L[3],cy:L[3],r:L[2]}),oe("circle",{class:E.sector,cx:L[3],cy:L[3],r:L[1]}),oe("circle",{class:E.sector,cx:L[3],cy:L[3],r:L[0]}),oe("path",{class:E.pointer,d:"M 56.5 6.06217782649107 L 60 0 L 63.5 6.06217782649107 Z",key:`${E.pointer}-west`}),oe("path",{class:this.classes(E.pointer,E.north),d:"M 113.93782217350893 56.5 L 120 60 L 113.93782217350893 63.5 Z",key:`${E.pointer}-north`}),oe("path",{class:E.pointer,d:"M 56.5 113.93782217350893 L 60 120 L 63.5 113.93782217350893 Z",key:`${E.pointer}-east`}),oe("path",{class:E.pointer,d:"M 6.06217782649107 56.5 L 0 60 L 6.06217782649107 63.5 Z",key:`${E.pointer}-south`}),oe("path",{class:this.classes(E.sector,E.sectorSeparator),d:"M 23.937554159486076 23.937554159486076 L 96.06244584051393 96.06244584051393 M 23.937554159486076 96.06244584051393 L 96.06244584051393 23.937554159486076",key:E.sectorSeparator}),C([L[2],L[1],L[0]],L[3],L[3]).map((t,i)=>oe("path",{afterRemoved:p,class:this.classes(E.sector,e?.[i]?.length?E.sectorEnabled:E.sectorDisabled),d:t,"data-sector":`${i}`,key:`${E.sector}-${i}`,onclick:c})),oe("path",{class:this.classes(E.sector,E.sectorCross),d:"M 56.4 56.4 L 63.53 63.53 M 63.53 56.4 L 56.4 63.53",key:E.sectorCross}),u,i.attributes.cameraPitch>=5&&o?oe("path",{class:E.selectedFeaturePath,d:o,fill:`url(#${this.id}-coverage-fill)`,key:E.selectedFeaturePath}):null))):null}_renderSketch(){const{dataCaptureLayer:e,imageOverlaysOpened:t}=this;if(!e||t)return null;if(this._sketchLoaderTask||this._loadSketchResources(),!this._sketchLoaderTask?.value)return null;const{geometryType:i}=e,a="point"===i?"pin":"polyline"===i?"line":"polygon",s=this._sketchLoaderTask.value;return oe("div",{class:E.sketchTools},oe(s,{icon:a,messages:this._imageSketchToolsMessages,type:i,onAction:this._onAction}))}get _renderThumbnails(){const{currentBestFeature:e,thumbnails:t}=this.viewModel;return e?oe("div",{class:E.carouselContent},t?.items.map(({url:t,objectId:i,rotation:a},s)=>oe("div",{class:`${E.carouselItemWrapper}${e.attributes.objectId===i?"--selected":""}`,key:`${E.carouselItemWrapper}-${s}`},oe("canvas",{afterCreate:this._registerGalleryItem,afterRemoved:this._unregisterGalleryItem,alt:`thumbnail-${i}`,class:E.carouselItem,"data-objectid":`${i}`,"data-rotation":`${a}`,"data-src":t,onclick:this._loadImageFromGallery,onmouseenter:this._highlight,onmouseleave:this._removeHighlight})))):null}_resetImageTools(){this.viewModel.sharpness=this.viewModel.brightness=this.viewModel.contrast=0}_resetVideoTools(){this.viewModel.videoViewModel?.resetVideoEnhancementTools()}_storeNavigationToolReference(e){this._navigationTool=e}_toggleAdditionalCameraLocations(){this.isAdditionalPointSourcesVisible=!this.isAdditionalPointSourcesVisible}_toggleAdditionalCoverage(){this.isAdditionalCoverageVisible=!this.isAdditionalCoverageVisible}_toggleCurrentCoverage(){this.currentCoverageVisible=!this.currentCoverageVisible}_toggleShowSelectedImage(){this.shouldShowSelectedImage=!this.shouldShowSelectedImage,this._toggleDisabledViewer(this.shouldShowSelectedImage)}_resetSuperimposeOffset(){if("default"===this.viewModel.mode)return this._defaultSuperimposeZOffsetPercentage=100,void this.viewModel.setDefaultSuperimposeZOffsetPercentage(0);this._panoramicSuperimposeRadiusOffsetPercentage=100,this.viewModel.setPanoramicSuperimposeRadiusPercentage(0)}_toggleSuperimposeCameraLock(){this.viewModel.updateDefaultSuperimposeCameraLock(!this.defaultSuperimposeCameraLockEnabled)}_toggleSuperimposeView(){this.superimposeViewEnabled=!this.superimposeViewEnabled}_toggleVerticalSearchFilter(){this.verticalFilterEnabled=!this.verticalFilterEnabled,this._toggleDisabledViewer(this.verticalFilterEnabled)}_toggleDisabledViewer(e){e&&(this.disabled=!1)}_toggleEnhancementToolState(e){e.stopPropagation();const t=this.enhancementToolActive;this._closeAllImageTools(),this.enhancementToolActive=!t}_toggleExploreImages(){this.disabled=!this.disabled,this.disabled&&(this.shouldShowSelectedImage=!1,this.verticalFilterEnabled=!1)}_toggleGroupSelection(e){this.selectedGroup=e}_toggleImageOverlays(e){e.stopPropagation();const t=this.imageOverlaysOpened;this._closeAllImageTools(),this.imageOverlaysOpened=!t}_toggleImageGallery(e){e.stopPropagation();const t=this.galleryOpened;this._closeAllImageTools(),this.galleryOpened=!!this.imageGalleryEnabled&&!t}_toggleLocationTool(e){const t=this.imageLocationToolActive,i=this.triangularMeasurementActive&&t;this._closeAllImageTools(),this.imageLocationToolActive=i||!t,e.stopPropagation()}_toggleMeasurementSketch(e,t){e.stopPropagation();const i=this.measureType,a=this.triangularMeasurementActive;this._closeAllImageTools(),this.measureType=i!==t||a?t:null,this.measureType===t&&(this.viewModel.displayNewMeasurementButton=!0)}_toggleNavigationTool(){const e=this.navigationToolActive;this._closeAllImageTools(),this.navigationToolActive=!e}_toggleMapImageConversionToolState(){this.mapImageConversionToolState=!this.mapImageConversionToolState}_toggleTriangularAreaMeasurements(){this._toggleTriangularMeasurements("area")}_toggleTriangularDistanceMeasurements(){this._toggleTriangularMeasurements("distance")}_toggleTriangularLocation(){const e=this.triangularMeasurementActive,t=this.navigationToolActive;e?null===this.measureType?this.imageLocationToolActive?this._closeImageToolsAndToggleNavigation(e,t):this._activateTriangulatedImageLocationTool():this._resetMeasureTypeAndActivateImageLocationTool():this._activateTriangulatedImageLocationWorkflow(e,t)}_toggleTriangularMeasurements(e){const t=this.triangularMeasurementActive,i=this.viewModel.measureType,a=this.navigationToolActive;t?e===i?(this._closeAllImageTools(),this.triangularMeasurementActive=!t,this.navigationToolActive=!a):(this.imageLocationToolActive=!1,this.measureType=e,this.viewModel.displayNewMeasurementButton=!0):(this._closeAllImageTools(),this.measureType=e,this.triangularMeasurementActive=!t,this.navigationToolActive=!!a||!a,this.viewModel.displayNewMeasurementButton=!0)}_unregisterGalleryItem(e){this._galleryObserver.unobserve(e)}_updateNavigationTool(e){const{previousFeatureAngle:t,bestFeatureAngle:i}=this.viewModel,a=(i-t+540)%360-180;e.style.setProperty(P,`${t}deg`),e.style.setProperty(F,`${t+a}deg`)}async loadBestImage(e,t){return this.viewModel.loadBestImage(e,t)}loadImageFromSource(e,t,i){return"default"===e?this.viewModel.loadMediaSource(t,i):this.viewModel.loadPanoramicMediaSource(t,i)}async overlayMapFeatures(e,t){return this.removeHandles(`${ne.overlayed}-${e.id}`),this.addHandles(c(()=>e.visible,()=>{this.viewModel.toggleOverlayMapFeatures(e.id,e.visible,this.showMapFeatures)}),`${ne.overlayed}-${e.id}`),this._overlayedLayers.add(e),this.viewModel.overlayMapFeatures(e,t&&this.showMapFeatures)}async plotMapPoint(e){return this.viewModel.plotMapPoint(e)}plotReferencePointOnGround(e){this.viewModel.plotReferencePointOnGround(e)}plotReferencePointOnImage(e){this.viewModel.plotReferencePointOnImage(e)}removeOverlayedGraphicsOnImage(e){this.removeHandles(`${ne.overlayed}-${e}`),this._overlayedLayers.remove(this._overlayedLayers.find(t=>t.id===e)),this.viewModel.removeOverlayedGraphicsOnImage(e)}resetImage(){this.viewModel.resetImage()}render(){return oe("div",{class:this.classes(te.widget,x)},this._renderRoot)}async showImageByObjectId(e,t){return this.viewModel.showImageByObjectId(e,t)}async startDataCapture(e){return this.viewModel.startDataCapture(e)}async stopDataCapture(e){return this.viewModel.stopDataCapture(e)}updateSuitabilities(e){this.viewModel.updateSuitabilities(e)}};e([v({readOnly:!0})],re.prototype,"accuracyParametersMissing",null),e([v()],re.prototype,"activeLayer",null),e([v()],re.prototype,"activeVideoIcon",null),e([v()],re.prototype,"activeAudioIcon",null),e([v()],re.prototype,"cameraHeadingThreshold",null),e([v()],re.prototype,"cameraPitchThreshold",null),e([v()],re.prototype,"canNavigateSequentially",null),e([v()],re.prototype,"currentBestFeature",null),e([v()],re.prototype,"currentCoverageVisible",null),e([v()],re.prototype,"dataCaptureEnabled",void 0),e([v()],re.prototype,"dataCaptureLayer",null),e([v()],re.prototype,"depthImageNotSupported",null),e([v()],re.prototype,"disabled",null),e([v()],re.prototype,"enhancementToolActive",null),e([v()],re.prototype,"features",null),e([v()],re.prototype,"imagePointsInView",null),e([v()],re.prototype,"galleryOpened",void 0),e([v()],re.prototype,"icon",null),e([v()],re.prototype,"imageEnhancementToolActive",void 0),e([v()],re.prototype,"videoEnhancementToolActive",void 0),e([v({readOnly:!0})],re.prototype,"imageGalleryEnabled",null),e([v()],re.prototype,"imageLocationToolActive",null),e([v()],re.prototype,"imageOverlaysOpened",void 0),e([v({readOnly:!0})],re.prototype,"invalidCameraHeading",null),e([v()],re.prototype,"isAdditionalCoverageVisible",null),e([v()],re.prototype,"isAdditionalPointSourcesVisible",null),e([v()],re.prototype,"mapImageConversionToolState",null),e([v()],re.prototype,"measureType",null),e([v()],re.prototype,"layer",null),e([v()],re.prototype,"navigationToolActive",void 0),e([v()],re.prototype,"navigationMode",null),e([ae(f()),v({type:j})],re.prototype,"viewModel",void 0),e([v(),se("esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer")],re.prototype,"messages",void 0),e([v(),se("esri/core/t9n/Units")],re.prototype,"measurementUnitMessages",void 0),e([v(),se("esri/t9n/common")],re.prototype,"messagesCommon",void 0),e([v(),se("esri/widgets/Sketch/t9n/Sketch")],re.prototype,"messagesSketch",void 0),e([v()],re.prototype,"pixelMeasurementUnit",void 0),e([v()],re.prototype,"pixelAreaMeasurementUnit",void 0),e([v({readOnly:!0})],re.prototype,"popupEnabled",null),e([v()],re.prototype,"preloadMedia",null),e([v()],re.prototype,"referencePoint",null),e([v()],re.prototype,"selectedGroup",void 0),e([v()],re.prototype,"showCameraLocations",void 0),e([v()],re.prototype,"showMapFeatures",void 0),e([ae(["create","delete","redo","undo","update"]),v({readOnly:!0})],re.prototype,"sketchViewModel",null),e([v()],re.prototype,"triangularMeasurementActive",null),e([v()],re.prototype,"videoLoaded",null),e([v()],re.prototype,"view",null),e([v({type:B,nonNullable:!0})],re.prototype,"visibleElements",void 0),e([v()],re.prototype,"determineWorkflowForFeature",null),e([v()],re.prototype,"shouldShowSelectedImage",null),e([v()],re.prototype,"superimposeViewEnabled",null),e([v()],re.prototype,"defaultSuperimposeCameraLockEnabled",null),e([v()],re.prototype,"updateFootprint",null),e([v()],re.prototype,"verticalFilterEnabled",null),e([v()],re.prototype,"_defaultSuperimposeZOffsetPercentage",void 0),e([v()],re.prototype,"_panoramicSuperimposeRadiusOffsetPercentage",void 0),e([v()],re.prototype,"_activeMeasurementHeading",null),e([v()],re.prototype,"_imageOverlaysLoaderTask",void 0),e([v()],re.prototype,"_imageMeasurementToolsLoaderTask",void 0),e([v()],re.prototype,"_navigationSettingsLoaderTask",void 0),e([v()],re.prototype,"_navigationTask",void 0),e([v()],re.prototype,"_measurementToggle",null),e([v()],re.prototype,"_renderRoot",null),e([v()],re.prototype,"_imageEnhancementTools",null),e([v()],re.prototype,"_videoEnhancementTools",null),e([v()],re.prototype,"_superimposeTools",null),e([v()],re.prototype,"_imageGalleryPanel",null),e([v()],re.prototype,"_imageGalleryContext",null),e([v()],re.prototype,"_imageOverlaysComponent",null),e([v()],re.prototype,"_navigationUI",null),e([v()],re.prototype,"_imageOverlayMessages",null),e([v()],re.prototype,"_imageSketchToolsMessages",null),e([v()],re.prototype,"_imageOverlaysEnabled",null),e([v()],re.prototype,"_imageViewer",null),e([v()],re.prototype,"_imageViewerTriangular",null),e([v()],re.prototype,"_videoViewer",null),e([v()],re.prototype,"_locationToggle",null),e([v()],re.prototype,"_messageBox",null),e([v()],re.prototype,"_navigationToolExpanded",void 0),e([v()],re.prototype,"_navigationTool",void 0),e([v()],re.prototype,"_panoramicVideoViewer",null),e([v()],re.prototype,"_panoramicViewer",null),e([v({readOnly:!0})],re.prototype,"noImageInSequenceError",null),e([v()],re.prototype,"_renderNavigation",null),e([v()],re.prototype,"_renderThumbnails",null),e([v()],re.prototype,"_sketchLoaderTask",void 0),re=e([y("esri.widgets.OrientedImageryViewer")],re);const le=re;export{le as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import e from"../../core/Accessor.js";import{isSome as i}from"../../core/arrayUtils.js";import s from"../../core/Collection.js";import{IdentifiableMixin as l}from"../../core/Identifiable.js";import{watch as r,initial as o}from"../../core/reactiveUtils.js";import{property as n,cast as a,subclass as h}from"../../core/accessorSupport/decorators.js";import{ensureType as d}from"../../core/accessorSupport/ensureType.js";import{get as p}from"../../core/accessorSupport/get.js";import c from"../../support/actions/ActionBase.js";import y from"../../support/actions/ActionButton.js";import u from"../../support/actions/ActionToggle.js";import{canDisplayLayer as m,findLayerListMode as b,getNormalizedChildLayerProperty as f}from"../LayerList/support/layerListUtils.js";import C from"./ListItemPanel.js";var _;const g="layer",v="child-list-mode",P="hide",I=s.ofType({key:"type",defaultKeyValue:"button",base:c,typeMap:{button:y,toggle:u}}),S=s.ofType(I);let M=_=class extends(l(e)){constructor(t){super(t),this.actionsSections=new S,this.actionsOpen=!1,this.checkPublishStatusEnabled=!1,this.children=new(s.ofType(_)),this.hidden=!1,this.layer=null,this.listItemCreatedFunction=null,this.listModeDisabled=!1,this.open=!1,this.parent=null,this.sortable=!0}initialize(){if(this.addHandles([r(()=>[this.layer?.listMode,this.listModeDisabled],()=>this._watchLayerProperties(this.layer),o),r(()=>this.checkPublishStatusEnabled,t=>this._updateChildrenPublishing(t),o),r(()=>this.panel,t=>this._setListItemOnPanel(t),o)]),"function"==typeof this.listItemCreatedFunction){const t={item:this};this.listItemCreatedFunction.call(null,t)}}destroy(){this.panel?.destroy(),this.children.destroyAll()}get error(){return this.layer?.loadError}set panel(t){const e=this._get("panel");t!==e&&t&&e?.destroy(),this._set("panel",t)}castPanel(t){return this.panel?.open&&!t.hasOwnProperty("open")&&(t.open=!0),d(C,t)}get publishing(){const{layer:t,checkPublishStatusEnabled:e}=this;return(e&&t&&"publishingInfo"in t&&"publishing"===t.publishingInfo?.status)??!1}get title(){const t=p(this,"layer.layer");return(!t||t&&p(this,"layer.layer.loaded")?this.layer?.title:null)??""}set title(t){this._overrideIfSome("title",t)}clone(){return new _({actionsSections:this.actionsSections.clone(),actionsOpen:this.actionsOpen,checkPublishStatusEnabled:this.checkPublishStatusEnabled,children:this.children.clone(),hidden:this.hidden,layer:this.layer,listItemCreatedFunction:this.listItemCreatedFunction,listModeDisabled:this.listModeDisabled,open:this.open,panel:this.panel,parent:this.parent,sortable:this.sortable,title:this.title})}_updateChildrenPublishing(t){this.children?.forEach(e=>e.checkPublishStatusEnabled=t)}_setListItemOnPanel(t){t&&(t.listItem=this)}_createChildItems(t,e){return t.reverse().map(t=>e||m(t)?new _({layer:t,checkPublishStatusEnabled:this.checkPublishStatusEnabled,listItemCreatedFunction:this.listItemCreatedFunction,listModeDisabled:this.listModeDisabled,parent:this}):null).filter(i)}_createChildren(t){const{listModeDisabled:e,children:i}=this,s=t.reverse().filter(t=>!i.some(e=>e.layer===t));i.addMany(this._createChildItems(s,e))}_destroyChildren(t){const{children:e}=this,i=e.filter(e=>!!e.layer&&!t.includes(e.layer));e.destroyMany(i)}_sortChildren(t){this.children.sort((e,i)=>t.indexOf(i.layer)-t.indexOf(e.layer))}_destroyAllChildren(){this.removeHandles(v),this.children.destroyAll()}_compileChildren(t){const e=this.listModeDisabled?t:t?.filter(t=>b(t)!==P);t?.length?(this._createChildren(e),this._destroyChildren(e),this._sortChildren(e),this._watchChildLayerListMode(t)):this._destroyAllChildren()}_watchChildLayerListMode(t){this.removeHandles(v),this.listModeDisabled||this.addHandles(t.toArray().map(e=>r(()=>e.listMode,()=>this._compileChildren(t))),v)}_watchSublayerChanges(t){t&&this.addHandles(t.on("change",()=>this._compileChildren(t)),g)}_initializeChildLayers(t){this._compileChildren(t),this._watchSublayerChanges(t)}_watchLayerProperties(t){if(this.removeHandles(g),this.removeHandles(v),!t)return;t.load().catch(()=>{});if("hide-children"===(!this.listModeDisabled&&b(t)))return void this.children.destroyAll();const e=f(t);e&&this.addHandles(r(()=>t[e],i=>{t.hasOwnProperty(e)&&this._initializeChildLayers(i)},o),g)}};t([n({type:S})],M.prototype,"actionsSections",void 0),t([n()],M.prototype,"actionsOpen",void 0),t([n()],M.prototype,"checkPublishStatusEnabled",void 0),t([n({type:s.ofType(
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../core/Accessor.js";import{isSome as i}from"../../core/arrayUtils.js";import s from"../../core/Collection.js";import{IdentifiableMixin as l}from"../../core/Identifiable.js";import{watch as r,initial as o}from"../../core/reactiveUtils.js";import{property as n,cast as a,subclass as h}from"../../core/accessorSupport/decorators.js";import{ensureType as d}from"../../core/accessorSupport/ensureType.js";import{get as p}from"../../core/accessorSupport/get.js";import c from"../../support/actions/ActionBase.js";import y from"../../support/actions/ActionButton.js";import u from"../../support/actions/ActionToggle.js";import{canDisplayLayer as m,findLayerListMode as b,getNormalizedChildLayerProperty as f}from"../LayerList/support/layerListUtils.js";import C from"./ListItemPanel.js";var _;const g="layer",v="child-list-mode",P="hide",I=s.ofType({key:"type",defaultKeyValue:"button",base:c,typeMap:{button:y,toggle:u}}),S=s.ofType(I);let M=_=class extends(l(e)){constructor(t){super(t),this.actionsSections=new S,this.actionsOpen=!1,this.checkPublishStatusEnabled=!1,this.children=new(s.ofType(_)),this.hidden=!1,this.layer=null,this.listItemCreatedFunction=null,this.listModeDisabled=!1,this.open=!1,this.parent=null,this.sortable=!0}initialize(){if(this.addHandles([r(()=>[this.layer?.listMode,this.listModeDisabled],()=>this._watchLayerProperties(this.layer),o),r(()=>this.checkPublishStatusEnabled,t=>this._updateChildrenPublishing(t),o),r(()=>this.panel,t=>this._setListItemOnPanel(t),o)]),"function"==typeof this.listItemCreatedFunction){const t={item:this};this.listItemCreatedFunction.call(null,t)}}destroy(){this.panel?.destroy(),this.children.destroyAll()}get error(){return this.layer?.loadError}set panel(t){const e=this._get("panel");t!==e&&t&&e?.destroy(),this._set("panel",t)}castPanel(t){return this.panel?.open&&!t.hasOwnProperty("open")&&(t.open=!0),d(C,t)}get publishing(){const{layer:t,checkPublishStatusEnabled:e}=this;return(e&&t&&"publishingInfo"in t&&"publishing"===t.publishingInfo?.status)??!1}get title(){const t=p(this,"layer.layer");return(!t||t&&p(this,"layer.layer.loaded")?this.layer?.title:null)??""}set title(t){this._overrideIfSome("title",t)}clone(){return new _({actionsSections:this.actionsSections.clone(),actionsOpen:this.actionsOpen,checkPublishStatusEnabled:this.checkPublishStatusEnabled,children:this.children.clone(),hidden:this.hidden,layer:this.layer,listItemCreatedFunction:this.listItemCreatedFunction,listModeDisabled:this.listModeDisabled,open:this.open,panel:this.panel,parent:this.parent,sortable:this.sortable,title:this.title})}_updateChildrenPublishing(t){this.children?.forEach(e=>e.checkPublishStatusEnabled=t)}_setListItemOnPanel(t){t&&(t.listItem=this)}_createChildItems(t,e){return t.reverse().map(t=>e||m(t)?new _({layer:t,checkPublishStatusEnabled:this.checkPublishStatusEnabled,listItemCreatedFunction:this.listItemCreatedFunction,listModeDisabled:this.listModeDisabled,parent:this}):null).filter(i)}_createChildren(t){const{listModeDisabled:e,children:i}=this,s=t.reverse().filter(t=>!i.some(e=>e.layer===t));i.addMany(this._createChildItems(s,e))}_destroyChildren(t){const{children:e}=this,i=e.filter(e=>!!e.layer&&!t.includes(e.layer));e.destroyMany(i)}_sortChildren(t){this.children.sort((e,i)=>t.indexOf(i.layer)-t.indexOf(e.layer))}_destroyAllChildren(){this.removeHandles(v),this.children.destroyAll()}_compileChildren(t){const e=this.listModeDisabled?t:t?.filter(t=>b(t)!==P);t?.length?(this._createChildren(e),this._destroyChildren(e),this._sortChildren(e),this._watchChildLayerListMode(t)):this._destroyAllChildren()}_watchChildLayerListMode(t){this.removeHandles(v),this.listModeDisabled||this.addHandles(t.toArray().map(e=>r(()=>e.listMode,()=>this._compileChildren(t))),v)}_watchSublayerChanges(t){t&&this.addHandles(t.on("change",()=>this._compileChildren(t)),g)}_initializeChildLayers(t){this._compileChildren(t),this._watchSublayerChanges(t)}_watchLayerProperties(t){if(this.removeHandles(g),this.removeHandles(v),!t)return;t.load().catch(()=>{});if("hide-children"===(!this.listModeDisabled&&b(t)))return void this.children.destroyAll();const e=f(t);e&&this.addHandles(r(()=>t[e],i=>{t.hasOwnProperty(e)&&this._initializeChildLayers(i)},o),g)}};t([n({type:S})],M.prototype,"actionsSections",void 0),t([n()],M.prototype,"actionsOpen",void 0),t([n()],M.prototype,"checkPublishStatusEnabled",void 0),t([n({type:s.ofType(_)})],M.prototype,"children",void 0),t([n({readOnly:!0})],M.prototype,"error",null),t([n()],M.prototype,"hidden",void 0),t([n()],M.prototype,"layer",void 0),t([n()],M.prototype,"listItemCreatedFunction",void 0),t([n({nonNullable:!0})],M.prototype,"listModeDisabled",void 0),t([n()],M.prototype,"open",void 0),t([n({type:C})],M.prototype,"panel",null),t([a("panel")],M.prototype,"castPanel",null),t([n()],M.prototype,"parent",void 0),t([n({readOnly:!0})],M.prototype,"publishing",null),t([n()],M.prototype,"sortable",void 0),t([n()],M.prototype,"title",null),M=_=t([h("esri.widgets.TableList.ListItem")],M);export{M as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2314],{39933(e,t,l){l.r(t),l.d(t,{build:()=>s.b}),l(32680),l(34711),l(76597),l(24321),l(2585),l(43519),l(96336),l(39014),l(53466),l(92700),l(35640),l(9169),l(72233),l(32971),l(98619),l(22393),l(59469),l(32482),l(51406),l(43259),l(58614),l(27950),l(77949),l(33079),l(71988),l(20304),l(31821),l(63761),l(27832),l(43616),l(26934),l(47630),l(14113);var s=l(57323)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3819],{563(e,t,s){s.d(t,{QueueProcessor:()=>u,SharedConcurrency:()=>h});var r=s(97768),n=s(17676),i=s(9775),o=s(32587),a=s(76030),l=s(44794);class u{constructor(e){this._schedule=null,this._deferreds=new o.A,this._controllers=new o.A,this._processingItems=new o.A,this._pausedSignal=(0,l.v)(!1),this.process=e.process,this.concurrency=e.concurrency,this.sharedConcurrency=e.sharedConcurrency??d,this._queue=new i.A(e.peeker)}destroy(){this.clear(),this._schedule=(0,r.xt)(this._schedule)}get updating(){return this.running}get length(){return this._processingItems.size+this._queue.length}get running(){return!this._pausedSignal.value&&this._queue.length>0&&!this.full}get full(){return this._processingItems.size>=this.concurrency||this.sharedConcurrency.full}abort(e){const t=this._controllers.get(e);t?.abort()}clear(){this._queue.clear();const e=Array.from(this._controllers.values());this._controllers.clear(),e.forEach(e=>e.abort()),this.sharedConcurrency.current.value-=this._processingItems.size,this._processingItems.clear(),this._cancelNext()}forEach(e){this._deferreds.forEach((t,s)=>e(s))}_get(e){const t=this._deferreds.get(e);return t?.promise}pause(){this._pausedSignal.value||(this._pausedSignal.value=!0,this._cancelNext())}push(e,t){const s=this._get(e);if(s)return s;const r=new AbortController,i=Promise.withResolvers(),o=t?(0,n.u7)(t,()=>r.abort()):null,a=(0,n.NY)(r.signal,()=>{const t=this._processingItems.get(e);t&&t.controller.abort(),l(),i.reject((0,n.NK)())}),l=()=>{a.remove(),o?.remove(),this._removeItem(e),this._queue.remove(e),this._scheduleNext()};return this._deferreds.set(e,i),this._controllers.set(e,r),i.promise.then(l,l),this._queue.push(e),this._scheduleNext(),i.promise}last(){return this._queue.last()}reset(){const e=Array.from(this._processingItems.values());this.sharedConcurrency.current.value-=this._processingItems.size,this._processingItems.clear();for(const t of e)this._queue.push(t.item),t.controller.abort();this._scheduleNext()}resume(){this._pausedSignal.value&&(this._pausedSignal.value=!1,this._scheduleNext())}takeAll(){const e=[];for(;this._queue.length;)e.push(this._queue.pop());return this.clear(),e}_removeItem(e){this._deferreds.delete(e),this._controllers.delete(e),this._processingItems.has(e)&&(this._processingItems.delete(e),this.sharedConcurrency.current.value-=1)}_scheduleNext(){this._pausedSignal.value||this._schedule||(this._schedule=(0,a._)(()=>{this._schedule=null,this._next()}))}_next(){for(;this._queue.length>0&&this._processingItems.size<this.concurrency&&!this.sharedConcurrency.full;)this._process(this._queue.pop())}_cancelNext(){this._schedule&&(this._schedule.remove(),this._schedule=null)}_processResult(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).resolve(t))}_processError(e,t){this._canProcessFulfillment(e)&&(this._scheduleNext(),this._deferreds.get(e.item).reject(t))}_canProcessFulfillment(e){return!!this._deferreds.get(e.item)&&this._processingItems.get(e.item)===e}_process(e){if(null==e)return;let t;const s=new AbortController,r=new c(e,s);this._processingItems.set(e,r),this.sharedConcurrency.current.value+=1;try{t=this.process(e,s.signal)}catch(e){this._processError(r,e)}(0,n.$X)(t)?(r.promise=t,t.then(e=>this._processResult(r,e),e=>this._processError(r,e))):this._processResult(r,t)}}class c{constructor(e,t){this.item=e,this.controller=t,this.promise=null}}class h{constructor(e){this.limit=e,this.current=(0,l.v)(0)}get full(){return this.current.value>=this.limit}}const d=new h(1/0)},32587(e,t,s){s.d(t,{A:()=>i});var r=s(62788),n=s(95488);class i{constructor(e){this._observable=new n.I,this._notifyPending=!1,this._batchDepth=0,this._map=new Map(e)}get size(){return(0,r.gc)(this._observable),this._map.size}batch(e){try{this._batchDepth++,e()}finally{this._batchDepth--,this._notifyPending&&0===this._batchDepth&&(this._notifyPending=!1,this._notify())}}clear(){this._map.size>0&&(this._map.clear(),this._notify())}delete(e){const t=this._map.delete(e);return t&&this._notify(),t}entries(){return(0,r.gc)(this._observable),this._map.entries()}forEach(e,t){(0,r.gc)(this._observable),this._map.forEach((s,r)=>e.call(t,s,r,this),t)}get(e){return(0,r.gc)(this._observable),this._map.get(e)}has(e){return(0,r.gc)(this._observable),this._map.has(e)}keys(){return(0,r.gc)(this._observable),this._map.keys()}set(e,t){return this._map.set(e,t),this._notify(),this}transformValues(e,t=this._map.keys()){this.batch(()=>{for(const s of t){if(!this._map.has(s))continue;const t=this._map.get(s),r=e(t,s);r!==t&&this.set(s,r)}})}values(){return(0,r.gc)(this._observable),this._map.values()}[Symbol.iterator](){return(0,r.gc)(this._observable),this._map[Symbol.iterator]()}[Symbol.dispose](){this._observable.destroy()}get[Symbol.toStringTag](){return this._map[Symbol.toStringTag]}_notify(){this._batchDepth>0?this._notifyPending=!0:this._observable.notify()}}},24460(e,t,s){function r(e){const{minValue:t,maxValue:s,numValues:r,nullCount:n,distinctCount:i}=e;return null!=r&&n===r?{type:"null-only",nullCount:n,distinctCount:i}:"number"==typeof t&&Number.isFinite(t)&&"number"==typeof s&&Number.isFinite(s)&&t<=s?{type:"bounds",minValue:t,maxValue:s,nullCount:n,distinctCount:i}:null!=t||null!=s||null!=i||null!=n?{type:"unknown",nullCount:n,distinctCount:i}:null}function n(e){const t=new Map;for(const s of e.files){const e=i(s);t.set(s.name,e)}return t}function i(e){const t=new Map;for(const s of e.statistics??[]){const e=s.column.at(-1);if(null==e)continue;const n=r({minValue:s.minValue,maxValue:s.maxValue,numValues:null,nullCount:s.nullCount??0,distinctCount:s.distinctCount??null});null!=n&&t.set(e,n)}return new a(0,0,t)}function o(e){const t=e.minValue(),s=e.maxValue(),n=e.numValues(),i=e.distinctCount()??null;return r({minValue:t,maxValue:s,numValues:n,nullCount:e.nullCount()??null,distinctCount:i})}s.d(t,{Hk:()=>o,MB:()=>a,t8:()=>n});class a{static fromFile(e){const t=e.numRows(),s=e.byteLength(),r=new Map;for(const t of e.getColumnDescriptors()){const e=o(t);null!=e&&r.set(t.name(),e),t.free()}return new a(t,s,r)}constructor(e,t,s){this.rowCount=e,this.byteSize=t,this.statistics=s}}},15851(e,t,s){s.d(t,{M:()=>U});var r=s(11254),n=s(5482),i=s(49186),o=s(65529),a=s(44208),l=s(563),u=s(84952),c=s(24460),h=s(53966),d=s(54625),p=s(39412);const m=()=>h.A.getLogger("esri.layers.ParquetLayer"),y=new Set(["uncompressed","snappy","gzip"]),f=new Set(["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeBigInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]);function g(e,t){switch(t){case"esriGeometryPoint":return e.GeometryType.Point;case"esriGeometryPolygon":case"polygon":return e.GeometryType.Polygon;case"esriGeometryPolyline":case"polyline":return e.GeometryType.Polyline;case"esriGeometryMultipoint":case"multipoint":return e.GeometryType.Multipoint;default:throw new i.A("parquet",`Found unexpected GeometryType: ${t}`)}}async function _(e,t){const s=await(0,p.N)(),r=t.geometryInfo?function(e,t){const s=e.GeometryInfo.new();t.geometry&&s.setGeometry(function(e,t){const s=t.encoding,r=g(e,t.geometryType),n=t.spatialReference.wkid;if(null==n)throw new Error("InternalError: Wkid must be defined.");switch(s.type){case"wkb":return e.GeometryField.fromWkb(s.field,n,r);case"location":{const{yField:t,xField:i}=s;return e.GeometryField.fromLocation(t,i,n,r)}}}(e,t.geometry));const r=t.displayOptimization;if(r){const{index:t,parentColumn:n}=r,i=e=>null!=n?[n,e].join("."):e;if("z"===t.type){const r=e.DisplayOptimizationZBuilder.new();r.setCodeField(i(t.code)),r.setXColumn(i(t.xColumn)),r.setYColumn(i(t.yColumn)),r.setCooordinatePrecision(t.coordinatePrecision),r.setFullExtent(t.fullExtent),r.setSpatialReference(t.wkid,null==t.wkid?t.wkt:void 0),r.setHasZ(!!t.zColumn),r.setHasM(!!t.mColumn),t.zColumn&&r.setZColumn(i(t.zColumn)),t.mColumn&&r.setMColumn(i(t.mColumn)),s.setOptmizationZ(r)}if("xz"===t.type){const r=g(e,t.geometryType),n=e.DisplayOptimizationXZBuilder.new();n.setCodeField(i(t.code)),n.setEncoding(t.encoding),n.setFullExtent(t.fullExtent),n.setGeometryType(r),n.setSpatialReference(t.wkid,null==t.wkid?t.wkt:void 0),n.setMaxLevel(t.maxLevel),n.setHasZ(t.hasZ??!1),n.setHasM(t.hasM??!1);for(const s of t.levels??[]){const t=new Float64Array(s.transform.translate),r=new Float64Array(s.transform.scale),o=i(s.column);n.addLevel(e.MultiscaleGeometryField.new(s.level,s.scale,o,t,r))}s.setOptmizationXZ(n)}}return s}(s,t.geometryInfo):null,n=t.provider.fetchRange.bind(t.provider),o=t.provider.fetchLength.bind(t.provider);try{return await s.ParquetFile.fromUrl(e,n,o,r)}catch(e){throw new i.A("parquet","Failed to parse file",{error:e})}}function w(e){if("xz"===e.index.type&&(e.index.geometryType=function(e){switch(e.toLowerCase()){case"polygon":return"polygon";case"polyline":return"polyline";case"multipoint":return"multipoint";default:throw new i.A("parquet:unsupported",`Geometry type ${e} is unsupported`)}}(e.index.geometryType),"esri-pbf"===e.index.encoding&&(e.index.encoding="esriPBF"),"esriPBF"!==e.index.encoding))return m().warn("parquet:unsupported",`Encoding for display index must be of type esriPBF, but found ${e.index.encoding}`),null;const{xmin:t,ymin:s,xmax:r,ymax:n}=e.index.fullExtent;return Number.isFinite(t)&&Number.isFinite(s)&&Number.isFinite(r)&&Number.isFinite(n)?e:(m().warn("parquet:protocol-violation","Ignoring display optimization, found bad extent",{index:e.index}),null)}function b(e){for(const t of e.compressionCodecs())if(!y.has(t))throw new i.A("parquet:unsupported",`Compression codec ${t} is unsupported. Must be of type ${Array.from(y).join(",")}`)}function v(e,t){if(null!=e){const t=e.primary_column;return{type:"wkb",field:t,orientation:"counterclockwise"===e.columns[t].orientation?"counter-clockwise":null}}const s=function(e){const t=e.map(e=>e.toLowerCase());return{longitudeFieldName:e[t.indexOf(d.A0.find(e=>t.includes(e)))],latitudeFieldName:e[t.indexOf(d.bD.find(e=>t.includes(e)))]}}(t.filter(e=>f.has(e.type)).map(e=>e.name));return s.latitudeFieldName&&s.longitudeFieldName?{type:"location",xField:s.longitudeFieldName,yField:s.latitudeFieldName}:null}function C(e){switch(e.replace(/ (?:Z|M|ZM)$/u,"")){case"Point":return"esriGeometryPoint";case"Polygon":case"MultiPolygon":return"esriGeometryPolygon";case"LineString":return"esriGeometryPolyline";case"MultiPoint":return"esriGeometryMultipoint";default:return null}}function x(e,t,s){if(!s)return null;const r=e?e.columns[e.primary_column]:null,n=r?.bbox;if(n?.every(e=>Number.isFinite(e)))switch(n.length){case 4:return{xmin:n[0],ymin:n[1],xmax:n[2],ymax:n[3],spatialReference:s};case 6:return{xmin:n[0],ymin:n[1],xmax:n[3],ymax:n[4],spatialReference:s};default:m().warn("parquet:protocol-violation","Invalid Geoparquet file. BoundingBox size must be 4 or 6.",{geoMetadata:e})}const i=t?.index.fullExtent;return i?{...i,spatialReference:s}:null}class S{static async create(e,t,s,r,n){if(!n){const n=await _(s,{geometryInfo:e,provider:t}),i=c.MB.fromFile(n);return new S(e,t,s,r,i,Promise.resolve(n))}return new S(e,t,s,r,n,null)}constructor(e,t,s,r,n,i){this._geometryInfo=e,this._provider=t,this.url=s,this.id=r,this.statistics=n,this._file=i}destroy(){null!=this._file&&this._file.then(e=>e.free())}get file(){return null==this._file&&(this._file=_(this.url,{geometryInfo:this._geometryInfo,provider:this._provider})),this._file}}const F="_spatial.json",q=new l.QueueProcessor({concurrency:12,process:async e=>{const{data:t}=await(0,r.A)(e.url,e.options);return t}});class P{constructor(e,t=()=>{}){this._geometryInfo=e,this._getCustomParameters=t,this.events=new o.bk}async destroy(){await this.clear()}async clear(){if(this._infos){const e=await this._infos;for(const t of e.values())t.destroy();e.clear(),this._infos=null}}async getMetadata(){const e={stack:[],error:void 0,hasError:!1};try{const t=(await this._getParquetFileNames()).at(0);return t?function(e){b(e);const t=function(e){return e.fields(!1).map(e=>({name:e.name,alias:e.name,type:e.type}))}(e),s=function(e){const t=e.keyValueMetadata("geo");return null!=t?JSON.parse(t):null}(e),r=function(e){if(e.keyValueMetadata("esri"))throw new i.A("parquet:unsupported","File was created using an unsupported experimental display index. Please regenerate the file.");const t=e.keyValueMetadata("geodisplay");if(null!=t)return w(JSON.parse(t));const s=e.keyValueMetadata("org.apache.spark.sql.parquet.row.metadata");if(null!=s){const e=JSON.parse(s);for(const t of e.fields)if(null!=t.metadata&&"type"in t.metadata&&("xz"===t.metadata.type||"z"===t.metadata.type))return w({parentColumn:t.name,index:t.metadata})}return null}(e),n=v(s,t),{hasZ:o,hasM:a}=function(e,t){const s=t?.index;if("z"===s?.type)return{hasZ:null!=s.zColumn,hasM:null!=s.mColumn};if("xz"===s?.type)return{hasZ:!0===s.hasZ,hasM:!0===s.hasM};const r=e?.columns[e.primary_column]?.geometry_types??[];return{hasZ:r.some(e=>/ (?:Z|ZM)$/u.test(e)),hasM:r.some(e=>/ (?:M|ZM)$/u.test(e))}}(s,r);let l,u;if(n)switch(n.type){case"location":u={wkid:4326},l="esriGeometryPoint";break;case"wkb":if(s){const e=s.primary_column,t=s.columns[e];l=function(e){const{geometry_types:t}=e,s=new Set;for(const e of t){const t=C(e);t&&s.add(t)}if(s.size>1)throw new i.A("parquet:unsupported","Parquet mixed geometry types are not supported",{geometryTypes:s});return 1===s.size?s.values().next().value:void 0}(t),u=function(e){const t=e.crs?.id?.code;return t&&"number"==typeof t?{wkid:t}:void 0}(t)}}if(r){const e=r.index;!u&&e.wkid&&(u={wkid:e.wkid}),l||(l="z"===e.type?"esriGeometryPoint":function(e){switch(e){case"polygon":return"esriGeometryPolygon";case"polyline":return"esriGeometryPolyline";case"multipoint":return"esriGeometryMultipoint"}}(e.geometryType))}return{geoMetadata:s,displayOptimization:r,hasZ:o,hasM:a,geometryEncoding:n,geometryInfo:u&&l?{geometry:n?{geometryType:l,spatialReference:u,encoding:n}:null,displayOptimization:r}:null,geometryType:l,spatialReference:u,extent:x(s,r,u),fields:t}}((0,n.mS)(e,await _(t,{provider:this}),!1)):null}catch(t){e.error=t,e.hasError=!0}finally{(0,n.hk)(e)}}getGeometryInfo(){return this._geometryInfo}async getFiles(){const e=await this._getInfoMap();return Array.from(e.values())}async updateGeometryInfo(e){if(this._geometryInfo)throw new Error("GeometryInfo already set");await this.clear(),this._geometryInfo=e}async fetchLength(e){const{byteLength:t,cacheTag:s}=await this._fetchLengthAndTag(e);if(!(0,a.A)("parquetlayer-cache-enabled"))return t;try{await this._createOrResetCache(e,s)}catch(e){}return t}async fetchRange(e,t,s,r){if(!(0,a.A)("parquetlayer-cache-enabled"))return this._fetchRange(e,t,s,r);const n=new URL(this._getCacheFileName(e));n.searchParams.append("range",`${t}-${s}`);try{const i=await this._openCache(e),o=await i.match(n);if(o)return await o.arrayBuffer();const a=await this._fetchRange(e,t,s,r);return await i.put(n,new Response(a,{headers:{"Content-Type":"application/octet-stream","Content-Length":a.byteLength.toString()}})),a}catch(n){return this._fetchRange(e,t,s,r)}}_getCacheFileName(e){return e}async _requestStatistics(e){const{data:t}=await(0,r.A)(e,{responseType:"json",query:this._getCustomParameters()});return t}async _fetchRange(e,t,s,r){const n={url:e,options:{responseType:"array-buffer",query:this._getCustomParameters()??{},cacheMode:"no-store",useQueue:!0,headers:{range:`bytes=${t}-${s}`}}},o=await q.push(n),a=s-t+1;if(o.byteLength!==a)throw new i.A("InvalidRangeRequest",`request returned ${o.byteLength} bytes for range ${t}-${s}, expected ${a}.`);return o}async _fetchLengthAndTag(e){if((0,u.w8)(e)){const{data:t}=await(0,r.A)(e,{responseType:"blob"});return{byteLength:t.size,cacheTag:null}}const t=await this._requestHead(e),s=t.headers.get("Content-Length");if(null==s)throw new Error("Unable to parse content length");const n=t.headers.get("etag")??t.headers.get("Last-Modified");return{byteLength:parseInt(s,10),cacheTag:n}}async _getInfoMap(){return this._infos||(this._infos=this._fetchParquetFiles()),this._infos}async _updateParquetFileInfos(e){const t=await this._getInfoMap(),s=new Set(e);for(const e of s)if(!t.get(e)){const s=t.size,r=await S.create(this.getGeometryInfo(),this,e,s,null);t.set(e,r)}for(const e of t.keys())if(!s.has(e))throw new Error("Deletion not supported")}async _getFileStatistics(e){this._statistics||(this._statistics=this._fetchStatistics());const t=await this._statistics,s=function(e){return e.split(/[?#]/)[0].split("/").at(-1)??e}(e);return t.get(s)}async _fetchParquetFiles(){const e=(await this._getParquetFileNames()).map(async(e,t)=>{const s=t,r=await this._getFileStatistics(e);return S.create(this.getGeometryInfo(),this,e,s,r)}),t=await Promise.all(e),s=new Map;for(const e of t)s.set(e.url,e);return s}async _fetchStatistics(){const e=await this._getStatisticsFileName();if(null==e)return new Map;const t=await this._resolveFileUrl(e),s=await this._requestStatistics(t);return(0,c.t8)(s)}async _requestHead(e){const{data:t}=await(0,r.A)(e,{responseType:"native",method:"head",query:this._getCustomParameters()});return t}async _openCache(e){return caches.open(this._getCacheName(e))}_getCacheName(e){return`parquet.v1:${this._getCacheFileName(e)}`}async _createOrResetCache(e,t){const s=this._getCacheName(e),r=new URL(this._getCacheFileName(e));if(r.searchParams.append("metadata","true"),null==t)return void await caches.delete(s);let n=await caches.open(s);const i=await n.match(r),o=await(i?.json());o?.tag!==t&&(await caches.delete(s),n=await caches.open(s));const a=JSON.stringify({tag:t});await n.put(r,new Response(a,{headers:{"Content-Type":"application/json","Content-Length":a.length.toString()}}))}}function R(e){const t=e.split(/[?#]/)[0];return t===F||t.endsWith(F)}var M=s(39131);class A extends P{constructor(e,t,s){super(t,s),this._schema=e,this._isAgol=!!(0,M.py)(this._schema.itemUrl)}async update(e){throw new Error("Unsupported")}async _getParquetFileNames(){return[`${this._baseUrl}/data`]}async _getStatisticsFileName(){return null}_getCacheFileName(e){return`${this._baseUrl}/data`}async _resolveFileUrl(e){return this._resolvedUrl||(this._resolvedUrl=this._fetchResolvedUrl()),this._resolvedUrl}async _fetchLengthAndTag(e){const t=await super._fetchLengthAndTag(e);return t.cacheTag=this._schema.modified.getTime().toString(),t}async _fetchRange(e,t,s,r){try{const n=await this._resolveFileUrl(e);return await super._fetchRange(n,t,s,r)}catch{this._resolvedUrl=null}const n=await this._resolveFileUrl(e);return super._fetchRange(n,t,s,r)}get _baseUrl(){return this._schema.itemCdnUrl??this._schema.itemUrl}async _fetchResolvedUrl(){return this._isAgol?(await(0,r.A)(`${this._baseUrl}/data`,{query:{signedurl:!0,expiration:9,f:"json"}})).data.signedUrl:`${this._baseUrl}/data`}}var N=s(47828);class I extends P{constructor(e,t,s){super(t,s),this._schema=e,this._directoryChanged=!1}get _baseUrl(){return this._schema.itemCdnUrl??this._schema.itemUrl}async update(e){throw new Error("Unsupported")}async _getParquetFileNames(){const e=await this._getResources();return Array.from(e.keys()).filter(e=>e.endsWith(".parquet"))}async _getStatisticsFileName(){const e=await this._getResources();return Array.from(e.keys()).find(R)??null}_getCacheFileName(e){return`${this._baseUrl}/resources/${e}`}async _resolveFileUrl(e){const t=await this._getResource(e);return t.signedUrl?t.signedUrl:`${this._baseUrl}/resources/${e}`}async _fetchLengthAndTag(e){const t=await this._getResource(e),s=this._schema.itemMetadata.modified.getTime().toString();return{byteLength:t.size,cacheTag:s}}async _fetchRange(e,t,s,r){if(this._directoryChanged)throw(0,N.O)();try{const n=await this._resolveFileUrl(e);return await super._fetchRange(n,t,s,r)}catch{if("directory-changed"===await this._refetchResources())throw(0,N.O)()}const n=await this._resolveFileUrl(e);return super._fetchRange(n,t,s,r)}_refetchResources(){return this._directoryChanged?Promise.resolve("directory-changed"):(this._updateResourcesPromise||(this._updateResourcesPromise=this._executeRefetchResources().finally(()=>{this._updateResourcesPromise=null})),this._updateResourcesPromise)}async _executeRefetchResources(){return await this._refetchPortalItemMetadata()?(this.events.emit("sourceChanged"),this._directoryChanged=!0,"directory-changed"):(this._resources=this._fetchResources(),"ok")}async _refetchPortalItemMetadata(){const e=this._schema.itemMetadata.url,t=await(0,r.A)(this._schema.itemUrl,{responseType:"json",query:{f:"json"}}),{modified:s,url:n}=t.data;if(null==n)throw new Error("Portal item metadata must have a url defined.");if(null==s)throw new Error("Portal item metadata must have a modified timestamp defined.");return this._schema.itemMetadata={modified:new Date(s),url:n},e!==n}async _getResources(){return this._resources||(this._resources=this._fetchResources()),await this._resources}async _getResource(e){const t=(await this._getResources()).get(e);if(!t)throw new Error(`Resource ${e} not found.`);return t}async _fetchResources(){const e=new Map;let t=1;const s=function(e){const t=e.split("/").filter(Boolean),s=t.indexOf("resources");if(-1===s||s===t.length-1)throw new Error(`URL does not contain a resources directory name: ${e}`);return`${t.slice(s+1).map(e=>decodeURIComponent(e)).join("/")}/`}(this._schema.itemMetadata.url);for(;-1!==t;){const n=await(0,r.A)(`${this._baseUrl}/resources`,{query:{f:"json",start:t,num:100}});for(const t of n.data.resources)t.resource.startsWith(s)&&e.set(t.resource,t);t=n.data.nextStart}return e}}class k extends P{constructor(e,t=null,s=()=>{}){super(t,s),this._schema=e}async update(e){await this._updateParquetFileInfos(await this._getParquetFileNames()),this._schema=e}async _resolveFileUrl(e){return e}async _getParquetFileNames(){return this._schema.urls.filter(e=>!e.endsWith(".json"))}async _getStatisticsFileName(){return this._schema.urls.find(R)??null}}function U(e,t,s){switch(e.type){case"urls":return new k(e,t,s);case"portal-parquet-file":return new A(e,t,s);case"portal-parquet-layer":return new I(e,t,s)}}},47828(e,t,s){s.d(t,{O:()=>i,c:()=>n});var r=s(49186);function n(e){return null!=e&&"object"==typeof e&&"name"in e&&"FileProviderChangedError"===e.name}function i(e=""){return new r.A("FileProviderChangedError",e)}},9075(e,t,s){s.d(t,{A:()=>a});var r=s(5482),n=s(69540),i=s(25482),o=s(91429);let a=class extends((0,n.OU)(i.o)){constructor(e){super(e),this.type="location",this.xField=null,this.yField=null}};(0,r.Cg)([(0,o.MZ)({type:["location"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],a.prototype,"type",void 0),(0,r.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"xField",void 0),(0,r.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"yField",void 0),a=(0,r.Cg)([(0,o.$K)("esri.layers.support.GeometryEncodingLocation")],a)},34582(e,t,s){s.d(t,{A:()=>a});var r=s(5482),n=s(69540),i=s(25482),o=s(91429);let a=class extends((0,n.OU)(i.o)){constructor(e){super(e),this.type="wkb",this.field=null}};(0,r.Cg)([(0,o.MZ)({type:["wkb"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],a.prototype,"type",void 0),(0,r.Cg)([(0,o.MZ)({type:["counter-clockwise"],json:{write:!0}})],a.prototype,"orientation",void 0),(0,r.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"field",void 0),a=(0,r.Cg)([(0,o.$K)("esri.layers.support.GeometryEncodingWkb")],a)},56370(e,t,s){s.d(t,{A:()=>d});var r=s(5482),n=s(69540),i=s(7762),o=s(49186),a=s(25482),l=s(91429),u=s(64108),c=s(97159),h=s(43937);let d=class extends((0,a.T)(n.Pw)){constructor(e){super(e),this.type="files",this.urls=new i.A}writeUrls(e,t,s,r){const n=e.toArray().map(e=>(0,c.t)(e,r)).filter(e=>!!e);n.length?t.urls=n:r.messages?.push(new o.A("parquet-layer:missing-urls","Missing or empty 'urls'",{data:this}))}};(0,r.Cg)([(0,l.MZ)({type:["files"],nonNullable:!0,readOnly:!0,json:{read:!1,write:{isRequired:!0}}})],d.prototype,"type",void 0),(0,r.Cg)([(0,l.MZ)({type:i.A.ofType(String),json:{write:{isRequired:!0}}})],d.prototype,"urls",void 0),(0,r.Cg)([(0,h.K)("urls")],d.prototype,"writeUrls",null),d=(0,r.Cg)([(0,u.$)("esri.layers.support.ParquetFilesData")],d)},54625(e,t,s){s.d(t,{i_:()=>n});var r=s(30524);function n(e,t,s){t=(0,r.rS)(t)?.toLowerCase(),s=(0,r.rS)(s)?.toLowerCase();const n=e.map(e=>e.toLowerCase()),a=t?e[n.indexOf(t)]:null,l=s?e[n.indexOf(s)]:null;return{longitudeFieldName:a||e[n.indexOf(o.find(e=>n.includes(e)))],latitudeFieldName:l||e[n.indexOf(i.find(e=>n.includes(e)))]}}const i=["lat","lat83","latitude","latitude83","latdecdeg","lat_dd","y","ycenter","point_y"],o=["lon","lng","lng83","long","long83","longitude","longitude83","longdecdeg","long_dd","x","xcenter","point_x"];s.d(t,["A0",0,o,"bD",0,i])},50639(e,t,s){s.d(t,{G:()=>i});var r=s(9075),n=s(34582);function i(e){switch(e.type){case"wkb":return n.A.fromJSON(e);case"location":return r.A.fromJSON(e)}}},42760(e,t,s){s.d(t,{Dt:()=>m,hG:()=>d,nc:()=>p,sA:()=>h}),s(7762);var r=s(49186),n=s(44208),i=s(66552),o=s(16930),a=(s(15851),s(20437)),l=s(30524),u=s(50639);s(56370);const c=new i.J({esriGeometryPoint:"point",esriGeometryPolygon:"polygon",esriGeometryPolyline:"polyline",esriGeometryMultipoint:"multipoint"});function h(e){return c.toJSON(e)}function d(e){return c.fromJSON(e)}async function p(e,t){if(t.geometryType&&t.spatialReference&&t.geometryEncoding&&t.fields&&t.displayOptimization)return t;if(!e)throw new r.A("parquet:bad-input","No metadata found");const s={...t},i=e.fields.map(e=>a.A.fromJSON(e));if(null==s.fields)s.fields=i;else{const e=new Set(s.fields.map(e=>e.name));if(!(0,n.A)("parquetlayer-legacy-field-overrides-enabled"))for(const t of i)e.has(t.name)||s.fields.push(t)}if(null!=s.geometryEncoding){const e=s.geometryEncoding;switch(e.type){case"wkb":{const t=i.find(t=>t.name===e.field);if(!t)throw new r.A("parquet:unsupported",`Geometry encoding references field ${e.field} which does not exist`);if("blob"!==t.type)throw new r.A("parquet:unsupported",`Invalid field type for geometry encoding. Found ${t.type} but expected 'blob'`);break}case"location":for(const t of[e.xField,e.yField])if(null!=t){const e=i.find(e=>e.name===t);if(!e)throw new r.A("parquet:unsupported",`Geometry encoding references field ${t} which does not exist`);if(!(0,l.WA)(e))throw new r.A("parquet:unsupported",`Invalid field type for location geometry encoding. Found ${e.type} but expected a numeric`)}}}return null==s.geometryEncoding&&(s.geometryEncoding=e.geometryEncoding?(0,u.G)(e.geometryEncoding):null),s.fields=function(e,t){const s=t.geoMetadata;if(null==s)return e;const r=new Set(Object.keys(s.columns));return e.filter(e=>!r.has(e.name))}(s.fields,e),!s.displayOptimization&&e.displayOptimization&&(s.displayOptimization=e.displayOptimization),!s.geometryType&&e.geometryType&&(s.geometryType=d(e.geometryType)),!s.spatialReference&&e.spatialReference&&(s.spatialReference=o.A.fromJSON(e.spatialReference)),s}async function m(e,t){switch(e.type){case"files":return{type:"urls",urls:e.urls.toArray()};case"portal-item":{const s=await e.portalItem.load(t);switch(s.type){case"Apache Parquet":return{type:"portal-parquet-file",itemUrl:s.itemUrl,itemCdnUrl:s.itemCdnUrl,modified:s.modified,size:s.size};case"Parquet layer":case"Parquet Layer":case"Parquet feature layer":case"Parquet Feature Layer":if(!s.url)throw new r.A("parquet:bad-item",`Item of type ${s.type} must have a url defined`,s);return{type:"portal-parquet-layer",itemUrl:s.itemUrl,itemCdnUrl:s.itemCdnUrl,itemMetadata:{modified:s.modified,url:s.url}};default:throw new r.A("parquet:bad-item",`Item of type ${s.type} is not supported`,s)}}}}s.d(t,["ye",0,c])},39412(e,t,s){s.d(t,{N:()=>i});var r=s(2741);let n=null;async function i(){return n||(n=async function(){const e=await s.e(1687).then(s.bind(s,31687));return await e.default({module_or_path:(0,r.s)("esri/libs/parquet/pkg/bundle_bg.wasm")}),e}()),n}},93470(e,t,s){const r=[252,146,31,255],n={type:"esriSMS",style:"esriSMSCircle",size:6,color:r,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},i={type:"esriSLS",style:"esriSLSSolid",width:.75,color:r};s.d(t,["Cb",0,n,"HW",0,{type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},"JR",0,[153,153,153,255],"JZ",0,{type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},"WR",0,{type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},"b6",0,{type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null},"fT",0,r,"nC",0,{type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},"yM",0,i])}}]);
|