@arcgis/core 4.31.0-next.20241021 → 4.31.0-next.20241022

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 (59) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/0b7ee57bec7ffac312f2.js +1 -0
  3. package/assets/esri/core/workers/chunks/1d16ca7791f64dd7c7fb.js +1 -0
  4. package/assets/esri/core/workers/chunks/{9b094aa856ba5014a352.js → 214b0b234c46f1c163a2.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{53f648321c5fde26bfe4.js → 2380f45064611610351c.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{958dfb478084024cf47a.js → 4e7ce786905314c1e820.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{210a954f5299fe105e0b.js → 539060ffb7f230fb1bd0.js} +1 -1
  8. package/assets/esri/core/workers/chunks/545441dcc8e915e63ff1.js +1 -0
  9. package/assets/esri/core/workers/chunks/6175da520643ae685058.js +1 -0
  10. package/assets/esri/core/workers/chunks/{c71304c88fce556340ef.js → 89f15dda2efa2a2e7bdc.js} +1 -1
  11. package/assets/esri/core/workers/chunks/89f74819ac1b5884c149.js +1 -0
  12. package/assets/esri/core/workers/chunks/{63719f892a7d1025c7d3.js → 9267e08c23cd80d5933d.js} +1 -1
  13. package/assets/esri/core/workers/chunks/98c1956b2e27058c8a51.js +1 -0
  14. package/assets/esri/core/workers/chunks/9c8a910b6261a4d5da77.js +1 -0
  15. package/assets/esri/core/workers/chunks/9df14b9648c253f346d1.js +1 -0
  16. package/assets/esri/core/workers/chunks/{e6e77cbdeb99d90caad1.js → a5e3a359351ac31cf124.js} +1 -1
  17. package/assets/esri/core/workers/chunks/ab6eaa3ae2e233f91a5e.js +1 -0
  18. package/assets/esri/core/workers/chunks/cb3038ec3ef0d86bf2a0.js +1 -0
  19. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +1 -1
  20. package/assets/esri/themes/dark/main.css +1 -1
  21. package/assets/esri/themes/light/main.css +1 -1
  22. package/assets/esri/themes/light/view.css +1 -1
  23. package/interfaces.d.ts +16 -0
  24. package/layers/graphics/OptimizedGeometry.js +1 -1
  25. package/layers/support/mediaUtils.js +1 -1
  26. package/layers/support/rasterFunctions/ClipFunction.js +1 -1
  27. package/layers/support/rasterFunctions/clipUtils.js +1 -1
  28. package/layers/support/rasterFunctions/localUtils.js +1 -1
  29. package/package.json +1 -1
  30. package/smartMapping/raster/renderers/classBreaks.js +1 -1
  31. package/smartMapping/raster/renderers/rgb.js +1 -1
  32. package/smartMapping/raster/renderers/stretch.js +1 -1
  33. package/smartMapping/raster/support/adapters/ImageryTileLayerAdapter.js +1 -1
  34. package/smartMapping/raster/support/adapters/RasterLayerAdapter.js +1 -1
  35. package/smartMapping/renderers/support/rendererUtils.d.ts +4 -0
  36. package/support/revision.js +1 -1
  37. package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
  38. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
  39. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerShader.js +1 -1
  40. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  41. package/views/2d/layers/MediaLayerView2D.js +1 -1
  42. package/views/2d/layers/TileLayerView2D.js +1 -1
  43. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  44. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  45. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  46. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputHighlight.glsl.js +1 -1
  47. package/views/input/BrowserEventSource.js +1 -1
  48. package/widgets/Attribution/AttributionViewModel.js +1 -1
  49. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  50. package/assets/esri/core/workers/chunks/03d0394fff1463c224f9.js +0 -1
  51. package/assets/esri/core/workers/chunks/0c40cac18711f79f0a7d.js +0 -1
  52. package/assets/esri/core/workers/chunks/1a97f98facfc62a9fc69.js +0 -1
  53. package/assets/esri/core/workers/chunks/1e3ed3ee48c2977cff6f.js +0 -1
  54. package/assets/esri/core/workers/chunks/4daab36de5efa03a8cbb.js +0 -1
  55. package/assets/esri/core/workers/chunks/c041a959c2bebee4b364.js +0 -1
  56. package/assets/esri/core/workers/chunks/ca1385e165aae8a32ca2.js +0 -1
  57. package/assets/esri/core/workers/chunks/df51c93b2dbcc89efc23.js +0 -1
  58. package/assets/esri/core/workers/chunks/efa3c919261672871f2f.js +0 -1
  59. package/assets/esri/core/workers/chunks/f01848d6c42144ec85ac.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8943],{9775:(e,t,r)=>{r.d(t,{A:()=>i});var s=r(62788),n=r(95488);class i{constructor(e=e=>e.values().next().value){this._peeker=e,this._observable=new n.I,this._items=new Set}get length(){return(0,s.gc)(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.gc)(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.gc)(this._observable),yield*this._items}}},75503:(e,t,r)=>{r.d(t,{E:()=>M,w:()=>o});var s=r(4576),n=(r(44208),r(3694)),i=r(11006);class o{constructor(e=9,t){this._compareMinX=u,this._compareMinY=h,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),w.prune(),I.prune(),v.prune(),T.prune()}all(e){a(this._data,e)}search(e,t){let r=this._data;const s=this._toBBox;if(_(e,r))for(w.clear();r;){for(let n=0,i=r.children.length;n<i;n++){const i=r.children[n],o=r.leaf?s(i):i;_(e,o)&&(r.leaf?t(i):g(e,o)?a(i,t):w.push(i))}r=w.pop()}}collides(e){let t=this._data;const r=this._toBBox;if(!_(e,t))return!1;for(w.clear();t;){for(let s=0,n=t.children.length;s<n;s++){const n=t.children[s],i=t.leaf?r(n):n;if(_(e,i)){if(t.leaf||g(e,i))return!0;w.push(n)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new A([]),this}remove(e){if(!e)return this;let t,r=this._data,n=null,i=0,o=!1;const a=this._toBBox(e);for(v.clear(),T.clear();r||v.length>0;){if(r||(r=v.pop(),n=v.data[v.length-1],i=T.pop()??0,o=!0),r.leaf&&(t=(0,s.qh)(r.children,e,r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),v.push(r),this._condense(v),this;o||r.leaf||!g(r,a)?n?(i++,r=n.children[i],o=!1):r=null:(v.push(r),T.push(i),i=0,n=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,r,s){const n=r-t+1;let i=this._maxEntries;if(n<=i){const s=new A(e.slice(t,r+1));return l(s,this._toBBox),s}s||(s=Math.ceil(Math.log(n)/Math.log(i)),i=Math.ceil(n/i**(s-1)));const o=new x([]);o.height=s;const a=Math.ceil(n/i),d=a*Math.ceil(Math.sqrt(i));b(e,t,r,d,this._compareMinX);for(let n=t;n<=r;n+=d){const t=Math.min(n+d-1,r);b(e,n,t,a,this._compareMinY);for(let r=n;r<=t;r+=a){const n=Math.min(r+a-1,t);o.children.push(this._build(e,r,n,s-1))}}return l(o,this._toBBox),o}_insert(e,t,r){const s=this._toBBox,n=r?e:s(e);v.clear();const i=function(e,t,r,s){for(;s.push(t),!0!==t.leaf&&s.length-1!==r;){let r,s=1/0,n=1/0;for(let i=0,o=t.children.length;i<o;i++){const o=t.children[i],a=c(o),l=m(e,o)-a;l<n?(n=l,s=a<s?a:s,r=o):l===n&&a<s&&(s=a,r=o)}t=r||t.children[0]}return t}(n,this._data,t,v);for(i.children.push(e),p(i,n);t>=0&&v.data[t].children.length>this._maxEntries;)this._split(v,t),t--;!function(e,t,r){for(let s=r;s>=0;s--)p(t.data[s],e)}(n,v,t)}_split(e,t){const r=e.data[t],s=r.children.length,n=this._minEntries;this._chooseSplitAxis(r,n,s);const i=this._chooseSplitIndex(r,n,s);if(!i)return;const o=r.children.splice(i,r.children.length-i),a=r.leaf?new A(o):new x(o);a.height=r.height,l(r,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(r,a)}_splitRoot(e,t){this._data=new x([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,r){let s,n,i;s=n=1/0;for(let o=t;o<=r-t;o++){const t=d(e,0,o,this._toBBox),a=d(e,o,r,this._toBBox),l=f(t,a),p=c(t)+c(a);l<s?(s=l,i=o,n=p<n?p:n):l===s&&p<n&&(n=p,i=o)}return i}_chooseSplitAxis(e,t,r){const s=e.leaf?this._compareMinX:u,n=e.leaf?this._compareMinY:h;this._allDistMargin(e,t,r,s)<this._allDistMargin(e,t,r,n)&&e.children.sort(s)}_allDistMargin(e,t,r,s){e.children.sort(s);const n=this._toBBox,i=d(e,0,t,n),o=d(e,r-t,r,n);let a=y(i)+y(o);for(let s=t;s<r-t;s++){const t=e.children[s];p(i,e.leaf?n(t):t),a+=y(i)}for(let s=r-t-1;s>=t;s--){const t=e.children[s];p(o,e.leaf?n(t):t),a+=y(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const r=e.data[t];if(0===r.children.length)if(t>0){const n=e.data[t-1],i=n.children;i.splice((0,s.qh)(i,r,i.length,n.indexHint),1)}else this.clear();else l(r,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){let r=e;for(I.clear();r;){if(!0===r.leaf)for(const e of r.children)t(e);else I.pushArray(r.children);r=I.pop()??null}}function l(e,t){d(e,0,e.children.length,t,e)}function d(e,t,r,s,n){n||(n=new A([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let i,o=t;o<r;o++)i=e.children[o],p(n,e.leaf?s(i):i);return n}function p(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function u(e,t){return e.minX-t.minX}function h(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function y(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function f(e,t){const r=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),i=Math.min(e.maxY,t.maxY);return Math.max(0,n-r)*Math.max(0,i-s)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function b(e,t,r,s,n){const o=[t,r];for(;o.length;){const t=o.pop(),r=o.pop();if(t-r<=s)continue;const a=r+Math.ceil((t-r)/s/2)*s;(0,i.q)(e,a,r,t,n),o.push(r,a,a,t)}}const w=new n.A,I=new n.A,v=new n.A,T=new n.A({deallocator:void 0});class M{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class E extends M{constructor(){super(...arguments),this.height=1,this.indexHint=new s.vW}}class A extends E{constructor(e){super(),this.children=e,this.leaf=!0}}class x extends E{constructor(e){super(),this.children=e,this.leaf=!1}}},10382:(e,t,r)=>{r.d(t,{A:()=>d});var s=r(36563),n=(r(44208),r(74887)),i=r(9775),o=r(72457),a=r(52268),l=r(61322);class d{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new i.A}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.Te)(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 a=e[i];(0,n.$X)(a)?this._clientPromises[i]=a.then((e=>(this._clients[i]=new l.default(e,t,this._ongoingJobsQueue),o(r),this._clients[i])),(()=>(o(s),null))):(this._clients[i]=new l.default(a,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 n=0;n<this._clientPromises.length;++n){const i=this._clientPromises[n];s[n]=i.then((s=>s?.invoke(e,t,r)))}return s}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,n.NK)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,o.h)(this)}invoke(e,t,r){return this.apply(e,[t],r)}apply(e,t,r){const s=(0,n.Tw)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,resolver:s});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 s.promise}createInvokeProxy(e){return(0,a.L)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,s.vE)(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((n=>{n&&(t[s]=n.openPort()),0==--r&&e(t)}))}))}get test(){}}},72457:(e,t,r)=>{r.d(t,{h:()=>i,k:()=>n});const s=new FinalizationRegistry((e=>{e.close()}));function n(e,t){s.register(e,t,t)}function i(e){s.unregister(e)}},29953:(e,t,r)=>{r.d(t,{ho:()=>Z});var s=r(49186),n=r(44208),i=r(74887),o=r(10382),a=r(72457),l=r(61322),d=r(53966),p=r(97768),u=r(78888),h=r(84952);const c={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,h.sC)(e.url)?.after?s:"array-buffer";const n=await(0,u.A)(e.url,r),i={data:n.data,httpStatus:n.httpStatus,ssl:n.ssl};switch(n.requestOptions?.responseType){case"native-request-init":return delete i.data.signal,i;case"blob":i.data=await i.data.arrayBuffer();break;case"json":i.data=(new TextEncoder).encode(JSON.stringify(i.data)).buffer;break;case"text":i.data=(new TextEncoder).encode(i.data).buffer}return{result:i,transferList:[i.data]}}};var y=r(8341),m=r(2741),f=r(92602),g=(r(47566),r(70333));const _={};var b=r(26390);class w{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class I{constructor(){this._dispatcher=new w,this._workerPostMessage({type:y.Go.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,b.d)((()=>{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,b.d)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,y.VI)(e);if(t&&t.type===y.Go.OPEN){const{modulePath:e,jobId:r}=t;let s=await l.default.loadWorker(e);s||(s=await import(e));const n=l.default.connect(s);this._workerPostMessage({type:y.Go.OPENED,jobId:r,data:n})}}}var v=r(73444),T=r(18357);const M=()=>d.A.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:E}=y.Go;let A,x;const k="Failed to create Worker. Fallback to execute module in main thread";async function S(e){return new Promise((t=>{function r(n){const i=(0,y.VI)(n);i&&i.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),M().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new I).addEventListener("message",r),e.addEventListener("error",s)}e.addEventListener("message",r),e.addEventListener("error",s)}))}let N=0;const{ABORT:L,INVOKE:C,OPEN:R,OPENED:D,RESPONSE:B}=y.Go;class O{static async create(e){const t=await async function(){if(!(0,n.A)("esri-workers"))return S(new I);if(!A&&!x)try{const e='let globalId=0;const outgoing=new Map,configuration={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++;let s=null;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());s=()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))},t.addEventListener("abort",s)}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})})).finally((()=>{t&&t.removeEventListener("abort",s)}))}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 1:let n;function t(e){const o=n.connect(e);self.postMessage({type:2,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 3:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split("{CONFIGURATION}").join(function(){let e;if(null!=f.A.default){const t={...f.A};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(f.A));e.assetsPath=(0,h.s2)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,h.s2)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,v.JK)(),e.has={"esri-csp-restrictions":(0,n.A)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,n.A)("esri-2d-update-debug"),"esri-2d-log-updating":(0,n.A)("esri-2d-log-updating"),"featurelayer-pbf":(0,n.A)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,n.A)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,n.A)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,n.A)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,n.A)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,n.A)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,n.A)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,n.A)("featurelayer-snapshot-enabled"),"esri-atomics":(0,n.A)("esri-atomics"),"esri-shared-array-buffer":(0,n.A)("esri-shared-array-buffer"),"esri-tiles-debug":(0,n.A)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,n.A)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,n.A)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,h.s2)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,h.s2)(e.workers.workerPath):e.workers.workerPath=(0,h.s2)((0,m.s)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=f.A.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?.slice()||[],paths:{..._.paths,...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=_.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,v.JK)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),s={buildDate:T.$,fullVersion:g.ol,revision:T.u};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:s})}());A=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){x=e||{}}let e;if(A)try{e=new Worker(A,{name:"esri-worker-"+N++})}catch(t){M().warn(k,x),e=new I}else M().warn(k,x),e=new I;return S(e)}();return new O(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(),d.A.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,s=(0,y.Jc)();return new Promise(((t,n)=>{const o={resolve:t,reject:n,abortHandle:(0,i.NY)(r,(()=>{this._outJobs.delete(s),this._post({type:L,jobId:s})}))};this._outJobs.set(s,o),this._post({type:R,jobId:s,modulePath:e})}))}_onMessage(e){const t=(0,y.VI)(e);if(t)switch(t.type){case D:this._onOpenedMessage(t);break;case B:this._onResponseMessage(t);break;case L:this._onAbortMessage(t);break;case C: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:n}=e,o=n?new AbortController:null,a=this._inJobs,l=c[t];let d;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);d=l.call(null,s,{signal:o?o.signal:null})}catch(e){return void this._post({type:B,jobId:r,error:(0,y.mF)(e)})}(0,i.$X)(d)?(a.set(r,{controller:o,promise:d}),d.then((e=>{a.has(r)&&(a.delete(r),this._post({type:B,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,i.zf)(e)||this._post({type:B,jobId:r,error:(0,y.mF)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:B,jobId:r},d)}_onOpenedMessage(e){const{jobId:t,data:r}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,p.xt)(s.abortHandle),s.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:n}=e,i=this._outJobs.get(t);i&&(this._outJobs.delete(t),(0,p.xt)(i.abortHandle),r?i.reject(s.A.fromJSON(JSON.parse(r))):i.resolve(n))}_post(e,t,r){return(0,y.u1)(this.worker,e,t,r)}}const j=(0,n.A)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,n.A)("workers-pool-size")??8):0;let P=(0,n.A)("esri-mobile")?Math.min(j,3):j;P||(P=(0,n.A)("safari")&&(0,n.A)("mac")?7:2);let F=0;const q=[];async function G(e,t){const r=new o.A,{registryTarget:s,...n}=t;return await r.open(e,n),s&&(0,a.k)(s,r),r}async function Z(e,t={}){if("string"!=typeof e)throw new s.A("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,n.A)("host-webworker")&&!(0,n.A)("esri-workers")&&(r="local"),"local"===r){let r=await l.default.loadWorker(e);r||(r=await import(e)),(0,i.Te)(t.signal);const s=t.client||r;return G([l.default.connect(r,t.schedule)],{...t,client:s})}if(await async function(){if(Q)return Q;$=new AbortController;const e=[];for(let t=0;t<P;t++){const r=O.create(t).then((e=>(q[t]=e,e)));e.push(r)}return Q=Promise.all(e),Q}(),(0,i.Te)(t.signal),"dedicated"===r){const r=F++%P;return G([await q[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,P);if(r<P){const s=new Array(r);for(let n=0;n<r;++n){const r=F++%P;s[n]=q[r].open(e,t)}return G(s,t)}}return G(q.map((r=>r.open(e,t))),t)}let $,Q=null},43334:(e,t,r)=>{r.d(t,{N3:()=>i,Om:()=>n});var s=r(92722);class n{constructor(e=null,t={},r,s){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=s,this.displayId=0,this.geohashX=0,this.geohashY=0}static fromJSON(e,t){const r=e.geometry?s.A.fromJSON(e.geometry):null,i=e.centroid?s.A.fromJSON(e.centroid):null,o=e.attributes[t];return new n(r,e.attributes,i,o)}weakClone(){const e=new n(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new n(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function i(e){return!!e.geometry?.coords?.length}},58512:(e,t,r)=>{r.d(t,{A:()=>s});class s{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 s;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}}},92722:(e,t,r)=>{r.d(t,{A:()=>s});class s{constructor(e=[],t=[]){this.lengths=e??[],this.coords=t??[]}static fromJSON(e){return new s(e.lengths,e.coords)}static fromRect(e){const[t,r,n,i]=e,o=n-t,a=i-r;return new s([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 s=this.lengths[r];for(let r=0;r<s;r++)e(this.coords[2*(r+t)],this.coords[2*(r+t)+1]);t+=s}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let s=0;for(const e of r){for(let r=1;r<e;r++)t[2*(s+r)]+=t[2*(s+r)-2],t[2*(s+r)+1]+=t[2*(s+r)-1];s+=e}return e}clone(e){if(0===this.lengths.length)return new s([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),r=this.coords.slice(0,t);return e?(e.set(r),new s(this.lengths,e)):new s(Array.from(this.lengths),Array.from(r))}}},6518:(e,t,r)=>{r.d(t,{F:()=>a});var s=r(44208),n=r(75503),i=r(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.w(9,(0,s.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((r,s)=>{e[t++]=s})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,i.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,r){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,r)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221:(e,t,r)=>{r.d(t,{A:()=>y});var s=r(4576),n=r(49186),i=r(65529),o=r(53966),a=r(70328),l=r(19419),d=r(90708),p=r(6518),u=r(51441),h=r(37730);const c=(0,a.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new p.F,this._featuresById=new Map,this.events=new i.A,this.featureAdapter=h.T}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,r,s,n]=this.fullBounds;return{xmin:t,ymin:r,xmax:s,ymax:n,spatialReference:(0,u.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(s.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const r of e){const e=this._boundsStore.get(r.objectId);e&&t((0,a.Jt)(c,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const r=this._featuresById.get(t);let s;if(r?(e.displayId=r.displayId,s=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);s=(0,d.jQ)(null!=s?s:(0,l.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=s&&this._boundsStore.set(t,s),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const r=this._featuresById.get(t);if(!r)return this._add(e),e;const{geometry:s,attributes:i}=e;for(const e in i)r.attributes[e]=i[e];return s&&(r.geometry=s,this._boundsStore.set(t,(0,d.jQ)((0,l.vt)(),s,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),r}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),e}}},37730:(e,t,r)=>{r.d(t,{T:()=>o});var s=r(27647),n=r(43334),i=r(92722);const o={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new n.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(null==e.centroid&&(e.centroid=(0,s.Q)(new i.A,e.geometry,t.hasZ,t.hasM)),e.centroid)}},64714:(e,t,r)=>{r.d(t,{F0:()=>l,Vx:()=>u,e2:()=>c,f:()=>y});var s=r(44208),n=r(4718),i=r(99352),o=r(4071),a=r(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?a.Cb:"esriGeometryPolyline"===e?a.yM:a.WR}}}const d=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let p=1;function u(e,t){if((0,s.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this${h(t)} = null;`;for(const t in e)r+=`this${h(t)} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${p++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function h(e){return d.test(e)?`.${e}`:`["${e}"]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}function y(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!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,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:o.$,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}}}},80340:(e,t,r)=>{r.d(t,{P:()=>I});var s=r(90237),n=(r(59456),r(69622)),i=r(49186),o=r(53966),a=r(91869),l=r(39516),d=r(10107),p=(r(44208),r(87811),r(40608)),u=r(39829),h=r(57251),c=r(21325),y=r(85342),m=r(69860),f=r(45654),g=r(71402),_=r(42538),b=r(61956),w=r(5443);let I=class extends n.A{constructor(e){super(e),this._processingCacheUpdatesLookup=new Map,this.knowledgeGraph=null,this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this.nodeConnectionsLookup=new Map,this.relationshipConnectionsLookup=new Map,this.memberIdTypeLookup=new Map;const t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach((r=>{r.name&&(t.set(r.name,"entity"),this._processingCacheUpdatesLookup.set(r.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(r.name),r.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(r.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((r=>{r.name&&(t.set(r.name,"relationship"),this._processingCacheUpdatesLookup.set(r.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(r.name),r.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(r.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((r,s)=>{if("entity"===t.get(s))this.entityTypeNames.add(s);else{if("relationship"!==t.get(s))return o.A.getLogger(this).warn(`A named type, ${s}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(s);this.relationshipTypeNames.add(s)}const n=new Map;r.members?.forEach((e=>{(0,a.tE)(this.memberIdTypeLookup,e.id,(()=>new Set)).add(s);const t=this.getById(e.id);t&&n.set(e.id,t)})),this.sublayerCaches.set(s,n)}))}addToLayer(e){e.forEach((({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new i.A("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){const r=this.inclusionModeDefinition.namedTypeDefinitions.get(e);r.members||(r.members=new Map),r.members.set(t,{id:t}),(0,a.tE)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}else{const r=new Map;r.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:r}),(0,a.tE)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}))}getById(e){return m.A.getInstance().readFromStoreById(e)}async getData(e,t,r){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let s;if(s=e||new b.A({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,r=this._processingCacheUpdatesLookup.get(t.objectType.name??""),n=s.outFields;n&&1===n.length&&n[0]===y.dr&&"1=1"===s.where||await Promise.all(r??[]);const i=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],o=[];return i.forEach((r=>{if(this.relationshipTypeNames.has(t.objectType.name)){r.geometry=e.relationshipLinkChartDiagramLookup.get(r.attributes[t.objectIdField]);const s=this.memberIdTypeLookup.get(r.attributes[y.Cz]),n=this.memberIdTypeLookup.get(r.attributes[y.KQ]),i=this._isEndEntitySpatial(s,r,y.Cz),o=this._isEndEntitySpatial(n,r,y.KQ);r.attributes[y.BL]=Number(i&&o)}else{r.geometry=e.entityLinkChartDiagramLookup.get(r.attributes[t.objectIdField]);const s=this.geographicLookup.get(t.objectType.name);s&&r.attributes[s.name]?r.attributes[y.BL]=1:r.attributes[y.BL]=0}r.attributes[y.T1]=r.geometry,o.push(r)})),o}return this.retrieveDataFromService(s,t,r)}async getConnectedRecordIds(e,t){const r=[];let s="";const n=[],i=new Map;if(e.forEach((e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(t))return;i.has(t)?i.get(t)?.push(e):i.set(t,[e])}})),t&&0!==t?.length){for(const e of t)s=s+e+"|";s=s.slice(0,-1)}const a={};let l="",d=-1;for(const[e,r]of i){d++,0!==d&&(l+=" UNION ");const n=`${e}_ids`;a[n]=r,l+=t&&0!==t?.length?`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r:${s}]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`:`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`}if(!l)return r;const p=new Promise((e=>{(async()=>{const e=(await(0,g.executeQueryStreaming)(this.knowledgeGraph,new _.A({openCypherQuery:l,bindParameters:a}))).resultRowsStream.getReader();try{for(;;){const{done:t,value:s}=await e.read();if(t)break;for(let e=0;e<s.length;e++){const t=s[e];r.push({id:t[0],typeName:t[1]}),r.push({id:t[2],typeName:t[3]})}}}catch(e){if("AbortError"!==e.name)throw e;o.A.getLogger(this).info("Request aborted as expected")}})().then((()=>{e()}))}));return n.push(p),this.refreshCacheContent(),await Promise.all(n),r}async getRelationshipsBetweenNodes(e,t){const r=[],s=(await(0,g.executeQueryStreaming)(this.knowledgeGraph,new _.A({openCypherQuery:"MATCH (n)-[r]->(m) WHERE id(n) IN $nodeIds AND id(m) in $nodeIds AND NOT id(r) IN $relationshipExclusionIds return id(r), type(r)",bindParameters:{nodeIds:e,relationshipExclusionIds:t}}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:t}=await s.read();if(e)break;for(let e=0;e<t.length;e++){const s=t[e];r.push({id:s[0],typeName:s[1]})}}}catch(e){if("AbortError"!==e.name)throw e;o.A.getLogger(this).info("Request aborted as expected")}return r}async getRelationshipsFromNodes(e,t,r){const s=[],n=(await(0,g.executeQueryStreaming)(this.knowledgeGraph,new _.A({openCypherQuery:"MATCH (n)-[r]-(m) WHERE id(n) IN $targetEntityIds AND id(m) in $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds return id(r), type(r)",bindParameters:{targetEntityIds:e,possibleConnectionEntityIds:t,relationshipExclusionIds:r}}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:t}=await n.read();if(e)break;for(let e=0;e<t.length;e++){const r=t[e];s.push({id:r[0],typeName:r[1]})}}}catch(e){if("AbortError"!==e.name)throw e;o.A.getLogger(this).info("Request aborted as expected")}return s}async refreshCacheContent(e,t,r,s=!0){const n=m.A.getInstance(),o=[],l=new Map,d=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&d.set(e.name,e)})),this.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&d.set(e.name,e)})),e||this.inclusionModeDefinition?e?e.forEach((e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e))l.has(t)?l.get(t)?.push(e):l.set(t,[e])})):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e.useAllData?l.set(t,null):e.members&&e.members.forEach((e=>{l.has(t)&&null!==l.get(t)?l.get(t)?.push(e.id):l.set(t,[e.id])}))})):(this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&l.set(e.name,null)})),this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&l.set(e.name,null)})));for(const[e,p]of l){const l=new Promise((o=>{(async()=>{const o=new Set,l=[];let u,h="",c=!1;if(t||d.get(e)?.properties?.forEach((e=>{e.name&&o.add(e.name)})),r&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&o.add(t)}if(this.entityTypeNames.has(e))h=`MATCH (n:${e}) ${p?"WHERE id(n) IN $ids ":""}return ID(n)`,o.forEach((e=>{h+=`, n.${e}`,l.push(e)}));else{if(!this.relationshipTypeNames.has(e))throw new i.A("knowledge-graph:layer-data-manager",`The graph type of ${e} could not be determined. Was this type set in the KG data model and inclusion definition?`);c=!0,h=`MATCH ()-[n:${e}]->() ${p?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,o.forEach((e=>{h+=`, n.${e}`,l.push(e)}))}u=new _.A(p?{openCypherQuery:h,bindParameters:{ids:p}}:{openCypherQuery:h});const m=(await(0,g.executeQueryStreaming)(this.knowledgeGraph,u)).resultRowsStream.getReader();for(;;){const{done:t,value:r}=await m.read();if(t)break;const i=[];for(let e=0;e<r.length;e++){const t=r[e];let s=0,n=0;const o={properties:{}};for(o.id=t[s],s++,n++,c&&(o.originId=t[s],s++,n++,o.destinationId=t[s],s++,n++,(0,a.tE)(this.nodeConnectionsLookup,o.originId,(()=>new Set)).add(o.id),(0,a.tE)(this.nodeConnectionsLookup,o.destinationId,(()=>new Set)).add(o.id),(0,a.tE)(this.relationshipConnectionsLookup,o.id,(()=>[o.originId,o.destinationId])));s<t.length;s++)o.properties[l[s-n]]=t[s];i.push(o)}const o=n.writeToStore(i,y.dr,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),s&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),s&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);const d=this.sublayerCaches.get(e);o.forEach((t=>{d?.set(t.attributes[y.dr],t),s&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[y.dr])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[y.dr],{id:t.attributes[y.dr]}),(0,a.tE)(this.memberIdTypeLookup,t.attributes[y.dr],(()=>new Set)).add(e))}))}})().then((()=>{o(null)}))}));o.push(l),this._processingCacheUpdatesLookup.get(e)?.push(l)}await Promise.all(o)}removeFromLayer(e){const t=new Set,r=new Set(e.map((e=>e.id)));for(const r of e)t.add(r.typeName),1===this.memberIdTypeLookup.get(r.id)?.size?this.memberIdTypeLookup.delete(r.id):this.memberIdTypeLookup.get(r.id)?.delete(r.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{t===r.typeName&&e.members?.has(r.id)&&e.members.delete(r.id)}));t.forEach((e=>{this.sublayerCaches.get(e)?.forEach(((t,s)=>{r.has(s)&&this.sublayerCaches.get(e)?.delete(s)}))}))}async retrieveDataFromService(e,t,r){const s=m.A.getInstance(),n=new Set,o=[];let a,d="",p=[];const b="relationship"===t.graphType,I=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,v=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let T=!I&&v?Array.from(v).sort():null;if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(T=e.objectIds);else if(null!=e.objectIds&&T&&T.length>0){const t=e.objectIds;e.objectIds=T.filter((e=>t.includes(e)))}else if(null!=e.objectIds)T=e.objectIds;else{if(this.inclusionModeDefinition?.namedTypeDefinitions.has(t.objectType.name)&&(!this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members||this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members?.size<1))return e.objectIds=[],[];e.objectIds=T}if(null!=e.outFields){const r=e.outFields;r.includes("*")?t.fields.forEach((e=>{n.add(e.name)})):r.forEach((e=>{e!==y.dr&&e!==t.geometryFieldName&&n.add(e)}))}if(null!=e.geometry){const r=e.geometry;let s;const p=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,y=p?.spatialReference,m=p?.serviceCapabilities?.geometryCapabilities;let g=m?.geometryMaxBoundingRectangleSizeX,I=m?.geometryMaxBoundingRectangleSizeY;if("point"===r.type){let e=r;e.spatialReference?.isWGS84||(await(0,h.initializeProjection)(e.spatialReference,c.KK),e=(0,h.project)(e,c.KK)),s=new w.A({spatialReference:c.KK,xmin:e.x-1e-4,ymin:e.y-1e-4,xmax:e.x+1e-4,ymax:e.y+1e-4})}else r?.extent?.spatialReference&&!r.spatialReference?.isWGS84?(await(0,h.initializeProjection)(r.extent.spatialReference,c.KK),s=(0,h.project)(r.extent,c.KK)):s=r.extent;if(g&&I&&y){if(4326!==y.wkid){const e=new w.A({spatialReference:y,xmax:g,ymax:I}),t=(0,h.project)(e,c.KK);g=t.xmax,I=t.ymax}if(s.xmax-s.xmin>g)throw new i.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${g}° latitude, limit exceeded`);if(s.ymax-s.ymin>I)throw new i.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${I}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const r=await(0,l.G)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach((e=>{r.fieldNames.includes(e.name)&&n.add(e.name)}))}d=b?`Match ()-[n:${t.objectType.name}]->() WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n), id(startNode(r)), id(endNode(r))`:`Match (n:${t.objectType.name}) WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n)`,t.geometryFieldName&&n.add(t.geometryFieldName),n.forEach((e=>{d+=`, n.${e}`,o.push(e)})),a=new _.A({openCypherQuery:d,bindParameters:{param_filter_geom:new u.A({rings:(0,f.DX)(s)})}})}else{let r="";if(null!=e.where&&"1=1"!==e.where){const s=await(0,l.G)(e.where,t.fieldsIndex);t.fields.forEach((e=>{s.fieldNames.includes(e.name)&&n.add(e.name)}));const i=new Set(["column-reference","string","number","binary-expression"]),o=new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]);let a=!1;const d=e=>{if("column-reference"===e.type)return`n.${e.column}`;if("string"===e.type)return`'${e.value}'`;if("number"===e.type)return`${e.value}`;if("binary-expression"===e.type&&i.has(e.left.type)&&i.has(e.right.type)&&o.has(e.operator))return`${d(e.left)} ${e.operator} ${d(e.right)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let t="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)t+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return a=!0,"";t+=`lower(n.${e.left.column})`}if(t+=" CONTAINS (","string"!==e.right.type)return a=!0,"";{let r=e.right.value;"%"===r.charAt(0)&&(r=r.slice(1)),"%"===r.charAt(r.length-1)&&(r=r.slice(0,-1)),t+=`'${r.toLowerCase()}')`}return t}return a=!0,""};r=d(s.parseTree),a&&(r="")}let s="";s=b?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let i=!1;T&&(i=!0,s+=" WHERE ID(n) IN $ids"),r&&(s+=i?" AND":" WHERE",s+=` ${r}`),s+=" return ID(n)",b&&(s+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&n.add(t.geometryFieldName),n.forEach((e=>{s+=`, n.${e}`,o.push(e)})),a=new _.A(T?{openCypherQuery:s,bindParameters:{ids:T}}:{openCypherQuery:s})}const M=(await(0,g.executeQueryStreaming)(t.parentCompositeLayer.dataManager.knowledgeGraph,a,r)).resultRowsStream.getReader();for(;;){const{done:e,value:r}=await M.read();if(e)break;const n=[];for(let e=0;e<r.length;e++){const t=r[e];let s=0,i=0;const a={properties:{}};for(a.id=t[s],s++,i++,b&&(a.originId=t[s],s++,i++,a.destinationId=t[s],s++,i++);s<t.length;s++)a.properties[o[s-i]]=t[s];n.push(a)}p=p.concat(s.writeToStore(n,y.dr,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return p}_isEndEntitySpatial(e,t,r){for(const s of e??[])if(this.entityTypeNames.has(s)){const e=this.geographicLookup.get(s),n=e&&this.sublayerCaches.get(s)?.get(t.attributes[r]);if(e&&n?.attributes[e.name])return!0}return!1}};(0,s._)([(0,d.MZ)()],I.prototype,"knowledgeGraph",void 0),(0,s._)([(0,d.MZ)()],I.prototype,"inclusionModeDefinition",void 0),(0,s._)([(0,d.MZ)()],I.prototype,"entityTypeNames",void 0),(0,s._)([(0,d.MZ)()],I.prototype,"relationshipTypeNames",void 0),(0,s._)([(0,d.MZ)()],I.prototype,"geographicLookup",void 0),(0,s._)([(0,d.MZ)()],I.prototype,"sublayerCaches",void 0),(0,s._)([(0,d.MZ)()],I.prototype,"nodeConnectionsLookup",void 0),(0,s._)([(0,d.MZ)()],I.prototype,"relationshipConnectionsLookup",void 0),(0,s._)([(0,d.MZ)()],I.prototype,"memberIdTypeLookup",void 0),I=(0,s._)([(0,p.$)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],I)},70643:(e,t,r)=>{r.d(t,{A:()=>V});var s=r(90237),n=(r(59456),r(13874)),i=(r(86162),r(94409),r(65345),r(42980),r(20917),r(92438),r(96576),r(93618),r(65494)),o=r(15036),a=r(4718),l=r(92071),d=(r(29953),r(10107)),p=(r(44208),r(53966),r(40608)),u=r(43937),h=r(35666),c=r(57251),y=r(16930),m=r(21325),f=r(4146),g=r(83221),_=r(88856),b=r(64714);r(87811);const w=(0,r(17036).p)(),I=e=>{let t=class extends e{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,s._)([(0,d.MZ)(w.fields)],t.prototype,"fields",void 0),(0,s._)([(0,d.MZ)(w.fieldsIndex)],t.prototype,"fieldsIndex",void 0),t=(0,s._)([(0,p.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],t),t};var v=r(85342),T=r(63074),M=r(87718),E=r(76294),A=r(32756),x=r(54310),k=r(25036),S=r(82935),N=r(10873),L=r(13213),C=r(20437),R=r(30524),D=r(81457),B=r(39383),O=r(96184),j=r(22671),P=r(61956),F=r(30291),q=r(61322),G=r(5443),Z=r(39829),$=r(82799),Q=r(86738),Y=r(50498);function H(e){if(!e.json)return e;e.json.write=J(e.json.write);const t=e.json.origins;if(!t)return e;let r;for(r in t){const e=t[r];e&&(e.write=J(e.write))}return e}function J(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=function(e){const{target:t,writer:r,overridePolicy:s,...n}=e;return function(e,t){const r=X.call(this,e,t);return r.enabled?{...n,...r}:r}}(e)),e):!0===e?U():e}function U(){return{overridePolicy:X}}function X(e,t){const r=!!this.geometryType;let s={enabled:r};return r&&(s={...s,...z.call(this,e,t)}),s}function z(e,t){return{ignoreOrigin:this.originIdOf(t)>h.Gr.DEFAULTS}}let W=class extends(I((0,E.J)((0,M.F)((0,T.dM)((0,A.f)((0,S.e)((0,k.j)((0,x.J)((0,l.P)(f.A)))))))))){constructor(e){super(e),this.blendMode="normal",this.capabilities=(0,b.f)(!1,!1),this.charts=null,this.definitionExpression=null,this.displayField="",this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.labelingInfo=null,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=v.dr,this.objectType=null,this.opacity=1,this.orderBy=null,this.parent=null,this.parentCompositeLayer=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then((()=>{const e=new MessageChannel;return new q.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const r=P.A.fromJSON(e);return this.queryFeaturesJSON(r,t)}}}),[e.port2]}))},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){const e=[];return this.objectType?.properties?.forEach((t=>{const r="esriFieldTypeOID"===t.fieldType?"esriFieldTypeInteger":t.fieldType;e.push(C.A.fromJSON({name:t.name,type:r,alias:t.alias,defaultValue:t.defaultValue,editable:t.editable,nullable:t.nullable}))})),e.push(C.A.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),C.A.fromJSON({name:v.M1,type:"esriFieldTypeInteger",alias:v.M1,editable:!1}),C.A.fromJSON({name:v.BL,type:"esriFieldTypeInteger",alias:v.BL,editable:!1})),e}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.geometryType;return t&&"esriGeometryNull"!==t?Y.g.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return v.T1;const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name);return e?.name??null}get graphTypeName(){return this.objectType?.name}get hasM(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasZ??!1}set renderer(e){(0,R.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){return this._isOverridden("renderer")?this._get("renderer"):"link-chart"===this.parentCompositeLayer?.type?"relationship"===this.graphType?(0,i.r)((0,b.F0)(Y.g.toJSON("polyline")).renderer):(0,i.r)((0,b.F0)(Y.g.toJSON("point")).renderer):(0,i.r)((0,b.F0)(Y.g.toJSON(this.geometryType)).renderer)}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??y.A.WGS84}set timeInfo(e){this._set("timeInfo",e)}get title(){return this._isOverridden("title")?this._get("title"):this.graphTypeName}set title(e){this._set("title",e)}writeTitle(e,t){t.title=e??"Layer"}createPopupTemplate(e){return(0,F.tn)(this,e)}createQuery(){return new P.A({where:"1=1",outFields:["*"]})}getField(e){for(let t=0;t<this.fields.length;t++)if(this.fields[t].name===e)return this.fields[t];return null}getFieldDomain(e,t){return null}async queryFeatures(e,t){const{resolvedQuery:r,queryEngine:s}=await this._setupQueryObjects(e),n=j.A.fromJSON(await s.executeQuery(r.toJSON(),t?.signal));return n.features.forEach((e=>{e.sourceLayer=this})),n}async queryFeaturesJSON(e,t){const{resolvedQuery:r,queryEngine:s}=await this._setupQueryObjects(e);return await s.executeQuery(r.toJSON(),t?.signal)}async queryFeatureCount(e,t){const{resolvedQuery:r,queryEngine:s}=await this._setupQueryObjects(e);return s.executeQueryForCount(r.toJSON(),t?.signal)}async queryExtent(e={},t){const r={...e,returnGeometry:!0},{resolvedQuery:s,queryEngine:n}=await this._setupQueryObjects(r),i=await n.executeQueryForExtent(s.toJSON(),t?.signal);let o;return o=null!=i.extent?.xmin&&null!=i.extent?.xmax&&null!=i.extent?.ymin&&null!=i.extent?.ymax?new G.A(i.extent):new G.A,{count:i.count,extent:o}}async queryObjectIds(e,t){const r=P.A.from(e);let s;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)s=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);s=this.loadQueryEngine(e)}return s.executeQueryForIds(r.toJSON(),t?.signal)}loadQueryEngine(e){const t=new g.A({geometryType:Y.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),r=new _.d({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:Y.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:this.spatialReference.toJSON(),timeInfo:this.timeInfo?.toJSON(),featureStore:t});return r.featureStore.addMany(e),r}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new P.A({where:"1=1",outFields:[v.dr]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}load(e){return this.addResolvingPromise(this.parent.load(e).then((()=>{(0,R.sv)(this.timeInfo,this.fieldsIndex)}))),Promise.resolve(this)}async _setupQueryObjects(e,t){const r=P.A.from(e),s=r.geometry;let n;if(s&&!s.spatialReference?.isWGS84&&(await(0,c.initializeProjection)(s.spatialReference,m.KK),r.geometry=(0,c.project)(s instanceof Z.A||s instanceof $.A||s instanceof Q.A?s:s.extent,m.KK)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)n=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);n=this.loadQueryEngine(e)}return{resolvedQuery:r,queryEngine:n}}};(0,s._)([(0,d.MZ)(H((0,a.o8)(T.sU)))],W.prototype,"blendMode",void 0),(0,s._)([(0,d.MZ)()],W.prototype,"capabilities",void 0),(0,s._)([(0,d.MZ)({json:{origins:{"web-scene":{write:!1}},write:U()}})],W.prototype,"charts",void 0),(0,s._)([(0,d.MZ)({readOnly:!0})],W.prototype,"defaultPopupTemplate",null),(0,s._)([(0,d.MZ)({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],W.prototype,"definitionExpression",void 0),(0,s._)([(0,d.MZ)()],W.prototype,"displayField",void 0),(0,s._)([(0,d.MZ)(H((0,a.o8)(T.LF)))],W.prototype,"effect",void 0),(0,s._)([(0,d.MZ)()],W.prototype,"elevationInfo",void 0),(0,s._)([(0,d.MZ)(H((0,a.o8)(M.Y)))],W.prototype,"featureEffect",void 0),(0,s._)([(0,d.MZ)(H((0,a.o8)(L.d)))],W.prototype,"featureReduction",null),(0,s._)([(0,d.MZ)()],W.prototype,"fields",null),(0,s._)([(0,d.MZ)()],W.prototype,"geometryType",null),(0,s._)([(0,d.MZ)()],W.prototype,"geometryFieldName",null),(0,s._)([(0,d.MZ)({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],W.prototype,"graphType",void 0),(0,s._)([(0,d.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],W.prototype,"graphTypeName",null),(0,s._)([(0,d.MZ)()],W.prototype,"hasM",null),(0,s._)([(0,d.MZ)()],W.prototype,"hasZ",null),(0,s._)([(0,d.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],W.prototype,"id",void 0),(0,s._)([(0,d.MZ)(H((0,a.o8)(N.kF)))],W.prototype,"labelsVisible",void 0),(0,s._)([(0,d.MZ)({type:[D.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:B.w,write:U()}})],W.prototype,"labelingInfo",void 0),(0,s._)([(0,d.MZ)({readOnly:!0,json:{read:!1,write:{writer(e,t){switch(this.parentCompositeLayer.type){case"link-chart":t.layerType="LinkChartSubLayer";break;case"knowledge-graph":t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"}},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],W.prototype,"layerType",void 0),(0,s._)([(0,d.MZ)(H((0,a.o8)(N.fV)))],W.prototype,"legendEnabled",void 0),(0,s._)([(0,d.MZ)(H((0,a.o8)(N.hG)))],W.prototype,"maxScale",void 0),(0,s._)([(0,d.MZ)(H((0,a.o8)(N.hn)))],W.prototype,"minScale",void 0),(0,s._)([(0,d.MZ)()],W.prototype,"objectIdField",void 0),(0,s._)([(0,d.MZ)()],W.prototype,"objectType",void 0),(0,s._)([(0,d.MZ)(H((0,a.o8)(N.ke)))],W.prototype,"opacity",void 0),(0,s._)([(0,d.MZ)(H((0,a.o8)(A.n)))],W.prototype,"orderBy",void 0),(0,s._)([(0,d.MZ)({clonable:!1})],W.prototype,"parent",void 0),(0,s._)([(0,d.MZ)()],W.prototype,"parentCompositeLayer",void 0),(0,s._)([(0,d.MZ)(H((0,a.o8)(N.M6)))],W.prototype,"popupEnabled",void 0),(0,s._)([(0,d.MZ)({type:n.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],W.prototype,"popupTemplate",void 0),(0,s._)([(0,d.MZ)({type:Number,json:{write:{overridePolicy:z}}})],W.prototype,"refreshInterval",void 0),(0,s._)([(0,d.MZ)({types:o.H,json:{name:"layerDefinition.drawingInfo.renderer",write:U()}})],W.prototype,"renderer",null),(0,s._)([(0,d.MZ)()],W.prototype,"source",void 0),(0,s._)([(0,d.MZ)()],W.prototype,"spatialReference",null),(0,s._)([(0,d.MZ)({type:O.A,json:{name:"layerDefinition.timeInfo",write:!0,origins:{"web-document":{name:"layerDefinition.timeInfo",read:!0,write:!0},"portal-item":{name:"layerDefinition.timeInfo",read:!0,write:!0}}}})],W.prototype,"timeInfo",null),(0,s._)([(0,d.MZ)({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],W.prototype,"title",null),(0,s._)([(0,u.K)("title")],W.prototype,"writeTitle",null),(0,s._)([(0,d.MZ)({json:{read:!1}})],W.prototype,"type",void 0),(0,s._)([(0,d.MZ)(H((0,a.o8)(S.B)))],W.prototype,"useViewTime",void 0),(0,s._)([(0,d.MZ)({type:Boolean,json:{name:"visibility",write:U()}})],W.prototype,"visible",void 0),W=(0,s._)([(0,p.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],W);const V=W},69860:(e,t,r)=>{r.d(t,{A:()=>a}),r(59456);var s=r(90708),n=r(43334),i=r(85342),o=r(65864);class a{constructor(){this._featureLookup=new Map}static getInstance(){return a.instance||(a.instance=new a),a.instance}static resetInstance(){a.instance&&(a.instance=null)}deleteFromStore(e){e.forEach((e=>{this._featureLookup.delete(e)}))}readFromStoreByList(e){const t=[];return e.forEach((e=>{const r=this.readFromStoreById(e);r&&t.push(r)})),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,r){const a=[];return e.forEach((e=>{if(!e?.id)return;e.properties||(e.properties=[]);let l,d=null;if(r&&e.properties[r]&&(d=(0,s.Ux)(e.properties[r])),"originId"in e&&"destinationId"in e&&(e.properties[i.Cz]=e.originId,e.properties[i.KQ]=e.destinationId),e.properties[t]=e.id,e.id&&this._featureLookup.has(e.id)&&this._featureLookup.get(e.id).attributes){const s=this._featureLookup.get(e.id),i=JSON.parse(JSON.stringify(Object.assign(s.attributes,e.properties)));r&&e.properties[r]&&(i[r]=(0,o.rS)(e.properties[r])),l=new n.Om(d?JSON.parse(JSON.stringify(d)):s?.geometry?JSON.parse(JSON.stringify(s.geometry)):null,i,null,e.properties[t])}else l=new n.Om(d?JSON.parse(JSON.stringify(d)):null,e.properties,null,e.properties[t]);this._featureLookup.set(`${e.typeName?`${e.typeName}__${e.id}`:e.id}`,l),a.push(l)})),a}}},85342:(e,t,r)=>{r.d(t,{BL:()=>d,Cz:()=>i,KQ:()=>o,M1:()=>l,T1:()=>a,dr:()=>n,qN:()=>h});var s=r(71402);const n="ESRI__ID",i="ESRI__OriginID",o="ESRI__DestID",a="ESRI__LayoutGeometry",l="ESRI__AggregationCount",d="LC.ESRI__IsSpatial",p={initializeLayersFromClientData:async(e,t)=>{if(t||(t=[...e.layers,...e.tables].map((e=>e.graphTypeName))),0===t?.length)return;const r=new Map;for(const s of t)r.set(s,u(e,s));const n=await(0,s.fetchClientDataAtKeys)(e.dataManager.knowledgeGraph,Array.from(r.values()));for(const t of[...e.layers,...e.tables]){const r=t.objectType.name;if(null===r)continue;const s=n.get(u(e,r));if(s){const e=JSON.parse(s);null===e||"object"!=typeof e||e.hasOwnProperty("showLabels")||(e.showLabels=!1),t.read(e,{origin:"service"})}}}},u=(e,t)=>"knowledge-graph"===e.type?`${t}/Map`:`${t}/LinkChart/LinkChartSubLayer`;async function h(e,t){return p.initializeLayersFromClientData(e,t)}},45654:(e,t,r)=>{r.d(t,{DX:()=>_,_s:()=>w,aq:()=>b,fe:()=>I}),r(59456),r(52106);var s,n,i,o,a=r(78888),l=(r(61147),r(49186)),d=r(91869),p=(r(94194),r(90708),r(85342),r(69860),r(8460),r(71402)),u=r(42538);r(16930),(n=s||(s={})).ELEMENTUID="ELEMENTUID",n.TYPENAME="TYPENAME",s.ELEMENTUID,s.TYPENAME,function(e){e[e.ELEMENTUID=0]="ELEMENTUID",e[e.TYPENAME=1]="TYPENAME"}(i||(i={})),function(e){e[e.ELEMENTUID=0]="ELEMENTUID",e[e.TYPENAME=1]="TYPENAME",e[e.FROMUID=2]="FROMUID",e[e.TOUID=3]="TOUID"}(o||(o={}));var h,c,y,m,f,g=r(45724);function _(e){if(!e.spatialReference.isWGS84)throw new l.A("knowledge-graph:layer-support-utils","The extentToInBoundsRings function only supports WGS84 spatial references.");return e.clone().normalize().map((e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]))}async function b(e,t){const r=[],s=new Map,n=[];if(t.dataModel?.relationshipTypes)for(const e of t.dataModel.relationshipTypes)e.name&&s.set(e.name,[]);for(const t of e)s.has(t.typeName)&&s.get(t.typeName)?.push(t.id);for(const[e,i]of s){if(i.length<1)continue;const s=new u.A({openCypherQuery:`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $ids RETURN id(n), labels(n)[0], id(m), labels(m)[0]`,bindParameters:{ids:i}});n.push((0,p.executeQueryStreaming)(t,s).then((async e=>{const t=e.resultRowsStream.getReader();for(;;){const{done:e,value:s}=await t.read();if(e)break;for(const e of s)r.push({id:e[0],typeName:e[1]}),r.push({id:e[2],typeName:e[3]})}})))}return await Promise.all(n),r}async function w(e,t){t??=!1;const r={generateAllSublayers:t,namedTypeDefinitions:new Map};return await async function(e){const t=await(0,a.A)(e,{responseType:"array-buffer"}),r=await t.data;return async function(e){const t=new((await(0,g.I)()).MapOfObjectIdentifierSetsDecoder),r=t.decode(new Uint8Array(e)),s=new Map;if(0!==r.error_code)throw new l.A("knowledge-graph:layer-support-utils",r.error_message);const n=t.get_map_of_identifier_sets(),i=n.keys,o=i.size();for(let e=0;e<o;e++){const t=i.get(e),r=n.query_identifier_set(t),o=[];if(r.id_array_type.value===m.GLOBALID_ARRAY){const e=r.get_globalid_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_globalid_at(r))}else if(r.id_array_type.value===m.IDENTIFIER_ARRAY){const e=r.get_identifier_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_identifier_at(r).toString())}else if(r.id_array_type.value===m.STRING_ARRAY){const e=r.get_string_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_string_at(r))}else{if(r.id_array_type.value!==m.OID_ARRAY)throw new l.A("knowledge-graph:layer-support-utils","Tried to encode an unexpected ID Array type.");{const e=r.get_oid_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_objectid_at(r).toString())}}s.set(t,o)}return t.delete(),s}(new Uint8Array(r))}(e).then((e=>{!function(e,t){for(const[r,s]of e){const e=(0,d.tE)(t.namedTypeDefinitions,r,(()=>({useAllData:!1,members:new Map})));for(const t of s)e.members.has(t)||e.members.set(t,{id:t})}}(e,r)})),r}async function I(e){const t=await(0,g.I)(),r=new t.MapOfObjectIdentifierSets;!function(e,t,r){for(const[s,n]of r.namedTypeDefinitions){if(!n.members||n.useAllData)continue;const r=n.members.keys();let i=!1,o=!0;const a=new t.ObjectIdArray,l=new t.StringArray,d=new t.GlobalIdArray,p=new t.IdentifierArray,u=new t.ObjectIdentifierSet;for(const e of r)o&&(i=!isNaN(Number(e)),o=!1),i?a.add_objectid(Number(e)):(l.add_string(e),d.add_globalid(e)),p.add_identifier(e);u.set_oid_array(a),u.set_string_array(l),u.set_globalid_array(d),u.set_identifier_array(p),a.delete(),l.delete(),d.delete(),p.delete(),e.put_identifier_set(s,u),u.delete()}}(r,t,e);const s=new t.MapOfObjectIdentifierSetsEncoder;try{s.set_map_of_identifier_sets(r),s.encode();const e=s.get_encoding_result();if(0!==e.error.error_code)throw new l.A("knowledge-graph:layer-support-utils",e.error.error_message);const t=structuredClone(e.get_byte_buffer());return s.delete(),t}finally{r.delete()}}r(35448),(f=h||(h={}))[f.featureResult=0]="featureResult",f[f.countResult=1]="countResult",f[f.idsResult=2]="idsResult",function(e){e[e.upperLeft=0]="upperLeft",e[e.lowerLeft=1]="lowerLeft"}(c||(c={})),function(e){e[e.sqlTypeBigInt=0]="sqlTypeBigInt",e[e.sqlTypeBinary=1]="sqlTypeBinary",e[e.sqlTypeBit=2]="sqlTypeBit",e[e.sqlTypeChar=3]="sqlTypeChar",e[e.sqlTypeDate=4]="sqlTypeDate",e[e.sqlTypeDecimal=5]="sqlTypeDecimal",e[e.sqlTypeDouble=6]="sqlTypeDouble",e[e.sqlTypeFloat=7]="sqlTypeFloat",e[e.sqlTypeGeometry=8]="sqlTypeGeometry",e[e.sqlTypeGUID=9]="sqlTypeGUID",e[e.sqlTypeInteger=10]="sqlTypeInteger",e[e.sqlTypeLongNVarchar=11]="sqlTypeLongNVarchar",e[e.sqlTypeLongVarbinary=12]="sqlTypeLongVarbinary",e[e.sqlTypeLongVarchar=13]="sqlTypeLongVarchar",e[e.sqlTypeNChar=14]="sqlTypeNChar",e[e.sqlTypeNVarChar=15]="sqlTypeNVarChar",e[e.sqlTypeOther=16]="sqlTypeOther",e[e.sqlTypeReal=17]="sqlTypeReal",e[e.sqlTypeSmallInt=18]="sqlTypeSmallInt",e[e.sqlTypeSqlXml=19]="sqlTypeSqlXml",e[e.sqlTypeTime=20]="sqlTypeTime",e[e.sqlTypeTimestamp=21]="sqlTypeTimestamp",e[e.sqlTypeTimestamp2=22]="sqlTypeTimestamp2",e[e.sqlTypeTinyInt=23]="sqlTypeTinyInt",e[e.sqlTypeVarbinary=24]="sqlTypeVarbinary",e[e.sqlTypeVarchar=25]="sqlTypeVarchar"}(y||(y={})),function(e){e[e.OID_ARRAY=0]="OID_ARRAY",e[e.GLOBALID_ARRAY=1]="GLOBALID_ARRAY",e[e.STRING_ARRAY=2]="STRING_ARRAY",e[e.IDENTIFIER_ARRAY=3]="IDENTIFIER_ARRAY"}(m||(m={})),r(40863),r(82799),r(94985),r(39829),r(68249),r(86738)},32756:(e,t,r)=>{r.d(t,{f:()=>d,n:()=>l});var s=r(90237),n=r(93637),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);const l={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:function(e,t,r){if(!e)return null;const s=e.find((e=>!!e.field));if(!s)return null;const n=new a.A;return n.read(s,r),[n]}},write:{writer:function(e,t,r,s){const i=e.find((e=>!!e.field));i&&(0,n.sM)(r,[i.toJSON()],t)}}}},d=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,i.MZ)(l)],t.prototype,"orderBy",void 0),t=(0,s._)([(0,o.$)("esri.layers.mixins.OrderedLayer")],t),t}},91880:(e,t,r)=>{r.d(t,{A:()=>u});var s,n=r(90237),i=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const d=new i.J({asc:"ascending",desc:"descending"});let p=s=class extends o.oY{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,n._)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,n._)([(0,a.MZ)({type:d.apiValues,json:{type:d.jsonValues,read:d.read,write:d.write}})],p.prototype,"order",void 0),p=s=(0,n._)([(0,l.$)("esri.layers.support.OrderByInfo")],p);const u=p},4071:(e,t,r)=>{r.d(t,{$:()=>s,P:()=>n});const s={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportedStatistics:void 0},n={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:s,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},8460:(e,t,r)=>{r.d(t,{$C:()=>m,Hh:()=>o,J:()=>l,Tu:()=>c,Wg:()=>y,Xq:()=>g,i6:()=>_,pM:()=>h,tx:()=>a,vJ:()=>f});var s=r(2741);let n,i=null;function o(){return n||(n=r.e(3666).then(r.bind(r,3666)).then((e=>e.l)).then((({default:e})=>e({locateFile:e=>(0,s.s)(`esri/libs/linkchartlayout/${e}`)}))).then((e=>{!function(e){i=e}(e)})),n)}var a,l,d,p,u,h,c,y,m,f,g,_,b,w;function I(e){const t=Object.keys(d).filter((e=>isNaN(parseInt(e,10)))).indexOf(e.timeDirection),r=Object.keys(p).filter((e=>isNaN(parseInt(e,10)))).indexOf(e.eventsTicksVisualization);return{timeDirection:{value:t>-1?t:d.right},timeBannerUTCOffsetInMinutes:e.timeBannerUTCOffsetInMinutes,eventsTicksVisualization:{value:r>-1?r:p.startAndEnd},showDurationLineForNonZeroDurationEntityEvents:e.showDurationLineForNonZeroDurationEntityEvents,durationLineWidth:e.durationLineWidth,entityPositionAtDurationRatio:e.entityPositionAtDurationRatio,showNonZeroDurationIntervalBounds:e.showNonZeroDurationIntervalBounds,separateTimeOverlaps:e.separateTimeOverlaps,separateTimelineOverlaps:e.separateTimelineOverlaps,moveFirstBends:e.moveFirstBends,secondBendRatio:e.secondBendRatio,lineSeparationMultiplier:e.lineSeparationMultiplier,spaceSeparatedLinesEvenly:e.spaceSeparatedLinesEvenly,useBezierCurves:e.useBezierCurves,separatedLineShapeRatio:e.separatedLineShapeRatio}}function v(e,t,r,s,n,o){const a=r.length,l=n.length,d=Float64Array.BYTES_PER_ELEMENT,p=Uint32Array.BYTES_PER_ELEMENT,u=Uint8Array.BYTES_PER_ELEMENT,h=16+a*(u+2*d)+l*(2*p),c=i._malloc(h);try{const u=c+16-c%16,h=u+a*d,y=h+a*d,m=y+l*p,f=m+l*p,g=()=>[i.HEAPF64.subarray(u>>3,(u>>3)+a),i.HEAPF64.subarray(h>>3,(h>>3)+a),i.HEAPU32.subarray(y>>2,(y>>2)+l),i.HEAPU32.subarray(m>>2,(m>>2)+l),i.HEAPU8.subarray(f,f+a)],[_,b,w,I,v]=g();_.set(r),b.set(s),w.set(n),I.set(o),v.set(t);let T=e(a,f,u,h,l,y,m),M=null,E=null;if(T){const e=i.getLayoutLinksTypes(),t=i.getLayoutLinksVerticesEndIndices(),r=i.getLayoutLinksVertices(),s=i.countLayoutLinksVertices();!l||e&&t?s&&!r?T=!1:(M={types:new Uint8Array(i.HEAPU8.subarray(e,e+l)),vertexEndIndex:new Uint32Array(i.HEAPU32.subarray(t>>2,(t>>2)+l)),vertices:new Float64Array(i.HEAPF64.subarray(r>>3,(r>>3)+2*s))},E=i.getAuxiliaryGraphicElements()):T=!1}const[A,x,k,S,N]=g();return r.set(A),s.set(x),n.set(k),o.set(S),t.set(N),{success:T,links:M,graphics:E}}finally{i._free(c),i.cleanupLayout()}}(u=a||(a={}))[u.None=0]="None",u[u.IsMovable=1]="IsMovable",u[u.IsGeographic=2]="IsGeographic",u[u.IsRoot=4]="IsRoot",u[u.IsOld=8]="IsOld",function(e){e[e.Regular=0]="Regular",e[e.Curved=1]="Curved",e[e.Recursive=2]="Recursive"}(l||(l={})),function(e){e[e.right=0]="right",e[e.left=1]="left",e[e.top=2]="top",e[e.bottom=3]="bottom"}(d||(d={})),function(e){e[e.none=0]="none",e[e.startOnly=1]="startOnly",e[e.startAndEnd=2]="startAndEnd"}(p||(p={})),function(e){e.getMinIdealEdgeLength=function(){return i.getMinIdealEdgeLength()},e.apply=function(e,t,r,s,n,o=2,a=1,l=-1){return v(((e,t,r,s,n,d,p)=>i.applyForceDirectedLayout(e,t,r,s,n,d,p,o,a,l)),e,t,r,s,n)}}(h||(h={})),function(e){e.apply=function(e,t,r,s,n,o=2,a=1,l=-1){return v(((e,t,r,s,n,d,p)=>i.applyCommunityLayout(e,t,r,s,n,d,p,o,a,l)),e,t,r,s,n)}}(c||(c={})),function(e){e.apply=function(e,t,r,s,n){return v(i.applySimpleLayout,e,t,r,s,n)}}(y||(y={})),function(e){e.apply=function(e,t,r,s,n){return v(i.applyHierarchicalLayout,e,t,r,s,n)}}(m||(m={})),function(e){e.apply=function(e,t,r,s,n){return v(i.applyRadialTreeLayout,e,t,r,s,n)}}(f||(f={})),function(e){e.apply=function(e,t,r,s,n){return v(i.applySmartTreeLayout,e,t,r,s,n)}}(g||(g={})),function(e){e.apply=function(e,t,r,s,n,o,a,l,u,h,c){const y={timeDirection:d.right,timeBannerUTCOffsetInMinutes:0,eventsTicksVisualization:p.startAndEnd,showDurationLineForNonZeroDurationEntityEvents:!0,durationLineWidth:5,entityPositionAtDurationRatio:1,showNonZeroDurationIntervalBounds:!1,separateTimeOverlaps:!0,separateTimelineOverlaps:!0,moveFirstBends:!0,secondBendRatio:.3,lineSeparationMultiplier:1,spaceSeparatedLinesEvenly:!1,useBezierCurves:!1,separatedLineShapeRatio:0};return v(((e,t,r,o,a,d,p)=>{if(s.length!==e)return!1;if(n.length!==e)return!1;if(l.length!==a)return!1;if(u.length!==a)return!1;const m=Float64Array.BYTES_PER_ELEMENT,f=16,g=i._malloc(f+e*m),_=i._malloc(f+e*m),b=i._malloc(f+a*m),w=i._malloc(f+a*m),v=g+f-g%f,T=_+f-_%f,M=b+f-b%f,E=w+f-w%f;try{i.HEAPF64.subarray(v>>3,(v>>3)+e).set(s),i.HEAPF64.subarray(T>>3,(T>>3)+e).set(n),i.HEAPF64.subarray(M>>3,(M>>3)+a).set(l),i.HEAPF64.subarray(E>>3,(E>>3)+a).set(u);const m=I(Object.assign(y,c));return i.applyChronologicalLayout(e,t,r,o,v,T,a,d,p,M,E,h,m)}finally{i._free(g),i._free(_),i._free(b),i._free(w)}}),e,t,r,o,a)}}(_||(_={})),function(e){e[e.Undirected=0]="Undirected",e[e.Directed=1]="Directed",e[e.Reversed=2]="Reversed"}(b||(b={})),function(e){e[e.ByCC_Raw=0]="ByCC_Raw",e[e.ByCC_NormalizeGlobally=1]="ByCC_NormalizeGlobally",e[e.ByCC_NormalizeByCC=2]="ByCC_NormalizeByCC"}(w||(w={}))},25927:(e,t,r)=>{r.d(t,{A:()=>d});var s=r(90237),n=(r(59456),r(10107)),i=(r(44208),r(53966),r(87811),r(40608)),o=r(54238),a=r(86738);let l=class extends o.A{constructor(e){super(e),this.layoutGeometry=null}};(0,s._)([(0,n.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,s._)([(0,i.$)("esri.rest.knowledgeGraph.Entity")],l);const d=l},54238:(e,t,r)=>{r.d(t,{A:()=>l});var s=r(90237),n=r(10107),i=(r(44208),r(53966),r(87811),r(40608)),o=r(77901);let a=class extends o.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,s._)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"typeName",void 0),(0,s._)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"id",void 0),a=(0,s._)([(0,i.$)("esri.rest.knowledgeGraph.GraphNamedObject")],a);const l=a},77901:(e,t,r)=>{r.d(t,{A:()=>l});var s=r(90237),n=r(25482),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608));let a=class extends n.oY{constructor(e){super(e),this.properties=null}};(0,s._)([(0,i.MZ)({json:{write:!0}})],a.prototype,"properties",void 0),a=(0,s._)([(0,o.$)("esri.rest.knowledgeGraph.GraphObject")],a);const l=a},42538:(e,t,r)=>{r.d(t,{A:()=>p});var s=r(90237),n=r(10107),i=(r(44208),r(53966),r(87811),r(40608)),o=r(69622);let a=class extends o.A{constructor(e){super(e),this.openCypherQuery=""}};(0,s._)([(0,n.MZ)()],a.prototype,"openCypherQuery",void 0),a=(0,s._)([(0,i.$)("esri.rest.knowledgeGraph.GraphQuery")],a);const l=a;let d=class extends l{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};(0,s._)([(0,n.MZ)()],d.prototype,"bindParameters",void 0),(0,s._)([(0,n.MZ)()],d.prototype,"bindGeometryQuantizationParameters",void 0),(0,s._)([(0,n.MZ)()],d.prototype,"outputQuantizationParameters",void 0),(0,s._)([(0,n.MZ)()],d.prototype,"outputSpatialReference",void 0),(0,s._)([(0,n.MZ)()],d.prototype,"provenanceBehavior",void 0),d=(0,s._)([(0,i.$)("esri.rest.knowledgeGraph.GraphQueryStreaming")],d);const p=d},40662:(e,t,r)=>{r.d(t,{A:()=>a});var s=r(90237),n=(r(53966),r(44208),r(87811),r(49186),r(40608)),i=r(77901);let o=class extends i.A{constructor(e){super(e)}};o=(0,s._)([(0,n.$)("esri.rest.knowledgeGraph.ObjectValue")],o);const a=o},42095:(e,t,r)=>{r.d(t,{A:()=>d});var s=r(90237),n=r(25482),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(77901);let l=class extends n.oY{constructor(e){super(e),this.path=null}};(0,s._)([(0,i.MZ)({type:[a.A],json:{write:!0}})],l.prototype,"path",void 0),l=(0,s._)([(0,o.$)("esri.rest.knowledgeGraph.Path")],l);const d=l},23150:(e,t,r)=>{r.d(t,{A:()=>d});var s=r(90237),n=(r(59456),r(10107)),i=(r(44208),r(53966),r(87811),r(40608)),o=r(54238),a=r(82799);let l=class extends o.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,s._)([(0,n.MZ)({type:String,json:{write:!0}})],l.prototype,"originId",void 0),(0,s._)([(0,n.MZ)({type:String,json:{write:!0}})],l.prototype,"destinationId",void 0),(0,s._)([(0,n.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,s._)([(0,i.$)("esri.rest.knowledgeGraph.Relationship")],l);const d=l}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6126,7136],{66344:(e,t,s)=>{s.d(t,{q:()=>u});var i,n,r=s(3694);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.A,this._users=new r.A}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,n,r){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,o.size,i.ALL)),n>this._maxSize)return void this._notifyRemove(t,s,n,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,s,0,i.ALL);const u=1+Math.max(r,-4)- -3;this._db.set(t,new a(s,n,u)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t,s,n){t=e.id+t;const r=this._db.get(t);if(r&&r.entry===s){for(this._size-=r.size,e.size-=r.size;n>this._maxSize;){const e=this._notifyRemove(t,s,n,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}r.size=n,this._size+=n,e.size+=n,this._checkSize()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=t[r]||0;t[r]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,i.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,i){let n;return this._removeFuncs.some((r=>{if(e.startsWith(r[0])){const e=r[1](t,i,s);return"number"==typeof e&&(n=e),!0}return!1})),n}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const s=e?.id;let i=!0;for(;i;){i=!1;for(const[n,r]of this._db)if(0===r.lifetime&&(!s||n.startsWith(s))){if(this._purgeItem(n,r,e),t.size<=.9*t.maxSize)return;i||=this._db.has(n)}}for(const[i,n]of this._db)if((!s||i.startsWith(s))&&(this._purgeItem(i,n,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const n=this._notifyRemove(e,t.entry,t.size,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class a{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}class u{constructor(e,t){this._storage=new o,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},67482:(e,t,s)=>{function i(e){return null!=a(e)||null!=o(e)}function n(e){return u.test(e)}function r(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let s=!0;if(h&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,i=0;for(;!t&&i<=e.length;)t=!l.test(e[i]),i++;s=!t}}return s}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=u.exec(e);if(!t?.groups)return null;const s=t.groups,i=+s.year,n=+s.month-1,r=+s.day,o=+(s.hours??"0"),a=+(s.minutes??"0"),l=+(s.seconds??"0");if(o>23)return null;if(a>59)return null;if(l>59)return null;const h=s.ms??"0",d=h?+h.padEnd(3,"0").slice(0,3):0;let c;if(s.isUTC||!s.offsetSign)c=Date.UTC(i,n,r,o,a,l,d);else{const e=+s.offsetHours,t=+s.offsetMinutes;c=6e4*("+"===s.offsetSign?-1:1)*(60*e+t)+Date.UTC(i,n,r,o,a,l,d)}return Number.isNaN(c)?null:c}s.d(t,{Br:()=>n,Cq:()=>i,_U:()=>r});const u=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,l=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,h=!Number.isNaN(new Date("technology 10").getTime())},75503:(e,t,s)=>{s.d(t,{E:()=>B,w:()=>o});var i=s(4576),n=(s(44208),s(3694)),r=s(11006);class o{constructor(e=9,t){this._compareMinX=d,this._compareMinY=c,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),b.prune(),I.prune(),S.prune(),F.prune()}all(e){a(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(_(e,s))for(b.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;_(e,o)&&(s.leaf?t(r):g(e,o)?a(r,t):b.push(r))}s=b.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!_(e,t))return!1;for(b.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(_(e,r)){if(t.leaf||g(e,r))return!0;b.push(n)}}t=b.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new M([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(e);for(S.clear(),F.clear();s||S.length>0;){if(s||(s=S.pop(),n=S.data[S.length-1],r=F.pop()??0,o=!0),s.leaf&&(t=(0,i.qh)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),S.push(s),this._condense(S),this;o||s.leaf||!g(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(S.push(s),F.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new M(e.slice(t,s+1));return u(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new v([]);o.height=i;const a=Math.ceil(n/r),l=a*Math.ceil(Math.sqrt(r));x(e,t,s,l,this._compareMinX);for(let n=t;n<=s;n+=l){const t=Math.min(n+l-1,s);x(e,n,t,a,this._compareMinY);for(let s=n;s<=t;s+=a){const n=Math.min(s+a-1,t);o.children.push(this._build(e,s,n,i-1))}}return u(o,this._toBBox),o}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);S.clear();const r=function(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=p(o),u=m(e,o)-a;u<n?(n=u,i=a<i?a:i,s=o):u===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}(n,this._data,t,S);for(r.children.push(e),h(r,n);t>=0&&S.data[t].children.length>this._maxEntries;)this._split(S,t),t--;!function(e,t,s){for(let i=s;i>=0;i--)h(t.data[i],e)}(n,S,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return;const o=s.children.splice(r,s.children.length-r),a=s.leaf?new M(o):new v(o);a.height=s.height,u(s,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(s,a)}_splitRoot(e,t){this._data=new v([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=l(e,0,o,this._toBBox),a=l(e,o,s,this._toBBox),u=y(t,a),h=p(t)+p(a);u<i?(i=u,r=o,n=h<n?h:n):u===i&&h<n&&(n=h,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:d,n=e.leaf?this._compareMinY:c;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=l(e,0,t,n),o=l(e,s-t,s,n);let a=f(r)+f(o);for(let i=t;i<s-t;i++){const t=e.children[i];h(r,e.leaf?n(t):t),a+=f(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];h(o,e.leaf?n(t):t),a+=f(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.qh)(r,s,r.length,n.indexHint),1)}else this.clear();else u(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){let s=e;for(I.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else I.pushArray(s.children);s=I.pop()??null}}function u(e,t){l(e,0,e.children.length,t,e)}function l(e,t,s,i,n){n||(n=new M([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],h(n,e.leaf?i(r):r);return n}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function d(e,t){return e.minX-t.minX}function c(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,s,i,n){const o=[t,s];for(;o.length;){const t=o.pop(),s=o.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,r.q)(e,a,s,t,n),o.push(s,a,a,t)}}const b=new n.A,I=new n.A,S=new n.A,F=new n.A({deallocator:void 0});class B{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class A extends B{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class M extends A{constructor(e){super(),this.children=e,this.leaf=!0}}class v extends A{constructor(e){super(),this.children=e,this.leaf=!1}}},36708:(e,t,s)=>{s.d(t,{C_:()=>c,OH:()=>m,Vh:()=>y,on:()=>d,pc:()=>g,wB:()=>u,z7:()=>l}),s(60999),s(5503);var i=s(37955),n=s(36563),r=s(97768),o=s(74887),a=s(14012);function u(e,t,s={}){return h(e,t,s,p)}function l(e,t,s={}){return h(e,t,s,f)}function h(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.xt)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,a.Cn)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function d(e,t,s,o={}){let a=null,l=null,h=null;function d(){a&&l&&(l.remove(),o.onListenerRemove?.(a),a=null,l=null)}function c(e){o.once&&o.once&&(0,r.xt)(h),s(e)}const p=u(e,((e,s)=>{d(),(0,i.wb)(e)&&(a=e,l=(0,i.on)(e,t,c),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return h=(0,n.hA)((()=>{p.remove(),d()})),h}function c(e,t){return function(e,t,s){if((0,o.G4)(s))return Promise.reject((0,o.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function u(){a=(0,r.xt)(a)}return new Promise(((i,r)=>{a=(0,n.vE)([(0,o.u7)(s,(()=>{u(),r((0,o.NK)())})),h(e,(e=>{u(),i(e)}),{sync:!1,once:!0},t??p)])}))}(e,f,t)}function p(e){return!0}function f(e){return!!e}s(80559);const m={sync:!0},y={initial:!0},g={sync:!0,initial:!0}},17136:(e,t,s)=>{s.d(t,{el:()=>S});var i=s(92602),n=s(49186),r=s(53966),o=s(39829),a=s(82799),u=s(80754),l=s(21325),h=s(28735),d=(s(59456),s(78888)),c=s(65864),p=s(2272),f=s(84952),m=s(92300);const y=()=>r.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function x(e,t,s){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new n.A(e)}const s=(0,u.r8)(e),i=[];for(const e of s){const s=[];i.push(s),s.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],r=e[i][1],o=e[i+1][0],a=e[i+1][1],u=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),l=(a-r)/u,h=(o-n)/u,d=u/t;if(d>1){for(let e=1;e<=d-1;e++){const i=e*t,o=h*i+n,a=l*i+r;s.push([o,a])}const e=(u+Math.floor(d-1)*t)/2,i=h*e+n,o=l*e+r;s.push([i,o])}s.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:i,spatialReference:e.spatialReference}):new a.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,h.ci)(t,!0)}return s&&(e=(0,u.kS)(e,s)),e}function b(e,t,s){if(Array.isArray(e)){const i=e[0];if(i>t){const s=(0,u.kd)(i,t);e[0]=i+s*(-2*t)}else if(i<s){const t=(0,u.kd)(i,s);e[0]=i+t*(-2*s)}}else{const i=e.x;if(i>t){const s=(0,u.kd)(i,t);e=e.clone().offset(s*(-2*t),0)}else if(i<s){const t=(0,u.kd)(i,s);e=e.clone().offset(t*(-2*s),0)}}return e}function I(e,t){let s=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],r=t.geometries[i],o=(0,u.r8)(r);for(let e=0;e<o.length;e++){const t=o[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const i=t[e][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,u.kd)(s,180);for(let s=0;s<t.length;s++){const t=r.getPoint(e,s);r.setPoint(e,s,t.clone().offset(i,0))}return!0}}))}if(n===s){if(g(e))for(const t of(0,u.r8)(r))e[n]=e[n].addRing(t);else if(_(e))for(const t of(0,u.r8)(r))e[n]=e[n].addPath(t)}else s=n,e[n]=r}return e}async function S(e,t,s){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let r,g,_,F,B,A,M,v,T=0;const w=[],R=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,g=(0,l.Vp)(r),_=r.isWebMercator,A=_?102100:4326,F=u.j7[A].maxX,B=u.j7[A].minX,M=u.j7[A].plus180Line,v=u.j7[A].minus180Line),g)if("mesh"===t.type)R.push(t);else if("point"===t.type)R.push(b(t.clone(),F,B));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>b(e,F,B))),R.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);R.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,s=(0,u.kd)(e.xmin,B)*(2*F);let i=0===s?t.clone():(0,u.kS)(t.clone(),s);e.offset(s,0);let{xmin:n,xmax:r}=e;n=Number(n.toFixed(9)),r=Number(r.toFixed(9)),e.intersects(M)&&r!==F?(T=r>T?r:T,i=x(i,_),w.push(i),R.push("cut")):e.intersects(v)&&n!==B?(T=r*(2*F)>T?r*(2*F):T,i=x(i,_,360),w.push(i),R.push("cut")):R.push(i)}else R.push(t.clone());else R.push(t);else R.push(t);let z=(0,u.kd)(T,F),E=-90;const C=z,j=new a.A;for(;z>0;){const e=360*z-180;j.addPath([[e,E],[e,-1*E]]),E*=-1,z--}if(w.length>0&&C>0){const t=I(w,await async function(e,t,s,i){const n=(0,p.Dl)(e),r=t[0].spatialReference,o={...i,responseType:"json",query:{...n.query,f:"json",sr:(0,l.YX)(r),target:JSON.stringify({geometryType:(0,c.$B)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},a=await(0,d.A)(n.path+"/cut",o),{cutIndexes:u,geometries:h=[]}=a.data;return{cutIndexes:u,geometries:h.map((e=>{const t=(0,c.rS)(e);return t.spatialReference=r,t}))}}(n,w,j,s)),i=[],r=[];for(let s=0;s<R.length;s++){const n=R[s];if("cut"!==n)r.push(n);else{const n=t.shift(),o=e[s];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&n.rings.length>=o.rings.length?(i.push(n),r.push("simplify")):r.push(_?(0,h.Gh)(n):n)}}if(!i.length)return r;const o=await async function(e,t,s){const i="string"==typeof e?(0,f.An)(e):e,n=t[0].spatialReference,r=(0,c.$B)(t[0]),o={...s,query:{...i.query,f:"json",sr:(0,l.YX)(n),geometries:JSON.stringify((0,m.X)(t))}},{data:a}=await(0,d.A)(i.path+"/simplify",o);return(0,m.V)(a.geometries,r,n)}(n,i,s),a=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?a.push(t):a.push(_?(0,h.Gh)(o.shift()):o.shift())}return a}const q=[];for(let e=0;e<R.length;e++){const t=R[e];if("cut"!==t)q.push(t);else{const e=w.shift();q.push(!0===_?(0,h.Gh)(e):e)}}return q}},80754:(e,t,s)=>{s.d(t,{j7:()=>o,kS:()=>u,kd:()=>a,r8:()=>l});var i=s(82799),n=s(16930),r=s(65864);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){const s=l(e);for(const e of s)for(const s of e)s[0]+=t;return e}function l(e){return(0,r.Bi)(e)?e.rings:e.paths}},43334:(e,t,s)=>{s.d(t,{N3:()=>r,Om:()=>n});var i=s(92722);class n{constructor(e=null,t={},s,i){this.geometry=e,this.attributes=t,this.centroid=s,this.objectId=i,this.displayId=0,this.geohashX=0,this.geohashY=0}static fromJSON(e,t){const s=e.geometry?i.A.fromJSON(e.geometry):null,r=e.centroid?i.A.fromJSON(e.centroid):null,o=e.attributes[t];return new n(s,e.attributes,r,o)}weakClone(){const e=new n(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new n(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function r(e){return!!e.geometry?.coords?.length}},58512:(e,t,s)=>{s.d(t,{A:()=>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}}},92722:(e,t,s)=>{s.d(t,{A:()=>i});class i{constructor(e=[],t=[]){this.lengths=e??[],this.coords=t??[]}static fromJSON(e){return new i(e.lengths,e.coords)}static fromRect(e){const[t,s,n,r]=e,o=n-t,a=r-s;return new i([5],[t,s,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 s=0;s<this.lengths.length;s++){const i=this.lengths[s];for(let s=0;s<i;s++)e(this.coords[2*(s+t)],this.coords[2*(s+t)+1]);t+=i}}deltaDecode(){const e=this.clone(),{coords:t,lengths:s}=e;let i=0;for(const e of s){for(let s=1;s<e;s++)t[2*(i+s)]+=t[2*(i+s)-2],t[2*(i+s)+1]+=t[2*(i+s)-1];i+=e}return e}clone(e){if(0===this.lengths.length)return new i([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),s=this.coords.slice(0,t);return e?(e.set(s),new i(this.lengths,e)):new i(Array.from(this.lengths),Array.from(s))}}},6518:(e,t,s)=>{s.d(t,{F:()=>a});var i=s(44208),n=s(75503),r=s(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.w(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221:(e,t,s)=>{s.d(t,{A:()=>f});var i=s(4576),n=s(49186),r=s(65529),o=s(53966),a=s(70328),u=s(19419),l=s(90708),h=s(6518),d=s(51441),c=s(37730);const p=(0,a.vt)();class f{constructor(e){this.geometryInfo=e,this._boundsStore=new h.F,this._featuresById=new Map,this.events=new r.A,this.featureAdapter=c.T}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,d.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(i.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.Jt)(p,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(s?(e.displayId=s.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,l.jQ)(null!=i?i:(0,u.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,l.jQ)((0,u.vt)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),e}}},37730:(e,t,s)=>{s.d(t,{T:()=>o});var i=s(27647),n=s(43334),r=s(92722);const o={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new n.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(null==e.centroid&&(e.centroid=(0,i.Q)(new r.A,e.geometry,t.hasZ,t.hasM)),e.centroid)}},33032:(e,t,s)=>{s.d(t,{H:()=>n,L:()=>i});const i=1;function n(e,t){let s=0;for(const i of t){const t=i.attributes?.[e];"number"==typeof t&&isFinite(t)&&(s=Math.max(s,t))}return s}},29432:(e,t,s)=>{s.r(t),s.d(t,{default:()=>S});var i=s(49186),n=s(65864),r=s(21325),o=s(90708),a=s(33032),u=s(83221),l=s(31464),h=s(88856),d=s(64714),c=s(82832),p=s(95466),f=s(98453),m=s(30524),y=s(56400);const g=r.KK,_={xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:r.KK},x={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsQueryWithDistance:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQueryWithResultType:!0,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0,supportsQueryWithCacheHint:!0}};function b(e){return(0,n.fT)(e)?null!=e.z:!!e.hasZ}function I(e){return(0,n.fT)(e)?null!=e.m:!!e.hasM}class S{constructor(){this._queryEngine=null,this._nextObjectId=null}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e){const t=[],{features:s}=e,n=this._inferLayerProperties(s,e.fields),r=e.fields||[],o=null!=e.hasM?e.hasM:!!n.hasM,c=null!=e.hasZ?e.hasZ:!!n.hasZ,b=!e.spatialReference&&!n.spatialReference,I=b?g:e.spatialReference||n.spatialReference,S=b?_:null,F=e.geometryType||n.geometryType,B=!F;let A=e.objectIdField||n.objectIdField,M=e.timeInfo;const v=new p.A(r);if(!B&&(b&&t.push({name:"feature-layer:spatial-reference-not-found",message:"Spatial reference not provided or found in features. Defaults to WGS84"}),!F))throw new i.A("feature-layer:missing-property","geometryType not set and couldn't be inferred from the provided features");if(!A)throw new i.A("feature-layer:missing-property","objectIdField not set and couldn't be found in the provided fields");if(n.objectIdField&&A!==n.objectIdField&&(t.push({name:"feature-layer:duplicated-oid-field",message:`Provided objectIdField "${A}" doesn't match the field name "${n.objectIdField}", found in the provided fields`}),A=n.objectIdField),A&&!n.objectIdField){const e=v.get(A);e?(A=e.name,e.type="esriFieldTypeOID",e.editable=!1,e.nullable=!1):r.unshift({alias:A,name:A,type:"esriFieldTypeOID",editable:!1,nullable:!1})}for(const e of r){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),!e.name)throw new i.A("feature-layer:invalid-field-name","field name is missing",{field:e});if(e.name===A&&(e.type="esriFieldTypeOID"),!f.m.jsonValues.includes(e.type))throw new i.A("feature-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e});null==e.length&&(e.length=(0,m._b)(e))}const T={};for(const e of r)if("esriFieldTypeOID"!==e.type&&"esriFieldTypeGlobalID"!==e.type){const t=(0,m.lD)(e);void 0!==t&&(T[e.name]=t)}if(M){if(M.startTimeField){const e=v.get(M.startTimeField);e?(M.startTimeField=e.name,e.type="esriFieldTypeDate"):M.startTimeField=null}if(M.endTimeField){const e=v.get(M.endTimeField);e?(M.endTimeField=e.name,e.type="esriFieldTypeDate"):M.endTimeField=null}if(M.trackIdField){const e=v.get(M.trackIdField);e?M.trackIdField=e.name:(M.trackIdField=null,t.push({name:"feature-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:M}}))}M.startTimeField||M.endTimeField||(t.push({name:"feature-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing or invalid",details:{timeInfo:M}}),M=null)}const w=v.dateFields.length?{timeZoneIANA:e.dateFieldsTimeZone??y.n$}:null;this._createDefaultAttributes=(0,d.Vx)(T,A);const R={warnings:t,featureErrors:[],layerDefinition:{...x,drawingInfo:(0,d.F0)(F),templates:(0,d.e2)(T),extent:S,geometryType:F,objectIdField:A,fields:r,hasZ:c,hasM:o,timeInfo:M,dateFieldsTimeReference:w},assignedObjectIds:{}};if(this._queryEngine=new h.d({fieldsIndex:p.A.fromLayerJSON({fields:r,timeInfo:M,dateFieldsTimeReference:w}),geometryType:F,hasM:o,hasZ:c,objectIdField:A,spatialReference:I,featureStore:new u.A({geometryType:F,hasM:o,hasZ:c}),timeInfo:M}),!s?.length)return this._nextObjectId=a.L,R;const z=(0,a.H)(A,s);return this._nextObjectId=z+1,await(0,l.Nk)(s,I),this._loadInitialFeatures(R,s)}async applyEdits(e){const{spatialReference:t,geometryType:s}=this._queryEngine;return await Promise.all([(0,c.$1)(t,s),(0,l.Nk)(e.adds,t),(0,l.Nk)(e.updates,t)]),this._applyEdits(e)}queryFeatures(e,t={}){return this._queryEngine.executeQuery(e,t.signal)}queryFeatureCount(e,t={}){return this._queryEngine.executeQueryForCount(e,t.signal)}queryObjectIds(e,t={}){return this._queryEngine.executeQueryForIds(e,t.signal)}queryExtent(e,t={}){return this._queryEngine.executeQueryForExtent(e,t.signal)}querySnapping(e,t={}){return this._queryEngine.executeQueryForSnapping(e,t.signal)}_inferLayerProperties(e,t){let s,i,r=null,o=null,a=null;for(const t of e){const e=t.geometry;if(null!=e&&(r||(r=(0,n.$B)(e)),o||(o=e.spatialReference),null==s&&(s=b(e)),null==i&&(i=I(e)),r&&o&&null!=s&&null!=i))break}if(t&&t.length){let e=null;t.some((t=>{const s="esriFieldTypeOID"===t.type,i=!t.type&&t.name&&"objectid"===t.name.toLowerCase();return e=t,s||i}))&&(a=e.name)}return{geometryType:r,spatialReference:o,objectIdField:a,hasM:i,hasZ:s}}async _loadInitialFeatures(e,t){const{geometryType:s,hasM:i,hasZ:r,objectIdField:a,spatialReference:u,featureStore:h,fieldsIndex:d}=this._queryEngine,p=[];for(const i of t){if(null!=i.uid&&(e.assignedObjectIds[i.uid]=-1),i.geometry&&s!==(0,n.$B)(i.geometry)){e.featureErrors.push((0,c.Yx)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),r=(0,c.MB)(d,t,i.attributes,!0);r?e.featureErrors.push(r):(this._assignObjectId(t,i.attributes,!0),i.attributes=t,null!=i.uid&&(e.assignedObjectIds[i.uid]=i.attributes[a]),null!=i.geometry&&(i.geometry=(0,l.Cv)(i.geometry,i.geometry.spatialReference,u)),p.push(i))}h.addMany((0,o.Di)([],p,s,r,i,a));const{fullExtent:f,timeExtent:m}=await this._queryEngine.fetchRecomputedExtents();if(e.layerDefinition.extent=f,m){const{start:t,end:s}=m;e.layerDefinition.timeInfo.timeExtent=[t,s]}return e}async _applyEdits(e){const{adds:t,updates:s,deletes:i}=e,n={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t?.length&&this._applyAddEdits(n,t),s?.length&&this._applyUpdateEdits(n,s),i?.length){for(const e of i)n.deleteResults.push((0,c.bP)(e));this._queryEngine.featureStore.removeManyById(i)}const{fullExtent:r,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();return{extent:r,timeExtent:o,featureEditResults:n}}_applyAddEdits(e,t){const{addResults:s}=e,{geometryType:i,hasM:r,hasZ:a,objectIdField:u,spatialReference:h,featureStore:d,fieldsIndex:p}=this._queryEngine,f=[];for(const r of t){if(r.geometry&&i!==(0,n.$B)(r.geometry)){s.push((0,c.Yx)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),o=(0,c.MB)(p,t,r.attributes);if(o)s.push(o);else{if(this._assignObjectId(t,r.attributes),r.attributes=t,null!=r.uid){const t=r.attributes[u];e.uidToObjectId[r.uid]=t}if(null!=r.geometry){const e=r.geometry.spatialReference??h;r.geometry=(0,l.Cv)((0,c.CR)(r.geometry,e),e,h)}f.push(r),s.push((0,c.bP)(r.attributes[u]))}}d.addMany((0,o.Di)([],f,i,a,r,u))}_applyUpdateEdits({updateResults:e},t){const{geometryType:s,hasM:i,hasZ:r,objectIdField:a,spatialReference:u,featureStore:h,fieldsIndex:d}=this._queryEngine;for(const p of t){const{attributes:t,geometry:f}=p,m=t?.[a];if(null==m){e.push((0,c.Yx)(`Identifier field ${a} missing`));continue}if(!h.has(m)){e.push((0,c.Yx)(`Feature with object id ${m} missing`));continue}const y=(0,o.oN)(h.getFeature(m),s,r,i);if(null!=f){if(s!==(0,n.$B)(f)){e.push((0,c.Yx)("Incorrect geometry type."));continue}const t=f.spatialReference??u;y.geometry=(0,l.Cv)((0,c.CR)(f,t),t,u)}if(t){const s=(0,c.MB)(d,y.attributes,t);if(s){e.push(s);continue}}h.add((0,o.E2)(y,s,r,i,a)),e.push((0,c.bP)(m))}}_assignObjectId(e,t,s=!1){const i=this._queryEngine.objectIdField;s&&t&&isFinite(t[i])?e[i]=t[i]:e[i]=this._nextObjectId++}}},64714:(e,t,s)=>{s.d(t,{F0:()=>u,Vx:()=>d,e2:()=>p,f:()=>f});var i=s(44208),n=s(4718),r=s(99352),o=s(4071),a=s(93470);function u(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?a.Cb:"esriGeometryPolyline"===e?a.yM:a.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let h=1;function d(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let s=`this${c(t)} = null;`;for(const t in e)s+=`this${c(t)} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${h++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new i}catch(s){return()=>({[t]:null,...e})}}function c(e){return l.test(e)?`.${e}`:`["${e}"]`}function p(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}function f(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!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,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:o.$,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}}}},82832:(e,t,s)=>{s.d(t,{$1:()=>y,CR:()=>m,MB:()=>c,Yx:()=>u,bP:()=>h});var i=s(67482),n=s(21325),r=s(30524);class o{constructor(){this.code=null,this.description=null}}class a{constructor(e){this.error=new o,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=e}}function u(e){return new a(e)}class l{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function h(e){return new l(e)}const d=new Set;function c(e,t,s,i=!1){d.clear();for(const n in s){const o=e.get(n);if(!o)continue;const a=p(o,s[n]);if(d.add(o.name),o&&(i||o.editable)){const e=(0,r.CJ)(o,a);if(e)return u((0,r.uo)(e,o,a));t[o.name]=a}}for(const t of e.requiredFields??[])if(!d.has(t.name))return u(`missing required field "${t.name}"`);return null}function p(e,t){let s=t;return(0,r.WA)(e)&&"string"==typeof t?s=parseFloat(t):(0,r.yM)(e)&&null!=t&&"string"!=typeof t?s=String(t):(0,r.vE)(e)&&"string"==typeof t&&(s=(0,i._U)(t)),(0,r.WX)(s)}let f;function m(e,t){if(!e||!(0,n.fn)(t))return e;if("rings"in e||"paths"in e){if(null==f)throw new TypeError("geometry engine not loaded");return f.simplify(t,e)}return e}async function y(e,t){!(0,n.fn)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==f&&(f=await Promise.all([s.e(9930),s.e(1275)]).then(s.bind(s,47559))),f}()}},4071:(e,t,s)=>{s.d(t,{$:()=>i,P:()=>n});const i={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportedStatistics:void 0},n={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:i,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},98453:(e,t,s)=>{s.d(t,{m:()=>i});const i=new(s(66552).J)({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"})},92300:(e,t,s)=>{s.d(t,{V:()=>r,X:()=>n});var i=s(65864);function n(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function r(e,t,s){const n=(0,i.xD)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=s,t}))}},2272:(e,t,s)=>{s.d(t,{Dl:()=>o,jV:()=>r,lF:()=>a}),s(92602),s(70333);var i=s(4718),n=s(84952);function r(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,n.An)(e):(0,i.o8)(e)}function a(e,t,s){const i={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))i[n]=r.map((e=>a(e)));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(s?.[n]);i[n]=t?e:JSON.stringify(e)}else i[n]=t?r:JSON.stringify(r);else i[n]=r}return i}s(926)},93470:(e,t,s)=>{s.d(t,{Cb:()=>r,HW:()=>h,JR:()=>n,JZ:()=>u,WR:()=>a,b6:()=>d,fT:()=>i,nC:()=>l,yM:()=>o});const i=[252,146,31,255],n=[153,153,153,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},u={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},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},h={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([[3600,7136],{66344:(e,t,s)=>{s.d(t,{q:()=>u});var i,n,r=s(3694);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.A,this._users=new r.A}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}getSize(e,t){const s=this._db.get(e.id+t);return s?.size??0}put(e,t,s,n,r){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==s&&this._notifyRemove(t,o.entry,o.size,i.ALL)),n>this._maxSize)return void this._notifyRemove(t,s,n,i.ALL);if(void 0===s)return void console.warn("Refusing to cache undefined entry ");if(!n||n<0)return console.warn(`Refusing to cache entry with size ${n} for key ${t}`),void this._notifyRemove(t,s,0,i.ALL);const u=1+Math.max(r,-4)- -3;this._db.set(t,new a(s,n,u)),this._size+=n,e.size+=n,this._checkSize()}updateSize(e,t,s,n){t=e.id+t;const r=this._db.get(t);if(r&&r.entry===s){for(this._size-=r.size,e.size-=r.size;n>this._maxSize;){const e=this._notifyRemove(t,s,n,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}r.size=n,this._size+=n,e.size+=n,this._checkSize()}}pop(e,t){t=e.id+t;const s=this._db.get(t);if(s)return this._size-=s.size,e.size-=s.size,this._db.delete(t),++this._hit,s.entry;++this._miss}get(e,t){t=e.id+t;const s=this._db.get(t);if(void 0!==s)return this._db.delete(t),s.lives=s.lifetime,this._db.set(t,s),++this._hit,s.entry;++this._miss}peek(e,t){const s=this._db.get(e.id+t);return s?++this._hit:++this._miss,s?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const{id:n,name:r}=s;if(i.startsWith(n)){const s=t[r]||0;t[r]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,s)=>{s.startsWith(t)&&(this._size-=e.size,this._db.delete(s),this._notifyRemove(s,e.entry,e.size,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,e.size,i.ALL))),this._users.forAll((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s,i){let n;return this._removeFuncs.some((r=>{if(e.startsWith(r[0])){const e=r[1](t,i,s);return"number"==typeof e&&(n=e),!0}return!1})),n}_checkSize(){this._users.forAll((e=>this._checkSizeLimits(e))),this._checkSizeLimits()}_checkSizeLimits(e){const t=e??this;if(t.maxSize<0||t.size<=t.maxSize)return;const s=e?.id;let i=!0;for(;i;){i=!1;for(const[n,r]of this._db)if(0===r.lifetime&&(!s||n.startsWith(s))){if(this._purgeItem(n,r,e),t.size<=.9*t.maxSize)return;i||=this._db.has(n)}}for(const[i,n]of this._db)if((!s||i.startsWith(s))&&(this._purgeItem(i,n,e),t.size<=.9*t.maxSize))return}_purgeItem(e,t,s=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,s&&(s.size-=t.size);const n=this._notifyRemove(e,t.entry,t.size,i.SOME);null!=n&&n>0&&(this._size+=n,s&&(s.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}class a{constructor(e,t,s){this.entry=e,this.size=t,this.lifetime=s,this.lives=s}}class u{constructor(e,t){this._storage=new o,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,s=1){this._storage.put(this,e,t,s,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},67482:(e,t,s)=>{function i(e){return null!=a(e)||null!=o(e)}function n(e){return u.test(e)}function r(e){return a(e)??o(e)}function o(e){const t=new Date(e);return function(e,t){if(Number.isNaN(e.getTime()))return!1;let s=!0;if(h&&/\d+\W*$/.test(t)){const e=t.match(/[a-zA-Z]{2,}/);if(e){let t=!1,i=0;for(;!t&&i<=e.length;)t=!l.test(e[i]),i++;s=!t}}return s}(t,e)?Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset():null}function a(e){const t=u.exec(e);if(!t?.groups)return null;const s=t.groups,i=+s.year,n=+s.month-1,r=+s.day,o=+(s.hours??"0"),a=+(s.minutes??"0"),l=+(s.seconds??"0");if(o>23)return null;if(a>59)return null;if(l>59)return null;const h=s.ms??"0",c=h?+h.padEnd(3,"0").slice(0,3):0;let d;if(s.isUTC||!s.offsetSign)d=Date.UTC(i,n,r,o,a,l,c);else{const e=+s.offsetHours,t=+s.offsetMinutes;d=6e4*("+"===s.offsetSign?-1:1)*(60*e+t)+Date.UTC(i,n,r,o,a,l,c)}return Number.isNaN(d)?null:d}s.d(t,{Br:()=>n,Cq:()=>i,_U:()=>r});const u=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,l=/^((jan(uary)?)|(feb(ruary)?)|(mar(ch)?)|(apr(il)?)|(may)|(jun(e)?)|(jul(y)?)|(aug(ust)?)|(sep(tember)?)|(oct(ober)?)|(nov(ember)?)|(dec(ember)?)|(am)|(pm)|(gmt)|(utc))$/i,h=!Number.isNaN(new Date("technology 10").getTime())},75503:(e,t,s)=>{s.d(t,{E:()=>w,w:()=>o});var i=s(4576),n=(s(44208),s(3694)),r=s(11006);class o{constructor(e=9,t){this._compareMinX=c,this._compareMinY=d,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),b.prune(),S.prune(),I.prune(),F.prune()}all(e){a(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(_(e,s))for(b.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;_(e,o)&&(s.leaf?t(r):g(e,o)?a(r,t):b.push(r))}s=b.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!_(e,t))return!1;for(b.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(_(e,r)){if(t.leaf||g(e,r))return!0;b.push(n)}}t=b.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new B([]),this}remove(e){if(!e)return this;let t,s=this._data,n=null,r=0,o=!1;const a=this._toBBox(e);for(I.clear(),F.clear();s||I.length>0;){if(s||(s=I.pop(),n=I.data[I.length-1],r=F.pop()??0,o=!0),s.leaf&&(t=(0,i.qh)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),I.push(s),this._condense(I),this;o||s.leaf||!g(s,a)?n?(r++,s=n.children[r],o=!1):s=null:(I.push(s),F.push(r),r=0,n=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new B(e.slice(t,s+1));return u(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new M([]);o.height=i;const a=Math.ceil(n/r),l=a*Math.ceil(Math.sqrt(r));x(e,t,s,l,this._compareMinX);for(let n=t;n<=s;n+=l){const t=Math.min(n+l-1,s);x(e,n,t,a,this._compareMinY);for(let s=n;s<=t;s+=a){const n=Math.min(s+a-1,t);o.children.push(this._build(e,s,n,i-1))}}return u(o,this._toBBox),o}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);I.clear();const r=function(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=p(o),u=m(e,o)-a;u<n?(n=u,i=a<i?a:i,s=o):u===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}(n,this._data,t,I);for(r.children.push(e),h(r,n);t>=0&&I.data[t].children.length>this._maxEntries;)this._split(I,t),t--;!function(e,t,s){for(let i=s;i>=0;i--)h(t.data[i],e)}(n,I,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return;const o=s.children.splice(r,s.children.length-r),a=s.leaf?new B(o):new M(o);a.height=s.height,u(s,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(s,a)}_splitRoot(e,t){this._data=new M([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=l(e,0,o,this._toBBox),a=l(e,o,s,this._toBBox),u=y(t,a),h=p(t)+p(a);u<i?(i=u,r=o,n=h<n?h:n):u===i&&h<n&&(n=h,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:c,n=e.leaf?this._compareMinY:d;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=l(e,0,t,n),o=l(e,s-t,s,n);let a=f(r)+f(o);for(let i=t;i<s-t;i++){const t=e.children[i];h(r,e.leaf?n(t):t),a+=f(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];h(o,e.leaf?n(t):t),a+=f(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.qh)(r,s,r.length,n.indexHint),1)}else this.clear();else u(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){let s=e;for(S.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else S.pushArray(s.children);s=S.pop()??null}}function u(e,t){l(e,0,e.children.length,t,e)}function l(e,t,s,i,n){n||(n=new B([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],h(n,e.leaf?i(r):r);return n}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function c(e,t){return e.minX-t.minX}function d(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function f(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function y(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function x(e,t,s,i,n){const o=[t,s];for(;o.length;){const t=o.pop(),s=o.pop();if(t-s<=i)continue;const a=s+Math.ceil((t-s)/i/2)*i;(0,r.q)(e,a,s,t,n),o.push(s,a,a,t)}}const b=new n.A,S=new n.A,I=new n.A,F=new n.A({deallocator:void 0});class w{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class A extends w{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class B extends A{constructor(e){super(),this.children=e,this.leaf=!0}}class M extends A{constructor(e){super(),this.children=e,this.leaf=!1}}},36708:(e,t,s)=>{s.d(t,{C_:()=>d,OH:()=>m,Vh:()=>y,on:()=>c,pc:()=>g,wB:()=>u,z7:()=>l}),s(60999),s(5503);var i=s(37955),n=s(36563),r=s(97768),o=s(74887),a=s(14012);function u(e,t,s={}){return h(e,t,s,p)}function l(e,t,s={}){return h(e,t,s,f)}function h(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.xt)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,a.Cn)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function c(e,t,s,o={}){let a=null,l=null,h=null;function c(){a&&l&&(l.remove(),o.onListenerRemove?.(a),a=null,l=null)}function d(e){o.once&&o.once&&(0,r.xt)(h),s(e)}const p=u(e,((e,s)=>{c(),(0,i.wb)(e)&&(a=e,l=(0,i.on)(e,t,d),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return h=(0,n.hA)((()=>{p.remove(),c()})),h}function d(e,t){return function(e,t,s){if((0,o.G4)(s))return Promise.reject((0,o.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function u(){a=(0,r.xt)(a)}return new Promise(((i,r)=>{a=(0,n.vE)([(0,o.u7)(s,(()=>{u(),r((0,o.NK)())})),h(e,(e=>{u(),i(e)}),{sync:!1,once:!0},t??p)])}))}(e,f,t)}function p(e){return!0}function f(e){return!!e}s(80559);const m={sync:!0},y={initial:!0},g={sync:!0,initial:!0}},17136:(e,t,s)=>{s.d(t,{el:()=>I});var i=s(92602),n=s(49186),r=s(53966),o=s(39829),a=s(82799),u=s(80754),l=s(21325),h=s(28735),c=(s(59456),s(78888)),d=s(65864),p=s(2272),f=s(84952),m=s(92300);const y=()=>r.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function x(e,t,s){if(t){const t=function(e,t){if(!(e instanceof a.A||e instanceof o.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new n.A(e)}const s=(0,u.r8)(e),i=[];for(const e of s){const s=[];i.push(s),s.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],r=e[i][1],o=e[i+1][0],a=e[i+1][1],u=Math.sqrt((o-n)*(o-n)+(a-r)*(a-r)),l=(a-r)/u,h=(o-n)/u,c=u/t;if(c>1){for(let e=1;e<=c-1;e++){const i=e*t,o=h*i+n,a=l*i+r;s.push([o,a])}const e=(u+Math.floor(c-1)*t)/2,i=h*e+n,o=l*e+r;s.push([i,o])}s.push([o,a])}}return function(e){return"polygon"===e.type}(e)?new o.A({rings:i,spatialReference:e.spatialReference}):new a.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,h.ci)(t,!0)}return s&&(e=(0,u.kS)(e,s)),e}function b(e,t,s){if(Array.isArray(e)){const i=e[0];if(i>t){const s=(0,u.kd)(i,t);e[0]=i+s*(-2*t)}else if(i<s){const t=(0,u.kd)(i,s);e[0]=i+t*(-2*s)}}else{const i=e.x;if(i>t){const s=(0,u.kd)(i,t);e=e.clone().offset(s*(-2*t),0)}else if(i<s){const t=(0,u.kd)(i,s);e=e.clone().offset(t*(-2*s),0)}}return e}function S(e,t){let s=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],r=t.geometries[i],o=(0,u.r8)(r);for(let e=0;e<o.length;e++){const t=o[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const i=t[e][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,u.kd)(s,180);for(let s=0;s<t.length;s++){const t=r.getPoint(e,s);r.setPoint(e,s,t.clone().offset(i,0))}return!0}}))}if(n===s){if(g(e))for(const t of(0,u.r8)(r))e[n]=e[n].addRing(t);else if(_(e))for(const t of(0,u.r8)(r))e[n]=e[n].addPath(t)}else s=n,e[n]=r}return e}async function I(e,t,s){if(!Array.isArray(e))return I([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let r,g,_,F,w,A,B,M,T=0;const v=[],z=[];for(const t of e)if(null!=t)if(r||(r=t.spatialReference,g=(0,l.Vp)(r),_=r.isWebMercator,A=_?102100:4326,F=u.j7[A].maxX,w=u.j7[A].minX,B=u.j7[A].plus180Line,M=u.j7[A].minus180Line),g)if("mesh"===t.type)z.push(t);else if("point"===t.type)z.push(b(t.clone(),F,w));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>b(e,F,w))),z.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);z.push(e.rings?new o.A(e):e)}else if(t.extent){const e=t.extent,s=(0,u.kd)(e.xmin,w)*(2*F);let i=0===s?t.clone():(0,u.kS)(t.clone(),s);e.offset(s,0);let{xmin:n,xmax:r}=e;n=Number(n.toFixed(9)),r=Number(r.toFixed(9)),e.intersects(B)&&r!==F?(T=r>T?r:T,i=x(i,_),v.push(i),z.push("cut")):e.intersects(M)&&n!==w?(T=r*(2*F)>T?r*(2*F):T,i=x(i,_,360),v.push(i),z.push("cut")):z.push(i)}else z.push(t.clone());else z.push(t);else z.push(t);let E=(0,u.kd)(T,F),R=-90;const j=E,C=new a.A;for(;E>0;){const e=360*E-180;C.addPath([[e,R],[e,-1*R]]),R*=-1,E--}if(v.length>0&&j>0){const t=S(v,await async function(e,t,s,i){const n=(0,p.Dl)(e),r=t[0].spatialReference,o={...i,responseType:"json",query:{...n.query,f:"json",sr:(0,l.YX)(r),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},a=await(0,c.A)(n.path+"/cut",o),{cutIndexes:u,geometries:h=[]}=a.data;return{cutIndexes:u,geometries:h.map((e=>{const t=(0,d.rS)(e);return t.spatialReference=r,t}))}}(n,v,C,s)),i=[],r=[];for(let s=0;s<z.length;s++){const n=z[s];if("cut"!==n)r.push(n);else{const n=t.shift(),o=e[s];null!=o&&"polygon"===o.type&&o.rings&&o.rings.length>1&&n.rings.length>=o.rings.length?(i.push(n),r.push("simplify")):r.push(_?(0,h.Gh)(n):n)}}if(!i.length)return r;const o=await async function(e,t,s){const i="string"==typeof e?(0,f.An)(e):e,n=t[0].spatialReference,r=(0,d.$B)(t[0]),o={...s,query:{...i.query,f:"json",sr:(0,l.YX)(n),geometries:JSON.stringify((0,m.X)(t))}},{data:a}=await(0,c.A)(i.path+"/simplify",o);return(0,m.V)(a.geometries,r,n)}(n,i,s),a=[];for(let e=0;e<r.length;e++){const t=r[e];"simplify"!==t?a.push(t):a.push(_?(0,h.Gh)(o.shift()):o.shift())}return a}const q=[];for(let e=0;e<z.length;e++){const t=z[e];if("cut"!==t)q.push(t);else{const e=v.shift();q.push(!0===_?(0,h.Gh)(e):e)}}return q}},80754:(e,t,s)=>{s.d(t,{j7:()=>o,kS:()=>u,kd:()=>a,r8:()=>l});var i=s(82799),n=s(16930),r=s(65864);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){const s=l(e);for(const e of s)for(const s of e)s[0]+=t;return e}function l(e){return(0,r.Bi)(e)?e.rings:e.paths}},43334:(e,t,s)=>{s.d(t,{N3:()=>r,Om:()=>n});var i=s(92722);class n{constructor(e=null,t={},s,i){this.geometry=e,this.attributes=t,this.centroid=s,this.objectId=i,this.displayId=0,this.geohashX=0,this.geohashY=0}static fromJSON(e,t){const s=e.geometry?i.A.fromJSON(e.geometry):null,r=e.centroid?i.A.fromJSON(e.centroid):null,o=e.attributes[t];return new n(s,e.attributes,r,o)}weakClone(){const e=new n(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new n(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function r(e){return!!e.geometry?.coords?.length}},58512:(e,t,s)=>{s.d(t,{A:()=>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}}},92722:(e,t,s)=>{s.d(t,{A:()=>i});class i{constructor(e=[],t=[]){this.lengths=e??[],this.coords=t??[]}static fromJSON(e){return new i(e.lengths,e.coords)}static fromRect(e){const[t,s,n,r]=e,o=n-t,a=r-s;return new i([5],[t,s,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 s=0;s<this.lengths.length;s++){const i=this.lengths[s];for(let s=0;s<i;s++)e(this.coords[2*(s+t)],this.coords[2*(s+t)+1]);t+=i}}deltaDecode(){const e=this.clone(),{coords:t,lengths:s}=e;let i=0;for(const e of s){for(let s=1;s<e;s++)t[2*(i+s)]+=t[2*(i+s)-2],t[2*(i+s)+1]+=t[2*(i+s)-1];i+=e}return e}clone(e){if(0===this.lengths.length)return new i([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),s=this.coords.slice(0,t);return e?(e.set(s),new i(this.lengths,e)):new i(Array.from(this.lengths),Array.from(s))}}},6518:(e,t,s)=>{s.d(t,{F:()=>a});var i=s(44208),n=s(75503),r=s(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.w(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221:(e,t,s)=>{s.d(t,{A:()=>f});var i=s(4576),n=s(49186),r=s(65529),o=s(53966),a=s(70328),u=s(19419),l=s(90708),h=s(6518),c=s(51441),d=s(37730);const p=(0,a.vt)();class f{constructor(e){this.geometryInfo=e,this._boundsStore=new h.F,this._featuresById=new Map,this.events=new r.A,this.featureAdapter=d.T}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,c.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(i.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,a.Jt)(p,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let i;if(s?(e.displayId=s.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,l.jQ)(null!=i?i:(0,u.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const s=this._featuresById.get(t);if(!s)return this._add(e),e;const{geometry:i,attributes:r}=e;for(const e in r)s.attributes[e]=r[e];return i&&(s.geometry=i,this._boundsStore.set(t,(0,l.jQ)((0,u.vt)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),s}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),e}}},37730:(e,t,s)=>{s.d(t,{T:()=>o});var i=s(27647),n=s(43334),r=s(92722);const o={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new n.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(null==e.centroid&&(e.centroid=(0,i.Q)(new r.A,e.geometry,t.hasZ,t.hasM)),e.centroid)}},71202:(e,t,s)=>{s.r(t),s.d(t,{default:()=>I});var i=s(78888),n=s(60999),r=s(49186),o=s(53966),a=s(74887),u=s(65864),l=s(21325),h=s(90708),c=s(83221),d=s(31464),p=s(88856),f=s(85113),m=s(64714),y=s(82832),g=s(95466),_=s(98453),x=s(30524),b=s(56400);const S={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsQueryWithCacheHint:!0,supportsQueryWithDistance:!0,supportsQueryWithResultType:!0,supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0}};class I{constructor(){this._queryEngine=null,this._snapshotFeatures=async e=>{const t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e,t={}){this._loadOptions={url:e.url,customParameters:e.customParameters};const s=[],[i]=await Promise.all([e.url?this._fetch(t?.signal):null,this._checkProjection(e.spatialReference)]),n=(0,f.BM)(i,{geometryType:e.geometryType}),o=e.fields||n.fields||[],a=null!=e.hasZ?e.hasZ:n.hasZ,u=n.geometryType;let h=e.objectIdField||n.objectIdFieldName||"__OBJECTID";const d=e.spatialReference||l.KK;let y=e.timeInfo;o===n.fields&&n.unknownFields.length>0&&s.push({name:"geojson-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:n.unknownFields}});const I=new g.A(o);let F=I.get(h);F?("esriFieldTypeString"!==F.type&&(F.type="esriFieldTypeOID"),F.editable=!1,F.nullable=!1,h=F.name):(F={alias:h,name:h,type:"string"===n.objectIdFieldType?"esriFieldTypeString":"esriFieldTypeOID",editable:!1,nullable:!1},o.unshift(F));const w={};for(const e of o){if(null==e.name&&(e.name=e.alias),null==e.alias&&(e.alias=e.name),!e.name)throw new r.A("geojson-layer:invalid-field-name","field name is missing",{field:e});if(!_.m.jsonValues.includes(e.type))throw new r.A("geojson-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e});if(e.name!==F.name){const t=(0,x.lD)(e);void 0!==t&&(w[e.name]=t)}null==e.length&&(e.length=(0,x._b)(e))}if(y){if(y.startTimeField){const e=I.get(y.startTimeField);e?(y.startTimeField=e.name,e.type="esriFieldTypeDate"):y.startTimeField=null}if(y.endTimeField){const e=I.get(y.endTimeField);e?(y.endTimeField=e.name,e.type="esriFieldTypeDate"):y.endTimeField=null}if(y.trackIdField){const e=I.get(y.trackIdField);e?y.trackIdField=e.name:(y.trackIdField=null,s.push({name:"geojson-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:y}}))}y.startTimeField||y.endTimeField||(s.push({name:"geojson-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:y}}),y=null)}const A=u?(0,m.F0)(u):void 0,B=I.dateFields.length?{timeZoneIANA:b.n$}:null,M={warnings:s,featureErrors:[],layerDefinition:{...S,drawingInfo:A??void 0,templates:(0,m.e2)(w),extent:void 0,geometryType:u,objectIdField:h,fields:o,hasZ:!!a,timeInfo:y,dateFieldsTimeReference:B}};this._queryEngine=new p.d({fieldsIndex:g.A.fromLayerJSON({fields:o,timeInfo:y,dateFieldsTimeReference:B}),geometryType:u,hasM:!1,hasZ:a,objectIdField:h,spatialReference:d,timeInfo:y,featureStore:new c.A({geometryType:u,hasM:!1,hasZ:a})});const T=this._queryEngine.fieldsIndex.requiredFields.indexOf(F);T>-1&&this._queryEngine.fieldsIndex.requiredFields.splice(T,1),this._createDefaultAttributes=(0,m.Vx)(w,h);const v=await this._createFeatures(i);this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,v);const z=this._normalizeFeatures(v,M.featureErrors);this._queryEngine.featureStore.addMany(z);const{fullExtent:E,timeExtent:R}=await this._queryEngine.fetchRecomputedExtents();if(M.layerDefinition.extent=E,R){const{start:e,end:t}=R;M.layerDefinition.timeInfo.timeExtent=[e,t]}return M}async applyEdits(e){const{spatialReference:t,geometryType:s}=this._queryEngine;return await Promise.all([(0,y.$1)(t,s),(0,d.Nk)(e.adds,t),(0,d.Nk)(e.updates,t)]),await this._waitSnapshotComplete(),this._applyEdits(e)}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForSnapping(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,n.UT)(this._snapshotFeatures),this._snapshotTask.promise.then((e=>{this._queryEngine.featureStore.clear(),this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,e);const t=this._normalizeFeatures(e);t&&this._queryEngine.featureStore.addMany(t)}),(e=>{this._queryEngine.featureStore.clear(),(0,a.zf)(e)||o.A.getLogger("esri.layers.GeoJSONLayer").error(new r.A("geojson-layer:refresh","An error occurred during refresh",{error:e}))})),await this._waitSnapshotComplete();const{fullExtent:t,timeExtent:s}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:s}}async _createFeatures(e){if(null==e)return[];const{geometryType:t,hasZ:s,objectIdField:i}=this._queryEngine,n=(0,f.bd)(e,{geometryType:t,hasZ:s,objectIdField:i});if(!(0,l.aI)(this._queryEngine.spatialReference,l.KK))for(const e of n)null!=e.geometry&&(e.geometry=(0,h.Ux)((0,d.Cv)((0,h.zv)(e.geometry,this._queryEngine.geometryType,this._queryEngine.hasZ,!1),l.KK,this._queryEngine.spatialReference)));return n}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){const{url:t,customParameters:s}=this._loadOptions,n=(await(0,i.A)(t??"",{responseType:"json",query:{...s},signal:e})).data;return(0,f.sO)(n),n}_normalizeFeatures(e,t){const{objectIdField:s,fieldsIndex:i}=this._queryEngine,n=[];for(const r of e){const e=this._createDefaultAttributes(),o=(0,y.MB)(i,e,r.attributes,!0);o?t?.push(o):(this._assignObjectId(e,r.attributes,!0),r.attributes=e,r.objectId=e[s],n.push(r))}return n}async _applyEdits(e){const{adds:t,updates:s,deletes:i}=e,n={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t?.length&&this._applyAddEdits(n,t),s?.length&&this._applyUpdateEdits(n,s),i?.length){for(const e of i)n.deleteResults.push((0,y.bP)(e));this._queryEngine.featureStore.removeManyById(i)}const{fullExtent:r,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();return{extent:r,timeExtent:o,featureEditResults:n}}_applyAddEdits(e,t){const{addResults:s}=e,{geometryType:i,hasM:n,hasZ:r,objectIdField:o,spatialReference:a,featureStore:l,fieldsIndex:c}=this._queryEngine,p=[];for(const n of t){if(n.geometry&&i!==(0,u.$B)(n.geometry)){s.push((0,y.Yx)("Incorrect geometry type."));continue}const t=this._createDefaultAttributes(),r=(0,y.MB)(c,t,n.attributes);if(r)s.push(r);else{if(this._assignObjectId(t,n.attributes),n.attributes=t,null!=n.uid){const t=n.attributes[o];e.uidToObjectId[n.uid]=t}if(null!=n.geometry){const e=n.geometry.spatialReference??a;n.geometry=(0,d.Cv)((0,y.CR)(n.geometry,e),e,a)}p.push(n),s.push((0,y.bP)(n.attributes[o]))}}l.addMany((0,h.Di)([],p,i,r,n,o))}_applyUpdateEdits({updateResults:e},t){const{geometryType:s,hasM:i,hasZ:n,objectIdField:r,spatialReference:o,featureStore:a,fieldsIndex:l}=this._queryEngine;for(const c of t){const{attributes:t,geometry:p}=c,f=t?.[r];if(null==f){e.push((0,y.Yx)(`Identifier field ${r} missing`));continue}if(!a.has(f)){e.push((0,y.Yx)(`Feature with object id ${f} missing`));continue}const m=(0,h.oN)(a.getFeature(f),s,n,i);if(null!=p){if(s!==(0,u.$B)(p)){e.push((0,y.Yx)("Incorrect geometry type."));continue}const t=p.spatialReference??o;m.geometry=(0,d.Cv)((0,y.CR)(p,t),t,o)}if(t){const s=(0,y.MB)(l,m.attributes,t);if(s){e.push(s);continue}}a.add((0,h.E2)(m,s,n,i,r)),e.push((0,y.bP)(f))}}_createObjectIdGenerator(e,t){const s=e.fieldsIndex.get(e.objectIdField);if("esriFieldTypeString"===s.type)return()=>s.name+"-"+Date.now().toString(16);let i=Number.NEGATIVE_INFINITY;for(const e of t)e.objectId&&(i=Math.max(i,e.objectId));return i=Math.max(0,i)+1,()=>i++}_assignObjectId(e,t,s=!1){const i=this._queryEngine.objectIdField;e[i]=s&&i in t?t[i]:this._objectIdGenerator()}async _checkProjection(e){try{await(0,d.Nk)(l.KK,e)}catch{throw new r.A("geojson-layer","Projection not supported")}}}},85113:(e,t,s)=>{s.d(t,{BM:()=>w,bd:()=>A,sO:()=>F,xD:()=>h});var i=s(67482),n=s(49186),r=s(21325),o=s(43334),a=s(92722),u=s(30524);const l={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function h(e){return l[e]}function*c(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*d(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function p(e){for(const t of e)if(t.length>2)return!0;return!1}function f(e){let t=0;for(let s=0;s<e.length;s++){const i=e[s],n=e[(s+1)%e.length];t+=i[0]*n[1]-n[0]*i[1]}return t<=0}function m(e){const t=e[0],s=e[e.length-1];return t[0]===s[0]&&t[1]===s[1]&&t[2]===s[2]||e.push(t),e}function y(e,t,s){switch(t.type){case"LineString":case"MultiPoint":return function(e,t,s){return x(e,t.coordinates,s),e}(e,t,s);case"MultiLineString":return function(e,t,s){for(const i of t.coordinates)x(e,i,s);return e}(e,t,s);case"MultiPolygon":return function(e,t,s){for(const i of t.coordinates){g(e,i[0],s);for(let t=1;t<i.length;t++)_(e,i[t],s)}return e}(e,t,s);case"Point":return function(e,t,s){return S(e,t.coordinates,s),e}(e,t,s);case"Polygon":return function(e,t,s){const i=t.coordinates;g(e,i[0],s);for(let t=1;t<i.length;t++)_(e,i[t],s);return e}(e,t,s)}}function g(e,t,s){const i=m(t);!function(e){return!f(e)}(i)?x(e,i,s):b(e,i,s)}function _(e,t,s){const i=m(t);!function(e){return f(e)}(i)?x(e,i,s):b(e,i,s)}function x(e,t,s){for(const i of t)S(e,i,s);e.lengths.push(t.length)}function b(e,t,s){for(let i=t.length-1;i>=0;i--)S(e,t[i],s);e.lengths.push(t.length)}function S(e,t,s){const[i,n,r]=t;e.coords.push(i,n),s.hasZ&&e.coords.push(r||0)}function I(e){switch(typeof e){case"string":return(0,i.Br)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function F(e,t=4326){if(!e)throw new n.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new n.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:s}=e;if(!s)return;const i="string"==typeof s?s:"name"===s.type?s.properties.name:"EPSG"===s.type?s.properties.code:null,o=(0,r.oT)({wkid:t})?new RegExp(".*(CRS84H?|4326)$","i"):new RegExp(`.*(${t})$`,"i");if(!i||!o.test(i))throw new n.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:s})}function w(e,t={}){const s=[],i=new Set,n=new Set;let r,o=!1,a=null,l=!1,{geometryType:f=null}=t;for(const t of c(e)){const{geometry:e,properties:c,id:m}=t;if((!e||(f||(f=h(e.type)),h(e.type)===f))&&(o||(o=p(d(e))),l||(l=null!=m,l&&(r=typeof m,c&&(a=Object.keys(c).filter((e=>c[e]===m))))),c&&a&&l&&null!=m&&(a.length>1?a=a.filter((e=>c[e]===m)):1===a.length&&(a=c[a[0]]===m?a:[])),c))for(const e in c){if(i.has(e))continue;const t=I(c[e]);if("unknown"===t){n.add(e);continue}n.delete(e),i.add(e);const r=(0,u.rS)(e);r&&s.push({name:r,alias:e,type:t})}}const m=(0,u.rS)(1===a?.length&&a[0]||null)??void 0;if(m)for(const e of s)if(e.name===m&&(0,u.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:s,geometryType:f,hasZ:o,objectIdFieldName:m,objectIdFieldType:r,unknownFields:Array.from(n)}}function A(e,t){return Array.from(function*(e,t={}){const{geometryType:s,objectIdField:i}=t;for(const n of e){const{geometry:e,properties:r,id:u}=n;if(e&&h(e.type)!==s)continue;const l=r||{};let c;i&&(c=l[i],null==u||c||(l[i]=c=u));const d=new o.Om(e?y(new a.A,e,t):null,l,null,c??void 0);yield d}}(c(e),t))}},64714:(e,t,s)=>{s.d(t,{F0:()=>u,Vx:()=>c,e2:()=>p,f:()=>f});var i=s(44208),n=s(4718),r=s(99352),o=s(4071),a=s(93470);function u(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?a.Cb:"esriGeometryPolyline"===e?a.yM:a.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let h=1;function c(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let s=`this${d(t)} = null;`;for(const t in e)s+=`this${d(t)} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${h++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new i}catch(s){return()=>({[t]:null,...e})}}function d(e){return l.test(e)?`.${e}`:`["${e}"]`}function p(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}function f(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!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,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:o.$,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}}}},82832:(e,t,s)=>{s.d(t,{$1:()=>y,CR:()=>m,MB:()=>d,Yx:()=>u,bP:()=>h});var i=s(67482),n=s(21325),r=s(30524);class o{constructor(){this.code=null,this.description=null}}class a{constructor(e){this.error=new o,this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error.description=e}}function u(e){return new a(e)}class l{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function h(e){return new l(e)}const c=new Set;function d(e,t,s,i=!1){c.clear();for(const n in s){const o=e.get(n);if(!o)continue;const a=p(o,s[n]);if(c.add(o.name),o&&(i||o.editable)){const e=(0,r.CJ)(o,a);if(e)return u((0,r.uo)(e,o,a));t[o.name]=a}}for(const t of e.requiredFields??[])if(!c.has(t.name))return u(`missing required field "${t.name}"`);return null}function p(e,t){let s=t;return(0,r.WA)(e)&&"string"==typeof t?s=parseFloat(t):(0,r.yM)(e)&&null!=t&&"string"!=typeof t?s=String(t):(0,r.vE)(e)&&"string"==typeof t&&(s=(0,i._U)(t)),(0,r.WX)(s)}let f;function m(e,t){if(!e||!(0,n.fn)(t))return e;if("rings"in e||"paths"in e){if(null==f)throw new TypeError("geometry engine not loaded");return f.simplify(t,e)}return e}async function y(e,t){!(0,n.fn)(e)||"esriGeometryPolygon"!==t&&"esriGeometryPolyline"!==t||await async function(){return null==f&&(f=await Promise.all([s.e(9930),s.e(1275)]).then(s.bind(s,47559))),f}()}},4071:(e,t,s)=>{s.d(t,{$:()=>i,P:()=>n});const i={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportedStatistics:void 0},n={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:i,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},98453:(e,t,s)=>{s.d(t,{m:()=>i});const i=new(s(66552).J)({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"})},92300:(e,t,s)=>{s.d(t,{V:()=>r,X:()=>n});var i=s(65864);function n(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function r(e,t,s){const n=(0,i.xD)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=s,t}))}},2272:(e,t,s)=>{s.d(t,{Dl:()=>o,jV:()=>r,lF:()=>a}),s(92602),s(70333);var i=s(4718),n=s(84952);function r(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function o(e){return"string"==typeof e?(0,n.An)(e):(0,i.o8)(e)}function a(e,t,s){const i={};for(const n in e){if("declaredClass"===n)continue;const r=e[n];if(null!=r&&"function"!=typeof r)if(Array.isArray(r))i[n]=r.map((e=>a(e)));else if("object"==typeof r)if(r.toJSON){const e=r.toJSON(s?.[n]);i[n]=t?e:JSON.stringify(e)}else i[n]=t?r:JSON.stringify(r);else i[n]=r}return i}s(926)},93470:(e,t,s)=>{s.d(t,{Cb:()=>r,HW:()=>h,JR:()=>n,JZ:()=>u,WR:()=>a,b6:()=>c,fT:()=>i,nC:()=>l,yM:()=>o});const i=[252,146,31,255],n=[153,153,153,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i},a={type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},u={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},l={type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},h={type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},c={type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[893,7136],{51624:(e,t,s)=>{s.d(t,{A:()=>c});var r,n,i=s(44208),a=s(93687);(n=r||(r={}))[n.varint=0]="varint",n[n.fixed64=1]="fixed64",n[n.delimited=2]="delimited",n[n.fixed32=5]="fixed32",n[n.unknown=99]="unknown";const o=4294967296,l=new TextDecoder("utf-8"),u=(0,i.A)("safari")||(0,i.A)("ios")?6:(0,i.A)("ff")?12:32;class c{constructor(e,t,s=0,n=(e?e.byteLength:0)){this._tag=0,this._dataType=r.unknown,this._init(e,t,s,n)}_init(e,t,s,r){this._data=e,this._dataView=t,this._pos=s,this._end=r}asUnsafe(){return this}clone(){return new c(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;if(e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return e;throw new Error("Varint overflow")}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getUint32(t+4,!0)*o;return this._skip(8),s}getSFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getInt32(t+4,!0)*o;return this._skip(8),s}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,s=this._toString(this._data,t,t+e);return this._skip(e),s}getBytes(){const e=this._getLength(),t=this._pos,s=this._toBytes(this._data,t,t+e);return this._skip(e),s}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,s,r){const n=this.getMessage(),i=e(n,t,s,r);return n.release(),i}processMessage(e){const t=this.getMessage(),s=e(t);return t.release(),s}getMessage(){const e=this._getLength(),t=c.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){c.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case r.varint:this._decodeVarint();break;case r.fixed64:this._skip(8);break;case r.delimited:this._skip(this._getLength());break;case r.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,s=0,r=0;if(this._end-t>=10)do{if(r=e[t++],s|=127&r,!(128&r))break;if(r=e[t++],s|=(127&r)<<7,!(128&r))break;if(r=e[t++],s|=(127&r)<<14,!(128&r))break;if(r=e[t++],s|=(127&r)<<21,!(128&r))break;if(r=e[t++],s+=268435456*(127&r),!(128&r))break;if(r=e[t++],s+=34359738368*(127&r),!(128&r))break;if(r=e[t++],s+=4398046511104*(127&r),!(128&r))break;if(r=e[t++],s+=562949953421312*(127&r),!(128&r))break;if(r=e[t++],s+=72057594037927940*(127&r),!(128&r))break;if(r=e[t++],s+=0x8000000000000000*(127&r),!(128&r))break;throw new Error("Varint too long!")}while(0);else{let n=1;for(;t!==this._end&&(r=e[t],128&r);)++t,s+=(127&r)*n,n*=128;if(t===this._end)throw new Error("Varint overrun!");++t,s+=r*n}return this._pos=t,s}_decodeSVarint(){const e=this._data;let t,s=0,r=0;const n=1&e[this._pos];if(r=e[this._pos++],s|=127&r,!(128&r))return n?-(s+1)/2:s/2;if(r=e[this._pos++],s|=(127&r)<<7,!(128&r))return n?-(s+1)/2:s/2;if(r=e[this._pos++],s|=(127&r)<<14,!(128&r))return n?-(s+1)/2:s/2;if(r=e[this._pos++],s|=(127&r)<<21,!(128&r))return n?-(s+1)/2:s/2;if(r=e[this._pos++],s+=268435456*(127&r),!(128&r))return n?-(s+1)/2:s/2;if(r=e[this._pos++],s+=34359738368*(127&r),!(128&r))return n?-(s+1)/2:s/2;if(r=e[this._pos++],s+=4398046511104*(127&r),!(128&r))return n?-(s+1)/2:s/2;if(t=BigInt(s),r=e[this._pos++],t+=0x2000000000000n*BigInt(127&r),!(128&r))return Number(n?-(t+1n)/2n:t/2n);if(r=e[this._pos++],t+=0x100000000000000n*BigInt(127&r),!(128&r))return Number(n?-(t+1n)/2n:t/2n);if(r=e[this._pos++],t+=0x8000000000000000n*BigInt(127&r),!(128&r))return Number(n?-(t+1n)/2n:t/2n);throw new Error("Varint too long!")}_getLength(){if(this._dataType!==r.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,s){if((s=Math.min(this._end,s))-t>u){const r=e.subarray(t,s);return l.decode(r)}let r="",n="";for(let i=t;i<s;++i){const t=e[i];128&t?n+="%"+t.toString(16):(r+=decodeURIComponent(n)+String.fromCharCode(t),n="")}return n.length&&(r+=decodeURIComponent(n)),r}_toBytes(e,t,s){return s=Math.min(this._end,s),new Uint8Array(e.buffer,t,s-t)}}c.pool=new a.A(c,void 0,(e=>{e._data=null,e._dataView=null}))},17136:(e,t,s)=>{s.d(t,{el:()=>S});var r=s(92602),n=s(49186),i=s(53966),a=s(39829),o=s(82799),l=s(80754),u=s(21325),c=s(28735),h=(s(59456),s(78888)),f=s(65864),d=s(2272),p=s(84952),g=s(92300);const y=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function m(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function b(e,t,s){if(t){const t=function(e,t){if(!(e instanceof o.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new n.A(e)}const s=(0,l.r8)(e),r=[];for(const e of s){const s=[];r.push(s),s.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const n=e[r][0],i=e[r][1],a=e[r+1][0],o=e[r+1][1],l=Math.sqrt((a-n)*(a-n)+(o-i)*(o-i)),u=(o-i)/l,c=(a-n)/l,h=l/t;if(h>1){for(let e=1;e<=h-1;e++){const r=e*t,a=c*r+n,o=u*r+i;s.push([a,o])}const e=(l+Math.floor(h-1)*t)/2,r=c*e+n,a=u*e+i;s.push([r,a])}s.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:r,spatialReference:e.spatialReference}):new o.A({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,c.ci)(t,!0)}return s&&(e=(0,l.kS)(e,s)),e}function k(e,t,s){if(Array.isArray(e)){const r=e[0];if(r>t){const s=(0,l.kd)(r,t);e[0]=r+s*(-2*t)}else if(r<s){const t=(0,l.kd)(r,s);e[0]=r+t*(-2*s)}}else{const r=e.x;if(r>t){const s=(0,l.kd)(r,t);e=e.clone().offset(s*(-2*t),0)}else if(r<s){const t=(0,l.kd)(r,s);e=e.clone().offset(t*(-2*s),0)}}return e}function w(e,t){let s=-1;for(let r=0;r<t.cutIndexes.length;r++){const n=t.cutIndexes[r],i=t.geometries[r],a=(0,l.r8)(i);for(let e=0;e<a.length;e++){const t=a[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const r=t[e][0];s=r>s?r:s}s=Number(s.toFixed(9));const r=-360*(0,l.kd)(s,180);for(let s=0;s<t.length;s++){const t=i.getPoint(e,s);i.setPoint(e,s,t.clone().offset(r,0))}return!0}}))}if(n===s){if(m(e))for(const t of(0,l.r8)(i))e[n]=e[n].addRing(t);else if(_(e))for(const t of(0,l.r8)(i))e[n]=e[n].addPath(t)}else s=n,e[n]=i}return e}async function S(e,t,s){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??r.A.geometryServiceUrl;let i,m,_,x,T,I,F,q,R=0;const A=[],N=[];for(const t of e)if(null!=t)if(i||(i=t.spatialReference,m=(0,u.Vp)(i),_=i.isWebMercator,I=_?102100:4326,x=l.j7[I].maxX,T=l.j7[I].minX,F=l.j7[I].plus180Line,q=l.j7[I].minus180Line),m)if("mesh"===t.type)N.push(t);else if("point"===t.type)N.push(k(t.clone(),x,T));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>k(e,x,T))),N.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,m);N.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,s=(0,l.kd)(e.xmin,T)*(2*x);let r=0===s?t.clone():(0,l.kS)(t.clone(),s);e.offset(s,0);let{xmin:n,xmax:i}=e;n=Number(n.toFixed(9)),i=Number(i.toFixed(9)),e.intersects(F)&&i!==x?(R=i>R?i:R,r=b(r,_),A.push(r),N.push("cut")):e.intersects(q)&&n!==T?(R=i*(2*x)>R?i*(2*x):R,r=b(r,_,360),A.push(r),N.push("cut")):N.push(r)}else N.push(t.clone());else N.push(t);else N.push(t);let O=(0,l.kd)(R,x),V=-90;const G=O,E=new o.A;for(;O>0;){const e=360*O-180;E.addPath([[e,V],[e,-1*V]]),V*=-1,O--}if(A.length>0&&G>0){const t=w(A,await async function(e,t,s,r){const n=(0,d.Dl)(e),i=t[0].spatialReference,a={...r,responseType:"json",query:{...n.query,f:"json",sr:(0,u.YX)(i),target:JSON.stringify({geometryType:(0,f.$B)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},o=await(0,h.A)(n.path+"/cut",a),{cutIndexes:l,geometries:c=[]}=o.data;return{cutIndexes:l,geometries:c.map((e=>{const t=(0,f.rS)(e);return t.spatialReference=i,t}))}}(n,A,E,s)),r=[],i=[];for(let s=0;s<N.length;s++){const n=N[s];if("cut"!==n)i.push(n);else{const n=t.shift(),a=e[s];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&n.rings.length>=a.rings.length?(r.push(n),i.push("simplify")):i.push(_?(0,c.Gh)(n):n)}}if(!r.length)return i;const a=await async function(e,t,s){const r="string"==typeof e?(0,p.An)(e):e,n=t[0].spatialReference,i=(0,f.$B)(t[0]),a={...s,query:{...r.query,f:"json",sr:(0,u.YX)(n),geometries:JSON.stringify((0,g.X)(t))}},{data:o}=await(0,h.A)(r.path+"/simplify",a);return(0,g.V)(o.geometries,i,n)}(n,r,s),o=[];for(let e=0;e<i.length;e++){const t=i[e];"simplify"!==t?o.push(t):o.push(_?(0,c.Gh)(a.shift()):a.shift())}return o}const U=[];for(let e=0;e<N.length;e++){const t=N[e];if("cut"!==t)U.push(t);else{const e=A.shift();U.push(!0===_?(0,c.Gh)(e):e)}}return U}},80754:(e,t,s)=>{s.d(t,{j7:()=>a,kS:()=>l,kd:()=>o,r8:()=>u});var r=s(82799),n=s(16930),i=s(65864);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const s=u(e);for(const e of s)for(const s of e)s[0]+=t;return e}function u(e){return(0,i.Bi)(e)?e.rings:e.paths}},43334:(e,t,s)=>{s.d(t,{N3:()=>i,Om:()=>n});var r=s(92722);class n{constructor(e=null,t={},s,r){this.geometry=e,this.attributes=t,this.centroid=s,this.objectId=r,this.displayId=0,this.geohashX=0,this.geohashY=0}static fromJSON(e,t){const s=e.geometry?r.A.fromJSON(e.geometry):null,i=e.centroid?r.A.fromJSON(e.centroid):null,a=e.attributes[t];return new n(s,e.attributes,i,a)}weakClone(){const e=new n(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new n(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function i(e){return!!e.geometry?.coords?.length}},58512:(e,t,s)=>{s.d(t,{A:()=>r});class r{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 r;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}}},92722:(e,t,s)=>{s.d(t,{A:()=>r});class r{constructor(e=[],t=[]){this.lengths=e??[],this.coords=t??[]}static fromJSON(e){return new r(e.lengths,e.coords)}static fromRect(e){const[t,s,n,i]=e,a=n-t,o=i-s;return new r([5],[t,s,a,0,0,o,-a,0,0,-o])}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 s=0;s<this.lengths.length;s++){const r=this.lengths[s];for(let s=0;s<r;s++)e(this.coords[2*(s+t)],this.coords[2*(s+t)+1]);t+=r}}deltaDecode(){const e=this.clone(),{coords:t,lengths:s}=e;let r=0;for(const e of s){for(let s=1;s<e;s++)t[2*(r+s)]+=t[2*(r+s)-2],t[2*(r+s)+1]+=t[2*(r+s)-1];r+=e}return e}clone(e){if(0===this.lengths.length)return new r([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),s=this.coords.slice(0,t);return e?(e.set(s),new r(this.lengths,e)):new r(Array.from(this.lengths),Array.from(s))}}},92300:(e,t,s)=>{s.d(t,{V:()=>i,X:()=>n});var r=s(65864);function n(e){return{geometryType:(0,r.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function i(e,t,s){const n=(0,r.xD)(t);return e.map((e=>{const t=n.fromJSON(e);return t.spatialReference=s,t}))}},10536:(e,t,s)=>{function r(e){const t={};for(const s in e){if("declaredClass"===s)continue;const n=e[s];if(null!=n&&"function"!=typeof n)if(Array.isArray(n)){t[s]=[];for(let e=0;e<n.length;e++)t[s][e]=r(n[e])}else"object"==typeof n?n.toJSON&&(t[s]=JSON.stringify(n)):t[s]=n}return t}s.d(t,{z:()=>r})},53655:(e,t,s)=>{s.d(t,{SH:()=>R,ae:()=>x,cn:()=>_});var r=s(49186),n=s(51624),i=s(92722),a=s(69418);const o=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeBigInteger","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],l=["sqlTypeBigInt","sqlTypeBinary","sqlTypeBit","sqlTypeChar","sqlTypeDate","sqlTypeDecimal","sqlTypeDouble","sqlTypeFloat","sqlTypeGeometry","sqlTypeGUID","sqlTypeInteger","sqlTypeLongNVarchar","sqlTypeLongVarbinary","sqlTypeLongVarchar","sqlTypeNChar","sqlTypeNVarchar","sqlTypeOther","sqlTypeReal","sqlTypeSmallInt","sqlTypeSqlXml","sqlTypeTime","sqlTypeTimestamp","sqlTypeTimestamp2","sqlTypeTinyInt","sqlTypeVarbinary","sqlTypeVarchar"],u=["upperLeft","lowerLeft"];function c(e){return e>=o.length?null:o[e]}function h(e){return e>=l.length?null:l[e]}function f(e){return e>=u.length?null:u[e]}function d(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function p(e,t,s){const r=e.asUnsafe(),n=t.createPointGeometry(s);for(;r.next();)switch(r.tag()){case 3:{const e=r.getUInt32(),s=r.pos()+e;let i=0;for(;r.pos()<s;)t.addCoordinatePoint(n,r.getSInt64(),i++);break}default:r.skip()}return n}function g(e,t,s){const r=e.asUnsafe(),n=t.createGeometry(s),i=2+(s.hasZ?1:0)+(s.hasM?1:0);for(;r.next();)switch(r.tag()){case 2:{const e=r.getUInt32(),s=r.pos()+e;let i=0;for(;r.pos()<s;)t.addLength(n,r.getUInt32(),i++);break}case 3:{const e=r.getUInt32(),s=r.pos()+e;let a=0;for(t.allocateCoordinates(n);r.pos()<s;)t.addCoordinate(n,r.getSInt64(),a),a++,a===i&&(a=0);break}default:r.skip()}return n}function y(e){const t=e.asUnsafe(),s=new i.A;let r="esriGeometryPoint";for(;t.next();)switch(t.tag()){case 2:{const e=t.getUInt32(),r=t.pos()+e;for(;t.pos()<r;)s.lengths.push(t.getUInt32());break}case 3:{const e=t.getUInt32(),r=t.pos()+e;for(;t.pos()<r;)s.coords.push(t.getSInt64());break}case 1:r=a.z[t.getEnum()];break;default:t.skip()}return{queryGeometry:s,queryGeometryType:r}}function m(e){const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getSInt32();case 5:return t.getUInt32();case 6:return t.getInt64();case 7:return t.getUInt64();case 8:return t.getSInt64();case 9:return t.getBool();default:return t.skip(),null}return null}function _(e){const t=e.asUnsafe(),s={type:c(0)};for(;t.next();)switch(t.tag()){case 1:s.name=t.getString();break;case 2:s.type=c(t.getEnum());break;case 3:s.alias=t.getString();break;case 4:s.sqlType=h(t.getEnum());break;case 5:default:t.skip();break;case 6:s.defaultValue=t.getString()}return s}function b(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.name=s.getString();break;case 2:t.isSystemMaintained=s.getBool();break;default:s.skip()}return t}function k(e,t,s,r){const n=t.createFeature(s);let i=0;for(;e.next();)switch(e.tag()){case 1:{const t=r[i++].name;n.attributes[t]=e.processMessage(m);break}case 2:n.geometry=e.processMessageWithArgs(g,t,s);break;case 4:n.centroid=e.processMessageWithArgs(p,t,s);break;default:e.skip()}return n}function w(e){const t=[1,1,1,1],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function S(e){const t=[0,0,0,0],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function x(e){const t={originPosition:f(0)},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.originPosition=f(s.getEnum());break;case 2:t.scale=s.processMessage(w);break;case 3:t.translate=s.processMessage(S);break;default:s.skip()}return t}function T(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.shapeAreaFieldName=s.getString();break;case 2:t.shapeLengthFieldName=s.getString();break;case 3:t.units=s.getString();break;default:s.skip()}return t}function I(e,t){const s=t.createSpatialReference();for(;e.next();)switch(e.tag()){case 1:s.wkid=e.getUInt32();break;case 5:s.wkt=e.getString();break;case 2:s.latestWkid=e.getUInt32();break;case 3:s.vcsWkid=e.getUInt32();break;case 4:s.latestVcsWkid=e.getUInt32();break;default:e.skip()}return s}function F(e,t){const s=t.createFeatureResult(),r=e.asUnsafe();s.geometryType=d(t,0);let n=!1;for(;r.next();)switch(r.tag()){case 1:s.objectIdFieldName=r.getString();break;case 3:s.globalIdFieldName=r.getString();break;case 4:s.geohashFieldName=r.getString();break;case 5:s.geometryProperties=r.processMessage(T);break;case 7:s.geometryType=d(t,r.getEnum());break;case 8:s.spatialReference=r.processMessageWithArgs(I,t);break;case 10:s.hasZ=r.getBool();break;case 11:s.hasM=r.getBool();break;case 12:s.transform=r.processMessage(x);break;case 9:s.exceededTransferLimit=r.getBool();break;case 13:t.addField(s,r.processMessage(_));break;case 15:n||(t.prepareFeatures(s),n=!0),t.addFeature(s,r.processMessageWithArgs(k,t,s,s.fields));break;case 2:s.uniqueIdField=r.processMessage(b);break;default:r.skip()}return t.finishFeatureResult(s),s}function q(e,t){const s={};let r=null;for(;e.next();)switch(e.tag()){case 4:r=e.processMessageWithArgs(y);break;case 1:s.featureResult=e.processMessageWithArgs(F,t);break;default:e.skip()}return null!=r&&s.featureResult&&t.addQueryGeometry(s,r),s}function R(e,t){try{const s=2,r=new n.A(new Uint8Array(e),new DataView(e)),i={};for(;r.next();)r.tag()===s?i.queryResult=r.processMessageWithArgs(q,t):r.skip();return i}catch(e){throw new r.A("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}},69418:(e,t,s)=>{s.d(t,{S:()=>u,z:()=>l});var r=s(83047),n=s(21325),i=s(43334),a=s(58512),o=s(92722);const l=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class u{constructor(e){this._options=e,this.geometryTypes=l,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new a.A}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e?.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,n.aI)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,r.G9)(this._options.sourceSpatialReference)/(0,r.G9)(e.spatialReference);if(1!==t)for(const s of e.features){if(!(0,i.N3)(s))continue;const e=s.geometry.coords;for(let s=2;s<e.length;s+=3)e[s]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new i.Om}createSpatialReference(){return{wkid:0}}createGeometry(){return new o.A}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce(((e,t)=>e+t),0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new o.A}}},66208:(e,t,s)=>{s.d(t,{m:()=>n});var r=s(53655);function n(e,t){const s=(0,r.SH)(e,t),n=s.queryResult.featureResult,i=s.queryResult.queryGeometry,a=s.queryResult.queryGeometryType;if(n&&n.features&&n.features.length&&n.objectIdFieldName){const e=n.objectIdFieldName;for(const t of n.features)t.attributes&&(t.objectId=t.attributes[e])}return n&&(n.queryGeometry=i,n.queryGeometryType=a),n}},80893:(e,t,s)=>{s.d(t,{IJ:()=>p,Jf:()=>_,Pk:()=>y,eW:()=>d,gW:()=>m,kS:()=>g});var r=s(78888),n=s(84952),i=s(65864),a=s(17136),o=s(21325),l=s(10536),u=s(66208),c=s(58501);const h="Layer does not support extent calculation.";function f(e,t){const s=e.geometry,r=e.toJSON();delete r.compactGeometryEnabled,delete r.defaultSpatialReferenceEnabled;const n=r;let a,l,u;if(null!=s&&(l=s.spatialReference,u=(0,o.YX)(l),n.geometryType=(0,i.$B)(s),n.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const s=e.toJSON();return delete s.spatialReference,JSON.stringify(s)}(s,e.compactGeometryEnabled),n.inSR=u),r.groupByFieldsForStatistics&&(n.groupByFieldsForStatistics=r.groupByFieldsForStatistics.join(",")),r.objectIds&&(n.objectIds=r.objectIds.join(",")),r.orderByFields&&(n.orderByFields=r.orderByFields.join(",")),!r.outFields||!r.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete n.outFields:r.outFields.includes("*")?n.outFields="*":n.outFields=r.outFields.join(","),r.outSR?(n.outSR=(0,o.YX)(r.outSR),a=e.outSpatialReference):s&&(r.returnGeometry||r.returnCentroid)&&(n.outSR=n.inSR,a=l),r.returnGeometry&&delete r.returnGeometry,r.outStatistics&&(n.outStatistics=JSON.stringify(r.outStatistics)),r.fullText&&(n.fullText=JSON.stringify(r.fullText)),r.pixelSize&&(n.pixelSize=JSON.stringify(r.pixelSize)),r.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&null!=l&&null!=e.quantizationParameters?.extent&&l.equals(e.quantizationParameters.extent.spatialReference)&&delete r.quantizationParameters.extent.spatialReference,n.quantizationParameters=JSON.stringify(r.quantizationParameters)),r.parameterValues&&(n.parameterValues=JSON.stringify(r.parameterValues)),r.rangeValues&&(n.rangeValues=JSON.stringify(r.rangeValues)),r.dynamicDataSource&&(n.layer=JSON.stringify({source:r.dynamicDataSource}),delete r.dynamicDataSource),r.timeExtent){const e=r.timeExtent,{start:t,end:s}=e;null==t&&null==s||(n.time=t===s?t:`${t??"null"},${s??"null"}`),delete r.timeExtent}return e.defaultSpatialReferenceEnabled&&null!=l&&null!=a&&l.equals(a)&&(n.defaultSR=n.inSR,delete n.inSR,delete n.outSR),n}async function d(e,t,s,r){const n=null!=t.timeExtent&&t.timeExtent.isEmpty?{data:{features:[]}}:await b(e,t,"json",r);return(0,c.q)(t,s,n.data),n}async function p(e,t,s,r){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:s.createFeatureResult()};const n=await g(e,t,r),i=n;return i.data=(0,u.m)(n.data,s),i}function g(e,t,s){return b(e,t,"pbf",s)}function y(e,t,s){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{objectIds:[]}}):b(e,t,"json",s,{returnIdsOnly:!0})}function m(e,t,s){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):b(e,t,"json",s,{returnIdsOnly:!0,returnCountOnly:!0})}async function _(e,t,s){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:{count:0,extent:null}};const r=await b(e,t,"json",s,{returnExtentOnly:!0,returnCountOnly:!0}),n=r.data;if(n.hasOwnProperty("extent"))return r;if(n.features)throw new Error(h);if(n.hasOwnProperty("count"))throw new Error(h);return r}async function b(e,t,s,i={},o={}){const u="string"==typeof e?(0,n.An)(e):e,c=t.geometry?[t.geometry]:[],h=await(0,a.el)(c,null,{signal:i.signal}),d=h?.[0];null!=d&&((t=t.clone()).geometry=d);const p=(0,l.z)({...u.query,f:s,...o,...f(t,o)});return(0,r.A)((0,n.fj)(u.path,(g=o,null==t.formatOf3DObjects||g.returnCountOnly||g.returnExtentOnly||g.returnIdsOnly?"query":"query3d")),{...i,responseType:"pbf"===s?"array-buffer":"json",query:{...p,...i.query}});var g}},2272:(e,t,s)=>{s.d(t,{Dl:()=>a,jV:()=>i,lF:()=>o}),s(92602),s(70333);var r=s(4718),n=s(84952);function i(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function a(e){return"string"==typeof e?(0,n.An)(e):(0,r.o8)(e)}function o(e,t,s){const r={};for(const n in e){if("declaredClass"===n)continue;const i=e[n];if(null!=i&&"function"!=typeof i)if(Array.isArray(i))r[n]=i.map((e=>o(e)));else if("object"==typeof i)if(i.toJSON){const e=i.toJSON(s?.[n]);r[n]=t?e:JSON.stringify(e)}else r[n]=t?i:JSON.stringify(i);else r[n]=i}return r}s(926)}}]);