"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9932],{16453:(e,t,r)=>{r.d(t,{R:()=>v,w:()=>b});var i=r(43697),s=r(18855),n=r(70586),o=r(22974),a=r(31263);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.kk),this._values=new Map}clone(e){const t=new l,r=this._originStores[0];r&&r.forEach(((e,r)=>{t.set(r,(0,o.d9)(e),0)}));for(let r=2;r<a.kk;r++){const i=this._originStores[r];i&&i.forEach(((i,s)=>{e&&e.has(s)||t.set(s,(0,o.d9)(i),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=6){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||(0,n.j0)(this._propertyOriginMap.get(e))<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=6){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r&&r.get(e),s=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),s!==i}originOf(e){return this._propertyOriginMap.get(e)||0}forEach(e){this._values.forEach(e)}}var c=r(50549),h=r(1153),u=r(52525);const d=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,n.j0)((0,h.vw)(this)),r=t.metadatas,i=t.store,s=new l;t.store=s,i.keys().forEach((e=>{s.set(e,i.get(e),0)})),Object.keys(r).forEach((e=>{t.internalGet(e)&&s.set(e,t.internalGet(e),0)}))}read(e,t){(0,c.ij)(this,e,t)}getAtOrigin(e,t){const r=p(this),i=(0,a.M9)(t);if("string"==typeof e)return r.get(e,i);const s={};return e.forEach((e=>{s[e]=r.get(e,i)})),s}originOf(e){return(0,a.x3)(this.originIdOf(e))}originIdOf(e){return p(this).originOf(e)}revert(e,t){const r=p(this),i=(0,a.M9)(t),s=(0,h.vw)(this);let n;n="string"==typeof e?"*"===e?r.keys(i):[e]:e,n.forEach((e=>{s.invalidate(e),r.revert(e,i),s.commit(e)}))}};return t=(0,i._)([(0,u.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function p(e){return(0,h.vw)(e).store}let y=class extends(d(s.Z)){};y=(0,i._)([(0,u.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],y);var f=r(76169);const g=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return m(this).delete(e,(0,a.M9)(t))}write(e={},t){return(0,f.cW)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,h.vw)(this).setAtOrigin(e,t,(0,a.M9)(r))}removeOrigin(e){const t=m(this),r=(0,a.M9)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),6)}updateOrigin(e,t){const r=m(this),i=(0,a.M9)(t),s=this.get(e);for(let t=i+1;t<a.kk;++t)r.delete(e,t);r.set(e,s,i)}toJSON(e){return this.write({},e)}};return t=(0,i._)([(0,u.j)("esri.core.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function m(e){return(0,h.vw)(e).store}const v=e=>{let t=class extends(g(d(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,u.j)("esri.core.MultiOriginJSONSupport")],t),t};let b=class extends(v(s.Z)){};b=(0,i._)([(0,u.j)("esri.core.MultiOriginJSONSupport")],b)},43050:(e,t,r)=>{r.d(t,{S1:()=>o,on:()=>u,OY:()=>h,cm:()=>l,N1:()=>a,LR:()=>c,tH:()=>d});var i=r(91460),s=(r(22974),r(95330));const n=/\?(\.|$)/g;function o(e,t,r,i){const s=Array.isArray(t)?t:t.indexOf(",")>-1?t.split(","):[t],o=function(e,t,r,i){return e.watch(t,r,i)}(e,t,r,i);for(const t of s){const i=t.trim().replace(n,"$1"),s=e.get(i);r.call(e,s,s,i,e)}return o}function a(e,t,r,i){return d(e,t,p,r,i)}function l(e,t,r,i){return d(e,t,y,r,i)}function c(e,t,r,i){return d(e,t,f,r,i)}function h(e,t,r,i){return d(e,t,g,r,i)}function u(e,t,r,s,n,a,l){const c={};function h(t){const i=c[t];i&&(a&&a(i.target,t,e,r),i.handle.remove(),delete c[t])}const u=o(e,t,((t,o,a)=>{h(a),(0,i.vT)(t)&&(c[a]={handle:(0,i.on)(t,r,s),target:t},n&&n(t,a,e,r))}),l);return{remove(){u.remove();for(const e in c)h(e)}}}function d(e,t,r,i,n){const o="function"==typeof i?i:null,a="object"==typeof i?i:null;"boolean"==typeof i&&(n=i);let l,c=!1;function h(){l&&(l.remove(),l=null)}const u=(0,s.dD)();(0,s.fu)(a,(()=>{h(),u.reject((0,s.zE)())}));const d={then:u.promise.then.bind(u.promise),catch:u.promise.catch.bind(u.promise),remove:h};return Object.freeze(d),l=function(e,t,r,i,s){const n=e.watch(t,((t,s,n,o)=>{r&&!r(t)||null==i||i.call(e,t,s,n,o)}),s);if(Array.isArray(t))for(const s of t){const n=e.get(s);r&&r(n)&&(null==i||i.call(e,n,n,t,e))}else{const s=e.get(t);r&&r(s)&&(null==i||i.call(e,s,s,t,e))}return n}(e,t,r,((t,r,i,s)=>{c=!0,h(),o&&o.call(e,t,r,i,s),u.resolve({value:t,oldValue:r,propertyName:i,target:s})}),n),c&&h(),d}function p(e){return!!e}function y(e){return!e}function f(e){return!0===e}function g(e){return!1===e}},25045:(e,t,r)=>{r.r(t),r.d(t,{default:()=>v});var i=r(40330),s=r(20102),n=r(91460),o=r(70586),a=r(95330),l=r(94362),c=r(17202);const h={statsWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(9928),r.e(7267)]).then(r.bind(r,37267)),geometryEngineWorker:()=>Promise.all([r.e(5837),r.e(8227)]).then(r.bind(r,48227)),CSVSourceWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(9928),r.e(2894),r.e(1534),r.e(2305),r.e(3676),r.e(4324),r.e(9237)]).then(r.bind(r,27793)),EdgeProcessingWorker:()=>Promise.all([r.e(6481),r.e(8936)]).then(r.bind(r,18936)),ElevationSamplerWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(9928),r.e(2894),r.e(6481),r.e(3675),r.e(5413)]).then(r.bind(r,61787)),FeatureServiceSnappingSourceWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(9928),r.e(6412),r.e(2894),r.e(1534),r.e(3485),r.e(2305),r.e(3676),r.e(4324),r.e(991)]).then(r.bind(r,41650)),GeoJSONSourceWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(9928),r.e(2894),r.e(1534),r.e(2305),r.e(3676),r.e(4324),r.e(8479),r.e(7845)]).then(r.bind(r,97845)),LercWorker:()=>r.e(3027).then(r.bind(r,23027)),MemorySourceWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(9928),r.e(2894),r.e(1534),r.e(2305),r.e(3676),r.e(4324),r.e(8479),r.e(639)]).then(r.bind(r,30639)),PBFDecoderWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(9928),r.e(3676),r.e(7618)]).then(r.bind(r,61916)),Pipeline:()=>Promise.all([r.e(8778),r.e(6570),r.e(9928),r.e(6412),r.e(2894),r.e(1534),r.e(3485),r.e(2305),r.e(3676),r.e(4324),r.e(6312),r.e(3142)]).then(r.bind(r,53142)),PointCloudWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(9928),r.e(2894),r.e(9294),r.e(6883)]).then(r.bind(r,16583)),RasterWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(9928),r.e(7303),r.e(3594)]).then(r.bind(r,61576)),SceneLayerWorker:()=>r.e(5265).then(r.bind(r,55265)),WFSSourceWorker:()=>Promise.all([r.e(8778),r.e(6570),r.e(9928),r.e(2894),r.e(1534),r.e(2305),r.e(3676),r.e(4324),r.e(8479),r.e(6919),r.e(3230)]).then(r.bind(r,43230)),WorkerTileHandler:()=>Promise.all([r.e(3568),r.e(6810),r.e(3388)]).then(r.bind(r,56456))},{CLOSE:u,ABORT:d,INVOKE:p,RESPONSE:y,OPEN_PORT:f,ON:g}=l.Cs;class m{constructor(e){this._timer=null,this._cancelledJobIds=new Set,this._invokeMessages=[],this._invoke=e,this._timer=null,this._process=this._process.bind(this)}push(e){e.type===l.Cs.ABORT?this._cancelledJobIds.add(e.jobId):(this._invokeMessages.push(e),null===this._timer&&(this._timer=setTimeout(this._process,0)))}clear(){this._invokeMessages.length=0,this._cancelledJobIds.clear(),this._timer=null}_process(){this._timer=null;for(const e of this._invokeMessages)this._cancelledJobIds.has(e.jobId)||this._invoke(e);this._cancelledJobIds.clear(),this._invokeMessages.length=0}}class v{constructor(e,t){this._port=e,this._outJobs=new Map,this._inJobs=new Map,this._invokeQueue=new m((e=>this._onInvokeMessage(e))),this._client=t.client,this._onMessage=this._onMessage.bind(this),this._channel=t.channel,this._schedule=t.schedule,this._port.addEventListener("message",this._onMessage),this._port.start()}static connect(e){const t=new MessageChannel;let r;r="function"==typeof e?new e:"default"in e&&"function"==typeof e.default?new e.default:e;const i=new v(t.port1,{channel:t,client:r});return"object"==typeof r&&"remoteClient"in r&&(r.remoteClient=i),v.clients.set(i,r),t.port2}static loadWorker(e){const t=h[e];return t?t():Promise.resolve(null)}close(){this._post({type:u}),this._close()}isBusy(){return this._outJobs.size>0}invoke(e,t,r){const i=r&&r.signal,n=r&&r.transferList;if(!this._port)return Promise.reject(new s.Z("worker:port-closed",`Cannot call invoke('${e}'), port is closed`,{methodName:e,data:t}));const o=(0,l.jt)();return new Promise(((r,s)=>{const l=(0,a.$F)(i,(()=>{var e;const t=this._outJobs.get(o);t&&(this._outJobs.delete(o),null==(e=t.abortHandle)||e.remove(),this._post({type:d,jobId:o}),s((0,a.zE)()))})),c={resolve:r,reject:s,abortHandle:l,debugInfo:e};this._outJobs.set(o,c),this._post({type:p,jobId:o,methodName:e,abortable:null!=i},t,n)}))}on(e,t){const r=new MessageChannel;function i(e){t(e.data)}return this._port.postMessage({type:l.Cs.ON,eventType:e,port:r.port2},[r.port2]),r.port1.addEventListener("message",i),r.port1.start(),{remove(){r.port1.postMessage({type:l.Cs.CLOSE}),r.port1.close(),r.port1.removeEventListener("message",i)}}}openPort(){const e=new MessageChannel;return this._post({type:f,port:e.port2}),e.port1}_close(){this._channel&&(this._channel=null),this._port.removeEventListener("message",this._onMessage),this._port.close(),this._outJobs.forEach((e=>{var t;null==(t=e.abortHandle)||t.remove(),e.reject((0,a.zE)(`Worker closing, aborting job calling '${e.debugInfo}'`))})),this._inJobs.clear(),this._outJobs.clear(),this._invokeQueue.clear(),this._port=this._client=this._schedule=null}_onMessage(e){(0,o.pC)(this._schedule)?this._schedule((()=>this._processMessage(e))):this._processMessage(e)}_processMessage(e){const t=(0,l.QM)(e);if(t)switch(t.type){case y:this._onResponseMessage(t);break;case p:this._invokeQueue.push(t);break;case d:this._onAbortMessage(t);break;case u:this._onCloseMessage();break;case f:this._onOpenPortMessage(t);break;case g:this._onOnMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,i=t.get(r);this._invokeQueue.push(e),i&&(i.controller&&i.controller.abort(),t.delete(r))}_onCloseMessage(){const e=this._client;this._close(),e&&"destroy"in e&&v.clients.get(this)===e&&e.destroy(),v.clients.delete(this),e&&e.remoteClient&&(e.remoteClient=null)}_onInvokeMessage(e){const{methodName:t,jobId:r,data:i,abortable:s}=e,n=s?(0,a.yi)():null,o=this._inJobs;let c,h=this._client,u=h[t];try{if(!u&&t&&-1!==t.indexOf(".")){const e=t.split(".");for(let t=0;t<e.length-1;t++)h=h[e[t]],u=h[e[t+1]]}if("function"!=typeof u)throw new TypeError(`${t} is not a function`);c=u.call(h,i,{client:this,signal:n?n.signal:null})}catch(e){return void this._post({type:y,jobId:r,error:(0,l.AB)(e)})}(0,a.y8)(c)?(o.set(r,{controller:n,promise:c}),c.then((e=>{o.has(r)&&(o.delete(r),this._post({type:y,jobId:r},e))}),(e=>{o.has(r)&&(o.delete(r),(0,a.D_)(e)||this._post({type:y,jobId:r,error:(0,l.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:y,jobId:r},c)}_onOpenPortMessage(e){new v(e.port,{client:this._client})}_onOnMessage(e){const{port:t}=e,r=this._client.on(e.eventType,(e=>{t.postMessage(e)})),i=(0,n.on)(e.port,"message",(e=>{(0,l.QM)(e).type===l.Cs.CLOSE&&(i.remove(),r.remove(),t.close())}))}_onResponseMessage(e){var t;const{jobId:r,error:i,data:n}=e,o=this._outJobs;if(!o.has(r))return;const a=o.get(r);o.delete(r),null==(t=a.abortHandle)||t.remove(),i?a.reject(s.Z.fromJSON(JSON.parse(i))):a.resolve(n)}_post(e,t,r){return(0,l.oi)(this._port,e,t,r)}}v.kernelInfo={revision:c.$,version:i.i8,buildDate:c.r},v.clients=new Map},94362:(e,t,r)=>{r.d(t,{Cs:()=>i,jt:()=>a,oi:()=>c,QM:()=>h,AB:()=>l});var i,s,n=r(80442);(s=i||(i={}))[s.HANDSHAKE=0]="HANDSHAKE",s[s.OPEN=1]="OPEN",s[s.OPENED=2]="OPENED",s[s.RESPONSE=3]="RESPONSE",s[s.INVOKE=4]="INVOKE",s[s.ABORT=5]="ABORT",s[s.CLOSE=6]="CLOSE",s[s.OPEN_PORT=7]="OPEN_PORT",s[s.ON=8]="ON";let o=0;function a(){return o++}function l(e){return e?"string"==typeof e?JSON.stringify({name:"message",message:e}):e.toJSON?JSON.stringify(e):JSON.stringify({name:e.name,message:e.message,details:e.details||{stack:e.stack}}):null}function c(e,t,r,s){if(t.type===i.OPEN_PORT)return void e.postMessage(t,[t.port]);if(t.type!==i.INVOKE&&t.type!==i.RESPONSE)return void e.postMessage(t);let n;!function(e){return e&&"object"==typeof e&&("result"in e||"transferList"in e)}(r)?(n=u(s),t.data=r):(n=u(r.transferList),t.data=r.result),n?e.postMessage(t,n):e.postMessage(t)}function h(e){if(!e)return null;const t=e.data;return t?"string"==typeof t?JSON.parse(t):t:null}function u(e){if(!e||!e.length)return null;if((0,n.Z)("esri-workers-arraybuffer-transfer"))return e;const t=e.filter((e=>!function(e){return e instanceof ArrayBuffer||e&&e.constructor&&"ArrayBuffer"===e.constructor.name}(e)));return t.length?t:null}},78346:(e,t,r)=>{r.d(t,{bA:()=>H});var i=r(20102),s=r(80442),n=r(95330),o=r(80903),a=r(25045),l=r(40330),c=r(92604),h=r(94362),u=r(99880),d=r(68773),p=(r(2587),r(17452));const y={};function f(e){var t;const r={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages&&e.packages.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(r.async=!0),e.hasOwnProperty("isDebug")||(r.isDebug=!1),e.baseUrl||(r.baseUrl=y.baseUrl),null==(t=y.packages)||t.forEach((e=>{!function(e,t){for(const r of e)if(r.name===t.name)return;e.push(t)}(r.packages,e)})),r}var g=r(16358);class m{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}const v=g.Z.MutationObserver||g.Z.WebKitMutationObserver,b=function(){let e;if(g.Z.process&&g.Z.process.nextTick)e=e=>{g.Z.process.nextTick(e)};else if(g.Z.Promise)e=e=>{g.Z.Promise.resolve().then(e)};else if(v){const t=[],r=document.createElement("div");new v((()=>{for(;t.length>0;)t.shift()()})).observe(r,{attributes:!0}),e=e=>{t.push(e),r.setAttribute("queueStatus","1")}}return e}(),_=(()=>{const e=g.Z.MessageEvent;try{new e("message",{data:null})}catch{return(e,t={})=>{const{data:r,bubbles:i=!1,cancelable:s=!1}=t,n=document.createEvent("Event");return n.initEvent(e,i,s),n.data=r,n}}return(t,r)=>new e(t,r)})();class w{constructor(){this._dispatcher=new m,this._workerPostMessage({type:h.Cs.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){b((()=>{this._workerMessageHandler(_("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){b((()=>{this.dispatchEvent(_("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,h.QM)(e);if(t&&t.type===h.Cs.OPEN){const{modulePath:e,jobId:r}=t;let i=await a.default.loadWorker(e);i||(i=await import(e));const s=a.default.connect(i);this._workerPostMessage({type:h.Cs.OPENED,jobId:r,data:s})}}}var S=r(70171),k=r(17202);const I=c.Z.getLogger("esri.core.workers"),{HANDSHAKE:O}=h.Cs;let C,E;const L="Failed to create Worker. Fallback to execute module in main thread";async function M(e){return new Promise((t=>{function r(s){const n=(0,h.QM)(s);n&&n.type===O&&(e.removeEventListener("message",r),e.removeEventListener("error",i),t(e))}function i(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",i),I.warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new w).addEventListener("message",r),e.addEventListener("error",i)}e.addEventListener("message",r),e.addEventListener("error",i)}))}let T=0;const j=c.Z.getLogger("esri.core.workers"),{ABORT:P,INVOKE:A,OPEN:N,OPENED:Z,RESPONSE:x}=h.Cs;class D{constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),j.error(e)}))}static async create(e){const t=await async function(){if(!(0,s.Z)("esri-workers"))return M(new w);if(!C&&!E)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,buildDate:r,version:t}=configuration.kernelInfo,{revision:n,buildDate:i,version:s}=e.kernelInfo;o!==n&&console.warn(`[esri.core.workers] Version mismatch detected between ArcGIS API for JavaScript and assets:\nAPI version: ${t} [Date: ${r}, Revision: ${o.slice(0,8)}]\nAssets version: ${s} [Date: ${i}, Revision: ${n.slice(0,8)}]`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let e;function t(o){const t=e.connect(o);self.postMessage({type:2,jobId:r,data:t},[t])}"function"==typeof define&&define.amd?require([workerPath],(r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((r=>(e=r.default,checkWorkerRevision(e),e.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):(self.RemoteClient||importScripts(workerPath),e=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(e),e.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const e=outgoing.get(r);outgoing.delete(r),o.error?e.reject(JSON.parse(o.error)):e.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.replace('"{CONFIGURATION}"',`'${function(){let e;if(null!=d.Z.default){const t={...d.Z};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(d.Z));e.assetsPath=(0,p.hF)(e.assetsPath),e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,S.Kd)(),e.has={"csp-restrictions":(0,s.Z)("csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,s.Z)("esri-2d-update-debug"),"esri-2d-query-centroid-enabled":(0,s.Z)("esri-2d-query-centroid-enabled"),"featurelayer-pbf":(0,s.Z)("featurelayer-pbf"),"featurelayer-simplify-thresholds":(0,s.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,s.Z)("featurelayer-simplify-payload-size-factors"),"esri-atomics":(0,s.Z)("esri-atomics"),"esri-shared-array-buffer":(0,s.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,s.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,s.Z)("esri-workers-arraybuffer-transfer"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,p.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,p.hF)(e.workers.workerPath):e.workers.workerPath=(0,p.hF)((0,u.V)("esri/core/workers/RemoteClient.js"));const t=d.Z.workers.loaderConfig,r=f({baseUrl:null==t?void 0:t.baseUrl,locale:(0,S.Kd)(),has:{"csp-restrictions":(0,s.Z)("csp-restrictions"),"dojo-test-sniff":0,"host-webworker":1,...null==t?void 0:t.has},map:{...null==t?void 0:t.map},paths:{...null==t?void 0:t.paths},packages:(null==t?void 0:t.packages)||[]}),i={version:l.i8,buildDate:k.r,revision:k.$};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:i})}()}'`);C=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){E=e||{}}let e;if(C)try{e=new Worker(C,{name:"esri-worker-"+T++})}catch(t){I.warn(L,E),e=new w}else I.warn(L,E),e=new w;return M(e)}();return new D(t,e)}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,i=(0,h.jt)();return new Promise(((t,s)=>{const o={resolve:t,reject:s,abortHandle:(0,n.$F)(r,(()=>{this._outJobs.delete(i),this._post({type:P,jobId:i})}))};this._outJobs.set(i,o),this._post({type:N,jobId:i,modulePath:e})}))}_onMessage(e){const t=(0,h.QM)(e);if(t)switch(t.type){case Z:this._onOpenedMessage(t);break;case x:this._onResponseMessage(t);break;case P:this._onAbortMessage(t);break;case A:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,i=t.get(r);i&&(i.controller&&i.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:i,abortable:s}=e,o=s?(0,n.yi)():null,a=this._inJobs,c=l.Nv[t];let u;try{if("function"!=typeof c)throw new TypeError(`${t} is not a function`);u=c.call(null,i,{signal:o?o.signal:null})}catch(e){return void this._post({type:x,jobId:r,error:(0,h.AB)(e)})}(0,n.y8)(u)?(a.set(r,{controller:o,promise:u}),u.then((e=>{a.has(r)&&(a.delete(r),this._post({type:x,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,n.D_)(e)||this._post({type:x,jobId:r,error:(0,h.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:x,jobId:r},u)}_onOpenedMessage(e){var t;const{jobId:r,data:i}=e,s=this._outJobs.get(r);s&&(this._outJobs.delete(r),null==(t=s.abortHandle)||t.remove(),s.resolve(i))}_onResponseMessage(e){var t;const{jobId:r,error:s,data:n}=e,o=this._outJobs.get(r);o&&(this._outJobs.delete(r),null==(t=o.abortHandle)||t.remove(),s?o.reject(i.Z.fromJSON(JSON.parse(s))):o.resolve(n))}_post(e,t,r){return(0,h.oi)(this.worker,e,t,r)}}let R=(0,s.Z)("esri-workers-debug")?1:(0,s.Z)("host-browser")?navigator.hardwareConcurrency-1:0;R||(R=(0,s.Z)("safari")&&(0,s.Z)("mac")||(0,s.Z)("trident")?7:2);let $=0;const J=[];async function U(e,t){const r=new o.Z;return await r.open(e,t),r}async function H(e,t={}){if("string"!=typeof e)throw new i.Z("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,s.Z)("host-webworker")&&!(0,s.Z)("esri-workers")&&(r="local"),"local"===r){let r=await a.default.loadWorker(e);r||(r=await import(e)),(0,n.k_)(t.signal);const i=t.client||r;return U([a.default.connect(r)],{...t,client:i})}if(await async function(){if(q)return q;W=(0,n.yi)();const e=[];for(let t=0;t<R;t++){const r=D.create(t).then((e=>(J[t]=e,e)));e.push(r)}return q=Promise.all(e),q}(),(0,n.k_)(t.signal),"dedicated"===r){const r=$++%R;return U([await J[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,R);if(r<R){const i=new Array(r);for(let s=0;s<r;++s){const r=$++%R;i[s]=J[r].open(e,t)}return U(i,t)}}return U(J.map((r=>r.open(e,t))),t)}let W,q=null},79235:(e,t,r)=>{r.d(t,{Z:()=>b});var i,s=r(43697),n=r(67676),o=r(35454),a=r(10736),l=r(67900),c=r(20941),h=r(5600),u=(r(80442),r(75215),r(92604),r(71715)),d=r(52525),p=r(30556);const y=(0,o.wY)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),f=y.jsonValues.slice();(0,n.e$)(f,"orthometric");const g=(0,o.wY)()({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=i=class extends a.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r&&r.messages&&r.messages.push(function(e,t){return new c.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return g.read(e)||(r&&r.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.$C)(e)||g.read(e)||(r&&r.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.cM)(t);return new i({heightModel:e.heightModel,heightUnit:r,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new c.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,h.Cb)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f,default:"ellipsoidal"}}}})],m.prototype,"heightModel",void 0),(0,s._)([(0,p.c)("web-scene","heightModel")],m.prototype,"writeHeightModel",null),(0,s._)([(0,u.r)(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),(0,s._)([(0,h.Cb)({type:g.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g.jsonValues,write:g.write}}}})],m.prototype,"heightUnit",void 0),(0,s._)([(0,u.r)("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),(0,s._)([(0,u.r)("service","heightUnit")],m.prototype,"readHeightUnitService",null),(0,s._)([(0,h.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),(0,s._)([(0,u.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=i=(0,s._)([(0,d.j)("esri.geometry.HeightModelInfo")],m);var b=m},40330:(e,t,r)=>{r.d(t,{Dp:()=>c,id:()=>a,qh:()=>l,i8:()=>n,Nv:()=>o});var i=r(80442),s=r(17452);const n="4.21",o={request(e,t){var i;const s=null==(i=e.options)?void 0:i.responseType;return r.e(3172).then(r.bind(r,3172)).then((({default:r})=>{const i=e.options||{};return i.responseType="native"===s||"native-request-init"===s?"native-request-init":"array-buffer",i.signal=null==t?void 0:t.signal,r(e.url,i)})).then((e=>{const t={data:e.data,ssl:e.ssl};return"native-request-init"===e.requestOptions.responseType?(delete t.data.signal,t):{result:t,transferList:[t.data]}}))}};let a;function l(e){a=e}function c(e){const t=a&&a.findCredential(e);return t&&t.token?(0,s.ZN)(e,"token",t.token):e}(0,i.Z)("host-webworker")||((0,i.Z)("edge")||(0,i.Z)("trident"))&&console.warn("Deprecated browser - see http://esriurl.com/oldbrowser")},49932:(e,t,r)=>{r.r(t),r.d(t,{default:()=>M});var i=r(43697),s=r(3172),n=r(20102),o=r(92604),a=r(70586),l=r(16453),c=r(95330),h=r(17452),u=r(5600),d=(r(80442),r(75215),r(71715)),p=r(52525),y=r(79235),f=r(29600),g=r(46486),m=r(17287),v=r(38009),b=r(16859),_=r(21506),w=r(67676),S=r(50758),k=r(78346);const I=o.Z.getLogger("esri.core.workers.WorkerHandle");class O extends class{constructor(e,t,r,i={}){this._mainMethod=t,this._listeners=[],this._promise=(0,k.bA)(e,{...i,schedule:r}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,i.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>I.error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const r={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(r),this._connectListener(r),(0,S.kB)((()=>{r.removed=!0,(0,w.Od)(this._listeners,r),this._thread&&(0,a.pC)(r.threadHandle)&&r.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,r){if(this._thread){const i=this.getTransferList(t,e);return this._thread.invoke(e,t,{transferList:i,signal:r})}return this._promise?this._promise.then((()=>((0,c.k_)(r),this.invokeMethod(e,t,r)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}{constructor(e=null){super("LercWorker","_decode",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)}getTransferList(e){return[e.buffer]}release(){--this.ref<=0&&(C.forEach(((e,t)=>{e===this&&C.delete(t)})),this.destroy())}}const C=new Map,E=o.Z.getLogger("esri.layers.ElevationLayer");let L=class extends((0,g.Z)((0,m.Y)((0,v.q)((0,b.I)((0,l.R)(f.Z)))))){constructor(...e){super(...e),this.copyright=null,this.heightModelInfo=null,this.path=null,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((0,a.Wg)(e));return t||((0,a.pC)(e)?(t=new O((t=>e.schedule(t))),C.set(e,t)):(t=new O,C.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,a.RY)(this._lercDecoder)}set minScale(e){this.constructed&&E.warn(`${this.declaredClass}.minScale support has been removed (since 4.5)`)}get minScale(){}set maxScale(e){this.constructed&&E.warn(`${this.declaredClass}.maxScale support has been removed (since 4.5)`)}get maxScale(){}readVersion(e,t){let r=t.currentVersion;return r||(r=9.3),r}load(e){const t=(0,a.pC)(e)?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new n.Z("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(c.r9).then((()=>this._fetchImageService(t)))),Promise.resolve(this)}fetchTile(e,t,r,i){const n=(0,a.pC)((i=i||{signal:null}).signal)?i.signal:i.signal=(0,c.yi)().signal,o={responseType:"array-buffer",signal:n},l={noDataValue:i.noDataValue,returnFileInfo:!0};return this.load().then((()=>this._fetchTileAvailability(e,t,r,i))).then((()=>(0,s.default)(this.getTileUrl(e,t,r),o))).then((e=>this._lercDecoder.decode(e.data,l,n))).then((e=>({values:e.pixelData,width:e.width,height:e.height,maxZError:e.fileInfo.maxZError,noDataValue:e.noDataValue,minValue:e.minValue,maxValue:e.maxValue})))}getTileUrl(e,t,r){const i=!this.tilemapCache&&this.supportsBlankTile,s=(0,h.B7)({...this.parsedUrl.query,blankTile:!i&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${r}${s?"?"+s:""}`}async queryElevation(e,t){const{ElevationQuery:i}=await Promise.all([r.e(2894),r.e(7562)]).then(r.bind(r,33127));return(0,c.k_)(t),(new i).query(this,e,t)}async createElevationSampler(e,t){const{ElevationQuery:i}=await Promise.all([r.e(2894),r.e(7562)]).then(r.bind(r,33127));return(0,c.k_)(t),(new i).createSampler(this,e,t)}_fetchTileAvailability(e,t,r,i){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,r,i):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,s.default)(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.__isDefault__}};(0,i._)([(0,u.Cb)({json:{read:{source:"copyrightText"}}})],L.prototype,"copyright",void 0),(0,i._)([(0,u.Cb)({readOnly:!0,type:y.Z})],L.prototype,"heightModelInfo",void 0),(0,i._)([(0,u.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],L.prototype,"path",void 0),(0,i._)([(0,u.Cb)({type:["show","hide"]})],L.prototype,"listMode",void 0),(0,i._)([(0,u.Cb)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],L.prototype,"minScale",null),(0,i._)([(0,u.Cb)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],L.prototype,"maxScale",null),(0,i._)([(0,u.Cb)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],L.prototype,"opacity",void 0),(0,i._)([(0,u.Cb)({type:["ArcGISTiledElevationServiceLayer"]})],L.prototype,"operationalLayerType",void 0),(0,i._)([(0,u.Cb)()],L.prototype,"sourceJSON",void 0),(0,i._)([(0,u.Cb)({json:{read:!1},value:"elevation",readOnly:!0})],L.prototype,"type",void 0),(0,i._)([(0,u.Cb)(_.HQ)],L.prototype,"url",void 0),(0,i._)([(0,u.Cb)()],L.prototype,"version",void 0),(0,i._)([(0,d.r)("version",["currentVersion"])],L.prototype,"readVersion",null),L=(0,i._)([(0,p.j)("esri.layers.ElevationLayer")],L),L.prototype.fetchTile.__isDefault__=!0;var M=L},29600:(e,t,r)=>{r.d(t,{Z:()=>_});var i=r(43697),s=r(68773),n=(r(66577),r(3172)),o=r(20102),a=r(32448),l=r(10699),c=r(83379),h=r(92604),u=r(95330),d=r(17452),p=r(5600),y=(r(80442),r(75215),r(52525)),f=r(6570),g=r(82971);let m=0;const v=h.Z.getLogger("esri.layers.Layer");let b=class extends(a.Z.EventedMixin((0,l.I)(c.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.Z(-180,-90,180,90,g.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+m++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e,i=await r.e(3529).then(r.bind(r,63529));try{return await i.fromUrl(t)}catch(e){throw v.error("#fromArcGISServerUrl({ url: '"+t.url+"'})","Failed to create layer from arcgis server url",e),e}}static async fromPortalItem(e){const t="portalItem"in e?e:{portalItem:e},i=await r.e(8008).then(r.bind(r,28008));try{return await i.fromItem(t)}catch(e){const r=t&&t.portalItem,i=r&&r.id||"unset",n=r&&r.portal&&r.portal.url||s.Z.portalUrl;throw v.error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+i+"')",e),e}}initialize(){this.when().catch((e=>{var t,r;(0,u.D_)(e)||h.Z.getLogger(this.declaredClass).error("#load()",`Failed to load layer (title: '${null!=(t=this.title)?t:"no title"}', id: '${null!=(r=this.id)?r:"no id"}')`,{error:e})}))}destroy(){if(this.parent){const e=this,t=this.parent;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"baseLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){const e=this.url;return e?(0,d.mN)(e):null}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,n.default)(e,{query:{f:"json"},responseType:"json"})).data;throw new o.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,p.Cb)({type:String})],b.prototype,"attributionDataUrl",void 0),(0,i._)([(0,p.Cb)({type:f.Z})],b.prototype,"fullExtent",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],b.prototype,"hasAttributionData",null),(0,i._)([(0,p.Cb)({type:String})],b.prototype,"id",void 0),(0,i._)([(0,p.Cb)({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),(0,i._)([(0,p.Cb)({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),(0,i._)([(0,p.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),(0,i._)([(0,p.Cb)()],b.prototype,"parent",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],b.prototype,"parsedUrl",null),(0,i._)([(0,p.Cb)({type:Boolean})],b.prototype,"popupEnabled",void 0),(0,i._)([(0,p.Cb)({type:Boolean})],b.prototype,"attributionVisible",void 0),(0,i._)([(0,p.Cb)({type:g.Z})],b.prototype,"spatialReference",void 0),(0,i._)([(0,p.Cb)({type:String})],b.prototype,"title",void 0),(0,i._)([(0,p.Cb)({type:String,readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),(0,i._)([(0,p.Cb)()],b.prototype,"url",void 0),(0,i._)([(0,p.Cb)({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=(0,i._)([(0,y.j)("esri.layers.Layer")],b);var _=b},46486:(e,t,r)=>{r.d(t,{Z:()=>h});var i=r(43697),s=(r(66577),r(5600)),n=(r(80442),r(75215),r(92604),r(71715)),o=r(52525),a=r(45322),l=r(56608),c=r(82971);const h=e=>{let t=class extends e{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}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){return t.capabilities&&t.capabilities.indexOf("Tilemap")>-1?new l.y({layer:this}):null}};return(0,i._)([(0,s.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,s.Cb)()],t.prototype,"minScale",void 0),(0,i._)([(0,n.r)("service","minScale")],t.prototype,"readMinScale",null),(0,i._)([(0,s.Cb)()],t.prototype,"maxScale",void 0),(0,i._)([(0,n.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,i._)([(0,s.Cb)({type:c.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,s.Cb)({readOnly:!0})],t.prototype,"supportsBlankTile",null),(0,i._)([(0,s.Cb)(a.h)],t.prototype,"tileInfo",void 0),(0,i._)([(0,s.Cb)()],t.prototype,"tilemapCache",void 0),(0,i._)([(0,n.r)("service","tilemapCache",["capabilities"])],t.prototype,"readTilemapCache",null),(0,i._)([(0,s.Cb)()],t.prototype,"version",void 0),t=(0,i._)([(0,o.j)("esri.layers.mixins.ArcGISCachedService")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>c});var i=r(43697),s=r(92604),n=r(70586),o=r(5600),a=(r(80442),r(75215),r(52525)),l=r(66677);const c=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,l.Qc)(this.url);if((0,n.pC)(e)&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,l.Nm)(e,s.Z.getLogger(this.declaredClass)))}};return(0,i._)([(0,o.Cb)()],t.prototype,"title",null),(0,i._)([(0,o.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,a.j)("esri.layers.mixins.ArcGISService")],t),t}},38009:(e,t,r)=>{r.d(t,{q:()=>d});var i=r(43697),s=r(20102),n=r(5600),o=(r(80442),r(75215),r(92604),r(52525)),a=r(30556),l=r(50549),c=r(76169);const h={"web-scene/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,GroupLayer:!0,IntegratedMeshLayer:!0,OGCFeatureLayer:!0,PointCloudLayer:!0,WebTiledLayer:!0,CSV:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,KML:!0,RasterDataLayer:!0,Voxel:!0},"web-scene/basemap":{ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,WebTiledLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,ArcGISImageServiceLayer:!0,WMS:!0,ArcGISMapServiceLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-map/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CSV:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,OGCFeatureLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-map/basemap":{ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0,BingMapsAerial:!0,BingMapsRoad:!0,BingMapsHybrid:!0},"web-map/tables":{ArcGISFeatureLayer:!0},"portal-item/operational-layers":{ArcGISSceneServiceLayer:!0,PointCloudLayer:!0,BuildingSceneLayer:!0,IntegratedMeshLayer:!0}};var u=r(21506);const d=e=>{let t=class extends e{constructor(){super(...arguments),this.title=null}writeListMode(e,t,r,i){(i&&"ground"===i.layerContainerType||e&&(0,c.df)(this,r,{},i))&&(t[r]=e)}writeOperationalLayerType(e,t,r,i){!e||i&&"tables"===i.layerContainerType||(t.layerType=e)}writeTitle(e,t){t.title=e||"Layer"}read(e,t){t&&(t.layer=this),(0,l.$Z)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(t&&t.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,r=h[e];let i=r&&r[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(i=!1),!i)return t.messages&&t.messages.push(new s.Z("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const r=super.write(e,{...t,layer:this}),i=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof s.Z&&"web-document-write:property-required"===e.name)).length;return!this.url&&i?null:r}beforeSave(){}};return(0,i._)([(0,n.Cb)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,i._)([(0,n.Cb)({json:{write:{ignoreOrigin:!0},origins:{"web-map":{read:!1,write:!1}}}})],t.prototype,"listMode",void 0),(0,i._)([(0,a.c)("listMode")],t.prototype,"writeListMode",null),(0,i._)([(0,n.Cb)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1}}}})],t.prototype,"operationalLayerType",void 0),(0,i._)([(0,a.c)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,i._)([(0,n.Cb)(u.Oh)],t.prototype,"opacity",void 0),(0,i._)([(0,n.Cb)({type:String,json:{write:{ignoreOrigin:!0,allowNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,allowNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,i._)([(0,a.c)("title")],t.prototype,"writeTitle",null),(0,i._)([(0,n.Cb)({type:Boolean,json:{name:"visibility",origins:{"web-document":{name:"visibility",default:!0},"portal-item":{name:"visibility",read:{source:["visible","visibility"]}}}}})],t.prototype,"visible",void 0),t=(0,i._)([(0,o.j)("esri.layers.mixins.OperationalLayer")],t),t}},16859:(e,t,r)=>{r.d(t,{I:()=>_});var i=r(43697),s=r(40330),n=r(3172),o=r(66643),a=r(20102),l=r(92604),c=r(70586),h=r(95330),u=r(17452),d=r(5600),p=(r(80442),r(75215),r(71715)),y=r(52525),f=r(30556),g=r(65587),m=r(15235),v=r(86082);const b=l.Z.getLogger("esri.layers.mixins.PortalLayer"),_=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){var e;null==(e=this.portalItem)||e.destroy(),this.portalItem=null}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&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const i=await r.e(8062).then(r.bind(r,18062));return(0,h.k_)(t),await i.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,h.D_)(e)||b.warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n  ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this.fetchUserHasEditingPrivileges(e).catch((e=>((0,h.r9)(e),!0))))}async fetchUserHasEditingPrivileges(e){const t=this.url?null==s.id?void 0:s.id.findCredential(this.url):null;if(!t)return!0;const r=w.credential===t?w.user:await this.fetchEditingUser(e);return w.credential=t,w.user=r,(0,c.Wi)(r)||null==r.privileges||r.privileges.includes("features:user:edit")}async fetchEditingUser(e){var t,r;const i=null==(t=this.portalItem)||null==(r=t.portal)?void 0:r.user;if(i)return i;const a=s.id.findServerInfo(this.url);if(null==a||!a.owningSystemUrl)return null;const l=`${a.owningSystemUrl}/sharing/rest`,h=g.Z.getDefault();if(h&&h.loaded&&(0,u.Fv)(h.restUrl)===(0,u.Fv)(l))return h.user;const d=`${l}/community/self`,p=(0,c.pC)(e)?e.signal:null,y=await(0,o.q6)((0,n.default)(d,{authMode:"no-prompt",query:{f:"json"},signal:p}));return y.ok?v.default.fromJSON(y.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||g.Z.getDefault());return r&&i&&!(0,u.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.Z("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 the scene, set the layer.portalItem to null or save the scene to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,d.Cb)({type:m.default})],t.prototype,"portalItem",null),(0,i._)([(0,p.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,d.Cb)()],t.prototype,"resourceReferences",void 0),(0,i._)([(0,d.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,i._)([(0,y.j)("esri.layers.mixins.PortalLayer")],t),t},w={credential:null,user:null}},56608:(e,t,r)=>{r.d(t,{y:()=>I});var i,s=r(43697),n=r(3172),o=r(18855),a=r(20102),l=r(61247),c=r(92604),h=r(13867),u=r(44553),d=r(95330),p=r(90584),y=r(17452),f=r(43050),g=r(5600),m=(r(80442),r(90578)),v=r(52525),b=r(67676),_=r(22974);class w{constructor(){this.location={left:0,top:0,width:0,height:0},this._allAvailability="unknown",this.byteSize=40}getAvailability(e,t){if("unknown"!==this._allAvailability)return this._allAvailability;const r=(e-this.location.top)*this.location.width+(t-this.location.left),i=r%8,s=r>>3,n=this._tileAvailabilityBitSet;return s<0||s>n.length?"unknown":n[s]&1<<i?"available":"unavailable"}_updateFromData(e){const t=this.location.width,r=this.location.height;let i=!0,s=!0;const n=Math.ceil(t*r/8),o=new Uint8Array(n);let a=0;for(let t=0;t<e.length;t++){const r=t%8;e[t]?(s=!1,o[a]|=1<<r):i=!1,7===r&&++a}s?this._allAvailability="unavailable":i?this._allAvailability="available":(this._allAvailability="unknown",this._tileAvailabilityBitSet=o,this.byteSize+=o.length)}static fromDefinition(e,t){const r=e.service.request||n.default,{row:i,col:s,width:o,height:l}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,r(function(e){let t;if("vector-tile"===e.service.type)t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;else{const r=e.service.tileServers;t=`${r&&r.length?r[e.row%r.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}const r=e.service.query;return r&&(t=`${t}?${r}`),t}(e),t).then((e=>e.data)).catch((e=>{if(e&&e.details&&422===e.details.httpStatus)return{location:{top:i,left:s,width:o,height:l},valid:!0,data:(0,b.a9)(o*l,0)};throw e})).then((e=>{if(e.location&&(e.location.top!==i||e.location.left!==s||e.location.width!==o||e.location.height!==l))throw new a.Z("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:i,left:s,width:o,height:l}});return w.fromJSON(e)}))}static fromJSON(e){w.validateJSON(e);const t=new w;return t.location=Object.freeze((0,_.d9)(e.location)),t._updateFromData(e.data),Object.freeze(t)}static validateJSON(e){if(!e||!e.location)throw new a.Z("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new a.Z("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new a.Z("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new a.Z("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new a.Z("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}}function S(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}const k=c.Z.getLogger("esri.layers.support.TilemapCache");let I=i=class extends o.Z{constructor(e){super(e),this._handles=new l.Z,this._pendingTilemapRequests={},this._availableLevels={},this.levels=5,this.cacheByteSize=2097152,this.request=n.default,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new h.Z(this.cacheByteSize),this._handles.add([this.watch(["layer.parsedUrl","layer.tileServers?"],(()=>this._initializeTilemapDefinition())),(0,f.S1)(this,"layer.tileInfo.lods",(e=>this._initializeAvailableLevels(e)),!0)]),this._initializeTilemapDefinition()}destroy(){this._handles&&(this._handles.destroy(),this._handles=null)}castLevels(e){return e<=2?(k.error("Minimum levels for Tilemap is 3, but got ",e),3):e}get size(){return 1<<this.levels}fetchTilemap(e,t,r,i){if(!this._availableLevels[e])return Promise.reject(new a.Z("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const s=this._tmpTilemapDefinition,n=this._tilemapFromCache(e,t,r,s);if(n)return Promise.resolve(n);const o=i&&i.signal;return i={...i,signal:null},new Promise(((e,t)=>{(0,d.fu)(o,(()=>t((0,d.zE)())));const r=S(s);let n=this._pendingTilemapRequests[r];if(!n){n=w.fromDefinition(s,i).then((e=>(this._tilemapCache.put(r,e,e.byteSize),e)));const e=()=>delete this._pendingTilemapRequests[r];this._pendingTilemapRequests[r]=n,n.then(e,e)}n.then(e,t)}))}getAvailability(e,t,r){if(!this._availableLevels[e])return"unavailable";const i=this._tilemapFromCache(e,t,r,this._tmpTilemapDefinition);return i?i.getAvailability(t,r):"unknown"}getAvailabilityUpsample(e,t,r,i){i.level=e,i.row=t,i.col=r;const s=this.layer.tileInfo;for(s.updateTileInfo(i);;){const e=this.getAvailability(i.level,i.row,i.col);if("unavailable"!==e)return e;if(!s.upsampleTile(i))return"unavailable"}}fetchAvailability(e,t,r,i){return this._availableLevels[e]?this.fetchTilemap(e,t,r,i).catch((e=>e)).then((i=>{if(i instanceof w){const s=i.getAvailability(t,r);return"unavailable"===s?Promise.reject(new a.Z("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:r})):s}if((0,d.D_)(i))throw i;return"unknown"})):Promise.reject(new a.Z("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`))}fetchAvailabilityUpsample(e,t,r,i,s){i.level=e,i.row=t,i.col=r;const n=this.layer.tileInfo;n.updateTileInfo(i);const o=this.fetchAvailability(e,t,r,s).catch((e=>{if((0,d.D_)(e))throw e;if(n.upsampleTile(i))return this.fetchAvailabilityUpsample(i.level,i.row,i.col,i);throw e}));return this._fetchAvailabilityUpsamplePrefetch(i.id,e,t,r,s,o),o}async _fetchAvailabilityUpsamplePrefetch(e,t,r,s,n,o){if(!this._prefetchingEnabled)return;const a=`prefetch-${e}`;if(this._handles.has(a))return;const l=(0,d.yi)();o.then((()=>l.abort()),(()=>l.abort()));let c=!1;const h={remove(){c||(c=!0,l.abort())}};if(this._handles.add(h,a),await(0,p.MU)(10,l.signal).catch((()=>{})),c||(c=!0,this._handles.remove(a)),(0,d.Hc)(l))return;const u={id:e,level:t,row:r,col:s},y={...n,signal:l.signal},f=this.layer.tileInfo;for(let e=0;i._prefetches.length<i._maxPrefetch&&f.upsampleTile(u);++e){const e=this.fetchAvailability(u.level,u.row,u.col,y);i._prefetches.push(e);const t=()=>{i._prefetches.removeUnordered(e)};e.then(t,t)}}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const e=this.layer.parsedUrl,t=e.query;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:t?(0,y.B7)(t):null,tileServers:this.layer.tileServers,request:this.request,type:this.layer.type},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,r,i){i.level=e,i.row=t-t%this.size,i.col=r-r%this.size;const s=S(i);return this._tilemapCache.get(s)}_initializeAvailableLevels(e){this._availableLevels={},e&&e.forEach((e=>this._availableLevels[e.level]=!0))}get test(){const e=this;return{get prefetchingEnabled(){return e._prefetchingEnabled},set prefetchingEnabled(t){e._prefetchingEnabled=t},hasTilemap:(t,r,i)=>!!e._tilemapFromCache(t,r,i,e._tmpTilemapDefinition)}}};I._maxPrefetch=4,I._prefetches=new u.Z({initialSize:i._maxPrefetch}),(0,s._)([(0,g.Cb)({constructOnly:!0,type:Number})],I.prototype,"levels",void 0),(0,s._)([(0,m.p)("levels")],I.prototype,"castLevels",null),(0,s._)([(0,g.Cb)({readOnly:!0,type:Number})],I.prototype,"size",null),(0,s._)([(0,g.Cb)({constructOnly:!0,type:Number})],I.prototype,"cacheByteSize",void 0),(0,s._)([(0,g.Cb)({constructOnly:!0})],I.prototype,"layer",void 0),(0,s._)([(0,g.Cb)({constructOnly:!0})],I.prototype,"request",void 0),I=i=(0,s._)([(0,v.j)("esri.layers.support.TilemapCache")],I)},21506:(e,t,r)=>{r.d(t,{qG:()=>_,PV:()=>g,id:()=>S,iR:()=>p,rn:()=>f,u1:()=>I,rO:()=>k,Oh:()=>v,bT:()=>b,C_:()=>d,Lx:()=>m,vg:()=>w,YI:()=>u,HQ:()=>y});var i=r(92835),s=r(6570),n=r(82971),o=r(25929),a=r(70586),l=(r(95330),r(35463)),c=r(20682),h=r(65242);const u={type:Boolean,value:!0,json:{origins:{service:{read:!1,write:!1},"web-map":{read:!1,write:!1}},name:"screenSizePerspective",write:!0}},d={type:Boolean,value:!0,json:{name:"disablePopup",read:{reader:(e,t)=>!t.disablePopup},write:{enabled:!0,writer(e,t,r){t[r]=!e}}}},p={type:Boolean,value:!0,json:{name:"showLabels",write:!0}},y={type:String,json:{origins:{"portal-item":{write:!1}},write:{isRequired:!0,ignoreOrigin:!0,writer:o.w}}},f={type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},name:"showLegend",write:!0}},g={value:null,type:c.Z,json:{origins:{service:{name:"elevationInfo",write:!0}},name:"layerDefinition.elevationInfo",write:!0}};function m(e){return{type:e,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}}}const v={type:Number,json:{origins:{"web-document":{default:1,write:!0,read:!0},"portal-item":{write:!0}}}},b={...v,json:{...v.json,origins:{"web-document":{...v.json.origins["web-document"],write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}}}},read:{source:["layerDefinition.drawingInfo.transparency","drawingInfo.transparency"],reader:(e,t,r)=>r&&"service"!==r.origin||!t.drawingInfo||void 0===t.drawingInfo.transparency?t.layerDefinition&&t.layerDefinition.drawingInfo&&void 0!==t.layerDefinition.drawingInfo.transparency?(0,h.b)(t.layerDefinition.drawingInfo.transparency):void 0:(0,h.b)(t.drawingInfo.transparency)}}},_={type:i.Z,readOnly:!0,get(){var e,t;if(null==(e=this.layer)||!e.timeInfo)return null;const{datesInUnknownTimezone:r,timeOffset:s,useViewTime:n}=this.layer,o=null==(t=this.view)?void 0:t.timeExtent;let c=this.layer.timeExtent;r&&(c=function(e){if(!e)return e;const{start:t,end:r}=e;return new i.Z({start:(0,a.pC)(t)?(0,l.Nm)(t,t.getTimezoneOffset(),"minutes"):t,end:(0,a.pC)(r)?(0,l.Nm)(r,r.getTimezoneOffset(),"minutes"):r})}(c));let h=n?o&&c?o.intersection(c):o||c:c;if(!h||h.isEmpty||h.isAllTime)return h;s&&(h=h.offset(-s.value,s.unit)),r&&(h=function(e){if(!e)return e;const{start:t,end:r}=e;return new i.Z({start:(0,a.pC)(t)?(0,l.Nm)(t,-t.getTimezoneOffset(),"minutes"):t,end:(0,a.pC)(r)?(0,l.Nm)(r,-r.getTimezoneOffset(),"minutes"):r})}(h));const u=this._get("timeExtent");return h.equals(u)?u:h}},w={type:s.Z,readOnly:!0,json:{origins:{service:{read:{source:["fullExtent","spatialReference"],reader:(e,t)=>{const r=s.Z.fromJSON(e);return null!=t.spatialReference&&"object"==typeof t.spatialReference&&(r.spatialReference=n.Z.fromJSON(t.spatialReference)),r}}}},read:!1}},S={type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}}}},k={type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.minScale"},write:{target:"layerDefinition.minScale"}}},I={type:Number,json:{origins:{service:{write:{enabled:!1}}},read:{source:"layerDefinition.maxScale"},write:{target:"layerDefinition.maxScale"}}}},45322:(e,t,r)=>{r.d(t,{d:()=>n,h:()=>s});var i=r(11145);const s={type:i.Z,json:{origins:{service:{read:{source:["tileInfo","minScale","maxScale","minLOD","maxLOD"],reader:n}}}}};function n(e,t,r,s){if(!e)return null;const{minScale:n,maxScale:o,minLOD:a,maxLOD:l}=t;if(null!=a&&null!=l)return s&&s.ignoreMinMaxLOD?i.Z.fromJSON(e):i.Z.fromJSON({...e,lods:e.lods.filter((({level:e})=>null!=e&&e>=a&&e<=l))});if(0!==n&&0!==o){const t=e=>Math.round(1e4*e)/1e4,r=n?t(n):1/0,s=o?t(o):-1/0;return i.Z.fromJSON({...e,lods:e.lods.filter((e=>{const i=t(e.scale);return i<=r&&i>=s}))})}return i.Z.fromJSON(e)}},17202:(e,t,r)=>{r.d(t,{r:()=>i,$:()=>s});const i="20210928",s="c312c4b5c1d3a2f6febbd67d710c6d6cd2dba51d"},20682:(e,t,r)=>{r.d(t,{Z:()=>w});var i,s=r(43697),n=r(35454),o=r(10736),a=r(70586),l=r(5600),c=(r(80442),r(75215),r(92604),r(71715)),h=r(52525),u=r(30556),d=r(35671);let p=i=class extends o.wq{async collectRequiredFields(e,t){return(0,d.io)(e,t,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}};(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"expression",void 0),(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"title",void 0),p=i=(0,s._)([(0,h.j)("esri.layers.support.FeatureExpressionInfo")],p);var y=p,f=r(99282);const g=function(){const e=Object.keys(f.a);return e.sort(),e}();var m;const v=(0,n.wY)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),b=new n.Xn({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let _=m=class extends o.wq{constructor(){super(...arguments),this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,r,i){t[r]=e.write(null,i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):(0,a.pC)(e)||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new m({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}};(0,s._)([(0,l.Cb)({type:y,json:{write:!0}})],_.prototype,"featureExpressionInfo",void 0),(0,s._)([(0,c.r)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],_.prototype,"readFeatureExpressionInfo",null),(0,s._)([(0,u.c)("featureExpressionInfo",{featureExpressionInfo:{type:y},"featureExpression.value":{type:[0]}})],_.prototype,"writeFeatureExpressionInfo",null),(0,s._)([(0,l.Cb)({type:v.apiValues,nonNullable:!0,json:{type:v.jsonValues,read:v.read,write:{writer:v.write,isRequired:!0}}})],_.prototype,"mode",null),(0,s._)([(0,l.Cb)({type:Number,json:{write:!0}})],_.prototype,"offset",void 0),(0,s._)([(0,l.Cb)({type:g,json:{type:String,read:b.read,write:b.write}})],_.prototype,"unit",null),_=m=(0,s._)([(0,h.j)("esri.layers.support.ElevationInfo")],_);var w=_}}]);