@arcgis/core 4.32.0-next.20241219 → 4.32.0-next.20241220

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 (123) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{0da2aaca3f0b4fe910e3.js → 015285436ca965f94e17.js} +1 -1
  3. package/assets/esri/core/workers/chunks/2c084c0c324e3af56424.js +1 -0
  4. package/assets/esri/core/workers/chunks/5a0eb9dfe668cf290462.js +1 -0
  5. package/assets/esri/core/workers/chunks/69efc716991a407c3d23.js +1 -0
  6. package/assets/esri/core/workers/chunks/{fb43c44a7d6b61f31e75.js → 94432e04de01ee7adc0e.js} +1 -1
  7. package/assets/esri/core/workers/chunks/95af4dee29eb196b8ada.js +1 -0
  8. package/assets/esri/core/workers/chunks/{80ac74da0b0e45e74beb.js → 9a498f2c007f4d78d4dd.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{eddab4dc706e75c6637f.js → bff74200a0df0950cf08.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{8f2ffb6944c9028d3bea.js → c08cb75c3eef6c45f604.js} +1 -1
  11. package/assets/esri/core/workers/chunks/dce55e7f76adecc055c3.js +1 -0
  12. package/assets/esri/core/workers/chunks/f2cdb7be3fd65f65c30b.js +1 -0
  13. package/assets/esri/themes/base/widgets/_FeatureTable.scss +3 -3
  14. package/assets/esri/themes/dark/main.css +1 -1
  15. package/assets/esri/themes/light/main.css +1 -1
  16. package/assets/esri/themes/light/view.css +1 -1
  17. package/chunks/OperatorProject.js +1 -1
  18. package/chunks/QuadraticBezier.js +1 -1
  19. package/geometry/operators/affineTransformOperator.js +1 -1
  20. package/geometry/operators/alphaShapeOperator.js +1 -1
  21. package/geometry/operators/areaOperator.js +1 -1
  22. package/geometry/operators/autoCompleteOperator.js +1 -1
  23. package/geometry/operators/boundaryOperator.js +1 -1
  24. package/geometry/operators/bufferOperator.js +1 -1
  25. package/geometry/operators/centroidOperator.js +1 -1
  26. package/geometry/operators/clipOperator.js +1 -1
  27. package/geometry/operators/containsOperator.js +1 -1
  28. package/geometry/operators/convexHullOperator.js +1 -1
  29. package/geometry/operators/crossesOperator.js +1 -1
  30. package/geometry/operators/cutOperator.js +1 -1
  31. package/geometry/operators/densifyOperator.js +1 -1
  32. package/geometry/operators/differenceOperator.js +1 -1
  33. package/geometry/operators/disjointOperator.js +1 -1
  34. package/geometry/operators/distanceOperator.js +1 -1
  35. package/geometry/operators/equalsOperator.js +1 -1
  36. package/geometry/operators/extendOperator.js +1 -1
  37. package/geometry/operators/generalizeOperator.js +1 -1
  38. package/geometry/operators/geodesicBufferOperator.js +1 -1
  39. package/geometry/operators/geodesicProximityOperator.js +1 -1
  40. package/geometry/operators/geodeticAreaOperator.js +1 -1
  41. package/geometry/operators/geodeticDensifyOperator.js +1 -1
  42. package/geometry/operators/geodeticDistanceOperator.js +1 -1
  43. package/geometry/operators/geodeticLengthOperator.js +1 -1
  44. package/geometry/operators/graphicBufferOperator.js +1 -1
  45. package/geometry/operators/integrateOperator.js +1 -1
  46. package/geometry/operators/intersectionOperator.js +1 -1
  47. package/geometry/operators/intersectsOperator.js +1 -1
  48. package/geometry/operators/isNearOperator.js +1 -1
  49. package/geometry/operators/labelPointOperator.js +1 -1
  50. package/geometry/operators/lengthOperator.js +1 -1
  51. package/geometry/operators/linesToPolygonsOperator.js +1 -1
  52. package/geometry/operators/locateBetweenOperator.js +1 -1
  53. package/geometry/operators/minimumBoundingCircleOperator.js +1 -1
  54. package/geometry/operators/multiPartToSinglePartOperator.js +1 -1
  55. package/geometry/operators/offsetOperator.js +1 -1
  56. package/geometry/operators/overlapsOperator.js +1 -1
  57. package/geometry/operators/polygonOverlayOperator.js +1 -1
  58. package/geometry/operators/polygonSlicerOperator.js +1 -1
  59. package/geometry/operators/projectOperator.js +1 -1
  60. package/geometry/operators/proximityOperator.js +1 -1
  61. package/geometry/operators/relateOperator.js +1 -1
  62. package/geometry/operators/reshapeOperator.js +1 -1
  63. package/geometry/operators/simplifyOperator.js +1 -1
  64. package/geometry/operators/singlePartToMultiPartOperator.js +1 -1
  65. package/geometry/operators/symmetricDifferenceOperator.js +1 -1
  66. package/geometry/operators/touchesOperator.js +1 -1
  67. package/geometry/operators/unionOperator.js +1 -1
  68. package/geometry/operators/withinOperator.js +1 -1
  69. package/interfaces.d.ts +53 -4
  70. package/layers/graphics/OptimizedFeature.js +1 -1
  71. package/layers/graphics/sources/geojson/geojson.js +1 -1
  72. package/layers/support/Sublayer.js +1 -1
  73. package/layers/support/domainUtils.js +1 -1
  74. package/layers/support/fieldUtils.js +1 -1
  75. package/package.json +1 -1
  76. package/rest/query/operations/pbfOptimizedFeatureSet.js +1 -1
  77. package/support/revision.js +1 -1
  78. package/views/2d/engine/webgl/mesh/factories/ResourceProxy.js +1 -1
  79. package/views/2d/input/MapViewInputManager.js +1 -1
  80. package/views/2d/input/handlers/KeyRotate.js +1 -1
  81. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  82. package/views/2d/layers/features/FeatureContainer.js +1 -1
  83. package/views/2d/layers/features/FeaturePipelineWorker.js +1 -1
  84. package/views/2d/layers/features/Processor.js +1 -1
  85. package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
  86. package/views/2d/layers/features/processor/BinningStrategy.js +1 -1
  87. package/views/2d/layers/features/processor/ClusterStrategy.js +1 -1
  88. package/views/2d/layers/features/processor/FeatureUpdateStrategy.js +1 -1
  89. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  90. package/views/2d/layers/features/sources/strategies/ALoadStrategy.js +1 -1
  91. package/views/2d/layers/features/sources/strategies/chunks/ASourceChunk.js +1 -1
  92. package/views/2d/layers/features/sources/strategies/chunks/Overrides.js +5 -0
  93. package/views/2d/layers/features/sources/strategies/chunks/SourceChunkStore.js +1 -1
  94. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  95. package/views/2d/layers/features/support/FeatureSetReaderJSON.js +1 -1
  96. package/views/2d/layers/support/DebouncedFeatureOverride.js +5 -0
  97. package/views/2d/layers/support/FeatureCommandQueue.js +1 -1
  98. package/views/3d/input/SceneInputManager.js +1 -1
  99. package/views/3d/input/handlers/KeyboardNavigation.js +1 -1
  100. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  101. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  102. package/views/layers/FeatureLayerView.js +1 -1
  103. package/widgets/FeatureTable/FieldColumn.js +1 -1
  104. package/widgets/Features/FeaturesViewModel.js +1 -1
  105. package/widgets/Features.js +1 -1
  106. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  107. package/widgets/OrientedImageryViewer/adapters/sketch/DigitizationAdapter.js +1 -1
  108. package/widgets/OrientedImageryViewer/components/ImageOverlays.js +1 -1
  109. package/widgets/OrientedImageryViewer/digitizationUtils.js +1 -1
  110. package/widgets/OrientedImageryViewer.js +1 -1
  111. package/widgets/Popup.js +1 -1
  112. package/widgets/ShadowCast.js +1 -1
  113. package/widgets/support/forms/formUtils.js +1 -1
  114. package/assets/esri/core/workers/chunks/3ef5002b21b1a5b97e11.js +0 -1
  115. package/assets/esri/core/workers/chunks/5786b190ad3e2d933245.js +0 -1
  116. package/assets/esri/core/workers/chunks/84d26c6c805f5855ffd3.js +0 -1
  117. package/assets/esri/core/workers/chunks/8f2f2d497b875e2b4139.js +0 -1
  118. package/assets/esri/core/workers/chunks/a4c8b773283ea8f0e256.js +0 -1
  119. package/assets/esri/core/workers/chunks/fce1158755f959730602.js +0 -1
  120. package/views/2d/layers/features/sources/strategies/chunks/OverrideChunk.js +0 -5
  121. package/views/3d/input/handlers/SingleKey.js +0 -5
  122. package/views/3d/input/handlers/SingleKeyResetHeading.js +0 -5
  123. package/views/3d/input/handlers/SingleKeyResetTilt.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4612,9340],{38961:(e,t,r)=>{r.d(t,{A:()=>p});var i=r(90237),s=r(5503),o=r(36708),n=r(10107),a=r(40608),l=r(80559);let u=class extends s.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,l.fm)((()=>this._refresh()),o.OH))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new s.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,n.MZ)()],u.prototype,"getCollections",void 0),(0,i._)([(0,n.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,i._)([(0,n.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,i._)([(0,a.$)("esri.core.CollectionFlattener")],u);const p=u},81583:(e,t,r)=>{r.d(t,{L:()=>a,g:()=>n});var i=r(60999),s=r(5503),o=r(92474);async function n(e,t){return await e.load(),a(e,t)}async function a(e,t){const r=[],n=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?n(...t):s.A.isCollection(t)?t.forEach((e=>n(e))):o.A.isLoadable(t)&&r.push(t))};t(n);let a=null;if(await(0,i.Tj)(r,(async e=>{const t=await(0,i.Ke)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)})),a)throw a.error;return e}},39516:(e,t,r)=>{async function i(e,t){const{default:i}=await r.e(8368).then(r.bind(r,88368));return i.create(e,{fieldsIndex:t})}function s(e,t){return"1=1"===e?t??e:"1=1"===t?e??t:null!=e&&""!==e?null!=t&&""!==t?`(${e}) AND (${t})`:e:t}r.d(t,{G:()=>i,m:()=>s})},13069:(e,t,r)=>{r.d(t,{AG:()=>a,lk:()=>s,vD:()=>n,yS:()=>o});const i="randomUUID"in crypto;function s(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${s().toUpperCase()}}`}function n(){return`{${s()}}`}function a(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},28132:(e,t,r)=>{r.d(t,{A:()=>L});var i=r(90237),s=r(69622),o=r(49186),n=r(44208),a=r(74887),l=r(84952),u=r(10107),p=(r(53966),r(87811),r(40608)),y=r(21325),c=r(20557),d=r(27733),h=r(2272),f=r(20615),m=(r(59456),r(80893)),b=r(61956),g=r(5443),_=r(78286),S=r(99199),w=r(97768),v=r(62815),I=r(90708);function x(e,t){return t}function A(e,t,r,i){switch(r){case 0:return F(e,t+i,0);case 1:return"lowerLeft"===e.originPosition?F(e,t+i,1):function({translate:e,scale:t},r,i){return e[i]-r*t[i]}(e,t+i,1)}}function M(e,t,r,i){return 2===r?F(e,t,2):A(e,t,r,i)}function E(e,t,r,i){return 2===r?0===t?0:F(e,t,3):A(e,t,r,i)}function O(e,t,r,i){return 3===r?0===t?0:F(e,t,3):M(e,t,r,i)}function F({translate:e,scale:t},r,i){return e[i]+r*t[i]}class D{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=x,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._mValueOffset=null,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,v.N)(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,w.Lw)(r),r.push(t);const i=r.map((e=>e.name));this._attributesConstructor=function(){for(const e of i)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._mValueOffset=null,this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&(this._mValueOffset=this._vertexDimension,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:i}=t,s=this._transform?(0,I.Ch)(r.clone(),r,!1,!1,this._transform):r.clone(),o=(0,I.zv)(s,i,!1,!1);e.queryGeometryType=i,e.queryGeometry={...o}}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 i=this._transform;switch(t=this._applyTransform(i,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 i=this._transform;return null!==this._mValueOffset&&0===e&&t>0&&!(t%this._mValueOffset)?0:this._applyTransform(i,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 i=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(i)}_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 i=this._transformPathLikeValue(t,r),s=e[e.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),s.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=i}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?O:t?M:r?E:A}}var P=r(22671);let T=class extends s.A{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,l.An)(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),i=null!=e.outStatistics?.[0],s=(0,n.A)("featurelayer-pbf-statistics"),o=(!i||s)&&!0!==e.returnTrueCurves;let a;if(this.pbfSupported&&o)try{a=await async function(e,t,r){const i=(0,h.Dl)(e),s={...r},o=b.A.from(t),n=!o.quantizationParameters,{data:a}=await(0,m.IJ)(i,o,new D({sourceSpatialReference:o.sourceSpatialReference,applyTransform:n}),s);return a}(this.url,r,t)}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.pbfSupported=!1}return this.pbfSupported&&o||(a=await(0,S.e)(this.url,r,t)),this._normalizeFields(a.fields),a}async featureSetFromJSON(e,t,i){if(!this._queryIs3DObjectFormat(e)||null==this.infoFor3D||!t.features)return P.A.fromJSON(t);const{meshFeatureSetFromJSON:s}=await(0,a.qr)(Promise.all([r.e(690),r.e(3030),r.e(36),r.e(5754)]).then(r.bind(r,40050)),i);return s(e,this.infoFor3D,t)}executeForCount(e,t){return(0,f.I)(this.url,this._normalizeQuery(e),t)}executeForExtent(e,t){return async function(e,t,r){const i=(0,h.Dl)(e),s=await(0,m.Jf)(i,b.A.from(t),{...r}),o=s.data.extent;return!o||isNaN(o.xmin)||isNaN(o.ymin)||isNaN(o.xmax)||isNaN(o.ymax)?{count:s.data.count,extent:null}:{count:s.data.count,extent:g.A.fromJSON(o)}}(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return(0,_.V)(this.url,this._normalizeQuery(e),t)}async executeRelationshipQuery(e,t){const[{default:i},{executeRelationshipQuery:s}]=await(0,a.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(5257).then(r.bind(r,15257))]),t);return e=i.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),s(this.url,e,t)}async executeRelationshipQueryForCount(e,t){const[{default:i},{executeRelationshipQueryForCount:s}]=await(0,a.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(5257).then(r.bind(r,15257))]),t);return e=i.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),s(this.url,e,t)}async executeAttachmentQuery(e,t){const{executeAttachmentQuery:i,fetchAttachments:s,processAttachmentQueryResult:o}=await(0,a.qr)(r.e(9239).then(r.bind(r,9239)),t),n=(0,h.Dl)(this.url);return o(n,await(this.queryAttachmentsSupported?i(n,e,t):s(n,e,t)))}async executeAttributeBinsQuery(e,t){const{executeAttributeBinsQuery:i}=await(0,a.qr)(Promise.all([r.e(4575),r.e(3103)]).then(r.bind(r,33103)),t);return i(this.parsedUrl,e,t)}async executeTopFeaturesQuery(e,t){const{executeTopFeaturesQuery:i}=await(0,a.qr)(r.e(1273).then(r.bind(r,11273)),t);return i(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){const{executeForTopIds:i}=await(0,a.qr)(r.e(1277).then(r.bind(r,21277)),t);return i(this.parsedUrl,e,t)}async executeForTopExtents(e,t){const{executeForTopExtents:i}=await(0,a.qr)(r.e(8018).then(r.bind(r,8018)),t);return i(this.parsedUrl,e,t)}async executeForTopCount(e,t){const{executeForTopCount:i}=await(0,a.qr)(r.e(980).then(r.bind(r,10980)),t);return i(this.parsedUrl,e,t)}_normalizeQuery(e){let t=b.A.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?d.L.from(e.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this;if(null!=r&&this._queryIs3DObjectFormat(e)){if(t=t===e?t.clone():t,t.formatOf3DObjects=(0,c.Hz)(r),!t.formatOf3DObjects)throw new o.A("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(t.outSpatialReference&&!(0,y.aI)(t.outSpatialReference,this.sourceSpatialReference))throw new o.A("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==t.outFields||!t.outFields.includes("*")){t=t===e?t.clone():t,null==t.outFields&&(t.outFields=[]);const{originX:i,originY:s,originZ:o,translationX:n,translationY:a,translationZ:l,scaleX:u,scaleY:p,scaleZ:y,rotationX:c,rotationY:d,rotationZ:h,rotationDeg:f}=r.transformFieldRoles;t.outFields.push(i,s,o,n,a,l,u,p,y,c,d,h,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,i._)([(0,u.MZ)({type:d.L})],T.prototype,"dynamicDataSource",void 0),(0,i._)([(0,u.MZ)()],T.prototype,"fieldsIndex",void 0),(0,i._)([(0,u.MZ)()],T.prototype,"gdbVersion",void 0),(0,i._)([(0,u.MZ)()],T.prototype,"infoFor3D",void 0),(0,i._)([(0,u.MZ)({readOnly:!0})],T.prototype,"parsedUrl",null),(0,i._)([(0,u.MZ)()],T.prototype,"pbfSupported",void 0),(0,i._)([(0,u.MZ)()],T.prototype,"queryAttachmentsSupported",void 0),(0,i._)([(0,u.MZ)()],T.prototype,"sourceSpatialReference",void 0),(0,i._)([(0,u.MZ)({type:String})],T.prototype,"url",void 0),T=(0,i._)([(0,p.$)("esri.layers.graphics.sources.support.QueryTask")],T);const L=T},98534:(e,t,r)=>{r.d(t,{V:()=>g});var i=r(90237),s=r(78888),o=r(91869),n=r(74887),a=r(84952),l=r(46140),u=r(10107),p=(r(44208),r(53966),r(87811),r(36005)),y=r(40608),c=r(35666),d=r(5443),h=r(16930),f=r(60694),m=r(10873),b=r(10407);const g=e=>{let t=class extends e{constructor(){super(...arguments),this.capabilities=void 0,this.copyright=null,this.fullExtent=null,this.legendEnabled=!0,this.spatialReference=null,this.version=void 0,this._allLayersAndTablesMap=null}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));if(!r)return{operations:{supportsExportMap:!1,supportsExportTiles:!1,supportsIdentify:!1,supportsQuery:!1,supportsTileMap:!1},exportMap:null,exportTiles:null};const i=this.type,s="tile"!==i&&!!t.supportsDynamicLayers,o=r.includes("query"),n=r.includes("map"),a=!!t.exportTilesAllowed,u=r.includes("tilemap"),p=r.includes("data"),y="tile"!==i&&(!t.tileInfo||s),c="tile"!==i&&(!t.tileInfo||s),d="tile"!==i,h="tile"!==i&&s&&t.currentVersion>=11.1,f=t.cimVersion?l.R.parse(t.cimVersion):null,m=f?.greaterEqual(1,4)??!1,b=f?.greaterEqual(2,0)??!1;return{operations:{supportsExportMap:n,supportsExportTiles:a,supportsIdentify:o,supportsQuery:p,supportsTileMap:u},exportMap:n?{supportsArcadeExpressionForLabeling:m,supportsCIMSymbols:b,supportsDynamicLayers:s,supportsSublayerOrderBy:h,supportsSublayerDefinitionExpression:c,supportsSublayerVisibility:y,supportsSublayersChanges:d}:null,exportTiles:a?{maxExportTilesCount:+t.maxExportTilesCount}:null}}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("capabilities")||t.hasOwnProperty("tables")?10:t.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3),r}async fetchRelatedService(e){const t=this.portalItem;if(!t||!(0,b.bK)(t))return null;this._relatedFeatureServicePromise||(this._relatedFeatureServicePromise=t.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},e).then((e=>e.find((e=>"Feature Service"===e.type))??null),(()=>null)));const r=await this._relatedFeatureServicePromise;return(0,n.Te)(e),r?{itemId:r.id,url:r.url}:null}async fetchSublayerInfo(e,t){const{source:r}=e;if(this?.portalItem&&"tile"===this.type&&"map-layer"===r?.type&&(0,b.bK)(this.portalItem)&&e.originIdOf("url")<c.Gr.SERVICE){const i=await this.fetchRelatedService(t);i&&(e.url=(0,a.fj)(i.url,r.mapLayerId.toString()),e.layerItemId=i.itemId)}const{url:i}=e;let o;if("data-layer"===r.type)o=(await(0,s.A)(i,{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey},...t})).data;else if(i&&e.originIdOf("url")>c.Gr.SERVICE)try{const e=await this._fetchAllLayersAndTablesFromService(i),t=(0,f.qg)(i)?.sublayer??r.mapLayerId;o=e.get(t)}catch{}else{let i=e.id;"map-layer"===r?.type&&(i=r.mapLayerId);try{o=(await this.fetchAllLayersAndTables(t)).get(i)}catch{}}return o}async fetchAllLayersAndTables(e){return this._fetchAllLayersAndTablesFromService(this.parsedUrl?.path,e)}async _fetchAllLayersAndTablesFromService(e,t){await this.load(t),this._allLayersAndTablesMap||=new Map;const r=(0,f.qg)(e),i=(0,o.tE)(this._allLayersAndTablesMap,r?.url.path,(()=>(0,s.A)((0,a.fj)(r?.url.path,"/layers"),{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey}}).then((e=>{const t=new Map,{layers:r,tables:i}=e.data,s=[...r??[],...i??[]];for(const e of s)t.set(e.id,e);return{result:t}}),(e=>({error:e}))))),l=await i;if((0,n.Te)(t),"result"in l)return l.result;throw l.error}};return(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"capabilities",void 0),(0,i._)([(0,p.w)("service","capabilities",["capabilities","exportTilesAllowed","maxExportTilesCount","supportsDynamicLayers","tileInfo"])],t.prototype,"readCapabilities",null),(0,i._)([(0,u.MZ)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,u.MZ)({type:d.A})],t.prototype,"fullExtent",void 0),(0,i._)([(0,u.MZ)(m.id)],t.prototype,"id",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}})],t.prototype,"legendEnabled",void 0),(0,i._)([(0,u.MZ)(m.M6)],t.prototype,"popupEnabled",void 0),(0,i._)([(0,u.MZ)({type:h.A})],t.prototype,"spatialReference",void 0),(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,p.w)("service","version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],t.prototype,"readVersion",null),t=(0,i._)([(0,y.$)("esri.layers.mixins.ArcGISMapService")],t),t}},32756:(e,t,r)=>{r.d(t,{Rr:()=>l,fY:()=>p,ne:()=>u});var i=r(90237),s=r(93637),o=r(10107),n=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);function l(e,t,r){if(!e)return null;const i=e.find((e=>!!e.field));if(!i)return null;const s=new a.A;return s.read(i,r),[s]}const u={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){const o=e.find((e=>!!e.field));o&&(0,s.sM)(r,[o.toJSON()],t)}}}},p=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,i._)([(0,o.MZ)(u)],t.prototype,"orderBy",void 0),t=(0,i._)([(0,n.$)("esri.layers.mixins.OrderedLayer")],t),t}},91921:(e,t,r)=>{r.d(t,{I:()=>b});var i=r(90237),s=r(5503),o=r(38961),n=r(49186),a=r(53966),l=r(36708),u=r(10107),p=(r(44208),r(87811),r(88620)),y=r(40608),c=r(35666),d=r(60410),h=r(63389);const f=s.A.ofType(d.A);function m(e,t){e&&e.forEach((e=>{t(e),e.sublayers&&e.sublayers.length&&m(e.sublayers,t)}))}const b=e=>{let t=class extends e{constructor(...e){super(...e),this.allSublayers=new o.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.sublayersSourceJSON={[c.Gr.SERVICE]:{},[c.Gr.PORTAL_ITEM]:{},[c.Gr.WEB_SCENE]:{},[c.Gr.WEB_MAP]:{}},this.subtables=null,this.addHandles([(0,l.wB)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),l.OH),(0,l.wB)((()=>this.subtables),((e,t)=>this._handleSublayersChange(e,t)),l.OH)])}destroy(){this.allSublayers.destroy()}readSublayers(e,t){if(!t||!e)return;const{sublayersSourceJSON:r}=this,i=(0,c.aB)(t.origin);if(i<c.Gr.SERVICE)return;if(r[i]={context:t,visibleLayers:e.visibleLayers||r[i].visibleLayers,layers:e.layers||r[i].layers},i>c.Gr.SERVICE)return;this._set("serviceSublayers",this.createSublayersForOrigin("service").sublayers);const{sublayers:s,origin:o}=this.createSublayersForOrigin("web-document"),n=(0,p.oY)(this);n.setDefaultOrigin(o),this._set("sublayers",new f(s)),n.setDefaultOrigin("user")}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}createServiceSublayers(){return this.createSublayersForOrigin("service").sublayers}createSublayersForOrigin(e){const t=(0,c.aB)("web-document"===e?"web-map":e);let r=c.Gr.SERVICE,i=this.sublayersSourceJSON[c.Gr.SERVICE].layers,s=this.sublayersSourceJSON[c.Gr.SERVICE].context,o=null;const n=[c.Gr.PORTAL_ITEM,c.Gr.WEB_SCENE,c.Gr.WEB_MAP].filter((e=>e<=t));for(const e of n){const t=this.sublayersSourceJSON[e];(0,h._X)(t.layers)&&(r=e,i=t.layers,s=t.context,t.visibleLayers&&(o={visibleLayers:t.visibleLayers,context:t.context}))}const a=[c.Gr.PORTAL_ITEM,c.Gr.WEB_SCENE,c.Gr.WEB_MAP].filter((e=>e>r&&e<=t));let l=null;for(const e of a){const{layers:t,visibleLayers:r,context:i}=this.sublayersSourceJSON[e];t&&(l={layers:t,context:i}),r&&(o={visibleLayers:r,context:i})}const u=function(e,t){const r=[],i={};return e?(e.forEach((e=>{const s=new d.A;if(s.read(e,t),i[s.id]=s,null!=e.parentLayerId&&-1!==e.parentLayerId){const t=i[e.parentLayerId];t.sublayers||(t.sublayers=[]),t.sublayers.unshift(s)}else r.unshift(s)})),r):r}(i,s),p=new Map,y=new Set;if(l)for(const e of l.layers)p.set(e.id,e);if(o?.visibleLayers)for(const e of o.visibleLayers)y.add(e);return m(u,(e=>{l&&e.read(p.get(e.id),l.context),o&&e.read({defaultVisibility:y.has(e.id)},o.context)})),{origin:(0,c.OL)(r),sublayers:new f({items:u})}}read(e,t){super.read(e,t),this.readSublayers(e,t)}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.removeHandles("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this,e.layer=this})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null}))],"sublayers-owner"),"tile"===this.type&&this.addHandles(e.on("before-changes",(e=>{a.A.getLogger("esri.layers.TileLayer").error(new n.A("tilelayer:sublayers-non-modifiable","ISublayer can't be added, moved, or removed from the layer's sublayers",{layer:this})),e.preventDefault()})),"sublayers-owner"))}};return(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"allSublayers",void 0),(0,i._)([(0,u.MZ)({readOnly:!0,type:s.A.ofType(d.A)})],t.prototype,"serviceSublayers",void 0),(0,i._)([(0,u.MZ)({value:null,type:f,json:{read:!1,write:{allowNull:!0,ignoreOrigin:!0}}})],t.prototype,"sublayers",void 0),(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"sublayersSourceJSON",void 0),(0,i._)([(0,u.MZ)({type:f,json:{read:{source:"tables"}}})],t.prototype,"subtables",void 0),t=(0,i._)([(0,y.$)("esri.layers.mixins.SublayersOwner")],t),t}},33143:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(90237),s=r(69540),o=r(25482),n=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),p=r(80451),y=r(29005);let c=class extends(s.A.ClonableMixin(o.A)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,n.MZ)({json:{write:!0}})],c.prototype,"id",void 0),(0,i._)([(0,n.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,i._)([(0,n.MZ)({json:{write:!0}})],c.prototype,"domains",void 0),(0,i._)([(0,a.w)("domains")],c.prototype,"readDomains",null),(0,i._)([(0,u.K)("domains")],c.prototype,"writeDomains",null),(0,i._)([(0,n.MZ)({type:[y.A],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,i._)([(0,l.$)("esri.layers.support.FeatureType")],c);const d=c},91880:(e,t,r)=>{r.d(t,{A:()=>y});var i,s=r(90237),o=r(66552),n=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new o.J({asc:"ascending",desc:"descending"});let p=i=class extends n.A{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,a.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,s._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,s._)([(0,a.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],p.prototype,"order",void 0),p=i=(0,s._)([(0,l.$)("esri.layers.support.OrderByInfo")],p);const y=p},60410:(e,t,r)=>{r.d(t,{A:()=>se});var i,s=r(90237),o=(r(59456),r(13874)),n=(r(86162),r(52464),r(65345),r(42980),r(20917),r(92438),r(96576),r(93618),r(65494),r(15036)),a=r(78888),l=r(61147),u=r(5503),p=r(49186),y=r(44208),c=r(4902),d=r(4718),h=r(92474),f=r(53966),m=r(92071),b=r(39516),g=r(84952),_=r(10107),S=r(79901),w=r(36005),v=r(40608),I=r(43937),x=r(56507),A=r(35666),M=r(88620),E=r(28132),O=r(32756),F=r(15426),D=r(33143),P=r(20437),T=r(95466),L=r(30524),C=r(81457),R=r(39383),Z=r(37352),q=r(91880),G=r(45067),j=r(22453),V=r(27733),N=r(49053),B=r(2272),k=r(54546),Q=r(61956),J=r(30291),$=r(5443),U=r(16930),z=r(50498);function K(e){return"esriSMS"===e?.type}function H(e,t,r){const i=this.originIdOf(t)>=(0,A.aB)(r.origin);return{ignoreOrigin:!0,allowNull:i,enabled:!!r&&"map-image"===r.layer?.type&&(r.writeSublayerStructure||i)}}function X(e,t,r){return{enabled:!!r&&"tile"===r.layer?.type&&(r.origin&&this.originIdOf(t)>=(0,A.aB)(r.origin)||this._isOverridden(t))}}function W(e,t,r){return{ignoreOrigin:!0,enabled:r&&r.writeSublayerStructure||!1}}function Y(e,t,r){return{ignoreOrigin:!0,enabled:!!r?.writeSublayerStructure&&this.originIdOf(t)>A.Gr.SERVICE}}function ee(e,t,r){return{ignoreOrigin:!0,enabled:!!r&&(r.writeSublayerStructure||this.originIdOf(t)>=(0,A.aB)(r.origin))}}let te=0;const re=new Set(["layer","parent","loaded","loadStatus","loadError","loadWarnings"]);let ie=i=class extends((0,m.P)(c.A.IdentifiableMixin(h.A))){constructor(e){super(e),this.capabilities=void 0,this.maxScaleRange={minScale:0,maxScale:0},this.fields=null,this.fullExtent=null,this.geometryType=null,this.globalIdField=null,this.isTable=!1,this.legendEnabled=!0,this.objectIdField=null,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.relationships=null,this.sourceJSON=null,this.spatialReference=null,this.title=null,this.typeIdField=null,this.type="sublayer",this.types=null,this._lastParsedUrl=null}async load(e){return this.addResolvingPromise((async()=>{const{layer:t,url:r}=this;if(!t&&!r)throw new p.A("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});const i=t?await t.fetchSublayerInfo(this,e):(await(0,a.A)(r,{responseType:"json",query:{f:"json"},...e})).data;i&&(this.sourceJSON=i,this.read({layerDefinition:i},{origin:"service",layer:t,url:(0,B.Dl)(r)}))})()),this}readCapabilities(e,t){t=t.layerDefinition||t;const{operations:{supportsQuery:r,supportsQueryAttachments:i},query:{supportsFormatPBF:s,supportsOrderBy:o,supportsPagination:n},data:{supportsAttachment:a},queryRelated:l}=(0,j.S)(t,this.url);return{exportMap:{supportsModification:!!t.canModifyLayer},operations:{supportsQuery:r,supportsQueryAttachments:i},data:{supportsAttachment:a},query:{supportsFormatPBF:s,supportsOrderBy:o,supportsPagination:n},queryRelated:l}}get defaultPopupTemplate(){return this.createPopupTemplate()}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}readMaxScaleRange(e,t){return{minScale:(t=t.layerDefinition||t).minScale??0,maxScale:t.maxScale??0}}get fieldsIndex(){return new T.A(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeGlobalID"===e.type)return e.name}get id(){return this._get("id")??te++}set id(e){this._get("id")!==e&&(!1!==this.layer?.capabilities?.exportMap?.supportsDynamicLayers?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}readIsTable(e,t){return"Table"===t.type}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,t,r,i){e&&e.length&&(t.layerDefinition={drawingInfo:{labelingInfo:e.map((e=>e.write({},i)))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers?.forEach((t=>t.layer=e))}set listMode(e){this._set("listMode",e)}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,t){return t.minScale||t.layerDefinition?.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,t){return t.maxScale||t.layerDefinition?.maxScale||0}readObjectIdFieldFromService(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;const r=t.fields?.find((e=>"esriFieldTypeOID"===e.type));return r?.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,t){const{layerDefinition:r}=t;return 1-.01*(r?.transparency??r?.drawingInfo?.transparency??0)}writeOpacity(e,t,r,i){t.layerDefinition={drawingInfo:{transparency:100-100*e}}}set orderBy(e){this._setAndNotifyLayer("orderBy",e)}writeParent(e,t){this.parent&&this.parent!==this.layer?t.parentLayerId=(0,x.Vr)(this.parent.id):t.parentLayerId=-1}get queryTask(){if(!this.layer)return null;const{capabilities:e,fieldsIndex:t,layer:r,url:i}=this,{spatialReference:s}=r,o="gdbVersion"in r?r.gdbVersion:void 0,n=(0,y.A)("featurelayer-pbf")&&e?.query.supportsFormatPBF;return new E.A({fieldsIndex:t,gdbVersion:o,pbfSupported:n,queryAttachmentsSupported:e?.operations?.supportsQueryAttachments??!1,sourceSpatialReference:s,url:i})}set renderer(e){if((0,L.yp)(e,this.fieldsIndex),e)for(const t of e.symbols)if((0,l.wk)(t)){f.A.getLogger(this).warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new N.f({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return(0,x.dp)(u.A.ofType(i),e)}writeSublayers(e,t,r){this.sublayers?.length&&(t[r]=this.sublayers.map((e=>e.id)).toArray().reverse())}readTitle(e,t){return t.layerDefinition?.name??t.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}get url(){const e=this.layer?.parsedUrl??this._lastParsedUrl,t=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===t?.type)return`${e.path}/${t.mapLayerId}`;const r={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${(0,g.x0)(r)}`}set url(e){this._overrideIfSome("url",e)}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,t,r,i){t[r]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=(0,M.oY)(this),t=new i;return(0,M.oY)(t).store=e.clone(re),this.commitProperty("url"),t._lastParsedUrl=this._lastParsedUrl,t}createPopupTemplate(e){return(0,J.tn)(this,e)}createQuery(){return new Q.A({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.hasOwnProperty("sublayers"))return null;const e=(await Promise.all([r.e(3029),r.e(777),r.e(3600),r.e(2935)]).then(r.bind(r,13600))).default,{layer:t,url:i}=this;let s;if(i&&this.originIdOf("url")>A.Gr.SERVICE)s=new e({url:i});else{if(!t?.parsedUrl)throw new p.A("createFeatureLayer:missing-information","Cannot create a FeatureLayer without a url or a parent layer");{const r=t.parsedUrl;s=new e({url:r.path}),r&&this.source&&("map-layer"===this.source.type?s.layerId=this.source.mapLayerId:s.dynamicDataSource=this.source)}}return null!=t?.refreshInterval&&(s.refreshInterval=t.refreshInterval),this.definitionExpression&&(s.definitionExpression=this.definitionExpression),this.floorInfo&&(s.floorInfo=(0,d.o8)(this.floorInfo)),this.originIdOf("labelingInfo")>A.Gr.SERVICE&&(s.labelingInfo=(0,d.o8)(this.labelingInfo)),this.originIdOf("labelsVisible")>A.Gr.DEFAULTS&&(s.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>A.Gr.DEFAULTS&&(s.legendEnabled=this.legendEnabled),this.originIdOf("visible")>A.Gr.DEFAULTS&&(s.visible=this.visible),this.originIdOf("minScale")>A.Gr.DEFAULTS&&(s.minScale=this.minScale),this.originIdOf("maxScale")>A.Gr.DEFAULTS&&(s.maxScale=this.maxScale),this.originIdOf("opacity")>A.Gr.DEFAULTS&&(s.opacity=this.opacity),this.originIdOf("popupTemplate")>A.Gr.DEFAULTS&&(s.popupTemplate=(0,d.o8)(this.popupTemplate)),this.originIdOf("renderer")>A.Gr.SERVICE&&(s.renderer=(0,d.o8)(this.renderer)),"data-layer"===this.source?.type&&(s.dynamicDataSource=this.source.clone()),this.originIdOf("title")>A.Gr.DEFAULTS&&(s.title=this.title),"map-image"===t?.type&&t.originIdOf("customParameters")>A.Gr.DEFAULTS&&(s.customParameters=t.customParameters),"tile"===t?.type&&t.originIdOf("customParameters")>A.Gr.DEFAULTS&&(s.customParameters=t.customParameters),s}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){return(0,F.xd)(this.types,this.typeIdField,e)}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)}async queryAttachments(e,t){await this.load(),e=k.A.from(e);const r=this.capabilities;if(!r?.data?.supportsAttachment)throw new p.A("queryAttachments:not-supported","this layer doesn't support attachments");const{attachmentTypes:i,objectIds:s,globalIds:o,num:n,size:a,start:l,where:u}=e;if(!r?.operations?.supportsQueryAttachments&&(i?.length>0||o?.length>0||a?.length>0||n||l||u))throw new p.A("queryAttachments:option-not-supported","when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",e);if(!(s?.length||o?.length||u))throw new p.A("queryAttachments:invalid-query","'objectIds', 'globalIds', or 'where' are required to perform attachment query",e);return this.queryTask.executeAttachmentQuery(e,t)}async queryFeatureCount(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new p.A("queryFeatureCount:not-supported","this layer doesn't support queries.");if(!this.url)throw new p.A("queryFeatureCount:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeForCount(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryFeatures(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new p.A("queryFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new p.A("queryFeatures:not-supported","this layer has no url.");const r=await this.queryTask.execute(e,{...t,query:{...this.layer?.customParameters,token:this.layer?.apiKey}});if(r?.features)for(const e of r.features)e.sourceLayer=this;return r}async queryObjectIds(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new p.A("queryObjectIds:not-supported","this layer doesn't support queries.");if(!this.url)throw new p.A("queryObjectIds:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeForIds(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryRelatedFeatures(e,t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new p.A("queryRelatedFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new p.A("queryRelatedFeatures:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeRelationshipQuery(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new p.A("queryRelatedFeaturesCount:not-supported","this layer doesn't support queries.");if(!this.capabilities.queryRelated.supportsCount)throw new p.A("queryRelatedFeaturesCount:not-supported","this layer doesn't support query related counts.");if(!this.url)throw new p.A("queryRelatedFeaturesCount:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeRelationshipQueryForCount(e,{...t,query:{...this.layer?.customParameters,token:r}})}toExportImageJSON(e){const t={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},r=(0,b.m)(e,this.definitionExpression);null!=r&&(t.definitionExpression=r);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce(((e,t)=>(e[t]=this.originIdOf(t),e)),{}),s=Object.keys(i).some((e=>i[e]>A.Gr.SERVICE));if(s){const e=t.drawingInfo={};if(i.renderer>A.Gr.SERVICE&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>A.Gr.SERVICE&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>A.Gr.SERVICE)if(this.labelingInfo){!this.loaded&&this.labelingInfo?.some((e=>!e.labelPlacement))&&f.A.getLogger(this).warnOnce(`A Sublayer (title: ${this.title}, id: ${this.id}) has an undefined 'labelPlacement' and so labels cannot be displayed. Either define a valid 'labelPlacement' or call Sublayer.load() to use a default value based on geometry type.`,{sublayer:this});let t=this.labelingInfo;null!=this.geometryType&&(t=(0,R.z)(this.labelingInfo,z.g.toJSON(this.geometryType))),e.showLabels=!0,e.labelingInfo=t.filter((e=>e.labelPlacement)).map((e=>e.toJSON({origin:"service",layer:this.layer})))}else e.showLabels=!1;i.opacity>A.Gr.SERVICE&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return(this.layer?.capabilities?.exportMap?.supportsSublayerOrderBy??!1)&&this.originIdOf("orderBy")>A.Gr.SERVICE&&(t.orderBy=this.orderBy?.map((e=>e.toJSON()))??null),t}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,(e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline?.color?e.color=e.outline.color:e.color=[0,0,0,0])}))}_forEachSimpleMarkerSymbols(e,t){if(e){const r=("uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:null)??[];for(const e of r)K(e.symbol)&&t(e.symbol);"symbol"in e&&K(e.symbol)&&t(e.symbol),"defaultSymbol"in e&&K(e.defaultSymbol)&&t(e.defaultSymbol)}}_setAndNotifyLayer(e,t){const r=this.layer,i=this._get(e);let s,o;switch(e){case"definitionExpression":case"floorInfo":s="supportsSublayerDefinitionExpression";break;case"minScale":case"maxScale":case"visible":s="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":s="supportsDynamicLayers",o="supportsModification";break;case"orderBy":s="supportsSublayerOrderBy",o="supportsModification"}const n=(0,M.oY)(this).getDefaultOrigin();if("service"!==n){if(s&&!1===this.layer?.capabilities?.exportMap?.[s])return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${s}'`);if(o&&!1===this.capabilities?.exportMap[o])return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${o}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,t),"service"!==n&&i!==t&&r&&r.emit&&r.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null,e.layer=null})),this.removeAllHandles()),e&&(e.forEach((e=>{e.parent=this,e.layer=this.layer})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,e.layer=this.layer})),e.on("after-remove",(({item:e})=>{e.parent=null,e.layer=null})),e.on("before-changes",(e=>{(this.layer?.capabilities?.exportMap?.supportsSublayersChanges??1)||(f.A.getLogger(this).error(new p.A("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())}))]))}_logLockedError(e,t){const{layer:r,declaredClass:i}=this;f.A.getLogger(i).error(new p.A("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${r?.id}'`,{reason:t,sublayer:this,layer:r}))}_getLayerDomain(e){return this.fieldsIndex.get(e)?.domain??null}};ie.test={isMapImageLayerOverridePolicy:e=>e===Y||e===W||e===H,isTileImageLayerOverridePolicy:e=>e===X},(0,s._)([(0,_.MZ)({readOnly:!0})],ie.prototype,"capabilities",void 0),(0,s._)([(0,w.w)("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],ie.prototype,"readCapabilities",null),(0,s._)([(0,_.MZ)()],ie.prototype,"defaultPopupTemplate",null),(0,s._)([(0,_.MZ)({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:H}}})],ie.prototype,"definitionExpression",null),(0,s._)([(0,_.MZ)({readOnly:!0})],ie.prototype,"effectiveScaleRange",null),(0,s._)([(0,w.w)("service","maxScaleRange",["minScale","maxScale"])],ie.prototype,"readMaxScaleRange",null),(0,s._)([(0,_.MZ)({type:[P.A],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],ie.prototype,"fields",void 0),(0,s._)([(0,_.MZ)({readOnly:!0})],ie.prototype,"fieldsIndex",null),(0,s._)([(0,_.MZ)({type:Z.A,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:H},origins:{"web-scene":{read:!1,write:!1}}}})],ie.prototype,"floorInfo",null),(0,s._)([(0,_.MZ)({type:$.A,json:{read:{source:"layerDefinition.extent"}}})],ie.prototype,"fullExtent",void 0),(0,s._)([(0,_.MZ)({type:z.g.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:z.g.read}}}}})],ie.prototype,"geometryType",void 0),(0,s._)([(0,_.MZ)({type:String})],ie.prototype,"globalIdField",void 0),(0,s._)([(0,w.w)("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],ie.prototype,"readGlobalIdFieldFromService",null),(0,s._)([(0,_.MZ)({type:x.jz,json:{write:{ignoreOrigin:!0}}})],ie.prototype,"id",null),(0,s._)([(0,_.MZ)({readOnly:!0})],ie.prototype,"isTable",void 0),(0,s._)([(0,w.w)("service","isTable",["type"])],ie.prototype,"readIsTable",null),(0,s._)([(0,_.MZ)({value:null,type:[C.A],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:Y}}})],ie.prototype,"labelingInfo",null),(0,s._)([(0,I.K)("labelingInfo")],ie.prototype,"writeLabelingInfo",null),(0,s._)([(0,_.MZ)({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:W}}})],ie.prototype,"labelsVisible",null),(0,s._)([(0,_.MZ)({value:null})],ie.prototype,"layer",null),(0,s._)([(0,_.MZ)({type:String,json:{write:{overridePolicy:X}}})],ie.prototype,"layerItemId",void 0),(0,s._)([(0,_.MZ)({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:ee}}})],ie.prototype,"legendEnabled",void 0),(0,s._)([(0,_.MZ)({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],ie.prototype,"listMode",null),(0,s._)([(0,_.MZ)({type:Number,value:0,json:{write:{overridePolicy:W}}})],ie.prototype,"minScale",null),(0,s._)([(0,w.w)("minScale",["minScale","layerDefinition.minScale"])],ie.prototype,"readMinScale",null),(0,s._)([(0,_.MZ)({type:Number,value:0,json:{write:{overridePolicy:W}}})],ie.prototype,"maxScale",null),(0,s._)([(0,w.w)("maxScale",["maxScale","layerDefinition.maxScale"])],ie.prototype,"readMaxScale",null),(0,s._)([(0,_.MZ)()],ie.prototype,"objectIdField",void 0),(0,s._)([(0,w.w)("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],ie.prototype,"readObjectIdFieldFromService",null),(0,s._)([(0,_.MZ)({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:W}}})],ie.prototype,"opacity",null),(0,s._)([(0,w.w)("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],ie.prototype,"readOpacity",null),(0,s._)([(0,I.K)("opacity")],ie.prototype,"writeOpacity",null),(0,s._)([(0,_.MZ)({value:null,type:[q.A],json:{name:"layerDefinition.orderBy",read:{reader:O.Rr}}})],ie.prototype,"orderBy",null),(0,s._)([(0,_.MZ)({json:{type:x.jz,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:W}}})],ie.prototype,"parent",void 0),(0,s._)([(0,I.K)("parent")],ie.prototype,"writeParent",null),(0,s._)([(0,_.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy:ee,writer(e,t,r){t[r]=!e}}}})],ie.prototype,"popupEnabled",void 0),(0,s._)([(0,_.MZ)({type:o.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:ee}}})],ie.prototype,"popupTemplate",void 0),(0,s._)([(0,_.MZ)({readOnly:!0})],ie.prototype,"queryTask",null),(0,s._)([(0,_.MZ)({type:[G.A],readOnly:!0,json:{origins:{service:{read:{source:"layerDefinition.relationships"}}}}})],ie.prototype,"relationships",void 0),(0,s._)([(0,_.MZ)({types:n.H,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:Y},origins:{"web-scene":{types:n.X,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:Y}}}}})],ie.prototype,"renderer",null),(0,s._)([(0,_.MZ)({types:{key:"type",base:null,typeMap:{"data-layer":V.L,"map-layer":N.f}},cast(e){if(e){if("mapLayerId"in e)return(0,x.PZ)(N.f,e);if("dataSource"in e)return(0,x.PZ)(V.L,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:W}}})],ie.prototype,"source",null),(0,s._)([(0,_.MZ)()],ie.prototype,"sourceJSON",void 0),(0,s._)([(0,_.MZ)({type:U.A,json:{origins:{service:{read:{source:"layerDefinition.extent.spatialReference"}}}}})],ie.prototype,"spatialReference",void 0),(0,s._)([(0,_.MZ)({value:null,json:{type:[x.jz],write:{target:"subLayerIds",allowNull:!0,overridePolicy:W}}})],ie.prototype,"sublayers",null),(0,s._)([(0,S.w)("sublayers")],ie.prototype,"castSublayers",null),(0,s._)([(0,I.K)("sublayers")],ie.prototype,"writeSublayers",null),(0,s._)([(0,_.MZ)({type:String,json:{name:"name",write:{overridePolicy:ee}}})],ie.prototype,"title",void 0),(0,s._)([(0,w.w)("service","title",["name","layerDefinition.name"])],ie.prototype,"readTitle",null),(0,s._)([(0,_.MZ)({type:String})],ie.prototype,"typeIdField",void 0),(0,s._)([(0,_.MZ)({json:{read:!1},readOnly:!0,value:"sublayer"})],ie.prototype,"type",void 0),(0,s._)([(0,w.w)("typeIdField",["layerDefinition.typeIdField"])],ie.prototype,"readTypeIdField",null),(0,s._)([(0,_.MZ)({type:[D.A],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],ie.prototype,"types",void 0),(0,s._)([(0,_.MZ)({type:String,json:{name:"layerUrl",write:{overridePolicy:X}}})],ie.prototype,"url",null),(0,s._)([(0,_.MZ)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:W}}})],ie.prototype,"visible",null),(0,s._)([(0,I.K)("visible")],ie.prototype,"writeVisible",null),ie=i=(0,s._)([(0,v.$)("esri.layers.support.Sublayer")],ie);const se=ie},33446:(e,t,r)=>{r.d(t,{C:()=>n,m:()=>o});var i=r(49186),s=r(74887);async function o(e,t,r){let o;try{o=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.Te)(r),o}async function n(e,t,r,o,n){let a;try{a=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load tile ${t}/${r}/${o}`,{error:e,level:t,row:r,col:o})}return(0,s.Te)(n),a}},32730:(e,t,r)=>{r.d(t,{BI:()=>m,D3:()=>h,XJ:()=>f,lc:()=>d,mX:()=>g,rU:()=>b,tH:()=>I});var i=r(799);const s="__begin__",o="__end__",n=new RegExp(s,"ig"),a=new RegExp(o,"ig"),l=new RegExp("^"+s,"i"),u=new RegExp(o+"$","i"),p='"',y=p+" + ",c=" + "+p;function d(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=d(e.labelExpression),t.type="conventional"),t}function m(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return g(t.expression);case"arcade":return t.expression}return null}function b(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(_);return t?.[1].trim()||null}(t.expression);case"arcade":return I(t.expression)}return null}function g(e){let t;return e?(t=(0,i.HC)(e,(e=>s+'$feature["'+e+'"]'+o)),t=l.test(t)?t.replace(l,""):p+t,t=u.test(t)?t.replace(u,""):t+p,t=t.replaceAll(n,y).replaceAll(a,c)):t='""',t}const _=/^\s*\{([^}]+)\}\s*$/i,S=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,w=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,v=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function I(e){if(!e)return null;let t=S.exec(e)||w.exec(e);return t?t[1]||t[3]:(t=v.exec(e),t?t[2]:null)}},63389:(e,t,r)=>{r.d(t,{Sk:()=>o,Zx:()=>s,_X:()=>a});var i=r(35666);function s(e,t,r){const i=t.flatten((({sublayers:e})=>e)).length;return i!==e.length||!!e.some((e=>e.originIdOf("minScale")>r||e.originIdOf("maxScale")>r||e.originIdOf("renderer")>r||e.originIdOf("labelingInfo")>r||e.originIdOf("opacity")>r||e.originIdOf("labelsVisible")>r||e.originIdOf("source")>r))||!n(e,t)}function o(e,t,r){return!!e.some((e=>{const t=e.source,s=!t||"map-layer"===t.type&&t.mapLayerId===e.id&&(null==t.gdbVersion||t.gdbVersion===r);e.commitProperty("renderer"),e.commitProperty("labelingInfo"),e.commitProperty("opacity"),e.commitProperty("labelsVisible"),e.commitProperty("orderBy");const o=e.layer?.capabilities?.exportMap?.supportsSublayerOrderBy??!1;return!s||e.originIdOf("renderer")>i.Gr.SERVICE||e.originIdOf("labelingInfo")>i.Gr.SERVICE||e.originIdOf("opacity")>i.Gr.SERVICE||e.originIdOf("labelsVisible")>i.Gr.SERVICE||o&&e.originIdOf("orderBy")>i.Gr.SERVICE}))||!n(e,t)}function n(e,t){if(!e?.length||null==t)return!0;const r=t.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).map((e=>e.id)).toArray();if(e.length>r.length)return!1;let i=0;const s=r.length;for(const{id:t}of e){for(;i<s&&r[i]!==t;)i++;if(i>=s)return!1}return!0}function a(e){return!!e&&e.some((e=>null!=e.minScale||null!=e.layerDefinition?.minScale))}},20615:(e,t,r)=>{r.d(t,{I:()=>n});var i=r(2272),s=r(80893),o=r(61956);async function n(e,t,r){const n=(0,i.Dl)(e),{data:a}=await(0,s.gW)(n,o.A.from(t),r);return a.count}},78286:(e,t,r)=>{r.d(t,{V:()=>n});var i=r(2272),s=r(80893),o=r(61956);async function n(e,t,r){const n=(0,i.Dl)(e),{data:a}=await(0,s.Pk)(n,o.A.from(t),r);return a.objectIds}},99199:(e,t,r)=>{r.d(t,{e:()=>l,s:()=>a});var i=r(2272),s=r(80893),o=r(22671),n=r(61956);async function a(e,t,r){const i=await l(e,t,r);return o.A.fromJSON(i)}async function l(e,t,r){const o=(0,i.Dl)(e),a={...r},l=n.A.from(t),{data:u}=await(0,s.eW)(o,l,l.sourceSpatialReference,a);return u}},58501:(e,t,r)=>{r.d(t,{q:()=>s});var i=r(62815);function s(e,t,r){if(!r?.features||!r.hasZ)return;const s=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of r.features)s(e.geometry)}},22671:(e,t,r)=>{r.d(t,{A:()=>_});var i,s=r(90237),o=r(59456),n=r(52106),a=r(66552),l=r(25482),u=r(4718),p=r(10107),y=(r(44208),r(53966),r(36005)),c=r(40608),d=r(43937),h=r(16930),f=r(65864),m=r(20437);const b=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let g=i=class extends l.A{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=h.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const s=e[t],o=n.A.fromJSON(s),a=s.geometry?.spatialReference;null==o.geometry||a||(o.geometry.spatialReference=r);const l=s.aggregateGeometries,u=o.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],i=l[e],s=i?.spatialReference;null==t||s||(t.spatialReference=r)}i.push(o)}return i}writeGeometryType(e,t,r,i){if(e)return void b.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void b.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,f.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.A.fromJSON(t.spatialReference)),i}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 i(this.cloneProperties())}cloneProperties(){return(0,u.o8)({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 i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,o=this.features,n=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((s-e)/r)));for(let e=0,t=o.length;e<t;e++)n?.(o[e].geometry)||(o.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:[i,s],scale:[o,n]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*o+i),(e=>s-e*n),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,s;const o=[];for(let n=0,a=e.length;n<a;n++){const a=e[n];if(n>0){const e=t(a[0]),n=r(a[1]);e===i&&n===s||(o.push([e-i,n-s]),i=e,s=n)}else i=t(a[0]),s=r(a[1]),o.push([i,s])}return o.length>0?o: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 i=(0,f.Bi)(e)?e.rings:e.paths,s=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],n=this._quantizePoints(o,t,r);n&&s.push(n)}return s.length>0?((0,f.Bi)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,f.Bi)(e)?e.rings:e.paths;let n,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(n+=s[0],a+=s[1]):(n=s[0],a=s[1]),s[0]=t(n),s[1]=r(a)}}if(i&&s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=s(r[3])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(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),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let n,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(n+=i[0],a+=i[1]):(n=i[0],a=i[1]),i[0]=t(n),i[1]=r(a)}if(i&&s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=s(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(s)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,p.MZ)({type:String,json:{write:!0}})],g.prototype,"displayFieldName",void 0),(0,s._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,p.MZ)({type:[n.A],json:{write:!0}})],g.prototype,"features",void 0),(0,s._)([(0,y.w)("features")],g.prototype,"readFeatures",null),(0,s._)([(0,p.MZ)({type:[m.A],json:{write:!0}})],g.prototype,"fields",void 0),(0,s._)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:b.read}}})],g.prototype,"geometryType",void 0),(0,s._)([(0,d.K)("geometryType")],g.prototype,"writeGeometryType",null),(0,s._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasM",void 0),(0,s._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasZ",void 0),(0,s._)([(0,p.MZ)({types:o.yR,json:{write:!0}})],g.prototype,"queryGeometry",void 0),(0,s._)([(0,y.w)("queryGeometry")],g.prototype,"readQueryGeometry",null),(0,s._)([(0,p.MZ)({type:h.A,json:{write:!0}})],g.prototype,"spatialReference",void 0),(0,s._)([(0,d.K)("spatialReference")],g.prototype,"writeSpatialReference",null),(0,s._)([(0,p.MZ)({json:{write:!0}})],g.prototype,"transform",void 0),g=i=(0,s._)([(0,c.$)("esri.rest.support.FeatureSet")],g),g.prototype.toJSON.isDefaultToJSON=!0;const _=g}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[629,7136],{67482:(e,t,s)=>{function n(e){return null!=u(e)||null!=o(e)}function r(e){return a.test(e)}function i(e){return u(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let s=!0;if(p&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,n=0;for(;!t&&n<=e.length;)t=!l.test(e[n]),n++;s=!t}}return s}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function u(e){const t=a.exec(e);if(!t?.groups)return null;const s=t.groups,n=+s.year,r=+s.month-1,i=+s.day,o=+(s.hours??"0"),u=+(s.minutes??"0"),l=+(s.seconds??"0");if(o>23)return null;if(u>59)return null;if(l>59)return null;const p=s.ms??"0",c=p?+p.padEnd(3,"0").slice(0,3):0;let d;if(s.isUTC||!s.offsetSign)d=Date.UTC(n,r,i,o,u,l,c);else{const e=+s.offsetHours,t=+s.offsetMinutes;d=6e4*("+"===s.offsetSign?-1:1)*(60*e+t)+Date.UTC(n,r,i,o,u,l,c)}return Number.isNaN(d)?null:d}s.d(t,{Br:()=>r,Cq:()=>n,_U:()=>i});const a=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,l=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,p=!Number.isNaN(new Date("technology 10").getTime())},17136:(e,t,s)=>{s.d(t,{el:()=>A});var n=s(92602),r=s(49186),i=s(53966),o=s(39829),u=s(82799),a=s(80754),l=s(21325),p=s(28735),c=(s(59456),s(78888)),d=s(65864),f=s(2272),y=s(84952),h=s(92300);const m=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function S(e){return"polyline"===e[0].type}function b(e,t,s){if(t){const t=function(e,t){if(!(e instanceof u.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m().error(e),new r.A(e)}const s=(0,a.r8)(e),n=[];for(const e of s){const s=[];n.push(s),s.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const r=e[n][0],i=e[n][1],o=e[n+1][0],u=e[n+1][1],a=Math.sqrt((o-r)*(o-r)+(u-i)*(u-i)),l=(u-i)/a,p=(o-r)/a,c=a/t;if(c>1){for(let e=1;e<=c-1;e++){const n=e*t,o=p*n+r,u=l*n+i;s.push([o,u])}const e=(a+Math.floor(c-1)*t)/2,n=p*e+r,o=l*e+i;s.push([n,o])}s.push([o,u])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:n,spatialReference:e.spatialReference}):new u.A({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return s&&(e=(0,a.kS)(e,s)),e}function F(e,t,s){if(Array.isArray(e)){const n=e[0];if(n>t){const s=(0,a.kd)(n,t);e[0]=n+s*(-2*t)}else if(n<s){const t=(0,a.kd)(n,s);e[0]=n+t*(-2*s)}}else{const n=e.x;if(n>t){const s=(0,a.kd)(n,t);e=e.clone().offset(s*(-2*t),0)}else if(n<s){const t=(0,a.kd)(n,s);e=e.clone().offset(t*(-2*s),0)}}return e}function w(e,t){let s=-1;for(let n=0;n<t.cutIndexes.length;n++){const r=t.cutIndexes[n],i=t.geometries[n],o=(0,a.r8)(i);for(let e=0;e<o.length;e++){const t=o[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const n=t[e][0];s=n>s?n:s}s=Number(s.toFixed(9));const n=-360*(0,a.kd)(s,180);for(let s=0;s<t.length;s++){const t=i.getPoint(e,s);i.setPoint(e,s,t.clone().offset(n,0))}return!0}}))}if(r===s){if(g(e))for(const t of(0,a.r8)(i))e[r]=e[r].addRing(t);else if(S(e))for(const t of(0,a.r8)(i))e[r]=e[r].addPath(t)}else s=r,e[r]=i}return e}async function A(e,t,s){if(!Array.isArray(e))return A([e],t);t&&"string"!=typeof t&&m().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??n.A.geometryServiceUrl;let i,g,S,_,I,T,x,E,C=0;const R=[],j=[];for(const t of e)if(null!=t)if(i||(i=t.spatialReference,g=(0,l.Vp)(i),S=i.isWebMercator,T=S?102100:4326,_=a.j7[T].maxX,I=a.j7[T].minX,x=a.j7[T].plus180Line,E=a.j7[T].minus180Line),g)if("mesh"===t.type)j.push(t);else if("point"===t.type)j.push(F(t.clone(),_,I));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>F(e,_,I))),j.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);j.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,s=(0,a.kd)(e.xmin,I)*(2*_);let n=0===s?t.clone():(0,a.kS)(t.clone(),s);e.offset(s,0);let{xmin:r,xmax:i}=e;r=Number(r.toFixed(9)),i=Number(i.toFixed(9)),e.intersects(x)&&i!==_?(C=i>C?i:C,n=b(n,S),R.push(n),j.push("cut")):e.intersects(E)&&r!==I?(C=i*(2*_)>C?i*(2*_):C,n=b(n,S,360),R.push(n),j.push("cut")):j.push(n)}else j.push(t.clone());else j.push(t);else j.push(t);let q=(0,a.kd)(C,_),M=-90;const P=q,k=new u.A;for(;q>0;){const e=360*q-180;k.addPath([[e,M],[e,-1*M]]),M*=-1,q--}if(R.length>0&&P>0){const t=w(R,await async function(e,t,s,n){const r=(0,f.Dl)(e),i=t[0].spatialReference,o={...n,responseType:"json",query:{...r.query,f:"json",sr:(0,l.YX)(i),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},u=await(0,c.A)(r.path+"/cut",o),{cutIndexes:a,geometries:p=[]}=u.data;return{cutIndexes:a,geometries:p.map((e=>{const t=(0,d.rS)(e);return t.spatialReference=i,t}))}}(r,R,k,s)),n=[],i=[];for(let s=0;s<j.length;s++){const r=j[s];if("cut"!==r)i.push(r);else{const r=t.shift(),o=e[s];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&r.rings.length>=o.rings.length?(n.push(r),i.push("simplify")):i.push(S?(0,p.Gh)(r):r)}}if(!n.length)return i;const o=await async function(e,t,s){const n="string"==typeof e?(0,y.An)(e):e,r=t[0].spatialReference,i=(0,d.$B)(t[0]),o={...s,query:{...n.query,f:"json",sr:(0,l.YX)(r),geometries:JSON.stringify((0,h.X)(t))}},{data:u}=await(0,c.A)(n.path+"/simplify",o);return(0,h.V)(u.geometries,i,r)}(r,n,s),u=[];for(let e=0;e<i.length;e++){const t=i[e];"simplify"!==t?u.push(t):u.push(S?(0,p.Gh)(o.shift()):o.shift())}return u}const O=[];for(let e=0;e<j.length;e++){const t=j[e];if("cut"!==t)O.push(t);else{const e=R.shift();O.push(!0===S?(0,p.Gh)(e):e)}}return O}},80754:(e,t,s)=>{s.d(t,{j7:()=>o,kS:()=>a,kd:()=>u,r8:()=>l});var n=s(82799),r=s(16930),i=s(65864);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function u(e,t){return Math.ceil((e-t)/(2*t))}function a(e,t){const s=l(e);for(const e of s)for(const s of e)s[0]+=t;return e}function l(e){return(0,i.Bi)(e)?e.rings:e.paths}},71202:(e,t,s)=>{s.r(t),s.d(t,{default:()=>_});var n=s(78888),r=s(60999),i=s(49186),o=s(53966),u=s(74887),a=s(65864),l=s(21325),p=s(90708),c=s(58376),d=s(83221),f=s(31464),y=s(19730),h=s(85113),m=s(64714),g=s(82832),S=s(95466),b=s(98453),F=s(30524),w=s(56400);const A={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsQueryWithCacheHint:!0,supportsQueryWithDistance:!0,supportsQueryWithResultType:!0,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0}};class _{constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e,t={}){this._loadOptions={url:e.url,customParameters:e.customParameters};const s=[],[n]=await Promise.all([e.url?this._fetch(t?.signal):null,this._checkProjection(e.spatialReference)]),r=(0,h.BM)(n,{geometryType:e.geometryType}),o=e.fields||r.fields||[],u=null!=e.hasZ?e.hasZ:r.hasZ,a=r.geometryType;let p=e.objectIdField||r.objectIdFieldName||"__OBJECTID";const c=e.spatialReference||l.KK;let f=e.timeInfo;o===r.fields&&r.unknownFields.length>0&&s.push({name:"geojson-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:r.unknownFields}});const g=new S.A(o);let _=g.get(p);_?("esriFieldTypeString"!==_.type&&(_.type="esriFieldTypeOID"),_.editable=!1,_.nullable=!1,p=_.name):(_={alias:p,name:p,type:"string"===r.objectIdFieldType?"esriFieldTypeString":"esriFieldTypeOID",editable:!1,nullable:!1},o.unshift(_));const I={};for(const e of o){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),!e.name)throw new i.A("geojson-layer:invalid-field-name","field name is missing",{field:e});if(!b.m.jsonValues.includes(e.type))throw new i.A("geojson-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e});if(e.name!==_.name){const t=(0,F.lD)(e);void 0!==t&&(I[e.name]=t)}null==e.length&&(e.length=(0,F._b)(e))}if(f){if(f.startTimeField){const e=g.get(f.startTimeField);e?(f.startTimeField=e.name,e.type="esriFieldTypeDate"):f.startTimeField=null}if(f.endTimeField){const e=g.get(f.endTimeField);e?(f.endTimeField=e.name,e.type="esriFieldTypeDate"):f.endTimeField=null}if(f.trackIdField){const e=g.get(f.trackIdField);e?f.trackIdField=e.name:(f.trackIdField=null,s.push({name:"geojson-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:f}}))}f.startTimeField||f.endTimeField||(s.push({name:"geojson-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:f}}),f=null)}const T=a?(0,m.F0)(a):void 0,x=g.dateFields.length?{timeZoneIANA:w.n$}:null,E={warnings:s,featureErrors:[],layerDefinition:{...A,drawingInfo:T??void 0,templates:(0,m.e2)(I),extent:void 0,geometryType:a,objectIdField:p,fields:o,hasZ:!!u,timeInfo:f,dateFieldsTimeReference:x}};this._queryEngine=new y.do({fieldsIndex:S.A.fromLayerJSON({fields:o,timeInfo:f,dateFieldsTimeReference:x}),geometryType:a,hasM:!1,hasZ:u,objectIdField:p,spatialReference:c,timeInfo:f,featureStore:new d.A({geometryType:a,hasM:!1,hasZ:u})});const C=this._queryEngine.fieldsIndex.requiredFields.indexOf(_);C>-1&&this._queryEngine.fieldsIndex.requiredFields.splice(C,1),this._createDefaultAttributes=(0,m.Vx)(I,p);const R=await this._createFeatures(n);this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,R);const j=this._normalizeFeatures(R,E.featureErrors);this._queryEngine.featureStore.addMany(j);const{fullExtent:q,timeExtent:M}=await this._queryEngine.fetchRecomputedExtents();if(E.layerDefinition.extent=q,M){const{start:e,end:t}=M;E.layerDefinition.timeInfo.timeExtent=[e,t]}return E}async applyEdits(e){const{spatialReference:t,geometryType:s}=this._queryEngine;return await Promise.all([(0,g.$1)(t,s),(0,f.Nk)(e.adds,t),(0,f.Nk)(e.updates,t)]),await this._waitSnapshotComplete(),this._applyEdits(e)}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),(0,c.J)(this._queryEngine,e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,r.UT)(this._snapshotFeatures),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,e);const t=this._normalizeFeatures(e);t&&this._queryEngine.featureStore.addMany(t)}),(e=>{this._queryEngine.featureStore.clear(),(0,u.zf)(e)||o.A.getLogger("esri.layers.GeoJSONLayer").error(new i.A("geojson-layer:refresh","An error occurred during refresh",{error:e}))})),await this._waitSnapshotComplete();const{fullExtent:t,timeExtent:s}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:s}}async _createFeatures(e){if(null==e)return[];const{geometryType:t,hasZ:s,objectIdField:n}=this._queryEngine,r=(0,h.bd)(e,{geometryType:t,hasZ:s,objectIdField:n});if(!(0,l.aI)(this._queryEngine.spatialReference,l.KK))for(const e of r)null!=e.geometry&&(e.geometry=(0,p.Ux)((0,f.Cv)((0,p.zv)(e.geometry,this._queryEngine.geometryType,this._queryEngine.hasZ,!1),l.KK,this._queryEngine.spatialReference)));return r}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:s}=this._loadOptions,r=(await(0,n.A)(t??"",{responseType:"json",query:{...s},signal:e})).data;return(0,h.sO)(r),r}_normalizeFeatures(e,t){const{objectIdField:s,fieldsIndex:n}=this._queryEngine,r=[];for(const i of e){const e=this._createDefaultAttributes(),o=(0,g.MB)(n,e,i.attributes,!0);o?t?.push(o):(this._assignObjectId(e,i.attributes,!0),i.attributes=e,i.objectId=e[s],r.push(i))}return r}async _applyEdits(e){const{adds:t,updates:s,deletes:n}=e,r={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t?.length&&this._applyAddEdits(r,t),s?.length&&this._applyUpdateEdits(r,s),n?.length){for(const e of n)r.deleteResults.push((0,g.bP)(e));this._queryEngine.featureStore.removeManyById(n)}const{fullExtent:i,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();return{extent:i,timeExtent:o,featureEditResults:r}}_applyAddEdits(e,t){const{addResults:s}=e,{geometryType:n,hasM:r,hasZ:i,objectIdField:o,spatialReference:u,featureStore:l,fieldsIndex:c}=this._queryEngine,d=[];for(const r of t){if(r.geometry&&n!==(0,a.$B)(r.geometry)){s.push((0,g.Yx)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),i=(0,g.MB)(c,t,r.attributes);if(i)s.push(i);else{if(this._assignObjectId(t,r.attributes),r.attributes=t,null!=r.uid){const t=r.attributes[o];e.uidToObjectId[r.uid]=t}if(null!=r.geometry){const e=r.geometry.spatialReference??u;r.geometry=(0,f.Cv)((0,g.CR)(r.geometry,e),e,u)}d.push(r),s.push((0,g.bP)(r.attributes[o]))}}l.addMany((0,p.Di)([],d,n,i,r,o))}_applyUpdateEdits({updateResults:e},t){const{geometryType:s,hasM:n,hasZ:r,objectIdField:i,spatialReference:o,featureStore:u,fieldsIndex:l}=this._queryEngine;for(const c of t){const{attributes:t,geometry:d}=c,y=t?.[i];if(null==y){e.push((0,g.Yx)(`Identifier field ${i} missing`));continue}if(!u.has(y)){e.push((0,g.Yx)(`Feature with object id ${y} missing`));continue}const h=(0,p.oN)(u.getFeature(y),s,r,n);if(null!=d){if(s!==(0,a.$B)(d)){e.push((0,g.Yx)("Incorrect geometry type."));continue}const t=d.spatialReference??o;h.geometry=(0,f.Cv)((0,g.CR)(d,t),t,o)}if(t){const s=(0,g.MB)(l,h.attributes,t);if(s){e.push(s);continue}}u.add((0,p.E2)(h,s,r,n,i)),e.push((0,g.bP)(y))}}_createObjectIdGenerator(e,t){const s=e.fieldsIndex.get(e.objectIdField);if("esriFieldTypeString"===s.type)return()=>s.name+"-"+Date.now().toString(16);let n=Number.NEGATIVE_INFINITY;for(const e of t)e.objectId&&(n=Math.max(n,e.objectId));return n=Math.max(0,n)+1,()=>n++}_assignObjectId(e,t,s=!1){const n=this._queryEngine.objectIdField;e[n]=s&&n in t?t[n]:this._objectIdGenerator()}async _checkProjection(e){try{await(0,f.Nk)(l.KK,e)}catch{throw new i.A("geojson-layer","Projection not supported")}}}},85113:(e,t,s)=>{s.d(t,{BM:()=>I,bd:()=>T,sO:()=>_,xD:()=>p});var n=s(67482),r=s(49186),i=s(21325),o=s(43334),u=s(92722),a=s(30524);const l={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function p(e){return l[e]}function*c(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*d(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function f(e){for(const t of e)if(t.length>2)return!0;return!1}function y(e){let t=0;for(let s=0;s<e.length;s++){const n=e[s],r=e[(s+1)%e.length];t+=n[0]*r[1]-r[0]*n[1]}return t<=0}function h(e){const t=e[0],s=e[e.length-1];return t[0]===s[0]&&t[1]===s[1]&&t[2]===s[2]||e.push(t),e}function m(e,t,s){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,s){return b(e,t.coordinates,s),e}(e,t,s);case"MultiLineString":return function(e,t,s){for(const n of t.coordinates)b(e,n,s);return e}(e,t,s);case"MultiPolygon":return function(e,t,s){for(const n of t.coordinates){g(e,n[0],s);for(let t=1;t<n.length;t++)S(e,n[t],s)}return e}(e,t,s);case"Point":return function(e,t,s){return w(e,t.coordinates,s),e}(e,t,s);case"Polygon":return function(e,t,s){const n=t.coordinates;g(e,n[0],s);for(let t=1;t<n.length;t++)S(e,n[t],s);return e}(e,t,s)}}function g(e,t,s){const n=h(t);!function(e){return!y(e)}(n)?b(e,n,s):F(e,n,s)}function S(e,t,s){const n=h(t);!function(e){return y(e)}(n)?b(e,n,s):F(e,n,s)}function b(e,t,s){for(const n of t)w(e,n,s);e.lengths.push(t.length)}function F(e,t,s){for(let n=t.length-1;n>=0;n--)w(e,t[n],s);e.lengths.push(t.length)}function w(e,t,s){const[n,r,i]=t;e.coords.push(n,r),s.hasZ&&e.coords.push(i||0)}function A(e){switch(typeof e){case"string":return(0,n.Br)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function _(e,t=4326){if(!e)throw new r.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new r.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:s}=e;if(!s)return;const n="string"==typeof s?s:"name"===s.type?s.properties.name:"EPSG"===s.type?s.properties.code:null,o=(0,i.oT)({wkid:t})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${t})$`,"i");if(!n||!o.test(n))throw new r.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:s})}function I(e,t={}){const s=[],n=new Set,r=new Set;let i,o=!1,u=null,l=!1,{geometryType:y=null}=t;for(const t of c(e)){const{geometry:e,properties:c,id:h}=t;if((!e||(y||(y=p(e.type)),p(e.type)===y))&&(o||(o=f(d(e))),l||(l=null!=h,l&&(i=typeof h,c&&(u=Object.keys(c).filter((e=>c[e]===h))))),c&&u&&l&&null!=h&&(u.length>1?u=u.filter((e=>c[e]===h)):1===u.length&&(u=c[u[0]]===h?u:[])),c))for(const e in c){if(n.has(e))continue;const t=A(c[e]);if("unknown"===t){r.add(e);continue}r.delete(e),n.add(e);const i=(0,a.rS)(e);i&&s.push({name:i,alias:e,type:t})}}const h=(0,a.rS)(1===u?.length&&u[0]||null)??void 0;if(h)for(const e of s)if(e.name===h&&(0,a.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:s,geometryType:y,hasZ:o,objectIdFieldName:h,objectIdFieldType:i,unknownFields:Array.from(r)}}function T(e,t){return Array.from(function*(e,t={}){const{geometryType:s,objectIdField:n}=t;for(const r of e){const{geometry:e,properties:i,id:a}=r;if(e&&p(e.type)!==s)continue;const l=i||{};let c;n&&(c=l[n],null==a||c||(l[n]=c=a));const d=new o.Om(e?m(new u.A,e,t):null,l,null,c??void 0);yield d}}(c(e),t))}},64714:(e,t,s)=>{s.d(t,{F0:()=>a,Vx:()=>c,e2:()=>f,f:()=>y});var n=s(44208),r=s(4718),i=s(99352),o=s(4071),u=s(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?u.Cb:"esriGeometryPolyline"===e?u.yM:u.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function c(e,t){if((0,n.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let s=`this${d(t)} = null;`;for(const t in e)s+=`this${d(t)} = ${JSON.stringify(e[t])};`;const n=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new n}catch(s){return()=>({[t]:null,...e})}}function d(e){return l.test(e)?`.${e}`:`["${e}"]`}function f(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,r.o8)(e)}}]}function y(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!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,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:o.$,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},82832:(e,t,s)=>{s.d(t,{$1:()=>m,CR:()=>h,MB:()=>d,Yx:()=>a,bP:()=>p});var n=s(67482),r=s(21325),i=s(30524);class o{constructor(){this.code=null,this.description=null}}class u{constructor(e){this.error=new o,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=e}}function a(e){return new u(e)}class l{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function p(e){return new l(e)}const c=new Set;function d(e,t,s,n=!1){c.clear();for(const r in s){const o=e.get(r);if(!o)continue;const u=f(o,s[r]);if(c.add(o.name),o&&(n||o.editable)){const e=(0,i.CJ)(o,u);if(e)return a((0,i.uo)(e,o,u));t[o.name]=u}}for(const t of e.requiredFields??[])if(!c.has(t.name))return a(`missing required field "${t.name}"`);return null}function f(e,t){let s=t;return(0,i.WA)(e)&&"string"==typeof t?s=parseFloat(t):(0,i.yM)(e)&&null!=t&&"string"!=typeof t?s=String(t):(0,i.vE)(e)&&"string"==typeof t&&(s=(0,n._U)(t)),(0,i.WX)(s)}let y;function h(e,t){if(!e||!(0,r.fn)(t))return e;if("rings"in e||"paths"in e){if(null==y)throw new TypeError("geometry engine not loaded");return y.simplify(t,e)}return e}async function m(e,t){!(0,r.fn)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==y&&(y=await Promise.all([s.e(9930),s.e(1275)]).then(s.bind(s,47559))),y}()}},4071:(e,t,s)=>{s.d(t,{$:()=>n,P:()=>r});const n={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportedStatistics:void 0},r={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:n,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsCurrentUser:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsTrueCurve:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},92300:(e,t,s)=>{s.d(t,{V:()=>i,X:()=>r});var n=s(65864);function r(e){return{geometryType:(0,n.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function i(e,t,s){const r=(0,n.xD)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=s,t}))}},2272:(e,t,s)=>{s.d(t,{Dl:()=>o,jV:()=>i,lF:()=>u}),s(92602),s(70333);var n=s(4718),r=s(84952);function i(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,r.An)(e):(0,n.o8)(e)}function u(e,t,s){const n={};for(const r in e){if("declaredClass"===r)continue;const i=e[r];if(null!=i&&"function"!=typeof i)if(Array.isArray(i))n[r]=i.map((e=>u(e)));else if("object"==typeof i)if(i.toJSON){const e=i.toJSON(s?.[r]);n[r]=t?e:JSON.stringify(e)}else n[r]=t?i:JSON.stringify(i);else n[r]=i}return n}s(926)},93470:(e,t,s)=>{s.d(t,{Cb:()=>i,HW:()=>p,JR:()=>r,JZ:()=>a,WR:()=>u,b6:()=>c,fT:()=>n,nC:()=>l,yM:()=>o});const n=[252,146,31,255],r=[153,153,153,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:n,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:n},u={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},p={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[629,7136],{67482:(e,t,s)=>{function n(e){return null!=u(e)||null!=o(e)}function r(e){return a.test(e)}function i(e){return u(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let s=!0;if(p&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,n=0;for(;!t&&n<=e.length;)t=!l.test(e[n]),n++;s=!t}}return s}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function u(e){const t=a.exec(e);if(!t?.groups)return null;const s=t.groups,n=+s.year,r=+s.month-1,i=+s.day,o=+(s.hours??"0"),u=+(s.minutes??"0"),l=+(s.seconds??"0");if(o>23)return null;if(u>59)return null;if(l>59)return null;const p=s.ms??"0",c=p?+p.padEnd(3,"0").slice(0,3):0;let d;if(s.isUTC||!s.offsetSign)d=Date.UTC(n,r,i,o,u,l,c);else{const e=+s.offsetHours,t=+s.offsetMinutes;d=6e4*("+"===s.offsetSign?-1:1)*(60*e+t)+Date.UTC(n,r,i,o,u,l,c)}return Number.isNaN(d)?null:d}s.d(t,{Br:()=>r,Cq:()=>n,_U:()=>i});const a=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,l=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,p=!Number.isNaN(new Date("technology 10").getTime())},17136:(e,t,s)=>{s.d(t,{el:()=>A});var n=s(92602),r=s(49186),i=s(53966),o=s(39829),u=s(82799),a=s(80754),l=s(21325),p=s(28735),c=(s(59456),s(78888)),d=s(65864),f=s(2272),y=s(84952),h=s(92300);const m=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function S(e){return"polyline"===e[0].type}function b(e,t,s){if(t){const t=function(e,t){if(!(e instanceof u.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw m().error(e),new r.A(e)}const s=(0,a.r8)(e),n=[];for(const e of s){const s=[];n.push(s),s.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const r=e[n][0],i=e[n][1],o=e[n+1][0],u=e[n+1][1],a=Math.sqrt((o-r)*(o-r)+(u-i)*(u-i)),l=(u-i)/a,p=(o-r)/a,c=a/t;if(c>1){for(let e=1;e<=c-1;e++){const n=e*t,o=p*n+r,u=l*n+i;s.push([o,u])}const e=(a+Math.floor(c-1)*t)/2,n=p*e+r,o=l*e+i;s.push([n,o])}s.push([o,u])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:n,spatialReference:e.spatialReference}):new u.A({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,p.ci)(t,!0)}return s&&(e=(0,a.kS)(e,s)),e}function F(e,t,s){if(Array.isArray(e)){const n=e[0];if(n>t){const s=(0,a.kd)(n,t);e[0]=n+s*(-2*t)}else if(n<s){const t=(0,a.kd)(n,s);e[0]=n+t*(-2*s)}}else{const n=e.x;if(n>t){const s=(0,a.kd)(n,t);e=e.clone().offset(s*(-2*t),0)}else if(n<s){const t=(0,a.kd)(n,s);e=e.clone().offset(t*(-2*s),0)}}return e}function w(e,t){let s=-1;for(let n=0;n<t.cutIndexes.length;n++){const r=t.cutIndexes[n],i=t.geometries[n],o=(0,a.r8)(i);for(let e=0;e<o.length;e++){const t=o[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const n=t[e][0];s=n>s?n:s}s=Number(s.toFixed(9));const n=-360*(0,a.kd)(s,180);for(let s=0;s<t.length;s++){const t=i.getPoint(e,s);i.setPoint(e,s,t.clone().offset(n,0))}return!0}}))}if(r===s){if(g(e))for(const t of(0,a.r8)(i))e[r]=e[r].addRing(t);else if(S(e))for(const t of(0,a.r8)(i))e[r]=e[r].addPath(t)}else s=r,e[r]=i}return e}async function A(e,t,s){if(!Array.isArray(e))return A([e],t);t&&"string"!=typeof t&&m().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??n.A.geometryServiceUrl;let i,g,S,_,I,T,x,E,C=0;const R=[],j=[];for(const t of e)if(null!=t)if(i||(i=t.spatialReference,g=(0,l.Vp)(i),S=i.isWebMercator,T=S?102100:4326,_=a.j7[T].maxX,I=a.j7[T].minX,x=a.j7[T].plus180Line,E=a.j7[T].minus180Line),g)if("mesh"===t.type)j.push(t);else if("point"===t.type)j.push(F(t.clone(),_,I));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>F(e,_,I))),j.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);j.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,s=(0,a.kd)(e.xmin,I)*(2*_);let n=0===s?t.clone():(0,a.kS)(t.clone(),s);e.offset(s,0);let{xmin:r,xmax:i}=e;r=Number(r.toFixed(9)),i=Number(i.toFixed(9)),e.intersects(x)&&i!==_?(C=i>C?i:C,n=b(n,S),R.push(n),j.push("cut")):e.intersects(E)&&r!==I?(C=i*(2*_)>C?i*(2*_):C,n=b(n,S,360),R.push(n),j.push("cut")):j.push(n)}else j.push(t.clone());else j.push(t);else j.push(t);let q=(0,a.kd)(C,_),M=-90;const P=q,k=new u.A;for(;q>0;){const e=360*q-180;k.addPath([[e,M],[e,-1*M]]),M*=-1,q--}if(R.length>0&&P>0){const t=w(R,await async function(e,t,s,n){const r=(0,f.Dl)(e),i=t[0].spatialReference,o={...n,responseType:"json",query:{...r.query,f:"json",sr:(0,l.YX)(i),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},u=await(0,c.A)(r.path+"/cut",o),{cutIndexes:a,geometries:p=[]}=u.data;return{cutIndexes:a,geometries:p.map((e=>{const t=(0,d.rS)(e);return t.spatialReference=i,t}))}}(r,R,k,s)),n=[],i=[];for(let s=0;s<j.length;s++){const r=j[s];if("cut"!==r)i.push(r);else{const r=t.shift(),o=e[s];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&r.rings.length>=o.rings.length?(n.push(r),i.push("simplify")):i.push(S?(0,p.Gh)(r):r)}}if(!n.length)return i;const o=await async function(e,t,s){const n="string"==typeof e?(0,y.An)(e):e,r=t[0].spatialReference,i=(0,d.$B)(t[0]),o={...s,query:{...n.query,f:"json",sr:(0,l.YX)(r),geometries:JSON.stringify((0,h.X)(t))}},{data:u}=await(0,c.A)(n.path+"/simplify",o);return(0,h.V)(u.geometries,i,r)}(r,n,s),u=[];for(let e=0;e<i.length;e++){const t=i[e];"simplify"!==t?u.push(t):u.push(S?(0,p.Gh)(o.shift()):o.shift())}return u}const O=[];for(let e=0;e<j.length;e++){const t=j[e];if("cut"!==t)O.push(t);else{const e=R.shift();O.push(!0===S?(0,p.Gh)(e):e)}}return O}},80754:(e,t,s)=>{s.d(t,{j7:()=>o,kS:()=>a,kd:()=>u,r8:()=>l});var n=s(82799),r=s(16930),i=s(65864);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function u(e,t){return Math.ceil((e-t)/(2*t))}function a(e,t){const s=l(e);for(const e of s)for(const s of e)s[0]+=t;return e}function l(e){return(0,i.Bi)(e)?e.rings:e.paths}},71202:(e,t,s)=>{s.r(t),s.d(t,{default:()=>_});var n=s(78888),r=s(60999),i=s(49186),o=s(53966),u=s(74887),a=s(65864),l=s(21325),p=s(90708),c=s(58376),d=s(83221),f=s(31464),y=s(19730),h=s(85113),m=s(64714),g=s(82832),S=s(95466),b=s(98453),F=s(30524),w=s(56400);const A={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsQueryWithCacheHint:!0,supportsQueryWithDistance:!0,supportsQueryWithResultType:!0,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0}};class _{constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e,t={}){this._loadOptions={url:e.url,customParameters:e.customParameters};const s=[],[n]=await Promise.all([e.url?this._fetch(t?.signal):null,this._checkProjection(e.spatialReference)]),r=(0,h.BM)(n,{geometryType:e.geometryType}),o=e.fields||r.fields||[],u=null!=e.hasZ?e.hasZ:r.hasZ,a=r.geometryType;let p=e.objectIdField||r.objectIdFieldName||"__OBJECTID";const c=e.spatialReference||l.KK;let f=e.timeInfo;o===r.fields&&r.unknownFields.length>0&&s.push({name:"geojson-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:r.unknownFields}});const g=new S.A(o);let _=g.get(p);_?("esriFieldTypeString"!==_.type&&(_.type="esriFieldTypeOID"),_.editable=!1,_.nullable=!1,p=_.name):(_={alias:p,name:p,type:"string"===r.objectIdFieldType?"esriFieldTypeString":"esriFieldTypeOID",editable:!1,nullable:!1},o.unshift(_));const I={};for(const e of o){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),!e.name)throw new i.A("geojson-layer:invalid-field-name","field name is missing",{field:e});if(!b.m.jsonValues.includes(e.type))throw new i.A("geojson-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e});if(e.name!==_.name){const t=(0,F.lD)(e);void 0!==t&&(I[e.name]=t)}null==e.length&&(e.length=(0,F._b)(e))}if(f){if(f.startTimeField){const e=g.get(f.startTimeField);e?(f.startTimeField=e.name,e.type="esriFieldTypeDate"):f.startTimeField=null}if(f.endTimeField){const e=g.get(f.endTimeField);e?(f.endTimeField=e.name,e.type="esriFieldTypeDate"):f.endTimeField=null}if(f.trackIdField){const e=g.get(f.trackIdField);e?f.trackIdField=e.name:(f.trackIdField=null,s.push({name:"geojson-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:f}}))}f.startTimeField||f.endTimeField||(s.push({name:"geojson-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:f}}),f=null)}const T=a?(0,m.F0)(a):void 0,x=g.dateFields.length?{timeZoneIANA:w.n$}:null,E={warnings:s,featureErrors:[],layerDefinition:{...A,drawingInfo:T??void 0,templates:(0,m.e2)(I),extent:void 0,geometryType:a,objectIdField:p,fields:o,hasZ:!!u,timeInfo:f,dateFieldsTimeReference:x}};this._queryEngine=new y.do({fieldsIndex:S.A.fromLayerJSON({fields:o,timeInfo:f,dateFieldsTimeReference:x}),geometryType:a,hasM:!1,hasZ:u,objectIdField:p,spatialReference:c,timeInfo:f,featureStore:new d.A({geometryType:a,hasM:!1,hasZ:u})});const C=this._queryEngine.fieldsIndex.requiredFields.indexOf(_);C>-1&&this._queryEngine.fieldsIndex.requiredFields.splice(C,1),this._createDefaultAttributes=(0,m.Vx)(I,p);const R=await this._createFeatures(n);this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,R);const j=this._normalizeFeatures(R,E.featureErrors);this._queryEngine.featureStore.addMany(j);const{fullExtent:q,timeExtent:M}=await this._queryEngine.fetchRecomputedExtents();if(E.layerDefinition.extent=q,M){const{start:e,end:t}=M;E.layerDefinition.timeInfo.timeExtent=[e,t]}return E}async applyEdits(e){const{spatialReference:t,geometryType:s}=this._queryEngine;return await Promise.all([(0,g.$1)(t,s),(0,f.Nk)(e.adds,t),(0,f.Nk)(e.updates,t)]),await this._waitSnapshotComplete(),this._applyEdits(e)}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),(0,c.J)(this._queryEngine,e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,r.UT)(this._snapshotFeatures),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,e);const t=this._normalizeFeatures(e);t&&this._queryEngine.featureStore.addMany(t)}),(e=>{this._queryEngine.featureStore.clear(),(0,u.zf)(e)||o.A.getLogger("esri.layers.GeoJSONLayer").error(new i.A("geojson-layer:refresh","An error occurred during refresh",{error:e}))})),await this._waitSnapshotComplete();const{fullExtent:t,timeExtent:s}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:s}}async _createFeatures(e){if(null==e)return[];const{geometryType:t,hasZ:s,objectIdField:n}=this._queryEngine,r=(0,h.bd)(e,{geometryType:t,hasZ:s,objectIdField:n});if(!(0,l.aI)(this._queryEngine.spatialReference,l.KK))for(const e of r)null!=e.geometry&&(e.geometry=(0,p.Ux)((0,f.Cv)((0,p.zv)(e.geometry,this._queryEngine.geometryType,this._queryEngine.hasZ,!1),l.KK,this._queryEngine.spatialReference)));return r}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:s}=this._loadOptions,r=(await(0,n.A)(t??"",{responseType:"json",query:{...s},signal:e})).data;return(0,h.sO)(r),r}_normalizeFeatures(e,t){const{objectIdField:s,fieldsIndex:n}=this._queryEngine,r=[];for(const i of e){const e=this._createDefaultAttributes(),o=(0,g.MB)(n,e,i.attributes,!0);o?t?.push(o):(this._assignObjectId(e,i.attributes,!0),i.attributes=e,i.objectId=e[s],r.push(i))}return r}async _applyEdits(e){const{adds:t,updates:s,deletes:n}=e,r={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t?.length&&this._applyAddEdits(r,t),s?.length&&this._applyUpdateEdits(r,s),n?.length){for(const e of n)r.deleteResults.push((0,g.bP)(e));this._queryEngine.featureStore.removeManyById(n)}const{fullExtent:i,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();return{extent:i,timeExtent:o,featureEditResults:r}}_applyAddEdits(e,t){const{addResults:s}=e,{geometryType:n,hasM:r,hasZ:i,objectIdField:o,spatialReference:u,featureStore:l,fieldsIndex:c}=this._queryEngine,d=[];for(const r of t){if(r.geometry&&n!==(0,a.$B)(r.geometry)){s.push((0,g.Yx)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),i=(0,g.MB)(c,t,r.attributes);if(i)s.push(i);else{if(this._assignObjectId(t,r.attributes),r.attributes=t,null!=r.uid){const t=r.attributes[o];e.uidToObjectId[r.uid]=t}if(null!=r.geometry){const e=r.geometry.spatialReference??u;r.geometry=(0,f.Cv)((0,g.CR)(r.geometry,e),e,u)}d.push(r),s.push((0,g.bP)(r.attributes[o]))}}l.addMany((0,p.Di)([],d,n,i,r,o))}_applyUpdateEdits({updateResults:e},t){const{geometryType:s,hasM:n,hasZ:r,objectIdField:i,spatialReference:o,featureStore:u,fieldsIndex:l}=this._queryEngine;for(const c of t){const{attributes:t,geometry:d}=c,y=t?.[i];if(null==y){e.push((0,g.Yx)(`Identifier field ${i} missing`));continue}if(!u.has(y)){e.push((0,g.Yx)(`Feature with object id ${y} missing`));continue}const h=(0,p.oN)(u.getFeature(y),s,r,n);if(null!=d){if(s!==(0,a.$B)(d)){e.push((0,g.Yx)("Incorrect geometry type."));continue}const t=d.spatialReference??o;h.geometry=(0,f.Cv)((0,g.CR)(d,t),t,o)}if(t){const s=(0,g.MB)(l,h.attributes,t);if(s){e.push(s);continue}}u.add((0,p.E2)(h,s,r,n,i)),e.push((0,g.bP)(y))}}_createObjectIdGenerator(e,t){const s=e.fieldsIndex.get(e.objectIdField);if("esriFieldTypeString"===s.type)return()=>s.name+"-"+Date.now().toString(16);let n=Number.NEGATIVE_INFINITY;for(const e of t)e.objectId&&(n=Math.max(n,e.objectId));return n=Math.max(0,n)+1,()=>n++}_assignObjectId(e,t,s=!1){const n=this._queryEngine.objectIdField;e[n]=s&&n in t?t[n]:this._objectIdGenerator()}async _checkProjection(e){try{await(0,f.Nk)(l.KK,e)}catch{throw new i.A("geojson-layer","Projection not supported")}}}},85113:(e,t,s)=>{s.d(t,{BM:()=>I,bd:()=>T,sO:()=>_,xD:()=>p});var n=s(67482),r=s(49186),i=s(21325),o=s(43334),u=s(92722),a=s(30524);const l={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function p(e){return l[e]}function*c(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*d(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function f(e){for(const t of e)if(t.length>2)return!0;return!1}function y(e){let t=0;for(let s=0;s<e.length;s++){const n=e[s],r=e[(s+1)%e.length];t+=n[0]*r[1]-r[0]*n[1]}return t<=0}function h(e){const t=e[0],s=e[e.length-1];return t[0]===s[0]&&t[1]===s[1]&&t[2]===s[2]||e.push(t),e}function m(e,t,s){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,s){return b(e,t.coordinates,s),e}(e,t,s);case"MultiLineString":return function(e,t,s){for(const n of t.coordinates)b(e,n,s);return e}(e,t,s);case"MultiPolygon":return function(e,t,s){for(const n of t.coordinates){g(e,n[0],s);for(let t=1;t<n.length;t++)S(e,n[t],s)}return e}(e,t,s);case"Point":return function(e,t,s){return w(e,t.coordinates,s),e}(e,t,s);case"Polygon":return function(e,t,s){const n=t.coordinates;g(e,n[0],s);for(let t=1;t<n.length;t++)S(e,n[t],s);return e}(e,t,s)}}function g(e,t,s){const n=h(t);!function(e){return!y(e)}(n)?b(e,n,s):F(e,n,s)}function S(e,t,s){const n=h(t);!function(e){return y(e)}(n)?b(e,n,s):F(e,n,s)}function b(e,t,s){for(const n of t)w(e,n,s);e.lengths.push(t.length)}function F(e,t,s){for(let n=t.length-1;n>=0;n--)w(e,t[n],s);e.lengths.push(t.length)}function w(e,t,s){const[n,r,i]=t;e.coords.push(n,r),s.hasZ&&e.coords.push(i||0)}function A(e){switch(typeof e){case"string":return(0,n.Br)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function _(e,t=4326){if(!e)throw new r.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new r.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:s}=e;if(!s)return;const n="string"==typeof s?s:"name"===s.type?s.properties.name:"EPSG"===s.type?s.properties.code:null,o=(0,i.oT)({wkid:t})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${t})$`,"i");if(!n||!o.test(n))throw new r.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:s})}function I(e,t={}){const s=[],n=new Set,r=new Set;let i,o=!1,u=null,l=!1,{geometryType:y=null}=t;for(const t of c(e)){const{geometry:e,properties:c,id:h}=t;if((!e||(y||(y=p(e.type)),p(e.type)===y))&&(o||(o=f(d(e))),l||(l=null!=h,l&&(i=typeof h,c&&(u=Object.keys(c).filter((e=>c[e]===h))))),c&&u&&l&&null!=h&&(u.length>1?u=u.filter((e=>c[e]===h)):1===u.length&&(u=c[u[0]]===h?u:[])),c))for(const e in c){if(n.has(e))continue;const t=A(c[e]);if("unknown"===t){r.add(e);continue}r.delete(e),n.add(e);const i=(0,a.rS)(e);i&&s.push({name:i,alias:e,type:t})}}const h=(0,a.rS)(1===u?.length&&u[0]||null)??void 0;if(h)for(const e of s)if(e.name===h&&(0,a.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:s,geometryType:y,hasZ:o,objectIdFieldName:h,objectIdFieldType:i,unknownFields:Array.from(r)}}function T(e,t){return Array.from(function*(e,t={}){const{geometryType:s,objectIdField:n}=t;for(const r of e){const{geometry:e,properties:i,id:a}=r;if(e&&p(e.type)!==s)continue;const l=i||{};let c;n&&(c=l[n],null==a||c||(l[n]=c=a));const d=new o.Om(e?m(new u.A,e,t):null,l,null,c);yield d}}(c(e),t))}},64714:(e,t,s)=>{s.d(t,{F0:()=>a,Vx:()=>c,e2:()=>f,f:()=>y});var n=s(44208),r=s(4718),i=s(99352),o=s(4071),u=s(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?u.Cb:"esriGeometryPolyline"===e?u.yM:u.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function c(e,t){if((0,n.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let s=`this${d(t)} = null;`;for(const t in e)s+=`this${d(t)} = ${JSON.stringify(e[t])};`;const n=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new n}catch(s){return()=>({[t]:null,...e})}}function d(e){return l.test(e)?`.${e}`:`["${e}"]`}function f(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,r.o8)(e)}}]}function y(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!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,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:o.$,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},82832:(e,t,s)=>{s.d(t,{$1:()=>m,CR:()=>h,MB:()=>d,Yx:()=>a,bP:()=>p});var n=s(67482),r=s(21325),i=s(30524);class o{constructor(){this.code=null,this.description=null}}class u{constructor(e){this.error=new o,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=e}}function a(e){return new u(e)}class l{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function p(e){return new l(e)}const c=new Set;function d(e,t,s,n=!1){c.clear();for(const r in s){const o=e.get(r);if(!o)continue;const u=f(o,s[r]);if(c.add(o.name),o&&(n||o.editable)){const e=(0,i.CJ)(o,u);if(e)return a((0,i.uo)(e,o,u));t[o.name]=u}}for(const t of e.requiredFields??[])if(!c.has(t.name))return a(`missing required field "${t.name}"`);return null}function f(e,t){let s=t;return(0,i.WA)(e)&&"string"==typeof t?s=parseFloat(t):(0,i.yM)(e)&&null!=t&&"string"!=typeof t?s=String(t):(0,i.vE)(e)&&"string"==typeof t&&(s=(0,n._U)(t)),(0,i.WX)(s)}let y;function h(e,t){if(!e||!(0,r.fn)(t))return e;if("rings"in e||"paths"in e){if(null==y)throw new TypeError("geometry engine not loaded");return y.simplify(t,e)}return e}async function m(e,t){!(0,r.fn)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==y&&(y=await Promise.all([s.e(9930),s.e(1275)]).then(s.bind(s,47559))),y}()}},4071:(e,t,s)=>{s.d(t,{$:()=>n,P:()=>r});const n={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportedStatistics:void 0},r={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:n,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsCurrentUser:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsTrueCurve:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},92300:(e,t,s)=>{s.d(t,{V:()=>i,X:()=>r});var n=s(65864);function r(e){return{geometryType:(0,n.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function i(e,t,s){const r=(0,n.xD)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=s,t}))}},2272:(e,t,s)=>{s.d(t,{Dl:()=>o,jV:()=>i,lF:()=>u}),s(92602),s(70333);var n=s(4718),r=s(84952);function i(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,r.An)(e):(0,n.o8)(e)}function u(e,t,s){const n={};for(const r in e){if("declaredClass"===r)continue;const i=e[r];if(null!=i&&"function"!=typeof i)if(Array.isArray(i))n[r]=i.map((e=>u(e)));else if("object"==typeof i)if(i.toJSON){const e=i.toJSON(s?.[r]);n[r]=t?e:JSON.stringify(e)}else n[r]=t?i:JSON.stringify(i);else n[r]=i}return n}s(926)},93470:(e,t,s)=>{s.d(t,{Cb:()=>i,HW:()=>p,JR:()=>r,JZ:()=>a,WR:()=>u,b6:()=>c,fT:()=>n,nC:()=>l,yM:()=>o});const n=[252,146,31,255],r=[153,153,153,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:n,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:n},u={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},a={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},p={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4444,7136,7159],{97159:(e,t,n)=>{n.d(t,{M:()=>w,a:()=>h,b:()=>b,e:()=>m,f:()=>i,i:()=>f,p:()=>d,r:()=>u,t:()=>a,w:()=>l});var r=n(70333),s=n(84952),o=n(39131);function i(e,t){const n=t?.url?.path;if(e&&n&&(e=(0,s.s2)(e,n,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const n=(0,s.V1)(e,t.portalItem.itemUrl);null!=n&&p.test(n)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(n).path)}return(e=y(e,t?.portal))&&c.test(e)?h(e):e}function a(e,t,n=w.YES){if(null==(e=e&&c.test(e)?g(e):e))return e;!(0,s.oP)(e)&&t?.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let r=(0,s.s2)(e);if(t){const n=t.verifyItemRelativeUrls?.rootPath||t.url?.path;if(n){const o=y(n,t.portal),i=y(r,t.portal);r=(0,s.V1)(i,o,o),null!=r&&r!==i&&r!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(r)}}return r=m(r,t?.portal),(0,s.oP)(r)&&(r=(0,s.S8)(r)),t?.resources&&t?.portalItem&&!(0,s.oP)(r)&&!(0,s.DB)(r)&&n===w.YES&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(r),compress:!1}),r}function u(e,t,n){return i(e,n)}function l(e,t,n,r){const s=a(e,r);void 0!==s&&(t[n]=s)}const c=/\/items\/([^/]+)\/resources\/(.*)/,p=/^\.\/resources\//;function f(e){const t=e?.match(c)??null;return t?.[1]??null}function d(e){const t=e?.match(c)??null;if(null==t)return null;const n=t[2],r=n.lastIndexOf("/");if(-1===r){const{path:e,extension:t}=(0,s.xw)(n);return{prefix:null,filename:e,extension:t}}const{path:o,extension:i}=(0,s.xw)(n.slice(r+1));return{prefix:n.slice(0,r),filename:o,extension:i}}function m(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,s.T1)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function y(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const n=`${t.urlKey}.${t.customBaseUrl}`,r=(0,s.Xq)();return(0,s.FX)(r,`${r.scheme}://${n}`)?(0,s.T1)(e,t.portalHostname,n):(0,s.T1)(e,n,t.portalHostname)}function h(e){if(!e)return e||null;let t=e;return t&&r.id&&!r.id.findCredential(t)&&(t=(0,o.qG)(t),t=t.replace(/^https?:\/\/www\.arcgis\.com/,"https://cdn.arcgis.com"),t=t.replace(/^https?:\/\/devext\.arcgis\.com/,"https://cdndev.arcgis.com"),t=t.replace(/^https?:\/\/qaext\.arcgis\.com/,"https://cdnqa.arcgis.com")),t}function g(e){if(!e)return e||null;let t=e;return t=t.replace(/^https?:\/\/cdn\.arcgis\.com/,"https://www.arcgis.com"),t=t.replace(/^https?:\/\/cdndev\.arcgis\.com/,"https://devext.arcgis.com"),t=t.replace(/^https?:\/\/cdnqa\.arcgis\.com/,"https://qaext.arcgis.com"),t&&r.id&&!r.id.findCredential(t)&&(t=(0,o.qG)(t)),t}var w,S;(S=w||(w={}))[S.YES=0]="YES",S[S.NO=1]="NO";const b=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return w},ensureMainOnlineDomain:m,fromCDNUrl:g,fromJSON:i,itemIdFromResourceUrl:f,prefixAndFilenameFromResourceUrl:d,read:u,toCDNUrl:h,toJSON:a,write:l},Symbol.toStringTag,{value:"Module"}))},67482:(e,t,n)=>{function r(e){return null!=a(e)||null!=i(e)}function s(e){return u.test(e)}function o(e){return a(e)??i(e)}function i(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let n=!0;if(c&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,r=0;for(;!t&&r<=e.length;)t=!l.test(e[r]),r++;n=!t}}return n}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=u.exec(e);if(!t?.groups)return null;const n=t.groups,r=+n.year,s=+n.month-1,o=+n.day,i=+(n.hours??"0"),a=+(n.minutes??"0"),l=+(n.seconds??"0");if(i>23)return null;if(a>59)return null;if(l>59)return null;const c=n.ms??"0",p=c?+c.padEnd(3,"0").slice(0,3):0;let f;if(n.isUTC||!n.offsetSign)f=Date.UTC(r,s,o,i,a,l,p);else{const e=+n.offsetHours,t=+n.offsetMinutes;f=6e4*("+"===n.offsetSign?-1:1)*(60*e+t)+Date.UTC(r,s,o,i,a,l,p)}return Number.isNaN(f)?null:f}n.d(t,{Br:()=>s,Cq:()=>r,_U:()=>o});const u=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,l=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,c=!Number.isNaN(new Date("technology 10").getTime())},17136:(e,t,n)=>{n.d(t,{el:()=>F});var r=n(92602),s=n(49186),o=n(53966),i=n(39829),a=n(82799),u=n(80754),l=n(21325),c=n(28735),p=(n(59456),n(78888)),f=n(65864),d=n(2272),m=n(84952),y=n(92300);const h=()=>o.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function w(e){return"polyline"===e[0].type}function S(e,t,n){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof i.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw h().error(e),new s.A(e)}const n=(0,u.r8)(e),r=[];for(const e of n){const n=[];r.push(n),n.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const s=e[r][0],o=e[r][1],i=e[r+1][0],a=e[r+1][1],u=Math.sqrt((i-s)*(i-s)+(a-o)*(a-o)),l=(a-o)/u,c=(i-s)/u,p=u/t;if(p>1){for(let e=1;e<=p-1;e++){const r=e*t,i=c*r+s,a=l*r+o;n.push([i,a])}const e=(u+Math.floor(p-1)*t)/2,r=c*e+s,i=l*e+o;n.push([r,i])}n.push([i,a])}}return function(e){return"polygon"===e.type}(e)?new i.A({rings:r,spatialReference:e.spatialReference}):new a.A({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,c.ci)(t,!0)}return n&&(e=(0,u.kS)(e,n)),e}function b(e,t,n){if(Array.isArray(e)){const r=e[0];if(r>t){const n=(0,u.kd)(r,t);e[0]=r+n*(-2*t)}else if(r<n){const t=(0,u.kd)(r,n);e[0]=r+t*(-2*n)}}else{const r=e.x;if(r>t){const n=(0,u.kd)(r,t);e=e.clone().offset(n*(-2*t),0)}else if(r<n){const t=(0,u.kd)(r,n);e=e.clone().offset(t*(-2*n),0)}}return e}function x(e,t){let n=-1;for(let r=0;r<t.cutIndexes.length;r++){const s=t.cutIndexes[r],o=t.geometries[r],i=(0,u.r8)(o);for(let e=0;e<i.length;e++){const t=i[e];t.some((n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const r=t[e][0];n=r>n?r:n}n=Number(n.toFixed(9));const r=-360*(0,u.kd)(n,180);for(let n=0;n<t.length;n++){const t=o.getPoint(e,n);o.setPoint(e,n,t.clone().offset(r,0))}return!0}}))}if(s===n){if(g(e))for(const t of(0,u.r8)(o))e[s]=e[s].addRing(t);else if(w(e))for(const t of(0,u.r8)(o))e[s]=e[s].addPath(t)}else n=s,e[s]=o}return e}async function F(e,t,n){if(!Array.isArray(e))return F([e],t);t&&"string"!=typeof t&&h().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const s="string"==typeof t?t:t?.url??r.A.geometryServiceUrl;let o,g,w,T,C,R,A,_,P=0;const v=[],E=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,g=(0,l.Vp)(o),w=o.isWebMercator,R=w?102100:4326,T=u.j7[R].maxX,C=u.j7[R].minX,A=u.j7[R].plus180Line,_=u.j7[R].minus180Line),g)if("mesh"===t.type)E.push(t);else if("point"===t.type)E.push(b(t.clone(),T,C));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>b(e,T,C))),E.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);E.push(e.rings?new i.A(e):e)}else if(t.extent){const e=t.extent,n=(0,u.kd)(e.xmin,C)*(2*T);let r=0===n?t.clone():(0,u.kS)(t.clone(),n);e.offset(n,0);let{xmin:s,xmax:o}=e;s=Number(s.toFixed(9)),o=Number(o.toFixed(9)),e.intersects(A)&&o!==T?(P=o>P?o:P,r=S(r,w),v.push(r),E.push("cut")):e.intersects(_)&&s!==C?(P=o*(2*T)>P?o*(2*T):P,r=S(r,w,360),v.push(r),E.push("cut")):E.push(r)}else E.push(t.clone());else E.push(t);else E.push(t);let N=(0,u.kd)(P,T),k=-90;const I=N,j=new a.A;for(;N>0;){const e=360*N-180;j.addPath([[e,k],[e,-1*k]]),k*=-1,N--}if(v.length>0&&I>0){const t=x(v,await async function(e,t,n,r){const s=(0,d.Dl)(e),o=t[0].spatialReference,i={...r,responseType:"json",query:{...s.query,f:"json",sr:(0,l.YX)(o),target:JSON.stringify({geometryType:(0,f.$B)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},a=await(0,p.A)(s.path+"/cut",i),{cutIndexes:u,geometries:c=[]}=a.data;return{cutIndexes:u,geometries:c.map((e=>{const t=(0,f.rS)(e);return t.spatialReference=o,t}))}}(s,v,j,n)),r=[],o=[];for(let n=0;n<E.length;n++){const s=E[n];if("cut"!==s)o.push(s);else{const s=t.shift(),i=e[n];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&s.rings.length>=i.rings.length?(r.push(s),o.push("simplify")):o.push(w?(0,c.Gh)(s):s)}}if(!r.length)return o;const i=await async function(e,t,n){const r="string"==typeof e?(0,m.An)(e):e,s=t[0].spatialReference,o=(0,f.$B)(t[0]),i={...n,query:{...r.query,f:"json",sr:(0,l.YX)(s),geometries:JSON.stringify((0,y.X)(t))}},{data:a}=await(0,p.A)(r.path+"/simplify",i);return(0,y.V)(a.geometries,o,s)}(s,r,n),a=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?a.push(t):a.push(w?(0,c.Gh)(i.shift()):i.shift())}return a}const M=[];for(let e=0;e<E.length;e++){const t=E[e];if("cut"!==t)M.push(t);else{const e=v.shift();M.push(!0===w?(0,c.Gh)(e):e)}}return M}},80754:(e,t,n)=>{n.d(t,{j7:()=>i,kS:()=>u,kd:()=>a,r8:()=>l});var r=n(82799),s=n(16930),o=n(65864);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:s.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:s.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){const n=l(e);for(const e of n)for(const n of e)n[0]+=t;return e}function l(e){return(0,o.Bi)(e)?e.rings:e.paths}},33771:(e,t,n)=>{n.r(t),n.d(t,{default:()=>b});var r=n(60999),s=n(49186),o=n(53966),i=n(74887),a=n(67076),u=n(21325),l=n(90708),c=n(58376),p=n(83221),f=n(31464),d=n(19730),m=n(85113),y=n(82832),h=n(34322),g=n(95466),w=n(56400);const S="esri.layers.WFSLayer";class b{constructor(){this._customParameters=null,this._queryEngine=null,this._supportsPagination=!0}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){const{getFeatureUrl:n,getFeatureOutputFormat:r,fields:o,geometryType:a,featureType:u,maxRecordCount:l,maxTotalRecordCount:c,maxPageCount:m,objectIdField:y,customParameters:S}=e,{spatialReference:b,getFeatureSpatialReference:F}=(0,h.UH)(n,u,e.spatialReference);try{await(0,f.Nk)(F,b)}catch{throw new s.A("unsupported-projection","Projection not supported",{inSpatialReference:F,outSpatialReference:b})}(0,i.Te)(t),this._customParameters=S,this._featureType=u,this._fieldsIndex=g.A.fromLayerJSON({fields:o,dateFieldsTimeReference:o.some((e=>"esriFieldTypeDate"===e.type))?{timeZoneIANA:w.n$}:null}),this._geometryType=a,this._getFeatureUrl=n,this._getFeatureOutputFormat=r,this._getFeatureSpatialReference=F,this._maxRecordCount=l,this._maxTotalRecordCount=c,this._maxPageCount=m,this._objectIdField=y,this._spatialReference=b;let T=await this._snapshotFeatures(t);if(T.errors.length>0&&(this._supportsPagination=!1,T=await this._snapshotFeatures(t),T.errors.length>0))throw T.errors[0];return this._queryEngine=new d.do({fieldsIndex:this._fieldsIndex,geometryType:a,hasM:!1,hasZ:!1,objectIdField:y,spatialReference:b,timeInfo:null,featureStore:new p.A({geometryType:a,hasM:!1,hasZ:!1})}),this._queryEngine.featureStore.addMany(T.features),{warnings:x(T),extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async applyEdits(){throw new s.A("wfs-source:editing-not-supported","applyEdits() is not supported on WFSLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),(0,c.J)(this._queryEngine,e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){return this._customParameters=e.customParameters,this._maxRecordCount=e.maxRecordCount,this._maxTotalRecordCount=e.maxTotalRecordCount,this._maxPageCount=e.maxPageCount,this._snapshotTask?.abort(),this._snapshotTask=(0,r.UT)((e=>this._snapshotFeatures({signal:e}))),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),this._queryEngine.featureStore.addMany(e.features);for(const t of x(e))o.A.getLogger(S).warn(new a.A("wfs-layer:refresh-warning",t.message,t.details));e.errors?.length&&o.A.getLogger(S).warn(new a.A("wfs-layer:refresh-error","Refresh completed with errors",{errors:e.errors}))}),(()=>{this._queryEngine.featureStore.clear()})),await this._waitSnapshotComplete(),{extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _snapshotFeatures(e){const t=e?.signal,n=this._maxTotalRecordCount,r=this._maxPageCount,s=this._supportsPagination?await(0,h.E)(this._getFeatureUrl,this._featureType.typeName,{customParameters:this._customParameters,signal:t}):void 0;let o=[];const a=[];if(null==s)try{o=await this._singleQuery(t)}catch(e){(0,i.zf)(e)||a.push(e)}else{const e=Math.min(s,n),u=function*(e,t,n){for(let r=0;r<t;r++)yield e._pageQuery(r,n)}(this,Math.max(1,Math.min(Math.ceil(e/this._maxRecordCount),r)),t);await Promise.allSettled(Array.from({length:10}).map((()=>async function(e,t,n){let r=e.next();for(;!r.done;){try{const e=await r.value;t.push(...e)}catch(e){(0,i.zf)(e)||n.push(e)}r=e.next()}}(u,o,a))))}return(0,i.Te)(t),{features:o,totalRecordCount:s,maxTotalRecordCount:n,maxPageCount:r,errors:a}}async _singleQuery(e){const t=await(0,h.x$)(this._getFeatureUrl,this._featureType.typeName,this._getFeatureSpatialReference,this._getFeatureOutputFormat,{customParameters:this._customParameters,signal:e});return this._processGeoJSON(t,{signal:e})}async _pageQuery(e,t){const n=e*this._maxRecordCount,r=await(0,h.x$)(this._getFeatureUrl,this._featureType.typeName,this._getFeatureSpatialReference,this._getFeatureOutputFormat,{customParameters:this._customParameters,startIndex:n,count:this._maxRecordCount,signal:t});return this._processGeoJSON(r,{startIndex:n,signal:t})}_processGeoJSON(e,t){(0,m.sO)(e,this._getFeatureSpatialReference.wkid);const{startIndex:n,signal:r}=t;(0,i.Te)(r);const s=(0,m.bd)(e,{geometryType:this._geometryType,hasZ:!1,objectIdField:this._objectIdField});if(!(0,u.aI)(this._spatialReference,this._getFeatureSpatialReference))for(const e of s)null!=e.geometry&&(e.geometry=(0,l.Ux)((0,f.Cv)((0,l.zv)(e.geometry,this._geometryType,!1,!1),this._getFeatureSpatialReference,this._spatialReference)));let o=n??1;for(const e of s){const t={};(0,y.MB)(this._fieldsIndex,t,e.attributes,!0),e.attributes=t,null==t[this._objectIdField]&&(e.objectId=t[this._objectIdField]=o++)}return s}}function x(e){const t=[];return null!=e.totalRecordCount&&(e.features.length<e.totalRecordCount&&t.push({name:"wfs-layer:maxRecordCount-too-low",message:`Could only fetch ${e.features.length} of ${e.totalRecordCount} in ${e.maxPageCount} queries. Try increasing the value of WFSLayer.maxRecordCount.`,details:{recordCount:e.features.length,totalRecordCount:e.totalRecordCount}}),e.totalRecordCount>e.maxTotalRecordCount&&t.push({name:"wfs-layer:large-dataset",message:`The number of ${e.totalRecordCount} features exceeds the maximum allowed of ${e.maxTotalRecordCount}.`,details:{recordCount:e.features.length,totalRecordCount:e.totalRecordCount,maxTotalRecordCount:e.maxTotalRecordCount}})),t}},85113:(e,t,n)=>{n.d(t,{BM:()=>C,bd:()=>R,sO:()=>T,xD:()=>c});var r=n(67482),s=n(49186),o=n(21325),i=n(43334),a=n(92722),u=n(30524);const l={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function c(e){return l[e]}function*p(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*f(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function d(e){for(const t of e)if(t.length>2)return!0;return!1}function m(e){let t=0;for(let n=0;n<e.length;n++){const r=e[n],s=e[(n+1)%e.length];t+=r[0]*s[1]-s[0]*r[1]}return t<=0}function y(e){const t=e[0],n=e[e.length-1];return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]||e.push(t),e}function h(e,t,n){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,n){return S(e,t.coordinates,n),e}(e,t,n);case"MultiLineString":return function(e,t,n){for(const r of t.coordinates)S(e,r,n);return e}(e,t,n);case"MultiPolygon":return function(e,t,n){for(const r of t.coordinates){g(e,r[0],n);for(let t=1;t<r.length;t++)w(e,r[t],n)}return e}(e,t,n);case"Point":return function(e,t,n){return x(e,t.coordinates,n),e}(e,t,n);case"Polygon":return function(e,t,n){const r=t.coordinates;g(e,r[0],n);for(let t=1;t<r.length;t++)w(e,r[t],n);return e}(e,t,n)}}function g(e,t,n){const r=y(t);!function(e){return!m(e)}(r)?S(e,r,n):b(e,r,n)}function w(e,t,n){const r=y(t);!function(e){return m(e)}(r)?S(e,r,n):b(e,r,n)}function S(e,t,n){for(const r of t)x(e,r,n);e.lengths.push(t.length)}function b(e,t,n){for(let r=t.length-1;r>=0;r--)x(e,t[r],n);e.lengths.push(t.length)}function x(e,t,n){const[r,s,o]=t;e.coords.push(r,s),n.hasZ&&e.coords.push(o||0)}function F(e){switch(typeof e){case"string":return(0,r.Br)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function T(e,t=4326){if(!e)throw new s.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new s.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:n}=e;if(!n)return;const r="string"==typeof n?n:"name"===n.type?n.properties.name:"EPSG"===n.type?n.properties.code:null,i=(0,o.oT)({wkid:t})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${t})$`,"i");if(!r||!i.test(r))throw new s.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:n})}function C(e,t={}){const n=[],r=new Set,s=new Set;let o,i=!1,a=null,l=!1,{geometryType:m=null}=t;for(const t of p(e)){const{geometry:e,properties:p,id:y}=t;if((!e||(m||(m=c(e.type)),c(e.type)===m))&&(i||(i=d(f(e))),l||(l=null!=y,l&&(o=typeof y,p&&(a=Object.keys(p).filter((e=>p[e]===y))))),p&&a&&l&&null!=y&&(a.length>1?a=a.filter((e=>p[e]===y)):1===a.length&&(a=p[a[0]]===y?a:[])),p))for(const e in p){if(r.has(e))continue;const t=F(p[e]);if("unknown"===t){s.add(e);continue}s.delete(e),r.add(e);const o=(0,u.rS)(e);o&&n.push({name:o,alias:e,type:t})}}const y=(0,u.rS)(1===a?.length&&a[0]||null)??void 0;if(y)for(const e of n)if(e.name===y&&(0,u.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:n,geometryType:m,hasZ:i,objectIdFieldName:y,objectIdFieldType:o,unknownFields:Array.from(s)}}function R(e,t){return Array.from(function*(e,t={}){const{geometryType:n,objectIdField:r}=t;for(const s of e){const{geometry:e,properties:o,id:u}=s;if(e&&c(e.type)!==n)continue;const l=o||{};let p;r&&(p=l[r],null==u||p||(l[r]=p=u));const f=new i.Om(e?h(new a.A,e,t):null,l,null,p??void 0);yield f}}(p(e),t))}},82832:(e,t,n)=>{n.d(t,{$1:()=>h,CR:()=>y,MB:()=>f,Yx:()=>u,bP:()=>c});var r=n(67482),s=n(21325),o=n(30524);class i{constructor(){this.code=null,this.description=null}}class a{constructor(e){this.error=new i,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=e}}function u(e){return new a(e)}class l{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function c(e){return new l(e)}const p=new Set;function f(e,t,n,r=!1){p.clear();for(const s in n){const i=e.get(s);if(!i)continue;const a=d(i,n[s]);if(p.add(i.name),i&&(r||i.editable)){const e=(0,o.CJ)(i,a);if(e)return u((0,o.uo)(e,i,a));t[i.name]=a}}for(const t of e.requiredFields??[])if(!p.has(t.name))return u(`missing required field "${t.name}"`);return null}function d(e,t){let n=t;return(0,o.WA)(e)&&"string"==typeof t?n=parseFloat(t):(0,o.yM)(e)&&null!=t&&"string"!=typeof t?n=String(t):(0,o.vE)(e)&&"string"==typeof t&&(n=(0,r._U)(t)),(0,o.WX)(n)}let m;function y(e,t){if(!e||!(0,s.fn)(t))return e;if("rings"in e||"paths"in e){if(null==m)throw new TypeError("geometry engine not loaded");return m.simplify(t,e)}return e}async function h(e,t){!(0,s.fn)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==m&&(m=await Promise.all([n.e(9930),n.e(1275)]).then(n.bind(n,47559))),m}()}},34322:(e,t,n)=>{n.d(t,{E:()=>W,Fu:()=>E,O8:()=>U,UH:()=>z,YW:()=>O,i5:()=>S,mG:()=>M,x$:()=>L}),n(59456);var r=n(78888),s=n(49186),o=n(5479),i=n(84952),a=n(57251),u=n(21325),l=n(50498),c=n(85113),p=n(13043),f=n(60694),d=n(20437),m=n(30524),y=n(5443),h=n(16930);const g="xlink:href",w="2.0.0",S="__esri_wfs_id__",b="wfs-layer:getWFSLayerTypeInfo-error",x="wfs-layer:empty-service",F="wfs-layer:feature-type-not-found",T="wfs-layer:geojson-not-supported",C="wfs-layer:kvp-encoding-not-supported",R="wfs-layer:malformed-json",A="wfs-layer:unknown-geometry-type",_="wfs-layer:unknown-field-type",P="wfs-layer:unsupported-spatial-reference",v="wfs-layer:unsupported-wfs-version";async function E(e,t){const n=function(e){const t=J(e);(function(e){const t=e.firstElementChild?.getAttribute("version");if(t&&t!==w)throw new s.A(v,`Unsupported WFS version ${t}. Supported version: ${w}`)})(t),X(t);const n=t.firstElementChild,r=(0,o.PP)(function(e){return(0,p.i)(e,{FeatureTypeList:{FeatureType:e=>{const t={typeName:"undefined:undefined",name:"",title:"",description:"",extent:null,namespacePrefix:"",namespaceUri:"",defaultSpatialReference:4326,supportedSpatialReferences:[]},n=new Set;return(0,p.p)(e,{Name:e=>{const{name:n,prefix:r}=V(e.textContent);t.typeName=`${r}:${n}`,t.name=n,t.namespacePrefix=r,t.namespaceUri=e.lookupNamespaceURI(r)},Abstract:e=>{t.description=e.textContent},Title:e=>{t.title=e.textContent},WGS84BoundingBox:e=>{t.extent=y.A.fromJSON(function(e){let t,n,r,s;for(const o of e.children)switch(o.localName){case"LowerCorner":[t,n]=o.textContent.split(" ").map((e=>Number.parseFloat(e)));break;case"UpperCorner":[r,s]=o.textContent.split(" ").map((e=>Number.parseFloat(e)))}return{xmin:t,ymin:n,xmax:r,ymax:s,spatialReference:u.KK}}(e))},DefaultCRS:e=>{const r=j(e);r&&(t.defaultSpatialReference=r,n.add(r))},OtherCRS:e=>{const t=j(e);t&&n.add(t)}}),t.title||(t.title=t.name),n.add(4326),t.supportedSpatialReferences.push(...n),t}}})}(n));return{operations:I(n),get featureTypes(){return Array.from(r())},readFeatureTypes:r}}((await(0,r.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetCapabilities",VERSION:w,...t?.customParameters},signal:t?.signal})).data);return function(e,t){(0,i.m3)(e)&&((0,i.FX)(e,t.operations.DescribeFeatureType.url,!0)&&(t.operations.DescribeFeatureType.url=(0,i.lM)(t.operations.DescribeFeatureType.url)),(0,i.FX)(e,t.operations.GetFeature.url,!0)&&(t.operations.GetFeature.url=(0,i.lM)(t.operations.GetFeature.url)))}(e,n),n}const N=["json","application/json","geojson","application/json; subtype=geojson","application/geo+json"];function k(e){for(const t of N){const n=e.findIndex((e=>e.toLowerCase()===t));if(n>=0)return e[n]}return null}function I(e){let t=!1;const n={GetCapabilities:{url:""},DescribeFeatureType:{url:""},GetFeature:{url:"",outputFormat:null,supportsPagination:!1}},r=[],o=[];if((0,p.p)(e,{OperationsMetadata:{Parameter:e=>{if("outputFormat"===e.getAttribute("name"))return{AllowedValues:{Value:({textContent:e})=>{e&&r.push(e)}}}},Operation:e=>{switch(e.getAttribute("name")){case"GetCapabilities":return{DCP:{HTTP:{Get:e=>{n.GetCapabilities.url=e.getAttribute(g)}}}};case"DescribeFeatureType":return{DCP:{HTTP:{Get:e=>{n.DescribeFeatureType.url=e.getAttribute(g)}}}};case"GetFeature":return{DCP:{HTTP:{Get:e=>{n.GetFeature.url=e.getAttribute(g)}}},Parameter:e=>{if("outputFormat"===e.getAttribute("name"))return{AllowedValues:{Value:({textContent:e})=>{e&&o.push(e)}}}}}}},Constraint:e=>{switch(e.getAttribute("name")){case"KVPEncoding":return{DefaultValue:e=>{t="true"===e.textContent.toLowerCase()}};case"ImplementsResultPaging":return{DefaultValue:e=>{n.GetFeature.supportsPagination="true"===e.textContent.toLowerCase()}}}}}}),n.GetFeature.outputFormat=k(o)??k(r),!t)throw new s.A(C,"WFS service doesn't support key/value pair (KVP) encoding");if(null==n.GetFeature.outputFormat)throw new s.A(T,"WFS service doesn't support GeoJSON output format");return n}function j(e){const t=parseInt(e.textContent?.match(/(?<wkid>\d+$)/i)?.groups?.wkid??"",10);if(!Number.isNaN(t))return t}function M(e,t,n){return(0,o.I6)(e,(e=>n?e.name===t&&e.namespaceUri===n:e.typeName===t||e.name===t))}async function U(e,t,n,r={}){const{featureType:o,extent:i}=await async function(e,t,n,r={}){const o=e.readFeatureTypes(),i=t?M(o,t,n):o.next().value,{spatialReference:l=new h.A({wkid:i?.defaultSpatialReference})}=r;if(null==i)throw t?new s.A(F,`The type '${t}' could not be found in the service`):new s.A(x,"The service is empty");let c=i.extent;if(c&&!(0,u.aI)(c.spatialReference,l))try{await(0,a.initializeProjection)(c.spatialReference,l,void 0,r),c=(0,a.project)(c,l)}catch{throw new s.A(P,"Projection not supported")}return{extent:c,spatialReference:l,featureType:i}}(e,t,n,r),{spatialReference:l}=z(e.operations.GetFeature.url,o,r.spatialReference),{fields:c,geometryType:p,swapXY:f,objectIdField:d,geometryField:m}=await async function(e,t,n,r={}){const{typeName:o}=t,[i,a]=await Promise.allSettled([G(e.operations.DescribeFeatureType.url,o,r),q(e,o,n,r)]),u=e=>new s.A(b,`An error occurred while getting info about the feature type '${o}'`,{error:e});if("rejected"===i.status)throw u(i.reason);if("rejected"===a.status)throw u(a.reason);const{fields:l,errors:c}=i.value??{},p=i.value?.geometryType||a.value?.geometryType,f=a.value?.swapXY??!1;if(null==p)throw new s.A(A,`The geometry type could not be determined for type '${o}`,{typeName:o,geometryType:p,fields:l,errors:c});return{...O(l??[]),geometryType:p,swapXY:f}}(e,o,l,r);return{url:e.operations.GetCapabilities.url,name:o.name,namespaceUri:o.namespaceUri,fields:c,geometryField:m,geometryType:p,objectIdField:d,spatialReference:r.spatialReference??new h.A({wkid:o.defaultSpatialReference}),extent:i,swapXY:f,wfsCapabilities:e,customParameters:r.customParameters}}function O(e){const t=e.find((e=>"geometry"===e.type));let n=e.find((e=>"oid"===e.type));return e=e.filter((e=>"geometry"!==e.type)),n||(n=new d.A({name:S,type:"oid",alias:S}),e.unshift(n)),{geometryField:t?.name??null,objectIdField:n.name,fields:e}}async function q(e,t,n,s={}){let o,i=!1;const[a,u]=await Promise.all([L(e.operations.GetFeature.url,t,n,e.operations.GetFeature.outputFormat,{...s,count:1}),(0,r.A)(e.operations.GetFeature.url,{responseType:"text",query:D(t,n,void 0,{...s,count:1}),signal:s?.signal})]),p="FeatureCollection"===a.type&&a.features[0]?.geometry;if(p){let e;switch(o=l.g.fromJSON((0,c.xD)(p.type)),p.type){case"Point":e=p.coordinates;break;case"LineString":case"MultiPoint":e=p.coordinates[0];break;case"MultiLineString":case"Polygon":e=p.coordinates[0][0];break;case"MultiPolygon":e=p.coordinates[0][0][0]}const t=/<[^>]*pos[^>]*> *(-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)/.exec(u.data);if(t){const n=e[0].toFixed(3),r=e[1].toFixed(3),s=parseFloat(t[1]).toFixed(3);n===parseFloat(t[2]).toFixed(3)&&r===s&&(i=!0)}}return{geometryType:o,swapXY:i}}async function G(e,t,n){return function(e,t){const{name:n}=V(e),r=J(t);X(r);const i=(0,o.I6)((0,p.i)(r.firstElementChild,{element:e=>e}),(e=>e.getAttribute("name")===n));if(null!=i){const e=i.getAttribute("type"),t=e?(0,o.I6)((0,p.i)(r.firstElementChild,{complexType:e=>e}),(t=>t.getAttribute("name")===V(e).name)):(0,o.I6)((0,p.i)(i,{complexType:e=>e}),(()=>!0));if(t)return function(e){const t=[],n=[];let r;const o=(0,p.i)(e,{complexContent:{extension:{sequence:{element:e=>e}}}});for(const i of o){const o=i.getAttribute("name");if(!o)continue;let a,u;if(i.hasAttribute("type")?a=V(i.getAttribute("type")).name:(0,p.p)(i,{simpleType:{restriction:e=>(a=V(e.getAttribute("base")).name,{maxLength:e=>{u=+e.getAttribute("value")}})}}),!a)continue;const l="true"===i.getAttribute("nillable");let c=!1;switch(a.toLowerCase()){case"integer":case"nonpositiveinteger":case"negativeinteger":case"long":case"int":case"short":case"byte":case"nonnegativeinteger":case"unsignedlong":case"unsignedint":case"unsignedshort":case"unsignedbyte":case"positiveinteger":n.push(new d.A({name:o,alias:o,type:"integer",nullable:l,length:(0,m._b)("integer")}));break;case"float":case"double":case"decimal":n.push(new d.A({name:o,alias:o,type:"double",nullable:l,length:(0,m._b)("double")}));break;case"boolean":case"string":case"gyearmonth":case"gyear":case"gmonthday":case"gday":case"gmonth":case"anyuri":case"qname":case"notation":case"normalizedstring":case"token":case"language":case"idrefs":case"entities":case"nmtoken":case"nmtokens":case"name":case"ncname":case"id":case"idref":case"entity":case"duration":case"time":n.push(new d.A({name:o,alias:o,type:"string",nullable:l,length:u??(0,m._b)("string")}));break;case"datetime":case"date":n.push(new d.A({name:o,alias:o,type:"date",nullable:l,length:u??(0,m._b)("date")}));break;case"pointpropertytype":r="point",c=!0;break;case"multipointpropertytype":r="multipoint",c=!0;break;case"curvepropertytype":case"multicurvepropertytype":case"multilinestringpropertytype":r="polyline",c=!0;break;case"surfacepropertytype":case"multisurfacepropertytype":case"multipolygonpropertytype":r="polygon",c=!0;break;case"geometrypropertytype":case"multigeometrypropertytype":c=!0,t.push(new s.A(A,`geometry type '${a}' is not supported`,{type:(new XMLSerializer).serializeToString(e)}));break;default:t.push(new s.A(_,`Unknown field type '${a}'`,{type:(new XMLSerializer).serializeToString(e)}))}c&&n.push(new d.A({name:o,alias:o,type:"geometry",nullable:l}))}for(const e of n)if("integer"===e.type&&!e.nullable&&$.has(e.name.toLowerCase())){e.type="oid";break}return{geometryType:r,fields:n,errors:t}}(t)}throw new s.A(F,`Type '${e}' not found in document`,{document:(new XMLSerializer).serializeToString(r)})}(t,(await(0,r.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"DescribeFeatureType",VERSION:w,TYPENAME:t,TYPENAMES:t,...n?.customParameters},signal:n?.signal})).data)}const $=new Set(["objectid","fid"]);async function L(e,t,n,o,i){let{data:a}=await(0,r.A)(e,{responseType:"text",query:D(t,n,o,i),signal:i?.signal});a=a.replaceAll(/": +(-?\d+),(\d+)(,)?/g,'": $1.$2$3');try{return JSON.parse(a)}catch(e){throw new s.A(R,"Error while parsing the response",{response:a,error:e})}}function D(e,t,n,r){const s="number"==typeof t?t:t.wkid;return{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:w,TYPENAMES:e,OUTPUTFORMAT:n,SRSNAME:"EPSG:"+s,STARTINDEX:r?.startIndex,COUNT:r?.count,...r?.customParameters}}async function W(e,t,n){const s=await(0,r.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:w,TYPENAMES:t,RESULTTYPE:"hits",...n?.customParameters},signal:n?.signal}),o=/numberMatched=["'](?<numberMatched>\d+)["']/gi.exec(s.data);if(o?.groups)return+o.groups.numberMatched}function J(e){return(new DOMParser).parseFromString(e.trim(),"text/xml")}function V(e){const[t,n]=e.split(":");return{prefix:n?t:"",name:n??t}}function X(e){let t="",n="";if((0,p.p)(e.firstElementChild,{Exception:e=>(t=e.getAttribute("exceptionCode"),{ExceptionText:e=>{n=e.textContent}})}),t)throw new s.A(`wfs-layer:${t}`,n)}function z(e,t,n){const r={wkid:t.defaultSpatialReference},s=null!=n?.wkid?{wkid:n.wkid}:r;return{spatialReference:s,getFeatureSpatialReference:(0,f.Fi)(e)||s.wkid&&t.supportedSpatialReferences.includes(s.wkid)?{wkid:s.wkid}:{wkid:t.defaultSpatialReference}}}},13043:(e,t,n)=>{function r(e,t){if(e&&t)for(const n of e.children)if(n.localName in t){const e=t[n.localName];if("function"==typeof e){const t=e(n);t&&r(n,t)}else r(n,e)}}function*s(e,t){for(const n of e.children)if(n.localName in t){const e=t[n.localName];"function"==typeof e?yield e(n):yield*s(n,e)}}n.d(t,{i:()=>s,p:()=>r})},60694:(e,t,n)=>{n.d(t,{Fi:()=>c,HZ:()=>g,Jf:()=>h,LS:()=>w,Wo:()=>y,bd:()=>S,cr:()=>d,iz:()=>f,qg:()=>p,yG:()=>m});var r=n(84952),s=n(97159);const o={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",knowledgegraphserver:"KnowledgeGraphServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer","3dtilesserver":"3DTilesServer",videoserver:"VideoServer"},i=Object.values(o),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${i.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^/\\n]+)\\/(${i.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),l=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function c(e){return a.test(e)}function p(e){if(null==e)return null;const t=(0,r.An)(e),n=t?.path.match(a)||t?.path.match(u);if(!n)return null;const[,s,i,l,c]=n,p=i.indexOf("/");return{title:d(-1!==p?i.slice(p+1):i),serverType:o[l.toLowerCase()],sublayer:null!=c&&""!==c?parseInt(c,10):null,url:{path:s}}}function f(e){const t=(0,r.An)(e).path.match(l);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function d(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function m(e,t){const n=[];if(e){const t=p(e);null!=t&&t.title&&n.push(t.title)}if(t){const e=d(t);n.push(e)}if(2===n.length){if(n[0].toLowerCase().includes(n[1].toLowerCase()))return n[0];if(n[1].toLowerCase().includes(n[0].toLowerCase()))return n[1]}return n.join(" - ")}function y(e){let t=(0,r.$z)(e,!0);return!!t&&(t=t.toLowerCase(),t.endsWith(".arcgis.com")&&(t.startsWith("services")||t.startsWith("tiles")||t.startsWith("features")))}function h(e,t){return e?(0,r.UC)((0,r.zi)(e,t)):e}function g(e){let{url:t}=e;if(!t)return{url:t};t=(0,r.zi)(t,e.logger);const n=(0,r.An)(t),s=p(n.path);let o;if(null!=s)null!=s.sublayer&&null==e.layer.layerId&&(o=s.sublayer),t=s.url.path;else if(e.nonStandardUrlAllowed){const e=f(n.path);null!=e&&(t=e.serviceUrl,o=e.sublayerId)}return{url:(0,r.UC)(t),layerId:o}}function w(e,t,n,o,i){(0,s.w)(t,o,"url",i),o.url&&null!=e.layerId&&(o.url=(0,r.fj)(o.url,n,e.layerId.toString()))}function S(e){if(!e)return!1;const t=e.toLowerCase(),n=t.includes("/services/"),r=t.includes("/mapserver/wmsserver"),s=t.includes("/imageserver/wmsserver"),o=t.includes("/wmsserver");return n&&(r||s||o)}},92300:(e,t,n)=>{n.d(t,{V:()=>o,X:()=>s});var r=n(65864);function s(e){return{geometryType:(0,r.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function o(e,t,n){const s=(0,r.xD)(t);return e.map((e=>{const t=s.fromJSON(e);return t.spatialReference=n,t}))}},2272:(e,t,n)=>{n.d(t,{Dl:()=>i,jV:()=>o,lF:()=>a}),n(92602),n(70333);var r=n(4718),s=n(84952);function o(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function i(e){return"string"==typeof e?(0,s.An)(e):(0,r.o8)(e)}function a(e,t,n){const r={};for(const s in e){if("declaredClass"===s)continue;const o=e[s];if(null!=o&&"function"!=typeof o)if(Array.isArray(o))r[s]=o.map((e=>a(e)));else if("object"==typeof o)if(o.toJSON){const e=o.toJSON(n?.[s]);r[s]=t?e:JSON.stringify(e)}else r[s]=t?o:JSON.stringify(o);else r[s]=o}return r}n(926)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4444,7136,7159],{97159:(e,t,n)=>{n.d(t,{M:()=>w,a:()=>h,b:()=>b,e:()=>m,f:()=>i,i:()=>f,p:()=>d,r:()=>u,t:()=>a,w:()=>l});var r=n(70333),s=n(84952),o=n(39131);function i(e,t){const n=t?.url?.path;if(e&&n&&(e=(0,s.s2)(e,n,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const n=(0,s.V1)(e,t.portalItem.itemUrl);null!=n&&p.test(n)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(n).path)}return(e=y(e,t?.portal))&&c.test(e)?h(e):e}function a(e,t,n=w.YES){if(null==(e=e&&c.test(e)?g(e):e))return e;!(0,s.oP)(e)&&t?.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let r=(0,s.s2)(e);if(t){const n=t.verifyItemRelativeUrls?.rootPath||t.url?.path;if(n){const o=y(n,t.portal),i=y(r,t.portal);r=(0,s.V1)(i,o,o),null!=r&&r!==i&&r!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(r)}}return r=m(r,t?.portal),(0,s.oP)(r)&&(r=(0,s.S8)(r)),t?.resources&&t?.portalItem&&!(0,s.oP)(r)&&!(0,s.DB)(r)&&n===w.YES&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(r),compress:!1}),r}function u(e,t,n){return i(e,n)}function l(e,t,n,r){const s=a(e,r);void 0!==s&&(t[n]=s)}const c=/\/items\/([^/]+)\/resources\/(.*)/,p=/^\.\/resources\//;function f(e){const t=e?.match(c)??null;return t?.[1]??null}function d(e){const t=e?.match(c)??null;if(null==t)return null;const n=t[2],r=n.lastIndexOf("/");if(-1===r){const{path:e,extension:t}=(0,s.xw)(n);return{prefix:null,filename:e,extension:t}}const{path:o,extension:i}=(0,s.xw)(n.slice(r+1));return{prefix:n.slice(0,r),filename:o,extension:i}}function m(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,s.T1)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function y(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const n=`${t.urlKey}.${t.customBaseUrl}`,r=(0,s.Xq)();return(0,s.FX)(r,`${r.scheme}://${n}`)?(0,s.T1)(e,t.portalHostname,n):(0,s.T1)(e,n,t.portalHostname)}function h(e){if(!e)return e||null;let t=e;return t&&r.id&&!r.id.findCredential(t)&&(t=(0,o.qG)(t),t=t.replace(/^https?:\/\/www\.arcgis\.com/,"https://cdn.arcgis.com"),t=t.replace(/^https?:\/\/devext\.arcgis\.com/,"https://cdndev.arcgis.com"),t=t.replace(/^https?:\/\/qaext\.arcgis\.com/,"https://cdnqa.arcgis.com")),t}function g(e){if(!e)return e||null;let t=e;return t=t.replace(/^https?:\/\/cdn\.arcgis\.com/,"https://www.arcgis.com"),t=t.replace(/^https?:\/\/cdndev\.arcgis\.com/,"https://devext.arcgis.com"),t=t.replace(/^https?:\/\/cdnqa\.arcgis\.com/,"https://qaext.arcgis.com"),t&&r.id&&!r.id.findCredential(t)&&(t=(0,o.qG)(t)),t}var w,S;(S=w||(w={}))[S.YES=0]="YES",S[S.NO=1]="NO";const b=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return w},ensureMainOnlineDomain:m,fromCDNUrl:g,fromJSON:i,itemIdFromResourceUrl:f,prefixAndFilenameFromResourceUrl:d,read:u,toCDNUrl:h,toJSON:a,write:l},Symbol.toStringTag,{value:"Module"}))},67482:(e,t,n)=>{function r(e){return null!=a(e)||null!=i(e)}function s(e){return u.test(e)}function o(e){return a(e)??i(e)}function i(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let n=!0;if(c&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,r=0;for(;!t&&r<=e.length;)t=!l.test(e[r]),r++;n=!t}}return n}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=u.exec(e);if(!t?.groups)return null;const n=t.groups,r=+n.year,s=+n.month-1,o=+n.day,i=+(n.hours??"0"),a=+(n.minutes??"0"),l=+(n.seconds??"0");if(i>23)return null;if(a>59)return null;if(l>59)return null;const c=n.ms??"0",p=c?+c.padEnd(3,"0").slice(0,3):0;let f;if(n.isUTC||!n.offsetSign)f=Date.UTC(r,s,o,i,a,l,p);else{const e=+n.offsetHours,t=+n.offsetMinutes;f=6e4*("+"===n.offsetSign?-1:1)*(60*e+t)+Date.UTC(r,s,o,i,a,l,p)}return Number.isNaN(f)?null:f}n.d(t,{Br:()=>s,Cq:()=>r,_U:()=>o});const u=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,l=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,c=!Number.isNaN(new Date("technology 10").getTime())},17136:(e,t,n)=>{n.d(t,{el:()=>F});var r=n(92602),s=n(49186),o=n(53966),i=n(39829),a=n(82799),u=n(80754),l=n(21325),c=n(28735),p=(n(59456),n(78888)),f=n(65864),d=n(2272),m=n(84952),y=n(92300);const h=()=>o.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function w(e){return"polyline"===e[0].type}function S(e,t,n){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof i.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw h().error(e),new s.A(e)}const n=(0,u.r8)(e),r=[];for(const e of n){const n=[];r.push(n),n.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const s=e[r][0],o=e[r][1],i=e[r+1][0],a=e[r+1][1],u=Math.sqrt((i-s)*(i-s)+(a-o)*(a-o)),l=(a-o)/u,c=(i-s)/u,p=u/t;if(p>1){for(let e=1;e<=p-1;e++){const r=e*t,i=c*r+s,a=l*r+o;n.push([i,a])}const e=(u+Math.floor(p-1)*t)/2,r=c*e+s,i=l*e+o;n.push([r,i])}n.push([i,a])}}return function(e){return"polygon"===e.type}(e)?new i.A({rings:r,spatialReference:e.spatialReference}):new a.A({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,c.ci)(t,!0)}return n&&(e=(0,u.kS)(e,n)),e}function b(e,t,n){if(Array.isArray(e)){const r=e[0];if(r>t){const n=(0,u.kd)(r,t);e[0]=r+n*(-2*t)}else if(r<n){const t=(0,u.kd)(r,n);e[0]=r+t*(-2*n)}}else{const r=e.x;if(r>t){const n=(0,u.kd)(r,t);e=e.clone().offset(n*(-2*t),0)}else if(r<n){const t=(0,u.kd)(r,n);e=e.clone().offset(t*(-2*n),0)}}return e}function x(e,t){let n=-1;for(let r=0;r<t.cutIndexes.length;r++){const s=t.cutIndexes[r],o=t.geometries[r],i=(0,u.r8)(o);for(let e=0;e<i.length;e++){const t=i[e];t.some((n=>{if(n[0]<180)return!0;{let n=0;for(let e=0;e<t.length;e++){const r=t[e][0];n=r>n?r:n}n=Number(n.toFixed(9));const r=-360*(0,u.kd)(n,180);for(let n=0;n<t.length;n++){const t=o.getPoint(e,n);o.setPoint(e,n,t.clone().offset(r,0))}return!0}}))}if(s===n){if(g(e))for(const t of(0,u.r8)(o))e[s]=e[s].addRing(t);else if(w(e))for(const t of(0,u.r8)(o))e[s]=e[s].addPath(t)}else n=s,e[s]=o}return e}async function F(e,t,n){if(!Array.isArray(e))return F([e],t);t&&"string"!=typeof t&&h().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const s="string"==typeof t?t:t?.url??r.A.geometryServiceUrl;let o,g,w,T,C,R,A,_,P=0;const v=[],E=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,g=(0,l.Vp)(o),w=o.isWebMercator,R=w?102100:4326,T=u.j7[R].maxX,C=u.j7[R].minX,A=u.j7[R].plus180Line,_=u.j7[R].minus180Line),g)if("mesh"===t.type)E.push(t);else if("point"===t.type)E.push(b(t.clone(),T,C));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>b(e,T,C))),E.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);E.push(e.rings?new i.A(e):e)}else if(t.extent){const e=t.extent,n=(0,u.kd)(e.xmin,C)*(2*T);let r=0===n?t.clone():(0,u.kS)(t.clone(),n);e.offset(n,0);let{xmin:s,xmax:o}=e;s=Number(s.toFixed(9)),o=Number(o.toFixed(9)),e.intersects(A)&&o!==T?(P=o>P?o:P,r=S(r,w),v.push(r),E.push("cut")):e.intersects(_)&&s!==C?(P=o*(2*T)>P?o*(2*T):P,r=S(r,w,360),v.push(r),E.push("cut")):E.push(r)}else E.push(t.clone());else E.push(t);else E.push(t);let N=(0,u.kd)(P,T),k=-90;const I=N,j=new a.A;for(;N>0;){const e=360*N-180;j.addPath([[e,k],[e,-1*k]]),k*=-1,N--}if(v.length>0&&I>0){const t=x(v,await async function(e,t,n,r){const s=(0,d.Dl)(e),o=t[0].spatialReference,i={...r,responseType:"json",query:{...s.query,f:"json",sr:(0,l.YX)(o),target:JSON.stringify({geometryType:(0,f.$B)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},a=await(0,p.A)(s.path+"/cut",i),{cutIndexes:u,geometries:c=[]}=a.data;return{cutIndexes:u,geometries:c.map((e=>{const t=(0,f.rS)(e);return t.spatialReference=o,t}))}}(s,v,j,n)),r=[],o=[];for(let n=0;n<E.length;n++){const s=E[n];if("cut"!==s)o.push(s);else{const s=t.shift(),i=e[n];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&s.rings.length>=i.rings.length?(r.push(s),o.push("simplify")):o.push(w?(0,c.Gh)(s):s)}}if(!r.length)return o;const i=await async function(e,t,n){const r="string"==typeof e?(0,m.An)(e):e,s=t[0].spatialReference,o=(0,f.$B)(t[0]),i={...n,query:{...r.query,f:"json",sr:(0,l.YX)(s),geometries:JSON.stringify((0,y.X)(t))}},{data:a}=await(0,p.A)(r.path+"/simplify",i);return(0,y.V)(a.geometries,o,s)}(s,r,n),a=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?a.push(t):a.push(w?(0,c.Gh)(i.shift()):i.shift())}return a}const M=[];for(let e=0;e<E.length;e++){const t=E[e];if("cut"!==t)M.push(t);else{const e=v.shift();M.push(!0===w?(0,c.Gh)(e):e)}}return M}},80754:(e,t,n)=>{n.d(t,{j7:()=>i,kS:()=>u,kd:()=>a,r8:()=>l});var r=n(82799),s=n(16930),o=n(65864);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:s.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:s.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:s.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){const n=l(e);for(const e of n)for(const n of e)n[0]+=t;return e}function l(e){return(0,o.Bi)(e)?e.rings:e.paths}},33771:(e,t,n)=>{n.r(t),n.d(t,{default:()=>b});var r=n(60999),s=n(49186),o=n(53966),i=n(74887),a=n(67076),u=n(21325),l=n(90708),c=n(58376),p=n(83221),f=n(31464),d=n(19730),m=n(85113),y=n(82832),h=n(34322),g=n(95466),w=n(56400);const S="esri.layers.WFSLayer";class b{constructor(){this._customParameters=null,this._queryEngine=null,this._supportsPagination=!0}destroy(){this._queryEngine?.destroy(),this._queryEngine=null}async load(e,t={}){const{getFeatureUrl:n,getFeatureOutputFormat:r,fields:o,geometryType:a,featureType:u,maxRecordCount:l,maxTotalRecordCount:c,maxPageCount:m,objectIdField:y,customParameters:S}=e,{spatialReference:b,getFeatureSpatialReference:F}=(0,h.UH)(n,u,e.spatialReference);try{await(0,f.Nk)(F,b)}catch{throw new s.A("unsupported-projection","Projection not supported",{inSpatialReference:F,outSpatialReference:b})}(0,i.Te)(t),this._customParameters=S,this._featureType=u,this._fieldsIndex=g.A.fromLayerJSON({fields:o,dateFieldsTimeReference:o.some((e=>"esriFieldTypeDate"===e.type))?{timeZoneIANA:w.n$}:null}),this._geometryType=a,this._getFeatureUrl=n,this._getFeatureOutputFormat=r,this._getFeatureSpatialReference=F,this._maxRecordCount=l,this._maxTotalRecordCount=c,this._maxPageCount=m,this._objectIdField=y,this._spatialReference=b;let T=await this._snapshotFeatures(t);if(T.errors.length>0&&(this._supportsPagination=!1,T=await this._snapshotFeatures(t),T.errors.length>0))throw T.errors[0];return this._queryEngine=new d.do({fieldsIndex:this._fieldsIndex,geometryType:a,hasM:!1,hasZ:!1,objectIdField:y,spatialReference:b,timeInfo:null,featureStore:new p.A({geometryType:a,hasM:!1,hasZ:!1})}),this._queryEngine.featureStore.addMany(T.features),{warnings:x(T),extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async applyEdits(){throw new s.A("wfs-source:editing-not-supported","applyEdits() is not supported on WFSLayer")}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),(0,c.J)(this._queryEngine,e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){return this._customParameters=e.customParameters,this._maxRecordCount=e.maxRecordCount,this._maxTotalRecordCount=e.maxTotalRecordCount,this._maxPageCount=e.maxPageCount,this._snapshotTask?.abort(),this._snapshotTask=(0,r.UT)((e=>this._snapshotFeatures({signal:e}))),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),this._queryEngine.featureStore.addMany(e.features);for(const t of x(e))o.A.getLogger(S).warn(new a.A("wfs-layer:refresh-warning",t.message,t.details));e.errors?.length&&o.A.getLogger(S).warn(new a.A("wfs-layer:refresh-error","Refresh completed with errors",{errors:e.errors}))}),(()=>{this._queryEngine.featureStore.clear()})),await this._waitSnapshotComplete(),{extent:(await this._queryEngine.fetchRecomputedExtents()).fullExtent}}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _snapshotFeatures(e){const t=e?.signal,n=this._maxTotalRecordCount,r=this._maxPageCount,s=this._supportsPagination?await(0,h.E)(this._getFeatureUrl,this._featureType.typeName,{customParameters:this._customParameters,signal:t}):void 0;let o=[];const a=[];if(null==s)try{o=await this._singleQuery(t)}catch(e){(0,i.zf)(e)||a.push(e)}else{const e=Math.min(s,n),u=function*(e,t,n){for(let r=0;r<t;r++)yield e._pageQuery(r,n)}(this,Math.max(1,Math.min(Math.ceil(e/this._maxRecordCount),r)),t);await Promise.allSettled(Array.from({length:10}).map((()=>async function(e,t,n){let r=e.next();for(;!r.done;){try{const e=await r.value;t.push(...e)}catch(e){(0,i.zf)(e)||n.push(e)}r=e.next()}}(u,o,a))))}return(0,i.Te)(t),{features:o,totalRecordCount:s,maxTotalRecordCount:n,maxPageCount:r,errors:a}}async _singleQuery(e){const t=await(0,h.x$)(this._getFeatureUrl,this._featureType.typeName,this._getFeatureSpatialReference,this._getFeatureOutputFormat,{customParameters:this._customParameters,signal:e});return this._processGeoJSON(t,{signal:e})}async _pageQuery(e,t){const n=e*this._maxRecordCount,r=await(0,h.x$)(this._getFeatureUrl,this._featureType.typeName,this._getFeatureSpatialReference,this._getFeatureOutputFormat,{customParameters:this._customParameters,startIndex:n,count:this._maxRecordCount,signal:t});return this._processGeoJSON(r,{startIndex:n,signal:t})}_processGeoJSON(e,t){(0,m.sO)(e,this._getFeatureSpatialReference.wkid);const{startIndex:n,signal:r}=t;(0,i.Te)(r);const s=(0,m.bd)(e,{geometryType:this._geometryType,hasZ:!1,objectIdField:this._objectIdField});if(!(0,u.aI)(this._spatialReference,this._getFeatureSpatialReference))for(const e of s)null!=e.geometry&&(e.geometry=(0,l.Ux)((0,f.Cv)((0,l.zv)(e.geometry,this._geometryType,!1,!1),this._getFeatureSpatialReference,this._spatialReference)));let o=n??1;for(const e of s){const t={};(0,y.MB)(this._fieldsIndex,t,e.attributes,!0),e.attributes=t,null==t[this._objectIdField]&&(e.objectId=t[this._objectIdField]=o++)}return s}}function x(e){const t=[];return null!=e.totalRecordCount&&(e.features.length<e.totalRecordCount&&t.push({name:"wfs-layer:maxRecordCount-too-low",message:`Could only fetch ${e.features.length} of ${e.totalRecordCount} in ${e.maxPageCount} queries. Try increasing the value of WFSLayer.maxRecordCount.`,details:{recordCount:e.features.length,totalRecordCount:e.totalRecordCount}}),e.totalRecordCount>e.maxTotalRecordCount&&t.push({name:"wfs-layer:large-dataset",message:`The number of ${e.totalRecordCount} features exceeds the maximum allowed of ${e.maxTotalRecordCount}.`,details:{recordCount:e.features.length,totalRecordCount:e.totalRecordCount,maxTotalRecordCount:e.maxTotalRecordCount}})),t}},85113:(e,t,n)=>{n.d(t,{BM:()=>C,bd:()=>R,sO:()=>T,xD:()=>c});var r=n(67482),s=n(49186),o=n(21325),i=n(43334),a=n(92722),u=n(30524);const l={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function c(e){return l[e]}function*p(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*f(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function d(e){for(const t of e)if(t.length>2)return!0;return!1}function m(e){let t=0;for(let n=0;n<e.length;n++){const r=e[n],s=e[(n+1)%e.length];t+=r[0]*s[1]-s[0]*r[1]}return t<=0}function y(e){const t=e[0],n=e[e.length-1];return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]||e.push(t),e}function h(e,t,n){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,n){return S(e,t.coordinates,n),e}(e,t,n);case"MultiLineString":return function(e,t,n){for(const r of t.coordinates)S(e,r,n);return e}(e,t,n);case"MultiPolygon":return function(e,t,n){for(const r of t.coordinates){g(e,r[0],n);for(let t=1;t<r.length;t++)w(e,r[t],n)}return e}(e,t,n);case"Point":return function(e,t,n){return x(e,t.coordinates,n),e}(e,t,n);case"Polygon":return function(e,t,n){const r=t.coordinates;g(e,r[0],n);for(let t=1;t<r.length;t++)w(e,r[t],n);return e}(e,t,n)}}function g(e,t,n){const r=y(t);!function(e){return!m(e)}(r)?S(e,r,n):b(e,r,n)}function w(e,t,n){const r=y(t);!function(e){return m(e)}(r)?S(e,r,n):b(e,r,n)}function S(e,t,n){for(const r of t)x(e,r,n);e.lengths.push(t.length)}function b(e,t,n){for(let r=t.length-1;r>=0;r--)x(e,t[r],n);e.lengths.push(t.length)}function x(e,t,n){const[r,s,o]=t;e.coords.push(r,s),n.hasZ&&e.coords.push(o||0)}function F(e){switch(typeof e){case"string":return(0,r.Br)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function T(e,t=4326){if(!e)throw new s.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new s.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:n}=e;if(!n)return;const r="string"==typeof n?n:"name"===n.type?n.properties.name:"EPSG"===n.type?n.properties.code:null,i=(0,o.oT)({wkid:t})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${t})$`,"i");if(!r||!i.test(r))throw new s.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:n})}function C(e,t={}){const n=[],r=new Set,s=new Set;let o,i=!1,a=null,l=!1,{geometryType:m=null}=t;for(const t of p(e)){const{geometry:e,properties:p,id:y}=t;if((!e||(m||(m=c(e.type)),c(e.type)===m))&&(i||(i=d(f(e))),l||(l=null!=y,l&&(o=typeof y,p&&(a=Object.keys(p).filter((e=>p[e]===y))))),p&&a&&l&&null!=y&&(a.length>1?a=a.filter((e=>p[e]===y)):1===a.length&&(a=p[a[0]]===y?a:[])),p))for(const e in p){if(r.has(e))continue;const t=F(p[e]);if("unknown"===t){s.add(e);continue}s.delete(e),r.add(e);const o=(0,u.rS)(e);o&&n.push({name:o,alias:e,type:t})}}const y=(0,u.rS)(1===a?.length&&a[0]||null)??void 0;if(y)for(const e of n)if(e.name===y&&(0,u.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:n,geometryType:m,hasZ:i,objectIdFieldName:y,objectIdFieldType:o,unknownFields:Array.from(s)}}function R(e,t){return Array.from(function*(e,t={}){const{geometryType:n,objectIdField:r}=t;for(const s of e){const{geometry:e,properties:o,id:u}=s;if(e&&c(e.type)!==n)continue;const l=o||{};let p;r&&(p=l[r],null==u||p||(l[r]=p=u));const f=new i.Om(e?h(new a.A,e,t):null,l,null,p);yield f}}(p(e),t))}},82832:(e,t,n)=>{n.d(t,{$1:()=>h,CR:()=>y,MB:()=>f,Yx:()=>u,bP:()=>c});var r=n(67482),s=n(21325),o=n(30524);class i{constructor(){this.code=null,this.description=null}}class a{constructor(e){this.error=new i,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=e}}function u(e){return new a(e)}class l{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function c(e){return new l(e)}const p=new Set;function f(e,t,n,r=!1){p.clear();for(const s in n){const i=e.get(s);if(!i)continue;const a=d(i,n[s]);if(p.add(i.name),i&&(r||i.editable)){const e=(0,o.CJ)(i,a);if(e)return u((0,o.uo)(e,i,a));t[i.name]=a}}for(const t of e.requiredFields??[])if(!p.has(t.name))return u(`missing required field "${t.name}"`);return null}function d(e,t){let n=t;return(0,o.WA)(e)&&"string"==typeof t?n=parseFloat(t):(0,o.yM)(e)&&null!=t&&"string"!=typeof t?n=String(t):(0,o.vE)(e)&&"string"==typeof t&&(n=(0,r._U)(t)),(0,o.WX)(n)}let m;function y(e,t){if(!e||!(0,s.fn)(t))return e;if("rings"in e||"paths"in e){if(null==m)throw new TypeError("geometry engine not loaded");return m.simplify(t,e)}return e}async function h(e,t){!(0,s.fn)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==m&&(m=await Promise.all([n.e(9930),n.e(1275)]).then(n.bind(n,47559))),m}()}},34322:(e,t,n)=>{n.d(t,{E:()=>W,Fu:()=>E,O8:()=>U,UH:()=>z,YW:()=>O,i5:()=>S,mG:()=>M,x$:()=>L}),n(59456);var r=n(78888),s=n(49186),o=n(5479),i=n(84952),a=n(57251),u=n(21325),l=n(50498),c=n(85113),p=n(13043),f=n(60694),d=n(20437),m=n(30524),y=n(5443),h=n(16930);const g="xlink:href",w="2.0.0",S="__esri_wfs_id__",b="wfs-layer:getWFSLayerTypeInfo-error",x="wfs-layer:empty-service",F="wfs-layer:feature-type-not-found",T="wfs-layer:geojson-not-supported",C="wfs-layer:kvp-encoding-not-supported",R="wfs-layer:malformed-json",A="wfs-layer:unknown-geometry-type",_="wfs-layer:unknown-field-type",P="wfs-layer:unsupported-spatial-reference",v="wfs-layer:unsupported-wfs-version";async function E(e,t){const n=function(e){const t=J(e);(function(e){const t=e.firstElementChild?.getAttribute("version");if(t&&t!==w)throw new s.A(v,`Unsupported WFS version ${t}. Supported version: ${w}`)})(t),X(t);const n=t.firstElementChild,r=(0,o.PP)(function(e){return(0,p.i)(e,{FeatureTypeList:{FeatureType:e=>{const t={typeName:"undefined:undefined",name:"",title:"",description:"",extent:null,namespacePrefix:"",namespaceUri:"",defaultSpatialReference:4326,supportedSpatialReferences:[]},n=new Set;return(0,p.p)(e,{Name:e=>{const{name:n,prefix:r}=V(e.textContent);t.typeName=`${r}:${n}`,t.name=n,t.namespacePrefix=r,t.namespaceUri=e.lookupNamespaceURI(r)},Abstract:e=>{t.description=e.textContent},Title:e=>{t.title=e.textContent},WGS84BoundingBox:e=>{t.extent=y.A.fromJSON(function(e){let t,n,r,s;for(const o of e.children)switch(o.localName){case"LowerCorner":[t,n]=o.textContent.split(" ").map((e=>Number.parseFloat(e)));break;case"UpperCorner":[r,s]=o.textContent.split(" ").map((e=>Number.parseFloat(e)))}return{xmin:t,ymin:n,xmax:r,ymax:s,spatialReference:u.KK}}(e))},DefaultCRS:e=>{const r=j(e);r&&(t.defaultSpatialReference=r,n.add(r))},OtherCRS:e=>{const t=j(e);t&&n.add(t)}}),t.title||(t.title=t.name),n.add(4326),t.supportedSpatialReferences.push(...n),t}}})}(n));return{operations:I(n),get featureTypes(){return Array.from(r())},readFeatureTypes:r}}((await(0,r.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetCapabilities",VERSION:w,...t?.customParameters},signal:t?.signal})).data);return function(e,t){(0,i.m3)(e)&&((0,i.FX)(e,t.operations.DescribeFeatureType.url,!0)&&(t.operations.DescribeFeatureType.url=(0,i.lM)(t.operations.DescribeFeatureType.url)),(0,i.FX)(e,t.operations.GetFeature.url,!0)&&(t.operations.GetFeature.url=(0,i.lM)(t.operations.GetFeature.url)))}(e,n),n}const N=["json","application/json","geojson","application/json; subtype=geojson","application/geo+json"];function k(e){for(const t of N){const n=e.findIndex((e=>e.toLowerCase()===t));if(n>=0)return e[n]}return null}function I(e){let t=!1;const n={GetCapabilities:{url:""},DescribeFeatureType:{url:""},GetFeature:{url:"",outputFormat:null,supportsPagination:!1}},r=[],o=[];if((0,p.p)(e,{OperationsMetadata:{Parameter:e=>{if("outputFormat"===e.getAttribute("name"))return{AllowedValues:{Value:({textContent:e})=>{e&&r.push(e)}}}},Operation:e=>{switch(e.getAttribute("name")){case"GetCapabilities":return{DCP:{HTTP:{Get:e=>{n.GetCapabilities.url=e.getAttribute(g)}}}};case"DescribeFeatureType":return{DCP:{HTTP:{Get:e=>{n.DescribeFeatureType.url=e.getAttribute(g)}}}};case"GetFeature":return{DCP:{HTTP:{Get:e=>{n.GetFeature.url=e.getAttribute(g)}}},Parameter:e=>{if("outputFormat"===e.getAttribute("name"))return{AllowedValues:{Value:({textContent:e})=>{e&&o.push(e)}}}}}}},Constraint:e=>{switch(e.getAttribute("name")){case"KVPEncoding":return{DefaultValue:e=>{t="true"===e.textContent.toLowerCase()}};case"ImplementsResultPaging":return{DefaultValue:e=>{n.GetFeature.supportsPagination="true"===e.textContent.toLowerCase()}}}}}}),n.GetFeature.outputFormat=k(o)??k(r),!t)throw new s.A(C,"WFS service doesn't support key/value pair (KVP) encoding");if(null==n.GetFeature.outputFormat)throw new s.A(T,"WFS service doesn't support GeoJSON output format");return n}function j(e){const t=parseInt(e.textContent?.match(/(?<wkid>\d+$)/i)?.groups?.wkid??"",10);if(!Number.isNaN(t))return t}function M(e,t,n){return(0,o.I6)(e,(e=>n?e.name===t&&e.namespaceUri===n:e.typeName===t||e.name===t))}async function U(e,t,n,r={}){const{featureType:o,extent:i}=await async function(e,t,n,r={}){const o=e.readFeatureTypes(),i=t?M(o,t,n):o.next().value,{spatialReference:l=new h.A({wkid:i?.defaultSpatialReference})}=r;if(null==i)throw t?new s.A(F,`The type '${t}' could not be found in the service`):new s.A(x,"The service is empty");let c=i.extent;if(c&&!(0,u.aI)(c.spatialReference,l))try{await(0,a.initializeProjection)(c.spatialReference,l,void 0,r),c=(0,a.project)(c,l)}catch{throw new s.A(P,"Projection not supported")}return{extent:c,spatialReference:l,featureType:i}}(e,t,n,r),{spatialReference:l}=z(e.operations.GetFeature.url,o,r.spatialReference),{fields:c,geometryType:p,swapXY:f,objectIdField:d,geometryField:m}=await async function(e,t,n,r={}){const{typeName:o}=t,[i,a]=await Promise.allSettled([G(e.operations.DescribeFeatureType.url,o,r),q(e,o,n,r)]),u=e=>new s.A(b,`An error occurred while getting info about the feature type '${o}'`,{error:e});if("rejected"===i.status)throw u(i.reason);if("rejected"===a.status)throw u(a.reason);const{fields:l,errors:c}=i.value??{},p=i.value?.geometryType||a.value?.geometryType,f=a.value?.swapXY??!1;if(null==p)throw new s.A(A,`The geometry type could not be determined for type '${o}`,{typeName:o,geometryType:p,fields:l,errors:c});return{...O(l??[]),geometryType:p,swapXY:f}}(e,o,l,r);return{url:e.operations.GetCapabilities.url,name:o.name,namespaceUri:o.namespaceUri,fields:c,geometryField:m,geometryType:p,objectIdField:d,spatialReference:r.spatialReference??new h.A({wkid:o.defaultSpatialReference}),extent:i,swapXY:f,wfsCapabilities:e,customParameters:r.customParameters}}function O(e){const t=e.find((e=>"geometry"===e.type));let n=e.find((e=>"oid"===e.type));return e=e.filter((e=>"geometry"!==e.type)),n||(n=new d.A({name:S,type:"oid",alias:S}),e.unshift(n)),{geometryField:t?.name??null,objectIdField:n.name,fields:e}}async function q(e,t,n,s={}){let o,i=!1;const[a,u]=await Promise.all([L(e.operations.GetFeature.url,t,n,e.operations.GetFeature.outputFormat,{...s,count:1}),(0,r.A)(e.operations.GetFeature.url,{responseType:"text",query:D(t,n,void 0,{...s,count:1}),signal:s?.signal})]),p="FeatureCollection"===a.type&&a.features[0]?.geometry;if(p){let e;switch(o=l.g.fromJSON((0,c.xD)(p.type)),p.type){case"Point":e=p.coordinates;break;case"LineString":case"MultiPoint":e=p.coordinates[0];break;case"MultiLineString":case"Polygon":e=p.coordinates[0][0];break;case"MultiPolygon":e=p.coordinates[0][0][0]}const t=/<[^>]*pos[^>]*> *(-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)/.exec(u.data);if(t){const n=e[0].toFixed(3),r=e[1].toFixed(3),s=parseFloat(t[1]).toFixed(3);n===parseFloat(t[2]).toFixed(3)&&r===s&&(i=!0)}}return{geometryType:o,swapXY:i}}async function G(e,t,n){return function(e,t){const{name:n}=V(e),r=J(t);X(r);const i=(0,o.I6)((0,p.i)(r.firstElementChild,{element:e=>e}),(e=>e.getAttribute("name")===n));if(null!=i){const e=i.getAttribute("type"),t=e?(0,o.I6)((0,p.i)(r.firstElementChild,{complexType:e=>e}),(t=>t.getAttribute("name")===V(e).name)):(0,o.I6)((0,p.i)(i,{complexType:e=>e}),(()=>!0));if(t)return function(e){const t=[],n=[];let r;const o=(0,p.i)(e,{complexContent:{extension:{sequence:{element:e=>e}}}});for(const i of o){const o=i.getAttribute("name");if(!o)continue;let a,u;if(i.hasAttribute("type")?a=V(i.getAttribute("type")).name:(0,p.p)(i,{simpleType:{restriction:e=>(a=V(e.getAttribute("base")).name,{maxLength:e=>{u=+e.getAttribute("value")}})}}),!a)continue;const l="true"===i.getAttribute("nillable");let c=!1;switch(a.toLowerCase()){case"integer":case"nonpositiveinteger":case"negativeinteger":case"long":case"int":case"short":case"byte":case"nonnegativeinteger":case"unsignedlong":case"unsignedint":case"unsignedshort":case"unsignedbyte":case"positiveinteger":n.push(new d.A({name:o,alias:o,type:"integer",nullable:l,length:(0,m._b)("integer")}));break;case"float":case"double":case"decimal":n.push(new d.A({name:o,alias:o,type:"double",nullable:l,length:(0,m._b)("double")}));break;case"boolean":case"string":case"gyearmonth":case"gyear":case"gmonthday":case"gday":case"gmonth":case"anyuri":case"qname":case"notation":case"normalizedstring":case"token":case"language":case"idrefs":case"entities":case"nmtoken":case"nmtokens":case"name":case"ncname":case"id":case"idref":case"entity":case"duration":case"time":n.push(new d.A({name:o,alias:o,type:"string",nullable:l,length:u??(0,m._b)("string")}));break;case"datetime":case"date":n.push(new d.A({name:o,alias:o,type:"date",nullable:l,length:u??(0,m._b)("date")}));break;case"pointpropertytype":r="point",c=!0;break;case"multipointpropertytype":r="multipoint",c=!0;break;case"curvepropertytype":case"multicurvepropertytype":case"multilinestringpropertytype":r="polyline",c=!0;break;case"surfacepropertytype":case"multisurfacepropertytype":case"multipolygonpropertytype":r="polygon",c=!0;break;case"geometrypropertytype":case"multigeometrypropertytype":c=!0,t.push(new s.A(A,`geometry type '${a}' is not supported`,{type:(new XMLSerializer).serializeToString(e)}));break;default:t.push(new s.A(_,`Unknown field type '${a}'`,{type:(new XMLSerializer).serializeToString(e)}))}c&&n.push(new d.A({name:o,alias:o,type:"geometry",nullable:l}))}for(const e of n)if("integer"===e.type&&!e.nullable&&$.has(e.name.toLowerCase())){e.type="oid";break}return{geometryType:r,fields:n,errors:t}}(t)}throw new s.A(F,`Type '${e}' not found in document`,{document:(new XMLSerializer).serializeToString(r)})}(t,(await(0,r.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"DescribeFeatureType",VERSION:w,TYPENAME:t,TYPENAMES:t,...n?.customParameters},signal:n?.signal})).data)}const $=new Set(["objectid","fid"]);async function L(e,t,n,o,i){let{data:a}=await(0,r.A)(e,{responseType:"text",query:D(t,n,o,i),signal:i?.signal});a=a.replaceAll(/": +(-?\d+),(\d+)(,)?/g,'": $1.$2$3');try{return JSON.parse(a)}catch(e){throw new s.A(R,"Error while parsing the response",{response:a,error:e})}}function D(e,t,n,r){const s="number"==typeof t?t:t.wkid;return{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:w,TYPENAMES:e,OUTPUTFORMAT:n,SRSNAME:"EPSG:"+s,STARTINDEX:r?.startIndex,COUNT:r?.count,...r?.customParameters}}async function W(e,t,n){const s=await(0,r.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:w,TYPENAMES:t,RESULTTYPE:"hits",...n?.customParameters},signal:n?.signal}),o=/numberMatched=["'](?<numberMatched>\d+)["']/gi.exec(s.data);if(o?.groups)return+o.groups.numberMatched}function J(e){return(new DOMParser).parseFromString(e.trim(),"text/xml")}function V(e){const[t,n]=e.split(":");return{prefix:n?t:"",name:n??t}}function X(e){let t="",n="";if((0,p.p)(e.firstElementChild,{Exception:e=>(t=e.getAttribute("exceptionCode"),{ExceptionText:e=>{n=e.textContent}})}),t)throw new s.A(`wfs-layer:${t}`,n)}function z(e,t,n){const r={wkid:t.defaultSpatialReference},s=null!=n?.wkid?{wkid:n.wkid}:r;return{spatialReference:s,getFeatureSpatialReference:(0,f.Fi)(e)||s.wkid&&t.supportedSpatialReferences.includes(s.wkid)?{wkid:s.wkid}:{wkid:t.defaultSpatialReference}}}},13043:(e,t,n)=>{function r(e,t){if(e&&t)for(const n of e.children)if(n.localName in t){const e=t[n.localName];if("function"==typeof e){const t=e(n);t&&r(n,t)}else r(n,e)}}function*s(e,t){for(const n of e.children)if(n.localName in t){const e=t[n.localName];"function"==typeof e?yield e(n):yield*s(n,e)}}n.d(t,{i:()=>s,p:()=>r})},60694:(e,t,n)=>{n.d(t,{Fi:()=>c,HZ:()=>g,Jf:()=>h,LS:()=>w,Wo:()=>y,bd:()=>S,cr:()=>d,iz:()=>f,qg:()=>p,yG:()=>m});var r=n(84952),s=n(97159);const o={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",knowledgegraphserver:"KnowledgeGraphServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer","3dtilesserver":"3DTilesServer",videoserver:"VideoServer"},i=Object.values(o),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${i.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^/\\n]+)\\/(${i.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),l=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function c(e){return a.test(e)}function p(e){if(null==e)return null;const t=(0,r.An)(e),n=t?.path.match(a)||t?.path.match(u);if(!n)return null;const[,s,i,l,c]=n,p=i.indexOf("/");return{title:d(-1!==p?i.slice(p+1):i),serverType:o[l.toLowerCase()],sublayer:null!=c&&""!==c?parseInt(c,10):null,url:{path:s}}}function f(e){const t=(0,r.An)(e).path.match(l);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function d(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function m(e,t){const n=[];if(e){const t=p(e);null!=t&&t.title&&n.push(t.title)}if(t){const e=d(t);n.push(e)}if(2===n.length){if(n[0].toLowerCase().includes(n[1].toLowerCase()))return n[0];if(n[1].toLowerCase().includes(n[0].toLowerCase()))return n[1]}return n.join(" - ")}function y(e){let t=(0,r.$z)(e,!0);return!!t&&(t=t.toLowerCase(),t.endsWith(".arcgis.com")&&(t.startsWith("services")||t.startsWith("tiles")||t.startsWith("features")))}function h(e,t){return e?(0,r.UC)((0,r.zi)(e,t)):e}function g(e){let{url:t}=e;if(!t)return{url:t};t=(0,r.zi)(t,e.logger);const n=(0,r.An)(t),s=p(n.path);let o;if(null!=s)null!=s.sublayer&&null==e.layer.layerId&&(o=s.sublayer),t=s.url.path;else if(e.nonStandardUrlAllowed){const e=f(n.path);null!=e&&(t=e.serviceUrl,o=e.sublayerId)}return{url:(0,r.UC)(t),layerId:o}}function w(e,t,n,o,i){(0,s.w)(t,o,"url",i),o.url&&null!=e.layerId&&(o.url=(0,r.fj)(o.url,n,e.layerId.toString()))}function S(e){if(!e)return!1;const t=e.toLowerCase(),n=t.includes("/services/"),r=t.includes("/mapserver/wmsserver"),s=t.includes("/imageserver/wmsserver"),o=t.includes("/wmsserver");return n&&(r||s||o)}},92300:(e,t,n)=>{n.d(t,{V:()=>o,X:()=>s});var r=n(65864);function s(e){return{geometryType:(0,r.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function o(e,t,n){const s=(0,r.xD)(t);return e.map((e=>{const t=s.fromJSON(e);return t.spatialReference=n,t}))}},2272:(e,t,n)=>{n.d(t,{Dl:()=>i,jV:()=>o,lF:()=>a}),n(92602),n(70333);var r=n(4718),s=n(84952);function o(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function i(e){return"string"==typeof e?(0,s.An)(e):(0,r.o8)(e)}function a(e,t,n){const r={};for(const s in e){if("declaredClass"===s)continue;const o=e[s];if(null!=o&&"function"!=typeof o)if(Array.isArray(o))r[s]=o.map((e=>a(e)));else if("object"==typeof o)if(o.toJSON){const e=o.toJSON(n?.[s]);r[s]=t?e:JSON.stringify(e)}else r[s]=t?o:JSON.stringify(o);else r[s]=o}return r}n(926)}}]);