@arcgis/core 4.28.6 → 4.28.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/README.md +15 -25
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/0c08d59c5d65921ba5ae.js +1 -0
  4. package/assets/esri/core/workers/chunks/0dbf3fa096d02d83b222.js +1 -0
  5. package/assets/esri/core/workers/chunks/16453ca31cc3e09fde46.js +1 -0
  6. package/assets/esri/core/workers/chunks/{1da721608993783dc9cf.js → 24d04cca452ba2fec5d4.js} +1 -1
  7. package/assets/esri/core/workers/chunks/2c121541cde5c24b1fbe.js +1 -0
  8. package/assets/esri/core/workers/chunks/2efd2496f7310142f928.js +1 -0
  9. package/assets/esri/core/workers/chunks/42880f0fac5f1606201c.js +1 -0
  10. package/assets/esri/core/workers/chunks/70eba80261d7fdc624ad.js +1 -0
  11. package/assets/esri/core/workers/chunks/{3dcb2a82e1e4b520c9c9.js → 7b901d0b68e5cc17533a.js} +1 -1
  12. package/assets/esri/core/workers/chunks/7f68c2cc1048d136fd1b.js +1 -0
  13. package/assets/esri/core/workers/chunks/85d6dd6703b228248e30.js +1 -0
  14. package/assets/esri/core/workers/chunks/adc138e5d9983a5752d4.js +1 -0
  15. package/assets/esri/core/workers/chunks/b35e87cf2b8244e3584f.js +1 -0
  16. package/assets/esri/core/workers/chunks/b49f830a8d74c4564ed8.js +1 -0
  17. package/assets/esri/core/workers/chunks/b6d77edf9eec757e88da.js +1 -0
  18. package/assets/esri/core/workers/chunks/c9306fb3ec1a2d5e137a.js +1 -0
  19. package/assets/esri/core/workers/chunks/cd201c627e9396edf6b9.js +1 -0
  20. package/assets/esri/core/workers/chunks/ceeaa8d1b0034b59eae7.js +1 -0
  21. package/assets/esri/core/workers/chunks/dc4a71e72e56cbdff49a.js +1 -0
  22. package/assets/esri/core/workers/chunks/f78b1bfacd95a6ccf7b4.js +1 -0
  23. package/assets/esri/themes/base/widgets/_LabeledSwitch.scss +6 -1
  24. package/assets/esri/themes/dark/main.css +1 -1
  25. package/assets/esri/themes/light/main.css +1 -1
  26. package/assets/esri/themes/light/view.css +1 -1
  27. package/core/sql/WhereClause.js +1 -1
  28. package/core/sql/sqlCompareUtils.js +1 -1
  29. package/core/sql/sqlDateParsingUtils.js +1 -1
  30. package/kernel.js +1 -1
  31. package/layers/support/FieldsIndex.js +1 -1
  32. package/package.json +1 -1
  33. package/support/revision.js +1 -1
  34. package/views/2d/engine/webgl/WorldExtentClipRenderer.js +1 -1
  35. package/views/webgl/FramebufferObject.js +1 -1
  36. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  37. package/widgets/Editor/workflowUtils.js +1 -1
  38. package/widgets/Features.js +1 -1
  39. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  40. package/widgets/support/LabeledSwitch.js +1 -1
  41. package/assets/esri/core/workers/chunks/16b56e541afa438dfb7f.js +0 -1
  42. package/assets/esri/core/workers/chunks/340ab726ba40fe3a99c8.js +0 -1
  43. package/assets/esri/core/workers/chunks/46b4a17ec898ab744861.js +0 -1
  44. package/assets/esri/core/workers/chunks/4f0412b52844aa9c7bd4.js +0 -1
  45. package/assets/esri/core/workers/chunks/5b80ae1eb79f1db75dc6.js +0 -1
  46. package/assets/esri/core/workers/chunks/80fcb63476829b6a48d2.js +0 -1
  47. package/assets/esri/core/workers/chunks/84725021c43f1122056a.js +0 -1
  48. package/assets/esri/core/workers/chunks/8cdece03397d01767593.js +0 -1
  49. package/assets/esri/core/workers/chunks/9607460895182d31aef9.js +0 -1
  50. package/assets/esri/core/workers/chunks/a0a86383e69932a25e50.js +0 -1
  51. package/assets/esri/core/workers/chunks/a3bf50d9e24ad1de9847.js +0 -1
  52. package/assets/esri/core/workers/chunks/a5db3be5eeb3005df3c1.js +0 -1
  53. package/assets/esri/core/workers/chunks/a87ab14d6a6ccc9004a0.js +0 -1
  54. package/assets/esri/core/workers/chunks/a8cf23c3a55c1834178c.js +0 -1
  55. package/assets/esri/core/workers/chunks/ba00df2e707550939a6f.js +0 -1
  56. package/assets/esri/core/workers/chunks/cfa6d1b63b794febe70a.js +0 -1
  57. package/assets/esri/core/workers/chunks/e0382138cf58191a9697.js +0 -1
  58. package/assets/esri/core/workers/chunks/fe0c6814ef56604540b3.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2934,5732],{84552:(e,t,r)=>{r.d(t,{Z:()=>c});var s=r(43697),i=r(2368),n=r(96674),o=r(35463),l=r(5600),a=(r(75215),r(67676),r(80442),r(36030)),u=r(52011),d=r(78981);let p=class extends((0,i.J)(n.wq)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.rJ)(this.value,this.unit,"milliseconds")}};(0,s._)([(0,a.J)(d.v,{nonNullable:!0})],p.prototype,"unit",void 0),(0,s._)([(0,l.Cb)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,s._)([(0,u.j)("esri.TimeInterval")],p);const c=p},5732:(e,t,r)=>{r.d(t,{c:()=>s,g:()=>i});var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},64830:(e,t,r)=>{r.d(t,{Z:()=>n});var s=r(58971),i=r(10661);class n{constructor(e=(e=>e.values().next().value)){this._peeker=e,this._observable=new i.s,this._items=new Set}get length(){return(0,s.it)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,s.it)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,s.it)(this._observable),yield*this._items}}},22862:(e,t,r)=>{r.d(t,{Hg:()=>y,V7:()=>h,uD:()=>c});var s=r(92036),i=r(46791),n=r(1153);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof s.Z}function a(e){return e instanceof i.Z?Object.keys(e.items):l(e)?(0,n.vw)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof i.Z?e.items[t]:e[t]}function d(e){return e?e.declaredClass:null}function p(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const s=a(e),i=a(t);if(0===s.length&&0===i.length)return;if(!s.length||!i.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const n=i.filter((e=>!s.includes(e))),c=s.filter((e=>!i.includes(e))),h=s.filter((r=>i.includes(r)&&u(e,r)!==u(t,r))).concat(n,c).sort(),y=d(e);if(y&&o.has(y)&&h.length)return{type:"complete",oldValue:e,newValue:t};let f;const m=l(e)&&l(t);for(const s of h){const i=u(e,s),n=u(t,s);let o;if((m||"function"!=typeof i&&"function"!=typeof n)&&i!==n&&(null!=i||null!=n)){if(r&&r[s]&&"function"==typeof r[s])o=r[s]?.(i,n);else if(i instanceof Date&&n instanceof Date){if(i.getTime()===n.getTime())continue;o={type:"complete",oldValue:i,newValue:n}}else o="object"==typeof i&&"object"==typeof n&&d(i)===d(n)?p(i,n):{type:"complete",oldValue:i,newValue:n};null!=o&&(null!=f?f.diff[s]=o:f={type:"partial",diff:{[s]:o}})}}return f}function c(e,t){if(null==e)return!1;const r=t.split(".");let s=e;for(const e of r){if("complete"===s.type)return!0;if("partial"!==s.type)return!1;{const t=s.diff[e];if(!t)return!1;s=t}}return!0}function h(e,t){for(const r of t)if(c(e,r))return!0;return!1}function y(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&d(e)!==d(t)?{type:"complete",oldValue:e,newValue:t}:p(e,t)}},80903:(e,t,r)=>{r.d(t,{Z:()=>u});var s=r(50758),i=r(92604),n=r(95330),o=r(64830),l=r(18948),a=r(728);class u{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new o.Z}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((r,s)=>{let i=!0;const o=e=>{(0,n.k_)(t.signal),i&&(i=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let i=0;i<e.length;++i){const l=e[i];(0,n.y8)(l)?this._clientPromises[i]=l.then((e=>(this._clients[i]=new a.default(e,t,this._ongoingJobsQueue),o(r),this._clients[i])),(()=>(o(s),null))):(this._clients[i]=new a.default(l,t,this._ongoingJobsQueue),this._clientPromises[i]=Promise.resolve(this._clients[i]),o(r))}}))}broadcast(e,t,r){const s=new Array(this._clientPromises.length);for(let i=0;i<this._clientPromises.length;++i){const n=this._clientPromises[i];s[i]=n.then((s=>s?.invoke(e,t,r)))}return s}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,n.zE)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,l.E)(this)}invoke(e,t,r){let s;Array.isArray(r)?(i.Z.getLogger("esri.core.workers.Connection").warn("invoke()","The transferList parameter is deprecated, use the options object instead"),s={transferList:r}):s=r;const o=(0,n.hh)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:s,resolver:o});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return o.promise}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,s.AL)(this._clients.map((r=>r.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let r=t.length;for(let s=0;s<this._clientPromises.length;++s)this._clientPromises[s].then((i=>{i&&(t[s]=i.openPort()),0==--r&&e(t)}))}))}get test(){return{numClients:this._clients.length}}}},18948:(e,t,r)=>{r.d(t,{E:()=>n,z:()=>i});const s=new FinalizationRegistry((e=>{e.close()}));function i(e,t){s.register(e,t,t)}function n(e){s.unregister(e)}},56569:(e,t,r)=>{r.d(t,{bA:()=>V});var s=r(20102),i=r(80442),n=r(95330),o=r(80903),l=r(18948),a=r(728),u=r(92604),d=r(70586),p=r(3172),c=r(17452);const h={async request(e,t){const r=e.options,s=r.responseType;r.signal=t?.signal,r.responseType="native"===s||"native-request-init"===s?"native-request-init":s&&["blob","json","text"].includes(s)&&(0,c.oh)(e.url)?.after?s:"array-buffer";const i=await(0,p.Z)(e.url,r),n={data:i.data,httpStatus:i.httpStatus,ssl:i.ssl};switch(i.requestOptions?.responseType){case"native-request-init":return delete n.data.signal,n;case"blob":n.data=await n.data.arrayBuffer();break;case"json":n.data=(new TextEncoder).encode(JSON.stringify(n.data)).buffer;break;case"text":n.data=(new TextEncoder).encode(n.data).buffer}return{result:n,transferList:[n.data]}}};var y=r(94362),f=r(99880),m=r(68773),g=(r(2587),r(40330));const b={};var w=r(41213);class v{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class _{constructor(){this._dispatcher=new v,this._workerPostMessage({type:y.MessageType.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,w.Y)((()=>{this._workerMessageHandler(new MessageEvent("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){(0,w.Y)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,y.QM)(e);if(t&&t.type===y.MessageType.OPEN){const{modulePath:e,jobId:r}=t;let s=await a.default.loadWorker(e);s||(s=await import(e));const i=a.default.connect(s);this._workerPostMessage({type:y.MessageType.OPENED,jobId:r,data:i})}}}var S=r(70171),F=r(17202);const C=u.Z.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:E}=y.MessageType;let T,x;const j="Failed to create Worker. Fallback to execute module in main thread";async function I(e){return new Promise((t=>{function r(i){const n=(0,y.QM)(i);n&&n.type===E&&(e.removeEventListener("message",r),e.removeEventListener("error",s),t(e))}function s(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",s),C.warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new _).addEventListener("message",r),e.addEventListener("error",s)}e.addEventListener("message",r),e.addEventListener("error",s)}))}let O=0;const{ABORT:N,INVOKE:k,OPEN:R,OPENED:P,RESPONSE:Z}=y.MessageType;class M{static async create(e){const t=await async function(){if(!(0,i.Z)("esri-workers"))return I(new _);if(!T&&!x)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,s)=>{if(t){if(t.aborted)return s(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:ABORT,jobId:n}),s(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:s}),self.postMessage({type:INVOKE,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\\nModules version: ${r}\\nAssets version: ${n??s}\\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case OPEN:let n;function t(e){const o=n.connect(e);self.postMessage({type:OPENED,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case RESPONSE:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split('"{CONFIGURATION}"').join(`'${function(){let e;if(null!=m.default.default){const t={...m.default};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(m.default));e.assetsPath=(0,c.hF)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,c.hF)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,S.Kd)(),e.has={"esri-csp-restrictions":(0,i.Z)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,i.Z)("esri-2d-update-debug"),"esri-2d-log-updating":(0,i.Z)("esri-2d-log-updating"),"featurelayer-pbf":(0,i.Z)("featurelayer-pbf"),"featurelayer-simplify-thresholds":(0,i.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,i.Z)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,i.Z)("featurelayer-simplify-mobile-factor"),"esri-atomics":(0,i.Z)("esri-atomics"),"esri-shared-array-buffer":(0,i.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,i.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,i.Z)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,i.Z)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,c.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,c.hF)(e.workers.workerPath):e.workers.workerPath=(0,c.hF)((0,f.V)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=m.default.workers.loaderConfig,r=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=b.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,S.Kd)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),s={buildDate:F.r,fullVersion:g.bR,revision:F.$};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:s})}()}'`);T=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){x=e||{}}let e;if(T)try{e=new Worker(T,{name:"esri-worker-"+O++})}catch(t){C.warn(j,x),e=new _}else C.warn(j,x),e=new _;return I(e)}();return new M(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),u.Z.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,s=(0,y.jt)();return new Promise(((t,i)=>{const o={resolve:t,reject:i,abortHandle:(0,n.$F)(r,(()=>{this._outJobs.delete(s),this._post({type:N,jobId:s})}))};this._outJobs.set(s,o),this._post({type:R,jobId:s,modulePath:e})}))}_onMessage(e){const t=(0,y.QM)(e);if(t)switch(t.type){case P:this._onOpenedMessage(t);break;case Z:this._onResponseMessage(t);break;case N:this._onAbortMessage(t);break;case k:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,s=t.get(r);s&&(s.controller&&s.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:s,abortable:i}=e,o=i?new AbortController:null,l=this._inJobs,a=h[t];let u;try{if("function"!=typeof a)throw new TypeError(`${t} is not a function`);u=a.call(null,s,{signal:o?o.signal:null})}catch(e){return void this._post({type:Z,jobId:r,error:(0,y.AB)(e)})}(0,n.y8)(u)?(l.set(r,{controller:o,promise:u}),u.then((e=>{l.has(r)&&(l.delete(r),this._post({type:Z,jobId:r},e))}),(e=>{l.has(r)&&(l.delete(r),e||(e={message:"Error encountered at method"+t}),(0,n.D_)(e)||this._post({type:Z,jobId:r,error:(0,y.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:Z,jobId:r},u)}_onOpenedMessage(e){const{jobId:t,data:r}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,d.hw)(s.abortHandle),s.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:i}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,d.hw)(n.abortHandle),r?n.reject(s.Z.fromJSON(JSON.parse(r))):n.resolve(i))}_post(e,t,r){return(0,y.oi)(this.worker,e,t,r)}}const J=(0,i.Z)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,i.Z)("workers-pool-size")):0;let D=(0,i.Z)("esri-mobile")?Math.min(J,3):J;D||(D=(0,i.Z)("safari")&&(0,i.Z)("mac")?7:2);let A=0;const L=[];async function q(e,t){const r=new o.Z,{registryTarget:s,...i}=t;return await r.open(e,i),s&&(0,l.z)(s,r),r}async function V(e,t={}){if("string"!=typeof e)throw new s.Z("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,i.Z)("host-webworker")&&!(0,i.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 s=t.client||r;return q([a.default.connect(r)],{...t,client:s})}if(await async function(){if(z)return z;U=new AbortController;const e=[];for(let t=0;t<D;t++){const r=M.create(t).then((e=>(L[t]=e,e)));e.push(r)}return z=Promise.all(e),z}(),(0,n.k_)(t.signal),"dedicated"===r){const r=A++%D;return q([await L[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,D);if(r<D){const s=new Array(r);for(let i=0;i<r;++i){const r=A++%D;s[i]=L[r].open(e,t)}return q(s,t)}}return q(L.map((r=>r.open(e,t))),t)}let U,z=null},60437:(e,t,r)=>{r.d(t,{G_:()=>b,HH:()=>o,JR:()=>y,TC:()=>l,Tn:()=>p,Ue:()=>i,al:()=>n,bZ:()=>f,cS:()=>h,dp:()=>u,fS:()=>g,is:()=>m,op:()=>d,pp:()=>a,t8:()=>c});var s=r(6570);function i(e=w){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,r,s,n,o,l=i()){return l[0]=e,l[1]=t,l[2]=r,l[3]=s,l[4]=n,l[5]=o,l}function o(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new s.Z(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function d(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function p(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function c(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function h(e){return e?c(e,b):i(b)}function y(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function f(e,t,r,s,i){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=s,e[4]=i,e[5]=Number.POSITIVE_INFINITY,e}function m(e){return 6===e.length}function g(e,t,r){if(null==e||null==t)return e===t;if(!m(e)||!m(t))return!1;if(r){for(let s=0;s<e.length;s++)if(!r(e[s],t[s]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(24470);const b=[1/0,1/0,1/0,-1/0,-1/0,-1/0],w=[0,0,0,0,0,0];i()},23477:(e,t,r)=>{r.r(t),r.d(t,{default:()=>G});var s=r(43697),i=(r(66577),r(51773)),n=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423),r(32400)),o=r(16453),l=r(95330),a=r(17452),u=r(5600),d=(r(75215),r(67676),r(80442)),p=r(52011),c=r(86973),h=r(87085),y=r(20102),f=r(83379),m=r(92604),g=r(56569),b=r(25278),w=r(74889),v=r(6570),_=r(38913);let S=class extends f.Z{constructor(){super(...arguments),this.type="geojson",this.refresh=(0,l.Ds)((async e=>{await this.load();const{extent:t,timeExtent:r}=await this._connection.invoke("refresh",e);return this.sourceJSON.extent=t,r&&(this.sourceJSON.timeInfo.timeExtent=[r.start,r.end]),{dataChanged:!0,updates:{extent:this.sourceJSON.extent,timeInfo:this.sourceJSON.timeInfo}}}))}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}applyEdits(e){return this.load().then((()=>this._applyEdits(e)))}openPorts(){return this.load().then((()=>this._connection.openPorts()))}queryFeatures(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t))).then((e=>w.Z.fromJSON(e)))}queryFeaturesJSON(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t)))}queryFeatureCount(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t)))}queryObjectIds(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t)))}queryExtent(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t))).then((e=>({count:e.count,extent:v.Z.fromJSON(e.extent)})))}querySnapping(e,t={}){return this.load(t).then((()=>this._connection.invoke("querySnapping",e,t)))}_applyEdits(e){if(!this._connection)throw new y.Z("geojson-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField,r=[],s=[],i=[];if(e.addFeatures)for(const t of e.addFeatures)r.push(this._serializeFeature(t));if(e.deleteFeatures)for(const r of e.deleteFeatures)"objectId"in r&&null!=r.objectId?s.push(r.objectId):"attributes"in r&&null!=r.attributes[t]&&s.push(r.attributes[t]);if(e.updateFeatures)for(const t of e.updateFeatures)i.push(this._serializeFeature(t));return this._connection.invoke("applyEdits",{adds:r,updates:i,deletes:s}).then((({extent:e,timeExtent:t,featureEditResults:r})=>(this.sourceJSON.extent=e,t&&(this.sourceJSON.timeInfo.timeExtent=[t.start,t.end]),this._createEditsResult(r))))}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new y.Z("geojson-layer-source:edit-failure",t.description,{code:t.code}):null}}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e);return r?{geometry:r.toJSON(),attributes:t}:{attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return null==t?null:"mesh"===t.type||"extent"===t.type?_.Z.fromExtent(t.extent):t}async _startWorker(e){this._connection=await(0,g.bA)("GeoJSONSourceWorker",{strategy:(0,d.Z)("feature-layers-workers")?"dedicated":"local",signal:e,registryTarget:this});const{fields:t,spatialReference:r,hasZ:s,geometryType:i,objectIdField:n,url:o,timeInfo:l,customParameters:a}=this.layer,u="defaults"===this.layer.originOf("spatialReference"),p={url:o,customParameters:a,fields:t&&t.map((e=>e.toJSON())),geometryType:c.M.toJSON(i),hasZ:s,objectIdField:n,timeInfo:l?l.toJSON():null,spatialReference:u?null:r&&r.toJSON()},h=await this._connection.invoke("load",p,{signal:e});for(const e of h.warnings)m.Z.getLogger(this.layer).warn("#load()",`$${e.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:e});h.featureErrors.length&&m.Z.getLogger(this.layer).warn("#load()",`Encountered ${h.featureErrors.length} validation errors while loading features. (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{errors:h.featureErrors}),this.sourceJSON=h.layerDefinition,this.capabilities=(0,b.MS)(this.sourceJSON.hasZ,!0)}};(0,s._)([(0,u.Cb)()],S.prototype,"capabilities",void 0),(0,s._)([(0,u.Cb)()],S.prototype,"type",void 0),(0,s._)([(0,u.Cb)({constructOnly:!0})],S.prototype,"layer",void 0),(0,s._)([(0,u.Cb)()],S.prototype,"sourceJSON",void 0),S=(0,s._)([(0,p.j)("esri.layers.graphics.sources.GeoJSONSource")],S);var F=r(71612),C=r(17017),E=r(69637),T=r(6404),x=r(38009),j=r(68825),I=r(16859),O=r(34760),N=r(72965),k=r(28294),R=r(21506),P=r(70082),Z=r(16451),M=r(1231),J=r(53518),D=r(69165),A=r(54306),L=r(30707),q=r(14165),V=r(32163),U=r(25031),z=r(82971);const B=(0,J.v)();let H=class extends((0,j.c)((0,C.N)((0,T.M)((0,E.b)((0,F.h)((0,k.n)((0,N.M)((0,O.Q)((0,x.q)((0,I.I)((0,o.R)(h.Z)))))))))))){constructor(e){super(e),this.copyright=null,this.dateFieldsTimeZone=null,this.definitionExpression=null,this.displayField=null,this.editingEnabled=!1,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="GeoJSON",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new S({layer:this}),this.spatialReference=z.Z.WGS84,this.templates=null,this.title="GeoJSON",this.type="geojson",this.typeIdField=null,this.types=null}destroy(){this.source?.destroy()}load(e){const t=this.loadFromPortal({supportedTypes:["GeoJson"],supportsData:!1},e).catch(l.r9).then((()=>this.source.load(e))).then((()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo"],"service"),(0,D.YN)(this.renderer,this.fieldsIndex),(0,D.UF)(this.timeInfo,this.fieldsIndex)}));return this.addResolvingPromise(t),Promise.resolve(this)}get capabilities(){return this.source?this.source.capabilities:null}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return this.loaded&&null==this.geometryType}get parsedUrl(){return this.url?(0,a.mN)(this.url):null}set renderer(e){(0,D.YN)(e,this.fieldsIndex),this._set("renderer",e)}set url(e){if(!e)return void this._set("url",e);const t=(0,a.mN)(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}async applyEdits(e,t){const{applyEdits:s}=await r.e(4720).then(r.bind(r,14720));await this.load();const i=await s(this,this.source,e,t);return this.read({extent:this.source.sourceJSON.extent,timeInfo:this.source.sourceJSON.timeInfo},{origin:"service",ignoreDefaults:!0}),i}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,V.eZ)(this,e)}createQuery(){const e=new q.Z,t=this.capabilities?.data;e.returnGeometry=!0,t&&t.supportsZ&&(e.returnZ=!0),e.outFields=["*"],e.where=this.definitionExpression||"1=1";const{timeOffset:r,timeExtent:s}=this;return e.timeExtent=null!=r&&null!=s?s.offset(-r.value,r.unit):s||null,e}getFieldDomain(e,t){let r,s=!1;const i=t?.feature,n=i?.attributes,o=this.typeIdField&&n?.[this.typeIdField];return null!=o&&this.types&&(s=this.types.some((t=>t.id==o&&(r=t.domains&&t.domains[e],r&&"inherited"===r.type&&(r=this._getLayerDomain(e)),!0)))),s||r||(r=this._getLayerDomain(e)),r}getField(e){return this.fieldsIndex.get(e)}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(q.Z.from(e)||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryObjectIds(e,t){return this.load().then((()=>this.source.queryObjectIds(q.Z.from(e)||this.createQuery(),t)))}queryFeatureCount(e,t){return this.load().then((()=>this.source.queryFeatureCount(q.Z.from(e)||this.createQuery(),t)))}queryExtent(e,t){return this.load().then((()=>this.source.queryExtent(q.Z.from(e)||this.createQuery(),t)))}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh(this.customParameters);return null!=t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}_getLayerDomain(e){if(!this.fields)return null;let t=null;return this.fields.some((r=>(r.name===e&&(t=r.domain),!!t))),t}};(0,s._)([(0,u.Cb)({readOnly:!0,json:{read:!1,write:!1}})],H.prototype,"capabilities",null),(0,s._)([(0,u.Cb)({type:String})],H.prototype,"copyright",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],H.prototype,"createQueryVersion",null),(0,s._)([(0,u.Cb)((0,U.mi)("dateFieldsTimeReference"))],H.prototype,"dateFieldsTimeZone",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],H.prototype,"defaultPopupTemplate",null),(0,s._)([(0,u.Cb)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],H.prototype,"definitionExpression",void 0),(0,s._)([(0,u.Cb)({type:String})],H.prototype,"displayField",void 0),(0,s._)([(0,u.Cb)({type:Boolean})],H.prototype,"editingEnabled",void 0),(0,s._)([(0,u.Cb)(R.PV)],H.prototype,"elevationInfo",void 0),(0,s._)([(0,u.Cb)({type:[M.Z],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],H.prototype,"fields",void 0),(0,s._)([(0,u.Cb)(B.fieldsIndex)],H.prototype,"fieldsIndex",void 0),(0,s._)([(0,u.Cb)({type:v.Z,json:{name:"extent"}})],H.prototype,"fullExtent",void 0),(0,s._)([(0,u.Cb)({type:["point","polygon","polyline","multipoint"],json:{read:{reader:c.M.read}}})],H.prototype,"geometryType",void 0),(0,s._)([(0,u.Cb)({type:Boolean})],H.prototype,"hasZ",void 0),(0,s._)([(0,u.Cb)(R.id)],H.prototype,"id",void 0),(0,s._)([(0,u.Cb)({type:Boolean,readOnly:!0})],H.prototype,"isTable",null),(0,s._)([(0,u.Cb)(R.iR)],H.prototype,"labelsVisible",void 0),(0,s._)([(0,u.Cb)({type:[A.Z],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:L.r},write:!0}})],H.prototype,"labelingInfo",void 0),(0,s._)([(0,u.Cb)(R.rn)],H.prototype,"legendEnabled",void 0),(0,s._)([(0,u.Cb)({type:["show","hide"]})],H.prototype,"listMode",void 0),(0,s._)([(0,u.Cb)({type:String,json:{name:"layerDefinition.objectIdField",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"objectIdField"}}}})],H.prototype,"objectIdField",void 0),(0,s._)([(0,u.Cb)(R.Oh)],H.prototype,"opacity",void 0),(0,s._)([(0,u.Cb)({type:["GeoJSON"]})],H.prototype,"operationalLayerType",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],H.prototype,"parsedUrl",null),(0,s._)([(0,u.Cb)(R.C_)],H.prototype,"popupEnabled",void 0),(0,s._)([(0,u.Cb)({type:i.Z,json:{name:"popupInfo",write:!0}})],H.prototype,"popupTemplate",void 0),(0,s._)([(0,u.Cb)({types:n.A,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:n.o}}}})],H.prototype,"renderer",null),(0,s._)([(0,u.Cb)(R.YI)],H.prototype,"screenSizePerspectiveEnabled",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],H.prototype,"source",void 0),(0,s._)([(0,u.Cb)({type:z.Z})],H.prototype,"spatialReference",void 0),(0,s._)([(0,u.Cb)({type:[P.Z]})],H.prototype,"templates",void 0),(0,s._)([(0,u.Cb)()],H.prototype,"title",void 0),(0,s._)([(0,u.Cb)({json:{read:!1},readOnly:!0})],H.prototype,"type",void 0),(0,s._)([(0,u.Cb)({type:String,readOnly:!0})],H.prototype,"typeIdField",void 0),(0,s._)([(0,u.Cb)({type:[Z.Z]})],H.prototype,"types",void 0),(0,s._)([(0,u.Cb)(R.HQ)],H.prototype,"url",null),H=(0,s._)([(0,p.j)("esri.layers.GeoJSONLayer")],H);const G=H},61159:(e,t,r)=>{r.d(t,{g:()=>s});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},25278:(e,t,r)=>{r.d(t,{Dm:()=>d,Hq:()=>p,MS:()=>c,bU:()=>l});var s=r(80442),i=r(22974),n=r(61159),o=r(58333);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?o.I4:"esriGeometryPolyline"===e?o.ET:o.lF}}}const a=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function d(e,t){if((0,s.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${a.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function p(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.d9)(e)}}]}function c(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:n.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},17017:(e,t,r)=>{r.d(t,{N:()=>o});var s=r(43697),i=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,s._)([(0,i.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,s._)([(0,n.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},69637:(e,t,r)=>{r.d(t,{b:()=>x});var s,i=r(43697),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011)),l=r(20102),a=r(96674),u=r(78286),d=r(72746),p=r(66577),c=r(92835),h=r(35454),y=r(22974),f=r(14165);const m=new h.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),g=new h.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let b=s=class extends a.wq{constructor(e){super(e),this.where=null,this.geometry=null,this.spatialRelationship="intersects",this.distance=void 0,this.objectIds=null,this.units=null,this.timeExtent=null}createQuery(e={}){const{where:t,geometry:r,spatialRelationship:s,timeExtent:i,objectIds:n,units:o,distance:l}=this;return new f.Z({geometry:(0,y.d9)(r),objectIds:(0,y.d9)(n),spatialRelationship:s,timeExtent:(0,y.d9)(i),where:t,units:o,distance:l,...e})}clone(){const{where:e,geometry:t,spatialRelationship:r,timeExtent:i,objectIds:n,units:o,distance:l}=this;return new s({geometry:(0,y.d9)(t),objectIds:(0,y.d9)(n),spatialRelationship:r,timeExtent:(0,y.d9)(i),where:e,units:o,distance:l})}};(0,i._)([(0,n.Cb)({type:String,json:{write:!0}})],b.prototype,"where",void 0),(0,i._)([(0,n.Cb)({types:p.qM,json:{write:!0}})],b.prototype,"geometry",void 0),(0,i._)([(0,n.Cb)({type:m.apiValues,json:{name:"spatialRel",read:{reader:m.read},write:{allowNull:!1,writer:m.write,overridePolicy(){return{enabled:null!=this.geometry}}}}})],b.prototype,"spatialRelationship",void 0),(0,i._)([(0,n.Cb)({type:Number,json:{write:{overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],b.prototype,"distance",void 0),(0,i._)([(0,n.Cb)({type:[Number],json:{write:!0}})],b.prototype,"objectIds",void 0),(0,i._)([(0,n.Cb)({type:g.apiValues,json:{read:g.read,write:{writer:g.write,overridePolicy(e){return{enabled:null!=e&&null!=this.geometry}}}}})],b.prototype,"units",void 0),(0,i._)([(0,n.Cb)({type:c.Z,json:{write:!0}})],b.prototype,"timeExtent",void 0),b=s=(0,i._)([(0,o.j)("esri.layers.support.FeatureFilter")],b);const w=b;var v;const _={read:{reader:d.ij},write:{writer:d.cW,overridePolicy(){return{allowNull:null!=this.excludedEffect,isRequired:null==this.excludedEffect}}}},S={read:{reader:d.ij},write:{writer:d.cW,overridePolicy(){return{allowNull:null!=this.includedEffect,isRequired:null==this.includedEffect}}}},F={name:"showExcludedLabels",default:!0};let C=v=class extends a.wq{constructor(e){super(e),this.filter=null,this.includedEffect=null,this.excludedEffect=null,this.excludedLabelsVisible=!1}write(e,t){const r=super.write(e,t);if(t?.origin){if(r.filter){const e=Object.keys(r.filter);if(e.length>1||"where"!==e[0])return t.messages?.push(new l.Z("web-document-write:unsupported-feature-effect","Invalid feature effect 'filter'. A filter can only contain a 'where' property",{layer:t.layer,effect:this})),null}if("showExcludedLabels"in r)return t.messages?.push(new l.Z("web-document-write:unsupported-feature-effect","Invalid value for property 'excludedLabelsVisible' which should always be 'true'",{layer:t.layer,effect:this})),null}return r}clone(){return new v({filter:null!=this.filter?this.filter.clone():null,includedEffect:this.includedEffect,excludedEffect:this.excludedEffect,excludedLabelsVisible:this.excludedLabelsVisible})}};(0,i._)([(0,n.Cb)({type:w,json:{write:{allowNull:!0,writer(e,t,r,s){const i=e?.write({},s);i&&0!==Object.keys(i).length?(0,u.RB)(r,i,t):(0,u.RB)(r,null,t)}}}})],C.prototype,"filter",void 0),(0,i._)([(0,n.Cb)({json:{write:!0,origins:{"web-map":_,"portal-item":_}}})],C.prototype,"includedEffect",void 0),(0,i._)([(0,n.Cb)({json:{write:!0,origins:{"web-map":S,"portal-item":S}}})],C.prototype,"excludedEffect",void 0),(0,i._)([(0,n.Cb)({type:Boolean,json:{write:!0,name:"showExcludedLabels",origins:{"web-map":F,"portal-item":F}}})],C.prototype,"excludedLabelsVisible",void 0),C=v=(0,i._)([(0,o.j)("esri.layers.support.FeatureEffect")],C);const E=C,T={write:{allowNull:!0}},x=e=>{let t=class extends e{constructor(){super(...arguments),this.featureEffect=null}};return(0,i._)([(0,n.Cb)({type:E,json:{origins:{"web-map":T,"portal-item":T}}})],t.prototype,"featureEffect",void 0),t=(0,i._)([(0,o.j)("esri.layers.mixins.FeatureEffectLayer")],t),t}},68825:(e,t,r)=>{r.d(t,{c:()=>f});var s,i=r(43697),n=r(78286),o=r(5600),l=(r(75215),r(67676),r(80442),r(52011)),a=r(35454),u=r(96674);const d=new a.X({asc:"ascending",desc:"descending"});let p=s=class extends u.wq{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new s({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,i._)([(0,o.Cb)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,i._)([(0,o.Cb)({type:String,json:{write:!0}})],p.prototype,"valueExpression",void 0),(0,i._)([(0,o.Cb)({type:d.apiValues,json:{read:d.read,write:d.write}})],p.prototype,"order",void 0),p=s=(0,i._)([(0,l.j)("esri.layers.support.OrderByInfo")],p);const c=p;function h(e,t,r){if(!e)return null;const s=e.find((e=>!!e.field));if(!s)return null;const i=new c;return i.read(s,r),[i]}function y(e,t,r,s){const i=e.find((e=>!!e.field));i&&(0,n.RB)(r,[i.toJSON()],t)}const f=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,i._)([(0,o.Cb)({type:[c],json:{origins:{"web-scene":{write:!1,read:!1}},read:{source:"layerDefinition.orderBy",reader:h},write:{target:"layerDefinition.orderBy",writer:y}}})],t.prototype,"orderBy",void 0),t=(0,i._)([(0,l.j)("esri.layers.mixins.OrderedLayer")],t),t}},34760:(e,t,r)=>{r.d(t,{Q:()=>w});var s=r(43697),i=r(92604),n=r(95330),o=r(5600),l=r(90578),a=(r(67676),r(80442),r(52011)),u=r(82960),d=r(46791),p=(r(66643),r(20102),r(26258),r(87538));const c=new d.Z,h=new WeakMap;function y(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&c.push(new WeakRef(e))}function f(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:f(t,e%t):0}let m=0,g=0;function b(){const e=Date.now();let t=!1;for(const r of c){const s=r.deref();s?s.refreshInterval&&e-(h.get(s)??0)+5>=6e4*s.refreshInterval&&(h.set(s,e),s.refresh(e)):t=!0}if(t)for(let e=c.length-1;e>=0;e--)c.at(e).deref()||c.removeAt(e)}(0,p.EH)((()=>{const e=Date.now();let t=0;for(const r of c){const s=r.deref();s&&(t=f(Math.round(6e4*s.refreshInterval),t),s.refreshInterval?h.get(s)||h.set(s,e):h.delete(s))}if(t!==g){if(g=t,clearInterval(m),0===g)return void(m=0);m=setInterval(b,g)}}));const w=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,n.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||y(this)}),(()=>{}))}destroy(){!function(e){const t=c.find((t=>t.deref()===e));t&&c.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,n.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{i.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,s._)([(0,o.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:u.C}}}}})],t.prototype,"refreshInterval",void 0),(0,s._)([(0,l.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,s._)([(0,o.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,s._)([(0,o.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,s._)([(0,a.j)("esri.layers.mixins.RefreshableLayer")],t),t}},28294:(e,t,r)=>{r.d(t,{n:()=>c});var s=r(43697),i=r(92835),n=r(84552),o=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),u=r(69165),d=r(76259),p=r(78981);const c=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const s=r.timeOffset,i=p.v.fromJSON(r.timeOffsetUnits);return s&&i?new n.Z({value:s,unit:i}):null}set timeInfo(e){(0,u.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,s._)([(0,o.Cb)({type:i.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,s._)([(0,o.Cb)({type:n.Z})],t.prototype,"timeOffset",void 0),(0,s._)([(0,l.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,s._)([(0,o.Cb)({value:null,type:d.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,s._)([(0,o.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,s._)([(0,a.j)("esri.layers.mixins.TemporalLayer")],t),t}},70082:(e,t,r)=>{r.d(t,{Z:()=>p});var s=r(43697),i=r(2368),n=r(35454),o=r(96674),l=r(5600),a=(r(75215),r(67676),r(80442),r(52011));const u=new n.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let d=class extends((0,i.J)(o.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,s._)([(0,l.Cb)({json:{write:!0}})],d.prototype,"name",void 0),(0,s._)([(0,l.Cb)({json:{write:!0}})],d.prototype,"description",void 0),(0,s._)([(0,l.Cb)({json:{read:u.read,write:u.write}})],d.prototype,"drawingTool",void 0),(0,s._)([(0,l.Cb)({json:{write:!0}})],d.prototype,"prototype",void 0),(0,s._)([(0,l.Cb)({json:{write:!0}})],d.prototype,"thumbnail",void 0),d=(0,s._)([(0,a.j)("esri.layers.support.FeatureTemplate")],d);const p=d},16451:(e,t,r)=>{r.d(t,{Z:()=>h});var s=r(43697),i=r(2368),n=r(96674),o=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),u=r(30556),d=r(72729),p=r(70082);let c=class extends((0,i.J)(n.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,d.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,s._)([(0,o.Cb)({json:{write:!0}})],c.prototype,"id",void 0),(0,s._)([(0,o.Cb)({json:{write:!0}})],c.prototype,"name",void 0),(0,s._)([(0,o.Cb)({json:{write:!0}})],c.prototype,"domains",void 0),(0,s._)([(0,l.r)("domains")],c.prototype,"readDomains",null),(0,s._)([(0,u.c)("domains")],c.prototype,"writeDomains",null),(0,s._)([(0,o.Cb)({type:[p.Z],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,s._)([(0,a.j)("esri.layers.support.FeatureType")],c);const h=c},1231:(e,t,r)=>{r.d(t,{Z:()=>m});var s,i=r(43697),n=r(35454),o=r(96674),l=r(5600),a=r(75215),u=(r(67676),r(80442),r(36030)),d=r(71715),p=r(52011),c=r(72729),h=r(86719);const y=new n.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let f=s=class extends o.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?y.fromJSON(r.fieldValueType):null}clone(){return new s({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,i._)([(0,l.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,i._)([(0,l.Cb)()],f.prototype,"description",void 0),(0,i._)([(0,d.r)("description")],f.prototype,"readDescription",null),(0,i._)([(0,l.Cb)({types:c.V5,json:{read:{reader:c.im},write:!0}})],f.prototype,"domain",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,i._)([(0,l.Cb)({type:a.z8,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],f.prototype,"length",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,i._)([(0,u.J)(h.v)],f.prototype,"type",void 0),(0,i._)([(0,l.Cb)()],f.prototype,"valueType",void 0),(0,i._)([(0,d.r)("valueType",["description"])],f.prototype,"readValueType",null),(0,i._)([(0,l.Cb)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=s=(0,i._)([(0,p.j)("esri.layers.support.Field")],f);const m=f},99514:(e,t,r)=>{r.d(t,{Z:()=>a});var s=r(20102),i=r(96674),n=r(92604),o=r(69165),l=r(25031);class a{static fromJSON(e){return new a(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new a(e.fields??[],c(e))}static fromLayerJSON(e){return new a(e.fields??[],c(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,s=d(t);if(t&&s){const i=u(t);this._fieldsMap.set(t,e),this._fieldsMap.set(i,e),this._normalizedFieldsMap.set(s,e),r.push(`${i}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,o.y2)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,o.H7)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,o.Dl)(e)||(0,o.Se)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,o.Dl)(e)||(0,o.Se)(e)||e.nullable||void 0!==(0,o.os)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(u(e))??this._normalizedFieldsMap.get(d(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.Z.getLogger("esri.layers.support.FieldsIndex").error(new s.Z("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),l.pt):p.has(t.type)?l._4:null:null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,o.sX)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,i.AK)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function u(e){return e.trim().toLowerCase()}function d(e){return(0,o.q6)(e)?.toLowerCase()??""}const p=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function c(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:s,editFieldsInfo:i}=e,n=(s?"startField"in s?s.startField:s.startTimeField:"")??"",o=(s?"endField"in s?s.endField:s.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,l.Jv)(e.dateFieldsTimeReference):null,d=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.dateFieldsTimeReference?(0,l.Jv)(i.dateFieldsTimeReference):a??l.pt:null,c=s?function(e){return"timeZone"in e}(s)?s.timeZone??a:s.timeReference?(0,l.Jv)(s.timeReference):a:null,h=new Map([[u(i?.creationDateField??""),d],[u(i?.editDateField??""),d],[u(n),c],[u(o),c]]);for(const{name:s,type:i}of e.fields)if(p.has(i))t.set(s,l._4);else if("date"!==i&&"esriFieldTypeDate"!==i)t.set(s,null);else if(r)t.set(s,l._4);else{const e=h.get(u(s??""))??a;t.set(s,e)}return t}},76259:(e,t,r)=>{r.d(t,{Z:()=>f});var s=r(43697),i=r(92835),n=r(84552),o=r(2368),l=r(96674),a=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),d=r(52011),p=r(30556),c=r(25031);function h(e,t){return n.Z.fromJSON({value:e,unit:t})}let y=class extends((0,o.J)(l.wq)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),s=new Date(t.timeExtent[1]);return new i.Z({start:r,end:s})}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?h(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?h(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,s._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],y.prototype,"cumulative",void 0),(0,s._)([(0,a.Cb)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"endField",void 0),(0,s._)([(0,a.Cb)({type:i.Z,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"fullTimeExtent",void 0),(0,s._)([(0,u.r)("fullTimeExtent",["timeExtent"])],y.prototype,"readFullTimeExtent",null),(0,s._)([(0,p.c)("fullTimeExtent")],y.prototype,"writeFullTimeExtent",null),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"hasLiveData",void 0),(0,s._)([(0,a.Cb)({type:n.Z,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"interval",void 0),(0,s._)([(0,u.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],y.prototype,"readInterval",null),(0,s._)([(0,p.c)("interval")],y.prototype,"writeInterval",null),(0,s._)([(0,a.Cb)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"startField",void 0),(0,s._)([(0,a.Cb)((0,c.mi)("timeReference",!0))],y.prototype,"timeZone",void 0),(0,s._)([(0,a.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"trackIdField",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],y.prototype,"useTime",void 0),y=(0,s._)([(0,d.j)("esri.layers.support.TimeInfo")],y);const f=y},72729:(e,t,r)=>{r.d(t,{im:()=>C,V5:()=>F}),r(80442);var s,i=r(43697),n=r(22974),o=r(5600),l=(r(75215),r(36030)),a=r(52011),u=r(96674);r(67676);let d=s=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new s({name:this.name,code:this.code})}};(0,i._)([(0,o.Cb)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,i._)([(0,o.Cb)({type:[String,Number],json:{write:!0}})],d.prototype,"code",void 0),d=s=(0,i._)([(0,a.j)("esri.layers.support.CodedValue")],d);const p=new(r(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,i._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,i._)([(0,l.J)(p)],c.prototype,"type",void 0),c=(0,i._)([(0,a.j)("esri.layers.support.Domain")],c);const h=c;var y;let f=y=class extends h{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new y({codedValues:(0,n.d9)(this.codedValues),name:this.name})}};(0,i._)([(0,o.Cb)({type:[d],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,i._)([(0,l.J)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=y=(0,i._)([(0,a.j)("esri.layers.support.CodedValueDomain")],f);const m=f;var g;r(92604),r(20102);let b=g=class extends h{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,i._)([(0,l.J)({inherited:"inherited"})],b.prototype,"type",void 0),b=g=(0,i._)([(0,a.j)("esri.layers.support.InheritedDomain")],b);const w=b;var v;let _=v=class extends h{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new v({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,i._)([(0,o.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],_.prototype,"maxValue",void 0),(0,i._)([(0,o.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],_.prototype,"minValue",void 0),(0,i._)([(0,l.J)({range:"range"})],_.prototype,"type",void 0),_=v=(0,i._)([(0,a.j)("esri.layers.support.RangeDomain")],_);const S=_,F={key:"type",base:h,typeMap:{range:_,"coded-value":m,inherited:w}};function C(e){if(!e?.type)return null;switch(e.type){case"range":return S.fromJSON(e);case"codedValue":return m.fromJSON(e);case"inherited":return w.fromJSON(e)}return null}},86719:(e,t,r)=>{r.d(t,{v:()=>s});const s=new(r(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},78981:(e,t,r)=>{r.d(t,{v:()=>s});const s=(0,r(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},74889:(e,t,r)=>{r.d(t,{Z:()=>w});var s,i=r(43697),n=r(66577),o=r(38171),l=r(35454),a=r(96674),u=r(22974),d=r(5600),p=(r(75215),r(71715)),c=r(52011),h=r(30556),y=r(82971),f=r(33955),m=r(1231);const g=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=s=class extends a.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=y.Z.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const i=e[t],n=o.Z.fromJSON(i),l=i.geometry?.spatialReference;null==n.geometry||l||(n.geometry.spatialReference=r);const a=i.aggregateGeometries,u=n.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],s=a[e],i=s?.spatialReference;null==t||i||(t.spatialReference=r)}s.push(n)}return s}writeGeometryType(e,t,r,s){if(e)return void g.write(e,t,r,s);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,f.im)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=y.Z.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const s=t.features[r];if(s.geometry){const t=e?.[r];s.geometry=t?.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,i]}=e,n=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((i-e)/r)));for(let e=0,t=n.length;e<t;e++)o?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[s,i],scale:[n,o]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*n+s),(e=>i-e*o),l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let s,i;const n=[];for(let o=0,l=e.length;o<l;o++){const l=e[o];if(o>0){const e=t(l[0]),o=r(l[1]);e===s&&o===i||(n.push([e-s,o-i]),s=e,i=o)}else s=t(l[0]),i=r(l[1]),n.push([s,i])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,f.oU)(e)?e.rings:e.paths,i=[];for(let e=0,n=s.length;e<n;e++){const n=s[e],o=this._quantizePoints(n,t,r);o&&i.push(o)}return i.length>0?((0,f.oU)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,s,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,f.oU)(e)?e.rings:e.paths;let o,l;for(let e=0,s=n.length;e<s;e++){const s=n[e];for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(o+=i[0],l+=i[1]):(o=i[0],l=i[1]),i[0]=t(o),i[1]=r(l)}}if(s&&i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2]),r[3]=i(r[3])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let o,l;for(let e=0,s=n.length;e<s;e++){const s=n[e];e>0?(o+=s[0],l+=s[1]):(o=s[0],l=s[1]),s[0]=t(o),s[1]=r(l)}if(s&&i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2]),t[3]=i(t[3])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,d.Cb)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,d.Cb)({type:[o.Z],json:{write:!0}})],b.prototype,"features",void 0),(0,i._)([(0,p.r)("features")],b.prototype,"readFeatures",null),(0,i._)([(0,d.Cb)({type:[m.Z],json:{write:!0}})],b.prototype,"fields",void 0),(0,i._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],b.prototype,"geometryType",void 0),(0,i._)([(0,h.c)("geometryType")],b.prototype,"writeGeometryType",null),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,i._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,i._)([(0,d.Cb)({types:n.qM,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,i._)([(0,p.r)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,i._)([(0,d.Cb)({type:y.Z,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,i._)([(0,h.c)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,i._)([(0,d.Cb)({json:{write:!0}})],b.prototype,"transform",void 0),b=s=(0,i._)([(0,c.j)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0;const w=b},58333:(e,t,r)=>{r.d(t,{ET:()=>n,I4:()=>i,eG:()=>a,lF:()=>o,lj:()=>d,qP:()=>l,wW:()=>u});const s=[252,146,31,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},n={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},a={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},d={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[447,5732],{5732:(e,t,r)=>{r.d(t,{c:()=>i,g:()=>s});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function s(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},22862:(e,t,r)=>{r.d(t,{Hg:()=>f,V7:()=>y,uD:()=>c});var i=r(92036),s=r(46791),n=r(1153);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof i.Z}function a(e){return e instanceof s.Z?Object.keys(e.items):l(e)?(0,n.vw)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof s.Z?e.items[t]:e[t]}function p(e){return e?e.declaredClass:null}function d(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=a(e),s=a(t);if(0===i.length&&0===s.length)return;if(!i.length||!s.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const n=s.filter((e=>!i.includes(e))),c=i.filter((e=>!s.includes(e))),y=i.filter((r=>s.includes(r)&&u(e,r)!==u(t,r))).concat(n,c).sort(),f=p(e);if(f&&o.has(f)&&y.length)return{type:"complete",oldValue:e,newValue:t};let m;const h=l(e)&&l(t);for(const i of y){const s=u(e,i),n=u(t,i);let o;if((h||"function"!=typeof s&&"function"!=typeof n)&&s!==n&&(null!=s||null!=n)){if(r&&r[i]&&"function"==typeof r[i])o=r[i]?.(s,n);else if(s instanceof Date&&n instanceof Date){if(s.getTime()===n.getTime())continue;o={type:"complete",oldValue:s,newValue:n}}else o="object"==typeof s&&"object"==typeof n&&p(s)===p(n)?d(s,n):{type:"complete",oldValue:s,newValue:n};null!=o&&(null!=m?m.diff[i]=o:m={type:"partial",diff:{[i]:o}})}}return m}function c(e,t){if(null==e)return!1;const r=t.split(".");let i=e;for(const e of r){if("complete"===i.type)return!0;if("partial"!==i.type)return!1;{const t=i.diff[e];if(!t)return!1;i=t}}return!0}function y(e,t){for(const r of t)if(c(e,r))return!0;return!1}function f(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&p(e)!==p(t)?{type:"complete",oldValue:e,newValue:t}:d(e,t)}},60437:(e,t,r)=>{r.d(t,{G_:()=>v,HH:()=>o,JR:()=>f,TC:()=>l,Tn:()=>d,Ue:()=>s,al:()=>n,bZ:()=>m,cS:()=>y,dp:()=>u,fS:()=>g,is:()=>h,op:()=>p,pp:()=>a,t8:()=>c});var i=r(6570);function s(e=w){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function n(e,t,r,i,n,o,l=s()){return l[0]=e,l[1]=t,l[2]=r,l[3]=i,l[4]=n,l[5]=o,l}function o(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.Z(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function p(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function d(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function c(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function y(e){return e?c(e,v):s(v)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function m(e,t,r,i,s){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=s,e[5]=Number.POSITIVE_INFINITY,e}function h(e){return 6===e.length}function g(e,t,r){if(null==e||null==t)return e===t;if(!h(e)||!h(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(24470);const v=[1/0,1/0,1/0,-1/0,-1/0,-1/0],w=[0,0,0,0,0,0];s()},54295:(e,t,r)=>{r.d(t,{V:()=>o});var i=r(43697),s=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const o=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,s.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>a});var i=r(43697),s=r(92604),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011)),l=r(66677);const a=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(null!=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)))}};return(0,i._)([(0,n.Cb)()],t.prototype,"title",null),(0,i._)([(0,n.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,o.j)("esri.layers.mixins.ArcGISService")],t),t}},17017:(e,t,r)=>{r.d(t,{N:()=>o});var i=r(43697),s=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const o=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,s.Cb)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,n.j)("esri.layers.mixins.CustomParametersMixin")],t),t}},34760:(e,t,r)=>{r.d(t,{Q:()=>w});var i=r(43697),s=r(92604),n=r(95330),o=r(5600),l=r(90578),a=(r(67676),r(80442),r(52011)),u=r(82960),p=r(46791),d=(r(66643),r(20102),r(26258),r(87538));const c=new p.Z,y=new WeakMap;function f(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&c.push(new WeakRef(e))}function m(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:m(t,e%t):0}let h=0,g=0;function v(){const e=Date.now();let t=!1;for(const r of c){const i=r.deref();i?i.refreshInterval&&e-(y.get(i)??0)+5>=6e4*i.refreshInterval&&(y.set(i,e),i.refresh(e)):t=!0}if(t)for(let e=c.length-1;e>=0;e--)c.at(e).deref()||c.removeAt(e)}(0,d.EH)((()=>{const e=Date.now();let t=0;for(const r of c){const i=r.deref();i&&(t=m(Math.round(6e4*i.refreshInterval),t),i.refreshInterval?y.get(i)||y.set(i,e):y.delete(i))}if(t!==g){if(g=t,clearInterval(h),0===g)return void(h=0);h=setInterval(v,g)}}));const w=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,n.Ds)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||f(this)}),(()=>{}))}destroy(){!function(e){const t=c.find((t=>t.deref()===e));t&&c.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,n.R8)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{s.Z.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){const e=this;return{set refreshInterval(t){e._set("refreshInterval",t)}}}};return(0,i._)([(0,o.Cb)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:u.C}}}}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,l.p)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,i._)([(0,o.Cb)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,o.Cb)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,i._)([(0,a.j)("esri.layers.mixins.RefreshableLayer")],t),t}},70082:(e,t,r)=>{r.d(t,{Z:()=>d});var i=r(43697),s=r(2368),n=r(35454),o=r(96674),l=r(5600),a=(r(75215),r(67676),r(80442),r(52011));const u=new n.X({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends((0,s.J)(o.wq)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"name",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"description",void 0),(0,i._)([(0,l.Cb)({json:{read:u.read,write:u.write}})],p.prototype,"drawingTool",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,i._)([(0,a.j)("esri.layers.support.FeatureTemplate")],p);const d=p},16451:(e,t,r)=>{r.d(t,{Z:()=>y});var i=r(43697),s=r(2368),n=r(96674),o=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),u=r(30556),p=r(72729),d=r(70082);let c=class extends((0,s.J)(n.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,o.Cb)({json:{write:!0}})],c.prototype,"id",void 0),(0,i._)([(0,o.Cb)({json:{write:!0}})],c.prototype,"name",void 0),(0,i._)([(0,o.Cb)({json:{write:!0}})],c.prototype,"domains",void 0),(0,i._)([(0,l.r)("domains")],c.prototype,"readDomains",null),(0,i._)([(0,u.c)("domains")],c.prototype,"writeDomains",null),(0,i._)([(0,o.Cb)({type:[d.Z],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,i._)([(0,a.j)("esri.layers.support.FeatureType")],c);const y=c},1231:(e,t,r)=>{r.d(t,{Z:()=>h});var i,s=r(43697),n=r(35454),o=r(96674),l=r(5600),a=r(75215),u=(r(67676),r(80442),r(36030)),p=r(71715),d=r(52011),c=r(72729),y=r(86719);const f=new n.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=i=class extends o.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?f.fromJSON(r.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,s._)([(0,l.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,s._)([(0,l.Cb)()],m.prototype,"description",void 0),(0,s._)([(0,p.r)("description")],m.prototype,"readDescription",null),(0,s._)([(0,l.Cb)({types:c.V5,json:{read:{reader:c.im},write:!0}})],m.prototype,"domain",void 0),(0,s._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,s._)([(0,l.Cb)({type:a.z8,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,s._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,s._)([(0,u.J)(y.v)],m.prototype,"type",void 0),(0,s._)([(0,l.Cb)()],m.prototype,"valueType",void 0),(0,s._)([(0,p.r)("valueType",["description"])],m.prototype,"readValueType",null),(0,s._)([(0,l.Cb)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=i=(0,s._)([(0,d.j)("esri.layers.support.Field")],m);const h=m},99514:(e,t,r)=>{r.d(t,{Z:()=>a});var i=r(20102),s=r(96674),n=r(92604),o=r(69165),l=r(25031);class a{static fromJSON(e){return new a(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new a(e.fields??[],c(e))}static fromLayerJSON(e){return new a(e.fields??[],c(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=p(t);if(t&&i){const s=u(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(i,e),r.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,o.y2)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,o.H7)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,o.Dl)(e)||(0,o.Se)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,o.Dl)(e)||(0,o.Se)(e)||e.nullable||void 0!==(0,o.os)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(u(e))??this._normalizedFieldsMap.get(p(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(n.Z.getLogger("esri.layers.support.FieldsIndex").error(new i.Z("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),l.pt):d.has(t.type)?l._4:null:null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,o.sX)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,s.AK)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function u(e){return e.trim().toLowerCase()}function p(e){return(0,o.q6)(e)?.toLowerCase()??""}const d=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function c(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:s}=e,n=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,l.Jv)(e.dateFieldsTimeReference):null,p=s?function(e){return"timeZone"in e}(s)?s.timeZone??a:s.dateFieldsTimeReference?(0,l.Jv)(s.dateFieldsTimeReference):a??l.pt:null,c=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.timeReference?(0,l.Jv)(i.timeReference):a:null,y=new Map([[u(s?.creationDateField??""),p],[u(s?.editDateField??""),p],[u(n),c],[u(o),c]]);for(const{name:i,type:s}of e.fields)if(d.has(s))t.set(i,l._4);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(i,null);else if(r)t.set(i,l._4);else{const e=y.get(u(i??""))??a;t.set(i,e)}return t}},56765:(e,t,r)=>{r.d(t,{Z:()=>p});var i,s=r(43697),n=r(46791),o=r(96674),l=r(5600),a=(r(75215),r(67676),r(80442),r(52011));let u=i=class extends o.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new n.Z}clone(){return new i({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,s._)([(0,l.Cb)({type:String,json:{write:!0}})],u.prototype,"floorField",void 0),(0,s._)([(0,l.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllMode",void 0),(0,s._)([(0,l.Cb)({json:{read:!1,write:!1}})],u.prototype,"viewAllLevelIds",void 0),u=i=(0,s._)([(0,a.j)("esri.layers.support.LayerFloorInfo")],u);const p=u},72729:(e,t,r)=>{r.d(t,{im:()=>T,V5:()=>_}),r(80442);var i,s=r(43697),n=r(22974),o=r(5600),l=(r(75215),r(36030)),a=r(52011),u=r(96674);r(67676);let p=i=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,s._)([(0,o.Cb)({type:[String,Number],json:{write:!0}})],p.prototype,"code",void 0),p=i=(0,s._)([(0,a.j)("esri.layers.support.CodedValue")],p);const d=new(r(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,s._)([(0,l.J)(d)],c.prototype,"type",void 0),c=(0,s._)([(0,a.j)("esri.layers.support.Domain")],c);const y=c;var f;let m=f=class extends y{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,n.d9)(this.codedValues),name:this.name})}};(0,s._)([(0,o.Cb)({type:[p],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,s._)([(0,l.J)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=f=(0,s._)([(0,a.j)("esri.layers.support.CodedValueDomain")],m);const h=m;var g;r(92604),r(20102);let v=g=class extends y{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,s._)([(0,l.J)({inherited:"inherited"})],v.prototype,"type",void 0),v=g=(0,s._)([(0,a.j)("esri.layers.support.InheritedDomain")],v);const w=v;var F;let b=F=class extends y{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new F({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,s._)([(0,o.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],b.prototype,"maxValue",void 0),(0,s._)([(0,o.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],b.prototype,"minValue",void 0),(0,s._)([(0,l.J)({range:"range"})],b.prototype,"type",void 0),b=F=(0,s._)([(0,a.j)("esri.layers.support.RangeDomain")],b);const S=b,_={key:"type",base:y,typeMap:{range:b,"coded-value":h,inherited:w}};function T(e){if(!e?.type)return null;switch(e.type){case"range":return S.fromJSON(e);case"codedValue":return h.fromJSON(e);case"inherited":return w.fromJSON(e)}return null}},86719:(e,t,r)=>{r.d(t,{v:()=>i});const i=new(r(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},54275:(e,t,r)=>{r.d(t,{h:()=>d});var i=r(80442),s=r(66677);function n(e,t,r){return!!l(e,t,r)}function o(e,t,r){return l(e,t,r)}function l(e,t,r){return e&&e.hasOwnProperty(t)?e[t]:r}const a={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"};function u(e){const t=e?.supportedSpatialAggregationStatistics?.map((e=>e.toLowerCase()));return{envelope:!!t?.includes("envelopeaggregate"),centroid:!!t?.includes("centroidaggregate"),convexHull:!!t?.includes("convexhullaggregate")}}function p(e,t){const r=e?.supportedOperationsWithCacheHint?.map((e=>e.toLowerCase()));return!!r?.includes(t.toLowerCase())}function d(e,t){return{analytics:c(e),attachment:y(e),data:f(e),metadata:m(e),operations:h(e.capabilities,e,t),query:g(e,t),queryRelated:v(e),queryTopFeatures:w(e),editing:F(e)}}function c(e){return{supportsCacheHint:p(e.advancedQueryCapabilities,"queryAnalytics")}}function y(e){const t=e.attachmentProperties,r={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:p(e.advancedQueryCapabilities,"queryAttachments"),supportsResize:n(e,"supportsAttachmentsResizing",!1)};return t&&Array.isArray(t)&&t.forEach((e=>{const t=a[e.name];t&&(r[t]=!!e.isEnabled)})),r}function f(e){return{isVersioned:n(e,"isDataVersioned",!1),supportsAttachment:n(e,"hasAttachments",!1),supportsM:n(e,"hasM",!1),supportsZ:n(e,"hasZ",!1)}}function m(e){return{supportsAdvancedFieldProperties:n(e,"supportsFieldDescriptionProperty",!1)}}function h(e,t,r){const i=e?e.toLowerCase().split(",").map((e=>e.trim())):[],o=r?(0,s.Qc)(r):null,l=i.includes(null!=o&&"MapServer"===o.serverType?"data":"query"),a=i.includes("editing")&&!t.datesInUnknownTimezone;let u=a&&i.includes("create"),p=a&&i.includes("delete"),d=a&&i.includes("update");const c=i.includes("changetracking"),y=t.advancedQueryCapabilities;return a&&!(u||p||d)&&(u=p=d=!0),{supportsCalculate:n(t,"supportsCalculate",!1),supportsTruncate:n(t,"supportsTruncate",!1),supportsValidateSql:n(t,"supportsValidateSql",!1),supportsAdd:u,supportsDelete:p,supportsEditing:a,supportsChangeTracking:c,supportsQuery:l,supportsQueryAnalytics:n(y,"supportsQueryAnalytic",!1),supportsQueryAttachments:n(y,"supportsQueryAttachments",!1),supportsQueryTopFeatures:n(y,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:n(t,"supportsAttachmentsResizing",!1),supportsSync:i.includes("sync"),supportsUpdate:d,supportsExceedsLimitStatistics:n(t,"supportsExceedsLimitStatistics",!1),supportsAsyncConvert3D:n(t,"supportsAsyncConvert3D",!1)}}function g(e,t){const r=e.advancedQueryCapabilities,l=e.ownershipBasedAccessControlForFeatures,a=e.archivingInfo,d=e.currentVersion,c=t?.includes("MapServer"),y=!c||d>=(0,i.Z)("mapserver-pbf-version-support"),f=(0,s.M8)(t),m=new Set((e.supportedQueryFormats??"").split(",").map((e=>e.toLowerCase().trim())));return{supportsStatistics:n(r,"supportsStatistics",e.supportsStatistics),supportsPercentileStatistics:n(r,"supportsPercentileStatistics",!1),supportsSpatialAggregationStatistics:n(r,"supportsSpatialAggregationStatistics",!1),supportedSpatialAggregationStatistics:u(r),supportsCentroid:n(r,"supportsReturningGeometryCentroid",!1),supportsDistance:n(r,"supportsQueryWithDistance",!1),supportsDistinct:n(r,"supportsDistinct",e.supportsAdvancedQueries),supportsExtent:n(r,"supportsReturningQueryExtent",!1),supportsGeometryProperties:n(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:n(r,"supportsHavingClause",!1),supportsOrderBy:n(r,"supportsOrderBy",e.supportsAdvancedQueries),supportsPagination:n(r,"supportsPagination",!1),supportsQuantization:n(e,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:n(e,"supportsQuantizationEditMode",!1),supportsQueryGeometry:n(e,"supportsReturningQueryGeometry",!1),supportsResultType:n(r,"supportsQueryWithResultType",!1),supportsMaxRecordCountFactor:n(r,"supportsMaxRecordCountFactor",!1),supportsSqlExpression:n(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:n(e,"useStandardizedQueries",!1),supportsTopFeaturesQuery:n(r,"supportsTopFeaturesQuery",!1),supportsQueryByAnonymous:n(l,"allowAnonymousToQuery",!0),supportsQueryByOthers:n(l,"allowOthersToQuery",!0),supportsHistoricMoment:n(a,"supportsQueryWithHistoricMoment",!1),supportsFormatPBF:y&&m.has("pbf"),supportsDisjointSpatialRelationship:n(r,"supportsDisjointSpatialRel",!1),supportsCacheHint:n(r,"supportsQueryWithCacheHint",!1)||p(r,"query"),supportsDefaultSpatialReference:n(r,"supportsDefaultSR",!1),supportsCompactGeometry:f,supportsFullTextSearch:n(r,"supportsFullTextSearch",!1),maxRecordCountFactor:o(e,"maxRecordCountFactor",void 0),maxRecordCount:o(e,"maxRecordCount",void 0),standardMaxRecordCount:o(e,"standardMaxRecordCount",void 0),tileMaxRecordCount:o(e,"tileMaxRecordCount",void 0)}}function v(e){const t=e.advancedQueryCapabilities,r=n(t,"supportsAdvancedQueryRelated",!1);return{supportsPagination:n(t,"supportsQueryRelatedPagination",!1),supportsCount:r,supportsOrderBy:r,supportsCacheHint:p(t,"queryRelated")}}function w(e){return{supportsCacheHint:p(e.advancedQueryCapabilities,"queryTopFilter")}}function F(e){const t=e.ownershipBasedAccessControlForFeatures,r=e?e.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:n(e,"allowGeometryUpdates",!0),supportsGlobalId:n(e,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:n(e,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:n(e,"supportsRollbackOnFailureParameter",!1),supportsUpdateWithoutM:n(e,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:n(e,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:n(t,"allowAnonymousToDelete",!0),supportsDeleteByOthers:n(t,"allowOthersToDelete",!0),supportsUpdateByAnonymous:n(t,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:n(t,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:n(r,"supportsAsyncApplyEdits",!1),zDefault:o(e,"zDefault",void 0)}}},28694:(e,t,r)=>{r.d(t,{p:()=>s});var i=r(69285);function s(e,t,r){if(!r?.features||!r.hasZ)return;const s=(0,i.k)(r.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of r.features)s(e.geometry)}},74889:(e,t,r)=>{r.d(t,{Z:()=>w});var i,s=r(43697),n=r(66577),o=r(38171),l=r(35454),a=r(96674),u=r(22974),p=r(5600),d=(r(75215),r(71715)),c=r(52011),y=r(30556),f=r(82971),m=r(33955),h=r(1231);const g=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends a.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=f.Z.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const s=e[t],n=o.Z.fromJSON(s),l=s.geometry?.spatialReference;null==n.geometry||l||(n.geometry.spatialReference=r);const a=s.aggregateGeometries,u=n.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],i=a[e],s=i?.spatialReference;null==t||s||(t.spatialReference=r)}i.push(n)}return i}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,m.im)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=f.Z.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,n=this.features,o=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((s-e)/r)));for(let e=0,t=n.length;e<t;e++)o?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,s],scale:[n,o]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*n+i),(e=>s-e*o),l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,s;const n=[];for(let o=0,l=e.length;o<l;o++){const l=e[o];if(o>0){const e=t(l[0]),o=r(l[1]);e===i&&o===s||(n.push([e-i,o-s]),i=e,s=o)}else i=t(l[0]),s=r(l[1]),n.push([i,s])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,m.oU)(e)?e.rings:e.paths,s=[];for(let e=0,n=i.length;e<n;e++){const n=i[e],o=this._quantizePoints(n,t,r);o&&s.push(o)}return s.length>0?((0,m.oU)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,s){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,m.oU)(e)?e.rings:e.paths;let o,l;for(let e=0,i=n.length;e<i;e++){const i=n[e];for(let e=0,s=i.length;e<s;e++){const s=i[e];e>0?(o+=s[0],l+=s[1]):(o=s[0],l=s[1]),s[0]=t(o),s[1]=r(l)}}if(i&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=s(r[3])}}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let o,l;for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(o+=i[0],l+=i[1]):(o=i[0],l=i[1]),i[0]=t(o),i[1]=r(l)}if(i&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2]),t[3]=s(t[3])}else if(i)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=i(t[2])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,p.Cb)({type:[o.Z],json:{write:!0}})],v.prototype,"features",void 0),(0,s._)([(0,d.r)("features")],v.prototype,"readFeatures",null),(0,s._)([(0,p.Cb)({type:[h.Z],json:{write:!0}})],v.prototype,"fields",void 0),(0,s._)([(0,p.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,s._)([(0,y.c)("geometryType")],v.prototype,"writeGeometryType",null),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,s._)([(0,p.Cb)({types:n.qM,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,s._)([(0,d.r)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,s._)([(0,p.Cb)({type:f.Z,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,s._)([(0,y.c)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,s._)([(0,p.Cb)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,s._)([(0,c.j)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const w=v},58333:(e,t,r)=>{r.d(t,{ET:()=>n,I4:()=>s,eG:()=>a,lF:()=>o,lj:()=>p,qP:()=>l,wW:()=>u});const i=[252,146,31,255],s={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},n={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},o={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},l={type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},a={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},u={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},p={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4608,5935],{60590:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Bt});var i=r(43697),n=r(51773),s=r(2368),o=r(20102),a=r(16453),l=r(95330),u=r(5600),p=r(75215),c=(r(67676),r(80442),r(52011)),d=r(30556),m=r(87085),h=r(66577),y=r(38171),f=r(30030),g=r(3172),b=r(60235),w=r(22974),v=r(92604),R=r(17445),_=r(17452),S=r(71715),F=r(8744),C=r(21506),x=r(35956),I=r(96674),T=r(45663),N=r(81578);const D={StretchFunction:{arguments:{ComputeGamma:{isDataset:!1,isPublic:!1,name:"ComputeGamma",type:"RasterFunctionVariable",value:!1},DRA:{isDataset:!1,isPublic:!1,name:"DRA",type:"RasterFunctionVariable",value:!1},EstimateStatsHistogram:{isDataset:!1,isPublic:!1,name:"EstimateStatsHistogram",type:"RasterFunctionVariable",value:!1},Gamma:{displayName:"Gamma",isDataset:!1,isPublic:!1,name:"Gamma",type:"RasterFunctionVariable"},Histograms:{isDataset:!1,isPublic:!1,name:"Histograms",type:"RasterFunctionVariable"},Max:{isDataset:!1,isPublic:!1,name:"Max",type:"RasterFunctionVariable",value:255},MaxPercent:{isDataset:!1,isPublic:!1,name:"MaxPercent",type:"RasterFunctionVariable",value:.5},Min:{isDataset:!1,isPublic:!1,name:"Min",type:"RasterFunctionVariable",value:0},MinPercent:{isDataset:!1,isPublic:!1,name:"MinPercent",type:"RasterFunctionVariable",value:.25},NumberOfStandardDeviations:{isDataset:!1,isPublic:!1,name:"NumberOfStandardDeviation",type:"RasterFunctionVariable",value:2},Raster:{isDataset:!0,isPublic:!1,name:"Raster",type:"RasterFunctionVariable"},SigmoidStrengthLevel:{isDataset:!1,isPublic:!1,name:"SigmoidStrengthLevel",type:"RasterFunctionVariable",value:2},Statistics:{isDataset:!1,isPublic:!1,name:"Statistics",type:"RasterFunctionVariable"},StretchType:{isDataset:!1,isPublic:!1,name:"StretchType",type:"RasterFunctionVariable",value:0},type:"StretchFunctionArguments",UseGamma:{isDataset:!1,isPublic:!1,name:"UseGamma",type:"RasterFunctionVariable",value:!1}},description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",function:{description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",name:"Stretch",pixelType:"UNKNOWN",type:"StretchFunction"},functionType:0,name:"Stretch",thumbnail:""},RemapFunction:{name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table.",function:{type:"RemapFunction",pixelType:"UNKNOWN",name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},UseTable:{name:"UseTable",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},InputRanges:{name:"InputRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Input Ranges"},OutputValues:{name:"OutputValues",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Output Values"},NoDataRanges:{name:"NoDataRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"NoData Ranges"},Table:{name:"Table",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputField:{name:"InputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},OutputField:{name:"OutputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputMaxField:{name:"InputMaxField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},RemapTableType:{name:"RemapTableType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},AllowUnmatched:{name:"AllowUnmatched",isPublic:!1,isDataset:!1,value:!0,type:"RasterFunctionVariable"},type:"RemapFunctionArguments"},functionType:0,thumbnail:""},ColormapFunction:{name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp.",function:{type:"ColormapFunction",pixelType:"UNKNOWN",name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},ColormapName:{name:"ColormapName",isPublic:!1,isDataset:!1,value:"Gray",type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},type:"ColormapFunctionArguments"},functionType:0,thumbnail:""},ShadedReliefFunction:{name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image.",function:{type:"ShadedReliefFunction",pixelType:"UNKNOWN",name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"ShadedReliefFunctionArguments"},functionType:0,thumbnail:""},HillshadeFunction:{name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image",function:{type:"HillshadeFunction",pixelType:"UNKNOWN",name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image"},arguments:{DEM:{name:"DEM",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"HillshadeFunctionArguments"},functionType:0,thumbnail:""},ResampleFunction:{name:"Resample",description:"Changes the cell size of a raster.",function:{type:"ResampleFunction",pixelType:"UNKNOWN",name:"Resample",description:"Changes the cell size of a raster."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ResamplingType:{name:"ResamplingType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},InputCellSize:{name:"InputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},OutputCellSize:{name:"OutputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},type:"ResampleFunctionArguments"},functionType:0,thumbnail:""}};var j=r(93010),P=r(75509),O=r(23847);const Z=new Set(["u1","u2","u4","u8","s8","u16","s16"]),M={simple_scalar:"Simple Scalar",wind_barb:"Wind Barb",single_arrow:"Single Arrow",beaufort_kn:"Beaufort Wind (Knots)",beaufort_m:"Beaufort Wind (MetersPerSecond)",ocean_current_m:"Ocean Current (MetersPerSecond)",ocean_current_kn:"Ocean Current (Knots)"},A=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function V(e){return A.has(e.type)}function J(e,t){if(!e||!t)return(0,w.d9)(e||t);const r=(0,w.d9)(e);if(r.functionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),E(r.functionDefinition.arguments,t),r.rasterFunctionDefinition=r.functionDefinition.toJSON()}else"none"!==t.functionName?.toLowerCase()&&(G(r.functionArguments).Raster=t);return r}function E(e,t){for(const r in e)"raster"===r.toLowerCase()&&("RasterFunctionVariable"===e[r].type?(e[r]=t.rasterFunctionDefinition,e[r].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[r].type&&E(e[r].arguments,t))}function q(e){const t=(0,w.d9)(D[e.functionName+"Function"]),r=e.functionArguments;for(const e in r)"raster"===e.toLowerCase()?(t.arguments[e]=q(r[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=U(r[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=r[e];return t}function G(e){const t=e?.Raster??e?.raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?G(t.functionArguments):e}const z={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function L(e,t){const r=Z.has(t)?(0,N.r)(t):null;return r&&e.push([Math.floor(r[0]-1),0,0,0],[Math.ceil(r[1]+1),0,0,0]),e}function B(e){if(null==e)return;const{fields:t}=e,r=t?.find((e=>e?.name&&"value"===e.name.toLowerCase()));return r?.name}function H(e){const t=[];return e?.forEach((e=>{const r=e;if(Array.isArray(r))t.push(r);else{if(null==r.min||null==r.max)return;const e=[r.min,r.max,r.avg||0,r.stddev||0];t.push(e)}})),t}function U(e){const t=[],r=[];return e.forEach((e=>{t.push(e[0]),r.push((0,j.oI)([...e.slice(1),255]))})),{type:"RasterColormap",values:t,colors:r}}var k=r(98974),Q=r(69608);let $=class extends I.wq{constructor(){super(...arguments),this.layer=null,this.compression=void 0,this.pixelType=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,r){this.layer.version<10.3||(t[r]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,r){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[r]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}get format(){return"vector-field"===this.layer.renderer?.type?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}writeLercVersion(e,t,r){"lerc"===this.format&&this.layer.version>=10.5&&(t[r]=e)}get version(){const e=this.layer;return e.commitProperty("bandIds"),e.commitProperty("format"),e.commitProperty("compressionQuality"),e.commitProperty("compressionTolerance"),e.commitProperty("interpolation"),e.commitProperty("noData"),e.commitProperty("noDataInterpretation"),e.commitProperty("mosaicRule"),e.commitProperty("rasterFunction"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("definitionExpression"),e.commitProperty("multidimensionalSubset"),(this._get("version")||0)+1}set version(e){this._set("version",e)}get mosaicRule(){const e=this.layer;let t=e.mosaicRule;const r=e.definitionExpression;return t?r&&r!==t.where&&(t=t.clone(),t.where=r):r&&(t=new k.Z({where:r})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t}=e;const r=e.pixelFilter,i=!e.format||e.format.includes("jpg")||e.format.includes("png");t=this._addResampleRasterFunction(t);const n=e.multidimensionalSubset?.areaOfInterest;return n&&(t=this._addClipFunction(t,n)),i&&!r&&"vector-field"!==e.renderer?.type&&(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:r,renderer:i}=t;return e=e||t.rasterFunction,i&&V(i)?J(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const r=t.convertToRFT,i=new T.Z;i.functionName="Stretch";const n=z[P.v.toJSON(e.stretchType)],s="u8",o={StretchType:n,Statistics:H(e.statistics??[]),DRA:e.dynamicRangeAdjustment,UseGamma:e.useGamma,Gamma:e.gamma,ComputeGamma:e.computeGamma};if(null!=e.outputMin&&(o.Min=e.outputMin),null!=e.outputMax&&(o.Max=e.outputMax),n===z.standardDeviation?(o.NumberOfStandardDeviations=e.numberOfStandardDeviations,i.outputPixelType=s):n===z.percentClip?(o.MinPercent=e.minPercent,o.MaxPercent=e.maxPercent,i.outputPixelType=s):n===z.minMax?i.outputPixelType=s:n===z.sigmoid&&(o.SigmoidStrengthLevel=e.sigmoidStrengthLevel),i.functionArguments=o,i.variableName="Raster",e.colorRamp){const n=e.colorRamp,s=new T.Z;if(r)s.functionArguments={ColorRamp:(0,j.pM)(n)};else{const r=(0,j.Uh)(n,!0);if(r)s.functionArguments={colorRampName:r};else if(!t.convertColorRampToColormap||"algorithmic"!==n.type&&"multipart"!==n.type){const t=e.colorRamp.toJSON();"algorithmic"===t.type?t.algorithm=t.algorithm||"esriCIELabAlgorithm":"multipart"===t.type&&t.colorRamps?.length&&t.colorRamps.forEach((e=>e.algorithm=e.algorithm||"esriCIELabAlgorithm")),s.functionArguments={colorRamp:t}}else s.functionArguments={Colormap:(0,j.Jw)(n)}}return s.variableName="Raster",s.functionName="Colormap",s.functionArguments.Raster=i,r?new T.Z({rasterFunctionDefinition:q(s)}):s}return r?new T.Z({rasterFunctionDefinition:q(i)}):i}(e,t);case"class-breaks":return function(e,t){const r=[],i=[],n=[],s=[],o=1e-4,{pixelType:a,rasterAttributeTable:l}=t,u=null==l?null:l.features,p=B(l);if(p&&u&&Array.isArray(u)&&e.classBreakInfos){e.classBreakInfos.forEach(((t,r)=>{const i=t.symbol?.color;let n;i?.a&&null!=t.minValue&&null!=t.maxValue&&u.forEach((o=>{null!=t.minValue&&null!=t.maxValue&&(n=o.attributes[e.field],(n>=t.minValue&&n<t.maxValue||r===e.classBreakInfos.length-1&&n>=t.minValue)&&s.push([o.attributes[p],i.r,i.g,i.b]))}))}));const r=a?L(s,a):s,i=new T.Z;return i.functionName="Colormap",i.functionArguments={},i.functionArguments.Colormap=r,i.variableName="Raster",t.convertToRFT?new T.Z({rasterFunctionDefinition:q(i)}):i}e.classBreakInfos.forEach(((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const a=e.symbol&&e.symbol.color;a?.a?(0===t?r.push(e.minValue,e.maxValue+o):r.push(e.minValue+o,e.maxValue+o),i.push(t),s.push([t,a.r,a.g,a.b])):n.push(e.minValue,e.maxValue)}));const c=a?L(s,a):s,d=new T.Z;d.functionName="Remap",d.functionArguments={InputRanges:r,OutputValues:i,NoDataRanges:n},d.variableName="Raster";const m=new T.Z;return m.functionName="Colormap",m.functionArguments={Colormap:c,Raster:d},t.convertToRFT?new T.Z({rasterFunctionDefinition:q(m)}):m}(e,t);case"unique-value":return function(e,t){const r=[],{pixelType:i,rasterAttributeTable:n}=t,s=null==n?null:n.features,o=B(n),a=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(s){if(o){const t=new Map;l.forEach((e=>{const r=e.value,i=e.symbol?.color;null!=r&&i?.a&&t.set(String(r),i.toRgb())}));const i=e.field;s.forEach((({attributes:e})=>{const n=String(e[i]),s=e[o],l=t.get(n);l?r.push([s,...l]):a&&r.push([s,...a])}))}}else for(let e=0;e<l.length;e++){const t=l[e],i=t.symbol?.color,n=+t.value;if(i?.a){if(isNaN(n))return null;r.push([n,i.r,i.g,i.b])}}const u=i?L(r,i):r,p=new T.Z;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new T.Z({rasterFunctionDefinition:q(p)}):p}(e,t);case"raster-colormap":return function(e,t){const r=e.extractColormap();if(!r||0===r.length)return null;const{pixelType:i}=t,n=i?L(r,i):r,s=new T.Z;return s.functionName="Colormap",s.functionArguments={},s.functionArguments.Colormap=n,t.convertToRFT?new T.Z({rasterFunctionDefinition:q(s)}):s}(e,t);case"vector-field":return function(e,t){const r=new T.Z;r.functionName="VectorFieldRenderer";const{dataType:i,bandNames:n}=t,s="vector-uv"===i;let o,a;if(n&&2===n.length){const e=n.map((e=>e.toLowerCase()));o=e.indexOf("magnitude"),a=e.indexOf("direction")}-1!==o&&null!==o||(o=0,a=1);const l="arithmetic"===e.rotationType?1:2,u="flow-from"===e.flowRepresentation?0:1,p=e.visualVariables?e.visualVariables.find((e=>"Magnitude"===e.field)):new O.Z,c={magnitudeBandID:o,directionBandID:a,isUVComponents:s,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:M[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};r.functionArguments=c;const d=q(r);return t.convertToRFT?T.Z.fromJSON({rasterFunctionDefinition:d}):r}(e,t);case"raster-shaded-relief":return function(e,t){const r=t.convertToRFT;if("elevation"!==t.dataType&&("generic"!==t.dataType||1!==t.bandCount||"s16"!==t.pixelType&&"s32"!==t.pixelType&&"f32"!==t.pixelType&&"f64"!==t.pixelType))return new T.Z;const i=new T.Z;i.functionName="Hillshade";const n="traditional"===e.hillshadeType?0:1,s="none"===e.scalingType?1:3,o={HillshadeType:n,SlopeType:s,ZFactor:e.zFactor};return 0===n&&(o.Azimuth=e.azimuth,o.Altitude=e.altitude),3===s&&(o.PSPower=e.pixelSizePower,o.PSZFactor=e.pixelSizeFactor),i.functionArguments=o,i.variableName="Raster",e.colorRamp&&(i.functionName="ShadedRelief",r?o.ColorRamp=(0,j.pM)(e.colorRamp):o.Colormap=(0,j.Jw)(e.colorRamp)),r?new T.Z({rasterFunctionDefinition:q(i)}):i}(e,t);case"flow":throw new Error("Unsupported rendering rule.")}}(i,{rasterAttributeTable:r.attributeTable,pixelType:r.pixelType,dataType:r.dataType,bandNames:r.bandInfos.map((({name:e})=>e)),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:r.bandCount}),e):e}_addResampleRasterFunction(e){if("vector-field"!==this.layer.renderer?.type||"Resample"===e?.functionName)return e;const t="esriImageServiceDataTypeVector-UV"===this.layer.serviceDataType?7:10,r=this.layer.serviceRasterInfo.pixelSize;let i=new T.Z({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:r}});return i=e?.rasterFunctionDefinition?new T.Z({rasterFunctionDefinition:q(i)}):i,J(i,e)}_addClipFunction(e,t){return J(new T.Z({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}};(0,i._)([(0,u.Cb)()],$.prototype,"layer",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],$.prototype,"adjustAspectRatio",null),(0,i._)([(0,d.c)("adjustAspectRatio")],$.prototype,"writeAdjustAspectRatio",null),(0,i._)([(0,u.Cb)({json:{write:!0}})],$.prototype,"bandIds",null),(0,i._)([(0,u.Cb)({json:{write:!0}})],$.prototype,"compression",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],$.prototype,"compressionQuality",null),(0,i._)([(0,d.c)("compressionQuality")],$.prototype,"writeCompressionQuality",null),(0,i._)([(0,u.Cb)({json:{write:!0}})],$.prototype,"compressionTolerance",null),(0,i._)([(0,d.c)("compressionTolerance")],$.prototype,"writeCompressionTolerance",null),(0,i._)([(0,u.Cb)({json:{write:!0}})],$.prototype,"format",null),(0,i._)([(0,u.Cb)({type:String,json:{read:{reader:Q.cl.read},write:{writer:Q.cl.write}}})],$.prototype,"interpolation",null),(0,i._)([(0,u.Cb)({json:{write:!0}})],$.prototype,"noData",null),(0,i._)([(0,u.Cb)({type:String,json:{read:{reader:Q.kQ.read},write:{writer:Q.kQ.write}}})],$.prototype,"noDataInterpretation",null),(0,i._)([(0,u.Cb)({json:{write:!0}})],$.prototype,"pixelType",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],$.prototype,"lercVersion",void 0),(0,i._)([(0,d.c)("lercVersion")],$.prototype,"writeLercVersion",null),(0,i._)([(0,u.Cb)({type:Number})],$.prototype,"version",null),(0,i._)([(0,u.Cb)({json:{write:!0}})],$.prototype,"mosaicRule",null),(0,i._)([(0,u.Cb)({json:{write:!0,name:"renderingRule"}})],$.prototype,"rasterFunction",null),$=(0,i._)([(0,c.j)("esri.layers.mixins.ExportImageServiceParameters")],$);var W=r(1231),X=r(99514),Y=r(90082),K=r(29876),ee=r(5847),te=r(25972),re=r(88281),ie=r(99815),ne=r(75993),se=r(80676),oe=r(67058),ae=r(72758),le=r(16306),ue=r(11282),pe=r(82971);let ce=class extends I.wq{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],ce.prototype,"north",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],ce.prototype,"up",void 0),(0,i._)([(0,u.Cb)({type:pe.Z,json:{write:!0}})],ce.prototype,"spatialReference",void 0),ce=(0,i._)([(0,c.j)("esri.rest.support.ImageAngleResult")],ce);const de=ce;var me=r(67900);let he=class extends I.wq{constructor(){super(...arguments),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,i._)([(0,u.Cb)({type:Number,json:{read:!0,write:!0}})],he.prototype,"value",void 0),(0,i._)([(0,u.Cb)({type:String,json:{read:!0,write:!0}})],he.prototype,"displayValue",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{read:!0,write:!0}})],he.prototype,"uncertainty",void 0),he=(0,i._)([(0,c.j)("esri.rest.support.ImageMeasureResultValue")],he);let ye=class extends he{constructor(){super(...arguments),this.unit=null}};(0,i._)([(0,u.Cb)({type:String,json:{read:me.Jo.read,write:me.Jo.write}})],ye.prototype,"unit",void 0),ye=(0,i._)([(0,c.j)("esri.rest.support.ImageMeasureResultLengthValue")],ye);let fe=class extends he{constructor(){super(...arguments),this.unit=null}};(0,i._)([(0,u.Cb)({type:String,json:{read:me.gV.read,write:me.gV.write}})],fe.prototype,"unit",void 0),fe=(0,i._)([(0,c.j)("esri.rest.support.ImageMeasureResultAreaValue")],fe);let ge=class extends he{constructor(){super(...arguments),this.unit=null}};(0,i._)([(0,u.Cb)({type:String,json:{read:me.CN.read,write:me.CN.write}})],ge.prototype,"unit",void 0),ge=(0,i._)([(0,c.j)("esri.rest.support.ImageMeasureResultAngleValue")],ge);let be=class extends I.wq{constructor(){super(...arguments),this.name=null,this.sensorName=null}};(0,i._)([(0,u.Cb)({type:String,json:{read:!0,write:!0}})],be.prototype,"name",void 0),(0,i._)([(0,u.Cb)({type:String,json:{read:!0,write:!0}})],be.prototype,"sensorName",void 0),be=(0,i._)([(0,c.j)("esri.rest.support.BaseImageMeasureResult")],be);let we=class extends be{constructor(){super(...arguments),this.area=null,this.perimeter=null}};(0,i._)([(0,u.Cb)({type:fe,json:{read:!0,write:!0}})],we.prototype,"area",void 0),(0,i._)([(0,u.Cb)({type:ye,json:{read:!0,write:!0}})],we.prototype,"perimeter",void 0),we=(0,i._)([(0,c.j)("esri.rest.support.ImageAreaResult")],we);const ve=we;let Re=class extends be{constructor(){super(...arguments),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,i._)([(0,u.Cb)({type:ye,json:{read:!0,write:!0}})],Re.prototype,"distance",void 0),(0,i._)([(0,u.Cb)({type:ge,json:{read:!0,write:!0}})],Re.prototype,"azimuthAngle",void 0),(0,i._)([(0,u.Cb)({type:ge,json:{read:!0,write:!0}})],Re.prototype,"elevationAngle",void 0),Re=(0,i._)([(0,c.j)("esri.rest.support.ImageDistanceResult")],Re);const _e=Re;let Se=class extends be{constructor(){super(...arguments),this.height=null}};(0,i._)([(0,u.Cb)({type:ye,json:{read:!0,write:!0}})],Se.prototype,"height",void 0),Se=(0,i._)([(0,c.j)("esri.rest.support.ImageHeightResult")],Se);const Fe=Se;var Ce=r(94139),xe=r(74889);let Ie=class extends I.wq{constructor(){super(...arguments),this.catalogItemVisibilities=null,this.catalogItems=null,this.location=null,this.name=null,this.objectId=null,this.processedValues=null,this.properties=null,this.value=null}};(0,i._)([(0,u.Cb)({json:{write:!0}})],Ie.prototype,"catalogItemVisibilities",void 0),(0,i._)([(0,u.Cb)({type:xe.Z,json:{write:!0}})],Ie.prototype,"catalogItems",void 0),(0,i._)([(0,u.Cb)({type:Ce.Z,json:{write:!0}})],Ie.prototype,"location",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],Ie.prototype,"name",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],Ie.prototype,"objectId",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],Ie.prototype,"processedValues",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],Ie.prototype,"properties",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],Ie.prototype,"value",void 0),Ie=(0,i._)([(0,c.j)("esri.rest.support.ImageIdentifyResult")],Ie);const Te=Ie;let Ne=class extends I.wq{constructor(){super(...arguments),this.geometries=null}};(0,i._)([(0,u.Cb)({json:{write:!0}})],Ne.prototype,"geometries",void 0),Ne=(0,i._)([(0,c.j)("esri.rest.support.ImagePixelLocationResult")],Ne);const De=Ne;let je=class extends be{constructor(){super(...arguments),this.point=null}};(0,i._)([(0,u.Cb)({type:Ce.Z,json:{name:"point.value",read:!0,write:!0}})],je.prototype,"point",void 0),je=(0,i._)([(0,c.j)("esri.rest.support.ImagePointResult")],je);const Pe=je;let Oe=class extends I.wq{constructor(){super(...arguments),this.attributes=null,this.location=null,this.locationId=null,this.rasterId=null,this.resolution=null,this.pixelValue=null}};(0,i._)([(0,u.Cb)({json:{write:!0}})],Oe.prototype,"attributes",void 0),(0,i._)([(0,u.Cb)({type:Ce.Z,json:{write:!0}})],Oe.prototype,"location",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],Oe.prototype,"locationId",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],Oe.prototype,"rasterId",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],Oe.prototype,"resolution",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],Oe.prototype,"pixelValue",void 0),Oe=(0,i._)([(0,c.j)("esri.rest.support.ImageSample")],Oe);const Ze=Oe;let Me=class extends I.wq{constructor(){super(...arguments),this.samples=null}};(0,i._)([(0,u.Cb)({type:[Ze],json:{write:!0}})],Me.prototype,"samples",void 0),Me=(0,i._)([(0,c.j)("esri.rest.support.ImageSampleResult")],Me);const Ae=Me;function Ve(e){const t=e?.time;if(t&&(null!=t.start||null!=t.end)){const r=[];null!=t.start&&r.push(t.start),null==t.end||r.includes(t.end)||r.push(t.end),e.time=r.join(",")}}async function Je(e,t,r){const i=(0,ue.en)(e),n=t.geometry?[t.geometry]:[],s=await(0,le.aX)(n),o=t.toJSON();Ve(o);const a=s?.[0];null!=a&&(o.geometry=a.toJSON());const l=(0,ue.cv)({...i.query,f:"json",...o});return(0,ue.lA)(l,r)}async function Ee(e,t,r){const i=(0,ue.en)(e),n=t.geometry?[t.geometry]:[];return(0,le.aX)(n).then((e=>{const n=t.toJSON(),s=e?.[0];null!=s&&(n.geometry=JSON.stringify(s.toJSON()));const o=(0,ue.cv)({...i.query,f:"json",...n}),a=(0,ue.lA)(o,r);return(0,g.Z)(i.path+"/identify",a)})).then((e=>Te.fromJSON(e.data)))}async function qe(e,t,r,i){const n=(0,ue.en)(e),s=await(0,le.aX)(r),o=t.toJSON();null!=s[0]&&(o.fromGeometry=JSON.stringify(Ge(s[0]))),null!=s[1]&&(o.toGeometry=JSON.stringify(Ge(s[1])));const a=(0,ue.cv)({...n.query,f:"json",...o}),l=(0,ue.lA)(a,i),{data:u}=await(0,g.Z)(n.path+"/measure",l);return u}function Ge(e){const t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=ze(e.spatialReference)),t}function ze(e){const{imageCoordinateSystem:t}=e;if(t){const{id:e,referenceServiceName:r}=t;return null!=e?r?{icsid:e,icsns:r}:{icsid:e}:{ics:t}}return e.toJSON()}function Le(e,t){if(!e.imageCoordinateSystem)return(0,F.B9)(e);const r=ze(e),{icsid:i,icsns:n}=r;return null==i||null!=n&&!t?.toLowerCase().includes("/"+n.toLowerCase()+"/")?JSON.stringify(r):`0:${i}`}r(10158);var Be,He=r(4967),Ue=(r(68773),r(40330),r(2109),r(98732),r(6570)),ke=(r(9361),r(65091)),Qe=r(38913),$e=(r(58901),r(45091),r(14165)),We=(r(98326),r(56545),r(41818)),Xe=r(5396),Ye=(r(75935),r(28141),r(26059)),Ke=r(36679);let et=Be=class extends I.wq{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new Be((0,w.d9)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,i._)([(0,u.Cb)({type:[String],json:{name:"angleName",write:!0}})],et.prototype,"angleNames",void 0),(0,i._)([(0,u.Cb)({type:Ce.Z,json:{write:!0}})],et.prototype,"point",void 0),(0,i._)([(0,u.Cb)({type:pe.Z,json:{write:!0}})],et.prototype,"spatialReference",void 0),(0,i._)([(0,u.Cb)({type:p.z8,json:{write:!0}})],et.prototype,"rasterId",void 0),et=Be=(0,i._)([(0,c.j)("esri.rest.support.ImageAngleParameters")],et);const tt=et;var rt=r(33955);const it=new(r(35454).X)({esriMensurationPoint:"point",esriMensurationCentroid:"centroid",esriMensurationDistanceAndAngle:"distance-and-angle",esriMensurationAreaAndPerimeter:"area-and-perimeter",esriMensurationHeightFromBaseAndTop:"base-and-top",esriMensurationHeightFromBaseAndTopShadow:"base-and-top-shadow",esriMensurationHeightFromTopAndTopShadow:"top-and-top-shadow",esriMensurationPoint3D:"point-3D",esriMensurationCentroid3D:"centroid-3D",esriMensurationDistanceAndAngle3D:"distance-and-angle-3D",esriMensurationAreaAndPerimeter3D:"area-and-perimeter-3D"});let nt=class extends I.wq{constructor(){super(...arguments),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.pixelSize=null,this.raster=void 0}};var st;(0,i._)([(0,u.Cb)()],nt.prototype,"type",void 0),(0,i._)([(0,u.Cb)({type:it.apiValues,json:{read:it.read,write:it.write}})],nt.prototype,"measureOperation",void 0),(0,i._)([(0,u.Cb)({type:k.Z,json:{write:!0}})],nt.prototype,"mosaicRule",void 0),(0,i._)([(0,u.Cb)({type:Ce.Z,json:{write:!0}})],nt.prototype,"pixelSize",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],nt.prototype,"raster",void 0),nt=(0,i._)([(0,c.j)("esri.rest.support.BaseImageMeasureParameters")],nt);let ot=st=class extends nt{constructor(){super(...arguments),this.type="area-perimeter",this.geometry=null,this.is3D=!1,this.linearUnit="meters",this.areaUnit="square-meters"}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,rt.Ji)(e),t[r]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new st((0,w.d9)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,i._)([(0,u.Cb)({types:h.qM,json:{name:"fromGeometry",read:!0,write:!0}})],ot.prototype,"geometry",void 0),(0,i._)([(0,d.c)("geometry")],ot.prototype,"writeGeometry",null),(0,i._)([(0,u.Cb)({type:it.apiValues,json:{write:it.write}})],ot.prototype,"measureOperation",null),(0,i._)([(0,u.Cb)({json:{read:!0}})],ot.prototype,"is3D",void 0),(0,i._)([(0,u.Cb)({type:String,json:{read:me.Jo.read,write:me.Jo.write}})],ot.prototype,"linearUnit",void 0),(0,i._)([(0,u.Cb)({type:String,json:{read:me.gV.read,write:me.gV.write}})],ot.prototype,"areaUnit",void 0),ot=st=(0,i._)([(0,c.j)("esri.rest.support.ImageAreaParameters")],ot);const at=ot;var lt;let ut=lt=class extends nt{constructor(){super(...arguments),this.type="distance-angle",this.fromGeometry=null,this.toGeometry=null,this.is3D=!1,this.linearUnit="meters",this.angularUnit="degrees"}writeFromGeometry(e,t,r){null!=e&&(t.geometryType=(0,rt.Ji)(e),t[r]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new lt((0,w.d9)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,i._)([(0,u.Cb)({type:Ce.Z,json:{read:!0,write:!0}})],ut.prototype,"fromGeometry",void 0),(0,i._)([(0,d.c)("fromGeometry")],ut.prototype,"writeFromGeometry",null),(0,i._)([(0,u.Cb)({type:Ce.Z,json:{read:!0,write:!0}})],ut.prototype,"toGeometry",void 0),(0,i._)([(0,u.Cb)({type:it.apiValues,json:{write:it.write}})],ut.prototype,"measureOperation",null),(0,i._)([(0,u.Cb)({json:{read:!0}})],ut.prototype,"is3D",void 0),(0,i._)([(0,u.Cb)({type:String,json:{read:me.Jo.read,write:me.Jo.write}})],ut.prototype,"linearUnit",void 0),(0,i._)([(0,u.Cb)({type:String,json:{read:me.CN.read,write:me.CN.write}})],ut.prototype,"angularUnit",void 0),ut=lt=(0,i._)([(0,c.j)("esri.rest.support.ImageDistanceParameters")],ut);const pt=ut;var ct;let dt=ct=class extends nt{constructor(){super(...arguments),this.type="height",this.fromGeometry=null,this.toGeometry=null,this.operationType="base-and-top",this.linearUnit="meters"}writeFromGeometry(e,t,r){null!=e&&(t.geometryType=(0,rt.Ji)(e),t[r]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new ct((0,w.d9)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,i._)([(0,u.Cb)({type:Ce.Z,json:{read:!0}})],dt.prototype,"fromGeometry",void 0),(0,i._)([(0,d.c)("fromGeometry")],dt.prototype,"writeFromGeometry",null),(0,i._)([(0,u.Cb)({type:Ce.Z,json:{read:!0,write:!0}})],dt.prototype,"toGeometry",void 0),(0,i._)([(0,u.Cb)({type:it.apiValues,json:{write:it.write}})],dt.prototype,"measureOperation",null),(0,i._)([(0,u.Cb)({json:{read:!0}})],dt.prototype,"operationType",void 0),(0,i._)([(0,u.Cb)({type:String,json:{read:me.Jo.read,write:me.Jo.write}})],dt.prototype,"linearUnit",void 0),dt=ct=(0,i._)([(0,c.j)("esri.rest.support.ImageHeightParameters")],dt);const mt=dt;var ht,yt=r(79681),ft=r(92835);let gt=ht=class extends I.wq{constructor(){super(...arguments),this.geometry=null,this.rasterFunctions=null,this.pixelSize=null,this.returnGeometry=!0,this.returnCatalogItems=!0,this.returnPixelValues=!0,this.maxItemCount=null,this.timeExtent=null,this.raster=void 0,this.viewId=void 0,this.processAsMultidimensional=!1}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,rt.Ji)(e),t[r]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=k.Z.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,r){null!=e&&(t[r]=JSON.stringify(e.toJSON()))}get renderingRule(){return(0,b.Mr)(v.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._get("rasterFunction")}set renderingRule(e){(0,b.Mr)(v.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}get renderingRules(){return(0,b.Mr)(v.Z.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._get("rasterFunctions")}set renderingRules(e){(0,b.Mr)(v.Z.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._set("rasterFunctions",e)}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=T.Z.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}writeRasterFunction(e,t,r){null!=e&&(t[r]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[r]=JSON.stringify(e.rasterFunctionDefinition))}writeRasterFunctions(e,t,r){null!=e&&(t[r]=JSON.stringify(e.map((e=>e.rasterFunctionDefinition||e.toJSON()))))}writePixelSize(e,t,r){null!=e&&(t[r]=JSON.stringify(e))}writeTimeExtent(e,t,r){if(null!=e){const i=null!=e.start?e.start.getTime():null,n=null!=e.end?e.end.getTime():null;t[r]=null!=i?null!=n?`${i},${n}`:`${i}`:null}}clone(){return new ht((0,w.d9)({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,rasterFunctions:this.rasterFunctions,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};(0,i._)([(0,u.Cb)({json:{write:!0}})],gt.prototype,"geometry",void 0),(0,i._)([(0,d.c)("geometry")],gt.prototype,"writeGeometry",null),(0,i._)([(0,u.Cb)({type:k.Z,json:{write:!0}})],gt.prototype,"mosaicRule",null),(0,i._)([(0,d.c)("mosaicRule")],gt.prototype,"writeMosaicRule",null),(0,i._)([(0,u.Cb)({type:T.Z})],gt.prototype,"renderingRule",null),(0,i._)([(0,u.Cb)({type:[T.Z]})],gt.prototype,"renderingRules",null),(0,i._)([(0,u.Cb)({type:T.Z,json:{write:!0,name:"renderingRule"}})],gt.prototype,"rasterFunction",null),(0,i._)([(0,d.c)("rasterFunction")],gt.prototype,"writeRasterFunction",null),(0,i._)([(0,u.Cb)({type:[T.Z],json:{write:!0,name:"renderingRules"}})],gt.prototype,"rasterFunctions",void 0),(0,i._)([(0,d.c)("rasterFunctions")],gt.prototype,"writeRasterFunctions",null),(0,i._)([(0,u.Cb)({type:Ce.Z,json:{write:!0}})],gt.prototype,"pixelSize",void 0),(0,i._)([(0,d.c)("pixelSize")],gt.prototype,"writePixelSize",null),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"returnGeometry",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"returnCatalogItems",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"returnPixelValues",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],gt.prototype,"maxItemCount",void 0),(0,i._)([(0,u.Cb)({type:ft.Z,json:{write:{target:"time"}}})],gt.prototype,"timeExtent",void 0),(0,i._)([(0,d.c)("timeExtent")],gt.prototype,"writeTimeExtent",null),(0,i._)([(0,u.Cb)({json:{write:!0}})],gt.prototype,"raster",void 0),(0,i._)([(0,u.Cb)({json:{write:!0}})],gt.prototype,"viewId",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],gt.prototype,"processAsMultidimensional",void 0),gt=ht=(0,i._)([(0,c.j)("esri.rest.support.ImageIdentifyParameters")],gt);const bt=gt;var wt;let vt=wt=class extends I.wq{constructor(){super(...arguments),this.geometries=null,this.rasterId=null}writeGeometry(e,t,r){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map((e=>e.toJSON()))}}clone(){return new wt({geometries:this.geometries?.map((e=>e.clone()))??[],rasterId:this.rasterId})}};(0,i._)([(0,u.Cb)({type:[Ce.Z],json:{write:!0}})],vt.prototype,"geometries",void 0),(0,i._)([(0,d.c)("geometries")],vt.prototype,"writeGeometry",null),(0,i._)([(0,u.Cb)({type:p.z8,json:{write:!0}})],vt.prototype,"rasterId",void 0),vt=wt=(0,i._)([(0,c.j)("esri.rest.support.ImagePixelLocationParameters")],vt);const Rt=vt;var _t;let St=_t=class extends nt{constructor(){super(...arguments),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,rt.Ji)(e),t[r]=e.toJSON())}get measureOperation(){const{is3D:e,geometry:t}=this;return"point"===t.type?e?"point-3D":"point":e?"centroid-3D":"centroid"}clone(){return new _t((0,w.d9)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,i._)([(0,u.Cb)({types:h.qM,json:{name:"fromGeometry",read:rt.im}})],St.prototype,"geometry",void 0),(0,i._)([(0,d.c)("geometry")],St.prototype,"writeGeometry",null),(0,i._)([(0,u.Cb)({type:it.apiValues,json:{read:it.read,write:it.write}})],St.prototype,"measureOperation",null),(0,i._)([(0,u.Cb)({json:{read:!0}})],St.prototype,"is3D",void 0),St=_t=(0,i._)([(0,c.j)("esri.rest.support.ImagePointParameters")],St);const Ft=St;var Ct;let xt=Ct=class extends I.wq{constructor(){super(...arguments),this.geometry=null,this.interpolation="nearest",this.mosaicRule=null,this.outFields=null,this.pixelSize=null,this.returnFirstValueOnly=!0,this.sampleDistance=null,this.sampleCount=null,this.sliceId=null,this.timeExtent=null}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,rt.Ji)(e),t[r]=e.toJSON())}set locations(e){if(e?.length){const t=new ke.Z({spatialReference:e[0].spatialReference});t.points=e.map((e=>[e.x,e.y])),this._set("locations",e),this.geometry=t}}clone(){return new Ct((0,w.d9)({geometry:this.geometry,locations:this.locations,interpolation:this.interpolation,mosaicRule:this.mosaicRule,outFields:this.outFields,raster:this.raster,returnFirstValueOnly:this.returnFirstValueOnly,sampleDistance:this.sampleDistance,sampleCount:this.sampleCount,sliceId:this.sliceId,pixelSize:this.pixelSize,timeExtent:this.timeExtent}))}};(0,i._)([(0,u.Cb)({types:h.qM,json:{read:rt.im}})],xt.prototype,"geometry",void 0),(0,i._)([(0,d.c)("geometry")],xt.prototype,"writeGeometry",null),(0,i._)([(0,u.Cb)()],xt.prototype,"locations",null),(0,i._)([(0,u.Cb)({type:String,json:{type:Q.cl.jsonValues,read:Q.cl.read,write:Q.cl.write}})],xt.prototype,"interpolation",void 0),(0,i._)([(0,u.Cb)({type:k.Z,json:{write:!0}})],xt.prototype,"mosaicRule",void 0),(0,i._)([(0,u.Cb)({type:[String],json:{write:!0}})],xt.prototype,"outFields",void 0),(0,i._)([(0,u.Cb)({type:Ce.Z,json:{write:!0}})],xt.prototype,"pixelSize",void 0),(0,i._)([(0,u.Cb)({type:String,json:{write:!0}})],xt.prototype,"raster",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],xt.prototype,"returnFirstValueOnly",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],xt.prototype,"sampleDistance",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],xt.prototype,"sampleCount",void 0),(0,i._)([(0,u.Cb)({type:Number,json:{write:!0}})],xt.prototype,"sliceId",void 0),(0,i._)([(0,u.Cb)({type:ft.Z,json:{read:{source:"time"},write:{target:"time"}}})],xt.prototype,"timeExtent",void 0),xt=Ct=(0,i._)([(0,c.j)("esri.rest.support.ImageSampleParameters")],xt);const It=xt;var Tt=r(23808);const Nt=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),Dt=(0,u.Eg)(p.q9,{min:0,max:255}),jt=e=>{let t=class extends e{constructor(){super(...arguments),this._functionRasterInfos={},this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this._cachedRendererJson=null,this._serviceSupportsMosaicRule=null,this._rasterAttributeTableFieldPrefix="Raster.",this.adjustAspectRatio=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.defaultMosaicRule=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalInfo=null,this.multidimensionalSubset=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelFilter=null,this.raster=void 0,this.sourceType=null,this.viewId=void 0,this.symbolizer=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=void 0}initialize(){this._set("exportImageServiceParameters",new $({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.length<1||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.forEach((t=>{e.set(t.name.toLowerCase().replaceAll(/ /gi,"_"),t.name)})),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every((e=>"number"==typeof e)))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,r){null!=e&&"lerc"!==this.format&&(t[r]=e)}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?k.Z.fromJSON(t):null}get fieldsIndex(){return this.fields?new X.Z(this.fields):null}set format(e){e&&Nt.has(e.toLowerCase())&&this._set("format",e.toLowerCase())}readFormat(e,t){return"esriImageServiceDataTypeVector-UV"===t.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===t.serviceDataType||null!=this.pixelFilter?"lerc":"jpgpng"}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=k.Z.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const r=e||t.mosaicRule;return r?k.Z.fromJSON(r):this._isMosaicRuleSupported(t)?k.Z.fromJSON(t):null}writeMosaicRule(e,t,r){let i=this.mosaicRule;const n=this.definitionExpression;i?n&&n!==i.where&&(i=i.clone(),i.where=n):n&&(i=new k.Z({where:n})),this._isValidCustomizedMosaicRule(i)&&(t[r]=i.toJSON())}writeNoData(e,t,r){null!=e&&"number"==typeof e&&(t[r]=Dt(e))}readObjectIdField(e,t){if(!e){const r=t.fields.find((e=>"esriFieldTypeOID"===e.type||"oid"===e.type));e=r?.name}return e}get parsedUrl(){return(0,_.mN)(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}set renderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("renderer",e)}readRenderer(e,t,r){const i=t?.layerDefinition?.drawingInfo?.renderer,n=(0,f.ij)(i,r);return null==n?null:("vector-field"===n.type&&t.symbolTileSize&&!i.symbolTileSize&&(n.symbolTileSize=t.symbolTileSize),V(n)||v.Z.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),n)}writeRenderer(e,t,r){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON(),"vector-field"===e.type&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){const e=this._rasterAttributeTableFieldPrefix,t=new W.Z({name:"Raster.ItemPixelValue",alias:"Item Pixel Value",domain:null,editable:!1,length:50,type:"string"}),r=new W.Z({name:"Raster.ServicePixelValue",alias:"Service Pixel Value",domain:null,editable:!1,length:50,type:"string"}),i=new W.Z({name:"Raster.ServicePixelValue.Raw",alias:"Raw Service Pixel Value",domain:null,editable:!1,length:50,type:"string"});let n=this.fields?(0,w.d9)(this.fields):[];n.push(r),this.capabilities?.operations.supportsQuery&&this.fields&&this.fields.length>0&&n.push(t),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some((e=>"none"===e.name.toLowerCase()))&&n.push(i),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter((e=>"none"!==e.name.toLowerCase())).forEach((e=>{n.push(new W.Z({name:"Raster.ServicePixelValue."+e.name,alias:e.name,domain:null,editable:!1,length:50,type:"string"}))})),this._isVectorDataSet()&&(n.push(new W.Z({name:"Raster.Magnitude",alias:"Magnitude",domain:null,editable:!1,type:"double"})),n.push(new W.Z({name:"Raster.Direction",alias:"Direction",domain:null,editable:!1,type:"double"})));const{attributeTable:s}=this.rasterInfo??{};if(null!=s){const t=s.fields.filter((e=>"esriFieldTypeOID"!==e.type&&"value"!==e.name.toLowerCase())).map((t=>{const r=(0,w.d9)(t);return r.name=e+t.name,r}));n=n.concat(t)}return n}get renderingRule(){return(0,b.Mr)(v.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this.rasterFunction}set renderingRule(e){(0,b.Mr)(v.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=T.Z.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const r=t.rasterFunctionInfos;return t.renderingRule||r?.length&&"None"!==r[0].name?this._isRFTJson(t.renderingRule)?T.Z.fromJSON({rasterFunctionDefinition:t.renderingRule}):T.Z.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const r=e||t.extent.spatialReference;return r?pe.Z.fromJSON(r):null}readPixelType(e){return Q.sM.fromJSON(e)||e}writePixelType(e,t,r){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[r]=Q.sM.toJSON(e))}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),r}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let r=e;const{renderer:i,symbolizer:n,pixelFilter:s,bandIds:o}=this;if(!this._isPicture()&&i&&n&&!s){const s=JSON.stringify(this._cachedRendererJson)!==JSON.stringify(i.toJSON()),a=this._rasterJobHandler.instance;if(a){s&&(n.bind(),await a.updateSymbolizer(n,t),this._cachedRendererJson=i.toJSON());const l=await a.symbolize({bandIds:o,...e},t);r={extent:e.extent,pixelBlock:l}}else r={extent:e.extent,pixelBlock:n.symbolize({bandIds:o,...e})}}return r}destroy(){this._shutdownJobHandler()}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new o.Z("imagery-layer:compute-angles","this operation is not supported on the input image service");return e=(0,p.TJ)(tt,e).clone(),async function(e,t,r){const i=t.toJSON();null!=i.angleName&&(i.angleName=i.angleName.join(",")),t?.point?.spatialReference?.imageCoordinateSystem&&(i.point.spatialReference=ze(t.point.spatialReference)),t?.spatialReference?.imageCoordinateSystem&&(i.spatialReference=Le(t.spatialReference));const n=(0,ue.en)(e),s=(0,ue.cv)({...n.query,f:"json",...i}),o=(0,ue.lA)(s,r),{data:a}=await(0,g.Z)(`${n.path}/computeAngles`,o);return a.spatialReference=a.spatialReference?null!=a.spatialReference.geodataXform?new pe.Z({wkid:0,imageCoordinateSystem:a.spatialReference}):pe.Z.fromJSON(a.spatialReference):null,"NaN"===a.north&&(a.north=null),"NaN"===a.up&&(a.up=null),new de(a)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new o.Z("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,p.TJ)(Rt,e).clone(),async function(e,t,r){const i=t.toJSON(),{geometries:n}=t;if(n)for(let e=0;e<n.length;e++)n[e].spatialReference?.imageCoordinateSystem&&(i.geometries.geometries[e].spatialReference=ze(n[e].spatialReference));const s=(0,ue.en)(e),o=(0,ue.cv)({...s.query,f:"json",...i}),a=(0,ue.lA)(o,r),{data:l}=await(0,g.Z)(`${s.path}/computePixelLocation`,a);return De.fromJSON(l)}(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new o.Z("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,p.TJ)(yt.Z,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await Je(e,t,r),n=(0,ue.en)(e),{data:s}=await(0,g.Z)(`${n.path}/computeHistograms`,i);return{histograms:s.histograms}}(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new o.Z("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,p.TJ)(yt.Z,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await Je(e,t,r),n=(0,ue.en)(e),{data:s}=await(0,g.Z)(`${n.path}/computeStatisticsHistograms`,i),{statistics:o}=s;return o?.length&&o.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:o,histograms:s.histograms}}(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const r=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?r.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?r.mensuration.supportsHeightFromBaseAndTopShadow:r.mensuration.supportsHeightFromTopAndTopShadow))throw new o.Z("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,p.TJ)(mt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await qe(e,t,[t.fromGeometry,t.toGeometry],r);return Fe.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsAreaAndPerimeter||e.is3D&&!r.mensuration.supports3D)throw new o.Z("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,p.TJ)(at,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await qe(e,t,[t.geometry],r);return ve.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsDistanceAndAngle||e.is3D&&!r.mensuration.supports3D)throw new o.Z("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,p.TJ)(pt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await qe(e,t,[t.fromGeometry,t.toGeometry],r);return _e.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsPointOrCentroid||e.is3D&&!r.mensuration.supports3D)throw new o.Z("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,p.TJ)(Ft,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await qe(e,t,[t.geometry],r);return Pe.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const r=this.getField(e);return r?r.domain:null}async fetchImage(e,t,i,n={}){if(null==e||null==t||null==i)throw new o.Z("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required.");if(this.renderer||this.symbolizer){const e=await this._generateRasterInfo(this.rasterFunction,{signal:n.signal});e&&(this.rasterInfo=e)}const s=this.getExportImageServiceParameters(e,t,i,n.timeExtent);if(null==s){if(n.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");return e.width=t,e.height=i,n.returnImageBitmap?{imageBitmap:await(0,Y.g)(e,`${r(this.parsedUrl)}/exportImage`,n.signal)}:{imageOrCanvasElement:e}}const{bandIds:s,rasterInfo:o}=this,a=(s?.length||o.bandCount)??0,l=t*i,u=o.pixelType,p=[];for(let e=0;e<a;e++)p.push(ee.Z.createEmptyBand(u,l));return{pixelData:{pixelBlock:new ee.Z({width:t,height:i,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}const a=!!n.requestAsImageElement&&!this.pixelFilter,l=a&&!!n.returnImageBitmap,u={imageServiceParameters:s,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:a,returnImageBitmap:l,signal:n.signal};return this._requestArrayBuffer(u)}fetchKeyProperties(e){return(0,g.Z)(r(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>e.data))}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new o.Z("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,g.Z)(r(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>xe.Z.fromJSON(e.data)))}getCatalogItemRasterInfo(e,t){const i={...t,query:this._getQueryParams()};return async function(e,t,r){const i=(0,ue.en)(e),n=(0,ue.cv)({...i?.query,f:"json"}),s=(0,ue.lA)(n,r),o=`${i?.path}/${t}/info`,a=(0,g.Z)(`${o}`,s),l=(0,g.Z)(`${o}/keyProperties`,s),u=await Promise.allSettled([a,l]),p="fulfilled"===u[0].status?u[0].value.data:null,c="fulfilled"===u[1].status?u[1].value.data:null;let d=null;p.statistics?.length&&(d=p.statistics.map((e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]}))));const m=Ue.Z.fromJSON(p.extent),h=Math.ceil(m.width/p.pixelSizeX-.1),y=Math.ceil(m.height/p.pixelSizeY-.1),f=m.spatialReference,b=new Ce.Z({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:f}),w=p.histograms?.length?p.histograms:null,v=new Ke.Z({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new te.Z({width:h,height:y,bandCount:p.bandCount,extent:m,spatialReference:f,pixelSize:b,pixelType:p.pixelType.toLowerCase(),statistics:d,histograms:w,keyProperties:c,storageInfo:v})}(r(this.parsedUrl),e,i)}async getCatalogItemICSInfo(e,t){const{data:i}=await(0,g.Z)(r(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),n=i?.ics;if(!n)return;let s=null;try{s=(await(0,g.Z)(r(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!s||!s.spatialReference)return{ics:n,icsToPixelTransform:null,icsExtent:null,northDirection:null};const o=this.version>=10.7?(0,g.Z)(r(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then((e=>e.data)).catch((()=>({}))):{},a=s.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[s]}),inSR:(0,F.B9)(a),outSR:"0:"+e},u=(0,g.Z)(r(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then((e=>e.data)).catch((()=>({}))),p=(s.xmin+s.xmax)/2,c=(s.ymax-s.ymin)/6,d=s.ymin+c,m=[];for(let e=0;e<5;e++)m.push({x:p,y:d+c*e});const h={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:m}),inSR:(0,F.B9)(a),outSR:"0:"+e},y=(0,g.Z)(r(this.parsedUrl)+"/project",{query:this._getQueryParams(h),...t}).then((e=>e.data)).catch((()=>({}))),f=await Promise.all([o,u,y]);let b=f[0].ipxf;if(null==b){const e=n.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(b={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const w=Ue.Z.fromJSON(f[1]?.geometries?.[0]);w&&(w.spatialReference=new pe.Z({wkid:0,imageCoordinateSystem:n}));const v=f[2].geometries?f[2].geometries.filter((e=>null!=e?.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y)):[],R=v.length;if(R<3)return{ics:n,icsToPixelTransform:b,icsExtent:w,northDirection:null};let _=0,S=0,C=0,x=0;for(let e=0;e<R;e++)_+=v[e].x,S+=v[e].y,C+=v[e].x*v[e].x,x+=v[e].x*v[e].y;const I=(R*x-_*S)/(R*C-_*_);let T=0;const N=v[4].x>v[0].x,D=v[4].y>v[0].y;return I===1/0?T=D?90:270:0===I?T=N?0:180:I>0?T=N?180*Math.atan(I)/Math.PI:180*Math.atan(I)/Math.PI+180:I<0&&(T=D?180+180*Math.atan(I)/Math.PI:360+180*Math.atan(I)/Math.PI),{ics:n,icsToPixelTransform:b,icsExtent:w,northDirection:T}}async generateRasterInfo(e,t){if(e=(0,p.TJ)(T.Z,e),this.serviceRasterInfo&&(!e||"none"===e.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e)))return this.serviceRasterInfo;const i=function(e){if(!e)return null;const t=JSON.stringify(e).match(/"rasterFunction":"(.*?")/gi),r=t?.map((e=>e.replace('"rasterFunction":"',"").replace('"',"")));return r?r.join("/"):null}(e);if(!i)throw new o.Z("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[i])return this._functionRasterInfos[i];const n={...t,query:this._getQueryParams()},s=(0,Ye.Nb)(r(this.parsedUrl),e,n);this._functionRasterInfos[i]=s;try{return await s}catch(e){throw this._functionRasterInfos[i]=null,e}}getExportImageServiceParameters(e,t,i,n){const s=Le((e=e.clone().shiftCentralMeridian()).spatialReference,r(this.parsedUrl));this.pixelType!==this.serviceRasterInfo.pixelType&&(this.exportImageServiceParameters.pixelType=this.pixelType);const o=this.exportImageServiceParameters.toJSON(),{bandIds:a,noData:l}=o;let{renderingRule:u}=o;const p=this.rasterFunction?.rasterFunctionDefinition,c=!this.renderer||"raster-stretch"===this.renderer.type;if(a?.length&&this._hasRasterFunction(this.rasterFunction)&&!p&&c){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:a}};if("Stretch"===u.rasterFunction)e.rasterFunctionArguments.Raster=u.rasterFunctionArguments.Raster,u.rasterFunctionArguments.Raster=e;else if("Colormap"===u.rasterFunction){const t=u.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,u.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=u,u=e;o.bandIds=void 0}else o.bandIds=a?.join(",");l instanceof Array&&l.length>0&&(o.noData=l.join(","));const d=this._processMultidimensionalIntersection(null,n,this.exportImageServiceParameters.mosaicRule);if(d.isOutSide)return null;o.mosaicRule=null!=d.mosaicRule?JSON.stringify(d.mosaicRule):null,n=d.timeExtent,o.renderingRule=this._getRenderingRuleString(T.Z.fromJSON(u));const m={};if(null!=n){const{start:e,end:t}=n.toJSON();e&&t&&e===t?m.time=""+e:null==e&&null==t||(m.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:s,imageSR:s,size:t+","+i,...o,...m}}async getSamples(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r?.operations.supportsGetSamples)throw new o.Z("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,p.TJ)(It,e).clone();const{raster:i}=this;return i&&null==e.raster&&(e.raster=i),async function(e,t,r){const i=t.toJSON();Ve(i),i.outFields?.length&&(i.outFields=i.outFields.join(","));const n=await(0,le.aX)(t.geometry),s=n?.[0];null!=s&&(i.geometry=s.toJSON());const o=(0,ue.en)(e),a=(0,ue.cv)({...o.query,f:"json",...i}),l=(0,ue.lA)(a,r),{data:u}=await(0,g.Z)(`${o.path}/getSamples`,l),p=u?.samples?.map((e=>{const t="NaN"===e.value||""===e.value?null:e.value.split(" ").map((e=>Number(e)));return{...e,pixelValue:t}}));return Ae.fromJSON({samples:p})}(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new o.Z("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,p.TJ)(bt,e).clone(),this.version<10.91&&"extent"===e.geometry?.type&&(e.geometry=Qe.Z.fromExtent(e.geometry));const r=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(r.isOutSide)throw new o.Z("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=r.timeExtent,e.mosaicRule=r.mosaicRule;const{raster:i,rasterFunction:n}=this;return n&&null==e.rasterFunction&&(e.rasterFunction=n),i&&null==e.raster&&(e.raster=i),Ee(this.url,e,this._getRequestOptions(t))}createQuery(){const e=new $e.Z;return e.outFields=["*"],e.returnGeometry=!0,e.where=this.definitionExpression||"1=1",e}async queryRasters(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,He.e)(this.url,e,t)}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Xe.G)(this.url,e,t)}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,We.P)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new o.Z("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:r,returnDomainValues:i,returnTopmostRaster:n,showNoDataRecords:s}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let a=!1,l=null,u=null;const p="raster.servicepixelvalue",c=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(a=e.outFields.some((e=>!e.toLowerCase().includes(p))),this.version>=10.4)){const t=e.outFields.filter((e=>e.toLowerCase().includes(p)&&e.length>24)).map((e=>{const t=e.slice(25);return[this._updateRenderingRulesFunctionName(t,c),t]}));l=t.map((e=>new T.Z({functionName:e[0]}))),u=t.map((e=>e[1]));const{rasterFunction:r}=this;0===l.length?r?.functionName?(l.push(r),u.push(r.functionName)):l=null:r?.functionName&&!l.some((e=>e.functionName===r.functionName))&&(l.push(r),u.push(r.functionName))}const d=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:m}=this;let h=e.timeExtent||this.timeExtent;if(m){const{isOutside:t,intersection:r}=(0,ie.W2)(m,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new o.Z("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");null!=r?.timeExtent&&(h=r.timeExtent)}const y=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,h);let f=e.geometry;this.version<10.91&&"extent"===f?.type&&(f=Qe.Z.fromExtent(f));const g=this._getQueryParams({geometry:f,timeExtent:h,mosaicRule:y,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:l,pixelSize:r,returnCatalogItems:a,returnGeometry:d,raster:this.raster,maxItemCount:n?1:null});delete g.f;const b=new bt(g);try{await this._generateRasterInfo(this.rasterFunction);const r=await Ee(this.url,b,{signal:t?.signal,query:{...this.customParameters}}),n=e.outFields,o=null!=r.value&&r.value.toLowerCase().includes("nodata");if(!a||d||!r?.catalogItems?.features.length||!s&&o)return this._processVisibleRastersResponse(r,{returnDomainValues:i,templateRRFunctionNames:u,showNoDataRecords:s,templateFields:n});const l=this.objectIdField||"ObjectId",p=r.catalogItems?.features??[],c=p.map((e=>e.attributes?.[l])),m=new $e.Z({objectIds:c,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[l]}),h=await this.queryRasters(m);return h?.features?.length&&h.features.forEach((t=>{p.forEach((r=>{r.attributes[l]===t.attributes[l]&&(r.geometry=new Qe.Z(t.geometry),null!=e.outSpatialReference&&(r.geometry.spatialReference=e.outSpatialReference))}))})),this._processVisibleRastersResponse(r,{returnDomainValues:i,templateRRFunctionNames:u,showNoDataRecords:s,templateFields:n})}catch{throw new o.Z("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const i=(0,g.Z)(r(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.statistics)),n=(0,g.Z)(r(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.histograms)),s=await Promise.all([i,n]);return s[0]&&s[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:s[0]||null,histograms:s[1]||null}}async createFlowMesh(e,t){const r=this._rasterJobHandler.instance;return r?r.createFlowMesh(e,t):(0,Tt.GE)(e.meshType,e.simulationSettings,e.flowData,null!=t.signal?t.signal:(new AbortController).signal)}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return(0,ie.jj)(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,i=null!=this.serviceRasterInfo?Promise.resolve(this.serviceRasterInfo):(0,Ye.gh)(r(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then((e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),(0,Ye.n$)(e,t),e))),n=this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,s=this._getRasterFunctionInfos();return Promise.all([i,n,s]).then((e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.renderer&&!this._isSupportedRenderer(this.renderer)&&(this._set("renderer",null),v.Z.getLogger(this).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("renderer",this._configRenderer(this.renderer)),this.addHandles([(0,R.YP)((()=>this.rasterFunction),(e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this._generateRasterInfo(e).then((e=>{e&&(this.rasterInfo=e)}))}))]);const{serviceRasterInfo:t}=this;null!=t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)}))}_combineMosaicRuleWithTimeExtent(e,t){const r=this.timeInfo,{multidimensionalInfo:i}=this.serviceRasterInfo;if(null==e||null==i||null==t||null==r?.startField)return e;const{startField:n}=r,s=i.variables.some((e=>e.dimensions.some((e=>e.name===n))))?n:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter((e=>e.dimensionName!==s)),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const o=e.multidimensionalDefinition.filter((e=>e.dimensionName===s)),a=null!=t.start?t.start.getTime():null,l=null!=t.end?t.end.getTime():null,u=null==a||null==l||a===l,p=u?[a||l]:[[a,l]],c=this.version>=10.8;if(o.length)o.forEach((e=>{e.dimensionName===s&&(c?(e.dimensionName=null,e.isSlice=!1,e.values=[]):(e.isSlice=u,e.values=p))}));else if(!c){const t=e.multidimensionalDefinition.filter((e=>null!=e.variableName&&null==e.dimensionName));t.length?t.forEach((e=>{e.dimensionName=s,e.isSlice=u,e.values=p})):e.multidimensionalDefinition.push(new x.Z({variableName:"",dimensionName:s,isSlice:u,values:p}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return null==e?null:(e.multidimensionalDefinition&&(e.multidimensionalDefinition=e.multidimensionalDefinition.filter((e=>!(!e.variableName&&!e.dimensionName))),0===e.multidimensionalDefinition.length&&(e.multidimensionalDefinition=null)),"mosaic-dataset"!==this.sourceType&&null==e.multidimensionalDefinition?null:e)}async _prepareForQuery(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQuery)throw new o.Z("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=null!=e?(0,p.TJ)($e.Z,e):this.createQuery(),t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:e,requestOptions:t}}async _initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const e=new re.Z;this._rasterJobHandler.connectionPromise=e.initialize().then((()=>{this._rasterJobHandler.instance=e}),(()=>{})),await this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this._cachedRendererJson=null}_isSupportedRenderer(e){const{rasterInfo:t,rasterFunction:r}=this;return"unique-value"===e.type&&this._hasRasterFunction(r)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&(0,oe.U0)(t).includes(e.type)}async _fetchCapabilities(e){return this.capabilities||await this._fetchServiceInfo(e),this.capabilities}async _fetchServiceInfo(e){let t=this.sourceJSON;if(!t){const{data:i,ssl:n}=await(0,g.Z)(r(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=i,this.sourceJSON=t,n&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map((e=>e.trim())).indexOf("tilesonly")>-1)throw new o.Z("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;const t=this._isMosaicDataset(e),r=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||r}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:r}=e,i="resample"===t?.toLowerCase(),n=r?.ResampleType||r?.resampleType;return i&&(7===n||10===n)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:r}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){if(!this.bandIds&&r.bandCount>=3){const e=(0,oe.YD)(r);!e||3===r.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=(0,oe.Ob)(r,{bandIds:this.bandIds,variableName:this.rasterFunction?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}));const t=(0,oe.ol)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=t,this.symbolizer.rasterInfo=r):this.symbolizer=new ae.Z({rendererJSON:t,rasterInfo:r}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:null!=e.pixelBlock?e.pixelBlock.clone():null}}_getQueryParams(e){null!=e?.renderingRule&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:r}=this;return{raster:t,viewId:r,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,r){return this._rasterJobHandler.instance?this._rasterJobHandler.instance.decode({data:e,options:t}):(0,ne.J)(e,t,r)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;if(this.loaded)return t;if(t&&this.version>=10.3){if(1===t.length&&"none"===t[0].name.toLowerCase())return t;const i=await(0,g.Z)(r(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e});return i.data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:i,returnImageBitmap:n,signal:s}=e;if(i&&this._canRequestImageElement(t.format)){const i=`${r(this.parsedUrl)}/exportImage`,{data:o}=await(0,g.Z)(i,{responseType:n?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:s});return o instanceof Blob?{imageBitmap:await(0,Y.g)(o,i,s),params:t}:{imageOrCanvasElement:o,params:t}}const a=this._initJobHandler(),l=(0,g.Z)(r(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:s}),u=(await Promise.all([l,a]))[0].data,p=t.format||"jpgpng";let c=p;if("bsq"!==c&&"bip"!==c&&(c=(0,ne.y)(u)),!c)throw new o.Z("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(u)));const d={signal:s},m="gif"===p||"bmp"===p||p.includes("png")&&("png"===c||"jpg"===c)?(0,ne.J)(u,{useCanvas:!0,...t},d):this._decodePixelBlock(u,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:p},d);return{pixelData:{pixelBlock:await m,extent:t.extent},params:t}}_generateRasterInfo(e,t){return this.generateRasterInfo(e,t).catch((()=>null))}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=(0,ie.Tj)(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new k.Z;const e=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.rasterFunction&&"none"!==this.rasterFunction.functionName?.toLowerCase()&&t.forEach((e=>e.variableName="")),t=t.filter((({variableName:e,dimensionName:t})=>e&&"*"!==e||t)),!e?.length&&t.length&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,t){t=t||{};const r=e.value,{templateRRFunctionNames:i,showNoDataRecords:n,returnDomainValues:s,templateFields:o}=t,a=e.processedValues;let l=e.catalogItems?.features,u=e.properties?.Values?.map((e=>e.replaceAll(/ /gi,", ")))||[];const p=this.objectIdField||"ObjectId",c="string"==typeof r&&r.toLowerCase().includes("nodata"),d=[];if(r&&!l&&!c){const e={};e[p]=0,u=[r],l=[new y.Z(this.fullExtent,null,e)]}if(!l)return[];let m,h,f;this._updateResponseFieldNames(l,o),c&&!n&&(l=[]);for(let e=0;e<l.length;e++){if(m=l[e],null!=r){if(h=u[e],f=this.rasterFunction&&a&&a.length>0&&i&&i.length>0&&i.includes(this.rasterFunction.functionName)?a[i.indexOf(this.rasterFunction.functionName)]:r,"nodata"===h.toLowerCase()&&!n)continue;const t="Raster.ItemPixelValue",s="Raster.ServicePixelValue";m.attributes[t]=h,m.attributes[s]=f,this._updateFeatureWithMagDirValues(m,h);const o=this.fields&&this.fields.length>0;let l=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?o?h:r:f;this.rasterFunction||(l=o?h:r),this._updateFeatureWithRasterAttributeTableValues(m,l)}if(m.sourceLayer=m.layer=this,s&&this._updateFeatureWithDomainValues(m),i&&a&&i.length===a.length)for(let e=0;e<i.length;e++){const t="Raster.ServicePixelValue."+i[e];m.attributes[t]=a[e]}d.push(l[e])}return d}_processMultidimensionalIntersection(e,t,r){const{multidimensionalSubset:i}=this;if(!i)return{isOutSide:!1,timeExtent:t,mosaicRule:r=this._combineMosaicRuleWithTimeExtent(r,t)};if(i){const{isOutside:r,intersection:n}=(0,ie.W2)(i,{geometry:e,timeExtent:t});if(r)return{isOutSide:!0,timeExtent:null,mosaicRule:null};null!=n?.timeExtent&&(t=n.timeExtent)}if(r=this._combineMosaicRuleWithTimeExtent(r,t),r?.multidimensionalDefinition){const{isOutside:e}=(0,ie.W2)(i,{multidimensionalDefinition:r.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:r}}_updateFeatureWithRasterAttributeTableValues(e,t){const r=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==r)return;const{features:i,fields:n}=r,s=n.map((e=>e.name)).find((e=>"value"===e.toLowerCase()));if(!s)return;const o=i.filter((e=>e.attributes[s]===(null!=t?parseInt(t,10):null)));o&&o[0]&&n.forEach((t=>{const r=this._rasterAttributeTableFieldPrefix+t.name;e.attributes[r]=o[0].attributes[t.name]}))}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const r=t.split(/,\s*/).map((e=>parseFloat(e))),i=r.map((e=>[e])),n=r.map((e=>({minValue:e,maxValue:e,noDataValue:null}))),s=new ee.Z({height:1,width:1,pixelType:"f32",pixels:i,statistics:n});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:s,extent:new Ue.Z(0,0,0,0,this.spatialReference)});const o="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[s.pixels[0][0],s.pixels[1][0]]:(0,se.Tg)([s.pixels[0][0],s.pixels[1][0]]);e.attributes["Raster.Magnitude"]=o[0],e.attributes["Raster.Direction"]=o[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter((e=>e.domain&&"coded-value"===e.domain.type));null!=t&&t.forEach((t=>{const r=e.attributes[t.name];if(null!=r){const i=t.domain.codedValues.find((e=>e.code===r));i&&(e.attributes[t.name]=i.name)}}))}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const r=this.fieldsIndex;null!=r&&e.forEach((e=>{if(e?.attributes)for(const i of t){const t=r.get(i)?.name;t&&t!==i&&(e.attributes[i]=e.attributes[t],delete e.attributes[t])}}))}_getRenderingRuleString(e){if(e){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRasterFunction(e){return null!=e?.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const r=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(r)?t.get(r):e}_isRFTJson(e){return e?.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:r,rasterFunction:i}=this;i&&e instanceof yt.Z&&null==e.rasterFunction&&(e.rasterFunction=i),r&&null==e.mosaicRule&&(e.mosaicRule=r),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map((e=>e.trim())):["image","catalog"],{currentVersion:r,advancedQueryCapabilities:i,maxRecordCount:n}=e,s=t.includes("image"),o="esriImageServiceDataTypeElevation"===e.serviceDataType,a=!(!e.spatialReference&&!e.extent?.spatialReference),l=t.includes("edit"),u=t.includes("mensuration")&&a,p=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map((e=>e.trim())),c=u&&p.includes("basic");return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:s,supportsExportImage:s,supportsIdentify:s,supportsMeasure:u,supportsDownload:t.includes("download"),supportsQuery:t.includes("catalog")&&e.fields&&e.fields.length>0,supportsGetSamples:r>=10.2&&s,supportsProject:r>=10.3&&s,supportsComputeStatisticsHistograms:r>=10.4&&s,supportsQueryBoundary:r>=10.6&&s,supportsCalculateVolume:r>=10.7&&o,supportsComputePixelLocation:r>=10.7&&t.includes("catalog"),supportsComputeAngles:r>=10.91,supportsAdd:l,supportsDelete:l,supportsEditing:l,supportsUpdate:l,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:n,maxRecordCountFactor:void 0,supportsStatistics:!!i?.supportsStatistics,supportsOrderBy:!!i?.supportsOrderBy,supportsDistinct:!!i?.supportsDistinct,supportsPagination:!!i?.supportsPagination,supportsStandardizedQueriesOnly:!!i?.useStandardizedQueries,supportsPercentileStatistics:!!i?.supportsPercentileStatistics,supportsCentroid:!!i?.supportsReturningGeometryCentroid,supportsDistance:!!i?.supportsQueryWithDistance,supportsExtent:!!i?.supportsReturningQueryExtent,supportsGeometryProperties:!!i?.supportsReturningGeometryProperties,supportsHavingClause:!!i?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:!1,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!i?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0},mensuration:{supportsDistanceAndAngle:c,supportsAreaAndPerimeter:c,supportsPointOrCentroid:c,supportsHeightFromBaseAndTop:u&&p.includes("base-top height"),supportsHeightFromBaseAndTopShadow:u&&p.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:u&&p.includes("top-top shadow height"),supports3D:u&&p.includes("3d")}}}};function r(e){return e?.path??""}return(0,i._)([(0,u.Cb)({clonable:!1})],t.prototype,"_functionRasterInfos",void 0),(0,i._)([(0,u.Cb)({clonable:!1})],t.prototype,"_rasterJobHandler",void 0),(0,i._)([(0,u.Cb)({clonable:!1})],t.prototype,"_cachedRendererJson",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"_serviceSupportsMosaicRule",void 0),(0,i._)([(0,S.r)("_serviceSupportsMosaicRule",["currentVersion","fields"])],t.prototype,"readServiceSupportsMosaicRule",null),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"_rasterAttributeTableFieldPrefix",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"_rasterFunctionNamesIndex",null),(0,i._)([(0,u.Cb)()],t.prototype,"adjustAspectRatio",void 0),(0,i._)([(0,u.Cb)({type:[p.z8],json:{write:!0}})],t.prototype,"bandIds",void 0),(0,i._)([(0,S.r)("bandIds")],t.prototype,"readBandIds",null),(0,i._)([(0,u.Cb)({readOnly:!0,json:{read:!1}})],t.prototype,"capabilities",void 0),(0,i._)([(0,S.r)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],t.prototype,"readCapabilities",null),(0,i._)([(0,u.Cb)({type:Number})],t.prototype,"compressionQuality",void 0),(0,i._)([(0,d.c)("compressionQuality")],t.prototype,"writeCompressionQuality",null),(0,i._)([(0,u.Cb)({type:Number})],t.prototype,"compressionTolerance",void 0),(0,i._)([(0,d.c)("compressionTolerance")],t.prototype,"writeCompressionTolerance",null),(0,i._)([(0,u.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,u.Cb)({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],t.prototype,"defaultMosaicRule",void 0),(0,i._)([(0,S.r)("defaultMosaicRule",["defaultMosaicMethod"])],t.prototype,"readDefaultMosaicRule",null),(0,i._)([(0,u.Cb)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,i._)([(0,u.Cb)({readOnly:!0,constructOnly:!0})],t.prototype,"exportImageServiceParameters",void 0),(0,i._)([(0,u.Cb)()],t.prototype,"rasterInfo",void 0),(0,i._)([(0,u.Cb)({readOnly:!0,type:[W.Z]})],t.prototype,"fields",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"fieldsIndex",null),(0,i._)([(0,u.Cb)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"],json:{write:!0}})],t.prototype,"format",null),(0,i._)([(0,S.r)("service","format",["serviceDataType"])],t.prototype,"readFormat",null),(0,i._)([(0,u.Cb)({type:Ue.Z})],t.prototype,"fullExtent",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"hasMultidimensions",void 0),(0,i._)([(0,u.Cb)({json:{read:{source:"maxImageHeight"}}})],t.prototype,"imageMaxHeight",void 0),(0,i._)([(0,u.Cb)({json:{read:{source:"maxImageWidth"}}})],t.prototype,"imageMaxWidth",void 0),(0,i._)([(0,u.Cb)({type:String,json:{type:Q.cl.jsonValues,read:Q.cl.read,write:Q.cl.write}})],t.prototype,"interpolation",void 0),(0,i._)([(0,u.Cb)()],t.prototype,"minScale",void 0),(0,i._)([(0,S.r)("service","minScale")],t.prototype,"readMinScale",null),(0,i._)([(0,u.Cb)()],t.prototype,"maxScale",void 0),(0,i._)([(0,S.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,i._)([(0,u.Cb)({type:k.Z})],t.prototype,"mosaicRule",null),(0,i._)([(0,S.r)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],t.prototype,"readMosaicRule",null),(0,i._)([(0,d.c)("mosaicRule")],t.prototype,"writeMosaicRule",null),(0,i._)([(0,u.Cb)()],t.prototype,"multidimensionalInfo",void 0),(0,i._)([(0,u.Cb)({type:K.Z,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,i._)([(0,u.Cb)({json:{type:p.z8}})],t.prototype,"noData",void 0),(0,i._)([(0,d.c)("noData")],t.prototype,"writeNoData",null),(0,i._)([(0,u.Cb)({type:String,json:{type:Q.kQ.jsonValues,read:Q.kQ.read,write:Q.kQ.write}})],t.prototype,"noDataInterpretation",void 0),(0,i._)([(0,u.Cb)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],t.prototype,"objectIdField",void 0),(0,i._)([(0,S.r)("objectIdField")],t.prototype,"readObjectIdField",null),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"geometryType",void 0),(0,i._)([(0,u.Cb)({})],t.prototype,"typeIdField",void 0),(0,i._)([(0,u.Cb)({})],t.prototype,"types",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"parsedUrl",null),(0,i._)([(0,u.Cb)({type:Function})],t.prototype,"pixelFilter",void 0),(0,i._)([(0,u.Cb)()],t.prototype,"raster",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"sourceType",void 0),(0,i._)([(0,S.r)("sourceType",["serviceSourceType","fields"])],t.prototype,"readSourceType",null),(0,i._)([(0,u.Cb)()],t.prototype,"viewId",void 0),(0,i._)([(0,u.Cb)({types:f.dr,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:f.FK,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],t.prototype,"renderer",null),(0,i._)([(0,S.r)("renderer")],t.prototype,"readRenderer",null),(0,i._)([(0,d.c)("renderer")],t.prototype,"writeRenderer",null),(0,i._)([(0,u.Cb)({clonable:!1})],t.prototype,"symbolizer",void 0),(0,i._)([(0,u.Cb)(C.Oh)],t.prototype,"opacity",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"rasterFields",null),(0,i._)([(0,u.Cb)({constructOnly:!0})],t.prototype,"rasterFunctionInfos",void 0),(0,i._)([(0,u.Cb)({type:T.Z})],t.prototype,"renderingRule",null),(0,i._)([(0,u.Cb)({type:T.Z,json:{name:"renderingRule"}})],t.prototype,"rasterFunction",null),(0,i._)([(0,S.r)("rasterFunction",["renderingRule","rasterFunctionInfos"])],t.prototype,"readRasterFunction",null),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"serviceDataType",void 0),(0,i._)([(0,u.Cb)({readOnly:!0,type:pe.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,S.r)("spatialReference",["spatialReference","extent"])],t.prototype,"readSpatialReference",null),(0,i._)([(0,u.Cb)({json:{type:Q.sM.jsonValues}})],t.prototype,"pixelType",void 0),(0,i._)([(0,S.r)("pixelType")],t.prototype,"readPixelType",null),(0,i._)([(0,d.c)("pixelType")],t.prototype,"writePixelType",null),(0,i._)([(0,u.Cb)({constructOnly:!0,type:te.Z})],t.prototype,"serviceRasterInfo",void 0),(0,i._)([(0,u.Cb)()],t.prototype,"sourceJSON",void 0),(0,i._)([(0,u.Cb)(C.HQ)],t.prototype,"url",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,S.r)("version",["currentVersion","fields","timeInfo"])],t.prototype,"readVersion",null),t=(0,i._)([(0,c.j)("esri.layers.mixins.ArcGISImageService")],t),t};var Pt=r(17287),Ot=r(71612),Zt=r(17017),Mt=r(38009),At=r(16859),Vt=r(34760),Jt=r(72965),Et=r(28294),qt=r(60199),Gt=r(32163),zt=r(12259);let Lt=class extends((0,Ot.h)((0,Et.n)((0,Jt.M)((0,Mt.q)((0,At.I)(jt((0,Vt.Q)((0,Zt.N)((0,Pt.Y)((0,a.R)((0,s.J)(m.Z)))))))))))){constructor(...e){super(...e),this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.type="imagery",this._debouncedSaveOperations=(0,l.Ds)((async(e,t,i)=>{const{save:n,saveAs:s}=await r.e(4697).then(r.bind(r,64697));switch(e){case zt.x.SAVE:return n(this,t);case zt.x.SAVE_AS:return s(this,i,t)}}))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(l.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}get legendEnabled(){return!this._isPreviewLayer&&(this._get("legendEnabled")??!0)}set legendEnabled(e){this._set("legendEnabled",e)}get listMode(){return this._isPreviewLayer?"hide":this._get("listMode")}set listMode(e){this._set("listMode",e)}writeOperationalLayerType(e,t,r){const i="vector-field"===this.renderer?.type;t[r]=i?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}get _isPreviewLayer(){return!(!this.raster||!this.url?.toLowerCase().includes("/rasterrendering/imageserver"))}createPopupTemplate(e){const t=this.rasterFields,r=this.title,i=new Set;let n=!1,s=!1;this.capabilities&&(n=this.capabilities.operations.supportsQuery&&this.fields&&this.fields.length>0,s="esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType);const o=new Set;n&&o.add("raster.itempixelvalue");for(const e of t){const t=e.name.toLowerCase();o.has(t)||t.includes("raster.servicepixelvalue.")||i.add(e.name)}s&&i.add("raster.magnitude").add("raster.direction");const a=(0,Gt.eZ)({fields:t,title:r},{...e,visibleFieldNames:i});return a?.fieldInfos&&this.rasterInfo?.pixelType.startsWith("f")&&a.fieldInfos.forEach((({format:e,fieldName:t})=>{e&&/^raster\.(item|service)pixelvalue/i.test(t)&&(e.places=2)})),a}queryFeatures(e,t){return this.queryRasters(e,t).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryFeatureCount(e,t){return this.queryRasterCount(e,t)}redraw(){this.emit("redraw")}async save(e){return this._debouncedSaveOperations(zt.x.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(zt.x.SAVE_AS,t,e)}serviceSupportsSpatialReference(e){return(0,qt.D)(this,e)}write(e,t){if(!this._isPreviewLayer)return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new o.Z("layer:unsupported",`Imagery preview layer (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}};(0,i._)([(0,u.Cb)(C.rn)],Lt.prototype,"legendEnabled",null),(0,i._)([(0,u.Cb)({type:["show","hide"]})],Lt.prototype,"listMode",null),(0,i._)([(0,u.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Lt.prototype,"isReference",void 0),(0,i._)([(0,u.Cb)({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],Lt.prototype,"operationalLayerType",void 0),(0,i._)([(0,d.c)("web-map","operationalLayerType")],Lt.prototype,"writeOperationalLayerType",null),(0,i._)([(0,u.Cb)(C.C_)],Lt.prototype,"popupEnabled",void 0),(0,i._)([(0,u.Cb)({type:n.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],Lt.prototype,"popupTemplate",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],Lt.prototype,"defaultPopupTemplate",null),(0,i._)([(0,u.Cb)({readOnly:!0,json:{read:!1}})],Lt.prototype,"type",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],Lt.prototype,"_isPreviewLayer",null),Lt=(0,i._)([(0,c.j)("esri.layers.ImageryLayer")],Lt);const Bt=Lt},70272:(e,t,r)=>{r.d(t,{S6:()=>n,nd:()=>s,u_:()=>i});class i{constructor(e=null,t={},r,i){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=i,this.displayId=0,this.geohashX=0,this.geohashY=0}weakClone(){const e=new i(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}}function n(e){return!!e.geometry?.coords?.length}class s extends i{}},44876:(e,t,r)=>{r.d(t,{Z:()=>i});class i{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new i;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},5428:(e,t,r)=>{r.d(t,{Z:()=>i});class i{constructor(e=[],t=[],r=!1){this.lengths=e??[],this.coords=t??[],this.hasIndeterminateRingOrder=r}static fromRect(e){const[t,r,n,s]=e,o=n-t,a=s-r;return new i([5],[t,r,o,0,0,a,-o,0,0,-a])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let r=0;r<this.lengths.length;r++){const i=this.lengths[r];for(let r=0;r<i;r++)e(this.coords[2*(r+t)],this.coords[2*(r+t)+1]);t+=i}}clone(e){return e?(e.set(this.coords),new i(this.lengths.slice(),e,this.hasIndeterminateRingOrder)):new i(this.lengths.slice(),this.coords.slice(),this.hasIndeterminateRingOrder)}}},98732:(e,t,r)=>{r.d(t,{$:()=>re,$g:()=>ie,EI:()=>B,GH:()=>H,IN:()=>R,Iv:()=>Z,J6:()=>A,Jd:()=>v,Nh:()=>Y,RZ:()=>X,Uy:()=>E,XA:()=>z,Yn:()=>L,cn:()=>Q,dd:()=>O,di:()=>U,eG:()=>J,fQ:()=>S,hY:()=>ne,h_:()=>$,lM:()=>W,lz:()=>oe,zj:()=>K});var i=r(20102),n=r(92604),s=r(70586),o=r(60437),a=r(24470),l=r(33955),u=r(70272),p=r(44876),c=r(5428);function d(e,t){return e?t?4:3:t?3:2}const m=n.Z.getLogger("esri.layers.graphics.featureConversionUtils"),h={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryEnvelope:0},y=(e,t,r,i,n,s)=>{e[r]=n,e[r+1]=s},f=(e,t,r,i,n,s)=>{e[r]=n,e[r+1]=s,e[r+2]=t[i+2]},g=(e,t,r,i,n,s)=>{e[r]=n,e[r+1]=s,e[r+2]=t[i+3]},b=(e,t,r,i,n,s)=>{e[r]=n,e[r+1]=s,e[r+2]=t[i+2],e[r+3]=t[i+3]};function w(e,t,r,i){if(e){if(r)return t&&i?b:f;if(t&&i)return g}else if(t&&i)return f;return y}function v({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function R({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}function _({scale:e,translate:t},r,i){return r*e[i]+t[i]}function S(e,t,r){return e?t?r?D(e):x(e):r?T(e):F(e):null}function F(e){const t=e.coords;return{x:t[0],y:t[1]}}function C(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e}function x(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2]}}function I(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e}function T(e){const t=e.coords;return{x:t[0],y:t[1],m:t[2]}}function N(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.m,e}function D(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2],m:t[3]}}function j(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e.coords[3]=t.m,e}function P(e,t){return e&&t?j:e?I:t?N:C}function O(e,t,r=P(null!=t.z,null!=t.m)){return r(e,t)}function Z(e,t,r){if(null==e)return null;const i=d(t,r),n=[];for(let t=0;t<e.coords.length;t+=i){const r=[];for(let n=0;n<i;n++)r.push(e.coords[t+n]);n.push(r)}return t?r?{points:n,hasZ:t,hasM:r}:{points:n,hasZ:t}:r?{points:n,hasM:r}:{points:n}}function M(e,t,r=d(t.hasZ,t.hasM)){e.lengths[0]=t.points.length;const i=e.coords;let n=0;for(const e of t.points)for(let t=0;t<r;t++)i[n++]=e[t];return e}function A(e,t,r){if(!e)return null;const i=d(t,r),{coords:n,lengths:s}=e,o=[];let a=0;for(const e of s){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<i;t++)e.push(n[a++]);t.push(e)}o.push(t)}return t?r?{paths:o,hasZ:t,hasM:r}:{paths:o,hasZ:t}:r?{paths:o,hasM:r}:{paths:o}}function V(e,t,r=d(t.hasZ,t.hasM)){const{lengths:i,coords:n}=e;let s=0;for(const e of t.paths){for(const t of e)for(let e=0;e<r;e++)n[s++]=t[e];i.push(e.length)}return e}function J(e,t,r){if(!e)return null;const i=d(t,r),{coords:n,lengths:s}=e,o=[];let a=0;for(const e of s){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<i;t++)e.push(n[a++]);t.push(e)}o.push(t)}return t?r?{rings:o,hasZ:t,hasM:r}:{rings:o,hasZ:t}:r?{rings:o,hasM:r}:{rings:o}}function E(e,t,r=t.hasZ,i=t.hasM){return function(e,t,r,i){const n=d(r,i),{lengths:s,coords:o}=e;let a=0;ae(e);for(const e of t){for(const t of e)for(let e=0;e<n;e++)o[a++]=t[e];s.push(e.length)}return e}(e,t.rings,r,i)}const q=[],G=[];function z(e,t,r,i,n){q[0]=e;const[s]=L(G,q,t,r,i,n);return le(q),le(G),s}function L(e,t,r,n,s,o){if(le(e),!r){for(const r of t){const t=o?r.attributes[o]:void 0;e.push(new u.u_(null,r.attributes,null,t))}return e}switch(r){case"esriGeometryPoint":return function(e,t,r,i,n){const s=P(r,i);for(const{geometry:r,attributes:i}of t){const t=null!=r?s(new c.Z,r):null;e.push(new u.u_(t,i,null,n?i[n]:void 0))}return e}(e,t,n,s,o);case"esriGeometryMultipoint":return function(e,t,r,i,n){const s=d(r,i);for(const{geometry:r,attributes:i}of t){const t=null!=r?M(new c.Z,r,s):null;e.push(new u.u_(t,i,null,n?i[n]:void 0))}return e}(e,t,n,s,o);case"esriGeometryPolyline":return function(e,t,r,i,n){const s=d(r,i);for(const{geometry:r,attributes:i}of t){const t=null!=r?V(new c.Z,r,s):null;e.push(new u.u_(t,i,null,n?i[n]:void 0))}return e}(e,t,n,s,o);case"esriGeometryPolygon":return function(e,t,r,i,n){for(const{geometry:s,centroid:o,attributes:a}of t){const t=null!=s?E(new c.Z,s,r,i):null,l=n?a[n]:void 0;null!=o?e.push(new u.u_(t,a,C(new c.Z,o),l)):e.push(new u.u_(t,a,null,l))}return e}(e,t,n,s,o);default:m.error("convertToFeatureSet:unknown-geometry",new i.Z(`Unable to parse unknown geometry type '${r}'`)),le(e)}return e}function B(e,t,r,i){G[0]=e,k(q,G,t,r,i);const n=q[0];return le(q),le(G),n}function H(e,t,r){if(null==e)return null;const n=new c.Z;return"hasZ"in e&&null==t&&(t=e.hasZ),"hasM"in e&&null==r&&(r=e.hasM),(0,l.wp)(e)?P(null!=t?t:null!=e.z,null!=r?r:null!=e.m)(n,e):(0,l.oU)(e)?E(n,e,t,r):(0,l.l9)(e)?V(n,e,d(t,r)):(0,l.aW)(e)?M(n,e,d(t,r)):void m.error("convertFromGeometry:unknown-geometry",new i.Z(`Unable to parse unknown geometry type '${e}'`))}function U(e,t,r,n){const s=e&&("coords"in e?e:e.geometry);if(null==s)return null;switch(t){case"esriGeometryPoint":{let e=F;return r&&n?e=D:r?e=x:n&&(e=T),e(s)}case"esriGeometryMultipoint":return Z(s,r,n);case"esriGeometryPolyline":return A(s,r,n);case"esriGeometryPolygon":return J(s,r,n);default:return m.error("convertToGeometry:unknown-geometry",new i.Z(`Unable to parse unknown geometry type '${t}'`)),null}}function k(e,t,r,n,s){if(le(e),null==r)return function(e,t){for(const r of t)e.push({attributes:r.attributes});return e}(e,t);switch(r){case"esriGeometryPoint":return function(e,t,r,i){let n=F;r&&i?n=D:r?n=x:i&&(n=T);for(const r of t){const{geometry:t,attributes:i}=r,s=null!=t?n(t):null;e.push({attributes:i,geometry:s})}return e}(e,t,n,s);case"esriGeometryMultipoint":return function(e,t,r,i){for(const{geometry:n,attributes:s}of t)e.push({attributes:s,geometry:null!=n?Z(n,r,i):null});return e}(e,t,n,s);case"esriGeometryPolyline":return function(e,t,r,i){for(const{geometry:n,attributes:s}of t)e.push({attributes:s,geometry:null!=n?A(n,r,i):null});return e}(e,t,n,s);case"esriGeometryPolygon":return function(e,t,r,i){for(const{geometry:n,attributes:s,centroid:o}of t){const t=null!=n?J(n,r,i):null;if(null!=o){const r=F(o);e.push({attributes:s,centroid:r,geometry:t})}else e.push({attributes:s,geometry:t})}return e}(e,t,n,s);default:m.error("convertToFeatureSet:unknown-geometry",new i.Z(`Unable to parse unknown geometry type '${r}'`))}return e}function Q(e){const{objectIdFieldName:t,spatialReference:r,transform:i,fields:n,hasM:s,hasZ:o,features:a,geometryType:l,exceededTransferLimit:u,uniqueIdField:p,queryGeometry:c,queryGeometryType:d}=e,m={features:k([],a,l,o,s),fields:n,geometryType:l,objectIdFieldName:t,spatialReference:r,uniqueIdField:p,queryGeometry:U(c,d,!1,!1)};return i&&(m.transform=i),u&&(m.exceededTransferLimit=u),s&&(m.hasM=s),o&&(m.hasZ=o),m}function $(e,t){const r=new p.Z,{hasM:n,hasZ:s,features:o,objectIdFieldName:a,spatialReference:l,geometryType:u,exceededTransferLimit:c,transform:d,fields:h}=e;return h&&(r.fields=h),r.geometryType=u??null,r.objectIdFieldName=a??t??null,r.spatialReference=l??null,r.objectIdFieldName?(o&&L(r.features,o,u,s,n,r.objectIdFieldName),c&&(r.exceededTransferLimit=c),n&&(r.hasM=n),s&&(r.hasZ=s),d&&(r.transform=d),r):(m.error(new i.Z("optimized-features:invalid-objectIdFieldName","objectIdFieldName is missing")),r)}function W(e){const{transform:t,features:r,hasM:i,hasZ:n}=e;if(!t)return e;for(const e of r)null!=e.geometry&&ie(e.geometry,e.geometry,i,n,t),null!=e.centroid&&ie(e.centroid,e.centroid,i,n,t);return e.transform=null,e}function X(e,t){const{geometryType:r,features:i,hasM:n,hasZ:s}=t;if(!e)return t;for(let t=0;t<i.length;t++){const o=i[t],a=o.weakClone();a.geometry=new c.Z,Y(a.geometry,o.geometry,n,s,r,e),o.centroid&&(a.centroid=new c.Z,Y(a.centroid,o.centroid,n,s,"esriGeometryPoint",e)),i[t]=a}return t.transform=e,t}function Y(e,t,r,i,n,s,o=r,a=i){if(ae(e),!t?.coords.length)return null;const l=h[n],{coords:u,lengths:p}=t,c=d(r,i),m=d(r&&o,i&&a),y=w(r,i,o,a);if(!p.length)return y(e.coords,u,0,0,v(s,u[0]),R(s,u[1])),ae(e,c,0),e;let f,g,b,_,S=0,F=0,C=F;for(const t of p){if(t<l)continue;let r=0;F=C,b=f=v(s,u[S]),_=g=R(s,u[S+1]),y(e.coords,u,F,S,b,_),r++,S+=c,F+=m;for(let i=1;i<t;i++,S+=c)b=v(s,u[S]),_=R(s,u[S+1]),b===f&&_===g||(y(e.coords,u,F,S,b-f,_-g),F+=m,r++,f=b,g=_);r>=l&&(e.lengths.push(r),C=F)}return le(e.coords,C),e.coords.length?e:null}function K(e,t,r,i,n,s,o=r,a=i){if(ae(e),!t?.coords.length)return null;const l=h[n],{coords:u,lengths:p}=t,c=d(r,i),m=d(r&&o,i&&a),y=w(r,i,o,a);if(!p.length)return y(e.coords,u,0,0,u[0],u[1]),ae(e,c,0),e;let f=0;const g=s*s;for(const t of p){if(t<l){f+=t*c;continue}const r=e.coords.length/m,i=f,n=f+(t-1)*c;y(e.coords,u,e.coords.length,i,u[i],u[i+1]),te(e.coords,u,c,g,y,i,n),y(e.coords,u,e.coords.length,n,u[n],u[n+1]);const s=e.coords.length/m-r;s>=l?e.lengths.push(s):le(e.coords,r*m),f+=t*c}return e.coords.length?e:null}function ee(e,t,r,i){const n=e[t],s=e[t+1],o=e[r],a=e[r+1],l=e[i],u=e[i+1];let p=o,c=a,d=l-p,m=u-c;if(0!==d||0!==m){const e=((n-p)*d+(s-c)*m)/(d*d+m*m);e>1?(p=l,c=u):e>0&&(p+=d*e,c+=m*e)}return d=n-p,m=s-c,d*d+m*m}function te(e,t,r,i,n,s,o){let a,l=i,u=0;for(let e=s+r;e<o;e+=r)a=ee(t,e,s,o),a>l&&(u=e,l=a);l>i&&(u-s>r&&te(e,t,r,i,n,s,u),n(e,t,e.length,u,t[u],t[u+1]),o-u>r&&te(e,t,r,i,n,u,o))}function re(e,t,r,i){if(!t?.coords?.length)return null;const n=d(r,i);let s=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,p=Number.NEGATIVE_INFINITY;if(t&&t.coords){const e=t.coords;for(let t=0;t<e.length;t+=n){const r=e[t],i=e[t+1];s=Math.min(s,r),u=Math.max(u,r),l=Math.min(l,i),p=Math.max(p,i)}}return(0,o.is)(e)?(0,o.bZ)(e,s,l,u,p):(0,a.al)(s,l,u,p,e),e}function ie(e,t,r,i,n){const{coords:o,lengths:a}=t,l=d(r,i);if(!o.length)return e!==t&&ae(e),e;(0,s.O3)(n);const{originPosition:u,scale:p,translate:c}=n,m=ue;m.originPosition=u;const h=m.scale;h[0]=p[0]??1,h[1]=-(p[1]??1),h[2]=p[2]??1,h[3]=p[3]??1;const y=m.translate;if(y[0]=c[0]??0,y[1]=c[1]??0,y[2]=c[2]??0,y[3]=c[3]??0,!a.length){for(let t=0;t<l;++t)e.coords[t]=_(m,o[t],t);return e!==t&&ae(e,l,0),e}let f=0;for(let t=0;t<a.length;t++){const r=a[t];e.lengths[t]=r;for(let t=0;t<l;++t)e.coords[f+t]=_(m,o[f+t],t);let i=e.coords[f],n=e.coords[f+1];f+=l;for(let t=1;t<r;t++,f+=l){i+=o[f]*h[0],n+=o[f+1]*h[1],e.coords[f]=i,e.coords[f+1]=n;for(let t=2;t<l;++t)e.coords[f+t]=_(m,o[f+t],t)}}return e!==t&&ae(e,o.length,a.length),e}function ne(e,t,r,i,n,s){if(ae(e),e.lengths.push(...t.lengths),r===n&&i===s)for(let r=0;r<t.coords.length;r++)e.coords.push(t.coords[r]);else{const o=d(r,i),a=w(r,i,n,s),l=t.coords;for(let t=0;t<l.length;t+=o)a(e.coords,l,e.coords.length,t,l[t],l[t+1])}return e}function se(e,t,r,i){let n=0,s=e[i*t],o=e[i*(t+1)];for(let a=1;a<r;a++){const r=s+e[i*(t+a)],l=o+e[i*(t+a)+1],u=(r-s)*(l+o);s=r,o=l,n+=u}return.5*n}function oe(e,t){const{coords:r,lengths:i}=e;let n=0,s=0;for(let e=0;e<i.length;e++){const o=i[e];s+=se(r,n,o,t),n+=o}return Math.abs(s)}function ae(e,t=0,r=0){le(e.lengths,r),le(e.coords,t)}function le(e,t=0){e.length!==t&&(e.length=t)}const ue={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},99514:(e,t,r)=>{r.d(t,{Z:()=>l});var i=r(20102),n=r(96674),s=r(92604),o=r(69165),a=r(25031);class l{static fromJSON(e){return new l(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new l(e.fields??[],d(e))}static fromLayerJSON(e){return new l(e.fields??[],d(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=p(t);if(t&&i){const n=u(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(i,e),r.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,o.y2)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,o.H7)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,o.Dl)(e)||(0,o.Se)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,o.Dl)(e)||(0,o.Se)(e)||e.nullable||void 0!==(0,o.os)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(u(e))??this._normalizedFieldsMap.get(p(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.Z.getLogger("esri.layers.support.FieldsIndex").error(new i.Z("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),a.pt):c.has(t.type)?a._4:null:null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,o.sX)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,n.AK)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function u(e){return e.trim().toLowerCase()}function p(e){return(0,o.q6)(e)?.toLowerCase()??""}const c=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function d(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:n}=e,s=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",l=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,a.Jv)(e.dateFieldsTimeReference):null,p=n?function(e){return"timeZone"in e}(n)?n.timeZone??l:n.dateFieldsTimeReference?(0,a.Jv)(n.dateFieldsTimeReference):l??a.pt:null,d=i?function(e){return"timeZone"in e}(i)?i.timeZone??l:i.timeReference?(0,a.Jv)(i.timeReference):l:null,m=new Map([[u(n?.creationDateField??""),p],[u(n?.editDateField??""),p],[u(s),d],[u(o),d]]);for(const{name:i,type:n}of e.fields)if(c.has(n))t.set(i,a._4);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(i,null);else if(r)t.set(i,a._4);else{const e=m.get(u(i??""))??l;t.set(i,e)}return t}},90082:(e,t,r)=>{r.d(t,{V:()=>o,g:()=>s});var i=r(20102),n=r(95330);async function s(e,t,r){let s;try{s=await createImageBitmap(e)}catch(e){throw new i.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,n.k_)(r),s}async function o(e,t,r,s,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new i.Z("request:server",`Unable to load tile ${t}/${r}/${s}`,{error:e,level:t,row:r,col:s})}return(0,n.k_)(o),a}},60199:(e,t,r)=>{r.d(t,{D:()=>s});var i=r(66677);const n=[];function s(e,t){if((0,i.M8)(e.url??""))return!0;const{wkid:r}=t;for(const t of n){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(r))return!1}return!0}n.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=23301;t<=23333;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102934;t<=102955;t++)e.add(t);return e}]),n.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),n.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),n.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),n.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}]),n.push([10.7,()=>{const e=new Set([8387,8391,8427,8545,8682,8685,8818,31370,104022,104024,104975]);for(let t=8065;t<=8068;t++)e.add(t);for(let t=8082;t<=8083;t++)e.add(t);for(let t=8379;t<=8385;t++)e.add(t);for(let t=8836;t<=8840;t++)e.add(t);for(let t=8857;t<=8860;t++)e.add(t);for(let t=53035;t<=53037;t++)e.add(t);for(let t=54090;t<=54091;t++)e.add(t);for(let t=102498;t<=102499;t++)e.add(t);return e}]),n.push([10.61,()=>new Set([102497])]),n.push([10.6,()=>{const e=new Set([7803,7805,7887,8086,8232,8237,8240,8246,8249,8252,8255,9019,9391]);for(let t=7755;t<=7787;t++)e.add(t);for(let t=7791;t<=7795;t++)e.add(t);for(let t=7799;t<=7801;t++)e.add(t);for(let t=7825;t<=7831;t++)e.add(t);for(let t=7877;t<=7878;t++)e.add(t);for(let t=7882;t<=7883;t++)e.add(t);for(let t=7991;t<=7992;t++)e.add(t);for(let t=8042;t<=8043;t++)e.add(t);for(let t=8058;t<=8059;t++)e.add(t);for(let t=8311;t<=8348;t++)e.add(t);for(let t=9060;t<=9067;t++)e.add(t);for(let t=102562;t<=102568;t++)e.add(t);for(let t=102799;t<=102900;t++)e.add(t);return e}])},41818:(e,t,r)=>{r.d(t,{P:()=>o});var i=r(11282),n=r(34599),s=r(14165);async function o(e,t,r){const o=(0,i.en)(e);return(0,n.hH)(o,s.Z.from(t),{...r}).then((e=>e.data.count))}},5396:(e,t,r)=>{r.d(t,{G:()=>o});var i=r(11282),n=r(34599),s=r(14165);async function o(e,t,r){const o=(0,i.en)(e);return(0,n.Ev)(o,s.Z.from(t),{...r}).then((e=>e.data.objectIds))}},4967:(e,t,r)=>{r.d(t,{F:()=>l,e:()=>a});var i=r(11282),n=r(34599),s=r(74889),o=r(14165);async function a(e,t,r){const i=await l(e,t,r);return s.Z.fromJSON(i)}async function l(e,t,r){const s=(0,i.en)(e),a={...r},l=o.Z.from(t),{data:u}=await(0,n.JT)(s,l,l.sourceSpatialReference,a);return u}},28694:(e,t,r)=>{r.d(t,{p:()=>n});var i=r(69285);function n(e,t,r){if(!r?.features||!r.hasZ)return;const n=(0,i.k)(r.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of r.features)n(e.geometry)}},98326:(e,t,r)=>{r.d(t,{Z:()=>c});var i,n=r(43697),s=r(96674),o=r(5600),a=r(75215),l=(r(67676),r(80442),r(52011));const u={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let p=i=class extends s.wq{constructor(e){super(e),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:e}=this,t=function(e){const{exifInfo:t,exifName:r,tagName:i}=e;if(!t||!r||!i)return null;const n=t.find((e=>e.name===r));return n?function(e){const{tagName:t,tags:r}=e;if(!r||!t)return null;const i=r.find((e=>e.name===t));return i?.value||null}({tagName:i,tags:n.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:e});return u[t]||null}clone(){return new i({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};(0,n._)([(0,o.Cb)({type:String})],p.prototype,"contentType",void 0),(0,n._)([(0,o.Cb)()],p.prototype,"exifInfo",void 0),(0,n._)([(0,o.Cb)({readOnly:!0})],p.prototype,"orientationInfo",null),(0,n._)([(0,o.Cb)({type:a.z8})],p.prototype,"id",void 0),(0,n._)([(0,o.Cb)({type:String})],p.prototype,"globalId",void 0),(0,n._)([(0,o.Cb)({type:String})],p.prototype,"keywords",void 0),(0,n._)([(0,o.Cb)({type:String})],p.prototype,"name",void 0),(0,n._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"parentGlobalId",void 0),(0,n._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"parentObjectId",void 0),(0,n._)([(0,o.Cb)({type:a.z8})],p.prototype,"size",void 0),(0,n._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"url",void 0),p=i=(0,n._)([(0,l.j)("esri.layers.support.AttachmentInfo")],p);const c=p},56545:(e,t,r)=>{r.d(t,{Z:()=>d});var i,n=r(43697),s=r(96674),o=r(22974),a=r(5600),l=r(75215),u=r(52011),p=r(30556);let c=i=class extends s.wq{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new i((0,o.d9)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,n._)([(0,a.Cb)({type:[String],json:{write:!0}})],c.prototype,"attachmentTypes",void 0),(0,n._)([(0,a.Cb)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],c.prototype,"attachmentsWhere",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"cacheHint",void 0),(0,n._)([(0,a.Cb)({type:[String],json:{write:!0}})],c.prototype,"keywords",void 0),(0,n._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"globalIds",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],c.prototype,"num",void 0),(0,n._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"objectIds",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{default:!1,write:!0}})],c.prototype,"returnMetadata",void 0),(0,n._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"size",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],c.prototype,"start",void 0),(0,n._)([(0,p.c)("start"),(0,p.c)("num")],c.prototype,"writeStart",null),(0,n._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],c.prototype,"where",void 0),c=i=(0,n._)([(0,u.j)("esri.rest.support.AttachmentQuery")],c),c.from=(0,l.se)(c);const d=c},75935:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h});var i,n=r(43697),s=(r(66577),r(96674)),o=r(22974),a=r(5600),l=r(75215),u=r(52011),p=r(30556),c=r(10158),d=r(82971);let m=i=class extends s.wq{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new i((0,o.d9)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"cacheHint",void 0),(0,n._)([(0,a.Cb)({type:c.n,json:{write:!0}})],m.prototype,"dynamicDataSource",void 0),(0,n._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"gdbVersion",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],m.prototype,"geometryPrecision",void 0),(0,n._)([(0,a.Cb)({type:Date})],m.prototype,"historicMoment",void 0),(0,n._)([(0,p.c)("historicMoment")],m.prototype,"_writeHistoricMoment",null),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],m.prototype,"maxAllowableOffset",void 0),(0,n._)([(0,a.Cb)({type:[Number],json:{write:!0}})],m.prototype,"objectIds",void 0),(0,n._)([(0,a.Cb)({type:[String],json:{write:!0}})],m.prototype,"orderByFields",void 0),(0,n._)([(0,a.Cb)({type:[String],json:{write:!0}})],m.prototype,"outFields",void 0),(0,n._)([(0,a.Cb)({type:d.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],m.prototype,"outSpatialReference",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"relationshipId",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],m.prototype,"start",void 0),(0,n._)([(0,p.c)("start"),(0,p.c)("num")],m.prototype,"writeStart",null),(0,n._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],m.prototype,"num",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"returnGeometry",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"returnM",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"returnZ",void 0),(0,n._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],m.prototype,"where",void 0),m=i=(0,n._)([(0,u.j)("esri.rest.support.RelationshipQuery")],m),m.from=(0,l.se)(m);const h=m},28141:(e,t,r)=>{r.d(t,{Z:()=>_});var i,n=r(43697),s=r(66577),o=r(92835),a=r(35454),l=r(96674),u=r(22974),p=r(5600),c=r(75215),d=r(52011),m=r(30556),h=r(33955);r(67676),r(80442);let y=i=class extends l.wq{constructor(e){super(e),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new i({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};(0,n._)([(0,p.Cb)({type:[String],json:{write:!0}})],y.prototype,"groupByFields",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{write:!0}})],y.prototype,"topCount",void 0),(0,n._)([(0,p.Cb)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),y=i=(0,n._)([(0,d.j)("esri.rest.support.TopFilter")],y);const f=y;var g,b=r(82971);const w=new a.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),v=new a.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let R=g=class extends l.wq{constructor(e){super(e),this.cacheHint=void 0,this.distance=void 0,this.geometry=null,this.geometryPrecision=void 0,this.maxAllowableOffset=void 0,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.resultType=null,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.start=void 0,this.spatialRelationship="intersects",this.timeExtent=null,this.topFilter=void 0,this.units=null,this.where="1=1"}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new g((0,u.d9)({cacheHint:this.cacheHint,distance:this.distance,geometry:this.geometry,geometryPrecision:this.geometryPrecision,maxAllowableOffset:this.maxAllowableOffset,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,resultType:this.resultType,returnGeometry:this.returnGeometry,returnZ:this.returnZ,returnM:this.returnM,start:this.start,spatialRelationship:this.spatialRelationship,timeExtent:this.timeExtent,topFilter:this.topFilter,units:this.units,where:this.where}))}};(0,n._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],R.prototype,"cacheHint",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],R.prototype,"distance",void 0),(0,n._)([(0,p.Cb)({types:s.qM,json:{read:h.im,write:!0}})],R.prototype,"geometry",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{write:!0}})],R.prototype,"geometryPrecision",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{write:!0}})],R.prototype,"maxAllowableOffset",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],R.prototype,"num",void 0),(0,n._)([(0,p.Cb)({json:{write:!0}})],R.prototype,"objectIds",void 0),(0,n._)([(0,p.Cb)({type:[String],json:{write:!0}})],R.prototype,"orderByFields",void 0),(0,n._)([(0,p.Cb)({type:[String],json:{write:!0}})],R.prototype,"outFields",void 0),(0,n._)([(0,p.Cb)({type:b.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],R.prototype,"outSpatialReference",void 0),(0,n._)([(0,p.Cb)({type:String,json:{write:!0}})],R.prototype,"resultType",void 0),(0,n._)([(0,p.Cb)({json:{write:!0}})],R.prototype,"returnGeometry",void 0),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],R.prototype,"returnM",void 0),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],R.prototype,"returnZ",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],R.prototype,"start",void 0),(0,n._)([(0,m.c)("start"),(0,m.c)("num")],R.prototype,"writeStart",null),(0,n._)([(0,p.Cb)({type:String,json:{read:{source:"spatialRel",reader:w.read},write:{target:"spatialRel",writer:w.write}}})],R.prototype,"spatialRelationship",void 0),(0,n._)([(0,p.Cb)({type:o.Z,json:{write:!0}})],R.prototype,"timeExtent",void 0),(0,n._)([(0,p.Cb)({type:f,json:{write:!0}})],R.prototype,"topFilter",void 0),(0,n._)([(0,p.Cb)({type:String,json:{read:v.read,write:{writer:v.write,overridePolicy(e){return{enabled:null!=e&&null!=this.distance&&this.distance>0}}}}})],R.prototype,"units",void 0),(0,n._)([(0,p.Cb)({type:String,json:{write:!0}})],R.prototype,"where",void 0),R=g=(0,n._)([(0,d.j)("esri.rest.support.TopFeaturesQuery")],R),R.from=(0,c.se)(R);const _=R}}]);