@arcgis/core 5.1.0-next.52 → 5.1.0-next.53
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/009db7b459b18f6a668b.js +1 -0
- package/assets/esri/core/workers/chunks/{386435341e949f5573b4.js → 0fc60b4c44c4e865b699.js} +2 -2
- package/assets/esri/core/workers/chunks/199f70c0373f6008a545.js +1 -0
- package/assets/esri/core/workers/chunks/{d2af5342fbe80e2d8c60.js → 20f9f3470cad47d01803.js} +1 -1
- package/assets/esri/core/workers/chunks/2757cf54656b5d318b11.js +1 -0
- package/assets/esri/core/workers/chunks/2aaeaf022af8493281dc.js +1 -0
- package/assets/esri/core/workers/chunks/34fe4570eef9e73839b8.js +1 -0
- package/assets/esri/core/workers/chunks/{7480bd6f892abf444cac.js → 3c9e1ec94bbcbf494916.js} +3 -3
- package/assets/esri/core/workers/chunks/40bcfc4f8efe7de7ec9d.js +1 -0
- package/assets/esri/core/workers/chunks/{cc1f3a2f281a2f6e0f94.js → 4d54beab8ae5ff31e7b0.js} +1 -1
- package/assets/esri/core/workers/chunks/55bb5b7817c2963c8bfa.js +1 -0
- package/assets/esri/core/workers/chunks/{39f3bea123f20c816ab2.js → 662932d2effd2b384b9e.js} +1 -1
- package/assets/esri/core/workers/chunks/7d56b2ac5030dd8b748e.js +1 -0
- package/assets/esri/core/workers/chunks/{720a33a7f118d2769133.js → 851dd71d28681d4eccfd.js} +1 -1
- package/assets/esri/core/workers/chunks/{88c6cc90606409b5c884.js → 87d2021e91d025a2a142.js} +1 -1
- package/assets/esri/core/workers/chunks/{fe7dec83e40014c55a6b.js → 96e799ca97989a6ed448.js} +1 -1
- package/assets/esri/core/workers/chunks/9db2ff1d4cbb5d1b623e.js +1 -0
- package/assets/esri/core/workers/chunks/a462aa1c7b68efad6906.js +1 -0
- package/assets/esri/core/workers/chunks/{f5fd59291cb161fdc05b.js → a787fe09d3df9d4254ba.js} +1 -1
- package/assets/esri/core/workers/chunks/a971e61336f455b953d5.js +1 -0
- package/assets/esri/core/workers/chunks/b2b77598048818c957b7.js +1 -0
- package/assets/esri/core/workers/chunks/{3fa5f102b6f77c523a76.js → b3e5dcb530cef678c8f8.js} +1 -1
- package/assets/esri/core/workers/chunks/{daf65bccc45dc5c400ae.js → c460ca93ed8e20d8b53a.js} +1 -1
- package/assets/esri/core/workers/chunks/{3fcc8c455af56ae89030.js → ccf845ac0ac354507a25.js} +1 -1
- package/assets/esri/core/workers/chunks/{c48d1ee37c207bfb0aac.js → dd319d5fe89b275e93cf.js} +1 -1
- package/assets/esri/core/workers/chunks/ec91d5081f423755cb07.js +1 -0
- package/assets/esri/core/workers/chunks/{eb36417edc11fa80e312.js → ee8cd91c27e9cdfc3b2e.js} +1 -1
- package/assets/esri/core/workers/chunks/f8eb14170f927aecfbc8.js +1 -0
- package/assets/esri/core/workers/chunks/{792219a079c28bcdc003.js → fcfaaced184f8da3e28d.js} +1 -1
- package/config.js +1 -1
- package/core/arrayUtils.js +1 -1
- package/core/maybe.js +1 -1
- package/kernel.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
- package/layers/graphics/sources/OGCFeatureSource.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/knowledgeGraph/nodeMovementUtils.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/raster/datasets/FunctionRaster.js +1 -1
- package/layers/raster/functions/AspectFunction.js +1 -1
- package/layers/raster/functions/BaseRasterFunction.js +1 -1
- package/layers/raster/functions/ConvolutionFunction.js +1 -1
- package/layers/raster/functions/CurvatureFunction.js +1 -1
- package/layers/raster/functions/HillshadeFunction.js +1 -1
- package/layers/raster/functions/ShadedReliefFunction.js +1 -1
- package/layers/raster/functions/SlopeFunction.js +1 -1
- package/layers/raster/functions/StatisticsFunction.js +1 -1
- package/layers/raster/functions/pixelUtils.js +1 -1
- package/layers/support/capabilities.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/package.json +3 -3
- package/support/revision.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/support/ResourceController.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/webgl/ManagedFBO.d.ts +1 -0
- package/views/3d/webgl/ManagedFBOResource.d.ts +1 -0
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/FBOCacheUsage.js +1 -1
- package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
- package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/PolygonOffset.js +1 -1
- package/views/3d/webgl-engine/materials/TriangleTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
- package/views/3d/webgl.js +1 -1
- package/views/webgl/Program.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/assets/esri/core/workers/chunks/0b661b90f7ee3ae23425.js +0 -1
- package/assets/esri/core/workers/chunks/167e4ff7cbc88b42db71.js +0 -1
- package/assets/esri/core/workers/chunks/1a481f3ae3146682eb00.js +0 -1
- package/assets/esri/core/workers/chunks/30654845ca1334f1c206.js +0 -1
- package/assets/esri/core/workers/chunks/34207774bc371e95ba3c.js +0 -1
- package/assets/esri/core/workers/chunks/35dbe1eeb6932b03aea2.js +0 -1
- package/assets/esri/core/workers/chunks/380bb57bccc266d6442a.js +0 -1
- package/assets/esri/core/workers/chunks/5351e71ce7839636d06d.js +0 -1
- package/assets/esri/core/workers/chunks/55edd712c6d2d044e550.js +0 -1
- package/assets/esri/core/workers/chunks/64da1ad9df9094ef5c12.js +0 -1
- package/assets/esri/core/workers/chunks/666f201d222c50ab8428.js +0 -1
- package/assets/esri/core/workers/chunks/7380177f16d914fdbc63.js +0 -1
- package/assets/esri/core/workers/chunks/7dba4121cdd20dbc4b20.js +0 -1
- package/assets/esri/core/workers/chunks/bb659dcd297b895830df.js +0 -1
- /package/assets/esri/core/workers/chunks/{386435341e949f5573b4.js.LICENSE.txt → 0fc60b4c44c4e865b699.js.LICENSE.txt} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[88,926],{69540(e,t,i){i.d(t,{OU:()=>h,Pw:()=>c});var s=i(5482),r=i(69622),n=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(88620),l=i(64108);const u=Symbol("ClonableMixin"),h=e=>{var t;const i=e;let r=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,s=t.store,r={},l=new Map;for(const t in i){const o=i[t],a=s?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==a&&0!==a&&5!==a&&4!==a)continue;const h=this[t];let c=null;if("function"==typeof u)c=u(h,e);else if("reference"===u)c=h;else if(c=(0,n.TU)(h,e),null!=h&&null==c)continue;0===a?l.set(t,c):r[t]=c}const u=new(0,Object.getPrototypeOf(this).constructor)(r);if(l.size){const e=(0,a.oY)(u)?.store;if(e)for(const[t,i]of l)e.set(t,i,0)}return u}};return r=(0,s.Cg)([(0,l.$)("esri.core.Clonable")],r),r},c=h(r.A)},66344(e,t,i){i.d(t,{q:()=>a});const s=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class r{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){const i=this._db.get(e.id+t);return i?.size??0}put(e,t,i,r,o){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==i&&this._notifyRemove(t,a.entry,a.size,0)),r>this._maxSize)return void this._notifyRemove(t,i,r,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!r||r<0)return s||console.warn(`Refusing to cache entry with size ${r} for key ${t}`),void this._notifyRemove(t,i,0,0);const l=1+Math.max(o,-4)- -3;this._db.set(t,new n(i,r,l)),this._size+=r,e.size+=r,this._checkSize()}updateSize(e,t){t=e.id+t;const i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let s=i.entry.usedMemory;for(;s>this._maxSize;){const e=this._notifyRemove(t,i.entry,s,1);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}i.size=s,this._size+=s,e.size+=s,this._checkSize()}pop(e,t){t=e.id+t;const i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;const i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){const i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=new Array;this._db.forEach((e,s)=>{const r=e.lifetime;i[r]=(i[r]||0)+e.size,this._clients.forEach(i=>{const{id:r,name:n}=i;if(s.startsWith(r)){const i=t[n]||0;t[n]=i+e.size}})});const s={};this._clients.forEach(e=>{const i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const r=t[i]||0;t[i]=r,s[i]=Math.round(100*e.hitRate)+"%"}else s[i]="0%"});const r=Object.keys(t);r.sort((e,i)=>t[i]-t[e]),r.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+s[i]);for(let t=i.length-1;t>=0;--t){const s=i[t];s&&(e["Priority "+(t+-3-1)]=Math.round(s/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,s){const r=this._clients.get(e.split(o)[0])?.removeFunc,n=r?.(t,s,i);return"number"==typeof n?n:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const i=t??this;if(i.size<=e)return;const s=t?.id;let r=!0;for(;r;){r=!1;for(const[n,a]of this._db)if(0===a.lifetime&&(!s||n.startsWith(s))){const s=t??this._clients.get(n.split(o)[0]);if(this._purgeItem(n,a,s),i.size<=.9*e)return;r||=this._db.has(n)}}for(const[r,n]of this._db)if(!s||r.startsWith(s)){const s=t??this._clients.get(r.split(o)[0]);if(this._purgeItem(r,n,s),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);const s=this._notifyRemove(e,t.entry,t.size,1);null!=s&&s>0&&(this._size+=s,i&&(i.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new r(0);class n{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class a{constructor(e,t){this.removeFunc=t,this.id="",this.name="",this.size=0,this._storage=new r(e,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},60999(e,t,i){i.d(t,{DZ:()=>p,Ke:()=>f,Tj:()=>h,UT:()=>m,aD:()=>y,jJ:()=>u});var s=i(5482),r=i(69622),n=i(97768),o=i(17676),a=i(10107),l=i(64108);function u(e,t,i){return(0,o.Lx)(e.map((e,s)=>t.apply(i,[e,s])))}async function h(e,t,i){return(await(0,o.Lx)(e.map((e,s)=>t.apply(i,[e,s])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function f(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function p(e){try{return c(await e)}catch(e){return(0,o.QP)(e),d(e)}}function m(e,t){return new _(e,t)}let _=class extends r.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=c(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,o.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.xt)(this._abortHandle),this._abortController=null}};(0,s.Cg)([(0,a.MZ)()],_.prototype,"value",null),(0,s.Cg)([(0,a.MZ)()],_.prototype,"error",null),(0,s.Cg)([(0,a.MZ)()],_.prototype,"finished",null),(0,s.Cg)([(0,a.MZ)()],_.prototype,"promise",void 0),(0,s.Cg)([(0,a.MZ)()],_.prototype,"_result",void 0),_=(0,s.Cg)([(0,l.$)("esri.core.asyncUtils.ReactiveTask")],_);class y{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,s.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,s.hk)(t)}}}},75503(e,t,i){i.d(t,{wq:()=>a});var s=i(4576),r=i(21818),n=(i(44208),i(15142)),o=i(11006);class a{constructor(e=9,t){this._compareMinX=d,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),b.prune(),w.prune(),C.prune(),S.prune()}all(e){l(this._data,e)}search(e,t){let i=this._data;const s=this._toBBox;if(v(e,i))for(b.clear();i;){for(let r=0,n=i.children.length;r<n;r++){const n=i.children[r],o=i.leaf?s(n):n;v(e,o)&&(i.leaf?t(n):g(e,o)?l(n,t):b.push(n))}i=b.pop()}}collides(e){let t=this._data;const i=this._toBBox;if(!v(e,t))return!1;for(b.clear();t;){for(let s=0,r=t.children.length;s<r;s++){const r=t.children[s],n=t.leaf?i(r):r;if(v(e,n)){if(t.leaf||g(e,n))return!0;b.push(r)}}t=b.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new F([]),this}remove(e){if(!e)return this;let t,i=this._data,n=null,o=0,a=!1;const l=this._toBBox(e);for(C.clear(),S.clear();i||C.length>0;){if(i||(i=C.pop(),n=C.data[C.length-1],o=S.pop()??0,a=!0),i.leaf&&(t=(0,s.qh)(i.children,(0,r.z)(e),i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),C.push(i),this._condense(C),this;a||i.leaf||!g(i,l)?n?(o++,i=n.children[o],a=!1):i=null:(C.push(i),S.push(o),o=0,n=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,i,s){const r=i-t+1;let n=this._maxEntries;if(r<=n){const s=new F(e.slice(t,i+1));return u(s,this._toBBox),s}s||(s=Math.ceil(Math.log(r)/Math.log(n)),n=Math.ceil(r/n**(s-1)));const o=new T([]);o.height=s;const a=Math.ceil(r/n),l=a*Math.ceil(Math.sqrt(n));x(e,t,i,l,this._compareMinX);for(let r=t;r<=i;r+=l){const t=Math.min(r+l-1,i);x(e,r,t,a,this._compareMinY);for(let i=r;i<=t;i+=a){const r=Math.min(i+a-1,t);o.children.push(this._build(e,i,r,s-1))}}return u(o,this._toBBox),o}_insert(e,t,i){const s=this._toBBox,r=i?e:s(e);C.clear();const n=function(e,t,i,s){for(;s.push(t),!0!==t.leaf&&s.length-1!==i;){let i,s=1/0,r=1/0;for(let n=0,o=t.children.length;n<o;n++){const o=t.children[n],a=p(o),l=_(e,o)-a;l<r?(r=l,s=a<s?a:s,i=o):l===r&&a<s&&(s=a,i=o)}t=i||t.children[0]}return t}(r,this._data,t,C);for(n.children.push(e),c(n,r);t>=0&&C.data[t].children.length>this._maxEntries;)this._split(C,t),t--;!function(e,t,i){for(let s=i;s>=0;s--)c(t.data[s],e)}(r,C,t)}_split(e,t){const i=e.data[t],s=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,s);const n=this._chooseSplitIndex(i,r,s);if(!n)return;const o=i.children.splice(n,i.children.length-n),a=i.leaf?new F(o):new T(o);a.height=i.height,u(i,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this._data=new T([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let s,r,n;s=r=1/0;for(let o=t;o<=i-t;o++){const t=h(e,0,o,this._toBBox),a=h(e,o,i,this._toBBox),l=y(t,a),u=p(t)+p(a);l<s?(s=l,n=o,r=u<r?u:r):l===s&&u<r&&(r=u,n=o)}return n}_chooseSplitAxis(e,t,i){const s=e.leaf?this._compareMinX:d,r=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,i,s)<this._allDistMargin(e,t,i,r)&&e.children.sort(s)}_allDistMargin(e,t,i,s){e.children.sort(s);const r=this._toBBox,n=h(e,0,t,r),o=h(e,i-t,i,r);let a=m(n)+m(o);for(let s=t;s<i-t;s++){const t=e.children[s];c(n,e.leaf?r(t):t),a+=m(n)}for(let s=i-t-1;s>=t;s--){const t=e.children[s];c(o,e.leaf?r(t):t),a+=m(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const i=e.data[t];if(0===i.children.length)if(t>0){const r=e.data[t-1],n=r.children;n.splice((0,s.qh)(n,i,n.length,r.indexHint),1)}else this.clear();else u(i,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let i=e;for(w.clear();i;){if(!0===i.leaf)for(const e of i.children)t((0,r.z)(e));else w.pushArray(i.children);i=w.pop()??null}}function u(e,t){h(e,0,e.children.length,t,e)}function h(e,t,i,s,r){r||(r=new F([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let n,o=t;o<i;o++)n=e.children[o],c(r,e.leaf?s(n):n);return r}function c(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function _(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const i=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),n=Math.min(e.maxY,t.maxY);return Math.max(0,r-i)*Math.max(0,n-s)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function v(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,i,s,r){const n=[t,i];for(;n.length;){const t=n.pop(),i=n.pop();if(t-i<=s)continue;const a=i+Math.ceil((t-i)/s/2)*s;(0,o.q)(e,a,i,t,r),n.push(i,a,a,t)}}const b=new n.A,w=new n.A,C=new n.A,S=new n.A({deallocator:void 0});class I{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class M extends I{constructor(){super(...arguments),this.height=1,this.indexHint=new s.vW}}class F extends M{constructor(e){super(),this.children=e,this.leaf=!0}}class T extends M{constructor(e){super(),this.children=e,this.leaf=!1}}},36708(e,t,i){i.d(t,{C_:()=>d,OH:()=>m,Vh:()=>_,on:()=>c,pc:()=>y,wB:()=>l,z7:()=>u});var s=i(37955),r=i(36563),n=i(97768),o=i(17676),a=i(14012);function l(e,t,i={}){return h(e,t,i,f)}function u(e,t,i={}){return h(e,t,i,p)}function h(e,t,i={},s){let r=null;const o=i.once?(e,i)=>{s(e)&&((0,n.xt)(r),t(e,i))}:(e,i)=>{s(e)&&t(e,i)};if(r=(0,a.Cn)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return r}function c(e,t,i,o={}){let a=null,u=null,h=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,n.xt)(h),i(e)}const f=l(e,(e,i)=>{c(),(0,s.wb)(e)&&(a=e,u=(0,s.on)(e,t,d),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return h=(0,r.hA)(()=>{f.remove(),c()}),h}function d(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,n.xt)(a)}return new Promise((s,n)=>{a=(0,r.vE)([(0,o.u7)(i,()=>{l(),n((0,o.NK)())}),h(e,e=>{l(),s(e)},{sync:!1,once:!0},t??f)])})}(e,p,t)}function f(e){return!0}function p(e){return!!e}i(80559);const m={sync:!0},_={initial:!0},y={sync:!0,initial:!0}},60408(e,t,i){function s(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function r(e){return void 0!==e.points}function n(e){return void 0!==e.x&&void 0!==e.y}function o(e){return void 0!==e.paths||void 0!==e.curvePaths}function a(e){return void 0!==e.rings||void 0!==e.curveRings}function l(e){return"object"==typeof e&&"vertexAttributes"in e}function u(e){return e?n(e)?"esriGeometryPoint":o(e)?"esriGeometryPolyline":a(e)?"esriGeometryPolygon":s(e)?"esriGeometryEnvelope":r(e)?"esriGeometryMultipoint":null:null}function h(e){return null!=e&&("hasZ"in e&&e.hasZ||"z"in e&&null!=e.z)}function c(e){return null!=e&&("hasM"in e&&e.hasM||"m"in e&&null!=e.m)}i.d(t,{$B:()=>u,Bi:()=>a,Pv:()=>h,Rg:()=>o,U9:()=>r,W0:()=>c,ZC:()=>s,fT:()=>n,uW:()=>l})},65864(e,t,i){i.d(t,{rS:()=>h,xD:()=>d});var s=i(5443),r=i(91075),n=i(48526),o=i(86738),a=i(39829),l=i(82799),u=i(60408);function h(e){return null==e?null:e instanceof r.A?e:(0,u.fT)(e)?o.A.fromJSON(e):(0,u.Rg)(e)?l.A.fromJSON(e):(0,u.Bi)(e)?a.A.fromJSON(e):(0,u.U9)(e)?n.A.fromJSON(e):(0,u.ZC)(e)?s.A.fromJSON(e):null}const c={esriGeometryPoint:o.A,esriGeometryPolyline:l.A,esriGeometryPolygon:a.A,esriGeometryEnvelope:s.A,esriGeometryMultipoint:n.A,esriGeometryMultiPatch:a.A};function d(e){return e&&c[e]||null}},50498(e,t,i){i.d(t,{Ye:()=>c,gy:()=>h,iI:()=>f,yR:()=>d});var s=i(66552),r=i(5443),n=i(91075),o=i(48526),a=i(86738),l=i(39829),u=i(82799);const h=(0,s.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),c=(0,s.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),d={base:n.A,key:"type",typeMap:{extent:r.A,multipoint:o.A,point:a.A,polyline:u.A,polygon:l.A}},f=new s.J({esriGeometryBezier3Curve:"cubic-bezier",esriGeometryCircularArc:"circular-arc",esriGeometryEllipticArc:"elliptic-arc"},{ignoreUnknown:!0})},6518(e,t,i){i.d(t,{F:()=>a});var s=i(44208),r=i(75503),n=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.wq(9,(0,s.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((i,s)=>{e[t++]=s}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,n.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,i)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},39357(e,t,i){i.d(t,{A:()=>a});var s,r=i(5482),n=i(25482),o=i(91429);let a=s=class extends n.o{constructor(e){super(e),this.name=null,this.code=null}clone(){return new s({name:this.name,code:this.code})}};(0,r.Cg)([(0,o.MZ)({type:String,json:{write:{isRequired:!0}}})],a.prototype,"name",void 0),(0,r.Cg)([(0,o.MZ)({type:[String,Number],json:{write:{isRequired:!0}}})],a.prototype,"code",void 0),a=s=(0,r.Cg)([(0,o.$K)("esri.layers.support.CodedValue")],a)},53177(e,t,i){i.d(t,{A:()=>h});var s,r=i(5482),n=i(4718),o=i(91429),a=i(39357),l=i(76357),u=i(93223);let h=class extends l.A{static{s=this}constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const i=String(e);this.codedValues.some(e=>(String(e.code)===i&&(t=e.name),!!t))}return t}clone(){return new s({codedValues:(0,n.o8)(this.codedValues),name:this.name})}};(0,r.Cg)([(0,o.MZ)({type:[a.A],json:{write:{isRequired:!0}}})],h.prototype,"codedValues",void 0),(0,r.Cg)([(0,u.e)({codedValue:"coded-value"})],h.prototype,"type",void 0),h=s=(0,r.Cg)([(0,o.$K)("esri.layers.support.CodedValueDomain")],h)},76357(e,t,i){i.d(t,{A:()=>u});var s=i(5482),r=i(66552),n=i(25482),o=i(91429),a=i(93223);const l=new r.J({inherited:"inherited",codedValue:"coded-value",range:"range"});let u=class extends n.o{constructor(e){super(e),this.name=null,this.type=null}};(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"name",void 0),(0,s.Cg)([(0,a.e)(l),(0,o.MZ)({json:{write:{isRequired:!0}}})],u.prototype,"type",void 0),u=(0,s.Cg)([(0,o.$K)("esri.layers.support.Domain")],u)},20437(e,t,i){i.d(t,{A:()=>p});var s,r=i(5482),n=i(66552),o=i(25482),a=i(91429),l=i(56507),u=i(8631),h=i(98453),c=i(36005),d=i(93223);const f=new n.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",currency:"currency",dateAndTime:"date-and-time",description:"description",emailAddress:"email-address",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",phoneNumber:"phone-number",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let p=class extends o.o{static{s=this}constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?.value??null}readValueType(e,{description:t}){let i=null;try{i=t?JSON.parse(t):null}catch(e){}return i?f.fromJSON(i.fieldValueType):null}clone(){return new s({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,r.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"alias",void 0),(0,r.Cg)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],p.prototype,"defaultValue",void 0),(0,r.Cg)([(0,a.MZ)()],p.prototype,"description",void 0),(0,r.Cg)([(0,c.w)("description")],p.prototype,"readDescription",null),(0,r.Cg)([(0,a.MZ)({types:u.g,json:{read:{reader:u.r},write:!0}})],p.prototype,"domain",void 0),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],p.prototype,"editable",void 0),(0,r.Cg)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],p.prototype,"length",void 0),(0,r.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],p.prototype,"nullable",void 0),(0,r.Cg)([(0,d.e)(h.m)],p.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)()],p.prototype,"valueType",void 0),(0,r.Cg)([(0,c.w)("valueType",["description"])],p.prototype,"readValueType",null),(0,r.Cg)([(0,a.MZ)({type:Boolean,json:{read:!1}})],p.prototype,"visible",void 0),p=s=(0,r.Cg)([(0,a.$K)("esri.layers.support.Field")],p)},41628(e,t,i){i.d(t,{A:()=>l});var s,r=i(5482),n=i(91429),o=i(76357),a=i(93223);let l=class extends o.A{static{s=this}constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new s({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,r.Cg)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,i){t[i]=[this.minValue||0,e]},isRequired:!0}}})],l.prototype,"maxValue",void 0),(0,r.Cg)([(0,n.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,i){t[i]=[e,this.maxValue||0]},isRequired:!0}}})],l.prototype,"minValue",void 0),(0,r.Cg)([(0,a.e)({range:"range"})],l.prototype,"type",void 0),l=s=(0,r.Cg)([(0,n.$K)("esri.layers.support.RangeDomain")],l)},8631(e,t,i){i.d(t,{r:()=>d,g:()=>c});var s,r=i(53177),n=i(76357),o=i(5482),a=i(91429),l=i(93223);let u=class extends n.A{static{s=this}constructor(e){super(e),this.type="inherited"}clone(){return new s}};(0,o.Cg)([(0,l.e)({inherited:"inherited"})],u.prototype,"type",void 0),u=s=(0,o.Cg)([(0,a.$K)("esri.layers.support.InheritedDomain")],u);var h=i(41628);const c={key:"type",base:n.A,typeMap:{range:h.A,"coded-value":r.A,inherited:u}};function d(e){if(!e?.type)return null;switch(e.type){case"range":return h.A.fromJSON(e);case"codedValue":return r.A.fromJSON(e);case"inherited":return u.fromJSON(e)}return null}},98453(e,t,i){i.d(t,{m:()=>s});const s=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},31756(e,t,i){i.d(t,{j:()=>n});var s=i(86211),r=i(79258);const n={unknown:1,inches:(0,s.oU)(1,"meters","inches"),feet:(0,s.oU)(1,"meters","feet"),"us-feet":(0,s.oU)(1,"meters","us-feet"),yards:(0,s.oU)(1,"meters","yards"),miles:(0,s.oU)(1,"meters","miles"),"nautical-miles":(0,s.oU)(1,"meters","nautical-miles"),millimeters:(0,s.oU)(1,"meters","millimeters"),centimeters:(0,s.oU)(1,"meters","centimeters"),decimeters:(0,s.oU)(1,"meters","decimeters"),meters:(0,s.oU)(1,"meters","meters"),kilometers:(0,s.oU)(1,"meters","kilometers"),"decimal-degrees":1/(0,s.vl)(1,"meters",r.$O.radius)}},63746(e,t,i){function s(e){return class{constructor(){for(const t of e)this[t]=null}}}function r(e,t=1){const{transform:i,hasZ:s,hasM:r}=e;if(null==i)return s&&1!==t?e=>{e[2]*=t}:null;const[n,o]=function(e,t,i,s){let{scale:r,translate:n,originPosition:o}=e;return"upperLeft"===o&&(r=r.map((e,t)=>1===t?-e:e)),t&&(r=r.map((e,t)=>2===t?e*s:e),n=n.map((e,t)=>2===t?e*s:e)),!t&&i&&(r=r.filter((e,t)=>2!==t),n=n.filter((e,t)=>2!==t)),[r,n]}(i,s,r,t),a=e.hasZ?3:2;return e=>{for(let t=0;t<e.length&&(t!==a||0!==e[t]);++t)e[t]=e[t]*n[t]+o[t]}}i.d(t,{Mv:()=>r,_7:()=>s}),i(53966)},2272(e,t,i){i.d(t,{Dl:()=>u,gf:()=>c,jV:()=>l,lF:()=>h});var s=i(92602),r=i(70333),n=i(4718),o=i(84952),a=i(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,o.An)(e):(0,n.o8)(e)}function h(e,t,i){const s={};for(const r in e){if("declaredClass"===r)continue;const n=e[r];if(null!=n&&"function"!=typeof n)if(Array.isArray(n))s[r]=n.map(e=>h(e));else if("object"==typeof n)if(n.toJSON){const e=n.toJSON(i?.[r]);s[r]=t?e:JSON.stringify(e)}else s[r]=t?n:JSON.stringify(n);else s[r]=n}return s}async function c(e,t,n){const o=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.getApiKey)(e)??r.id?.findCredential(e)?.token:null}(e,t);if(o)return o;!r.id&&s.A.request.useIdentity&&await Promise.all([i.e(7632),i.e(1378),i.e(148)]).then(i.bind(i,50148));const l=await r.id.getCredential(e,n);return l?.token}},926(e,t,i){i.d(t,{Dd:()=>d,Jn:()=>f,Qc:()=>p,getApiKey:()=>h,getSessionToken:()=>c});var s=i(92602),r=i(11254),n=i(84952);const o=/^https?:\/\/(i?basemaps|basemapstyles)-api\.arcgis\.com\//i,a=new Set(["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"]),l=new Map;let u=null;function h(e){if(!p(e))return null;const t=t=>t instanceof RegExp?t.test(e):"string"==typeof t&&e.startsWith(t),i=s.A.apiKeys;if(Array.isArray(i.scopes))for(const e of i.scopes)if(Array.isArray(e.urls)){if(e.urls.some(t))return e.token}else if(t(e.urls))return e.token;return i.basemapStyles&&o.test(e)?i.basemapStyles:s.A.apiKey&&/^https?:\/\/.+\.arcgis\.com(\/|$)/i.test(e)?s.A.apiKey:null}async function c(e){if(!s.A.sessions?.basemap?.enabled||!o.test(e))return null;const t=h(e);if(!t)return null;u&&await u;const{styleFamily:i="arcgis",autoRefresh:n,duration:a=43200}=s.A.sessions.basemap,c=`${t}:${i}`,d=l.get(c);if(d&&(!n||d.endTime>Date.now()))return d.sessionToken;let f;u=(0,r.A)("https://basemapstyles-api.arcgis.com/arcgis/rest/services/styles/v2/sessions/start",{cacheBust:!0,query:{durationSeconds:a,styleFamily:i,token:t}});try{f=(await u).data,f.endTime-=5e3,l.set(c,f)}finally{u=null}return f.sessionToken}function d(){return null!=s.A.apiKey||null!=s.A.apiKeys.basemapStyles}function f(e,t){return t?p(e):null!=h(e)}function p(e){const t=(0,n.$z)(e,!0);return!!t&&!a.has(t)&&!e.endsWith("/sharing/rest/generateToken")}},88625(e,t,i){i.d(t,{A:()=>g});var s,r=i(5482),n=i(69540),o=i(66552),a=i(25482),l=i(97768),u=i(91429),h=i(30524);let c=s=class extends a.o{constructor(e){super(e),this.expression=void 0,this.title=void 0}async collectRequiredFields(e,t){return(0,h.Dx)(e,t,null,this.expression)}clone(){return new s({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,r.Cg)([(0,u.MZ)({type:String,json:{write:{isRequired:!0}}})],c.prototype,"expression",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],c.prototype,"title",void 0),c=s=(0,r.Cg)([(0,u.$K)("esri.symbols.support.FeatureExpressionInfo")],c);const d=c;var f=i(16271),p=i(36005),m=i(43937);const _=(0,o.O)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),y=new o.J({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let g=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.featureExpressionInfo=void 0,this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e.expression?e:void 0:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,i,s){t[i]=e.write({},s),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,l.CM)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,r.Cg)([(0,u.MZ)({type:d,json:{write:!0}})],g.prototype,"featureExpressionInfo",void 0),(0,r.Cg)([(0,p.w)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],g.prototype,"readFeatureExpressionInfo",null),(0,r.Cg)([(0,m.K)("featureExpressionInfo",{featureExpressionInfo:{type:d},"featureExpression.value":{type:[0]}})],g.prototype,"writeFeatureExpressionInfo",null),(0,r.Cg)([(0,u.MZ)({type:_.apiValues,nonNullable:!0,json:{type:_.jsonValues,read:_.read,write:{writer:_.write,isRequired:!0}}})],g.prototype,"mode",null),(0,r.Cg)([(0,u.MZ)({type:Number,json:{write:!0}})],g.prototype,"offset",void 0),(0,r.Cg)([(0,u.MZ)({type:f.KQ,json:{type:String,read:y.read,write:y.write}})],g.prototype,"unit",null),g=(0,r.Cg)([(0,u.$K)("esri.symbols.support.ElevationInfo")],g)},16271(e,t,i){i.d(t,{Ao:()=>n,KQ:()=>o});var s=i(4576),r=i(31756);function n(e){return 1/(r.j[e]||1)}const o=function(){const e=Object.keys(r.j);return(0,s.TF)(e,"decimal-degrees"),e.sort(),e}()},20401(e,t,i){i.r(t),i.d(t,{default:()=>Pe});var s=i(5482),r=i(65529),n=i(17676),o=i(36708),a=i(91429),l=i(79897),u=i(16930),h=i(65864),c=i(4576),d=i(49186),f=i(53966),p=i(87992),m=i(70328),_=i(6518),y=i(50498),g=i(69397),v=i(27647);class x{constructor(e=null,t={},i,s,r=0){this.geometry=e,this.attributes=t,this.centroid=i,this.objectId=s,this.displayId=r}weakClone(){return new x(this.geometry,this.attributes,this.centroid,this.objectId,this.displayId)}clone(){return new x(this.geometry?.clone(),{...this.attributes},this.centroid?.clone(),this.objectId,this.displayId)}get usedMemory(){return 128+(0,g.lM)(this.attributes)+(this.geometry?.usedMemory??0)}ensureCentroid(e){return this.centroid??=(0,v.Q)(this.geometry&&(0,p.JR)(this.geometry)),this.centroid}}const b={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,i)=>new x((0,p.Nh)(y.gy.fromJSON(i),t),e.attributes,null,e.objectId),getGeometry:e=>e.geometry&&(0,p.JR)(e.geometry),getGeometryWithCurves:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)};var w=i(51441);const C=(0,m.vt)();class S{constructor(e,t,i){this.geometryType=e,this.hasZ=t,this.hasM=i,this._boundsStore=new _.F,this._featuresById=new Map,this._usedMemory=0,this.events=new r.bk,this.featureAdapter=b}get usedMemory(){return this._usedMemory}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){const e=this._featuresById.size;let t=0;return this._featuresById.forEach(({geometry:e})=>{t+=e?e.vertexCount:0}),{featureCount:e,vertexCount:t}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,i,s,r]=this.fullBounds;return{xmin:t,ymin:i,xmax:s,ymax:r,spatialReference:(0,w.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(c.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const i of e){const e=this._boundsStore.get(i.objectId);e&&t((0,m.Jt)(C,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void f.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new d.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const i=this._featuresById.get(t);let s;if(i?(e.displayId=i.displayId,s=this._boundsStore.get(t)??void 0,this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0):this.onFeatureAdd?.(e),!e.geometry)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);this._boundsStore.set(t,(0,p.NO)(e.geometry,s)),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return f.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new d.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const i=this._featuresById.get(t);if(!i)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;const{geometry:s,attributes:r}=e;for(const e in r)i.attributes[e]=r[e];return s&&(i.geometry=s,this._boundsStore.set(t,(0,p.NO)(s)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}var I=i(56390),M=i(87045),F=i(72802),T=i(61956),A=i(88625),z=i(66344),B=i(91869),P=i(86211),O=i(52006),E=i(16271);function R(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:i}=t;return new Z(e,i)}return new j}class j{async alignCandidates(e,t,i){return e}notifyElevationSourceChange(){}}class Z{constructor(e,t){this._elevationInfo=e,this._alignPointsInFeatures=t,this._alignmentsCache=new z.q(1024),this._cacheVersion=0}async alignCandidates(e,t,i){const s=this._elevationInfo;return null==s||"absolute-height"!==s.mode||s.featureExpressionInfo?this._alignComputedElevationCandidates(e,t,i):(function(e,t,i){const{offset:s,unit:r}=i;if(null==s)return;const n=(0,P.G9)(t),o=s*((0,E.Ao)(r??"meters")/n);for(const t of e)switch(t.type){case"edge":t.start.z+=o,t.end.z+=o,t.curve&&((0,O.yP)(t.curve)[2]+=o);continue;case"vertex":t.target.z+=o;continue}}(e,t,s),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}async _alignComputedElevationCandidates(e,t,i){const s=new Map;for(const t of e)(0,B.tE)(s,t.objectId,Y).push(t);const[r,o,a]=this._prepareQuery(s,t),l=await this._alignPointsInFeatures(r,i);if((0,n.Te)(i),a!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t,i);this._applyCacheAndResponse(r,l,o);const{drapedObjectIds:u,failedObjectIds:h}=l,c=[];for(const t of e){const{objectId:e}=t;u.has(e)&&"edge"===t.type&&(t.draped=!0),h.has(e)||c.push(t)}return c}_prepareQuery(e,t){const i=[],s=[];for(const[t,r]of e){const e=[];for(const i of r)this._addToQueriesOrCachedResult(t,i.target,e,s),"edge"===i.type&&(this._addToQueriesOrCachedResult(t,i.start,e,s),this._addToQueriesOrCachedResult(t,i.end,e,s));0!==e.length&&i.push({objectId:t,points:e})}return[{spatialReference:t.toJSON(),pointsInFeatures:i},s,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,i,s){const r=q(e,t),n=this._alignmentsCache.get(r);null==n?i.push(t):s.push(new k(t,n))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:i,failedObjectIds:s},r){for(const e of r)e.apply();let n=0;const o=this._alignmentsCache;for(const{objectId:r,points:a}of e.pointsInFeatures){if(s.has(r)){n+=a.length;continue}const e=!i.has(r);for(const i of a){const s=q(r,i),a=t[n++];i.z=a,e&&o.put(s,a,1)}}}}class k{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function q(e,{x:t,y:i,z:s,spatialReference:r}){return`${e}-${t}-${i}-${s??0}}-wkid:${r?.wkid}`}function Y(){return[]}class X{filter(e,t){return t}notifyElevationSourceChange(){}}class N{filter(e,t){const{point:i,distance:s}=e,{z:r}=i;if(null==r)return t;if(0===t.length)return t;const n=function(e){return"number"==typeof e?{x:e,y:e,z:e}:e}(s),o=this._updateCandidatesTo3D(t,i,n).filter(V);return o.sort(J),o}_updateCandidatesTo3D(e,t,i){for(const s of e)switch(s.type){case"edge":L(s,t,i);continue;case"vertex":H(s,t,i);continue}return e}}function V(e){return e.distance<=1}function G(e=!1){return e?new N:new X}function L(e,t,{x:i,y:s,z:r}){const{start:n,end:o,target:a}=e;if(e.curve)throw new Error("Curves are not yet supported.");e.draped||function(e,t,i,s){const r=s.x-i.x,n=s.y-i.y,o=s.z-i.z,a=r*r+n*n+o*o,l=(t.x-i.x)*r+(t.y-i.y)*n+o*(t.z-i.z),u=Math.min(1,Math.max(0,l/a)),h=i.x+r*u,c=i.y+n*u,d=i.z+o*u;e.x=h,e.y=c,e.z=d}(a,t,n,o);const l=(t.x-a.x)/i,u=(t.y-a.y)/s,h=(t.z-a.z)/r;e.distance=Math.sqrt(l*l+u*u+h*h)}function H(e,t,{x:i,y:s,z:r}){const{target:n}=e,o=(t.x-n.x)/i,a=(t.y-n.y)/s,l=(t.z-n.z)/r,u=Math.sqrt(o*o+a*a+l*l);e.distance=u}function J(e,t){return e.distance-t.distance}var $=i(4718),U=i(799);function D(e=!1,t){return e?new W(t):new K}class K{async fetch(){return[]}notifySymbologyChange(){}}class W{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new z.q(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];const i=[],s=[],r=this._candidatesCache;for(const t of e){const e=Q(t),n=r.get(e);if(n)for(const e of n)s.push((0,$.o8)(e));else i.push(t),r.put(e,[],1)}if(0===i.length)return s;const o=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(i,t);if((0,n.Te)(t),o!==this._cacheVersion)return this.fetch(e,t);const u=[],{length:h}=a;for(let e=0;e<h;++e){const t=a[e],s=Q(i[l[e]]),n=r.get(s);n.push(t),r.put(s,n,n.length),u.push((0,$.o8)(t))}return s.concat(u)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function Q(e){switch(e.type){case"vertex":{const{objectId:t,target:i}=e,s=`${t}-vertex-${i.x}-${i.y}-${i.z??0}`;return(0,U.Wm)(s).toString()}case"edge":{const{objectId:t,start:i,end:s}=e,r=`${t}-edge-${i.x}-${i.y}-${i.z??0}-to-${s.x}-${s.y}-${s.z??0}`;return(0,U.Wm)(r).toString()}default:return""}}var ee=i(69622),te=i(60999),ie=i(3483),se=i(13069),re=i(5443),ne=i(19419),oe=i(92722),ae=i(54339);class le{constructor(){this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new le;return e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}var ue=i(60694),he=i(62815),ce=i(63746);class de{constructor(e){this._options=e,this.featureSet=new le,this.parseOnly=null,this._idInfo=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._push=de._pushXY,this._attributesClass=null,this._previousX=0,this._previousY=0,this._vertex=[],this._i=0,this._geometry=null,this._iVertex=0,this._iPart=0,this._isPolygon=!1,this._ringEndsAt=-1}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(e){"string"==typeof e?this._idInfo??={type:"object-id",fieldName:e}:this._idInfo={type:"unique-id-simple",fieldName:e.name}}finish(){if(this._idInfo)for(const e of this.featureSet.features)e.objectId=(0,ae.W)(e,this._idInfo);const{spatialReference:e,features:t}=this.featureSet;if(e)for(const{geometry:i}of t)i&&(i.spatialReference=e);this.featureSet.transform=null}feature(){this._attributesClass??=(0,ce._7)(this.featureSet.fields?.map(e=>e.name)??[]),this.featureSet.features.push(new x(null,new this._attributesClass,null,0)),this._setVertexTransformer()}centroid(e){const{hasZ:t,hasM:i}=this.featureSet;this.featureSet.features.at(-1).centroid=new oe.A([],e,t,i)}geometry(e,t,i){this._previousX=this._previousY=0,this._i=this._iVertex=this._iPart=0;let{hasZ:s,hasM:r}=this.featureSet;s??=!1,r??=!1,this._vertex=[0,0],s&&this._vertex.push(0),r&&this._vertex.push(0);const n=y.gy.fromJSON(t);this._isPolygon="polygon"===n;const o=Number(this._isPolygon),a="point"===n?1:i.reduce((e,t)=>e+t-o,0),l="point"===n?0:i.length;if(this._geometry=(0,p.V2)(n,a,l,s,r,!1),this._push=s?r?de._pushXYZM:de._pushXYZ:r?de._pushXYM:de._pushXY,this._geometry.isMultipart()){this._geometry.partOffsets[0]=0;for(let e=0;e<l;++e)this._geometry.partOffsets[e+1]=this._geometry.partOffsets[e]+i[e]-o}this._ringEndsAt=o?this._geometry.partOffsets.at(1)??0:-1,1===e?(this.featureSet.queryGeometry=this._geometry,this.featureSet.queryGeometryType=t):this.featureSet.features.at(-1).geometry=this._geometry}coord(e){const t=this._vertex;t[this._i++]=e,this._i<t.length||(this._i=0,t[0]+=this._previousX,t[1]+=this._previousY,[this._previousX,this._previousY]=t,this._iVertex===this._ringEndsAt&&(++this._iPart,this._ringEndsAt=this._geometry.partOffsets[this._iPart+1],this._previousX=this._previousY=0,this._isPolygon)||(this._transformInPlace?.(t),this._push(this)))}curvedGeometry(e,t,i,s){let{hasZ:r,hasM:n}=this.featureSet;r??=!1,n??=!1,this._i=this._iVertex=this._iPart=0;const o=y.gy.fromJSON(e);this._isPolygon="polygon"===o;const a=Number(!this._isPolygon),l=t.length;let u=0,h=0,c=a*l;for(let e=0;e<i.length;++e)switch(c+=s[e],i[e]){case 1:case 3:u+=s[e];continue;case 2:h+=s[e]}this._geometry=(0,p.V2)(o,c,l,r,n,!0,u,h);const{partOffsets:d}=this._geometry;d[0]=0;for(let e=0,i=0;e<l;++e){d[e+1]=d[e]+a;for(let r=0;r<t[e];++r)d[e+1]+=s[i++]}switch(e){case"esriGeometryPoint":case"esriGeometryMultipoint":throw new Error(`Curved ${e} does not make sense`)}this.featureSet.features.at(-1).geometry=this._geometry}startCurvedPart(e){}finishCurvedPart(e){this._isPolygon||(this._transform(e,this._vertex),this._push(this)),++this._iPart}lineSegment(e,t){this._transform(e,this._vertex),this._push(this)}bezierSegment(e,t,i,s){this._transform(e,this._vertex),this._push(this),this._transformXY(t,me.b[0]),this._transformXY(i,me.b[1]),this._transformXY(s,me.b[2]),this._i=(0,p.tr)(this._vertex,me,this._geometry,this._iVertex-1,this._i)}circularArcSegment(e,t,i){this._transform(e,this._vertex),this._push(this),this._transformXY(t,fe.c[0]),this._transformXY(i,fe.c[1]),this._i=(0,p.e6)(this._vertex,fe,this._geometry,this._iVertex-1,this._i)}ellipticArcSegment(e,t,i,s,r,n,o,a){this._transform(e,this._vertex),this._push(this),this._transformXY(t,pe.a[0]),this._transformXY(i,pe.a[1]),pe.a[2]=s,pe.a[3]=r,pe.a[4]=n,pe.a[5]=o,pe.a[6]=a,this._i=(0,p._s)(this._vertex,pe,this._geometry,this._iVertex-1,this._i)}static _pushXY(e){const t=e._iVertex++,{vertexXY:i}=e._geometry;[i[2*t],i[2*t+1]]=e._vertex}static _pushXYZ(e){const t=e._iVertex++,{vertexXY:i,vertexZ:s}=e._geometry;[i[2*t],i[2*t+1],s[t]]=e._vertex}static _pushXYM(e){const t=e._iVertex++,{vertexXY:i,vertexM:s}=e._geometry;[i[2*t],i[2*t+1],s[t]]=e._vertex}static _pushXYZM(e){const t=e._iVertex++,{vertexXY:i,vertexM:s,vertexZ:r}=e._geometry;[i[2*t],i[2*t+1],r[t],s[t]]=e._vertex}_setVertexTransformer(){const{sourceSpatialReference:e}=this._options,{spatialReference:t,hasZ:i,transform:s}=this.featureSet,r=i?(0,he.d)(e,t):1;this._transformInPlace??=(0,ce.Mv)(this.featureSet,r),this._transformInPlaceXY??=(0,ce.Mv)({transform:s})}_transform(e,t){for(let i=0;i<e.length;++i)t[i]=e[i];this._transformInPlace?.(t)}_transformXY(e,t){t[0]=e[0],t[1]=e[1],this._transformInPlaceXY?.(t)}}const fe={c:[[0,0],[0,0]]},pe={a:[[0,0],[0,0],0,0,0,0,0]},me={b:[[0,0],[0,0],[0,0]]};var _e=i(80893);class ye{constructor(e,t){this.key=e,this.resolution=t,this.state={type:0},this.alive=!0}process(e){switch(this.state.type){case 0:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case 1:case 3:break;case 2:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case 4:this.state=this._goToDone(this.state,e)}return null}get debugInfo(){return{key:this.key,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case 0:case 1:return 0;case 2:return this.state.featureCount;case 3:return this.state.previous.featureCount;case 4:return this.state.features.length;case 5:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case 0:return"created";case 1:return"fetch-count";case 2:return"fetched-count";case 3:return"fetch-features";case 4:return"fetched-features";case 5:return"done"}}_gotoFetchCount(e,t){return{type:1,previous:e,task:(0,te.UT)(async e=>{const i=await(0,te.DZ)(t.fetchCount(this,e));1===this.state.type&&(this.state=function(e,t){return{type:2,featureCount:t,previous:e}}(this.state,i.ok?i.value:1/0))})}}_gotoFetchFeatures(e,t){return{type:3,previous:e,task:(0,te.UT)(async i=>{const s=await(0,te.DZ)(t.fetchFeatures(this,e.featureCount,i));3===this.state.type&&(this.state=function(e,t){return{type:4,previous:e,features:t}}(this.state,s.ok?s.value:[]))})}}_goToDone(e,t){return t.finish(this,e.features),{type:5,previous:e}}reset(){const e=this.state;switch(this.state={type:0},e.type){case 0:case 2:case 4:case 5:break;case 1:case 3:e.task.abort()}}}let ge=class extends ee.A{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}get _mandatoryOutFields(){const e=new Set;return this.objectIdField&&e.add(this.objectIdField),this.globalIdField&&e.add(this.globalIdField),e}set outFields(e){const t=this._get("outFields"),i=(0,ie.KC)(e,this._mandatoryOutFields);(0,ie.aI)(i,t)||(this._set("outFields",i),(0,ie.Yy)(i,t)||this.refresh())}get outFields(){return this._get("outFields")??this._mandatoryOutFields}set filter(e){const t=this._get("filter"),i=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(i)&&this._set("filter",i)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this._updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.suspended=!0,this._historicMoment=null,this.tilesOfInterest=new Array,this.availability=0,this._pendingTiles=new Map,this._updatingHandles=new l.U}initialize(){this._initializeFetchExtent(),this._updatingHandles.add(()=>this._configuration,()=>this.refresh()),this._updatingHandles.add(()=>this.tilesOfInterest,()=>{this._updatePriorities(),this._process()},{sync:!0,initial:!0,equals:(e,t)=>(0,c.aI)(e,t,({id:e},{id:t})=>e===t)}),this.addHandles((0,o.z7)(()=>!this.suspended,()=>this._process()))}_updatePriorities(){this.store.setPriorityOrderByKey(this.tilesOfInterest.map(({id:e})=>e)??[])}destroy(){this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._updatingHandles.destroy()}refresh(){this.store.refresh(),this._pendingTiles.forEach(e=>this._deletePendingTile(e)),this._process()}async handleEdits(e){if(e.historicMoment&&(this._historicMoment=e.historicMoment),!e.addedFeatures.length&&!e.updatedFeatures.length&&!e.deletedFeatures.length)return;for(const e of this._pendingTiles.values())e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map(({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t))},i=(0,te.UT)(async e=>{try{await this.store.processEdits(t,(e,t)=>this._queryFeaturesById(e,t),e),this._processPendingTiles()}catch(e){(0,n.QP)(e),f.A.getLogger(this).warn("Failed to apply edits",e)}});this.addHandles(i),await this._updatingHandles.addPromise(i.promise)}setHistoricMoment(e){e?.getTime()!==this._historicMoment?.getTime()&&(this._historicMoment=e,this.refresh())}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,ue.Wo)(this.url))return;const e=(0,te.UT)(async e=>{try{const t=await(0,_e.Jf)(this.url,new T.A({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=re.A.fromJSON(t?.extent)}catch(e){(0,n.QP)(e),f.A.getLogger(this).warn("Failed to fetch data extent",e)}});this._updatingHandles.consumePromise(e.promise.then(()=>this._process())),this.addHandles(e)}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map(e=>e.debugInfo),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const e of this._pendingTiles.values())e.alive=!1}_createPendingTiles(){if(this.suspended)return;const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:i}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=i,e.alive=!0):this._createPendingTile(t,i)}}_collectMissingTilesInfo(){let e=null;for(const t of this.tilesOfInterest){const i=this.store.process(t,(e,t)=>this._verifyTileComplexity(e,t),this.outFields);null==e?e=i:e.prepend(i)}return e}_deletePendingTiles(){for(const e of this._pendingTiles.values())e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,i)=>this._fetchFeatures(e,t,i),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const t of this._pendingTiles.values())this._verifyTileComplexity(this.store.getFeatureCount(t.key),t.resolution)&&this._updatingHandles.consumePromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<be}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const i=this.tileSize*t;return e*(we/(i*i))<Ce}_ensureFetchAllCounts(e){let t=!0;for(const i of this._pendingTiles.values())i.state.type<2&&this._updatingHandles.consumePromise(i.process(e)),i.state.type<=1&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.key,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const i=new ye(e,t);return this._pendingTiles.set(e.id,i),i}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.key.id)}async _fetchCount(e,t){return this.store.fetchCount(e.key,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:xe,signal:t})}async _fetchFeatures(e,t,i){let s=0;const r=[];let n=0,o=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,s,o),{features:u,exceededTransferLimit:h}=await this._queryFeatures(a,i);l&&(s+=a.num),n+=u.length;for(const e of u)r.push(e);if(o=t-n,!l||!h||o<=0)return r}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,i=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let s=null;const r=e?(0,se.AG)(e):e;if(this.store.featureStore.forEach(e=>{r===(0,se.AG)(e.attributes[t])&&(s=e.objectId??e.attributes[i])}),null==s)throw new Error(`Expected to find a feature with globalId ${e}`);return s}_queryFeaturesById(e,t){const i=this._createFeaturesQuery();return i.objectIds=e,this._queryFeatures(i,t)}async _queryFeatures(e,t){return 0===e.num?new le:this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:i}=this;return await(0,_e.IJ)(this.url,e,new de({sourceSpatialReference:i}),{query:this._configuration.customParameters,timeout:xe,signal:t})}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:i}=this;return function({exceededTransferLimit:e,features:t,fields:i,geometryType:s,hasM:r,hasZ:n,spatialReference:o,transform:a},l){const u=new le;u.exceededTransferLimit=e??!1;for(const e of t??[]){let t,i;s&&(t=e.geometry&&(0,p.ME)(e.geometry),i=e.centroid&&new oe.A([],[e.centroid.x,e.centroid.y]));const r=(0,ae.W)(e,l);u.features.push(new x(t,e.attributes,i,r))}return u.fields=i??u.fields,u.geometryType=s??null,u.hasM=r??!1,u.hasZ=n??!1,u.spatialReference=o??null,u.transform=a??null,u}(await(0,_e.eW)(this.url,e,i,{query:this._configuration.customParameters,timeout:xe,signal:t}),{type:"object-id",fieldName:this.objectIdField})}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e),i=null!=e?.key?this.store.getAttributesForTile(e?.key?.id):null,s=(0,ie.KC)((0,ie.iv)(this.outFields,i??new Set),this._mandatoryOutFields);return t.outFields=Array.from(s),t.returnGeometry=!0,this.capabilities.data.supportsTrueCurve&&(!this.capabilities.query.supportsFormatPBF||this.capabilities.query.supportsFormatPBFWithCurves)&&(t.returnTrueCurves=!0),null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new T.A({returnZ:this.hasZ,returnM:!1,historicMoment:this._historicMoment,geometry:null!=this.tileInfo&&null!=e?(0,ne.w1)(e.key.extent,this.tileInfo.spatialReference):void 0}),i=this._configuration.filter;return null!=i&&(t.where=i.where,t.gdbVersion=i.gdbVersion,t.timeExtent=i.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,i){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:s,supportsCacheHint:r,tileMaxRecordCount:n,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=s?T.A.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||r)&&n?n:o||ve);return e.start=t,s?(e.maxRecordCountFactor=Math.min(l,Math.ceil(i/u)),e.num=Math.min(i,e.maxRecordCountFactor*u)):e.num=Math.min(i,u),!0}};(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"url",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"currentVersion",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"objectIdField",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"globalIdField",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"capabilities",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"sourceSpatialReference",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"spatialReference",void 0),(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],ge.prototype,"store",void 0),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],ge.prototype,"_minimumVerticesPerFeature",null),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"_mandatoryOutFields",null),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"outFields",null),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"suspended",void 0),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"_historicMoment",void 0),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"filter",null),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"customParameters",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],ge.prototype,"_configuration",null),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"tileInfo",null),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"tileSize",null),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"tilesOfInterest",void 0),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],ge.prototype,"updating",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0})],ge.prototype,"availability",void 0),(0,s.Cg)([(0,a.MZ)()],ge.prototype,"hasZ",null),ge=(0,s.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],ge);const ve=2e3,xe=6e5,be=1e6,we=25,Ce=1;i(44208);class Se{constructor(){this._store=new Map,this._priorities=new Map}get size(){return this._store.size}setPriorityOrderByKey(e){this._priorities.clear();for(let t=e.length-1;t>=0;t--)this._priorities.set(e[t],e.length-t)}hasLowerPriority(e){const t=this._priorities.get(e);if(null==t)return!0;for(const[e]of this._store){const i=this._priorities.get(e);if(null==i||i<t)return!0}return!1}someFromLowestToHighestPriority(e){const{_priorities:t}=this;for(const[i,s]of this._store)if(!t.has(i)&&e(s,i))return!0;for(const[i]of t){const t=this._store.get(i);if(t&&e(t,i))return!0}return!1}set(e,t){this._store.set(e,t)}delete(e){return this._store.delete(e)}get(e){return this._store.get(e)}has(e){return this._store.has(e)}clear(){this._store.clear()}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}}let Ie=class extends ee.A{setPriorityOrderByKey(e){this._tiles.setPriorityOrderByKey(e)}get _memoryLimitExceeded(){return this.featureStore.usedMemory>=this.maximumByteSize}constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10485760,this._tileBounds=new _.F,this._tiles=new Se,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,ne.vt)()}add(e,t){for(const e of t)this._referenceFeature(e.objectId);const i=this.featureStore.upsertMany(t),s=i.map(e=>new Set(Object.keys(e.attributes))).reduce((e,t)=>(0,ie.E$)(e,t),new Set(Object.keys(i[0]?.attributes??[]))),r=this._memoryLimitExceeded;this._addTileStorage(e,new Set(i.map(e=>e.objectId)),s),r&&this._applyCacheMemoryLimits()}_applyCacheMemoryLimits(){if(!this._memoryLimitExceeded)return;const{_tiles:e,featureStore:t,maximumByteSize:i}=this;e.someFromLowestToHighestPriority(e=>!this._memoryLimitExceeded||t.usedMemory-this._estimateRemoveTileMemoryReduction(e)<i||(this._removeTileStorage(e),!1))}_estimateRemoveTileMemoryReduction(e){let t=0;for(const i of e.objectIds)if(1===this._refCounts.get(i)){const e=this.featureStore.getFeature(i);e&&(t+=this.featureStore.estimateFeatureUsedMemory?.(e)??0)}return t}_hasAttributesForTile(e,t){if(e){const i=this._tiles.get(e);if(i)return!i.objectIds.size||(0,ie.Yy)(t,i.attributeKeys)}return!1}getAttributesForTile(e){return e?this._tiles.get(e)?.attributeKeys:null}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,i){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,i)}_addTileStorage(e,t,i){const s=e.id;this._tiles.set(s,new Me(e,t,i)),this._tileBounds.set(s,e.extent),this._tileFeatureCounts.set(s,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const i of e.objectIds)1===this._unreferenceFeature(i)&&t.push(i);this.featureStore.removeManyById(t);const i=e.key.id;this._tiles.delete(i),this._tileBounds.delete(i)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const t of this._tiles.values()){for(const i of e)t.objectIds.delete(i);this._tileFeatureCounts.set(t.key.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,i){if(!e.length)return;const{features:s}=await t(e,i);for(const e of s){if(this._tmpBoundingRect.fill(0),null==e.geometry||0===e.geometry.vertexCount)continue;(0,ne.Ie)(this._tmpBoundingRect);const t=(0,p.NO)(e.geometry,this._tmpBoundingRect);this._tileBounds.forEachInBounds(t,t=>{const i=this._tiles.get(t);this.featureStore.add(e);const s=e.objectId;i.objectIds.has(s)||(i.objectIds.add(s),this._referenceFeature(s),this._tileFeatureCounts.set(i.key.id,i.objectIds.size))})}}process(e,t=()=>!0,i){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,ne.HY)((0,ne.VY)(this.extent,this._tmpBoundingRect),e.extent))return new Te(e);if(this._memoryLimitExceeded&&!this._tiles.hasLowerPriority(e.id??""))return new Te(e);if(this._hasAttributesForTile(e.id,i))return new Te(e);const s=this._createTileTree(e,this.tileInfo);return this._simplify(s,t,null,0,1),this._collectMissingTiles(e,s,this.tileInfo,i)}get debugInfo(){return Array.from(this._tiles.values()).map(({key:e})=>({key:e.toJSON(),featureCount:this._tileFeatureCounts.get(e.id)||0}))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,i,s){let r=this._tileFeatureCounts.get(e.id);return null!=r||(r=await(0,_e.gW)(t,i,s),this._tileFeatureCounts.set(e.id,r)),r}_createTileTree(e,t){const i=new Fe(e.level,e.row,e.col);return t.updateTileInfo(i,1),this._tileBounds.forEachInBounds(e.extent,s=>{const r=this._tiles.get(s)?.key;r&&function(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const i=e.level<t.level,s=i?e:t,r=i?t:e,n=1<<r.level-s.level;return Math.floor(r.row/n)===s.row&&Math.floor(r.col/n)===s.col}(e,r)&&this._populateChildren(i,r,t,this._tileFeatureCounts.get(r.id)||0)}),i}_populateChildren(e,t,i,s){const r=t.level-e.level-1;if(r<0)return void(e.isLeaf=!0);const n=t.row>>r,o=t.col>>r,a=e.row<<1,l=o-(e.col<<1)+(n-a<<1),u=e.children[l];if(null!=u)this._populateChildren(u,t,i,s);else{const r=new Fe(e.level+1,n,o);i.updateTileInfo(r,1),e.children[l]=r,this._populateChildren(r,t,i,s)}}_simplify(e,t,i,s,r){const n=r*r;if(e.isLeaf)return t(this.getFeatureCount(e),r)?0:(this._remove(e),null!=i&&(i.children[s]=null),n);const o=r/2,a=o*o;let l=0;for(let i=0;i<e.children.length;i++){const s=e.children[i];l+=null!=s?this._simplify(s,t,e,i,o):a}return 0===l?this._mergeChildren(e):1-l/n<ze&&(this._purge(e),null!=i&&(i.children[s]=null),l=n),l}_mergeChildren(e){const t=new Set;let i;this._forEachLeaf(e,e=>{const s=this._tiles.get(e.id);if(s){i=i?(0,ie.E$)(i,s.attributeKeys):new Set(s.attributeKeys);for(const e of s.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}}),this._addTileStorage(e,t,i??new Set),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const i of e.children)null!=i&&(i.isLeaf?t(i):this._forEachLeaf(i,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const i=e.children[t];this._purge(i),e.children[t]=null}}_collectMissingTiles(e,t,i,s){const r=new Ae(i,e,this.extent);return this._collectMissingTilesRecurse(t,r,1,s),r.info}_collectMissingTilesRecurse(e,t,i,s){const r=this._tiles.has(e.id)&&!this._hasAttributesForTile(e.id,s);if(r&&t.addMissing(e.level,e.row,e.col,i),e.isLeaf)return;if(!e.hasChildren)return void(r||t.addMissing(e.level,e.row,e.col,i));const n=i/2;for(let i=0;i<e.children.length;i++){const r=e.children[i];null==r?t.addMissing(e.level+1,(e.row<<1)+((2&i)>>1),(e.col<<1)+(1&i),n):this._collectMissingTilesRecurse(r,t,n,s)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?0:2}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),1):(t>0&&this._refCounts.set(e,t),2)}get test(){}};(0,s.Cg)([(0,a.MZ)({constructOnly:!0})],Ie.prototype,"featureStore",void 0),(0,s.Cg)([(0,a.MZ)()],Ie.prototype,"tileInfo",void 0),(0,s.Cg)([(0,a.MZ)()],Ie.prototype,"extent",void 0),(0,s.Cg)([(0,a.MZ)()],Ie.prototype,"maximumByteSize",void 0),Ie=(0,s.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],Ie);class Me{constructor(e,t,i){this.key=e,this.objectIds=t,this.attributeKeys=i}}class Fe extends F.U{constructor(){super(...arguments),this.isLeaf=!1,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class Te{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,ne.Wc)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class Ae{constructor(e,t,i){this._tileInfo=e,this._extent=null,this.info=new Te(t),null!=i&&(this._extent=(0,ne.VY)(i))}addMissing(e,t,i,s){const r=new F.U(e,t,i);this._tileInfo.updateTileInfo(r,1)&&(null==this._extent||(0,ne.HY)(this._extent,r.extent))&&(this.info.missingTiles.push({data:r,resolution:s}),this.info.coveredArea-=(0,ne.Wc)(r.extent))}}const ze=.18751;let Be=class extends r.nJ{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=Promise.withResolvers(),this._elevationAligner=R(),this._elevationFilter=G(),this._symbologyCandidatesFetcher=D(),this._updatingHandles=new l.U,this._alignPointsInFeatures=async(e,t)=>{const i={query:e},s=await this.remoteClient.invoke("alignElevation",i,{signal:t});return(0,n.Te)(t),s},this._getSymbologyCandidates=async(e,t)=>{const i={candidates:e,spatialReference:this._spatialReference.toJSON()},s=await this.remoteClient.invoke("getSymbologyCandidates",i,{signal:t});return(0,n.Te)(t),s}}get updating(){return this._isInitializing||this._updatingHandles.updating||this._featureFetcher.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:i,timeInfo:s,fieldsIndex:r}=e.serviceInfo,{hasZ:n}=e,a=u.A.fromJSON(e.spatialReference);this._spatialReference=a,this._featureStore=new S(t,n,!1),this._featureStore.estimateFeatureUsedMemory=e=>e.usedMemory,this._queryEngine=new I.do({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fieldsIndex:r,hasZ:n,hasM:!1,featureIdInfo:{type:"object-id",fieldName:i},timeInfo:s}),this._featureFetcher=new ge({store:new Ie({featureStore:this._featureStore}),url:e.serviceInfo.url,currentVersion:e.serviceInfo.currentVersion,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:a,sourceSpatialReference:u.A.fromJSON(e.serviceInfo.spatialReference),customParameters:e.configuration.customParameters});const l="3d"===e.configuration.viewType;return this._elevationAligner=R(l,{elevationInfo:null!=e.elevationInfo?A.A.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures}),this._elevationFilter=G(l),this.addHandles([(0,o.wB)(()=>this._featureFetcher.availability,e=>this.emit("notify-availability",{availability:e}),o.OH),(0,o.wB)(()=>this.updating,()=>this._notifyUpdating())]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),Oe}async setSuspended(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.suspended=e,Oe}async updateOutFields(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.outFields=new Set(e??[]),Oe}async fetchCandidates(e,t){await this._whenSetup.promise,(0,n.Te)(t);const i=function(e,t){const i=!!t||void 0;if(!e.filter)return{...e,query:{where:"1=1",returnZ:i}};const{distance:s,units:r,spatialRel:n,where:o,timeExtent:a,objectIds:l}=e.filter,u={geometry:e.filter.geometry?(0,h.rS)(e.filter.geometry):void 0,distance:s,units:r,spatialRel:n,timeExtent:a,objectIds:l,returnZ:i,where:o??"1=1"};return{...e,query:u}}(e,this._featureStore.hasZ),s=t?.signal,r=await this._queryEngine.executeQueryForSnapping(i,s);(0,n.Te)(s);const o=await this._elevationAligner.alignCandidates(r.candidates,u.A.fromJSON(e.point.spatialReference)??u.A.WGS84,s);(0,n.Te)(s);const a=await this._symbologyCandidatesFetcher.fetch(o,s);(0,n.Te)(s);const l=0===a.length?o:o.concat(a);return{result:{candidates:this._elevationFilter.filter(i,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles.map(e=>F.U.fromJSON(e)),this._featureFetcher.tileInfo=null!=e.tileInfo?M.A.fromJSON(e.tileInfo):null,Oe}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),this._featureFetcher.refresh(),Oe}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),await(0,o.C_)(()=>!this.updating,t),(0,n.Te)(t),Oe}async getDebugInfo(e,t){return(0,n.Te)(t),{result:this._featureFetcher.debugInfo}}async handleEdits(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,n.Te)(t),await this._updatingHandles.addPromise(this._featureFetcher.handleEdits(e)),(0,n.Te)(t),Oe}async setHistoricMoment(e,t){return this._featureFetcher.setHistoricMoment(e.moment),Oe}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),Oe}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),Oe}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=D(e,this._getSymbologyCandidates),Oe}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?T.A.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,s.Cg)([(0,a.MZ)({readOnly:!0})],Be.prototype,"updating",null),(0,s.Cg)([(0,a.MZ)()],Be.prototype,"_isInitializing",void 0),Be=(0,s.Cg)([(0,a.$K)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],Be);const Pe=Be,Oe={result:{}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2114],{52106(e,t,r){r.d(t,{A:()=>w});var s,i,n=r(5482),o=r(37838),a=r(69540),l=r(51447),u=r(25482),p=r(53966),c=r(36708),d=r(24326),h=r(91429),m=r(12195),y=r(65864),g=r(50498),f=r(55156),b=r(60950),_=r(54339),v=r(94128),T=r(33910);function x(e){if(null==e)return null;const t={};for(const r in e){const s=e[r];s&&(t[r]=s.toJSON())}return 0!==Object.keys(t).length?t:null}let w=class extends((0,a.OU)(u.o)){static{s=v.Z}static{i=this}constructor(e){super(e),this[s]=!0,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,d.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(p.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=(0,b.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;const r=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const t of[r,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=(0,f.I)(this.origin);if(e)return(0,_.r)(this,e);const t=this.sourceLayer??this.layer;return t?(0,_.r)(this,t):null}getGlobalId(){const e=(0,f.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);const t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){return{aggregateGeometries:x(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,m.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,s){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const i={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(i.action=s),"attributes"===e&&(i.attributeName=s),this.layer.graphicChanged(i)}_watchMeshGeometryChanges(){this.addHandles([(0,c.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,c.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,n.Cg)([(0,h.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const s=(0,y.rS)(e[r]);s&&(t[r]=s)}return 0!==Object.keys(t).length?t:null}}})],w.prototype,"aggregateGeometries",null),(0,n.Cg)([(0,h.MZ)({value:null})],w.prototype,"attributes",null),(0,n.Cg)([(0,h.MZ)({value:null,types:g.yR,json:{read:y.rS}})],w.prototype,"geometry",null),(0,n.Cg)([(0,h.MZ)({type:Boolean})],w.prototype,"isAggregate",void 0),(0,n.Cg)([(0,h.MZ)({clonable:!1})],w.prototype,"layer",void 0),(0,n.Cg)([(0,h.MZ)({clonable:"reference"})],w.prototype,"origin",void 0),(0,n.Cg)([(0,h.MZ)({type:o.A,value:null})],w.prototype,"popupTemplate",null),(0,n.Cg)([(0,h.MZ)({clonable:"reference"})],w.prototype,"sourceLayer",void 0),(0,n.Cg)([(0,h.MZ)({value:null,types:T.Es})],w.prototype,"symbol",null),(0,n.Cg)([(0,h.MZ)({clonable:!1,json:{read:!1,write:!1}})],w.prototype,"_version",void 0),(0,n.Cg)([(0,h.MZ)({type:Boolean,value:!0})],w.prototype,"visible",null),w=i=(0,n.Cg)([(0,h.$K)("esri.Graphic")],w)},46140(e,t,r){r.d(t,{A:()=>i});var s=r(49186);class i{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new s.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new i(this.major,this.minor,this._context)}static parse(e,t=""){const[r,n]=e.split("."),o=/^\s*\d+\s*$/;if(!r?.match||!o.test(r))throw new s.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!n?.match||!o.test(n))throw new s.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const a=parseInt(r,10),l=parseInt(n,10);return new i(a,l,t)}}},6797(e,t,r){r.d(t,{Ui:()=>d});var s=r(69622),i=r(7762),n=r(88620);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof s.A}function l(e){return e instanceof i.A?Object.keys(e.items):a(e)?(0,n.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof i.A?e.items[t]:e[t]}function p(e){return e?e.declaredClass:null}function c(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const s=l(e),i=l(t);if(0===s.length&&0===i.length)return;if(!s.length||!i.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const n=i.filter(e=>!s.includes(e)),d=s.filter(e=>!i.includes(e)),h=s.filter(r=>i.includes(r)&&u(e,r)!==u(t,r)).concat(n,d).sort(),m=p(e);if(m&&o.has(m)&&h.length)return{type:"complete",oldValue:e,newValue:t};let y;const g=a(e)&&a(t);for(const s of h){const i=u(e,s),n=u(t,s);let o;if((g||"function"!=typeof i&&"function"!=typeof n)&&i!==n&&(null!=i||null!=n)){if(r&&r[s]&&"function"==typeof r[s])o=r[s]?.(i,n);else if(i instanceof Date&&n instanceof Date){if(i.getTime()===n.getTime())continue;o={type:"complete",oldValue:i,newValue:n}}else o="object"==typeof i&&"object"==typeof n&&p(i)===p(n)?c(i,n):{type:"complete",oldValue:i,newValue:n};null!=o&&(null!=y?y.diff[s]=o:y={type:"partial",diff:{[s]:o}})}}return y}function d(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&p(e)!==p(t)?{type:"complete",oldValue:e,newValue:t}:c(e,t)}},13069(e,t,r){r.d(t,{AG:()=>a,lk:()=>i,vD:()=>o,yS:()=>n});const s="randomUUID"in crypto;function i(){if(s)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${i().toUpperCase()}}`}function o(){return`{${i()}}`}function a(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},55156(e,t,r){r.d(t,{I:()=>i,e:()=>s});const s=Symbol("idFieldsProviderSymbol");function i(e){return(t=e)&&s in t?e[s]:void 0;var t}},52136(e,t,r){r.d(t,{p:()=>n});var s=r(5482),i=r(91429);const n=e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,s.Cg)([(0,i.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,s.Cg)([(0,i.$K)("esri.layers.mixins.APIKeyMixin")],r),r}},4071(e,t,r){r.d(t,{$:()=>s,P:()=>i});const s={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1,supportedStatistics:void 0,supportedNormalizationTypes:void 0},i={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsOrderByFields:!1,supportsResize:!1,supportsTypeWildcard:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,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,supportsQueryPivot:!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:s,query:{maxRecordCount:0,maxRecordCountFactor:0,maxUniqueIDCount:0,relativeTimeBinWindow:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCompactGeometry:!1,supportsCurrentUser:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPaginationOnAggregatedQueries:!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}}},32730(e,t,r){r.d(t,{BI:()=>h,D3:()=>c,XJ:()=>d,lc:()=>p,mX:()=>y,rU:()=>m,tH:()=>v});var s=r(799);const i="__begin__",n="__end__",o=new RegExp(i,"ig"),a=new RegExp(n,"ig"),l=new RegExp("^"+i,"i"),u=new RegExp(n+"$","i");function p(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function c(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function d(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=p(e.labelExpression),t.type="conventional"),t}function h(e){const t=d(e);if(!t)return null;switch(t.type){case"conventional":return y(t.expression);case"arcade":return t.expression}return null}function m(e){const t=d(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(g);return t?.[1].trim()||null}(t.expression);case"arcade":return v(t.expression)}return null}function y(e){let t;return e?(t=(0,s.HC)(e,e=>i+'$feature["'+e+'"]'+n),t=l.test(t)?t.replace(l,""):'"'+t,t=u.test(t)?t.replace(u,""):t+'"',t=t.replaceAll(o,'" + ').replaceAll(a,' + "')):t='""',t}const g=/^\s*\{([^}]+)\}\s*$/i,f=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,b=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,_=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function v(e){if(!e)return null;let t=f.exec(e)||b.exec(e);return t?t[1]||t[3]:(t=_.exec(e),t?t[2]:null)}},73681(e,t,r){r.d(t,{n:()=>l});var s=r(49186),i=r(53966),n=r(46140),o=r(95466),a=r(55674);class l{static async from(e,t,r){const o=e.dictionary_version?n.A.parse(e.dictionary_version):null,p=new Set(e.itemsNames),c={};if(t)for(const e in t)c[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)c.hasOwnProperty(t.name)||(c[t.name]=t.value);const d=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))d.delete(e);d.size&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:d});const h=await(0,a.xR)(e.expression,null,c);if(!h)throw new s.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const m=!o||!o.greaterEqual(4,0);m&&i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const y=new u(r,m);return new l(m,p,h,y)}constructor(e,t,r,s){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=s}get itemNames(){return this._itemNames}evaluate(e,t,r,s){try{return this._reader.bind(e,r,s),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){i.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new o.A(t)}}class u extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},61760(e,t,r){r.d(t,{PU:()=>o,YW:()=>l,ex:()=>i,hv:()=>a,zp:()=>n}),r(34727);var s=r(90629);r(78955),r(91829);const i=2.4;function n(e){return(0,s.PN)(e*i)}function o(e){return(0,s.Lz)(e)/i}function a(e,t,r){const s=Math.sqrt(e**2+t**2)/r;return s>1?0:3/(Math.PI*r**2)*(1-s**2)**2}function l(e){return"function"==typeof e?e:e?t=>+t[e]:()=>1}},41366(e,t,r){r.d(t,{K:()=>c,Q:()=>l});var s=r(5482),i=r(66552),n=r(53966),o=r(91429),a=r(93223);const l=(0,i.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",p="field",c=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&p||r&&u||null,t&&r&&n.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==p&&e!==u||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,s.Cg)([(0,o.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,s.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,s.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,s.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,s.Cg)([(0,a.e)(l,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,s.Cg)([(0,o.$K)("esri.rest.support.NormalizationBinParametersMixin")],r),r}},55674(e,t,r){r.d(t,{Ad:()=>h,Gj:()=>g,QY:()=>d,lL:()=>f,xR:()=>m});var s=r(66131),i=r(49186),n=(r(44208),r(44729)),o=r(15032),a=r(65864),l=r(95466),u=r(43668),p=r(98623);const c=["geometry","scale","timeProperties"];function d(e,t){if(null!=t)for(const r of c)t.hasArcadeDependency(r)&&e.add(r);return e}function h(e,t){return y.create(e,t,null,["$feature","$view"])}function m(e,t,r){return y.create(e,t,r,["$feature","$view","$config"])}class y{static async create(e,t,r,s){const{arcade:n,Dictionary:o}=await(0,u.l)();let a;try{a=n.parseScript(e)}catch(t){throw new i.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=n.scriptUsesGeometryEngine(a);l&&await n.enableGeometrySupport(),await n.loadDependentModules(new Set,a,null,!1,l);const p={vars:s.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},c=n.compileScript(a,p);let d=null;null!=r&&(d=new o(r),d.immutable=!0);const h=new o;return h.immutable=!1,h.setField("scale",0),new y(e,n,a,c,t,h,d,o)}constructor(e,t,r,s,i,n,o,a){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=s,this._spatialReference=i,this._viewDict=n,this._configDict=o,this._dictionaryCtor=a,this._dependencies=new Map,this._featureReader=new g,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:i,currentEnd:n}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=i?null!=r?s.lY.epochToArcadeDate(i,r):s.lY.unknownEpochToArcadeDate(i):void 0,currentEnd:null!=n?null!=r?s.lY.epochToArcadeDate(n,r):s.lY.unknownEpochToArcadeDate(n):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class g{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const s=t??new l.A(f(e.attributes));this._boundTarget=e,this._boundSchema.fields=s.fields,this._boundSchema.fieldsIndex=s,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,a.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}_hasGeometry(){return null!=this._boundTarget.geometry}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===p.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return n.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return o.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return s.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?s.lY.unknownEpochToArcadeDate(t):s.lY.epochToArcadeDate(t,this.contextTimeZone??p.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}isEmpty(){return this._boundSchema.fields.length<=0&&!this._hasGeometry()}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function f(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5977],{67482(e,t,r){function n(e){return null!=l(e)||null!=s(e)}function i(e){return a.test(e)}function o(e){return l(e)??s(e)}function s(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let r=!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=!u.test(e[n]),n++;r=!t}}return r}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function l(e){const t=a.exec(e);if(!t?.groups)return null;const r=t.groups,n=+r.year,i=+r.month-1,o=+r.day,s=+(r.hours??"0"),l=+(r.minutes??"0"),u=+(r.seconds??"0");if(s>23)return null;if(l>59)return null;if(u>59)return null;const p=r.ms??"0",c=p?+p.padEnd(3,"0").slice(0,3):0;let d;if(r.isUTC||!r.offsetSign)d=Date.UTC(n,i,o,s,l,u,c);else{const e=+r.offsetHours,t=+r.offsetMinutes;d=6e4*("+"===r.offsetSign?-1:1)*(60*e+t)+Date.UTC(n,i,o,s,l,u,c)}return Number.isNaN(d)?null:d}r.d(t,{Br:()=>i,Cq:()=>n,_U:()=>o});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})))?$/,u=/^((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())},159(e,t,r){r.d(t,{A:()=>u});var n,i=r(5482),o=r(69540),s=r(25482),l=r(91429),a=r(99157);let u=n=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.steps=[]}getInverse(){const e=new n;for(let t=this.steps.length-1;t>=0;t--){const r=this.steps[t];e.steps.push(r.getInverse())}return e}};(0,i.Cg)([(0,l.MZ)({type:[a.A],nonNullable:!0,json:{name:"geoTransforms"}})],u.prototype,"steps",void 0),u=n=(0,i.Cg)([(0,l.$K)("esri.geometry.operators.support.GeographicTransformation")],u)},99157(e,t,r){r.d(t,{A:()=>a});var n,i=r(5482),o=r(69540),s=r(25482),l=r(91429);let a=n=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new n({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,i.Cg)([(0,l.MZ)({json:{name:"transformForward",read:e=>!e,write:(e,t,r)=>{t[r]=!e}}})],a.prototype,"isInverse",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],a.prototype,"wkt",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],a.prototype,"wkid",void 0),a=n=(0,i.Cg)([(0,l.$K)("esri.geometry.operators.support.GeographicTransformationStep")],a)},9762(e,t,r){r.r(t),r.d(t,{projectBuffer:()=>i});var n=r(49208);function i(e,t,r,i,o,s,l=Math.floor(e.length/3)){const a=(0,n.jd)(t,o);if(null==a)return!1;if(a===n.pO){if(e===i&&r===s)return!0;const t=r+3*l;for(let n=r,o=s;n<t;n++,o++)i[o]=e[n]??0;return!0}const u=r+3*l;for(let t=r,n=s;t<u;t+=3,n+=3)a(e,t,i,n);return!0}},49208(e,t,r){r.d(t,{Tp:()=>c,jd:()=>p,pO:()=>f,w5:()=>u});var n=r(34727),i=r(86211),o=r(73941),s=r(79258),l=r(34403),a=r(21325);const u={2:{5:f,7:null,9:null,10:f,1:I,6:null,8:null,0:null,3:g,11:m,2:f,4:b},5:{5:f,7:null,9:null,10:f,1:I,6:null,8:null,0:null,3:g,11:m,2:f,4:b},7:{5:null,7:f,9:null,10:f,1:null,6:C,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:f,10:f,1:null,6:null,8:v,0:null,3:null,11:null,2:null,4:null},3:{5:y,7:null,9:null,10:y,1:function(e,t,r,n){const i=e[t]/R,o=j-2*Math.atan(Math.exp(-e[t+1]/R)),s=R+(e[t+2]??0),l=Math.cos(o)*s;r[n]=Math.cos(i)*l,r[n+1]=Math.sin(i)*l,r[n+2]=Math.sin(o)*s},6:null,8:null,0:null,3:f,11:function(e,t,r,n){y(e,t,r,n),m(r,n,r,n)},2:y,4:function(e,t,r,n){y(e,t,r,n),b(r,n,r,n)}},4:{5:x,7:null,9:null,10:x,1:function(e,t,r,n){x(e,t,r,n),I(r,n,r,n)},6:null,8:null,0:null,3:function(e,t,r,n){x(e,t,r,n),g(r,n,r,n)},11:function(e,t,r,n){x(e,t,r,n),m(r,n,r,n)},2:x,4:f},1:{5:S,7:null,9:null,10:S,1:f,6:null,8:null,0:null,3:function(e,t,r,n){S(e,t,r,n),g(r,n,r,n)},11:function(e,t,r,n){S(e,t,r,n),m(r,n,r,n)},2:S,4:function(e,t,r,n){S(e,t,r,n),b(r,n,r,n)}},6:{5:null,7:A,9:null,10:A,1:null,6:f,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:T,10:T,1:null,6:null,8:f,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:f,3:null,11:null,2:null,4:null},10:{5:f,7:f,9:f,10:f,1:I,6:C,8:v,0:null,3:g,11:m,2:f,4:b},11:{5:h,7:null,9:null,10:h,1:function(e,t,r,n){h(e,t,r,n),I(r,n,r,n)},6:null,8:null,0:null,3:function(e,t,r,n){h(e,t,r,n),g(r,n,r,n)},11:f,2:h,4:function(e,t,r,n){h(e,t,r,n),b(r,n,r,n)}}};function p(e,t){return c(e,t)?.projector}function c(e,t){if(null==e||null==t)return null;if(F.source.spatialReference===e&&F.dest.spatialReference===t)return F;const r=d(e,F.source),n=d(t,F.dest);return 0===r&&0===n?(0,a.aI)(e,t)?F.projector=f:F.projector=null:F.projector=u[r][n],F}function d(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,i.GA)(e,1)),(0,o.jA)(e)?t.spatialReferenceId=1:(0,a.oT)(e)?t.spatialReferenceId=2:(0,a.K8)(e)?t.spatialReferenceId=3:(0,a.r1)(e)?t.spatialReferenceId=11:e.wkt===o.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===o.FY.wkt?t.spatialReferenceId=6:e.wkt===o.LJ.wkt?t.spatialReferenceId=8:(0,o.q8)(e)?t.spatialReferenceId=7:(0,o.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function f(e,t,r,n){e!==r&&(r[n++]=e[t++],r[n++]=e[t++],r[n]=e[t]??0)}function y(e,t,r,n){r[n]=O*(e[t]/R),r[n+1]=O*(j-2*Math.atan(Math.exp(-e[t+1]/R))),r[n+2]=e[t+2]??0}function g(e,t,r,i){!function(e,t,r,i,o){const s=.4999999*Math.PI,l=(0,n.qE)(P*e[t+1],-s,s),a=Math.sin(l);r[i++]=P*e[t]*o.radius,r[i++]=o.halfSemiMajorAxis*Math.log((1+a)/(1-a)),r[i]=e[t+2]??0}(e,t,r,i,s.$O)}function m(e,t,r,n){r[n]=e[t]*Z,r[n+1]=e[t+1]*Z,r[n+2]=e[t+2]??0}function h(e,t,r,n){r[n]=e[t]*E,r[n+1]=e[t+1]*E,r[n+2]=e[t+2]??0}function w(e,t,r,n,i){const o=i+(e[t+2]??0),s=P*e[t],l=P*e[t+1],a=Math.cos(l)*o;r[n]=Math.cos(s)*a,r[n+1]=Math.sin(s)*a,r[n+2]=Math.sin(l)*o}function v(e,t,r,n){w(e,t,r,n,s.Sw.radius)}function C(e,t,r,n){w(e,t,r,n,s.sH.radius)}function I(e,t,r,n){w(e,t,r,n,s.$O.radius)}function M(e,t,r,i,o){const s=e[t],l=e[t+1],a=e[t+2]??0,u=Math.sqrt(s*s+l*l+a*a),p=(0,n.YN)(a/(0===u?1:u)),c=Math.atan2(l,s);r[i++]=O*c,r[i++]=O*p,r[i]=u-o}function T(e,t,r,n){M(e,t,r,n,s.Sw.radius)}function A(e,t,r,n){M(e,t,r,n,s.sH.radius)}function S(e,t,r,n){M(e,t,r,n,s.$O.radius)}function b(e,t,r,n){!function(e,t,r,n,i){const o=P*e[t],s=P*e[t+1],l=e[t+2]??0,a=Math.sin(s),u=Math.cos(s),p=i.radius/Math.sqrt(1-i.eccentricitySquared*a*a);r[n++]=(p+l)*u*Math.cos(o),r[n++]=(p+l)*u*Math.sin(o),r[n++]=(p*(1-i.eccentricitySquared)+l)*a}(e,t,r,n,s.$O)}function x(e,t,r,n){const i=l.TP,o=e[t],a=e[t+1],u=e[t+2]??0;let p,c,d,f,y,g,m,h,w,v,C,I,M,T,A,S,b,x,F,P,j;p=Math.abs(u),c=o*o+a*a,d=Math.sqrt(c),f=c+u*u,y=Math.sqrt(f),P=Math.atan2(a,o),g=u*u/f,m=c/f,T=i.a2/y,A=i.a3-i.a4/y,m>.3?(h=p/y*(1+m*(i.a1+T+g*A)/y),F=Math.asin(h),v=h*h,w=Math.sqrt(1-v)):(w=d/y*(1-g*(i.a5-T-m*A)/y),F=Math.acos(w),v=1-w*w,h=Math.sqrt(v)),C=1-s.$O.eccentricitySquared*v,I=s.$O.radius/Math.sqrt(C),M=i.a6*I,T=d-I*w,A=p-M*h,b=w*T+h*A,S=w*A-h*T,x=S/(M/C+b),F+=x,j=b+S*x/2,u<0&&(F=-F),r[n++]=O*P,r[n++]=O*F,r[n]=j}const F={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:f},P=(0,n.kU)(1),O=(0,n.KJ)(1),j=.5*Math.PI,R=s.$O.radius,Z=R*Math.PI/180,E=180/(R*Math.PI)},91218(e,t,r){r.r(t),r.d(t,{canProjectWithoutEngine:()=>K,initializeProjection:()=>Q,isEqualBaseGCS:()=>J,isLoaded:()=>R,isLoadedOrLoad:()=>Z,isLoadedOrLoadFor:()=>E,load:()=>N,project:()=>k,projectAsync:()=>z,projectExtent:()=>ie,projectMany:()=>G,projectMultipoint:()=>Y,projectOrLoad:()=>L,projectOrLoadMany:()=>U,projectPoint:()=>W,projectPolygon:()=>re,projectPolyline:()=>ee,projectWithoutEngine:()=>H,requiresLoad:()=>D,test:()=>q,tryProject:()=>B,unload:()=>$});var n=r(49186),i=r(17676),o=r(62788),s=r(95488),l=r(51850),a=r(21276),u=r(73941),p=r(5443),c=r(91075),d=r(48526),f=r(86738),y=r(39829),g=r(82799),m=r(16930),h=r(98764),w=r(159),v=r(9762),C=r(49208);function I(e,t,r,n,i,o){return M[0]=e,M[1]=t,M[2]=r,(0,v.projectBuffer)(M,n,0,i,o,0)}const M=(0,l.vt)();var T=r(60408),A=r(21325),S=r(52006);let b=null,x=null,F=null,P=null,O={};const j=new s.I;function R(){return!!(x?.isLoaded()&&F?.isLoaded()&&P?.isLoaded())}function Z(){return!!R()||((0,o.gc)(j),N(),!1)}function E(e,t){return!e||!t||K(e,t)||Z()}function D(e,t){return!K(e,t)&&!R()}async function N(e){null==b&&(b=Promise.all([r.e(3276).then(r.bind(r,83276)).then(e=>(x=e,x.load())),r.e(8377).then(r.bind(r,8377)).then(e=>(F=e,F.load())),r.e(2158).then(r.bind(r,12158)).then(e=>(P=e,P.load()))])),await b,(0,i.Te)(e),j.notify()}function k(e,t,r){return Array.isArray(e)?0===e.length?[]:((0,a.H)(e),G(e,e[0].spatialReference,t,r)):((0,a.f)(e),G([e],e.spatialReference,t,r)[0])}function G(e,t,r,n){if(null==t||null==r)return e;if(K(t,r,n))return e.map(e=>H(e,t,r));if(null==n?.geographicTransformation&&(0,u.jA)(t))return G(e.map(e=>H(e,t,m.A.WGS84)),m.A.WGS84,r,{zConversionDisabled:n?.zConversionDisabled});if(null==n?.geographicTransformation&&(0,u.jA)(r))return G(e,t,m.A.WGS84).map(e=>H(e,m.A.WGS84,r));if(!R())throw new _;if(!n?.geographicTransformation)if(n?.extendedParams)n={...n,geographicTransformation:P.getTransformation(t,r,n.areaOfInterestExtent)||new w.A};else if(!n?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,r);let i=O[e];i||(i=P.getTransformation(t,r)||new w.A,O[e]=i),n={geographicTransformation:i,zConversionDisabled:n?.zConversionDisabled}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof c.A?x.executeMany(e,r,n):F.executeMany(e,r,n)}function B(e,t,r){try{return k(e,t,r)}catch(e){return null}}function L(e,t){const r=U([e],t);return null!=r.pending?{pending:r.pending,geometry:null}:null!=r.geometries?{pending:null,geometry:r.geometries[0]}:{pending:null,geometry:null}}function U(e,t,r){if(!R())for(const r of e)if(null!=r&&!(0,A.aI)(r.spatialReference,t)&&(0,A.fn)(r.spatialReference)&&(0,A.fn)(t)&&!K(r.spatialReference,t))return(0,o.gc)(j),{pending:N(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,A.aI)(e.spatialReference,t)?e:(0,A.fn)(e.spatialReference)&&(0,A.fn)(t)?k(e,t,r):null)}}class _ extends n.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function $(){b=null,x=null,F=null,P=null,O={}}const q={get loadPromise(){return b}};async function z(e,t,r){if((0,i.Te)(r),!e)return e;const n=U(Array.isArray(e)?e:[e],t,r);if(n.pending)return await n.pending,(0,i.Te)(r),z(e,t,r);const o=n.geometries??[];return Array.isArray(e)?o:o[0]}function K(e,t,r){return!(r?.areaOfInterestExtent||r?.extendedParams||r?.geographicTransformation)&&(!!(0,A.aI)(e,t)||(0,A.fn)(e)&&(0,A.fn)(t)&&!!(0,C.jd)(e,t))}function J(e,t){if((0,A.aI)(e,t))return!0;if(!(0,A.fn)(e)||!(0,A.fn)(t))return!1;const r=(0,A.oT)(e)||(0,A.K8)(e)||(0,A.x1)(e),n=(0,A.oT)(t)||(0,A.K8)(t)||(0,A.x1)(t);return r&&n}async function Q(e,t,r,n){if(R())return(0,i.NO)(n);if(Array.isArray(e)){for(const{source:t,dest:r,options:i}of e)if(t&&r&&!K(t,r,i))return N(n)}else if(e&&t&&!K(e,t,r))return N(n);return(0,i.NO)(n)}function H(e,t,r){return e?(0,T.fT)(e)?V(e,t,new f.A,r,0):(0,T.ZC)(e)?oe(e,t,new p.A,r,0):(0,T.Bi)(e)?ne(e,t,new y.A,r,0):(0,T.Rg)(e)?te(e,t,new g.A,r,0):(0,T.U9)(e)?X(e,t,new d.A,r,0):null:null}function W(e,t,r=t.spatialReference,n=0){return null!=r&&null!=e.spatialReference&&null!=V(e,e.spatialReference,t,r,n)}function V(e,t,r,n,i){ue[0]=e.x,ue[1]=e.y;const o=e.z;return ue[2]=void 0!==o?o:i,(0,v.projectBuffer)(ue,t,0,ue,n,0)?(r.x=ue[0],r.y=ue[1],r.spatialReference=n,void 0!==o||(0,u.xP)(n)?(r.z=ue[2],r.hasZ=!0):(r.z=void 0,r.hasZ=!1),void 0===e.m?(r.m=void 0,r.hasM=!1):(r.m=e.m,r.hasM=!0),r):null}function Y(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=X(e,e.spatialReference,t,r,n)}function X(e,t,r,n,i){const{points:o,hasZ:s,hasM:l}=e,a=[],u=o.length,p=[];for(const e of o)p.push(e[0],e[1],s?e[2]:i);if(!(0,v.projectBuffer)(p,t,0,p,n,0,u))return null;const c=ae(s,n);for(let e=0;e<u;++e){const t=3*e,r=p[t],n=p[t+1];c&&l?a.push([r,n,p[t+2],o[e][3]]):c?a.push([r,n,p[t+2]]):l?a.push([r,n,o[e][2]]):a.push([r,n])}return r.points=a,r.spatialReference=n,r.hasZ=s,r.hasM=l,r}function ee(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=te(e,e.spatialReference,t,r,n)}function te(e,t,r,n,i){const{curvePaths:o,paths:s,hasZ:l,hasM:a}=e;if(!(o?le(o,l??!1,a??!1,t,r.curvePaths=[],n,i):se(s,l??!1,a??!1,t,r.paths,n,i)))return null;const u=ae(l,n);return r.spatialReference=n,r.hasZ=u,r.hasM=a,r}function re(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=ne(e,e.spatialReference,t,r,n)}function ne(e,t,r,n,i){const{curveRings:o,rings:s,hasZ:l,hasM:a}=e;return(o?le(o,l??!1,a??!1,t,r.curveRings=[],n,i):se(s,l??!1,a??!1,t,r.rings,n,i))?(r.spatialReference=n,r.hasZ=ae(l,n),r.hasM=a,r):null}function ie(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=oe(e,e.spatialReference,t,r,n)}function oe(e,t,r,n,i){const{xmin:o,ymin:s,xmax:l,ymax:a,hasZ:u,hasM:p}=e;if(!I(o,s,u?e.zmin:i,t,ue,n))return null;const c=ae(u,n);return r.xmin=ue[0],r.ymin=ue[1],c&&(r.zmin=ue[2]),I(l,a,u?e.zmax:i,t,ue,n)?(r.xmax=ue[0],r.ymax=ue[1],c&&(r.zmax=ue[2]),p&&(r.mmin=e.mmin,r.mmax=e.mmax),r.spatialReference=n,r):null}function se(e,t,r,n,i,o,s=0){const l=new Array;for(const r of e)for(const e of r)l.push(e[0],e[1],t?e[2]:s);if(!(0,v.projectBuffer)(l,n,0,l,o,0))return!1;let a=0;i.length=0;const u=t?3:2,p=ae(t,o);for(const t of e){const e=new Array;for(const n of t){const t=l.slice(a,a+=3);p||t.pop(),r&&t.push(n[u]),e.push(t)}i.push(e)}return!0}function le(e,t,r,n,i,o,s=0){const l=new Array;for(const r of e)for(const e of r){if((0,S.FG)(e))return!1;if((0,S.aO)(e)){const[r,n]=e.c;l.push(r[0],r[1],t?r[2]:s,n[0],n[1],s);continue}if((0,S.n1)(e)){const[r,n,i]=e.b;l.push(r[0],r[1],t?r[2]:s,n[0],n[1],s,i[0],i[1],s);continue}const r=e;l.push(r[0],r[1],t?r[2]:s)}if(!(0,v.projectBuffer)(l,n,0,l,o,0))return!1;let a=0;i.length=0;const u=t?3:2,p=ae(t,o);for(const t of e){const e=new Array;for(const n of t){const t=l.slice(a,a+=3);if(p||t.pop(),r&&t.push((0,S.yP)(n)[u]),(0,S.FG)(n))return!1;if((0,S.aO)(n)){const r=l[a++],n=l[a++];++a,e.push({c:[t,[r,n]]});continue}if((0,S.n1)(n)){const r=l[a++],n=l[a++];++a;const i=l[a++],o=l[a++];++a,e.push({b:[t,[r,n],[i,o]]});continue}e.push(t)}i.push(e)}return!0}function ae(e,t){return e||(0,u.xP)(t)||(0,A.aI)(t,h.Y0)}const ue=(0,l.vt)()},98764(e,t,r){r.d(t,{GD:()=>s,Y0:()=>u,lO:()=>p});var n=r(73941),i=r(16930),o=r(21325);const s=new i.A(n.fv),l=new i.A(n.FY),a=new i.A(n.LJ),u=new i.A(n.Ro);function p(e){const t=c.get(e);if(t)return t;let r=s;if(e)if(e===l)r=l;else if(e===a)r=a;else{const t=e.wkid,n=e.latestWkid;if(null!=t||null!=n)(0,o.tl)(t)||(0,o.tl)(n)?r=l:((0,o.ZL)(t)||(0,o.ZL)(n))&&(r=a);else{const t=e.wkt2??e.wkt;if(t){const e=t.toUpperCase();e===d?r=l:e===f&&(r=a)}}}return c.set(e,r),r}const c=new Map,d=l.wkt.toUpperCase(),f=a.wkt.toUpperCase()},34403(e,t,r){r.d(t,{TP:()=>s});var n=r(79258);Math.PI;const i=n.$O.radius,o=n.$O.eccentricitySquared,s={a1:i*o,a2:i*o*i*o,a3:i*o*o/2,a4:i*o*i*o*2.5,a5:i*o+i*o*o/2,a6:1-o};n.$O.radius,n.$O.flattening,n.Sw.radius,n.Sw.flattening,n.sH.radius,n.sH.flattening,n.sH.radius},83960(e,t,r){r.d(t,{X_:()=>o,oW:()=>l,zx:()=>s});var n=r(34727),i=r(86211);function o(e,t){const r=t||e.extent,n=e.width,o=(0,i.GA)(r?.spatialReference);return r&&n?r.width/n*o*i.dy*96:0}function s(e,t,r){return function(e,t){return 0===t||(0,n.Sp)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,n.Sp)(e,t)||e>t}(e,r)}function l(e,t){return(0,n.Sp)(e,t)?0:(e||Number.POSITIVE_INFINITY)>(t||Number.POSITIVE_INFINITY)?1:-1}},65977(e,t,r){r.r(t),r.d(t,{default:()=>W});var n=r(5482),i=r(37838),o=r(49186),s=r(25728),l=r(91429),a=r(5443),u=r(16930),p=r(50498),c=r(55156),d=r(60950),f=r(89808),y=r(99959);const g=Symbol("isOGCFeatureGraphicOrigin");var m;class h extends y.A{get[(m=g,d.ym)](){return this.layer}get[c.e](){return this.layer}get[f.Q](){return this.layer}constructor(e){super(),this[m]=!0,this.type="ogc-feature",this.layer=e}get id(){return this.layer.id}}var w=r(4146),v=r(92474),C=r(799),I=r(75321),M=r(4071),T=r(22671);let A=class extends v.x_{constructor(){super(...arguments),this.featureDefinition=null,this.type="ogc-feature"}load(e){return this.addResolvingPromise(this._loadOGCServices(this.layer,e)),this.when()}getSource(){const{featureDefinition:{collection:e,layerDefinition:t,spatialReference:r,supportedCrs:n},layer:{apiKey:i,customParameters:o,effectiveMaxRecordCount:s}}=this;return{type:"ogc-source",collection:e,layerDefinition:t,maxRecordCount:s,queryParameters:{apiKey:i,customParameters:o},spatialReference:r,supportedCrs:n}}queryExtent(e,t={}){return null}queryFeatureCount(e,t={}){return null}queryFeatures(e,t={}){return this.queryFeaturesJSON(e,t).then(e=>T.A.fromJSON(e))}queryFeaturesJSON(e,t={}){const r=this.getSource();return this.load(t).then(()=>(0,I.bW)(r,e,t))}queryObjectIds(e,t={}){return null}serviceSupportsSpatialReference(e){const{isWebMercator:t,isWGS84:r,latestWkid:n,wkid:i}=e,{supportedCrs:o}=this.featureDefinition;return r||t||!!i&&!!o[i]||!!n&&!!o[n]}_conformsToType(e,t){const r=new RegExp(`^${(0,C.Cj)(t)}$`,"i");return e.conformsTo.some(e=>r.test(e))??!1}_getCapabilities(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:t,maxRecordCountFactor:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!1,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,supportsTrueCurve:!1,tileMaxRecordCount:void 0},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:M.$,editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}_getMaxRecordCount(e){const t=e?.components?.parameters;return t?.limit?.schema?.maximum??t?.limitFeatures?.schema?.maximum}_getStorageSpatialReference(e){const t=e.storageCrs??I.QE,r=(0,I.J0)(t);return null==r?u.A.WGS84:new u.A({wkid:r})}_getSupportedSpatialReferences(e,t){const r="#/crs",n=e.crs??[I.QE],i=n.includes(r)?n.filter(e=>e!==r).concat(t.crs??[]):n,o=/^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i;return i.filter(e=>!o.test(e))}async _loadOGCServices(e,t){const r=null!=t?t.signal:null,{apiKey:n,collectionId:i,customParameters:s,fields:l,geometryType:a,hasZ:u,objectIdField:c,timeInfo:d,url:f}=e,y={fields:l?.map(e=>e.toJSON()),geometryType:p.Ye.toJSON(a),hasZ:u,objectIdField:c,timeInfo:d?.toJSON()},g={apiKey:n,customParameters:s,signal:r},m=await(0,I.Ki)(f,g),[h,w]=await Promise.all([(0,I.Px)(m,g),(0,I.CJ)(m,g)]);if(!this._conformsToType(h,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"))throw new o.A("ogc-feature-layer:no-geojson-support","Server does not support geojson");const v=w.collections.find(({id:e})=>e===i);if(!v)throw new o.A("ogc-feature-layer:collection-not-found","Server does not contain the named collection");const M=this._conformsToType(h,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30")?await(0,I.GA)(m,g):null,T=await(0,I.GL)(v,y,g),A=this._getMaxRecordCount(M),S=this._getCapabilities(T.hasZ,A),b=this._getStorageSpatialReference(v).toJSON(),x=this._getSupportedSpatialReferences(v,w),F=new RegExp(`^${(0,C.Cj)(I.vJ)}`,"i"),P={};for(const e of x){const t=(0,I.J0)(e);null!=t&&(P[t]||(P[t]=e.replace(F,"")))}this.featureDefinition={capabilities:S,collection:v,layerDefinition:T,spatialReference:b,supportedCrs:P}}};(0,n.Cg)([(0,l.MZ)()],A.prototype,"featureDefinition",void 0),(0,n.Cg)([(0,l.MZ)({constructOnly:!0})],A.prototype,"layer",void 0),(0,n.Cg)([(0,l.MZ)()],A.prototype,"type",void 0),A=(0,n.Cg)([(0,l.$K)("esri.layers.graphics.sources.OGCFeatureSource")],A);var S=r(52136),b=r(63074),x=r(69208),F=r(6455),P=r(87718),O=r(56658),j=r(16131),R=r(32756),Z=r(8303),E=r(54310),D=r(25036),N=r(82935),k=r(63396),G=r(10873),B=r(33143),L=r(20437),U=r(17036),_=r(30524),$=r(46499),q=r(39383),z=r(41214),K=r(61956),J=r(30291);const Q=(0,U.p)();let H=class extends((0,F.FJ)((0,S.p)((0,x.d)((0,O.J)((0,P.F)((0,b.dM)((0,R.fY)((0,N.e)((0,k.d)((0,D.j)((0,j.q)((0,Z.A)((0,E.J)((0,s.M)(w.A))))))))))))))){constructor(e){super(e),this.capabilities=null,this.collectionId=null,this.copyright=null,this.description=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new h(this),this.hasZ=void 0,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxRecordCount=null,this.objectIdField=null,this.operationalLayerType="OGCFeatureLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new A({layer:this}),this.spatialReference=null,this.title=null,this.type="ogc-feature",this.typeIdField=null,this.types=null,this.url=null}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["OGCFeatureServer"]},e).then(()=>this._fetchService(e))),this.when()}get defaultPopupTemplate(){return this.createPopupTemplate()}get effectiveMaxRecordCount(){return this.maxRecordCount??this.capabilities?.query.maxRecordCount??5e3}get isTable(){return this.loaded&&null==this.geometryType}set renderer(e){(0,_.yp)(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return(0,J.tn)(this,e)}createQuery(){return new K.A}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let r,n=!1;const i=t?.feature?.attributes,o=this.typeIdField&&i?.[this.typeIdField];return null!=o&&this.types&&(n=this.types.some(t=>t.id==o&&(r=t.domains?.[e],"inherited"===r?.type&&(r=this._getLayerDomain(e)),!0))),n||r||(r=this._getLayerDomain(e)),r}queryFeatures(e,t){return this.load().then(()=>this.source.queryFeatures(K.A.from(e)||this.createQuery(),t)).then(e=>(e?.features?.forEach(e=>{e.layer=e.sourceLayer=this,e.origin=this.graphicOrigin}),e))}async queryAttributeBins(e,t){throw new o.A("OGCFeatureLayer","Layer source does not support queryAttributeBins capability")}serviceSupportsSpatialReference(e){return this.source?.serviceSupportsSpatialReference(e)??!1}async _fetchService(e){await this.source.load(e),this.read(this.source.featureDefinition,{origin:"service"}),(0,_.yp)(this.renderer,this.fieldsIndex),(0,_.sv)(this.timeInfo,this.fieldsIndex)}_getLayerDomain(e){if(!this.fields)return null;for(const t of this.fields)if(t.name===e&&t.domain)return t.domain;return null}};(0,n.Cg)([(0,l.MZ)({readOnly:!0,json:{origins:{service:{read:!0}}}})],H.prototype,"capabilities",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],H.prototype,"collectionId",void 0),(0,n.Cg)([(0,l.MZ)({type:String})],H.prototype,"copyright",void 0),(0,n.Cg)([(0,l.MZ)({readOnly:!0})],H.prototype,"defaultPopupTemplate",null),(0,n.Cg)([(0,l.MZ)({readOnly:!0,type:String,json:{origins:{service:{name:"collection.description"}}}})],H.prototype,"description",void 0),(0,n.Cg)([(0,l.MZ)({type:String})],H.prototype,"displayField",void 0),(0,n.Cg)([(0,l.MZ)({type:Number})],H.prototype,"effectiveMaxRecordCount",null),(0,n.Cg)([(0,l.MZ)(G.Yj)],H.prototype,"elevationInfo",void 0),(0,n.Cg)([(0,l.MZ)({type:[L.A],json:{origins:{service:{name:"layerDefinition.fields"}}}})],H.prototype,"fields",void 0),(0,n.Cg)([(0,l.MZ)(Q.fieldsIndex)],H.prototype,"fieldsIndex",void 0),(0,n.Cg)([(0,l.MZ)({readOnly:!0,type:a.A,json:{origins:{service:{name:"layerDefinition.extent"}}}})],H.prototype,"fullExtent",void 0),(0,n.Cg)([(0,l.MZ)({type:p.gy.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:p.gy.read}}}}})],H.prototype,"geometryType",void 0),(0,n.Cg)([(0,l.MZ)({readOnly:!0,clonable:!1})],H.prototype,"graphicOrigin",void 0),(0,n.Cg)([(0,l.MZ)({type:Boolean,json:{origins:{service:{name:"layerDefinition.hasZ"}}}})],H.prototype,"hasZ",void 0),(0,n.Cg)([(0,l.MZ)({type:Boolean,readOnly:!0})],H.prototype,"isTable",null),(0,n.Cg)([(0,l.MZ)({type:[$.A],json:{origins:{"web-document":{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:q.w},write:!0}}}})],H.prototype,"labelingInfo",void 0),(0,n.Cg)([(0,l.MZ)(G.kF)],H.prototype,"labelsVisible",void 0),(0,n.Cg)([(0,l.MZ)(G.fV)],H.prototype,"legendEnabled",void 0),(0,n.Cg)([(0,l.MZ)({type:Number})],H.prototype,"maxRecordCount",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{origins:{service:{name:"layerDefinition.objectIdField"}}}})],H.prototype,"objectIdField",void 0),(0,n.Cg)([(0,l.MZ)({type:["OGCFeatureLayer"]})],H.prototype,"operationalLayerType",void 0),(0,n.Cg)([(0,l.MZ)(G.M6)],H.prototype,"popupEnabled",void 0),(0,n.Cg)([(0,l.MZ)({type:i.A,json:{name:"popupInfo",write:!0}})],H.prototype,"popupTemplate",void 0),(0,n.Cg)([(0,l.MZ)({types:z.Hg,json:{origins:{service:{name:"layerDefinition.drawingInfo.renderer",write:!1},"web-scene":{types:z.XJ,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:!0}})],H.prototype,"renderer",null),(0,n.Cg)([(0,l.MZ)(G.PY)],H.prototype,"screenSizePerspectiveEnabled",void 0),(0,n.Cg)([(0,l.MZ)({readOnly:!0})],H.prototype,"source",void 0),(0,n.Cg)([(0,l.MZ)({readOnly:!0,type:u.A,json:{origins:{service:{read:!0}}}})],H.prototype,"spatialReference",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"collection.title"}}}})],H.prototype,"title",void 0),(0,n.Cg)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],H.prototype,"type",void 0),(0,n.Cg)([(0,l.MZ)({type:String,readOnly:!0})],H.prototype,"typeIdField",void 0),(0,n.Cg)([(0,l.MZ)({type:[B.A]})],H.prototype,"types",void 0),(0,n.Cg)([(0,l.MZ)(G.OZ)],H.prototype,"url",void 0),H=(0,n.Cg)([(0,l.$K)("esri.layers.OGCFeatureLayer")],H);const W=H},99352(e,t,r){r.d(t,{F:()=>n,P:()=>i});const n={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:{envelope:!0,centroid:!0,convexHull:!0},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},i={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}},85113(e,t,r){r.d(t,{BM:()=>S,bd:()=>b,sO:()=>A,xD:()=>c});var n=r(67482),i=r(49186),o=r(21325),s=r(90708),l=r(43334),a=r(92722),u=r(30524);const p={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function c(e){return p[e]}function*d(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 y(e){for(const t of e)if(t.length>2)return!0;return!1}function g(e){let t=0;for(let r=0;r<e.length;r++){const n=e[r],i=e[(r+1)%e.length];t+=n[0]*i[1]-i[0]*n[1]}return t<=0}function m(e){const t=e[0],r=e[e.length-1];t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]||e.push(t)}function h(e,t){const{coordinates:r,type:n}=e,i=t.hasZ??!1,o=!0;switch(n){case"Point":return new a.A([],[...r],i,!1);case"LineString":return(0,s.Ap)({paths:[r],hasZ:o},i,!1);case"MultiLineString":return(0,s.Ap)({paths:r,hasZ:o},i,!1);case"MultiPoint":return(0,s.PR)({points:r,hasZ:o},i,!1);case"Polygon":case"MultiPolygon":{const e=new a.A([],[],i,!1);for(const t of"Polygon"===n?[r]:r){w(e,t[0],i);for(let r=1;r<t.length;r++)v(e,t[r],i)}return e}}}function w(e,t,r){m(t),function(e){return!g(e)}(t)?I(e,t,r):C(e,t,r)}function v(e,t,r){m(t),function(e){return g(e)}(t)?I(e,t,r):C(e,t,r)}function C(e,t,r){for(const n of t)M(e,n,r);e.lengths.push(t.length)}function I(e,t,r){for(let n=t.length-1;n>=0;n--)M(e,t[n],r);e.lengths.push(t.length)}function M(e,[t,r,n],i){e.coords.push(t,r),i&&e.coords.push(n||0)}function T(e){switch(typeof e){case"string":return(0,n.Br)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function A(e,t=4326){if(!e)throw new i.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new i.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:r}=e;if(!r)return;const n="string"==typeof r?r:"name"===r.type?r.properties.name:"EPSG"===r.type?r.properties.code:null,s=(0,o.oT)({wkid:t})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${t})$`,"i");if(!n||!s.test(n))throw new i.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:r})}function S(e,t={}){const r=[],n=new Set,i=new Set;let o,s=!1,l=null,a=!1,{geometryType:p=null}=t;for(const t of d(e)){const{geometry:e,properties:d,id:g}=t;if((!e||(p||(p=c(e.type)),c(e.type)===p))&&(s||(s=y(f(e))),a||(a=null!=g,a&&(o=typeof g,d&&(l=Object.keys(d).filter(e=>d[e]===g)))),d&&l&&a&&null!=g&&(l.length>1?l=l.filter(e=>d[e]===g):1===l.length&&(l=d[l[0]]===g?l:[])),d))for(const e in d){if(n.has(e))continue;const t=T(d[e]);if("unknown"===t){i.add(e);continue}i.delete(e),n.add(e);const o=(0,u.rS)(e);o&&r.push({name:o,alias:e,type:t})}}const g=(0,u.rS)(1===l?.length&&l[0]||null)??void 0;if(g)for(const e of r)if(e.name===g&&(0,u.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:r,geometryType:p,hasZ:s,objectIdFieldName:g,objectIdFieldType:o,unknownFields:Array.from(i)}}function b(e,t){return Array.from(function*(e,t={}){const{geometryType:r,objectIdField:n}=t;for(const i of e){const{geometry:e,properties:o,id:s}=i;if(e&&c(e.type)!==r)continue;const a=o||{};let u;n&&(u=a[n],null==s||u||(a[n]=u=s)),yield new l.Om(e&&h(e,t),a,null,u)}}(d(e),t))}},64714(e,t,r){r.d(t,{F0:()=>l,Vx:()=>p,e2:()=>d,f:()=>f});var n=r(44208),i=r(4718),o=r(99352),s=r(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?s.Cb:"esriGeometryPolyline"===e?s.yM:s.WR}}}const a=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function p(e,t){if((0,n.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this${c(t)} = null;`;for(const t in e)r+=`this${c(t)} = ${JSON.stringify(e[t])};`;const n=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new n}catch(r){return()=>({[t]:null,...e})}}function c(e){return a.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.o8)(e)}}]}function f(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:o.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:o.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},82832(e,t,r){r.d(t,{$1:()=>m,CR:()=>g,MB:()=>d,PC:()=>h,Yx:()=>a,bP:()=>p});var n=r(67482),i=r(21325),o=r(30524);class s{constructor(e){this.description=e,this.code=null}}class l{constructor(e){this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error=new s(e)}}function a(e){return new l(e)}class u{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function p(e){return new u(e)}const c=new Set;function d(e,t,r,n=!1){c.clear();for(const i in r){const s=e.get(i);if(!s)continue;const l=f(s,r[i]);if(c.add(s.name),s&&(n||s.editable)){const e=(0,o.CJ)(s,l);if(e)return a((0,o.uo)(e,s,l));t[s.name]=l}}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 r=t;return(0,o.WA)(e)&&"string"==typeof t?r=parseFloat(t):(0,o.yM)(e)&&null!=t&&"string"!=typeof t?r=String(t):(0,o.vE)(e)&&"string"==typeof t&&(r=(0,n._U)(t)),(0,o.WX)(r)}let y;function g(e,t){if(!e||!(0,i.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,i.fn)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==y&&(y=await r.e(1023).then(r.bind(r,81023))),y}()}const h={supportsAutoIntervalBin:!0,supportsFixedIntervalBin:!0,supportsFixedBoundariesBin:!0,supportsDateBin:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsNormalization:!0,supportedStatisticTypes:["COUNT","SUM","AVG","VAR","STDDEV","MIN","MAX","PERCENTILE_CONT","PERCENTILE_DISC","CentroidAggregate","EnvelopeAggregate","ConvexHullAggregate"],supportedNormalizationTypes:["field","log","naturalLog","percentOfTotal","squareRoot"]}},69208(e,t,r){r.d(t,{d:()=>o});var n=r(5482),i=r(91429);const o=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,n.Cg)([(0,i.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,n.Cg)([(0,i.$K)("esri.layers.mixins.CustomParametersMixin")],r),r}},6455(e,t,r){r.d(t,{FJ:()=>h,Dp:()=>w,KV:()=>v});var n=r(5482),i=r(93637),o=r(91429),s=r(89317),l=r(69540),a=r(7762),u=r(25482),p=r(83960),c=r(13069);const d={write:{overridePolicy:(e,t,r)=>({enabled:!r||"scale"===r.filterMode})}};let f=class extends((0,l.OU)(u.o)){constructor(e){super(e),this.id=(0,c.lk)(),this.maxScale=0,this.minScale=0,this.title="",this.where=null}};(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],f.prototype,"id",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,json:d})],f.prototype,"maxScale",void 0),(0,n.Cg)([(0,o.MZ)({type:Number,json:d})],f.prototype,"minScale",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],f.prototype,"title",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],f.prototype,"where",void 0),f=(0,n.Cg)([(0,o.$K)("esri.layers.support.DisplayFilter")],f);var y=r(41560),g=r(43937);let m=class extends((0,l.OU)(u.o)){constructor(e){super(e),this.activeFilterId=null,this.filters=new(a.A.ofType(f)),this.mode="manual"}writeFilters(e,t,r,n){const i=e.toArray();"scale"===this.mode&&i.sort((e,t)=>{const r=(0,p.oW)(t.minScale,e.minScale),n=e.maxScale-t.maxScale;return 0===r?n:r}),t[r]=i.map(e=>e.toJSON(n))}write(e,t){return super.write(e,(0,y.mW)(this,t))}};(0,n.Cg)([(0,o.MZ)({type:String,json:{write:{overridePolicy:(e,t,r)=>({enabled:"manual"===r.filterMode,isRequired:!0})}}})],m.prototype,"activeFilterId",void 0),(0,n.Cg)([(0,o.MZ)({type:a.A.ofType(f),nonNullable:!0,json:{write:!0}})],m.prototype,"filters",void 0),(0,n.Cg)([(0,g.K)("filters")],m.prototype,"writeFilters",null),(0,n.Cg)([(0,o.MZ)({type:["manual","scale"],nonNullable:!0,json:{name:"filterMode",write:!0}})],m.prototype,"mode",void 0),m=(0,n.Cg)([(0,o.$K)("esri.layers.support.DisplayFilterInfo")],m);const h=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.displayFilterEnabled=!0,this.displayFilterInfo=null}};return(0,n.Cg)([(0,o.MZ)(w)],r.prototype,"displayFilterEnabled",void 0),(0,n.Cg)([(0,o.MZ)(v)],r.prototype,"displayFilterInfo",void 0),r=(0,n.Cg)([(0,o.$K)("esri.layers.mixins.DisplayFilteredLayer")],r),r},w={type:Boolean,json:{name:"layerDefinition.disableDisplayFilter",read:{reader:e=>!e},write:{layerContainerTypes:s.K,writer(e,t,r){(0,i.sM)(r,!e,t)}},origins:{"web-scene":{write:!1,read:!1}}}},v={type:m,json:{name:"layerDefinition.displayFilterInfo",write:{enabled:!0,allowNull:!0,layerContainerTypes:s.K},origins:{"web-scene":{write:!1,read:!1}}}}},32756(e,t,r){r.d(t,{Rr:()=>l,fY:()=>u,ne:()=>a});var n=r(5482),i=r(93637),o=r(91429),s=r(91880);function l(e,t,r){if(!e)return null;const n=e.find(e=>!!e.field);if(!n)return null;const i=new s.A;return i.read(n,r),[i]}const a={type:[s.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,n){const o=e.find(e=>!!e.field);o&&(0,i.sM)(r,[o.toJSON()],t)}}}},u=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,n.Cg)([(0,o.MZ)(a)],r.prototype,"orderBy",void 0),r=(0,n.Cg)([(0,o.$K)("esri.layers.mixins.OrderedLayer")],r),r}},8303(e,t,r){r.d(t,{A:()=>I});var n=r(5482),i=r(92602),o=r(70333),s=r(11254),l=r(60999),a=r(49186),u=r(53966),p=r(97768),c=r(17676),d=r(84952),f=r(91429),y=r(77548),g=r(20655),m=r(80812),h=r(41318),w=r(10407),v=r(36005),C=r(43937);const I=e=>{const t=e;let I=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new m.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:n}=await r.e(1204).then(r.bind(r,41204));return(0,c.Te)(t),await n({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,c.QP)(e),!0)))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:n},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",n),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const n=!o.id?.findCredential(this.url),i=e===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,n);let s,l;if(i)s=r.portal.url;else try{s=await(0,y.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!s||!(0,d.b8)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(o.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const a=!0,u=!1,p=!1;if(!l)return{features:{edit:a,fullEdit:u},content:{updateItem:p}};try{if(i?await r.reload():(r=new m.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,n)}catch(e){(0,c.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const n=`${r.owningSystemUrl}/sharing/rest`,i=g.A.getDefault();if(i&&i.loaded&&(0,d.S8)(i.restUrl)===(0,d.S8)(n))return i.user;const a=`${n}/community/self`,u=null!=e?e.signal:null,p=await(0,l.Ke)((0,s.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?h.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,n=this.portalItem?.id&&(this.portalItem.portal||g.A.getDefault());return r&&n&&!(0,d.ut)(n.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,n.Cg)([(0,f.MZ)({type:m.default})],I.prototype,"portalItem",null),(0,n.Cg)([(0,v.w)("web-document","portalItem",["itemId"])],I.prototype,"readPortalItem",null),(0,n.Cg)([(0,C.K)("web-document","portalItem",{itemId:{type:String}})],I.prototype,"writePortalItem",null),(0,n.Cg)([(0,f.MZ)({clonable:!1})],I.prototype,"resourceReferences",void 0),(0,n.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasEditingPrivileges",void 0),(0,n.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasFullEditingPrivileges",void 0),(0,n.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],I.prototype,"userHasUpdateItemPrivileges",void 0),I=(0,n.Cg)([(0,f.$K)("esri.layers.mixins.PortalLayer")],I),I},M={credential:null,user:null}},82935(e,t,r){r.d(t,{B:()=>d,e:()=>f});var n=r(5482),i=r(91429),o=r(89317),s=r(30524),l=r(96184),a=r(73133),u=r(79677),p=r(10184),c=r(36005);const d={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:o.K}}},f=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const n=r.timeOffset,i=a.j.fromJSON(r.timeOffsetUnits);return n&&i?new p.A({value:n,unit:i}):null}get timeInfo(){return this._get("timeInfo")}set timeInfo(e){(0,s.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,n.Cg)([(0,i.MZ)({type:u.A,json:{write:!1}})],r.prototype,"timeExtent",void 0),(0,n.Cg)([(0,i.MZ)({type:p.A})],r.prototype,"timeOffset",void 0),(0,n.Cg)([(0,c.w)("service","timeOffset",["timeInfo.exportOptions"])],r.prototype,"readOffset",null),(0,n.Cg)([(0,i.MZ)({value:null,type:l.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],r.prototype,"timeInfo",null),(0,n.Cg)([(0,i.MZ)(d)],r.prototype,"useViewTime",void 0),r=(0,n.Cg)([(0,i.$K)("esri.layers.mixins.TemporalLayer")],r),r}},63396(e,t,r){r.d(t,{d:()=>M});var n=r(5482),i=r(91429),o=r(60950),s=r(99959);class l extends s.A{constructor(e){super(),this.type="track",this.trackInfoProvider=e}get id(){return this.trackInfoProvider.id}get[o.ym](){return this.trackInfoProvider.trackInfo}}var a=r(37838),u=r(69540),p=r(25482),c=r(93637),d=r(50820),f=r(10873),y=r(46499),g=r(41214);let m=class extends((0,u.OU)(p.o)){constructor(e){super(e),this.labelingInfo=null,this.labelsVisible=!0,this.renderer=null,this.visible=!0}};(0,n.Cg)([(0,i.MZ)({type:[y.A],json:{write:!0}})],m.prototype,"labelingInfo",void 0),(0,n.Cg)([(0,i.MZ)(f.kF)],m.prototype,"labelsVisible",void 0),(0,n.Cg)([(0,i.MZ)({types:g.Hg,json:{write:!0}})],m.prototype,"renderer",void 0),(0,n.Cg)([(0,i.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"visible",void 0),m=(0,n.Cg)([(0,i.$K)("esri.layers.support.TrackPartInfo")],m);var h=r(96576),w=r(59868),v=r(10184),C=r(43937);let I=class extends((0,u.OU)(p.o)){constructor(e){super(e),this.enabled=!0,this.fields=[],this.latestObservations=new m({renderer:new h.A({symbol:w.UK.clone()})}),this.maxDisplayDuration=null,this.maxDisplayObservationsPerTrack=0,this.popupEnabled=!0,this.popupTemplate=null,this.previousObservations=new m({renderer:new h.A({symbol:w.UK.clone()})}),this.trackLines=new m({renderer:new h.A({symbol:w.A7.clone()})}),this.timeField="startTimeField"}writeFields(e,t,r){const n=e.filter(e=>"avg_angle"!==e.statisticType).map(e=>e.toJSON());(0,c.sM)(r,n,t)}};(0,n.Cg)([(0,i.MZ)({type:Boolean,json:{write:!0}})],I.prototype,"enabled",void 0),(0,n.Cg)([(0,i.MZ)({type:[d.A],json:{write:!0}})],I.prototype,"fields",void 0),(0,n.Cg)([(0,C.K)("fields")],I.prototype,"writeFields",null),(0,n.Cg)([(0,i.MZ)({type:m,json:{write:!0}})],I.prototype,"latestObservations",void 0),(0,n.Cg)([(0,i.MZ)({type:v.A,json:{write:!0}})],I.prototype,"maxDisplayDuration",void 0),(0,n.Cg)([(0,i.MZ)({type:Number,json:{write:!0}})],I.prototype,"maxDisplayObservationsPerTrack",void 0),(0,n.Cg)([(0,i.MZ)(f.M6)],I.prototype,"popupEnabled",void 0),(0,n.Cg)([(0,i.MZ)({type:a.A,json:{name:"popupInfo",write:!0}})],I.prototype,"popupTemplate",void 0),(0,n.Cg)([(0,i.MZ)({type:m,json:{write:!0}})],I.prototype,"previousObservations",void 0),(0,n.Cg)([(0,i.MZ)({type:m,json:{write:!0}})],I.prototype,"trackLines",void 0),(0,n.Cg)([(0,i.MZ)({type:["timeReceived","startTimeField","endTimeField"],json:{read:!0,write:!0}})],I.prototype,"timeField",void 0),I=(0,n.Cg)([(0,i.$K)("esri.layers.support.TrackInfo")],I);const M=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.trackGraphicOrigin=new l(this),this.trackInfo=null}};return(0,n.Cg)([(0,i.MZ)({readOnly:!0,clonable:!1})],r.prototype,"trackGraphicOrigin",void 0),(0,n.Cg)([(0,i.MZ)({type:I})],r.prototype,"trackInfo",void 0),r=(0,n.Cg)([(0,i.$K)("esri.layers.mixins.TrackableLayer")],r),r}},75321(e,t,r){r.d(t,{CJ:()=>A,GA:()=>x,GL:()=>T,I:()=>O,J0:()=>F,Ki:()=>b,Px:()=>S,QE:()=>M,bW:()=>P,vJ:()=>I});var n=r(11254),i=r(49186),o=r(53966),s=r(84952),l=r(16930),a=r(21325),u=r(28735),p=r(90708),c=r(58512),d=r(85113),f=r(64714),y=r(82832),g=r(95466),m=r(98453),h=r(98623);const w=()=>o.A.getLogger("esri.layers.ogc.ogcFeatureUtils"),v="startindex",C=new Set([v,"offset"]),I="http://www.opengis.net/def/crs/",M=`${I}OGC/1.3/CRS84`;async function T(e,t,r={},o=5){const{links:l}=e,a=D(l);if(!a)throw new i.A("ogc-feature-layer:missing-items-page","Missing items url");const{apiKey:u,customParameters:p,signal:c}=r,y=(0,s.s2)(a.href,e.landingPage.url),C={limit:o,...p,token:u},I=(0,s.a6)(y,C),{data:M}=await(0,n.A)(I,{signal:c,headers:{accept:"application/geo+json"}}),T=G(I,o,M.links)??v;(0,d.sO)(M);const A=M.numberMatched,S=(0,d.BM)(M,{geometryType:t.geometryType}),b=t.fields||S.fields||[],x=null!=t.hasZ?t.hasZ:S.hasZ,F=S.geometryType,P=t.objectIdField||S.objectIdFieldName||"OBJECTID";let O=t.timeInfo;const j=b.find(({name:e})=>e===P);if(j)j.editable=!1,j.nullable=!1;else{if(!S.objectIdFieldType)throw new i.A("ogc-feature-layer:missing-feature-id","Collection geojson require a feature id as a unique identifier");b.unshift({name:P,alias:P,type:"number"===S.objectIdFieldType?"esriFieldTypeOID":"esriFieldTypeString",editable:!1,nullable:!1})}if(P!==S.objectIdFieldName){const e=b.find(({name:e})=>e===S.objectIdFieldName);e&&(e.type="esriFieldTypeInteger")}b===S.fields&&S.unknownFields.length>0&&w().warn({name:"ogc-feature-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:S.unknownFields}});for(const e of b){if(e.name??=e.alias,e.alias??=e.name,"esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type&&(e.editable??=!0,e.nullable??=!0),!e.name)throw new i.A("ogc-feature-layer:invalid-field-name","field name is missing",{field:e});if(!m.m.jsonValues.includes(e.type))throw new i.A("ogc-feature-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e})}if(O){const e=new g.A(b);if(O.startTimeField){const t=e.get(O.startTimeField);t?(O.startTimeField=t.name,t.type="esriFieldTypeDate"):O.startTimeField=null}if(O.endTimeField){const t=e.get(O.endTimeField);t?(O.endTimeField=t.name,t.type="esriFieldTypeDate"):O.endTimeField=null}if(O.trackIdField){const t=e.get(O.trackIdField);t?O.trackIdField=t.name:(O.trackIdField=null,w().warn({name:"ogc-feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:O}}))}O.timeReference||={timeZoneIANA:h.n$},O.startTimeField||O.endTimeField||(w().warn({name:"ogc-feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:O}}),O=void 0)}return{drawingInfo:F?(0,f.F0)(F):null,extent:E(e),geometryType:F,fields:b,hasZ:!!x,objectIdField:P,paginationParameter:T,timeInfo:O,featureCount:A}}async function A(e,t={}){const{links:r,url:o}=e,l=N(a=r,"data","application/json")??N(a,"http://www.opengis.net/def/rel/ogc/1.0/data","application/json");var a;if(!l)throw new i.A("ogc-feature-layer:missing-collections-page","Missing collections url");const{apiKey:u,customParameters:p,signal:c}=t,d=(0,s.s2)(l.href,o),{data:f}=await(0,n.A)(d,{signal:c,headers:{accept:"application/json"},query:{...p,token:u}});for(const t of f.collections)t.landingPage=e;return f}async function S(e,t={}){const{links:r,url:o}=e,l=N(a=r,"conformance","application/json")??N(a,"http://www.opengis.net/def/rel/ogc/1.0/conformance","application/json");var a;if(!l)throw new i.A("ogc-feature-layer:missing-conformance-page","Missing conformance url");const{apiKey:u,customParameters:p,signal:c}=t,d=(0,s.s2)(l.href,o),{data:f}=await(0,n.A)(d,{signal:c,headers:{accept:"application/json"},query:{...p,token:u}});return f}async function b(e,t={}){const{apiKey:r,customParameters:i,signal:o}=t,{data:s}=await(0,n.A)(e,{signal:o,headers:{accept:"application/json"},query:{...i,token:r}});return s.url=e,s}async function x(e,t={}){const{links:r,url:i}=e,o=N(r,"service-desc","application/vnd.oai.openapi+json;version=3.0");if(!o)return w().warn("ogc-feature-layer:missing-openapi-page","The OGC API-Features server does not have an OpenAPI page."),null;const{apiKey:l,customParameters:a,signal:u}=t,p=(0,s.s2)(o.href,i),{data:c}=await(0,n.A)(p,{signal:u,headers:{accept:"application/vnd.oai.openapi+json;version=3.0"},query:{...a,token:l}});return c}function F(e){const t=/^http:\/\/www\.opengis.net\/def\/crs\/(?<authority>.*)\/(?<version>.*)\/(?<code>.*)$/i.exec(e),r=t?.groups;if(!r)return null;const{authority:n,code:i}=r;switch(n.toLowerCase()){case"ogc":switch(i.toLowerCase()){case"crs27":return l.A.GCS_NAD_1927.wkid;case"crs83":return 4269;case"crs84":case"crs84h":return l.A.WGS84.wkid;default:return null}case"esri":case"epsg":{const e=Number.parseInt(i,10);return Number.isNaN(e)?null:e}default:return null}}async function P(e,t,r){const n=await O(e,t,r);return(0,p.ZF)(n)}async function O(e,t,r){const{collection:{links:o,landingPage:{url:f}},layerDefinition:m,maxRecordCount:h,queryParameters:{apiKey:w,customParameters:v},spatialReference:C,supportedCrs:I}=e,M=D(o);if(!M)throw new i.A("ogc-feature-layer:missing-items-page","Missing items url");const{geometry:T,num:A,start:S,timeExtent:b,where:x}=t;if(t.objectIds)throw new i.A("ogc-feature-layer:query-by-objectids-not-supported","Queries with object ids are not supported");const F=l.A.fromJSON(C),P=t.outSpatialReference??F,O=P.isWGS84?null:j(P,I),R=Z(T,I),E=function(e){if(!e)return null;const{start:t,end:r}=e;return`${null!=t?t.toISOString():".."}/${null!=r?r.toISOString():".."}`}(b),N=(W=x)&&"1=1"!==W?W:null,G=A??(null==S?h:10),B=0===S?void 0:S,{fields:L,geometryType:U,hasZ:_,objectIdField:$,paginationParameter:q}=m,z=(0,s.s2)(M.href,f),{data:K}=await(0,n.A)(z,{...r,query:{...v,...R,crs:O,datetime:E,query:N,limit:G,[q]:B,token:w},headers:{accept:"application/geo+json"}}),J=(0,d.bd)(K,{geometryType:U,hasZ:_,objectIdField:$}),Q=J.length===G&&!!k(K.links??[]),H=new g.A(L);var W;for(const e of J){const t={};(0,y.MB)(H,t,e.attributes,!0);for(const e of H.fields)e.nullable&&!(e.name in t)&&(t[e.name]=null);t[$]=e.attributes[$],e.attributes=t}if(!O&&P.isWebMercator)for(const e of J)if(null!=e.geometry&&null!=U){const t=(0,p.zv)(e.geometry,U,_,!1);t.spatialReference=l.A.WGS84,e.geometry=(0,p.Ux)((0,u.Cv)(t,P))}for(const e of J)e.objectId=e.attributes[$];const V=O||!O&&P.isWebMercator?P.toJSON():a.KK,Y=new c.A;return Y.exceededTransferLimit=Q,Y.features=J,Y.fields=L,Y.geometryType=U,Y.hasZ=_,Y.spatialReference=V,Y}function j(e,t){const{isWebMercator:r,wkid:n,latestWkid:i}=e;if(!n&&!i)return null;const o=r?t[3857]??t[102100]??t[102113]??t[900913]:n&&t[n]||i&&t[i];return o?`${I}${o}`:null}function R(e){if(!e)return"";const{xmin:t,ymin:r,xmax:n,ymax:i}=e;return`${t},${r},${n},${i}`}function Z(e,t){if(!function(e){return null!=e&&"extent"===e.type}(e))return null;const{spatialReference:r}=e;if(!r||r.isWGS84)return{bbox:R(e)};const n=j(r,t);return null!=n?{bbox:R(e),"bbox-crs":n}:r.isWebMercator?{bbox:R((0,u.Cv)(e,l.A.WGS84))}:null}function E(e){const t=e.extent?.spatial;if(!t)return null;const r=t.bbox[0],n=4===r.length,[i,o]=r,s=n?void 0:r[2];return{xmin:i,ymin:o,xmax:n?r[2]:r[3],ymax:n?r[3]:r[4],zmin:s,zmax:n?void 0:r[5],spatialReference:l.A.WGS84.toJSON()}}function D(e){return N(e,"items","application/geo+json","http://www.opengis.net/def/profile/ogc/0/rfc7946")??N(e,"http://www.opengis.net/def/rel/ogc/1.0/items","application/geo+json","http://www.opengis.net/def/profile/ogc/0/rfc7946")}function N(e,t,r,n){return n?e.find(({rel:e,type:i,profile:o})=>e===t&&i===r&&o?.includes(n))??e.find(({rel:e,type:n,profile:i})=>e===t&&n===r&&!i):e.find(({rel:e,type:n})=>e===t&&n===r)??e.find(({rel:e,type:r})=>e===t&&!r)}function k(e){return N(e,"next","application/geo+json")}function G(e,t,r){if(!r)return;const n=k(r),i=(0,s.An)(n?.href)?.query;if(!i)return;const o=(0,s.An)(e).query,l=Object.keys(o??{}),a=Object.entries(i).filter(([e])=>!l.includes(e)).find(([e,r])=>C.has(e.toLowerCase())&&Number.parseInt(r,10)===t),u=a?.[0];return u}},29005(e,t,r){r.d(t,{A:()=>u});var n=r(5482),i=r(69540),o=r(66552),s=r(25482),l=r(91429);const a=new o.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,n.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,n.Cg)([(0,l.MZ)({json:{read:a.read,write:a.write}})],u.prototype,"drawingTool",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,n.Cg)([(0,l.$K)("esri.layers.support.FeatureTemplate")],u)},33143(e,t,r){r.d(t,{A:()=>c});var n=r(5482),i=r(69540),o=r(25482),s=r(91429),l=r(8631),a=r(29005),u=r(36005),p=r(43937);let c=class extends((0,i.OU)(o.o)){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,l.r)(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,n.Cg)([(0,s.MZ)({json:{write:!0}})],c.prototype,"id",void 0),(0,n.Cg)([(0,s.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,n.Cg)([(0,s.MZ)({json:{write:!0}})],c.prototype,"domains",void 0),(0,n.Cg)([(0,u.w)("domains")],c.prototype,"readDomains",null),(0,n.Cg)([(0,p.K)("domains")],c.prototype,"writeDomains",null),(0,n.Cg)([(0,s.MZ)({type:[a.A],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,n.Cg)([(0,s.$K)("esri.layers.support.FeatureType")],c)},91880(e,t,r){r.d(t,{A:()=>u});var n,i=r(5482),o=r(66552),s=r(25482),l=r(91429);const a=new o.J({asc:"ascending",desc:"descending"});let u=class extends s.o{static{n=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new n({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,i.Cg)([(0,l.MZ)({type:a.apiValues,json:{type:a.jsonValues,read:a.read,write:a.write}})],u.prototype,"order",void 0),u=n=(0,i.Cg)([(0,l.$K)("esri.layers.support.OrderByInfo")],u)},96184(e,t,r){r.d(t,{A:()=>f});var n=r(5482),i=r(69540),o=r(25482),s=r(91429),l=r(79677),a=r(10184),u=r(56400),p=r(36005),c=r(43937);function d(e,t){return a.A.fromJSON({value:e,unit:t})}let f=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?l.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?d(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?d(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,n.Cg)([(0,s.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],f.prototype,"cumulative",void 0),(0,n.Cg)([(0,s.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],f.prototype,"endField",void 0),(0,n.Cg)([(0,s.MZ)({type:l.A,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"fullTimeExtent",void 0),(0,n.Cg)([(0,p.w)("fullTimeExtent",["timeExtent"])],f.prototype,"readFullTimeExtent",null),(0,n.Cg)([(0,c.K)("fullTimeExtent")],f.prototype,"writeFullTimeExtent",null),(0,n.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"hasLiveData",void 0),(0,n.Cg)([(0,s.MZ)({type:a.A,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"interval",void 0),(0,n.Cg)([(0,p.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],f.prototype,"readInterval",null),(0,n.Cg)([(0,c.K)("interval")],f.prototype,"writeInterval",null),(0,n.Cg)([(0,s.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],f.prototype,"startField",void 0),(0,n.Cg)([(0,s.MZ)((0,u.P6)("timeReference",!0))],f.prototype,"timeZone",void 0),(0,n.Cg)([(0,s.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],f.prototype,"trackIdField",void 0),(0,n.Cg)([(0,s.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],f.prototype,"useTime",void 0),(0,n.Cg)([(0,s.MZ)({type:[Date],json:{read:!1}})],f.prototype,"stops",void 0),f=(0,n.Cg)([(0,s.$K)("esri.layers.support.TimeInfo")],f)},41560(e,t,r){r.d(t,{Ch:()=>s,mW:()=>o});var n=r(34727),i=r(39516);function o(e,t){return{...t,filterMode:e.mode}}function s(e,t,r){const o=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:n}of e.filters)t[0]=Math.max(t[0],p(r)),t[1]=Math.min(t[1],c(n));return t}(e);if(o&&((0,n.gg)(t,o[0])||(0,n.ZH)(r,o[1])))return"";const s=Array.from(l(e,t,r)),a=function(e,t,r){if(0===e.length)return!0;const i=p(e.at(0)?.minScale),o=c(e.at(-1)?.maxScale);if((0,n.ZH)(i,t)||(0,n.gg)(o,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],i=e[t+1];if((0,n.ZH)(p(i.minScale),c(r.maxScale)))return!0}return!1}(s,t,r)?"1=1":s.map(e=>e.where||"1=1").reduce((e,t)=>(0,i.IW)(e,t),"");return a&&"1=1"!==a?a:""}function*l(e,t,r){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const n of e.filters)a(n.minScale,n.maxScale,t,r)&&(yield n)}}function a(e,t,r,i){return e=p(e),r=p(r),t=c(t),!(!(0,n.Sp)(r,e)&&(i??r)>e||(0,n.Hx)(t,r)||void 0!==i&&(0,n.Sp)(i,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function p(e){return e||Number.POSITIVE_INFINITY}function c(e){return e||0}},17036(e,t,r){r.d(t,{p:()=>a});var n=r(44208),i=r(53966),o=r(20437),s=r(95466),l=r(30524);function a(){return{fields:{type:[o.A],value:null,set:function(e){if(e&&(0,n.A)("big-integer-warning-enabled")){const t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){const e=t.map(e=>`'${e.name}'`).join(", ");i.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return s.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||i.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,l.DB)(this.fieldsIndex,e)}}}}},10407(e,t,r){r.d(t,{It:()=>f,LG:()=>s,OM:()=>u,Sm:()=>p,Y:()=>l,bK:()=>a,mm:()=>d,sQ:()=>c});var n=r(91218),i=r(16930),o=r(28735);function s(e,t){if(!l(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function l(e,t){return!!e.typeKeywords?.includes(t)}function a(e){return l(e,d.HOSTED_SERVICE)}function u(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function p(e,t,r){r?s(e,t):u(e,t)}async function c(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,o.ci)(e);const r=i.A.WGS84;return await(0,n.initializeProjection)(t,r),(0,n.project)(e,r)}(r)}const d={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function f(e){const{portal:t,isOrgItem:r,itemControl:n}=e,i=t.user?.privileges;let o=!i||i.includes("features:user:edit"),s=!!r&&!!i?.includes("features:user:fullEdit");const l="update"===n||"admin"===n;return l?s=o=!0:s&&(o=!0),{features:{edit:o,fullEdit:s},content:{updateItem:l}}}},22671(e,t,r){r.d(t,{A:()=>w});var n,i=r(5482),o=r(52106),s=r(66552),l=r(25482),a=r(4718),u=r(91429),p=r(16930),c=r(60408),d=r(65864),f=r(50498),y=r(20437),g=r(36005),m=r(43937);const h=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=n=class extends l.o{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){return this.readFeaturesWithClass(e,t,o.A)}writeGeometryType(e,t,r,n){if(e)return void h.write(e,t,r,n);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void h.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,d.rS)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=p.A.fromJSON(t.spatialReference)),n}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 n(this.cloneProperties())}cloneProperties(){return(0,a.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 n=t.features[r];if(n.geometry){const t=e?.[r];n.geometry=t?.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,i]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-n)/t),e=>Math.round((i-e)/r));for(let e=0,t=o.length;e<t;e++)s?.(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:[n,i],scale:[o,s]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,e=>e*o+n,e=>i-e*s,l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const n=p.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const o=e[t],s=r.fromJSON(o),l=o.geometry?.spatialReference;null==s.geometry||l||(s.geometry.spatialReference=n);const a=o.aggregateGeometries,u=s.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],i=r?.spatialReference;null==t||i||(t.spatialReference=n)}i.push(s)}return i}_quantizePoints(e,t,r){let n,i;const o=[];for(let s=0,l=e.length;s<l;s++){const l=e[s];if(s>0){const e=t(l[0]),s=r(l[1]);e===n&&s===i||(o.push([e-n,s-i]),n=e,i=s)}else n=t(l[0]),i=r(l[1]),o.push([n,i])}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 n=(0,c.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,o=n.length;e<o;e++){const o=n[e],s=this._quantizePoints(o,t,r);s&&i.push(s)}return i.length>0?((0,c.Bi)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,n,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),n&&(e.z=n(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,c.Bi)(e)?e.rings:e.paths;let s,l;for(let e=0,n=o.length;e<n;e++){const n=o[e];for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(s+=i[0],l+=i[1]):(s=i[0],l=i[1]),i[0]=t(s),i[1]=r(l)}}if(n&&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]=n(r[2]),r[3]=i(r[3])}}else if(n)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]=n(r[2])}}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])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),n&&null!=e.zmax&&null!=e.zmin&&(e.zmax=n(e.zmax),e.zmin=n(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,l;for(let e=0,n=o.length;e<n;e++){const n=o[e];e>0?(s+=n[0],l+=n[1]):(s=n[0],l=n[1]),n[0]=t(s),n[1]=r(l)}if(n&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2]),t[3]=i(t[3])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}}:null}};(0,i.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,i.Cg)([(0,u.MZ)({type:[o.A],json:{write:!0}})],w.prototype,"features",void 0),(0,i.Cg)([(0,g.w)("features")],w.prototype,"readFeatures",null),(0,i.Cg)([(0,u.MZ)({type:[y.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,i.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:h.read}}})],w.prototype,"geometryType",void 0),(0,i.Cg)([(0,m.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,i.Cg)([(0,u.MZ)({types:f.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,i.Cg)([(0,g.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,i.Cg)([(0,u.MZ)({type:p.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,i.Cg)([(0,m.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,i.Cg)([(0,u.MZ)({json:{write:!0}})],w.prototype,"transform",void 0),w=n=(0,i.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3636,9397],{69052(t,e,r){r.d(e,{hr:()=>n,ie:()=>u,uC:()=>o});var s=r(34727);class n{constructor(t,e){this.min=t,this.max=e,this.range=e-t}normalize(t,e=0,r=!1){return i(this.range,this.min,this.max,t,e,r)}clamp(t,e=0){return(0,s.qE)(t-e,this.min,this.max)+e}monotonic(t,e,r){return t<e?e:e+a(this.range,t-e,r)}minimalMonotonic(t,e,r){return i(this.range,t,t+this.range,e,r)}center(t,e,r){return e=this.monotonic(t,e,r),this.normalize((t+e)/2,r)}diff(t,e,r){return this.monotonic(t,e,r)-t}shortestSignedDiff(t,e){t=this.normalize(t);const r=(e=this.normalize(e))-t,s=e<t?this.minimalMonotonic(t,e)-t:e-this.minimalMonotonic(e,t);return Math.abs(r)<Math.abs(s)?r:s}contains(t,e,r){return e=this.minimalMonotonic(t,e),(r=this.minimalMonotonic(t,r))>t&&r<e}}function i(t,e,r,s,n=0,i=!1){return(s-=n)<e?s+=a(t,e-s):s>r&&(s-=a(t,s-r)),i&&s===r&&(s=e),s+n}function a(t,e,r=0){return Math.ceil((e-r)/t)*t+r}const o=new n(0,2*Math.PI),u=(new n(-Math.PI,Math.PI),new n(0,360))},82534(t,e,r){function s(){return[0,0,0,1]}function n(t){return[t[0],t[1],t[2],t[3]]}r.d(e,{o8:()=>n,vt:()=>s,zK:()=>i});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:n,create:s,fromValues:function(t,e,r,s){return[t,e,r,s]}},Symbol.toStringTag,{value:"Module"}))},67026(t,e,r){r.d(e,{A6:()=>f,Xd:()=>c,Xr:()=>d,hZ:()=>g,lw:()=>p,t2:()=>I,x8:()=>l});var s=r(29242),n=r(82534),i=r(51850),a=r(34304),o=r(35522),u=r(78955);function l(t,e,r){r*=.5;const s=Math.sin(r);return t[0]=s*e[0],t[1]=s*e[1],t[2]=s*e[2],t[3]=Math.cos(r),t}function c(t,e){const r=2*Math.acos(e[3]),s=Math.sin(r/2);return s>(0,a.FD)()?(t[0]=e[0]/s,t[1]=e[1]/s,t[2]=e[2]/s):(t[0]=1,t[1]=0,t[2]=0),r}function p(t,e,r){const s=e[0],n=e[1],i=e[2],a=e[3],o=r[0],u=r[1],l=r[2],c=r[3];return t[0]=s*c+a*o+n*l-i*u,t[1]=n*c+a*u+i*o-s*l,t[2]=i*c+a*l+s*u-n*o,t[3]=a*c-s*o-n*u-i*l,t}function h(t,e,r,s){const n=e[0],i=e[1],o=e[2],u=e[3];let l,c,p,h,d,y=r[0],f=r[1],m=r[2],g=r[3];return c=n*y+i*f+o*m+u*g,c<0&&(c=-c,y=-y,f=-f,m=-m,g=-g),1-c>(0,a.FD)()?(l=Math.acos(c),p=Math.sin(l),h=Math.sin((1-s)*l)/p,d=Math.sin(s*l)/p):(h=1-s,d=s),t[0]=h*n+d*y,t[1]=h*i+d*f,t[2]=h*o+d*m,t[3]=h*u+d*g,t}function d(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function y(t,e){const r=e[0]+e[4]+e[8];let s;if(r>0)s=Math.sqrt(r+1),t[3]=.5*s,s=.5/s,t[0]=(e[5]-e[7])*s,t[1]=(e[6]-e[2])*s,t[2]=(e[1]-e[3])*s;else{let r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);const n=(r+1)%3,i=(r+2)%3;s=Math.sqrt(e[3*r+r]-e[3*n+n]-e[3*i+i]+1),t[r]=.5*s,s=.5/s,t[3]=(e[3*n+i]-e[3*i+n])*s,t[n]=(e[3*n+r]+e[3*r+n])*s,t[i]=(e[3*i+r]+e[3*r+i])*s}return t}function f(t,e,r,s){const n=.5*Math.PI/180;e*=n,r*=n,s*=n;const i=Math.sin(e),a=Math.cos(e),o=Math.sin(r),u=Math.cos(r),l=Math.sin(s),c=Math.cos(s);return t[0]=i*u*c-a*o*l,t[1]=a*o*c+i*u*l,t[2]=a*u*l-i*o*c,t[3]=a*u*c+i*o*l,t}const m=u.C,g=u.hZ,A=u.WQ,b=p,S=u.hs,v=u.Om,_=u.Cc,x=u.Bw,w=x,M=u.m3,q=M,F=u.S8,I=u.t2,R=u.aI,O=(0,i.vt)(),C=(0,i.fA)(1,0,0),T=(0,i.fA)(0,1,0),P=(0,n.vt)(),N=(0,n.vt)(),E=(0,s.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:A,calculateW:function(t,e){const r=e[0],s=e[1],n=e[2];return t[0]=r,t[1]=s,t[2]=n,t[3]=Math.sqrt(Math.abs(1-r*r-s*s-n*n)),t},conjugate:d,copy:m,dot:v,equals:R,exactEquals:I,fromEuler:f,fromMat3:y,getAxisAngle:c,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){const r=e[0],s=e[1],n=e[2],i=e[3],a=r*r+s*s+n*n+i*i,o=a?1/a:0;return t[0]=-r*o,t[1]=-s*o,t[2]=-n*o,t[3]=i*o,t},len:w,length:x,lerp:_,mul:b,multiply:p,normalize:F,random:function(t){const e=a.Ov,r=e(),s=e(),n=e(),i=Math.sqrt(1-r),o=Math.sqrt(r);return t[0]=i*Math.sin(2*Math.PI*s),t[1]=i*Math.cos(2*Math.PI*s),t[2]=o*Math.sin(2*Math.PI*n),t[3]=o*Math.cos(2*Math.PI*n),t},rotateX:function(t,e,r){r*=.5;const s=e[0],n=e[1],i=e[2],a=e[3],o=Math.sin(r),u=Math.cos(r);return t[0]=s*u+a*o,t[1]=n*u+i*o,t[2]=i*u-n*o,t[3]=a*u-s*o,t},rotateY:function(t,e,r){r*=.5;const s=e[0],n=e[1],i=e[2],a=e[3],o=Math.sin(r),u=Math.cos(r);return t[0]=s*u-i*o,t[1]=n*u+a*o,t[2]=i*u+s*o,t[3]=a*u-n*o,t},rotateZ:function(t,e,r){r*=.5;const s=e[0],n=e[1],i=e[2],a=e[3],o=Math.sin(r),u=Math.cos(r);return t[0]=s*u+n*o,t[1]=n*u-s*o,t[2]=i*u+a*o,t[3]=a*u-i*o,t},rotationTo:function(t,e,r){const s=(0,o.Om)(e,r);return s<-.999999?((0,o.$A)(O,C,e),(0,o.Il)(O)<1e-6&&(0,o.$A)(O,T,e),(0,o.S8)(O,O),l(t,O,Math.PI),t):s>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,o.$A)(O,e,r),t[0]=O[0],t[1]=O[1],t[2]=O[2],t[3]=1+s,F(t,t))},scale:S,set:g,setAxes:function(t,e,r,s){const n=E;return n[0]=r[0],n[3]=r[1],n[6]=r[2],n[1]=s[0],n[4]=s[1],n[7]=s[2],n[2]=-e[0],n[5]=-e[1],n[8]=-e[2],F(t,y(t,n))},setAxisAngle:l,slerp:h,sqlerp:function(t,e,r,s,n,i){return h(P,e,n,i),h(N,r,s,i),h(t,P,N,2*i*(1-i)),t},sqrLen:q,squaredLength:M,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},69397(t,e,r){r.d(e,{Qf:()=>u,Qh:()=>a,RS:()=>n,Ul:()=>d,i5:()=>h,lM:()=>i,qK:()=>c});var s=r(34275);const n=16;function i(t){if(!t)return 0;let e=c;for(const r in t)t.hasOwnProperty(r)&&(e+=o(t[r],!1));return e}function a(t){if(!t)return 0;if("number"==typeof t[0])return u(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return l(t,8);let r=p;for(let s=0;s<e;s++)r+=o(t[s]);return r}(t);let e=c;for(const r in t)t.hasOwnProperty(r)&&(e+=o(t[r]));return e}function o(t,e=!0){switch(typeof t){case"object":return e?a(t):c;case"string":return function(t){return 32+t.length}(t);case"number":return n;case"boolean":return 4;default:return 8}}function u(...t){return t.reduce((t,e)=>t+(e?(0,s.iu)(e)?e.byteLength+h:Array.isArray(e)?l(e,n):0:0),0)}function l(t,e){return p+t.length*e}const c=32,p=16,h=145,d=64},95696(t,e,r){r.d(e,{A:()=>l});var s,n=r(5482),i=r(69540),a=r(25482),o=r(91429),u=r(93223);let l=class extends((0,i.OU)(a.o)){static{s=this}constructor(t){super(t),this.type="georeferenced",this.origin=null}static{this.absolute=new s}};(0,n.Cg)([(0,u.e)({georeferenced:"georeferenced"},{readOnly:!0})],l.prototype,"type",void 0),(0,n.Cg)([(0,o.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],l.prototype,"origin",void 0),l=s=(0,n.Cg)([(0,o.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],l)},18251(t,e,r){r.r(e),r.d(e,{default:()=>l});var s=r(5482),n=r(69540),i=r(25482),a=r(91429),o=r(51850),u=r(93223);let l=class extends((0,n.OU)(i.o)){constructor(t){super(t),this.type="local",this.origin=(0,o.vt)()}};(0,s.Cg)([(0,u.e)({local:"local"},{readOnly:!0})],l.prototype,"type",void 0),(0,s.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"origin",void 0),l=(0,s.Cg)([(0,a.$K)("esri.geometry.support.MeshLocalVertexSpace")],l)},73836(t,e,r){r.d(e,{A:()=>d});var s=r(5482),n=r(69540),i=r(25482),a=r(91429),o=r(58083),u=r(9093),l=r(67026),c=r(82534),p=r(51850),h=r(24770);let d=class extends((0,n.OU)(i.o)){constructor(t){super(t),this.translation=(0,p.vt)(),this.rotationAxis=(0,p.ci)(h.up),this.rotationAngle=0,this.scale=(0,p.fA)(1,1,1)}get rotation(){return(0,h.i4)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,p.o8)((0,h.yo)(t)),this.rotationAngle=(0,h.g7)(t)}get localMatrix(){const t=(0,u.vt)();return(0,l.x8)(y,(0,h.yo)(this.rotation),(0,h.$I)(this.rotation)),(0,o.o1)(t,y,this.translation,this.scale),t}get localMatrixInverse(){return(0,o.B8)((0,u.vt)(),this.localMatrix)}equals(t){return this===t||null!=t&&(0,o.t2)(this.localMatrix,t.localMatrix)}};(0,s.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"translation",void 0),(0,s.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAxis",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAngle",void 0),(0,s.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"scale",void 0),(0,s.Cg)([(0,a.MZ)()],d.prototype,"rotation",null),(0,s.Cg)([(0,a.MZ)()],d.prototype,"localMatrix",null),(0,s.Cg)([(0,a.MZ)()],d.prototype,"localMatrixInverse",null),d=(0,s.Cg)([(0,a.$K)("esri.geometry.support.MeshTransform")],d);const y=(0,c.vt)()},24770(t,e,r){r.d(e,{$I:()=>m,AU:()=>d,g7:()=>f,i4:()=>c,ui:()=>p,up:()=>A,vt:()=>l,yo:()=>y});var s=r(34727),n=r(58083),i=r(67026),a=r(82534),o=r(35522),u=r(51850);function l(t=A){return[t[0],t[1],t[2],t[3]]}function c(t,e,r=l()){return(0,o.C)(r,t),r[3]=e,r}function p(t,e=l()){const r=(0,n.l)(b,t);return g(e,(0,s.KJ)((0,i.Xd)(e,r))),e}function h(t,e,r=l()){return(0,i.x8)(b,t,m(t)),(0,i.x8)(S,e,m(e)),(0,i.lw)(b,S,b),g(r,(0,s.KJ)((0,i.Xd)(r,b)))}function d(t,e,r,s=l()){return c(u.Cw,t,v),c(u.JP,e,_),c(u.Cb,r,x),h(v,_,v),h(v,x,s),s}function y(t){return t}function f(t){return t[3]}function m(t){return(0,s.kU)(t[3])}function g(t,e){return t[3]=e,t}const A=[0,0,1,0],b=(0,a.vt)(),S=(0,a.vt)(),v=(l(),l()),_=l(),x=l()},63579(t,e,r){r.d(e,{Bq:()=>u,Qp:()=>o,WN:()=>m,dK:()=>g,eN:()=>d,fH:()=>f,in:()=>y,yr:()=>l});var s=r(11254),n=r(4576),i=r(17676),a=r(20557);class o{constructor(t,e,r){this.assetName=t,this.assetMimeType=e,this.parts=r}equals(t){return this===t||this.assetName===t.assetName&&this.assetMimeType===t.assetMimeType&&(0,n.aI)(this.parts,t.parts,(t,e)=>t.equals(e))}isOnService(t){return this.parts.every(e=>e.isOnService(t))}makeHash(){let t="";for(const e of this.parts)t+=e.partHash;return t}async toBlob(t){const{parts:e}=this;if(1===e.length)return e[0].toBlob(t);const r=await Promise.all(e.map(e=>e.toBlob(t)));return(0,i.Te)(t),new Blob(r)}}class u{constructor(t,e){this.partUrl=t,this.partHash=e}equals(t){return this===t||this.partUrl===t.partUrl&&this.partHash===t.partHash}isOnService(t){return this.partUrl.startsWith(`${t.path}/assets/`)}async toBlob(t){const{data:e}=await(0,s.A)(this.partUrl,{responseType:"blob"});return(0,i.Te)(t),e}}function l(t){return function(t){switch(t?.type){case"client":return Array.isArray(t.files)?t.files.some(h):h(t.files);case"service":return t.assets.some(h);case"loadable":return!0;default:return!1}}(t?.source)}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,p=/\.(gltf|glb)/i;function h(t){if(t instanceof File){const{type:e,name:r}=t;return c.test(e)||p.test(r)}return c.test(t.assetMimeType)||p.test(t.assetName)}function d(t,e){if(!t)return!1;const{source:r}=t;return function(t,e){return"service"===t.type&&t.assets.every(t=>t.isOnService(e))}(r,e)}function y(t,e){if(t===e)return!0;const{source:r}=t,{source:s}=e;if(r===s)return!0;if("service"===r.type&&"service"===s.type){if(r.assets.length!==s.assets.length)return!1;const t=(t,e)=>t.assetName<e.assetName?-1:t.assetName>e.assetName?1:0,e=[...r.assets].sort(t),n=[...s.assets].sort(t);for(let t=0;t<e.length;++t)if(!e[t].equals(n[t]))return!1;return!0}return!1}function f(t,e){return t instanceof File?(0,a.rq)(t,e):(0,a.z$)(t.assetMimeType,t.assetName,e)}function m(t){switch(t.type){case"client":return Array.isArray(t.files)?t.files:[t.files];case"service":return t.assets;case"loadable":return}}function g(t){return!!t.original}},27615(t,e,r){r.d(e,{CK:()=>u,Hq:()=>o,MW:()=>l,TE:()=>c,yJ:()=>p});var s=r(35522),n=r(86738),i=r(95696),a=r(18251);function o(t){return null!=t.origin}function u(t){return o(t.vertexSpace)}function l(t,e){if(!o(t))return null;const[r,s,i]=t.origin;return new n.A({x:r,y:s,z:i,spatialReference:e})}function c(t,e){const{x:r,y:s,z:n,spatialReference:o}=t,u=[r,s,n??0];return"local"===(e?.vertexSpace??function(t){return t.isGeographic||t.isWebMercator?"local":"georeferenced"}(o))?new a.default({origin:u}):new i.A({origin:u})}function p(t,e){return t.type===e.type&&(t.origin===e.origin||null!=t.origin&&null!=e.origin&&(0,s.t2)(t.origin,e.origin))}},17136(t,e,r){r.d(e,{Y_:()=>I,O7:()=>q,el:()=>M});var s=r(92602),n=r(69052),i=r(49186),a=r(53966),o=r(39829),u=r(82799),l=r(16930),c=r(80754),p=r(21325),h=r(28735),d=r(11254),y=r(60408),f=r(65864),m=r(2272),g=r(84952),A=r(92300);const b=()=>a.A.getLogger("esri.geometry.support.normalizeUtils");function S(t){return"polygon"===t[0].type}function v(t){return"polyline"===t[0].type}function _(t,e,r){if(e){const e=function(t,e){if(!(t instanceof u.A||t instanceof o.A)){const t="straightLineDensify: the input geometry is neither polyline nor polygon";throw b().error(t),new i.A("internal:geometry",t)}const r=(0,c.r8)(t),s=[];for(const t of r){const r=[];s.push(r),r.push([t[0][0],t[0][1]]);for(let s=0;s<t.length-1;s++){const n=t[s][0],i=t[s][1],a=t[s+1][0],o=t[s+1][1],u=Math.sqrt((a-n)*(a-n)+(o-i)*(o-i)),l=(o-i)/u,c=(a-n)/u,p=u/e;if(p>1){for(let t=1;t<=p-1;t++){const s=t*e,a=c*s+n,o=l*s+i;r.push([a,o])}const t=(u+Math.floor(p-1)*e)/2,s=c*t+n,a=l*t+i;r.push([s,a])}r.push([a,o])}}return function(t){return"polygon"===t.type}(t)?new o.A({rings:s,spatialReference:t.spatialReference}):new u.A({paths:s,spatialReference:t.spatialReference})}(t,1e6);t=(0,h.ci)(e,!0)}return r&&(t=(0,c.kS)(t,r)),t}function x(t,e,r){if(Array.isArray(t)){const s=t[0];if(s>e){const r=(0,c.kd)(s,e);t[0]=s+r*(-2*e)}else if(s<r){const e=(0,c.kd)(s,r);t[0]=s+e*(-2*r)}}else{const s=t.x;if(s>e){const r=(0,c.kd)(s,e);t=t.clone().offset(r*(-2*e),0)}else if(s<r){const e=(0,c.kd)(s,r);t=t.clone().offset(e*(-2*r),0)}}return t}function w(t,e){let r=-1;for(let s=0;s<e.cutIndexes.length;s++){const n=e.cutIndexes[s],i=e.geometries[s],a=(0,c.r8)(i);for(let t=0;t<a.length;t++){const e=a[t];e.some(r=>{if(r[0]<180)return!0;{let r=0;for(let t=0;t<e.length;t++){const s=e[t][0];r=s>r?s:r}r=Number(r.toFixed(9));const s=-360*(0,c.kd)(r,180);for(let r=0;r<e.length;r++){const e=i.getPoint(t,r);i.setPoint(t,r,e.clone().offset(s,0))}return!0}})}if(n===r){if(S(t))for(const e of(0,c.r8)(i))t[n]=t[n].addRing(e);else if(v(t))for(const e of(0,c.r8)(i))t[n]=t[n].addPath(e)}else r=n,t[n]=i}return t}async function M(t,e,r){if(!Array.isArray(t))return M([t],e);e&&"string"!=typeof e&&b().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof e?e:e?.url??s.A.geometryServiceUrl;let i,a,l,S,v,q,F,I,R=0;const O=[],C=[];for(const e of t)if(null!=e)if(i||(i=e.spatialReference,a=(0,p.Vp)(i),l=i.isWebMercator,q=l?102100:4326,S=c.j7[q].maxX,v=c.j7[q].minX,F=c.j7[q].plus180Line,I=c.j7[q].minus180Line),a)if("mesh"===e.type)C.push(e);else if("point"===e.type)C.push(x(e.clone(),S,v));else if("multipoint"===e.type){const t=e.clone();t.points=t.points.map(t=>x(t,S,v)),C.push(t)}else if("extent"===e.type){const t=e.clone()._normalize(!1,!1,a);C.push(t.rings?new o.A(t):t)}else if(e.extent){const t=e.extent,r=(0,c.kd)(t.xmin,v)*(2*S);let s=0===r?e.clone():(0,c.kS)(e.clone(),r);t.offset(r,0);let{xmin:n,xmax:i}=t;n=Number(n.toFixed(9)),i=Number(i.toFixed(9)),t.intersects(F)&&i!==S?(R=i>R?i:R,s=_(s,l),O.push(s),C.push("cut")):t.intersects(I)&&n!==v?(R=i*(2*S)>R?i*(2*S):R,s=_(s,l,360),O.push(s),C.push("cut")):C.push(s)}else C.push(e.clone());else C.push(e);else C.push(e);let T=(0,c.kd)(R,S),P=-90;const N=T,E=new u.A;for(;T>0;){const t=360*T-180;E.addPath([[t,P],[t,-1*P]]),P*=-1,T--}if(O.length>0&&N>0){const e=w(O,await async function(t,e,r,s){const n=(0,m.Dl)(t),i=e[0].spatialReference,a={...s,responseType:"json",query:{...n.query,f:"json",sr:(0,p.YX)(i),target:JSON.stringify({geometryType:(0,y.$B)(e[0]),geometries:e}),cutter:JSON.stringify(r)}},o=await(0,d.A)(n.path+"/cut",a),{cutIndexes:u,geometries:l=[]}=o.data;return{cutIndexes:u,geometries:l.map(t=>{const e=(0,f.rS)(t);return e.spatialReference=i,e})}}(n,O,E,r)),s=[],i=[];for(let r=0;r<C.length;r++){const n=C[r];if("cut"!==n)i.push(n);else{const n=e.shift(),a=t[r];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&n.rings.length>=a.rings.length?(s.push(n),i.push("simplify")):i.push(l?(0,h.Gh)(n):n)}}if(!s.length)return i;const a=await async function(t,e,r){const s="string"==typeof t?(0,g.An)(t):t,n=e[0].spatialReference,i=(0,y.$B)(e[0]),a={...r,query:{...s.query,f:"json",sr:(0,p.YX)(n),geometries:JSON.stringify((0,A.X)(e))}},{data:o}=await(0,d.A)(s.path+"/simplify",a);return(0,A.V)(o.geometries,i,n)}(n,s,r),o=[];for(let t=0;t<i.length;t++){const e=i[t];"simplify"!==e?o.push(e):o.push(l?(0,h.Gh)(a.shift()):a.shift())}return o}const D=[];for(let t=0;t<C.length;t++){const e=C[t];if("cut"!==e)D.push(e);else{const t=O.shift();D.push(!0===l?(0,h.Gh)(t):t)}}return D}function q(t,e,r){const s=(0,p.Vp)(r);if(null==s)return t;const[n,i]=s.valid,a=2*i;let o=0,u=0;e>i?o=Math.ceil(Math.abs(e-i)/a):e<n&&(o=-Math.ceil(Math.abs(e-n)/a)),t>i?u=Math.ceil(Math.abs(t-i)/a):t<n&&(u=-Math.ceil(Math.abs(t-n)/a));let l=t+(o-u)*a;const c=l-e;return c>i?l-=a:c<n&&(l+=a),l}function F(t){const e=(0,p.Vp)(t);if(null==e)return null;const[r,s]=e.valid;return new n.hr(r,s)}const I=F(l.A.WGS84);F(l.A.WebMercator)},80754(t,e,r){r.d(e,{j7:()=>a,kS:()=>u,kd:()=>o,r8:()=>l});var s=r(82799),n=r(16930),i=r(60408);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function o(t,e){return Math.ceil((t-e)/(2*e))}function u(t,e){const r=l(t);for(const t of r)for(const r of t)r[0]+=e;return t}function l(t){return(0,i.Bi)(t)?t.rings:t.paths}},99352(t,e,r){r.d(e,{F:()=>s,P:()=>n});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:{envelope:!0,centroid:!0,convexHull:!0},supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},n={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}},65515(t,e,r){r.r(e),r.d(e,{default:()=>Y});var s=r(5482),n=r(92602),i=r(11254),a=r(4576),o=r(49186),u=r(44208),l=r(66552),c=r(92474),p=r(53966),h=r(93637),d=r(17676),y=r(36708),f=r(84952),m=r(13069),g=r(91429),A=r(5443),b=r(16930),S=r(95696),v=r(27615),_=r(63579),x=r(52106),w=r(86211);function M(t){return"object"==typeof t&&null!=t&&"objectId"in t&&!!t.objectId}function q(t){return"object"==typeof t&&null!=t&&"globalId"in t&&!!t.globalId}function F(t){return t.every(q)}var I=r(91218),R=r(65864),O=r(73836),C=r(21325);async function T(t,e,r){const{geometry:s}=e,n={...e.attributes};if(null!=r&&"mesh"===s?.type){const{transformFieldRoles:e}=r,{origin:i,spatialReference:a,vertexSpace:o}=s,u=s.transform??new O.A,l="local"===o.type,c=t.spatialReference,p=c.isGeographic,h=(0,C.aI)(c,a),d=(0,I.isEqualBaseGCS)(a,c)&&(0,I.canProjectWithoutEngine)(a,c);if(!(l&&p&&d||!l&&!p&&h))return null;const y=(0,I.projectWithoutEngine)(i,a,c);if(null==y)return null;if(n[e.originX]=y.x,n[e.originY]=y.y,n[e.originZ]=y.z??0,null!=u){const{translation:t,scale:r,rotation:s}=u,i=l?1:(0,w.KX)(a)/(0,w.KX)(c);n[e.translationX]=t[0]*i,n[e.translationY]=t[2]*i,n[e.translationZ]=-t[1]*i,n[e.scaleX]=r[0],n[e.scaleY]=r[2],n[e.scaleZ]=r[1],n[e.rotationX]=s[0],n[e.rotationY]=s[2],n[e.rotationZ]=-s[1],n[e.rotationDeg]=s[3]}return{attributes:n}}return null==s?{attributes:n}:"mesh"===s.type||"extent"===s.type?null:{geometry:s.toJSON(),attributes:n}}async function P(t,e){const r=await Promise.all((e.addAttachments??[]).map(e=>N(t,e))),s=await Promise.all((e.updateAttachments??[]).map(e=>N(t,e))),n=e.deleteAttachments??[];return r.length||s.length||n.length?{adds:r,updates:s,deletes:[...n]}:null}async function N(t,e){const{feature:r,attachment:s}=e,{globalId:n,name:i,contentType:a,data:o,uploadId:u}=s,l={globalId:n};if(r&&("attributes"in r?l.parentGlobalId=r.attributes?.[t.globalIdField]:r.globalId&&(l.parentGlobalId=r.globalId)),u)l.uploadId=u;else if(o){const t=await(0,f._0)(o);t&&(l.contentType=t.mediaType,l.data=t.data),o instanceof File&&(l.name=o.name)}return i&&(l.name=i),a&&(l.contentType=a),l}function E(t,e,r){if(!e||0===e.length)return[];if(r&&F(e))return e.map(t=>t.globalId);if(function(t){return t.every(M)}(e))return e.map(t=>t.objectId);const s=r?t.globalIdField:t.objectIdField;return s?e.map(t=>t.getAttribute(s)):[]}function D(t){const e=!0===t.success?null:t.error||{code:void 0,description:"Feature edit failed"};return{objectId:t.objectId,globalId:t.globalId,error:e?new o.A("feature-layer-source:edit-failure",e.description,{code:e.code}):null}}function Q(t,e){return new x.A({attributes:t.attributes,geometry:(0,R.rS)({...t.geometry,spatialReference:e})})}function j(t,e){return{adds:t?.adds?.map(t=>Q(t,e))||[],updates:t?.updates?.map(t=>({original:Q(t[0],e),current:Q(t[1],e)}))||[],deletes:t?.deletes?.map(t=>Q(t,e))||[],spatialReference:e}}var V=r(64714),J=r(64314),Z=r(60694),U=r(15426),k=r(20557),G=r(99199),X=r(96520),B=r(61956),z=r(79677),L=r(20816);const $=new l.J({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),W=new l.J({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let Y=class extends c.x_{constructor(t){super(t),this.type="feature-layer",this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.refresh=(0,d.sg)(async()=>{await this.load();const t=this.sourceJSON.editingInfo?.lastEditDate;if(null==t)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const e=t!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:e,updates:e?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}),this._ongoingAssetUploads=new Map}load(t){const e=this.layer.sourceJSON,r=this._fetchService(e,{...t}).then(()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,t)).then(()=>this._ensureLatestMetadata(t));return this.addResolvingPromise(r),Promise.resolve(this)}initialize(){this.addHandles([(0,y.wB)(()=>{const t=this.layer;return t&&"lastEditsEventDate"in t?t.lastEditsEventDate:null},t=>this._handleLastEditsEventChange(t))])}destroy(){this._removeEditInterceptor()}get queryTask(){const{capabilities:t,parsedUrl:e,gdbVersion:r,spatialReference:s,fieldsIndex:n,uniqueIdFields:i}=this.layer,a="infoFor3D"in this.layer?this.layer.infoFor3D:null,o="dynamicDataSource"in this.layer?this.layer.dynamicDataSource:null,l=(0,u.A)("featurelayer-pbf")&&t?.query.supportsFormatPBF&&null==a,c=l&&t?.query.supportsFormatPBFWithCurves,p=t?.operations?.supportsQueryAttachments??!1,h=t?.query?.relativeTimeBinWindow??0,d=e.path;return new J.A({dynamicDataSource:o,fieldsIndex:n,gdbVersion:r,infoFor3D:a,pbfSupported:l,pbfSupportedWithCurves:c,queryAttachmentsSupported:p,relativeTimeBinWindow:h,sourceSpatialReference:s,uniqueIdFields:i,url:d})}async addAttachment(t,e){await this.load();const{layer:r}=this;await(0,U.VA)(r,"editing");const s=t.attributes[r.objectIdField],n=r.parsedUrl.path+"/"+s+"/addAttachment",a=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(e,a.query);try{return D((await(0,i.A)(n,{body:o})).data.addAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(s,t)}}async updateAttachment(t,e,r){await this.load();const{layer:s}=this;await(0,U.VA)(s,"editing");const n=t.attributes[s.objectIdField],a=s.parsedUrl.path+"/"+n+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:e}}),u=this._getFormDataForAttachment(r,o.query);try{return D((await(0,i.A)(a,{body:u})).data.updateAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(n,t)}}async applyEdits(t,e){await this.load();const{layer:r}=this;await(0,U.VA)(r,"editing");const s="infoFor3D"in r?r.infoFor3D:null,n=null!=s,u=n||(e?.globalIdUsed??!1),l=n?await this._uploadMeshesAndGetAssetMapEditsJSON(t):null,c=t.addFeatures?.map(t=>T(this.layer,t,s))??[],p=(await Promise.all(c)).filter(a.Ru),h=t.updateFeatures?.map(t=>T(this.layer,t,s))??[],d=(await Promise.all(h)).filter(a.Ru),y=E(this.layer,t.deleteFeatures,u);(0,X.u)(p,d,r.spatialReference);const f=await P(this.layer,t),m=r.capabilities.editing.supportsAsyncApplyEdits&&n,g=e?.gdbVersion||r.gdbVersion,A={gdbVersion:g,rollbackOnFailure:e?.rollbackOnFailureEnabled,useGlobalIds:u,returnEditMoment:e?.returnEditMoment,trueCurveClient:e?.editsRespectTrueCurves,usePreviousEditMoment:e?.usePreviousEditMoment,async:m};await(0,L.ZJ)(this.layer.url,g,!0);const b=(0,L.w5)(this.layer.url,g||null);if(await(0,L.We)(r.url,g,r.historicMoment))throw new o.A("feature-layer-source:historic-version","Editing a historic version is not allowed");e?.returnServiceEditsOption?(A.edits=JSON.stringify([{id:r.layerId,adds:p.length?p:null,updates:d.length?d:null,deletes:y.length?y:null,attachments:f,assetMaps:l}]),A.returnServiceEditsOption=$.toJSON(e?.returnServiceEditsOption),A.returnServiceEditsInSourceSR=e?.returnServiceEditsInSourceSR):(A.adds=p.length?JSON.stringify(p):null,A.updates=d.length?JSON.stringify(d):null,A.deletes=y.length?u?JSON.stringify(y):y.join(","):null,A.attachments=f&&JSON.stringify(f),A.assetMaps=null!=l?JSON.stringify(l):void 0);const S=this._getLayerRequestOptions({method:"post",query:A});b&&(S.authMode="immediate",S.query.returnEditMoment=!0,S.query.sessionId=L.TA);const v=e?.returnServiceEditsOption?r.url:r.parsedUrl.path;let _;try{_=m?await this._asyncApplyEdits(v+"/applyEdits",S):await(0,i.A)(v+"/applyEdits",S)}catch(t){if(!function(t){const e=t.details.raw,r=+e.code,s=+e.extendedCode;return 500===r&&(-2147217144===s||-2147467261===s)}(t))throw t;S.authMode="immediate",_=m?await this._asyncApplyEdits(v+"/applyEdits",S):await(0,i.A)(v+"/applyEdits",S)}return this._createEditsResult(_)}async deleteAttachments(t,e){await this.load();const{layer:r}=this;await(0,U.VA)(r,"editing");const s=t.attributes[r.objectIdField],n=r.parsedUrl.path+"/"+s+"/deleteAttachments";try{return(await(0,i.A)(n,this._getLayerRequestOptions({query:{attachmentIds:e.join(",")},method:"post"}))).data.deleteAttachmentResults.map(D)}catch(t){throw this._createAttachmentErrorResult(s,t)}}fetchRecomputedExtents(t={}){const e=t.signal;return this.load({signal:e}).then(async()=>{const e=this._getLayerRequestOptions({...t,query:{returnUpdates:!0}}),{layerId:r,url:s}=this.layer,{data:n}=await(0,i.A)(`${s}/${r}`,e),{id:a,extent:o,fullExtent:u,timeExtent:l}=n,c=o||u;return{id:a,fullExtent:c&&A.A.fromJSON(c),timeExtent:l&&z.A.fromJSON({start:l[0],end:l[1]})}})}async queryAttachments(t,e={}){await this.load();const r=this._getLayerRequestOptions(e);return this.queryTask.executeAttachmentQuery(t,r)}async queryFeatures(t,e){await this.load();const r=await this.queryTask.execute(t,{...e,query:this._createRequestQueryOptions(e)});if(t.outStatistics?.length&&r.features.length){const e=new Map;if(r.features.forEach(r=>{const s=r.attributes;t.outStatistics?.forEach(({outStatisticFieldName:t})=>{if(t){const r=t.toLowerCase();r&&r in s&&t!==r&&(s[t]=s[r],delete s[r],e.set(r,t))}})}),null!=r.fields)for(const t of r.fields){const r=e.get(t.name.toLowerCase());null!=r&&(t.name=r)}}return r}async queryFeaturesJSON(t,e){return await this.load(),this.queryTask.executeJSON(t,{...e,query:this._createRequestQueryOptions(e)})}async queryObjectIds(t,e){return await this.load(),this.queryTask.executeForIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryFeatureCount(t,e){return await this.load(),this.queryTask.executeForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryExtent(t,e){return await this.load(),this.queryTask.executeForExtent(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeatures(t,e){return await this.load(),this.queryTask.executeRelationshipQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeaturesCount(t,e){return await this.load(),this.queryTask.executeRelationshipQueryForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryPivot(t,e){return await this.load(),this.queryTask.executePivotQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopFeatures(t,e){return await this.load(),this.queryTask.executeTopFeaturesQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryAttributeBins(t,e){return await this.load(),this.queryTask.executeAttributeBinsQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopObjectIds(t,e){return await this.load(),this.queryTask.executeForTopIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopExtents(t,e){return await this.load(),this.queryTask.executeForTopExtents(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopCount(t,e){return await this.load(),this.queryTask.executeForTopCount(t,{...e,query:this._createRequestQueryOptions(e)})}async fetchPublishingStatus(){if(!(0,Z.Wo)(this.layer.url))return"unavailable";const t=(0,f.fj)(this.layer.url,"status"),e=await(0,i.A)(t,{query:{f:"json"}});return W.fromJSON(e.data.status)}async uploadAssets(t,e){const{uploadAssets:s}=await r.e(1384).then(r.bind(r,31384));return s(t,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},e)}_handleLastEditsEventChange(t){const e=this.layer;if(null==t||!("capabilities"in e)||!("effectiveCapabilities"in e))return;if(e.capabilities?.operations?.supportsEditing||!e.effectiveCapabilities?.operations?.supportsEditing)return;const r=e.url;null!=r&&("layerId"in e&&(0,f.fj)(r,e.layerId.toString()),this._getOrCreateEditInterceptor(r).before=e=>{const r=e.requestOptions.method??"auto";if("auto"===r||"head"===r){const r=e.requestOptions.query??{};r._ts=t.getTime(),e.requestOptions.query=r}})}_getOrCreateEditInterceptor(t){return null==this._editInterceptor&&(this._editInterceptor={urls:t},n.A.request.internalInterceptors.push(this._editInterceptor)),this._editInterceptor}_removeEditInterceptor(){null!=this._editInterceptor&&((0,a.TF)(n.A.request.internalInterceptors,this._editInterceptor),this._editInterceptor=null)}async _asyncApplyEdits(t,e){const r=(await(0,i.A)(t,e)).data.statusUrl;for(;;){const t=(await(0,i.A)(r,{query:{f:"json"},responseType:"json"})).data;switch(t.status){case"Completed":return(0,i.A)(t.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,d.Pl)(H)}}_createRequestQueryOptions(t){const e={...this.layer.customParameters,token:this.layer.apiKey,...t?.query};return this.layer.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),e}async _fetchService(t,e){if(!t){const r={};(0,u.A)("featurelayer-advanced-symbols")&&(r.returnAdvancedSymbols=!0),e?.cacheBust&&(r._ts=Date.now());const{data:s}=await(0,i.A)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:r,signal:e?.signal}));t=s}this.layer.applyPreferredHost(t),this.sourceJSON=await this._patchServiceJSON(t,e?.signal);const r=t.type;if(!this.supportedSourceTypes.has(r))throw new o.A("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}async _patchServiceJSON(t,e){if("Table"!==t.type&&t.geometryType&&!t?.drawingInfo?.renderer&&!t.defaultSymbol){const e=(0,V.F0)(t.geometryType).renderer;(0,h.sM)("drawingInfo.renderer",e,t)}if("esriGeometryMultiPatch"===t.geometryType&&t.infoFor3D&&(t.geometryType="mesh"),null==t.extent)try{const{data:r}=await(0,i.A)(this.layer.url,this._getLayerRequestOptions({signal:e}));r.spatialReference&&(t.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:r.spatialReference})}catch(t){(0,d.QP)(t)}return t}async _ensureLatestMetadata(t){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...t,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(t){const{addAssetFeatures:e}=t;if(!e?.length)return null;if(await this._areAllAssetsAlreadyMapped(e))return null;const s=t.addFeatures.filter(t=>t.geometry);if(e.length!==s.length+t.updateFeatures.length)throw new o.A("feature-layer-source:unsupported-mesh-edits","Mixing attribute only edits with mesh geometry edits is not currently supported");const n=new Array,i=new Map;for(const t of e){const{geometry:e}=t,{vertexSpace:s}=e;if((0,v.Hq)(s))n.push(e);else{const s=e.origin,{convertMeshVertexSpace:a}=await Promise.all([r.e(6860),r.e(4496)]).then(r.bind(r,28846)),o=await a(e,new S.A({origin:[s.x,s.y,s.z??0]}));i.set(o,e),t.geometry=o,n.push(o)}}await this.uploadAssets(n);for(const[t,e]of i)e.addExternalSources(t.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(e),updates:[],deletes:[]}}_getAssetMapEditsJSON(t){const e=new Array,r=this.layer.globalIdField,s=this.layer.parsedUrl;for(const n of t){const t=n.geometry,{metadata:i}=t,a=i.getExternalSourcesOnService(s),o=n.getAttribute(r);if(0===a.length){p.A.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:u}=a.find(_.dK)??a[0];for(const t of u.assets)1===t.parts.length?e.push({globalId:(0,m.yS)(),parentGlobalId:o,assetName:t.assetName,assetHash:t.parts[0].partHash,flags:[]}):p.A.getLogger(this).error(`Skipping asset ${t.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return e}_createEditsResult(t){const e=t.data,{layerId:r}=this.layer,s=[];let n=null;if(Array.isArray(e))for(const t of e)s.push({id:t.id,editedFeatures:t.editedFeatures}),t.id===r&&(n={addResults:t.addResults??[],updateResults:t.updateResults??[],deleteResults:t.deleteResults??[],attachments:t.attachments,editMoment:t.editMoment});else n=e;const i=function(t){const e=t?.assetMaps;if(e){for(const t of e.addResults)t.success||p.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`);for(const t of e.updateResults)t.success||p.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`)}const r=t?.attachments,s={addFeatureResults:t?.addResults?.map(D)??[],updateFeatureResults:t?.updateResults?.map(D)??[],deleteFeatureResults:t?.deleteResults?.map(D)??[],addAttachmentResults:r?.addResults?r.addResults.map(D):[],updateAttachmentResults:r?.updateResults?r.updateResults.map(D):[],deleteAttachmentResults:r?.deleteResults?r.deleteResults.map(D):[]};return t?.editMoment&&(s.editMoment=t.editMoment),s}(n);if(s.length>0){i.editedFeatureResults=[];for(const t of s){const{editedFeatures:e}=t,r=e?.spatialReference?new b.A(e.spatialReference):null;i.editedFeatureResults.push({layerId:t.id,editedFeatures:j(e,r)})}}return i}_createAttachmentErrorResult(t,e){const r=e.details.messages?.[0]||e.message,s=e.details.httpStatus||e.details.messageCode;return{objectId:t,globalId:null,error:new o.A("feature-layer-source:attachment-failure",r,{code:s})}}_getFormDataForAttachment(t,e){const r=t instanceof FormData?t:t&&t.elements?new FormData(t):null;if(r)for(const t in e){const s=e[t];null!=s&&(r.set?r.set(t,s):r.append(t,s))}return r}_getLayerRequestOptions(t={}){const{layer:e,layer:{parsedUrl:r,gdbVersion:s}}=this;return{...t,query:{gdbVersion:s,layer:"dynamicDataSource"in e&&e.dynamicDataSource?JSON.stringify({source:e.dynamicDataSource}):void 0,...r.query,f:"json",...this._createRequestQueryOptions(t)},responseType:"json"}}async _areAllAssetsAlreadyMapped(t){const{layer:e}=this,{globalIdField:r,parsedUrl:s}=e,n="infoFor3D"in e?e.infoFor3D:null;if(null==n||null==r)return!1;const i=(0,k.JZ)(n);if(null==i)return!1;const o=(0,f.fj)(s.path,`../${i.id}`),u=new Array;for(const e of t){if(!(e.geometry.metadata.getExternalSourcesOnService(s).length>0))return!1;u.push(e)}const l=u.map(t=>t.getAttribute(r)).filter(a.Ru);if(0===l.length)return!1;const{assetMapFieldRoles:{parentGlobalId:c,assetHash:p}}=n,h=new B.A({where:`${c} IN (${l.map(t=>`'${t}'`)})`,outFields:[p,c],returnGeometry:!1}),d=await(0,G.s)(o,h),{features:y}=d;return 0!==y.length&&!u.some(t=>{const e=t.getAttribute(r);if(!e)return!0;const{metadata:n}=t.geometry,i=y.filter(t=>t.getAttribute(c)===e);if(0===i.length)return!0;const a=i.map(t=>t.getAttribute(p));return n.getExternalSourcesOnService(s).flatMap(({source:t})=>t.assets.flatMap(t=>t.parts.map(t=>t.partHash))).some(t=>a.every(e=>t!==e))})}};(0,s.Cg)([(0,g.MZ)()],Y.prototype,"type",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],Y.prototype,"layer",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],Y.prototype,"supportedSourceTypes",void 0),(0,s.Cg)([(0,g.MZ)({readOnly:!0})],Y.prototype,"queryTask",null),Y=(0,s.Cg)([(0,g.$K)("esri.layers.graphics.sources.FeatureLayerSource")],Y);const H=1e3},64314(t,e,r){r.d(e,{A:()=>M});var s=r(5482),n=r(69622),i=r(49186),a=r(44208),o=r(17676),u=r(84952),l=r(91429),c=r(21325),p=r(20557),h=r(2272),d=r(65615),y=r(20615),f=r(74910),m=r(78286),g=r(99199),A=r(62815),b=r(63746);class S{constructor(t){this._options=t,this.featureSet={features:[]},this.parseOnly=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._finishVertex=S._finishVertexNonPoint,this._attributesClass=null,this._previousX=0,this._previousY=0,this._point=null,this._lengths=null,this._vertex=[],this._part=null,this._parts=null,this._i=0}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(t){"string"==typeof t&&(this.featureSet.objectIdFieldName=t)}finish(){this._options.applyTransform&&(this.featureSet.transform=null);const{spatialReference:t,features:e}=this.featureSet;if(t)for(const{geometry:r}of e)r&&(r.spatialReference=t)}feature(){this._attributesClass??=(0,b._7)(this.featureSet.fields?.map(t=>t.name)??[]),this.featureSet.features.push({attributes:new this._attributesClass}),this._options.applyTransform&&this._setVertexTransformer()}centroid([t,e]){this.featureSet.features.at(-1).centroid={x:t,y:e}}geometry(t,e,r){this._previousX=this._previousY=0,this._lengths=r;let s,{hasZ:n,hasM:i}=this.featureSet;switch(n??=!1,i??=!1,this._i=0,this._vertex=[0,0],n&&this._vertex.push(0),i&&this._vertex.push(0),this._finishVertex=S._finishVertexNonPoint,e){case"esriGeometryPoint":this._point={x:0,y:0},s=this._point,this._finishVertex=n?i?S._finishVertexPointXYZM:S._finishVertexPointXYZ:i?S._finishVertexPointXYM:S._finishVertexPointXY;break;case"esriGeometryMultipoint":s={points:[],hasZ:n,hasM:i},this._part=s.points,this._parts=[];break;case"esriGeometryPolyline":s={paths:[],hasZ:n,hasM:i},this._parts=s.paths,this._part=[];break;case"esriGeometryPolygon":s={rings:[],hasZ:n,hasM:i},this._parts=s.rings,this._part=[]}1===t?(this.featureSet.queryGeometry=s,this.featureSet.queryGeometryType=e,this._options.applyTransform||this._setVertexTransformer()):this.featureSet.features.at(-1).geometry=s}coord(t){const e=this._vertex;e[this._i++]=t,this._i<e.length||(this._i=0,this._transformInPlace&&(e[0]+=this._previousX,e[1]+=this._previousY,[this._previousX,this._previousY]=e,this._transformInPlace(e)),this._finishVertex(this))}curvedGeometry(t,e,r,s){let n,{hasZ:i,hasM:a}=this.featureSet;switch(i??=!1,a??=!1,t){case"esriGeometryPoint":case"esriGeometryMultipoint":throw new Error(`Curved ${t} does not make sense`);case"esriGeometryPolyline":n={paths:[],curvePaths:[],hasZ:i,hasM:a},this._parts=n.curvePaths,this._part=[];break;case"esriGeometryPolygon":n={rings:[],curveRings:[],hasZ:i,hasM:a},this._parts=n.curveRings,this._part=[]}this.featureSet.features.at(-1).geometry=n}startCurvedPart(t){this._part.push(this._transform(t))}finishCurvedPart(t){this._parts.push(this._part),this._part=[]}lineSegment(t,e){this._part.push(this._transform(e))}bezierSegment(t,e,r,s){this._part.push({b:[this._transform(e),this._transformXY(r),this._transformXY(s)]})}circularArcSegment(t,e,r){this._part.push({c:[this._transform(e),this._transformXY(r)]})}ellipticArcSegment(t,e,r,s,n,i,a,o){this._part.push({a:[this._transform(e),this._transformXY(r),s,n,i,a,o]})}static _finishVertexPointXY({_point:t,_vertex:e}){[t.x,t.y]=e}static _finishVertexPointXYZ({_point:t,_vertex:e}){[t.x,t.y,t.z]=e}static _finishVertexPointXYM({_point:t,_vertex:e}){[t.x,t.y,t.m]=e}static _finishVertexPointXYZM({_point:t,_vertex:e}){[t.x,t.y,t.z,t.m]=e}static _finishVertexNonPoint(t){const{_part:e,_parts:r,_lengths:s,_vertex:n}=t;e.push([...n]),e.length<s[r.length]||(t._previousX=t._previousY=0,t._part=[],r.push(e))}_setVertexTransformer(){const{sourceSpatialReference:t}=this._options,{spatialReference:e,hasZ:r,transform:s}=this.featureSet,n=r?(0,A.d)(t,e):1;this._transformInPlace??=(0,b.Mv)(this.featureSet,n),this._transformInPlaceXY??=(0,b.Mv)({transform:s})}_transform(t){const e=[...t];return this._transformInPlace?.(e),e}_transformXY(t){const e=[t[0],t[1]];return this._transformInPlaceXY?.(e),e}}var v=r(80893),_=r(22671),x=r(61956);async function w(t,e,r,s){const n=(0,h.Dl)(t),i={...r},a=x.A.from(e),o=!a.quantizationParameters;return await(0,v.IJ)(n,a,new S({sourceSpatialReference:a.sourceSpatialReference,applyTransform:o}),i,s)}let M=class extends n.A{constructor(t){super(t),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.pbfSupportedWithCurves=!1,this.queryAttachmentsSupported=!1,this.relativeTimeBinWindow=0,this.sourceSpatialReference=null,this.uniqueIdFields=null,this.url=null}get parsedUrl(){return(0,u.An)(this.url)}async execute(t,e){const r=await this.executeJSON(t,e);return this.featureSetFromJSON(t,r,e)}async executeJSON(t,e){const r=this._normalizeQuery(t),s=null!=t.outStatistics?.[0],n=(0,a.A)("featurelayer-pbf-statistics");let i;if(this.pbfSupported&&(!s||n)&&(!t.returnTrueCurves||this.pbfSupportedWithCurves))try{i=await w(this.url,r,e,{uniqueIdFields:this.uniqueIdFields})}catch(t){if("query:parsing-pbf"!==t.name)throw t;this.pbfSupported=!1}return i??=await(0,g.e)(this.url,r,e,{uniqueIdFields:this.uniqueIdFields}),this._normalizeFields(i.fields),i}async featureSetFromJSON(t,e,s){if(!this._queryGet3DObjectFormat(t)||null==this.infoFor3D||!e.features)return _.A.fromJSON(e);const{meshFeatureSetFromJSON:n}=await(0,o.qr)(Promise.all([r.e(6860),r.e(36),r.e(8366)]).then(r.bind(r,40050)),s);return n(t,this.infoFor3D,e)}executeForCount(t,e){return(0,y.I)(this.url,this._normalizeQuery(t),e,{uniqueIdFields:this.uniqueIdFields})}executeForExtent(t,e){return(0,f.L)(this.url,this._normalizeQuery(t),e)}executeForIds(t,e){return(0,m.V)(this.url,this._normalizeQuery(t),e,{uniqueIdFields:this.uniqueIdFields})}async executeRelationshipQuery(t,e){const[{default:s},{executeRelationshipQuery:n}]=await(0,o.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(1763).then(r.bind(r,71763))]),e);let i=s.from(t);return(this.gdbVersion||this.dynamicDataSource)&&(i=i.clone(),i.gdbVersion=i.gdbVersion||this.gdbVersion,i.dynamicDataSource=i.dynamicDataSource||this.dynamicDataSource),n(this.url,i,e)}async executeRelationshipQueryForCount(t,e){const[{default:s},{executeRelationshipQueryForCount:n}]=await(0,o.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(1763).then(r.bind(r,71763))]),e);let i=s.from(t);return(this.gdbVersion||this.dynamicDataSource)&&(i=i.clone(),i.gdbVersion=i.gdbVersion||this.gdbVersion,i.dynamicDataSource=i.dynamicDataSource||this.dynamicDataSource),n(this.url,i,e)}async executeAttachmentQuery(t,e){const{executeAttachmentQuery:s,fetchAttachments:n,processAttachmentQueryResult:i}=await(0,o.qr)(r.e(9239).then(r.bind(r,9239)),e),a=(0,h.Dl)(this.url);return i(a,await(this.queryAttachmentsSupported?s(a,t,e):n(a,t,e)))}async executeAttributeBinsQuery(t,e){const{executeAttributeBinsQuery:s}=await(0,o.qr)(r.e(3103).then(r.bind(r,33103)),e);return s(this.parsedUrl,t,e)}async executePivotQuery(t,e){const{executePivotQuery:s}=await(0,o.qr)(r.e(566).then(r.bind(r,80566)),e);return s(this.parsedUrl,t,e)}async executeTopFeaturesQuery(t,e){const{executeTopFeaturesQuery:s}=await(0,o.qr)(r.e(1273).then(r.bind(r,11273)),e);return s(this.parsedUrl,t,this.sourceSpatialReference,e)}async executeForTopIds(t,e){const{executeForTopIds:s}=await(0,o.qr)(r.e(1277).then(r.bind(r,21277)),e);return s(this.parsedUrl,t,e)}async executeForTopExtents(t,e){const{executeForTopExtents:s}=await(0,o.qr)(r.e(8018).then(r.bind(r,8018)),e);return s(this.parsedUrl,t,e)}async executeForTopCount(t,e){const{executeForTopCount:s}=await(0,o.qr)(r.e(980).then(r.bind(r,10980)),e);return s(this.parsedUrl,t,e)}_normalizeQuery(t){let e=x.A.from(t);e.sourceSpatialReference=e.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(e=e===t?e.clone():e,e.gdbVersion=t.gdbVersion||this.gdbVersion,e.dynamicDataSource=t.dynamicDataSource?d.A.from(t.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this,s=this._queryGet3DObjectFormat(t);if(null!=r&&s){if(e=e===t?e.clone():e,e.formatOf3DObjects=s,e.outSpatialReference&&!(0,c.aI)(e.outSpatialReference,this.sourceSpatialReference))throw new i.A("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==e.outFields||!e.outFields.includes("*")){e=e===t?e.clone():e,null==e.outFields&&(e.outFields=[]);const{originX:s,originY:n,originZ:i,translationX:a,translationY:o,translationZ:u,scaleX:l,scaleY:c,scaleZ:p,rotationX:h,rotationY:d,rotationZ:y,rotationDeg:f}=r.transformFieldRoles;e.outFields.push(s,n,i,a,o,u,l,c,p,h,d,y,f)}}return e}_normalizeFields(t){if(null!=this.fieldsIndex&&null!=t)for(const e of t){const t=this.fieldsIndex.get(e.name);t&&Object.assign(e,t.toJSON())}}_queryGet3DObjectFormat({returnGeometry:t,multipatchOption:e,outStatistics:r}){return!0!==t||"xyFootprint"===e||r?null:(0,p.Hz)(this.infoFor3D)}};(0,s.Cg)([(0,l.MZ)({type:d.A})],M.prototype,"dynamicDataSource",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"fieldsIndex",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"gdbVersion",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"infoFor3D",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],M.prototype,"parsedUrl",null),(0,s.Cg)([(0,l.MZ)()],M.prototype,"pbfSupported",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"pbfSupportedWithCurves",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"queryAttachmentsSupported",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"relativeTimeBinWindow",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"sourceSpatialReference",void 0),(0,s.Cg)([(0,l.MZ)()],M.prototype,"uniqueIdFields",void 0),(0,s.Cg)([(0,l.MZ)({type:String})],M.prototype,"url",void 0),M=(0,s.Cg)([(0,l.$K)("esri.layers.graphics.sources.support.QueryTask")],M)},64714(t,e,r){r.d(e,{F0:()=>o,Vx:()=>c,e2:()=>h,f:()=>d});var s=r(44208),n=r(4718),i=r(99352),a=r(93470);function o(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?a.Cb:"esriGeometryPolyline"===t?a.yM:a.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function c(t,e){if((0,s.A)("esri-csp-restrictions"))return()=>({[e]:null,...t});try{let r=`this${p(e)} = null;`;for(const e in t)r+=`this${p(e)} = ${JSON.stringify(t[e])};`;const s=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[e]:null,...t})}}function p(t){return u.test(t)?`.${t}`:`[${JSON.stringify(t)}]`}function h(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(t)}}]}function d(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:i.P,editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:e,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},92300(t,e,r){r.d(e,{V:()=>a,X:()=>i});var s=r(60408),n=r(65864);function i(t){return{geometryType:(0,s.$B)(t[0]),geometries:t.map(t=>t.toJSON())}}function a(t,e,r){const s=(0,n.xD)(e);return t.map(t=>{const e=s.fromJSON(t);return e.spatialReference=r,e})}},20615(t,e,r){r.d(e,{I:()=>a});var s=r(2272),n=r(80893),i=r(61956);function a(t,e,r,a){return(0,n.gW)((0,s.Dl)(t),i.A.from(e),r,a)}},74910(t,e,r){r.d(e,{L:()=>o});var s=r(5443),n=r(2272),i=r(80893),a=r(61956);async function o(t,e,r){const o=(0,n.Dl)(t),u=await(0,i.Jf)(o,a.A.from(e),{...r}),l=u.extent;return!l||isNaN(l.xmin)||isNaN(l.ymin)||isNaN(l.xmax)||isNaN(l.ymax)?{count:u.count,extent:null}:{count:u.count,extent:s.A.fromJSON(l)}}},78286(t,e,r){r.d(e,{V:()=>a});var s=r(2272),n=r(80893),i=r(61956);async function a(t,e,r,a){const o=(0,s.Dl)(t),u=await(0,n.Pk)(o,i.A.from(e),r,a);return u.objectIds??function(t){if(t)return function(t){return!Array.isArray(t[0])}(t)?t:t.map(t=>JSON.stringify(t))}(u.uniqueIds)??[]}},99199(t,e,r){r.d(e,{e:()=>u,s:()=>o});var s=r(2272),n=r(80893),i=r(22671),a=r(61956);async function o(t,e,r,s){const n=await u(t,e,r,s);return i.A.fromJSON(n)}function u(t,e,r,i){const o=(0,s.Dl)(t),u={...r},l=a.A.from(e);return(0,n.eW)(o,l,l.sourceSpatialReference,u,i)}},63746(t,e,r){function s(t){return class{constructor(){for(const e of t)this[e]=null}}}function n(t,e=1){const{transform:r,hasZ:s,hasM:n}=t;if(null==r)return s&&1!==e?t=>{t[2]*=e}:null;const[i,a]=function(t,e,r,s){let{scale:n,translate:i,originPosition:a}=t;return"upperLeft"===a&&(n=n.map((t,e)=>1===e?-t:t)),e&&(n=n.map((t,e)=>2===e?t*s:t),i=i.map((t,e)=>2===e?t*s:t)),!e&&r&&(n=n.filter((t,e)=>2!==e),i=i.filter((t,e)=>2!==e)),[n,i]}(r,s,n,e),o=t.hasZ?3:2;return t=>{for(let e=0;e<t.length&&(e!==o||0!==t[e]);++e)t[e]=t[e]*i[e]+a[e]}}r.d(e,{Mv:()=>n,_7:()=>s}),r(53966)}}]);
|