@arcgis/core 5.2.0-next.23 → 5.2.0-next.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/04070767356c12026369.js +1 -0
- package/assets/esri/core/workers/chunks/10112bf4b385f1955a3d.js +1 -0
- package/assets/esri/core/workers/chunks/{3b74749db78bcba2bc16.js → 126a8c26618425790804.js} +1 -1
- package/assets/esri/core/workers/chunks/{d4e0346209fabc58f929.js → 15fd30908d5db7f7136e.js} +3 -3
- package/assets/esri/core/workers/chunks/{73b0edabddbb72fe1104.js → 1b5001bdfeecf78c33ce.js} +1 -1
- package/assets/esri/core/workers/chunks/{57e04b7ec238f7b24274.js → 1f03e34520746e432719.js} +1 -1
- package/assets/esri/core/workers/chunks/218e2d8d6cd147c769ce.js +1 -0
- package/assets/esri/core/workers/chunks/{2c4f10eaf02ef090ee8f.js → 23f81f4a3d7a983eef23.js} +1 -1
- package/assets/esri/core/workers/chunks/{a856ae928273f9d6792f.js → 268ee59800e64baa9682.js} +1 -1
- package/assets/esri/core/workers/chunks/26a2d4b95cda0a41d980.js +1 -0
- package/assets/esri/core/workers/chunks/2e7b83c8ba78cb06d611.js +1 -0
- package/assets/esri/core/workers/chunks/316a3d5c7842b445e29e.js +1 -0
- package/assets/esri/core/workers/chunks/{84a0bb53fcbd99b5aa0c.js → 33e86dd1a54e447fa0e3.js} +1 -1
- package/assets/esri/core/workers/chunks/{5fab14c5f1febebb75f1.js → 34eb22ee13df24271532.js} +1 -1
- package/assets/esri/core/workers/chunks/{3d83ac791212b81c9d11.js → 36b904912cea1744d1c6.js} +1 -1
- package/assets/esri/core/workers/chunks/{f8cfd0045d06aa24beec.js → 3b7060d264888bf298b1.js} +1 -1
- package/assets/esri/core/workers/chunks/{f9b44ff9bb4f7a88ab56.js → 3d1021f7ea9617a76ccf.js} +1 -1
- package/assets/esri/core/workers/chunks/{60d4a3f770bb1e01cd10.js → 3e4b379a6a197b9c4e6b.js} +1 -1
- package/assets/esri/core/workers/chunks/{4f51963815b0d53ffbd9.js → 3e94ed4d57ee7d870cba.js} +1 -1
- package/assets/esri/core/workers/chunks/{7d220f574ebf2740c208.js → 41aca863324387576cf8.js} +1 -1
- package/assets/esri/core/workers/chunks/{cbe8adc100582e746a8c.js → 4adfe7f8a8efe2cd8e80.js} +1 -1
- package/assets/esri/core/workers/chunks/{e9acc05b0cf9e05f31a8.js → 50b34e246f8eef2f6e07.js} +1 -1
- package/assets/esri/core/workers/chunks/52993a9dc0c56e9bda19.js +1 -0
- package/assets/esri/core/workers/chunks/5b654e0dc901a7f06a9f.js +1 -0
- package/assets/esri/core/workers/chunks/{dd795c95cdc3812b5b49.js → 6adc17e6e287a365ad8d.js} +1 -1
- package/assets/esri/core/workers/chunks/{40df6ffeb61fea80aae3.js → 7849cf0352c0a604e164.js} +1 -1
- package/assets/esri/core/workers/chunks/{6c0c77de1934f35dc45f.js → 7c34eb94e2c74602aeab.js} +1 -1
- package/assets/esri/core/workers/chunks/856cf872d29eeaf11a71.js +1 -0
- package/assets/esri/core/workers/chunks/88b08b386926ec889573.js +1 -0
- package/assets/esri/core/workers/chunks/{1b0765403b06294b3e1d.js → 89dd1b1acb0d69264c93.js} +1 -1
- package/assets/esri/core/workers/chunks/{5d710b3e50f2211a765d.js → 8b526ca2dd6fc6a7e921.js} +1 -1
- package/assets/esri/core/workers/chunks/{c86d388d216adbb15a05.js → 8bd4c43c34aacf3b07da.js} +1 -1
- package/assets/esri/core/workers/chunks/{69e98de578f467a35054.js → a0b78cbeb0e53107d819.js} +1 -1
- package/assets/esri/core/workers/chunks/{fee50ab6c92ef0327255.js → a454df829a72ab02c860.js} +1 -1
- package/assets/esri/core/workers/chunks/{5481af25fd46914498df.js → a6dc01847f39413f78b8.js} +1 -1
- package/assets/esri/core/workers/chunks/{5dd441db1e74dc9b56e9.js → acc733b4881c3e4e503e.js} +1 -1
- package/assets/esri/core/workers/chunks/{0b45d34938fa7862f746.js → affc972757798b6db002.js} +1 -1
- package/assets/esri/core/workers/chunks/{9f93c29af2a18f7cb160.js → b45e91249a8ea1559a2b.js} +1 -1
- package/assets/esri/core/workers/chunks/{f955b35337a08f9f747d.js → c610ccbfdb1c5b06c217.js} +1 -1
- package/assets/esri/core/workers/chunks/cd88e6f02bc2e5b67abf.js +1 -0
- package/assets/esri/core/workers/chunks/d374cb2d17a2d11c500f.js +1 -0
- package/assets/esri/core/workers/chunks/{8eda85fc01a71aedd9e4.js → dadf85890961bcc205eb.js} +1 -1
- package/assets/esri/core/workers/chunks/e3623e557ab463580fd2.js +1 -0
- package/assets/esri/core/workers/chunks/{d523af1db620b5381c99.js → e8e7cd26c43f231cdea2.js} +1 -1
- package/chunks/OITBlendEmission.glsl.js +5 -2
- package/config.js +1 -1
- package/kernel.js +1 -1
- package/layers/save/featureLayerUtils.js +1 -1
- package/layers/save/utils.js +1 -1
- package/layers/support/fetchService.js +1 -1
- package/package.json +1 -1
- package/portal/support/portalItemUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/CIMSymbol.d.ts +2 -3
- package/symbols/cim/types.d.ts +58 -2
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
- package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatTextureAtlas.js +1 -1
- package/views/3d/support/pointsOfInterest/Focus.js +1 -1
- package/views/3d/webgl/RenderCamera.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/EmissionDimming.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +4 -4
- package/widgets/Sketch/SketchViewModel.d.ts +8 -1
- package/widgets/Sketch/types.d.ts +12 -0
- package/assets/esri/core/workers/chunks/0fb685f385e91d0f0601.js +0 -1
- package/assets/esri/core/workers/chunks/277718031c903da2b3b9.js +0 -1
- package/assets/esri/core/workers/chunks/47d630561f3fce5c63c4.js +0 -1
- package/assets/esri/core/workers/chunks/58c79e15ca95238a4b43.js +0 -1
- package/assets/esri/core/workers/chunks/5b238f9c345f10c5c2fa.js +0 -1
- package/assets/esri/core/workers/chunks/9ad36947bb42ed7f97d3.js +0 -1
- package/assets/esri/core/workers/chunks/9e0ea6c34940b1acf3c6.js +0 -1
- package/assets/esri/core/workers/chunks/aec46ec486912dca549d.js +0 -1
- package/assets/esri/core/workers/chunks/d6bb8db22ba85ad05fd7.js +0 -1
- package/assets/esri/core/workers/chunks/d8329c2000c0cc597adc.js +0 -1
- package/assets/esri/core/workers/chunks/dee339774131d7274137.js +0 -1
- package/assets/esri/core/workers/chunks/f3fe865506fd7428eb6d.js +0 -1
- package/assets/esri/core/workers/chunks/fccc34b86454c56f27ab.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4493],{60999(e,t,r){r.d(t,{DZ:()=>f,Ke:()=>p,Tj:()=>c,UT:()=>g,aD:()=>m,jJ:()=>u});var n=r(5482),i=r(69622),s=r(97768),l=r(17676),a=r(10107),o=r(64108);function u(e,t,r){return(0,l.Lx)(e.map((e,n)=>t.apply(r,[e,n])))}async function c(e,t,r){return(await(0,l.Lx)(e.map((e,n)=>t.apply(r,[e,n])))).map(e=>e.value)}function h(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:new Error("no promise provided")};try{return h(await e)}catch(e){return d(e)}}async function f(e){try{return h(await e)}catch(e){return(0,l.QP)(e),d(e)}}function g(e,t){return new y(e,t)}let y=class extends i.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,s.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=e(r),this.promise.then(e=>{this._result=h(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,l.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,s.xt)(this._abortHandle),this._abortController=null}};(0,n.Cg)([(0,a.MZ)()],y.prototype,"value",null),(0,n.Cg)([(0,a.MZ)()],y.prototype,"error",null),(0,n.Cg)([(0,a.MZ)()],y.prototype,"finished",null),(0,n.Cg)([(0,a.MZ)()],y.prototype,"promise",void 0),(0,n.Cg)([(0,a.MZ)()],y.prototype,"_result",void 0),y=(0,n.Cg)([(0,o.$)("esri.core.asyncUtils.ReactiveTask")],y);class m{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,n.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,n.hk)(t)}}}},83027(e,t,r){r.d(t,{h:()=>n});const n=r(29953).ho},35982(e,t,r){r.d(t,{B:()=>c});var n=r(4576),i=r(71511),s=r(36563),l=r(53966),a=r(97768),o=r(17676),u=r(83027);class c{constructor(e,t,r,n,i={}){this._mainMethod=t,this._transferLists=r,this._listeners=[],this._onClientConnectedHandle=null,this._destroyed=!1,this._promise=(0,u.h)(e,{...i,schedule:n}).then(e=>{null!=this._thread||this._destroyed?e.close():(this._thread=e,this._promise=null,this._onClientConnectedHandle=this._thread.onClientConnected(e=>{i.hasInitialize&&e.invoke("initialize",{});for(const t of this._listeners)this._connectListenerToClient(t,e);this._onClientConnected(e)}))}),this._promise.catch(t=>l.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){const r=new h(e,t);return this._listeners.push(r),this._connectListener(r),(0,s.hA)(()=>{(0,n.TF)(this._listeners,r),r.destroy()})}[Symbol.dispose](){this.destroy()}destroy(){this._onClientConnectedHandle=(0,a.xt)(this._onClientConnectedHandle),this._thread&&(this._thread.close(),this._thread=null),this._promise=null;for(const e of this._listeners)e.destroy();this._listeners.length=0,this._transferLists={},this._destroyed=!0}invoke(e,t,r){return this.invokeMethod(this._mainMethod,e,t,r)}invokeMethod(e,t,r,n){if(this._thread){const i=this._transferLists[e],s=i?i(t):[];return this._thread.invoke(e,t,{transferList:s,signal:r,jobPriority:n})}return this._promise?this._promise.then(()=>((0,o.Te)(r),this.invokeMethod(e,t,r))):Promise.reject((0,o.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,o.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 h{constructor(e,t){this.eventName=e,this.callback=t,this._handles=new i.A}add(e){this._handles.add(e)}destroy(){this._handles.destroy()}}function d(){}},54239(e,t,r){r.d(t,{A:()=>m});var n,i=r(5482),s=r(4576),l=r(66552),a=r(25482),o=r(86211),u=r(67076),c=r(91429),h=r(97348),d=r(43937),p=r(36005);const f=(0,l.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),g=f.jsonValues.slice();(0,s.Xy)(g,"orthometric");const y=(0,l.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=n=class extends a.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return f.write(e,t,r)}readHeightModel(e,t,r){return f.read(e)||(r?.messages&&r.messages.push(function(e,t){return new u.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return y.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,o.LA)(e)||y.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new n({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,o.k1)(t);return new n({heightModel:e.heightModel,heightUnit:r??void 0,vertCRS:e.vertCRS})}static fromSpatialReference(e){const{latestVcsWkid:t,vcsWkid:r}=e;if(!r)return null;const i=(null!=t?h.B.get(t):null)??h.B.get(r);return i?new n({heightModel:0===i.type?"gravity-related-height":"ellipsoidal",heightUnit:(0,o.LA)(i.unit.name),vertCRS:i.datum}):null}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new n;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new u.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,i.Cg)([(0,c.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g,default:"ellipsoidal",write:{isRequired:!0}}}}})],m.prototype,"heightModel",void 0),(0,i.Cg)([(0,d.K)("web-scene","heightModel")],m.prototype,"writeHeightModel",null),(0,i.Cg)([(0,p.w)(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),(0,i.Cg)([(0,c.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,i.Cg)([(0,p.w)("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),(0,i.Cg)([(0,p.w)("service","heightUnit")],m.prototype,"readHeightUnitService",null),(0,i.Cg)([(0,c.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),(0,i.Cg)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=n=(0,i.Cg)([(0,c.$K)("esri.geometry.HeightModelInfo")],m)},159(e,t,r){r.d(t,{A:()=>u});var n,i=r(5482),s=r(69540),l=r(25482),a=r(91429),o=r(99157);let u=n=class extends((0,s.OU)(l.o)){constructor(e){super(e),this.steps=[]}getInverse(){const e=new n;for(let t=this.steps.length-1;t>=0;t--){const r=this.steps[t];e.steps.push(r.getInverse())}return e}};(0,i.Cg)([(0,a.MZ)({type:[o.A],nonNullable:!0,json:{name:"geoTransforms"}})],u.prototype,"steps",void 0),u=n=(0,i.Cg)([(0,a.$K)("esri.geometry.operators.support.GeographicTransformation")],u)},99157(e,t,r){r.d(t,{A:()=>o});var n,i=r(5482),s=r(69540),l=r(25482),a=r(91429);let o=n=class extends((0,s.OU)(l.o)){constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new n({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,i.Cg)([(0,a.MZ)({json:{name:"transformForward",read:e=>!e,write:(e,t,r)=>{t[r]=!e}}})],o.prototype,"isInverse",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],o.prototype,"wkt",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],o.prototype,"wkid",void 0),o=n=(0,i.Cg)([(0,a.$K)("esri.geometry.operators.support.GeographicTransformationStep")],o)},9762(e,t,r){r.r(t),r.d(t,{projectBuffer:()=>i});var n=r(49208);function i(e,t,r,i,s,l,a=Math.floor(e.length/3)){const o=(0,n.jd)(t,s);if(null==o)return!1;if(o===n.pO){if(e===i&&r===l)return!0;const t=r+3*a;for(let n=r,s=l;n<t;n++,s++)i[s]=e[n]??0;return!0}const u=r+3*a;for(let t=r,n=l;t<u;t+=3,n+=3)o(e,t,i,n);return!0}},49208(e,t,r){r.d(t,{Tp:()=>h,jd:()=>c,pO:()=>p,w5:()=>u});var n=r(34727),i=r(86211),s=r(73941),l=r(79258),a=r(34403),o=r(21325);const u={2:{5:p,7:null,9:null,10:p,1:C,6:null,8:null,0:null,3:g,11:y,2:p,4:b},5:{5:p,7:null,9:null,10:p,1:C,6:null,8:null,0:null,3:g,11:y,2:p,4:b},7:{5:null,7:p,9:null,10:p,1:null,6:M,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:p,10:p,1:null,6:null,8:w,0:null,3:null,11:null,2:null,4:null},3:{5:f,7:null,9:null,10:f,1:function(e,t,r,n){const i=e[t]/x,s=O-2*Math.atan(Math.exp(-e[t+1]/x)),l=x+(e[t+2]??0),a=Math.cos(s)*l;r[n]=Math.cos(i)*a,r[n+1]=Math.sin(i)*a,r[n+2]=Math.sin(s)*l},6:null,8:null,0:null,3:p,11:function(e,t,r,n){f(e,t,r,n),y(r,n,r,n)},2:f,4:function(e,t,r,n){f(e,t,r,n),b(r,n,r,n)}},4:{5:R,7:null,9:null,10:R,1:function(e,t,r,n){R(e,t,r,n),C(r,n,r,n)},6:null,8:null,0:null,3:function(e,t,r,n){R(e,t,r,n),g(r,n,r,n)},11:function(e,t,r,n){R(e,t,r,n),y(r,n,r,n)},2:R,4:p},1:{5:S,7:null,9:null,10:S,1:p,6:null,8:null,0:null,3:function(e,t,r,n){S(e,t,r,n),g(r,n,r,n)},11:function(e,t,r,n){S(e,t,r,n),y(r,n,r,n)},2:S,4:function(e,t,r,n){S(e,t,r,n),b(r,n,r,n)}},6:{5:null,7:A,9:null,10:A,1:null,6:p,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:I,10:I,1:null,6:null,8:p,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:p,3:null,11:null,2:null,4:null},10:{5:p,7:p,9:p,10:p,1:C,6:M,8:w,0:null,3:g,11:y,2:p,4:b},11:{5:m,7:null,9:null,10:m,1:function(e,t,r,n){m(e,t,r,n),C(r,n,r,n)},6:null,8:null,0:null,3:function(e,t,r,n){m(e,t,r,n),g(r,n,r,n)},11:p,2:m,4:function(e,t,r,n){m(e,t,r,n),b(r,n,r,n)}}};function c(e,t){return h(e,t)?.projector}function h(e,t){if(null==e||null==t)return null;if(P.source.spatialReference===e&&P.dest.spatialReference===t)return P;const r=d(e,P.source),n=d(t,P.dest);return 0===r&&0===n?(0,o.aI)(e,t)?P.projector=p:P.projector=null:P.projector=u[r][n],P}function d(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,i.GA)(e,1)),(0,s.jA)(e)?t.spatialReferenceId=1:(0,o.oT)(e)?t.spatialReferenceId=2:(0,o.K8)(e)?t.spatialReferenceId=3:(0,o.r1)(e)?t.spatialReferenceId=11:e.wkt===s.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===s.FY.wkt?t.spatialReferenceId=6:e.wkt===s.LJ.wkt?t.spatialReferenceId=8:(0,s.q8)(e)?t.spatialReferenceId=7:(0,s.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function p(e,t,r,n){e!==r&&(r[n++]=e[t++],r[n++]=e[t++],r[n]=e[t]??0)}function f(e,t,r,n){r[n]=L*(e[t]/x),r[n+1]=L*(O-2*Math.atan(Math.exp(-e[t+1]/x))),r[n+2]=e[t+2]??0}function g(e,t,r,i){!function(e,t,r,i,s){const l=.4999999*Math.PI,a=(0,n.qE)(T*e[t+1],-l,l),o=Math.sin(a);r[i++]=T*e[t]*s.radius,r[i++]=s.halfSemiMajorAxis*Math.log((1+o)/(1-o)),r[i]=e[t+2]??0}(e,t,r,i,l.$O)}function y(e,t,r,n){r[n]=e[t]*k,r[n+1]=e[t+1]*k,r[n+2]=e[t+2]??0}function m(e,t,r,n){r[n]=e[t]*E,r[n+1]=e[t+1]*E,r[n+2]=e[t+2]??0}function v(e,t,r,n,i){const s=i+(e[t+2]??0),l=T*e[t],a=T*e[t+1],o=Math.cos(a)*s;r[n]=Math.cos(l)*o,r[n+1]=Math.sin(l)*o,r[n+2]=Math.sin(a)*s}function w(e,t,r,n){v(e,t,r,n,l.Sw.radius)}function M(e,t,r,n){v(e,t,r,n,l.sH.radius)}function C(e,t,r,n){v(e,t,r,n,l.$O.radius)}function _(e,t,r,i,s){const l=e[t],a=e[t+1],o=e[t+2]??0,u=Math.sqrt(l*l+a*a+o*o),c=(0,n.YN)(o/(0===u?1:u)),h=Math.atan2(a,l);r[i++]=L*h,r[i++]=L*c,r[i]=u-s}function I(e,t,r,n){_(e,t,r,n,l.Sw.radius)}function A(e,t,r,n){_(e,t,r,n,l.sH.radius)}function S(e,t,r,n){_(e,t,r,n,l.$O.radius)}function b(e,t,r,n){!function(e,t,r,n,i){const s=T*e[t],l=T*e[t+1],a=e[t+2]??0,o=Math.sin(l),u=Math.cos(l),c=i.radius/Math.sqrt(1-i.eccentricitySquared*o*o);r[n++]=(c+a)*u*Math.cos(s),r[n++]=(c+a)*u*Math.sin(s),r[n++]=(c*(1-i.eccentricitySquared)+a)*o}(e,t,r,n,l.$O)}function R(e,t,r,n){const i=a.TP,s=e[t],o=e[t+1],u=e[t+2]??0;let c,h,d,p,f,g,y,m,v,w,M,C,_,I,A,S,b,R,P,T,O;c=Math.abs(u),h=s*s+o*o,d=Math.sqrt(h),p=h+u*u,f=Math.sqrt(p),T=Math.atan2(o,s),g=u*u/p,y=h/p,I=i.a2/f,A=i.a3-i.a4/f,y>.3?(m=c/f*(1+y*(i.a1+I+g*A)/f),P=Math.asin(m),w=m*m,v=Math.sqrt(1-w)):(v=d/f*(1-g*(i.a5-I-y*A)/f),P=Math.acos(v),w=1-v*v,m=Math.sqrt(w)),M=1-l.$O.eccentricitySquared*w,C=l.$O.radius/Math.sqrt(M),_=i.a6*C,I=d-C*v,A=c-_*m,b=v*I+m*A,S=v*A-m*I,R=S/(_/M+b),P+=R,O=b+S*R/2,u<0&&(P=-P),r[n++]=L*T,r[n++]=L*P,r[n]=O}const P={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:p},T=(0,n.kU)(1),L=(0,n.KJ)(1),O=.5*Math.PI,x=l.$O.radius,k=x*Math.PI/180,E=180/(x*Math.PI)},91218(e,t,r){r.r(t),r.d(t,{canProjectWithoutEngine:()=>F,initializeProjection:()=>z,isEqualBaseGCS:()=>K,isLoaded:()=>x,isLoadedOrLoad:()=>k,isLoadedOrLoadFor:()=>E,load:()=>D,project:()=>j,projectAsync:()=>B,projectExtent:()=>ie,projectMany:()=>Z,projectMultipoint:()=>Q,projectOrLoad:()=>$,projectOrLoadMany:()=>V,projectPoint:()=>J,projectPolygon:()=>re,projectPolyline:()=>ee,projectWithoutEngine:()=>Y,requiresLoad:()=>U,test:()=>N,tryProject:()=>H,unload:()=>G});var n=r(49186),i=r(17676),s=r(62788),l=r(95488),a=r(51850),o=r(21276),u=r(73941),c=r(5443),h=r(91075),d=r(48526),p=r(86738),f=r(39829),g=r(82799),y=r(16930),m=r(98764),v=r(159),w=r(9762),M=r(49208);function C(e,t,r,n,i,s){return _[0]=e,_[1]=t,_[2]=r,(0,w.projectBuffer)(_,n,0,i,s,0)}const _=(0,a.vt)();var I=r(60408),A=r(21325),S=r(52006);let b=null,R=null,P=null,T=null,L={};const O=new l.I;function x(){return!!(R?.isLoaded()&&P?.isLoaded()&&T?.isLoaded())}function k(){return!!x()||((0,s.gc)(O),D(),!1)}function E(e,t){return!e||!t||F(e,t)||k()}function U(e,t){return!F(e,t)&&!x()}async function D(e){null==b&&(b=Promise.all([r.e(3276).then(r.bind(r,83276)).then(e=>(R=e,R.load())),r.e(8377).then(r.bind(r,8377)).then(e=>(P=e,P.load())),r.e(2158).then(r.bind(r,12158)).then(e=>(T=e,T.load()))])),await b,(0,i.Te)(e),O.notify()}function j(e,t,r){return Array.isArray(e)?0===e.length?[]:((0,o.H)(e),Z(e,e[0].spatialReference,t,r)):((0,o.f)(e),Z([e],e.spatialReference,t,r)[0])}function Z(e,t,r,n){if(null==t||null==r)return e;if(F(t,r,n))return e.map(e=>Y(e,t,r));if(null==n?.geographicTransformation&&(0,u.jA)(t))return Z(e.map(e=>Y(e,t,y.A.WGS84)),y.A.WGS84,r,{zConversionDisabled:n?.zConversionDisabled});if(null==n?.geographicTransformation&&(0,u.jA)(r))return Z(e,t,y.A.WGS84).map(e=>Y(e,y.A.WGS84,r));if(!x())throw new q;if(!n?.geographicTransformation)if(n?.extendedParams)n={...n,geographicTransformation:T.getTransformation(t,r,n.areaOfInterestExtent)||new v.A};else if(!n?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,r);let i=L[e];i||(i=T.getTransformation(t,r)||new v.A,L[e]=i),n={geographicTransformation:i,zConversionDisabled:n?.zConversionDisabled}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof h.A?R.executeMany(e,r,n):P.executeMany(e,r,n)}function H(e,t,r){try{return j(e,t,r)}catch(e){return null}}function $(e,t){const r=V([e],t);return null!=r.pending?{pending:r.pending,geometry:null}:null!=r.geometries?{pending:null,geometry:r.geometries[0]}:{pending:null,geometry:null}}function V(e,t,r){if(!x())for(const r of e)if(null!=r&&!(0,A.aI)(r.spatialReference,t)&&(0,A.fn)(r.spatialReference)&&(0,A.fn)(t)&&!F(r.spatialReference,t))return(0,s.gc)(O),{pending:D(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,A.aI)(e.spatialReference,t)?e:(0,A.fn)(e.spatialReference)&&(0,A.fn)(t)?j(e,t,r):null)}}class q extends n.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function G(){b=null,R=null,P=null,T=null,L={}}const N={get loadPromise(){return b}};async function B(e,t,r){if((0,i.Te)(r),!e)return e;const n=V(Array.isArray(e)?e:[e],t,r);if(n.pending)return await n.pending,(0,i.Te)(r),B(e,t,r);const s=n.geometries??[];return Array.isArray(e)?s:s[0]}function F(e,t,r){return!(r?.areaOfInterestExtent||r?.extendedParams||r?.geographicTransformation)&&(!!(0,A.aI)(e,t)||(0,A.fn)(e)&&(0,A.fn)(t)&&!!(0,M.jd)(e,t))}function K(e,t){if((0,A.aI)(e,t))return!0;if(!(0,A.fn)(e)||!(0,A.fn)(t))return!1;const r=(0,A.oT)(e)||(0,A.K8)(e)||(0,A.x1)(e),n=(0,A.oT)(t)||(0,A.K8)(t)||(0,A.x1)(t);return r&&n}async function z(e,t,r,n){if(x())return(0,i.NO)(n);if(Array.isArray(e)){for(const{source:t,dest:r,options:i}of e)if(t&&r&&!F(t,r,i))return D(n)}else if(e&&t&&!F(e,t,r))return D(n);return(0,i.NO)(n)}function Y(e,t,r){return e?(0,I.fT)(e)?W(e,t,new p.A,r,0):(0,I.ZC)(e)?se(e,t,new c.A,r,0):(0,I.Bi)(e)?ne(e,t,new f.A,r,0):(0,I.Rg)(e)?te(e,t,new g.A,r,0):(0,I.U9)(e)?X(e,t,new d.A,r,0):null:null}function J(e,t,r=t.spatialReference,n=0){return null!=r&&null!=e.spatialReference&&null!=W(e,e.spatialReference,t,r,n)}function W(e,t,r,n,i){ue[0]=e.x,ue[1]=e.y;const s=e.z;return ue[2]=void 0!==s?s:i,(0,w.projectBuffer)(ue,t,0,ue,n,0)?(r.x=ue[0],r.y=ue[1],r.spatialReference=n,void 0!==s||(0,u.xP)(n)?(r.z=ue[2],r.hasZ=!0):(r.z=void 0,r.hasZ=!1),void 0===e.m?(r.m=void 0,r.hasM=!1):(r.m=e.m,r.hasM=!0),r):null}function Q(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=X(e,e.spatialReference,t,r,n)}function X(e,t,r,n,i){const{points:s,hasZ:l,hasM:a}=e,o=[],u=s.length,c=[];for(const e of s)c.push(e[0],e[1],l?e[2]:i);if(!(0,w.projectBuffer)(c,t,0,c,n,0,u))return null;const h=oe(l,n);for(let e=0;e<u;++e){const t=3*e,r=c[t],n=c[t+1];h&&a?o.push([r,n,c[t+2],s[e][3]]):h?o.push([r,n,c[t+2]]):a?o.push([r,n,s[e][2]]):o.push([r,n])}return r.points=o,r.spatialReference=n,r.hasZ=l,r.hasM=a,r}function ee(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=te(e,e.spatialReference,t,r,n)}function te(e,t,r,n,i){const{curvePaths:s,paths:l,hasZ:a,hasM:o}=e;if(!(s?ae(s,a??!1,o??!1,t,r.curvePaths=[],n,i):le(l,a??!1,o??!1,t,r.paths,n,i)))return null;const u=oe(a,n);return r.spatialReference=n,r.hasZ=u,r.hasM=o,r}function re(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=ne(e,e.spatialReference,t,r,n)}function ne(e,t,r,n,i){const{curveRings:s,rings:l,hasZ:a,hasM:o}=e;return(s?ae(s,a??!1,o??!1,t,r.curveRings=[],n,i):le(l,a??!1,o??!1,t,r.rings,n,i))?(r.spatialReference=n,r.hasZ=oe(a,n),r.hasM=o,r):null}function ie(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=se(e,e.spatialReference,t,r,n)}function se(e,t,r,n,i){const{xmin:s,ymin:l,xmax:a,ymax:o,hasZ:u,hasM:c}=e;if(!C(s,l,u?e.zmin:i,t,ue,n))return null;const h=oe(u,n);return r.xmin=ue[0],r.ymin=ue[1],h&&(r.zmin=ue[2]),C(a,o,u?e.zmax:i,t,ue,n)?(r.xmax=ue[0],r.ymax=ue[1],h&&(r.zmax=ue[2]),c&&(r.mmin=e.mmin,r.mmax=e.mmax),r.spatialReference=n,r):null}function le(e,t,r,n,i,s,l=0){const a=new Array;for(const r of e)for(const e of r)a.push(e[0],e[1],t?e[2]:l);if(!(0,w.projectBuffer)(a,n,0,a,s,0))return!1;let o=0;i.length=0;const u=t?3:2,c=oe(t,s);for(const t of e){const e=new Array;for(const n of t){const t=a.slice(o,o+=3);c||t.pop(),r&&t.push(n[u]),e.push(t)}i.push(e)}return!0}function ae(e,t,r,n,i,s,l=0){const a=new Array;for(const r of e)for(const e of r){if((0,S.FG)(e))return!1;if((0,S.aO)(e)){const[r,n]=e.c;a.push(r[0],r[1],t?r[2]:l,n[0],n[1],l);continue}if((0,S.n1)(e)){const[r,n,i]=e.b;a.push(r[0],r[1],t?r[2]:l,n[0],n[1],l,i[0],i[1],l);continue}const r=e;a.push(r[0],r[1],t?r[2]:l)}if(!(0,w.projectBuffer)(a,n,0,a,s,0))return!1;let o=0;i.length=0;const u=t?3:2,c=oe(t,s);for(const t of e){const e=new Array;for(const n of t){const t=a.slice(o,o+=3);if(c||t.pop(),r&&t.push((0,S.yP)(n)[u]),(0,S.FG)(n))return!1;if((0,S.aO)(n)){const r=a[o++],n=a[o++];++o,e.push({c:[t,[r,n]]});continue}if((0,S.n1)(n)){const r=a[o++],n=a[o++];++o;const i=a[o++],s=a[o++];++o,e.push({b:[t,[r,n],[i,s]]});continue}e.push(t)}i.push(e)}return!0}function oe(e,t){return e||(0,u.xP)(t)||(0,A.aI)(t,m.Y0)}const ue=(0,a.vt)()},98764(e,t,r){r.d(t,{GD:()=>l,Y0:()=>u,lO:()=>c});var n=r(73941),i=r(16930),s=r(21325);const l=new i.A(n.fv),a=new i.A(n.FY),o=new i.A(n.LJ),u=new i.A(n.Ro);function c(e){const t=h.get(e);if(t)return t;let r=l;if(e)if(e===a)r=a;else if(e===o)r=o;else{const t=e.wkid,n=e.latestWkid;if(null!=t||null!=n)(0,s.tl)(t)||(0,s.tl)(n)?r=a:((0,s.ZL)(t)||(0,s.ZL)(n))&&(r=o);else{const t=e.wkt2??e.wkt;if(t){const e=t.toUpperCase();e===d?r=a:e===p&&(r=o)}}}return h.set(e,r),r}const h=new Map,d=a.wkt.toUpperCase(),p=o.wkt.toUpperCase()},34403(e,t,r){r.d(t,{TP:()=>l});var n=r(79258);Math.PI;const i=n.$O.radius,s=n.$O.eccentricitySquared,l={a1:i*s,a2:i*s*i*s,a3:i*s*s/2,a4:i*s*i*s*2.5,a5:i*s+i*s*s/2,a6:1-s};n.$O.radius,n.$O.flattening,n.Sw.radius,n.Sw.flattening,n.sH.radius,n.sH.flattening,n.sH.radius},38732(e,t,r){r.r(t),r.d(t,{default:()=>S});var n=r(5482),i=r(11254),s=r(49186),l=r(97768),a=r(25728),o=r(17676),u=r(84952),c=r(91429),h=r(54239),d=r(4146),p=r(89186),f=r(18768),g=r(34287),y=r(8303),m=r(10873),v=r(87378),w=r(35982);class M extends w.B{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,r){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},r):Promise.resolve(null)}release(){--this.ref<=0&&(C.forEach((e,t)=>{e===this&&C.delete(t)}),this.destroy())}}const C=new Map;var _=r(36005);let I=class extends((0,p.f)((0,f.b)((0,g.q)((0,y.A)((0,a.M)(d.A)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=C.get(e);return t||(null!=e?(t=new M(t=>e.immediate.schedule(t)),C.set(e,t)):(t=new M,C.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,l.Gz)(this._lercDecoder)}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());return r?{operations:{supportsTileMap:r.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let r=t.currentVersion;return r||(r=9.3),r}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new s.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(o.QP).then(()=>this._fetchImageService(t))),Promise.resolve(this)}async fetchTile(e,t,r,n){const l=n?.signal,a={responseType:"array-buffer",signal:l,useQueue:n?.useQueue,priority:n?.priority},o={noDataValue:n?.noDataValue,returnFileInfo:!0};await this.load(),await this._fetchTileAvailability(e,t,r,n);const u=await(0,i.A)(this.getTileUrl(e,t,r),a),c=await this._lercDecoder.decode(u.data,o,l);if(!c)throw new s.A("elevation-layer:tile-decode-failed","Failed to decode elevation tile data.");return new v.A({values:c.pixelData,width:c.width,height:c.height,noDataValue:c.noDataValue})}getTileUrl(e,t,r){const n=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,i=(0,u.x0)({...this.parsedUrl.query,blankTile:!n&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${r}${i?"?"+i:""}`}async queryElevation(e,t){const{query:n}=await r.e(91).then(r.bind(r,90091));return(0,o.Te)(t),n(this,e,t)}async createElevationSampler(e,t){const{createSampler:n}=await r.e(91).then(r.bind(r,90091));return(0,o.Te)(t),n(this,e,t)}_fetchTileAvailability(e,t,r,n){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,r,n):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},r=await(0,i.A)(this.parsedUrl.path,t);r.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=r.data,this.read(r.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[A]}};(0,n.Cg)([(0,c.MZ)({readOnly:!0})],I.prototype,"capabilities",void 0),(0,n.Cg)([(0,_.w)("service","capabilities",["capabilities"])],I.prototype,"readCapabilities",null),(0,n.Cg)([(0,c.MZ)({json:{read:{source:"copyrightText"}}})],I.prototype,"copyright",void 0),(0,n.Cg)([(0,c.MZ)({readOnly:!0,type:h.A})],I.prototype,"heightModelInfo",void 0),(0,n.Cg)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],I.prototype,"path",void 0),(0,n.Cg)([(0,c.MZ)({type:["show","hide"]})],I.prototype,"listMode",void 0),(0,n.Cg)([(0,c.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})],I.prototype,"minScale",void 0),(0,n.Cg)([(0,c.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})],I.prototype,"maxScale",void 0),(0,n.Cg)([(0,c.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],I.prototype,"opacity",void 0),(0,n.Cg)([(0,c.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],I.prototype,"operationalLayerType",void 0),(0,n.Cg)([(0,c.MZ)()],I.prototype,"sourceJSON",void 0),(0,n.Cg)([(0,c.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],I.prototype,"type",void 0),(0,n.Cg)([(0,c.MZ)(m.OZ)],I.prototype,"url",void 0),(0,n.Cg)([(0,c.MZ)()],I.prototype,"version",void 0),(0,n.Cg)([(0,_.w)("version",["currentVersion"])],I.prototype,"readVersion",null),I=(0,n.Cg)([(0,c.$K)("esri.layers.ElevationLayer")],I);const A=Symbol("default-fetch-tile");I.prototype.fetchTile[A]=!0;const S=I},89186(e,t,r){r.d(t,{f:()=>c});var n=r(5482),i=r(91429),s=r(16930),l=r(87045),a=r(65509),o=r(25943),u=r(36005);const c=e=>{const t=e;let r=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,r){const n=t.capabilities?.toLowerCase().includes("tilemap");let{minLOD:i,maxLOD:s,minScale:u,maxScale:c}=t;if(null==i&&null==s&&(0!==u||0!==c)){const e=e=>Math.round(1e4*e)/1e4;u=e(u||t.tileInfo.lods[0].scale),c=e(c||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(const r of t.tileInfo.lods){const t=e(r.scale);i=t>=u?r.level:i,s=t>=c?r.level:s}}if(n)return new o.d({layer:this,minLOD:i,maxLOD:s});if(t.tileInfo){const e=new l.A;return e.read(t.tileInfo,r),new a.A(e,i,s)}return null}};return(0,n.Cg)([(0,i.MZ)({json:{read:{source:"copyrightText"}}})],r.prototype,"copyright",void 0),(0,n.Cg)([(0,i.MZ)()],r.prototype,"minScale",void 0),(0,n.Cg)([(0,u.w)("service","minScale")],r.prototype,"readMinScale",null),(0,n.Cg)([(0,i.MZ)()],r.prototype,"maxScale",void 0),(0,n.Cg)([(0,u.w)("service","maxScale")],r.prototype,"readMaxScale",null),(0,n.Cg)([(0,i.MZ)({type:s.A})],r.prototype,"spatialReference",void 0),(0,n.Cg)([(0,i.MZ)({readOnly:!0})],r.prototype,"supportsBlankTile",null),(0,n.Cg)([(0,i.MZ)({type:l.A})],r.prototype,"tileInfo",void 0),(0,n.Cg)([(0,i.MZ)()],r.prototype,"tilemapCache",void 0),(0,n.Cg)([(0,u.w)("service","tilemapCache",["capabilities","tileInfo"])],r.prototype,"readTilemapCache",null),(0,n.Cg)([(0,i.MZ)()],r.prototype,"version",void 0),r=(0,n.Cg)([(0,i.$K)("esri.layers.mixins.ArcGISCachedService")],r),r}},18768(e,t,r){r.d(t,{b:()=>a});var n=r(5482),i=r(53966),s=r(91429),l=r(60694);const a=e=>{const t=e;let r=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,l.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,l.Jf)(e,i.A.getLogger(this)))}};return(0,n.Cg)([(0,s.MZ)()],r.prototype,"title",null),(0,n.Cg)([(0,s.MZ)({type:String})],r.prototype,"url",null),r=(0,n.Cg)([(0,s.$K)("esri.layers.mixins.ArcGISService")],r),r}},8303(e,t,r){r.d(t,{A:()=>_});var n=r(5482),i=r(92602),s=r(70333),l=r(11254),a=r(60999),o=r(49186),u=r(36563),c=r(53966),h=r(97768),d=r(17676),p=r(84952),f=r(91429),g=r(77548),y=r(20655),m=r(80812),v=r(41318),w=r(10407),M=r(36005),C=r(43937);const _=e=>{const t=e;let _=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,h.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new m.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:n}=await r.e(1204).then(r.bind(r,41204));return(0,d.Te)(t),await n({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||c.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e){if(!this.loaded||!this.portalItem?.id)return!1;try{const{reload:t}=await r.e(1204).then(r.bind(r,41204)),n=new AbortController,i=(0,u.rE)(n);return this.addHandles(i,"reloadFromPortal"),await t({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},{signal:n.signal})}catch(e){throw(0,d.zf)(e)||c.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{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(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:n},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",n),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const n=!s.id?.findCredential(this.url),i=e===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,n);let l,a;if(i)l=r.portal.url;else try{l=await(0,g.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!l||!(0,p.b8)(l,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${l}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const o=!0,u=!1,c=!1;if(!a)return{features:{edit:o,fullEdit:u},content:{updateItem:c}};try{if(i?await r.reload():(r=new m.default({id:e,portal:{url:l}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,n)}catch(e){(0,d.QP)(e)}return{features:{edit:o,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const n=`${r.owningSystemUrl}/sharing/rest`,i=y.A.getDefault();if(i&&i.loaded&&(0,p.S8)(i.restUrl)===(0,p.S8)(n))return i.user;const o=`${n}/community/self`,u=null!=e?e.signal:null,c=await(0,a.Ke)((0,l.A)(o,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?v.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,n=this.portalItem?.id&&(this.portalItem.portal||y.A.getDefault());return r&&n&&!(0,p.ut)(n.restUrl,r.restUrl)?(t.messages&&t.messages.push(new o.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,n.Cg)([(0,f.MZ)({type:m.default})],_.prototype,"portalItem",null),(0,n.Cg)([(0,M.w)("web-document","portalItem",["itemId"])],_.prototype,"readPortalItem",null),(0,n.Cg)([(0,C.K)("web-document","portalItem",{itemId:{type:String}})],_.prototype,"writePortalItem",null),(0,n.Cg)([(0,f.MZ)({clonable:!1})],_.prototype,"resourceReferences",void 0),(0,n.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],_.prototype,"userHasEditingPrivileges",void 0),(0,n.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],_.prototype,"userHasFullEditingPrivileges",void 0),(0,n.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],_.prototype,"userHasUpdateItemPrivileges",void 0),_=(0,n.Cg)([(0,f.$K)("esri.layers.mixins.PortalLayer")],_),_},I={credential:null,user:null}},87378(e,t,r){r.d(t,{A:()=>a});var n,i=r(34275),s=r(56507);const l=Symbol("ElevationTileDataClass");class a{static{n=l}constructor({values:e,width:t,height:r,noDataValue:s}){this[n]=!0,this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,this.values=(0,i.vZ)(e)?e:new Float32Array(e),this.width=t,this.height=r,this.noDataValue=s}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get usedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let r=1/0,n=-1/0,i=!0;for(const s of t)s===e?this._hasNoDataValues=!0:(r=s<r?s:r,n=s>n?s:n,i=!1);i?(this._minValue=0,this._maxValue=0):(this._minValue=r,this._maxValue=n>-3e38?n:0)}static{this.from=(0,s.qf)(a)}}},65509(e,t,r){r.d(t,{A:()=>s});var n=r(49186),i=r(17676);class s{constructor(e,t=0,r=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=r,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(r)||(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,r){const n=this.tileInfo?.lodAt(e);return!n||e<this.minLOD||e>this.maxLOD?"unavailable":n.cols&&n.rows?r>=n.cols[0]&&r<=n.cols[1]&&t>=n.rows[0]&&t<=n.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,r,s){await(0,i.NO)(s);const l=this.getAvailability(e,t,r);if("unavailable"===l)throw new n.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:r});return l}async fetchAvailabilityUpsample(e,t,r,n,s){await(0,i.NO)(s),n.level=e,n.row=t,n.col=r;const l=this.tileInfo;return l.updateTileInfo(n),this.fetchAvailability(e,t,r,s).catch(e=>{if((0,i.zf)(e))throw e;if(l.upsampleTile(n))return this.fetchAvailabilityUpsample(n.level,n.row,n.col,n,s);throw e})}}},10407(e,t,r){r.d(t,{It:()=>p,LG:()=>l,OM:()=>u,Sm:()=>c,Y:()=>a,bK:()=>o,mm:()=>d,sQ:()=>h});var n=r(91218),i=r(16930),s=r(28735);function l(e,t){if(!a(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function o(e){return a(e,d.HOSTED_SERVICE)}function u(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function c(e,t,r){r?l(e,t):u(e,t)}async function h(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.ci)(e);const r=i.A.WGS84;return await(0,n.initializeProjection)(t,r),(0,n.project)(e,r)}(r)}const d={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function p(e){const{portal:t,isOrgItem:r,itemControl:n}=e,i=t.user?.privileges;let s=!i||i.includes("features:user:edit"),l=!!r&&!!i?.includes("features:user:fullEdit");const a="update"===n||"admin"===n;return a?l=s=!0:l&&(s=!0),{features:{edit:s,fullEdit:l},content:{updateItem:a}}}},78553(e,t,r){r.d(t,{D:()=>s,p:()=>i});var n=r(56507);function i(e){const t=(0,n.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function s(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4493],{60999(e,t,r){r.d(t,{DZ:()=>f,Ke:()=>p,Tj:()=>c,UT:()=>g,aD:()=>m,jJ:()=>u});var n=r(5482),i=r(69622),s=r(97768),l=r(17676),a=r(10107),o=r(64108);function u(e,t,r){return(0,l.Lx)(e.map((e,n)=>t.apply(r,[e,n])))}async function c(e,t,r){return(await(0,l.Lx)(e.map((e,n)=>t.apply(r,[e,n])))).map(e=>e.value)}function h(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:new Error("no promise provided")};try{return h(await e)}catch(e){return d(e)}}async function f(e){try{return h(await e)}catch(e){return(0,l.QP)(e),d(e)}}function g(e,t){return new y(e,t)}let y=class extends i.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,s.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=e(r),this.promise.then(e=>{this._result=h(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,l.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,s.xt)(this._abortHandle),this._abortController=null}};(0,n.Cg)([(0,a.MZ)()],y.prototype,"value",null),(0,n.Cg)([(0,a.MZ)()],y.prototype,"error",null),(0,n.Cg)([(0,a.MZ)()],y.prototype,"finished",null),(0,n.Cg)([(0,a.MZ)()],y.prototype,"promise",void 0),(0,n.Cg)([(0,a.MZ)()],y.prototype,"_result",void 0),y=(0,n.Cg)([(0,o.$)("esri.core.asyncUtils.ReactiveTask")],y);class m{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,n.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,n.hk)(t)}}}},83027(e,t,r){r.d(t,{h:()=>n});const n=r(29953).ho},35982(e,t,r){r.d(t,{B:()=>c});var n=r(4576),i=r(71511),s=r(36563),l=r(53966),a=r(97768),o=r(17676),u=r(83027);class c{constructor(e,t,r,n,i={}){this._mainMethod=t,this._transferLists=r,this._listeners=[],this._onClientConnectedHandle=null,this._destroyed=!1,this._promise=(0,u.h)(e,{...i,schedule:n}).then(e=>{null!=this._thread||this._destroyed?e.close():(this._thread=e,this._promise=null,this._onClientConnectedHandle=this._thread.onClientConnected(e=>{i.hasInitialize&&e.invoke("initialize",{});for(const t of this._listeners)this._connectListenerToClient(t,e);this._onClientConnected(e)}))}),this._promise.catch(t=>l.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){const r=new h(e,t);return this._listeners.push(r),this._connectListener(r),(0,s.hA)(()=>{(0,n.TF)(this._listeners,r),r.destroy()})}[Symbol.dispose](){this.destroy()}destroy(){this._onClientConnectedHandle=(0,a.xt)(this._onClientConnectedHandle),this._thread&&(this._thread.close(),this._thread=null),this._promise=null;for(const e of this._listeners)e.destroy();this._listeners.length=0,this._transferLists={},this._destroyed=!0}invoke(e,t,r){return this.invokeMethod(this._mainMethod,e,t,r)}invokeMethod(e,t,r,n){if(this._thread){const i=this._transferLists[e],s=i?i(t):[];return this._thread.invoke(e,t,{transferList:s,signal:r,jobPriority:n})}return this._promise?this._promise.then(()=>((0,o.Te)(r),this.invokeMethod(e,t,r))):Promise.reject((0,o.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,o.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 h{constructor(e,t){this.eventName=e,this.callback=t,this._handles=new i.A}add(e){this._handles.add(e)}destroy(){this._handles.destroy()}}function d(){}},54239(e,t,r){r.d(t,{A:()=>m});var n,i=r(5482),s=r(4576),l=r(66552),a=r(25482),o=r(86211),u=r(67076),c=r(91429),h=r(97348),d=r(43937),p=r(36005);const f=(0,l.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),g=f.jsonValues.slice();(0,s.Xy)(g,"orthometric");const y=(0,l.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=n=class extends a.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return f.write(e,t,r)}readHeightModel(e,t,r){return f.read(e)||(r?.messages&&r.messages.push(function(e,t){return new u.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return y.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,o.LA)(e)||y.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new n({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,o.k1)(t);return new n({heightModel:e.heightModel,heightUnit:r??void 0,vertCRS:e.vertCRS})}static fromSpatialReference(e){const{latestVcsWkid:t,vcsWkid:r}=e;if(!r)return null;const i=(null!=t?h.B.get(t):null)??h.B.get(r);return i?new n({heightModel:0===i.type?"gravity-related-height":"ellipsoidal",heightUnit:(0,o.LA)(i.unit.name),vertCRS:i.datum}):null}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new n;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new u.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,i.Cg)([(0,c.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g,default:"ellipsoidal",write:{isRequired:!0}}}}})],m.prototype,"heightModel",void 0),(0,i.Cg)([(0,d.K)("web-scene","heightModel")],m.prototype,"writeHeightModel",null),(0,i.Cg)([(0,p.w)(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),(0,i.Cg)([(0,c.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,i.Cg)([(0,p.w)("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),(0,i.Cg)([(0,p.w)("service","heightUnit")],m.prototype,"readHeightUnitService",null),(0,i.Cg)([(0,c.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),(0,i.Cg)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=n=(0,i.Cg)([(0,c.$K)("esri.geometry.HeightModelInfo")],m)},159(e,t,r){r.d(t,{A:()=>u});var n,i=r(5482),s=r(69540),l=r(25482),a=r(91429),o=r(99157);let u=n=class extends((0,s.OU)(l.o)){constructor(e){super(e),this.steps=[]}getInverse(){const e=new n;for(let t=this.steps.length-1;t>=0;t--){const r=this.steps[t];e.steps.push(r.getInverse())}return e}};(0,i.Cg)([(0,a.MZ)({type:[o.A],nonNullable:!0,json:{name:"geoTransforms"}})],u.prototype,"steps",void 0),u=n=(0,i.Cg)([(0,a.$K)("esri.geometry.operators.support.GeographicTransformation")],u)},99157(e,t,r){r.d(t,{A:()=>o});var n,i=r(5482),s=r(69540),l=r(25482),a=r(91429);let o=n=class extends((0,s.OU)(l.o)){constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new n({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,i.Cg)([(0,a.MZ)({json:{name:"transformForward",read:e=>!e,write:(e,t,r)=>{t[r]=!e}}})],o.prototype,"isInverse",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],o.prototype,"wkt",void 0),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],o.prototype,"wkid",void 0),o=n=(0,i.Cg)([(0,a.$K)("esri.geometry.operators.support.GeographicTransformationStep")],o)},9762(e,t,r){r.r(t),r.d(t,{projectBuffer:()=>i});var n=r(49208);function i(e,t,r,i,s,l,a=Math.floor(e.length/3)){const o=(0,n.jd)(t,s);if(null==o)return!1;if(o===n.pO){if(e===i&&r===l)return!0;const t=r+3*a;for(let n=r,s=l;n<t;n++,s++)i[s]=e[n]??0;return!0}const u=r+3*a;for(let t=r,n=l;t<u;t+=3,n+=3)o(e,t,i,n);return!0}},49208(e,t,r){r.d(t,{Tp:()=>h,jd:()=>c,pO:()=>p,w5:()=>u});var n=r(34727),i=r(86211),s=r(73941),l=r(79258),a=r(34403),o=r(21325);const u={2:{5:p,7:null,9:null,10:p,1:C,6:null,8:null,0:null,3:g,11:y,2:p,4:S},5:{5:p,7:null,9:null,10:p,1:C,6:null,8:null,0:null,3:g,11:y,2:p,4:S},7:{5:null,7:p,9:null,10:p,1:null,6:M,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:p,10:p,1:null,6:null,8:w,0:null,3:null,11:null,2:null,4:null},3:{5:f,7:null,9:null,10:f,1:function(e,t,r,n){const i=e[t]/k,s=O-2*Math.atan(Math.exp(-e[t+1]/k)),l=k+(e[t+2]??0),a=Math.cos(s)*l;r[n]=Math.cos(i)*a,r[n+1]=Math.sin(i)*a,r[n+2]=Math.sin(s)*l},6:null,8:null,0:null,3:p,11:function(e,t,r,n){f(e,t,r,n),y(r,n,r,n)},2:f,4:function(e,t,r,n){f(e,t,r,n),S(r,n,r,n)}},4:{5:R,7:null,9:null,10:R,1:function(e,t,r,n){R(e,t,r,n),C(r,n,r,n)},6:null,8:null,0:null,3:function(e,t,r,n){R(e,t,r,n),g(r,n,r,n)},11:function(e,t,r,n){R(e,t,r,n),y(r,n,r,n)},2:R,4:p},1:{5:b,7:null,9:null,10:b,1:p,6:null,8:null,0:null,3:function(e,t,r,n){b(e,t,r,n),g(r,n,r,n)},11:function(e,t,r,n){b(e,t,r,n),y(r,n,r,n)},2:b,4:function(e,t,r,n){b(e,t,r,n),S(r,n,r,n)}},6:{5:null,7:A,9:null,10:A,1:null,6:p,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:I,10:I,1:null,6:null,8:p,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:p,3:null,11:null,2:null,4:null},10:{5:p,7:p,9:p,10:p,1:C,6:M,8:w,0:null,3:g,11:y,2:p,4:S},11:{5:m,7:null,9:null,10:m,1:function(e,t,r,n){m(e,t,r,n),C(r,n,r,n)},6:null,8:null,0:null,3:function(e,t,r,n){m(e,t,r,n),g(r,n,r,n)},11:p,2:m,4:function(e,t,r,n){m(e,t,r,n),S(r,n,r,n)}}};function c(e,t){return h(e,t)?.projector}function h(e,t){if(null==e||null==t)return null;if(T.source.spatialReference===e&&T.dest.spatialReference===t)return T;const r=d(e,T.source),n=d(t,T.dest);return 0===r&&0===n?(0,o.aI)(e,t)?T.projector=p:T.projector=null:T.projector=u[r][n],T}function d(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,i.GA)(e,1)),(0,s.jA)(e)?t.spatialReferenceId=1:(0,o.oT)(e)?t.spatialReferenceId=2:(0,o.K8)(e)?t.spatialReferenceId=3:(0,o.r1)(e)?t.spatialReferenceId=11:e.wkt===s.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===s.FY.wkt?t.spatialReferenceId=6:e.wkt===s.LJ.wkt?t.spatialReferenceId=8:(0,s.q8)(e)?t.spatialReferenceId=7:(0,s.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function p(e,t,r,n){e!==r&&(r[n++]=e[t++],r[n++]=e[t++],r[n]=e[t]??0)}function f(e,t,r,n){r[n]=P*(e[t]/k),r[n+1]=P*(O-2*Math.atan(Math.exp(-e[t+1]/k))),r[n+2]=e[t+2]??0}function g(e,t,r,i){!function(e,t,r,i,s){const l=.4999999*Math.PI,a=(0,n.qE)(L*e[t+1],-l,l),o=Math.sin(a);r[i++]=L*e[t]*s.radius,r[i++]=s.halfSemiMajorAxis*Math.log((1+o)/(1-o)),r[i]=e[t+2]??0}(e,t,r,i,l.$O)}function y(e,t,r,n){r[n]=e[t]*x,r[n+1]=e[t+1]*x,r[n+2]=e[t+2]??0}function m(e,t,r,n){r[n]=e[t]*E,r[n+1]=e[t+1]*E,r[n+2]=e[t+2]??0}function v(e,t,r,n,i){const s=i+(e[t+2]??0),l=L*e[t],a=L*e[t+1],o=Math.cos(a)*s;r[n]=Math.cos(l)*o,r[n+1]=Math.sin(l)*o,r[n+2]=Math.sin(a)*s}function w(e,t,r,n){v(e,t,r,n,l.Sw.radius)}function M(e,t,r,n){v(e,t,r,n,l.sH.radius)}function C(e,t,r,n){v(e,t,r,n,l.$O.radius)}function _(e,t,r,i,s){const l=e[t],a=e[t+1],o=e[t+2]??0,u=Math.sqrt(l*l+a*a+o*o),c=(0,n.YN)(o/(0===u?1:u)),h=Math.atan2(a,l);r[i++]=P*h,r[i++]=P*c,r[i]=u-s}function I(e,t,r,n){_(e,t,r,n,l.Sw.radius)}function A(e,t,r,n){_(e,t,r,n,l.sH.radius)}function b(e,t,r,n){_(e,t,r,n,l.$O.radius)}function S(e,t,r,n){!function(e,t,r,n,i){const s=L*e[t],l=L*e[t+1],a=e[t+2]??0,o=Math.sin(l),u=Math.cos(l),c=i.radius/Math.sqrt(1-i.eccentricitySquared*o*o);r[n++]=(c+a)*u*Math.cos(s),r[n++]=(c+a)*u*Math.sin(s),r[n++]=(c*(1-i.eccentricitySquared)+a)*o}(e,t,r,n,l.$O)}function R(e,t,r,n){const i=a.TP,s=e[t],o=e[t+1],u=e[t+2]??0;let c,h,d,p,f,g,y,m,v,w,M,C,_,I,A,b,S,R,T,L,O;c=Math.abs(u),h=s*s+o*o,d=Math.sqrt(h),p=h+u*u,f=Math.sqrt(p),L=Math.atan2(o,s),g=u*u/p,y=h/p,I=i.a2/f,A=i.a3-i.a4/f,y>.3?(m=c/f*(1+y*(i.a1+I+g*A)/f),T=Math.asin(m),w=m*m,v=Math.sqrt(1-w)):(v=d/f*(1-g*(i.a5-I-y*A)/f),T=Math.acos(v),w=1-v*v,m=Math.sqrt(w)),M=1-l.$O.eccentricitySquared*w,C=l.$O.radius/Math.sqrt(M),_=i.a6*C,I=d-C*v,A=c-_*m,S=v*I+m*A,b=v*A-m*I,R=b/(_/M+S),T+=R,O=S+b*R/2,u<0&&(T=-T),r[n++]=P*L,r[n++]=P*T,r[n]=O}const T={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:p},L=(0,n.kU)(1),P=(0,n.KJ)(1),O=.5*Math.PI,k=l.$O.radius,x=k*Math.PI/180,E=180/(k*Math.PI)},91218(e,t,r){r.r(t),r.d(t,{canProjectWithoutEngine:()=>F,initializeProjection:()=>z,isEqualBaseGCS:()=>K,isLoaded:()=>k,isLoadedOrLoad:()=>x,isLoadedOrLoadFor:()=>E,load:()=>D,project:()=>j,projectAsync:()=>B,projectExtent:()=>ie,projectMany:()=>Z,projectMultipoint:()=>Q,projectOrLoad:()=>$,projectOrLoadMany:()=>V,projectPoint:()=>W,projectPolygon:()=>re,projectPolyline:()=>ee,projectWithoutEngine:()=>Y,requiresLoad:()=>U,test:()=>N,tryProject:()=>H,unload:()=>q});var n=r(49186),i=r(17676),s=r(62788),l=r(95488),a=r(51850),o=r(21276),u=r(73941),c=r(5443),h=r(91075),d=r(48526),p=r(86738),f=r(39829),g=r(82799),y=r(16930),m=r(98764),v=r(159),w=r(9762),M=r(49208);function C(e,t,r,n,i,s){return _[0]=e,_[1]=t,_[2]=r,(0,w.projectBuffer)(_,n,0,i,s,0)}const _=(0,a.vt)();var I=r(60408),A=r(21325),b=r(52006);let S=null,R=null,T=null,L=null,P={};const O=new l.I;function k(){return!!(R?.isLoaded()&&T?.isLoaded()&&L?.isLoaded())}function x(){return!!k()||((0,s.gc)(O),D(),!1)}function E(e,t){return!e||!t||F(e,t)||x()}function U(e,t){return!F(e,t)&&!k()}async function D(e){null==S&&(S=Promise.all([r.e(3276).then(r.bind(r,83276)).then(e=>(R=e,R.load())),r.e(8377).then(r.bind(r,8377)).then(e=>(T=e,T.load())),r.e(2158).then(r.bind(r,12158)).then(e=>(L=e,L.load()))])),await S,(0,i.Te)(e),O.notify()}function j(e,t,r){return Array.isArray(e)?0===e.length?[]:((0,o.H)(e),Z(e,e[0].spatialReference,t,r)):((0,o.f)(e),Z([e],e.spatialReference,t,r)[0])}function Z(e,t,r,n){if(null==t||null==r)return e;if(F(t,r,n))return e.map(e=>Y(e,t,r));if(null==n?.geographicTransformation&&(0,u.jA)(t))return Z(e.map(e=>Y(e,t,y.A.WGS84)),y.A.WGS84,r,{zConversionDisabled:n?.zConversionDisabled});if(null==n?.geographicTransformation&&(0,u.jA)(r))return Z(e,t,y.A.WGS84).map(e=>Y(e,y.A.WGS84,r));if(!k())throw new G;if(!n?.geographicTransformation)if(n?.extendedParams)n={...n,geographicTransformation:L.getTransformation(t,r,n.areaOfInterestExtent)||new v.A};else if(!n?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,r);let i=P[e];i||(i=L.getTransformation(t,r)||new v.A,P[e]=i),n={geographicTransformation:i,zConversionDisabled:n?.zConversionDisabled}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof h.A?R.executeMany(e,r,n):T.executeMany(e,r,n)}function H(e,t,r){try{return j(e,t,r)}catch(e){return null}}function $(e,t){const r=V([e],t);return null!=r.pending?{pending:r.pending,geometry:null}:null!=r.geometries?{pending:null,geometry:r.geometries[0]}:{pending:null,geometry:null}}function V(e,t,r){if(!k())for(const r of e)if(null!=r&&!(0,A.aI)(r.spatialReference,t)&&(0,A.fn)(r.spatialReference)&&(0,A.fn)(t)&&!F(r.spatialReference,t))return(0,s.gc)(O),{pending:D(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,A.aI)(e.spatialReference,t)?e:(0,A.fn)(e.spatialReference)&&(0,A.fn)(t)?j(e,t,r):null)}}class G extends n.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function q(){S=null,R=null,T=null,L=null,P={}}const N={get loadPromise(){return S}};async function B(e,t,r){if((0,i.Te)(r),!e)return e;const n=V(Array.isArray(e)?e:[e],t,r);if(n.pending)return await n.pending,(0,i.Te)(r),B(e,t,r);const s=n.geometries??[];return Array.isArray(e)?s:s[0]}function F(e,t,r){return!(r?.areaOfInterestExtent||r?.extendedParams||r?.geographicTransformation)&&(!!(0,A.aI)(e,t)||(0,A.fn)(e)&&(0,A.fn)(t)&&!!(0,M.jd)(e,t))}function K(e,t){if((0,A.aI)(e,t))return!0;if(!(0,A.fn)(e)||!(0,A.fn)(t))return!1;const r=(0,A.oT)(e)||(0,A.K8)(e)||(0,A.x1)(e),n=(0,A.oT)(t)||(0,A.K8)(t)||(0,A.x1)(t);return r&&n}async function z(e,t,r,n){if(k())return(0,i.NO)(n);if(Array.isArray(e)){for(const{source:t,dest:r,options:i}of e)if(t&&r&&!F(t,r,i))return D(n)}else if(e&&t&&!F(e,t,r))return D(n);return(0,i.NO)(n)}function Y(e,t,r){return e?(0,I.fT)(e)?J(e,t,new p.A,r,0):(0,I.ZC)(e)?se(e,t,new c.A,r,0):(0,I.Bi)(e)?ne(e,t,new f.A,r,0):(0,I.Rg)(e)?te(e,t,new g.A,r,0):(0,I.U9)(e)?X(e,t,new d.A,r,0):null:null}function W(e,t,r=t.spatialReference,n=0){return null!=r&&null!=e.spatialReference&&null!=J(e,e.spatialReference,t,r,n)}function J(e,t,r,n,i){ue[0]=e.x,ue[1]=e.y;const s=e.z;return ue[2]=void 0!==s?s:i,(0,w.projectBuffer)(ue,t,0,ue,n,0)?(r.x=ue[0],r.y=ue[1],r.spatialReference=n,void 0!==s||(0,u.xP)(n)?(r.z=ue[2],r.hasZ=!0):(r.z=void 0,r.hasZ=!1),void 0===e.m?(r.m=void 0,r.hasM=!1):(r.m=e.m,r.hasM=!0),r):null}function Q(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=X(e,e.spatialReference,t,r,n)}function X(e,t,r,n,i){const{points:s,hasZ:l,hasM:a}=e,o=[],u=s.length,c=[];for(const e of s)c.push(e[0],e[1],l?e[2]:i);if(!(0,w.projectBuffer)(c,t,0,c,n,0,u))return null;const h=oe(l,n);for(let e=0;e<u;++e){const t=3*e,r=c[t],n=c[t+1];h&&a?o.push([r,n,c[t+2],s[e][3]]):h?o.push([r,n,c[t+2]]):a?o.push([r,n,s[e][2]]):o.push([r,n])}return r.points=o,r.spatialReference=n,r.hasZ=l,r.hasM=a,r}function ee(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=te(e,e.spatialReference,t,r,n)}function te(e,t,r,n,i){const{curvePaths:s,paths:l,hasZ:a,hasM:o}=e;if(!(s?ae(s,a??!1,o??!1,t,r.curvePaths=[],n,i):le(l,a??!1,o??!1,t,r.paths,n,i)))return null;const u=oe(a,n);return r.spatialReference=n,r.hasZ=u,r.hasM=o,r}function re(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=ne(e,e.spatialReference,t,r,n)}function ne(e,t,r,n,i){const{curveRings:s,rings:l,hasZ:a,hasM:o}=e;return(s?ae(s,a??!1,o??!1,t,r.curveRings=[],n,i):le(l,a??!1,o??!1,t,r.rings,n,i))?(r.spatialReference=n,r.hasZ=oe(a,n),r.hasM=o,r):null}function ie(e,t,r=t.spatialReference,n=0){return null!=e.spatialReference&&null!=r&&null!=se(e,e.spatialReference,t,r,n)}function se(e,t,r,n,i){const{xmin:s,ymin:l,xmax:a,ymax:o,hasZ:u,hasM:c}=e;if(!C(s,l,u?e.zmin:i,t,ue,n))return null;const h=oe(u,n);return r.xmin=ue[0],r.ymin=ue[1],h&&(r.zmin=ue[2]),C(a,o,u?e.zmax:i,t,ue,n)?(r.xmax=ue[0],r.ymax=ue[1],h&&(r.zmax=ue[2]),c&&(r.mmin=e.mmin,r.mmax=e.mmax),r.spatialReference=n,r):null}function le(e,t,r,n,i,s,l=0){const a=new Array;for(const r of e)for(const e of r)a.push(e[0],e[1],t?e[2]:l);if(!(0,w.projectBuffer)(a,n,0,a,s,0))return!1;let o=0;i.length=0;const u=t?3:2,c=oe(t,s);for(const t of e){const e=new Array;for(const n of t){const t=a.slice(o,o+=3);c||t.pop(),r&&t.push(n[u]),e.push(t)}i.push(e)}return!0}function ae(e,t,r,n,i,s,l=0){const a=new Array;for(const r of e)for(const e of r){if((0,b.FG)(e))return!1;if((0,b.aO)(e)){const[r,n]=e.c;a.push(r[0],r[1],t?r[2]:l,n[0],n[1],l);continue}if((0,b.n1)(e)){const[r,n,i]=e.b;a.push(r[0],r[1],t?r[2]:l,n[0],n[1],l,i[0],i[1],l);continue}const r=e;a.push(r[0],r[1],t?r[2]:l)}if(!(0,w.projectBuffer)(a,n,0,a,s,0))return!1;let o=0;i.length=0;const u=t?3:2,c=oe(t,s);for(const t of e){const e=new Array;for(const n of t){const t=a.slice(o,o+=3);if(c||t.pop(),r&&t.push((0,b.yP)(n)[u]),(0,b.FG)(n))return!1;if((0,b.aO)(n)){const r=a[o++],n=a[o++];++o,e.push({c:[t,[r,n]]});continue}if((0,b.n1)(n)){const r=a[o++],n=a[o++];++o;const i=a[o++],s=a[o++];++o,e.push({b:[t,[r,n],[i,s]]});continue}e.push(t)}i.push(e)}return!0}function oe(e,t){return e||(0,u.xP)(t)||(0,A.aI)(t,m.Y0)}const ue=(0,a.vt)()},98764(e,t,r){r.d(t,{GD:()=>l,Y0:()=>u,lO:()=>c});var n=r(73941),i=r(16930),s=r(21325);const l=new i.A(n.fv),a=new i.A(n.FY),o=new i.A(n.LJ),u=new i.A(n.Ro);function c(e){const t=h.get(e);if(t)return t;let r=l;if(e)if(e===a)r=a;else if(e===o)r=o;else{const t=e.wkid,n=e.latestWkid;if(null!=t||null!=n)(0,s.tl)(t)||(0,s.tl)(n)?r=a:((0,s.ZL)(t)||(0,s.ZL)(n))&&(r=o);else{const t=e.wkt2??e.wkt;if(t){const e=t.toUpperCase();e===d?r=a:e===p&&(r=o)}}}return h.set(e,r),r}const h=new Map,d=a.wkt.toUpperCase(),p=o.wkt.toUpperCase()},34403(e,t,r){r.d(t,{TP:()=>l});var n=r(79258);Math.PI;const i=n.$O.radius,s=n.$O.eccentricitySquared,l={a1:i*s,a2:i*s*i*s,a3:i*s*s/2,a4:i*s*i*s*2.5,a5:i*s+i*s*s/2,a6:1-s};n.$O.radius,n.$O.flattening,n.Sw.radius,n.Sw.flattening,n.sH.radius,n.sH.flattening,n.sH.radius},38732(e,t,r){r.r(t),r.d(t,{default:()=>b});var n=r(5482),i=r(11254),s=r(49186),l=r(97768),a=r(25728),o=r(17676),u=r(84952),c=r(91429),h=r(54239),d=r(4146),p=r(89186),f=r(18768),g=r(34287),y=r(8303),m=r(10873),v=r(87378),w=r(35982);class M extends w.B{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,r){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},r):Promise.resolve(null)}release(){--this.ref<=0&&(C.forEach((e,t)=>{e===this&&C.delete(t)}),this.destroy())}}const C=new Map;var _=r(36005);let I=class extends((0,p.f)((0,f.b)((0,g.q)((0,y.A)((0,a.M)(d.A)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=C.get(e);return t||(null!=e?(t=new M(t=>e.immediate.schedule(t)),C.set(e,t)):(t=new M,C.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,l.Gz)(this._lercDecoder)}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());return r?{operations:{supportsTileMap:r.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let r=t.currentVersion;return r||(r=9.3),r}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new s.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(o.QP).then(()=>this._fetchImageService(t))),Promise.resolve(this)}async fetchTile(e,t,r,n){const l=n?.signal,a={responseType:"array-buffer",signal:l,useQueue:n?.useQueue,priority:n?.priority},o={noDataValue:n?.noDataValue,returnFileInfo:!0};await this.load(),await this._fetchTileAvailability(e,t,r,n);const u=await(0,i.A)(this.getTileUrl(e,t,r),a),c=await this._lercDecoder.decode(u.data,o,l);if(!c)throw new s.A("elevation-layer:tile-decode-failed","Failed to decode elevation tile data.");return new v.A({values:c.pixelData,width:c.width,height:c.height,noDataValue:c.noDataValue})}getTileUrl(e,t,r){const n=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,i=(0,u.x0)({...this.parsedUrl.query,blankTile:!n&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${r}${i?"?"+i:""}`}async queryElevation(e,t){const{query:n}=await r.e(91).then(r.bind(r,90091));return(0,o.Te)(t),n(this,e,t)}async createElevationSampler(e,t){const{createSampler:n}=await r.e(91).then(r.bind(r,90091));return(0,o.Te)(t),n(this,e,t)}_fetchTileAvailability(e,t,r,n){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,r,n):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},r=await(0,i.A)(this.parsedUrl.path,t);r.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=r.data,this.read(r.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[A]}};(0,n.Cg)([(0,c.MZ)({readOnly:!0})],I.prototype,"capabilities",void 0),(0,n.Cg)([(0,_.w)("service","capabilities",["capabilities"])],I.prototype,"readCapabilities",null),(0,n.Cg)([(0,c.MZ)({json:{read:{source:"copyrightText"}}})],I.prototype,"copyright",void 0),(0,n.Cg)([(0,c.MZ)({readOnly:!0,type:h.A})],I.prototype,"heightModelInfo",void 0),(0,n.Cg)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],I.prototype,"path",void 0),(0,n.Cg)([(0,c.MZ)({type:["show","hide"]})],I.prototype,"listMode",void 0),(0,n.Cg)([(0,c.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})],I.prototype,"minScale",void 0),(0,n.Cg)([(0,c.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})],I.prototype,"maxScale",void 0),(0,n.Cg)([(0,c.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],I.prototype,"opacity",void 0),(0,n.Cg)([(0,c.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],I.prototype,"operationalLayerType",void 0),(0,n.Cg)([(0,c.MZ)()],I.prototype,"sourceJSON",void 0),(0,n.Cg)([(0,c.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],I.prototype,"type",void 0),(0,n.Cg)([(0,c.MZ)(m.OZ)],I.prototype,"url",void 0),(0,n.Cg)([(0,c.MZ)()],I.prototype,"version",void 0),(0,n.Cg)([(0,_.w)("version",["currentVersion"])],I.prototype,"readVersion",null),I=(0,n.Cg)([(0,c.$K)("esri.layers.ElevationLayer")],I);const A=Symbol("default-fetch-tile");I.prototype.fetchTile[A]=!0;const b=I},89186(e,t,r){r.d(t,{f:()=>c});var n=r(5482),i=r(91429),s=r(16930),l=r(87045),a=r(65509),o=r(25943),u=r(36005);const c=e=>{const t=e;let r=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,r){const n=t.capabilities?.toLowerCase().includes("tilemap");let{minLOD:i,maxLOD:s,minScale:u,maxScale:c}=t;if(null==i&&null==s&&(0!==u||0!==c)){const e=e=>Math.round(1e4*e)/1e4;u=e(u||t.tileInfo.lods[0].scale),c=e(c||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(const r of t.tileInfo.lods){const t=e(r.scale);i=t>=u?r.level:i,s=t>=c?r.level:s}}if(n)return new o.d({layer:this,minLOD:i,maxLOD:s});if(t.tileInfo){const e=new l.A;return e.read(t.tileInfo,r),new a.A(e,i,s)}return null}};return(0,n.Cg)([(0,i.MZ)({json:{read:{source:"copyrightText"}}})],r.prototype,"copyright",void 0),(0,n.Cg)([(0,i.MZ)()],r.prototype,"minScale",void 0),(0,n.Cg)([(0,u.w)("service","minScale")],r.prototype,"readMinScale",null),(0,n.Cg)([(0,i.MZ)()],r.prototype,"maxScale",void 0),(0,n.Cg)([(0,u.w)("service","maxScale")],r.prototype,"readMaxScale",null),(0,n.Cg)([(0,i.MZ)({type:s.A})],r.prototype,"spatialReference",void 0),(0,n.Cg)([(0,i.MZ)({readOnly:!0})],r.prototype,"supportsBlankTile",null),(0,n.Cg)([(0,i.MZ)({type:l.A})],r.prototype,"tileInfo",void 0),(0,n.Cg)([(0,i.MZ)()],r.prototype,"tilemapCache",void 0),(0,n.Cg)([(0,u.w)("service","tilemapCache",["capabilities","tileInfo"])],r.prototype,"readTilemapCache",null),(0,n.Cg)([(0,i.MZ)()],r.prototype,"version",void 0),r=(0,n.Cg)([(0,i.$K)("esri.layers.mixins.ArcGISCachedService")],r),r}},18768(e,t,r){r.d(t,{b:()=>a});var n=r(5482),i=r(53966),s=r(91429),l=r(60694);const a=e=>{const t=e;let r=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,l.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,l.Jf)(e,i.A.getLogger(this)))}};return(0,n.Cg)([(0,s.MZ)()],r.prototype,"title",null),(0,n.Cg)([(0,s.MZ)({type:String})],r.prototype,"url",null),r=(0,n.Cg)([(0,s.$K)("esri.layers.mixins.ArcGISService")],r),r}},8303(e,t,r){r.d(t,{A:()=>_});var n=r(5482),i=r(92602),s=r(70333),l=r(11254),a=r(60999),o=r(49186),u=r(36563),c=r(53966),h=r(97768),d=r(17676),p=r(84952),f=r(91429),g=r(77548),y=r(20655),m=r(80812),v=r(41318),w=r(10407),M=r(36005),C=r(43937);const _=e=>{const t=e;let _=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,h.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new m.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:n}=await r.e(1204).then(r.bind(r,41204));return(0,d.Te)(t),await n({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||c.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e){if(!this.loaded||!this.portalItem?.id)return!1;try{const{reload:t}=await r.e(1204).then(r.bind(r,41204)),n=new AbortController,i=(0,u.rE)(n);return this.addHandles(i,"reloadFromPortal"),await t({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},{signal:n.signal})}catch(e){throw(0,d.zf)(e)||c.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{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(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:n},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",n),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const n=!s.id?.findCredential(this.url),i=e===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,n);let l,a;if(i)l=r.portal.url;else try{l=await(0,g.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!l||!(0,p.b8)(l,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${l}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const o=!0,u=!1,c=!1;if(!a)return{features:{edit:o,fullEdit:u},content:{updateItem:c}};try{if(i?await r.reload():(r=new m.default({id:e,portal:{url:l}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,n)}catch(e){(0,d.QP)(e)}return{features:{edit:o,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const r=(0,w.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const n=`${r.owningSystemUrl}/sharing/rest`,i=y.A.getDefault();if(i&&i.loaded&&(0,p.S8)(i.restUrl)===(0,p.S8)(n))return i.user;const o=`${n}/community/self`,u=null!=e?e.signal:null,c=await(0,a.Ke)((0,l.A)(o,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?v.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,n=this.portalItem?.id&&(this.portalItem.portal||y.A.getDefault());return r&&n&&!(0,p.ut)(n.restUrl,r.restUrl)?(t.messages&&t.messages.push(new o.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,n.Cg)([(0,f.MZ)({type:m.default})],_.prototype,"portalItem",null),(0,n.Cg)([(0,M.w)("web-document","portalItem",["itemId"])],_.prototype,"readPortalItem",null),(0,n.Cg)([(0,C.K)("web-document","portalItem",{itemId:{type:String}})],_.prototype,"writePortalItem",null),(0,n.Cg)([(0,f.MZ)({clonable:!1})],_.prototype,"resourceReferences",void 0),(0,n.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],_.prototype,"userHasEditingPrivileges",void 0),(0,n.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],_.prototype,"userHasFullEditingPrivileges",void 0),(0,n.Cg)([(0,f.MZ)({type:Boolean,readOnly:!0})],_.prototype,"userHasUpdateItemPrivileges",void 0),_=(0,n.Cg)([(0,f.$K)("esri.layers.mixins.PortalLayer")],_),_},I={credential:null,user:null}},87378(e,t,r){r.d(t,{A:()=>a});var n,i=r(34275),s=r(56507);const l=Symbol("ElevationTileDataClass");class a{static{n=l}constructor({values:e,width:t,height:r,noDataValue:s}){this[n]=!0,this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,this.values=(0,i.vZ)(e)?e:new Float32Array(e),this.width=t,this.height=r,this.noDataValue=s}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get usedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let r=1/0,n=-1/0,i=!0;for(const s of t)s===e?this._hasNoDataValues=!0:(r=s<r?s:r,n=s>n?s:n,i=!1);i?(this._minValue=0,this._maxValue=0):(this._minValue=r,this._maxValue=n>-3e38?n:0)}static{this.from=(0,s.qf)(a)}}},65509(e,t,r){r.d(t,{A:()=>s});var n=r(49186),i=r(17676);class s{constructor(e,t=0,r=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=r,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(r)||(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,r){const n=this.tileInfo?.lodAt(e);return!n||e<this.minLOD||e>this.maxLOD?"unavailable":n.cols&&n.rows?r>=n.cols[0]&&r<=n.cols[1]&&t>=n.rows[0]&&t<=n.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,r,s){await(0,i.NO)(s);const l=this.getAvailability(e,t,r);if("unavailable"===l)throw new n.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:r});return l}async fetchAvailabilityUpsample(e,t,r,n,s){await(0,i.NO)(s),n.level=e,n.row=t,n.col=r;const l=this.tileInfo;return l.updateTileInfo(n),this.fetchAvailability(e,t,r,s).catch(e=>{if((0,i.zf)(e))throw e;if(l.upsampleTile(n))return this.fetchAvailabilityUpsample(n.level,n.row,n.col,n,s);throw e})}}},10407(e,t,r){r.d(t,{It:()=>p,LG:()=>l,OM:()=>u,Sm:()=>c,Y:()=>a,bK:()=>o,mm:()=>d,sQ:()=>h});var n=r(91218),i=r(16930),s=r(28735);function l(e,t){if(!a(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function o(e){return a(e,d.HOSTED_SERVICE)}function u(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function c(e,t,r){r?l(e,t):u(e,t)}async function h(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.ci)(e);const r=i.A.WGS84;return await(0,n.initializeProjection)(t,r),(0,n.project)(e,r)}(r)}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){const{portal:t,isOrgItem:r,itemControl:n}=e,i=t.user?.privileges;let s=!i||i.includes("features:user:edit"),l=!!r&&!!i?.includes("features:user:fullEdit");const a="update"===n||"admin"===n;return a?l=s=!0:l&&(s=!0),{features:{edit:s,fullEdit:l},content:{updateItem:a}}}},78553(e,t,r){r.d(t,{D:()=>s,p:()=>i});var n=r(56507);function i(e){const t=(0,n.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function s(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);
|