@arcgis/core 4.30.0-next.20240213 → 4.30.0-next.20240214
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/TimeExtent.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/051c00021039f20ad935.js +1 -0
- package/assets/esri/core/workers/chunks/08ba549f9c4afc42a21c.js +1 -0
- package/assets/esri/core/workers/chunks/{a384f29cb3256401962a.js → 1629a8c2085dce59cd1b.js} +1 -1
- package/assets/esri/core/workers/chunks/18512caeeb03b9759ab1.js +1 -0
- package/assets/esri/core/workers/chunks/{cc1c958aad790a44048b.js → 1ca28af7c516d8283bb0.js} +1 -1
- package/assets/esri/core/workers/chunks/1f8a0fb32b96e50f5909.js +1 -0
- package/assets/esri/core/workers/chunks/25f7e92cb4934c4930be.js +1 -0
- package/assets/esri/core/workers/chunks/2649166d1a462c7f8338.js +1 -0
- package/assets/esri/core/workers/chunks/51e4f771bfe352967c97.js +1 -0
- package/assets/esri/core/workers/chunks/5467bacd2771e6b1cdfa.js +1 -0
- package/assets/esri/core/workers/chunks/5638d95e600ff271c5b1.js +1 -0
- package/assets/esri/core/workers/chunks/58f088b08e12c5435dbc.js +1 -0
- package/assets/esri/core/workers/chunks/5aef1e898618f8dda2c9.js +1 -0
- package/assets/esri/core/workers/chunks/656ec8a14df0e4b68433.js +1 -0
- package/assets/esri/core/workers/chunks/66f21348fb68c83b9dc3.js +1108 -0
- package/assets/esri/core/workers/chunks/{eb2d6f1ee63b40ae0736.js → 774b655498289b1b36bb.js} +1 -1
- package/assets/esri/core/workers/chunks/9310f1de92d9b82dc803.js +1 -0
- package/assets/esri/core/workers/chunks/{f03d62ab7806b68d0b62.js → 9fbf61675e2a5374f754.js} +1 -1
- package/assets/esri/core/workers/chunks/a0b017a34cafd08ce945.js +1 -0
- package/assets/esri/core/workers/chunks/a28711db61c1df2d7bac.js +1 -0
- package/assets/esri/core/workers/chunks/aa9b46bcb75c96731de3.js +1 -0
- package/assets/esri/core/workers/chunks/c83da4659646ce3f5b50.js +1 -0
- package/assets/esri/core/workers/chunks/{05ebb9cec0e1826b283f.js → cafcc53175f9d4c5de2f.js} +1 -1
- package/assets/esri/core/workers/chunks/{1c6914ded7db720f7bf7.js → daf6eab5dd198ca9a67b.js} +1 -1
- package/assets/esri/core/workers/chunks/e03edeaf3af46495449e.js +1 -0
- package/assets/esri/core/workers/chunks/e0c9f29eedfa71554445.js +1 -0
- package/assets/esri/core/workers/chunks/e123017c670f22266768.js +1 -0
- package/assets/esri/core/workers/chunks/eba3a6f0a66b51b8ec12.js +1 -0
- package/assets/esri/core/workers/chunks/ebb294c82207f3ff9f04.js +1 -0
- package/assets/esri/core/workers/chunks/{e4da908079417cc2f495.js → ee0c77889059815a31b2.js} +1 -1
- package/assets/esri/core/workers/chunks/f36e55302b45e2936a5b.js +1 -0
- package/assets/esri/core/workers/chunks/f85e67d4a18603ccaaed.js +1 -0
- package/assets/esri/core/workers/chunks/f90bbebd2dc07a77ce09.js +1 -0
- package/chunks/vec32.js +1 -1
- package/interfaces.d.ts +131 -66
- package/layers/WFSLayer.js +1 -1
- package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/package.json +1 -1
- package/portal/Portal.js +1 -1
- package/portal/PortalGroup.js +1 -1
- package/portal/PortalUser.js +1 -1
- package/portal/support/geometryServiceUtils.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/wasmToUpdateResponseFactories.js +1 -1
- package/rest/networks/support/Association.js +1 -1
- package/rest/places.js +1 -1
- package/rest/query/operations/pbfJSONFeatureSet.js +1 -1
- package/rest/support/ImageSampleParameters.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/smartMapping/support/adapters/SceneLayerAdapter.js +1 -1
- package/support/elevationInfoUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/defaultCIMValues.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DView.js +1 -1
- package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/webgl/RenderNode.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/shaderLibrary/shading/ComputeNormalTexture.glsl.js +9 -7
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceConstants.js +5 -0
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +8 -8
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/lib/GLTextureMaterial.js +1 -1
- package/views/draw/drawSurfaces.js +1 -1
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/webdoc/support/webdocLoadUtils.js +1 -1
- package/webdoc/support/webdocSaveUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/Print/PrintViewModel.js +1 -1
- package/widgets/Search/support/locatorUtils.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/00b9e92f8df245a83921.js +0 -1
- package/assets/esri/core/workers/chunks/02ee044597c89c86b934.js +0 -1
- package/assets/esri/core/workers/chunks/143ccb14c9e915dd1412.js +0 -1
- package/assets/esri/core/workers/chunks/24649b410b757599a549.js +0 -1
- package/assets/esri/core/workers/chunks/2519b207894132d5ea91.js +0 -1
- package/assets/esri/core/workers/chunks/30f9b2a3417cbcfeecca.js +0 -1
- package/assets/esri/core/workers/chunks/42ab9c282bb267c3db03.js +0 -1
- package/assets/esri/core/workers/chunks/49afeac45250b15b5f36.js +0 -1
- package/assets/esri/core/workers/chunks/50bb67f2eeace5d50673.js +0 -1
- package/assets/esri/core/workers/chunks/50cdc59426ba859027e2.js +0 -1
- package/assets/esri/core/workers/chunks/58c5861d060c808813a1.js +0 -1
- package/assets/esri/core/workers/chunks/5dbb3ef6fdd25ac632ad.js +0 -1
- package/assets/esri/core/workers/chunks/61c4bb58ef9f2d99c75e.js +0 -1
- package/assets/esri/core/workers/chunks/6e50220f8e2d392e2855.js +0 -1
- package/assets/esri/core/workers/chunks/6fd8047741a0df006ddd.js +0 -1
- package/assets/esri/core/workers/chunks/7709248f59520aee6f51.js +0 -1
- package/assets/esri/core/workers/chunks/8852a64918caf80fc414.js +0 -1
- package/assets/esri/core/workers/chunks/94dfb80ab23dda92918b.js +0 -1
- package/assets/esri/core/workers/chunks/9ebbc75ba5c623a322aa.js +0 -1
- package/assets/esri/core/workers/chunks/a74c59cf5d1c4e63a4e1.js +0 -1
- package/assets/esri/core/workers/chunks/be562536212360943388.js +0 -1
- package/assets/esri/core/workers/chunks/d06d36815c2121484a13.js +0 -1
- package/assets/esri/core/workers/chunks/d5f06a7b0ea7951c8dd0.js +0 -1
- package/assets/esri/core/workers/chunks/de6d54df7ae32694fd70.js +0 -1
- package/assets/esri/core/workers/chunks/f13c4b9692dad5802a32.js +0 -1106
- package/assets/esri/core/workers/chunks/f1e8f7d1a98b9e207b1b.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8380],{25228:(e,t,s)=>{s.d(t,{c:()=>m});var r,i=s(41948),n=s(40504),o=s(94360),a=s(1580),l=(s(9456),s(66360),s(72052),s(33600)),h=s(12552),c=s(18996),u=s(28484);let d=r=class extends n.am{static get allTime(){return p}static get empty(){return g}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,s=this.end?.getTime()??this.end,r=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===r&&s===i}expandTo(e,t=u.OX){if(this.isEmpty||this.isAllTime)return this.clone();let s=this.start;s&&(s=(0,o.aU)(s,e,t));let i=this.end;if(i){const s=(0,o.aU)(i,e,t);i=i.getTime()===s.getTime()?s:(0,o.g1)(s,1,e,t)}return new r({start:s,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return r.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,s=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;return i>=t&&i<=s?o=i:t>=i&&t<=n&&(o=t),s>=i&&s<=n?a=s:n>=t&&n<=s&&(a=n),null==o||null==a||isNaN(o)||isNaN(a)?r.empty:new r({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,s=u.OX){if(this.isEmpty||this.isAllTime)return this.clone();const i=new r,{start:n,end:a}=this;return null!=n&&(i.start=(0,o.g1)(n,e,t,s)),null!=a&&(i.end=(0,o.g1)(a,e,t,s)),i}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,s=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new r({start:t,end:s})}};(0,i._)([(0,a.qq)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,i._)([(0,l.E)("end")],d.prototype,"readEnd",null),(0,i._)([(0,c.G)("end")],d.prototype,"writeEnd",null),(0,i._)([(0,a.qq)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,i._)([(0,a.qq)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,i._)([(0,a.qq)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,i._)([(0,l.E)("start")],d.prototype,"readStart",null),(0,i._)([(0,c.G)("start")],d.prototype,"writeStart",null),d=r=(0,i._)([(0,h.c)("esri.TimeExtent")],d);const p=new d,g=new d({start:void 0,end:void 0}),m=d},22156:(e,t,s)=>{s.d(t,{MR:()=>o,qm:()=>a});var r=s(41948),i=s(12552);let n=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,r._)([(0,i.c)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return t=(0,r._)([(0,i.c)("esri.core.NumericIdentifiable")],t),t};let l=class extends(o(class{})){};l=(0,r._)([(0,i.c)("esri.core.Identifiable")],l)},11004:(e,t,s)=>{s.d(t,{o:()=>i});var r=s(74452);class i{constructor(e,t){this._storage=new r.kB,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,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(){}}},74452:(e,t,s)=>{s.d(t,{ML:()=>o,kB:()=>a});var r,i,n=s(24680);(i=r||(r={}))[i.ALL=0]="ALL",i[i.SOME=1]="SOME";class o{constructor(e,t,s){this.name=e,this._storage=t,this.id=l+++":",this.size=0,this.maxSize=-1,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),s&&(this._storage.registerRemoveFunc(this.id,s),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get storageSize(){return this._storage.size}getSize(e){return this._storage.getSize(this,e)}resetHitRate(){this._hit=this._miss=0}put(e,t,s,r=0){this._storage.put(this,e,t,s,r)}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}peek(e){return this._storage.peek(this,e)}updateSize(e,t,s){this._storage.updateSize(this,e,t,s)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new n.c,this._users=new n.c}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,i,n){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,o.size,r.ALL)),i>this._maxSize)return void this._notifyRemove(t,s,i,r.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!i||i<0)return console.warn(`Refusing to cache entry with size ${i} for key ${t}`),void this._notifyRemove(t,s,0,r.ALL);const a=1+Math.max(n,-4)- -3;this._db.set(t,new h(s,i,a)),this._size+=i,e.size+=i,this._checkSize()}updateSize(e,t,s,i){t=e.id+t;const n=this._db.get(t);if(n&&n.entry===s){for(this._size-=n.size,e.size-=n.size;i>this._maxSize;){const e=this._notifyRemove(t,s,i,r.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}n.size=i,this._size+=i,e.size+=i,this._checkSize()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.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={},s=new Array;this._db.forEach(((e,r)=>{const i=e.lifetime;s[i]=(s[i]||0)+e.size,this._users.forAll((s=>{const{id:i,name:n}=s;if(r.startsWith(i)){const s=t[n]||0;t[n]=s+e.size}}))}));const r={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const i=t[s]||0;t[s]=i,r[s]=Math.round(100*e.hitRate)+"%"}else r[s]="0%"}));const i=Object.keys(t);i.sort(((e,s)=>t[s]-t[e])),i.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+r[s]));for(let t=s.length-1;t>=0;--t){const r=s[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,r.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,r.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,r){let i;return this._removeFuncs.some((n=>{if(e.startsWith(n[0])){const e=n[1](t,r,s);return"number"==typeof e&&(i=e),!0}return!1})),i}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const s=e?.id;let r=!0;for(;r;){r=!1;for(const[i,n]of this._db)if(0===n.lifetime&&(!s||i.startsWith(s))){if(this._purgeItem(i,n,e),t.size<=.9*t.maxSize)return;r||=this._db.has(i)}}for(const[r,i]of this._db)if((!s||r.startsWith(s))&&(this._purgeItem(r,i,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const i=this._notifyRemove(e,t.entry,t.size,r.SOME);null!=i&&i>0&&(this._size+=i,s&&(s.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let l=0;class h{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}},54792:(e,t,s)=>{s.d(t,{c:()=>n});var r=s(67432),i=s(9592);class n{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._observable=new i.n,this._items=new Set}get length(){return(0,r.am)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,r.am)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,r.am)(this._observable),yield*this._items}}},57896:(e,t,s)=>{s.d(t,{Eq:()=>d,KG:()=>y,_8:()=>f,_I:()=>h,aE:()=>l,du:()=>m,on:()=>u}),s(40196),s(2952);var r=s(60976),i=s(38912),n=s(70680),o=s(10860),a=s(37176);function l(e,t,s={}){return c(e,t,s,p)}function h(e,t,s={}){return c(e,t,s,g)}function c(e,t,s={},r){let i=null;const o=s.once?(e,s)=>{r(e)&&((0,n.oR)(i),t(e,s))}:(e,s)=>{r(e)&&t(e,s)};if(i=(0,a.M9)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return i}function u(e,t,s,o={}){let a=null,h=null,c=null;function u(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function d(e){o.once&&o.once&&(0,n.oR)(c),s(e)}const p=l(e,((e,s)=>{u(),(0,r.sh)(e)&&(a=e,h=(0,r.on)(e,t,d),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return c=(0,i.uU)((()=>{p.remove(),u()})),c}function d(e,t){return function(e,t,s){if((0,o.wv)(s))return Promise.reject((0,o.Uh)());const r=e();if(t?.(r))return Promise.resolve(r);let a=null;function l(){a=(0,n.oR)(a)}return new Promise(((r,n)=>{a=(0,i.Ip)([(0,o.wD)(s,(()=>{l(),n((0,o.Uh)())})),c(e,(e=>{l(),r(e)}),{sync:!1,once:!0},t??p)])}))}(e,g,t)}function p(e){return!0}function g(e){return!!e}s(41168);const m={sync:!0},f={initial:!0},y={sync:!0,initial:!0}},46448:(e,t,s)=>{s.d(t,{c:()=>h});var r=s(38912),i=s(10860),n=s(54792),o=s(13056),a=s(25512),l=s(38432);class h{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new n.c}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((s,r)=>{let n=!0;const o=e=>{(0,i.wp)(t.signal),n&&(n=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let n=0;n<e.length;++n){const a=e[n];(0,i.eW)(a)?this._clientPromises[n]=a.then((e=>(this._clients[n]=new l.default(e,t,this._ongoingJobsQueue),o(s),this._clients[n])),(()=>(o(r),null))):(this._clients[n]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[n]=Promise.resolve(this._clients[n]),o(s))}}))}broadcast(e,t,s){const r=new Array(this._clientPromises.length);for(let i=0;i<this._clientPromises.length;++i){const n=this._clientPromises[i];r[i]=n.then((r=>r?.invoke(e,t,s)))}return r}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,i.Uh)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,o.S)(this)}invoke(e,t,s){return this.apply(e,[t],s)}apply(e,t,s){const r=(0,i.qG)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:s,resolver:r});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return r.promise}createInvokeProxy(e){return(0,a.Y)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,r.Ip)(this._clients.map((s=>s.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let s=t.length;for(let r=0;r<this._clientPromises.length;++r)this._clientPromises[r].then((i=>{i&&(t[r]=i.openPort()),0==--s&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},13056:(e,t,s)=>{s.d(t,{S:()=>n,s:()=>i});const r=new FinalizationRegistry((e=>{e.close()}));function i(e,t){r.register(e,t,t)}function n(e){r.unregister(e)}},35268:(e,t,s)=>{s.d(t,{eU:()=>V});var r=s(20744),i=s(9456),n=s(10860),o=s(46448),a=s(13056),l=s(38432),h=s(66360),c=s(70680),u=s(2600),d=s(28176);const p={async request(e,t){const s=e.options,r=s.responseType;s.signal=t?.signal,s.responseType="native"===r||"native-request-init"===r?"native-request-init":r&&["blob","json","text"].includes(r)&&(0,d.OO)(e.url)?.after?r:"array-buffer";const i=await(0,u.c)(e.url,s),n={data:i.data,httpStatus:i.httpStatus,ssl:i.ssl};switch(i.requestOptions?.responseType){case"native-request-init":return delete n.data.signal,n;case"blob":n.data=await n.data.arrayBuffer();break;case"json":n.data=(new TextEncoder).encode(JSON.stringify(n.data)).buffer;break;case"text":n.data=(new TextEncoder).encode(n.data).buffer}return{result:n,transferList:[n.data]}}};var g=s(31056),m=s(24832),f=s(6220),y=(s(2016),s(47620));const _={};var v=s(52324);class b{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...s)=>e[t](...s)}))}}class w{constructor(){this._dispatcher=new b,this._workerPostMessage({type:g.MessageType.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,v.o)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,s){this._dispatcher.addEventListener(e,t,s)}removeEventListener(e,t,s){this._dispatcher.removeEventListener(e,t,s)}_workerPostMessage(e){(0,v.o)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,g.mO)(e);if(t&&t.type===g.MessageType.OPEN){const{modulePath:e,jobId:s}=t;let r=await l.default.loadWorker(e);r||(r=await import(e));const i=l.default.connect(r);this._workerPostMessage({type:g.MessageType.OPENED,jobId:s,data:i})}}}var k=s(89960),E=s(69880);const S=()=>h.c.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:P}=g.MessageType;let q,I;const M="Failed to create Worker. Fallback to execute module in main thread";async function z(e){return new Promise((t=>{function s(i){const n=(0,g.mO)(i);n&&n.type===P&&(e.removeEventListener("message",s),e.removeEventListener("error",r),t(e))}function r(t){t.preventDefault(),e.removeEventListener("message",s),e.removeEventListener("error",r),S().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new w).addEventListener("message",s),e.addEventListener("error",r)}e.addEventListener("message",s),e.addEventListener("error",r)}))}let L=0;const{ABORT:O,INVOKE:R,OPEN:U,OPENED:A,RESPONSE:T}=g.MessageType;class C{static async create(e){const t=await async function(){if(!(0,i.c)("esri-workers"))return z(new w);if(!q&&!I)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:ABORT,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:INVOKE,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\\nModules version: ${r}\\nAssets version: ${n??s}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case OPEN:let n;function t(e){const o=n.connect(e);self.postMessage({type:OPENED,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case RESPONSE:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split('"{CONFIGURATION}"').join(`'${function(){let e;if(null!=f.default.default){const t={...f.default};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(f.default));e.assetsPath=(0,d.WM)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,d.WM)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,k.a8)(),e.has={"esri-csp-restrictions":(0,i.c)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,i.c)("esri-2d-update-debug"),"esri-2d-log-updating":(0,i.c)("esri-2d-log-updating"),"featurelayer-pbf":(0,i.c)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,i.c)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,i.c)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,i.c)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,i.c)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,i.c)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,i.c)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,i.c)("featurelayer-snapshot-enabled"),"esri-atomics":(0,i.c)("esri-atomics"),"esri-shared-array-buffer":(0,i.c)("esri-shared-array-buffer"),"esri-tiles-debug":(0,i.c)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,i.c)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,i.c)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,d.WM)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,d.WM)(e.workers.workerPath):e.workers.workerPath=(0,d.WM)((0,m.O)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=f.default.workers.loaderConfig,s=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=_.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,k.a8)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),r={buildDate:E.W,fullVersion:y.c1,revision:E.m};return JSON.stringify({esriConfig:e,loaderConfig:s,kernelInfo:r})}()}'`);q=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){I=e||{}}let e;if(q)try{e=new Worker(q,{name:"esri-worker-"+L++})}catch(t){S().warn(M,I),e=new w}else S().warn(M,I),e=new w;return z(e)}();return new C(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),h.c.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:s}=t,r=(0,g.EH)();return new Promise(((t,i)=>{const o={resolve:t,reject:i,abortHandle:(0,n.Ij)(s,(()=>{this._outJobs.delete(r),this._post({type:O,jobId:r})}))};this._outJobs.set(r,o),this._post({type:U,jobId:r,modulePath:e})}))}_onMessage(e){const t=(0,g.mO)(e);if(t)switch(t.type){case A:this._onOpenedMessage(t);break;case T:this._onResponseMessage(t);break;case O:this._onAbortMessage(t);break;case R:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,s=e.jobId,r=t.get(s);r&&(r.controller&&r.controller.abort(),t.delete(s))}_onInvokeMessage(e){const{methodName:t,jobId:s,data:r,abortable:i}=e,o=i?new AbortController:null,a=this._inJobs,l=p[t];let h;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);h=l.call(null,r,{signal:o?o.signal:null})}catch(e){return void this._post({type:T,jobId:s,error:(0,g.O)(e)})}(0,n.eW)(h)?(a.set(s,{controller:o,promise:h}),h.then((e=>{a.has(s)&&(a.delete(s),this._post({type:T,jobId:s},e))}),(e=>{a.has(s)&&(a.delete(s),e||(e={message:"Error encountered at method"+t}),(0,n.mA)(e)||this._post({type:T,jobId:s,error:(0,g.O)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:T,jobId:s},h)}_onOpenedMessage(e){const{jobId:t,data:s}=e,r=this._outJobs.get(t);r&&(this._outJobs.delete(t),(0,c.oR)(r.abortHandle),r.resolve(s))}_onResponseMessage(e){const{jobId:t,error:s,data:i}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,c.oR)(n.abortHandle),s?n.reject(r.c.fromJSON(JSON.parse(s))):n.resolve(i))}_post(e,t,s){return(0,g.E9)(this.worker,e,t,s)}}const x=(0,i.c)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,i.c)("workers-pool-size")):0;let N=(0,i.c)("esri-mobile")?Math.min(x,3):x;N||(N=(0,i.c)("safari")&&(0,i.c)("mac")?7:2);let D=0;const H=[];async function j(e,t){const s=new o.c,{registryTarget:r,...i}=t;return await s.open(e,i),r&&(0,a.s)(r,s),s}async function V(e,t={}){if("string"!=typeof e)throw new r.c("workers:undefined-module","modulePath is missing");let s=t.strategy||"distributed";if((0,i.c)("host-webworker")&&!(0,i.c)("esri-workers")&&(s="local"),"local"===s){let s=await l.default.loadWorker(e);s||(s=await import(e)),(0,n.wp)(t.signal);const r=t.client||s;return j([l.default.connect(s)],{...t,client:r})}if(await async function(){if(W)return W;F=new AbortController;const e=[];for(let t=0;t<N;t++){const s=C.create(t).then((e=>(H[t]=e,e)));e.push(s)}return W=Promise.all(e),W}(),(0,n.wp)(t.signal),"dedicated"===s){const s=D++%N;return j([await H[s].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const s=Math.min(t.maxNumWorkers,N);if(s<N){const r=new Array(s);for(let i=0;i<s;++i){const s=D++%N;r[i]=H[s].open(e,t)}return j(r,t)}}return j(H.map((s=>s.open(e,t))),t)}let F,W=null},13819:(e,t,s)=>{s.d(t,{c:()=>v});var r,i=s(41948),n=s(92400),o=s(14628),a=s(40504),l=s(24296),h=s(69504),c=s(1580),u=(s(9456),s(66360),s(33600)),d=s(12552),p=s(18996);const g=(0,o.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=g.jsonValues.slice();(0,n.sH)(m,"orthometric");const f=(0,o.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let y=r=class extends a.am{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,s){return g.write(e,t,s)}readHeightModel(e,t,s){return g.read(e)||(s?.messages&&s.messages.push(function(e,t){return new h.c("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:s})),null)}readHeightUnit(e,t,s){return f.read(e)||(s?.messages&&s.messages.push(_(e,{context:s})),null)}readHeightUnitService(e,t,s){return(0,l.oG)(e)||f.read(e)||(s?.messages&&s.messages.push(_(e,{context:s})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const s=(0,l._2)(t);return new r({heightModel:e.heightModel,heightUnit:s??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new r;return t.read(e,{origin:"web-scene"}),t}};function _(e,t){return new h.c("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,i._)([(0,c.qq)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],y.prototype,"heightModel",void 0),(0,i._)([(0,p.G)("web-scene","heightModel")],y.prototype,"writeHeightModel",null),(0,i._)([(0,u.E)(["web-scene","service"],"heightModel")],y.prototype,"readHeightModel",null),(0,i._)([(0,c.qq)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f.jsonValues,write:f.write}}}})],y.prototype,"heightUnit",void 0),(0,i._)([(0,u.E)("web-scene","heightUnit")],y.prototype,"readHeightUnit",null),(0,i._)([(0,u.E)("service","heightUnit")],y.prototype,"readHeightUnitService",null),(0,i._)([(0,c.qq)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],y.prototype,"vertCRS",void 0),(0,i._)([(0,u.E)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],y.prototype,"readVertCRS",null),y=r=(0,i._)([(0,d.c)("esri.geometry.HeightModelInfo")],y);const v=y},47104:(e,t,s)=>{s.r(t),s.d(t,{default:()=>L});var r=s(41948),i=s(2600),n=s(20744),o=s(70680),a=s(26496),l=s(10860),h=s(28176),c=s(1580),u=(s(9456),s(66360)),d=(s(72052),s(33600)),p=s(12552),g=s(13819),m=s(81436),f=s(54664),y=s(16660),_=s(66576),v=s(98768),b=s(21488);class w{constructor(e,t,s,r){this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,"pixelData"in e?(this.values=e.pixelData,this.width=e.width,this.height=e.height,this.noDataValue=e.noDataValue):(this.values=e,this.width=t,this.height=s,this.noDataValue=r)}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let s=1/0,r=-1/0,i=!0;for(const n of t)n===e?this._hasNoDataValues=!0:(s=n<s?n:s,r=n>r?n:r,i=!1);i?(this._minValue=0,this._maxValue=0):(this._minValue=s,this._maxValue=r>-3e38?r:0)}}var k=s(92400),E=s(38912),S=s(35268);class P{constructor(e,t,s,r,i={}){this._mainMethod=t,this._transferLists=s,this._listeners=[],this._promise=(0,S.eU)(e,{...i,schedule:r}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,i.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>u.c.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const s={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(s),this._connectListener(s),(0,E.uU)((()=>{s.removed=!0,(0,k.aE)(this._listeners,s),this._thread&&null!=s.threadHandle&&s.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,s){if(this._thread){const r=this._transferLists[e],i=r?r(t):[];return this._thread.invoke(e,t,{transferList:i,signal:s})}return this._promise?this._promise.then((()=>((0,l.wp)(s),this.invokeMethod(e,t,s)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}class q extends P{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,s){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},s):Promise.resolve(null)}release(){--this.ref<=0&&(I.forEach(((e,t)=>{e===this&&I.delete(t)})),this.destroy())}}const I=new Map;let M=class extends((0,f.k)((0,y.u)((0,_.Y)((0,v.K)((0,a.U)(m.c)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=I.get(e);return t||(null!=e?(t=new q((t=>e.immediate.schedule(t))),I.set(e,t)):(t=new q,I.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.gT)(this._lercDecoder)}readCapabilities(e,t){const s=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));return s?{operations:{supportsTileMap:s.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let s=t.currentVersion;return s||(s=9.3),s}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new n.c("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(l.CE).then((()=>this._fetchImageService(t)))),Promise.resolve(this)}fetchTile(e,t,s,r){const n=null!=(r=r||{signal:null}).signal?r.signal:r.signal=(new AbortController).signal,o={responseType:"array-buffer",signal:n},a={noDataValue:r.noDataValue,returnFileInfo:!0};return this.load().then((()=>this._fetchTileAvailability(e,t,s,r))).then((()=>(0,i.c)(this.getTileUrl(e,t,s),o))).then((e=>this._lercDecoder.decode(e.data,a,n))).then((e=>new w(e)))}getTileUrl(e,t,s){const r=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,i=(0,h.GK)({...this.parsedUrl.query,blankTile:!r&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${s}${i?"?"+i:""}`}async queryElevation(e,t){const{ElevationQuery:r}=await s.e(2984).then(s.bind(s,12984));return(0,l.wp)(t),(new r).query(this,e,t)}async createElevationSampler(e,t){const{ElevationQuery:r}=await s.e(2984).then(s.bind(s,12984));return(0,l.wp)(t),(new r).createSampler(this,e,t)}_fetchTileAvailability(e,t,s,r){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,s,r):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},s=await(0,i.c)(this.parsedUrl.path,t);s.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=s.data,this.read(s.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[z]}};(0,r._)([(0,c.qq)({readOnly:!0})],M.prototype,"capabilities",void 0),(0,r._)([(0,d.E)("service","capabilities",["capabilities"])],M.prototype,"readCapabilities",null),(0,r._)([(0,c.qq)({json:{read:{source:"copyrightText"}}})],M.prototype,"copyright",void 0),(0,r._)([(0,c.qq)({readOnly:!0,type:g.c})],M.prototype,"heightModelInfo",void 0),(0,r._)([(0,c.qq)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],M.prototype,"path",void 0),(0,r._)([(0,c.qq)({type:["show","hide"]})],M.prototype,"listMode",void 0),(0,r._)([(0,c.qq)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],M.prototype,"minScale",void 0),(0,r._)([(0,c.qq)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],M.prototype,"maxScale",void 0),(0,r._)([(0,c.qq)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],M.prototype,"opacity",void 0),(0,r._)([(0,c.qq)({type:["ArcGISTiledElevationServiceLayer"]})],M.prototype,"operationalLayerType",void 0),(0,r._)([(0,c.qq)()],M.prototype,"sourceJSON",void 0),(0,r._)([(0,c.qq)({json:{read:!1},value:"elevation",readOnly:!0})],M.prototype,"type",void 0),(0,r._)([(0,c.qq)(b.qW)],M.prototype,"url",void 0),(0,r._)([(0,c.qq)()],M.prototype,"version",void 0),(0,r._)([(0,d.E)("version",["currentVersion"])],M.prototype,"readVersion",null),M=(0,r._)([(0,p.c)("esri.layers.ElevationLayer")],M);const z=Symbol("default-fetch-tile");M.prototype.fetchTile[z]=!0;const L=M},81436:(e,t,s)=>{s.d(t,{c:()=>v});var r=s(41948),i=(s(60708),s(2600)),n=s(20744),o=s(77860),a=s(22156),l=s(95800),h=s(66360),c=s(10860),u=s(28176),d=s(1580),p=(s(9456),s(72052),s(12552)),g=s(6220),m=s(95247),f=s(56156);let y=0,_=class extends(o.c.EventedMixin((0,a.MR)(l.c))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.c(-180,-90,180,90,f.c.WGS84),this.id=Date.now().toString(16)+"-layer-"+y++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.c.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await s.e(9232).then(s.bind(s,69232))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await s.e(2259).then(s.bind(s,12259));try{return await r(t)}catch(e){const s=t&&t.portalItem,r=s?.id||"unset",i=s&&s.portal&&s.portal.url||g.default.portalUrl;throw h.c.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,c.mA)(e)||h.c.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,u.as)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,i.c)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.c("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,d.qq)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,r._)([(0,d.qq)({type:m.c})],_.prototype,"fullExtent",void 0),(0,r._)([(0,d.qq)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,r._)([(0,d.qq)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,r._)([(0,d.qq)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,r._)([(0,d.qq)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,r._)([(0,d.qq)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,r._)([(0,d.qq)({clonable:!1})],_.prototype,"parent",void 0),(0,r._)([(0,d.qq)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,r._)([(0,d.qq)({type:Boolean,readOnly:!0})],_.prototype,"persistenceEnabled",void 0),(0,r._)([(0,d.qq)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,r._)([(0,d.qq)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,r._)([(0,d.qq)({type:f.c})],_.prototype,"spatialReference",void 0),(0,r._)([(0,d.qq)({type:String})],_.prototype,"title",void 0),(0,r._)([(0,d.qq)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,r._)([(0,d.qq)()],_.prototype,"url",void 0),(0,r._)([(0,d.qq)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,r._)([(0,p.c)("esri.layers.Layer")],_);const v=_},98768:(e,t,s)=>{s.d(t,{K:()=>k});var r=s(41948),i=s(6220),n=s(47620),o=s(2600),a=s(40196),l=s(20744),h=s(66360),c=s(70680),u=s(10860),d=s(28176),p=s(1580),g=(s(9456),s(72052),s(33600)),m=s(12552),f=s(18996),y=s(71068),_=s(54872),v=s(9764),b=s(53039),w=s(46940);const k=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.mG)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,s){if(t.itemId)return new v.default({id:t.itemId,portal:s?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await Promise.all([s.e(8828),s.e(4132)]).then(s.bind(s,94132));return(0,u.wp)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,u.mA)(e)||h.c.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,u.CE)(e),!0))))}async setUserPrivileges(e,t){if(!i.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:s,fullEdit:r},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",s),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,u.CE)(e)}}async _fetchUserPrivileges(e,t){let s=this.portalItem;if(!e||!s||!s.loaded||s.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===s.id;if(r&&s.portal.user)return(0,w.CI)(s);let i,o;if(r)i=s.portal.url;else try{i=await(0,y.mK)(this.url,t)}catch(e){(0,u.CE)(e)}if(!i||!(0,d.Cs)(i,s.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${i}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,u.CE)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(r?await s.reload():(s=new v.default({id:e,portal:{url:i}}),await s.load(t)),s.portal.user)return(0,w.CI)(s)}catch(e){(0,u.CE)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,u.CE)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const s=E.credential===t?E.user:await this._fetchEditingUser(e);return E.credential=t,E.user=s,null==s?.privileges||s.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const s=n.id.findServerInfo(this.url??"");if(!s?.owningSystemUrl)return null;const r=`${s.owningSystemUrl}/sharing/rest`,i=_.c.getDefault();if(i&&i.loaded&&(0,d.k7)(i.restUrl)===(0,d.k7)(r))return i.user;const l=`${r}/community/self`,h=null!=e?e.signal:null,c=await(0,a.aG)((0,o.c)(l,{authMode:"no-prompt",query:{f:"json"},signal:h}));return c.ok?b.c.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const s=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||_.c.getDefault());return s&&r&&!(0,d.kF)(r.restUrl,s.restUrl)?(t.messages&&t.messages.push(new l.c("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,r._)([(0,p.qq)({type:v.default})],t.prototype,"portalItem",null),(0,r._)([(0,g.E)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,f.G)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,p.qq)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,p.qq)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,p.qq)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,p.qq)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,m.c)("esri.layers.mixins.PortalLayer")],t),t},E={credential:null,user:null}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[572],{48952:(e,t,r)=>{r.d(t,{a:()=>n,b:()=>o,c:()=>i,d:()=>s,e:()=>c,f:()=>u,n:()=>p,s:()=>l,t:()=>d}),r(9456);var a=r(23704);function s(e,t,r){n(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r,a=3,s=a){if(e.length/a!==Math.ceil(t.length/s))return e;const n=e.length/a,i=r[0],o=r[1],u=r[2],l=r[4],d=r[5],c=r[6],p=r[8],h=r[9],y=r[10],f=r[12],g=r[13],m=r[14];let b=0,w=0;for(let r=0;r<n;r++){const r=t[b],n=t[b+1],F=t[b+2];e[w]=i*r+l*n+p*F+f,e[w+1]=o*r+d*n+h*F+g,e[w+2]=u*r+c*n+y*F+m,b+=s,w+=a}return e}function i(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,s=3,n=s){if(e.length/s!==Math.ceil(t.length/n))return void(0,a.A)().error("source and destination buffers need to have the same number of elements");const i=e.length/s,o=r[0],u=r[1],l=r[2],d=r[3],c=r[4],p=r[5],h=r[6],y=r[7],f=r[8];let g=0,m=0;for(let r=0;r<i;r++){const r=t[g],a=t[g+1],i=t[g+2];e[m]=o*r+d*a+h*i,e[m+1]=u*r+c*a+y*i,e[m+2]=l*r+p*a+f*i,g+=n,m+=s}}function u(e,t,r){l(e.typedBuffer,t,r,e.typedBufferStride)}function l(e,t,r,a=3){const s=Math.min(e.length/a,t.count),n=t.typedBuffer,i=t.typedBufferStride;let o=0,u=0;for(let t=0;t<s;t++)e[u]=r*n[o],e[u+1]=r*n[o+1],e[u+2]=r*n[o+2],o+=i,u+=a}function d(e,t,r,a=3,s=a){const n=e.length/a;if(n!==Math.ceil(t.length/s))return e;let i=0,o=0;for(let u=0;u<n;u++)e[o]=t[i]+r[0],e[o+1]=t[i+1]+r[1],e[o+2]=t[i+2]+r[2],i+=s,o+=a;return e}function c(e,t){p(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function p(e,t,r=3,a=r){const s=Math.min(e.length/r,t.length/a);let n=0,i=0;for(let o=0;o<s;o++){const s=t[n],o=t[n+1],u=t[n+2],l=s*s+o*o+u*u;if(l>0){const t=1/Math.sqrt(l);e[i]=t*s,e[i+1]=t*o,e[i+2]=t*u}n+=a,i+=r}}Object.freeze(Object.defineProperty({__proto__:null,normalize:p,normalizeView:c,scale:l,scaleView:u,shiftRight:function(e,t,r){const a=Math.min(e.count,t.count),s=e.typedBuffer,n=e.typedBufferStride,i=t.typedBuffer,o=t.typedBufferStride;let u=0,l=0;for(let e=0;e<a;e++)s[l]=i[u]>>r,s[l+1]=i[u+1]>>r,s[l+2]=i[u+2]>>r,u+=o,l+=n},transformMat3:o,transformMat3View:i,transformMat4:n,transformMat4View:s,translate:d},Symbol.toStringTag,{value:"Module"}))},51232:(e,t,r)=>{r.d(t,{c:()=>d});var a=r(41948),s=r(3856),n=r(40504),i=r(1580),o=(r(9456),r(66360),r(72052),r(9968)),u=r(12552);let l=class extends((0,s.q)(n.am)){constructor(e){super(e),this.type="georeferenced",this.origin=null}};(0,a._)([(0,o.G)({georeferenced:"georeferenced"},{readOnly:!0})],l.prototype,"type",void 0),(0,a._)([(0,i.qq)({type:[Number],nonNullable:!1,json:{write:!0}})],l.prototype,"origin",void 0),l=(0,a._)([(0,u.c)("esri.geometry.support.MeshGeoreferencedVertexSpace")],l);const d=l},13708:(e,t,r)=>{r.d(t,{c:()=>c});var a=r(41948),s=r(3856),n=r(40504),i=r(1580),o=(r(9456),r(66360),r(72052),r(9968)),u=r(12552),l=r(62484);let d=class extends((0,s.q)(n.am)){constructor(e){super(e),this.type="local",this.origin=(0,l.Su)()}};(0,a._)([(0,o.G)({local:"local"},{readOnly:!0})],d.prototype,"type",void 0),(0,a._)([(0,i.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"origin",void 0),d=(0,a._)([(0,u.c)("esri.geometry.support.MeshLocalVertexSpace")],d);const c=d},23704:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(66360);const s=()=>a.c.getLogger("esri.views.3d.support.buffer.math")},54264:(e,t,r)=>{r.d(t,{CT:()=>b,Ki:()=>m,Si:()=>o,Ud:()=>l,_o:()=>f,ai:()=>u,mK:()=>w,v_:()=>y});var a=r(2600),s=r(92400),n=r(10860),i=r(4048);class o{constructor(e,t,r){this.assetName=e,this.assetMimeType=t,this.parts=r}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,s.yK)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const r=await Promise.all(t.map((t=>t.toBlob(e))));return(0,n.wp)(e),new Blob(r)}}class u{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,a.c)(this.partUrl,{responseType:"blob"});return(0,n.wp)(e),t}}function l(e){return function(e){return!!e&&(Array.isArray(e)?e.some(h):h(e))}(e?.source)}function d(e){return!!Array.isArray(e)&&e.every((e=>e instanceof o))}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,p=/\.(gltf|glb)/i;function h(e){if(e instanceof File){const{type:t,name:r}=e;return c.test(t)||p.test(r)}return c.test(e.assetMimeType)||p.test(e.assetName)}function y(e,t){if(!e)return!1;const{source:r}=e;return function(e,t){if(Array.isArray(e)){const r=e;return r.length>0&&r.every((e=>g(e,t)))}return g(e,t)}(r,t)}function f(e,t){if(e===t)return!0;const{source:r}=e,{source:a}=t;if(r===a)return!0;if(d(r)&&d(a)){if(r.length!==a.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...r].sort(e),s=[...a].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(s[e]))return!1;return!0}return!1}function g(e,t){return e instanceof o&&e.isOnService(t)}function m(e,t){return e instanceof File?(0,i.K0)(e,t):(0,i.me)(e.assetMimeType,t)??(0,i.If)(e.assetName,t)}function b(e){return Array.isArray(e)?e:[e]}function w(e){return!!e.original}},21136:(e,t,r)=>{r.d(t,{Al:()=>h,GF:()=>y,k$:()=>c,mA:()=>p,mm:()=>f,wX:()=>d});var a=r(26832),s=r(66360),n=r(67776),i=r(51232),o=r(13708),u=r(48952);function l(){return s.c.getLogger("esri.geometry.Mesh")}function d(e){const{vertexSpace:t}=e;if(null!=t.origin)return e.clone();const{anchor:r}=e,a=r.clone(),s=new i.c({origin:[a.x,a.y,a.z]}),n=e.cloneWithVertexSpace(s),{position:o}=n.vertexAttributes;return n.vertexAttributes.position=(0,u.t)(new Float64Array(o.length),o,[-a.x,-a.y,-(a.z??0)]),n.vertexAttributesChanged(),n}function c(e){return null!=e.origin}function p(e,t){if(!c(e))return null;const[r,a,s]=e.origin;return new n.c({x:r,y:a,z:s,spatialReference:t})}function h(e,t){const{x:r,y:s,z:n,spatialReference:u}=e,d=[r,s,n??0];if(void 0!==t?.geographic){if((0,a.O2)(l(),"option: geographic",{replacement:"use vertexSpace option instead",version:"4.29",warnOnce:!0}),!t?.vertexSpace)return t?.geographic?new o.c({origin:d}):new i.c({origin:d});l().warn("Deprecated geographic flag ignored since vertexSpace option is provided.")}if(!t?.vertexSpace)return u.isGeographic||u.isWebMercator?new o.c({origin:d}):new i.c({origin:d});switch(t.vertexSpace){case"local":return new o.c({origin:d});case"georeferenced":return new i.c({origin:d});case"georeferenced-absolute":return new i.c}}function y(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}function f(e,t){return"local"===e?new o.c({origin:t}):new i.c({origin:t})}},13136:(e,t,r)=>{r.d(t,{u:()=>a});const a={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},62768:(e,t,r)=>{r.d(t,{applyEdits:()=>S,cV:()=>b,cd:()=>F,uploadAssets:()=>O});var a=r(6444),s=r(2952),n=r(20744),i=r(62088),o=r(66360),u=r(10860),l=r(28176),d=r(63564),c=r(20480),p=r(6576),h=r(564),y=r(4048),f=r(71068);function g(e){return null!=e?.applyEdits}function m(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function b(e){return e.every(m)}function w(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function F(e){return e.every(w)}async function S(e,t,r,a={}){let l;const c="gdbVersion"in e?e.gdbVersion:null,h=a.gdbVersion??c;if((0,p.iC)(e)&&e.url)l=(0,p.mK)(e.url,e.layerId,h,"original-and-current-features"===a.returnServiceEditsOption);else{l=(0,u.qG)(),l.promise.then((t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)}));const t={result:l.promise};e.emit("apply-edits",t)}try{const{results:u,edits:c}=await async function(e,t,r,a){if(await e.load(),!g(t))throw new n.c(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,f.UX)(e))throw new n.c(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:u}=await async function(e,t,r){const a=(0,f.kZ)(e),i=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),u=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),l=null!=e.infoFor3D;if(function(e,t,r,a,s,i){if(!e||!a&&!s)throw new n.c(`${i}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!t.editing.supportsGlobalId&&r?.globalIdUsed)throw new n.c(`${i}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!t.editing.supportsGlobalId&&s)throw new n.c(`${i}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!r?.globalIdUsed&&s)throw new n.c(`${i}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(t,a,r,!!i,!!u,`${e.type}-layer`),!a.data.isVersioned&&r?.gdbVersion)throw new n.c(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!a.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new n.c(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const c={...r};if(null!=c.rollbackOnFailureEnabled||a.editing.supportsRollbackOnFailure||(c.rollbackOnFailureEnabled=!0),c.rollbackOnFailureEnabled||"original-and-current-features"!==c.returnServiceEditsOption||(!1===c.rollbackOnFailureEnabled&&o.c.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwritten and set to true."),c.rollbackOnFailureEnabled=!0),!a.editing.supportsReturnServiceEditsInSourceSpatialReference&&c.returnServiceEditsInSourceSR)throw new n.c(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(c.returnServiceEditsInSourceSR&&"original-and-current-features"!==c.returnServiceEditsOption)throw new n.c(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const p=function(e,t,r){const a=function(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&s.c.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}(e);if(a.addFeatures?.length&&!t.operations.supportsAdd)throw new n.c(`${r}:unsupported-operation`,"Layer does not support adding features.");if(a.updateFeatures?.length&&!t.operations.supportsUpdate)throw new n.c(`${r}:unsupported-operation`,"Layer does not support updating features.");if(a.deleteFeatures?.length&&!t.operations.supportsDelete)throw new n.c(`${r}:unsupported-operation`,"Layer does not support deleting features.");return a.addFeatures=a.addFeatures.map(q),a.updateFeatures=a.updateFeatures.map(q),a.addAssetFeatures=[],a}(t,a,`${e.type}-layer`),h=r?.globalIdUsed||l,g=e.fields.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(h){const{globalIdField:t}=e;if(null==t)throw new n.c(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");p.addFeatures.forEach((e=>function(e,t){const{attributes:r}=e;null==r[t]&&(r[t]=(0,d.cf)())}(e,t)))}return p.addFeatures.forEach((t=>function(e,t,r,a){A(e,t,r,a),v(e,t)}(t,e,h,g))),p.updateFeatures.forEach((t=>function(e,t,r,a){A(e,t,r,a),v(e,t);const s=(0,f.kZ)(t);if("geometry"in e&&null!=e.geometry&&!s?.editing.supportsGeometryUpdate)throw new n.c(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,h,g))),p.deleteFeatures.forEach((t=>function(e,t,r,a){A(e,t,r,a)}(t,e,h,g))),p.addAttachments.forEach((t=>R(t,e))),p.updateAttachments.forEach((t=>R(t,e))),l&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,a=(0,y.me)("model/gltf-binary",r.supportedFormats)??(0,y.If)("glb",r.supportedFormats);if(!a||!r.editFormats.includes(a))throw new n.c(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:s}=e;for(const t of e.addFeatures??[])E(t)&&s.push(t);for(const t of e.updateFeatures??[])E(t)&&s.push(t)}(p,e),{edits:await I(p),options:c}}(e,r,a);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await t.applyEdits(i,u)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,r,a),p=e=>e.filter((e=>!e.error)).map(i.ct),h={edits:c,addedFeatures:p(u.addFeatureResults),updatedFeatures:p(u.updateFeatureResults),deletedFeatures:p(u.deleteFeatureResults),addedAttachments:p(u.addAttachmentResults),updatedAttachments:p(u.updateAttachmentResults),deletedAttachments:p(u.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:u.editMoment?new Date(u.editMoment):null,globalIdToObjectId:a.globalIdToObjectId};return u.editedFeatureResults?.length&&(h.editedFeatures=u.editedFeatureResults),l.resolve(h),u}catch(e){throw l.reject(e),e}}function A(e,t,r,a){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new n.c(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new n.c(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(a.length&&"attributes"in e)for(const r of a){const a=e.attributes[r.name];if(void 0!==a&&!(0,h.mS)(r,a))throw new n.c(`${t.type}-layer:invalid-parameter`,`Big-integer field '${r.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new n.c(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new n.c(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function v(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D){const{geometry:r}=e;if("georeferenced"===r.vertexSpace.type)throw new n.c(`${t.type}-layer:georeferenced-mesh-unsupported`,"Uploading georeferenced meshes to a layer is not supported.")}}function R(e,t){const{feature:r,attachment:a}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!a.globalId)throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!a.data&&!a.uploadId)throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(a.data instanceof File&&a.data.name||a.name))throw new n.c(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&a.uploadId)throw new n.c(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof a.data){const e=(0,l.nV)(a.data);if(e&&!e.isBase64)throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function I(e){const t=e.addFeatures??[],r=e.updateFeatures??[],a=t.concat(r).map((e=>e.geometry)),s=await(0,c.WW)(a),n=t.length,i=r.length;return s.slice(0,n).forEach(((e,r)=>t[r].geometry=e)),s.slice(n,n+i).forEach(((e,t)=>r[t].geometry=e)),e}function q(e){const t=new a.c;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function E(e){return"mesh"===e?.geometry?.type}function O(e,t,r,a){if(!g(t))throw new n.c(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new n.c(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,a)}},50572:(e,t,r)=>{r.r(t),r.d(t,{default:()=>H});var a=r(41948),s=(r(60708),r(47620)),n=r(2600),i=r(25228),o=r(92400),u=r(20744),l=r(9456),d=r(14628),c=r(95800),p=r(66360),h=r(58820),y=r(10860),f=r(28176),g=r(63564),m=r(1580),b=r(12552),w=r(95247),F=r(21136),S=r(54264),A=r(6444),v=r(24296),R=r(60074),I=r(6704),q=r(62768);async function E(e,t,r){const{geometry:a}=t,s={...t.attributes};if(null!=r&&"mesh"===a?.type){const{transformFieldRoles:t}=r,{origin:n,spatialReference:i,transform:o}=a,u=e.spatialReference;await(0,R.initializeProjection)(i,u);const l=(0,R.project)(n,u);if(s[t.originX]=l.x,s[t.originY]=l.y,s[t.originZ]=l.z??0,null!=o){const{translation:e,scale:r,rotation:n}=o,{vertexSpace:l}=a,d="georeferenced"===l.type?1:(0,v.eg)(i)/(0,v.eg)(u);s[t.translationX]=e[0]*d,s[t.translationY]=e[2]*d,s[t.translationZ]=-e[1]*d,s[t.scaleX]=r[0],s[t.scaleY]=r[2],s[t.scaleZ]=r[1],s[t.rotationX]=n[0],s[t.rotationY]=n[2],s[t.rotationZ]=-n[1],s[t.rotationDeg]=n[3]}return{attributes:s}}return null==a?{attributes:s}:"mesh"===a.type||"extent"===a.type?null:{geometry:a.toJSON(),attributes:s}}async function O(e,t){const r=await Promise.all((t.addAttachments??[]).map((t=>x(e,t)))),a=await Promise.all((t.updateAttachments??[]).map((t=>x(e,t)))),s=t.deleteAttachments??[];return r.length||a.length||s.length?{adds:r,updates:a,deletes:[...s]}:null}async function x(e,t){const{feature:r,attachment:a}=t,{globalId:s,name:n,contentType:i,data:o,uploadId:u}=a,l={globalId:s};if(r&&("attributes"in r?l.parentGlobalId=r.attributes?.[e.globalIdField]:r.globalId&&(l.parentGlobalId=r.globalId)),u)l.uploadId=u;else if(o){const e=await(0,f.em)(o);e&&(l.contentType=e.mediaType,l.data=e.data),o instanceof File&&(l.name=o.name)}return n&&(l.name=n),i&&(l.contentType=i),l}function _(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new u.c("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}function M(e,t){return new A.c({attributes:e.attributes,geometry:(0,I.h4)({...e.geometry,spatialReference:t})})}function T(e,t){return{adds:e?.adds?.map((e=>M(e,t)))||[],updates:e?.updates?.map((e=>({original:M(e[0],t),current:M(e[1],t)})))||[],deletes:e?.deletes?.map((e=>M(e,t)))||[],spatialReference:t}}var $=r(17724),C=r(95468),N=r(48212),k=r(70388),U=r(4048),B=r(99944),L=r(49624),D=r(95776),G=r(73184),j=r(56156);const Q=new d.O({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),J=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),P=new d.O({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let V=class extends c.c{constructor(){super(...arguments),this.type="feature-layer",this.refresh=(0,y.Cu)((async()=>{await this.load();const e=this.sourceJSON.editingInfo?.lastEditDate;if(null==e)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}})),this._ongoingAssetUploads=new Map}load(e){const t=this.layer.sourceJSON,r=this._fetchService(t,{...e}).then((()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,e))).then((()=>this._ensureLatestMetadata(e)));return this.addResolvingPromise(r),Promise.resolve(this)}get queryTask(){const{capabilities:e,parsedUrl:t,dynamicDataSource:r,infoFor3D:a,gdbVersion:s,spatialReference:n,fieldsIndex:i}=this.layer,o=(0,l.c)("featurelayer-pbf")&&e?.query.supportsFormatPBF&&null==a,u=e?.operations?.supportsQueryAttachments??!1;return new C.c({url:t.path,pbfSupported:o,fieldsIndex:i,infoFor3D:a,dynamicDataSource:r,gdbVersion:s,sourceSpatialReference:n,queryAttachmentsSupported:u})}async addAttachment(e,t){await this.load();const{layer:r}=this;await(0,k.oh)(r,"editing");const a=e.attributes[r.objectIdField],s=r.parsedUrl.path+"/"+a+"/addAttachment",i=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(t,i.query);try{return _((await(0,n.c)(s,{body:o})).data.addAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(a,e)}}async updateAttachment(e,t,r){await this.load();const{layer:a}=this;await(0,k.oh)(a,"editing");const s=e.attributes[a.objectIdField],i=a.parsedUrl.path+"/"+s+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:t}}),u=this._getFormDataForAttachment(r,o.query);try{return _((await(0,n.c)(i,{body:u})).data.updateAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(s,e)}}async applyEdits(e,t){await this.load();const{layer:r}=this;await(0,k.oh)(r,"editing");const a=r.infoFor3D,i=null!=a,l=i||(t?.globalIdUsed??!1),d=i?await this._uploadMeshesAndGetAssetMapEditsJSON(e):null,c=e.addFeatures?.map((e=>E(this.layer,e,a)))??[],p=(await Promise.all(c)).filter(o.G6),h=e.updateFeatures?.map((e=>E(this.layer,e,a)))??[],y=(await Promise.all(h)).filter(o.G6),f=function(e,t,r){if(!t||0===t.length)return[];if(r&&(0,q.cd)(t))return t.map((e=>e.globalId));if((0,q.cV)(t))return t.map((e=>e.objectId));const a=r?e.globalIdField:e.objectIdField;return a?t.map((e=>e.getAttribute(a))):[]}(this.layer,e.deleteFeatures,l);(0,L.W)(p,y,r.spatialReference);const g=await O(this.layer,e),m=r.capabilities.editing.supportsAsyncApplyEdits&&i,b=t?.gdbVersion||r.gdbVersion,w={gdbVersion:b,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:l,returnEditMoment:t?.returnEditMoment,usePreviousEditMoment:t?.usePreviousEditMoment,async:m};await(0,G.eY)(this.layer.url,b,!0);const F=(0,G.oK)(this.layer.url,b||null);if(await(0,G.sy)(r.url,b,r.historicMoment))throw new u.c("feature-layer-source:historic-version","Editing a historic version is not allowed");t?.returnServiceEditsOption?(w.edits=JSON.stringify([{id:r.layerId,adds:p,updates:y,deletes:f,attachments:g,assetMaps:d}]),w.returnServiceEditsOption=Q.toJSON(t?.returnServiceEditsOption),w.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(w.adds=p.length?JSON.stringify(p):null,w.updates=y.length?JSON.stringify(y):null,w.deletes=f.length?l?JSON.stringify(f):f.join(","):null,w.attachments=g&&JSON.stringify(g),w.assetMaps=null!=d?JSON.stringify(d):void 0);const S=this._getLayerRequestOptions({method:"post",query:w});F&&(S.authMode="immediate",S.query.returnEditMoment=!0,S.query.sessionId=G.aG);const A=t?.returnServiceEditsOption?r.url:r.parsedUrl.path;let v;try{v=m?await this._asyncApplyEdits(A+"/applyEdits",S):await(0,n.c)(A+"/applyEdits",S)}catch(e){if(!function(e){const t=e.details.raw,r=+t.code,a=+t.extendedCode;return 500===r&&(-2147217144===a||-2147467261===a)}(e))throw e;S.authMode="immediate",v=m?await this._asyncApplyEdits(A+"/applyEdits",S):await(0,n.c)(A+"/applyEdits",S)}if(!r.capabilities.operations?.supportsEditing&&r.effectiveCapabilities?.operations?.supportsEditing){const e=s.id?.findCredential(r.url);await(e?.refreshToken())}return this._createEditsResult(v)}async deleteAttachments(e,t){await this.load();const{layer:r}=this;await(0,k.oh)(r,"editing");const a=e.attributes[r.objectIdField],s=r.parsedUrl.path+"/"+a+"/deleteAttachments";try{return(await(0,n.c)(s,this._getLayerRequestOptions({query:{attachmentIds:t.join(",")},method:"post"}))).data.deleteAttachmentResults.map(_)}catch(e){throw this._createAttachmentErrorResult(a,e)}}fetchRecomputedExtents(e={}){const t=e.signal;return this.load({signal:t}).then((async()=>{const t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:r,url:a}=this.layer,{data:s}=await(0,n.c)(`${a}/${r}`,t),{id:o,extent:u,fullExtent:l,timeExtent:d}=s,c=u||l;return{id:o,fullExtent:c&&w.c.fromJSON(c),timeExtent:d&&i.c.fromJSON({start:d[0],end:d[1]})}}))}async queryAttachments(e,t={}){await this.load();const r=this._getLayerRequestOptions(t);return this.queryTask.executeAttachmentQuery(e,r)}async queryFeatures(e,t){await this.load();const r=await this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)});return e.outStatistics?.length&&r.features.length&&r.features.forEach((t=>{const r=t.attributes;e.outStatistics?.forEach((({outStatisticFieldName:e})=>{if(e){const t=e.toLowerCase();t&&t in r&&e!==t&&(r[e]=r[t],delete r[t])}}))})),r}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!(0,N.Wq)(this.layer.url))return"unavailable";const e=(0,f.kn)(this.layer.url,"status"),t=await(0,n.c)(e,{query:{f:"json"}});return P.fromJSON(t.data.status)}async uploadAssets(e,t){const{uploadAssets:a}=await r.e(9920).then(r.bind(r,59920));return a(e,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},t)}async _asyncApplyEdits(e,t){const r=(await(0,n.c)(e,t)).data.statusUrl;for(;;){const e=(await(0,n.c)(r,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return(0,n.c)(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new u.c("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new u.c("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,y.iV)(z)}}_createRequestQueryOptions(e){const t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){const r={};(0,l.c)("featurelayer-advanced-symbols")&&(r.returnAdvancedSymbols=!0),t?.cacheBust&&(r._ts=Date.now());const{data:a}=await(0,n.c)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:r,signal:t?.signal}));e=a}this.sourceJSON=await this._patchServiceJSON(e,t?.signal);const r=e.type;if(!J.has(r))throw new u.c("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}async _patchServiceJSON(e,t){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){const t=(0,$.w7)(e.geometryType).renderer;(0,h.qQ)("drawingInfo.renderer",t,e)}if("esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),null==e.extent)try{const{data:r}=await(0,n.c)(this.layer.url,this._getLayerRequestOptions({signal:t}));r.spatialReference&&(e.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:r.spatialReference})}catch(e){(0,y.CE)(e)}return e}async _ensureLatestMetadata(e){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...e,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(e){const{addAssetFeatures:t}=e;if(!t?.length)return null;const r=await this._filterRedundantAssetMaps(t);if(!t?.length)return null;const a=new Array,s=new Map;for(const e of r){const{geometry:t}=e,{vertexSpace:r}=t;if((0,F.k$)(r))a.push(t);else{const r=(0,F.wX)(t);s.set(r,t),e.geometry=r,a.push(r)}}await this.uploadAssets(a);for(const[e,t]of s)t.addExternalSources(e.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(r),updates:[],deletes:[]}}_getAssetMapEditsJSON(e){const t=new Array,r=this.layer.globalIdField,a=this.layer.parsedUrl;for(const s of e){const e=s.geometry,{metadata:n}=e,i=n.getExternalSourcesOnService(a),o=s.getAttribute(r);if(0===i.length){p.c.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:u}=i.find(S.mK)??i[0],{vertexSpace:l}=e,d="georeferenced"===l.type?["PROJECT_VERTICES"]:[];for(const e of u)1===e.parts.length?t.push({globalId:(0,g.cf)(),parentGlobalId:o,assetName:e.assetName,assetHash:e.parts[0].partHash,flags:d}):p.c.getLogger(this).error(`Skipping asset ${e.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return t}_createEditsResult(e){const t=e.data,{layerId:r}=this.layer,a=[];let s=null;if(Array.isArray(t))for(const e of t)a.push({id:e.id,editedFeatures:e.editedFeatures}),e.id===r&&(s={addResults:e.addResults??[],updateResults:e.updateResults??[],deleteResults:e.deleteResults??[],attachments:e.attachments,editMoment:e.editMoment});else s=t;const n=function(e){const t=e?.assetMaps;if(t){for(const e of t.addResults)e.success||p.c.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`);for(const e of t.updateResults)e.success||p.c.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`)}const r=e?.attachments,a={addFeatureResults:e?.addResults?.map(_)??[],updateFeatureResults:e?.updateResults?.map(_)??[],deleteFeatureResults:e?.deleteResults?.map(_)??[],addAttachmentResults:r?.addResults?r.addResults.map(_):[],updateAttachmentResults:r?.updateResults?r.updateResults.map(_):[],deleteAttachmentResults:r?.deleteResults?r.deleteResults.map(_):[]};return e?.editMoment&&(a.editMoment=e.editMoment),a}(s);if(a.length>0){n.editedFeatureResults=[];for(const e of a){const{editedFeatures:t}=e,r=t?.spatialReference?new j.c(t.spatialReference):null;n.editedFeatureResults.push({layerId:e.id,editedFeatures:T(t,r)})}}return n}_createAttachmentErrorResult(e,t){const r=t.details.messages?.[0]||t.message,a=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new u.c("feature-layer-source:attachment-failure",r,{code:a})}}_getFormDataForAttachment(e,t){const r=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(r)for(const e in t){const a=t[e];null!=a&&(r.set?r.set(e,a):r.append(e,a))}return r}_getLayerRequestOptions(e={}){const{parsedUrl:t,gdbVersion:r,dynamicDataSource:a}=this.layer;return{...e,query:{gdbVersion:r,layer:a?JSON.stringify({source:a}):void 0,...t.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}async _filterRedundantAssetMaps(e){const{layer:t}=this,{globalIdField:r,infoFor3D:a,parsedUrl:s}=t;if(null==a||null==r)return e;const n=(0,U.Mn)(a);if(null==n)return e;const i=(0,f.kn)(s.path,`../${n.id}`),u=new Array,l=new Array;for(const t of e)t.geometry.metadata.getExternalSourcesOnService(s).length>0?l.push(t):u.push(t);const d=l.map((e=>e.getAttribute(r))).filter(o.G6);if(0===d.length)return e;const{assetMapFieldRoles:{parentGlobalId:c,assetHash:p}}=a,h=new D.c;h.where=`${c} IN (${d.map((e=>`'${e}'`))})`,h.outFields=[p,c],h.returnGeometry=!1;const y=await(0,B.c)(i,h),{features:g}=y;return 0===g.length?e:[...u,...l.filter((e=>{const t=e.getAttribute(r);if(!t)return!0;const{metadata:a}=e.geometry,n=g.filter((e=>e.getAttribute(c)===t));if(0===n.length)return!0;const i=n.map((e=>e.getAttribute(p)));return a.getExternalSourcesOnService(s).flatMap((({source:e})=>e.flatMap((e=>e.parts.map((e=>e.partHash)))))).some((e=>i.every((t=>e!==t))))}))]}};(0,a._)([(0,m.qq)()],V.prototype,"type",void 0),(0,a._)([(0,m.qq)({constructOnly:!0})],V.prototype,"layer",void 0),(0,a._)([(0,m.qq)({readOnly:!0})],V.prototype,"queryTask",null),V=(0,a._)([(0,b.c)("esri.layers.graphics.sources.FeatureLayerSource")],V);const z=1e3,H=V},17724:(e,t,r)=>{r.d(t,{G4:()=>p,GA:()=>d,QD:()=>c,w7:()=>o});var a=r(9456),s=r(62088),n=r(13136),i=r(9504);function o(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?i.qe:"esriGeometryPolyline"===e?i.MZ:i.yq}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function d(e,t){if((0,a.c)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${u.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const a=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new a}catch(r){return()=>({[t]:null,...e})}}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,s.ct)(e)}}]}function p(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:n.u,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[572],{48952:(e,t,r)=>{r.d(t,{a:()=>n,b:()=>o,c:()=>i,d:()=>s,e:()=>c,f:()=>u,n:()=>p,s:()=>l,t:()=>d}),r(9456);var a=r(23704);function s(e,t,r){n(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r,a=3,s=a){if(e.length/a!==Math.ceil(t.length/s))return e;const n=e.length/a,i=r[0],o=r[1],u=r[2],l=r[4],d=r[5],c=r[6],p=r[8],h=r[9],y=r[10],f=r[12],g=r[13],m=r[14];let b=0,w=0;for(let r=0;r<n;r++){const r=t[b],n=t[b+1],F=t[b+2];e[w]=i*r+l*n+p*F+f,e[w+1]=o*r+d*n+h*F+g,e[w+2]=u*r+c*n+y*F+m,b+=s,w+=a}return e}function i(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,s=3,n=s){if(e.length/s!==Math.ceil(t.length/n))return void(0,a.A)().error("source and destination buffers need to have the same number of elements");const i=e.length/s,o=r[0],u=r[1],l=r[2],d=r[3],c=r[4],p=r[5],h=r[6],y=r[7],f=r[8];let g=0,m=0;for(let r=0;r<i;r++){const r=t[g],a=t[g+1],i=t[g+2];e[m]=o*r+d*a+h*i,e[m+1]=u*r+c*a+y*i,e[m+2]=l*r+p*a+f*i,g+=n,m+=s}}function u(e,t,r){l(e.typedBuffer,t,r,e.typedBufferStride)}function l(e,t,r,a=3){const s=Math.min(e.length/a,t.count),n=t.typedBuffer,i=t.typedBufferStride;let o=0,u=0;for(let t=0;t<s;t++)e[u]=r*n[o],e[u+1]=r*n[o+1],e[u+2]=r*n[o+2],o+=i,u+=a}function d(e,t,r,a=3,s=a){const n=e.length/a;if(n!==Math.ceil(t.length/s))return e;let i=0,o=0;for(let u=0;u<n;u++)e[o]=t[i]+r[0],e[o+1]=t[i+1]+r[1],e[o+2]=t[i+2]+r[2],i+=s,o+=a;return e}function c(e,t){p(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function p(e,t,r=3,a=r){const s=Math.min(e.length/r,t.length/a);let n=0,i=0;for(let o=0;o<s;o++){const s=t[n],o=t[n+1],u=t[n+2],l=s*s+o*o+u*u;if(l>0){const t=1/Math.sqrt(l);e[i]=t*s,e[i+1]=t*o,e[i+2]=t*u}n+=a,i+=r}}Object.freeze(Object.defineProperty({__proto__:null,normalize:p,normalizeView:c,scale:l,scaleView:u,shiftRight:function(e,t,r){const a=Math.min(e.count,t.count),s=e.typedBuffer,n=e.typedBufferStride,i=t.typedBuffer,o=t.typedBufferStride;let u=0,l=0;for(let e=0;e<a;e++)s[l]=i[u]>>r,s[l+1]=i[u+1]>>r,s[l+2]=i[u+2]>>r,u+=o,l+=n},transformMat3:o,transformMat3View:i,transformMat4:n,transformMat4View:s,translate:d},Symbol.toStringTag,{value:"Module"}))},51232:(e,t,r)=>{r.d(t,{c:()=>d});var a=r(41948),s=r(3856),n=r(40504),i=r(1580),o=(r(9456),r(66360),r(72052),r(9968)),u=r(12552);let l=class extends((0,s.q)(n.am)){constructor(e){super(e),this.type="georeferenced",this.origin=null}};(0,a._)([(0,o.G)({georeferenced:"georeferenced"},{readOnly:!0})],l.prototype,"type",void 0),(0,a._)([(0,i.qq)({type:[Number],nonNullable:!1,json:{write:!0}})],l.prototype,"origin",void 0),l=(0,a._)([(0,u.c)("esri.geometry.support.MeshGeoreferencedVertexSpace")],l);const d=l},13708:(e,t,r)=>{r.d(t,{c:()=>c});var a=r(41948),s=r(3856),n=r(40504),i=r(1580),o=(r(9456),r(66360),r(72052),r(9968)),u=r(12552),l=r(62484);let d=class extends((0,s.q)(n.am)){constructor(e){super(e),this.type="local",this.origin=(0,l.Su)()}};(0,a._)([(0,o.G)({local:"local"},{readOnly:!0})],d.prototype,"type",void 0),(0,a._)([(0,i.qq)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"origin",void 0),d=(0,a._)([(0,u.c)("esri.geometry.support.MeshLocalVertexSpace")],d);const c=d},23704:(e,t,r)=>{r.d(t,{A:()=>s});var a=r(66360);const s=()=>a.c.getLogger("esri.views.3d.support.buffer.math")},54264:(e,t,r)=>{r.d(t,{CT:()=>b,Ki:()=>m,Si:()=>o,Ud:()=>l,_o:()=>f,ai:()=>u,mK:()=>w,v_:()=>y});var a=r(2600),s=r(92400),n=r(10860),i=r(4048);class o{constructor(e,t,r){this.assetName=e,this.assetMimeType=t,this.parts=r}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,s.yK)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const r=await Promise.all(t.map((t=>t.toBlob(e))));return(0,n.wp)(e),new Blob(r)}}class u{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,a.c)(this.partUrl,{responseType:"blob"});return(0,n.wp)(e),t}}function l(e){return function(e){return!!e&&(Array.isArray(e)?e.some(h):h(e))}(e?.source)}function d(e){return!!Array.isArray(e)&&e.every((e=>e instanceof o))}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,p=/\.(gltf|glb)/i;function h(e){if(e instanceof File){const{type:t,name:r}=e;return c.test(t)||p.test(r)}return c.test(e.assetMimeType)||p.test(e.assetName)}function y(e,t){if(!e)return!1;const{source:r}=e;return function(e,t){if(Array.isArray(e)){const r=e;return r.length>0&&r.every((e=>g(e,t)))}return g(e,t)}(r,t)}function f(e,t){if(e===t)return!0;const{source:r}=e,{source:a}=t;if(r===a)return!0;if(d(r)&&d(a)){if(r.length!==a.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...r].sort(e),s=[...a].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(s[e]))return!1;return!0}return!1}function g(e,t){return e instanceof o&&e.isOnService(t)}function m(e,t){return e instanceof File?(0,i.K0)(e,t):(0,i.me)(e.assetMimeType,t)??(0,i.If)(e.assetName,t)}function b(e){return Array.isArray(e)?e:[e]}function w(e){return!!e.original}},21136:(e,t,r)=>{r.d(t,{Al:()=>h,GF:()=>y,k$:()=>c,mA:()=>p,mm:()=>f,wX:()=>d});var a=r(26832),s=r(66360),n=r(67776),i=r(51232),o=r(13708),u=r(48952);function l(){return s.c.getLogger("esri.geometry.Mesh")}function d(e){const{vertexSpace:t}=e;if(null!=t.origin)return e.clone();const{anchor:r}=e,a=r.clone(),s=new i.c({origin:[a.x,a.y,a.z]}),n=e.cloneWithVertexSpace(s),{position:o}=n.vertexAttributes;return n.vertexAttributes.position=(0,u.t)(new Float64Array(o.length),o,[-a.x,-a.y,-(a.z??0)]),n.vertexAttributesChanged(),n}function c(e){return null!=e.origin}function p(e,t){if(!c(e))return null;const[r,a,s]=e.origin;return new n.c({x:r,y:a,z:s,spatialReference:t})}function h(e,t){const{x:r,y:s,z:n,spatialReference:u}=e,d=[r,s,n??0];if(void 0!==t?.geographic){if((0,a.O2)(l(),"option: geographic",{replacement:"use vertexSpace option instead",version:"4.29",warnOnce:!0}),!t?.vertexSpace)return t?.geographic?new o.c({origin:d}):new i.c({origin:d});l().warn("Deprecated geographic flag ignored since vertexSpace option is provided.")}if(!t?.vertexSpace)return u.isGeographic||u.isWebMercator?new o.c({origin:d}):new i.c({origin:d});switch(t.vertexSpace){case"local":return new o.c({origin:d});case"georeferenced":return new i.c({origin:d});case"georeferenced-absolute":return new i.c}}function y(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}function f(e,t){return"local"===e?new o.c({origin:t}):new i.c({origin:t})}},13136:(e,t,r)=>{r.d(t,{u:()=>a});const a={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},62768:(e,t,r)=>{r.d(t,{applyEdits:()=>S,cV:()=>b,cd:()=>F,uploadAssets:()=>O});var a=r(6444),s=r(2952),n=r(20744),i=r(62088),o=r(66360),u=r(10860),l=r(28176),d=r(63564),c=r(20480),p=r(6576),h=r(564),y=r(4048),f=r(71068);function g(e){return null!=e?.applyEdits}function m(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function b(e){return e.every(m)}function w(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function F(e){return e.every(w)}async function S(e,t,r,a={}){let l;const c="gdbVersion"in e?e.gdbVersion:null,h=a.gdbVersion??c;if((0,p.iC)(e)&&e.url)l=(0,p.mK)(e.url,e.layerId,h,"original-and-current-features"===a.returnServiceEditsOption);else{l=(0,u.qG)(),l.promise.then((t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)}));const t={result:l.promise};e.emit("apply-edits",t)}try{const{results:u,edits:c}=await async function(e,t,r,a){if(await e.load(),!g(t))throw new n.c(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,f.UX)(e))throw new n.c(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:u}=await async function(e,t,r){const a=(0,f.kZ)(e),i=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),u=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),l=null!=e.infoFor3D;if(function(e,t,r,a,s,i){if(!e||!a&&!s)throw new n.c(`${i}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!t.editing.supportsGlobalId&&r?.globalIdUsed)throw new n.c(`${i}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!t.editing.supportsGlobalId&&s)throw new n.c(`${i}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!r?.globalIdUsed&&s)throw new n.c(`${i}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(t,a,r,!!i,!!u,`${e.type}-layer`),!a.data.isVersioned&&r?.gdbVersion)throw new n.c(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!a.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new n.c(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const c={...r};if(null!=c.rollbackOnFailureEnabled||a.editing.supportsRollbackOnFailure||(c.rollbackOnFailureEnabled=!0),c.rollbackOnFailureEnabled||"original-and-current-features"!==c.returnServiceEditsOption||(!1===c.rollbackOnFailureEnabled&&o.c.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwritten and set to true."),c.rollbackOnFailureEnabled=!0),!a.editing.supportsReturnServiceEditsInSourceSpatialReference&&c.returnServiceEditsInSourceSR)throw new n.c(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(c.returnServiceEditsInSourceSR&&"original-and-current-features"!==c.returnServiceEditsOption)throw new n.c(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const p=function(e,t,r){const a=function(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&s.c.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}(e);if(a.addFeatures?.length&&!t.operations.supportsAdd)throw new n.c(`${r}:unsupported-operation`,"Layer does not support adding features.");if(a.updateFeatures?.length&&!t.operations.supportsUpdate)throw new n.c(`${r}:unsupported-operation`,"Layer does not support updating features.");if(a.deleteFeatures?.length&&!t.operations.supportsDelete)throw new n.c(`${r}:unsupported-operation`,"Layer does not support deleting features.");return a.addFeatures=a.addFeatures.map(q),a.updateFeatures=a.updateFeatures.map(q),a.addAssetFeatures=[],a}(t,a,`${e.type}-layer`),h=r?.globalIdUsed||l,g=e.fields.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(h){const{globalIdField:t}=e;if(null==t)throw new n.c(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");p.addFeatures.forEach((e=>function(e,t){const{attributes:r}=e;null==r[t]&&(r[t]=(0,d.cf)())}(e,t)))}return p.addFeatures.forEach((t=>function(e,t,r,a){A(e,t,r,a),v(e,t)}(t,e,h,g))),p.updateFeatures.forEach((t=>function(e,t,r,a){A(e,t,r,a),v(e,t);const s=(0,f.kZ)(t);if("geometry"in e&&null!=e.geometry&&!s?.editing.supportsGeometryUpdate)throw new n.c(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,h,g))),p.deleteFeatures.forEach((t=>function(e,t,r,a){A(e,t,r,a)}(t,e,h,g))),p.addAttachments.forEach((t=>R(t,e))),p.updateAttachments.forEach((t=>R(t,e))),l&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,a=(0,y.me)("model/gltf-binary",r.supportedFormats)??(0,y.If)("glb",r.supportedFormats);if(!a||!r.editFormats.includes(a))throw new n.c(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:s}=e;for(const t of e.addFeatures??[])E(t)&&s.push(t);for(const t of e.updateFeatures??[])E(t)&&s.push(t)}(p,e),{edits:await I(p),options:c}}(e,r,a);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await t.applyEdits(i,u)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,r,a),p=e=>e.filter((e=>!e.error)).map(i.ct),h={edits:c,addedFeatures:p(u.addFeatureResults),updatedFeatures:p(u.updateFeatureResults),deletedFeatures:p(u.deleteFeatureResults),addedAttachments:p(u.addAttachmentResults),updatedAttachments:p(u.updateAttachmentResults),deletedAttachments:p(u.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:u.editMoment?new Date(u.editMoment):null,globalIdToObjectId:a.globalIdToObjectId};return u.editedFeatureResults?.length&&(h.editedFeatures=u.editedFeatureResults),l.resolve(h),u}catch(e){throw l.reject(e),e}}function A(e,t,r,a){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new n.c(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new n.c(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(a.length&&"attributes"in e)for(const r of a){const a=e.attributes[r.name];if(void 0!==a&&!(0,h.mS)(r,a))throw new n.c(`${t.type}-layer:invalid-parameter`,`Big-integer field '${r.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new n.c(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new n.c(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function v(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D){const{geometry:r}=e;if("georeferenced"===r.vertexSpace.type)throw new n.c(`${t.type}-layer:georeferenced-mesh-unsupported`,"Uploading georeferenced meshes to a layer is not supported.")}}function R(e,t){const{feature:r,attachment:a}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!a.globalId)throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!a.data&&!a.uploadId)throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(a.data instanceof File&&a.data.name||a.name))throw new n.c(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&a.uploadId)throw new n.c(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof a.data){const e=(0,l.nV)(a.data);if(e&&!e.isBase64)throw new n.c(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function I(e){const t=e.addFeatures??[],r=e.updateFeatures??[],a=t.concat(r).map((e=>e.geometry)),s=await(0,c.WW)(a),n=t.length,i=r.length;return s.slice(0,n).forEach(((e,r)=>t[r].geometry=e)),s.slice(n,n+i).forEach(((e,t)=>r[t].geometry=e)),e}function q(e){const t=new a.c;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function E(e){return"mesh"===e?.geometry?.type}function O(e,t,r,a){if(!g(t))throw new n.c(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new n.c(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,a)}},50572:(e,t,r)=>{r.r(t),r.d(t,{default:()=>H});var a=r(41948),s=(r(60708),r(47620)),n=r(2600),i=r(25228),o=r(92400),u=r(20744),l=r(9456),d=r(14628),c=r(95800),p=r(66360),h=r(58820),y=r(10860),f=r(28176),g=r(63564),m=r(1580),b=r(12552),w=r(95247),F=r(21136),S=r(54264),A=r(6444),v=r(24296),R=r(60074),I=r(6704),q=r(62768);async function E(e,t,r){const{geometry:a}=t,s={...t.attributes};if(null!=r&&"mesh"===a?.type){const{transformFieldRoles:t}=r,{origin:n,spatialReference:i,transform:o}=a,u=e.spatialReference;await(0,R.initializeProjection)(i,u);const l=(0,R.project)(n,u);if(s[t.originX]=l.x,s[t.originY]=l.y,s[t.originZ]=l.z??0,null!=o){const{translation:e,scale:r,rotation:n}=o,{vertexSpace:l}=a,d="georeferenced"===l.type?1:(0,v.eg)(i)/(0,v.eg)(u);s[t.translationX]=e[0]*d,s[t.translationY]=e[2]*d,s[t.translationZ]=-e[1]*d,s[t.scaleX]=r[0],s[t.scaleY]=r[2],s[t.scaleZ]=r[1],s[t.rotationX]=n[0],s[t.rotationY]=n[2],s[t.rotationZ]=-n[1],s[t.rotationDeg]=n[3]}return{attributes:s}}return null==a?{attributes:s}:"mesh"===a.type||"extent"===a.type?null:{geometry:a.toJSON(),attributes:s}}async function O(e,t){const r=await Promise.all((t.addAttachments??[]).map((t=>x(e,t)))),a=await Promise.all((t.updateAttachments??[]).map((t=>x(e,t)))),s=t.deleteAttachments??[];return r.length||a.length||s.length?{adds:r,updates:a,deletes:[...s]}:null}async function x(e,t){const{feature:r,attachment:a}=t,{globalId:s,name:n,contentType:i,data:o,uploadId:u}=a,l={globalId:s};if(r&&("attributes"in r?l.parentGlobalId=r.attributes?.[e.globalIdField]:r.globalId&&(l.parentGlobalId=r.globalId)),u)l.uploadId=u;else if(o){const e=await(0,f.em)(o);e&&(l.contentType=e.mediaType,l.data=e.data),o instanceof File&&(l.name=o.name)}return n&&(l.name=n),i&&(l.contentType=i),l}function _(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new u.c("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}function M(e,t){return new A.c({attributes:e.attributes,geometry:(0,I.h4)({...e.geometry,spatialReference:t})})}function T(e,t){return{adds:e?.adds?.map((e=>M(e,t)))||[],updates:e?.updates?.map((e=>({original:M(e[0],t),current:M(e[1],t)})))||[],deletes:e?.deletes?.map((e=>M(e,t)))||[],spatialReference:t}}var $=r(17724),C=r(95468),N=r(48212),k=r(70388),U=r(4048),B=r(99944),L=r(49624),D=r(95776),G=r(73184),j=r(56156);const Q=new d.O({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),J=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),P=new d.O({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let V=class extends c.c{constructor(){super(...arguments),this.type="feature-layer",this.refresh=(0,y.Cu)((async()=>{await this.load();const e=this.sourceJSON.editingInfo?.lastEditDate;if(null==e)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}})),this._ongoingAssetUploads=new Map}load(e){const t=this.layer.sourceJSON,r=this._fetchService(t,{...e}).then((()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,e))).then((()=>this._ensureLatestMetadata(e)));return this.addResolvingPromise(r),Promise.resolve(this)}get queryTask(){const{capabilities:e,parsedUrl:t,dynamicDataSource:r,infoFor3D:a,gdbVersion:s,spatialReference:n,fieldsIndex:i}=this.layer,o=(0,l.c)("featurelayer-pbf")&&e?.query.supportsFormatPBF&&null==a,u=e?.operations?.supportsQueryAttachments??!1;return new C.c({url:t.path,pbfSupported:o,fieldsIndex:i,infoFor3D:a,dynamicDataSource:r,gdbVersion:s,sourceSpatialReference:n,queryAttachmentsSupported:u})}async addAttachment(e,t){await this.load();const{layer:r}=this;await(0,k.oh)(r,"editing");const a=e.attributes[r.objectIdField],s=r.parsedUrl.path+"/"+a+"/addAttachment",i=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(t,i.query);try{return _((await(0,n.c)(s,{body:o})).data.addAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(a,e)}}async updateAttachment(e,t,r){await this.load();const{layer:a}=this;await(0,k.oh)(a,"editing");const s=e.attributes[a.objectIdField],i=a.parsedUrl.path+"/"+s+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:t}}),u=this._getFormDataForAttachment(r,o.query);try{return _((await(0,n.c)(i,{body:u})).data.updateAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(s,e)}}async applyEdits(e,t){await this.load();const{layer:r}=this;await(0,k.oh)(r,"editing");const a=r.infoFor3D,i=null!=a,l=i||(t?.globalIdUsed??!1),d=i?await this._uploadMeshesAndGetAssetMapEditsJSON(e):null,c=e.addFeatures?.map((e=>E(this.layer,e,a)))??[],p=(await Promise.all(c)).filter(o.G6),h=e.updateFeatures?.map((e=>E(this.layer,e,a)))??[],y=(await Promise.all(h)).filter(o.G6),f=function(e,t,r){if(!t||0===t.length)return[];if(r&&(0,q.cd)(t))return t.map((e=>e.globalId));if((0,q.cV)(t))return t.map((e=>e.objectId));const a=r?e.globalIdField:e.objectIdField;return a?t.map((e=>e.getAttribute(a))):[]}(this.layer,e.deleteFeatures,l);(0,L.W)(p,y,r.spatialReference);const g=await O(this.layer,e),m=r.capabilities.editing.supportsAsyncApplyEdits&&i,b=t?.gdbVersion||r.gdbVersion,w={gdbVersion:b,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:l,returnEditMoment:t?.returnEditMoment,usePreviousEditMoment:t?.usePreviousEditMoment,async:m};await(0,G.eY)(this.layer.url,b,!0);const F=(0,G.oK)(this.layer.url,b||null);if(await(0,G.sy)(r.url,b,r.historicMoment))throw new u.c("feature-layer-source:historic-version","Editing a historic version is not allowed");t?.returnServiceEditsOption?(w.edits=JSON.stringify([{id:r.layerId,adds:p,updates:y,deletes:f,attachments:g,assetMaps:d}]),w.returnServiceEditsOption=Q.toJSON(t?.returnServiceEditsOption),w.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(w.adds=p.length?JSON.stringify(p):null,w.updates=y.length?JSON.stringify(y):null,w.deletes=f.length?l?JSON.stringify(f):f.join(","):null,w.attachments=g&&JSON.stringify(g),w.assetMaps=null!=d?JSON.stringify(d):void 0);const S=this._getLayerRequestOptions({method:"post",query:w});F&&(S.authMode="immediate",S.query.returnEditMoment=!0,S.query.sessionId=G.aG);const A=t?.returnServiceEditsOption?r.url:r.parsedUrl.path;let v;try{v=m?await this._asyncApplyEdits(A+"/applyEdits",S):await(0,n.c)(A+"/applyEdits",S)}catch(e){if(!function(e){const t=e.details.raw,r=+t.code,a=+t.extendedCode;return 500===r&&(-2147217144===a||-2147467261===a)}(e))throw e;S.authMode="immediate",v=m?await this._asyncApplyEdits(A+"/applyEdits",S):await(0,n.c)(A+"/applyEdits",S)}if(!r.capabilities.operations?.supportsEditing&&r.effectiveCapabilities?.operations?.supportsEditing){const e=s.id?.findCredential(r.url);await(e?.refreshToken())}return this._createEditsResult(v)}async deleteAttachments(e,t){await this.load();const{layer:r}=this;await(0,k.oh)(r,"editing");const a=e.attributes[r.objectIdField],s=r.parsedUrl.path+"/"+a+"/deleteAttachments";try{return(await(0,n.c)(s,this._getLayerRequestOptions({query:{attachmentIds:t.join(",")},method:"post"}))).data.deleteAttachmentResults.map(_)}catch(e){throw this._createAttachmentErrorResult(a,e)}}fetchRecomputedExtents(e={}){const t=e.signal;return this.load({signal:t}).then((async()=>{const t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:r,url:a}=this.layer,{data:s}=await(0,n.c)(`${a}/${r}`,t),{id:o,extent:u,fullExtent:l,timeExtent:d}=s,c=u||l;return{id:o,fullExtent:c&&w.c.fromJSON(c),timeExtent:d&&i.c.fromJSON({start:d[0],end:d[1]})}}))}async queryAttachments(e,t={}){await this.load();const r=this._getLayerRequestOptions(t);return this.queryTask.executeAttachmentQuery(e,r)}async queryFeatures(e,t){await this.load();const r=await this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)});return e.outStatistics?.length&&r.features.length&&r.features.forEach((t=>{const r=t.attributes;e.outStatistics?.forEach((({outStatisticFieldName:e})=>{if(e){const t=e.toLowerCase();t&&t in r&&e!==t&&(r[e]=r[t],delete r[t])}}))})),r}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!(0,N.Wq)(this.layer.url))return"unavailable";const e=(0,f.kn)(this.layer.url,"status"),t=await(0,n.c)(e,{query:{f:"json"}});return P.fromJSON(t.data.status)}async uploadAssets(e,t){const{uploadAssets:a}=await r.e(9920).then(r.bind(r,59920));return a(e,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},t)}async _asyncApplyEdits(e,t){const r=(await(0,n.c)(e,t)).data.statusUrl;for(;;){const e=(await(0,n.c)(r,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return(0,n.c)(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new u.c("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new u.c("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,y.iV)(z)}}_createRequestQueryOptions(e){const t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){const r={};(0,l.c)("featurelayer-advanced-symbols")&&(r.returnAdvancedSymbols=!0),t?.cacheBust&&(r._ts=Date.now());const{data:a}=await(0,n.c)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:r,signal:t?.signal}));e=a}this.sourceJSON=await this._patchServiceJSON(e,t?.signal);const r=e.type;if(!J.has(r))throw new u.c("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}async _patchServiceJSON(e,t){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){const t=(0,$.w7)(e.geometryType).renderer;(0,h.qQ)("drawingInfo.renderer",t,e)}if("esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),null==e.extent)try{const{data:r}=await(0,n.c)(this.layer.url,this._getLayerRequestOptions({signal:t}));r.spatialReference&&(e.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:r.spatialReference})}catch(e){(0,y.CE)(e)}return e}async _ensureLatestMetadata(e){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...e,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(e){const{addAssetFeatures:t}=e;if(!t?.length)return null;const r=await this._filterRedundantAssetMaps(t);if(!t?.length)return null;const a=new Array,s=new Map;for(const e of r){const{geometry:t}=e,{vertexSpace:r}=t;if((0,F.k$)(r))a.push(t);else{const r=(0,F.wX)(t);s.set(r,t),e.geometry=r,a.push(r)}}await this.uploadAssets(a);for(const[e,t]of s)t.addExternalSources(e.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(r),updates:[],deletes:[]}}_getAssetMapEditsJSON(e){const t=new Array,r=this.layer.globalIdField,a=this.layer.parsedUrl;for(const s of e){const e=s.geometry,{metadata:n}=e,i=n.getExternalSourcesOnService(a),o=s.getAttribute(r);if(0===i.length){p.c.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:u}=i.find(S.mK)??i[0],{vertexSpace:l}=e,d="georeferenced"===l.type?["PROJECT_VERTICES"]:[];for(const e of u)1===e.parts.length?t.push({globalId:(0,g.cf)(),parentGlobalId:o,assetName:e.assetName,assetHash:e.parts[0].partHash,flags:d}):p.c.getLogger(this).error(`Skipping asset ${e.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return t}_createEditsResult(e){const t=e.data,{layerId:r}=this.layer,a=[];let s=null;if(Array.isArray(t))for(const e of t)a.push({id:e.id,editedFeatures:e.editedFeatures}),e.id===r&&(s={addResults:e.addResults??[],updateResults:e.updateResults??[],deleteResults:e.deleteResults??[],attachments:e.attachments,editMoment:e.editMoment});else s=t;const n=function(e){const t=e?.assetMaps;if(t){for(const e of t.addResults)e.success||p.c.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`);for(const e of t.updateResults)e.success||p.c.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`)}const r=e?.attachments,a={addFeatureResults:e?.addResults?.map(_)??[],updateFeatureResults:e?.updateResults?.map(_)??[],deleteFeatureResults:e?.deleteResults?.map(_)??[],addAttachmentResults:r?.addResults?r.addResults.map(_):[],updateAttachmentResults:r?.updateResults?r.updateResults.map(_):[],deleteAttachmentResults:r?.deleteResults?r.deleteResults.map(_):[]};return e?.editMoment&&(a.editMoment=e.editMoment),a}(s);if(a.length>0){n.editedFeatureResults=[];for(const e of a){const{editedFeatures:t}=e,r=t?.spatialReference?new j.c(t.spatialReference):null;n.editedFeatureResults.push({layerId:e.id,editedFeatures:T(t,r)})}}return n}_createAttachmentErrorResult(e,t){const r=t.details.messages?.[0]||t.message,a=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new u.c("feature-layer-source:attachment-failure",r,{code:a})}}_getFormDataForAttachment(e,t){const r=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(r)for(const e in t){const a=t[e];null!=a&&(r.set?r.set(e,a):r.append(e,a))}return r}_getLayerRequestOptions(e={}){const{parsedUrl:t,gdbVersion:r,dynamicDataSource:a}=this.layer;return{...e,query:{gdbVersion:r,layer:a?JSON.stringify({source:a}):void 0,...t.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}async _filterRedundantAssetMaps(e){const{layer:t}=this,{globalIdField:r,infoFor3D:a,parsedUrl:s}=t;if(null==a||null==r)return e;const n=(0,U.Mn)(a);if(null==n)return e;const i=(0,f.kn)(s.path,`../${n.id}`),u=new Array,l=new Array;for(const t of e)t.geometry.metadata.getExternalSourcesOnService(s).length>0?l.push(t):u.push(t);const d=l.map((e=>e.getAttribute(r))).filter(o.G6);if(0===d.length)return e;const{assetMapFieldRoles:{parentGlobalId:c,assetHash:p}}=a,h=new D.c({where:`${c} IN (${d.map((e=>`'${e}'`))})`,outFields:[p,c],returnGeometry:!1}),y=await(0,B.c)(i,h),{features:g}=y;return 0===g.length?e:[...u,...l.filter((e=>{const t=e.getAttribute(r);if(!t)return!0;const{metadata:a}=e.geometry,n=g.filter((e=>e.getAttribute(c)===t));if(0===n.length)return!0;const i=n.map((e=>e.getAttribute(p)));return a.getExternalSourcesOnService(s).flatMap((({source:e})=>e.flatMap((e=>e.parts.map((e=>e.partHash)))))).some((e=>i.every((t=>e!==t))))}))]}};(0,a._)([(0,m.qq)()],V.prototype,"type",void 0),(0,a._)([(0,m.qq)({constructOnly:!0})],V.prototype,"layer",void 0),(0,a._)([(0,m.qq)({readOnly:!0})],V.prototype,"queryTask",null),V=(0,a._)([(0,b.c)("esri.layers.graphics.sources.FeatureLayerSource")],V);const z=1e3,H=V},17724:(e,t,r)=>{r.d(t,{G4:()=>p,GA:()=>d,QD:()=>c,w7:()=>o});var a=r(9456),s=r(62088),n=r(13136),i=r(9504);function o(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?i.qe:"esriGeometryPolyline"===e?i.MZ:i.yq}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function d(e,t){if((0,a.c)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${u.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const a=new Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new a}catch(r){return()=>({[t]:null,...e})}}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,s.ct)(e)}}]}function p(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:n.u,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1980],{81980:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(90124),l(97760),l(80324),l(68828),l(70984),l(11925),l(88196),l(32704),l(49168),l(55164),l(41804),l(11544),l(2288),l(
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1980],{81980:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(90124),l(97760),l(80324),l(68828),l(70984),l(11925),l(88196),l(32704),l(49168),l(55164),l(41804),l(11544),l(2288),l(23792),l(57704),l(53672),l(50143),l(36908),l(81832),l(64352),l(36244),l(93904),l(29484),l(95224),l(56124),l(56192),l(95464),l(60288),l(14920),l(49916),l(56336),l(4636);var s=l(59888)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5472],{25228:(t,e,i)=>{i.d(e,{c:()=>m});var o,r=i(41948),s=i(40504),n=i(94360),l=i(1580),a=(i(9456),i(66360),i(72052),i(33600)),h=i(12552),p=i(18996),c=i(28484);let y=o=class extends s.am{static get allTime(){return u}static get empty(){return d}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(o.allTime)}get isEmpty(){return this.equals(o.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new o({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,o=t.start?.getTime()??t.start,r=t.end?.getTime()??t.end;return e===o&&i===r}expandTo(t,e=c.OX){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,n.aU)(i,t,e));let r=this.end;if(r){const i=(0,n.aU)(r,t,e);r=r.getTime()===i.getTime()?i:(0,n.g1)(i,1,t,e)}return new o({start:i,end:r})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return o.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,r=t.start?.getTime()??-1/0,s=t.end?.getTime()??1/0;let n,l;return r>=e&&r<=i?n=r:e>=r&&e<=s&&(n=e),i>=r&&i<=s?l=i:s>=e&&s<=i&&(l=s),null==n||null==l||isNaN(n)||isNaN(l)?o.empty:new o({start:n===-1/0?null:new Date(n),end:l===1/0?null:new Date(l)})}offset(t,e,i=c.OX){if(this.isEmpty||this.isAllTime)return this.clone();const r=new o,{start:s,end:l}=this;return null!=s&&(r.start=(0,n.g1)(s,t,e,i)),null!=l&&(r.end=(0,n.g1)(l,t,e,i)),r}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return u.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,i=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new o({start:e,end:i})}};(0,r._)([(0,l.qq)({type:Date,json:{write:{allowNull:!0}}})],y.prototype,"end",void 0),(0,r._)([(0,a.E)("end")],y.prototype,"readEnd",null),(0,r._)([(0,p.G)("end")],y.prototype,"writeEnd",null),(0,r._)([(0,l.qq)({readOnly:!0,json:{read:!1}})],y.prototype,"isAllTime",null),(0,r._)([(0,l.qq)({readOnly:!0,json:{read:!1}})],y.prototype,"isEmpty",null),(0,r._)([(0,l.qq)({type:Date,json:{write:{allowNull:!0}}})],y.prototype,"start",void 0),(0,r._)([(0,a.E)("start")],y.prototype,"readStart",null),(0,r._)([(0,p.G)("start")],y.prototype,"writeStart",null),y=o=(0,r._)([(0,h.c)("esri.TimeExtent")],y);const u=new y,d=new y({start:void 0,end:void 0}),m=y},3856:(t,e,i)=>{i.d(e,{m:()=>c,q:()=>p});var o=i(41948),r=i(43780),s=(i(9456),i(62088)),n=(i(66360),i(70680)),l=i(71448),a=i(20916),h=i(12552);const p=t=>{let e=class extends t{clone(){const t=(0,a.m6)(this);(0,n.EN)(t,"unable to clone instance of non-accessor class");const e=t.metadata,i=t.store,o={},r=new Map;for(const t in e){const n=e[t],a=i?.originOf(t),h=n.clonable;if(n.readOnly||!1===h||a!==l.sT.USER&&a!==l.sT.DEFAULTS&&a!==l.sT.WEB_MAP&&a!==l.sT.WEB_SCENE)continue;const p=this[t];let c=null;c="function"==typeof h?h(p):"reference"===h?p:(0,s.gx)(p),null!=p&&null==c||(a===l.sT.DEFAULTS?r.set(t,c):o[t]=c)}const h=new(0,Object.getPrototypeOf(this).constructor)(o);if(r.size){const t=(0,a.m6)(h)?.store;if(t)for(const[e,i]of r)t.set(e,i,l.sT.DEFAULTS)}return h}};return e=(0,o._)([(0,h.c)("esri.core.Clonable")],e),e};let c=class extends(p(r.c)){};c=(0,o._)([(0,h.c)("esri.core.Clonable")],c)},57896:(t,e,i)=>{i.d(e,{Eq:()=>y,KG:()=>S,_8:()=>w,_I:()=>h,aE:()=>a,du:()=>m,on:()=>c}),i(40196),i(2952);var o=i(60976),r=i(38912),s=i(70680),n=i(10860),l=i(37176);function a(t,e,i={}){return p(t,e,i,u)}function h(t,e,i={}){return p(t,e,i,d)}function p(t,e,i={},o){let r=null;const n=i.once?(t,i)=>{o(t)&&((0,s.oR)(r),e(t,i))}:(t,i)=>{o(t)&&e(t,i)};if(r=(0,l.M9)(t,n,i.sync,i.equals),i.initial){const e=t();n(e,e)}return r}function c(t,e,i,n={}){let l=null,h=null,p=null;function c(){l&&h&&(h.remove(),n.onListenerRemove?.(l),l=null,h=null)}function y(t){n.once&&n.once&&(0,s.oR)(p),i(t)}const u=a(t,((t,i)=>{c(),(0,o.sh)(t)&&(l=t,h=(0,o.on)(t,e,y),n.onListenerAdd?.(t))}),{sync:n.sync,initial:!0});return p=(0,r.uU)((()=>{u.remove(),c()})),p}function y(t,e){return function(t,e,i){if((0,n.wv)(i))return Promise.reject((0,n.Uh)());const o=t();if(e?.(o))return Promise.resolve(o);let l=null;function a(){l=(0,s.oR)(l)}return new Promise(((o,s)=>{l=(0,r.Ip)([(0,n.wD)(i,(()=>{a(),s((0,n.Uh)())})),p(t,(t=>{a(),o(t)}),{sync:!1,once:!0},e??u)])}))}(t,d,e)}function u(t){return!0}function d(t){return!!t}i(41168);const m={sync:!0},w={initial:!0},S={sync:!0,initial:!0}},31376:(t,e,i)=>{i.d(e,{c:()=>h});var o=i(41948),r=i(1580),s=(i(9456),i(66360),i(72052),i(12552)),n=i(7432),l=i(71996);let a=class extends l.c{constructor(t){super(t),this.outline=null,this.type=null}hash(){return`${this.type}.${this.outline&&this.outline.hash()}`}};(0,o._)([(0,r.qq)({types:{key:"type",base:null,defaultKeyValue:"simple-line",typeMap:{"simple-line":n.c}},json:{default:null,write:!0}})],a.prototype,"outline",void 0),(0,o._)([(0,r.qq)({type:["simple-fill","picture-fill"],readOnly:!0})],a.prototype,"type",void 0),a=(0,o._)([(0,s.c)("esri.symbols.FillSymbol")],a);const h=a},73771:(t,e,i)=>{i.d(e,{c:()=>y});var o,r=i(41948),s=i(40504),n=i(50144),l=i(1580),a=i(33392),h=(i(72052),i(9456),i(12552)),p=i(39056);let c=o=class extends s.am{constructor(t){super(t),this.decoration="none",this.family="sans-serif",this.size=9,this.style="normal",this.weight="normal"}castSize(t){return(0,n.Qz)(t)}clone(){return new o({decoration:this.decoration,family:this.family,size:this.size,style:this.style,weight:this.weight})}hash(){return`${this.decoration}.${this.family}.${this.size}.${this.style}.${this.weight}`}};(0,r._)([(0,l.qq)({type:p.Up,json:{default:"none",write:!0}})],c.prototype,"decoration",void 0),(0,r._)([(0,l.qq)({type:String,json:{write:!0}})],c.prototype,"family",void 0),(0,r._)([(0,l.qq)({type:Number,json:{write:{overridePolicy:(t,e,i)=>({enabled:!i||!i.textSymbol3D})}}})],c.prototype,"size",void 0),(0,r._)([(0,a.W)("size")],c.prototype,"castSize",null),(0,r._)([(0,l.qq)({type:p.Go,json:{default:"normal",write:!0}})],c.prototype,"style",void 0),(0,r._)([(0,l.qq)({type:p.Ge,json:{default:"normal",write:!0}})],c.prototype,"weight",void 0),c=o=(0,r._)([(0,h.c)("esri.symbols.Font")],c);const y=c},74483:(t,e,i)=>{i.d(e,{c:()=>h});var o=i(41948),r=i(50144),s=i(1580),n=(i(9456),i(66360),i(72052),i(12552)),l=i(71996);let a=class extends l.c{constructor(t){super(t),this.angle=0,this.type=null,this.xoffset=0,this.yoffset=0,this.size=9}hash(){return`${this.type}.${this.angle}.${this.size}.${this.xoffset}.${this.yoffset}`}};(0,o._)([(0,s.qq)({type:Number,json:{read:t=>t&&-1*t,write:(t,e)=>e.angle=t&&-1*t}})],a.prototype,"angle",void 0),(0,o._)([(0,s.qq)({type:["simple-marker","picture-marker"],readOnly:!0})],a.prototype,"type",void 0),(0,o._)([(0,s.qq)({type:Number,cast:r.Qz,json:{write:!0}})],a.prototype,"xoffset",void 0),(0,o._)([(0,s.qq)({type:Number,cast:r.Qz,json:{write:!0}})],a.prototype,"yoffset",void 0),(0,o._)([(0,s.qq)({type:Number,cast:t=>"auto"===t?t:(0,r.Qz)(t),json:{write:!0}})],a.prototype,"size",void 0),a=(0,o._)([(0,n.c)("esri.symbols.MarkerSymbol")],a);const h=a},47472:(t,e,i)=>{i.d(e,{c:()=>m});var o,r=i(41948),s=i(44728),n=i(14628),l=i(62088),a=i(1580),h=(i(9456),i(66360),i(9968)),p=i(12552),c=i(31376),y=i(7432);const u=new n.O({esriSFSSolid:"solid",esriSFSNull:"none",esriSFSHorizontal:"horizontal",esriSFSVertical:"vertical",esriSFSForwardDiagonal:"forward-diagonal",esriSFSBackwardDiagonal:"backward-diagonal",esriSFSCross:"cross",esriSFSDiagonalCross:"diagonal-cross"});let d=o=class extends c.c{constructor(...t){super(...t),this.color=new s.c([0,0,0,.25]),this.outline=new y.c,this.type="simple-fill",this.style="solid"}normalizeCtorArgs(t,e,i){if(t&&"string"!=typeof t)return t;const o={};return t&&(o.style=t),e&&(o.outline=e),i&&(o.color=i),o}clone(){return new o({color:(0,l.ct)(this.color),outline:this.outline&&this.outline.clone(),style:this.style})}hash(){return`${super.hash()}${this.style}.${this.color&&this.color.hash()}`}};(0,r._)([(0,a.qq)()],d.prototype,"color",void 0),(0,r._)([(0,a.qq)()],d.prototype,"outline",void 0),(0,r._)([(0,h.G)({esriSFS:"simple-fill"},{readOnly:!0})],d.prototype,"type",void 0),(0,r._)([(0,a.qq)({type:u.apiValues,json:{read:u.read,write:u.write}})],d.prototype,"style",void 0),d=o=(0,r._)([(0,p.c)("esri.symbols.SimpleFillSymbol")],d);const m=d},7432:(t,e,i)=>{i.d(e,{c:()=>L});var o=i(41948),r=i(14628),s=i(62088),n=i(50144),l=i(1580),a=(i(9456),i(66360),i(9968)),h=i(12552),p=(i(72052),i(71996));let c=class extends p.c{constructor(t){super(t),this.type="simple-line",this.width=.75}hash(){return`${this.type}.${this.width}`}};(0,o._)([(0,a.G)({esriSLS:"simple-line"},{readOnly:!0})],c.prototype,"type",void 0),(0,o._)([(0,l.qq)({type:Number,cast:n.Qz,json:{write:!0}})],c.prototype,"width",void 0),c=(0,o._)([(0,h.c)("esri.symbols.LineSymbol")],c);const y=c;var u,d=i(44728),m=i(40504),w=i(33600),S=i(18996),f=i(97556);let g=u=class extends m.am{constructor(t){super(t),this.placement="begin-end",this.type="line-marker",this.style="arrow"}writeStyle(t,e,i,o){e[i]="web-map"===o?.origin?"arrow":t}set color(t){this._set("color",t)}readColor(t){return null!=t?.[0]?[t[0],t[1],t[2],t[3]/255]:t}writeColor(t,e,i,o){"web-map"===o?.origin||(e[i]=t)}clone(){return new u({color:(0,s.ct)(this.color),placement:this.placement,style:this.style})}hash(){return`${this.placement}.${this.color?.hash()}.${this.style}`}};(0,o._)([(0,l.qq)({type:["begin","end","begin-end"],json:{write:!0}})],g.prototype,"placement",void 0),(0,o._)([(0,a.G)({"line-marker":"line-marker"},{readOnly:!0}),(0,l.qq)({json:{origins:{"web-map":{write:!1}}}})],g.prototype,"type",void 0),(0,o._)([(0,l.qq)({type:f.U})],g.prototype,"style",void 0),(0,o._)([(0,S.G)("style")],g.prototype,"writeStyle",null),(0,o._)([(0,l.qq)({type:d.c,value:null,json:{write:{allowNull:!0}}})],g.prototype,"color",null),(0,o._)([(0,w.E)("color")],g.prototype,"readColor",null),(0,o._)([(0,S.G)("color")],g.prototype,"writeColor",null),g=u=(0,o._)([(0,h.c)("esri.symbols.LineSymbolMarker")],g);const q=g;var b;const _=new r.O({esriSLSSolid:"solid",esriSLSDash:"dash",esriSLSDot:"dot",esriSLSDashDot:"dash-dot",esriSLSDashDotDot:"long-dash-dot-dot",esriSLSNull:"none",esriSLSInsideFrame:"inside-frame",esriSLSShortDash:"short-dash",esriSLSShortDot:"short-dot",esriSLSShortDashDot:"short-dash-dot",esriSLSShortDashDotDot:"short-dash-dot-dot",esriSLSLongDash:"long-dash",esriSLSLongDashDot:"long-dash-dot"});let v=b=class extends y{constructor(...t){super(...t),this.type="simple-line",this.style="solid",this.cap="round",this.join="round",this.marker=null,this.miterLimit=2}normalizeCtorArgs(t,e,i,o,r,s){if(t&&"string"!=typeof t)return t;const l={};return null!=t&&(l.style=t),null!=e&&(l.color=e),null!=i&&(l.width=(0,n.Qz)(i)),null!=o&&(l.cap=o),null!=r&&(l.join=r),null!=s&&(l.miterLimit=(0,n.Qz)(s)),l}clone(){return new b({color:(0,s.ct)(this.color),style:this.style,width:this.width,cap:this.cap,join:this.join,miterLimit:this.miterLimit,marker:this.marker?.clone()})}hash(){return`${super.hash()}.${this.color?.hash()}.${this.style}.${this.cap}.${this.join}.${this.miterLimit}.${this.marker?.hash()}`}};(0,o._)([(0,a.G)({esriSLS:"simple-line"},{readOnly:!0})],v.prototype,"type",void 0),(0,o._)([(0,l.qq)({type:_.apiValues,json:{read:_.read,write:_.write}})],v.prototype,"style",void 0),(0,o._)([(0,l.qq)({type:["butt","round","square"],json:{write:{overridePolicy:(t,e,i)=>({enabled:"round"!==t&&null==i?.origin})}}})],v.prototype,"cap",void 0),(0,o._)([(0,l.qq)({type:["miter","round","bevel"],json:{write:{overridePolicy:(t,e,i)=>({enabled:"round"!==t&&null==i?.origin})}}})],v.prototype,"join",void 0),(0,o._)([(0,l.qq)({types:{key:"type",base:null,defaultKeyValue:"line-marker",typeMap:{"line-marker":q}},json:{write:!0,origins:{"web-scene":{write:!1}}}})],v.prototype,"marker",void 0),(0,o._)([(0,l.qq)({type:Number,json:{read:!1,write:!1}})],v.prototype,"miterLimit",void 0),v=b=(0,o._)([(0,h.c)("esri.symbols.SimpleLineSymbol")],v);const L=v},49736:(t,e,i)=>{i.d(e,{c:()=>S});var o,r=i(41948),s=i(44728),n=i(14628),l=i(62088),a=i(50144),h=i(1580),p=(i(9456),i(66360),i(9968)),c=i(12552),y=i(18996),u=i(74483),d=i(7432);const m=new n.O({esriSMSCircle:"circle",esriSMSSquare:"square",esriSMSCross:"cross",esriSMSX:"x",esriSMSDiamond:"diamond",esriSMSTriangle:"triangle",esriSMSPath:"path"});let w=o=class extends u.c{constructor(...t){super(...t),this.color=new s.c([255,255,255,.25]),this.type="simple-marker",this.size=12,this.style="circle",this.outline=new d.c}normalizeCtorArgs(t,e,i,o){if(t&&"string"!=typeof t)return t;const r={};return t&&(r.style=t),null!=e&&(r.size=(0,a.Qz)(e)),i&&(r.outline=i),o&&(r.color=o),r}writeColor(t,e){t&&"x"!==this.style&&"cross"!==this.style&&(e.color=t.toJSON()),null===t&&(e.color=null)}set path(t){this.style="path",this._set("path",t)}clone(){return new o({angle:this.angle,color:(0,l.ct)(this.color),outline:this.outline&&this.outline.clone(),path:this.path,size:this.size,style:this.style,xoffset:this.xoffset,yoffset:this.yoffset})}hash(){return`${super.hash()}.${this.color&&this.color.hash()}.${this.path}.${this.style}.${this.outline?.hash()}`}};(0,r._)([(0,h.qq)()],w.prototype,"color",void 0),(0,r._)([(0,y.G)("color")],w.prototype,"writeColor",null),(0,r._)([(0,p.G)({esriSMS:"simple-marker"},{readOnly:!0})],w.prototype,"type",void 0),(0,r._)([(0,h.qq)()],w.prototype,"size",void 0),(0,r._)([(0,h.qq)({type:m.apiValues,json:{read:m.read,write:m.write}})],w.prototype,"style",void 0),(0,r._)([(0,h.qq)({type:String,json:{write:!0}})],w.prototype,"path",null),(0,r._)([(0,h.qq)({types:{key:"type",base:null,defaultKeyValue:"simple-line",typeMap:{"simple-line":d.c}},json:{default:null,write:!0}})],w.prototype,"outline",void 0),w=o=(0,r._)([(0,c.c)("esri.symbols.SimpleMarkerSymbol")],w);const S=w},71996:(t,e,i)=>{i.d(e,{c:()=>u});var o=i(41948),r=i(44728),s=i(14628),n=i(40504),l=i(1580),a=(i(9456),i(66360),i(72052),i(33600)),h=i(12552);const p=new s.O({esriSMS:"simple-marker",esriPMS:"picture-marker",esriSLS:"simple-line",esriSFS:"simple-fill",esriPFS:"picture-fill",esriTS:"text",esriSHD:"shield-label-symbol",PointSymbol3D:"point-3d",LineSymbol3D:"line-3d",PolygonSymbol3D:"polygon-3d",WebStyleSymbol:"web-style",MeshSymbol3D:"mesh-3d",LabelSymbol3D:"label-3d",CIMSymbolReference:"cim"});let c=0,y=class extends n.am{constructor(t){super(t),this.id="sym"+c++,this.type=null,this.color=new r.c([0,0,0,1])}readColor(t){return null!=t?.[0]?[t[0],t[1],t[2],t[3]/255]:t}async collectRequiredFields(t,e){}hash(){return JSON.stringify(this.toJSON())}clone(){}};(0,o._)([(0,l.qq)({type:p.apiValues,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:p.write}}})],y.prototype,"type",void 0),(0,o._)([(0,l.qq)({type:r.c,json:{write:{allowNull:!0}}})],y.prototype,"color",void 0),(0,o._)([(0,a.E)("color")],y.prototype,"readColor",null),y=(0,o._)([(0,h.c)("esri.symbols.Symbol")],y);const u=y},28652:(t,e,i)=>{i.d(e,{c:()=>S});var o,r=i(41948),s=i(44728),n=i(62088),l=i(50144),a=i(1580),h=i(33392),p=i(9968),c=i(12552),y=i(18996),u=i(73771),d=i(71996),m=i(39056);let w=o=class extends d.c{constructor(...t){super(...t),this.backgroundColor=null,this.borderLineColor=null,this.borderLineSize=null,this.font=new u.c,this.horizontalAlignment="center",this.kerning=!0,this.haloColor=null,this.haloSize=null,this.rightToLeft=null,this.rotated=!1,this.text="",this.type="text",this.verticalAlignment="baseline",this.xoffset=0,this.yoffset=0,this.angle=0,this.width=null,this.lineWidth=192,this.lineHeight=1}normalizeCtorArgs(t,e,i){if(t&&"string"!=typeof t)return t;const o={};return t&&(o.text=t),e&&(o.font=e),i&&(o.color=i),o}writeLineWidth(t,e,i,o){o&&"string"!=typeof o?o.origin:e[i]=t}castLineWidth(t){return(0,l.Qz)(t)}writeLineHeight(t,e,i,o){o&&"string"!=typeof o?o.origin:e[i]=t}clone(){return new o({angle:this.angle,backgroundColor:(0,n.ct)(this.backgroundColor),borderLineColor:(0,n.ct)(this.borderLineColor),borderLineSize:this.borderLineSize,color:(0,n.ct)(this.color),font:this.font&&this.font.clone(),haloColor:(0,n.ct)(this.haloColor),haloSize:this.haloSize,horizontalAlignment:this.horizontalAlignment,kerning:this.kerning,lineHeight:this.lineHeight,lineWidth:this.lineWidth,rightToLeft:this.rightToLeft,rotated:this.rotated,text:this.text,verticalAlignment:this.verticalAlignment,width:this.width,xoffset:this.xoffset,yoffset:this.yoffset})}hash(){return`${this.backgroundColor?.hash()}.${this.borderLineColor}.${this.borderLineSize}.${this.color?.hash()}.${this.font&&this.font.hash()}.${this.haloColor?.hash()}.${this.haloSize}.${this.horizontalAlignment}.${this.kerning}.${this.rightToLeft}.${this.rotated}.${this.text}.${this.verticalAlignment}.${this.width}.${this.xoffset}.${this.yoffset}.${this.lineHeight}.${this.lineWidth}.${this.angle}`}};(0,r._)([(0,a.qq)({type:s.c,json:{write:!0}})],w.prototype,"backgroundColor",void 0),(0,r._)([(0,a.qq)({type:s.c,json:{write:!0}})],w.prototype,"borderLineColor",void 0),(0,r._)([(0,a.qq)({type:Number,json:{write:!0},cast:l.Qz})],w.prototype,"borderLineSize",void 0),(0,r._)([(0,a.qq)({type:u.c,json:{write:!0}})],w.prototype,"font",void 0),(0,r._)([(0,a.qq)({...m.qK,json:{write:!0}})],w.prototype,"horizontalAlignment",void 0),(0,r._)([(0,a.qq)({type:Boolean,json:{write:!0}})],w.prototype,"kerning",void 0),(0,r._)([(0,a.qq)({type:s.c,json:{write:!0}})],w.prototype,"haloColor",void 0),(0,r._)([(0,a.qq)({type:Number,cast:l.Qz,json:{write:!0}})],w.prototype,"haloSize",void 0),(0,r._)([(0,a.qq)({type:Boolean,json:{write:!0}})],w.prototype,"rightToLeft",void 0),(0,r._)([(0,a.qq)({type:Boolean,json:{write:!0}})],w.prototype,"rotated",void 0),(0,r._)([(0,a.qq)({type:String,json:{write:!0}})],w.prototype,"text",void 0),(0,r._)([(0,p.G)({esriTS:"text"},{readOnly:!0})],w.prototype,"type",void 0),(0,r._)([(0,a.qq)({...m.sB,json:{write:!0}})],w.prototype,"verticalAlignment",void 0),(0,r._)([(0,a.qq)({type:Number,cast:l.Qz,json:{write:!0}})],w.prototype,"xoffset",void 0),(0,r._)([(0,a.qq)({type:Number,cast:l.Qz,json:{write:!0}})],w.prototype,"yoffset",void 0),(0,r._)([(0,a.qq)({type:Number,json:{read:t=>t&&-1*t,write:(t,e)=>e.angle=t&&-1*t}})],w.prototype,"angle",void 0),(0,r._)([(0,a.qq)({type:Number,json:{write:!0}})],w.prototype,"width",void 0),(0,r._)([(0,a.qq)({type:Number})],w.prototype,"lineWidth",void 0),(0,r._)([(0,y.G)("lineWidth")],w.prototype,"writeLineWidth",null),(0,r._)([(0,h.W)("lineWidth")],w.prototype,"castLineWidth",null),(0,r._)([(0,a.qq)(m.KO)],w.prototype,"lineHeight",void 0),(0,r._)([(0,y.G)("lineHeight")],w.prototype,"writeLineHeight",null),w=o=(0,r._)([(0,c.c)("esri.symbols.TextSymbol")],w);const S=w},97556:(t,e,i)=>{i.d(e,{U:()=>r,w:()=>o});const o=["begin","end","begin-end"],r=["arrow","circle","square","diamond","cross","x"]},39056:(t,e,i)=>{i.d(e,{C0:()=>c,Ge:()=>l,Go:()=>n,KO:()=>a,Up:()=>s,qK:()=>h,sB:()=>p});var o=i(53648),r=i(53368);const s=["none","underline","line-through"],n=["normal","italic","oblique"],l=["normal","lighter","bold","bolder"],a={type:Number,cast:t=>{const e=(0,r.Oe)(t);return 0===e?1:(0,o.qk)(e,.1,4)},nonNullable:!0},h={type:["left","right","center"],nonNullable:!0},p={type:["baseline","top","middle","bottom"],nonNullable:!0},c=8}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8256],{44728:(e,t,r)=>{r.d(t,{c:()=>d});var i,n,o=r(46988),s=r(53648),l=r(53368);function a(e){return(0,s.qk)((0,l.Wu)(e),0,255)}function u(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}function c(e,t){const r=e.toString(16).padStart(2,"0");return t?r.substring(0,1):r}class p{static blendColors(e,t,r,i=new p){return i.r=Math.round(e.r+(t.r-e.r)*r),i.g=Math.round(e.g+(t.g-e.g)*r),i.b=Math.round(e.b+(t.b-e.b)*r),i.a=e.a+(t.a-e.a)*r,i._sanitize()}static fromRgb(e,t){const r=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(r){const e=r[2].split(/\s*,\s*/),i=r[1];if("rgb"===i&&3===e.length||"rgba"===i&&4===e.length){const r=e[0];if("%"===r.charAt(r.length-1)){const r=e.map((e=>2.56*parseFloat(e)));return 4===e.length&&(r[3]=parseFloat(e[3])),p.fromArray(r,t)}return p.fromArray(e.map((e=>parseFloat(e))),t)}if("hsl"===i&&3===e.length||"hsla"===i&&4===e.length)return p.fromArray((0,o.ec)(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3])),t)}return null}static fromHex(e,t=new p){if("#"!==e[0]||isNaN(Number(`0x${e.substring(1)}`)))return null;switch(e.length){case 4:case 5:{const r=parseInt(e.substring(1,2),16),i=parseInt(e.substring(2,3),16),n=parseInt(e.substring(3,4),16),o=5===e.length?15:parseInt(e.substring(4),16);return p.fromArray([r+16*r,i+16*i,n+16*n,(o+16*o)/255],t)}case 7:case 9:{const r=parseInt(e.substring(1,3),16),i=parseInt(e.substring(3,5),16),n=parseInt(e.substring(5,7),16),o=7===e.length?255:parseInt(e.substring(7),16);return p.fromArray([r,i,n,o/255],t)}default:return null}}static fromArray(e,t=new p){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){const r=(0,o.kv)(e)?(0,o.SQ)(e):null;return r&&p.fromArray(r,t)||p.fromRgb(e,t)||p.fromHex(e,t)}static fromJSON(e){return null!=e?new p([e[0],e[1],e[2],(e[3]??255)/255]):void 0}static toUnitRGB(e){return null!=e?[e.r/255,e.g/255,e.b/255]:null}static toUnitRGBA(e){return null!=e?[e.r/255,e.g/255,e.b/255,null!=e.a?e.a:1]:null}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(e){return"string"==typeof e?p.fromString(e,this):Array.isArray(e)?p.fromArray(e,this):(this._set(e.r??0,e.g??0,e.b??0,e.a??1),e instanceof p||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(e){const t=e?.capitalize??!1,r=e?.digits??6,i=3===r||4===r,n=4===r||8===r,o=`#${c(this.r,i)}${c(this.g,i)}${c(this.b,i)}${n?c(Math.round(255*this.a),i):""}`;return t?o.toUpperCase():o}toCss(e=!1){const t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=p.AlphaMode.ALWAYS){const t=a(this.r),r=a(this.g),i=a(this.b);return e===p.AlphaMode.ALWAYS||1!==this.a?[t,r,i,a(255*this.a)]:[t,r,i]}clone(){return new p(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=Math.round(u(this.r,0,255)),this.g=Math.round(u(this.g,0,255)),this.b=Math.round(u(this.b,0,255)),this.a=u(this.a,0,1),this}_set(e,t,r,i){this.r=e,this.g=t,this.b=r,this.a=i}}p.prototype.declaredClass="esri.Color",(n=(i=p||(p={})).AlphaMode||(i.AlphaMode={}))[n.ALWAYS=0]="ALWAYS",n[n.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const d=p},25228:(e,t,r)=>{r.d(t,{c:()=>m});var i,n=r(41948),o=r(40504),s=r(94360),l=r(1580),a=(r(9456),r(66360),r(72052),r(33600)),u=r(12552),c=r(18996),p=r(28484);let d=i=class extends o.am{static get allTime(){return h}static get empty(){return y}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,n=e.end?.getTime()??e.end;return t===i&&r===n}expandTo(e,t=p.OX){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,s.aU)(r,e,t));let n=this.end;if(n){const r=(0,s.aU)(n,e,t);n=n.getTime()===r.getTime()?r:(0,s.g1)(r,1,e,t)}return new i({start:r,end:n})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,o=e.end?.getTime()??1/0;let s,l;return n>=t&&n<=r?s=n:t>=n&&t<=o&&(s=t),r>=n&&r<=o?l=r:o>=t&&o<=r&&(l=o),null==s||null==l||isNaN(s)||isNaN(l)?i.empty:new i({start:s===-1/0?null:new Date(s),end:l===1/0?null:new Date(l)})}offset(e,t,r=p.OX){if(this.isEmpty||this.isAllTime)return this.clone();const n=new i,{start:o,end:l}=this;return null!=o&&(n.start=(0,s.g1)(o,e,t,r)),null!=l&&(n.end=(0,s.g1)(l,e,t,r)),n}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,n._)([(0,l.qq)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,n._)([(0,a.E)("end")],d.prototype,"readEnd",null),(0,n._)([(0,c.G)("end")],d.prototype,"writeEnd",null),(0,n._)([(0,l.qq)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,n._)([(0,l.qq)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,n._)([(0,l.qq)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,n._)([(0,a.E)("start")],d.prototype,"readStart",null),(0,n._)([(0,c.G)("start")],d.prototype,"writeStart",null),d=i=(0,n._)([(0,u.c)("esri.TimeExtent")],d);const h=new d,y=new d({start:void 0,end:void 0}),m=d},3856:(e,t,r)=>{r.d(t,{m:()=>p,q:()=>c});var i=r(41948),n=r(43780),o=(r(9456),r(62088)),s=(r(66360),r(70680)),l=r(71448),a=r(20916),u=r(12552);const c=e=>{let t=class extends e{clone(){const e=(0,a.m6)(this);(0,s.EN)(e,"unable to clone instance of non-accessor class");const t=e.metadata,r=e.store,i={},n=new Map;for(const e in t){const s=t[e],a=r?.originOf(e),u=s.clonable;if(s.readOnly||!1===u||a!==l.sT.USER&&a!==l.sT.DEFAULTS&&a!==l.sT.WEB_MAP&&a!==l.sT.WEB_SCENE)continue;const c=this[e];let p=null;p="function"==typeof u?u(c):"reference"===u?c:(0,o.gx)(c),null!=c&&null==p||(a===l.sT.DEFAULTS?n.set(e,p):i[e]=p)}const u=new(0,Object.getPrototypeOf(this).constructor)(i);if(n.size){const e=(0,a.m6)(u)?.store;if(e)for(const[t,r]of n)e.set(t,r,l.sT.DEFAULTS)}return u}};return t=(0,i._)([(0,u.c)("esri.core.Clonable")],t),t};let p=class extends(c(n.c)){};p=(0,i._)([(0,u.c)("esri.core.Clonable")],p)},27368:(e,t,r)=>{r.d(t,{sD:()=>s});var i=r(53648);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}ndiff(e,t=0){return Math.ceil((e-t)/this.range)*this.range+t}_normalize(e,t,r,i=0,n=!1){return(r-=i)<e?r+=this.ndiff(e-r):r>t&&(r-=this.ndiff(r-t)),n&&r===t&&(r=e),r+i}normalize(e,t=0,r=!1){return this._normalize(this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.qk)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+this.ndiff(e-t,r)}minimalMonotonic(e,t,r){return this._normalize(e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function o(e){for(const t in e){const r=e[t];r instanceof Function&&(e[t]=r.bind(e))}return e}o(new n(0,2*Math.PI)),o(new n(-Math.PI,Math.PI));const s=o(new n(0,360))},22156:(e,t,r)=>{r.d(t,{MR:()=>s,qm:()=>l});var i=r(41948),n=r(12552);let o=0;const s=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return t=(0,i._)([(0,n.c)("esri.core.Identifiable")],t),t},l=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:o++})}};return t=(0,i._)([(0,n.c)("esri.core.NumericIdentifiable")],t),t};let a=class extends(s(class{})){};a=(0,i._)([(0,n.c)("esri.core.Identifiable")],a)},77380:(e,t,r)=>{r.d(t,{I:()=>m,Y:()=>i});const i={Base64:0,Hex:1,String:2,Raw:3},n=8,o=(1<<n)-1;function s(e,t){const r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function l(e){const t=[];for(let r=0,i=e.length*n;r<i;r+=n)t[r>>5]|=(e.charCodeAt(r/n)&o)<<r%32;return t}function a(e){const t=[];for(let r=0,i=32*e.length;r<i;r+=n)t.push(String.fromCharCode(e[r>>5]>>>r%32&o));return t.join("")}function u(e,t,r,i,n,o){return s(function(e,t){return e<<t|e>>>32-t}(s(s(t,e),s(i,o)),n),r)}function c(e,t,r,i,n,o,s){return u(t&r|~t&i,e,t,n,o,s)}function p(e,t,r,i,n,o,s){return u(t&i|r&~i,e,t,n,o,s)}function d(e,t,r,i,n,o,s){return u(t^r^i,e,t,n,o,s)}function h(e,t,r,i,n,o,s){return u(r^(t|~i),e,t,n,o,s)}function y(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let r=1732584193,i=-271733879,n=-1732584194,o=271733878;for(let t=0;t<e.length;t+=16){const l=r,a=i,u=n,y=o;r=c(r,i,n,o,e[t],7,-680876936),o=c(o,r,i,n,e[t+1],12,-389564586),n=c(n,o,r,i,e[t+2],17,606105819),i=c(i,n,o,r,e[t+3],22,-1044525330),r=c(r,i,n,o,e[t+4],7,-176418897),o=c(o,r,i,n,e[t+5],12,1200080426),n=c(n,o,r,i,e[t+6],17,-1473231341),i=c(i,n,o,r,e[t+7],22,-45705983),r=c(r,i,n,o,e[t+8],7,1770035416),o=c(o,r,i,n,e[t+9],12,-1958414417),n=c(n,o,r,i,e[t+10],17,-42063),i=c(i,n,o,r,e[t+11],22,-1990404162),r=c(r,i,n,o,e[t+12],7,1804603682),o=c(o,r,i,n,e[t+13],12,-40341101),n=c(n,o,r,i,e[t+14],17,-1502002290),i=c(i,n,o,r,e[t+15],22,1236535329),r=p(r,i,n,o,e[t+1],5,-165796510),o=p(o,r,i,n,e[t+6],9,-1069501632),n=p(n,o,r,i,e[t+11],14,643717713),i=p(i,n,o,r,e[t],20,-373897302),r=p(r,i,n,o,e[t+5],5,-701558691),o=p(o,r,i,n,e[t+10],9,38016083),n=p(n,o,r,i,e[t+15],14,-660478335),i=p(i,n,o,r,e[t+4],20,-405537848),r=p(r,i,n,o,e[t+9],5,568446438),o=p(o,r,i,n,e[t+14],9,-1019803690),n=p(n,o,r,i,e[t+3],14,-187363961),i=p(i,n,o,r,e[t+8],20,1163531501),r=p(r,i,n,o,e[t+13],5,-1444681467),o=p(o,r,i,n,e[t+2],9,-51403784),n=p(n,o,r,i,e[t+7],14,1735328473),i=p(i,n,o,r,e[t+12],20,-1926607734),r=d(r,i,n,o,e[t+5],4,-378558),o=d(o,r,i,n,e[t+8],11,-2022574463),n=d(n,o,r,i,e[t+11],16,1839030562),i=d(i,n,o,r,e[t+14],23,-35309556),r=d(r,i,n,o,e[t+1],4,-1530992060),o=d(o,r,i,n,e[t+4],11,1272893353),n=d(n,o,r,i,e[t+7],16,-155497632),i=d(i,n,o,r,e[t+10],23,-1094730640),r=d(r,i,n,o,e[t+13],4,681279174),o=d(o,r,i,n,e[t],11,-358537222),n=d(n,o,r,i,e[t+3],16,-722521979),i=d(i,n,o,r,e[t+6],23,76029189),r=d(r,i,n,o,e[t+9],4,-640364487),o=d(o,r,i,n,e[t+12],11,-421815835),n=d(n,o,r,i,e[t+15],16,530742520),i=d(i,n,o,r,e[t+2],23,-995338651),r=h(r,i,n,o,e[t],6,-198630844),o=h(o,r,i,n,e[t+7],10,1126891415),n=h(n,o,r,i,e[t+14],15,-1416354905),i=h(i,n,o,r,e[t+5],21,-57434055),r=h(r,i,n,o,e[t+12],6,1700485571),o=h(o,r,i,n,e[t+3],10,-1894986606),n=h(n,o,r,i,e[t+10],15,-1051523),i=h(i,n,o,r,e[t+1],21,-2054922799),r=h(r,i,n,o,e[t+8],6,1873313359),o=h(o,r,i,n,e[t+15],10,-30611744),n=h(n,o,r,i,e[t+6],15,-1560198380),i=h(i,n,o,r,e[t+13],21,1309151649),r=h(r,i,n,o,e[t+4],6,-145523070),o=h(o,r,i,n,e[t+11],10,-1120210379),n=h(n,o,r,i,e[t+2],15,718787259),i=h(i,n,o,r,e[t+9],21,-343485551),r=s(r,l),i=s(i,a),n=s(n,u),o=s(o,y)}return[r,i,n,o]}function m(e,t=i.Hex){const r=t||i.Base64,o=y(l(e),e.length*n);switch(r){case i.Raw:return o;case i.Hex:return function(e){const t="0123456789abcdef",r=[];for(let i=0,n=4*e.length;i<n;i++)r.push(t.charAt(e[i>>2]>>i%4*8+4&15)+t.charAt(e[i>>2]>>i%4*8&15));return r.join("")}(o);case i.String:return a(o);case i.Base64:return function(e){const t=[];for(let r=0,i=4*e.length;r<i;r+=3){const i=(e[r>>2]>>r%4*8&255)<<16|(e[r+1>>2]>>(r+1)%4*8&255)<<8|e[r+2>>2]>>(r+2)%4*8&255;for(let n=0;n<4;n++)8*r+6*n>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>6*(3-n)&63))}return t.join("")}(o)}}},90636:(e,t,r)=>{r.d(t,{O:()=>h});var i=r(20744),n=r(77380),o=r(4644),s=r(28176),l=r(63564),a=r(44296),u=r(71448),c=r(1580),p=r(73960),d=r(91952);function h(e){const t=e?.origins??[void 0];return(r,i)=>{const n=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const i=(0,a.EF)(t,r);return{type:String,read:(e,t,r)=>{const n=(0,d.r)(e,t,r);return i.type===String?n:"function"==typeof i.type?new i.type({url:n}):void 0},write:{writer(t,n,l,a){if(!a?.resources)return"string"==typeof t?void(n[l]=(0,d.t)(t,a)):void(n[l]=t.write({},a));const c=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),h=(0,d.t)(c,{...a,verifyItemRelativeUrls:a?.verifyItemRelativeUrls?{writtenUrls:a.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},d.M.NO),f=i.type!==String&&(!(0,o.w)(this)||a?.origin&&this.originIdOf(r)>(0,u.CQ)(a.origin)),v={object:this,propertyName:r,value:t,targetUrl:h,dest:n,targetPropertyName:l,context:a,params:e};a?.portalItem&&h&&!(0,s.ic)(h)?f&&e?.contentAddressed?y(v):f?function(e){const{context:t,targetUrl:r,params:i,value:n,dest:o,targetPropertyName:l}=e;if(!t.portalItem)return;const a=t.portalItem.resourceFromPath(r),u=g(n,r,t),c=(0,p.e)(u),d=(0,s.wt)(a.path),h=i?.compress??!1;c===d?(t.resources&&m({...e,resource:a,content:u,compress:h,updates:t.resources.toUpdate}),o[l]=r):y(e)}(v):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(v):a?.portalItem&&(null==h||null!=(0,d.i)(h)||(0,s.ue)(h)||f)?y(v):n[l]=h}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=d.b;return{read:e,write:t}}}}(e,r,i);for(const e of t){const t=(0,c.aq)(r,e,i);for(const e in n)t[e]=n[e]}}}function y(e){const{targetUrl:t,params:r,value:o,context:a,dest:u,targetPropertyName:c}=e;if(!a.portalItem)return;const h=(0,d.p)(t),y=g(o,t,a);if(r?.contentAddressed&&"json"!==y.type)return void a.messages?.push(new i.c("persistable:contentAddressingUnsupported",`Property "${c}" is trying to serializing a resource with content of type ${y.type} with content addressing. Content addressing is only supported for json resources.`,{content:y}));const f=r?.contentAddressed&&"json"===y.type?(0,n.I)(y.jsonString):h?.filename??(0,l.g1)(),v=(0,s.kn)(r?.prefix??h?.prefix,f),b=`${v}.${(0,p.e)(y)}`;if(r?.contentAddressed&&a.resources&&"json"===y.type){const e=a.resources.toKeep.find((({resource:e})=>e.path===b))??a.resources.toAdd.find((({resource:e})=>e.path===b));if(e)return void(u[c]=e.resource.itemRelativeUrl)}const q=a.portalItem.resourceFromPath(b);(0,s.ue)(t)&&a.resources&&a.resources.pendingOperations.push((0,s.SW)(t).then((e=>{q.path=`${v}.${(0,p.e)({type:"blob",blob:e})}`,u[c]=q.itemRelativeUrl})).catch((()=>{})));const S=r?.compress??!1;a.resources&&m({...e,resource:q,content:y,compress:S,updates:a.resources.toAdd}),u[c]=q.itemRelativeUrl}function m({object:e,propertyName:t,updates:r,resource:i,content:n,compress:o}){r.push({resource:i,content:n,compress:o,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function g(e,t,r){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(r))}}},68612:(e,t,r)=>{function i(){return[1,0,0,0,1,0,0,0,1]}function n(e,t,r,i,n,o,s,l,a){return[e,t,r,i,n,o,s,l,a]}r.d(t,{IJ:()=>o,Su:()=>i,WK:()=>n});const o=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:i,createView:function(e,t){return new Float64Array(e,t,9)},fromValues:n},Symbol.toStringTag,{value:"Module"}))},2620:(e,t,r)=>{function i(){return[0,0,0,1]}function n(e){return[e[0],e[1],e[2],e[3]]}r.d(t,{IJ:()=>o,Su:()=>i,ct:()=>n});const o=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:n,create:i,createView:function(e,t){return new Float64Array(e,t,4)},fromValues:function(e,t,r,i){return[e,t,r,i]}},Symbol.toStringTag,{value:"Module"}))},41512:(e,t,r)=>{r.d(t,{C0:()=>c,WO:()=>f,Wu:()=>m,fO:()=>h,iW:()=>p,sF:()=>T,yG:()=>u});var i=r(68612),n=r(2620),o=r(62484),s=r(47364),l=r(98472),a=r(74784);function u(e,t,r){r*=.5;const i=Math.sin(r);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(r),e}function c(e,t){const r=2*Math.acos(t[3]),i=Math.sin(r/2);return i>(0,s.Au)()?(e[0]=t[0]/i,e[1]=t[1]/i,e[2]=t[2]/i):(e[0]=1,e[1]=0,e[2]=0),r}function p(e,t,r){const i=t[0],n=t[1],o=t[2],s=t[3],l=r[0],a=r[1],u=r[2],c=r[3];return e[0]=i*c+s*l+n*u-o*a,e[1]=n*c+s*a+o*l-i*u,e[2]=o*c+s*u+i*a-n*l,e[3]=s*c-i*l-n*a-o*u,e}function d(e,t,r,i){const n=t[0],o=t[1],l=t[2],a=t[3];let u,c,p,d,h,y=r[0],m=r[1],g=r[2],f=r[3];return c=n*y+o*m+l*g+a*f,c<0&&(c=-c,y=-y,m=-m,g=-g,f=-f),1-c>(0,s.Au)()?(u=Math.acos(c),p=Math.sin(u),d=Math.sin((1-i)*u)/p,h=Math.sin(i*u)/p):(d=1-i,h=i),e[0]=d*n+h*y,e[1]=d*o+h*m,e[2]=d*l+h*g,e[3]=d*a+h*f,e}function h(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function y(e,t){const r=t[0]+t[4]+t[8];let i;if(r>0)i=Math.sqrt(r+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const n=(r+1)%3,o=(r+2)%3;i=Math.sqrt(t[3*r+r]-t[3*n+n]-t[3*o+o]+1),e[r]=.5*i,i=.5/i,e[3]=(t[3*n+o]-t[3*o+n])*i,e[n]=(t[3*n+r]+t[3*r+n])*i,e[o]=(t[3*o+r]+t[3*r+o])*i}return e}function m(e,t,r,i){const n=.5*Math.PI/180;t*=n,r*=n,i*=n;const o=Math.sin(t),s=Math.cos(t),l=Math.sin(r),a=Math.cos(r),u=Math.sin(i),c=Math.cos(i);return e[0]=o*a*c-s*l*u,e[1]=s*l*c+o*a*u,e[2]=s*a*u-o*l*c,e[3]=s*a*c+o*l*u,e}const g=a.c,f=a.s,v=a.g,b=p,q=a.d,S=a.h,w=a.l,_=a.i,x=_,j=a.j,V=j,I=a.n,T=a.a,A=a.e,N=(0,o.Su)(),M=(0,o.WK)(1,0,0),R=(0,o.WK)(0,1,0),z=(0,n.Su)(),F=(0,n.Su)(),D=(0,i.Su)();Object.freeze(Object.defineProperty({__proto__:null,add:v,calculateW:function(e,t){const r=t[0],i=t[1],n=t[2];return e[0]=r,e[1]=i,e[2]=n,e[3]=Math.sqrt(Math.abs(1-r*r-i*i-n*n)),e},conjugate:h,copy:g,dot:S,equals:A,exactEquals:T,fromEuler:m,fromMat3:y,getAxisAngle:c,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},invert:function(e,t){const r=t[0],i=t[1],n=t[2],o=t[3],s=r*r+i*i+n*n+o*o,l=s?1/s:0;return e[0]=-r*l,e[1]=-i*l,e[2]=-n*l,e[3]=o*l,e},len:x,length:_,lerp:w,mul:b,multiply:p,normalize:I,random:function(e){const t=s.QR,r=t(),i=t(),n=t(),o=Math.sqrt(1-r),l=Math.sqrt(r);return e[0]=o*Math.sin(2*Math.PI*i),e[1]=o*Math.cos(2*Math.PI*i),e[2]=l*Math.sin(2*Math.PI*n),e[3]=l*Math.cos(2*Math.PI*n),e},rotateX:function(e,t,r){r*=.5;const i=t[0],n=t[1],o=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a+s*l,e[1]=n*a+o*l,e[2]=o*a-n*l,e[3]=s*a-i*l,e},rotateY:function(e,t,r){r*=.5;const i=t[0],n=t[1],o=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a-o*l,e[1]=n*a+s*l,e[2]=o*a+i*l,e[3]=s*a-n*l,e},rotateZ:function(e,t,r){r*=.5;const i=t[0],n=t[1],o=t[2],s=t[3],l=Math.sin(r),a=Math.cos(r);return e[0]=i*a+n*l,e[1]=n*a-i*l,e[2]=o*a+s*l,e[3]=s*a-o*l,e},rotationTo:function(e,t,r){const i=(0,l.j)(t,r);return i<-.999999?((0,l.b)(N,M,t),(0,l.C)(N)<1e-6&&(0,l.b)(N,R,t),(0,l.n)(N,N),u(e,N,Math.PI),e):i>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,l.b)(N,t,r),e[0]=N[0],e[1]=N[1],e[2]=N[2],e[3]=1+i,I(e,e))},scale:q,set:f,setAxes:function(e,t,r,i){const n=D;return n[0]=r[0],n[3]=r[1],n[6]=r[2],n[1]=i[0],n[4]=i[1],n[7]=i[2],n[2]=-t[0],n[5]=-t[1],n[8]=-t[2],I(e,y(e,n))},setAxisAngle:u,slerp:d,sqlerp:function(e,t,r,i,n,o){return d(z,t,n,o),d(F,r,i,o),d(e,z,F,2*o*(1-o)),e},sqrLen:V,squaredLength:j,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}},Symbol.toStringTag,{value:"Module"}))},63564:(e,t,r)=>{r.d(t,{Mr:()=>s,cf:()=>o,g1:()=>n});const i="randomUUID"in crypto;function n(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function o(){return`{${n().toUpperCase()}}`}function s(){return`{${n()}}`}},13819:(e,t,r)=>{r.d(t,{c:()=>b});var i,n=r(41948),o=r(92400),s=r(14628),l=r(40504),a=r(24296),u=r(69504),c=r(1580),p=(r(9456),r(66360),r(33600)),d=r(12552),h=r(18996);const y=(0,s.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=y.jsonValues.slice();(0,o.sH)(m,"orthometric");const g=(0,s.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let f=i=class extends l.am{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r?.messages&&r.messages.push(function(e,t){return new u.c("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return g.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,a.oG)(e)||g.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,a._2)(t);return new i({heightModel:e.heightModel,heightUnit:r??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new u.c("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,n._)([(0,c.qq)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],f.prototype,"heightModel",void 0),(0,n._)([(0,h.G)("web-scene","heightModel")],f.prototype,"writeHeightModel",null),(0,n._)([(0,p.E)(["web-scene","service"],"heightModel")],f.prototype,"readHeightModel",null),(0,n._)([(0,c.qq)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:g.write}}}})],f.prototype,"heightUnit",void 0),(0,n._)([(0,p.E)("web-scene","heightUnit")],f.prototype,"readHeightUnit",null),(0,n._)([(0,p.E)("service","heightUnit")],f.prototype,"readHeightUnitService",null),(0,n._)([(0,c.qq)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,"vertCRS",void 0),(0,n._)([(0,p.E)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null),f=i=(0,n._)([(0,d.c)("esri.geometry.HeightModelInfo")],f);const b=f},81436:(e,t,r)=>{r.d(t,{c:()=>b});var i=r(41948),n=(r(60708),r(2600)),o=r(20744),s=r(77860),l=r(22156),a=r(95800),u=r(66360),c=r(10860),p=r(28176),d=r(1580),h=(r(9456),r(72052),r(12552)),y=r(6220),m=r(95247),g=r(56156);let f=0,v=class extends(s.c.EventedMixin((0,l.MR)(a.c))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.c(-180,-90,180,90,g.c.WGS84),this.id=Date.now().toString(16)+"-layer-"+f++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.c.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(9232).then(r.bind(r,69232))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(2259).then(r.bind(r,12259));try{return await i(t)}catch(e){const r=t&&t.portalItem,i=r?.id||"unset",n=r&&r.portal&&r.portal.url||y.default.portalUrl;throw u.c.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,c.mA)(e)||u.c.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,p.as)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.c)(e,{query:{f:"json"},responseType:"json"})).data;throw new o.c("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,d.qq)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,i._)([(0,d.qq)({type:m.c})],v.prototype,"fullExtent",void 0),(0,i._)([(0,d.qq)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,i._)([(0,d.qq)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,i._)([(0,d.qq)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,i._)([(0,d.qq)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,i._)([(0,d.qq)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,i._)([(0,d.qq)({clonable:!1})],v.prototype,"parent",void 0),(0,i._)([(0,d.qq)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,i._)([(0,d.qq)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,i._)([(0,d.qq)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,i._)([(0,d.qq)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,i._)([(0,d.qq)({type:g.c})],v.prototype,"spatialReference",void 0),(0,i._)([(0,d.qq)({type:String})],v.prototype,"title",void 0),(0,i._)([(0,d.qq)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,i._)([(0,d.qq)()],v.prototype,"url",void 0),(0,i._)([(0,d.qq)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,i._)([(0,h.c)("esri.layers.Layer")],v);const b=v},59496:(e,t,r)=>{r.r(t),r.d(t,{default:()=>$e});var i=r(41948),n=r(82692),o=r(2952),s=r(20744),l=r(66360),a=r(26496),u=r(10860),c=r(1580),p=r(53368),d=(r(72052),r(9456),r(33600)),h=r(12552),y=r(98472),m=r(62484),g=r(95247),f=r(81436),v=r(38724),b=r(16660),q=r(28584),S=r(66576),w=r(98768),_=r(3116),x=r(87072),j=r(48212),V=r(21488),I=r(600),T=r(3856),A=r(27368),N=r(40504),M=r(90636),R=r(41512),z=r(2620),F=r(47364);const D=(0,m.Su)(),P=(0,z.Su)(),E=(0,z.Su)(),O=(0,z.Su)(),U=(0,m.WK)(0,0,1),L=(0,m.WK)(0,1,0),C=(0,m.WK)(1,0,0);function k(e){(0,y.c)(D,e),(0,y.n)(D,D);const t=Math.atan2(D[1],D[0]),r=(0,R.yG)((0,z.Su)(),U,-t);(0,y.r)(D,D,r);const i=-1*Math.atan2(D[2],D[0]);return[(0,F.Yf)(t)+270,(0,F.Yf)(i)+90]}function B(e,t){return(0,R.yG)(E,U,(0,F.Af)(e-270)),(0,R.yG)(O,L,(0,F.Af)(t-90)),(0,R.iW)(P,E,O),(0,y.c)(D,C),(0,y.r)(D,D,P),(0,y.n)(D,D),[D[0],D[1],D[2]]}var W=r(33392);let $=class extends((0,T.q)(N.am)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=k(this.normal);return A.sD.normalize((0,p.Oe)(e),0,!0)}set orientation(e){const t=B(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=k(this.normal);return A.sD.normalize((0,p.Oe)(t),0,!0)}set tilt(e){const t=B(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,c.qq)({type:Boolean,json:{write:!0}})],$.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],$.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,W.W)((e=>A.sD.normalize((0,p.Oe)(e),0,!0)))],$.prototype,"orientation",null),(0,i._)([(0,c.qq)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,W.W)((e=>A.sD.normalize((0,p.Oe)(e),0,!0)))],$.prototype,"tilt",null),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],$.prototype,"normal",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],$.prototype,"point",void 0),$=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelSlice")],$);const G=$;var H=r(91952);let J=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.enabled=!0,this.href=null,this.id=null,this.label="",this.normal=null,this.point=null,this.sizeInPixel=null,this.slices=null,this.timeId=0,this.variableId=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=k(this.normal);return A.sD.normalize((0,p.Oe)(e),0,!0)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=k(this.normal);return A.sD.normalize((0,p.Oe)(t),0,!0)}};(0,i._)([(0,c.qq)({type:Boolean,json:{default:!0,write:!0}})],J.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{origins:{service:{read:H.r}},write:{enabled:!0,isRequired:!0}}}),(0,M.O)({origins:["web-scene"],type:"resource",prefix:"sections",compress:!0})],J.prototype,"href",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"id",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],J.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],J.prototype,"orientation",null),(0,i._)([(0,c.qq)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],J.prototype,"tilt",null),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"normal",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"point",void 0),(0,i._)([(0,c.qq)({type:[p.Ab],json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"sizeInPixel",void 0),(0,i._)([(0,c.qq)({type:[G],json:{write:!0}})],J.prototype,"slices",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{default:0,write:!0}})],J.prototype,"timeId",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],J.prototype,"variableId",void 0),J=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelSection")],J);const K=J;let Y=class extends N.am{constructor(){super(...arguments),this.diffuseFactor=.5,this.specularFactor=.5}};(0,i._)([(0,c.qq)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],Y.prototype,"diffuseFactor",void 0),(0,i._)([(0,c.qq)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],Y.prototype,"specularFactor",void 0),Y=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelSimpleShading")],Y);const Q=Y;let X=class extends N.am{constructor(){super(...arguments),this.continuity=null,this.hasNoData=!1,this.noData=0,this.offset=0,this.scale=1,this.type=null}};(0,i._)([(0,c.qq)({type:["discrete","continuous"],json:{write:!0}})],X.prototype,"continuity",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{write:!0}})],X.prototype,"hasNoData",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],X.prototype,"noData",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],X.prototype,"offset",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],X.prototype,"scale",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],X.prototype,"type",void 0),X=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelFormat")],X);const Z=X;let ee=class extends N.am{constructor(){super(...arguments),this.id=null,this.description="",this.name=null,this.originalFormat=null,this.renderingFormat=null,this.unit="",this.volumeId=0,this.type=null}};(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ee.prototype,"id",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],ee.prototype,"description",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],ee.prototype,"name",void 0),(0,i._)([(0,c.qq)({type:Z,json:{write:!0}})],ee.prototype,"originalFormat",void 0),(0,i._)([(0,c.qq)({type:Z,json:{write:{enabled:!0,isRequired:!0}}})],ee.prototype,"renderingFormat",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],ee.prototype,"unit",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],ee.prototype,"volumeId",void 0),(0,i._)([(0,c.qq)({type:["stc-hot-spot-results","stc-cluster-outlier-results","stc-estimated-bin","generic-nearest-interpolated"],json:{write:!0}})],ee.prototype,"type",void 0),ee=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelVariable")],ee);const te=ee;var re=r(62088),ie=r(44728);let ne=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.color=ie.c.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label="",this.colorLocked=!1}};(0,i._)([(0,c.qq)({type:ie.c,json:{type:[p.Ab],write:{enabled:!0,isRequired:!0}}})],ne.prototype,"color",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ne.prototype,"value",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{default:!0,write:!0}})],ne.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],ne.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{default:!1,write:!0}})],ne.prototype,"colorLocked",void 0),ne=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelIsosurface")],ne);const oe=ne;var se=r(30604),le=r(53648);let ae=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.color=null,this.position=0}};(0,i._)([(0,c.qq)({type:ie.c,json:{type:[p.Ab],write:{enabled:!0,isRequired:!0}}})],ae.prototype,"color",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ae.prototype,"position",void 0),ae=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelColorStop")],ae);const ue=ae;let ce=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.opacity=1,this.position=0}};(0,i._)([(0,c.qq)({type:Number,json:{name:"alpha",write:{enabled:!0,isRequired:!0}}})],ce.prototype,"opacity",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ce.prototype,"position",void 0),ce=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelOpacityStop")],ce);const pe=ce;let de=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.enabled=!1,this.range=null}};(0,i._)([(0,c.qq)({type:Boolean,json:{default:!1,write:!0}})],de.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],de.prototype,"range",void 0),de=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelRangeFilter")],de);const he=de;var ye,me;(me=ye||(ye={}))[me.Color=1]="Color",me[me.Alpha=2]="Alpha",me[me.Both=3]="Both";let ge=class extends((0,T.q)(N.am)){constructor(e){super(e),this.interpolation=null,this.stretchRange=null,this.rangeFilter=null,this._colorMapSize=256,this.colorStops=new(o.c.ofType(ue)),this.opacityStops=new(o.c.ofType(pe))}set colorStops(e){this._set("colorStops",(0,se.q)(e,this._get("colorStops"),o.c.ofType(ue)))}set opacityStops(e){this._set("opacityStops",(0,se.q)(e,this._get("opacityStops"),o.c.ofType(pe)))}getPreviousNext(e,t,r){let i=e;for(;--i>0&&t[i].type!==r&&t[i].type!==ye.Both;);let n=e;const o=t.length;for(;++n<o&&t[n].type!==r&&t[n].type!==ye.Both;);return[i,n]}get rasterizedTransferFunction(){const e=[];if(this.colorStops.length<2)return e;const t=[],r=[];for(const t of this.colorStops){if(!t.color)return e;r.push({color:{r:t.color.r,g:t.color.g,b:t.color.b,a:Math.round(255*(1-t.color.a))},position:t.position,type:ye.Color})}if(0===this.opacityStops.length)for(const e of r)t.push({color:e.color,position:e.position});else{for(const e of this.opacityStops){const t=(0,le.qk)(e.position,0,1),i=Math.round(255*(0,le.qk)(1-e.opacity,0,1));let n=!1;for(const e of r)if(e.type===ye.Color&&Math.abs(e.position-t)<1e-5){e.color.a=i,e.type=ye.Both,n=!0;break}n||r.push({color:{r:0,g:0,b:0,a:i},position:e.position,type:ye.Alpha})}r.sort(((e,t)=>e.position<t.position?-1:1));const e=r.length;for(let t=0;t<e;++t){const i=r[t];if(i.type!==ye.Both)if(i.type===ye.Color){const[n,o]=this.getPreviousNext(t,r,ye.Alpha);if(-1!==n&&o!==e){const e=(i.position-r[n].position)/(r[o].position-r[n].position);i.color.a=Math.round((0,le.Cq)(r[n].color.a,r[o].color.a,e))}else i.color.a=-1!==n?r[n].color.a:r[o].color.a}else{const[n,o]=this.getPreviousNext(t,r,ye.Color);if(-1!==n&&o!==e){const e=(i.position-r[n].position)/(r[o].position-r[n].position),t=r[n].color,s=r[o].color;ve.forEach((r=>{i.color[r]=Math.round((0,le.Cq)(t[r],s[r],e))}))}else-1!==n?ve.forEach((e=>{i.color[e]=r[n].color[e]})):ve.forEach((e=>{i.color[e]=r[o].color[e]}))}}for(const e of r)t.push({color:e.color,position:e.position})}t[0].position=0,t[t.length-1].position=1;let i=0,n=1;for(let r=0;r<this._colorMapSize;++r){const o=r/this._colorMapSize;for(;o>t[n].position;)i=n++;const s=(o-t[i].position)/(t[n].position-t[i].position),l=t[i].color,a=t[n].color,u=new ie.c;ve.forEach((e=>{u[e]=Math.round((0,le.Cq)(l[e],a[e],s))})),u.a=(0,le.qk)(1-(0,le.Cq)(l.a,a.a,s)/255,0,1),e.push(u)}return e}getColorForContinuousDataValue(e,t){const r=this.rasterizedTransferFunction;if(this.colorStops.length<2||!Array.isArray(this.stretchRange)||this.stretchRange.length<2||r.length<256)return null;let i=this.stretchRange[0],n=this.stretchRange[1];if(i>n){const e=i;i=n,n=e}e=(0,le.qk)(e,i,n);const o=r[Math.round((e-i)/(n-i)*(this._colorMapSize-1))].clone();return t||(o.a=1),o}};(0,i._)([(0,c.qq)({type:["linear","nearest"],json:{write:!0}})],ge.prototype,"interpolation",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],ge.prototype,"stretchRange",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(ue),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.colorStops&&this.colorStops.length>0}}}}})],ge.prototype,"colorStops",null),(0,i._)([(0,c.qq)({type:o.c.ofType(pe),json:{read:{source:"alphaStops"},write:{enabled:!0,target:"alphaStops",overridePolicy(){return{enabled:!!this.opacityStops&&this.opacityStops.length>0}}}}})],ge.prototype,"opacityStops",null),(0,i._)([(0,c.qq)({type:he,json:{write:!0}})],ge.prototype,"rangeFilter",void 0),(0,i._)([(0,c.qq)({type:[ie.c],clonable:!1,json:{read:!1}})],ge.prototype,"rasterizedTransferFunction",null),ge=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelTransferFunctionStyle")],ge);const fe=ge,ve=["r","g","b"];let be=class extends((0,T.q)(N.am)){constructor(){super(...arguments),this.color=ie.c.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label=""}};(0,i._)([(0,c.qq)({type:ie.c,json:{type:[p.Ab],write:{enabled:!0,isRequired:!0}}})],be.prototype,"color",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],be.prototype,"value",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{default:!0,write:!0}})],be.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],be.prototype,"label",void 0),be=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelUniqueValue")],be);const qe=be;var Se;let we=Se=class extends N.am{constructor(e){super(e),this.variableId=0,this.label="",this.transferFunction=null,this.uniqueValues=null,this.isosurfaces=null,this.uniqueValues=new(o.c.ofType(qe)),this.isosurfaces=new(o.c.ofType(oe))}clone(){return new Se({variableId:this.variableId,label:this.label,transferFunction:(0,re.ct)(this.transferFunction),uniqueValues:(0,re.ct)(this.uniqueValues),isosurfaces:(0,re.ct)(this.isosurfaces)})}};(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],we.prototype,"variableId",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],we.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:fe,json:{write:{enabled:!0,overridePolicy(){return{enabled:!this.uniqueValues||this.uniqueValues.length<1}}}}})],we.prototype,"transferFunction",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(qe),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.uniqueValues&&this.uniqueValues.length>0}}}}})],we.prototype,"uniqueValues",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(oe),json:{write:{enabled:!0,overridePolicy(){const e=!this.uniqueValues||this.uniqueValues.length<1,t=!!this.isosurfaces&&this.isosurfaces.length>0;return{enabled:e&&t}}}}})],we.prototype,"isosurfaces",void 0),we=Se=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelVariableStyle")],we);const _e=we;var xe=r(67776),je=r(56156),Ve=r(60544);let Ie=class extends N.am{constructor(){super(...arguments),this.values=null}};(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],Ie.prototype,"values",void 0),Ie=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelIrregularSpacing")],Ie);const Te=Ie;let Ae=class extends N.am{constructor(){super(...arguments),this.scale=1,this.offset=0}};(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],Ae.prototype,"scale",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],Ae.prototype,"offset",void 0),Ae=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelRegularSpacing")],Ae);const Ne=Ae;let Me=class extends N.am{constructor(){super(...arguments),this.irregularSpacing=null,this.isPositiveUp=!0,this.isWrappedDateLine=!1,this.label=null,this.name=null,this.quantity=null,this.regularSpacing=null,this.size=0,this.unit=null}get isRegular(){return(null==this.irregularSpacing||void 0===this.irregularSpacing)&&null!==this.regularSpacing}getRange(){return this.isRegular?[this.regularSpacing.offset,this.regularSpacing.offset+this.regularSpacing.scale*(this.size-1)]:Array.isArray(this.irregularSpacing?.values)&&this.irregularSpacing.values.length>1?[this.irregularSpacing.values[0],this.irregularSpacing.values[this.irregularSpacing.values.length-1]]:[0,0]}};(0,i._)([(0,c.qq)({type:Te,json:{write:!0}})],Me.prototype,"irregularSpacing",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{write:!0}})],Me.prototype,"isPositiveUp",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{write:!0}})],Me.prototype,"isWrappedDateLine",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Me.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Me.prototype,"name",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Me.prototype,"quantity",void 0),(0,i._)([(0,c.qq)({type:Ne,json:{write:!0}})],Me.prototype,"regularSpacing",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:!0}})],Me.prototype,"size",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Me.prototype,"unit",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{read:!1}})],Me.prototype,"isRegular",null),Me=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelDimension")],Me);const Re=Me;let ze=class extends N.am{constructor(e){super(e),this.id=0,this.dimensions=null,this.spatialReference=je.c.WGS84}get zDimension(){if(!this.dimensions)return-1;if(!Array.isArray(this.dimensions))return-1;if(4!==this.dimensions.length)return-1;for(let e=2;e<4;++e)if(this.dimensions[e].size>0)return e;return-1}get isValid(){return!(!this.dimensions||!Array.isArray(this.dimensions)||4!==this.dimensions.length||this.dimensions[0].size<1||this.dimensions[1].size<1||-1===this.zDimension||this.dimensions[this.zDimension].size<1)}get originInLayerSpace3D(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size];return[e[0],t[0],i[0]]}get voxelSizeInLayerSpaceSigned(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size],n=[this.sizeInVoxels[0],this.sizeInVoxels[1],this.sizeInVoxels[2]];for(let e=0;e<3;++e)n[e]<2?n[e]=1:n[e]-=1;return r.isRegular&&!r.isPositiveUp&&(n[2]*=-1),[(e[1]-e[0])/n[0],(t[1]-t[0])/n[1],(i[1]-i[0])/n[2]]}get volumeType(){if(this.isValid){const e=this.dimensions[2].size>0,t=this.dimensions[3].size>0;if(!e&&t)return"xyt";if(e&&t)return"xyzt"}return"xyz"}get sizeInVoxels(){if(!this.isValid)return[0,0,0];const e=this.zDimension;return[this.dimensions[0].size,this.dimensions[1].size,this.dimensions[e].size]}computeVoxelSpaceLocation(e){if(!this.isValid)return[0,0,0];if("xyt"===this.volumeType)return l.c.getLogger(this).error("computeVoxelSpacePosition cannot be used with XYT volumes."),[0,0,0];if(!(0,Ve.yK)(this.spatialReference,e.spatialReference))return l.c.getLogger(this).error("pos argument should have the same spatial reference as the VoxelLayer."),[0,0,0];const t=(0,m.WK)(e.x,e.y,e.z??0);(0,y.f)(t,t,this.originInLayerSpace3D),(0,y.G)(t,t,this.voxelSizeInLayerSpaceSigned);const r=this.dimensions[this.zDimension];if(!r.isRegular&&Array.isArray(r.irregularSpacing?.values)&&r.irregularSpacing.values.length>1){const i=e.z??0,n=r.irregularSpacing.values,o=r.isPositiveUp?1:-1,s=n.reduce(((e,t)=>Math.abs(o*t-i)<Math.abs(o*e-i)?t:e));for(let e=0;e<n.length;++e)if(n[e]===s){t[2]=e;break}}return[t[0],t[1],t[2]]}computeLayerSpaceLocation(e){if(!this.isValid)return new xe.c({x:0,y:0,spatialReference:this.spatialReference});const t=(0,m.eu)(e);if((0,y.A)(t,t,this.voxelSizeInLayerSpaceSigned),(0,y.g)(t,t,this.originInLayerSpace3D),"xyt"===this.volumeType)return new xe.c({x:t[0],y:t[1],spatialReference:this.spatialReference});const r=this.dimensions[this.zDimension];return r.isRegular||Array.isArray(r.irregularSpacing?.values)&&(e[2]<0?t[2]=r.irregularSpacing.values[0]:e[2]<r.irregularSpacing.values.length?t[2]=r.irregularSpacing.values[e[2]]:t[2]=r.irregularSpacing.values[r.irregularSpacing.values.length-1],r.isPositiveUp||(t[2]*=-1)),new xe.c({x:t[0],y:t[1],z:t[2],spatialReference:this.spatialReference})}};(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],ze.prototype,"id",void 0),(0,i._)([(0,c.qq)({type:[Re],json:{write:{enabled:!0,isRequired:!0}}})],ze.prototype,"dimensions",void 0),(0,i._)([(0,c.qq)({type:je.c,json:{read:{enabled:!1}}})],ze.prototype,"spatialReference",void 0),(0,i._)([(0,c.qq)({type:Number,json:{read:!1}})],ze.prototype,"zDimension",null),(0,i._)([(0,c.qq)({type:[Boolean],json:{read:!1}})],ze.prototype,"isValid",null),(0,i._)([(0,c.qq)({type:[Number],json:{read:!1}})],ze.prototype,"originInLayerSpace3D",null),(0,i._)([(0,c.qq)({type:[Number],json:{read:!1}})],ze.prototype,"voxelSizeInLayerSpaceSigned",null),(0,i._)([(0,c.qq)({type:["xyz","xyzt","xyt"],json:{read:{enabled:!1}}})],ze.prototype,"volumeType",null),(0,i._)([(0,c.qq)({type:[Number],json:{read:!1}})],ze.prototype,"sizeInVoxels",null),ze=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelVolume")],ze);const Fe=ze;var De;let Pe=De=class extends N.am{constructor(){super(...arguments),this.apronWidth=1,this.brickSize=[32,32,32],this.maxLodLevel=0,this.nodeSize=[4,4,4]}isValid(){const e=new De;return e.apronWidth===this.apronWidth&&e.maxLodLevel===this.maxLodLevel&&!!this.brickSize&&!!this.nodeSize&&!(!Array.isArray(this.brickSize)||!Array.isArray(this.nodeSize))&&3===this.brickSize.length&&3===this.nodeSize.length&&32===this.brickSize[0]&&32===this.brickSize[1]&&32===this.brickSize[2]&&4===this.nodeSize[0]&&4===this.nodeSize[1]&&4===this.nodeSize[2]}};(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Pe.prototype,"apronWidth",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],Pe.prototype,"brickSize",void 0),(0,i._)([(0,c.qq)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Pe.prototype,"maxLodLevel",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],Pe.prototype,"nodeSize",void 0),Pe=De=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelVolumeIndex")],Pe);const Ee=Pe;let Oe=class extends((0,T.q)(N.am)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=k(this.normal);return A.sD.normalize((0,p.Oe)(e),0,!0)}set orientation(e){const t=B(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=k(this.normal);return A.sD.normalize((0,p.Oe)(t),0,!0)}set tilt(e){const t=B(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,c.qq)({type:Boolean,json:{default:!0,write:!0}})],Oe.prototype,"enabled",void 0),(0,i._)([(0,c.qq)({type:String,json:{write:!0}})],Oe.prototype,"label",void 0),(0,i._)([(0,c.qq)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,W.W)((e=>A.sD.normalize((0,p.Oe)(e),0,!0)))],Oe.prototype,"orientation",null),(0,i._)([(0,c.qq)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,W.W)((e=>A.sD.normalize((0,p.Oe)(e),0,!0)))],Oe.prototype,"tilt",null),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],Oe.prototype,"normal",void 0),(0,i._)([(0,c.qq)({type:[Number],json:{write:!0}})],Oe.prototype,"point",void 0),Oe=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelDynamicSection")],Oe);const Ue=Oe;var Le;let Ce=Le=class extends N.am{constructor(e){super(e),this.volumeId=0,this.verticalExaggeration=1,this.exaggerationMode="scale-height",this.verticalOffset=0,this.slices=new(o.c.ofType(G)),this.dynamicSections=new(o.c.ofType(Ue))}set slices(e){this._set("slices",(0,se.q)(e,this._get("slices"),o.c.ofType(G)))}set dynamicSections(e){this._set("dynamicSections",(0,se.q)(e,this._get("dynamicSections"),o.c.ofType(Ue)))}clone(){return new Le({volumeId:this.volumeId,verticalExaggeration:this.verticalExaggeration,exaggerationMode:this.exaggerationMode,verticalOffset:this.verticalOffset,slices:(0,re.ct)(this.slices),dynamicSections:(0,re.ct)(this.dynamicSections)})}};(0,i._)([(0,c.qq)({type:p.Ab,json:{write:{enabled:!0,isRequired:!0}}})],Ce.prototype,"volumeId",void 0),(0,i._)([(0,c.qq)({type:Number,json:{default:1,write:!0}})],Ce.prototype,"verticalExaggeration",void 0),(0,i._)([(0,c.qq)({type:["scale-position","scale-height"],json:{default:"scale-height",write:!0}})],Ce.prototype,"exaggerationMode",void 0),(0,i._)([(0,c.qq)({type:Number,json:{default:0,write:!0}})],Ce.prototype,"verticalOffset",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(G),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.slices&&this.slices.length>0}}}}})],Ce.prototype,"slices",null),(0,i._)([(0,c.qq)({type:o.c.ofType(Ue),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.dynamicSections&&this.dynamicSections.length>0}}}}})],Ce.prototype,"dynamicSections",null),Ce=Le=(0,i._)([(0,h.c)("esri.layers.voxel.VoxelVolumeStyle")],Ce);const ke=Ce;var Be=r(65548);let We=class extends((0,x.G6)((0,b.u)((0,S.Y)((0,w.K)((0,_.I)((0,a.U)((0,q.G)((0,v.C)(f.c))))))))){constructor(e){super(e),this.serviceRoot="",this.operationalLayerType="Voxel",this.legendEnabled=!0,this.title=null,this.sections=null,this.currentVariableId=0,this.volumeStyles=null,this.renderMode="volume",this.variableStyles=null,this.enableSlices=!0,this.enableSections=!0,this.enableDynamicSections=!0,this.enableIsosurfaces=!0,this.shading=new Q,this.opacity=1,this.variables=new o.c,this.volumes=new o.c,this.index=null,this.minScale=0,this.maxScale=0,this.type="voxel",this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.fullExtent=null,this.popupEnabled=!1,this.test=null,this.volumeStyles=new(o.c.ofType(ke)),this.variableStyles=new(o.c.ofType(_e)),this.sections=new(o.c.ofType(K))}normalizeCtorArgs(e){return e?.constantUpscaling&&(this.test={constantUpscaling:!0},delete e.constantUpscaling),e}set url(e){this._set("url",(0,j.oR)(e,l.c.getLogger(this)))}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(u.CE).then((()=>this._fetchService(t))).then((()=>this.serviceRoot=this.url));return this.addResolvingPromise(r),Promise.resolve(this)}read(e,t){super.read(e,t);for(const e of this.volumes)e.spatialReference=this.spatialReference}readVersion(e,t){return super.parseVersionString(e)}validateLayer(e){if(e.layerType&&e.layerType!==this.operationalLayerType)throw new s.c("voxel-layer:layer-type-not-supported","VoxelLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor)||this.version.major<3)throw new s.c("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"});if(this.version.major>3)throw new s.c("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"})}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=g.c.fromJSON(e,r);if(0===i.zmin&&0===i.zmax&&Array.isArray(t.volumes)){const e=Fe.fromJSON(t.volumes[0]);if(e.isValid&&"xyt"!==e.volumeType){const t=e.dimensions[2];if(t.isRegular){let e=t.regularSpacing.offset,r=t.regularSpacing.offset+t.regularSpacing.scale*(t.size-1);if(e>r){const t=e;e=r,r=t}i.zmin=e,i.zmax=r}}}return i}return null}get voxelFields(){const e=[new I.c({name:"Voxel.ServiceValue",alias:"Value",domain:null,editable:!1,length:128,type:"string"}),new I.c({name:"Voxel.ServiceVariableLabel",alias:"Variable",domain:null,editable:!1,length:128,type:"string"}),new I.c({name:"Voxel.Position",alias:"Voxel Position",domain:null,editable:!1,length:128,type:"string"})],t=this.getVolume(null);if(null!=t){if("xyzt"===t.volumeType||"xyt"===t.volumeType){const t=new I.c({name:"Voxel.ServiceLocalTime",alias:"Local Time",domain:null,editable:!1,length:128,type:"string"});e.push(t);const r=new I.c({name:"Voxel.ServiceNativeTime",alias:"Native Time",domain:null,editable:!1,length:128,type:"string"});e.push(r)}if("xyt"!==t.volumeType){const t=new I.c({name:"Voxel.ServiceDepth",alias:"Depth",domain:null,editable:!1,length:128,type:"string"});e.push(t)}}return e}get popupTemplate(){return this.loaded?this.createPopupTemplate():null}get defaultPopupTemplate(){return this.createPopupTemplate()}createPopupTemplate(e){const t=this.voxelFields,r=this.title;return(0,Be.Ap)({fields:t,title:r},e)}getConfiguration(){const e={layerType:this.operationalLayerType,version:this.version.versionString,name:this.title,spatialReference:this.spatialReference,fullExtent:this.fullExtent,volumes:this.volumes.toJSON(),variables:this.variables.toJSON(),index:this.index?.toJSON(),sections:this.getSections(),style:{volumeStyles:this.getVolumeStyles(),currentVariableId:this.currentVariableId,renderMode:this.renderMode,variableStyles:this.getVariableStyles(),enableSections:this.enableSections,enableDynamicSections:this.enableDynamicSections,enableIsosurfaces:this.enableIsosurfaces,enableSlices:this.enableSlices,shading:this.shading}};return e.index&&this.index?.isValid()?JSON.stringify(e):""}getVariableStyle(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variableStyles||-1===t)return null;const r=this.variableStyles.findIndex((e=>e.variableId===t));return r<0?null:this.variableStyles.at(r)}getVariable(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variables||-1===t)return null;const r=this.variables.findIndex((e=>e.id===t));return r<0?null:this.variables.at(r)}getVolume(e){const t=this.getVariable(e);return null!=t?this.volumes.find((({id:e})=>e===t.volumeId)):null}getVolumeStyle(e){const t=this.getVariable(e);return null!=t?this.volumeStyles.find((({volumeId:e})=>e===t.volumeId)):null}getColorForContinuousDataValue(e,t,r){const i=this.getVariable(e);if(null==i||"continuous"!==i.renderingFormat?.continuity)return null;if(!this.variableStyles)return null;const n=this.variableStyles.findIndex((t=>t.variableId===e));if(n<0)return null;const o=this.variableStyles.at(n);return o?.transferFunction?o.transferFunction.getColorForContinuousDataValue(t,r):null}getSections(){const e=[];for(const t of this.sections)e.push(new K({enabled:t.enabled,href:t.href,id:t.id,label:t.label,normal:t.normal,point:t.point,sizeInPixel:t.sizeInPixel,slices:t.slices,timeId:t.timeId,variableId:t.variableId}));return e}getVariableStyles(){const e=[];for(const t of this.variableStyles){const r=this._getVariable(t);if(null!=r){const i=t.clone();i.isosurfaces.length>4&&(i.isosurfaces=i.isosurfaces.slice(0,3),l.c.getLogger(this).error("A maximum of 4 isosurfaces are supported for Voxel Layers."));for(const e of i.isosurfaces)if(!e.colorLocked){const t=this.getColorForContinuousDataValue(i.variableId,e.value,!1);null===t||t.equals(e.color)||(e.color=t)}if("continuous"===r.renderingFormat.continuity)(null===i.transferFunction||i.transferFunction.colorStops.length<2)&&l.c.getLogger(this).error(`VoxelVariableStyle for variable ${r.id} is invalid. At least 2 color stops are required in the transferFunction for continuous Voxel Layer variables.`),null!==i.transferFunction&&(Array.isArray(i.transferFunction.stretchRange)&&2===i.transferFunction.stretchRange.length||(l.c.getLogger(this).error(`VoxelVariableStyle for variable ${r.id} is invalid. The stretchRange of the transferFunction for continuous Voxel Layer variables must be of the form [minimumDataValue, maximumDataValue].`),i.transferFunction.stretchRange=[0,1],i.transferFunction.colorStops.removeAll()));else if("discrete"===r.renderingFormat.continuity)if(0===t.uniqueValues.length)l.c.getLogger(this).error(`VoxelVariableStyle for variable ${r.id} is invalid. Unique values are required for discrete Voxel Layer variables.`);else for(const e of t.uniqueValues)null!==e.label&&void 0!==e.label||null===e.value||void 0===e.value||(e.label=e.value.toString());e.push(i)}else l.c.getLogger(this).error(`VoxelVariable ID=${t.variableId} doesn't exist, VoxelVariableStyle for this VoxelVariable will be ignored.`)}return e}getVolumeStyles(){const e=[];for(const t of this.volumeStyles){const r=this._getVolumeFromVolumeId(t.volumeId);if(null!=r){const i=t.clone();for(const e of i.slices)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");for(const e of i.dynamicSections)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");e.push(i)}else l.c.getLogger(this).error(`VoxelVolume ID=${t.volumeId} doesn't exist, VoxelVolumeStyle for this VoxelVolume will be ignored.`)}return e}_getVariable(e){const t=e.variableId;for(const e of this.variables)if(e.id===t)return e;return null}_getVolumeFromVolumeId(e){for(const t of this.volumes)if(t.id===e)return t;return null}_isPlaneValid(e,t,r){if(!e.point)return!1;if(!Array.isArray(e.point)||3!==e.point.length)return!1;if(!e.normal)return!1;if(!Array.isArray(e.normal)||3!==e.normal.length)return!1;const i=(0,m.WK)(e.normal[0],e.normal[1],e.normal[2]);return(0,y.n)(i,i),!(Math.abs(i[0])+Math.abs(i[1])+Math.abs(i[2])<1e-6||(e.normal[0]=i[0],e.normal[1]=i[1],e.normal[2]=i[2],0))}};(0,i._)([(0,c.qq)({type:["Voxel"]})],We.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.qq)(V.Uj)],We.prototype,"legendEnabled",void 0),(0,i._)([(0,c.qq)({json:{write:!0}})],We.prototype,"title",void 0),(0,i._)([(0,c.qq)(V.qW)],We.prototype,"url",null),(0,i._)([(0,c.qq)({type:o.c.ofType(K),json:{origins:{"web-scene":{name:"layerDefinition.sections",write:!0}}}})],We.prototype,"sections",void 0),(0,i._)([(0,c.qq)({type:p.Ab,json:{origins:{"web-scene":{name:"layerDefinition.style.currentVariableId",write:{enabled:!0,isRequired:!0,ignoreOrigin:!0}},service:{name:"style.currentVariableId"}}}})],We.prototype,"currentVariableId",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(ke),json:{origins:{"web-scene":{name:"layerDefinition.style.volumeStyles",write:!0},service:{name:"style.volumeStyles"}}}})],We.prototype,"volumeStyles",void 0),(0,i._)([(0,c.qq)({type:["volume","surfaces"],json:{origins:{"web-scene":{name:"layerDefinition.style.renderMode",write:!0},service:{name:"style.renderMode"}}}})],We.prototype,"renderMode",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(_e),json:{origins:{"web-scene":{name:"layerDefinition.style.variableStyles",write:!0},service:{name:"style.variableStyles"}}}})],We.prototype,"variableStyles",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSlices",write:!0},service:{name:"style.enableSlices"}}}})],We.prototype,"enableSlices",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSections",write:!0},service:{name:"style.enableSections"}}}})],We.prototype,"enableSections",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableDynamicSections",write:!0},service:{name:"style.enableDynamicSections"}}}})],We.prototype,"enableDynamicSections",void 0),(0,i._)([(0,c.qq)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableIsosurfaces",write:!0},service:{name:"style.enableIsosurfaces"}}}})],We.prototype,"enableIsosurfaces",void 0),(0,i._)([(0,c.qq)({type:Q,json:{origins:{"web-scene":{name:"layerDefinition.style.shading",write:!0},service:{name:"style.shading"}}}})],We.prototype,"shading",void 0),(0,i._)([(0,c.qq)({type:["show","hide"]})],We.prototype,"listMode",void 0),(0,i._)([(0,c.qq)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{read:!1,write:!1,origins:{"web-scene":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],We.prototype,"opacity",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(te)})],We.prototype,"variables",void 0),(0,i._)([(0,c.qq)({type:o.c.ofType(Fe)})],We.prototype,"volumes",void 0),(0,i._)([(0,c.qq)({type:Ee})],We.prototype,"index",void 0),(0,i._)([(0,c.qq)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],We.prototype,"minScale",void 0),(0,i._)([(0,c.qq)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],We.prototype,"maxScale",void 0),(0,i._)([(0,c.qq)({json:{read:!1},readOnly:!0})],We.prototype,"type",void 0),(0,i._)([(0,c.qq)({readOnly:!0,json:{name:"serviceVersion"}})],We.prototype,"version",void 0),(0,i._)([(0,d.E)("service","version")],We.prototype,"readVersion",null),(0,i._)([(0,c.qq)({type:g.c})],We.prototype,"fullExtent",void 0),(0,i._)([(0,d.E)("service","fullExtent",["fullExtent"])],We.prototype,"readFullExtent",null),(0,i._)([(0,c.qq)({readOnly:!0,clonable:!1,json:{read:!1}})],We.prototype,"voxelFields",null),(0,i._)([(0,c.qq)({type:Boolean,json:{name:"disablePopup",read:{reader:(e,t)=>!t.disablePopup},write:{enabled:!0,ignoreOrigin:!0,writer(e,t,r){t[r]=!e}},origins:{"portal-item":{default:!0},"web-scene":{default:!0}}}})],We.prototype,"popupEnabled",void 0),(0,i._)([(0,c.qq)({type:n.c,json:{read:!1}})],We.prototype,"popupTemplate",null),(0,i._)([(0,c.qq)({readOnly:!0})],We.prototype,"defaultPopupTemplate",null),We=(0,i._)([(0,h.c)("esri.layers.VoxelLayer")],We);const $e=We},28584:(e,t,r)=>{r.d(t,{G:()=>s});var i=r(41948),n=r(1580),o=(r(9456),r(66360),r(72052),r(12552));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,n.qq)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,o.c)("esri.layers.mixins.CustomParametersMixin")],t),t}},98768:(e,t,r)=>{r.d(t,{K:()=>w});var i=r(41948),n=r(6220),o=r(47620),s=r(2600),l=r(40196),a=r(20744),u=r(66360),c=r(70680),p=r(10860),d=r(28176),h=r(1580),y=(r(9456),r(72052),r(33600)),m=r(12552),g=r(18996),f=r(71068),v=r(54872),b=r(9764),q=r(53039),S=r(46940);const w=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.mG)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new b.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:i}=await Promise.all([r.e(8828),r.e(4132)]).then(r.bind(r,94132));return(0,p.wp)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,p.mA)(e)||u.c.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,p.CE)(e),!0))))}async setUserPrivileges(e,t){if(!n.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,p.CE)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,S.CI)(r);let n,s;if(i)n=r.portal.url;else try{n=await(0,f.mK)(this.url,t)}catch(e){(0,p.CE)(e)}if(!n||!(0,d.Cs)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;s=await(o.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.CE)(e)}if(!s)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new b.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return(0,S.CI)(r)}catch(e){(0,p.CE)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.CE)(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=_.credential===t?_.user:await this._fetchEditingUser(e);return _.credential=t,_.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 i=`${r.owningSystemUrl}/sharing/rest`,n=v.c.getDefault();if(n&&n.loaded&&(0,d.k7)(n.restUrl)===(0,d.k7)(i))return n.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,l.aG)((0,s.c)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?q.c.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.c.getDefault());return r&&i&&!(0,d.kF)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.c("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,i._)([(0,h.qq)({type:b.default})],t.prototype,"portalItem",null),(0,i._)([(0,y.E)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,g.G)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,h.qq)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,h.qq)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,h.qq)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,h.qq)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,m.c)("esri.layers.mixins.PortalLayer")],t),t},_={credential:null,user:null}},3116:(e,t,r)=>{r.d(t,{I:()=>s});var i=r(41948),n=r(1580),o=(r(9456),r(66360),r(72052),r(12552));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,n.qq)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,n.qq)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,n.qq)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,o.c)("esri.layers.mixins.ScaleRangeLayer")],t),t}},600:(e,t,r)=>{r.d(t,{c:()=>g});var i,n=r(41948),o=r(14628),s=r(40504),l=r(1580),a=r(53368),u=(r(72052),r(9456),r(9968)),c=r(33600),p=r(12552),d=r(89812),h=r(36408);const y=new o.O({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=i=class extends s.am{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 r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?y.fromJSON(r.fieldValueType):null}clone(){return new i({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,n._)([(0,l.qq)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,n._)([(0,l.qq)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,n._)([(0,l.qq)()],m.prototype,"description",void 0),(0,n._)([(0,c.E)("description")],m.prototype,"readDescription",null),(0,n._)([(0,l.qq)({types:d.i2,json:{read:{reader:d.h4},write:!0}})],m.prototype,"domain",void 0),(0,n._)([(0,l.qq)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,n._)([(0,l.qq)({type:a.Ab,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,n._)([(0,l.qq)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,n._)([(0,l.qq)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,n._)([(0,u.G)(h.M)],m.prototype,"type",void 0),(0,n._)([(0,l.qq)()],m.prototype,"valueType",void 0),(0,n._)([(0,c.E)("valueType",["description"])],m.prototype,"readValueType",null),(0,n._)([(0,l.qq)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=i=(0,n._)([(0,p.c)("esri.layers.support.Field")],m);const g=m},89812:(e,t,r)=>{r.d(t,{h4:()=>x,i2:()=>_}),r(9456);var i,n=r(41948),o=r(62088),s=r(1580),l=(r(66360),r(9968)),a=r(12552),u=r(40504);r(72052);let c=i=class extends u.am{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,s.qq)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,s.qq)({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=i=(0,n._)([(0,a.c)("esri.layers.support.CodedValue")],c);const p=new(r(14628).O)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends u.am{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,s.qq)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,l.G)(p)],d.prototype,"type",void 0),d=(0,n._)([(0,a.c)("esri.layers.support.Domain")],d);const h=d;var y;let m=y=class extends h{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new y({codedValues:(0,o.ct)(this.codedValues),name:this.name})}};(0,n._)([(0,s.qq)({type:[c],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,n._)([(0,l.G)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=y=(0,n._)([(0,a.c)("esri.layers.support.CodedValueDomain")],m);const g=m;var f;r(20744);let v=f=class extends h{constructor(e){super(e),this.type="inherited"}clone(){return new f}};(0,n._)([(0,l.G)({inherited:"inherited"})],v.prototype,"type",void 0),v=f=(0,n._)([(0,a.c)("esri.layers.support.InheritedDomain")],v);const b=v;var q;let S=q=class extends h{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new q({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,s.qq)({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,r){t[r]=[this.minValue||0,e]}}}})],S.prototype,"maxValue",void 0),(0,n._)([(0,s.qq)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],S.prototype,"minValue",void 0),(0,n._)([(0,l.G)({range:"range"})],S.prototype,"type",void 0),S=q=(0,n._)([(0,a.c)("esri.layers.support.RangeDomain")],S);const w=S,_={key:"type",base:h,typeMap:{range:S,"coded-value":g,inherited:b}};function x(e){if(!e?.type)return null;switch(e.type){case"range":return w.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},36408:(e,t,r)=>{r.d(t,{M:()=>i});const i=new(r(14628).O)({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"})},73960:(e,t,r)=>{r.d(t,{e:()=>n});var i=r(28176);function n(e){return o[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){const t=(0,i.wt)(e);return a[t]||s}(e.url)}(e)]||l}const o={},s="text/plain",l=o[s],a={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in a)o[a[e]]=e},65548:(e,t,r)=>{r.d(t,{Ap:()=>u});var i=r(82692),n=r(564),o=r(3739),s=(r(73312),r(67300),r(18480),r(72944)),l=(r(53568),r(15024),r(63116),r(13428)),a=r(76992);function u({displayField:e,editFieldsInfo:t,fields:r,objectIdField:a,title:u},h){if(!r)return null;const m=function(e,t){const r=t?.visibleFieldNames;return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(p),e}(e.fields??[],t?.ignoreFieldTypes||y).map((t=>new l.c({fieldName:t.name,isEditable:(0,n.Yn)(t,e),label:t.alias,format:d(t),visible:c(t,{...e,visibleFieldNames:r})})))}({editFieldsInfo:t,fields:r,objectIdField:a},h);if(!m.length)return null;const g=function(e){const t=(0,n.G2)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:u,fields:r,displayField:e}),f=[new s.c,new o.c];return new i.c({title:g,content:f,fieldInfos:m})}const c=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,n.iY)(e,t);function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:h(e)?-1:h(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function d(e){switch(e.type){case"small-integer":case"integer":case"single":return new a.c({digitSeparator:!0,places:0});case"double":return new a.c({digitSeparator:!0,places:2});case"string":return(0,n.Gm)(e.name)?new a.c({digitSeparator:!0,places:0}):null;default:return null}}function h(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const y=["geometry","blob","raster","guid","xml"]}}]);
|