@arcgis/core 4.27.0-rc.1 → 4.27.0-rc.2

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 (98) hide show
  1. package/README.md +2 -2
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{92e7f224a80195e606d6.js → 1f69fb9687de9ebfcf90.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{0a02ac5628d1739372c6.js → 2b55295590b4a0503749.js} +1 -1
  5. package/assets/esri/core/workers/chunks/471f6eba213412b82840.js +1 -0
  6. package/assets/esri/core/workers/chunks/{f339db2b599fa9585283.js → 5e6471dd2a08e66b47d0.js} +79 -81
  7. package/assets/esri/core/workers/chunks/{474d9b334812533bab36.js → 6cd248d065f6d1616294.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{d8bd3f498b3fa8153404.js → 6f510f28526c73ab453c.js} +1 -1
  9. package/assets/esri/core/workers/chunks/83e3d104886b48f00397.js +1 -0
  10. package/assets/esri/core/workers/chunks/{3c5a64a545272f148e93.js → 9621b7d8d951aa881686.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{b6e173eddaad4244cb5f.js → b31974524932e638df8c.js} +1 -1
  12. package/assets/esri/core/workers/chunks/da57eba2fe25495ea217.js +1 -0
  13. package/assets/esri/core/workers/chunks/dabd889e064c4e7807fa.js +1 -0
  14. package/assets/esri/core/workers/chunks/f35895e03c036d67b3ed.js +1 -0
  15. package/assets/esri/core/workers/chunks/{c6efe2e04ea6a55bb6e3.js → f6e68befe2812b90b40d.js} +1 -1
  16. package/assets/esri/themes/base/widgets/_Feature.scss +4 -0
  17. package/assets/esri/themes/base/widgets/_FeatureContent.scss +9 -2
  18. package/assets/esri/themes/base/widgets/_ScaleRangeSlider.scss +1 -0
  19. package/assets/esri/themes/dark/main.css +1 -1
  20. package/assets/esri/themes/light/main.css +1 -1
  21. package/assets/esri/themes/light/view.css +1 -1
  22. package/chunks/DefaultMaterial.glsl.js +3 -2
  23. package/chunks/ShadowCastAccumulate.glsl.js +1 -1
  24. package/core/timeUtils.js +1 -1
  25. package/geometry/Mesh.js +1 -1
  26. package/geometry/support/meshVertexSpaceUtils.js +5 -0
  27. package/interfaces.d.ts +179 -31
  28. package/kernel.js +1 -1
  29. package/layers/VideoLayer.js +1 -1
  30. package/layers/graphics/controllers/StreamController.js +1 -1
  31. package/layers/graphics/data/QueryEngine.js +1 -1
  32. package/layers/graphics/data/attributeSupport.js +1 -1
  33. package/layers/graphics/editingSupport.js +1 -1
  34. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  35. package/layers/video/VideoController.js +1 -1
  36. package/layers/video/videoUtils.js +5 -0
  37. package/package.json +1 -1
  38. package/rest/support/meshFeatureSet.js +1 -1
  39. package/smartMapping/symbology/flow.js +1 -1
  40. package/statistics/utils.js +1 -1
  41. package/support/revision.js +1 -1
  42. package/symbols/cim/CIMSymbolHelper.js +1 -1
  43. package/views/2d/layers/StreamLayerView2D.js +1 -1
  44. package/views/2d/layers/features/sources/StreamSource.js +1 -1
  45. package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
  46. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  47. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  48. package/views/3d/layers/I3SMeshView3D.js +1 -1
  49. package/views/3d/layers/II3SMeshView3D.js +1 -1
  50. package/views/3d/layers/SceneLayerView3D.js +1 -1
  51. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  52. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  53. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  54. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  55. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  56. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  57. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  58. package/views/3d/webgl-engine/core/renderPasses/AllRenderPasses.js +1 -1
  59. package/views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js +3 -9
  60. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +12 -9
  61. package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js +10 -10
  62. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +2 -2
  63. package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js +2 -2
  64. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +8 -8
  65. package/views/3d/webgl-engine/core/shaderModules/Matrix4sDrawUniform.js +1 -1
  66. package/views/3d/webgl-engine/lib/ShadowHighlight.js +1 -1
  67. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  68. package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
  69. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  70. package/views/3d/webgl-engine/materials/pbrUtils.js +1 -1
  71. package/views/3d/webgl-engine/shaders/AtmosphereCompositingTechnique.js +1 -1
  72. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  73. package/views/3d/webgl-engine/shaders/ShadowHighlightTechnique.js +1 -1
  74. package/views/draw/DrawGraphicTool.js +1 -1
  75. package/views/layers/GroupLayerView.js +1 -1
  76. package/widgets/Daylight/DaylightViewModel.js +1 -1
  77. package/widgets/Editor/EditorViewModel.js +1 -1
  78. package/widgets/Editor/UpdateWorkflow.js +1 -1
  79. package/widgets/Editor/Workflow.js +1 -1
  80. package/widgets/Editor/workflowUtils.js +1 -1
  81. package/widgets/Editor.js +1 -1
  82. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  83. package/widgets/Feature/FeatureRelationship.js +1 -1
  84. package/widgets/FeatureForm/EditableInput.d.ts +2 -2
  85. package/widgets/FeatureTable/FieldColumn.js +1 -1
  86. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  87. package/widgets/UtilityNetworkTrace/support/GeometryHandler.js +1 -1
  88. package/widgets/UtilityNetworkTrace/support/ResultAreaHandler.js +1 -1
  89. package/widgets/UtilityNetworkTrace.js +1 -1
  90. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
  91. package/widgets/UtilityNetworkValidateTopology.js +1 -1
  92. package/widgets/ValuePicker/ValuePickerBaseComponent.js +1 -1
  93. package/widgets/ValuePicker.js +1 -1
  94. package/assets/esri/core/workers/chunks/07651ef8348f702d59ac.js +0 -1
  95. package/assets/esri/core/workers/chunks/39714837f9d3708e3806.js +0 -1
  96. package/assets/esri/core/workers/chunks/785a6c925f29bc962992.js +0 -1
  97. package/assets/esri/core/workers/chunks/90da1ed112b82712d0ef.js +0 -1
  98. package/assets/esri/core/workers/chunks/b5fc6f2044ed047c5afd.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9771,6502],{41123:(e,t,r)=>{r.d(t,{D:()=>a,z:()=>n});const s="randomUUID"in crypto;function a(){if(s)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`{${a()}}`}},84470:(e,t,r)=>{r.d(t,{CP:()=>o,JG:()=>y,LL:()=>u,NZ:()=>l,fV:()=>f,vj:()=>g,yT:()=>F,zE:()=>b});var s=r(3172),a=r(67676),n=r(95330),i=r(2981);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,a.fS)(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.k_)(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,s.default)(this.partUrl,{responseType:"blob"});return(0,n.k_)(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 p=/^(model\/gltf\+json)|(model\/gltf-binary)$/,c=/\.(gltf|glb)/i;function h(e){if(e instanceof File){const{type:t,name:r}=e;return p.test(t)||c.test(r)}return p.test(e.assetMimeType)||c.test(e.assetName)}function y(e,t){if(!e)return!1;const{source:r}=e;return function(e,t){return Array.isArray(e)?e.every((e=>m(e,t))):m(e,t)}(r,t)}function f(e,t){if(e===t)return!0;const{source:r}=e,{source:s}=t;if(r===s)return!0;if(d(r)&&d(s)){if(r.length!==s.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...r].sort(e),a=[...s].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(a[e]))return!1;return!0}return!1}function m(e,t){return e instanceof o&&e.isOnService(t)}function g(e,t){return e instanceof File?(0,i.Ow)(e.name,t)??(0,i.S0)(e.type,t):(0,i.S0)(e.assetMimeType,t)??(0,i.Ow)(e.assetName,t)}function b(e){return Array.isArray(e)?e:[e]}function F(e){return!!e.original}},61159:(e,t,r)=>{r.d(t,{g:()=>s});const s={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,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}},14720:(e,t,r)=>{r.d(t,{Ey:()=>g,applyEdits:()=>b,aw:()=>f,uploadAssets:()=>A});var s=r(38171),a=r(46791),n=r(20102),i=r(22974),o=r(95330),u=r(81271),l=r(16306),d=r(66361),p=r(2981),c=r(84230);function h(e){return e&&null!=e.applyEdits}function y(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function f(e){return e.every(y)}function m(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function g(e){return e.every(m)}async function b(e,t,r,s={}){let u;if((0,d.lQ)(e)&&e.url)u=(0,d.jF)(e.url,e.layerId,"original-and-current-features"===s.returnServiceEditsOption);else{u=(0,o.hh)(),u.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:u.promise};e.emit("apply-edits",t)}try{const{results:o,edits:l}=await async function(e,t,r,s){if(await e.load(),!h(t))throw new n.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,c.ln)(e))throw new n.Z(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:o}=await async function(e,t,r){const s=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),i=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),o=null!=e.infoFor3D;if(!t||!s&&!i)throw new n.Z(`${e.type}-layer:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");const u=(0,c.S1)(e);if(!u.data.isVersioned&&r?.gdbVersion)throw new n.Z(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!u.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new n.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");if(!u.editing.supportsGlobalId&&r?.globalIdUsed)throw new n.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!u.editing.supportsGlobalId&&i)throw new n.Z(`${e.type}-layer:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!r?.globalIdUsed&&i)throw new n.Z(`${e.type}-layer:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true");const l={...r};if(null!=l.rollbackOnFailureEnabled||u.editing.supportsRollbackOnFailure||(l.rollbackOnFailureEnabled=!0),!1===l.rollbackOnFailureEnabled&&"original-and-current-features"===l.returnServiceEditsOption)throw new n.Z(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true.");if(!u.editing.supportsReturnServiceEditsInSourceSpatialReference&&l.returnServiceEditsInSourceSR)throw new n.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(l.returnServiceEditsInSourceSR&&"original-and-current-features"!==l.returnServiceEditsOption)throw new n.Z(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const d={...t};if(d.addFeatures=t&&a.Z.isCollection(t.addFeatures)?t.addFeatures.toArray():d.addFeatures||[],d.updateFeatures=t&&a.Z.isCollection(t.updateFeatures)?t.updateFeatures.toArray():d.updateFeatures||[],d.deleteFeatures=t&&a.Z.isCollection(t.deleteFeatures)?t.deleteFeatures.toArray():d.deleteFeatures||[],d.addFeatures.length&&!u.operations.supportsAdd)throw new n.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support adding features.");if(d.updateFeatures.length&&!u.operations.supportsUpdate)throw new n.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support updating features.");if(d.deleteFeatures.length&&!u.operations.supportsDelete)throw new n.Z(`${e.type}-layer:unsupported-operation`,"Layer does not support deleting features.");d.addAttachments=d.addAttachments||[],d.updateAttachments=d.updateAttachments||[],d.deleteAttachments=d.deleteAttachments||[],d.addFeatures=d.addFeatures.map(_),d.updateFeatures=d.updateFeatures.map(_),d.addAssetFeatures=[];const h=r?.globalIdUsed||o;return d.addFeatures.forEach((t=>function(e,t,r){F(e,t,r)}(t,e,h))),d.updateFeatures.forEach((t=>function(e,t,r){F(e,t,r);const s=(0,c.S1)(t);if("geometry"in e&&null!=e.geometry&&!s?.editing.supportsGeometryUpdate)throw new n.Z(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,h))),d.deleteFeatures.forEach((t=>function(e,t,r){F(e,t,r)}(t,e,h))),d.addAttachments.forEach((t=>w(t,e))),d.updateAttachments.forEach((t=>w(t,e))),o&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,s=(0,p.S0)("model/gltf-binary",r.supportedFormats)??(0,p.Ow)("glb",r.supportedFormats);if(!s||!r.editFormats.includes(s))throw new n.Z(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:a}=e;for(const t of e.addFeatures??[])R(t)&&a.push(t);for(const t of e.updateFeatures??[])R(t)&&a.push(t)}(d,e),{edits:await S(d),options:l}}(e,r,s);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,o)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,r,s),d=e=>e.filter((e=>!e.error)).map(i.d9),y={edits:l,addedFeatures:d(o.addFeatureResults),updatedFeatures:d(o.updateFeatureResults),deletedFeatures:d(o.deleteFeatureResults),addedAttachments:d(o.addAttachmentResults),updatedAttachments:d(o.updateAttachmentResults),deletedAttachments:d(o.deleteAttachmentResults),exceededTransferLimit:!1};return o.editedFeatureResults?.length&&(y.editedFeatures=o.editedFeatureResults),u.resolve(y),o}catch(e){throw u.reject(e),e}}function F(e,t,r){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new n.Z(`${t.type}-layer:invalid-parameter`,"Feature should have 'globalId' when 'globalIdUsed' is true");if(!("attributes"in e)&&!e.globalId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"'globalId' of the feature should be passed when 'globalIdUsed' is true")}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new n.Z(`${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.Z(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function w(e,t){const{feature:r,attachment:s}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!s.globalId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!s.data&&!s.uploadId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(s.data instanceof File&&s.data.name||s.name))throw new n.Z(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&s.uploadId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof s.data){const e=(0,u.sJ)(s.data);if(e&&!e.isBase64)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function S(e){const t=e.addFeatures??[],r=e.updateFeatures??[],s=t.concat(r).map((e=>e.geometry)),a=await(0,l.aX)(s),n=t.length,i=r.length;return a.slice(0,n).forEach(((e,r)=>t[r].geometry=e)),a.slice(n,n+i).forEach(((e,t)=>r[t].geometry=e)),e}function _(e){const t=new s.Z;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function R(e){return"mesh"===e?.geometry?.type}function A(e,t,r,s){if(!h(t))throw new n.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new n.Z(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,s)}},6502:(e,t,r)=>{r.r(t),r.d(t,{default:()=>J});var s=r(43697),a=(r(66577),r(38171)),n=r(40330),i=r(3172),o=r(92835),u=r(67676),l=r(20102),d=r(80442),p=r(35454),c=r(83379),h=r(92604),y=r(78286),f=r(95330),m=r(67900),g=r(81271),b=r(41123),F=r(5600),w=(r(75215),r(52011)),S=r(6570),_=r(44547),R=r(33955),A=r(84470),v=r(14720),O=r(25278),I=r(49735),E=r(66677),x=r(2981),q=r(4967),C=r(59431),Z=r(14165),T=r(82971);const P=new p.X({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),D=new Set(["Feature Layer","Table"]),N=new p.X({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let G=class extends c.Z{constructor(){super(...arguments),this.type="feature-layer",this.refresh=(0,f.Ds)((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=null!=e?e.signal:null,r=this.layer.sourceJSON;return this.addResolvingPromise(this._fetchService(r,t)),Promise.resolve(this)}get queryTask(){const{capabilities:e,parsedUrl:t,dynamicDataSource:r,infoFor3D:s,gdbVersion:a,spatialReference:n,fieldsIndex:i}=this.layer,o=(0,d.Z)("featurelayer-pbf")&&e?.query.supportsFormatPBF&&null==s,u=e?.operations?.supportsQueryAttachments??!1;return new I.Z({url:t.path,pbfSupported:o,fieldsIndex:i,infoFor3D:s,dynamicDataSource:r,gdbVersion:a,sourceSpatialReference:n,queryAttachmentsSupported:u})}async addAttachment(e,t){await this.load();const r=e.attributes[this.layer.objectIdField],s=this.layer.parsedUrl.path+"/"+r+"/addAttachment",a=this._getLayerRequestOptions(),n=this._getFormDataForAttachment(t,a.query);try{const e=await(0,i.default)(s,{body:n});return this._createFeatureEditResult(e.data.addAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(r,e)}}async updateAttachment(e,t,r){await this.load();const s=e.attributes[this.layer.objectIdField],a=this.layer.parsedUrl.path+"/"+s+"/updateAttachment",n=this._getLayerRequestOptions({query:{attachmentId:t}}),o=this._getFormDataForAttachment(r,n.query);try{const e=await(0,i.default)(a,{body:o});return this._createFeatureEditResult(e.data.updateAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(s,e)}}async applyEdits(e,t){await this.load();const{layer:r}=this,s=r.infoFor3D,a=null!=s,o=a||(t?.globalIdUsed??!1),l=e.addFeatures?.map((e=>this._getFeatureJSON(e,s)))??[],d=(await Promise.all(l)).filter(u.pC),p=e.updateFeatures?.map((e=>this._getFeatureJSON(e,s)))??[],c=(await Promise.all(p)).filter(u.pC),h=this._getFeatureIds(e.deleteFeatures,o);(0,C.P)(d,c,r.spatialReference);const y=await this._getAttachmentEditsJSON(e),f=a?await this._uploadMeshesAndGetAssetMapEditsJSON(e):null,m=r.capabilities.editing.supportsAsyncApplyEdits&&null!=f&&(0!==f.adds.length||0!==f.updates.length),g={gdbVersion:t?.gdbVersion||r.gdbVersion,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:o,returnEditMoment:t?.returnEditMoment,usePreviousEditMoment:t?.usePreviousEditMoment,sessionId:t?.sessionId,async:m};t?.returnServiceEditsOption?(g.edits=JSON.stringify([{id:r.layerId,adds:d,updates:c,deletes:h,attachments:y,assetMaps:f}]),g.returnServiceEditsOption=P.toJSON(t?.returnServiceEditsOption),g.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(g.adds=d.length?JSON.stringify(d):null,g.updates=c.length?JSON.stringify(c):null,g.deletes=h.length?o?JSON.stringify(h):h.join(","):null,g.attachments=y&&JSON.stringify(y),g.assetMaps=null!=f?JSON.stringify(f):void 0);const b=this._getLayerRequestOptions({method:"post",query:g}),F=t?.returnServiceEditsOption?r.url:r.parsedUrl.path,w=m?await this._asyncApplyEdits(F+"/applyEdits",b):await(0,i.default)(F+"/applyEdits",b);if(!r.capabilities.operations?.supportsEditing&&r.effectiveCapabilities?.operations?.supportsEditing){const e=n.id?.findCredential(r.url);await(e?.refreshToken())}return this._createEditsResult(w)}async deleteAttachments(e,t){await this.load();const r=e.attributes[this.layer.objectIdField],s=this.layer.parsedUrl.path+"/"+r+"/deleteAttachments";try{return(await(0,i.default)(s,this._getLayerRequestOptions({query:{attachmentIds:t.join(",")},method:"post"}))).data.deleteAttachmentResults.map(this._createFeatureEditResult)}catch(e){throw this._createAttachmentErrorResult(r,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:s}=this.layer,{data:a}=await(0,i.default)(`${s}/${r}`,t),{id:n,extent:u,fullExtent:l,timeExtent:d}=a,p=u||l;return{id:n,fullExtent:p&&S.Z.fromJSON(p),timeExtent:d&&o.Z.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){return await this.load(),this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)})}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,E.M8)(this.layer.url))return"unavailable";const e=(0,g.v_)(this.layer.url,"status"),t=await(0,i.default)(e,{query:{f:"json"}});return N.fromJSON(t.data.status)}async uploadAssets(e,t){const{uploadAssets:s}=await r.e(6946).then(r.bind(r,36946));return s(e,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},t)}async _asyncApplyEdits(e,t){const r=(await(0,i.default)(e,t)).data.statusUrl;for(;;){const e=(await(0,i.default)(r,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return(0,i.default)(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new l.Z("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 l.Z("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,f.e4)(M)}}_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{data:r}=await(0,i.default)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:(0,d.Z)("featurelayer-advanced-symbols")?{returnAdvancedSymbols:!0}:{},signal:t}));e=r}this.sourceJSON=this._patchServiceJSON(e);const r=e.type;if(!D.has(r))throw new l.Z("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}_patchServiceJSON(e){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){const t=(0,O.bU)(e.geometryType).renderer;(0,y.RB)("drawingInfo.renderer",t,e)}return"esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),e}async _getFeatureJSON(e,t){const{geometry:r}=e,s={...e.attributes};if(null!=t&&"mesh"===r?.type){const{transformFieldRoles:e}=t,{origin:a,spatialReference:n,transform:i}=r,o=this.layer.spatialReference;await(0,_.iQ)(n,o);const u=(0,_.iV)(a,o);if(s[e.originX]=u.x,s[e.originY]=u.y,s[e.originZ]=u.z??0,null!=i){const{translation:t,scale:a,rotation:u}=i,{vertexSpace:l}=r,d=l.isGeoreferenced?1:(0,m.r6)(n)/(0,m.r6)(o);s[e.translationX]=t[0]*d,s[e.translationY]=-t[2]*d,s[e.translationZ]=t[1]*d,s[e.scaleX]=a[0],s[e.scaleY]=a[2],s[e.scaleZ]=a[1],s[e.rotationX]=u[0],s[e.rotationY]=u[2],s[e.rotationZ]=u[1],s[e.rotationDeg]=u[3]}return{geometry:null,attributes:s}}return null==r?{attributes:s}:"mesh"===r.type||"extent"===r.type?null:{geometry:r.toJSON(),attributes:s}}async _getAttachmentEditsJSON(e){const t=await Promise.all((e.addAttachments??[]).map((e=>this._getAttachmentEditJSON(e)))),r=await Promise.all((e.updateAttachments??[]).map((e=>this._getAttachmentEditJSON(e)))),s=e.deleteAttachments??[];return t.length||r.length||s.length?{adds:t,updates:r,deletes:[...s]}:null}async _getAttachmentEditJSON(e){const{feature:t,attachment:r}=e,{globalId:s,name:a,contentType:n,data:i,uploadId:o}=r,u={globalId:s,parentGlobalId:null,contentType:null,name:null,uploadId:null,data:null};if(t&&(u.parentGlobalId="attributes"in t?t.attributes&&t.attributes[this.layer.globalIdField]:t.globalId),o)u.uploadId=o;else if(i){const e=await(0,g.IR)(i);e&&(u.contentType=e.mediaType,u.data=e.data),i instanceof File&&(u.name=i.name)}return a&&(u.name=a),n&&(u.contentType=n),u}async _uploadMeshesAndGetAssetMapEditsJSON(e){const{addAssetFeatures:t}=e;if(!t?.length)return null;const r=await this._filterRedundantAssetMaps(t);if(!t?.length)return null;const s=r.map((e=>e.geometry));return await this.uploadAssets(s),{adds:this._getAssetMapEditsJSON(r),updates:[],deletes:[]}}_getAssetMapEditsJSON(e){const t=new Array,r=this.layer.globalIdField,s=this.layer.parsedUrl;for(const a of e){const e=a.geometry,{metadata:n}=e,i=n.getExternalSourcesOnService(s),o=a.getAttribute(r);if(0===i.length){h.Z.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(A.yT)??i[0],{vertexSpace:l}=e,d=l.isGeoreferenced?["PROJECT_VERTICES"]:[];for(const e of u)1===e.parts.length?t.push({globalId:(0,b.z)(),parentGlobalId:o,assetName:e.assetName,assetHash:e.parts[0].partHash,flags:d}):h.Z.getLogger(this).error(`Skipping asset ${e.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return t}_getFeatureIds(e,t){if(!e||0===e.length)return[];if(t&&(0,v.Ey)(e))return e.map((e=>e.globalId));if((0,v.aw)(e))return e.map((e=>e.objectId));const{layer:r}=this,s=t?r.globalIdField:r.objectIdField;return s?e.map((e=>e.getAttribute(s))):[]}_createEditsResult(e){const t=e.data,{layerId:r}=this.layer,s=[];let a=null;if(Array.isArray(t))for(const e of t)s.push({id:e.id,editedFeatures:e.editedFeatures}),e.id===r&&(a={addResults:e.addResults??[],updateResults:e.updateResults??[],deleteResults:e.deleteResults??[],attachments:e.attachments,editMoment:e.editMoment});else a=t;const n=a?.assetMaps;if(n){for(const e of n.addResults)e.success||h.Z.getLogger(this).error(`Failed to map asset to feature with globalId ${e.globalId}.`);for(const e of n.updateResults)e.success||h.Z.getLogger(this).error(`Failed to map asset to feature with globalId ${e.globalId}.`)}const i=a?.attachments,o={addFeatureResults:a?.addResults?.map(this._createFeatureEditResult,this)??[],updateFeatureResults:a?.updateResults?.map(this._createFeatureEditResult,this)??[],deleteFeatureResults:a?.deleteResults?.map(this._createFeatureEditResult,this)??[],addAttachmentResults:i&&i.addResults?i.addResults.map(this._createFeatureEditResult,this):[],updateAttachmentResults:i&&i.updateResults?i.updateResults.map(this._createFeatureEditResult,this):[],deleteAttachmentResults:i&&i.deleteResults?i.deleteResults.map(this._createFeatureEditResult,this):[]};if(a?.editMoment&&(o.editMoment=a.editMoment),s.length>0){o.editedFeatureResults=[];for(const e of s){const{editedFeatures:t}=e,r=t?.spatialReference?new T.Z(t.spatialReference):null;o.editedFeatureResults.push({layerId:e.id,editedFeatures:{adds:t?.adds?.map((e=>this._createEditedFeature(e,r)))||[],updates:t?.updates?.map((e=>({original:this._createEditedFeature(e[0],r),current:this._createEditedFeature(e[1],r)})))||[],deletes:t?.deletes?.map((e=>this._createEditedFeature(e,r)))||[],spatialReference:r}})}}return o}_createEditedFeature(e,t){return new a.Z({attributes:e.attributes,geometry:(0,R.im)({...e.geometry,spatialReference:t})})}_createFeatureEditResult(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 l.Z("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_createAttachmentErrorResult(e,t){const r=t.details.messages&&t.details.messages[0]||t.message,s=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new l.Z("feature-layer-source:attachment-failure",r,{code:s})}}_getFormDataForAttachment(e,t){const r=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(r)for(const e in t){const s=t[e];null!=s&&(r.set?r.set(e,s):r.append(e,s))}return r}_getLayerRequestOptions(e={}){const{parsedUrl:t,gdbVersion:r,dynamicDataSource:s}=this.layer;return{...e,query:{gdbVersion:r,layer:s?JSON.stringify({source:s}):void 0,...t.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}async _filterRedundantAssetMaps(e){const{layer:t}=this,{globalIdField:r,infoFor3D:s,parsedUrl:a}=t;if(null==s||null==r)return e;const n=(0,x.$6)(s);if(null==n)return e;const i=(0,g.v_)(a.path,`../${n.id}`),o=new Array,l=new Array;for(const t of e)t.geometry.metadata.getExternalSourcesOnService(a).length>0?l.push(t):o.push(t);const d=l.map((e=>e.getAttribute(r))).filter(u.pC);if(0===d.length)return e;const{assetMapFieldRoles:{parentGlobalId:p,assetHash:c}}=s,h=new Z.Z;h.where=`${p} IN (${d.map((e=>`'${e}'`))})`,h.outFields=[c,p],h.returnGeometry=!1;const y=await(0,q.e)(i,h),{features:f}=y;return 0===f.length?e:[...o,...l.filter((e=>{const t=e.getAttribute(r);if(!t)return!0;const{metadata:s}=e.geometry,n=f.filter((e=>e.getAttribute(p)===t));if(0===n.length)return!0;const i=n.map((e=>e.getAttribute(c)));return s.getExternalSourcesOnService(a).flatMap((({source:e})=>e.flatMap((e=>e.parts.map((e=>e.partHash)))))).some((e=>i.every((t=>e!==t))))}))]}};(0,s._)([(0,F.Cb)()],G.prototype,"type",void 0),(0,s._)([(0,F.Cb)({constructOnly:!0})],G.prototype,"layer",void 0),(0,s._)([(0,F.Cb)({readOnly:!0})],G.prototype,"queryTask",null),G=(0,s._)([(0,w.j)("esri.layers.graphics.sources.FeatureLayerSource")],G);const M=1e3,J=G},49735:(e,t,r)=>{r.d(t,{Z:()=>R});var s=r(43697),a=r(92036),n=r(20102),i=r(80442),o=r(95330),u=r(81271),l=r(5600),d=(r(75215),r(67676),r(52011)),p=r(2981),c=r(10158),h=r(11282),y=r(41818),f=(r(66577),r(34599)),m=r(14165),g=r(6570),b=r(5396),F=r(4967),w=r(53261),S=r(74889);let _=class extends a.Z{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.queryAttachmentsSupported=!1,this.sourceSpatialReference=null,this.url=null}get parsedUrl(){return(0,u.mN)(this.url)}async execute(e,t){const r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){const r=this._normalizeQuery(e),s=null!=e.outStatistics?.[0],a=(0,i.Z)("featurelayer-pbf-statistics"),n=!s||a;let o;if(this.pbfSupported&&n)try{o=await(0,w.t)(this.url,r,t)}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.pbfSupported=!1}return this.pbfSupported&&n||(o=await(0,F.F)(this.url,r,t)),this._normalizeFields(o.fields),o}async featureSetFromJSON(e,t,s){if(!this._queryIs3DObjectFormat(e)||null==this.infoFor3D||!t.features)return S.Z.fromJSON(t);const{meshFeatureSetFromJSON:a}=await(0,o.Hl)(Promise.all([r.e(6481),r.e(6459),r.e(1681)]).then(r.bind(r,91681)),s);return a(e,this.infoFor3D,t)}executeForCount(e,t){return(0,y.P)(this.url,this._normalizeQuery(e),t)}executeForExtent(e,t){return async function(e,t,r){const s=(0,h.en)(e);return(0,f.Vr)(s,m.Z.from(t),{...r}).then((e=>({count:e.data.count,extent:g.Z.fromJSON(e.data.extent)})))}(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return(0,b.G)(this.url,this._normalizeQuery(e),t)}async executeRelationshipQuery(e,t){const[{default:s},{executeRelationshipQuery:a}]=await(0,o.Hl)(Promise.all([r.e(5935).then(r.bind(r,75935)),r.e(1073).then(r.bind(r,81073))]),t);return e=s.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),a(this.url,e,t)}async executeRelationshipQueryForCount(e,t){const[{default:s},{executeRelationshipQueryForCount:a}]=await(0,o.Hl)(Promise.all([r.e(5935).then(r.bind(r,75935)),r.e(1073).then(r.bind(r,81073))]),t);return e=s.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),a(this.url,e,t)}async executeAttachmentQuery(e,t){const{executeAttachmentQuery:s,fetchAttachments:a,processAttachmentQueryResult:n}=await(0,o.Hl)(r.e(540).then(r.bind(r,30540)),t),i=(0,h.en)(this.url);return n(i,await(this.queryAttachmentsSupported?s(i,e,t):a(i,e,t)))}async executeTopFeaturesQuery(e,t){const{executeTopFeaturesQuery:s}=await(0,o.Hl)(r.e(1158).then(r.bind(r,71158)),t);return s(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){const{executeForTopIds:s}=await(0,o.Hl)(r.e(3992).then(r.bind(r,33992)),t);return s(this.parsedUrl,e,t)}async executeForTopExtents(e,t){const{executeForTopExtents:s}=await(0,o.Hl)(r.e(1790).then(r.bind(r,21790)),t);return s(this.parsedUrl,e,t)}async executeForTopCount(e,t){const{executeForTopCount:s}=await(0,o.Hl)(r.e(4371).then(r.bind(r,14371)),t);return s(this.parsedUrl,e,t)}_normalizeQuery(e){let t=m.Z.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?c.n.from(e.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this;if(null!=r&&this._queryIs3DObjectFormat(e)){t=t===e?t.clone():t,t.formatOf3DObjects=null;const{supportedFormats:s,queryFormats:a}=r,i=(0,p.S0)("model/gltf-binary",s)??(0,p.Ow)("glb",s),o=(0,p.S0)("model/gltf+json",s)??(0,p.Ow)("gtlf",s);for(const e of a){if(e===i){t.formatOf3DObjects=e;break}e!==o||t.formatOf3DObjects||(t.formatOf3DObjects=e)}if(!t.formatOf3DObjects)throw new n.Z("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(null==t.outFields||!t.outFields.includes("*")){t=t===e?t.clone():t,null==t.outFields&&(t.outFields=[]);const{originX:s,originY:a,originZ:n,translationX:i,translationY:o,translationZ:u,scaleX:l,scaleY:d,scaleZ:p,rotationX:c,rotationY:h,rotationZ:y,rotationDeg:f}=r.transformFieldRoles;t.outFields.push(s,a,n,i,o,u,l,d,p,c,h,y,f)}}return t}_normalizeFields(e){if(null!=this.fieldsIndex&&null!=e)for(const t of e){const e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryIs3DObjectFormat(e){return null!=this.infoFor3D&&!0===e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}};(0,s._)([(0,l.Cb)({type:c.n})],_.prototype,"dynamicDataSource",void 0),(0,s._)([(0,l.Cb)()],_.prototype,"fieldsIndex",void 0),(0,s._)([(0,l.Cb)()],_.prototype,"gdbVersion",void 0),(0,s._)([(0,l.Cb)()],_.prototype,"infoFor3D",void 0),(0,s._)([(0,l.Cb)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,s._)([(0,l.Cb)()],_.prototype,"pbfSupported",void 0),(0,s._)([(0,l.Cb)()],_.prototype,"queryAttachmentsSupported",void 0),(0,s._)([(0,l.Cb)()],_.prototype,"sourceSpatialReference",void 0),(0,s._)([(0,l.Cb)({type:String})],_.prototype,"url",void 0),_=(0,s._)([(0,d.j)("esri.tasks.QueryTask")],_);const R=_},25278:(e,t,r)=>{r.d(t,{Dm:()=>d,Hq:()=>p,MS:()=>c,bU:()=>o});var s=r(80442),a=r(22974),n=r(61159),i=r(58333);function o(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?i.I4:"esriGeometryPolyline"===e?i.ET:i.lF}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function d(e,t){if((0,s.Z)("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 s=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function p(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,a.d9)(e)}}]}function c(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},query:n.g,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}}}},2981:(e,t,r)=>{r.d(t,{$6:()=>d,Ow:()=>n,S0:()=>a,d1:()=>i});const s=[["binary","application/octet-stream","bin",""]];function a(e,t){return u(function(e,t){return o(t).find((t=>l(t)===e))}(e,t))}function n(e,t){return u(function(e,t){const r=e.toLowerCase();return o(t).find((e=>function(e){return e?.[2].split(",")??[]}(e).some((e=>r.endsWith(e)))))}(e,t))}function i(e,t){return l(function(e,t){return o(t).find((t=>u(t)===e))}(e,t))}function o(e){return[...s,...e]}function u(e){return e?.[0]}function l(e){return e?.[1]}function d(e){return e.tables?.find((e=>"assetMaps"===e.role))}},41818:(e,t,r)=>{r.d(t,{P:()=>i});var s=r(11282),a=r(34599),n=r(14165);async function i(e,t,r){const i=(0,s.en)(e);return(0,a.hH)(i,n.Z.from(t),{...r}).then((e=>e.data.count))}},5396:(e,t,r)=>{r.d(t,{G:()=>i});var s=r(11282),a=r(34599),n=r(14165);async function i(e,t,r){const i=(0,s.en)(e);return(0,a.Ev)(i,n.Z.from(t),{...r}).then((e=>e.data.objectIds))}},4967:(e,t,r)=>{r.d(t,{F:()=>u,e:()=>o});var s=r(11282),a=r(34599),n=r(74889),i=r(14165);async function o(e,t,r){const s=await u(e,t,r);return n.Z.fromJSON(s)}async function u(e,t,r){const n=(0,s.en)(e),o={...r},u=i.Z.from(t),{data:l}=await(0,a.JT)(n,u,u.sourceSpatialReference,o);return l}},53261:(e,t,r)=>{r.d(t,{t:()=>m});var s=r(11282),a=r(70586),n=r(69285),i=r(98732);function o(e,t){return t}function u(e,t,r,s){switch(r){case 0:return c(e,t+s,0);case 1:return"lowerLeft"===e.originPosition?c(e,t+s,1):function({translate:e,scale:t},r,s){return e[s]-r*t[s]}(e,t+s,1)}}function l(e,t,r,s){return 2===r?c(e,t,2):u(e,t,r,s)}function d(e,t,r,s){return 2===r?c(e,t,3):u(e,t,r,s)}function p(e,t,r,s){return 3===r?c(e,t,3):l(e,t,r,s)}function c({translate:e,scale:t},r,s){return e[s]+r*t[s]}class h{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=o,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,n.k)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(null!=t)for(const r of e.features)t(r.geometry)}createSpatialReference(){return{}}addField(e,t){const r=e.fields;(0,a.O3)(r),r.push(t);const s=r.map((e=>e.name));this._attributesConstructor=function(){for(const e of s)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this._transform=e.transform,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++,e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,r){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:r,queryGeometryType:s}=t,a=(0,i.$g)(r.clone(),r,!1,!1,this._transform),n=(0,i.di)(a,s,!1,!1);e.queryGeometryType=s,e.queryGeometry={...n}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){const s=(0,a.s3)(this._transform,"transform");switch(t=this._applyTransform(s,t,r,0),r){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let r=0;t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const s=(0,a.s3)(this._transform,"transform");return this._applyTransform(s,e,t,r)}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const s=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(s)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,r){0===r&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const s=this._transformPathLikeValue(t,r),a=e[e.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),a.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=s}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?p:t?l:r?d:u}}var y=r(34599),f=(r(74889),r(14165));async function m(e,t,r){const a=(0,s.en)(e),n={...r},i=f.Z.from(t),o=!i.quantizationParameters,{data:u}=await(0,y.qp)(a,i,new h({sourceSpatialReference:i.sourceSpatialReference,applyTransform:o}),n);return u}},59431:(e,t,r)=>{r.d(t,{P:()=>i});var s=r(67900),a=r(8744);function n(e,t,r){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=r)}function i(e,t,r){if(!e&&!t||!r)return;const a=(0,s._R)(r);o(e,r,a),o(t,r,a)}function o(e,t,r){if(e)for(const s of e)u(s.geometry,t,r)}function u(e,t,r){if(null==e||!e.spatialReference||(0,a.fS)(e.spatialReference,t))return;const i=(0,s._R)(e.spatialReference)/r;if(1!==i)if("x"in e)null!=e.z&&(e.z*=i);else if("rings"in e)n(e,e.rings,i);else if("paths"in e)n(e,e.paths,i);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=i)}},28694:(e,t,r)=>{r.d(t,{p:()=>a});var s=r(69285);function a(e,t,r){if(!r||!r.features||!r.hasZ)return;const a=(0,s.k)(r.geometryType,t,e.outSpatialReference);if(null!=a)for(const e of r.features)a(e.geometry)}},74889:(e,t,r)=>{r.d(t,{Z:()=>F});var s,a=r(43697),n=r(66577),i=r(38171),o=r(35454),u=r(96674),l=r(22974),d=r(5600),p=(r(75215),r(71715)),c=r(52011),h=r(30556),y=r(82971),f=r(33955),m=r(1231);const g=new o.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=s=class extends u.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=y.Z.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const a=e[t],n=i.Z.fromJSON(a),o=a.geometry&&a.geometry.spatialReference;null==n.geometry||o||(n.geometry.spatialReference=r);const u=a.aggregateGeometries,l=n.aggregateGeometries;if(u&&null!=l)for(const e in l){const t=l[e],s=u[e],a=s?.spatialReference;null==t||a||(t.spatialReference=r)}s.push(n)}return s}writeGeometryType(e,t,r,s){if(e)return void g.write(e,t,r,s);const{features:a}=this;if(a)for(const e of a)if(e&&null!=e.geometry)return void g.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,f.im)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=y.Z.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,l.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const s=t.features[r];if(s.geometry){const t=e&&e[r];s.geometry=t&&t.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,a]}=e,n=this.features,i=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((a-e)/r)));for(let e=0,t=n.length;e<t;e++)i?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[s,a],scale:[n,i]}=r;let o=null,u=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;o=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;u=r=>null==r?r:r*t+e}const l=this._getHydrationFunction(e,(e=>e*n+s),(e=>a-e*i),o,u);for(const{geometry:e}of t)null!=e&&l&&l(e);return this.transform=null,this}_quantizePoints(e,t,r){let s,a;const n=[];for(let i=0,o=e.length;i<o;i++){const o=e[i];if(i>0){const e=t(o[0]),i=r(o[1]);e===s&&i===a||(n.push([e-s,i-a]),s=e,a=i)}else s=t(o[0]),a=r(o[1]),n.push([s,a])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,f.oU)(e)?e.rings:e.paths,a=[];for(let e=0,n=s.length;e<n;e++){const n=s[e],i=this._quantizePoints(n,t,r);i&&a.push(i)}return a.length>0?((0,f.oU)(e)?e.rings=a:e.paths=a,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,s,a){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,f.oU)(e)?e.rings:e.paths;let i,o;for(let e=0,s=n.length;e<s;e++){const s=n[e];for(let e=0,a=s.length;e<a;e++){const a=s[e];e>0?(i+=a[0],o+=a[1]):(i=a[0],o=a[1]),a[0]=t(i),a[1]=r(o)}}if(s&&a)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2]),r[3]=a(r[3])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}else if(a)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=a(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),a&&null!=e.mmax&&null!=e.mmin&&(e.mmax=a(e.mmax),e.mmin=a(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let i,o;for(let e=0,s=n.length;e<s;e++){const s=n[e];e>0?(i+=s[0],o+=s[1]):(i=s[0],o=s[1]),s[0]=t(i),s[1]=r(o)}if(s&&a)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2]),t[3]=a(t[3])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}else if(a)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=a(t[2])}}:null}};(0,a._)([(0,d.Cb)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,a._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,a._)([(0,d.Cb)({type:[i.Z],json:{write:!0}})],b.prototype,"features",void 0),(0,a._)([(0,p.r)("features")],b.prototype,"readFeatures",null),(0,a._)([(0,d.Cb)({type:[m.Z],json:{write:!0}})],b.prototype,"fields",void 0),(0,a._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],b.prototype,"geometryType",void 0),(0,a._)([(0,h.c)("geometryType")],b.prototype,"writeGeometryType",null),(0,a._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,a._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,a._)([(0,d.Cb)({types:n.qM,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,a._)([(0,p.r)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,a._)([(0,d.Cb)({type:y.Z,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,a._)([(0,h.c)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,a._)([(0,d.Cb)({json:{write:!0}})],b.prototype,"transform",void 0),b=s=(0,a._)([(0,c.j)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0;const F=b}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9238],{19238:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ge});var i=r(43697),s=r(51773),o=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423)),n=r(32400),a=r(3172),l=r(9790),u=r(2368),d=r(46791),p=r(20102),c=r(61247),y=r(22974),h=r(92604),f=r(70586),b=r(16453),m=r(78286),g=r(95330),w=r(42033),_=r(81271),v=r(5600),S=r(90578),C=r(71715),F=r(52011),I=r(30556),j=r(55343),T=r(82971),E=r(87085),R=(r(66577),r(38171)),x=r(3920),D=r(80442),O=r(83379),M=r(609),q=r(78346),P=r(75215),Z=(r(67676),r(52421)),L=r(59431),N=r(28694),G=r(74889),k=r(6570),A=r(38913),B=r(86973);let J=0;const V="esri.layers.graphics.sources.MemorySource",U=h.Z.getLogger(V);let Q=class extends(O.Z.LoadableMixin((0,M.v)((0,x.p)(d.Z)))){constructor(e){super(e),this._idToClientGraphic=null,this.type="memory"}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}get _workerGeometryType(){const e=this.layer?.geometryType;return e?this._geometryTypeRequiresClientGraphicMapping(e)?"polygon":e:null}applyEdits(e){return this.load().then((()=>this._applyEdits(e)))}openPorts(){return this.load().then((()=>this._connection.openPorts()))}async queryFeatures(e,t={}){await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);(0,N.p)(e,this.layer.spatialReference,r);const i=G.Z.fromJSON(r);if(!this._requiresClientGraphicMapping())return i;const s=this.layer.objectIdField;for(const e of i.features){const t=e.attributes[s],r=this._idToClientGraphic.get(t);r&&(e.geometry=r.geometry)}return i.geometryType=this.layer.geometryType,i}async queryFeaturesJSON(e,t={}){if(this._requiresClientGraphicMapping())throw new p.Z("query-features-json:unsupported","Cannot query in JSON format for client only geometry types (mesh and extent)");await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);return(0,N.p)(e,this.layer.spatialReference,r),r}queryFeatureCount(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t)))}queryObjectIds(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t)))}queryExtent(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t))).then((e=>({count:e.count,extent:k.Z.fromJSON(e.extent)})))}querySnapping(e,t={}){return this.load(t).then((()=>this._connection.invoke("querySnapping",e,t)))}async _applyEdits(e){if(!this._connection)throw new p.Z("feature-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField;let r=null;const i=[],s=[];await Promise.all([this._prepareClientMapping(e.addFeatures,null),this._prepareClientMapping(e.updateFeatures,null)]);const o=e=>"objectId"in e&&null!=e.objectId?e.objectId:"attributes"in e&&null!=e.attributes[t]?e.attributes[t]:null;if(e.addFeatures&&(r=this._prepareAddFeatures(e.addFeatures)),e.deleteFeatures)for(const t of e.deleteFeatures){const e=o(t);null!=e&&i.push(e)}const n=e.updateFeatures&&this._idToClientGraphic?new Map:null;if(e.updateFeatures)for(const t of e.updateFeatures)if(s.push(this._serializeFeature(t)),n){const e=o(t);null!=e&&n.set(e,t)}(0,L.P)(r?r.features:null,s,this.layer.spatialReference);const{fullExtent:a,featureEditResults:l}=await this._connection.invoke("applyEdits",{adds:r?r.features:[],updates:s,deletes:i});return this.fullExtent=a,r&&r.finish(l.uidToObjectId),this._updateClientGraphicIds(n,l),this._createEditsResult(l)}async _prepareClientMapping(e,t){if("mesh"!==this._layerOrSourceGeometryType||null==e)return;const r=[];for(const{geometry:i}of e)null==i||"mesh"!==i.type||i.hasExtent||i.loaded||r.push(i.load({signal:t}));r.length&&await Promise.all(r)}_updateClientGraphicIds(e,t){if(this._idToClientGraphic){if(e)for(const r of t.updateResults){if(!r.success)continue;const t=e.get(r.objectId);null!=t&&this._addIdToClientGraphic(t)}for(const e of t.deleteResults)e.success&&this._idToClientGraphic.delete(e.objectId)}}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(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 p.Z("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_prepareAddFeatures(e){const t=new Map,r=new Array(e.length);let i=null;for(let s=0;s<e.length;s++){const o=e[s],n=this._serializeFeature(o);i||null==o.geometry||(i=o.geometry.type),r[s]=n,t.set(`${n.uid}`,o)}const s=this;return{features:r,inferredGeometryType:i,finish(e){const r=s.sourceJSON.objectIdField;for(const i in e){const o=e[i],n=t.get(i);n&&(n.attributes||(n.attributes={}),-1===o?delete n.attributes[r]:n.attributes[r]=o,s._addIdToClientGraphic(n))}}}}_addIdToClientGraphic(e){if(!this._idToClientGraphic)return;const t=this.sourceJSON.objectIdField,r=e.attributes&&e.attributes[t];null!=r&&this._idToClientGraphic.set(r,e)}get _layerOrSourceGeometryType(){return this.layer?.geometryType??this.sourceJSON?.geometryType}_requiresClientGraphicMapping(){return this._geometryTypeRequiresClientGraphicMapping(this._layerOrSourceGeometryType)}_geometryRequiresClientGraphicMapping(e){return this._geometryTypeRequiresClientGraphicMapping(e.type)}_geometryTypeRequiresClientGraphicMapping(e){return"mesh"===e||"multipatch"===e||"extent"===e}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e),i=(J++).toString();return r?{uid:i,geometry:r.toJSON(),attributes:t}:{uid:i,attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return null==t?null:this._geometryRequiresClientGraphicMapping(t)?t.extent?A.Z.fromExtent(t.extent):null:t}async _startWorker(e){this._connection=await(0,q.bA)("MemorySourceWorker",{strategy:(0,D.Z)("feature-layers-workers")?"dedicated":"local",signal:e});const{fields:t,spatialReference:r,objectIdField:i,hasM:s,hasZ:o,timeInfo:n}=this.layer,a="defaults"===this.layer.originOf("spatialReference");await this._prepareClientMapping(this.items,e);const l=this._prepareAddFeatures(this.items);this.handles.add(this.on("before-changes",(e=>{U.error("Source modifications will not propagate after layer has been loaded. Please use .applyEdits() instead"),e.preventDefault()})));const u={features:l.features,fields:t&&t.map((e=>e.toJSON())),geometryType:B.P.toJSON(this._workerGeometryType),hasM:"mesh"!==this._layerOrSourceGeometryType&&s,hasZ:"mesh"===this._layerOrSourceGeometryType||o,objectIdField:i,spatialReference:a?null:r&&r.toJSON(),timeInfo:n?n.toJSON():null},d=await this._connection.invoke("load",u,{signal:e});for(const e of d.warnings)U.warn(e.message,{layer:this.layer,warning:e});d.featureErrors.length&&U.warn(`Encountered ${d.featureErrors.length} validation errors while loading features`,d.featureErrors);const p=d.layerDefinition;this._geometryTypeRequiresClientGraphicMapping(l.inferredGeometryType)&&(p.geometryType=B.P.toJSON(l.inferredGeometryType)),this.sourceJSON=p,this._requiresClientGraphicMapping()&&(this._idToClientGraphic=new Map),l.finish(d.assignedObjectIds)}};(0,i._)([(0,Z.c)({Type:R.Z,ensureType:(0,P.se)(R.Z)})],Q.prototype,"itemType",void 0),(0,i._)([(0,v.Cb)()],Q.prototype,"type",void 0),(0,i._)([(0,v.Cb)({constructOnly:!0})],Q.prototype,"layer",void 0),(0,i._)([(0,v.Cb)({readOnly:!0})],Q.prototype,"_workerGeometryType",null),(0,i._)([(0,v.Cb)()],Q.prototype,"sourceJSON",void 0),Q=(0,i._)([(0,F.j)(V)],Q);var W=r(54295),$=r(17287),z=r(71612),H=r(17017),X=r(66361),Y=r(69637),K=r(53713),ee=r(6404),te=r(38009),re=r(68825),ie=r(16859),se=r(92036);let oe=class extends se.Z{constructor(){super(...arguments),this.updating=!1,this.status="unknown"}};(0,i._)([(0,v.Cb)()],oe.prototype,"updating",void 0),(0,i._)([(0,v.Cb)()],oe.prototype,"status",void 0),oe=(0,i._)([(0,F.j)("esri.layers.support.PublishingInfo")],oe);const ne=oe,ae="esri.layers.mixins.PublishableLayer",le=Symbol(ae),ue=e=>{var t;let r=class extends e{constructor(){super(...arguments),this[t]=!0}get publishingInfo(){if(this.destroyed)return null;const e=this._get("publishingInfo");if(e)return e;const t=new ne;return this._checkPublishingStatus(t),t}_checkPublishingStatus(e){let t=0;const r=async s=>{let o;e.updating=!0;try{o=await this.fetchPublishingStatus()}catch(e){o="unavailable"}"published"!==o&&"unavailable"!==o||("publishing"===e.status&&this.refresh(),i.remove()),e.status=o,e.updating=!1,i.removed||(t=setTimeout(r,s,s+125))},i={removed:!1,remove(){this.removed=!0,clearTimeout(t)}};this.when().catch((()=>i.remove())),r(250),this.own(i)}};return t=le,(0,i._)([(0,v.Cb)({readOnly:!0,clonable:!1})],r.prototype,"publishingInfo",null),r=(0,i._)([(0,F.j)(ae)],r),r};var de=r(34760),pe=r(72965),ce=r(28294),ye=r(66677),he=r(21506),fe=r(50957),be=r(70082),me=r(16451),ge=r(53518),we=r(35671),_e=r(54306),ve=r(30707),Se=r(72064),Ce=r(76259),Fe=r(60199),Ie=r(10158),je=r(40555),Te=r(14165),Ee=r(28141),Re=r(32163),xe=r(65242);const De="FeatureLayer",Oe="esri.layers.FeatureLayer",Me=h.Z.getLogger(Oe);function qe(e,t){return new p.Z("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}function Pe(e){return e&&e instanceof d.Z}const Ze=(0,ge.v)();function Le(e,t,r){const i=!!r?.writeLayerSchema;return{enabled:i,ignoreOrigin:i}}let Ne=class extends((0,K.B)((0,ee.M)((0,Y.b)(ue((0,X.o1)((0,z.h)((0,re.c)((0,ce.n)((0,pe.M)((0,de.Q)((0,$.Y)((0,te.q)((0,ie.I)((0,b.R)((0,H.N)((0,W.V)((0,u.J)(E.Z)))))))))))))))))){constructor(...e){super(...e),this._handles=new c.Z,this.charts=null,this.copyright=null,this.displayField=null,this.dynamicDataSource=null,this.fields=null,this.fieldsIndex=null,this.formTemplate=null,this.fullExtent=null,this.geometryType=null,this.hasM=void 0,this.hasZ=void 0,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.outFields=null,this.path=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.spatialReference=T.Z.WGS84,this.subtypeCode=null,this.templates=null,this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.type="feature",this.typeIdField=null,this.types=null,this.visible=!0}destroy(){this.source?.destroy(),this._handles=(0,f.SC)(this._handles)}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;if(this.portalItem?.loaded&&this.source)return this.addResolvingPromise(this.createGraphicsSource(t).then((e=>this.initLayerProperties(e)))),Promise.resolve(this);const r=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection"]},e).catch(g.r9).then((async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstLayerId(t);null!=e&&(this.layerId=e)}if(!this.url&&!this._hasMemorySource())throw new p.Z("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this.initLayerProperties(await this.createGraphicsSource(t))})).then((()=>this._setUserPrivileges(this.serviceItemId,e))).then((()=>(0,fe.nU)(this,e)));return this.addResolvingPromise(r),Promise.resolve(this)}readCapabilities(e,t){return t=t.layerDefinition||t,(0,Se.h)(t,this.url)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return!(this.loaded&&!this.capabilities?.operations.supportsEditing)&&(this._isOverridden("editingEnabled")?this._get("editingEnabled"):this._hasMemorySource()||this.userHasEditingPrivileges)}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}readEditingEnabled(e,t){return this._readEditingEnabled(t,!1)}readEditingEnabledFromWebMap(e,t,r){return this._readEditingEnabled(t,!0,r)}writeEditingEnabled(e,t){this._writeEditingEnabled(e,t,!1)}writeEditingEnabledToWebMap(e,t,r,i){this._writeEditingEnabled(e,t,!0,i)}get effectiveEditingEnabled(){return(0,fe.sX)(this)}readIsTable(e,t){return"Table"===(t=t?.layerDefinition??t).type||!t.geometryType}writeIsTable(e,t,r,i){i?.writeLayerSchema&&(0,m.RB)(r,e?"Table":"Feature Layer",t)}readGlobalIdField(e,t){return(0,fe.rk)(t.layerDefinition||t)}readObjectIdField(e,t){return(0,fe.kZ)(t.layerDefinition||t)}get parsedUrl(){const e=(0,_.mN)(this.url);return null!=e&&(null!=this.dynamicDataSource?e.path=(0,_.v_)(e.path,"dynamicLayer"):null!=this.layerId&&(e.path=(0,_.v_)(e.path,this.layerId.toString()))),e}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,we.YN)(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,r){t=t.layerDefinition||t;const i=t.drawingInfo?.renderer;if(i){const e=(0,o.a)(i,t,r)??void 0;return e||Me.error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:r}),e}return(0,fe.Ob)(t,r)}set source(e){const t=this._get("source");t!==e&&(Pe(t)&&this._resetMemorySource(t),Pe(e)&&this._initMemorySource(e),this._set("source",e))}castSource(e){return e?Array.isArray(e)||e instanceof d.Z?new Q({layer:this,items:e}):e:null}readSource(e,t){const r=G.Z.fromJSON(t.featureSet);return new Q({layer:this,items:r?.features??[]})}readTemplates(e,t){const r=t.editFieldsInfo,i=r&&r.creatorField,s=r&&r.editorField;return e=e&&e.map((e=>be.Z.fromJSON(e))),this._fixTemplates(e,i),this._fixTemplates(e,s),e}readTitle(e,t){const r=t.layerDefinition?.name??t.name,i=t.title||t.layerDefinition&&t.layerDefinition.title;if(r){const e=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return this.url?(0,ye.a7)(this.url,r):r;let t=r;if(!t&&this.url){const e=(0,ye.Qc)(this.url);null!=e&&(t=e.title)}if(!t)return;return"item-title-and-service-name"===this.sublayerTitleMode&&e&&e!==t&&(t=e+" - "+t),(0,ye.ld)(t)}if("item-title"===this.sublayerTitleMode&&i)return i}readTitleFromWebMap(e,t){return t.title||t.layerDefinition&&t.layerDefinition.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===r));e&&(r=e.name)}return r}readTypes(e,t){e=(t=t.layerDefinition||t).types;const r=t.editFieldsInfo,i=r&&r.creatorField,s=r&&r.editorField;return e&&e.map((e=>(e=me.Z.fromJSON(e),this._fixTemplates(e.templates,i),this._fixTemplates(e.templates,s),e)))}readVisible(e,t){return t.layerDefinition&&null!=t.layerDefinition.defaultVisibility?!!t.layerDefinition.defaultVisibility:null!=t.visibility?!!t.visibility:void 0}async addAttachment(e,t){return(0,fe.JD)(this,e,t,De)}async updateAttachment(e,t,r){return(0,fe.Y5)(this,e,t,r,De)}async applyEdits(e,t){return(0,fe.Jj)(this,e,t)}async uploadAssets(e,t){return(0,fe.uj)(this,e,t)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,Re.eZ)(this,e)}async createGraphicsSource(e){if(this._hasMemorySource()&&this.source)return this.source.load({signal:e});const{default:t}=await(0,g.Hl)(Promise.all([r.e(4599),r.e(6502)]).then(r.bind(r,6502)),e);return new t({layer:this}).load({signal:e})}createQuery(){const e=(0,fe.rP)(this);e.dynamicDataSource=this.dynamicDataSource;const t=null!=this.subtypeCode?`${this.subtypeField} = ${this.subtypeCode}`:null,r=(0,w._)(this.definitionExpression,t);return e.where=r||"1=1",e}async deleteAttachments(e,t){return(0,fe.FV)(this,e,t,De)}async fetchRecomputedExtents(e){return(0,fe.Ci)(this,e,De)}getFeatureType(e){const{typeIdField:t,types:r}=this;if(!t||!e)return null;const i=e.attributes?e.attributes[t]:void 0;if(null==i)return null;let s=null;return r?.some((e=>{const{id:t}=e;return null!=t&&(t.toString()===i.toString()&&(s=e),!!s)})),s}getFieldDomain(e,t){const r=t?.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}getField(e){return this.fieldsIndex.get(e)}async queryAttachments(e,t){return(0,fe.SU)(this,e,t,De)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(Te.Z.from(e)??r.createQuery(),t);if(i?.features)for(const e of i.features)e.layer=e.sourceLayer=r;return i}async queryObjectIds(e,t){return(0,fe.tD)(this,e,t,De)}async queryFeatureCount(e,t){return(0,fe.VG)(this,e,t,De)}async queryExtent(e,t){return(0,fe.KE)(this,e,t,De)}async queryRelatedFeatures(e,t){return(0,fe.kp)(this,e,t,De)}async queryRelatedFeaturesCount(e,t){return(0,fe.C9)(this,e,t,De)}async queryTopFeatures(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopFeatures||!i?.query?.supportsTopFeaturesQuery)throw new p.Z(De,"Layer source does not support queryTopFeatures capability");const s=await r.queryTopFeatures(Ee.Z.from(e),t);if(s?.features)for(const e of s.features)e.layer=e.sourceLayer=this;return s}async queryTopObjectIds(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopObjectIds||!i?.query.supportsTopFeaturesQuery)throw new p.Z(De,"Layer source does not support queryTopObjectIds capability");return r.queryTopObjectIds(Ee.Z.from(e),t)}async queryTopFeaturesExtent(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopExtents||!i?.query?.supportsTopFeaturesQuery)throw new p.Z(De,"Layer source does not support queryTopExtents capability");return r.queryTopExtents(Ee.Z.from(e),t)}async queryTopFeatureCount(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopCount||!i?.query?.supportsTopFeaturesQuery)throw new p.Z(De,"Layer source does not support queryFeatureCount capability");return r.queryTopCount(Ee.Z.from(e),t)}read(e,t){const r=e.featureCollection;if(r){const e=r.layers;e&&1===e.length&&(super.read(e[0],t),null!=r.showLegend&&super.read({showLegend:r.showLegend},t))}super.read(e,t),t&&"service"===t.origin&&(this.revert(["objectIdField","fields","timeInfo"],"service"),this.spatialReference||this.revert(["spatialReference"],"service"))}write(e,t){t={...t,origin:t?.origin??void 0,writeLayerSchema:t?.writeLayerSchema??this._hasMemorySource()};const{origin:r,layerContainerType:i,messages:s}=t;if(this.dynamicDataSource)return s?.push(qe(this,"using a dynamic data source cannot be written to web scenes, web maps and feature service items")),null;if(this.isTable){if("web-scene"===r||"web-map"===r&&"tables"!==i)return s?.push(qe(this,"using a table source cannot be written to web scenes and web maps")),null;if(this._hasMemorySource())return s?.push(qe(this,"using an in-memory table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===r&&"tables"===i)return s?.push(qe(this,"using a non-table source cannot be written to tables in web maps")),null;return super.write(e,t)}clone(){if(this._hasMemorySource())throw new p.Z(De,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(e){return!!this.loaded&&("memory"===this.source?.type||(0,Fe.D)(this,e))}async save(e){const{save:t}=await r.e(2664).then(r.bind(r,32664));return t(this,e)}async saveAs(e,t){const{saveAs:i}=await r.e(2664).then(r.bind(r,32664));return i(this,e,t)}_readEditingEnabled(e,t,r){let i=e.layerDefinition?.capabilities;return i?this._hasEditingCapability(i):(i=e.capabilities,t&&"web-map"===r?.origin&&!this._hasMemorySource()&&i?this._hasEditingCapability(i):void 0)}_hasEditingCapability(e){return e.toLowerCase().split(",").map((e=>e.trim())).includes("editing")}_writeEditingEnabled(e,t,r,i){if(!e){const e=this.capabilities?.operations?.supportsSync?"Query,Sync":"Query";(0,m.RB)("layerDefinition.capabilities",e,t),r&&!i?.writeLayerSchema&&(t.capabilities=e)}}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}_fetchFirstLayerId(e){return(0,a.default)(this.url,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then((e=>{const t=e.data;if(t)return Array.isArray(t.layers)&&t.layers.length>0?t.layers[0].id:Array.isArray(t.tables)&&t.tables.length>0?t.tables[0].id:void 0}))}async initLayerProperties(e){return this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),this._verifyFields(),(0,we.YN)(this.renderer,this.fieldsIndex),(0,we.UF)(this.timeInfo,this.fieldsIndex),(0,je.y)(this,{origin:"service"})}async hasDataChanged(){return(0,fe.gG)(this)}async fetchPublishingStatus(){const e=this.source;return e?.fetchPublishingStatus?e.fetchPublishingStatus():"unavailable"}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_fixTemplates(e,t){e&&e.forEach((e=>{const r=e.prototype&&e.prototype.attributes;r&&t&&delete r[t]}))}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new p.Z("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new p.Z("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source")}_initMemorySource(e){e.forEach((e=>{e.layer=this,e.sourceLayer=this})),this._handles.add([e.on("after-add",(e=>{e.item.layer=this,e.item.sourceLayer=this})),e.on("after-remove",(e=>{e.item.layer=null,e.item.sourceLayer=null}))],"fl-source")}_resetMemorySource(e){e.forEach((e=>{e.layer=null,e.sourceLayer=null})),this._handles.remove("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}};(0,i._)([(0,C.r)("service","capabilities")],Ne.prototype,"readCapabilities",null),(0,i._)([(0,v.Cb)({json:{origins:{"portal-item":{write:!0},"web-map":{write:!0}}}})],Ne.prototype,"charts",void 0),(0,i._)([(0,v.Cb)({readOnly:!0})],Ne.prototype,"createQueryVersion",null),(0,i._)([(0,v.Cb)({json:{read:{source:"layerDefinition.copyrightText"}}})],Ne.prototype,"copyright",void 0),(0,i._)([(0,v.Cb)({json:{read:{source:"layerDefinition.displayField"}}})],Ne.prototype,"displayField",void 0),(0,i._)([(0,v.Cb)({types:l.LB,readOnly:!0})],Ne.prototype,"defaultSymbol",void 0),(0,i._)([(0,v.Cb)({type:Ie.n})],Ne.prototype,"dynamicDataSource",void 0),(0,i._)([(0,v.Cb)({type:Boolean})],Ne.prototype,"editingEnabled",null),(0,i._)([(0,C.r)(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],Ne.prototype,"readEditingEnabled",null),(0,i._)([(0,C.r)("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],Ne.prototype,"readEditingEnabledFromWebMap",null),(0,i._)([(0,I.c)(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],Ne.prototype,"writeEditingEnabled",null),(0,i._)([(0,I.c)("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],Ne.prototype,"writeEditingEnabledToWebMap",null),(0,i._)([(0,v.Cb)({readOnly:!0})],Ne.prototype,"effectiveEditingEnabled",null),(0,i._)([(0,v.Cb)({...Ze.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{name:"fields"},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:Le}}}}})],Ne.prototype,"fields",void 0),(0,i._)([(0,v.Cb)(Ze.fieldsIndex)],Ne.prototype,"fieldsIndex",void 0),(0,i._)([(0,v.Cb)({type:j.Z,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],Ne.prototype,"formTemplate",void 0),(0,i._)([(0,v.Cb)({json:{read:{source:"layerDefinition.extent"}}})],Ne.prototype,"fullExtent",void 0),(0,i._)([(0,v.Cb)({json:{origins:{"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:Le,writer(e,t,r){const i=e?fe.Fr.toJSON(e):null;i&&(0,m.RB)(r,i,t)}}}},read:{source:"layerDefinition.geometryType",reader:fe.Fr.read}}})],Ne.prototype,"geometryType",void 0),(0,i._)([(0,v.Cb)({json:{read:{source:"layerDefinition.hasM"}}})],Ne.prototype,"hasM",void 0),(0,i._)([(0,v.Cb)({json:{read:{source:"layerDefinition.hasZ"}}})],Ne.prototype,"hasZ",void 0),(0,i._)([(0,v.Cb)(he.id)],Ne.prototype,"id",void 0),(0,i._)([(0,v.Cb)({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],Ne.prototype,"infoFor3D",void 0),(0,i._)([(0,v.Cb)({json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],Ne.prototype,"isTable",void 0),(0,i._)([(0,C.r)("service","isTable",["type","geometryType"]),(0,C.r)("isTable",["layerDefinition.type","layerDefinition.geometryType"])],Ne.prototype,"readIsTable",null),(0,i._)([(0,I.c)("web-map","isTable")],Ne.prototype,"writeIsTable",null),(0,i._)([(0,v.Cb)(he.iR)],Ne.prototype,"labelsVisible",void 0),(0,i._)([(0,v.Cb)({type:[_e.Z],json:{origins:{service:{read:{source:"drawingInfo.labelingInfo",reader:ve.r},write:{target:"drawingInfo.labelingInfo",enabled:!1}}},read:{source:"layerDefinition.drawingInfo.labelingInfo",reader:ve.r},write:{target:"layerDefinition.drawingInfo.labelingInfo"}}})],Ne.prototype,"labelingInfo",void 0),(0,i._)([(0,v.Cb)((()=>{const e=(0,y.d9)(he.bT);return e.json.origins["portal-item"]={write:{target:"layerDefinition.drawingInfo.transparency",writer(e,t,r){(0,m.RB)(r,(0,xe.a)(e),t)}}},e})())],Ne.prototype,"opacity",void 0),(0,i._)([(0,v.Cb)(he.rn)],Ne.prototype,"legendEnabled",void 0),(0,i._)([(0,v.Cb)({type:["show","hide"],json:(()=>{const e=(0,y.d9)(he.rT.json);return e.origins["portal-item"]={read:!1,write:!1},e})()})],Ne.prototype,"listMode",void 0),(0,i._)([(0,C.r)("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],Ne.prototype,"readGlobalIdField",null),(0,i._)([(0,v.Cb)({json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:Le}}}}})],Ne.prototype,"objectIdField",void 0),(0,i._)([(0,C.r)("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],Ne.prototype,"readObjectIdField",null),(0,i._)([(0,v.Cb)({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],Ne.prototype,"operationalLayerType",void 0),(0,i._)([(0,v.Cb)(Ze.outFields)],Ne.prototype,"outFields",void 0),(0,i._)([(0,v.Cb)({readOnly:!0})],Ne.prototype,"parsedUrl",null),(0,i._)([(0,v.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Ne.prototype,"path",void 0),(0,i._)([(0,v.Cb)(he.C_)],Ne.prototype,"popupEnabled",void 0),(0,i._)([(0,v.Cb)({type:s.Z,json:{name:"popupInfo",write:!0}})],Ne.prototype,"popupTemplate",void 0),(0,i._)([(0,v.Cb)({readOnly:!0})],Ne.prototype,"defaultPopupTemplate",null),(0,i._)([(0,v.Cb)({types:n.A,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:n.o,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema})}}})],Ne.prototype,"renderer",null),(0,i._)([(0,C.r)("service","renderer",["drawingInfo.renderer","defaultSymbol"]),(0,C.r)("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],Ne.prototype,"readRenderer",null),(0,i._)([(0,v.Cb)((()=>{const e=(0,y.d9)(he.YI);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],Ne.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,v.Cb)({clonable:!1})],Ne.prototype,"source",null),(0,i._)([(0,S.p)("source")],Ne.prototype,"castSource",null),(0,i._)([(0,C.r)("portal-item","source",["featureSet"]),(0,C.r)("web-map","source",["featureSet"])],Ne.prototype,"readSource",null),(0,i._)([(0,v.Cb)({json:{read:{source:"layerDefinition.extent.spatialReference"}}})],Ne.prototype,"spatialReference",void 0),(0,i._)([(0,v.Cb)({type:Number})],Ne.prototype,"subtypeCode",void 0),(0,i._)([(0,v.Cb)({type:[be.Z]})],Ne.prototype,"templates",void 0),(0,i._)([(0,C.r)("templates",["editFieldsInfo","creatorField","editorField","templates"])],Ne.prototype,"readTemplates",null),(0,i._)([(0,v.Cb)({type:Ce.Z})],Ne.prototype,"timeInfo",void 0),(0,i._)([(0,v.Cb)()],Ne.prototype,"title",void 0),(0,i._)([(0,C.r)("service","title",["name"]),(0,C.r)("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],Ne.prototype,"readTitle",null),(0,i._)([(0,C.r)("web-map","title",["layerDefinition.name","title"])],Ne.prototype,"readTitleFromWebMap",null),(0,i._)([(0,v.Cb)({type:String})],Ne.prototype,"sublayerTitleMode",void 0),(0,i._)([(0,v.Cb)({json:{read:!1}})],Ne.prototype,"type",void 0),(0,i._)([(0,v.Cb)({type:String})],Ne.prototype,"typeIdField",void 0),(0,i._)([(0,C.r)("service","typeIdField"),(0,C.r)("typeIdField",["layerDefinition.typeIdField"])],Ne.prototype,"readTypeIdField",null),(0,i._)([(0,v.Cb)({type:[me.Z]})],Ne.prototype,"types",void 0),(0,i._)([(0,C.r)("service","types",["types"]),(0,C.r)("types",["layerDefinition.types"])],Ne.prototype,"readTypes",null),(0,i._)([(0,v.Cb)({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility"}}}}})],Ne.prototype,"visible",void 0),(0,i._)([(0,C.r)("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],Ne.prototype,"readVisible",null),Ne=(0,i._)([(0,F.j)(Oe)],Ne);const Ge=Ne},69637:(e,t,r)=>{r.d(t,{b:()=>T});var i,s=r(43697),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011)),a=r(20102),l=r(96674),u=r(78286),d=r(67760),p=r(66577),c=r(92835),y=r(35454),h=r(22974),f=r(14165);const b=new y.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),m=new y.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let g=i=class extends l.wq{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:i,timeExtent:s,objectIds:o,units:n,distance:a}=this;return new f.Z({geometry:(0,h.d9)(r),objectIds:(0,h.d9)(o),spatialRelationship:i,timeExtent:(0,h.d9)(s),where:t,units:n,distance:a,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:s,objectIds:o,units:n,distance:a}=this;return new i({geometry:(0,h.d9)(t),objectIds:(0,h.d9)(o),spatialRelationship:r,timeExtent:(0,h.d9)(s),where:e,units:n,distance:a})}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],g.prototype,"where",void 0),(0,s._)([(0,o.Cb)({types:p.qM,json:{write:!0}})],g.prototype,"geometry",void 0),(0,s._)([(0,o.Cb)({type:b.apiValues,json:{name:"spatialRel",read:{reader:b.read},write:{allowNull:!1,writer:b.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],g.prototype,"spatialRelationship",void 0),(0,s._)([(0,o.Cb)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],g.prototype,"distance",void 0),(0,s._)([(0,o.Cb)({type:[Number],json:{write:!0}})],g.prototype,"objectIds",void 0),(0,s._)([(0,o.Cb)({type:m.apiValues,json:{read:m.read,write:{writer:m.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],g.prototype,"units",void 0),(0,s._)([(0,o.Cb)({type:c.Z,json:{write:!0}})],g.prototype,"timeExtent",void 0),g=i=(0,s._)([(0,n.j)("esri.layers.support.FeatureFilter")],g);const w=g;var _;const v={read:{reader:d.ij},write:{writer:d.cW,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},S={read:{reader:d.ij},write:{writer:d.cW,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},C={name:"showExcludedLabels",default:!0};let F=_=class extends l.wq{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new a.Z("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new a.Z("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new _({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,s._)([(0,o.Cb)({type:w,json:{write:{allowNull:!0,writer(e,t,r,i){const s=e?.write({},i);s&&0!==Object.keys(s).length?(0,u.RB)(r,s,t):(0,u.RB)(r,null,t)}}}})],F.prototype,"filter",void 0),(0,s._)([(0,o.Cb)({json:{write:!0,origins:{"web-map":v,"portal-item":v}}})],F.prototype,"includedEffect",void 0),(0,s._)([(0,o.Cb)({json:{write:!0,origins:{"web-map":S,"portal-item":S}}})],F.prototype,"excludedEffect",void 0),(0,s._)([(0,o.Cb)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":C,"portal-item":C}}})],F.prototype,"excludedLabelsVisible",void 0),F=_=(0,s._)([(0,n.j)("esri.layers.support.FeatureEffect")],F);const I=F,j={write:{allowNull:!0}},T=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return(0,s._)([(0,o.Cb)({type:I,json:{origins:{"web-map":j,"portal-item":j}}})],t.prototype,"featureEffect",void 0),t=(0,s._)([(0,n.j)("esri.layers.mixins.FeatureEffectLayer")],t),t}},68825:(e,t,r)=>{r.d(t,{c:()=>f});var i,s=r(43697),o=r(78286),n=r(5600),a=(r(75215),r(67676),r(80442),r(52011)),l=r(35454),u=r(96674);const d=new l.X({asc:"ascending",desc:"descending"});let p=i=class extends u.wq{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,s._)([(0,n.Cb)({type:String,json:{write:!0}})],p.prototype,"valueExpression",void 0),(0,s._)([(0,n.Cb)({type:d.apiValues,json:{read:d.read,write:d.write}})],p.prototype,"order",void 0),p=i=(0,s._)([(0,a.j)("esri.layers.support.OrderByInfo")],p);const c=p;function y(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const s=new c;return s.read(i,r),[s]}function h(e,t,r,i){const s=e.find((e=>!!e.field));s&&(0,o.RB)(r,[s.toJSON()],t)}const f=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,n.Cb)({type:[c],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:y},write:{target:"layerDefinition.orderBy",writer:h}}})],t.prototype,"orderBy",void 0),t=(0,s._)([(0,a.j)("esri.layers.mixins.OrderedLayer")],t),t}},40555:(e,t,r)=>{r.d(t,{y:()=>n});var i=r(66643),s=r(95330),o=r(20941);async function n(e,t,r){const n=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(n&&"unique-value"===n.type&&n.styleOrigin){const a=await(0,i.q6)(n.populateFromStyle());if((0,s.k_)(r),!1===a.ok){const r=a.error;t&&t.messages&&t.messages.push(new o.Z("renderer:style-reference",`Failed to create unique value renderer from style reference: ${r.message}`,{error:r,context:t})),e.clear("renderer",t?.origin)}}}},59431:(e,t,r)=>{r.d(t,{P:()=>n});var i=r(67900),s=r(8744);function o(e,t,r){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=r)}function n(e,t,r){if(!e&&!t||!r)return;const s=(0,i._R)(r);a(e,r,s),a(t,r,s)}function a(e,t,r){if(e)for(const i of e)l(i.geometry,t,r)}function l(e,t,r){if(null==e||!e.spatialReference||(0,s.fS)(e.spatialReference,t))return;const n=(0,i._R)(e.spatialReference)/r;if(1!==n)if("x"in e)null!=e.z&&(e.z*=n);else if("rings"in e)o(e,e.rings,n);else if("paths"in e)o(e,e.paths,n);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=n)}},28141:(e,t,r)=>{r.d(t,{Z:()=>S});var i,s=r(43697),o=r(66577),n=r(92835),a=r(35454),l=r(96674),u=r(22974),d=r(5600),p=r(75215),c=r(52011),y=r(30556),h=r(33955);r(67676),r(80442);let f=i=class extends l.wq{constructor(e){super(e),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new i({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};(0,s._)([(0,d.Cb)({type:[String],json:{write:!0}})],f.prototype,"groupByFields",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{write:!0}})],f.prototype,"topCount",void 0),(0,s._)([(0,d.Cb)({type:[String],json:{write:!0}})],f.prototype,"orderByFields",void 0),f=i=(0,s._)([(0,c.j)("esri.rest.support.TopFilter")],f);const b=f;var m,g=r(82971);const w=new a.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),_=new a.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let v=m=class extends l.wq{constructor(e){super(e),this.cacheHint=void 0,this.distance=void 0,this.geometry=null,this.geometryPrecision=void 0,this.maxAllowableOffset=void 0,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.resultType=null,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.start=void 0,this.spatialRelationship="intersects",this.timeExtent=null,this.topFilter=void 0,this.units=null,this.where="1=1"}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new m((0,u.d9)({cacheHint:this.cacheHint,distance:this.distance,geometry:this.geometry,geometryPrecision:this.geometryPrecision,maxAllowableOffset:this.maxAllowableOffset,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,resultType:this.resultType,returnGeometry:this.returnGeometry,returnZ:this.returnZ,returnM:this.returnM,start:this.start,spatialRelationship:this.spatialRelationship,timeExtent:this.timeExtent,topFilter:this.topFilter,units:this.units,where:this.where}))}};(0,s._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],v.prototype,"cacheHint",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],v.prototype,"distance",void 0),(0,s._)([(0,d.Cb)({types:o.qM,json:{read:h.im,write:!0}})],v.prototype,"geometry",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{write:!0}})],v.prototype,"geometryPrecision",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{write:!0}})],v.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],v.prototype,"num",void 0),(0,s._)([(0,d.Cb)({json:{write:!0}})],v.prototype,"objectIds",void 0),(0,s._)([(0,d.Cb)({type:[String],json:{write:!0}})],v.prototype,"orderByFields",void 0),(0,s._)([(0,d.Cb)({type:[String],json:{write:!0}})],v.prototype,"outFields",void 0),(0,s._)([(0,d.Cb)({type:g.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],v.prototype,"outSpatialReference",void 0),(0,s._)([(0,d.Cb)({type:String,json:{write:!0}})],v.prototype,"resultType",void 0),(0,s._)([(0,d.Cb)({json:{write:!0}})],v.prototype,"returnGeometry",void 0),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"returnM",void 0),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"returnZ",void 0),(0,s._)([(0,d.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],v.prototype,"start",void 0),(0,s._)([(0,y.c)("start"),(0,y.c)("num")],v.prototype,"writeStart",null),(0,s._)([(0,d.Cb)({type:String,json:{read:{source:"spatialRel",reader:w.read},write:{target:"spatialRel",writer:w.write}}})],v.prototype,"spatialRelationship",void 0),(0,s._)([(0,d.Cb)({type:n.Z,json:{write:!0}})],v.prototype,"timeExtent",void 0),(0,s._)([(0,d.Cb)({type:b,json:{write:!0}})],v.prototype,"topFilter",void 0),(0,s._)([(0,d.Cb)({type:String,json:{read:_.read,write:{writer:_.write,overridePolicy(e){return{enabled:null!=e&&null!=this.distance&&this.distance>0}}}}})],v.prototype,"units",void 0),(0,s._)([(0,d.Cb)({type:String,json:{write:!0}})],v.prototype,"where",void 0),v=m=(0,s._)([(0,c.j)("esri.rest.support.TopFeaturesQuery")],v),v.from=(0,p.se)(v);const S=v}}]);