@arcgis/core 6.0.0-next.29 → 6.0.0-next.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/WebDocument2D.js +1 -1
  2. package/WebMap.d.ts +3 -19
  3. package/WebMap.js +1 -1
  4. package/WebScene.js +1 -1
  5. package/arcgisGlobal.d.ts +1 -0
  6. package/assets/esri/core/workers/RemoteClient.js +1 -1
  7. package/assets/esri/core/workers/chunks/039d9bc5b5015012f811.js +1 -0
  8. package/assets/esri/core/workers/chunks/{b01688ccc29d33bfc82d.js → 28a821de9dbf10324033.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{d3c3fb079ad97970f834.js → 4fb2fcc95f852bf8f86c.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{84940d8e14caf5a27e04.js → 64b360625c68cb863a08.js} +1 -1
  11. package/assets/esri/core/workers/chunks/71f792a20077aa739f87.js +1 -0
  12. package/assets/esri/core/workers/chunks/{e480e7d5f40049a2053b.js → 7af4edc6e87d27b9d467.js} +1 -1
  13. package/assets/esri/core/workers/chunks/90c1d10eae7ae71889b0.js +1 -0
  14. package/assets/esri/core/workers/chunks/{8a485130781b49dbf608.js → 9d40786c5ceface786ba.js} +1 -1
  15. package/assets/esri/core/workers/chunks/aba259a70bee68d2edb7.js +1 -0
  16. package/assets/esri/core/workers/chunks/c33a9635c294c8774977.js +1 -0
  17. package/assets/esri/views/3d/environment/resources/milkyway-band.avif +0 -0
  18. package/chunks/GlobalIllumination.glsl.js +16 -10
  19. package/chunks/GlobalIlluminationBlur.glsl.js +14 -14
  20. package/chunks/GlobalIlluminationUpscale.glsl.js +4 -4
  21. package/chunks/RibbonLine.glsl.js +78 -75
  22. package/config.js +1 -1
  23. package/core/workers/WorkerHandle.js +1 -1
  24. package/kernel.js +1 -1
  25. package/layers/WMTSLayer.d.ts +1 -1
  26. package/layers/WMTSLayer.js +1 -1
  27. package/layers/mixins/TiledImagery.d.ts +7 -0
  28. package/layers/support/WMTSSublayer.d.ts +5 -5
  29. package/networks/Network.js +1 -1
  30. package/networks/support/TopologyValidationJobInfo.js +1 -1
  31. package/package.json +2 -2
  32. package/rest/networks/support/ValidateNetworkTopologyResult.js +1 -1
  33. package/support/timeUtils.js +1 -1
  34. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  35. package/views/2d/layers/GeospatialPDFLayerView2D.js +1 -1
  36. package/views/2d/layers/SketchLayerView2D.js +1 -1
  37. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  38. package/views/2d/types.d.ts +2 -1
  39. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  40. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  41. package/views/3d/interactive/visualElements/Object3DVisualElement.js +1 -1
  42. package/views/3d/interactive/visualElements/PointVisualElement.js +1 -1
  43. package/views/3d/interactive/visualElements/StageObjectVisualElement.js +2 -0
  44. package/views/3d/layers/WMTSLayerView3D.js +1 -1
  45. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  46. package/views/3d/layers/graphics/ElevationAligners.js +1 -1
  47. package/views/3d/layers/graphics/Graphics3DBufferGraphicLayer.js +1 -1
  48. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  49. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  50. package/views/3d/layers/graphics/Graphics3DPathSymbolLayerConstants.js +1 -1
  51. package/views/3d/layers/graphics/Graphics3DStageObjectGraphicLayer.js +1 -1
  52. package/views/3d/layers/graphics/Graphics3DTextSymbolLayer.js +1 -1
  53. package/views/3d/layers/graphics/elevationAlignmentUtils.js +1 -1
  54. package/views/3d/layers/graphics/pointUtils.js +1 -1
  55. package/views/3d/terrain/ExtentHelper.js +1 -1
  56. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  57. package/views/3d/terrain/PatchRenderData.js +1 -1
  58. package/views/3d/terrain/SphericalPatch.js +1 -1
  59. package/views/3d/terrain/TerrainRenderer.js +1 -1
  60. package/views/3d/terrain/TerrainSurface.js +1 -1
  61. package/views/3d/terrain/Tile.js +1 -1
  62. package/views/3d/terrain/tileUtils.js +1 -1
  63. package/views/3d/types.d.ts +2 -1
  64. package/views/3d/webgl-engine/Stage.js +1 -1
  65. package/views/3d/webgl-engine/core/shaderLibrary/attributes/PathVertexInfo.glsl.js +10 -11
  66. package/views/3d/webgl-engine/core/shaderLibrary/util/PackedUint32.glsl.js +2 -0
  67. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  68. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  69. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
  70. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationUpscale.glsl.js +1 -1
  71. package/views/3d/webgl-engine/effects/globalIllumination/globalIlluminationUniforms.js +2 -0
  72. package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
  73. package/views/3d/webgl-engine/lib/GeometryUtil.js +1 -1
  74. package/views/3d/webgl-engine/lib/Object3D.js +1 -1
  75. package/views/3d/webgl-engine/lib/PackedUint32.js +2 -0
  76. package/views/3d/webgl-engine/lib/PathGeometry.js +1 -1
  77. package/views/3d/webgl-engine/lib/PathVertexInfo.js +1 -1
  78. package/views/3d/webgl-engine/lib/RibbonLineVertexInfo.js +2 -0
  79. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  80. package/views/3d/webgl-engine/materials/HUDMaterialBaseInstance.js +1 -1
  81. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  82. package/views/3d/webgl-engine/materials/LineCalloutMaterialBaseInstance.js +1 -1
  83. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  84. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  85. package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
  86. package/views/3d/webgl-engine/parts/Model.js +1 -1
  87. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  88. package/views/3d/webgl-engine/shaders/RibbonLineLayouts.js +1 -1
  89. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  90. package/views/3d/webgl-engine/shaders/RibbonLineTextureBuffer.glsl.js +1 -1
  91. package/views/SelectionManager.d.ts +5 -5
  92. package/views/SelectionManager.js +1 -1
  93. package/views/input/InputManager.js +1 -1
  94. package/views/layers/WMTSLayerView.d.ts +16 -0
  95. package/views/layers/WMTSLayerView.js +2 -0
  96. package/views/layers/support/highlightUtils.js +1 -1
  97. package/views/selection/SelectionOperation.js +1 -1
  98. package/views/selection/types.d.ts +3 -3
  99. package/views/support/GeometryWorker.js +1 -1
  100. package/views/support/GeometryWorkerHandle.js +1 -1
  101. package/views/support/selectionUtils.js +1 -1
  102. package/webdoc/support/webdocLoadUtils.js +1 -1
  103. package/widgets/BatchAttributeForm/inputs/RelationshipElementInput.js +1 -1
  104. package/widgets/FeatureTable/AttachmentsColumn.js +1 -1
  105. package/widgets/FeatureTable/RelationshipColumn.js +1 -1
  106. package/widgets/OrientedImageryViewer/imageMeasurementWorkerUtils.js +1 -1
  107. package/widgets/support/SelectionList/GroupLayerItem.d.ts +5 -5
  108. package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
  109. package/widgets/support/SelectionList/ItemBase.d.ts +3 -3
  110. package/widgets/support/SelectionList/LayerItem.js +1 -1
  111. package/widgets/support/SelectionList/SelectionListViewModel.d.ts +5 -6
  112. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  113. package/widgets/support/SelectionList/types.d.ts +3 -1
  114. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  115. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  116. package/widgets/support/symbolPreviewUtils.js +1 -1
  117. package/assets/esri/core/workers/chunks/2de4296590bf9f9e9add.js +0 -1
  118. package/assets/esri/core/workers/chunks/4976f5567fc7f1b63d10.js +0 -1
  119. package/assets/esri/core/workers/chunks/53c7510df09b71ab5646.js +0 -1
  120. package/assets/esri/core/workers/chunks/66c2a28a851130b87c04.js +0 -1
  121. package/assets/esri/core/workers/chunks/e7aaf7579592b79d6dd7.js +0 -1
  122. package/layers/geospatialPDF/CIM2DLayerview.js +0 -2
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6874],{66344(e,t,i){i.d(t,{q:()=>o});const r=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class s{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){return this._db.get(e.id+t)?.size??0}put(e,t,i,s,a){t=e.id+t;let o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==i&&this._notifyRemove(t,o.entry,o.size,0)),s>this._maxSize)return void this._notifyRemove(t,i,s,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return r||console.warn(`Refusing to cache entry with size ${s} for key ${t}`),void this._notifyRemove(t,i,0,0);let n=1+Math.max(a,-4)- -3;this._db.set(t,new l(i,s,n)),this._size+=s,e.size+=s,this._checkSize()}updateSize(e,t){t=e.id+t;let i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let r=i.entry.usedMemory;for(;r>this._maxSize;){let e=this._notifyRemove(t,i.entry,r,1);if(!(null!=e&&e>0))return void this._db.delete(t);r=e}i.size=r,this._size+=r,e.size+=r,this._checkSize()}pop(e,t){t=e.id+t;let i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;let i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){let i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){let e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=[];this._db.forEach((e,r)=>{let s=e.lifetime;i[s]=(i[s]||0)+e.size,this._clients.forEach(i=>{let{id:s,name:l}=i;if(r.startsWith(s)){let i=t[l]||0;t[l]=i+e.size}})});let r={};this._clients.forEach(e=>{let i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){let s=t[i]||0;t[i]=s,r[i]=Math.round(100*e.hitRate)+"%"}else r[i]="0%"});let s=Object.keys(t);s.sort((e,i)=>t[i]-t[e]),s.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+r[i]);for(let t=i.length-1;t>=0;--t){let r=i[t];r&&(e["Priority "+(t+-3-1)]=Math.round(r/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){let t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(let[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,r){let s=this._clients.get(e.split(a)[0])?.removeFunc,l=s?.(t,r,i);return"number"==typeof l?l:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){let i=t??this;if(i.size<=e)return;let r=t?.id,s=!0;for(;s;){s=!1;for(let[l,o]of this._db)if(0===o.lifetime&&(!r||l.startsWith(r))){let r=t??this._clients.get(l.split(a)[0]);if(this._purgeItem(l,o,r),i.size<=.9*e)return;s||=this._db.has(l)}}for(let[s,l]of this._db)if(!r||s.startsWith(r)){let r=t??this._clients.get(s.split(a)[0]);if(this._purgeItem(s,l,r),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);let r=this._notifyRemove(e,t.entry,t.size,1);null!=r&&r>0&&(this._size+=r,i&&(i.size+=r),t.lives=t.lifetime,t.size=r,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new s(0);class l{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const a=":";class o{constructor(e,t){this.removeFunc=t,this.id="",this.name="",this.size=0,this._storage=new s(e,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},60999(e,t,i){i.d(t,{DZ:()=>f,Ke:()=>p,QA:()=>g,Tj:()=>u,UT:()=>y,aD:()=>v,jJ:()=>h});var r=i(32198),s=i(69622),l=i(97768),a=i(17676),o=i(10107),n=i(64108);function h(e,t,i){return(0,a.Lx)(e.map((e,r)=>t.apply(i,[e,r])))}async function u(e,t,i){return(await(0,a.Lx)(e.map((e,r)=>t.apply(i,[e,r])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function f(e){try{return c(await e)}catch(e){return(0,a.QP)(e),d(e)}}function g(e){if(!0===e.ok)return e.value;throw e.error}function y(e,t){return new m(e,t)}let m=class extends s.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,l.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;let{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=c(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,a.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,l.xt)(this._abortHandle),this._abortController=null}};(0,r.Cg)([(0,o.MZ)()],m.prototype,"value",null),(0,r.Cg)([(0,o.MZ)()],m.prototype,"error",null),(0,r.Cg)([(0,o.MZ)()],m.prototype,"finished",null),(0,r.Cg)([(0,o.MZ)()],m.prototype,"promise",void 0),(0,r.Cg)([(0,o.MZ)()],m.prototype,"_result",void 0),m=(0,r.Cg)([(0,n.$)("esri.core.asyncUtils.ReactiveTask")],m);class v{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});let t=await e;return{[Symbol.dispose]:t}}async run(e){let t={stack:[],error:void 0,hasError:!1};try{return(0,r.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,r.hk)(t)}}}},69397(e,t,i){i.d(t,{Qf:()=>n,Qh:()=>a,lM:()=>l,ro:()=>h,rq:()=>u});var r=i(44208),s=i(34275);function l(e){if(!e)return 0;let t=c;for(let i in e)e.hasOwnProperty(i)&&(t+=o(e[i],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return n(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let i=d;for(let r=0;r<t;r++)i+=o(e[r]);return i}(e);let t=c;for(let i in e)e.hasOwnProperty(i)&&(t+=o(e[i]));return t}function o(e,t=!0){switch(typeof e){case"object":return t?a(e):c;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function n(...e){return e.reduce((e,t)=>e+h(t),0)}function h(e,t=16){return e?(0,s.iu)(e)?e.byteLength+f:Array.isArray(e)?u(e,t):0:0}function u(e,t){return d+e.length*t}const c=32,d=16,p=(0,r.A)("ios")||!(0,r.A)("chrome")&&!(0,r.A)("opr")?8:4,f=145;i.d(t,["JY",0,p])},83027(e,t,i){const r=i(29953).ho;i.d(t,["h",0,r])},35982(e,t,i){i.d(t,{B:()=>u});var r=i(4576),s=i(71511),l=i(36563),a=i(53966),o=i(97768),n=i(17676),h=i(83027);class u{constructor(e,t,i,r,s={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._onClientConnectedHandle=null,this._destroyed=!1,this._promise=(0,h.h)(e,{...s,schedule:r}).then(e=>{null!=this._thread||this._destroyed?e.close():(this._thread=e,this._promise=null,this._onClientConnectedHandle=this._thread.onClientConnected(e=>{s.hasInitialize&&e.invoke("initialize",{}).catch(()=>{});for(let t of this._listeners)this._connectListenerToClient(t,e);this._onClientConnected(e)}))}),this._promise.catch(t=>a.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){let i=new c(e,t);return this._listeners.push(i),this._connectListener(i),(0,l.hA)(()=>{(0,r.TF)(this._listeners,i),i.destroy()})}[Symbol.dispose](){this.destroy()}destroy(){this._onClientConnectedHandle=(0,o.xt)(this._onClientConnectedHandle),this._thread&&=(this._thread.close(),null),this._promise=null;for(let e of this._listeners)e.destroy();this._listeners.length=0,this._transferLists={},this._destroyed=!0}invoke(e,t,i){return this.invokeMethod(this._mainMethod,e,t,i)}invokeMethod(e,t,i,r){if(this._thread){let s=this._transferLists[e],l=s?s(t):[];return this._thread.invoke(e,t,{transferList:l,signal:i,jobPriority:r})}return this._promise?this._promise.then(()=>((0,n.Te)(i),this.invokeMethod(e,t,i))):Promise.reject((0,n.NK)())}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(d):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject((0,n.NK)())}get promise(){return this._promise}_onClientConnected(e){}_connectListener(e){this._thread&&e.add(this._thread.on(e.eventName,e.callback))}_connectListenerToClient(e,t){e.add(t.on(e.eventName,e.callback))}}class c{constructor(e,t){this.eventName=e,this.callback=t,this._handles=new s.A}add(e){this._handles.add(e)}destroy(){this._handles.destroy()}}function d(){}},54239(e,t,i){i.d(t,{A:()=>m});var r,s=i(32198),l=i(4576),a=i(66552),o=i(25482),n=i(86211),h=i(67076),u=i(91429),c=i(97348),d=i(43937),p=i(36005);const f=(0,a.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),g=f.jsonValues.slice();(0,l.Xy)(g,"orthometric");const y=(0,a.O)()({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 m=r=class extends o.o{constructor(e){super(e),this.origin=0,this.associatedSpatialReference=null,this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}read(e,t){super.read(e,t),("service"===t?.origin||"web-scene"===t?.origin)&&(this.origin="service"===t.origin?2:1,this.associatedSpatialReference=null)}writeHeightModel(e,t,i){return f.write(e,t,i)}readHeightModel(e,t,i){return f.read(e)||(i?.messages&&i.messages.push(function(e,t){return new h.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return y.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,n.LA)(e)||y.read(e)||(i?.messages&&i.messages.push(v(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new r({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS,origin:this.origin,associatedSpatialReference:this.associatedSpatialReference})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static fromSpatialReference(e){let{latestVcsWkid:t,vcsWkid:i}=e;if(!i)return null;let s=(null==t?null:c.B.get(t))??c.B.get(i);return s?new r({heightModel:0===s.type?"gravity-related-height":"ellipsoidal",heightUnit:(0,n.LA)(s.unit.name),vertCRS:s.datum,origin:3,associatedSpatialReference:e}):null}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;let t=new r;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new h.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s.Cg)([(0,u.MZ)()],m.prototype,"origin",void 0),(0,s.Cg)([(0,u.MZ)()],m.prototype,"associatedSpatialReference",void 0),(0,s.Cg)([(0,u.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g,default:"ellipsoidal",write:{isRequired:!0,alwaysWriteDefaults:!0}}}}})],m.prototype,"heightModel",void 0),(0,s.Cg)([(0,d.K)("web-scene","heightModel")],m.prototype,"writeHeightModel",null),(0,s.Cg)([(0,p.w)(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),(0,s.Cg)([(0,u.MZ)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:y.jsonValues,write:{writer:y.write,isRequired:!0}}}}})],m.prototype,"heightUnit",void 0),(0,s.Cg)([(0,p.w)("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),(0,s.Cg)([(0,p.w)("service","heightUnit")],m.prototype,"readHeightUnitService",null),(0,s.Cg)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),(0,s.Cg)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=r=(0,s.Cg)([(0,u.$K)("esri.geometry.HeightModelInfo")],m)},38732(e,t,i){i.r(t),i.d(t,{default:()=>A});var r=i(32198),s=i(56507),l=i(49186),a=i(97768),o=i(25728),n=i(17676),h=i(84952),u=i(91429),c=i(4146),d=i(89186),p=i(18768),f=i(85707),g=i(34287),y=i(8303),m=i(10873),v=i(87378),_=i(35982);class w extends _.B{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(b.forEach((e,t)=>{e===this&&b.delete(t)}),this.destroy())}}const b=new Map;var C=i(36005);let M=class extends((0,f.a)((0,d.f)((0,p.b)((0,g.q)((0,y.A)((0,o.M)(c.A))))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=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=b.get(e);return t||(null==e?(t=new w,b.set(null,t)):(t=new w(t=>e.immediate.schedule(t)),b.set(e,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,a.Gz)(this._lercDecoder)}readCapabilities(e,t){let i=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());return i?{operations:{supportsTileMap:i.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}get memoizedElevationQueryDependencies(){return[this.loadStatus,this.tileInfo,this.fullExtent,this.spatialReference]}readVersion(e,t){let i=t.currentVersion;return i||=9.3,i}load(e){let t=null==e?null:e.signal;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 l.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(n.QP).then(()=>this._fetchImageService(t))),Promise.resolve(this)}async fetchTile(e,t,i,r){let a=r?.signal,o={responseType:"array-buffer",signal:a,useQueue:r?.useQueue,priority:r?.priority},n={noDataValue:r?.noDataValue};await this.load(),await this._fetchTileAvailability(e,t,i,r);let h=await(0,s.A)(this.getTileUrl(e,t,i),o),u=await this._lercDecoder.decode(h.data,n,a);if(!u)throw new l.A("elevation-layer:tile-decode-failed","Failed to decode elevation tile data.");return new v.A({values:u.pixelData,width:u.width,height:u.height,noDataValue:u.noDataValue})}getTileUrl(e,t,i){let r=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,s=(0,h.x0)({...this.parsedUrl.query,blankTile:!r&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${s?"?"+s:""}`}async queryElevation(e,t){let{query:r}=await i.e(4943).then(()=>i(54943));return(0,n.Te)(t),r(this,e,t)}async createElevationSampler(e,t){let{createSampler:r}=await i.e(4943).then(()=>i(54943));return(0,n.Te)(t),r(this,e,t)}_fetchTileAvailability(e,t,i,r){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,r):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;let t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await(0,s.A)(this.parsedUrl.path,t);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[S]}};(0,r.Cg)([(0,u.MZ)({readOnly:!0})],M.prototype,"capabilities",void 0),(0,r.Cg)([(0,C.w)("service","capabilities",["capabilities"])],M.prototype,"readCapabilities",null),(0,r.Cg)([(0,u.MZ)({json:{read:{source:"copyrightText"}}})],M.prototype,"copyright",void 0),(0,r.Cg)([(0,u.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],M.prototype,"path",void 0),(0,r.Cg)([(0,u.MZ)({type:["show","hide"]})],M.prototype,"listMode",void 0),(0,r.Cg)([(0,u.MZ)({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.Cg)([(0,u.MZ)({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.Cg)([(0,u.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],M.prototype,"opacity",void 0),(0,r.Cg)([(0,u.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],M.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,u.MZ)()],M.prototype,"sourceJSON",void 0),(0,r.Cg)([(0,u.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],M.prototype,"type",void 0),(0,r.Cg)([(0,u.MZ)()],M.prototype,"memoizedElevationQueryDependencies",null),(0,r.Cg)([(0,u.MZ)(m.OZ)],M.prototype,"url",void 0),(0,r.Cg)([(0,u.MZ)()],M.prototype,"version",void 0),(0,r.Cg)([(0,C.w)("version",["currentVersion"])],M.prototype,"readVersion",null),M=(0,r.Cg)([(0,u.$K)("esri.layers.ElevationLayer")],M);const S=Symbol("default-fetch-tile");M.prototype.fetchTile[S]=!0;const A=M},89186(e,t,i){var r=i(32198),s=i(91429),l=i(16930),a=i(87045),o=i(65509),n=i(25943),h=i(36005);i.d(t,["f",0,e=>{let t=e,i=class extends t{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,i){let r=t.capabilities?.toLowerCase().includes("tilemap"),{minLOD:s,maxLOD:l,minScale:h,maxScale:u}=t;if(null==s&&null==l&&(0!==h||0!==u)){let e=e=>Math.round(1e4*e)/1e4;h=e(h||t.tileInfo.lods[0].scale),u=e(u||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(let i of t.tileInfo.lods){let t=e(i.scale);s=t>=h?i.level:s,l=t>=u?i.level:l}}if(r)return new n.d({layer:this,minLOD:s,maxLOD:l});if(t.tileInfo){let e=new a.A;return e.read(t.tileInfo,i),new o.A(e,s,l)}return null}};return(0,r.Cg)([(0,s.MZ)({json:{read:{source:"copyrightText"}}})],i.prototype,"copyright",void 0),(0,r.Cg)([(0,s.MZ)()],i.prototype,"minScale",void 0),(0,r.Cg)([(0,h.w)("service","minScale")],i.prototype,"readMinScale",null),(0,r.Cg)([(0,s.MZ)()],i.prototype,"maxScale",void 0),(0,r.Cg)([(0,h.w)("service","maxScale")],i.prototype,"readMaxScale",null),(0,r.Cg)([(0,s.MZ)({type:l.A})],i.prototype,"spatialReference",void 0),(0,r.Cg)([(0,s.MZ)({readOnly:!0})],i.prototype,"supportsBlankTile",null),(0,r.Cg)([(0,s.MZ)({type:a.A})],i.prototype,"tileInfo",void 0),(0,r.Cg)([(0,s.MZ)()],i.prototype,"tilemapCache",void 0),(0,r.Cg)([(0,h.w)("service","tilemapCache",["capabilities","tileInfo"])],i.prototype,"readTilemapCache",null),(0,r.Cg)([(0,s.MZ)()],i.prototype,"version",void 0),i=(0,r.Cg)([(0,s.$K)("esri.layers.mixins.ArcGISCachedService")],i),i}])},18768(e,t,i){var r=i(32198),s=i(53966),l=i(91429),a=i(60694);i.d(t,["b",0,e=>{let t=e,i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){let e=(0,a.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,r.Cg)([(0,l.MZ)()],i.prototype,"title",null),(0,r.Cg)([(0,l.MZ)({type:String})],i.prototype,"url",null),i=(0,r.Cg)([(0,l.$K)("esri.layers.mixins.ArcGISService")],i),i}])},85707(e,t,i){var r=i(32198),s=i(91429),l=i(54239);i.d(t,["a",0,e=>{let t=e,i=class extends t{constructor(){super(...arguments),this.heightModelInfo=null}read(e,t){super.read(e,t),"service"===t?.origin&&2===this.heightModelInfo?.origin&&(this.heightModelInfo.associatedSpatialReference=this.getAtOrigin("spatialReference","service"))}};return(0,r.Cg)([(0,s.MZ)({readOnly:!0,type:l.A})],i.prototype,"heightModelInfo",void 0),i=(0,r.Cg)([(0,s.$K)("esri.layers.mixins.HeightModelInfoMixin")],i),i}])},8303(e,t,i){var r=i(32198),s=i(92602),l=i(70333),a=i(56507),o=i(60999),n=i(49186),h=i(36563),u=i(53966),c=i(97768),d=i(17676),p=i(84952),f=i(91429),g=i(77548),y=i(20655),m=i(80812),v=i(41318),_=i(10407),w=i(26121),b=i(36005),C=i(43937);const M={credential:null,user:null};i.d(t,["A",0,e=>{let t=e,S=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new m.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{let{load:r}=await i.e(1204).then(()=>i(41204));return(0,d.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e,t){if(!this.loaded||!this.portalItem?.id)return!1;let r=t?.signal?null:new AbortController;try{let{reload:s}=await i.e(1204).then(()=>i(41204));return r&&this.addHandles((0,h.rE)(r),"reloadFromPortal"),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t?.signal?t:{signal:r.signal})}catch(e){throw(0,d.zf)(e)||u.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{r&&this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,d.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{let{features:{edit:i,fullEdit:r},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);let r,s,a=!l.id?.findCredential(this.url),o=e===i.id;if(o&&i.portal.user)return this._getUserPrivileges(i,a);if(o)r=i.portal.url;else try{r=await(0,g.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!r||!(0,p.b8)(r,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{let e=null==t?null:t.signal;s=await(l.id?.getCredential(`${r}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}if(!s)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(o?await i.reload():(i=new m.default({id:e,portal:{url:r}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,a)}catch(e){(0,d.QP)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}_getUserPrivileges(e,t){let i=(0,_.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){let t=this.url?l.id?.findCredential(this.url):null;if(!t)return!0;let i=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){let t=this.portalItem?.portal?.user;if(t)return t;let i=l.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;let r=`${i.owningSystemUrl}/sharing/rest`,s=y.A.getDefault();if(s&&s.loaded&&(0,p.S8)(s.restUrl)===(0,p.S8)(r))return s.user;let n=`${r}/community/self`,h=null==e?null:e.signal,u=await(0,o.Ke)((0,a.A)(n,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?v.A.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){return(0,w.wN)(this.portalItem,t)?(t?.messages?.push(new n.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r.Cg)([(0,f.MZ)({type:m.default})],S.prototype,"portalItem",null),(0,r.Cg)([(0,b.w)("web-document","portalItem",["itemId"])],S.prototype,"readPortalItem",null),(0,r.Cg)([(0,C.K)("web-document","portalItem",{itemId:{type:String}})],S.prototype,"writePortalItem",null),(0,r.Cg)([(0,f.MZ)({clonable:!1})],S.prototype,"resourceReferences",void 0),(0,r.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],S.prototype,"userHasEditingPrivileges",void 0),(0,r.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],S.prototype,"userHasFullEditingPrivileges",void 0),(0,r.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],S.prototype,"userHasUpdateItemPrivileges",void 0),S=(0,r.Cg)([(0,f.$K)("esri.layers.mixins.PortalLayer")],S),S}])},87378(e,t,i){i.d(t,{A:()=>o});var r,s=i(34275),l=i(78888);const a=Symbol("ElevationTileDataClass");class o{static{r=a}constructor({values:e,width:t,height:i,noDataValue:l}){this[r]=!0,this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,this.values=(0,s.vZ)(e)?e:new Float32Array(e),this.width=t,this.height=i,this.noDataValue=l}get hasNoDataValues(){if(null==this._hasNoDataValues){let 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}get usedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;let{noDataValue:e,values:t}=this,i=1/0,r=-1/0,s=!0;for(let l of t)l===e?this._hasNoDataValues=!0:(i=l<i?l:i,r=l>r?l:r,s=!1);s?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=r>-3e38?r:0)}static{this.from=(0,l.qf)(o)}}},91806(e,t,i){i.d(t,{A:()=>n});var r,s=i(32198),l=i(25482),a=i(91429),o=i(78888);let n=class extends l.o{static{r=this}constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new r({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,s.Cg)([(0,a.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],n.prototype,"cols",void 0),(0,s.Cg)([(0,a.MZ)({type:o.jz,json:{write:!0}})],n.prototype,"level",void 0),(0,s.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],n.prototype,"levelValue",void 0),(0,s.Cg)([(0,a.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],n.prototype,"origin",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],n.prototype,"resolution",void 0),(0,s.Cg)([(0,a.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],n.prototype,"rows",void 0),(0,s.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],n.prototype,"scale",void 0),n=r=(0,s.Cg)([(0,a.$K)("esri.layers.support.LOD")],n)},87045(e,t,i){i.d(t,{A:()=>_});var r,s=i(32198),l=i(66552),a=i(25482),o=i(86211),n=i(91429),h=i(78888),u=i(86738),c=i(16930),d=i(21325),p=i(28735),f=i(91806),g=i(72802),y=i(36005),m=i(43937);const v=new l.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",JPEGPlus:"jpgplus",pbf:"pbf"});let _=class extends a.o{static{r=this}static create(e={}){let{resolutionFactor:t=1,scales:i,size:s=256,spatialReference:l=c.A.WebMercator,numLODs:a=24}=e;if(!(0,d.fn)(l)){let e=[];if(i)for(let t=0;t<i.length;t++){let r=i[t];e.push(new f.A({level:t,scale:r,resolution:r}))}else{let t=5e-4;for(let i=a-1;i>=0;i--)e.unshift(new f.A({level:i,scale:t,resolution:t})),t*=2}return new r({dpi:96,lods:e,origin:new u.A(0,0,l),size:[s,s],spatialReference:l})}let n=(0,d.Vp)(l),h=e.origin?new u.A({x:e.origin.x,y:e.origin.y,spatialReference:l}):n?new u.A({x:n.origin[0],y:n.origin[1],spatialReference:l}):new u.A({x:0,y:0,spatialReference:l}),p=1/(39.37*(0,o.GA)(l)*96),g=[];if(i)for(let e=0;e<i.length;e++){let t=i[e],r=t*p;g.push(new f.A({level:e,scale:t,resolution:r}))}else{let e=(0,d.EA)(l)?512/s*591657527.5917094:256/s*591657527.591555,i=Math.ceil(a/t);g.push(new f.A({level:0,scale:e,resolution:e*p}));for(let r=1;r<i;r++){let i=e/2**t,s=i*p;g.push(new f.A({level:r,scale:i,resolution:s})),e=i}}return new r({dpi:96,lods:g,origin:h,size:[s,s],spatialReference:l})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){let{spatialReference:e,origin:t}=this;if(e&&t){let i=(0,d.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return u.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0,r=[],s=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach(e=>{r.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,s[e.level]=e})),this._set("scales",r),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){let t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];let i=Math.floor(e),r=i+1;return t[i]/(t[i]/t[r])**(e-i)}scaleToZoom(e){let t=this.scales,i=t.length-1,r=0;for(;r<i;r++){let i=t[r],s=t[r+1];if(i<=e)return r;if(s===e)return r+1;if(i>e&&s<e)return r+Math.log(i/e)/Math.log(i/s)}return r}tileAt(e,t,i,r){let s,l,a=this.lodAt(e);if(!a)return null;if("number"==typeof t)s=t,l=i;else if((0,d.aI)(t.spatialReference,this.spatialReference))s=t.x,l=t.y,r=i;else{let e=(0,p.Cv)(t,this.spatialReference);if(null==e)return null;s=e.x,l=e.y,r=i}let o=a.resolution*this.size[0],n=a.resolution*this.size[1];return r??=new g.U(0,0,0),r.level=e,r.row=Math.floor((this.origin.y-l)/n+.001),r.col=Math.floor((s-this.origin.x)/o+.001),this.updateTileInfo(r),r}updateTileInfo(e,t=0){if(!("extent"in e))return!1;let i=this.lodAt(e.level);if(!i&&1===t){let t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return!1;let r=e.level-i.level,s=i.resolution*this.size[0]/2**r,l=i.resolution*this.size[1]/2**r;return e.extent[0]=this.origin.x+e.col*s,e.extent[1]=this.origin.y-(e.row+1)*l,e.extent[2]=e.extent[0]+s,e.extent[3]=e.extent[1]+l,!0}upsampleTile(e){let t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){let i=this.lodAt(t.level);if(null==i)return null;let{resolution:r}=i,s=r*this.size[0],l=r*this.size[1];return e[0]=this.origin.x+t.col*s,e[1]=this.origin.y-(t.row+1)*l,e[2]=e[0]+s,e[3]=e[1]+l,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return r.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;let t=(512===this.size[0]&&256===e?-1:0)+ +!!this.spatialReference.isGeographic;if(this.size[0]===e&&0===t)return this;let i=[],s=this.lods.length-t;for(let e=0;e<s;e++){let r=e+t,{scale:s,resolution:l}=r>=0?this.lods[r]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new f.A({level:e,scale:s,resolution:l}))}return new r({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){let e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){let r=e[i];this._upsampleLevels[r.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/r.resolution:0},t=r}}};(0,s.Cg)([(0,n.MZ)({type:Number,json:{write:!0}})],_.prototype,"compressionQuality",void 0),(0,s.Cg)([(0,n.MZ)({type:Number,json:{write:!0}})],_.prototype,"dpi",void 0),(0,s.Cg)([(0,n.MZ)({type:String,json:{read:v.read,write:v.write,origins:{"web-scene":{read:!1,write:!1}}}})],_.prototype,"format",void 0),(0,s.Cg)([(0,n.MZ)({readOnly:!0})],_.prototype,"isWrappable",null),(0,s.Cg)([(0,n.MZ)({type:u.A,json:{write:!0}})],_.prototype,"origin",void 0),(0,s.Cg)([(0,y.w)("origin")],_.prototype,"readOrigin",null),(0,s.Cg)([(0,n.MZ)({type:[f.A],value:null,json:{write:!0}})],_.prototype,"lods",null),(0,s.Cg)([(0,n.MZ)({readOnly:!0})],_.prototype,"scales",void 0),(0,s.Cg)([(0,n.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],_.prototype,"size",void 0),(0,s.Cg)([(0,y.w)("size",["rows","cols"])],_.prototype,"readSize",null),(0,s.Cg)([(0,m.K)("size",{cols:{type:h.jz},rows:{type:h.jz}})],_.prototype,"writeSize",null),(0,s.Cg)([(0,n.MZ)({type:c.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),_=r=(0,s.Cg)([(0,n.$K)("esri.layers.support.TileInfo")],_)},65509(e,t,i){i.d(t,{A:()=>l});var r=i(49186),s=i(17676);class l{constructor(e,t=0,i=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=i,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(i)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,i){let r=this.tileInfo?.lodAt(e);return!r||e<this.minLOD||e>this.maxLOD?"unavailable":r.cols&&r.rows?i>=r.cols[0]&&i<=r.cols[1]&&t>=r.rows[0]&&t<=r.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,i,l){await(0,s.NO)(l);let a=this.getAvailability(e,t,i);if("unavailable"===a)throw new r.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return a}async fetchAvailabilityUpsample(e,t,i,r,l){await(0,s.NO)(l),r.level=e,r.row=t,r.col=i;let a=this.tileInfo;return a.updateTileInfo(r),this.fetchAvailability(e,t,i,l).catch(e=>{if((0,s.zf)(e))throw e;if(a.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,l);throw e})}}},72802(e,t,i){i.d(t,{U:()=>s});var r=i(19419);class s{constructor(e,t,i,s=(0,r.vt)()){this._level=e,this._row=t,this._col=i,this.extent=s}get id(){return this._id??=`${this.level}/${this.row}/${this.col}`,this._id}get level(){return this._level}set level(e){this._level=e,this._id=null}get row(){return this._row}set row(e){this._row=e,this._id=null}get col(){return this._col}set col(e){this._col=e,this._id=null}toJSON(){return{level:this._level,row:this._row,col:this._col,extent:this.extent}}static fromJSON(e){return new s(e.level,e.row,e.col,e.extent)}}},25943(e,t,i){i.d(t,{d:()=>C});var r,s=i(32198),l=i(56507),a=i(69622),o=i(49186),n=i(36563),h=(i(44208),i(66344)),u=i(15142),c=i(17676),d=i(36708),p=i(76030),f=i(84952),g=i(91429),y=i(72802),m=i(4718),v=i(69397);class _{constructor(e){!function(e){if(!e?.location)throw new o.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new o.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new o.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new o.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new o.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);let{location:t,data:i}=e;this.location=Object.freeze((0,m.o8)(t));let r=this.location.width,s=this.location.height,l=!0,a=!0,n=function(e,t=!1){return e<=1024?t?Array(e).fill(0):Array(e):new Uint32Array(e)}(Math.ceil(r*s/32)),h=0;for(let e=0;e<i.length;e++){let t=e%32;i[e]?(a=!1,n[h]|=1<<t):l=!1,31===t&&++h}a?(this._availability="unavailable",this.byteSize=40):l?(this._availability="available",this.byteSize=40):(this._availability=n,this.byteSize=40+(0,v.Qf)(n))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;let i=(e-this.location.top)*this.location.width+(t-this.location.left),r=i%32,s=i>>5,l=this._availability;return s<0||s>l.length?"unknown":l[s]&1<<r?"available":"unavailable"}static fromDefinition(e,t){let i=e.service.request||l.A,{row:r,col:s,width:a,height:n}=e,h={query:{f:"json"}};return t=t?{...h,...t}:h,i(function(e){let t;if(e.service.tileServers?.length){let i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;let i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then(e=>e.data).catch(e=>{if(422===e?.details?.httpStatus)return{location:{top:r,left:s,width:a,height:n},valid:!0,data:Array(a*n).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==r||e.location.left!==s||e.location.width!==a||e.location.height!==n))throw new o.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:r,left:s,width:a,height:n}});return _.fromJSON(e)})}static fromJSON(e){return Object.freeze(new _(e))}}function w(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function b(e,t,i){return new o.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let C=class extends a.A{static{r=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=l.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new h.q(2097152),this.addHandles((0,d.wB)(()=>{let{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),d.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";let r=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return r?r.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,r){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(b(e,t,i)):this._fetchTilemap(e,t,i,r).catch(e=>e).then(r=>{if(r instanceof _){let s=r.getAvailability(t,i);if("unavailable"===s)throw b(e,t,i);return s}if((0,c.zf)(r))throw r;return"unknown"})}fetchAvailabilityUpsample(e,t,i,r,s){r.level=e,r.row=t,r.col=i;let l=this.layer.tileInfo;l.updateTileInfo(r);let a=this.fetchAvailability(e,t,i,s).catch(e=>{if((0,c.zf)(e))throw e;if(l.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,s);throw e});return this._fetchAvailabilityUpsamplePrefetch(e,t,i,s,a),a}async _fetchAvailabilityUpsamplePrefetch(e,t,i,s,l){if(!this._prefetchingEnabled)return;let a=`prefetch-${e}-${t}-${i}`;if(this.hasHandles(a))return;let o=new AbortController;l.then(()=>o.abort(),()=>o.abort());let h=!1,u=(0,n.hA)(()=>{h||(h=!0,o.abort())});if(this.addHandles(u,a),await(0,p.md)(10,o.signal).catch(()=>{}),h||(h=!0,this.removeHandles(a)),(0,c.G4)(o))return;let d=new y.U(e,t,i),f={...s,signal:o.signal},g=this.layer.tileInfo;for(let e=0;r._prefetches.length<r._maxPrefetch&&g.upsampleTile(d);++e){let e=this.fetchAvailability(d.level,d.row,d.col,f);r._prefetches.push(e);let t=()=>{r._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new u.A({initialSize:r._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,r){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new o.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));let s=this._tmpTilemapDefinition,l=this._tilemapFromCache(e,t,i,s);if(l)return Promise.resolve(l);let a=r?.signal;return r={...r,signal:null},new Promise((e,t)=>{(0,c.u7)(a,()=>t((0,c.NK)()));let i=w(s),l=this._pendingTilemapRequests[i];if(!l){l=_.fromDefinition(s,r).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));let e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=l,l.then(e,e)}l.then(e,t)})}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;let{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,f.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,r){r.level=e,r.row=t-t%this.size,r.col=i-i%this.size;let s=w(r);return this._tilemapCache.get(s)}get test(){}};(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],C.prototype,"layer",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],C.prototype,"minLOD",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],C.prototype,"maxLOD",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],C.prototype,"request",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],C.prototype,"size",void 0),C=r=(0,s.Cg)([(0,g.$K)("esri.layers.support.TilemapCache")],C)},10407(e,t,i){i.d(t,{It:()=>p,LG:()=>a,OM:()=>h,Sm:()=>u,Y:()=>o,bK:()=>n,sQ:()=>c});var r=i(99917),s=i(16930),l=i(28735);function a(e,t){if(!o(e,t)){let i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function o(e,t){return!!e.typeKeywords?.includes(t)}function n(e){return o(e,d.HOSTED_SERVICE)}function h(e,t){let i=e.typeKeywords;if(i){let e=i.indexOf(t);e>-1&&i.splice(e,1)}}function u(e,t,i){i?a(e,t):h(e,t)}async function c(e){let t,i=e.clone().normalize();if(i.length>1)for(let e of i)t?e.width>t.width&&(t=e):t=e;else t=i[0];return async function(e){let t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,l.ci)(e);let i=s.A.WGS84;return await(0,r.initializeProjection)(t,i),(0,r.project)(e,i)}(t)}const d={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function p(e){let{portal:t,isOrgItem:i,itemControl:r}=e,s=t.user?.privileges,l=!s||s.includes("features:user:edit"),a=!!i&&!!s?.includes("features:user:fullEdit"),o="update"===r||"admin"===r;return o?a=l=!0:a&&(l=!0),{features:{edit:l,fullEdit:a},content:{updateItem:o}}}i.d(t,["mm",0,d])},78553(e,t,i){i.d(t,{D:()=>l,p:()=>s});var r=i(78888);function s(e){let t=(0,r.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function l(e){let t=1-e/100;return Math.max(0,Math.min(t,1))}},26121(e,t,i){i.d(t,{I6:()=>u,ci:()=>h,dL:()=>n,wN:()=>c});var r=i(49186),s=i(84952),l=i(77548),a=i(20655),o=i(59923);async function n(e){let t=[];for(let i of e.allLayers)if("beforeSave"in i&&"function"==typeof i.beforeSave){let e=i.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}function h(e,t,i){let s=(e.messages??[]).filter(({type:e})=>"error"===e).map(({name:e,message:t,details:i})=>new r.A(e,t,i));if(e.blockedRelativeUrls&&(s=s.concat(e.blockedRelativeUrls.map(e=>(0,o.GL)("url",`Relative url '${e}' is not supported`)))),i){let{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:r}=i;e&&(s=s.filter(({name:e})=>!(o.MG.has(e)||t.includes(e)))),r&&(s=s.filter(e=>"web-document-write:property-required"!==e.name))}if(s.length>0)throw new r.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:s})}function u(e){return(0,l.qd)(e).some(e=>!!e.charts?.length)}function c(e,t){let i=t?.portal,r=e?.id&&(e.portal||a.A.getDefault());return!!i&&!!r&&!(0,s.ut)(r.restUrl,i.restUrl)}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2772,6451],{80200(e,t,i){i.d(t,{d:()=>c});const n={Base64:0,Hex:1,String:2,Raw:3};function s(e,t){let i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}function r(e,t,i,n,r,o){return s(function(e,t){return e<<t|e>>>32-t}(s(s(t,e),s(n,o)),r),i)}function o(e,t,i,n,s,o,l){return r(t&i|~t&n,e,t,s,o,l)}function l(e,t,i,n,s,o,l){return r(t&n|i&~n,e,t,s,o,l)}function a(e,t,i,n,s,o,l){return r(t^i^n,e,t,s,o,l)}function h(e,t,i,n,s,o,l){return r(i^(t|~n),e,t,s,o,l)}function u(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let i=1732584193,n=-271733879,r=-1732584194,u=271733878;for(let t=0;t<e.length;t+=16){let c=i,p=n,f=r,m=u;i=o(i,n,r,u,e[t],7,-680876936),u=o(u,i,n,r,e[t+1],12,-389564586),r=o(r,u,i,n,e[t+2],17,606105819),n=o(n,r,u,i,e[t+3],22,-1044525330),i=o(i,n,r,u,e[t+4],7,-176418897),u=o(u,i,n,r,e[t+5],12,1200080426),r=o(r,u,i,n,e[t+6],17,-1473231341),n=o(n,r,u,i,e[t+7],22,-45705983),i=o(i,n,r,u,e[t+8],7,1770035416),u=o(u,i,n,r,e[t+9],12,-1958414417),r=o(r,u,i,n,e[t+10],17,-42063),n=o(n,r,u,i,e[t+11],22,-1990404162),i=o(i,n,r,u,e[t+12],7,1804603682),u=o(u,i,n,r,e[t+13],12,-40341101),r=o(r,u,i,n,e[t+14],17,-1502002290),n=o(n,r,u,i,e[t+15],22,1236535329),i=l(i,n,r,u,e[t+1],5,-165796510),u=l(u,i,n,r,e[t+6],9,-1069501632),r=l(r,u,i,n,e[t+11],14,643717713),n=l(n,r,u,i,e[t],20,-373897302),i=l(i,n,r,u,e[t+5],5,-701558691),u=l(u,i,n,r,e[t+10],9,38016083),r=l(r,u,i,n,e[t+15],14,-660478335),n=l(n,r,u,i,e[t+4],20,-405537848),i=l(i,n,r,u,e[t+9],5,568446438),u=l(u,i,n,r,e[t+14],9,-1019803690),r=l(r,u,i,n,e[t+3],14,-187363961),n=l(n,r,u,i,e[t+8],20,1163531501),i=l(i,n,r,u,e[t+13],5,-1444681467),u=l(u,i,n,r,e[t+2],9,-51403784),r=l(r,u,i,n,e[t+7],14,1735328473),n=l(n,r,u,i,e[t+12],20,-1926607734),i=a(i,n,r,u,e[t+5],4,-378558),u=a(u,i,n,r,e[t+8],11,-2022574463),r=a(r,u,i,n,e[t+11],16,1839030562),n=a(n,r,u,i,e[t+14],23,-35309556),i=a(i,n,r,u,e[t+1],4,-1530992060),u=a(u,i,n,r,e[t+4],11,1272893353),r=a(r,u,i,n,e[t+7],16,-155497632),n=a(n,r,u,i,e[t+10],23,-1094730640),i=a(i,n,r,u,e[t+13],4,681279174),u=a(u,i,n,r,e[t],11,-358537222),r=a(r,u,i,n,e[t+3],16,-722521979),n=a(n,r,u,i,e[t+6],23,76029189),i=a(i,n,r,u,e[t+9],4,-640364487),u=a(u,i,n,r,e[t+12],11,-421815835),r=a(r,u,i,n,e[t+15],16,530742520),n=a(n,r,u,i,e[t+2],23,-995338651),i=h(i,n,r,u,e[t],6,-198630844),u=h(u,i,n,r,e[t+7],10,1126891415),r=h(r,u,i,n,e[t+14],15,-1416354905),n=h(n,r,u,i,e[t+5],21,-57434055),i=h(i,n,r,u,e[t+12],6,1700485571),u=h(u,i,n,r,e[t+3],10,-1894986606),r=h(r,u,i,n,e[t+10],15,-1051523),n=h(n,r,u,i,e[t+1],21,-2054922799),i=h(i,n,r,u,e[t+8],6,1873313359),u=h(u,i,n,r,e[t+15],10,-30611744),r=h(r,u,i,n,e[t+6],15,-1560198380),n=h(n,r,u,i,e[t+13],21,1309151649),i=h(i,n,r,u,e[t+4],6,-145523070),u=h(u,i,n,r,e[t+11],10,-1120210379),r=h(r,u,i,n,e[t+2],15,718787259),n=h(n,r,u,i,e[t+9],21,-343485551),i=s(i,c),n=s(n,p),r=s(r,f),u=s(u,m)}return[i,n,r,u]}function c(e,t=n.Hex){let i=t||n.Base64,s=u(function(e){let t=[];for(let i=0,n=8*e.length;i<n;i+=8)t[i>>5]|=(255&e.charCodeAt(i/8))<<i%32;return t}(e),8*e.length);switch(i){case n.Raw:return s;case n.Hex:return function(e){let t="0123456789abcdef",i=[];for(let n=0,s=4*e.length;n<s;n++)i.push(t.charAt(e[n>>2]>>n%4*8+4&15)+t.charAt(e[n>>2]>>n%4*8&15));return i.join("")}(s);case n.String:return function(e){let t=[];for(let i=0,n=32*e.length;i<n;i+=8)t.push(String.fromCharCode(e[i>>5]>>>i%32&255));return t.join("")}(s);case n.Base64:return function(e){let t=[];for(let i=0,n=4*e.length;i<n;i+=3){let n=(e[i>>2]>>i%4*8&255)<<16|(e[i+1>>2]>>(i+1)%4*8&255)<<8|e[i+2>>2]>>(i+2)%4*8&255;for(let s=0;s<4;s++)8*i+6*s>32*e.length?t.push("="):t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(n>>6*(3-s)&63))}return t.join("")}(s)}}i.d(t,["T",0,n])},87024(e,t,i){i.d(t,{P:()=>f});var n=i(49186),s=i(80200),r=i(76553),o=i(84952),l=i(13069),a=i(96156),h=i(35666),u=i(10107),c=i(85648),p=i(97159);function f(e){let t=e?.origins??[void 0];return(i,n)=>{let s=function(e,t,i){if("resource"===e?.type)return function(e,t,i){let n=(0,a.z4)(t,i);return{type:String,read:(e,t,i)=>{let s=(0,p.r)(e,t,i);return n.type===String?s:"function"==typeof n.type?new n.type({url:s}):void 0},write:{isRequired:n.json?.write?.isRequired,writer(t,s,l,a){if(!a?.resources)return"string"==typeof t?void(s[l]=(0,p.t)(t,a)):void(s[l]=t.write({},a));let u=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),f=(0,p.t)(u,{...a,verifyItemRelativeUrls:a?.verifyItemRelativeUrls?{writtenUrls:a.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},1),y=n.type!==String&&(!(0,r.H)(this)||a?.origin&&this.originIdOf(i)>(0,h.aB)(a.origin)),_={object:this,propertyName:i,value:t,targetUrl:f,dest:s,targetPropertyName:l,context:a,params:e};a?.portalItem&&f&&!(0,o.oP)(f)?y&&e?.contentAddressed?m(_):y?function(e){let{context:t,targetUrl:i,params:n,value:s,dest:r,targetPropertyName:l}=e;if(!t.portalItem)return;let a=t.portalItem.resourceFromPath(i),h=g(s,i,t),u=(0,c.n)(h),p=(0,o.Zo)(a.path),f=n?.compress??!1;u===p?(t.resources&&d({...e,resource:a,content:h,compress:f,updates:t.resources.toUpdate}),r[l]=i):m(e)}(_):function({context:e,targetUrl:t,dest:i,targetPropertyName:n}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),i[n]=t)}(_):a?.portalItem&&(null==f||null!=(0,p.i)(f)||(0,o.w8)(f)||y)?m(_):s[l]=f}}}}(e,t,i);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{let{read:e,write:t}=p.b;return{read:e,write:t}}}}(e,i,n);for(let e of t){let t=(0,u.rM)(i,e,n);for(let e in s)t[e]=s[e]}}}function m(e){let{targetUrl:t,params:i,value:r,context:a,dest:h,targetPropertyName:u}=e;if(!a.portalItem)return;let f=(0,p.p)(t),m=g(r,t,a);if(i?.contentAddressed&&"json"!==m.type)return void a.messages?.push(new n.A("persistable:contentAddressingUnsupported",`Property "${u}" is trying to serializing a resource with content of type ${m.type} with content addressing. Content addressing is only supported for json resources.`,{content:m}));let y=i?.contentAddressed&&"json"===m.type?(0,s.d)(m.jsonString):f?.filename??(0,l.lk)(),_=i?.prefix??f?.prefix,x=(0,o.fj)(_,y),v=`${x}.${(0,c.n)(m)}`;if(i?.contentAddressed&&a.resources&&"json"===m.type){let e=a.resources.toKeep.find(({resource:e})=>e.path===v)??a.resources.toAdd.find(({resource:e})=>e.path===v);if(e)return void(h[u]=e.resource.itemRelativeUrl)}let C=a.portalItem.resourceFromPath(v);(0,o.w8)(t)&&a.resources&&a.resources.pendingOperations.push((0,o.tk)(t).then(e=>{C.path=`${x}.${(0,c.n)({type:"blob",blob:e})}`,h[u]=C.itemRelativeUrl}).catch(()=>{}));let w=i?.compress??!1;a.resources&&d({...e,resource:C,content:m,compress:w,updates:a.resources.toAdd}),h[u]=C.itemRelativeUrl}function d({object:e,propertyName:t,updates:i,resource:n,content:s,compress:r}){i.push({resource:n,content:s,compress:r,finish:i=>{!function(e,t,i){"string"==typeof e[t]?e[t]=i.url:e[t].url=i.url}(e,t,i)}})}function g(e,t,i){return"string"==typeof e?{type:"url",url:t}:{type:"json",jsonString:JSON.stringify(e.toJSON(i))}}},83027(e,t,i){const n=i(29953).ho;i.d(t,["h",0,n])},35982(e,t,i){i.d(t,{B:()=>u});var n=i(4576),s=i(71511),r=i(36563),o=i(53966),l=i(97768),a=i(17676),h=i(83027);class u{constructor(e,t,i,n,s={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._onClientConnectedHandle=null,this._destroyed=!1,this._promise=(0,h.h)(e,{...s,schedule:n}).then(e=>{null!=this._thread||this._destroyed?e.close():(this._thread=e,this._promise=null,this._onClientConnectedHandle=this._thread.onClientConnected(e=>{s.hasInitialize&&e.invoke("initialize",{}).catch(()=>{});for(let t of this._listeners)this._connectListenerToClient(t,e);this._onClientConnected(e)}))}),this._promise.catch(t=>o.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){let i=new c(e,t);return this._listeners.push(i),this._connectListener(i),(0,r.hA)(()=>{(0,n.TF)(this._listeners,i),i.destroy()})}[Symbol.dispose](){this.destroy()}destroy(){this._onClientConnectedHandle=(0,l.xt)(this._onClientConnectedHandle),this._thread&&=(this._thread.close(),null),this._promise=null;for(let e of this._listeners)e.destroy();this._listeners.length=0,this._transferLists={},this._destroyed=!0}invoke(e,t,i){return this.invokeMethod(this._mainMethod,e,t,i)}invokeMethod(e,t,i,n){if(this._thread){let s=this._transferLists[e],r=s?s(t):[];return this._thread.invoke(e,t,{transferList:r,signal:i,jobPriority:n})}return this._promise?this._promise.then(()=>((0,a.Te)(i),this.invokeMethod(e,t,i))):Promise.reject((0,a.NK)())}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(p):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject((0,a.NK)())}get promise(){return this._promise}_onClientConnected(e){}_connectListener(e){this._thread&&e.add(this._thread.on(e.eventName,e.callback))}_connectListenerToClient(e,t){e.add(t.on(e.eventName,e.callback))}}class c{constructor(e,t){this.eventName=e,this.callback=t,this._handles=new s.A}add(e){this._handles.add(e)}destroy(){this._handles.destroy()}}function p(){}},89056(e,t,i){i.d(t,{b3:()=>c,jZ:()=>u});var n=i(12195),s=i(19419),r=i(537),o=i(95108),l=i(60408),a=i(80754),h=i(21325);function u(e){return p(e,!0)}function c(e){return p(e,!1)}function p(e,t){if(null==e)return null;let i=e.spatialReference,s=(0,h.Vp)(i),o=(0,n.W)(e)?e.toJSON():e;if(!s)return o;let u=(0,h.K8)(i)?102100:4326,c=a.j7[u].maxX,p=a.j7[u].minX;if((0,l.fT)(o))return m(o,c,p);if((0,l.U9)(o))return o.points=o.points.map(e=>m(e,c,p)),o;if((0,l.ZC)(o))return f(o,s);if((0,l.Bi)(o)||(0,l.Rg)(o)){let e=(0,r.Rg)(v,o),i={xmin:e[0],ymin:e[1],xmax:e[2],ymax:e[3]},n=(0,a.kd)(i.xmin,p),s=2*c*n,l=0===s?o:(0,a.kS)(o,s);return i.xmin+=s,i.xmax+=s,i.xmax>c?_(l,c,t):i.xmin<p?_(l,p,t):l}return o}function f(e,t){if(!t)return e;let i=function(e,t){let i=[],{ymin:n,ymax:s,xmin:r,xmax:o}=e,l=e.xmax-e.xmin,[a,h]=t.valid,{x:u,frameId:c}=d(e.xmin,t),{x:p,frameId:f}=d(e.xmax,t),m=u===p&&l>0;if(l>2*h){let e={xmin:r<o?u:p,ymin:n,xmax:h,ymax:s},t={xmin:a,ymin:n,xmax:r<o?p:u,ymax:s},l={xmin:0,ymin:n,xmax:h,ymax:s},m={xmin:a,ymin:n,xmax:0,ymax:s},d=[],y=[];g(e,l)&&d.push(c),g(e,m)&&y.push(c),g(t,l)&&d.push(f),g(t,m)&&y.push(f);for(let e=c+1;e<f;e++)d.push(e),y.push(e);i.push(new x(e,[c]),new x(t,[f]),new x(l,d),new x(m,y))}else u>p||m?i.push(new x({xmin:u,ymin:n,xmax:h,ymax:s},[c]),new x({xmin:a,ymin:n,xmax:p,ymax:s},[f])):i.push(new x({xmin:u,ymin:n,xmax:p,ymax:s},[c]));return i}(e,t).map(e=>e.extent);return i.length<2?i[0]||e:i.length>2?(e.xmin=t.valid[0],e.xmax=t.valid[1],e):{rings:i.map(e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]])}}function m(e,t,i){if(Array.isArray(e)){let n=e[0];if(n>t){let i=(0,a.kd)(n,t);e[0]=n+-2*t*i}else if(n<i){let t=(0,a.kd)(n,i);e[0]=n+-2*i*t}}else{let n=e.x;if(n>t){let i=(0,a.kd)(n,t);e.x+=-2*t*i}else if(n<i){let t=(0,a.kd)(n,i);e.x+=-2*i*t}}return e}function d(e,t){let i,[n,s]=t.valid,r=2*s,o=0;return e>s?(i=Math.ceil(Math.abs(e-s)/r),e-=i*r,o=i):e<n&&(i=Math.ceil(Math.abs(e-n)/r),e+=i*r,o=-i),{x:e,frameId:o}}function g(e,t){let{xmin:i,ymin:n,xmax:s,ymax:r}=t;return y(e,i,n)&&y(e,i,r)&&y(e,s,r)&&y(e,s,n)}function y(e,t,i){return t>=e.xmin&&t<=e.xmax&&i>=e.ymin&&i<=e.ymax}function _(e,t,i=!0){let n=!(0,l.Rg)(e);if(n&&(0,o.m3)(e),i)return(new C).cut(e,t);let s=n?e.rings:e.paths,r=n?4:2,a=s.length,h=-2*t;for(let e=0;e<a;e++){let t=s[e];if(t&&t.length>=r){let e=[];for(let[i,...n]of t)e.push([i+h,...n]);s.push(e)}}return n?e.rings=s:e.paths=s,e}class x{constructor(e,t){this.extent=e,this.frameIds=t}}const v=(0,s.vt)();class C{constructor(){this._linesIn=[],this._linesOut=[]}cut(e,t){let i;if(this._xCut=t,e.rings)this._closed=!0,i=e.rings,this._minPts=4;else{if(!e.paths)return null;this._closed=!1,i=e.paths,this._minPts=2}for(let e of i){if(!e||e.length<this._minPts)continue;let t=!0;for(let i of e)t?(this.moveTo(i),t=!1):this.lineTo(i);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),i=[];for(let e of this._linesIn)e&&e.length>=this._minPts&&i.push(e);let n=-2*this._xCut;for(let e of this._linesOut)if(e&&e.length>=this._minPts){for(let t of e)t[0]+=n;i.push(e)}return this._closed?e.rings=i:e.paths=i,e}moveTo(e){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(e[0]),this._moveTo(e,this._prevSide),this._prevPt=e,this._firstPt=e}lineTo(e){let t=this._side(e[0]);if(t*this._prevSide===-1){let i=this._intersect(this._prevPt,e);this._lineTo(i,0),this._prevSide=0,this._lineTo(e,t)}else this._lineTo(e,t);this._prevSide=t,this._prevPt=e}close(){let e=this._firstPt,t=this._prevPt;(e[0]!==t[0]||e[1]!==t[1])&&this.lineTo(e),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(e,t){this._closed?(this._lineIn.push(w(e,t<=0?e[0]:this._xCut)),this._lineOut.push(w(e,t>=0?e[0]:this._xCut))):(t<=0&&this._lineIn.push(e.slice()),t>=0&&this._lineOut.push(e.slice()))}_lineTo(e,t){this._closed?(S(this._lineIn,e,t<=0?e[0]:this._xCut),S(this._lineOut,e,t>=0?e[0]:this._xCut)):t<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push(e.slice())):t>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push(e.slice())):this._prevSide<0?(this._lineIn.push(e.slice()),this._lineOut.push(e.slice())):this._prevSide>0&&(this._lineOut.push(e.slice()),this._lineIn.push(e.slice()))}_checkClosingPt(e){let t=e.length;t>3&&e[0][0]===this._xCut&&e[t-2][0]===this._xCut&&e[1][0]===this._xCut&&(e[0]=e[t-2].slice(),e.pop())}_side(e){return e<this._xCut?-1:+(e>this._xCut)}_intersect(e,t){let i=(this._xCut-e[0])/(t[0]-e[0]),n=[this._xCut,e[1]+i*(t[1]-e[1])],s=Math.min(e.length,t.length);for(let r=2;r<s;r++)n.push(e[r]+i*(t[r]-e[r]));return n}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}function w(e,t){let i=e.slice();return i[0]=t,i}function S(e,t,i){let n=e.length;n>1&&e[n-1][0]===i&&e[n-2][0]===i?e[n-1]=w(t,i):e.push(w(t,i))}},58325(e,t,i){i.d(t,{A:()=>S});var n,s=i(32198),r=i(56507),o=i(7762),l=i(25482),a=i(84952),h=i(91429),u=i(4718),c=i(67076),p=i(87024),f=i(39829),m=i(99917),d=i(16930),g=i(21325),y=i(88546),_=i(72772),x=i(98697),v=i(43937);let C=n=class extends l.o{constructor(e){super(e),this.geometry=null,this.type="clip"}writeGeometry(e,t,i,n){if(this._needWGS84Conversion(n))this._doWGS84Conversion(t,i,n);else if(n.layer?.spatialReference&&!n.layer.spatialReference.equals(this.geometry.spatialReference)){if(!(0,m.canProjectWithoutEngine)(e.spatialReference,n.layer.spatialReference))return void(n?.messages&&n.messages.push(new c.A("scenemodification:unsupported","Scene modifications with incompatible spatial references are not supported",{modification:this,spatialReference:n.layer.spatialReference,context:n})));let s=new f.A;(0,m.projectPolygon)(e,s,n.layer.spatialReference),t[i]=s.toJSON(n)}else t[i]=e.toJSON(n)}_needWGS84Conversion(e){if("integrated-mesh-3dtiles"===e.layer?.type){let t=e.layer;return!t.esriCrsSpatialReference||!(0,g.aI)(t.esriCrsSpatialReference,this.geometry.spatialReference)}return!1}_doWGS84Conversion(e,t,i){let n=!0;if((0,_.isInitialized)()){let s=[this],r=(0,x.Ir)(null,s,d.A.WGS84);if(r.length>1){let s=(0,_.switchMeshModificationPolygonVCSSync)({modifications:r,inVCS:5773});if(s.success&&s.modifications){let r=[this.clone()];(0,x.H1)(s.modifications,r),1===r.length&&r[0].geometry&&(r[0].geometry.spatialReference=y.Zx,e[t]=r[0].geometry.toJSON(i),n=!1)}}}n&&i?.messages&&i.messages.push(new c.A("scenemodification:unsupported","Scene modifications with incompatible spatial references are not supported",{modification:this,spatialReference:this.geometry.spatialReference,context:i}))}clone(){return new n({geometry:(0,u.o8)(this.geometry),type:this.type})}};var w;(0,s.Cg)([(0,h.MZ)({type:f.A}),(0,p.P)()],C.prototype,"geometry",void 0),(0,s.Cg)([(0,v.K)(["web-scene","portal-item"],"geometry")],C.prototype,"writeGeometry",null),(0,s.Cg)([(0,h.MZ)({type:["clip","mask","replace"],nonNullable:!0}),(0,p.P)()],C.prototype,"type",void 0),C=n=(0,s.Cg)([(0,h.$K)("esri.layers.support.SceneModification")],C);let S=w=class extends((0,l.T)(o.A.ofType(C))){constructor(e){super(e),this.url=null}clone(){return new w({url:this.url,items:this.items.map(e=>e.clone())})}toJSON(e){return this.toArray().map(t=>t.toJSON(e)).filter(e=>!!e.geometry)}static fromJSON(e,t){let i=new w;for(let n of e)i.add(C.fromJSON(n,t));return i}static async fromUrl(e,t,i,n=!1){let s={url:(0,a.An)(e),origin:"service"},o=await(0,r.A)(e,{responseType:"json",signal:i?.signal}),l=t.toJSON(),h=[];for(let e of o.data){let t=l;n&&e.geometry.spatialReference&&(t=e.geometry.spatialReference),h.push(C.fromJSON({...e,geometry:{spatialReference:t,...e.geometry}},s))}return new w({url:e,items:h})}};(0,s.Cg)([(0,h.MZ)({type:String})],S.prototype,"url",void 0),S=w=(0,s.Cg)([(0,h.$K)("esri.layers.support.SceneModifications")],S)},85648(e,t,i){i.d(t,{n:()=>s});var n=i(84952);function s(e){return r[function(e){return"json"===e.type?"application/json":"blob"===e.type?e.blob.type:function(e){let t=(0,n.Zo)(e);return a[t]||o}(e.url)}(e)]||l}const r={},o="text/plain",l=r[o],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(let e in a)r[a[e]]=e},80215(e,t,i){i.d(t,{Q:()=>s});const n=Symbol("GroundInstance");function s(e){return"object"==typeof e&&!!e&&n in e}},72772(e,t,i){i.r(t),i.d(t,{addSpatialReferenceInfo:()=>a,destroyWasm:()=>u,initialize:()=>c,isInitialized:()=>p,process:()=>l,switchMeshModificationPolygonVCSSync:()=>h});var n=i(2741);function s(e){return(0,n.s)(`esri/libs/lyr3d/${e}`)}i(49186),new Map;let r,o=null;async function l(e){await c();let t={status:1,error:"",jobDescJson:"",data:new Uint8Array,missingInputUrls:[]};if(e.inputs.length<1)return{result:t,transferList:[]};let i={ptrs:[],sizes:[]};for(let t of e.inputs){let e=o._malloc(t.byteLength);new Uint8Array(o.HEAPU8.buffer,e,t.byteLength).set(new Uint8Array(t)),i.ptrs.push(e),i.sizes.push(t.byteLength)}let n=o.process(e.jobDescJson,e.id,i,e.isMissingResourceCase);t.status=n.status,t.missingInputUrls=n.missingInputUrls.slice();let s=0===n.status&&n.data,r=2===t.status&&t.missingInputUrls.length>0;t.jobDescJson=n.jobDescJson.slice(),t.error=n.error.slice(),s?t.data=n.data.slice():r&&(t.originalInputs=e.inputs.slice());for(let e=0;e<i.ptrs.length;++e)o._free(i.ptrs[e]);let l=[];if(s)l.push(t.data.buffer);else if(r)for(let t of e.inputs)l.push(t);return{result:t,transferList:l}}async function a(e){await c(),o.add_spatial_reference_info(e.sr,e.isGCS,e.toMetersXY,e.toMetersZ)}function h(e){if(!o)return{success:!1,modifications:null};let t=o._malloc(8*e.modifications.length),i=new Float64Array(o.HEAPF64.buffer,t,e.modifications.length);i.set(e.modifications);let n=o.switch_mesh_modification_polygon_vcs(t,e.modifications.length,e.inVCS),s=null;return n&&(s=i.slice()),o._free(t),{success:n,modifications:s}}function u(){o&&=(o.uninitialize_lyr3d_worker_wasm(),null)}function c(){return p()?Promise.resolve():(r||=async function(){let{default:e}=await i.e(2343).then(()=>i(2343));return async function(e,t){return t({locateFile:s})}(0,e)}().then(e=>{o=e,o.initialize_lyr3d_worker_wasm(),r=null}),r)}function p(){return null!==o}},98697(e,t,i){i.d(t,{Cm:()=>f,H1:()=>x,Ir:()=>g,_b:()=>c,sQ:()=>p});var n=i(53966),s=i(15142),r=i(51850),o=i(35982),l=i(39829),a=i(99917),h=i(27993),u=i(89056);class c{constructor(e,t,i,n,s,r){this.layout=e,this.interleavedVertexData=t,this.indices=i,this.hasColors=n,this.hasModifications=s,this.positionData=r}}class p{constructor(e,t,i,n,s,r,o,l,a){this.componentOffsets=e,this.featureIds=t,this.anchorIds=i,this.anchors=n,this.transformedGeometry=s,this.globalTrafo=r,this.obb=o,this.geometryMinElevation=l,this.geometryMaxElevation=a}}class f extends o.B{constructor(e){super("SceneLayerWorker","process",{process:e=>[e.geometryBuffer],project:e=>[e.positions.buffer],transformNormals:e=>[e.normals.buffer]},e,{hasInitialize:!0}),this._schemasByContext=new Map,this._modificationsByContext=new Map}_onClientConnected(e){for(let[t,i]of this._schemasByContext)e.invoke("setLegacySchema",{context:t,jsonSchema:i}).catch(()=>{});for(let t of this._modificationsByContext.values())e.invoke("setModifications",t).catch(()=>{})}setModifications(e,t,i){let n={context:e,modifications:t,isGeodetic:i};return this._modificationsByContext.set(e,n),this.broadcast(n,"setModifications")}setLegacySchema(e,t){let i=JSON.stringify(t);return this._schemasByContext.set(e,i),this.broadcast({context:e,jsonSchema:i},"setLegacySchema")}destroyContext(e){return this._schemasByContext.delete(e),this._modificationsByContext.delete(e),this.broadcast(e,"destroyContext")}async destroyContextAndSelf(e){await this.destroyContext(e),this.destroy()}project(e,t){return this.invokeMethod("project",e,t)}transformNormals(e,t){return this.invokeMethod("transformNormals",e,t)}}const m=new s.A({deallocator:null}),d=(0,r.vt)();function g(e,t,i,s=!1){m.clear();let r=1/0,o=1/0,h=-1/0,c=-1/0,p=!1;for(let e of t){let t="clip"===e.type?2:+("mask"===e.type),f=e.geometry,d=f.spatialReference??i;if(d!==i&&!(0,a.canProjectWithoutEngine)(d,i)){n.A.getLogger("esri.views.3d.layers.SceneLayerWorkerHandle").warn("im-modification-projection-failed","Can't project modification polygon into layer spatial reference, ignoring modification",{polygon:f});continue}let g=f.rings;if(d!==i){let e=y(f.rings,d,i);if(null==e){n.A.getLogger("esri.views.3d.layers.SceneLayerWorkerHandle").warn("im-modification-projection-failed","Can't project modification polygon into layer spatial reference, ignoring modification",{polygon:f});continue}g=e}let x=g;if(s){let e=(0,u.jZ)(new l.A({rings:g,spatialReference:i}));null!=e&&(g=e.rings)}let v=1===x.length&&g.length>1?[...g.map(e=>[e]),x]:[g];if(v.some(e=>0===e.length||e.some(e=>e.length<3||e.some(e=>!_(e)))))n.A.getLogger("esri.views.3d.layers.SceneLayerWorkerHandle").warn("im-modification-invalid-polygon","Ignoring invalid modification polygon (empty ring, fewer than 3 vertices, or non-finite coordinates).",{polygon:f});else{p||=1===t;for(let e of v){m.push(t),m.push(e.length);for(let t of e){m.push(t.length);for(let e of t){let t=e[2]??0;m.push(e[0]),m.push(e[1]),m.push(t),r=Math.min(r,e[0]),o=Math.min(o,e[1]),h=Math.max(h,e[0]),c=Math.max(c,e[1])}}}}}if(null!=e)if(p){let t=1e-4;m.push(2),m.push(2),m.push(4),m.push(r-t),m.push(o-t),m.push(0),m.push(h+t),m.push(o-t),m.push(0),m.push(h+t),m.push(c+t),m.push(0),m.push(r-t),m.push(c+t),m.push(0),m.push(4),m.push(e[0]),m.push(e[1]),m.push(0),m.push(e[2]),m.push(e[1]),m.push(0),m.push(e[2]),m.push(e[3]),m.push(0),m.push(e[0]),m.push(e[3]),m.push(0)}else m.push(1),m.push(1),m.push(4),m.push(e[0]),m.push(e[1]),m.push(0),m.push(e[2]),m.push(e[1]),m.push(0),m.push(e[2]),m.push(e[3]),m.push(0),m.push(e[0]),m.push(e[3]),m.push(0);m.push(3);let f=new Float64Array(m.length);for(let e=0;e<m.length;++e)f[e]=m.at(e);return f}function y(e,t,i){let n=[];for(let s of e){let e=[];for(let n of s){if(!(0,h.F)(n,t,d,i)||!_(d))return null;e.push([d[0],d[1],d[2]])}n.push(e)}return n}function _(e){return Number.isFinite(e[0])&&Number.isFinite(e[1])&&(null==e[2]||Number.isFinite(e[2]))}function x(e,t){let i=0;for(let n of t){let t=n.geometry,s=t.rings.length,r=t.rings.some(e=>e.length<3);if(0!==s&&!r){i+=1,i+=1;for(let n=0;n<t.rings.length;++n){let s=t.rings[n];i+=1;for(let r=0;r<s.length;++r){let s=[e[i+0],e[i+1],e[i+2]];i+=3,t.setPoint(n,r,s)}}}}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[309],{20309(e,t,i){i.r(t),i.d(t,{default:()=>me});var r,l=i(32198),s=i(56507),a=i(4576),o=i(7762),n=i(49186),u=i(4718),p=i(25728),d=i(17676),c=i(36708),m=i(84952),h=i(91429),y=i(5443),f=i(4146),g=i(47314),w=i(63074),v=i(34287),M=i(8303),x=i(54310),C=i(25036),I=i(33446),S=i(87045),T=i(65509),L=i(83703),A=i(25482);let b=r=class extends A.o{constructor(e){super(e),this.fullExtent=null,this.id=null,this.tileInfo=null}clone(){let e=new r;return this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent?.clone()??null),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("tileInfo")&&(e.tileInfo=this.tileInfo?.clone()??null),e}};(0,l.Cg)([(0,h.MZ)({type:y.A,json:{read:{source:"fullExtent"}}})],b.prototype,"fullExtent",void 0),(0,l.Cg)([(0,h.MZ)({type:String,json:{read:{source:"id"}}})],b.prototype,"id",void 0),(0,l.Cg)([(0,h.MZ)({type:S.A,json:{read:{source:"tileInfo"}}})],b.prototype,"tileInfo",void 0),b=r=(0,l.Cg)([(0,h.$K)("esri.layers.support.TileMatrixSet")],b);const P=b;var E;let O=E=class extends A.o{constructor(e){super(e),this.id=null,this.title=null,this.description=null,this.legendUrl=null}clone(){let e=new E;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("isDefault")&&(e.isDefault=this.isDefault),this.hasOwnProperty("keywords")&&(e.keywords=this.keywords&&this.keywords.slice()),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("title")&&(e.title=this.title),e}};(0,l.Cg)([(0,h.MZ)({json:{read:{source:"id"}}})],O.prototype,"id",void 0),(0,l.Cg)([(0,h.MZ)({json:{read:{source:"title"}}})],O.prototype,"title",void 0),(0,l.Cg)([(0,h.MZ)({json:{read:{source:"abstract"}}})],O.prototype,"description",void 0),(0,l.Cg)([(0,h.MZ)({json:{read:{source:"legendUrl"}}})],O.prototype,"legendUrl",void 0),(0,l.Cg)([(0,h.MZ)({json:{read:{source:"isDefault"}}})],O.prototype,"isDefault",void 0),(0,l.Cg)([(0,h.MZ)({json:{read:{source:"keywords"}}})],O.prototype,"keywords",void 0),O=E=(0,l.Cg)([(0,h.$K)("esri.layers.support.WMTSStyle")],O);const R=O;var F,Z=i(36005);let V=F=class extends A.o{constructor(e){super(e),this.description=null,this.fullExtent=null,this.fullExtents=null,this.id=null,this.imageFormats=null,this.layer=null,this.parent=null,this.styles=null,this.title=null,this.tileMatrixSetId=null,this.tileMatrixSets=null}readFullExtent(e,t){return(e=t.fullExtent)?y.A.fromJSON(e):null}readFullExtents(e,t){return t.fullExtents?.length?t.fullExtents.map(e=>y.A.fromJSON(e)):t.tileMatrixSets?.map(e=>y.A.fromJSON(e.fullExtent)).filter(e=>e)??[]}get imageFormat(){let e=this._get("imageFormat");return e||=this.imageFormats?.length?this.imageFormats[0]:"",e}set imageFormat(e){let t=this.imageFormats;e&&(e.includes("image/")||t&&!t.includes(e))&&(e.includes("image/")||(e="image/"+e),t&&!t.includes(e))?console.error("The layer doesn't support the format of "+e):this._set("imageFormat",e)}get styleId(){let e=this._get("styleId");return e||=this.styles?.at(0)?.id??"",e}set styleId(e){this._set("styleId",e)}get tileMatrixSet(){return this.tileMatrixSets?.find(({id:e})=>e===this.tileMatrixSetId)??null}clone(){let e=new F;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("imageFormats")&&(e.imageFormats=this.imageFormats?.slice()??null),this.hasOwnProperty("imageFormat")&&(e.imageFormat=this.imageFormat),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent?.clone()),this.hasOwnProperty("id")&&(e.id=this.id),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("styleId")&&(e.styleId=this.styleId),this.hasOwnProperty("styles")&&(e.styles=this.styles?.clone()),this.hasOwnProperty("tileMatrixSetId")&&(e.tileMatrixSetId=this.tileMatrixSetId),this.hasOwnProperty("tileMatrixSets")&&(e.tileMatrixSets=this.tileMatrixSets?.clone()),this.hasOwnProperty("title")&&(e.title=this.title),e}};(0,l.Cg)([(0,h.MZ)()],V.prototype,"description",void 0),(0,l.Cg)([(0,h.MZ)({type:y.A})],V.prototype,"fullExtent",void 0),(0,l.Cg)([(0,Z.w)("fullExtent",["fullExtent"])],V.prototype,"readFullExtent",null),(0,l.Cg)([(0,h.MZ)({readOnly:!0})],V.prototype,"fullExtents",void 0),(0,l.Cg)([(0,Z.w)("fullExtents",["fullExtents","tileMatrixSets"])],V.prototype,"readFullExtents",null),(0,l.Cg)([(0,h.MZ)()],V.prototype,"id",void 0),(0,l.Cg)([(0,h.MZ)()],V.prototype,"imageFormat",null),(0,l.Cg)([(0,h.MZ)({json:{read:{source:"formats"}}})],V.prototype,"imageFormats",void 0),(0,l.Cg)([(0,h.MZ)()],V.prototype,"layer",void 0),(0,l.Cg)([(0,h.MZ)()],V.prototype,"parent",void 0),(0,l.Cg)([(0,h.MZ)()],V.prototype,"styleId",null),(0,l.Cg)([(0,h.MZ)({type:o.A.ofType(R),json:{read:{source:"styles"}}})],V.prototype,"styles",void 0),(0,l.Cg)([(0,h.MZ)({json:{write:{ignoreOrigin:!0}}})],V.prototype,"title",void 0),(0,l.Cg)([(0,h.MZ)()],V.prototype,"tileMatrixSetId",void 0),(0,l.Cg)([(0,h.MZ)({readOnly:!0})],V.prototype,"tileMatrixSet",null),(0,l.Cg)([(0,h.MZ)({type:o.A.ofType(P),json:{read:{source:"tileMatrixSets"}}})],V.prototype,"tileMatrixSets",void 0),V=F=(0,l.Cg)([(0,h.$K)("esri.layers.support.WMTSSublayer")],V);var U=i(73941),j=i(86738),_=i(22530),N=i(38458),k=i(13043),D=i(91806);const W=90.71428571428571;function K(e){let t=e.replaceAll(/ows:/gi,"");return(new DOMParser).parseFromString(t,"text/xml")}function B(e){if(!H("Contents",e.documentElement))throw new n.A("wmtslayer:wmts-capabilities-xml-is-not-valid","the wmts get capabilities response is not compliant")}function $(e){return e.nodeType===Node.ELEMENT_NODE}function H(e,t){for(let i=0;i<t.childNodes.length;i++){let r=t.childNodes[i];if($(r)&&r.nodeName===e)return r}return null}function J(e,t){let i=[];for(let r=0;r<t.childNodes.length;r++){let l=t.childNodes[r];$(l)&&l.nodeName===e&&i.push(l)}return i}function q(e,t){let i=[];for(let r=0;r<t.childNodes.length;r++){let l=t.childNodes[r];$(l)&&l.nodeName===e&&i.push(l)}return i.map(e=>e.textContent).filter(a.Ru)}function G(e,t){return e.split(">").forEach(e=>{t&&=H(e,t)}),t&&t.textContent}function z(e,t,i,r){let l;return Array.prototype.slice.call(r.childNodes).some(r=>{if(r.nodeName.includes(e)){let e=H(t,r)?.textContent;if(e===i||i.split(":")&&i.split(":")[1]===e)return l=r,!0}return!1}),l}function Q(e,t,i,r,l){let s=G("Abstract",t),a=q("Format",t);return{id:e,fullExtent:Y(t),fullExtents:ee(t),description:s,formats:a,styles:te(t,r),title:G("Title",t),tileMatrixSets:ie(l,t,i)}}function X(e,t){let i=[],r=e.layerMap?.get(t);if(!r)return null;let l,s,a,o,n=J("ResourceURL",r),u=J("Dimension",r);return u.length&&(l=G("Identifier",u[0]),s=q("Default",u[0])||q("Value",u[0])),u.length>1&&(a=G("Identifier",u[1]),o=q("Default",u[1])||q("Value",u[1])),e.dimensionMap.set(t,{dimensions:s,dimensions2:o}),n.forEach(e=>{let t=e.getAttribute("template");if("tile"===e.getAttribute("resourceType")){if(l&&s.length)if(t.includes("{"+l+"}"))t=t.replace("{"+l+"}","{dimensionValue}");else{let e=t.toLowerCase().indexOf("{"+l.toLowerCase()+"}");e>-1&&(t=t.slice(0,e)+"{dimensionValue}"+t.slice(e+l.length+2))}if(a&&o.length)if(t.includes("{"+a+"}"))t=t.replace("{"+a+"}","{dimensionValue2}");else{let e=t.toLowerCase().indexOf("{"+a.toLowerCase()+"}");e>-1&&(t=t.slice(0,e)+"{dimensionValue2}"+t.slice(e+a.length+2))}i.push({template:t,format:e.getAttribute("format"),resourceType:"tile"})}}),i}function Y(e){let t=H("WGS84BoundingBox",e),i=t?G("LowerCorner",t).split(" "):["-180","-90"],r=t?G("UpperCorner",t).split(" "):["180","90"];return{xmin:parseFloat(i[0]),ymin:parseFloat(i[1]),xmax:parseFloat(r[0]),ymax:parseFloat(r[1]),spatialReference:{wkid:4326}}}function ee(e){let t=[];return(0,k.p)(e,{BoundingBox:e=>{if(!e.getAttribute("crs"))return;let i,r,l,s,a=e.getAttribute("crs").toLowerCase(),o=re(a),n=a.includes("epsg")&&(0,N.m)(o.wkid);(0,k.p)(e,{LowerCorner:e=>{[i,r]=e.textContent.split(" ").map(e=>Number.parseFloat(e)),n&&([i,r]=[r,i])},UpperCorner:e=>{[l,s]=e.textContent.split(" ").map(e=>Number.parseFloat(e)),n&&([l,s]=[s,l])}}),t.push({xmin:i,ymin:r,xmax:l,ymax:s,spatialReference:o})}}),t}function te(e,t){return J("Style",e).map(e=>{let i=H("LegendURL",e),r=H("Keywords",e),l=r?q("Keyword",r):[],s=i?.getAttribute("xlink:href");return t&&(s=s?.replace(/^http:/i,"https:")),{abstract:G("Abstract",e),id:G("Identifier",e),isDefault:"true"===e.getAttribute("isDefault"),keywords:l,legendUrl:s,title:G("Title",e)}})}function ie(e,t,i){return J("TileMatrixSetLink",t).map(t=>function(e,t,i){let r=H("TileMatrixSet",t).textContent,l=q("TileMatrix",t),s=i.find(e=>{let t=H("Identifier",e)?.textContent;return!!(t===r||r.split(":")&&r.split(":")[1]===t)}),a=H("TileMatrixSetLimits",t),o=a&&J("TileMatrixLimits",a),n=new Map;if(o?.length)for(let e of o){let t=H("TileMatrix",e).textContent,i=+H("MinTileRow",e).textContent,r=+H("MaxTileRow",e).textContent,l=+H("MinTileCol",e).textContent,s=+H("MaxTileCol",e).textContent;n.set(t,{minCol:l,maxCol:s,minRow:i,maxRow:r})}let u=G("SupportedCRS",s).toLowerCase(),p=function(e,t){return le(H("TileMatrix",e),t)}(s,u),d=p.spatialReference,c=H("TileMatrix",s),m=[parseInt(G("TileWidth",c),10),parseInt(G("TileHeight",c),10)],h=[];return l.length?l.forEach((e,t)=>{let i=z("TileMatrix","Identifier",e,s);h.push(ae(i,u,t,r,n))}):J("TileMatrix",s).forEach((e,t)=>{h.push(ae(e,u,t,r,n))}),{id:r,fullExtent:se(e,s,p,m,h[0]).toJSON(),tileInfo:new S.A({dpi:96,spatialReference:d,size:m,origin:p,lods:h}).toJSON()}}(e,t,i))}function re(e){e=e.toLowerCase();let t=parseInt(e.split(":").pop(),10);(900913===t||3857===t)&&(t=102100);let i=function(e){return e.includes("crs84")||e.includes("crs:84")?4326:e.includes("crs83")||e.includes("crs:83")?4269:e.includes("crs27")||e.includes("crs:27")?4267:null}(e);return null!=i&&(t=i),{wkid:t}}function le(e,t){let i=re(t),[r,l]=G("TopLeftCorner",e).split(" ").map(e=>parseFloat(e));return t.includes("epsg")&&(0,N.m)(i.wkid)?new j.A({x:l,y:r,spatialReference:i}):new j.A({x:r,y:l,spatialReference:i})}function se(e,t,i,r,l){let s,a,o,n,u,p,d=H("BoundingBox",t);if(d&&(s=G("LowerCorner",d).split(" "),a=G("UpperCorner",d).split(" ")),s&&s.length>1&&a&&a.length>1)o=parseFloat(s[0]),u=parseFloat(s[1]),n=parseFloat(a[0]),p=parseFloat(a[1]);else{let e=H("TileMatrix",t),s=parseInt(G("MatrixWidth",e),10),a=parseInt(G("MatrixHeight",e),10);o=i.x,p=i.y,n=o+s*r[0]*l.resolution,u=p-a*r[1]*l.resolution}return function(e,t,i){return"1.0.0"===e&&(0,N.m)(t.wkid)&&!(i.spatialReference.isGeographic&&i.x<-90&&i.y>=-90)}(e,i.spatialReference,i)?new y.A(u,o,p,n,i.spatialReference):new y.A(o,u,n,p,i.spatialReference)}function ae(e,t,i,r,l){let s=re(t),a=G("Identifier",e),o=parseFloat(G("ScaleDenominator",e)),n=oe(s.wkid,o,r);o*=96/W;let u=+G("MatrixWidth",e),p=+G("MatrixHeight",e),{maxCol:d=u-1,maxRow:c=p-1,minCol:m=0,minRow:h=0}=l.get(a)??{},{x:y,y:f}=le(e,t);return new D.A({cols:[m,d],level:i,levelValue:a,origin:[y,f],scale:o,resolution:n,rows:[h,c]})}function oe(e,t,i){let r;return r=_.A.hasOwnProperty(""+e)?_.A.values[_.A[e]]:"default028mm"===i?6370997*Math.PI/180:(0,U.y7)(e).metersPerDegree,7*t/25e3/r}var ne,ue=i(43937);const pe={"image/png":".png","image/png8":".png","image/png24":".png","image/png32":".png","image/jpg":".jpg","image/jpeg":".jpeg","image/gif":".gif","image/bmp":".bmp","image/tiff":".tif","image/jpgpng":"","image/jpegpng":"","image/unknown":""},de=new Set(["version","service","request","layer","style","format","tilematrixset","tilematrix","tilerow","tilecol"]);let ce=ne=class extends((0,w.dM)((0,x.J)((0,C.j)((0,v.q)((0,M.A)((0,p.M)(f.A))))))){constructor(...e){super(...e),this.activeLayer=null,this.copyright="",this.customParameters=null,this.customLayerParameters=null,this.fullExtent=null,this.operationalLayerType="WebTiledLayer",this.resourceInfo=null,this.serviceMode="RESTful",this.sublayers=null,this.type="wmts",this.version="1.0.0",this.addHandles([(0,c.wB)(()=>this.activeLayer,(e,t)=>{t&&!this.sublayers?.includes(t)&&(t.layer=null,t.parent=null),e&&(e.layer=this,e.parent=this)},c.OH),(0,c.on)(()=>this.sublayers,"after-add",({item:e})=>{e.layer=this,e.parent=this},c.OH),(0,c.on)(()=>this.sublayers,"after-remove",({item:e})=>{e.layer=null,e.parent=null},c.OH),(0,c.wB)(()=>this.sublayers,(e,t)=>{if(t)for(let e of t)e.layer=null,e.parent=null;if(e)for(let t of e)t.layer=this,t.parent=this},c.OH)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMTS"]},e).catch(d.QP).then(()=>this._fetchService(e)).catch(e=>{throw(0,d.QP)(e),new n.A("wmtslayer:unsupported-service-data","Invalid response from the WMTS service.",{error:e})})),Promise.resolve(this)}readActiveLayerFromService(e,t,i){this.activeLayer||=new V;let r=t.layers.find(e=>e.id===this.activeLayer.id);return r||=t.layers[0],this.activeLayer.read(r,i),this.activeLayer}readActiveLayerFromItemOrWebDoc(e,t){let{templateUrl:i,wmtsInfo:r}=t,l=i?this._getLowerCasedUrlParams(i):null,s=r?.layerIdentifier,a=null,o=r?.tileMatrixSet;o&&(Array.isArray(o)?o.length&&(a=o[0]):a=o);let n=l?.format,u=l?.style;return new V({id:s,imageFormat:n,styleId:u,tileMatrixSetId:a})}writeActiveLayer(e,t,i,r){let{activeLayer:l,loaded:s}=this,{id:a,tileMatrixSet:o,tileMatrixSetId:n,imageFormat:u,styleId:p}=l;t.templateUrl=s?this.getUrlTemplate(a,n,u,p):void 0,t.tileInfo=s?o?.tileInfo?.toJSON(r)??null:void 0,t.wmtsInfo={...t.wmtsInfo,layerIdentifier:a,tileMatrixSet:n}}readCustomParameters(e,t){let i=t.wmtsInfo;return i?this._mergeParams(i.customParameters,i.url):null}get fullExtents(){return this.activeLayer.fullExtents}readServiceMode(e,t){return t.templateUrl.includes("?")?"KVP":"RESTful"}readSublayersFromService(e,t,i){return function(e,t){return e.map(e=>{let i=new V;return i.read(e,t),i})}(t.layers,i)}get supportedSpatialReferences(){return this.activeLayer.tileMatrixSets?.map(e=>e.tileInfo?.spatialReference).toArray().filter(a.Ru)??[]}get tilemapCache(){let e=this.activeLayer?.tileMatrixSet?.tileInfo;return e?new T.A(e):void 0}get title(){return this.activeLayer?.title??"Layer"}set title(e){this._overrideIfSome("title",e)}get url(){return this._get("url")}set url(e){e&&e.endsWith("/")?this._set("url",e.slice(0,-1)):this._set("url",e)}createWebTileLayer(e){let t=this.getUrlTemplate(this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId),i=this._getTileMatrixSetById(e.tileMatrixSetId)?.tileInfo,r=e.fullExtent,l=new L.x({layerIdentifier:e.id,tileMatrixSet:e.tileMatrixSetId,url:this.url});return this.customLayerParameters&&(l.customLayerParameters=this.customLayerParameters),this.customParameters&&(l.customParameters=this.customParameters),new g.default({fullExtent:r,urlTemplate:t,tileInfo:i,wmtsInfo:l})}async fetchTile(e,t,i,r={}){let{signal:l}=r,a=this.getTileUrl(e,t,i),{data:o}=await(0,s.A)(a,{responseType:"image",signal:l});return o}async fetchImageBitmapTile(e,t,i,r={}){let{signal:l}=r;if(this.fetchTile!==ne.prototype.fetchTile){let l=await this.fetchTile(e,t,i,r);return(0,I.Cp)(l,e,t,i,r)}let a=this.getTileUrl(e,t,i),{data:o}=await(0,s.A)(a,{responseType:"blob",signal:l});return(0,I.Cp)(o,e,t,i,r)}findSublayerById(e){return this.sublayers?.find(t=>t.id===e)}getTileUrl(e,t,i){let r=this._getTileMatrixSetById(this.activeLayer.tileMatrixSetId)?.tileInfo?.lods[e],l=r?r.levelValue||`${r.level}`:`${e}`,s=this.resourceInfo?"":function(e,t,i,r,l,s,a,o){let n=function(e,t,i){let r=X(e,t),l=r?.filter(e=>e.format===i);return(l?.length?l:r)??[]}(e,t,r);if(!(n?.length>0))return"";let{dimensionMap:u}=e,p=u.get(t).dimensions?.[0],d=u.get(t).dimensions2?.[0];return n[a%n.length].template.replaceAll(/\{Style\}/gi,l??"").replaceAll(/\{TileMatrixSet\}/gi,i??"").replaceAll(/\{TileMatrix\}/gi,s).replaceAll(/\{TileRow\}/gi,""+a).replaceAll(/\{TileCol\}/gi,""+o).replaceAll(/\{dimensionValue\}/gi,p).replaceAll(/\{dimensionValue2\}/gi,d)}({dimensionMap:this.dimensionMap,layerMap:this.layerMap},this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId,l,t,i);return s||=this.getUrlTemplate(this.activeLayer.id,this.activeLayer.tileMatrixSetId,this.activeLayer.imageFormat,this.activeLayer.styleId).replaceAll(/\{level\}/gi,l).replaceAll(/\{row\}/gi,`${t}`).replaceAll(/\{col\}/gi,`${i}`),s=this._appendCustomLayerParameters(s),s}getUrlTemplate(e,t,i,r){if(!this.resourceInfo){let i=function(e,t,i,r){let{dimensionMap:l}=e,s=X(e,t),a="";if(s&&s.length>0){let e=l.get(t).dimensions?.[0],o=l.get(t).dimensions2?.[0];a=s[0].template,a.endsWith(".xxx")&&(a=a.slice(0,-4)),a=a.replaceAll(/\{Style\}/gi,r),a=a.replaceAll(/\{TileMatrixSet\}/gi,i),a=a.replaceAll(/\{TileMatrix\}/gi,"{level}"),a=a.replaceAll(/\{TileRow\}/gi,"{row}"),a=a.replaceAll(/\{TileCol\}/gi,"{col}"),a=a.replaceAll(/\{dimensionValue\}/gi,e),a=a.replaceAll(/\{dimensionValue2\}/gi,o)}return a}({dimensionMap:this.dimensionMap,layerMap:this.layerMap},e,t,r);if(i)return i}if("KVP"===this.serviceMode)return this.url+"?SERVICE=WMTS&VERSION="+this.version+"&REQUEST=GetTile&LAYER="+e+"&STYLE="+r+"&FORMAT="+i+"&TILEMATRIXSET="+t+"&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}";if("RESTful"===this.serviceMode){let l="",s=i.toLowerCase();return pe[s]&&(l=pe[s]),this.url+e+"/"+r+"/"+t+"/{level}/{row}/{col}"+l}return""}async _fetchService(e){if(this.resourceInfo)return"KVP"===this.resourceInfo.serviceMode&&!this.url.includes("?")&&(this.url+="?"),function(e){for(let t of e.layers)for(let e of t.tileMatrixSets??[]){let{tileInfo:t}=e;if(t&&96!==t.dpi){for(let i of t.lods??[])i.scale=96*i.scale/t.dpi,i.resolution=oe(t.spatialReference?.wkid,i.scale*W/96,e.id);t.dpi=96}}}(this.resourceInfo),void this.read(this.resourceInfo,{origin:"service"});let t=null;try{let{data:i}=await this._getCapabilities(this.serviceMode,e);t=K(i),B(t)}catch{let i="KVP"===this.serviceMode?"RESTful":"KVP";try{let{data:r}=await this._getCapabilities(i,e);t=K(r),B(t),this.serviceMode=i}catch(e){throw new n.A("wmtslayer:unsupported-service-data","Services does not support RESTful or KVP service modes.",{error:e})}}let{serviceMode:i,url:r}=this,l=function(e,t){let i=e.documentElement,r=new Map,l=new Map,s=H("Contents",i);if(!s)throw new n.A("wmtslayer:wmts-capabilities-xml-is-not-valid","Can't retrieve xml capabilities element");let a,o,u=(H("OperationsMetadata",i)?.querySelector("[name='GetTile']"))?.getElementsByTagName("Get"),p=u&&Array.prototype.slice.call(u),d=t.url?.indexOf("https"),c=void 0!==d&&d>-1,m=t.serviceMode,h=t?.url;p?.length&&p.some(e=>{let t=H("Constraint",e);return!t||z("AllowedValues","Value",m,t)?(h=e.attributes[0].nodeValue,!0):(!t||z("AllowedValues","Value","RESTful",t)||z("AllowedValues","Value","REST",t)?o=e.attributes[0].nodeValue:(!t||z("AllowedValues","Value","KVP",t))&&(a=e.attributes[0].nodeValue),!1)}),h||(o?(h=o,m="RESTful"):a?(h=a,m="KVP"):h=H("ServiceMetadataURL",i)?.getAttribute("xlink:href"));let y=h.indexOf("1.0.0/");-1===y&&"RESTful"===m?h+="/":y>-1&&(h=h.slice(0,y)),"KVP"===m&&(h+=y>-1?"":"?"),c&&(h=h.replace(/^http:/i,"https:"));let f=G("ServiceIdentification>ServiceTypeVersion",i),g=G("ServiceIdentification>AccessConstraints",i),w=g&&/^none$/i.test(g)?null:g,v=J("Layer",s),M=J("TileMatrixSet",s);return{copyright:w,dimensionMap:l,layerMap:r,layers:v.map(e=>{let t=G("Identifier",e);return r.set(t,e),Q(t,e,M,c,f)}),serviceMode:m,tileUrl:h}}(t,{serviceMode:i,url:r});this.read(l,{origin:"service"})}async _getCapabilities(e,t){let i=this._getCapabilitiesUrl(e);return await(0,s.A)(i,{...t,responseType:"text"})}_getTileMatrixSetById(e){return this.findSublayerById(this.activeLayer.id)?.tileMatrixSets?.find(({id:t})=>t===e)}_appendCustomParameters(e){return this._appendParameters(e,this.customParameters)}_appendCustomLayerParameters(e){return this._appendParameters(e,{...(0,u.o8)(this.customParameters),...this.customLayerParameters})}_appendParameters(e,t){let i=(0,m.An)(e),r={...i.query,...t},l=(0,m.x0)(r);return""===l?i.path:`${i.path}?${l}`}_getCapabilitiesUrl(e){this.url=(0,m.An)(this.url).path;let t=this.url;switch(e){case"KVP":t+=`?request=GetCapabilities&service=WMTS&version=${this.version}`;break;case"RESTful":{let e=`/${this.version}/WMTSCapabilities.xml`,i=new RegExp(e,"i");t=t.replace(i,""),t+=e;break}}return this._appendCustomParameters(t)}_getLowerCasedUrlParams(e){if(!e)return null;let t=(0,m.An)(e).query;if(!t)return null;let i={};return Object.keys(t).forEach(e=>{i[e.toLowerCase()]=t[e]}),i}_mergeParams(e,t){let i=this._getLowerCasedUrlParams(t);if(i){let t=Object.keys(i);t.length&&(e=e?(0,u.o8)(e):{},t.forEach(t=>{!e.hasOwnProperty(t)&&!de.has(t)&&(e[t]=i[t])}))}return e}};(0,l.Cg)([(0,h.MZ)()],ce.prototype,"dimensionMap",void 0),(0,l.Cg)([(0,h.MZ)()],ce.prototype,"layerMap",void 0),(0,l.Cg)([(0,h.MZ)({type:V,json:{origins:{"web-document":{write:{ignoreOrigin:!0}}}}})],ce.prototype,"activeLayer",void 0),(0,l.Cg)([(0,Z.w)("service","activeLayer",["layers"])],ce.prototype,"readActiveLayerFromService",null),(0,l.Cg)([(0,Z.w)(["web-document","portal-item"],"activeLayer",["wmtsInfo"])],ce.prototype,"readActiveLayerFromItemOrWebDoc",null),(0,l.Cg)([(0,ue.K)(["web-document","portal-item"],"activeLayer",{templateUrl:{type:String},tileInfo:{type:S.A},"wmtsInfo.layerIdentifier":{type:String},"wmtsInfo.tileMatrixSet":{type:String}})],ce.prototype,"writeActiveLayer",null),(0,l.Cg)([(0,h.MZ)({type:String,value:"",json:{write:!0}})],ce.prototype,"copyright",void 0),(0,l.Cg)([(0,h.MZ)({type:["show","hide"]})],ce.prototype,"listMode",void 0),(0,l.Cg)([(0,h.MZ)({json:{read:!0,write:!0}})],ce.prototype,"blendMode",void 0),(0,l.Cg)([(0,h.MZ)({json:{origins:{"web-document":{read:{source:["wmtsInfo.customParameters","wmtsInfo.url"]},write:{target:"wmtsInfo.customParameters"}},"portal-item":{read:{source:["wmtsInfo.customParameters","wmtsInfo.url"]},write:{target:"wmtsInfo.customParameters"}}}}})],ce.prototype,"customParameters",void 0),(0,l.Cg)([(0,Z.w)(["portal-item","web-document"],"customParameters")],ce.prototype,"readCustomParameters",null),(0,l.Cg)([(0,h.MZ)({json:{origins:{"web-document":{read:{source:"wmtsInfo.customLayerParameters"},write:{target:"wmtsInfo.customLayerParameters"}},"portal-item":{read:{source:"wmtsInfo.customLayerParameters"},write:{target:"wmtsInfo.customLayerParameters"}}}}})],ce.prototype,"customLayerParameters",void 0),(0,l.Cg)([(0,h.MZ)({type:y.A,json:{write:{ignoreOrigin:!0},origins:{"web-document":{read:{source:"fullExtent"}},"portal-item":{read:{source:"fullExtent"}}}}})],ce.prototype,"fullExtent",void 0),(0,l.Cg)([(0,h.MZ)({readOnly:!0})],ce.prototype,"fullExtents",null),(0,l.Cg)([(0,h.MZ)({type:["WebTiledLayer"]})],ce.prototype,"operationalLayerType",void 0),(0,l.Cg)([(0,h.MZ)()],ce.prototype,"resourceInfo",void 0),(0,l.Cg)([(0,h.MZ)()],ce.prototype,"serviceMode",void 0),(0,l.Cg)([(0,Z.w)(["portal-item","web-document"],"serviceMode",["templateUrl"])],ce.prototype,"readServiceMode",null),(0,l.Cg)([(0,h.MZ)({type:o.A.ofType(V)})],ce.prototype,"sublayers",void 0),(0,l.Cg)([(0,Z.w)("service","sublayers",["layers"])],ce.prototype,"readSublayersFromService",null),(0,l.Cg)([(0,h.MZ)({readOnly:!0})],ce.prototype,"supportedSpatialReferences",null),(0,l.Cg)([(0,h.MZ)({readOnly:!0})],ce.prototype,"tilemapCache",null),(0,l.Cg)([(0,h.MZ)({json:{read:{source:"title"}}})],ce.prototype,"title",null),(0,l.Cg)([(0,h.MZ)({json:{read:!1},readOnly:!0,value:"wmts"})],ce.prototype,"type",void 0),(0,l.Cg)([(0,h.MZ)({json:{origins:{service:{read:{source:"tileUrl"}},"web-document":{read:{source:"wmtsInfo.url"},write:{target:"wmtsInfo.url"}},"portal-item":{read:{source:"wmtsInfo.url"},write:{target:"wmtsInfo.url"}}}}})],ce.prototype,"url",null),(0,l.Cg)([(0,h.MZ)()],ce.prototype,"version",void 0),ce=ne=(0,l.Cg)([(0,h.$K)("esri.layers.WMTSLayer")],ce);const me=ce},38458(e,t,i){i.d(t,{m:()=>l});const r=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function l(e){return null!=e&&r.some(([t,i])=>e>=t&&e<=i)}},13043(e,t,i){function r(e,t){if(e&&t)for(let i of e.children)if(i.localName in t){let e=t[i.localName];if("function"==typeof e){let t=e(i);t&&r(i,t)}else r(i,e)}}function*l(e,t){for(let i of e.children)if(i.localName in t){let e=t[i.localName];"function"==typeof e?yield e(i):yield*l(i,e)}}i.d(t,{i:()=>l,p:()=>r})},65509(e,t,i){i.d(t,{A:()=>s});var r=i(49186),l=i(17676);class s{constructor(e,t=0,i=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=i,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(i)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,i){let r=this.tileInfo?.lodAt(e);return!r||e<this.minLOD||e>this.maxLOD?"unavailable":r.cols&&r.rows?i>=r.cols[0]&&i<=r.cols[1]&&t>=r.rows[0]&&t<=r.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,i,s){await(0,l.NO)(s);let a=this.getAvailability(e,t,i);if("unavailable"===a)throw new r.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return a}async fetchAvailabilityUpsample(e,t,i,r,s){await(0,l.NO)(s),r.level=e,r.row=t,r.col=i;let a=this.tileInfo;return a.updateTileInfo(r),this.fetchAvailability(e,t,i,s).catch(e=>{if((0,l.zf)(e))throw e;if(a.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,s);throw e})}}}}]);
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import e from"../../symbols/CIMSymbol.js";const t=new e({data:{type:`CIMSymbolReference`,symbol:{type:`CIMPolygonSymbol`,symbolLayers:[{type:`CIMSolidStroke`,color:[80,170,205,255],enable:!0,joinStyle:`Miter`,width:4,effects:[{type:`CIMGeometricEffectOffset`,method:`Square`,offset:-4}]},{type:`CIMSolidFill`,effects:[{type:`CIMGeometricEffectBuffer`,size:-4}],animations:[{type:`CIMSymbolAnimationColor`,animatedSymbolProperties:{type:`CIMAnimatedSymbolProperties`,duration:3,easing:`EaseInOut`,playAnimation:!0,randomizeStartTime:!1,repeatType:`Oscillate`},toColor:[145,215,235,50]}],color:[145,215,235,100],enable:!0}]}}});export{t as LAYERVIEW_2D_SYMBOL};