@arcgis/core 4.29.0-next.20240210 → 4.29.0-next.20240213

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.
Files changed (77) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/05ebb9cec0e1826b283f.js +1 -0
  3. package/assets/esri/core/workers/chunks/18551a7eb5a9b88aa0dc.js +1 -0
  4. package/assets/esri/core/workers/chunks/24d19abc680b341d13bb.js +1 -0
  5. package/assets/esri/core/workers/chunks/{3f4d63436c3de04a6ebb.js → 254b4ee3621bbe345bb1.js} +1 -1
  6. package/assets/esri/core/workers/chunks/2d682ee6e5d66f2ea5cd.js +1 -0
  7. package/assets/esri/core/workers/chunks/{d5484d470121de2b403b.js → 36d091be859bbb1a149b.js} +1 -1
  8. package/assets/esri/core/workers/chunks/50b41f91be903a0977f9.js +1 -0
  9. package/assets/esri/core/workers/chunks/50bb67f2eeace5d50673.js +1 -0
  10. package/assets/esri/core/workers/chunks/6e135a5dd5223f24da90.js +1 -0
  11. package/assets/esri/core/workers/chunks/784b6a8216b97440b180.js +1 -0
  12. package/assets/esri/core/workers/chunks/{7f7a4de2cd4ab71b9aee.js → 8d119dc0a92ad3612daa.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{f13c4b9692dad5802a32.js → 968808e99f08677152cb.js} +84 -84
  14. package/assets/esri/core/workers/chunks/{0014635097a32ad38895.js → a854611d1a86b838c6ad.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{50a5abd75fa7dbb571a5.js → ccd53b81c2688dd11584.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{b2b8e6a0b3f70ada2799.js → e4da908079417cc2f495.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{af0314c2b5b7dc4f5bbd.js → e6dbf0a7b7b1cf64f23f.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{eba72ff1726ff6998204.js → f03d62ab7806b68d0b62.js} +1 -1
  19. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  20. package/geometry/Mesh.js +1 -1
  21. package/geometry/support/meshVertexSpaceUtils.js +1 -1
  22. package/interfaces.d.ts +296 -73
  23. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  24. package/layers/SceneLayer.js +1 -1
  25. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  26. package/layers/support/rasterDatasets/BaseRaster.js +1 -1
  27. package/package.json +2 -2
  28. package/portal/support/resourceUtils.js +1 -1
  29. package/rest/query/operations/pbfJSONFeatureSet.js +1 -1
  30. package/rest/support/meshFeatureSet.js +1 -1
  31. package/support/revision.js +1 -1
  32. package/symbols/cim/constants.js +1 -1
  33. package/symbols/support/previewSymbol2D.js +1 -1
  34. package/versionManagement/support/versionManagementUtils.js +1 -1
  35. package/views/2d/engine/webgl/collisions/CollisionEngine.js +1 -1
  36. package/views/2d/engine/webgl/collisions/CollisionGrid.js +1 -1
  37. package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
  38. package/views/2d/engine/webgl/mesh/templates/segmentUtils.js +1 -1
  39. package/views/2d/engine/webgl/shaderGraph/GLSLShaderModule.js +1 -1
  40. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  41. package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
  42. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartMeshWriter.js +1 -1
  43. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants.js +1 -1
  44. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
  45. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  46. package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
  47. package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
  48. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  49. package/views/3d/layers/I3SMeshView3D.js +1 -1
  50. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  51. package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
  52. package/views/3d/terrain/OverlayRenderer.js +1 -1
  53. package/views/3d/webgl/RenderNode.js +1 -1
  54. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  55. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  56. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  57. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  58. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  59. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  60. package/views/draw/DrawOperation.js +1 -1
  61. package/views/draw/support/Box.js +1 -1
  62. package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
  63. package/widgets/BasemapLayerList.js +1 -1
  64. package/widgets/Editor.js +1 -1
  65. package/widgets/FeatureForm.js +1 -1
  66. package/widgets/LayerList.js +1 -1
  67. package/widgets/Print/PrintViewModel.js +1 -1
  68. package/widgets/Sketch/SketchViewModel.js +1 -1
  69. package/widgets/TableList.js +1 -1
  70. package/assets/esri/core/workers/chunks/062629a9b4695dea8bf8.js +0 -1
  71. package/assets/esri/core/workers/chunks/37803888bd9a537481a7.js +0 -1
  72. package/assets/esri/core/workers/chunks/560f677a356c7ebde5d3.js +0 -1
  73. package/assets/esri/core/workers/chunks/5bfc5ffad705aaaafcd4.js +0 -1
  74. package/assets/esri/core/workers/chunks/655f4560fb36a0d9ff0b.js +0 -1
  75. package/assets/esri/core/workers/chunks/b927b655e955abe00d48.js +0 -1
  76. package/assets/esri/core/workers/chunks/d2417d179d015f1193a1.js +0 -1
  77. package/assets/esri/core/workers/chunks/f75ec599f53c66cab194.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[572],{48952:(e,t,r)=>{r.d(t,{a:()=>n,b:()=>o,c:()=>i,d:()=>s,e:()=>c,f:()=>u,n:()=>p,s:()=>l,t:()=>d}),r(9456);var a=r(23704);function s(e,t,r){n(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r,a=3,s=a){if(e.length/a!==Math.ceil(t.length/s))return e;const n=e.length/a,i=r[0],o=r[1],u=r[2],l=r[4],d=r[5],c=r[6],p=r[8],h=r[9],y=r[10],f=r[12],g=r[13],m=r[14];let b=0,w=0;for(let r=0;r<n;r++){const r=t[b],n=t[b+1],F=t[b+2];e[w]=i*r+l*n+p*F+f,e[w+1]=o*r+d*n+h*F+g,e[w+2]=u*r+c*n+y*F+m,b+=s,w+=a}return e}function i(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,s=3,n=s){if(e.length/s!==Math.ceil(t.length/n))return void(0,a.A)().error("source and destination buffers need to have the same number of elements");const i=e.length/s,o=r[0],u=r[1],l=r[2],d=r[3],c=r[4],p=r[5],h=r[6],y=r[7],f=r[8];let g=0,m=0;for(let r=0;r<i;r++){const r=t[g],a=t[g+1],i=t[g+2];e[m]=o*r+d*a+h*i,e[m+1]=u*r+c*a+y*i,e[m+2]=l*r+p*a+f*i,g+=n,m+=s}}function u(e,t,r){l(e.typedBuffer,t,r,e.typedBufferStride)}function l(e,t,r,a=3){const s=Math.min(e.length/a,t.count),n=t.typedBuffer,i=t.typedBufferStride;let o=0,u=0;for(let t=0;t<s;t++)e[u]=r*n[o],e[u+1]=r*n[o+1],e[u+2]=r*n[o+2],o+=i,u+=a}function d(e,t,r,a=3,s=a){const n=e.length/a;if(n!==Math.ceil(t.length/s))return e;let i=0,o=0;for(let u=0;u<n;u++)e[o]=t[i]+r[0],e[o+1]=t[i+1]+r[1],e[o+2]=t[i+2]+r[2],i+=s,o+=a;return e}function c(e,t){p(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function p(e,t,r=3,a=r){const s=Math.min(e.length/r,t.length/a);let n=0,i=0;for(let o=0;o<s;o++){const s=t[n],o=t[n+1],u=t[n+2],l=s*s+o*o+u*u;if(l>0){const t=1/Math.sqrt(l);e[i]=t*s,e[i+1]=t*o,e[i+2]=t*u}n+=a,i+=r}}Object.freeze(Object.defineProperty({__proto__:null,normalize:p,normalizeView:c,scale:l,scaleView:u,shiftRight:function(e,t,r){const a=Math.min(e.count,t.count),s=e.typedBuffer,n=e.typedBufferStride,i=t.typedBuffer,o=t.typedBufferStride;let u=0,l=0;for(let e=0;e<a;e++)s[l]=i[u]>>r,s[l+1]=i[u+1]>>r,s[l+2]=i[u+2]>>r,u+=o,l+=n},transformMat3:o,transformMat3View:i,transformMat4:n,transformMat4View:s,translate:d},Symbol.toStringTag,{value:"Module"}))},51232:(e,t,r)=>{r.d(t,{c:()=>d});var a=r(41948),s=r(3856),n=r(40504),i=r(1580),o=(r(9456),r(66360),r(72052),r(9968)),u=r(12552);let l=class extends((0,s.q)(n.am)){constructor(e){super(e),this.type="georeferenced",this.origin=null}};(0,a._)([(0,o.G)({georeferenced:"georeferenced"},{readOnly:!0})],l.prototype,"type",void 0),(0,a._)([(0,i.qq)({type:[Number],nonNullable:!1,json:{write:!0}})],l.prototype,"origin",void 0),l=(0,a._)([(0,u.c)("esri.geometry.support.MeshGeoreferencedVertexSpace")],l);const d=l},13708:(e,t,r)=>{r.d(t,{c:()=>c});var a=r(41948),s=r(3856),n=r(40504),i=r(1580),o=(r(9456),r(66360),r(72052),r(9968)),u=r(12552),l=r(62484);let d=class extends((0,s.q)(n.am)){constructor(e){super(e),this.type="local",this.origin=(0,l.Su)()}};(0,a._)([(0,o.G)({local:"local"},{readOnly:!0})],d.prototype,"type",void 0),(0,a._)([(0,i.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"origin",void 0),d=(0,a._)([(0,u.c)("esri.geometry.support.MeshLocalVertexSpace")],d);const c=d},23704:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(66360);const s=()=>a.c.getLogger("esri.views.3d.support.buffer.math")},54264:(e,t,r)=>{r.d(t,{CT:()=>b,Ki:()=>m,Si:()=>o,Ud:()=>l,_o:()=>f,ai:()=>u,mK:()=>w,v_:()=>y});var a=r(2600),s=r(92400),n=r(10860),i=r(4048);class o{constructor(e,t,r){this.assetName=e,this.assetMimeType=t,this.parts=r}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,s.yK)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const r=await Promise.all(t.map((t=>t.toBlob(e))));return(0,n.wp)(e),new Blob(r)}}class u{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,a.c)(this.partUrl,{responseType:"blob"});return(0,n.wp)(e),t}}function l(e){return function(e){return!!e&&(Array.isArray(e)?e.some(h):h(e))}(e?.source)}function d(e){return!!Array.isArray(e)&&e.every((e=>e instanceof o))}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,p=/\.(gltf|glb)/i;function h(e){if(e instanceof File){const{type:t,name:r}=e;return c.test(t)||p.test(r)}return c.test(e.assetMimeType)||p.test(e.assetName)}function y(e,t){if(!e)return!1;const{source:r}=e;return function(e,t){if(Array.isArray(e)){const r=e;return r.length>0&&r.every((e=>g(e,t)))}return g(e,t)}(r,t)}function f(e,t){if(e===t)return!0;const{source:r}=e,{source:a}=t;if(r===a)return!0;if(d(r)&&d(a)){if(r.length!==a.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...r].sort(e),s=[...a].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(s[e]))return!1;return!0}return!1}function g(e,t){return e instanceof o&&e.isOnService(t)}function m(e,t){return e instanceof File?(0,i.K0)(e,t):(0,i.me)(e.assetMimeType,t)??(0,i.If)(e.assetName,t)}function b(e){return Array.isArray(e)?e:[e]}function w(e){return!!e.original}},21136:(e,t,r)=>{r.d(t,{Al:()=>h,GF:()=>y,k$:()=>c,mA:()=>p,mm:()=>f,wX:()=>d});var a=r(26832),s=r(66360),n=r(67776),i=r(51232),o=r(13708),u=r(48952);function l(){return s.c.getLogger("esri.geometry.Mesh")}function d(e){const{vertexSpace:t}=e;if(null!=t.origin)return e.clone();const{anchor:r}=e,a=r.clone(),s=new i.c({origin:[a.x,a.y,a.z]}),n=e.cloneWithVertexSpace(s),{position:o}=n.vertexAttributes;return n.vertexAttributes.position=(0,u.t)(new Float64Array(o.length),o,[-a.x,-a.y,-(a.z??0)]),n.vertexAttributesChanged(),n}function c(e){return null!=e.origin}function p(e,t){if(!c(e))return null;const[r,a,s]=e.origin;return new n.c({x:r,y:a,z:s,spatialReference:t})}function h(e,t){const{x:r,y:s,z:n,spatialReference:u}=e,d=[r,s,n??0];if(void 0!==t?.geographic){if((0,a.O2)(l(),"option: geographic",{replacement:"use vertexSpace option instead",version:"4.29",warnOnce:!0}),!t?.vertexSpace)return t?.geographic?new o.c({origin:d}):new i.c({origin:d});l().warn("Deprecated geographic flag ignored since vertexSpace option is provided.")}if(!t?.vertexSpace)return u.isGeographic||u.isWebMercator?new o.c({origin:d}):new i.c({origin:d});switch(t.vertexSpace){case"local":return new o.c({origin:d});case"georeferenced":return new i.c({origin:d});case"georeferenced-absolute":return new i.c}}function y(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}function f(e,t){return"local"===e?new o.c({origin:t}):new i.c({origin:t})}},13136:(e,t,r)=>{r.d(t,{u:()=>a});const a={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},62768:(e,t,r)=>{r.d(t,{applyEdits:()=>S,cV:()=>b,cd:()=>F,uploadAssets:()=>O});var a=r(6444),s=r(2952),n=r(20744),i=r(62088),o=r(66360),u=r(10860),l=r(28176),d=r(63564),c=r(20480),p=r(6576),h=r(564),y=r(4048),f=r(71068);function g(e){return null!=e?.applyEdits}function m(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function b(e){return e.every(m)}function w(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function F(e){return e.every(w)}async function S(e,t,r,a={}){let l;const c="gdbVersion"in e?e.gdbVersion:null,h=a.gdbVersion??c;if((0,p.iC)(e)&&e.url)l=(0,p.mK)(e.url,e.layerId,h,"original-and-current-features"===a.returnServiceEditsOption);else{l=(0,u.qG)(),l.promise.then((t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)}));const t={result:l.promise};e.emit("apply-edits",t)}try{const{results:u,edits:c}=await async function(e,t,r,a){if(await e.load(),!g(t))throw new n.c(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,f.UX)(e))throw new n.c(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:u}=await async function(e,t,r){const a=(0,f.kZ)(e),i=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),u=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),l=null!=e.infoFor3D;if(function(e,t,r,a,s,i){if(!e||!a&&!s)throw new n.c(`${i}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!t.editing.supportsGlobalId&&r?.globalIdUsed)throw new n.c(`${i}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!t.editing.supportsGlobalId&&s)throw new n.c(`${i}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!r?.globalIdUsed&&s)throw new n.c(`${i}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(t,a,r,!!i,!!u,`${e.type}-layer`),!a.data.isVersioned&&r?.gdbVersion)throw new n.c(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!a.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new n.c(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const c={...r};if(null!=c.rollbackOnFailureEnabled||a.editing.supportsRollbackOnFailure||(c.rollbackOnFailureEnabled=!0),c.rollbackOnFailureEnabled||"original-and-current-features"!==c.returnServiceEditsOption||(!1===c.rollbackOnFailureEnabled&&o.c.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwritten and set to true."),c.rollbackOnFailureEnabled=!0),!a.editing.supportsReturnServiceEditsInSourceSpatialReference&&c.returnServiceEditsInSourceSR)throw new n.c(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(c.returnServiceEditsInSourceSR&&"original-and-current-features"!==c.returnServiceEditsOption)throw new n.c(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const p=function(e,t,r){const a=function(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&s.c.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}(e);if(a.addFeatures?.length&&!t.operations.supportsAdd)throw new n.c(`${r}:unsupported-operation`,"Layer does not support adding features.");if(a.updateFeatures?.length&&!t.operations.supportsUpdate)throw new n.c(`${r}:unsupported-operation`,"Layer does not support updating features.");if(a.deleteFeatures?.length&&!t.operations.supportsDelete)throw new n.c(`${r}:unsupported-operation`,"Layer does not support deleting features.");return a.addFeatures=a.addFeatures.map(q),a.updateFeatures=a.updateFeatures.map(q),a.addAssetFeatures=[],a}(t,a,`${e.type}-layer`),h=r?.globalIdUsed||l,g=e.fields.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(h){const{globalIdField:t}=e;if(null==t)throw new n.c(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");p.addFeatures.forEach((e=>function(e,t){const{attributes:r}=e;null==r[t]&&(r[t]=(0,d.cf)())}(e,t)))}return p.addFeatures.forEach((t=>function(e,t,r,a){A(e,t,r,a),v(e,t)}(t,e,h,g))),p.updateFeatures.forEach((t=>function(e,t,r,a){A(e,t,r,a),v(e,t);const s=(0,f.kZ)(t);if("geometry"in e&&null!=e.geometry&&!s?.editing.supportsGeometryUpdate)throw new n.c(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,h,g))),p.deleteFeatures.forEach((t=>function(e,t,r,a){A(e,t,r,a)}(t,e,h,g))),p.addAttachments.forEach((t=>R(t,e))),p.updateAttachments.forEach((t=>R(t,e))),l&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,a=(0,y.me)("model/gltf-binary",r.supportedFormats)??(0,y.If)("glb",r.supportedFormats);if(!a||!r.editFormats.includes(a))throw new n.c(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:s}=e;for(const t of e.addFeatures??[])E(t)&&s.push(t);for(const t of e.updateFeatures??[])E(t)&&s.push(t)}(p,e),{edits:await I(p),options:c}}(e,r,a);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await t.applyEdits(i,u)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,r,a),p=e=>e.filter((e=>!e.error)).map(i.ct),h={edits:c,addedFeatures:p(u.addFeatureResults),updatedFeatures:p(u.updateFeatureResults),deletedFeatures:p(u.deleteFeatureResults),addedAttachments:p(u.addAttachmentResults),updatedAttachments:p(u.updateAttachmentResults),deletedAttachments:p(u.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:u.editMoment?new Date(u.editMoment):null,globalIdToObjectId:a.globalIdToObjectId};return u.editedFeatureResults?.length&&(h.editedFeatures=u.editedFeatureResults),l.resolve(h),u}catch(e){throw l.reject(e),e}}function A(e,t,r,a){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new n.c(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new n.c(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(a.length&&"attributes"in e)for(const r of a){const a=e.attributes[r.name];if(void 0!==a&&!(0,h.mS)(r,a))throw new n.c(`${t.type}-layer:invalid-parameter`,`Big-integer field '${r.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new n.c(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new n.c(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function v(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D){const{geometry:r}=e;if("georeferenced"===r.vertexSpace.type)throw new n.c(`${t.type}-layer:georeferenced-mesh-unsupported`,"Uploading georeferenced meshes to a layer is not supported.")}}function R(e,t){const{feature:r,attachment:a}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!a.globalId)throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!a.data&&!a.uploadId)throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(a.data instanceof File&&a.data.name||a.name))throw new n.c(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&a.uploadId)throw new n.c(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof a.data){const e=(0,l.nV)(a.data);if(e&&!e.isBase64)throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function I(e){const t=e.addFeatures??[],r=e.updateFeatures??[],a=t.concat(r).map((e=>e.geometry)),s=await(0,c.WW)(a),n=t.length,i=r.length;return s.slice(0,n).forEach(((e,r)=>t[r].geometry=e)),s.slice(n,n+i).forEach(((e,t)=>r[t].geometry=e)),e}function q(e){const t=new a.c;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function E(e){return"mesh"===e?.geometry?.type}function O(e,t,r,a){if(!g(t))throw new n.c(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new n.c(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,a)}},50572:(e,t,r)=>{r.r(t),r.d(t,{default:()=>H});var a=r(41948),s=(r(60708),r(47620)),n=r(2600),i=r(25228),o=r(92400),u=r(20744),l=r(9456),d=r(14628),c=r(95800),p=r(66360),h=r(58820),y=r(10860),f=r(28176),g=r(63564),m=r(1580),b=r(12552),w=r(95247),F=r(21136),S=r(54264),A=r(6444),v=r(24296),R=r(60074),I=r(6704),q=r(62768);async function E(e,t,r){const{geometry:a}=t,s={...t.attributes};if(null!=r&&"mesh"===a?.type){const{transformFieldRoles:t}=r,{origin:n,spatialReference:i,transform:o}=a,u=e.spatialReference;await(0,R.initializeProjection)(i,u);const l=(0,R.project)(n,u);if(s[t.originX]=l.x,s[t.originY]=l.y,s[t.originZ]=l.z??0,null!=o){const{translation:e,scale:r,rotation:n}=o,{vertexSpace:l}=a,d="georeferenced"===l.type?1:(0,v.eg)(i)/(0,v.eg)(u);s[t.translationX]=e[0]*d,s[t.translationY]=e[2]*d,s[t.translationZ]=-e[1]*d,s[t.scaleX]=r[0],s[t.scaleY]=r[2],s[t.scaleZ]=r[1],s[t.rotationX]=n[0],s[t.rotationY]=n[2],s[t.rotationZ]=-n[1],s[t.rotationDeg]=n[3]}return{attributes:s}}return null==a?{attributes:s}:"mesh"===a.type||"extent"===a.type?null:{geometry:a.toJSON(),attributes:s}}async function O(e,t){const r=await Promise.all((t.addAttachments??[]).map((t=>x(e,t)))),a=await Promise.all((t.updateAttachments??[]).map((t=>x(e,t)))),s=t.deleteAttachments??[];return r.length||a.length||s.length?{adds:r,updates:a,deletes:[...s]}:null}async function x(e,t){const{feature:r,attachment:a}=t,{globalId:s,name:n,contentType:i,data:o,uploadId:u}=a,l={globalId:s};if(r&&("attributes"in r?l.parentGlobalId=r.attributes?.[e.globalIdField]:r.globalId&&(l.parentGlobalId=r.globalId)),u)l.uploadId=u;else if(o){const e=await(0,f.em)(o);e&&(l.contentType=e.mediaType,l.data=e.data),o instanceof File&&(l.name=o.name)}return n&&(l.name=n),i&&(l.contentType=i),l}function _(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new u.c("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}function M(e,t){return new A.c({attributes:e.attributes,geometry:(0,I.h4)({...e.geometry,spatialReference:t})})}function T(e,t){return{adds:e?.adds?.map((e=>M(e,t)))||[],updates:e?.updates?.map((e=>({original:M(e[0],t),current:M(e[1],t)})))||[],deletes:e?.deletes?.map((e=>M(e,t)))||[],spatialReference:t}}var $=r(17724),C=r(95468),N=r(48212),k=r(70388),U=r(4048),B=r(99944),L=r(49624),D=r(95776),G=r(73184),j=r(56156);const Q=new d.O({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),J=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),P=new d.O({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let V=class extends c.c{constructor(){super(...arguments),this.type="feature-layer",this.refresh=(0,y.Cu)((async()=>{await this.load();const e=this.sourceJSON.editingInfo?.lastEditDate;if(null==e)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}})),this._ongoingAssetUploads=new Map}load(e){const t=this.layer.sourceJSON,r=this._fetchService(t,{...e}).then((()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,e))).then((()=>this._ensureLatestMetadata(e)));return this.addResolvingPromise(r),Promise.resolve(this)}get queryTask(){const{capabilities:e,parsedUrl:t,dynamicDataSource:r,infoFor3D:a,gdbVersion:s,spatialReference:n,fieldsIndex:i}=this.layer,o=(0,l.c)("featurelayer-pbf")&&e?.query.supportsFormatPBF&&null==a,u=e?.operations?.supportsQueryAttachments??!1;return new C.c({url:t.path,pbfSupported:o,fieldsIndex:i,infoFor3D:a,dynamicDataSource:r,gdbVersion:s,sourceSpatialReference:n,queryAttachmentsSupported:u})}async addAttachment(e,t){await this.load();const{layer:r}=this;await(0,k.oh)(r,"editing");const a=e.attributes[r.objectIdField],s=r.parsedUrl.path+"/"+a+"/addAttachment",i=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(t,i.query);try{return _((await(0,n.c)(s,{body:o})).data.addAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(a,e)}}async updateAttachment(e,t,r){await this.load();const{layer:a}=this;await(0,k.oh)(a,"editing");const s=e.attributes[a.objectIdField],i=a.parsedUrl.path+"/"+s+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:t}}),u=this._getFormDataForAttachment(r,o.query);try{return _((await(0,n.c)(i,{body:u})).data.updateAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(s,e)}}async applyEdits(e,t){await this.load();const{layer:r}=this;await(0,k.oh)(r,"editing");const a=r.infoFor3D,i=null!=a,l=i||(t?.globalIdUsed??!1),d=i?await this._uploadMeshesAndGetAssetMapEditsJSON(e):null,c=e.addFeatures?.map((e=>E(this.layer,e,a)))??[],p=(await Promise.all(c)).filter(o.G6),h=e.updateFeatures?.map((e=>E(this.layer,e,a)))??[],y=(await Promise.all(h)).filter(o.G6),f=function(e,t,r){if(!t||0===t.length)return[];if(r&&(0,q.cd)(t))return t.map((e=>e.globalId));if((0,q.cV)(t))return t.map((e=>e.objectId));const a=r?e.globalIdField:e.objectIdField;return a?t.map((e=>e.getAttribute(a))):[]}(this.layer,e.deleteFeatures,l);(0,L.W)(p,y,r.spatialReference);const g=await O(this.layer,e),m=r.capabilities.editing.supportsAsyncApplyEdits&&i,b=t?.gdbVersion||r.gdbVersion,w={gdbVersion:b,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:l,returnEditMoment:t?.returnEditMoment,usePreviousEditMoment:t?.usePreviousEditMoment,async:m};await(0,G.eY)(this.layer.url,b,!0);const F=(0,G.oK)(this.layer.url,b||null);if(await(0,G.sy)(r.url,b,r.historicMoment))throw new u.c("feature-layer-source:historic-version","Editing a historic version is not allowed");t?.returnServiceEditsOption?(w.edits=JSON.stringify([{id:r.layerId,adds:p,updates:y,deletes:f,attachments:g,assetMaps:d}]),w.returnServiceEditsOption=Q.toJSON(t?.returnServiceEditsOption),w.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(w.adds=p.length?JSON.stringify(p):null,w.updates=y.length?JSON.stringify(y):null,w.deletes=f.length?l?JSON.stringify(f):f.join(","):null,w.attachments=g&&JSON.stringify(g),w.assetMaps=null!=d?JSON.stringify(d):void 0);const S=this._getLayerRequestOptions({method:"post",query:w});F&&(S.authMode="immediate",S.query.returnEditMoment=!0,S.query.sessionId=G.aG);const A=t?.returnServiceEditsOption?r.url:r.parsedUrl.path;let v;try{v=m?await this._asyncApplyEdits(A+"/applyEdits",S):await(0,n.c)(A+"/applyEdits",S)}catch(e){if(!function(e){const t=e.details.raw,r=+t.code,a=+t.extendedCode;return 500===r&&(-2147217144===a||-2147467261===a)}(e))throw e;S.authMode="immediate",v=m?await this._asyncApplyEdits(A+"/applyEdits",S):await(0,n.c)(A+"/applyEdits",S)}if(!r.capabilities.operations?.supportsEditing&&r.effectiveCapabilities?.operations?.supportsEditing){const e=s.id?.findCredential(r.url);await(e?.refreshToken())}return this._createEditsResult(v)}async deleteAttachments(e,t){await this.load();const{layer:r}=this;await(0,k.oh)(r,"editing");const a=e.attributes[r.objectIdField],s=r.parsedUrl.path+"/"+a+"/deleteAttachments";try{return(await(0,n.c)(s,this._getLayerRequestOptions({query:{attachmentIds:t.join(",")},method:"post"}))).data.deleteAttachmentResults.map(_)}catch(e){throw this._createAttachmentErrorResult(a,e)}}fetchRecomputedExtents(e={}){const t=e.signal;return this.load({signal:t}).then((async()=>{const t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:r,url:a}=this.layer,{data:s}=await(0,n.c)(`${a}/${r}`,t),{id:o,extent:u,fullExtent:l,timeExtent:d}=s,c=u||l;return{id:o,fullExtent:c&&w.c.fromJSON(c),timeExtent:d&&i.c.fromJSON({start:d[0],end:d[1]})}}))}async queryAttachments(e,t={}){await this.load();const r=this._getLayerRequestOptions(t);return this.queryTask.executeAttachmentQuery(e,r)}async queryFeatures(e,t){await this.load();const r=await this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)});return e.outStatistics?.length&&r.features.length&&r.features.forEach((t=>{const r=t.attributes;e.outStatistics?.forEach((({outStatisticFieldName:e})=>{if(e){const t=e.toLowerCase();t&&t in r&&e!==t&&(r[e]=r[t],delete r[t])}}))})),r}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!(0,N.Wq)(this.layer.url))return"unavailable";const e=(0,f.kn)(this.layer.url,"status"),t=await(0,n.c)(e,{query:{f:"json"}});return P.fromJSON(t.data.status)}async uploadAssets(e,t){const{uploadAssets:a}=await r.e(9920).then(r.bind(r,59920));return a(e,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},t)}async _asyncApplyEdits(e,t){const r=(await(0,n.c)(e,t)).data.statusUrl;for(;;){const e=(await(0,n.c)(r,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return(0,n.c)(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new u.c("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new u.c("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,y.iV)(z)}}_createRequestQueryOptions(e){const t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){const r={};(0,l.c)("featurelayer-advanced-symbols")&&(r.returnAdvancedSymbols=!0),t?.cacheBust&&(r._ts=Date.now());const{data:a}=await(0,n.c)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:r,signal:t?.signal}));e=a}this.sourceJSON=await this._patchServiceJSON(e,t?.signal);const r=e.type;if(!J.has(r))throw new u.c("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}async _patchServiceJSON(e,t){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){const t=(0,$.w7)(e.geometryType).renderer;(0,h.qQ)("drawingInfo.renderer",t,e)}if("esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),null==e.extent)try{const{data:r}=await(0,n.c)(this.layer.url,this._getLayerRequestOptions({signal:t}));r.spatialReference&&(e.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:r.spatialReference})}catch(e){(0,y.CE)(e)}return e}async _ensureLatestMetadata(e){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...e,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(e){const{addAssetFeatures:t}=e;if(!t?.length)return null;const r=await this._filterRedundantAssetMaps(t);if(!t?.length)return null;const a=new Array,s=new Map;for(const e of r){const{geometry:t}=e,{vertexSpace:r}=t;if((0,F.k$)(r))a.push(t);else{const r=(0,F.wX)(t);s.set(r,t),e.geometry=r,a.push(r)}}await this.uploadAssets(a);for(const[e,t]of s)t.addExternalSources(e.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(r),updates:[],deletes:[]}}_getAssetMapEditsJSON(e){const t=new Array,r=this.layer.globalIdField,a=this.layer.parsedUrl;for(const s of e){const e=s.geometry,{metadata:n}=e,i=n.getExternalSourcesOnService(a),o=s.getAttribute(r);if(0===i.length){p.c.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:u}=i.find(S.mK)??i[0],{vertexSpace:l}=e,d="georeferenced"===l.type?["PROJECT_VERTICES"]:[];for(const e of u)1===e.parts.length?t.push({globalId:(0,g.cf)(),parentGlobalId:o,assetName:e.assetName,assetHash:e.parts[0].partHash,flags:d}):p.c.getLogger(this).error(`Skipping asset ${e.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return t}_createEditsResult(e){const t=e.data,{layerId:r}=this.layer,a=[];let s=null;if(Array.isArray(t))for(const e of t)a.push({id:e.id,editedFeatures:e.editedFeatures}),e.id===r&&(s={addResults:e.addResults??[],updateResults:e.updateResults??[],deleteResults:e.deleteResults??[],attachments:e.attachments,editMoment:e.editMoment});else s=t;const n=function(e){const t=e?.assetMaps;if(t){for(const e of t.addResults)e.success||p.c.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`);for(const e of t.updateResults)e.success||p.c.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`)}const r=e?.attachments,a={addFeatureResults:e?.addResults?.map(_)??[],updateFeatureResults:e?.updateResults?.map(_)??[],deleteFeatureResults:e?.deleteResults?.map(_)??[],addAttachmentResults:r?.addResults?r.addResults.map(_):[],updateAttachmentResults:r?.updateResults?r.updateResults.map(_):[],deleteAttachmentResults:r?.deleteResults?r.deleteResults.map(_):[]};return e?.editMoment&&(a.editMoment=e.editMoment),a}(s);if(a.length>0){n.editedFeatureResults=[];for(const e of a){const{editedFeatures:t}=e,r=t?.spatialReference?new j.c(t.spatialReference):null;n.editedFeatureResults.push({layerId:e.id,editedFeatures:T(t,r)})}}return n}_createAttachmentErrorResult(e,t){const r=t.details.messages?.[0]||t.message,a=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new u.c("feature-layer-source:attachment-failure",r,{code:a})}}_getFormDataForAttachment(e,t){const r=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(r)for(const e in t){const a=t[e];null!=a&&(r.set?r.set(e,a):r.append(e,a))}return r}_getLayerRequestOptions(e={}){const{parsedUrl:t,gdbVersion:r,dynamicDataSource:a}=this.layer;return{...e,query:{gdbVersion:r,layer:a?JSON.stringify({source:a}):void 0,...t.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}async _filterRedundantAssetMaps(e){const{layer:t}=this,{globalIdField:r,infoFor3D:a,parsedUrl:s}=t;if(null==a||null==r)return e;const n=(0,U.Mn)(a);if(null==n)return e;const i=(0,f.kn)(s.path,`../${n.id}`),u=new Array,l=new Array;for(const t of e)t.geometry.metadata.getExternalSourcesOnService(s).length>0?l.push(t):u.push(t);const d=l.map((e=>e.getAttribute(r))).filter(o.G6);if(0===d.length)return e;const{assetMapFieldRoles:{parentGlobalId:c,assetHash:p}}=a,h=new D.c;h.where=`${c} IN (${d.map((e=>`'${e}'`))})`,h.outFields=[p,c],h.returnGeometry=!1;const y=await(0,B.c)(i,h),{features:g}=y;return 0===g.length?e:[...u,...l.filter((e=>{const t=e.getAttribute(r);if(!t)return!0;const{metadata:a}=e.geometry,n=g.filter((e=>e.getAttribute(c)===t));if(0===n.length)return!0;const i=n.map((e=>e.getAttribute(p)));return a.getExternalSourcesOnService(s).flatMap((({source:e})=>e.flatMap((e=>e.parts.map((e=>e.partHash)))))).some((e=>i.every((t=>e!==t))))}))]}};(0,a._)([(0,m.qq)()],V.prototype,"type",void 0),(0,a._)([(0,m.qq)({constructOnly:!0})],V.prototype,"layer",void 0),(0,a._)([(0,m.qq)({readOnly:!0})],V.prototype,"queryTask",null),V=(0,a._)([(0,b.c)("esri.layers.graphics.sources.FeatureLayerSource")],V);const z=1e3,H=V},17724:(e,t,r)=>{r.d(t,{G4:()=>p,GA:()=>d,QD:()=>c,w7:()=>o});var a=r(9456),s=r(62088),n=r(13136),i=r(9504);function o(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?i.qe:"esriGeometryPolyline"===e?i.MZ:i.yq}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function d(e,t){if((0,a.c)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${u.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const a=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new a}catch(r){return()=>({[t]:null,...e})}}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,s.ct)(e)}}]}function p(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:n.u,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[456],{52180:(t,e,r)=>{r.d(e,{o:()=>n});var s=r(52324);class n{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,s.o)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*o);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,o));t++)this._items.push(this._allocator())}}const o=1024},93184:(t,e,r)=>{r.d(e,{M:()=>a});var s=r(62484),n=r(60074),o=r(62880);function a(t,e,r,s){if((0,n.canProjectWithoutEngine)(t.spatialReference,r)){i[0]=t.x,i[1]=t.y;const n=t.z;return i[2]=n??s??0,(0,o.projectBuffer)(i,t.spatialReference,0,e,r,0,1)}const a=(0,n.tryProjectWithZConversion)(t,r);return!!a&&(e[0]=a?.x,e[1]=a?.y,e[2]=a?.z??s??0,!0)}const i=(0,s.Su)()},12784:(t,e,r)=>{r.r(e),r.d(e,{assetMapFromAssetMapsJSON:()=>y,extractMesh:()=>d,meshFeatureSetFromJSON:()=>g});var s=r(6444),n=r(66360),o=r(86916),a=r(95247),i=r(94716),c=r(67776),u=r(56156),l=r(41104),f=r(54264),h=r(4048),m=r(59500);const p=()=>n.c.getLogger("esri.rest.support.meshFeatureSet");function g(t,e,r){const n=r.features;r.features=[],delete r.geometryType;const o=m.c.fromJSON(r);if(o.geometryType="mesh",!r.assetMaps)return o;const a=y(e,r.assetMaps),i=t.sourceSpatialReference??u.c.WGS84,c=r.globalIdFieldName,{outFields:l}=t,f=null!=l&&l.length>0?(h=l.includes("*")?null:new Set(l),({attributes:t})=>{if(!t)return{};if(!h)return t;for(const e in t)h.has(e)||delete t[e];return t}):()=>({});var h;for(const t of n){const r=d(t,c,i,e,a);null!=r&&o.features.push(new s.c({geometry:r,attributes:f(t)}))}return o}function d(t,e,r,s,n){const o=t.attributes[e],u=n.get(o);if(null==u)return p().error("mesh-feature-set:asset-not-found","Service returned a feature which was not found in the asset map",t),null;if(!t.geometry)return p().error("mesh-feature-set:no-geometry","Service returned a feature without geometry",t),null;const h=function({attributes:t},e,{transformFieldRoles:r}){const s=t[r.originX],n=t[r.originY],o=t[r.originZ];return new c.c({x:s,y:n,z:o,spatialReference:e})}(t,r,s),m=a.c.fromJSON(t.geometry);m.spatialReference=r;const g=function(t,{transformFieldRoles:e}){return new l.c({translation:[t[e.translationX],-t[e.translationZ],t[e.translationY]],rotationAxis:[t[e.rotationX],-t[e.rotationZ],t[e.rotationY]],rotationAngle:t[e.rotationDeg],scale:[t[e.scaleX],t[e.scaleZ],t[e.scaleY]]})}(t.attributes,s),d=u.projectVertices?"georeferenced":"local",E=function(t){const e=Array.from(t.files.values()),r=new Array;for(const t of e){if(t.status!==w.COMPLETED)return null;const e=new Array;for(const r of t.parts){if(!r)return null;e.push(new f.ai(r.url,r.hash))}r.push(new f.Si(t.name,t.mimeType,e))}return r}(u);return E?i.c.createWithExternalSource(h,E,{extent:m,transform:g,vertexSpace:d}):i.c.createIncomplete(h,{extent:m,transform:g,vertexSpace:d})}var w,E;function y(t,e){const r=new Map;for(const s of e){const e=s.parentGlobalId;if(null==e)continue;const n=s.assetName,a=s.assetType,i=s.assetHash,c=s.assetURL,u=s.conversionStatus,l=s.seqNo,f=(0,h.w$)(a,t.supportedFormats);if(!f){p().error("mesh-feature-set:unknown-format",`Service returned an asset of type ${a}, but it does not list it as a supported type`);continue}const m=(0,o.wJ)(r,e,(()=>({projectVertices:_(s.flags).projectVertices,files:new Map})));(0,o.wJ)(m.files,n,(()=>({name:n,type:a,mimeType:f,status:S(u),parts:[]}))).parts[l]={hash:i,url:c}}return r}function S(t){switch(t){case"COMPLETED":case"SUBMITTED":return w.COMPLETED;case"INPROGRESS":return w.PENDING;default:return w.FAILED}}function _(t){return{projectVertices:t.includes("PROJECT_VERTICES")}}(E=w||(w={}))[E.FAILED=0]="FAILED",E[E.PENDING=1]="PENDING",E[E.COMPLETED=2]="COMPLETED"}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[712,8648],{13452:(e,t,r)=>{r.d(t,{c:()=>p});var i=r(41948),s=r(3856),n=r(40504),o=r(94360),a=r(1580),l=(r(9456),r(66360),r(72052),r(9968)),c=r(12552),d=r(4736);let u=class extends((0,s.q)(n.am)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.QJ)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,l.G)(d.e,{nonNullable:!0})],u.prototype,"unit",void 0),(0,i._)([(0,a.qq)({type:Number,json:{write:!0},nonNullable:!0})],u.prototype,"value",void 0),u=(0,i._)([(0,c.c)("esri.TimeInterval")],u);const p=u},22156:(e,t,r)=>{r.d(t,{MR:()=>o,qm:()=>a});var i=r(41948),s=r(12552);let n=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,i._)([(0,s.c)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return t=(0,i._)([(0,s.c)("esri.core.NumericIdentifiable")],t),t};let l=class extends(o(class{})){};l=(0,i._)([(0,s.c)("esri.core.Identifiable")],l)},77380:(e,t,r)=>{r.d(t,{I:()=>f,Y:()=>i});const i={Base64:0,Hex:1,String:2,Raw:3},s=8,n=(1<<s)-1;function o(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function a(e){const t=[];for(let r=0,i=e.length*s;r<i;r+=s)t[r>>5]|=(e.charCodeAt(r/s)&n)<<r%32;return t}function l(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=s)t.push(String.fromCharCode(e[r>>5]>>>r%32&n));return t.join("")}function c(e,t,r,i,s,n){return o(function(e,t){return e<<t|e>>>32-t}(o(o(t,e),o(i,n)),s),r)}function d(e,t,r,i,s,n,o){return c(t&r|~t&i,e,t,s,n,o)}function u(e,t,r,i,s,n,o){return c(t&i|r&~i,e,t,s,n,o)}function p(e,t,r,i,s,n,o){return c(t^r^i,e,t,s,n,o)}function y(e,t,r,i,s,n,o){return c(r^(t|~i),e,t,s,n,o)}function h(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,s=-1732584194,n=271733878;for(let t=0;t<e.length;t+=16){const a=r,l=i,c=s,h=n;r=d(r,i,s,n,e[t],7,-680876936),n=d(n,r,i,s,e[t+1],12,-389564586),s=d(s,n,r,i,e[t+2],17,606105819),i=d(i,s,n,r,e[t+3],22,-1044525330),r=d(r,i,s,n,e[t+4],7,-176418897),n=d(n,r,i,s,e[t+5],12,1200080426),s=d(s,n,r,i,e[t+6],17,-1473231341),i=d(i,s,n,r,e[t+7],22,-45705983),r=d(r,i,s,n,e[t+8],7,1770035416),n=d(n,r,i,s,e[t+9],12,-1958414417),s=d(s,n,r,i,e[t+10],17,-42063),i=d(i,s,n,r,e[t+11],22,-1990404162),r=d(r,i,s,n,e[t+12],7,1804603682),n=d(n,r,i,s,e[t+13],12,-40341101),s=d(s,n,r,i,e[t+14],17,-1502002290),i=d(i,s,n,r,e[t+15],22,1236535329),r=u(r,i,s,n,e[t+1],5,-165796510),n=u(n,r,i,s,e[t+6],9,-1069501632),s=u(s,n,r,i,e[t+11],14,643717713),i=u(i,s,n,r,e[t],20,-373897302),r=u(r,i,s,n,e[t+5],5,-701558691),n=u(n,r,i,s,e[t+10],9,38016083),s=u(s,n,r,i,e[t+15],14,-660478335),i=u(i,s,n,r,e[t+4],20,-405537848),r=u(r,i,s,n,e[t+9],5,568446438),n=u(n,r,i,s,e[t+14],9,-1019803690),s=u(s,n,r,i,e[t+3],14,-187363961),i=u(i,s,n,r,e[t+8],20,1163531501),r=u(r,i,s,n,e[t+13],5,-1444681467),n=u(n,r,i,s,e[t+2],9,-51403784),s=u(s,n,r,i,e[t+7],14,1735328473),i=u(i,s,n,r,e[t+12],20,-1926607734),r=p(r,i,s,n,e[t+5],4,-378558),n=p(n,r,i,s,e[t+8],11,-2022574463),s=p(s,n,r,i,e[t+11],16,1839030562),i=p(i,s,n,r,e[t+14],23,-35309556),r=p(r,i,s,n,e[t+1],4,-1530992060),n=p(n,r,i,s,e[t+4],11,1272893353),s=p(s,n,r,i,e[t+7],16,-155497632),i=p(i,s,n,r,e[t+10],23,-1094730640),r=p(r,i,s,n,e[t+13],4,681279174),n=p(n,r,i,s,e[t],11,-358537222),s=p(s,n,r,i,e[t+3],16,-722521979),i=p(i,s,n,r,e[t+6],23,76029189),r=p(r,i,s,n,e[t+9],4,-640364487),n=p(n,r,i,s,e[t+12],11,-421815835),s=p(s,n,r,i,e[t+15],16,530742520),i=p(i,s,n,r,e[t+2],23,-995338651),r=y(r,i,s,n,e[t],6,-198630844),n=y(n,r,i,s,e[t+7],10,1126891415),s=y(s,n,r,i,e[t+14],15,-1416354905),i=y(i,s,n,r,e[t+5],21,-57434055),r=y(r,i,s,n,e[t+12],6,1700485571),n=y(n,r,i,s,e[t+3],10,-1894986606),s=y(s,n,r,i,e[t+10],15,-1051523),i=y(i,s,n,r,e[t+1],21,-2054922799),r=y(r,i,s,n,e[t+8],6,1873313359),n=y(n,r,i,s,e[t+15],10,-30611744),s=y(s,n,r,i,e[t+6],15,-1560198380),i=y(i,s,n,r,e[t+13],21,1309151649),r=y(r,i,s,n,e[t+4],6,-145523070),n=y(n,r,i,s,e[t+11],10,-1120210379),s=y(s,n,r,i,e[t+2],15,718787259),i=y(i,s,n,r,e[t+9],21,-343485551),r=o(r,a),i=o(i,l),s=o(s,c),n=o(n,h)}return[r,i,s,n]}function f(e,t=i.Hex){const r=t||i.Base64,n=h(a(e),e.length*s);switch(r){case i.Raw:return n;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,s=4*e.length;i<s;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(n);case i.String:return l(n);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let s=0;s<4;s++)8*r+6*s>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-s)&63))}return t.join("")}(n)}}},90636:(e,t,r)=>{r.d(t,{O:()=>y});var i=r(20744),s=r(77380),n=r(4644),o=r(28176),a=r(63564),l=r(44296),c=r(71448),d=r(1580),u=r(73960),p=r(91952);function y(e){const t=e?.origins??[void 0];return(r,i)=>{const s=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const i=(0,l.EF)(t,r);return{type:String,read:(e,t,r)=>{const s=(0,p.r)(e,t,r);return i.type===String?s:"function"==typeof i.type?new i.type({url:s}):void 0},write:{writer(t,s,a,l){if(!l?.resources)return"string"==typeof t?void(s[a]=(0,p.t)(t,l)):void(s[a]=t.write({},l));const d=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),y=(0,p.t)(d,{...l,verifyItemRelativeUrls:l?.verifyItemRelativeUrls?{writtenUrls:l.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},p.M.NO),g=i.type!==String&&(!(0,n.w)(this)||l?.origin&&this.originIdOf(r)>(0,c.CQ)(l.origin)),w={object:this,propertyName:r,value:t,targetUrl:y,dest:s,targetPropertyName:a,context:l,params:e};l?.portalItem&&y&&!(0,o.ic)(y)?g&&e?.contentAddressed?h(w):g?function(e){const{context:t,targetUrl:r,params:i,value:s,dest:n,targetPropertyName:a}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),c=m(s,r,t),d=(0,u.e)(c),p=(0,o.wt)(l.path),y=i?.compress??!1;d===p?(t.resources&&f({...e,resource:l,content:c,compress:y,updates:t.resources.toUpdate}),n[a]=r):h(e)}(w):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(w):l?.portalItem&&(null==y||null!=(0,p.i)(y)||(0,o.ue)(y)||g)?h(w):s[a]=y}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=p.b;return{read:e,write:t}}}}(e,r,i);for(const e of t){const t=(0,d.aq)(r,e,i);for(const e in s)t[e]=s[e]}}}function h(e){const{targetUrl:t,params:r,value:n,context:l,dest:c,targetPropertyName:d}=e;if(!l.portalItem)return;const y=(0,p.p)(t),h=m(n,t,l);if(r?.contentAddressed&&"json"!==h.type)return void l.messages?.push(new i.c("persistable:contentAddressingUnsupported",`Property "${d}" is trying to serializing a resource with content of type ${h.type} with content addressing. Content addressing is only supported for json resources.`,{content:h}));const g=r?.contentAddressed&&"json"===h.type?(0,s.I)(h.jsonString):y?.filename??(0,a.g1)(),w=(0,o.kn)(r?.prefix??y?.prefix,g),v=`${w}.${(0,u.e)(h)}`;if(r?.contentAddressed&&l.resources&&"json"===h.type){const e=l.resources.toKeep.find((({resource:e})=>e.path===v))??l.resources.toAdd.find((({resource:e})=>e.path===v));if(e)return void(c[d]=e.resource.itemRelativeUrl)}const b=l.portalItem.resourceFromPath(v);(0,o.ue)(t)&&l.resources&&l.resources.pendingOperations.push((0,o.SW)(t).then((e=>{b.path=`${w}.${(0,u.e)({type:"blob",blob:e})}`,c[d]=b.itemRelativeUrl})).catch((()=>{})));const q=r?.compress??!1;l.resources&&f({...e,resource:b,content:h,compress:q,updates:l.resources.toAdd}),c[d]=b.itemRelativeUrl}function f({object:e,propertyName:t,updates:r,resource:i,content:s,compress:n}){r.push({resource:i,content:s,compress:n,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function m(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},63564:(e,t,r)=>{r.d(t,{Mr:()=>o,cf:()=>n,g1:()=>s});const i="randomUUID"in crypto;function s(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${s().toUpperCase()}}`}function o(){return`{${s()}}`}},13819:(e,t,r)=>{r.d(t,{c:()=>v});var i,s=r(41948),n=r(92400),o=r(14628),a=r(40504),l=r(24296),c=r(69504),d=r(1580),u=(r(9456),r(66360),r(33600)),p=r(12552),y=r(18996);const h=(0,o.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),f=h.jsonValues.slice();(0,n.sH)(f,"orthometric");const m=(0,o.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let g=i=class extends a.am{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return h.write(e,t,r)}readHeightModel(e,t,r){return h.read(e)||(r?.messages&&r.messages.push(function(e,t){return new c.c("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return m.read(e)||(r?.messages&&r.messages.push(w(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.oG)(e)||m.read(e)||(r?.messages&&r.messages.push(w(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l._2)(t);return new i({heightModel:e.heightModel,heightUnit:r??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function w(e,t){return new c.c("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,d.qq)({type:h.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f,default:"ellipsoidal"}}}})],g.prototype,"heightModel",void 0),(0,s._)([(0,y.G)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,s._)([(0,u.E)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,s._)([(0,d.qq)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:m.write}}}})],g.prototype,"heightUnit",void 0),(0,s._)([(0,u.E)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,s._)([(0,u.E)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,s._)([(0,d.qq)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,s._)([(0,u.E)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=i=(0,s._)([(0,p.c)("esri.geometry.HeightModelInfo")],g);const v=g},81436:(e,t,r)=>{r.d(t,{c:()=>v});var i=r(41948),s=(r(60708),r(2600)),n=r(20744),o=r(77860),a=r(22156),l=r(95800),c=r(66360),d=r(10860),u=r(28176),p=r(1580),y=(r(9456),r(72052),r(12552)),h=r(6220),f=r(95247),m=r(56156);let g=0,w=class extends(o.c.EventedMixin((0,a.MR)(l.c))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.c(-180,-90,180,90,m.c.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=m.c.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(9232).then(r.bind(r,69232))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(2259).then(r.bind(r,12259));try{return await i(t)}catch(e){const r=t&&t.portalItem,i=r?.id||"unset",s=r&&r.portal&&r.portal.url||h.default.portalUrl;throw c.c.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,d.mA)(e)||c.c.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,u.as)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.c)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.c("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,p.qq)({type:String})],w.prototype,"attributionDataUrl",void 0),(0,i._)([(0,p.qq)({type:f.c})],w.prototype,"fullExtent",void 0),(0,i._)([(0,p.qq)({readOnly:!0})],w.prototype,"hasAttributionData",null),(0,i._)([(0,p.qq)({type:String,clonable:!1})],w.prototype,"id",void 0),(0,i._)([(0,p.qq)({type:Boolean,nonNullable:!0})],w.prototype,"legendEnabled",void 0),(0,i._)([(0,p.qq)({type:["show","hide","hide-children"]})],w.prototype,"listMode",void 0),(0,i._)([(0,p.qq)({type:Number,range:{min:0,max:1},nonNullable:!0})],w.prototype,"opacity",void 0),(0,i._)([(0,p.qq)({clonable:!1})],w.prototype,"parent",void 0),(0,i._)([(0,p.qq)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,i._)([(0,p.qq)({type:Boolean,readOnly:!0})],w.prototype,"persistenceEnabled",void 0),(0,i._)([(0,p.qq)({type:Boolean})],w.prototype,"popupEnabled",void 0),(0,i._)([(0,p.qq)({type:Boolean})],w.prototype,"attributionVisible",void 0),(0,i._)([(0,p.qq)({type:m.c})],w.prototype,"spatialReference",void 0),(0,i._)([(0,p.qq)({type:String})],w.prototype,"title",void 0),(0,i._)([(0,p.qq)({readOnly:!0,json:{read:!1}})],w.prototype,"type",void 0),(0,i._)([(0,p.qq)()],w.prototype,"url",void 0),(0,i._)([(0,p.qq)({type:Boolean,nonNullable:!0})],w.prototype,"visible",void 0),w=(0,i._)([(0,y.c)("esri.layers.Layer")],w);const v=w},3688:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Fe});var i=r(41948),s=r(6444),n=r(82692),o=(r(99704),r(73868),r(90200),r(12836),r(63718),r(2360),r(64624),r(24948),r(70236),r(37284)),a=r(2600),l=r(3856),c=r(2952),d=r(20744),u=r(66360),p=r(26496),y=r(10860),h=r(57896),f=r(28176),m=r(1580),g=(r(9456),r(72052),r(20916)),w=r(33600),v=r(12552),b=r(71448),q=r(94716),I=r(67776),_=r(81436),S=r(4040),F=r(38724),x=r(16660),j=r(28584),E=r(6576),L=r(66576),O=r(98768),A=r(3116),R=r(87072),T=r(6828),U=r(48212),P=r(50420),M=r(36088),D=r(21488),C=r(70388),N=r(66464),G=r(17968),$=r(81732),k=r(16424),V=r(564),H=r(44104),Q=r(4048),J=r(6168),W=r(34880),B=r(24144),K=r(83928),z=r(40504);let Z=class extends z.am{constructor(){super(...arguments),this.name=null,this.field=null,this.currentRangeExtent=null,this.fullRangeExtent=null,this.type="rangeInfo"}};(0,i._)([(0,m.qq)({type:String,json:{read:!0,write:!0}})],Z.prototype,"name",void 0),(0,i._)([(0,m.qq)({type:String,json:{read:!0,write:!0}})],Z.prototype,"field",void 0),(0,i._)([(0,m.qq)({type:[Number],json:{read:!0,write:!0}})],Z.prototype,"currentRangeExtent",void 0),(0,i._)([(0,m.qq)({type:[Number],json:{read:!0,write:!0}})],Z.prototype,"fullRangeExtent",void 0),(0,i._)([(0,m.qq)({type:["rangeInfo"],readOnly:!0,json:{read:!1,write:!0}})],Z.prototype,"type",void 0),Z=(0,i._)([(0,v.c)("esri.layers.support.RangeInfo")],Z);var Y,X=r(62088),ee=r(90636),te=r(69504),re=r(7488),ie=r(60074);let se=Y=class extends((0,z.Ib)(c.c.ofType(re.c))){constructor(e){super(e)}clone(){return new Y(this.items.map((e=>e.clone())))}write(e,t){return this.toJSON(t)}toJSON(e){const t=e?.layer?.spatialReference;return t?this.toArray().map((r=>{if(!t.equals(r.spatialReference)){if(!(0,ie.canProjectWithoutEngine)(r.spatialReference,t))return e?.messages&&e.messages.push(new te.c("scenefilter:unsupported","Scene filters with incompatible spatial references are not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),null;const i=new re.c;(0,ie.projectPolygon)(r,i,t),r=i}const i=r.toJSON(e);return delete i.spatialReference,i})).filter((e=>null!=e)):(e?.messages&&e.messages.push(new te.c("scenefilter:unsupported","Writing Scene filters without context layer is not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),this.toArray().map((t=>t.toJSON(e))))}static fromJSON(e,t){const r=new Y;return e.forEach((e=>r.add(re.c.fromJSON(e,t)))),r}};se=Y=(0,i._)([(0,v.c)("esri.layers.support.PolygonCollection")],se);const ne=se;var oe,ae=r(91952);let le=oe=class extends z.am{constructor(e){super(e),this.spatialRelationship="disjoint",this.geometries=new ne,this._geometriesSource=null}initialize(){this.addHandles((0,h.on)((()=>this.geometries),"after-changes",(()=>this.geometries=this.geometries),h.du))}readGeometries(e,t,r){Array.isArray(e)?this.geometries=ne.fromJSON(e,r):this._geometriesSource={url:(0,ae.f)(e,r),context:r}}async loadGeometries(e,t){if(null==this._geometriesSource)return;const{url:r,context:i}=this._geometriesSource,s=await(0,a.c)(r,{responseType:"json",signal:t?.signal}),n=e.toJSON(),o=s.data.map((e=>({...e,spatialReference:n})));this.geometries=ne.fromJSON(o,i),this._geometriesSource=null}clone(){const e=new oe({geometries:(0,X.ct)(this.geometries),spatialRelationship:this.spatialRelationship});return e._geometriesSource=this._geometriesSource,e}};(0,i._)([(0,m.qq)({type:["disjoint","contains"],nonNullable:!0,json:{write:!0}})],le.prototype,"spatialRelationship",void 0),(0,i._)([(0,m.qq)({type:ne,nonNullable:!0,json:{write:!0}}),(0,ee.O)({origins:["web-scene","portal-item"],type:"resource",prefix:"geometries",contentAddressed:!0})],le.prototype,"geometries",void 0),(0,i._)([(0,w.E)(["web-scene","portal-item"],"geometries")],le.prototype,"readGeometries",null),le=oe=(0,i._)([(0,v.c)("esri.layers.support.SceneFilter")],le);const ce=le;var de=r(97824),ue=r(95776),pe=r(69204),ye=r(56672),he=r(65548);async function fe(e){const t=[];for(const r of e)r.name.toLowerCase().endsWith(".zip")?t.push(me(r)):t.push(Promise.resolve(r));return(await Promise.all(t)).flat()}async function me(e){const{BlobReader:t,ZipReader:i,BlobWriter:s}=await Promise.all([r.e(4831),r.e(9752)]).then(r.bind(r,79752)),n=[],o=new i(new t(e));return(await o.getEntries()).forEach((e=>{if(e.directory||/^__MACOS/i.test(e.filename))return;const t=new s,r=e.getData?.(t).then((t=>new File([t],e.filename)));r&&n.push(r)})),Promise.all(n)}var ge=r(74776),we=r(63680),ve=r(9332);const be=new Set(["3DObject","Point"]),qe=(0,$.l)();let Ie=class extends((0,T.c)((0,E.CE)((0,R.G6)((0,x.u)((0,L.Y)((0,O.K)((0,A.I)((0,p.U)((0,j.G)((0,F.C)((0,l.q)(_.c)))))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new c.c,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new k.c(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:H.yq.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return null!=this.associatedLayer&&(0,C.ig)(this.associatedLayer)}get geometryType(){return Se[this.profile]||"mesh"}set renderer(e){(0,V.Gi)(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e=null!=e?e:M.u;const{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsRollbackOnFailure:s,supportsUploadWithItemId:n,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:a},data:{supportsZ:l,supportsM:c,isVersioned:d,supportsAttachment:u},operations:{supportsEditing:p,supportsAdd:y,supportsUpdate:h,supportsDelete:f,supportsQuery:m,supportsQueryAttachments:g,supportsAsyncConvert3D:w}}=e,v=e.operations.supportsChangeTracking,b=!!this.associatedLayer?.infoFor3D&&(0,ye.g1)();return{query:t,queryRelated:r,editing:{supportsGlobalId:i,supportsReturnServiceEditsInSourceSpatialReference:a,supportsRollbackOnFailure:s,supportsGeometryUpdate:b&&o,supportsUploadWithItemId:n},data:{supportsAttachment:u,supportsZ:l,supportsM:c,isVersioned:d},operations:{supportsQuery:m,supportsQueryAttachments:g,supportsEditing:p&&v,supportsAdd:b&&y&&v,supportsDelete:b&&f&&v,supportsUpdate:h&&v,supportsAsyncConvert3D:w}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e))),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e))),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&_e[r]?_e[r]:(u.c.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){const t=null!=e?e.signal:null;await this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(y.CE),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await(0,de.M)(this,{origin:"service"},t),(0,V.Gi)(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){u.c.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new ue.c;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e}))}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new d.c("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new d.c("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){const r=(0,V.k7)(this.fieldsIndex,await(0,we.W_)(this,(0,we.M$)(this)));return(0,ge.cx)(this.parsedUrl.path,this.attributeStorageInfo??[],e,t,r,this.apiKey,this.customParameters)}async queryCachedFeature(e,t){const r=await this.queryCachedAttributes(e,[t]);if(!r||0===r.length)throw new d.c("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const i=new s.c;return i.attributes=r[0],i.layer=this,i.sourceLayer=this,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryAttachments(e,t)))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(u.c.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return(0,he.Ap)(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new d.c("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new d.c("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some((t=>t.name===e))}async queryCachedStatistics(e,t){if(await this.load(t),!this.statisticsInfo)throw new d.c("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new d.c("scenelayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const e of this.statisticsInfo)if(e.name===r.name){const r=(0,f.kn)(this.parsedUrl.path,e.href);return(0,a.c)(r,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new d.c("scenelayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(R.UJ.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(R.UJ.SAVE,e)}async applyEdits(e,t){const{applyEdits:i}=await r.e(387).then(r.bind(r,62768));let s=t;await this.load();const n=this.associatedLayer;if(!n)throw new d.c(`${this.type}-layer:not-editable`,"Service is not editable");await n.load();const{globalIdField:o}=n,a=!!n.infoFor3D,l=s?.globalIdUsed??!0;if(a&&null==o)throw new d.c(`${this.type}-layer:not-editable`,"Valid globalIdField expected on editable SceneLayer");if(a&&!l)throw new d.c(`${this.type}-layer:globalid-required`,"globalIdUsed must not be false for SceneLayer editing as globalIds are required.");return(0,U.Wq)(n.url)&&a&&null!=e.deleteFeatures&&null!=o&&(s={...s,globalIdToObjectId:await(0,C.wl)(n,e.deleteFeatures,o)}),i(this,n.source,e,s)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new d.c(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}async convertMesh(e,t){const r=e=>{throw u.c.getLogger(this).error(".convertMesh()",e.message),e};await this.load(),this.infoFor3D||r(new d.c("invalid:layer","SceneLayer has no capability for mesh conversion"));const i=await this.extractAndFilterFiles(e),s=i.reduce(((e,t)=>(0,Q.kD)(this.infoFor3D,t)?e+1:e),0);0===s&&r(new S.Su),s>1&&r(new S.Ev);const n=this.spatialReference,o=t?.location??new I.c({x:0,y:0,z:0,spatialReference:n}),a=t?.vertexSpace,l=q.c.createWithExternalSource(o,i,{vertexSpace:a}),[c]=await this.uploadAssets([l],t);return c}async extractAndFilterFiles(e){await this.load();const t=this.infoFor3D;return t?(await fe(e)).filter((e=>(0,Q.sz)(t,e))):e}validateLayer(e){if(e.layerType&&!be.has(e.layerType))throw new d.c("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new d.c("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new d.c("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});!function(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new d.c("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new d.c("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new d.c("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!(!this.attributeStorageInfo||!this.attributeStorageInfo.some((t=>t.name===e.name))),r=!!this.associatedLayer?.fields?.some((t=>t&&e.name===t.name)),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPopupOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=(0,g.m6)(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),n=this.associatedLayer.originIdOf(i);s<n&&(n===b.sT.SERVICE||n===b.sT.PORTAL_ITEM)&&t.setAtOrigin(i,this.associatedLayer[i],n)}}_applyAssociatedLayerExtentOverride(){const e=this.associatedLayer?.editingInfo?.lastEditDate,t=this.associatedLayer?.serverGens,r=this.associatedLayer?.getAtOrigin("fullExtent","service");(0,ye.g1)()&&null!=this.associatedLayer?.infoFor3D&&r&&(0,U.Wq)(this.associatedLayer?.url)&&e&&this.serviceUpdateTimeStamp?.lastUpdate!==e.getTime()&&(this.serviceUpdateTimeStamp||t?.minServerGen!==t?.serverGen)&&(0,g.m6)(this).setAtOrigin("fullExtent",r.clone(),b.sT.SERVICE)}_applyAssociatedLayerPrivileges(){const e=this.associatedLayer;e&&(this._set("userHasEditingPrivileges",e.userHasEditingPrivileges),this._set("userHasFullEditingPrivileges",e.userHasFullEditingPrivileges),this._set("userHasUpdateItemPrivileges",e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if(["mesh-pyramids","points"].includes(this.profile))try{const{serverUrl:t,layerId:r,portalItem:i}=await(0,P.S)(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),s=await K.q.FeatureLayer();this.associatedLayer=new s({url:t,customParameters:this.customParameters,layerId:r,portalItem:i}),await this.associatedLayer.load()}catch(e){(0,y.mA)(e)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await(0,h.Eq)((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?u.c.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):u.c.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;"mesh-pyramids"===this.profile&&(0,pe.A$)(u.c.getLogger(this),(0,pe.ay)("Mesh scene layers","relative-to-scene",e)),(0,pe.A$)(u.c.getLogger(this),(0,pe.W8)("Scene layers",e))}};(0,i._)([(0,m.qq)({types:{key:"type",base:N.E,typeMap:{selection:G.c}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],Ie.prototype,"featureReduction",void 0),(0,i._)([(0,m.qq)({type:[Z],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],Ie.prototype,"rangeInfos",void 0),(0,i._)([(0,m.qq)({json:{read:!1}})],Ie.prototype,"associatedLayer",void 0),(0,i._)([(0,m.qq)({type:["show","hide"]})],Ie.prototype,"listMode",void 0),(0,i._)([(0,m.qq)({type:["ArcGISSceneServiceLayer"]})],Ie.prototype,"operationalLayerType",void 0),(0,i._)([(0,m.qq)({json:{read:!1},readOnly:!0})],Ie.prototype,"type",void 0),(0,i._)([(0,m.qq)({...qe.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ie.prototype,"fields",void 0),(0,i._)([(0,m.qq)()],Ie.prototype,"types",null),(0,i._)([(0,m.qq)()],Ie.prototype,"typeIdField",null),(0,i._)([(0,m.qq)()],Ie.prototype,"templates",null),(0,i._)([(0,m.qq)()],Ie.prototype,"formTemplate",null),(0,i._)([(0,m.qq)({readOnly:!0,clonable:!1})],Ie.prototype,"fieldsIndex",null),(0,i._)([(0,m.qq)({type:B.c,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],Ie.prototype,"floorInfo",void 0),(0,i._)([(0,m.qq)(qe.outFields)],Ie.prototype,"outFields",void 0),(0,i._)([(0,m.qq)({type:H.yq,readOnly:!0,json:{read:!1}})],Ie.prototype,"nodePages",void 0),(0,i._)([(0,w.E)("service","nodePages",["nodePages","pointNodePages"])],Ie.prototype,"readNodePages",null),(0,i._)([(0,m.qq)({type:[H.a],readOnly:!0})],Ie.prototype,"materialDefinitions",void 0),(0,i._)([(0,m.qq)({type:[H.G4],readOnly:!0})],Ie.prototype,"textureSetDefinitions",void 0),(0,i._)([(0,m.qq)({type:[H.iK],readOnly:!0})],Ie.prototype,"geometryDefinitions",void 0),(0,i._)([(0,m.qq)({readOnly:!0})],Ie.prototype,"serviceUpdateTimeStamp",void 0),(0,i._)([(0,m.qq)({readOnly:!0})],Ie.prototype,"attributeStorageInfo",void 0),(0,i._)([(0,m.qq)({readOnly:!0})],Ie.prototype,"statisticsInfo",void 0),(0,i._)([(0,m.qq)({type:c.c.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],Ie.prototype,"excludeObjectIds",void 0),(0,i._)([(0,m.qq)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],Ie.prototype,"definitionExpression",void 0),(0,i._)([(0,m.qq)({type:ce,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Ie.prototype,"filter",void 0),(0,i._)([(0,m.qq)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Ie.prototype,"path",void 0),(0,i._)([(0,m.qq)(D.Kg)],Ie.prototype,"elevationInfo",null),(0,i._)([(0,m.qq)({readOnly:!0,json:{read:!1}})],Ie.prototype,"effectiveCapabilities",null),(0,i._)([(0,m.qq)({readOnly:!0})],Ie.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,m.qq)({type:String})],Ie.prototype,"geometryType",null),(0,i._)([(0,m.qq)(D.Wu)],Ie.prototype,"labelsVisible",void 0),(0,i._)([(0,m.qq)({type:[J.c],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:W.E},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:W.E},write:!0}})],Ie.prototype,"labelingInfo",void 0),(0,i._)([(0,m.qq)(D.Uj)],Ie.prototype,"legendEnabled",void 0),(0,i._)([(0,m.qq)({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?(0,ve.u)(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],Ie.prototype,"opacity",void 0),(0,i._)([(0,m.qq)({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ie.prototype,"priority",void 0),(0,i._)([(0,m.qq)({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Ie.prototype,"semantic",void 0),(0,i._)([(0,m.qq)({types:o.Q,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],Ie.prototype,"renderer",null),(0,i._)([(0,m.qq)({json:{read:!1}})],Ie.prototype,"cachedDrawingInfo",void 0),(0,i._)([(0,w.E)("service","cachedDrawingInfo")],Ie.prototype,"readCachedDrawingInfo",null),(0,i._)([(0,m.qq)({readOnly:!0,json:{read:!1}})],Ie.prototype,"capabilities",null),(0,i._)([(0,m.qq)({type:Boolean,json:{read:!1}})],Ie.prototype,"editingEnabled",null),(0,i._)([(0,m.qq)({readOnly:!0,json:{write:!1,read:!1}})],Ie.prototype,"infoFor3D",null),(0,i._)([(0,m.qq)({readOnly:!0,json:{write:!1,read:!1}})],Ie.prototype,"relationships",null),(0,i._)([(0,m.qq)(D.Ou)],Ie.prototype,"popupEnabled",void 0),(0,i._)([(0,m.qq)({type:n.c,json:{name:"popupInfo",write:!0}})],Ie.prototype,"popupTemplate",void 0),(0,i._)([(0,m.qq)({readOnly:!0,json:{read:!1}})],Ie.prototype,"defaultPopupTemplate",null),(0,i._)([(0,m.qq)({type:String,json:{read:!1}})],Ie.prototype,"objectIdField",void 0),(0,i._)([(0,w.E)("service","objectIdField",["objectIdField","fields"])],Ie.prototype,"readObjectIdField",null),(0,i._)([(0,m.qq)({type:String,json:{read:!1}})],Ie.prototype,"globalIdField",void 0),(0,i._)([(0,w.E)("service","globalIdField",["globalIdField","fields"])],Ie.prototype,"readGlobalIdField",null),(0,i._)([(0,m.qq)({readOnly:!0,type:String,json:{read:!1}})],Ie.prototype,"displayField",null),(0,i._)([(0,m.qq)({type:String,json:{read:!1}})],Ie.prototype,"profile",void 0),(0,i._)([(0,w.E)("service","profile",["store.profile"])],Ie.prototype,"readProfile",null),(0,i._)([(0,m.qq)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],Ie.prototype,"normalReferenceFrame",void 0),(0,i._)([(0,m.qq)(D.Q9)],Ie.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,m.qq)({json:{read:!1,origins:{service:{read:!0}}}})],Ie.prototype,"serviceItemId",void 0),Ie=(0,i._)([(0,v.c)("esri.layers.SceneLayer")],Ie);const _e={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},Se={"mesh-pyramids":"mesh",points:"point",lines:"polyline",polygons:"polygon"},Fe=Ie},4040:(e,t,r)=>{r.d(t,{AQ:()=>u,Av:()=>d,Ev:()=>m,KY:()=>o,Qr:()=>l,Su:()=>f,a:()=>a,iq:()=>h,kQ:()=>p,kz:()=>c,q8:()=>y});var i=r(20744);const s="upload-assets",n=()=>new Error;class o extends i.c{constructor(){super(`${s}:unsupported`,"Layer does not support asset uploads.",n())}}class a extends i.c{constructor(){super(`${s}:no-glb-support`,"Layer does not support glb.",n())}}class l extends i.c{constructor(){super(`${s}:no-supported-source`,"No supported external source found",n())}}class c extends i.c{constructor(){super(`${s}:not-base-64`,"Expected gltf data in base64 format after conversion.",n())}}class d extends i.c{constructor(){super(`${s}:unable-to-prepare-options`,"Unable to prepare uploadAsset request options.",n())}}class u extends i.c{constructor(e,t){super(`${s}:bad-response`,`Bad response. Uploaded ${e} items and received ${t} results.`,n())}}class p extends i.c{constructor(e,t){super(`${s}-layer:upload-failed`,`Failed to upload mesh file ${e}. Error code: ${t?.code??"-1"}. Error message: ${t?.messages??"unknown"}`,n())}}class y extends i.c{constructor(e){super(`${s}-layer:unsupported-format`,`The service allowed us to upload an asset of FormatID ${e}, but it does not list it in its supported formats.`,n())}}class h extends i.c{constructor(){super(`${s}:convert3D-failed`,"convert3D failed.")}}class f extends i.c{constructor(){super("invalid-input:no-model","No supported model found")}}class m extends i.c{constructor(){super("invalid-input:multiple-models","Multiple supported models found")}}},6576:(e,t,r)=>{r.d(t,{CE:()=>m,iC:()=>y,mK:()=>d});var i=r(41948),s=r(77860),n=r(62088),o=r(10860),a=(r(66360),r(9456),r(20744),r(12552)),l=r(73184);const c=new s.c.EventEmitter;function d(e,t,r=null,i=!1){const s=(0,o.qG)();return i=null==t||i,c.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:r,mayReceiveServiceEdits:i,result:s.promise}),s}const u="esri.layers.mixins.EditBusLayer",p=Symbol(u);function y(e){return null!=e&&"object"==typeof e&&p in e}function h(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function f(e,t,r){const i=new URL(e).host,s=l.k5.get(i),n=e=>!e||e===s;return n(t)&&n(r)||t===r}const m=e=>{var t;let r=class extends e{constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:r,gdbVersion:i,mayReceiveServiceEdits:s,result:o}=e,a=t===this.url,c=null!=r&&null!=this.layerId&&r===this.layerId,d=h(this),u=h(this)&&f(t,i,this.gdbVersion);if(!a||d&&!u||!c&&!s)return;const p=o.then((e=>{if(c&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,n.ct)(e)),e;const t=e.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(t){const{adds:r,updates:i,deletes:s}=t.editedFeatures,o={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:r?r.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],deletedFeatures:s?s.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],updatedFeatures:i?i.map((({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],editedFeatures:(0,n.ct)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.ct)(e.historicMoment)};return this.emit("edits",o),o}return{edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,n.ct)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,n.ct)(e.historicMoment)}})).then((e=>("historicMoment"in this&&this.historicMoment!==e.historicMoment&&(0,l.oK)(t,i)&&(this.historicMoment=e.historicMoment),e)));this.emit("apply-edits",{result:p})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:r,moment:i}=e,s=t===this.url,n=h(this),o=h(this)&&f(t,r,this.gdbVersion),a=h(this)&&!f(t,this.gdbVersion,null);s&&n&&o&&a&&"historicMoment"in this&&this.historicMoment!==i&&(this.historicMoment=i)},this.when().then((()=>{this.addHandles(function(e){return c.on("apply-edits",new WeakRef(e))}(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(function(e){return c.on("update-moment",new WeakRef(e))}(this._updateMomentHandler))}),(()=>{}))}};return t=p,r=(0,i._)([(0,a.c)(u)],r),r}},3116:(e,t,r)=>{r.d(t,{I:()=>o});var i=r(41948),s=r(1580),n=(r(9456),r(66360),r(72052),r(12552));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,s.qq)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,s.qq)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,s.qq)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,n.c)("esri.layers.mixins.ScaleRangeLayer")],t),t}},66464:(e,t,r)=>{r.d(t,{E:()=>a});var i=r(41948),s=r(40504),n=r(1580),o=(r(9456),r(66360),r(72052),r(12552));let a=class extends s.am{constructor(){super(...arguments),this.type=null}};(0,i._)([(0,n.qq)({type:["selection","cluster","binning"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=(0,i._)([(0,o.c)("esri.layers.support.FeatureReduction")],a)},17968:(e,t,r)=>{r.d(t,{c:()=>c});var i,s=r(41948),n=r(1580),o=(r(9456),r(66360),r(72052),r(12552)),a=r(66464);let l=i=class extends a.E{constructor(e){super(e),this.type="selection"}clone(){return new i}};(0,s._)([(0,n.qq)({type:["selection"]})],l.prototype,"type",void 0),l=i=(0,s._)([(0,o.c)("esri.layers.support.FeatureReductionSelection")],l);const c=l},99336:(e,t,r)=>{r.d(t,{c:()=>f});var i=r(41948),s=r(25228),n=r(13452),o=r(3856),a=r(40504),l=r(1580),c=(r(9456),r(66360),r(72052),r(33600)),d=r(12552),u=r(18996),p=r(28484);function y(e,t){return n.c.fromJSON({value:e,unit:t})}let h=class extends((0,o.q)(a.am)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),i=new Date(t.timeExtent[1]);return new s.c({start:r,end:i})}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?y(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?y(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,l.qq)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],h.prototype,"cumulative",void 0),(0,i._)([(0,l.qq)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"endField",void 0),(0,i._)([(0,l.qq)({type:s.c,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"fullTimeExtent",void 0),(0,i._)([(0,c.E)("fullTimeExtent",["timeExtent"])],h.prototype,"readFullTimeExtent",null),(0,i._)([(0,u.G)("fullTimeExtent")],h.prototype,"writeFullTimeExtent",null),(0,i._)([(0,l.qq)({type:Boolean,json:{write:!0}})],h.prototype,"hasLiveData",void 0),(0,i._)([(0,l.qq)({type:n.c,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"interval",void 0),(0,i._)([(0,c.E)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],h.prototype,"readInterval",null),(0,i._)([(0,u.G)("interval")],h.prototype,"writeInterval",null),(0,i._)([(0,l.qq)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],h.prototype,"startField",void 0),(0,i._)([(0,l.qq)((0,p.SM)("timeReference",!0))],h.prototype,"timeZone",void 0),(0,i._)([(0,l.qq)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],h.prototype,"trackIdField",void 0),(0,i._)([(0,l.qq)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],h.prototype,"useTime",void 0),h=(0,i._)([(0,d.c)("esri.layers.support.TimeInfo")],h);const f=h},70388:(e,t,r)=>{r.d(t,{wj:()=>v,cV:()=>I,ig:()=>N,i:()=>$,cJ:()=>T,WC:()=>S,oh:()=>C,s1:()=>F,sD:()=>w,wl:()=>V,yo:()=>R,gx:()=>k,Q1:()=>x,iq:()=>L,YL:()=>E,W2:()=>j,ms:()=>O,UN:()=>A,Y9:()=>U,qY:()=>P,Ce:()=>M,kd:()=>q,Wm:()=>_});var i=r(47620),s=r(17988),n=r(40196),o=r(20744),a=r(14628),l=r(44247),c=r(64408),d=r(95776);async function u(e,t,r){t=t.clone(),e.capabilities.query.supportsMaxRecordCountFactor&&(t.maxRecordCountFactor=p(e));const i=function(e){return p(e)*function(e){return e.capabilities.query.maxRecordCount||2e3}(e)}(e),s=e.capabilities.query.supportsPagination;t.start=0,t.num=i;let n=null;for(;;){const o=await e.source.queryFeaturesJSON(t,r);if(null==n?n=o:n.features=n.features.concat(o.features),n.exceededTransferLimit=o.exceededTransferLimit,!s||!o.exceededTransferLimit)break;t.start+=i}return n}function p(e){return e.capabilities.query.supportsMaxRecordCountFactor?d.c.MAX_MAX_RECORD_COUNT_FACTOR:1}var y=r(71068),h=r(64624),f=r(24948),m=r(19212),g=r(18648);const w=new a.O({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryMultiPatch:"multipatch"});async function v(e,t,r,i){const s=await D(e);if(await b(e,t,i),!s.addAttachment)throw new o.c(i,"Layer source does not support addAttachment capability");return s.addAttachment(t,r)}function b(e,t,r){const{attributes:i}=t,{objectIdField:s}=e;return e.capabilities?.data?.supportsAttachment?t?i?s&&i[s]?Promise.resolve():Promise.reject(new o.c(r,`feature is missing the identifying attribute ${s}`)):Promise.reject(new o.c(r,"'attributes' are required on a feature to query attachments")):Promise.reject(new o.c(r,"A feature is required to add/delete/update attachments")):Promise.reject(new o.c(r,"this layer doesn't support attachments"))}async function q(e,t,r,i,s){const n=await D(e);if(await b(e,t,s),!n.updateAttachment)throw new o.c(s,"Layer source does not support updateAttachment capability");return n.updateAttachment(t,r,i)}async function I(e,t,i){const{applyEdits:s}=await r.e(2768).then(r.bind(r,62768)),n=await e.load(),{source:o,globalIdField:a}=n;let l=i;return("feature"===n.type?n.infoFor3D:null)&&null!=t.deleteFeatures&&null!=a&&(l={...l,globalIdToObjectId:await V(e,t.deleteFeatures,a)}),s(n,o,t,i)}async function _(e,t,i){const{uploadAssets:s}=await r.e(2768).then(r.bind(r,62768)),n=await e.load();return s(n,n.source,t,i)}async function S(e,t,r,i){const s=await D(e);if(await b(e,t,i),!s.deleteAttachments)throw new o.c(i,"Layer source does not support deleteAttachments capability");return s.deleteAttachments(t,r)}async function F(e,t,r){const i=(await e.load({signal:t?.signal})).source;if(!i.fetchRecomputedExtents)throw new o.c(r,"Layer source does not support fetchUpdates capability");return i.fetchRecomputedExtents(t)}async function x(e,t,r,i){t=m.c.from(t),await e.load();const s=e.source,n=e.capabilities;if(!n?.data?.supportsAttachment)throw new o.c(i,"this layer doesn't support attachments");const{attachmentTypes:a,objectIds:l,globalIds:c,num:d,size:u,start:p,where:y}=t;if(!n?.operations?.supportsQueryAttachments&&(a?.length>0||c?.length>0||u?.length>0||d||p||y))throw new o.c(i,"when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",t);if(!(l?.length||c?.length||y))throw new o.c(i,"'objectIds', 'globalIds', or 'where' are required to perform attachment query",t);if(!s.queryAttachments)throw new o.c(i,"Layer source does not support queryAttachments capability",t);return s.queryAttachments(t)}async function j(e,t,r,i){const s=await D(e);if(!s.queryObjectIds)throw new o.c(i,"Layer source does not support queryObjectIds capability");return s.queryObjectIds(d.c.from(t)??e.createQuery(),r)}async function E(e,t,r,i){const s=await D(e);if(!s.queryFeatureCount)throw new o.c(i,"Layer source does not support queryFeatureCount capability");return s.queryFeatureCount(d.c.from(t)??e.createQuery(),r)}async function L(e,t,r,i){const s=await D(e);if(!s.queryExtent)throw new o.c(i,"Layer source does not support queryExtent capability");return s.queryExtent(d.c.from(t)??e.createQuery(),r)}async function O(e,t,r,i){const s=await D(e);if(!s.queryRelatedFeatures)throw new o.c(i,"Layer source does not support queryRelatedFeatures capability");return s.queryRelatedFeatures(g.default.from(t),r)}async function A(e,t,r,i){const s=await D(e);if(!s.queryRelatedFeaturesCount)throw new o.c(i,"Layer source does not support queryRelatedFeaturesCount capability");return s.queryRelatedFeaturesCount(g.default.from(t),r)}async function R(e){const t=e.source;if(t?.refresh)try{const{dataChanged:r,updates:i}=await t.refresh();if(null!=i&&(e.sourceJSON={...e.sourceJSON,...i},e.read(i,{origin:"service",url:e.parsedUrl})),r)return!0}catch{}if(e.definitionExpression)try{return(await(0,l.u)(e.definitionExpression,e.fieldsIndex)).hasDateFunctions}catch{}return!1}function T(e){const t=new d.c,r=e.capabilities?.data,i=e.capabilities?.query;t.historicMoment=e.historicMoment,t.gdbVersion=e.gdbVersion,t.returnGeometry=!0,i&&(t.compactGeometryEnabled=i.supportsCompactGeometry,t.defaultSpatialReferenceEnabled=i.supportsDefaultSpatialReference),r&&(r.supportsZ&&null!=e.returnZ&&(t.returnZ=e.returnZ),r.supportsM&&null!=e.returnM&&(t.returnM=e.returnM)),t.outFields=["*"];const{timeOffset:s,timeExtent:n}=e;return t.timeExtent=null!=s&&null!=n?n.offset(-s.value,s.unit):n||null,t.multipatchOption="multipatch"===e.geometryType?"xyFootprint":null,t}function U(e){const{globalIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeGlobalID"===e.type)return e.name}function P(e){const{objectIdField:t,fields:r}=e;if(t)return t;if(r)for(const e of r)if("esriFieldTypeOID"===e.type)return e.name}function M(e){return e.currentVersion?e.currentVersion:e.hasOwnProperty("capabilities")||e.hasOwnProperty("drawingInfo")||e.hasOwnProperty("hasAttachments")||e.hasOwnProperty("htmlPopupType")||e.hasOwnProperty("relationships")||e.hasOwnProperty("timeInfo")||e.hasOwnProperty("typeIdField")||e.hasOwnProperty("types")?10:9.3}async function D(e){return(await e.load()).source}async function C(e,t,r){const s=e.parsedUrl?.path;s&&e.authenticationTriggerEvent===t&&await async function(e,t){if(!i.id)return;if(i.id.findCredential(e))return;let r;try{const s=await(0,y.mK)(e,t);s&&(r=await i.id.checkSignInStatus(`${s}/sharing`))}catch(e){}if(r)try{const r=null!=t?t.signal:null;await i.id.getCredential(e,{signal:r})}catch(e){}}(s,r)}function N(e){return!e.sourceJSON?.isMultiServicesView&&(e.userHasUpdateItemPrivileges||e.editingEnabled)}const G=(0,c.g)({types:s.IX});function $(e,t){if(e.defaultSymbol)return e.types?.length?new f.c({defaultSymbol:G(e.defaultSymbol,e,t),field:e.typeIdField,uniqueValueInfos:e.types.map((e=>({id:e.id,symbol:G(e.symbol,e,t)})))}):new h.c({symbol:G(e.defaultSymbol,e,t)})}function k(e){let t=e.sourceJSON?.cacheMaxAge;if(!t)return!1;const r=e.editingInfo?.lastEditDate?.getTime();return null==r||(t*=1e3,Date.now()-r<t)}async function V(e,t,r){if(null==t)return null;const i=[],{objectIdField:s}=e;if(t.forEach((e=>{let t=null;if("attributes"in e){const{attributes:i}=e;t={globalId:i[r],objectId:null!=i[s]&&-1!==i[s]?i[s]:null}}else t={globalId:e.globalId,objectId:null!=e.objectId&&-1!==e.objectId?e.objectId:null};null!=t.globalId&&(null!=t.objectId&&-1!==t.objectId||i.push(t.globalId))})),0===i.length)return null;const o=e.createQuery();o.where=i.map((e=>`${r}='${e}'`)).join(" OR "),o.returnGeometry=!1,o.outFields=[s,r],o.cacheHint=!1;const a=await(0,n.SO)(u(e,o));if(!a.ok)return null;const l=new Map,c=a.value.features;for(const e of c){const t=e.attributes[r],i=e.attributes[s];null!=t&&null!=i&&-1!==i&&l.set(t,i)}return l}},81732:(e,t,r)=>{r.d(t,{l:()=>l});var i=r(9456),s=r(66360),n=r(600),o=r(16424),a=r(564);function l(){return{fields:{type:[n.c],value:null,set:function(e){if(e&&(0,i.c)("big-integer-warning-enabled")){const t=e.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(t.length){const e=t.map((e=>`'${e.name}'`)).join(", ");s.c.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.c.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||s.c.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.OO)(this.fieldsIndex,e)}}}}},4048:(e,t,r)=>{r.d(t,{If:()=>a,K0:()=>c,Mn:()=>h,kD:()=>n,me:()=>o,sz:()=>s,w$:()=>l});const i=[["binary","application/octet-stream","bin",""]];function s(e,t){return null!=u(t.name,e?.supportedFormats??[])}function n(e,t){if(!e)return!1;const r=c(t,e.supportedFormats??[]);return null!=r&&e.editFormats.includes(r)}function o(e,t){return p(function(e,t){const r=e.toLowerCase();return d(t).find((e=>y(e)===r))}(e,t))}function a(e,t){return p(u(e,t))}function l(e,t){return y(function(e,t){return d(t).find((t=>p(t)===e))}(e,t))}function c(e,t){return a(e.name,t)??o(e.type,t)}function d(e){return[...i,...e]}function u(e,t){const r=e.toLowerCase();return d(t).find((e=>function(e){return e?.[2].split(",").map((e=>e.toLowerCase()))??[]}(e).some((e=>r.endsWith(e)))))}function p(e){return e?.[0]}function y(e){return e?.[1].toLowerCase()}function h(e){return e.tables?.find((e=>"assetMaps"===e.role))}},73960:(e,t,r)=>{r.d(t,{e:()=>s});var i=r(28176);function s(e){return n[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.wt)(e);return l[t]||o}(e.url)}(e)]||a}const n={},o="text/plain",a=n[o],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)n[l[e]]=e},4736:(e,t,r)=>{r.d(t,{e:()=>i});const i=(0,r(14628).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},97824:(e,t,r)=>{r.d(t,{M:()=>o});var i=r(40196),s=r(10860),n=r(69504);async function o(e,t,r){const o=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(o&&"unique-value"===o.type&&o.styleOrigin){const a=await(0,i.aG)(o.populateFromStyle());if((0,s.wp)(r),!1===a.ok){const r=a.error;t?.messages&&t.messages.push(new n.c("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:t})),e.clear("renderer",t?.origin)}}}},18648:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h});var i,s=r(41948),n=(r(60708),r(40504)),o=r(62088),a=r(1580),l=r(53368),c=r(12552),d=r(18996),u=r(88204),p=r(56156);let y=i=class extends n.am{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new i((0,o.ct)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,s._)([(0,a.qq)({type:Boolean,json:{write:!0}})],y.prototype,"cacheHint",void 0),(0,s._)([(0,a.qq)({type:u.U,json:{write:!0}})],y.prototype,"dynamicDataSource",void 0),(0,s._)([(0,a.qq)({type:String,json:{write:!0}})],y.prototype,"gdbVersion",void 0),(0,s._)([(0,a.qq)({type:Number,json:{write:!0}})],y.prototype,"geometryPrecision",void 0),(0,s._)([(0,a.qq)({type:Date})],y.prototype,"historicMoment",void 0),(0,s._)([(0,d.G)("historicMoment")],y.prototype,"_writeHistoricMoment",null),(0,s._)([(0,a.qq)({type:Number,json:{write:!0}})],y.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,a.qq)({type:[Number],json:{write:!0}})],y.prototype,"objectIds",void 0),(0,s._)([(0,a.qq)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),(0,s._)([(0,a.qq)({type:[String],json:{write:!0}})],y.prototype,"outFields",void 0),(0,s._)([(0,a.qq)({type:p.c,json:{read:{source:"outSR"},write:{target:"outSR"}}})],y.prototype,"outSpatialReference",void 0),(0,s._)([(0,a.qq)({json:{write:!0}})],y.prototype,"relationshipId",void 0),(0,s._)([(0,a.qq)({type:Number,json:{read:{source:"resultOffset"}}})],y.prototype,"start",void 0),(0,s._)([(0,d.G)("start"),(0,d.G)("num")],y.prototype,"writeStart",null),(0,s._)([(0,a.qq)({type:Number,json:{read:{source:"resultRecordCount"}}})],y.prototype,"num",void 0),(0,s._)([(0,a.qq)({json:{write:!0}})],y.prototype,"returnGeometry",void 0),(0,s._)([(0,a.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnM",void 0),(0,s._)([(0,a.qq)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],y.prototype,"returnZ",void 0),(0,s._)([(0,a.qq)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],y.prototype,"where",void 0),y=i=(0,s._)([(0,c.c)("esri.rest.support.RelationshipQuery")],y),y.from=(0,l.ey)(y);const h=y},73184:(e,t,r)=>{r.d(t,{aG:()=>s,eY:()=>l,k5:()=>n,oK:()=>c,sy:()=>a});var i=r(2600);const s=(0,r(63564).Mr)(),n=new Map,o=new Map;async function a(e,t,r){if(!e||!r)return!1;if(!t)return!0;const s=new URL(e).host;let o=n.get(s);if(!o){const t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");o=(await(0,i.c)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return o===t}async function l(e,t,i=!1){if(!e||!t)return!0;const n=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),a=o.get(n)?.entries();if(a)for(const[e,o]of a)if(o.name===t){const t=!o.stack?.hasForwardEdits();if(!t&&i){const[{deleteForwardEdits:t},{default:i}]=await Promise.all([r.e(772).then(r.bind(r,70772)),r.e(2460).then(r.bind(r,22460))]);return t(n,e,new i({sessionId:s,moment:o.moment}))}return t}return!0}function c(e,t){if(!e)return!1;const r=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),i=o.get(r)?.entries();if(i)for(const[e,r]of i)if(r.name===t)return"edit"===r.lockType;return!1}new Map}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4828],{37648:(e,t,r)=>{r.d(t,{Cq:()=>l,WO:()=>s,c9:()=>h,m4:()=>p,qy:()=>o});var n=r(47364);function s(e,t,r){return e[0]=t,e[1]=r,e}function f(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e}function i(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e}function u(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e}function o(e,t){const r=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(r*r+n*n)}function c(e,t){const r=t[0]-e[0],n=t[1]-e[1];return r*r+n*n}function y(e){const t=e[0],r=e[1];return Math.sqrt(t*t+r*r)}function a(e){const t=e[0],r=e[1];return t*t+r*r}function l(e,t,r,n){const s=t[0],f=t[1];return e[0]=s+n*(r[0]-s),e[1]=f+n*(r[1]-f),e}function p(e,t,r){const n=t[0],s=t[1];return e[0]=r[0]*n+r[2]*s+r[4],e[1]=r[1]*n+r[3]*s+r[5],e}function h(e,t,r,n){const s=t[0]-r[0],f=t[1]-r[1],i=Math.sin(n),u=Math.cos(n);return e[0]=s*u-f*i+r[0],e[1]=s*i+f*u+r[1],e}const d=y,b=f,m=i,T=u,B=o,g=c,E=a;Object.freeze(Object.defineProperty({__proto__:null,add:function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e},angle:function(e,t){const r=e[0],n=e[1],s=t[0],f=t[1];let i=r*r+n*n;i>0&&(i=1/Math.sqrt(i));let u=s*s+f*f;u>0&&(u=1/Math.sqrt(u));const o=(r*s+n*f)*i*u;return o>1?0:o<-1?Math.PI:Math.acos(o)},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e},copy:function(e,t){return e[0]=t[0],e[1]=t[1],e},cross:function(e,t,r){const n=t[0]*r[1]-t[1]*r[0];return e[0]=e[1]=0,e[2]=n,e},dist:B,distance:o,div:T,divide:u,dot:function(e,t){return e[0]*t[0]+e[1]*t[1]},equals:function(e,t){const r=e[0],s=e[1],f=t[0],i=t[1],u=(0,n.Au)();return Math.abs(r-f)<=u*Math.max(1,Math.abs(r),Math.abs(f))&&Math.abs(s-i)<=u*Math.max(1,Math.abs(s),Math.abs(i))},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]},floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e},len:d,length:y,lerp:l,max:function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e},min:function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e},mul:m,multiply:i,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e},normalize:function(e,t){const r=t[0],n=t[1];let s=r*r+n*n;return s>0&&(s=1/Math.sqrt(s),e[0]=t[0]*s,e[1]=t[1]*s),e},projectAndScale:function(e,t,r,n,s){let f=t[0]-r[0],i=t[1]-r[1];const u=(n[0]*f+n[1]*i)*(s-1);return f=n[0]*u,i=n[1]*u,e[0]=t[0]+f,e[1]=t[1]+i,e},random:function(e,t){t=t||1;const r=2*(0,n.QR)()*Math.PI;return e[0]=Math.cos(r)*t,e[1]=Math.sin(r)*t,e},rotate:h,round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e},scale:function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e},scaleAndAdd:function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e},set:s,sqrDist:g,sqrLen:E,squaredDistance:c,squaredLength:a,str:function(e){return"vec2("+e[0]+", "+e[1]+")"},sub:b,subtract:f,transformMat2:function(e,t,r){const n=t[0],s=t[1];return e[0]=r[0]*n+r[2]*s,e[1]=r[1]*n+r[3]*s,e},transformMat2d:p,transformMat3:function(e,t,r){const n=t[0],s=t[1];return e[0]=r[0]*n+r[3]*s+r[6],e[1]=r[1]*n+r[4]*s+r[7],e},transformMat4:function(e,t,r){const n=t[0],s=t[1];return e[0]=r[0]*n+r[4]*s+r[12],e[1]=r[1]*n+r[5]*s+r[13],e}},Symbol.toStringTag,{value:"Module"}))},41104:(e,t,r)=>{r.d(t,{c:()=>m});var n,s=r(41948),f=r(40504),i=r(1580),u=(r(9456),r(66360),r(72052),r(12552)),o=r(15008),c=r(87104),y=r(41512),a=r(2620),l=r(98472),p=r(62484),h=r(66952);let d=n=class extends f.am{constructor(e){super(e),this.translation=(0,p.Su)(),this.rotationAxis=(0,p.eu)(h.up),this.rotationAngle=0,this.scale=(0,p.WK)(1,1,1)}get rotation(){return(0,h.eE)(this.rotationAxis,this.rotationAngle)}set rotation(e){this.rotationAxis=(0,p.ct)((0,h.Yz)(e)),this.rotationAngle=(0,h.i4)(e)}get localMatrix(){const e=(0,c.Su)();return(0,y.yG)(b,(0,h.Yz)(this.rotation),(0,h.kX)(this.rotation)),(0,o.um)(e,b,this.translation,this.scale),e}get localMatrixInverse(){return(0,o.S_)((0,c.Su)(),this.localMatrix)}applyLocal(e,t){return(0,l.e)(t,e,this.localMatrix)}applyLocalInverse(e,t){return(0,l.e)(t,e,this.localMatrixInverse)}equals(e){return this===e||null!=e&&(0,o.sF)(this.localMatrix,e.localMatrix)}clone(){const e={translation:(0,p.ct)(this.translation),rotationAxis:(0,p.ct)(this.rotationAxis),rotationAngle:this.rotationAngle,scale:(0,p.ct)(this.scale)};return new n(e)}};(0,s._)([(0,i.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"translation",void 0),(0,s._)([(0,i.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAxis",void 0),(0,s._)([(0,i.qq)({type:Number,nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAngle",void 0),(0,s._)([(0,i.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"scale",void 0),(0,s._)([(0,i.qq)()],d.prototype,"rotation",null),(0,s._)([(0,i.qq)()],d.prototype,"localMatrix",null),(0,s._)([(0,i.qq)()],d.prototype,"localMatrixInverse",null),d=n=(0,s._)([(0,u.c)("esri.geometry.support.MeshTransform")],d);const b=(0,a.Su)(),m=d},66952:(e,t,r)=>{r.d(t,{GA:()=>a,Jn:()=>y,Su:()=>o,Yz:()=>l,eE:()=>c,i4:()=>p,kX:()=>h,up:()=>d});var n=r(53648),s=r(41512),f=r(2620),i=r(98472),u=r(62484);function o(e=d){return[e[0],e[1],e[2],e[3]]}function c(e,t,r=o()){return(0,i.c)(r,e),r[3]=t,r}function y(e,t,r=o()){return(0,s.yG)(b,e,h(e)),(0,s.yG)(m,t,h(t)),(0,s.iW)(b,m,b),function(e,t){return e[3]=t,e}(r,(0,n.UB)((0,s.C0)(r,b)))}function a(e,t,r,n=o()){return c(u.UV,e,T),c(u.IR,t,B),c(u.wx,r,g),y(T,B,T),y(T,g,n),n}function l(e){return e}function p(e){return e[3]}function h(e){return(0,n.EF)(e[3])}r(37008);const d=[0,0,1,0],b=(0,f.Su)(),m=(0,f.Su)(),T=(o(),o()),B=o(),g=o()},71004:(e,t,r)=>{r.d(t,{AZ:()=>l,oN:()=>g,Mt:()=>k,Ep:()=>G,kV:()=>N,Ko:()=>b,m_:()=>m,IL:()=>T,mF:()=>B,E_:()=>_,Ym:()=>C,Kg:()=>O,U7:()=>p,wT:()=>E,iN:()=>U,mI:()=>z,oR:()=>q,kg:()=>L,qZ:()=>F,eS:()=>M,Yj:()=>h,Ax:()=>A,g7:()=>V,Yv:()=>$,Oq:()=>I,k5:()=>P,ER:()=>R,IN:()=>w,_5:()=>d,Ip:()=>S,OS:()=>W,i9:()=>K,mq:()=>j,Ig:()=>v,q$:()=>Y,sb:()=>x});class n{constructor(e,t,r=0,n,s){this.TypedArrayConstructor=e,this.elementCount=9;const f=this.TypedArrayConstructor;void 0===n&&(n=9*f.BYTES_PER_ELEMENT);const i=0===t.byteLength?0:r;this.typedBuffer=null==s?new f(t,i):new f(t,i,(s-r)/f.BYTES_PER_ELEMENT),this.typedBufferStride=n/f.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const n=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,n,this.stride,n+r*this.stride)}getMat(e,t){let r=e*this.typedBufferStride;for(let e=0;e<9;e++)t[e]=this.typedBuffer[r++];return t}setMat(e,t){let r=e*this.typedBufferStride;for(let e=0;e<9;e++)this.typedBuffer[r++]=t[e]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}copyFrom(e,t,r){const n=this.typedBuffer,s=t.typedBuffer;let f=e*this.typedBufferStride,i=r*t.typedBufferStride;for(let e=0;e<9;++e)n[f++]=s[i++]}get buffer(){return this.typedBuffer.buffer}}n.ElementCount=9;class s{constructor(e,t,r=0,n,s){this.TypedArrayConstructor=e,this.elementCount=16;const f=this.TypedArrayConstructor;void 0===n&&(n=16*f.BYTES_PER_ELEMENT);const i=0===t.byteLength?0:r;this.typedBuffer=null==s?new f(t,i):new f(t,i,(s-r)/f.BYTES_PER_ELEMENT),this.typedBufferStride=n/f.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const n=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,n,this.stride,n+r*this.stride)}getMat(e,t){let r=e*this.typedBufferStride;for(let e=0;e<16;e++)t[e]=this.typedBuffer[r++];return t}setMat(e,t){let r=e*this.typedBufferStride;for(let e=0;e<16;e++)this.typedBuffer[r++]=t[e]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}copyFrom(e,t,r){const n=this.typedBuffer,s=t.typedBuffer;let f=e*this.typedBufferStride,i=r*t.typedBufferStride;for(let e=0;e<16;++e)n[f++]=s[i++]}get buffer(){return this.typedBuffer.buffer}}s.ElementCount=16;class f{constructor(e,t,r=0,n,s){this.TypedArrayConstructor=e,this.elementCount=1;const f=this.TypedArrayConstructor;void 0===n&&(n=f.BYTES_PER_ELEMENT);const i=0===t.byteLength?0:r;this.typedBuffer=null==s?new f(t,i):new f(t,i,(s-r)/f.BYTES_PER_ELEMENT),this.stride=n,this.typedBufferStride=n/f.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride)}sliceBuffer(e,t,r=this.count-t){const n=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,n,this.stride,n+r*this.stride)}get(e){return this.typedBuffer[e*this.typedBufferStride]}set(e,t){this.typedBuffer[e*this.typedBufferStride]=t}get buffer(){return this.typedBuffer.buffer}}f.ElementCount=1;var i=r(37648);class u{constructor(e,t,r=0,n,s){this.TypedArrayConstructor=e,this.elementCount=2;const f=this.TypedArrayConstructor;void 0===n&&(n=2*f.BYTES_PER_ELEMENT);const i=0===t.byteLength?0:r;this.typedBuffer=null==s?new f(t,i):new f(t,i,(s-r)/f.BYTES_PER_ELEMENT),this.typedBufferStride=n/f.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const n=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,n,this.stride,n+r*this.stride)}getVec(e,t){return e*=this.typedBufferStride,(0,i.WO)(t,this.typedBuffer[e],this.typedBuffer[e+1])}setVec(e,t){e*=this.typedBufferStride,this.typedBuffer[e++]=t[0],this.typedBuffer[e]=t[1]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}setValues(e,t,r){e*=this.typedBufferStride,this.typedBuffer[e++]=t,this.typedBuffer[e]=r}copyFrom(e,t,r){const n=this.typedBuffer,s=t.typedBuffer;let f=e*this.typedBufferStride,i=r*t.typedBufferStride;n[f++]=s[i++],n[f]=s[i]}get buffer(){return this.typedBuffer.buffer}}u.ElementCount=2;var o=r(98472);class c{constructor(e,t,r=0,n,s){this.TypedArrayConstructor=e,this.elementCount=3;const f=this.TypedArrayConstructor;void 0===n&&(n=3*f.BYTES_PER_ELEMENT);const i=0===t.byteLength?0:r;this.typedBuffer=null==s?new f(t,i):new f(t,i,(s-r)/f.BYTES_PER_ELEMENT),this.typedBufferStride=n/f.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const n=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,n,this.stride,n+r*this.stride)}getVec(e,t){return e*=this.typedBufferStride,(0,o.s)(t,this.typedBuffer[e],this.typedBuffer[e+1],this.typedBuffer[e+2])}setVec(e,t){e*=this.typedBufferStride,this.typedBuffer[e++]=t[0],this.typedBuffer[e++]=t[1],this.typedBuffer[e]=t[2]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}setValues(e,t,r,n){e*=this.typedBufferStride,this.typedBuffer[e++]=t,this.typedBuffer[e++]=r,this.typedBuffer[e]=n}copyFrom(e,t,r){const n=this.typedBuffer,s=t.typedBuffer;let f=e*this.typedBufferStride,i=r*t.typedBufferStride;n[f++]=s[i++],n[f++]=s[i++],n[f]=s[i]}get buffer(){return this.typedBuffer.buffer}}c.ElementCount=3;var y=r(74784);class a{constructor(e,t,r=0,n,s){this.TypedArrayConstructor=e,this.start=r,this.elementCount=4;const f=this.TypedArrayConstructor;void 0===n&&(n=4*f.BYTES_PER_ELEMENT);const i=0===t.byteLength?0:r;this.typedBuffer=null==s?new f(t,i):new f(t,i,(s-r)/f.BYTES_PER_ELEMENT),this.typedBufferStride=n/f.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const n=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,n,this.stride,n+r*this.stride)}getVec(e,t){return e*=this.typedBufferStride,(0,y.s)(t,this.typedBuffer[e++],this.typedBuffer[e++],this.typedBuffer[e++],this.typedBuffer[e])}setVec(e,t){e*=this.typedBufferStride,this.typedBuffer[e++]=t[0],this.typedBuffer[e++]=t[1],this.typedBuffer[e++]=t[2],this.typedBuffer[e]=t[3]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}setValues(e,t,r,n,s){e*=this.typedBufferStride,this.typedBuffer[e++]=t,this.typedBuffer[e++]=r,this.typedBuffer[e++]=n,this.typedBuffer[e]=s}copyFrom(e,t,r){const n=this.typedBuffer,s=t.typedBuffer;let f=e*this.typedBufferStride,i=r*t.typedBufferStride;n[f++]=s[i++],n[f++]=s[i++],n[f++]=s[i++],n[f]=s[i]}get buffer(){return this.typedBuffer.buffer}}a.ElementCount=4;class l extends f{constructor(e,t=0,r,n){super(Float32Array,e,t,r,n),this.elementType="f32"}static fromTypedArray(e,t){return new l(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}l.ElementType="f32";class p extends u{constructor(e,t=0,r,n){super(Float32Array,e,t,r,n),this.elementType="f32"}slice(e,t){return this.sliceBuffer(p,e,t)}static fromTypedArray(e,t){return new p(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}p.ElementType="f32";class h extends c{constructor(e,t=0,r,n){super(Float32Array,e,t,r,n),this.elementType="f32"}slice(e,t){return this.sliceBuffer(h,e,t)}static fromTypedArray(e,t){return new h(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}h.ElementType="f32";class d extends a{constructor(e,t=0,r,n){super(Float32Array,e,t,r,n),this.elementType="f32"}slice(e,t){return this.sliceBuffer(d,e,t)}static fromTypedArray(e,t){return new d(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}d.ElementType="f32";class b extends n{constructor(e,t=0,r,n){super(Float32Array,e,t,r,n),this.elementType="f32"}slice(e,t){return this.sliceBuffer(b,e,t)}static fromTypedArray(e,t){return new b(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}b.ElementType="f32";class m extends n{constructor(e,t=0,r,n){super(Float64Array,e,t,r,n),this.elementType="f64"}slice(e,t){return this.sliceBuffer(m,e,t)}static fromTypedArray(e,t){return new m(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}m.ElementType="f64";class T extends s{constructor(e,t=0,r,n){super(Float32Array,e,t,r,n),this.elementType="f32"}slice(e,t){return this.sliceBuffer(T,e,t)}static fromTypedArray(e,t){return new T(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}T.ElementType="f32";class B extends s{constructor(e,t=0,r,n){super(Float64Array,e,t,r,n),this.elementType="f64"}slice(e,t){return this.sliceBuffer(B,e,t)}static fromTypedArray(e,t){return new B(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}B.ElementType="f64";class g extends f{constructor(e,t=0,r,n){super(Float64Array,e,t,r,n),this.elementType="f64"}slice(e,t){return this.sliceBuffer(g,e,t)}static fromTypedArray(e,t){return new g(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}g.ElementType="f64";class E extends u{constructor(e,t=0,r,n){super(Float64Array,e,t,r,n),this.elementType="f64"}slice(e,t){return this.sliceBuffer(E,e,t)}static fromTypedArray(e,t){return new E(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}E.ElementType="f64";class A extends c{constructor(e,t=0,r,n){super(Float64Array,e,t,r,n),this.elementType="f64"}slice(e,t){return this.sliceBuffer(A,e,t)}static fromTypedArray(e,t){return new A(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}A.ElementType="f64";class S extends a{constructor(e,t=0,r,n){super(Float64Array,e,t,r,n),this.elementType="f64"}slice(e,t){return this.sliceBuffer(S,e,t)}static fromTypedArray(e,t){return new S(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}S.ElementType="f64";class O extends f{constructor(e,t=0,r,n){super(Uint8Array,e,t,r,n),this.elementType="u8"}slice(e,t){return this.sliceBuffer(O,e,t)}static fromTypedArray(e,t){return new O(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}O.ElementType="u8";class M extends u{constructor(e,t=0,r,n){super(Uint8Array,e,t,r,n),this.elementType="u8"}slice(e,t){return this.sliceBuffer(M,e,t)}static fromTypedArray(e,t){return new M(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}M.ElementType="u8";class w extends c{constructor(e,t=0,r,n){super(Uint8Array,e,t,r,n),this.elementType="u8"}slice(e,t){return this.sliceBuffer(w,e,t)}static fromTypedArray(e,t){return new w(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}w.ElementType="u8";class x extends a{constructor(e,t=0,r,n){super(Uint8Array,e,t,r,n),this.elementType="u8"}slice(e,t){return this.sliceBuffer(x,e,t)}static fromTypedArray(e,t){return new x(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}x.ElementType="u8";class _ extends f{constructor(e,t=0,r,n){super(Uint16Array,e,t,r,n),this.elementType="u16"}slice(e,t){return this.sliceBuffer(_,e,t)}static fromTypedArray(e,t){return new _(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}_.ElementType="u16";class L extends u{constructor(e,t=0,r,n){super(Uint16Array,e,t,r,n),this.elementType="u16"}slice(e,t){return this.sliceBuffer(L,e,t)}static fromTypedArray(e,t){return new L(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}L.ElementType="u16";class P extends c{constructor(e,t=0,r,n){super(Uint16Array,e,t,r,n),this.elementType="u16"}slice(e,t){return this.sliceBuffer(P,e,t)}static fromTypedArray(e,t){return new P(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}P.ElementType="u16";class v extends a{constructor(e,t=0,r,n){super(Uint16Array,e,t,r,n),this.elementType="u16"}slice(e,t){return this.sliceBuffer(v,e,t)}static fromTypedArray(e,t){return new v(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}v.ElementType="u16";class C extends f{constructor(e,t=0,r,n){super(Uint32Array,e,t,r,n),this.elementType="u32"}slice(e,t){return this.sliceBuffer(C,e,t)}static fromTypedArray(e,t){return new C(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}C.ElementType="u32";class F extends u{constructor(e,t=0,r,n){super(Uint32Array,e,t,r,n),this.elementType="u32"}slice(e,t){return this.sliceBuffer(F,e,t)}static fromTypedArray(e,t){return new F(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}F.ElementType="u32";class R extends c{constructor(e,t=0,r,n){super(Uint32Array,e,t,r,n),this.elementType="u32"}slice(e,t){return this.sliceBuffer(R,e,t)}static fromTypedArray(e,t){return new R(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}R.ElementType="u32";class Y extends a{constructor(e,t=0,r,n){super(Uint32Array,e,t,r,n),this.elementType="u32"}slice(e,t){return this.sliceBuffer(Y,e,t)}static fromTypedArray(e,t){return new Y(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}Y.ElementType="u32";class N extends f{constructor(e,t=0,r,n){super(Int8Array,e,t,r,n),this.elementType="i8"}slice(e,t){return this.sliceBuffer(N,e,t)}static fromTypedArray(e,t){return new N(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}N.ElementType="i8";class q extends u{constructor(e,t=0,r,n){super(Int8Array,e,t,r,n),this.elementType="i8"}slice(e,t){return this.sliceBuffer(q,e,t)}static fromTypedArray(e,t){return new q(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}q.ElementType="i8";class I extends c{constructor(e,t=0,r,n){super(Int8Array,e,t,r,n),this.elementType="i8"}slice(e,t){return this.sliceBuffer(I,e,t)}static fromTypedArray(e,t){return new I(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}I.ElementType="i8";class j extends a{constructor(e,t=0,r,n){super(Int8Array,e,t,r,n),this.elementType="i8"}slice(e,t){return this.sliceBuffer(j,e,t)}static fromTypedArray(e,t){return new j(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}j.ElementType="i8";class k extends f{constructor(e,t=0,r,n){super(Int16Array,e,t,r,n),this.elementType="i16"}slice(e,t){return this.sliceBuffer(k,e,t)}static fromTypedArray(e,t){return new k(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}k.ElementType="i16";class U extends u{constructor(e,t=0,r,n){super(Int16Array,e,t,r,n),this.elementType="i16"}slice(e,t){return this.sliceBuffer(U,e,t)}static fromTypedArray(e,t){return new U(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}U.ElementType="i16";class V extends c{constructor(e,t=0,r,n){super(Int16Array,e,t,r,n),this.elementType="i16"}slice(e,t){return this.sliceBuffer(V,e,t)}static fromTypedArray(e,t){return new V(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}V.ElementType="i16";class W extends a{constructor(e,t=0,r,n){super(Int16Array,e,t,r,n),this.elementType="i16"}slice(e,t){return this.sliceBuffer(W,e,t)}static fromTypedArray(e,t){return new W(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}W.ElementType="i16";class G extends f{constructor(e,t=0,r,n){super(Int32Array,e,t,r,n),this.elementType="i32"}slice(e,t){return this.sliceBuffer(G,e,t)}static fromTypedArray(e,t){return new G(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}G.ElementType="i32";class z extends u{constructor(e,t=0,r,n){super(Int32Array,e,t,r,n),this.elementType="i32"}slice(e,t){return this.sliceBuffer(z,e,t)}static fromTypedArray(e,t){return new z(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}z.ElementType="i32";class $ extends c{constructor(e,t=0,r,n){super(Int32Array,e,t,r,n),this.elementType="i32"}slice(e,t){return this.sliceBuffer($,e,t)}static fromTypedArray(e,t){return new $(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}$.ElementType="i32";class K extends a{constructor(e,t=0,r,n){super(Int32Array,e,t,r,n),this.elementType="i32"}slice(e,t){return this.sliceBuffer(K,e,t)}static fromTypedArray(e,t){return new K(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}K.ElementType="i32"},71488:(e,t,r)=>{r.d(t,{Kk:()=>u,QL:()=>o,yO:()=>i});var n=r(26832),s=r(66360),f=r(21136);function i(e,t){return e.isGeographic||e.isWebMercator&&(t??!0)}function u(e,t){switch(e.type){case"georeferenced":return t.isGeographic;case"local":return t.isGeographic||t.isWebMercator}}function o(e,t,r,i){if(void 0!==i){(0,n.O2)(s.c.getLogger(e),"option: geographic",{replacement:"use mesh vertexSpace and spatial reference to control how operations are performed",version:"4.29",warnOnce:!0});const u="local"===t.type;if(!(0,f.k$)(t)||i===u)return r.isGeographic||r.isWebMercator&&i;s.c.getLogger(e).warnOnce(`Specifying the 'geographic' parameter (${i}) for a Mesh vertex space of type "${t.type}" is not supported. This parameter will be ignored.`)}return u(t,r)}},54828:(e,t,r)=>{r.d(t,{CE:()=>E,EX:()=>S,_0:()=>F,_S:()=>A,iS:()=>M,mC:()=>x,project:()=>w,qu:()=>L});var n=r(24296),s=r(68612),f=r(15008),i=r(87104),u=r(98472),o=r(62484),c=r(77556),y=r(60074),a=r(82448),l=r(51120),p=r(62880),h=r(15688),d=r(41104),b=r(21136),m=r(48952),T=r(71488),B=r(38496);function g(e,t,r){return(0,T.yO)(t.spatialReference,r?.geographic)?x(e,t,!1,r):function(e,t,r){const n=new Float64Array(e.position.length),s=e.position,f=t.x,i=t.y,u=t.z??0,o=F(r?r.unit:null,t.spatialReference);for(let e=0;e<s.length;e+=3)n[e]=s[e]*o+f,n[e+1]=s[e+1]*o+i,n[e+2]=s[e+2]*o+u;return{position:n,normal:e.normal,tangent:e.tangent}}(e,t,r)}function E(e,t=i.IJ){const{position:r,normal:n,tangent:s}=e;return{position:(0,m.a)(new Float64Array(r.length),r,t),normal:null!=n?(0,B.W4)(n,new Float32Array(n.length),t):null,tangent:null!=s?(0,B.AT)(s,new Float32Array(s.length),t):null}}function A(e,t,r,n){const{position:s,normal:f,tangent:i}=e;if(!(0,b.k$)(t))return{position:s,normal:f,tangent:i};const u=(0,b.mA)(t,n);return g(E(e,r?.localMatrix),u,{geographic:"local"===t.type})}function S(e,t,r){const n=(0,b.Al)(t,r),s=t.spatialReference,f=(0,b.k$)(n);if(!f)return{vertexAttributes:g(e,t,r),vertexSpace:n,transform:null};const{position:i,normal:u,tangent:o}=e,c=(0,T.Kk)(n,s);switch(n.type){case"georeferenced":return c?{vertexAttributes:x(e,t,f,r),vertexSpace:n,transform:null}:{vertexAttributes:{position:i,normal:u,tangent:o},vertexSpace:n,transform:new d.c};case"local":return{vertexAttributes:{position:i,normal:u,tangent:o},vertexSpace:n,transform:new d.c}}}function O(e,t,r){return(0,T.yO)(t.spatialReference,r?.geographic)?L(e,t,r):_(e,t,r)}function M(e,t,r,n,s){if(!(0,b.k$)(t))return O(e,n,s);const{spatialReference:f}=n,i=A(e,t,r,f);return n.equals((0,b.mA)(t,f))?_(i,n,s):O(i,n,s)}function w({positions:e,transform:t,vertexSpace:r,inSpatialReference:n,outSpatialReference:s,outPositions:c,localMode:d}){const b=r.origin??o.cX,T=null!=r.origin?t?.localMatrix??i.IJ:i.IJ;if("georeferenced"===r.type){const t=c??(0,h.Gg)(e.length);if((0,f.yK)(T,i.IJ)?(0,h.mw)(t,e):(0,m.a)(t,e,T),!(0,u.h)(b,o.cX)){const[e,r,n]=b;for(let s=0;s<t.length;s+=3)t[s]+=e,t[s+1]+=r,t[s+2]+=n}return(0,p.projectBuffer)(t,n,0,t,s,0,t.length/3),t}let B=n;const g=(0,a._s)(n);B=s.isWebMercator&&d||!(0,y.canProjectWithoutEngine)(n,g)?B:g,(0,l.y)(n,b,R,B),(0,f.iW)(R,R,T);const E=c??(0,h.Gg)(e.length);return(0,m.a)(E,e,R),(0,p.projectBuffer)(E,B,0,E,s,0,E.length/3),E}function x(e,t,r,n){const s=t.spatialReference,f=P(t,n,R),i=new Float64Array(e.position.length),u=function(e,t,r,n){(0,m.a)(n,e,t);const s=new Float64Array(e.length);return(0,B.o$)(n,s,r)}(e.position,f,s,i),o=(0,c.yy)(N,f),y=function(e,t,r,n,s){if(null==r)return null;const f=new Float32Array(r.length);return(0,m.b)(f,r,n),(0,B.QP)(f,e,t,s,f),f}(u,i,e.normal,o,s),a=function(e,t,r,n,s){if(null==r)return null;const f=new Float32Array(r.length);(0,m.b)(f,r,n,4);for(let e=3;e<f.length;e+=4)f[e]=r[e];return(0,B.Cr)(f,e,t,s,f),f}(u,i,e.tangent,o,s);if(r){const{x:e,y:r,z:n}=t;(0,m.t)(u,u,[-e,-r,-(n??0)])}return{position:u,normal:y,tangent:a}}function _(e,t,r){const n=new Float64Array(e.position.length),s=e.position,f=t.x,i=t.y,u=t.z??0,o=F(r?r.unit:null,t.spatialReference);for(let e=0;e<s.length;e+=3)n[e]=(s[e]-f)/o,n[e+1]=(s[e+1]-i)/o,n[e+2]=(s[e+2]-u)/o;return{position:n,normal:e.normal,tangent:e.tangent}}function L(e,t,r){const n=t.spatialReference;P(t,r,R);const s=(0,f.S_)(Y,R),i=new Float64Array(e.position.length),u=function(e,t,r,n){const s=(0,B.K_)(e,t,n),f=new Float64Array(s.length);return(0,m.a)(f,s,r),f}(e.position,n,s,i),o=(0,c.yy)(N,s);return{position:u,normal:v(e.normal,e.position,i,n,o),tangent:C(e.tangent,e.position,i,n,o)}}function P(e,t,r){(0,l.y)(e.spatialReference,[e.x,e.y,e.z??0],r,(0,a._s)(e.spatialReference));const n=F(t?t.unit:null,e.spatialReference);return(0,f.aU)(r,r,[n,n,n]),r}function v(e,t,r,n,s){if(null==e)return null;const f=(0,B.cH)(e,t,r,n,new Float32Array(e.length));return(0,m.b)(f,f,s),f}function C(e,t,r,n,s){if(null==e)return null;const f=(0,B.GW)(e,t,r,n,new Float32Array(e.length));return(0,m.b)(f,f,s,4),f}function F(e,t){if(null==e)return 1;const r=(0,n.eg)(t);return 1/(0,n.ck)(r,"meters",e)}const R=(0,i.Su)(),Y=(0,i.Su)(),N=(0,s.Su)()},38496:(e,t,r)=>{r.d(t,{AT:()=>A,Cr:()=>O,GW:()=>S,K_:()=>B,QP:()=>T,W4:()=>E,cH:()=>m,o$:()=>g});var n=r(66360),s=r(77556),f=r(68612),i=r(87104),u=r(98472),o=r(62484),c=r(82448),y=r(51120),a=r(62880),l=r(60544),p=r(29120),h=r(71004),d=r(48952);const b=()=>n.c.getLogger("esri.geometry.support.meshUtils.normalProjection");function m(e,t,r,n,s){return w(n)?(M(_.TO_PCPF,h.Yj.fromTypedArray(e),h.Ax.fromTypedArray(t),h.Ax.fromTypedArray(r),n,h.Yj.fromTypedArray(s)),s):(b().error("Cannot convert spatial reference to PCPF"),s)}function T(e,t,r,n,s){return w(n)?(M(_.FROM_PCPF,h.Yj.fromTypedArray(e),h.Ax.fromTypedArray(t),h.Ax.fromTypedArray(r),n,h.Yj.fromTypedArray(s)),s):(b().error("Cannot convert to spatial reference from PCPF"),s)}function B(e,t,r){return(0,a.projectBuffer)(e,t,0,r,(0,c._s)(t),0,e.length/3),r}function g(e,t,r){return(0,a.projectBuffer)(e,(0,c._s)(r),0,t,r,0,e.length/3),t}function E(e,t,r){return(0,s.yy)(F,r),(0,d.b)(t,e,F),(0,s.QT)(F)||(0,d.n)(t,t),t}function A(e,t,r){if((0,s.yy)(F,r),(0,d.b)(t,e,F,4),(0,s.QT)(F)||(0,d.n)(t,t,4),e!==t)for(let r=3;r<e.length;r+=4)t[r]=e[r];return t}function S(e,t,r,n,s){if(!w(n))return b().error("Cannot convert spatial reference to PCPF"),s;M(_.TO_PCPF,h.Yj.fromTypedArray(e,4*Float32Array.BYTES_PER_ELEMENT),h.Ax.fromTypedArray(t),h.Ax.fromTypedArray(r),n,h.Yj.fromTypedArray(s,4*Float32Array.BYTES_PER_ELEMENT));for(let t=3;t<e.length;t+=4)s[t]=e[t];return s}function O(e,t,r,n,s){if(!w(n))return b().error("Cannot convert to spatial reference from PCPF"),s;M(_.FROM_PCPF,h.Yj.fromTypedArray(e,16),h.Ax.fromTypedArray(t),h.Ax.fromTypedArray(r),n,h.Yj.fromTypedArray(s,16));for(let t=3;t<e.length;t+=4)s[t]=e[t];return s}function M(e,t,r,n,f,i){if(!t)return;const o=r.count,a=(0,c._s)(f);if(x(f))for(let r=0;r<o;r++)n.getVec(r,P),t.getVec(r,v),(0,y.y)(a,P,C,a),(0,s.kr)(F,C),e===_.FROM_PCPF&&(0,s.oL)(F,F),(0,u.t)(v,v,F),i.setVec(r,v);else for(let f=0;f<o;f++){n.getVec(f,P),t.getVec(f,v),(0,y.y)(a,P,C,a),(0,s.kr)(F,C);const o=(0,p.MB)(r.get(f,1));let c=Math.cos(o);e===_.TO_PCPF&&(c=1/c),F[0]*=c,F[1]*=c,F[2]*=c,F[3]*=c,F[4]*=c,F[5]*=c,e===_.FROM_PCPF&&(0,s.oL)(F,F),(0,u.t)(v,v,F),(0,u.n)(v,v),i.setVec(f,v)}return i}function w(e){return x(e)||function(e){return e.isWebMercator}(e)}function x(e){return e.isWGS84||(0,l.Ub)(e)||(0,l.qg)(e)||(0,l.UB)(e)}var _,L;(L=_||(_={}))[L.TO_PCPF=0]="TO_PCPF",L[L.FROM_PCPF=1]="FROM_PCPF";const P=(0,o.Su)(),v=(0,o.Su)(),C=(0,i.Su)(),F=(0,f.Su)()},21136:(e,t,r)=>{r.d(t,{Al:()=>p,k$:()=>a,mA:()=>l,wX:()=>y});var n=r(26832),s=r(66360),f=r(67776),i=r(51232),u=r(13708),o=r(48952);function c(){return s.c.getLogger("esri.geometry.Mesh")}function y(e){const{vertexSpace:t}=e;if(null!=t.origin)return e.clone();const{anchor:r}=e,n=r.clone(),s=new i.c({origin:[n.x,n.y,n.z]}),f=e.cloneWithVertexSpace(s),{position:u}=f.vertexAttributes;return f.vertexAttributes.position=(0,o.t)(new Float64Array(u.length),u,[-n.x,-n.y,-(n.z??0)]),f.vertexAttributesChanged(),f}function a(e){return null!=e.origin}function l(e,t){if(!a(e))return null;const[r,n,s]=e.origin;return new f.c({x:r,y:n,z:s,spatialReference:t})}function p(e,t){const{x:r,y:s,z:f,spatialReference:o}=e,y=[r,s,f??0];if(void 0!==t?.geographic){if((0,n.O2)(c(),"option: geographic",{replacement:"use vertexSpace option instead",version:"4.29",warnOnce:!0}),!t?.vertexSpace)return t?.geographic?new u.c({origin:y}):new i.c({origin:y});c().warn("Deprecated geographic flag ignored since vertexSpace option is provided.")}if(!t?.vertexSpace)return o.isGeographic||o.isWebMercator?new u.c({origin:y}):new i.c({origin:y});switch(t.vertexSpace){case"local":return new u.c({origin:y});case"georeferenced":return new i.c({origin:y});case"georeferenced-absolute":return new i.c}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4828],{37648:(e,t,r)=>{r.d(t,{Cq:()=>l,WO:()=>s,c9:()=>h,m4:()=>p,qy:()=>o});var n=r(47364);function s(e,t,r){return e[0]=t,e[1]=r,e}function i(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e}function f(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e}function u(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e}function o(e,t){const r=t[0]-e[0],n=t[1]-e[1];return Math.sqrt(r*r+n*n)}function c(e,t){const r=t[0]-e[0],n=t[1]-e[1];return r*r+n*n}function y(e){const t=e[0],r=e[1];return Math.sqrt(t*t+r*r)}function a(e){const t=e[0],r=e[1];return t*t+r*r}function l(e,t,r,n){const s=t[0],i=t[1];return e[0]=s+n*(r[0]-s),e[1]=i+n*(r[1]-i),e}function p(e,t,r){const n=t[0],s=t[1];return e[0]=r[0]*n+r[2]*s+r[4],e[1]=r[1]*n+r[3]*s+r[5],e}function h(e,t,r,n){const s=t[0]-r[0],i=t[1]-r[1],f=Math.sin(n),u=Math.cos(n);return e[0]=s*u-i*f+r[0],e[1]=s*f+i*u+r[1],e}const d=y,b=i,m=f,T=u,B=o,g=c,E=a;Object.freeze(Object.defineProperty({__proto__:null,add:function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e},angle:function(e,t){const r=e[0],n=e[1],s=t[0],i=t[1];let f=r*r+n*n;f>0&&(f=1/Math.sqrt(f));let u=s*s+i*i;u>0&&(u=1/Math.sqrt(u));const o=(r*s+n*i)*f*u;return o>1?0:o<-1?Math.PI:Math.acos(o)},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e},copy:function(e,t){return e[0]=t[0],e[1]=t[1],e},cross:function(e,t,r){const n=t[0]*r[1]-t[1]*r[0];return e[0]=e[1]=0,e[2]=n,e},dist:B,distance:o,div:T,divide:u,dot:function(e,t){return e[0]*t[0]+e[1]*t[1]},equals:function(e,t){const r=e[0],s=e[1],i=t[0],f=t[1],u=(0,n.Au)();return Math.abs(r-i)<=u*Math.max(1,Math.abs(r),Math.abs(i))&&Math.abs(s-f)<=u*Math.max(1,Math.abs(s),Math.abs(f))},exactEquals:function(e,t){return e[0]===t[0]&&e[1]===t[1]},floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e},len:d,length:y,lerp:l,max:function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e},min:function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e},mul:m,multiply:f,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e},normalize:function(e,t){const r=t[0],n=t[1];let s=r*r+n*n;return s>0&&(s=1/Math.sqrt(s),e[0]=t[0]*s,e[1]=t[1]*s),e},projectAndScale:function(e,t,r,n,s){let i=t[0]-r[0],f=t[1]-r[1];const u=(n[0]*i+n[1]*f)*(s-1);return i=n[0]*u,f=n[1]*u,e[0]=t[0]+i,e[1]=t[1]+f,e},random:function(e,t){t=t||1;const r=2*(0,n.QR)()*Math.PI;return e[0]=Math.cos(r)*t,e[1]=Math.sin(r)*t,e},rotate:h,round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e},scale:function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e},scaleAndAdd:function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e},set:s,sqrDist:g,sqrLen:E,squaredDistance:c,squaredLength:a,str:function(e){return"vec2("+e[0]+", "+e[1]+")"},sub:b,subtract:i,transformMat2:function(e,t,r){const n=t[0],s=t[1];return e[0]=r[0]*n+r[2]*s,e[1]=r[1]*n+r[3]*s,e},transformMat2d:p,transformMat3:function(e,t,r){const n=t[0],s=t[1];return e[0]=r[0]*n+r[3]*s+r[6],e[1]=r[1]*n+r[4]*s+r[7],e},transformMat4:function(e,t,r){const n=t[0],s=t[1];return e[0]=r[0]*n+r[4]*s+r[12],e[1]=r[1]*n+r[5]*s+r[13],e}},Symbol.toStringTag,{value:"Module"}))},41104:(e,t,r)=>{r.d(t,{c:()=>m});var n,s=r(41948),i=r(40504),f=r(1580),u=(r(9456),r(66360),r(72052),r(12552)),o=r(15008),c=r(87104),y=r(41512),a=r(2620),l=r(98472),p=r(62484),h=r(66952);let d=n=class extends i.am{constructor(e){super(e),this.translation=(0,p.Su)(),this.rotationAxis=(0,p.eu)(h.up),this.rotationAngle=0,this.scale=(0,p.WK)(1,1,1)}get rotation(){return(0,h.eE)(this.rotationAxis,this.rotationAngle)}set rotation(e){this.rotationAxis=(0,p.ct)((0,h.Yz)(e)),this.rotationAngle=(0,h.i4)(e)}get localMatrix(){const e=(0,c.Su)();return(0,y.yG)(b,(0,h.Yz)(this.rotation),(0,h.kX)(this.rotation)),(0,o.um)(e,b,this.translation,this.scale),e}get localMatrixInverse(){return(0,o.S_)((0,c.Su)(),this.localMatrix)}applyLocal(e,t){return(0,l.e)(t,e,this.localMatrix)}applyLocalInverse(e,t){return(0,l.e)(t,e,this.localMatrixInverse)}equals(e){return this===e||null!=e&&(0,o.sF)(this.localMatrix,e.localMatrix)}clone(){const e={translation:(0,p.ct)(this.translation),rotationAxis:(0,p.ct)(this.rotationAxis),rotationAngle:this.rotationAngle,scale:(0,p.ct)(this.scale)};return new n(e)}};(0,s._)([(0,f.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"translation",void 0),(0,s._)([(0,f.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAxis",void 0),(0,s._)([(0,f.qq)({type:Number,nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAngle",void 0),(0,s._)([(0,f.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"scale",void 0),(0,s._)([(0,f.qq)()],d.prototype,"rotation",null),(0,s._)([(0,f.qq)()],d.prototype,"localMatrix",null),(0,s._)([(0,f.qq)()],d.prototype,"localMatrixInverse",null),d=n=(0,s._)([(0,u.c)("esri.geometry.support.MeshTransform")],d);const b=(0,a.Su)(),m=d},66952:(e,t,r)=>{r.d(t,{GA:()=>a,Jn:()=>y,Su:()=>o,Yz:()=>l,eE:()=>c,i4:()=>p,kX:()=>h,up:()=>d});var n=r(53648),s=r(41512),i=r(2620),f=r(98472),u=r(62484);function o(e=d){return[e[0],e[1],e[2],e[3]]}function c(e,t,r=o()){return(0,f.c)(r,e),r[3]=t,r}function y(e,t,r=o()){return(0,s.yG)(b,e,h(e)),(0,s.yG)(m,t,h(t)),(0,s.iW)(b,m,b),function(e,t){return e[3]=t,e}(r,(0,n.UB)((0,s.C0)(r,b)))}function a(e,t,r,n=o()){return c(u.UV,e,T),c(u.IR,t,B),c(u.wx,r,g),y(T,B,T),y(T,g,n),n}function l(e){return e}function p(e){return e[3]}function h(e){return(0,n.EF)(e[3])}r(37008);const d=[0,0,1,0],b=(0,i.Su)(),m=(0,i.Su)(),T=(o(),o()),B=o(),g=o()},71004:(e,t,r)=>{r.d(t,{AZ:()=>l,oN:()=>g,Mt:()=>k,Ep:()=>G,kV:()=>N,Ko:()=>b,m_:()=>m,IL:()=>T,mF:()=>B,E_:()=>_,Ym:()=>C,Kg:()=>O,U7:()=>p,wT:()=>E,iN:()=>U,mI:()=>z,oR:()=>q,kg:()=>L,qZ:()=>F,eS:()=>w,Yj:()=>h,Ax:()=>A,g7:()=>W,Yv:()=>$,Oq:()=>I,k5:()=>P,ER:()=>R,IN:()=>M,_5:()=>d,Ip:()=>S,OS:()=>V,i9:()=>K,mq:()=>j,Ig:()=>v,q$:()=>Y,sb:()=>x});class n{constructor(e,t,r=0,n,s){this.TypedArrayConstructor=e,this.elementCount=9;const i=this.TypedArrayConstructor;void 0===n&&(n=9*i.BYTES_PER_ELEMENT);const f=0===t.byteLength?0:r;this.typedBuffer=null==s?new i(t,f):new i(t,f,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const n=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,n,this.stride,n+r*this.stride)}getMat(e,t){let r=e*this.typedBufferStride;for(let e=0;e<9;e++)t[e]=this.typedBuffer[r++];return t}setMat(e,t){let r=e*this.typedBufferStride;for(let e=0;e<9;e++)this.typedBuffer[r++]=t[e]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}copyFrom(e,t,r){const n=this.typedBuffer,s=t.typedBuffer;let i=e*this.typedBufferStride,f=r*t.typedBufferStride;for(let e=0;e<9;++e)n[i++]=s[f++]}get buffer(){return this.typedBuffer.buffer}}n.ElementCount=9;class s{constructor(e,t,r=0,n,s){this.TypedArrayConstructor=e,this.elementCount=16;const i=this.TypedArrayConstructor;void 0===n&&(n=16*i.BYTES_PER_ELEMENT);const f=0===t.byteLength?0:r;this.typedBuffer=null==s?new i(t,f):new i(t,f,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const n=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,n,this.stride,n+r*this.stride)}getMat(e,t){let r=e*this.typedBufferStride;for(let e=0;e<16;e++)t[e]=this.typedBuffer[r++];return t}setMat(e,t){let r=e*this.typedBufferStride;for(let e=0;e<16;e++)this.typedBuffer[r++]=t[e]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}copyFrom(e,t,r){const n=this.typedBuffer,s=t.typedBuffer;let i=e*this.typedBufferStride,f=r*t.typedBufferStride;for(let e=0;e<16;++e)n[i++]=s[f++]}get buffer(){return this.typedBuffer.buffer}}s.ElementCount=16;class i{constructor(e,t,r=0,n,s){this.TypedArrayConstructor=e,this.elementCount=1;const i=this.TypedArrayConstructor;void 0===n&&(n=i.BYTES_PER_ELEMENT);const f=0===t.byteLength?0:r;this.typedBuffer=null==s?new i(t,f):new i(t,f,(s-r)/i.BYTES_PER_ELEMENT),this.stride=n,this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride)}sliceBuffer(e,t,r=this.count-t){const n=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,n,this.stride,n+r*this.stride)}get(e){return this.typedBuffer[e*this.typedBufferStride]}set(e,t){this.typedBuffer[e*this.typedBufferStride]=t}get buffer(){return this.typedBuffer.buffer}}i.ElementCount=1;var f=r(37648);class u{constructor(e,t,r=0,n,s){this.TypedArrayConstructor=e,this.elementCount=2;const i=this.TypedArrayConstructor;void 0===n&&(n=2*i.BYTES_PER_ELEMENT);const f=0===t.byteLength?0:r;this.typedBuffer=null==s?new i(t,f):new i(t,f,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const n=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,n,this.stride,n+r*this.stride)}getVec(e,t){return e*=this.typedBufferStride,(0,f.WO)(t,this.typedBuffer[e],this.typedBuffer[e+1])}setVec(e,t){e*=this.typedBufferStride,this.typedBuffer[e++]=t[0],this.typedBuffer[e]=t[1]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}setValues(e,t,r){e*=this.typedBufferStride,this.typedBuffer[e++]=t,this.typedBuffer[e]=r}copyFrom(e,t,r){const n=this.typedBuffer,s=t.typedBuffer;let i=e*this.typedBufferStride,f=r*t.typedBufferStride;n[i++]=s[f++],n[i]=s[f]}get buffer(){return this.typedBuffer.buffer}}u.ElementCount=2;var o=r(98472);class c{constructor(e,t,r=0,n,s){this.TypedArrayConstructor=e,this.elementCount=3;const i=this.TypedArrayConstructor;void 0===n&&(n=3*i.BYTES_PER_ELEMENT);const f=0===t.byteLength?0:r;this.typedBuffer=null==s?new i(t,f):new i(t,f,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const n=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,n,this.stride,n+r*this.stride)}getVec(e,t){return e*=this.typedBufferStride,(0,o.s)(t,this.typedBuffer[e],this.typedBuffer[e+1],this.typedBuffer[e+2])}setVec(e,t){e*=this.typedBufferStride,this.typedBuffer[e++]=t[0],this.typedBuffer[e++]=t[1],this.typedBuffer[e]=t[2]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}setValues(e,t,r,n){e*=this.typedBufferStride,this.typedBuffer[e++]=t,this.typedBuffer[e++]=r,this.typedBuffer[e]=n}copyFrom(e,t,r){const n=this.typedBuffer,s=t.typedBuffer;let i=e*this.typedBufferStride,f=r*t.typedBufferStride;n[i++]=s[f++],n[i++]=s[f++],n[i]=s[f]}get buffer(){return this.typedBuffer.buffer}}c.ElementCount=3;var y=r(74784);class a{constructor(e,t,r=0,n,s){this.TypedArrayConstructor=e,this.start=r,this.elementCount=4;const i=this.TypedArrayConstructor;void 0===n&&(n=4*i.BYTES_PER_ELEMENT);const f=0===t.byteLength?0:r;this.typedBuffer=null==s?new i(t,f):new i(t,f,(s-r)/i.BYTES_PER_ELEMENT),this.typedBufferStride=n/i.BYTES_PER_ELEMENT,this.count=Math.ceil(this.typedBuffer.length/this.typedBufferStride),this.stride=this.typedBufferStride*this.TypedArrayConstructor.BYTES_PER_ELEMENT}sliceBuffer(e,t,r=this.count-t){const n=this.typedBuffer.byteOffset+t*this.stride;return new e(this.buffer,n,this.stride,n+r*this.stride)}getVec(e,t){return e*=this.typedBufferStride,(0,y.s)(t,this.typedBuffer[e++],this.typedBuffer[e++],this.typedBuffer[e++],this.typedBuffer[e])}setVec(e,t){e*=this.typedBufferStride,this.typedBuffer[e++]=t[0],this.typedBuffer[e++]=t[1],this.typedBuffer[e++]=t[2],this.typedBuffer[e]=t[3]}get(e,t){return this.typedBuffer[e*this.typedBufferStride+t]}set(e,t,r){this.typedBuffer[e*this.typedBufferStride+t]=r}setValues(e,t,r,n,s){e*=this.typedBufferStride,this.typedBuffer[e++]=t,this.typedBuffer[e++]=r,this.typedBuffer[e++]=n,this.typedBuffer[e]=s}copyFrom(e,t,r){const n=this.typedBuffer,s=t.typedBuffer;let i=e*this.typedBufferStride,f=r*t.typedBufferStride;n[i++]=s[f++],n[i++]=s[f++],n[i++]=s[f++],n[i]=s[f]}get buffer(){return this.typedBuffer.buffer}}a.ElementCount=4;class l extends i{constructor(e,t=0,r,n){super(Float32Array,e,t,r,n),this.elementType="f32"}static fromTypedArray(e,t){return new l(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}l.ElementType="f32";class p extends u{constructor(e,t=0,r,n){super(Float32Array,e,t,r,n),this.elementType="f32"}slice(e,t){return this.sliceBuffer(p,e,t)}static fromTypedArray(e,t){return new p(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}p.ElementType="f32";class h extends c{constructor(e,t=0,r,n){super(Float32Array,e,t,r,n),this.elementType="f32"}slice(e,t){return this.sliceBuffer(h,e,t)}static fromTypedArray(e,t){return new h(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}h.ElementType="f32";class d extends a{constructor(e,t=0,r,n){super(Float32Array,e,t,r,n),this.elementType="f32"}slice(e,t){return this.sliceBuffer(d,e,t)}static fromTypedArray(e,t){return new d(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}d.ElementType="f32";class b extends n{constructor(e,t=0,r,n){super(Float32Array,e,t,r,n),this.elementType="f32"}slice(e,t){return this.sliceBuffer(b,e,t)}static fromTypedArray(e,t){return new b(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}b.ElementType="f32";class m extends n{constructor(e,t=0,r,n){super(Float64Array,e,t,r,n),this.elementType="f64"}slice(e,t){return this.sliceBuffer(m,e,t)}static fromTypedArray(e,t){return new m(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}m.ElementType="f64";class T extends s{constructor(e,t=0,r,n){super(Float32Array,e,t,r,n),this.elementType="f32"}slice(e,t){return this.sliceBuffer(T,e,t)}static fromTypedArray(e,t){return new T(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}T.ElementType="f32";class B extends s{constructor(e,t=0,r,n){super(Float64Array,e,t,r,n),this.elementType="f64"}slice(e,t){return this.sliceBuffer(B,e,t)}static fromTypedArray(e,t){return new B(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}B.ElementType="f64";class g extends i{constructor(e,t=0,r,n){super(Float64Array,e,t,r,n),this.elementType="f64"}slice(e,t){return this.sliceBuffer(g,e,t)}static fromTypedArray(e,t){return new g(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}g.ElementType="f64";class E extends u{constructor(e,t=0,r,n){super(Float64Array,e,t,r,n),this.elementType="f64"}slice(e,t){return this.sliceBuffer(E,e,t)}static fromTypedArray(e,t){return new E(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}E.ElementType="f64";class A extends c{constructor(e,t=0,r,n){super(Float64Array,e,t,r,n),this.elementType="f64"}slice(e,t){return this.sliceBuffer(A,e,t)}static fromTypedArray(e,t){return new A(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}A.ElementType="f64";class S extends a{constructor(e,t=0,r,n){super(Float64Array,e,t,r,n),this.elementType="f64"}slice(e,t){return this.sliceBuffer(S,e,t)}static fromTypedArray(e,t){return new S(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}S.ElementType="f64";class O extends i{constructor(e,t=0,r,n){super(Uint8Array,e,t,r,n),this.elementType="u8"}slice(e,t){return this.sliceBuffer(O,e,t)}static fromTypedArray(e,t){return new O(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}O.ElementType="u8";class w extends u{constructor(e,t=0,r,n){super(Uint8Array,e,t,r,n),this.elementType="u8"}slice(e,t){return this.sliceBuffer(w,e,t)}static fromTypedArray(e,t){return new w(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}w.ElementType="u8";class M extends c{constructor(e,t=0,r,n){super(Uint8Array,e,t,r,n),this.elementType="u8"}slice(e,t){return this.sliceBuffer(M,e,t)}static fromTypedArray(e,t){return new M(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}M.ElementType="u8";class x extends a{constructor(e,t=0,r,n){super(Uint8Array,e,t,r,n),this.elementType="u8"}slice(e,t){return this.sliceBuffer(x,e,t)}static fromTypedArray(e,t){return new x(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}x.ElementType="u8";class _ extends i{constructor(e,t=0,r,n){super(Uint16Array,e,t,r,n),this.elementType="u16"}slice(e,t){return this.sliceBuffer(_,e,t)}static fromTypedArray(e,t){return new _(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}_.ElementType="u16";class L extends u{constructor(e,t=0,r,n){super(Uint16Array,e,t,r,n),this.elementType="u16"}slice(e,t){return this.sliceBuffer(L,e,t)}static fromTypedArray(e,t){return new L(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}L.ElementType="u16";class P extends c{constructor(e,t=0,r,n){super(Uint16Array,e,t,r,n),this.elementType="u16"}slice(e,t){return this.sliceBuffer(P,e,t)}static fromTypedArray(e,t){return new P(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}P.ElementType="u16";class v extends a{constructor(e,t=0,r,n){super(Uint16Array,e,t,r,n),this.elementType="u16"}slice(e,t){return this.sliceBuffer(v,e,t)}static fromTypedArray(e,t){return new v(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}v.ElementType="u16";class C extends i{constructor(e,t=0,r,n){super(Uint32Array,e,t,r,n),this.elementType="u32"}slice(e,t){return this.sliceBuffer(C,e,t)}static fromTypedArray(e,t){return new C(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}C.ElementType="u32";class F extends u{constructor(e,t=0,r,n){super(Uint32Array,e,t,r,n),this.elementType="u32"}slice(e,t){return this.sliceBuffer(F,e,t)}static fromTypedArray(e,t){return new F(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}F.ElementType="u32";class R extends c{constructor(e,t=0,r,n){super(Uint32Array,e,t,r,n),this.elementType="u32"}slice(e,t){return this.sliceBuffer(R,e,t)}static fromTypedArray(e,t){return new R(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}R.ElementType="u32";class Y extends a{constructor(e,t=0,r,n){super(Uint32Array,e,t,r,n),this.elementType="u32"}slice(e,t){return this.sliceBuffer(Y,e,t)}static fromTypedArray(e,t){return new Y(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}Y.ElementType="u32";class N extends i{constructor(e,t=0,r,n){super(Int8Array,e,t,r,n),this.elementType="i8"}slice(e,t){return this.sliceBuffer(N,e,t)}static fromTypedArray(e,t){return new N(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}N.ElementType="i8";class q extends u{constructor(e,t=0,r,n){super(Int8Array,e,t,r,n),this.elementType="i8"}slice(e,t){return this.sliceBuffer(q,e,t)}static fromTypedArray(e,t){return new q(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}q.ElementType="i8";class I extends c{constructor(e,t=0,r,n){super(Int8Array,e,t,r,n),this.elementType="i8"}slice(e,t){return this.sliceBuffer(I,e,t)}static fromTypedArray(e,t){return new I(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}I.ElementType="i8";class j extends a{constructor(e,t=0,r,n){super(Int8Array,e,t,r,n),this.elementType="i8"}slice(e,t){return this.sliceBuffer(j,e,t)}static fromTypedArray(e,t){return new j(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}j.ElementType="i8";class k extends i{constructor(e,t=0,r,n){super(Int16Array,e,t,r,n),this.elementType="i16"}slice(e,t){return this.sliceBuffer(k,e,t)}static fromTypedArray(e,t){return new k(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}k.ElementType="i16";class U extends u{constructor(e,t=0,r,n){super(Int16Array,e,t,r,n),this.elementType="i16"}slice(e,t){return this.sliceBuffer(U,e,t)}static fromTypedArray(e,t){return new U(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}U.ElementType="i16";class W extends c{constructor(e,t=0,r,n){super(Int16Array,e,t,r,n),this.elementType="i16"}slice(e,t){return this.sliceBuffer(W,e,t)}static fromTypedArray(e,t){return new W(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}W.ElementType="i16";class V extends a{constructor(e,t=0,r,n){super(Int16Array,e,t,r,n),this.elementType="i16"}slice(e,t){return this.sliceBuffer(V,e,t)}static fromTypedArray(e,t){return new V(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}V.ElementType="i16";class G extends i{constructor(e,t=0,r,n){super(Int32Array,e,t,r,n),this.elementType="i32"}slice(e,t){return this.sliceBuffer(G,e,t)}static fromTypedArray(e,t){return new G(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}G.ElementType="i32";class z extends u{constructor(e,t=0,r,n){super(Int32Array,e,t,r,n),this.elementType="i32"}slice(e,t){return this.sliceBuffer(z,e,t)}static fromTypedArray(e,t){return new z(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}z.ElementType="i32";class $ extends c{constructor(e,t=0,r,n){super(Int32Array,e,t,r,n),this.elementType="i32"}slice(e,t){return this.sliceBuffer($,e,t)}static fromTypedArray(e,t){return new $(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}$.ElementType="i32";class K extends a{constructor(e,t=0,r,n){super(Int32Array,e,t,r,n),this.elementType="i32"}slice(e,t){return this.sliceBuffer(K,e,t)}static fromTypedArray(e,t){return new K(e.buffer,e.byteOffset,t,e.byteOffset+e.byteLength)}}K.ElementType="i32"},71488:(e,t,r)=>{r.d(t,{Kk:()=>u,QL:()=>o,yO:()=>f});var n=r(26832),s=r(66360),i=r(21136);function f(e,t){return e.isGeographic||e.isWebMercator&&(t??!0)}function u(e,t){switch(e.type){case"georeferenced":return t.isGeographic;case"local":return t.isGeographic||t.isWebMercator}}function o(e,t,r,f){if(void 0!==f){(0,n.O2)(s.c.getLogger(e),"option: geographic",{replacement:"use mesh vertexSpace and spatial reference to control how operations are performed",version:"4.29",warnOnce:!0});const u="local"===t.type;if(!(0,i.k$)(t)||f===u)return r.isGeographic||r.isWebMercator&&f;s.c.getLogger(e).warnOnce(`Specifying the 'geographic' parameter (${f}) for a Mesh vertex space of type "${t.type}" is not supported. This parameter will be ignored.`)}return u(t,r)}},54828:(e,t,r)=>{r.d(t,{CE:()=>E,EX:()=>S,_0:()=>F,_S:()=>A,iS:()=>w,mC:()=>x,project:()=>M,qu:()=>L});var n=r(24296),s=r(68612),i=r(15008),f=r(87104),u=r(98472),o=r(62484),c=r(77556),y=r(60074),a=r(82448),l=r(51120),p=r(62880),h=r(15688),d=r(41104),b=r(21136),m=r(48952),T=r(71488),B=r(38496);function g(e,t,r){return(0,T.yO)(t.spatialReference,r?.geographic)?x(e,t,!1,r):function(e,t,r){const n=new Float64Array(e.position.length),s=e.position,i=t.x,f=t.y,u=t.z??0,o=F(r?r.unit:null,t.spatialReference);for(let e=0;e<s.length;e+=3)n[e]=s[e]*o+i,n[e+1]=s[e+1]*o+f,n[e+2]=s[e+2]*o+u;return{position:n,normal:e.normal,tangent:e.tangent}}(e,t,r)}function E(e,t=f.IJ){const{position:r,normal:n,tangent:s}=e;return{position:(0,m.a)(new Float64Array(r.length),r,t),normal:null!=n?(0,B.W4)(n,new Float32Array(n.length),t):null,tangent:null!=s?(0,B.AT)(s,new Float32Array(s.length),t):null}}function A(e,t,r,n){const{position:s,normal:i,tangent:f}=e;if(!(0,b.k$)(t))return{position:s,normal:i,tangent:f};const u=(0,b.mA)(t,n);return g(E(e,r?.localMatrix),u,{geographic:"local"===t.type})}function S(e,t,r){const n=(0,b.Al)(t,r),s=t.spatialReference,i=(0,b.k$)(n);if(!i)return{vertexAttributes:g(e,t,r),vertexSpace:n,transform:null};const{position:f,normal:u,tangent:o}=e,c=(0,T.Kk)(n,s);switch(n.type){case"georeferenced":return c?{vertexAttributes:x(e,t,i,r),vertexSpace:n,transform:null}:{vertexAttributes:{position:f,normal:u,tangent:o},vertexSpace:n,transform:new d.c};case"local":return{vertexAttributes:{position:f,normal:u,tangent:o},vertexSpace:n,transform:new d.c}}}function O(e,t,r){return(0,T.yO)(t.spatialReference,r?.geographic)?L(e,t,r):_(e,t,r)}function w(e,t,r,n,s){if(!(0,b.k$)(t))return O(e,n,s);const{spatialReference:i}=n,f=A(e,t,r,i);return n.equals((0,b.mA)(t,i))?_(f,n,s):O(f,n,s)}function M({positions:e,transform:t,vertexSpace:r,inSpatialReference:n,outSpatialReference:s,outPositions:c,localMode:d}){const b=r.origin??o.cX,T=null!=r.origin?t?.localMatrix??f.IJ:f.IJ;if("georeferenced"===r.type){const t=c??(0,h.Gg)(e.length);if((0,i.yK)(T,f.IJ)?(0,h.mw)(t,e):(0,m.a)(t,e,T),!(0,u.h)(b,o.cX)){const[e,r,n]=b;for(let s=0;s<t.length;s+=3)t[s]+=e,t[s+1]+=r,t[s+2]+=n}return(0,p.projectBuffer)(t,n,0,t,s,0,t.length/3),t}let B=n;const g=(0,a._s)(n);B=s.isWebMercator&&d||!(0,y.canProjectWithoutEngine)(n,g)?B:g,(0,l.y)(n,b,R,B),(0,i.iW)(R,R,T);const E=c??(0,h.Gg)(e.length);return(0,m.a)(E,e,R),(0,p.projectBuffer)(E,B,0,E,s,0,E.length/3),E}function x(e,t,r,n){const s=t.spatialReference,i=P(t,n,R),f=new Float64Array(e.position.length),u=function(e,t,r,n){(0,m.a)(n,e,t);const s=new Float64Array(e.length);return(0,B.o$)(n,s,r)}(e.position,i,s,f),o=(0,c.yy)(N,i),y=function(e,t,r,n,s){if(null==r)return null;const i=new Float32Array(r.length);return(0,m.b)(i,r,n),(0,B.QP)(i,e,t,s,i),i}(u,f,e.normal,o,s),a=function(e,t,r,n,s){if(null==r)return null;const i=new Float32Array(r.length);(0,m.b)(i,r,n,4);for(let e=3;e<i.length;e+=4)i[e]=r[e];return(0,B.Cr)(i,e,t,s,i),i}(u,f,e.tangent,o,s);if(r){const{x:e,y:r,z:n}=t;(0,m.t)(u,u,[-e,-r,-(n??0)])}return{position:u,normal:y,tangent:a}}function _(e,t,r){const n=new Float64Array(e.position.length),s=e.position,i=t.x,f=t.y,u=t.z??0,o=F(r?r.unit:null,t.spatialReference);for(let e=0;e<s.length;e+=3)n[e]=(s[e]-i)/o,n[e+1]=(s[e+1]-f)/o,n[e+2]=(s[e+2]-u)/o;return{position:n,normal:e.normal,tangent:e.tangent}}function L(e,t,r){const n=t.spatialReference;P(t,r,R);const s=(0,i.S_)(Y,R),f=new Float64Array(e.position.length),u=function(e,t,r,n){const s=(0,B.K_)(e,t,n),i=new Float64Array(s.length);return(0,m.a)(i,s,r),i}(e.position,n,s,f),o=(0,c.yy)(N,s);return{position:u,normal:v(e.normal,e.position,f,n,o),tangent:C(e.tangent,e.position,f,n,o)}}function P(e,t,r){(0,l.y)(e.spatialReference,[e.x,e.y,e.z??0],r,(0,a._s)(e.spatialReference));const n=F(t?t.unit:null,e.spatialReference);return(0,i.aU)(r,r,[n,n,n]),r}function v(e,t,r,n,s){if(null==e)return null;const i=(0,B.cH)(e,t,r,n,new Float32Array(e.length));return(0,m.b)(i,i,s),i}function C(e,t,r,n,s){if(null==e)return null;const i=(0,B.GW)(e,t,r,n,new Float32Array(e.length));return(0,m.b)(i,i,s,4),i}function F(e,t){if(null==e)return 1;const r=(0,n.eg)(t);return 1/(0,n.ck)(r,"meters",e)}const R=(0,f.Su)(),Y=(0,f.Su)(),N=(0,s.Su)()},38496:(e,t,r)=>{r.d(t,{AT:()=>A,Cr:()=>O,GW:()=>S,K_:()=>B,QP:()=>T,W4:()=>E,cH:()=>m,o$:()=>g});var n=r(66360),s=r(77556),i=r(68612),f=r(87104),u=r(98472),o=r(62484),c=r(82448),y=r(51120),a=r(62880),l=r(60544),p=r(29120),h=r(71004),d=r(48952);const b=()=>n.c.getLogger("esri.geometry.support.meshUtils.normalProjection");function m(e,t,r,n,s){return M(n)?(w(_.TO_PCPF,h.Yj.fromTypedArray(e),h.Ax.fromTypedArray(t),h.Ax.fromTypedArray(r),n,h.Yj.fromTypedArray(s)),s):(b().error("Cannot convert spatial reference to PCPF"),s)}function T(e,t,r,n,s){return M(n)?(w(_.FROM_PCPF,h.Yj.fromTypedArray(e),h.Ax.fromTypedArray(t),h.Ax.fromTypedArray(r),n,h.Yj.fromTypedArray(s)),s):(b().error("Cannot convert to spatial reference from PCPF"),s)}function B(e,t,r){return(0,a.projectBuffer)(e,t,0,r,(0,c._s)(t),0,e.length/3),r}function g(e,t,r){return(0,a.projectBuffer)(e,(0,c._s)(r),0,t,r,0,e.length/3),t}function E(e,t,r){return(0,s.yy)(F,r),(0,d.b)(t,e,F),(0,s.QT)(F)||(0,d.n)(t,t),t}function A(e,t,r){if((0,s.yy)(F,r),(0,d.b)(t,e,F,4),(0,s.QT)(F)||(0,d.n)(t,t,4),e!==t)for(let r=3;r<e.length;r+=4)t[r]=e[r];return t}function S(e,t,r,n,s){if(!M(n))return b().error("Cannot convert spatial reference to PCPF"),s;w(_.TO_PCPF,h.Yj.fromTypedArray(e,4*Float32Array.BYTES_PER_ELEMENT),h.Ax.fromTypedArray(t),h.Ax.fromTypedArray(r),n,h.Yj.fromTypedArray(s,4*Float32Array.BYTES_PER_ELEMENT));for(let t=3;t<e.length;t+=4)s[t]=e[t];return s}function O(e,t,r,n,s){if(!M(n))return b().error("Cannot convert to spatial reference from PCPF"),s;w(_.FROM_PCPF,h.Yj.fromTypedArray(e,16),h.Ax.fromTypedArray(t),h.Ax.fromTypedArray(r),n,h.Yj.fromTypedArray(s,16));for(let t=3;t<e.length;t+=4)s[t]=e[t];return s}function w(e,t,r,n,i,f){if(!t)return;const o=r.count,a=(0,c._s)(i);if(x(i))for(let r=0;r<o;r++)n.getVec(r,P),t.getVec(r,v),(0,y.y)(a,P,C,a),(0,s.kr)(F,C),e===_.FROM_PCPF&&(0,s.oL)(F,F),(0,u.t)(v,v,F),f.setVec(r,v);else for(let i=0;i<o;i++){n.getVec(i,P),t.getVec(i,v),(0,y.y)(a,P,C,a),(0,s.kr)(F,C);const o=(0,p.MB)(r.get(i,1));let c=Math.cos(o);e===_.TO_PCPF&&(c=1/c),F[0]*=c,F[1]*=c,F[2]*=c,F[3]*=c,F[4]*=c,F[5]*=c,e===_.FROM_PCPF&&(0,s.oL)(F,F),(0,u.t)(v,v,F),(0,u.n)(v,v),f.setVec(i,v)}return f}function M(e){return x(e)||function(e){return e.isWebMercator}(e)}function x(e){return e.isWGS84||(0,l.Ub)(e)||(0,l.qg)(e)||(0,l.UB)(e)}var _,L;(L=_||(_={}))[L.TO_PCPF=0]="TO_PCPF",L[L.FROM_PCPF=1]="FROM_PCPF";const P=(0,o.Su)(),v=(0,o.Su)(),C=(0,f.Su)(),F=(0,i.Su)()},21136:(e,t,r)=>{r.d(t,{Al:()=>p,GF:()=>h,k$:()=>a,mA:()=>l,mm:()=>d,wX:()=>y});var n=r(26832),s=r(66360),i=r(67776),f=r(51232),u=r(13708),o=r(48952);function c(){return s.c.getLogger("esri.geometry.Mesh")}function y(e){const{vertexSpace:t}=e;if(null!=t.origin)return e.clone();const{anchor:r}=e,n=r.clone(),s=new f.c({origin:[n.x,n.y,n.z]}),i=e.cloneWithVertexSpace(s),{position:u}=i.vertexAttributes;return i.vertexAttributes.position=(0,o.t)(new Float64Array(u.length),u,[-n.x,-n.y,-(n.z??0)]),i.vertexAttributesChanged(),i}function a(e){return null!=e.origin}function l(e,t){if(!a(e))return null;const[r,n,s]=e.origin;return new i.c({x:r,y:n,z:s,spatialReference:t})}function p(e,t){const{x:r,y:s,z:i,spatialReference:o}=e,y=[r,s,i??0];if(void 0!==t?.geographic){if((0,n.O2)(c(),"option: geographic",{replacement:"use vertexSpace option instead",version:"4.29",warnOnce:!0}),!t?.vertexSpace)return t?.geographic?new u.c({origin:y}):new f.c({origin:y});c().warn("Deprecated geographic flag ignored since vertexSpace option is provided.")}if(!t?.vertexSpace)return o.isGeographic||o.isWebMercator?new u.c({origin:y}):new f.c({origin:y});switch(t.vertexSpace){case"local":return new u.c({origin:y});case"georeferenced":return new f.c({origin:y});case"georeferenced-absolute":return new f.c}}function h(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}function d(e,t){return"local"===e?new u.c({origin:t}):new f.c({origin:t})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8240],{38240:(e,t,s)=>{s.d(t,{CW:()=>d,EN:()=>p,addOrUpdateResources:()=>c,fetchResources:()=>n,removeAllResources:()=>u,removeResource:()=>l});var r=s(2600),o=s(20744),a=s(28176);async function n(e,t={},s){await e.load(s);const r=(0,a.kn)(e.itemUrl,"resources"),{start:o=1,num:n=10,sortOrder:c="asc",sortField:l="resource"}=t,u={query:{start:o,num:n,sortOrder:c,sortField:l,token:e.apiKey},signal:s?.signal},i=await e.portal.request(r,u);return{total:i.total,nextStart:i.nextStart,resources:i.resources.map((({created:t,size:s,resource:r})=>({created:new Date(t),size:s,resource:e.resourceFromPath(r)})))}}async function c(e,t,s,r){const n=new Map;for(const{resource:e,content:r,compress:a,access:c}of t){if(!e.hasPath())throw new o.c(`portal-item-resource-${s}:invalid-path`,"Resource does not have a valid path");const[t,l]=i(e.path),u=`${t}/${a??""}/${c??""}`;n.has(u)||n.set(u,{prefix:t,compress:a,access:c,files:[]}),n.get(u).files.push({fileName:l,content:r})}await e.load(r);const c=(0,a.kn)(e.userItemUrl,"add"===s?"addResources":"updateResources");for(const{prefix:t,compress:s,access:o,files:a}of n.values()){const n=25;for(let l=0;l<a.length;l+=n){const u=a.slice(l,l+n),i=new FormData;t&&"."!==t&&i.append("resourcesPrefix",t),s&&i.append("compress","true"),o&&i.append("access",o);let p=0;for(const{fileName:e,content:t}of u)i.append("file"+ ++p,t,e);i.append("f","json"),await e.portal.request(c,{method:"post",body:i,signal:r?.signal})}}}async function l(e,t,s){if(!t.hasPath())throw new o.c("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(s);const r=(0,a.kn)(e.userItemUrl,"removeResources");await e.portal.request(r,{method:"post",query:{resource:t.path},signal:s?.signal}),t.portalItem=null}async function u(e,t){await e.load(t);const s=(0,a.kn)(e.userItemUrl,"removeResources");return e.portal.request(s,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function i(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}async function p(e){return"blob"===e.type?e.blob:"json"===e.type?new Blob([e.jsonString],{type:"application/json"}):(await(0,r.c)(e.url,{responseType:"blob"})).data}function d(e,t){if(!e.hasPath())return null;const[s,,r]=function(e){const[t,s]=function(e){const t=(0,a.wt)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[r,o]=i(t);return[r,o,s]}(e.path);return e.portalItem.resourceFromPath((0,a.kn)(s,t+r))}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9644,8240],{10212:(e,t,r)=>{r.d(t,{S:()=>o});var s=r(4644);function o(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,s.w)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},4644:(e,t,r)=>{function s(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{w:()=>s})},38724:(e,t,r)=>{r.d(t,{C:()=>n});var s=r(41948),o=r(1580),a=(r(9456),r(66360),r(72052),r(12552));const n=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,s._)([(0,o.qq)({type:String})],t.prototype,"apiKey",null),t=(0,s._)([(0,a.c)("esri.layers.mixins.APIKeyMixin")],t),t}},16660:(e,t,r)=>{r.d(t,{u:()=>l});var s=r(41948),o=r(66360),a=r(1580),n=(r(9456),r(72052),r(12552)),i=r(48212);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,i.K0)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,i.oR)(e,o.c.getLogger(this)))}};return(0,s._)([(0,a.qq)()],t.prototype,"title",null),(0,s._)([(0,a.qq)({type:String})],t.prototype,"url",null),t=(0,s._)([(0,n.c)("esri.layers.mixins.ArcGISService")],t),t}},87072:(e,t,r)=>{r.d(t,{UJ:()=>O,G6:()=>R});var s=r(41948),o=r(2600),a=r(20744),n=r(66360),i=r(10860),l=r(28176),c=r(1580),p=(r(9456),r(72052),r(33600)),u=r(12552),d=r(18996),h=r(10212),y=r(95247),f=r(13819),m=r(56156),g=r(48212),v=r(21488),w=r(39840);var S=r(54872),I=r(9764),_=r(58648),x=r(76668),q=r(4424),b=r(13448);const R=e=>{let t=class extends e{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.indexInfo=null,this._debouncedSaveOperations=(0,i.Cu)((async(e,t,r)=>{switch(e){case O.SAVE:return this._save(t);case O.SAVE_AS:return this._saveAs(r,t)}}))}readSpatialReference(e,t){return this._readSpatialReference(t)}_readSpatialReference(e){if(null!=e.spatialReference)return m.c.fromJSON(e.spatialReference);const t=e.store,r=t.indexCRS||t.geographicCRS,s=r&&parseInt(r.substring(r.lastIndexOf("/")+1,r.length),10);return null!=s?new m.c(s):null}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const s=null==e.spatialReference?{...e,spatialReference:this._readSpatialReference(t)}:e;return y.c.fromJSON(s,r)}const s=t.store,o=this._readSpatialReference(t);return null==o||null==s?.extent||!Array.isArray(s.extent)||s.extent.some((e=>e<E))?null:new y.c({xmin:s.extent[0],ymin:s.extent[1],xmax:s.extent[2],ymax:s.extent[3],spatialReference:o})}parseVersionString(e){const t={major:Number.NaN,minor:Number.NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,s=null!=r.version?r.version.toString():"";return this.parseVersionString(s)}readTitlePortalItem(e){return"item-title"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){const r=this.portalItem?.title;if("item-title"===this.sublayerTitleMode)return(0,g.q_)(this.url,t.name);let s=t.name;if(!s&&this.url){const e=(0,g.K0)(this.url);null!=e&&(s=e.title)}return"item-title-and-service-name"===this.sublayerTitleMode&&r&&(s=r+" - "+s),(0,g.M9)(s)}set url(e){const t=(0,g._2)({layer:this,url:e,nonStandardUrlAllowed:!1,logger:n.c.getLogger(this)});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,s){(0,g.wn)(this,e,"layers",t,s)}get parsedUrl(){const e=this._get("url"),t=(0,l.as)(e);return null!=this.layerId&&(t.path=`${t.path}/layers/${this.layerId}`),t}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=(0,w.S)(this.parsedUrl.path,this.rootNode,e,this.customParameters,this.apiKey,n.c.getLogger(this),t),null==this.fullExtent||this.fullExtent.hasZ||this._updateExtent(await this.indexInfo)}_updateExtent(e){if("page"===e?.type){const t=e.rootIndex%e.pageSize,r=e.rootPage?.nodes?.[t];if(null==r?.obb?.center||null==r.obb.halfSize)throw new a.c("sceneservice:invalid-node-page","Invalid node page.");if(r.obb.center[0]<E||null==this.fullExtent||this.fullExtent.hasZ)return;const s=r.obb.halfSize,o=r.obb.center[2],n=Math.sqrt(s[0]*s[0]+s[1]*s[1]+s[2]*s[2]);this.fullExtent.zmin=o-n,this.fullExtent.zmax=o+n}else if("node"===e?.type){const t=e.rootNode?.mbs;if(!Array.isArray(t)||4!==t.length||t[0]<E)return;const r=t[2],s=t[3],{fullExtent:o}=this;o&&(o.zmin=r-s,o.zmax=r+s)}}async _fetchService(e){if(null==this.url)throw new a.c("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){const t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){const t=await(0,o.c)(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(t.data&&Array.isArray(t.data.layers)&&t.data.layers.length>0)return t.data.layers[0].id}async _fetchServiceLayer(e){const t=await(0,o.c)(this.parsedUrl?.path??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});t.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();const s=t.data;this.read(s,this._getServiceContext()),this.validateLayer(s)}async _fetchVoxelServiceLayer(e){const t=(await(0,o.c)(this.parsedUrl?.path+"/layer",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,this._getServiceContext()),this.validateLayer(t)}_getServiceContext(){return{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}_updateTypeKeywords(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const s=t.getTypeKeywords();for(const t of s)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)),r===P.newItem&&(e.typeKeywords=e.typeKeywords.filter((e=>"Hosted Service"!==e))))}async _saveAs(e,t){const r={...K,...t};let s=I.default.from(e);if(!s)throw new a.c("sceneservice:portal-item-required","_saveAs() requires a portal item to save to");(0,q.y)(s),s.id&&(s=s.clone(),s.id=null);const o=s.portal||S.c.getDefault();await this._ensureLoadBeforeSave(),s.type=U,s.portal=o;const n=(0,_.a)(s,"portal-item",!0),i={layers:[this.write({},n)]};return await Promise.all(n.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(i,n,r),s.url=this.url,s.title||(s.title=this.title),this._updateTypeKeywords(s,r,P.newItem),await o.signIn(),await(o.user?.addItem({item:s,folder:r?.folder,data:i})),await(0,x.U)(this.resourceReferences,n),this.portalItem=s,(0,h.S)(n),n.portalItem=s,s}async _save(e){const t={...K,...e};if(!this.portalItem)throw new a.c("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if((0,q.y)(this.portalItem),this.portalItem.type!==U)throw new a.c("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${U}"`);await this._ensureLoadBeforeSave();const r=(0,_.a)(this.portalItem,"portal-item",!0),s={layers:[this.write({},r)]};return await Promise.all(r.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(s,r,t),this.portalItem.url=this.url,this.portalItem.title||(this.portalItem.title=this.title),this._updateTypeKeywords(this.portalItem,t,P.existingItem),await(0,x.W)(this.portalItem,s,this.resourceReferences,r),(0,h.S)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,r){const s=r?.validationOptions;(0,b.e)(t,{errorName:"sceneservice:save"},{ignoreUnsupported:s?.ignoreUnsupported,supplementalUnsupportedErrors:["scenemodification:unsupported"]});const o=s?.enabled,i=null;if(o&&i){const t=(await i()).validate(e,r.portalItemLayerType);if(!t.length)return;const o=`Layer item did not validate:\n${t.join("\n")}`;if(n.c.getLogger(this).error(`_validateAgainstJSONSchema(): ${o}`),"throw"===s.failPolicy){const e=t.map((e=>new a.c("sceneservice:schema-validation",e)));throw new a.c("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{validationErrors:e})}}}};return(0,s._)([(0,c.qq)(v.id)],t.prototype,"id",void 0),(0,s._)([(0,c.qq)({type:m.c})],t.prototype,"spatialReference",void 0),(0,s._)([(0,p.E)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readSpatialReference",null),(0,s._)([(0,c.qq)({type:y.c})],t.prototype,"fullExtent",void 0),(0,s._)([(0,p.E)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readFullExtent",null),(0,s._)([(0,c.qq)({readOnly:!0,type:f.c})],t.prototype,"heightModelInfo",void 0),(0,s._)([(0,c.qq)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],t.prototype,"minScale",void 0),(0,s._)([(0,c.qq)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],t.prototype,"maxScale",void 0),(0,s._)([(0,c.qq)({readOnly:!0})],t.prototype,"version",void 0),(0,s._)([(0,p.E)("version",["store.version"])],t.prototype,"readVersion",null),(0,s._)([(0,c.qq)({type:String,json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,s._)([(0,c.qq)({type:String,json:{read:!1}})],t.prototype,"sublayerTitleMode",void 0),(0,s._)([(0,c.qq)({type:String})],t.prototype,"title",void 0),(0,s._)([(0,p.E)("portal-item","title")],t.prototype,"readTitlePortalItem",null),(0,s._)([(0,p.E)("service","title",["name"])],t.prototype,"readTitleService",null),(0,s._)([(0,c.qq)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],t.prototype,"layerId",void 0),(0,s._)([(0,c.qq)(v.qW)],t.prototype,"url",null),(0,s._)([(0,d.G)("url")],t.prototype,"writeUrl",null),(0,s._)([(0,c.qq)()],t.prototype,"parsedUrl",null),(0,s._)([(0,c.qq)({readOnly:!0})],t.prototype,"store",void 0),(0,s._)([(0,c.qq)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],t.prototype,"rootNode",void 0),t=(0,s._)([(0,u.c)("esri.layers.mixins.SceneService")],t),t},E=-1e38;var P,N;(N=P||(P={}))[N.existingItem=0]="existingItem",N[N.newItem=1]="newItem";const U="Scene Service",K={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}};var O;!function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(O||(O={}))},39840:(e,t,r)=>{r.d(t,{S:()=>a});var s=r(2600),o=r(20744);async function a(e,t,r,a,n,i,l){let c=null;if(null!=r){const t=`${e}/nodepages/`,o=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,s.c)(o,{query:{f:"json",...a,token:n},responseType:"json",signal:l})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){null!=i&&i.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",o,e),c=e}}if(!t)return null;const p=t?.split("/").pop(),u=`${e}/nodes/`,d=u+p;try{return{type:"node",rootNode:(await(0,s.c)(d,{query:{f:"json",...a,token:n},responseType:"json",signal:l})).data,urlPrefix:u}}catch(e){throw new o.c("sceneservice:root-node-missing","Root node missing.",{pageError:c,nodeError:e,url:d})}}},58648:(e,t,r)=>{r.d(t,{a:()=>n,s:()=>a});var s=r(28176),o=r(54872);function a(e,t){return{...i(e,t),readResourcePaths:[]}}function n(e,t,r){const o=(0,s.as)(e.itemUrl);return{...i(e,t),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:o?{rootPath:o.path,writtenUrls:[]}:null,resources:r?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function i(e,t){return{origin:t,url:(0,s.as)(e.itemUrl),portal:e.portal||o.c.getDefault(),portalItem:e}}},38240:(e,t,r)=>{r.d(t,{CW:()=>d,EN:()=>u,addOrUpdateResources:()=>i,fetchResources:()=>n,removeAllResources:()=>c,removeResource:()=>l});var s=r(2600),o=r(20744),a=r(28176);async function n(e,t={},r){await e.load(r);const s=(0,a.kn)(e.itemUrl,"resources"),{start:o=1,num:n=10,sortOrder:i="asc",sortField:l="created"}=t,c={query:{start:o,num:n,sortOrder:i,sortField:l,token:e.apiKey},signal:r?.signal},p=await e.portal.request(s,c);return{total:p.total,nextStart:p.nextStart,resources:p.resources.map((({created:t,size:r,resource:s})=>({created:new Date(t),size:r,resource:e.resourceFromPath(s)})))}}async function i(e,t,r,s){const n=new Map;for(const{resource:e,content:s,compress:a,access:i}of t){if(!e.hasPath())throw new o.c(`portal-item-resource-${r}:invalid-path`,"Resource does not have a valid path");const[t,l]=p(e.path),c=`${t}/${a??""}/${i??""}`;n.has(c)||n.set(c,{prefix:t,compress:a,access:i,files:[]}),n.get(c).files.push({fileName:l,content:s})}await e.load(s);const i=(0,a.kn)(e.userItemUrl,"add"===r?"addResources":"updateResources");for(const{prefix:t,compress:r,access:o,files:a}of n.values()){const n=25;for(let l=0;l<a.length;l+=n){const c=a.slice(l,l+n),p=new FormData;t&&"."!==t&&p.append("resourcesPrefix",t),r&&p.append("compress","true"),o&&p.append("access",o);let u=0;for(const{fileName:e,content:t}of c)p.append("file"+ ++u,t,e);p.append("f","json"),await e.portal.request(i,{method:"post",body:p,signal:s?.signal})}}}async function l(e,t,r){if(!t.hasPath())throw new o.c("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const s=(0,a.kn)(e.userItemUrl,"removeResources");await e.portal.request(s,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function c(e,t){await e.load(t);const r=(0,a.kn)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function p(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}async function u(e){return"blob"===e.type?e.blob:"json"===e.type?new Blob([e.jsonString],{type:"application/json"}):(await(0,s.c)(e.url,{responseType:"blob"})).data}function d(e,t){if(!e.hasPath())return null;const[r,,s]=function(e){const[t,r]=function(e){const t=(0,a.wt)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[s,o]=p(t);return[s,o,r]}(e.path);return e.portalItem.resourceFromPath((0,a.kn)(r,t+s))}},76668:(e,t,r)=>{r.d(t,{U:()=>i,W:()=>l});var s=r(20744),o=r(10860),a=r(63564),n=r(38240);async function i(e,t,r){const s=await c(e,t,r);await p(s,t,r)}async function l(e,t,r,s,o){const a=await c(r,s,o);await e.update({data:t}),await p(a,s,o)}async function c(e,t,i){if(!t?.resources)return;const l=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const c=new Set(t.resources.toKeep.map((e=>e.resource.path))),p=new Set,u=[];c.forEach((t=>{l.delete(t),e.paths.push(t)}));const d=[],h=[],y=[];for(const r of t.resources.toUpdate)if(l.delete(r.resource.path),c.has(r.resource.path)||p.has(r.resource.path)){const{resource:t,content:s,finish:o}=r,i=(0,n.CW)(t,(0,a.g1)());e.paths.push(i.path),d.push({resource:i,content:await(0,n.EN)(s),compress:r.compress}),o&&y.push((()=>o(i)))}else{e.paths.push(r.resource.path),h.push({resource:r.resource,content:await(0,n.EN)(r.content),compress:r.compress});const t=r.finish;t&&y.push((()=>t(r.resource))),p.add(r.resource.path)}for(const r of t.resources.toAdd)if(e.paths.push(r.resource.path),l.has(r.resource.path))l.delete(r.resource.path);else{d.push({resource:r.resource,content:await(0,n.EN)(r.content),compress:r.compress});const e=r.finish;e&&y.push((()=>e(r.resource)))}if(d.length||h.length){const{addOrUpdateResources:e}=await Promise.resolve().then(r.bind(r,38240));await e(t.portalItem,d,"add",i),await e(t.portalItem,h,"update",i)}if(y.forEach((e=>e())),0===u.length)return l;const f=await(0,o.Ml)(u);if((0,o.wp)(i),f.length>0)throw new s.c("save:resources","Failed to save one or more resources",{errors:f});return l}async function p(e,t,r){if(!e||!t.portalItem)return;const s=[];for(const o of e){const e=t.portalItem.resourceFromPath(o);s.push(e.portalItem.removeResource(e,r))}await(0,o.Dv)(s)}},4424:(e,t,r)=>{r.d(t,{y:()=>n});var s=r(6220),o=r(20744),a=r(20572);function n(e){if(s.default.apiKey&&(0,a.s)(e.portal.url))throw new o.c("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${e.portal.url} when using an api key`)}},13448:(e,t,r)=>{r.d(t,{W:()=>o,e:()=>n});var s=r(20744);async function o(e){const t=[];for(const r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){const e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}const a=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function n(e,t,r){let o=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:t,details:r})=>new s.c(e,t,r)));if(e.blockedRelativeUrls&&(o=o.concat(e.blockedRelativeUrls.map((e=>new s.c("url:unsupported",`Relative url '${e}' is not supported`))))),r){const{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:s}=r;e&&(o=o.filter((({name:e})=>!(a.has(e)||t.includes(e))))),s&&(o=o.filter((e=>"web-document-write:property-required"!==e.name)))}if(o.length>0)throw new s.c(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:o})}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9644,8240],{10212:(e,t,r)=>{r.d(t,{S:()=>o});var s=r(4644);function o(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,s.w)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},4644:(e,t,r)=>{function s(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{w:()=>s})},38724:(e,t,r)=>{r.d(t,{C:()=>n});var s=r(41948),o=r(1580),a=(r(9456),r(66360),r(72052),r(12552));const n=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,s._)([(0,o.qq)({type:String})],t.prototype,"apiKey",null),t=(0,s._)([(0,a.c)("esri.layers.mixins.APIKeyMixin")],t),t}},16660:(e,t,r)=>{r.d(t,{u:()=>l});var s=r(41948),o=r(66360),a=r(1580),n=(r(9456),r(72052),r(12552)),i=r(48212);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,i.K0)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,i.oR)(e,o.c.getLogger(this)))}};return(0,s._)([(0,a.qq)()],t.prototype,"title",null),(0,s._)([(0,a.qq)({type:String})],t.prototype,"url",null),t=(0,s._)([(0,n.c)("esri.layers.mixins.ArcGISService")],t),t}},87072:(e,t,r)=>{r.d(t,{UJ:()=>O,G6:()=>R});var s=r(41948),o=r(2600),a=r(20744),n=r(66360),i=r(10860),l=r(28176),c=r(1580),p=(r(9456),r(72052),r(33600)),u=r(12552),d=r(18996),h=r(10212),y=r(95247),f=r(13819),m=r(56156),g=r(48212),v=r(21488),w=r(39840);var S=r(54872),I=r(9764),_=r(58648),x=r(76668),q=r(4424),b=r(13448);const R=e=>{let t=class extends e{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.indexInfo=null,this._debouncedSaveOperations=(0,i.Cu)((async(e,t,r)=>{switch(e){case O.SAVE:return this._save(t);case O.SAVE_AS:return this._saveAs(r,t)}}))}readSpatialReference(e,t){return this._readSpatialReference(t)}_readSpatialReference(e){if(null!=e.spatialReference)return m.c.fromJSON(e.spatialReference);const t=e.store,r=t.indexCRS||t.geographicCRS,s=r&&parseInt(r.substring(r.lastIndexOf("/")+1,r.length),10);return null!=s?new m.c(s):null}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const s=null==e.spatialReference?{...e,spatialReference:this._readSpatialReference(t)}:e;return y.c.fromJSON(s,r)}const s=t.store,o=this._readSpatialReference(t);return null==o||null==s?.extent||!Array.isArray(s.extent)||s.extent.some((e=>e<E))?null:new y.c({xmin:s.extent[0],ymin:s.extent[1],xmax:s.extent[2],ymax:s.extent[3],spatialReference:o})}parseVersionString(e){const t={major:Number.NaN,minor:Number.NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,s=null!=r.version?r.version.toString():"";return this.parseVersionString(s)}readTitlePortalItem(e){return"item-title"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){const r=this.portalItem?.title;if("item-title"===this.sublayerTitleMode)return(0,g.q_)(this.url,t.name);let s=t.name;if(!s&&this.url){const e=(0,g.K0)(this.url);null!=e&&(s=e.title)}return"item-title-and-service-name"===this.sublayerTitleMode&&r&&(s=r+" - "+s),(0,g.M9)(s)}set url(e){const t=(0,g._2)({layer:this,url:e,nonStandardUrlAllowed:!1,logger:n.c.getLogger(this)});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,s){(0,g.wn)(this,e,"layers",t,s)}get parsedUrl(){const e=this._get("url"),t=(0,l.as)(e);return null!=this.layerId&&(t.path=`${t.path}/layers/${this.layerId}`),t}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=(0,w.S)(this.parsedUrl.path,this.rootNode,e,this.customParameters,this.apiKey,n.c.getLogger(this),t),null==this.fullExtent||this.fullExtent.hasZ||this._updateExtent(await this.indexInfo)}_updateExtent(e){if("page"===e?.type){const t=e.rootIndex%e.pageSize,r=e.rootPage?.nodes?.[t];if(null==r?.obb?.center||null==r.obb.halfSize)throw new a.c("sceneservice:invalid-node-page","Invalid node page.");if(r.obb.center[0]<E||null==this.fullExtent||this.fullExtent.hasZ)return;const s=r.obb.halfSize,o=r.obb.center[2],n=Math.sqrt(s[0]*s[0]+s[1]*s[1]+s[2]*s[2]);this.fullExtent.zmin=o-n,this.fullExtent.zmax=o+n}else if("node"===e?.type){const t=e.rootNode?.mbs;if(!Array.isArray(t)||4!==t.length||t[0]<E)return;const r=t[2],s=t[3],{fullExtent:o}=this;o&&(o.zmin=r-s,o.zmax=r+s)}}async _fetchService(e){if(null==this.url)throw new a.c("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){const t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){const t=await(0,o.c)(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(t.data&&Array.isArray(t.data.layers)&&t.data.layers.length>0)return t.data.layers[0].id}async _fetchServiceLayer(e){const t=await(0,o.c)(this.parsedUrl?.path??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});t.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();const s=t.data;this.read(s,this._getServiceContext()),this.validateLayer(s)}async _fetchVoxelServiceLayer(e){const t=(await(0,o.c)(this.parsedUrl?.path+"/layer",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,this._getServiceContext()),this.validateLayer(t)}_getServiceContext(){return{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}_updateTypeKeywords(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const s=t.getTypeKeywords();for(const t of s)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)),r===P.newItem&&(e.typeKeywords=e.typeKeywords.filter((e=>"Hosted Service"!==e))))}async _saveAs(e,t){const r={...K,...t};let s=I.default.from(e);if(!s)throw new a.c("sceneservice:portal-item-required","_saveAs() requires a portal item to save to");(0,q.y)(s),s.id&&(s=s.clone(),s.id=null);const o=s.portal||S.c.getDefault();await this._ensureLoadBeforeSave(),s.type=U,s.portal=o;const n=(0,_.a)(s,"portal-item",!0),i={layers:[this.write({},n)]};return await Promise.all(n.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(i,n,r),s.url=this.url,s.title||(s.title=this.title),this._updateTypeKeywords(s,r,P.newItem),await o.signIn(),await(o.user?.addItem({item:s,folder:r?.folder,data:i})),await(0,x.U)(this.resourceReferences,n),this.portalItem=s,(0,h.S)(n),n.portalItem=s,s}async _save(e){const t={...K,...e};if(!this.portalItem)throw new a.c("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if((0,q.y)(this.portalItem),this.portalItem.type!==U)throw new a.c("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${U}"`);await this._ensureLoadBeforeSave();const r=(0,_.a)(this.portalItem,"portal-item",!0),s={layers:[this.write({},r)]};return await Promise.all(r.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(s,r,t),this.portalItem.url=this.url,this.portalItem.title||(this.portalItem.title=this.title),this._updateTypeKeywords(this.portalItem,t,P.existingItem),await(0,x.W)(this.portalItem,s,this.resourceReferences,r),(0,h.S)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,r){const s=r?.validationOptions;(0,b.e)(t,{errorName:"sceneservice:save"},{ignoreUnsupported:s?.ignoreUnsupported,supplementalUnsupportedErrors:["scenemodification:unsupported"]});const o=s?.enabled,i=null;if(o&&i){const t=(await i()).validate(e,r.portalItemLayerType);if(!t.length)return;const o=`Layer item did not validate:\n${t.join("\n")}`;if(n.c.getLogger(this).error(`_validateAgainstJSONSchema(): ${o}`),"throw"===s.failPolicy){const e=t.map((e=>new a.c("sceneservice:schema-validation",e)));throw new a.c("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{validationErrors:e})}}}};return(0,s._)([(0,c.qq)(v.id)],t.prototype,"id",void 0),(0,s._)([(0,c.qq)({type:m.c})],t.prototype,"spatialReference",void 0),(0,s._)([(0,p.E)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readSpatialReference",null),(0,s._)([(0,c.qq)({type:y.c})],t.prototype,"fullExtent",void 0),(0,s._)([(0,p.E)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readFullExtent",null),(0,s._)([(0,c.qq)({readOnly:!0,type:f.c})],t.prototype,"heightModelInfo",void 0),(0,s._)([(0,c.qq)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],t.prototype,"minScale",void 0),(0,s._)([(0,c.qq)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],t.prototype,"maxScale",void 0),(0,s._)([(0,c.qq)({readOnly:!0})],t.prototype,"version",void 0),(0,s._)([(0,p.E)("version",["store.version"])],t.prototype,"readVersion",null),(0,s._)([(0,c.qq)({type:String,json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,s._)([(0,c.qq)({type:String,json:{read:!1}})],t.prototype,"sublayerTitleMode",void 0),(0,s._)([(0,c.qq)({type:String})],t.prototype,"title",void 0),(0,s._)([(0,p.E)("portal-item","title")],t.prototype,"readTitlePortalItem",null),(0,s._)([(0,p.E)("service","title",["name"])],t.prototype,"readTitleService",null),(0,s._)([(0,c.qq)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],t.prototype,"layerId",void 0),(0,s._)([(0,c.qq)(v.qW)],t.prototype,"url",null),(0,s._)([(0,d.G)("url")],t.prototype,"writeUrl",null),(0,s._)([(0,c.qq)()],t.prototype,"parsedUrl",null),(0,s._)([(0,c.qq)({readOnly:!0})],t.prototype,"store",void 0),(0,s._)([(0,c.qq)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],t.prototype,"rootNode",void 0),t=(0,s._)([(0,u.c)("esri.layers.mixins.SceneService")],t),t},E=-1e38;var P,N;(N=P||(P={}))[N.existingItem=0]="existingItem",N[N.newItem=1]="newItem";const U="Scene Service",K={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}};var O;!function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(O||(O={}))},39840:(e,t,r)=>{r.d(t,{S:()=>a});var s=r(2600),o=r(20744);async function a(e,t,r,a,n,i,l){let c=null;if(null!=r){const t=`${e}/nodepages/`,o=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,s.c)(o,{query:{f:"json",...a,token:n},responseType:"json",signal:l})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){null!=i&&i.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",o,e),c=e}}if(!t)return null;const p=t?.split("/").pop(),u=`${e}/nodes/`,d=u+p;try{return{type:"node",rootNode:(await(0,s.c)(d,{query:{f:"json",...a,token:n},responseType:"json",signal:l})).data,urlPrefix:u}}catch(e){throw new o.c("sceneservice:root-node-missing","Root node missing.",{pageError:c,nodeError:e,url:d})}}},58648:(e,t,r)=>{r.d(t,{a:()=>n,s:()=>a});var s=r(28176),o=r(54872);function a(e,t){return{...i(e,t),readResourcePaths:[]}}function n(e,t,r){const o=(0,s.as)(e.itemUrl);return{...i(e,t),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:o?{rootPath:o.path,writtenUrls:[]}:null,resources:r?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function i(e,t){return{origin:t,url:(0,s.as)(e.itemUrl),portal:e.portal||o.c.getDefault(),portalItem:e}}},38240:(e,t,r)=>{r.d(t,{CW:()=>d,EN:()=>u,addOrUpdateResources:()=>i,fetchResources:()=>n,removeAllResources:()=>c,removeResource:()=>l});var s=r(2600),o=r(20744),a=r(28176);async function n(e,t={},r){await e.load(r);const s=(0,a.kn)(e.itemUrl,"resources"),{start:o=1,num:n=10,sortOrder:i="asc",sortField:l="resource"}=t,c={query:{start:o,num:n,sortOrder:i,sortField:l,token:e.apiKey},signal:r?.signal},p=await e.portal.request(s,c);return{total:p.total,nextStart:p.nextStart,resources:p.resources.map((({created:t,size:r,resource:s})=>({created:new Date(t),size:r,resource:e.resourceFromPath(s)})))}}async function i(e,t,r,s){const n=new Map;for(const{resource:e,content:s,compress:a,access:i}of t){if(!e.hasPath())throw new o.c(`portal-item-resource-${r}:invalid-path`,"Resource does not have a valid path");const[t,l]=p(e.path),c=`${t}/${a??""}/${i??""}`;n.has(c)||n.set(c,{prefix:t,compress:a,access:i,files:[]}),n.get(c).files.push({fileName:l,content:s})}await e.load(s);const i=(0,a.kn)(e.userItemUrl,"add"===r?"addResources":"updateResources");for(const{prefix:t,compress:r,access:o,files:a}of n.values()){const n=25;for(let l=0;l<a.length;l+=n){const c=a.slice(l,l+n),p=new FormData;t&&"."!==t&&p.append("resourcesPrefix",t),r&&p.append("compress","true"),o&&p.append("access",o);let u=0;for(const{fileName:e,content:t}of c)p.append("file"+ ++u,t,e);p.append("f","json"),await e.portal.request(i,{method:"post",body:p,signal:s?.signal})}}}async function l(e,t,r){if(!t.hasPath())throw new o.c("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const s=(0,a.kn)(e.userItemUrl,"removeResources");await e.portal.request(s,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function c(e,t){await e.load(t);const r=(0,a.kn)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function p(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}async function u(e){return"blob"===e.type?e.blob:"json"===e.type?new Blob([e.jsonString],{type:"application/json"}):(await(0,s.c)(e.url,{responseType:"blob"})).data}function d(e,t){if(!e.hasPath())return null;const[r,,s]=function(e){const[t,r]=function(e){const t=(0,a.wt)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[s,o]=p(t);return[s,o,r]}(e.path);return e.portalItem.resourceFromPath((0,a.kn)(r,t+s))}},76668:(e,t,r)=>{r.d(t,{U:()=>i,W:()=>l});var s=r(20744),o=r(10860),a=r(63564),n=r(38240);async function i(e,t,r){const s=await c(e,t,r);await p(s,t,r)}async function l(e,t,r,s,o){const a=await c(r,s,o);await e.update({data:t}),await p(a,s,o)}async function c(e,t,i){if(!t?.resources)return;const l=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const c=new Set(t.resources.toKeep.map((e=>e.resource.path))),p=new Set,u=[];c.forEach((t=>{l.delete(t),e.paths.push(t)}));const d=[],h=[],y=[];for(const r of t.resources.toUpdate)if(l.delete(r.resource.path),c.has(r.resource.path)||p.has(r.resource.path)){const{resource:t,content:s,finish:o}=r,i=(0,n.CW)(t,(0,a.g1)());e.paths.push(i.path),d.push({resource:i,content:await(0,n.EN)(s),compress:r.compress}),o&&y.push((()=>o(i)))}else{e.paths.push(r.resource.path),h.push({resource:r.resource,content:await(0,n.EN)(r.content),compress:r.compress});const t=r.finish;t&&y.push((()=>t(r.resource))),p.add(r.resource.path)}for(const r of t.resources.toAdd)if(e.paths.push(r.resource.path),l.has(r.resource.path))l.delete(r.resource.path);else{d.push({resource:r.resource,content:await(0,n.EN)(r.content),compress:r.compress});const e=r.finish;e&&y.push((()=>e(r.resource)))}if(d.length||h.length){const{addOrUpdateResources:e}=await Promise.resolve().then(r.bind(r,38240));await e(t.portalItem,d,"add",i),await e(t.portalItem,h,"update",i)}if(y.forEach((e=>e())),0===u.length)return l;const f=await(0,o.Ml)(u);if((0,o.wp)(i),f.length>0)throw new s.c("save:resources","Failed to save one or more resources",{errors:f});return l}async function p(e,t,r){if(!e||!t.portalItem)return;const s=[];for(const o of e){const e=t.portalItem.resourceFromPath(o);s.push(e.portalItem.removeResource(e,r))}await(0,o.Dv)(s)}},4424:(e,t,r)=>{r.d(t,{y:()=>n});var s=r(6220),o=r(20744),a=r(20572);function n(e){if(s.default.apiKey&&(0,a.s)(e.portal.url))throw new o.c("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${e.portal.url} when using an api key`)}},13448:(e,t,r)=>{r.d(t,{W:()=>o,e:()=>n});var s=r(20744);async function o(e){const t=[];for(const r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){const e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}const a=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function n(e,t,r){let o=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:t,details:r})=>new s.c(e,t,r)));if(e.blockedRelativeUrls&&(o=o.concat(e.blockedRelativeUrls.map((e=>new s.c("url:unsupported",`Relative url '${e}' is not supported`))))),r){const{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:s}=r;e&&(o=o.filter((({name:e})=>!(a.has(e)||t.includes(e))))),s&&(o=o.filter((e=>"web-document-write:property-required"!==e.name)))}if(o.length>0)throw new s.c(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:o})}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7852,8240],{10212:(e,t,r)=>{r.d(t,{S:()=>o});var a=r(4644);function o(e){e?.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,a.w)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},4644:(e,t,r)=>{function a(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{w:()=>a})},7852:(e,t,r)=>{r.d(t,{save:()=>h,saveAs:()=>w});var a=r(24516),o=r(58648),s=r(46940),n=r(76668);const i="Media Layer",c="media-layer-save",u="media-layer-save-as",l=["media-layer:unsupported-source"];function p(e){return{isValid:"media"===e.type,errorMessage:"Layer.type should be 'media'"}}function d(e){return(0,o.a)(e,"portal-item",!0)}function f(e){return e.layerJSON}async function m(e,t){const{title:r,fullExtent:a}=e;t.title||=r,t.extent=a?await(0,s.oj)(a):null,(0,s.KI)(t,s.qk.METADATA)}async function h(e,t){return(0,a.eI)({layer:e,itemType:i,validateLayer:p,createJSONContext:e=>d(e),createItemData:f,errorNamePrefix:c,supplementalUnsupportedErrors:l,saveResources:(t,r)=>(0,n.U)(e.resourceReferences,r)},t)}async function w(e,t,r){return(0,a.ER)({layer:e,itemType:i,validateLayer:p,createJSONContext:e=>d(e),createItemData:f,errorNamePrefix:u,supplementalUnsupportedErrors:l,newItem:t,setItemProperties:m,saveResources:(t,r)=>(0,n.U)(e.resourceReferences,r)},r)}},24516:(e,t,r)=>{r.d(t,{ER:()=>I,eI:()=>g});var a=r(20744),o=r(10212),s=r(54872),n=r(9764),i=r(58648),c=r(46940),u=r(4424),l=r(13448);async function p(e){const{layer:t,errorNamePrefix:r,validateLayer:o}=e;await t.load(),function(e,t,r){const o=r(e);if(!o.isValid)throw new a.c(`${t}:invalid-parameters`,o.errorMessage,{layer:e})}(t,r,o)}function d(e,t){return`Layer (title: ${e.title}, id: ${e.id}) of type '${e.declaredClass}' ${t}`}function f(e){const{item:t,errorNamePrefix:r,layer:o,validateItem:s}=e;if((0,u.y)(t),function(e){const{item:t,itemType:r,additionalItemType:o,errorNamePrefix:s,layer:n}=e,i=[r];if(o&&i.push(o),!i.includes(t.type)){const e=i.map((e=>`'${e}'`)).join(", ");throw new a.c(`${s}:portal-item-wrong-type`,`Portal item type should be one of: "${e}"`,{item:t,layer:n})}}(e),s){const e=s(t);if(!e.isValid)throw new a.c(`${r}:invalid-parameters`,e.errorMessage,{layer:o})}}function m(e){const{layer:t,errorNamePrefix:r}=e,{portalItem:o}=t;if(!o)throw new a.c(`${r}:portal-item-not-set`,d(t,"requires the portalItem property to be set"));if(!o.loaded)throw new a.c(`${r}:portal-item-not-loaded`,d(t,"cannot be saved to a portal item that does not exist or is inaccessible"));f({...e,item:o})}function h(e){const{newItem:t,itemType:r}=e;let a=n.default.from(t);return a.id&&(a=a.clone(),a.id=null),a.type??=r,a.portal??=s.c.getDefault(),f({...e,item:a}),a}function w(e){return(0,i.a)(e,"portal-item")}async function y(e,t,r){"beforeSave"in e&&"function"==typeof e.beforeSave&&await e.beforeSave();const a=e.write({},t);return await Promise.all(t.resources?.pendingOperations??[]),(0,l.e)(t,{errorName:"layer-write:unsupported"},r),a}function v(e){(0,c.O2)(e,c.qk.JSAPI),e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)))}async function g(e,t){const{layer:r,createItemData:a,createJSONContext:s,saveResources:n,supplementalUnsupportedErrors:i}=e;await p(e),m(e);const c=r.portalItem,u=s?s(c):w(c),l=await y(r,u,{...t,supplementalUnsupportedErrors:i}),d=await a({layer:r,layerJSON:l},c);return v(c),await c.update({data:d}),(0,o.S)(u),await(n?.(c,u)),c}async function I(e,t){const{layer:r,createItemData:a,createJSONContext:s,setItemProperties:n,saveResources:i,supplementalUnsupportedErrors:c}=e;await p(e);const u=h(e),l=s?s(u):w(u),d=await y(r,l,{...t,supplementalUnsupportedErrors:c}),f=await a({layer:r,layerJSON:d},u);return await n(r,u),v(u),await async function(e,t,r){const a=e.portal;await a.signIn(),await(a.user?.addItem({item:e,data:t,folder:r?.folder}))}(u,f,t),r.portalItem=u,(0,o.S)(l),await(i?.(u,l)),u}},58648:(e,t,r)=>{r.d(t,{a:()=>n,s:()=>s});var a=r(28176),o=r(54872);function s(e,t){return{...i(e,t),readResourcePaths:[]}}function n(e,t,r){const o=(0,a.as)(e.itemUrl);return{...i(e,t),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:o?{rootPath:o.path,writtenUrls:[]}:null,resources:r?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function i(e,t){return{origin:t,url:(0,a.as)(e.itemUrl),portal:e.portal||o.c.getDefault(),portalItem:e}}},38240:(e,t,r)=>{r.d(t,{CW:()=>d,EN:()=>p,addOrUpdateResources:()=>i,fetchResources:()=>n,removeAllResources:()=>u,removeResource:()=>c});var a=r(2600),o=r(20744),s=r(28176);async function n(e,t={},r){await e.load(r);const a=(0,s.kn)(e.itemUrl,"resources"),{start:o=1,num:n=10,sortOrder:i="asc",sortField:c="resource"}=t,u={query:{start:o,num:n,sortOrder:i,sortField:c,token:e.apiKey},signal:r?.signal},l=await e.portal.request(a,u);return{total:l.total,nextStart:l.nextStart,resources:l.resources.map((({created:t,size:r,resource:a})=>({created:new Date(t),size:r,resource:e.resourceFromPath(a)})))}}async function i(e,t,r,a){const n=new Map;for(const{resource:e,content:a,compress:s,access:i}of t){if(!e.hasPath())throw new o.c(`portal-item-resource-${r}:invalid-path`,"Resource does not have a valid path");const[t,c]=l(e.path),u=`${t}/${s??""}/${i??""}`;n.has(u)||n.set(u,{prefix:t,compress:s,access:i,files:[]}),n.get(u).files.push({fileName:c,content:a})}await e.load(a);const i=(0,s.kn)(e.userItemUrl,"add"===r?"addResources":"updateResources");for(const{prefix:t,compress:r,access:o,files:s}of n.values()){const n=25;for(let c=0;c<s.length;c+=n){const u=s.slice(c,c+n),l=new FormData;t&&"."!==t&&l.append("resourcesPrefix",t),r&&l.append("compress","true"),o&&l.append("access",o);let p=0;for(const{fileName:e,content:t}of u)l.append("file"+ ++p,t,e);l.append("f","json"),await e.portal.request(i,{method:"post",body:l,signal:a?.signal})}}}async function c(e,t,r){if(!t.hasPath())throw new o.c("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const a=(0,s.kn)(e.userItemUrl,"removeResources");await e.portal.request(a,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function u(e,t){await e.load(t);const r=(0,s.kn)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function l(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}async function p(e){return"blob"===e.type?e.blob:"json"===e.type?new Blob([e.jsonString],{type:"application/json"}):(await(0,a.c)(e.url,{responseType:"blob"})).data}function d(e,t){if(!e.hasPath())return null;const[r,,a]=function(e){const[t,r]=function(e){const t=(0,s.wt)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[a,o]=l(t);return[a,o,r]}(e.path);return e.portalItem.resourceFromPath((0,s.kn)(r,t+a))}},76668:(e,t,r)=>{r.d(t,{U:()=>i,W:()=>c});var a=r(20744),o=r(10860),s=r(63564),n=r(38240);async function i(e,t,r){const a=await u(e,t,r);await l(a,t,r)}async function c(e,t,r,a,o){const s=await u(r,a,o);await e.update({data:t}),await l(s,a,o)}async function u(e,t,i){if(!t?.resources)return;const c=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const u=new Set(t.resources.toKeep.map((e=>e.resource.path))),l=new Set,p=[];u.forEach((t=>{c.delete(t),e.paths.push(t)}));const d=[],f=[],m=[];for(const r of t.resources.toUpdate)if(c.delete(r.resource.path),u.has(r.resource.path)||l.has(r.resource.path)){const{resource:t,content:a,finish:o}=r,i=(0,n.CW)(t,(0,s.g1)());e.paths.push(i.path),d.push({resource:i,content:await(0,n.EN)(a),compress:r.compress}),o&&m.push((()=>o(i)))}else{e.paths.push(r.resource.path),f.push({resource:r.resource,content:await(0,n.EN)(r.content),compress:r.compress});const t=r.finish;t&&m.push((()=>t(r.resource))),l.add(r.resource.path)}for(const r of t.resources.toAdd)if(e.paths.push(r.resource.path),c.has(r.resource.path))c.delete(r.resource.path);else{d.push({resource:r.resource,content:await(0,n.EN)(r.content),compress:r.compress});const e=r.finish;e&&m.push((()=>e(r.resource)))}if(d.length||f.length){const{addOrUpdateResources:e}=await Promise.resolve().then(r.bind(r,38240));await e(t.portalItem,d,"add",i),await e(t.portalItem,f,"update",i)}if(m.forEach((e=>e())),0===p.length)return c;const h=await(0,o.Ml)(p);if((0,o.wp)(i),h.length>0)throw new a.c("save:resources","Failed to save one or more resources",{errors:h});return c}async function l(e,t,r){if(!e||!t.portalItem)return;const a=[];for(const o of e){const e=t.portalItem.resourceFromPath(o);a.push(e.portalItem.removeResource(e,r))}await(0,o.Dv)(a)}},4424:(e,t,r)=>{r.d(t,{y:()=>n});var a=r(6220),o=r(20744),s=r(20572);function n(e){if(a.default.apiKey&&(0,s.s)(e.portal.url))throw new o.c("save-api-key-utils:api-key-not-supported",`Saving is not supported on ${e.portal.url} when using an api key`)}},13448:(e,t,r)=>{r.d(t,{W:()=>o,e:()=>n});var a=r(20744);async function o(e){const t=[];for(const r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){const e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}const s=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function n(e,t,r){let o=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:t,details:r})=>new a.c(e,t,r)));if(e.blockedRelativeUrls&&(o=o.concat(e.blockedRelativeUrls.map((e=>new a.c("url:unsupported",`Relative url '${e}' is not supported`))))),r){const{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:a}=r;e&&(o=o.filter((({name:e})=>!(s.has(e)||t.includes(e))))),a&&(o=o.filter((e=>"web-document-write:property-required"!==e.name)))}if(o.length>0)throw new a.c(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:o})}}}]);